teodor-new-chat-ui 3.0.56 → 3.0.58

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.esm.js CHANGED
@@ -2,12 +2,12 @@ import * as f from "react";
2
2
  import K, { useState as fe, useRef as bt, useCallback as Ye, useEffect as Ve, useReducer as Pp, useMemo as wn, createContext as gc, useContext as vc, createElement as to, useLayoutEffect as _p } from "react";
3
3
  import * as Bo from "react-dom";
4
4
  import xc from "react-dom";
5
- import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as bc, FileText as Ha, Loader as Fp, ChevronUp as hr, ChevronDown as Un, Copy as $a, Edit as za, RotateCcw as qs, Bot as Ua, Wrench as Bp, User as Hp, ChevronRight as $p, Check as Oi, Circle as zp, Edit3 as wc, Paperclip as Wa, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as Xp, PanelLeft as qp, Settings as Jp, Server as Zp, EyeOff as Qp, Eye as em, Layout as tm, MessageCircle as nm, Save as rm } from "lucide-react";
5
+ import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as bc, FileText as Ha, Loader as Fp, ChevronUp as hr, ChevronDown as Un, Copy as $a, Edit as za, RotateCcw as qs, Bot as Ua, Wrench as Bp, User as Hp, ChevronRight as $p, Check as Oi, Circle as zp, Edit3 as wc, Paperclip as Wa, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as Xp, PanelLeft as qp, Settings as Zp, Server as Jp, EyeOff as Qp, Eye as em, Layout as tm, MessageCircle as nm, Save as rm } from "lucide-react";
6
6
  import { Slot as Qn, createSlot as Yn, createSlottable as om } from "@radix-ui/react-slot";
7
7
  import { cva as Pr } from "class-variance-authority";
8
8
  import { clsx as sm } from "clsx";
9
9
  import { twMerge as im } from "tailwind-merge";
