teodor-new-chat-ui 4.3.62 → 4.3.63

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,7 +2,7 @@ var jm = Object.defineProperty;
2
2
  var Pm = (e, t, n) => t in e ? jm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var jl = (e, t, n) => Pm(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as g from "react";
5
- import V, { createContext as Ro, useContext as js, useReducer as Om, useRef as ze, useCallback as ke, useEffect as at, useMemo as lt, useState as ye, startTransition as Fo, createElement as Zo, useLayoutEffect as Mm } from "react";
5
+ import V, { createContext as ko, useContext as js, useReducer as Om, useRef as ze, useCallback as ke, useEffect as at, useMemo as lt, useState as ye, startTransition as Lo, createElement as Jo, useLayoutEffect as Mm } from "react";
6
6
  import { Square as Dm, Send as Lm, X as Or, ExternalLink as Fm, Download as $m, Image as zm, FileText as Pl, Loader as Aa, Bot as Ol, Wrench as Bm, User as Hm, Paperclip as Ki, ChevronUp as Na, ChevronDown as Ps, Copy as Ml, Edit as Dl, RotateCcw as qi, ChevronRight as Um, Check as _a, Circle as Wm, Loader2 as Gi, Edit3 as wu, Plus as Vm, FileSpreadsheet as Km, MessageSquarePlus as qm, MessageSquare as Gm, Calendar as Ym, Trash2 as Xm, Settings as Jm, Server as Zm, EyeOff as Qm, Eye as eg, Layout as tg, MessageCircle as ng, Save as rg } from "lucide-react";
7
7
  import { Slot as og, createSlot as $r } from "@radix-ui/react-slot";
8
8
  import { cva as Os } from "class-variance-authority";
@@ -645,7 +645,7 @@ const { toString: cg } = Object.prototype, { getPrototypeOf: ja } = Object, { it
645
645
  const n = cg.call(t);
646
646
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
647
647
  })(/* @__PURE__ */ Object.create(null)), yn = (e) => (e = e.toLowerCase(), (t) => Ls(t) === e), Fs = (e) => (t) => typeof t === e, { isArray: Ur } = Array, zr = Fs("undefined");
