teodor-new-chat-ui 4.3.462 → 4.3.464

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
@@ -9,7 +9,7 @@ import { clsx as Bg } from "clsx";
9
9
  import { twMerge as zg } from "tailwind-merge";
10
10
  import * as vo from "react-dom";
11
11
  import Ri from "react-dom";
12
- import { ChevronRight as ju, Check as Ns, Circle as Hg, Square as Ug, Send as Wg, X as Qn, ExternalLink as _u, Download as Vg, Image as Kg, FileText as Ul, Loader as us, Search as Pu, ChevronUp as Ii, ChevronDown as As, ChevronLeft as qg, Copy as Mu, Edit as Ou, RotateCcw as Du, Bot as va, Wrench as Gg, User as Yg, Loader2 as Xn, Edit3 as wo, Paperclip as Wl, Plus as Xg, FileSpreadsheet as Jg, Calendar as Zg, MoreHorizontal as Lu, Share2 as Qg, Trash2 as ex, MessageSquare as $u, Maximize2 as tx, Minimize2 as nx, History as rx } from "lucide-react";
12
+ import { ChevronRight as ju, Check as Ns, Circle as Hg, Square as Ug, Send as Wg, X as er, ExternalLink as _u, Download as Vg, Image as Kg, FileText as Ul, Loader as us, Search as Pu, ChevronUp as Ii, ChevronDown as As, ChevronLeft as qg, Copy as Mu, Edit as Ou, RotateCcw as Du, Bot as va, Wrench as Gg, User as Yg, Loader2 as Jn, Edit3 as wo, Paperclip as Wl, Plus as Xg, FileSpreadsheet as Jg, Calendar as Zg, MoreHorizontal as Lu, Share2 as Qg, Trash2 as ex, MessageSquare as $u, Maximize2 as tx, Minimize2 as nx, History as rx } from "lucide-react";
13
13
  const Vl = 120;
14
14
  function ox(e) {
15
15
  if (!Array.isArray(e))
@@ -134,11 +134,11 @@ function VI(e, t) {
134
134
  function ix(e) {
135
135
  return Ue(() => sx(e), [e]);
136
136
  }
137
- function er(e) {
137
+ function tr(e) {
138
138
  if (!(!e || typeof e != "object" || Array.isArray(e)))
139
139
  return { ...e };
140
140
  }
141
- function Gn(e, t) {
141
+ function Yn(e, t) {
142
142
  if (e)
143
143
  for (const n of t) {
144
144
  const r = e[n];
@@ -156,11 +156,11 @@ function lx(e, t) {
156
156
  return null;
157
157
  }
158
158
  function Kl(e) {
159
- const t = er(e);
159
+ const t = tr(e);
160
160
  if (t)
161
- return er(t.configurable) ?? t;
161
+ return tr(t.configurable) ?? t;
162
162
  }
163
- function Yn(e) {
163
+ function Xn(e) {
164
164
  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, a) => cx(s, a)).filter((s) => !!s)].sort((s, a) => ql(a.createdAt) - ql(s.createdAt)), o = r[0] ?? null;
165
165
  return {
166
166
  threadId: (e == null ? void 0 : e.threadId) ?? "",
@@ -172,10 +172,10 @@ function Yn(e) {
172
172
  function cx(e, t) {
173
173
  var y;
174
174
  if (!e) return null;
175
- const r = (Array.isArray((y = e.values) == null ? void 0 : y.messages) ? e.values.messages : []).map((C) => ux(C)).filter((C) => !!C), o = er(e.metadata) ?? {}, s = Kl(e.config), a = er(e.parent_config ?? e.parentConfig), i = Kl(a), l = Gn(s, ["checkpoint_id", "checkpointId"]), c = Gn(s, ["checkpoint_ns", "checkpointNs"]), d = Gn(i, ["checkpoint_id", "checkpointId"]), p = Gn(i, ["checkpoint_id", "checkpointId"]) ?? null, m = Gn(i, ["checkpoint_ns", "checkpointNs"]) ?? null, f = er(e.config), v = Array.isArray(e.tasks) ? e.tasks.map((C) => ({ ...C })) : e.tasks ?? null, g = Array.isArray(e.next) ? [...e.next] : e.next ?? null, x = typeof e.created_at == "string" && e.created_at.trim() ? e.created_at : typeof e.createdAt == "string" && e.createdAt.trim() ? e.createdAt : new Date(Date.now() - t).toISOString(), b = {
175
+ const r = (Array.isArray((y = e.values) == null ? void 0 : y.messages) ? e.values.messages : []).map((C) => ux(C)).filter((C) => !!C), o = tr(e.metadata) ?? {}, s = Kl(e.config), a = tr(e.parent_config ?? e.parentConfig), i = Kl(a), l = Yn(s, ["checkpoint_id", "checkpointId"]), c = Yn(s, ["checkpoint_ns", "checkpointNs"]), d = Yn(i, ["checkpoint_id", "checkpointId"]), p = Yn(i, ["checkpoint_id", "checkpointId"]) ?? null, m = Yn(i, ["checkpoint_ns", "checkpointNs"]) ?? null, f = tr(e.config), v = Array.isArray(e.tasks) ? e.tasks.map((C) => ({ ...C })) : e.tasks ?? null, g = Array.isArray(e.next) ? [...e.next] : e.next ?? null, x = typeof e.created_at == "string" && e.created_at.trim() ? e.created_at : typeof e.createdAt == "string" && e.createdAt.trim() ? e.createdAt : new Date(Date.now() - t).toISOString(), b = {
176
176
  ...o,
177
177
  step: lx(o, ["step"]) ?? 0,
178
- source: Gn(o, ["source"]) ?? null
178
+ source: Yn(o, ["source"]) ?? null
179
179
  }, w = r.map((C) => ({
180
180
  ...C,
181
181
  checkpointId: l ?? null
@@ -395,14 +395,14 @@ function xx() {
395
395
  }
396
396
  return null;
397
397
  }
398
- var N = Object.assign, Y = 0, q, F, P, k, V, X, j;
398
+ var N = Object.assign, Y = 0, q, F, P, k, U, X, j;
399
399
  function A() {
400
400
  }
401
401
  A.__reactDisabledLog = !0;
402
402
  function B() {
403
403
  {
404
404
  if (Y === 0) {
405
- q = console.log, F = console.info, P = console.warn, k = console.error, V = console.group, X = console.groupCollapsed, j = console.groupEnd;
405
+ q = console.log, F = console.info, P = console.warn, k = console.error, U = console.group, X = console.groupCollapsed, j = console.groupEnd;
406
406
  var I = {
407
407
  configurable: !0,
408
408
  enumerable: !0,
@@ -444,7 +444,7 @@ function xx() {
444
444
  value: k
445
445
  }),
446
446
  group: N({}, I, {
447
- value: V
447
+ value: U
448
448
  }),
449
449
  groupCollapsed: N({}, I, {
450
450
  value: X
@@ -457,18 +457,18 @@ function xx() {
457
457
  Y < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
458
458
  }
459
459
  }
460
- var ne = b.ReactCurrentDispatcher, U;
460
+ var ne = b.ReactCurrentDispatcher, W;
461
461
  function D(I, ee, de) {
462
462
  {
463
- if (U === void 0)
463
+ if (W === void 0)
464
464
  try {
465
465
  throw Error();
466
466
  } catch (Xe) {
467
467
  var ke = Xe.stack.trim().match(/\n( *(at )?)/);
468
- U = ke && ke[1] || "";
468
+ W = ke && ke[1] || "";
469
469
  }
470
470
  return `
471
- ` + U + I;
471
+ ` + W + I;
472
472
  }
473
473
  }
474
474
  var J = !1, Q;
@@ -544,8 +544,8 @@ function xx() {
544
544
  } finally {
545
545
  J = !1, ne.current = tt, $(), Error.prepareStackTrace = Xe;
546
546
  }
547
- var vr = I ? I.displayName || I.name : "", qn = vr ? D(vr) : "";
548
- return typeof I == "function" && Q.set(I, qn), qn;
547
+ var vr = I ? I.displayName || I.name : "", Gn = vr ? D(vr) : "";
548
+ return typeof I == "function" && Q.set(I, Gn), Gn;
549
549
  }
550
550
  function ae(I, ee, de) {
551
551
  return z(I, !1);
@@ -867,17 +867,17 @@ Check the top-level render call using <` + de + ">.");
867
867
  Ct(pt, I);
868
868
  }
869
869
  if (ye.call(ee, "key")) {
870
- var qn = H(I), Wt = Object.keys(ee).filter(function(Ag) {
870
+ var Gn = H(I), Wt = Object.keys(ee).filter(function(Ag) {
871
871
  return Ag !== "key";
872
872
  }), ga = Wt.length > 0 ? "{key: someKey, " + Wt.join(": ..., ") + ": ...}" : "{key: someKey}";
873
- if (!Ot[qn + ga]) {
873
+ if (!Ot[Gn + ga]) {
874
874
  var Ng = Wt.length > 0 ? "{" + Wt.join(": ..., ") + ": ...}" : "{}";
875
875
  w(`A props object containing a "key" prop is being spread into JSX:
876
876
  let props = %s;
877
877
  <%s {...props} />
878
878
  React keys must be passed directly to JSX without using spread:
879
879
  let props = %s;
880
- <%s key={someKey} {...props} />`, ga, qn, Ng, qn), Ot[qn + ga] = !0;
880
+ <%s key={someKey} {...props} />`, ga, Gn, Ng, Gn), Ot[Gn + ga] = !0;
881
881
  }
882
882
  }
883
883
  return I === r ? Nt(it) : Et(it), it;
@@ -1031,7 +1031,7 @@ function Wu(e, t) {
1031
1031
  return o;
1032
1032
  return null;
1033
1033
  }
1034
- const Jn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Vu = (e) => !Nr(e) && e !== Jn;
1034
+ const Zn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Vu = (e) => !Nr(e) && e !== Zn;
1035
1035
  function Ka() {
1036
1036
  const { caseless: e, skipUndefined: t } = Vu(this) && this || {}, n = {}, r = (o, s) => {
1037
1037
  const a = e && Wu(n, s) || s;
@@ -1140,14 +1140,14 @@ const Zx = (e) => {
1140
1140
  return r;
1141
1141
  };
1142
1142
  return n(e, 0);
1143
- }, Qx = gn("AsyncFunction"), ev = (e) => e && (yo(e) || qt(e)) && qt(e.then) && qt(e.catch), qu = ((e, t) => e ? setImmediate : t ? ((n, r) => (Jn.addEventListener("message", ({ source: o, data: s }) => {
1144
- o === Jn && s === n && r.length && r.shift()();
1143
+ }, Qx = gn("AsyncFunction"), ev = (e) => e && (yo(e) || qt(e)) && qt(e.then) && qt(e.catch), qu = ((e, t) => e ? setImmediate : t ? ((n, r) => (Zn.addEventListener("message", ({ source: o, data: s }) => {
1144
+ o === Zn && s === n && r.length && r.shift()();
1145
1145
  }, !1), (o) => {
1146
- r.push(o), Jn.postMessage(n, "*");
1146
+ r.push(o), Zn.postMessage(n, "*");
1147
1147
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1148
1148
  typeof setImmediate == "function",
1149
- qt(Jn.postMessage)
1150
- ), tv = typeof queueMicrotask < "u" ? queueMicrotask.bind(Jn) : typeof process < "u" && process.nextTick || qu, nv = (e) => e != null && qt(e[js]), W = {
1149
+ qt(Zn.postMessage)
1150
+ ), tv = typeof queueMicrotask < "u" ? queueMicrotask.bind(Zn) : typeof process < "u" && process.nextTick || qu, nv = (e) => e != null && qt(e[js]), V = {
1151
1151
  isArray: Dr,
1152
1152
  isArrayBuffer: Hu,
1153
1153
  isBuffer: bo,
@@ -1197,7 +1197,7 @@ const Zx = (e) => {
1197
1197
  noop: Yx,
1198
1198
  toFiniteNumber: Xx,
1199
1199
  findKey: Wu,
1200
- global: Jn,
1200
+ global: Zn,
1201
1201
  isContextDefined: Vu,
1202
1202
  isSpecCompliantForm: Jx,
1203
1203
  toJSONObject: Zx,
@@ -1210,7 +1210,7 @@ const Zx = (e) => {
1210
1210
  function Pe(e, t, n, r, o) {
1211
1211
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
1212
1212
  }
1213
- W.inherits(Pe, Error, {
1213
+ V.inherits(Pe, Error, {
1214
1214
  toJSON: function() {
1215
1215
  return {
1216
1216
  // Standard
@@ -1225,7 +1225,7 @@ W.inherits(Pe, Error, {
1225
1225
  columnNumber: this.columnNumber,
1226
1226
  stack: this.stack,
1227
1227
  // Axios
1228
- config: W.toJSONObject(this.config),
1228
+ config: V.toJSONObject(this.config),
1229
1229
  code: this.code,
1230
1230
  status: this.status
1231
1231
  };
@@ -1253,7 +1253,7 @@ Object.defineProperties(Pe, Yu);
1253
1253
  Object.defineProperty(Gu, "isAxiosError", { value: !0 });
1254
1254
  Pe.from = (e, t, n, r, o, s) => {
1255
1255
  const a = Object.create(Gu);
1256
- W.toFlatObject(e, a, function(d) {
1256
+ V.toFlatObject(e, a, function(d) {
1257
1257
  return d !== Error.prototype;
1258
1258
  }, (c) => c !== "isAxiosError");
1259
1259
  const i = e && e.message ? e.message : "Error", l = t == null && e ? e.code : t;
@@ -1261,10 +1261,10 @@ Pe.from = (e, t, n, r, o, s) => {
1261
1261
  };
1262
1262
  const rv = null;
1263
1263
  function qa(e) {
1264
- return W.isPlainObject(e) || W.isArray(e);
1264
+ return V.isPlainObject(e) || V.isArray(e);
1265
1265
  }
1266
1266
  function Xu(e) {
1267
- return W.endsWith(e, "[]") ? e.slice(0, -2) : e;
1267
+ return V.endsWith(e, "[]") ? e.slice(0, -2) : e;
1268
1268
  }
1269
1269
  function Jl(e, t, n) {
1270
1270
  return e ? e.concat(t).map(function(o, s) {
@@ -1272,42 +1272,42 @@ function Jl(e, t, n) {
1272
1272
  }).join(n ? "." : "") : t;
1273
1273
  }
1274
1274
  function ov(e) {
1275
- return W.isArray(e) && !e.some(qa);
1275
+ return V.isArray(e) && !e.some(qa);
1276
1276
  }
1277
- const sv = W.toFlatObject(W, {}, null, function(t) {
1277
+ const sv = V.toFlatObject(V, {}, null, function(t) {
1278
1278
  return /^is[A-Z]/.test(t);
1279
1279
  });
1280
1280
  function Ms(e, t, n) {
1281
- if (!W.isObject(e))
1281
+ if (!V.isObject(e))
1282
1282
  throw new TypeError("target must be an object");
1283
- t = t || new FormData(), n = W.toFlatObject(n, {
1283
+ t = t || new FormData(), n = V.toFlatObject(n, {
1284
1284
  metaTokens: !0,
1285
1285
  dots: !1,
1286
1286
  indexes: !1
1287
1287
  }, !1, function(g, x) {
1288
- return !W.isUndefined(x[g]);
1288
+ return !V.isUndefined(x[g]);
1289
1289
  });
1290
- const r = n.metaTokens, o = n.visitor || d, s = n.dots, a = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && W.isSpecCompliantForm(t);
1291
- if (!W.isFunction(o))
1290
+ const r = n.metaTokens, o = n.visitor || d, s = n.dots, a = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && V.isSpecCompliantForm(t);
1291
+ if (!V.isFunction(o))
1292
1292
  throw new TypeError("visitor must be a function");
1293
1293
  function c(v) {
1294
1294
  if (v === null) return "";
1295
- if (W.isDate(v))
1295
+ if (V.isDate(v))
1296
1296
  return v.toISOString();
1297
- if (W.isBoolean(v))
1297
+ if (V.isBoolean(v))
1298
1298
  return v.toString();
1299
- if (!l && W.isBlob(v))
1299
+ if (!l && V.isBlob(v))
1300
1300
  throw new Pe("Blob is not supported. Use a Buffer instead.");
1301
- return W.isArrayBuffer(v) || W.isTypedArray(v) ? l && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v;
1301
+ return V.isArrayBuffer(v) || V.isTypedArray(v) ? l && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v;
1302
1302
  }
1303
1303
  function d(v, g, x) {
1304
1304
  let b = v;
1305
1305
  if (v && !x && typeof v == "object") {
1306
- if (W.endsWith(g, "{}"))
1306
+ if (V.endsWith(g, "{}"))
1307
1307
  g = r ? g : g.slice(0, -2), v = JSON.stringify(v);
1308
- else if (W.isArray(v) && ov(v) || (W.isFileList(v) || W.endsWith(g, "[]")) && (b = W.toArray(v)))
1308
+ else if (V.isArray(v) && ov(v) || (V.isFileList(v) || V.endsWith(g, "[]")) && (b = V.toArray(v)))
1309
1309
  return g = Xu(g), b.forEach(function(y, C) {
1310
- !(W.isUndefined(y) || y === null) && t.append(
1310
+ !(V.isUndefined(y) || y === null) && t.append(
1311
1311
  // eslint-disable-next-line no-nested-ternary
1312
1312
  a === !0 ? Jl([g], C, s) : a === null ? g : g + "[]",
1313
1313
  c(y)
@@ -1322,21 +1322,21 @@ function Ms(e, t, n) {
1322
1322
  isVisitable: qa
1323
1323
  });
1324
1324
  function f(v, g) {
1325
- if (!W.isUndefined(v)) {
1325
+ if (!V.isUndefined(v)) {
1326
1326
  if (p.indexOf(v) !== -1)
1327
1327
  throw Error("Circular reference detected in " + g.join("."));
1328
- p.push(v), W.forEach(v, function(b, w) {
1329
- (!(W.isUndefined(b) || b === null) && o.call(
1328
+ p.push(v), V.forEach(v, function(b, w) {
1329
+ (!(V.isUndefined(b) || b === null) && o.call(
1330
1330
  t,
1331
1331
  b,
1332
- W.isString(w) ? w.trim() : w,
1332
+ V.isString(w) ? w.trim() : w,
1333
1333
  g,
1334
1334
  m
1335
1335
  )) === !0 && f(b, g ? g.concat(w) : [w]);
1336
1336
  }), p.pop();
1337
1337
  }
1338
1338
  }
1339
- if (!W.isObject(e))
1339
+ if (!V.isObject(e))
1340
1340
  throw new TypeError("data must be an object");
1341
1341
  return f(e), t;
1342
1342
  }
@@ -1376,12 +1376,12 @@ function Zu(e, t, n) {
1376
1376
  if (!t)
1377
1377
  return e;
1378
1378
  const r = n && n.encode || av;
1379
- W.isFunction(n) && (n = {
1379
+ V.isFunction(n) && (n = {
1380
1380
  serialize: n
1381
1381
  });
1382
1382
  const o = n && n.serialize;
1383
1383
  let s;
1384
- if (o ? s = o(t, n) : s = W.isURLSearchParams(t) ? t.toString() : new Ai(t, n).toString(r), s) {
1384
+ if (o ? s = o(t, n) : s = V.isURLSearchParams(t) ? t.toString() : new Ai(t, n).toString(r), s) {
1385
1385
  const a = e.indexOf("#");
1386
1386
  a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
1387
1387
  }
@@ -1436,7 +1436,7 @@ class Ql {
1436
1436
  * @returns {void}
1437
1437
  */
1438
1438
  forEach(t) {
1439
- W.forEach(this.handlers, function(r) {
1439
+ V.forEach(this.handlers, function(r) {
1440
1440
  r !== null && t(r);
1441
1441
  });
1442
1442
  }
@@ -1468,13 +1468,13 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pv
1468
1468
  function mv(e, t) {
1469
1469
  return Ms(e, new Lt.classes.URLSearchParams(), {
1470
1470
  visitor: function(n, r, o, s) {
1471
- return Lt.isNode && W.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1471
+ return Lt.isNode && V.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1472
1472
  },
1473
1473
  ...t
1474
1474
  });
1475
1475
  }
1476
1476
  function gv(e) {
1477
- return W.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1477
+ return V.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1478
1478
  }
1479
1479
  function xv(e) {
1480
1480
  const t = {}, n = Object.keys(e);
@@ -1490,20 +1490,20 @@ function ed(e) {
1490
1490
  let a = n[s++];
1491
1491
  if (a === "__proto__") return !0;
1492
1492
  const i = Number.isFinite(+a), l = s >= n.length;
1493
- return a = !a && W.isArray(o) ? o.length : a, l ? (W.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !W.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && W.isArray(o[a]) && (o[a] = xv(o[a])), !i);
1493
+ return a = !a && V.isArray(o) ? o.length : a, l ? (V.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !V.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && V.isArray(o[a]) && (o[a] = xv(o[a])), !i);
1494
1494
  }
1495
- if (W.isFormData(e) && W.isFunction(e.entries)) {
1495
+ if (V.isFormData(e) && V.isFunction(e.entries)) {
1496
1496
  const n = {};
1497
- return W.forEachEntry(e, (r, o) => {
1497
+ return V.forEachEntry(e, (r, o) => {
1498
1498
  t(gv(r), o, n, 0);
1499
1499
  }), n;
1500
1500
  }
1501
1501
  return null;
1502
1502
  }
1503
1503
  function vv(e, t, n) {
1504
- if (W.isString(e))
1504
+ if (V.isString(e))
1505
1505
  try {
1506
- return (t || JSON.parse)(e), W.trim(e);
1506
+ return (t || JSON.parse)(e), V.trim(e);
1507
1507
  } catch (r) {
1508
1508
  if (r.name !== "SyntaxError")
1509
1509
  throw r;
@@ -1514,20 +1514,20 @@ const To = {
1514
1514
  transitional: Qu,
1515
1515
  adapter: ["xhr", "http", "fetch"],
1516
1516
  transformRequest: [function(t, n) {
1517
- const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = W.isObject(t);
1518
- if (s && W.isHTMLForm(t) && (t = new FormData(t)), W.isFormData(t))
1517
+ const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = V.isObject(t);
1518
+ if (s && V.isHTMLForm(t) && (t = new FormData(t)), V.isFormData(t))
1519
1519
  return o ? JSON.stringify(ed(t)) : t;
1520
- if (W.isArrayBuffer(t) || W.isBuffer(t) || W.isStream(t) || W.isFile(t) || W.isBlob(t) || W.isReadableStream(t))
1520
+ if (V.isArrayBuffer(t) || V.isBuffer(t) || V.isStream(t) || V.isFile(t) || V.isBlob(t) || V.isReadableStream(t))
1521
1521
  return t;
1522
- if (W.isArrayBufferView(t))
1522
+ if (V.isArrayBufferView(t))
1523
1523
  return t.buffer;
1524
- if (W.isURLSearchParams(t))
1524
+ if (V.isURLSearchParams(t))
1525
1525
  return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1526
1526
  let i;
1527
1527
  if (s) {
1528
1528
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
1529
1529
  return mv(t, this.formSerializer).toString();
1530
- if ((i = W.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1530
+ if ((i = V.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1531
1531
  const l = this.env && this.env.FormData;
1532
1532
  return Ms(
1533
1533
  i ? { "files[]": t } : t,
@@ -1540,9 +1540,9 @@ const To = {
1540
1540
  }],
1541
1541
  transformResponse: [function(t) {
1542
1542
  const n = this.transitional || To.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1543
- if (W.isResponse(t) || W.isReadableStream(t))
1543
+ if (V.isResponse(t) || V.isReadableStream(t))
1544
1544
  return t;
1545
- if (t && W.isString(t) && (r && !this.responseType || o)) {
1545
+ if (t && V.isString(t) && (r && !this.responseType || o)) {
1546
1546
  const a = !(n && n.silentJSONParsing) && o;
1547
1547
  try {
1548
1548
  return JSON.parse(t, this.parseReviver);
@@ -1576,10 +1576,10 @@ const To = {
1576
1576
  }
1577
1577
  }
1578
1578
  };
1579
- W.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1579
+ V.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1580
1580
  To.headers[e] = {};
1581
1581
  });
1582
- const wv = W.toObjectSet([
1582
+ const wv = V.toObjectSet([
1583
1583
  "age",
1584
1584
  "authorization",
1585
1585
  "content-length",
@@ -1609,7 +1609,7 @@ function qr(e) {
1609
1609
  return e && String(e).trim().toLowerCase();
1610
1610
  }
1611
1611
  function Zo(e) {
1612
- return e === !1 || e == null ? e : W.isArray(e) ? e.map(Zo) : String(e);
1612
+ return e === !1 || e == null ? e : V.isArray(e) ? e.map(Zo) : String(e);
1613
1613
  }
1614
1614
  function yv(e) {
1615
1615
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -1620,12 +1620,12 @@ function yv(e) {
1620
1620
  }
1621
1621
  const Sv = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1622
1622
  function wa(e, t, n, r, o) {
1623
- if (W.isFunction(r))
1623
+ if (V.isFunction(r))
1624
1624
  return r.call(this, t, n);
1625
- if (o && (t = n), !!W.isString(t)) {
1626
- if (W.isString(r))
1625
+ if (o && (t = n), !!V.isString(t)) {
1626
+ if (V.isString(r))
1627
1627
  return t.indexOf(r) !== -1;
1628
- if (W.isRegExp(r))
1628
+ if (V.isRegExp(r))
1629
1629
  return r.test(t);
1630
1630
  }
1631
1631
  }
@@ -1633,7 +1633,7 @@ function Tv(e) {
1633
1633
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
1634
1634
  }
1635
1635
  function Cv(e, t) {
1636
- const n = W.toCamelCase(" " + t);
1636
+ const n = V.toCamelCase(" " + t);
1637
1637
  ["get", "set", "has"].forEach((r) => {
1638
1638
  Object.defineProperty(e, r + n, {
1639
1639
  value: function(o, s, a) {
@@ -1653,20 +1653,20 @@ let Gt = class {
1653
1653
  const d = qr(l);
1654
1654
  if (!d)
1655
1655
  throw new Error("header name must be a non-empty string");
1656
- const p = W.findKey(o, d);
1656
+ const p = V.findKey(o, d);
1657
1657
  (!p || o[p] === void 0 || c === !0 || c === void 0 && o[p] !== !1) && (o[p || l] = Zo(i));
1658
1658
  }
1659
- const a = (i, l) => W.forEach(i, (c, d) => s(c, d, l));
1660
- if (W.isPlainObject(t) || t instanceof this.constructor)
1659
+ const a = (i, l) => V.forEach(i, (c, d) => s(c, d, l));
1660
+ if (V.isPlainObject(t) || t instanceof this.constructor)
1661
1661
  a(t, n);
1662
- else if (W.isString(t) && (t = t.trim()) && !Sv(t))
1662
+ else if (V.isString(t) && (t = t.trim()) && !Sv(t))
1663
1663
  a(bv(t), n);
1664
- else if (W.isObject(t) && W.isIterable(t)) {
1664
+ else if (V.isObject(t) && V.isIterable(t)) {
1665
1665
  let i = {}, l, c;
1666
1666
  for (const d of t) {
1667
- if (!W.isArray(d))
1667
+ if (!V.isArray(d))
1668
1668
  throw TypeError("Object iterator must return a key-value pair");
1669
- i[c = d[0]] = (l = i[c]) ? W.isArray(l) ? [...l, d[1]] : [l, d[1]] : d[1];
1669
+ i[c = d[0]] = (l = i[c]) ? V.isArray(l) ? [...l, d[1]] : [l, d[1]] : d[1];
1670
1670
  }
1671
1671
  a(i, n);
1672
1672
  } else
@@ -1675,16 +1675,16 @@ let Gt = class {
1675
1675
  }
1676
1676
  get(t, n) {
1677
1677
  if (t = qr(t), t) {
1678
- const r = W.findKey(this, t);
1678
+ const r = V.findKey(this, t);
1679
1679
  if (r) {
1680
1680
  const o = this[r];
1681
1681
  if (!n)
1682
1682
  return o;
1683
1683
  if (n === !0)
1684
1684
  return yv(o);
1685
- if (W.isFunction(n))
1685
+ if (V.isFunction(n))
1686
1686
  return n.call(this, o, r);
1687
- if (W.isRegExp(n))
1687
+ if (V.isRegExp(n))
1688
1688
  return n.exec(o);
1689
1689
  throw new TypeError("parser must be boolean|regexp|function");
1690
1690
  }
@@ -1692,7 +1692,7 @@ let Gt = class {
1692
1692
  }
1693
1693
  has(t, n) {
1694
1694
  if (t = qr(t), t) {
1695
- const r = W.findKey(this, t);
1695
+ const r = V.findKey(this, t);
1696
1696
  return !!(r && this[r] !== void 0 && (!n || wa(this, this[r], r, n)));
1697
1697
  }
1698
1698
  return !1;
@@ -1702,11 +1702,11 @@ let Gt = class {
1702
1702
  let o = !1;
1703
1703
  function s(a) {
1704
1704
  if (a = qr(a), a) {
1705
- const i = W.findKey(r, a);
1705
+ const i = V.findKey(r, a);
1706
1706
  i && (!n || wa(r, r[i], i, n)) && (delete r[i], o = !0);
1707
1707
  }
1708
1708
  }
1709
- return W.isArray(t) ? t.forEach(s) : s(t), o;
1709
+ return V.isArray(t) ? t.forEach(s) : s(t), o;
1710
1710
  }
1711
1711
  clear(t) {
1712
1712
  const n = Object.keys(this);
@@ -1719,8 +1719,8 @@ let Gt = class {
1719
1719
  }
1720
1720
  normalize(t) {
1721
1721
  const n = this, r = {};
1722
- return W.forEach(this, (o, s) => {
1723
- const a = W.findKey(r, s);
1722
+ return V.forEach(this, (o, s) => {
1723
+ const a = V.findKey(r, s);
1724
1724
  if (a) {
1725
1725
  n[a] = Zo(o), delete n[s];
1726
1726
  return;
@@ -1734,8 +1734,8 @@ let Gt = class {
1734
1734
  }
1735
1735
  toJSON(t) {
1736
1736
  const n = /* @__PURE__ */ Object.create(null);
1737
- return W.forEach(this, (r, o) => {
1738
- r != null && r !== !1 && (n[o] = t && W.isArray(r) ? r.join(", ") : r);
1737
+ return V.forEach(this, (r, o) => {
1738
+ r != null && r !== !1 && (n[o] = t && V.isArray(r) ? r.join(", ") : r);
1739
1739
  }), n;
1740
1740
  }
1741
1741
  [Symbol.iterator]() {
@@ -1766,11 +1766,11 @@ let Gt = class {
1766
1766
  const i = qr(a);
1767
1767
  r[i] || (Cv(o, a), r[i] = !0);
1768
1768
  }
1769
- return W.isArray(t) ? t.forEach(s) : s(t), this;
1769
+ return V.isArray(t) ? t.forEach(s) : s(t), this;
1770
1770
  }
1771
1771
  };
1772
1772
  Gt.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1773
- W.reduceDescriptors(Gt.prototype, ({ value: e }, t) => {
1773
+ V.reduceDescriptors(Gt.prototype, ({ value: e }, t) => {
1774
1774
  let n = t[0].toUpperCase() + t.slice(1);
1775
1775
  return {
1776
1776
  get: () => e,
@@ -1779,11 +1779,11 @@ W.reduceDescriptors(Gt.prototype, ({ value: e }, t) => {
1779
1779
  }
1780
1780
  };
1781
1781
  });
1782
- W.freezeMethods(Gt);
1782
+ V.freezeMethods(Gt);
1783
1783
  function ba(e, t) {
1784
1784
  const n = this || To, r = t || n, o = Gt.from(r.headers);
1785
1785
  let s = r.data;
1786
- return W.forEach(e, function(i) {
1786
+ return V.forEach(e, function(i) {
1787
1787
  s = i.call(n, s, o.normalize(), t ? t.status : void 0);
1788
1788
  }), o.normalize(), s;
1789
1789
  }
@@ -1793,7 +1793,7 @@ function td(e) {
1793
1793
  function Lr(e, t, n) {
1794
1794
  Pe.call(this, e ?? "canceled", Pe.ERR_CANCELED, t, n), this.name = "CanceledError";
1795
1795
  }
1796
- W.inherits(Lr, Pe, {
1796
+ V.inherits(Lr, Pe, {
1797
1797
  __CANCEL__: !0
1798
1798
  });
1799
1799
  function nd(e, t, n) {
@@ -1864,7 +1864,7 @@ const ds = (e, t, n = 3) => {
1864
1864
  total: e,
1865
1865
  loaded: r
1866
1866
  }), t[1]];
1867
- }, nc = (e) => (...t) => W.asap(() => e(...t)), Iv = Lt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Lt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1867
+ }, nc = (e) => (...t) => V.asap(() => e(...t)), Iv = Lt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Lt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1868
1868
  new URL(Lt.origin),
1869
1869
  Lt.navigator && /(msie|trident)/i.test(Lt.navigator.userAgent)
1870
1870
  ) : () => !0, Nv = Lt.hasStandardBrowserEnv ? (
@@ -1872,7 +1872,7 @@ const ds = (e, t, n = 3) => {
1872
1872
  {
1873
1873
  write(e, t, n, r, o, s) {
1874
1874
  const a = [e + "=" + encodeURIComponent(t)];
1875
- W.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), W.isString(r) && a.push("path=" + r), W.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
1875
+ V.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), V.isString(r) && a.push("path=" + r), V.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
1876
1876
  },
1877
1877
  read(e) {
1878
1878
  const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
@@ -1905,25 +1905,25 @@ function rd(e, t, n) {
1905
1905
  return e && (r || n == !1) ? jv(e, t) : t;
1906
1906
  }
1907
1907
  const rc = (e) => e instanceof Gt ? { ...e } : e;
1908
- function sr(e, t) {
1908
+ function ar(e, t) {
1909
1909
  t = t || {};
1910
1910
  const n = {};
1911
1911
  function r(c, d, p, m) {
1912
- return W.isPlainObject(c) && W.isPlainObject(d) ? W.merge.call({ caseless: m }, c, d) : W.isPlainObject(d) ? W.merge({}, d) : W.isArray(d) ? d.slice() : d;
1912
+ return V.isPlainObject(c) && V.isPlainObject(d) ? V.merge.call({ caseless: m }, c, d) : V.isPlainObject(d) ? V.merge({}, d) : V.isArray(d) ? d.slice() : d;
1913
1913
  }
1914
1914
  function o(c, d, p, m) {
1915
- if (W.isUndefined(d)) {
1916
- if (!W.isUndefined(c))
1915
+ if (V.isUndefined(d)) {
1916
+ if (!V.isUndefined(c))
1917
1917
  return r(void 0, c, p, m);
1918
1918
  } else return r(c, d, p, m);
1919
1919
  }
1920
1920
  function s(c, d) {
1921
- if (!W.isUndefined(d))
1921
+ if (!V.isUndefined(d))
1922
1922
  return r(void 0, d);
1923
1923
  }
1924
1924
  function a(c, d) {
1925
- if (W.isUndefined(d)) {
1926
- if (!W.isUndefined(c))
1925
+ if (V.isUndefined(d)) {
1926
+ if (!V.isUndefined(c))
1927
1927
  return r(void 0, c);
1928
1928
  } else return r(void 0, d);
1929
1929
  }
@@ -1964,28 +1964,28 @@ function sr(e, t) {
1964
1964
  validateStatus: i,
1965
1965
  headers: (c, d, p) => o(rc(c), rc(d), p, !0)
1966
1966
  };
1967
- return W.forEach(Object.keys({ ...e, ...t }), function(d) {
1967
+ return V.forEach(Object.keys({ ...e, ...t }), function(d) {
1968
1968
  const p = l[d] || o, m = p(e[d], t[d], d);
1969
- W.isUndefined(m) && p !== i || (n[d] = m);
1969
+ V.isUndefined(m) && p !== i || (n[d] = m);
1970
1970
  }), n;
1971
1971
  }
1972
1972
  const od = (e) => {
1973
- const t = sr({}, e);
1973
+ const t = ar({}, e);
1974
1974
  let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: i } = t;
1975
1975
  if (t.headers = a = Gt.from(a), t.url = Zu(rd(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && a.set(
1976
1976
  "Authorization",
1977
1977
  "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
1978
- ), W.isFormData(n)) {
1978
+ ), V.isFormData(n)) {
1979
1979
  if (Lt.hasStandardBrowserEnv || Lt.hasStandardBrowserWebWorkerEnv)
1980
1980
  a.setContentType(void 0);
1981
- else if (W.isFunction(n.getHeaders)) {
1981
+ else if (V.isFunction(n.getHeaders)) {
1982
1982
  const l = n.getHeaders(), c = ["content-type", "content-length"];
1983
1983
  Object.entries(l).forEach(([d, p]) => {
1984
1984
  c.includes(d.toLowerCase()) && a.set(d, p);
1985
1985
  });
1986
1986
  }
1987
1987
  }
1988
- if (Lt.hasStandardBrowserEnv && (r && W.isFunction(r) && (r = r(t)), r || r !== !1 && Iv(t.url))) {
1988
+ if (Lt.hasStandardBrowserEnv && (r && V.isFunction(r) && (r = r(t)), r || r !== !1 && Iv(t.url))) {
1989
1989
  const l = o && s && Nv.read(s);
1990
1990
  l && a.set(o, l);
1991
1991
  }
@@ -2036,9 +2036,9 @@ const od = (e) => {
2036
2036
  e,
2037
2037
  x
2038
2038
  )), x = null;
2039
- }, s === void 0 && a.setContentType(null), "setRequestHeader" in x && W.forEach(a.toJSON(), function(C, S) {
2039
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in x && V.forEach(a.toJSON(), function(C, S) {
2040
2040
  x.setRequestHeader(S, C);
2041
- }), W.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), i && i !== "json" && (x.responseType = o.responseType), c && ([m, v] = ds(c, !0), x.addEventListener("progress", m)), l && x.upload && ([p, f] = ds(l), x.upload.addEventListener("progress", p), x.upload.addEventListener("loadend", f)), (o.cancelToken || o.signal) && (d = (y) => {
2041
+ }), V.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), i && i !== "json" && (x.responseType = o.responseType), c && ([m, v] = ds(c, !0), x.addEventListener("progress", m)), l && x.upload && ([p, f] = ds(l), x.upload.addEventListener("progress", p), x.upload.addEventListener("loadend", f)), (o.cancelToken || o.signal) && (d = (y) => {
2042
2042
  x && (r(!y || y.type ? new Lr(null, e, x) : y), x.abort(), x = null);
2043
2043
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
2044
2044
  const w = Ev(o.url);
@@ -2069,7 +2069,7 @@ const od = (e) => {
2069
2069
  };
2070
2070
  e.forEach((c) => c.addEventListener("abort", s));
2071
2071
  const { signal: l } = r;
2072
- return l.unsubscribe = () => W.asap(i), l;
2072
+ return l.unsubscribe = () => V.asap(i), l;
2073
2073
  }
2074
2074
  }, Ov = function* (e, t) {
2075
2075
  let n = e.byteLength;
@@ -2128,20 +2128,20 @@ const od = (e) => {
2128
2128
  }, {
2129
2129
  highWaterMark: 2
2130
2130
  });
2131
- }, sc = 64 * 1024, { isFunction: $o } = W, $v = (({ Request: e, Response: t }) => ({
2131
+ }, sc = 64 * 1024, { isFunction: $o } = V, $v = (({ Request: e, Response: t }) => ({
2132
2132
  Request: e,
2133
2133
  Response: t
2134
- }))(W.global), {
2134
+ }))(V.global), {
2135
2135
  ReadableStream: ac,
2136
2136
  TextEncoder: ic
2137
- } = W.global, lc = (e, ...t) => {
2137
+ } = V.global, lc = (e, ...t) => {
2138
2138
  try {
2139
2139
  return !!e(...t);
2140
2140
  } catch {
2141
2141
  return !1;
2142
2142
  }
2143
2143
  }, Fv = (e) => {
2144
- e = W.merge.call({
2144
+ e = V.merge.call({
2145
2145
  skipUndefined: !0
2146
2146
  }, $v, e);
2147
2147
  const { fetch: t, Request: n, Response: r } = e, o = t ? $o(t) : typeof fetch == "function", s = $o(n), a = $o(r);
@@ -2157,7 +2157,7 @@ const od = (e) => {
2157
2157
  }
2158
2158
  }).headers.has("Content-Type");
2159
2159
  return v && !g;
2160
- }), d = a && i && lc(() => W.isReadableStream(new r("").body)), p = {
2160
+ }), d = a && i && lc(() => V.isReadableStream(new r("").body)), p = {
2161
2161
  stream: d && ((v) => v.body)
2162
2162
  };
2163
2163
  o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((v) => {
@@ -2171,19 +2171,19 @@ const od = (e) => {
2171
2171
  const m = async (v) => {
2172
2172
  if (v == null)
2173
2173
  return 0;
2174
- if (W.isBlob(v))
2174
+ if (V.isBlob(v))
2175
2175
  return v.size;
2176
- if (W.isSpecCompliantForm(v))
2176
+ if (V.isSpecCompliantForm(v))
2177
2177
  return (await new n(Lt.origin, {
2178
2178
  method: "POST",
2179
2179
  body: v
2180
2180
  }).arrayBuffer()).byteLength;
2181
- if (W.isArrayBufferView(v) || W.isArrayBuffer(v))
2181
+ if (V.isArrayBufferView(v) || V.isArrayBuffer(v))
2182
2182
  return v.byteLength;
2183
- if (W.isURLSearchParams(v) && (v = v + ""), W.isString(v))
2183
+ if (V.isURLSearchParams(v) && (v = v + ""), V.isString(v))
2184
2184
  return (await l(v)).byteLength;
2185
2185
  }, f = async (v, g) => {
2186
- const x = W.toFiniteNumber(v.getContentLength());
2186
+ const x = V.toFiniteNumber(v.getContentLength());
2187
2187
  return x ?? m(g);
2188
2188
  };
2189
2189
  return async (v) => {
@@ -2214,7 +2214,7 @@ const od = (e) => {
2214
2214
  body: b,
2215
2215
  duplex: "half"
2216
2216
  }), j;
2217
- if (W.isFormData(b) && (j = X.headers.get("content-type")) && R.setContentType(j), X.body) {
2217
+ if (V.isFormData(b) && (j = X.headers.get("content-type")) && R.setContentType(j), X.body) {
2218
2218
  const [A, B] = tc(
2219
2219
  Y,
2220
2220
  ds(nc(T))
@@ -2222,7 +2222,7 @@ const od = (e) => {
2222
2222
  b = oc(X.body, sc, A, B);
2223
2223
  }
2224
2224
  }
2225
- W.isString(_) || (_ = _ ? "include" : "omit");
2225
+ V.isString(_) || (_ = _ ? "include" : "omit");
2226
2226
  const q = s && "credentials" in n.prototype, F = {
2227
2227
  ...O,
2228
2228
  signal: K,
@@ -2240,7 +2240,7 @@ const od = (e) => {
2240
2240
  ["status", "statusText", "headers"].forEach(($) => {
2241
2241
  X[$] = P[$];
2242
2242
  });
2243
- const j = W.toFiniteNumber(P.headers.get("content-length")), [A, B] = S && tc(
2243
+ const j = V.toFiniteNumber(P.headers.get("content-length")), [A, B] = S && tc(
2244
2244
  j,
2245
2245
  ds(nc(S), !0)
2246
2246
  ) || [];
@@ -2252,10 +2252,10 @@ const od = (e) => {
2252
2252
  );
2253
2253
  }
2254
2254
  E = E || "text";
2255
- let V = await p[W.findKey(p, E) || "text"](P, v);
2255
+ let U = await p[V.findKey(p, E) || "text"](P, v);
2256
2256
  return !k && N && N(), await new Promise((X, j) => {
2257
2257
  nd(X, j, {
2258
- data: V,
2258
+ data: U,
2259
2259
  headers: Gt.from(P.headers),
2260
2260
  status: P.status,
2261
2261
  statusText: P.statusText,
@@ -2292,7 +2292,7 @@ const Ya = {
2292
2292
  get: sd
2293
2293
  }
2294
2294
  };
2295
- W.forEach(Ya, (e, t) => {
2295
+ V.forEach(Ya, (e, t) => {
2296
2296
  if (e) {
2297
2297
  try {
2298
2298
  Object.defineProperty(e, "name", { value: t });
@@ -2301,9 +2301,9 @@ W.forEach(Ya, (e, t) => {
2301
2301
  Object.defineProperty(e, "adapterName", { value: t });
2302
2302
  }
2303
2303
  });
2304
- const cc = (e) => `- ${e}`, zv = (e) => W.isFunction(e) || e === null || e === !1, ad = {
2304
+ const cc = (e) => `- ${e}`, zv = (e) => V.isFunction(e) || e === null || e === !1, ad = {
2305
2305
  getAdapter: (e, t) => {
2306
- e = W.isArray(e) ? e : [e];
2306
+ e = V.isArray(e) ? e : [e];
2307
2307
  const { length: n } = e;
2308
2308
  let r, o;
2309
2309
  const s = {};
@@ -2312,7 +2312,7 @@ const cc = (e) => `- ${e}`, zv = (e) => W.isFunction(e) || e === null || e === !
2312
2312
  let i;
2313
2313
  if (o = r, !zv(r) && (o = Ya[(i = String(r)).toLowerCase()], o === void 0))
2314
2314
  throw new Pe(`Unknown adapter '${i}'`);
2315
- if (o && (W.isFunction(o) || (o = o.get(t))))
2315
+ if (o && (V.isFunction(o) || (o = o.get(t))))
2316
2316
  break;
2317
2317
  s[i || "#" + a] = o;
2318
2318
  }
@@ -2403,7 +2403,7 @@ const Qo = {
2403
2403
  assertOptions: Hv,
2404
2404
  validators: Os
2405
2405
  }, wn = Qo.validators;
2406
- let tr = class {
2406
+ let nr = class {
2407
2407
  constructor(t) {
2408
2408
  this.defaults = t || {}, this.interceptors = {
2409
2409
  request: new Ql(),
@@ -2436,13 +2436,13 @@ let tr = class {
2436
2436
  }
2437
2437
  }
2438
2438
  _request(t, n) {
2439
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = sr(this.defaults, n);
2439
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ar(this.defaults, n);
2440
2440
  const { transitional: r, paramsSerializer: o, headers: s } = n;
2441
2441
  r !== void 0 && Qo.assertOptions(r, {
2442
2442
  silentJSONParsing: wn.transitional(wn.boolean),
2443
2443
  forcedJSONParsing: wn.transitional(wn.boolean),
2444
2444
  clarifyTimeoutError: wn.transitional(wn.boolean)
2445
- }, !1), o != null && (W.isFunction(o) ? n.paramsSerializer = {
2445
+ }, !1), o != null && (V.isFunction(o) ? n.paramsSerializer = {
2446
2446
  serialize: o
2447
2447
  } : Qo.assertOptions(o, {
2448
2448
  encode: wn.function,
@@ -2451,11 +2451,11 @@ let tr = class {
2451
2451
  baseUrl: wn.spelling("baseURL"),
2452
2452
  withXsrfToken: wn.spelling("withXSRFToken")
2453
2453
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2454
- let a = s && W.merge(
2454
+ let a = s && V.merge(
2455
2455
  s.common,
2456
2456
  s[n.method]
2457
2457
  );
2458
- s && W.forEach(
2458
+ s && V.forEach(
2459
2459
  ["delete", "get", "head", "post", "put", "patch", "common"],
2460
2460
  (v) => {
2461
2461
  delete s[v];
@@ -2498,24 +2498,24 @@ let tr = class {
2498
2498
  return d;
2499
2499
  }
2500
2500
  getUri(t) {
2501
- t = sr(this.defaults, t);
2501
+ t = ar(this.defaults, t);
2502
2502
  const n = rd(t.baseURL, t.url, t.allowAbsoluteUrls);
2503
2503
  return Zu(n, t.params, t.paramsSerializer);
2504
2504
  }
2505
2505
  };
2506
- W.forEach(["delete", "get", "head", "options"], function(t) {
2507
- tr.prototype[t] = function(n, r) {
2508
- return this.request(sr(r || {}, {
2506
+ V.forEach(["delete", "get", "head", "options"], function(t) {
2507
+ nr.prototype[t] = function(n, r) {
2508
+ return this.request(ar(r || {}, {
2509
2509
  method: t,
2510
2510
  url: n,
2511
2511
  data: (r || {}).data
2512
2512
  }));
2513
2513
  };
2514
2514
  });
2515
- W.forEach(["post", "put", "patch"], function(t) {
2515
+ V.forEach(["post", "put", "patch"], function(t) {
2516
2516
  function n(r) {
2517
2517
  return function(s, a, i) {
2518
- return this.request(sr(i || {}, {
2518
+ return this.request(ar(i || {}, {
2519
2519
  method: t,
2520
2520
  headers: r ? {
2521
2521
  "Content-Type": "multipart/form-data"
@@ -2525,7 +2525,7 @@ W.forEach(["post", "put", "patch"], function(t) {
2525
2525
  }));
2526
2526
  };
2527
2527
  }
2528
- tr.prototype[t] = n(), tr.prototype[t + "Form"] = n(!0);
2528
+ nr.prototype[t] = n(), nr.prototype[t + "Form"] = n(!0);
2529
2529
  });
2530
2530
  let Uv = class ld {
2531
2531
  constructor(t) {
@@ -2606,7 +2606,7 @@ function Wv(e) {
2606
2606
  };
2607
2607
  }
2608
2608
  function Vv(e) {
2609
- return W.isObject(e) && e.isAxiosError === !0;
2609
+ return V.isObject(e) && e.isAxiosError === !0;
2610
2610
  }
2611
2611
  const Xa = {
2612
2612
  Continue: 100,
@@ -2677,13 +2677,13 @@ Object.entries(Xa).forEach(([e, t]) => {
2677
2677
  Xa[t] = e;
2678
2678
  });
2679
2679
  function cd(e) {
2680
- const t = new tr(e), n = Bu(tr.prototype.request, t);
2681
- return W.extend(n, tr.prototype, t, { allOwnKeys: !0 }), W.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2682
- return cd(sr(e, o));
2680
+ const t = new nr(e), n = Bu(nr.prototype.request, t);
2681
+ return V.extend(n, nr.prototype, t, { allOwnKeys: !0 }), V.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2682
+ return cd(ar(e, o));
2683
2683
  }, n;
2684
2684
  }
2685
2685
  const wt = cd(To);
2686
- wt.Axios = tr;
2686
+ wt.Axios = nr;
2687
2687
  wt.CanceledError = Lr;
2688
2688
  wt.CancelToken = Uv;
2689
2689
  wt.isCancel = td;
@@ -2696,9 +2696,9 @@ wt.all = function(t) {
2696
2696
  };
2697
2697
  wt.spread = Wv;
2698
2698
  wt.isAxiosError = Vv;
2699
- wt.mergeConfig = sr;
2699
+ wt.mergeConfig = ar;
2700
2700
  wt.AxiosHeaders = Gt;
2701
- wt.formToJSON = (e) => ed(W.isHTMLForm(e) ? new FormData(e) : e);
2701
+ wt.formToJSON = (e) => ed(V.isHTMLForm(e) ? new FormData(e) : e);
2702
2702
  wt.getAdapter = ad.getAdapter;
2703
2703
  wt.HttpStatusCode = Xa;
2704
2704
  wt.default = wt;
@@ -2869,7 +2869,7 @@ class _i {
2869
2869
  return Vt(r);
2870
2870
  }
2871
2871
  }
2872
- const ar = new _i(), dN = _i, fN = _i;
2872
+ const Mn = new _i(), dN = _i, fN = _i;
2873
2873
  async function Pi(e, t) {
2874
2874
  return await rn(e, {
2875
2875
  responseType: "blob",
@@ -2913,7 +2913,7 @@ async function Zv(e, t = 50, n = 0) {
2913
2913
  }
2914
2914
  const ud = Mr(null);
2915
2915
  function Qv({ children: e, apiConfig: t }) {
2916
- const n = ar;
2916
+ const n = Mn;
2917
2917
  if (t) {
2918
2918
  const o = n.baseUrl, s = n.getAuthToken();
2919
2919
  t.baseUrl && t.baseUrl !== o && n.updateConfig({
@@ -3072,8 +3072,15 @@ function aw(e = {}) {
3072
3072
  lastText: ""
3073
3073
  };
3074
3074
  }, []), Y = me(() => {
3075
- var F;
3076
- console.debug("[use-chat] stop() invoked - aborting stream"), (F = S.current) == null || F.abort(), S.current = null, R.current = null, l(!1), w(!1), E.current = 0, x(0);
3075
+ var U;
3076
+ console.debug("[use-chat] stop() invoked - aborting stream");
3077
+ const F = (U = R.current) == null ? void 0 : U.threadId, P = () => {
3078
+ var X;
3079
+ (X = S.current) == null || X.abort(), S.current = null, R.current = null, l(!1), w(!1), E.current = 0, x(0);
3080
+ };
3081
+ (F ? Mn.cancelRun(F).catch((X) => {
3082
+ console.warn("[use-chat] cancel run failed:", X);
3083
+ }) : Promise.resolve()).finally(P);
3077
3084
  }, []), q = me(
3078
3085
  (F, P, k) => {
3079
3086
  S.current && (S.current.abort(), S.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && m(""), v(null), _.current = null, O.current = null, L.current = null, C(null), K.current = {
@@ -3081,14 +3088,14 @@ function aw(e = {}) {
3081
3088
  lastSeq: null,
3082
3089
  lastText: ""
3083
3090
  };
3084
- const V = new AbortController();
3085
- S.current = V;
3091
+ const U = new AbortController();
3092
+ S.current = U;
3086
3093
  let X = null, j = null, A = !1;
3087
3094
  return R.current = {
3088
3095
  threadId: F.threadId ?? null,
3089
3096
  headers: {}
3090
3097
  }, (async () => {
3091
- var $, ne, U, D, J, Q, Z, z, ae, se, ge, ye, Ce, Ne, Ee, at, bt, Rt;
3098
+ var $, ne, W, D, J, Q, Z, z, ae, se, ge, ye, Ce, Ne, Ee, at, bt, Rt;
3092
3099
  const B = (qe) => {
3093
3100
  var He;
3094
3101
  try {
@@ -3111,7 +3118,7 @@ function aw(e = {}) {
3111
3118
  let G = null;
3112
3119
  try {
3113
3120
  const ze = (ne = window.localStorage) == null ? void 0 : ne.getItem("chat-settings");
3114
- ze && (G = ((U = JSON.parse(ze)) == null ? void 0 : U.apiKey) || null);
3121
+ ze && (G = ((W = JSON.parse(ze)) == null ? void 0 : W.apiKey) || null);
3115
3122
  } catch {
3116
3123
  }
3117
3124
  const ue = Ke || Mt || G || null;
@@ -3143,7 +3150,7 @@ function aw(e = {}) {
3143
3150
  method: "POST",
3144
3151
  headers: Oe,
3145
3152
  body: JSON.stringify(F),
3146
- signal: V.signal,
3153
+ signal: U.signal,
3147
3154
  credentials: a
3148
3155
  });
3149
3156
  if (R.current && (R.current.headers = Ge), !We.ok || !We.body) {
@@ -3175,7 +3182,7 @@ function aw(e = {}) {
3175
3182
  var je;
3176
3183
  if (Date.now() - Pt > 18e5) {
3177
3184
  const Ke = "Stream idle timeout";
3178
- d(Ke), X = "error", j = Ke, V.abort(), (je = k == null ? void 0 : k.onError) == null || je.call(k, Ke);
3185
+ d(Ke), X = "error", j = Ke, U.abort(), (je = k == null ? void 0 : k.onError) == null || je.call(k, Ke);
3179
3186
  }
3180
3187
  }, 5e3), gt = 1024 * 1024;
3181
3188
  try {
@@ -3244,7 +3251,7 @@ function aw(e = {}) {
3244
3251
  else if (Ae.type === "state_history") {
3245
3252
  L.current = Ae;
3246
3253
  try {
3247
- const ut = Yn(Ae).latest;
3254
+ const ut = Xn(Ae).latest;
3248
3255
  ut && (_.current = ut.checkpointId ?? null, O.current = ut.checkpointNs ?? null, v(ut.checkpointId ?? null));
3249
3256
  } catch (Ze) {
3250
3257
  console.warn("[use-chat] Failed to hydrate state_history payload", Ze);
@@ -3291,12 +3298,12 @@ function aw(e = {}) {
3291
3298
  } catch (nn) {
3292
3299
  console.warn("[use-chat] onAuthError handler failed", nn);
3293
3300
  }
3294
- V.abort();
3301
+ U.abort();
3295
3302
  }
3296
3303
  }
3297
3304
  }
3298
3305
  }
3299
- It(), X === null && !V.signal.aborted && (X = "complete");
3306
+ It(), X === null && !U.signal.aborted && (X = "complete");
3300
3307
  } catch (je) {
3301
3308
  if (je.name === "AbortError")
3302
3309
  X = X ?? "aborted";
@@ -3321,7 +3328,7 @@ function aw(e = {}) {
3321
3328
  X = "error", j = He, d(He), (at = k == null ? void 0 : k.onError) == null || at.call(k, He), A || ((bt = k == null ? void 0 : k.onConnectionError) == null || bt.call(k, He), A = !0);
3322
3329
  }
3323
3330
  } finally {
3324
- const qe = E.current, He = _.current, Ge = O.current, Oe = L.current, We = X ?? (V.signal.aborted ? "aborted" : j ? "error" : "complete");
3331
+ const qe = E.current, He = _.current, Ge = O.current, Oe = L.current, We = X ?? (U.signal.aborted ? "aborted" : j ? "error" : "complete");
3325
3332
  try {
3326
3333
  (Rt = k == null ? void 0 : k.onClosed) == null || Rt.call(k, {
3327
3334
  reason: We,
@@ -3336,7 +3343,7 @@ function aw(e = {}) {
3336
3343
  }
3337
3344
  l(!1), w(!1), S.current = null, E.current = 0, x(0), R.current = null;
3338
3345
  }
3339
- })(), { close: () => V.abort() };
3346
+ })(), { close: () => U.abort() };
3340
3347
  },
3341
3348
  [t, n, r, e.autoAppendAssistant]
3342
3349
  );
@@ -3447,8 +3454,8 @@ function cw({
3447
3454
  const k = await e.createThread(P);
3448
3455
  return l(k.threadId), await R(), k.threadId;
3449
3456
  } catch (k) {
3450
- const V = String(k);
3451
- return n == null || n(V), null;
3457
+ const U = String(k);
3458
+ return n == null || n(U), null;
3452
3459
  }
3453
3460
  },
3454
3461
  [e, n, R]
@@ -3456,8 +3463,8 @@ function cw({
3456
3463
  async (P) => {
3457
3464
  const k = s;
3458
3465
  a((X) => X.filter((j) => j.threadId !== P));
3459
- const V = new AbortController();
3460
- E.current.set(P, V);
3466
+ const U = new AbortController();
3467
+ E.current.set(P, U);
3461
3468
  try {
3462
3469
  await e.deleteThread(P), T.current === P && (l(null), o == null || o());
3463
3470
  } catch (X) {
@@ -3473,8 +3480,8 @@ function cw({
3473
3480
  async (P, k) => {
3474
3481
  try {
3475
3482
  await e.updateThread(P, k), await R();
3476
- } catch (V) {
3477
- n == null || n(String(V));
3483
+ } catch (U) {
3484
+ n == null || n(String(U));
3478
3485
  }
3479
3486
  },
3480
3487
  [e, n, R]
@@ -3483,8 +3490,8 @@ function cw({
3483
3490
  S(!0), y("Sharing thread…");
3484
3491
  try {
3485
3492
  await e.shareThread(P, k), await _(), y("Shared successfully");
3486
- } catch (V) {
3487
- const X = lw(V);
3493
+ } catch (U) {
3494
+ const X = lw(U);
3488
3495
  throw n == null || n(X), y(`Failed to share: ${X}`), new Error(X);
3489
3496
  } finally {
3490
3497
  S(!1);
@@ -3495,9 +3502,9 @@ function cw({
3495
3502
  async (P, k) => {
3496
3503
  try {
3497
3504
  await e.unshareThread(P, k), await _();
3498
- } catch (V) {
3499
- const X = String(V);
3500
- throw n == null || n(X), V;
3505
+ } catch (U) {
3506
+ const X = String(U);
3507
+ throw n == null || n(X), U;
3501
3508
  }
3502
3509
  },
3503
3510
  [e, n, _]
@@ -3521,15 +3528,15 @@ function cw({
3521
3528
  updatedAt: P.updatedAt || (/* @__PURE__ */ new Date()).toISOString(),
3522
3529
  messageCount: P.messageCount ?? 1
3523
3530
  };
3524
- a((V) => {
3531
+ a((U) => {
3525
3532
  let X = !1;
3526
- const j = V.map((A) => A.threadId === k.threadId ? (X = !0, console.debug("[useThreadsState] thread_info: updating existing thread", k.threadId), {
3533
+ const j = U.map((A) => A.threadId === k.threadId ? (X = !0, console.debug("[useThreadsState] thread_info: updating existing thread", k.threadId), {
3527
3534
  ...A,
3528
3535
  title: k.title ?? A.title,
3529
3536
  updatedAt: k.updatedAt ?? A.updatedAt,
3530
3537
  messageCount: k.messageCount ?? A.messageCount
3531
3538
  }) : A);
3532
- return X ? j : (console.debug("[useThreadsState] thread_info: adding thread to list", k.threadId), [k, ...V]);
3539
+ return X ? j : (console.debug("[useThreadsState] thread_info: adding thread to list", k.threadId), [k, ...U]);
3533
3540
  });
3534
3541
  }, []), F = me(() => y(null), []);
3535
3542
  return {
@@ -3952,7 +3959,7 @@ function bc(e, t) {
3952
3959
  return { ...e, messages: [...e.messages, s] };
3953
3960
  }
3954
3961
  if (t.type === "state_history") {
3955
- const s = Yn(t), a = s.interrupt, i = s.latest, l = a === null ? rw(e.messages) : e.messages;
3962
+ const s = Xn(t), a = s.interrupt, i = s.latest, l = a === null ? rw(e.messages) : e.messages;
3956
3963
  return {
3957
3964
  ...e,
3958
3965
  messages: l,
@@ -4096,13 +4103,13 @@ function Rw({
4096
4103
  getMessages: d
4097
4104
  }) {
4098
4105
  const [p, m] = fe(null), v = Ue(
4099
- () => Yn(p),
4106
+ () => Xn(p),
4100
4107
  [p]
4101
4108
  ).checkpoints, g = ix(v), x = g.timeline, [b, w] = fe(!1), [y, C] = fe(null), [S, T] = fe(!1), [E, R] = fe(!1), [_, O] = fe(!1), [L, K] = fe(null), H = Le(o), N = Le(null), Y = Le(null), q = Le(null), F = Le(null), P = Le(null), k = Le(/* @__PURE__ */ new Map());
4102
4109
  Qe(() => {
4103
4110
  H.current = o;
4104
4111
  }, [o]);
4105
- const V = me(
4112
+ const U = me(
4106
4113
  async (Z) => {
4107
4114
  var ae, se;
4108
4115
  if (!Z.threadId) return;
@@ -4127,7 +4134,7 @@ function Rw({
4127
4134
  const ae = `${Z}:${z ?? "latest"}`, se = k.current.get(ae);
4128
4135
  if (se)
4129
4136
  return se;
4130
- const ge = V({
4137
+ const ge = U({
4131
4138
  threadId: Z,
4132
4139
  setLoading: T,
4133
4140
  onStart: () => K(null),
@@ -4143,7 +4150,7 @@ function Rw({
4143
4150
  );
4144
4151
  return;
4145
4152
  }
4146
- const { checkpoints: Ne } = Yn(Ce), Ee = Ne.find((at) => at.messages && at.messages.length > 0) ?? (z ? Ne.find((at) => at.checkpointId === z) : null) ?? Ne[0];
4153
+ const { checkpoints: Ne } = Xn(Ce), Ee = Ne.find((at) => at.messages && at.messages.length > 0) ?? (z ? Ne.find((at) => at.checkpointId === z) : null) ?? Ne[0];
4147
4154
  t((Ee == null ? void 0 : Ee.messages) ?? [], {
4148
4155
  checkpointId: (Ee == null ? void 0 : Ee.checkpointId) ?? null,
4149
4156
  checkpointNs: (Ee == null ? void 0 : Ee.checkpointNs) ?? null
@@ -4158,7 +4165,7 @@ function Rw({
4158
4165
  }
4159
4166
  return H.current === Z && (P.current = ae), ge;
4160
4167
  },
4161
- [e, t, V]
4168
+ [e, t, U]
4162
4169
  ), j = me(
4163
4170
  async (Z, z) => {
4164
4171
  F.current = Z;
@@ -4178,7 +4185,7 @@ function Rw({
4178
4185
  const z = Z.threadId ?? H.current;
4179
4186
  if (!z || H.current && H.current !== z)
4180
4187
  return;
4181
- const { checkpoints: ae } = Yn(Z);
4188
+ const { checkpoints: ae } = Xn(Z);
4182
4189
  if (!ae.length)
4183
4190
  return;
4184
4191
  const se = ae.find((ye) => ye.messages && ye.messages.length > 0) ?? ae.find((ye) => !!ye.checkpointId) ?? ae[0], ge = q.current === z;
@@ -4191,7 +4198,7 @@ function Rw({
4191
4198
  ), ne = me(
4192
4199
  async (Z, z) => {
4193
4200
  const ae = H.current;
4194
- await V({
4201
+ await U({
4195
4202
  threadId: ae,
4196
4203
  setLoading: O,
4197
4204
  action: async (se) => {
@@ -4206,7 +4213,7 @@ function Rw({
4206
4213
  );
4207
4214
  return;
4208
4215
  }
4209
- const { checkpoints: ye } = Yn(ge), Ce = ye.find(
4216
+ const { checkpoints: ye } = Xn(ge), Ce = ye.find(
4210
4217
  (Ne) => Ne.checkpointId === Z && (z ? Ne.checkpointNs === z : !0)
4211
4218
  );
4212
4219
  if (!Ce) {
@@ -4221,8 +4228,8 @@ function Rw({
4221
4228
  }).catch(() => {
4222
4229
  });
4223
4230
  },
4224
- [e, t, V]
4225
- ), U = me(
4231
+ [e, t, U]
4232
+ ), W = me(
4226
4233
  (Z, z) => {
4227
4234
  t(d(), {
4228
4235
  checkpointId: Z ?? null,
@@ -4234,7 +4241,7 @@ function Rw({
4234
4241
  H.current && await j(H.current);
4235
4242
  }, [j]), J = me(async () => {
4236
4243
  const Z = H.current;
4237
- !Z || !y || await V({
4244
+ !Z || !y || await U({
4238
4245
  threadId: Z,
4239
4246
  setLoading: R,
4240
4247
  action: async (z) => {
@@ -4244,7 +4251,7 @@ function Rw({
4244
4251
  });
4245
4252
  if (H.current !== z)
4246
4253
  return;
4247
- const { checkpoints: se } = Yn(ae);
4254
+ const { checkpoints: se } = Xn(ae);
4248
4255
  if (se.length > 0) {
4249
4256
  const ge = se[se.length - 1];
4250
4257
  n((ge == null ? void 0 : ge.messages) ?? []), w(!!(ge != null && ge.nextCursor)), C((ge == null ? void 0 : ge.nextCursor) ?? null);
@@ -4252,7 +4259,7 @@ function Rw({
4252
4259
  }
4253
4260
  }).catch(() => {
4254
4261
  });
4255
- }, [e, y, r, n, V]);
4262
+ }, [e, y, r, n, U]);
4256
4263
  Qe(() => {
4257
4264
  if (!l || !o || S || c)
4258
4265
  return;
@@ -4300,7 +4307,7 @@ function Rw({
4300
4307
  loadThread: j,
4301
4308
  navigateToCheckpoint: ne,
4302
4309
  loadOlderMessages: J,
4303
- setCurrentCheckpointId: U,
4310
+ setCurrentCheckpointId: W,
4304
4311
  returnToLatest: D,
4305
4312
  handleStateHistoryEvent: $,
4306
4313
  markSkipNextLoad: A,
@@ -4374,7 +4381,7 @@ function Nw({
4374
4381
  const k = me(
4375
4382
  (B) => q(() => B),
4376
4383
  []
4377
- ), V = me(
4384
+ ), U = me(
4378
4385
  (B) => P(() => B),
4379
4386
  []
4380
4387
  ), X = Ue(() => ({ assemblingMessageId: c.assemblingId ?? null }), [c.assemblingId]), j = Ue(
@@ -4441,18 +4448,18 @@ function Nw({
4441
4448
  ), A = Ue(
4442
4449
  () => ({
4443
4450
  registerClearThread: k,
4444
- registerRespondToInterrupt: V
4451
+ registerRespondToInterrupt: U
4445
4452
  }),
4446
- [k, V]
4453
+ [k, U]
4447
4454
  );
4448
4455
  return /* @__PURE__ */ u.jsx(bd.Provider, { value: A, children: /* @__PURE__ */ u.jsx(wd.Provider, { value: j, children: e }) });
4449
4456
  }
4450
4457
  function yc(e, t) {
4451
4458
  if (!e) return null;
4452
- const n = er(e);
4459
+ const n = tr(e);
4453
4460
  if (!n) return null;
4454
- const r = er(n.configurable) ?? n;
4455
- return Gn(r, t) ?? null;
4461
+ const r = tr(n.configurable) ?? n;
4462
+ return Yn(r, t) ?? null;
4456
4463
  }
4457
4464
  function Aw(e) {
4458
4465
  const t = yc(e, ["checkpoint_id", "checkpointId"]);
@@ -4574,11 +4581,11 @@ function Mw({
4574
4581
  }, [g]);
4575
4582
  const H = me(
4576
4583
  async (F, P, k) => {
4577
- const V = f.current;
4578
- if (!V)
4584
+ const U = f.current;
4585
+ if (!U)
4579
4586
  throw new Error("No active thread to handle interrupt");
4580
4587
  const X = P ? k ?? !0 : !1, j = K.current, A = {
4581
- threadId: V,
4588
+ threadId: U,
4582
4589
  checkpointId: j.id ?? void 0,
4583
4590
  checkpointNs: j.namespace ?? void 0,
4584
4591
  command: { kind: "resume", value: X }
@@ -4604,7 +4611,7 @@ function Mw({
4604
4611
  const Y = me(
4605
4612
  async (F, P) => {
4606
4613
  let k = f.current;
4607
- const V = (F == null ? void 0 : F.text) ?? "", X = (F == null ? void 0 : F.attachments) ?? [], j = (V == null ? void 0 : V.trim()) ?? "", A = { ...(F == null ? void 0 : F.payload) ?? {} }, B = Array.isArray(A.messages) ? A.messages : void 0;
4614
+ const U = (F == null ? void 0 : F.text) ?? "", X = (F == null ? void 0 : F.attachments) ?? [], j = (U == null ? void 0 : U.trim()) ?? "", A = { ...(F == null ? void 0 : F.payload) ?? {} }, B = Array.isArray(A.messages) ? A.messages : void 0;
4608
4615
  B && delete A.messages;
4609
4616
  const $ = !!(B && B.length);
4610
4617
  if (!k && !j && X.length === 0 && !$) return;
@@ -4612,8 +4619,8 @@ function Mw({
4612
4619
  const Ne = Math.floor(Date.now() / 1e3).toString(16).padStart(8, "0"), Ee = Array.from({ length: 4 }, () => Math.floor(Math.random() * 4294967295).toString(16).padStart(8, "0")).join("").slice(0, 16);
4613
4620
  k = `${Ne}${Ee}`, w(k), m(k);
4614
4621
  }
4615
- const { contentParts: ne, filesInfo: U } = await tw(X), D = [...ne];
4616
- j && D.push({ type: "text", text: V });
4622
+ const { contentParts: ne, filesInfo: W } = await tw(X), D = [...ne];
4623
+ j && D.push({ type: "text", text: U });
4617
4624
  const J = P == null ? void 0 : P.originalMessageId, Q = !!(P != null && P.edit && J), Z = !$ && D.length > 0;
4618
4625
  let z = null;
4619
4626
  Z && (z = {
@@ -4624,7 +4631,7 @@ function Mw({
4624
4631
  }, Q ? S(z, J) : S(z));
4625
4632
  const ae = $ ? B : z ? [z] : [], se = {
4626
4633
  ...A,
4627
- ...U.length ? { files_info: U } : {}
4634
+ ...W.length ? { files_info: W } : {}
4628
4635
  };
4629
4636
  ae.length ? se.messages = ae : "messages" in se || (se.messages = []);
4630
4637
  let ge = (P == null ? void 0 : P.checkpointId) ?? g.id ?? void 0, ye = (P == null ? void 0 : P.checkpointNs) ?? g.namespace ?? void 0;
@@ -4773,11 +4780,11 @@ function Fw() {
4773
4780
  return t && (e.baseUrl = t), n && (e.apiKey = n), e;
4774
4781
  }
4775
4782
  function Bw() {
4776
- const e = Fw(), t = ar.getAuthToken(), n = Td();
4783
+ const e = Fw(), t = Mn.getAuthToken(), n = Td();
4777
4784
  return {
4778
4785
  apiBaseUrl: Ed(
4779
4786
  e.baseUrl,
4780
- ar.baseUrl,
4787
+ Mn.baseUrl,
4781
4788
  n
4782
4789
  ),
4783
4790
  apiKey: t || e.apiKey || Cd() || "",
@@ -4807,13 +4814,13 @@ function Hw(e) {
4807
4814
  ...e,
4808
4815
  apiBaseUrl: An(e.apiBaseUrl)
4809
4816
  };
4810
- localStorage.setItem(kd, JSON.stringify(t)), t.apiKey && ar.setAuthToken(t.apiKey);
4817
+ localStorage.setItem(kd, JSON.stringify(t)), t.apiKey && Mn.setAuthToken(t.apiKey);
4811
4818
  } catch (t) {
4812
4819
  console.error("Failed to save settings:", t);
4813
4820
  }
4814
4821
  }
4815
4822
  function gN() {
4816
- const e = Bw(), t = zw(), n = ar.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
4823
+ const e = Bw(), t = zw(), n = Mn.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
4817
4824
  return {
4818
4825
  ...e,
4819
4826
  ...t,
@@ -4821,14 +4828,14 @@ function gN() {
4821
4828
  apiKey: n || t.apiKey || e.apiKey,
4822
4829
  // Always use the current base URL from API client
4823
4830
  apiBaseUrl: Ed(
4824
- ar.baseUrl,
4831
+ Mn.baseUrl,
4825
4832
  r,
4826
4833
  e.apiBaseUrl
4827
4834
  )
4828
4835
  };
4829
4836
  }
4830
4837
  function xN(e) {
4831
- ar.updateConfig({
4838
+ Mn.updateConfig({
4832
4839
  baseUrl: e.apiBaseUrl,
4833
4840
  authToken: e.apiKey ?? void 0
4834
4841
  }), Hw(e);
@@ -4885,7 +4892,7 @@ function Tc(e, t) {
4885
4892
  return e(t);
4886
4893
  e != null && (e.current = t);
4887
4894
  }
4888
- function Mn(...e) {
4895
+ function On(...e) {
4889
4896
  return (t) => {
4890
4897
  let n = !1;
4891
4898
  const r = e.map((o) => {
@@ -4902,7 +4909,7 @@ function Mn(...e) {
4902
4909
  };
4903
4910
  }
4904
4911
  function Be(...e) {
4905
- return h.useCallback(Mn(...e), e);
4912
+ return h.useCallback(On(...e), e);
4906
4913
  }
4907
4914
  function Ww(e, t) {
4908
4915
  const n = h.createContext(t), r = (s) => {
@@ -4970,7 +4977,7 @@ function Vw(...e) {
4970
4977
  }
4971
4978
  var At = globalThis != null && globalThis.document ? h.useLayoutEffect : () => {
4972
4979
  }, Kw = h[" useInsertionEffect ".trim().toString()] || At;
4973
- function On({
4980
+ function Dn({
4974
4981
  prop: e,
4975
4982
  defaultProp: t,
4976
4983
  onChange: n = () => {
@@ -5375,7 +5382,7 @@ function Bt(e) {
5375
5382
  n((r) => r ?? String(hb++));
5376
5383
  }, [e]), t ? `radix-${t}` : "";
5377
5384
  }
5378
- const mb = ["top", "right", "bottom", "left"], Dn = Math.min, Zt = Math.max, ps = Math.round, Fo = Math.floor, Cn = (e) => ({
5385
+ const mb = ["top", "right", "bottom", "left"], Ln = Math.min, Zt = Math.max, ps = Math.round, Fo = Math.floor, Cn = (e) => ({
5379
5386
  x: e,
5380
5387
  y: e
5381
5388
  }), gb = {
@@ -5388,7 +5395,7 @@ const mb = ["top", "right", "bottom", "left"], Dn = Math.min, Zt = Math.max, ps
5388
5395
  end: "start"
5389
5396
  };
5390
5397
  function ei(e, t, n) {
5391
- return Zt(e, Dn(t, n));
5398
+ return Zt(e, Ln(t, n));
5392
5399
  }
5393
5400
  function jn(e, t) {
5394
5401
  return typeof e == "function" ? e(t) : e;
@@ -5659,7 +5666,7 @@ const Rb = (e) => ({
5659
5666
  }, f = Hi(o), v = zi(f), g = await a.getDimensions(c), x = f === "y", b = x ? "top" : "left", w = x ? "bottom" : "right", y = x ? "clientHeight" : "clientWidth", C = s.reference[v] + s.reference[f] - m[f] - s.floating[v], S = m[f] - s.reference[f], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
5660
5667
  let E = T ? T[y] : 0;
5661
5668
  (!E || !await (a.isElement == null ? void 0 : a.isElement(T))) && (E = i.floating[y] || s.floating[v]);
5662
- const R = C / 2 - S / 2, _ = E / 2 - g[v] / 2 - 1, O = Dn(p[b], _), L = Dn(p[w], _), K = O, H = E - g[v] - L, N = E / 2 - g[v] / 2 + R, Y = ei(K, N, H), q = !l.arrow && Fr(o) != null && N !== Y && s.reference[v] / 2 - (N < K ? O : L) - g[v] / 2 < 0, F = q ? N < K ? N - K : N - H : 0;
5669
+ const R = C / 2 - S / 2, _ = E / 2 - g[v] / 2 - 1, O = Ln(p[b], _), L = Ln(p[w], _), K = O, H = E - g[v] - L, N = E / 2 - g[v] / 2 + R, Y = ei(K, N, H), q = !l.arrow && Fr(o) != null && N !== Y && s.reference[v] / 2 - (N < K ? O : L) - g[v] / 2 < 0, F = q ? N < K ? N - K : N - H : 0;
5663
5670
  return {
5664
5671
  [f]: m[f] + F,
5665
5672
  data: {
@@ -5735,7 +5742,7 @@ const Rb = (e) => ({
5735
5742
  k === "y";
5736
5743
  }
5737
5744
  return !0;
5738
- }).map((P) => [P.placement, P.overflows.filter((k) => k > 0).reduce((k, V) => k + V, 0)]).sort((P, k) => P[1] - k[1])[0]) == null ? void 0 : H[0];
5745
+ }).map((P) => [P.placement, P.overflows.filter((k) => k > 0).reduce((k, U) => k + U, 0)]).sort((P, k) => P[1] - k[1])[0]) == null ? void 0 : H[0];
5739
5746
  F && (q = F);
5740
5747
  break;
5741
5748
  }
@@ -5975,7 +5982,7 @@ const jb = function(e) {
5975
5982
  } = s.floating;
5976
5983
  let x, b;
5977
5984
  p === "top" || p === "bottom" ? (x = p, b = m === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (b = p, x = m === "end" ? "top" : "bottom");
5978
- const w = g - d.top - d.bottom, y = v - d.left - d.right, C = Dn(g - d[x], w), S = Dn(v - d[b], y), T = !t.middlewareData.shift;
5985
+ const w = g - d.top - d.bottom, y = v - d.left - d.right, C = Ln(g - d[x], w), S = Ln(v - d[b], y), T = !t.middlewareData.shift;
5979
5986
  let E = C, R = S;
5980
5987
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = y), (r = t.middlewareData.shift) != null && r.enabled.y && (E = w), T && !m) {
5981
5988
  const O = Zt(d.left, 0), L = Zt(d.right, 0), K = Zt(d.top, 0), H = Zt(d.bottom, 0);
@@ -6051,13 +6058,13 @@ function Ui(e) {
6051
6058
  return Fb.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Bb.some((r) => (n.willChange || "").includes(r)) || zb.some((r) => (n.contain || "").includes(r));
6052
6059
  }
6053
6060
  function Hb(e) {
6054
- let t = Ln(e);
6061
+ let t = $n(e);
6055
6062
  for (; En(t) && !jr(t); ) {
6056
6063
  if (Ui(t))
6057
6064
  return t;
6058
6065
  if (Hs(t))
6059
6066
  return null;
6060
- t = Ln(t);
6067
+ t = $n(t);
6061
6068
  }
6062
6069
  return null;
6063
6070
  }
@@ -6080,7 +6087,7 @@ function Us(e) {
6080
6087
  scrollTop: e.scrollY
6081
6088
  };
6082
6089
  }
6083
- function Ln(e) {
6090
+ function $n(e) {
6084
6091
  if (Br(e) === "html")
6085
6092
  return e;
6086
6093
  const t = (
@@ -6093,7 +6100,7 @@ function Ln(e) {
6093
6100
  return Dc(t) ? t.host : t;
6094
6101
  }
6095
6102
  function Md(e) {
6096
- const t = Ln(e);
6103
+ const t = $n(e);
6097
6104
  return jr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : En(t) && ko(t) ? t : Md(t);
6098
6105
  }
6099
6106
  function io(e, t, n) {
@@ -6273,7 +6280,7 @@ function $c(e, t, n) {
6273
6280
  return ms(r);
6274
6281
  }
6275
6282
  function $d(e, t) {
6276
- const n = Ln(e);
6283
+ const n = $n(e);
6277
6284
  return n === t || !pn(n) || jr(n) ? !1 : hn(n).position === "fixed" || $d(n, t);
6278
6285
  }
6279
6286
  function Zb(e, t) {
@@ -6282,10 +6289,10 @@ function Zb(e, t) {
6282
6289
  return n;
6283
6290
  let r = io(e, [], !1).filter((i) => pn(i) && Br(i) !== "body"), o = null;
6284
6291
  const s = hn(e).position === "fixed";
6285
- let a = s ? Ln(e) : e;
6292
+ let a = s ? $n(e) : e;
6286
6293
  for (; pn(a) && !jr(a); ) {
6287
6294
  const i = hn(a), l = Ui(a);
6288
- !l && i.position === "fixed" && (o = null), (s ? !l && !o : !l && i.position === "static" && !!o && Xb.has(o.position) || ko(a) && !l && $d(e, a)) ? r = r.filter((d) => d !== a) : o = i, a = Ln(a);
6295
+ !l && i.position === "fixed" && (o = null), (s ? !l && !o : !l && i.position === "static" && !!o && Xb.has(o.position) || ko(a) && !l && $d(e, a)) ? r = r.filter((d) => d !== a) : o = i, a = $n(a);
6289
6296
  }
6290
6297
  return t.set(e, r), r;
6291
6298
  }
@@ -6298,7 +6305,7 @@ function Qb(e) {
6298
6305
  } = e;
6299
6306
  const a = [...n === "clippingAncestors" ? Hs(t) ? [] : Zb(t, this._c) : [].concat(n), r], i = a[0], l = a.reduce((c, d) => {
6300
6307
  const p = $c(t, d, o);
6301
- return c.top = Zt(p.top, c.top), c.right = Dn(p.right, c.right), c.bottom = Dn(p.bottom, c.bottom), c.left = Zt(p.left, c.left), c;
6308
+ return c.top = Zt(p.top, c.top), c.right = Ln(p.right, c.right), c.bottom = Ln(p.bottom, c.bottom), c.left = Zt(p.left, c.left), c;
6302
6309
  }, $c(t, i, o));
6303
6310
  return {
6304
6311
  width: l.right - l.left,
@@ -6357,11 +6364,11 @@ function Fd(e, t) {
6357
6364
  if (Hs(e))
6358
6365
  return n;
6359
6366
  if (!En(e)) {
6360
- let o = Ln(e);
6367
+ let o = $n(e);
6361
6368
  for (; o && !jr(o); ) {
6362
6369
  if (pn(o) && !Ra(o))
6363
6370
  return o;
6364
- o = Ln(o);
6371
+ o = $n(o);
6365
6372
  }
6366
6373
  return n;
6367
6374
  }
@@ -6419,7 +6426,7 @@ function sy(e, t) {
6419
6426
  return;
6420
6427
  const v = Fo(p), g = Fo(o.clientWidth - (d + m)), x = Fo(o.clientHeight - (p + f)), b = Fo(d), y = {
6421
6428
  rootMargin: -v + "px " + -g + "px " + -x + "px " + -b + "px",
6422
- threshold: Zt(0, Dn(1, l)) || 1
6429
+ threshold: Zt(0, Ln(1, l)) || 1
6423
6430
  };
6424
6431
  let C = !0;
6425
6432
  function S(T) {
@@ -6576,7 +6583,7 @@ function gy(e) {
6576
6583
  middleware: m
6577
6584
  };
6578
6585
  L.current && (P.platform = L.current), py(T.current, E.current, P).then((k) => {
6579
- const V = {
6586
+ const U = {
6580
6587
  ...k,
6581
6588
  // The floating element's position may be recomputed while it's closed
6582
6589
  // but still mounted (such as when transitioning out). To ensure
@@ -6584,8 +6591,8 @@ function gy(e) {
6584
6591
  // setting it to `true` when `open === false` (must be specified).
6585
6592
  isPositioned: K.current !== !1
6586
6593
  };
6587
- N.current && !gs(R.current, V) && (R.current = V, vo.flushSync(() => {
6588
- p(V);
6594
+ N.current && !gs(R.current, U) && (R.current = U, vo.flushSync(() => {
6595
+ p(U);
6589
6596
  }));
6590
6597
  });
6591
6598
  }, [m, t, n, L, K]);
@@ -6621,17 +6628,17 @@ function gy(e) {
6621
6628
  };
6622
6629
  if (!q.floating)
6623
6630
  return P;
6624
- const k = zc(q.floating, d.x), V = zc(q.floating, d.y);
6631
+ const k = zc(q.floating, d.x), U = zc(q.floating, d.y);
6625
6632
  return i ? {
6626
6633
  ...P,
6627
- transform: "translate(" + k + "px, " + V + "px)",
6634
+ transform: "translate(" + k + "px, " + U + "px)",
6628
6635
  ...zd(q.floating) >= 1.5 && {
6629
6636
  willChange: "transform"
6630
6637
  }
6631
6638
  } : {
6632
6639
  position: n,
6633
6640
  left: k,
6634
- top: V
6641
+ top: U
6635
6642
  };
6636
6643
  }, [n, i, q.floating, d.x, d.y]);
6637
6644
  return h.useMemo(() => ({
@@ -6741,7 +6748,7 @@ var qd = "PopperAnchor", Gd = h.forwardRef(
6741
6748
  Gd.displayName = qd;
6742
6749
  var qi = "PopperContent", [Iy, Ny] = Wd(qi), Yd = h.forwardRef(
6743
6750
  (e, t) => {
6744
- var U, D, J, Q, Z, z;
6751
+ var W, D, J, Q, Z, z;
6745
6752
  const {
6746
6753
  __scopePopper: n,
6747
6754
  side: r = "bottom",
@@ -6792,11 +6799,11 @@ var qi = "PopperContent", [Iy, Ny] = Wd(qi), Yd = h.forwardRef(
6792
6799
  _y({ arrowWidth: E, arrowHeight: R }),
6793
6800
  m && Ty({ strategy: "referenceHidden", ...H })
6794
6801
  ]
6795
- }), [k, V] = Zd(q), X = vt(v);
6802
+ }), [k, U] = Zd(q), X = vt(v);
6796
6803
  At(() => {
6797
6804
  F && (X == null || X());
6798
6805
  }, [F, X]);
6799
- const j = (U = P.arrow) == null ? void 0 : U.x, A = (D = P.arrow) == null ? void 0 : D.y, B = ((J = P.arrow) == null ? void 0 : J.centerOffset) !== 0, [$, ne] = h.useState();
6806
+ const j = (W = P.arrow) == null ? void 0 : W.x, A = (D = P.arrow) == null ? void 0 : D.y, B = ((J = P.arrow) == null ? void 0 : J.centerOffset) !== 0, [$, ne] = h.useState();
6800
6807
  return At(() => {
6801
6808
  b && ne(window.getComputedStyle(b).zIndex);
6802
6809
  }, [b]), /* @__PURE__ */ u.jsx(
@@ -6836,7 +6843,7 @@ var qi = "PopperContent", [Iy, Ny] = Wd(qi), Yd = h.forwardRef(
6836
6843
  ve.div,
6837
6844
  {
6838
6845
  "data-side": k,
6839
- "data-align": V,
6846
+ "data-align": U,
6840
6847
  ...g,
6841
6848
  ref: y,
6842
6849
  style: {
@@ -7014,7 +7021,7 @@ var Hy = h.forwardRef((e, t) => {
7014
7021
  onEntryFocus: c,
7015
7022
  preventScrollOnEntryFocus: d = !1,
7016
7023
  ...p
7017
- } = e, m = h.useRef(null), f = Be(t, m), v = Fs(s), [g, x] = On({
7024
+ } = e, m = h.useRef(null), f = Be(t, m), v = Fs(s), [g, x] = Dn({
7018
7025
  prop: a,
7019
7026
  defaultProp: i ?? null,
7020
7027
  onChange: l,
@@ -7794,11 +7801,11 @@ var an = "MenuContent", [W0, tl] = pr(an), bf = h.forwardRef(
7794
7801
  disableOutsideScroll: v,
7795
7802
  ...g
7796
7803
  } = e, x = hr(an, n), b = Ao(an, n), w = qs(n), y = gf(n), C = $0(n), [S, T] = h.useState(null), E = h.useRef(null), R = Be(t, E, x.onContentChange), _ = h.useRef(0), O = h.useRef(""), L = h.useRef(0), K = h.useRef(null), H = h.useRef("right"), N = h.useRef(0), Y = v ? Ks : h.Fragment, q = v ? { as: q0, allowPinchZoom: !0 } : void 0, F = (k) => {
7797
- var U, D;
7798
- const V = O.current + k, X = C().filter((J) => !J.disabled), j = document.activeElement, A = (U = X.find((J) => J.ref.current === j)) == null ? void 0 : U.textValue, B = X.map((J) => J.textValue), $ = sS(B, V, A), ne = (D = X.find((J) => J.textValue === $)) == null ? void 0 : D.ref.current;
7804
+ var W, D;
7805
+ const U = O.current + k, X = C().filter((J) => !J.disabled), j = document.activeElement, A = (W = X.find((J) => J.ref.current === j)) == null ? void 0 : W.textValue, B = X.map((J) => J.textValue), $ = sS(B, U, A), ne = (D = X.find((J) => J.textValue === $)) == null ? void 0 : D.ref.current;
7799
7806
  (function J(Q) {
7800
7807
  O.current = Q, window.clearTimeout(_.current), Q !== "" && (_.current = window.setTimeout(() => J(""), 1e3));
7801
- })(V), ne && setTimeout(() => ne.focus());
7808
+ })(U), ne && setTimeout(() => ne.focus());
7802
7809
  };
7803
7810
  h.useEffect(() => () => window.clearTimeout(_.current), []), Fi();
7804
7811
  const P = h.useCallback((k) => {
@@ -7818,8 +7825,8 @@ var an = "MenuContent", [W0, tl] = pr(an), bf = h.forwardRef(
7818
7825
  ),
7819
7826
  onItemLeave: h.useCallback(
7820
7827
  (k) => {
7821
- var V;
7822
- P(k) || ((V = E.current) == null || V.focus(), T(null));
7828
+ var U;
7829
+ P(k) || ((U = E.current) == null || U.focus(), T(null));
7823
7830
  },
7824
7831
  [P]
7825
7832
  ),
@@ -7839,8 +7846,8 @@ var an = "MenuContent", [W0, tl] = pr(an), bf = h.forwardRef(
7839
7846
  asChild: !0,
7840
7847
  trapped: o,
7841
7848
  onMountAutoFocus: le(s, (k) => {
7842
- var V;
7843
- k.preventDefault(), (V = E.current) == null || V.focus({ preventScroll: !0 });
7849
+ var U;
7850
+ k.preventDefault(), (U = E.current) == null || U.focus({ preventScroll: !0 });
7844
7851
  }),
7845
7852
  onUnmountAutoFocus: a,
7846
7853
  children: /* @__PURE__ */ u.jsx(
@@ -7885,7 +7892,7 @@ var an = "MenuContent", [W0, tl] = pr(an), bf = h.forwardRef(
7885
7892
  const B = E.current;
7886
7893
  if (k.target !== B || !O0.includes(k.key)) return;
7887
7894
  k.preventDefault();
7888
- const ne = C().filter((U) => !U.disabled).map((U) => U.ref.current);
7895
+ const ne = C().filter((W) => !W.disabled).map((W) => W.ref.current);
7889
7896
  hf.includes(k.key) && ne.reverse(), rS(ne);
7890
7897
  }),
7891
7898
  onBlur: le(e.onBlur, (k) => {
@@ -7894,8 +7901,8 @@ var an = "MenuContent", [W0, tl] = pr(an), bf = h.forwardRef(
7894
7901
  onPointerMove: le(
7895
7902
  e.onPointerMove,
7896
7903
  co((k) => {
7897
- const V = k.target, X = N.current !== k.clientX;
7898
- if (k.currentTarget.contains(V) && X) {
7904
+ const U = k.target, X = N.current !== k.clientX;
7905
+ if (k.currentTarget.contains(U) && X) {
7899
7906
  const j = k.clientX > N.current ? "right" : "left";
7900
7907
  H.current = j, N.current = k.clientX;
7901
7908
  }
@@ -8119,7 +8126,7 @@ var nS = "MenuSub", [vN, _f] = pr(nS), Jr = "MenuSubTrigger", Pf = h.forwardRef(
8119
8126
  "aria-controls": o.contentId,
8120
8127
  "data-state": Df(n.open),
8121
8128
  ...e,
8122
- ref: Mn(t, o.onTriggerChange),
8129
+ ref: On(t, o.onTriggerChange),
8123
8130
  onClick: (p) => {
8124
8131
  var m;
8125
8132
  (m = e.onClick) == null || m.call(e, p), !(e.disabled || p.defaultPrevented) && (p.currentTarget.focus(), n.open || n.onOpenChange(!0));
@@ -8262,7 +8269,7 @@ var lS = xf, cS = Qi, uS = wf, dS = bf, fS = rl, pS = yf, hS = Gs, mS = Tf, gS =
8262
8269
  defaultOpen: s,
8263
8270
  onOpenChange: a,
8264
8271
  modal: i = !0
8265
- } = e, l = zt(t), c = h.useRef(null), [d, p] = On({
8272
+ } = e, l = zt(t), c = h.useRef(null), [d, p] = Dn({
8266
8273
  prop: o,
8267
8274
  defaultProp: s ?? !1,
8268
8275
  onChange: a,
@@ -8299,7 +8306,7 @@ var Ff = "DropdownMenuTrigger", Bf = h.forwardRef(
8299
8306
  "data-disabled": r ? "" : void 0,
8300
8307
  disabled: r,
8301
8308
  ...o,
8302
- ref: Mn(t, s.triggerRef),
8309
+ ref: On(t, s.triggerRef),
8303
8310
  onPointerDown: le(e.onPointerDown, (i) => {
8304
8311
  !r && i.button === 0 && i.ctrlKey === !1 && (s.onOpenToggle(), s.open || i.preventDefault());
8305
8312
  }),
@@ -8469,7 +8476,7 @@ const Xs = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
8469
8476
  }
8470
8477
  ) }));
8471
8478
  Xs.displayName = Zf.displayName;
8472
- const nr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ u.jsx(
8479
+ const rr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ u.jsx(
8473
8480
  ep,
8474
8481
  {
8475
8482
  ref: r,
@@ -8481,7 +8488,7 @@ const nr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
8481
8488
  ...n
8482
8489
  }
8483
8490
  ));
8484
- nr.displayName = ep.displayName;
8491
+ rr.displayName = ep.displayName;
8485
8492
  const VS = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ u.jsxs(
8486
8493
  tp,
8487
8494
  {
@@ -8611,7 +8618,7 @@ function XS({
8611
8618
  id: $,
8612
8619
  shouldClear: !0
8613
8620
  }, S(() => {
8614
- var ne, U, D;
8621
+ var ne, W, D;
8615
8622
  try {
8616
8623
  const J = l(B);
8617
8624
  J && typeof J.then == "function" ? J.then(() => {
@@ -8620,7 +8627,7 @@ function XS({
8620
8627
  }).catch(() => {
8621
8628
  var Q;
8622
8629
  ((Q = R.current) == null ? void 0 : Q.id) === $ && (R.current = null);
8623
- }) : (((ne = R.current) == null ? void 0 : ne.id) === $ && R.current.shouldClear && (x || (w(""), T.current && (T.current.style.height = "auto"), i == null || i(""))), ((U = R.current) == null ? void 0 : U.id) === $ && (R.current = null));
8630
+ }) : (((ne = R.current) == null ? void 0 : ne.id) === $ && R.current.shouldClear && (x || (w(""), T.current && (T.current.style.height = "auto"), i == null || i(""))), ((W = R.current) == null ? void 0 : W.id) === $ && (R.current = null));
8624
8631
  } catch {
8625
8632
  ((D = R.current) == null ? void 0 : D.id) === $ && (R.current = null);
8626
8633
  }
@@ -8683,7 +8690,7 @@ function XS({
8683
8690
  ) })
8684
8691
  ] }) });
8685
8692
  }
8686
- const JS = M.memo(XS), Js = 0, Hn = 1, Hr = 2, lp = 4;
8693
+ const JS = M.memo(XS), Js = 0, Un = 1, Hr = 2, lp = 4;
8687
8694
  function Gc(e) {
8688
8695
  return () => e;
8689
8696
  }
@@ -8719,7 +8726,7 @@ function ct(...e) {
8719
8726
  return e;
8720
8727
  }
8721
8728
  function et(e, t) {
8722
- return e(Hn, t);
8729
+ return e(Un, t);
8723
8730
  }
8724
8731
  function Me(e, t) {
8725
8732
  e(Js, t);
@@ -8734,7 +8741,7 @@ function we(e, t) {
8734
8741
  return et(e, QS(t, Js));
8735
8742
  }
8736
8743
  function fn(e, t) {
8737
- const n = e(Hn, (r) => {
8744
+ const n = e(Un, (r) => {
8738
8745
  n(), t(r);
8739
8746
  });
8740
8747
  return n;
@@ -8776,7 +8783,7 @@ function te(e, ...t) {
8776
8783
  case Hr:
8777
8784
  cl(e);
8778
8785
  return;
8779
- case Hn:
8786
+ case Un:
8780
8787
  return et(e, n(o));
8781
8788
  }
8782
8789
  };
@@ -8824,7 +8831,7 @@ function rT(e) {
8824
8831
  const r = () => t == null ? void 0 : t();
8825
8832
  return function(o, s) {
8826
8833
  switch (o) {
8827
- case Hn:
8834
+ case Un:
8828
8835
  return s ? n === s ? void 0 : (r(), n = s, t = et(e, s), t) : (r(), Ur);
8829
8836
  case Hr:
8830
8837
  r(), n = null;
@@ -8840,7 +8847,7 @@ function oe(e) {
8840
8847
  case Js:
8841
8848
  t = o;
8842
8849
  break;
8843
- case Hn: {
8850
+ case Un: {
8844
8851
  o(t);
8845
8852
  break;
8846
8853
  }
@@ -8865,7 +8872,7 @@ function Ve() {
8865
8872
  case Hr:
8866
8873
  e.splice(0, e.length);
8867
8874
  return;
8868
- case Hn:
8875
+ case Un:
8869
8876
  return e.push(n), () => {
8870
8877
  const r = e.indexOf(n);
8871
8878
  r > -1 && e.splice(r, 1);
@@ -8909,7 +8916,7 @@ function yt(...e) {
8909
8916
  cl(t);
8910
8917
  return;
8911
8918
  }
8912
- case Hn:
8919
+ case Un:
8913
8920
  return r === o && a(n), et(t, a);
8914
8921
  }
8915
8922
  };
@@ -8922,7 +8929,7 @@ function ai(...e) {
8922
8929
  switch (t) {
8923
8930
  case Hr:
8924
8931
  return;
8925
- case Hn:
8932
+ case Un:
8926
8933
  return eT(...e.map((r) => et(r, n)));
8927
8934
  }
8928
8935
  };
@@ -8933,7 +8940,7 @@ const aT = {
8933
8940
  3: "error",
8934
8941
  1: "log",
8935
8942
  2: "warn"
8936
- }, iT = () => typeof globalThis > "u" ? window : globalThis, Un = Je(
8943
+ }, iT = () => typeof globalThis > "u" ? window : globalThis, Wn = Je(
8937
8944
  () => {
8938
8945
  const e = oe(
8939
8946
  3
@@ -9157,8 +9164,8 @@ function ii(e, t) {
9157
9164
  }
9158
9165
  } else return t < n ? ss(kt(e, { l: ii(r, t) })) : ss(kt(e, { r: ii(o, t) }));
9159
9166
  }
9160
- function Zn(e) {
9161
- return rt(e) ? [] : [...Zn(e.l), { k: e.k, v: e.v }, ...Zn(e.r)];
9167
+ function Qn(e) {
9168
+ return rt(e) ? [] : [...Qn(e.l), { k: e.k, v: e.v }, ...Qn(e.r)];
9162
9169
  }
9163
9170
  function li(e, t, n) {
9164
9171
  if (rt(e))
@@ -9272,7 +9279,7 @@ function dT(e, t, n, r) {
9272
9279
  const o = ws(e, t, r), s = ws(e, n, r, o);
9273
9280
  return e.slice(o, s + 1);
9274
9281
  }
9275
- function $n(e, t) {
9282
+ function Fn(e, t) {
9276
9283
  return Math.round(e.getBoundingClientRect()[t]);
9277
9284
  }
9278
9285
  function ea(e) {
@@ -9365,7 +9372,7 @@ function xT(e, [t, n, r, o]) {
9365
9372
  };
9366
9373
  }
9367
9374
  function vT(e) {
9368
- return Zn(e).map(({ k: t, v: n }, r, o) => {
9375
+ return Qn(e).map(({ k: t, v: n }, r, o) => {
9369
9376
  const s = o[r + 1];
9370
9377
  return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: t };
9371
9378
  });
@@ -9411,7 +9418,7 @@ const yT = {
9411
9418
  offsetWidth: "width"
9412
9419
  }, Rn = Je(
9413
9420
  ([{ log: e }, { recalcInProgress: t }]) => {
9414
- const n = Ve(), r = Ve(), o = Ft(r, 0), s = Ve(), a = Ve(), i = oe(0), l = oe([]), c = oe(void 0), d = oe(void 0), p = oe((S, T) => $n(S, yT[T])), m = oe(void 0), f = oe(0), v = fT(), g = Ft(
9421
+ const n = Ve(), r = Ve(), o = Ft(r, 0), s = Ve(), a = Ve(), i = oe(0), l = oe([]), c = oe(void 0), d = oe(void 0), p = oe((S, T) => Fn(S, yT[T])), m = oe(void 0), f = oe(0), v = fT(), g = Ft(
9415
9422
  te(n, Fe(l, e, f), Tn(xT, v), lt()),
9416
9423
  v
9417
9424
  ), x = Ft(
@@ -9532,7 +9539,7 @@ const yT = {
9532
9539
  startIndex: N + 1
9533
9540
  }), K++, L += Y + 1;
9534
9541
  }
9535
- const H = Zn(T.sizeTree);
9542
+ const H = Qn(T.sizeTree);
9536
9543
  return L !== S && H.shift(), H.reduce(
9537
9544
  (N, { k: Y, v: q }) => {
9538
9545
  let F = N.ranges;
@@ -9556,7 +9563,7 @@ const yT = {
9556
9563
  }
9557
9564
  ).ranges;
9558
9565
  }
9559
- return Zn(T.sizeTree).reduce(
9566
+ return Qn(T.sizeTree).reduce(
9560
9567
  (O, { k: L, v: K }) => ({
9561
9568
  prevIndex: L + S,
9562
9569
  prevSize: K,
@@ -9598,7 +9605,7 @@ const yT = {
9598
9605
  const H = _[L + 1] - K - 1;
9599
9606
  L++, O += H + 1;
9600
9607
  }
9601
- if (R = Zn(T.sizeTree).reduce((H, { k: N, v: Y }) => Qt(H, Math.max(0, N + S), Y), R), O !== -S) {
9608
+ if (R = Qn(T.sizeTree).reduce((H, { k: N, v: Y }) => Qt(H, Math.max(0, N + S), Y), R), O !== -S) {
9602
9609
  const H = fo(T.sizeTree, K);
9603
9610
  R = Qt(R, 0, H);
9604
9611
  const N = mn(T.sizeTree, -S + 1)[1];
@@ -9610,7 +9617,7 @@ const yT = {
9610
9617
  ...ui(T.offsetTree, 0, R, E)
9611
9618
  };
9612
9619
  } else {
9613
- const R = Zn(T.sizeTree).reduce((_, { k: O, v: L }) => Qt(_, Math.max(0, O + S), L), Rr());
9620
+ const R = Qn(T.sizeTree).reduce((_, { k: O, v: L }) => Qt(_, Math.max(0, O + S), L), Rr());
9614
9621
  return {
9615
9622
  ...T,
9616
9623
  sizeTree: R,
@@ -9642,7 +9649,7 @@ const yT = {
9642
9649
  unshiftWith: s
9643
9650
  };
9644
9651
  },
9645
- ct(Un, dl),
9652
+ ct(Wn, dl),
9646
9653
  { singleton: !0 }
9647
9654
  );
9648
9655
  function ST(e) {
@@ -9681,7 +9688,7 @@ const yp = Je(
9681
9688
  ), { groupCounts: s, topItemsIndexes: a };
9682
9689
  },
9683
9690
  ct(Rn, Ht)
9684
- ), Wn = Je(
9691
+ ), Vn = Je(
9685
9692
  ([{ log: e }]) => {
9686
9693
  const t = oe(!1), n = tn(
9687
9694
  te(
@@ -9694,7 +9701,7 @@ const yp = Je(
9694
9701
  r && xt(e)("props updated", {}, Yt.DEBUG);
9695
9702
  }), { didMount: n, propsReady: t };
9696
9703
  },
9697
- ct(Un),
9704
+ ct(Wn),
9698
9705
  { singleton: !0 }
9699
9706
  ), TT = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
9700
9707
  function Sp(e) {
@@ -9733,9 +9740,9 @@ const jo = Je(
9733
9740
  H,
9734
9741
  N
9735
9742
  ]) => {
9736
- const Y = Sp(C), { align: q, behavior: F, offset: P } = Y, k = E - 1, V = bp(Y, S, k);
9737
- let X = ho(V, S.offsetTree, K) + _;
9738
- q === "end" ? (X += H + mn(S.sizeTree, V)[1] - T + N, V === k && (X += O)) : q === "center" ? X += (H + mn(S.sizeTree, V)[1] - T + N) / 2 : X -= R, P && (X += P);
9743
+ const Y = Sp(C), { align: q, behavior: F, offset: P } = Y, k = E - 1, U = bp(Y, S, k);
9744
+ let X = ho(U, S.offsetTree, K) + _;
9745
+ q === "end" ? (X += H + mn(S.sizeTree, U)[1] - T + N, U === k && (X += O)) : q === "center" ? X += (H + mn(S.sizeTree, U)[1] - T + N) / 2 : X -= R, P && (X += P);
9739
9746
  const j = (A) => {
9740
9747
  y(), A ? (L("retrying to scroll to", { location: C }, Yt.DEBUG), Me(f, C)) : (Me(v, !0), L("list did not change, scroll successful", {}, Yt.DEBUG));
9741
9748
  };
@@ -9750,7 +9757,7 @@ const jo = Je(
9750
9757
  x = fn(te(t, CT(150)), j);
9751
9758
  return b = setTimeout(() => {
9752
9759
  y();
9753
- }, 1200), Me(l, !0), L("scrolling from index to", { behavior: F, index: V, top: X }, Yt.DEBUG), { behavior: F, top: X };
9760
+ }, 1200), Me(l, !0), L("scrolling from index to", { behavior: F, index: U, top: X }, Yt.DEBUG), { behavior: F, top: X };
9754
9761
  }
9755
9762
  )
9756
9763
  ),
@@ -9761,7 +9768,7 @@ const jo = Je(
9761
9768
  topListHeight: g
9762
9769
  };
9763
9770
  },
9764
- ct(Rn, Ht, Un),
9771
+ ct(Rn, Ht, Wn),
9765
9772
  { singleton: !0 }
9766
9773
  );
9767
9774
  function CT(e) {
@@ -9824,7 +9831,7 @@ const _o = Je(
9824
9831
  scrolledToInitialItem: i
9825
9832
  };
9826
9833
  },
9827
- ct(Rn, Ht, jo, Wn),
9834
+ ct(Rn, Ht, jo, Vn),
9828
9835
  { singleton: !0 }
9829
9836
  );
9830
9837
  function Tp(e, t) {
@@ -10177,28 +10184,28 @@ const gr = Je(
10177
10184
  q,
10178
10185
  H
10179
10186
  );
10180
- const V = [];
10187
+ const U = [];
10181
10188
  if (K.length > 0) {
10182
10189
  const $ = K[0], ne = K[K.length - 1];
10183
- let U = 0;
10190
+ let W = 0;
10184
10191
  for (const D of Qs(P, $, ne)) {
10185
10192
  const J = D.value, Q = Math.max(D.start, $), Z = Math.min(D.end, ne);
10186
10193
  for (let z = Q; z <= Z; z++)
10187
- V.push({ data: Y == null ? void 0 : Y[z], index: z, offset: U, size: J }), U += J;
10194
+ U.push({ data: Y == null ? void 0 : Y[z], index: z, offset: W, size: J }), W += J;
10188
10195
  }
10189
10196
  }
10190
10197
  if (!L)
10191
- return as([], V, R, N, q, H);
10198
+ return as([], U, R, N, q, H);
10192
10199
  const X = K.length > 0 ? K[K.length - 1] + 1 : 0, j = gT(F, T, E, X);
10193
10200
  if (j.length === 0)
10194
10201
  return null;
10195
10202
  const A = R - 1, B = Zs([], ($) => {
10196
10203
  for (const ne of j) {
10197
- const U = ne.value;
10198
- let D = U.offset, J = ne.start;
10199
- const Q = U.size;
10200
- if (U.offset < T) {
10201
- J += Math.floor((T - U.offset + N) / (Q + N));
10204
+ const W = ne.value;
10205
+ let D = W.offset, J = ne.start;
10206
+ const Q = W.size;
10207
+ if (W.offset < T) {
10208
+ J += Math.floor((T - W.offset + N) / (Q + N));
10202
10209
  const z = J - ne.start;
10203
10210
  D += z * Q + z * N;
10204
10211
  }
@@ -10208,7 +10215,7 @@ const gr = Je(
10208
10215
  $.push({ data: Y == null ? void 0 : Y[z], index: z, offset: D, size: Q }), D += Q + N;
10209
10216
  }
10210
10217
  });
10211
- return as(B, V, R, N, q, H);
10218
+ return as(B, U, R, N, q, H);
10212
10219
  }
10213
10220
  ),
10214
10221
  //@ts-expect-error filter needs to be fixed
@@ -10288,7 +10295,7 @@ const gr = Je(
10288
10295
  _o,
10289
10296
  jo,
10290
10297
  Po,
10291
- Wn,
10298
+ Vn,
10292
10299
  dl
10293
10300
  ),
10294
10301
  { singleton: !0 }
@@ -10367,7 +10374,7 @@ const gr = Je(
10367
10374
  scrollIntoView: d
10368
10375
  };
10369
10376
  },
10370
- ct(Rn, Ht, jo, gr, Un),
10377
+ ct(Rn, Ht, jo, gr, Wn),
10371
10378
  { singleton: !0 }
10372
10379
  );
10373
10380
  function ou(e) {
@@ -10472,8 +10479,8 @@ const jT = (e, t) => typeof e == "function" ? ou(e(t)) : t && ou(e), _T = Je(
10472
10479
  Po,
10473
10480
  jo,
10474
10481
  _o,
10482
+ Vn,
10475
10483
  Wn,
10476
- Un,
10477
10484
  Ht,
10478
10485
  kp,
10479
10486
  Rp
@@ -10489,7 +10496,7 @@ const jT = (e, t) => typeof e == "function" ? ou(e(t)) : t && ou(e), _T = Je(
10489
10496
  ),
10490
10497
  a
10491
10498
  ), {}),
10492
- ct(Rn, _o, gr, Wn),
10499
+ ct(Rn, _o, gr, Vn),
10493
10500
  { singleton: !0 }
10494
10501
  ), MT = Je(
10495
10502
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
@@ -10519,7 +10526,7 @@ const jT = (e, t) => typeof e == "function" ? ou(e(t)) : t && ou(e), _T = Je(
10519
10526
  initialScrollTop: r
10520
10527
  };
10521
10528
  },
10522
- ct(Wn, Ht, gr),
10529
+ ct(Vn, Ht, gr),
10523
10530
  { singleton: !0 }
10524
10531
  ), Ip = Je(
10525
10532
  ([{ scrollVelocity: e }]) => {
@@ -10614,7 +10621,7 @@ const jT = (e, t) => typeof e == "function" ? ou(e(t)) : t && ou(e), _T = Je(
10614
10621
  restoreStateFrom: d
10615
10622
  };
10616
10623
  },
10617
- ct(Rn, Ht, _o, Wn, gl)
10624
+ ct(Rn, Ht, _o, Vn, gl)
10618
10625
  );
10619
10626
  function DT(e) {
10620
10627
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -10712,7 +10719,7 @@ const $T = Np(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10712
10719
  }
10713
10720
  ), { deviation: e };
10714
10721
  },
10715
- ct(Ht, Po, gr, Rn, Un, dl)
10722
+ ct(Ht, Po, gr, Rn, Wn, dl)
10716
10723
  ), BT = Je(
10717
10724
  ([
10718
10725
  e,
@@ -10742,14 +10749,14 @@ const $T = Np(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10742
10749
  ct(
10743
10750
  ml,
10744
10751
  PT,
10745
- Wn,
10752
+ Vn,
10746
10753
  Ip,
10747
10754
  Ep,
10748
10755
  MT,
10749
10756
  NT,
10750
10757
  gl,
10751
10758
  Rp,
10752
- Un,
10759
+ Wn,
10753
10760
  kp
10754
10761
  )
10755
10762
  ), Ap = Je(
@@ -10957,9 +10964,9 @@ function Op(e, t, n, r = Ur, o, s) {
10957
10964
  const v = m.behavior === "smooth";
10958
10965
  let g, x, b;
10959
10966
  Da(f) ? (x = Math.max(
10960
- $n(f.document.documentElement, s ? "width" : "height"),
10967
+ Fn(f.document.documentElement, s ? "width" : "height"),
10961
10968
  s ? f.document.documentElement.scrollWidth : f.document.documentElement.scrollHeight
10962
- ), g = s ? f.innerWidth : f.innerHeight, b = s ? window.scrollX : window.scrollY) : (x = f[s ? "scrollWidth" : "scrollHeight"], g = $n(f, s ? "width" : "height"), b = f[s ? "scrollLeft" : "scrollTop"]);
10969
+ ), g = s ? f.innerWidth : f.innerHeight, b = s ? window.scrollX : window.scrollY) : (x = f[s ? "scrollWidth" : "scrollHeight"], g = Fn(f, s ? "width" : "height"), b = f[s ? "scrollLeft" : "scrollTop"]);
10963
10970
  const w = x - g;
10964
10971
  if (m.top = Math.ceil(Math.max(Math.min(w, m.top), 0)), Tp(g, x) || m.top === b) {
10965
10972
  e({ scrollHeight: x, scrollTop: b, viewportHeight: g }), v && t(!0);
@@ -11123,7 +11130,7 @@ const ZT = /* @__PURE__ */ M.memo(function() {
11123
11130
  const e = _e("HeaderComponent"), t = on("headerHeight"), n = _e("HeaderFooterTag"), r = mr(
11124
11131
  M.useMemo(
11125
11132
  () => (s) => {
11126
- t($n(s, "height"));
11133
+ t(Fn(s, "height"));
11127
11134
  },
11128
11135
  [t]
11129
11136
  ),
@@ -11135,7 +11142,7 @@ const ZT = /* @__PURE__ */ M.memo(function() {
11135
11142
  const e = _e("FooterComponent"), t = on("footerHeight"), n = _e("HeaderFooterTag"), r = mr(
11136
11143
  M.useMemo(
11137
11144
  () => (s) => {
11138
- t($n(s, "height"));
11145
+ t(Fn(s, "height"));
11139
11146
  },
11140
11147
  [t]
11141
11148
  ),
@@ -11198,7 +11205,7 @@ function $p({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11198
11205
  }
11199
11206
  const eC = ({ children: e }) => {
11200
11207
  const t = M.useContext(_p), n = on("viewportHeight"), r = on("fixedItemHeight"), o = _e("alignToBottom"), s = _e("horizontalDirection"), a = M.useMemo(
11201
- () => cp(n, (l) => $n(l, s ? "width" : "height")),
11208
+ () => cp(n, (l) => Fn(l, s ? "width" : "height")),
11202
11209
  [n, s]
11203
11210
  ), i = mr(a, !0, _e("skipAnimationFrameInResizeObserver"));
11204
11211
  return M.useEffect(() => {
@@ -11370,7 +11377,7 @@ const fC = /* @__PURE__ */ Je(
11370
11377
  { customScrollParent: x, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: C },
11371
11378
  S
11372
11379
  ]) => {
11373
- const T = oe(0), E = oe(0), R = oe(iu), _ = oe({ height: 0, width: 0 }), O = oe({ height: 0, width: 0 }), L = Ve(), K = Ve(), H = oe(0), N = oe(null), Y = oe({ column: 0, row: 0 }), q = Ve(), F = Ve(), P = oe(!1), k = oe(0), V = oe(!0), X = oe(!1), j = oe(!1);
11380
+ const T = oe(0), E = oe(0), R = oe(iu), _ = oe({ height: 0, width: 0 }), O = oe({ height: 0, width: 0 }), L = Ve(), K = Ve(), H = oe(0), N = oe(null), Y = oe({ column: 0, row: 0 }), q = Ve(), F = Ve(), P = oe(!1), k = oe(0), U = oe(!0), X = oe(!1), j = oe(!1);
11374
11381
  et(
11375
11382
  te(
11376
11383
  v,
@@ -11378,18 +11385,18 @@ const fC = /* @__PURE__ */ Je(
11378
11385
  Ie(([D, J]) => !!J)
11379
11386
  ),
11380
11387
  () => {
11381
- Me(V, !1);
11388
+ Me(U, !1);
11382
11389
  }
11383
11390
  ), et(
11384
11391
  te(
11385
- yt(v, V, O, _, k, X),
11392
+ yt(v, U, O, _, k, X),
11386
11393
  Ie(([D, J, Q, Z, , z]) => D && !J && Q.height !== 0 && Z.height !== 0 && !z)
11387
11394
  ),
11388
11395
  ([, , , , D]) => {
11389
11396
  Me(X, !0), pl(1, () => {
11390
11397
  Me(L, D);
11391
11398
  }), fn(te(c), () => {
11392
- Me(t, [0, 0]), Me(V, !0);
11399
+ Me(t, [0, 0]), Me(U, !0);
11393
11400
  });
11394
11401
  }
11395
11402
  ), we(
@@ -11443,7 +11450,7 @@ const fC = /* @__PURE__ */ Je(
11443
11450
  Re(N),
11444
11451
  Re(E),
11445
11452
  Re(P),
11446
- Re(V),
11453
+ Re(U),
11447
11454
  Re(k)
11448
11455
  ),
11449
11456
  Ie(([, , , , , , , D]) => !D),
@@ -11550,7 +11557,7 @@ const fC = /* @__PURE__ */ Je(
11550
11557
  ),
11551
11558
  l
11552
11559
  );
11553
- const U = Ft(
11560
+ const W = Ft(
11554
11561
  te(
11555
11562
  R,
11556
11563
  pe((D) => D.offsetBottom + D.bottom)
@@ -11594,7 +11601,7 @@ const fC = /* @__PURE__ */ Je(
11594
11601
  gridState: R,
11595
11602
  horizontalDirection: j,
11596
11603
  initialTopMostItemIndex: k,
11597
- totalListHeight: U,
11604
+ totalListHeight: W,
11598
11605
  ...m,
11599
11606
  endReached: B,
11600
11607
  propsReady: g,
@@ -11605,7 +11612,7 @@ const fC = /* @__PURE__ */ Je(
11605
11612
  ...S
11606
11613
  };
11607
11614
  },
11608
- ct(ml, Ht, Po, Ip, Wn, gl, Un)
11615
+ ct(ml, Ht, Po, Ip, Vn, gl, Wn)
11609
11616
  );
11610
11617
  function Fp(e, t, n) {
11611
11618
  return to(1, Ss((e + n) / (Ss(t) + n)));
@@ -11710,7 +11717,7 @@ const pC = /* @__PURE__ */ Je(() => {
11710
11717
  const e = dt("HeaderComponent"), t = sn("headerHeight"), n = dt("headerFooterTag"), r = mr(
11711
11718
  M.useMemo(
11712
11719
  () => (s) => {
11713
- t($n(s, "height"));
11720
+ t(Fn(s, "height"));
11714
11721
  },
11715
11722
  [t]
11716
11723
  ),
@@ -11722,7 +11729,7 @@ const pC = /* @__PURE__ */ Je(() => {
11722
11729
  const e = dt("FooterComponent"), t = sn("footerHeight"), n = dt("headerFooterTag"), r = mr(
11723
11730
  M.useMemo(
11724
11731
  () => (s) => {
11725
- t($n(s, "height"));
11732
+ t(Fn(s, "height"));
11726
11733
  },
11727
11734
  [t]
11728
11735
  ),
@@ -11813,7 +11820,7 @@ var na = "Dialog", [zp, bN] = xn(na), [TC, vn] = zp(na), Hp = (e) => {
11813
11820
  defaultOpen: o,
11814
11821
  onOpenChange: s,
11815
11822
  modal: a = !0
11816
- } = e, i = h.useRef(null), l = h.useRef(null), [c, d] = On({
11823
+ } = e, i = h.useRef(null), l = h.useRef(null), [c, d] = Dn({
11817
11824
  prop: r,
11818
11825
  defaultProp: o ?? !1,
11819
11826
  onChange: s,
@@ -12030,7 +12037,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
12030
12037
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
12031
12038
  t && o && (document.getElementById(t) || console.warn(r));
12032
12039
  }, [r, e, t]), null;
12033
- }, Tl = Hp, _C = Wp, Cl = Kp, Mo = qp, Oo = Gp, rr = Xp, ra = Zp, rh = eh;
12040
+ }, Tl = Hp, _C = Wp, Cl = Kp, Mo = qp, Oo = Gp, or = Xp, ra = Zp, rh = eh;
12034
12041
  const oh = Tl, PC = Cl, sh = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12035
12042
  Mo,
12036
12043
  {
@@ -12050,7 +12057,7 @@ const El = h.forwardRef(({ className: e, children: t, ...n }, r) => {
12050
12057
  h.Children.forEach(i, (l) => {
12051
12058
  if (s || !h.isValidElement(l)) return;
12052
12059
  const c = l.type;
12053
- if (c === rr || (c == null ? void 0 : c.displayName) === rr.displayName || (c == null ? void 0 : c.name) === "DialogTitle") {
12060
+ if (c === or || (c == null ? void 0 : c.displayName) === or.displayName || (c == null ? void 0 : c.name) === "DialogTitle") {
12054
12061
  s = !0;
12055
12062
  return;
12056
12063
  }
@@ -12071,10 +12078,10 @@ const El = h.forwardRef(({ className: e, children: t, ...n }, r) => {
12071
12078
  ),
12072
12079
  ...n,
12073
12080
  children: [
12074
- !o && /* @__PURE__ */ u.jsx(rr, { className: "sr-only", children: "Dialog" }),
12081
+ !o && /* @__PURE__ */ u.jsx(or, { className: "sr-only", children: "Dialog" }),
12075
12082
  t,
12076
12083
  /* @__PURE__ */ u.jsxs(rh, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
12077
- /* @__PURE__ */ u.jsx(Qn, { className: "h-4 w-4" }),
12084
+ /* @__PURE__ */ u.jsx(er, { className: "h-4 w-4" }),
12078
12085
  /* @__PURE__ */ u.jsx("span", { className: "sr-only", children: "Close" })
12079
12086
  ] })
12080
12087
  ]
@@ -12098,7 +12105,7 @@ const kl = ({
12098
12105
  );
12099
12106
  kl.displayName = "DialogHeader";
12100
12107
  const Rl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12101
- rr,
12108
+ or,
12102
12109
  {
12103
12110
  ref: n,
12104
12111
  className: re(
@@ -12108,7 +12115,7 @@ const Rl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12108
12115
  ...t
12109
12116
  }
12110
12117
  ));
12111
- Rl.displayName = rr.displayName;
12118
+ Rl.displayName = or.displayName;
12112
12119
  const MC = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12113
12120
  ra,
12114
12121
  {
@@ -13045,7 +13052,7 @@ function wu(e) {
13045
13052
  r = e.charCodeAt(n), Math.random() > 0.5 && (r = "x" + r.toString(16)), t += "&#" + r + ";";
13046
13053
  return t;
13047
13054
  }
13048
- class Fn {
13055
+ class Bn {
13049
13056
  constructor(t) {
13050
13057
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || xr, this.options.tokenizer = this.options.tokenizer || new Nl(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
13051
13058
  inLink: !1,
@@ -13071,13 +13078,13 @@ class Fn {
13071
13078
  * Static Lex Method
13072
13079
  */
13073
13080
  static lex(t, n) {
13074
- return new Fn(n).lex(t);
13081
+ return new Bn(n).lex(t);
13075
13082
  }
13076
13083
  /**
13077
13084
  * Static Lex Inline Method
13078
13085
  */
13079
13086
  static lexInline(t, n) {
13080
- return new Fn(n).inlineTokens(t);
13087
+ return new Bn(n).inlineTokens(t);
13081
13088
  }
13082
13089
  /**
13083
13090
  * Preprocessing
@@ -13478,7 +13485,7 @@ class dh {
13478
13485
  return this.getNextSafeSlug(r, n.dryrun);
13479
13486
  }
13480
13487
  }
13481
- class Bn {
13488
+ class zn {
13482
13489
  constructor(t) {
13483
13490
  this.options = t || xr, this.options.renderer = this.options.renderer || new Al(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new uh(), this.slugger = new dh();
13484
13491
  }
@@ -13486,13 +13493,13 @@ class Bn {
13486
13493
  * Static Parse Method
13487
13494
  */
13488
13495
  static parse(t, n) {
13489
- return new Bn(n).parse(t);
13496
+ return new zn(n).parse(t);
13490
13497
  }
13491
13498
  /**
13492
13499
  * Static Parse Inline Method
13493
13500
  */
13494
13501
  static parseInline(t, n) {
13495
- return new Bn(n).parseInline(t);
13502
+ return new zn(n).parseInline(t);
13496
13503
  }
13497
13504
  /**
13498
13505
  * Parse Loop
@@ -13750,7 +13757,7 @@ function fh(e, t) {
13750
13757
  };
13751
13758
  }
13752
13759
  function be(e, t, n) {
13753
- return fh(Fn.lex, Bn.parse)(e, t, n);
13760
+ return fh(Bn.lex, zn.parse)(e, t, n);
13754
13761
  }
13755
13762
  be.options = be.setOptions = function(e) {
13756
13763
  return be.defaults = { ...be.defaults, ...e }, zC(be.defaults), be;
@@ -13848,13 +13855,13 @@ be.walkTokens = function(e, t) {
13848
13855
  }
13849
13856
  return n;
13850
13857
  };
13851
- be.parseInline = fh(Fn.lexInline, Bn.parseInline);
13852
- be.Parser = Bn;
13853
- be.parser = Bn.parse;
13858
+ be.parseInline = fh(Bn.lexInline, zn.parseInline);
13859
+ be.Parser = zn;
13860
+ be.parser = zn.parse;
13854
13861
  be.Renderer = Al;
13855
13862
  be.TextRenderer = uh;
13856
- be.Lexer = Fn;
13857
- be.lexer = Fn.lex;
13863
+ be.Lexer = Bn;
13864
+ be.lexer = Bn.lex;
13858
13865
  be.Tokenizer = Nl;
13859
13866
  be.Slugger = dh;
13860
13867
  be.Hooks = Es;
@@ -13864,9 +13871,9 @@ be.setOptions;
13864
13871
  be.use;
13865
13872
  be.walkTokens;
13866
13873
  be.parseInline;
13867
- Bn.parse;
13868
- Fn.lex;
13869
- function or({
13874
+ zn.parse;
13875
+ Bn.lex;
13876
+ function sr({
13870
13877
  content: e,
13871
13878
  className: t = "",
13872
13879
  allowHtml: n = !1,
@@ -14030,7 +14037,7 @@ function iE({ artifact: e }) {
14030
14037
  typeof e.results == "string" && e.results.trim() && /* @__PURE__ */ u.jsxs("div", { className: "rounded border border-blue-100 bg-white/80 px-3 py-2 text-sm text-blue-900/90 space-y-1", children: [
14031
14038
  /* @__PURE__ */ u.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-blue-500", children: "Results" }),
14032
14039
  /* @__PURE__ */ u.jsx(
14033
- or,
14040
+ sr,
14034
14041
  {
14035
14042
  content: e.results,
14036
14043
  allowHtml: !1,
@@ -14260,7 +14267,7 @@ function pE({
14260
14267
  }) {
14261
14268
  const s = Math.max(e.length - r, 0), a = e.substring(0, r);
14262
14269
  return /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-1", children: [
14263
- /* @__PURE__ */ u.jsx("div", { className: re("text-sm text-[hsl(var(--chat-bubble-user-text))]", o && "text-xs"), children: t ? /* @__PURE__ */ u.jsx(or, { content: e, allowHtml: !1 }) : /* @__PURE__ */ u.jsxs(
14270
+ /* @__PURE__ */ u.jsx("div", { className: re("text-sm text-[hsl(var(--chat-bubble-user-text))]", o && "text-xs"), children: t ? /* @__PURE__ */ u.jsx(sr, { content: e, allowHtml: !1 }) : /* @__PURE__ */ u.jsxs(
14264
14271
  "pre",
14265
14272
  {
14266
14273
  className: re(
@@ -14311,7 +14318,7 @@ function hE({ message: e, viewMode: t, isStreaming: n = !1 }) {
14311
14318
  }, i = (c) => {
14312
14319
  if (c == null) return null;
14313
14320
  const { content: d, isMarkdown: p } = fw(c);
14314
- return p ? /* @__PURE__ */ u.jsx(or, { content: d, className: "text-current" }) : a(c);
14321
+ return p ? /* @__PURE__ */ u.jsx(sr, { content: d, className: "text-current" }) : a(c);
14315
14322
  }, l = () => {
14316
14323
  const c = e.content.find((m) => m.type !== "tool_call");
14317
14324
  if (!c)
@@ -14580,8 +14587,8 @@ function wE({
14580
14587
  if (!F) return null;
14581
14588
  const { stablePart: A, tailPart: B } = F;
14582
14589
  return !A && !B ? null : /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
14583
- A ? /* @__PURE__ */ u.jsx(or, { content: A, allowHtml: !1 }) : null,
14584
- B ? /* @__PURE__ */ u.jsx(or, { content: B, allowHtml: !1 }) : null
14590
+ A ? /* @__PURE__ */ u.jsx(sr, { content: A, allowHtml: !1 }) : null,
14591
+ B ? /* @__PURE__ */ u.jsx(sr, { content: B, allowHtml: !1 }) : null
14585
14592
  ] });
14586
14593
  }, [F]), k = Ue(() => {
14587
14594
  if (!m)
@@ -14600,12 +14607,12 @@ function wE({
14600
14607
  A.push($);
14601
14608
  }
14602
14609
  return A;
14603
- }, [N, m]), V = m ? k : N, X = me(({ part: A, i: B }) => {
14610
+ }, [N, m]), U = m ? k : N, X = me(({ part: A, i: B }) => {
14604
14611
  if (A.type === "text") {
14605
14612
  if (m)
14606
14613
  return null;
14607
- const $ = A.text ?? "", ne = $.trim(), U = Mi(ne);
14608
- return U && y !== "tool" ? /* @__PURE__ */ u.jsx(wh, { data: U }, B) : y === "user" && C && ne.length > S ? /* @__PURE__ */ u.jsx(
14614
+ const $ = A.text ?? "", ne = $.trim(), W = Mi(ne);
14615
+ return W && y !== "tool" ? /* @__PURE__ */ u.jsx(wh, { data: W }, B) : y === "user" && C && ne.length > S ? /* @__PURE__ */ u.jsx(
14609
14616
  pE,
14610
14617
  {
14611
14618
  text: ne,
@@ -14615,7 +14622,7 @@ function wE({
14615
14622
  isCompact: R
14616
14623
  },
14617
14624
  B
14618
- ) : /* @__PURE__ */ u.jsx(or, { content: $, allowHtml: !1 }, B);
14625
+ ) : /* @__PURE__ */ u.jsx(sr, { content: $, allowHtml: !1 }, B);
14619
14626
  }
14620
14627
  if (A.type === "image_url") {
14621
14628
  const $ = A;
@@ -14635,7 +14642,7 @@ function wE({
14635
14642
  "a",
14636
14643
  {
14637
14644
  href: $.url,
14638
- onClick: (U) => v(U, $, B),
14645
+ onClick: (W) => v(W, $, B),
14639
14646
  className: `inline-flex items-center gap-2 rounded px-2 py-1 text-xs bg-gray-100 border hover:bg-gray-200
14640
14647
  dark:bg-background/10 dark:border-border/30 dark:hover:bg-background/20`,
14641
14648
  children: [
@@ -14652,7 +14659,7 @@ function wE({
14652
14659
  if (A.type === "interrupt") {
14653
14660
  const $ = A, ne = ts(
14654
14661
  ($ == null ? void 0 : $.id) ?? ($ == null ? void 0 : $.interrupt_id)
14655
- ), U = !!(_ && ne && ne === _), D = U ? O ?? ($ == null ? void 0 : $.value) : $ == null ? void 0 : $.value, J = ne ? { ...$, id: ne, interrupt_id: ne } : $;
14662
+ ), W = !!(_ && ne && ne === _), D = W ? O ?? ($ == null ? void 0 : $.value) : $ == null ? void 0 : $.value, J = ne ? { ...$, id: ne, interrupt_id: ne } : $;
14656
14663
  return /* @__PURE__ */ u.jsx(
14657
14664
  cE,
14658
14665
  {
@@ -14660,7 +14667,7 @@ function wE({
14660
14667
  onApprove: x,
14661
14668
  onReject: b,
14662
14669
  disabled: w,
14663
- isActive: U,
14670
+ isActive: W,
14664
14671
  payload: D
14665
14672
  },
14666
14673
  B
@@ -14698,7 +14705,7 @@ function wE({
14698
14705
  e.id
14699
14706
  ) : null;
14700
14707
  if (!f) {
14701
- const A = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: V.map((B, $) => m && yE(B) ? P ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: P }, `streaming-md-${$}`) : null : /* @__PURE__ */ u.jsx(X, { part: B, i: $ }, $)) });
14708
+ const A = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: U.map((B, $) => m && yE(B) ? P ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: P }, `streaming-md-${$}`) : null : /* @__PURE__ */ u.jsx(X, { part: B, i: $ }, $)) });
14702
14709
  return d ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
14703
14710
  A,
14704
14711
  /* @__PURE__ */ u.jsx(fE, { className: L })
@@ -14935,14 +14942,14 @@ const jl = Og(function({
14935
14942
  onSelectCheckpoint: _,
14936
14943
  attemptMetas: O = []
14937
14944
  }) {
14938
- const [L, K] = fe(!1), [H, N] = fe("preview"), [Y, q] = fe(!1), { currentThreadId: F } = Eo(), { respondToInterrupt: P } = Ls(), k = l === "phone" || l === "half-screen", V = t.role, X = V === "tool", j = Ue(() => t.role === "default_message" ? t : null, [t]), A = !!j, B = !(r && V !== "user"), {
14945
+ const [L, K] = fe(!1), [H, N] = fe("preview"), [Y, q] = fe(!1), { currentThreadId: F } = Eo(), { respondToInterrupt: P } = Ls(), k = l === "phone" || l === "half-screen", U = t.role, X = U === "tool", j = Ue(() => t.role === "default_message" ? t : null, [t]), A = !!j, B = !(r && U !== "user"), {
14939
14946
  uploadingFiles: $,
14940
14947
  handleFileClick: ne,
14941
- fileViewerOpen: U,
14948
+ fileViewerOpen: W,
14942
14949
  currentFileInfo: D,
14943
14950
  closeFileViewer: J
14944
14951
  } = mE({ allowFileOpen: B, currentThreadId: F }), Q = Ue(() => {
14945
- switch (V) {
14952
+ switch (U) {
14946
14953
  case "user":
14947
14954
  return "text-[hsl(var(--chat-bubble-user-text))]";
14948
14955
  case "assistant":
@@ -14954,7 +14961,7 @@ const jl = Og(function({
14954
14961
  default:
14955
14962
  return "text-[hsl(var(--chat-bubble-ai-text))]";
14956
14963
  }
14957
- }, [V]), Z = gE(t, j), {
14964
+ }, [U]), Z = gE(t, j), {
14958
14965
  contentParts: z,
14959
14966
  imageParts: ae,
14960
14967
  fileParts: se,
@@ -14999,7 +15006,7 @@ const jl = Og(function({
14999
15006
  N((G) => G === "expanded" ? "preview" : "expanded");
15000
15007
  }, []), ht = me(() => {
15001
15008
  const ue = re(k ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", Q);
15002
- switch (V) {
15009
+ switch (U) {
15003
15010
  case "user":
15004
15011
  return /* @__PURE__ */ u.jsx(Yg, { className: ue });
15005
15012
  case "assistant":
@@ -15009,9 +15016,9 @@ const jl = Og(function({
15009
15016
  default:
15010
15017
  return /* @__PURE__ */ u.jsx(va, { className: ue });
15011
15018
  }
15012
- }, [k, Q, V]), jt = me(() => {
15019
+ }, [k, Q, U]), jt = me(() => {
15013
15020
  const G = "group relative mb-4 flex w-full";
15014
- switch (V) {
15021
+ switch (U) {
15015
15022
  case "user":
15016
15023
  return re(G, "justify-end");
15017
15024
  case "assistant":
@@ -15021,7 +15028,7 @@ const jl = Og(function({
15021
15028
  default:
15022
15029
  return G;
15023
15030
  }
15024
- }, [V]), st = me(() => {
15031
+ }, [U]), st = me(() => {
15025
15032
  const G = re(
15026
15033
  "rounded-lg px-4 py-3 relative min-w-0 max-w-full break-words",
15027
15034
  k && "px-3 py-2 text-sm"
@@ -15033,7 +15040,7 @@ const jl = Og(function({
15033
15040
  "bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
15034
15041
  "border border-border/60 dark:border-border/40 shadow-sm"
15035
15042
  );
15036
- switch (V) {
15043
+ switch (U) {
15037
15044
  case "user":
15038
15045
  return re(
15039
15046
  G,
@@ -15060,7 +15067,7 @@ const jl = Og(function({
15060
15067
  "border border-border/60 dark:border-border/40"
15061
15068
  );
15062
15069
  }
15063
- }, [k, A, V]), _t = me(async (G) => {
15070
+ }, [k, A, U]), _t = me(async (G) => {
15064
15071
  if (C)
15065
15072
  return;
15066
15073
  const ue = ts(
@@ -15116,7 +15123,7 @@ const jl = Og(function({
15116
15123
  handleInterruptApprove: _t,
15117
15124
  handleInterruptReject: St,
15118
15125
  disableInterruptActions: C,
15119
- messageRole: V,
15126
+ messageRole: U,
15120
15127
  truncateUserMessages: c,
15121
15128
  userMessagePreviewLength: d,
15122
15129
  isUserExpanded: Y,
@@ -15126,7 +15133,7 @@ const jl = Og(function({
15126
15133
  activeInterruptValue: qe,
15127
15134
  iconForeground: Q
15128
15135
  }
15129
- ), It = Ue(() => j ? "Assistant" : mw(t), [j, t]), Tt = ht(), Pt = V === "user" && (E ?? 1) > 1 && typeof _ == "function", Ut = (O == null ? void 0 : O.length) ?? 0, gt = Ut > 0 && R < Ut - 1 ? O[R + 1] : void 0, je = Ut > 0 && R > 0 ? O[R - 1] : void 0, Ke = me(() => {
15136
+ ), It = Ue(() => j ? "Assistant" : mw(t), [j, t]), Tt = ht(), Pt = U === "user" && (E ?? 1) > 1 && typeof _ == "function", Ut = (O == null ? void 0 : O.length) ?? 0, gt = Ut > 0 && R < Ut - 1 ? O[R + 1] : void 0, je = Ut > 0 && R > 0 ? O[R - 1] : void 0, Ke = me(() => {
15130
15137
  !gt || !_ || _(gt.id, void 0, !!gt.isLatestAttempt);
15131
15138
  }, [gt, _]), Mt = me(() => {
15132
15139
  !je || !_ || _(je.id, void 0, !!je.isLatestAttempt);
@@ -15137,7 +15144,7 @@ const jl = Og(function({
15137
15144
  i && /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Assistant" })
15138
15145
  ] }),
15139
15146
  /* @__PURE__ */ u.jsx(
15140
- or,
15147
+ sr,
15141
15148
  {
15142
15149
  content: j.content,
15143
15150
  className: "text-current"
@@ -15159,7 +15166,7 @@ const jl = Og(function({
15159
15166
  isCompactLayout: k,
15160
15167
  showActions: s,
15161
15168
  isEditing: o,
15162
- messageRole: V,
15169
+ messageRole: U,
15163
15170
  toolViewMode: H,
15164
15171
  toolMeta: Ce,
15165
15172
  onToggleToolView: We,
@@ -15205,7 +15212,7 @@ const jl = Og(function({
15205
15212
  children: /* @__PURE__ */ u.jsx(Mu, { className: re(L ? "text-success" : "text-current", k ? "h-3 w-3" : "h-4 w-4") })
15206
15213
  }
15207
15214
  ),
15208
- V === "user" && x && /* @__PURE__ */ u.jsx(
15215
+ U === "user" && x && /* @__PURE__ */ u.jsx(
15209
15216
  nt,
15210
15217
  {
15211
15218
  variant: "ghost",
@@ -15215,7 +15222,7 @@ const jl = Og(function({
15215
15222
  children: /* @__PURE__ */ u.jsx(Ou, { className: re("text-current", k ? "h-3 w-3" : "h-4 w-4") })
15216
15223
  }
15217
15224
  ),
15218
- V === "assistant" && b && /* @__PURE__ */ u.jsx(
15225
+ U === "assistant" && b && /* @__PURE__ */ u.jsx(
15219
15226
  nt,
15220
15227
  {
15221
15228
  variant: "ghost",
@@ -15232,7 +15239,7 @@ const jl = Og(function({
15232
15239
  D && /* @__PURE__ */ u.jsx(
15233
15240
  BC,
15234
15241
  {
15235
- isOpen: U,
15242
+ isOpen: W,
15236
15243
  onClose: J,
15237
15244
  fileId: D.id,
15238
15245
  fileName: D.name,
@@ -15291,7 +15298,7 @@ const Th = M.forwardRef(({
15291
15298
  }, K) => {
15292
15299
  const H = Le(null), N = Le(null), Y = Le(!1), q = Le(!1), [F, P] = fe(!0), k = Ue(() => w ? e.some((z) => z.role === "default_message" ? !1 : Array.isArray(z == null ? void 0 : z.content) && z.content.some(
15293
15300
  (ae) => ae && ae.type === "interrupt" && (ae.id ?? ae.interrupt_id) === w.id
15294
- )) : !1, [w, e]), V = Ue(() => {
15301
+ )) : !1, [w, e]), U = Ue(() => {
15295
15302
  if (!w || k)
15296
15303
  return null;
15297
15304
  const z = w.id && String(w.id).trim() ? String(w.id).trim() : "pending-interrupt";
@@ -15314,7 +15321,7 @@ const Th = M.forwardRef(({
15314
15321
  }
15315
15322
  ]
15316
15323
  };
15317
- }, [w, k]), X = Ue(() => V ? [...e, V] : e, [e, V]), j = Ue(() => {
15324
+ }, [w, k]), X = Ue(() => U ? [...e, U] : e, [e, U]), j = Ue(() => {
15318
15325
  const z = n && X.some((se) => se.id === n);
15319
15326
  return O && (t || L) && !z && X.length > 0 ? [
15320
15327
  ...X,
@@ -15340,7 +15347,7 @@ const Th = M.forwardRef(({
15340
15347
  }
15341
15348
  }
15342
15349
  };
15343
- }, [i]), ne = Ue(() => !v || g ? !1 : F ? "auto" : !1, [F, v, g]), U = Ue(() => {
15350
+ }, [i]), ne = Ue(() => !v || g ? !1 : F ? "auto" : !1, [F, v, g]), W = Ue(() => {
15344
15351
  if (typeof f != "string") return null;
15345
15352
  const z = f.trim();
15346
15353
  return !z || A && A.length > 0 ? null : {
@@ -15349,10 +15356,10 @@ const Th = M.forwardRef(({
15349
15356
  content: z,
15350
15357
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
15351
15358
  };
15352
- }, [f, A]), D = ["flex h-full flex-col md:flex-row", p].filter(Boolean).join(" "), J = () => U ? /* @__PURE__ */ u.jsx("div", { className: "p-6 h-full overflow-y-auto", children: /* @__PURE__ */ u.jsx("div", { className: "w-full max-w-full", children: /* @__PURE__ */ u.jsx(
15359
+ }, [f, A]), D = ["flex h-full flex-col md:flex-row", p].filter(Boolean).join(" "), J = () => W ? /* @__PURE__ */ u.jsx("div", { className: "p-6 h-full overflow-y-auto", children: /* @__PURE__ */ u.jsx("div", { className: "w-full max-w-full", children: /* @__PURE__ */ u.jsx(
15353
15360
  jl,
15354
15361
  {
15355
- message: U,
15362
+ message: W,
15356
15363
  messageIndex: 0,
15357
15364
  isStreamingMessage: !1,
15358
15365
  showActions: !1,
@@ -15484,11 +15491,11 @@ function ro({
15484
15491
  interrupt: O,
15485
15492
  metadata: L,
15486
15493
  checkpointIndex: K
15487
- } = Ls(), { isStreaming: H, error: N, connectionState: Y, submit: q, stop: F } = Ow(), P = w ?? b ?? null, k = (R == null ? void 0 : R.id) ?? null, V = (R == null ? void 0 : R.namespace) ?? null, X = (L == null ? void 0 : L.assemblingMessageId) ?? null, j = O, [A, B] = fe(!1), [$, ne] = fe(!1);
15494
+ } = Ls(), { isStreaming: H, error: N, connectionState: Y, submit: q, stop: F } = Ow(), P = w ?? b ?? null, k = (R == null ? void 0 : R.id) ?? null, U = (R == null ? void 0 : R.namespace) ?? null, X = (L == null ? void 0 : L.assemblingMessageId) ?? null, j = O, [A, B] = fe(!1), [$, ne] = fe(!1);
15488
15495
  Qe(() => {
15489
15496
  j || B(!1);
15490
15497
  }, [j]);
15491
- const U = me(() => {
15498
+ const W = me(() => {
15492
15499
  B(!0);
15493
15500
  }, []), D = me(() => {
15494
15501
  B(!1);
@@ -15546,7 +15553,7 @@ function ro({
15546
15553
  const ce = ie.trim();
15547
15554
  if (!(!ce && Ne.length === 0))
15548
15555
  try {
15549
- const Te = Q ? (se == null ? void 0 : se.checkpointId) ?? k ?? void 0 : k ?? void 0, De = Q ? (se == null ? void 0 : se.checkpointNs) ?? V ?? void 0 : V ?? void 0;
15556
+ const Te = Q ? (se == null ? void 0 : se.checkpointId) ?? k ?? void 0 : k ?? void 0, De = Q ? (se == null ? void 0 : se.checkpointNs) ?? U ?? void 0 : U ?? void 0;
15550
15557
  await q(
15551
15558
  {
15552
15559
  text: ce || "",
@@ -15598,12 +15605,12 @@ function ro({
15598
15605
  { text: it, payload: p },
15599
15606
  {
15600
15607
  checkpointId: k ?? void 0,
15601
- checkpointNs: V ?? void 0,
15608
+ checkpointNs: U ?? void 0,
15602
15609
  edit: !0,
15603
15610
  originalMessageId: ce.id
15604
15611
  }
15605
15612
  );
15606
- }, [y, q, k, V, p]), ut = (ie) => {
15613
+ }, [y, q, k, U, p]), ut = (ie) => {
15607
15614
  const ce = Array.from(ie.target.files || []);
15608
15615
  Ee((Te) => [...Te, ...ce]), ie.target.value = "";
15609
15616
  }, nn = (ie) => {
@@ -15620,7 +15627,7 @@ function ro({
15620
15627
  { attachments: [ce], payload: p },
15621
15628
  {
15622
15629
  checkpointId: k ?? void 0,
15623
- checkpointNs: V ?? void 0
15630
+ checkpointNs: U ?? void 0
15624
15631
  }
15625
15632
  );
15626
15633
  const Te = `Uploaded ${ce.name} - processing through chat stream`;
@@ -15669,7 +15676,7 @@ function ro({
15669
15676
  onClick: () => _t(!0),
15670
15677
  className: "text-red-800 hover:bg-red-100",
15671
15678
  "aria-label": "Dismiss error",
15672
- children: /* @__PURE__ */ u.jsx(Qn, { size: 16 })
15679
+ children: /* @__PURE__ */ u.jsx(er, { size: 16 })
15673
15680
  }
15674
15681
  )
15675
15682
  ] }),
@@ -15700,7 +15707,7 @@ function ro({
15700
15707
  isNavigatingCheckpoint: Ke,
15701
15708
  activeInterrupt: j,
15702
15709
  disableInterruptActions: A,
15703
- onInterruptActionStart: U,
15710
+ onInterruptActionStart: W,
15704
15711
  onInterruptActionEnd: D,
15705
15712
  showToolMessages: d,
15706
15713
  checkpointIndex: K,
@@ -15711,16 +15718,16 @@ function ro({
15711
15718
  }
15712
15719
  ),
15713
15720
  (Y === "reconnecting" || Y === "connecting") && /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute top-3 right-3 z-20 rounded-full bg-muted/80 px-3 py-1 text-xs font-medium text-foreground shadow-sm backdrop-blur-sm dark:bg-muted/60", children: /* @__PURE__ */ u.jsxs("span", { className: "flex items-center gap-2", children: [
15714
- /* @__PURE__ */ u.jsx(Xn, { className: "h-3 w-3 animate-spin" }),
15721
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-3 w-3 animate-spin" }),
15715
15722
  Y === "reconnecting" ? "Reconnecting…" : "Connecting…"
15716
15723
  ] }) }),
15717
15724
  Y === "error" && /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute top-3 right-3 z-20 rounded-full bg-destructive/10 px-3 py-1 text-xs font-semibold text-destructive shadow-sm", children: "Connection lost" }),
15718
15725
  S && /* @__PURE__ */ u.jsxs("div", { className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/80 backdrop-blur-sm text-muted-foreground", children: [
15719
- /* @__PURE__ */ u.jsx(Xn, { className: "h-6 w-6 animate-spin" }),
15726
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-6 w-6 animate-spin" }),
15720
15727
  /* @__PURE__ */ u.jsx("span", { className: "text-xs font-semibold uppercase tracking-wide", children: "Loading messages…" })
15721
15728
  ] }),
15722
15729
  (C || Ke) && /* @__PURE__ */ u.jsxs("div", { className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/80 backdrop-blur-sm text-muted-foreground", children: [
15723
- /* @__PURE__ */ u.jsx(Xn, { className: "h-6 w-6 animate-spin" }),
15730
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-6 w-6 animate-spin" }),
15724
15731
  /* @__PURE__ */ u.jsx("span", { className: "text-xs font-semibold uppercase tracking-wide", children: "Loading checkpoint…" })
15725
15732
  ] })
15726
15733
  ]
@@ -15739,7 +15746,7 @@ function ro({
15739
15746
  size: "sm",
15740
15747
  onClick: Ae,
15741
15748
  className: "text-blue-600 hover:bg-blue-100",
15742
- children: /* @__PURE__ */ u.jsx(Qn, { size: 16 })
15749
+ children: /* @__PURE__ */ u.jsx(er, { size: 16 })
15743
15750
  }
15744
15751
  )
15745
15752
  ] }) }),
@@ -15767,7 +15774,7 @@ function ro({
15767
15774
  onClick: () => nn(ce),
15768
15775
  className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
15769
15776
  "aria-label": `Remove ${ie.name}`,
15770
- children: /* @__PURE__ */ u.jsx(Qn, { size: 12 })
15777
+ children: /* @__PURE__ */ u.jsx(er, { size: 12 })
15771
15778
  }
15772
15779
  )
15773
15780
  ] }, ce)) })
@@ -15785,7 +15792,7 @@ function ro({
15785
15792
  Rt
15786
15793
  ),
15787
15794
  He && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
15788
- /* @__PURE__ */ u.jsx(Xn, { className: "h-4 w-4 animate-spin" }),
15795
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-4 w-4 animate-spin" }),
15789
15796
  " Uploading Excel file..."
15790
15797
  ] }),
15791
15798
  ht && !He && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: ht }),
@@ -15808,7 +15815,7 @@ function ro({
15808
15815
  }
15809
15816
  ) }),
15810
15817
  /* @__PURE__ */ u.jsxs(Xs, { align: "start", sideOffset: 6, className: "w-52", children: [
15811
- i && /* @__PURE__ */ u.jsxs(nr, { onClick: () => {
15818
+ i && /* @__PURE__ */ u.jsxs(rr, { onClick: () => {
15812
15819
  var ie;
15813
15820
  return (ie = ue.current) == null ? void 0 : ie.click();
15814
15821
  }, className: "cursor-pointer", children: [
@@ -15816,7 +15823,7 @@ function ro({
15816
15823
  " Attach files or images"
15817
15824
  ] }),
15818
15825
  l && /* @__PURE__ */ u.jsxs(
15819
- nr,
15826
+ rr,
15820
15827
  {
15821
15828
  onClick: () => {
15822
15829
  var ie;
@@ -15880,7 +15887,7 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
15880
15887
  T(6, H);
15881
15888
  }, []);
15882
15889
  let E = h.useMemo(() => ({ subscribe: (j) => (a.current.add(j), () => a.current.delete(j)), snapshot: () => n.current, setState: (j, A, B) => {
15883
- var $, ne, U, D;
15890
+ var $, ne, W, D;
15884
15891
  if (!Object.is(n.current[j], A)) {
15885
15892
  if (n.current[j] = A, j === "search") K(), O(), T(1, L);
15886
15893
  else if (j === "value") {
@@ -15893,7 +15900,7 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
15893
15900
  n.current.selectedItemId = (J = N()) == null ? void 0 : J.id, E.emit();
15894
15901
  }), B || T(5, H), ((ne = i.current) == null ? void 0 : ne.value) !== void 0) {
15895
15902
  let J = A ?? "";
15896
- (D = (U = i.current).onValueChange) == null || D.call(U, J);
15903
+ (D = (W = i.current).onValueChange) == null || D.call(W, J);
15897
15904
  return;
15898
15905
  }
15899
15906
  }
@@ -15926,24 +15933,24 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
15926
15933
  if (!n.current.search || i.current.shouldFilter === !1) return;
15927
15934
  let j = n.current.filtered.items, A = [];
15928
15935
  n.current.filtered.groups.forEach(($) => {
15929
- let ne = o.current.get($), U = 0;
15936
+ let ne = o.current.get($), W = 0;
15930
15937
  ne.forEach((D) => {
15931
15938
  let J = j.get(D);
15932
- U = Math.max(J, U);
15933
- }), A.push([$, U]);
15939
+ W = Math.max(J, W);
15940
+ }), A.push([$, W]);
15934
15941
  });
15935
15942
  let B = S.current;
15936
15943
  Y().sort(($, ne) => {
15937
- var U, D;
15944
+ var W, D;
15938
15945
  let J = $.getAttribute("id"), Q = ne.getAttribute("id");
15939
- return ((U = j.get(Q)) != null ? U : 0) - ((D = j.get(J)) != null ? D : 0);
15946
+ return ((W = j.get(Q)) != null ? W : 0) - ((D = j.get(J)) != null ? D : 0);
15940
15947
  }).forEach(($) => {
15941
15948
  let ne = $.closest(Ua);
15942
15949
  ne ? ne.appendChild($.parentElement === ne ? $ : $.closest(`${Ua} > *`)) : B.appendChild($.parentElement === B ? $ : $.closest(`${Ua} > *`));
15943
15950
  }), A.sort(($, ne) => ne[1] - $[1]).forEach(($) => {
15944
15951
  var ne;
15945
- let U = (ne = S.current) == null ? void 0 : ne.querySelector(`${Xr}[${Sr}="${encodeURIComponent($[0])}"]`);
15946
- U == null || U.parentElement.appendChild(U);
15952
+ let W = (ne = S.current) == null ? void 0 : ne.querySelector(`${Xr}[${Sr}="${encodeURIComponent($[0])}"]`);
15953
+ W == null || W.parentElement.appendChild(W);
15947
15954
  });
15948
15955
  }
15949
15956
  function L() {
@@ -15958,12 +15965,12 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
15958
15965
  }
15959
15966
  n.current.filtered.groups = /* @__PURE__ */ new Set();
15960
15967
  let ne = 0;
15961
- for (let U of r.current) {
15962
- let D = (A = (j = s.current.get(U)) == null ? void 0 : j.value) != null ? A : "", J = ($ = (B = s.current.get(U)) == null ? void 0 : B.keywords) != null ? $ : [], Q = _(D, J);
15963
- n.current.filtered.items.set(U, Q), Q > 0 && ne++;
15968
+ for (let W of r.current) {
15969
+ let D = (A = (j = s.current.get(W)) == null ? void 0 : j.value) != null ? A : "", J = ($ = (B = s.current.get(W)) == null ? void 0 : B.keywords) != null ? $ : [], Q = _(D, J);
15970
+ n.current.filtered.items.set(W, Q), Q > 0 && ne++;
15964
15971
  }
15965
- for (let [U, D] of o.current) for (let J of D) if (n.current.filtered.items.get(J) > 0) {
15966
- n.current.filtered.groups.add(U);
15972
+ for (let [W, D] of o.current) for (let J of D) if (n.current.filtered.items.get(J) > 0) {
15973
+ n.current.filtered.groups.add(W);
15967
15974
  break;
15968
15975
  }
15969
15976
  n.current.filtered.count = ne;
@@ -15987,15 +15994,15 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
15987
15994
  }
15988
15995
  function F(j) {
15989
15996
  var A;
15990
- let B = N(), $ = Y(), ne = $.findIndex((D) => D === B), U = $[ne + j];
15991
- (A = i.current) != null && A.loop && (U = ne + j < 0 ? $[$.length - 1] : ne + j === $.length ? $[0] : $[ne + j]), U && E.setState("value", U.getAttribute(Sr));
15997
+ let B = N(), $ = Y(), ne = $.findIndex((D) => D === B), W = $[ne + j];
15998
+ (A = i.current) != null && A.loop && (W = ne + j < 0 ? $[$.length - 1] : ne + j === $.length ? $[0] : $[ne + j]), W && E.setState("value", W.getAttribute(Sr));
15992
15999
  }
15993
16000
  function P(j) {
15994
16001
  let A = N(), B = A == null ? void 0 : A.closest(Xr), $;
15995
16002
  for (; B && !$; ) B = j > 0 ? WE(B, Xr) : VE(B, Xr), $ = B == null ? void 0 : B.querySelector(Cu);
15996
16003
  $ ? E.setState("value", $.getAttribute(Sr)) : F(j);
15997
16004
  }
15998
- let k = () => q(Y().length - 1), V = (j) => {
16005
+ let k = () => q(Y().length - 1), U = (j) => {
15999
16006
  j.preventDefault(), j.metaKey ? k() : j.altKey ? P(1) : F(1);
16000
16007
  }, X = (j) => {
16001
16008
  j.preventDefault(), j.metaKey ? q(0) : j.altKey ? P(-1) : F(-1);
@@ -16007,11 +16014,11 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
16007
16014
  if (!(j.defaultPrevented || B)) switch (j.key) {
16008
16015
  case "n":
16009
16016
  case "j": {
16010
- x && j.ctrlKey && V(j);
16017
+ x && j.ctrlKey && U(j);
16011
16018
  break;
16012
16019
  }
16013
16020
  case "ArrowDown": {
16014
- V(j);
16021
+ U(j);
16015
16022
  break;
16016
16023
  }
16017
16024
  case "p":
@@ -16047,7 +16054,7 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
16047
16054
  ur(() => {
16048
16055
  if (!c) return i.item(o, a == null ? void 0 : a.id);
16049
16056
  }, [c]);
16050
- let d = jh(o, s, [e.value, e.children, s], e.keywords), p = _l(), m = zn((T) => T.value && T.value === d.current), f = zn((T) => c || i.filter() === !1 ? !0 : T.search ? T.filtered.items.get(o) > 0 : !0);
16057
+ let d = jh(o, s, [e.value, e.children, s], e.keywords), p = _l(), m = Hn((T) => T.value && T.value === d.current), f = Hn((T) => c || i.filter() === !1 ? !0 : T.search ? T.filtered.items.get(o) > 0 : !0);
16051
16058
  h.useEffect(() => {
16052
16059
  let T = s.current;
16053
16060
  if (!(!T || e.disabled)) return T.addEventListener(pi, v), () => T.removeEventListener(pi, v);
@@ -16061,24 +16068,24 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
16061
16068
  }
16062
16069
  if (!f) return null;
16063
16070
  let { disabled: x, value: b, onSelect: w, forceMount: y, keywords: C, ...S } = e;
16064
- return h.createElement(ve.div, { ref: Mn(s, t), ...S, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!m, "data-disabled": !!x, "data-selected": !!m, onPointerMove: x || i.getDisablePointerSelection() ? void 0 : g, onClick: x ? void 0 : v }, e.children);
16071
+ return h.createElement(ve.div, { ref: On(s, t), ...S, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!m, "data-disabled": !!x, "data-selected": !!m, onPointerMove: x || i.getDisablePointerSelection() ? void 0 : g, onClick: x ? void 0 : v }, e.children);
16065
16072
  }), LE = h.forwardRef((e, t) => {
16066
- let { heading: n, children: r, forceMount: o, ...s } = e, a = Bt(), i = h.useRef(null), l = h.useRef(null), c = Bt(), d = Do(), p = zn((f) => o || d.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(a) : !0);
16073
+ let { heading: n, children: r, forceMount: o, ...s } = e, a = Bt(), i = h.useRef(null), l = h.useRef(null), c = Bt(), d = Do(), p = Hn((f) => o || d.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(a) : !0);
16067
16074
  ur(() => d.group(a), []), jh(a, i, [e.value, e.heading, l]);
16068
16075
  let m = h.useMemo(() => ({ id: a, forceMount: o }), [o]);
16069
- return h.createElement(ve.div, { ref: Mn(i, t), ...s, "cmdk-group": "", role: "presentation", hidden: p ? void 0 : !0 }, n && h.createElement("div", { ref: l, "cmdk-group-heading": "", "aria-hidden": !0, id: c }, n), oa(e, (f) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, h.createElement(Ih.Provider, { value: m }, f))));
16076
+ return h.createElement(ve.div, { ref: On(i, t), ...s, "cmdk-group": "", role: "presentation", hidden: p ? void 0 : !0 }, n && h.createElement("div", { ref: l, "cmdk-group-heading": "", "aria-hidden": !0, id: c }, n), oa(e, (f) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, h.createElement(Ih.Provider, { value: m }, f))));
16070
16077
  }), $E = h.forwardRef((e, t) => {
16071
- let { alwaysRender: n, ...r } = e, o = h.useRef(null), s = zn((a) => !a.search);
16072
- return !n && !s ? null : h.createElement(ve.div, { ref: Mn(o, t), ...r, "cmdk-separator": "", role: "separator" });
16078
+ let { alwaysRender: n, ...r } = e, o = h.useRef(null), s = Hn((a) => !a.search);
16079
+ return !n && !s ? null : h.createElement(ve.div, { ref: On(o, t), ...r, "cmdk-separator": "", role: "separator" });
16073
16080
  }), FE = h.forwardRef((e, t) => {
16074
- let { onValueChange: n, ...r } = e, o = e.value != null, s = _l(), a = zn((c) => c.search), i = zn((c) => c.selectedItemId), l = Do();
16081
+ let { onValueChange: n, ...r } = e, o = e.value != null, s = _l(), a = Hn((c) => c.search), i = Hn((c) => c.selectedItemId), l = Do();
16075
16082
  return h.useEffect(() => {
16076
16083
  e.value != null && s.setState("search", e.value);
16077
16084
  }, [e.value]), h.createElement(ve.input, { ref: t, ...r, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": l.listId, "aria-labelledby": l.labelId, "aria-activedescendant": i, id: l.inputId, type: "text", value: o ? e.value : a, onChange: (c) => {
16078
16085
  o || s.setState("search", c.target.value), n == null || n(c.target.value);
16079
16086
  } });
16080
16087
  }), BE = h.forwardRef((e, t) => {
16081
- let { children: n, label: r = "Suggestions", ...o } = e, s = h.useRef(null), a = h.useRef(null), i = zn((c) => c.selectedItemId), l = Do();
16088
+ let { children: n, label: r = "Suggestions", ...o } = e, s = h.useRef(null), a = h.useRef(null), i = Hn((c) => c.selectedItemId), l = Do();
16082
16089
  return h.useEffect(() => {
16083
16090
  if (a.current && s.current) {
16084
16091
  let c = a.current, d = s.current, p, m = new ResizeObserver(() => {
@@ -16091,11 +16098,11 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
16091
16098
  cancelAnimationFrame(p), m.unobserve(c);
16092
16099
  };
16093
16100
  }
16094
- }, []), h.createElement(ve.div, { ref: Mn(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": r, id: l.listId }, oa(e, (c) => h.createElement("div", { ref: Mn(a, l.listInnerRef), "cmdk-list-sizer": "" }, c)));
16101
+ }, []), h.createElement(ve.div, { ref: On(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": r, id: l.listId }, oa(e, (c) => h.createElement("div", { ref: On(a, l.listInnerRef), "cmdk-list-sizer": "" }, c)));
16095
16102
  }), zE = h.forwardRef((e, t) => {
16096
16103
  let { open: n, onOpenChange: r, overlayClassName: o, contentClassName: s, container: a, ...i } = e;
16097
16104
  return h.createElement(Tl, { open: n, onOpenChange: r }, h.createElement(Cl, { container: a }, h.createElement(Mo, { "cmdk-overlay": "", className: o }), h.createElement(Oo, { "aria-label": e.label, "cmdk-dialog": "", className: s }, h.createElement(Nh, { ref: t, ...i }))));
16098
- }), HE = h.forwardRef((e, t) => zn((n) => n.filtered.count === 0) ? h.createElement(ve.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), UE = h.forwardRef((e, t) => {
16105
+ }), HE = h.forwardRef((e, t) => Hn((n) => n.filtered.count === 0) ? h.createElement(ve.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), UE = h.forwardRef((e, t) => {
16099
16106
  let { progress: n, children: r, label: o = "Loading...", ...s } = e;
16100
16107
  return h.createElement(ve.div, { ref: t, ...s, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, oa(e, (a) => h.createElement("div", { "aria-hidden": !0 }, a)));
16101
16108
  }), Jt = Object.assign(Nh, { List: BE, Item: DE, Input: FE, Group: LE, Separator: $E, Dialog: zE, Empty: HE, Loading: UE });
@@ -16124,7 +16131,7 @@ function Tr(e) {
16124
16131
  let t = h.useRef();
16125
16132
  return t.current === void 0 && (t.current = e()), t;
16126
16133
  }
16127
- function zn(e) {
16134
+ function Hn(e) {
16128
16135
  let t = _l(), n = () => e(t.snapshot());
16129
16136
  return h.useSyncExternalStore(t.subscribe, n, n);
16130
16137
  }
@@ -16849,7 +16856,7 @@ function fk({
16849
16856
  children: /* @__PURE__ */ u.jsx(Ns, { size: 12 })
16850
16857
  }
16851
16858
  ),
16852
- /* @__PURE__ */ u.jsx(nt, { variant: "ghost", size: "sm", onClick: l, className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Qn, { size: 12 }) })
16859
+ /* @__PURE__ */ u.jsx(nt, { variant: "ghost", size: "sm", onClick: l, className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(er, { size: 12 }) })
16853
16860
  ] }) : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
16854
16861
  /* @__PURE__ */ u.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: v(e) }),
16855
16862
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
@@ -16862,7 +16869,7 @@ function fk({
16862
16869
  /* @__PURE__ */ u.jsx(il, { asChild: !0, children: /* @__PURE__ */ u.jsx(nt, { variant: "ghost", size: "sm", className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Lu, { size: 12 }) }) }),
16863
16870
  /* @__PURE__ */ u.jsxs(Xs, { align: "end", sideOffset: 6, className: "w-44", children: [
16864
16871
  /* @__PURE__ */ u.jsxs(
16865
- nr,
16872
+ rr,
16866
16873
  {
16867
16874
  onClick: (S) => {
16868
16875
  S.preventDefault(), c(e.threadId);
@@ -16874,7 +16881,7 @@ function fk({
16874
16881
  }
16875
16882
  ),
16876
16883
  p && n !== e.threadId && /* @__PURE__ */ u.jsxs(
16877
- nr,
16884
+ rr,
16878
16885
  {
16879
16886
  onClick: (S) => {
16880
16887
  S.preventDefault(), s(e, S);
@@ -16886,7 +16893,7 @@ function fk({
16886
16893
  }
16887
16894
  ),
16888
16895
  m && d && /* @__PURE__ */ u.jsxs(
16889
- nr,
16896
+ rr,
16890
16897
  {
16891
16898
  className: "text-red-400 hover:text-red-300",
16892
16899
  onClick: (S) => {
@@ -16970,7 +16977,7 @@ function mi({
16970
16977
  shareInFlight: L,
16971
16978
  shareStatus: K,
16972
16979
  clearShareStatus: H
16973
- } = Eo(), { createThread: N, deleteThread: Y, renameThread: q, shareThread: F } = O, { loadThread: P } = Ls(), k = a ?? T, [V, X] = fe(Array.isArray(C) ? C : []), j = Le(V.length > 0), A = Le(null), B = Le(0), [$, ne] = fe(null), [U, D] = fe(""), [J, Q] = fe(!1), [Z, z] = fe(!1), [ae, se] = fe(null), [ge, ye] = fe(""), Ce = v && v.length > 0 ? v : gk, Ne = mk({ defaultView: m }), Ee = g ?? Ne, at = p ?? Ee.view, bt = me(
16980
+ } = Eo(), { createThread: N, deleteThread: Y, renameThread: q, shareThread: F } = O, { loadThread: P } = Ls(), k = a ?? T, [U, X] = fe(Array.isArray(C) ? C : []), j = Le(U.length > 0), A = Le(null), B = Le(0), [$, ne] = fe(null), [W, D] = fe(""), [J, Q] = fe(!1), [Z, z] = fe(!1), [ae, se] = fe(null), [ge, ye] = fe(""), Ce = v && v.length > 0 ? v : gk, Ne = mk({ defaultView: m }), Ee = g ?? Ne, at = p ?? Ee.view, bt = me(
16974
16981
  (G) => {
16975
16982
  p || Ee.setView(G), f == null || f(G);
16976
16983
  },
@@ -16992,7 +16999,7 @@ function mi({
16992
16999
  ), Oe = Ue(() => {
16993
17000
  const G = b ?? [], ue = ge.trim().toLowerCase();
16994
17001
  return ue ? y ? G.filter((ze) => y(ze, ue)) : G.filter((ze) => `${ze.label} ${ze.secondaryLabel ?? ""}`.toLowerCase().includes(ue)) : G;
16995
- }, [b, ge, y]), We = at === "shared", ht = We ? S : V, jt = We ? _ : R, st = We ? "No shared conversations yet" : "No conversations yet", _t = (G) => {
17002
+ }, [b, ge, y]), We = at === "shared", ht = We ? S : U, jt = We ? _ : R, st = We ? "No shared conversations yet" : "No conversations yet", _t = (G) => {
16996
17003
  const ue = G.sharedAt ? ` • ${je(G.sharedAt)}` : "";
16997
17004
  return `Shared by ${G.sharedByUserId}${ue}`;
16998
17005
  }, St = (G) => "sharedByUserId" in G;
@@ -17017,7 +17024,7 @@ function mi({
17017
17024
  }), () => {
17018
17025
  ue !== null && cancelAnimationFrame(ue), ze !== null && cancelAnimationFrame(ze);
17019
17026
  };
17020
- }, [V]);
17027
+ }, [U]);
17021
17028
  const mt = async (G) => {
17022
17029
  try {
17023
17030
  E(G), await P(G), i == null || i(G), l == null || l(G);
@@ -17049,9 +17056,9 @@ function mi({
17049
17056
  }, Pt = (G, ue) => {
17050
17057
  ue.stopPropagation(), ne(G.threadId), D(G.title || `Thread ${G.threadId.slice(0, 8)}`);
17051
17058
  }, Ut = async (G) => {
17052
- if (U.trim())
17059
+ if (W.trim())
17053
17060
  try {
17054
- await q(G, U.trim()), ne(null), D("");
17061
+ await q(G, W.trim()), ne(null), D("");
17055
17062
  } catch (ue) {
17056
17063
  console.error("Failed to update title:", ue);
17057
17064
  }
@@ -17103,7 +17110,7 @@ function mi({
17103
17110
  }
17104
17111
  ) }),
17105
17112
  /* @__PURE__ */ u.jsx(Xs, { align: "start", sideOffset: 6, className: "w-40", children: Ce.map((G) => /* @__PURE__ */ u.jsxs(
17106
- nr,
17113
+ rr,
17107
17114
  {
17108
17115
  className: "justify-between text-[12px]",
17109
17116
  onClick: (ue) => {
@@ -17128,7 +17135,7 @@ function mi({
17128
17135
  className: `flex-1 min-h-0 ${s.threadList || ""}`,
17129
17136
  style: o ? { maxHeight: o } : void 0,
17130
17137
  children: /* @__PURE__ */ u.jsx("div", { className: "p-2 space-y-1 pb-4", children: jt ? /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-center justify-center gap-2 py-8 text-slate-400", children: [
17131
- /* @__PURE__ */ u.jsx(Xn, { className: "h-5 w-5 animate-spin" }),
17138
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-5 w-5 animate-spin" }),
17132
17139
  /* @__PURE__ */ u.jsx("span", { className: "text-sm", children: "Loading threads…" })
17133
17140
  ] }) : ht.length === 0 ? /* @__PURE__ */ u.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
17134
17141
  /* @__PURE__ */ u.jsx($u, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
@@ -17139,7 +17146,7 @@ function mi({
17139
17146
  thread: G,
17140
17147
  isActive: k === G.threadId,
17141
17148
  editingThreadId: $,
17142
- editingTitle: U,
17149
+ editingTitle: W,
17143
17150
  onSelect: mt,
17144
17151
  onStartEditing: Pt,
17145
17152
  onEditingTitleChange: (ue) => D(ue),
@@ -17173,7 +17180,7 @@ function mi({
17173
17180
  ),
17174
17181
  /* @__PURE__ */ u.jsxs(Mh, { children: [
17175
17182
  K && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground", children: [
17176
- L && /* @__PURE__ */ u.jsx(Xn, { className: "h-3 w-3 animate-spin" }),
17183
+ L && /* @__PURE__ */ u.jsx(Jn, { className: "h-3 w-3 animate-spin" }),
17177
17184
  /* @__PURE__ */ u.jsx(
17178
17185
  "span",
17179
17186
  {
@@ -17183,7 +17190,7 @@ function mi({
17183
17190
  )
17184
17191
  ] }),
17185
17192
  /* @__PURE__ */ u.jsx(Oh, { children: w ? /* @__PURE__ */ u.jsxs("span", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
17186
- /* @__PURE__ */ u.jsx(Xn, { className: "h-4 w-4 animate-spin" }),
17193
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-4 w-4 animate-spin" }),
17187
17194
  "Loading recipients…"
17188
17195
  ] }) : "No matching recipients found" }),
17189
17196
  Oe.length > 0 && /* @__PURE__ */ u.jsx(Dh, { heading: "Recipients", children: Oe.map((G) => /* @__PURE__ */ u.jsx(Lh, { onSelect: () => Ge(G), children: /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-start text-sm", children: [
@@ -17470,7 +17477,7 @@ ia.displayName = yk;
17470
17477
  var Sk = ia, Tk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ck = [" ", "Enter"], dr = "Select", [la, ca, Ek] = $s(dr), [Wr, RN] = xn(dr, [
17471
17478
  Ek,
17472
17479
  zr
17473
- ]), ua = zr(), [kk, Vn] = Wr(dr), [Rk, Ik] = Wr(dr), sm = (e) => {
17480
+ ]), ua = zr(), [kk, Kn] = Wr(dr), [Rk, Ik] = Wr(dr), sm = (e) => {
17474
17481
  const {
17475
17482
  __scopeSelect: t,
17476
17483
  children: n,
@@ -17486,12 +17493,12 @@ var Sk = ia, Tk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ck = [" ", "Enter"], d
17486
17493
  disabled: m,
17487
17494
  required: f,
17488
17495
  form: v
17489
- } = e, g = ua(t), [x, b] = h.useState(null), [w, y] = h.useState(null), [C, S] = h.useState(!1), T = Fs(c), [E, R] = On({
17496
+ } = e, g = ua(t), [x, b] = h.useState(null), [w, y] = h.useState(null), [C, S] = h.useState(!1), T = Fs(c), [E, R] = Dn({
17490
17497
  prop: r,
17491
17498
  defaultProp: o ?? !1,
17492
17499
  onChange: s,
17493
17500
  caller: dr
17494
- }), [_, O] = On({
17501
+ }), [_, O] = Dn({
17495
17502
  prop: a,
17496
17503
  defaultProp: i,
17497
17504
  onChange: l,
@@ -17559,7 +17566,7 @@ var Sk = ia, Tk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ck = [" ", "Enter"], d
17559
17566
  sm.displayName = dr;
17560
17567
  var am = "SelectTrigger", im = h.forwardRef(
17561
17568
  (e, t) => {
17562
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = ua(n), a = Vn(am, n), i = a.disabled || r, l = Be(t, a.onTriggerChange), c = ca(n), d = h.useRef("touch"), [p, m, f] = jm((g) => {
17569
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = ua(n), a = Kn(am, n), i = a.disabled || r, l = Be(t, a.onTriggerChange), c = ca(n), d = h.useRef("touch"), [p, m, f] = jm((g) => {
17563
17570
  const x = c().filter((y) => !y.disabled), b = x.find((y) => y.value === a.value), w = _m(x, g, b);
17564
17571
  w !== void 0 && a.onValueChange(w.value);
17565
17572
  }), v = (g) => {
@@ -17603,7 +17610,7 @@ var am = "SelectTrigger", im = h.forwardRef(
17603
17610
  im.displayName = am;
17604
17611
  var lm = "SelectValue", cm = h.forwardRef(
17605
17612
  (e, t) => {
17606
- const { __scopeSelect: n, className: r, style: o, children: s, placeholder: a = "", ...i } = e, l = Vn(lm, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, p = Be(t, l.onValueNodeChange);
17613
+ const { __scopeSelect: n, className: r, style: o, children: s, placeholder: a = "", ...i } = e, l = Kn(lm, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, p = Be(t, l.onValueNodeChange);
17607
17614
  return At(() => {
17608
17615
  c(d);
17609
17616
  }, [c, d]), /* @__PURE__ */ u.jsx(
@@ -17629,7 +17636,7 @@ var Ak = "SelectPortal", dm = (e) => /* @__PURE__ */ u.jsx(Ro, { asChild: !0, ..
17629
17636
  dm.displayName = Ak;
17630
17637
  var fr = "SelectContent", fm = h.forwardRef(
17631
17638
  (e, t) => {
17632
- const n = Vn(fr, e.__scopeSelect), [r, o] = h.useState();
17639
+ const n = Kn(fr, e.__scopeSelect), [r, o] = h.useState();
17633
17640
  if (At(() => {
17634
17641
  o(new DocumentFragment());
17635
17642
  }, []), !n.open) {
@@ -17643,7 +17650,7 @@ var fr = "SelectContent", fm = h.forwardRef(
17643
17650
  }
17644
17651
  );
17645
17652
  fm.displayName = fr;
17646
- var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent.RemoveScroll"), hm = h.forwardRef(
17653
+ var dn = 10, [pm, qn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent.RemoveScroll"), hm = h.forwardRef(
17647
17654
  (e, t) => {
17648
17655
  const {
17649
17656
  __scopeSelect: n,
@@ -17665,16 +17672,16 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17665
17672
  avoidCollisions: x,
17666
17673
  //
17667
17674
  ...b
17668
- } = e, w = Vn(fr, n), [y, C] = h.useState(null), [S, T] = h.useState(null), E = Be(t, (U) => C(U)), [R, _] = h.useState(null), [O, L] = h.useState(
17675
+ } = e, w = Kn(fr, n), [y, C] = h.useState(null), [S, T] = h.useState(null), E = Be(t, (W) => C(W)), [R, _] = h.useState(null), [O, L] = h.useState(
17669
17676
  null
17670
17677
  ), K = ca(n), [H, N] = h.useState(!1), Y = h.useRef(!1);
17671
17678
  h.useEffect(() => {
17672
17679
  if (y) return Zi(y);
17673
17680
  }, [y]), Fi();
17674
17681
  const q = h.useCallback(
17675
- (U) => {
17682
+ (W) => {
17676
17683
  const [D, ...J] = K().map((z) => z.ref.current), [Q] = J.slice(-1), Z = document.activeElement;
17677
- for (const z of U)
17684
+ for (const z of W)
17678
17685
  if (z === Z || (z == null || z.scrollIntoView({ block: "nearest" }), z === D && S && (S.scrollTop = 0), z === Q && S && (S.scrollTop = S.scrollHeight), z == null || z.focus(), document.activeElement !== Z)) return;
17679
17686
  },
17680
17687
  [K, S]
@@ -17688,39 +17695,39 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17688
17695
  const { onOpenChange: P, triggerPointerDownPosRef: k } = w;
17689
17696
  h.useEffect(() => {
17690
17697
  if (y) {
17691
- let U = { x: 0, y: 0 };
17698
+ let W = { x: 0, y: 0 };
17692
17699
  const D = (Q) => {
17693
17700
  var Z, z;
17694
- U = {
17701
+ W = {
17695
17702
  x: Math.abs(Math.round(Q.pageX) - (((Z = k.current) == null ? void 0 : Z.x) ?? 0)),
17696
17703
  y: Math.abs(Math.round(Q.pageY) - (((z = k.current) == null ? void 0 : z.y) ?? 0))
17697
17704
  };
17698
17705
  }, J = (Q) => {
17699
- U.x <= 10 && U.y <= 10 ? Q.preventDefault() : y.contains(Q.target) || P(!1), document.removeEventListener("pointermove", D), k.current = null;
17706
+ W.x <= 10 && W.y <= 10 ? Q.preventDefault() : y.contains(Q.target) || P(!1), document.removeEventListener("pointermove", D), k.current = null;
17700
17707
  };
17701
17708
  return k.current !== null && (document.addEventListener("pointermove", D), document.addEventListener("pointerup", J, { capture: !0, once: !0 })), () => {
17702
17709
  document.removeEventListener("pointermove", D), document.removeEventListener("pointerup", J, { capture: !0 });
17703
17710
  };
17704
17711
  }
17705
17712
  }, [y, P, k]), h.useEffect(() => {
17706
- const U = () => P(!1);
17707
- return window.addEventListener("blur", U), window.addEventListener("resize", U), () => {
17708
- window.removeEventListener("blur", U), window.removeEventListener("resize", U);
17713
+ const W = () => P(!1);
17714
+ return window.addEventListener("blur", W), window.addEventListener("resize", W), () => {
17715
+ window.removeEventListener("blur", W), window.removeEventListener("resize", W);
17709
17716
  };
17710
17717
  }, [P]);
17711
- const [V, X] = jm((U) => {
17712
- const D = K().filter((Z) => !Z.disabled), J = D.find((Z) => Z.ref.current === document.activeElement), Q = _m(D, U, J);
17718
+ const [U, X] = jm((W) => {
17719
+ const D = K().filter((Z) => !Z.disabled), J = D.find((Z) => Z.ref.current === document.activeElement), Q = _m(D, W, J);
17713
17720
  Q && setTimeout(() => Q.ref.current.focus());
17714
17721
  }), j = h.useCallback(
17715
- (U, D, J) => {
17722
+ (W, D, J) => {
17716
17723
  const Q = !Y.current && !J;
17717
- (w.value !== void 0 && w.value === D || Q) && (_(U), Q && (Y.current = !0));
17724
+ (w.value !== void 0 && w.value === D || Q) && (_(W), Q && (Y.current = !0));
17718
17725
  },
17719
17726
  [w.value]
17720
17727
  ), A = h.useCallback(() => y == null ? void 0 : y.focus(), [y]), B = h.useCallback(
17721
- (U, D, J) => {
17728
+ (W, D, J) => {
17722
17729
  const Q = !Y.current && !J;
17723
- (w.value !== void 0 && w.value === D || Q) && L(U);
17730
+ (w.value !== void 0 && w.value === D || Q) && L(W);
17724
17731
  },
17725
17732
  [w.value]
17726
17733
  ), $ = r === "popper" ? gi : mm, ne = $ === gi ? {
@@ -17750,18 +17757,18 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17750
17757
  selectedItemText: O,
17751
17758
  position: r,
17752
17759
  isPositioned: H,
17753
- searchRef: V,
17760
+ searchRef: U,
17754
17761
  children: /* @__PURE__ */ u.jsx(Ks, { as: _k, allowPinchZoom: !0, children: /* @__PURE__ */ u.jsx(
17755
17762
  Bs,
17756
17763
  {
17757
17764
  asChild: !0,
17758
17765
  trapped: w.open,
17759
- onMountAutoFocus: (U) => {
17760
- U.preventDefault();
17766
+ onMountAutoFocus: (W) => {
17767
+ W.preventDefault();
17761
17768
  },
17762
- onUnmountAutoFocus: le(o, (U) => {
17769
+ onUnmountAutoFocus: le(o, (W) => {
17763
17770
  var D;
17764
- (D = w.trigger) == null || D.focus({ preventScroll: !0 }), U.preventDefault();
17771
+ (D = w.trigger) == null || D.focus({ preventScroll: !0 }), W.preventDefault();
17765
17772
  }),
17766
17773
  children: /* @__PURE__ */ u.jsx(
17767
17774
  $r,
@@ -17770,7 +17777,7 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17770
17777
  disableOutsidePointerEvents: !0,
17771
17778
  onEscapeKeyDown: s,
17772
17779
  onPointerDownOutside: a,
17773
- onFocusOutside: (U) => U.preventDefault(),
17780
+ onFocusOutside: (W) => W.preventDefault(),
17774
17781
  onDismiss: () => w.onOpenChange(!1),
17775
17782
  children: /* @__PURE__ */ u.jsx(
17776
17783
  $,
@@ -17779,7 +17786,7 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17779
17786
  id: w.contentId,
17780
17787
  "data-state": w.open ? "open" : "closed",
17781
17788
  dir: w.dir,
17782
- onContextMenu: (U) => U.preventDefault(),
17789
+ onContextMenu: (W) => W.preventDefault(),
17783
17790
  ...b,
17784
17791
  ...ne,
17785
17792
  onPlaced: () => N(!0),
@@ -17792,15 +17799,15 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17792
17799
  outline: "none",
17793
17800
  ...b.style
17794
17801
  },
17795
- onKeyDown: le(b.onKeyDown, (U) => {
17796
- const D = U.ctrlKey || U.altKey || U.metaKey;
17797
- if (U.key === "Tab" && U.preventDefault(), !D && U.key.length === 1 && X(U.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(U.key)) {
17802
+ onKeyDown: le(b.onKeyDown, (W) => {
17803
+ const D = W.ctrlKey || W.altKey || W.metaKey;
17804
+ if (W.key === "Tab" && W.preventDefault(), !D && W.key.length === 1 && X(W.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(W.key)) {
17798
17805
  let Q = K().filter((Z) => !Z.disabled).map((Z) => Z.ref.current);
17799
- if (["ArrowUp", "End"].includes(U.key) && (Q = Q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(U.key)) {
17800
- const Z = U.target, z = Q.indexOf(Z);
17806
+ if (["ArrowUp", "End"].includes(W.key) && (Q = Q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(W.key)) {
17807
+ const Z = W.target, z = Q.indexOf(Z);
17801
17808
  Q = Q.slice(z + 1);
17802
17809
  }
17803
- setTimeout(() => q(Q)), U.preventDefault();
17810
+ setTimeout(() => q(Q)), W.preventDefault();
17804
17811
  }
17805
17812
  })
17806
17813
  }
@@ -17815,7 +17822,7 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17815
17822
  );
17816
17823
  hm.displayName = jk;
17817
17824
  var Pk = "SelectItemAlignedPosition", mm = h.forwardRef((e, t) => {
17818
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Vn(fr, n), a = Kn(fr, n), [i, l] = h.useState(null), [c, d] = h.useState(null), p = Be(t, (E) => d(E)), m = ca(n), f = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = h.useCallback(() => {
17825
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Kn(fr, n), a = qn(fr, n), [i, l] = h.useState(null), [c, d] = h.useState(null), p = Be(t, (E) => d(E)), m = ca(n), f = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = h.useCallback(() => {
17819
17826
  if (s.trigger && s.valueNode && i && c && g && x && b) {
17820
17827
  const E = s.trigger.getBoundingClientRect(), R = c.getBoundingClientRect(), _ = s.valueNode.getBoundingClientRect(), O = b.getBoundingClientRect();
17821
17828
  if (s.dir !== "rtl") {
@@ -17836,7 +17843,7 @@ var Pk = "SelectItemAlignedPosition", mm = h.forwardRef((e, t) => {
17836
17843
  ]);
17837
17844
  i.style.minWidth = se + "px", i.style.right = Ce + "px";
17838
17845
  }
17839
- const L = m(), K = window.innerHeight - dn * 2, H = g.scrollHeight, N = window.getComputedStyle(c), Y = parseInt(N.borderTopWidth, 10), q = parseInt(N.paddingTop, 10), F = parseInt(N.borderBottomWidth, 10), P = parseInt(N.paddingBottom, 10), k = Y + q + H + P + F, V = Math.min(x.offsetHeight * 5, k), X = window.getComputedStyle(g), j = parseInt(X.paddingTop, 10), A = parseInt(X.paddingBottom, 10), B = E.top + E.height / 2 - dn, $ = K - B, ne = x.offsetHeight / 2, U = x.offsetTop + ne, D = Y + q + U, J = k - D;
17846
+ const L = m(), K = window.innerHeight - dn * 2, H = g.scrollHeight, N = window.getComputedStyle(c), Y = parseInt(N.borderTopWidth, 10), q = parseInt(N.paddingTop, 10), F = parseInt(N.borderBottomWidth, 10), P = parseInt(N.paddingBottom, 10), k = Y + q + H + P + F, U = Math.min(x.offsetHeight * 5, k), X = window.getComputedStyle(g), j = parseInt(X.paddingTop, 10), A = parseInt(X.paddingBottom, 10), B = E.top + E.height / 2 - dn, $ = K - B, ne = x.offsetHeight / 2, W = x.offsetTop + ne, D = Y + q + W, J = k - D;
17840
17847
  if (D <= B) {
17841
17848
  const Z = L.length > 0 && x === L[L.length - 1].ref.current;
17842
17849
  i.style.bottom = "0px";
@@ -17856,7 +17863,7 @@ var Pk = "SelectItemAlignedPosition", mm = h.forwardRef((e, t) => {
17856
17863
  ) + J;
17857
17864
  i.style.height = ae + "px", g.scrollTop = D - B + g.offsetTop;
17858
17865
  }
17859
- i.style.margin = `${dn}px 0`, i.style.minHeight = V + "px", i.style.maxHeight = K + "px", r == null || r(), requestAnimationFrame(() => f.current = !0);
17866
+ i.style.margin = `${dn}px 0`, i.style.minHeight = U + "px", i.style.maxHeight = K + "px", r == null || r(), requestAnimationFrame(() => f.current = !0);
17860
17867
  }
17861
17868
  }, [
17862
17869
  m,
@@ -17950,7 +17957,7 @@ var Mk = "SelectPopperPosition", gi = h.forwardRef((e, t) => {
17950
17957
  gi.displayName = Mk;
17951
17958
  var [Ok, Ll] = Wr(fr, {}), xi = "SelectViewport", gm = h.forwardRef(
17952
17959
  (e, t) => {
17953
- const { __scopeSelect: n, nonce: r, ...o } = e, s = Kn(xi, n), a = Ll(xi, n), i = Be(t, s.onViewportChange), l = h.useRef(0);
17960
+ const { __scopeSelect: n, nonce: r, ...o } = e, s = qn(xi, n), a = Ll(xi, n), i = Be(t, s.onViewportChange), l = h.useRef(0);
17954
17961
  return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
17955
17962
  /* @__PURE__ */ u.jsx(
17956
17963
  "style",
@@ -18023,7 +18030,7 @@ var Is = "SelectItem", [Fk, bm] = Wr(Is), ym = h.forwardRef(
18023
18030
  disabled: o = !1,
18024
18031
  textValue: s,
18025
18032
  ...a
18026
- } = e, i = Vn(Is, n), l = Kn(Is, n), c = i.value === r, [d, p] = h.useState(s ?? ""), [m, f] = h.useState(!1), v = Be(
18033
+ } = e, i = Kn(Is, n), l = qn(Is, n), c = i.value === r, [d, p] = h.useState(s ?? ""), [m, f] = h.useState(!1), v = Be(
18027
18034
  t,
18028
18035
  (w) => {
18029
18036
  var y;
@@ -18101,7 +18108,7 @@ var Is = "SelectItem", [Fk, bm] = Wr(Is), ym = h.forwardRef(
18101
18108
  ym.displayName = Is;
18102
18109
  var Zr = "SelectItemText", Sm = h.forwardRef(
18103
18110
  (e, t) => {
18104
- const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Vn(Zr, n), i = Kn(Zr, n), l = bm(Zr, n), c = Ik(Zr, n), [d, p] = h.useState(null), m = Be(
18111
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Kn(Zr, n), i = qn(Zr, n), l = bm(Zr, n), c = Ik(Zr, n), [d, p] = h.useState(null), m = Be(
18105
18112
  t,
18106
18113
  (b) => p(b),
18107
18114
  l.onItemTextChange,
@@ -18128,7 +18135,7 @@ var Tm = "SelectItemIndicator", Cm = h.forwardRef(
18128
18135
  );
18129
18136
  Cm.displayName = Tm;
18130
18137
  var vi = "SelectScrollUpButton", Em = h.forwardRef((e, t) => {
18131
- const n = Kn(vi, e.__scopeSelect), r = Ll(vi, e.__scopeSelect), [o, s] = h.useState(!1), a = Be(t, r.onScrollButtonChange);
18138
+ const n = qn(vi, e.__scopeSelect), r = Ll(vi, e.__scopeSelect), [o, s] = h.useState(!1), a = Be(t, r.onScrollButtonChange);
18132
18139
  return At(() => {
18133
18140
  if (n.viewport && n.isPositioned) {
18134
18141
  let i = function() {
@@ -18152,7 +18159,7 @@ var vi = "SelectScrollUpButton", Em = h.forwardRef((e, t) => {
18152
18159
  });
18153
18160
  Em.displayName = vi;
18154
18161
  var wi = "SelectScrollDownButton", km = h.forwardRef((e, t) => {
18155
- const n = Kn(wi, e.__scopeSelect), r = Ll(wi, e.__scopeSelect), [o, s] = h.useState(!1), a = Be(t, r.onScrollButtonChange);
18162
+ const n = qn(wi, e.__scopeSelect), r = Ll(wi, e.__scopeSelect), [o, s] = h.useState(!1), a = Be(t, r.onScrollButtonChange);
18156
18163
  return At(() => {
18157
18164
  if (n.viewport && n.isPositioned) {
18158
18165
  let i = function() {
@@ -18176,7 +18183,7 @@ var wi = "SelectScrollDownButton", km = h.forwardRef((e, t) => {
18176
18183
  });
18177
18184
  km.displayName = wi;
18178
18185
  var Rm = h.forwardRef((e, t) => {
18179
- const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = Kn("SelectScrollButton", n), a = h.useRef(null), i = ca(n), l = h.useCallback(() => {
18186
+ const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = qn("SelectScrollButton", n), a = h.useRef(null), i = ca(n), l = h.useCallback(() => {
18180
18187
  a.current !== null && (window.clearInterval(a.current), a.current = null);
18181
18188
  }, []);
18182
18189
  return h.useEffect(() => () => l(), [l]), At(() => {
@@ -18211,7 +18218,7 @@ var Rm = h.forwardRef((e, t) => {
18211
18218
  Im.displayName = Bk;
18212
18219
  var bi = "SelectArrow", zk = h.forwardRef(
18213
18220
  (e, t) => {
18214
- const { __scopeSelect: n, ...r } = e, o = ua(n), s = Vn(bi, n), a = Kn(bi, n);
18221
+ const { __scopeSelect: n, ...r } = e, o = ua(n), s = Kn(bi, n), a = qn(bi, n);
18215
18222
  return s.open && a.position === "popper" ? /* @__PURE__ */ u.jsx(Ji, { ...o, ...r, ref: t }) : null;
18216
18223
  }
18217
18224
  );
@@ -18423,7 +18430,7 @@ var da = "Switch", [aR, AN] = xn(da), [iR, lR] = aR(da), Wm = h.forwardRef(
18423
18430
  onCheckedChange: c,
18424
18431
  form: d,
18425
18432
  ...p
18426
- } = e, [m, f] = h.useState(null), v = Be(t, (y) => f(y)), g = h.useRef(!1), x = m ? d || !!m.closest("form") : !0, [b, w] = On({
18433
+ } = e, [m, f] = h.useState(null), v = Be(t, (y) => f(y)), g = h.useRef(!1), x = m ? d || !!m.closest("form") : !0, [b, w] = Dn({
18427
18434
  prop: o,
18428
18435
  defaultProp: s ?? !1,
18429
18436
  onChange: c,
@@ -18585,7 +18592,7 @@ const pR = xo(
18585
18592
  children: [
18586
18593
  n,
18587
18594
  /* @__PURE__ */ u.jsxs(rh, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
18588
- /* @__PURE__ */ u.jsx(Qn, { className: "h-4 w-4" }),
18595
+ /* @__PURE__ */ u.jsx(er, { className: "h-4 w-4" }),
18589
18596
  /* @__PURE__ */ u.jsx("span", { className: "sr-only", children: "Close" })
18590
18597
  ] })
18591
18598
  ]
@@ -18608,14 +18615,14 @@ const mR = ({
18608
18615
  );
18609
18616
  mR.displayName = "SheetHeader";
18610
18617
  const gR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
18611
- rr,
18618
+ or,
18612
18619
  {
18613
18620
  ref: n,
18614
18621
  className: re("text-lg font-semibold text-foreground", e),
18615
18622
  ...t
18616
18623
  }
18617
18624
  ));
18618
- gR.displayName = rr.displayName;
18625
+ gR.displayName = or.displayName;
18619
18626
  const xR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
18620
18627
  ra,
18621
18628
  {
@@ -18672,7 +18679,7 @@ var go = "Tooltip", [bR, ha] = fa(go), Qm = (e) => {
18672
18679
  onOpenChange: s,
18673
18680
  disableHoverableContent: a,
18674
18681
  delayDuration: i
18675
- } = e, l = $l(go, e.__scopeTooltip), c = pa(t), [d, p] = h.useState(null), m = Bt(), f = h.useRef(0), v = a ?? l.disableHoverableContent, g = i ?? l.delayDuration, x = h.useRef(!1), [b, w] = On({
18682
+ } = e, l = $l(go, e.__scopeTooltip), c = pa(t), [d, p] = h.useState(null), m = Bt(), f = h.useRef(0), v = a ?? l.disableHoverableContent, g = i ?? l.delayDuration, x = h.useRef(!1), [b, w] = Dn({
18676
18683
  prop: r,
18677
18684
  defaultProp: o ?? !1,
18678
18685
  onChange: (E) => {
@@ -19102,7 +19109,7 @@ var cg = "ToastFocusProxy", Ei = h.forwardRef(
19102
19109
  Ei.displayName = cg;
19103
19110
  var Lo = "Toast", HR = "toast.swipeStart", UR = "toast.swipeMove", WR = "toast.swipeCancel", VR = "toast.swipeEnd", ug = h.forwardRef(
19104
19111
  (e, t) => {
19105
- const { forceMount: n, open: r, defaultOpen: o, onOpenChange: s, ...a } = e, [i, l] = On({
19112
+ const { forceMount: n, open: r, defaultOpen: o, onOpenChange: s, ...a } = e, [i, l] = Dn({
19106
19113
  prop: r,
19107
19114
  defaultProp: o ?? !0,
19108
19115
  onChange: s,
@@ -19216,7 +19223,7 @@ var [KR, qR] = sg(Lo, {
19216
19223
  }),
19217
19224
  onPointerMove: le(e.onPointerMove, (N) => {
19218
19225
  if (!y.current) return;
19219
- const Y = N.clientX - y.current.x, q = N.clientY - y.current.y, F = !!C.current, P = ["left", "right"].includes(g.swipeDirection), k = ["left", "up"].includes(g.swipeDirection) ? Math.min : Math.max, V = P ? k(0, Y) : 0, X = P ? 0 : k(0, q), j = N.pointerType === "touch" ? 10 : 2, A = { x: V, y: X }, B = { originalEvent: N, delta: A };
19226
+ const Y = N.clientX - y.current.x, q = N.clientY - y.current.y, F = !!C.current, P = ["left", "right"].includes(g.swipeDirection), k = ["left", "up"].includes(g.swipeDirection) ? Math.min : Math.max, U = P ? k(0, Y) : 0, X = P ? 0 : k(0, q), j = N.pointerType === "touch" ? 10 : 2, A = { x: U, y: X }, B = { originalEvent: N, delta: A };
19220
19227
  F ? (C.current = A, Go(UR, p, B, {
19221
19228
  discrete: !1
19222
19229
  })) : Iu(A, g.swipeDirection, j) ? (C.current = A, Go(HR, d, B, {
@@ -19415,7 +19422,7 @@ const kg = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
19415
19422
  ),
19416
19423
  "toast-close": "",
19417
19424
  ...t,
19418
- children: /* @__PURE__ */ u.jsx(Qn, { className: "h-4 w-4" })
19425
+ children: /* @__PURE__ */ u.jsx(er, { className: "h-4 w-4" })
19419
19426
  }
19420
19427
  ));
19421
19428
  kg.displayName = Tg.displayName;
@@ -19574,7 +19581,7 @@ function _I(e) {
19574
19581
  }
19575
19582
  var PI = (e) => {
19576
19583
  var t, n, r, o, s, a, i, l, c, d, p;
19577
- let { invert: m, toast: f, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: y, toasts: C, expanded: S, removeToast: T, defaultRichColors: E, closeButton: R, style: _, cancelButtonStyle: O, actionButtonStyle: L, className: K = "", descriptionClassName: H = "", duration: N, position: Y, gap: q, loadingIcon: F, expandByDefault: P, classNames: k, icons: V, closeButtonAriaLabel: X = "Close toast", pauseWhenPageIsHidden: j } = e, [A, B] = M.useState(null), [$, ne] = M.useState(null), [U, D] = M.useState(!1), [J, Q] = M.useState(!1), [Z, z] = M.useState(!1), [ae, se] = M.useState(!1), [ge, ye] = M.useState(!1), [Ce, Ne] = M.useState(0), [Ee, at] = M.useState(0), bt = M.useRef(f.duration || N || Nu), Rt = M.useRef(null), qe = M.useRef(null), He = y === 0, Ge = y + 1 <= b, Oe = f.type, We = f.dismissible !== !1, ht = f.className || "", jt = f.descriptionClassName || "", st = M.useMemo(() => w.findIndex((xe) => xe.toastId === f.id) || 0, [w, f.id]), _t = M.useMemo(() => {
19584
+ let { invert: m, toast: f, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: y, toasts: C, expanded: S, removeToast: T, defaultRichColors: E, closeButton: R, style: _, cancelButtonStyle: O, actionButtonStyle: L, className: K = "", descriptionClassName: H = "", duration: N, position: Y, gap: q, loadingIcon: F, expandByDefault: P, classNames: k, icons: U, closeButtonAriaLabel: X = "Close toast", pauseWhenPageIsHidden: j } = e, [A, B] = M.useState(null), [$, ne] = M.useState(null), [W, D] = M.useState(!1), [J, Q] = M.useState(!1), [Z, z] = M.useState(!1), [ae, se] = M.useState(!1), [ge, ye] = M.useState(!1), [Ce, Ne] = M.useState(0), [Ee, at] = M.useState(0), bt = M.useRef(f.duration || N || Nu), Rt = M.useRef(null), qe = M.useRef(null), He = y === 0, Ge = y + 1 <= b, Oe = f.type, We = f.dismissible !== !1, ht = f.className || "", jt = f.descriptionClassName || "", st = M.useMemo(() => w.findIndex((xe) => xe.toastId === f.id) || 0, [w, f.id]), _t = M.useMemo(() => {
19578
19585
  var xe;
19579
19586
  return (xe = f.closeButton) != null ? xe : R;
19580
19587
  }, [f.closeButton, R]), St = M.useMemo(() => f.duration || N || Nu, [f.duration, N]), mt = M.useRef(0), It = M.useRef(0), Tt = M.useRef(0), Pt = M.useRef(null), [Ut, gt] = Y.split("-"), je = M.useMemo(() => w.reduce((xe, $e, Ye) => Ye >= st ? xe : xe + $e.height, 0), [w, st]), Ke = xI(), Mt = f.invert || m, G = Oe === "loading";
@@ -19589,12 +19596,12 @@ var PI = (e) => {
19589
19596
  return at($e), x((Ye) => [{ toastId: f.id, height: $e, position: f.position }, ...Ye]), () => x((Ye) => Ye.filter((Ct) => Ct.toastId !== f.id));
19590
19597
  }
19591
19598
  }, [x, f.id]), M.useLayoutEffect(() => {
19592
- if (!U) return;
19599
+ if (!W) return;
19593
19600
  let xe = qe.current, $e = xe.style.height;
19594
19601
  xe.style.height = "auto";
19595
19602
  let Ye = xe.getBoundingClientRect().height;
19596
19603
  xe.style.height = $e, at(Ye), x((Ct) => Ct.find((Et) => Et.toastId === f.id) ? Ct.map((Et) => Et.toastId === f.id ? { ...Et, height: Ye } : Et) : [{ toastId: f.id, height: Ye, position: f.position }, ...Ct]);
19597
- }, [U, f.title, f.description, x, f.id]);
19604
+ }, [W, f.title, f.description, x, f.id]);
19598
19605
  let ue = M.useCallback(() => {
19599
19606
  Q(!0), Ne(It.current), x((xe) => xe.filter(($e) => $e.toastId !== f.id)), setTimeout(() => {
19600
19607
  T(f);
@@ -19618,9 +19625,9 @@ var PI = (e) => {
19618
19625
  }, [ue, f.delete]);
19619
19626
  function ze() {
19620
19627
  var xe, $e, Ye;
19621
- return V != null && V.loading ? M.createElement("div", { className: un(k == null ? void 0 : k.loader, (xe = f == null ? void 0 : f.classNames) == null ? void 0 : xe.loader, "sonner-loader"), "data-visible": Oe === "loading" }, V.loading) : F ? M.createElement("div", { className: un(k == null ? void 0 : k.loader, ($e = f == null ? void 0 : f.classNames) == null ? void 0 : $e.loader, "sonner-loader"), "data-visible": Oe === "loading" }, F) : M.createElement(dI, { className: un(k == null ? void 0 : k.loader, (Ye = f == null ? void 0 : f.classNames) == null ? void 0 : Ye.loader), visible: Oe === "loading" });
19628
+ return U != null && U.loading ? M.createElement("div", { className: un(k == null ? void 0 : k.loader, (xe = f == null ? void 0 : f.classNames) == null ? void 0 : xe.loader, "sonner-loader"), "data-visible": Oe === "loading" }, U.loading) : F ? M.createElement("div", { className: un(k == null ? void 0 : k.loader, ($e = f == null ? void 0 : f.classNames) == null ? void 0 : $e.loader, "sonner-loader"), "data-visible": Oe === "loading" }, F) : M.createElement(dI, { className: un(k == null ? void 0 : k.loader, (Ye = f == null ? void 0 : f.classNames) == null ? void 0 : Ye.loader), visible: Oe === "loading" });
19622
19629
  }
19623
- return M.createElement("li", { tabIndex: 0, ref: qe, className: un(K, ht, k == null ? void 0 : k.toast, (t = f == null ? void 0 : f.classNames) == null ? void 0 : t.toast, k == null ? void 0 : k.default, k == null ? void 0 : k[Oe], (n = f == null ? void 0 : f.classNames) == null ? void 0 : n[Oe]), "data-sonner-toast": "", "data-rich-colors": (r = f.richColors) != null ? r : E, "data-styled": !(f.jsx || f.unstyled || v), "data-mounted": U, "data-promise": !!f.promise, "data-swiped": ge, "data-removed": J, "data-visible": Ge, "data-y-position": Ut, "data-x-position": gt, "data-index": y, "data-front": He, "data-swiping": Z, "data-dismissible": We, "data-type": Oe, "data-invert": Mt, "data-swipe-out": ae, "data-swipe-direction": $, "data-expanded": !!(S || P && U), style: { "--index": y, "--toasts-before": y, "--z-index": C.length - y, "--offset": `${J ? Ce : It.current}px`, "--initial-height": P ? "auto" : `${Ee}px`, ..._, ...f.style }, onDragEnd: () => {
19630
+ return M.createElement("li", { tabIndex: 0, ref: qe, className: un(K, ht, k == null ? void 0 : k.toast, (t = f == null ? void 0 : f.classNames) == null ? void 0 : t.toast, k == null ? void 0 : k.default, k == null ? void 0 : k[Oe], (n = f == null ? void 0 : f.classNames) == null ? void 0 : n[Oe]), "data-sonner-toast": "", "data-rich-colors": (r = f.richColors) != null ? r : E, "data-styled": !(f.jsx || f.unstyled || v), "data-mounted": W, "data-promise": !!f.promise, "data-swiped": ge, "data-removed": J, "data-visible": Ge, "data-y-position": Ut, "data-x-position": gt, "data-index": y, "data-front": He, "data-swiping": Z, "data-dismissible": We, "data-type": Oe, "data-invert": Mt, "data-swipe-out": ae, "data-swipe-direction": $, "data-expanded": !!(S || P && W), style: { "--index": y, "--toasts-before": y, "--z-index": C.length - y, "--offset": `${J ? Ce : It.current}px`, "--initial-height": P ? "auto" : `${Ee}px`, ..._, ...f.style }, onDragEnd: () => {
19624
19631
  z(!1), B(null), Pt.current = null;
19625
19632
  }, onPointerDown: (xe) => {
19626
19633
  G || !We || (Rt.current = /* @__PURE__ */ new Date(), Ne(It.current), xe.target.setPointerCapture(xe.pointerId), xe.target.tagName !== "BUTTON" && (z(!0), Pt.current = { x: xe.clientX, y: xe.clientY }));
@@ -19645,7 +19652,7 @@ var PI = (e) => {
19645
19652
  } : () => {
19646
19653
  var xe;
19647
19654
  ue(), (xe = f.onDismiss) == null || xe.call(f, f);
19648
- }, className: un(k == null ? void 0 : k.closeButton, (o = f == null ? void 0 : f.classNames) == null ? void 0 : o.closeButton) }, (s = V == null ? void 0 : V.close) != null ? s : gI) : null, f.jsx || xa(f.title) ? f.jsx ? f.jsx : typeof f.title == "function" ? f.title() : f.title : M.createElement(M.Fragment, null, Oe || f.icon || f.promise ? M.createElement("div", { "data-icon": "", className: un(k == null ? void 0 : k.icon, (a = f == null ? void 0 : f.classNames) == null ? void 0 : a.icon) }, f.promise || f.type === "loading" && !f.icon ? f.icon || ze() : null, f.type !== "loading" ? f.icon || (V == null ? void 0 : V[Oe]) || cI(Oe) : null) : null, M.createElement("div", { "data-content": "", className: un(k == null ? void 0 : k.content, (i = f == null ? void 0 : f.classNames) == null ? void 0 : i.content) }, M.createElement("div", { "data-title": "", className: un(k == null ? void 0 : k.title, (l = f == null ? void 0 : f.classNames) == null ? void 0 : l.title) }, typeof f.title == "function" ? f.title() : f.title), f.description ? M.createElement("div", { "data-description": "", className: un(H, jt, k == null ? void 0 : k.description, (c = f == null ? void 0 : f.classNames) == null ? void 0 : c.description) }, typeof f.description == "function" ? f.description() : f.description) : null), xa(f.cancel) ? f.cancel : f.cancel && Yo(f.cancel) ? M.createElement("button", { "data-button": !0, "data-cancel": !0, style: f.cancelButtonStyle || O, onClick: (xe) => {
19655
+ }, className: un(k == null ? void 0 : k.closeButton, (o = f == null ? void 0 : f.classNames) == null ? void 0 : o.closeButton) }, (s = U == null ? void 0 : U.close) != null ? s : gI) : null, f.jsx || xa(f.title) ? f.jsx ? f.jsx : typeof f.title == "function" ? f.title() : f.title : M.createElement(M.Fragment, null, Oe || f.icon || f.promise ? M.createElement("div", { "data-icon": "", className: un(k == null ? void 0 : k.icon, (a = f == null ? void 0 : f.classNames) == null ? void 0 : a.icon) }, f.promise || f.type === "loading" && !f.icon ? f.icon || ze() : null, f.type !== "loading" ? f.icon || (U == null ? void 0 : U[Oe]) || cI(Oe) : null) : null, M.createElement("div", { "data-content": "", className: un(k == null ? void 0 : k.content, (i = f == null ? void 0 : f.classNames) == null ? void 0 : i.content) }, M.createElement("div", { "data-title": "", className: un(k == null ? void 0 : k.title, (l = f == null ? void 0 : f.classNames) == null ? void 0 : l.title) }, typeof f.title == "function" ? f.title() : f.title), f.description ? M.createElement("div", { "data-description": "", className: un(H, jt, k == null ? void 0 : k.description, (c = f == null ? void 0 : f.classNames) == null ? void 0 : c.description) }, typeof f.description == "function" ? f.description() : f.description) : null), xa(f.cancel) ? f.cancel : f.cancel && Yo(f.cancel) ? M.createElement("button", { "data-button": !0, "data-cancel": !0, style: f.cancelButtonStyle || O, onClick: (xe) => {
19649
19656
  var $e, Ye;
19650
19657
  Yo(f.cancel) && We && ((Ye = ($e = f.cancel).onClick) == null || Ye.call($e, xe), ue());
19651
19658
  }, className: un(k == null ? void 0 : k.cancelButton, (d = f == null ? void 0 : f.classNames) == null ? void 0 : d.cancelButton) }, f.cancel.label) : null, xa(f.action) ? f.action : f.action && Yo(f.action) ? M.createElement("button", { "data-button": !0, "data-action": !0, style: f.actionButtonStyle || L, onClick: (xe) => {
@@ -19673,7 +19680,7 @@ function MI(e, t) {
19673
19680
  }), n;
19674
19681
  }
19675
19682
  var OI = Lg(function(e, t) {
19676
- let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: p, duration: m, style: f, visibleToasts: v = EI, toastOptions: g, dir: x = Au(), gap: b = NI, loadingIcon: w, icons: y, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: S } = e, [T, E] = M.useState([]), R = M.useMemo(() => Array.from(new Set([r].concat(T.filter((j) => j.position).map((j) => j.position)))), [T, r]), [_, O] = M.useState([]), [L, K] = M.useState(!1), [H, N] = M.useState(!1), [Y, q] = M.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), F = M.useRef(null), P = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), k = M.useRef(null), V = M.useRef(!1), X = M.useCallback((j) => {
19683
+ let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: p, duration: m, style: f, visibleToasts: v = EI, toastOptions: g, dir: x = Au(), gap: b = NI, loadingIcon: w, icons: y, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: S } = e, [T, E] = M.useState([]), R = M.useMemo(() => Array.from(new Set([r].concat(T.filter((j) => j.position).map((j) => j.position)))), [T, r]), [_, O] = M.useState([]), [L, K] = M.useState(!1), [H, N] = M.useState(!1), [Y, q] = M.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), F = M.useRef(null), P = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), k = M.useRef(null), U = M.useRef(!1), X = M.useCallback((j) => {
19677
19684
  E((A) => {
19678
19685
  var B;
19679
19686
  return (B = A.find(($) => $.id === j.id)) != null && B.delete || Kt.dismiss(j.id), A.filter(({ id: $ }) => $ !== j.id);
@@ -19722,22 +19729,22 @@ var OI = Lg(function(e, t) {
19722
19729
  return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
19723
19730
  }, [o]), M.useEffect(() => {
19724
19731
  if (F.current) return () => {
19725
- k.current && (k.current.focus({ preventScroll: !0 }), k.current = null, V.current = !1);
19732
+ k.current && (k.current.focus({ preventScroll: !0 }), k.current = null, U.current = !1);
19726
19733
  };
19727
19734
  }, [F.current]), M.createElement("section", { ref: t, "aria-label": `${C} ${P}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, R.map((j, A) => {
19728
19735
  var B;
19729
19736
  let [$, ne] = j.split("-");
19730
- return T.length ? M.createElement("ol", { key: j, dir: x === "auto" ? Au() : x, tabIndex: -1, ref: F, className: i, "data-sonner-toaster": !0, "data-theme": Y, "data-y-position": $, "data-lifted": L && T.length > 1 && !s, "data-x-position": ne, style: { "--front-toast-height": `${((B = _[0]) == null ? void 0 : B.height) || 0}px`, "--width": `${II}px`, "--gap": `${b}px`, ...f, ...MI(l, c) }, onBlur: (U) => {
19731
- V.current && !U.currentTarget.contains(U.relatedTarget) && (V.current = !1, k.current && (k.current.focus({ preventScroll: !0 }), k.current = null));
19732
- }, onFocus: (U) => {
19733
- U.target instanceof HTMLElement && U.target.dataset.dismissible === "false" || V.current || (V.current = !0, k.current = U.relatedTarget);
19737
+ return T.length ? M.createElement("ol", { key: j, dir: x === "auto" ? Au() : x, tabIndex: -1, ref: F, className: i, "data-sonner-toaster": !0, "data-theme": Y, "data-y-position": $, "data-lifted": L && T.length > 1 && !s, "data-x-position": ne, style: { "--front-toast-height": `${((B = _[0]) == null ? void 0 : B.height) || 0}px`, "--width": `${II}px`, "--gap": `${b}px`, ...f, ...MI(l, c) }, onBlur: (W) => {
19738
+ U.current && !W.currentTarget.contains(W.relatedTarget) && (U.current = !1, k.current && (k.current.focus({ preventScroll: !0 }), k.current = null));
19739
+ }, onFocus: (W) => {
19740
+ W.target instanceof HTMLElement && W.target.dataset.dismissible === "false" || U.current || (U.current = !0, k.current = W.relatedTarget);
19734
19741
  }, onMouseEnter: () => K(!0), onMouseMove: () => K(!0), onMouseLeave: () => {
19735
19742
  H || K(!1);
19736
- }, onDragEnd: () => K(!1), onPointerDown: (U) => {
19737
- U.target instanceof HTMLElement && U.target.dataset.dismissible === "false" || N(!0);
19738
- }, onPointerUp: () => N(!1) }, T.filter((U) => !U.position && A === 0 || U.position === j).map((U, D) => {
19743
+ }, onDragEnd: () => K(!1), onPointerDown: (W) => {
19744
+ W.target instanceof HTMLElement && W.target.dataset.dismissible === "false" || N(!0);
19745
+ }, onPointerUp: () => N(!1) }, T.filter((W) => !W.position && A === 0 || W.position === j).map((W, D) => {
19739
19746
  var J, Q;
19740
- return M.createElement(PI, { key: U.id, icons: y, index: D, toast: U, defaultRichColors: p, duration: (J = g == null ? void 0 : g.duration) != null ? J : m, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (Q = g == null ? void 0 : g.closeButton) != null ? Q : a, interacting: H, position: j, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: X, toasts: T.filter((Z) => Z.position == U.position), heights: _.filter((Z) => Z.position == U.position), setHeights: O, expandByDefault: s, gap: b, loadingIcon: w, expanded: L, pauseWhenPageIsHidden: S, swipeDirections: e.swipeDirections });
19747
+ return M.createElement(PI, { key: W.id, icons: y, index: D, toast: W, defaultRichColors: p, duration: (J = g == null ? void 0 : g.duration) != null ? J : m, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (Q = g == null ? void 0 : g.closeButton) != null ? Q : a, interacting: H, position: j, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: X, toasts: T.filter((Z) => Z.position == W.position), heights: _.filter((Z) => Z.position == W.position), setHeights: O, expandByDefault: s, gap: b, loadingIcon: w, expanded: L, pauseWhenPageIsHidden: S, swipeDirections: e.swipeDirections });
19741
19748
  })) : null;
19742
19749
  }));
19743
19750
  });
@@ -19791,14 +19798,14 @@ export {
19791
19798
  Rl as DialogTitle,
19792
19799
  al as DropdownMenu,
19793
19800
  Xs as DropdownMenuContent,
19794
- nr as DropdownMenuItem,
19801
+ rr as DropdownMenuItem,
19795
19802
  il as DropdownMenuTrigger,
19796
19803
  BC as FileViewerModal,
19797
19804
  Yv as HISTORY_TIMEOUT_MS,
19798
19805
  Qh as Input,
19799
19806
  cE as InterruptPartRenderer,
19800
19807
  bk as Label,
19801
- or as MarkdownContent,
19808
+ sr as MarkdownContent,
19802
19809
  jl as MessageComponent,
19803
19810
  Th as MessageList,
19804
19811
  yh as MessageRow,
@@ -19841,7 +19848,7 @@ export {
19841
19848
  xN as applySettings,
19842
19849
  sx as buildCheckpointIndex,
19843
19850
  WI as buildCheckpointPreviewMap,
19844
- ar as chatApiClient,
19851
+ Mn as chatApiClient,
19845
19852
  hc as del,
19846
19853
  Jv as downloadFileById,
19847
19854
  Kl as extractConfigFields,
@@ -19858,7 +19865,7 @@ export {
19858
19865
  bh as getMessageDomKey,
19859
19866
  Fu as getPreviewForMessage,
19860
19867
  ln as httpClient,
19861
- Yn as hydrateHistorySnapshots,
19868
+ Xn as hydrateHistorySnapshots,
19862
19869
  nw as isEnvelope,
19863
19870
  Zv as listFiles,
19864
19871
  zw as loadStoredSettings,
@@ -19867,11 +19874,11 @@ export {
19867
19874
  tw as processAttachments,
19868
19875
  Xv as put,
19869
19876
  lx as readNumber,
19870
- Gn as readString,
19877
+ Yn as readString,
19871
19878
  An as resolveChatBaseUrl,
19872
19879
  Hw as saveSettings,
19873
19880
  Za as setChatToken,
19874
- er as toPlainObject,
19881
+ tr as toPlainObject,
19875
19882
  Vt as unwrap,
19876
19883
  Ds as useApi,
19877
19884
  ix as useCheckpointIndex,