10
- var Js = { exports: {} }, cr = {};
10
+ var Zs = { exports: {} }, cr = {};
11
11
  /**
12
12
  * @license React
13
13
  * react-jsx-runtime.production.min.js
@@ -209,13 +209,13 @@ function lm() {
209
209
  ` + Y + T;
210
210
  }
211
211
  }
212
- var Z = !1, ne;
212
+ var J = !1, ne;
213
213
  {
214
214
  var le = typeof WeakMap == "function" ? WeakMap : Map;
215
215
  ne = new le();
216
216
  }
217
217
  function ie(T, U) {
218
- if (!T || Z)
218
+ if (!T || J)
219
219
  return "";
220
220
  {
221
221
  var te = ne.get(T);
@@ -223,7 +223,7 @@ function lm() {
223
223
  return te;
224
224
  }
225
225
  var ge;
226
- Z = !0;
226
+ J = !0;
227
227
  var _e = Error.prepareStackTrace;
228
228
  Error.prepareStackTrace = void 0;
229
229
  var Me;
@@ -264,23 +264,23 @@ function lm() {
264
264
  if (tn && ge && typeof tn.stack == "string") {
265
265
  for (var Ee = tn.stack.split(`
266
266
  `), dt = ge.stack.split(`
267
- `), Ke = Ee.length - 1, Je = dt.length - 1; Ke >= 1 && Je >= 0 && Ee[Ke] !== dt[Je]; )
268
- Je--;
269
- for (; Ke >= 1 && Je >= 0; Ke--, Je--)
270
- if (Ee[Ke] !== dt[Je]) {
271
- if (Ke !== 1 || Je !== 1)
267
+ `), Ke = Ee.length - 1, Ze = dt.length - 1; Ke >= 1 && Ze >= 0 && Ee[Ke] !== dt[Ze]; )
268
+ Ze--;
269
+ for (; Ke >= 1 && Ze >= 0; Ke--, Ze--)
270
+ if (Ee[Ke] !== dt[Ze]) {
271
+ if (Ke !== 1 || Ze !== 1)
272
272
  do
273
- if (Ke--, Je--, Je < 0 || Ee[Ke] !== dt[Je]) {
273
+ if (Ke--, Ze--, Ze < 0 || Ee[Ke] !== dt[Ze]) {
274
274
  var Et = `
275
275
  ` + Ee[Ke].replace(" at new ", " at ");
276
276
  return T.displayName && Et.includes("<anonymous>") && (Et = Et.replace("<anonymous>", T.displayName)), typeof T == "function" && ne.set(T, Et), Et;
277
277
  }
278
- while (Ke >= 1 && Je >= 0);
278
+ while (Ke >= 1 && Ze >= 0);
279
279
  break;
280
280
  }
281
281
  }
282
282
  } finally {
283
- Z = !1, be.current = Me, de(), Error.prepareStackTrace = _e;
283
+ J = !1, be.current = Me, de(), Error.prepareStackTrace = _e;
284
284
  }
285
285
  var Fn = T ? T.displayName || T.name : "", Ba = Fn ? P(Fn) : "";
286
286
  return typeof T == "function" && ne.set(T, Ba), Ba;
@@ -460,13 +460,13 @@ function lm() {
460
460
  Ie[Me] === void 0 && (Ie[Me] = Ke[Me]);
461
461
  }
462
462
  if (Ee || dt) {
463
- var Je = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
- Ee && Ue(Ie, Je), dt && lr(Ie, Je);
463
+ var Ze = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
+ Ee && Ue(Ie, Ze), dt && lr(Ie, Ze);
465
465
  }
466
466
  return Cs(T, Ee, dt, _e, ge, We.current, Ie);
467
467
  }
468
468
  }
469
- var J = b.ReactCurrentOwner, se = b.ReactDebugCurrentFrame;
469
+ var Z = b.ReactCurrentOwner, se = b.ReactDebugCurrentFrame;
470
470
  function Ce(T) {
471
471
  if (T) {
472
472
  var U = T._owner, te = Le(T.type, T._source, U ? U.type : null);
@@ -481,8 +481,8 @@ function lm() {
481
481
  }
482
482
  function Ot() {
483
483
  {
484
- if (J.current) {
485
- var T = G(J.current.type);
484
+ if (Z.current) {
485
+ var T = G(Z.current.type);
486
486
  if (T)
487
487
  return `
488
488
 
@@ -517,7 +517,7 @@ Check the top-level render call using <` + te + ">.");
517
517
  return;
518
518
  Ma[te] = !0;
519
519
  var ge = "";
520
- T && T._owner && T._owner !== J.current && (ge = " It was passed a child from " + G(T._owner.type) + "."), Ce(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', te, ge), Ce(null);
520
+ T && T._owner && T._owner !== Z.current && (ge = " It was passed a child from " + G(T._owner.type) + "."), Ce(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', te, ge), Ce(null);
521
521
  }
522
522
  }
523
523
  function La(T, U) {
@@ -587,9 +587,9 @@ Check the top-level render call using <` + te + ">.");
587
587
  var Ke;
588
588
  T === null ? Ke = "null" : nt(T) ? Ke = "array" : T !== void 0 && T.$$typeof === t ? (Ke = "<" + (G(T.type) || "Unknown") + " />", Ee = " Did you accidentally export a JSX literal instead of a component?") : Ke = typeof T, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ke, Ee);
589
589
  }
590
- var Je = Ts(T, U, te, _e, Me);
591
- if (Je == null)
592
- return Je;
590
+ var Ze = Ts(T, U, te, _e, Me);
591
+ if (Ze == null)
592
+ return Ze;
593
593
  if (Ie) {
594
594
  var Et = U.children;
595
595
  if (Et !== void 0)
@@ -603,7 +603,7 @@ Check the top-level render call using <` + te + ">.");
603
603
  else
604
604
  La(Et, T);
605
605
  }
606
- return T === r ? Ip(Je) : Rp(Je), Je;
606
+ return T === r ? Ip(Ze) : Rp(Ze), Ze;
607
607
  }
608
608
  }
609
609
  function Np(T, U, te) {
@@ -616,8 +616,8 @@ Check the top-level render call using <` + te + ">.");
616
616
  ur.Fragment = r, ur.jsx = Ap, ur.jsxs = kp;
617
617
  }()), ur;
618
618
  }
619
- process.env.NODE_ENV === "production" ? Js.exports = am() : Js.exports = lm();
620
- var l = Js.exports;
619
+ process.env.NODE_ENV === "production" ? Zs.exports = am() : Zs.exports = lm();
620
+ var l = Zs.exports;
621
621
  function yc(e, t) {
622
622
  return function() {
623
623
  return e.apply(t, arguments);
@@ -681,10 +681,10 @@ function Ec(e, t) {
681
681
  return null;
682
682
  }
683
683
  const yn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Rc = (e) => !Xn(e) && e !== yn;
684
- function Zs() {
684
+ function Js() {
685
685
  const { caseless: e, skipUndefined: t } = Rc(this) && this || {}, n = {}, r = (o, s) => {
686
686
  const i = e && Ec(n, s) || s;
687
- no(n[i]) && no(o) ? n[i] = Zs(n[i], o) : no(o) ? n[i] = Zs({}, o) : er(o) ? n[i] = o.slice() : (!t || !Xn(o)) && (n[i] = o);
687
+ no(n[i]) && no(o) ? n[i] = Js(n[i], o) : no(o) ? n[i] = Js({}, o) : er(o) ? n[i] = o.slice() : (!t || !Xn(o)) && (n[i] = o);
688
688
  };
689
689
  for (let o = 0, s = arguments.length; o < s; o++)
690
690
  arguments[o] && Mr(arguments[o], r);
@@ -823,7 +823,7 @@ const Um = (e) => {
823
823
  isTypedArray: Pm,
824
824
  isFileList: vm,
825
825
  forEach: Mr,
826
- merge: Zs,
826
+ merge: Js,
827
827
  extend: Rm,
828
828
  trim: Em,
829
829
  stripBOM: Im,
@@ -1018,13 +1018,13 @@ Pc.toString = function(t) {
1018
1018
  return n(o[0]) + "=" + n(o[1]);
1019
1019
  }, "").join("&");
1020
1020
  };
1021
- function Jm(e) {
1021
+ function Zm(e) {
1022
1022
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
1023
1023
  }
1024
1024
  function _c(e, t, n) {
1025
1025
  if (!t)
1026
1026
  return e;
1027
- const r = n && n.encode || Jm;
1027
+ const r = n && n.encode || Zm;
1028
1028
  j.isFunction(n) && (n = {
1029
1029
  serialize: n
1030
1030
  });
@@ -1094,10 +1094,10 @@ const Oc = {
1094
1094
  silentJSONParsing: !0,
1095
1095
  forcedJSONParsing: !0,
1096
1096
  clarifyTimeoutError: !1
1097
- }, Zm = typeof URLSearchParams < "u" ? URLSearchParams : Di, Qm = typeof FormData < "u" ? FormData : null, eg = typeof Blob < "u" ? Blob : null, tg = {
1097
+ }, Jm = typeof URLSearchParams < "u" ? URLSearchParams : Di, Qm = typeof FormData < "u" ? FormData : null, eg = typeof Blob < "u" ? Blob : null, tg = {
1098
1098
  isBrowser: !0,
1099
1099
  classes: {
1100
- URLSearchParams: Zm,
1100
+ URLSearchParams: Jm,
1101
1101
  FormData: Qm,
1102
1102
  Blob: eg
1103
1103
  },
@@ -1253,7 +1253,7 @@ const ug = j.toObjectSet([
1253
1253
  `).forEach(function(i) {
1254
1254
  o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && ug[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
1255
1255
  }), t;
1256
- }, Ja = Symbol("internals");
1256
+ }, Za = Symbol("internals");
1257
1257
  function dr(e) {
1258
1258
  return e && String(e).trim().toLowerCase();
1259
1259
  }
@@ -1408,7 +1408,7 @@ let mt = class {
1408
1408
  return n.forEach((o) => r.set(o)), r;
1409
1409
  }
1410
1410
  static accessor(t) {
1411
- const r = (this[Ja] = this[Ja] = {
1411
+ const r = (this[Za] = this[Za] = {
1412
1412
  accessors: {}
1413
1413
  }).accessors, o = this.prototype;
1414
1414
  function s(i) {
@@ -1506,7 +1506,7 @@ const So = (e, t, n = 3) => {
1506
1506
  };
1507
1507
  e(h);
1508
1508
  }, n);
1509
- }, Za = (e, t) => {
1509
+ }, Ja = (e, t) => {
1510
1510
  const n = e != null;
1511
1511
  return [(r) => t[0]({
1512
1512
  lengthComputable: n,
@@ -1864,7 +1864,7 @@ const Bc = (e) => {
1864
1864
  duplex: "half"
1865
1865
  }), oe;
1866
1866
  if (j.isFormData(b) && (oe = q.headers.get("content-type")) && I.setContentType(oe), q.body) {
1867
- const [F, Q] = Za(
1867
+ const [F, Q] = Ja(
1868
1868
  $,
1869
1869
  So(Qa(C))
1870
1870
  );
@@ -1889,7 +1889,7 @@ const Bc = (e) => {
1889
1889
  ["status", "statusText", "headers"].forEach((de) => {
1890
1890
  q[de] = O[de];
1891
1891
  });
1892
- const oe = j.toFiniteNumber(O.headers.get("content-length")), [F, Q] = S && Za(
1892
+ const oe = j.toFiniteNumber(O.headers.get("content-length")), [F, Q] = S && Ja(
1893
1893
  oe,
1894
1894
  So(Qa(S), !0)
1895
1895
  ) || [];
@@ -2365,8 +2365,8 @@ const {
2365
2365
  toFormData: YT,
2366
2366
  AxiosHeaders: XT,
2367
2367
  HttpStatusCode: qT,
2368
- formToJSON: JT,
2369
- getAdapter: ZT,
2368
+ formToJSON: ZT,
2369
+ getAdapter: JT,
2370
2370
  mergeConfig: QT
2371
2371
  } = qe, Ns = {};
2372
2372
  function cl() {
@@ -2757,7 +2757,7 @@ function Yg(e, t) {
2757
2757
  return { ...e, messages: u };
2758
2758
  }
2759
2759
  if (o.type === "checkpoint") {
2760
- const s = Zg(e.messages, o.checkpointId);
2760
+ const s = Jg(e.messages, o.checkpointId);
2761
2761
  return { ...e, lastCheckpointId: o.checkpointId, messages: s };
2762
2762
  }
2763
2763
  if (o.type === "branch") {
@@ -2816,9 +2816,9 @@ function qg(e, t, n) {
2816
2816
  });
2817
2817
  }
2818
2818
  function hl(e, t, n) {
2819
- return e.map((r) => r.id === t ? { ...r, content: Jg(r.content, n) } : r);
2819
+ return e.map((r) => r.id === t ? { ...r, content: Zg(r.content, n) } : r);
2820
2820
  }
2821
- function Jg(e, t) {
2821
+ function Zg(e, t) {
2822
2822
  const n = e.slice();
2823
2823
  for (const r of t)
2824
2824
  if (r.type === "text") {
@@ -2828,7 +2828,7 @@ function Jg(e, t) {
2828
2828
  n.push(r);
2829
2829
  return n;
2830
2830
  }
2831
- function Zg(e, t) {
2831
+ function Jg(e, t) {
2832
2832
  for (let n = e.length - 1; n >= 0; n--)
2833
2833
  if (e[n].role === "assistant") {
2834
2834
  const o = { ...e[n], checkpointId: t };
@@ -3061,7 +3061,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3061
3061
  }
3062
3062
  },
3063
3063
  [u, X]
3064
- ), Z = Ye(async (H) => {
3064
+ ), J = Ye(async (H) => {
3065
3065
  const ae = await u.listCheckpoints(H);
3066
3066
  return ev(ae, H);
3067
3067
  }, [u]), ne = Ye(async (H) => {
@@ -3193,7 +3193,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3193
3193
  isLoadingHistory: M,
3194
3194
  loadOlderMessages: Ae,
3195
3195
  historyPageSize: I,
3196
- listCheckpoints: Z,
3196
+ listCheckpoints: J,
3197
3197
  navigateToCheckpoint: ne,
3198
3198
  returnToLatest: le,
3199
3199
  refreshThreads: oe,
@@ -3422,7 +3422,7 @@ function dv(e) {
3422
3422
  };
3423
3423
  return n(e);
3424
3424
  }
3425
- function Ze(...e) {
3425
+ function Je(...e) {
3426
3426
  const t = Re(), n = new Array(e.length);
3427
3427
  let r = 0;
3428
3428
  const o = Math.pow(2, e.length) - 1;
@@ -3680,8 +3680,8 @@ function ai(e, t) {
3680
3680
  if (De(o))
3681
3681
  return r;
3682
3682
  {
3683
- const [s, i] = Zc(r);
3684
- return io(et(e, { k: s, l: Jc(r), v: i }));
3683
+ const [s, i] = Jc(r);
3684
+ return io(et(e, { k: s, l: Zc(r), v: i }));
3685
3685
  }
3686
3686
  } else return t < n ? io(et(e, { l: ai(r, t) })) : io(et(e, { r: ai(o, t) }));
3687
3687
  }
@@ -3738,14 +3738,14 @@ function et(e, t) {
3738
3738
  t.r !== void 0 ? t.r : e.r
3739
3739
  );
3740
3740
  }
3741
- function Jc(e) {
3742
- return De(e.r) ? e.l : io(et(e, { r: Jc(e.r) }));
3741
+ function Zc(e) {
3742
+ return De(e.r) ? e.l : io(et(e, { r: Zc(e.r) }));
3743
3743
  }
3744
3744
  function ks(e) {
3745
3745
  return De(e) || e.lvl > e.r.lvl;
3746
3746
  }
3747
- function Zc(e) {
3748
- return De(e.r) ? [e.k, e.v] : Zc(e.r);
3747
+ function Jc(e) {
3748
+ return De(e.r) ? [e.k, e.v] : Jc(e.r);
3749
3749
  }
3750
3750
  function Qc(e, t, n, r = yr, o = yr) {
3751
3751
  return { k: e, l: r, lvl: n, r: o, v: t };
@@ -3937,7 +3937,7 @@ function Rv(e) {
3937
3937
  const Iv = {
3938
3938
  offsetHeight: "height",
3939
3939
  offsetWidth: "width"
3940
- }, Zt = je(
3940
+ }, Jt = je(
3941
3941
  ([{ log: e }, { recalcInProgress: t }]) => {
3942
3942
  const n = Re(), r = Re(), o = ct(r, 0), s = Re(), i = Re(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S, C) => cn(S, Iv[C])), p = V(void 0), x = V(0), g = xv(), v = ct(
3943
3943
  B(n, Se(c, e, x), Yt(Cv, g), He()),
@@ -4199,7 +4199,7 @@ const su = je(
4199
4199
  e
4200
4200
  ), ue(
4201
4201
  B(
4202
- Ze(o, t, r),
4202
+ Je(o, t, r),
4203
4203
  pe(([c, u]) => Yo(u)),
4204
4204
  re(([c, u, d]) => Bt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
4205
4205
  He(),
@@ -4208,7 +4208,7 @@ const su = je(
4208
4208
  i
4209
4209
  ), { groupCounts: s, topItemsIndexes: i };
4210
4210
  },
4211
- $e(Zt, ft)
4211
+ $e(Jt, ft)
4212
4212
  ), mn = je(
4213
4213
  ([{ log: e }]) => {
4214
4214
  const t = V(!1), n = St(
@@ -4289,7 +4289,7 @@ const Lr = je(
4289
4289
  topListHeight: v
4290
4290
  };
4291
4291
  },
4292
- $e(Zt, ft, pn),
4292
+ $e(Jt, ft, pn),
4293
4293
  { singleton: !0 }
4294
4294
  );
4295
4295
  function Av(e) {
@@ -4332,7 +4332,7 @@ const Fr = je(
4332
4332
  u
4333
4333
  ), Oe(
4334
4334
  B(
4335
- Ze(t, i),
4335
+ Je(t, i),
4336
4336
  Se(a, n, e, u),
4337
4337
  pe(([[, d], h, { sizeTree: p }, x, g]) => d && (!De(p) || Bi(x)) && !h && !g),
4338
4338
  Se(c)
@@ -4352,7 +4352,7 @@ const Fr = je(
4352
4352
  scrolledToInitialItem: a
4353
4353
  };
4354
4354
  },
4355
- $e(Zt, ft, Lr, mn),
4355
+ $e(Jt, ft, Lr, mn),
4356
4356
  { singleton: !0 }
4357
4357
  );
4358
4358
  function au(e, t) {
@@ -4380,7 +4380,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4380
4380
  );
4381
4381
  ue(
4382
4382
  B(
4383
- Ze(he(o), he(h)),
4383
+ Je(he(o), he(h)),
4384
4384
  re(([w, y]) => w <= y),
4385
4385
  He()
4386
4386
  ),
@@ -4388,7 +4388,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4388
4388
  ), ue(B(a, nn(50)), u);
4389
4389
  const g = St(
4390
4390
  B(
4391
- Ze(r, he(s), he(t), he(e), he(d)),
4391
+ Je(r, he(s), he(t), he(e), he(d)),
4392
4392
  Yt((w, [{ scrollHeight: y, scrollTop: R }, S, C, E, I]) => {
4393
4393
  const A = R + S - y > -I, k = {
4394
4394
  scrollHeight: y,
@@ -4511,7 +4511,7 @@ const Gi = je(
4511
4511
  ([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
4512
4512
  const s = Re(), i = V(0), a = V(0), c = V(0), u = ct(
4513
4513
  B(
4514
- Ze(
4514
+ Je(
4515
4515
  he(r),
4516
4516
  he(o),
4517
4517
  he(n),
@@ -4660,7 +4660,7 @@ const _n = je(
4660
4660
  ue(s.topItemsIndexes, v);
4661
4661
  const w = ct(
4662
4662
  B(
4663
- Ze(
4663
+ Je(
4664
4664
  x,
4665
4665
  g,
4666
4666
  he(c, Cr),
@@ -4710,9 +4710,9 @@ const _n = je(
4710
4710
  const de = W[0], be = W[W.length - 1];
4711
4711
  let Y = 0;
4712
4712
  for (const P of Ko(O, de, be)) {
4713
- const Z = P.value, ne = Math.max(P.start, de), le = Math.min(P.end, be);
4713
+ const J = P.value, ne = Math.max(P.start, de), le = Math.min(P.end, be);
4714
4714
  for (let ie = ne; ie <= le; ie++)
4715
- z.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: Y, size: Z }), Y += Z;
4715
+ z.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: Y, size: J }), Y += J;
4716
4716
  }
4717
4717
  }
4718
4718
  if (!M)
@@ -4723,16 +4723,16 @@ const _n = je(
4723
4723
  const F = I - 1, Q = Go([], (de) => {
4724
4724
  for (const be of oe) {
4725
4725
  const Y = be.value;
4726
- let P = Y.offset, Z = be.start;
4726
+ let P = Y.offset, J = be.start;
4727
4727
  const ne = Y.size;
4728
4728
  if (Y.offset < C) {
4729
- Z += Math.floor((C - Y.offset + N) / (ne + N));
4730
- const ie = Z - be.start;
4729
+ J += Math.floor((C - Y.offset + N) / (ne + N));
4730
+ const ie = J - be.start;
4731
4731
  P += ie * ne + ie * N;
4732
4732
  }
4733
- Z < q && (P += (q - Z) * ne, Z = q);
4733
+ J < q && (P += (q - J) * ne, J = q);
4734
4734
  const le = Math.min(be.end, F);
4735
- for (let ie = Z; ie <= le && !(P >= E); ie++)
4735
+ for (let ie = J; ie <= le && !(P >= E); ie++)
4736
4736
  de.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: P, size: ne }), P += ne + N;
4737
4737
  }
4738
4738
  });
@@ -4810,7 +4810,7 @@ const _n = je(
4810
4810
  return { endReached: y, initialItemCount: m, itemsRendered: b, listState: w, rangeChanged: S, startReached: R, topItemsIndexes: v, ...p };
4811
4811
  },
4812
4812
  $e(
4813
- Zt,
4813
+ Jt,
4814
4814
  su,
4815
4815
  Gi,
4816
4816
  Fr,
@@ -4824,7 +4824,7 @@ const _n = je(
4824
4824
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
4825
4825
  const s = Re(), i = ct(
4826
4826
  B(
4827
- Ze(n, e, r, t, o),
4827
+ Je(n, e, r, t, o),
4828
4828
  re(([a, c, u, d, h]) => a + c + u + d + h.offsetBottom + h.bottom)
4829
4829
  ),
4830
4830
  0
@@ -4837,7 +4837,7 @@ const _n = je(
4837
4837
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
4838
4838
  const n = V(!1), r = ct(
4839
4839
  B(
4840
- Ze(n, e, t),
4840
+ Je(n, e, t),
4841
4841
  pe(([o]) => o),
4842
4842
  re(([, o, s]) => Math.max(0, o - s)),
4843
4843
  nn(0),
@@ -4895,7 +4895,7 @@ const _n = je(
4895
4895
  scrollIntoView: d
4896
4896
  };
4897
4897
  },
4898
- $e(Zt, ft, Lr, _n, pn),
4898
+ $e(Jt, ft, Lr, _n, pn),
4899
4899
  { singleton: !0 }
4900
4900
  );
4901
4901
  function Tl(e) {
@@ -4924,7 +4924,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4924
4924
  }
4925
4925
  Oe(
4926
4926
  B(
4927
- Ze(B(he(t), In(1)), c),
4927
+ Je(B(he(t), In(1)), c),
4928
4928
  Se(he(g), s, a, h),
4929
4929
  re(([[S, C], E, I, A, k]) => {
4930
4930
  let M = C && A, W = "auto";
@@ -4948,7 +4948,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4948
4948
  }
4949
4949
  Oe(
4950
4950
  B(
4951
- Ze(he(g), t, u),
4951
+ Je(he(g), t, u),
4952
4952
  pe(([S, , C]) => S && C),
4953
4953
  Yt(
4954
4954
  ({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
@@ -4962,7 +4962,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4962
4962
  }
4963
4963
  ), Oe(v, () => {
4964
4964
  w(Xe(g) !== !1);
4965
- }), Oe(Ze(he(g), o), ([S, C]) => {
4965
+ }), Oe(Je(he(g), o), ([S, C]) => {
4966
4966
  S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && b("auto");
4967
4967
  });
4968
4968
  const y = V(null), R = Re();
@@ -4980,7 +4980,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4980
4980
  R
4981
4981
  ), Oe(
4982
4982
  B(
4983
- Ze(B(R, In(1)), c),
4983
+ Je(B(R, In(1)), c),
4984
4984
  Se(he(y), a, h, p),
4985
4985
  re(([[S, C], E, I, A, k]) => C && I && (E == null ? void 0 : E({ context: k, totalCount: S, scrollingInProgress: A }))),
4986
4986
  pe((S) => !!S),
@@ -4996,7 +4996,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4996
4996
  ), { autoscrollToBottom: v, followOutput: g, scrollIntoViewOnChange: y };
4997
4997
  },
4998
4998
  $e(
4999
- Zt,
4999
+ Jt,
5000
5000
  Br,
5001
5001
  Lr,
5002
5002
  Fr,
@@ -5017,7 +5017,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5017
5017
  ),
5018
5018
  i
5019
5019
  ), {}),
5020
- $e(Zt, Fr, _n, mn),
5020
+ $e(Jt, Fr, _n, mn),
5021
5021
  { singleton: !0 }
5022
5022
  ), Hv = je(
5023
5023
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
@@ -5070,7 +5070,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5070
5070
  ),
5071
5071
  t
5072
5072
  ), Oe(
5073
- B(Ze(t, e, n), Se(r)),
5073
+ B(Je(t, e, n), Se(r)),
5074
5074
  ([[o, s, i], a]) => {
5075
5075
  o && a && a.change && a.change(s, i);
5076
5076
  }
@@ -5082,7 +5082,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5082
5082
  const n = Re(), r = Re(), o = Re(), s = V(!1), i = V(void 0);
5083
5083
  return ue(
5084
5084
  B(
5085
- Ze(n, r),
5085
+ Je(n, r),
5086
5086
  re(([{ scrollHeight: a, scrollTop: c, viewportHeight: u }, { offsetTop: d }]) => ({
5087
5087
  scrollHeight: a,
5088
5088
  scrollTop: Math.max(0, c - d),
@@ -5142,7 +5142,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5142
5142
  restoreStateFrom: d
5143
5143
  };
5144
5144
  },
5145
- $e(Zt, ft, Fr, mn, Ki)
5145
+ $e(Jt, ft, Fr, mn, Ki)
5146
5146
  );
5147
5147
  function zv(e) {
5148
5148
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -5196,7 +5196,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5196
5196
  y && Wv() ? ye(e, w - b) : m(-b);
5197
5197
  }), Oe(
5198
5198
  B(
5199
- Ze(ct(s, !1), e, g),
5199
+ Je(ct(s, !1), e, g),
5200
5200
  pe(([b, w, y]) => !b && !y && w !== 0),
5201
5201
  re(([b, w]) => w),
5202
5202
  nn(1)
@@ -5240,7 +5240,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5240
5240
  }
5241
5241
  ), { deviation: e };
5242
5242
  },
5243
- $e(ft, Br, _n, Zt, pn, zi)
5243
+ $e(ft, Br, _n, Jt, pn, zi)
5244
5244
  ), Gv = je(
5245
5245
  ([
5246
5246
  e,
@@ -5344,7 +5344,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5344
5344
  ...m
5345
5345
  }),
5346
5346
  $e(
5347
- Zt,
5347
+ Jt,
5348
5348
  Fr,
5349
5349
  ft,
5350
5350
  $v,
@@ -5540,7 +5540,7 @@ const Xv = /* @__PURE__ */ je(() => {
5540
5540
  }), qv = /* @__PURE__ */ je(
5541
5541
  ([e, t]) => ({ ...e, ...t }),
5542
5542
  $e(pu, Xv)
5543
- ), Jv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Zv = { overflowAnchor: "none", position: Yi(), zIndex: 1 }, wu = { overflowAnchor: "none" }, Qv = { ...wu, display: "inline-block", height: "100%" }, Rl = /* @__PURE__ */ K.memo(function({ showTopList: e = !1 }) {
5543
+ ), Zv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Jv = { overflowAnchor: "none", position: Yi(), zIndex: 1 }, wu = { overflowAnchor: "none" }, Qv = { ...wu, display: "inline-block", height: "100%" }, Rl = /* @__PURE__ */ K.memo(function({ showTopList: e = !1 }) {
5544
5544
  const t = xe("listState"), n = It("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = It("windowScrollContainerState"), i = It("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), h = xe("trackItemSizes"), p = xe("itemSize"), x = xe("log"), g = It("gap"), v = xe("horizontalDirection"), { callbackRef: m } = pv(
5545
5545
  n,
5546
5546
  p,
@@ -5555,7 +5555,7 @@ const Xv = /* @__PURE__ */ je(() => {
5555
5555
  qi("deviation", (N) => {
5556
5556
  b !== N && w(N);
5557
5557
  });
5558
- const y = xe("EmptyPlaceholder"), R = xe("ScrollSeekPlaceholder") || Jv, S = xe("ListComponent"), C = xe("ItemComponent"), E = xe("GroupComponent"), I = xe("computeItemKey"), A = xe("isSeeking"), k = xe("groupIndices").length > 0, M = xe("alignToBottom"), W = xe("initialItemFinalLocationReached"), G = e ? {} : {
5558
+ const y = xe("EmptyPlaceholder"), R = xe("ScrollSeekPlaceholder") || Zv, S = xe("ListComponent"), C = xe("ItemComponent"), E = xe("GroupComponent"), I = xe("computeItemKey"), A = xe("isSeeking"), k = xe("groupIndices").length > 0, M = xe("alignToBottom"), W = xe("initialItemFinalLocationReached"), G = e ? {} : {
5559
5559
  boxSizing: "border-box",
5560
5560
  ...v ? {
5561
5561
  display: "inline-block",
@@ -5598,7 +5598,7 @@ const Xv = /* @__PURE__ */ je(() => {
5598
5598
  "data-item-index": N.index,
5599
5599
  "data-known-size": N.size,
5600
5600
  key: L,
5601
- style: Zv
5601
+ style: Jv
5602
5602
  },
5603
5603
  d(N.index, u)
5604
5604
  ) : /* @__PURE__ */ to(
@@ -5903,15 +5903,15 @@ const xx = /* @__PURE__ */ je(
5903
5903
  B(
5904
5904
  g,
5905
5905
  Se(_),
5906
- pe(([P, Z]) => !!Z)
5906
+ pe(([P, J]) => !!J)
5907
5907
  ),
5908
5908
  () => {
5909
5909
  ye(z, !1);
5910
5910
  }
5911
5911
  ), Oe(
5912
5912
  B(
5913
- Ze(g, z, k, A, _, q),
5914
- pe(([P, Z, ne, le, , ie]) => P && !Z && ne.height !== 0 && le.height !== 0 && !ie)
5913
+ Je(g, z, k, A, _, q),
5914
+ pe(([P, J, ne, le, , ie]) => P && !J && ne.height !== 0 && le.height !== 0 && !ie)
5915
5915
  ),
5916
5916
  ([, , , , P]) => {
5917
5917
  ye(q, !0), Wi(1, () => {
@@ -5934,7 +5934,7 @@ const xx = /* @__PURE__ */ je(
5934
5934
  pe(([, P]) => P != null)
5935
5935
  ),
5936
5936
  ([, P]) => {
5937
- P && (ye(A, P.viewport), ye(k, P.item), ye($, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (Z) => {
5937
+ P && (ye(A, P.viewport), ye(k, P.item), ye($, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (J) => {
5938
5938
  ye(O, !1);
5939
5939
  }), ye(c, { top: P.scrollTop })));
5940
5940
  }
@@ -5946,15 +5946,15 @@ const xx = /* @__PURE__ */ je(
5946
5946
  h
5947
5947
  ), ue(
5948
5948
  B(
5949
- Ze(
5949
+ Je(
5950
5950
  he(A, Kr),
5951
5951
  he(k, Kr),
5952
- he($, (P, Z) => P && P.column === Z.column && P.row === Z.row),
5952
+ he($, (P, J) => P && P.column === J.column && P.row === J.row),
5953
5953
  he(u)
5954
5954
  ),
5955
- re(([P, Z, ne, le]) => ({
5955
+ re(([P, J, ne, le]) => ({
5956
5956
  gap: ne,
5957
- item: Z,
5957
+ item: J,
5958
5958
  scrollTop: le,
5959
5959
  viewport: P
5960
5960
  }))
@@ -5962,7 +5962,7 @@ const xx = /* @__PURE__ */ je(
5962
5962
  L
5963
5963
  ), ue(
5964
5964
  B(
5965
- Ze(
5965
+ Je(
5966
5966
  he(C),
5967
5967
  r,
5968
5968
  he($, vx),
@@ -5978,7 +5978,7 @@ const xx = /* @__PURE__ */ je(
5978
5978
  re(
5979
5979
  ([
5980
5980
  P,
5981
- [Z, ne],
5981
+ [J, ne],
5982
5982
  le,
5983
5983
  ie,
5984
5984
  Pe,
@@ -5997,7 +5997,7 @@ const xx = /* @__PURE__ */ je(
5997
5997
  }
5998
5998
  const ut = Cu(nt, Be, ve);
5999
5999
  let rt, Qe;
6000
- ce ? Z === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((Z + H) / (ae + H)), Qe = ut * Nl((ne + H) / (ae + H)) - 1, Qe = Ms(P - 1, vr(Qe, ut - 1)), rt = Ms(Qe, vr(0, rt))) : (rt = 0, Qe = -1);
6000
+ ce ? J === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((J + H) / (ae + H)), Qe = ut * Nl((ne + H) / (ae + H)) - 1, Qe = Ms(P - 1, vr(Qe, ut - 1)), rt = Ms(Qe, vr(0, rt))) : (rt = 0, Qe = -1);
6001
6001
  const Tt = Al(rt, Qe, Fe), { bottom: We, top: st } = kl(Pe, le, ie, Tt), Ge = Nl(P / ut), it = Ge * ae + (Ge - 1) * H - We;
6002
6002
  return { bottom: We, itemHeight: ae, items: Tt, itemWidth: Be, offsetBottom: it, offsetTop: st, top: st };
6003
6003
  }
@@ -6013,10 +6013,10 @@ const xx = /* @__PURE__ */ je(
6013
6013
  C
6014
6014
  ), ue(
6015
6015
  B(
6016
- Ze(A, k, I, $),
6017
- pe(([P, Z, { items: ne }]) => ne.length > 0 && Z.height !== 0 && P.height !== 0),
6018
- re(([P, Z, { items: ne }, le]) => {
6019
- const { bottom: ie, top: Pe } = kl(P, le, Z, ne);
6016
+ Je(A, k, I, $),
6017
+ pe(([P, J, { items: ne }]) => ne.length > 0 && J.height !== 0 && P.height !== 0),
6018
+ re(([P, J, { items: ne }, le]) => {
6019
+ const { bottom: ie, top: Pe } = kl(P, le, J, ne);
6020
6020
  return [Pe, ie];
6021
6021
  }),
6022
6022
  He(Cr)
@@ -6028,18 +6028,18 @@ const xx = /* @__PURE__ */ je(
6028
6028
  B(
6029
6029
  u,
6030
6030
  Se(F),
6031
- re(([P, Z]) => Z || P !== 0)
6031
+ re(([P, J]) => J || P !== 0)
6032
6032
  ),
6033
6033
  F
6034
6034
  );
6035
6035
  const Q = St(
6036
6036
  B(
6037
- Ze(I, C),
6037
+ Je(I, C),
6038
6038
  pe(([{ items: P }]) => P.length > 0),
6039
6039
  Se(F),
6040
- pe(([[P, Z], ne]) => {
6041
- const le = P.items[P.items.length - 1].index === Z - 1;
6042
- return (ne || P.bottom > 0 && P.itemHeight > 0 && P.offsetBottom === 0 && P.items.length === Z) && le;
6040
+ pe(([[P, J], ne]) => {
6041
+ const le = P.items[P.items.length - 1].index === J - 1;
6042
+ return (ne || P.bottom > 0 && P.itemHeight > 0 && P.offsetBottom === 0 && P.items.length === J) && le;
6043
6043
  }),
6044
6044
  re(([[, P]]) => P - 1),
6045
6045
  He()
@@ -6055,7 +6055,7 @@ const xx = /* @__PURE__ */ je(
6055
6055
  B(
6056
6056
  he(I),
6057
6057
  Se(O),
6058
- pe(([{ items: P }, Z]) => P.length > 0 && !Z),
6058
+ pe(([{ items: P }, J]) => P.length > 0 && !J),
6059
6059
  re(([{ items: P }]) => ({
6060
6060
  endIndex: P[P.length - 1].index,
6061
6061
  startIndex: P[0].index
@@ -6068,12 +6068,12 @@ const xx = /* @__PURE__ */ je(
6068
6068
  B(
6069
6069
  M,
6070
6070
  Se(A, k, C, $),
6071
- re(([P, Z, ne, le, ie]) => {
6071
+ re(([P, J, ne, le, ie]) => {
6072
6072
  const Pe = iu(P), { align: Fe, behavior: Le, offset: ce } = Pe;
6073
6073
  let Ae = Pe.index;
6074
6074
  Ae === "LAST" && (Ae = le - 1), Ae = vr(0, Ae, Ms(le - 1, Ae));
6075
- let ve = di(Z, ie, ne, Ae);
6076
- return Fe === "end" ? ve = jl(ve - Z.height + ne.height) : Fe === "center" && (ve = jl(ve - Z.height / 2 + ne.height / 2)), ce && (ve += ce), { behavior: Le, top: ve };
6075
+ let ve = di(J, ie, ne, Ae);
6076
+ return Fe === "end" ? ve = jl(ve - J.height + ne.height) : Fe === "center" && (ve = jl(ve - J.height / 2 + ne.height / 2)), ce && (ve += ce), { behavior: Le, top: ve };
6077
6077
  })
6078
6078
  ),
6079
6079
  c
@@ -6625,7 +6625,7 @@ function _l(e, t) {
6625
6625
  return e(t);
6626
6626
  e != null && (e.current = t);
6627
6627
  }
6628
- function Ji(...e) {
6628
+ function Zi(...e) {
6629
6629
  return (t) => {
6630
6630
  let n = !1;
6631
6631
  const r = e.map((o) => {
@@ -6642,7 +6642,7 @@ function Ji(...e) {
6642
6642
  };
6643
6643
  }
6644
6644
  function Te(...e) {
6645
- return f.useCallback(Ji(...e), e);
6645
+ return f.useCallback(Zi(...e), e);
6646
6646
  }
6647
6647
  var Fx = [
6648
6648
  "a",
@@ -6745,7 +6745,7 @@ function Ft(e) {
6745
6745
  n((r) => r ?? String(Ux++));
6746
6746
  }, [e]), e || (t ? `radix-${t}` : "");
6747
6747
  }
6748
- var qo = "Collapsible", [Wx, eE] = Ut(qo), [Vx, Zi] = Wx(qo), Nu = f.forwardRef(
6748
+ var qo = "Collapsible", [Wx, eE] = Ut(qo), [Vx, Ji] = Wx(qo), Nu = f.forwardRef(
6749
6749
  (e, t) => {
6750
6750
  const {
6751
6751
  __scopeCollapsible: n,
@@ -6784,7 +6784,7 @@ var qo = "Collapsible", [Wx, eE] = Ut(qo), [Vx, Zi] = Wx(qo), Nu = f.forwardRef(
6784
6784
  Nu.displayName = qo;
6785
6785
  var ju = "CollapsibleTrigger", Au = f.forwardRef(
6786
6786
  (e, t) => {
6787
- const { __scopeCollapsible: n, ...r } = e, o = Zi(ju, n);
6787
+ const { __scopeCollapsible: n, ...r } = e, o = Ji(ju, n);
6788
6788
  return /* @__PURE__ */ l.jsx(
6789
6789
  me.button,
6790
6790
  {
@@ -6804,13 +6804,13 @@ var ju = "CollapsibleTrigger", Au = f.forwardRef(
6804
6804
  Au.displayName = ju;
6805
6805
  var Qi = "CollapsibleContent", Gx = f.forwardRef(
6806
6806
  (e, t) => {
6807
- const { forceMount: n, ...r } = e, o = Zi(Qi, e.__scopeCollapsible);
6807
+ const { forceMount: n, ...r } = e, o = Ji(Qi, e.__scopeCollapsible);
6808
6808
  return /* @__PURE__ */ l.jsx(vt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(Kx, { ...r, ref: t, present: s }) });
6809
6809
  }
6810
6810
  );
6811
6811
  Gx.displayName = Qi;
6812
6812
  var Kx = f.forwardRef((e, t) => {
6813
- const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = Zi(Qi, n), [a, c] = f.useState(r), u = f.useRef(null), d = Te(t, u), h = f.useRef(0), p = h.current, x = f.useRef(0), g = x.current, v = i.open || a, m = f.useRef(v), b = f.useRef(void 0);
6813
+ const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = Ji(Qi, n), [a, c] = f.useState(r), u = f.useRef(null), d = Te(t, u), h = f.useRef(0), p = h.current, x = f.useRef(0), g = x.current, v = i.open || a, m = f.useRef(v), b = f.useRef(void 0);
6814
6814
  return f.useEffect(() => {
6815
6815
  const w = requestAnimationFrame(() => m.current = !1);
6816
6816
  return () => cancelAnimationFrame(w);
@@ -6846,7 +6846,7 @@ function ea(e) {
6846
6846
  return e ? "open" : "closed";
6847
6847
  }
6848
6848
  var Yx = Nu;
6849
- const Ol = Yx, Ml = Au, ku = new URL("data:video/mp2t;base64,aW1wb3J0IHsgcGFyc2UgfSBmcm9tICdtYXJrZWQnOwoKY29uc29sZS5sb2coJ1tNYXJrZG93bldvcmtlcl0gd29ya2VyIHNjcmlwdCBsb2FkZWQnKTsKLy8gU2lnbmFsIHRvIHRoZSBtYWluIHRocmVhZCB0aGF0IHRoZSB3b3JrZXIgaXMgcmVhZHkgdG8gcmVjZWl2ZSB3b3JrLgovLyBUaGlzIGhlbHBzIGNhbGxlcnMgYXZvaWQgcG9zdGluZyBtZXNzYWdlcyBiZWZvcmUgdGhlIHdvcmtlciBoYXMgZmluaXNoZWQgaW5pdGlhbGl6aW5nLgo7KHNlbGYgYXMgYW55KS5wb3N0TWVzc2FnZT8uKHsgX193b3JrZXJfcmVhZHk6IHRydWUgfSk7CgpzZWxmLmFkZEV2ZW50TGlzdGVuZXIoJ21lc3NhZ2UnLCAoZXY6IE1lc3NhZ2VFdmVudCkgPT4gewogIGNvbnN0IHsgaWQsIHNvdXJjZSB9ID0gZXYuZGF0YSBhcyB7IGlkOiBzdHJpbmc7IHNvdXJjZTogc3RyaW5nIH07CiAgdHJ5IHsKICAgIGNvbnNvbGUubG9nKCdbTWFya2Rvd25Xb3JrZXJdIHJlY2VpdmVkIHdvcmsnLCBpZCwgJ3NvdXJjZUxlbicsIHNvdXJjZT8ubGVuZ3RoID8/IDApOwogICAgY29uc3QgaHRtbCA9IHBhcnNlKHNvdXJjZSk7CiAgICBjb25zb2xlLmxvZygnW01hcmtkb3duV29ya2VyXSBwYXJzZWQgaHRtbCBsZW5ndGgnLCBodG1sPy5sZW5ndGggPz8gMCwgJ2ZvcicsIGlkKTsKICAgIC8vIFJldHVybiB0aGUgZ2VuZXJhdGVkIEhUTUwgZm9yIHRoZSBjYWxsZXIgdG8gY2FjaGUgYW5kIHJlbmRlcgogICAgLy8gS2VlcCB0aGUgcGF5bG9hZCBzbWFsbDogc2VuZCBpZCArIGh0bWwKICAgIC8vIE1hcmtlZCBvdXRwdXQgc2hvdWxkIGJlIHNhZmUtZW5vdWdoIGZvciBpbnRlcm5hbCBVSXM7IGNhbGxlcnMgbWF5IGZ1cnRoZXIgc2FuaXRpemUgaWYgcmVxdWlyZWQuCiAgICAoc2VsZiBhcyBhbnkpLnBvc3RNZXNzYWdlKHsgaWQsIGh0bWwgfSk7CiAgfSBjYXRjaCAoZXJyKSB7CiAgICBjb25zb2xlLmVycm9yKCdbTWFya2Rvd25Xb3JrZXJdIHJlbmRlciBlcnJvcicsIGVycik7CiAgICAoc2VsZiBhcyBhbnkpLnBvc3RNZXNzYWdlKHsgaWQsIGh0bWw6IGA8cHJlPkVycm9yIHJlbmRlcmluZyBtYXJrZG93bjogJHtTdHJpbmcoZXJyKX08L3ByZT5gIH0pOwogIH0KfSk7Cg==", import.meta.url), lo = ku.toString();
6849
+ const Ol = Yx, Ml = Au, ku = new URL("data:video/mp2t;base64,aW1wb3J0IHsgcGFyc2UgfSBmcm9tICdtYXJrZWQnOwoKY29uc3Qgc2NvcGUgPSBzZWxmOwoKY29uc29sZS5sb2coJ1tNYXJrZG93bldvcmtlcl0gd29ya2VyIHNjcmlwdCBsb2FkZWQnKTsKLy8gU2lnbmFsIHRvIHRoZSBtYWluIHRocmVhZCB0aGF0IHRoZSB3b3JrZXIgaXMgcmVhZHkgdG8gcmVjZWl2ZSB3b3JrLgovLyBUaGlzIGhlbHBzIGNhbGxlcnMgYXZvaWQgcG9zdGluZyBtZXNzYWdlcyBiZWZvcmUgdGhlIHdvcmtlciBoYXMgZmluaXNoZWQgaW5pdGlhbGl6aW5nLgpzY29wZS5wb3N0TWVzc2FnZT8uKHsgX193b3JrZXJfcmVhZHk6IHRydWUgfSk7CgpzY29wZS5hZGRFdmVudExpc3RlbmVyKCdtZXNzYWdlJywgKGV2ZW50OiBNZXNzYWdlRXZlbnQpID0+IHsKICBjb25zdCBwYXlsb2FkOiBhbnkgPSBldmVudD8uZGF0YSA/PyB7fTsKICBjb25zdCBpZCA9IHR5cGVvZiBwYXlsb2FkLmlkID09PSAnc3RyaW5nJyA/IHBheWxvYWQuaWQgOiB1bmRlZmluZWQ7CiAgY29uc3Qgc291cmNlID0gdHlwZW9mIHBheWxvYWQuc291cmNlID09PSAnc3RyaW5nJyA/IHBheWxvYWQuc291cmNlIDogdW5kZWZpbmVkOwogIGlmICghaWQgfHwgdHlwZW9mIHNvdXJjZSAhPT0gJ3N0cmluZycpIHsKICAgIHJldHVybjsKICB9CiAgdHJ5IHsKICAgIGNvbnNvbGUubG9nKCdbTWFya2Rvd25Xb3JrZXJdIHJlY2VpdmVkIHdvcmsnLCBpZCwgJ3NvdXJjZUxlbicsIHNvdXJjZT8ubGVuZ3RoID8/IDApOwogICAgY29uc3QgaHRtbCA9IHBhcnNlKHNvdXJjZSk7CiAgICBjb25zb2xlLmxvZygnW01hcmtkb3duV29ya2VyXSBwYXJzZWQgaHRtbCBsZW5ndGgnLCBodG1sPy5sZW5ndGggPz8gMCwgJ2ZvcicsIGlkKTsKICAgIC8vIFJldHVybiB0aGUgZ2VuZXJhdGVkIEhUTUwgZm9yIHRoZSBjYWxsZXIgdG8gY2FjaGUgYW5kIHJlbmRlcgogICAgLy8gS2VlcCB0aGUgcGF5bG9hZCBzbWFsbDogc2VuZCBpZCArIGh0bWwKICAgIC8vIE1hcmtlZCBvdXRwdXQgc2hvdWxkIGJlIHNhZmUtZW5vdWdoIGZvciBpbnRlcm5hbCBVSXM7IGNhbGxlcnMgbWF5IGZ1cnRoZXIgc2FuaXRpemUgaWYgcmVxdWlyZWQuCiAgICBzY29wZS5wb3N0TWVzc2FnZSh7IGlkLCBodG1sIH0pOwogIH0gY2F0Y2ggKGVycikgewogICAgY29uc29sZS5lcnJvcignW01hcmtkb3duV29ya2VyXSByZW5kZXIgZXJyb3InLCBlcnIpOwogICAgc2NvcGUucG9zdE1lc3NhZ2UoeyBpZCwgaHRtbDogYDxwcmU+RXJyb3IgcmVuZGVyaW5nIG1hcmtkb3duOiAke1N0cmluZyhlcnIpfTwvcHJlPmAgfSk7CiAgfQp9KTsK", import.meta.url), lo = ku.toString();
6850
6850
  console.log("[MarkdownContent] worker url", lo);
6851
6851
  const fi = [];
6852
6852
  let hi = !1;
@@ -6950,12 +6950,12 @@ async function qx(e) {
6950
6950
  }
6951
6951
  })();
6952
6952
  const fr = /* @__PURE__ */ new Map();
6953
- function Jx(e) {
6953
+ function Zx(e) {
6954
6954
  const t = e.slice(0, 64), n = e.length > 64 ? e.slice(-64) : "";
6955
6955
  return `${e.length}:${t}:${n}`;
6956
6956
  }
6957
6957
  function Xr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx("div", { "aria-busy": !0, children: "Rendering…" }) }) {
6958
- const r = Jx(e), [o, s] = fe(() => fr.get(r) ?? null);
6958
+ const r = Zx(e), [o, s] = fe(() => fr.get(r) ?? null);
6959
6959
  Ve(() => {
6960
6960
  if (fr.has(r)) {
6961
6961
  const g = fr.get(r) ?? null;
@@ -7048,7 +7048,7 @@ async function _u(e, t) {
7048
7048
  async function Ll(e, t) {
7049
7049
  return await (await _u(`/chat/files/${e}/view`, t)).text();
7050
7050
  }
7051
- async function Zx(e, t) {
7051
+ async function Jx(e, t) {
7052
7052
  const n = await _u(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
7053
7053
  let o = `file_${e}`;
7054
7054
  try {
@@ -7284,7 +7284,7 @@ function Mu(e, t, n, { discrete: r }) {
7284
7284
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
7285
7285
  t && o.addEventListener(e, t, { once: !0 }), r ? Iu(o, s) : o.dispatchEvent(s);
7286
7286
  }
7287
- var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l = { bubbles: !1, cancelable: !0 }, fb = "FocusScope", Jo = f.forwardRef((e, t) => {
7287
+ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l = { bubbles: !1, cancelable: !0 }, fb = "FocusScope", Zo = f.forwardRef((e, t) => {
7288
7288
  const {
7289
7289
  loop: n = !1,
7290
7290
  trapped: r = !1,
@@ -7350,7 +7350,7 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l
7350
7350
  );
7351
7351
  return /* @__PURE__ */ l.jsx(me.div, { tabIndex: -1, ...i, ref: p, onKeyDown: g });
7352
7352
  });
7353
- Jo.displayName = fb;
7353
+ Zo.displayName = fb;
7354
7354
  function hb(e, { select: t = !1 } = {}) {
7355
7355
  const n = document.activeElement;
7356
7356
  for (const r of e)
@@ -7413,14 +7413,14 @@ function Wl(e, t) {
7413
7413
  function xb(e) {
7414
7414
  return e.filter((t) => t.tagName !== "A");
7415
7415
  }
7416
- var bb = "Portal", Zo = f.forwardRef((e, t) => {
7416
+ var bb = "Portal", Jo = f.forwardRef((e, t) => {
7417
7417
  var a;
7418
7418
  const { container: n, ...r } = e, [o, s] = f.useState(!1);
7419
7419
  tt(() => s(!0), []);
7420
7420
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
7421
7421
  return i ? xc.createPortal(/* @__PURE__ */ l.jsx(me.div, { ...r, ref: t }), i) : null;
7422
7422
  });
7423
- Zo.displayName = bb;
7423
+ Jo.displayName = bb;
7424
7424
  var Hs = 0;
7425
7425
  function na() {
7426
7426
  f.useEffect(() => {
@@ -7800,7 +7800,7 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7800
7800
  c && (t.contains(a) || t === a)
7801
7801
  );
7802
7802
  return (d && Math.abs(h) < 1 || !d && Math.abs(p) < 1) && (u = !0), u;
7803
- }, Jr = function(e) {
7803
+ }, Zr = function(e) {
7804
7804
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
7805
7805
  }, Xl = function(e) {
7806
7806
  return [e.deltaX, e.deltaY];
@@ -7808,14 +7808,14 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7808
7808
  return e && "current" in e ? e.current : e;
7809
7809
  }, qb = function(e, t) {
7810
7810
  return e[0] === t[0] && e[1] === t[1];
7811
- }, Jb = function(e) {
7811
+ }, Zb = function(e) {
7812
7812
  return `
7813
7813
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
7814
7814
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
7815
7815
  `);
7816
- }, Zb = 0, Hn = [];
7816
+ }, Jb = 0, Hn = [];
7817
7817
  function Qb(e) {
7818
- var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Zb++)[0], s = f.useState(Hu)[0], i = f.useRef(e);
7818
+ var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Jb++)[0], s = f.useState(Hu)[0], i = f.useRef(e);
7819
7819
  f.useEffect(function() {
7820
7820
  i.current = e;
7821
7821
  }, [e]), f.useEffect(function() {
@@ -7834,7 +7834,7 @@ function Qb(e) {
7834
7834
  var a = f.useCallback(function(v, m) {
7835
7835
  if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
7836
7836
  return !i.current.allowPinchZoom;
7837
- var b = Jr(v), w = n.current, y = "deltaX" in v ? v.deltaX : w[0] - b[0], R = "deltaY" in v ? v.deltaY : w[1] - b[1], S, C = v.target, E = Math.abs(y) > Math.abs(R) ? "h" : "v";
7837
+ var b = Zr(v), w = n.current, y = "deltaX" in v ? v.deltaX : w[0] - b[0], R = "deltaY" in v ? v.deltaY : w[1] - b[1], S, C = v.target, E = Math.abs(y) > Math.abs(R) ? "h" : "v";
7838
7838
  if ("touches" in v && E === "h" && C.type === "range")
7839
7839
  return !1;
7840
7840
  var I = Yl(E, C);
@@ -7849,7 +7849,7 @@ function Qb(e) {
7849
7849
  }, []), c = f.useCallback(function(v) {
7850
7850
  var m = v;
7851
7851
  if (!(!Hn.length || Hn[Hn.length - 1] !== s)) {
7852
- var b = "deltaY" in m ? Xl(m) : Jr(m), w = t.current.filter(function(S) {
7852
+ var b = "deltaY" in m ? Xl(m) : Zr(m), w = t.current.filter(function(S) {
7853
7853
  return S.name === m.type && (S.target === m.target || m.target === S.shadowParent) && qb(S.delta, b);
7854
7854
  })[0];
7855
7855
  if (w && w.should) {
@@ -7871,11 +7871,11 @@ function Qb(e) {
7871
7871
  });
7872
7872
  }, 1);
7873
7873
  }, []), d = f.useCallback(function(v) {
7874
- n.current = Jr(v), r.current = void 0;
7874
+ n.current = Zr(v), r.current = void 0;
7875
7875
  }, []), h = f.useCallback(function(v) {
7876
7876
  u(v.type, Xl(v), v.target, a(v, e.lockRef.current));
7877
7877
  }, []), p = f.useCallback(function(v) {
7878
- u(v.type, Jr(v), v.target, a(v, e.lockRef.current));
7878
+ u(v.type, Zr(v), v.target, a(v, e.lockRef.current));
7879
7879
  }, []);
7880
7880
  f.useEffect(function() {
7881
7881
  return Hn.push(s), e.setCallbacks({
@@ -7892,7 +7892,7 @@ function Qb(e) {
7892
7892
  return f.createElement(
7893
7893
  f.Fragment,
7894
7894
  null,
7895
- g ? f.createElement(s, { styles: Jb(o) }) : null,
7895
+ g ? f.createElement(s, { styles: Zb(o) }) : null,
7896
7896
  x ? f.createElement(zb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
7897
7897
  );
7898
7898
  }
@@ -7911,7 +7911,7 @@ var nw = function(e) {
7911
7911
  return null;
7912
7912
  var t = Array.isArray(e) ? e[0] : e;
7913
7913
  return t.ownerDocument.body;
7914
- }, $n = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = {}, Ws = 0, Wu = function(e) {
7914
+ }, $n = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Qr = {}, Ws = 0, Wu = function(e) {
7915
7915
  return e && (e.host || Wu(e.parentNode));
7916
7916
  }, rw = function(e, t) {
7917
7917
  return t.map(function(n) {
@@ -7936,7 +7936,7 @@ var nw = function(e) {
7936
7936
  else
7937
7937
  try {
7938
7938
  var x = p.getAttribute(r), g = x !== null && x !== "false", v = ($n.get(p) || 0) + 1, m = (s.get(p) || 0) + 1;
7939
- $n.set(p, v), s.set(p, m), i.push(p), v === 1 && g && Zr.set(p, !0), m === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
7939
+ $n.set(p, v), s.set(p, m), i.push(p), v === 1 && g && Jr.set(p, !0), m === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
7940
7940
  } catch (b) {
7941
7941
  console.error("aria-hidden: cannot operate on ", p, b);
7942
7942
  }
@@ -7945,8 +7945,8 @@ var nw = function(e) {
7945
7945
  return d(t), a.clear(), Ws++, function() {
7946
7946
  i.forEach(function(h) {
7947
7947
  var p = $n.get(h) - 1, x = s.get(h) - 1;
7948
- $n.set(h, p), s.set(h, x), p || (Zr.has(h) || h.removeAttribute(r), Zr.delete(h)), x || h.removeAttribute(n);
7949
- }), Ws--, Ws || ($n = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = {});
7948
+ $n.set(h, p), s.set(h, x), p || (Jr.has(h) || h.removeAttribute(r), Jr.delete(h)), x || h.removeAttribute(n);
7949
+ }), Ws--, Ws || ($n = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Qr = {});
7950
7950
  };
7951
7951
  }, ra = function(e, t, n) {
7952
7952
  n === void 0 && (n = "data-aria-hidden");
@@ -8009,16 +8009,16 @@ var oa = "DialogPortal", [iw, Xu] = Vu(oa, {
8009
8009
  forceMount: void 0
8010
8010
  }), qu = (e) => {
8011
8011
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Wt(oa, t);
8012
- return /* @__PURE__ */ l.jsx(iw, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: i }) })) });
8012
+ return /* @__PURE__ */ l.jsx(iw, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Jo, { asChild: !0, container: o, children: i }) })) });
8013
8013
  };
8014
8014
  qu.displayName = oa;
8015
- var No = "DialogOverlay", Ju = f.forwardRef(
8015
+ var No = "DialogOverlay", Zu = f.forwardRef(
8016
8016
  (e, t) => {
8017
8017
  const n = Xu(No, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(No, e.__scopeDialog);
8018
8018
  return s.modal ? /* @__PURE__ */ l.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(lw, { ...o, ref: t }) }) : null;
8019
8019
  }
8020
8020
  );
8021
- Ju.displayName = No;
8021
+ Zu.displayName = No;
8022
8022
  var aw = Yn("DialogOverlay.RemoveScroll"), lw = f.forwardRef(
8023
8023
  (e, t) => {
8024
8024
  const { __scopeDialog: n, ...r } = e, o = Wt(No, n);
@@ -8036,13 +8036,13 @@ var aw = Yn("DialogOverlay.RemoveScroll"), lw = f.forwardRef(
8036
8036
  ) })
8037
8037
  );
8038
8038
  }
8039
- ), Nn = "DialogContent", Zu = f.forwardRef(
8039
+ ), Nn = "DialogContent", Ju = f.forwardRef(
8040
8040
  (e, t) => {
8041
8041
  const n = Xu(Nn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(Nn, e.__scopeDialog);
8042
8042
  return /* @__PURE__ */ l.jsx(vt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(cw, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(uw, { ...o, ref: t }) });
8043
8043
  }
8044
8044
  );
8045
- Zu.displayName = Nn;
8045
+ Ju.displayName = Nn;
8046
8046
  var cw = f.forwardRef(
8047
8047
  (e, t) => {
8048
8048
  const n = Wt(Nn, e.__scopeDialog), r = f.useRef(null), o = Te(t, n.contentRef, r);
@@ -8099,7 +8099,7 @@ var cw = f.forwardRef(
8099
8099
  const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Wt(Nn, n), c = f.useRef(null), u = Te(t, c);
8100
8100
  return na(), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8101
8101
  /* @__PURE__ */ l.jsx(
8102
- Jo,
8102
+ Zo,
8103
8103
  {
8104
8104
  asChild: !0,
8105
8105
  loop: !0,
@@ -8179,7 +8179,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
8179
8179
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
8180
8180
  t && o && (document.getElementById(t) || console.warn(r));
8181
8181
  }, [r, e, t]), null;
8182
- }, ad = Gu, pw = Yu, ld = qu, ns = Ju, rs = Zu, Tn = ed, os = nd, cd = od;
8182
+ }, ad = Gu, pw = Yu, ld = qu, ns = Zu, rs = Ju, Tn = ed, os = nd, cd = od;
8183
8183
  const mw = ad, gw = ld, ud = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
8184
8184
  ns,
8185
8185
  {
@@ -8287,7 +8287,7 @@ function xw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8287
8287
  }, x = async () => {
8288
8288
  if (n)
8289
8289
  try {
8290
- await Zx(n), h({ title: "Download started", description: `Downloading ${r}` });
8290
+ await Jx(n), h({ title: "Download started", description: `Downloading ${r}` });
8291
8291
  } catch (b) {
8292
8292
  console.error("Failed to download file:", b), h({ title: "Download failed", description: String(b), variant: "destructive" });
8293
8293
  }
@@ -8450,7 +8450,7 @@ const ww = K.memo(function({
8450
8450
  if (!v) return;
8451
8451
  const ce = z ? zn(t.content) : oe;
8452
8452
  v(t.id, ce);
8453
- }, Z = () => m == null ? void 0 : m(n), ne = () => {
8453
+ }, J = () => m == null ? void 0 : m(n), ne = () => {
8454
8454
  const Ae = D(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", q);
8455
8455
  switch (_) {
8456
8456
  case "user":
@@ -8557,12 +8557,12 @@ const ww = K.memo(function({
8557
8557
  r ? /* @__PURE__ */ l.jsxs("div", { className: "relative", children: [
8558
8558
  (() => {
8559
8559
  const ve = Vs(be);
8560
- return ve !== null ? /* @__PURE__ */ l.jsx(Jl, { data: ve }) : /* @__PURE__ */ l.jsx(Xr, { content: Tw(Cw(be)) });
8560
+ return ve !== null ? /* @__PURE__ */ l.jsx(Zl, { data: ve }) : /* @__PURE__ */ l.jsx(Xr, { content: Tw(Cw(be)) });
8561
8561
  })(),
8562
8562
  /* @__PURE__ */ l.jsx(bw, { className: D(q, O ? "text-xs" : "text-sm") })
8563
8563
  ] }) : (() => {
8564
8564
  const ve = Vs(oe.trim());
8565
- if (ve !== null) return /* @__PURE__ */ l.jsx(Jl, { data: ve });
8565
+ if (ve !== null) return /* @__PURE__ */ l.jsx(Zl, { data: ve });
8566
8566
  if (_ === "user" && p) {
8567
8567
  const H = oe.trim();
8568
8568
  if (H.length > x)
@@ -8692,7 +8692,7 @@ const ww = K.memo(function({
8692
8692
  {
8693
8693
  variant: "ghost",
8694
8694
  size: "sm",
8695
- onClick: Z,
8695
+ onClick: J,
8696
8696
  className: D("h-6 w-6 p-0 hover:bg-foreground/10", q, O && "h-5 w-5"),
8697
8697
  children: /* @__PURE__ */ l.jsx(qs, { className: D(q, O ? "h-3 w-3" : "h-4 w-4") })
8698
8698
  }
@@ -8749,7 +8749,7 @@ const ww = K.memo(function({
8749
8749
  {
8750
8750
  variant: "ghost",
8751
8751
  size: "sm",
8752
- onClick: Z,
8752
+ onClick: J,
8753
8753
  className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8754
8754
  children: /* @__PURE__ */ l.jsx(qs, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
8755
8755
  }
@@ -8807,7 +8807,7 @@ function Vs(e) {
8807
8807
  return null;
8808
8808
  }
8809
8809
  }
8810
- function Jl({ data: e }) {
8810
+ function Zl({ data: e }) {
8811
8811
  if (Array.isArray(e))
8812
8812
  return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ l.jsx("div", { className: po, children: /* @__PURE__ */ l.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ l.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ l.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: br(e) });
8813
8813
  if (e && typeof e == "object") {
@@ -9133,12 +9133,12 @@ function $w(e) {
9133
9133
  function xi(e) {
9134
9134
  return e.replace(/start|end/g, (t) => Fw[t]);
9135
9135
  }
9136
- const Zl = ["left", "right"], Ql = ["right", "left"], zw = ["top", "bottom"], Uw = ["bottom", "top"];
9136
+ const Jl = ["left", "right"], Ql = ["right", "left"], zw = ["top", "bottom"], Uw = ["bottom", "top"];
9137
9137
  function Ww(e, t, n) {
9138
9138
  switch (e) {
9139
9139
  case "top":
9140
9140
  case "bottom":
9141
- return n ? t ? Ql : Zl : t ? Zl : Ql;
9141
+ return n ? t ? Ql : Jl : t ? Jl : Ql;
9142
9142
  case "left":
9143
9143
  case "right":
9144
9144
  return t ? zw : Uw;
@@ -9515,7 +9515,7 @@ const qw = function(e) {
9515
9515
  }
9516
9516
  };
9517
9517
  }, vd = /* @__PURE__ */ new Set(["left", "top"]);
9518
- async function Jw(e, t) {
9518
+ async function Zw(e, t) {
9519
9519
  const {
9520
9520
  placement: n,
9521
9521
  platform: r,
@@ -9542,7 +9542,7 @@ async function Jw(e, t) {
9542
9542
  y: x * d
9543
9543
  };
9544
9544
  }
9545
- const Zw = function(e) {
9545
+ const Jw = function(e) {
9546
9546
  return e === void 0 && (e = 0), {
9547
9547
  name: "offset",
9548
9548
  options: e,
@@ -9553,7 +9553,7 @@ const Zw = function(e) {
9553
9553
  y: s,
9554
9554
  placement: i,
9555
9555
  middlewareData: a
9556
- } = t, c = await Jw(t, e);
9556
+ } = t, c = await Zw(t, e);
9557
9557
  return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
9558
9558
  x: o + c.x,
9559
9559
  y: s + c.y,
@@ -9723,7 +9723,7 @@ function xd(e) {
9723
9723
  function Ht(e) {
9724
9724
  return is() ? e instanceof Element || e instanceof Ct(e).Element : !1;
9725
9725
  }
9726
- function Jt(e) {
9726
+ function Zt(e) {
9727
9727
  return is() ? e instanceof HTMLElement || e instanceof Ct(e).HTMLElement : !1;
9728
9728
  }
9729
9729
  function rc(e) {
@@ -9760,7 +9760,7 @@ function da(e) {
9760
9760
  }
9761
9761
  function cy(e) {
9762
9762
  let t = fn(e);
9763
- for (; Jt(t) && !qn(t); ) {
9763
+ for (; Zt(t) && !qn(t); ) {
9764
9764
  if (da(t))
9765
9765
  return t;
9766
9766
  if (as(t))
@@ -9802,7 +9802,7 @@ function fn(e) {
9802
9802
  }
9803
9803
  function bd(e) {
9804
9804
  const t = fn(e);
9805
- return qn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jt(t) && $r(t) ? t : bd(t);
9805
+ return qn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Zt(t) && $r(t) ? t : bd(t);
9806
9806
  }
9807
9807
  function Ir(e, t, n) {
9808
9808
  var r;
@@ -9820,7 +9820,7 @@ function bi(e) {
9820
9820
  function wd(e) {
9821
9821
  const t = $t(e);
9822
9822
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
9823
- const o = Jt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
9823
+ const o = Zt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
9824
9824
  return a && (n = s, r = i), {
9825
9825
  width: n,
9826
9826
  height: r,
@@ -9832,7 +9832,7 @@ function ha(e) {
9832
9832
  }
9833
9833
  function Kn(e) {
9834
9834
  const t = ha(e);
9835
- if (!Jt(t))
9835
+ if (!Zt(t))
9836
9836
  return qt(1);
9837
9837
  const n = t.getBoundingClientRect(), {
9838
9838
  width: r,
@@ -9903,8 +9903,8 @@ function hy(e) {
9903
9903
  scrollLeft: 0,
9904
9904
  scrollTop: 0
9905
9905
  }, u = qt(1);
9906
- const d = qt(0), h = Jt(r);
9907
- if ((h || !h && !s) && ((sr(r) !== "body" || $r(i)) && (c = ls(r)), Jt(r))) {
9906
+ const d = qt(0), h = Zt(r);
9907
+ if ((h || !h && !s) && ((sr(r) !== "body" || $r(i)) && (c = ls(r)), Zt(r))) {
9908
9908
  const x = jn(r);
9909
9909
  u = Kn(r), d.x = x.x + r.clientLeft, d.y = x.y + r.clientTop;
9910
9910
  }
@@ -9953,7 +9953,7 @@ function gy(e, t) {
9953
9953
  }
9954
9954
  const vy = /* @__PURE__ */ new Set(["absolute", "fixed"]);
9955
9955
  function xy(e, t) {
9956
- const n = jn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Jt(e) ? Kn(e) : qt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
9956
+ const n = jn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Zt(e) ? Kn(e) : qt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
9957
9957
  return {
9958
9958
  width: i,
9959
9959
  height: a,
@@ -10026,7 +10026,7 @@ function yy(e) {
10026
10026
  };
10027
10027
  }
10028
10028
  function Sy(e, t, n) {
10029
- const r = Jt(t), o = Qt(t), s = n === "fixed", i = jn(e, !0, s, t);
10029
+ const r = Zt(t), o = Qt(t), s = n === "fixed", i = jn(e, !0, s, t);
10030
10030
  let a = {
10031
10031
  scrollLeft: 0,
10032
10032
  scrollTop: 0
@@ -10053,7 +10053,7 @@ function Gs(e) {
10053
10053
  return $t(e).position === "static";
10054
10054
  }
10055
10055
  function ic(e, t) {
10056
- if (!Jt(e) || $t(e).position === "fixed")
10056
+ if (!Zt(e) || $t(e).position === "fixed")
10057
10057
  return null;
10058
10058
  if (t)
10059
10059
  return t(e);
@@ -10064,7 +10064,7 @@ function Td(e, t) {
10064
10064
  const n = Ct(e);
10065
10065
  if (as(e))
10066
10066
  return n;
10067
- if (!Jt(e)) {
10067
+ if (!Zt(e)) {
10068
10068
  let o = fn(e);
10069
10069
  for (; o && !qn(o); ) {
10070
10070
  if (Ht(o) && !Gs(o))
@@ -10190,7 +10190,7 @@ function Iy(e, t, n, r) {
10190
10190
  }), h == null || h(), (b = x) == null || b.disconnect(), x = null, c && cancelAnimationFrame(g);
10191
10191
  };
10192
10192
  }
10193
- const Ny = Zw, jy = Qw, Ay = Xw, ky = ty, Py = qw, ac = Yw, _y = ey, Oy = (e, t, n) => {
10193
+ const Ny = Jw, jy = Qw, Ay = Xw, ky = ty, Py = qw, ac = Yw, _y = ey, Oy = (e, t, n) => {
10194
10194
  const r = /* @__PURE__ */ new Map(), o = {
10195
10195
  platform: Ey,
10196
10196
  ...n
@@ -10449,7 +10449,7 @@ var Pd = "PopperAnchor", _d = f.forwardRef(
10449
10449
  _d.displayName = Pd;
10450
10450
  var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10451
10451
  (e, t) => {
10452
- var Y, P, Z, ne, le, ie;
10452
+ var Y, P, J, ne, le, ie;
10453
10453
  const {
10454
10454
  __scopePopper: n,
10455
10455
  side: r = "bottom",
@@ -10467,7 +10467,7 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10467
10467
  ...v
10468
10468
  } = e, m = Ad(ma, n), [b, w] = f.useState(null), y = Te(t, (Pe) => w(Pe)), [R, S] = f.useState(null), C = Nd(R), E = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
10469
10469
  padding: k,
10470
- boundary: M.filter(Zy),
10470
+ boundary: M.filter(Jy),
10471
10471
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
10472
10472
  altBoundary: W
10473
10473
  }, { refs: N, floatingStyles: $, placement: L, isPositioned: X, middlewareData: O } = Ly({
@@ -10504,7 +10504,7 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10504
10504
  tt(() => {
10505
10505
  X && (q == null || q());
10506
10506
  }, [X, q]);
10507
- const oe = (Y = O.arrow) == null ? void 0 : Y.x, F = (P = O.arrow) == null ? void 0 : P.y, Q = ((Z = O.arrow) == null ? void 0 : Z.centerOffset) !== 0, [de, be] = f.useState();
10507
+ const oe = (Y = O.arrow) == null ? void 0 : Y.x, F = (P = O.arrow) == null ? void 0 : P.y, Q = ((J = O.arrow) == null ? void 0 : J.centerOffset) !== 0, [de, be] = f.useState();
10508
10508
  return tt(() => {
10509
10509
  b && be(window.getComputedStyle(b).zIndex);
10510
10510
  }, [b]), /* @__PURE__ */ l.jsx(
@@ -10562,13 +10562,13 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10562
10562
  }
10563
10563
  );
10564
10564
  Od.displayName = ma;
10565
- var Md = "PopperArrow", Jy = {
10565
+ var Md = "PopperArrow", Zy = {
10566
10566
  top: "bottom",
10567
10567
  right: "left",
10568
10568
  bottom: "top",
10569
10569
  left: "right"
10570
10570
  }, Dd = f.forwardRef(function(t, n) {
10571
- const { __scopePopper: r, ...o } = t, s = qy(Md, r), i = Jy[s.placedSide];
10571
+ const { __scopePopper: r, ...o } = t, s = qy(Md, r), i = Zy[s.placedSide];
10572
10572
  return (
10573
10573
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
10574
10574
  // doesn't report size as we'd expect on SVG elements.
@@ -10613,7 +10613,7 @@ var Md = "PopperArrow", Jy = {
10613
10613
  );
10614
10614
  });
10615
10615
  Dd.displayName = Md;
10616
- function Zy(e) {
10616
+ function Jy(e) {
10617
10617
  return e !== null;
10618
10618
  }
10619
10619
  var Qy = (e) => ({
@@ -10847,7 +10847,7 @@ var ya = "MenuPortal", [yS, Yd] = On(ya, {
10847
10847
  forceMount: void 0
10848
10848
  }), Xd = (e) => {
10849
10849
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Mn(ya, t);
10850
- return /* @__PURE__ */ l.jsx(yS, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: r }) }) });
10850
+ return /* @__PURE__ */ l.jsx(yS, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Jo, { asChild: !0, container: o, children: r }) }) });
10851
10851
  };
10852
10852
  Xd.displayName = ya;
10853
10853
  var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
@@ -10910,9 +10910,9 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
10910
10910
  ...v
10911
10911
  } = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Gd(n), R = gS(n), [S, C] = f.useState(null), E = f.useRef(null), I = Te(t, E, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), $ = g ? es : f.Fragment, L = g ? { as: ES, allowPinchZoom: !0 } : void 0, X = (_) => {
10912
10912
  var Y, P;
10913
- const z = k.current + _, q = R().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = q.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, Q = q.map((Z) => Z.textValue), de = LS(Q, z, F), be = (P = q.find((Z) => Z.textValue === de)) == null ? void 0 : P.ref.current;
10914
- (function Z(ne) {
10915
- k.current = ne, window.clearTimeout(A.current), ne !== "" && (A.current = window.setTimeout(() => Z(""), 1e3));
10913
+ const z = k.current + _, q = R().filter((J) => !J.disabled), oe = document.activeElement, F = (Y = q.find((J) => J.ref.current === oe)) == null ? void 0 : Y.textValue, Q = q.map((J) => J.textValue), de = LS(Q, z, F), be = (P = q.find((J) => J.textValue === de)) == null ? void 0 : P.ref.current;
10914
+ (function J(ne) {
10915
+ k.current = ne, window.clearTimeout(A.current), ne !== "" && (A.current = window.setTimeout(() => J(""), 1e3));
10916
10916
  })(z), be && setTimeout(() => be.focus());
10917
10917
  };
10918
10918
  f.useEffect(() => () => window.clearTimeout(A.current), []), na();
@@ -10949,7 +10949,7 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
10949
10949
  W.current = _;
10950
10950
  }, []),
10951
10951
  children: /* @__PURE__ */ l.jsx($, { ...L, children: /* @__PURE__ */ l.jsx(
10952
- Jo,
10952
+ Zo,
10953
10953
  {
10954
10954
  asChild: !0,
10955
10955
  trapped: o,
@@ -11036,13 +11036,13 @@ var RS = "MenuGroup", Ta = f.forwardRef(
11036
11036
  }
11037
11037
  );
11038
11038
  Ta.displayName = RS;
11039
- var IS = "MenuLabel", Jd = f.forwardRef(
11039
+ var IS = "MenuLabel", Zd = f.forwardRef(
11040
11040
  (e, t) => {
11041
11041
  const { __scopeMenu: n, ...r } = e;
11042
11042
  return /* @__PURE__ */ l.jsx(me.div, { ...r, ref: t });
11043
11043
  }
11044
11044
  );
11045
- Jd.displayName = IS;
11045
+ Zd.displayName = IS;
11046
11046
  var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
11047
11047
  (e, t) => {
11048
11048
  const { disabled: n = !1, onSelect: r, ...o } = e, s = f.useRef(null), i = Wr(Oo, e.__scopeMenu), a = Sa(Oo, e.__scopeMenu), c = Te(t, s), u = f.useRef(!1), d = () => {
@@ -11053,7 +11053,7 @@ var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
11053
11053
  }
11054
11054
  };
11055
11055
  return /* @__PURE__ */ l.jsx(
11056
- Zd,
11056
+ Jd,
11057
11057
  {
11058
11058
  ...o,
11059
11059
  ref: c,
@@ -11076,7 +11076,7 @@ var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
11076
11076
  }
11077
11077
  );
11078
11078
  ds.displayName = Oo;
11079
- var Zd = f.forwardRef(
11079
+ var Jd = f.forwardRef(
11080
11080
  (e, t) => {
11081
11081
  const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Sa(Oo, n), a = Gd(n), c = f.useRef(null), u = Te(t, c), [d, h] = f.useState(!1), [p, x] = f.useState("");
11082
11082
  return f.useEffect(() => {
@@ -11226,7 +11226,7 @@ var OS = "MenuSub", [rE, cf] = On(OS), pr = "MenuSubTrigger", uf = f.forwardRef(
11226
11226
  window.clearTimeout(h), c(null);
11227
11227
  };
11228
11228
  }, [a, c]), /* @__PURE__ */ l.jsx(wa, { asChild: !0, ...u, children: /* @__PURE__ */ l.jsx(
11229
- Zd,
11229
+ Jd,
11230
11230
  {
11231
11231
  id: o.triggerId,
11232
11232
  "aria-haspopup": "menu",
@@ -11234,7 +11234,7 @@ var OS = "MenuSub", [rE, cf] = On(OS), pr = "MenuSubTrigger", uf = f.forwardRef(
11234
11234
  "aria-controls": o.contentId,
11235
11235
  "data-state": hf(n.open),
11236
11236
  ...e,
11237
- ref: Ji(t, o.onTriggerChange),
11237
+ ref: Zi(t, o.onTriggerChange),
11238
11238
  onClick: (h) => {
11239
11239
  var p;
11240
11240
  (p = e.onClick) == null || p.call(e, h), !(e.disabled || h.defaultPrevented) && (h.currentTarget.focus(), n.open || n.onOpenChange(!0));
@@ -11365,7 +11365,7 @@ function BS(e, t) {
11365
11365
  function jr(e) {
11366
11366
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
11367
11367
  }
11368
- var HS = Kd, $S = wa, zS = Xd, US = qd, WS = Ta, VS = Jd, GS = ds, KS = Qd, YS = tf, XS = rf, qS = sf, JS = af, ZS = lf, QS = uf, e0 = ff, fs = "DropdownMenu", [t0, oE] = Ut(
11368
+ var HS = Kd, $S = wa, zS = Xd, US = qd, WS = Ta, VS = Zd, GS = ds, KS = Qd, YS = tf, XS = rf, qS = sf, ZS = af, JS = lf, QS = uf, e0 = ff, fs = "DropdownMenu", [t0, oE] = Ut(
11369
11369
  fs,
11370
11370
  [Vd]
11371
11371
  ), ht = Vd(), [n0, pf] = t0(fs), mf = (e) => {
@@ -11414,7 +11414,7 @@ var gf = "DropdownMenuTrigger", vf = f.forwardRef(
11414
11414
  "data-disabled": r ? "" : void 0,
11415
11415
  disabled: r,
11416
11416
  ...o,
11417
- ref: Ji(t, s.triggerRef),
11417
+ ref: Zi(t, s.triggerRef),
11418
11418
  onPointerDown: ee(e.onPointerDown, (a) => {
11419
11419
  !r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
11420
11420
  }),
@@ -11506,13 +11506,13 @@ var f0 = "DropdownMenuItemIndicator", Ef = f.forwardRef((e, t) => {
11506
11506
  Ef.displayName = f0;
11507
11507
  var h0 = "DropdownMenuSeparator", Rf = f.forwardRef((e, t) => {
11508
11508
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11509
- return /* @__PURE__ */ l.jsx(JS, { ...o, ...r, ref: t });
11509
+ return /* @__PURE__ */ l.jsx(ZS, { ...o, ...r, ref: t });
11510
11510
  });
11511
11511
  Rf.displayName = h0;
11512
11512
  var p0 = "DropdownMenuArrow", m0 = f.forwardRef(
11513
11513
  (e, t) => {
11514
11514
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11515
- return /* @__PURE__ */ l.jsx(ZS, { ...o, ...r, ref: t });
11515
+ return /* @__PURE__ */ l.jsx(JS, { ...o, ...r, ref: t });
11516
11516
  }
11517
11517
  );
11518
11518
  m0.displayName = p0;
@@ -11682,17 +11682,17 @@ function vo({
11682
11682
  isLoadingHistory: I,
11683
11683
  loadOlderMessages: A,
11684
11684
  api: k
11685
- } = Fi(), [M, W] = fe(null), [G, N] = fe(""), [$, L] = fe(null), [X, O] = fe([]), [_, z] = fe(!1), [q, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [Z, ne] = fe([]), [le, ie] = fe(null);
11685
+ } = Fi(), [M, W] = fe(null), [G, N] = fe(""), [$, L] = fe(null), [X, O] = fe([]), [_, z] = fe(!1), [q, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [J, ne] = fe([]), [le, ie] = fe(null);
11686
11686
  bt(null);
11687
11687
  const Pe = bt(null), Fe = bt(null), Le = bt(null), ce = bt(!1), Ae = bt(!0), ve = bt(0), H = bt(null), [ae, Be] = fe("desktop");
11688
11688
  Ve(() => {
11689
- const J = () => {
11689
+ const Z = () => {
11690
11690
  const se = window.innerWidth;
11691
11691
  Be(se < 640 ? "phone" : se < 1024 ? "tablet" : "desktop");
11692
11692
  };
11693
- return J(), window.addEventListener("resize", J), () => window.removeEventListener("resize", J);
11693
+ return Z(), window.addEventListener("resize", Z), () => window.removeEventListener("resize", Z);
11694
11694
  }, []), Ve(() => {
11695
- let J = !1;
11695
+ let Z = !1;
11696
11696
  if (!p) {
11697
11697
  ne([]), ie(null), H.current = null;
11698
11698
  return;
@@ -11703,25 +11703,25 @@ function vo({
11703
11703
  }, Ce = H.current;
11704
11704
  if (!(Ce && Ce.threadId === se.threadId && Ce.checkpointId === se.checkpointId))
11705
11705
  return R(p).then((Ne) => {
11706
- if (J) return;
11706
+ if (Z) return;
11707
11707
  const _t = ((Ne == null ? void 0 : Ne.checkpoints) ?? []).slice().sort((Ot, Ln) => new Date(Ln.createdAt).getTime() - new Date(Ot.createdAt).getTime());
11708
11708
  ne(_t), ie((Ot) => {
11709
11709
  var Ln;
11710
11710
  return Ot ?? ((Ln = _t[0]) == null ? void 0 : Ln.checkpointId) ?? null;
11711
11711
  }), H.current = se;
11712
11712
  }).catch((Ne) => {
11713
- console.error("ChatInterface - listCheckpoints error:", Ne), J || (ne([]), H.current = null);
11713
+ console.error("ChatInterface - listCheckpoints error:", Ne), Z || (ne([]), H.current = null);
11714
11714
  }), () => {
11715
- J = !0;
11715
+ Z = !0;
11716
11716
  };
11717
11717
  }, [p, y, R]), Ve(() => {
11718
11718
  y && ie(y);
11719
11719
  }, [y]);
11720
11720
  const nt = Ye(async () => {
11721
11721
  if (!E || I) return;
11722
- const J = Le.current;
11723
- if (!J) return;
11724
- const se = J.scrollHeight, Ce = J.scrollTop;
11722
+ const Z = Le.current;
11723
+ if (!Z) return;
11724
+ const se = Z.scrollHeight, Ce = Z.scrollTop;
11725
11725
  ce.current = !0;
11726
11726
  try {
11727
11727
  await A();
@@ -11744,8 +11744,8 @@ function vo({
11744
11744
  Ve(() => {
11745
11745
  x.length < ve.current && (Ae.current = !0), ve.current = x.length;
11746
11746
  }, [x.length]), Ve(() => {
11747
- const J = Le.current;
11748
- J && (ce.current || Ae.current && (J.scrollTop = J.scrollHeight, Ae.current = !0));
11747
+ const Z = Le.current;
11748
+ Z && (ce.current || Ae.current && (Z.scrollTop = Z.scrollHeight, Ae.current = !0));
11749
11749
  }, [x]), Ve(() => {
11750
11750
  (async () => {
11751
11751
  try {
@@ -11758,24 +11758,24 @@ function vo({
11758
11758
  }, [k]), Ve(() => {
11759
11759
  m && !de && (h == null || h(m));
11760
11760
  }, [m, de, h]);
11761
- const ut = (J) => {
11762
- if (J.length > mo)
11763
- return `Message too long (${J.length}/${mo} characters)`;
11761
+ const ut = (Z) => {
11762
+ if (Z.length > mo)
11763
+ return `Message too long (${Z.length}/${mo} characters)`;
11764
11764
  try {
11765
- return Ow(J), null;
11765
+ return Ow(Z), null;
11766
11766
  } catch (se) {
11767
11767
  return (se == null ? void 0 : se.message) || "Invalid message";
11768
11768
  }
11769
- }, rt = (J) => {
11770
- const se = J.content || [], Ce = se.filter((Ne) => Ne.type === "text").map((Ne) => Ne.text).join("");
11769
+ }, rt = (Z) => {
11770
+ const se = Z.content || [], Ce = se.filter((Ne) => Ne.type === "text").map((Ne) => Ne.text).join("");
11771
11771
  if (Ce) return Ce;
11772
11772
  try {
11773
11773
  return JSON.stringify(se, null, 2);
11774
11774
  } catch {
11775
11775
  return String(se);
11776
11776
  }
11777
- }, Qe = async (J) => {
11778
- const se = J.trim();
11777
+ }, Qe = async (Z) => {
11778
+ const se = Z.trim();
11779
11779
  if (!(!se && X.length === 0)) {
11780
11780
  if (se) {
11781
11781
  const Ce = ut(se);
@@ -11791,24 +11791,24 @@ function vo({
11791
11791
  L(Ne), h == null || h(Ne);
11792
11792
  }
11793
11793
  }
11794
- }, Tt = K.useCallback((J, se) => {
11795
- a && (W(J), N(se), L(null));
11794
+ }, Tt = K.useCallback((Z, se) => {
11795
+ a && (W(Z), N(se), L(null));
11796
11796
  }, [a]), We = K.useCallback(() => {
11797
11797
  W(null), N(""), L(null);
11798
- }, []), st = Ye((J, se) => {
11799
- Tt(J, se);
11800
- }, [Tt]), Ge = Ye((J) => {
11801
- for (let se = J - 1; se >= 0; se--)
11798
+ }, []), st = Ye((Z, se) => {
11799
+ Tt(Z, se);
11800
+ }, [Tt]), Ge = Ye((Z) => {
11801
+ for (let se = Z - 1; se >= 0; se--)
11802
11802
  if (x[se].role === "user") {
11803
11803
  const Ce = rt(x[se]);
11804
11804
  Ce && b(Ce, { checkpointId: le || y || void 0 });
11805
11805
  break;
11806
11806
  }
11807
- }, [x, b, le, y, rt]), it = (J) => {
11808
- const se = Array.from(J.target.files || []);
11807
+ }, [x, b, le, y, rt]), it = (Z) => {
11808
+ const se = Array.from(Z.target.files || []);
11809
11809
  O((Ce) => [...Ce, ...se]);
11810
- }, Pt = (J) => O((se) => se.filter((Ce, Ne) => J !== Ne)), xn = async (J) => {
11811
- const se = (J.target.files || [])[0];
11810
+ }, Pt = (Z) => O((se) => se.filter((Ce, Ne) => Z !== Ne)), xn = async (Z) => {
11811
+ const se = (Z.target.files || [])[0];
11812
11812
  if (se) {
11813
11813
  oe(null), Q(null), z(!0);
11814
11814
  try {
@@ -11818,20 +11818,20 @@ function vo({
11818
11818
  const Ne = Ce instanceof Error ? Ce.message : "Failed to upload Excel file";
11819
11819
  console.error("Excel upload failed", Ce), oe(Ne), h == null || h(Ne);
11820
11820
  } finally {
11821
- z(!1), J.target.value = "";
11821
+ z(!1), Z.target.value = "";
11822
11822
  }
11823
11823
  }
11824
- }, Dn = (J) => {
11825
- if (!J) return "Unknown";
11826
- const se = Date.parse(J);
11827
- return Number.isNaN(se) ? J : new Date(se).toLocaleString();
11828
- }, Ue = async (J) => {
11824
+ }, Dn = (Z) => {
11825
+ if (!Z) return "Unknown";
11826
+ const se = Date.parse(Z);
11827
+ return Number.isNaN(se) ? Z : new Date(se).toLocaleString();
11828
+ }, Ue = async (Z) => {
11829
11829
  if (p) {
11830
- if (!J) {
11830
+ if (!Z) {
11831
11831
  await C(), ie(null);
11832
11832
  return;
11833
11833
  }
11834
- await S(J), ie(J);
11834
+ await S(Z), ie(Z);
11835
11835
  }
11836
11836
  }, lr = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${c.container || ""}`, Cs = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 space-y-4 bg-transparent ${c.messagesArea || ""}`, Ts = `flex-shrink-0 w-full border-t p-4 bg-transparent ${c.inputArea || ""}`;
11837
11837
  return /* @__PURE__ */ l.jsxs("div", { className: lr, children: [
@@ -11849,23 +11849,23 @@ function vo({
11849
11849
  }
11850
11850
  )
11851
11851
  ] }),
11852
- p && Z.length > 0 && /* @__PURE__ */ l.jsxs("div", { className: "flex-shrink-0 flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/60 text-xs dark:bg-muted/50", children: [
11852
+ p && J.length > 0 && /* @__PURE__ */ l.jsxs("div", { className: "flex-shrink-0 flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/60 text-xs dark:bg-muted/50", children: [
11853
11853
  /* @__PURE__ */ l.jsx("span", { className: "opacity-70", children: "Checkpoint:" }),
11854
11854
  /* @__PURE__ */ l.jsxs(
11855
11855
  "select",
11856
11856
  {
11857
11857
  className: "border border-border rounded px-2 py-1 text-xs bg-card text-foreground focus:outline-none focus:ring-1 focus:ring-ring dark:bg-secondary",
11858
11858
  value: le ?? "",
11859
- onChange: (J) => {
11860
- const se = J.target.value || null;
11859
+ onChange: (Z) => {
11860
+ const se = Z.target.value || null;
11861
11861
  Ue(se);
11862
11862
  },
11863
11863
  children: [
11864
11864
  /* @__PURE__ */ l.jsx("option", { value: "", children: "Latest" }),
11865
- Z.map((J) => /* @__PURE__ */ l.jsxs("option", { value: J.checkpointId, children: [
11866
- Dn(J.createdAt),
11867
- J.preview ? ` — ${J.preview.slice(0, 40)}` : ""
11868
- ] }, J.checkpointId))
11865
+ J.map((Z) => /* @__PURE__ */ l.jsxs("option", { value: Z.checkpointId, children: [
11866
+ Dn(Z.createdAt),
11867
+ Z.preview ? ` — ${Z.preview.slice(0, 40)}` : ""
11868
+ ] }, Z.checkpointId))
11869
11869
  ]
11870
11870
  }
11871
11871
  )
@@ -11887,24 +11887,24 @@ function vo({
11887
11887
  },
11888
11888
  style: { height: "100%", overscrollBehavior: "contain" },
11889
11889
  components: {
11890
- Scroller: K.forwardRef((J, se) => /* @__PURE__ */ l.jsx(
11890
+ Scroller: K.forwardRef((Z, se) => /* @__PURE__ */ l.jsx(
11891
11891
  "div",
11892
11892
  {
11893
- ...J,
11893
+ ...Z,
11894
11894
  ref: se,
11895
11895
  style: {
11896
11896
  overflowAnchor: "auto",
11897
11897
  willChange: "transform",
11898
- ...(J == null ? void 0 : J.style) ?? {}
11898
+ ...(Z == null ? void 0 : Z.style) ?? {}
11899
11899
  }
11900
11900
  }
11901
11901
  ))
11902
11902
  },
11903
- itemContent: (J, se) => /* @__PURE__ */ l.jsx(
11903
+ itemContent: (Z, se) => /* @__PURE__ */ l.jsx(
11904
11904
  ww,
11905
11905
  {
11906
11906
  message: se,
11907
- messageIndex: J,
11907
+ messageIndex: Z,
11908
11908
  isStreamingMessage: g && v === se.id,
11909
11909
  streamingDebounceMs: o,
11910
11910
  isEditing: M === se.id,
@@ -11915,10 +11915,10 @@ function vo({
11915
11915
  truncateToolMessages: !1,
11916
11916
  toolMessagePreviewLength: 200,
11917
11917
  onEdit: st,
11918
- onRegenerate: () => Ge(J),
11918
+ onRegenerate: () => Ge(Z),
11919
11919
  onCancelEdit: We
11920
11920
  },
11921
- se.id ?? `msg-${se.role}-${J}-${se.createdAt ?? ""}`
11921
+ se.id ?? `msg-${se.role}-${Z}-${se.createdAt ?? ""}`
11922
11922
  )
11923
11923
  }
11924
11924
  )
@@ -11949,13 +11949,13 @@ function vo({
11949
11949
  ref: Pe,
11950
11950
  type: "file",
11951
11951
  multiple: !0,
11952
- onChange: (J) => it(J),
11952
+ onChange: (Z) => it(Z),
11953
11953
  className: "hidden"
11954
11954
  }
11955
11955
  ),
11956
- X.length > 0 && /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: X.map((J, se) => /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
11956
+ X.length > 0 && /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: X.map((Z, se) => /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
11957
11957
  /* @__PURE__ */ l.jsx(Wa, { size: 14 }),
11958
- /* @__PURE__ */ l.jsx("span", { className: "truncate max-w-[150px]", children: J.name }),
11958
+ /* @__PURE__ */ l.jsx("span", { className: "truncate max-w-[150px]", children: Z.name }),
11959
11959
  /* @__PURE__ */ l.jsx(
11960
11960
  ke,
11961
11961
  {
@@ -11963,7 +11963,7 @@ function vo({
11963
11963
  size: "sm",
11964
11964
  onClick: () => Pt(se),
11965
11965
  className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
11966
- "aria-label": `Remove ${J.name}`,
11966
+ "aria-label": `Remove ${Z.name}`,
11967
11967
  children: /* @__PURE__ */ l.jsx(Wn, { size: 12 })
11968
11968
  }
11969
11969
  )
@@ -12005,8 +12005,8 @@ function vo({
12005
12005
  ) }),
12006
12006
  /* @__PURE__ */ l.jsxs(Ff, { align: "start", sideOffset: 6, className: "w-52", children: [
12007
12007
  s && /* @__PURE__ */ l.jsxs(Si, { onClick: () => {
12008
- var J;
12009
- return (J = Pe.current) == null ? void 0 : J.click();
12008
+ var Z;
12009
+ return (Z = Pe.current) == null ? void 0 : Z.click();
12010
12010
  }, className: "cursor-pointer", children: [
12011
12011
  /* @__PURE__ */ l.jsx(Wa, { className: "h-4 w-4 mr-2" }),
12012
12012
  " Attach files or images"
@@ -12015,8 +12015,8 @@ function vo({
12015
12015
  Si,
12016
12016
  {
12017
12017
  onClick: () => {
12018
- var J;
12019
- _ || (J = Fe.current) == null || J.click();
12018
+ var Z;
12019
+ _ || (Z = Fe.current) == null || Z.click();
12020
12020
  },
12021
12021
  className: `cursor-pointer ${_ ? "opacity-60 pointer-events-none" : ""}`,
12022
12022
  children: [
@@ -12244,7 +12244,7 @@ var k0 = f.forwardRef((e, t) => {
12244
12244
  i(a ? u : d);
12245
12245
  }
12246
12246
  }, 10);
12247
- return Jn(n.viewport, c), Jn(n.content, c), /* @__PURE__ */ l.jsx(vt, { present: r || s, children: /* @__PURE__ */ l.jsx(
12247
+ return Zn(n.viewport, c), Zn(n.content, c), /* @__PURE__ */ l.jsx(vt, { present: r || s, children: /* @__PURE__ */ l.jsx(
12248
12248
  ja,
12249
12249
  {
12250
12250
  "data-state": s ? "visible" : "hidden",
@@ -12411,7 +12411,7 @@ var k0 = f.forwardRef((e, t) => {
12411
12411
  (g == null ? void 0 : g.contains(M)) && S(k, R);
12412
12412
  };
12413
12413
  return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
12414
- }, [y, g, R, S]), f.useEffect(C, [r, C]), Jn(g, E), Jn(x.content, E), /* @__PURE__ */ l.jsx(
12414
+ }, [y, g, R, S]), f.useEffect(C, [r, C]), Zn(g, E), Zn(x.content, E), /* @__PURE__ */ l.jsx(
12415
12415
  M0,
12416
12416
  {
12417
12417
  scope: n,
@@ -12493,11 +12493,11 @@ var Aa = "ScrollAreaCorner", Kf = f.forwardRef(
12493
12493
  Kf.displayName = Aa;
12494
12494
  var L0 = f.forwardRef((e, t) => {
12495
12495
  const { __scopeScrollArea: n, ...r } = e, o = kt(Aa, n), [s, i] = f.useState(0), [a, c] = f.useState(0), u = !!(s && a);
12496
- return Jn(o.scrollbarX, () => {
12496
+ return Zn(o.scrollbarX, () => {
12497
12497
  var h;
12498
12498
  const d = ((h = o.scrollbarX) == null ? void 0 : h.offsetHeight) || 0;
12499
12499
  o.onCornerHeightChange(d), c(d);
12500
- }), Jn(o.scrollbarY, () => {
12500
+ }), Zn(o.scrollbarY, () => {
12501
12501
  var h;
12502
12502
  const d = ((h = o.scrollbarY) == null ? void 0 : h.offsetWidth) || 0;
12503
12503
  o.onCornerWidthChange(d), i(d);
@@ -12561,7 +12561,7 @@ function ps(e, t) {
12561
12561
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
12562
12562
  }, [n, t]);
12563
12563
  }
12564
- function Jn(e, t) {
12564
+ function Zn(e, t) {
12565
12565
  const n = ot(t);
12566
12566
  tt(() => {
12567
12567
  let r = 0;
@@ -12575,9 +12575,9 @@ function Jn(e, t) {
12575
12575
  }
12576
12576
  }, [e, n]);
12577
12577
  }
12578
- var Jf = Hf, H0 = zf, $0 = Kf;
12579
- const Zf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
12580
- Jf,
12578
+ var Zf = Hf, H0 = zf, $0 = Kf;
12579
+ const Jf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
12580
+ Zf,
12581
12581
  {
12582
12582
  ref: r,
12583
12583
  className: D("relative overflow-hidden", e),
@@ -12589,7 +12589,7 @@ const Zf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
12589
12589
  ]
12590
12590
  }
12591
12591
  ));
12592
- Zf.displayName = Jf.displayName;
12592
+ Jf.displayName = Zf.displayName;
12593
12593
  const Qf = f.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ l.jsx(
12594
12594
  Na,
12595
12595
  {
@@ -12690,7 +12690,7 @@ function Ti({
12690
12690
  }
12691
12691
  ) }),
12692
12692
  /* @__PURE__ */ l.jsx(
12693
- Zf,
12693
+ Jf,
12694
12694
  {
12695
12695
  className: `flex-1 min-h-0 ${s.threadList || ""}`,
12696
12696
  style: o ? { maxHeight: o } : void 0,
@@ -12831,7 +12831,7 @@ function Y0() {
12831
12831
  }, []), !!e;
12832
12832
  }
12833
12833
  var X0 = "Separator", fc = "horizontal", q0 = ["horizontal", "vertical"], nh = f.forwardRef((e, t) => {
12834
- const { decorative: n, orientation: r = fc, ...o } = e, s = J0(r) ? r : fc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
12834
+ const { decorative: n, orientation: r = fc, ...o } = e, s = Z0(r) ? r : fc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
12835
12835
  return /* @__PURE__ */ l.jsx(
12836
12836
  me.div,
12837
12837
  {
@@ -12843,7 +12843,7 @@ var X0 = "Separator", fc = "horizontal", q0 = ["horizontal", "vertical"], nh = f
12843
12843
  );
12844
12844
  });
12845
12845
  nh.displayName = X0;
12846
- function J0(e) {
12846
+ function Z0(e) {
12847
12847
  return q0.includes(e);
12848
12848
  }
12849
12849
  var rh = nh;
@@ -12864,7 +12864,7 @@ const ka = f.forwardRef(
12864
12864
  )
12865
12865
  );
12866
12866
  ka.displayName = rh.displayName;
12867
- const oh = ad, Z0 = pw, Q0 = ld, sh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
12867
+ const oh = ad, J0 = pw, Q0 = ld, sh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
12868
12868
  ns,
12869
12869
  {
12870
12870
  className: D(
@@ -13096,13 +13096,13 @@ var Ri = "TooltipTrigger", ph = f.forwardRef(
13096
13096
  ph.displayName = Ri;
13097
13097
  var iC = "TooltipPortal", [dE, aC] = ms(iC, {
13098
13098
  forceMount: void 0
13099
- }), Zn = "TooltipContent", mh = f.forwardRef(
13099
+ }), Jn = "TooltipContent", mh = f.forwardRef(
13100
13100
  (e, t) => {
13101
- const n = aC(Zn, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = vs(Zn, e.__scopeTooltip);
13101
+ const n = aC(Jn, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = vs(Jn, e.__scopeTooltip);
13102
13102
  return /* @__PURE__ */ l.jsx(vt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ l.jsx(gh, { side: o, ...s, ref: t }) : /* @__PURE__ */ l.jsx(lC, { side: o, ...s, ref: t }) });
13103
13103
  }
13104
13104
  ), lC = f.forwardRef((e, t) => {
13105
- const n = vs(Zn, e.__scopeTooltip), r = _a(Zn, e.__scopeTooltip), o = f.useRef(null), s = Te(t, o), [i, a] = f.useState(null), { trigger: c, onClose: u } = n, d = o.current, { onPointerInTransitChange: h } = r, p = f.useCallback(() => {
13105
+ const n = vs(Jn, e.__scopeTooltip), r = _a(Jn, e.__scopeTooltip), o = f.useRef(null), s = Te(t, o), [i, a] = f.useState(null), { trigger: c, onClose: u } = n, d = o.current, { onPointerInTransitChange: h } = r, p = f.useCallback(() => {
13106
13106
  a(null), h(!1);
13107
13107
  }, [h]), x = f.useCallback(
13108
13108
  (g, v) => {
@@ -13136,7 +13136,7 @@ var iC = "TooltipPortal", [dE, aC] = ms(iC, {
13136
13136
  onEscapeKeyDown: s,
13137
13137
  onPointerDownOutside: i,
13138
13138
  ...a
13139
- } = e, c = vs(Zn, n), u = gs(n), { onClose: d } = c;
13139
+ } = e, c = vs(Jn, n), u = gs(n), { onClose: d } = c;
13140
13140
  return f.useEffect(() => (document.addEventListener(Ei, d), () => document.removeEventListener(Ei, d)), [d]), f.useEffect(() => {
13141
13141
  if (c.trigger) {
13142
13142
  const h = (p) => {
@@ -13179,7 +13179,7 @@ var iC = "TooltipPortal", [dE, aC] = ms(iC, {
13179
13179
  );
13180
13180
  }
13181
13181
  );
13182
- mh.displayName = Zn;
13182
+ mh.displayName = Jn;
13183
13183
  var vh = "TooltipArrow", fC = f.forwardRef(
13184
13184
  (e, t) => {
13185
13185
  const { __scopeTooltip: n, ...r } = e, o = gs(n);
@@ -13999,8 +13999,8 @@ const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13999
13999
  }
14000
14000
  ));
14001
14001
  an.displayName = $h.displayName;
14002
- var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], JC = [" ", "Enter"], An = "Select", [ws, ys, ZC] = aa(An), [ar, pE] = Ut(An, [
14003
- ZC,
14002
+ var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], ZC = [" ", "Enter"], An = "Select", [ws, ys, JC] = aa(An), [ar, pE] = Ut(An, [
14003
+ JC,
14004
14004
  ir
14005
14005
  ]), Ss = ir(), [QC, gn] = ar(An), [eT, tT] = ar(An), zh = (e) => {
14006
14006
  const {
@@ -14157,7 +14157,7 @@ var nT = "SelectIcon", Kh = f.forwardRef(
14157
14157
  }
14158
14158
  );
14159
14159
  Kh.displayName = nT;
14160
- var rT = "SelectPortal", Yh = (e) => /* @__PURE__ */ l.jsx(Zo, { asChild: !0, ...e });
14160
+ var rT = "SelectPortal", Yh = (e) => /* @__PURE__ */ l.jsx(Jo, { asChild: !0, ...e });
14161
14161
  Yh.displayName = rT;
14162
14162
  var kn = "SelectContent", Xh = f.forwardRef(
14163
14163
  (e, t) => {
@@ -14171,11 +14171,11 @@ var kn = "SelectContent", Xh = f.forwardRef(
14171
14171
  s
14172
14172
  ) : null;
14173
14173
  }
14174
- return /* @__PURE__ */ l.jsx(Jh, { ...e, ref: t });
14174
+ return /* @__PURE__ */ l.jsx(Zh, { ...e, ref: t });
14175
14175
  }
14176
14176
  );
14177
14177
  Xh.displayName = kn;
14178
- var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent.RemoveScroll"), Jh = f.forwardRef(
14178
+ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent.RemoveScroll"), Zh = f.forwardRef(
14179
14179
  (e, t) => {
14180
14180
  const {
14181
14181
  __scopeSelect: n,
@@ -14205,7 +14205,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14205
14205
  }, [y]), na();
14206
14206
  const L = f.useCallback(
14207
14207
  (Y) => {
14208
- const [P, ...Z] = W().map((ie) => ie.ref.current), [ne] = Z.slice(-1), le = document.activeElement;
14208
+ const [P, ...J] = W().map((ie) => ie.ref.current), [ne] = J.slice(-1), le = document.activeElement;
14209
14209
  for (const ie of Y)
14210
14210
  if (ie === le || (ie == null || ie.scrollIntoView({ block: "nearest" }), ie === P && S && (S.scrollTop = 0), ie === ne && S && (S.scrollTop = S.scrollHeight), ie == null || ie.focus(), document.activeElement !== le)) return;
14211
14211
  },
@@ -14227,11 +14227,11 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14227
14227
  x: Math.abs(Math.round(ne.pageX) - (((le = _.current) == null ? void 0 : le.x) ?? 0)),
14228
14228
  y: Math.abs(Math.round(ne.pageY) - (((ie = _.current) == null ? void 0 : ie.y) ?? 0))
14229
14229
  };
14230
- }, Z = (ne) => {
14230
+ }, J = (ne) => {
14231
14231
  Y.x <= 10 && Y.y <= 10 ? ne.preventDefault() : y.contains(ne.target) || O(!1), document.removeEventListener("pointermove", P), _.current = null;
14232
14232
  };
14233
- return _.current !== null && (document.addEventListener("pointermove", P), document.addEventListener("pointerup", Z, { capture: !0, once: !0 })), () => {
14234
- document.removeEventListener("pointermove", P), document.removeEventListener("pointerup", Z, { capture: !0 });
14233
+ return _.current !== null && (document.addEventListener("pointermove", P), document.addEventListener("pointerup", J, { capture: !0, once: !0 })), () => {
14234
+ document.removeEventListener("pointermove", P), document.removeEventListener("pointerup", J, { capture: !0 });
14235
14235
  };
14236
14236
  }
14237
14237
  }, [y, O, _]), f.useEffect(() => {
@@ -14241,21 +14241,21 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14241
14241
  };
14242
14242
  }, [O]);
14243
14243
  const [z, q] = pp((Y) => {
14244
- const P = W().filter((le) => !le.disabled), Z = P.find((le) => le.ref.current === document.activeElement), ne = mp(P, Y, Z);
14244
+ const P = W().filter((le) => !le.disabled), J = P.find((le) => le.ref.current === document.activeElement), ne = mp(P, Y, J);
14245
14245
  ne && setTimeout(() => ne.ref.current.focus());
14246
14246
  }), oe = f.useCallback(
14247
- (Y, P, Z) => {
14248
- const ne = !$.current && !Z;
14247
+ (Y, P, J) => {
14248
+ const ne = !$.current && !J;
14249
14249
  (w.value !== void 0 && w.value === P || ne) && (A(Y), ne && ($.current = !0));
14250
14250
  },
14251
14251
  [w.value]
14252
14252
  ), F = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Q = f.useCallback(
14253
- (Y, P, Z) => {
14254
- const ne = !$.current && !Z;
14253
+ (Y, P, J) => {
14254
+ const ne = !$.current && !J;
14255
14255
  (w.value !== void 0 && w.value === P || ne) && M(Y);
14256
14256
  },
14257
14257
  [w.value]
14258
- ), de = r === "popper" ? Ii : Zh, be = de === Ii ? {
14258
+ ), de = r === "popper" ? Ii : Jh, be = de === Ii ? {
14259
14259
  side: a,
14260
14260
  sideOffset: c,
14261
14261
  align: u,
@@ -14284,7 +14284,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14284
14284
  isPositioned: G,
14285
14285
  searchRef: z,
14286
14286
  children: /* @__PURE__ */ l.jsx(es, { as: sT, allowPinchZoom: !0, children: /* @__PURE__ */ l.jsx(
14287
- Jo,
14287
+ Zo,
14288
14288
  {
14289
14289
  asChild: !0,
14290
14290
  trapped: w.open,
@@ -14345,8 +14345,8 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14345
14345
  );
14346
14346
  }
14347
14347
  );
14348
- Jh.displayName = oT;
14349
- var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
14348
+ Zh.displayName = oT;
14349
+ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
14350
14350
  const { __scopeSelect: n, onPlaced: r, ...o } = e, s = gn(kn, n), i = vn(kn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Te(t, (E) => d(E)), p = ys(n), x = f.useRef(!1), g = f.useRef(!0), { viewport: v, selectedItem: m, selectedItemText: b, focusSelectedItem: w } = i, y = f.useCallback(() => {
14351
14351
  if (s.trigger && s.valueNode && a && u && v && m && b) {
14352
14352
  const E = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), k = b.getBoundingClientRect();
@@ -14368,7 +14368,7 @@ var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
14368
14368
  ]);
14369
14369
  a.style.minWidth = Fe + "px", a.style.right = Ae + "px";
14370
14370
  }
14371
- const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), $ = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), X = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = $ + L + G + O + X, z = Math.min(m.offsetHeight * 5, _), q = window.getComputedStyle(v), oe = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), Q = E.top + E.height / 2 - Dt, de = W - Q, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = $ + L + Y, Z = _ - P;
14371
+ const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), $ = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), X = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = $ + L + G + O + X, z = Math.min(m.offsetHeight * 5, _), q = window.getComputedStyle(v), oe = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), Q = E.top + E.height / 2 - Dt, de = W - Q, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = $ + L + Y, J = _ - P;
14372
14372
  if (P <= Q) {
14373
14373
  const le = M.length > 0 && m === M[M.length - 1].ref.current;
14374
14374
  a.style.bottom = "0px";
@@ -14385,7 +14385,7 @@ var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
14385
14385
  Q,
14386
14386
  $ + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
14387
14387
  (le ? oe : 0) + be
14388
- ) + Z;
14388
+ ) + J;
14389
14389
  a.style.height = Pe + "px", v.scrollTop = P - Q + v.offsetTop;
14390
14390
  }
14391
14391
  a.style.margin = `${Dt}px 0`, a.style.minHeight = z + "px", a.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => x.current = !0);
@@ -14450,7 +14450,7 @@ var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
14450
14450
  }
14451
14451
  );
14452
14452
  });
14453
- Zh.displayName = iT;
14453
+ Jh.displayName = iT;
14454
14454
  var aT = "SelectPopperPosition", Ii = f.forwardRef((e, t) => {
14455
14455
  const {
14456
14456
  __scopeSelect: n,
@@ -14620,7 +14620,7 @@ var Fo = "SelectItem", [fT, rp] = ar(Fo), op = f.forwardRef(
14620
14620
  }),
14621
14621
  onKeyDown: ee(i.onKeyDown, (w) => {
14622
14622
  var R;
14623
- ((R = c.searchRef) == null ? void 0 : R.current) !== "" && w.key === " " || (JC.includes(w.key) && b(), w.key === " " && w.preventDefault());
14623
+ ((R = c.searchRef) == null ? void 0 : R.current) !== "" && w.key === " " || (ZC.includes(w.key) && b(), w.key === " " && w.preventDefault());
14624
14624
  })
14625
14625
  }
14626
14626
  )
@@ -15016,8 +15016,8 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
15016
15016
  }
15017
15017
  };
15018
15018
  return /* @__PURE__ */ l.jsxs(oh, { open: r, onOpenChange: o, children: [
15019
- /* @__PURE__ */ l.jsx(Z0, { asChild: !0, children: /* @__PURE__ */ l.jsxs(ke, { variant: "outline", size: "sm", className: n, children: [
15020
- /* @__PURE__ */ l.jsx(Jp, { className: "h-4 w-4 mr-2" }),
15019
+ /* @__PURE__ */ l.jsx(J0, { asChild: !0, children: /* @__PURE__ */ l.jsxs(ke, { variant: "outline", size: "sm", className: n, children: [
15020
+ /* @__PURE__ */ l.jsx(Zp, { className: "h-4 w-4 mr-2" }),
15021
15021
  "Settings",
15022
15022
  u && /* @__PURE__ */ l.jsx(Ru, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
15023
15023
  ] }) }),
@@ -15029,7 +15029,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
15029
15029
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-6 py-6", children: [
15030
15030
  /* @__PURE__ */ l.jsxs(xo, { children: [
15031
15031
  /* @__PURE__ */ l.jsx(bo, { className: "pb-3", children: /* @__PURE__ */ l.jsxs(wo, { className: "text-lg flex items-center gap-2", children: [
15032
- /* @__PURE__ */ l.jsx(Zp, { className: "h-5 w-5" }),
15032
+ /* @__PURE__ */ l.jsx(Jp, { className: "h-5 w-5" }),
15033
15033
  "API Configuration"
15034
15034
  ] }) }),
15035
15035
  /* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [