teodor-new-chat-ui 4.3.621 → 4.3.623

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
@@ -1,15 +1,15 @@
1
- var cp = Object.defineProperty;
2
- var up = (e, t, n) => t in e ? cp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Us = (e, t, n) => up(e, typeof t != "symbol" ? t + "" : t, n);
1
+ var lp = Object.defineProperty;
2
+ var cp = (e, t, n) => t in e ? lp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var Us = (e, t, n) => cp(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { clsx as Cc } from "clsx";
5
5
  import { twMerge as kc } from "tailwind-merge";
6
6
  import * as b from "react";
7
- import ee, { createContext as yr, useContext as Sr, useState as de, useRef as Se, useCallback as re, useEffect as Pe, useMemo as De, useReducer as dp, createElement as No, memo as fp, useImperativeHandle as hp, useLayoutEffect as pp } from "react";
8
- import { Slot as mp, createSlot as Ur } from "@radix-ui/react-slot";
7
+ import ee, { createContext as yr, useContext as Sr, useState as de, useRef as Se, useCallback as re, useEffect as Pe, useMemo as De, useReducer as up, createElement as No, memo as dp, useImperativeHandle as fp, useLayoutEffect as hp } from "react";
8
+ import { Slot as pp, createSlot as Ur } from "@radix-ui/react-slot";
9
9
  import { cva as Tc } from "class-variance-authority";
10
10
  import * as Rc from "react-dom";
11
11
  import Ic from "react-dom";
12
- import { X as Go, XCircle as gp, CheckCircle2 as xp, Loader2 as An, ChevronUp as bp, ChevronDown as wp, Loader as Ua, ChevronLeft as vp, ChevronRight as fr, Copy as Ec, Edit as Ac, RotateCcw as Nc, Bot as Ws, Wrench as yp, User as Sp, Check as _c, Circle as Cp, Square as kp, Send as Tp, Paperclip as Wa, Plus as Rp, FileSpreadsheet as Ip, Edit3 as eo, Search as Ep, MoreVertical as Ap, Share2 as Np, Trash2 as _p, MessageSquare as jc, MoreHorizontal as jp, Maximize2 as Pp, Minimize2 as Op, History as Mp } from "lucide-react";
12
+ import { X as Go, XCircle as mp, CheckCircle2 as gp, Loader2 as An, ChevronUp as xp, ChevronDown as bp, Loader as Ua, ChevronLeft as wp, ChevronRight as fr, Copy as Ec, Edit as Ac, RotateCcw as Nc, Bot as Ws, Wrench as vp, User as yp, Check as _c, Circle as Sp, Square as Cp, Send as kp, Paperclip as Wa, Plus as Tp, FileSpreadsheet as Rp, Edit3 as eo, Search as Ip, MoreVertical as Ep, Share2 as Ap, Trash2 as Np, MessageSquare as jc, MoreHorizontal as _p, Maximize2 as jp, Minimize2 as Pp, History as Op } from "lucide-react";
13
13
  function xk(...e) {
14
14
  return kc(Cc(e));
15
15
  }
@@ -18,24 +18,24 @@ function Pc(e, t) {
18
18
  return e.apply(t, arguments);
19
19
  };
20
20
  }
21
- const { toString: Dp } = Object.prototype, { getPrototypeOf: Bi } = Object, { iterator: ps, toStringTag: Oc } = Symbol, ms = /* @__PURE__ */ ((e) => (t) => {
22
- const n = Dp.call(t);
21
+ const { toString: Mp } = Object.prototype, { getPrototypeOf: Bi } = Object, { iterator: ps, toStringTag: Oc } = Symbol, ms = /* @__PURE__ */ ((e) => (t) => {
22
+ const n = Mp.call(t);
23
23
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
24
24
  })(/* @__PURE__ */ Object.create(null)), cn = (e) => (e = e.toLowerCase(), (t) => ms(t) === e), gs = (e) => (t) => typeof t === e, { isArray: Cr } = Array, br = gs("undefined");
25
25
  function to(e) {
26
26
  return e !== null && !br(e) && e.constructor !== null && !br(e.constructor) && Ft(e.constructor.isBuffer) && e.constructor.isBuffer(e);
27
27
  }
28
28
  const Mc = cn("ArrayBuffer");
29
- function Lp(e) {
29
+ function Dp(e) {
30
30
  let t;
31
31
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Mc(e.buffer), t;
32
32
  }
33
- const $p = gs("string"), Ft = gs("function"), Dc = gs("number"), no = (e) => e !== null && typeof e == "object", Fp = (e) => e === !0 || e === !1, _o = (e) => {
33
+ const Lp = gs("string"), Ft = gs("function"), Dc = gs("number"), no = (e) => e !== null && typeof e == "object", $p = (e) => e === !0 || e === !1, _o = (e) => {
34
34
  if (ms(e) !== "object")
35
35
  return !1;
36
36
  const t = Bi(e);
37
37
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Oc in e) && !(ps in e);
38
- }, zp = (e) => {
38
+ }, Fp = (e) => {
39
39
  if (!no(e) || to(e))
40
40
  return !1;
41
41
  try {
@@ -43,11 +43,11 @@ const $p = gs("string"), Ft = gs("function"), Dc = gs("number"), no = (e) => e !
43
43
  } catch {
44
44
  return !1;
45
45
  }
46
- }, Bp = cn("Date"), Hp = cn("File"), Up = cn("Blob"), Wp = cn("FileList"), Vp = (e) => no(e) && Ft(e.pipe), Kp = (e) => {
46
+ }, zp = cn("Date"), Bp = cn("File"), Hp = cn("Blob"), Up = cn("FileList"), Wp = (e) => no(e) && Ft(e.pipe), Vp = (e) => {
47
47
  let t;
48
48
  return e && (typeof FormData == "function" && e instanceof FormData || Ft(e.append) && ((t = ms(e)) === "formdata" || // detect form-data instance
49
49
  t === "object" && Ft(e.toString) && e.toString() === "[object FormData]"));
50
- }, qp = cn("URLSearchParams"), [Gp, Yp, Xp, Jp] = ["ReadableStream", "Request", "Response", "Headers"].map(cn), Zp = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
50
+ }, Kp = cn("URLSearchParams"), [qp, Gp, Yp, Xp] = ["ReadableStream", "Request", "Response", "Headers"].map(cn), Jp = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
51
51
  function ro(e, t, { allOwnKeys: n = !1 } = {}) {
52
52
  if (e === null || typeof e > "u")
53
53
  return;
@@ -85,13 +85,13 @@ function gi() {
85
85
  arguments[o] && ro(arguments[o], r);
86
86
  return n;
87
87
  }
88
- const Qp = (e, t, n, { allOwnKeys: r } = {}) => (ro(t, (o, s) => {
88
+ const Zp = (e, t, n, { allOwnKeys: r } = {}) => (ro(t, (o, s) => {
89
89
  n && Ft(o) ? e[s] = Pc(o, n) : e[s] = o;
90
- }, { allOwnKeys: r }), e), em = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), tm = (e, t, n, r) => {
90
+ }, { allOwnKeys: r }), e), Qp = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), em = (e, t, n, r) => {
91
91
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
92
92
  value: t.prototype
93
93
  }), n && Object.assign(e.prototype, n);
94
- }, nm = (e, t, n, r) => {
94
+ }, tm = (e, t, n, r) => {
95
95
  let o, s, i;
96
96
  const a = {};
97
97
  if (t = t || {}, e == null) return t;
@@ -101,11 +101,11 @@ const Qp = (e, t, n, { allOwnKeys: r } = {}) => (ro(t, (o, s) => {
101
101
  e = n !== !1 && Bi(e);
102
102
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
103
103
  return t;
104
- }, rm = (e, t, n) => {
104
+ }, nm = (e, t, n) => {
105
105
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
106
106
  const r = e.indexOf(t, n);
107
107
  return r !== -1 && r === n;
108
- }, om = (e) => {
108
+ }, rm = (e) => {
109
109
  if (!e) return null;
110
110
  if (Cr(e)) return e;
111
111
  let t = e.length;
@@ -114,31 +114,31 @@ const Qp = (e, t, n, { allOwnKeys: r } = {}) => (ro(t, (o, s) => {
114
114
  for (; t-- > 0; )
115
115
  n[t] = e[t];
116
116
  return n;
117
- }, sm = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Bi(Uint8Array)), im = (e, t) => {
117
+ }, om = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Bi(Uint8Array)), sm = (e, t) => {
118
118
  const r = (e && e[ps]).call(e);
119
119
  let o;
120
120
  for (; (o = r.next()) && !o.done; ) {
121
121
  const s = o.value;
122
122
  t.call(e, s[0], s[1]);
123
123
  }
124
- }, am = (e, t) => {
124
+ }, im = (e, t) => {
125
125
  let n;
126
126
  const r = [];
127
127
  for (; (n = e.exec(t)) !== null; )
128
128
  r.push(n);
129
129
  return r;
130
- }, lm = cn("HTMLFormElement"), cm = (e) => e.toLowerCase().replace(
130
+ }, am = cn("HTMLFormElement"), lm = (e) => e.toLowerCase().replace(
131
131
  /[-_\s]([a-z\d])(\w*)/g,
132
132
  function(n, r, o) {
133
133
  return r.toUpperCase() + o;
134
134
  }
135
- ), Va = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), um = cn("RegExp"), Fc = (e, t) => {
135
+ ), Va = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), cm = cn("RegExp"), Fc = (e, t) => {
136
136
  const n = Object.getOwnPropertyDescriptors(e), r = {};
137
137
  ro(n, (o, s) => {
138
138
  let i;
139
139
  (i = t(o, s, e)) !== !1 && (r[s] = i || o);
140
140
  }), Object.defineProperties(e, r);
141
- }, dm = (e) => {
141
+ }, um = (e) => {
142
142
  Fc(e, (t, n) => {
143
143
  if (Ft(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
144
144
  return !1;
@@ -153,19 +153,19 @@ const Qp = (e, t, n, { allOwnKeys: r } = {}) => (ro(t, (o, s) => {
153
153
  });
154
154
  }
155
155
  });
156
- }, fm = (e, t) => {
156
+ }, dm = (e, t) => {
157
157
  const n = {}, r = (o) => {
158
158
  o.forEach((s) => {
159
159
  n[s] = !0;
160
160
  });
161
161
  };
162
162
  return Cr(e) ? r(e) : r(String(e).split(t)), n;
163
- }, hm = () => {
164
- }, pm = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
165
- function mm(e) {
163
+ }, fm = () => {
164
+ }, hm = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
165
+ function pm(e) {
166
166
  return !!(e && Ft(e.append) && e[Oc] === "FormData" && e[ps]);
167
167
  }
168
- const gm = (e) => {
168
+ const mm = (e) => {
169
169
  const t = new Array(10), n = (r, o) => {
170
170
  if (no(r)) {
171
171
  if (t.indexOf(r) >= 0)
@@ -184,72 +184,72 @@ const gm = (e) => {
184
184
  return r;
185
185
  };
186
186
  return n(e, 0);
187
- }, xm = cn("AsyncFunction"), bm = (e) => e && (no(e) || Ft(e)) && Ft(e.then) && Ft(e.catch), zc = ((e, t) => e ? setImmediate : t ? ((n, r) => (Hn.addEventListener("message", ({ source: o, data: s }) => {
187
+ }, gm = cn("AsyncFunction"), xm = (e) => e && (no(e) || Ft(e)) && Ft(e.then) && Ft(e.catch), zc = ((e, t) => e ? setImmediate : t ? ((n, r) => (Hn.addEventListener("message", ({ source: o, data: s }) => {
188
188
  o === Hn && s === n && r.length && r.shift()();
189
189
  }, !1), (o) => {
190
190
  r.push(o), Hn.postMessage(n, "*");
191
191
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
192
192
  typeof setImmediate == "function",
193
193
  Ft(Hn.postMessage)
194
- ), wm = typeof queueMicrotask < "u" ? queueMicrotask.bind(Hn) : typeof process < "u" && process.nextTick || zc, vm = (e) => e != null && Ft(e[ps]), B = {
194
+ ), bm = typeof queueMicrotask < "u" ? queueMicrotask.bind(Hn) : typeof process < "u" && process.nextTick || zc, wm = (e) => e != null && Ft(e[ps]), B = {
195
195
  isArray: Cr,
196
196
  isArrayBuffer: Mc,
197
197
  isBuffer: to,
198
- isFormData: Kp,
199
- isArrayBufferView: Lp,
200
- isString: $p,
198
+ isFormData: Vp,
199
+ isArrayBufferView: Dp,
200
+ isString: Lp,
201
201
  isNumber: Dc,
202
- isBoolean: Fp,
202
+ isBoolean: $p,
203
203
  isObject: no,
204
204
  isPlainObject: _o,
205
- isEmptyObject: zp,
206
- isReadableStream: Gp,
207
- isRequest: Yp,
208
- isResponse: Xp,
209
- isHeaders: Jp,
205
+ isEmptyObject: Fp,
206
+ isReadableStream: qp,
207
+ isRequest: Gp,
208
+ isResponse: Yp,
209
+ isHeaders: Xp,
210
210
  isUndefined: br,
211
- isDate: Bp,
212
- isFile: Hp,
213
- isBlob: Up,
214
- isRegExp: um,
211
+ isDate: zp,
212
+ isFile: Bp,
213
+ isBlob: Hp,
214
+ isRegExp: cm,
215
215
  isFunction: Ft,
216
- isStream: Vp,
217
- isURLSearchParams: qp,
218
- isTypedArray: sm,
219
- isFileList: Wp,
216
+ isStream: Wp,
217
+ isURLSearchParams: Kp,
218
+ isTypedArray: om,
219
+ isFileList: Up,
220
220
  forEach: ro,
221
221
  merge: gi,
222
- extend: Qp,
223
- trim: Zp,
224
- stripBOM: em,
225
- inherits: tm,
226
- toFlatObject: nm,
222
+ extend: Zp,
223
+ trim: Jp,
224
+ stripBOM: Qp,
225
+ inherits: em,
226
+ toFlatObject: tm,
227
227
  kindOf: ms,
228
228
  kindOfTest: cn,
229
- endsWith: rm,
230
- toArray: om,
231
- forEachEntry: im,
232
- matchAll: am,
233
- isHTMLForm: lm,
229
+ endsWith: nm,
230
+ toArray: rm,
231
+ forEachEntry: sm,
232
+ matchAll: im,
233
+ isHTMLForm: am,
234
234
  hasOwnProperty: Va,
235
235
  hasOwnProp: Va,
236
236
  // an alias to avoid ESLint no-prototype-builtins detection
237
237
  reduceDescriptors: Fc,
238
- freezeMethods: dm,
239
- toObjectSet: fm,
240
- toCamelCase: cm,
241
- noop: hm,
242
- toFiniteNumber: pm,
238
+ freezeMethods: um,
239
+ toObjectSet: dm,
240
+ toCamelCase: lm,
241
+ noop: fm,
242
+ toFiniteNumber: hm,
243
243
  findKey: Lc,
244
244
  global: Hn,
245
245
  isContextDefined: $c,
246
- isSpecCompliantForm: mm,
247
- toJSONObject: gm,
248
- isAsyncFn: xm,
249
- isThenable: bm,
246
+ isSpecCompliantForm: pm,
247
+ toJSONObject: mm,
248
+ isAsyncFn: gm,
249
+ isThenable: xm,
250
250
  setImmediate: zc,
251
- asap: wm,
252
- isIterable: vm
251
+ asap: bm,
252
+ isIterable: wm
253
253
  };
254
254
  function Ee(e, t, n, r, o) {
255
255
  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);
@@ -303,7 +303,7 @@ Ee.from = (e, t, n, r, o, s) => {
303
303
  const a = e && e.message ? e.message : "Error", c = t == null && e ? e.code : t;
304
304
  return Ee.call(i, a, c, n, r, o), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", s && Object.assign(i, s), i;
305
305
  };
306
- const ym = null;
306
+ const vm = null;
307
307
  function xi(e) {
308
308
  return B.isPlainObject(e) || B.isArray(e);
309
309
  }
@@ -315,10 +315,10 @@ function Ka(e, t, n) {
315
315
  return o = Uc(o), !n && s ? "[" + o + "]" : o;
316
316
  }).join(n ? "." : "") : t;
317
317
  }
318
- function Sm(e) {
318
+ function ym(e) {
319
319
  return B.isArray(e) && !e.some(xi);
320
320
  }
321
- const Cm = B.toFlatObject(B, {}, null, function(t) {
321
+ const Sm = B.toFlatObject(B, {}, null, function(t) {
322
322
  return /^is[A-Z]/.test(t);
323
323
  });
324
324
  function xs(e, t, n) {
@@ -349,7 +349,7 @@ function xs(e, t, n) {
349
349
  if (m && !x && typeof m == "object") {
350
350
  if (B.endsWith(g, "{}"))
351
351
  g = r ? g : g.slice(0, -2), m = JSON.stringify(m);
352
- else if (B.isArray(m) && Sm(m) || (B.isFileList(m) || B.endsWith(g, "[]")) && (w = B.toArray(m)))
352
+ else if (B.isArray(m) && ym(m) || (B.isFileList(m) || B.endsWith(g, "[]")) && (w = B.toArray(m)))
353
353
  return g = Uc(g), w.forEach(function(k, R) {
354
354
  !(B.isUndefined(k) || k === null) && t.append(
355
355
  // eslint-disable-next-line no-nested-ternary
@@ -360,7 +360,7 @@ function xs(e, t, n) {
360
360
  }
361
361
  return xi(m) ? !0 : (t.append(Ka(x, g, s), l(m)), !1);
362
362
  }
363
- const f = [], h = Object.assign(Cm, {
363
+ const f = [], h = Object.assign(Sm, {
364
364
  defaultVisitor: u,
365
365
  convertValue: l,
366
366
  isVisitable: xi
@@ -413,13 +413,13 @@ Wc.toString = function(t) {
413
413
  return n(o[0]) + "=" + n(o[1]);
414
414
  }, "").join("&");
415
415
  };
416
- function km(e) {
416
+ function Cm(e) {
417
417
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
418
418
  }
419
419
  function Vc(e, t, n) {
420
420
  if (!t)
421
421
  return e;
422
- const r = n && n.encode || km;
422
+ const r = n && n.encode || Cm;
423
423
  B.isFunction(n) && (n = {
424
424
  serialize: n
425
425
  });
@@ -489,27 +489,27 @@ const Kc = {
489
489
  silentJSONParsing: !0,
490
490
  forcedJSONParsing: !0,
491
491
  clarifyTimeoutError: !1
492
- }, Tm = typeof URLSearchParams < "u" ? URLSearchParams : Hi, Rm = typeof FormData < "u" ? FormData : null, Im = typeof Blob < "u" ? Blob : null, Em = {
492
+ }, km = typeof URLSearchParams < "u" ? URLSearchParams : Hi, Tm = typeof FormData < "u" ? FormData : null, Rm = typeof Blob < "u" ? Blob : null, Im = {
493
493
  isBrowser: !0,
494
494
  classes: {
495
- URLSearchParams: Tm,
496
- FormData: Rm,
497
- Blob: Im
495
+ URLSearchParams: km,
496
+ FormData: Tm,
497
+ Blob: Rm
498
498
  },
499
499
  protocols: ["http", "https", "file", "blob", "url", "data"]
500
- }, Ui = typeof window < "u" && typeof document < "u", bi = typeof navigator == "object" && navigator || void 0, Am = Ui && (!bi || ["ReactNative", "NativeScript", "NS"].indexOf(bi.product) < 0), Nm = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
501
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", _m = Ui && window.location.href || "http://localhost", jm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
500
+ }, Ui = typeof window < "u" && typeof document < "u", bi = typeof navigator == "object" && navigator || void 0, Em = Ui && (!bi || ["ReactNative", "NativeScript", "NS"].indexOf(bi.product) < 0), Am = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
501
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Nm = Ui && window.location.href || "http://localhost", _m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
502
502
  __proto__: null,
503
503
  hasBrowserEnv: Ui,
504
- hasStandardBrowserEnv: Am,
505
- hasStandardBrowserWebWorkerEnv: Nm,
504
+ hasStandardBrowserEnv: Em,
505
+ hasStandardBrowserWebWorkerEnv: Am,
506
506
  navigator: bi,
507
- origin: _m
507
+ origin: Nm
508
508
  }, Symbol.toStringTag, { value: "Module" })), Rt = {
509
- ...jm,
510
- ...Em
509
+ ..._m,
510
+ ...Im
511
511
  };
512
- function Pm(e, t) {
512
+ function jm(e, t) {
513
513
  return xs(e, new Rt.classes.URLSearchParams(), {
514
514
  visitor: function(n, r, o, s) {
515
515
  return Rt.isNode && B.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
@@ -517,10 +517,10 @@ function Pm(e, t) {
517
517
  ...t
518
518
  });
519
519
  }
520
- function Om(e) {
520
+ function Pm(e) {
521
521
  return B.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
522
522
  }
523
- function Mm(e) {
523
+ function Om(e) {
524
524
  const t = {}, n = Object.keys(e);
525
525
  let r;
526
526
  const o = n.length;
@@ -534,17 +534,17 @@ function qc(e) {
534
534
  let i = n[s++];
535
535
  if (i === "__proto__") return !0;
536
536
  const a = Number.isFinite(+i), c = s >= n.length;
537
- return i = !i && B.isArray(o) ? o.length : i, c ? (B.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !B.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && B.isArray(o[i]) && (o[i] = Mm(o[i])), !a);
537
+ return i = !i && B.isArray(o) ? o.length : i, c ? (B.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !B.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && B.isArray(o[i]) && (o[i] = Om(o[i])), !a);
538
538
  }
539
539
  if (B.isFormData(e) && B.isFunction(e.entries)) {
540
540
  const n = {};
541
541
  return B.forEachEntry(e, (r, o) => {
542
- t(Om(r), o, n, 0);
542
+ t(Pm(r), o, n, 0);
543
543
  }), n;
544
544
  }
545
545
  return null;
546
546
  }
547
- function Dm(e, t, n) {
547
+ function Mm(e, t, n) {
548
548
  if (B.isString(e))
549
549
  try {
550
550
  return (t || JSON.parse)(e), B.trim(e);
@@ -570,7 +570,7 @@ const oo = {
570
570
  let a;
571
571
  if (s) {
572
572
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
573
- return Pm(t, this.formSerializer).toString();
573
+ return jm(t, this.formSerializer).toString();
574
574
  if ((a = B.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
575
575
  const c = this.env && this.env.FormData;
576
576
  return xs(
@@ -580,7 +580,7 @@ const oo = {
580
580
  );
581
581
  }
582
582
  }
583
- return s || o ? (n.setContentType("application/json", !1), Dm(t)) : t;
583
+ return s || o ? (n.setContentType("application/json", !1), Mm(t)) : t;
584
584
  }],
585
585
  transformResponse: [function(t) {
586
586
  const n = this.transitional || oo.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
@@ -623,7 +623,7 @@ const oo = {
623
623
  B.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
624
624
  oo.headers[e] = {};
625
625
  });
626
- const Lm = B.toObjectSet([
626
+ const Dm = B.toObjectSet([
627
627
  "age",
628
628
  "authorization",
629
629
  "content-length",
@@ -641,12 +641,12 @@ const Lm = B.toObjectSet([
641
641
  "referer",
642
642
  "retry-after",
643
643
  "user-agent"
644
- ]), $m = (e) => {
644
+ ]), Lm = (e) => {
645
645
  const t = {};
646
646
  let n, r, o;
647
647
  return e && e.split(`
648
648
  `).forEach(function(i) {
649
- o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Lm[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
649
+ o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Dm[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
650
650
  }), t;
651
651
  }, Ya = Symbol("internals");
652
652
  function Nr(e) {
@@ -655,14 +655,14 @@ function Nr(e) {
655
655
  function jo(e) {
656
656
  return e === !1 || e == null ? e : B.isArray(e) ? e.map(jo) : String(e);
657
657
  }
658
- function Fm(e) {
658
+ function $m(e) {
659
659
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
660
660
  let r;
661
661
  for (; r = n.exec(e); )
662
662
  t[r[1]] = r[2];
663
663
  return t;
664
664
  }
665
- const zm = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
665
+ const Fm = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
666
666
  function Vs(e, t, n, r, o) {
667
667
  if (B.isFunction(r))
668
668
  return r.call(this, t, n);
@@ -673,10 +673,10 @@ function Vs(e, t, n, r, o) {
673
673
  return r.test(t);
674
674
  }
675
675
  }
676
- function Bm(e) {
676
+ function zm(e) {
677
677
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
678
678
  }
679
- function Hm(e, t) {
679
+ function Bm(e, t) {
680
680
  const n = B.toCamelCase(" " + t);
681
681
  ["get", "set", "has"].forEach((r) => {
682
682
  Object.defineProperty(e, r + n, {
@@ -703,8 +703,8 @@ let zt = class {
703
703
  const i = (a, c) => B.forEach(a, (l, u) => s(l, u, c));
704
704
  if (B.isPlainObject(t) || t instanceof this.constructor)
705
705
  i(t, n);
706
- else if (B.isString(t) && (t = t.trim()) && !zm(t))
707
- i($m(t), n);
706
+ else if (B.isString(t) && (t = t.trim()) && !Fm(t))
707
+ i(Lm(t), n);
708
708
  else if (B.isObject(t) && B.isIterable(t)) {
709
709
  let a = {}, c, l;
710
710
  for (const u of t) {
@@ -725,7 +725,7 @@ let zt = class {
725
725
  if (!n)
726
726
  return o;
727
727
  if (n === !0)
728
- return Fm(o);
728
+ return $m(o);
729
729
  if (B.isFunction(n))
730
730
  return n.call(this, o, r);
731
731
  if (B.isRegExp(n))
@@ -769,7 +769,7 @@ let zt = class {
769
769
  n[i] = jo(o), delete n[s];
770
770
  return;
771
771
  }
772
- const a = t ? Bm(s) : String(s).trim();
772
+ const a = t ? zm(s) : String(s).trim();
773
773
  a !== s && delete n[s], n[a] = jo(o), r[a] = !0;
774
774
  }), this;
775
775
  }
@@ -808,7 +808,7 @@ let zt = class {
808
808
  }).accessors, o = this.prototype;
809
809
  function s(i) {
810
810
  const a = Nr(i);
811
- r[a] || (Hm(o, i), r[a] = !0);
811
+ r[a] || (Bm(o, i), r[a] = !0);
812
812
  }
813
813
  return B.isArray(t) ? t.forEach(s) : s(t), this;
814
814
  }
@@ -850,11 +850,11 @@ function Yc(e, t, n) {
850
850
  n
851
851
  ));
852
852
  }
853
- function Um(e) {
853
+ function Hm(e) {
854
854
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
855
855
  return t && t[1] || "";
856
856
  }
857
- function Wm(e, t) {
857
+ function Um(e, t) {
858
858
  e = e || 10;
859
859
  const n = new Array(e), r = new Array(e);
860
860
  let o = 0, s = 0, i;
@@ -870,7 +870,7 @@ function Wm(e, t) {
870
870
  return p ? Math.round(h * 1e3 / p) : void 0;
871
871
  };
872
872
  }
873
- function Vm(e, t) {
873
+ function Wm(e, t) {
874
874
  let n = 0, r = 1e3 / t, o, s;
875
875
  const i = (l, u = Date.now()) => {
876
876
  n = u, o = null, s && (clearTimeout(s), s = null), e(...l);
@@ -884,8 +884,8 @@ function Vm(e, t) {
884
884
  }
885
885
  const Yo = (e, t, n = 3) => {
886
886
  let r = 0;
887
- const o = Wm(50, 250);
888
- return Vm((s) => {
887
+ const o = Um(50, 250);
888
+ return Wm((s) => {
889
889
  const i = s.loaded, a = s.lengthComputable ? s.total : void 0, c = i - r, l = o(c), u = i <= a;
890
890
  r = i;
891
891
  const f = {
@@ -908,10 +908,10 @@ const Yo = (e, t, n = 3) => {
908
908
  total: e,
909
909
  loaded: r
910
910
  }), t[1]];
911
- }, Ja = (e) => (...t) => B.asap(() => e(...t)), Km = Rt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Rt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
911
+ }, Ja = (e) => (...t) => B.asap(() => e(...t)), Vm = Rt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Rt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
912
912
  new URL(Rt.origin),
913
913
  Rt.navigator && /(msie|trident)/i.test(Rt.navigator.userAgent)
914
- ) : () => !0, qm = Rt.hasStandardBrowserEnv ? (
914
+ ) : () => !0, Km = Rt.hasStandardBrowserEnv ? (
915
915
  // Standard browser envs support document.cookie
916
916
  {
917
917
  write(e, t, n, r, o, s) {
@@ -938,15 +938,15 @@ const Yo = (e, t, n = 3) => {
938
938
  }
939
939
  }
940
940
  );
941
- function Gm(e) {
941
+ function qm(e) {
942
942
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
943
943
  }
944
- function Ym(e, t) {
944
+ function Gm(e, t) {
945
945
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
946
946
  }
947
947
  function Xc(e, t, n) {
948
- let r = !Gm(t);
949
- return e && (r || n == !1) ? Ym(e, t) : t;
948
+ let r = !qm(t);
949
+ return e && (r || n == !1) ? Gm(e, t) : t;
950
950
  }
951
951
  const Za = (e) => e instanceof zt ? { ...e } : e;
952
952
  function Yn(e, t) {
@@ -1029,12 +1029,12 @@ const Jc = (e) => {
1029
1029
  });
1030
1030
  }
1031
1031
  }
1032
- if (Rt.hasStandardBrowserEnv && (r && B.isFunction(r) && (r = r(t)), r || r !== !1 && Km(t.url))) {
1033
- const c = o && s && qm.read(s);
1032
+ if (Rt.hasStandardBrowserEnv && (r && B.isFunction(r) && (r = r(t)), r || r !== !1 && Vm(t.url))) {
1033
+ const c = o && s && Km.read(s);
1034
1034
  c && i.set(o, c);
1035
1035
  }
1036
1036
  return t;
1037
- }, Xm = typeof XMLHttpRequest < "u", Jm = Xm && function(e) {
1037
+ }, Ym = typeof XMLHttpRequest < "u", Xm = Ym && function(e) {
1038
1038
  return new Promise(function(n, r) {
1039
1039
  const o = Jc(e);
1040
1040
  let s = o.data;
@@ -1085,14 +1085,14 @@ const Jc = (e) => {
1085
1085
  }), B.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), a && a !== "json" && (x.responseType = o.responseType), l && ([h, m] = Yo(l, !0), x.addEventListener("progress", h)), c && x.upload && ([f, p] = Yo(c), x.upload.addEventListener("progress", f), x.upload.addEventListener("loadend", p)), (o.cancelToken || o.signal) && (u = (k) => {
1086
1086
  x && (r(!k || k.type ? new kr(null, e, x) : k), x.abort(), x = null);
1087
1087
  }, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
1088
- const v = Um(o.url);
1088
+ const v = Hm(o.url);
1089
1089
  if (v && Rt.protocols.indexOf(v) === -1) {
1090
1090
  r(new Ee("Unsupported protocol " + v + ":", Ee.ERR_BAD_REQUEST, e));
1091
1091
  return;
1092
1092
  }
1093
1093
  x.send(s || null);
1094
1094
  });
1095
- }, Zm = (e, t) => {
1095
+ }, Jm = (e, t) => {
1096
1096
  const { length: n } = e = e ? e.filter(Boolean) : [];
1097
1097
  if (t || n) {
1098
1098
  let r = new AbortController(), o;
@@ -1115,7 +1115,7 @@ const Jc = (e) => {
1115
1115
  const { signal: c } = r;
1116
1116
  return c.unsubscribe = () => B.asap(a), c;
1117
1117
  }
1118
- }, Qm = function* (e, t) {
1118
+ }, Zm = function* (e, t) {
1119
1119
  let n = e.byteLength;
1120
1120
  if (n < t) {
1121
1121
  yield e;
@@ -1124,10 +1124,10 @@ const Jc = (e) => {
1124
1124
  let r = 0, o;
1125
1125
  for (; r < n; )
1126
1126
  o = r + t, yield e.slice(r, o), r = o;
1127
- }, eg = async function* (e, t) {
1128
- for await (const n of tg(e))
1129
- yield* Qm(n, t);
1130
- }, tg = async function* (e) {
1127
+ }, Qm = async function* (e, t) {
1128
+ for await (const n of eg(e))
1129
+ yield* Zm(n, t);
1130
+ }, eg = async function* (e) {
1131
1131
  if (e[Symbol.asyncIterator]) {
1132
1132
  yield* e;
1133
1133
  return;
@@ -1144,7 +1144,7 @@ const Jc = (e) => {
1144
1144
  await t.cancel();
1145
1145
  }
1146
1146
  }, Qa = (e, t, n, r) => {
1147
- const o = eg(e, t);
1147
+ const o = Qm(e, t);
1148
1148
  let s = 0, i, a = (c) => {
1149
1149
  i || (i = !0, r && r(c));
1150
1150
  };
@@ -1172,7 +1172,7 @@ const Jc = (e) => {
1172
1172
  }, {
1173
1173
  highWaterMark: 2
1174
1174
  });
1175
- }, el = 64 * 1024, { isFunction: xo } = B, ng = (({ Request: e, Response: t }) => ({
1175
+ }, el = 64 * 1024, { isFunction: xo } = B, tg = (({ Request: e, Response: t }) => ({
1176
1176
  Request: e,
1177
1177
  Response: t
1178
1178
  }))(B.global), {
@@ -1184,10 +1184,10 @@ const Jc = (e) => {
1184
1184
  } catch {
1185
1185
  return !1;
1186
1186
  }
1187
- }, rg = (e) => {
1187
+ }, ng = (e) => {
1188
1188
  e = B.merge.call({
1189
1189
  skipUndefined: !0
1190
- }, ng, e);
1190
+ }, tg, e);
1191
1191
  const { fetch: t, Request: n, Response: r } = e, o = t ? xo(t) : typeof fetch == "function", s = xo(n), i = xo(r);
1192
1192
  if (!o)
1193
1193
  return !1;
@@ -1246,7 +1246,7 @@ const Jc = (e) => {
1246
1246
  fetchOptions: M
1247
1247
  } = Jc(m), D = t || fetch;
1248
1248
  T = T ? (T + "").toLowerCase() : "text";
1249
- let U = Zm([v, k && k.toAbortSignal()], R), W = null;
1249
+ let U = Jm([v, k && k.toAbortSignal()], R), W = null;
1250
1250
  const L = U && U.unsubscribe && (() => {
1251
1251
  U.unsubscribe();
1252
1252
  });
@@ -1316,22 +1316,22 @@ const Jc = (e) => {
1316
1316
  ) : Ee.from(Y, Y && Y.code, m, W);
1317
1317
  }
1318
1318
  };
1319
- }, og = /* @__PURE__ */ new Map(), Zc = (e) => {
1319
+ }, rg = /* @__PURE__ */ new Map(), Zc = (e) => {
1320
1320
  let t = e ? e.env : {};
1321
1321
  const { fetch: n, Request: r, Response: o } = t, s = [
1322
1322
  r,
1323
1323
  o,
1324
1324
  n
1325
1325
  ];
1326
- let i = s.length, a = i, c, l, u = og;
1326
+ let i = s.length, a = i, c, l, u = rg;
1327
1327
  for (; a--; )
1328
- c = s[a], l = u.get(c), l === void 0 && u.set(c, l = a ? /* @__PURE__ */ new Map() : rg(t)), u = l;
1328
+ c = s[a], l = u.get(c), l === void 0 && u.set(c, l = a ? /* @__PURE__ */ new Map() : ng(t)), u = l;
1329
1329
  return l;
1330
1330
  };
1331
1331
  Zc();
1332
1332
  const wi = {
1333
- http: ym,
1334
- xhr: Jm,
1333
+ http: vm,
1334
+ xhr: Xm,
1335
1335
  fetch: {
1336
1336
  get: Zc
1337
1337
  }
@@ -1345,7 +1345,7 @@ B.forEach(wi, (e, t) => {
1345
1345
  Object.defineProperty(e, "adapterName", { value: t });
1346
1346
  }
1347
1347
  });
1348
- const ol = (e) => `- ${e}`, sg = (e) => B.isFunction(e) || e === null || e === !1, Qc = {
1348
+ const ol = (e) => `- ${e}`, og = (e) => B.isFunction(e) || e === null || e === !1, Qc = {
1349
1349
  getAdapter: (e, t) => {
1350
1350
  e = B.isArray(e) ? e : [e];
1351
1351
  const { length: n } = e;
@@ -1354,7 +1354,7 @@ const ol = (e) => `- ${e}`, sg = (e) => B.isFunction(e) || e === null || e === !
1354
1354
  for (let i = 0; i < n; i++) {
1355
1355
  r = e[i];
1356
1356
  let a;
1357
- if (o = r, !sg(r) && (o = wi[(a = String(r)).toLowerCase()], o === void 0))
1357
+ if (o = r, !og(r) && (o = wi[(a = String(r)).toLowerCase()], o === void 0))
1358
1358
  throw new Ee(`Unknown adapter '${a}'`);
1359
1359
  if (o && (B.isFunction(o) || (o = o.get(t))))
1360
1360
  break;
@@ -1426,7 +1426,7 @@ bs.transitional = function(t, n, r) {
1426
1426
  bs.spelling = function(t) {
1427
1427
  return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1428
1428
  };
1429
- function ig(e, t, n) {
1429
+ function sg(e, t, n) {
1430
1430
  if (typeof e != "object")
1431
1431
  throw new Ee("options must be an object", Ee.ERR_BAD_OPTION_VALUE);
1432
1432
  const r = Object.keys(e);
@@ -1444,7 +1444,7 @@ function ig(e, t, n) {
1444
1444
  }
1445
1445
  }
1446
1446
  const Po = {
1447
- assertOptions: ig,
1447
+ assertOptions: sg,
1448
1448
  validators: bs
1449
1449
  }, fn = Po.validators;
1450
1450
  let Wn = class {
@@ -1571,7 +1571,7 @@ B.forEach(["post", "put", "patch"], function(t) {
1571
1571
  }
1572
1572
  Wn.prototype[t] = n(), Wn.prototype[t + "Form"] = n(!0);
1573
1573
  });
1574
- let ag = class tu {
1574
+ let ig = class tu {
1575
1575
  constructor(t) {
1576
1576
  if (typeof t != "function")
1577
1577
  throw new TypeError("executor must be a function.");
@@ -1644,12 +1644,12 @@ let ag = class tu {
1644
1644
  };
1645
1645
  }
1646
1646
  };
1647
- function lg(e) {
1647
+ function ag(e) {
1648
1648
  return function(n) {
1649
1649
  return e.apply(null, n);
1650
1650
  };
1651
1651
  }
1652
- function cg(e) {
1652
+ function lg(e) {
1653
1653
  return B.isObject(e) && e.isAxiosError === !0;
1654
1654
  }
1655
1655
  const vi = {
@@ -1729,7 +1729,7 @@ function nu(e) {
1729
1729
  const pt = nu(oo);
1730
1730
  pt.Axios = Wn;
1731
1731
  pt.CanceledError = kr;
1732
- pt.CancelToken = ag;
1732
+ pt.CancelToken = ig;
1733
1733
  pt.isCancel = Gc;
1734
1734
  pt.VERSION = eu;
1735
1735
  pt.toFormData = xs;
@@ -1738,8 +1738,8 @@ pt.Cancel = pt.CanceledError;
1738
1738
  pt.all = function(t) {
1739
1739
  return Promise.all(t);
1740
1740
  };
1741
- pt.spread = lg;
1742
- pt.isAxiosError = cg;
1741
+ pt.spread = ag;
1742
+ pt.isAxiosError = lg;
1743
1743
  pt.mergeConfig = Yn;
1744
1744
  pt.AxiosHeaders = zt;
1745
1745
  pt.formToJSON = (e) => qc(B.isHTMLForm(e) ? new FormData(e) : e);
@@ -1786,9 +1786,9 @@ function Kn(e) {
1786
1786
  function ou(e) {
1787
1787
  return yi.add(e), () => yi.delete(e);
1788
1788
  }
1789
- const ug = 3e4, dg = 9e4, $t = pt.create({
1789
+ const cg = 3e4, ug = 9e4, $t = pt.create({
1790
1790
  // BaseURL is set dynamically via ApiProvider -> api.updateConfig
1791
- timeout: ug,
1791
+ timeout: cg,
1792
1792
  withCredentials: !0
1793
1793
  });
1794
1794
  $t.interceptors.request.use((e) => (Xo && (e.headers.Authorization = `Bearer ${Xo}`), e));
@@ -1815,7 +1815,7 @@ async function Wt(e, t) {
1815
1815
  async function Oo(e, t, n) {
1816
1816
  return $t.defaults.baseURL ? (await $t.post(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
1817
1817
  }
1818
- async function fg(e, t, n) {
1818
+ async function dg(e, t, n) {
1819
1819
  return $t.defaults.baseURL ? (await $t.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
1820
1820
  }
1821
1821
  async function ll(e, t) {
@@ -1824,7 +1824,7 @@ async function ll(e, t) {
1824
1824
  function Lt(e) {
1825
1825
  return e && typeof e == "object" && "data" in e ? e.data : e;
1826
1826
  }
1827
- class hg {
1827
+ class fg {
1828
1828
  // ---- Configuration ----
1829
1829
  // Chat client uses the default httpClient baseURL, no need for internal tracking
1830
1830
  // unless we want to support multiple instances with different URLs in the future.
@@ -1867,7 +1867,7 @@ class hg {
1867
1867
  return Lt(o);
1868
1868
  }
1869
1869
  async updateThread(t, n) {
1870
- const r = await fg(`/threads/${t}`, { title: n });
1870
+ const r = await dg(`/threads/${t}`, { title: n });
1871
1871
  return Lt(r);
1872
1872
  }
1873
1873
  async deleteThread(t) {
@@ -1914,7 +1914,7 @@ class hg {
1914
1914
  checkpoint_id: t.checkpointId,
1915
1915
  checkpoint_ns: t.checkpointNs
1916
1916
  },
1917
- timeout: dg,
1917
+ timeout: ug,
1918
1918
  signal: t.signal
1919
1919
  });
1920
1920
  return Lt(n);
@@ -1929,8 +1929,8 @@ class hg {
1929
1929
  return Lt(r);
1930
1930
  }
1931
1931
  }
1932
- const Xn = new hg();
1933
- class pg {
1932
+ const Xn = new fg();
1933
+ class hg {
1934
1934
  // Config logic could go here if files ever need a distinct base URL from chat
1935
1935
  // For now, it shares the chatBaseUrl via the shared httpClient
1936
1936
  async fetchFileBlob(t, n) {
@@ -1992,7 +1992,7 @@ class pg {
1992
1992
  });
1993
1993
  }
1994
1994
  }
1995
- const su = new pg();
1995
+ const su = new hg();
1996
1996
  var Si = { exports: {} }, _r = {};
1997
1997
  /**
1998
1998
  * @license React
@@ -2004,7 +2004,7 @@ var Si = { exports: {} }, _r = {};
2004
2004
  * LICENSE file in the root directory of this source tree.
2005
2005
  */
2006
2006
  var cl;
2007
- function mg() {
2007
+ function pg() {
2008
2008
  if (cl) return _r;
2009
2009
  cl = 1;
2010
2010
  var e = ee, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
@@ -2028,7 +2028,7 @@ var jr = {};
2028
2028
  * LICENSE file in the root directory of this source tree.
2029
2029
  */
2030
2030
  var ul;
2031
- function gg() {
2031
+ function mg() {
2032
2032
  return ul || (ul = 1, process.env.NODE_ENV !== "production" && function() {
2033
2033
  var e = ee, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), m = Symbol.iterator, g = "@@iterator";
2034
2034
  function x(S) {
@@ -2591,17 +2591,17 @@ Check the top-level render call using <` + F + ">.");
2591
2591
  Mt(Jt, S);
2592
2592
  }
2593
2593
  if (We.call(j, "key")) {
2594
- var Bn = W(S), Dt = Object.keys(j).filter(function(lp) {
2595
- return lp !== "key";
2594
+ var Bn = W(S), Dt = Object.keys(j).filter(function(ap) {
2595
+ return ap !== "key";
2596
2596
  }), Hs = Dt.length > 0 ? "{key: someKey, " + Dt.join(": ..., ") + ": ...}" : "{key: someKey}";
2597
2597
  if (!Ut[Bn + Hs]) {
2598
- var ap = Dt.length > 0 ? "{" + Dt.join(": ..., ") + ": ...}" : "{}";
2598
+ var ip = Dt.length > 0 ? "{" + Dt.join(": ..., ") + ": ...}" : "{}";
2599
2599
  v(`A props object containing a "key" prop is being spread into JSX:
2600
2600
  let props = %s;
2601
2601
  <%s {...props} />
2602
2602
  React keys must be passed directly to JSX without using spread:
2603
2603
  let props = %s;
2604
- <%s key={someKey} {...props} />`, Hs, Bn, ap, Bn), Ut[Bn + Hs] = !0;
2604
+ <%s key={someKey} {...props} />`, Hs, Bn, ip, Bn), Ut[Bn + Hs] = !0;
2605
2605
  }
2606
2606
  }
2607
2607
  return S === r ? kn(ct) : Cn(ct), ct;
@@ -2617,9 +2617,9 @@ React keys must be passed directly to JSX without using spread:
2617
2617
  jr.Fragment = r, jr.jsx = he, jr.jsxs = Z;
2618
2618
  }()), jr;
2619
2619
  }
2620
- process.env.NODE_ENV === "production" ? Si.exports = mg() : Si.exports = gg();
2620
+ process.env.NODE_ENV === "production" ? Si.exports = pg() : Si.exports = mg();
2621
2621
  var d = Si.exports;
2622
- class xg {
2622
+ class gg {
2623
2623
  constructor() {
2624
2624
  // ---- Configuration ----
2625
2625
  Us(this, "_authBaseUrl", "");
@@ -2652,9 +2652,9 @@ class xg {
2652
2652
  return (t == null ? void 0 : t.users) ?? [];
2653
2653
  }
2654
2654
  }
2655
- const bg = new xg(), iu = yr(null);
2656
- function wg({ children: e, apiConfig: t }) {
2657
- const n = Xn, r = bg;
2655
+ const xg = new gg(), iu = yr(null);
2656
+ function bg({ children: e, apiConfig: t }) {
2657
+ const n = Xn, r = xg;
2658
2658
  if (t) {
2659
2659
  const s = n.baseUrl, i = r.baseUrl, a = n.getAuthToken();
2660
2660
  (t.baseUrl || t.chatBaseUrl) && (t.chatBaseUrl && t.chatBaseUrl !== s || t.baseUrl && !s.startsWith(t.baseUrl)) && n.updateConfig(t), (t.baseUrl || t.authBaseUrl) && (t.authBaseUrl && t.authBaseUrl !== i || t.baseUrl && !i.startsWith(t.baseUrl)) && r.updateConfig(t), t.apiKey !== void 0 && t.apiKey !== a && (n.updateConfig({ apiKey: t.apiKey }), r.updateConfig({ apiKey: t.apiKey }));
@@ -2671,7 +2671,7 @@ function wg({ children: e, apiConfig: t }) {
2671
2671
  };
2672
2672
  return /* @__PURE__ */ d.jsx(iu.Provider, { value: o, children: e });
2673
2673
  }
2674
- async function vg(e) {
2674
+ async function wg(e) {
2675
2675
  return await new Promise((t, n) => {
2676
2676
  const r = new FileReader();
2677
2677
  r.onload = () => {
@@ -2687,11 +2687,11 @@ async function vg(e) {
2687
2687
  }, r.onerror = (o) => n(o), r.readAsArrayBuffer(e);
2688
2688
  });
2689
2689
  }
2690
- async function yg(e = []) {
2690
+ async function vg(e = []) {
2691
2691
  const t = [], n = [];
2692
2692
  for (const r of e)
2693
2693
  try {
2694
- const o = await vg(r), s = r.type || "application/octet-stream";
2694
+ const o = await wg(r), s = r.type || "application/octet-stream";
2695
2695
  n.push({
2696
2696
  filename: r.name,
2697
2697
  data: o,
@@ -2718,7 +2718,7 @@ function Tr() {
2718
2718
  if (!e) throw new Error("useApi must be used within ApiProvider");
2719
2719
  return e;
2720
2720
  }
2721
- function Sg(e, t, n) {
2721
+ function yg(e, t, n) {
2722
2722
  const r = typeof t == "string" ? [{ type: "text", text: t }] : t;
2723
2723
  return {
2724
2724
  id: `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
@@ -2729,7 +2729,7 @@ function Sg(e, t, n) {
2729
2729
  };
2730
2730
  }
2731
2731
  function au(e, t = "user") {
2732
- return typeof e == "string" ? Sg(t, e) : e;
2732
+ return typeof e == "string" ? yg(t, e) : e;
2733
2733
  }
2734
2734
  function qn(e) {
2735
2735
  if (!(!e || typeof e != "object" || Array.isArray(e)))
@@ -2743,7 +2743,7 @@ function Dr(e, t) {
2743
2743
  return r.trim();
2744
2744
  }
2745
2745
  }
2746
- function Cg(e, t) {
2746
+ function Sg(e, t) {
2747
2747
  if (!e) return null;
2748
2748
  for (const n of t) {
2749
2749
  const r = e[n];
@@ -2758,7 +2758,7 @@ function dl(e) {
2758
2758
  return qn(t.configurable) ?? t;
2759
2759
  }
2760
2760
  function hr(e) {
2761
- const r = [...(Array.isArray(e == null ? void 0 : e.checkpoints) ? (e == null ? void 0 : e.checkpoints) ?? [] : e != null && e.checkpoints ? Object.values(e.checkpoints) : []).map((s, i) => kg(s, i)).filter((s) => !!s)].sort((s, i) => fl(i.createdAt) - fl(s.createdAt)), o = r[0] ?? null;
2761
+ const r = [...(Array.isArray(e == null ? void 0 : e.checkpoints) ? (e == null ? void 0 : e.checkpoints) ?? [] : e != null && e.checkpoints ? Object.values(e.checkpoints) : []).map((s, i) => Cg(s, i)).filter((s) => !!s)].sort((s, i) => fl(i.createdAt) - fl(s.createdAt)), o = r[0] ?? null;
2762
2762
  return {
2763
2763
  threadId: (e == null ? void 0 : e.threadId) ?? "",
2764
2764
  latest: o,
@@ -2766,12 +2766,12 @@ function hr(e) {
2766
2766
  interrupt: (o == null ? void 0 : o.interrupt) ?? null
2767
2767
  };
2768
2768
  }
2769
- function kg(e, t) {
2769
+ function Cg(e, t) {
2770
2770
  var C, y, T, N;
2771
2771
  if (!e) return null;
2772
- const n = ((C = e.values) == null ? void 0 : C.active_agent) ?? ((y = e.values) == null ? void 0 : y.activeAgent) ?? null, r = (T = e.values) == null ? void 0 : T.messages, s = (Array.isArray(r) ? r : []).map((A) => Tg(A, n)).filter((A) => !!A), i = qn(e.metadata) ?? {}, a = dl(e.config), c = qn(e.parent_config ?? e.parentConfig), l = dl(c), u = Dr(a, ["checkpoint_id", "checkpointId"]), f = Dr(a, ["checkpoint_ns", "checkpointNs"]), h = Dr(l, ["checkpoint_id", "checkpointId"]), p = qn(e.config), m = Array.isArray(e.tasks) ? e.tasks.map((A) => ({ ...A })) : 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(), w = {
2772
+ const n = ((C = e.values) == null ? void 0 : C.active_agent) ?? ((y = e.values) == null ? void 0 : y.activeAgent) ?? null, r = (T = e.values) == null ? void 0 : T.messages, s = (Array.isArray(r) ? r : []).map((A) => kg(A, n)).filter((A) => !!A), i = qn(e.metadata) ?? {}, a = dl(e.config), c = qn(e.parent_config ?? e.parentConfig), l = dl(c), u = Dr(a, ["checkpoint_id", "checkpointId"]), f = Dr(a, ["checkpoint_ns", "checkpointNs"]), h = Dr(l, ["checkpoint_id", "checkpointId"]), p = qn(e.config), m = Array.isArray(e.tasks) ? e.tasks.map((A) => ({ ...A })) : 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(), w = {
2773
2773
  ...i,
2774
- step: Cg(i, ["step"]) ?? 0,
2774
+ step: Sg(i, ["step"]) ?? 0,
2775
2775
  source: Dr(i, ["source"]) ?? null
2776
2776
  }, v = s.map((A) => ({
2777
2777
  ...A,
@@ -2783,7 +2783,7 @@ function kg(e, t) {
2783
2783
  createdAt: x,
2784
2784
  parentId: h ?? null,
2785
2785
  messages: v,
2786
- interrupt: Ag(
2786
+ interrupt: Eg(
2787
2787
  s,
2788
2788
  R,
2789
2789
  t,
@@ -2797,12 +2797,12 @@ function kg(e, t) {
2797
2797
  values: e.values ?? {}
2798
2798
  };
2799
2799
  }
2800
- function Tg(e, t) {
2801
- var l, u, f;
2800
+ function kg(e, t) {
2801
+ var l, u, f, h, p;
2802
2802
  if (!e || typeof e != "object") return null;
2803
- const n = Rg(e);
2803
+ const n = Tg(e);
2804
2804
  if (!n) return null;
2805
- const r = Eg(e == null ? void 0 : e.content);
2805
+ const r = Ig(e == null ? void 0 : e.content);
2806
2806
  if (!r.length) return null;
2807
2807
  const o = typeof e.createdAt == "string" ? e.createdAt : typeof ((l = e.additional_kwargs) == null ? void 0 : l.created_at) == "string" ? (u = e.additional_kwargs) == null ? void 0 : u.created_at : (/* @__PURE__ */ new Date()).toISOString(), s = typeof e.id == "string" && e.id.trim() ? e.id : `msg-${Date.now().toString(16)}-${Math.random().toString(16).slice(2)}`, i = typeof e.name == "string" ? e.name : void 0, a = typeof e.model == "string" ? e.model : ((f = e.additional_kwargs) == null ? void 0 : f.model) ?? void 0;
2808
2808
  return {
@@ -2812,17 +2812,17 @@ function Tg(e, t) {
2812
2812
  model: a,
2813
2813
  createdAt: o,
2814
2814
  content: r,
2815
- toolCallId: e.toolCallId ?? e.tool_call_id ?? void 0,
2816
- tool_calls: e.tool_calls ?? e.toolCalls ?? void 0,
2815
+ toolCallId: e.toolCallId ?? e.tool_call_id ?? ((h = e.additional_kwargs) == null ? void 0 : h.tool_call_id) ?? void 0,
2816
+ tool_calls: e.tool_calls ?? e.toolCalls ?? ((p = e.additional_kwargs) == null ? void 0 : p.tool_calls) ?? void 0,
2817
2817
  additionalKwargs: e.additional_kwargs ?? void 0,
2818
2818
  responseMetadata: e.response_metadata ?? void 0,
2819
2819
  artifact: e.artifact ?? void 0,
2820
2820
  threadId: e.threadId ?? e.thread_id
2821
2821
  };
2822
2822
  }
2823
- function Rg(e) {
2823
+ function Tg(e) {
2824
2824
  const t = typeof e.role == "string" ? e.role : void 0;
2825
- if (t && Ig(t))
2825
+ if (t && Rg(t))
2826
2826
  return t;
2827
2827
  const n = typeof e.type == "string" ? e.type : void 0;
2828
2828
  if (!n) return null;
@@ -2839,16 +2839,16 @@ function Rg(e) {
2839
2839
  return null;
2840
2840
  }
2841
2841
  }
2842
- function Ig(e) {
2842
+ function Rg(e) {
2843
2843
  return e === "assistant" || e === "user" || e === "system" || e === "tool" || e === "default_message";
2844
2844
  }
2845
- function Eg(e) {
2845
+ function Ig(e) {
2846
2846
  return typeof e == "string" ? [{ type: "text", text: e }] : Array.isArray(e) ? e.filter(
2847
2847
  (t) => !!(t && typeof t == "object" && typeof t.type == "string")
2848
2848
  ) : [];
2849
2849
  }
2850
- function Ag(e, t, n, r) {
2851
- const o = t.length, s = Ng(e, n);
2850
+ function Eg(e, t, n, r) {
2851
+ const o = t.length, s = Ag(e, n);
2852
2852
  if (s)
2853
2853
  return s;
2854
2854
  for (let i = o - 1; i >= 0; i -= 1) {
@@ -2865,7 +2865,7 @@ function Ag(e, t, n, r) {
2865
2865
  }
2866
2866
  return null;
2867
2867
  }
2868
- function Ng(e, t) {
2868
+ function Ag(e, t) {
2869
2869
  var n;
2870
2870
  for (let r = e.length - 1; r >= 0; r--) {
2871
2871
  const o = ((n = e[r]) == null ? void 0 : n.content) ?? [];
@@ -2887,10 +2887,10 @@ function fl(e) {
2887
2887
  const t = Date.parse(e);
2888
2888
  return Number.isFinite(t) ? t : 0;
2889
2889
  }
2890
- function _g(e) {
2890
+ function Ng(e) {
2891
2891
  return !!e && typeof e == "object" && "data" in e;
2892
2892
  }
2893
- function jg(e = {}) {
2893
+ function _g(e = {}) {
2894
2894
  const t = e.baseUrl || "", n = e.streamPath ?? "/stream", [r, o] = de(e.token ?? null), s = Se(e.headers ?? {}), i = e.credentials ?? "include", [a, c] = de(!1), [l, u] = de(null), [f, h] = de(""), [p, m] = de(null), [g, x] = de(0), [w, v] = de(!1), [k, R] = de({}), [C, y] = de(null), [T, N] = de({}), A = Se(null), M = Se(!0), D = Se(0), U = Se(null), W = Se(null), L = Se(null), J = Se(null), Y = Se({
2895
2895
  messageId: null,
2896
2896
  lastSeq: null,
@@ -3047,7 +3047,7 @@ function jg(e = {}) {
3047
3047
  continue;
3048
3048
  }
3049
3049
  dn && typeof G == "object" && G !== null && !("type" in G) && (G.type = dn);
3050
- const he = _g(G) ? G.data : G;
3050
+ const he = Ng(G) ? G.data : G;
3051
3051
  if (!he) {
3052
3052
  console.warn("[use-chat] dropped envelope event without payload", G);
3053
3053
  continue;
@@ -3248,7 +3248,7 @@ function jg(e = {}) {
3248
3248
  goto: () => Promise.resolve()
3249
3249
  };
3250
3250
  }
3251
- const Pg = ["detail", "message", "error", "description", "title"];
3251
+ const jg = ["detail", "message", "error", "description", "title"];
3252
3252
  function Mo(e) {
3253
3253
  if (!e) return null;
3254
3254
  if (typeof e == "string") {
@@ -3265,7 +3265,7 @@ function Mo(e) {
3265
3265
  }
3266
3266
  if (typeof e == "object") {
3267
3267
  const t = e;
3268
- for (const n of Pg) {
3268
+ for (const n of jg) {
3269
3269
  const r = Mo(t[n]);
3270
3270
  if (r)
3271
3271
  return r;
@@ -3277,7 +3277,7 @@ function Mo(e) {
3277
3277
  }
3278
3278
  return null;
3279
3279
  }
3280
- function Og(e) {
3280
+ function Pg(e) {
3281
3281
  if (!e) return "Request failed";
3282
3282
  const t = e.response, n = Mo(t == null ? void 0 : t.data);
3283
3283
  if (n) return n;
@@ -3291,7 +3291,7 @@ function Og(e) {
3291
3291
  }
3292
3292
  return t != null && t.status ? `Request failed with status code ${t.status}` : "Request failed";
3293
3293
  }
3294
- function Mg({
3294
+ function Og({
3295
3295
  api: e,
3296
3296
  initialThreadId: t = null,
3297
3297
  onError: n,
@@ -3377,7 +3377,7 @@ function Mg({
3377
3377
  try {
3378
3378
  await e.shareThread(H, $), await A(), k("Shared successfully");
3379
3379
  } catch (q) {
3380
- const z = Og(q);
3380
+ const z = Pg(q);
3381
3381
  throw n == null || n(z), k(`Failed to share: ${z}`), new Error(z);
3382
3382
  } finally {
3383
3383
  C(!1);
@@ -3444,7 +3444,7 @@ function Mg({
3444
3444
  };
3445
3445
  }
3446
3446
  const lu = yr(null);
3447
- function Dg({
3447
+ function Mg({
3448
3448
  children: e,
3449
3449
  initialThreadId: t = null,
3450
3450
  onError: n,
@@ -3464,7 +3464,7 @@ function Dg({
3464
3464
  shareInFlight: g,
3465
3465
  shareStatus: x,
3466
3466
  clearShareStatus: w
3467
- } = Mg({
3467
+ } = Og({
3468
3468
  api: o,
3469
3469
  initialThreadId: t,
3470
3470
  onError: n,
@@ -3514,7 +3514,7 @@ function io(e) {
3514
3514
  try {
3515
3515
  return JSON.parse(t);
3516
3516
  } catch {
3517
- const n = Lg(t);
3517
+ const n = Dg(t);
3518
3518
  if (n)
3519
3519
  try {
3520
3520
  return JSON.parse(n);
@@ -3524,7 +3524,7 @@ function io(e) {
3524
3524
  return null;
3525
3525
  }
3526
3526
  }
3527
- function Lg(e) {
3527
+ function Dg(e) {
3528
3528
  let t = !1, n = "";
3529
3529
  for (const o of e) {
3530
3530
  if (o === "\\") {
@@ -3596,12 +3596,12 @@ function Wr(e) {
3596
3596
  return "";
3597
3597
  }
3598
3598
  }
3599
- function $g(e) {
3599
+ function Lg(e) {
3600
3600
  return typeof e != "string" ? !1 : /^[\s\n]*[-*]\s|^[\s\n]*#+\s|```|^\s*\[.*\]\(|^>\s/.test(e);
3601
3601
  }
3602
3602
  function Mk(e) {
3603
3603
  const t = Wr(e);
3604
- return typeof e == "string" && $g(e) ? { content: e, isMarkdown: !0 } : { content: t, isMarkdown: !1 };
3604
+ return typeof e == "string" && Lg(e) ? { content: e, isMarkdown: !0 } : { content: t, isMarkdown: !1 };
3605
3605
  }
3606
3606
  function Zo(e) {
3607
3607
  if (e == null) return e;
@@ -3630,7 +3630,7 @@ function du(e) {
3630
3630
  const t = String(e).trim();
3631
3631
  return t.length > 0 ? t : null;
3632
3632
  }
3633
- function Fg(e) {
3633
+ function $g(e) {
3634
3634
  const t = (r) => {
3635
3635
  try {
3636
3636
  const o = Jo(r);
@@ -3642,7 +3642,7 @@ function Fg(e) {
3642
3642
  return n.length ? t(n.map((r) => r.text).join(`
3643
3643
  `)) : t(e);
3644
3644
  }
3645
- function zg(e) {
3645
+ function Fg(e) {
3646
3646
  var n;
3647
3647
  if (e.name && e.name.trim()) return e.name;
3648
3648
  const t = (n = e.additionalKwargs) == null ? void 0 : n.agent_name;
@@ -3668,13 +3668,13 @@ function Ci(e) {
3668
3668
  const t = (n = e.additionalKwargs) == null ? void 0 : n.toolProgress;
3669
3669
  return Array.isArray(t) ? t : [];
3670
3670
  }
3671
- function fu(e) {
3671
+ function zg(e) {
3672
3672
  if (e.role !== "assistant") return !1;
3673
3673
  const t = Array.isArray(e.content) ? e.content : Array.isArray(e.parts) ? e.parts : [], n = t.some((s) => s.type === "text" && s.text && s.text.trim().length > 0), r = t.some((s) => s.type === "image" || s.type === "image_url" || s.type === "file"), o = !!e.artifact;
3674
3674
  return !n && !r && !o;
3675
3675
  }
3676
3676
  function Bg(e) {
3677
- return e.role === "tool" ? !0 : e.role === "assistant" ? fu(e) : !1;
3677
+ return e.role === "tool" ? !0 : e.role === "assistant" ? zg(e) : !1;
3678
3678
  }
3679
3679
  function Hg(e, t) {
3680
3680
  const n = [], r = e.findIndex((c) => c.id === t);
@@ -3683,7 +3683,7 @@ function Hg(e, t) {
3683
3683
  let s = 0;
3684
3684
  for (let c = r; c >= 0; c--) {
3685
3685
  const l = e[c];
3686
- if (c < r && l.role === "assistant" && !fu(l))
3686
+ if (l.role === "user")
3687
3687
  break;
3688
3688
  if (l.role === "assistant") {
3689
3689
  const u = Array.isArray(l.content) ? l.content : Array.isArray(l.parts) ? l.parts : [];
@@ -3923,7 +3923,7 @@ function Jg(e, t) {
3923
3923
  }
3924
3924
  }
3925
3925
  function Zg(e = []) {
3926
- const [t, n] = dp(Jg, { ...Xg, messages: e }), r = Se([]), o = Se(null), s = Se(null), i = re(() => {
3926
+ const [t, n] = up(Jg, { ...Xg, messages: e }), r = Se([]), o = Se(null), s = Se(null), i = re(() => {
3927
3927
  o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
3928
3928
  const u = r.current;
3929
3929
  u.length && (r.current = [], n({ type: "batch", payload: { events: u } }));
@@ -3991,10 +3991,10 @@ function pl(e, t) {
3991
3991
  function Wi(e) {
3992
3992
  return e.call_id ?? e.id ?? null;
3993
3993
  }
3994
- function hu(e) {
3994
+ function fu(e) {
3995
3995
  return e.id ?? e.call_id ?? `tool-${Date.now()}-${Math.random().toString(16).slice(2)}`;
3996
3996
  }
3997
- function pu(e, t, n, r) {
3997
+ function hu(e, t, n, r) {
3998
3998
  const o = t ?? `call-${Date.now()}-${Math.random().toString(16).slice(2)}`;
3999
3999
  return {
4000
4000
  id: e,
@@ -4050,7 +4050,7 @@ function Ki(e, t) {
4050
4050
  };
4051
4051
  }
4052
4052
  function ex(e, t) {
4053
- const n = Wi(t), r = Vi(e.messages, n), o = t.name ?? t.tool ?? void 0, s = hu(t), i = {
4053
+ const n = Wi(t), r = Vi(e.messages, n), o = t.name ?? t.tool ?? void 0, s = fu(t), i = {
4054
4054
  type: t.type,
4055
4055
  content: `Starting ${o ?? "tool"}...`,
4056
4056
  seq: t.seq ?? null,
@@ -4068,7 +4068,7 @@ function ex(e, t) {
4068
4068
  };
4069
4069
  return { ...e, messages: ao(e.messages, r, h) };
4070
4070
  }
4071
- const a = pu(s, n, o, t.args), c = Ki(a, i);
4071
+ const a = hu(s, n, o, t.args), c = Ki(a, i);
4072
4072
  return { ...e, messages: [...e.messages, c] };
4073
4073
  }
4074
4074
  function tx(e, t) {
@@ -4092,11 +4092,11 @@ function tx(e, t) {
4092
4092
  return { ...e, messages: ao(e.messages, r, l) };
4093
4093
  }
4094
4094
  function nx(e, t) {
4095
- const n = Wi(t), r = hu(t);
4095
+ const n = Wi(t), r = fu(t);
4096
4096
  let o = e.messages, s = Vi(o, n);
4097
4097
  if (s === -1) {
4098
4098
  const m = t.name ?? t.tool ?? void 0;
4099
- o = [...o, pu(r, n, m, {})], s = o.length - 1;
4099
+ o = [...o, hu(r, n, m, {})], s = o.length - 1;
4100
4100
  }
4101
4101
  const i = o[s], a = t.output ?? t.error ?? null, c = Qg(a), l = [...i.content, ...c], u = {
4102
4102
  type: t.type,
@@ -4470,14 +4470,14 @@ function cx({
4470
4470
  clearState: E
4471
4471
  };
4472
4472
  }
4473
- const mu = yr(null), gu = yr(null);
4473
+ const pu = yr(null), mu = yr(null);
4474
4474
  function ys() {
4475
- const e = Sr(mu);
4475
+ const e = Sr(pu);
4476
4476
  if (!e) throw new Error("useThreadState must be used within a ThreadStateProvider");
4477
4477
  return e;
4478
4478
  }
4479
4479
  function ux() {
4480
- const e = Sr(gu);
4480
+ const e = Sr(mu);
4481
4481
  if (!e)
4482
4482
  throw new Error("useThreadStateUpdater must be used within a ThreadStateProvider");
4483
4483
  return e;
@@ -4624,7 +4624,7 @@ function dx({
4624
4624
  }),
4625
4625
  [U, L]
4626
4626
  );
4627
- return /* @__PURE__ */ d.jsx(gu.Provider, { value: $, children: /* @__PURE__ */ d.jsx(mu.Provider, { value: H, children: e }) });
4627
+ return /* @__PURE__ */ d.jsx(mu.Provider, { value: $, children: /* @__PURE__ */ d.jsx(pu.Provider, { value: H, children: e }) });
4628
4628
  }
4629
4629
  function gl(e, t) {
4630
4630
  if (!e) return null;
@@ -4656,7 +4656,7 @@ function px(e, t) {
4656
4656
  }
4657
4657
  throw new Error(`Message ${t} not found in timeline`);
4658
4658
  }
4659
- const xu = yr(null), bu = yr(!1);
4659
+ const gu = yr(null), xu = yr(!1);
4660
4660
  function mx({
4661
4661
  children: e,
4662
4662
  initialThreadId: t = null,
@@ -4669,11 +4669,11 @@ function mx({
4669
4669
  onConnectionError: c,
4670
4670
  onToolEnd: l
4671
4671
  }) {
4672
- const { chatApi: u, baseUrl: f } = Tr(), h = f, { stream: p, stop: m, clear: g, isStreaming: x, error: w, connected: v } = jg({ baseUrl: h }), [k, R] = de(!1);
4672
+ const { chatApi: u, baseUrl: f } = Tr(), h = f, { stream: p, stop: m, clear: g, isStreaming: x, error: w, connected: v } = _g({ baseUrl: h }), [k, R] = de(!1);
4673
4673
  return Pe(() => {
4674
4674
  R(x);
4675
4675
  }, [x]), /* @__PURE__ */ d.jsx(
4676
- Dg,
4676
+ Mg,
4677
4677
  {
4678
4678
  initialThreadId: t,
4679
4679
  onError: s,
@@ -4687,7 +4687,7 @@ function mx({
4687
4687
  autoLoadInitial: o,
4688
4688
  onError: s,
4689
4689
  isStreaming: k,
4690
- children: /* @__PURE__ */ d.jsx(bu.Provider, { value: !0, children: /* @__PURE__ */ d.jsx(
4690
+ children: /* @__PURE__ */ d.jsx(xu.Provider, { value: !0, children: /* @__PURE__ */ d.jsx(
4691
4691
  gx,
4692
4692
  {
4693
4693
  api: u,
@@ -4798,7 +4798,7 @@ function gx({
4798
4798
  }
4799
4799
  let ae = null;
4800
4800
  z.contentParts && z.contentParts.length > 0 && (ae = z.contentParts);
4801
- const { contentParts: pe, filesInfo: ce } = ae ? { contentParts: ae, filesInfo: [] } : await yg(O), me = [...pe];
4801
+ const { contentParts: pe, filesInfo: ce } = ae ? { contentParts: ae, filesInfo: [] } : await vg(O), me = [...pe];
4802
4802
  K && me.push({ type: "text", text: P });
4803
4803
  const be = I == null ? void 0 : I.originalMessageId, We = !!(I != null && I.edit && be), Fe = !V && me.length > 0;
4804
4804
  let je = null;
@@ -4849,15 +4849,15 @@ function gx({
4849
4849
  }),
4850
4850
  [u, f, $, c, w, h, M]
4851
4851
  );
4852
- return /* @__PURE__ */ d.jsx(xu.Provider, { value: q, children: e });
4852
+ return /* @__PURE__ */ d.jsx(gu.Provider, { value: q, children: e });
4853
4853
  }
4854
- function wu() {
4855
- const e = Sr(xu);
4854
+ function bu() {
4855
+ const e = Sr(gu);
4856
4856
  if (!e) throw new Error("useStream must be used within StreamingProvider");
4857
4857
  return e;
4858
4858
  }
4859
4859
  function Dk() {
4860
- return Sr(bu);
4860
+ return Sr(xu);
4861
4861
  }
4862
4862
  function xl(e) {
4863
4863
  return typeof e == "object" && e !== null;
@@ -4914,7 +4914,7 @@ function Lo({
4914
4914
  x
4915
4915
  ]
4916
4916
  );
4917
- return /* @__PURE__ */ d.jsx(wg, { apiConfig: f, children: /* @__PURE__ */ d.jsx(mx, { ...w, children: e }) });
4917
+ return /* @__PURE__ */ d.jsx(bg, { apiConfig: f, children: /* @__PURE__ */ d.jsx(mx, { ...w, children: e }) });
4918
4918
  }
4919
4919
  function Pr(e) {
4920
4920
  const t = Se(e);
@@ -4930,7 +4930,7 @@ function pr(e) {
4930
4930
  if (!(typeof globalThis > "u"))
4931
4931
  return globalThis[e];
4932
4932
  }
4933
- function vu() {
4933
+ function wu() {
4934
4934
  const e = [
4935
4935
  pr("__API_BASE_URL__"),
4936
4936
  pr("__CHAT_API_BASE_URL__"),
@@ -4940,7 +4940,7 @@ function vu() {
4940
4940
  if (typeof t == "string" && t.trim())
4941
4941
  return t.trim().replace(/\/+$/, "");
4942
4942
  }
4943
- function yu() {
4943
+ function vu() {
4944
4944
  const e = [
4945
4945
  pr("__API_AUTH_TOKEN__"),
4946
4946
  pr("__CHAT_API_KEY__"),
@@ -4950,24 +4950,24 @@ function yu() {
4950
4950
  if (typeof t == "string" && t.trim())
4951
4951
  return t.trim();
4952
4952
  }
4953
- function Su(...e) {
4953
+ function yu(...e) {
4954
4954
  for (const t of e)
4955
4955
  if (typeof t == "string" && t.trim())
4956
4956
  return t.trim().replace(/\/+$/, "");
4957
4957
  return "";
4958
4958
  }
4959
4959
  function wx() {
4960
- const e = {}, t = vu(), n = yu();
4960
+ const e = {}, t = wu(), n = vu();
4961
4961
  return t && (e.baseUrl = t), n && (e.apiKey = n), e;
4962
4962
  }
4963
4963
  function vx() {
4964
- const e = wx(), t = Xn.getAuthToken(), n = vu();
4964
+ const e = wx(), t = Xn.getAuthToken(), n = wu();
4965
4965
  return {
4966
- apiBaseUrl: Su(
4966
+ apiBaseUrl: yu(
4967
4967
  e.baseUrl,
4968
4968
  n
4969
4969
  ),
4970
- apiKey: t || e.apiKey || yu() || "",
4970
+ apiKey: t || e.apiKey || vu() || "",
4971
4971
  model: "gpt-4",
4972
4972
  temperature: 0.7,
4973
4973
  maxTokens: 4096,
@@ -4979,10 +4979,10 @@ function vx() {
4979
4979
  messageHistory: 100
4980
4980
  };
4981
4981
  }
4982
- const Cu = Vn.chatSettings;
4982
+ const Su = Vn.chatSettings;
4983
4983
  function yx() {
4984
4984
  try {
4985
- const e = localStorage.getItem(Cu);
4985
+ const e = localStorage.getItem(Su);
4986
4986
  return e ? JSON.parse(e) : {};
4987
4987
  } catch (e) {
4988
4988
  return console.error("Failed to parse stored settings:", e), {};
@@ -4994,7 +4994,7 @@ function Sx(e) {
4994
4994
  ...e,
4995
4995
  apiBaseUrl: e.apiBaseUrl.trim().replace(/\/+$/, "")
4996
4996
  };
4997
- localStorage.setItem(Cu, JSON.stringify(t)), t.apiKey && Xn.setAuthToken(t.apiKey);
4997
+ localStorage.setItem(Su, JSON.stringify(t)), t.apiKey && Xn.setAuthToken(t.apiKey);
4998
4998
  } catch (t) {
4999
4999
  console.error("Failed to save settings:", t);
5000
5000
  }
@@ -5007,7 +5007,7 @@ function Lk() {
5007
5007
  // Always use the current token from API client if available
5008
5008
  apiKey: n || t.apiKey || e.apiKey,
5009
5009
  // Always use the current base URL from API client
5010
- apiBaseUrl: Su(
5010
+ apiBaseUrl: yu(
5011
5011
  Xn.baseUrl,
5012
5012
  r,
5013
5013
  e.apiBaseUrl
@@ -5049,7 +5049,7 @@ const Cx = Tc(
5049
5049
  }
5050
5050
  ), Ze = b.forwardRef(
5051
5051
  ({ className: e, variant: t, size: n, asChild: r = !1, ...o }, s) => {
5052
- const i = r ? mp : "button";
5052
+ const i = r ? pp : "button";
5053
5053
  return /* @__PURE__ */ d.jsx(
5054
5054
  i,
5055
5055
  {
@@ -5061,14 +5061,14 @@ const Cx = Tc(
5061
5061
  }
5062
5062
  );
5063
5063
  Ze.displayName = "Button";
5064
- const Ss = 0, Ln = 1, Rr = 2, ku = 4;
5064
+ const Ss = 0, Ln = 1, Rr = 2, Cu = 4;
5065
5065
  function bl(e) {
5066
5066
  return () => e;
5067
5067
  }
5068
5068
  function kx(e) {
5069
5069
  e();
5070
5070
  }
5071
- function Tu(e, t) {
5071
+ function ku(e, t) {
5072
5072
  return (n) => e(t(n));
5073
5073
  }
5074
5074
  function wl(e, t) {
@@ -5106,7 +5106,7 @@ function Gi(e) {
5106
5106
  e(Rr);
5107
5107
  }
5108
5108
  function ht(e) {
5109
- return e(ku);
5109
+ return e(Cu);
5110
5110
  }
5111
5111
  function ge(e, t) {
5112
5112
  return Be(e, Tx(t, Ss));
@@ -5125,10 +5125,10 @@ function vl(e) {
5125
5125
  }, e);
5126
5126
  };
5127
5127
  }
5128
- function Ru(e, t) {
5128
+ function Tu(e, t) {
5129
5129
  return e === t;
5130
5130
  }
5131
- function et(e = Ru) {
5131
+ function et(e = Tu) {
5132
5132
  let t;
5133
5133
  return (n) => (r) => {
5134
5134
  e(t, r) || (t = r, n(r));
@@ -5140,7 +5140,7 @@ function ye(e) {
5140
5140
  };
5141
5141
  }
5142
5142
  function ue(e) {
5143
- return (t) => Tu(t, e);
5143
+ return (t) => ku(t, e);
5144
5144
  }
5145
5145
  function hn(e) {
5146
5146
  return (t) => () => {
@@ -5222,7 +5222,7 @@ function oe(e) {
5222
5222
  o(t);
5223
5223
  break;
5224
5224
  }
5225
- case ku:
5225
+ case Cu:
5226
5226
  return t;
5227
5227
  }
5228
5228
  return n(r, o);
@@ -5292,7 +5292,7 @@ function gt(...e) {
5292
5292
  }
5293
5293
  };
5294
5294
  }
5295
- function ve(e, t = Ru) {
5295
+ function ve(e, t = Tu) {
5296
5296
  return Q(e, et(t));
5297
5297
  }
5298
5298
  function ki(...e) {
@@ -5396,7 +5396,7 @@ function Mx(e, t, n, r) {
5396
5396
  function yl(e, t, n) {
5397
5397
  return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Bt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
5398
5398
  }
5399
- function Iu(e, t, n) {
5399
+ function Ru(e, t, n) {
5400
5400
  const r = ee.useRef(null), o = ee.useCallback(
5401
5401
  (c) => {
5402
5402
  if (!(c != null && c.offsetParent))
@@ -5479,7 +5479,7 @@ const _t = $e(
5479
5479
  [],
5480
5480
  { singleton: !0 }
5481
5481
  ), Vr = { lvl: 0 };
5482
- function Eu(e, t) {
5482
+ function Iu(e, t) {
5483
5483
  const n = e.length;
5484
5484
  if (n === 0)
5485
5485
  return [];
@@ -5510,7 +5510,7 @@ function sn(e, t, n = "k") {
5510
5510
  return sn(e.l, t, n);
5511
5511
  }
5512
5512
  function Kt(e, t, n) {
5513
- return qe(e) ? _u(t, n, 1) : t === e.k ? wt(e, { k: t, v: n }) : t < e.k ? Sl(wt(e, { l: Kt(e.l, t, n) })) : Sl(wt(e, { r: Kt(e.r, t, n) }));
5513
+ return qe(e) ? Nu(t, n, 1) : t === e.k ? wt(e, { k: t, v: n }) : t < e.k ? Sl(wt(e, { l: Kt(e.l, t, n) })) : Sl(wt(e, { r: Kt(e.r, t, n) }));
5514
5514
  }
5515
5515
  function mr() {
5516
5516
  return Vr;
@@ -5530,8 +5530,8 @@ function Ti(e, t) {
5530
5530
  if (qe(o))
5531
5531
  return r;
5532
5532
  {
5533
- const [s, i] = Nu(r);
5534
- return $o(wt(e, { k: s, l: Au(r), v: i }));
5533
+ const [s, i] = Au(r);
5534
+ return $o(wt(e, { k: s, l: Eu(r), v: i }));
5535
5535
  }
5536
5536
  } else return t < n ? $o(wt(e, { l: Ti(r, t) })) : $o(wt(e, { r: Ti(o, t) }));
5537
5537
  }
@@ -5551,7 +5551,7 @@ function $o(e) {
5551
5551
  return e;
5552
5552
  if (n > r.lvl + 1) {
5553
5553
  if (Ys(t))
5554
- return ju(wt(e, { lvl: n - 1 }));
5554
+ return _u(wt(e, { lvl: n - 1 }));
5555
5555
  if (!qe(t) && !qe(t.r))
5556
5556
  return wt(t.r, {
5557
5557
  l: wt(t, { r: t.r.l }),
@@ -5580,7 +5580,7 @@ function $o(e) {
5580
5580
  }
5581
5581
  }
5582
5582
  function wt(e, t) {
5583
- return _u(
5583
+ return Nu(
5584
5584
  t.k !== void 0 ? t.k : e.k,
5585
5585
  t.v !== void 0 ? t.v : e.v,
5586
5586
  t.lvl !== void 0 ? t.lvl : e.lvl,
@@ -5588,22 +5588,22 @@ function wt(e, t) {
5588
5588
  t.r !== void 0 ? t.r : e.r
5589
5589
  );
5590
5590
  }
5591
- function Au(e) {
5592
- return qe(e.r) ? e.l : $o(wt(e, { r: Au(e.r) }));
5591
+ function Eu(e) {
5592
+ return qe(e.r) ? e.l : $o(wt(e, { r: Eu(e.r) }));
5593
5593
  }
5594
5594
  function Ys(e) {
5595
5595
  return qe(e) || e.lvl > e.r.lvl;
5596
5596
  }
5597
- function Nu(e) {
5598
- return qe(e.r) ? [e.k, e.v] : Nu(e.r);
5597
+ function Au(e) {
5598
+ return qe(e.r) ? [e.k, e.v] : Au(e.r);
5599
5599
  }
5600
- function _u(e, t, n, r = Vr, o = Vr) {
5600
+ function Nu(e, t, n, r = Vr, o = Vr) {
5601
5601
  return { k: e, l: r, lvl: n, r: o, v: t };
5602
5602
  }
5603
5603
  function Sl(e) {
5604
- return Ii(ju(e));
5604
+ return Ii(_u(e));
5605
5605
  }
5606
- function ju(e) {
5606
+ function _u(e) {
5607
5607
  const { l: t } = e;
5608
5608
  return !qe(t) && t.lvl === e.lvl ? wt(t, { r: wt(e, { l: t.r }) }) : e;
5609
5609
  }
@@ -5612,9 +5612,9 @@ function Ii(e) {
5612
5612
  return !qe(n) && !qe(n.r) && n.lvl === t && n.r.lvl === t ? wt(n, { l: wt(e, { r: n.l }), lvl: t + 1 }) : e;
5613
5613
  }
5614
5614
  function Dx(e) {
5615
- return Eu(e, ({ k: t, v: n }) => ({ index: t, value: n }));
5615
+ return Iu(e, ({ k: t, v: n }) => ({ index: t, value: n }));
5616
5616
  }
5617
- function Pu(e, t) {
5617
+ function ju(e, t) {
5618
5618
  return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex);
5619
5619
  }
5620
5620
  function qr(e, t) {
@@ -5625,7 +5625,7 @@ const Xi = $e(
5625
5625
  [],
5626
5626
  { singleton: !0 }
5627
5627
  );
5628
- function Ou(e, t, n) {
5628
+ function Pu(e, t, n) {
5629
5629
  return e[Qo(e, t, n)];
5630
5630
  }
5631
5631
  function Qo(e, t, n, r = 0) {
@@ -5697,10 +5697,10 @@ function Bx({ offset: e }, t) {
5697
5697
  function Gr(e, t, n) {
5698
5698
  if (t.length === 0)
5699
5699
  return 0;
5700
- const { index: r, offset: o, size: s } = Ou(t, e, Ji), i = e - r, a = s * i + (i - 1) * n + o;
5700
+ const { index: r, offset: o, size: s } = Pu(t, e, Ji), i = e - r, a = s * i + (i - 1) * n + o;
5701
5701
  return a > 0 ? a + n : a;
5702
5702
  }
5703
- function Mu(e, t) {
5703
+ function Ou(e, t) {
5704
5704
  if (!Ts(t))
5705
5705
  return e;
5706
5706
  let n = 0;
@@ -5708,17 +5708,17 @@ function Mu(e, t) {
5708
5708
  n++;
5709
5709
  return e + n;
5710
5710
  }
5711
- function Du(e, t, n) {
5711
+ function Mu(e, t, n) {
5712
5712
  if (zx(e))
5713
5713
  return t.groupIndices[e.groupIndex] + 1;
5714
5714
  {
5715
5715
  const r = e.index === "LAST" ? n : e.index;
5716
- let o = Mu(r, t);
5716
+ let o = Ou(r, t);
5717
5717
  return o = Math.max(0, o, Math.min(n, o)), o;
5718
5718
  }
5719
5719
  }
5720
5720
  function Hx(e, t, n, r = 0) {
5721
- return r > 0 && (t = Math.max(t, Ou(e, r, Ji).offset)), Eu(Lx(e, t, n, Bx), Vx);
5721
+ return r > 0 && (t = Math.max(t, Pu(e, r, Ji).offset)), Iu(Lx(e, t, n, Bx), Vx);
5722
5722
  }
5723
5723
  function Ux(e, [t, n, r, o]) {
5724
5724
  t.length > 0 && r("received item sizes", t, Bt.DEBUG);
@@ -6032,7 +6032,7 @@ function Gx(e) {
6032
6032
  }
6033
6033
  );
6034
6034
  }
6035
- const Lu = $e(
6035
+ const Du = $e(
6036
6036
  ([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
6037
6037
  const s = Me(), i = Me(), a = qt(Q(s, ue(Gx)));
6038
6038
  return ge(
@@ -6075,7 +6075,7 @@ const Lu = $e(
6075
6075
  tt($n),
6076
6076
  { singleton: !0 }
6077
6077
  ), Yx = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
6078
- function $u(e) {
6078
+ function Lu(e) {
6079
6079
  const t = typeof e == "number" ? { index: e } : e;
6080
6080
  return t.align || (t.align = "start"), (!t.behavior || !Yx) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
6081
6081
  }
@@ -6111,7 +6111,7 @@ const lo = $e(
6111
6111
  W,
6112
6112
  L
6113
6113
  ]) => {
6114
- const J = $u(R), { align: Y, behavior: ne, offset: H } = J, $ = T - 1, q = Du(J, C, $);
6114
+ const J = Lu(R), { align: Y, behavior: ne, offset: H } = J, $ = T - 1, q = Mu(J, C, $);
6115
6115
  let z = Gr(q, C.offsetTree, U) + A;
6116
6116
  Y === "end" ? (z += W + sn(C.sizeTree, q)[1] - y + L, q === $ && (z += M)) : Y === "center" ? z += (W + sn(C.sizeTree, q)[1] - y + L) / 2 : z -= N, H && (z += H);
6117
6117
  const I = (E) => {
@@ -6205,7 +6205,7 @@ const co = $e(
6205
6205
  tt(vn, _t, lo, Fn),
6206
6206
  { singleton: !0 }
6207
6207
  );
6208
- function Fu(e, t) {
6208
+ function $u(e, t) {
6209
6209
  return Math.abs(e - t) < 1.01;
6210
6210
  }
6211
6211
  const Yr = "up", Fr = "down", Jx = "none", Zx = {
@@ -6268,7 +6268,7 @@ const Yr = "up", Fr = "down", Jx = "none", Zx = {
6268
6268
  r,
6269
6269
  mn(
6270
6270
  (v, { scrollHeight: k, scrollTop: R, viewportHeight: C }) => {
6271
- if (Fu(v.scrollHeight, k))
6271
+ if ($u(v.scrollHeight, k))
6272
6272
  return {
6273
6273
  changed: !1,
6274
6274
  jump: 0,
@@ -6413,7 +6413,7 @@ const ea = $e(
6413
6413
  );
6414
6414
  function eb(e, t, n) {
6415
6415
  if (Ts(t)) {
6416
- const r = Mu(e, t);
6416
+ const r = Ou(e, t);
6417
6417
  return [
6418
6418
  { index: sn(t.groupOffsetTree, r)[0], offset: 0, size: 0 },
6419
6419
  { data: n == null ? void 0 : n[0], index: r, offset: 0, size: 0 }
@@ -6453,7 +6453,7 @@ function Fo(e, t, n, r, o, s) {
6453
6453
  totalCount: n
6454
6454
  };
6455
6455
  }
6456
- function zu(e, t, n, r, o, s) {
6456
+ function Fu(e, t, n, r, o, s) {
6457
6457
  let i = 0;
6458
6458
  if (n.groupIndices.length > 0)
6459
6459
  for (const u of n.groupIndices) {
@@ -6545,7 +6545,7 @@ const nr = $e(
6545
6545
  if (N === 0)
6546
6546
  return { ...Xs, totalCount: N };
6547
6547
  if (y === 0 && T === 0)
6548
- return $ === 0 ? { ...Xs, totalCount: N } : zu($, M, A, W, L, J || []);
6548
+ return $ === 0 ? { ...Xs, totalCount: N } : Fu($, M, A, W, L, J || []);
6549
6549
  if (qe(H))
6550
6550
  return $ > 0 ? null : Fo(
6551
6551
  eb(Qi(M, N), Y, J),
@@ -6654,14 +6654,14 @@ const nr = $e(
6654
6654
  startIndex: y[T].index
6655
6655
  };
6656
6656
  }),
6657
- et(Pu)
6657
+ et(ju)
6658
6658
  )
6659
6659
  );
6660
6660
  return { endReached: k, initialItemCount: x, itemsRendered: w, listState: v, rangeChanged: C, startReached: R, topItemsIndexes: g, ...h };
6661
6661
  },
6662
6662
  tt(
6663
6663
  vn,
6664
- Lu,
6664
+ Du,
6665
6665
  ea,
6666
6666
  co,
6667
6667
  lo,
@@ -6670,7 +6670,7 @@ const nr = $e(
6670
6670
  Xi
6671
6671
  ),
6672
6672
  { singleton: !0 }
6673
- ), Bu = $e(
6673
+ ), zu = $e(
6674
6674
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
6675
6675
  const s = Me(), i = At(
6676
6676
  Q(
@@ -6697,9 +6697,9 @@ const nr = $e(
6697
6697
  );
6698
6698
  return { alignToBottom: n, paddingTopAddition: r };
6699
6699
  },
6700
- tt(_t, Bu),
6700
+ tt(_t, zu),
6701
6701
  { singleton: !0 }
6702
- ), Hu = $e(() => ({
6702
+ ), Bu = $e(() => ({
6703
6703
  context: oe(null)
6704
6704
  })), nb = ({
6705
6705
  itemBottom: e,
@@ -6707,7 +6707,7 @@ const nr = $e(
6707
6707
  locationParams: { align: n, behavior: r, ...o },
6708
6708
  viewportBottom: s,
6709
6709
  viewportTop: i
6710
- }) => t < i ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, Uu = $e(
6710
+ }) => t < i ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, Hu = $e(
6711
6711
  ([
6712
6712
  { gap: e, sizes: t, totalCount: n },
6713
6713
  { fixedFooterHeight: r, fixedHeaderHeight: o, headerHeight: s, scrollingInProgress: i, scrollTop: a, viewportHeight: c },
@@ -6720,7 +6720,7 @@ const nr = $e(
6720
6720
  _e(t, c, n, s, o, r, a),
6721
6721
  _e(e),
6722
6722
  ue(([[f, h, p, m, g, x, w, v], k]) => {
6723
- const { align: R, behavior: C, calculateViewLocation: y = nb, done: T, ...N } = f, A = Du(f, h, m - 1), M = Gr(A, h.offsetTree, k) + g + x, D = M + sn(h.sizeTree, A)[1], U = v + x, W = v + p - w, L = y({
6723
+ const { align: R, behavior: C, calculateViewLocation: y = nb, done: T, ...N } = f, A = Mu(f, h, m - 1), M = Gr(A, h.offsetTree, k) + g + x, D = M + sn(h.sizeTree, A)[1], U = v + x, W = v + p - w, L = y({
6724
6724
  itemBottom: D,
6725
6725
  itemTop: M,
6726
6726
  locationParams: { align: R, behavior: C, ...N },
@@ -6853,8 +6853,8 @@ const rb = (e, t) => typeof e == "function" ? El(e(t)) : t && El(e), ob = $e(
6853
6853
  Fn,
6854
6854
  $n,
6855
6855
  _t,
6856
- Hu,
6857
- Uu
6856
+ Bu,
6857
+ Hu
6858
6858
  )
6859
6859
  ), sb = $e(
6860
6860
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (ge(
@@ -6863,7 +6863,7 @@ const rb = (e, t) => typeof e == "function" ? El(e(t)) : t && El(e), ob = $e(
6863
6863
  _e(s),
6864
6864
  ye(([, c]) => c !== 0),
6865
6865
  _e(o, r, t, n, e),
6866
- ue(([[, c], l, u, f, h, p = []]) => zu(c, l, u, f, h, p))
6866
+ ue(([[, c], l, u, f, h, p = []]) => Fu(c, l, u, f, h, p))
6867
6867
  ),
6868
6868
  i
6869
6869
  ), {}),
@@ -6899,7 +6899,7 @@ const rb = (e, t) => typeof e == "function" ? El(e(t)) : t && El(e), ob = $e(
6899
6899
  },
6900
6900
  tt(Fn, _t, nr),
6901
6901
  { singleton: !0 }
6902
- ), Wu = $e(
6902
+ ), Uu = $e(
6903
6903
  ([{ scrollVelocity: e }]) => {
6904
6904
  const t = oe(!1), n = Me(), r = oe(!1);
6905
6905
  return ge(
@@ -7008,11 +7008,11 @@ const cb = $e(([{ topItemsIndexes: e }]) => {
7008
7008
  e
7009
7009
  ), { topItemCount: t };
7010
7010
  }, tt(nr));
7011
- function Vu(e) {
7011
+ function Wu(e) {
7012
7012
  let t = !1, n;
7013
7013
  return () => (t || (t = !0, n = e()), n);
7014
7014
  }
7015
- const ub = Vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), db = $e(
7015
+ const ub = Wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), db = $e(
7016
7016
  ([
7017
7017
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
7018
7018
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: a },
@@ -7121,16 +7121,16 @@ const ub = Vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
7121
7121
  ea,
7122
7122
  sb,
7123
7123
  Fn,
7124
- Wu,
7125
- Bu,
7124
+ Uu,
7125
+ zu,
7126
7126
  ib,
7127
7127
  tb,
7128
7128
  ta,
7129
- Uu,
7129
+ Hu,
7130
7130
  $n,
7131
- Hu
7131
+ Bu
7132
7132
  )
7133
- ), Ku = $e(
7133
+ ), Vu = $e(
7134
7134
  ([
7135
7135
  {
7136
7136
  data: e,
@@ -7203,7 +7203,7 @@ const ub = Vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
7203
7203
  lo,
7204
7204
  db,
7205
7205
  cb,
7206
- Lu,
7206
+ Du,
7207
7207
  fb
7208
7208
  )
7209
7209
  );
@@ -7218,7 +7218,7 @@ function hb(e, t) {
7218
7218
  return n;
7219
7219
  }
7220
7220
  const bo = typeof document < "u" ? ee.useLayoutEffect : ee.useEffect;
7221
- function qu(e, t, n) {
7221
+ function Ku(e, t, n) {
7222
7222
  const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), s = Object.keys(t.methods || {}), i = Object.keys(t.events || {}), a = ee.createContext({});
7223
7223
  function c(x, w) {
7224
7224
  x.propsReady && Ae(x.propsReady, !1);
@@ -7294,14 +7294,14 @@ function qu(e, t, n) {
7294
7294
  usePublisher: h
7295
7295
  };
7296
7296
  }
7297
- const Gu = ee.createContext(void 0), Yu = ee.createContext(void 0), Xu = typeof document < "u" ? ee.useLayoutEffect : ee.useEffect;
7297
+ const qu = ee.createContext(void 0), Gu = ee.createContext(void 0), Yu = typeof document < "u" ? ee.useLayoutEffect : ee.useEffect;
7298
7298
  function Js(e) {
7299
7299
  return "self" in e;
7300
7300
  }
7301
7301
  function pb(e) {
7302
7302
  return "body" in e;
7303
7303
  }
7304
- function Ju(e, t, n, r = Ir, o, s) {
7304
+ function Xu(e, t, n, r = Ir, o, s) {
7305
7305
  const i = ee.useRef(null), a = ee.useRef(null), c = ee.useRef(null), l = ee.useCallback(
7306
7306
  (h) => {
7307
7307
  let p, m, g;
@@ -7339,7 +7339,7 @@ function Ju(e, t, n, r = Ir, o, s) {
7339
7339
  s ? p.document.documentElement.scrollWidth : p.document.documentElement.scrollHeight
7340
7340
  ), g = s ? p.innerWidth : p.innerHeight, w = s ? window.scrollX : window.scrollY) : (x = p[s ? "scrollWidth" : "scrollHeight"], g = Nn(p, s ? "width" : "height"), w = p[s ? "scrollLeft" : "scrollTop"]);
7341
7341
  const v = x - g;
7342
- if (h.top = Math.ceil(Math.max(Math.min(v, h.top), 0)), Fu(g, x) || h.top === w) {
7342
+ if (h.top = Math.ceil(Math.max(Math.min(v, h.top), 0)), $u(g, x) || h.top === w) {
7343
7343
  e({ scrollHeight: x, scrollTop: w, viewportHeight: g }), m && t(!0);
7344
7344
  return;
7345
7345
  }
@@ -7352,7 +7352,7 @@ function Ju(e, t, n, r = Ir, o, s) {
7352
7352
  }
7353
7353
  return { scrollByCallback: f, scrollerRef: i, scrollToCallback: u };
7354
7354
  }
7355
- const Zs = "-webkit-sticky", Al = "sticky", na = Vu(() => {
7355
+ const Zs = "-webkit-sticky", Al = "sticky", na = Wu(() => {
7356
7356
  if (typeof document > "u")
7357
7357
  return Al;
7358
7358
  const e = document.createElement("div");
@@ -7389,8 +7389,8 @@ const mb = /* @__PURE__ */ $e(() => {
7389
7389
  };
7390
7390
  }), gb = /* @__PURE__ */ $e(
7391
7391
  ([e, t]) => ({ ...e, ...t }),
7392
- tt(Ku, mb)
7393
- ), xb = ({ height: e }) => /* @__PURE__ */ d.jsx("div", { style: { height: e } }), bb = { overflowAnchor: "none", position: na(), zIndex: 1 }, Zu = { overflowAnchor: "none" }, wb = { ...Zu, display: "inline-block", height: "100%" }, Nl = /* @__PURE__ */ ee.memo(function({ showTopList: e = !1 }) {
7392
+ tt(Vu, mb)
7393
+ ), xb = ({ height: e }) => /* @__PURE__ */ d.jsx("div", { style: { height: e } }), bb = { overflowAnchor: "none", position: na(), zIndex: 1 }, Ju = { overflowAnchor: "none" }, wb = { ...Ju, display: "inline-block", height: "100%" }, Nl = /* @__PURE__ */ ee.memo(function({ showTopList: e = !1 }) {
7394
7394
  const t = Re("listState"), n = Zt("sizeRanges"), r = Re("useWindowScroll"), o = Re("customScrollParent"), s = Zt("windowScrollContainerState"), i = Zt("scrollContainerState"), a = o || r ? s : i, c = Re("itemContent"), l = Re("context"), u = Re("groupContent"), f = Re("trackItemSizes"), h = Re("itemSize"), p = Re("log"), m = Zt("gap"), g = Re("horizontalDirection"), { callbackRef: x } = Ox(
7395
7395
  n,
7396
7396
  h,
@@ -7461,7 +7461,7 @@ const mb = /* @__PURE__ */ $e(() => {
7461
7461
  "data-item-index": L.index,
7462
7462
  "data-known-size": L.size,
7463
7463
  key: Y,
7464
- style: g ? wb : Zu
7464
+ style: g ? wb : Ju
7465
7465
  },
7466
7466
  M ? c(L.index, L.groupIndex, L.data, l) : c(L.index, L.data, l)
7467
7467
  );
@@ -7522,9 +7522,9 @@ const kb = /* @__PURE__ */ ee.memo(function() {
7522
7522
  ), o = Re("context");
7523
7523
  return e ? /* @__PURE__ */ d.jsx(n, { ref: r, children: /* @__PURE__ */ d.jsx(e, { ...It(e, o) }) }) : null;
7524
7524
  });
7525
- function Qu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7525
+ function Zu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7526
7526
  return ee.memo(function({ children: r, style: o, context: s, ...i }) {
7527
- const a = n("scrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("scrollerRef"), f = t("horizontalDirection") || !1, { scrollByCallback: h, scrollerRef: p, scrollToCallback: m } = Ju(
7527
+ const a = n("scrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("scrollerRef"), f = t("horizontalDirection") || !1, { scrollByCallback: h, scrollerRef: p, scrollToCallback: m } = Xu(
7528
7528
  a,
7529
7529
  l,
7530
7530
  c,
@@ -7547,16 +7547,16 @@ function Qu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7547
7547
  );
7548
7548
  });
7549
7549
  }
7550
- function ed({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7550
+ function Qu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7551
7551
  return ee.memo(function({ children: r, style: o, context: s, ...i }) {
7552
- const a = n("windowScrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("totalListHeight"), f = t("deviation"), h = t("customScrollParent"), p = ee.useRef(null), m = t("scrollerRef"), { scrollByCallback: g, scrollerRef: x, scrollToCallback: w } = Ju(
7552
+ const a = n("windowScrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("totalListHeight"), f = t("deviation"), h = t("customScrollParent"), p = ee.useRef(null), m = t("scrollerRef"), { scrollByCallback: g, scrollerRef: x, scrollToCallback: w } = Xu(
7553
7553
  a,
7554
7554
  l,
7555
7555
  c,
7556
7556
  m,
7557
7557
  h
7558
7558
  );
7559
- return Xu(() => {
7559
+ return Yu(() => {
7560
7560
  var v;
7561
7561
  return x.current = h || ((v = p.current) == null ? void 0 : v.ownerDocument.defaultView), () => {
7562
7562
  x.current = null;
@@ -7575,15 +7575,15 @@ function ed({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7575
7575
  });
7576
7576
  }
7577
7577
  const Rb = ({ children: e }) => {
7578
- const t = ee.useContext(Gu), n = Zt("viewportHeight"), r = Zt("fixedItemHeight"), o = Re("alignToBottom"), s = Re("horizontalDirection"), i = ee.useMemo(
7579
- () => Tu(n, (c) => Nn(c, s ? "width" : "height")),
7578
+ const t = ee.useContext(qu), n = Zt("viewportHeight"), r = Zt("fixedItemHeight"), o = Re("alignToBottom"), s = Re("horizontalDirection"), i = ee.useMemo(
7579
+ () => ku(n, (c) => Nn(c, s ? "width" : "height")),
7580
7580
  [n, s]
7581
7581
  ), a = tr(i, !0, Re("skipAnimationFrameInResizeObserver"));
7582
7582
  return ee.useEffect(() => {
7583
7583
  t && (n(t.viewportHeight), r(t.itemHeight));
7584
7584
  }, [t, n, r]), /* @__PURE__ */ d.jsx("div", { "data-viewport-type": "element", ref: a, style: Rs(o), children: e });
7585
7585
  }, Ib = ({ children: e }) => {
7586
- const t = ee.useContext(Gu), n = Zt("windowViewportRect"), r = Zt("fixedItemHeight"), o = Re("customScrollParent"), s = Iu(
7586
+ const t = ee.useContext(qu), n = Zt("windowViewportRect"), r = Zt("fixedItemHeight"), o = Re("customScrollParent"), s = Ru(
7587
7587
  n,
7588
7588
  o,
7589
7589
  Re("skipAnimationFrameInResizeObserver")
@@ -7609,7 +7609,7 @@ const Rb = ({ children: e }) => {
7609
7609
  useEmitter: oa,
7610
7610
  useEmitterValue: Re,
7611
7611
  usePublisher: Zt
7612
- } = /* @__PURE__ */ qu(
7612
+ } = /* @__PURE__ */ Ku(
7613
7613
  gb,
7614
7614
  {
7615
7615
  required: {},
@@ -7668,7 +7668,7 @@ const Rb = ({ children: e }) => {
7668
7668
  }
7669
7669
  },
7670
7670
  Ab
7671
- ), _b = /* @__PURE__ */ Qu({ useEmitter: oa, useEmitterValue: Re, usePublisher: Zt }), jb = /* @__PURE__ */ ed({ useEmitter: oa, useEmitterValue: Re, usePublisher: Zt }), Pb = Nb, Ob = /* @__PURE__ */ $e(() => {
7671
+ ), _b = /* @__PURE__ */ Zu({ useEmitter: oa, useEmitterValue: Re, usePublisher: Zt }), jb = /* @__PURE__ */ Qu({ useEmitter: oa, useEmitterValue: Re, usePublisher: Zt }), Pb = Nb, Ob = /* @__PURE__ */ $e(() => {
7672
7672
  const e = oe((l) => /* @__PURE__ */ d.jsxs("td", { children: [
7673
7673
  "Item $",
7674
7674
  l
@@ -7704,7 +7704,7 @@ const Rb = ({ children: e }) => {
7704
7704
  GroupComponent: c("Group", "tr")
7705
7705
  };
7706
7706
  });
7707
- tt(Ku, Ob);
7707
+ tt(Vu, Ob);
7708
7708
  na();
7709
7709
  const _l = {
7710
7710
  bottom: 0,
@@ -7845,7 +7845,7 @@ const $b = /* @__PURE__ */ $e(
7845
7845
  const lt = Qi(Fe, _), nn = lt + Math.max(be - 1, 0);
7846
7846
  return Db(Ol(lt, nn, me));
7847
7847
  }
7848
- const Ue = td(at, xt, je);
7848
+ const Ue = ed(at, xt, je);
7849
7849
  let Le, Qe;
7850
7850
  We ? V === 0 && te === 0 && be > 0 ? (Le = 0, Qe = be - 1) : (Le = Ue * ns((V + He) / (nt + He)), Qe = Ue * jl((te + He) / (nt + He)) - 1, Qe = Qs(_ - 1, zr(Qe, Ue - 1)), Le = Qs(Qe, zr(0, Le))) : (Le = 0, Qe = -1);
7851
7851
  const it = Ol(Le, Qe, me), { bottom: Ye, top: mt } = Ml(ce, ae, pe, it), vt = jl(_ / Ue), Ve = vt * nt + (vt - 1) * He - Ye;
@@ -7910,7 +7910,7 @@ const $b = /* @__PURE__ */ $e(
7910
7910
  endIndex: _[_.length - 1].index,
7911
7911
  startIndex: _[0].index
7912
7912
  })),
7913
- et(Pu),
7913
+ et(ju),
7914
7914
  Tn(0)
7915
7915
  )
7916
7916
  );
@@ -7919,7 +7919,7 @@ const $b = /* @__PURE__ */ $e(
7919
7919
  D,
7920
7920
  _e(A, M, y, J),
7921
7921
  ue(([_, V, te, ae, pe]) => {
7922
- const ce = $u(_), { align: me, behavior: be, offset: We } = ce;
7922
+ const ce = Lu(_), { align: me, behavior: be, offset: We } = ce;
7923
7923
  let Fe = ce.index;
7924
7924
  Fe === "LAST" && (Fe = ae - 1), Fe = zr(0, Fe, Qs(ae - 1, Fe));
7925
7925
  let je = Ai(V, pe, te, Fe);
@@ -7983,9 +7983,9 @@ const $b = /* @__PURE__ */ $e(
7983
7983
  ...C
7984
7984
  };
7985
7985
  },
7986
- tt(ea, _t, uo, Wu, Fn, ta, $n)
7986
+ tt(ea, _t, uo, Uu, Fn, ta, $n)
7987
7987
  );
7988
- function td(e, t, n) {
7988
+ function ed(e, t, n) {
7989
7989
  return zr(1, ns((e + n) / (ns(t) + n)));
7990
7990
  }
7991
7991
  function Ml(e, t, n, r) {
@@ -7996,7 +7996,7 @@ function Ml(e, t, n, r) {
7996
7996
  return { bottom: Ai(e, t, n, r[r.length - 1].index) + o, top: s };
7997
7997
  }
7998
7998
  function Ai(e, t, n, r) {
7999
- const o = td(e.width, n.width, t.column), s = ns(r / o), i = s * n.height + zr(0, s - 1) * t.row;
7999
+ const o = ed(e.width, n.width, t.column), s = ns(r / o), i = s * n.height + zr(0, s - 1) * t.row;
8000
8000
  return i > 0 ? i + t.row : i;
8001
8001
  }
8002
8002
  const Fb = /* @__PURE__ */ $e(() => {
@@ -8050,7 +8050,7 @@ const Fb = /* @__PURE__ */ $e(() => {
8050
8050
  !0,
8051
8051
  !1
8052
8052
  );
8053
- return Xu(() => {
8053
+ return Yu(() => {
8054
8054
  e.itemHeight > 0 && e.itemWidth > 0 && g(!0);
8055
8055
  }, [e]), m ? null : /* @__PURE__ */ d.jsx(
8056
8056
  c,
@@ -8109,7 +8109,7 @@ const Fb = /* @__PURE__ */ $e(() => {
8109
8109
  ), o = ot("context");
8110
8110
  return e ? /* @__PURE__ */ d.jsx(n, { ref: r, children: /* @__PURE__ */ d.jsx(e, { ...It(e, o) }) }) : null;
8111
8111
  }), Wb = ({ children: e }) => {
8112
- const t = ee.useContext(Yu), n = Qt("itemDimensions"), r = Qt("viewportDimensions"), o = tr(
8112
+ const t = ee.useContext(Gu), n = Qt("itemDimensions"), r = Qt("viewportDimensions"), o = tr(
8113
8113
  ee.useMemo(
8114
8114
  () => (s) => {
8115
8115
  r(s.getBoundingClientRect());
@@ -8123,7 +8123,7 @@ const Fb = /* @__PURE__ */ $e(() => {
8123
8123
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
8124
8124
  }, [t, r, n]), /* @__PURE__ */ d.jsx("div", { ref: o, style: Rs(!1), children: e });
8125
8125
  }, Vb = ({ children: e }) => {
8126
- const t = ee.useContext(Yu), n = Qt("windowViewportRect"), r = Qt("itemDimensions"), o = ot("customScrollParent"), s = Iu(n, o, !1);
8126
+ const t = ee.useContext(Gu), n = Qt("windowViewportRect"), r = Qt("itemDimensions"), o = ot("customScrollParent"), s = Ru(n, o, !1);
8127
8127
  return ee.useEffect(() => {
8128
8128
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
8129
8129
  }, [t, n, r]), /* @__PURE__ */ d.jsx("div", { ref: s, style: Rs(!1), children: e });
@@ -8135,10 +8135,10 @@ const Fb = /* @__PURE__ */ $e(() => {
8135
8135
  /* @__PURE__ */ d.jsx(Ub, {})
8136
8136
  ] }) });
8137
8137
  }), {
8138
- useEmitter: nd,
8138
+ useEmitter: td,
8139
8139
  useEmitterValue: ot,
8140
8140
  usePublisher: Qt
8141
- } = /* @__PURE__ */ qu(
8141
+ } = /* @__PURE__ */ Ku(
8142
8142
  zb,
8143
8143
  {
8144
8144
  optional: {
@@ -8179,7 +8179,7 @@ const Fb = /* @__PURE__ */ $e(() => {
8179
8179
  }
8180
8180
  },
8181
8181
  Kb
8182
- ), qb = /* @__PURE__ */ Qu({ useEmitter: nd, useEmitterValue: ot, usePublisher: Qt }), Gb = /* @__PURE__ */ ed({ useEmitter: nd, useEmitterValue: ot, usePublisher: Qt });
8182
+ ), qb = /* @__PURE__ */ Zu({ useEmitter: td, useEmitterValue: ot, usePublisher: Qt }), Gb = /* @__PURE__ */ Qu({ useEmitter: td, useEmitterValue: ot, usePublisher: Qt });
8183
8183
  function Dl(e, t, n) {
8184
8184
  return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Bt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
8185
8185
  }
@@ -8360,7 +8360,7 @@ var nw = [
8360
8360
  });
8361
8361
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
8362
8362
  }, {});
8363
- function rd(e, t) {
8363
+ function nd(e, t) {
8364
8364
  e && Rc.flushSync(() => e.dispatchEvent(t));
8365
8365
  }
8366
8366
  function Et(e) {
@@ -8381,7 +8381,7 @@ function rw(e, t = globalThis == null ? void 0 : globalThis.document) {
8381
8381
  return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
8382
8382
  }, [n, t]);
8383
8383
  }
8384
- var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLayer.pointerDownOutside", iw = "dismissableLayer.focusOutside", $l, od = b.createContext({
8384
+ var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLayer.pointerDownOutside", iw = "dismissableLayer.focusOutside", $l, rd = b.createContext({
8385
8385
  layers: /* @__PURE__ */ new Set(),
8386
8386
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
8387
8387
  branches: /* @__PURE__ */ new Set()
@@ -8395,7 +8395,7 @@ var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLa
8395
8395
  onInteractOutside: i,
8396
8396
  onDismiss: a,
8397
8397
  ...c
8398
- } = e, l = b.useContext(od), [u, f] = b.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = b.useState({}), m = st(t, (T) => f(T)), g = Array.from(l.layers), [x] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), w = g.indexOf(x), v = u ? g.indexOf(u) : -1, k = l.layersWithOutsidePointerEventsDisabled.size > 0, R = v >= w, C = cw((T) => {
8398
+ } = e, l = b.useContext(rd), [u, f] = b.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = b.useState({}), m = st(t, (T) => f(T)), g = Array.from(l.layers), [x] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), w = g.indexOf(x), v = u ? g.indexOf(u) : -1, k = l.layersWithOutsidePointerEventsDisabled.size > 0, R = v >= w, C = cw((T) => {
8399
8399
  const N = T.target, A = [...l.branches].some((M) => M.contains(N));
8400
8400
  !R || A || (o == null || o(T), i == null || i(T), T.defaultPrevented || a == null || a());
8401
8401
  }, h), y = uw((T) => {
@@ -8435,7 +8435,7 @@ var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLa
8435
8435
  );
8436
8436
  sa.displayName = ow;
8437
8437
  var aw = "DismissableLayerBranch", lw = b.forwardRef((e, t) => {
8438
- const n = b.useContext(od), r = b.useRef(null), o = st(t, r);
8438
+ const n = b.useContext(rd), r = b.useRef(null), o = st(t, r);
8439
8439
  return b.useEffect(() => {
8440
8440
  const s = r.current;
8441
8441
  if (s)
@@ -8452,7 +8452,7 @@ function cw(e, t = globalThis == null ? void 0 : globalThis.document) {
8452
8452
  const s = (a) => {
8453
8453
  if (a.target && !r.current) {
8454
8454
  let c = function() {
8455
- sd(
8455
+ od(
8456
8456
  sw,
8457
8457
  n,
8458
8458
  l,
@@ -8479,7 +8479,7 @@ function uw(e, t = globalThis == null ? void 0 : globalThis.document) {
8479
8479
  const n = Et(e), r = b.useRef(!1);
8480
8480
  return b.useEffect(() => {
8481
8481
  const o = (s) => {
8482
- s.target && !r.current && sd(iw, n, { originalEvent: s }, {
8482
+ s.target && !r.current && od(iw, n, { originalEvent: s }, {
8483
8483
  discrete: !1
8484
8484
  });
8485
8485
  };
@@ -8493,9 +8493,9 @@ function Fl() {
8493
8493
  const e = new CustomEvent(Ni);
8494
8494
  document.dispatchEvent(e);
8495
8495
  }
8496
- function sd(e, t, n, { discrete: r }) {
8496
+ function od(e, t, n, { discrete: r }) {
8497
8497
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
8498
- t && o.addEventListener(e, t, { once: !0 }), r ? rd(o, s) : o.dispatchEvent(s);
8498
+ t && o.addEventListener(e, t, { once: !0 }), r ? nd(o, s) : o.dispatchEvent(s);
8499
8499
  }
8500
8500
  var ei = "focusScope.autoFocusOnMount", ti = "focusScope.autoFocusOnUnmount", zl = { bubbles: !1, cancelable: !0 }, dw = "FocusScope", ia = b.forwardRef((e, t) => {
8501
8501
  const {
@@ -8540,7 +8540,7 @@ var ei = "focusScope.autoFocusOnMount", ti = "focusScope.autoFocusOnUnmount", zl
8540
8540
  const g = document.activeElement;
8541
8541
  if (!a.contains(g)) {
8542
8542
  const w = new CustomEvent(ei, zl);
8543
- a.addEventListener(ei, l), a.dispatchEvent(w), w.defaultPrevented || (fw(xw(id(a)), { select: !0 }), document.activeElement === g && En(a));
8543
+ a.addEventListener(ei, l), a.dispatchEvent(w), w.defaultPrevented || (fw(xw(sd(a)), { select: !0 }), document.activeElement === g && En(a));
8544
8544
  }
8545
8545
  return () => {
8546
8546
  a.removeEventListener(ei, l), setTimeout(() => {
@@ -8570,10 +8570,10 @@ function fw(e, { select: t = !1 } = {}) {
8570
8570
  if (En(r, { select: t }), document.activeElement !== n) return;
8571
8571
  }
8572
8572
  function hw(e) {
8573
- const t = id(e), n = Bl(t, e), r = Bl(t.reverse(), e);
8573
+ const t = sd(e), n = Bl(t, e), r = Bl(t.reverse(), e);
8574
8574
  return [n, r];
8575
8575
  }
8576
- function id(e) {
8576
+ function sd(e) {
8577
8577
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
8578
8578
  acceptNode: (r) => {
8579
8579
  const o = r.tagName === "INPUT" && r.type === "hidden";
@@ -8700,7 +8700,7 @@ function yw(e) {
8700
8700
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
8701
8701
  }
8702
8702
  var ni = 0;
8703
- function ad() {
8703
+ function id() {
8704
8704
  b.useEffect(() => {
8705
8705
  const e = document.querySelectorAll("[data-radix-focus-guard]");
8706
8706
  return document.body.insertAdjacentElement("afterbegin", e[0] ?? Wl()), document.body.insertAdjacentElement("beforeend", e[1] ?? Wl()), ni++, () => {
@@ -8721,7 +8721,7 @@ var pn = function() {
8721
8721
  return t;
8722
8722
  }, pn.apply(this, arguments);
8723
8723
  };
8724
- function ld(e, t) {
8724
+ function ad(e, t) {
8725
8725
  var n = {};
8726
8726
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
8727
8727
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -8842,8 +8842,8 @@ function Nw(e) {
8842
8842
  var t = Aw(null);
8843
8843
  return t.options = pn({ async: !0, ssr: !1 }, e), t;
8844
8844
  }
8845
- var cd = function(e) {
8846
- var t = e.sideCar, n = ld(e, ["sideCar"]);
8845
+ var ld = function(e) {
8846
+ var t = e.sideCar, n = ad(e, ["sideCar"]);
8847
8847
  if (!t)
8848
8848
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
8849
8849
  var r = t.read();
@@ -8851,21 +8851,21 @@ var cd = function(e) {
8851
8851
  throw new Error("Sidecar medium not found");
8852
8852
  return b.createElement(r, pn({}, n));
8853
8853
  };
8854
- cd.isSideCarExport = !0;
8854
+ ld.isSideCarExport = !0;
8855
8855
  function _w(e, t) {
8856
- return e.useMedium(t), cd;
8856
+ return e.useMedium(t), ld;
8857
8857
  }
8858
- var ud = Nw(), oi = function() {
8858
+ var cd = Nw(), oi = function() {
8859
8859
  }, Es = b.forwardRef(function(e, t) {
8860
8860
  var n = b.useRef(null), r = b.useState({
8861
8861
  onScrollCapture: oi,
8862
8862
  onWheelCapture: oi,
8863
8863
  onTouchMoveCapture: oi
8864
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, l = e.removeScrollBar, u = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, m = e.noIsolation, g = e.inert, x = e.allowPinchZoom, w = e.as, v = w === void 0 ? "div" : w, k = e.gapMode, R = ld(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, y = Iw([n, t]), T = pn(pn({}, R), o);
8864
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, l = e.removeScrollBar, u = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, m = e.noIsolation, g = e.inert, x = e.allowPinchZoom, w = e.as, v = w === void 0 ? "div" : w, k = e.gapMode, R = ad(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, y = Iw([n, t]), T = pn(pn({}, R), o);
8865
8865
  return b.createElement(
8866
8866
  b.Fragment,
8867
8867
  null,
8868
- u && b.createElement(C, { sideCar: ud, removeScrollBar: l, shards: f, noRelative: p, noIsolation: m, inert: g, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: k }),
8868
+ u && b.createElement(C, { sideCar: cd, removeScrollBar: l, shards: f, noRelative: p, noIsolation: m, inert: g, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: k }),
8869
8869
  i ? b.cloneElement(b.Children.only(a), pn(pn({}, T), { ref: y })) : b.createElement(v, pn({}, T, { className: c, ref: y }), a)
8870
8870
  );
8871
8871
  });
@@ -8916,7 +8916,7 @@ var Dw = function() {
8916
8916
  };
8917
8917
  }, [t && n]);
8918
8918
  };
8919
- }, dd = function() {
8919
+ }, ud = function() {
8920
8920
  var e = Lw(), t = function(n) {
8921
8921
  var r = n.styles, o = n.dynamic;
8922
8922
  return e(r, o), null;
@@ -8942,7 +8942,7 @@ var Dw = function() {
8942
8942
  right: t[2],
8943
8943
  gap: Math.max(0, r - n + t[2] - t[0])
8944
8944
  };
8945
- }, Bw = dd(), gr = "data-scroll-locked", Hw = function(e, t, n, r) {
8945
+ }, Bw = ud(), gr = "data-scroll-locked", Hw = function(e, t, n, r) {
8946
8946
  var o = e.left, s = e.top, i = e.right, a = e.gap;
8947
8947
  return n === void 0 && (n = "margin"), `
8948
8948
  .`.concat(Cw, ` {
@@ -9017,7 +9017,7 @@ if (typeof window < "u")
9017
9017
  }
9018
9018
  var ar = _i ? { passive: !1 } : !1, Vw = function(e) {
9019
9019
  return e.tagName === "TEXTAREA";
9020
- }, fd = function(e, t) {
9020
+ }, dd = function(e, t) {
9021
9021
  if (!(e instanceof Element))
9022
9022
  return !1;
9023
9023
  var n = window.getComputedStyle(e);
@@ -9027,16 +9027,16 @@ var ar = _i ? { passive: !1 } : !1, Vw = function(e) {
9027
9027
  !(n.overflowY === n.overflowX && !Vw(e) && n[t] === "visible")
9028
9028
  );
9029
9029
  }, Kw = function(e) {
9030
- return fd(e, "overflowY");
9030
+ return dd(e, "overflowY");
9031
9031
  }, qw = function(e) {
9032
- return fd(e, "overflowX");
9032
+ return dd(e, "overflowX");
9033
9033
  }, ql = function(e, t) {
9034
9034
  var n = t.ownerDocument, r = t;
9035
9035
  do {
9036
9036
  typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
9037
- var o = hd(e, r);
9037
+ var o = fd(e, r);
9038
9038
  if (o) {
9039
- var s = pd(e, r), i = s[1], a = s[2];
9039
+ var s = hd(e, r), i = s[1], a = s[2];
9040
9040
  if (i > a)
9041
9041
  return !0;
9042
9042
  }
@@ -9057,9 +9057,9 @@ var ar = _i ? { passive: !1 } : !1, Vw = function(e) {
9057
9057
  n,
9058
9058
  r
9059
9059
  ];
9060
- }, hd = function(e, t) {
9060
+ }, fd = function(e, t) {
9061
9061
  return e === "v" ? Kw(t) : qw(t);
9062
- }, pd = function(e, t) {
9062
+ }, hd = function(e, t) {
9063
9063
  return e === "v" ? Gw(t) : Yw(t);
9064
9064
  }, Xw = function(e, t) {
9065
9065
  return e === "h" && t === "rtl" ? -1 : 1;
@@ -9068,8 +9068,8 @@ var ar = _i ? { passive: !1 } : !1, Vw = function(e) {
9068
9068
  do {
9069
9069
  if (!a)
9070
9070
  break;
9071
- var p = pd(e, a), m = p[0], g = p[1], x = p[2], w = g - x - s * m;
9072
- (m || w) && hd(e, a) && (f += w, h += m);
9071
+ var p = hd(e, a), m = p[0], g = p[1], x = p[2], w = g - x - s * m;
9072
+ (m || w) && fd(e, a) && (f += w, h += m);
9073
9073
  var v = a.parentNode;
9074
9074
  a = v && v.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? v.host : v;
9075
9075
  } while (
@@ -9093,7 +9093,7 @@ var ar = _i ? { passive: !1 } : !1, Vw = function(e) {
9093
9093
  `);
9094
9094
  }, ev = 0, lr = [];
9095
9095
  function tv(e) {
9096
- var t = b.useRef([]), n = b.useRef([0, 0]), r = b.useRef(), o = b.useState(ev++)[0], s = b.useState(dd)[0], i = b.useRef(e);
9096
+ var t = b.useRef([]), n = b.useRef([0, 0]), r = b.useRef(), o = b.useState(ev++)[0], s = b.useState(ud)[0], i = b.useRef(e);
9097
9097
  b.useEffect(function() {
9098
9098
  i.current = e;
9099
9099
  }, [e]), b.useEffect(function() {
@@ -9179,7 +9179,7 @@ function nv(e) {
9179
9179
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
9180
9180
  return t;
9181
9181
  }
9182
- const rv = _w(ud, tv);
9182
+ const rv = _w(cd, tv);
9183
9183
  var la = b.forwardRef(function(e, t) {
9184
9184
  return b.createElement(Es, pn({}, e, { ref: t, sideCar: rv }));
9185
9185
  });
@@ -9189,13 +9189,13 @@ var ov = function(e) {
9189
9189
  return null;
9190
9190
  var t = Array.isArray(e) ? e[0] : e;
9191
9191
  return t.ownerDocument.body;
9192
- }, cr = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), ko = {}, ii = 0, md = function(e) {
9193
- return e && (e.host || md(e.parentNode));
9192
+ }, cr = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), ko = {}, ii = 0, pd = function(e) {
9193
+ return e && (e.host || pd(e.parentNode));
9194
9194
  }, sv = function(e, t) {
9195
9195
  return t.map(function(n) {
9196
9196
  if (e.contains(n))
9197
9197
  return n;
9198
- var r = md(n);
9198
+ var r = pd(n);
9199
9199
  return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
9200
9200
  }).filter(function(n) {
9201
9201
  return !!n;
@@ -9226,13 +9226,13 @@ var ov = function(e) {
9226
9226
  cr.set(f, h), s.set(f, p), h || (Co.has(f) || f.removeAttribute(r), Co.delete(f)), p || f.removeAttribute(n);
9227
9227
  }), ii--, ii || (cr = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), ko = {});
9228
9228
  };
9229
- }, gd = function(e, t, n) {
9229
+ }, md = function(e, t, n) {
9230
9230
  n === void 0 && (n = "data-aria-hidden");
9231
9231
  var r = Array.from(Array.isArray(e) ? e : [e]), o = ov(e);
9232
9232
  return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), iv(r, o, n, "aria-hidden")) : function() {
9233
9233
  return null;
9234
9234
  };
9235
- }, As = "Dialog", [xd, Fk] = zn(As), [av, un] = xd(As), bd = (e) => {
9235
+ }, As = "Dialog", [gd, Fk] = zn(As), [av, un] = gd(As), xd = (e) => {
9236
9236
  const {
9237
9237
  __scopeDialog: t,
9238
9238
  children: n,
@@ -9263,10 +9263,10 @@ var ov = function(e) {
9263
9263
  }
9264
9264
  );
9265
9265
  };
9266
- bd.displayName = As;
9267
- var wd = "DialogTrigger", lv = b.forwardRef(
9266
+ xd.displayName = As;
9267
+ var bd = "DialogTrigger", lv = b.forwardRef(
9268
9268
  (e, t) => {
9269
- const { __scopeDialog: n, ...r } = e, o = un(wd, n), s = st(t, o.triggerRef);
9269
+ const { __scopeDialog: n, ...r } = e, o = un(bd, n), s = st(t, o.triggerRef);
9270
9270
  return /* @__PURE__ */ d.jsx(
9271
9271
  Oe.button,
9272
9272
  {
@@ -9282,21 +9282,21 @@ var wd = "DialogTrigger", lv = b.forwardRef(
9282
9282
  );
9283
9283
  }
9284
9284
  );
9285
- lv.displayName = wd;
9286
- var ca = "DialogPortal", [cv, vd] = xd(ca, {
9285
+ lv.displayName = bd;
9286
+ var ca = "DialogPortal", [cv, wd] = gd(ca, {
9287
9287
  forceMount: void 0
9288
- }), yd = (e) => {
9288
+ }), vd = (e) => {
9289
9289
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = un(ca, t);
9290
9290
  return /* @__PURE__ */ d.jsx(cv, { scope: t, forceMount: n, children: b.Children.map(r, (i) => /* @__PURE__ */ d.jsx(Xt, { present: n || s.open, children: /* @__PURE__ */ d.jsx(aa, { asChild: !0, container: o, children: i }) })) });
9291
9291
  };
9292
- yd.displayName = ca;
9293
- var rs = "DialogOverlay", Sd = b.forwardRef(
9292
+ vd.displayName = ca;
9293
+ var rs = "DialogOverlay", yd = b.forwardRef(
9294
9294
  (e, t) => {
9295
- const n = vd(rs, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = un(rs, e.__scopeDialog);
9295
+ const n = wd(rs, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = un(rs, e.__scopeDialog);
9296
9296
  return s.modal ? /* @__PURE__ */ d.jsx(Xt, { present: r || s.open, children: /* @__PURE__ */ d.jsx(dv, { ...o, ref: t }) }) : null;
9297
9297
  }
9298
9298
  );
9299
- Sd.displayName = rs;
9299
+ yd.displayName = rs;
9300
9300
  var uv = Ur("DialogOverlay.RemoveScroll"), dv = b.forwardRef(
9301
9301
  (e, t) => {
9302
9302
  const { __scopeDialog: n, ...r } = e, o = un(rs, n);
@@ -9314,21 +9314,21 @@ var uv = Ur("DialogOverlay.RemoveScroll"), dv = b.forwardRef(
9314
9314
  ) })
9315
9315
  );
9316
9316
  }
9317
- ), Zn = "DialogContent", Cd = b.forwardRef(
9317
+ ), Zn = "DialogContent", Sd = b.forwardRef(
9318
9318
  (e, t) => {
9319
- const n = vd(Zn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = un(Zn, e.__scopeDialog);
9319
+ const n = wd(Zn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = un(Zn, e.__scopeDialog);
9320
9320
  return /* @__PURE__ */ d.jsx(Xt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ d.jsx(fv, { ...o, ref: t }) : /* @__PURE__ */ d.jsx(hv, { ...o, ref: t }) });
9321
9321
  }
9322
9322
  );
9323
- Cd.displayName = Zn;
9323
+ Sd.displayName = Zn;
9324
9324
  var fv = b.forwardRef(
9325
9325
  (e, t) => {
9326
9326
  const n = un(Zn, e.__scopeDialog), r = b.useRef(null), o = st(t, n.contentRef, r);
9327
9327
  return b.useEffect(() => {
9328
9328
  const s = r.current;
9329
- if (s) return gd(s);
9329
+ if (s) return md(s);
9330
9330
  }, []), /* @__PURE__ */ d.jsx(
9331
- kd,
9331
+ Cd,
9332
9332
  {
9333
9333
  ...e,
9334
9334
  ref: o,
@@ -9353,7 +9353,7 @@ var fv = b.forwardRef(
9353
9353
  (e, t) => {
9354
9354
  const n = un(Zn, e.__scopeDialog), r = b.useRef(!1), o = b.useRef(!1);
9355
9355
  return /* @__PURE__ */ d.jsx(
9356
- kd,
9356
+ Cd,
9357
9357
  {
9358
9358
  ...e,
9359
9359
  ref: t,
@@ -9372,10 +9372,10 @@ var fv = b.forwardRef(
9372
9372
  }
9373
9373
  );
9374
9374
  }
9375
- ), kd = b.forwardRef(
9375
+ ), Cd = b.forwardRef(
9376
9376
  (e, t) => {
9377
9377
  const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = un(Zn, n), c = b.useRef(null), l = st(t, c);
9378
- return ad(), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
9378
+ return id(), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
9379
9379
  /* @__PURE__ */ d.jsx(
9380
9380
  ia,
9381
9381
  {
@@ -9405,23 +9405,23 @@ var fv = b.forwardRef(
9405
9405
  ] })
9406
9406
  ] });
9407
9407
  }
9408
- ), ua = "DialogTitle", Td = b.forwardRef(
9408
+ ), ua = "DialogTitle", kd = b.forwardRef(
9409
9409
  (e, t) => {
9410
9410
  const { __scopeDialog: n, ...r } = e, o = un(ua, n);
9411
9411
  return /* @__PURE__ */ d.jsx(Oe.h2, { id: o.titleId, ...r, ref: t });
9412
9412
  }
9413
9413
  );
9414
- Td.displayName = ua;
9415
- var Rd = "DialogDescription", Id = b.forwardRef(
9414
+ kd.displayName = ua;
9415
+ var Td = "DialogDescription", Rd = b.forwardRef(
9416
9416
  (e, t) => {
9417
- const { __scopeDialog: n, ...r } = e, o = un(Rd, n);
9417
+ const { __scopeDialog: n, ...r } = e, o = un(Td, n);
9418
9418
  return /* @__PURE__ */ d.jsx(Oe.p, { id: o.descriptionId, ...r, ref: t });
9419
9419
  }
9420
9420
  );
9421
- Id.displayName = Rd;
9422
- var Ed = "DialogClose", Ad = b.forwardRef(
9421
+ Rd.displayName = Td;
9422
+ var Id = "DialogClose", Ed = b.forwardRef(
9423
9423
  (e, t) => {
9424
- const { __scopeDialog: n, ...r } = e, o = un(Ed, n);
9424
+ const { __scopeDialog: n, ...r } = e, o = un(Id, n);
9425
9425
  return /* @__PURE__ */ d.jsx(
9426
9426
  Oe.button,
9427
9427
  {
@@ -9433,16 +9433,16 @@ var Ed = "DialogClose", Ad = b.forwardRef(
9433
9433
  );
9434
9434
  }
9435
9435
  );
9436
- Ad.displayName = Ed;
9436
+ Ed.displayName = Id;
9437
9437
  function da(e) {
9438
9438
  return e ? "open" : "closed";
9439
9439
  }
9440
- var Nd = "DialogTitleWarning", [zk, _d] = Yb(Nd, {
9440
+ var Ad = "DialogTitleWarning", [zk, Nd] = Yb(Ad, {
9441
9441
  contentName: Zn,
9442
9442
  titleName: ua,
9443
9443
  docsSlug: "dialog"
9444
9444
  }), pv = ({ titleId: e }) => {
9445
- const t = _d(Nd), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
9445
+ const t = Nd(Ad), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
9446
9446
 
9447
9447
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
9448
9448
 
@@ -9451,14 +9451,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
9451
9451
  e && (document.getElementById(e) || console.error(n));
9452
9452
  }, [n, e]), null;
9453
9453
  }, mv = "DialogDescriptionWarning", gv = ({ contentRef: e, descriptionId: t }) => {
9454
- const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_d(mv).contentName}}.`;
9454
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nd(mv).contentName}}.`;
9455
9455
  return b.useEffect(() => {
9456
9456
  var s;
9457
9457
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
9458
9458
  t && o && (document.getElementById(t) || console.warn(r));
9459
9459
  }, [r, e, t]), null;
9460
- }, jd = bd, Pd = yd, fa = Sd, ha = Cd, Br = Td, Od = Id, xv = Ad;
9461
- const Md = jd, bv = Pd, Dd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9460
+ }, _d = xd, jd = vd, fa = yd, ha = Sd, Br = kd, Pd = Rd, xv = Ed;
9461
+ const Od = _d, bv = jd, Md = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9462
9462
  fa,
9463
9463
  {
9464
9464
  ref: n,
@@ -9469,7 +9469,7 @@ const Md = jd, bv = Pd, Dd = b.forwardRef(({ className: e, ...t }, n) => /* @__P
9469
9469
  ...t
9470
9470
  }
9471
9471
  ));
9472
- Dd.displayName = fa.displayName;
9472
+ Md.displayName = fa.displayName;
9473
9473
  const pa = b.forwardRef(({ className: e, children: t, ...n }, r) => {
9474
9474
  const o = b.useMemo(() => {
9475
9475
  let s = !1;
@@ -9487,7 +9487,7 @@ const pa = b.forwardRef(({ className: e, children: t, ...n }, r) => {
9487
9487
  return i(t), s;
9488
9488
  }, [t]);
9489
9489
  return /* @__PURE__ */ d.jsxs(bv, { children: [
9490
- /* @__PURE__ */ d.jsx(Dd, {}),
9490
+ /* @__PURE__ */ d.jsx(Md, {}),
9491
9491
  /* @__PURE__ */ d.jsxs(
9492
9492
  ha,
9493
9493
  {
@@ -9510,7 +9510,7 @@ const pa = b.forwardRef(({ className: e, children: t, ...n }, r) => {
9510
9510
  ] });
9511
9511
  });
9512
9512
  pa.displayName = ha.displayName;
9513
- const Ld = ({
9513
+ const Dd = ({
9514
9514
  className: e,
9515
9515
  ...t
9516
9516
  }) => /* @__PURE__ */ d.jsx(
@@ -9523,8 +9523,8 @@ const Ld = ({
9523
9523
  ...t
9524
9524
  }
9525
9525
  );
9526
- Ld.displayName = "DialogHeader";
9527
- const $d = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9526
+ Dd.displayName = "DialogHeader";
9527
+ const Ld = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9528
9528
  Br,
9529
9529
  {
9530
9530
  ref: n,
@@ -9535,16 +9535,16 @@ const $d = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9535
9535
  ...t
9536
9536
  }
9537
9537
  ));
9538
- $d.displayName = Br.displayName;
9538
+ Ld.displayName = Br.displayName;
9539
9539
  const wv = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9540
- Od,
9540
+ Pd,
9541
9541
  {
9542
9542
  ref: n,
9543
9543
  className: le("text-sm text-muted-foreground", e),
9544
9544
  ...t
9545
9545
  }
9546
9546
  ));
9547
- wv.displayName = Od.displayName;
9547
+ wv.displayName = Pd.displayName;
9548
9548
  function vv(e, t) {
9549
9549
  return t === "application/octet-stream" && e.toLowerCase().endsWith(".pdf") ? "application/pdf" : t;
9550
9550
  }
@@ -9552,7 +9552,7 @@ function yv({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
9552
9552
  const { chatApi: s } = Tr(), i = s.getAuthToken();
9553
9553
  if (!e || !n) return null;
9554
9554
  const a = `${s.baseUrl}/files/${n}/view?token=${i}`, l = vv(r, o).startsWith("image/");
9555
- return /* @__PURE__ */ d.jsx(Md, { open: e, onOpenChange: t, children: /* @__PURE__ */ d.jsx(pa, { className: "max-w-6xl w-[95vw] h-[90vh] p-0 overflow-hidden border-none bg-background/95 backdrop-blur-md shadow-2xl", children: /* @__PURE__ */ d.jsxs("div", { className: "w-full h-full flex flex-col relative group", children: [
9555
+ return /* @__PURE__ */ d.jsx(Od, { open: e, onOpenChange: t, children: /* @__PURE__ */ d.jsx(pa, { className: "max-w-6xl w-[95vw] h-[90vh] p-0 overflow-hidden border-none bg-background/95 backdrop-blur-md shadow-2xl", children: /* @__PURE__ */ d.jsxs("div", { className: "w-full h-full flex flex-col relative group", children: [
9556
9556
  /* @__PURE__ */ d.jsx("div", { className: "flex-1 min-h-0 w-full h-full bg-background/50 overflow-hidden", children: l ? /* @__PURE__ */ d.jsx("div", { className: "w-full h-full flex items-center justify-center p-8", children: /* @__PURE__ */ d.jsx(
9557
9557
  "img",
9558
9558
  {
@@ -9585,9 +9585,9 @@ function Sv({ artifact: e, showPartialData: t = !1 }) {
9585
9585
  case "in_progress":
9586
9586
  return /* @__PURE__ */ d.jsx(An, { className: "h-4 w-4 animate-spin text-blue-500" });
9587
9587
  case "completed":
9588
- return /* @__PURE__ */ d.jsx(xp, { className: "h-4 w-4 text-green-500" });
9588
+ return /* @__PURE__ */ d.jsx(gp, { className: "h-4 w-4 text-green-500" });
9589
9589
  case "failed":
9590
- return /* @__PURE__ */ d.jsx(gp, { className: "h-4 w-4 text-red-500" });
9590
+ return /* @__PURE__ */ d.jsx(mp, { className: "h-4 w-4 text-red-500" });
9591
9591
  default:
9592
9592
  return null;
9593
9593
  }
@@ -9631,7 +9631,7 @@ const Cv = "prose prose-sm max-w-none break-words dark:prose-invert prose-headin
9631
9631
  function kv({ data: e }) {
9632
9632
  return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ d.jsx("div", { className: Cv, children: /* @__PURE__ */ d.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ d.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ d.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Wr(e) }) : /* @__PURE__ */ d.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Wr(e) });
9633
9633
  }
9634
- function Fd(e, t) {
9634
+ function $d(e, t) {
9635
9635
  return De(() => {
9636
9636
  const n = /* @__PURE__ */ new Map(), r = Ci(e);
9637
9637
  r.length > 0 ? r.forEach((i, a) => {
@@ -9676,7 +9676,7 @@ function Tv({
9676
9676
  message: e,
9677
9677
  allMessages: t
9678
9678
  }) {
9679
- const n = e.name ?? "tool", { steps: r } = Fd(e, t);
9679
+ const n = e.name ?? "tool", { steps: r } = $d(e, t);
9680
9680
  return r.length === 0 ? null : /* @__PURE__ */ d.jsx("div", { className: "space-y-1 py-1", children: r.map((o, s) => {
9681
9681
  const i = o.status === "running", a = o.toolName || n;
9682
9682
  return /* @__PURE__ */ d.jsxs(
@@ -9702,7 +9702,7 @@ function Tv({
9702
9702
  );
9703
9703
  }) });
9704
9704
  }
9705
- const zd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9705
+ const Fd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9706
9706
  "div",
9707
9707
  {
9708
9708
  ref: n,
@@ -9713,8 +9713,8 @@ const zd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9713
9713
  ...t
9714
9714
  }
9715
9715
  ));
9716
- zd.displayName = "Card";
9717
- const Bd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9716
+ Fd.displayName = "Card";
9717
+ const zd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9718
9718
  "div",
9719
9719
  {
9720
9720
  ref: n,
@@ -9722,8 +9722,8 @@ const Bd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9722
9722
  ...t
9723
9723
  }
9724
9724
  ));
9725
- Bd.displayName = "CardHeader";
9726
- const Hd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9725
+ zd.displayName = "CardHeader";
9726
+ const Bd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9727
9727
  "h3",
9728
9728
  {
9729
9729
  ref: n,
@@ -9734,8 +9734,8 @@ const Hd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9734
9734
  ...t
9735
9735
  }
9736
9736
  ));
9737
- Hd.displayName = "CardTitle";
9738
- const Ud = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9737
+ Bd.displayName = "CardTitle";
9738
+ const Hd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9739
9739
  "p",
9740
9740
  {
9741
9741
  ref: n,
@@ -9743,10 +9743,10 @@ const Ud = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9743
9743
  ...t
9744
9744
  }
9745
9745
  ));
9746
- Ud.displayName = "CardDescription";
9746
+ Hd.displayName = "CardDescription";
9747
9747
  const ji = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx("div", { ref: n, className: le("p-6 pt-0", e), ...t }));
9748
9748
  ji.displayName = "CardContent";
9749
- const Wd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9749
+ const Ud = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9750
9750
  "div",
9751
9751
  {
9752
9752
  ref: n,
@@ -9754,9 +9754,9 @@ const Wd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9754
9754
  ...t
9755
9755
  }
9756
9756
  ));
9757
- Wd.displayName = "CardFooter";
9757
+ Ud.displayName = "CardFooter";
9758
9758
  const Rv = (e) => !!e && typeof e == "object" && e.type === "user_choice" && typeof e.question == "string" && Array.isArray(e.alternatives);
9759
- function Vd({
9759
+ function Wd({
9760
9760
  interruptPart: e,
9761
9761
  onApprove: t,
9762
9762
  onReject: n,
@@ -9775,16 +9775,16 @@ function Vd({
9775
9775
  u = /* @__PURE__ */ d.jsx("pre", { className: "max-h-48 overflow-auto rounded bg-blue-100/60 p-2 text-xs text-blue-900/90 dark:bg-blue-900/40 dark:text-blue-100/80", children: f });
9776
9776
  }
9777
9777
  return /* @__PURE__ */ d.jsxs(
9778
- zd,
9778
+ Fd,
9779
9779
  {
9780
9780
  className: le(
9781
9781
  "border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-950/10 transition-shadow",
9782
9782
  s ? "shadow-md ring-1 ring-blue-300 dark:ring-blue-500/70" : "opacity-80"
9783
9783
  ),
9784
9784
  children: [
9785
- /* @__PURE__ */ d.jsxs(Bd, { className: "pb-3", children: [
9786
- /* @__PURE__ */ d.jsx(Hd, { className: "text-blue-900 dark:text-blue-100 text-base", children: c }),
9787
- /* @__PURE__ */ d.jsx(Ud, { className: "text-blue-700 dark:text-blue-300 text-sm", children: l })
9785
+ /* @__PURE__ */ d.jsxs(zd, { className: "pb-3", children: [
9786
+ /* @__PURE__ */ d.jsx(Bd, { className: "text-blue-900 dark:text-blue-100 text-base", children: c }),
9787
+ /* @__PURE__ */ d.jsx(Hd, { className: "text-blue-700 dark:text-blue-300 text-sm", children: l })
9788
9788
  ] }),
9789
9789
  a ? /* @__PURE__ */ d.jsx(ji, { className: "pt-0 pb-3", children: /* @__PURE__ */ d.jsx("div", { className: "space-y-2", children: a.alternatives.map((f) => /* @__PURE__ */ d.jsx(
9790
9790
  Ze,
@@ -9801,7 +9801,7 @@ function Vd({
9801
9801
  },
9802
9802
  f.id
9803
9803
  )) }) }) : u && /* @__PURE__ */ d.jsx(ji, { className: "pt-0 pb-3", children: u }),
9804
- !a && /* @__PURE__ */ d.jsx(Wd, { className: "pt-0", children: /* @__PURE__ */ d.jsxs("div", { className: "flex gap-2 ml-auto", children: [
9804
+ !a && /* @__PURE__ */ d.jsx(Ud, { className: "pt-0", children: /* @__PURE__ */ d.jsxs("div", { className: "flex gap-2 ml-auto", children: [
9805
9805
  /* @__PURE__ */ d.jsx(
9806
9806
  Ze,
9807
9807
  {
@@ -9851,7 +9851,7 @@ function Iv({ className: e }) {
9851
9851
  }
9852
9852
  );
9853
9853
  }
9854
- function Kd() {
9854
+ function Vd() {
9855
9855
  return {
9856
9856
  async: !1,
9857
9857
  baseUrl: null,
@@ -9875,11 +9875,11 @@ function Kd() {
9875
9875
  xhtml: !1
9876
9876
  };
9877
9877
  }
9878
- let rr = Kd();
9878
+ let rr = Vd();
9879
9879
  function Ev(e) {
9880
9880
  rr = e;
9881
9881
  }
9882
- const qd = /[&<>"']/, Av = new RegExp(qd.source, "g"), Gd = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Nv = new RegExp(Gd.source, "g"), _v = {
9882
+ const Kd = /[&<>"']/, Av = new RegExp(Kd.source, "g"), qd = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Nv = new RegExp(qd.source, "g"), _v = {
9883
9883
  "&": "&amp;",
9884
9884
  "<": "&lt;",
9885
9885
  ">": "&gt;",
@@ -9888,14 +9888,14 @@ const qd = /[&<>"']/, Av = new RegExp(qd.source, "g"), Gd = /[<>"']|&(?!(#\d{1,7
9888
9888
  }, Xl = (e) => _v[e];
9889
9889
  function Tt(e, t) {
9890
9890
  if (t) {
9891
- if (qd.test(e))
9891
+ if (Kd.test(e))
9892
9892
  return e.replace(Av, Xl);
9893
- } else if (Gd.test(e))
9893
+ } else if (qd.test(e))
9894
9894
  return e.replace(Nv, Xl);
9895
9895
  return e;
9896
9896
  }
9897
9897
  const jv = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
9898
- function Yd(e) {
9898
+ function Gd(e) {
9899
9899
  return e.replace(jv, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
9900
9900
  }
9901
9901
  const Pv = /(^|[^\[])\^/g;
@@ -9912,7 +9912,7 @@ function Jl(e, t, n) {
9912
9912
  if (e) {
9913
9913
  let r;
9914
9914
  try {
9915
- r = decodeURIComponent(Yd(n)).replace(Ov, "").toLowerCase();
9915
+ r = decodeURIComponent(Gd(n)).replace(Ov, "").toLowerCase();
9916
9916
  } catch {
9917
9917
  return null;
9918
9918
  }
@@ -10946,7 +10946,7 @@ ${t}</tr>
10946
10946
  return t;
10947
10947
  }
10948
10948
  }
10949
- class Xd {
10949
+ class Yd {
10950
10950
  // no need for block level renderers
10951
10951
  strong(t) {
10952
10952
  return t;
@@ -10976,7 +10976,7 @@ class Xd {
10976
10976
  return "";
10977
10977
  }
10978
10978
  }
10979
- class Jd {
10979
+ class Xd {
10980
10980
  constructor() {
10981
10981
  this.seen = {};
10982
10982
  }
@@ -11014,7 +11014,7 @@ class Jd {
11014
11014
  }
11015
11015
  class Pn {
11016
11016
  constructor(t) {
11017
- this.options = t || rr, this.options.renderer = this.options.renderer || new ga(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Xd(), this.slugger = new Jd();
11017
+ this.options = t || rr, this.options.renderer = this.options.renderer || new ga(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Yd(), this.slugger = new Xd();
11018
11018
  }
11019
11019
  /**
11020
11020
  * Static Parse Method
@@ -11050,7 +11050,7 @@ class Pn {
11050
11050
  r += this.renderer.heading(
11051
11051
  this.parseInline(p.tokens),
11052
11052
  p.depth,
11053
- Yd(this.parseInline(p.tokens, this.textRenderer)),
11053
+ Gd(this.parseInline(p.tokens, this.textRenderer)),
11054
11054
  this.slugger
11055
11055
  );
11056
11056
  continue;
@@ -11229,7 +11229,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11229
11229
  throw r;
11230
11230
  };
11231
11231
  }
11232
- function Zd(e, t) {
11232
+ function Jd(e, t) {
11233
11233
  return (n, r, o) => {
11234
11234
  typeof r == "function" && (o = r, r = null);
11235
11235
  const s = { ...r };
@@ -11284,12 +11284,12 @@ function Zd(e, t) {
11284
11284
  };
11285
11285
  }
11286
11286
  function xe(e, t, n) {
11287
- return Zd(jn.lex, Pn.parse)(e, t, n);
11287
+ return Jd(jn.lex, Pn.parse)(e, t, n);
11288
11288
  }
11289
11289
  xe.options = xe.setOptions = function(e) {
11290
11290
  return xe.defaults = { ...xe.defaults, ...e }, Ev(xe.defaults), xe;
11291
11291
  };
11292
- xe.getDefaults = Kd;
11292
+ xe.getDefaults = Vd;
11293
11293
  xe.defaults = rr;
11294
11294
  xe.use = function(...e) {
11295
11295
  const t = xe.defaults.extensions || { renderers: {}, childTokens: {} };
@@ -11382,15 +11382,15 @@ xe.walkTokens = function(e, t) {
11382
11382
  }
11383
11383
  return n;
11384
11384
  };
11385
- xe.parseInline = Zd(jn.lexInline, Pn.parseInline);
11385
+ xe.parseInline = Jd(jn.lexInline, Pn.parseInline);
11386
11386
  xe.Parser = Pn;
11387
11387
  xe.parser = Pn.parse;
11388
11388
  xe.Renderer = ga;
11389
- xe.TextRenderer = Xd;
11389
+ xe.TextRenderer = Yd;
11390
11390
  xe.Lexer = jn;
11391
11391
  xe.lexer = jn.lex;
11392
11392
  xe.Tokenizer = ma;
11393
- xe.Slugger = Jd;
11393
+ xe.Slugger = Xd;
11394
11394
  xe.Hooks = ss;
11395
11395
  xe.parse = xe;
11396
11396
  xe.options;
@@ -11497,10 +11497,10 @@ function Vv({
11497
11497
  className: "h-6 text-xs !text-[hsl(var(--chat-bubble-user-text))]",
11498
11498
  onClick: () => n(!t),
11499
11499
  children: t ? /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
11500
- /* @__PURE__ */ d.jsx(bp, { className: "h-3 w-3 mr-1" }),
11500
+ /* @__PURE__ */ d.jsx(xp, { className: "h-3 w-3 mr-1" }),
11501
11501
  " Show less"
11502
11502
  ] }) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
11503
- /* @__PURE__ */ d.jsx(wp, { className: "h-3 w-3 mr-1" }),
11503
+ /* @__PURE__ */ d.jsx(bp, { className: "h-3 w-3 mr-1" }),
11504
11504
  " Show more (",
11505
11505
  s,
11506
11506
  " chars)"
@@ -11571,7 +11571,7 @@ function qv({
11571
11571
  ), ne = De(
11572
11572
  () => Y.map((_) => _.text ?? "").join(""),
11573
11573
  [Y]
11574
- ), { artifacts: H } = Fd(e, t), $ = De(() => {
11574
+ ), { artifacts: H } = $d(e, t), $ = De(() => {
11575
11575
  if (!p)
11576
11576
  return null;
11577
11577
  const _ = Yv(ne);
@@ -11675,7 +11675,7 @@ function qv({
11675
11675
  }), ae = A ?? (() => {
11676
11676
  });
11677
11677
  return /* @__PURE__ */ d.jsx(
11678
- Vd,
11678
+ Wd,
11679
11679
  {
11680
11680
  interruptPart: l,
11681
11681
  payload: _,
@@ -11839,7 +11839,7 @@ function Qv({
11839
11839
  },
11840
11840
  "aria-label": "Older attempt (back in time)",
11841
11841
  disabled: v >= w - 1,
11842
- children: /* @__PURE__ */ d.jsx(vp, { className: "h-3 w-3" })
11842
+ children: /* @__PURE__ */ d.jsx(wp, { className: "h-3 w-3" })
11843
11843
  }
11844
11844
  ),
11845
11845
  /* @__PURE__ */ d.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ d.jsxs("span", { className: "whitespace-nowrap", children: [
@@ -12100,7 +12100,7 @@ function ay(e) {
12100
12100
  imageParts: n.filter((o) => o.type === "image_url"),
12101
12101
  fileParts: n.filter((o) => o.type === "file"),
12102
12102
  interruptParts: n.filter((o) => o.type === "interrupt"),
12103
- toolRaw: Fg(n),
12103
+ toolRaw: $g(n),
12104
12104
  isToolStreaming: !!r.toolStreaming
12105
12105
  };
12106
12106
  }, [e]);
@@ -12162,7 +12162,7 @@ function uy(e) {
12162
12162
  };
12163
12163
  }, [e]);
12164
12164
  }
12165
- const Qd = fp(function({
12165
+ const Zd = dp(function({
12166
12166
  message: t,
12167
12167
  messageIndex: n,
12168
12168
  allMessages: r,
@@ -12291,11 +12291,11 @@ const Qd = fp(function({
12291
12291
  const Ke = le($ ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", pe);
12292
12292
  switch (q) {
12293
12293
  case "user":
12294
- return /* @__PURE__ */ d.jsx(Sp, { className: Ke });
12294
+ return /* @__PURE__ */ d.jsx(yp, { className: Ke });
12295
12295
  case "assistant":
12296
12296
  return /* @__PURE__ */ d.jsx(Ws, { className: Ke });
12297
12297
  case "tool":
12298
- return /* @__PURE__ */ d.jsx(yp, { className: Ke });
12298
+ return /* @__PURE__ */ d.jsx(vp, { className: Ke });
12299
12299
  case "interrupt":
12300
12300
  return /* @__PURE__ */ d.jsx(Ws, { className: Ke });
12301
12301
  default:
@@ -12384,7 +12384,7 @@ const Qd = fp(function({
12384
12384
  disableInterruptActions: ne,
12385
12385
  renderArtifactsInline: M
12386
12386
  }
12387
- ), St = De(() => zg(t), [t]), Ct = Ve(), yt = q === "user" && (y ?? 1) > 1 && typeof N == "function", Xe = (A == null ? void 0 : A.length) ?? 0, bt = Xe > 0 && T < Xe - 1 ? A[T + 1] : void 0, dt = Xe > 0 && T > 0 ? A[T - 1] : void 0, Pt = re(() => {
12387
+ ), St = De(() => Fg(t), [t]), Ct = Ve(), yt = q === "user" && (y ?? 1) > 1 && typeof N == "function", Xe = (A == null ? void 0 : A.length) ?? 0, bt = Xe > 0 && T < Xe - 1 ? A[T + 1] : void 0, dt = Xe > 0 && T > 0 ? A[T - 1] : void 0, Pt = re(() => {
12388
12388
  !bt || !N || N(bt.id, void 0, !!bt.isLatestAttempt);
12389
12389
  }, [bt, N]), ze = re(() => {
12390
12390
  !dt || !N || N(dt.id, void 0, !!dt.isLatestAttempt);
@@ -12493,7 +12493,7 @@ const Qd = fp(function({
12493
12493
  const i = Ci(e.message), a = Ci(t.message);
12494
12494
  return i.length === a.length;
12495
12495
  });
12496
- Qd.displayName = "MessageComponent";
12496
+ Zd.displayName = "MessageComponent";
12497
12497
  const dy = {
12498
12498
  checkpoints: [],
12499
12499
  checkpointMetaByCheckpointId: /* @__PURE__ */ new Map(),
@@ -12504,7 +12504,7 @@ const dy = {
12504
12504
  getCheckpoint: () => {
12505
12505
  },
12506
12506
  getMessageAttempts: () => []
12507
- }, ef = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, tf = ee.memo(function({
12507
+ }, Qd = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, ef = ee.memo(function({
12508
12508
  message: t,
12509
12509
  index: n,
12510
12510
  allMessages: r,
@@ -12524,7 +12524,7 @@ const dy = {
12524
12524
  toolConfig: w,
12525
12525
  renderArtifactsInline: v = !0
12526
12526
  }) {
12527
- const k = ef(t, n), y = !!t.__syntheticStreaming || o === t.id && t.role === "assistant", T = p ?? dy, N = t.checkpointId ?? null, { attemptCount: A, attemptIndex: M, attempts: D } = De(
12527
+ const k = Qd(t, n), y = !!t.__syntheticStreaming || o === t.id && t.role === "assistant", T = p ?? dy, N = t.checkpointId ?? null, { attemptCount: A, attemptIndex: M, attempts: D } = De(
12528
12528
  () => ax(t.id, N, T),
12529
12529
  [t.id, N, T]
12530
12530
  ), U = g == null ? void 0 : g(t);
@@ -12538,7 +12538,7 @@ const dy = {
12538
12538
  containIntrinsicSize: "auto 120px"
12539
12539
  },
12540
12540
  children: /* @__PURE__ */ d.jsx(
12541
- Qd,
12541
+ Zd,
12542
12542
  {
12543
12543
  message: t,
12544
12544
  messageIndex: n,
@@ -12568,8 +12568,8 @@ const dy = {
12568
12568
  }
12569
12569
  );
12570
12570
  });
12571
- tf.displayName = "MessageRow";
12572
- const fy = Object.freeze({}), nf = ee.forwardRef(({
12571
+ ef.displayName = "MessageRow";
12572
+ const fy = Object.freeze({}), tf = ee.forwardRef(({
12573
12573
  messages: e = [],
12574
12574
  isStreaming: t,
12575
12575
  streamingAssistantId: n,
@@ -12672,7 +12672,7 @@ const fy = Object.freeze({}), nf = ee.forwardRef(({
12672
12672
  const be = E.length - 1;
12673
12673
  (me = (ce = W.current).scrollToIndex) == null || me.call(ce, { index: be, align: "end", behavior: "auto" });
12674
12674
  } else L.current && (L.current.scrollTop = L.current.scrollHeight);
12675
- }, [ae, E.length]), hp(
12675
+ }, [ae, E.length]), fp(
12676
12676
  U,
12677
12677
  () => ({
12678
12678
  scrollToLatest: () => {
@@ -12716,9 +12716,9 @@ const fy = Object.freeze({}), nf = ee.forwardRef(({
12716
12716
  },
12717
12717
  atBottomStateChange: O,
12718
12718
  style: { height: "100%", overscrollBehavior: "contain" },
12719
- computeItemKey: (ce, me) => ef(me, ce),
12719
+ computeItemKey: (ce, me) => Qd(me, ce),
12720
12720
  itemContent: (ce, me) => /* @__PURE__ */ d.jsx(
12721
- tf,
12721
+ ef,
12722
12722
  {
12723
12723
  message: me,
12724
12724
  index: ce,
@@ -12744,8 +12744,8 @@ const fy = Object.freeze({}), nf = ee.forwardRef(({
12744
12744
  }
12745
12745
  ) : te() }) });
12746
12746
  });
12747
- nf.displayName = "MessageList";
12748
- function rf(e) {
12747
+ tf.displayName = "MessageList";
12748
+ function nf(e) {
12749
12749
  const t = e + "CollectionProvider", [n, r] = zn(t), [o, s] = n(
12750
12750
  t,
12751
12751
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -12870,7 +12870,7 @@ function ky(e) {
12870
12870
  ...e
12871
12871
  };
12872
12872
  }
12873
- function of(e) {
12873
+ function rf(e) {
12874
12874
  return typeof e != "number" ? ky(e) : {
12875
12875
  top: e,
12876
12876
  right: e,
@@ -13021,7 +13021,7 @@ async function Xr(e, t) {
13021
13021
  elementContext: f = "floating",
13022
13022
  altBoundary: h = !1,
13023
13023
  padding: p = 0
13024
- } = Rn(t, e), m = of(p), x = a[h ? f === "floating" ? "reference" : "floating" : f], w = ls(await s.getClippingRect({
13024
+ } = Rn(t, e), m = rf(p), x = a[h ? f === "floating" ? "reference" : "floating" : f], w = ls(await s.getClippingRect({
13025
13025
  element: (n = await (s.isElement == null ? void 0 : s.isElement(x))) == null || n ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
13026
13026
  boundary: l,
13027
13027
  rootBoundary: u,
@@ -13068,7 +13068,7 @@ const Ry = (e) => ({
13068
13068
  } = Rn(e, t) || {};
13069
13069
  if (l == null)
13070
13070
  return {};
13071
- const f = of(u), h = {
13071
+ const f = rf(u), h = {
13072
13072
  x: n,
13073
13073
  y: r
13074
13074
  }, p = va(o), m = wa(p), g = await i.getDimensions(l), x = p === "y", w = x ? "top" : "left", v = x ? "bottom" : "right", k = x ? "clientHeight" : "clientWidth", R = s.reference[m] + s.reference[p] - h[p] - s.floating[m], C = h[p] - s.reference[p], y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
@@ -13221,13 +13221,13 @@ const Ey = function(e) {
13221
13221
  }
13222
13222
  }
13223
13223
  };
13224
- }, sf = /* @__PURE__ */ new Set(["left", "top"]);
13224
+ }, of = /* @__PURE__ */ new Set(["left", "top"]);
13225
13225
  async function Ay(e, t) {
13226
13226
  const {
13227
13227
  placement: n,
13228
13228
  platform: r,
13229
13229
  elements: o
13230
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = In(n), a = Er(n), c = gn(n) === "y", l = sf.has(i) ? -1 : 1, u = s && c ? -1 : 1, f = Rn(t, e);
13230
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = In(n), a = Er(n), c = gn(n) === "y", l = of.has(i) ? -1 : 1, u = s && c ? -1 : 1, f = Rn(t, e);
13231
13231
  let {
13232
13232
  mainAxis: h,
13233
13233
  crossAxis: p,
@@ -13360,7 +13360,7 @@ const Ny = function(e) {
13360
13360
  }
13361
13361
  if (l) {
13362
13362
  var w, v;
13363
- const k = h === "y" ? "width" : "height", R = sf.has(In(o)), C = s.reference[f] - s.floating[k] + (R && ((w = i.offset) == null ? void 0 : w[f]) || 0) + (R ? 0 : x.crossAxis), y = s.reference[f] + s.reference[k] + (R ? 0 : ((v = i.offset) == null ? void 0 : v[f]) || 0) - (R ? x.crossAxis : 0);
13363
+ const k = h === "y" ? "width" : "height", R = of.has(In(o)), C = s.reference[f] - s.floating[k] + (R && ((w = i.offset) == null ? void 0 : w[f]) || 0) + (R ? 0 : x.crossAxis), y = s.reference[f] + s.reference[k] + (R ? 0 : ((v = i.offset) == null ? void 0 : v[f]) || 0) - (R ? x.crossAxis : 0);
13364
13364
  m < C ? m = C : m > y && (m = y);
13365
13365
  }
13366
13366
  return {
@@ -13414,7 +13414,7 @@ function Ns() {
13414
13414
  return typeof window < "u";
13415
13415
  }
13416
13416
  function Ar(e) {
13417
- return af(e) ? (e.nodeName || "").toLowerCase() : "#document";
13417
+ return sf(e) ? (e.nodeName || "").toLowerCase() : "#document";
13418
13418
  }
13419
13419
  function Yt(e) {
13420
13420
  var t;
@@ -13422,9 +13422,9 @@ function Yt(e) {
13422
13422
  }
13423
13423
  function yn(e) {
13424
13424
  var t;
13425
- return (t = (af(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
13425
+ return (t = (sf(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
13426
13426
  }
13427
- function af(e) {
13427
+ function sf(e) {
13428
13428
  return Ns() ? e instanceof Node || e instanceof Yt(e).Node : !1;
13429
13429
  }
13430
13430
  function an(e) {
@@ -13507,14 +13507,14 @@ function Mn(e) {
13507
13507
  );
13508
13508
  return cc(t) ? t.host : t;
13509
13509
  }
13510
- function lf(e) {
13510
+ function af(e) {
13511
13511
  const t = Mn(e);
13512
- return wr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : wn(t) && fo(t) ? t : lf(t);
13512
+ return wr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : wn(t) && fo(t) ? t : af(t);
13513
13513
  }
13514
13514
  function Jr(e, t, n) {
13515
13515
  var r;
13516
13516
  t === void 0 && (t = []), n === void 0 && (n = !0);
13517
- const o = lf(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Yt(o);
13517
+ const o = af(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Yt(o);
13518
13518
  if (s) {
13519
13519
  const a = Mi(i);
13520
13520
  return t.concat(i, i.visualViewport || [], fo(o) ? o : [], a && n ? Jr(a) : []);
@@ -13524,7 +13524,7 @@ function Jr(e, t, n) {
13524
13524
  function Mi(e) {
13525
13525
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
13526
13526
  }
13527
- function cf(e) {
13527
+ function lf(e) {
13528
13528
  const t = ln(e);
13529
13529
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
13530
13530
  const o = wn(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = is(n) !== s || is(r) !== i;
@@ -13545,7 +13545,7 @@ function xr(e) {
13545
13545
  width: r,
13546
13546
  height: o,
13547
13547
  $: s
13548
- } = cf(t);
13548
+ } = lf(t);
13549
13549
  let i = (s ? is(n.width) : n.width) / r, a = (s ? is(n.height) : n.height) / o;
13550
13550
  return (!i || !Number.isFinite(i)) && (i = 1), (!a || !Number.isFinite(a)) && (a = 1), {
13551
13551
  x: i,
@@ -13553,7 +13553,7 @@ function xr(e) {
13553
13553
  };
13554
13554
  }
13555
13555
  const Uy = /* @__PURE__ */ xn(0);
13556
- function uf(e) {
13556
+ function cf(e) {
13557
13557
  const t = Yt(e);
13558
13558
  return !Sa() || !t.visualViewport ? Uy : {
13559
13559
  x: t.visualViewport.offsetLeft,
@@ -13568,7 +13568,7 @@ function Qn(e, t, n, r) {
13568
13568
  const o = e.getBoundingClientRect(), s = Ca(e);
13569
13569
  let i = xn(1);
13570
13570
  t && (r ? an(r) && (i = xr(r)) : i = xr(e));
13571
- const a = Wy(s, n, r) ? uf(s) : xn(0);
13571
+ const a = Wy(s, n, r) ? cf(s) : xn(0);
13572
13572
  let c = (o.left + a.x) / i.x, l = (o.top + a.y) / i.y, u = o.width / i.x, f = o.height / i.y;
13573
13573
  if (s) {
13574
13574
  const h = Yt(s), p = r && an(r) ? Yt(r) : r;
@@ -13589,7 +13589,7 @@ function Ps(e, t) {
13589
13589
  const n = js(e).scrollLeft;
13590
13590
  return t ? t.left + n : Qn(yn(e)).left + n;
13591
13591
  }
13592
- function df(e, t) {
13592
+ function uf(e, t) {
13593
13593
  const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - Ps(e, n), o = n.top + t.scrollTop;
13594
13594
  return {
13595
13595
  x: r,
@@ -13615,7 +13615,7 @@ function Vy(e) {
13615
13615
  const p = Qn(r);
13616
13616
  l = xr(r), u.x = p.x + r.clientLeft, u.y = p.y + r.clientTop;
13617
13617
  }
13618
- const h = i && !f && !s ? df(i, c) : xn(0);
13618
+ const h = i && !f && !s ? uf(i, c) : xn(0);
13619
13619
  return {
13620
13620
  width: n.width * l.x,
13621
13621
  height: n.height * l.y,
@@ -13677,7 +13677,7 @@ function dc(e, t, n) {
13677
13677
  else if (an(t))
13678
13678
  r = Xy(t, n);
13679
13679
  else {
13680
- const o = uf(e);
13680
+ const o = cf(e);
13681
13681
  r = {
13682
13682
  x: t.x - o.x,
13683
13683
  y: t.y - o.y,
@@ -13687,9 +13687,9 @@ function dc(e, t, n) {
13687
13687
  }
13688
13688
  return ls(r);
13689
13689
  }
13690
- function ff(e, t) {
13690
+ function df(e, t) {
13691
13691
  const n = Mn(e);
13692
- return n === t || !an(n) || wr(n) ? !1 : ln(n).position === "fixed" || ff(n, t);
13692
+ return n === t || !an(n) || wr(n) ? !1 : ln(n).position === "fixed" || df(n, t);
13693
13693
  }
13694
13694
  function Jy(e, t) {
13695
13695
  const n = t.get(e);
@@ -13700,7 +13700,7 @@ function Jy(e, t) {
13700
13700
  let i = s ? Mn(e) : e;
13701
13701
  for (; an(i) && !wr(i); ) {
13702
13702
  const a = ln(i), c = ya(i);
13703
- !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && Yy.has(o.position) || fo(i) && !c && ff(e, i)) ? r = r.filter((u) => u !== i) : o = a, i = Mn(i);
13703
+ !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && Yy.has(o.position) || fo(i) && !c && df(e, i)) ? r = r.filter((u) => u !== i) : o = a, i = Mn(i);
13704
13704
  }
13705
13705
  return t.set(e, r), r;
13706
13706
  }
@@ -13726,7 +13726,7 @@ function Qy(e) {
13726
13726
  const {
13727
13727
  width: t,
13728
13728
  height: n
13729
- } = cf(e);
13729
+ } = lf(e);
13730
13730
  return {
13731
13731
  width: t,
13732
13732
  height: n
@@ -13748,7 +13748,7 @@ function e0(e, t, n) {
13748
13748
  c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
13749
13749
  } else o && l();
13750
13750
  s && !r && o && l();
13751
- const u = o && !r && !s ? df(o, a) : xn(0), f = i.left + a.scrollLeft - c.x - u.x, h = i.top + a.scrollTop - c.y - u.y;
13751
+ const u = o && !r && !s ? uf(o, a) : xn(0), f = i.left + a.scrollLeft - c.x - u.x, h = i.top + a.scrollTop - c.y - u.y;
13752
13752
  return {
13753
13753
  x: f,
13754
13754
  y: h,
@@ -13767,7 +13767,7 @@ function fc(e, t) {
13767
13767
  let n = e.offsetParent;
13768
13768
  return yn(e) === n && (n = n.ownerDocument.body), n;
13769
13769
  }
13770
- function hf(e, t) {
13770
+ function ff(e, t) {
13771
13771
  const n = Yt(e);
13772
13772
  if (_s(e))
13773
13773
  return n;
@@ -13786,7 +13786,7 @@ function hf(e, t) {
13786
13786
  return r && wr(r) && ci(r) && !ya(r) ? n : r || By(e) || n;
13787
13787
  }
13788
13788
  const t0 = async function(e) {
13789
- const t = this.getOffsetParent || hf, n = this.getDimensions, r = await n(e.floating);
13789
+ const t = this.getOffsetParent || ff, n = this.getDimensions, r = await n(e.floating);
13790
13790
  return {
13791
13791
  reference: e0(e.reference, await t(e.floating), e.strategy),
13792
13792
  floating: {
@@ -13804,7 +13804,7 @@ const r0 = {
13804
13804
  convertOffsetParentRelativeRectToViewportRelativeRect: Vy,
13805
13805
  getDocumentElement: yn,
13806
13806
  getClippingRect: Zy,
13807
- getOffsetParent: hf,
13807
+ getOffsetParent: ff,
13808
13808
  getElementRects: t0,
13809
13809
  getClientRects: Ky,
13810
13810
  getDimensions: Qy,
@@ -13812,7 +13812,7 @@ const r0 = {
13812
13812
  isElement: an,
13813
13813
  isRTL: n0
13814
13814
  };
13815
- function pf(e, t) {
13815
+ function hf(e, t) {
13816
13816
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
13817
13817
  }
13818
13818
  function o0(e, t) {
@@ -13846,7 +13846,7 @@ function o0(e, t) {
13846
13846
  i(!1, 1e-7);
13847
13847
  }, 1e3);
13848
13848
  }
13849
- T === 1 && !pf(l, e.getBoundingClientRect()) && i(), R = !1;
13849
+ T === 1 && !hf(l, e.getBoundingClientRect()) && i(), R = !1;
13850
13850
  }
13851
13851
  try {
13852
13852
  n = new IntersectionObserver(C, {
@@ -13888,7 +13888,7 @@ function s0(e, t, n, r) {
13888
13888
  c && x();
13889
13889
  function x() {
13890
13890
  const w = Qn(e);
13891
- g && !pf(g, w) && n(), g = w, m = requestAnimationFrame(x);
13891
+ g && !hf(g, w) && n(), g = w, m = requestAnimationFrame(x);
13892
13892
  }
13893
13893
  return n(), () => {
13894
13894
  var w;
@@ -13911,7 +13911,7 @@ const i0 = Ny, a0 = _y, l0 = Iy, c0 = Py, u0 = Ey, hc = Ry, d0 = jy, f0 = (e, t,
13911
13911
  });
13912
13912
  };
13913
13913
  var h0 = typeof document < "u", p0 = function() {
13914
- }, Ko = h0 ? pp : p0;
13914
+ }, Ko = h0 ? hp : p0;
13915
13915
  function cs(e, t) {
13916
13916
  if (e === t)
13917
13917
  return !0;
@@ -13942,11 +13942,11 @@ function cs(e, t) {
13942
13942
  }
13943
13943
  return e !== e && t !== t;
13944
13944
  }
13945
- function mf(e) {
13945
+ function pf(e) {
13946
13946
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
13947
13947
  }
13948
13948
  function pc(e, t) {
13949
- const n = mf(e);
13949
+ const n = pf(e);
13950
13950
  return Math.round(t * n) / n;
13951
13951
  }
13952
13952
  function ui(e) {
@@ -14040,7 +14040,7 @@ function m0(e) {
14040
14040
  return a ? {
14041
14041
  ...H,
14042
14042
  transform: "translate(" + $ + "px, " + q + "px)",
14043
- ...mf(Y.floating) >= 1.5 && {
14043
+ ...pf(Y.floating) >= 1.5 && {
14044
14044
  willChange: "transform"
14045
14045
  }
14046
14046
  } : {
@@ -14100,7 +14100,7 @@ const g0 = (e) => {
14100
14100
  ...g0(e),
14101
14101
  options: [e, t]
14102
14102
  });
14103
- var k0 = "Arrow", gf = b.forwardRef((e, t) => {
14103
+ var k0 = "Arrow", mf = b.forwardRef((e, t) => {
14104
14104
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
14105
14105
  return /* @__PURE__ */ d.jsx(
14106
14106
  Oe.svg,
@@ -14115,8 +14115,8 @@ var k0 = "Arrow", gf = b.forwardRef((e, t) => {
14115
14115
  }
14116
14116
  );
14117
14117
  });
14118
- gf.displayName = k0;
14119
- var T0 = gf;
14118
+ mf.displayName = k0;
14119
+ var T0 = mf;
14120
14120
  function R0(e) {
14121
14121
  const [t, n] = b.useState(void 0);
14122
14122
  return bn(() => {
@@ -14139,22 +14139,22 @@ function R0(e) {
14139
14139
  n(void 0);
14140
14140
  }, [e]), t;
14141
14141
  }
14142
- var ka = "Popper", [xf, bf] = zn(ka), [I0, wf] = xf(ka), vf = (e) => {
14142
+ var ka = "Popper", [gf, xf] = zn(ka), [I0, bf] = gf(ka), wf = (e) => {
14143
14143
  const { __scopePopper: t, children: n } = e, [r, o] = b.useState(null);
14144
14144
  return /* @__PURE__ */ d.jsx(I0, { scope: t, anchor: r, onAnchorChange: o, children: n });
14145
14145
  };
14146
- vf.displayName = ka;
14147
- var yf = "PopperAnchor", Sf = b.forwardRef(
14146
+ wf.displayName = ka;
14147
+ var vf = "PopperAnchor", yf = b.forwardRef(
14148
14148
  (e, t) => {
14149
- const { __scopePopper: n, virtualRef: r, ...o } = e, s = wf(yf, n), i = b.useRef(null), a = st(t, i), c = b.useRef(null);
14149
+ const { __scopePopper: n, virtualRef: r, ...o } = e, s = bf(vf, n), i = b.useRef(null), a = st(t, i), c = b.useRef(null);
14150
14150
  return b.useEffect(() => {
14151
14151
  const l = c.current;
14152
14152
  c.current = (r == null ? void 0 : r.current) || i.current, l !== c.current && s.onAnchorChange(c.current);
14153
14153
  }), r ? null : /* @__PURE__ */ d.jsx(Oe.div, { ...o, ref: a });
14154
14154
  }
14155
14155
  );
14156
- Sf.displayName = yf;
14157
- var Ta = "PopperContent", [E0, A0] = xf(Ta), Cf = b.forwardRef(
14156
+ yf.displayName = vf;
14157
+ var Ta = "PopperContent", [E0, A0] = gf(Ta), Sf = b.forwardRef(
14158
14158
  (e, t) => {
14159
14159
  var X, _, V, te, ae, pe;
14160
14160
  const {
@@ -14172,7 +14172,7 @@ var Ta = "PopperContent", [E0, A0] = xf(Ta), Cf = b.forwardRef(
14172
14172
  updatePositionStrategy: p = "optimized",
14173
14173
  onPlaced: m,
14174
14174
  ...g
14175
- } = e, x = wf(Ta, n), [w, v] = b.useState(null), k = st(t, (ce) => v(ce)), [R, C] = b.useState(null), y = R0(R), T = (y == null ? void 0 : y.width) ?? 0, N = (y == null ? void 0 : y.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), M = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, D = Array.isArray(l) ? l : [l], U = D.length > 0, W = {
14175
+ } = e, x = bf(Ta, n), [w, v] = b.useState(null), k = st(t, (ce) => v(ce)), [R, C] = b.useState(null), y = R0(R), T = (y == null ? void 0 : y.width) ?? 0, N = (y == null ? void 0 : y.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), M = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, D = Array.isArray(l) ? l : [l], U = D.length > 0, W = {
14176
14176
  padding: M,
14177
14177
  boundary: D.filter(_0),
14178
14178
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -14207,7 +14207,7 @@ var Ta = "PopperContent", [E0, A0] = xf(Ta), Cf = b.forwardRef(
14207
14207
  j0({ arrowWidth: T, arrowHeight: N }),
14208
14208
  h && S0({ strategy: "referenceHidden", ...W })
14209
14209
  ]
14210
- }), [$, q] = Rf(Y), z = Et(m);
14210
+ }), [$, q] = Tf(Y), z = Et(m);
14211
14211
  bn(() => {
14212
14212
  ne && (z == null || z());
14213
14213
  }, [ne, z]);
@@ -14268,14 +14268,14 @@ var Ta = "PopperContent", [E0, A0] = xf(Ta), Cf = b.forwardRef(
14268
14268
  );
14269
14269
  }
14270
14270
  );
14271
- Cf.displayName = Ta;
14272
- var kf = "PopperArrow", N0 = {
14271
+ Sf.displayName = Ta;
14272
+ var Cf = "PopperArrow", N0 = {
14273
14273
  top: "bottom",
14274
14274
  right: "left",
14275
14275
  bottom: "top",
14276
14276
  left: "right"
14277
- }, Tf = b.forwardRef(function(t, n) {
14278
- const { __scopePopper: r, ...o } = t, s = A0(kf, r), i = N0[s.placedSide];
14277
+ }, kf = b.forwardRef(function(t, n) {
14278
+ const { __scopePopper: r, ...o } = t, s = A0(Cf, r), i = N0[s.placedSide];
14279
14279
  return (
14280
14280
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
14281
14281
  // doesn't report size as we'd expect on SVG elements.
@@ -14319,7 +14319,7 @@ var kf = "PopperArrow", N0 = {
14319
14319
  )
14320
14320
  );
14321
14321
  });
14322
- Tf.displayName = kf;
14322
+ kf.displayName = Cf;
14323
14323
  function _0(e) {
14324
14324
  return e !== null;
14325
14325
  }
@@ -14328,22 +14328,22 @@ var j0 = (e) => ({
14328
14328
  options: e,
14329
14329
  fn(t) {
14330
14330
  var x, w, v;
14331
- const { placement: n, rects: r, middlewareData: o } = t, i = ((x = o.arrow) == null ? void 0 : x.centerOffset) !== 0, a = i ? 0 : e.arrowWidth, c = i ? 0 : e.arrowHeight, [l, u] = Rf(n), f = { start: "0%", center: "50%", end: "100%" }[u], h = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + a / 2, p = (((v = o.arrow) == null ? void 0 : v.y) ?? 0) + c / 2;
14331
+ const { placement: n, rects: r, middlewareData: o } = t, i = ((x = o.arrow) == null ? void 0 : x.centerOffset) !== 0, a = i ? 0 : e.arrowWidth, c = i ? 0 : e.arrowHeight, [l, u] = Tf(n), f = { start: "0%", center: "50%", end: "100%" }[u], h = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + a / 2, p = (((v = o.arrow) == null ? void 0 : v.y) ?? 0) + c / 2;
14332
14332
  let m = "", g = "";
14333
14333
  return l === "bottom" ? (m = i ? f : `${h}px`, g = `${-c}px`) : l === "top" ? (m = i ? f : `${h}px`, g = `${r.floating.height + c}px`) : l === "right" ? (m = `${-c}px`, g = i ? f : `${p}px`) : l === "left" && (m = `${r.floating.width + c}px`, g = i ? f : `${p}px`), { data: { x: m, y: g } };
14334
14334
  }
14335
14335
  });
14336
- function Rf(e) {
14336
+ function Tf(e) {
14337
14337
  const [t, n = "center"] = e.split("-");
14338
14338
  return [t, n];
14339
14339
  }
14340
- var P0 = vf, O0 = Sf, M0 = Cf, D0 = Tf, di = "rovingFocusGroup.onEntryFocus", L0 = { bubbles: !1, cancelable: !0 }, ho = "RovingFocusGroup", [Di, If, $0] = rf(ho), [F0, Ef] = zn(
14340
+ var P0 = wf, O0 = yf, M0 = Sf, D0 = kf, di = "rovingFocusGroup.onEntryFocus", L0 = { bubbles: !1, cancelable: !0 }, ho = "RovingFocusGroup", [Di, Rf, $0] = nf(ho), [F0, If] = zn(
14341
14341
  ho,
14342
14342
  [$0]
14343
- ), [z0, B0] = F0(ho), Af = b.forwardRef(
14343
+ ), [z0, B0] = F0(ho), Ef = b.forwardRef(
14344
14344
  (e, t) => /* @__PURE__ */ d.jsx(Di.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(Di.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(H0, { ...e, ref: t }) }) })
14345
14345
  );
14346
- Af.displayName = ho;
14346
+ Ef.displayName = ho;
14347
14347
  var H0 = b.forwardRef((e, t) => {
14348
14348
  const {
14349
14349
  __scopeRovingFocusGroup: n,
@@ -14361,7 +14361,7 @@ var H0 = b.forwardRef((e, t) => {
14361
14361
  defaultProp: a ?? null,
14362
14362
  onChange: c,
14363
14363
  caller: ho
14364
- }), [w, v] = b.useState(!1), k = Et(l), R = If(n), C = b.useRef(!1), [y, T] = b.useState(0);
14364
+ }), [w, v] = b.useState(!1), k = Et(l), R = Rf(n), C = b.useRef(!1), [y, T] = b.useState(0);
14365
14365
  return b.useEffect(() => {
14366
14366
  const N = h.current;
14367
14367
  if (N)
@@ -14406,7 +14406,7 @@ var H0 = b.forwardRef((e, t) => {
14406
14406
  const D = R().filter((Y) => Y.focusable), U = D.find((Y) => Y.active), W = D.find((Y) => Y.id === g), J = [U, W, ...D].filter(
14407
14407
  Boolean
14408
14408
  ).map((Y) => Y.ref.current);
14409
- jf(J, u);
14409
+ _f(J, u);
14410
14410
  }
14411
14411
  }
14412
14412
  C.current = !1;
@@ -14416,7 +14416,7 @@ var H0 = b.forwardRef((e, t) => {
14416
14416
  )
14417
14417
  }
14418
14418
  );
14419
- }), Nf = "RovingFocusGroupItem", _f = b.forwardRef(
14419
+ }), Af = "RovingFocusGroupItem", Nf = b.forwardRef(
14420
14420
  (e, t) => {
14421
14421
  const {
14422
14422
  __scopeRovingFocusGroup: n,
@@ -14425,7 +14425,7 @@ var H0 = b.forwardRef((e, t) => {
14425
14425
  tabStopId: s,
14426
14426
  children: i,
14427
14427
  ...a
14428
- } = e, c = Gt(), l = s || c, u = B0(Nf, n), f = u.currentTabStopId === l, h = If(n), { onFocusableItemAdd: p, onFocusableItemRemove: m, currentTabStopId: g } = u;
14428
+ } = e, c = Gt(), l = s || c, u = B0(Af, n), f = u.currentTabStopId === l, h = Rf(n), { onFocusableItemAdd: p, onFocusableItemRemove: m, currentTabStopId: g } = u;
14429
14429
  return b.useEffect(() => {
14430
14430
  if (r)
14431
14431
  return p(), () => m();
@@ -14464,7 +14464,7 @@ var H0 = b.forwardRef((e, t) => {
14464
14464
  const R = k.indexOf(x.currentTarget);
14465
14465
  k = u.loop ? K0(k, R + 1) : k.slice(R + 1);
14466
14466
  }
14467
- setTimeout(() => jf(k));
14467
+ setTimeout(() => _f(k));
14468
14468
  }
14469
14469
  }),
14470
14470
  children: typeof i == "function" ? i({ isCurrentTabStop: f, hasTabStop: g != null }) : i
@@ -14474,7 +14474,7 @@ var H0 = b.forwardRef((e, t) => {
14474
14474
  );
14475
14475
  }
14476
14476
  );
14477
- _f.displayName = Nf;
14477
+ Nf.displayName = Af;
14478
14478
  var U0 = {
14479
14479
  ArrowLeft: "prev",
14480
14480
  ArrowUp: "prev",
@@ -14493,7 +14493,7 @@ function V0(e, t, n) {
14493
14493
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
14494
14494
  return U0[r];
14495
14495
  }
14496
- function jf(e, t = !1) {
14496
+ function _f(e, t = !1) {
14497
14497
  const n = document.activeElement;
14498
14498
  for (const r of e)
14499
14499
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
@@ -14501,17 +14501,17 @@ function jf(e, t = !1) {
14501
14501
  function K0(e, t) {
14502
14502
  return e.map((n, r) => e[(t + r) % e.length]);
14503
14503
  }
14504
- var q0 = Af, G0 = _f, Li = ["Enter", " "], Y0 = ["ArrowDown", "PageUp", "Home"], Pf = ["ArrowUp", "PageDown", "End"], X0 = [...Y0, ...Pf], J0 = {
14504
+ var q0 = Ef, G0 = Nf, Li = ["Enter", " "], Y0 = ["ArrowDown", "PageUp", "Home"], jf = ["ArrowUp", "PageDown", "End"], X0 = [...Y0, ...jf], J0 = {
14505
14505
  ltr: [...Li, "ArrowRight"],
14506
14506
  rtl: [...Li, "ArrowLeft"]
14507
14507
  }, Z0 = {
14508
14508
  ltr: ["ArrowLeft"],
14509
14509
  rtl: ["ArrowRight"]
14510
- }, po = "Menu", [Zr, Q0, eS] = rf(po), [or, Of] = zn(po, [
14510
+ }, po = "Menu", [Zr, Q0, eS] = nf(po), [or, Pf] = zn(po, [
14511
14511
  eS,
14512
- bf,
14513
- Ef
14514
- ]), Os = bf(), Mf = Ef(), [tS, sr] = or(po), [nS, mo] = or(po), Df = (e) => {
14512
+ xf,
14513
+ If
14514
+ ]), Os = xf(), Of = If(), [tS, sr] = or(po), [nS, mo] = or(po), Mf = (e) => {
14515
14515
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Os(t), [c, l] = b.useState(null), u = b.useRef(!1), f = Et(s), h = xa(o);
14516
14516
  return b.useEffect(() => {
14517
14517
  const p = () => {
@@ -14542,7 +14542,7 @@ var q0 = Af, G0 = _f, Li = ["Enter", " "], Y0 = ["ArrowDown", "PageUp", "Home"],
14542
14542
  }
14543
14543
  ) });
14544
14544
  };
14545
- Df.displayName = po;
14545
+ Mf.displayName = po;
14546
14546
  var rS = "MenuAnchor", Ra = b.forwardRef(
14547
14547
  (e, t) => {
14548
14548
  const { __scopeMenu: n, ...r } = e, o = Os(n);
@@ -14550,16 +14550,16 @@ var rS = "MenuAnchor", Ra = b.forwardRef(
14550
14550
  }
14551
14551
  );
14552
14552
  Ra.displayName = rS;
14553
- var Ia = "MenuPortal", [oS, Lf] = or(Ia, {
14553
+ var Ia = "MenuPortal", [oS, Df] = or(Ia, {
14554
14554
  forceMount: void 0
14555
- }), $f = (e) => {
14555
+ }), Lf = (e) => {
14556
14556
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = sr(Ia, t);
14557
14557
  return /* @__PURE__ */ d.jsx(oS, { scope: t, forceMount: n, children: /* @__PURE__ */ d.jsx(Xt, { present: n || s.open, children: /* @__PURE__ */ d.jsx(aa, { asChild: !0, container: o, children: r }) }) });
14558
14558
  };
14559
- $f.displayName = Ia;
14560
- var en = "MenuContent", [sS, Ea] = or(en), Ff = b.forwardRef(
14559
+ Lf.displayName = Ia;
14560
+ var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14561
14561
  (e, t) => {
14562
- const n = Lf(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = sr(en, e.__scopeMenu), i = mo(en, e.__scopeMenu);
14562
+ const n = Df(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = sr(en, e.__scopeMenu), i = mo(en, e.__scopeMenu);
14563
14563
  return /* @__PURE__ */ d.jsx(Zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(Xt, { present: r || s.open, children: /* @__PURE__ */ d.jsx(Zr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ d.jsx(iS, { ...o, ref: t }) : /* @__PURE__ */ d.jsx(aS, { ...o, ref: t }) }) }) });
14564
14564
  }
14565
14565
  ), iS = b.forwardRef(
@@ -14567,7 +14567,7 @@ var en = "MenuContent", [sS, Ea] = or(en), Ff = b.forwardRef(
14567
14567
  const n = sr(en, e.__scopeMenu), r = b.useRef(null), o = st(t, r);
14568
14568
  return b.useEffect(() => {
14569
14569
  const s = r.current;
14570
- if (s) return gd(s);
14570
+ if (s) return md(s);
14571
14571
  }, []), /* @__PURE__ */ d.jsx(
14572
14572
  Aa,
14573
14573
  {
@@ -14615,14 +14615,14 @@ var en = "MenuContent", [sS, Ea] = or(en), Ff = b.forwardRef(
14615
14615
  onDismiss: p,
14616
14616
  disableOutsideScroll: m,
14617
14617
  ...g
14618
- } = e, x = sr(en, n), w = mo(en, n), v = Os(n), k = Mf(n), R = Q0(n), [C, y] = b.useState(null), T = b.useRef(null), N = st(t, T, x.onContentChange), A = b.useRef(0), M = b.useRef(""), D = b.useRef(0), U = b.useRef(null), W = b.useRef("right"), L = b.useRef(0), J = m ? la : b.Fragment, Y = m ? { as: lS, allowPinchZoom: !0 } : void 0, ne = ($) => {
14618
+ } = e, x = sr(en, n), w = mo(en, n), v = Os(n), k = Of(n), R = Q0(n), [C, y] = b.useState(null), T = b.useRef(null), N = st(t, T, x.onContentChange), A = b.useRef(0), M = b.useRef(""), D = b.useRef(0), U = b.useRef(null), W = b.useRef("right"), L = b.useRef(0), J = m ? la : b.Fragment, Y = m ? { as: lS, allowPinchZoom: !0 } : void 0, ne = ($) => {
14619
14619
  var X, _;
14620
14620
  const q = M.current + $, z = R().filter((V) => !V.disabled), I = document.activeElement, E = (X = z.find((V) => V.ref.current === I)) == null ? void 0 : X.textValue, P = z.map((V) => V.textValue), O = vS(P, q, E), K = (_ = z.find((V) => V.textValue === O)) == null ? void 0 : _.ref.current;
14621
14621
  (function V(te) {
14622
14622
  M.current = te, window.clearTimeout(A.current), te !== "" && (A.current = window.setTimeout(() => V(""), 1e3));
14623
14623
  })(q), K && setTimeout(() => K.focus());
14624
14624
  };
14625
- b.useEffect(() => () => window.clearTimeout(A.current), []), ad();
14625
+ b.useEffect(() => () => window.clearTimeout(A.current), []), id();
14626
14626
  const H = b.useCallback(($) => {
14627
14627
  var z, I;
14628
14628
  return W.current === ((z = U.current) == null ? void 0 : z.side) && SS($, (I = U.current) == null ? void 0 : I.area);
@@ -14694,7 +14694,7 @@ var en = "MenuContent", [sS, Ea] = or(en), Ff = b.forwardRef(
14694
14694
  {
14695
14695
  role: "menu",
14696
14696
  "aria-orientation": "vertical",
14697
- "data-state": th(x.open),
14697
+ "data-state": eh(x.open),
14698
14698
  "data-radix-menu-content": "",
14699
14699
  dir: w.dir,
14700
14700
  ...v,
@@ -14708,7 +14708,7 @@ var en = "MenuContent", [sS, Ea] = or(en), Ff = b.forwardRef(
14708
14708
  if ($.target !== P || !X0.includes($.key)) return;
14709
14709
  $.preventDefault();
14710
14710
  const K = R().filter((X) => !X.disabled).map((X) => X.ref.current);
14711
- Pf.includes($.key) && K.reverse(), bS(K);
14711
+ jf.includes($.key) && K.reverse(), bS(K);
14712
14712
  }),
14713
14713
  onBlur: Ce(e.onBlur, ($) => {
14714
14714
  $.currentTarget.contains($.target) || (window.clearTimeout(A.current), M.current = "");
@@ -14735,7 +14735,7 @@ var en = "MenuContent", [sS, Ea] = or(en), Ff = b.forwardRef(
14735
14735
  );
14736
14736
  }
14737
14737
  );
14738
- Ff.displayName = en;
14738
+ $f.displayName = en;
14739
14739
  var cS = "MenuGroup", Na = b.forwardRef(
14740
14740
  (e, t) => {
14741
14741
  const { __scopeMenu: n, ...r } = e;
@@ -14743,24 +14743,24 @@ var cS = "MenuGroup", Na = b.forwardRef(
14743
14743
  }
14744
14744
  );
14745
14745
  Na.displayName = cS;
14746
- var uS = "MenuLabel", zf = b.forwardRef(
14746
+ var uS = "MenuLabel", Ff = b.forwardRef(
14747
14747
  (e, t) => {
14748
14748
  const { __scopeMenu: n, ...r } = e;
14749
14749
  return /* @__PURE__ */ d.jsx(Oe.div, { ...r, ref: t });
14750
14750
  }
14751
14751
  );
14752
- zf.displayName = uS;
14752
+ Ff.displayName = uS;
14753
14753
  var us = "MenuItem", mc = "menu.itemSelect", Ms = b.forwardRef(
14754
14754
  (e, t) => {
14755
14755
  const { disabled: n = !1, onSelect: r, ...o } = e, s = b.useRef(null), i = mo(us, e.__scopeMenu), a = Ea(us, e.__scopeMenu), c = st(t, s), l = b.useRef(!1), u = () => {
14756
14756
  const f = s.current;
14757
14757
  if (!n && f) {
14758
14758
  const h = new CustomEvent(mc, { bubbles: !0, cancelable: !0 });
14759
- f.addEventListener(mc, (p) => r == null ? void 0 : r(p), { once: !0 }), rd(f, h), h.defaultPrevented ? l.current = !1 : i.onClose();
14759
+ f.addEventListener(mc, (p) => r == null ? void 0 : r(p), { once: !0 }), nd(f, h), h.defaultPrevented ? l.current = !1 : i.onClose();
14760
14760
  }
14761
14761
  };
14762
14762
  return /* @__PURE__ */ d.jsx(
14763
- Bf,
14763
+ zf,
14764
14764
  {
14765
14765
  ...o,
14766
14766
  ref: c,
@@ -14783,9 +14783,9 @@ var us = "MenuItem", mc = "menu.itemSelect", Ms = b.forwardRef(
14783
14783
  }
14784
14784
  );
14785
14785
  Ms.displayName = us;
14786
- var Bf = b.forwardRef(
14786
+ var zf = b.forwardRef(
14787
14787
  (e, t) => {
14788
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Ea(us, n), a = Mf(n), c = b.useRef(null), l = st(t, c), [u, f] = b.useState(!1), [h, p] = b.useState("");
14788
+ const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Ea(us, n), a = Of(n), c = b.useRef(null), l = st(t, c), [u, f] = b.useState(!1), [h, p] = b.useState("");
14789
14789
  return b.useEffect(() => {
14790
14790
  const m = c.current;
14791
14791
  m && p((m.textContent ?? "").trim());
@@ -14821,10 +14821,10 @@ var Bf = b.forwardRef(
14821
14821
  }
14822
14822
  );
14823
14823
  }
14824
- ), dS = "MenuCheckboxItem", Hf = b.forwardRef(
14824
+ ), dS = "MenuCheckboxItem", Bf = b.forwardRef(
14825
14825
  (e, t) => {
14826
14826
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
14827
- return /* @__PURE__ */ d.jsx(qf, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ d.jsx(
14827
+ return /* @__PURE__ */ d.jsx(Kf, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ d.jsx(
14828
14828
  Ms,
14829
14829
  {
14830
14830
  role: "menuitemcheckbox",
@@ -14841,22 +14841,22 @@ var Bf = b.forwardRef(
14841
14841
  ) });
14842
14842
  }
14843
14843
  );
14844
- Hf.displayName = dS;
14845
- var Uf = "MenuRadioGroup", [fS, hS] = or(
14846
- Uf,
14844
+ Bf.displayName = dS;
14845
+ var Hf = "MenuRadioGroup", [fS, hS] = or(
14846
+ Hf,
14847
14847
  { value: void 0, onValueChange: () => {
14848
14848
  } }
14849
- ), Wf = b.forwardRef(
14849
+ ), Uf = b.forwardRef(
14850
14850
  (e, t) => {
14851
14851
  const { value: n, onValueChange: r, ...o } = e, s = Et(r);
14852
14852
  return /* @__PURE__ */ d.jsx(fS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ d.jsx(Na, { ...o, ref: t }) });
14853
14853
  }
14854
14854
  );
14855
- Wf.displayName = Uf;
14856
- var Vf = "MenuRadioItem", Kf = b.forwardRef(
14855
+ Uf.displayName = Hf;
14856
+ var Wf = "MenuRadioItem", Vf = b.forwardRef(
14857
14857
  (e, t) => {
14858
- const { value: n, ...r } = e, o = hS(Vf, e.__scopeMenu), s = n === o.value;
14859
- return /* @__PURE__ */ d.jsx(qf, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ d.jsx(
14858
+ const { value: n, ...r } = e, o = hS(Wf, e.__scopeMenu), s = n === o.value;
14859
+ return /* @__PURE__ */ d.jsx(Kf, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ d.jsx(
14860
14860
  Ms,
14861
14861
  {
14862
14862
  role: "menuitemradio",
@@ -14876,11 +14876,11 @@ var Vf = "MenuRadioItem", Kf = b.forwardRef(
14876
14876
  ) });
14877
14877
  }
14878
14878
  );
14879
- Kf.displayName = Vf;
14880
- var _a = "MenuItemIndicator", [qf, pS] = or(
14879
+ Vf.displayName = Wf;
14880
+ var _a = "MenuItemIndicator", [Kf, pS] = or(
14881
14881
  _a,
14882
14882
  { checked: !1 }
14883
- ), Gf = b.forwardRef(
14883
+ ), qf = b.forwardRef(
14884
14884
  (e, t) => {
14885
14885
  const { __scopeMenu: n, forceMount: r, ...o } = e, s = pS(_a, n);
14886
14886
  return /* @__PURE__ */ d.jsx(
@@ -14899,8 +14899,8 @@ var _a = "MenuItemIndicator", [qf, pS] = or(
14899
14899
  );
14900
14900
  }
14901
14901
  );
14902
- Gf.displayName = _a;
14903
- var mS = "MenuSeparator", Yf = b.forwardRef(
14902
+ qf.displayName = _a;
14903
+ var mS = "MenuSeparator", Gf = b.forwardRef(
14904
14904
  (e, t) => {
14905
14905
  const { __scopeMenu: n, ...r } = e;
14906
14906
  return /* @__PURE__ */ d.jsx(
@@ -14914,17 +14914,17 @@ var mS = "MenuSeparator", Yf = b.forwardRef(
14914
14914
  );
14915
14915
  }
14916
14916
  );
14917
- Yf.displayName = mS;
14918
- var gS = "MenuArrow", Xf = b.forwardRef(
14917
+ Gf.displayName = mS;
14918
+ var gS = "MenuArrow", Yf = b.forwardRef(
14919
14919
  (e, t) => {
14920
14920
  const { __scopeMenu: n, ...r } = e, o = Os(n);
14921
14921
  return /* @__PURE__ */ d.jsx(D0, { ...o, ...r, ref: t });
14922
14922
  }
14923
14923
  );
14924
- Xf.displayName = gS;
14925
- var xS = "MenuSub", [Bk, Jf] = or(xS), Lr = "MenuSubTrigger", Zf = b.forwardRef(
14924
+ Yf.displayName = gS;
14925
+ var xS = "MenuSub", [Bk, Xf] = or(xS), Lr = "MenuSubTrigger", Jf = b.forwardRef(
14926
14926
  (e, t) => {
14927
- const n = sr(Lr, e.__scopeMenu), r = mo(Lr, e.__scopeMenu), o = Jf(Lr, e.__scopeMenu), s = Ea(Lr, e.__scopeMenu), i = b.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: c } = s, l = { __scopeMenu: e.__scopeMenu }, u = b.useCallback(() => {
14927
+ const n = sr(Lr, e.__scopeMenu), r = mo(Lr, e.__scopeMenu), o = Xf(Lr, e.__scopeMenu), s = Ea(Lr, e.__scopeMenu), i = b.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: c } = s, l = { __scopeMenu: e.__scopeMenu }, u = b.useCallback(() => {
14928
14928
  i.current && window.clearTimeout(i.current), i.current = null;
14929
14929
  }, []);
14930
14930
  return b.useEffect(() => u, [u]), b.useEffect(() => {
@@ -14933,13 +14933,13 @@ var xS = "MenuSub", [Bk, Jf] = or(xS), Lr = "MenuSubTrigger", Zf = b.forwardRef(
14933
14933
  window.clearTimeout(f), c(null);
14934
14934
  };
14935
14935
  }, [a, c]), /* @__PURE__ */ d.jsx(Ra, { asChild: !0, ...l, children: /* @__PURE__ */ d.jsx(
14936
- Bf,
14936
+ zf,
14937
14937
  {
14938
14938
  id: o.triggerId,
14939
14939
  "aria-haspopup": "menu",
14940
14940
  "aria-expanded": n.open,
14941
14941
  "aria-controls": o.contentId,
14942
- "data-state": th(n.open),
14942
+ "data-state": eh(n.open),
14943
14943
  ...e,
14944
14944
  ref: _n(t, o.onTriggerChange),
14945
14945
  onClick: (f) => {
@@ -14992,10 +14992,10 @@ var xS = "MenuSub", [Bk, Jf] = or(xS), Lr = "MenuSubTrigger", Zf = b.forwardRef(
14992
14992
  ) });
14993
14993
  }
14994
14994
  );
14995
- Zf.displayName = Lr;
14996
- var Qf = "MenuSubContent", eh = b.forwardRef(
14995
+ Jf.displayName = Lr;
14996
+ var Zf = "MenuSubContent", Qf = b.forwardRef(
14997
14997
  (e, t) => {
14998
- const n = Lf(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = sr(en, e.__scopeMenu), i = mo(en, e.__scopeMenu), a = Jf(Qf, e.__scopeMenu), c = b.useRef(null), l = st(t, c);
14998
+ const n = Df(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = sr(en, e.__scopeMenu), i = mo(en, e.__scopeMenu), a = Xf(Zf, e.__scopeMenu), c = b.useRef(null), l = st(t, c);
14999
14999
  return /* @__PURE__ */ d.jsx(Zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(Xt, { present: r || s.open, children: /* @__PURE__ */ d.jsx(Zr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(
15000
15000
  Aa,
15001
15001
  {
@@ -15028,8 +15028,8 @@ var Qf = "MenuSubContent", eh = b.forwardRef(
15028
15028
  ) }) }) });
15029
15029
  }
15030
15030
  );
15031
- eh.displayName = Qf;
15032
- function th(e) {
15031
+ Qf.displayName = Zf;
15032
+ function eh(e) {
15033
15033
  return e ? "open" : "closed";
15034
15034
  }
15035
15035
  function ds(e) {
@@ -15072,10 +15072,10 @@ function SS(e, t) {
15072
15072
  function Qr(e) {
15073
15073
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
15074
15074
  }
15075
- var CS = Df, kS = Ra, TS = $f, RS = Ff, IS = Na, ES = zf, AS = Ms, NS = Hf, _S = Wf, jS = Kf, PS = Gf, OS = Yf, MS = Xf, DS = Zf, LS = eh, Ds = "DropdownMenu", [$S, Hk] = zn(
15075
+ var CS = Mf, kS = Ra, TS = Lf, RS = $f, IS = Na, ES = Ff, AS = Ms, NS = Bf, _S = Uf, jS = Vf, PS = qf, OS = Gf, MS = Yf, DS = Jf, LS = Qf, Ds = "DropdownMenu", [$S, Hk] = zn(
15076
15076
  Ds,
15077
- [Of]
15078
- ), jt = Of(), [FS, nh] = $S(Ds), rh = (e) => {
15077
+ [Pf]
15078
+ ), jt = Pf(), [FS, th] = $S(Ds), nh = (e) => {
15079
15079
  const {
15080
15080
  __scopeDropdownMenu: t,
15081
15081
  children: n,
@@ -15105,10 +15105,10 @@ var CS = Df, kS = Ra, TS = $f, RS = Ff, IS = Na, ES = zf, AS = Ms, NS = Hf, _S =
15105
15105
  }
15106
15106
  );
15107
15107
  };
15108
- rh.displayName = Ds;
15109
- var oh = "DropdownMenuTrigger", sh = b.forwardRef(
15108
+ nh.displayName = Ds;
15109
+ var rh = "DropdownMenuTrigger", oh = b.forwardRef(
15110
15110
  (e, t) => {
15111
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = nh(oh, n), i = jt(n);
15111
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = th(rh, n), i = jt(n);
15112
15112
  return /* @__PURE__ */ d.jsx(kS, { asChild: !0, ...i, children: /* @__PURE__ */ d.jsx(
15113
15113
  Oe.button,
15114
15114
  {
@@ -15132,15 +15132,15 @@ var oh = "DropdownMenuTrigger", sh = b.forwardRef(
15132
15132
  ) });
15133
15133
  }
15134
15134
  );
15135
- sh.displayName = oh;
15136
- var zS = "DropdownMenuPortal", ih = (e) => {
15135
+ oh.displayName = rh;
15136
+ var zS = "DropdownMenuPortal", sh = (e) => {
15137
15137
  const { __scopeDropdownMenu: t, ...n } = e, r = jt(t);
15138
15138
  return /* @__PURE__ */ d.jsx(TS, { ...r, ...n });
15139
15139
  };
15140
- ih.displayName = zS;
15141
- var ah = "DropdownMenuContent", lh = b.forwardRef(
15140
+ sh.displayName = zS;
15141
+ var ih = "DropdownMenuContent", ah = b.forwardRef(
15142
15142
  (e, t) => {
15143
- const { __scopeDropdownMenu: n, ...r } = e, o = nh(ah, n), s = jt(n), i = b.useRef(!1);
15143
+ const { __scopeDropdownMenu: n, ...r } = e, o = th(ih, n), s = jt(n), i = b.useRef(!1);
15144
15144
  return /* @__PURE__ */ d.jsx(
15145
15145
  RS,
15146
15146
  {
@@ -15169,7 +15169,7 @@ var ah = "DropdownMenuContent", lh = b.forwardRef(
15169
15169
  );
15170
15170
  }
15171
15171
  );
15172
- lh.displayName = ah;
15172
+ ah.displayName = ih;
15173
15173
  var BS = "DropdownMenuGroup", HS = b.forwardRef(
15174
15174
  (e, t) => {
15175
15175
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
@@ -15177,45 +15177,45 @@ var BS = "DropdownMenuGroup", HS = b.forwardRef(
15177
15177
  }
15178
15178
  );
15179
15179
  HS.displayName = BS;
15180
- var US = "DropdownMenuLabel", ch = b.forwardRef(
15180
+ var US = "DropdownMenuLabel", lh = b.forwardRef(
15181
15181
  (e, t) => {
15182
15182
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15183
15183
  return /* @__PURE__ */ d.jsx(ES, { ...o, ...r, ref: t });
15184
15184
  }
15185
15185
  );
15186
- ch.displayName = US;
15187
- var WS = "DropdownMenuItem", uh = b.forwardRef(
15186
+ lh.displayName = US;
15187
+ var WS = "DropdownMenuItem", ch = b.forwardRef(
15188
15188
  (e, t) => {
15189
15189
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15190
15190
  return /* @__PURE__ */ d.jsx(AS, { ...o, ...r, ref: t });
15191
15191
  }
15192
15192
  );
15193
- uh.displayName = WS;
15194
- var VS = "DropdownMenuCheckboxItem", dh = b.forwardRef((e, t) => {
15193
+ ch.displayName = WS;
15194
+ var VS = "DropdownMenuCheckboxItem", uh = b.forwardRef((e, t) => {
15195
15195
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15196
15196
  return /* @__PURE__ */ d.jsx(NS, { ...o, ...r, ref: t });
15197
15197
  });
15198
- dh.displayName = VS;
15198
+ uh.displayName = VS;
15199
15199
  var KS = "DropdownMenuRadioGroup", qS = b.forwardRef((e, t) => {
15200
15200
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15201
15201
  return /* @__PURE__ */ d.jsx(_S, { ...o, ...r, ref: t });
15202
15202
  });
15203
15203
  qS.displayName = KS;
15204
- var GS = "DropdownMenuRadioItem", fh = b.forwardRef((e, t) => {
15204
+ var GS = "DropdownMenuRadioItem", dh = b.forwardRef((e, t) => {
15205
15205
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15206
15206
  return /* @__PURE__ */ d.jsx(jS, { ...o, ...r, ref: t });
15207
15207
  });
15208
- fh.displayName = GS;
15209
- var YS = "DropdownMenuItemIndicator", hh = b.forwardRef((e, t) => {
15208
+ dh.displayName = GS;
15209
+ var YS = "DropdownMenuItemIndicator", fh = b.forwardRef((e, t) => {
15210
15210
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15211
15211
  return /* @__PURE__ */ d.jsx(PS, { ...o, ...r, ref: t });
15212
15212
  });
15213
- hh.displayName = YS;
15214
- var XS = "DropdownMenuSeparator", ph = b.forwardRef((e, t) => {
15213
+ fh.displayName = YS;
15214
+ var XS = "DropdownMenuSeparator", hh = b.forwardRef((e, t) => {
15215
15215
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15216
15216
  return /* @__PURE__ */ d.jsx(OS, { ...o, ...r, ref: t });
15217
15217
  });
15218
- ph.displayName = XS;
15218
+ hh.displayName = XS;
15219
15219
  var JS = "DropdownMenuArrow", ZS = b.forwardRef(
15220
15220
  (e, t) => {
15221
15221
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
@@ -15223,12 +15223,12 @@ var JS = "DropdownMenuArrow", ZS = b.forwardRef(
15223
15223
  }
15224
15224
  );
15225
15225
  ZS.displayName = JS;
15226
- var QS = "DropdownMenuSubTrigger", mh = b.forwardRef((e, t) => {
15226
+ var QS = "DropdownMenuSubTrigger", ph = b.forwardRef((e, t) => {
15227
15227
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15228
15228
  return /* @__PURE__ */ d.jsx(DS, { ...o, ...r, ref: t });
15229
15229
  });
15230
- mh.displayName = QS;
15231
- var eC = "DropdownMenuSubContent", gh = b.forwardRef((e, t) => {
15230
+ ph.displayName = QS;
15231
+ var eC = "DropdownMenuSubContent", mh = b.forwardRef((e, t) => {
15232
15232
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15233
15233
  return /* @__PURE__ */ d.jsx(
15234
15234
  LS,
@@ -15247,10 +15247,10 @@ var eC = "DropdownMenuSubContent", gh = b.forwardRef((e, t) => {
15247
15247
  }
15248
15248
  );
15249
15249
  });
15250
- gh.displayName = eC;
15251
- var tC = rh, nC = sh, rC = ih, xh = lh, bh = ch, wh = uh, vh = dh, yh = fh, Sh = hh, Ch = ph, kh = mh, Th = gh;
15250
+ mh.displayName = eC;
15251
+ var tC = nh, nC = oh, rC = sh, gh = ah, xh = lh, bh = ch, wh = uh, vh = dh, yh = fh, Sh = hh, Ch = ph, kh = mh;
15252
15252
  const Pa = tC, Oa = nC, oC = b.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ d.jsxs(
15253
- kh,
15253
+ Ch,
15254
15254
  {
15255
15255
  ref: o,
15256
15256
  className: le(
@@ -15265,9 +15265,9 @@ const Pa = tC, Oa = nC, oC = b.forwardRef(({ className: e, inset: t, children: n
15265
15265
  ]
15266
15266
  }
15267
15267
  ));
15268
- oC.displayName = kh.displayName;
15268
+ oC.displayName = Ch.displayName;
15269
15269
  const sC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15270
- Th,
15270
+ kh,
15271
15271
  {
15272
15272
  ref: n,
15273
15273
  className: le(
@@ -15277,9 +15277,9 @@ const sC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15277
15277
  ...t
15278
15278
  }
15279
15279
  ));
15280
- sC.displayName = Th.displayName;
15280
+ sC.displayName = kh.displayName;
15281
15281
  const Ls = b.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ d.jsx(rC, { children: /* @__PURE__ */ d.jsx(
15282
- xh,
15282
+ gh,
15283
15283
  {
15284
15284
  ref: r,
15285
15285
  sideOffset: t,
@@ -15290,9 +15290,9 @@ const Ls = b.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
15290
15290
  ...n
15291
15291
  }
15292
15292
  ) }));
15293
- Ls.displayName = xh.displayName;
15293
+ Ls.displayName = gh.displayName;
15294
15294
  const Gn = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ d.jsx(
15295
- wh,
15295
+ bh,
15296
15296
  {
15297
15297
  ref: r,
15298
15298
  className: le(
@@ -15303,9 +15303,9 @@ const Gn = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
15303
15303
  ...n
15304
15304
  }
15305
15305
  ));
15306
- Gn.displayName = wh.displayName;
15306
+ Gn.displayName = bh.displayName;
15307
15307
  const iC = b.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ d.jsxs(
15308
- vh,
15308
+ wh,
15309
15309
  {
15310
15310
  ref: o,
15311
15311
  className: le(
@@ -15315,14 +15315,14 @@ const iC = b.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
15315
15315
  checked: n,
15316
15316
  ...r,
15317
15317
  children: [
15318
- /* @__PURE__ */ d.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ d.jsx(Sh, { children: /* @__PURE__ */ d.jsx(_c, { className: "h-4 w-4" }) }) }),
15318
+ /* @__PURE__ */ d.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ d.jsx(yh, { children: /* @__PURE__ */ d.jsx(_c, { className: "h-4 w-4" }) }) }),
15319
15319
  t
15320
15320
  ]
15321
15321
  }
15322
15322
  ));
15323
- iC.displayName = vh.displayName;
15323
+ iC.displayName = wh.displayName;
15324
15324
  const aC = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
15325
- yh,
15325
+ vh,
15326
15326
  {
15327
15327
  ref: r,
15328
15328
  className: le(
@@ -15331,14 +15331,14 @@ const aC = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
15331
15331
  ),
15332
15332
  ...n,
15333
15333
  children: [
15334
- /* @__PURE__ */ d.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ d.jsx(Sh, { children: /* @__PURE__ */ d.jsx(Cp, { className: "h-2 w-2 fill-current" }) }) }),
15334
+ /* @__PURE__ */ d.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ d.jsx(yh, { children: /* @__PURE__ */ d.jsx(Sp, { className: "h-2 w-2 fill-current" }) }) }),
15335
15335
  t
15336
15336
  ]
15337
15337
  }
15338
15338
  ));
15339
- aC.displayName = yh.displayName;
15339
+ aC.displayName = vh.displayName;
15340
15340
  const lC = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ d.jsx(
15341
- bh,
15341
+ xh,
15342
15342
  {
15343
15343
  ref: r,
15344
15344
  className: le(
@@ -15349,17 +15349,17 @@ const lC = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
15349
15349
  ...n
15350
15350
  }
15351
15351
  ));
15352
- lC.displayName = bh.displayName;
15352
+ lC.displayName = xh.displayName;
15353
15353
  const cC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15354
- Ch,
15354
+ Sh,
15355
15355
  {
15356
15356
  ref: n,
15357
15357
  className: le("-mx-1 my-1 h-px bg-muted", e),
15358
15358
  ...t
15359
15359
  }
15360
15360
  ));
15361
- cC.displayName = Ch.displayName;
15362
- const Rh = b.forwardRef(
15361
+ cC.displayName = Sh.displayName;
15362
+ const Th = b.forwardRef(
15363
15363
  ({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15364
15364
  "textarea",
15365
15365
  {
@@ -15372,7 +15372,7 @@ const Rh = b.forwardRef(
15372
15372
  }
15373
15373
  )
15374
15374
  );
15375
- Rh.displayName = "Textarea";
15375
+ Th.displayName = "Textarea";
15376
15376
  const uC = 1e4;
15377
15377
  function dC({
15378
15378
  initialValue: e = "",
@@ -15473,7 +15473,7 @@ function dC({
15473
15473
  return /* @__PURE__ */ d.jsx("div", { className: `w-full ${f}`, children: /* @__PURE__ */ d.jsxs("div", { className: "flex items-end gap-2", children: [
15474
15474
  /* @__PURE__ */ d.jsxs("div", { className: "flex-1", children: [
15475
15475
  /* @__PURE__ */ d.jsx(
15476
- Rh,
15476
+ Th,
15477
15477
  {
15478
15478
  ref: T,
15479
15479
  value: R,
@@ -15502,7 +15502,7 @@ function dC({
15502
15502
  className: "shrink-0",
15503
15503
  title: "Stop generating",
15504
15504
  disabled: o || !u,
15505
- children: /* @__PURE__ */ d.jsx(kp, { size: 16 })
15505
+ children: /* @__PURE__ */ d.jsx(Cp, { size: 16 })
15506
15506
  }
15507
15507
  ) : /* @__PURE__ */ d.jsx(
15508
15508
  Ze,
@@ -15513,7 +15513,7 @@ function dC({
15513
15513
  className: `shrink-0 ${m ?? ""}`,
15514
15514
  title: t ? "Save changes" : "Send message",
15515
15515
  disabled: o || !R.trim() && !p || C || r,
15516
- children: /* @__PURE__ */ d.jsx(Tp, { size: 16 })
15516
+ children: /* @__PURE__ */ d.jsx(kp, { size: 16 })
15517
15517
  }
15518
15518
  ) })
15519
15519
  ] }) });
@@ -15649,7 +15649,7 @@ function hC({
15649
15649
  disabled: c || l,
15650
15650
  title: "More input actions",
15651
15651
  className: f.moreButton || "",
15652
- children: /* @__PURE__ */ d.jsx(Rp, { size: 16 })
15652
+ children: /* @__PURE__ */ d.jsx(Tp, { size: 16 })
15653
15653
  }
15654
15654
  ) }),
15655
15655
  /* @__PURE__ */ d.jsxs(Ls, { align: "start", sideOffset: 6, className: "w-52", children: [
@@ -15676,7 +15676,7 @@ function hC({
15676
15676
  },
15677
15677
  className: `cursor-pointer ${D ? "opacity-60 pointer-events-none" : ""}`,
15678
15678
  children: [
15679
- /* @__PURE__ */ d.jsx(Ip, { className: "h-4 w-4 mr-2" }),
15679
+ /* @__PURE__ */ d.jsx(Rp, { className: "h-4 w-4 mr-2" }),
15680
15680
  " Upload Excel file"
15681
15681
  ]
15682
15682
  }
@@ -15741,7 +15741,7 @@ function qo({
15741
15741
  metadata: W,
15742
15742
  checkpointIndex: L,
15743
15743
  respondToInterrupt: J
15744
- } = ys(), { isStreaming: Y, error: ne, connectionState: H, submit: $, stop: q, messages: z } = wu(), I = C ?? R ?? null, E = (M == null ? void 0 : M.id) ?? null, P = (M == null ? void 0 : M.namespace) ?? null, O = (W == null ? void 0 : W.assemblingMessageId) ?? null;
15744
+ } = ys(), { isStreaming: Y, error: ne, connectionState: H, submit: $, stop: q, messages: z } = bu(), I = C ?? R ?? null, E = (M == null ? void 0 : M.id) ?? null, P = (M == null ? void 0 : M.namespace) ?? null, O = (W == null ? void 0 : W.assemblingMessageId) ?? null;
15745
15745
  ee.useEffect(() => {
15746
15746
  console.log("[ChatInterface] streamingAssistantId changed:", { streamingAssistantId: O, isStreaming: Y, assemblingMessageId: W == null ? void 0 : W.assemblingMessageId });
15747
15747
  }, [O, Y, W == null ? void 0 : W.assemblingMessageId]);
@@ -15946,7 +15946,7 @@ function qo({
15946
15946
  style: n ? { maxHeight: n } : void 0,
15947
15947
  children: [
15948
15948
  /* @__PURE__ */ d.jsx(
15949
- nf,
15949
+ tf,
15950
15950
  {
15951
15951
  ref: Pt,
15952
15952
  className: "h-full",
@@ -15989,7 +15989,7 @@ function qo({
15989
15989
  /* @__PURE__ */ d.jsx("span", { className: "text-xs font-semibold uppercase tracking-wide", children: "Loading checkpoint…" })
15990
15990
  ] }),
15991
15991
  K && _ && /* @__PURE__ */ d.jsx("div", { className: "pointer-events-auto absolute inset-x-0 bottom-6 z-30 flex justify-center px-4", children: /* @__PURE__ */ d.jsx("div", { className: "w-full max-w-3xl", children: /* @__PURE__ */ d.jsx(
15992
- Vd,
15992
+ Wd,
15993
15993
  {
15994
15994
  interruptPart: _,
15995
15995
  onApprove: He,
@@ -16047,25 +16047,25 @@ function qo({
16047
16047
  ] })
16048
16048
  ] });
16049
16049
  }
16050
- var xc = 1, mC = 0.9, gC = 0.8, xC = 0.17, fi = 0.1, hi = 0.999, bC = 0.9999, wC = 0.99, vC = /[\\\/_+.#"@\[\(\{&]/, yC = /[\\\/_+.#"@\[\(\{&]/g, SC = /[\s-]/, Ih = /[\s-]/g;
16050
+ var xc = 1, mC = 0.9, gC = 0.8, xC = 0.17, fi = 0.1, hi = 0.999, bC = 0.9999, wC = 0.99, vC = /[\\\/_+.#"@\[\(\{&]/, yC = /[\\\/_+.#"@\[\(\{&]/g, SC = /[\s-]/, Rh = /[\s-]/g;
16051
16051
  function $i(e, t, n, r, o, s, i) {
16052
16052
  if (s === t.length) return o === e.length ? xc : wC;
16053
16053
  var a = `${o},${s}`;
16054
16054
  if (i[a] !== void 0) return i[a];
16055
- for (var c = r.charAt(s), l = n.indexOf(c, o), u = 0, f, h, p, m; l >= 0; ) f = $i(e, t, n, r, l + 1, s + 1, i), f > u && (l === o ? f *= xc : vC.test(e.charAt(l - 1)) ? (f *= gC, p = e.slice(o, l - 1).match(yC), p && o > 0 && (f *= Math.pow(hi, p.length))) : SC.test(e.charAt(l - 1)) ? (f *= mC, m = e.slice(o, l - 1).match(Ih), m && o > 0 && (f *= Math.pow(hi, m.length))) : (f *= xC, o > 0 && (f *= Math.pow(hi, l - o))), e.charAt(l) !== t.charAt(s) && (f *= bC)), (f < fi && n.charAt(l - 1) === r.charAt(s + 1) || r.charAt(s + 1) === r.charAt(s) && n.charAt(l - 1) !== r.charAt(s)) && (h = $i(e, t, n, r, l + 1, s + 2, i), h * fi > f && (f = h * fi)), f > u && (u = f), l = n.indexOf(c, l + 1);
16055
+ for (var c = r.charAt(s), l = n.indexOf(c, o), u = 0, f, h, p, m; l >= 0; ) f = $i(e, t, n, r, l + 1, s + 1, i), f > u && (l === o ? f *= xc : vC.test(e.charAt(l - 1)) ? (f *= gC, p = e.slice(o, l - 1).match(yC), p && o > 0 && (f *= Math.pow(hi, p.length))) : SC.test(e.charAt(l - 1)) ? (f *= mC, m = e.slice(o, l - 1).match(Rh), m && o > 0 && (f *= Math.pow(hi, m.length))) : (f *= xC, o > 0 && (f *= Math.pow(hi, l - o))), e.charAt(l) !== t.charAt(s) && (f *= bC)), (f < fi && n.charAt(l - 1) === r.charAt(s + 1) || r.charAt(s + 1) === r.charAt(s) && n.charAt(l - 1) !== r.charAt(s)) && (h = $i(e, t, n, r, l + 1, s + 2, i), h * fi > f && (f = h * fi)), f > u && (u = f), l = n.indexOf(c, l + 1);
16056
16056
  return i[a] = u, u;
16057
16057
  }
16058
16058
  function bc(e) {
16059
- return e.toLowerCase().replace(Ih, " ");
16059
+ return e.toLowerCase().replace(Rh, " ");
16060
16060
  }
16061
16061
  function CC(e, t, n) {
16062
16062
  return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, $i(e, t, bc(e), bc(t), 0, 0, {});
16063
16063
  }
16064
- var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-heading=""]', Eh = '[cmdk-item=""]', wc = `${Eh}:not([aria-disabled="true"])`, Fi = "cmdk-item-select", ur = "data-value", TC = (e, t, n) => CC(e, t, n), Ah = b.createContext(void 0), go = () => b.useContext(Ah), Nh = b.createContext(void 0), Ma = () => b.useContext(Nh), _h = b.createContext(void 0), jh = b.forwardRef((e, t) => {
16064
+ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-heading=""]', Ih = '[cmdk-item=""]', wc = `${Ih}:not([aria-disabled="true"])`, Fi = "cmdk-item-select", ur = "data-value", TC = (e, t, n) => CC(e, t, n), Eh = b.createContext(void 0), go = () => b.useContext(Eh), Ah = b.createContext(void 0), Ma = () => b.useContext(Ah), Nh = b.createContext(void 0), _h = b.forwardRef((e, t) => {
16065
16065
  let n = dr(() => {
16066
16066
  var I, E;
16067
16067
  return { search: "", value: (E = (I = e.value) != null ? I : e.defaultValue) != null ? E : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
16068
- }), r = dr(() => /* @__PURE__ */ new Set()), o = dr(() => /* @__PURE__ */ new Map()), s = dr(() => /* @__PURE__ */ new Map()), i = dr(() => /* @__PURE__ */ new Set()), a = Ph(e), { label: c, children: l, value: u, onValueChange: f, filter: h, shouldFilter: p, loop: m, disablePointerSelection: g = !1, vimBindings: x = !0, ...w } = e, v = Gt(), k = Gt(), R = Gt(), C = b.useRef(null), y = DC();
16068
+ }), r = dr(() => /* @__PURE__ */ new Set()), o = dr(() => /* @__PURE__ */ new Map()), s = dr(() => /* @__PURE__ */ new Map()), i = dr(() => /* @__PURE__ */ new Set()), a = jh(e), { label: c, children: l, value: u, onValueChange: f, filter: h, shouldFilter: p, loop: m, disablePointerSelection: g = !1, vimBindings: x = !0, ...w } = e, v = Gt(), k = Gt(), R = Gt(), C = b.useRef(null), y = DC();
16069
16069
  er(() => {
16070
16070
  if (u !== void 0) {
16071
16071
  let I = u.trim();
@@ -16170,7 +16170,7 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16170
16170
  }
16171
16171
  function L() {
16172
16172
  var I;
16173
- return (I = C.current) == null ? void 0 : I.querySelector(`${Eh}[aria-selected="true"]`);
16173
+ return (I = C.current) == null ? void 0 : I.querySelector(`${Ih}[aria-selected="true"]`);
16174
16174
  }
16175
16175
  function J() {
16176
16176
  var I;
@@ -16235,14 +16235,14 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16235
16235
  }
16236
16236
  }
16237
16237
  }
16238
- } }, b.createElement("label", { "cmdk-label": "", htmlFor: N.inputId, id: N.labelId, style: $C }, c), $s(e, (I) => b.createElement(Nh.Provider, { value: T }, b.createElement(Ah.Provider, { value: N }, I))));
16238
+ } }, b.createElement("label", { "cmdk-label": "", htmlFor: N.inputId, id: N.labelId, style: $C }, c), $s(e, (I) => b.createElement(Ah.Provider, { value: T }, b.createElement(Eh.Provider, { value: N }, I))));
16239
16239
  }), RC = b.forwardRef((e, t) => {
16240
16240
  var n, r;
16241
- let o = Gt(), s = b.useRef(null), i = b.useContext(_h), a = go(), c = Ph(e), l = (r = (n = c.current) == null ? void 0 : n.forceMount) != null ? r : i == null ? void 0 : i.forceMount;
16241
+ let o = Gt(), s = b.useRef(null), i = b.useContext(Nh), a = go(), c = jh(e), l = (r = (n = c.current) == null ? void 0 : n.forceMount) != null ? r : i == null ? void 0 : i.forceMount;
16242
16242
  er(() => {
16243
16243
  if (!l) return a.item(o, i == null ? void 0 : i.id);
16244
16244
  }, [l]);
16245
- let u = Oh(o, s, [e.value, e.children, s], e.keywords), f = Ma(), h = Dn((y) => y.value && y.value === u.current), p = Dn((y) => l || a.filter() === !1 ? !0 : y.search ? y.filtered.items.get(o) > 0 : !0);
16245
+ let u = Ph(o, s, [e.value, e.children, s], e.keywords), f = Ma(), h = Dn((y) => y.value && y.value === u.current), p = Dn((y) => l || a.filter() === !1 ? !0 : y.search ? y.filtered.items.get(o) > 0 : !0);
16246
16246
  b.useEffect(() => {
16247
16247
  let y = s.current;
16248
16248
  if (!(!y || e.disabled)) return y.addEventListener(Fi, m), () => y.removeEventListener(Fi, m);
@@ -16259,9 +16259,9 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16259
16259
  return b.createElement(Oe.div, { ref: _n(s, t), ...C, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!h, "data-disabled": !!x, "data-selected": !!h, onPointerMove: x || a.getDisablePointerSelection() ? void 0 : g, onClick: x ? void 0 : m }, e.children);
16260
16260
  }), IC = b.forwardRef((e, t) => {
16261
16261
  let { heading: n, children: r, forceMount: o, ...s } = e, i = Gt(), a = b.useRef(null), c = b.useRef(null), l = Gt(), u = go(), f = Dn((p) => o || u.filter() === !1 ? !0 : p.search ? p.filtered.groups.has(i) : !0);
16262
- er(() => u.group(i), []), Oh(i, a, [e.value, e.heading, c]);
16262
+ er(() => u.group(i), []), Ph(i, a, [e.value, e.heading, c]);
16263
16263
  let h = b.useMemo(() => ({ id: i, forceMount: o }), [o]);
16264
- return b.createElement(Oe.div, { ref: _n(a, t), ...s, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && b.createElement("div", { ref: c, "cmdk-group-heading": "", "aria-hidden": !0, id: l }, n), $s(e, (p) => b.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? l : void 0 }, b.createElement(_h.Provider, { value: h }, p))));
16264
+ return b.createElement(Oe.div, { ref: _n(a, t), ...s, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && b.createElement("div", { ref: c, "cmdk-group-heading": "", "aria-hidden": !0, id: l }, n), $s(e, (p) => b.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? l : void 0 }, b.createElement(Nh.Provider, { value: h }, p))));
16265
16265
  }), EC = b.forwardRef((e, t) => {
16266
16266
  let { alwaysRender: n, ...r } = e, o = b.useRef(null), s = Dn((i) => !i.search);
16267
16267
  return !n && !s ? null : b.createElement(Oe.div, { ref: _n(o, t), ...r, "cmdk-separator": "", role: "separator" });
@@ -16289,11 +16289,11 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16289
16289
  }, []), b.createElement(Oe.div, { ref: _n(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": a, "aria-label": r, id: c.listId }, $s(e, (l) => b.createElement("div", { ref: _n(i, c.listInnerRef), "cmdk-list-sizer": "" }, l)));
16290
16290
  }), _C = b.forwardRef((e, t) => {
16291
16291
  let { open: n, onOpenChange: r, overlayClassName: o, contentClassName: s, container: i, ...a } = e;
16292
- return b.createElement(jd, { open: n, onOpenChange: r }, b.createElement(Pd, { container: i }, b.createElement(fa, { "cmdk-overlay": "", className: o }), b.createElement(ha, { "aria-label": e.label, "cmdk-dialog": "", className: s }, b.createElement(jh, { ref: t, ...a }))));
16292
+ return b.createElement(_d, { open: n, onOpenChange: r }, b.createElement(jd, { container: i }, b.createElement(fa, { "cmdk-overlay": "", className: o }), b.createElement(ha, { "aria-label": e.label, "cmdk-dialog": "", className: s }, b.createElement(_h, { ref: t, ...a }))));
16293
16293
  }), jC = b.forwardRef((e, t) => Dn((n) => n.filtered.count === 0) ? b.createElement(Oe.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), PC = b.forwardRef((e, t) => {
16294
16294
  let { progress: n, children: r, label: o = "Loading...", ...s } = e;
16295
16295
  return b.createElement(Oe.div, { ref: t, ...s, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, $s(e, (i) => b.createElement("div", { "aria-hidden": !0 }, i)));
16296
- }), Ht = Object.assign(jh, { List: NC, Item: RC, Input: AC, Group: IC, Separator: EC, Dialog: _C, Empty: jC, Loading: PC });
16296
+ }), Ht = Object.assign(_h, { List: NC, Item: RC, Input: AC, Group: IC, Separator: EC, Dialog: _C, Empty: jC, Loading: PC });
16297
16297
  function OC(e, t) {
16298
16298
  let n = e.nextElementSibling;
16299
16299
  for (; n; ) {
@@ -16308,7 +16308,7 @@ function MC(e, t) {
16308
16308
  n = n.previousElementSibling;
16309
16309
  }
16310
16310
  }
16311
- function Ph(e) {
16311
+ function jh(e) {
16312
16312
  let t = b.useRef(e);
16313
16313
  return er(() => {
16314
16314
  t.current = e;
@@ -16323,7 +16323,7 @@ function Dn(e) {
16323
16323
  let t = Ma(), n = () => e(t.snapshot());
16324
16324
  return b.useSyncExternalStore(t.subscribe, n, n);
16325
16325
  }
16326
- function Oh(e, t, n, r = []) {
16326
+ function Ph(e, t, n, r = []) {
16327
16327
  let o = b.useRef(), s = go();
16328
16328
  return er(() => {
16329
16329
  var i;
@@ -16353,7 +16353,7 @@ function $s({ asChild: e, children: t }, n) {
16353
16353
  return e && b.isValidElement(t) ? b.cloneElement(LC(t), { ref: t.ref }, n(t.props.children)) : n(t);
16354
16354
  }
16355
16355
  var $C = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
16356
- const Mh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16356
+ const Oh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16357
16357
  Ht,
16358
16358
  {
16359
16359
  ref: n,
@@ -16364,9 +16364,9 @@ const Mh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16364
16364
  ...t
16365
16365
  }
16366
16366
  ));
16367
- Mh.displayName = Ht.displayName;
16368
- const Dh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
16369
- /* @__PURE__ */ d.jsx(Ep, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
16367
+ Oh.displayName = Ht.displayName;
16368
+ const Mh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
16369
+ /* @__PURE__ */ d.jsx(Ip, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
16370
16370
  /* @__PURE__ */ d.jsx(
16371
16371
  Ht.Input,
16372
16372
  {
@@ -16379,8 +16379,8 @@ const Dh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsxs("d
16379
16379
  }
16380
16380
  )
16381
16381
  ] }));
16382
- Dh.displayName = Ht.Input.displayName;
16383
- const Lh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16382
+ Mh.displayName = Ht.Input.displayName;
16383
+ const Dh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16384
16384
  Ht.List,
16385
16385
  {
16386
16386
  ref: n,
@@ -16388,8 +16388,8 @@ const Lh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16388
16388
  ...t
16389
16389
  }
16390
16390
  ));
16391
- Lh.displayName = Ht.List.displayName;
16392
- const $h = b.forwardRef((e, t) => /* @__PURE__ */ d.jsx(
16391
+ Dh.displayName = Ht.List.displayName;
16392
+ const Lh = b.forwardRef((e, t) => /* @__PURE__ */ d.jsx(
16393
16393
  Ht.Empty,
16394
16394
  {
16395
16395
  ref: t,
@@ -16397,8 +16397,8 @@ const $h = b.forwardRef((e, t) => /* @__PURE__ */ d.jsx(
16397
16397
  ...e
16398
16398
  }
16399
16399
  ));
16400
- $h.displayName = Ht.Empty.displayName;
16401
- const Fh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16400
+ Lh.displayName = Ht.Empty.displayName;
16401
+ const $h = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16402
16402
  Ht.Group,
16403
16403
  {
16404
16404
  ref: n,
@@ -16409,7 +16409,7 @@ const Fh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16409
16409
  ...t
16410
16410
  }
16411
16411
  ));
16412
- Fh.displayName = Ht.Group.displayName;
16412
+ $h.displayName = Ht.Group.displayName;
16413
16413
  const FC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16414
16414
  Ht.Separator,
16415
16415
  {
@@ -16419,7 +16419,7 @@ const FC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16419
16419
  }
16420
16420
  ));
16421
16421
  FC.displayName = Ht.Separator.displayName;
16422
- const zh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16422
+ const Fh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16423
16423
  Ht.Item,
16424
16424
  {
16425
16425
  ref: n,
@@ -16430,14 +16430,14 @@ const zh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16430
16430
  ...t
16431
16431
  }
16432
16432
  ));
16433
- zh.displayName = Ht.Item.displayName;
16433
+ Fh.displayName = Ht.Item.displayName;
16434
16434
  function zC(e, [t, n]) {
16435
16435
  return Math.min(n, Math.max(t, e));
16436
16436
  }
16437
16437
  function BC(e, t) {
16438
16438
  return b.useReducer((n, r) => t[n][r] ?? n, e);
16439
16439
  }
16440
- var Da = "ScrollArea", [Bh, Uk] = zn(Da), [HC, tn] = Bh(Da), Hh = b.forwardRef(
16440
+ var Da = "ScrollArea", [zh, Uk] = zn(Da), [HC, tn] = zh(Da), Bh = b.forwardRef(
16441
16441
  (e, t) => {
16442
16442
  const {
16443
16443
  __scopeScrollArea: n,
@@ -16487,10 +16487,10 @@ var Da = "ScrollArea", [Bh, Uk] = zn(Da), [HC, tn] = Bh(Da), Hh = b.forwardRef(
16487
16487
  );
16488
16488
  }
16489
16489
  );
16490
- Hh.displayName = Da;
16491
- var Uh = "ScrollAreaViewport", Wh = b.forwardRef(
16490
+ Bh.displayName = Da;
16491
+ var Hh = "ScrollAreaViewport", Uh = b.forwardRef(
16492
16492
  (e, t) => {
16493
- const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = tn(Uh, n), a = b.useRef(null), c = st(t, a, i.onViewportChange);
16493
+ const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = tn(Hh, n), a = b.useRef(null), c = st(t, a, i.onViewportChange);
16494
16494
  return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
16495
16495
  /* @__PURE__ */ d.jsx(
16496
16496
  "style",
@@ -16529,13 +16529,13 @@ var Uh = "ScrollAreaViewport", Wh = b.forwardRef(
16529
16529
  ] });
16530
16530
  }
16531
16531
  );
16532
- Wh.displayName = Uh;
16532
+ Uh.displayName = Hh;
16533
16533
  var Sn = "ScrollAreaScrollbar", La = b.forwardRef(
16534
16534
  (e, t) => {
16535
16535
  const { forceMount: n, ...r } = e, o = tn(Sn, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
16536
16536
  return b.useEffect(() => (a ? s(!0) : i(!0), () => {
16537
16537
  a ? s(!1) : i(!1);
16538
- }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ d.jsx(UC, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ d.jsx(WC, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ d.jsx(Vh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ d.jsx($a, { ...r, ref: t }) : null;
16538
+ }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ d.jsx(UC, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ d.jsx(WC, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ d.jsx(Wh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ d.jsx($a, { ...r, ref: t }) : null;
16539
16539
  }
16540
16540
  );
16541
16541
  La.displayName = Sn;
@@ -16555,7 +16555,7 @@ var UC = b.forwardRef((e, t) => {
16555
16555
  };
16556
16556
  }
16557
16557
  }, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ d.jsx(Xt, { present: n || s, children: /* @__PURE__ */ d.jsx(
16558
- Vh,
16558
+ Wh,
16559
16559
  {
16560
16560
  "data-state": s ? "visible" : "hidden",
16561
16561
  ...r,
@@ -16606,7 +16606,7 @@ var UC = b.forwardRef((e, t) => {
16606
16606
  onPointerLeave: Ce(e.onPointerLeave, () => c("POINTER_LEAVE"))
16607
16607
  }
16608
16608
  ) });
16609
- }), Vh = b.forwardRef((e, t) => {
16609
+ }), Wh = b.forwardRef((e, t) => {
16610
16610
  const n = tn(Sn, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = b.useState(!1), a = e.orientation === "horizontal", c = zs(() => {
16611
16611
  if (n.viewport) {
16612
16612
  const l = n.viewport.offsetWidth < n.viewport.scrollWidth, u = n.viewport.offsetHeight < n.viewport.scrollHeight;
@@ -16626,7 +16626,7 @@ var UC = b.forwardRef((e, t) => {
16626
16626
  content: 0,
16627
16627
  viewport: 0,
16628
16628
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
16629
- }), l = Xh(a.viewport, a.content), u = {
16629
+ }), l = Yh(a.viewport, a.content), u = {
16630
16630
  ...r,
16631
16631
  sizes: a,
16632
16632
  onSizesChange: c,
@@ -16680,7 +16680,7 @@ var UC = b.forwardRef((e, t) => {
16680
16680
  return b.useEffect(() => {
16681
16681
  c.current && a(getComputedStyle(c.current));
16682
16682
  }, [c]), /* @__PURE__ */ d.jsx(
16683
- qh,
16683
+ Kh,
16684
16684
  {
16685
16685
  "data-orientation": "horizontal",
16686
16686
  ...o,
@@ -16698,7 +16698,7 @@ var UC = b.forwardRef((e, t) => {
16698
16698
  onWheelScroll: (u, f) => {
16699
16699
  if (s.viewport) {
16700
16700
  const h = s.viewport.scrollLeft + u.deltaX;
16701
- e.onWheelScroll(h), Zh(h, f) && u.preventDefault();
16701
+ e.onWheelScroll(h), Jh(h, f) && u.preventDefault();
16702
16702
  }
16703
16703
  },
16704
16704
  onResize: () => {
@@ -16719,7 +16719,7 @@ var UC = b.forwardRef((e, t) => {
16719
16719
  return b.useEffect(() => {
16720
16720
  c.current && a(getComputedStyle(c.current));
16721
16721
  }, [c]), /* @__PURE__ */ d.jsx(
16722
- qh,
16722
+ Kh,
16723
16723
  {
16724
16724
  "data-orientation": "vertical",
16725
16725
  ...o,
@@ -16738,7 +16738,7 @@ var UC = b.forwardRef((e, t) => {
16738
16738
  onWheelScroll: (u, f) => {
16739
16739
  if (s.viewport) {
16740
16740
  const h = s.viewport.scrollTop + u.deltaY;
16741
- e.onWheelScroll(h), Zh(h, f) && u.preventDefault();
16741
+ e.onWheelScroll(h), Jh(h, f) && u.preventDefault();
16742
16742
  }
16743
16743
  },
16744
16744
  onResize: () => {
@@ -16754,7 +16754,7 @@ var UC = b.forwardRef((e, t) => {
16754
16754
  }
16755
16755
  }
16756
16756
  );
16757
- }), [qC, Kh] = Bh(Sn), qh = b.forwardRef((e, t) => {
16757
+ }), [qC, Vh] = zh(Sn), Kh = b.forwardRef((e, t) => {
16758
16758
  const {
16759
16759
  __scopeScrollArea: n,
16760
16760
  sizes: r,
@@ -16808,14 +16808,14 @@ var UC = b.forwardRef((e, t) => {
16808
16808
  )
16809
16809
  }
16810
16810
  );
16811
- }), fs = "ScrollAreaThumb", Gh = b.forwardRef(
16811
+ }), fs = "ScrollAreaThumb", qh = b.forwardRef(
16812
16812
  (e, t) => {
16813
- const { forceMount: n, ...r } = e, o = Kh(fs, e.__scopeScrollArea);
16813
+ const { forceMount: n, ...r } = e, o = Vh(fs, e.__scopeScrollArea);
16814
16814
  return /* @__PURE__ */ d.jsx(Xt, { present: n || o.hasThumb, children: /* @__PURE__ */ d.jsx(GC, { ref: t, ...r }) });
16815
16815
  }
16816
16816
  ), GC = b.forwardRef(
16817
16817
  (e, t) => {
16818
- const { __scopeScrollArea: n, style: r, ...o } = e, s = tn(fs, n), i = Kh(fs, n), { onThumbPositionChange: a } = i, c = st(
16818
+ const { __scopeScrollArea: n, style: r, ...o } = e, s = tn(fs, n), i = Vh(fs, n), { onThumbPositionChange: a } = i, c = st(
16819
16819
  t,
16820
16820
  (f) => i.onThumbChange(f)
16821
16821
  ), l = b.useRef(void 0), u = zs(() => {
@@ -16852,14 +16852,14 @@ var UC = b.forwardRef((e, t) => {
16852
16852
  );
16853
16853
  }
16854
16854
  );
16855
- Gh.displayName = fs;
16856
- var Fa = "ScrollAreaCorner", Yh = b.forwardRef(
16855
+ qh.displayName = fs;
16856
+ var Fa = "ScrollAreaCorner", Gh = b.forwardRef(
16857
16857
  (e, t) => {
16858
16858
  const n = tn(Fa, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
16859
16859
  return n.type !== "scroll" && r ? /* @__PURE__ */ d.jsx(YC, { ...e, ref: t }) : null;
16860
16860
  }
16861
16861
  );
16862
- Yh.displayName = Fa;
16862
+ Gh.displayName = Fa;
16863
16863
  var YC = b.forwardRef((e, t) => {
16864
16864
  const { __scopeScrollArea: n, ...r } = e, o = tn(Fa, n), [s, i] = b.useState(0), [a, c] = b.useState(0), l = !!(s && a);
16865
16865
  return vr(o.scrollbarX, () => {
@@ -16890,30 +16890,30 @@ var YC = b.forwardRef((e, t) => {
16890
16890
  function hs(e) {
16891
16891
  return e ? parseInt(e, 10) : 0;
16892
16892
  }
16893
- function Xh(e, t) {
16893
+ function Yh(e, t) {
16894
16894
  const n = e / t;
16895
16895
  return isNaN(n) ? 0 : n;
16896
16896
  }
16897
16897
  function Fs(e) {
16898
- const t = Xh(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
16898
+ const t = Yh(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
16899
16899
  return Math.max(r, 18);
16900
16900
  }
16901
16901
  function XC(e, t, n, r = "ltr") {
16902
16902
  const o = Fs(n), s = o / 2, i = t || s, a = o - i, c = n.scrollbar.paddingStart + i, l = n.scrollbar.size - n.scrollbar.paddingEnd - a, u = n.content - n.viewport, f = r === "ltr" ? [0, u] : [u * -1, 0];
16903
- return Jh([c, l], f)(e);
16903
+ return Xh([c, l], f)(e);
16904
16904
  }
16905
16905
  function vc(e, t, n = "ltr") {
16906
16906
  const r = Fs(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - o, i = t.content - t.viewport, a = s - r, c = n === "ltr" ? [0, i] : [i * -1, 0], l = zC(e, c);
16907
- return Jh([0, i], [0, a])(l);
16907
+ return Xh([0, i], [0, a])(l);
16908
16908
  }
16909
- function Jh(e, t) {
16909
+ function Xh(e, t) {
16910
16910
  return (n) => {
16911
16911
  if (e[0] === e[1] || t[0] === t[1]) return t[0];
16912
16912
  const r = (t[1] - t[0]) / (e[1] - e[0]);
16913
16913
  return t[0] + r * (n - e[0]);
16914
16914
  };
16915
16915
  }
16916
- function Zh(e, t) {
16916
+ function Jh(e, t) {
16917
16917
  return e > 0 && e < t;
16918
16918
  }
16919
16919
  var JC = (e, t = () => {
@@ -16944,22 +16944,22 @@ function vr(e, t) {
16944
16944
  }
16945
16945
  }, [e, n]);
16946
16946
  }
16947
- var Qh = Hh, ZC = Wh, QC = Yh;
16948
- const ep = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
16949
- Qh,
16947
+ var Zh = Bh, ZC = Uh, QC = Gh;
16948
+ const Qh = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
16949
+ Zh,
16950
16950
  {
16951
16951
  ref: r,
16952
16952
  className: le("relative overflow-hidden", e),
16953
16953
  ...n,
16954
16954
  children: [
16955
16955
  /* @__PURE__ */ d.jsx(ZC, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
16956
- /* @__PURE__ */ d.jsx(tp, {}),
16956
+ /* @__PURE__ */ d.jsx(ep, {}),
16957
16957
  /* @__PURE__ */ d.jsx(QC, {})
16958
16958
  ]
16959
16959
  }
16960
16960
  ));
16961
- ep.displayName = Qh.displayName;
16962
- const tp = b.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ d.jsx(
16961
+ Qh.displayName = Zh.displayName;
16962
+ const ep = b.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ d.jsx(
16963
16963
  La,
16964
16964
  {
16965
16965
  ref: r,
@@ -16971,10 +16971,10 @@ const tp = b.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r)
16971
16971
  e
16972
16972
  ),
16973
16973
  ...n,
16974
- children: /* @__PURE__ */ d.jsx(Gh, { className: "relative flex-1 rounded-full bg-border" })
16974
+ children: /* @__PURE__ */ d.jsx(qh, { className: "relative flex-1 rounded-full bg-border" })
16975
16975
  }
16976
16976
  ));
16977
- tp.displayName = La.displayName;
16977
+ ep.displayName = La.displayName;
16978
16978
  function mi({
16979
16979
  thread: e,
16980
16980
  isActive: t = !1,
@@ -17037,7 +17037,7 @@ function mi({
17037
17037
  className: "h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",
17038
17038
  onClick: (y) => y.stopPropagation(),
17039
17039
  children: [
17040
- /* @__PURE__ */ d.jsx(Ap, { className: "h-4 w-4" }),
17040
+ /* @__PURE__ */ d.jsx(Ep, { className: "h-4 w-4" }),
17041
17041
  /* @__PURE__ */ d.jsx("span", { className: "sr-only", children: "Open menu" })
17042
17042
  ]
17043
17043
  }
@@ -17052,7 +17052,7 @@ function mi({
17052
17052
  l && /* @__PURE__ */ d.jsxs(Gn, { onClick: (y) => {
17053
17053
  y.stopPropagation(), l(e);
17054
17054
  }, children: [
17055
- /* @__PURE__ */ d.jsx(Np, { className: "mr-2 h-4 w-4" }),
17055
+ /* @__PURE__ */ d.jsx(Ap, { className: "mr-2 h-4 w-4" }),
17056
17056
  /* @__PURE__ */ d.jsx("span", { children: "Share" })
17057
17057
  ] }),
17058
17058
  h && /* @__PURE__ */ d.jsxs(
@@ -17063,7 +17063,7 @@ function mi({
17063
17063
  },
17064
17064
  className: "text-destructive focus:text-destructive",
17065
17065
  children: [
17066
- /* @__PURE__ */ d.jsx(_p, { className: "mr-2 h-4 w-4" }),
17066
+ /* @__PURE__ */ d.jsx(Np, { className: "mr-2 h-4 w-4" }),
17067
17067
  /* @__PURE__ */ d.jsx("span", { children: "Delete" })
17068
17068
  ]
17069
17069
  }
@@ -17074,7 +17074,7 @@ function mi({
17074
17074
  }
17075
17075
  );
17076
17076
  }
17077
- var Bs = "Collapsible", [ek, Wk] = zn(Bs), [tk, za] = ek(Bs), np = b.forwardRef(
17077
+ var Bs = "Collapsible", [ek, Wk] = zn(Bs), [tk, za] = ek(Bs), tp = b.forwardRef(
17078
17078
  (e, t) => {
17079
17079
  const {
17080
17080
  __scopeCollapsible: n,
@@ -17110,10 +17110,10 @@ var Bs = "Collapsible", [ek, Wk] = zn(Bs), [tk, za] = ek(Bs), np = b.forwardRef(
17110
17110
  );
17111
17111
  }
17112
17112
  );
17113
- np.displayName = Bs;
17114
- var rp = "CollapsibleTrigger", op = b.forwardRef(
17113
+ tp.displayName = Bs;
17114
+ var np = "CollapsibleTrigger", rp = b.forwardRef(
17115
17115
  (e, t) => {
17116
- const { __scopeCollapsible: n, ...r } = e, o = za(rp, n);
17116
+ const { __scopeCollapsible: n, ...r } = e, o = za(np, n);
17117
17117
  return /* @__PURE__ */ d.jsx(
17118
17118
  Oe.button,
17119
17119
  {
@@ -17130,14 +17130,14 @@ var rp = "CollapsibleTrigger", op = b.forwardRef(
17130
17130
  );
17131
17131
  }
17132
17132
  );
17133
- op.displayName = rp;
17134
- var Ba = "CollapsibleContent", sp = b.forwardRef(
17133
+ rp.displayName = np;
17134
+ var Ba = "CollapsibleContent", op = b.forwardRef(
17135
17135
  (e, t) => {
17136
17136
  const { forceMount: n, ...r } = e, o = za(Ba, e.__scopeCollapsible);
17137
17137
  return /* @__PURE__ */ d.jsx(Xt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ d.jsx(nk, { ...r, ref: t, present: s }) });
17138
17138
  }
17139
17139
  );
17140
- sp.displayName = Ba;
17140
+ op.displayName = Ba;
17141
17141
  var nk = b.forwardRef((e, t) => {
17142
17142
  const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = za(Ba, n), [a, c] = b.useState(r), l = b.useRef(null), u = st(t, l), f = b.useRef(0), h = f.current, p = b.useRef(0), m = p.current, g = i.open || a, x = b.useRef(g), w = b.useRef(void 0);
17143
17143
  return b.useEffect(() => {
@@ -17174,12 +17174,12 @@ var nk = b.forwardRef((e, t) => {
17174
17174
  function Ha(e) {
17175
17175
  return e ? "open" : "closed";
17176
17176
  }
17177
- var rk = np;
17178
- const Io = rk, Eo = op, Ao = sp, yc = 25, ip = Vn.threadManagerView, ok = (e) => e === "default" || e === "shared", sk = () => {
17177
+ var rk = tp;
17178
+ const Io = rk, Eo = rp, Ao = op, yc = 25, sp = Vn.threadManagerView, ok = (e) => e === "default" || e === "shared", sk = () => {
17179
17179
  if (typeof window > "u")
17180
17180
  return null;
17181
17181
  try {
17182
- const e = window.localStorage.getItem(ip);
17182
+ const e = window.localStorage.getItem(sp);
17183
17183
  if (ok(e))
17184
17184
  return e;
17185
17185
  } catch {
@@ -17193,7 +17193,7 @@ function ik({
17193
17193
  Pe(() => {
17194
17194
  if (!(typeof window > "u"))
17195
17195
  try {
17196
- window.localStorage.setItem(ip, t);
17196
+ window.localStorage.setItem(sp, t);
17197
17197
  } catch {
17198
17198
  }
17199
17199
  }, [t]);
@@ -17453,7 +17453,7 @@ function zi({
17453
17453
  }
17454
17454
  ),
17455
17455
  /* @__PURE__ */ d.jsx(
17456
- ep,
17456
+ Qh,
17457
17457
  {
17458
17458
  ref: X,
17459
17459
  className: `flex-1 min-h-0 ${s.threadList || ""}`,
@@ -17571,11 +17571,11 @@ function zi({
17571
17571
  )) })
17572
17572
  }
17573
17573
  ),
17574
- /* @__PURE__ */ d.jsx(Md, { open: be, onOpenChange: (G) => !G && St(), children: /* @__PURE__ */ d.jsxs(pa, { className: "max-w-md p-0", children: [
17575
- /* @__PURE__ */ d.jsx(Ld, { children: /* @__PURE__ */ d.jsx($d, { children: "Share thread" }) }),
17576
- /* @__PURE__ */ d.jsxs(Mh, { children: [
17574
+ /* @__PURE__ */ d.jsx(Od, { open: be, onOpenChange: (G) => !G && St(), children: /* @__PURE__ */ d.jsxs(pa, { className: "max-w-md p-0", children: [
17575
+ /* @__PURE__ */ d.jsx(Dd, { children: /* @__PURE__ */ d.jsx(Ld, { children: "Share thread" }) }),
17576
+ /* @__PURE__ */ d.jsxs(Oh, { children: [
17577
17577
  /* @__PURE__ */ d.jsx(
17578
- Dh,
17578
+ Mh,
17579
17579
  {
17580
17580
  autoFocus: !0,
17581
17581
  value: He,
@@ -17583,7 +17583,7 @@ function zi({
17583
17583
  placeholder: "Search for recipients..."
17584
17584
  }
17585
17585
  ),
17586
- /* @__PURE__ */ d.jsxs(Lh, { children: [
17586
+ /* @__PURE__ */ d.jsxs(Dh, { children: [
17587
17587
  Y && /* @__PURE__ */ d.jsxs("div", { className: "flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground", children: [
17588
17588
  J && /* @__PURE__ */ d.jsx(An, { className: "h-3 w-3 animate-spin" }),
17589
17589
  /* @__PURE__ */ d.jsx(
@@ -17594,11 +17594,11 @@ function zi({
17594
17594
  }
17595
17595
  )
17596
17596
  ] }),
17597
- /* @__PURE__ */ d.jsx($h, { children: Ye ? /* @__PURE__ */ d.jsxs("span", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
17597
+ /* @__PURE__ */ d.jsx(Lh, { children: Ye ? /* @__PURE__ */ d.jsxs("span", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
17598
17598
  /* @__PURE__ */ d.jsx(An, { className: "h-4 w-4 animate-spin" }),
17599
17599
  "Loading recipients…"
17600
17600
  ] }) : "No matching recipients found" }),
17601
- yt.length > 0 && /* @__PURE__ */ d.jsx(Fh, { heading: "Recipients", children: yt.map((G) => /* @__PURE__ */ d.jsx(zh, { onSelect: () => Ct(G), children: /* @__PURE__ */ d.jsxs("div", { className: "flex flex-col items-start text-sm", children: [
17601
+ yt.length > 0 && /* @__PURE__ */ d.jsx($h, { heading: "Recipients", children: yt.map((G) => /* @__PURE__ */ d.jsx(Fh, { onSelect: () => Ct(G), children: /* @__PURE__ */ d.jsxs("div", { className: "flex flex-col items-start text-sm", children: [
17602
17602
  /* @__PURE__ */ d.jsx("span", { className: "font-medium", children: G.label }),
17603
17603
  G.secondaryLabel && /* @__PURE__ */ d.jsx("span", { className: "text-xs text-muted-foreground", children: G.secondaryLabel })
17604
17604
  ] }) }, G.id)) })
@@ -17703,7 +17703,7 @@ function lk({ placeholder: e, onMessageSent: t }) {
17703
17703
  onClick: () => r("threads"),
17704
17704
  className: `flex-1 px-3 py-2 text-sm font-medium transition-colors ${n === "threads" ? "border-b-2 border-slate-800 text-slate-800 bg-white" : "text-gray-600 hover:text-gray-800"}`,
17705
17705
  children: /* @__PURE__ */ d.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
17706
- /* @__PURE__ */ d.jsx(Mp, { size: 14 }),
17706
+ /* @__PURE__ */ d.jsx(Op, { size: 14 }),
17707
17707
  "History"
17708
17708
  ] })
17709
17709
  }
@@ -17765,7 +17765,7 @@ function Kk({
17765
17765
  size: "sm",
17766
17766
  className: "text-white hover:bg-white/10 h-8 w-8 p-0",
17767
17767
  title: "Options",
17768
- children: /* @__PURE__ */ d.jsx(jp, { size: 16 })
17768
+ children: /* @__PURE__ */ d.jsx(_p, { size: 16 })
17769
17769
  }
17770
17770
  ),
17771
17771
  /* @__PURE__ */ d.jsx(
@@ -17788,7 +17788,7 @@ function Kk({
17788
17788
  },
17789
17789
  className: "text-white hover:bg-white/10 h-8 w-8 p-0",
17790
17790
  title: a ? "Maximize" : "Minimize",
17791
- children: a ? /* @__PURE__ */ d.jsx(Pp, { size: 14 }) : /* @__PURE__ */ d.jsx(Op, { size: 14 })
17791
+ children: a ? /* @__PURE__ */ d.jsx(jp, { size: 14 }) : /* @__PURE__ */ d.jsx(Pp, { size: 14 })
17792
17792
  }
17793
17793
  )
17794
17794
  ] })
@@ -17917,7 +17917,7 @@ function Gk({
17917
17917
  activeThreadId: h,
17918
17918
  ensureValidToken: p
17919
17919
  }) {
17920
- const { messages: m } = wu(), [g, x] = de(null), [w, v] = de(""), [k, R] = de(null), [C, y] = de(null), [T, N] = de(!1), [A, M] = de(""), D = Se(A), U = Se(null);
17920
+ const { messages: m } = bu(), [g, x] = de(null), [w, v] = de(""), [k, R] = de(null), [C, y] = de(null), [T, N] = de(!1), [A, M] = de(""), D = Se(A), U = Se(null);
17921
17921
  Pe(() => {
17922
17922
  if (!g)
17923
17923
  if (h) {
@@ -18068,32 +18068,32 @@ function Gk({
18068
18068
  };
18069
18069
  }
18070
18070
  export {
18071
- wg as ApiProvider,
18072
- hg as ChatApi,
18071
+ bg as ApiProvider,
18072
+ fg as ChatApi,
18073
18073
  Vk as ChatApp,
18074
18074
  qo as ChatContainer,
18075
18075
  dC as ChatInput,
18076
18076
  hC as ChatInputArea,
18077
18077
  hC as ChatInputRow,
18078
18078
  qo as ChatInterface,
18079
- nf as ChatMessagesArea,
18079
+ tf as ChatMessagesArea,
18080
18080
  Lo as ChatProviders,
18081
18081
  Kk as ChatWidget,
18082
18082
  dC as Composer,
18083
- ug as DEFAULT_TIMEOUT_MS,
18084
- pg as FileApi,
18085
- dg as HISTORY_TIMEOUT_MS,
18083
+ cg as DEFAULT_TIMEOUT_MS,
18084
+ hg as FileApi,
18085
+ ug as HISTORY_TIMEOUT_MS,
18086
18086
  Uo as MarkdownContent,
18087
- Qd as MessageComponent,
18087
+ Zd as MessageComponent,
18088
18088
  qv as MessageContent,
18089
- nf as MessageList,
18090
- tf as MessageRow,
18089
+ tf as MessageList,
18090
+ ef as MessageRow,
18091
18091
  qk as NewChatButton,
18092
- Cu as SETTINGS_STORAGE_KEY,
18092
+ Su as SETTINGS_STORAGE_KEY,
18093
18093
  Vn as STORAGE_KEYS,
18094
18094
  zi as ThreadManager,
18095
18095
  dx as ThreadStateProvider,
18096
- Dg as ThreadsProvider,
18096
+ Mg as ThreadsProvider,
18097
18097
  Sc as ToolContent,
18098
18098
  $k as applySettings,
18099
18099
  Xn as chatApiClient,
@@ -18102,27 +18102,27 @@ export {
18102
18102
  Gs as draftKey,
18103
18103
  Zo as extractToolContent,
18104
18104
  su as fileApiClient,
18105
- vg as fileToBase64,
18105
+ wg as fileToBase64,
18106
18106
  Mk as formatToolOutput,
18107
18107
  Wt as get,
18108
18108
  ru as getChatToken,
18109
18109
  Lk as getCurrentSettings,
18110
18110
  wx as getDefaultApiConfig,
18111
18111
  vx as getDefaultChatSettings,
18112
- ef as getMessageDomKey,
18112
+ Qd as getMessageDomKey,
18113
18113
  $t as httpClient,
18114
- _g as isEnvelope,
18114
+ Ng as isEnvelope,
18115
18115
  cu as isFileLike,
18116
18116
  yx as loadStoredSettings,
18117
- $g as looksLikeMarkdown,
18117
+ Lg as looksLikeMarkdown,
18118
18118
  Ug as normalizeToolPayload,
18119
18119
  $r as normalizeToolPayloadValue,
18120
18120
  ou as onChatTokenChanged,
18121
18121
  io as parseJsonSafe,
18122
18122
  Oo as post,
18123
18123
  Wr as pretty,
18124
- yg as processAttachments,
18125
- fg as put,
18124
+ vg as processAttachments,
18125
+ dg as put,
18126
18126
  Jo as sanitizeForDisplay,
18127
18127
  Sx as saveSettings,
18128
18128
  Kn as setChatToken,
@@ -18131,12 +18131,12 @@ export {
18131
18131
  Gk as useChatController,
18132
18132
  Dk as useHasChatSession,
18133
18133
  bx as useShallowStableValue,
18134
- wu as useStream,
18134
+ bu as useStream,
18135
18135
  cx as useThreadHistoryState,
18136
18136
  ik as useThreadManagerViewState,
18137
18137
  ys as useThreadState,
18138
18138
  ux as useThreadStateUpdater,
18139
18139
  so as useThreads,
18140
- Mg as useThreadsState
18140
+ Og as useThreadsState
18141
18141
  };
18142
18142
  //# sourceMappingURL=index.esm.js.map