648
- function Eo(e) {
648
+ function Ro(e) {
649
649
  return e !== null && !zr(e) && e.constructor !== null && !zr(e.constructor) && Ht(e.constructor.isBuffer) && e.constructor.isBuffer(e);
650
650
  }
651
651
  const Tu = yn("ArrayBuffer");
@@ -653,25 +653,25 @@ function ug(e) {
653
653
  let t;
654
654
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Tu(e.buffer), t;
655
655
  }
656
- const dg = Fs("string"), Ht = Fs("function"), ku = Fs("number"), Io = (e) => e !== null && typeof e == "object", fg = (e) => e === !0 || e === !1, Qo = (e) => {
656
+ const dg = Fs("string"), Ht = Fs("function"), ku = Fs("number"), Eo = (e) => e !== null && typeof e == "object", fg = (e) => e === !0 || e === !1, Zo = (e) => {
657
657
  if (Ls(e) !== "object")
658
658
  return !1;
659
659
  const t = ja(e);
660
660
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Cu in e) && !(Ds in e);
661
661
  }, pg = (e) => {
662
- if (!Io(e) || Eo(e))
662
+ if (!Eo(e) || Ro(e))
663
663
  return !1;
664
664
  try {
665
665
  return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
666
666
  } catch {
667
667
  return !1;
668
668
  }
669
- }, hg = yn("Date"), mg = yn("File"), gg = yn("Blob"), xg = yn("FileList"), yg = (e) => Io(e) && Ht(e.pipe), vg = (e) => {
669
+ }, hg = yn("Date"), mg = yn("File"), gg = yn("Blob"), xg = yn("FileList"), yg = (e) => Eo(e) && Ht(e.pipe), vg = (e) => {
670
670
  let t;
671
671
  return e && (typeof FormData == "function" && e instanceof FormData || Ht(e.append) && ((t = Ls(e)) === "formdata" || // detect form-data instance
672
672
  t === "object" && Ht(e.toString) && e.toString() === "[object FormData]"));
673
673
  }, wg = yn("URLSearchParams"), [bg, Sg, Cg, Tg] = ["ReadableStream", "Request", "Response", "Headers"].map(yn), kg = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
674
- function Ao(e, t, { allOwnKeys: n = !1 } = {}) {
674
+ function Io(e, t, { allOwnKeys: n = !1 } = {}) {
675
675
  if (e === null || typeof e > "u")
676
676
  return;
677
677
  let r, o;
@@ -679,7 +679,7 @@ function Ao(e, t, { allOwnKeys: n = !1 } = {}) {
679
679
  for (r = 0, o = e.length; r < o; r++)
680
680
  t.call(null, e[r], r, e);
681
681
  else {
682
- if (Eo(e))
682
+ if (Ro(e))
683
683
  return;
684
684
  const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
685
685
  let a;
@@ -688,7 +688,7 @@ function Ao(e, t, { allOwnKeys: n = !1 } = {}) {
688
688
  }
689
689
  }
690
690
  function Ru(e, t) {
691
- if (Eo(e))
691
+ if (Ro(e))
692
692
  return null;
693
693
  t = t.toLowerCase();
694
694
  const n = Object.keys(e);
@@ -702,13 +702,13 @@ const dr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
702
702
  function Xi() {
703
703
  const { caseless: e, skipUndefined: t } = Eu(this) && this || {}, n = {}, r = (o, s) => {
704
704
  const i = e && Ru(n, s) || s;
705
- Qo(n[i]) && Qo(o) ? n[i] = Xi(n[i], o) : Qo(o) ? n[i] = Xi({}, o) : Ur(o) ? n[i] = o.slice() : (!t || !zr(o)) && (n[i] = o);
705
+ Zo(n[i]) && Zo(o) ? n[i] = Xi(n[i], o) : Zo(o) ? n[i] = Xi({}, o) : Ur(o) ? n[i] = o.slice() : (!t || !zr(o)) && (n[i] = o);
706
706
  };
707
707
  for (let o = 0, s = arguments.length; o < s; o++)
708
- arguments[o] && Ao(arguments[o], r);
708
+ arguments[o] && Io(arguments[o], r);
709
709
  return n;
710
710
  }
711
- const Rg = (e, t, n, { allOwnKeys: r } = {}) => (Ao(t, (o, s) => {
711
+ const Rg = (e, t, n, { allOwnKeys: r } = {}) => (Io(t, (o, s) => {
712
712
  n && Ht(o) ? e[s] = Su(o, n) : e[s] = o;
713
713
  }, { allOwnKeys: r }), e), Eg = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ig = (e, t, n, r) => {
714
714
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
@@ -757,7 +757,7 @@ const Rg = (e, t, n, { allOwnKeys: r } = {}) => (Ao(t, (o, s) => {
757
757
  }
758
758
  ), $l = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Lg = yn("RegExp"), Iu = (e, t) => {
759
759
  const n = Object.getOwnPropertyDescriptors(e), r = {};
760
- Ao(n, (o, s) => {
760
+ Io(n, (o, s) => {
761
761
  let i;
762
762
  (i = t(o, s, e)) !== !1 && (r[s] = i || o);
763
763
  }), Object.defineProperties(e, r);
@@ -790,15 +790,15 @@ function Hg(e) {
790
790
  }
791
791
  const Ug = (e) => {
792
792
  const t = new Array(10), n = (r, o) => {
793
- if (Io(r)) {
793
+ if (Eo(r)) {
794
794
  if (t.indexOf(r) >= 0)
795
795
  return;
796
- if (Eo(r))
796
+ if (Ro(r))
797
797
  return r;
798
798
  if (!("toJSON" in r)) {
799
799
  t[o] = r;
800
800
  const s = Ur(r) ? [] : {};
801
- return Ao(r, (i, a) => {
801
+ return Io(r, (i, a) => {
802
802
  const l = n(i, o + 1);
803
803
  !zr(l) && (s[a] = l);
804
804
  }), t[o] = void 0, s;
@@ -807,7 +807,7 @@ const Ug = (e) => {
807
807
  return r;
808
808
  };
809
809
  return n(e, 0);
810
- }, Wg = yn("AsyncFunction"), Vg = (e) => e && (Io(e) || Ht(e)) && Ht(e.then) && Ht(e.catch), Au = ((e, t) => e ? setImmediate : t ? ((n, r) => (dr.addEventListener("message", ({ source: o, data: s }) => {
810
+ }, Wg = yn("AsyncFunction"), Vg = (e) => e && (Eo(e) || Ht(e)) && Ht(e.then) && Ht(e.catch), Au = ((e, t) => e ? setImmediate : t ? ((n, r) => (dr.addEventListener("message", ({ source: o, data: s }) => {
811
811
  o === dr && s === n && r.length && r.shift()();
812
812
  }, !1), (o) => {
813
813
  r.push(o), dr.postMessage(n, "*");
@@ -817,14 +817,14 @@ const Ug = (e) => {
817
817
  ), Kg = typeof queueMicrotask < "u" ? queueMicrotask.bind(dr) : typeof process < "u" && process.nextTick || Au, qg = (e) => e != null && Ht(e[Ds]), P = {
818
818
  isArray: Ur,
819
819
  isArrayBuffer: Tu,
820
- isBuffer: Eo,
820
+ isBuffer: Ro,
821
821
  isFormData: vg,
822
822
  isArrayBufferView: ug,
823
823
  isString: dg,
824
824
  isNumber: ku,
825
825
  isBoolean: fg,
826
- isObject: Io,
827
- isPlainObject: Qo,
826
+ isObject: Eo,
827
+ isPlainObject: Zo,
828
828
  isEmptyObject: pg,
829
829
  isReadableStream: bg,
830
830
  isRequest: Sg,
@@ -840,7 +840,7 @@ const Ug = (e) => {
840
840
  isURLSearchParams: wg,
841
841
  isTypedArray: jg,
842
842
  isFileList: xg,
843
- forEach: Ao,
843
+ forEach: Io,
844
844
  merge: Xi,
845
845
  extend: Rg,
846
846
  trim: kg,
@@ -1177,7 +1177,7 @@ function cx(e, t, n) {
1177
1177
  }
1178
1178
  return (n || JSON.stringify)(e);
1179
1179
  }
1180
- const No = {
1180
+ const Ao = {
1181
1181
  transitional: Mu,
1182
1182
  adapter: ["xhr", "http", "fetch"],
1183
1183
  transformRequest: [function(t, n) {
@@ -1206,7 +1206,7 @@ const No = {
1206
1206
  return s || o ? (n.setContentType("application/json", !1), cx(t)) : t;
1207
1207
  }],
1208
1208
  transformResponse: [function(t) {
1209
- const n = this.transitional || No.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1209
+ const n = this.transitional || Ao.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1210
1210
  if (P.isResponse(t) || P.isReadableStream(t))
1211
1211
  return t;
1212
1212
  if (t && P.isString(t) && (r && !this.responseType || o)) {
@@ -1244,7 +1244,7 @@ const No = {
1244
1244
  }
1245
1245
  };
1246
1246
  P.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1247
- No.headers[e] = {};
1247
+ Ao.headers[e] = {};
1248
1248
  });
1249
1249
  const ux = P.toObjectSet([
1250
1250
  "age",
@@ -1275,8 +1275,8 @@ const ux = P.toObjectSet([
1275
1275
  function no(e) {
1276
1276
  return e && String(e).trim().toLowerCase();
1277
1277
  }
1278
- function es(e) {
1279
- return e === !1 || e == null ? e : P.isArray(e) ? e.map(es) : String(e);
1278
+ function Qo(e) {
1279
+ return e === !1 || e == null ? e : P.isArray(e) ? e.map(Qo) : String(e);
1280
1280
  }
1281
1281
  function fx(e) {
1282
1282
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -1321,7 +1321,7 @@ let Ut = class {
1321
1321
  if (!d)
1322
1322
  throw new Error("header name must be a non-empty string");
1323
1323
  const f = P.findKey(o, d);
1324
- (!f || o[f] === void 0 || c === !0 || c === void 0 && o[f] !== !1) && (o[f || l] = es(a));
1324
+ (!f || o[f] === void 0 || c === !0 || c === void 0 && o[f] !== !1) && (o[f || l] = Qo(a));
1325
1325
  }
1326
1326
  const i = (a, l) => P.forEach(a, (c, d) => s(c, d, l));
1327
1327
  if (P.isPlainObject(t) || t instanceof this.constructor)
@@ -1389,11 +1389,11 @@ let Ut = class {
1389
1389
  return P.forEach(this, (o, s) => {
1390
1390
  const i = P.findKey(r, s);
1391
1391
  if (i) {
1392
- n[i] = es(o), delete n[s];
1392
+ n[i] = Qo(o), delete n[s];
1393
1393
  return;
1394
1394
  }
1395
1395
  const a = t ? hx(s) : String(s).trim();
1396
- a !== s && delete n[s], n[a] = es(o), r[a] = !0;
1396
+ a !== s && delete n[s], n[a] = Qo(o), r[a] = !0;
1397
1397
  }), this;
1398
1398
  }
1399
1399
  concat(...t) {
@@ -1448,7 +1448,7 @@ P.reduceDescriptors(Ut.prototype, ({ value: e }, t) => {
1448
1448
  });
1449
1449
  P.freezeMethods(Ut);
1450
1450
  function wi(e, t) {
1451
- const n = this || No, r = t || n, o = Ut.from(r.headers);
1451
+ const n = this || Ao, r = t || n, o = Ut.from(r.headers);
1452
1452
  let s = r.data;
1453
1453
  return P.forEach(e, function(a) {
1454
1454
  s = a.call(n, s, o.normalize(), t ? t.status : void 0);
@@ -1505,7 +1505,7 @@ function yx(e, t) {
1505
1505
  }, r - f)));
1506
1506
  }, () => o && i(o)];
1507
1507
  }
1508
- const ps = (e, t, n = 3) => {
1508
+ const fs = (e, t, n = 3) => {
1509
1509
  let r = 0;
1510
1510
  const o = xx(50, 250);
1511
1511
  return yx((s) => {
@@ -1705,7 +1705,7 @@ const zu = (e) => {
1705
1705
  )), y = null;
1706
1706
  }, s === void 0 && i.setContentType(null), "setRequestHeader" in y && P.forEach(i.toJSON(), function(T, C) {
1707
1707
  y.setRequestHeader(C, T);
1708
- }), P.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), a && a !== "json" && (y.responseType = o.responseType), c && ([p, m] = ps(c, !0), y.addEventListener("progress", p)), l && y.upload && ([f, h] = ps(l), y.upload.addEventListener("progress", f), y.upload.addEventListener("loadend", h)), (o.cancelToken || o.signal) && (d = (b) => {
1708
+ }), P.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), a && a !== "json" && (y.responseType = o.responseType), c && ([p, m] = fs(c, !0), y.addEventListener("progress", p)), l && y.upload && ([f, h] = fs(l), y.upload.addEventListener("progress", f), y.upload.addEventListener("loadend", h)), (o.cancelToken || o.signal) && (d = (b) => {
1709
1709
  y && (r(!b || b.type ? new Wr(null, e, y) : b), y.abort(), y = null);
1710
1710
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
1711
1711
  const w = gx(o.url);
@@ -1795,7 +1795,7 @@ const zu = (e) => {
1795
1795
  }, {
1796
1796
  highWaterMark: 2
1797
1797
  });
1798
- }, Gl = 64 * 1024, { isFunction: $o } = P, Ax = (({ Request: e, Response: t }) => ({
1798
+ }, Gl = 64 * 1024, { isFunction: Fo } = P, Ax = (({ Request: e, Response: t }) => ({
1799
1799
  Request: e,
1800
1800
  Response: t
1801
1801
  }))(P.global), {
@@ -1811,10 +1811,10 @@ const zu = (e) => {
1811
1811
  e = P.merge.call({
1812
1812
  skipUndefined: !0
1813
1813
  }, Ax, e);
1814
- const { fetch: t, Request: n, Response: r } = e, o = t ? $o(t) : typeof fetch == "function", s = $o(n), i = $o(r);
1814
+ const { fetch: t, Request: n, Response: r } = e, o = t ? Fo(t) : typeof fetch == "function", s = Fo(n), i = Fo(r);
1815
1815
  if (!o)
1816
1816
  return !1;
1817
- const a = o && $o(Yl), l = o && (typeof Xl == "function" ? /* @__PURE__ */ ((m) => (v) => m.encode(v))(new Xl()) : async (m) => new Uint8Array(await new n(m).arrayBuffer())), c = s && a && Jl(() => {
1817
+ const a = o && Fo(Yl), l = o && (typeof Xl == "function" ? /* @__PURE__ */ ((m) => (v) => m.encode(v))(new Xl()) : async (m) => new Uint8Array(await new n(m).arrayBuffer())), c = s && a && Jl(() => {
1818
1818
  let m = !1;
1819
1819
  const v = new n(Dt.origin, {
1820
1820
  body: new Yl(),
@@ -1884,7 +1884,7 @@ const zu = (e) => {
1884
1884
  if (P.isFormData(x) && (ae = Q.headers.get("content-type")) && A.setContentType(ae), Q.body) {
1885
1885
  const [B, ee] = Wl(
1886
1886
  D,
1887
- ps(Vl(S))
1887
+ fs(Vl(S))
1888
1888
  );
1889
1889
  x = ql(Q.body, Gl, B, ee);
1890
1890
  }
@@ -1909,7 +1909,7 @@ const zu = (e) => {
1909
1909
  });
1910
1910
  const ae = P.toFiniteNumber(K.headers.get("content-length")), [B, ee] = C && Wl(
1911
1911
  ae,
1912
- ps(Vl(C), !0)
1912
+ fs(Vl(C), !0)
1913
1913
  ) || [];
1914
1914
  K = new r(
1915
1915
  ql(K.body, Gl, B, () => {
@@ -2007,7 +2007,7 @@ function Ql(e) {
2007
2007
  return bi(e), e.headers = Ut.from(e.headers), e.data = wi.call(
2008
2008
  e,
2009
2009
  e.transformRequest
2010
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Hu.getAdapter(e.adapter || No.adapter, e)(e).then(function(r) {
2010
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Hu.getAdapter(e.adapter || Ao.adapter, e)(e).then(function(r) {
2011
2011
  return bi(e), r.data = wi.call(
2012
2012
  e,
2013
2013
  e.transformResponse,
@@ -2066,10 +2066,10 @@ function Px(e, t, n) {
2066
2066
  throw new je("Unknown option " + s, je.ERR_BAD_OPTION);
2067
2067
  }
2068
2068
  }
2069
- const ts = {
2069
+ const es = {
2070
2070
  assertOptions: Px,
2071
2071
  validators: zs
2072
- }, En = ts.validators;
2072
+ }, En = es.validators;
2073
2073
  let pr = class {
2074
2074
  constructor(t) {
2075
2075
  this.defaults = t || {}, this.interceptors = {
@@ -2105,16 +2105,16 @@ let pr = class {
2105
2105
  _request(t, n) {
2106
2106
  typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = mr(this.defaults, n);
2107
2107
  const { transitional: r, paramsSerializer: o, headers: s } = n;
2108
- r !== void 0 && ts.assertOptions(r, {
2108
+ r !== void 0 && es.assertOptions(r, {
2109
2109
  silentJSONParsing: En.transitional(En.boolean),
2110
2110
  forcedJSONParsing: En.transitional(En.boolean),
2111
2111
  clarifyTimeoutError: En.transitional(En.boolean)
2112
2112
  }, !1), o != null && (P.isFunction(o) ? n.paramsSerializer = {
2113
2113
  serialize: o
2114
- } : ts.assertOptions(o, {
2114
+ } : es.assertOptions(o, {
2115
2115
  encode: En.function,
2116
2116
  serialize: En.function
2117
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ts.assertOptions(n, {
2117
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), es.assertOptions(n, {
2118
2118
  baseUrl: En.spelling("baseURL"),
2119
2119
  withXsrfToken: En.spelling("withXSRFToken")
2120
2120
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
@@ -2349,7 +2349,7 @@ function Vu(e) {
2349
2349
  return Vu(mr(e, o));
2350
2350
  }, n;
2351
2351
  }
2352
- const wt = Vu(No);
2352
+ const wt = Vu(Ao);
2353
2353
  wt.Axios = pr;
2354
2354
  wt.CanceledError = Wr;
2355
2355
  wt.CancelToken = Ox;
@@ -2370,34 +2370,34 @@ wt.getAdapter = Hu.getAdapter;
2370
2370
  wt.HttpStatusCode = ea;
2371
2371
  wt.default = wt;
2372
2372
  const {
2373
- Axios: Yk,
2374
- AxiosError: Xk,
2375
- CanceledError: Jk,
2376
- isCancel: Zk,
2377
- CancelToken: Qk,
2378
- VERSION: eR,
2379
- all: tR,
2380
- Cancel: nR,
2381
- isAxiosError: rR,
2382
- spread: oR,
2383
- toFormData: sR,
2384
- AxiosHeaders: iR,
2385
- HttpStatusCode: aR,
2386
- formToJSON: lR,
2387
- getAdapter: cR,
2388
- mergeConfig: uR
2373
+ Axios: Gk,
2374
+ AxiosError: Yk,
2375
+ CanceledError: Xk,
2376
+ isCancel: Jk,
2377
+ CancelToken: Zk,
2378
+ VERSION: Qk,
2379
+ all: eR,
2380
+ Cancel: tR,
2381
+ isAxiosError: nR,
2382
+ spread: rR,
2383
+ toFormData: oR,
2384
+ AxiosHeaders: sR,
2385
+ HttpStatusCode: iR,
2386
+ formToJSON: aR,
2387
+ getAdapter: lR,
2388
+ mergeConfig: cR
2389
2389
  } = wt, tc = typeof window < "u" ? window.__API_BASE_URL__ : void 0, nc = tc ? Un(tc) : void 0;
2390
2390
  function Un(e) {
2391
2391
  const n = (e != null && e.trim() ? e.trim() : "/api/chat").replace(/\/+$/, "");
2392
2392
  return n ? n.endsWith("/chat") ? n : `${n}/chat` : "/api/chat";
2393
2393
  }
2394
- let hs = null;
2394
+ let ps = null;
2395
2395
  const ta = /* @__PURE__ */ new Set();
2396
2396
  function Lx() {
2397
- return hs;
2397
+ return ps;
2398
2398
  }
2399
2399
  function rc(e) {
2400
- hs = e, ta.forEach((t) => t(e));
2400
+ ps = e, ta.forEach((t) => t(e));
2401
2401
  }
2402
2402
  function Fx(e) {
2403
2403
  return ta.add(e), () => ta.delete(e);
@@ -2409,7 +2409,7 @@ const an = wt.create({
2409
2409
  timeout: 3e4,
2410
2410
  withCredentials: !0
2411
2411
  });
2412
- an.interceptors.request.use((e) => (hs && (e.headers.Authorization = `Bearer ${hs}`), e));
2412
+ an.interceptors.request.use((e) => (ps && (e.headers.Authorization = `Bearer ${ps}`), e));
2413
2413
  an.interceptors.response.use(
2414
2414
  (e) => e,
2415
2415
  (e) => Promise.reject(e)
@@ -2503,7 +2503,7 @@ class Hx {
2503
2503
  return In(n);
2504
2504
  }
2505
2505
  }
2506
- const gr = new Hx(), Ku = Ro(null);
2506
+ const gr = new Hx(), Ku = ko(null);
2507
2507
  function Ux({ children: e, apiConfig: t }) {
2508
2508
  const n = gr;
2509
2509
  if (t) {
@@ -2640,15 +2640,15 @@ function Gx(e) {
2640
2640
  function Yx(e, t) {
2641
2641
  return {
2642
2642
  ...e,
2643
- metadata: zo(e.metadata, t.metadata) ?? null,
2644
- config: zo(e.config, t.config) ?? null,
2645
- parentConfig: zo(e.parentConfig, t.parentConfig) ?? null,
2643
+ metadata: $o(e.metadata, t.metadata) ?? null,
2644
+ config: $o(e.config, t.config) ?? null,
2645
+ parentConfig: $o(e.parentConfig, t.parentConfig) ?? null,
2646
2646
  next: Xx(e.next, t.next) ?? null,
2647
2647
  tasks: Jx(e.tasks, t.tasks) ?? null,
2648
- values: zo(e.values, t.values) ?? null
2648
+ values: $o(e.values, t.values) ?? null
2649
2649
  };
2650
2650
  }
2651
- function zo(e, t) {
2651
+ function $o(e, t) {
2652
2652
  return t && typeof t == "object" ? { ...e && typeof e == "object" ? e : {}, ...t } : t === null ? e && typeof e == "object" ? { ...e } : e ?? null : e && typeof e == "object" ? { ...e } : e ?? void 0;
2653
2653
  }
2654
2654
  function Xx(e, t) {
@@ -3622,8 +3622,8 @@ function cc(e, t) {
3622
3622
  return e.value === t.value;
3623
3623
  }
3624
3624
  }
3625
- const ns = 300;
3626
- function uc(e, t = ns) {
3625
+ const ts = 300;
3626
+ function uc(e, t = ts) {
3627
3627
  if (typeof window < "u" && "requestIdleCallback" in window)
3628
3628
  try {
3629
3629
  window.requestIdleCallback(e, { timeout: t });
@@ -3710,7 +3710,7 @@ function ki(e) {
3710
3710
  }
3711
3711
  return n;
3712
3712
  }
3713
- function Bo(e) {
3713
+ function zo(e) {
3714
3714
  const t = {}, n = [];
3715
3715
  for (const r of e)
3716
3716
  !r || typeof r.threadId != "string" || t[r.threadId] || (t[r.threadId] = r, n.push(r.threadId));
@@ -3785,15 +3785,15 @@ function Oy(e) {
3785
3785
  } catch {
3786
3786
  }
3787
3787
  }
3788
- const td = Ro(null), nd = Ro(null), rd = Ro(null), My = Ro(!1), dc = 50, Dy = 750;
3788
+ const td = ko(null), nd = ko(null), rd = ko(null), My = ko(!1), dc = 50, Dy = 750;
3789
3789
  function fc(e, t, n) {
3790
3790
  return `${e}__${t ?? ""}__${n ?? ""}`;
3791
3791
  }
3792
- function rs(e, t) {
3792
+ function ns(e, t) {
3793
3793
  return t && typeof t == "object" ? { ...e && typeof e == "object" ? { ...e } : {}, ...t } : t === null ? e && typeof e == "object" ? { ...e } : e ?? null : e && typeof e == "object" ? { ...e } : e ?? void 0;
3794
3794
  }
3795
3795
  function Ly(e, t) {
3796
- return rs(
3796
+ return ns(
3797
3797
  e,
3798
3798
  t
3799
3799
  );
@@ -3805,7 +3805,7 @@ function $y(e, t) {
3805
3805
  return Array.isArray(t) ? t.map((n) => ({ ...n })) : t === null ? Array.isArray(e) ? e.map((n) => ({ ...n })) : e ?? null : Array.isArray(e) ? e.map((n) => ({ ...n })) : e ?? void 0;
3806
3806
  }
3807
3807
  function pc(e, t) {
3808
- const n = rs(e.metadata, t.metadata), r = rs(e.config, t.config), o = rs(e.parentConfig, t.parentConfig), s = Fy(e.next, t.next), i = $y(e.tasks, t.tasks), a = Ly(e.values, t.values), l = {};
3808
+ const n = ns(e.metadata, t.metadata), r = ns(e.config, t.config), o = ns(e.parentConfig, t.parentConfig), s = Fy(e.next, t.next), i = $y(e.tasks, t.tasks), a = Ly(e.values, t.values), l = {};
3809
3809
  return n !== void 0 && (l.metadata = n ?? null), r !== void 0 && (l.config = r ?? null), o !== void 0 && (l.parentConfig = o ?? null), s !== void 0 && (l.next = s ?? null), i !== void 0 && (l.tasks = i ?? null), a !== void 0 && (l.values = a ?? null), l;
3810
3810
  }
3811
3811
  function zy({
@@ -3852,11 +3852,11 @@ function zy({
3852
3852
  const E = ki(
3853
3853
  Ti(f, (I = l.getAuthToken) == null ? void 0 : I.call(l))
3854
3854
  );
3855
- return Bo(E);
3855
+ return zo(E);
3856
3856
  }), C = lt(() => Ri(b), [b]), [S, k] = ye(t), [A, N] = ye(!1), [j, $] = ye(!1), [L, O] = ye(null), [_, D] = ye(null), [U, ne] = ye(null), [K, z] = ye([]), G = ke(() => {
3857
3857
  const E = ki(x);
3858
- Fo(() => {
3859
- T(Bo(E));
3858
+ Lo(() => {
3859
+ T(zo(E));
3860
3860
  });
3861
3861
  }, [x]), [Q, ae] = ye(!1), [B, ee] = ye(!1), [Re, xe] = ye(null), [W, M] = ye(void 0), [X, re] = ye(void 0), [fe, oe] = ye(void 0), {
3862
3862
  state: le,
@@ -3992,10 +3992,10 @@ function zy({
3992
3992
  E || N(!0);
3993
3993
  try {
3994
3994
  const I = await l.listThreads();
3995
- Fo(() => {
3995
+ Lo(() => {
3996
3996
  T((Y) => {
3997
3997
  const te = (Ue) => Ue.map((We) => `${We.threadId}:${We.updatedAt ?? ""}:${We.messageCount ?? ""}`).join("|"), ce = Ri(Y);
3998
- return te(ce) === te(I) || I.length === 0 && ce.length > 0 && !Qt.current ? Y : Bo(I);
3998
+ return te(ce) === te(I) || I.length === 0 && ce.length > 0 && !Qt.current ? Y : zo(I);
3999
3999
  });
4000
4000
  }), O(null), Qt.current || (Qt.current = !0);
4001
4001
  } catch (I) {
@@ -4033,7 +4033,7 @@ function zy({
4033
4033
  }
4034
4034
  pt.current = window.setTimeout(() => {
4035
4035
  uc(te);
4036
- }, ns);
4036
+ }, ts);
4037
4037
  },
4038
4038
  [x]
4039
4039
  ), ar = ke(() => {
@@ -4145,7 +4145,7 @@ function zy({
4145
4145
  updatedAt: E.updatedAt || (/* @__PURE__ */ new Date()).toISOString(),
4146
4146
  messageCount: E.messageCount || 0
4147
4147
  };
4148
- Oe.current !== I && (!Oe.current && le.messages.length <= 1 && (se.current = I), k(I)), Fo(() => {
4148
+ Oe.current !== I && (!Oe.current && le.messages.length <= 1 && (se.current = I), k(I)), Lo(() => {
4149
4149
  T((te) => {
4150
4150
  const ce = te.byId[I];
4151
4151
  return ce ? ce.title === Y.title && ce.updatedAt === Y.updatedAt && ce.messageCount === Y.messageCount ? te : {
@@ -4195,7 +4195,7 @@ function zy({
4195
4195
  };
4196
4196
  return pt.current = window.setTimeout(() => {
4197
4197
  uc(I), pt.current = null;
4198
- }, ns), () => {
4198
+ }, ts), () => {
4199
4199
  pt.current !== null && (window.clearTimeout(pt.current), pt.current = null);
4200
4200
  };
4201
4201
  }, [C, Sn]), at(() => {
@@ -4206,8 +4206,8 @@ function zy({
4206
4206
  const Z = Ti(f, ce);
4207
4207
  Fe.current !== Z && (Fe.current = Z, Ge.current = !1), w(Z);
4208
4208
  const Ue = ki(Z);
4209
- Fo(() => {
4210
- T(Bo(Ue));
4209
+ Lo(() => {
4210
+ T(zo(Ue));
4211
4211
  }), ce && !Ge.current && (Ge.current = !0);
4212
4212
  };
4213
4213
  I(E);
@@ -4567,7 +4567,7 @@ function zy({
4567
4567
  } catch (Je) {
4568
4568
  console.warn("[ChatSessionProvider] Failed to persist thread payload:", Je);
4569
4569
  }
4570
- }, ns);
4570
+ }, ts);
4571
4571
  }
4572
4572
  }, [
4573
4573
  Re,
@@ -5351,9 +5351,9 @@ function la(e, t) {
5351
5351
  return r;
5352
5352
  {
5353
5353
  const [s, i] = dd(r);
5354
- return os(kt(e, { k: s, l: ud(r), v: i }));
5354
+ return rs(kt(e, { k: s, l: ud(r), v: i }));
5355
5355
  }
5356
- } else return t < n ? os(kt(e, { l: la(r, t) })) : os(kt(e, { r: la(o, t) }));
5356
+ } else return t < n ? rs(kt(e, { l: la(r, t) })) : rs(kt(e, { r: la(o, t) }));
5357
5357
  }
5358
5358
  function fr(e) {
5359
5359
  return ot(e) ? [] : [...fr(e.l), { k: e.k, v: e.v }, ...fr(e.r)];
@@ -5365,7 +5365,7 @@ function ca(e, t, n) {
5365
5365
  let a = [];
5366
5366
  return r > t && (a = a.concat(ca(o, t, n))), r >= t && r <= n && a.push({ k: r, v: i }), r <= n && (a = a.concat(ca(s, t, n))), a;
5367
5367
  }
5368
- function os(e) {
5368
+ function rs(e) {
5369
5369
  const { l: t, lvl: n, r } = e;
5370
5370
  if (r.lvl >= n - 1 && t.lvl >= n - 1)
5371
5371
  return e;
@@ -5409,7 +5409,7 @@ function kt(e, t) {
5409
5409
  );
5410
5410
  }
5411
5411
  function ud(e) {
5412
- return ot(e.r) ? e.l : os(kt(e, { r: ud(e.r) }));
5412
+ return ot(e.r) ? e.l : rs(kt(e, { r: ud(e.r) }));
5413
5413
  }
5414
5414
  function Ii(e) {
5415
5415
  return ot(e) || e.lvl > e.r.lvl;
@@ -5446,9 +5446,9 @@ const Ua = Xe(
5446
5446
  { singleton: !0 }
5447
5447
  );
5448
5448
  function md(e, t, n) {
5449
- return e[ms(e, t, n)];
5449
+ return e[hs(e, t, n)];
5450
5450
  }
5451
- function ms(e, t, n, r = 0) {
5451
+ function hs(e, t, n, r = 0) {
5452
5452
  let o = e.length - 1;
5453
5453
  for (; r <= o; ) {
5454
5454
  const s = Math.floor((r + o) / 2), i = e[s], a = n(i, t);
@@ -5467,7 +5467,7 @@ function ms(e, t, n, r = 0) {
5467
5467
  throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
5468
5468
  }
5469
5469
  function ov(e, t, n, r) {
5470
- const o = ms(e, t, r), s = ms(e, n, r, o);
5470
+ const o = hs(e, t, r), s = hs(e, n, r, o);
5471
5471
  return e.slice(o, s + 1);
5472
5472
  }
5473
5473
  function Xn(e, t) {
@@ -5577,7 +5577,7 @@ function vc(e, t) {
5577
5577
  function da(e, t, n, r) {
5578
5578
  let o = e, s = 0, i = 0, a = 0, l = 0;
5579
5579
  if (t !== 0) {
5580
- l = ms(o, t - 1, Wa), a = o[l].offset;
5580
+ l = hs(o, t - 1, Wa), a = o[l].offset;
5581
5581
  const c = mn(n, t - 1);
5582
5582
  s = c[0], i = c[1], o.length && o[l].size === mn(n, t)[1] && (l -= 1), o = o.slice(0, l + 1);
5583
5583
  } else
@@ -5899,7 +5899,7 @@ function vd(e) {
5899
5899
  const t = typeof e == "number" ? { index: e } : e;
5900
5900
  return t.align || (t.align = "start"), (!t.behavior || !gv) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
5901
5901
  }
5902
- const _o = Xe(
5902
+ const No = Xe(
5903
5903
  ([
5904
5904
  { gap: e, listRefresh: t, sizes: n, totalCount: r },
5905
5905
  {
@@ -5981,7 +5981,7 @@ function Ka(e, t) {
5981
5981
  const n = t - 1;
5982
5982
  return typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
5983
5983
  }
5984
- const jo = Xe(
5984
+ const _o = Xe(
5985
5985
  ([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: i }]) => {
5986
5986
  const a = J(!0), l = J(0), c = J(!0);
5987
5987
  return ve(
@@ -6022,7 +6022,7 @@ const jo = Xe(
6022
6022
  scrolledToInitialItem: a
6023
6023
  };
6024
6024
  },
6025
- dt(Ln, $t, _o, rr),
6025
+ dt(Ln, $t, No, rr),
6026
6026
  { singleton: !0 }
6027
6027
  );
6028
6028
  function wd(e, t) {
@@ -6037,7 +6037,7 @@ const vo = "up", ao = "down", yv = "none", vv = {
6037
6037
  scrollTop: 0,
6038
6038
  viewportHeight: 0
6039
6039
  }
6040
- }, wv = 0, Po = Xe(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
6040
+ }, wv = 0, jo = Xe(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
6041
6041
  const i = J(!1), a = J(!0), l = qe(), c = qe(), d = J(4), f = J(wv), p = Ft(
6042
6042
  q(
6043
6043
  aa(q(Ie(o), yr(1), Nn(!0)), q(Ie(o), yr(1), Nn(!1), gc(100))),
@@ -6169,9 +6169,9 @@ const vo = "up", ao = "down", yv = "none", vv = {
6169
6169
  scrollDirection: y,
6170
6170
  scrollVelocity: x
6171
6171
  };
6172
- }, dt($t)), gs = "top", xs = "bottom", wc = "none";
6172
+ }, dt($t)), ms = "top", gs = "bottom", wc = "none";
6173
6173
  function bc(e, t, n) {
6174
- return typeof e == "number" ? n === vo && t === gs || n === ao && t === xs ? e : 0 : n === vo ? t === gs ? e.main : e.reverse : t === xs ? e.main : e.reverse;
6174
+ return typeof e == "number" ? n === vo && t === ms || n === ao && t === gs ? e : 0 : n === vo ? t === ms ? e.main : e.reverse : t === gs ? e.main : e.reverse;
6175
6175
  }
6176
6176
  function Sc(e, t) {
6177
6177
  var n;
@@ -6206,10 +6206,10 @@ const qa = Xe(
6206
6206
  ]) => {
6207
6207
  const T = d - w, C = y + x, S = Math.max(p - T, 0);
6208
6208
  let k = wc;
6209
- const A = Sc(b, gs), N = Sc(b, xs);
6209
+ const A = Sc(b, ms), N = Sc(b, gs);
6210
6210
  return h -= w, h += p + x, m += p + x, m -= w, h > d + C - A && (k = vo), m < d - S + f + N && (k = ao), k !== wc ? [
6211
- Math.max(T - p - bc(v, gs, k) - A, 0),
6212
- T - S - x + f + bc(v, xs, k) + N
6211
+ Math.max(T - p - bc(v, ms, k) - A, 0),
6212
+ T - S - x + f + bc(v, gs, k) + N
6213
6213
  ] : null;
6214
6214
  }
6215
6215
  ),
@@ -6252,7 +6252,7 @@ const Ai = {
6252
6252
  topListHeight: 0,
6253
6253
  totalCount: 0
6254
6254
  };
6255
- function ss(e, t, n, r, o, s) {
6255
+ function os(e, t, n, r, o, s) {
6256
6256
  const { lastIndex: i, lastOffset: a, lastSize: l } = o;
6257
6257
  let c = 0, d = 0;
6258
6258
  if (e.length > 0) {
@@ -6287,7 +6287,7 @@ function bd(e, t, n, r, o, s) {
6287
6287
  offset: 0,
6288
6288
  size: 0
6289
6289
  }));
6290
- return ss(c, [], a, o, n, r);
6290
+ return os(c, [], a, o, n, r);
6291
6291
  }
6292
6292
  function Cc(e, t, n) {
6293
6293
  if (e.length === 0)
@@ -6367,7 +6367,7 @@ const kr = Xe(
6367
6367
  if (S === 0 && k === 0)
6368
6368
  return z === 0 ? { ...Ai, totalCount: A } : bd(z, j, N, O, _, D || []);
6369
6369
  if (ot(K))
6370
- return z > 0 ? null : ss(
6370
+ return z > 0 ? null : os(
6371
6371
  bv(Ka(j, A), U, D),
6372
6372
  [],
6373
6373
  A,
@@ -6386,7 +6386,7 @@ const kr = Xe(
6386
6386
  }
6387
6387
  }
6388
6388
  if (!$)
6389
- return ss([], G, A, _, U, O);
6389
+ return os([], G, A, _, U, O);
6390
6390
  const Q = L.length > 0 ? L[L.length - 1] + 1 : 0, ae = cv(ne, S, k, Q);
6391
6391
  if (ae.length === 0)
6392
6392
  return null;
@@ -6406,7 +6406,7 @@ const kr = Xe(
6406
6406
  Re.push({ data: D == null ? void 0 : D[oe], index: oe, offset: M, size: re }), M += re + _;
6407
6407
  }
6408
6408
  });
6409
- return ss(ee, G, A, _, U, O);
6409
+ return os(ee, G, A, _, U, O);
6410
6410
  }
6411
6411
  ),
6412
6412
  //@ts-expect-error filter needs to be fixed
@@ -6483,9 +6483,9 @@ const kr = Xe(
6483
6483
  Ln,
6484
6484
  yd,
6485
6485
  qa,
6486
- jo,
6487
6486
  _o,
6488
- Po,
6487
+ No,
6488
+ jo,
6489
6489
  rr,
6490
6490
  Ua
6491
6491
  ),
@@ -6565,7 +6565,7 @@ const kr = Xe(
6565
6565
  scrollIntoView: d
6566
6566
  };
6567
6567
  },
6568
- dt(Ln, $t, _o, kr, nr),
6568
+ dt(Ln, $t, No, kr, nr),
6569
6569
  { singleton: !0 }
6570
6570
  );
6571
6571
  function Tc(e) {
@@ -6667,9 +6667,9 @@ const Tv = (e, t) => typeof e == "function" ? Tc(e(t)) : t && Tc(e), kv = Xe(
6667
6667
  },
6668
6668
  dt(
6669
6669
  Ln,
6670
- Po,
6671
- _o,
6672
6670
  jo,
6671
+ No,
6672
+ _o,
6673
6673
  rr,
6674
6674
  nr,
6675
6675
  $t,
@@ -6687,7 +6687,7 @@ const Tv = (e, t) => typeof e == "function" ? Tc(e(t)) : t && Tc(e), kv = Xe(
6687
6687
  ),
6688
6688
  i
6689
6689
  ), {}),
6690
- dt(Ln, jo, kr, rr),
6690
+ dt(Ln, _o, kr, rr),
6691
6691
  { singleton: !0 }
6692
6692
  ), Ev = Xe(
6693
6693
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
@@ -6746,7 +6746,7 @@ const Tv = (e, t) => typeof e == "function" ? Tc(e(t)) : t && Tc(e), kv = Xe(
6746
6746
  }
6747
6747
  ), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
6748
6748
  },
6749
- dt(Po),
6749
+ dt(jo),
6750
6750
  { singleton: !0 }
6751
6751
  ), Ga = Xe(([{ scrollContainerState: e, scrollTo: t }]) => {
6752
6752
  const n = qe(), r = qe(), o = qe(), s = J(!1), i = J(void 0);
@@ -6812,7 +6812,7 @@ const Tv = (e, t) => typeof e == "function" ? Tc(e(t)) : t && Tc(e), kv = Xe(
6812
6812
  restoreStateFrom: d
6813
6813
  };
6814
6814
  },
6815
- dt(Ln, $t, jo, rr, Ga)
6815
+ dt(Ln, $t, _o, rr, Ga)
6816
6816
  );
6817
6817
  function Av(e) {
6818
6818
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -6910,7 +6910,7 @@ const _v = Rd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6910
6910
  }
6911
6911
  ), { deviation: e };
6912
6912
  },
6913
- dt($t, Po, kr, Ln, nr, Ua)
6913
+ dt($t, jo, kr, Ln, nr, Ua)
6914
6914
  ), Pv = Xe(
6915
6915
  ([
6916
6916
  e,
@@ -7015,12 +7015,12 @@ const _v = Rd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
7015
7015
  }),
7016
7016
  dt(
7017
7017
  Ln,
7018
- jo,
7018
+ _o,
7019
7019
  $t,
7020
7020
  Iv,
7021
7021
  kv,
7022
7022
  kr,
7023
- _o,
7023
+ No,
7024
7024
  jv,
7025
7025
  Nv,
7026
7026
  yd,
@@ -7037,7 +7037,7 @@ function Ov(e, t) {
7037
7037
  Object.hasOwn(r, i) || (n[i] = t[i]);
7038
7038
  return n;
7039
7039
  }
7040
- const Ho = typeof document < "u" ? V.useLayoutEffect : V.useEffect;
7040
+ const Bo = typeof document < "u" ? V.useLayoutEffect : V.useEffect;
7041
7041
  function Id(e, t, n) {
7042
7042
  const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), s = Object.keys(t.methods || {}), i = Object.keys(t.events || {}), a = V.createContext({});
7043
7043
  function l(y, x) {
@@ -7066,13 +7066,13 @@ function Id(e, t, n) {
7066
7066
  const { children: w, ...b } = y, [T] = V.useState(() => Hs(Zy(e), (k) => {
7067
7067
  l(k, b);
7068
7068
  })), [C] = V.useState(mc(d, T));
7069
- Ho(() => {
7069
+ Bo(() => {
7070
7070
  for (const k of i)
7071
7071
  k in b && Qe(C[k], b[k]);
7072
7072
  return () => {
7073
7073
  Object.values(C).map(Ba);
7074
7074
  };
7075
- }, [b, C, T]), Ho(() => {
7075
+ }, [b, C, T]), Bo(() => {
7076
7076
  l(T, b);
7077
7077
  }), V.useImperativeHandle(x, hc(c(T)));
7078
7078
  const S = n;
@@ -7097,7 +7097,7 @@ function Id(e, t, n) {
7097
7097
  );
7098
7098
  }, m = (y) => {
7099
7099
  const x = V.useContext(a)[y], [w, b] = V.useState(mc(vt, x));
7100
- return Ho(
7100
+ return Bo(
7101
7101
  () => Qe(x, (T) => {
7102
7102
  T !== w && b(hc(T));
7103
7103
  }),
@@ -7108,7 +7108,7 @@ function Id(e, t, n) {
7108
7108
  Component: f,
7109
7109
  useEmitter: (y, x) => {
7110
7110
  const w = V.useContext(a)[y];
7111
- Ho(() => Qe(w, x), [x, w]);
7111
+ Bo(() => Qe(w, x), [x, w]);
7112
7112
  },
7113
7113
  useEmitterValue: v,
7114
7114
  usePublisher: p
@@ -7250,7 +7250,7 @@ const Dv = /* @__PURE__ */ Xe(() => {
7250
7250
  style: O,
7251
7251
  children: (e ? t.topItems : t.items).map((_) => {
7252
7252
  const D = _.originalIndex, U = A(D + t.firstItemIndex, _.data, c);
7253
- return N ? /* @__PURE__ */ Zo(
7253
+ return N ? /* @__PURE__ */ Jo(
7254
7254
  T,
7255
7255
  {
7256
7256
  ...Lt(T, c),
@@ -7260,7 +7260,7 @@ const Dv = /* @__PURE__ */ Xe(() => {
7260
7260
  type: _.type || "item",
7261
7261
  ..._.type === "group" ? {} : { groupIndex: _.groupIndex }
7262
7262
  }
7263
- ) : _.type === "group" ? /* @__PURE__ */ Zo(
7263
+ ) : _.type === "group" ? /* @__PURE__ */ Jo(
7264
7264
  k,
7265
7265
  {
7266
7266
  ...Lt(k, c),
@@ -7271,7 +7271,7 @@ const Dv = /* @__PURE__ */ Xe(() => {
7271
7271
  style: $v
7272
7272
  },
7273
7273
  d(_.index, c)
7274
- ) : /* @__PURE__ */ Zo(
7274
+ ) : /* @__PURE__ */ Jo(
7275
7275
  S,
7276
7276
  {
7277
7277
  ...Lt(S, c),
@@ -7542,7 +7542,7 @@ const Ec = {
7542
7542
  offsetBottom: 0,
7543
7543
  offsetTop: 0,
7544
7544
  top: 0
7545
- }, { ceil: Ic, floor: ys, max: lo, min: ji, round: Ac } = Math;
7545
+ }, { ceil: Ic, floor: xs, max: lo, min: ji, round: Ac } = Math;
7546
7546
  function Nc(e, t, n) {
7547
7547
  return Array.from({ length: t - e + 1 }).map((r, o) => ({ data: n === null ? null : n[o + e], index: o + e }));
7548
7548
  }
@@ -7552,7 +7552,7 @@ function rw(e) {
7552
7552
  items: e
7553
7553
  };
7554
7554
  }
7555
- function Uo(e, t) {
7555
+ function Ho(e, t) {
7556
7556
  return e && e.width === t.width && e.height === t.height;
7557
7557
  }
7558
7558
  function ow(e, t) {
@@ -7617,8 +7617,8 @@ const sw = /* @__PURE__ */ Xe(
7617
7617
  ), ve(
7618
7618
  q(
7619
7619
  St(
7620
- Ie(N, Uo),
7621
- Ie(j, Uo),
7620
+ Ie(N, Ho),
7621
+ Ie(j, Ho),
7622
7622
  Ie(D, (M, X) => M && M.column === X.column && M.row === X.row),
7623
7623
  Ie(c)
7624
7624
  ),
@@ -7636,8 +7636,8 @@ const sw = /* @__PURE__ */ Xe(
7636
7636
  Ie(S),
7637
7637
  r,
7638
7638
  Ie(D, ow),
7639
- Ie(j, Uo),
7640
- Ie(N, Uo),
7639
+ Ie(j, Ho),
7640
+ Ie(N, Ho),
7641
7641
  Ie(_),
7642
7642
  Ie(k),
7643
7643
  Ie(K),
@@ -7667,7 +7667,7 @@ const sw = /* @__PURE__ */ Xe(
7667
7667
  }
7668
7668
  const mt = Dd(Ct, bt, Pe);
7669
7669
  let se, be;
7670
- ct ? X === 0 && re === 0 && et > 0 ? (se = 0, be = et - 1) : (se = mt * ys((X + Le) / (Oe + Le)), be = mt * Ic((re + Le) / (Oe + Le)) - 1, be = ji(M - 1, lo(be, mt - 1)), se = ji(be, lo(0, se))) : (se = 0, be = -1);
7670
+ ct ? X === 0 && re === 0 && et > 0 ? (se = 0, be = et - 1) : (se = mt * xs((X + Le) / (Oe + Le)), be = mt * Ic((re + Le) / (Oe + Le)) - 1, be = ji(M - 1, lo(be, mt - 1)), se = ji(be, lo(0, se))) : (se = 0, be = -1);
7671
7671
  const we = Nc(se, be, Ye), { bottom: Ge, top: Fe } = _c(le, fe, oe, we), rt = Ic(M / mt), gt = rt * Oe + (rt - 1) * Le - Ge;
7672
7672
  return { bottom: Ge, itemHeight: Oe, items: we, itemWidth: bt, offsetBottom: gt, offsetTop: Fe, top: Fe };
7673
7673
  }
@@ -7803,10 +7803,10 @@ const sw = /* @__PURE__ */ Xe(
7803
7803
  ...C
7804
7804
  };
7805
7805
  },
7806
- dt(qa, $t, Po, kd, rr, Ga, nr)
7806
+ dt(qa, $t, jo, kd, rr, Ga, nr)
7807
7807
  );
7808
7808
  function Dd(e, t, n) {
7809
- return lo(1, ys((e + n) / (ys(t) + n)));
7809
+ return lo(1, xs((e + n) / (xs(t) + n)));
7810
7810
  }
7811
7811
  function _c(e, t, n, r) {
7812
7812
  const { height: o } = n;
@@ -7816,7 +7816,7 @@ function _c(e, t, n, r) {
7816
7816
  return { bottom: fa(e, t, n, r[r.length - 1].index) + o, top: s };
7817
7817
  }
7818
7818
  function fa(e, t, n, r) {
7819
- const o = Dd(e.width, n.width, t.column), s = ys(r / o), i = s * n.height + lo(0, s - 1) * t.row;
7819
+ const o = Dd(e.width, n.width, t.column), s = xs(r / o), i = s * n.height + lo(0, s - 1) * t.row;
7820
7820
  return i > 0 ? i + t.row : i;
7821
7821
  }
7822
7822
  const iw = /* @__PURE__ */ Xe(() => {
@@ -7891,7 +7891,7 @@ const iw = /* @__PURE__ */ Xe(() => {
7891
7891
  width: e.itemWidth
7892
7892
  },
7893
7893
  w
7894
- ) : /* @__PURE__ */ Zo(
7894
+ ) : /* @__PURE__ */ Jo(
7895
7895
  a,
7896
7896
  {
7897
7897
  ...Lt(a, d),
@@ -8217,19 +8217,19 @@ function Tw(e) {
8217
8217
  }
8218
8218
  });
8219
8219
  return g.useEffect(() => {
8220
- const c = Wo(r.current);
8220
+ const c = Uo(r.current);
8221
8221
  s.current = a === "mounted" ? c : "none";
8222
8222
  }, [a]), It(() => {
8223
8223
  const c = r.current, d = o.current;
8224
8224
  if (d !== e) {
8225
- const p = s.current, h = Wo(c);
8225
+ const p = s.current, h = Uo(c);
8226
8226
  e ? l("MOUNT") : h === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(d && p !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
8227
8227
  }
8228
8228
  }, [e, l]), It(() => {
8229
8229
  if (t) {
8230
8230
  let c;
8231
8231
  const d = t.ownerDocument.defaultView ?? window, f = (h) => {
8232
- const v = Wo(r.current).includes(CSS.escape(h.animationName));
8232
+ const v = Uo(r.current).includes(CSS.escape(h.animationName));
8233
8233
  if (h.target === t && v && (l("ANIMATION_END"), !o.current)) {
8234
8234
  const y = t.style.animationFillMode;
8235
8235
  t.style.animationFillMode = "forwards", c = d.setTimeout(() => {
@@ -8237,7 +8237,7 @@ function Tw(e) {
8237
8237
  });
8238
8238
  }
8239
8239
  }, p = (h) => {
8240
- h.target === t && (s.current = Wo(r.current));
8240
+ h.target === t && (s.current = Uo(r.current));
8241
8241
  };
8242
8242
  return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
8243
8243
  d.clearTimeout(c), t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
@@ -8251,7 +8251,7 @@ function Tw(e) {
8251
8251
  }, [])
8252
8252
  };
8253
8253
  }
8254
- function Wo(e) {
8254
+ function Uo(e) {
8255
8255
  return (e == null ? void 0 : e.animationName) || "none";
8256
8256
  }
8257
8257
  function kw(e) {
@@ -8267,7 +8267,7 @@ function On(e) {
8267
8267
  n((r) => r ?? String(Ew++));
8268
8268
  }, [e]), e || (t ? `radix-${t}` : "");
8269
8269
  }
8270
- var Ks = "Collapsible", [Iw, dR] = Fn(Ks), [Aw, Qa] = Iw(Ks), zd = g.forwardRef(
8270
+ var Ks = "Collapsible", [Iw, uR] = Fn(Ks), [Aw, Qa] = Iw(Ks), zd = g.forwardRef(
8271
8271
  (e, t) => {
8272
8272
  const {
8273
8273
  __scopeCollapsible: n,
@@ -8497,13 +8497,13 @@ function Mc(e, t, n) {
8497
8497
  }
8498
8498
  return n;
8499
8499
  }
8500
- const Vo = {}, Uw = /^[^:]+:\/*[^/]*$/, Ww = /^([^:]+:)[\s\S]*$/, Vw = /^([^:]+:\/*[^/]*)[\s\S]*$/;
8500
+ const Wo = {}, Uw = /^[^:]+:\/*[^/]*$/, Ww = /^([^:]+:)[\s\S]*$/, Vw = /^([^:]+:\/*[^/]*)[\s\S]*$/;
8501
8501
  function Kw(e, t) {
8502
- Vo[" " + e] || (Uw.test(e) ? Vo[" " + e] = e + "/" : Vo[" " + e] = is(e, "/", !0)), e = Vo[" " + e];
8502
+ Wo[" " + e] || (Uw.test(e) ? Wo[" " + e] = e + "/" : Wo[" " + e] = ss(e, "/", !0)), e = Wo[" " + e];
8503
8503
  const n = e.indexOf(":") === -1;
8504
8504
  return t.substring(0, 2) === "//" ? n ? t : e.replace(Ww, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(Vw, "$1") + t : e + t;
8505
8505
  }
8506
- const vs = { exec: function() {
8506
+ const ys = { exec: function() {
8507
8507
  } };
8508
8508
  function Dc(e, t) {
8509
8509
  const n = e.replace(/\|/g, (s, i, a) => {
@@ -8520,7 +8520,7 @@ function Dc(e, t) {
8520
8520
  r[o] = r[o].trim().replace(/\\\|/g, "|");
8521
8521
  return r;
8522
8522
  }
8523
- function is(e, t, n) {
8523
+ function ss(e, t, n) {
8524
8524
  const r = e.length;
8525
8525
  if (r === 0)
8526
8526
  return "";
@@ -8618,7 +8618,7 @@ class nl {
8618
8618
  type: "code",
8619
8619
  raw: n[0],
8620
8620
  codeBlockStyle: "indented",
8621
- text: this.options.pedantic ? r : is(r, `
8621
+ text: this.options.pedantic ? r : ss(r, `
8622
8622
  `)
8623
8623
  };
8624
8624
  }
@@ -8640,7 +8640,7 @@ class nl {
8640
8640
  if (n) {
8641
8641
  let r = n[2].trim();
8642
8642
  if (/#$/.test(r)) {
8643
- const o = is(r, "#");
8643
+ const o = ss(r, "#");
8644
8644
  (this.options.pedantic || !o || / $/.test(o)) && (r = o.trim());
8645
8645
  }
8646
8646
  return {
@@ -8847,7 +8847,7 @@ class nl {
8847
8847
  if (!this.options.pedantic && /^</.test(r)) {
8848
8848
  if (!/>$/.test(r))
8849
8849
  return;
8850
- const i = is(r.slice(0, -1), "\\");
8850
+ const i = ss(r.slice(0, -1), "\\");
8851
8851
  if ((r.length - i.length) % 2 === 0)
8852
8852
  return;
8853
8853
  } else {
@@ -9022,7 +9022,7 @@ const Ce = {
9022
9022
  list: /^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,
9023
9023
  html: "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",
9024
9024
  def: /^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,
9025
- table: vs,
9025
+ table: ys,
9026
9026
  lheading: /^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
9027
9027
  // regex template, placeholders will be replaced according to different paragraph
9028
9028
  // interruption rules of commonmark and the original markdown spec:
@@ -9055,7 +9055,7 @@ Ce.pedantic = {
9055
9055
  ).replace("comment", Ce._comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
9056
9056
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
9057
9057
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
9058
- fences: vs,
9058
+ fences: ys,
9059
9059
  // fences not supported
9060
9060
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
9061
9061
  paragraph: st(Ce.normal._paragraph).replace("hr", Ce.hr).replace("heading", ` *#{1,6} *[^
@@ -9064,7 +9064,7 @@ Ce.pedantic = {
9064
9064
  const me = {
9065
9065
  escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
9066
9066
  autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/,
9067
- url: vs,
9067
+ url: ys,
9068
9068
  tag: "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",
9069
9069
  // CDATA section
9070
9070
  link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,
@@ -9081,7 +9081,7 @@ const me = {
9081
9081
  },
9082
9082
  code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
9083
9083
  br: /^( {2,}|\\)\n(?!\s*$)/,
9084
- del: vs,
9084
+ del: ys,
9085
9085
  text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
9086
9086
  punctuation: /^([\spunctuation])/
9087
9087
  };
@@ -9756,7 +9756,7 @@ class Zn {
9756
9756
  return r;
9757
9757
  }
9758
9758
  }
9759
- class ws {
9759
+ class vs {
9760
9760
  constructor(t) {
9761
9761
  this.options = t || Rr;
9762
9762
  }
@@ -9773,7 +9773,7 @@ class ws {
9773
9773
  return t;
9774
9774
  }
9775
9775
  }
9776
- jl(ws, "passThroughHooks", /* @__PURE__ */ new Set([
9776
+ jl(vs, "passThroughHooks", /* @__PURE__ */ new Set([
9777
9777
  "preprocess",
9778
9778
  "postprocess"
9779
9779
  ]));
@@ -9904,10 +9904,10 @@ Se.use = function(...e) {
9904
9904
  r.tokenizer = o;
9905
9905
  }
9906
9906
  if (n.hooks) {
9907
- const o = Se.defaults.hooks || new ws();
9907
+ const o = Se.defaults.hooks || new vs();
9908
9908
  for (const s in n.hooks) {
9909
9909
  const i = o[s];
9910
- ws.passThroughHooks.has(s) ? o[s] = (a) => {
9910
+ vs.passThroughHooks.has(s) ? o[s] = (a) => {
9911
9911
  if (Se.defaults.async)
9912
9912
  return Promise.resolve(n.hooks[s].call(o, a)).then((c) => i.call(o, c));
9913
9913
  const l = n.hooks[s].call(o, a);
@@ -9961,7 +9961,7 @@ Se.Lexer = Jn;
9961
9961
  Se.lexer = Jn.lex;
9962
9962
  Se.Tokenizer = nl;
9963
9963
  Se.Slugger = Xd;
9964
- Se.Hooks = ws;
9964
+ Se.Hooks = vs;
9965
9965
  Se.parse = Se;
9966
9966
  Se.options;
9967
9967
  Se.setOptions;
@@ -10108,11 +10108,11 @@ const Oi = /* @__PURE__ */ new Map(), Bc = (e) => {
10108
10108
  toasts: e.toasts.filter((n) => n.id !== t.toastId)
10109
10109
  };
10110
10110
  }
10111
- }, as = [];
10112
- let ls = { toasts: [] };
10111
+ }, is = [];
10112
+ let as = { toasts: [] };
10113
10113
  function ho(e) {
10114
- ls = rb(ls, e), as.forEach((t) => {
10115
- t(ls);
10114
+ as = rb(as, e), is.forEach((t) => {
10115
+ t(as);
10116
10116
  });
10117
10117
  }
10118
10118
  function ob({ ...e }) {
@@ -10137,10 +10137,10 @@ function ob({ ...e }) {
10137
10137
  };
10138
10138
  }
10139
10139
  function ol() {
10140
- const [e, t] = g.useState(ls);
10141
- return g.useEffect(() => (as.push(t), () => {
10142
- const n = as.indexOf(t);
10143
- n > -1 && as.splice(n, 1);
10140
+ const [e, t] = g.useState(as);
10141
+ return g.useEffect(() => (is.push(t), () => {
10142
+ const n = is.indexOf(t);
10143
+ n > -1 && is.splice(n, 1);
10144
10144
  }), [e]), {
10145
10145
  ...e,
10146
10146
  toast: ob,
@@ -10453,7 +10453,7 @@ function bb(e, t, n) {
10453
10453
  (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
10454
10454
  return e.concat(s || Array.prototype.slice.call(t));
10455
10455
  }
10456
- var cs = "right-scroll-bar-position", us = "width-before-scroll-bar", Sb = "with-scroll-bars-hidden", Cb = "--removed-body-scroll-bar-size";
10456
+ var ls = "right-scroll-bar-position", cs = "width-before-scroll-bar", Sb = "with-scroll-bars-hidden", Cb = "--removed-body-scroll-bar-size";
10457
10457
  function Fi(e, t) {
10458
10458
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
10459
10459
  }
@@ -10594,8 +10594,8 @@ Xs.defaultProps = {
10594
10594
  inert: !1
10595
10595
  };
10596
10596
  Xs.classNames = {
10597
- fullWidth: us,
10598
- zeroRight: cs
10597
+ fullWidth: cs,
10598
+ zeroRight: ls
10599
10599
  };
10600
10600
  var _b = function() {
10601
10601
  if (typeof __webpack_nonce__ < "u")
@@ -10685,19 +10685,19 @@ var Mb = function() {
10685
10685
  ].filter(Boolean).join(""), `
10686
10686
  }
10687
10687
 
10688
- .`).concat(cs, ` {
10688
+ .`).concat(ls, ` {
10689
10689
  right: `).concat(a, "px ").concat(r, `;
10690
10690
  }
10691
10691
 
10692
- .`).concat(us, ` {
10692
+ .`).concat(cs, ` {
10693
10693
  margin-right: `).concat(a, "px ").concat(r, `;
10694
10694
  }
10695
10695
 
10696
- .`).concat(cs, " .").concat(cs, ` {
10696
+ .`).concat(ls, " .").concat(ls, ` {
10697
10697
  right: 0 `).concat(r, `;
10698
10698
  }
10699
10699
 
10700
- .`).concat(us, " .").concat(us, ` {
10700
+ .`).concat(cs, " .").concat(cs, ` {
10701
10701
  margin-right: 0 `).concat(r, `;
10702
10702
  }
10703
10703
 
@@ -10725,12 +10725,12 @@ var Mb = function() {
10725
10725
  }, ha = !1;
10726
10726
  if (typeof window < "u")
10727
10727
  try {
10728
- var Ko = Object.defineProperty({}, "passive", {
10728
+ var Vo = Object.defineProperty({}, "passive", {
10729
10729
  get: function() {
10730
10730
  return ha = !0, !0;
10731
10731
  }
10732
10732
  });
10733
- window.addEventListener("test", Ko, Ko), window.removeEventListener("test", Ko, Ko);
10733
+ window.addEventListener("test", Vo, Vo), window.removeEventListener("test", Vo, Vo);
10734
10734
  } catch {
10735
10735
  ha = !1;
10736
10736
  }
@@ -10797,7 +10797,7 @@ var _r = ha ? { passive: !1 } : !1, Wb = function(e) {
10797
10797
  l && (t.contains(a) || t === a)
10798
10798
  );
10799
10799
  return (d && Math.abs(f) < 1 || !d && Math.abs(p) < 1) && (c = !0), c;
10800
- }, qo = function(e) {
10800
+ }, Ko = function(e) {
10801
10801
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
10802
10802
  }, Zc = function(e) {
10803
10803
  return [e.deltaX, e.deltaY];
@@ -10831,7 +10831,7 @@ function e0(e) {
10831
10831
  var a = g.useCallback(function(v, y) {
10832
10832
  if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
10833
10833
  return !i.current.allowPinchZoom;
10834
- var x = qo(v), w = n.current, b = "deltaX" in v ? v.deltaX : w[0] - x[0], T = "deltaY" in v ? v.deltaY : w[1] - x[1], C, S = v.target, k = Math.abs(b) > Math.abs(T) ? "h" : "v";
10834
+ var x = Ko(v), w = n.current, b = "deltaX" in v ? v.deltaX : w[0] - x[0], T = "deltaY" in v ? v.deltaY : w[1] - x[1], C, S = v.target, k = Math.abs(b) > Math.abs(T) ? "h" : "v";
10835
10835
  if ("touches" in v && k === "h" && S.type === "range")
10836
10836
  return !1;
10837
10837
  var A = Jc(k, S);
@@ -10846,7 +10846,7 @@ function e0(e) {
10846
10846
  }, []), l = g.useCallback(function(v) {
10847
10847
  var y = v;
10848
10848
  if (!(!jr.length || jr[jr.length - 1] !== s)) {
10849
- var x = "deltaY" in y ? Zc(y) : qo(y), w = t.current.filter(function(C) {
10849
+ var x = "deltaY" in y ? Zc(y) : Ko(y), w = t.current.filter(function(C) {
10850
10850
  return C.name === y.type && (C.target === y.target || y.target === C.shadowParent) && Jb(C.delta, x);
10851
10851
  })[0];
10852
10852
  if (w && w.should) {
@@ -10868,11 +10868,11 @@ function e0(e) {
10868
10868
  });
10869
10869
  }, 1);
10870
10870
  }, []), d = g.useCallback(function(v) {
10871
- n.current = qo(v), r.current = void 0;
10871
+ n.current = Ko(v), r.current = void 0;
10872
10872
  }, []), f = g.useCallback(function(v) {
10873
10873
  c(v.type, Zc(v), v.target, a(v, e.lockRef.current));
10874
10874
  }, []), p = g.useCallback(function(v) {
10875
- c(v.type, qo(v), v.target, a(v, e.lockRef.current));
10875
+ c(v.type, Ko(v), v.target, a(v, e.lockRef.current));
10876
10876
  }, []);
10877
10877
  g.useEffect(function() {
10878
10878
  return jr.push(s), e.setCallbacks({
@@ -10908,7 +10908,7 @@ var r0 = function(e) {
10908
10908
  return null;
10909
10909
  var t = Array.isArray(e) ? e[0] : e;
10910
10910
  return t.ownerDocument.body;
10911
- }, Pr = /* @__PURE__ */ new WeakMap(), Go = /* @__PURE__ */ new WeakMap(), Yo = {}, Bi = 0, df = function(e) {
10911
+ }, Pr = /* @__PURE__ */ new WeakMap(), qo = /* @__PURE__ */ new WeakMap(), Go = {}, Bi = 0, df = function(e) {
10912
10912
  return e && (e.host || df(e.parentNode));
10913
10913
  }, o0 = function(e, t) {
10914
10914
  return t.map(function(n) {
@@ -10921,8 +10921,8 @@ var r0 = function(e) {
10921
10921
  });
10922
10922
  }, s0 = function(e, t, n, r) {
10923
10923
  var o = o0(t, Array.isArray(e) ? e : [e]);
10924
- Yo[n] || (Yo[n] = /* @__PURE__ */ new WeakMap());
10925
- var s = Yo[n], i = [], a = /* @__PURE__ */ new Set(), l = new Set(o), c = function(f) {
10924
+ Go[n] || (Go[n] = /* @__PURE__ */ new WeakMap());
10925
+ var s = Go[n], i = [], a = /* @__PURE__ */ new Set(), l = new Set(o), c = function(f) {
10926
10926
  !f || a.has(f) || (a.add(f), c(f.parentNode));
10927
10927
  };
10928
10928
  o.forEach(c);
@@ -10933,7 +10933,7 @@ var r0 = function(e) {
10933
10933
  else
10934
10934
  try {
10935
10935
  var h = p.getAttribute(r), m = h !== null && h !== "false", v = (Pr.get(p) || 0) + 1, y = (s.get(p) || 0) + 1;
10936
- Pr.set(p, v), s.set(p, y), i.push(p), v === 1 && m && Go.set(p, !0), y === 1 && p.setAttribute(n, "true"), m || p.setAttribute(r, "true");
10936
+ Pr.set(p, v), s.set(p, y), i.push(p), v === 1 && m && qo.set(p, !0), y === 1 && p.setAttribute(n, "true"), m || p.setAttribute(r, "true");
10937
10937
  } catch (x) {
10938
10938
  console.error("aria-hidden: cannot operate on ", p, x);
10939
10939
  }
@@ -10942,8 +10942,8 @@ var r0 = function(e) {
10942
10942
  return d(t), a.clear(), Bi++, function() {
10943
10943
  i.forEach(function(f) {
10944
10944
  var p = Pr.get(f) - 1, h = s.get(f) - 1;
10945
- Pr.set(f, p), s.set(f, h), p || (Go.has(f) || f.removeAttribute(r), Go.delete(f)), h || f.removeAttribute(n);
10946
- }), Bi--, Bi || (Pr = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakMap(), Go = /* @__PURE__ */ new WeakMap(), Yo = {});
10945
+ Pr.set(f, p), s.set(f, h), p || (qo.has(f) || f.removeAttribute(r), qo.delete(f)), h || f.removeAttribute(n);
10946
+ }), Bi--, Bi || (Pr = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakMap(), qo = /* @__PURE__ */ new WeakMap(), Go = {});
10947
10947
  };
10948
10948
  }, il = function(e, t, n) {
10949
10949
  n === void 0 && (n = "data-aria-hidden");
@@ -10951,7 +10951,7 @@ var r0 = function(e) {
10951
10951
  return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), s0(r, o, n, "aria-hidden")) : function() {
10952
10952
  return null;
10953
10953
  };
10954
- }, Zs = "Dialog", [ff, fR] = Fn(Zs), [i0, vn] = ff(Zs), pf = (e) => {
10954
+ }, Zs = "Dialog", [ff, dR] = Fn(Zs), [i0, vn] = ff(Zs), pf = (e) => {
10955
10955
  const {
10956
10956
  __scopeDialog: t,
10957
10957
  children: n,
@@ -11009,16 +11009,16 @@ var al = "DialogPortal", [a0, gf] = ff(al, {
11009
11009
  return /* @__PURE__ */ u.jsx(a0, { scope: t, forceMount: n, children: g.Children.map(r, (i) => /* @__PURE__ */ u.jsx(Zt, { present: n || s.open, children: /* @__PURE__ */ u.jsx(Ys, { asChild: !0, container: o, children: i }) })) });
11010
11010
  };
11011
11011
  xf.displayName = al;
11012
- var bs = "DialogOverlay", yf = g.forwardRef(
11012
+ var ws = "DialogOverlay", yf = g.forwardRef(
11013
11013
  (e, t) => {
11014
- const n = gf(bs, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = vn(bs, e.__scopeDialog);
11014
+ const n = gf(ws, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = vn(ws, e.__scopeDialog);
11015
11015
  return s.modal ? /* @__PURE__ */ u.jsx(Zt, { present: r || s.open, children: /* @__PURE__ */ u.jsx(c0, { ...o, ref: t }) }) : null;
11016
11016
  }
11017
11017
  );
11018
- yf.displayName = bs;
11018
+ yf.displayName = ws;
11019
11019
  var l0 = $r("DialogOverlay.RemoveScroll"), c0 = g.forwardRef(
11020
11020
  (e, t) => {
11021
- const { __scopeDialog: n, ...r } = e, o = vn(bs, n);
11021
+ const { __scopeDialog: n, ...r } = e, o = vn(ws, n);
11022
11022
  return (
11023
11023
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
11024
11024
  // ie. when `Overlay` and `Content` are siblings
@@ -11156,7 +11156,7 @@ kf.displayName = Tf;
11156
11156
  function cl(e) {
11157
11157
  return e ? "open" : "closed";
11158
11158
  }
11159
- var Rf = "DialogTitleWarning", [pR, Ef] = xw(Rf, {
11159
+ var Rf = "DialogTitleWarning", [fR, Ef] = xw(Rf, {
11160
11160
  contentName: wr,
11161
11161
  titleName: ll,
11162
11162
  docsSlug: "dialog"
@@ -11428,7 +11428,7 @@ function wo(e) {
11428
11428
  }
11429
11429
  return e;
11430
11430
  }
11431
- function bo(e) {
11431
+ function bs(e) {
11432
11432
  if (typeof e == "string") return e;
11433
11433
  if (Df(e)) return "";
11434
11434
  try {
@@ -11449,23 +11449,12 @@ function Lf(e) {
11449
11449
  toolCallId: (n == null ? void 0 : n.toolCallId) ?? (t == null ? void 0 : t.id)
11450
11450
  };
11451
11451
  }
11452
- function S0(e) {
11453
- const t = e.filter((r) => r.type === "tool_call");
11454
- return e.filter((r) => r.type === "tool_end").map((r) => {
11455
- var o;
11456
- return {
11457
- name: (o = t.find((s) => s.id === r.toolCallId)) == null ? void 0 : o.name,
11458
- toolCallId: r.toolCallId,
11459
- output: r.output
11460
- };
11461
- });
11462
- }
11463
- function Xo(e) {
11452
+ function Yo(e) {
11464
11453
  if (e == null) return null;
11465
11454
  const t = String(e).trim();
11466
11455
  return t.length > 0 ? t : null;
11467
11456
  }
11468
- function C0(e) {
11457
+ function S0(e) {
11469
11458
  const t = (o) => {
11470
11459
  try {
11471
11460
  const s = wo(o);
@@ -11485,7 +11474,7 @@ function C0(e) {
11485
11474
  r = t(e);
11486
11475
  return r || "";
11487
11476
  }
11488
- function T0(e) {
11477
+ function C0(e) {
11489
11478
  return e.name && e.name.trim() ? e.name : e.model && e.model.includes("/") ? e.model.split("/").pop() || null : e.model || null;
11490
11479
  }
11491
11480
  function eu(e) {
@@ -11507,7 +11496,7 @@ function eu(e) {
11507
11496
  }).join("|") : "";
11508
11497
  return `${e.id}:${t}:${n}`;
11509
11498
  }
11510
- function k0({ className: e }) {
11499
+ function T0({ className: e }) {
11511
11500
  const [t, n] = ye(0);
11512
11501
  return at(() => {
11513
11502
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
@@ -11524,7 +11513,7 @@ function k0({ className: e }) {
11524
11513
  }
11525
11514
  );
11526
11515
  }
11527
- const R0 = V.memo(function({
11516
+ const k0 = V.memo(function({
11528
11517
  message: t,
11529
11518
  messageIndex: n,
11530
11519
  isStreamingMessage: r = !1,
@@ -11552,7 +11541,7 @@ const R0 = V.memo(function({
11552
11541
  fileViewerOpen: z,
11553
11542
  currentFileInfo: G,
11554
11543
  closeFileViewer: Q
11555
- } = I0({ allowFileOpen: U, currentThreadId: $ }), ae = V.useMemo(() => {
11544
+ } = E0({ allowFileOpen: U, currentThreadId: $ }), ae = V.useMemo(() => {
11556
11545
  switch (_) {
11557
11546
  case "user":
11558
11547
  return "text-[hsl(var(--chat-bubble-user-text))]";
@@ -11574,7 +11563,7 @@ const R0 = V.memo(function({
11574
11563
  ), W = lt(
11575
11564
  () => t.content.filter((se) => se.type === "interrupt"),
11576
11565
  [t.content]
11577
- ), M = (x == null ? void 0 : x.id) ?? (x == null ? void 0 : x.interrupt_id), X = Xo(M), re = x == null ? void 0 : x.value, fe = lt(() => C0(t.content), [t.content]), oe = V.useCallback(async () => {
11566
+ ), M = (x == null ? void 0 : x.id) ?? (x == null ? void 0 : x.interrupt_id), X = Yo(M), re = x == null ? void 0 : x.value, fe = lt(() => S0(t.content), [t.content]), oe = V.useCallback(async () => {
11578
11567
  const se = D ? fe : B;
11579
11568
  async function be(we) {
11580
11569
  if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
@@ -11662,7 +11651,7 @@ const R0 = V.memo(function({
11662
11651
  }, [O, _]), Pe = V.useCallback(async (se) => {
11663
11652
  if (w)
11664
11653
  return;
11665
- const be = Xo(
11654
+ const be = Yo(
11666
11655
  (se == null ? void 0 : se.id) ?? (se == null ? void 0 : se.interrupt_id)
11667
11656
  );
11668
11657
  if (!be) {
@@ -11679,7 +11668,7 @@ const R0 = V.memo(function({
11679
11668
  }, [w, T, b, L]), Le = V.useCallback(async (se) => {
11680
11669
  if (w)
11681
11670
  return;
11682
- const be = Xo(
11671
+ const be = Yo(
11683
11672
  (se == null ? void 0 : se.id) ?? (se == null ? void 0 : se.interrupt_id)
11684
11673
  );
11685
11674
  if (!be) {
@@ -11697,7 +11686,7 @@ const R0 = V.memo(function({
11697
11686
  if (se.type === "text") {
11698
11687
  const we = se.text ?? "", Ge = we.trim(), Fe = Mf(Ge);
11699
11688
  return Fe && _ !== "tool" ? /* @__PURE__ */ u.jsx(Ff, { data: Fe }, be) : _ === "user" && c && Ge.length > d ? /* @__PURE__ */ u.jsx(
11700
- A0,
11689
+ I0,
11701
11690
  {
11702
11691
  text: Ge,
11703
11692
  expanded: N,
@@ -11741,11 +11730,11 @@ const R0 = V.memo(function({
11741
11730
  );
11742
11731
  }
11743
11732
  if (se.type === "interrupt") {
11744
- const we = se, Ge = Xo(
11733
+ const we = se, Ge = Yo(
11745
11734
  (we == null ? void 0 : we.id) ?? (we == null ? void 0 : we.interrupt_id)
11746
11735
  ), Fe = !!(X && Ge && Ge === X), rt = Fe ? re ?? (we == null ? void 0 : we.value) : we == null ? void 0 : we.value, gt = Ge ? { ...we, id: Ge, interrupt_id: Ge } : we;
11747
11736
  return /* @__PURE__ */ u.jsx(
11748
- E0,
11737
+ R0,
11749
11738
  {
11750
11739
  interruptPart: gt,
11751
11740
  onApprove: Pe,
@@ -11782,7 +11771,7 @@ const R0 = V.memo(function({
11782
11771
  return bt();
11783
11772
  if (D)
11784
11773
  return /* @__PURE__ */ u.jsx(
11785
- N0,
11774
+ A0,
11786
11775
  {
11787
11776
  message: t,
11788
11777
  viewMode: k
@@ -11793,7 +11782,7 @@ const R0 = V.memo(function({
11793
11782
  const be = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: t.content.map((we, Ge) => /* @__PURE__ */ u.jsx(Oe, { part: we, i: Ge }, Ge)) });
11794
11783
  return r ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
11795
11784
  be,
11796
- /* @__PURE__ */ u.jsx(k0, { className: ae })
11785
+ /* @__PURE__ */ u.jsx(T0, { className: ae })
11797
11786
  ] }) : be;
11798
11787
  }
11799
11788
  }, [
@@ -11806,7 +11795,7 @@ const R0 = V.memo(function({
11806
11795
  k,
11807
11796
  bt,
11808
11797
  ae
11809
- ]), mt = lt(() => T0(t), [t]);
11798
+ ]), mt = lt(() => C0(t), [t]);
11810
11799
  return D && !f ? null : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
11811
11800
  /* @__PURE__ */ u.jsx("div", { className: ie(ct(), p.container), children: /* @__PURE__ */ u.jsxs("div", { className: ie(it(), p.content), children: [
11812
11801
  (i || a || D) && /* @__PURE__ */ u.jsxs(
@@ -11988,9 +11977,9 @@ const R0 = V.memo(function({
11988
11977
  return o && s;
11989
11978
  });
11990
11979
  function Ff({ data: e }) {
11991
- return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: w0, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: bo(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: bo(e) });
11980
+ return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: w0, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: bs(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: bs(e) });
11992
11981
  }
11993
- function E0({
11982
+ function R0({
11994
11983
  interruptPart: e,
11995
11984
  onApprove: t,
11996
11985
  onReject: n,
@@ -12004,7 +11993,7 @@ function E0({
12004
11993
  if (typeof s == "string")
12005
11994
  a = /* @__PURE__ */ u.jsx("p", { className: "text-sm leading-relaxed text-blue-800/90 dark:text-blue-200/90 whitespace-pre-wrap", children: s });
12006
11995
  else {
12007
- const c = bo(s);
11996
+ const c = bs(s);
12008
11997
  a = /* @__PURE__ */ u.jsx("pre", { className: "max-h-48 overflow-auto rounded bg-blue-100/60 p-2 text-xs text-blue-900/90 dark:bg-blue-900/40 dark:text-blue-100/80", children: c });
12009
11998
  }
12010
11999
  const l = o ? "Please approve or reject this action to resume the workflow." : "Waiting for approval from another participant.";
@@ -12048,7 +12037,7 @@ function E0({
12048
12037
  }
12049
12038
  );
12050
12039
  }
12051
- function I0(e) {
12040
+ function E0(e) {
12052
12041
  const { allowFileOpen: t, currentThreadId: n } = e, { toast: r } = ol(), [o, s] = ye({}), [i, a] = ye(null), [l, c] = ye(!1), d = V.useCallback(() => {
12053
12042
  c(!1), a(null);
12054
12043
  }, []), f = V.useCallback((h) => {
@@ -12120,7 +12109,7 @@ function I0(e) {
12120
12109
  closeFileViewer: d
12121
12110
  };
12122
12111
  }
12123
- function A0({
12112
+ function I0({
12124
12113
  text: e,
12125
12114
  expanded: t,
12126
12115
  onExpandedChange: n,
@@ -12152,43 +12141,39 @@ function A0({
12152
12141
  ] }) }) })
12153
12142
  ] });
12154
12143
  }
12155
- function N0({ message: e, viewMode: t }) {
12156
- const n = Lf(e.content), r = S0(e.content), o = r.length > 0, s = n.name || "tool", i = (a) => {
12144
+ function A0({ message: e, viewMode: t }) {
12145
+ const r = Lf(e.content).name || "tool", o = (a) => {
12146
+ if (a == null) return null;
12157
12147
  const l = typeof a == "string" ? Mf(a) ?? a : a;
12158
- if (l !== null && typeof l == "object")
12148
+ if (l && typeof l == "object")
12159
12149
  return /* @__PURE__ */ u.jsx(Ff, { data: l });
12160
- const d = typeof l == "string" ? l : (() => {
12150
+ const c = typeof l == "string" ? l : (() => {
12161
12151
  try {
12162
- return bo(l);
12152
+ return bs(l);
12163
12153
  } catch {
12164
12154
  return String(l ?? "");
12165
12155
  }
12166
12156
  })();
12167
- return /* @__PURE__ */ u.jsx("pre", { className: "whitespace-pre-wrap break-words font-mono text-sm mt-1", children: d });
12157
+ return /* @__PURE__ */ u.jsx("pre", { className: "whitespace-pre-wrap break-words font-sans text-sm text-foreground/90", children: c });
12168
12158
  };
12169
- if (!o)
12159
+ if (t === "preview")
12160
+ return null;
12161
+ const s = e.content.find((a) => a.type !== "tool_call");
12162
+ if (!s)
12170
12163
  return /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
12171
12164
  /* @__PURE__ */ u.jsx(Aa, { className: "h-4 w-4 animate-spin" }),
12172
12165
  /* @__PURE__ */ u.jsxs("span", { children: [
12173
- "Running ",
12174
- s,
12175
- "..."
12166
+ "Waiting for ",
12167
+ r,
12168
+ " output…"
12176
12169
  ] })
12177
12170
  ] });
12178
- if (t === "preview") {
12179
- const a = r[r.length - 1], l = wo(a.output), c = typeof l == "string" ? l : (() => {
12180
- try {
12181
- return bo(l);
12182
- } catch {
12183
- return JSON.stringify(l);
12184
- }
12185
- })(), d = c.length > 240 ? `${c.slice(0, 240)}...` : c;
12186
- return /* @__PURE__ */ u.jsx("pre", { className: "whitespace-pre-wrap break-words font-sans text-sm text-foreground/90", children: d });
12171
+ if (s.type === "text") {
12172
+ const l = (s.text ?? "").trim();
12173
+ return l ? o(l) : null;
12187
12174
  }
12188
- return /* @__PURE__ */ u.jsx("div", { className: "space-y-3", children: r.map((a, l) => {
12189
- const c = i(a.output);
12190
- return /* @__PURE__ */ u.jsx("div", { className: "space-y-1", children: c }, a.toolCallId ?? l);
12191
- }) });
12175
+ const i = wo(s);
12176
+ return o(i);
12192
12177
  }
12193
12178
  const tu = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, $f = V.forwardRef(({
12194
12179
  messages: e,
@@ -12291,7 +12276,7 @@ const tu = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, $f = V.forwa
12291
12276
  containIntrinsicSize: "auto 120px"
12292
12277
  },
12293
12278
  children: /* @__PURE__ */ u.jsx(
12294
- R0,
12279
+ k0,
12295
12280
  {
12296
12281
  message: Q,
12297
12282
  messageIndex: G,
@@ -12319,8 +12304,8 @@ const tu = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, $f = V.forwa
12319
12304
  ) });
12320
12305
  });
12321
12306
  $f.displayName = "MessageList";
12322
- const ds = 1e4;
12323
- function _0(e) {
12307
+ const us = 1e4;
12308
+ function N0(e) {
12324
12309
  if (typeof e != "string")
12325
12310
  return String(e);
12326
12311
  const t = [
@@ -12347,16 +12332,16 @@ function _0(e) {
12347
12332
  `).replace(/<li>(.*?)<\/li>/gi, `- $1
12348
12333
  `).trim() : n.replace(/</g, "&lt;").replace(/>/g, "&gt;").trim();
12349
12334
  }
12350
- function j0(e, t = ds) {
12335
+ function _0(e, t = us) {
12351
12336
  if (!e || typeof e != "string")
12352
12337
  throw new Error("Invalid content: must be a non-empty string");
12353
12338
  if (e.length > t)
12354
12339
  throw new Error(`Message exceeds maximum length of ${t} characters`);
12355
12340
  return e;
12356
12341
  }
12357
- function P0(e) {
12342
+ function j0(e) {
12358
12343
  let t;
12359
- return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), j0(t), _0(t);
12344
+ return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), _0(t), N0(t);
12360
12345
  }
12361
12346
  function ul(e) {
12362
12347
  const t = e + "CollectionProvider", [n, r] = Fn(t), [o, s] = n(
@@ -12398,20 +12383,20 @@ function ul(e) {
12398
12383
  r
12399
12384
  ];
12400
12385
  }
12401
- var O0 = g.createContext(void 0);
12386
+ var P0 = g.createContext(void 0);
12402
12387
  function ni(e) {
12403
- const t = g.useContext(O0);
12388
+ const t = g.useContext(P0);
12404
12389
  return e || t || "ltr";
12405
12390
  }
12406
- const M0 = ["top", "right", "bottom", "left"], Qn = Math.min, Gt = Math.max, Ss = Math.round, Jo = Math.floor, Mn = (e) => ({
12391
+ const O0 = ["top", "right", "bottom", "left"], Qn = Math.min, Gt = Math.max, Ss = Math.round, Xo = Math.floor, Mn = (e) => ({
12407
12392
  x: e,
12408
12393
  y: e
12409
- }), D0 = {
12394
+ }), M0 = {
12410
12395
  left: "right",
12411
12396
  right: "left",
12412
12397
  bottom: "top",
12413
12398
  top: "bottom"
12414
- }, L0 = {
12399
+ }, D0 = {
12415
12400
  start: "end",
12416
12401
  end: "start"
12417
12402
  };
@@ -12433,48 +12418,48 @@ function dl(e) {
12433
12418
  function fl(e) {
12434
12419
  return e === "y" ? "height" : "width";
12435
12420
  }
12436
- const F0 = /* @__PURE__ */ new Set(["top", "bottom"]);
12421
+ const L0 = /* @__PURE__ */ new Set(["top", "bottom"]);
12437
12422
  function Pn(e) {
12438
- return F0.has(Vn(e)) ? "y" : "x";
12423
+ return L0.has(Vn(e)) ? "y" : "x";
12439
12424
  }
12440
12425
  function pl(e) {
12441
12426
  return dl(Pn(e));
12442
12427
  }
12443
- function $0(e, t, n) {
12428
+ function F0(e, t, n) {
12444
12429
  n === void 0 && (n = !1);
12445
12430
  const r = qr(e), o = pl(e), s = fl(o);
12446
12431
  let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
12447
12432
  return t.reference[s] > t.floating[s] && (i = Cs(i)), [i, Cs(i)];
12448
12433
  }
12449
- function z0(e) {
12434
+ function $0(e) {
12450
12435
  const t = Cs(e);
12451
12436
  return [ga(e), t, ga(t)];
12452
12437
  }
12453
12438
  function ga(e) {
12454
- return e.replace(/start|end/g, (t) => L0[t]);
12439
+ return e.replace(/start|end/g, (t) => D0[t]);
12455
12440
  }
12456
- const nu = ["left", "right"], ru = ["right", "left"], B0 = ["top", "bottom"], H0 = ["bottom", "top"];
12457
- function U0(e, t, n) {
12441
+ const nu = ["left", "right"], ru = ["right", "left"], z0 = ["top", "bottom"], B0 = ["bottom", "top"];
12442
+ function H0(e, t, n) {
12458
12443
  switch (e) {
12459
12444
  case "top":
12460
12445
  case "bottom":
12461
12446
  return n ? t ? ru : nu : t ? nu : ru;
12462
12447
  case "left":
12463
12448
  case "right":
12464
- return t ? B0 : H0;
12449
+ return t ? z0 : B0;
12465
12450
  default:
12466
12451
  return [];
12467
12452
  }
12468
12453
  }
12469
- function W0(e, t, n, r) {
12454
+ function U0(e, t, n, r) {
12470
12455
  const o = qr(e);
12471
- let s = U0(Vn(e), n === "start", r);
12456
+ let s = H0(Vn(e), n === "start", r);
12472
12457
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(ga)))), s;
12473
12458
  }
12474
12459
  function Cs(e) {
12475
- return e.replace(/left|right|bottom|top/g, (t) => D0[t]);
12460
+ return e.replace(/left|right|bottom|top/g, (t) => M0[t]);
12476
12461
  }
12477
- function V0(e) {
12462
+ function W0(e) {
12478
12463
  return {
12479
12464
  top: 0,
12480
12465
  right: 0,
@@ -12484,7 +12469,7 @@ function V0(e) {
12484
12469
  };
12485
12470
  }
12486
12471
  function zf(e) {
12487
- return typeof e != "number" ? V0(e) : {
12472
+ return typeof e != "number" ? W0(e) : {
12488
12473
  top: e,
12489
12474
  right: e,
12490
12475
  bottom: e,
@@ -12557,7 +12542,7 @@ function ou(e, t, n) {
12557
12542
  }
12558
12543
  return h;
12559
12544
  }
12560
- const K0 = async (e, t, n) => {
12545
+ const V0 = async (e, t, n) => {
12561
12546
  const {
12562
12547
  placement: r = "bottom",
12563
12548
  strategy: o = "absolute",
@@ -12618,7 +12603,7 @@ const K0 = async (e, t, n) => {
12618
12603
  middlewareData: h
12619
12604
  };
12620
12605
  };
12621
- async function So(e, t) {
12606
+ async function bo(e, t) {
12622
12607
  var n;
12623
12608
  t === void 0 && (t = {});
12624
12609
  const {
@@ -12663,7 +12648,7 @@ async function So(e, t) {
12663
12648
  right: (C.right - x.right + m.right) / T.x
12664
12649
  };
12665
12650
  }
12666
- const q0 = (e) => ({
12651
+ const K0 = (e) => ({
12667
12652
  name: "arrow",
12668
12653
  options: e,
12669
12654
  async fn(t) {
@@ -12700,7 +12685,7 @@ const q0 = (e) => ({
12700
12685
  reset: U
12701
12686
  };
12702
12687
  }
12703
- }), G0 = function(e) {
12688
+ }), q0 = function(e) {
12704
12689
  return e === void 0 && (e = {}), {
12705
12690
  name: "flip",
12706
12691
  options: e,
@@ -12724,12 +12709,12 @@ const q0 = (e) => ({
12724
12709
  } = Wn(e, t);
12725
12710
  if ((n = s.arrow) != null && n.alignmentOffset)
12726
12711
  return {};
12727
- const x = Vn(o), w = Pn(a), b = Vn(a) === a, T = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), C = p || (b || !v ? [Cs(a)] : z0(a)), S = m !== "none";
12728
- !p && S && C.push(...W0(a, v, m, T));
12729
- const k = [a, ...C], A = await So(t, y), N = [];
12712
+ const x = Vn(o), w = Pn(a), b = Vn(a) === a, T = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), C = p || (b || !v ? [Cs(a)] : $0(a)), S = m !== "none";
12713
+ !p && S && C.push(...U0(a, v, m, T));
12714
+ const k = [a, ...C], A = await bo(t, y), N = [];
12730
12715
  let j = ((r = s.flip) == null ? void 0 : r.overflows) || [];
12731
12716
  if (d && N.push(A[x]), f) {
12732
- const _ = $0(o, i, T);
12717
+ const _ = F0(o, i, T);
12733
12718
  N.push(A[_[0]], A[_[1]]);
12734
12719
  }
12735
12720
  if (j = [...j, {
@@ -12791,9 +12776,9 @@ function su(e, t) {
12791
12776
  };
12792
12777
  }
12793
12778
  function iu(e) {
12794
- return M0.some((t) => e[t] >= 0);
12779
+ return O0.some((t) => e[t] >= 0);
12795
12780
  }
12796
- const Y0 = function(e) {
12781
+ const G0 = function(e) {
12797
12782
  return e === void 0 && (e = {}), {
12798
12783
  name: "hide",
12799
12784
  options: e,
@@ -12806,7 +12791,7 @@ const Y0 = function(e) {
12806
12791
  } = Wn(e, t);
12807
12792
  switch (r) {
12808
12793
  case "referenceHidden": {
12809
- const s = await So(t, {
12794
+ const s = await bo(t, {
12810
12795
  ...o,
12811
12796
  elementContext: "reference"
12812
12797
  }), i = su(s, n.reference);
@@ -12818,7 +12803,7 @@ const Y0 = function(e) {
12818
12803
  };
12819
12804
  }
12820
12805
  case "escaped": {
12821
- const s = await So(t, {
12806
+ const s = await bo(t, {
12822
12807
  ...o,
12823
12808
  altBoundary: !0
12824
12809
  }), i = su(s, n.floating);
@@ -12835,7 +12820,7 @@ const Y0 = function(e) {
12835
12820
  }
12836
12821
  };
12837
12822
  }, Bf = /* @__PURE__ */ new Set(["left", "top"]);
12838
- async function X0(e, t) {
12823
+ async function Y0(e, t) {
12839
12824
  const {
12840
12825
  placement: n,
12841
12826
  platform: r,
@@ -12862,7 +12847,7 @@ async function X0(e, t) {
12862
12847
  y: h * d
12863
12848
  };
12864
12849
  }
12865
- const J0 = function(e) {
12850
+ const X0 = function(e) {
12866
12851
  return e === void 0 && (e = 0), {
12867
12852
  name: "offset",
12868
12853
  options: e,
@@ -12873,7 +12858,7 @@ const J0 = function(e) {
12873
12858
  y: s,
12874
12859
  placement: i,
12875
12860
  middlewareData: a
12876
- } = t, l = await X0(t, e);
12861
+ } = t, l = await Y0(t, e);
12877
12862
  return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
12878
12863
  x: o + l.x,
12879
12864
  y: s + l.y,
@@ -12884,7 +12869,7 @@ const J0 = function(e) {
12884
12869
  };
12885
12870
  }
12886
12871
  };
12887
- }, Z0 = function(e) {
12872
+ }, J0 = function(e) {
12888
12873
  return e === void 0 && (e = {}), {
12889
12874
  name: "shift",
12890
12875
  options: e,
@@ -12912,7 +12897,7 @@ const J0 = function(e) {
12912
12897
  } = Wn(e, t), c = {
12913
12898
  x: n,
12914
12899
  y: r
12915
- }, d = await So(t, l), f = Pn(Vn(o)), p = dl(f);
12900
+ }, d = await bo(t, l), f = Pn(Vn(o)), p = dl(f);
12916
12901
  let h = c[p], m = c[f];
12917
12902
  if (s) {
12918
12903
  const y = p === "y" ? "top" : "left", x = p === "y" ? "bottom" : "right", w = h + d[y], b = h - d[x];
@@ -12940,7 +12925,7 @@ const J0 = function(e) {
12940
12925
  };
12941
12926
  }
12942
12927
  };
12943
- }, Q0 = function(e) {
12928
+ }, Z0 = function(e) {
12944
12929
  return e === void 0 && (e = {}), {
12945
12930
  options: e,
12946
12931
  fn(t) {
@@ -12982,7 +12967,7 @@ const J0 = function(e) {
12982
12967
  };
12983
12968
  }
12984
12969
  };
12985
- }, eS = function(e) {
12970
+ }, Q0 = function(e) {
12986
12971
  return e === void 0 && (e = {}), {
12987
12972
  name: "size",
12988
12973
  options: e,
@@ -12997,7 +12982,7 @@ const J0 = function(e) {
12997
12982
  apply: l = () => {
12998
12983
  },
12999
12984
  ...c
13000
- } = Wn(e, t), d = await So(t, c), f = Vn(o), p = qr(o), h = Pn(o) === "y", {
12985
+ } = Wn(e, t), d = await bo(t, c), f = Vn(o), p = qr(o), h = Pn(o) === "y", {
13001
12986
  width: m,
13002
12987
  height: v
13003
12988
  } = s.floating;
@@ -13049,23 +13034,23 @@ function Dn(e) {
13049
13034
  function au(e) {
13050
13035
  return !ri() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Jt(e).ShadowRoot;
13051
13036
  }
13052
- const tS = /* @__PURE__ */ new Set(["inline", "contents"]);
13053
- function Oo(e) {
13037
+ const eS = /* @__PURE__ */ new Set(["inline", "contents"]);
13038
+ function Po(e) {
13054
13039
  const {
13055
13040
  overflow: t,
13056
13041
  overflowX: n,
13057
13042
  overflowY: r,
13058
13043
  display: o
13059
13044
  } = xn(e);
13060
- return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !tS.has(o);
13045
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !eS.has(o);
13061
13046
  }
13062
- const nS = /* @__PURE__ */ new Set(["table", "td", "th"]);
13063
- function rS(e) {
13064
- return nS.has(Gr(e));
13047
+ const tS = /* @__PURE__ */ new Set(["table", "td", "th"]);
13048
+ function nS(e) {
13049
+ return tS.has(Gr(e));
13065
13050
  }
13066
- const oS = [":popover-open", ":modal"];
13051
+ const rS = [":popover-open", ":modal"];
13067
13052
  function oi(e) {
13068
- return oS.some((t) => {
13053
+ return rS.some((t) => {
13069
13054
  try {
13070
13055
  return e.matches(t);
13071
13056
  } catch {
@@ -13073,12 +13058,12 @@ function oi(e) {
13073
13058
  }
13074
13059
  });
13075
13060
  }
13076
- const sS = ["transform", "translate", "scale", "rotate", "perspective"], iS = ["transform", "translate", "scale", "rotate", "perspective", "filter"], aS = ["paint", "layout", "strict", "content"];
13061
+ const oS = ["transform", "translate", "scale", "rotate", "perspective"], sS = ["transform", "translate", "scale", "rotate", "perspective", "filter"], iS = ["paint", "layout", "strict", "content"];
13077
13062
  function hl(e) {
13078
13063
  const t = ml(), n = gn(e) ? xn(e) : e;
13079
- return sS.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || iS.some((r) => (n.willChange || "").includes(r)) || aS.some((r) => (n.contain || "").includes(r));
13064
+ return oS.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || sS.some((r) => (n.willChange || "").includes(r)) || iS.some((r) => (n.contain || "").includes(r));
13080
13065
  }
13081
- function lS(e) {
13066
+ function aS(e) {
13082
13067
  let t = er(e);
13083
13068
  for (; Dn(t) && !Br(t); ) {
13084
13069
  if (hl(t))
@@ -13092,9 +13077,9 @@ function lS(e) {
13092
13077
  function ml() {
13093
13078
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
13094
13079
  }
13095
- const cS = /* @__PURE__ */ new Set(["html", "body", "#document"]);
13080
+ const lS = /* @__PURE__ */ new Set(["html", "body", "#document"]);
13096
13081
  function Br(e) {
13097
- return cS.has(Gr(e));
13082
+ return lS.has(Gr(e));
13098
13083
  }
13099
13084
  function xn(e) {
13100
13085
  return Jt(e).getComputedStyle(e);
@@ -13122,17 +13107,17 @@ function er(e) {
13122
13107
  }
13123
13108
  function Uf(e) {
13124
13109
  const t = er(e);
13125
- return Br(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Dn(t) && Oo(t) ? t : Uf(t);
13110
+ return Br(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Dn(t) && Po(t) ? t : Uf(t);
13126
13111
  }
13127
- function Co(e, t, n) {
13112
+ function So(e, t, n) {
13128
13113
  var r;
13129
13114
  t === void 0 && (t = []), n === void 0 && (n = !0);
13130
13115
  const o = Uf(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Jt(o);
13131
13116
  if (s) {
13132
13117
  const a = xa(i);
13133
- return t.concat(i, i.visualViewport || [], Oo(o) ? o : [], a && n ? Co(a) : []);
13118
+ return t.concat(i, i.visualViewport || [], Po(o) ? o : [], a && n ? So(a) : []);
13134
13119
  }
13135
- return t.concat(o, Co(o, [], n));
13120
+ return t.concat(o, So(o, [], n));
13136
13121
  }
13137
13122
  function xa(e) {
13138
13123
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
@@ -13165,15 +13150,15 @@ function Lr(e) {
13165
13150
  y: a
13166
13151
  };
13167
13152
  }
13168
- const uS = /* @__PURE__ */ Mn(0);
13153
+ const cS = /* @__PURE__ */ Mn(0);
13169
13154
  function Vf(e) {
13170
13155
  const t = Jt(e);
13171
- return !ml() || !t.visualViewport ? uS : {
13156
+ return !ml() || !t.visualViewport ? cS : {
13172
13157
  x: t.visualViewport.offsetLeft,
13173
13158
  y: t.visualViewport.offsetTop
13174
13159
  };
13175
13160
  }
13176
- function dS(e, t, n) {
13161
+ function uS(e, t, n) {
13177
13162
  return t === void 0 && (t = !1), !n || t && n !== Jt(e) ? !1 : t;
13178
13163
  }
13179
13164
  function br(e, t, n, r) {
@@ -13181,7 +13166,7 @@ function br(e, t, n, r) {
13181
13166
  const o = e.getBoundingClientRect(), s = gl(e);
13182
13167
  let i = Mn(1);
13183
13168
  t && (r ? gn(r) && (i = Lr(r)) : i = Lr(e));
13184
- const a = dS(s, n, r) ? Vf(s) : Mn(0);
13169
+ const a = uS(s, n, r) ? Vf(s) : Mn(0);
13185
13170
  let l = (o.left + a.x) / i.x, c = (o.top + a.y) / i.y, d = o.width / i.x, f = o.height / i.y;
13186
13171
  if (s) {
13187
13172
  const p = Jt(s), h = r && gn(r) ? Jt(r) : r;
@@ -13209,7 +13194,7 @@ function Kf(e, t) {
13209
13194
  y: o
13210
13195
  };
13211
13196
  }
13212
- function fS(e) {
13197
+ function dS(e) {
13213
13198
  let {
13214
13199
  elements: t,
13215
13200
  rect: n,
@@ -13224,7 +13209,7 @@ function fS(e) {
13224
13209
  scrollTop: 0
13225
13210
  }, c = Mn(1);
13226
13211
  const d = Mn(0), f = Dn(r);
13227
- if ((f || !f && !s) && ((Gr(r) !== "body" || Oo(i)) && (l = si(r)), Dn(r))) {
13212
+ if ((f || !f && !s) && ((Gr(r) !== "body" || Po(i)) && (l = si(r)), Dn(r))) {
13228
13213
  const h = br(r);
13229
13214
  c = Lr(r), d.x = h.x + r.clientLeft, d.y = h.y + r.clientTop;
13230
13215
  }
@@ -13236,10 +13221,10 @@ function fS(e) {
13236
13221
  y: n.y * c.y - l.scrollTop * c.y + d.y + p.y
13237
13222
  };
13238
13223
  }
13239
- function pS(e) {
13224
+ function fS(e) {
13240
13225
  return Array.from(e.getClientRects());
13241
13226
  }
13242
- function hS(e) {
13227
+ function pS(e) {
13243
13228
  const t = $n(e), n = si(e), r = e.ownerDocument.body, o = Gt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = Gt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
13244
13229
  let i = -n.scrollLeft + ii(e);
13245
13230
  const a = -n.scrollTop;
@@ -13251,7 +13236,7 @@ function hS(e) {
13251
13236
  };
13252
13237
  }
13253
13238
  const lu = 25;
13254
- function mS(e, t) {
13239
+ function hS(e, t) {
13255
13240
  const n = Jt(e), r = $n(e), o = n.visualViewport;
13256
13241
  let s = r.clientWidth, i = r.clientHeight, a = 0, l = 0;
13257
13242
  if (o) {
@@ -13271,8 +13256,8 @@ function mS(e, t) {
13271
13256
  y: l
13272
13257
  };
13273
13258
  }
13274
- const gS = /* @__PURE__ */ new Set(["absolute", "fixed"]);
13275
- function xS(e, t) {
13259
+ const mS = /* @__PURE__ */ new Set(["absolute", "fixed"]);
13260
+ function gS(e, t) {
13276
13261
  const n = br(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Dn(e) ? Lr(e) : Mn(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, c = r * s.y;
13277
13262
  return {
13278
13263
  width: i,
@@ -13284,11 +13269,11 @@ function xS(e, t) {
13284
13269
  function cu(e, t, n) {
13285
13270
  let r;
13286
13271
  if (t === "viewport")
13287
- r = mS(e, n);
13272
+ r = hS(e, n);
13288
13273
  else if (t === "document")
13289
- r = hS($n(e));
13274
+ r = pS($n(e));
13290
13275
  else if (gn(t))
13291
- r = xS(t, n);
13276
+ r = gS(t, n);
13292
13277
  else {
13293
13278
  const o = Vf(e);
13294
13279
  r = {
@@ -13304,27 +13289,27 @@ function qf(e, t) {
13304
13289
  const n = er(e);
13305
13290
  return n === t || !gn(n) || Br(n) ? !1 : xn(n).position === "fixed" || qf(n, t);
13306
13291
  }
13307
- function yS(e, t) {
13292
+ function xS(e, t) {
13308
13293
  const n = t.get(e);
13309
13294
  if (n)
13310
13295
  return n;
13311
- let r = Co(e, [], !1).filter((a) => gn(a) && Gr(a) !== "body"), o = null;
13296
+ let r = So(e, [], !1).filter((a) => gn(a) && Gr(a) !== "body"), o = null;
13312
13297
  const s = xn(e).position === "fixed";
13313
13298
  let i = s ? er(e) : e;
13314
13299
  for (; gn(i) && !Br(i); ) {
13315
13300
  const a = xn(i), l = hl(i);
13316
- !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && gS.has(o.position) || Oo(i) && !l && qf(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = er(i);
13301
+ !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && mS.has(o.position) || Po(i) && !l && qf(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = er(i);
13317
13302
  }
13318
13303
  return t.set(e, r), r;
13319
13304
  }
13320
- function vS(e) {
13305
+ function yS(e) {
13321
13306
  let {
13322
13307
  element: t,
13323
13308
  boundary: n,
13324
13309
  rootBoundary: r,
13325
13310
  strategy: o
13326
13311
  } = e;
13327
- const i = [...n === "clippingAncestors" ? oi(t) ? [] : yS(t, this._c) : [].concat(n), r], a = i[0], l = i.reduce((c, d) => {
13312
+ const i = [...n === "clippingAncestors" ? oi(t) ? [] : xS(t, this._c) : [].concat(n), r], a = i[0], l = i.reduce((c, d) => {
13328
13313
  const f = cu(t, d, o);
13329
13314
  return c.top = Gt(f.top, c.top), c.right = Qn(f.right, c.right), c.bottom = Qn(f.bottom, c.bottom), c.left = Gt(f.left, c.left), c;
13330
13315
  }, cu(t, a, o));
@@ -13335,7 +13320,7 @@ function vS(e) {
13335
13320
  y: l.top
13336
13321
  };
13337
13322
  }
13338
- function wS(e) {
13323
+ function vS(e) {
13339
13324
  const {
13340
13325
  width: t,
13341
13326
  height: n
@@ -13345,7 +13330,7 @@ function wS(e) {
13345
13330
  height: n
13346
13331
  };
13347
13332
  }
13348
- function bS(e, t, n) {
13333
+ function wS(e, t, n) {
13349
13334
  const r = Dn(t), o = $n(t), s = n === "fixed", i = br(e, !0, s, t);
13350
13335
  let a = {
13351
13336
  scrollLeft: 0,
@@ -13356,7 +13341,7 @@ function bS(e, t, n) {
13356
13341
  l.x = ii(o);
13357
13342
  }
13358
13343
  if (r || !r && !s)
13359
- if ((Gr(t) !== "body" || Oo(o)) && (a = si(t)), r) {
13344
+ if ((Gr(t) !== "body" || Po(o)) && (a = si(t)), r) {
13360
13345
  const h = br(t, !0, s, t);
13361
13346
  l.x = h.x + t.clientLeft, l.y = h.y + t.clientTop;
13362
13347
  } else o && c();
@@ -13394,14 +13379,14 @@ function Gf(e, t) {
13394
13379
  return n;
13395
13380
  }
13396
13381
  let r = uu(e, t);
13397
- for (; r && rS(r) && Hi(r); )
13382
+ for (; r && nS(r) && Hi(r); )
13398
13383
  r = uu(r, t);
13399
- return r && Br(r) && Hi(r) && !hl(r) ? n : r || lS(e) || n;
13384
+ return r && Br(r) && Hi(r) && !hl(r) ? n : r || aS(e) || n;
13400
13385
  }
13401
- const SS = async function(e) {
13386
+ const bS = async function(e) {
13402
13387
  const t = this.getOffsetParent || Gf, n = this.getDimensions, r = await n(e.floating);
13403
13388
  return {
13404
- reference: bS(e.reference, await t(e.floating), e.strategy),
13389
+ reference: wS(e.reference, await t(e.floating), e.strategy),
13405
13390
  floating: {
13406
13391
  x: 0,
13407
13392
  y: 0,
@@ -13410,25 +13395,25 @@ const SS = async function(e) {
13410
13395
  }
13411
13396
  };
13412
13397
  };
13413
- function CS(e) {
13398
+ function SS(e) {
13414
13399
  return xn(e).direction === "rtl";
13415
13400
  }
13416
- const TS = {
13417
- convertOffsetParentRelativeRectToViewportRelativeRect: fS,
13401
+ const CS = {
13402
+ convertOffsetParentRelativeRectToViewportRelativeRect: dS,
13418
13403
  getDocumentElement: $n,
13419
- getClippingRect: vS,
13404
+ getClippingRect: yS,
13420
13405
  getOffsetParent: Gf,
13421
- getElementRects: SS,
13422
- getClientRects: pS,
13423
- getDimensions: wS,
13406
+ getElementRects: bS,
13407
+ getClientRects: fS,
13408
+ getDimensions: vS,
13424
13409
  getScale: Lr,
13425
13410
  isElement: gn,
13426
- isRTL: CS
13411
+ isRTL: SS
13427
13412
  };
13428
13413
  function Yf(e, t) {
13429
13414
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
13430
13415
  }
13431
- function kS(e, t) {
13416
+ function TS(e, t) {
13432
13417
  let n = null, r;
13433
13418
  const o = $n(e);
13434
13419
  function s() {
@@ -13445,7 +13430,7 @@ function kS(e, t) {
13445
13430
  } = c;
13446
13431
  if (a || t(), !p || !h)
13447
13432
  return;
13448
- const m = Jo(f), v = Jo(o.clientWidth - (d + p)), y = Jo(o.clientHeight - (f + h)), x = Jo(d), b = {
13433
+ const m = Xo(f), v = Xo(o.clientWidth - (d + p)), y = Xo(o.clientHeight - (f + h)), x = Xo(d), b = {
13449
13434
  rootMargin: -m + "px " + -v + "px " + -y + "px " + -x + "px",
13450
13435
  threshold: Gt(0, Qn(1, l)) || 1
13451
13436
  };
@@ -13474,7 +13459,7 @@ function kS(e, t) {
13474
13459
  }
13475
13460
  return i(!0), s;
13476
13461
  }
13477
- function RS(e, t, n, r) {
13462
+ function kS(e, t, n, r) {
13478
13463
  r === void 0 && (r = {});
13479
13464
  const {
13480
13465
  ancestorScroll: o = !0,
@@ -13482,13 +13467,13 @@ function RS(e, t, n, r) {
13482
13467
  elementResize: i = typeof ResizeObserver == "function",
13483
13468
  layoutShift: a = typeof IntersectionObserver == "function",
13484
13469
  animationFrame: l = !1
13485
- } = r, c = gl(e), d = o || s ? [...c ? Co(c) : [], ...Co(t)] : [];
13470
+ } = r, c = gl(e), d = o || s ? [...c ? So(c) : [], ...So(t)] : [];
13486
13471
  d.forEach((x) => {
13487
13472
  o && x.addEventListener("scroll", n, {
13488
13473
  passive: !0
13489
13474
  }), s && x.addEventListener("resize", n);
13490
13475
  });
13491
- const f = c && a ? kS(c, n) : null;
13476
+ const f = c && a ? TS(c, n) : null;
13492
13477
  let p = -1, h = null;
13493
13478
  i && (h = new ResizeObserver((x) => {
13494
13479
  let [w] = x;
@@ -13510,21 +13495,21 @@ function RS(e, t, n, r) {
13510
13495
  }), f == null || f(), (x = h) == null || x.disconnect(), h = null, l && cancelAnimationFrame(m);
13511
13496
  };
13512
13497
  }
13513
- const ES = J0, IS = Z0, AS = G0, NS = eS, _S = Y0, du = q0, jS = Q0, PS = (e, t, n) => {
13498
+ const RS = X0, ES = J0, IS = q0, AS = Q0, NS = G0, du = K0, _S = Z0, jS = (e, t, n) => {
13514
13499
  const r = /* @__PURE__ */ new Map(), o = {
13515
- platform: TS,
13500
+ platform: CS,
13516
13501
  ...n
13517
13502
  }, s = {
13518
13503
  ...o.platform,
13519
13504
  _c: r
13520
13505
  };
13521
- return K0(e, t, {
13506
+ return V0(e, t, {
13522
13507
  ...o,
13523
13508
  platform: s
13524
13509
  });
13525
13510
  };
13526
- var OS = typeof document < "u", MS = function() {
13527
- }, fs = OS ? Mm : MS;
13511
+ var PS = typeof document < "u", OS = function() {
13512
+ }, ds = PS ? Mm : OS;
13528
13513
  function ks(e, t) {
13529
13514
  if (e === t)
13530
13515
  return !0;
@@ -13564,11 +13549,11 @@ function fu(e, t) {
13564
13549
  }
13565
13550
  function Ui(e) {
13566
13551
  const t = g.useRef(e);
13567
- return fs(() => {
13552
+ return ds(() => {
13568
13553
  t.current = e;
13569
13554
  }), t;
13570
13555
  }
13571
- function DS(e) {
13556
+ function MS(e) {
13572
13557
  e === void 0 && (e = {});
13573
13558
  const {
13574
13559
  placement: t = "bottom",
@@ -13603,7 +13588,7 @@ function DS(e) {
13603
13588
  strategy: n,
13604
13589
  middleware: p
13605
13590
  };
13606
- $.current && (K.platform = $.current), PS(S.current, k.current, K).then((z) => {
13591
+ $.current && (K.platform = $.current), jS(S.current, k.current, K).then((z) => {
13607
13592
  const G = {
13608
13593
  ...z,
13609
13594
  // The floating element's position may be recomputed while it's closed
@@ -13617,16 +13602,16 @@ function DS(e) {
13617
13602
  }));
13618
13603
  });
13619
13604
  }, [p, t, n, $, L]);
13620
- fs(() => {
13605
+ ds(() => {
13621
13606
  c === !1 && A.current.isPositioned && (A.current.isPositioned = !1, f((K) => ({
13622
13607
  ...K,
13623
13608
  isPositioned: !1
13624
13609
  })));
13625
13610
  }, [c]);
13626
13611
  const _ = g.useRef(!1);
13627
- fs(() => (_.current = !0, () => {
13612
+ ds(() => (_.current = !0, () => {
13628
13613
  _.current = !1;
13629
- }), []), fs(() => {
13614
+ }), []), ds(() => {
13630
13615
  if (T && (S.current = T), C && (k.current = C), T && C) {
13631
13616
  if (j.current)
13632
13617
  return j.current(T, C, O);
@@ -13670,7 +13655,7 @@ function DS(e) {
13670
13655
  floatingStyles: ne
13671
13656
  }), [d, O, D, U, ne]);
13672
13657
  }
13673
- const LS = (e) => {
13658
+ const DS = (e) => {
13674
13659
  function t(n) {
13675
13660
  return {}.hasOwnProperty.call(n, "current");
13676
13661
  }
@@ -13691,14 +13676,17 @@ const LS = (e) => {
13691
13676
  }).fn(n) : {};
13692
13677
  }
13693
13678
  };
13694
- }, FS = (e, t) => ({
13679
+ }, LS = (e, t) => ({
13680
+ ...RS(e),
13681
+ options: [e, t]
13682
+ }), FS = (e, t) => ({
13695
13683
  ...ES(e),
13696
13684
  options: [e, t]
13697
13685
  }), $S = (e, t) => ({
13698
- ...IS(e),
13686
+ ..._S(e),
13699
13687
  options: [e, t]
13700
13688
  }), zS = (e, t) => ({
13701
- ...jS(e),
13689
+ ...IS(e),
13702
13690
  options: [e, t]
13703
13691
  }), BS = (e, t) => ({
13704
13692
  ...AS(e),
@@ -13707,13 +13695,10 @@ const LS = (e) => {
13707
13695
  ...NS(e),
13708
13696
  options: [e, t]
13709
13697
  }), US = (e, t) => ({
13710
- ..._S(e),
13711
- options: [e, t]
13712
- }), WS = (e, t) => ({
13713
- ...LS(e),
13698
+ ...DS(e),
13714
13699
  options: [e, t]
13715
13700
  });
13716
- var VS = "Arrow", Jf = g.forwardRef((e, t) => {
13701
+ var WS = "Arrow", Jf = g.forwardRef((e, t) => {
13717
13702
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
13718
13703
  return /* @__PURE__ */ u.jsx(
13719
13704
  Ne.svg,
@@ -13728,8 +13713,8 @@ var VS = "Arrow", Jf = g.forwardRef((e, t) => {
13728
13713
  }
13729
13714
  );
13730
13715
  });
13731
- Jf.displayName = VS;
13732
- var KS = Jf;
13716
+ Jf.displayName = WS;
13717
+ var VS = Jf;
13733
13718
  function Zf(e) {
13734
13719
  const [t, n] = g.useState(void 0);
13735
13720
  return It(() => {
@@ -13752,9 +13737,9 @@ function Zf(e) {
13752
13737
  n(void 0);
13753
13738
  }, [e]), t;
13754
13739
  }
13755
- var xl = "Popper", [Qf, ai] = Fn(xl), [qS, ep] = Qf(xl), tp = (e) => {
13740
+ var xl = "Popper", [Qf, ai] = Fn(xl), [KS, ep] = Qf(xl), tp = (e) => {
13756
13741
  const { __scopePopper: t, children: n } = e, [r, o] = g.useState(null);
13757
- return /* @__PURE__ */ u.jsx(qS, { scope: t, anchor: r, onAnchorChange: o, children: n });
13742
+ return /* @__PURE__ */ u.jsx(KS, { scope: t, anchor: r, onAnchorChange: o, children: n });
13758
13743
  };
13759
13744
  tp.displayName = xl;
13760
13745
  var np = "PopperAnchor", rp = g.forwardRef(
@@ -13767,7 +13752,7 @@ var np = "PopperAnchor", rp = g.forwardRef(
13767
13752
  }
13768
13753
  );
13769
13754
  rp.displayName = np;
13770
- var yl = "PopperContent", [GS, YS] = Qf(yl), op = g.forwardRef(
13755
+ var yl = "PopperContent", [qS, GS] = Qf(yl), op = g.forwardRef(
13771
13756
  (e, t) => {
13772
13757
  var W, M, X, re, fe, oe;
13773
13758
  const {
@@ -13787,38 +13772,38 @@ var yl = "PopperContent", [GS, YS] = Qf(yl), op = g.forwardRef(
13787
13772
  ...v
13788
13773
  } = e, y = ep(yl, n), [x, w] = g.useState(null), b = Ve(t, (le) => w(le)), [T, C] = g.useState(null), S = Zf(T), k = (S == null ? void 0 : S.width) ?? 0, A = (S == null ? void 0 : S.height) ?? 0, N = r + (s !== "center" ? "-" + s : ""), j = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], L = $.length > 0, O = {
13789
13774
  padding: j,
13790
- boundary: $.filter(JS),
13775
+ boundary: $.filter(XS),
13791
13776
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
13792
13777
  altBoundary: L
13793
- }, { refs: _, floatingStyles: D, placement: U, isPositioned: ne, middlewareData: K } = DS({
13778
+ }, { refs: _, floatingStyles: D, placement: U, isPositioned: ne, middlewareData: K } = MS({
13794
13779
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
13795
13780
  strategy: "fixed",
13796
13781
  placement: N,
13797
- whileElementsMounted: (...le) => RS(...le, {
13782
+ whileElementsMounted: (...le) => kS(...le, {
13798
13783
  animationFrame: h === "always"
13799
13784
  }),
13800
13785
  elements: {
13801
13786
  reference: y.anchor
13802
13787
  },
13803
13788
  middleware: [
13804
- FS({ mainAxis: o + A, alignmentAxis: i }),
13805
- l && $S({
13789
+ LS({ mainAxis: o + A, alignmentAxis: i }),
13790
+ l && FS({
13806
13791
  mainAxis: !0,
13807
13792
  crossAxis: !1,
13808
- limiter: f === "partial" ? zS() : void 0,
13793
+ limiter: f === "partial" ? $S() : void 0,
13809
13794
  ...O
13810
13795
  }),
13811
- l && BS({ ...O }),
13812
- HS({
13796
+ l && zS({ ...O }),
13797
+ BS({
13813
13798
  ...O,
13814
13799
  apply: ({ elements: le, rects: Ye, availableWidth: et, availableHeight: ct }) => {
13815
13800
  const { width: it, height: Pe } = Ye.reference, Le = le.floating.style;
13816
13801
  Le.setProperty("--radix-popper-available-width", `${et}px`), Le.setProperty("--radix-popper-available-height", `${ct}px`), Le.setProperty("--radix-popper-anchor-width", `${it}px`), Le.setProperty("--radix-popper-anchor-height", `${Pe}px`);
13817
13802
  }
13818
13803
  }),
13819
- T && WS({ element: T, padding: a }),
13820
- ZS({ arrowWidth: k, arrowHeight: A }),
13821
- p && US({ strategy: "referenceHidden", ...O })
13804
+ T && US({ element: T, padding: a }),
13805
+ JS({ arrowWidth: k, arrowHeight: A }),
13806
+ p && HS({ strategy: "referenceHidden", ...O })
13822
13807
  ]
13823
13808
  }), [z, G] = ap(U), Q = jt(m);
13824
13809
  It(() => {
@@ -13852,7 +13837,7 @@ var yl = "PopperContent", [GS, YS] = Qf(yl), op = g.forwardRef(
13852
13837
  },
13853
13838
  dir: e.dir,
13854
13839
  children: /* @__PURE__ */ u.jsx(
13855
- GS,
13840
+ qS,
13856
13841
  {
13857
13842
  scope: n,
13858
13843
  placedSide: z,
@@ -13882,13 +13867,13 @@ var yl = "PopperContent", [GS, YS] = Qf(yl), op = g.forwardRef(
13882
13867
  }
13883
13868
  );
13884
13869
  op.displayName = yl;
13885
- var sp = "PopperArrow", XS = {
13870
+ var sp = "PopperArrow", YS = {
13886
13871
  top: "bottom",
13887
13872
  right: "left",
13888
13873
  bottom: "top",
13889
13874
  left: "right"
13890
13875
  }, ip = g.forwardRef(function(t, n) {
13891
- const { __scopePopper: r, ...o } = t, s = YS(sp, r), i = XS[s.placedSide];
13876
+ const { __scopePopper: r, ...o } = t, s = GS(sp, r), i = YS[s.placedSide];
13892
13877
  return (
13893
13878
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
13894
13879
  // doesn't report size as we'd expect on SVG elements.
@@ -13917,7 +13902,7 @@ var sp = "PopperArrow", XS = {
13917
13902
  visibility: s.shouldHideArrow ? "hidden" : void 0
13918
13903
  },
13919
13904
  children: /* @__PURE__ */ u.jsx(
13920
- KS,
13905
+ VS,
13921
13906
  {
13922
13907
  ...o,
13923
13908
  ref: n,
@@ -13933,10 +13918,10 @@ var sp = "PopperArrow", XS = {
13933
13918
  );
13934
13919
  });
13935
13920
  ip.displayName = sp;
13936
- function JS(e) {
13921
+ function XS(e) {
13937
13922
  return e !== null;
13938
13923
  }
13939
- var ZS = (e) => ({
13924
+ var JS = (e) => ({
13940
13925
  name: "transformOrigin",
13941
13926
  options: e,
13942
13927
  fn(t) {
@@ -13950,14 +13935,14 @@ function ap(e) {
13950
13935
  const [t, n = "center"] = e.split("-");
13951
13936
  return [t, n];
13952
13937
  }
13953
- var lp = tp, cp = rp, up = op, dp = ip, Wi = "rovingFocusGroup.onEntryFocus", QS = { bubbles: !1, cancelable: !0 }, Mo = "RovingFocusGroup", [ya, fp, eC] = ul(Mo), [tC, pp] = Fn(
13954
- Mo,
13955
- [eC]
13956
- ), [nC, rC] = tC(Mo), hp = g.forwardRef(
13957
- (e, t) => /* @__PURE__ */ u.jsx(ya.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(ya.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(oC, { ...e, ref: t }) }) })
13938
+ var lp = tp, cp = rp, up = op, dp = ip, Wi = "rovingFocusGroup.onEntryFocus", ZS = { bubbles: !1, cancelable: !0 }, Oo = "RovingFocusGroup", [ya, fp, QS] = ul(Oo), [eC, pp] = Fn(
13939
+ Oo,
13940
+ [QS]
13941
+ ), [tC, nC] = eC(Oo), hp = g.forwardRef(
13942
+ (e, t) => /* @__PURE__ */ u.jsx(ya.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(ya.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(rC, { ...e, ref: t }) }) })
13958
13943
  );
13959
- hp.displayName = Mo;
13960
- var oC = g.forwardRef((e, t) => {
13944
+ hp.displayName = Oo;
13945
+ var rC = g.forwardRef((e, t) => {
13961
13946
  const {
13962
13947
  __scopeRovingFocusGroup: n,
13963
13948
  orientation: r,
@@ -13973,14 +13958,14 @@ var oC = g.forwardRef((e, t) => {
13973
13958
  prop: i,
13974
13959
  defaultProp: a ?? null,
13975
13960
  onChange: l,
13976
- caller: Mo
13961
+ caller: Oo
13977
13962
  }), [x, w] = g.useState(!1), b = jt(c), T = fp(n), C = g.useRef(!1), [S, k] = g.useState(0);
13978
13963
  return g.useEffect(() => {
13979
13964
  const A = p.current;
13980
13965
  if (A)
13981
13966
  return A.addEventListener(Wi, b), () => A.removeEventListener(Wi, b);
13982
13967
  }, [b]), /* @__PURE__ */ u.jsx(
13983
- nC,
13968
+ tC,
13984
13969
  {
13985
13970
  scope: n,
13986
13971
  orientation: r,
@@ -14014,7 +13999,7 @@ var oC = g.forwardRef((e, t) => {
14014
13999
  onFocus: ge(e.onFocus, (A) => {
14015
14000
  const N = !C.current;
14016
14001
  if (A.target === A.currentTarget && N && !x) {
14017
- const j = new CustomEvent(Wi, QS);
14002
+ const j = new CustomEvent(Wi, ZS);
14018
14003
  if (A.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
14019
14004
  const $ = T().filter((U) => U.focusable), L = $.find((U) => U.active), O = $.find((U) => U.id === v), D = [L, O, ...$].filter(
14020
14005
  Boolean
@@ -14038,7 +14023,7 @@ var oC = g.forwardRef((e, t) => {
14038
14023
  tabStopId: s,
14039
14024
  children: i,
14040
14025
  ...a
14041
- } = e, l = On(), c = s || l, d = rC(mp, n), f = d.currentTabStopId === c, p = fp(n), { onFocusableItemAdd: h, onFocusableItemRemove: m, currentTabStopId: v } = d;
14026
+ } = e, l = On(), c = s || l, d = nC(mp, n), f = d.currentTabStopId === c, p = fp(n), { onFocusableItemAdd: h, onFocusableItemRemove: m, currentTabStopId: v } = d;
14042
14027
  return g.useEffect(() => {
14043
14028
  if (r)
14044
14029
  return h(), () => m();
@@ -14066,7 +14051,7 @@ var oC = g.forwardRef((e, t) => {
14066
14051
  return;
14067
14052
  }
14068
14053
  if (y.target !== y.currentTarget) return;
14069
- const x = aC(y, d.orientation, d.dir);
14054
+ const x = iC(y, d.orientation, d.dir);
14070
14055
  if (x !== void 0) {
14071
14056
  if (y.metaKey || y.ctrlKey || y.altKey || y.shiftKey) return;
14072
14057
  y.preventDefault();
@@ -14075,7 +14060,7 @@ var oC = g.forwardRef((e, t) => {
14075
14060
  else if (x === "prev" || x === "next") {
14076
14061
  x === "prev" && b.reverse();
14077
14062
  const T = b.indexOf(y.currentTarget);
14078
- b = d.loop ? lC(b, T + 1) : b.slice(T + 1);
14063
+ b = d.loop ? aC(b, T + 1) : b.slice(T + 1);
14079
14064
  }
14080
14065
  setTimeout(() => xp(b));
14081
14066
  }
@@ -14088,7 +14073,7 @@ var oC = g.forwardRef((e, t) => {
14088
14073
  }
14089
14074
  );
14090
14075
  gp.displayName = mp;
14091
- var sC = {
14076
+ var oC = {
14092
14077
  ArrowLeft: "prev",
14093
14078
  ArrowUp: "prev",
14094
14079
  ArrowRight: "next",
@@ -14098,33 +14083,33 @@ var sC = {
14098
14083
  PageDown: "last",
14099
14084
  End: "last"
14100
14085
  };
14101
- function iC(e, t) {
14086
+ function sC(e, t) {
14102
14087
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
14103
14088
  }
14104
- function aC(e, t, n) {
14105
- const r = iC(e.key, n);
14089
+ function iC(e, t, n) {
14090
+ const r = sC(e.key, n);
14106
14091
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
14107
- return sC[r];
14092
+ return oC[r];
14108
14093
  }
14109
14094
  function xp(e, t = !1) {
14110
14095
  const n = document.activeElement;
14111
14096
  for (const r of e)
14112
14097
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
14113
14098
  }
14114
- function lC(e, t) {
14099
+ function aC(e, t) {
14115
14100
  return e.map((n, r) => e[(t + r) % e.length]);
14116
14101
  }
14117
- var cC = hp, uC = gp, va = ["Enter", " "], dC = ["ArrowDown", "PageUp", "Home"], yp = ["ArrowUp", "PageDown", "End"], fC = [...dC, ...yp], pC = {
14102
+ var lC = hp, cC = gp, va = ["Enter", " "], uC = ["ArrowDown", "PageUp", "Home"], yp = ["ArrowUp", "PageDown", "End"], dC = [...uC, ...yp], fC = {
14118
14103
  ltr: [...va, "ArrowRight"],
14119
14104
  rtl: [...va, "ArrowLeft"]
14120
- }, hC = {
14105
+ }, pC = {
14121
14106
  ltr: ["ArrowLeft"],
14122
14107
  rtl: ["ArrowRight"]
14123
- }, Do = "Menu", [To, mC, gC] = ul(Do), [Er, vp] = Fn(Do, [
14124
- gC,
14108
+ }, Mo = "Menu", [Co, hC, mC] = ul(Mo), [Er, vp] = Fn(Mo, [
14109
+ mC,
14125
14110
  ai,
14126
14111
  pp
14127
- ]), li = ai(), wp = pp(), [xC, Ir] = Er(Do), [yC, Lo] = Er(Do), bp = (e) => {
14112
+ ]), li = ai(), wp = pp(), [gC, Ir] = Er(Mo), [xC, Do] = Er(Mo), bp = (e) => {
14128
14113
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = li(t), [l, c] = g.useState(null), d = g.useRef(!1), f = jt(s), p = ni(o);
14129
14114
  return g.useEffect(() => {
14130
14115
  const h = () => {
@@ -14134,7 +14119,7 @@ var cC = hp, uC = gp, va = ["Enter", " "], dC = ["ArrowDown", "PageUp", "Home"],
14134
14119
  document.removeEventListener("keydown", h, { capture: !0 }), document.removeEventListener("pointerdown", m, { capture: !0 }), document.removeEventListener("pointermove", m, { capture: !0 });
14135
14120
  };
14136
14121
  }, []), /* @__PURE__ */ u.jsx(lp, { ...a, children: /* @__PURE__ */ u.jsx(
14137
- xC,
14122
+ gC,
14138
14123
  {
14139
14124
  scope: t,
14140
14125
  open: n,
@@ -14142,7 +14127,7 @@ var cC = hp, uC = gp, va = ["Enter", " "], dC = ["ArrowDown", "PageUp", "Home"],
14142
14127
  content: l,
14143
14128
  onContentChange: c,
14144
14129
  children: /* @__PURE__ */ u.jsx(
14145
- yC,
14130
+ xC,
14146
14131
  {
14147
14132
  scope: t,
14148
14133
  onClose: g.useCallback(() => f(!1), [f]),
@@ -14155,27 +14140,27 @@ var cC = hp, uC = gp, va = ["Enter", " "], dC = ["ArrowDown", "PageUp", "Home"],
14155
14140
  }
14156
14141
  ) });
14157
14142
  };
14158
- bp.displayName = Do;
14159
- var vC = "MenuAnchor", vl = g.forwardRef(
14143
+ bp.displayName = Mo;
14144
+ var yC = "MenuAnchor", vl = g.forwardRef(
14160
14145
  (e, t) => {
14161
14146
  const { __scopeMenu: n, ...r } = e, o = li(n);
14162
14147
  return /* @__PURE__ */ u.jsx(cp, { ...o, ...r, ref: t });
14163
14148
  }
14164
14149
  );
14165
- vl.displayName = vC;
14166
- var wl = "MenuPortal", [wC, Sp] = Er(wl, {
14150
+ vl.displayName = yC;
14151
+ var wl = "MenuPortal", [vC, Sp] = Er(wl, {
14167
14152
  forceMount: void 0
14168
14153
  }), Cp = (e) => {
14169
14154
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Ir(wl, t);
14170
- return /* @__PURE__ */ u.jsx(wC, { scope: t, forceMount: n, children: /* @__PURE__ */ u.jsx(Zt, { present: n || s.open, children: /* @__PURE__ */ u.jsx(Ys, { asChild: !0, container: o, children: r }) }) });
14155
+ return /* @__PURE__ */ u.jsx(vC, { scope: t, forceMount: n, children: /* @__PURE__ */ u.jsx(Zt, { present: n || s.open, children: /* @__PURE__ */ u.jsx(Ys, { asChild: !0, container: o, children: r }) }) });
14171
14156
  };
14172
14157
  Cp.displayName = wl;
14173
- var sn = "MenuContent", [bC, bl] = Er(sn), Tp = g.forwardRef(
14158
+ var sn = "MenuContent", [wC, bl] = Er(sn), Tp = g.forwardRef(
14174
14159
  (e, t) => {
14175
- const n = Sp(sn, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Ir(sn, e.__scopeMenu), i = Lo(sn, e.__scopeMenu);
14176
- return /* @__PURE__ */ u.jsx(To.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(Zt, { present: r || s.open, children: /* @__PURE__ */ u.jsx(To.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ u.jsx(SC, { ...o, ref: t }) : /* @__PURE__ */ u.jsx(CC, { ...o, ref: t }) }) }) });
14160
+ const n = Sp(sn, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Ir(sn, e.__scopeMenu), i = Do(sn, e.__scopeMenu);
14161
+ return /* @__PURE__ */ u.jsx(Co.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(Zt, { present: r || s.open, children: /* @__PURE__ */ u.jsx(Co.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ u.jsx(bC, { ...o, ref: t }) : /* @__PURE__ */ u.jsx(SC, { ...o, ref: t }) }) }) });
14177
14162
  }
14178
- ), SC = g.forwardRef(
14163
+ ), bC = g.forwardRef(
14179
14164
  (e, t) => {
14180
14165
  const n = Ir(sn, e.__scopeMenu), r = g.useRef(null), o = Ve(t, r);
14181
14166
  return g.useEffect(() => {
@@ -14198,7 +14183,7 @@ var sn = "MenuContent", [bC, bl] = Er(sn), Tp = g.forwardRef(
14198
14183
  }
14199
14184
  );
14200
14185
  }
14201
- ), CC = g.forwardRef((e, t) => {
14186
+ ), SC = g.forwardRef((e, t) => {
14202
14187
  const n = Ir(sn, e.__scopeMenu);
14203
14188
  return /* @__PURE__ */ u.jsx(
14204
14189
  Sl,
@@ -14211,7 +14196,7 @@ var sn = "MenuContent", [bC, bl] = Er(sn), Tp = g.forwardRef(
14211
14196
  onDismiss: () => n.onOpenChange(!1)
14212
14197
  }
14213
14198
  );
14214
- }), TC = $r("MenuContent.ScrollLock"), Sl = g.forwardRef(
14199
+ }), CC = $r("MenuContent.ScrollLock"), Sl = g.forwardRef(
14215
14200
  (e, t) => {
14216
14201
  const {
14217
14202
  __scopeMenu: n,
@@ -14228,9 +14213,9 @@ var sn = "MenuContent", [bC, bl] = Er(sn), Tp = g.forwardRef(
14228
14213
  onDismiss: h,
14229
14214
  disableOutsideScroll: m,
14230
14215
  ...v
14231
- } = e, y = Ir(sn, n), x = Lo(sn, n), w = li(n), b = wp(n), T = mC(n), [C, S] = g.useState(null), k = g.useRef(null), A = Ve(t, k, y.onContentChange), N = g.useRef(0), j = g.useRef(""), $ = g.useRef(0), L = g.useRef(null), O = g.useRef("right"), _ = g.useRef(0), D = m ? Js : g.Fragment, U = m ? { as: TC, allowPinchZoom: !0 } : void 0, ne = (z) => {
14216
+ } = e, y = Ir(sn, n), x = Do(sn, n), w = li(n), b = wp(n), T = hC(n), [C, S] = g.useState(null), k = g.useRef(null), A = Ve(t, k, y.onContentChange), N = g.useRef(0), j = g.useRef(""), $ = g.useRef(0), L = g.useRef(null), O = g.useRef("right"), _ = g.useRef(0), D = m ? Js : g.Fragment, U = m ? { as: CC, allowPinchZoom: !0 } : void 0, ne = (z) => {
14232
14217
  var W, M;
14233
- const G = j.current + z, Q = T().filter((X) => !X.disabled), ae = document.activeElement, B = (W = Q.find((X) => X.ref.current === ae)) == null ? void 0 : W.textValue, ee = Q.map((X) => X.textValue), Re = DC(ee, G, B), xe = (M = Q.find((X) => X.textValue === Re)) == null ? void 0 : M.ref.current;
14218
+ const G = j.current + z, Q = T().filter((X) => !X.disabled), ae = document.activeElement, B = (W = Q.find((X) => X.ref.current === ae)) == null ? void 0 : W.textValue, ee = Q.map((X) => X.textValue), Re = MC(ee, G, B), xe = (M = Q.find((X) => X.textValue === Re)) == null ? void 0 : M.ref.current;
14234
14219
  (function X(re) {
14235
14220
  j.current = re, window.clearTimeout(N.current), re !== "" && (N.current = window.setTimeout(() => X(""), 1e3));
14236
14221
  })(G), xe && setTimeout(() => xe.focus());
@@ -14238,10 +14223,10 @@ var sn = "MenuContent", [bC, bl] = Er(sn), Tp = g.forwardRef(
14238
14223
  g.useEffect(() => () => window.clearTimeout(N.current), []), sl();
14239
14224
  const K = g.useCallback((z) => {
14240
14225
  var Q, ae;
14241
- return O.current === ((Q = L.current) == null ? void 0 : Q.side) && FC(z, (ae = L.current) == null ? void 0 : ae.area);
14226
+ return O.current === ((Q = L.current) == null ? void 0 : Q.side) && LC(z, (ae = L.current) == null ? void 0 : ae.area);
14242
14227
  }, []);
14243
14228
  return /* @__PURE__ */ u.jsx(
14244
- bC,
14229
+ wC,
14245
14230
  {
14246
14231
  scope: n,
14247
14232
  searchRef: j,
@@ -14289,7 +14274,7 @@ var sn = "MenuContent", [bC, bl] = Er(sn), Tp = g.forwardRef(
14289
14274
  onInteractOutside: p,
14290
14275
  onDismiss: h,
14291
14276
  children: /* @__PURE__ */ u.jsx(
14292
- cC,
14277
+ lC,
14293
14278
  {
14294
14279
  asChild: !0,
14295
14280
  ...b,
@@ -14318,17 +14303,17 @@ var sn = "MenuContent", [bC, bl] = Er(sn), Tp = g.forwardRef(
14318
14303
  const Q = z.target.closest("[data-radix-menu-content]") === z.currentTarget, ae = z.ctrlKey || z.altKey || z.metaKey, B = z.key.length === 1;
14319
14304
  Q && (z.key === "Tab" && z.preventDefault(), !ae && B && ne(z.key));
14320
14305
  const ee = k.current;
14321
- if (z.target !== ee || !fC.includes(z.key)) return;
14306
+ if (z.target !== ee || !dC.includes(z.key)) return;
14322
14307
  z.preventDefault();
14323
14308
  const xe = T().filter((W) => !W.disabled).map((W) => W.ref.current);
14324
- yp.includes(z.key) && xe.reverse(), OC(xe);
14309
+ yp.includes(z.key) && xe.reverse(), PC(xe);
14325
14310
  }),
14326
14311
  onBlur: ge(e.onBlur, (z) => {
14327
14312
  z.currentTarget.contains(z.target) || (window.clearTimeout(N.current), j.current = "");
14328
14313
  }),
14329
14314
  onPointerMove: ge(
14330
14315
  e.onPointerMove,
14331
- ko((z) => {
14316
+ To((z) => {
14332
14317
  const G = z.target, Q = _.current !== z.clientX;
14333
14318
  if (z.currentTarget.contains(G) && Q) {
14334
14319
  const ae = z.clientX > _.current ? "right" : "left";
@@ -14349,23 +14334,23 @@ var sn = "MenuContent", [bC, bl] = Er(sn), Tp = g.forwardRef(
14349
14334
  }
14350
14335
  );
14351
14336
  Tp.displayName = sn;
14352
- var kC = "MenuGroup", Cl = g.forwardRef(
14337
+ var TC = "MenuGroup", Cl = g.forwardRef(
14353
14338
  (e, t) => {
14354
14339
  const { __scopeMenu: n, ...r } = e;
14355
14340
  return /* @__PURE__ */ u.jsx(Ne.div, { role: "group", ...r, ref: t });
14356
14341
  }
14357
14342
  );
14358
- Cl.displayName = kC;
14359
- var RC = "MenuLabel", kp = g.forwardRef(
14343
+ Cl.displayName = TC;
14344
+ var kC = "MenuLabel", kp = g.forwardRef(
14360
14345
  (e, t) => {
14361
14346
  const { __scopeMenu: n, ...r } = e;
14362
14347
  return /* @__PURE__ */ u.jsx(Ne.div, { ...r, ref: t });
14363
14348
  }
14364
14349
  );
14365
- kp.displayName = RC;
14350
+ kp.displayName = kC;
14366
14351
  var Rs = "MenuItem", pu = "menu.itemSelect", ci = g.forwardRef(
14367
14352
  (e, t) => {
14368
- const { disabled: n = !1, onSelect: r, ...o } = e, s = g.useRef(null), i = Lo(Rs, e.__scopeMenu), a = bl(Rs, e.__scopeMenu), l = Ve(t, s), c = g.useRef(!1), d = () => {
14353
+ const { disabled: n = !1, onSelect: r, ...o } = e, s = g.useRef(null), i = Do(Rs, e.__scopeMenu), a = bl(Rs, e.__scopeMenu), l = Ve(t, s), c = g.useRef(!1), d = () => {
14369
14354
  const f = s.current;
14370
14355
  if (!n && f) {
14371
14356
  const p = new CustomEvent(pu, { bubbles: !0, cancelable: !0 });
@@ -14403,12 +14388,12 @@ var Rp = g.forwardRef(
14403
14388
  const m = l.current;
14404
14389
  m && h((m.textContent ?? "").trim());
14405
14390
  }, [s.children]), /* @__PURE__ */ u.jsx(
14406
- To.ItemSlot,
14391
+ Co.ItemSlot,
14407
14392
  {
14408
14393
  scope: n,
14409
14394
  disabled: r,
14410
14395
  textValue: o ?? p,
14411
- children: /* @__PURE__ */ u.jsx(uC, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ u.jsx(
14396
+ children: /* @__PURE__ */ u.jsx(cC, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ u.jsx(
14412
14397
  Ne.div,
14413
14398
  {
14414
14399
  role: "menuitem",
@@ -14419,13 +14404,13 @@ var Rp = g.forwardRef(
14419
14404
  ref: c,
14420
14405
  onPointerMove: ge(
14421
14406
  e.onPointerMove,
14422
- ko((m) => {
14407
+ To((m) => {
14423
14408
  r ? i.onItemLeave(m) : (i.onItemEnter(m), m.defaultPrevented || m.currentTarget.focus({ preventScroll: !0 }));
14424
14409
  })
14425
14410
  ),
14426
14411
  onPointerLeave: ge(
14427
14412
  e.onPointerLeave,
14428
- ko((m) => i.onItemLeave(m))
14413
+ To((m) => i.onItemLeave(m))
14429
14414
  ),
14430
14415
  onFocus: ge(e.onFocus, () => f(!0)),
14431
14416
  onBlur: ge(e.onBlur, () => f(!1))
@@ -14434,7 +14419,7 @@ var Rp = g.forwardRef(
14434
14419
  }
14435
14420
  );
14436
14421
  }
14437
- ), EC = "MenuCheckboxItem", Ep = g.forwardRef(
14422
+ ), RC = "MenuCheckboxItem", Ep = g.forwardRef(
14438
14423
  (e, t) => {
14439
14424
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
14440
14425
  return /* @__PURE__ */ u.jsx(jp, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ u.jsx(
@@ -14454,21 +14439,21 @@ var Rp = g.forwardRef(
14454
14439
  ) });
14455
14440
  }
14456
14441
  );
14457
- Ep.displayName = EC;
14458
- var Ip = "MenuRadioGroup", [IC, AC] = Er(
14442
+ Ep.displayName = RC;
14443
+ var Ip = "MenuRadioGroup", [EC, IC] = Er(
14459
14444
  Ip,
14460
14445
  { value: void 0, onValueChange: () => {
14461
14446
  } }
14462
14447
  ), Ap = g.forwardRef(
14463
14448
  (e, t) => {
14464
14449
  const { value: n, onValueChange: r, ...o } = e, s = jt(r);
14465
- return /* @__PURE__ */ u.jsx(IC, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ u.jsx(Cl, { ...o, ref: t }) });
14450
+ return /* @__PURE__ */ u.jsx(EC, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ u.jsx(Cl, { ...o, ref: t }) });
14466
14451
  }
14467
14452
  );
14468
14453
  Ap.displayName = Ip;
14469
14454
  var Np = "MenuRadioItem", _p = g.forwardRef(
14470
14455
  (e, t) => {
14471
- const { value: n, ...r } = e, o = AC(Np, e.__scopeMenu), s = n === o.value;
14456
+ const { value: n, ...r } = e, o = IC(Np, e.__scopeMenu), s = n === o.value;
14472
14457
  return /* @__PURE__ */ u.jsx(jp, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ u.jsx(
14473
14458
  ci,
14474
14459
  {
@@ -14490,12 +14475,12 @@ var Np = "MenuRadioItem", _p = g.forwardRef(
14490
14475
  }
14491
14476
  );
14492
14477
  _p.displayName = Np;
14493
- var Tl = "MenuItemIndicator", [jp, NC] = Er(
14478
+ var Tl = "MenuItemIndicator", [jp, AC] = Er(
14494
14479
  Tl,
14495
14480
  { checked: !1 }
14496
14481
  ), Pp = g.forwardRef(
14497
14482
  (e, t) => {
14498
- const { __scopeMenu: n, forceMount: r, ...o } = e, s = NC(Tl, n);
14483
+ const { __scopeMenu: n, forceMount: r, ...o } = e, s = AC(Tl, n);
14499
14484
  return /* @__PURE__ */ u.jsx(
14500
14485
  Zt,
14501
14486
  {
@@ -14513,7 +14498,7 @@ var Tl = "MenuItemIndicator", [jp, NC] = Er(
14513
14498
  }
14514
14499
  );
14515
14500
  Pp.displayName = Tl;
14516
- var _C = "MenuSeparator", Op = g.forwardRef(
14501
+ var NC = "MenuSeparator", Op = g.forwardRef(
14517
14502
  (e, t) => {
14518
14503
  const { __scopeMenu: n, ...r } = e;
14519
14504
  return /* @__PURE__ */ u.jsx(
@@ -14527,17 +14512,17 @@ var _C = "MenuSeparator", Op = g.forwardRef(
14527
14512
  );
14528
14513
  }
14529
14514
  );
14530
- Op.displayName = _C;
14531
- var jC = "MenuArrow", Mp = g.forwardRef(
14515
+ Op.displayName = NC;
14516
+ var _C = "MenuArrow", Mp = g.forwardRef(
14532
14517
  (e, t) => {
14533
14518
  const { __scopeMenu: n, ...r } = e, o = li(n);
14534
14519
  return /* @__PURE__ */ u.jsx(dp, { ...o, ...r, ref: t });
14535
14520
  }
14536
14521
  );
14537
- Mp.displayName = jC;
14538
- var PC = "MenuSub", [hR, Dp] = Er(PC), oo = "MenuSubTrigger", Lp = g.forwardRef(
14522
+ Mp.displayName = _C;
14523
+ var jC = "MenuSub", [pR, Dp] = Er(jC), oo = "MenuSubTrigger", Lp = g.forwardRef(
14539
14524
  (e, t) => {
14540
- const n = Ir(oo, e.__scopeMenu), r = Lo(oo, e.__scopeMenu), o = Dp(oo, e.__scopeMenu), s = bl(oo, e.__scopeMenu), i = g.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, d = g.useCallback(() => {
14525
+ const n = Ir(oo, e.__scopeMenu), r = Do(oo, e.__scopeMenu), o = Dp(oo, e.__scopeMenu), s = bl(oo, e.__scopeMenu), i = g.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, d = g.useCallback(() => {
14541
14526
  i.current && window.clearTimeout(i.current), i.current = null;
14542
14527
  }, []);
14543
14528
  return g.useEffect(() => d, [d]), g.useEffect(() => {
@@ -14561,7 +14546,7 @@ var PC = "MenuSub", [hR, Dp] = Er(PC), oo = "MenuSubTrigger", Lp = g.forwardRef(
14561
14546
  },
14562
14547
  onPointerMove: ge(
14563
14548
  e.onPointerMove,
14564
- ko((f) => {
14549
+ To((f) => {
14565
14550
  s.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
14566
14551
  n.onOpenChange(!0), d();
14567
14552
  }, 100));
@@ -14569,7 +14554,7 @@ var PC = "MenuSub", [hR, Dp] = Er(PC), oo = "MenuSubTrigger", Lp = g.forwardRef(
14569
14554
  ),
14570
14555
  onPointerLeave: ge(
14571
14556
  e.onPointerLeave,
14572
- ko((f) => {
14557
+ To((f) => {
14573
14558
  var h, m;
14574
14559
  d();
14575
14560
  const p = (h = n.content) == null ? void 0 : h.getBoundingClientRect();
@@ -14599,7 +14584,7 @@ var PC = "MenuSub", [hR, Dp] = Er(PC), oo = "MenuSubTrigger", Lp = g.forwardRef(
14599
14584
  onKeyDown: ge(e.onKeyDown, (f) => {
14600
14585
  var h;
14601
14586
  const p = s.searchRef.current !== "";
14602
- e.disabled || p && f.key === " " || pC[r.dir].includes(f.key) && (n.onOpenChange(!0), (h = n.content) == null || h.focus(), f.preventDefault());
14587
+ e.disabled || p && f.key === " " || fC[r.dir].includes(f.key) && (n.onOpenChange(!0), (h = n.content) == null || h.focus(), f.preventDefault());
14603
14588
  })
14604
14589
  }
14605
14590
  ) });
@@ -14608,8 +14593,8 @@ var PC = "MenuSub", [hR, Dp] = Er(PC), oo = "MenuSubTrigger", Lp = g.forwardRef(
14608
14593
  Lp.displayName = oo;
14609
14594
  var Fp = "MenuSubContent", $p = g.forwardRef(
14610
14595
  (e, t) => {
14611
- const n = Sp(sn, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Ir(sn, e.__scopeMenu), i = Lo(sn, e.__scopeMenu), a = Dp(Fp, e.__scopeMenu), l = g.useRef(null), c = Ve(t, l);
14612
- return /* @__PURE__ */ u.jsx(To.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(Zt, { present: r || s.open, children: /* @__PURE__ */ u.jsx(To.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(
14596
+ const n = Sp(sn, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Ir(sn, e.__scopeMenu), i = Do(sn, e.__scopeMenu), a = Dp(Fp, e.__scopeMenu), l = g.useRef(null), c = Ve(t, l);
14597
+ return /* @__PURE__ */ u.jsx(Co.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(Zt, { present: r || s.open, children: /* @__PURE__ */ u.jsx(Co.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(
14613
14598
  Sl,
14614
14599
  {
14615
14600
  id: a.contentId,
@@ -14634,7 +14619,7 @@ var Fp = "MenuSubContent", $p = g.forwardRef(
14634
14619
  }),
14635
14620
  onKeyDown: ge(e.onKeyDown, (d) => {
14636
14621
  var h;
14637
- const f = d.currentTarget.contains(d.target), p = hC[i.dir].includes(d.key);
14622
+ const f = d.currentTarget.contains(d.target), p = pC[i.dir].includes(d.key);
14638
14623
  f && p && (s.onOpenChange(!1), (h = a.trigger) == null || h.focus(), d.preventDefault());
14639
14624
  })
14640
14625
  }
@@ -14651,24 +14636,24 @@ function Es(e) {
14651
14636
  function kl(e) {
14652
14637
  return Es(e) ? "indeterminate" : e ? "checked" : "unchecked";
14653
14638
  }
14654
- function OC(e) {
14639
+ function PC(e) {
14655
14640
  const t = document.activeElement;
14656
14641
  for (const n of e)
14657
14642
  if (n === t || (n.focus(), document.activeElement !== t)) return;
14658
14643
  }
14659
- function MC(e, t) {
14644
+ function OC(e, t) {
14660
14645
  return e.map((n, r) => e[(t + r) % e.length]);
14661
14646
  }
14662
- function DC(e, t, n) {
14647
+ function MC(e, t, n) {
14663
14648
  const o = t.length > 1 && Array.from(t).every((c) => c === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
14664
- let i = MC(e, Math.max(s, 0));
14649
+ let i = OC(e, Math.max(s, 0));
14665
14650
  o.length === 1 && (i = i.filter((c) => c !== n));
14666
14651
  const l = i.find(
14667
14652
  (c) => c.toLowerCase().startsWith(o.toLowerCase())
14668
14653
  );
14669
14654
  return l !== n ? l : void 0;
14670
14655
  }
14671
- function LC(e, t) {
14656
+ function DC(e, t) {
14672
14657
  const { x: n, y: r } = e;
14673
14658
  let o = !1;
14674
14659
  for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
@@ -14677,18 +14662,18 @@ function LC(e, t) {
14677
14662
  }
14678
14663
  return o;
14679
14664
  }
14680
- function FC(e, t) {
14665
+ function LC(e, t) {
14681
14666
  if (!t) return !1;
14682
14667
  const n = { x: e.clientX, y: e.clientY };
14683
- return LC(n, t);
14668
+ return DC(n, t);
14684
14669
  }
14685
- function ko(e) {
14670
+ function To(e) {
14686
14671
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
14687
14672
  }
14688
- var $C = bp, zC = vl, BC = Cp, HC = Tp, UC = Cl, WC = kp, VC = ci, KC = Ep, qC = Ap, GC = _p, YC = Pp, XC = Op, JC = Mp, ZC = Lp, QC = $p, ui = "DropdownMenu", [eT, mR] = Fn(
14673
+ var FC = bp, $C = vl, zC = Cp, BC = Tp, HC = Cl, UC = kp, WC = ci, VC = Ep, KC = Ap, qC = _p, GC = Pp, YC = Op, XC = Mp, JC = Lp, ZC = $p, ui = "DropdownMenu", [QC, hR] = Fn(
14689
14674
  ui,
14690
14675
  [vp]
14691
- ), zt = vp(), [tT, Bp] = eT(ui), Hp = (e) => {
14676
+ ), zt = vp(), [eT, Bp] = QC(ui), Hp = (e) => {
14692
14677
  const {
14693
14678
  __scopeDropdownMenu: t,
14694
14679
  children: n,
@@ -14704,7 +14689,7 @@ var $C = bp, zC = vl, BC = Cp, HC = Tp, UC = Cl, WC = kp, VC = ci, KC = Ep, qC =
14704
14689
  caller: ui
14705
14690
  });
14706
14691
  return /* @__PURE__ */ u.jsx(
14707
- tT,
14692
+ eT,
14708
14693
  {
14709
14694
  scope: t,
14710
14695
  triggerId: On(),
@@ -14714,7 +14699,7 @@ var $C = bp, zC = vl, BC = Cp, HC = Tp, UC = Cl, WC = kp, VC = ci, KC = Ep, qC =
14714
14699
  onOpenChange: f,
14715
14700
  onOpenToggle: g.useCallback(() => f((p) => !p), [f]),
14716
14701
  modal: a,
14717
- children: /* @__PURE__ */ u.jsx($C, { ...l, open: d, onOpenChange: f, dir: r, modal: a, children: n })
14702
+ children: /* @__PURE__ */ u.jsx(FC, { ...l, open: d, onOpenChange: f, dir: r, modal: a, children: n })
14718
14703
  }
14719
14704
  );
14720
14705
  };
@@ -14722,7 +14707,7 @@ Hp.displayName = ui;
14722
14707
  var Up = "DropdownMenuTrigger", Wp = g.forwardRef(
14723
14708
  (e, t) => {
14724
14709
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Bp(Up, n), i = zt(n);
14725
- return /* @__PURE__ */ u.jsx(zC, { asChild: !0, ...i, children: /* @__PURE__ */ u.jsx(
14710
+ return /* @__PURE__ */ u.jsx($C, { asChild: !0, ...i, children: /* @__PURE__ */ u.jsx(
14726
14711
  Ne.button,
14727
14712
  {
14728
14713
  type: "button",
@@ -14746,16 +14731,16 @@ var Up = "DropdownMenuTrigger", Wp = g.forwardRef(
14746
14731
  }
14747
14732
  );
14748
14733
  Wp.displayName = Up;
14749
- var nT = "DropdownMenuPortal", Vp = (e) => {
14734
+ var tT = "DropdownMenuPortal", Vp = (e) => {
14750
14735
  const { __scopeDropdownMenu: t, ...n } = e, r = zt(t);
14751
- return /* @__PURE__ */ u.jsx(BC, { ...r, ...n });
14736
+ return /* @__PURE__ */ u.jsx(zC, { ...r, ...n });
14752
14737
  };
14753
- Vp.displayName = nT;
14738
+ Vp.displayName = tT;
14754
14739
  var Kp = "DropdownMenuContent", qp = g.forwardRef(
14755
14740
  (e, t) => {
14756
14741
  const { __scopeDropdownMenu: n, ...r } = e, o = Bp(Kp, n), s = zt(n), i = g.useRef(!1);
14757
14742
  return /* @__PURE__ */ u.jsx(
14758
- HC,
14743
+ BC,
14759
14744
  {
14760
14745
  id: o.contentId,
14761
14746
  "aria-labelledby": o.triggerId,
@@ -14783,68 +14768,68 @@ var Kp = "DropdownMenuContent", qp = g.forwardRef(
14783
14768
  }
14784
14769
  );
14785
14770
  qp.displayName = Kp;
14786
- var rT = "DropdownMenuGroup", oT = g.forwardRef(
14771
+ var nT = "DropdownMenuGroup", rT = g.forwardRef(
14787
14772
  (e, t) => {
14788
14773
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14789
- return /* @__PURE__ */ u.jsx(UC, { ...o, ...r, ref: t });
14774
+ return /* @__PURE__ */ u.jsx(HC, { ...o, ...r, ref: t });
14790
14775
  }
14791
14776
  );
14792
- oT.displayName = rT;
14793
- var sT = "DropdownMenuLabel", Gp = g.forwardRef(
14777
+ rT.displayName = nT;
14778
+ var oT = "DropdownMenuLabel", Gp = g.forwardRef(
14794
14779
  (e, t) => {
14795
14780
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14796
- return /* @__PURE__ */ u.jsx(WC, { ...o, ...r, ref: t });
14781
+ return /* @__PURE__ */ u.jsx(UC, { ...o, ...r, ref: t });
14797
14782
  }
14798
14783
  );
14799
- Gp.displayName = sT;
14800
- var iT = "DropdownMenuItem", Yp = g.forwardRef(
14784
+ Gp.displayName = oT;
14785
+ var sT = "DropdownMenuItem", Yp = g.forwardRef(
14801
14786
  (e, t) => {
14802
14787
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14803
- return /* @__PURE__ */ u.jsx(VC, { ...o, ...r, ref: t });
14788
+ return /* @__PURE__ */ u.jsx(WC, { ...o, ...r, ref: t });
14804
14789
  }
14805
14790
  );
14806
- Yp.displayName = iT;
14807
- var aT = "DropdownMenuCheckboxItem", Xp = g.forwardRef((e, t) => {
14791
+ Yp.displayName = sT;
14792
+ var iT = "DropdownMenuCheckboxItem", Xp = g.forwardRef((e, t) => {
14793
+ const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14794
+ return /* @__PURE__ */ u.jsx(VC, { ...o, ...r, ref: t });
14795
+ });
14796
+ Xp.displayName = iT;
14797
+ var aT = "DropdownMenuRadioGroup", lT = g.forwardRef((e, t) => {
14808
14798
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14809
14799
  return /* @__PURE__ */ u.jsx(KC, { ...o, ...r, ref: t });
14810
14800
  });
14811
- Xp.displayName = aT;
14812
- var lT = "DropdownMenuRadioGroup", cT = g.forwardRef((e, t) => {
14801
+ lT.displayName = aT;
14802
+ var cT = "DropdownMenuRadioItem", Jp = g.forwardRef((e, t) => {
14813
14803
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14814
14804
  return /* @__PURE__ */ u.jsx(qC, { ...o, ...r, ref: t });
14815
14805
  });
14816
- cT.displayName = lT;
14817
- var uT = "DropdownMenuRadioItem", Jp = g.forwardRef((e, t) => {
14806
+ Jp.displayName = cT;
14807
+ var uT = "DropdownMenuItemIndicator", Zp = g.forwardRef((e, t) => {
14818
14808
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14819
14809
  return /* @__PURE__ */ u.jsx(GC, { ...o, ...r, ref: t });
14820
14810
  });
14821
- Jp.displayName = uT;
14822
- var dT = "DropdownMenuItemIndicator", Zp = g.forwardRef((e, t) => {
14811
+ Zp.displayName = uT;
14812
+ var dT = "DropdownMenuSeparator", Qp = g.forwardRef((e, t) => {
14823
14813
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14824
14814
  return /* @__PURE__ */ u.jsx(YC, { ...o, ...r, ref: t });
14825
14815
  });
14826
- Zp.displayName = dT;
14827
- var fT = "DropdownMenuSeparator", Qp = g.forwardRef((e, t) => {
14828
- const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14829
- return /* @__PURE__ */ u.jsx(XC, { ...o, ...r, ref: t });
14830
- });
14831
- Qp.displayName = fT;
14832
- var pT = "DropdownMenuArrow", hT = g.forwardRef(
14816
+ Qp.displayName = dT;
14817
+ var fT = "DropdownMenuArrow", pT = g.forwardRef(
14833
14818
  (e, t) => {
14834
14819
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14835
- return /* @__PURE__ */ u.jsx(JC, { ...o, ...r, ref: t });
14820
+ return /* @__PURE__ */ u.jsx(XC, { ...o, ...r, ref: t });
14836
14821
  }
14837
14822
  );
14838
- hT.displayName = pT;
14839
- var mT = "DropdownMenuSubTrigger", eh = g.forwardRef((e, t) => {
14823
+ pT.displayName = fT;
14824
+ var hT = "DropdownMenuSubTrigger", eh = g.forwardRef((e, t) => {
14840
14825
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14841
- return /* @__PURE__ */ u.jsx(ZC, { ...o, ...r, ref: t });
14826
+ return /* @__PURE__ */ u.jsx(JC, { ...o, ...r, ref: t });
14842
14827
  });
14843
- eh.displayName = mT;
14844
- var gT = "DropdownMenuSubContent", th = g.forwardRef((e, t) => {
14828
+ eh.displayName = hT;
14829
+ var mT = "DropdownMenuSubContent", th = g.forwardRef((e, t) => {
14845
14830
  const { __scopeDropdownMenu: n, ...r } = e, o = zt(n);
14846
14831
  return /* @__PURE__ */ u.jsx(
14847
- QC,
14832
+ ZC,
14848
14833
  {
14849
14834
  ...o,
14850
14835
  ...r,
@@ -14860,9 +14845,9 @@ var gT = "DropdownMenuSubContent", th = g.forwardRef((e, t) => {
14860
14845
  }
14861
14846
  );
14862
14847
  });
14863
- th.displayName = gT;
14864
- var xT = Hp, yT = Wp, vT = Vp, nh = qp, rh = Gp, oh = Yp, sh = Xp, ih = Jp, ah = Zp, lh = Qp, ch = eh, uh = th;
14865
- const wT = xT, bT = yT, ST = g.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ u.jsxs(
14848
+ th.displayName = mT;
14849
+ var gT = Hp, xT = Wp, yT = Vp, nh = qp, rh = Gp, oh = Yp, sh = Xp, ih = Jp, ah = Zp, lh = Qp, ch = eh, uh = th;
14850
+ const vT = gT, wT = xT, bT = g.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ u.jsxs(
14866
14851
  ch,
14867
14852
  {
14868
14853
  ref: o,
@@ -14878,8 +14863,8 @@ const wT = xT, bT = yT, ST = g.forwardRef(({ className: e, inset: t, children: n
14878
14863
  ]
14879
14864
  }
14880
14865
  ));
14881
- ST.displayName = ch.displayName;
14882
- const CT = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
14866
+ bT.displayName = ch.displayName;
14867
+ const ST = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
14883
14868
  uh,
14884
14869
  {
14885
14870
  ref: n,
@@ -14890,8 +14875,8 @@ const CT = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
14890
14875
  ...t
14891
14876
  }
14892
14877
  ));
14893
- CT.displayName = uh.displayName;
14894
- const dh = g.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ u.jsx(vT, { children: /* @__PURE__ */ u.jsx(
14878
+ ST.displayName = uh.displayName;
14879
+ const dh = g.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ u.jsx(yT, { children: /* @__PURE__ */ u.jsx(
14895
14880
  nh,
14896
14881
  {
14897
14882
  ref: r,
@@ -14917,7 +14902,7 @@ const wa = g.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
14917
14902
  }
14918
14903
  ));
14919
14904
  wa.displayName = oh.displayName;
14920
- const TT = g.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ u.jsxs(
14905
+ const CT = g.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ u.jsxs(
14921
14906
  sh,
14922
14907
  {
14923
14908
  ref: o,
@@ -14933,8 +14918,8 @@ const TT = g.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
14933
14918
  ]
14934
14919
  }
14935
14920
  ));
14936
- TT.displayName = sh.displayName;
14937
- const kT = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
14921
+ CT.displayName = sh.displayName;
14922
+ const TT = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
14938
14923
  ih,
14939
14924
  {
14940
14925
  ref: r,
@@ -14949,8 +14934,8 @@ const kT = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
14949
14934
  ]
14950
14935
  }
14951
14936
  ));
14952
- kT.displayName = ih.displayName;
14953
- const RT = g.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ u.jsx(
14937
+ TT.displayName = ih.displayName;
14938
+ const kT = g.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ u.jsx(
14954
14939
  rh,
14955
14940
  {
14956
14941
  ref: r,
@@ -14962,8 +14947,8 @@ const RT = g.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
14962
14947
  ...n
14963
14948
  }
14964
14949
  ));
14965
- RT.displayName = rh.displayName;
14966
- const ET = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
14950
+ kT.displayName = rh.displayName;
14951
+ const RT = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
14967
14952
  lh,
14968
14953
  {
14969
14954
  ref: n,
@@ -14971,7 +14956,7 @@ const ET = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
14971
14956
  ...t
14972
14957
  }
14973
14958
  ));
14974
- ET.displayName = lh.displayName;
14959
+ RT.displayName = lh.displayName;
14975
14960
  const hu = {
14976
14961
  value: ""
14977
14962
  };
@@ -15092,10 +15077,10 @@ function Vi({
15092
15077
  _ && !be && (m == null || m(_));
15093
15078
  }, [_, be, m]);
15094
15079
  const Cn = (F) => {
15095
- if (F.length > ds)
15096
- return `Message too long (${F.length}/${ds} characters)`;
15080
+ if (F.length > us)
15081
+ return `Message too long (${F.length}/${us} characters)`;
15097
15082
  try {
15098
- return P0(F), null;
15083
+ return j0(F), null;
15099
15084
  } catch (de) {
15100
15085
  return (de == null ? void 0 : de.message) || "Invalid message";
15101
15086
  }
@@ -15362,8 +15347,8 @@ function Vi({
15362
15347
  ] }),
15363
15348
  fe && /* @__PURE__ */ u.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: fe }),
15364
15349
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
15365
- (a || l) && /* @__PURE__ */ u.jsxs(wT, { children: [
15366
- /* @__PURE__ */ u.jsx(bT, { asChild: !0, children: /* @__PURE__ */ u.jsx(
15350
+ (a || l) && /* @__PURE__ */ u.jsxs(vT, { children: [
15351
+ /* @__PURE__ */ u.jsx(wT, { asChild: !0, children: /* @__PURE__ */ u.jsx(
15367
15352
  Ze,
15368
15353
  {
15369
15354
  type: "button",
@@ -15409,7 +15394,7 @@ function Vi({
15409
15394
  placeholder: W ? "Edit your message..." : t,
15410
15395
  isStreaming: O,
15411
15396
  disabled: xe,
15412
- maxLength: ds,
15397
+ maxLength: us,
15413
15398
  onSend: fn,
15414
15399
  onCancelEdit: cr,
15415
15400
  onStop: U,
@@ -15439,10 +15424,10 @@ Is.displayName = "Input";
15439
15424
  function ba(e, [t, n]) {
15440
15425
  return Math.min(n, Math.max(t, e));
15441
15426
  }
15442
- function IT(e, t) {
15427
+ function ET(e, t) {
15443
15428
  return g.useReducer((n, r) => t[n][r] ?? n, e);
15444
15429
  }
15445
- var Rl = "ScrollArea", [fh, gR] = Fn(Rl), [AT, ln] = fh(Rl), ph = g.forwardRef(
15430
+ var Rl = "ScrollArea", [fh, mR] = Fn(Rl), [IT, ln] = fh(Rl), ph = g.forwardRef(
15446
15431
  (e, t) => {
15447
15432
  const {
15448
15433
  __scopeScrollArea: n,
@@ -15452,7 +15437,7 @@ var Rl = "ScrollArea", [fh, gR] = Fn(Rl), [AT, ln] = fh(Rl), ph = g.forwardRef(
15452
15437
  ...i
15453
15438
  } = e, [a, l] = g.useState(null), [c, d] = g.useState(null), [f, p] = g.useState(null), [h, m] = g.useState(null), [v, y] = g.useState(null), [x, w] = g.useState(0), [b, T] = g.useState(0), [C, S] = g.useState(!1), [k, A] = g.useState(!1), N = Ve(t, ($) => l($)), j = ni(o);
15454
15439
  return /* @__PURE__ */ u.jsx(
15455
- AT,
15440
+ IT,
15456
15441
  {
15457
15442
  scope: n,
15458
15443
  type: r,
@@ -15540,11 +15525,11 @@ var zn = "ScrollAreaScrollbar", El = g.forwardRef(
15540
15525
  const { forceMount: n, ...r } = e, o = ln(zn, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
15541
15526
  return g.useEffect(() => (a ? s(!0) : i(!0), () => {
15542
15527
  a ? s(!1) : i(!1);
15543
- }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ u.jsx(NT, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ u.jsx(_T, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ u.jsx(gh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ u.jsx(Il, { ...r, ref: t }) : null;
15528
+ }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ u.jsx(AT, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ u.jsx(NT, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ u.jsx(gh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ u.jsx(Il, { ...r, ref: t }) : null;
15544
15529
  }
15545
15530
  );
15546
15531
  El.displayName = zn;
15547
- var NT = g.forwardRef((e, t) => {
15532
+ var AT = g.forwardRef((e, t) => {
15548
15533
  const { forceMount: n, ...r } = e, o = ln(zn, e.__scopeScrollArea), [s, i] = g.useState(!1);
15549
15534
  return g.useEffect(() => {
15550
15535
  const a = o.scrollArea;
@@ -15567,8 +15552,8 @@ var NT = g.forwardRef((e, t) => {
15567
15552
  ref: t
15568
15553
  }
15569
15554
  ) });
15570
- }), _T = g.forwardRef((e, t) => {
15571
- const { forceMount: n, ...r } = e, o = ln(zn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = fi(() => l("SCROLL_END"), 100), [a, l] = IT("hidden", {
15555
+ }), NT = g.forwardRef((e, t) => {
15556
+ const { forceMount: n, ...r } = e, o = ln(zn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = fi(() => l("SCROLL_END"), 100), [a, l] = ET("hidden", {
15572
15557
  hidden: {
15573
15558
  SCROLL: "scrolling"
15574
15559
  },
@@ -15641,10 +15626,10 @@ var NT = g.forwardRef((e, t) => {
15641
15626
  onThumbPointerDown: (p) => i.current = p
15642
15627
  };
15643
15628
  function f(p, h) {
15644
- return LT(p, i.current, a, h);
15629
+ return DT(p, i.current, a, h);
15645
15630
  }
15646
15631
  return n === "horizontal" ? /* @__PURE__ */ u.jsx(
15647
- jT,
15632
+ _T,
15648
15633
  {
15649
15634
  ...d,
15650
15635
  ref: t,
@@ -15662,7 +15647,7 @@ var NT = g.forwardRef((e, t) => {
15662
15647
  }
15663
15648
  }
15664
15649
  ) : n === "vertical" ? /* @__PURE__ */ u.jsx(
15665
- PT,
15650
+ jT,
15666
15651
  {
15667
15652
  ...d,
15668
15653
  ref: t,
@@ -15680,7 +15665,7 @@ var NT = g.forwardRef((e, t) => {
15680
15665
  }
15681
15666
  }
15682
15667
  ) : null;
15683
- }), jT = g.forwardRef((e, t) => {
15668
+ }), _T = g.forwardRef((e, t) => {
15684
15669
  const { sizes: n, onSizesChange: r, ...o } = e, s = ln(zn, e.__scopeScrollArea), [i, a] = g.useState(), l = g.useRef(null), c = Ve(t, l, s.onScrollbarXChange);
15685
15670
  return g.useEffect(() => {
15686
15671
  l.current && a(getComputedStyle(l.current));
@@ -15719,7 +15704,7 @@ var NT = g.forwardRef((e, t) => {
15719
15704
  }
15720
15705
  }
15721
15706
  );
15722
- }), PT = g.forwardRef((e, t) => {
15707
+ }), jT = g.forwardRef((e, t) => {
15723
15708
  const { sizes: n, onSizesChange: r, ...o } = e, s = ln(zn, e.__scopeScrollArea), [i, a] = g.useState(), l = g.useRef(null), c = Ve(t, l, s.onScrollbarYChange);
15724
15709
  return g.useEffect(() => {
15725
15710
  l.current && a(getComputedStyle(l.current));
@@ -15759,7 +15744,7 @@ var NT = g.forwardRef((e, t) => {
15759
15744
  }
15760
15745
  }
15761
15746
  );
15762
- }), [OT, xh] = fh(zn), yh = g.forwardRef((e, t) => {
15747
+ }), [PT, xh] = fh(zn), yh = g.forwardRef((e, t) => {
15763
15748
  const {
15764
15749
  __scopeScrollArea: n,
15765
15750
  sizes: r,
@@ -15786,7 +15771,7 @@ var NT = g.forwardRef((e, t) => {
15786
15771
  };
15787
15772
  return document.addEventListener("wheel", N, { passive: !1 }), () => document.removeEventListener("wheel", N, { passive: !1 });
15788
15773
  }, [b, m, T, C]), g.useEffect(S, [r, S]), Hr(m, k), Hr(h.content, k), /* @__PURE__ */ u.jsx(
15789
- OT,
15774
+ PT,
15790
15775
  {
15791
15776
  scope: n,
15792
15777
  scrollbar: m,
@@ -15816,9 +15801,9 @@ var NT = g.forwardRef((e, t) => {
15816
15801
  }), As = "ScrollAreaThumb", vh = g.forwardRef(
15817
15802
  (e, t) => {
15818
15803
  const { forceMount: n, ...r } = e, o = xh(As, e.__scopeScrollArea);
15819
- return /* @__PURE__ */ u.jsx(Zt, { present: n || o.hasThumb, children: /* @__PURE__ */ u.jsx(MT, { ref: t, ...r }) });
15804
+ return /* @__PURE__ */ u.jsx(Zt, { present: n || o.hasThumb, children: /* @__PURE__ */ u.jsx(OT, { ref: t, ...r }) });
15820
15805
  }
15821
- ), MT = g.forwardRef(
15806
+ ), OT = g.forwardRef(
15822
15807
  (e, t) => {
15823
15808
  const { __scopeScrollArea: n, style: r, ...o } = e, s = ln(As, n), i = xh(As, n), { onThumbPositionChange: a } = i, l = Ve(
15824
15809
  t,
@@ -15831,7 +15816,7 @@ var NT = g.forwardRef((e, t) => {
15831
15816
  if (f) {
15832
15817
  const p = () => {
15833
15818
  if (d(), !c.current) {
15834
- const h = FT(f, a);
15819
+ const h = LT(f, a);
15835
15820
  c.current = h, a();
15836
15821
  }
15837
15822
  };
@@ -15861,11 +15846,11 @@ vh.displayName = As;
15861
15846
  var Al = "ScrollAreaCorner", wh = g.forwardRef(
15862
15847
  (e, t) => {
15863
15848
  const n = ln(Al, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
15864
- return n.type !== "scroll" && r ? /* @__PURE__ */ u.jsx(DT, { ...e, ref: t }) : null;
15849
+ return n.type !== "scroll" && r ? /* @__PURE__ */ u.jsx(MT, { ...e, ref: t }) : null;
15865
15850
  }
15866
15851
  );
15867
15852
  wh.displayName = Al;
15868
- var DT = g.forwardRef((e, t) => {
15853
+ var MT = g.forwardRef((e, t) => {
15869
15854
  const { __scopeScrollArea: n, ...r } = e, o = ln(Al, n), [s, i] = g.useState(0), [a, l] = g.useState(0), c = !!(s && a);
15870
15855
  return Hr(o.scrollbarX, () => {
15871
15856
  var f;
@@ -15903,7 +15888,7 @@ function di(e) {
15903
15888
  const t = bh(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
15904
15889
  return Math.max(r, 18);
15905
15890
  }
15906
- function LT(e, t, n, r = "ltr") {
15891
+ function DT(e, t, n, r = "ltr") {
15907
15892
  const o = di(n), s = o / 2, i = t || s, a = o - i, l = n.scrollbar.paddingStart + i, c = n.scrollbar.size - n.scrollbar.paddingEnd - a, d = n.content - n.viewport, f = r === "ltr" ? [0, d] : [d * -1, 0];
15908
15893
  return Sh([l, c], f)(e);
15909
15894
  }
@@ -15921,7 +15906,7 @@ function Sh(e, t) {
15921
15906
  function Ch(e, t) {
15922
15907
  return e > 0 && e < t;
15923
15908
  }
15924
- var FT = (e, t = () => {
15909
+ var LT = (e, t = () => {
15925
15910
  }) => {
15926
15911
  let n = { left: e.scrollLeft, top: e.scrollTop }, r = 0;
15927
15912
  return function o() {
@@ -15949,7 +15934,7 @@ function Hr(e, t) {
15949
15934
  }
15950
15935
  }, [e, n]);
15951
15936
  }
15952
- var Th = ph, $T = mh, zT = wh;
15937
+ var Th = ph, FT = mh, $T = wh;
15953
15938
  const kh = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
15954
15939
  Th,
15955
15940
  {
@@ -15957,9 +15942,9 @@ const kh = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
15957
15942
  className: ie("relative overflow-hidden", e),
15958
15943
  ...n,
15959
15944
  children: [
15960
- /* @__PURE__ */ u.jsx($T, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
15945
+ /* @__PURE__ */ u.jsx(FT, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
15961
15946
  /* @__PURE__ */ u.jsx(Rh, {}),
15962
- /* @__PURE__ */ u.jsx(zT, {})
15947
+ /* @__PURE__ */ u.jsx($T, {})
15963
15948
  ]
15964
15949
  }
15965
15950
  ));
@@ -16142,7 +16127,7 @@ function Fr(e) {
16142
16127
  if (!(typeof globalThis > "u"))
16143
16128
  return globalThis[e];
16144
16129
  }
16145
- function BT(e) {
16130
+ function zT(e) {
16146
16131
  if (typeof e != "string") return;
16147
16132
  const t = e.trim();
16148
16133
  if (t)
@@ -16155,7 +16140,7 @@ function Eh() {
16155
16140
  Fr("__CHAT_API_URL__")
16156
16141
  ];
16157
16142
  for (const t of e) {
16158
- const n = BT(t);
16143
+ const n = zT(t);
16159
16144
  if (n) return n;
16160
16145
  }
16161
16146
  }
@@ -16175,12 +16160,12 @@ function Ah(...e) {
16175
16160
  return Un(t);
16176
16161
  return Un();
16177
16162
  }
16178
- function HT() {
16163
+ function BT() {
16179
16164
  const e = {}, t = Eh(), n = Ih();
16180
16165
  return t && (e.baseUrl = t), n && (e.apiKey = n), e;
16181
16166
  }
16182
- function UT() {
16183
- const e = HT(), t = gr.getAuthToken(), n = Eh();
16167
+ function HT() {
16168
+ const e = BT(), t = gr.getAuthToken(), n = Eh();
16184
16169
  return {
16185
16170
  apiBaseUrl: Ah(
16186
16171
  e.baseUrl,
@@ -16200,7 +16185,7 @@ function UT() {
16200
16185
  };
16201
16186
  }
16202
16187
  const Nh = "chat-settings";
16203
- function WT() {
16188
+ function UT() {
16204
16189
  try {
16205
16190
  const e = localStorage.getItem(Nh);
16206
16191
  return e ? JSON.parse(e) : {};
@@ -16208,7 +16193,7 @@ function WT() {
16208
16193
  return console.error("Failed to parse stored settings:", e), {};
16209
16194
  }
16210
16195
  }
16211
- function VT(e) {
16196
+ function WT(e) {
16212
16197
  try {
16213
16198
  const t = {
16214
16199
  ...e,
@@ -16219,8 +16204,8 @@ function VT(e) {
16219
16204
  console.error("Failed to save settings:", t);
16220
16205
  }
16221
16206
  }
16222
- function xR() {
16223
- const e = UT(), t = WT(), n = gr.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
16207
+ function gR() {
16208
+ const e = HT(), t = UT(), n = gr.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
16224
16209
  return {
16225
16210
  ...e,
16226
16211
  ...t,
@@ -16234,13 +16219,13 @@ function xR() {
16234
16219
  )
16235
16220
  };
16236
16221
  }
16237
- function yR(e) {
16222
+ function xR(e) {
16238
16223
  gr.updateConfig({
16239
16224
  baseUrl: e.apiBaseUrl,
16240
16225
  authToken: e.apiKey ?? void 0
16241
- }), VT(e);
16226
+ }), WT(e);
16242
16227
  }
16243
- var KT = "Label", _h = g.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
16228
+ var VT = "Label", _h = g.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
16244
16229
  Ne.label,
16245
16230
  {
16246
16231
  ...e,
@@ -16251,15 +16236,15 @@ var KT = "Label", _h = g.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
16251
16236
  }
16252
16237
  }
16253
16238
  ));
16254
- _h.displayName = KT;
16239
+ _h.displayName = VT;
16255
16240
  var jh = _h;
16256
- const qT = Os(
16241
+ const KT = Os(
16257
16242
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
16258
16243
  ), tn = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
16259
16244
  jh,
16260
16245
  {
16261
16246
  ref: n,
16262
- className: ie(qT(), e),
16247
+ className: ie(KT(), e),
16263
16248
  ...t
16264
16249
  }
16265
16250
  ));
@@ -16268,7 +16253,7 @@ function Ph(e) {
16268
16253
  const t = g.useRef({ value: e, previous: e });
16269
16254
  return g.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
16270
16255
  }
16271
- var pi = "Switch", [GT, vR] = Fn(pi), [YT, XT] = GT(pi), Oh = g.forwardRef(
16256
+ var pi = "Switch", [qT, yR] = Fn(pi), [GT, YT] = qT(pi), Oh = g.forwardRef(
16272
16257
  (e, t) => {
16273
16258
  const {
16274
16259
  __scopeSwitch: n,
@@ -16287,7 +16272,7 @@ var pi = "Switch", [GT, vR] = Fn(pi), [YT, XT] = GT(pi), Oh = g.forwardRef(
16287
16272
  onChange: c,
16288
16273
  caller: pi
16289
16274
  });
16290
- return /* @__PURE__ */ u.jsxs(YT, { scope: n, checked: x, disabled: a, children: [
16275
+ return /* @__PURE__ */ u.jsxs(GT, { scope: n, checked: x, disabled: a, children: [
16291
16276
  /* @__PURE__ */ u.jsx(
16292
16277
  Ne.button,
16293
16278
  {
@@ -16326,7 +16311,7 @@ var pi = "Switch", [GT, vR] = Fn(pi), [YT, XT] = GT(pi), Oh = g.forwardRef(
16326
16311
  Oh.displayName = pi;
16327
16312
  var Mh = "SwitchThumb", Dh = g.forwardRef(
16328
16313
  (e, t) => {
16329
- const { __scopeSwitch: n, ...r } = e, o = XT(Mh, n);
16314
+ const { __scopeSwitch: n, ...r } = e, o = YT(Mh, n);
16330
16315
  return /* @__PURE__ */ u.jsx(
16331
16316
  Ne.span,
16332
16317
  {
@@ -16339,7 +16324,7 @@ var Mh = "SwitchThumb", Dh = g.forwardRef(
16339
16324
  }
16340
16325
  );
16341
16326
  Dh.displayName = Mh;
16342
- var JT = "SwitchBubbleInput", Lh = g.forwardRef(
16327
+ var XT = "SwitchBubbleInput", Lh = g.forwardRef(
16343
16328
  ({
16344
16329
  __scopeSwitch: e,
16345
16330
  control: t,
@@ -16380,11 +16365,11 @@ var JT = "SwitchBubbleInput", Lh = g.forwardRef(
16380
16365
  );
16381
16366
  }
16382
16367
  );
16383
- Lh.displayName = JT;
16368
+ Lh.displayName = XT;
16384
16369
  function Fh(e) {
16385
16370
  return e ? "checked" : "unchecked";
16386
16371
  }
16387
- var $h = Oh, ZT = Dh;
16372
+ var $h = Oh, JT = Dh;
16388
16373
  const Yn = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
16389
16374
  $h,
16390
16375
  {
@@ -16395,7 +16380,7 @@ const Yn = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
16395
16380
  ...t,
16396
16381
  ref: n,
16397
16382
  children: /* @__PURE__ */ u.jsx(
16398
- ZT,
16383
+ JT,
16399
16384
  {
16400
16385
  className: ie(
16401
16386
  "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
@@ -16417,7 +16402,7 @@ var zh = Object.freeze({
16417
16402
  clip: "rect(0, 0, 0, 0)",
16418
16403
  whiteSpace: "nowrap",
16419
16404
  wordWrap: "normal"
16420
- }), QT = "VisuallyHidden", ek = g.forwardRef(
16405
+ }), ZT = "VisuallyHidden", QT = g.forwardRef(
16421
16406
  (e, t) => /* @__PURE__ */ u.jsx(
16422
16407
  Ne.span,
16423
16408
  {
@@ -16427,11 +16412,11 @@ var zh = Object.freeze({
16427
16412
  }
16428
16413
  )
16429
16414
  );
16430
- ek.displayName = QT;
16431
- var tk = [" ", "Enter", "ArrowUp", "ArrowDown"], nk = [" ", "Enter"], Sr = "Select", [hi, mi, rk] = ul(Sr), [Yr, wR] = Fn(Sr, [
16432
- rk,
16415
+ QT.displayName = ZT;
16416
+ var ek = [" ", "Enter", "ArrowUp", "ArrowDown"], tk = [" ", "Enter"], Sr = "Select", [hi, mi, nk] = ul(Sr), [Yr, vR] = Fn(Sr, [
16417
+ nk,
16433
16418
  ai
16434
- ]), gi = ai(), [ok, or] = Yr(Sr), [sk, ik] = Yr(Sr), Bh = (e) => {
16419
+ ]), gi = ai(), [rk, or] = Yr(Sr), [ok, sk] = Yr(Sr), Bh = (e) => {
16435
16420
  const {
16436
16421
  __scopeSelect: t,
16437
16422
  children: n,
@@ -16459,7 +16444,7 @@ var tk = [" ", "Enter", "ArrowUp", "ArrowDown"], nk = [" ", "Enter"], Sr = "Sele
16459
16444
  caller: Sr
16460
16445
  }), $ = g.useRef(null), L = y ? m || !!y.closest("form") : !0, [O, _] = g.useState(/* @__PURE__ */ new Set()), D = Array.from(O).map((U) => U.props.value).join(";");
16461
16446
  return /* @__PURE__ */ u.jsx(lp, { ...v, children: /* @__PURE__ */ u.jsxs(
16462
- ok,
16447
+ rk,
16463
16448
  {
16464
16449
  required: h,
16465
16450
  scope: t,
@@ -16479,7 +16464,7 @@ var tk = [" ", "Enter", "ArrowUp", "ArrowDown"], nk = [" ", "Enter"], Sr = "Sele
16479
16464
  disabled: p,
16480
16465
  children: [
16481
16466
  /* @__PURE__ */ u.jsx(hi.Provider, { scope: t, children: /* @__PURE__ */ u.jsx(
16482
- sk,
16467
+ ok,
16483
16468
  {
16484
16469
  scope: e.__scopeSelect,
16485
16470
  onNativeOptionAdd: g.useCallback((U) => {
@@ -16555,7 +16540,7 @@ var Hh = "SelectTrigger", Uh = g.forwardRef(
16555
16540
  }),
16556
16541
  onKeyDown: ge(o.onKeyDown, (v) => {
16557
16542
  const y = f.current !== "";
16558
- !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && p(v.key), !(y && v.key === " ") && tk.includes(v.key) && (m(), v.preventDefault());
16543
+ !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && p(v.key), !(y && v.key === " ") && ek.includes(v.key) && (m(), v.preventDefault());
16559
16544
  })
16560
16545
  }
16561
16546
  ) });
@@ -16579,15 +16564,15 @@ var Wh = "SelectValue", Vh = g.forwardRef(
16579
16564
  }
16580
16565
  );
16581
16566
  Vh.displayName = Wh;
16582
- var ak = "SelectIcon", Kh = g.forwardRef(
16567
+ var ik = "SelectIcon", Kh = g.forwardRef(
16583
16568
  (e, t) => {
16584
16569
  const { __scopeSelect: n, children: r, ...o } = e;
16585
16570
  return /* @__PURE__ */ u.jsx(Ne.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
16586
16571
  }
16587
16572
  );
16588
- Kh.displayName = ak;
16589
- var lk = "SelectPortal", qh = (e) => /* @__PURE__ */ u.jsx(Ys, { asChild: !0, ...e });
16590
- qh.displayName = lk;
16573
+ Kh.displayName = ik;
16574
+ var ak = "SelectPortal", qh = (e) => /* @__PURE__ */ u.jsx(Ys, { asChild: !0, ...e });
16575
+ qh.displayName = ak;
16591
16576
  var Cr = "SelectContent", Gh = g.forwardRef(
16592
16577
  (e, t) => {
16593
16578
  const n = or(Cr, e.__scopeSelect), [r, o] = g.useState();
@@ -16604,7 +16589,7 @@ var Cr = "SelectContent", Gh = g.forwardRef(
16604
16589
  }
16605
16590
  );
16606
16591
  Gh.displayName = Cr;
16607
- var pn = 10, [Yh, sr] = Yr(Cr), ck = "SelectContentImpl", uk = $r("SelectContent.RemoveScroll"), Xh = g.forwardRef(
16592
+ var pn = 10, [Yh, sr] = Yr(Cr), lk = "SelectContentImpl", ck = $r("SelectContent.RemoveScroll"), Xh = g.forwardRef(
16608
16593
  (e, t) => {
16609
16594
  const {
16610
16595
  __scopeSelect: n,
@@ -16712,7 +16697,7 @@ var pn = 10, [Yh, sr] = Yr(Cr), ck = "SelectContentImpl", uk = $r("SelectContent
16712
16697
  position: r,
16713
16698
  isPositioned: O,
16714
16699
  searchRef: G,
16715
- children: /* @__PURE__ */ u.jsx(Js, { as: uk, allowPinchZoom: !0, children: /* @__PURE__ */ u.jsx(
16700
+ children: /* @__PURE__ */ u.jsx(Js, { as: ck, allowPinchZoom: !0, children: /* @__PURE__ */ u.jsx(
16716
16701
  Gs,
16717
16702
  {
16718
16703
  asChild: !0,
@@ -16774,8 +16759,8 @@ var pn = 10, [Yh, sr] = Yr(Cr), ck = "SelectContentImpl", uk = $r("SelectContent
16774
16759
  );
16775
16760
  }
16776
16761
  );
16777
- Xh.displayName = ck;
16778
- var dk = "SelectItemAlignedPosition", Jh = g.forwardRef((e, t) => {
16762
+ Xh.displayName = lk;
16763
+ var uk = "SelectItemAlignedPosition", Jh = g.forwardRef((e, t) => {
16779
16764
  const { __scopeSelect: n, onPlaced: r, ...o } = e, s = or(Cr, n), i = sr(Cr, n), [a, l] = g.useState(null), [c, d] = g.useState(null), f = Ve(t, (k) => d(k)), p = mi(n), h = g.useRef(!1), m = g.useRef(!0), { viewport: v, selectedItem: y, selectedItemText: x, focusSelectedItem: w } = i, b = g.useCallback(() => {
16780
16765
  if (s.trigger && s.valueNode && a && c && v && y && x) {
16781
16766
  const k = s.trigger.getBoundingClientRect(), A = c.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), j = x.getBoundingClientRect();
@@ -16843,7 +16828,7 @@ var dk = "SelectItemAlignedPosition", Jh = g.forwardRef((e, t) => {
16843
16828
  [b, w]
16844
16829
  );
16845
16830
  return /* @__PURE__ */ u.jsx(
16846
- pk,
16831
+ fk,
16847
16832
  {
16848
16833
  scope: n,
16849
16834
  contentWrapper: a,
@@ -16879,8 +16864,8 @@ var dk = "SelectItemAlignedPosition", Jh = g.forwardRef((e, t) => {
16879
16864
  }
16880
16865
  );
16881
16866
  });
16882
- Jh.displayName = dk;
16883
- var fk = "SelectPopperPosition", Sa = g.forwardRef((e, t) => {
16867
+ Jh.displayName = uk;
16868
+ var dk = "SelectPopperPosition", Sa = g.forwardRef((e, t) => {
16884
16869
  const {
16885
16870
  __scopeSelect: n,
16886
16871
  align: r = "start",
@@ -16908,8 +16893,8 @@ var fk = "SelectPopperPosition", Sa = g.forwardRef((e, t) => {
16908
16893
  }
16909
16894
  );
16910
16895
  });
16911
- Sa.displayName = fk;
16912
- var [pk, Nl] = Yr(Cr, {}), Ca = "SelectViewport", Zh = g.forwardRef(
16896
+ Sa.displayName = dk;
16897
+ var [fk, Nl] = Yr(Cr, {}), Ca = "SelectViewport", Zh = g.forwardRef(
16913
16898
  (e, t) => {
16914
16899
  const { __scopeSelect: n, nonce: r, ...o } = e, s = sr(Ca, n), i = Nl(Ca, n), a = Ve(t, s.onViewportChange), l = g.useRef(0);
16915
16900
  return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
@@ -16962,21 +16947,21 @@ var [pk, Nl] = Yr(Cr, {}), Ca = "SelectViewport", Zh = g.forwardRef(
16962
16947
  }
16963
16948
  );
16964
16949
  Zh.displayName = Ca;
16965
- var Qh = "SelectGroup", [hk, mk] = Yr(Qh), gk = g.forwardRef(
16950
+ var Qh = "SelectGroup", [pk, hk] = Yr(Qh), mk = g.forwardRef(
16966
16951
  (e, t) => {
16967
16952
  const { __scopeSelect: n, ...r } = e, o = On();
16968
- return /* @__PURE__ */ u.jsx(hk, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(Ne.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
16953
+ return /* @__PURE__ */ u.jsx(pk, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(Ne.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
16969
16954
  }
16970
16955
  );
16971
- gk.displayName = Qh;
16956
+ mk.displayName = Qh;
16972
16957
  var em = "SelectLabel", tm = g.forwardRef(
16973
16958
  (e, t) => {
16974
- const { __scopeSelect: n, ...r } = e, o = mk(em, n);
16959
+ const { __scopeSelect: n, ...r } = e, o = hk(em, n);
16975
16960
  return /* @__PURE__ */ u.jsx(Ne.div, { id: o.id, ...r, ref: t });
16976
16961
  }
16977
16962
  );
16978
16963
  tm.displayName = em;
16979
- var _s = "SelectItem", [xk, nm] = Yr(_s), rm = g.forwardRef(
16964
+ var _s = "SelectItem", [gk, nm] = Yr(_s), rm = g.forwardRef(
16980
16965
  (e, t) => {
16981
16966
  const {
16982
16967
  __scopeSelect: n,
@@ -16998,7 +16983,7 @@ var _s = "SelectItem", [xk, nm] = Yr(_s), rm = g.forwardRef(
16998
16983
  "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
16999
16984
  );
17000
16985
  return /* @__PURE__ */ u.jsx(
17001
- xk,
16986
+ gk,
17002
16987
  {
17003
16988
  scope: n,
17004
16989
  value: r,
@@ -17049,7 +17034,7 @@ var _s = "SelectItem", [xk, nm] = Yr(_s), rm = g.forwardRef(
17049
17034
  }),
17050
17035
  onKeyDown: ge(i.onKeyDown, (w) => {
17051
17036
  var T;
17052
- ((T = l.searchRef) == null ? void 0 : T.current) !== "" && w.key === " " || (nk.includes(w.key) && x(), w.key === " " && w.preventDefault());
17037
+ ((T = l.searchRef) == null ? void 0 : T.current) !== "" && w.key === " " || (tk.includes(w.key) && x(), w.key === " " && w.preventDefault());
17053
17038
  })
17054
17039
  }
17055
17040
  )
@@ -17062,7 +17047,7 @@ var _s = "SelectItem", [xk, nm] = Yr(_s), rm = g.forwardRef(
17062
17047
  rm.displayName = _s;
17063
17048
  var so = "SelectItemText", om = g.forwardRef(
17064
17049
  (e, t) => {
17065
- const { __scopeSelect: n, className: r, style: o, ...s } = e, i = or(so, n), a = sr(so, n), l = nm(so, n), c = ik(so, n), [d, f] = g.useState(null), p = Ve(
17050
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, i = or(so, n), a = sr(so, n), l = nm(so, n), c = sk(so, n), [d, f] = g.useState(null), p = Ve(
17066
17051
  t,
17067
17052
  (x) => f(x),
17068
17053
  l.onItemTextChange,
@@ -17163,21 +17148,21 @@ var cm = g.forwardRef((e, t) => {
17163
17148
  })
17164
17149
  }
17165
17150
  );
17166
- }), yk = "SelectSeparator", um = g.forwardRef(
17151
+ }), xk = "SelectSeparator", um = g.forwardRef(
17167
17152
  (e, t) => {
17168
17153
  const { __scopeSelect: n, ...r } = e;
17169
17154
  return /* @__PURE__ */ u.jsx(Ne.div, { "aria-hidden": !0, ...r, ref: t });
17170
17155
  }
17171
17156
  );
17172
- um.displayName = yk;
17173
- var Ra = "SelectArrow", vk = g.forwardRef(
17157
+ um.displayName = xk;
17158
+ var Ra = "SelectArrow", yk = g.forwardRef(
17174
17159
  (e, t) => {
17175
17160
  const { __scopeSelect: n, ...r } = e, o = gi(n), s = or(Ra, n), i = sr(Ra, n);
17176
17161
  return s.open && i.position === "popper" ? /* @__PURE__ */ u.jsx(dp, { ...o, ...r, ref: t }) : null;
17177
17162
  }
17178
17163
  );
17179
- vk.displayName = Ra;
17180
- var wk = "SelectBubbleInput", dm = g.forwardRef(
17164
+ yk.displayName = Ra;
17165
+ var vk = "SelectBubbleInput", dm = g.forwardRef(
17181
17166
  ({ __scopeSelect: e, value: t, ...n }, r) => {
17182
17167
  const o = g.useRef(null), s = Ve(r, o), i = Ph(t);
17183
17168
  return g.useEffect(() => {
@@ -17202,7 +17187,7 @@ var wk = "SelectBubbleInput", dm = g.forwardRef(
17202
17187
  );
17203
17188
  }
17204
17189
  );
17205
- dm.displayName = wk;
17190
+ dm.displayName = vk;
17206
17191
  function fm(e) {
17207
17192
  return e === "" || e === void 0;
17208
17193
  }
@@ -17222,18 +17207,18 @@ function pm(e) {
17222
17207
  }
17223
17208
  function hm(e, t, n) {
17224
17209
  const o = t.length > 1 && Array.from(t).every((c) => c === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
17225
- let i = bk(e, Math.max(s, 0));
17210
+ let i = wk(e, Math.max(s, 0));
17226
17211
  o.length === 1 && (i = i.filter((c) => c !== n));
17227
17212
  const l = i.find(
17228
17213
  (c) => c.textValue.toLowerCase().startsWith(o.toLowerCase())
17229
17214
  );
17230
17215
  return l !== n ? l : void 0;
17231
17216
  }
17232
- function bk(e, t) {
17217
+ function wk(e, t) {
17233
17218
  return e.map((n, r) => e[(t + r) % e.length]);
17234
17219
  }
17235
- var Sk = Bh, mm = Uh, Ck = Vh, Tk = Kh, kk = qh, gm = Gh, Rk = Zh, xm = tm, ym = rm, Ek = om, Ik = im, vm = am, wm = lm, bm = um;
17236
- const xu = Sk, yu = Ck, Ea = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
17220
+ var bk = Bh, mm = Uh, Sk = Vh, Ck = Kh, Tk = qh, gm = Gh, kk = Zh, xm = tm, ym = rm, Rk = om, Ek = im, vm = am, wm = lm, bm = um;
17221
+ const xu = bk, yu = Sk, Ea = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
17237
17222
  mm,
17238
17223
  {
17239
17224
  ref: r,
@@ -17244,7 +17229,7 @@ const xu = Sk, yu = Ck, Ea = g.forwardRef(({ className: e, children: t, ...n },
17244
17229
  ...n,
17245
17230
  children: [
17246
17231
  t,
17247
- /* @__PURE__ */ u.jsx(Tk, { asChild: !0, children: /* @__PURE__ */ u.jsx(Ps, { className: "h-4 w-4 opacity-50" }) })
17232
+ /* @__PURE__ */ u.jsx(Ck, { asChild: !0, children: /* @__PURE__ */ u.jsx(Ps, { className: "h-4 w-4 opacity-50" }) })
17248
17233
  ]
17249
17234
  }
17250
17235
  ));
@@ -17275,7 +17260,7 @@ const Cm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17275
17260
  }
17276
17261
  ));
17277
17262
  Cm.displayName = wm.displayName;
17278
- const Ia = g.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ u.jsx(kk, { children: /* @__PURE__ */ u.jsxs(
17263
+ const Ia = g.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ u.jsx(Tk, { children: /* @__PURE__ */ u.jsxs(
17279
17264
  gm,
17280
17265
  {
17281
17266
  ref: o,
@@ -17289,7 +17274,7 @@ const Ia = g.forwardRef(({ className: e, children: t, position: n = "popper", ..
17289
17274
  children: [
17290
17275
  /* @__PURE__ */ u.jsx(Sm, {}),
17291
17276
  /* @__PURE__ */ u.jsx(
17292
- Rk,
17277
+ kk,
17293
17278
  {
17294
17279
  className: ie(
17295
17280
  "p-1",
@@ -17303,7 +17288,7 @@ const Ia = g.forwardRef(({ className: e, children: t, position: n = "popper", ..
17303
17288
  }
17304
17289
  ) }));
17305
17290
  Ia.displayName = gm.displayName;
17306
- const Ak = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17291
+ const Ik = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17307
17292
  xm,
17308
17293
  {
17309
17294
  ref: n,
@@ -17311,7 +17296,7 @@ const Ak = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17311
17296
  ...t
17312
17297
  }
17313
17298
  ));
17314
- Ak.displayName = xm.displayName;
17299
+ Ik.displayName = xm.displayName;
17315
17300
  const ur = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
17316
17301
  ym,
17317
17302
  {
@@ -17322,13 +17307,13 @@ const ur = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
17322
17307
  ),
17323
17308
  ...n,
17324
17309
  children: [
17325
- /* @__PURE__ */ u.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ u.jsx(Ik, { children: /* @__PURE__ */ u.jsx(_a, { className: "h-4 w-4" }) }) }),
17326
- /* @__PURE__ */ u.jsx(Ek, { children: t })
17310
+ /* @__PURE__ */ u.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ u.jsx(Ek, { children: /* @__PURE__ */ u.jsx(_a, { className: "h-4 w-4" }) }) }),
17311
+ /* @__PURE__ */ u.jsx(Rk, { children: t })
17327
17312
  ]
17328
17313
  }
17329
17314
  ));
17330
17315
  ur.displayName = ym.displayName;
17331
- const Nk = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17316
+ const Ak = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17332
17317
  bm,
17333
17318
  {
17334
17319
  ref: n,
@@ -17336,9 +17321,9 @@ const Nk = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17336
17321
  ...t
17337
17322
  }
17338
17323
  ));
17339
- Nk.displayName = bm.displayName;
17340
- var _k = "Separator", vu = "horizontal", jk = ["horizontal", "vertical"], Tm = g.forwardRef((e, t) => {
17341
- const { decorative: n, orientation: r = vu, ...o } = e, s = Pk(r) ? r : vu, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
17324
+ Ak.displayName = bm.displayName;
17325
+ var Nk = "Separator", vu = "horizontal", _k = ["horizontal", "vertical"], Tm = g.forwardRef((e, t) => {
17326
+ const { decorative: n, orientation: r = vu, ...o } = e, s = jk(r) ? r : vu, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
17342
17327
  return /* @__PURE__ */ u.jsx(
17343
17328
  Ne.div,
17344
17329
  {
@@ -17349,9 +17334,9 @@ var _k = "Separator", vu = "horizontal", jk = ["horizontal", "vertical"], Tm = g
17349
17334
  }
17350
17335
  );
17351
17336
  });
17352
- Tm.displayName = _k;
17353
- function Pk(e) {
17354
- return jk.includes(e);
17337
+ Tm.displayName = Nk;
17338
+ function jk(e) {
17339
+ return _k.includes(e);
17355
17340
  }
17356
17341
  var km = Tm;
17357
17342
  const Rm = g.forwardRef(
@@ -17371,7 +17356,7 @@ const Rm = g.forwardRef(
17371
17356
  )
17372
17357
  );
17373
17358
  Rm.displayName = km.displayName;
17374
- const Ok = If, Mk = m0, Dk = Af, Em = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17359
+ const Pk = If, Ok = m0, Mk = Af, Em = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17375
17360
  Qs,
17376
17361
  {
17377
17362
  className: ie(
@@ -17383,7 +17368,7 @@ const Ok = If, Mk = m0, Dk = Af, Em = g.forwardRef(({ className: e, ...t }, n) =
17383
17368
  }
17384
17369
  ));
17385
17370
  Em.displayName = Qs.displayName;
17386
- const Lk = Os(
17371
+ const Dk = Os(
17387
17372
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
17388
17373
  {
17389
17374
  variants: {
@@ -17398,13 +17383,13 @@ const Lk = Os(
17398
17383
  side: "right"
17399
17384
  }
17400
17385
  }
17401
- ), Im = g.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ u.jsxs(Dk, { children: [
17386
+ ), Im = g.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ u.jsxs(Mk, { children: [
17402
17387
  /* @__PURE__ */ u.jsx(Em, {}),
17403
17388
  /* @__PURE__ */ u.jsxs(
17404
17389
  ei,
17405
17390
  {
17406
17391
  ref: o,
17407
- className: ie(Lk({ side: e }), t),
17392
+ className: ie(Dk({ side: e }), t),
17408
17393
  ...r,
17409
17394
  children: [
17410
17395
  n,
@@ -17449,7 +17434,7 @@ const _m = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
17449
17434
  }
17450
17435
  ));
17451
17436
  _m.displayName = ti.displayName;
17452
- const Fk = {
17437
+ const Lk = {
17453
17438
  api: {
17454
17439
  baseUrl: "http://localhost:8000/api",
17455
17440
  authToken: "",
@@ -17468,7 +17453,7 @@ const Fk = {
17468
17453
  showTypingIndicator: !0
17469
17454
  }
17470
17455
  };
17471
- function bR({ settings: e, onSettingsChange: t, className: n = "" }) {
17456
+ function wR({ settings: e, onSettingsChange: t, className: n = "" }) {
17472
17457
  const [r, o] = ye(!1), [s, i] = ye(!1), [a, l] = ye(e), [c, d] = ye(!1), { toast: f } = ol();
17473
17458
  at(() => {
17474
17459
  const y = JSON.stringify(a) !== JSON.stringify(e);
@@ -17482,7 +17467,7 @@ function bR({ settings: e, onSettingsChange: t, className: n = "" }) {
17482
17467
  description: "Your chat configuration has been updated successfully."
17483
17468
  });
17484
17469
  }, h = () => {
17485
- l(Fk), d(!0), f({
17470
+ l(Lk), d(!0), f({
17486
17471
  title: "Settings reset",
17487
17472
  description: "Configuration has been reset to defaults."
17488
17473
  });
@@ -17503,8 +17488,8 @@ function bR({ settings: e, onSettingsChange: t, className: n = "" }) {
17503
17488
  });
17504
17489
  }
17505
17490
  };
17506
- return /* @__PURE__ */ u.jsxs(Ok, { open: r, onOpenChange: o, children: [
17507
- /* @__PURE__ */ u.jsx(Mk, { asChild: !0, children: /* @__PURE__ */ u.jsxs(Ze, { variant: "outline", size: "sm", className: n, children: [
17491
+ return /* @__PURE__ */ u.jsxs(Pk, { open: r, onOpenChange: o, children: [
17492
+ /* @__PURE__ */ u.jsx(Ok, { asChild: !0, children: /* @__PURE__ */ u.jsxs(Ze, { variant: "outline", size: "sm", className: n, children: [
17508
17493
  /* @__PURE__ */ u.jsx(Jm, { className: "h-4 w-4 mr-2" }),
17509
17494
  "Settings",
17510
17495
  c && /* @__PURE__ */ u.jsx(Fd, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
@@ -17753,7 +17738,7 @@ function bR({ settings: e, onSettingsChange: t, className: n = "" }) {
17753
17738
  ] })
17754
17739
  ] });
17755
17740
  }
17756
- function SR({
17741
+ function bR({
17757
17742
  layout: e = "sidebar",
17758
17743
  layoutSize: t = "desktop",
17759
17744
  showThreads: n = !0,
@@ -17831,20 +17816,20 @@ export {
17831
17816
  Hx as ChatApi,
17832
17817
  Vi as ChatInterface,
17833
17818
  Ei as ChatProviders,
17834
- bR as ChatSettings,
17819
+ wR as ChatSettings,
17835
17820
  Zd as MarkdownContent,
17836
- R0 as MessageComponent,
17821
+ k0 as MessageComponent,
17837
17822
  $f as MessageList,
17838
17823
  gu as ThreadManager,
17839
- yR as applySettings,
17824
+ xR as applySettings,
17840
17825
  gr as chatApiClient,
17841
- SR as default,
17826
+ bR as default,
17842
17827
  Bx as del,
17843
17828
  An as get,
17844
17829
  Lx as getChatToken,
17845
- xR as getCurrentSettings,
17846
- HT as getDefaultApiConfig,
17847
- UT as getDefaultChatSettings,
17830
+ gR as getCurrentSettings,
17831
+ BT as getDefaultApiConfig,
17832
+ HT as getDefaultChatSettings,
17848
17833
  Fx as onChatTokenChanged,
17849
17834
  $x as post,
17850
17835
  zx as put,