teodor-new-chat-ui 4.3.475 → 4.3.476

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
@@ -41,7 +41,7 @@ function tN(e) {
41
41
  function cx(e) {
42
42
  const t = /* @__PURE__ */ new Map(), n = [], r = /* @__PURE__ */ new Map(), o = [];
43
43
  for (let c = 0; c < e.length; c++) {
44
- const d = e[c], p = d.checkpointId, h = p ?? `cp-${c}`, f = d.metadata ?? {}, v = typeof f.step == "number" ? f.step : null, g = typeof f.source == "string" ? f.source : null;
44
+ const d = e[c], f = d.checkpointId, h = f ?? `cp-${c}`, p = d.metadata ?? {}, v = typeof p.step == "number" ? p.step : null, g = typeof p.source == "string" ? p.source : null;
45
45
  let x = null, b = null;
46
46
  const w = Array.isArray(d.messages) ? d.messages : [];
47
47
  for (const T of w)
@@ -57,9 +57,9 @@ function cx(e) {
57
57
  parentConfig: C,
58
58
  userMessageId: x
59
59
  };
60
- if (o.push(S), p && t.set(p, S), p && b) {
60
+ if (o.push(S), f && t.set(f, S), f && b) {
61
61
  const T = Wu(b);
62
- T && r.set(p, T);
62
+ T && r.set(f, T);
63
63
  }
64
64
  n.push({
65
65
  id: h,
@@ -79,14 +79,14 @@ function cx(e) {
79
79
  }
80
80
  for (const c of s.values()) {
81
81
  if (!c.length) continue;
82
- c.sort((p, h) => {
83
- const f = p.createdAt ? Date.parse(p.createdAt) : 0;
84
- return (h.createdAt ? Date.parse(h.createdAt) : 0) - f;
82
+ c.sort((f, h) => {
83
+ const p = f.createdAt ? Date.parse(f.createdAt) : 0;
84
+ return (h.createdAt ? Date.parse(h.createdAt) : 0) - p;
85
85
  });
86
86
  const d = c.length;
87
- for (let p = 0; p < c.length; p++) {
88
- const h = c[p];
89
- h.attemptCount = d, h.attemptIndex = p, h.isLatestAttempt = p === 0;
87
+ for (let f = 0; f < c.length; f++) {
88
+ const h = c[f];
89
+ h.attemptCount = d, h.attemptIndex = f, h.isLatestAttempt = f === 0;
90
90
  }
91
91
  }
92
92
  return {
@@ -102,11 +102,11 @@ function cx(e) {
102
102
  getCheckpoint: (c) => t.get(c),
103
103
  getMessageAttempts: (c) => {
104
104
  const d = [];
105
- for (const p of t.values())
106
- p.userMessageId === c && d.push(p);
107
- return d.length ? (d.sort((p, h) => {
108
- const f = typeof p.attemptIndex == "number" ? p.attemptIndex : Number.MAX_SAFE_INTEGER, v = typeof h.attemptIndex == "number" ? h.attemptIndex : Number.MAX_SAFE_INTEGER;
109
- return f - v;
105
+ for (const f of t.values())
106
+ f.userMessageId === c && d.push(f);
107
+ return d.length ? (d.sort((f, h) => {
108
+ const p = typeof f.attemptIndex == "number" ? f.attemptIndex : Number.MAX_SAFE_INTEGER, v = typeof h.attemptIndex == "number" ? h.attemptIndex : Number.MAX_SAFE_INTEGER;
109
+ return p - v;
110
110
  }), d) : [];
111
111
  }
112
112
  };
@@ -172,7 +172,7 @@ function Xn(e) {
172
172
  function px(e, t) {
173
173
  var y;
174
174
  if (!e) return null;
175
- const r = (Array.isArray((y = e.values) == null ? void 0 : y.messages) ? e.values.messages : []).map((C) => hx(C)).filter((C) => !!C), o = er(e.metadata) ?? {}, s = Gl(e.config), a = er(e.parent_config ?? e.parentConfig), i = Gl(a), l = Yn(s, ["checkpoint_id", "checkpointId"]), c = Yn(s, ["checkpoint_ns", "checkpointNs"]), d = Yn(i, ["checkpoint_id", "checkpointId"]), p = Yn(i, ["checkpoint_id", "checkpointId"]) ?? null, h = Yn(i, ["checkpoint_ns", "checkpointNs"]) ?? null, f = er(e.config), v = Array.isArray(e.tasks) ? e.tasks.map((C) => ({ ...C })) : e.tasks ?? null, g = Array.isArray(e.next) ? [...e.next] : e.next ?? null, x = typeof e.created_at == "string" && e.created_at.trim() ? e.created_at : typeof e.createdAt == "string" && e.createdAt.trim() ? e.createdAt : new Date(Date.now() - t).toISOString(), b = {
175
+ const r = (Array.isArray((y = e.values) == null ? void 0 : y.messages) ? e.values.messages : []).map((C) => hx(C)).filter((C) => !!C), o = er(e.metadata) ?? {}, s = Gl(e.config), a = er(e.parent_config ?? e.parentConfig), i = Gl(a), l = Yn(s, ["checkpoint_id", "checkpointId"]), c = Yn(s, ["checkpoint_ns", "checkpointNs"]), d = Yn(i, ["checkpoint_id", "checkpointId"]), f = Yn(i, ["checkpoint_id", "checkpointId"]) ?? null, h = Yn(i, ["checkpoint_ns", "checkpointNs"]) ?? null, p = er(e.config), v = Array.isArray(e.tasks) ? e.tasks.map((C) => ({ ...C })) : e.tasks ?? null, g = Array.isArray(e.next) ? [...e.next] : e.next ?? null, x = typeof e.created_at == "string" && e.created_at.trim() ? e.created_at : typeof e.createdAt == "string" && e.createdAt.trim() ? e.createdAt : new Date(Date.now() - t).toISOString(), b = {
176
176
  ...o,
177
177
  step: fx(o, ["step"]) ?? 0,
178
178
  source: Yn(o, ["source"]) ?? null
@@ -186,11 +186,11 @@ function px(e, t) {
186
186
  createdAt: x,
187
187
  parentId: d ?? null,
188
188
  messages: w,
189
- nextCursor: p,
189
+ nextCursor: f,
190
190
  nextCursorNs: h,
191
191
  interrupt: vx(r, t),
192
192
  metadata: b,
193
- config: f ?? null,
193
+ config: p ?? null,
194
194
  parentConfig: a ?? null,
195
195
  next: g,
196
196
  tasks: v
@@ -285,11 +285,11 @@ function bx() {
285
285
  Xl = 1;
286
286
  var e = O, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
287
287
  function a(i, l, c) {
288
- var d, p = {}, h = null, f = null;
289
- c !== void 0 && (h = "" + c), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (f = l.ref);
290
- for (d in l) r.call(l, d) && !s.hasOwnProperty(d) && (p[d] = l[d]);
291
- if (i && i.defaultProps) for (d in l = i.defaultProps, l) p[d] === void 0 && (p[d] = l[d]);
292
- return { $$typeof: t, type: i, key: h, ref: f, props: p, _owner: o.current };
288
+ var d, f = {}, h = null, p = null;
289
+ c !== void 0 && (h = "" + c), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (p = l.ref);
290
+ for (d in l) r.call(l, d) && !s.hasOwnProperty(d) && (f[d] = l[d]);
291
+ if (i && i.defaultProps) for (d in l = i.defaultProps, l) f[d] === void 0 && (f[d] = l[d]);
292
+ return { $$typeof: t, type: i, key: h, ref: p, props: f, _owner: o.current };
293
293
  }
294
294
  return Kr.Fragment = n, Kr.jsx = a, Kr.jsxs = a, Kr;
295
295
  }
@@ -306,7 +306,7 @@ var qr = {};
306
306
  var Jl;
307
307
  function yx() {
308
308
  return Jl || (Jl = 1, process.env.NODE_ENV !== "production" && function() {
309
- var e = O, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), v = Symbol.iterator, g = "@@iterator";
309
+ var e = O, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, g = "@@iterator";
310
310
  function x(R) {
311
311
  if (R === null || typeof R != "object")
312
312
  return null;
@@ -334,7 +334,7 @@ function yx() {
334
334
  var C = !1, S = !1, T = !1, E = !1, N = !1, A;
335
335
  A = Symbol.for("react.module.reference");
336
336
  function D(R) {
337
- return !!(typeof R == "string" || typeof R == "function" || R === r || R === s || N || R === o || R === c || R === d || E || R === f || C || S || T || typeof R == "object" && R !== null && (R.$$typeof === h || R.$$typeof === p || R.$$typeof === a || R.$$typeof === i || R.$$typeof === l || // This needs to include all possible module reference object
337
+ return !!(typeof R == "string" || typeof R == "function" || R === r || R === s || N || R === o || R === c || R === d || E || R === p || C || S || T || typeof R == "object" && R !== null && (R.$$typeof === h || R.$$typeof === f || R.$$typeof === a || R.$$typeof === i || R.$$typeof === l || // This needs to include all possible module reference object
338
338
  // types supported by any Flight configuration anywhere since
339
339
  // we don't know which Flight build this will end up being used
340
340
  // with.
@@ -381,7 +381,7 @@ function yx() {
381
381
  return U(le._context) + ".Provider";
382
382
  case l:
383
383
  return F(R, R.render, "ForwardRef");
384
- case p:
384
+ case f:
385
385
  var Re = R.displayName || null;
386
386
  return Re !== null ? Re : q(R.type) || "Memo";
387
387
  case h: {
@@ -571,7 +571,7 @@ function yx() {
571
571
  switch (R.$$typeof) {
572
572
  case l:
573
573
  return ae(R.render);
574
- case p:
574
+ case f:
575
575
  return ue(R.type, ne, le);
576
576
  case h: {
577
577
  var Re = R, Ze = Re._payload, ot = Re._init;
@@ -811,7 +811,7 @@ Check the top-level render call using <` + le + ">.");
811
811
  le = ne.propTypes;
812
812
  else if (typeof ne == "object" && (ne.$$typeof === l || // Note: Memo only checks outer props here.
813
813
  // Inner props are checked in the reconciler.
814
- ne.$$typeof === p))
814
+ ne.$$typeof === f))
815
815
  le = ne.propTypes;
816
816
  else
817
817
  return;
@@ -918,14 +918,14 @@ const rN = ({
918
918
  /* @__PURE__ */ u.jsxs("div", { className: "relative flex-1 overflow-y-auto pt-4 pb-2 pr-1", children: [
919
919
  /* @__PURE__ */ u.jsx("div", { className: "absolute left-0 right-0 top-1 px-2 pb-3 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: /* @__PURE__ */ u.jsx("span", { children: "Timeline" }) }),
920
920
  /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute left-3 top-0 bottom-0 w-px bg-border/40" }),
921
- /* @__PURE__ */ u.jsx("div", { className: "flex flex-col gap-3 pt-6 pr-2", children: c.map((f) => {
922
- const v = d === f.id, g = (r == null ? void 0 : r.get(f.id)) ?? null;
921
+ /* @__PURE__ */ u.jsx("div", { className: "flex flex-col gap-3 pt-6 pr-2", children: c.map((p) => {
922
+ const v = d === p.id, g = (r == null ? void 0 : r.get(p.id)) ?? null;
923
923
  return /* @__PURE__ */ u.jsxs(
924
924
  "button",
925
925
  {
926
926
  type: "button",
927
927
  disabled: !n,
928
- onClick: () => n == null ? void 0 : n(f.id),
928
+ onClick: () => n == null ? void 0 : n(p.id),
929
929
  className: `relative flex items-start gap-2 text-left text-[11px] transition ${v ? "text-primary" : "text-muted-foreground"} ${n ? "hover:text-foreground" : "cursor-default opacity-70"}`,
930
930
  children: [
931
931
  /* @__PURE__ */ u.jsx(
@@ -936,10 +936,10 @@ const rN = ({
936
936
  }
937
937
  ),
938
938
  /* @__PURE__ */ u.jsxs("span", { className: "flex-1", children: [
939
- /* @__PURE__ */ u.jsx("span", { className: "block font-medium leading-tight", children: f.label || "User input" }),
939
+ /* @__PURE__ */ u.jsx("span", { className: "block font-medium leading-tight", children: p.label || "User input" }),
940
940
  /* @__PURE__ */ u.jsxs("span", { className: "text-[9px] uppercase tracking-wide text-muted-foreground/70", children: [
941
- f.step !== null ? `STEP ${f.step}` : "STEP —",
942
- f.next ? ` - ${f.next}` : ""
941
+ p.step !== null ? `STEP ${p.step}` : "STEP —",
942
+ p.next ? ` - ${p.next}` : ""
943
943
  ] }),
944
944
  g && /* @__PURE__ */ u.jsx(
945
945
  "p",
@@ -952,7 +952,7 @@ const rN = ({
952
952
  ] })
953
953
  ]
954
954
  },
955
- f.id
955
+ p.id
956
956
  );
957
957
  }) })
958
958
  ] }),
@@ -1316,29 +1316,29 @@ function Os(e, t, n) {
1316
1316
  }
1317
1317
  return Ya(v) ? !0 : (t.append(Ql(x, g, s), c(v)), !1);
1318
1318
  }
1319
- const p = [], h = Object.assign(cv, {
1319
+ const f = [], h = Object.assign(cv, {
1320
1320
  defaultVisitor: d,
1321
1321
  convertValue: c,
1322
1322
  isVisitable: Ya
1323
1323
  });
1324
- function f(v, g) {
1324
+ function p(v, g) {
1325
1325
  if (!W.isUndefined(v)) {
1326
- if (p.indexOf(v) !== -1)
1326
+ if (f.indexOf(v) !== -1)
1327
1327
  throw Error("Circular reference detected in " + g.join("."));
1328
- p.push(v), W.forEach(v, function(b, w) {
1328
+ f.push(v), W.forEach(v, function(b, w) {
1329
1329
  (!(W.isUndefined(b) || b === null) && o.call(
1330
1330
  t,
1331
1331
  b,
1332
1332
  W.isString(w) ? w.trim() : w,
1333
1333
  g,
1334
1334
  h
1335
- )) === !0 && f(b, g ? g.concat(w) : [w]);
1336
- }), p.pop();
1335
+ )) === !0 && p(b, g ? g.concat(w) : [w]);
1336
+ }), f.pop();
1337
1337
  }
1338
1338
  }
1339
1339
  if (!W.isObject(e))
1340
1340
  throw new TypeError("data must be an object");
1341
- return f(e), t;
1341
+ return p(e), t;
1342
1342
  }
1343
1343
  function ec(e) {
1344
1344
  const t = {
@@ -1653,8 +1653,8 @@ let Kt = class {
1653
1653
  const d = Gr(l);
1654
1654
  if (!d)
1655
1655
  throw new Error("header name must be a non-empty string");
1656
- const p = W.findKey(o, d);
1657
- (!p || o[p] === void 0 || c === !0 || c === void 0 && o[p] !== !1) && (o[p || l] = Qo(i));
1656
+ const f = W.findKey(o, d);
1657
+ (!f || o[f] === void 0 || c === !0 || c === void 0 && o[f] !== !1) && (o[f || l] = Qo(i));
1658
1658
  }
1659
1659
  const a = (i, l) => W.forEach(i, (c, d) => s(c, d, l));
1660
1660
  if (W.isPlainObject(t) || t instanceof this.constructor)
@@ -1817,13 +1817,13 @@ function Av(e, t) {
1817
1817
  return t = t !== void 0 ? t : 1e3, function(l) {
1818
1818
  const c = Date.now(), d = r[s];
1819
1819
  a || (a = c), n[o] = l, r[o] = c;
1820
- let p = s, h = 0;
1821
- for (; p !== o; )
1822
- h += n[p++], p = p % e;
1820
+ let f = s, h = 0;
1821
+ for (; f !== o; )
1822
+ h += n[f++], f = f % e;
1823
1823
  if (o = (o + 1) % e, o === s && (s = (s + 1) % e), c - a < t)
1824
1824
  return;
1825
- const f = d && c - d;
1826
- return f ? Math.round(h * 1e3 / f) : void 0;
1825
+ const p = d && c - d;
1826
+ return p ? Math.round(h * 1e3 / p) : void 0;
1827
1827
  };
1828
1828
  }
1829
1829
  function jv(e, t) {
@@ -1832,10 +1832,10 @@ function jv(e, t) {
1832
1832
  n = d, o = null, s && (clearTimeout(s), s = null), e(...c);
1833
1833
  };
1834
1834
  return [(...c) => {
1835
- const d = Date.now(), p = d - n;
1836
- p >= r ? a(c, d) : (o = c, s || (s = setTimeout(() => {
1835
+ const d = Date.now(), f = d - n;
1836
+ f >= r ? a(c, d) : (o = c, s || (s = setTimeout(() => {
1837
1837
  s = null, a(o);
1838
- }, r - p)));
1838
+ }, r - f)));
1839
1839
  }, () => o && a(o)];
1840
1840
  }
1841
1841
  const fs = (e, t, n = 3) => {
@@ -1844,7 +1844,7 @@ const fs = (e, t, n = 3) => {
1844
1844
  return jv((s) => {
1845
1845
  const a = s.loaded, i = s.lengthComputable ? s.total : void 0, l = a - r, c = o(l), d = a <= i;
1846
1846
  r = a;
1847
- const p = {
1847
+ const f = {
1848
1848
  loaded: a,
1849
1849
  total: i,
1850
1850
  progress: i ? a / i : void 0,
@@ -1855,7 +1855,7 @@ const fs = (e, t, n = 3) => {
1855
1855
  lengthComputable: i != null,
1856
1856
  [t ? "download" : "upload"]: !0
1857
1857
  };
1858
- e(p);
1858
+ e(f);
1859
1859
  }, n);
1860
1860
  }, rc = (e, t) => {
1861
1861
  const n = e != null;
@@ -1908,14 +1908,14 @@ const sc = (e) => e instanceof Kt ? { ...e } : e;
1908
1908
  function ar(e, t) {
1909
1909
  t = t || {};
1910
1910
  const n = {};
1911
- function r(c, d, p, h) {
1911
+ function r(c, d, f, h) {
1912
1912
  return W.isPlainObject(c) && W.isPlainObject(d) ? W.merge.call({ caseless: h }, c, d) : W.isPlainObject(d) ? W.merge({}, d) : W.isArray(d) ? d.slice() : d;
1913
1913
  }
1914
- function o(c, d, p, h) {
1914
+ function o(c, d, f, h) {
1915
1915
  if (W.isUndefined(d)) {
1916
1916
  if (!W.isUndefined(c))
1917
- return r(void 0, c, p, h);
1918
- } else return r(c, d, p, h);
1917
+ return r(void 0, c, f, h);
1918
+ } else return r(c, d, f, h);
1919
1919
  }
1920
1920
  function s(c, d) {
1921
1921
  if (!W.isUndefined(d))
@@ -1927,10 +1927,10 @@ function ar(e, t) {
1927
1927
  return r(void 0, c);
1928
1928
  } else return r(void 0, d);
1929
1929
  }
1930
- function i(c, d, p) {
1931
- if (p in t)
1930
+ function i(c, d, f) {
1931
+ if (f in t)
1932
1932
  return r(c, d);
1933
- if (p in e)
1933
+ if (f in e)
1934
1934
  return r(void 0, c);
1935
1935
  }
1936
1936
  const l = {
@@ -1962,11 +1962,11 @@ function ar(e, t) {
1962
1962
  socketPath: a,
1963
1963
  responseEncoding: a,
1964
1964
  validateStatus: i,
1965
- headers: (c, d, p) => o(sc(c), sc(d), p, !0)
1965
+ headers: (c, d, f) => o(sc(c), sc(d), f, !0)
1966
1966
  };
1967
1967
  return W.forEach(Object.keys({ ...e, ...t }), function(d) {
1968
- const p = l[d] || o, h = p(e[d], t[d], d);
1969
- W.isUndefined(h) && p !== i || (n[d] = h);
1968
+ const f = l[d] || o, h = f(e[d], t[d], d);
1969
+ W.isUndefined(h) && f !== i || (n[d] = h);
1970
1970
  }), n;
1971
1971
  }
1972
1972
  const cd = (e) => {
@@ -1980,8 +1980,8 @@ const cd = (e) => {
1980
1980
  a.setContentType(void 0);
1981
1981
  else if (W.isFunction(n.getHeaders)) {
1982
1982
  const l = n.getHeaders(), c = ["content-type", "content-length"];
1983
- Object.entries(l).forEach(([d, p]) => {
1984
- c.includes(d.toLowerCase()) && a.set(d, p);
1983
+ Object.entries(l).forEach(([d, f]) => {
1984
+ c.includes(d.toLowerCase()) && a.set(d, f);
1985
1985
  });
1986
1986
  }
1987
1987
  }
@@ -1995,9 +1995,9 @@ const cd = (e) => {
1995
1995
  const o = cd(e);
1996
1996
  let s = o.data;
1997
1997
  const a = Kt.from(o.headers).normalize();
1998
- let { responseType: i, onUploadProgress: l, onDownloadProgress: c } = o, d, p, h, f, v;
1998
+ let { responseType: i, onUploadProgress: l, onDownloadProgress: c } = o, d, f, h, p, v;
1999
1999
  function g() {
2000
- f && f(), v && v(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
2000
+ p && p(), v && v(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
2001
2001
  }
2002
2002
  let x = new XMLHttpRequest();
2003
2003
  x.open(o.method.toUpperCase(), o.url, !0), x.timeout = o.timeout;
@@ -2038,7 +2038,7 @@ const cd = (e) => {
2038
2038
  )), x = null;
2039
2039
  }, s === void 0 && a.setContentType(null), "setRequestHeader" in x && W.forEach(a.toJSON(), function(C, S) {
2040
2040
  x.setRequestHeader(S, C);
2041
- }), W.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), i && i !== "json" && (x.responseType = o.responseType), c && ([h, v] = fs(c, !0), x.addEventListener("progress", h)), l && x.upload && ([p, f] = fs(l), x.upload.addEventListener("progress", p), x.upload.addEventListener("loadend", f)), (o.cancelToken || o.signal) && (d = (y) => {
2041
+ }), W.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), i && i !== "json" && (x.responseType = o.responseType), c && ([h, v] = fs(c, !0), x.addEventListener("progress", h)), l && x.upload && ([f, p] = fs(l), x.upload.addEventListener("progress", f), x.upload.addEventListener("loadend", p)), (o.cancelToken || o.signal) && (d = (y) => {
2042
2042
  x && (r(!y || y.type ? new $r(null, e, x) : y), x.abort(), x = null);
2043
2043
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
2044
2044
  const w = Nv(o.url);
@@ -2112,9 +2112,9 @@ const cd = (e) => {
2112
2112
  i(), l.close();
2113
2113
  return;
2114
2114
  }
2115
- let p = d.byteLength;
2115
+ let f = d.byteLength;
2116
2116
  if (n) {
2117
- let h = s += p;
2117
+ let h = s += f;
2118
2118
  n(h);
2119
2119
  }
2120
2120
  l.enqueue(new Uint8Array(d));
@@ -2157,11 +2157,11 @@ const cd = (e) => {
2157
2157
  }
2158
2158
  }).headers.has("Content-Type");
2159
2159
  return v && !g;
2160
- }), d = a && i && uc(() => W.isReadableStream(new r("").body)), p = {
2160
+ }), d = a && i && uc(() => W.isReadableStream(new r("").body)), f = {
2161
2161
  stream: d && ((v) => v.body)
2162
2162
  };
2163
2163
  o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((v) => {
2164
- !p[v] && (p[v] = (g, x) => {
2164
+ !f[v] && (f[v] = (g, x) => {
2165
2165
  let b = g && g[v];
2166
2166
  if (b)
2167
2167
  return b.call(g);
@@ -2182,7 +2182,7 @@ const cd = (e) => {
2182
2182
  return v.byteLength;
2183
2183
  if (W.isURLSearchParams(v) && (v = v + ""), W.isString(v))
2184
2184
  return (await l(v)).byteLength;
2185
- }, f = async (v, g) => {
2185
+ }, p = async (v, g) => {
2186
2186
  const x = W.toFiniteNumber(v.getContentLength());
2187
2187
  return x ?? h(g);
2188
2188
  };
@@ -2208,7 +2208,7 @@ const cd = (e) => {
2208
2208
  });
2209
2209
  let G;
2210
2210
  try {
2211
- if (T && c && x !== "get" && x !== "head" && (G = await f(N, b)) !== 0) {
2211
+ if (T && c && x !== "get" && x !== "head" && (G = await p(N, b)) !== 0) {
2212
2212
  let V = new n(g, {
2213
2213
  method: "POST",
2214
2214
  body: b,
@@ -2252,7 +2252,7 @@ const cd = (e) => {
2252
2252
  );
2253
2253
  }
2254
2254
  E = E || "text";
2255
- let H = await p[W.findKey(p, E) || "text"](_, v);
2255
+ let H = await f[W.findKey(f, E) || "text"](_, v);
2256
2256
  return !k && I && I(), await new Promise((V, j) => {
2257
2257
  id(V, j, {
2258
2258
  data: H,
@@ -2470,31 +2470,31 @@ let tr = class {
2470
2470
  this.interceptors.response.forEach(function(g) {
2471
2471
  c.push(g.fulfilled, g.rejected);
2472
2472
  });
2473
- let d, p = 0, h;
2473
+ let d, f = 0, h;
2474
2474
  if (!l) {
2475
2475
  const v = [fc.bind(this), void 0];
2476
- for (v.unshift(...i), v.push(...c), h = v.length, d = Promise.resolve(n); p < h; )
2477
- d = d.then(v[p++], v[p++]);
2476
+ for (v.unshift(...i), v.push(...c), h = v.length, d = Promise.resolve(n); f < h; )
2477
+ d = d.then(v[f++], v[f++]);
2478
2478
  return d;
2479
2479
  }
2480
2480
  h = i.length;
2481
- let f = n;
2482
- for (; p < h; ) {
2483
- const v = i[p++], g = i[p++];
2481
+ let p = n;
2482
+ for (; f < h; ) {
2483
+ const v = i[f++], g = i[f++];
2484
2484
  try {
2485
- f = v(f);
2485
+ p = v(p);
2486
2486
  } catch (x) {
2487
2487
  g.call(this, x);
2488
2488
  break;
2489
2489
  }
2490
2490
  }
2491
2491
  try {
2492
- d = fc.call(this, f);
2492
+ d = fc.call(this, p);
2493
2493
  } catch (v) {
2494
2494
  return Promise.reject(v);
2495
2495
  }
2496
- for (p = 0, h = c.length; p < h; )
2497
- d = d.then(c[p++], c[p++]);
2496
+ for (f = 0, h = c.length; f < h; )
2497
+ d = d.then(c[f++], c[f++]);
2498
2498
  return d;
2499
2499
  }
2500
2500
  getUri(t) {
@@ -3008,14 +3008,14 @@ function xd(e, t, n, r) {
3008
3008
  return { newParts: e, newMeta: o, changed: !1 };
3009
3009
  o.lastSeq = r;
3010
3010
  }
3011
- const s = t.filter((p) => p.type === "text").map((p) => p.text ?? "").join(""), a = t.filter((p) => p.type !== "text"), i = o.lastText ?? gd(e);
3011
+ const s = t.filter((f) => f.type === "text").map((f) => f.text ?? "").join(""), a = t.filter((f) => f.type !== "text"), i = o.lastText ?? gd(e);
3012
3012
  let l = "", c = e.slice();
3013
3013
  if (s) {
3014
- const p = lw(i, s);
3015
- if (p === "" ? l = "" : p === s ? l = s : l = p, l) {
3014
+ const f = lw(i, s);
3015
+ if (f === "" ? l = "" : f === s ? l = s : l = f, l) {
3016
3016
  const h = c[c.length - 1];
3017
3017
  if ((h == null ? void 0 : h.type) === "text") {
3018
- const f = h.text ?? "", v = { ...h, text: f + l };
3018
+ const p = h.text ?? "", v = { ...h, text: p + l };
3019
3019
  c = [...c.slice(0, c.length - 1), v];
3020
3020
  } else
3021
3021
  c = [...c, { type: "text", text: l }];
@@ -3060,7 +3060,7 @@ function vd(e) {
3060
3060
  return t[t.length - 1] || null;
3061
3061
  }
3062
3062
  function uw(e = {}) {
3063
- const t = $e(() => An(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = fe(e.token ?? null), s = Oe(e.headers ?? {}), a = e.credentials ?? "include", [i, l] = fe(!1), [c, d] = fe(null), [p, h] = fe(""), [f, v] = fe(null), [g, x] = fe(0), [b, w] = fe(!1), [y, C] = fe(null), S = Oe(null), T = Oe(!0), E = Oe(0), N = Oe(null), A = Oe(null), D = Oe(null), F = Oe(null), U = Oe({
3063
+ const t = $e(() => An(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = fe(e.token ?? null), s = Oe(e.headers ?? {}), a = e.credentials ?? "include", [i, l] = fe(!1), [c, d] = fe(null), [f, h] = fe(""), [p, v] = fe(null), [g, x] = fe(0), [b, w] = fe(!1), [y, C] = fe(null), S = Oe(null), T = Oe(!0), E = Oe(0), N = Oe(null), A = Oe(null), D = Oe(null), F = Oe(null), U = Oe({
3064
3064
  messageId: null,
3065
3065
  lastSeq: null,
3066
3066
  lastText: ""
@@ -3354,9 +3354,9 @@ function uw(e = {}) {
3354
3354
  }, []), {
3355
3355
  isStreaming: i,
3356
3356
  error: c,
3357
- assistantText: p,
3357
+ assistantText: f,
3358
3358
  assistantMessage: y,
3359
- lastCheckpointId: f,
3359
+ lastCheckpointId: p,
3360
3360
  lastSeq: g,
3361
3361
  connected: b,
3362
3362
  stream: K,
@@ -3415,7 +3415,7 @@ function pw({
3415
3415
  onThreadChange: r,
3416
3416
  onCurrentThreadDeleted: o
3417
3417
  }) {
3418
- const [s, a] = fe([]), [i, l] = fe(t), [c, d] = fe(!1), [p, h] = fe(null), [f, v] = fe([]), [g, x] = fe(!1), [, b] = fe(null), [w, y] = fe(null), [C, S] = fe(!1), T = Oe(i), E = Oe(/* @__PURE__ */ new Map());
3418
+ const [s, a] = fe([]), [i, l] = fe(t), [c, d] = fe(!1), [f, h] = fe(null), [p, v] = fe([]), [g, x] = fe(!1), [, b] = fe(null), [w, y] = fe(null), [C, S] = fe(!1), T = Oe(i), E = Oe(/* @__PURE__ */ new Map());
3419
3419
  Qe(() => {
3420
3420
  T.current = i;
3421
3421
  }, [i]);
@@ -3546,8 +3546,8 @@ function pw({
3546
3546
  currentThreadIdRef: T,
3547
3547
  setCurrentThreadId: l,
3548
3548
  isLoadingThreads: c,
3549
- threadsError: p,
3550
- sharedThreads: f,
3549
+ threadsError: f,
3550
+ sharedThreads: p,
3551
3551
  isLoadingSharedThreads: g,
3552
3552
  actions: G,
3553
3553
  addThreadFromEvent: K,
@@ -3570,9 +3570,9 @@ function hw({
3570
3570
  currentThreadIdRef: l,
3571
3571
  isLoadingThreads: c,
3572
3572
  threadsError: d,
3573
- sharedThreads: p,
3573
+ sharedThreads: f,
3574
3574
  isLoadingSharedThreads: h,
3575
- actions: f,
3575
+ actions: p,
3576
3576
  addThreadFromEvent: v,
3577
3577
  shareInFlight: g,
3578
3578
  shareStatus: x,
@@ -3590,9 +3590,9 @@ function hw({
3590
3590
  currentThreadIdRef: l,
3591
3591
  isLoading: c,
3592
3592
  error: d,
3593
- sharedThreads: p,
3593
+ sharedThreads: f,
3594
3594
  isLoadingSharedThreads: h,
3595
- actions: f,
3595
+ actions: p,
3596
3596
  shareInFlight: g,
3597
3597
  shareStatus: x,
3598
3598
  clearShareStatus: b,
@@ -3605,9 +3605,9 @@ function hw({
3605
3605
  l,
3606
3606
  c,
3607
3607
  d,
3608
- p,
3609
- h,
3610
3608
  f,
3609
+ h,
3610
+ p,
3611
3611
  g,
3612
3612
  x,
3613
3613
  b,
@@ -3874,9 +3874,9 @@ function kw(e = []) {
3874
3874
  }, []);
3875
3875
  const c = $e(() => ({
3876
3876
  reset: (d) => n({ type: "reset", payload: { messages: d } }),
3877
- seed: (d, p) => n({ type: "seed", payload: { messages: d, ...p ?? {} } }),
3877
+ seed: (d, f) => n({ type: "seed", payload: { messages: d, ...f ?? {} } }),
3878
3878
  prepend: (d) => n({ type: "prepend", payload: { messages: d } }),
3879
- pushUser: (d, p) => n({ type: "user_message", payload: { message: d, editingMessageId: p } }),
3879
+ pushUser: (d, f) => n({ type: "user_message", payload: { message: d, editingMessageId: f } }),
3880
3880
  onEvent: l
3881
3881
  }), [l]);
3882
3882
  return { state: t, dispatch: n, ...c };
@@ -3913,12 +3913,12 @@ function Tc(e, t) {
3913
3913
  if (!s) return e;
3914
3914
  const a = e.messages, i = a.findIndex((S) => S.id === s && S.role === "assistant");
3915
3915
  if (i === -1) return e;
3916
- const l = a[i], c = e.messagesStreamMeta, d = c ?? {}, p = d[s], h = p ?? { lastSeq: null, lastText: gd(l.content) }, f = t.seq ?? null;
3917
- if (f !== null && typeof f == "number" && typeof h.lastSeq == "number" && f <= h.lastSeq)
3918
- return console.debug("[MessageReducer] skipping delta - seq <= lastSeq", { seq: f, lastSeq: h.lastSeq }), e;
3919
- const { newParts: v, newMeta: g, changed: x } = xd(l.content, t.delta, h, f);
3916
+ const l = a[i], c = e.messagesStreamMeta, d = c ?? {}, f = d[s], h = f ?? { lastSeq: null, lastText: gd(l.content) }, p = t.seq ?? null;
3917
+ if (p !== null && typeof p == "number" && typeof h.lastSeq == "number" && p <= h.lastSeq)
3918
+ return console.debug("[MessageReducer] skipping delta - seq <= lastSeq", { seq: p, lastSeq: h.lastSeq }), e;
3919
+ const { newParts: v, newMeta: g, changed: x } = xd(l.content, t.delta, h, p);
3920
3920
  if (!x) return e;
3921
- const b = { ...l, content: v }, w = Co(a, i, b), y = !p || p.lastSeq !== g.lastSeq || p.lastText !== g.lastText, C = y ? { ...d, [s]: g } : c;
3921
+ const b = { ...l, content: v }, w = Co(a, i, b), y = !f || f.lastSeq !== g.lastSeq || f.lastText !== g.lastText, C = y ? { ...d, [s]: g } : c;
3922
3922
  return y ? {
3923
3923
  ...e,
3924
3924
  messages: w,
@@ -3932,13 +3932,13 @@ function Tc(e, t) {
3932
3932
  if (i >= 0) {
3933
3933
  const l = a[i];
3934
3934
  if (!((n = l.content) == null ? void 0 : n.some((d) => {
3935
- var p;
3936
- return (d == null ? void 0 : d.type) === "text" && ((p = d.text) == null ? void 0 : p.trim());
3935
+ var f;
3936
+ return (d == null ? void 0 : d.type) === "text" && ((f = d.text) == null ? void 0 : f.trim());
3937
3937
  }))) {
3938
3938
  console.debug("[MessageReducer] pruning assistant message with no visible text", {
3939
3939
  id: l.id,
3940
- contentTypes: (r = l.content) == null ? void 0 : r.map((p) => p == null ? void 0 : p.type),
3941
- contentPreview: (o = l.content) == null ? void 0 : o.map((p) => (p == null ? void 0 : p.type) === "text" ? String(p.text).slice(0, 100) : p == null ? void 0 : p.type)
3940
+ contentTypes: (r = l.content) == null ? void 0 : r.map((f) => f == null ? void 0 : f.type),
3941
+ contentPreview: (o = l.content) == null ? void 0 : o.map((f) => (f == null ? void 0 : f.type) === "text" ? String(f.text).slice(0, 100) : f == null ? void 0 : f.type)
3942
3942
  });
3943
3943
  const d = [...a.slice(0, i), ...a.slice(i + 1)];
3944
3944
  return { ...e, assemblingId: null, messages: d };
@@ -4078,17 +4078,17 @@ function Aw(e, t) {
4078
4078
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
4079
4079
  };
4080
4080
  t.artifact && (d.artifact = t.artifact);
4081
- const p = Td(a, d), h = t.artifact ?? a.artifact, f = {
4082
- ...p,
4081
+ const f = Td(a, d), h = t.artifact ?? a.artifact, p = {
4082
+ ...f,
4083
4083
  name: t.name ?? t.tool ?? a.name,
4084
4084
  content: c,
4085
4085
  artifact: h,
4086
4086
  additionalKwargs: {
4087
- ...p.additionalKwargs ?? {},
4087
+ ...f.additionalKwargs ?? {},
4088
4088
  toolStreaming: !1
4089
4089
  }
4090
4090
  };
4091
- return { ...e, messages: Co(o, s, f) };
4091
+ return { ...e, messages: Co(o, s, p) };
4092
4092
  }
4093
4093
  function jw({
4094
4094
  api: e,
@@ -4103,9 +4103,9 @@ function jw({
4103
4103
  isStreaming: c,
4104
4104
  getMessages: d
4105
4105
  }) {
4106
- const [p, h] = fe(null), v = $e(
4107
- () => Xn(p),
4108
- [p]
4106
+ const [f, h] = fe(null), v = $e(
4107
+ () => Xn(f),
4108
+ [f]
4109
4109
  ).checkpoints, g = dx(v), x = g.timeline, [b, w] = fe(!1), [y, C] = fe(null), [S, T] = fe(!1), [E, N] = fe(!1), [A, D] = fe(!1), [F, U] = fe(null), q = Oe(o), I = Oe(null), G = Oe(null), K = Oe(null), z = Oe(null), _ = Oe(null), k = Oe(/* @__PURE__ */ new Map()), H = Oe(null);
4110
4110
  Qe(() => {
4111
4111
  q.current = o;
@@ -4345,7 +4345,7 @@ function Pw({
4345
4345
  isStreaming: s,
4346
4346
  onError: a
4347
4347
  }) {
4348
- const { api: i } = Ls(), { currentThreadId: l } = Eo(), { state: c, seed: d, prepend: p, pushUser: h, onEvent: f } = kw(), {
4348
+ const { api: i } = Ls(), { currentThreadId: l } = Eo(), { state: c, seed: d, prepend: f, pushUser: h, onEvent: p } = kw(), {
4349
4349
  threadCheckpoints: v,
4350
4350
  threadTimeline: g,
4351
4351
  checkpointIndex: x,
@@ -4366,7 +4366,7 @@ function Pw({
4366
4366
  } = jw({
4367
4367
  api: i,
4368
4368
  seed: d,
4369
- prepend: p,
4369
+ prepend: f,
4370
4370
  onError: a,
4371
4371
  currentThreadId: l,
4372
4372
  initialThreadId: t,
@@ -4425,7 +4425,7 @@ function Pw({
4425
4425
  markStreamPendingThread: q,
4426
4426
  resetHistoryState: I,
4427
4427
  pushUser: h,
4428
- onEvent: f
4428
+ onEvent: p
4429
4429
  }),
4430
4430
  [
4431
4431
  l,
@@ -4452,7 +4452,7 @@ function Pw({
4452
4452
  q,
4453
4453
  I,
4454
4454
  h,
4455
- f
4455
+ p
4456
4456
  ]
4457
4457
  ), M = $e(
4458
4458
  () => ({
@@ -4506,7 +4506,7 @@ function Lw({
4506
4506
  onConnectionError: l,
4507
4507
  onToolEnd: c
4508
4508
  }) {
4509
- const { api: d, baseUrl: p } = Ls(), h = $e(() => An(p), [p]), { stream: f, stop: v, isStreaming: g, error: x, setToken: b } = uw({ baseUrl: h }), [w, y] = fe(!1);
4509
+ const { api: d, baseUrl: f } = Ls(), h = $e(() => An(f), [f]), { stream: p, stop: v, isStreaming: g, error: x, setToken: b } = uw({ baseUrl: h }), [w, y] = fe(!1);
4510
4510
  return Qe(() => {
4511
4511
  y(g);
4512
4512
  }, [g]), /* @__PURE__ */ u.jsx(
@@ -4528,7 +4528,7 @@ function Lw({
4528
4528
  $w,
4529
4529
  {
4530
4530
  api: d,
4531
- streamApi: { stream: f, stop: v, isStreaming: g, error: x, setToken: b },
4531
+ streamApi: { stream: p, stop: v, isStreaming: g, error: x, setToken: b },
4532
4532
  onError: s,
4533
4533
  onAuthError: a,
4534
4534
  onConnectionError: l,
@@ -4550,7 +4550,7 @@ function $w({
4550
4550
  onConnectionError: s,
4551
4551
  onToolEnd: a
4552
4552
  }) {
4553
- const { stream: i, stop: l, isStreaming: c, error: d, setToken: p } = n, { setCurrentThreadId: h, currentThreadIdRef: f, addThreadFromEvent: v } = Eo(), {
4553
+ const { stream: i, stop: l, isStreaming: c, error: d, setToken: f } = n, { setCurrentThreadId: h, currentThreadIdRef: p, addThreadFromEvent: v } = Eo(), {
4554
4554
  checkpoint: g,
4555
4555
  timelineCheckpoints: x,
4556
4556
  handleStateHistoryEvent: b,
@@ -4561,9 +4561,9 @@ function $w({
4561
4561
  onEvent: T
4562
4562
  } = $s(), { registerClearThread: E, registerRespondToInterrupt: N } = _w(), A = ie(
4563
4563
  (z) => {
4564
- v(z), f.current !== z.threadId && ((z.created ?? !f.current) && w(z.threadId), y(z.threadId), h(z.threadId));
4564
+ v(z), p.current !== z.threadId && ((z.created ?? !p.current) && w(z.threadId), y(z.threadId), h(z.threadId));
4565
4565
  },
4566
- [v, w, y, h, f]
4566
+ [v, w, y, h, p]
4567
4567
  ), D = ie(
4568
4568
  (z) => {
4569
4569
  z.type === "thread_info" ? A(z) : z.type === "state_history" ? b(z) : z.type === "tool.end" ? a == null || a(z) : T(z);
@@ -4590,7 +4590,7 @@ function $w({
4590
4590
  }, [g]);
4591
4591
  const q = ie(
4592
4592
  async (z, _, k) => {
4593
- const H = f.current;
4593
+ const H = p.current;
4594
4594
  if (!H)
4595
4595
  throw new Error("No active thread to handle interrupt");
4596
4596
  const V = _ ? k ?? !0 : !1, j = U.current, M = {
@@ -4601,7 +4601,7 @@ function $w({
4601
4601
  };
4602
4602
  F(M);
4603
4603
  },
4604
- [f, F]
4604
+ [p, F]
4605
4605
  );
4606
4606
  Qe(() => {
4607
4607
  N(q);
@@ -4614,7 +4614,7 @@ function $w({
4614
4614
  }, [I, E]);
4615
4615
  const G = ie(
4616
4616
  async (z, _) => {
4617
- let k = f.current;
4617
+ let k = p.current;
4618
4618
  const H = (z == null ? void 0 : z.text) ?? "", V = (z == null ? void 0 : z.attachments) ?? [], j = (H == null ? void 0 : H.trim()) ?? "", M = { ...(z == null ? void 0 : z.payload) ?? {} }, P = Array.isArray(M.messages) ? M.messages : void 0;
4619
4619
  P && delete M.messages;
4620
4620
  const L = !!(P && P.length);
@@ -4652,7 +4652,7 @@ function $w({
4652
4652
  };
4653
4653
  F(Se);
4654
4654
  },
4655
- [g, f, w, S, F, x]
4655
+ [g, p, w, S, F, x]
4656
4656
  ), K = $e(
4657
4657
  () => ({
4658
4658
  isStreaming: c,
@@ -4661,9 +4661,9 @@ function $w({
4661
4661
  submit: G,
4662
4662
  send: G,
4663
4663
  stop: l,
4664
- setAuthToken: p
4664
+ setAuthToken: f
4665
4665
  }),
4666
- [c, d, G, l, p]
4666
+ [c, d, G, l, f]
4667
4667
  );
4668
4668
  return /* @__PURE__ */ u.jsx(kd.Provider, { value: K, children: e });
4669
4669
  }
@@ -4706,14 +4706,14 @@ function eo({
4706
4706
  onThreadChange: c,
4707
4707
  onToolEnd: d
4708
4708
  }) {
4709
- const p = zw(t), h = Yr(i), f = Yr(l), v = Yr(a), g = Yr(c), x = Yr(d), b = $e(
4709
+ const f = zw(t), h = Yr(i), p = Yr(l), v = Yr(a), g = Yr(c), x = Yr(d), b = $e(
4710
4710
  () => ({
4711
4711
  initialThreadId: n,
4712
4712
  initialCheckpointId: r,
4713
4713
  initialCheckpointNs: o,
4714
4714
  autoLoadInitial: s,
4715
4715
  onError: h,
4716
- onAuthError: f,
4716
+ onAuthError: p,
4717
4717
  onConnectionError: v,
4718
4718
  onThreadChange: g,
4719
4719
  onToolEnd: x
@@ -4724,13 +4724,13 @@ function eo({
4724
4724
  o,
4725
4725
  s,
4726
4726
  h,
4727
- f,
4727
+ p,
4728
4728
  v,
4729
4729
  g,
4730
4730
  x
4731
4731
  ]
4732
4732
  );
4733
- return /* @__PURE__ */ u.jsx(rw, { apiConfig: p, children: /* @__PURE__ */ u.jsx(Lw, { ...b, children: e }) });
4733
+ return /* @__PURE__ */ u.jsx(rw, { apiConfig: f, children: /* @__PURE__ */ u.jsx(Lw, { ...b, children: e }) });
4734
4734
  }
4735
4735
  function Yr(e) {
4736
4736
  const t = Oe(e);
@@ -4934,18 +4934,18 @@ function gn(e, t = []) {
4934
4934
  function r(s, a) {
4935
4935
  const i = m.createContext(a), l = n.length;
4936
4936
  n = [...n, a];
4937
- const c = (p) => {
4937
+ const c = (f) => {
4938
4938
  var b;
4939
- const { scope: h, children: f, ...v } = p, g = ((b = h == null ? void 0 : h[e]) == null ? void 0 : b[l]) || i, x = m.useMemo(() => v, Object.values(v));
4940
- return /* @__PURE__ */ u.jsx(g.Provider, { value: x, children: f });
4939
+ const { scope: h, children: p, ...v } = f, g = ((b = h == null ? void 0 : h[e]) == null ? void 0 : b[l]) || i, x = m.useMemo(() => v, Object.values(v));
4940
+ return /* @__PURE__ */ u.jsx(g.Provider, { value: x, children: p });
4941
4941
  };
4942
4942
  c.displayName = s + "Provider";
4943
- function d(p, h) {
4943
+ function d(f, h) {
4944
4944
  var g;
4945
- const f = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[l]) || i, v = m.useContext(f);
4945
+ const p = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[l]) || i, v = m.useContext(p);
4946
4946
  if (v) return v;
4947
4947
  if (a !== void 0) return a;
4948
- throw new Error(`\`${p}\` must be used within \`${s}\``);
4948
+ throw new Error(`\`${f}\` must be used within \`${s}\``);
4949
4949
  }
4950
4950
  return [c, d];
4951
4951
  }
@@ -4971,8 +4971,8 @@ function Yw(...e) {
4971
4971
  }));
4972
4972
  return function(s) {
4973
4973
  const a = r.reduce((i, { useScope: l, scopeName: c }) => {
4974
- const p = l(s)[`__scope${c}`];
4975
- return { ...i, ...p };
4974
+ const f = l(s)[`__scope${c}`];
4975
+ return { ...i, ...f };
4976
4976
  }, {});
4977
4977
  return m.useMemo(() => ({ [`__scope${t.scopeName}`]: a }), [a]);
4978
4978
  };
@@ -4995,18 +4995,18 @@ function Dn({
4995
4995
  {
4996
4996
  const d = m.useRef(e !== void 0);
4997
4997
  m.useEffect(() => {
4998
- const p = d.current;
4999
- p !== i && console.warn(
5000
- `${r} is changing from ${p ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
4998
+ const f = d.current;
4999
+ f !== i && console.warn(
5000
+ `${r} is changing from ${f ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
5001
5001
  ), d.current = i;
5002
5002
  }, [i, r]);
5003
5003
  }
5004
5004
  const c = m.useCallback(
5005
5005
  (d) => {
5006
- var p;
5006
+ var f;
5007
5007
  if (i) {
5008
5008
  const h = Zw(d) ? d(e) : d;
5009
- h !== e && ((p = a.current) == null || p.call(a, h));
5009
+ h !== e && ((f = a.current) == null || f.call(a, h));
5010
5010
  } else
5011
5011
  s(d);
5012
5012
  },
@@ -5073,26 +5073,26 @@ function Fs(e) {
5073
5073
  }
5074
5074
  );
5075
5075
  c.displayName = i;
5076
- const d = e + "CollectionItemSlot", p = "data-radix-collection-item", h = Ir(d), f = O.forwardRef(
5076
+ const d = e + "CollectionItemSlot", f = "data-radix-collection-item", h = Ir(d), p = O.forwardRef(
5077
5077
  (g, x) => {
5078
5078
  const { scope: b, children: w, ...y } = g, C = O.useRef(null), S = Be(x, C), T = s(d, b);
5079
- return O.useEffect(() => (T.itemMap.set(C, { ref: C, ...y }), () => void T.itemMap.delete(C))), /* @__PURE__ */ u.jsx(h, { [p]: "", ref: S, children: w });
5079
+ return O.useEffect(() => (T.itemMap.set(C, { ref: C, ...y }), () => void T.itemMap.delete(C))), /* @__PURE__ */ u.jsx(h, { [f]: "", ref: S, children: w });
5080
5080
  }
5081
5081
  );
5082
- f.displayName = d;
5082
+ p.displayName = d;
5083
5083
  function v(g) {
5084
5084
  const x = s(e + "CollectionConsumer", g);
5085
5085
  return O.useCallback(() => {
5086
5086
  const w = x.collectionRef.current;
5087
5087
  if (!w) return [];
5088
- const y = Array.from(w.querySelectorAll(`[${p}]`));
5088
+ const y = Array.from(w.querySelectorAll(`[${f}]`));
5089
5089
  return Array.from(x.itemMap.values()).sort(
5090
5090
  (T, E) => y.indexOf(T.ref.current) - y.indexOf(E.ref.current)
5091
5091
  );
5092
5092
  }, [x.collectionRef, x.itemMap]);
5093
5093
  }
5094
5094
  return [
5095
- { Provider: a, Slot: c, ItemSlot: f },
5095
+ { Provider: a, Slot: c, ItemSlot: p },
5096
5096
  v,
5097
5097
  r
5098
5098
  ];
@@ -5134,7 +5134,7 @@ var nb = "DismissableLayer", ti = "dismissableLayer.update", rb = "dismissableLa
5134
5134
  onInteractOutside: a,
5135
5135
  onDismiss: i,
5136
5136
  ...l
5137
- } = e, c = m.useContext(_d), [d, p] = m.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, f] = m.useState({}), v = Be(t, (E) => p(E)), g = Array.from(c.layers), [x] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), b = g.indexOf(x), w = d ? g.indexOf(d) : -1, y = c.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= b, S = ab((E) => {
5137
+ } = e, c = m.useContext(_d), [d, f] = m.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = m.useState({}), v = Be(t, (E) => f(E)), g = Array.from(c.layers), [x] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), b = g.indexOf(x), w = d ? g.indexOf(d) : -1, y = c.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= b, S = ab((E) => {
5138
5138
  const N = E.target, A = [...c.branches].some((D) => D.contains(N));
5139
5139
  !C || A || (o == null || o(E), a == null || a(E), E.defaultPrevented || i == null || i());
5140
5140
  }, h), T = ib((E) => {
@@ -5151,7 +5151,7 @@ var nb = "DismissableLayer", ti = "dismissableLayer.update", rb = "dismissableLa
5151
5151
  }, [d, h, n, c]), m.useEffect(() => () => {
5152
5152
  d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Ic());
5153
5153
  }, [d, c]), m.useEffect(() => {
5154
- const E = () => f({});
5154
+ const E = () => p({});
5155
5155
  return document.addEventListener(ti, E), () => document.removeEventListener(ti, E);
5156
5156
  }, []), /* @__PURE__ */ u.jsx(
5157
5157
  ge.div,
@@ -5256,7 +5256,7 @@ var ka = "focusScope.autoFocusOnMount", Ra = "focusScope.autoFocusOnUnmount", Ac
5256
5256
  onMountAutoFocus: o,
5257
5257
  onUnmountAutoFocus: s,
5258
5258
  ...a
5259
- } = e, [i, l] = m.useState(null), c = wt(o), d = wt(s), p = m.useRef(null), h = Be(t, (g) => l(g)), f = m.useRef({
5259
+ } = e, [i, l] = m.useState(null), c = wt(o), d = wt(s), f = m.useRef(null), h = Be(t, (g) => l(g)), p = m.useRef({
5260
5260
  paused: !1,
5261
5261
  pause() {
5262
5262
  this.paused = !0;
@@ -5268,13 +5268,13 @@ var ka = "focusScope.autoFocusOnMount", Ra = "focusScope.autoFocusOnUnmount", Ac
5268
5268
  m.useEffect(() => {
5269
5269
  if (r) {
5270
5270
  let g = function(y) {
5271
- if (f.paused || !i) return;
5271
+ if (p.paused || !i) return;
5272
5272
  const C = y.target;
5273
- i.contains(C) ? p.current = C : Pn(p.current, { select: !0 });
5273
+ i.contains(C) ? f.current = C : Pn(f.current, { select: !0 });
5274
5274
  }, x = function(y) {
5275
- if (f.paused || !i) return;
5275
+ if (p.paused || !i) return;
5276
5276
  const C = y.relatedTarget;
5277
- C !== null && (i.contains(C) || Pn(p.current, { select: !0 }));
5277
+ C !== null && (i.contains(C) || Pn(f.current, { select: !0 }));
5278
5278
  }, b = function(y) {
5279
5279
  if (document.activeElement === document.body)
5280
5280
  for (const S of y)
@@ -5286,9 +5286,9 @@ var ka = "focusScope.autoFocusOnMount", Ra = "focusScope.autoFocusOnUnmount", Ac
5286
5286
  document.removeEventListener("focusin", g), document.removeEventListener("focusout", x), w.disconnect();
5287
5287
  };
5288
5288
  }
5289
- }, [r, i, f.paused]), m.useEffect(() => {
5289
+ }, [r, i, p.paused]), m.useEffect(() => {
5290
5290
  if (i) {
5291
- _c.add(f);
5291
+ _c.add(p);
5292
5292
  const g = document.activeElement;
5293
5293
  if (!i.contains(g)) {
5294
5294
  const b = new CustomEvent(ka, Ac);
@@ -5297,21 +5297,21 @@ var ka = "focusScope.autoFocusOnMount", Ra = "focusScope.autoFocusOnUnmount", Ac
5297
5297
  return () => {
5298
5298
  i.removeEventListener(ka, c), setTimeout(() => {
5299
5299
  const b = new CustomEvent(Ra, Ac);
5300
- i.addEventListener(Ra, d), i.dispatchEvent(b), b.defaultPrevented || Pn(g ?? document.body, { select: !0 }), i.removeEventListener(Ra, d), _c.remove(f);
5300
+ i.addEventListener(Ra, d), i.dispatchEvent(b), b.defaultPrevented || Pn(g ?? document.body, { select: !0 }), i.removeEventListener(Ra, d), _c.remove(p);
5301
5301
  }, 0);
5302
5302
  };
5303
5303
  }
5304
- }, [i, c, d, f]);
5304
+ }, [i, c, d, p]);
5305
5305
  const v = m.useCallback(
5306
5306
  (g) => {
5307
- if (!n && !r || f.paused) return;
5307
+ if (!n && !r || p.paused) return;
5308
5308
  const x = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, b = document.activeElement;
5309
5309
  if (x && b) {
5310
5310
  const w = g.currentTarget, [y, C] = fb(w);
5311
5311
  y && C ? !g.shiftKey && b === C ? (g.preventDefault(), n && Pn(y, { select: !0 })) : g.shiftKey && b === y && (g.preventDefault(), n && Pn(C, { select: !0 })) : b === w && g.preventDefault();
5312
5312
  }
5313
5313
  },
5314
- [n, r, f.paused]
5314
+ [n, r, p.paused]
5315
5315
  );
5316
5316
  return /* @__PURE__ */ u.jsx(ge.div, { tabIndex: -1, ...a, ref: h, onKeyDown: v });
5317
5317
  });
@@ -5497,48 +5497,48 @@ function Dc(e, t, n) {
5497
5497
  reference: r,
5498
5498
  floating: o
5499
5499
  } = e;
5500
- const s = Sn(t), a = Wi(t), i = Ui(a), l = _n(t), c = s === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, h = r[i] / 2 - o[i] / 2;
5501
- let f;
5500
+ const s = Sn(t), a = Wi(t), i = Ui(a), l = _n(t), c = s === "y", d = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, h = r[i] / 2 - o[i] / 2;
5501
+ let p;
5502
5502
  switch (l) {
5503
5503
  case "top":
5504
- f = {
5504
+ p = {
5505
5505
  x: d,
5506
5506
  y: r.y - o.height
5507
5507
  };
5508
5508
  break;
5509
5509
  case "bottom":
5510
- f = {
5510
+ p = {
5511
5511
  x: d,
5512
5512
  y: r.y + r.height
5513
5513
  };
5514
5514
  break;
5515
5515
  case "right":
5516
- f = {
5516
+ p = {
5517
5517
  x: r.x + r.width,
5518
- y: p
5518
+ y: f
5519
5519
  };
5520
5520
  break;
5521
5521
  case "left":
5522
- f = {
5522
+ p = {
5523
5523
  x: r.x - o.width,
5524
- y: p
5524
+ y: f
5525
5525
  };
5526
5526
  break;
5527
5527
  default:
5528
- f = {
5528
+ p = {
5529
5529
  x: r.x,
5530
5530
  y: r.y
5531
5531
  };
5532
5532
  }
5533
5533
  switch (Br(t)) {
5534
5534
  case "start":
5535
- f[a] -= h * (n && c ? -1 : 1);
5535
+ p[a] -= h * (n && c ? -1 : 1);
5536
5536
  break;
5537
5537
  case "end":
5538
- f[a] += h * (n && c ? -1 : 1);
5538
+ p[a] += h * (n && c ? -1 : 1);
5539
5539
  break;
5540
5540
  }
5541
- return f;
5541
+ return p;
5542
5542
  }
5543
5543
  const Ab = async (e, t, n) => {
5544
5544
  const {
@@ -5553,8 +5553,8 @@ const Ab = async (e, t, n) => {
5553
5553
  strategy: o
5554
5554
  }), {
5555
5555
  x: d,
5556
- y: p
5557
- } = Dc(c, r, l), h = r, f = {}, v = 0;
5556
+ y: f
5557
+ } = Dc(c, r, l), h = r, p = {}, v = 0;
5558
5558
  for (let g = 0; g < i.length; g++) {
5559
5559
  const {
5560
5560
  name: x,
@@ -5566,11 +5566,11 @@ const Ab = async (e, t, n) => {
5566
5566
  reset: S
5567
5567
  } = await b({
5568
5568
  x: d,
5569
- y: p,
5569
+ y: f,
5570
5570
  initialPlacement: r,
5571
5571
  placement: h,
5572
5572
  strategy: o,
5573
- middlewareData: f,
5573
+ middlewareData: p,
5574
5574
  rects: c,
5575
5575
  platform: a,
5576
5576
  elements: {
@@ -5578,10 +5578,10 @@ const Ab = async (e, t, n) => {
5578
5578
  floating: t
5579
5579
  }
5580
5580
  });
5581
- d = w ?? d, p = y ?? p, f = {
5582
- ...f,
5581
+ d = w ?? d, f = y ?? f, p = {
5582
+ ...p,
5583
5583
  [x]: {
5584
- ...f[x],
5584
+ ...p[x],
5585
5585
  ...C
5586
5586
  }
5587
5587
  }, S && v <= 50 && (v++, typeof S == "object" && (S.placement && (h = S.placement), S.rects && (c = S.rects === !0 ? await a.getElementRects({
@@ -5590,15 +5590,15 @@ const Ab = async (e, t, n) => {
5590
5590
  strategy: o
5591
5591
  }) : S.rects), {
5592
5592
  x: d,
5593
- y: p
5593
+ y: f
5594
5594
  } = Dc(c, h, l)), g = -1);
5595
5595
  }
5596
5596
  return {
5597
5597
  x: d,
5598
- y: p,
5598
+ y: f,
5599
5599
  placement: h,
5600
5600
  strategy: o,
5601
- middlewareData: f
5601
+ middlewareData: p
5602
5602
  };
5603
5603
  };
5604
5604
  async function ao(e, t) {
@@ -5614,15 +5614,15 @@ async function ao(e, t) {
5614
5614
  } = e, {
5615
5615
  boundary: c = "clippingAncestors",
5616
5616
  rootBoundary: d = "viewport",
5617
- elementContext: p = "floating",
5617
+ elementContext: f = "floating",
5618
5618
  altBoundary: h = !1,
5619
- padding: f = 0
5620
- } = jn(t, e), v = Dd(f), x = i[h ? p === "floating" ? "reference" : "floating" : p], b = gs(await s.getClippingRect({
5619
+ padding: p = 0
5620
+ } = jn(t, e), v = Dd(p), x = i[h ? f === "floating" ? "reference" : "floating" : f], b = gs(await s.getClippingRect({
5621
5621
  element: (n = await (s.isElement == null ? void 0 : s.isElement(x))) == null || n ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(i.floating)),
5622
5622
  boundary: c,
5623
5623
  rootBoundary: d,
5624
5624
  strategy: l
5625
- })), w = p === "floating" ? {
5625
+ })), w = f === "floating" ? {
5626
5626
  x: r,
5627
5627
  y: o,
5628
5628
  width: a.floating.width,
@@ -5664,17 +5664,17 @@ const jb = (e) => ({
5664
5664
  } = jn(e, t) || {};
5665
5665
  if (c == null)
5666
5666
  return {};
5667
- const p = Dd(d), h = {
5667
+ const f = Dd(d), h = {
5668
5668
  x: n,
5669
5669
  y: r
5670
- }, f = Wi(o), v = Ui(f), g = await a.getDimensions(c), x = f === "y", b = x ? "top" : "left", w = x ? "bottom" : "right", y = x ? "clientHeight" : "clientWidth", C = s.reference[v] + s.reference[f] - h[f] - s.floating[v], S = h[f] - s.reference[f], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
5670
+ }, p = Wi(o), v = Ui(p), g = await a.getDimensions(c), x = p === "y", b = x ? "top" : "left", w = x ? "bottom" : "right", y = x ? "clientHeight" : "clientWidth", C = s.reference[v] + s.reference[p] - h[p] - s.floating[v], S = h[p] - s.reference[p], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
5671
5671
  let E = T ? T[y] : 0;
5672
5672
  (!E || !await (a.isElement == null ? void 0 : a.isElement(T))) && (E = i.floating[y] || s.floating[v]);
5673
- const N = C / 2 - S / 2, A = E / 2 - g[v] / 2 - 1, D = Ln(p[b], A), F = Ln(p[w], A), U = D, q = E - g[v] - F, I = E / 2 - g[v] / 2 + N, G = ni(U, I, q), K = !l.arrow && Br(o) != null && I !== G && s.reference[v] / 2 - (I < U ? D : F) - g[v] / 2 < 0, z = K ? I < U ? I - U : I - q : 0;
5673
+ const N = C / 2 - S / 2, A = E / 2 - g[v] / 2 - 1, D = Ln(f[b], A), F = Ln(f[w], A), U = D, q = E - g[v] - F, I = E / 2 - g[v] / 2 + N, G = ni(U, I, q), K = !l.arrow && Br(o) != null && I !== G && s.reference[v] / 2 - (I < U ? D : F) - g[v] / 2 < 0, z = K ? I < U ? I - U : I - q : 0;
5674
5674
  return {
5675
- [f]: h[f] + z,
5675
+ [p]: h[p] + z,
5676
5676
  data: {
5677
- [f]: G,
5677
+ [p]: G,
5678
5678
  centerOffset: I - G - z,
5679
5679
  ...K && {
5680
5680
  alignmentOffset: z
@@ -5698,9 +5698,9 @@ const jb = (e) => ({
5698
5698
  elements: c
5699
5699
  } = t, {
5700
5700
  mainAxis: d = !0,
5701
- crossAxis: p = !0,
5701
+ crossAxis: f = !0,
5702
5702
  fallbackPlacements: h,
5703
- fallbackStrategy: f = "bestFit",
5703
+ fallbackStrategy: p = "bestFit",
5704
5704
  fallbackAxisSideDirection: v = "none",
5705
5705
  flipAlignment: g = !0,
5706
5706
  ...x
@@ -5711,7 +5711,7 @@ const jb = (e) => ({
5711
5711
  !h && T && S.push(...Ib(i, g, v, C));
5712
5712
  const E = [i, ...S], N = await ao(t, x), A = [];
5713
5713
  let D = ((r = s.flip) == null ? void 0 : r.overflows) || [];
5714
- if (d && A.push(N[b]), p) {
5714
+ if (d && A.push(N[b]), f) {
5715
5715
  const I = Tb(o, a, C);
5716
5716
  A.push(N[I[0]], N[I[1]]);
5717
5717
  }
@@ -5721,7 +5721,7 @@ const jb = (e) => ({
5721
5721
  }], !A.every((I) => I <= 0)) {
5722
5722
  var F, U;
5723
5723
  const I = (((F = s.flip) == null ? void 0 : F.index) || 0) + 1, G = E[I];
5724
- if (G && (!(p === "alignment" ? w !== Sn(G) : !1) || // We leave the current main axis only if every placement on that axis
5724
+ if (G && (!(f === "alignment" ? w !== Sn(G) : !1) || // We leave the current main axis only if every placement on that axis
5725
5725
  // overflows the main axis.
5726
5726
  D.every((_) => Sn(_.placement) === w ? _.overflows[0] > 0 : !0)))
5727
5727
  return {
@@ -5735,7 +5735,7 @@ const jb = (e) => ({
5735
5735
  };
5736
5736
  let K = (U = D.filter((z) => z.overflows[0] <= 0).sort((z, _) => z.overflows[1] - _.overflows[1])[0]) == null ? void 0 : U.placement;
5737
5737
  if (!K)
5738
- switch (f) {
5738
+ switch (p) {
5739
5739
  case "bestFit": {
5740
5740
  var q;
5741
5741
  const z = (q = D.filter((_) => {
@@ -5823,26 +5823,26 @@ async function Mb(e, t) {
5823
5823
  placement: n,
5824
5824
  platform: r,
5825
5825
  elements: o
5826
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = _n(n), i = Br(n), l = Sn(n) === "y", c = Ld.has(a) ? -1 : 1, d = s && l ? -1 : 1, p = jn(t, e);
5826
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = _n(n), i = Br(n), l = Sn(n) === "y", c = Ld.has(a) ? -1 : 1, d = s && l ? -1 : 1, f = jn(t, e);
5827
5827
  let {
5828
5828
  mainAxis: h,
5829
- crossAxis: f,
5829
+ crossAxis: p,
5830
5830
  alignmentAxis: v
5831
- } = typeof p == "number" ? {
5832
- mainAxis: p,
5831
+ } = typeof f == "number" ? {
5832
+ mainAxis: f,
5833
5833
  crossAxis: 0,
5834
5834
  alignmentAxis: null
5835
5835
  } : {
5836
- mainAxis: p.mainAxis || 0,
5837
- crossAxis: p.crossAxis || 0,
5838
- alignmentAxis: p.alignmentAxis
5836
+ mainAxis: f.mainAxis || 0,
5837
+ crossAxis: f.crossAxis || 0,
5838
+ alignmentAxis: f.alignmentAxis
5839
5839
  };
5840
- return i && typeof v == "number" && (f = i === "end" ? v * -1 : v), l ? {
5841
- x: f * d,
5840
+ return i && typeof v == "number" && (p = i === "end" ? v * -1 : v), l ? {
5841
+ x: p * d,
5842
5842
  y: h * c
5843
5843
  } : {
5844
5844
  x: h * c,
5845
- y: f * d
5845
+ y: p * d
5846
5846
  };
5847
5847
  }
5848
5848
  const Ob = function(e) {
@@ -5895,20 +5895,20 @@ const Ob = function(e) {
5895
5895
  } = jn(e, t), c = {
5896
5896
  x: n,
5897
5897
  y: r
5898
- }, d = await ao(t, l), p = Sn(_n(o)), h = Hi(p);
5899
- let f = c[h], v = c[p];
5898
+ }, d = await ao(t, l), f = Sn(_n(o)), h = Hi(f);
5899
+ let p = c[h], v = c[f];
5900
5900
  if (s) {
5901
- const x = h === "y" ? "top" : "left", b = h === "y" ? "bottom" : "right", w = f + d[x], y = f - d[b];
5902
- f = ni(w, f, y);
5901
+ const x = h === "y" ? "top" : "left", b = h === "y" ? "bottom" : "right", w = p + d[x], y = p - d[b];
5902
+ p = ni(w, p, y);
5903
5903
  }
5904
5904
  if (a) {
5905
- const x = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", w = v + d[x], y = v - d[b];
5905
+ const x = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", w = v + d[x], y = v - d[b];
5906
5906
  v = ni(w, v, y);
5907
5907
  }
5908
5908
  const g = i.fn({
5909
5909
  ...t,
5910
- [h]: f,
5911
- [p]: v
5910
+ [h]: p,
5911
+ [f]: v
5912
5912
  });
5913
5913
  return {
5914
5914
  ...g,
@@ -5917,7 +5917,7 @@ const Ob = function(e) {
5917
5917
  y: g.y - r,
5918
5918
  enabled: {
5919
5919
  [h]: s,
5920
- [p]: a
5920
+ [f]: a
5921
5921
  }
5922
5922
  }
5923
5923
  };
@@ -5940,8 +5940,8 @@ const Ob = function(e) {
5940
5940
  } = jn(e, t), d = {
5941
5941
  x: n,
5942
5942
  y: r
5943
- }, p = Sn(o), h = Hi(p);
5944
- let f = d[h], v = d[p];
5943
+ }, f = Sn(o), h = Hi(f);
5944
+ let p = d[h], v = d[f];
5945
5945
  const g = jn(i, t), x = typeof g == "number" ? {
5946
5946
  mainAxis: g,
5947
5947
  crossAxis: 0
@@ -5952,16 +5952,16 @@ const Ob = function(e) {
5952
5952
  };
5953
5953
  if (l) {
5954
5954
  const y = h === "y" ? "height" : "width", C = s.reference[h] - s.floating[y] + x.mainAxis, S = s.reference[h] + s.reference[y] - x.mainAxis;
5955
- f < C ? f = C : f > S && (f = S);
5955
+ p < C ? p = C : p > S && (p = S);
5956
5956
  }
5957
5957
  if (c) {
5958
5958
  var b, w;
5959
- const y = h === "y" ? "width" : "height", C = Ld.has(_n(o)), S = s.reference[p] - s.floating[y] + (C && ((b = a.offset) == null ? void 0 : b[p]) || 0) + (C ? 0 : x.crossAxis), T = s.reference[p] + s.reference[y] + (C ? 0 : ((w = a.offset) == null ? void 0 : w[p]) || 0) - (C ? x.crossAxis : 0);
5959
+ const y = h === "y" ? "width" : "height", C = Ld.has(_n(o)), S = s.reference[f] - s.floating[y] + (C && ((b = a.offset) == null ? void 0 : b[f]) || 0) + (C ? 0 : x.crossAxis), T = s.reference[f] + s.reference[y] + (C ? 0 : ((w = a.offset) == null ? void 0 : w[f]) || 0) - (C ? x.crossAxis : 0);
5960
5960
  v < S ? v = S : v > T && (v = T);
5961
5961
  }
5962
5962
  return {
5963
- [h]: f,
5964
- [p]: v
5963
+ [h]: p,
5964
+ [f]: v
5965
5965
  };
5966
5966
  }
5967
5967
  };
@@ -5980,17 +5980,17 @@ const Ob = function(e) {
5980
5980
  apply: l = () => {
5981
5981
  },
5982
5982
  ...c
5983
- } = jn(e, t), d = await ao(t, c), p = _n(o), h = Br(o), f = Sn(o) === "y", {
5983
+ } = jn(e, t), d = await ao(t, c), f = _n(o), h = Br(o), p = Sn(o) === "y", {
5984
5984
  width: v,
5985
5985
  height: g
5986
5986
  } = s.floating;
5987
5987
  let x, b;
5988
- p === "top" || p === "bottom" ? (x = p, b = h === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (b = p, x = h === "end" ? "top" : "bottom");
5988
+ f === "top" || f === "bottom" ? (x = f, b = h === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (b = f, x = h === "end" ? "top" : "bottom");
5989
5989
  const w = g - d.top - d.bottom, y = v - d.left - d.right, C = Ln(g - d[x], w), S = Ln(v - d[b], y), T = !t.middlewareData.shift;
5990
5990
  let E = C, N = S;
5991
5991
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (N = y), (r = t.middlewareData.shift) != null && r.enabled.y && (E = w), T && !h) {
5992
5992
  const D = Xt(d.left, 0), F = Xt(d.right, 0), U = Xt(d.top, 0), q = Xt(d.bottom, 0);
5993
- f ? N = v - 2 * (D !== 0 || F !== 0 ? D + F : Xt(d.left, d.right)) : E = g - 2 * (U !== 0 || q !== 0 ? U + q : Xt(d.top, d.bottom));
5993
+ p ? N = v - 2 * (D !== 0 || F !== 0 ? D + F : Xt(d.left, d.right)) : E = g - 2 * (U !== 0 || q !== 0 ? U + q : Xt(d.top, d.bottom));
5994
5994
  }
5995
5995
  await l({
5996
5996
  ...t,
@@ -6165,18 +6165,18 @@ function ir(e, t, n, r) {
6165
6165
  let a = Cn(1);
6166
6166
  t && (r ? fn(r) && (a = Er(r)) : a = Er(e));
6167
6167
  const i = Yb(s, n, r) ? zd(s) : Cn(0);
6168
- let l = (o.left + i.x) / a.x, c = (o.top + i.y) / a.y, d = o.width / a.x, p = o.height / a.y;
6168
+ let l = (o.left + i.x) / a.x, c = (o.top + i.y) / a.y, d = o.width / a.x, f = o.height / a.y;
6169
6169
  if (s) {
6170
- const h = Zt(s), f = r && fn(r) ? Zt(r) : r;
6170
+ const h = Zt(s), p = r && fn(r) ? Zt(r) : r;
6171
6171
  let v = h, g = oi(v);
6172
- for (; g && r && f !== v; ) {
6172
+ for (; g && r && p !== v; ) {
6173
6173
  const x = Er(g), b = g.getBoundingClientRect(), w = pn(g), y = b.left + (g.clientLeft + parseFloat(w.paddingLeft)) * x.x, C = b.top + (g.clientTop + parseFloat(w.paddingTop)) * x.y;
6174
- l *= x.x, c *= x.y, d *= x.x, p *= x.y, l += y, c += C, v = Zt(g), g = oi(v);
6174
+ l *= x.x, c *= x.y, d *= x.x, f *= x.y, l += y, c += C, v = Zt(g), g = oi(v);
6175
6175
  }
6176
6176
  }
6177
6177
  return gs({
6178
6178
  width: d,
6179
- height: p,
6179
+ height: f,
6180
6180
  x: l,
6181
6181
  y: c
6182
6182
  });
@@ -6206,12 +6206,12 @@ function Xb(e) {
6206
6206
  scrollLeft: 0,
6207
6207
  scrollTop: 0
6208
6208
  }, c = Cn(1);
6209
- const d = Cn(0), p = En(r);
6210
- if ((p || !p && !s) && ((zr(r) !== "body" || Ro(a)) && (l = Ws(r)), En(r))) {
6211
- const f = ir(r);
6212
- c = Er(r), d.x = f.x + r.clientLeft, d.y = f.y + r.clientTop;
6209
+ const d = Cn(0), f = En(r);
6210
+ if ((f || !f && !s) && ((zr(r) !== "body" || Ro(a)) && (l = Ws(r)), En(r))) {
6211
+ const p = ir(r);
6212
+ c = Er(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
6213
6213
  }
6214
- const h = a && !p && !s ? Hd(a, l) : Cn(0);
6214
+ const h = a && !f && !s ? Hd(a, l) : Cn(0);
6215
6215
  return {
6216
6216
  width: n.width * c.x,
6217
6217
  height: n.height * c.y,
@@ -6244,7 +6244,7 @@ function Qb(e, t) {
6244
6244
  }
6245
6245
  const c = Vs(r);
6246
6246
  if (c <= 0) {
6247
- const d = r.ownerDocument, p = d.body, h = getComputedStyle(p), f = d.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, v = Math.abs(r.clientWidth - p.clientWidth - f);
6247
+ const d = r.ownerDocument, f = d.body, h = getComputedStyle(f), p = d.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, v = Math.abs(r.clientWidth - f.clientWidth - p);
6248
6248
  v <= Bc && (s -= v);
6249
6249
  } else c <= Bc && (s += c);
6250
6250
  return {
@@ -6308,8 +6308,8 @@ function ry(e) {
6308
6308
  strategy: o
6309
6309
  } = e;
6310
6310
  const a = [...n === "clippingAncestors" ? Us(t) ? [] : ny(t, this._c) : [].concat(n), r], i = a[0], l = a.reduce((c, d) => {
6311
- const p = zc(t, d, o);
6312
- return c.top = Xt(p.top, c.top), c.right = Ln(p.right, c.right), c.bottom = Ln(p.bottom, c.bottom), c.left = Xt(p.left, c.left), c;
6311
+ const f = zc(t, d, o);
6312
+ return c.top = Xt(f.top, c.top), c.right = Ln(f.right, c.right), c.bottom = Ln(f.bottom, c.bottom), c.left = Xt(f.left, c.left), c;
6313
6313
  }, zc(t, i, o));
6314
6314
  return {
6315
6315
  width: l.right - l.left,
@@ -6340,13 +6340,13 @@ function sy(e, t, n) {
6340
6340
  }
6341
6341
  if (r || !r && !s)
6342
6342
  if ((zr(t) !== "body" || Ro(o)) && (i = Ws(t)), r) {
6343
- const f = ir(t, !0, s, t);
6344
- l.x = f.x + t.clientLeft, l.y = f.y + t.clientTop;
6343
+ const p = ir(t, !0, s, t);
6344
+ l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
6345
6345
  } else o && c();
6346
6346
  s && !r && o && c();
6347
- const d = o && !r && !s ? Hd(o, i) : Cn(0), p = a.left + i.scrollLeft - l.x - d.x, h = a.top + i.scrollTop - l.y - d.y;
6347
+ const d = o && !r && !s ? Hd(o, i) : Cn(0), f = a.left + i.scrollLeft - l.x - d.x, h = a.top + i.scrollTop - l.y - d.y;
6348
6348
  return {
6349
- x: p,
6349
+ x: f,
6350
6350
  y: h,
6351
6351
  width: a.width,
6352
6352
  height: a.height
@@ -6422,13 +6422,13 @@ function cy(e, t) {
6422
6422
  i === void 0 && (i = !1), l === void 0 && (l = 1), s();
6423
6423
  const c = e.getBoundingClientRect(), {
6424
6424
  left: d,
6425
- top: p,
6425
+ top: f,
6426
6426
  width: h,
6427
- height: f
6427
+ height: p
6428
6428
  } = c;
6429
- if (i || t(), !h || !f)
6429
+ if (i || t(), !h || !p)
6430
6430
  return;
6431
- const v = Bo(p), g = Bo(o.clientWidth - (d + h)), x = Bo(o.clientHeight - (p + f)), b = Bo(d), y = {
6431
+ const v = Bo(f), g = Bo(o.clientWidth - (d + h)), x = Bo(o.clientHeight - (f + p)), b = Bo(d), y = {
6432
6432
  rootMargin: -v + "px " + -g + "px " + -x + "px " + -b + "px",
6433
6433
  threshold: Xt(0, Ln(1, l)) || 1
6434
6434
  };
@@ -6471,15 +6471,15 @@ function uy(e, t, n, r) {
6471
6471
  passive: !0
6472
6472
  }), s && b.addEventListener("resize", n);
6473
6473
  });
6474
- const p = c && i ? cy(c, n) : null;
6475
- let h = -1, f = null;
6476
- a && (f = new ResizeObserver((b) => {
6474
+ const f = c && i ? cy(c, n) : null;
6475
+ let h = -1, p = null;
6476
+ a && (p = new ResizeObserver((b) => {
6477
6477
  let [w] = b;
6478
- w && w.target === c && f && (f.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
6478
+ w && w.target === c && p && (p.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
6479
6479
  var y;
6480
- (y = f) == null || y.observe(t);
6480
+ (y = p) == null || y.observe(t);
6481
6481
  })), n();
6482
- }), c && !l && f.observe(c), f.observe(t));
6482
+ }), c && !l && p.observe(c), p.observe(t));
6483
6483
  let v, g = l ? ir(e) : null;
6484
6484
  l && x();
6485
6485
  function x() {
@@ -6490,7 +6490,7 @@ function uy(e, t, n, r) {
6490
6490
  var b;
6491
6491
  d.forEach((w) => {
6492
6492
  o && w.removeEventListener("scroll", n), s && w.removeEventListener("resize", n);
6493
- }), p == null || p(), (b = f) == null || b.disconnect(), f = null, l && cancelAnimationFrame(v);
6493
+ }), f == null || f(), (b = p) == null || b.disconnect(), p = null, l && cancelAnimationFrame(v);
6494
6494
  };
6495
6495
  }
6496
6496
  const dy = Ob, fy = Db, py = _b, hy = $b, my = Pb, Uc = jb, gy = Lb, xy = (e, t, n) => {
@@ -6565,15 +6565,15 @@ function by(e) {
6565
6565
  transform: i = !0,
6566
6566
  whileElementsMounted: l,
6567
6567
  open: c
6568
- } = e, [d, p] = m.useState({
6568
+ } = e, [d, f] = m.useState({
6569
6569
  x: 0,
6570
6570
  y: 0,
6571
6571
  strategy: n,
6572
6572
  placement: t,
6573
6573
  middlewareData: {},
6574
6574
  isPositioned: !1
6575
- }), [h, f] = m.useState(r);
6576
- xs(h, r) || f(r);
6575
+ }), [h, p] = m.useState(r);
6576
+ xs(h, r) || p(r);
6577
6577
  const [v, g] = m.useState(null), [x, b] = m.useState(null), w = m.useCallback((_) => {
6578
6578
  _ !== T.current && (T.current = _, g(_));
6579
6579
  }, []), y = m.useCallback((_) => {
@@ -6596,12 +6596,12 @@ function by(e) {
6596
6596
  isPositioned: U.current !== !1
6597
6597
  };
6598
6598
  I.current && !xs(N.current, H) && (N.current = H, wo.flushSync(() => {
6599
- p(H);
6599
+ f(H);
6600
6600
  }));
6601
6601
  });
6602
6602
  }, [h, t, n, F, U]);
6603
6603
  rs(() => {
6604
- c === !1 && N.current.isPositioned && (N.current.isPositioned = !1, p((_) => ({
6604
+ c === !1 && N.current.isPositioned && (N.current.isPositioned = !1, f((_) => ({
6605
6605
  ..._,
6606
6606
  isPositioned: !1
6607
6607
  })));
@@ -6763,9 +6763,9 @@ var Yi = "PopperContent", [_y, Py] = Yd(Yi), ef = m.forwardRef(
6763
6763
  avoidCollisions: l = !0,
6764
6764
  collisionBoundary: c = [],
6765
6765
  collisionPadding: d = 0,
6766
- sticky: p = "partial",
6766
+ sticky: f = "partial",
6767
6767
  hideWhenDetached: h = !1,
6768
- updatePositionStrategy: f = "optimized",
6768
+ updatePositionStrategy: p = "optimized",
6769
6769
  onPlaced: v,
6770
6770
  ...g
6771
6771
  } = e, x = Xd(Yi, n), [b, w] = m.useState(null), y = Be(t, (ae) => w(ae)), [C, S] = m.useState(null), T = Gd(C), E = (T == null ? void 0 : T.width) ?? 0, N = (T == null ? void 0 : T.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), D = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, F = Array.isArray(c) ? c : [c], U = F.length > 0, q = {
@@ -6778,7 +6778,7 @@ var Yi = "PopperContent", [_y, Py] = Yd(Yi), ef = m.forwardRef(
6778
6778
  strategy: "fixed",
6779
6779
  placement: A,
6780
6780
  whileElementsMounted: (...ae) => uy(...ae, {
6781
- animationFrame: f === "always"
6781
+ animationFrame: p === "always"
6782
6782
  }),
6783
6783
  elements: {
6784
6784
  reference: x.anchor
@@ -6788,7 +6788,7 @@ var Yi = "PopperContent", [_y, Py] = Yd(Yi), ef = m.forwardRef(
6788
6788
  l && Ty({
6789
6789
  mainAxis: !0,
6790
6790
  crossAxis: !1,
6791
- limiter: p === "partial" ? Cy() : void 0,
6791
+ limiter: f === "partial" ? Cy() : void 0,
6792
6792
  ...q
6793
6793
  }),
6794
6794
  l && Ey({ ...q }),
@@ -6924,9 +6924,9 @@ var Dy = (e) => ({
6924
6924
  options: e,
6925
6925
  fn(t) {
6926
6926
  var x, b, w;
6927
- const { placement: n, rects: r, middlewareData: o } = t, a = ((x = o.arrow) == null ? void 0 : x.centerOffset) !== 0, i = a ? 0 : e.arrowWidth, l = a ? 0 : e.arrowHeight, [c, d] = rf(n), p = { start: "0%", center: "50%", end: "100%" }[d], h = (((b = o.arrow) == null ? void 0 : b.x) ?? 0) + i / 2, f = (((w = o.arrow) == null ? void 0 : w.y) ?? 0) + l / 2;
6927
+ const { placement: n, rects: r, middlewareData: o } = t, a = ((x = o.arrow) == null ? void 0 : x.centerOffset) !== 0, i = a ? 0 : e.arrowWidth, l = a ? 0 : e.arrowHeight, [c, d] = rf(n), f = { start: "0%", center: "50%", end: "100%" }[d], h = (((b = o.arrow) == null ? void 0 : b.x) ?? 0) + i / 2, p = (((w = o.arrow) == null ? void 0 : w.y) ?? 0) + l / 2;
6928
6928
  let v = "", g = "";
6929
- return c === "bottom" ? (v = a ? p : `${h}px`, g = `${-l}px`) : c === "top" ? (v = a ? p : `${h}px`, g = `${r.floating.height + l}px`) : c === "right" ? (v = `${-l}px`, g = a ? p : `${f}px`) : c === "left" && (v = `${r.floating.width + l}px`, g = a ? p : `${f}px`), { data: { x: v, y: g } };
6929
+ return c === "bottom" ? (v = a ? f : `${h}px`, g = `${-l}px`) : c === "top" ? (v = a ? f : `${h}px`, g = `${r.floating.height + l}px`) : c === "right" ? (v = `${-l}px`, g = a ? f : `${p}px`) : c === "left" && (v = `${r.floating.width + l}px`, g = a ? f : `${p}px`), { data: { x: v, y: g } };
6930
6930
  }
6931
6931
  });
6932
6932
  function rf(e) {
@@ -6969,25 +6969,25 @@ function Fy(e) {
6969
6969
  }, [i]), Nt(() => {
6970
6970
  const c = r.current, d = o.current;
6971
6971
  if (d !== e) {
6972
- const h = s.current, f = zo(c);
6973
- e ? l("MOUNT") : f === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(d && h !== f ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
6972
+ const h = s.current, p = zo(c);
6973
+ e ? l("MOUNT") : p === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(d && h !== p ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
6974
6974
  }
6975
6975
  }, [e, l]), Nt(() => {
6976
6976
  if (t) {
6977
6977
  let c;
6978
- const d = t.ownerDocument.defaultView ?? window, p = (f) => {
6979
- const g = zo(r.current).includes(CSS.escape(f.animationName));
6980
- if (f.target === t && g && (l("ANIMATION_END"), !o.current)) {
6978
+ const d = t.ownerDocument.defaultView ?? window, f = (p) => {
6979
+ const g = zo(r.current).includes(CSS.escape(p.animationName));
6980
+ if (p.target === t && g && (l("ANIMATION_END"), !o.current)) {
6981
6981
  const x = t.style.animationFillMode;
6982
6982
  t.style.animationFillMode = "forwards", c = d.setTimeout(() => {
6983
6983
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = x);
6984
6984
  });
6985
6985
  }
6986
- }, h = (f) => {
6987
- f.target === t && (s.current = zo(r.current));
6986
+ }, h = (p) => {
6987
+ p.target === t && (s.current = zo(r.current));
6988
6988
  };
6989
- return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
6990
- d.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
6989
+ return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
6990
+ d.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
6991
6991
  };
6992
6992
  } else
6993
6993
  l("ANIMATION_END");
@@ -7024,8 +7024,8 @@ var Ky = m.forwardRef((e, t) => {
7024
7024
  onCurrentTabStopIdChange: l,
7025
7025
  onEntryFocus: c,
7026
7026
  preventScrollOnEntryFocus: d = !1,
7027
- ...p
7028
- } = e, h = m.useRef(null), f = Be(t, h), v = Bs(s), [g, x] = Dn({
7027
+ ...f
7028
+ } = e, h = m.useRef(null), p = Be(t, h), v = Bs(s), [g, x] = Dn({
7029
7029
  prop: a,
7030
7030
  defaultProp: i ?? null,
7031
7031
  onChange: l,
@@ -7061,8 +7061,8 @@ var Ky = m.forwardRef((e, t) => {
7061
7061
  {
7062
7062
  tabIndex: b || T === 0 ? -1 : 0,
7063
7063
  "data-orientation": r,
7064
- ...p,
7065
- ref: f,
7064
+ ...f,
7065
+ ref: p,
7066
7066
  style: { outline: "none", ...e.style },
7067
7067
  onMouseDown: se(e.onMouseDown, () => {
7068
7068
  S.current = !0;
@@ -7094,11 +7094,11 @@ var Ky = m.forwardRef((e, t) => {
7094
7094
  tabStopId: s,
7095
7095
  children: a,
7096
7096
  ...i
7097
- } = e, l = Lt(), c = s || l, d = Vy(lf, n), p = d.currentTabStopId === c, h = of(n), { onFocusableItemAdd: f, onFocusableItemRemove: v, currentTabStopId: g } = d;
7097
+ } = e, l = Lt(), c = s || l, d = Vy(lf, n), f = d.currentTabStopId === c, h = of(n), { onFocusableItemAdd: p, onFocusableItemRemove: v, currentTabStopId: g } = d;
7098
7098
  return m.useEffect(() => {
7099
7099
  if (r)
7100
- return f(), () => v();
7101
- }, [r, f, v]), /* @__PURE__ */ u.jsx(
7100
+ return p(), () => v();
7101
+ }, [r, p, v]), /* @__PURE__ */ u.jsx(
7102
7102
  si.ItemSlot,
7103
7103
  {
7104
7104
  scope: n,
@@ -7108,7 +7108,7 @@ var Ky = m.forwardRef((e, t) => {
7108
7108
  children: /* @__PURE__ */ u.jsx(
7109
7109
  ge.span,
7110
7110
  {
7111
- tabIndex: p ? 0 : -1,
7111
+ tabIndex: f ? 0 : -1,
7112
7112
  "data-orientation": d.orientation,
7113
7113
  ...i,
7114
7114
  ref: t,
@@ -7136,7 +7136,7 @@ var Ky = m.forwardRef((e, t) => {
7136
7136
  setTimeout(() => uf(y));
7137
7137
  }
7138
7138
  }),
7139
- children: typeof a == "function" ? a({ isCurrentTabStop: p, hasTabStop: g != null }) : a
7139
+ children: typeof a == "function" ? a({ isCurrentTabStop: f, hasTabStop: g != null }) : a
7140
7140
  }
7141
7141
  )
7142
7142
  }
@@ -7189,17 +7189,17 @@ var Jy = af, Zy = cf, Qy = function(e) {
7189
7189
  }, t0 = function(e, t, n, r) {
7190
7190
  var o = e0(t, Array.isArray(e) ? e : [e]);
7191
7191
  Uo[n] || (Uo[n] = /* @__PURE__ */ new WeakMap());
7192
- var s = Uo[n], a = [], i = /* @__PURE__ */ new Set(), l = new Set(o), c = function(p) {
7193
- !p || i.has(p) || (i.add(p), c(p.parentNode));
7192
+ var s = Uo[n], a = [], i = /* @__PURE__ */ new Set(), l = new Set(o), c = function(f) {
7193
+ !f || i.has(f) || (i.add(f), c(f.parentNode));
7194
7194
  };
7195
7195
  o.forEach(c);
7196
- var d = function(p) {
7197
- !p || l.has(p) || Array.prototype.forEach.call(p.children, function(h) {
7196
+ var d = function(f) {
7197
+ !f || l.has(f) || Array.prototype.forEach.call(f.children, function(h) {
7198
7198
  if (i.has(h))
7199
7199
  d(h);
7200
7200
  else
7201
7201
  try {
7202
- var f = h.getAttribute(r), v = f !== null && f !== "false", g = (wr.get(h) || 0) + 1, x = (s.get(h) || 0) + 1;
7202
+ var p = h.getAttribute(r), v = p !== null && p !== "false", g = (wr.get(h) || 0) + 1, x = (s.get(h) || 0) + 1;
7203
7203
  wr.set(h, g), s.set(h, x), a.push(h), g === 1 && v && Ho.set(h, !0), x === 1 && h.setAttribute(n, "true"), v || h.setAttribute(r, "true");
7204
7204
  } catch (b) {
7205
7205
  console.error("aria-hidden: cannot operate on ", h, b);
@@ -7207,9 +7207,9 @@ var Jy = af, Zy = cf, Qy = function(e) {
7207
7207
  });
7208
7208
  };
7209
7209
  return d(t), i.clear(), ja++, function() {
7210
- a.forEach(function(p) {
7211
- var h = wr.get(p) - 1, f = s.get(p) - 1;
7212
- wr.set(p, h), s.set(p, f), h || (Ho.has(p) || p.removeAttribute(r), Ho.delete(p)), f || p.removeAttribute(n);
7210
+ a.forEach(function(f) {
7211
+ var h = wr.get(f) - 1, p = s.get(f) - 1;
7212
+ wr.set(f, h), s.set(f, p), h || (Ho.has(f) || f.removeAttribute(r), Ho.delete(f)), p || f.removeAttribute(n);
7213
7213
  }), ja--, ja || (wr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Ho = /* @__PURE__ */ new WeakMap(), Uo = {});
7214
7214
  };
7215
7215
  }, el = function(e, t, n) {
@@ -7367,11 +7367,11 @@ var hf = u0(), Pa = function() {
7367
7367
  onScrollCapture: Pa,
7368
7368
  onWheelCapture: Pa,
7369
7369
  onTouchMoveCapture: Pa
7370
- }), o = r[0], s = r[1], a = e.forwardProps, i = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, f = e.noRelative, v = e.noIsolation, g = e.inert, x = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, y = e.gapMode, C = ff(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, T = i0([n, t]), E = yn(yn({}, C), o);
7370
+ }), o = r[0], s = r[1], a = e.forwardProps, i = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, v = e.noIsolation, g = e.inert, x = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, y = e.gapMode, C = ff(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, T = i0([n, t]), E = yn(yn({}, C), o);
7371
7371
  return m.createElement(
7372
7372
  m.Fragment,
7373
7373
  null,
7374
- d && m.createElement(S, { sideCar: hf, removeScrollBar: c, shards: p, noRelative: f, noIsolation: v, inert: g, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: y }),
7374
+ d && m.createElement(S, { sideCar: hf, removeScrollBar: c, shards: f, noRelative: p, noIsolation: v, inert: g, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: y }),
7375
7375
  a ? m.cloneElement(m.Children.only(i), yn(yn({}, E), { ref: T })) : m.createElement(w, yn({}, E, { className: l, ref: T }), i)
7376
7376
  );
7377
7377
  });
@@ -7570,12 +7570,12 @@ var br = ai ? { passive: !1 } : !1, E0 = function(e) {
7570
7570
  }, A0 = function(e, t) {
7571
7571
  return e === "h" && t === "rtl" ? -1 : 1;
7572
7572
  }, j0 = function(e, t, n, r, o) {
7573
- var s = A0(e, window.getComputedStyle(t).direction), a = s * r, i = n.target, l = t.contains(i), c = !1, d = a > 0, p = 0, h = 0;
7573
+ var s = A0(e, window.getComputedStyle(t).direction), a = s * r, i = n.target, l = t.contains(i), c = !1, d = a > 0, f = 0, h = 0;
7574
7574
  do {
7575
7575
  if (!i)
7576
7576
  break;
7577
- var f = vf(e, i), v = f[0], g = f[1], x = f[2], b = g - x - s * v;
7578
- (v || b) && xf(e, i) && (p += b, h += v);
7577
+ var p = vf(e, i), v = p[0], g = p[1], x = p[2], b = g - x - s * v;
7578
+ (v || b) && xf(e, i) && (f += b, h += v);
7579
7579
  var w = i.parentNode;
7580
7580
  i = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
7581
7581
  } while (
@@ -7583,7 +7583,7 @@ var br = ai ? { passive: !1 } : !1, E0 = function(e) {
7583
7583
  !l && i !== document.body || // self content
7584
7584
  l && (t.contains(i) || t === i)
7585
7585
  );
7586
- return (d && Math.abs(p) < 1 || !d && Math.abs(h) < 1) && (c = !0), c;
7586
+ return (d && Math.abs(f) < 1 || !d && Math.abs(h) < 1) && (c = !0), c;
7587
7587
  }, Vo = function(e) {
7588
7588
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
7589
7589
  }, Gc = function(e) {
@@ -7656,15 +7656,15 @@ function O0(e) {
7656
7656
  }, 1);
7657
7657
  }, []), d = m.useCallback(function(g) {
7658
7658
  n.current = Vo(g), r.current = void 0;
7659
- }, []), p = m.useCallback(function(g) {
7659
+ }, []), f = m.useCallback(function(g) {
7660
7660
  c(g.type, Gc(g), g.target, i(g, e.lockRef.current));
7661
7661
  }, []), h = m.useCallback(function(g) {
7662
7662
  c(g.type, Vo(g), g.target, i(g, e.lockRef.current));
7663
7663
  }, []);
7664
7664
  m.useEffect(function() {
7665
7665
  return yr.push(s), e.setCallbacks({
7666
- onScrollCapture: p,
7667
- onWheelCapture: p,
7666
+ onScrollCapture: f,
7667
+ onWheelCapture: f,
7668
7668
  onTouchMoveCapture: h
7669
7669
  }), document.addEventListener("wheel", l, br), document.addEventListener("touchmove", l, br), document.addEventListener("touchstart", d, br), function() {
7670
7670
  yr = yr.filter(function(g) {
@@ -7672,12 +7672,12 @@ function O0(e) {
7672
7672
  }), document.removeEventListener("wheel", l, br), document.removeEventListener("touchmove", l, br), document.removeEventListener("touchstart", d, br);
7673
7673
  };
7674
7674
  }, []);
7675
- var f = e.removeScrollBar, v = e.inert;
7675
+ var p = e.removeScrollBar, v = e.inert;
7676
7676
  return m.createElement(
7677
7677
  m.Fragment,
7678
7678
  null,
7679
7679
  v ? m.createElement(s, { styles: P0(o) }) : null,
7680
- f ? m.createElement(C0, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
7680
+ p ? m.createElement(C0, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
7681
7681
  );
7682
7682
  }
7683
7683
  function D0(e) {
@@ -7701,27 +7701,27 @@ var ii = ["Enter", " "], $0 = ["ArrowDown", "PageUp", "Home"], wf = ["ArrowUp",
7701
7701
  Hr,
7702
7702
  sf
7703
7703
  ]), Gs = Hr(), yf = sf(), [W0, hr] = pr(Ao), [V0, jo] = pr(Ao), Sf = (e) => {
7704
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i = Gs(t), [l, c] = m.useState(null), d = m.useRef(!1), p = wt(s), h = Bs(o);
7704
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i = Gs(t), [l, c] = m.useState(null), d = m.useRef(!1), f = wt(s), h = Bs(o);
7705
7705
  return m.useEffect(() => {
7706
- const f = () => {
7706
+ const p = () => {
7707
7707
  d.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
7708
7708
  }, v = () => d.current = !1;
7709
- return document.addEventListener("keydown", f, { capture: !0 }), () => {
7710
- document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
7709
+ return document.addEventListener("keydown", p, { capture: !0 }), () => {
7710
+ document.removeEventListener("keydown", p, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
7711
7711
  };
7712
7712
  }, []), /* @__PURE__ */ u.jsx(Xi, { ...i, children: /* @__PURE__ */ u.jsx(
7713
7713
  W0,
7714
7714
  {
7715
7715
  scope: t,
7716
7716
  open: n,
7717
- onOpenChange: p,
7717
+ onOpenChange: f,
7718
7718
  content: l,
7719
7719
  onContentChange: c,
7720
7720
  children: /* @__PURE__ */ u.jsx(
7721
7721
  V0,
7722
7722
  {
7723
7723
  scope: t,
7724
- onClose: m.useCallback(() => p(!1), [p]),
7724
+ onClose: m.useCallback(() => f(!1), [f]),
7725
7725
  isUsingKeyboardRef: d,
7726
7726
  dir: h,
7727
7727
  modal: a,
@@ -7799,9 +7799,9 @@ var sn = "MenuContent", [G0, rl] = pr(sn), Ef = m.forwardRef(
7799
7799
  onEntryFocus: l,
7800
7800
  onEscapeKeyDown: c,
7801
7801
  onPointerDownOutside: d,
7802
- onFocusOutside: p,
7802
+ onFocusOutside: f,
7803
7803
  onInteractOutside: h,
7804
- onDismiss: f,
7804
+ onDismiss: p,
7805
7805
  disableOutsideScroll: v,
7806
7806
  ...g
7807
7807
  } = e, x = hr(sn, n), b = jo(sn, n), w = Gs(n), y = yf(n), C = H0(n), [S, T] = m.useState(null), E = m.useRef(null), N = Be(t, E, x.onContentChange), A = m.useRef(0), D = m.useRef(""), F = m.useRef(0), U = m.useRef(null), q = m.useRef("right"), I = m.useRef(0), G = v ? qs : m.Fragment, K = v ? { as: J0, allowPinchZoom: !0 } : void 0, z = (k) => {
@@ -7861,9 +7861,9 @@ var sn = "MenuContent", [G0, rl] = pr(sn), Ef = m.forwardRef(
7861
7861
  disableOutsidePointerEvents: i,
7862
7862
  onEscapeKeyDown: c,
7863
7863
  onPointerDownOutside: d,
7864
- onFocusOutside: p,
7864
+ onFocusOutside: f,
7865
7865
  onInteractOutside: h,
7866
- onDismiss: f,
7866
+ onDismiss: p,
7867
7867
  children: /* @__PURE__ */ u.jsx(
7868
7868
  Jy,
7869
7869
  {
@@ -7942,10 +7942,10 @@ kf.displayName = Q0;
7942
7942
  var vs = "MenuItem", Xc = "menu.itemSelect", Ys = m.forwardRef(
7943
7943
  (e, t) => {
7944
7944
  const { disabled: n = !1, onSelect: r, ...o } = e, s = m.useRef(null), a = jo(vs, e.__scopeMenu), i = rl(vs, e.__scopeMenu), l = Be(t, s), c = m.useRef(!1), d = () => {
7945
- const p = s.current;
7946
- if (!n && p) {
7945
+ const f = s.current;
7946
+ if (!n && f) {
7947
7947
  const h = new CustomEvent(Xc, { bubbles: !0, cancelable: !0 });
7948
- p.addEventListener(Xc, (f) => r == null ? void 0 : r(f), { once: !0 }), Bi(p, h), h.defaultPrevented ? c.current = !1 : a.onClose();
7948
+ f.addEventListener(Xc, (p) => r == null ? void 0 : r(p), { once: !0 }), Bi(f, h), h.defaultPrevented ? c.current = !1 : a.onClose();
7949
7949
  }
7950
7950
  };
7951
7951
  return /* @__PURE__ */ u.jsx(
@@ -7955,17 +7955,17 @@ var vs = "MenuItem", Xc = "menu.itemSelect", Ys = m.forwardRef(
7955
7955
  ref: l,
7956
7956
  disabled: n,
7957
7957
  onClick: se(e.onClick, d),
7958
- onPointerDown: (p) => {
7958
+ onPointerDown: (f) => {
7959
7959
  var h;
7960
- (h = e.onPointerDown) == null || h.call(e, p), c.current = !0;
7960
+ (h = e.onPointerDown) == null || h.call(e, f), c.current = !0;
7961
7961
  },
7962
- onPointerUp: se(e.onPointerUp, (p) => {
7962
+ onPointerUp: se(e.onPointerUp, (f) => {
7963
7963
  var h;
7964
- c.current || (h = p.currentTarget) == null || h.click();
7964
+ c.current || (h = f.currentTarget) == null || h.click();
7965
7965
  }),
7966
- onKeyDown: se(e.onKeyDown, (p) => {
7966
+ onKeyDown: se(e.onKeyDown, (f) => {
7967
7967
  const h = i.searchRef.current !== "";
7968
- n || h && p.key === " " || ii.includes(p.key) && (p.currentTarget.click(), p.preventDefault());
7968
+ n || h && f.key === " " || ii.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
7969
7969
  })
7970
7970
  }
7971
7971
  );
@@ -7974,10 +7974,10 @@ var vs = "MenuItem", Xc = "menu.itemSelect", Ys = m.forwardRef(
7974
7974
  Ys.displayName = vs;
7975
7975
  var Rf = m.forwardRef(
7976
7976
  (e, t) => {
7977
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, a = rl(vs, n), i = yf(n), l = m.useRef(null), c = Be(t, l), [d, p] = m.useState(!1), [h, f] = m.useState("");
7977
+ const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, a = rl(vs, n), i = yf(n), l = m.useRef(null), c = Be(t, l), [d, f] = m.useState(!1), [h, p] = m.useState("");
7978
7978
  return m.useEffect(() => {
7979
7979
  const v = l.current;
7980
- v && f((v.textContent ?? "").trim());
7980
+ v && p((v.textContent ?? "").trim());
7981
7981
  }, [s.children]), /* @__PURE__ */ u.jsx(
7982
7982
  lo.ItemSlot,
7983
7983
  {
@@ -8003,8 +8003,8 @@ var Rf = m.forwardRef(
8003
8003
  e.onPointerLeave,
8004
8004
  co((v) => a.onItemLeave(v))
8005
8005
  ),
8006
- onFocus: se(e.onFocus, () => p(!0)),
8007
- onBlur: se(e.onBlur, () => p(!1))
8006
+ onFocus: se(e.onFocus, () => f(!0)),
8007
+ onBlur: se(e.onBlur, () => f(!1))
8008
8008
  }
8009
8009
  ) })
8010
8010
  }
@@ -8117,9 +8117,9 @@ var aS = "MenuSub", [IN, Lf] = pr(aS), Zr = "MenuSubTrigger", $f = m.forwardRef(
8117
8117
  a.current && window.clearTimeout(a.current), a.current = null;
8118
8118
  }, []);
8119
8119
  return m.useEffect(() => d, [d]), m.useEffect(() => {
8120
- const p = i.current;
8120
+ const f = i.current;
8121
8121
  return () => {
8122
- window.clearTimeout(p), l(null);
8122
+ window.clearTimeout(f), l(null);
8123
8123
  };
8124
8124
  }, [i, l]), /* @__PURE__ */ u.jsx(tl, { asChild: !0, ...c, children: /* @__PURE__ */ u.jsx(
8125
8125
  Rf,
@@ -8131,31 +8131,31 @@ var aS = "MenuSub", [IN, Lf] = pr(aS), Zr = "MenuSubTrigger", $f = m.forwardRef(
8131
8131
  "data-state": zf(n.open),
8132
8132
  ...e,
8133
8133
  ref: On(t, o.onTriggerChange),
8134
- onClick: (p) => {
8134
+ onClick: (f) => {
8135
8135
  var h;
8136
- (h = e.onClick) == null || h.call(e, p), !(e.disabled || p.defaultPrevented) && (p.currentTarget.focus(), n.open || n.onOpenChange(!0));
8136
+ (h = e.onClick) == null || h.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
8137
8137
  },
8138
8138
  onPointerMove: se(
8139
8139
  e.onPointerMove,
8140
- co((p) => {
8141
- s.onItemEnter(p), !p.defaultPrevented && !e.disabled && !n.open && !a.current && (s.onPointerGraceIntentChange(null), a.current = window.setTimeout(() => {
8140
+ co((f) => {
8141
+ s.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !a.current && (s.onPointerGraceIntentChange(null), a.current = window.setTimeout(() => {
8142
8142
  n.onOpenChange(!0), d();
8143
8143
  }, 100));
8144
8144
  })
8145
8145
  ),
8146
8146
  onPointerLeave: se(
8147
8147
  e.onPointerLeave,
8148
- co((p) => {
8149
- var f, v;
8148
+ co((f) => {
8149
+ var p, v;
8150
8150
  d();
8151
- const h = (f = n.content) == null ? void 0 : f.getBoundingClientRect();
8151
+ const h = (p = n.content) == null ? void 0 : p.getBoundingClientRect();
8152
8152
  if (h) {
8153
8153
  const g = (v = n.content) == null ? void 0 : v.dataset.side, x = g === "right", b = x ? -5 : 5, w = h[x ? "left" : "right"], y = h[x ? "right" : "left"];
8154
8154
  s.onPointerGraceIntentChange({
8155
8155
  area: [
8156
8156
  // Apply a bleed on clientX to ensure that our exit point is
8157
8157
  // consistently within polygon bounds
8158
- { x: p.clientX + b, y: p.clientY },
8158
+ { x: f.clientX + b, y: f.clientY },
8159
8159
  { x: w, y: h.top },
8160
8160
  { x: y, y: h.top },
8161
8161
  { x: y, y: h.bottom },
@@ -8167,15 +8167,15 @@ var aS = "MenuSub", [IN, Lf] = pr(aS), Zr = "MenuSubTrigger", $f = m.forwardRef(
8167
8167
  300
8168
8168
  );
8169
8169
  } else {
8170
- if (s.onTriggerLeave(p), p.defaultPrevented) return;
8170
+ if (s.onTriggerLeave(f), f.defaultPrevented) return;
8171
8171
  s.onPointerGraceIntentChange(null);
8172
8172
  }
8173
8173
  })
8174
8174
  ),
8175
- onKeyDown: se(e.onKeyDown, (p) => {
8176
- var f;
8175
+ onKeyDown: se(e.onKeyDown, (f) => {
8176
+ var p;
8177
8177
  const h = s.searchRef.current !== "";
8178
- e.disabled || h && p.key === " " || B0[r.dir].includes(p.key) && (n.onOpenChange(!0), (f = n.content) == null || f.focus(), p.preventDefault());
8178
+ e.disabled || h && f.key === " " || B0[r.dir].includes(f.key) && (n.onOpenChange(!0), (p = n.content) == null || p.focus(), f.preventDefault());
8179
8179
  })
8180
8180
  }
8181
8181
  ) });
@@ -8198,8 +8198,8 @@ var Ff = "MenuSubContent", Bf = m.forwardRef(
8198
8198
  disableOutsideScroll: !1,
8199
8199
  trapFocus: !1,
8200
8200
  onOpenAutoFocus: (d) => {
8201
- var p;
8202
- a.isUsingKeyboardRef.current && ((p = l.current) == null || p.focus()), d.preventDefault();
8201
+ var f;
8202
+ a.isUsingKeyboardRef.current && ((f = l.current) == null || f.focus()), d.preventDefault();
8203
8203
  },
8204
8204
  onCloseAutoFocus: (d) => d.preventDefault(),
8205
8205
  onFocusOutside: se(e.onFocusOutside, (d) => {
@@ -8209,9 +8209,9 @@ var Ff = "MenuSubContent", Bf = m.forwardRef(
8209
8209
  a.onClose(), d.preventDefault();
8210
8210
  }),
8211
8211
  onKeyDown: se(e.onKeyDown, (d) => {
8212
- var f;
8213
- const p = d.currentTarget.contains(d.target), h = z0[a.dir].includes(d.key);
8214
- p && h && (s.onOpenChange(!1), (f = i.trigger) == null || f.focus(), d.preventDefault());
8212
+ var p;
8213
+ const f = d.currentTarget.contains(d.target), h = z0[a.dir].includes(d.key);
8214
+ f && h && (s.onOpenChange(!1), (p = i.trigger) == null || p.focus(), d.preventDefault());
8215
8215
  })
8216
8216
  }
8217
8217
  ) }) }) });
@@ -8248,8 +8248,8 @@ function uS(e, t) {
8248
8248
  const { x: n, y: r } = e;
8249
8249
  let o = !1;
8250
8250
  for (let s = 0, a = t.length - 1; s < t.length; a = s++) {
8251
- const i = t[s], l = t[a], c = i.x, d = i.y, p = l.x, h = l.y;
8252
- d > r != h > r && n < (p - c) * (r - d) / (h - d) + c && (o = !o);
8251
+ const i = t[s], l = t[a], c = i.x, d = i.y, f = l.x, h = l.y;
8252
+ d > r != h > r && n < (f - c) * (r - d) / (h - d) + c && (o = !o);
8253
8253
  }
8254
8254
  return o;
8255
8255
  }
@@ -8273,7 +8273,7 @@ var fS = Sf, pS = tl, hS = Cf, mS = Ef, gS = sl, xS = kf, vS = Ys, wS = If, bS =
8273
8273
  defaultOpen: s,
8274
8274
  onOpenChange: a,
8275
8275
  modal: i = !0
8276
- } = e, l = Ft(t), c = m.useRef(null), [d, p] = Dn({
8276
+ } = e, l = Ft(t), c = m.useRef(null), [d, f] = Dn({
8277
8277
  prop: o,
8278
8278
  defaultProp: s ?? !1,
8279
8279
  onChange: a,
@@ -8287,10 +8287,10 @@ var fS = Sf, pS = tl, hS = Cf, mS = Ef, gS = sl, xS = kf, vS = Ys, wS = If, bS =
8287
8287
  triggerRef: c,
8288
8288
  contentId: Lt(),
8289
8289
  open: d,
8290
- onOpenChange: p,
8291
- onOpenToggle: m.useCallback(() => p((h) => !h), [p]),
8290
+ onOpenChange: f,
8291
+ onOpenToggle: m.useCallback(() => f((h) => !h), [f]),
8292
8292
  modal: i,
8293
- children: /* @__PURE__ */ u.jsx(fS, { ...l, open: d, onOpenChange: p, dir: r, modal: i, children: n })
8293
+ children: /* @__PURE__ */ u.jsx(fS, { ...l, open: d, onOpenChange: f, dir: r, modal: i, children: n })
8294
8294
  }
8295
8295
  );
8296
8296
  };
@@ -8575,9 +8575,9 @@ function eT({
8575
8575
  onSend: l,
8576
8576
  onCancelEdit: c,
8577
8577
  onStop: d,
8578
- className: p = "",
8578
+ className: f = "",
8579
8579
  textareaClassName: h = "",
8580
- allowEmptySend: f = !1,
8580
+ allowEmptySend: p = !1,
8581
8581
  sendButtonClassName: v,
8582
8582
  validate: g,
8583
8583
  onValidationError: x
@@ -8616,7 +8616,7 @@ function eT({
8616
8616
  async (P) => {
8617
8617
  P && P.preventDefault();
8618
8618
  const L = (C ?? "").trim();
8619
- if (!L && !f || G(L))
8619
+ if (!L && !p || G(L))
8620
8620
  return;
8621
8621
  const Q = ++N.current;
8622
8622
  A.current = {
@@ -8638,7 +8638,7 @@ function eT({
8638
8638
  }
8639
8639
  });
8640
8640
  },
8641
- [C, l, f, b, i, G]
8641
+ [C, l, p, b, i, G]
8642
8642
  ), k = O.useCallback((P) => {
8643
8643
  const L = P.target.value;
8644
8644
  z(L, { fromUser: !0 }), A.current && (A.current.shouldClear = !1), E.current && (E.current.style.height = "auto", E.current.style.height = `${E.current.scrollHeight}px`), F && G(L.trim());
@@ -8648,7 +8648,7 @@ function eT({
8648
8648
  },
8649
8649
  [_, t, c]
8650
8650
  ), M = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${t ? "border-[hsl(var(--ring))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] dark:bg-[hsl(var(--card))] dark:text-[hsl(var(--card-foreground))]" : ""} ${h}`;
8651
- return /* @__PURE__ */ u.jsx("form", { onSubmit: (P) => void _(P), className: `w-full ${p}`, children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
8651
+ return /* @__PURE__ */ u.jsx("form", { onSubmit: (P) => void _(P), className: `w-full ${f}`, children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
8652
8652
  /* @__PURE__ */ u.jsxs("div", { className: "flex-1", children: [
8653
8653
  /* @__PURE__ */ u.jsx(
8654
8654
  fp,
@@ -8689,7 +8689,7 @@ function eT({
8689
8689
  size: "icon",
8690
8690
  className: `shrink-0 ${v ?? ""}`,
8691
8691
  title: t ? "Save changes" : "Send message",
8692
- disabled: o || !C.trim() && !f || S,
8692
+ disabled: o || !C.trim() && !p || S,
8693
8693
  children: /* @__PURE__ */ u.jsx(Gg, { size: 16 })
8694
8694
  }
8695
8695
  ) })
@@ -8708,9 +8708,9 @@ function nT({
8708
8708
  isStreaming: l = !1,
8709
8709
  disabled: c = !1,
8710
8710
  textareaClassName: d = "",
8711
- customStyles: p = {},
8711
+ customStyles: f = {},
8712
8712
  enableFileUpload: h = !1,
8713
- enableExcelUpload: f = !1,
8713
+ enableExcelUpload: p = !1,
8714
8714
  onExcelUpload: v,
8715
8715
  onError: g,
8716
8716
  allowEmptySend: x = !1,
@@ -8758,9 +8758,9 @@ function nT({
8758
8758
  }
8759
8759
  },
8760
8760
  [n, K, w]
8761
- ), M = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${s ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${b ? "border-red-400" : ""} ${p.textarea || ""} ${d}`;
8761
+ ), M = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${s ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${b ? "border-red-400" : ""} ${f.textarea || ""} ${d}`;
8762
8762
  return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8763
- (h || f) && /* @__PURE__ */ u.jsxs("div", { className: "mb-3 space-y-3", children: [
8763
+ (h || p) && /* @__PURE__ */ u.jsxs("div", { className: "mb-3 space-y-3", children: [
8764
8764
  h && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8765
8765
  /* @__PURE__ */ u.jsx(
8766
8766
  "input",
@@ -8796,7 +8796,7 @@ function nT({
8796
8796
  L
8797
8797
  )) })
8798
8798
  ] }),
8799
- f && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8799
+ p && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8800
8800
  /* @__PURE__ */ u.jsx(
8801
8801
  "input",
8802
8802
  {
@@ -8817,7 +8817,7 @@ function nT({
8817
8817
  ] })
8818
8818
  ] }),
8819
8819
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
8820
- (h || f) && /* @__PURE__ */ u.jsxs(ll, { children: [
8820
+ (h || p) && /* @__PURE__ */ u.jsxs(ll, { children: [
8821
8821
  /* @__PURE__ */ u.jsx(cl, { asChild: !0, children: /* @__PURE__ */ u.jsx(
8822
8822
  rt,
8823
8823
  {
@@ -8826,7 +8826,7 @@ function nT({
8826
8826
  variant: "outline",
8827
8827
  disabled: l || c,
8828
8828
  title: "More input actions",
8829
- className: p.moreButton || "",
8829
+ className: f.moreButton || "",
8830
8830
  children: /* @__PURE__ */ u.jsx(Yg, { size: 16 })
8831
8831
  }
8832
8832
  ) }),
@@ -8845,7 +8845,7 @@ function nT({
8845
8845
  ]
8846
8846
  }
8847
8847
  ),
8848
- f && /* @__PURE__ */ u.jsxs(
8848
+ p && /* @__PURE__ */ u.jsxs(
8849
8849
  nr,
8850
8850
  {
8851
8851
  onClick: () => {
@@ -8876,7 +8876,7 @@ function nT({
8876
8876
  onStop: o,
8877
8877
  allowEmptySend: V,
8878
8878
  textareaClassName: M,
8879
- sendButtonClassName: p.sendButton
8879
+ sendButtonClassName: f.sendButton
8880
8880
  }
8881
8881
  ) })
8882
8882
  ] })
@@ -9177,21 +9177,21 @@ function fl(e, t, n) {
9177
9177
  function hT(e, t, n, r, o, s, a, i, l) {
9178
9178
  const c = O.useCallback(
9179
9179
  (d) => {
9180
- const p = mT(d.children, t, i ? "offsetWidth" : "offsetHeight", o);
9180
+ const f = mT(d.children, t, i ? "offsetWidth" : "offsetHeight", o);
9181
9181
  let h = d.parentElement;
9182
9182
  for (; !h.dataset.virtuosoScroller; )
9183
9183
  h = h.parentElement;
9184
- const f = h.lastElementChild.dataset.viewportType === "window";
9184
+ const p = h.lastElementChild.dataset.viewportType === "window";
9185
9185
  let v;
9186
- f && (v = h.ownerDocument.defaultView);
9187
- const g = a ? i ? a.scrollLeft : a.scrollTop : f ? i ? v.scrollX || v.document.documentElement.scrollLeft : v.scrollY || v.document.documentElement.scrollTop : i ? h.scrollLeft : h.scrollTop, x = a ? i ? a.scrollWidth : a.scrollHeight : f ? i ? v.document.documentElement.scrollWidth : v.document.documentElement.scrollHeight : i ? h.scrollWidth : h.scrollHeight, b = a ? i ? a.offsetWidth : a.offsetHeight : f ? i ? v.innerWidth : v.innerHeight : i ? h.offsetWidth : h.offsetHeight;
9186
+ p && (v = h.ownerDocument.defaultView);
9187
+ const g = a ? i ? a.scrollLeft : a.scrollTop : p ? i ? v.scrollX || v.document.documentElement.scrollLeft : v.scrollY || v.document.documentElement.scrollTop : i ? h.scrollLeft : h.scrollTop, x = a ? i ? a.scrollWidth : a.scrollHeight : p ? i ? v.document.documentElement.scrollWidth : v.document.documentElement.scrollHeight : i ? h.scrollWidth : h.scrollHeight, b = a ? i ? a.offsetWidth : a.offsetHeight : p ? i ? v.innerWidth : v.innerHeight : i ? h.offsetWidth : h.offsetHeight;
9188
9188
  r({
9189
9189
  scrollHeight: x,
9190
9190
  scrollTop: Math.max(g, 0),
9191
9191
  viewportHeight: b
9192
9192
  }), s == null || s(
9193
9193
  i ? eu("column-gap", getComputedStyle(d).columnGap, o) : eu("row-gap", getComputedStyle(d).rowGap, o)
9194
- ), p !== null && e(p);
9194
+ ), f !== null && e(f);
9195
9195
  },
9196
9196
  [e, t, o, s, a, r, i]
9197
9197
  );
@@ -9209,8 +9209,8 @@ function mT(e, t, n, r) {
9209
9209
  const l = parseInt(i.dataset.index), c = parseFloat(i.dataset.knownSize), d = t(i, n);
9210
9210
  if (d === 0 && r("Zero-sized element, this should not happen", { child: i }, qt.ERROR), d === c)
9211
9211
  continue;
9212
- const p = s[s.length - 1];
9213
- s.length === 0 || p.size !== d || p.endIndex !== l - 1 ? s.push({ endIndex: l, size: d, startIndex: l }) : s[s.length - 1].endIndex++;
9212
+ const f = s[s.length - 1];
9213
+ s.length === 0 || f.size !== d || f.endIndex !== l - 1 ? s.push({ endIndex: l, size: d, startIndex: l }) : s[s.length - 1].endIndex++;
9214
9214
  }
9215
9215
  return s;
9216
9216
  }
@@ -9223,16 +9223,16 @@ function gp(e, t, n) {
9223
9223
  if (!(l != null && l.offsetParent))
9224
9224
  return;
9225
9225
  const c = l.getBoundingClientRect(), d = c.width;
9226
- let p, h;
9226
+ let f, h;
9227
9227
  if (t) {
9228
- const f = t.getBoundingClientRect(), v = c.top - f.top;
9229
- h = f.height - Math.max(0, v), p = v + t.scrollTop;
9228
+ const p = t.getBoundingClientRect(), v = c.top - p.top;
9229
+ h = p.height - Math.max(0, v), f = v + t.scrollTop;
9230
9230
  } else {
9231
- const f = a.current.ownerDocument.defaultView;
9232
- h = f.innerHeight - Math.max(0, c.top), p = c.top + f.scrollY;
9231
+ const p = a.current.ownerDocument.defaultView;
9232
+ h = p.innerHeight - Math.max(0, c.top), f = c.top + p.scrollY;
9233
9233
  }
9234
9234
  r.current = {
9235
- offsetTop: p,
9235
+ offsetTop: f,
9236
9236
  visibleHeight: h,
9237
9237
  visibleWidth: d
9238
9238
  }, e(r.current);
@@ -9262,7 +9262,7 @@ function gp(e, t, n) {
9262
9262
  }
9263
9263
  const Bt = Je(
9264
9264
  () => {
9265
- const e = Ve(), t = Ve(), n = oe(0), r = Ve(), o = oe(0), s = Ve(), a = Ve(), i = oe(0), l = oe(0), c = oe(0), d = oe(0), p = Ve(), h = Ve(), f = oe(!1), v = oe(!1), g = oe(!1);
9265
+ const e = Ve(), t = Ve(), n = oe(0), r = Ve(), o = oe(0), s = Ve(), a = Ve(), i = oe(0), l = oe(0), c = oe(0), d = oe(0), f = Ve(), h = Ve(), p = oe(!1), v = oe(!1), g = oe(!1);
9266
9266
  return we(
9267
9267
  te(
9268
9268
  e,
@@ -9286,9 +9286,9 @@ const Bt = Je(
9286
9286
  // input
9287
9287
  scrollContainerState: e,
9288
9288
  scrollHeight: a,
9289
- scrollingInProgress: f,
9289
+ scrollingInProgress: p,
9290
9290
  // signals
9291
- scrollTo: p,
9291
+ scrollTo: f,
9292
9292
  scrollTop: t,
9293
9293
  skipAnimationFrameInResizeObserver: g,
9294
9294
  smoothScrollTargetReached: r,
@@ -9503,8 +9503,8 @@ function wT(e, t) {
9503
9503
  if (i.some(kT(r)))
9504
9504
  continue;
9505
9505
  let l = !1, c = !1;
9506
- for (const { end: d, start: p, value: h } of i)
9507
- l ? (o >= p || s === h) && (e = ci(e, p)) : (c = h !== s, l = !0), d > o && o >= p && h !== s && (e = Jt(e, o + 1, h));
9506
+ for (const { end: d, start: f, value: h } of i)
9507
+ l ? (o >= f || s === h) && (e = ci(e, f)) : (c = h !== s, l = !0), d > o && o >= f && h !== s && (e = Jt(e, o + 1, h));
9508
9508
  c && (e = Jt(e, a, s));
9509
9509
  }
9510
9510
  return [e, n];
@@ -9546,20 +9546,20 @@ function TT(e, [t, n, r, o]) {
9546
9546
  const s = e.sizeTree;
9547
9547
  let a = s, i = 0;
9548
9548
  if (n.length > 0 && st(s) && t.length === 2) {
9549
- const h = t[0].size, f = t[1].size;
9550
- a = n.reduce((v, g) => Jt(Jt(v, g, h), g + 1, f), a);
9549
+ const h = t[0].size, p = t[1].size;
9550
+ a = n.reduce((v, g) => Jt(Jt(v, g, h), g + 1, p), a);
9551
9551
  } else
9552
9552
  [a, i] = wT(a, t);
9553
9553
  if (a === s)
9554
9554
  return e;
9555
- const { lastIndex: l, lastOffset: c, lastSize: d, offsetTree: p } = fi(e.offsetTree, i, a, o);
9555
+ const { lastIndex: l, lastOffset: c, lastSize: d, offsetTree: f } = fi(e.offsetTree, i, a, o);
9556
9556
  return {
9557
9557
  groupIndices: n,
9558
- groupOffsetTree: n.reduce((h, f) => Jt(h, f, ho(f, p, o)), Rr()),
9558
+ groupOffsetTree: n.reduce((h, p) => Jt(h, p, ho(p, f, o)), Rr()),
9559
9559
  lastIndex: l,
9560
9560
  lastOffset: c,
9561
9561
  lastSize: d,
9562
- offsetTree: p,
9562
+ offsetTree: f,
9563
9563
  sizeTree: a
9564
9564
  };
9565
9565
  }
@@ -9584,7 +9584,7 @@ function fi(e, t, n, r) {
9584
9584
  } else
9585
9585
  o = [];
9586
9586
  for (const { start: c, value: d } of ea(n, t, 1 / 0)) {
9587
- const p = c - s, h = p * a + i + p * r;
9587
+ const f = c - s, h = f * a + i + f * r;
9588
9588
  o.push({
9589
9589
  index: c,
9590
9590
  offset: h,
@@ -9610,8 +9610,8 @@ const RT = {
9610
9610
  offsetWidth: "width"
9611
9611
  }, Rn = Je(
9612
9612
  ([{ log: e }, { recalcInProgress: t }]) => {
9613
- const n = Ve(), r = Ve(), o = Dt(r, 0), s = Ve(), a = Ve(), i = oe(0), l = oe([]), c = oe(void 0), d = oe(void 0), p = oe((S, T) => Fn(S, RT[T])), h = oe(void 0), f = oe(0), v = vT(), g = Dt(
9614
- te(n, Fe(l, e, f), Tn(TT, v), lt()),
9613
+ const n = Ve(), r = Ve(), o = Dt(r, 0), s = Ve(), a = Ve(), i = oe(0), l = oe([]), c = oe(void 0), d = oe(void 0), f = oe((S, T) => Fn(S, RT[T])), h = oe(void 0), p = oe(0), v = vT(), g = Dt(
9614
+ te(n, Fe(l, e, p), Tn(TT, v), lt()),
9615
9615
  v
9616
9616
  ), x = Dt(
9617
9617
  te(
@@ -9629,7 +9629,7 @@ const RT = {
9629
9629
  te(
9630
9630
  l,
9631
9631
  ke((S) => S.length > 0),
9632
- Fe(g, f),
9632
+ Fe(g, p),
9633
9633
  de(([S, T, E]) => {
9634
9634
  const N = S.reduce((A, D, F) => Jt(A, D, ho(D, T.offsetTree, E) || F), Rr());
9635
9635
  return {
@@ -9774,7 +9774,7 @@ const RT = {
9774
9774
  const C = Qt(
9775
9775
  te(
9776
9776
  a,
9777
- Fe(g, f),
9777
+ Fe(g, p),
9778
9778
  de(([S, { offsetTree: T }, E]) => {
9779
9779
  const N = -S;
9780
9780
  return ho(N, T, E);
@@ -9784,7 +9784,7 @@ const RT = {
9784
9784
  return we(
9785
9785
  te(
9786
9786
  a,
9787
- Fe(g, f),
9787
+ Fe(g, p),
9788
9788
  de(([S, T, E]) => {
9789
9789
  if (T.groupIndices.length > 0) {
9790
9790
  if (st(T.sizeTree))
@@ -9826,9 +9826,9 @@ const RT = {
9826
9826
  defaultItemSize: d,
9827
9827
  firstItemIndex: i,
9828
9828
  fixedItemSize: c,
9829
- gap: f,
9829
+ gap: p,
9830
9830
  groupIndices: l,
9831
- itemSize: p,
9831
+ itemSize: f,
9832
9832
  listRefresh: w,
9833
9833
  shiftWith: a,
9834
9834
  shiftWithOffset: C,
@@ -9911,19 +9911,19 @@ const _o = Je(
9911
9911
  scrollingInProgress: l,
9912
9912
  scrollTo: c,
9913
9913
  smoothScrollTargetReached: d,
9914
- viewportHeight: p
9914
+ viewportHeight: f
9915
9915
  },
9916
9916
  { log: h }
9917
9917
  ]) => {
9918
- const f = Ve(), v = Ve(), g = oe(0);
9918
+ const p = Ve(), v = Ve(), g = oe(0);
9919
9919
  let x = null, b = null, w = null;
9920
9920
  function y() {
9921
9921
  x && (x(), x = null), w && (w(), w = null), b && (clearTimeout(b), b = null), _e(l, !1);
9922
9922
  }
9923
9923
  return we(
9924
9924
  te(
9925
- f,
9926
- Fe(n, p, r, g, i, a, h),
9925
+ p,
9926
+ Fe(n, f, r, g, i, a, h),
9927
9927
  Fe(e, s, o),
9928
9928
  de(
9929
9929
  ([
@@ -9936,7 +9936,7 @@ const _o = Je(
9936
9936
  let V = ho(H, S.offsetTree, U) + A;
9937
9937
  K === "end" ? (V += q + hn(S.sizeTree, H)[1] - T + I, H === k && (V += D)) : K === "center" ? V += (q + hn(S.sizeTree, H)[1] - T + I) / 2 : V -= N, _ && (V += _);
9938
9938
  const j = (M) => {
9939
- y(), M ? (F("retrying to scroll to", { location: C }, qt.DEBUG), _e(f, C)) : (_e(v, !0), F("list did not change, scroll successful", {}, qt.DEBUG));
9939
+ y(), M ? (F("retrying to scroll to", { location: C }, qt.DEBUG), _e(p, C)) : (_e(v, !0), F("list did not change, scroll successful", {}, qt.DEBUG));
9940
9940
  };
9941
9941
  if (y(), z === "smooth") {
9942
9942
  let M = !1;
@@ -9956,7 +9956,7 @@ const _o = Je(
9956
9956
  c
9957
9957
  ), {
9958
9958
  scrollTargetReached: v,
9959
- scrollToIndex: f,
9959
+ scrollToIndex: p,
9960
9960
  topListHeight: g
9961
9961
  };
9962
9962
  },
@@ -9989,7 +9989,7 @@ const Po = Je(
9989
9989
  te(
9990
9990
  a,
9991
9991
  Fe(l),
9992
- ke(([d, p]) => !!p),
9992
+ ke(([d, f]) => !!f),
9993
9993
  bn(!1)
9994
9994
  ),
9995
9995
  i
@@ -9997,7 +9997,7 @@ const Po = Je(
9997
9997
  te(
9998
9998
  a,
9999
9999
  Fe(l),
10000
- ke(([d, p]) => !!p),
10000
+ ke(([d, f]) => !!f),
10001
10001
  bn(!1)
10002
10002
  ),
10003
10003
  c
@@ -10005,7 +10005,7 @@ const Po = Je(
10005
10005
  te(
10006
10006
  St(t, a),
10007
10007
  Fe(i, n, e, c),
10008
- ke(([[, d], p, { sizeTree: h }, f, v]) => d && (!st(h) || ul(f)) && !p && !v),
10008
+ ke(([[, d], f, { sizeTree: h }, p, v]) => d && (!st(h) || ul(p)) && !f && !v),
10009
10009
  Fe(l)
10010
10010
  ),
10011
10011
  ([, d]) => {
@@ -10039,19 +10039,19 @@ const mo = "up", to = "down", jT = "none", _T = {
10039
10039
  viewportHeight: 0
10040
10040
  }
10041
10041
  }, PT = 0, Mo = Je(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
10042
- const a = oe(!1), i = oe(!0), l = Ve(), c = Ve(), d = oe(4), p = oe(PT), h = Dt(
10042
+ const a = oe(!1), i = oe(!0), l = Ve(), c = Ve(), d = oe(4), f = oe(PT), h = Dt(
10043
10043
  te(
10044
10044
  li(te(Ee(o), lr(1), bn(!0)), te(Ee(o), lr(1), bn(!1), Qc(100))),
10045
10045
  lt()
10046
10046
  ),
10047
10047
  !1
10048
- ), f = Dt(
10048
+ ), p = Dt(
10049
10049
  te(li(te(n, bn(!0)), te(n, bn(!1), Qc(200))), lt()),
10050
10050
  !1
10051
10051
  );
10052
10052
  we(
10053
10053
  te(
10054
- St(Ee(o), Ee(p)),
10054
+ St(Ee(o), Ee(f)),
10055
10055
  de(([w, y]) => w <= y),
10056
10056
  lt()
10057
10057
  ),
@@ -10132,7 +10132,7 @@ const mo = "up", to = "down", jT = "none", _T = {
10132
10132
  de(({ scrollTop: w }) => w),
10133
10133
  lt(),
10134
10134
  Tn(
10135
- (w, y) => vt(f) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? mo : to, prevScrollTop: y },
10135
+ (w, y) => vt(p) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? mo : to, prevScrollTop: y },
10136
10136
  { direction: to, prevScrollTop: 0 }
10137
10137
  ),
10138
10138
  de((w) => w.direction)
@@ -10162,7 +10162,7 @@ const mo = "up", to = "down", jT = "none", _T = {
10162
10162
  atBottomStateChange: l,
10163
10163
  atBottomThreshold: d,
10164
10164
  atTopStateChange: c,
10165
- atTopThreshold: p,
10165
+ atTopThreshold: f,
10166
10166
  isAtBottom: a,
10167
10167
  isAtTop: i,
10168
10168
  isScrolling: h,
@@ -10196,9 +10196,9 @@ const xl = Je(
10196
10196
  de(
10197
10197
  ([
10198
10198
  d,
10199
- p,
10199
+ f,
10200
10200
  h,
10201
- [f, v],
10201
+ [p, v],
10202
10202
  g,
10203
10203
  x,
10204
10204
  b,
@@ -10208,9 +10208,9 @@ const xl = Je(
10208
10208
  const C = d - w, S = x + b, T = Math.max(h - C, 0);
10209
10209
  let E = ru;
10210
10210
  const N = su(y, ys), A = su(y, Ss);
10211
- return f -= w, f += h + b, v += h + b, v -= w, f > d + S - N && (E = mo), v < d - T + p + A && (E = to), E !== ru ? [
10211
+ return p -= w, p += h + b, v += h + b, v -= w, p > d + S - N && (E = mo), v < d - T + f + A && (E = to), E !== ru ? [
10212
10212
  Math.max(C - h - ou(g, ys, E) - N, 0),
10213
- C - T - b + p + ou(g, Ss, E) + A
10213
+ C - T - b + f + ou(g, Ss, E) + A
10214
10214
  ] : null;
10215
10215
  }
10216
10216
  ),
@@ -10261,14 +10261,14 @@ function is(e, t, n, r, o, s) {
10261
10261
  const g = e[e.length - 1];
10262
10262
  d = g.offset + g.size;
10263
10263
  }
10264
- const p = n - a, h = i + p * l + (p - 1) * r, f = c, v = h - d;
10264
+ const f = n - a, h = i + f * l + (f - 1) * r, p = c, v = h - d;
10265
10265
  return {
10266
10266
  bottom: d,
10267
10267
  firstItemIndex: s,
10268
10268
  items: au(e, o, s),
10269
10269
  offsetBottom: v,
10270
10270
  offsetTop: c,
10271
- top: f,
10271
+ top: p,
10272
10272
  topItems: au(t, o, s),
10273
10273
  topListHeight: t.reduce((g, x) => x.size + g, 0),
10274
10274
  totalCount: n
@@ -10282,9 +10282,9 @@ function Np(e, t, n, r, o, s) {
10282
10282
  break;
10283
10283
  a++;
10284
10284
  }
10285
- const i = e + a, l = gl(t, i), c = Array.from({ length: i }).map((d, p) => ({
10286
- data: s[p + l],
10287
- index: p + l,
10285
+ const i = e + a, l = gl(t, i), c = Array.from({ length: i }).map((d, f) => ({
10286
+ data: s[f + l],
10287
+ index: f + l,
10288
10288
  offset: 0,
10289
10289
  size: 0
10290
10290
  }));
@@ -10322,9 +10322,9 @@ const gr = Je(
10322
10322
  s,
10323
10323
  { listBoundary: a, topListHeight: i, visibleRange: l },
10324
10324
  { initialTopMostItemIndex: c, scrolledToInitialItem: d },
10325
- { topListHeight: p },
10325
+ { topListHeight: f },
10326
10326
  h,
10327
- { didMount: f },
10327
+ { didMount: p },
10328
10328
  { recalcInProgress: v }
10329
10329
  ]) => {
10330
10330
  const g = oe([]), x = oe(0), b = Ve();
@@ -10332,7 +10332,7 @@ const gr = Je(
10332
10332
  const w = Dt(
10333
10333
  te(
10334
10334
  St(
10335
- f,
10335
+ p,
10336
10336
  v,
10337
10337
  Ee(l, po),
10338
10338
  Ee(o),
@@ -10428,8 +10428,8 @@ const gr = Je(
10428
10428
  w,
10429
10429
  de((T) => T.topListHeight)
10430
10430
  ),
10431
- p
10432
- ), we(p, i), we(
10431
+ f
10432
+ ), we(f, i), we(
10433
10433
  te(
10434
10434
  w,
10435
10435
  de((T) => [T.top, T.bottom])
@@ -10496,7 +10496,7 @@ const gr = Je(
10496
10496
  const s = Ve(), a = Dt(
10497
10497
  te(
10498
10498
  St(n, e, r, t, o),
10499
- de(([i, l, c, d, p]) => i + l + c + d + p.offsetBottom + p.bottom)
10499
+ de(([i, l, c, d, f]) => i + l + c + d + f.offsetBottom + f.bottom)
10500
10500
  ),
10501
10501
  0
10502
10502
  );
@@ -10540,8 +10540,8 @@ const gr = Je(
10540
10540
  d,
10541
10541
  Fe(t, l, n, s, o, r, i),
10542
10542
  Fe(e),
10543
- de(([[p, h, f, v, g, x, b, w], y]) => {
10544
- const { align: C, behavior: S, calculateViewLocation: T = DT, done: E, ...N } = p, A = Ep(p, h, v - 1), D = ho(A, h.offsetTree, y) + g + x, F = D + hn(h.sizeTree, A)[1], U = w + x, q = w + f - b, I = T({
10543
+ de(([[f, h, p, v, g, x, b, w], y]) => {
10544
+ const { align: C, behavior: S, calculateViewLocation: T = DT, done: E, ...N } = f, A = Ep(f, h, v - 1), D = ho(A, h.offsetTree, y) + g + x, F = D + hn(h.sizeTree, A)[1], U = w + x, q = w + p - b, I = T({
10545
10545
  itemBottom: F,
10546
10546
  itemTop: D,
10547
10547
  locationParams: { align: C, behavior: S, ...N },
@@ -10559,7 +10559,7 @@ const gr = Je(
10559
10559
  E
10560
10560
  ) : E && E(), I;
10561
10561
  }),
10562
- ke((p) => p !== null)
10562
+ ke((f) => f !== null)
10563
10563
  ),
10564
10564
  c
10565
10565
  ), {
@@ -10580,9 +10580,9 @@ const LT = (e, t) => typeof e == "function" ? iu(e(t)) : t && iu(e), $T = Je(
10580
10580
  { scrolledToInitialItem: i },
10581
10581
  { didMount: l, propsReady: c },
10582
10582
  { log: d },
10583
- { scrollingInProgress: p },
10583
+ { scrollingInProgress: f },
10584
10584
  { context: h },
10585
- { scrollIntoView: f }
10585
+ { scrollIntoView: p }
10586
10586
  ]) => {
10587
10587
  const v = oe(!1), g = Ve();
10588
10588
  let x = null;
@@ -10596,7 +10596,7 @@ const LT = (e, t) => typeof e == "function" ? iu(e(t)) : t && iu(e), $T = Je(
10596
10596
  et(
10597
10597
  te(
10598
10598
  St(te(Ee(t), lr(1)), l),
10599
- Fe(Ee(v), s, i, p),
10599
+ Fe(Ee(v), s, i, f),
10600
10600
  de(([[S, T], E, N, A, D]) => {
10601
10601
  let F = T && A, U = "auto";
10602
10602
  return F && (U = LT(E, N || D), F = F && !!U), { followOutputBehavior: U, shouldFollow: F, totalCount: S };
@@ -10652,16 +10652,16 @@ const LT = (e, t) => typeof e == "function" ? iu(e(t)) : t && iu(e), $T = Je(
10652
10652
  ), et(
10653
10653
  te(
10654
10654
  St(te(C, lr(1)), l),
10655
- Fe(Ee(y), i, p, h),
10655
+ Fe(Ee(y), i, f, h),
10656
10656
  de(([[S, T], E, N, A, D]) => T && N && (E == null ? void 0 : E({ context: D, totalCount: S, scrollingInProgress: A }))),
10657
10657
  ke((S) => !!S),
10658
10658
  Nn(0)
10659
10659
  ),
10660
10660
  (S) => {
10661
10661
  x && (x(), x = null), vt(n) ? requestAnimationFrame(() => {
10662
- vt(d)("scrolling into view", {}), _e(f, S);
10662
+ vt(d)("scrolling into view", {}), _e(p, S);
10663
10663
  }) : x = dn(e, () => {
10664
- vt(d)("scrolling into view", {}), _e(f, S), x = null;
10664
+ vt(d)("scrolling into view", {}), _e(p, S), x = null;
10665
10665
  });
10666
10666
  }
10667
10667
  ), { autoscrollToBottom: g, followOutput: v, scrollIntoViewOnChange: y };
@@ -10684,7 +10684,7 @@ const LT = (e, t) => typeof e == "function" ? iu(e(t)) : t && iu(e), $T = Je(
10684
10684
  Fe(s),
10685
10685
  ke(([, l]) => l !== 0),
10686
10686
  Fe(o, r, t, n, e),
10687
- de(([[, l], c, d, p, h, f = []]) => Np(l, c, d, p, h, f))
10687
+ de(([[, l], c, d, f, h, p = []]) => Np(l, c, d, f, h, p))
10688
10688
  ),
10689
10689
  a
10690
10690
  ), {}),
@@ -10789,23 +10789,23 @@ const LT = (e, t) => typeof e == "function" ? iu(e(t)) : t && iu(e), $T = Je(
10789
10789
  { didMount: s },
10790
10790
  { useWindowScroll: a, windowScrollContainerState: i, windowViewportRect: l }
10791
10791
  ]) => {
10792
- const c = Ve(), d = oe(void 0), p = oe(null), h = oe(null);
10793
- return we(i, p), we(l, h), et(
10792
+ const c = Ve(), d = oe(void 0), f = oe(null), h = oe(null);
10793
+ return we(i, f), we(l, h), et(
10794
10794
  te(
10795
10795
  c,
10796
- Fe(t, r, a, p, h, n)
10796
+ Fe(t, r, a, f, h, n)
10797
10797
  ),
10798
- ([f, v, g, x, b, w, y]) => {
10798
+ ([p, v, g, x, b, w, y]) => {
10799
10799
  const C = CT(v.sizeTree);
10800
- x && b !== null && w !== null && (g = b.scrollTop - w.offsetTop), g -= y, f({ ranges: C, scrollTop: g });
10800
+ x && b !== null && w !== null && (g = b.scrollTop - w.offsetTop), g -= y, p({ ranges: C, scrollTop: g });
10801
10801
  }
10802
10802
  ), we(te(d, ke(ul), de(HT)), o), we(
10803
10803
  te(
10804
10804
  s,
10805
10805
  Fe(d),
10806
- ke(([, f]) => f !== void 0),
10806
+ ke(([, p]) => p !== void 0),
10807
10807
  lt(),
10808
- de(([, f]) => f.ranges)
10808
+ de(([, p]) => p.ranges)
10809
10809
  ),
10810
10810
  e
10811
10811
  ), {
@@ -10838,8 +10838,8 @@ const WT = Mp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10838
10838
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
10839
10839
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: a, scrollDirection: i },
10840
10840
  { listState: l },
10841
- { beforeUnshiftWith: c, gap: d, shiftWithOffset: p, sizes: h },
10842
- { log: f },
10841
+ { beforeUnshiftWith: c, gap: d, shiftWithOffset: f, sizes: h },
10842
+ { log: p },
10843
10843
  { recalcInProgress: v }
10844
10844
  ]) => {
10845
10845
  const g = Qt(
@@ -10855,7 +10855,7 @@ const WT = Mp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10855
10855
  [0, [], 0, 0]
10856
10856
  ),
10857
10857
  ke(([b]) => b !== 0),
10858
- Fe(r, i, n, o, f, v),
10858
+ Fe(r, i, n, o, p, v),
10859
10859
  ke(([, b, w, y, , , C]) => !C && !y && b !== 0 && w === mo),
10860
10860
  de(([[b], , , , , w]) => (w("Upward scrolling compensation", { amount: b }, qt.DEBUG), b))
10861
10861
  )
@@ -10875,7 +10875,7 @@ const WT = Mp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10875
10875
  x
10876
10876
  ), we(
10877
10877
  te(
10878
- p,
10878
+ f,
10879
10879
  de((b) => ({ top: -b }))
10880
10880
  ),
10881
10881
  t
@@ -10965,9 +10965,9 @@ const WT = Mp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10965
10965
  sizes: l,
10966
10966
  statefulTotalCount: c,
10967
10967
  totalCount: d,
10968
- trackItemSizes: p
10968
+ trackItemSizes: f
10969
10969
  },
10970
- { initialItemFinalLocationReached: h, initialTopMostItemIndex: f, scrolledToInitialItem: v },
10970
+ { initialItemFinalLocationReached: h, initialTopMostItemIndex: p, scrolledToInitialItem: v },
10971
10971
  g,
10972
10972
  x,
10973
10973
  b,
@@ -10991,7 +10991,7 @@ const WT = Mp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10991
10991
  gap: o,
10992
10992
  groupCounts: N,
10993
10993
  initialItemFinalLocationReached: h,
10994
- initialTopMostItemIndex: f,
10994
+ initialTopMostItemIndex: p,
10995
10995
  scrolledToInitialItem: v,
10996
10996
  sizeRanges: i,
10997
10997
  topItemCount: E,
@@ -11005,7 +11005,7 @@ const WT = Mp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
11005
11005
  scrollToIndex: S,
11006
11006
  // output
11007
11007
  statefulTotalCount: c,
11008
- trackItemSizes: p,
11008
+ trackItemSizes: f,
11009
11009
  // exported from stateFlagsSystem
11010
11010
  ...C,
11011
11011
  // the bag of IO from featureGroup1System
@@ -11063,7 +11063,7 @@ function Dp(e, t, n) {
11063
11063
  function d(x) {
11064
11064
  return a.reduce((b, w) => (b[w] = cT(x[t.events[w]]), b), {});
11065
11065
  }
11066
- const p = O.forwardRef((x, b) => {
11066
+ const f = O.forwardRef((x, b) => {
11067
11067
  const { children: w, ...y } = x, [C] = O.useState(() => Qs(dT(e), (E) => {
11068
11068
  l(E, y);
11069
11069
  })), [S] = O.useState(Zc(d, C));
@@ -11086,7 +11086,7 @@ function Dp(e, t, n) {
11086
11086
  },
11087
11087
  [b, x]
11088
11088
  );
11089
- }, f = (x) => {
11089
+ }, p = (x) => {
11090
11090
  const b = O.useContext(i)[x], w = O.useCallback(
11091
11091
  (y) => et(b, y),
11092
11092
  [b]
@@ -11104,9 +11104,9 @@ function Dp(e, t, n) {
11104
11104
  }),
11105
11105
  [b, w]
11106
11106
  ), w;
11107
- }, g = O.version.startsWith("18") ? f : v;
11107
+ }, g = O.version.startsWith("18") ? p : v;
11108
11108
  return {
11109
- Component: p,
11109
+ Component: f,
11110
11110
  useEmitter: (x, b) => {
11111
11111
  const w = O.useContext(i)[x];
11112
11112
  Ko(() => et(w, b), [b, w]);
@@ -11125,21 +11125,21 @@ function GT(e) {
11125
11125
  function Bp(e, t, n, r = Wr, o, s) {
11126
11126
  const a = O.useRef(null), i = O.useRef(null), l = O.useRef(null), c = O.useCallback(
11127
11127
  (h) => {
11128
- let f, v, g;
11128
+ let p, v, g;
11129
11129
  const x = h.target;
11130
11130
  if (GT(x) || La(x)) {
11131
11131
  const w = La(x) ? x : x.defaultView;
11132
- g = s ? w.scrollX : w.scrollY, f = s ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight, v = s ? w.innerWidth : w.innerHeight;
11132
+ g = s ? w.scrollX : w.scrollY, p = s ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight, v = s ? w.innerWidth : w.innerHeight;
11133
11133
  } else
11134
- g = s ? x.scrollLeft : x.scrollTop, f = s ? x.scrollWidth : x.scrollHeight, v = s ? x.offsetWidth : x.offsetHeight;
11134
+ g = s ? x.scrollLeft : x.scrollTop, p = s ? x.scrollWidth : x.scrollHeight, v = s ? x.offsetWidth : x.offsetHeight;
11135
11135
  const b = () => {
11136
11136
  e({
11137
- scrollHeight: f,
11137
+ scrollHeight: p,
11138
11138
  scrollTop: Math.max(g, 0),
11139
11139
  viewportHeight: v
11140
11140
  });
11141
11141
  };
11142
- h.suppressFlushSync ? b() : ji.flushSync(b), i.current !== null && (g === i.current || g <= 0 || g === f - v) && (i.current = null, t(!0), l.current && (clearTimeout(l.current), l.current = null));
11142
+ h.suppressFlushSync ? b() : ji.flushSync(b), i.current !== null && (g === i.current || g <= 0 || g === p - v) && (i.current = null, t(!0), l.current && (clearTimeout(l.current), l.current = null));
11143
11143
  },
11144
11144
  [e, t, s]
11145
11145
  );
@@ -11150,15 +11150,15 @@ function Bp(e, t, n, r = Wr, o, s) {
11150
11150
  };
11151
11151
  }, [a, c, n, r, o]);
11152
11152
  function d(h) {
11153
- const f = a.current;
11154
- if (!f || (s ? "offsetWidth" in f && f.offsetWidth === 0 : "offsetHeight" in f && f.offsetHeight === 0))
11153
+ const p = a.current;
11154
+ if (!p || (s ? "offsetWidth" in p && p.offsetWidth === 0 : "offsetHeight" in p && p.offsetHeight === 0))
11155
11155
  return;
11156
11156
  const v = h.behavior === "smooth";
11157
11157
  let g, x, b;
11158
- La(f) ? (x = Math.max(
11159
- Fn(f.document.documentElement, s ? "width" : "height"),
11160
- s ? f.document.documentElement.scrollWidth : f.document.documentElement.scrollHeight
11161
- ), g = s ? f.innerWidth : f.innerHeight, b = s ? window.scrollX : window.scrollY) : (x = f[s ? "scrollWidth" : "scrollHeight"], g = Fn(f, s ? "width" : "height"), b = f[s ? "scrollLeft" : "scrollTop"]);
11158
+ La(p) ? (x = Math.max(
11159
+ Fn(p.document.documentElement, s ? "width" : "height"),
11160
+ s ? p.document.documentElement.scrollWidth : p.document.documentElement.scrollHeight
11161
+ ), g = s ? p.innerWidth : p.innerHeight, b = s ? window.scrollX : window.scrollY) : (x = p[s ? "scrollWidth" : "scrollHeight"], g = Fn(p, s ? "width" : "height"), b = p[s ? "scrollLeft" : "scrollTop"]);
11162
11162
  const w = x - g;
11163
11163
  if (h.top = Math.ceil(Math.max(Math.min(w, h.top), 0)), Ip(g, x) || h.top === b) {
11164
11164
  e({ scrollHeight: x, scrollTop: b, viewportHeight: g }), v && t(!0);
@@ -11166,12 +11166,12 @@ function Bp(e, t, n, r = Wr, o, s) {
11166
11166
  }
11167
11167
  v ? (i.current = h.top, l.current && clearTimeout(l.current), l.current = setTimeout(() => {
11168
11168
  l.current = null, i.current = null, t(!0);
11169
- }, 1e3)) : i.current = null, s && (h = { behavior: h.behavior, left: h.top }), f.scrollTo(h);
11169
+ }, 1e3)) : i.current = null, s && (h = { behavior: h.behavior, left: h.top }), p.scrollTo(h);
11170
11170
  }
11171
- function p(h) {
11171
+ function f(h) {
11172
11172
  s && (h = { behavior: h.behavior, left: h.top }), a.current.scrollBy(h);
11173
11173
  }
11174
- return { scrollByCallback: p, scrollerRef: a, scrollToCallback: d };
11174
+ return { scrollByCallback: f, scrollerRef: a, scrollToCallback: d };
11175
11175
  }
11176
11176
  const $a = "-webkit-sticky", lu = "sticky", wl = Mp(() => {
11177
11177
  if (typeof document > "u")
@@ -11212,12 +11212,12 @@ const YT = /* @__PURE__ */ Je(() => {
11212
11212
  ([e, t]) => ({ ...e, ...t }),
11213
11213
  ct(Op, YT)
11214
11214
  ), JT = ({ height: e }) => /* @__PURE__ */ u.jsx("div", { style: { height: e } }), ZT = { overflowAnchor: "none", position: wl(), zIndex: 1 }, zp = { overflowAnchor: "none" }, QT = { ...zp, display: "inline-block", height: "100%" }, cu = /* @__PURE__ */ O.memo(function({ showTopList: e = !1 }) {
11215
- const t = Ie("listState"), n = rn("sizeRanges"), r = Ie("useWindowScroll"), o = Ie("customScrollParent"), s = rn("windowScrollContainerState"), a = rn("scrollContainerState"), i = o || r ? s : a, l = Ie("itemContent"), c = Ie("context"), d = Ie("groupContent"), p = Ie("trackItemSizes"), h = Ie("itemSize"), f = Ie("log"), v = rn("gap"), g = Ie("horizontalDirection"), { callbackRef: x } = hT(
11215
+ const t = Ie("listState"), n = rn("sizeRanges"), r = Ie("useWindowScroll"), o = Ie("customScrollParent"), s = rn("windowScrollContainerState"), a = rn("scrollContainerState"), i = o || r ? s : a, l = Ie("itemContent"), c = Ie("context"), d = Ie("groupContent"), f = Ie("trackItemSizes"), h = Ie("itemSize"), p = Ie("log"), v = rn("gap"), g = Ie("horizontalDirection"), { callbackRef: x } = hT(
11216
11216
  n,
11217
11217
  h,
11218
- p,
11219
- e ? Wr : i,
11220
11218
  f,
11219
+ e ? Wr : i,
11220
+ p,
11221
11221
  v,
11222
11222
  o,
11223
11223
  g,
@@ -11345,21 +11345,21 @@ const oC = /* @__PURE__ */ O.memo(function() {
11345
11345
  });
11346
11346
  function Hp({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11347
11347
  return O.memo(function({ children: r, style: o, context: s, ...a }) {
11348
- const i = n("scrollContainerState"), l = t("ScrollerComponent"), c = n("smoothScrollTargetReached"), d = t("scrollerRef"), p = t("horizontalDirection") || !1, { scrollByCallback: h, scrollerRef: f, scrollToCallback: v } = Bp(
11348
+ const i = n("scrollContainerState"), l = t("ScrollerComponent"), c = n("smoothScrollTargetReached"), d = t("scrollerRef"), f = t("horizontalDirection") || !1, { scrollByCallback: h, scrollerRef: p, scrollToCallback: v } = Bp(
11349
11349
  i,
11350
11350
  c,
11351
11351
  l,
11352
11352
  d,
11353
11353
  void 0,
11354
- p
11354
+ f
11355
11355
  );
11356
11356
  return e("scrollTo", v), e("scrollBy", h), /* @__PURE__ */ u.jsx(
11357
11357
  l,
11358
11358
  {
11359
11359
  "data-testid": "virtuoso-scroller",
11360
11360
  "data-virtuoso-scroller": !0,
11361
- ref: f,
11362
- style: { ...p ? tC : eC, ...o },
11361
+ ref: p,
11362
+ style: { ...f ? tC : eC, ...o },
11363
11363
  tabIndex: 0,
11364
11364
  ...a,
11365
11365
  ...Ot(l, s),
@@ -11370,7 +11370,7 @@ function Hp({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11370
11370
  }
11371
11371
  function Up({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11372
11372
  return O.memo(function({ children: r, style: o, context: s, ...a }) {
11373
- const i = n("windowScrollContainerState"), l = t("ScrollerComponent"), c = n("smoothScrollTargetReached"), d = t("totalListHeight"), p = t("deviation"), h = t("customScrollParent"), f = O.useRef(null), v = t("scrollerRef"), { scrollByCallback: g, scrollerRef: x, scrollToCallback: b } = Bp(
11373
+ const i = n("windowScrollContainerState"), l = t("ScrollerComponent"), c = n("smoothScrollTargetReached"), d = t("totalListHeight"), f = t("deviation"), h = t("customScrollParent"), p = O.useRef(null), v = t("scrollerRef"), { scrollByCallback: g, scrollerRef: x, scrollToCallback: b } = Bp(
11374
11374
  i,
11375
11375
  c,
11376
11376
  l,
@@ -11379,15 +11379,15 @@ function Up({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11379
11379
  );
11380
11380
  return Fp(() => {
11381
11381
  var w;
11382
- return x.current = h || ((w = f.current) == null ? void 0 : w.ownerDocument.defaultView), () => {
11382
+ return x.current = h || ((w = p.current) == null ? void 0 : w.ownerDocument.defaultView), () => {
11383
11383
  x.current = null;
11384
11384
  };
11385
11385
  }, [x, h]), e("windowScrollTo", b), e("scrollBy", g), /* @__PURE__ */ u.jsx(
11386
11386
  l,
11387
11387
  {
11388
- ref: f,
11388
+ ref: p,
11389
11389
  "data-virtuoso-scroller": !0,
11390
- style: { position: "relative", ...o, ...d !== 0 ? { height: d + p } : {} },
11390
+ style: { position: "relative", ...o, ...d !== 0 ? { height: d + f } : {} },
11391
11391
  ...a,
11392
11392
  ...Ot(l, s),
11393
11393
  children: r
@@ -11499,7 +11499,7 @@ const aC = ({ children: e }) => {
11499
11499
  ] })), r = oe(null), o = oe(null), s = oe({}), a = oe(bl), i = oe(Wr), l = (c, d = null) => Dt(
11500
11500
  te(
11501
11501
  s,
11502
- de((p) => p[c]),
11502
+ de((f) => f[c]),
11503
11503
  lt()
11504
11504
  ),
11505
11505
  d
@@ -11562,9 +11562,9 @@ function xC(e, t) {
11562
11562
  const vC = /* @__PURE__ */ Je(
11563
11563
  ([
11564
11564
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
11565
- { footerHeight: o, headerHeight: s, scrollBy: a, scrollContainerState: i, scrollTo: l, scrollTop: c, smoothScrollTargetReached: d, viewportHeight: p },
11565
+ { footerHeight: o, headerHeight: s, scrollBy: a, scrollContainerState: i, scrollTo: l, scrollTop: c, smoothScrollTargetReached: d, viewportHeight: f },
11566
11566
  h,
11567
- f,
11567
+ p,
11568
11568
  { didMount: v, propsReady: g },
11569
11569
  { customScrollParent: x, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: C },
11570
11570
  S
@@ -11614,7 +11614,7 @@ const vC = /* @__PURE__ */ Je(
11614
11614
  A,
11615
11615
  de(({ height: $ }) => $)
11616
11616
  ),
11617
- p
11617
+ f
11618
11618
  ), we(
11619
11619
  te(
11620
11620
  St(
@@ -11735,7 +11735,7 @@ const vC = /* @__PURE__ */ Je(
11735
11735
  Nn(0)
11736
11736
  )
11737
11737
  );
11738
- we(Q, f.scrollSeekRangeChanged), we(
11738
+ we(Q, p.scrollSeekRangeChanged), we(
11739
11739
  te(
11740
11740
  F,
11741
11741
  Fe(A, D, T, G),
@@ -11788,7 +11788,7 @@ const vC = /* @__PURE__ */ Je(
11788
11788
  windowScrollContainerState: w,
11789
11789
  windowScrollTo: y,
11790
11790
  windowViewportRect: C,
11791
- ...f,
11791
+ ...p,
11792
11792
  // output
11793
11793
  gridState: N,
11794
11794
  horizontalDirection: j,
@@ -11821,10 +11821,10 @@ function pi(e, t, n, r) {
11821
11821
  return a > 0 ? a + t.row : a;
11822
11822
  }
11823
11823
  const wC = /* @__PURE__ */ Je(() => {
11824
- const e = oe((p) => `Item ${p}`), t = oe({}), n = oe(null), r = oe("virtuoso-grid-item"), o = oe("virtuoso-grid-list"), s = oe(bl), a = oe("div"), i = oe(Wr), l = (p, h = null) => Dt(
11824
+ const e = oe((f) => `Item ${f}`), t = oe({}), n = oe(null), r = oe("virtuoso-grid-item"), o = oe("virtuoso-grid-list"), s = oe(bl), a = oe("div"), i = oe(Wr), l = (f, h = null) => Dt(
11825
11825
  te(
11826
11826
  t,
11827
- de((f) => f[p]),
11827
+ de((p) => p[f]),
11828
11828
  lt()
11829
11829
  ),
11830
11830
  h
@@ -11851,7 +11851,7 @@ const wC = /* @__PURE__ */ Je(() => {
11851
11851
  ([e, t]) => ({ ...e, ...t }),
11852
11852
  ct(vC, wC)
11853
11853
  ), yC = /* @__PURE__ */ O.memo(function() {
11854
- const e = pt("gridState"), t = pt("listClassName"), n = pt("itemClassName"), r = pt("itemContent"), o = pt("computeItemKey"), s = pt("isSeeking"), a = on("scrollHeight"), i = pt("ItemComponent"), l = pt("ListComponent"), c = pt("ScrollSeekPlaceholder"), d = pt("context"), p = on("itemDimensions"), h = on("gap"), f = pt("log"), v = pt("stateRestoreInProgress"), g = on("reportReadyState"), x = mr(
11854
+ const e = pt("gridState"), t = pt("listClassName"), n = pt("itemClassName"), r = pt("itemContent"), o = pt("computeItemKey"), s = pt("isSeeking"), a = on("scrollHeight"), i = pt("ItemComponent"), l = pt("ListComponent"), c = pt("ScrollSeekPlaceholder"), d = pt("context"), f = on("itemDimensions"), h = on("gap"), p = pt("log"), v = pt("stateRestoreInProgress"), g = on("reportReadyState"), x = mr(
11855
11855
  O.useMemo(
11856
11856
  () => (b) => {
11857
11857
  const w = b.parentElement.parentElement.scrollHeight;
@@ -11859,14 +11859,14 @@ const wC = /* @__PURE__ */ Je(() => {
11859
11859
  const y = b.firstChild;
11860
11860
  if (y) {
11861
11861
  const { height: C, width: S } = y.getBoundingClientRect();
11862
- p({ height: C, width: S });
11862
+ f({ height: C, width: S });
11863
11863
  }
11864
11864
  h({
11865
- column: mu("column-gap", getComputedStyle(b).columnGap, f),
11866
- row: mu("row-gap", getComputedStyle(b).rowGap, f)
11865
+ column: mu("column-gap", getComputedStyle(b).columnGap, p),
11866
+ row: mu("row-gap", getComputedStyle(b).rowGap, p)
11867
11867
  });
11868
11868
  },
11869
- [a, p, h, f]
11869
+ [a, f, h, p]
11870
11870
  ),
11871
11871
  !0,
11872
11872
  !1
@@ -12029,7 +12029,7 @@ var ra = "Dialog", [Kp, AN] = gn(ra), [NC, xn] = Kp(ra), qp = (e) => {
12029
12029
  descriptionId: Lt(),
12030
12030
  open: c,
12031
12031
  onOpenChange: d,
12032
- onOpenToggle: m.useCallback(() => d((p) => !p), [d]),
12032
+ onOpenToggle: m.useCallback(() => d((f) => !f), [d]),
12033
12033
  modal: a,
12034
12034
  children: n
12035
12035
  }
@@ -12409,7 +12409,7 @@ function Al() {
12409
12409
  };
12410
12410
  }
12411
12411
  function KC({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
12412
- const [s, a] = fe(!1), [i, l] = fe(null), [c, d] = fe(null), { toast: p } = Al(), h = O.useCallback(async () => {
12412
+ const [s, a] = fe(!1), [i, l] = fe(null), [c, d] = fe(null), { toast: f } = Al(), h = O.useCallback(async () => {
12413
12413
  if (n) {
12414
12414
  a(!0), d(null), l(null);
12415
12415
  try {
@@ -12425,12 +12425,12 @@ function KC({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
12425
12425
  Qe(() => {
12426
12426
  e && n && h();
12427
12427
  }, [e, n, h]);
12428
- const f = async () => {
12428
+ const p = async () => {
12429
12429
  if (n)
12430
12430
  try {
12431
- await tw(n), p({ title: "Download started", description: `Downloading ${r}` });
12431
+ await tw(n), f({ title: "Download started", description: `Downloading ${r}` });
12432
12432
  } catch (b) {
12433
- console.error("Failed to download file:", b), p({ title: "Download failed", description: String(b), variant: "destructive" });
12433
+ console.error("Failed to download file:", b), f({ title: "Download failed", description: String(b), variant: "destructive" });
12434
12434
  }
12435
12435
  }, v = async () => {
12436
12436
  if (n)
@@ -12438,7 +12438,7 @@ function KC({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
12438
12438
  const b = await vc(n), w = new Blob([b], { type: o }), y = URL.createObjectURL(w);
12439
12439
  window.open(y, "_blank"), URL.revokeObjectURL(y);
12440
12440
  } catch (b) {
12441
- console.error("Failed to open file externally:", b), p({ title: "Failed to open file", description: String(b), variant: "destructive" });
12441
+ console.error("Failed to open file externally:", b), f({ title: "Failed to open file", description: String(b), variant: "destructive" });
12442
12442
  }
12443
12443
  }, g = () => s ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-center py-12", children: [
12444
12444
  /* @__PURE__ */ u.jsx(ds, { className: "h-8 w-8 animate-spin mr-3" }),
@@ -12503,7 +12503,7 @@ function KC({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
12503
12503
  {
12504
12504
  variant: "outline",
12505
12505
  size: "sm",
12506
- onClick: f,
12506
+ onClick: p,
12507
12507
  className: "flex items-center gap-2",
12508
12508
  children: [
12509
12509
  /* @__PURE__ */ u.jsx(Jg, { className: "h-4 w-4" }),
@@ -12772,7 +12772,7 @@ class jl {
12772
12772
  list(t) {
12773
12773
  let n = this.rules.block.list.exec(t);
12774
12774
  if (n) {
12775
- let r, o, s, a, i, l, c, d, p, h, f, v, g = n[1].trim();
12775
+ let r, o, s, a, i, l, c, d, f, h, p, v, g = n[1].trim();
12776
12776
  const x = g.length > 1, b = {
12777
12777
  type: "list",
12778
12778
  raw: "",
@@ -12785,35 +12785,35 @@ class jl {
12785
12785
  const w = new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);
12786
12786
  for (; t && (v = !1, !(!(n = w.exec(t)) || this.rules.block.hr.test(t))); ) {
12787
12787
  if (r = n[0], t = t.substring(r.length), d = n[2].split(`
12788
- `, 1)[0].replace(/^\t+/, (C) => " ".repeat(3 * C.length)), p = t.split(`
12789
- `, 1)[0], this.options.pedantic ? (a = 2, f = d.trimLeft()) : (a = n[2].search(/[^ ]/), a = a > 4 ? 1 : a, f = d.slice(a), a += n[1].length), l = !1, !d && /^ *$/.test(p) && (r += p + `
12790
- `, t = t.substring(p.length + 1), v = !0), !v) {
12788
+ `, 1)[0].replace(/^\t+/, (C) => " ".repeat(3 * C.length)), f = t.split(`
12789
+ `, 1)[0], this.options.pedantic ? (a = 2, p = d.trimLeft()) : (a = n[2].search(/[^ ]/), a = a > 4 ? 1 : a, p = d.slice(a), a += n[1].length), l = !1, !d && /^ *$/.test(f) && (r += f + `
12790
+ `, t = t.substring(f.length + 1), v = !0), !v) {
12791
12791
  const C = new RegExp(`^ {0,${Math.min(3, a - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), S = new RegExp(`^ {0,${Math.min(3, a - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), T = new RegExp(`^ {0,${Math.min(3, a - 1)}}(?:\`\`\`|~~~)`), E = new RegExp(`^ {0,${Math.min(3, a - 1)}}#`);
12792
12792
  for (; t && (h = t.split(`
12793
- `, 1)[0], p = h, this.options.pedantic && (p = p.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(T.test(p) || E.test(p) || C.test(p) || S.test(t))); ) {
12794
- if (p.search(/[^ ]/) >= a || !p.trim())
12795
- f += `
12796
- ` + p.slice(a);
12793
+ `, 1)[0], f = h, this.options.pedantic && (f = f.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(T.test(f) || E.test(f) || C.test(f) || S.test(t))); ) {
12794
+ if (f.search(/[^ ]/) >= a || !f.trim())
12795
+ p += `
12796
+ ` + f.slice(a);
12797
12797
  else {
12798
12798
  if (l || d.search(/[^ ]/) >= 4 || T.test(d) || E.test(d) || S.test(d))
12799
12799
  break;
12800
- f += `
12801
- ` + p;
12800
+ p += `
12801
+ ` + f;
12802
12802
  }
12803
- !l && !p.trim() && (l = !0), r += h + `
12804
- `, t = t.substring(h.length + 1), d = p.slice(a);
12803
+ !l && !f.trim() && (l = !0), r += h + `
12804
+ `, t = t.substring(h.length + 1), d = f.slice(a);
12805
12805
  }
12806
12806
  }
12807
- b.loose || (c ? b.loose = !0 : /\n *\n *$/.test(r) && (c = !0)), this.options.gfm && (o = /^\[[ xX]\] /.exec(f), o && (s = o[0] !== "[ ] ", f = f.replace(/^\[[ xX]\] +/, ""))), b.items.push({
12807
+ b.loose || (c ? b.loose = !0 : /\n *\n *$/.test(r) && (c = !0)), this.options.gfm && (o = /^\[[ xX]\] /.exec(p), o && (s = o[0] !== "[ ] ", p = p.replace(/^\[[ xX]\] +/, ""))), b.items.push({
12808
12808
  type: "list_item",
12809
12809
  raw: r,
12810
12810
  task: !!o,
12811
12811
  checked: s,
12812
12812
  loose: !1,
12813
- text: f
12813
+ text: p
12814
12814
  }), b.raw += r;
12815
12815
  }
12816
- b.items[b.items.length - 1].raw = r.trimRight(), b.items[b.items.length - 1].text = f.trimRight(), b.raw = b.raw.trimRight();
12816
+ b.items[b.items.length - 1].raw = r.trimRight(), b.items[b.items.length - 1].text = p.trimRight(), b.raw = b.raw.trimRight();
12817
12817
  const y = b.items.length;
12818
12818
  for (i = 0; i < y; i++)
12819
12819
  if (this.lexer.state.top = !1, b.items[i].tokens = this.lexer.blockTokens(b.items[i].text, []), !b.loose) {
@@ -12986,8 +12986,8 @@ class jl {
12986
12986
  if (!s || s && (r === "" || this.rules.inline.punctuation.exec(r))) {
12987
12987
  const a = o[0].length - 1;
12988
12988
  let i, l, c = a, d = 0;
12989
- const p = o[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
12990
- for (p.lastIndex = 0, n = n.slice(-1 * t.length + a); (o = p.exec(n)) != null; ) {
12989
+ const f = o[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
12990
+ for (f.lastIndex = 0, n = n.slice(-1 * t.length + a); (o = f.exec(n)) != null; ) {
12991
12991
  if (i = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !i) continue;
12992
12992
  if (l = i.length, o[3] || o[4]) {
12993
12993
  c += l;
@@ -13008,12 +13008,12 @@ class jl {
13008
13008
  tokens: this.lexer.inlineTokens(v)
13009
13009
  };
13010
13010
  }
13011
- const f = h.slice(2, -2);
13011
+ const p = h.slice(2, -2);
13012
13012
  return {
13013
13013
  type: "strong",
13014
13014
  raw: h,
13015
- text: f,
13016
- tokens: this.lexer.inlineTokens(f)
13015
+ text: p,
13016
+ tokens: this.lexer.inlineTokens(p)
13017
13017
  };
13018
13018
  }
13019
13019
  }
@@ -13442,10 +13442,10 @@ class Bn {
13442
13442
  }
13443
13443
  if (s = t, this.options.extensions && this.options.extensions.startInline) {
13444
13444
  let d = 1 / 0;
13445
- const p = t.slice(1);
13445
+ const f = t.slice(1);
13446
13446
  let h;
13447
- this.options.extensions.startInline.forEach(function(f) {
13448
- h = f.call({ lexer: this }, p), typeof h == "number" && h >= 0 && (d = Math.min(d, h));
13447
+ this.options.extensions.startInline.forEach(function(p) {
13448
+ h = p.call({ lexer: this }, f), typeof h == "number" && h >= 0 && (d = Math.min(d, h));
13449
13449
  }), d < 1 / 0 && d >= 0 && (s = t.substring(0, d + 1));
13450
13450
  }
13451
13451
  if (r = this.tokenizer.inlineText(s, lE)) {
@@ -13697,14 +13697,14 @@ class zn {
13697
13697
  * Parse Loop
13698
13698
  */
13699
13699
  parse(t, n = !0) {
13700
- let r = "", o, s, a, i, l, c, d, p, h, f, v, g, x, b, w, y, C, S, T;
13700
+ let r = "", o, s, a, i, l, c, d, f, h, p, v, g, x, b, w, y, C, S, T;
13701
13701
  const E = t.length;
13702
13702
  for (o = 0; o < E; o++) {
13703
- if (f = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[f.type] && (T = this.options.extensions.renderers[f.type].call({ parser: this }, f), T !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(f.type))) {
13703
+ if (p = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[p.type] && (T = this.options.extensions.renderers[p.type].call({ parser: this }, p), T !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(p.type))) {
13704
13704
  r += T || "";
13705
13705
  continue;
13706
13706
  }
13707
- switch (f.type) {
13707
+ switch (p.type) {
13708
13708
  case "space":
13709
13709
  continue;
13710
13710
  case "hr": {
@@ -13713,45 +13713,45 @@ class zn {
13713
13713
  }
13714
13714
  case "heading": {
13715
13715
  r += this.renderer.heading(
13716
- this.parseInline(f.tokens),
13717
- f.depth,
13718
- hh(this.parseInline(f.tokens, this.textRenderer)),
13716
+ this.parseInline(p.tokens),
13717
+ p.depth,
13718
+ hh(this.parseInline(p.tokens, this.textRenderer)),
13719
13719
  this.slugger
13720
13720
  );
13721
13721
  continue;
13722
13722
  }
13723
13723
  case "code": {
13724
13724
  r += this.renderer.code(
13725
- f.text,
13726
- f.lang,
13727
- f.escaped
13725
+ p.text,
13726
+ p.lang,
13727
+ p.escaped
13728
13728
  );
13729
13729
  continue;
13730
13730
  }
13731
13731
  case "table": {
13732
- for (p = "", d = "", i = f.header.length, s = 0; s < i; s++)
13732
+ for (f = "", d = "", i = p.header.length, s = 0; s < i; s++)
13733
13733
  d += this.renderer.tablecell(
13734
- this.parseInline(f.header[s].tokens),
13735
- { header: !0, align: f.align[s] }
13734
+ this.parseInline(p.header[s].tokens),
13735
+ { header: !0, align: p.align[s] }
13736
13736
  );
13737
- for (p += this.renderer.tablerow(d), h = "", i = f.rows.length, s = 0; s < i; s++) {
13738
- for (c = f.rows[s], d = "", l = c.length, a = 0; a < l; a++)
13737
+ for (f += this.renderer.tablerow(d), h = "", i = p.rows.length, s = 0; s < i; s++) {
13738
+ for (c = p.rows[s], d = "", l = c.length, a = 0; a < l; a++)
13739
13739
  d += this.renderer.tablecell(
13740
13740
  this.parseInline(c[a].tokens),
13741
- { header: !1, align: f.align[a] }
13741
+ { header: !1, align: p.align[a] }
13742
13742
  );
13743
13743
  h += this.renderer.tablerow(d);
13744
13744
  }
13745
- r += this.renderer.table(p, h);
13745
+ r += this.renderer.table(f, h);
13746
13746
  continue;
13747
13747
  }
13748
13748
  case "blockquote": {
13749
- h = this.parse(f.tokens), r += this.renderer.blockquote(h);
13749
+ h = this.parse(p.tokens), r += this.renderer.blockquote(h);
13750
13750
  continue;
13751
13751
  }
13752
13752
  case "list": {
13753
- for (v = f.ordered, g = f.start, x = f.loose, i = f.items.length, h = "", s = 0; s < i; s++)
13754
- w = f.items[s], y = w.checked, C = w.task, b = "", w.task && (S = this.renderer.checkbox(y), x ? w.tokens.length > 0 && w.tokens[0].type === "paragraph" ? (w.tokens[0].text = S + " " + w.tokens[0].text, w.tokens[0].tokens && w.tokens[0].tokens.length > 0 && w.tokens[0].tokens[0].type === "text" && (w.tokens[0].tokens[0].text = S + " " + w.tokens[0].tokens[0].text)) : w.tokens.unshift({
13753
+ for (v = p.ordered, g = p.start, x = p.loose, i = p.items.length, h = "", s = 0; s < i; s++)
13754
+ w = p.items[s], y = w.checked, C = w.task, b = "", w.task && (S = this.renderer.checkbox(y), x ? w.tokens.length > 0 && w.tokens[0].type === "paragraph" ? (w.tokens[0].text = S + " " + w.tokens[0].text, w.tokens[0].tokens && w.tokens[0].tokens.length > 0 && w.tokens[0].tokens[0].type === "text" && (w.tokens[0].tokens[0].text = S + " " + w.tokens[0].tokens[0].text)) : w.tokens.unshift({
13755
13755
  type: "text",
13756
13756
  text: S
13757
13757
  }) : b += S), b += this.parse(w.tokens, x), h += this.renderer.listitem(b, C, y);
@@ -13759,22 +13759,22 @@ class zn {
13759
13759
  continue;
13760
13760
  }
13761
13761
  case "html": {
13762
- r += this.renderer.html(f.text);
13762
+ r += this.renderer.html(p.text);
13763
13763
  continue;
13764
13764
  }
13765
13765
  case "paragraph": {
13766
- r += this.renderer.paragraph(this.parseInline(f.tokens));
13766
+ r += this.renderer.paragraph(this.parseInline(p.tokens));
13767
13767
  continue;
13768
13768
  }
13769
13769
  case "text": {
13770
- for (h = f.tokens ? this.parseInline(f.tokens) : f.text; o + 1 < E && t[o + 1].type === "text"; )
13771
- f = t[++o], h += `
13772
- ` + (f.tokens ? this.parseInline(f.tokens) : f.text);
13770
+ for (h = p.tokens ? this.parseInline(p.tokens) : p.text; o + 1 < E && t[o + 1].type === "text"; )
13771
+ p = t[++o], h += `
13772
+ ` + (p.tokens ? this.parseInline(p.tokens) : p.text);
13773
13773
  r += n ? this.renderer.paragraph(h) : h;
13774
13774
  continue;
13775
13775
  }
13776
13776
  default: {
13777
- const N = 'Token with "' + f.type + '" type was not found.';
13777
+ const N = 'Token with "' + p.type + '" type was not found.';
13778
13778
  if (this.options.silent) {
13779
13779
  console.error(N);
13780
13780
  return;
@@ -13909,27 +13909,27 @@ function xh(e, t) {
13909
13909
  let l;
13910
13910
  try {
13911
13911
  r.hooks && (n = r.hooks.preprocess(n)), l = e(n, r);
13912
- } catch (p) {
13913
- return a(p);
13912
+ } catch (f) {
13913
+ return a(f);
13914
13914
  }
13915
- const c = function(p) {
13915
+ const c = function(f) {
13916
13916
  let h;
13917
- if (!p)
13917
+ if (!f)
13918
13918
  try {
13919
13919
  r.walkTokens && be.walkTokens(l, r.walkTokens), h = t(l, r), r.hooks && (h = r.hooks.postprocess(h));
13920
- } catch (f) {
13921
- p = f;
13920
+ } catch (p) {
13921
+ f = p;
13922
13922
  }
13923
- return r.highlight = i, p ? a(p) : o(null, h);
13923
+ return r.highlight = i, f ? a(f) : o(null, h);
13924
13924
  };
13925
13925
  if (!i || i.length < 3 || (delete r.highlight, !l.length)) return c();
13926
13926
  let d = 0;
13927
- be.walkTokens(l, function(p) {
13928
- p.type === "code" && (d++, setTimeout(() => {
13929
- i(p.text, p.lang, function(h, f) {
13927
+ be.walkTokens(l, function(f) {
13928
+ f.type === "code" && (d++, setTimeout(() => {
13929
+ i(f.text, f.lang, function(h, p) {
13930
13930
  if (h)
13931
13931
  return c(h);
13932
- f != null && f !== p.text && (p.text = f, p.escaped = !0), d--, d === 0 && c();
13932
+ p != null && p !== f.text && (f.text = p, f.escaped = !0), d--, d === 0 && c();
13933
13933
  });
13934
13934
  }, 0));
13935
13935
  }), d === 0 && c();
@@ -14557,29 +14557,29 @@ function bE({ issues: e }) {
14557
14557
  function yE(e) {
14558
14558
  const { allowFileOpen: t, currentThreadId: n } = e, { toast: r } = Al(), [o, s] = fe({}), [a, i] = fe(null), [l, c] = fe(!1), d = ie(() => {
14559
14559
  c(!1), i(null);
14560
- }, []), p = ie((f) => {
14561
- i(f), c(!0);
14560
+ }, []), f = ie((p) => {
14561
+ i(p), c(!0);
14562
14562
  }, []), h = ie(
14563
- async (f, v, g) => {
14563
+ async (p, v, g) => {
14564
14564
  var x, b;
14565
14565
  if (!t) {
14566
- f.preventDefault();
14566
+ p.preventDefault();
14567
14567
  return;
14568
14568
  }
14569
14569
  if (o[g]) {
14570
- f.preventDefault();
14570
+ p.preventDefault();
14571
14571
  return;
14572
14572
  }
14573
14573
  try {
14574
14574
  const w = String(v.url ?? ""), y = w.match(/\/chat\/files\/([^/]+)(?:\/(view|download))?/);
14575
14575
  if (y) {
14576
- f.preventDefault();
14576
+ p.preventDefault();
14577
14577
  const C = y[1], S = v.name || `file_${C}`, T = v.mimeType || "application/octet-stream";
14578
- p({ id: C, name: S, mimeType: T });
14578
+ f({ id: C, name: S, mimeType: T });
14579
14579
  return;
14580
14580
  }
14581
14581
  if (w.startsWith("data:")) {
14582
- f.preventDefault(), s((S) => ({ ...S, [g]: !0 }));
14582
+ p.preventDefault(), s((S) => ({ ...S, [g]: !0 }));
14583
14583
  const C = r({ title: "Fetching file...", description: "", open: !0 });
14584
14584
  try {
14585
14585
  const S = await nw(n ?? void 0);
@@ -14590,7 +14590,7 @@ function yE(e) {
14590
14590
  throw new Error(`File "${v.name}" is not yet available on the server`);
14591
14591
  if (!T.id || !T.filename)
14592
14592
  throw new Error("Invalid file data received from server");
14593
- p({
14593
+ f({
14594
14594
  id: T.id,
14595
14595
  name: v.name || T.filename || `file_${T.id}`,
14596
14596
  mimeType: v.mimeType || T.mime_type || "application/octet-stream"
@@ -14616,7 +14616,7 @@ function yE(e) {
14616
14616
  console.error("File click error:", w), s((y) => ({ ...y, [g]: !1 }));
14617
14617
  }
14618
14618
  },
14619
- [t, o, r, n, p]
14619
+ [t, o, r, n, f]
14620
14620
  );
14621
14621
  return {
14622
14622
  uploadingFiles: o,
@@ -14703,7 +14703,7 @@ function kE(e) {
14703
14703
  (c) => TE(c.text ?? "")
14704
14704
  );
14705
14705
  if (!r.length) {
14706
- const c = t.map((p) => p.text ?? "").join(`
14706
+ const c = t.map((f) => f.text ?? "").join(`
14707
14707
  `), d = ko(c);
14708
14708
  d && typeof d == "object" && (r = [d]);
14709
14709
  }
@@ -14731,50 +14731,46 @@ function kE(e) {
14731
14731
  }, [e]);
14732
14732
  }
14733
14733
  function RE({ message: e, viewMode: t, isStreaming: n = !1 }) {
14734
- const o = Li(e).name || "tool", s = e.artifact ?? null, a = kE(e), i = e.content.find((h) => h.type !== "tool_call"), l = (h) => {
14735
- if (h == null) return null;
14736
- const f = typeof h == "string" ? ko(h) ?? h : h;
14737
- if (f && typeof f == "object")
14738
- return /* @__PURE__ */ u.jsx(hi, { data: f });
14739
- const v = typeof f == "string" ? f : (() => {
14734
+ Li(e).name;
14735
+ const o = e.artifact ?? null, s = kE(e), a = e.content.find((f) => f.type !== "tool_call"), i = (f) => {
14736
+ if (f == null) return null;
14737
+ const h = typeof f == "string" ? ko(f) ?? f : f;
14738
+ if (h && typeof h == "object")
14739
+ return /* @__PURE__ */ u.jsx(hi, { data: h });
14740
+ const p = typeof h == "string" ? h : (() => {
14740
14741
  try {
14741
- return Ar(f);
14742
+ return Ar(h);
14742
14743
  } catch {
14743
- return String(f ?? "");
14744
+ return String(h ?? "");
14744
14745
  }
14745
14746
  })();
14746
- return /* @__PURE__ */ u.jsx("pre", { className: "whitespace-pre-wrap break-words font-sans text-sm text-foreground/90", children: v });
14747
- }, c = (h) => {
14748
- if (h == null) return null;
14749
- const { content: f, isMarkdown: v } = gw(h);
14750
- return v ? /* @__PURE__ */ u.jsx(or, { content: f, className: "text-current" }) : l(h);
14751
- }, d = (h) => /* @__PURE__ */ u.jsxs("div", { className: "space-y-2 rounded-2xl border border-muted-foreground/30 bg-white/80 p-4 shadow-sm shadow-slate-900/10", children: [
14747
+ return /* @__PURE__ */ u.jsx("pre", { className: "whitespace-pre-wrap break-words font-sans text-sm text-foreground/90", children: p });
14748
+ }, l = (f) => {
14749
+ if (f == null) return null;
14750
+ const { content: h, isMarkdown: p } = gw(f);
14751
+ return p ? /* @__PURE__ */ u.jsx(or, { content: h, className: "text-current" }) : i(f);
14752
+ }, c = (f) => /* @__PURE__ */ u.jsxs("div", { className: "space-y-2 rounded-2xl border border-muted-foreground/30 bg-white/80 p-4 shadow-sm shadow-slate-900/10", children: [
14752
14753
  /* @__PURE__ */ u.jsx("div", { className: "text-[11px] font-semibold uppercase tracking-[0.4em] text-muted-foreground", children: "Structured dictionary" }),
14753
- /* @__PURE__ */ u.jsx(hi, { data: h })
14754
- ] }), p = () => {
14755
- if ((a == null ? void 0 : a.kind) === "generic")
14756
- return c(a.value);
14757
- if (!i)
14754
+ /* @__PURE__ */ u.jsx(hi, { data: f })
14755
+ ] }), d = () => {
14756
+ if ((s == null ? void 0 : s.kind) === "generic")
14757
+ return l(s.value);
14758
+ if (!a)
14758
14759
  return null;
14759
- if (i.type === "text") {
14760
- const g = (i.text ?? "").trim();
14761
- if (!g)
14760
+ if (a.type === "text") {
14761
+ const v = (a.text ?? "").trim();
14762
+ if (!v)
14762
14763
  return null;
14763
- const x = jr(g);
14764
- return c(x);
14764
+ const g = jr(v);
14765
+ return l(g);
14765
14766
  }
14766
- const h = so(i), f = jr(h);
14767
- return c(f);
14767
+ const f = so(a), h = jr(f);
14768
+ return l(h);
14768
14769
  };
14769
14770
  return /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
14770
- s && /* @__PURE__ */ u.jsx(hE, { artifact: s, idx: 0 }),
14771
+ o && /* @__PURE__ */ u.jsx(hE, { artifact: o, idx: 0 }),
14771
14772
  /* @__PURE__ */ u.jsx(xE, { message: e, isStreaming: n }),
14772
- !i && /* @__PURE__ */ u.jsx("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: /* @__PURE__ */ u.jsxs("span", { children: [
14773
- "Running ",
14774
- o,
14775
- "…"
14776
- ] }) }),
14777
- t === "expanded" && /* @__PURE__ */ u.jsx(u.Fragment, { children: (a == null ? void 0 : a.kind) === "issues" ? /* @__PURE__ */ u.jsx(bE, { issues: a.issues }) : (a == null ? void 0 : a.kind) === "dict" ? d(a.data) : p() })
14773
+ t === "expanded" && /* @__PURE__ */ u.jsx(u.Fragment, { children: (s == null ? void 0 : s.kind) === "issues" ? /* @__PURE__ */ u.jsx(bE, { issues: s.issues }) : (s == null ? void 0 : s.kind) === "dict" ? c(s.data) : d() })
14778
14774
  ] });
14779
14775
  }
14780
14776
  const IE = {
@@ -14798,9 +14794,9 @@ const IE = {
14798
14794
  editingMessageId: l,
14799
14795
  onEdit: c,
14800
14796
  onRegenerate: d,
14801
- onCancelEdit: p,
14797
+ onCancelEdit: f,
14802
14798
  activeInterrupt: h,
14803
- disableInterruptActions: f,
14799
+ disableInterruptActions: p,
14804
14800
  onInterruptActionStart: v,
14805
14801
  onInterruptActionEnd: g,
14806
14802
  showToolMessages: x,
@@ -14834,9 +14830,9 @@ const IE = {
14834
14830
  layoutSize: a,
14835
14831
  onEdit: c,
14836
14832
  onRegenerate: () => d(n),
14837
- onCancelEdit: p,
14833
+ onCancelEdit: f,
14838
14834
  activeInterrupt: h,
14839
- disableInterruptActions: f,
14835
+ disableInterruptActions: p,
14840
14836
  onInterruptActionStart: v,
14841
14837
  onInterruptActionEnd: g,
14842
14838
  showToolMessages: x,
@@ -14880,9 +14876,9 @@ function AE({
14880
14876
  fileParts: l,
14881
14877
  interruptParts: c,
14882
14878
  isStreamingMessage: d,
14883
- enableStreamingMarkdownBuffer: p,
14879
+ enableStreamingMarkdownBuffer: f,
14884
14880
  renderStreamingMarkdown: h,
14885
- defaultMessage: f,
14881
+ defaultMessage: p,
14886
14882
  handleFileClick: v,
14887
14883
  uploadingFiles: g,
14888
14884
  handleInterruptApprove: x,
@@ -14903,7 +14899,7 @@ function AE({
14903
14899
  /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "File upload" })
14904
14900
  ] }), []), I = NE(
14905
14901
  s,
14906
- (p ?? !0) && d,
14902
+ (f ?? !0) && d,
14907
14903
  kh
14908
14904
  ), G = $e(
14909
14905
  () => I.filter((M) => M.type === "text"),
@@ -15040,7 +15036,7 @@ function AE({
15040
15036
  },
15041
15037
  e.id
15042
15038
  ) : null;
15043
- if (!f) {
15039
+ if (!p) {
15044
15040
  const M = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: H.map((P, L) => h && _E(P) ? _ ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: _ }, `streaming-md-${L}`) : null : /* @__PURE__ */ u.jsx(V, { part: P, i: L }, L)) });
15045
15041
  return d ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
15046
15042
  M,
@@ -15097,9 +15093,9 @@ function OE({
15097
15093
  isCompactLayout: l,
15098
15094
  showActions: c,
15099
15095
  isEditing: d,
15100
- messageRole: p,
15096
+ messageRole: f,
15101
15097
  toolViewMode: h,
15102
- toolMeta: f,
15098
+ toolMeta: p,
15103
15099
  onToggleToolView: v,
15104
15100
  onCopy: g,
15105
15101
  onEdit: x,
@@ -15143,8 +15139,8 @@ function OE({
15143
15139
  (A.key === "Enter" || A.key === " ") && (A.preventDefault(), v());
15144
15140
  },
15145
15141
  children: [
15146
- /* @__PURE__ */ u.jsx("span", { children: f.name ?? "Tool Output" }),
15147
- f.toolCallId && /* @__PURE__ */ u.jsx("span", { className: "opacity-70", children: f.toolCallId.slice(0, 8) }),
15142
+ /* @__PURE__ */ u.jsx("span", { children: p.name ?? "Tool Output" }),
15143
+ p.toolCallId && /* @__PURE__ */ u.jsx("span", { className: "opacity-70", children: p.toolCallId.slice(0, 8) }),
15148
15144
  h === "expanded" ? /* @__PURE__ */ u.jsx(Ai, { className: "h-3 w-3" }) : /* @__PURE__ */ u.jsx(js, { className: "h-3 w-3" })
15149
15145
  ]
15150
15146
  }
@@ -15220,7 +15216,7 @@ function OE({
15220
15216
  children: /* @__PURE__ */ u.jsx(Fu, { className: re(N ? "text-success" : r, l ? "h-3 w-3" : "h-4 w-4") })
15221
15217
  }
15222
15218
  ) }),
15223
- p === "user" && x && /* @__PURE__ */ u.jsx(
15219
+ f === "user" && x && /* @__PURE__ */ u.jsx(
15224
15220
  rt,
15225
15221
  {
15226
15222
  variant: "ghost",
@@ -15231,7 +15227,7 @@ function OE({
15231
15227
  children: /* @__PURE__ */ u.jsx(Bu, { className: re(r, l ? "h-3 w-3" : "h-4 w-4") })
15232
15228
  }
15233
15229
  ),
15234
- p === "assistant" && b && /* @__PURE__ */ u.jsx(
15230
+ f === "assistant" && b && /* @__PURE__ */ u.jsx(
15235
15231
  rt,
15236
15232
  {
15237
15233
  variant: "ghost",
@@ -15261,9 +15257,9 @@ const Pl = Fg(function({
15261
15257
  layoutSize: l = "desktop",
15262
15258
  truncateUserMessages: c = !0,
15263
15259
  userMessagePreviewLength: d = 500,
15264
- showToolMessages: p = !0,
15260
+ showToolMessages: f = !0,
15265
15261
  customStyles: h = {},
15266
- streamingDebounceMs: f = 300,
15262
+ streamingDebounceMs: p = 300,
15267
15263
  renderStreamingMarkdown: v = !1,
15268
15264
  enableStreamingMarkdownBuffer: g,
15269
15265
  onEdit: x,
@@ -15306,7 +15302,7 @@ const Pl = Fg(function({
15306
15302
  toolMeta: Se,
15307
15303
  toolRaw: Ce,
15308
15304
  isToolStreaming: Ae
15309
- } = ee, ht = g ?? f !== 0, ut = (y == null ? void 0 : y.id) ?? (y == null ? void 0 : y.interrupt_id), He = ns(ut), ze = y == null ? void 0 : y.value, De = ie(async () => {
15305
+ } = ee, ht = g ?? p !== 0, ut = (y == null ? void 0 : y.id) ?? (y == null ? void 0 : y.interrupt_id), He = ns(ut), ze = y == null ? void 0 : y.value, De = ie(async () => {
15310
15306
  const J = V ? Ce : me;
15311
15307
  async function ce(Ke) {
15312
15308
  if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
@@ -15442,7 +15438,7 @@ const Pl = Fg(function({
15442
15438
  {
15443
15439
  message: t,
15444
15440
  isToolMessage: V,
15445
- showToolMessages: p,
15441
+ showToolMessages: f,
15446
15442
  toolViewMode: q,
15447
15443
  isToolStreaming: Ae,
15448
15444
  contentParts: X,
@@ -15474,7 +15470,7 @@ const Pl = Fg(function({
15474
15470
  }, [It, A]), _t = ie(() => {
15475
15471
  !Ue || !A || A(Ue.id, void 0, !!Ue.isLatestAttempt);
15476
15472
  }, [Ue, A]);
15477
- return V && !p ? null : M && j ? /* @__PURE__ */ u.jsx("div", { className: re(At(), h.container), children: /* @__PURE__ */ u.jsxs("div", { className: re(it(), h.content), children: [
15473
+ return V && !f ? null : M && j ? /* @__PURE__ */ u.jsx("div", { className: re(At(), h.container), children: /* @__PURE__ */ u.jsxs("div", { className: re(it(), h.content), children: [
15478
15474
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 mb-2 pb-2 border-b border-current/10", children: [
15479
15475
  /* @__PURE__ */ u.jsx(wa, { className: re("h-4 w-4", Y) }),
15480
15476
  i && /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Assistant" })
@@ -15584,7 +15580,7 @@ const Pl = Fg(function({
15584
15580
  )
15585
15581
  ] });
15586
15582
  }, (e, t) => {
15587
- var l, c, d, p, h, f, v, g;
15583
+ var l, c, d, f, h, p, v, g;
15588
15584
  if (t.isStreamingMessage || e.isStreamingMessage || !(e.message.id === t.message.id && yc(e.message) === yc(t.message))) return !1;
15589
15585
  const o = [
15590
15586
  "isEditing",
@@ -15595,7 +15591,7 @@ const Pl = Fg(function({
15595
15591
  "truncateUserMessages",
15596
15592
  "userMessagePreviewLength",
15597
15593
  "showToolMessages"
15598
- ].every((x) => e[x] === t[x]), s = ((l = e.customStyles) == null ? void 0 : l.container) === ((c = t.customStyles) == null ? void 0 : c.container) && ((d = e.customStyles) == null ? void 0 : d.content) === ((p = t.customStyles) == null ? void 0 : p.content) && ((h = e.customStyles) == null ? void 0 : h.actions) === ((f = t.customStyles) == null ? void 0 : f.actions) && ((v = e.customStyles) == null ? void 0 : v.header) === ((g = t.customStyles) == null ? void 0 : g.header);
15594
+ ].every((x) => e[x] === t[x]), s = ((l = e.customStyles) == null ? void 0 : l.container) === ((c = t.customStyles) == null ? void 0 : c.container) && ((d = e.customStyles) == null ? void 0 : d.content) === ((f = t.customStyles) == null ? void 0 : f.content) && ((h = e.customStyles) == null ? void 0 : h.actions) === ((p = t.customStyles) == null ? void 0 : p.actions) && ((v = e.customStyles) == null ? void 0 : v.header) === ((g = t.customStyles) == null ? void 0 : g.header);
15599
15595
  if (!o || !s)
15600
15596
  return !1;
15601
15597
  const a = Sc(e.message), i = Sc(t.message);
@@ -15614,9 +15610,9 @@ const Rh = O.forwardRef(({
15614
15610
  onEdit: l,
15615
15611
  onRegenerate: c,
15616
15612
  onCancelEdit: d,
15617
- className: p,
15613
+ className: f,
15618
15614
  style: h,
15619
- emptyMessage: f,
15615
+ emptyMessage: p,
15620
15616
  followNewMessages: v = !0,
15621
15617
  isNavigatingCheckpoint: g = !1,
15622
15618
  onScrollAway: x,
@@ -15684,15 +15680,15 @@ const Rh = O.forwardRef(({
15684
15680
  }
15685
15681
  };
15686
15682
  }, [i]), P = $e(() => !v || g ? !1 : "auto", [v, g]), L = $e(() => {
15687
- if (typeof f != "string") return null;
15688
- const Y = f.trim();
15683
+ if (typeof p != "string") return null;
15684
+ const Y = p.trim();
15689
15685
  return !Y || V && V.length > 0 ? null : {
15690
15686
  id: "default-message",
15691
15687
  role: "default_message",
15692
15688
  content: Y,
15693
15689
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
15694
15690
  };
15695
- }, [f, V]), Q = ["flex h-full flex-col md:flex-row", p].filter(Boolean).join(" "), B = () => L ? /* @__PURE__ */ u.jsx("div", { className: "p-6 h-full overflow-y-auto", children: /* @__PURE__ */ u.jsx("div", { className: "w-full max-w-full", children: /* @__PURE__ */ u.jsx(
15691
+ }, [p, V]), Q = ["flex h-full flex-col md:flex-row", f].filter(Boolean).join(" "), B = () => L ? /* @__PURE__ */ u.jsx("div", { className: "p-6 h-full overflow-y-auto", children: /* @__PURE__ */ u.jsx("div", { className: "w-full max-w-full", children: /* @__PURE__ */ u.jsx(
15696
15692
  Pl,
15697
15693
  {
15698
15694
  message: L,
@@ -15709,7 +15705,7 @@ const Rh = O.forwardRef(({
15709
15705
  onCancelEdit: () => {
15710
15706
  }
15711
15707
  }
15712
- ) }) }) : /* @__PURE__ */ u.jsx("div", { className: "flex h-full items-center justify-center py-8 text-center text-muted-foreground", children: f ?? "No messages yet. Start a conversation!" }), $ = V.length, Z = $ > 0;
15708
+ ) }) }) : /* @__PURE__ */ u.jsx("div", { className: "flex h-full items-center justify-center py-8 text-center text-muted-foreground", children: p ?? "No messages yet. Start a conversation!" }), $ = V.length, Z = $ > 0;
15713
15709
  return Qe(() => {
15714
15710
  var Y, ee;
15715
15711
  if ($ === 0) {
@@ -15809,9 +15805,9 @@ function oo({
15809
15805
  enableExcelUpload: l = !1,
15810
15806
  enableMessageEditing: c = !0,
15811
15807
  showToolMessages: d = !0,
15812
- payloadExtras: p = {},
15808
+ payloadExtras: f = {},
15813
15809
  customStyles: h = {},
15814
- onMessageSent: f,
15810
+ onMessageSent: p,
15815
15811
  onExcelUploadSuccess: v,
15816
15812
  onError: g,
15817
15813
  defaultMessage: x
@@ -15895,7 +15891,7 @@ function oo({
15895
15891
  {
15896
15892
  text: Me || "",
15897
15893
  attachments: ye,
15898
- payload: p
15894
+ payload: f
15899
15895
  },
15900
15896
  {
15901
15897
  checkpointId: Ye,
@@ -15903,7 +15899,7 @@ function oo({
15903
15899
  edit: !!ee,
15904
15900
  originalMessageId: ee ?? void 0
15905
15901
  }
15906
- ), f == null || f(Me), B(!0), tt(""), Ce(null), X(null), xe(""), me(null);
15902
+ ), p == null || p(Me), B(!0), tt(""), Ce(null), X(null), xe(""), me(null);
15907
15903
  } catch (Ye) {
15908
15904
  const dt = (Ye == null ? void 0 : Ye.message) || "Failed to send message";
15909
15905
  Ce(dt), g == null || g(dt), B(!1);
@@ -15911,14 +15907,14 @@ function oo({
15911
15907
  }, jt = ie(
15912
15908
  async (he) => {
15913
15909
  await z(
15914
- { attachments: [he], payload: p },
15910
+ { attachments: [he], payload: f },
15915
15911
  {
15916
15912
  checkpointId: H ?? void 0,
15917
15913
  checkpointNs: V ?? void 0
15918
15914
  }
15919
15915
  ), v == null || v({ file: he });
15920
15916
  },
15921
- [H, V, p, v, z]
15917
+ [H, V, f, v, z]
15922
15918
  ), zt = O.useCallback(
15923
15919
  (he, ye, Me) => {
15924
15920
  c && (Le.current = De, X(he), xe(ye), tt(ye), Ce(null), me({
@@ -15950,7 +15946,7 @@ function oo({
15950
15946
  }
15951
15947
  })();
15952
15948
  dt && z(
15953
- { text: dt, payload: p },
15949
+ { text: dt, payload: f },
15954
15950
  {
15955
15951
  checkpointId: H ?? void 0,
15956
15952
  checkpointNs: V ?? void 0,
@@ -15958,7 +15954,7 @@ function oo({
15958
15954
  originalMessageId: ye.id
15959
15955
  }
15960
15956
  );
15961
- }, [C, z, H, V, p]), _t = async (he) => {
15957
+ }, [C, z, H, V, f]), _t = async (he) => {
15962
15958
  if (w) {
15963
15959
  it(!0);
15964
15960
  try {
@@ -16101,7 +16097,7 @@ function mi(e, t, n, r, o, s, a) {
16101
16097
  if (s === t.length) return o === e.length ? Ru : BE;
16102
16098
  var i = `${o},${s}`;
16103
16099
  if (a[i] !== void 0) return a[i];
16104
- for (var l = r.charAt(s), c = n.indexOf(l, o), d = 0, p, h, f, v; c >= 0; ) p = mi(e, t, n, r, c + 1, s + 1, a), p > d && (c === o ? p *= Ru : zE.test(e.charAt(c - 1)) ? (p *= LE, f = e.slice(o, c - 1).match(HE), f && o > 0 && (p *= Math.pow(Wa, f.length))) : UE.test(e.charAt(c - 1)) ? (p *= DE, v = e.slice(o, c - 1).match(Ih), v && o > 0 && (p *= Math.pow(Wa, v.length))) : (p *= $E, o > 0 && (p *= Math.pow(Wa, c - o))), e.charAt(c) !== t.charAt(s) && (p *= FE)), (p < Ua && n.charAt(c - 1) === r.charAt(s + 1) || r.charAt(s + 1) === r.charAt(s) && n.charAt(c - 1) !== r.charAt(s)) && (h = mi(e, t, n, r, c + 1, s + 2, a), h * Ua > p && (p = h * Ua)), p > d && (d = p), c = n.indexOf(l, c + 1);
16100
+ for (var l = r.charAt(s), c = n.indexOf(l, o), d = 0, f, h, p, v; c >= 0; ) f = mi(e, t, n, r, c + 1, s + 1, a), f > d && (c === o ? f *= Ru : zE.test(e.charAt(c - 1)) ? (f *= LE, p = e.slice(o, c - 1).match(HE), p && o > 0 && (f *= Math.pow(Wa, p.length))) : UE.test(e.charAt(c - 1)) ? (f *= DE, v = e.slice(o, c - 1).match(Ih), v && o > 0 && (f *= Math.pow(Wa, v.length))) : (f *= $E, o > 0 && (f *= Math.pow(Wa, c - o))), e.charAt(c) !== t.charAt(s) && (f *= FE)), (f < Ua && n.charAt(c - 1) === r.charAt(s + 1) || r.charAt(s + 1) === r.charAt(s) && n.charAt(c - 1) !== r.charAt(s)) && (h = mi(e, t, n, r, c + 1, s + 2, a), h * Ua > f && (f = h * Ua)), f > d && (d = f), c = n.indexOf(l, c + 1);
16105
16101
  return a[i] = d, d;
16106
16102
  }
16107
16103
  function Iu(e) {
@@ -16114,7 +16110,7 @@ var Jr = '[cmdk-group=""]', Va = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16114
16110
  let n = Tr(() => {
16115
16111
  var j, M;
16116
16112
  return { search: "", value: (M = (j = e.value) != null ? j : e.defaultValue) != null ? M : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
16117
- }), r = Tr(() => /* @__PURE__ */ new Set()), o = Tr(() => /* @__PURE__ */ new Map()), s = Tr(() => /* @__PURE__ */ new Map()), a = Tr(() => /* @__PURE__ */ new Set()), i = Mh(e), { label: l, children: c, value: d, onValueChange: p, filter: h, shouldFilter: f, loop: v, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, w = Lt(), y = Lt(), C = Lt(), S = m.useRef(null), T = rk();
16113
+ }), r = Tr(() => /* @__PURE__ */ new Set()), o = Tr(() => /* @__PURE__ */ new Map()), s = Tr(() => /* @__PURE__ */ new Map()), a = Tr(() => /* @__PURE__ */ new Set()), i = Mh(e), { label: l, children: c, value: d, onValueChange: f, filter: h, shouldFilter: p, loop: v, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, w = Lt(), y = Lt(), C = Lt(), S = m.useRef(null), T = rk();
16118
16114
  ur(() => {
16119
16115
  if (d !== void 0) {
16120
16116
  let j = d.trim();
@@ -16291,26 +16287,26 @@ var Jr = '[cmdk-group=""]', Va = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16291
16287
  ur(() => {
16292
16288
  if (!c) return i.item(o, a == null ? void 0 : a.id);
16293
16289
  }, [c]);
16294
- let d = Oh(o, s, [e.value, e.children, s], e.keywords), p = Ml(), h = Hn((T) => T.value && T.value === d.current), f = Hn((T) => c || i.filter() === !1 ? !0 : T.search ? T.filtered.items.get(o) > 0 : !0);
16290
+ let d = Oh(o, s, [e.value, e.children, s], e.keywords), f = Ml(), h = Hn((T) => T.value && T.value === d.current), p = Hn((T) => c || i.filter() === !1 ? !0 : T.search ? T.filtered.items.get(o) > 0 : !0);
16295
16291
  m.useEffect(() => {
16296
16292
  let T = s.current;
16297
16293
  if (!(!T || e.disabled)) return T.addEventListener(gi, v), () => T.removeEventListener(gi, v);
16298
- }, [f, e.onSelect, e.disabled]);
16294
+ }, [p, e.onSelect, e.disabled]);
16299
16295
  function v() {
16300
16296
  var T, E;
16301
16297
  g(), (E = (T = l.current).onSelect) == null || E.call(T, d.current);
16302
16298
  }
16303
16299
  function g() {
16304
- p.setState("value", d.current, !0);
16300
+ f.setState("value", d.current, !0);
16305
16301
  }
16306
- if (!f) return null;
16302
+ if (!p) return null;
16307
16303
  let { disabled: x, value: b, onSelect: w, forceMount: y, keywords: C, ...S } = e;
16308
16304
  return m.createElement(ge.div, { ref: On(s, t), ...S, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!h, "data-disabled": !!x, "data-selected": !!h, onPointerMove: x || i.getDisablePointerSelection() ? void 0 : g, onClick: x ? void 0 : v }, e.children);
16309
16305
  }), GE = m.forwardRef((e, t) => {
16310
- let { heading: n, children: r, forceMount: o, ...s } = e, a = Lt(), i = m.useRef(null), l = m.useRef(null), c = Lt(), d = Lo(), p = Hn((f) => o || d.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(a) : !0);
16306
+ let { heading: n, children: r, forceMount: o, ...s } = e, a = Lt(), i = m.useRef(null), l = m.useRef(null), c = Lt(), d = Lo(), f = Hn((p) => o || d.filter() === !1 ? !0 : p.search ? p.filtered.groups.has(a) : !0);
16311
16307
  ur(() => d.group(a), []), Oh(a, i, [e.value, e.heading, l]);
16312
16308
  let h = m.useMemo(() => ({ id: a, forceMount: o }), [o]);
16313
- return m.createElement(ge.div, { ref: On(i, t), ...s, "cmdk-group": "", role: "presentation", hidden: p ? void 0 : !0 }, n && m.createElement("div", { ref: l, "cmdk-group-heading": "", "aria-hidden": !0, id: c }, n), sa(e, (f) => m.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, m.createElement(_h.Provider, { value: h }, f))));
16309
+ return m.createElement(ge.div, { ref: On(i, t), ...s, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && m.createElement("div", { ref: l, "cmdk-group-heading": "", "aria-hidden": !0, id: c }, n), sa(e, (p) => m.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, m.createElement(_h.Provider, { value: h }, p))));
16314
16310
  }), YE = m.forwardRef((e, t) => {
16315
16311
  let { alwaysRender: n, ...r } = e, o = m.useRef(null), s = Hn((a) => !a.search);
16316
16312
  return !n && !s ? null : m.createElement(ge.div, { ref: On(o, t), ...r, "cmdk-separator": "", role: "separator" });
@@ -16325,14 +16321,14 @@ var Jr = '[cmdk-group=""]', Va = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16325
16321
  let { children: n, label: r = "Suggestions", ...o } = e, s = m.useRef(null), a = m.useRef(null), i = Hn((c) => c.selectedItemId), l = Lo();
16326
16322
  return m.useEffect(() => {
16327
16323
  if (a.current && s.current) {
16328
- let c = a.current, d = s.current, p, h = new ResizeObserver(() => {
16329
- p = requestAnimationFrame(() => {
16330
- let f = c.offsetHeight;
16331
- d.style.setProperty("--cmdk-list-height", f.toFixed(1) + "px");
16324
+ let c = a.current, d = s.current, f, h = new ResizeObserver(() => {
16325
+ f = requestAnimationFrame(() => {
16326
+ let p = c.offsetHeight;
16327
+ d.style.setProperty("--cmdk-list-height", p.toFixed(1) + "px");
16332
16328
  });
16333
16329
  });
16334
16330
  return h.observe(c), () => {
16335
- cancelAnimationFrame(p), h.unobserve(c);
16331
+ cancelAnimationFrame(f), h.unobserve(c);
16336
16332
  };
16337
16333
  }
16338
16334
  }, []), m.createElement(ge.div, { ref: On(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": r, id: l.listId }, sa(e, (c) => m.createElement("div", { ref: On(a, l.listInnerRef), "cmdk-list-sizer": "" }, c)));
@@ -16494,7 +16490,7 @@ var Ol = "ScrollArea", [Hh, _N] = gn(Ol), [lk, ln] = Hh(Ol), Uh = m.forwardRef(
16494
16490
  dir: o,
16495
16491
  scrollHideDelay: s = 600,
16496
16492
  ...a
16497
- } = e, [i, l] = m.useState(null), [c, d] = m.useState(null), [p, h] = m.useState(null), [f, v] = m.useState(null), [g, x] = m.useState(null), [b, w] = m.useState(0), [y, C] = m.useState(0), [S, T] = m.useState(!1), [E, N] = m.useState(!1), A = Be(t, (F) => l(F)), D = Bs(o);
16493
+ } = e, [i, l] = m.useState(null), [c, d] = m.useState(null), [f, h] = m.useState(null), [p, v] = m.useState(null), [g, x] = m.useState(null), [b, w] = m.useState(0), [y, C] = m.useState(0), [S, T] = m.useState(!1), [E, N] = m.useState(!1), A = Be(t, (F) => l(F)), D = Bs(o);
16498
16494
  return /* @__PURE__ */ u.jsx(
16499
16495
  lk,
16500
16496
  {
@@ -16505,9 +16501,9 @@ var Ol = "ScrollArea", [Hh, _N] = gn(Ol), [lk, ln] = Hh(Ol), Uh = m.forwardRef(
16505
16501
  scrollArea: i,
16506
16502
  viewport: c,
16507
16503
  onViewportChange: d,
16508
- content: p,
16504
+ content: f,
16509
16505
  onContentChange: h,
16510
- scrollbarX: f,
16506
+ scrollbarX: p,
16511
16507
  onScrollbarXChange: v,
16512
16508
  scrollbarXEnabled: S,
16513
16509
  onScrollbarXEnabledChange: T,
@@ -16638,10 +16634,10 @@ var ck = m.forwardRef((e, t) => {
16638
16634
  }, [i, o.scrollHideDelay, l]), m.useEffect(() => {
16639
16635
  const c = o.viewport, d = s ? "scrollLeft" : "scrollTop";
16640
16636
  if (c) {
16641
- let p = c[d];
16637
+ let f = c[d];
16642
16638
  const h = () => {
16643
- const f = c[d];
16644
- p !== f && (l("SCROLL"), a()), p = f;
16639
+ const p = c[d];
16640
+ f !== p && (l("SCROLL"), a()), f = p;
16645
16641
  };
16646
16642
  return c.addEventListener("scroll", h), () => c.removeEventListener("scroll", h);
16647
16643
  }
@@ -16684,8 +16680,8 @@ var ck = m.forwardRef((e, t) => {
16684
16680
  onThumbPointerUp: () => a.current = 0,
16685
16681
  onThumbPointerDown: (h) => a.current = h
16686
16682
  };
16687
- function p(h, f) {
16688
- return gk(h, a.current, i, f);
16683
+ function f(h, p) {
16684
+ return gk(h, a.current, i, p);
16689
16685
  }
16690
16686
  return n === "horizontal" ? /* @__PURE__ */ u.jsx(
16691
16687
  dk,
@@ -16694,15 +16690,15 @@ var ck = m.forwardRef((e, t) => {
16694
16690
  ref: t,
16695
16691
  onThumbPositionChange: () => {
16696
16692
  if (o.viewport && s.current) {
16697
- const h = o.viewport.scrollLeft, f = Au(h, i, o.dir);
16698
- s.current.style.transform = `translate3d(${f}px, 0, 0)`;
16693
+ const h = o.viewport.scrollLeft, p = Au(h, i, o.dir);
16694
+ s.current.style.transform = `translate3d(${p}px, 0, 0)`;
16699
16695
  }
16700
16696
  },
16701
16697
  onWheelScroll: (h) => {
16702
16698
  o.viewport && (o.viewport.scrollLeft = h);
16703
16699
  },
16704
16700
  onDragScroll: (h) => {
16705
- o.viewport && (o.viewport.scrollLeft = p(h, o.dir));
16701
+ o.viewport && (o.viewport.scrollLeft = f(h, o.dir));
16706
16702
  }
16707
16703
  }
16708
16704
  ) : n === "vertical" ? /* @__PURE__ */ u.jsx(
@@ -16712,15 +16708,15 @@ var ck = m.forwardRef((e, t) => {
16712
16708
  ref: t,
16713
16709
  onThumbPositionChange: () => {
16714
16710
  if (o.viewport && s.current) {
16715
- const h = o.viewport.scrollTop, f = Au(h, i);
16716
- s.current.style.transform = `translate3d(0, ${f}px, 0)`;
16711
+ const h = o.viewport.scrollTop, p = Au(h, i);
16712
+ s.current.style.transform = `translate3d(0, ${p}px, 0)`;
16717
16713
  }
16718
16714
  },
16719
16715
  onWheelScroll: (h) => {
16720
16716
  o.viewport && (o.viewport.scrollTop = h);
16721
16717
  },
16722
16718
  onDragScroll: (h) => {
16723
- o.viewport && (o.viewport.scrollTop = p(h));
16719
+ o.viewport && (o.viewport.scrollTop = f(h));
16724
16720
  }
16725
16721
  }
16726
16722
  ) : null;
@@ -16744,10 +16740,10 @@ var ck = m.forwardRef((e, t) => {
16744
16740
  },
16745
16741
  onThumbPointerDown: (d) => e.onThumbPointerDown(d.x),
16746
16742
  onDragScroll: (d) => e.onDragScroll(d.x),
16747
- onWheelScroll: (d, p) => {
16743
+ onWheelScroll: (d, f) => {
16748
16744
  if (s.viewport) {
16749
16745
  const h = s.viewport.scrollLeft + d.deltaX;
16750
- e.onWheelScroll(h), Qh(h, p) && d.preventDefault();
16746
+ e.onWheelScroll(h), Qh(h, f) && d.preventDefault();
16751
16747
  }
16752
16748
  },
16753
16749
  onResize: () => {
@@ -16784,10 +16780,10 @@ var ck = m.forwardRef((e, t) => {
16784
16780
  },
16785
16781
  onThumbPointerDown: (d) => e.onThumbPointerDown(d.y),
16786
16782
  onDragScroll: (d) => e.onDragScroll(d.y),
16787
- onWheelScroll: (d, p) => {
16783
+ onWheelScroll: (d, f) => {
16788
16784
  if (s.viewport) {
16789
16785
  const h = s.viewport.scrollTop + d.deltaY;
16790
- e.onWheelScroll(h), Qh(h, p) && d.preventDefault();
16786
+ e.onWheelScroll(h), Qh(h, f) && d.preventDefault();
16791
16787
  }
16792
16788
  },
16793
16789
  onResize: () => {
@@ -16814,9 +16810,9 @@ var ck = m.forwardRef((e, t) => {
16814
16810
  onThumbPositionChange: l,
16815
16811
  onDragScroll: c,
16816
16812
  onWheelScroll: d,
16817
- onResize: p,
16813
+ onResize: f,
16818
16814
  ...h
16819
- } = e, f = ln(In, n), [v, g] = m.useState(null), x = Be(t, (A) => g(A)), b = m.useRef(null), w = m.useRef(""), y = f.viewport, C = r.content - r.viewport, S = wt(d), T = wt(l), E = ia(p, 10);
16815
+ } = e, p = ln(In, n), [v, g] = m.useState(null), x = Be(t, (A) => g(A)), b = m.useRef(null), w = m.useRef(""), y = p.viewport, C = r.content - r.viewport, S = wt(d), T = wt(l), E = ia(f, 10);
16820
16816
  function N(A) {
16821
16817
  if (b.current) {
16822
16818
  const D = A.clientX - b.current.left, F = A.clientY - b.current.top;
@@ -16829,7 +16825,7 @@ var ck = m.forwardRef((e, t) => {
16829
16825
  (v == null ? void 0 : v.contains(F)) && S(D, C);
16830
16826
  };
16831
16827
  return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
16832
- }, [y, v, C, S]), m.useEffect(T, [r, T]), Pr(v, E), Pr(f.content, E), /* @__PURE__ */ u.jsx(
16828
+ }, [y, v, C, S]), m.useEffect(T, [r, T]), Pr(v, E), Pr(p.content, E), /* @__PURE__ */ u.jsx(
16833
16829
  pk,
16834
16830
  {
16835
16831
  scope: n,
@@ -16846,12 +16842,12 @@ var ck = m.forwardRef((e, t) => {
16846
16842
  ref: x,
16847
16843
  style: { position: "absolute", ...h.style },
16848
16844
  onPointerDown: se(e.onPointerDown, (A) => {
16849
- A.button === 0 && (A.target.setPointerCapture(A.pointerId), b.current = v.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", f.viewport && (f.viewport.style.scrollBehavior = "auto"), N(A));
16845
+ A.button === 0 && (A.target.setPointerCapture(A.pointerId), b.current = v.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), N(A));
16850
16846
  }),
16851
16847
  onPointerMove: se(e.onPointerMove, N),
16852
16848
  onPointerUp: se(e.onPointerUp, (A) => {
16853
16849
  const D = A.target;
16854
- D.hasPointerCapture(A.pointerId) && D.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = w.current, f.viewport && (f.viewport.style.scrollBehavior = ""), b.current = null;
16850
+ D.hasPointerCapture(A.pointerId) && D.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = w.current, p.viewport && (p.viewport.style.scrollBehavior = ""), b.current = null;
16855
16851
  })
16856
16852
  }
16857
16853
  )
@@ -16866,20 +16862,20 @@ var ck = m.forwardRef((e, t) => {
16866
16862
  (e, t) => {
16867
16863
  const { __scopeScrollArea: n, style: r, ...o } = e, s = ln(Rs, n), a = qh(Rs, n), { onThumbPositionChange: i } = a, l = Be(
16868
16864
  t,
16869
- (p) => a.onThumbChange(p)
16865
+ (f) => a.onThumbChange(f)
16870
16866
  ), c = m.useRef(void 0), d = ia(() => {
16871
16867
  c.current && (c.current(), c.current = void 0);
16872
16868
  }, 100);
16873
16869
  return m.useEffect(() => {
16874
- const p = s.viewport;
16875
- if (p) {
16870
+ const f = s.viewport;
16871
+ if (f) {
16876
16872
  const h = () => {
16877
16873
  if (d(), !c.current) {
16878
- const f = xk(p, i);
16879
- c.current = f, i();
16874
+ const p = xk(f, i);
16875
+ c.current = p, i();
16880
16876
  }
16881
16877
  };
16882
- return i(), p.addEventListener("scroll", h), () => p.removeEventListener("scroll", h);
16878
+ return i(), f.addEventListener("scroll", h), () => f.removeEventListener("scroll", h);
16883
16879
  }
16884
16880
  }, [s.viewport, d, i]), /* @__PURE__ */ u.jsx(
16885
16881
  ge.div,
@@ -16892,8 +16888,8 @@ var ck = m.forwardRef((e, t) => {
16892
16888
  height: "var(--radix-scroll-area-thumb-height)",
16893
16889
  ...r
16894
16890
  },
16895
- onPointerDownCapture: se(e.onPointerDownCapture, (p) => {
16896
- const f = p.target.getBoundingClientRect(), v = p.clientX - f.left, g = p.clientY - f.top;
16891
+ onPointerDownCapture: se(e.onPointerDownCapture, (f) => {
16892
+ const p = f.target.getBoundingClientRect(), v = f.clientX - p.left, g = f.clientY - p.top;
16897
16893
  a.onThumbPointerDown({ x: v, y: g });
16898
16894
  }),
16899
16895
  onPointerUp: se(e.onPointerUp, a.onThumbPointerUp)
@@ -16912,12 +16908,12 @@ Xh.displayName = $l;
16912
16908
  var mk = m.forwardRef((e, t) => {
16913
16909
  const { __scopeScrollArea: n, ...r } = e, o = ln($l, n), [s, a] = m.useState(0), [i, l] = m.useState(0), c = !!(s && i);
16914
16910
  return Pr(o.scrollbarX, () => {
16915
- var p;
16916
- const d = ((p = o.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
16911
+ var f;
16912
+ const d = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
16917
16913
  o.onCornerHeightChange(d), l(d);
16918
16914
  }), Pr(o.scrollbarY, () => {
16919
- var p;
16920
- const d = ((p = o.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
16915
+ var f;
16916
+ const d = ((f = o.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
16921
16917
  o.onCornerWidthChange(d), a(d);
16922
16918
  }), c ? /* @__PURE__ */ u.jsx(
16923
16919
  ge.div,
@@ -16948,8 +16944,8 @@ function aa(e) {
16948
16944
  return Math.max(r, 18);
16949
16945
  }
16950
16946
  function gk(e, t, n, r = "ltr") {
16951
- const o = aa(n), s = o / 2, a = t || s, i = o - a, l = n.scrollbar.paddingStart + a, c = n.scrollbar.size - n.scrollbar.paddingEnd - i, d = n.content - n.viewport, p = r === "ltr" ? [0, d] : [d * -1, 0];
16952
- return Zh([l, c], p)(e);
16947
+ const o = aa(n), s = o / 2, a = t || s, i = o - a, l = n.scrollbar.paddingStart + a, c = n.scrollbar.size - n.scrollbar.paddingEnd - i, d = n.content - n.viewport, f = r === "ltr" ? [0, d] : [d * -1, 0];
16948
+ return Zh([l, c], f)(e);
16953
16949
  }
16954
16950
  function Au(e, t, n = "ltr") {
16955
16951
  const r = aa(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - o, a = t.content - t.viewport, i = s - r, l = n === "ltr" ? [0, a] : [a * -1, 0], c = xi(e, l);
@@ -17052,9 +17048,9 @@ function Tk({
17052
17048
  onCancelEditing: l,
17053
17049
  onShare: c,
17054
17050
  onDelete: d,
17055
- showEditTitle: p,
17051
+ showEditTitle: f,
17056
17052
  showDeleteButton: h,
17057
- formatDate: f,
17053
+ formatDate: p,
17058
17054
  getDisplayThreadTitle: v,
17059
17055
  secondaryLine: g,
17060
17056
  itemClassName: x,
@@ -17098,7 +17094,7 @@ function Tk({
17098
17094
  /* @__PURE__ */ u.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: v(e) }),
17099
17095
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
17100
17096
  /* @__PURE__ */ u.jsx(nx, { size: 10 }),
17101
- /* @__PURE__ */ u.jsx("span", { children: f(e.updatedAt || e.createdAt) })
17097
+ /* @__PURE__ */ u.jsx("span", { children: p(e.updatedAt || e.createdAt) })
17102
17098
  ] }),
17103
17099
  g && /* @__PURE__ */ u.jsx("div", { className: "text-[11px] text-muted-foreground mt-1", children: g })
17104
17100
  ] }) }),
@@ -17117,7 +17113,7 @@ function Tk({
17117
17113
  ]
17118
17114
  }
17119
17115
  ),
17120
- p && n !== e.threadId && /* @__PURE__ */ u.jsxs(
17116
+ f && n !== e.threadId && /* @__PURE__ */ u.jsxs(
17121
17117
  nr,
17122
17118
  {
17123
17119
  onClick: (S) => {
@@ -17193,9 +17189,9 @@ function vi({
17193
17189
  onThreadSelect: l,
17194
17190
  onThreadCreate: c,
17195
17191
  onThreadDelete: d,
17196
- view: p,
17192
+ view: f,
17197
17193
  defaultView: h,
17198
- onViewChange: f,
17194
+ onViewChange: p,
17199
17195
  viewOptions: v,
17200
17196
  viewState: g,
17201
17197
  showHeader: x = !0,
@@ -17214,11 +17210,11 @@ function vi({
17214
17210
  shareInFlight: F,
17215
17211
  shareStatus: U,
17216
17212
  clearShareStatus: q
17217
- } = Eo(), { createThread: I, deleteThread: G, renameThread: K, shareThread: z } = D, { loadThread: _ } = $s(), k = a ?? T, [H, V] = fe(Array.isArray(C) ? C : []), j = Oe(H.length > 0), M = Oe(null), P = Oe(0), [L, Q] = fe(null), [B, $] = fe(""), [Z, Y] = fe(!1), [ee, X] = fe(!1), [ae, xe] = fe(null), [ue, me] = fe(""), Se = v && v.length > 0 ? v : Rk, Ce = kk({ defaultView: h }), Ae = g ?? Ce, ht = p ?? Ae.view, ut = ie(
17213
+ } = Eo(), { createThread: I, deleteThread: G, renameThread: K, shareThread: z } = D, { loadThread: _ } = $s(), k = a ?? T, [H, V] = fe(Array.isArray(C) ? C : []), j = Oe(H.length > 0), M = Oe(null), P = Oe(0), [L, Q] = fe(null), [B, $] = fe(""), [Z, Y] = fe(!1), [ee, X] = fe(!1), [ae, xe] = fe(null), [ue, me] = fe(""), Se = v && v.length > 0 ? v : Rk, Ce = kk({ defaultView: h }), Ae = g ?? Ce, ht = f ?? Ae.view, ut = ie(
17218
17214
  (J) => {
17219
- p || Ae.setView(J), f == null || f(J);
17215
+ f || Ae.setView(J), p == null || p(J);
17220
17216
  },
17221
- [p, f, Ae]
17217
+ [f, p, Ae]
17222
17218
  ), He = Se.find((J) => J.key === ht) ?? Se[0], ze = (J) => {
17223
17219
  xe(J), me(""), X(!0);
17224
17220
  }, De = () => {
@@ -17726,9 +17722,9 @@ var Pk = la, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], d
17726
17722
  onValueChange: l,
17727
17723
  dir: c,
17728
17724
  name: d,
17729
- autoComplete: p,
17725
+ autoComplete: f,
17730
17726
  disabled: h,
17731
- required: f,
17727
+ required: p,
17732
17728
  form: v
17733
17729
  } = e, g = da(t), [x, b] = m.useState(null), [w, y] = m.useState(null), [C, S] = m.useState(!1), T = Bs(c), [E, N] = Dn({
17734
17730
  prop: r,
@@ -17744,7 +17740,7 @@ var Pk = la, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], d
17744
17740
  return /* @__PURE__ */ u.jsx(Xi, { ...g, children: /* @__PURE__ */ u.jsxs(
17745
17741
  Lk,
17746
17742
  {
17747
- required: f,
17743
+ required: p,
17748
17744
  scope: t,
17749
17745
  trigger: x,
17750
17746
  onTriggerChange: b,
@@ -17781,10 +17777,10 @@ var Pk = la, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], d
17781
17777
  Pm,
17782
17778
  {
17783
17779
  "aria-hidden": !0,
17784
- required: f,
17780
+ required: p,
17785
17781
  tabIndex: -1,
17786
17782
  name: d,
17787
- autoComplete: p,
17783
+ autoComplete: f,
17788
17784
  value: A,
17789
17785
  onChange: (K) => D(K.target.value),
17790
17786
  disabled: h,
@@ -17803,11 +17799,11 @@ var Pk = la, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], d
17803
17799
  cm.displayName = dr;
17804
17800
  var um = "SelectTrigger", dm = m.forwardRef(
17805
17801
  (e, t) => {
17806
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = da(n), a = Kn(um, n), i = a.disabled || r, l = Be(t, a.onTriggerChange), c = ua(n), d = m.useRef("touch"), [p, h, f] = Om((g) => {
17802
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = da(n), a = Kn(um, n), i = a.disabled || r, l = Be(t, a.onTriggerChange), c = ua(n), d = m.useRef("touch"), [f, h, p] = Om((g) => {
17807
17803
  const x = c().filter((y) => !y.disabled), b = x.find((y) => y.value === a.value), w = Dm(x, g, b);
17808
17804
  w !== void 0 && a.onValueChange(w.value);
17809
17805
  }), v = (g) => {
17810
- i || (a.onOpenChange(!0), f()), g && (a.triggerPointerDownPosRef.current = {
17806
+ i || (a.onOpenChange(!0), p()), g && (a.triggerPointerDownPosRef.current = {
17811
17807
  x: Math.round(g.pageX),
17812
17808
  y: Math.round(g.pageY)
17813
17809
  });
@@ -17837,7 +17833,7 @@ var um = "SelectTrigger", dm = m.forwardRef(
17837
17833
  x.hasPointerCapture(g.pointerId) && x.releasePointerCapture(g.pointerId), g.button === 0 && g.ctrlKey === !1 && g.pointerType === "mouse" && (v(g), g.preventDefault());
17838
17834
  }),
17839
17835
  onKeyDown: se(o.onKeyDown, (g) => {
17840
- const x = p.current !== "";
17836
+ const x = f.current !== "";
17841
17837
  !(g.ctrlKey || g.altKey || g.metaKey) && g.key.length === 1 && h(g.key), !(x && g.key === " ") && Mk.includes(g.key) && (v(), g.preventDefault());
17842
17838
  })
17843
17839
  }
@@ -17847,14 +17843,14 @@ var um = "SelectTrigger", dm = m.forwardRef(
17847
17843
  dm.displayName = um;
17848
17844
  var fm = "SelectValue", pm = m.forwardRef(
17849
17845
  (e, t) => {
17850
- const { __scopeSelect: n, className: r, style: o, children: s, placeholder: a = "", ...i } = e, l = Kn(fm, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, p = Be(t, l.onValueNodeChange);
17846
+ const { __scopeSelect: n, className: r, style: o, children: s, placeholder: a = "", ...i } = e, l = Kn(fm, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, f = Be(t, l.onValueNodeChange);
17851
17847
  return Nt(() => {
17852
17848
  c(d);
17853
17849
  }, [c, d]), /* @__PURE__ */ u.jsx(
17854
17850
  ge.span,
17855
17851
  {
17856
17852
  ...i,
17857
- ref: p,
17853
+ ref: f,
17858
17854
  style: { pointerEvents: "none" },
17859
17855
  children: Mm(l.value) ? /* @__PURE__ */ u.jsx(u.Fragment, { children: a }) : s
17860
17856
  }
@@ -17901,9 +17897,9 @@ var un = 10, [xm, qn] = Vr(fr), Hk = "SelectContentImpl", Uk = Ir("SelectContent
17901
17897
  sideOffset: l,
17902
17898
  align: c,
17903
17899
  alignOffset: d,
17904
- arrowPadding: p,
17900
+ arrowPadding: f,
17905
17901
  collisionBoundary: h,
17906
- collisionPadding: f,
17902
+ collisionPadding: p,
17907
17903
  sticky: v,
17908
17904
  hideWhenDetached: g,
17909
17905
  avoidCollisions: x,
@@ -17972,9 +17968,9 @@ var un = 10, [xm, qn] = Vr(fr), Hk = "SelectContentImpl", Uk = Ir("SelectContent
17972
17968
  sideOffset: l,
17973
17969
  align: c,
17974
17970
  alignOffset: d,
17975
- arrowPadding: p,
17971
+ arrowPadding: f,
17976
17972
  collisionBoundary: h,
17977
- collisionPadding: f,
17973
+ collisionPadding: p,
17978
17974
  sticky: v,
17979
17975
  hideWhenDetached: g,
17980
17976
  avoidCollisions: x
@@ -18059,7 +18055,7 @@ var un = 10, [xm, qn] = Vr(fr), Hk = "SelectContentImpl", Uk = Ir("SelectContent
18059
18055
  );
18060
18056
  vm.displayName = Hk;
18061
18057
  var Wk = "SelectItemAlignedPosition", wm = m.forwardRef((e, t) => {
18062
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Kn(fr, n), a = qn(fr, n), [i, l] = m.useState(null), [c, d] = m.useState(null), p = Be(t, (E) => d(E)), h = ua(n), f = m.useRef(!1), v = m.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = m.useCallback(() => {
18058
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Kn(fr, n), a = qn(fr, n), [i, l] = m.useState(null), [c, d] = m.useState(null), f = Be(t, (E) => d(E)), h = ua(n), p = m.useRef(!1), v = m.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = m.useCallback(() => {
18063
18059
  if (s.trigger && s.valueNode && i && c && g && x && b) {
18064
18060
  const E = s.trigger.getBoundingClientRect(), N = c.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), D = b.getBoundingClientRect();
18065
18061
  if (s.dir !== "rtl") {
@@ -18100,7 +18096,7 @@ var Wk = "SelectItemAlignedPosition", wm = m.forwardRef((e, t) => {
18100
18096
  ) + Z;
18101
18097
  i.style.height = ae + "px", g.scrollTop = $ - P + g.offsetTop;
18102
18098
  }
18103
- i.style.margin = `${un}px 0`, i.style.minHeight = H + "px", i.style.maxHeight = U + "px", r == null || r(), requestAnimationFrame(() => f.current = !0);
18099
+ i.style.margin = `${un}px 0`, i.style.minHeight = H + "px", i.style.maxHeight = U + "px", r == null || r(), requestAnimationFrame(() => p.current = !0);
18104
18100
  }
18105
18101
  }, [
18106
18102
  h,
@@ -18130,7 +18126,7 @@ var Wk = "SelectItemAlignedPosition", wm = m.forwardRef((e, t) => {
18130
18126
  {
18131
18127
  scope: n,
18132
18128
  contentWrapper: i,
18133
- shouldExpandOnScrollRef: f,
18129
+ shouldExpandOnScrollRef: p,
18134
18130
  onScrollButtonChange: T,
18135
18131
  children: /* @__PURE__ */ u.jsx(
18136
18132
  "div",
@@ -18146,7 +18142,7 @@ var Wk = "SelectItemAlignedPosition", wm = m.forwardRef((e, t) => {
18146
18142
  ge.div,
18147
18143
  {
18148
18144
  ...o,
18149
- ref: p,
18145
+ ref: f,
18150
18146
  style: {
18151
18147
  // When we get the height of the content, it includes borders. If we were to set
18152
18148
  // the height without having `boxSizing: 'border-box'` it would be too big.
@@ -18226,14 +18222,14 @@ var [Kk, Fl] = Vr(fr, {}), bi = "SelectViewport", bm = m.forwardRef(
18226
18222
  ...o.style
18227
18223
  },
18228
18224
  onScroll: se(o.onScroll, (c) => {
18229
- const d = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: h } = a;
18230
- if (h != null && h.current && p) {
18231
- const f = Math.abs(l.current - d.scrollTop);
18232
- if (f > 0) {
18233
- const v = window.innerHeight - un * 2, g = parseFloat(p.style.minHeight), x = parseFloat(p.style.height), b = Math.max(g, x);
18225
+ const d = c.currentTarget, { contentWrapper: f, shouldExpandOnScrollRef: h } = a;
18226
+ if (h != null && h.current && f) {
18227
+ const p = Math.abs(l.current - d.scrollTop);
18228
+ if (p > 0) {
18229
+ const v = window.innerHeight - un * 2, g = parseFloat(f.style.minHeight), x = parseFloat(f.style.height), b = Math.max(g, x);
18234
18230
  if (b < v) {
18235
- const w = b + f, y = Math.min(v, w), C = w - y;
18236
- p.style.height = y + "px", p.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
18231
+ const w = b + p, y = Math.min(v, w), C = w - y;
18232
+ f.style.height = y + "px", f.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, f.style.justifyContent = "flex-end");
18237
18233
  }
18238
18234
  }
18239
18235
  }
@@ -18267,7 +18263,7 @@ var Ns = "SelectItem", [Xk, Cm] = Vr(Ns), Em = m.forwardRef(
18267
18263
  disabled: o = !1,
18268
18264
  textValue: s,
18269
18265
  ...a
18270
- } = e, i = Kn(Ns, n), l = qn(Ns, n), c = i.value === r, [d, p] = m.useState(s ?? ""), [h, f] = m.useState(!1), v = Be(
18266
+ } = e, i = Kn(Ns, n), l = qn(Ns, n), c = i.value === r, [d, f] = m.useState(s ?? ""), [h, p] = m.useState(!1), v = Be(
18271
18267
  t,
18272
18268
  (w) => {
18273
18269
  var y;
@@ -18289,7 +18285,7 @@ var Ns = "SelectItem", [Xk, Cm] = Vr(Ns), Em = m.forwardRef(
18289
18285
  textId: g,
18290
18286
  isSelected: c,
18291
18287
  onItemTextChange: m.useCallback((w) => {
18292
- p((y) => y || ((w == null ? void 0 : w.textContent) ?? "").trim());
18288
+ f((y) => y || ((w == null ? void 0 : w.textContent) ?? "").trim());
18293
18289
  }, []),
18294
18290
  children: /* @__PURE__ */ u.jsx(
18295
18291
  ca.ItemSlot,
@@ -18311,8 +18307,8 @@ var Ns = "SelectItem", [Xk, Cm] = Vr(Ns), Em = m.forwardRef(
18311
18307
  tabIndex: o ? void 0 : -1,
18312
18308
  ...a,
18313
18309
  ref: v,
18314
- onFocus: se(a.onFocus, () => f(!0)),
18315
- onBlur: se(a.onBlur, () => f(!1)),
18310
+ onFocus: se(a.onFocus, () => p(!0)),
18311
+ onBlur: se(a.onBlur, () => p(!1)),
18316
18312
  onClick: se(a.onClick, () => {
18317
18313
  x.current !== "mouse" && b();
18318
18314
  }),
@@ -18345,17 +18341,17 @@ var Ns = "SelectItem", [Xk, Cm] = Vr(Ns), Em = m.forwardRef(
18345
18341
  Em.displayName = Ns;
18346
18342
  var Qr = "SelectItemText", km = m.forwardRef(
18347
18343
  (e, t) => {
18348
- const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Kn(Qr, n), i = qn(Qr, n), l = Cm(Qr, n), c = Fk(Qr, n), [d, p] = m.useState(null), h = Be(
18344
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Kn(Qr, n), i = qn(Qr, n), l = Cm(Qr, n), c = Fk(Qr, n), [d, f] = m.useState(null), h = Be(
18349
18345
  t,
18350
- (b) => p(b),
18346
+ (b) => f(b),
18351
18347
  l.onItemTextChange,
18352
18348
  (b) => {
18353
18349
  var w;
18354
18350
  return (w = i.itemTextRefCallback) == null ? void 0 : w.call(i, b, l.value, l.disabled);
18355
18351
  }
18356
- ), f = d == null ? void 0 : d.textContent, v = m.useMemo(
18357
- () => /* @__PURE__ */ u.jsx("option", { value: l.value, disabled: l.disabled, children: f }, l.value),
18358
- [l.disabled, l.value, f]
18352
+ ), p = d == null ? void 0 : d.textContent, v = m.useMemo(
18353
+ () => /* @__PURE__ */ u.jsx("option", { value: l.value, disabled: l.disabled, children: p }, l.value),
18354
+ [l.disabled, l.value, p]
18359
18355
  ), { onNativeOptionAdd: g, onNativeOptionRemove: x } = c;
18360
18356
  return Nt(() => (g(v), () => x(v)), [g, x, v]), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
18361
18357
  /* @__PURE__ */ u.jsx(ge.span, { id: l.textId, ...s, ref: h }),
@@ -18425,7 +18421,7 @@ var jm = m.forwardRef((e, t) => {
18425
18421
  }, []);
18426
18422
  return m.useEffect(() => () => l(), [l]), Nt(() => {
18427
18423
  var d;
18428
- const c = i().find((p) => p.ref.current === document.activeElement);
18424
+ const c = i().find((f) => f.ref.current === document.activeElement);
18429
18425
  (d = c == null ? void 0 : c.ref.current) == null || d.scrollIntoView({ block: "nearest" });
18430
18426
  }, [i]), /* @__PURE__ */ u.jsx(
18431
18427
  ge.div,
@@ -18471,8 +18467,8 @@ var Qk = "SelectBubbleInput", Pm = m.forwardRef(
18471
18467
  "value"
18472
18468
  ).set;
18473
18469
  if (a !== t && d) {
18474
- const p = new Event("change", { bubbles: !0 });
18475
- d.call(i, t), i.dispatchEvent(p);
18470
+ const f = new Event("change", { bubbles: !0 });
18471
+ d.call(i, t), i.dispatchEvent(f);
18476
18472
  }
18477
18473
  }, [a, t]), /* @__PURE__ */ u.jsx(
18478
18474
  ge.select,
@@ -18666,8 +18662,8 @@ var fa = "Switch", [xR, BN] = gn(fa), [vR, wR] = xR(fa), Gm = m.forwardRef(
18666
18662
  value: l = "on",
18667
18663
  onCheckedChange: c,
18668
18664
  form: d,
18669
- ...p
18670
- } = e, [h, f] = m.useState(null), v = Be(t, (y) => f(y)), g = m.useRef(!1), x = h ? d || !!h.closest("form") : !0, [b, w] = Dn({
18665
+ ...f
18666
+ } = e, [h, p] = m.useState(null), v = Be(t, (y) => p(y)), g = m.useRef(!1), x = h ? d || !!h.closest("form") : !0, [b, w] = Dn({
18671
18667
  prop: o,
18672
18668
  defaultProp: s ?? !1,
18673
18669
  onChange: c,
@@ -18685,7 +18681,7 @@ var fa = "Switch", [xR, BN] = gn(fa), [vR, wR] = xR(fa), Gm = m.forwardRef(
18685
18681
  "data-disabled": i ? "" : void 0,
18686
18682
  disabled: i,
18687
18683
  value: l,
18688
- ...p,
18684
+ ...f,
18689
18685
  ref: v,
18690
18686
  onClick: se(e.onClick, (y) => {
18691
18687
  w((C) => !C), x && (g.current = y.isPropagationStopped(), g.current || y.stopPropagation());
@@ -18737,13 +18733,13 @@ var bR = "SwitchBubbleInput", Jm = m.forwardRef(
18737
18733
  return m.useEffect(() => {
18738
18734
  const d = a.current;
18739
18735
  if (!d) return;
18740
- const p = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(
18741
- p,
18736
+ const f = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(
18737
+ f,
18742
18738
  "checked"
18743
18739
  ).set;
18744
- if (l !== n && f) {
18740
+ if (l !== n && p) {
18745
18741
  const v = new Event("click", { bubbles: r });
18746
- f.call(d, n), d.dispatchEvent(v);
18742
+ p.call(d, n), d.dispatchEvent(v);
18747
18743
  }
18748
18744
  }, [l, n, r]), /* @__PURE__ */ u.jsx(
18749
18745
  "input",
@@ -18916,7 +18912,7 @@ var go = "Tooltip", [jR, ma] = pa(go), rg = (e) => {
18916
18912
  onOpenChange: s,
18917
18913
  disableHoverableContent: a,
18918
18914
  delayDuration: i
18919
- } = e, l = Bl(go, e.__scopeTooltip), c = ha(t), [d, p] = m.useState(null), h = Lt(), f = m.useRef(0), v = a ?? l.disableHoverableContent, g = i ?? l.delayDuration, x = m.useRef(!1), [b, w] = Dn({
18915
+ } = e, l = Bl(go, e.__scopeTooltip), c = ha(t), [d, f] = m.useState(null), h = Lt(), p = m.useRef(0), v = a ?? l.disableHoverableContent, g = i ?? l.delayDuration, x = m.useRef(!1), [b, w] = Dn({
18920
18916
  prop: r,
18921
18917
  defaultProp: o ?? !1,
18922
18918
  onChange: (E) => {
@@ -18924,16 +18920,16 @@ var go = "Tooltip", [jR, ma] = pa(go), rg = (e) => {
18924
18920
  },
18925
18921
  caller: go
18926
18922
  }), y = m.useMemo(() => b ? x.current ? "delayed-open" : "instant-open" : "closed", [b]), C = m.useCallback(() => {
18927
- window.clearTimeout(f.current), f.current = 0, x.current = !1, w(!0);
18923
+ window.clearTimeout(p.current), p.current = 0, x.current = !1, w(!0);
18928
18924
  }, [w]), S = m.useCallback(() => {
18929
- window.clearTimeout(f.current), f.current = 0, w(!1);
18925
+ window.clearTimeout(p.current), p.current = 0, w(!1);
18930
18926
  }, [w]), T = m.useCallback(() => {
18931
- window.clearTimeout(f.current), f.current = window.setTimeout(() => {
18932
- x.current = !0, w(!0), f.current = 0;
18927
+ window.clearTimeout(p.current), p.current = window.setTimeout(() => {
18928
+ x.current = !0, w(!0), p.current = 0;
18933
18929
  }, g);
18934
18930
  }, [g, w]);
18935
18931
  return m.useEffect(() => () => {
18936
- f.current && (window.clearTimeout(f.current), f.current = 0);
18932
+ p.current && (window.clearTimeout(p.current), p.current = 0);
18937
18933
  }, []), /* @__PURE__ */ u.jsx(Xi, { ...c, children: /* @__PURE__ */ u.jsx(
18938
18934
  jR,
18939
18935
  {
@@ -18942,12 +18938,12 @@ var go = "Tooltip", [jR, ma] = pa(go), rg = (e) => {
18942
18938
  open: b,
18943
18939
  stateAttribute: y,
18944
18940
  trigger: d,
18945
- onTriggerChange: p,
18941
+ onTriggerChange: f,
18946
18942
  onTriggerEnter: m.useCallback(() => {
18947
18943
  l.isOpenDelayedRef.current ? T() : C();
18948
18944
  }, [l.isOpenDelayedRef, T, C]),
18949
18945
  onTriggerLeave: m.useCallback(() => {
18950
- v ? S() : (window.clearTimeout(f.current), f.current = 0);
18946
+ v ? S() : (window.clearTimeout(p.current), p.current = 0);
18951
18947
  }, [S, v]),
18952
18948
  onOpen: C,
18953
18949
  onClose: S,
@@ -18959,8 +18955,8 @@ var go = "Tooltip", [jR, ma] = pa(go), rg = (e) => {
18959
18955
  rg.displayName = go;
18960
18956
  var Ei = "TooltipTrigger", og = m.forwardRef(
18961
18957
  (e, t) => {
18962
- const { __scopeTooltip: n, ...r } = e, o = ma(Ei, n), s = Bl(Ei, n), a = ha(n), i = m.useRef(null), l = Be(t, i, o.onTriggerChange), c = m.useRef(!1), d = m.useRef(!1), p = m.useCallback(() => c.current = !1, []);
18963
- return m.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ u.jsx(Ji, { asChild: !0, ...a, children: /* @__PURE__ */ u.jsx(
18958
+ const { __scopeTooltip: n, ...r } = e, o = ma(Ei, n), s = Bl(Ei, n), a = ha(n), i = m.useRef(null), l = Be(t, i, o.onTriggerChange), c = m.useRef(!1), d = m.useRef(!1), f = m.useCallback(() => c.current = !1, []);
18959
+ return m.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ u.jsx(Ji, { asChild: !0, ...a, children: /* @__PURE__ */ u.jsx(
18964
18960
  ge.button,
18965
18961
  {
18966
18962
  "aria-describedby": o.open ? o.contentId : void 0,
@@ -18974,7 +18970,7 @@ var Ei = "TooltipTrigger", og = m.forwardRef(
18974
18970
  o.onTriggerLeave(), d.current = !1;
18975
18971
  }),
18976
18972
  onPointerDown: se(e.onPointerDown, () => {
18977
- o.open && o.onClose(), c.current = !0, document.addEventListener("pointerup", p, { once: !0 });
18973
+ o.open && o.onClose(), c.current = !0, document.addEventListener("pointerup", f, { once: !0 });
18978
18974
  }),
18979
18975
  onFocus: se(e.onFocus, () => {
18980
18976
  c.current || o.onOpen();
@@ -18994,23 +18990,23 @@ var _R = "TooltipPortal", [WN, PR] = pa(_R, {
18994
18990
  return /* @__PURE__ */ u.jsx(Gt, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ u.jsx(ag, { side: o, ...s, ref: t }) : /* @__PURE__ */ u.jsx(MR, { side: o, ...s, ref: t }) });
18995
18991
  }
18996
18992
  ), MR = m.forwardRef((e, t) => {
18997
- const n = ma(Mr, e.__scopeTooltip), r = Bl(Mr, e.__scopeTooltip), o = m.useRef(null), s = Be(t, o), [a, i] = m.useState(null), { trigger: l, onClose: c } = n, d = o.current, { onPointerInTransitChange: p } = r, h = m.useCallback(() => {
18998
- i(null), p(!1);
18999
- }, [p]), f = m.useCallback(
18993
+ const n = ma(Mr, e.__scopeTooltip), r = Bl(Mr, e.__scopeTooltip), o = m.useRef(null), s = Be(t, o), [a, i] = m.useState(null), { trigger: l, onClose: c } = n, d = o.current, { onPointerInTransitChange: f } = r, h = m.useCallback(() => {
18994
+ i(null), f(!1);
18995
+ }, [f]), p = m.useCallback(
19000
18996
  (v, g) => {
19001
18997
  const x = v.currentTarget, b = { x: v.clientX, y: v.clientY }, w = FR(b, x.getBoundingClientRect()), y = BR(b, w), C = zR(g.getBoundingClientRect()), S = UR([...y, ...C]);
19002
- i(S), p(!0);
18998
+ i(S), f(!0);
19003
18999
  },
19004
- [p]
19000
+ [f]
19005
19001
  );
19006
19002
  return m.useEffect(() => () => h(), [h]), m.useEffect(() => {
19007
19003
  if (l && d) {
19008
- const v = (x) => f(x, d), g = (x) => f(x, l);
19004
+ const v = (x) => p(x, d), g = (x) => p(x, l);
19009
19005
  return l.addEventListener("pointerleave", v), d.addEventListener("pointerleave", g), () => {
19010
19006
  l.removeEventListener("pointerleave", v), d.removeEventListener("pointerleave", g);
19011
19007
  };
19012
19008
  }
19013
- }, [l, d, f, h]), m.useEffect(() => {
19009
+ }, [l, d, p, h]), m.useEffect(() => {
19014
19010
  if (a) {
19015
19011
  const v = (g) => {
19016
19012
  const x = g.target, b = { x: g.clientX, y: g.clientY }, w = (l == null ? void 0 : l.contains(x)) || (d == null ? void 0 : d.contains(x)), y = !HR(b, a);
@@ -19031,11 +19027,11 @@ var _R = "TooltipPortal", [WN, PR] = pa(_R, {
19031
19027
  } = e, l = ma(Mr, n), c = ha(n), { onClose: d } = l;
19032
19028
  return m.useEffect(() => (document.addEventListener(Ci, d), () => document.removeEventListener(Ci, d)), [d]), m.useEffect(() => {
19033
19029
  if (l.trigger) {
19034
- const p = (h) => {
19035
- const f = h.target;
19036
- f != null && f.contains(l.trigger) && d();
19030
+ const f = (h) => {
19031
+ const p = h.target;
19032
+ p != null && p.contains(l.trigger) && d();
19037
19033
  };
19038
- return window.addEventListener("scroll", p, { capture: !0 }), () => window.removeEventListener("scroll", p, { capture: !0 });
19034
+ return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
19039
19035
  }
19040
19036
  }, [l.trigger, d]), /* @__PURE__ */ u.jsx(
19041
19037
  Fr,
@@ -19044,7 +19040,7 @@ var _R = "TooltipPortal", [WN, PR] = pa(_R, {
19044
19040
  disableOutsidePointerEvents: !1,
19045
19041
  onEscapeKeyDown: s,
19046
19042
  onPointerDownOutside: a,
19047
- onFocusOutside: (p) => p.preventDefault(),
19043
+ onFocusOutside: (f) => f.preventDefault(),
19048
19044
  onDismiss: d,
19049
19045
  children: /* @__PURE__ */ u.jsxs(
19050
19046
  Zi,
@@ -19140,8 +19136,8 @@ function HR(e, t) {
19140
19136
  const { x: n, y: r } = e;
19141
19137
  let o = !1;
19142
19138
  for (let s = 0, a = t.length - 1; s < t.length; a = s++) {
19143
- const i = t[s], l = t[a], c = i.x, d = i.y, p = l.x, h = l.y;
19144
- d > r != h > r && n < (p - c) * (r - d) / (h - d) + c && (o = !o);
19139
+ const i = t[s], l = t[a], c = i.x, d = i.y, f = l.x, h = l.y;
19140
+ d > r != h > r && n < (f - c) * (r - d) / (h - d) + c && (o = !o);
19145
19141
  }
19146
19142
  return o;
19147
19143
  }
@@ -19196,7 +19192,7 @@ var zl = "ToastProvider", [Hl, YR, XR] = Fs("Toast"), [cg, GN] = gn("Toast", [XR
19196
19192
  swipeDirection: o = "right",
19197
19193
  swipeThreshold: s = 50,
19198
19194
  children: a
19199
- } = e, [i, l] = m.useState(null), [c, d] = m.useState(0), p = m.useRef(!1), h = m.useRef(!1);
19195
+ } = e, [i, l] = m.useState(null), [c, d] = m.useState(0), f = m.useRef(!1), h = m.useRef(!1);
19200
19196
  return n.trim() || console.error(
19201
19197
  `Invalid prop \`label\` supplied to \`${zl}\`. Expected non-empty \`string\`.`
19202
19198
  ), /* @__PURE__ */ u.jsx(Hl.Provider, { scope: t, children: /* @__PURE__ */ u.jsx(
@@ -19210,9 +19206,9 @@ var zl = "ToastProvider", [Hl, YR, XR] = Fs("Toast"), [cg, GN] = gn("Toast", [XR
19210
19206
  toastCount: c,
19211
19207
  viewport: i,
19212
19208
  onViewportChange: l,
19213
- onToastAdd: m.useCallback(() => d((f) => f + 1), []),
19214
- onToastRemove: m.useCallback(() => d((f) => f - 1), []),
19215
- isFocusedToastEscapeKeyDownRef: p,
19209
+ onToastAdd: m.useCallback(() => d((p) => p + 1), []),
19210
+ onToastRemove: m.useCallback(() => d((p) => p - 1), []),
19211
+ isFocusedToastEscapeKeyDownRef: f,
19216
19212
  isClosePausedRef: h,
19217
19213
  children: a
19218
19214
  }
@@ -19226,15 +19222,15 @@ var dg = "ToastViewport", ZR = ["F8"], ki = "toast.viewportPause", Ri = "toast.v
19226
19222
  hotkey: r = ZR,
19227
19223
  label: o = "Notifications ({hotkey})",
19228
19224
  ...s
19229
- } = e, a = ga(dg, n), i = YR(n), l = m.useRef(null), c = m.useRef(null), d = m.useRef(null), p = m.useRef(null), h = Be(t, p, a.onViewportChange), f = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), v = a.toastCount > 0;
19225
+ } = e, a = ga(dg, n), i = YR(n), l = m.useRef(null), c = m.useRef(null), d = m.useRef(null), f = m.useRef(null), h = Be(t, f, a.onViewportChange), p = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), v = a.toastCount > 0;
19230
19226
  m.useEffect(() => {
19231
19227
  const x = (b) => {
19232
19228
  var y;
19233
- r.length !== 0 && r.every((C) => b[C] || b.code === C) && ((y = p.current) == null || y.focus());
19229
+ r.length !== 0 && r.every((C) => b[C] || b.code === C) && ((y = f.current) == null || y.focus());
19234
19230
  };
19235
19231
  return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
19236
19232
  }, [r]), m.useEffect(() => {
19237
- const x = l.current, b = p.current;
19233
+ const x = l.current, b = f.current;
19238
19234
  if (v && x && b) {
19239
19235
  const w = () => {
19240
19236
  if (!a.isClosePausedRef.current) {
@@ -19267,7 +19263,7 @@ var dg = "ToastViewport", ZR = ["F8"], ki = "toast.viewportPause", Ri = "toast.v
19267
19263
  [i]
19268
19264
  );
19269
19265
  return m.useEffect(() => {
19270
- const x = p.current;
19266
+ const x = f.current;
19271
19267
  if (x) {
19272
19268
  const b = (w) => {
19273
19269
  var S, T, E;
@@ -19289,7 +19285,7 @@ var dg = "ToastViewport", ZR = ["F8"], ki = "toast.viewportPause", Ri = "toast.v
19289
19285
  {
19290
19286
  ref: l,
19291
19287
  role: "region",
19292
- "aria-label": o.replace("{hotkey}", f),
19288
+ "aria-label": o.replace("{hotkey}", p),
19293
19289
  tabIndex: -1,
19294
19290
  style: { pointerEvents: v ? void 0 : "none" },
19295
19291
  children: [
@@ -19365,15 +19361,15 @@ var $o = "Toast", QR = "toast.swipeStart", eI = "toast.swipeMove", tI = "toast.s
19365
19361
  c.currentTarget.setAttribute("data-swipe", "start");
19366
19362
  }),
19367
19363
  onSwipeMove: se(e.onSwipeMove, (c) => {
19368
- const { x: d, y: p } = c.detail.delta;
19369
- c.currentTarget.setAttribute("data-swipe", "move"), c.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${d}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${p}px`);
19364
+ const { x: d, y: f } = c.detail.delta;
19365
+ c.currentTarget.setAttribute("data-swipe", "move"), c.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${d}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${f}px`);
19370
19366
  }),
19371
19367
  onSwipeCancel: se(e.onSwipeCancel, (c) => {
19372
19368
  c.currentTarget.setAttribute("data-swipe", "cancel"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
19373
19369
  }),
19374
19370
  onSwipeEnd: se(e.onSwipeEnd, (c) => {
19375
- const { x: d, y: p } = c.detail.delta;
19376
- c.currentTarget.setAttribute("data-swipe", "end"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${d}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${p}px`), l(!1);
19371
+ const { x: d, y: f } = c.detail.delta;
19372
+ c.currentTarget.setAttribute("data-swipe", "end"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${d}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${f}px`), l(!1);
19377
19373
  })
19378
19374
  }
19379
19375
  ) });
@@ -19395,9 +19391,9 @@ var [rI, oI] = cg($o, {
19395
19391
  onPause: l,
19396
19392
  onResume: c,
19397
19393
  onSwipeStart: d,
19398
- onSwipeMove: p,
19394
+ onSwipeMove: f,
19399
19395
  onSwipeCancel: h,
19400
- onSwipeEnd: f,
19396
+ onSwipeEnd: p,
19401
19397
  ...v
19402
19398
  } = e, g = ga($o, n), [x, b] = m.useState(null), w = Be(t, (I) => b(I)), y = m.useRef(null), C = m.useRef(null), S = o || g.duration, T = m.useRef(0), E = m.useRef(S), N = m.useRef(0), { onToastAdd: A, onToastRemove: D } = g, F = wt(() => {
19403
19399
  var G;
@@ -19461,7 +19457,7 @@ var [rI, oI] = cg($o, {
19461
19457
  onPointerMove: se(e.onPointerMove, (I) => {
19462
19458
  if (!y.current) return;
19463
19459
  const G = I.clientX - y.current.x, K = I.clientY - y.current.y, z = !!C.current, _ = ["left", "right"].includes(g.swipeDirection), k = ["left", "up"].includes(g.swipeDirection) ? Math.min : Math.max, H = _ ? k(0, G) : 0, V = _ ? 0 : k(0, K), j = I.pointerType === "touch" ? 10 : 2, M = { x: H, y: V }, P = { originalEvent: I, delta: M };
19464
- z ? (C.current = M, Yo(eI, p, P, {
19460
+ z ? (C.current = M, Yo(eI, f, P, {
19465
19461
  discrete: !1
19466
19462
  })) : Pu(M, g.swipeDirection, j) ? (C.current = M, Yo(QR, d, P, {
19467
19463
  discrete: !1
@@ -19471,7 +19467,7 @@ var [rI, oI] = cg($o, {
19471
19467
  const G = C.current, K = I.target;
19472
19468
  if (K.hasPointerCapture(I.pointerId) && K.releasePointerCapture(I.pointerId), C.current = null, y.current = null, G) {
19473
19469
  const z = I.currentTarget, _ = { originalEvent: I, delta: G };
19474
- Pu(G, g.swipeDirection, g.swipeThreshold) ? Yo(nI, f, _, {
19470
+ Pu(G, g.swipeDirection, g.swipeThreshold) ? Yo(nI, p, _, {
19475
19471
  discrete: !0
19476
19472
  }) : Yo(
19477
19473
  tI,
@@ -19699,21 +19695,21 @@ function YN() {
19699
19695
  }
19700
19696
  var gI = (e, t, n, r, o, s, a, i) => {
19701
19697
  let l = document.documentElement, c = ["light", "dark"];
19702
- function d(f) {
19698
+ function d(p) {
19703
19699
  (Array.isArray(e) ? e : [e]).forEach((v) => {
19704
19700
  let g = v === "class", x = g && s ? o.map((b) => s[b] || b) : o;
19705
- g ? (l.classList.remove(...x), l.classList.add(s && s[f] ? s[f] : f)) : l.setAttribute(v, f);
19706
- }), p(f);
19701
+ g ? (l.classList.remove(...x), l.classList.add(s && s[p] ? s[p] : p)) : l.setAttribute(v, p);
19702
+ }), f(p);
19707
19703
  }
19708
- function p(f) {
19709
- i && c.includes(f) && (l.style.colorScheme = f);
19704
+ function f(p) {
19705
+ i && c.includes(p) && (l.style.colorScheme = p);
19710
19706
  }
19711
19707
  function h() {
19712
19708
  return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
19713
19709
  }
19714
19710
  if (r) d(r);
19715
19711
  else try {
19716
- let f = localStorage.getItem(t) || n, v = a && f === "system" ? h() : f;
19712
+ let p = localStorage.getItem(t) || n, v = a && p === "system" ? h() : p;
19717
19713
  d(v);
19718
19714
  } catch {
19719
19715
  }
@@ -19817,11 +19813,11 @@ function UI(e) {
19817
19813
  return t && r.push(t), n && r.push(n), r;
19818
19814
  }
19819
19815
  var WI = (e) => {
19820
- var t, n, r, o, s, a, i, l, c, d, p;
19821
- let { invert: h, toast: f, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: y, toasts: C, expanded: S, removeToast: T, defaultRichColors: E, closeButton: N, style: A, cancelButtonStyle: D, actionButtonStyle: F, className: U = "", descriptionClassName: q = "", duration: I, position: G, gap: K, loadingIcon: z, expandByDefault: _, classNames: k, icons: H, closeButtonAriaLabel: V = "Close toast", pauseWhenPageIsHidden: j } = e, [M, P] = O.useState(null), [L, Q] = O.useState(null), [B, $] = O.useState(!1), [Z, Y] = O.useState(!1), [ee, X] = O.useState(!1), [ae, xe] = O.useState(!1), [ue, me] = O.useState(!1), [Se, Ce] = O.useState(0), [Ae, ht] = O.useState(0), ut = O.useRef(f.duration || I || Mu), He = O.useRef(null), ze = O.useRef(null), De = y === 0, Xe = y + 1 <= b, Pe = f.type, Le = f.dismissible !== !1, tt = f.className || "", At = f.descriptionClassName || "", it = O.useMemo(() => w.findIndex((ve) => ve.toastId === f.id) || 0, [w, f.id]), Tt = O.useMemo(() => {
19816
+ var t, n, r, o, s, a, i, l, c, d, f;
19817
+ let { invert: h, toast: p, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: y, toasts: C, expanded: S, removeToast: T, defaultRichColors: E, closeButton: N, style: A, cancelButtonStyle: D, actionButtonStyle: F, className: U = "", descriptionClassName: q = "", duration: I, position: G, gap: K, loadingIcon: z, expandByDefault: _, classNames: k, icons: H, closeButtonAriaLabel: V = "Close toast", pauseWhenPageIsHidden: j } = e, [M, P] = O.useState(null), [L, Q] = O.useState(null), [B, $] = O.useState(!1), [Z, Y] = O.useState(!1), [ee, X] = O.useState(!1), [ae, xe] = O.useState(!1), [ue, me] = O.useState(!1), [Se, Ce] = O.useState(0), [Ae, ht] = O.useState(0), ut = O.useRef(p.duration || I || Mu), He = O.useRef(null), ze = O.useRef(null), De = y === 0, Xe = y + 1 <= b, Pe = p.type, Le = p.dismissible !== !1, tt = p.className || "", At = p.descriptionClassName || "", it = O.useMemo(() => w.findIndex((ve) => ve.toastId === p.id) || 0, [w, p.id]), Tt = O.useMemo(() => {
19822
19818
  var ve;
19823
- return (ve = f.closeButton) != null ? ve : N;
19824
- }, [f.closeButton, N]), Ct = O.useMemo(() => f.duration || I || Mu, [f.duration, I]), Et = O.useRef(0), Rt = O.useRef(0), en = O.useRef(0), jt = O.useRef(null), [zt, It] = G.split("-"), Ue = O.useMemo(() => w.reduce((ve, he, ye) => ye >= it ? ve : ve + he.height, 0), [w, it]), Ge = II(), _t = f.invert || h, J = Pe === "loading";
19819
+ return (ve = p.closeButton) != null ? ve : N;
19820
+ }, [p.closeButton, N]), Ct = O.useMemo(() => p.duration || I || Mu, [p.duration, I]), Et = O.useRef(0), Rt = O.useRef(0), en = O.useRef(0), jt = O.useRef(null), [zt, It] = G.split("-"), Ue = O.useMemo(() => w.reduce((ve, he, ye) => ye >= it ? ve : ve + he.height, 0), [w, it]), Ge = II(), _t = p.invert || h, J = Pe === "loading";
19825
19821
  Rt.current = O.useMemo(() => it * K + Ue, [it, Ue]), O.useEffect(() => {
19826
19822
  ut.current = Ct;
19827
19823
  }, [Ct]), O.useEffect(() => {
@@ -19830,22 +19826,22 @@ var WI = (e) => {
19830
19826
  let ve = ze.current;
19831
19827
  if (ve) {
19832
19828
  let he = ve.getBoundingClientRect().height;
19833
- return ht(he), x((ye) => [{ toastId: f.id, height: he, position: f.position }, ...ye]), () => x((ye) => ye.filter((Me) => Me.toastId !== f.id));
19829
+ return ht(he), x((ye) => [{ toastId: p.id, height: he, position: p.position }, ...ye]), () => x((ye) => ye.filter((Me) => Me.toastId !== p.id));
19834
19830
  }
19835
- }, [x, f.id]), O.useLayoutEffect(() => {
19831
+ }, [x, p.id]), O.useLayoutEffect(() => {
19836
19832
  if (!B) return;
19837
19833
  let ve = ze.current, he = ve.style.height;
19838
19834
  ve.style.height = "auto";
19839
19835
  let ye = ve.getBoundingClientRect().height;
19840
- ve.style.height = he, ht(ye), x((Me) => Me.find((Ye) => Ye.toastId === f.id) ? Me.map((Ye) => Ye.toastId === f.id ? { ...Ye, height: ye } : Ye) : [{ toastId: f.id, height: ye, position: f.position }, ...Me]);
19841
- }, [B, f.title, f.description, x, f.id]);
19836
+ ve.style.height = he, ht(ye), x((Me) => Me.find((Ye) => Ye.toastId === p.id) ? Me.map((Ye) => Ye.toastId === p.id ? { ...Ye, height: ye } : Ye) : [{ toastId: p.id, height: ye, position: p.position }, ...Me]);
19837
+ }, [B, p.title, p.description, x, p.id]);
19842
19838
  let ce = O.useCallback(() => {
19843
- Y(!0), Ce(Rt.current), x((ve) => ve.filter((he) => he.toastId !== f.id)), setTimeout(() => {
19844
- T(f);
19839
+ Y(!0), Ce(Rt.current), x((ve) => ve.filter((he) => he.toastId !== p.id)), setTimeout(() => {
19840
+ T(p);
19845
19841
  }, HI);
19846
- }, [f, T, x, Rt]);
19842
+ }, [p, T, x, Rt]);
19847
19843
  O.useEffect(() => {
19848
- if (f.promise && Pe === "loading" || f.duration === 1 / 0 || f.type === "loading") return;
19844
+ if (p.promise && Pe === "loading" || p.duration === 1 / 0 || p.type === "loading") return;
19849
19845
  let ve;
19850
19846
  return S || g || j && Ge ? (() => {
19851
19847
  if (en.current < Et.current) {
@@ -19855,16 +19851,16 @@ var WI = (e) => {
19855
19851
  en.current = (/* @__PURE__ */ new Date()).getTime();
19856
19852
  })() : ut.current !== 1 / 0 && (Et.current = (/* @__PURE__ */ new Date()).getTime(), ve = setTimeout(() => {
19857
19853
  var he;
19858
- (he = f.onAutoClose) == null || he.call(f, f), ce();
19854
+ (he = p.onAutoClose) == null || he.call(p, p), ce();
19859
19855
  }, ut.current)), () => clearTimeout(ve);
19860
- }, [S, g, f, Pe, j, Ge, ce]), O.useEffect(() => {
19861
- f.delete && ce();
19862
- }, [ce, f.delete]);
19856
+ }, [S, g, p, Pe, j, Ge, ce]), O.useEffect(() => {
19857
+ p.delete && ce();
19858
+ }, [ce, p.delete]);
19863
19859
  function Ke() {
19864
19860
  var ve, he, ye;
19865
- return H != null && H.loading ? O.createElement("div", { className: cn(k == null ? void 0 : k.loader, (ve = f == null ? void 0 : f.classNames) == null ? void 0 : ve.loader, "sonner-loader"), "data-visible": Pe === "loading" }, H.loading) : z ? O.createElement("div", { className: cn(k == null ? void 0 : k.loader, (he = f == null ? void 0 : f.classNames) == null ? void 0 : he.loader, "sonner-loader"), "data-visible": Pe === "loading" }, z) : O.createElement(SI, { className: cn(k == null ? void 0 : k.loader, (ye = f == null ? void 0 : f.classNames) == null ? void 0 : ye.loader), visible: Pe === "loading" });
19861
+ return H != null && H.loading ? O.createElement("div", { className: cn(k == null ? void 0 : k.loader, (ve = p == null ? void 0 : p.classNames) == null ? void 0 : ve.loader, "sonner-loader"), "data-visible": Pe === "loading" }, H.loading) : z ? O.createElement("div", { className: cn(k == null ? void 0 : k.loader, (he = p == null ? void 0 : p.classNames) == null ? void 0 : he.loader, "sonner-loader"), "data-visible": Pe === "loading" }, z) : O.createElement(SI, { className: cn(k == null ? void 0 : k.loader, (ye = p == null ? void 0 : p.classNames) == null ? void 0 : ye.loader), visible: Pe === "loading" });
19866
19862
  }
19867
- return O.createElement("li", { tabIndex: 0, ref: ze, className: cn(U, tt, k == null ? void 0 : k.toast, (t = f == null ? void 0 : f.classNames) == null ? void 0 : t.toast, k == null ? void 0 : k.default, k == null ? void 0 : k[Pe], (n = f == null ? void 0 : f.classNames) == null ? void 0 : n[Pe]), "data-sonner-toast": "", "data-rich-colors": (r = f.richColors) != null ? r : E, "data-styled": !(f.jsx || f.unstyled || v), "data-mounted": B, "data-promise": !!f.promise, "data-swiped": ue, "data-removed": Z, "data-visible": Xe, "data-y-position": zt, "data-x-position": It, "data-index": y, "data-front": De, "data-swiping": ee, "data-dismissible": Le, "data-type": Pe, "data-invert": _t, "data-swipe-out": ae, "data-swipe-direction": L, "data-expanded": !!(S || _ && B), style: { "--index": y, "--toasts-before": y, "--z-index": C.length - y, "--offset": `${Z ? Se : Rt.current}px`, "--initial-height": _ ? "auto" : `${Ae}px`, ...A, ...f.style }, onDragEnd: () => {
19863
+ return O.createElement("li", { tabIndex: 0, ref: ze, className: cn(U, tt, k == null ? void 0 : k.toast, (t = p == null ? void 0 : p.classNames) == null ? void 0 : t.toast, k == null ? void 0 : k.default, k == null ? void 0 : k[Pe], (n = p == null ? void 0 : p.classNames) == null ? void 0 : n[Pe]), "data-sonner-toast": "", "data-rich-colors": (r = p.richColors) != null ? r : E, "data-styled": !(p.jsx || p.unstyled || v), "data-mounted": B, "data-promise": !!p.promise, "data-swiped": ue, "data-removed": Z, "data-visible": Xe, "data-y-position": zt, "data-x-position": It, "data-index": y, "data-front": De, "data-swiping": ee, "data-dismissible": Le, "data-type": Pe, "data-invert": _t, "data-swipe-out": ae, "data-swipe-direction": L, "data-expanded": !!(S || _ && B), style: { "--index": y, "--toasts-before": y, "--z-index": C.length - y, "--offset": `${Z ? Se : Rt.current}px`, "--initial-height": _ ? "auto" : `${Ae}px`, ...A, ...p.style }, onDragEnd: () => {
19868
19864
  X(!1), P(null), jt.current = null;
19869
19865
  }, onPointerDown: (ve) => {
19870
19866
  J || !Le || (He.current = /* @__PURE__ */ new Date(), Ce(Rt.current), ve.target.setPointerCapture(ve.pointerId), ve.target.tagName !== "BUTTON" && (X(!0), jt.current = { x: ve.clientX, y: ve.clientY }));
@@ -19874,7 +19870,7 @@ var WI = (e) => {
19874
19870
  jt.current = null;
19875
19871
  let Ye = Number(((ve = ze.current) == null ? void 0 : ve.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), dt = Number(((he = ze.current) == null ? void 0 : he.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), ft = (/* @__PURE__ */ new Date()).getTime() - ((ye = He.current) == null ? void 0 : ye.getTime()), je = M === "x" ? Ye : dt, gt = Math.abs(je) / ft;
19876
19872
  if (Math.abs(je) >= zI || gt > 0.11) {
19877
- Ce(Rt.current), (Me = f.onDismiss) == null || Me.call(f, f), Q(M === "x" ? Ye > 0 ? "right" : "left" : dt > 0 ? "down" : "up"), ce(), xe(!0), me(!1);
19873
+ Ce(Rt.current), (Me = p.onDismiss) == null || Me.call(p, p), Q(M === "x" ? Ye > 0 ? "right" : "left" : dt > 0 ? "down" : "up"), ce(), xe(!0), me(!1);
19878
19874
  return;
19879
19875
  }
19880
19876
  X(!1), P(null);
@@ -19885,17 +19881,17 @@ var WI = (e) => {
19885
19881
  !M && (Math.abs(ft) > 1 || Math.abs(dt) > 1) && P(Math.abs(ft) > Math.abs(dt) ? "x" : "y");
19886
19882
  let gt = { x: 0, y: 0 };
19887
19883
  M === "y" ? (je.includes("top") || je.includes("bottom")) && (je.includes("top") && dt < 0 || je.includes("bottom") && dt > 0) && (gt.y = dt) : M === "x" && (je.includes("left") || je.includes("right")) && (je.includes("left") && ft < 0 || je.includes("right") && ft > 0) && (gt.x = ft), (Math.abs(gt.x) > 0 || Math.abs(gt.y) > 0) && me(!0), (Me = ze.current) == null || Me.style.setProperty("--swipe-amount-x", `${gt.x}px`), (Ye = ze.current) == null || Ye.style.setProperty("--swipe-amount-y", `${gt.y}px`);
19888
- } }, Tt && !f.jsx ? O.createElement("button", { "aria-label": V, "data-disabled": J, "data-close-button": !0, onClick: J || !Le ? () => {
19884
+ } }, Tt && !p.jsx ? O.createElement("button", { "aria-label": V, "data-disabled": J, "data-close-button": !0, onClick: J || !Le ? () => {
19889
19885
  } : () => {
19890
19886
  var ve;
19891
- ce(), (ve = f.onDismiss) == null || ve.call(f, f);
19892
- }, className: cn(k == null ? void 0 : k.closeButton, (o = f == null ? void 0 : f.classNames) == null ? void 0 : o.closeButton) }, (s = H == null ? void 0 : H.close) != null ? s : RI) : null, f.jsx || va(f.title) ? f.jsx ? f.jsx : typeof f.title == "function" ? f.title() : f.title : O.createElement(O.Fragment, null, Pe || f.icon || f.promise ? O.createElement("div", { "data-icon": "", className: cn(k == null ? void 0 : k.icon, (a = f == null ? void 0 : f.classNames) == null ? void 0 : a.icon) }, f.promise || f.type === "loading" && !f.icon ? f.icon || Ke() : null, f.type !== "loading" ? f.icon || (H == null ? void 0 : H[Pe]) || bI(Pe) : null) : null, O.createElement("div", { "data-content": "", className: cn(k == null ? void 0 : k.content, (i = f == null ? void 0 : f.classNames) == null ? void 0 : i.content) }, O.createElement("div", { "data-title": "", className: cn(k == null ? void 0 : k.title, (l = f == null ? void 0 : f.classNames) == null ? void 0 : l.title) }, typeof f.title == "function" ? f.title() : f.title), f.description ? O.createElement("div", { "data-description": "", className: cn(q, At, k == null ? void 0 : k.description, (c = f == null ? void 0 : f.classNames) == null ? void 0 : c.description) }, typeof f.description == "function" ? f.description() : f.description) : null), va(f.cancel) ? f.cancel : f.cancel && Xo(f.cancel) ? O.createElement("button", { "data-button": !0, "data-cancel": !0, style: f.cancelButtonStyle || D, onClick: (ve) => {
19887
+ ce(), (ve = p.onDismiss) == null || ve.call(p, p);
19888
+ }, className: cn(k == null ? void 0 : k.closeButton, (o = p == null ? void 0 : p.classNames) == null ? void 0 : o.closeButton) }, (s = H == null ? void 0 : H.close) != null ? s : RI) : null, p.jsx || va(p.title) ? p.jsx ? p.jsx : typeof p.title == "function" ? p.title() : p.title : O.createElement(O.Fragment, null, Pe || p.icon || p.promise ? O.createElement("div", { "data-icon": "", className: cn(k == null ? void 0 : k.icon, (a = p == null ? void 0 : p.classNames) == null ? void 0 : a.icon) }, p.promise || p.type === "loading" && !p.icon ? p.icon || Ke() : null, p.type !== "loading" ? p.icon || (H == null ? void 0 : H[Pe]) || bI(Pe) : null) : null, O.createElement("div", { "data-content": "", className: cn(k == null ? void 0 : k.content, (i = p == null ? void 0 : p.classNames) == null ? void 0 : i.content) }, O.createElement("div", { "data-title": "", className: cn(k == null ? void 0 : k.title, (l = p == null ? void 0 : p.classNames) == null ? void 0 : l.title) }, typeof p.title == "function" ? p.title() : p.title), p.description ? O.createElement("div", { "data-description": "", className: cn(q, At, k == null ? void 0 : k.description, (c = p == null ? void 0 : p.classNames) == null ? void 0 : c.description) }, typeof p.description == "function" ? p.description() : p.description) : null), va(p.cancel) ? p.cancel : p.cancel && Xo(p.cancel) ? O.createElement("button", { "data-button": !0, "data-cancel": !0, style: p.cancelButtonStyle || D, onClick: (ve) => {
19893
19889
  var he, ye;
19894
- Xo(f.cancel) && Le && ((ye = (he = f.cancel).onClick) == null || ye.call(he, ve), ce());
19895
- }, className: cn(k == null ? void 0 : k.cancelButton, (d = f == null ? void 0 : f.classNames) == null ? void 0 : d.cancelButton) }, f.cancel.label) : null, va(f.action) ? f.action : f.action && Xo(f.action) ? O.createElement("button", { "data-button": !0, "data-action": !0, style: f.actionButtonStyle || F, onClick: (ve) => {
19890
+ Xo(p.cancel) && Le && ((ye = (he = p.cancel).onClick) == null || ye.call(he, ve), ce());
19891
+ }, className: cn(k == null ? void 0 : k.cancelButton, (d = p == null ? void 0 : p.classNames) == null ? void 0 : d.cancelButton) }, p.cancel.label) : null, va(p.action) ? p.action : p.action && Xo(p.action) ? O.createElement("button", { "data-button": !0, "data-action": !0, style: p.actionButtonStyle || F, onClick: (ve) => {
19896
19892
  var he, ye;
19897
- Xo(f.action) && ((ye = (he = f.action).onClick) == null || ye.call(he, ve), !ve.defaultPrevented && ce());
19898
- }, className: cn(k == null ? void 0 : k.actionButton, (p = f == null ? void 0 : f.classNames) == null ? void 0 : p.actionButton) }, f.action.label) : null));
19893
+ Xo(p.action) && ((ye = (he = p.action).onClick) == null || ye.call(he, ve), !ve.defaultPrevented && ce());
19894
+ }, className: cn(k == null ? void 0 : k.actionButton, (f = p == null ? void 0 : p.classNames) == null ? void 0 : f.actionButton) }, p.action.label) : null));
19899
19895
  };
19900
19896
  function Ou() {
19901
19897
  if (typeof window > "u" || typeof document > "u") return "ltr";
@@ -19917,7 +19913,7 @@ function VI(e, t) {
19917
19913
  }), n;
19918
19914
  }
19919
19915
  var KI = zg(function(e, t) {
19920
- let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: p, duration: h, style: f, visibleToasts: v = DI, toastOptions: g, dir: x = Ou(), gap: b = BI, loadingIcon: w, icons: y, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: S } = e, [T, E] = O.useState([]), N = O.useMemo(() => Array.from(new Set([r].concat(T.filter((j) => j.position).map((j) => j.position)))), [T, r]), [A, D] = O.useState([]), [F, U] = O.useState(!1), [q, I] = O.useState(!1), [G, K] = O.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), z = O.useRef(null), _ = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), k = O.useRef(null), H = O.useRef(!1), V = O.useCallback((j) => {
19916
+ let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: f, duration: h, style: p, visibleToasts: v = DI, toastOptions: g, dir: x = Ou(), gap: b = BI, loadingIcon: w, icons: y, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: S } = e, [T, E] = O.useState([]), N = O.useMemo(() => Array.from(new Set([r].concat(T.filter((j) => j.position).map((j) => j.position)))), [T, r]), [A, D] = O.useState([]), [F, U] = O.useState(!1), [q, I] = O.useState(!1), [G, K] = O.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), z = O.useRef(null), _ = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), k = O.useRef(null), H = O.useRef(!1), V = O.useCallback((j) => {
19921
19917
  E((M) => {
19922
19918
  var P;
19923
19919
  return (P = M.find((L) => L.id === j.id)) != null && P.delete || Wt.dismiss(j.id), M.filter(({ id: L }) => L !== j.id);
@@ -19971,7 +19967,7 @@ var KI = zg(function(e, t) {
19971
19967
  }, [z.current]), O.createElement("section", { ref: t, "aria-label": `${C} ${_}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, N.map((j, M) => {
19972
19968
  var P;
19973
19969
  let [L, Q] = j.split("-");
19974
- return T.length ? O.createElement("ol", { key: j, dir: x === "auto" ? Ou() : x, tabIndex: -1, ref: z, className: i, "data-sonner-toaster": !0, "data-theme": G, "data-y-position": L, "data-lifted": F && T.length > 1 && !s, "data-x-position": Q, style: { "--front-toast-height": `${((P = A[0]) == null ? void 0 : P.height) || 0}px`, "--width": `${FI}px`, "--gap": `${b}px`, ...f, ...VI(l, c) }, onBlur: (B) => {
19970
+ return T.length ? O.createElement("ol", { key: j, dir: x === "auto" ? Ou() : x, tabIndex: -1, ref: z, className: i, "data-sonner-toaster": !0, "data-theme": G, "data-y-position": L, "data-lifted": F && T.length > 1 && !s, "data-x-position": Q, style: { "--front-toast-height": `${((P = A[0]) == null ? void 0 : P.height) || 0}px`, "--width": `${FI}px`, "--gap": `${b}px`, ...p, ...VI(l, c) }, onBlur: (B) => {
19975
19971
  H.current && !B.currentTarget.contains(B.relatedTarget) && (H.current = !1, k.current && (k.current.focus({ preventScroll: !0 }), k.current = null));
19976
19972
  }, onFocus: (B) => {
19977
19973
  B.target instanceof HTMLElement && B.target.dataset.dismissible === "false" || H.current || (H.current = !0, k.current = B.relatedTarget);
@@ -19981,7 +19977,7 @@ var KI = zg(function(e, t) {
19981
19977
  B.target instanceof HTMLElement && B.target.dataset.dismissible === "false" || I(!0);
19982
19978
  }, onPointerUp: () => I(!1) }, T.filter((B) => !B.position && M === 0 || B.position === j).map((B, $) => {
19983
19979
  var Z, Y;
19984
- return O.createElement(WI, { key: B.id, icons: y, index: $, toast: B, defaultRichColors: p, duration: (Z = g == null ? void 0 : g.duration) != null ? Z : h, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (Y = g == null ? void 0 : g.closeButton) != null ? Y : a, interacting: q, position: j, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: V, toasts: T.filter((ee) => ee.position == B.position), heights: A.filter((ee) => ee.position == B.position), setHeights: D, expandByDefault: s, gap: b, loadingIcon: w, expanded: F, pauseWhenPageIsHidden: S, swipeDirections: e.swipeDirections });
19980
+ return O.createElement(WI, { key: B.id, icons: y, index: $, toast: B, defaultRichColors: f, duration: (Z = g == null ? void 0 : g.duration) != null ? Z : h, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (Y = g == null ? void 0 : g.closeButton) != null ? Y : a, interacting: q, position: j, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: V, toasts: T.filter((ee) => ee.position == B.position), heights: A.filter((ee) => ee.position == B.position), setHeights: D, expandByDefault: s, gap: b, loadingIcon: w, expanded: F, pauseWhenPageIsHidden: S, swipeDirections: e.swipeDirections });
19985
19981
  })) : null;
19986
19982
  }));
19987
19983
  });