teodor-new-chat-ui 4.3.488 → 4.3.490

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -2,8 +2,8 @@ var Pg = Object.defineProperty;
2
2
  var Mg = (e, t, n) => t in e ? Pg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var Kl = (e, t, n) => Mg(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as h from "react";
5
- import L, { useMemo as Be, createContext as Lr, useContext as $r, useState as pe, useRef as Pe, useCallback as le, useEffect as Qe, useReducer as Og, useLayoutEffect as Dg, createElement as Qo, memo as Lg, useImperativeHandle as $g, forwardRef as Fg, isValidElement as wi } from "react";
6
- import { Slot as Bg, createSlot as Ar, createSlottable as zg } from "@radix-ui/react-slot";
5
+ import L, { useMemo as Be, createContext as Dr, useContext as Lr, useState as pe, useRef as Pe, useCallback as le, useEffect as Qe, useReducer as Og, useLayoutEffect as Dg, createElement as Qo, memo as Lg, useImperativeHandle as $g, forwardRef as Fg, isValidElement as wi } from "react";
6
+ import { Slot as Bg, createSlot as Nr, createSlottable as zg } from "@radix-ui/react-slot";
7
7
  import { cva as wo } from "class-variance-authority";
8
8
  import { clsx as Hg } from "clsx";
9
9
  import { twMerge as Ug } from "tailwind-merge";
@@ -162,8 +162,8 @@ function Xl(e) {
162
162
  }
163
163
  const px = {}, xr = typeof import.meta < "u" ? px : void 0;
164
164
  var Du;
165
- const hx = ((Du = xr == null ? void 0 : xr.VITE_DEBUG_HISTORY_INTERRUPTS) == null ? void 0 : Du.toLowerCase()) === "false" || (xr == null ? void 0 : xr.VITE_DEBUG_HISTORY_INTERRUPTS) === "0", vr = !hx;
166
- function Cr(e) {
165
+ const hx = ((Du = xr == null ? void 0 : xr.VITE_DEBUG_HISTORY_INTERRUPTS) == null ? void 0 : Du.toLowerCase()) === "false" || (xr == null ? void 0 : xr.VITE_DEBUG_HISTORY_INTERRUPTS) === "0", qr = !hx;
166
+ function Tr(e) {
167
167
  const r = [...(Array.isArray(e == null ? void 0 : e.checkpoints) ? (e == null ? void 0 : e.checkpoints) ?? [] : e != null && e.checkpoints ? Object.values(e.checkpoints) : []).map((s, i) => mx(s, i)).filter((s) => !!s)].sort((s, i) => Jl(i.createdAt) - Jl(s.createdAt)), o = r[0] ?? null;
168
168
  return {
169
169
  threadId: (e == null ? void 0 : e.threadId) ?? "",
@@ -255,7 +255,7 @@ function wx(e) {
255
255
  }
256
256
  function bx(e, t, n, r, o) {
257
257
  const s = t.length, i = yx(e, n);
258
- if (vr && console.debug("[historyUtils] deriveInterruptFromSnapshot", {
258
+ if (qr && console.debug("[historyUtils] deriveInterruptFromSnapshot", {
259
259
  checkpointId: r,
260
260
  checkpointNs: o,
261
261
  fallbackIndex: n,
@@ -264,25 +264,25 @@ function bx(e, t, n, r, o) {
264
264
  messageInterrupt: i,
265
265
  rawInterrupts: t.slice(Math.max(0, s - 3))
266
266
  }), i)
267
- return vr && console.debug("[historyUtils] interrupt found in messages", i), i;
267
+ return qr && console.debug("[historyUtils] interrupt found in messages", i), i;
268
268
  for (let a = s - 1; a >= 0; a -= 1) {
269
269
  const l = t[a];
270
270
  if (!l || typeof l != "object") {
271
- vr && console.debug("[historyUtils] skipping invalid raw interrupt entry", { entry: l, index: a });
271
+ qr && console.debug("[historyUtils] skipping invalid raw interrupt entry", { entry: l, index: a });
272
272
  continue;
273
273
  }
274
274
  const c = l, d = c.value ?? l;
275
275
  if (d == null) {
276
- vr && console.debug("[historyUtils] skipping raw interrupt without value", { entry: l, index: a });
276
+ qr && console.debug("[historyUtils] skipping raw interrupt without value", { entry: l, index: a });
277
277
  continue;
278
278
  }
279
279
  const m = {
280
280
  id: typeof c.id == "string" && c.id.trim() ? c.id : `interrupt-${r ?? n}-${a}`,
281
281
  value: d
282
282
  };
283
- return vr && console.debug("[historyUtils] interrupt derived from raw entry", m), m;
283
+ return qr && console.debug("[historyUtils] interrupt derived from raw entry", m), m;
284
284
  }
285
- return vr && console.debug("[historyUtils] no interrupt found in snapshot"), null;
285
+ return null;
286
286
  }
287
287
  function yx(e, t) {
288
288
  var n;
@@ -370,7 +370,7 @@ function Tx() {
370
370
  }
371
371
  var C = !1, y = !1, T = !1, E = !1, N = !1, _;
372
372
  _ = Symbol.for("react.module.reference");
373
- function O(R) {
373
+ function D(R) {
374
374
  return !!(typeof R == "string" || typeof R == "function" || R === r || R === s || N || R === o || R === c || R === d || E || R === p || C || y || T || typeof R == "object" && R !== null && (R.$$typeof === m || R.$$typeof === f || R.$$typeof === i || R.$$typeof === a || R.$$typeof === l || // This needs to include all possible module reference object
375
375
  // types supported by any Flight configuration anywhere since
376
376
  // we don't know which Flight build this will end up being used
@@ -494,18 +494,18 @@ function Tx() {
494
494
  V < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
495
495
  }
496
496
  }
497
- var U = b.ReactCurrentDispatcher, D;
497
+ var U = b.ReactCurrentDispatcher, O;
498
498
  function j(R, ee, ue) {
499
499
  {
500
- if (D === void 0)
500
+ if (O === void 0)
501
501
  try {
502
502
  throw Error();
503
503
  } catch (Ze) {
504
504
  var Ee = Ze.stack.trim().match(/\n( *(at )?)/);
505
- D = Ee && Ee[1] || "";
505
+ O = Ee && Ee[1] || "";
506
506
  }
507
507
  return `
508
- ` + D + R;
508
+ ` + O + R;
509
509
  }
510
510
  }
511
511
  var q = !1, J;
@@ -878,7 +878,7 @@ Check the top-level render call using <` + ue + ">.");
878
878
  var ze = {};
879
879
  function xe(R, ee, ue, Ee, Ze, st) {
880
880
  {
881
- var qe = O(R);
881
+ var qe = D(R);
882
882
  if (!qe) {
883
883
  var He = "";
884
884
  (R === void 0 || typeof R == "object" && R !== null && Object.keys(R).length === 0) && (He += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
@@ -1014,9 +1014,9 @@ function Wu(e, t) {
1014
1014
  const { toString: Cx } = Object.prototype, { getPrototypeOf: Ma } = Object, { iterator: Ps, toStringTag: Vu } = Symbol, Ms = /* @__PURE__ */ ((e) => (t) => {
1015
1015
  const n = Cx.call(t);
1016
1016
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
1017
- })(/* @__PURE__ */ Object.create(null)), mn = (e) => (e = e.toLowerCase(), (t) => Ms(t) === e), Os = (e) => (t) => typeof t === e, { isArray: Fr } = Array, jr = Os("undefined");
1017
+ })(/* @__PURE__ */ Object.create(null)), mn = (e) => (e = e.toLowerCase(), (t) => Ms(t) === e), Os = (e) => (t) => typeof t === e, { isArray: $r } = Array, Ar = Os("undefined");
1018
1018
  function So(e) {
1019
- return e !== null && !jr(e) && e.constructor !== null && !jr(e.constructor) && Ut(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1019
+ return e !== null && !Ar(e) && e.constructor !== null && !Ar(e.constructor) && Ut(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1020
1020
  }
1021
1021
  const Ku = mn("ArrayBuffer");
1022
1022
  function Ex(e) {
@@ -1045,7 +1045,7 @@ function Co(e, t, { allOwnKeys: n = !1 } = {}) {
1045
1045
  if (e === null || typeof e > "u")
1046
1046
  return;
1047
1047
  let r, o;
1048
- if (typeof e != "object" && (e = [e]), Fr(e))
1048
+ if (typeof e != "object" && (e = [e]), $r(e))
1049
1049
  for (r = 0, o = e.length; r < o; r++)
1050
1050
  t.call(null, e[r], r, e);
1051
1051
  else {
@@ -1068,11 +1068,11 @@ function Gu(e, t) {
1068
1068
  return o;
1069
1069
  return null;
1070
1070
  }
1071
- const Xn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Yu = (e) => !jr(e) && e !== Xn;
1071
+ const Xn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Yu = (e) => !Ar(e) && e !== Xn;
1072
1072
  function Gi() {
1073
1073
  const { caseless: e, skipUndefined: t } = Yu(this) && this || {}, n = {}, r = (o, s) => {
1074
1074
  const i = e && Gu(n, s) || s;
1075
- es(n[i]) && es(o) ? n[i] = Gi(n[i], o) : es(o) ? n[i] = Gi({}, o) : Fr(o) ? n[i] = o.slice() : (!t || !jr(o)) && (n[i] = o);
1075
+ es(n[i]) && es(o) ? n[i] = Gi(n[i], o) : es(o) ? n[i] = Gi({}, o) : $r(o) ? n[i] = o.slice() : (!t || !Ar(o)) && (n[i] = o);
1076
1076
  };
1077
1077
  for (let o = 0, s = arguments.length; o < s; o++)
1078
1078
  arguments[o] && Co(arguments[o], r);
@@ -1100,7 +1100,7 @@ const zx = (e, t, n, { allOwnKeys: r } = {}) => (Co(t, (o, s) => {
1100
1100
  return r !== -1 && r === n;
1101
1101
  }, Kx = (e) => {
1102
1102
  if (!e) return null;
1103
- if (Fr(e)) return e;
1103
+ if ($r(e)) return e;
1104
1104
  let t = e.length;
1105
1105
  if (!qu(t)) return null;
1106
1106
  const n = new Array(t);
@@ -1152,7 +1152,7 @@ const zx = (e, t, n, { allOwnKeys: r } = {}) => (Co(t, (o, s) => {
1152
1152
  n[s] = !0;
1153
1153
  });
1154
1154
  };
1155
- return Fr(e) ? r(e) : r(String(e).split(t)), n;
1155
+ return $r(e) ? r(e) : r(String(e).split(t)), n;
1156
1156
  }, tv = () => {
1157
1157
  }, nv = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1158
1158
  function rv(e) {
@@ -1167,10 +1167,10 @@ const ov = (e) => {
1167
1167
  return r;
1168
1168
  if (!("toJSON" in r)) {
1169
1169
  t[o] = r;
1170
- const s = Fr(r) ? [] : {};
1170
+ const s = $r(r) ? [] : {};
1171
1171
  return Co(r, (i, a) => {
1172
1172
  const l = n(i, o + 1);
1173
- !jr(l) && (s[a] = l);
1173
+ !Ar(l) && (s[a] = l);
1174
1174
  }), t[o] = void 0, s;
1175
1175
  }
1176
1176
  }
@@ -1185,7 +1185,7 @@ const ov = (e) => {
1185
1185
  typeof setImmediate == "function",
1186
1186
  Ut(Xn.postMessage)
1187
1187
  ), av = typeof queueMicrotask < "u" ? queueMicrotask.bind(Xn) : typeof process < "u" && process.nextTick || Ju, lv = (e) => e != null && Ut(e[Ps]), W = {
1188
- isArray: Fr,
1188
+ isArray: $r,
1189
1189
  isArrayBuffer: Ku,
1190
1190
  isBuffer: So,
1191
1191
  isFormData: Mx,
@@ -1200,7 +1200,7 @@ const ov = (e) => {
1200
1200
  isRequest: Lx,
1201
1201
  isResponse: $x,
1202
1202
  isHeaders: Fx,
1203
- isUndefined: jr,
1203
+ isUndefined: Ar,
1204
1204
  isDate: Nx,
1205
1205
  isFile: Ax,
1206
1206
  isBlob: jx,
@@ -1827,10 +1827,10 @@ function Si(e, t) {
1827
1827
  function sd(e) {
1828
1828
  return !!(e && e.__CANCEL__);
1829
1829
  }
1830
- function Br(e, t, n) {
1830
+ function Fr(e, t, n) {
1831
1831
  Ae.call(this, e ?? "canceled", Ae.ERR_CANCELED, t, n), this.name = "CanceledError";
1832
1832
  }
1833
- W.inherits(Br, Ae, {
1833
+ W.inherits(Fr, Ae, {
1834
1834
  __CANCEL__: !0
1835
1835
  });
1836
1836
  function id(e, t, n) {
@@ -2076,7 +2076,7 @@ const ld = (e) => {
2076
2076
  }, s === void 0 && i.setContentType(null), "setRequestHeader" in x && W.forEach(i.toJSON(), function(C, y) {
2077
2077
  x.setRequestHeader(y, C);
2078
2078
  }), W.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), a && a !== "json" && (x.responseType = o.responseType), c && ([m, v] = ps(c, !0), x.addEventListener("progress", m)), l && x.upload && ([f, p] = ps(l), x.upload.addEventListener("progress", f), x.upload.addEventListener("loadend", p)), (o.cancelToken || o.signal) && (d = (S) => {
2079
- x && (r(!S || S.type ? new Br(null, e, x) : S), x.abort(), x = null);
2079
+ x && (r(!S || S.type ? new Fr(null, e, x) : S), x.abort(), x = null);
2080
2080
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
2081
2081
  const w = jv(o.url);
2082
2082
  if (w && Pt.protocols.indexOf(w) === -1) {
@@ -2093,7 +2093,7 @@ const ld = (e) => {
2093
2093
  if (!o) {
2094
2094
  o = !0, a();
2095
2095
  const d = c instanceof Error ? c : this.reason;
2096
- r.abort(d instanceof Ae ? d : new Br(d instanceof Error ? d.message : d));
2096
+ r.abort(d instanceof Ae ? d : new Fr(d instanceof Error ? d.message : d));
2097
2097
  }
2098
2098
  };
2099
2099
  let i = t && setTimeout(() => {
@@ -2236,7 +2236,7 @@ const ld = (e) => {
2236
2236
  responseType: E,
2237
2237
  headers: N,
2238
2238
  withCredentials: _ = "same-origin",
2239
- fetchOptions: O
2239
+ fetchOptions: D
2240
2240
  } = ld(v), $ = t || fetch;
2241
2241
  E = E ? (E + "").toLowerCase() : "text";
2242
2242
  let H = Bv([w, S && S.toAbortSignal()], C), Y = null;
@@ -2261,7 +2261,7 @@ const ld = (e) => {
2261
2261
  }
2262
2262
  W.isString(_) || (_ = _ ? "include" : "omit");
2263
2263
  const K = s && "credentials" in n.prototype, z = {
2264
- ...O,
2264
+ ...D,
2265
2265
  signal: H,
2266
2266
  method: x.toUpperCase(),
2267
2267
  headers: N.normalize().toJSON(),
@@ -2270,7 +2270,7 @@ const ld = (e) => {
2270
2270
  credentials: K ? _ : void 0
2271
2271
  };
2272
2272
  Y = s && new n(g, z);
2273
- let M = await (s ? $(Y, O) : $(g, z));
2273
+ let M = await (s ? $(Y, D) : $(g, z));
2274
2274
  const k = d && (E === "stream" || E === "response");
2275
2275
  if (d && (y || k && P)) {
2276
2276
  const X = {};
@@ -2371,7 +2371,7 @@ const pc = (e) => `- ${e}`, qv = (e) => W.isFunction(e) || e === null || e === !
2371
2371
  };
2372
2372
  function Ti(e) {
2373
2373
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
2374
- throw new Br(null, e);
2374
+ throw new Fr(null, e);
2375
2375
  }
2376
2376
  function hc(e) {
2377
2377
  return Ti(e), e.headers = Wt.from(e.headers), e.data = Si.call(
@@ -2588,7 +2588,7 @@ let Yv = class fd {
2588
2588
  r.unsubscribe(s);
2589
2589
  }, i;
2590
2590
  }, t(function(s, i, a) {
2591
- r.reason || (r.reason = new Br(s, i, a), n(r.reason));
2591
+ r.reason || (r.reason = new Fr(s, i, a), n(r.reason));
2592
2592
  });
2593
2593
  }
2594
2594
  /**
@@ -2721,7 +2721,7 @@ function pd(e) {
2721
2721
  }
2722
2722
  const Tt = pd(Eo);
2723
2723
  Tt.Axios = er;
2724
- Tt.CanceledError = Br;
2724
+ Tt.CanceledError = Fr;
2725
2725
  Tt.CancelToken = Yv;
2726
2726
  Tt.isCancel = sd;
2727
2727
  Tt.VERSION = dd;
@@ -2949,7 +2949,7 @@ async function ow(e, t = 50, n = 0) {
2949
2949
  const r = { limit: t, offset: n };
2950
2950
  return e && (r.thread_id = e), await tn("/files", { params: r });
2951
2951
  }
2952
- const hd = Lr(null);
2952
+ const hd = Dr(null);
2953
2953
  function sw({ children: e, apiConfig: t }) {
2954
2954
  const n = Mn;
2955
2955
  if (t) {
@@ -2999,7 +2999,7 @@ async function aw(e = []) {
2999
2999
  return { contentParts: t, filesInfo: n };
3000
3000
  }
3001
3001
  function $s() {
3002
- const e = $r(hd);
3002
+ const e = Lr(hd);
3003
3003
  if (!e) throw new Error("useApi must be used within ApiProvider");
3004
3004
  return e;
3005
3005
  }
@@ -3097,14 +3097,14 @@ function xd(e) {
3097
3097
  return t[t.length - 1] || null;
3098
3098
  }
3099
3099
  function fw(e = {}) {
3100
- const t = Be(() => An(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = pe(e.token ?? null), s = Pe(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = pe(!1), [c, d] = pe(null), [f, m] = pe(""), [p, v] = pe(null), [g, x] = pe(0), [b, w] = pe(!1), [S, C] = pe(null), y = Pe(null), T = Pe(!0), E = Pe(0), N = Pe(null), _ = Pe(null), O = Pe(null), $ = Pe(null), H = Pe({
3100
+ const t = Be(() => An(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = pe(e.token ?? null), s = Pe(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = pe(!1), [c, d] = pe(null), [f, m] = pe(""), [p, v] = pe(null), [g, x] = pe(0), [b, w] = pe(!1), [S, C] = pe(null), y = Pe(null), T = Pe(!0), E = Pe(0), N = Pe(null), _ = Pe(null), D = Pe(null), $ = Pe(null), H = Pe({
3101
3101
  messageId: null,
3102
3102
  lastSeq: null,
3103
3103
  lastText: ""
3104
3104
  }), Y = le((z) => {
3105
3105
  o(z);
3106
3106
  }, []), P = le(() => {
3107
- m(""), v(null), d(null), _.current = null, O.current = null, $.current = null, C(null), H.current = {
3107
+ m(""), v(null), d(null), _.current = null, D.current = null, $.current = null, C(null), H.current = {
3108
3108
  messageId: null,
3109
3109
  lastSeq: null,
3110
3110
  lastText: ""
@@ -3121,7 +3121,7 @@ function fw(e = {}) {
3121
3121
  }) : Promise.resolve()).finally(M);
3122
3122
  }, []), K = le(
3123
3123
  (z, M, k) => {
3124
- y.current && (y.current.abort(), y.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && m(""), v(null), _.current = null, O.current = null, $.current = null, C(null), H.current = {
3124
+ y.current && (y.current.abort(), y.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && m(""), v(null), _.current = null, D.current = null, $.current = null, C(null), H.current = {
3125
3125
  messageId: null,
3126
3126
  lastSeq: null,
3127
3127
  lastText: ""
@@ -3133,7 +3133,7 @@ function fw(e = {}) {
3133
3133
  threadId: z.threadId ?? null,
3134
3134
  headers: {}
3135
3135
  }, (async () => {
3136
- var F, U, D, j, q, J, ne, re, se, ae, be, Oe, We, je, Fe, ut, mt, Ct;
3136
+ var F, U, O, j, q, J, ne, re, se, ae, be, Oe, We, je, Fe, ut, mt, Ct;
3137
3137
  const I = (Ge) => {
3138
3138
  var Je;
3139
3139
  try {
@@ -3156,7 +3156,7 @@ function fw(e = {}) {
3156
3156
  let Z = null;
3157
3157
  try {
3158
3158
  const ot = (U = window.localStorage) == null ? void 0 : U.getItem("chat-settings");
3159
- ot && (Z = ((D = JSON.parse(ot)) == null ? void 0 : D.apiKey) || null);
3159
+ ot && (Z = ((O = JSON.parse(ot)) == null ? void 0 : O.apiKey) || null);
3160
3160
  } catch {
3161
3161
  }
3162
3162
  const he = Ke || Et || Z || null;
@@ -3285,12 +3285,12 @@ function fw(e = {}) {
3285
3285
  });
3286
3286
  }
3287
3287
  if (xe.type === "checkpoint")
3288
- _.current = xe.checkpointId ?? null, O.current = xe.checkpointNs ?? null, v(xe.checkpointId ?? null);
3288
+ _.current = xe.checkpointId ?? null, D.current = xe.checkpointNs ?? null, v(xe.checkpointId ?? null);
3289
3289
  else if (xe.type === "state_history") {
3290
3290
  $.current = xe;
3291
3291
  try {
3292
- const xt = Cr(xe).latest;
3293
- xt && (_.current = xt.checkpointId ?? null, O.current = xt.checkpointNs ?? null, v(xt.checkpointId ?? null));
3292
+ const xt = Tr(xe).latest;
3293
+ xt && (_.current = xt.checkpointId ?? null, D.current = xt.checkpointNs ?? null, v(xt.checkpointId ?? null));
3294
3294
  } catch (Me) {
3295
3295
  console.warn("[use-chat] Failed to hydrate state_history payload", Me);
3296
3296
  }
@@ -3366,7 +3366,7 @@ function fw(e = {}) {
3366
3366
  X = "error", A = Je, d(Je), (ut = k == null ? void 0 : k.onError) == null || ut.call(k, Je), B || ((mt = k == null ? void 0 : k.onConnectionError) == null || mt.call(k, Je), B = !0);
3367
3367
  }
3368
3368
  } finally {
3369
- const Ge = E.current, Je = _.current, Ve = O.current, De = $.current, Ne = X ?? (G.signal.aborted ? "aborted" : A ? "error" : "complete");
3369
+ const Ge = E.current, Je = _.current, Ve = D.current, De = $.current, Ne = X ?? (G.signal.aborted ? "aborted" : A ? "error" : "complete");
3370
3370
  try {
3371
3371
  (Ct = k == null ? void 0 : k.onClosed) == null || Ct.call(k, {
3372
3372
  reason: Ne,
@@ -3486,7 +3486,7 @@ function mw({
3486
3486
  }, [_]), Qe(() => {
3487
3487
  r == null || r(a);
3488
3488
  }, [a, r]);
3489
- const O = le(
3489
+ const D = le(
3490
3490
  async (M) => {
3491
3491
  try {
3492
3492
  const k = await e.createThread(M);
@@ -3548,7 +3548,7 @@ function mw({
3548
3548
  [e, n, _]
3549
3549
  ), V = Be(
3550
3550
  () => ({
3551
- createThread: O,
3551
+ createThread: D,
3552
3552
  deleteThread: $,
3553
3553
  renameThread: H,
3554
3554
  refreshThreads: N,
@@ -3556,7 +3556,7 @@ function mw({
3556
3556
  shareThread: Y,
3557
3557
  unshareThread: P
3558
3558
  }),
3559
- [O, $, H, N, _, Y, P]
3559
+ [D, $, H, N, _, Y, P]
3560
3560
  ), K = le((M) => {
3561
3561
  if (!(M != null && M.threadId)) return;
3562
3562
  const k = {
@@ -3593,7 +3593,7 @@ function mw({
3593
3593
  clearShareStatus: z
3594
3594
  };
3595
3595
  }
3596
- const vd = Lr(null);
3596
+ const vd = Dr(null);
3597
3597
  function gw({
3598
3598
  children: e,
3599
3599
  initialThreadId: t = null,
@@ -3654,7 +3654,7 @@ function gw({
3654
3654
  return /* @__PURE__ */ u.jsx(vd.Provider, { value: w, children: e });
3655
3655
  }
3656
3656
  function Ro() {
3657
- const e = $r(vd);
3657
+ const e = Lr(vd);
3658
3658
  if (!e) throw new Error("useThreads must be used within a ThreadsProvider");
3659
3659
  return e;
3660
3660
  }
@@ -3736,7 +3736,7 @@ function ao(e) {
3736
3736
  }
3737
3737
  return e;
3738
3738
  }
3739
- function _r(e) {
3739
+ function jr(e) {
3740
3740
  if (typeof e == "string") return e;
3741
3741
  if (wd(e)) return "";
3742
3742
  try {
@@ -3750,21 +3750,21 @@ function vw(e) {
3750
3750
  return typeof e != "string" ? !1 : /^[\s\n]*[-*]\s|^[\s\n]*#+\s|```|^\s*\[.*\]\(|^>\s/.test(e);
3751
3751
  }
3752
3752
  function ww(e) {
3753
- const t = _r(e);
3753
+ const t = jr(e);
3754
3754
  return typeof e == "string" && vw(e) ? { content: e, isMarkdown: !0 } : { content: t, isMarkdown: !1 };
3755
3755
  }
3756
- function Pr(e) {
3756
+ function _r(e) {
3757
3757
  if (e == null) return e;
3758
3758
  if (typeof e == "string") {
3759
3759
  const t = e.trim();
3760
3760
  if (t.startsWith("{") || t.startsWith("[")) {
3761
3761
  const n = Io(t);
3762
3762
  if (n !== null)
3763
- return Pr(n);
3763
+ return _r(n);
3764
3764
  }
3765
3765
  return e;
3766
3766
  }
3767
- return typeof e == "object" && !Array.isArray(e) && e.content !== void 0 ? Pr(e.content) : e;
3767
+ return typeof e == "object" && !Array.isArray(e) && e.content !== void 0 ? _r(e.content) : e;
3768
3768
  }
3769
3769
  function bw(e) {
3770
3770
  return e.filter((t) => t.type === "text").map((t) => t.text).join("");
@@ -4019,7 +4019,7 @@ function Ec(e, t) {
4019
4019
  return { ...e, messages: [...e.messages, s] };
4020
4020
  }
4021
4021
  if (t.type === "state_history") {
4022
- const s = Cr(t), i = s.interrupt, a = s.latest, l = i === null ? cw(e.messages) : e.messages;
4022
+ const s = Tr(t), i = s.interrupt, a = s.latest, l = i === null ? cw(e.messages) : e.messages;
4023
4023
  return {
4024
4024
  ...e,
4025
4025
  messages: l,
@@ -4071,10 +4071,10 @@ function za(e, t) {
4071
4071
  function Aw(e) {
4072
4072
  if (e == null)
4073
4073
  return [];
4074
- const t = Pr(e);
4074
+ const t = _r(e);
4075
4075
  if (typeof t == "string" && t.trim())
4076
4076
  return [{ type: "text", text: t }];
4077
- const n = _r(t ?? e);
4077
+ const n = jr(t ?? e);
4078
4078
  return n ? [{ type: "text", text: n }] : [];
4079
4079
  }
4080
4080
  function Sd(e, t) {
@@ -4162,15 +4162,15 @@ function Mw({
4162
4162
  getMessages: c
4163
4163
  }) {
4164
4164
  const [d, f] = pe(null), p = Be(
4165
- () => Cr(d),
4165
+ () => Tr(d),
4166
4166
  [d]
4167
- ).checkpoints, v = dx(p), g = v.timeline, [x, b] = pe(!1), [w, S] = pe(!1), [C, y] = pe(null), T = Pe(r), E = Pe(null), N = Pe(null), _ = Pe(null), O = Pe(null), $ = Pe(null), H = Pe(/* @__PURE__ */ new Map()), Y = Pe(null);
4167
+ ).checkpoints, v = dx(p), g = v.timeline, [x, b] = pe(!1), [w, S] = pe(!1), [C, y] = pe(null), T = Pe(r), E = Pe(null), N = Pe(null), _ = Pe(null), D = Pe(null), $ = Pe(null), H = Pe(/* @__PURE__ */ new Map()), Y = Pe(null);
4168
4168
  Qe(() => {
4169
4169
  T.current = r;
4170
4170
  }, [r]);
4171
4171
  const P = le(
4172
4172
  async (I) => {
4173
- var U, D;
4173
+ var U, O;
4174
4174
  if (!I.threadId) return;
4175
4175
  const F = I.threadId;
4176
4176
  (U = I.onStart) == null || U.call(I), I.setLoading(!0);
@@ -4179,7 +4179,7 @@ function Mw({
4179
4179
  } catch (j) {
4180
4180
  if (!gc(j) && T.current === F) {
4181
4181
  const J = String(j);
4182
- (D = I.handleError) == null || D.call(I, J), n == null || n(J);
4182
+ (O = I.handleError) == null || O.call(I, J), n == null || n(J);
4183
4183
  }
4184
4184
  throw j;
4185
4185
  } finally {
@@ -4191,9 +4191,9 @@ function Mw({
4191
4191
  async (I, F) => {
4192
4192
  var J;
4193
4193
  if (!I) return;
4194
- const U = `${I}:${F ?? "latest"}`, D = H.current.get(U);
4195
- if (D)
4196
- return D;
4194
+ const U = `${I}:${F ?? "latest"}`, O = H.current.get(U);
4195
+ if (O)
4196
+ return O;
4197
4197
  (J = Y.current) == null || J.abort();
4198
4198
  const j = new AbortController();
4199
4199
  Y.current = j;
@@ -4214,10 +4214,11 @@ function Mw({
4214
4214
  );
4215
4215
  return;
4216
4216
  }
4217
- const { checkpoints: se } = Cr(re), ae = se.find((be) => be.messages && be.messages.length > 0) ?? (F ? se.find((be) => be.checkpointId === F) : null) ?? se[0];
4217
+ const { checkpoints: se } = Tr(re), ae = se.find((be) => be.messages && be.messages.length > 0) ?? (F ? se.find((be) => be.checkpointId === F) : null) ?? se[0];
4218
4218
  t((ae == null ? void 0 : ae.messages) ?? [], {
4219
4219
  checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? null,
4220
- checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? null
4220
+ checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? null,
4221
+ pendingInterrupt: (ae == null ? void 0 : ae.interrupt) ?? null
4221
4222
  }), f(re);
4222
4223
  }
4223
4224
  });
@@ -4232,14 +4233,14 @@ function Mw({
4232
4233
  [e, t, P]
4233
4234
  ), K = le(
4234
4235
  async (I, F) => {
4235
- O.current = I;
4236
+ D.current = I;
4236
4237
  try {
4237
4238
  await V(I, F);
4238
4239
  } catch (U) {
4239
4240
  if (!gc(U))
4240
4241
  throw U;
4241
4242
  } finally {
4242
- O.current === I && (O.current = null);
4243
+ D.current === I && (D.current = null);
4243
4244
  }
4244
4245
  },
4245
4246
  [V]
@@ -4252,13 +4253,14 @@ function Mw({
4252
4253
  const F = I.threadId ?? T.current;
4253
4254
  if (!F || T.current && T.current !== F)
4254
4255
  return;
4255
- const { checkpoints: U } = Cr(I);
4256
+ const { checkpoints: U } = Tr(I);
4256
4257
  if (!U.length)
4257
4258
  return;
4258
- const D = U.find((q) => q.messages && q.messages.length > 0) ?? U.find((q) => !!q.checkpointId) ?? U[0], j = _.current === F;
4259
- !l && !j && t((D == null ? void 0 : D.messages) ?? [], {
4260
- checkpointId: (D == null ? void 0 : D.checkpointId) ?? null,
4261
- checkpointNs: (D == null ? void 0 : D.checkpointNs) ?? null
4259
+ const O = U.find((q) => q.messages && q.messages.length > 0) ?? U.find((q) => !!q.checkpointId) ?? U[0], j = _.current === F;
4260
+ !l && !j && t((O == null ? void 0 : O.messages) ?? [], {
4261
+ checkpointId: (O == null ? void 0 : O.checkpointId) ?? null,
4262
+ checkpointNs: (O == null ? void 0 : O.checkpointNs) ?? null,
4263
+ pendingInterrupt: (O == null ? void 0 : O.interrupt) ?? null
4262
4264
  }), f(I), $.current = `${F}:latest`, N.current = null, _.current === F && (_.current = null);
4263
4265
  },
4264
4266
  [t, l]
@@ -4268,15 +4270,15 @@ function Mw({
4268
4270
  await P({
4269
4271
  threadId: U,
4270
4272
  setLoading: S,
4271
- action: async (D) => {
4273
+ action: async (O) => {
4272
4274
  const j = await e.getStateHistory({
4273
- threadId: D,
4275
+ threadId: O,
4274
4276
  checkpointId: I,
4275
4277
  checkpointNs: F ?? void 0
4276
4278
  });
4277
- if (T.current !== D)
4279
+ if (T.current !== O)
4278
4280
  return;
4279
- const { checkpoints: q } = Cr(j), J = q.find(
4281
+ const { checkpoints: q } = Tr(j), J = q.find(
4280
4282
  (ne) => ne.checkpointId === I && (F ? ne.checkpointNs === F : !0)
4281
4283
  );
4282
4284
  if (!J) {
@@ -4314,8 +4316,8 @@ function Mw({
4314
4316
  E.current = r;
4315
4317
  return;
4316
4318
  }
4317
- if (O.current === r) {
4318
- O.current = null, E.current = r;
4319
+ if (D.current === r) {
4320
+ D.current = null, E.current = r;
4319
4321
  return;
4320
4322
  }
4321
4323
  if (E.current === r)
@@ -4335,7 +4337,7 @@ function Mw({
4335
4337
  K
4336
4338
  ]);
4337
4339
  const B = le(() => {
4338
- f(null), b(!1), S(!1), y(null), N.current = null, _.current = null, E.current = null, $.current = null, O.current = null;
4340
+ f(null), b(!1), S(!1), y(null), N.current = null, _.current = null, E.current = null, $.current = null, D.current = null;
4339
4341
  }, []);
4340
4342
  return {
4341
4343
  threadCheckpoints: p,
@@ -4354,14 +4356,14 @@ function Mw({
4354
4356
  resetHistoryState: B
4355
4357
  };
4356
4358
  }
4357
- const Td = Lr(null), Cd = Lr(null);
4359
+ const Td = Dr(null), Cd = Dr(null);
4358
4360
  function Fs() {
4359
- const e = $r(Td);
4361
+ const e = Lr(Td);
4360
4362
  if (!e) throw new Error("useThreadState must be used within a ThreadStateProvider");
4361
4363
  return e;
4362
4364
  }
4363
4365
  function Ow() {
4364
- const e = $r(Cd);
4366
+ const e = Lr(Cd);
4365
4367
  if (!e)
4366
4368
  throw new Error("useThreadStateUpdater must be used within a ThreadStateProvider");
4367
4369
  return e;
@@ -4389,7 +4391,7 @@ function Dw({
4389
4391
  handleStateHistoryEvent: E,
4390
4392
  markSkipNextLoad: N,
4391
4393
  markStreamPendingThread: _,
4392
- resetHistoryState: O
4394
+ resetHistoryState: D
4393
4395
  } = Mw({
4394
4396
  api: a,
4395
4397
  seed: d,
@@ -4411,8 +4413,8 @@ function Dw({
4411
4413
  }
4412
4414
  );
4413
4415
  Qe(() => {
4414
- l || (d([], {}), O());
4415
- }, [l, d, O]);
4416
+ l || (d([], {}), D());
4417
+ }, [l, d, D]);
4416
4418
  const V = le(
4417
4419
  (G) => H(() => G),
4418
4420
  []
@@ -4446,7 +4448,7 @@ function Dw({
4446
4448
  handleStateHistoryEvent: E,
4447
4449
  markSkipNextLoad: N,
4448
4450
  markStreamPendingThread: _,
4449
- resetHistoryState: O,
4451
+ resetHistoryState: D,
4450
4452
  pushUser: f,
4451
4453
  onEvent: m
4452
4454
  }),
@@ -4470,7 +4472,7 @@ function Dw({
4470
4472
  E,
4471
4473
  N,
4472
4474
  _,
4473
- O,
4475
+ D,
4474
4476
  f,
4475
4477
  m
4476
4478
  ]
@@ -4513,7 +4515,7 @@ function Fw(e, t) {
4513
4515
  }
4514
4516
  throw new Error(`Message ${t} not found in timeline`);
4515
4517
  }
4516
- const Ed = Lr(null), kd = Lr(!1);
4518
+ const Ed = Dr(null), kd = Dr(!1);
4517
4519
  function Bw({
4518
4520
  children: e,
4519
4521
  initialThreadId: t = null,
@@ -4584,14 +4586,14 @@ function zw({
4584
4586
  v(z), p.current !== z.threadId && ((z.created ?? !p.current) && w(z.threadId), S(z.threadId), m(z.threadId));
4585
4587
  },
4586
4588
  [v, w, S, m, p]
4587
- ), O = le(
4589
+ ), D = le(
4588
4590
  (z) => {
4589
4591
  z.type === "thread_info" ? _(z) : z.type === "state_history" ? b(z) : z.type === "tool.end" ? i == null || i(z) : T(z);
4590
4592
  },
4591
4593
  [_, b, T, i]
4592
4594
  ), $ = le(
4593
4595
  (z) => {
4594
- a(z, O, {
4596
+ a(z, D, {
4595
4597
  onError: (M) => {
4596
4598
  console.error("[StreamingProvider] Stream error:", M), r == null || r(M);
4597
4599
  },
@@ -4603,7 +4605,7 @@ function zw({
4603
4605
  }
4604
4606
  });
4605
4607
  },
4606
- [a, O, r, o, s]
4608
+ [a, D, r, o, s]
4607
4609
  ), H = Pe(g);
4608
4610
  Qe(() => {
4609
4611
  H.current = g;
@@ -4643,7 +4645,7 @@ function zw({
4643
4645
  const je = Math.floor(Date.now() / 1e3).toString(16).padStart(8, "0"), Fe = Array.from({ length: 4 }, () => Math.floor(Math.random() * 4294967295).toString(16).padStart(8, "0")).join("").slice(0, 16);
4644
4646
  k = `${je}${Fe}`, w(k), m(k);
4645
4647
  }
4646
- const { contentParts: U, filesInfo: D } = await aw(X), j = [...U];
4648
+ const { contentParts: U, filesInfo: O } = await aw(X), j = [...U];
4647
4649
  A && j.push({ type: "text", text: G });
4648
4650
  const q = M == null ? void 0 : M.originalMessageId, J = !!(M != null && M.edit && q), ne = !F && j.length > 0;
4649
4651
  let re = null;
@@ -4655,7 +4657,7 @@ function zw({
4655
4657
  }, J ? y(re, q) : y(re));
4656
4658
  const se = F ? I : re ? [re] : [], ae = {
4657
4659
  ...B,
4658
- ...D.length ? { files_info: D } : {}
4660
+ ...O.length ? { files_info: O } : {}
4659
4661
  };
4660
4662
  se.length ? ae.messages = se : "messages" in ae || (ae.messages = []);
4661
4663
  let be = (M == null ? void 0 : M.checkpointId) ?? g.id ?? void 0, Oe = (M == null ? void 0 : M.checkpointNs) ?? g.namespace ?? void 0;
@@ -4688,12 +4690,12 @@ function zw({
4688
4690
  return /* @__PURE__ */ u.jsx(Ed.Provider, { value: K, children: e });
4689
4691
  }
4690
4692
  function Hw() {
4691
- const e = $r(Ed);
4693
+ const e = Lr(Ed);
4692
4694
  if (!e) throw new Error("useStream must be used within StreamingProvider");
4693
4695
  return e;
4694
4696
  }
4695
4697
  function EN() {
4696
- return $r(kd);
4698
+ return Lr(kd);
4697
4699
  }
4698
4700
  function Rc(e) {
4699
4701
  return typeof e == "object" && e !== null;
@@ -4762,7 +4764,7 @@ function Jr(e) {
4762
4764
  return r(...n);
4763
4765
  }, []);
4764
4766
  }
4765
- function Er(e) {
4767
+ function Cr(e) {
4766
4768
  if (!(typeof globalThis > "u"))
4767
4769
  return globalThis[e];
4768
4770
  }
@@ -4774,9 +4776,9 @@ function Vw(e) {
4774
4776
  }
4775
4777
  function Rd() {
4776
4778
  const e = [
4777
- Er("__API_BASE_URL__"),
4778
- Er("__CHAT_API_BASE_URL__"),
4779
- Er("__CHAT_API_URL__")
4779
+ Cr("__API_BASE_URL__"),
4780
+ Cr("__CHAT_API_BASE_URL__"),
4781
+ Cr("__CHAT_API_URL__")
4780
4782
  ];
4781
4783
  for (const t of e) {
4782
4784
  const n = Vw(t);
@@ -4785,9 +4787,9 @@ function Rd() {
4785
4787
  }
4786
4788
  function Id() {
4787
4789
  const e = [
4788
- Er("__API_AUTH_TOKEN__"),
4789
- Er("__CHAT_API_KEY__"),
4790
- Er("__CHAT_AUTH_TOKEN__")
4790
+ Cr("__API_AUTH_TOKEN__"),
4791
+ Cr("__CHAT_API_KEY__"),
4792
+ Cr("__CHAT_AUTH_TOKEN__")
4791
4793
  ];
4792
4794
  for (const t of e)
4793
4795
  if (typeof t == "string" && t.trim())
@@ -5068,7 +5070,7 @@ var nb = [
5068
5070
  "svg",
5069
5071
  "ul"
5070
5072
  ], me = nb.reduce((e, t) => {
5071
- const n = Ar(`Primitive.${t}`), r = h.forwardRef((o, s) => {
5073
+ const n = Nr(`Primitive.${t}`), r = h.forwardRef((o, s) => {
5072
5074
  const { asChild: i, ...a } = o, l = i ? n : t;
5073
5075
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(l, { ...a, ref: s });
5074
5076
  });
@@ -5086,14 +5088,14 @@ function Bs(e) {
5086
5088
  return /* @__PURE__ */ u.jsx(o, { scope: x, itemMap: S, collectionRef: w, children: b });
5087
5089
  };
5088
5090
  i.displayName = t;
5089
- const a = e + "CollectionSlot", l = Ar(a), c = L.forwardRef(
5091
+ const a = e + "CollectionSlot", l = Nr(a), c = L.forwardRef(
5090
5092
  (g, x) => {
5091
5093
  const { scope: b, children: w } = g, S = s(a, b), C = $e(x, S.collectionRef);
5092
5094
  return /* @__PURE__ */ u.jsx(l, { ref: C, children: w });
5093
5095
  }
5094
5096
  );
5095
5097
  c.displayName = a;
5096
- const d = e + "CollectionItemSlot", f = "data-radix-collection-item", m = Ar(d), p = L.forwardRef(
5098
+ const d = e + "CollectionItemSlot", f = "data-radix-collection-item", m = Nr(d), p = L.forwardRef(
5097
5099
  (g, x) => {
5098
5100
  const { scope: b, children: w, ...S } = g, C = L.useRef(null), y = $e(x, C), T = s(d, b);
5099
5101
  return L.useEffect(() => (T.itemMap.set(C, { ref: C, ...S }), () => void T.itemMap.delete(C))), /* @__PURE__ */ u.jsx(m, { [f]: "", ref: y, children: w });
@@ -5144,7 +5146,7 @@ var sb = "DismissableLayer", na = "dismissableLayer.update", ib = "dismissableLa
5144
5146
  layers: /* @__PURE__ */ new Set(),
5145
5147
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
5146
5148
  branches: /* @__PURE__ */ new Set()
5147
- }), zr = h.forwardRef(
5149
+ }), Br = h.forwardRef(
5148
5150
  (e, t) => {
5149
5151
  const {
5150
5152
  disableOutsidePointerEvents: n = !1,
@@ -5155,11 +5157,11 @@ var sb = "DismissableLayer", na = "dismissableLayer.update", ib = "dismissableLa
5155
5157
  onDismiss: a,
5156
5158
  ...l
5157
5159
  } = e, c = h.useContext(jd), [d, f] = h.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = h.useState({}), v = $e(t, (E) => f(E)), g = Array.from(c.layers), [x] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), b = g.indexOf(x), w = d ? g.indexOf(d) : -1, S = c.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= b, y = cb((E) => {
5158
- const N = E.target, _ = [...c.branches].some((O) => O.contains(N));
5160
+ const N = E.target, _ = [...c.branches].some((D) => D.contains(N));
5159
5161
  !C || _ || (o == null || o(E), i == null || i(E), E.defaultPrevented || a == null || a());
5160
5162
  }, m), T = ub((E) => {
5161
5163
  const N = E.target;
5162
- [...c.branches].some((O) => O.contains(N)) || (s == null || s(E), i == null || i(E), E.defaultPrevented || a == null || a());
5164
+ [...c.branches].some((D) => D.contains(N)) || (s == null || s(E), i == null || i(E), E.defaultPrevented || a == null || a());
5163
5165
  }, m);
5164
5166
  return ob((E) => {
5165
5167
  w === c.layers.size - 1 && (r == null || r(E), !E.defaultPrevented && a && (E.preventDefault(), a()));
@@ -5192,7 +5194,7 @@ var sb = "DismissableLayer", na = "dismissableLayer.update", ib = "dismissableLa
5192
5194
  );
5193
5195
  }
5194
5196
  );
5195
- zr.displayName = sb;
5197
+ Br.displayName = sb;
5196
5198
  var lb = "DismissableLayerBranch", _d = h.forwardRef((e, t) => {
5197
5199
  const n = h.useContext(jd), r = h.useRef(null), o = $e(t, r);
5198
5200
  return h.useEffect(() => {
@@ -5256,7 +5258,7 @@ function Pd(e, t, n, { discrete: r }) {
5256
5258
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
5257
5259
  t && o.addEventListener(e, t, { once: !0 }), r ? Ha(o, s) : o.dispatchEvent(s);
5258
5260
  }
5259
- var db = zr, fb = _d, ki = 0;
5261
+ var db = Br, fb = _d, ki = 0;
5260
5262
  function Ua() {
5261
5263
  h.useEffect(() => {
5262
5264
  const e = document.querySelectorAll("[data-radix-focus-guard]");
@@ -5427,7 +5429,7 @@ function jn(e, t) {
5427
5429
  function _n(e) {
5428
5430
  return e.split("-")[0];
5429
5431
  }
5430
- function Hr(e) {
5432
+ function zr(e) {
5431
5433
  return e.split("-")[1];
5432
5434
  }
5433
5435
  function Wa(e) {
@@ -5445,7 +5447,7 @@ function Ka(e) {
5445
5447
  }
5446
5448
  function kb(e, t, n) {
5447
5449
  n === void 0 && (n = !1);
5448
- const r = Hr(e), o = Ka(e), s = Va(o);
5450
+ const r = zr(e), o = Ka(e), s = Va(o);
5449
5451
  let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
5450
5452
  return t.reference[s] > t.floating[s] && (i = gs(i)), [i, gs(i)];
5451
5453
  }
@@ -5470,7 +5472,7 @@ function Ab(e, t, n) {
5470
5472
  }
5471
5473
  }
5472
5474
  function jb(e, t, n, r) {
5473
- const o = Hr(e);
5475
+ const o = zr(e);
5474
5476
  let s = Ab(_n(e), n === "start", r);
5475
5477
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(oa)))), s;
5476
5478
  }
@@ -5550,7 +5552,7 @@ function $c(e, t, n) {
5550
5552
  y: r.y
5551
5553
  };
5552
5554
  }
5553
- switch (Hr(t)) {
5555
+ switch (zr(t)) {
5554
5556
  case "start":
5555
5557
  p[i] -= m * (n && c ? -1 : 1);
5556
5558
  break;
@@ -5690,7 +5692,7 @@ const Mb = (e) => ({
5690
5692
  }, p = Ka(o), v = Va(p), g = await i.getDimensions(c), x = p === "y", b = x ? "top" : "left", w = x ? "bottom" : "right", S = x ? "clientHeight" : "clientWidth", C = s.reference[v] + s.reference[p] - m[p] - s.floating[v], y = m[p] - s.reference[p], T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
5691
5693
  let E = T ? T[S] : 0;
5692
5694
  (!E || !await (i.isElement == null ? void 0 : i.isElement(T))) && (E = a.floating[S] || s.floating[v]);
5693
- const N = C / 2 - y / 2, _ = E / 2 - g[v] / 2 - 1, O = Ln(f[b], _), $ = Ln(f[w], _), H = O, Y = E - g[v] - $, P = E / 2 - g[v] / 2 + N, V = ra(H, P, Y), K = !l.arrow && Hr(o) != null && P !== V && s.reference[v] / 2 - (P < H ? O : $) - g[v] / 2 < 0, z = K ? P < H ? P - H : P - Y : 0;
5695
+ const N = C / 2 - y / 2, _ = E / 2 - g[v] / 2 - 1, D = Ln(f[b], _), $ = Ln(f[w], _), H = D, Y = E - g[v] - $, P = E / 2 - g[v] / 2 + N, V = ra(H, P, Y), K = !l.arrow && zr(o) != null && P !== V && s.reference[v] / 2 - (P < H ? D : $) - g[v] / 2 < 0, z = K ? P < H ? P - H : P - Y : 0;
5694
5696
  return {
5695
5697
  [p]: m[p] + z,
5696
5698
  data: {
@@ -5730,12 +5732,12 @@ const Mb = (e) => ({
5730
5732
  const b = _n(o), w = Sn(a), S = _n(a) === a, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = m || (S || !g ? [gs(a)] : Rb(a)), T = v !== "none";
5731
5733
  !m && T && y.push(...jb(a, g, v, C));
5732
5734
  const E = [a, ...y], N = await lo(t, x), _ = [];
5733
- let O = ((r = s.flip) == null ? void 0 : r.overflows) || [];
5735
+ let D = ((r = s.flip) == null ? void 0 : r.overflows) || [];
5734
5736
  if (d && _.push(N[b]), f) {
5735
5737
  const P = kb(o, i, C);
5736
5738
  _.push(N[P[0]], N[P[1]]);
5737
5739
  }
5738
- if (O = [...O, {
5740
+ if (D = [...D, {
5739
5741
  placement: o,
5740
5742
  overflows: _
5741
5743
  }], !_.every((P) => P <= 0)) {
@@ -5743,22 +5745,22 @@ const Mb = (e) => ({
5743
5745
  const P = ((($ = s.flip) == null ? void 0 : $.index) || 0) + 1, V = E[P];
5744
5746
  if (V && (!(f === "alignment" ? w !== Sn(V) : !1) || // We leave the current main axis only if every placement on that axis
5745
5747
  // overflows the main axis.
5746
- O.every((M) => Sn(M.placement) === w ? M.overflows[0] > 0 : !0)))
5748
+ D.every((M) => Sn(M.placement) === w ? M.overflows[0] > 0 : !0)))
5747
5749
  return {
5748
5750
  data: {
5749
5751
  index: P,
5750
- overflows: O
5752
+ overflows: D
5751
5753
  },
5752
5754
  reset: {
5753
5755
  placement: V
5754
5756
  }
5755
5757
  };
5756
- let K = (H = O.filter((z) => z.overflows[0] <= 0).sort((z, M) => z.overflows[1] - M.overflows[1])[0]) == null ? void 0 : H.placement;
5758
+ let K = (H = D.filter((z) => z.overflows[0] <= 0).sort((z, M) => z.overflows[1] - M.overflows[1])[0]) == null ? void 0 : H.placement;
5757
5759
  if (!K)
5758
5760
  switch (p) {
5759
5761
  case "bestFit": {
5760
5762
  var Y;
5761
- const z = (Y = O.filter((M) => {
5763
+ const z = (Y = D.filter((M) => {
5762
5764
  if (T) {
5763
5765
  const k = Sn(M.placement);
5764
5766
  return k === w || // Create a bias to the `y` side axis due to horizontal
@@ -5843,7 +5845,7 @@ async function Lb(e, t) {
5843
5845
  placement: n,
5844
5846
  platform: r,
5845
5847
  elements: o
5846
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = _n(n), a = Hr(n), l = Sn(n) === "y", c = Dd.has(i) ? -1 : 1, d = s && l ? -1 : 1, f = jn(t, e);
5848
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = _n(n), a = zr(n), l = Sn(n) === "y", c = Dd.has(i) ? -1 : 1, d = s && l ? -1 : 1, f = jn(t, e);
5847
5849
  let {
5848
5850
  mainAxis: m,
5849
5851
  crossAxis: p,
@@ -6000,7 +6002,7 @@ const $b = function(e) {
6000
6002
  apply: l = () => {
6001
6003
  },
6002
6004
  ...c
6003
- } = jn(e, t), d = await lo(t, c), f = _n(o), m = Hr(o), p = Sn(o) === "y", {
6005
+ } = jn(e, t), d = await lo(t, c), f = _n(o), m = zr(o), p = Sn(o) === "y", {
6004
6006
  width: v,
6005
6007
  height: g
6006
6008
  } = s.floating;
@@ -6009,8 +6011,8 @@ const $b = function(e) {
6009
6011
  const w = g - d.top - d.bottom, S = v - d.left - d.right, C = Ln(g - d[x], w), y = Ln(v - d[b], S), T = !t.middlewareData.shift;
6010
6012
  let E = C, N = y;
6011
6013
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (N = S), (r = t.middlewareData.shift) != null && r.enabled.y && (E = w), T && !m) {
6012
- const O = Yt(d.left, 0), $ = Yt(d.right, 0), H = Yt(d.top, 0), Y = Yt(d.bottom, 0);
6013
- p ? N = v - 2 * (O !== 0 || $ !== 0 ? O + $ : Yt(d.left, d.right)) : E = g - 2 * (H !== 0 || Y !== 0 ? H + Y : Yt(d.top, d.bottom));
6014
+ const D = Yt(d.left, 0), $ = Yt(d.right, 0), H = Yt(d.top, 0), Y = Yt(d.bottom, 0);
6015
+ p ? N = v - 2 * (D !== 0 || $ !== 0 ? D + $ : Yt(d.left, d.right)) : E = g - 2 * (H !== 0 || Y !== 0 ? H + Y : Yt(d.top, d.bottom));
6014
6016
  }
6015
6017
  await l({
6016
6018
  ...t,
@@ -6029,7 +6031,7 @@ const $b = function(e) {
6029
6031
  function Us() {
6030
6032
  return typeof window < "u";
6031
6033
  }
6032
- function Ur(e) {
6034
+ function Hr(e) {
6033
6035
  return Ld(e) ? (e.nodeName || "").toLowerCase() : "#document";
6034
6036
  }
6035
6037
  function Jt(e) {
@@ -6064,7 +6066,7 @@ function No(e) {
6064
6066
  }
6065
6067
  const Ub = /* @__PURE__ */ new Set(["table", "td", "th"]);
6066
6068
  function Wb(e) {
6067
- return Ub.has(Ur(e));
6069
+ return Ub.has(Hr(e));
6068
6070
  }
6069
6071
  const Vb = [":popover-open", ":modal"];
6070
6072
  function Ws(e) {
@@ -6083,7 +6085,7 @@ function qa(e) {
6083
6085
  }
6084
6086
  function Yb(e) {
6085
6087
  let t = $n(e);
6086
- for (; En(t) && !Mr(t); ) {
6088
+ for (; En(t) && !Pr(t); ) {
6087
6089
  if (qa(t))
6088
6090
  return t;
6089
6091
  if (Ws(t))
@@ -6096,8 +6098,8 @@ function Ga() {
6096
6098
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
6097
6099
  }
6098
6100
  const Xb = /* @__PURE__ */ new Set(["html", "body", "#document"]);
6099
- function Mr(e) {
6100
- return Xb.has(Ur(e));
6101
+ function Pr(e) {
6102
+ return Xb.has(Hr(e));
6101
6103
  }
6102
6104
  function pn(e) {
6103
6105
  return Jt(e).getComputedStyle(e);
@@ -6112,7 +6114,7 @@ function Vs(e) {
6112
6114
  };
6113
6115
  }
6114
6116
  function $n(e) {
6115
- if (Ur(e) === "html")
6117
+ if (Hr(e) === "html")
6116
6118
  return e;
6117
6119
  const t = (
6118
6120
  // Step into the shadow DOM of the parent of a slotted node.
@@ -6125,7 +6127,7 @@ function $n(e) {
6125
6127
  }
6126
6128
  function $d(e) {
6127
6129
  const t = $n(e);
6128
- return Mr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : En(t) && No(t) ? t : $d(t);
6130
+ return Pr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : En(t) && No(t) ? t : $d(t);
6129
6131
  }
6130
6132
  function co(e, t, n) {
6131
6133
  var r;
@@ -6153,7 +6155,7 @@ function Fd(e) {
6153
6155
  function Ya(e) {
6154
6156
  return fn(e) ? e : e.contextElement;
6155
6157
  }
6156
- function kr(e) {
6158
+ function Er(e) {
6157
6159
  const t = Ya(e);
6158
6160
  if (!En(t))
6159
6161
  return Cn(1);
@@ -6183,14 +6185,14 @@ function sr(e, t, n, r) {
6183
6185
  t === void 0 && (t = !1), n === void 0 && (n = !1);
6184
6186
  const o = e.getBoundingClientRect(), s = Ya(e);
6185
6187
  let i = Cn(1);
6186
- t && (r ? fn(r) && (i = kr(r)) : i = kr(e));
6188
+ t && (r ? fn(r) && (i = Er(r)) : i = Er(e));
6187
6189
  const a = Zb(s, n, r) ? Bd(s) : Cn(0);
6188
6190
  let l = (o.left + a.x) / i.x, c = (o.top + a.y) / i.y, d = o.width / i.x, f = o.height / i.y;
6189
6191
  if (s) {
6190
6192
  const m = Jt(s), p = r && fn(r) ? Jt(r) : r;
6191
6193
  let v = m, g = sa(v);
6192
6194
  for (; g && r && p !== v; ) {
6193
- const x = kr(g), b = g.getBoundingClientRect(), w = pn(g), S = b.left + (g.clientLeft + parseFloat(w.paddingLeft)) * x.x, C = b.top + (g.clientTop + parseFloat(w.paddingTop)) * x.y;
6195
+ const x = Er(g), b = g.getBoundingClientRect(), w = pn(g), S = b.left + (g.clientLeft + parseFloat(w.paddingLeft)) * x.x, C = b.top + (g.clientTop + parseFloat(w.paddingTop)) * x.y;
6194
6196
  l *= x.x, c *= x.y, d *= x.x, f *= x.y, l += S, c += C, v = Jt(g), g = sa(v);
6195
6197
  }
6196
6198
  }
@@ -6227,9 +6229,9 @@ function Qb(e) {
6227
6229
  scrollTop: 0
6228
6230
  }, c = Cn(1);
6229
6231
  const d = Cn(0), f = En(r);
6230
- if ((f || !f && !s) && ((Ur(r) !== "body" || No(i)) && (l = Vs(r)), En(r))) {
6232
+ if ((f || !f && !s) && ((Hr(r) !== "body" || No(i)) && (l = Vs(r)), En(r))) {
6231
6233
  const p = sr(r);
6232
- c = kr(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
6234
+ c = Er(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
6233
6235
  }
6234
6236
  const m = i && !f && !s ? zd(i, l) : Cn(0);
6235
6237
  return {
@@ -6276,7 +6278,7 @@ function ny(e, t) {
6276
6278
  }
6277
6279
  const ry = /* @__PURE__ */ new Set(["absolute", "fixed"]);
6278
6280
  function oy(e, t) {
6279
- const n = sr(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = En(e) ? kr(e) : Cn(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, c = r * s.y;
6281
+ const n = sr(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = En(e) ? Er(e) : Cn(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, c = r * s.y;
6280
6282
  return {
6281
6283
  width: i,
6282
6284
  height: a,
@@ -6305,16 +6307,16 @@ function Uc(e, t, n) {
6305
6307
  }
6306
6308
  function Hd(e, t) {
6307
6309
  const n = $n(e);
6308
- return n === t || !fn(n) || Mr(n) ? !1 : pn(n).position === "fixed" || Hd(n, t);
6310
+ return n === t || !fn(n) || Pr(n) ? !1 : pn(n).position === "fixed" || Hd(n, t);
6309
6311
  }
6310
6312
  function sy(e, t) {
6311
6313
  const n = t.get(e);
6312
6314
  if (n)
6313
6315
  return n;
6314
- let r = co(e, [], !1).filter((a) => fn(a) && Ur(a) !== "body"), o = null;
6316
+ let r = co(e, [], !1).filter((a) => fn(a) && Hr(a) !== "body"), o = null;
6315
6317
  const s = pn(e).position === "fixed";
6316
6318
  let i = s ? $n(e) : e;
6317
- for (; fn(i) && !Mr(i); ) {
6319
+ for (; fn(i) && !Pr(i); ) {
6318
6320
  const a = pn(i), l = qa(i);
6319
6321
  !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && ry.has(o.position) || No(i) && !l && Hd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = $n(i);
6320
6322
  }
@@ -6359,7 +6361,7 @@ function ly(e, t, n) {
6359
6361
  l.x = Ks(o);
6360
6362
  }
6361
6363
  if (r || !r && !s)
6362
- if ((Ur(t) !== "body" || No(o)) && (a = Vs(t)), r) {
6364
+ if ((Hr(t) !== "body" || No(o)) && (a = Vs(t)), r) {
6363
6365
  const p = sr(t, !0, s, t);
6364
6366
  l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
6365
6367
  } else o && c();
@@ -6389,7 +6391,7 @@ function Ud(e, t) {
6389
6391
  return n;
6390
6392
  if (!En(e)) {
6391
6393
  let o = $n(e);
6392
- for (; o && !Mr(o); ) {
6394
+ for (; o && !Pr(o); ) {
6393
6395
  if (fn(o) && !Ni(o))
6394
6396
  return o;
6395
6397
  o = $n(o);
@@ -6399,7 +6401,7 @@ function Ud(e, t) {
6399
6401
  let r = Wc(e, t);
6400
6402
  for (; r && Wb(r) && Ni(r); )
6401
6403
  r = Wc(r, t);
6402
- return r && Mr(r) && Ni(r) && !qa(r) ? n : r || Yb(e) || n;
6404
+ return r && Pr(r) && Ni(r) && !qa(r) ? n : r || Yb(e) || n;
6403
6405
  }
6404
6406
  const cy = async function(e) {
6405
6407
  const t = this.getOffsetParent || Ud, n = this.getDimensions, r = await n(e.floating);
@@ -6424,7 +6426,7 @@ const dy = {
6424
6426
  getElementRects: cy,
6425
6427
  getClientRects: ey,
6426
6428
  getDimensions: ay,
6427
- getScale: kr,
6429
+ getScale: Er,
6428
6430
  isElement: fn,
6429
6431
  isRTL: uy
6430
6432
  };
@@ -6598,7 +6600,7 @@ function Ty(e) {
6598
6600
  M !== T.current && (T.current = M, g(M));
6599
6601
  }, []), S = h.useCallback((M) => {
6600
6602
  M !== E.current && (E.current = M, b(M));
6601
- }, []), C = s || v, y = i || x, T = h.useRef(null), E = h.useRef(null), N = h.useRef(d), _ = l != null, O = Ai(l), $ = Ai(o), H = Ai(c), Y = h.useCallback(() => {
6603
+ }, []), C = s || v, y = i || x, T = h.useRef(null), E = h.useRef(null), N = h.useRef(d), _ = l != null, D = Ai(l), $ = Ai(o), H = Ai(c), Y = h.useCallback(() => {
6602
6604
  if (!T.current || !E.current)
6603
6605
  return;
6604
6606
  const M = {
@@ -6631,11 +6633,11 @@ function Ty(e) {
6631
6633
  P.current = !1;
6632
6634
  }), []), os(() => {
6633
6635
  if (C && (T.current = C), y && (E.current = y), C && y) {
6634
- if (O.current)
6635
- return O.current(C, y, Y);
6636
+ if (D.current)
6637
+ return D.current(C, y, Y);
6636
6638
  Y();
6637
6639
  }
6638
- }, [C, y, Y, O, _]);
6640
+ }, [C, y, Y, D, _]);
6639
6641
  const V = h.useMemo(() => ({
6640
6642
  reference: T,
6641
6643
  floating: E,
@@ -6755,7 +6757,7 @@ function qd(e) {
6755
6757
  n(void 0);
6756
6758
  }, [e]), t;
6757
6759
  }
6758
- var Xa = "Popper", [Gd, Wr] = gn(Xa), [My, Yd] = Gd(Xa), Xd = (e) => {
6760
+ var Xa = "Popper", [Gd, Ur] = gn(Xa), [My, Yd] = Gd(Xa), Xd = (e) => {
6759
6761
  const { __scopePopper: t, children: n } = e, [r, o] = h.useState(null);
6760
6762
  return /* @__PURE__ */ u.jsx(My, { scope: t, anchor: r, onAnchorChange: o, children: n });
6761
6763
  };
@@ -6772,7 +6774,7 @@ var Jd = "PopperAnchor", Zd = h.forwardRef(
6772
6774
  Zd.displayName = Jd;
6773
6775
  var Ja = "PopperContent", [Oy, Dy] = Gd(Ja), Qd = h.forwardRef(
6774
6776
  (e, t) => {
6775
- var D, j, q, J, ne, re;
6777
+ var O, j, q, J, ne, re;
6776
6778
  const {
6777
6779
  __scopePopper: n,
6778
6780
  side: r = "bottom",
@@ -6788,8 +6790,8 @@ var Ja = "PopperContent", [Oy, Dy] = Gd(Ja), Qd = h.forwardRef(
6788
6790
  updatePositionStrategy: p = "optimized",
6789
6791
  onPlaced: v,
6790
6792
  ...g
6791
- } = e, x = Yd(Ja, n), [b, w] = h.useState(null), S = $e(t, (se) => w(se)), [C, y] = h.useState(null), T = qd(C), E = (T == null ? void 0 : T.width) ?? 0, N = (T == null ? void 0 : T.height) ?? 0, _ = r + (s !== "center" ? "-" + s : ""), O = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], H = $.length > 0, Y = {
6792
- padding: O,
6793
+ } = e, x = Yd(Ja, n), [b, w] = h.useState(null), S = $e(t, (se) => w(se)), [C, y] = h.useState(null), T = qd(C), E = (T == null ? void 0 : T.width) ?? 0, N = (T == null ? void 0 : T.height) ?? 0, _ = r + (s !== "center" ? "-" + s : ""), D = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], H = $.length > 0, Y = {
6794
+ padding: D,
6793
6795
  boundary: $.filter($y),
6794
6796
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
6795
6797
  altBoundary: H
@@ -6827,7 +6829,7 @@ var Ja = "PopperContent", [Oy, Dy] = Gd(Ja), Qd = h.forwardRef(
6827
6829
  Nt(() => {
6828
6830
  z && (X == null || X());
6829
6831
  }, [z, X]);
6830
- const A = (D = M.arrow) == null ? void 0 : D.x, B = (j = M.arrow) == null ? void 0 : j.y, I = ((q = M.arrow) == null ? void 0 : q.centerOffset) !== 0, [F, U] = h.useState();
6832
+ const A = (O = M.arrow) == null ? void 0 : O.x, B = (j = M.arrow) == null ? void 0 : j.y, I = ((q = M.arrow) == null ? void 0 : q.centerOffset) !== 0, [F, U] = h.useState();
6831
6833
  return Nt(() => {
6832
6834
  b && U(window.getComputedStyle(b).zIndex);
6833
6835
  }, [b]), /* @__PURE__ */ u.jsx(
@@ -7090,8 +7092,8 @@ var Yy = h.forwardRef((e, t) => {
7090
7092
  onFocus: ie(e.onFocus, (N) => {
7091
7093
  const _ = !y.current;
7092
7094
  if (N.target === N.currentTarget && _ && !b) {
7093
- const O = new CustomEvent(ji, Wy);
7094
- if (N.currentTarget.dispatchEvent(O), !O.defaultPrevented) {
7095
+ const D = new CustomEvent(ji, Wy);
7096
+ if (N.currentTarget.dispatchEvent(D), !D.defaultPrevented) {
7095
7097
  const $ = C().filter((K) => K.focusable), H = $.find((K) => K.active), Y = $.find((K) => K.id === g), V = [H, Y, ...$].filter(
7096
7098
  Boolean
7097
7099
  ).map((K) => K.ref.current);
@@ -7195,7 +7197,7 @@ var e0 = sf, t0 = lf, n0 = function(e) {
7195
7197
  return null;
7196
7198
  var t = Array.isArray(e) ? e[0] : e;
7197
7199
  return t.ownerDocument.body;
7198
- }, wr = /* @__PURE__ */ new WeakMap(), Wo = /* @__PURE__ */ new WeakMap(), Vo = {}, _i = 0, uf = function(e) {
7200
+ }, vr = /* @__PURE__ */ new WeakMap(), Wo = /* @__PURE__ */ new WeakMap(), Vo = {}, _i = 0, uf = function(e) {
7199
7201
  return e && (e.host || uf(e.parentNode));
7200
7202
  }, r0 = function(e, t) {
7201
7203
  return t.map(function(n) {
@@ -7219,8 +7221,8 @@ var e0 = sf, t0 = lf, n0 = function(e) {
7219
7221
  d(m);
7220
7222
  else
7221
7223
  try {
7222
- var p = m.getAttribute(r), v = p !== null && p !== "false", g = (wr.get(m) || 0) + 1, x = (s.get(m) || 0) + 1;
7223
- wr.set(m, g), s.set(m, x), i.push(m), g === 1 && v && Wo.set(m, !0), x === 1 && m.setAttribute(n, "true"), v || m.setAttribute(r, "true");
7224
+ var p = m.getAttribute(r), v = p !== null && p !== "false", g = (vr.get(m) || 0) + 1, x = (s.get(m) || 0) + 1;
7225
+ vr.set(m, g), s.set(m, x), i.push(m), g === 1 && v && Wo.set(m, !0), x === 1 && m.setAttribute(n, "true"), v || m.setAttribute(r, "true");
7224
7226
  } catch (b) {
7225
7227
  console.error("aria-hidden: cannot operate on ", m, b);
7226
7228
  }
@@ -7228,9 +7230,9 @@ var e0 = sf, t0 = lf, n0 = function(e) {
7228
7230
  };
7229
7231
  return d(t), a.clear(), _i++, function() {
7230
7232
  i.forEach(function(f) {
7231
- var m = wr.get(f) - 1, p = s.get(f) - 1;
7232
- wr.set(f, m), s.set(f, p), m || (Wo.has(f) || f.removeAttribute(r), Wo.delete(f)), p || f.removeAttribute(n);
7233
- }), _i--, _i || (wr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Wo = /* @__PURE__ */ new WeakMap(), Vo = {});
7233
+ var m = vr.get(f) - 1, p = s.get(f) - 1;
7234
+ vr.set(f, m), s.set(f, p), m || (Wo.has(f) || f.removeAttribute(r), Wo.delete(f)), p || f.removeAttribute(n);
7235
+ }), _i--, _i || (vr = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), Wo = /* @__PURE__ */ new WeakMap(), Vo = {});
7234
7236
  };
7235
7237
  }, nl = function(e, t, n) {
7236
7238
  n === void 0 && (n = "data-aria-hidden");
@@ -7468,14 +7470,14 @@ var w0 = function() {
7468
7470
  right: t[2],
7469
7471
  gap: Math.max(0, r - n + t[2] - t[0])
7470
7472
  };
7471
- }, C0 = hf(), Rr = "data-scroll-locked", E0 = function(e, t, n, r) {
7473
+ }, C0 = hf(), kr = "data-scroll-locked", E0 = function(e, t, n, r) {
7472
7474
  var o = e.left, s = e.top, i = e.right, a = e.gap;
7473
7475
  return n === void 0 && (n = "margin"), `
7474
7476
  .`.concat(i0, ` {
7475
7477
  overflow: hidden `).concat(r, `;
7476
7478
  padding-right: `).concat(a, "px ").concat(r, `;
7477
7479
  }
7478
- body[`).concat(Rr, `] {
7480
+ body[`).concat(kr, `] {
7479
7481
  overflow: hidden `).concat(r, `;
7480
7482
  overscroll-behavior: contain;
7481
7483
  `).concat([
@@ -7508,18 +7510,18 @@ var w0 = function() {
7508
7510
  margin-right: 0 `).concat(r, `;
7509
7511
  }
7510
7512
 
7511
- body[`).concat(Rr, `] {
7513
+ body[`).concat(kr, `] {
7512
7514
  `).concat(a0, ": ").concat(a, `px;
7513
7515
  }
7514
7516
  `);
7515
7517
  }, Gc = function() {
7516
- var e = parseInt(document.body.getAttribute(Rr) || "0", 10);
7518
+ var e = parseInt(document.body.getAttribute(kr) || "0", 10);
7517
7519
  return isFinite(e) ? e : 0;
7518
7520
  }, k0 = function() {
7519
7521
  h.useEffect(function() {
7520
- return document.body.setAttribute(Rr, (Gc() + 1).toString()), function() {
7522
+ return document.body.setAttribute(kr, (Gc() + 1).toString()), function() {
7521
7523
  var e = Gc() - 1;
7522
- e <= 0 ? document.body.removeAttribute(Rr) : document.body.setAttribute(Rr, e.toString());
7524
+ e <= 0 ? document.body.removeAttribute(kr) : document.body.setAttribute(kr, e.toString());
7523
7525
  };
7524
7526
  }, []);
7525
7527
  }, R0 = function(e) {
@@ -7541,7 +7543,7 @@ if (typeof window < "u")
7541
7543
  } catch {
7542
7544
  aa = !1;
7543
7545
  }
7544
- var br = aa ? { passive: !1 } : !1, I0 = function(e) {
7546
+ var wr = aa ? { passive: !1 } : !1, I0 = function(e) {
7545
7547
  return e.tagName === "TEXTAREA";
7546
7548
  }, mf = function(e, t) {
7547
7549
  if (!(e instanceof Element))
@@ -7617,7 +7619,7 @@ var br = aa ? { passive: !1 } : !1, I0 = function(e) {
7617
7619
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
7618
7620
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
7619
7621
  `);
7620
- }, L0 = 0, yr = [];
7622
+ }, L0 = 0, br = [];
7621
7623
  function $0(e) {
7622
7624
  var t = h.useRef([]), n = h.useRef([0, 0]), r = h.useRef(), o = h.useState(L0++)[0], s = h.useState(hf)[0], i = h.useRef(e);
7623
7625
  h.useEffect(function() {
@@ -7652,7 +7654,7 @@ function $0(e) {
7652
7654
  return M0(_, x, g, _ === "h" ? S : C);
7653
7655
  }, []), l = h.useCallback(function(g) {
7654
7656
  var x = g;
7655
- if (!(!yr.length || yr[yr.length - 1] !== s)) {
7657
+ if (!(!br.length || br[br.length - 1] !== s)) {
7656
7658
  var b = "deltaY" in x ? Xc(x) : qo(x), w = t.current.filter(function(y) {
7657
7659
  return y.name === x.type && (y.target === x.target || x.target === y.shadowParent) && O0(y.delta, b);
7658
7660
  })[0];
@@ -7682,14 +7684,14 @@ function $0(e) {
7682
7684
  c(g.type, qo(g), g.target, a(g, e.lockRef.current));
7683
7685
  }, []);
7684
7686
  h.useEffect(function() {
7685
- return yr.push(s), e.setCallbacks({
7687
+ return br.push(s), e.setCallbacks({
7686
7688
  onScrollCapture: f,
7687
7689
  onWheelCapture: f,
7688
7690
  onTouchMoveCapture: m
7689
- }), document.addEventListener("wheel", l, br), document.addEventListener("touchmove", l, br), document.addEventListener("touchstart", d, br), function() {
7690
- yr = yr.filter(function(g) {
7691
+ }), document.addEventListener("wheel", l, wr), document.addEventListener("touchmove", l, wr), document.addEventListener("touchstart", d, wr), function() {
7692
+ br = br.filter(function(g) {
7691
7693
  return g !== s;
7692
- }), document.removeEventListener("wheel", l, br), document.removeEventListener("touchmove", l, br), document.removeEventListener("touchstart", d, br);
7694
+ }), document.removeEventListener("wheel", l, wr), document.removeEventListener("touchmove", l, wr), document.removeEventListener("touchstart", d, wr);
7693
7695
  };
7694
7696
  }, []);
7695
7697
  var p = e.removeScrollBar, v = e.inert;
@@ -7718,9 +7720,9 @@ var la = ["Enter", " "], z0 = ["ArrowDown", "PageUp", "Home"], vf = ["ArrowUp",
7718
7720
  rtl: ["ArrowRight"]
7719
7721
  }, _o = "Menu", [uo, V0, K0] = Bs(_o), [dr, wf] = gn(_o, [
7720
7722
  K0,
7721
- Wr,
7723
+ Ur,
7722
7724
  of
7723
- ]), Ys = Wr(), bf = of(), [q0, fr] = dr(_o), [G0, Po] = dr(_o), yf = (e) => {
7725
+ ]), Ys = Ur(), bf = of(), [q0, fr] = dr(_o), [G0, Po] = dr(_o), yf = (e) => {
7724
7726
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Ys(t), [l, c] = h.useState(null), d = h.useRef(!1), f = St(s), m = zs(o);
7725
7727
  return h.useEffect(() => {
7726
7728
  const p = () => {
@@ -7807,7 +7809,7 @@ var on = "MenuContent", [J0, sl] = dr(on), Cf = h.forwardRef(
7807
7809
  onDismiss: () => n.onOpenChange(!1)
7808
7810
  }
7809
7811
  );
7810
- }), eS = Ar("MenuContent.ScrollLock"), il = h.forwardRef(
7812
+ }), eS = Nr("MenuContent.ScrollLock"), il = h.forwardRef(
7811
7813
  (e, t) => {
7812
7814
  const {
7813
7815
  __scopeMenu: n,
@@ -7824,11 +7826,11 @@ var on = "MenuContent", [J0, sl] = dr(on), Cf = h.forwardRef(
7824
7826
  onDismiss: p,
7825
7827
  disableOutsideScroll: v,
7826
7828
  ...g
7827
- } = e, x = fr(on, n), b = Po(on, n), w = Ys(n), S = bf(n), C = V0(n), [y, T] = h.useState(null), E = h.useRef(null), N = $e(t, E, x.onContentChange), _ = h.useRef(0), O = h.useRef(""), $ = h.useRef(0), H = h.useRef(null), Y = h.useRef("right"), P = h.useRef(0), V = v ? Gs : h.Fragment, K = v ? { as: eS, allowPinchZoom: !0 } : void 0, z = (k) => {
7828
- var D, j;
7829
- const G = O.current + k, X = C().filter((q) => !q.disabled), A = document.activeElement, B = (D = X.find((q) => q.ref.current === A)) == null ? void 0 : D.textValue, I = X.map((q) => q.textValue), F = fS(I, G, B), U = (j = X.find((q) => q.textValue === F)) == null ? void 0 : j.ref.current;
7829
+ } = e, x = fr(on, n), b = Po(on, n), w = Ys(n), S = bf(n), C = V0(n), [y, T] = h.useState(null), E = h.useRef(null), N = $e(t, E, x.onContentChange), _ = h.useRef(0), D = h.useRef(""), $ = h.useRef(0), H = h.useRef(null), Y = h.useRef("right"), P = h.useRef(0), V = v ? Gs : h.Fragment, K = v ? { as: eS, allowPinchZoom: !0 } : void 0, z = (k) => {
7830
+ var O, j;
7831
+ const G = D.current + k, X = C().filter((q) => !q.disabled), A = document.activeElement, B = (O = X.find((q) => q.ref.current === A)) == null ? void 0 : O.textValue, I = X.map((q) => q.textValue), F = fS(I, G, B), U = (j = X.find((q) => q.textValue === F)) == null ? void 0 : j.ref.current;
7830
7832
  (function q(J) {
7831
- O.current = J, window.clearTimeout(_.current), J !== "" && (_.current = window.setTimeout(() => q(""), 1e3));
7833
+ D.current = J, window.clearTimeout(_.current), J !== "" && (_.current = window.setTimeout(() => q(""), 1e3));
7832
7834
  })(G), U && setTimeout(() => U.focus());
7833
7835
  };
7834
7836
  h.useEffect(() => () => window.clearTimeout(_.current), []), Ua();
@@ -7840,7 +7842,7 @@ var on = "MenuContent", [J0, sl] = dr(on), Cf = h.forwardRef(
7840
7842
  J0,
7841
7843
  {
7842
7844
  scope: n,
7843
- searchRef: O,
7845
+ searchRef: D,
7844
7846
  onItemEnter: h.useCallback(
7845
7847
  (k) => {
7846
7848
  M(k) && k.preventDefault();
@@ -7875,7 +7877,7 @@ var on = "MenuContent", [J0, sl] = dr(on), Cf = h.forwardRef(
7875
7877
  }),
7876
7878
  onUnmountAutoFocus: i,
7877
7879
  children: /* @__PURE__ */ u.jsx(
7878
- zr,
7880
+ Br,
7879
7881
  {
7880
7882
  asChild: !0,
7881
7883
  disableOutsidePointerEvents: a,
@@ -7916,11 +7918,11 @@ var on = "MenuContent", [J0, sl] = dr(on), Cf = h.forwardRef(
7916
7918
  const I = E.current;
7917
7919
  if (k.target !== I || !H0.includes(k.key)) return;
7918
7920
  k.preventDefault();
7919
- const U = C().filter((D) => !D.disabled).map((D) => D.ref.current);
7921
+ const U = C().filter((O) => !O.disabled).map((O) => O.ref.current);
7920
7922
  vf.includes(k.key) && U.reverse(), uS(U);
7921
7923
  }),
7922
7924
  onBlur: ie(e.onBlur, (k) => {
7923
- k.currentTarget.contains(k.target) || (window.clearTimeout(_.current), O.current = "");
7925
+ k.currentTarget.contains(k.target) || (window.clearTimeout(_.current), D.current = "");
7924
7926
  }),
7925
7927
  onPointerMove: ie(
7926
7928
  e.onPointerMove,
@@ -8602,7 +8604,7 @@ function rT({
8602
8604
  validate: g,
8603
8605
  onValidationError: x
8604
8606
  }) {
8605
- const b = i !== void 0, [w, S] = L.useState(e), C = (b ? i : w) ?? "", [y, T] = L.useTransition(), E = L.useRef(null), N = L.useRef(0), _ = L.useRef(null), O = L.useRef("");
8607
+ const b = i !== void 0, [w, S] = L.useState(e), C = (b ? i : w) ?? "", [y, T] = L.useTransition(), E = L.useRef(null), N = L.useRef(0), _ = L.useRef(null), D = L.useRef("");
8606
8608
  L.useEffect(() => {
8607
8609
  b || (S(e ?? ""), _.current = null, E.current && (E.current.style.height = "auto", E.current.style.height = `${E.current.scrollHeight}px`));
8608
8610
  }, [e, t, b]);
@@ -8612,7 +8614,7 @@ function rT({
8612
8614
  ), P = L.useMemo(() => g ?? Y, [g, Y]), V = L.useCallback(
8613
8615
  (I) => {
8614
8616
  const F = P(I);
8615
- return H(F), x == null || x(F), O.current = I, F;
8617
+ return H(F), x == null || x(F), D.current = I, F;
8616
8618
  },
8617
8619
  [P, x]
8618
8620
  ), K = L.useCallback(() => {
@@ -8625,7 +8627,7 @@ function rT({
8625
8627
  if (!$)
8626
8628
  return;
8627
8629
  const I = (C ?? "").trim();
8628
- O.current !== I && V(I);
8630
+ D.current !== I && V(I);
8629
8631
  }, [C, $, V]);
8630
8632
  const z = L.useCallback(
8631
8633
  (I, { fromUser: F }) => {
@@ -8643,7 +8645,7 @@ function rT({
8643
8645
  id: U,
8644
8646
  shouldClear: !0
8645
8647
  }, T(() => {
8646
- var D, j, q;
8648
+ var O, j, q;
8647
8649
  try {
8648
8650
  const J = l(F);
8649
8651
  J && typeof J.then == "function" ? J.then(() => {
@@ -8652,7 +8654,7 @@ function rT({
8652
8654
  }).catch(() => {
8653
8655
  var ne;
8654
8656
  ((ne = _.current) == null ? void 0 : ne.id) === U && (_.current = null);
8655
- }) : (((D = _.current) == null ? void 0 : D.id) === U && _.current.shouldClear && (b || (S(""), E.current && (E.current.style.height = "auto"), a == null || a(""))), ((j = _.current) == null ? void 0 : j.id) === U && (_.current = null));
8657
+ }) : (((O = _.current) == null ? void 0 : O.id) === U && _.current.shouldClear && (b || (S(""), E.current && (E.current.style.height = "auto"), a == null || a(""))), ((j = _.current) == null ? void 0 : j.id) === U && (_.current = null));
8656
8658
  } catch {
8657
8659
  ((q = _.current) == null ? void 0 : q.id) === U && (_.current = null);
8658
8660
  }
@@ -8736,7 +8738,7 @@ function sT({
8736
8738
  allowEmptySend: x = !1,
8737
8739
  inputError: b = null
8738
8740
  }) {
8739
- const [w, S] = pe([]), C = Pe(null), y = Pe(null), [T, E] = pe(0), [N, _] = pe(0), [O, $] = pe(!1), [H, Y] = pe(null), [P, V] = pe(null), K = le(() => {
8741
+ const [w, S] = pe([]), C = Pe(null), y = Pe(null), [T, E] = pe(0), [N, _] = pe(0), [D, $] = pe(!1), [H, Y] = pe(null), [P, V] = pe(null), K = le(() => {
8740
8742
  C.current && (C.current.value = ""), y.current && (y.current.value = ""), E((I) => I + 1), _((I) => I + 1);
8741
8743
  }, []), z = le((I) => {
8742
8744
  S((F) => [...F, ...I]);
@@ -8748,7 +8750,7 @@ function sT({
8748
8750
  [z]
8749
8751
  ), k = le((I) => {
8750
8752
  S((F) => {
8751
- const U = F.filter((D, j) => j !== I);
8753
+ const U = F.filter((O, j) => j !== I);
8752
8754
  return U.length === 0 && K(), U;
8753
8755
  });
8754
8756
  }, [K]), G = le(
@@ -8759,8 +8761,8 @@ function sT({
8759
8761
  try {
8760
8762
  await v(F), Y(`Uploaded ${F.name} - processing through chat stream`);
8761
8763
  } catch (U) {
8762
- const D = U instanceof Error ? U.message : "Failed to upload Excel file";
8763
- V(D), g == null || g(D);
8764
+ const O = U instanceof Error ? U.message : "Failed to upload Excel file";
8765
+ V(O), g == null || g(O);
8764
8766
  } finally {
8765
8767
  $(!1), I.target.value = "", K();
8766
8768
  }
@@ -8823,12 +8825,12 @@ function sT({
8823
8825
  },
8824
8826
  N
8825
8827
  ),
8826
- O && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
8828
+ D && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
8827
8829
  /* @__PURE__ */ u.jsx(Zn, { className: "h-4 w-4 animate-spin" }),
8828
8830
  " Uploading Excel file..."
8829
8831
  ] }),
8830
- H && !O && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: H }),
8831
- P && !O && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: P })
8832
+ H && !D && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: H }),
8833
+ P && !D && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: P })
8832
8834
  ] })
8833
8835
  ] }),
8834
8836
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
@@ -8865,9 +8867,9 @@ function sT({
8865
8867
  {
8866
8868
  onClick: () => {
8867
8869
  var I;
8868
- O || (I = y.current) == null || I.click();
8870
+ D || (I = y.current) == null || I.click();
8869
8871
  },
8870
- className: `cursor-pointer ${O ? "opacity-60 pointer-events-none" : ""}`,
8872
+ className: `cursor-pointer ${D ? "opacity-60 pointer-events-none" : ""}`,
8871
8873
  children: [
8872
8874
  /* @__PURE__ */ u.jsx(Gg, { className: "h-4 w-4 mr-2" }),
8873
8875
  " Upload Excel file"
@@ -8897,7 +8899,7 @@ function sT({
8897
8899
  ] })
8898
8900
  ] });
8899
8901
  }
8900
- const iT = L.memo(sT), Qs = 0, Un = 1, Vr = 2, fp = 4;
8902
+ const iT = L.memo(sT), Qs = 0, Un = 1, Wr = 2, fp = 4;
8901
8903
  function Qc(e) {
8902
8904
  return () => e;
8903
8905
  }
@@ -8921,7 +8923,7 @@ function cT(...e) {
8921
8923
  e.map(aT);
8922
8924
  };
8923
8925
  }
8924
- function Kr() {
8926
+ function Vr() {
8925
8927
  }
8926
8928
  function ei(e, t) {
8927
8929
  return t(e), e;
@@ -8939,7 +8941,7 @@ function _e(e, t) {
8939
8941
  e(Qs, t);
8940
8942
  }
8941
8943
  function pl(e) {
8942
- e(Vr);
8944
+ e(Wr);
8943
8945
  }
8944
8946
  function yt(e) {
8945
8947
  return e(fp);
@@ -8987,7 +8989,7 @@ function Q(e, ...t) {
8987
8989
  const n = dT(...t);
8988
8990
  return (r, o) => {
8989
8991
  switch (r) {
8990
- case Vr:
8992
+ case Wr:
8991
8993
  pl(e);
8992
8994
  return;
8993
8995
  case Un:
@@ -9039,8 +9041,8 @@ function fT(e) {
9039
9041
  return function(o, s) {
9040
9042
  switch (o) {
9041
9043
  case Un:
9042
- return s ? n === s ? void 0 : (r(), n = s, t = et(e, s), t) : (r(), Kr);
9043
- case Vr:
9044
+ return s ? n === s ? void 0 : (r(), n = s, t = et(e, s), t) : (r(), Vr);
9045
+ case Wr:
9044
9046
  r(), n = null;
9045
9047
  return;
9046
9048
  }
@@ -9076,7 +9078,7 @@ function Ue() {
9076
9078
  r(n);
9077
9079
  });
9078
9080
  return;
9079
- case Vr:
9081
+ case Wr:
9080
9082
  e.splice(0, e.length);
9081
9083
  return;
9082
9084
  case Un:
@@ -9119,7 +9121,7 @@ function Rt(...e) {
9119
9121
  });
9120
9122
  }), function(s, i) {
9121
9123
  switch (s) {
9122
- case Vr: {
9124
+ case Wr: {
9123
9125
  pl(t);
9124
9126
  return;
9125
9127
  }
@@ -9134,7 +9136,7 @@ function Te(e, t = hp) {
9134
9136
  function ca(...e) {
9135
9137
  return function(t, n) {
9136
9138
  switch (t) {
9137
- case Vr:
9139
+ case Wr:
9138
9140
  return;
9139
9141
  case Un:
9140
9142
  return cT(...e.map((r) => et(r, n)));
@@ -9348,7 +9350,7 @@ function hn(e, t, n = "k") {
9348
9350
  function Xt(e, t, n) {
9349
9351
  return it(e) ? wp(t, n, 1) : t === e.k ? It(e, { k: t, v: n }) : t < e.k ? ru(It(e, { l: Xt(e.l, t, n) })) : ru(It(e, { r: Xt(e.r, t, n) }));
9350
9352
  }
9351
- function Ir() {
9353
+ function Rr() {
9352
9354
  return po;
9353
9355
  }
9354
9356
  function ti(e, t, n) {
@@ -9498,12 +9500,12 @@ function gl({ index: e }, t) {
9498
9500
  function yT() {
9499
9501
  return {
9500
9502
  groupIndices: [],
9501
- groupOffsetTree: Ir(),
9503
+ groupOffsetTree: Rr(),
9502
9504
  lastIndex: 0,
9503
9505
  lastOffset: 0,
9504
9506
  lastSize: 0,
9505
9507
  offsetTree: [],
9506
- sizeTree: Ir()
9508
+ sizeTree: Rr()
9507
9509
  };
9508
9510
  }
9509
9511
  function ST(e, t) {
@@ -9570,7 +9572,7 @@ function kT(e, [t, n, r, o]) {
9570
9572
  const { lastIndex: l, lastOffset: c, lastSize: d, offsetTree: f } = pa(e.offsetTree, a, i, o);
9571
9573
  return {
9572
9574
  groupIndices: n,
9573
- groupOffsetTree: n.reduce((m, p) => Xt(m, p, go(p, f, o)), Ir()),
9575
+ groupOffsetTree: n.reduce((m, p) => Xt(m, p, go(p, f, o)), Rr()),
9574
9576
  lastIndex: l,
9575
9577
  lastOffset: c,
9576
9578
  lastSize: d,
@@ -9646,7 +9648,7 @@ const AT = {
9646
9648
  Ce((y) => y.length > 0),
9647
9649
  Le(g, p),
9648
9650
  de(([y, T, E]) => {
9649
- const N = y.reduce((_, O, $) => Xt(_, O, go(O, T.offsetTree, E) || $), Ir());
9651
+ const N = y.reduce((_, D, $) => Xt(_, D, go(D, T.offsetTree, E) || $), Rr());
9650
9652
  return {
9651
9653
  ...T,
9652
9654
  groupIndices: y,
@@ -9732,13 +9734,13 @@ const AT = {
9732
9734
  de(([y, T]) => {
9733
9735
  const E = T.groupIndices.length > 0, N = [], _ = T.lastSize;
9734
9736
  if (E) {
9735
- const O = ho(T.sizeTree, 0);
9737
+ const D = ho(T.sizeTree, 0);
9736
9738
  let $ = 0, H = 0;
9737
9739
  for (; $ < y; ) {
9738
9740
  const P = T.groupIndices[H], V = T.groupIndices.length === H + 1 ? 1 / 0 : T.groupIndices[H + 1] - P - 1;
9739
9741
  N.push({
9740
9742
  endIndex: P,
9741
- size: O,
9743
+ size: D,
9742
9744
  startIndex: P
9743
9745
  }), N.push({
9744
9746
  endIndex: P + 1 + V - 1,
@@ -9771,10 +9773,10 @@ const AT = {
9771
9773
  ).ranges;
9772
9774
  }
9773
9775
  return Jn(T.sizeTree).reduce(
9774
- (O, { k: $, v: H }) => ({
9776
+ (D, { k: $, v: H }) => ({
9775
9777
  prevIndex: $ + y,
9776
9778
  prevSize: H,
9777
- ranges: [...O.ranges, { endIndex: $ + y - 1, size: O.prevSize, startIndex: O.prevIndex }]
9779
+ ranges: [...D.ranges, { endIndex: $ + y - 1, size: D.prevSize, startIndex: D.prevIndex }]
9778
9780
  }),
9779
9781
  {
9780
9782
  prevIndex: 0,
@@ -9804,15 +9806,15 @@ const AT = {
9804
9806
  if (T.groupIndices.length > 0) {
9805
9807
  if (it(T.sizeTree))
9806
9808
  return T;
9807
- let N = Ir();
9809
+ let N = Rr();
9808
9810
  const _ = yt(x);
9809
- let O = 0, $ = 0, H = 0;
9810
- for (; O < -y; ) {
9811
+ let D = 0, $ = 0, H = 0;
9812
+ for (; D < -y; ) {
9811
9813
  H = _[$];
9812
9814
  const Y = _[$ + 1] - H - 1;
9813
- $++, O += Y + 1;
9815
+ $++, D += Y + 1;
9814
9816
  }
9815
- if (N = Jn(T.sizeTree).reduce((Y, { k: P, v: V }) => Xt(Y, Math.max(0, P + y), V), N), O !== -y) {
9817
+ if (N = Jn(T.sizeTree).reduce((Y, { k: P, v: V }) => Xt(Y, Math.max(0, P + y), V), N), D !== -y) {
9816
9818
  const Y = ho(T.sizeTree, H);
9817
9819
  N = Xt(N, 0, Y);
9818
9820
  const P = hn(T.sizeTree, -y + 1)[1];
@@ -9824,7 +9826,7 @@ const AT = {
9824
9826
  ...pa(T.offsetTree, 0, N, E)
9825
9827
  };
9826
9828
  } else {
9827
- const N = Jn(T.sizeTree).reduce((_, { k: O, v: $ }) => Xt(_, Math.max(0, O + y), $), Ir());
9829
+ const N = Jn(T.sizeTree).reduce((_, { k: D, v: $ }) => Xt(_, Math.max(0, D + y), $), Rr());
9828
9830
  return {
9829
9831
  ...T,
9830
9832
  sizeTree: N,
@@ -9942,14 +9944,14 @@ const Mo = Xe(
9942
9944
  Le(e, s, o),
9943
9945
  de(
9944
9946
  ([
9945
- [C, y, T, E, N, _, O, $],
9947
+ [C, y, T, E, N, _, D, $],
9946
9948
  H,
9947
9949
  Y,
9948
9950
  P
9949
9951
  ]) => {
9950
9952
  const V = kp(C), { align: K, behavior: z, offset: M } = V, k = E - 1, G = Cp(V, y, k);
9951
9953
  let X = go(G, y.offsetTree, H) + _;
9952
- K === "end" ? (X += Y + hn(y.sizeTree, G)[1] - T + P, G === k && (X += O)) : K === "center" ? X += (Y + hn(y.sizeTree, G)[1] - T + P) / 2 : X -= N, M && (X += M);
9954
+ K === "end" ? (X += Y + hn(y.sizeTree, G)[1] - T + P, G === k && (X += D)) : K === "center" ? X += (Y + hn(y.sizeTree, G)[1] - T + P) / 2 : X -= N, M && (X += M);
9953
9955
  const A = (B) => {
9954
9956
  S(), B ? ($("retrying to scroll to", { location: C }, Vt.DEBUG), _e(p, C)) : (_e(v, !0), $("list did not change, scroll successful", {}, Vt.DEBUG));
9955
9957
  };
@@ -10076,7 +10078,7 @@ const xo = "up", ro = "down", MT = "none", OT = {
10076
10078
  Q(
10077
10079
  Rt(r, Te(s), Te(t), Te(e), Te(d)),
10078
10080
  Tn((w, [{ scrollHeight: S, scrollTop: C }, y, T, E, N]) => {
10079
- const _ = C + y - S > -N, O = {
10081
+ const _ = C + y - S > -N, D = {
10080
10082
  scrollHeight: S,
10081
10083
  scrollTop: C,
10082
10084
  viewportHeight: y
@@ -10087,14 +10089,14 @@ const xo = "up", ro = "down", MT = "none", OT = {
10087
10089
  atBottom: !0,
10088
10090
  atBottomBecause: H,
10089
10091
  scrollTopDelta: Y,
10090
- state: O
10092
+ state: D
10091
10093
  };
10092
10094
  }
10093
10095
  let $;
10094
- return O.scrollHeight > w.state.scrollHeight ? $ = "SIZE_INCREASED" : y < w.state.viewportHeight ? $ = "VIEWPORT_HEIGHT_DECREASING" : C < w.state.scrollTop ? $ = "SCROLLING_UPWARDS" : $ = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
10096
+ return D.scrollHeight > w.state.scrollHeight ? $ = "SIZE_INCREASED" : y < w.state.viewportHeight ? $ = "VIEWPORT_HEIGHT_DECREASING" : C < w.state.scrollTop ? $ = "SCROLLING_UPWARDS" : $ = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
10095
10097
  atBottom: !1,
10096
10098
  notAtBottomBecause: $,
10097
- state: O
10099
+ state: D
10098
10100
  };
10099
10101
  }, OT),
10100
10102
  ft((w, S) => w && w.atBottom === S.atBottom)
@@ -10360,8 +10362,8 @@ const hr = Xe(
10360
10362
  e
10361
10363
  ),
10362
10364
  Ce(([T, E, , N, , , , , , , _]) => {
10363
- const O = _ && _.length !== N;
10364
- return T && !E && !O;
10365
+ const D = _ && _.length !== N;
10366
+ return T && !E && !D;
10365
10367
  }),
10366
10368
  de(
10367
10369
  ([
@@ -10370,7 +10372,7 @@ const hr = Xe(
10370
10372
  [T, E],
10371
10373
  N,
10372
10374
  _,
10373
- O,
10375
+ D,
10374
10376
  $,
10375
10377
  H,
10376
10378
  Y,
@@ -10381,10 +10383,10 @@ const hr = Xe(
10381
10383
  if (N === 0)
10382
10384
  return { ...Li, totalCount: N };
10383
10385
  if (T === 0 && E === 0)
10384
- return k === 0 ? { ...Li, totalCount: N } : Ip(k, O, _, Y, P, V || []);
10386
+ return k === 0 ? { ...Li, totalCount: N } : Ip(k, D, _, Y, P, V || []);
10385
10387
  if (it(M))
10386
10388
  return k > 0 ? null : ls(
10387
- LT(vl(O, N), K, V),
10389
+ LT(vl(D, N), K, V),
10388
10390
  [],
10389
10391
  N,
10390
10392
  P,
@@ -10394,11 +10396,11 @@ const hr = Xe(
10394
10396
  const G = [];
10395
10397
  if (H.length > 0) {
10396
10398
  const F = H[0], U = H[H.length - 1];
10397
- let D = 0;
10399
+ let O = 0;
10398
10400
  for (const j of ti(M, F, U)) {
10399
10401
  const q = j.value, J = Math.max(j.start, F), ne = Math.min(j.end, U);
10400
10402
  for (let re = J; re <= ne; re++)
10401
- G.push({ data: V == null ? void 0 : V[re], index: re, offset: D, size: q }), D += q;
10403
+ G.push({ data: V == null ? void 0 : V[re], index: re, offset: O, size: q }), O += q;
10402
10404
  }
10403
10405
  }
10404
10406
  if (!$)
@@ -10408,11 +10410,11 @@ const hr = Xe(
10408
10410
  return null;
10409
10411
  const B = N - 1, I = ei([], (F) => {
10410
10412
  for (const U of A) {
10411
- const D = U.value;
10412
- let j = D.offset, q = U.start;
10413
- const J = D.size;
10414
- if (D.offset < T) {
10415
- q += Math.floor((T - D.offset + P) / (J + P));
10413
+ const O = U.value;
10414
+ let j = O.offset, q = U.start;
10415
+ const J = O.size;
10416
+ if (O.offset < T) {
10417
+ q += Math.floor((T - O.offset + P) / (J + P));
10416
10418
  const re = q - U.start;
10417
10419
  j += re * J + re * P;
10418
10420
  }
@@ -10556,9 +10558,9 @@ const hr = Xe(
10556
10558
  Le(t, l, n, s, o, r, a),
10557
10559
  Le(e),
10558
10560
  de(([[f, m, p, v, g, x, b, w], S]) => {
10559
- const { align: C, behavior: y, calculateViewLocation: T = FT, done: E, ...N } = f, _ = Cp(f, m, v - 1), O = go(_, m.offsetTree, S) + g + x, $ = O + hn(m.sizeTree, _)[1], H = w + x, Y = w + p - b, P = T({
10561
+ const { align: C, behavior: y, calculateViewLocation: T = FT, done: E, ...N } = f, _ = Cp(f, m, v - 1), D = go(_, m.offsetTree, S) + g + x, $ = D + hn(m.sizeTree, _)[1], H = w + x, Y = w + p - b, P = T({
10560
10562
  itemBottom: $,
10561
- itemTop: O,
10563
+ itemTop: D,
10562
10564
  locationParams: { align: C, behavior: y, ...N },
10563
10565
  viewportBottom: Y,
10564
10566
  viewportTop: H
@@ -10612,9 +10614,9 @@ const BT = (e, t) => typeof e == "function" ? cu(e(t)) : t && cu(e), zT = Xe(
10612
10614
  Q(
10613
10615
  Rt(Q(Te(t), ir(1)), l),
10614
10616
  Le(Te(v), s, a, f),
10615
- de(([[y, T], E, N, _, O]) => {
10617
+ de(([[y, T], E, N, _, D]) => {
10616
10618
  let $ = T && _, H = "auto";
10617
- return $ && (H = BT(E, N || O), $ = $ && !!H), { followOutputBehavior: H, shouldFollow: $, totalCount: y };
10619
+ return $ && (H = BT(E, N || D), $ = $ && !!H), { followOutputBehavior: H, shouldFollow: $, totalCount: y };
10618
10620
  }),
10619
10621
  Ce(({ shouldFollow: y }) => y)
10620
10622
  ),
@@ -10668,7 +10670,7 @@ const BT = (e, t) => typeof e == "function" ? cu(e(t)) : t && cu(e), zT = Xe(
10668
10670
  Q(
10669
10671
  Rt(Q(C, ir(1)), l),
10670
10672
  Le(Te(S), a, f, m),
10671
- de(([[y, T], E, N, _, O]) => T && N && (E == null ? void 0 : E({ context: O, totalCount: y, scrollingInProgress: _ }))),
10673
+ de(([[y, T], E, N, _, D]) => T && N && (E == null ? void 0 : E({ context: D, totalCount: y, scrollingInProgress: _ }))),
10672
10674
  Ce((y) => !!y),
10673
10675
  Nn(0)
10674
10676
  ),
@@ -10864,8 +10866,8 @@ const qT = Pp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10864
10866
  Tn(
10865
10867
  ([, b, w, S], [{ bottom: C, items: y, offsetBottom: T, totalCount: E }, N]) => {
10866
10868
  const _ = C + T;
10867
- let O = 0;
10868
- return w === E && b.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && b[0].originalIndex === 0 || (O = _ - S, O !== 0 && (O += N))), [O, y, E, _];
10869
+ let D = 0;
10870
+ return w === E && b.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && b[0].originalIndex === 0 || (D = _ - S, D !== 0 && (D += N))), [D, y, E, _];
10869
10871
  },
10870
10872
  [0, [], 0, 0]
10871
10873
  ),
@@ -10907,11 +10909,11 @@ const qT = Pp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10907
10909
  {
10908
10910
  let E = 0;
10909
10911
  const N = ho(C, 0);
10910
- let _ = 0, O = 0;
10912
+ let _ = 0, D = 0;
10911
10913
  for (; _ < b; ) {
10912
10914
  _++, E += N;
10913
- let $ = w.length === O + 1 ? 1 / 0 : w[O + 1] - w[O] - 1;
10914
- _ + $ > b && (E -= N, $ = b - _ + 1), _ += $, E += T($), O++;
10915
+ let $ = w.length === D + 1 ? 1 / 0 : w[D + 1] - w[D] - 1;
10916
+ _ + $ > b && (E -= N, $ = b - _ + 1), _ += $, E += T($), D++;
10915
10917
  }
10916
10918
  return E;
10917
10919
  }
@@ -10995,7 +10997,7 @@ const qT = Pp(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10995
10997
  ]) => (ve(C.rangeChanged, _.scrollSeekRangeChanged), ve(
10996
10998
  Q(
10997
10999
  _.windowViewportRect,
10998
- de((O) => O.visibleHeight)
11000
+ de((D) => D.visibleHeight)
10999
11001
  ),
11000
11002
  g.viewportHeight
11001
11003
  ), {
@@ -11137,7 +11139,7 @@ function $i(e) {
11137
11139
  function JT(e) {
11138
11140
  return "body" in e;
11139
11141
  }
11140
- function Fp(e, t, n, r = Kr, o, s) {
11142
+ function Fp(e, t, n, r = Vr, o, s) {
11141
11143
  const i = L.useRef(null), a = L.useRef(null), l = L.useRef(null), c = L.useCallback(
11142
11144
  (m) => {
11143
11145
  let p, v, g;
@@ -11198,7 +11200,7 @@ function Sl(e) {
11198
11200
  return e;
11199
11201
  }
11200
11202
  const ZT = /* @__PURE__ */ Xe(() => {
11201
- const e = oe((a) => `Item ${a}`), t = oe((a) => `Group ${a}`), n = oe({}), r = oe(Sl), o = oe("div"), s = oe(Kr), i = (a, l = null) => Ot(
11203
+ const e = oe((a) => `Item ${a}`), t = oe((a) => `Group ${a}`), n = oe({}), r = oe(Sl), o = oe("div"), s = oe(Vr), i = (a, l = null) => Ot(
11202
11204
  Q(
11203
11205
  n,
11204
11206
  de((c) => c[a]),
@@ -11231,7 +11233,7 @@ const ZT = /* @__PURE__ */ Xe(() => {
11231
11233
  n,
11232
11234
  m,
11233
11235
  f,
11234
- e ? Kr : a,
11236
+ e ? Vr : a,
11235
11237
  p,
11236
11238
  v,
11237
11239
  o,
@@ -11241,7 +11243,7 @@ const ZT = /* @__PURE__ */ Xe(() => {
11241
11243
  Tl("deviation", (P) => {
11242
11244
  b !== P && w(P);
11243
11245
  });
11244
- const S = Re("EmptyPlaceholder"), C = Re("ScrollSeekPlaceholder") || eC, y = Re("ListComponent"), T = Re("ItemComponent"), E = Re("GroupComponent"), N = Re("computeItemKey"), _ = Re("isSeeking"), O = Re("groupIndices").length > 0, $ = Re("alignToBottom"), H = Re("initialItemFinalLocationReached"), Y = e ? {} : {
11246
+ const S = Re("EmptyPlaceholder"), C = Re("ScrollSeekPlaceholder") || eC, y = Re("ListComponent"), T = Re("ItemComponent"), E = Re("GroupComponent"), N = Re("computeItemKey"), _ = Re("isSeeking"), D = Re("groupIndices").length > 0, $ = Re("alignToBottom"), H = Re("initialItemFinalLocationReached"), Y = e ? {} : {
11245
11247
  boxSizing: "border-box",
11246
11248
  ...g ? {
11247
11249
  display: "inline-block",
@@ -11299,7 +11301,7 @@ const ZT = /* @__PURE__ */ Xe(() => {
11299
11301
  key: K,
11300
11302
  style: g ? nC : Bp
11301
11303
  },
11302
- O ? l(P.index, P.groupIndex, P.data, c) : l(P.index, P.data, c)
11304
+ D ? l(P.index, P.groupIndex, P.data, c) : l(P.index, P.data, c)
11303
11305
  );
11304
11306
  })
11305
11307
  }
@@ -11511,7 +11513,7 @@ const cC = ({ children: e }) => {
11511
11513
  ] })), t = oe(null), n = oe((c) => /* @__PURE__ */ u.jsxs("td", { colSpan: 1e3, children: [
11512
11514
  "Group ",
11513
11515
  c
11514
- ] })), r = oe(null), o = oe(null), s = oe({}), i = oe(Sl), a = oe(Kr), l = (c, d = null) => Ot(
11516
+ ] })), r = oe(null), o = oe(null), s = oe({}), i = oe(Sl), a = oe(Vr), l = (c, d = null) => Ot(
11515
11517
  Q(
11516
11518
  s,
11517
11519
  de((f) => f[c]),
@@ -11584,7 +11586,7 @@ const yC = /* @__PURE__ */ Xe(
11584
11586
  { customScrollParent: x, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: S, windowViewportRect: C },
11585
11587
  y
11586
11588
  ]) => {
11587
- const T = oe(0), E = oe(0), N = oe(fu), _ = oe({ height: 0, width: 0 }), O = oe({ height: 0, width: 0 }), $ = Ue(), H = Ue(), Y = oe(0), P = oe(null), V = oe({ column: 0, row: 0 }), K = Ue(), z = Ue(), M = oe(!1), k = oe(0), G = oe(!0), X = oe(!1), A = oe(!1);
11589
+ const T = oe(0), E = oe(0), N = oe(fu), _ = oe({ height: 0, width: 0 }), D = oe({ height: 0, width: 0 }), $ = Ue(), H = Ue(), Y = oe(0), P = oe(null), V = oe({ column: 0, row: 0 }), K = Ue(), z = Ue(), M = oe(!1), k = oe(0), G = oe(!0), X = oe(!1), A = oe(!1);
11588
11590
  et(
11589
11591
  Q(
11590
11592
  v,
@@ -11596,7 +11598,7 @@ const yC = /* @__PURE__ */ Xe(
11596
11598
  }
11597
11599
  ), et(
11598
11600
  Q(
11599
- Rt(v, G, O, _, k, X),
11601
+ Rt(v, G, D, _, k, X),
11600
11602
  Ce(([j, q, J, ne, , re]) => j && !q && J.height !== 0 && ne.height !== 0 && !re)
11601
11603
  ),
11602
11604
  ([, , , , j]) => {
@@ -11620,7 +11622,7 @@ const yC = /* @__PURE__ */ Xe(
11620
11622
  Ce(([, j]) => j != null)
11621
11623
  ),
11622
11624
  ([, j]) => {
11623
- j && (_e(_, j.viewport), _e(O, j.item), _e(V, j.gap), j.scrollTop > 0 && (_e(M, !0), dn(Q(c, ir(1)), (q) => {
11625
+ j && (_e(_, j.viewport), _e(D, j.item), _e(V, j.gap), j.scrollTop > 0 && (_e(M, !0), dn(Q(c, ir(1)), (q) => {
11624
11626
  _e(M, !1);
11625
11627
  }), _e(l, { top: j.scrollTop })));
11626
11628
  }
@@ -11634,7 +11636,7 @@ const yC = /* @__PURE__ */ Xe(
11634
11636
  Q(
11635
11637
  Rt(
11636
11638
  Te(_, Yo),
11637
- Te(O, Yo),
11639
+ Te(D, Yo),
11638
11640
  Te(V, (j, q) => j && j.column === q.column && j.row === q.row),
11639
11641
  Te(c)
11640
11642
  ),
@@ -11652,7 +11654,7 @@ const yC = /* @__PURE__ */ Xe(
11652
11654
  Te(T),
11653
11655
  r,
11654
11656
  Te(V, bC),
11655
- Te(O, Yo),
11657
+ Te(D, Yo),
11656
11658
  Te(_, Yo),
11657
11659
  Te(P),
11658
11660
  Te(E),
@@ -11699,7 +11701,7 @@ const yC = /* @__PURE__ */ Xe(
11699
11701
  T
11700
11702
  ), ve(
11701
11703
  Q(
11702
- Rt(_, O, N, V),
11704
+ Rt(_, D, N, V),
11703
11705
  Ce(([j, q, { items: J }]) => J.length > 0 && q.height !== 0 && j.height !== 0),
11704
11706
  de(([j, q, { items: J }, ne]) => {
11705
11707
  const { bottom: re, top: se } = gu(j, ne, q, J);
@@ -11753,7 +11755,7 @@ const yC = /* @__PURE__ */ Xe(
11753
11755
  ve(U, p.scrollSeekRangeChanged), ve(
11754
11756
  Q(
11755
11757
  $,
11756
- Le(_, O, T, V),
11758
+ Le(_, D, T, V),
11757
11759
  de(([j, q, J, ne, re]) => {
11758
11760
  const se = kp(j), { align: ae, behavior: be, offset: Oe } = se;
11759
11761
  let We = se.index;
@@ -11764,7 +11766,7 @@ const yC = /* @__PURE__ */ Xe(
11764
11766
  ),
11765
11767
  l
11766
11768
  );
11767
- const D = Ot(
11769
+ const O = Ot(
11768
11770
  Q(
11769
11771
  N,
11770
11772
  de((j) => j.offsetBottom + j.bottom)
@@ -11787,7 +11789,7 @@ const yC = /* @__PURE__ */ Xe(
11787
11789
  headerHeight: s,
11788
11790
  increaseViewportBy: e,
11789
11791
  initialItemCount: E,
11790
- itemDimensions: O,
11792
+ itemDimensions: D,
11791
11793
  overscan: n,
11792
11794
  restoreStateFrom: z,
11793
11795
  scrollBy: i,
@@ -11808,7 +11810,7 @@ const yC = /* @__PURE__ */ Xe(
11808
11810
  gridState: N,
11809
11811
  horizontalDirection: A,
11810
11812
  initialTopMostItemIndex: k,
11811
- totalListHeight: D,
11813
+ totalListHeight: O,
11812
11814
  ...m,
11813
11815
  endReached: I,
11814
11816
  propsReady: g,
@@ -11836,7 +11838,7 @@ function ha(e, t, n, r) {
11836
11838
  return i > 0 ? i + t.row : i;
11837
11839
  }
11838
11840
  const SC = /* @__PURE__ */ Xe(() => {
11839
- const e = oe((f) => `Item ${f}`), t = oe({}), n = oe(null), r = oe("virtuoso-grid-item"), o = oe("virtuoso-grid-list"), s = oe(Sl), i = oe("div"), a = oe(Kr), l = (f, m = null) => Ot(
11841
+ const e = oe((f) => `Item ${f}`), t = oe({}), n = oe(null), r = oe("virtuoso-grid-item"), o = oe("virtuoso-grid-list"), s = oe(Sl), i = oe("div"), a = oe(Vr), l = (f, m = null) => Ot(
11840
11842
  Q(
11841
11843
  t,
11842
11844
  de((p) => p[f]),
@@ -12084,7 +12086,7 @@ var Es = "DialogOverlay", Jp = h.forwardRef(
12084
12086
  }
12085
12087
  );
12086
12088
  Jp.displayName = Es;
12087
- var MC = Ar("DialogOverlay.RemoveScroll"), OC = h.forwardRef(
12089
+ var MC = Nr("DialogOverlay.RemoveScroll"), OC = h.forwardRef(
12088
12090
  (e, t) => {
12089
12091
  const { __scopeDialog: n, ...r } = e, o = xn(Es, n);
12090
12092
  return (
@@ -12172,7 +12174,7 @@ var DC = h.forwardRef(
12172
12174
  onMountAutoFocus: o,
12173
12175
  onUnmountAutoFocus: s,
12174
12176
  children: /* @__PURE__ */ u.jsx(
12175
- zr,
12177
+ Br,
12176
12178
  {
12177
12179
  role: "dialog",
12178
12180
  id: a.contentId,
@@ -14080,7 +14082,7 @@ we.walkTokens;
14080
14082
  we.parseInline;
14081
14083
  zn.parse;
14082
14084
  Bn.lex;
14083
- function Nr({
14085
+ function Ir({
14084
14086
  content: e,
14085
14087
  className: t = "",
14086
14088
  allowHtml: n = !1,
@@ -14182,7 +14184,7 @@ function hE({ artifact: e, idx: t = 0 }) {
14182
14184
  }
14183
14185
  const mE = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
14184
14186
  function ma({ data: e }) {
14185
- return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: mE, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: _r(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: _r(e) });
14187
+ return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: mE, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: jr(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: jr(e) });
14186
14188
  }
14187
14189
  function gE({ message: e, isStreaming: t = !1 }) {
14188
14190
  const n = e.name ?? "tool", r = Be(() => {
@@ -14294,7 +14296,7 @@ function vE({
14294
14296
  if (typeof i == "string")
14295
14297
  d = /* @__PURE__ */ u.jsx("p", { className: "text-sm leading-relaxed text-blue-800/90 dark:text-blue-200/90 whitespace-pre-wrap", children: i });
14296
14298
  else {
14297
- const f = _r(i);
14299
+ const f = jr(i);
14298
14300
  d = /* @__PURE__ */ u.jsx("pre", { className: "max-h-48 overflow-auto rounded bg-blue-100/60 p-2 text-xs text-blue-900/90 dark:bg-blue-900/40 dark:text-blue-100/80", children: f });
14299
14301
  }
14300
14302
  return /* @__PURE__ */ u.jsxs(
@@ -14383,7 +14385,7 @@ function bE({
14383
14385
  }) {
14384
14386
  const s = Math.max(e.length - r, 0), i = e.substring(0, r);
14385
14387
  return /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-1", children: [
14386
- /* @__PURE__ */ u.jsx("div", { className: te("text-sm text-[hsl(var(--chat-bubble-user-text))]", o && "text-xs"), children: t ? /* @__PURE__ */ u.jsx(Nr, { content: e, allowHtml: !1 }) : /* @__PURE__ */ u.jsxs(
14388
+ /* @__PURE__ */ u.jsx("div", { className: te("text-sm text-[hsl(var(--chat-bubble-user-text))]", o && "text-xs"), children: t ? /* @__PURE__ */ u.jsx(Ir, { content: e, allowHtml: !1 }) : /* @__PURE__ */ u.jsxs(
14387
14389
  "pre",
14388
14390
  {
14389
14391
  className: te(
@@ -14575,7 +14577,7 @@ function kE(e) {
14575
14577
  const s = EE(r) ?? r[r.length - 1];
14576
14578
  if (!s)
14577
14579
  return null;
14578
- const i = s.output ?? s.payload ?? s, a = Pr(i), l = CE(a);
14580
+ const i = s.output ?? s.payload ?? s, a = _r(i), l = CE(a);
14579
14581
  return l && l.length ? {
14580
14582
  kind: "issues",
14581
14583
  value: a,
@@ -14608,7 +14610,7 @@ function RE({
14608
14610
  return /* @__PURE__ */ u.jsx(ma, { data: y });
14609
14611
  const T = typeof y == "string" ? y : (() => {
14610
14612
  try {
14611
- return _r(y);
14613
+ return jr(y);
14612
14614
  } catch {
14613
14615
  return String(y ?? "");
14614
14616
  }
@@ -14617,7 +14619,7 @@ function RE({
14617
14619
  }, d = (C) => {
14618
14620
  if (C == null) return null;
14619
14621
  const { content: y, isMarkdown: T } = ww(C);
14620
- return T ? /* @__PURE__ */ u.jsx(Nr, { content: y, className: "text-current" }) : c(C);
14622
+ return T ? /* @__PURE__ */ u.jsx(Ir, { content: y, className: "text-current" }) : c(C);
14621
14623
  }, f = (C) => /* @__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: [
14622
14624
  /* @__PURE__ */ u.jsx("div", { className: "text-[11px] font-semibold uppercase tracking-[0.4em] text-muted-foreground", children: "Structured dictionary" }),
14623
14625
  /* @__PURE__ */ u.jsx(ma, { data: C })
@@ -14630,10 +14632,10 @@ function RE({
14630
14632
  const E = (l.text ?? "").trim();
14631
14633
  if (!E)
14632
14634
  return null;
14633
- const N = Pr(E);
14635
+ const N = _r(E);
14634
14636
  return d(N);
14635
14637
  }
14636
- const C = ao(l), y = Pr(C);
14638
+ const C = ao(l), y = _r(C);
14637
14639
  return d(y);
14638
14640
  }, p = () => (a == null ? void 0 : a.kind) === "dict" ? f(a.data) : m(), g = (() => {
14639
14641
  if (r) {
@@ -14710,9 +14712,9 @@ const IE = {
14710
14712
  toolRenderers: C,
14711
14713
  toolArtifactRenderers: y
14712
14714
  }) {
14713
- const T = Sh(t, n), E = t.role === "default_message", _ = !!t.__syntheticStreaming, O = b ?? IE, $ = !E && "checkpointId" in t ? t.checkpointId ?? null : null, { attemptCount: H, attemptIndex: Y, attempts: P } = Be(
14714
- () => ux(t.id, $, O),
14715
- [t.id, $, O]
14715
+ const T = Sh(t, n), E = t.role === "default_message", _ = !!t.__syntheticStreaming, D = b ?? IE, $ = !E && "checkpointId" in t ? t.checkpointId ?? null : null, { attemptCount: H, attemptIndex: Y, attempts: P } = Be(
14716
+ () => ux(t.id, $, D),
14717
+ [t.id, $, D]
14716
14718
  ), V = S == null ? void 0 : S(t);
14717
14719
  return /* @__PURE__ */ u.jsx(
14718
14720
  "div",
@@ -14801,7 +14803,7 @@ function AE({
14801
14803
  isUserExpanded: E,
14802
14804
  setIsUserExpanded: N,
14803
14805
  isCompactLayout: _,
14804
- activeInterruptId: O,
14806
+ activeInterruptId: D,
14805
14807
  activeInterruptValue: $,
14806
14808
  iconForeground: H,
14807
14809
  toolRenderers: Y,
@@ -14830,34 +14832,34 @@ function AE({
14830
14832
  };
14831
14833
  }, [k, m]), X = Be(() => {
14832
14834
  if (!G) return null;
14833
- const { stablePart: U, tailPart: D } = G;
14834
- return !U && !D ? null : /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
14835
- U ? /* @__PURE__ */ u.jsx(Nr, { content: U, allowHtml: !1 }) : null,
14836
- D ? /* @__PURE__ */ u.jsx(Nr, { content: D, allowHtml: !1 }) : null
14835
+ const { stablePart: U, tailPart: O } = G;
14836
+ return !U && !O ? null : /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
14837
+ U ? /* @__PURE__ */ u.jsx(Ir, { content: U, allowHtml: !1 }) : null,
14838
+ O ? /* @__PURE__ */ u.jsx(Ir, { content: O, allowHtml: !1 }) : null
14837
14839
  ] });
14838
14840
  }, [G]), A = Be(() => {
14839
14841
  if (!m)
14840
14842
  return z;
14841
14843
  const U = [];
14842
- let D = !1;
14844
+ let O = !1;
14843
14845
  for (const j of z) {
14844
14846
  if (j.type === "text") {
14845
- D || (U.push({
14847
+ O || (U.push({
14846
14848
  type: "text",
14847
14849
  text: "",
14848
14850
  __streamingMarkdownAggregate: !0
14849
- }), D = !0);
14851
+ }), O = !0);
14850
14852
  continue;
14851
14853
  }
14852
14854
  U.push(j);
14853
14855
  }
14854
14856
  return U;
14855
- }, [z, m]), B = m ? A : z, I = le(({ part: U, i: D }) => {
14857
+ }, [z, m]), B = m ? A : z, I = le(({ part: U, i: O }) => {
14856
14858
  if (U.type === "text") {
14857
14859
  if (m)
14858
14860
  return null;
14859
14861
  const j = U.text ?? "", q = j.trim(), J = Io(q);
14860
- return J && C !== "tool" ? /* @__PURE__ */ u.jsx(ma, { data: J }, D) : C === "user" && y && q.length > T ? /* @__PURE__ */ u.jsx(
14862
+ return J && C !== "tool" ? /* @__PURE__ */ u.jsx(ma, { data: J }, O) : C === "user" && y && q.length > T ? /* @__PURE__ */ u.jsx(
14861
14863
  bE,
14862
14864
  {
14863
14865
  text: q,
@@ -14866,8 +14868,8 @@ function AE({
14866
14868
  previewLength: T,
14867
14869
  isCompact: _
14868
14870
  },
14869
- D
14870
- ) : /* @__PURE__ */ u.jsx(Nr, { content: j, allowHtml: !1 }, D);
14871
+ O
14872
+ ) : /* @__PURE__ */ u.jsx(Ir, { content: j, allowHtml: !1 }, O);
14871
14873
  }
14872
14874
  if (U.type === "image_url") {
14873
14875
  const j = U;
@@ -14879,7 +14881,7 @@ function AE({
14879
14881
  loading: "lazy",
14880
14882
  className: "border rounded max-h-[420px] w-auto object-contain"
14881
14883
  }
14882
- ) }, D);
14884
+ ) }, O);
14883
14885
  }
14884
14886
  if (U.type === "file") {
14885
14887
  const j = U, q = j.name || "file";
@@ -14887,24 +14889,24 @@ function AE({
14887
14889
  "a",
14888
14890
  {
14889
14891
  href: j.url,
14890
- onClick: (J) => v(J, j, D),
14892
+ onClick: (J) => v(J, j, O),
14891
14893
  className: `inline-flex items-center gap-2 rounded px-2 py-1 text-xs bg-gray-100 border hover:bg-gray-200
14892
14894
  dark:bg-background/10 dark:border-border/30 dark:hover:bg-background/20`,
14893
14895
  children: [
14894
- g[D] ? /* @__PURE__ */ u.jsx(fs, { className: "h-4 w-4 animate-spin" }) : null,
14896
+ g[O] ? /* @__PURE__ */ u.jsx(fs, { className: "h-4 w-4 animate-spin" }) : null,
14895
14897
  /* @__PURE__ */ u.jsxs("span", { className: "truncate max-w-[180px]", children: [
14896
14898
  q,
14897
- g[D] ? " (processing)" : ""
14899
+ g[O] ? " (processing)" : ""
14898
14900
  ] })
14899
14901
  ]
14900
14902
  },
14901
- D
14903
+ O
14902
14904
  );
14903
14905
  }
14904
14906
  if (U.type === "interrupt") {
14905
14907
  const j = U, q = ta(
14906
14908
  (j == null ? void 0 : j.id) ?? (j == null ? void 0 : j.interrupt_id)
14907
- ), J = !!(O && q && q === O), ne = J ? $ ?? (j == null ? void 0 : j.value) : j == null ? void 0 : j.value, re = q ? { ...j, id: q, interrupt_id: q } : j;
14909
+ ), J = !!(D && q && q === D), ne = J ? $ ?? (j == null ? void 0 : j.value) : j == null ? void 0 : j.value, re = q ? { ...j, id: q, interrupt_id: q } : j;
14908
14910
  return /* @__PURE__ */ u.jsx(
14909
14911
  vE,
14910
14912
  {
@@ -14916,12 +14918,12 @@ function AE({
14916
14918
  isActive: J,
14917
14919
  payload: ne
14918
14920
  },
14919
- D
14921
+ O
14920
14922
  );
14921
14923
  }
14922
14924
  return null;
14923
14925
  }, [
14924
- O,
14926
+ D,
14925
14927
  $,
14926
14928
  S,
14927
14929
  v,
@@ -14954,7 +14956,7 @@ function AE({
14954
14956
  e.id
14955
14957
  ) : null;
14956
14958
  if (!p) {
14957
- const U = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: B.map((D, j) => m && _E(D) ? X ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: X }, `streaming-md-${j}`) : null : /* @__PURE__ */ u.jsx(I, { part: D, i: j }, j)) });
14959
+ const U = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: B.map((O, j) => m && _E(O) ? X ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: X }, `streaming-md-${j}`) : null : /* @__PURE__ */ u.jsx(I, { part: O, i: j }, j)) });
14958
14960
  return d ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
14959
14961
  U,
14960
14962
  /* @__PURE__ */ u.jsx(wE, { className: H })
@@ -15189,12 +15191,12 @@ const Ol = Lg(function({
15189
15191
  onInterruptActionStart: E,
15190
15192
  onInterruptActionEnd: N,
15191
15193
  attemptCount: _ = 1,
15192
- attemptIndex: O = 0,
15194
+ attemptIndex: D = 0,
15193
15195
  onSelectCheckpoint: $,
15194
15196
  attemptMetas: H = []
15195
15197
  }) {
15196
15198
  const [Y, P] = pe(!1), [V, K] = pe("preview"), [z, M] = pe(!1), { currentThreadId: k } = Ro(), { respondToInterrupt: G } = Fs(), X = l === "phone" || l === "half-screen", A = t.role, B = A === "tool", I = Be(() => t.role === "default_message" ? t : null, [t]), F = !!I, U = !(r && A !== "user"), {
15197
- uploadingFiles: D,
15199
+ uploadingFiles: O,
15198
15200
  handleFileClick: j,
15199
15201
  fileViewerOpen: q,
15200
15202
  currentFileInfo: J,
@@ -15371,7 +15373,7 @@ const Ol = Lg(function({
15371
15373
  enableStreamingMarkdownBuffer: Ct,
15372
15374
  renderStreamingMarkdown: x,
15373
15375
  handleFileClick: j,
15374
- uploadingFiles: D,
15376
+ uploadingFiles: O,
15375
15377
  handleInterruptApprove: wt,
15376
15378
  handleInterruptReject: Qt,
15377
15379
  handleInterruptAlternative: At,
@@ -15388,7 +15390,7 @@ const Ol = Lg(function({
15388
15390
  toolRenderers: m,
15389
15391
  toolArtifactRenderers: p
15390
15392
  }
15391
- ), Gt = Be(() => I ? "Assistant" : Sw(t), [I, t]), Ye = rt(), Ke = A === "user" && (_ ?? 1) > 1 && typeof $ == "function", Et = (H == null ? void 0 : H.length) ?? 0, Z = Et > 0 && O < Et - 1 ? H[O + 1] : void 0, he = Et > 0 && O > 0 ? H[O - 1] : void 0, ot = le(() => {
15393
+ ), Gt = Be(() => I ? "Assistant" : Sw(t), [I, t]), Ye = rt(), Ke = A === "user" && (_ ?? 1) > 1 && typeof $ == "function", Et = (H == null ? void 0 : H.length) ?? 0, Z = Et > 0 && D < Et - 1 ? H[D + 1] : void 0, he = Et > 0 && D > 0 ? H[D - 1] : void 0, ot = le(() => {
15392
15394
  !Z || !$ || $(Z.id, void 0, !!Z.isLatestAttempt);
15393
15395
  }, [Z, $]), ge = le(() => {
15394
15396
  !he || !$ || $(he.id, void 0, !!he.isLatestAttempt);
@@ -15399,7 +15401,7 @@ const Ol = Lg(function({
15399
15401
  a && /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Assistant" })
15400
15402
  ] }),
15401
15403
  /* @__PURE__ */ u.jsx(
15402
- Nr,
15404
+ Ir,
15403
15405
  {
15404
15406
  content: I.content,
15405
15407
  className: "text-current"
@@ -15430,7 +15432,7 @@ const Ol = Lg(function({
15430
15432
  onRegenerate: gt,
15431
15433
  showCheckpointControls: Ke,
15432
15434
  attemptCount: _,
15433
- attemptIndex: O,
15435
+ attemptIndex: D,
15434
15436
  handleOlderAttemptSelect: ot,
15435
15437
  handleNewerAttemptSelect: ge,
15436
15438
  messageCreatedAt: t.createdAt,
@@ -15550,7 +15552,7 @@ const Eh = L.forwardRef(({
15550
15552
  toolRenderers: E,
15551
15553
  toolArtifactRenderers: N,
15552
15554
  checkpointIndex: _,
15553
- activeCheckpointId: O,
15555
+ activeCheckpointId: D,
15554
15556
  onSelectCheckpoint: $,
15555
15557
  createSyntheticThinkingMessage: H = !0,
15556
15558
  forceSyntheticThinking: Y = !1,
@@ -15607,7 +15609,7 @@ const Eh = L.forwardRef(({
15607
15609
  }
15608
15610
  }
15609
15611
  };
15610
- }, [a]), D = Be(() => !v || g ? !1 : "auto", [v, g]), j = Be(() => {
15612
+ }, [a]), O = Be(() => !v || g ? !1 : "auto", [v, g]), j = Be(() => {
15611
15613
  if (typeof p != "string") return null;
15612
15614
  const se = p.trim();
15613
15615
  return !se || I && I.length > 0 ? null : {
@@ -15686,7 +15688,7 @@ const Eh = L.forwardRef(({
15686
15688
  z.current = se instanceof HTMLDivElement ? se : null;
15687
15689
  },
15688
15690
  data: I,
15689
- followOutput: D,
15691
+ followOutput: O,
15690
15692
  overscan: 200,
15691
15693
  increaseViewportBy: { top: 100, bottom: 200 },
15692
15694
  defaultItemHeight: 80,
@@ -15719,7 +15721,7 @@ const Eh = L.forwardRef(({
15719
15721
  toolRenderers: E,
15720
15722
  toolArtifactRenderers: N,
15721
15723
  checkpointIndex: _,
15722
- activeCheckpointId: O,
15724
+ activeCheckpointId: D,
15723
15725
  onSelectCheckpoint: $,
15724
15726
  getMessageCustomStyles: P
15725
15727
  }
@@ -15757,14 +15759,14 @@ function io({
15757
15759
  threadId: E,
15758
15760
  messages: N,
15759
15761
  isLoading: _,
15760
- navigateToCheckpoint: O,
15762
+ navigateToCheckpoint: D,
15761
15763
  returnToLatest: $,
15762
15764
  checkpoint: H,
15763
15765
  checkpoints: Y,
15764
15766
  interrupt: P,
15765
15767
  metadata: V,
15766
15768
  checkpointIndex: K
15767
- } = Fs(), { isStreaming: z, error: M, connectionState: k, submit: G, stop: X } = Hw(), A = E ?? T ?? null, B = (H == null ? void 0 : H.id) ?? null, I = (H == null ? void 0 : H.namespace) ?? null, F = (V == null ? void 0 : V.assemblingMessageId) ?? null, U = P, [D, j] = pe(!1), [q, J] = pe(!1);
15769
+ } = Fs(), { isStreaming: z, error: M, connectionState: k, submit: G, stop: X } = Hw(), A = E ?? T ?? null, B = (H == null ? void 0 : H.id) ?? null, I = (H == null ? void 0 : H.namespace) ?? null, F = (V == null ? void 0 : V.assemblingMessageId) ?? null, U = P, [O, j] = pe(!1), [q, J] = pe(!1);
15768
15770
  Qe(() => {
15769
15771
  U || j(!1);
15770
15772
  }, [U]);
@@ -15772,7 +15774,7 @@ function io({
15772
15774
  j(!0);
15773
15775
  }, []), re = le(() => {
15774
15776
  j(!1);
15775
- }, []), se = !!U || D, [ae, be] = pe(null), [Oe, We] = pe(""), [je, Fe] = pe(null), [ut, mt] = pe(null), [Ct, Ge] = pe(!1), [Je, Ve] = pe(null), De = Pe(!1), [Ne, gt] = pe(() => ku.value), jt = Pe(Ne), rt = Pe(null), lt = le((Se) => {
15777
+ }, []), se = !!U || O, [ae, be] = pe(null), [Oe, We] = pe(""), [je, Fe] = pe(null), [ut, mt] = pe(null), [Ct, Ge] = pe(!1), [Je, Ve] = pe(null), De = Pe(!1), [Ne, gt] = pe(() => ku.value), jt = Pe(Ne), rt = Pe(null), lt = le((Se) => {
15776
15778
  ku.value = Se, gt(Se);
15777
15779
  }, []), [vt, dt] = pe(!1), wt = Pe(null), Qt = le(
15778
15780
  (Se) => {
@@ -15907,7 +15909,7 @@ function io({
15907
15909
  return;
15908
15910
  }
15909
15911
  const Ie = Y.find((xe) => xe.checkpointId === Se), ze = (Ie == null ? void 0 : Ie.checkpointNs) ?? null;
15910
- await O(Se, ze), requestAnimationFrame(() => {
15912
+ await D(Se, ze), requestAnimationFrame(() => {
15911
15913
  var xe;
15912
15914
  (xe = wt.current) == null || xe.scrollToTop();
15913
15915
  });
@@ -15920,7 +15922,7 @@ function io({
15920
15922
  Y,
15921
15923
  T,
15922
15924
  wt,
15923
- O,
15925
+ D,
15924
15926
  $
15925
15927
  ]
15926
15928
  ), ge = le(
@@ -15970,7 +15972,7 @@ function io({
15970
15972
  emptyMessage: Je ?? void 0,
15971
15973
  isNavigatingCheckpoint: vt,
15972
15974
  activeInterrupt: U,
15973
- disableInterruptActions: D,
15975
+ disableInterruptActions: O,
15974
15976
  onInterruptActionStart: ne,
15975
15977
  onInterruptActionEnd: re,
15976
15978
  showToolMessages: d,
@@ -16058,11 +16060,11 @@ function Iu(e) {
16058
16060
  function WE(e, t, n) {
16059
16061
  return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, xa(e, t, Iu(e), Iu(t), 0, 0, {});
16060
16062
  }
16061
- var Qr = '[cmdk-group=""]', Vi = '[cmdk-group-items=""]', VE = '[cmdk-group-heading=""]', Rh = '[cmdk-item=""]', Nu = `${Rh}:not([aria-disabled="true"])`, va = "cmdk-item-select", Sr = "data-value", KE = (e, t, n) => WE(e, t, n), Ih = h.createContext(void 0), Fo = () => h.useContext(Ih), Nh = h.createContext(void 0), Dl = () => h.useContext(Nh), Ah = h.createContext(void 0), jh = h.forwardRef((e, t) => {
16062
- let n = Tr(() => {
16063
+ var Qr = '[cmdk-group=""]', Vi = '[cmdk-group-items=""]', VE = '[cmdk-group-heading=""]', Rh = '[cmdk-item=""]', Nu = `${Rh}:not([aria-disabled="true"])`, va = "cmdk-item-select", yr = "data-value", KE = (e, t, n) => WE(e, t, n), Ih = h.createContext(void 0), Fo = () => h.useContext(Ih), Nh = h.createContext(void 0), Dl = () => h.useContext(Nh), Ah = h.createContext(void 0), jh = h.forwardRef((e, t) => {
16064
+ let n = Sr(() => {
16063
16065
  var A, B;
16064
16066
  return { search: "", value: (B = (A = e.value) != null ? A : e.defaultValue) != null ? B : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
16065
- }), r = Tr(() => /* @__PURE__ */ new Set()), o = Tr(() => /* @__PURE__ */ new Map()), s = Tr(() => /* @__PURE__ */ new Map()), i = Tr(() => /* @__PURE__ */ new Set()), a = _h(e), { label: l, children: c, value: d, onValueChange: f, filter: m, shouldFilter: p, loop: v, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, w = Dt(), S = Dt(), C = Dt(), y = h.useRef(null), T = rk();
16067
+ }), r = Sr(() => /* @__PURE__ */ new Set()), o = Sr(() => /* @__PURE__ */ new Map()), s = Sr(() => /* @__PURE__ */ new Map()), i = Sr(() => /* @__PURE__ */ new Set()), a = _h(e), { label: l, children: c, value: d, onValueChange: f, filter: m, shouldFilter: p, loop: v, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, w = Dt(), S = Dt(), C = Dt(), y = h.useRef(null), T = rk();
16066
16068
  lr(() => {
16067
16069
  if (d !== void 0) {
16068
16070
  let A = d.trim();
@@ -16072,9 +16074,9 @@ var Qr = '[cmdk-group=""]', Vi = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16072
16074
  T(6, Y);
16073
16075
  }, []);
16074
16076
  let E = h.useMemo(() => ({ subscribe: (A) => (i.current.add(A), () => i.current.delete(A)), snapshot: () => n.current, setState: (A, B, I) => {
16075
- var F, U, D, j;
16077
+ var F, U, O, j;
16076
16078
  if (!Object.is(n.current[A], B)) {
16077
- if (n.current[A] = B, A === "search") H(), O(), T(1, $);
16079
+ if (n.current[A] = B, A === "search") H(), D(), T(1, $);
16078
16080
  else if (A === "value") {
16079
16081
  if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
16080
16082
  let q = document.getElementById(C);
@@ -16085,7 +16087,7 @@ var Qr = '[cmdk-group=""]', Vi = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16085
16087
  n.current.selectedItemId = (q = P()) == null ? void 0 : q.id, E.emit();
16086
16088
  }), I || T(5, Y), ((U = a.current) == null ? void 0 : U.value) !== void 0) {
16087
16089
  let q = B ?? "";
16088
- (j = (D = a.current).onValueChange) == null || j.call(D, q);
16090
+ (j = (O = a.current).onValueChange) == null || j.call(O, q);
16089
16091
  return;
16090
16092
  }
16091
16093
  }
@@ -16096,10 +16098,10 @@ var Qr = '[cmdk-group=""]', Vi = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16096
16098
  } }), []), N = h.useMemo(() => ({ value: (A, B, I) => {
16097
16099
  var F;
16098
16100
  B !== ((F = s.current.get(A)) == null ? void 0 : F.value) && (s.current.set(A, { value: B, keywords: I }), n.current.filtered.items.set(A, _(B, I)), T(2, () => {
16099
- O(), E.emit();
16101
+ D(), E.emit();
16100
16102
  }));
16101
16103
  }, item: (A, B) => (r.current.add(A), B && (o.current.has(B) ? o.current.get(B).add(A) : o.current.set(B, /* @__PURE__ */ new Set([A]))), T(3, () => {
16102
- H(), O(), n.current.value || $(), E.emit();
16104
+ H(), D(), n.current.value || $(), E.emit();
16103
16105
  }), () => {
16104
16106
  s.current.delete(A), r.current.delete(A), n.current.filtered.items.delete(A);
16105
16107
  let I = P();
@@ -16114,32 +16116,32 @@ var Qr = '[cmdk-group=""]', Vi = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16114
16116
  let U = (F = (I = a.current) == null ? void 0 : I.filter) != null ? F : KE;
16115
16117
  return A ? U(A, n.current.search, B) : 0;
16116
16118
  }
16117
- function O() {
16119
+ function D() {
16118
16120
  if (!n.current.search || a.current.shouldFilter === !1) return;
16119
16121
  let A = n.current.filtered.items, B = [];
16120
16122
  n.current.filtered.groups.forEach((F) => {
16121
- let U = o.current.get(F), D = 0;
16123
+ let U = o.current.get(F), O = 0;
16122
16124
  U.forEach((j) => {
16123
16125
  let q = A.get(j);
16124
- D = Math.max(q, D);
16125
- }), B.push([F, D]);
16126
+ O = Math.max(q, O);
16127
+ }), B.push([F, O]);
16126
16128
  });
16127
16129
  let I = y.current;
16128
16130
  V().sort((F, U) => {
16129
- var D, j;
16131
+ var O, j;
16130
16132
  let q = F.getAttribute("id"), J = U.getAttribute("id");
16131
- return ((D = A.get(J)) != null ? D : 0) - ((j = A.get(q)) != null ? j : 0);
16133
+ return ((O = A.get(J)) != null ? O : 0) - ((j = A.get(q)) != null ? j : 0);
16132
16134
  }).forEach((F) => {
16133
16135
  let U = F.closest(Vi);
16134
16136
  U ? U.appendChild(F.parentElement === U ? F : F.closest(`${Vi} > *`)) : I.appendChild(F.parentElement === I ? F : F.closest(`${Vi} > *`));
16135
16137
  }), B.sort((F, U) => U[1] - F[1]).forEach((F) => {
16136
16138
  var U;
16137
- let D = (U = y.current) == null ? void 0 : U.querySelector(`${Qr}[${Sr}="${encodeURIComponent(F[0])}"]`);
16138
- D == null || D.parentElement.appendChild(D);
16139
+ let O = (U = y.current) == null ? void 0 : U.querySelector(`${Qr}[${yr}="${encodeURIComponent(F[0])}"]`);
16140
+ O == null || O.parentElement.appendChild(O);
16139
16141
  });
16140
16142
  }
16141
16143
  function $() {
16142
- let A = V().find((I) => I.getAttribute("aria-disabled") !== "true"), B = A == null ? void 0 : A.getAttribute(Sr);
16144
+ let A = V().find((I) => I.getAttribute("aria-disabled") !== "true"), B = A == null ? void 0 : A.getAttribute(yr);
16143
16145
  E.setState("value", B || void 0);
16144
16146
  }
16145
16147
  function H() {
@@ -16150,12 +16152,12 @@ var Qr = '[cmdk-group=""]', Vi = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16150
16152
  }
16151
16153
  n.current.filtered.groups = /* @__PURE__ */ new Set();
16152
16154
  let U = 0;
16153
- for (let D of r.current) {
16154
- let j = (B = (A = s.current.get(D)) == null ? void 0 : A.value) != null ? B : "", q = (F = (I = s.current.get(D)) == null ? void 0 : I.keywords) != null ? F : [], J = _(j, q);
16155
- n.current.filtered.items.set(D, J), J > 0 && U++;
16155
+ for (let O of r.current) {
16156
+ let j = (B = (A = s.current.get(O)) == null ? void 0 : A.value) != null ? B : "", q = (F = (I = s.current.get(O)) == null ? void 0 : I.keywords) != null ? F : [], J = _(j, q);
16157
+ n.current.filtered.items.set(O, J), J > 0 && U++;
16156
16158
  }
16157
- for (let [D, j] of o.current) for (let q of j) if (n.current.filtered.items.get(q) > 0) {
16158
- n.current.filtered.groups.add(D);
16159
+ for (let [O, j] of o.current) for (let q of j) if (n.current.filtered.items.get(q) > 0) {
16160
+ n.current.filtered.groups.add(O);
16159
16161
  break;
16160
16162
  }
16161
16163
  n.current.filtered.count = U;
@@ -16175,17 +16177,17 @@ var Qr = '[cmdk-group=""]', Vi = '[cmdk-group-items=""]', VE = '[cmdk-group-head
16175
16177
  }
16176
16178
  function K(A) {
16177
16179
  let B = V()[A];
16178
- B && E.setState("value", B.getAttribute(Sr));
16180
+ B && E.setState("value", B.getAttribute(yr));
16179
16181
  }
16180
16182
  function z(A) {
16181
16183
  var B;
16182
- let I = P(), F = V(), U = F.findIndex((j) => j === I), D = F[U + A];
16183
- (B = a.current) != null && B.loop && (D = U + A < 0 ? F[F.length - 1] : U + A === F.length ? F[0] : F[U + A]), D && E.setState("value", D.getAttribute(Sr));
16184
+ let I = P(), F = V(), U = F.findIndex((j) => j === I), O = F[U + A];
16185
+ (B = a.current) != null && B.loop && (O = U + A < 0 ? F[F.length - 1] : U + A === F.length ? F[0] : F[U + A]), O && E.setState("value", O.getAttribute(yr));
16184
16186
  }
16185
16187
  function M(A) {
16186
16188
  let B = P(), I = B == null ? void 0 : B.closest(Qr), F;
16187
16189
  for (; I && !F; ) I = A > 0 ? tk(I, Qr) : nk(I, Qr), F = I == null ? void 0 : I.querySelector(Nu);
16188
- F ? E.setState("value", F.getAttribute(Sr)) : z(A);
16190
+ F ? E.setState("value", F.getAttribute(yr)) : z(A);
16189
16191
  }
16190
16192
  let k = () => K(V().length - 1), G = (A) => {
16191
16193
  A.preventDefault(), A.metaKey ? k() : A.altKey ? M(1) : z(1);
@@ -16312,7 +16314,7 @@ function _h(e) {
16312
16314
  }), t;
16313
16315
  }
16314
16316
  var lr = typeof window > "u" ? h.useEffect : h.useLayoutEffect;
16315
- function Tr(e) {
16317
+ function Sr(e) {
16316
16318
  let t = h.useRef();
16317
16319
  return t.current === void 0 && (t.current = e()), t;
16318
16320
  }
@@ -16331,11 +16333,11 @@ function Ph(e, t, n, r = []) {
16331
16333
  if (typeof d == "object" && "current" in d) return d.current ? (c = d.current.textContent) == null ? void 0 : c.trim() : o.current;
16332
16334
  }
16333
16335
  })(), l = r.map((c) => c.trim());
16334
- s.value(e, a, l), (i = t.current) == null || i.setAttribute(Sr, a), o.current = a;
16336
+ s.value(e, a, l), (i = t.current) == null || i.setAttribute(yr, a), o.current = a;
16335
16337
  }), o;
16336
16338
  }
16337
16339
  var rk = () => {
16338
- let [e, t] = h.useState(), n = Tr(() => /* @__PURE__ */ new Map());
16340
+ let [e, t] = h.useState(), n = Sr(() => /* @__PURE__ */ new Map());
16339
16341
  return lr(() => {
16340
16342
  n.current.forEach((r) => r()), n.current = /* @__PURE__ */ new Map();
16341
16343
  }, [e]), (r, o) => {
@@ -16442,13 +16444,13 @@ var Ll = "ScrollArea", [Bh, _N] = gn(Ll), [lk, an] = Bh(Ll), zh = h.forwardRef(
16442
16444
  dir: o,
16443
16445
  scrollHideDelay: s = 600,
16444
16446
  ...i
16445
- } = e, [a, l] = h.useState(null), [c, d] = h.useState(null), [f, m] = h.useState(null), [p, v] = h.useState(null), [g, x] = h.useState(null), [b, w] = h.useState(0), [S, C] = h.useState(0), [y, T] = h.useState(!1), [E, N] = h.useState(!1), _ = $e(t, ($) => l($)), O = zs(o);
16447
+ } = e, [a, l] = h.useState(null), [c, d] = h.useState(null), [f, m] = h.useState(null), [p, v] = h.useState(null), [g, x] = h.useState(null), [b, w] = h.useState(0), [S, C] = h.useState(0), [y, T] = h.useState(!1), [E, N] = h.useState(!1), _ = $e(t, ($) => l($)), D = zs(o);
16446
16448
  return /* @__PURE__ */ u.jsx(
16447
16449
  lk,
16448
16450
  {
16449
16451
  scope: n,
16450
16452
  type: r,
16451
- dir: O,
16453
+ dir: D,
16452
16454
  scrollHideDelay: s,
16453
16455
  scrollArea: a,
16454
16456
  viewport: c,
@@ -16468,7 +16470,7 @@ var Ll = "ScrollArea", [Bh, _N] = gn(Ll), [lk, an] = Bh(Ll), zh = h.forwardRef(
16468
16470
  children: /* @__PURE__ */ u.jsx(
16469
16471
  me.div,
16470
16472
  {
16471
- dir: O,
16473
+ dir: D,
16472
16474
  ...i,
16473
16475
  ref: _,
16474
16476
  style: {
@@ -16610,7 +16612,7 @@ var ck = h.forwardRef((e, t) => {
16610
16612
  i(a ? c : d);
16611
16613
  }
16612
16614
  }, 10);
16613
- return Or(n.viewport, l), Or(n.content, l), /* @__PURE__ */ u.jsx(Kt, { present: r || s, children: /* @__PURE__ */ u.jsx(
16615
+ return Mr(n.viewport, l), Mr(n.content, l), /* @__PURE__ */ u.jsx(Kt, { present: r || s, children: /* @__PURE__ */ u.jsx(
16614
16616
  Fl,
16615
16617
  {
16616
16618
  "data-state": s ? "visible" : "hidden",
@@ -16767,17 +16769,17 @@ var ck = h.forwardRef((e, t) => {
16767
16769
  } = e, p = an(In, n), [v, g] = h.useState(null), x = $e(t, (_) => g(_)), b = h.useRef(null), w = h.useRef(""), S = p.viewport, C = r.content - r.viewport, y = St(d), T = St(l), E = li(f, 10);
16768
16770
  function N(_) {
16769
16771
  if (b.current) {
16770
- const O = _.clientX - b.current.left, $ = _.clientY - b.current.top;
16771
- c({ x: O, y: $ });
16772
+ const D = _.clientX - b.current.left, $ = _.clientY - b.current.top;
16773
+ c({ x: D, y: $ });
16772
16774
  }
16773
16775
  }
16774
16776
  return h.useEffect(() => {
16775
- const _ = (O) => {
16776
- const $ = O.target;
16777
- (v == null ? void 0 : v.contains($)) && y(O, C);
16777
+ const _ = (D) => {
16778
+ const $ = D.target;
16779
+ (v == null ? void 0 : v.contains($)) && y(D, C);
16778
16780
  };
16779
16781
  return document.addEventListener("wheel", _, { passive: !1 }), () => document.removeEventListener("wheel", _, { passive: !1 });
16780
- }, [S, v, C, y]), h.useEffect(T, [r, T]), Or(v, E), Or(p.content, E), /* @__PURE__ */ u.jsx(
16782
+ }, [S, v, C, y]), h.useEffect(T, [r, T]), Mr(v, E), Mr(p.content, E), /* @__PURE__ */ u.jsx(
16781
16783
  pk,
16782
16784
  {
16783
16785
  scope: n,
@@ -16798,8 +16800,8 @@ var ck = h.forwardRef((e, t) => {
16798
16800
  }),
16799
16801
  onPointerMove: ie(e.onPointerMove, N),
16800
16802
  onPointerUp: ie(e.onPointerUp, (_) => {
16801
- const O = _.target;
16802
- O.hasPointerCapture(_.pointerId) && O.releasePointerCapture(_.pointerId), document.body.style.webkitUserSelect = w.current, p.viewport && (p.viewport.style.scrollBehavior = ""), b.current = null;
16803
+ const D = _.target;
16804
+ D.hasPointerCapture(_.pointerId) && D.releasePointerCapture(_.pointerId), document.body.style.webkitUserSelect = w.current, p.viewport && (p.viewport.style.scrollBehavior = ""), b.current = null;
16803
16805
  })
16804
16806
  }
16805
16807
  )
@@ -16859,11 +16861,11 @@ var Bl = "ScrollAreaCorner", Gh = h.forwardRef(
16859
16861
  Gh.displayName = Bl;
16860
16862
  var mk = h.forwardRef((e, t) => {
16861
16863
  const { __scopeScrollArea: n, ...r } = e, o = an(Bl, n), [s, i] = h.useState(0), [a, l] = h.useState(0), c = !!(s && a);
16862
- return Or(o.scrollbarX, () => {
16864
+ return Mr(o.scrollbarX, () => {
16863
16865
  var f;
16864
16866
  const d = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
16865
16867
  o.onCornerHeightChange(d), l(d);
16866
- }), Or(o.scrollbarY, () => {
16868
+ }), Mr(o.scrollbarY, () => {
16867
16869
  var f;
16868
16870
  const d = ((f = o.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
16869
16871
  o.onCornerWidthChange(d), i(d);
@@ -16927,7 +16929,7 @@ function li(e, t) {
16927
16929
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
16928
16930
  }, [n, t]);
16929
16931
  }
16930
- function Or(e, t) {
16932
+ function Mr(e, t) {
16931
16933
  const n = St(t);
16932
16934
  Nt(() => {
16933
16935
  let r = 0;
@@ -17158,11 +17160,11 @@ function ba({
17158
17160
  setCurrentThreadId: E,
17159
17161
  isLoading: N,
17160
17162
  isLoadingSharedThreads: _,
17161
- actions: O,
17163
+ actions: D,
17162
17164
  shareInFlight: $,
17163
17165
  shareStatus: H,
17164
17166
  clearShareStatus: Y
17165
- } = Ro(), { createThread: P, deleteThread: V, renameThread: K, shareThread: z } = O, { loadThread: M } = Fs(), k = i ?? T, [G, X] = pe(Array.isArray(C) ? C : []), A = Pe(G.length > 0), B = Pe(null), I = Pe(0), [F, U] = pe(null), [D, j] = pe(""), [q, J] = pe(!1), [ne, re] = pe(!1), [se, ae] = pe(null), [be, Oe] = pe(""), We = v && v.length > 0 ? v : Rk, je = kk({ defaultView: m }), Fe = g ?? je, ut = f ?? Fe.view, mt = le(
17167
+ } = Ro(), { createThread: P, deleteThread: V, renameThread: K, shareThread: z } = D, { loadThread: M } = Fs(), k = i ?? T, [G, X] = pe(Array.isArray(C) ? C : []), A = Pe(G.length > 0), B = Pe(null), I = Pe(0), [F, U] = pe(null), [O, j] = pe(""), [q, J] = pe(!1), [ne, re] = pe(!1), [se, ae] = pe(null), [be, Oe] = pe(""), We = v && v.length > 0 ? v : Rk, je = kk({ defaultView: m }), Fe = g ?? je, ut = f ?? Fe.view, mt = le(
17166
17168
  (Z) => {
17167
17169
  f || Fe.setView(Z), p == null || p(Z);
17168
17170
  },
@@ -17241,9 +17243,9 @@ function ba({
17241
17243
  }, At = (Z, he) => {
17242
17244
  he.stopPropagation(), U(Z.threadId), j(Z.title || `Thread ${Z.threadId.slice(0, 8)}`);
17243
17245
  }, ln = async (Z) => {
17244
- if (D.trim())
17246
+ if (O.trim())
17245
17247
  try {
17246
- await K(Z, D.trim()), U(null), j("");
17248
+ await K(Z, O.trim()), U(null), j("");
17247
17249
  } catch (he) {
17248
17250
  console.error("Failed to update title:", he);
17249
17251
  }
@@ -17331,7 +17333,7 @@ function ba({
17331
17333
  thread: Z,
17332
17334
  isActive: k === Z.threadId,
17333
17335
  editingThreadId: F,
17334
- editingTitle: D,
17336
+ editingTitle: O,
17335
17337
  onSelect: dt,
17336
17338
  onStartEditing: At,
17337
17339
  onEditingTitleChange: (he) => j(he),
@@ -17659,10 +17661,10 @@ var im = Object.freeze({
17659
17661
  )
17660
17662
  );
17661
17663
  ci.displayName = _k;
17662
- var Pk = ci, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], cr = "Select", [ui, di, Dk] = Bs(cr), [qr, LN] = gn(cr, [
17664
+ var Pk = ci, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], cr = "Select", [ui, di, Dk] = Bs(cr), [Kr, LN] = gn(cr, [
17663
17665
  Dk,
17664
- Wr
17665
- ]), fi = Wr(), [Lk, Kn] = qr(cr), [$k, Fk] = qr(cr), am = (e) => {
17666
+ Ur
17667
+ ]), fi = Ur(), [Lk, Kn] = Kr(cr), [$k, Fk] = Kr(cr), am = (e) => {
17666
17668
  const {
17667
17669
  __scopeSelect: t,
17668
17670
  children: n,
@@ -17683,7 +17685,7 @@ var Pk = ci, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], c
17683
17685
  defaultProp: o ?? !1,
17684
17686
  onChange: s,
17685
17687
  caller: cr
17686
- }), [_, O] = Dn({
17688
+ }), [_, D] = Dn({
17687
17689
  prop: i,
17688
17690
  defaultProp: a,
17689
17691
  onChange: l,
@@ -17702,7 +17704,7 @@ var Pk = ci, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], c
17702
17704
  onValueNodeHasChildrenChange: y,
17703
17705
  contentId: Dt(),
17704
17706
  value: _,
17705
- onValueChange: O,
17707
+ onValueChange: D,
17706
17708
  open: E,
17707
17709
  onOpenChange: N,
17708
17710
  dir: T,
@@ -17734,7 +17736,7 @@ var Pk = ci, Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ok = [" ", "Enter"], c
17734
17736
  name: d,
17735
17737
  autoComplete: f,
17736
17738
  value: _,
17737
- onChange: (K) => O(K.target.value),
17739
+ onChange: (K) => D(K.target.value),
17738
17740
  disabled: m,
17739
17741
  form: v,
17740
17742
  children: [
@@ -17835,7 +17837,7 @@ var ur = "SelectContent", hm = h.forwardRef(
17835
17837
  }
17836
17838
  );
17837
17839
  hm.displayName = ur;
17838
- var un = 10, [mm, qn] = qr(ur), Hk = "SelectContentImpl", Uk = Ar("SelectContent.RemoveScroll"), gm = h.forwardRef(
17840
+ var un = 10, [mm, qn] = Kr(ur), Hk = "SelectContentImpl", Uk = Nr("SelectContent.RemoveScroll"), gm = h.forwardRef(
17839
17841
  (e, t) => {
17840
17842
  const {
17841
17843
  __scopeSelect: n,
@@ -17857,16 +17859,16 @@ var un = 10, [mm, qn] = qr(ur), Hk = "SelectContentImpl", Uk = Ar("SelectContent
17857
17859
  avoidCollisions: x,
17858
17860
  //
17859
17861
  ...b
17860
- } = e, w = Kn(ur, n), [S, C] = h.useState(null), [y, T] = h.useState(null), E = $e(t, (D) => C(D)), [N, _] = h.useState(null), [O, $] = h.useState(
17862
+ } = e, w = Kn(ur, n), [S, C] = h.useState(null), [y, T] = h.useState(null), E = $e(t, (O) => C(O)), [N, _] = h.useState(null), [D, $] = h.useState(
17861
17863
  null
17862
17864
  ), H = di(n), [Y, P] = h.useState(!1), V = h.useRef(!1);
17863
17865
  h.useEffect(() => {
17864
17866
  if (S) return nl(S);
17865
17867
  }, [S]), Ua();
17866
17868
  const K = h.useCallback(
17867
- (D) => {
17869
+ (O) => {
17868
17870
  const [j, ...q] = H().map((re) => re.ref.current), [J] = q.slice(-1), ne = document.activeElement;
17869
- for (const re of D)
17871
+ for (const re of O)
17870
17872
  if (re === ne || (re == null || re.scrollIntoView({ block: "nearest" }), re === j && y && (y.scrollTop = 0), re === J && y && (y.scrollTop = y.scrollHeight), re == null || re.focus(), document.activeElement !== ne)) return;
17871
17873
  },
17872
17874
  [H, y]
@@ -17880,39 +17882,39 @@ var un = 10, [mm, qn] = qr(ur), Hk = "SelectContentImpl", Uk = Ar("SelectContent
17880
17882
  const { onOpenChange: M, triggerPointerDownPosRef: k } = w;
17881
17883
  h.useEffect(() => {
17882
17884
  if (S) {
17883
- let D = { x: 0, y: 0 };
17885
+ let O = { x: 0, y: 0 };
17884
17886
  const j = (J) => {
17885
17887
  var ne, re;
17886
- D = {
17888
+ O = {
17887
17889
  x: Math.abs(Math.round(J.pageX) - (((ne = k.current) == null ? void 0 : ne.x) ?? 0)),
17888
17890
  y: Math.abs(Math.round(J.pageY) - (((re = k.current) == null ? void 0 : re.y) ?? 0))
17889
17891
  };
17890
17892
  }, q = (J) => {
17891
- D.x <= 10 && D.y <= 10 ? J.preventDefault() : S.contains(J.target) || M(!1), document.removeEventListener("pointermove", j), k.current = null;
17893
+ O.x <= 10 && O.y <= 10 ? J.preventDefault() : S.contains(J.target) || M(!1), document.removeEventListener("pointermove", j), k.current = null;
17892
17894
  };
17893
17895
  return k.current !== null && (document.addEventListener("pointermove", j), document.addEventListener("pointerup", q, { capture: !0, once: !0 })), () => {
17894
17896
  document.removeEventListener("pointermove", j), document.removeEventListener("pointerup", q, { capture: !0 });
17895
17897
  };
17896
17898
  }
17897
17899
  }, [S, M, k]), h.useEffect(() => {
17898
- const D = () => M(!1);
17899
- return window.addEventListener("blur", D), window.addEventListener("resize", D), () => {
17900
- window.removeEventListener("blur", D), window.removeEventListener("resize", D);
17900
+ const O = () => M(!1);
17901
+ return window.addEventListener("blur", O), window.addEventListener("resize", O), () => {
17902
+ window.removeEventListener("blur", O), window.removeEventListener("resize", O);
17901
17903
  };
17902
17904
  }, [M]);
17903
- const [G, X] = Pm((D) => {
17904
- const j = H().filter((ne) => !ne.disabled), q = j.find((ne) => ne.ref.current === document.activeElement), J = Mm(j, D, q);
17905
+ const [G, X] = Pm((O) => {
17906
+ const j = H().filter((ne) => !ne.disabled), q = j.find((ne) => ne.ref.current === document.activeElement), J = Mm(j, O, q);
17905
17907
  J && setTimeout(() => J.ref.current.focus());
17906
17908
  }), A = h.useCallback(
17907
- (D, j, q) => {
17909
+ (O, j, q) => {
17908
17910
  const J = !V.current && !q;
17909
- (w.value !== void 0 && w.value === j || J) && (_(D), J && (V.current = !0));
17911
+ (w.value !== void 0 && w.value === j || J) && (_(O), J && (V.current = !0));
17910
17912
  },
17911
17913
  [w.value]
17912
17914
  ), B = h.useCallback(() => S == null ? void 0 : S.focus(), [S]), I = h.useCallback(
17913
- (D, j, q) => {
17915
+ (O, j, q) => {
17914
17916
  const J = !V.current && !q;
17915
- (w.value !== void 0 && w.value === j || J) && $(D);
17917
+ (w.value !== void 0 && w.value === j || J) && $(O);
17916
17918
  },
17917
17919
  [w.value]
17918
17920
  ), F = r === "popper" ? ya : xm, U = F === ya ? {
@@ -17939,7 +17941,7 @@ var un = 10, [mm, qn] = qr(ur), Hk = "SelectContentImpl", Uk = Ar("SelectContent
17939
17941
  onItemLeave: B,
17940
17942
  itemTextRefCallback: I,
17941
17943
  focusSelectedItem: z,
17942
- selectedItemText: O,
17944
+ selectedItemText: D,
17943
17945
  position: r,
17944
17946
  isPositioned: Y,
17945
17947
  searchRef: G,
@@ -17948,21 +17950,21 @@ var un = 10, [mm, qn] = qr(ur), Hk = "SelectContentImpl", Uk = Ar("SelectContent
17948
17950
  {
17949
17951
  asChild: !0,
17950
17952
  trapped: w.open,
17951
- onMountAutoFocus: (D) => {
17952
- D.preventDefault();
17953
+ onMountAutoFocus: (O) => {
17954
+ O.preventDefault();
17953
17955
  },
17954
- onUnmountAutoFocus: ie(o, (D) => {
17956
+ onUnmountAutoFocus: ie(o, (O) => {
17955
17957
  var j;
17956
- (j = w.trigger) == null || j.focus({ preventScroll: !0 }), D.preventDefault();
17958
+ (j = w.trigger) == null || j.focus({ preventScroll: !0 }), O.preventDefault();
17957
17959
  }),
17958
17960
  children: /* @__PURE__ */ u.jsx(
17959
- zr,
17961
+ Br,
17960
17962
  {
17961
17963
  asChild: !0,
17962
17964
  disableOutsidePointerEvents: !0,
17963
17965
  onEscapeKeyDown: s,
17964
17966
  onPointerDownOutside: i,
17965
- onFocusOutside: (D) => D.preventDefault(),
17967
+ onFocusOutside: (O) => O.preventDefault(),
17966
17968
  onDismiss: () => w.onOpenChange(!1),
17967
17969
  children: /* @__PURE__ */ u.jsx(
17968
17970
  F,
@@ -17971,7 +17973,7 @@ var un = 10, [mm, qn] = qr(ur), Hk = "SelectContentImpl", Uk = Ar("SelectContent
17971
17973
  id: w.contentId,
17972
17974
  "data-state": w.open ? "open" : "closed",
17973
17975
  dir: w.dir,
17974
- onContextMenu: (D) => D.preventDefault(),
17976
+ onContextMenu: (O) => O.preventDefault(),
17975
17977
  ...b,
17976
17978
  ...U,
17977
17979
  onPlaced: () => P(!0),
@@ -17984,15 +17986,15 @@ var un = 10, [mm, qn] = qr(ur), Hk = "SelectContentImpl", Uk = Ar("SelectContent
17984
17986
  outline: "none",
17985
17987
  ...b.style
17986
17988
  },
17987
- onKeyDown: ie(b.onKeyDown, (D) => {
17988
- const j = D.ctrlKey || D.altKey || D.metaKey;
17989
- if (D.key === "Tab" && D.preventDefault(), !j && D.key.length === 1 && X(D.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(D.key)) {
17989
+ onKeyDown: ie(b.onKeyDown, (O) => {
17990
+ const j = O.ctrlKey || O.altKey || O.metaKey;
17991
+ if (O.key === "Tab" && O.preventDefault(), !j && O.key.length === 1 && X(O.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(O.key)) {
17990
17992
  let J = H().filter((ne) => !ne.disabled).map((ne) => ne.ref.current);
17991
- if (["ArrowUp", "End"].includes(D.key) && (J = J.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(D.key)) {
17992
- const ne = D.target, re = J.indexOf(ne);
17993
+ if (["ArrowUp", "End"].includes(O.key) && (J = J.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(O.key)) {
17994
+ const ne = O.target, re = J.indexOf(ne);
17993
17995
  J = J.slice(re + 1);
17994
17996
  }
17995
- setTimeout(() => K(J)), D.preventDefault();
17997
+ setTimeout(() => K(J)), O.preventDefault();
17996
17998
  }
17997
17999
  })
17998
18000
  }
@@ -18009,9 +18011,9 @@ gm.displayName = Hk;
18009
18011
  var Wk = "SelectItemAlignedPosition", xm = h.forwardRef((e, t) => {
18010
18012
  const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Kn(ur, n), i = qn(ur, n), [a, l] = h.useState(null), [c, d] = h.useState(null), f = $e(t, (E) => d(E)), m = di(n), p = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = i, S = h.useCallback(() => {
18011
18013
  if (s.trigger && s.valueNode && a && c && g && x && b) {
18012
- const E = s.trigger.getBoundingClientRect(), N = c.getBoundingClientRect(), _ = s.valueNode.getBoundingClientRect(), O = b.getBoundingClientRect();
18014
+ const E = s.trigger.getBoundingClientRect(), N = c.getBoundingClientRect(), _ = s.valueNode.getBoundingClientRect(), D = b.getBoundingClientRect();
18013
18015
  if (s.dir !== "rtl") {
18014
- const ne = O.left - N.left, re = _.left - ne, se = E.left - re, ae = E.width + se, be = Math.max(ae, N.width), Oe = window.innerWidth - un, We = wa(re, [
18016
+ const ne = D.left - N.left, re = _.left - ne, se = E.left - re, ae = E.width + se, be = Math.max(ae, N.width), Oe = window.innerWidth - un, We = wa(re, [
18015
18017
  un,
18016
18018
  // Prevents the content from going off the starting edge of the
18017
18019
  // viewport. It may still go off the ending edge, but this can be
@@ -18022,13 +18024,13 @@ var Wk = "SelectItemAlignedPosition", xm = h.forwardRef((e, t) => {
18022
18024
  ]);
18023
18025
  a.style.minWidth = ae + "px", a.style.left = We + "px";
18024
18026
  } else {
18025
- const ne = N.right - O.right, re = window.innerWidth - _.right - ne, se = window.innerWidth - E.right - re, ae = E.width + se, be = Math.max(ae, N.width), Oe = window.innerWidth - un, We = wa(re, [
18027
+ const ne = N.right - D.right, re = window.innerWidth - _.right - ne, se = window.innerWidth - E.right - re, ae = E.width + se, be = Math.max(ae, N.width), Oe = window.innerWidth - un, We = wa(re, [
18026
18028
  un,
18027
18029
  Math.max(un, Oe - be)
18028
18030
  ]);
18029
18031
  a.style.minWidth = ae + "px", a.style.right = We + "px";
18030
18032
  }
18031
- const $ = m(), H = window.innerHeight - un * 2, Y = g.scrollHeight, P = window.getComputedStyle(c), V = parseInt(P.borderTopWidth, 10), K = parseInt(P.paddingTop, 10), z = parseInt(P.borderBottomWidth, 10), M = parseInt(P.paddingBottom, 10), k = V + K + Y + M + z, G = Math.min(x.offsetHeight * 5, k), X = window.getComputedStyle(g), A = parseInt(X.paddingTop, 10), B = parseInt(X.paddingBottom, 10), I = E.top + E.height / 2 - un, F = H - I, U = x.offsetHeight / 2, D = x.offsetTop + U, j = V + K + D, q = k - j;
18033
+ const $ = m(), H = window.innerHeight - un * 2, Y = g.scrollHeight, P = window.getComputedStyle(c), V = parseInt(P.borderTopWidth, 10), K = parseInt(P.paddingTop, 10), z = parseInt(P.borderBottomWidth, 10), M = parseInt(P.paddingBottom, 10), k = V + K + Y + M + z, G = Math.min(x.offsetHeight * 5, k), X = window.getComputedStyle(g), A = parseInt(X.paddingTop, 10), B = parseInt(X.paddingBottom, 10), I = E.top + E.height / 2 - un, F = H - I, U = x.offsetHeight / 2, O = x.offsetTop + U, j = V + K + O, q = k - j;
18032
18034
  if (j <= I) {
18033
18035
  const ne = $.length > 0 && x === $[$.length - 1].ref.current;
18034
18036
  a.style.bottom = "0px";
@@ -18140,7 +18142,7 @@ var Vk = "SelectPopperPosition", ya = h.forwardRef((e, t) => {
18140
18142
  );
18141
18143
  });
18142
18144
  ya.displayName = Vk;
18143
- var [Kk, zl] = qr(ur, {}), Sa = "SelectViewport", vm = h.forwardRef(
18145
+ var [Kk, zl] = Kr(ur, {}), Sa = "SelectViewport", vm = h.forwardRef(
18144
18146
  (e, t) => {
18145
18147
  const { __scopeSelect: n, nonce: r, ...o } = e, s = qn(Sa, n), i = zl(Sa, n), a = $e(t, s.onViewportChange), l = h.useRef(0);
18146
18148
  return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
@@ -18193,7 +18195,7 @@ var [Kk, zl] = qr(ur, {}), Sa = "SelectViewport", vm = h.forwardRef(
18193
18195
  }
18194
18196
  );
18195
18197
  vm.displayName = Sa;
18196
- var wm = "SelectGroup", [qk, Gk] = qr(wm), Yk = h.forwardRef(
18198
+ var wm = "SelectGroup", [qk, Gk] = Kr(wm), Yk = h.forwardRef(
18197
18199
  (e, t) => {
18198
18200
  const { __scopeSelect: n, ...r } = e, o = Dt();
18199
18201
  return /* @__PURE__ */ u.jsx(qk, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(me.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
@@ -18207,7 +18209,7 @@ var bm = "SelectLabel", ym = h.forwardRef(
18207
18209
  }
18208
18210
  );
18209
18211
  ym.displayName = bm;
18210
- var As = "SelectItem", [Xk, Sm] = qr(As), Tm = h.forwardRef(
18212
+ var As = "SelectItem", [Xk, Sm] = Kr(As), Tm = h.forwardRef(
18211
18213
  (e, t) => {
18212
18214
  const {
18213
18215
  __scopeSelect: n,
@@ -18818,8 +18820,8 @@ const IR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
18818
18820
  ));
18819
18821
  IR.displayName = si.displayName;
18820
18822
  var [hi, UN] = gn("Tooltip", [
18821
- Wr
18822
- ]), mi = Wr(), Qm = "TooltipProvider", NR = 700, ka = "tooltip.open", [AR, Hl] = hi(Qm), eg = (e) => {
18823
+ Ur
18824
+ ]), mi = Ur(), Qm = "TooltipProvider", NR = 700, ka = "tooltip.open", [AR, Hl] = hi(Qm), eg = (e) => {
18823
18825
  const {
18824
18826
  __scopeTooltip: t,
18825
18827
  delayDuration: n = NR,
@@ -18936,13 +18938,13 @@ var Ra = "TooltipTrigger", ng = h.forwardRef(
18936
18938
  ng.displayName = Ra;
18937
18939
  var _R = "TooltipPortal", [WN, PR] = hi(_R, {
18938
18940
  forceMount: void 0
18939
- }), Dr = "TooltipContent", rg = h.forwardRef(
18941
+ }), Or = "TooltipContent", rg = h.forwardRef(
18940
18942
  (e, t) => {
18941
- const n = PR(Dr, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = gi(Dr, e.__scopeTooltip);
18943
+ const n = PR(Or, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = gi(Or, e.__scopeTooltip);
18942
18944
  return /* @__PURE__ */ u.jsx(Kt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ u.jsx(og, { side: o, ...s, ref: t }) : /* @__PURE__ */ u.jsx(MR, { side: o, ...s, ref: t }) });
18943
18945
  }
18944
18946
  ), MR = h.forwardRef((e, t) => {
18945
- const n = gi(Dr, e.__scopeTooltip), r = Hl(Dr, e.__scopeTooltip), o = h.useRef(null), s = $e(t, o), [i, a] = h.useState(null), { trigger: l, onClose: c } = n, d = o.current, { onPointerInTransitChange: f } = r, m = h.useCallback(() => {
18947
+ const n = gi(Or, e.__scopeTooltip), r = Hl(Or, e.__scopeTooltip), o = h.useRef(null), s = $e(t, o), [i, a] = h.useState(null), { trigger: l, onClose: c } = n, d = o.current, { onPointerInTransitChange: f } = r, m = h.useCallback(() => {
18946
18948
  a(null), f(!1);
18947
18949
  }, [f]), p = h.useCallback(
18948
18950
  (v, g) => {
@@ -18976,7 +18978,7 @@ var _R = "TooltipPortal", [WN, PR] = hi(_R, {
18976
18978
  onEscapeKeyDown: s,
18977
18979
  onPointerDownOutside: i,
18978
18980
  ...a
18979
- } = e, l = gi(Dr, n), c = mi(n), { onClose: d } = l;
18981
+ } = e, l = gi(Or, n), c = mi(n), { onClose: d } = l;
18980
18982
  return h.useEffect(() => (document.addEventListener(ka, d), () => document.removeEventListener(ka, d)), [d]), h.useEffect(() => {
18981
18983
  if (l.trigger) {
18982
18984
  const f = (m) => {
@@ -18986,7 +18988,7 @@ var _R = "TooltipPortal", [WN, PR] = hi(_R, {
18986
18988
  return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
18987
18989
  }
18988
18990
  }, [l.trigger, d]), /* @__PURE__ */ u.jsx(
18989
- zr,
18991
+ Br,
18990
18992
  {
18991
18993
  asChild: !0,
18992
18994
  disableOutsidePointerEvents: !1,
@@ -19019,7 +19021,7 @@ var _R = "TooltipPortal", [WN, PR] = hi(_R, {
19019
19021
  );
19020
19022
  }
19021
19023
  );
19022
- rg.displayName = Dr;
19024
+ rg.displayName = Or;
19023
19025
  var sg = "TooltipArrow", $R = h.forwardRef(
19024
19026
  (e, t) => {
19025
19027
  const { __scopeTooltip: n, ...r } = e, o = mi(n);
@@ -19347,7 +19349,7 @@ var [rI, oI] = ag(Bo, {
19347
19349
  onSwipeCancel: m,
19348
19350
  onSwipeEnd: p,
19349
19351
  ...v
19350
- } = e, g = xi(Bo, n), [x, b] = h.useState(null), w = $e(t, (P) => b(P)), S = h.useRef(null), C = h.useRef(null), y = o || g.duration, T = h.useRef(0), E = h.useRef(y), N = h.useRef(0), { onToastAdd: _, onToastRemove: O } = g, $ = St(() => {
19352
+ } = e, g = xi(Bo, n), [x, b] = h.useState(null), w = $e(t, (P) => b(P)), S = h.useRef(null), C = h.useRef(null), y = o || g.duration, T = h.useRef(0), E = h.useRef(y), N = h.useRef(0), { onToastAdd: _, onToastRemove: D } = g, $ = St(() => {
19351
19353
  var V;
19352
19354
  (x == null ? void 0 : x.contains(document.activeElement)) && ((V = g.viewport) == null || V.focus()), i();
19353
19355
  }), H = h.useCallback(
@@ -19371,7 +19373,7 @@ var [rI, oI] = ag(Bo, {
19371
19373
  }
19372
19374
  }, [g.viewport, y, l, c, H]), h.useEffect(() => {
19373
19375
  s && !g.isClosePausedRef.current && H(y);
19374
- }, [s, y, g.isClosePausedRef, H]), h.useEffect(() => (_(), () => O()), [_, O]);
19376
+ }, [s, y, g.isClosePausedRef, H]), h.useEffect(() => (_(), () => D()), [_, D]);
19375
19377
  const Y = h.useMemo(() => x ? wg(x) : null, [x]);
19376
19378
  return g.viewport ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
19377
19379
  Y && /* @__PURE__ */ u.jsx(
@@ -19766,7 +19768,7 @@ function UI(e) {
19766
19768
  }
19767
19769
  var WI = (e) => {
19768
19770
  var t, n, r, o, s, i, a, l, c, d, f;
19769
- let { invert: m, toast: p, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: S, toasts: C, expanded: y, removeToast: T, defaultRichColors: E, closeButton: N, style: _, cancelButtonStyle: O, actionButtonStyle: $, className: H = "", descriptionClassName: Y = "", duration: P, position: V, gap: K, loadingIcon: z, expandByDefault: M, classNames: k, icons: G, closeButtonAriaLabel: X = "Close toast", pauseWhenPageIsHidden: A } = e, [B, I] = L.useState(null), [F, U] = L.useState(null), [D, j] = L.useState(!1), [q, J] = L.useState(!1), [ne, re] = L.useState(!1), [se, ae] = L.useState(!1), [be, Oe] = L.useState(!1), [We, je] = L.useState(0), [Fe, ut] = L.useState(0), mt = L.useRef(p.duration || P || Mu), Ct = L.useRef(null), Ge = L.useRef(null), Je = S === 0, Ve = S + 1 <= b, De = p.type, Ne = p.dismissible !== !1, gt = p.className || "", jt = p.descriptionClassName || "", rt = L.useMemo(() => w.findIndex((ge) => ge.toastId === p.id) || 0, [w, p.id]), lt = L.useMemo(() => {
19771
+ let { invert: m, toast: p, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: S, toasts: C, expanded: y, removeToast: T, defaultRichColors: E, closeButton: N, style: _, cancelButtonStyle: D, actionButtonStyle: $, className: H = "", descriptionClassName: Y = "", duration: P, position: V, gap: K, loadingIcon: z, expandByDefault: M, classNames: k, icons: G, closeButtonAriaLabel: X = "Close toast", pauseWhenPageIsHidden: A } = e, [B, I] = L.useState(null), [F, U] = L.useState(null), [O, j] = L.useState(!1), [q, J] = L.useState(!1), [ne, re] = L.useState(!1), [se, ae] = L.useState(!1), [be, Oe] = L.useState(!1), [We, je] = L.useState(0), [Fe, ut] = L.useState(0), mt = L.useRef(p.duration || P || Mu), Ct = L.useRef(null), Ge = L.useRef(null), Je = S === 0, Ve = S + 1 <= b, De = p.type, Ne = p.dismissible !== !1, gt = p.className || "", jt = p.descriptionClassName || "", rt = L.useMemo(() => w.findIndex((ge) => ge.toastId === p.id) || 0, [w, p.id]), lt = L.useMemo(() => {
19770
19772
  var ge;
19771
19773
  return (ge = p.closeButton) != null ? ge : N;
19772
19774
  }, [p.closeButton, N]), vt = L.useMemo(() => p.duration || P || Mu, [p.duration, P]), dt = L.useRef(0), wt = L.useRef(0), Qt = L.useRef(0), At = L.useRef(null), [ln, Gt] = V.split("-"), Ye = L.useMemo(() => w.reduce((ge, ce, ke) => ke >= rt ? ge : ge + ce.height, 0), [w, rt]), Ke = II(), Et = p.invert || m, Z = De === "loading";
@@ -19781,12 +19783,12 @@ var WI = (e) => {
19781
19783
  return ut(ce), x((ke) => [{ toastId: p.id, height: ce, position: p.position }, ...ke]), () => x((ke) => ke.filter((ct) => ct.toastId !== p.id));
19782
19784
  }
19783
19785
  }, [x, p.id]), L.useLayoutEffect(() => {
19784
- if (!D) return;
19786
+ if (!O) return;
19785
19787
  let ge = Ge.current, ce = ge.style.height;
19786
19788
  ge.style.height = "auto";
19787
19789
  let ke = ge.getBoundingClientRect().height;
19788
19790
  ge.style.height = ce, ut(ke), x((ct) => ct.find((Se) => Se.toastId === p.id) ? ct.map((Se) => Se.toastId === p.id ? { ...Se, height: ke } : Se) : [{ toastId: p.id, height: ke, position: p.position }, ...ct]);
19789
- }, [D, p.title, p.description, x, p.id]);
19791
+ }, [O, p.title, p.description, x, p.id]);
19790
19792
  let he = L.useCallback(() => {
19791
19793
  J(!0), je(wt.current), x((ge) => ge.filter((ce) => ce.toastId !== p.id)), setTimeout(() => {
19792
19794
  T(p);
@@ -19812,7 +19814,7 @@ var WI = (e) => {
19812
19814
  var ge, ce, ke;
19813
19815
  return G != null && G.loading ? L.createElement("div", { className: cn(k == null ? void 0 : k.loader, (ge = p == null ? void 0 : p.classNames) == null ? void 0 : ge.loader, "sonner-loader"), "data-visible": De === "loading" }, G.loading) : z ? L.createElement("div", { className: cn(k == null ? void 0 : k.loader, (ce = p == null ? void 0 : p.classNames) == null ? void 0 : ce.loader, "sonner-loader"), "data-visible": De === "loading" }, z) : L.createElement(SI, { className: cn(k == null ? void 0 : k.loader, (ke = p == null ? void 0 : p.classNames) == null ? void 0 : ke.loader), visible: De === "loading" });
19814
19816
  }
19815
- return L.createElement("li", { tabIndex: 0, ref: Ge, className: cn(H, gt, 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[De], (n = p == null ? void 0 : p.classNames) == null ? void 0 : n[De]), "data-sonner-toast": "", "data-rich-colors": (r = p.richColors) != null ? r : E, "data-styled": !(p.jsx || p.unstyled || v), "data-mounted": D, "data-promise": !!p.promise, "data-swiped": be, "data-removed": q, "data-visible": Ve, "data-y-position": ln, "data-x-position": Gt, "data-index": S, "data-front": Je, "data-swiping": ne, "data-dismissible": Ne, "data-type": De, "data-invert": Et, "data-swipe-out": se, "data-swipe-direction": F, "data-expanded": !!(y || M && D), style: { "--index": S, "--toasts-before": S, "--z-index": C.length - S, "--offset": `${q ? We : wt.current}px`, "--initial-height": M ? "auto" : `${Fe}px`, ..._, ...p.style }, onDragEnd: () => {
19817
+ return L.createElement("li", { tabIndex: 0, ref: Ge, className: cn(H, gt, 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[De], (n = p == null ? void 0 : p.classNames) == null ? void 0 : n[De]), "data-sonner-toast": "", "data-rich-colors": (r = p.richColors) != null ? r : E, "data-styled": !(p.jsx || p.unstyled || v), "data-mounted": O, "data-promise": !!p.promise, "data-swiped": be, "data-removed": q, "data-visible": Ve, "data-y-position": ln, "data-x-position": Gt, "data-index": S, "data-front": Je, "data-swiping": ne, "data-dismissible": Ne, "data-type": De, "data-invert": Et, "data-swipe-out": se, "data-swipe-direction": F, "data-expanded": !!(y || M && O), style: { "--index": S, "--toasts-before": S, "--z-index": C.length - S, "--offset": `${q ? We : wt.current}px`, "--initial-height": M ? "auto" : `${Fe}px`, ..._, ...p.style }, onDragEnd: () => {
19816
19818
  re(!1), I(null), At.current = null;
19817
19819
  }, onPointerDown: (ge) => {
19818
19820
  Z || !Ne || (Ct.current = /* @__PURE__ */ new Date(), je(wt.current), ge.target.setPointerCapture(ge.pointerId), ge.target.tagName !== "BUTTON" && (re(!0), At.current = { x: ge.clientX, y: ge.clientY }));
@@ -19837,7 +19839,7 @@ var WI = (e) => {
19837
19839
  } : () => {
19838
19840
  var ge;
19839
19841
  he(), (ge = p.onDismiss) == null || ge.call(p, p);
19840
- }, className: cn(k == null ? void 0 : k.closeButton, (o = p == null ? void 0 : p.classNames) == null ? void 0 : o.closeButton) }, (s = G == null ? void 0 : G.close) != null ? s : RI) : null, p.jsx || wi(p.title) ? p.jsx ? p.jsx : typeof p.title == "function" ? p.title() : p.title : L.createElement(L.Fragment, null, De || p.icon || p.promise ? L.createElement("div", { "data-icon": "", className: cn(k == null ? void 0 : k.icon, (i = p == null ? void 0 : p.classNames) == null ? void 0 : i.icon) }, p.promise || p.type === "loading" && !p.icon ? p.icon || ot() : null, p.type !== "loading" ? p.icon || (G == null ? void 0 : G[De]) || bI(De) : null) : null, L.createElement("div", { "data-content": "", className: cn(k == null ? void 0 : k.content, (a = p == null ? void 0 : p.classNames) == null ? void 0 : a.content) }, L.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 ? L.createElement("div", { "data-description": "", className: cn(Y, jt, 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), wi(p.cancel) ? p.cancel : p.cancel && Zo(p.cancel) ? L.createElement("button", { "data-button": !0, "data-cancel": !0, style: p.cancelButtonStyle || O, onClick: (ge) => {
19842
+ }, className: cn(k == null ? void 0 : k.closeButton, (o = p == null ? void 0 : p.classNames) == null ? void 0 : o.closeButton) }, (s = G == null ? void 0 : G.close) != null ? s : RI) : null, p.jsx || wi(p.title) ? p.jsx ? p.jsx : typeof p.title == "function" ? p.title() : p.title : L.createElement(L.Fragment, null, De || p.icon || p.promise ? L.createElement("div", { "data-icon": "", className: cn(k == null ? void 0 : k.icon, (i = p == null ? void 0 : p.classNames) == null ? void 0 : i.icon) }, p.promise || p.type === "loading" && !p.icon ? p.icon || ot() : null, p.type !== "loading" ? p.icon || (G == null ? void 0 : G[De]) || bI(De) : null) : null, L.createElement("div", { "data-content": "", className: cn(k == null ? void 0 : k.content, (a = p == null ? void 0 : p.classNames) == null ? void 0 : a.content) }, L.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 ? L.createElement("div", { "data-description": "", className: cn(Y, jt, 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), wi(p.cancel) ? p.cancel : p.cancel && Zo(p.cancel) ? L.createElement("button", { "data-button": !0, "data-cancel": !0, style: p.cancelButtonStyle || D, onClick: (ge) => {
19841
19843
  var ce, ke;
19842
19844
  Zo(p.cancel) && Ne && ((ke = (ce = p.cancel).onClick) == null || ke.call(ce, ge), he());
19843
19845
  }, className: cn(k == null ? void 0 : k.cancelButton, (d = p == null ? void 0 : p.classNames) == null ? void 0 : d.cancelButton) }, p.cancel.label) : null, wi(p.action) ? p.action : p.action && Zo(p.action) ? L.createElement("button", { "data-button": !0, "data-action": !0, style: p.actionButtonStyle || $, onClick: (ge) => {
@@ -19865,7 +19867,7 @@ function VI(e, t) {
19865
19867
  }), n;
19866
19868
  }
19867
19869
  var KI = Fg(function(e, t) {
19868
- let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: i, className: a, offset: l, mobileOffset: c, theme: d = "light", richColors: f, duration: m, style: p, visibleToasts: v = DI, toastOptions: g, dir: x = Ou(), gap: b = BI, loadingIcon: w, icons: S, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: y } = e, [T, E] = L.useState([]), N = L.useMemo(() => Array.from(new Set([r].concat(T.filter((A) => A.position).map((A) => A.position)))), [T, r]), [_, O] = L.useState([]), [$, H] = L.useState(!1), [Y, P] = L.useState(!1), [V, K] = L.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), z = L.useRef(null), M = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), k = L.useRef(null), G = L.useRef(!1), X = L.useCallback((A) => {
19870
+ let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: i, className: a, offset: l, mobileOffset: c, theme: d = "light", richColors: f, duration: m, style: p, visibleToasts: v = DI, toastOptions: g, dir: x = Ou(), gap: b = BI, loadingIcon: w, icons: S, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: y } = e, [T, E] = L.useState([]), N = L.useMemo(() => Array.from(new Set([r].concat(T.filter((A) => A.position).map((A) => A.position)))), [T, r]), [_, D] = L.useState([]), [$, H] = L.useState(!1), [Y, P] = L.useState(!1), [V, K] = L.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), z = L.useRef(null), M = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), k = L.useRef(null), G = L.useRef(!1), X = L.useCallback((A) => {
19869
19871
  E((B) => {
19870
19872
  var I;
19871
19873
  return (I = B.find((F) => F.id === A.id)) != null && I.delete || Ht.dismiss(A.id), B.filter(({ id: F }) => F !== A.id);
@@ -19919,17 +19921,17 @@ var KI = Fg(function(e, t) {
19919
19921
  }, [z.current]), L.createElement("section", { ref: t, "aria-label": `${C} ${M}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, N.map((A, B) => {
19920
19922
  var I;
19921
19923
  let [F, U] = A.split("-");
19922
- return T.length ? L.createElement("ol", { key: A, dir: x === "auto" ? Ou() : x, tabIndex: -1, ref: z, className: a, "data-sonner-toaster": !0, "data-theme": V, "data-y-position": F, "data-lifted": $ && T.length > 1 && !s, "data-x-position": U, style: { "--front-toast-height": `${((I = _[0]) == null ? void 0 : I.height) || 0}px`, "--width": `${FI}px`, "--gap": `${b}px`, ...p, ...VI(l, c) }, onBlur: (D) => {
19923
- G.current && !D.currentTarget.contains(D.relatedTarget) && (G.current = !1, k.current && (k.current.focus({ preventScroll: !0 }), k.current = null));
19924
- }, onFocus: (D) => {
19925
- D.target instanceof HTMLElement && D.target.dataset.dismissible === "false" || G.current || (G.current = !0, k.current = D.relatedTarget);
19924
+ return T.length ? L.createElement("ol", { key: A, dir: x === "auto" ? Ou() : x, tabIndex: -1, ref: z, className: a, "data-sonner-toaster": !0, "data-theme": V, "data-y-position": F, "data-lifted": $ && T.length > 1 && !s, "data-x-position": U, style: { "--front-toast-height": `${((I = _[0]) == null ? void 0 : I.height) || 0}px`, "--width": `${FI}px`, "--gap": `${b}px`, ...p, ...VI(l, c) }, onBlur: (O) => {
19925
+ G.current && !O.currentTarget.contains(O.relatedTarget) && (G.current = !1, k.current && (k.current.focus({ preventScroll: !0 }), k.current = null));
19926
+ }, onFocus: (O) => {
19927
+ O.target instanceof HTMLElement && O.target.dataset.dismissible === "false" || G.current || (G.current = !0, k.current = O.relatedTarget);
19926
19928
  }, onMouseEnter: () => H(!0), onMouseMove: () => H(!0), onMouseLeave: () => {
19927
19929
  Y || H(!1);
19928
- }, onDragEnd: () => H(!1), onPointerDown: (D) => {
19929
- D.target instanceof HTMLElement && D.target.dataset.dismissible === "false" || P(!0);
19930
- }, onPointerUp: () => P(!1) }, T.filter((D) => !D.position && B === 0 || D.position === A).map((D, j) => {
19930
+ }, onDragEnd: () => H(!1), onPointerDown: (O) => {
19931
+ O.target instanceof HTMLElement && O.target.dataset.dismissible === "false" || P(!0);
19932
+ }, onPointerUp: () => P(!1) }, T.filter((O) => !O.position && B === 0 || O.position === A).map((O, j) => {
19931
19933
  var q, J;
19932
- return L.createElement(WI, { key: D.id, icons: S, index: j, toast: D, defaultRichColors: f, duration: (q = g == null ? void 0 : g.duration) != null ? q : m, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (J = g == null ? void 0 : g.closeButton) != null ? J : i, interacting: Y, position: A, 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: X, toasts: T.filter((ne) => ne.position == D.position), heights: _.filter((ne) => ne.position == D.position), setHeights: O, expandByDefault: s, gap: b, loadingIcon: w, expanded: $, pauseWhenPageIsHidden: y, swipeDirections: e.swipeDirections });
19934
+ return L.createElement(WI, { key: O.id, icons: S, index: j, toast: O, defaultRichColors: f, duration: (q = g == null ? void 0 : g.duration) != null ? q : m, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (J = g == null ? void 0 : g.closeButton) != null ? J : i, interacting: Y, position: A, 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: X, toasts: T.filter((ne) => ne.position == O.position), heights: _.filter((ne) => ne.position == O.position), setHeights: D, expandByDefault: s, gap: b, loadingIcon: w, expanded: $, pauseWhenPageIsHidden: y, swipeDirections: e.swipeDirections });
19933
19935
  })) : null;
19934
19936
  }));
19935
19937
  });
@@ -19991,7 +19993,7 @@ export {
19991
19993
  tm as Input,
19992
19994
  vE as InterruptPartRenderer,
19993
19995
  jk as Label,
19994
- Nr as MarkdownContent,
19996
+ Ir as MarkdownContent,
19995
19997
  Ol as MessageComponent,
19996
19998
  Eh as MessageList,
19997
19999
  Th as MessageRow,
@@ -20050,7 +20052,7 @@ export {
20050
20052
  Sh as getMessageDomKey,
20051
20053
  Uu as getPreviewForMessage,
20052
20054
  sn as httpClient,
20053
- Cr as hydrateHistorySnapshots,
20055
+ Tr as hydrateHistorySnapshots,
20054
20056
  lw as isEnvelope,
20055
20057
  ow as listFiles,
20056
20058
  Gw as loadStoredSettings,