teodor-new-chat-ui 3.0.124 → 3.0.125

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
@@ -48,25 +48,25 @@ function hm() {
48
48
  function p(R) {
49
49
  if (R === null || typeof R != "object")
50
50
  return null;
51
- var U = b && R[b] || R[v];
52
- return typeof U == "function" ? U : null;
51
+ var W = b && R[b] || R[v];
52
+ return typeof W == "function" ? W : null;
53
53
  }
54
54
  var x = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
55
55
  function w(R) {
56
56
  {
57
- for (var U = arguments.length, re = new Array(U > 1 ? U - 1 : 0), be = 1; be < U; be++)
57
+ for (var W = arguments.length, re = new Array(W > 1 ? W - 1 : 0), be = 1; be < W; be++)
58
58
  re[be - 1] = arguments[be];
59
59
  y("error", R, re);
60
60
  }
61
61
  }
62
- function y(R, U, re) {
62
+ function y(R, W, re) {
63
63
  {
64
64
  var be = x.ReactDebugCurrentFrame, Me = be.getStackAddendum();
65
- Me !== "" && (U += "%s", re = re.concat([Me]));
65
+ Me !== "" && (W += "%s", re = re.concat([Me]));
66
66
  var Be = re.map(function(ke) {
67
67
  return String(ke);
68
68
  });
69
- Be.unshift("Warning: " + U), Function.prototype.apply.call(console[R], console, Be);
69
+ Be.unshift("Warning: " + W), Function.prototype.apply.call(console[R], console, Be);
70
70
  }
71
71
  }
72
72
  var E = !1, S = !1, T = !1, C = !1, N = !1, I;
@@ -78,11 +78,11 @@ function hm() {
78
78
  // with.
79
79
  R.$$typeof === I || R.getModuleId !== void 0));
80
80
  }
81
- function L(R, U, re) {
81
+ function F(R, W, re) {
82
82
  var be = R.displayName;
83
83
  if (be)
84
84
  return be;
85
- var Me = U.displayName || U.name || "";
85
+ var Me = W.displayName || W.name || "";
86
86
  return Me !== "" ? re + "(" + Me + ")" : re;
87
87
  }
88
88
  function H(R) {
@@ -112,13 +112,13 @@ function hm() {
112
112
  if (typeof R == "object")
113
113
  switch (R.$$typeof) {
114
114
  case a:
115
- var U = R;
116
- return H(U) + ".Consumer";
115
+ var W = R;
116
+ return H(W) + ".Consumer";
117
117
  case i:
118
118
  var re = R;
119
119
  return H(re._context) + ".Provider";
120
120
  case l:
121
- return L(R, R.render, "ForwardRef");
121
+ return F(R, R.render, "ForwardRef");
122
122
  case h:
123
123
  var be = R.displayName || null;
124
124
  return be !== null ? be : G(R.type) || "Memo";
@@ -133,18 +133,18 @@ function hm() {
133
133
  }
134
134
  return null;
135
135
  }
136
- var P = Object.assign, X = 0, M, J, _, O, W, V, ee;
137
- function F() {
136
+ var P = Object.assign, X = 0, V, ne, _, M, O, D, Z;
137
+ function B() {
138
138
  }
139
- F.__reactDisabledLog = !0;
140
- function Z() {
139
+ B.__reactDisabledLog = !0;
140
+ function J() {
141
141
  {
142
142
  if (X === 0) {
143
- M = console.log, J = console.info, _ = console.warn, O = console.error, W = console.group, V = console.groupCollapsed, ee = console.groupEnd;
143
+ V = console.log, ne = console.info, _ = console.warn, M = console.error, O = console.group, D = console.groupCollapsed, Z = console.groupEnd;
144
144
  var R = {
145
145
  configurable: !0,
146
146
  enumerable: !0,
147
- value: F,
147
+ value: B,
148
148
  writable: !0
149
149
  };
150
150
  Object.defineProperties(console, {
@@ -170,55 +170,55 @@ function hm() {
170
170
  };
171
171
  Object.defineProperties(console, {
172
172
  log: P({}, R, {
173
- value: M
173
+ value: V
174
174
  }),
175
175
  info: P({}, R, {
176
- value: J
176
+ value: ne
177
177
  }),
178
178
  warn: P({}, R, {
179
179
  value: _
180
180
  }),
181
181
  error: P({}, R, {
182
- value: O
182
+ value: M
183
183
  }),
184
184
  group: P({}, R, {
185
- value: W
185
+ value: O
186
186
  }),
187
187
  groupCollapsed: P({}, R, {
188
- value: V
188
+ value: D
189
189
  }),
190
190
  groupEnd: P({}, R, {
191
- value: ee
191
+ value: Z
192
192
  })
193
193
  });
194
194
  }
195
195
  X < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
196
196
  }
197
197
  }
198
- var ge = x.ReactCurrentDispatcher, $;
199
- function A(R, U, re) {
198
+ var ge = x.ReactCurrentDispatcher, z;
199
+ function A(R, W, re) {
200
200
  {
201
- if ($ === void 0)
201
+ if (z === void 0)
202
202
  try {
203
203
  throw Error();
204
204
  } catch (Me) {
205
205
  var be = Me.stack.trim().match(/\n( *(at )?)/);
206
- $ = be && be[1] || "";
206
+ z = be && be[1] || "";
207
207
  }
208
208
  return `
209
- ` + $ + R;
209
+ ` + z + R;
210
210
  }
211
211
  }
212
- var K = !1, te;
212
+ var K = !1, ee;
213
213
  {
214
214
  var ce = typeof WeakMap == "function" ? WeakMap : Map;
215
- te = new ce();
215
+ ee = new ce();
216
216
  }
217
- function se(R, U) {
217
+ function se(R, W) {
218
218
  if (!R || K)
219
219
  return "";
220
220
  {
221
- var re = te.get(R);
221
+ var re = ee.get(R);
222
222
  if (re !== void 0)
223
223
  return re;
224
224
  }
@@ -227,9 +227,9 @@ function hm() {
227
227
  var Me = Error.prepareStackTrace;
228
228
  Error.prepareStackTrace = void 0;
229
229
  var Be;
230
- Be = ge.current, ge.current = null, Z();
230
+ Be = ge.current, ge.current = null, J();
231
231
  try {
232
- if (U) {
232
+ if (W) {
233
233
  var ke = function() {
234
234
  throw Error();
235
235
  };
@@ -273,7 +273,7 @@ function hm() {
273
273
  if (Xe--, et--, et < 0 || Ee[Xe] !== dt[et]) {
274
274
  var Nt = `
275
275
  ` + Ee[Xe].replace(" at new ", " at ");
276
- return R.displayName && Nt.includes("<anonymous>") && (Nt = Nt.replace("<anonymous>", R.displayName)), typeof R == "function" && te.set(R, Nt), Nt;
276
+ return R.displayName && Nt.includes("<anonymous>") && (Nt = Nt.replace("<anonymous>", R.displayName)), typeof R == "function" && ee.set(R, Nt), Nt;
277
277
  }
278
278
  while (Xe >= 1 && et >= 0);
279
279
  break;
@@ -283,16 +283,16 @@ function hm() {
283
283
  K = !1, ge.current = Be, ae(), Error.prepareStackTrace = Me;
284
284
  }
285
285
  var Wn = R ? R.displayName || R.name : "", Va = Wn ? A(Wn) : "";
286
- return typeof R == "function" && te.set(R, Va), Va;
286
+ return typeof R == "function" && ee.set(R, Va), Va;
287
287
  }
288
- function Ce(R, U, re) {
288
+ function Ce(R, W, re) {
289
289
  return se(R, !1);
290
290
  }
291
291
  function Pe(R) {
292
- var U = R.prototype;
293
- return !!(U && U.isReactComponent);
292
+ var W = R.prototype;
293
+ return !!(W && W.isReactComponent);
294
294
  }
295
- function je(R, U, re) {
295
+ function je(R, W, re) {
296
296
  if (R == null)
297
297
  return "";
298
298
  if (typeof R == "function")
@@ -310,11 +310,11 @@ function hm() {
310
310
  case l:
311
311
  return Ce(R.render);
312
312
  case h:
313
- return je(R.type, U, re);
313
+ return je(R.type, W, re);
314
314
  case m: {
315
315
  var be = R, Me = be._payload, Be = be._init;
316
316
  try {
317
- return je(Be(Me), U, re);
317
+ return je(Be(Me), W, re);
318
318
  } catch {
319
319
  }
320
320
  }
@@ -324,12 +324,12 @@ function hm() {
324
324
  var ue = Object.prototype.hasOwnProperty, pe = {}, Le = x.ReactDebugCurrentFrame;
325
325
  function he(R) {
326
326
  if (R) {
327
- var U = R._owner, re = je(R.type, R._source, U ? U.type : null);
327
+ var W = R._owner, re = je(R.type, R._source, W ? W.type : null);
328
328
  Le.setExtraStackFrame(re);
329
329
  } else
330
330
  Le.setExtraStackFrame(null);
331
331
  }
332
- function Ne(R, U, re, be, Me) {
332
+ function Ne(R, W, re, be, Me) {
333
333
  {
334
334
  var Be = Function.call.bind(ue);
335
335
  for (var ke in R)
@@ -340,7 +340,7 @@ function hm() {
340
340
  var dt = Error((be || "React class") + ": " + re + " type `" + ke + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof R[ke] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
341
  throw dt.name = "Invariant Violation", dt;
342
342
  }
343
- Ee = R[ke](U, ke, be, re, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
343
+ Ee = R[ke](W, ke, be, re, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
344
344
  } catch (Xe) {
345
345
  Ee = Xe;
346
346
  }
@@ -354,11 +354,11 @@ function hm() {
354
354
  }
355
355
  function st(R) {
356
356
  {
357
- var U = typeof Symbol == "function" && Symbol.toStringTag, re = U && R[Symbol.toStringTag] || R.constructor.name || "Object";
357
+ var W = typeof Symbol == "function" && Symbol.toStringTag, re = W && R[Symbol.toStringTag] || R.constructor.name || "Object";
358
358
  return re;
359
359
  }
360
360
  }
361
- function z(R) {
361
+ function U(R) {
362
362
  try {
363
363
  return Q(R), !1;
364
364
  } catch {
@@ -369,7 +369,7 @@ function hm() {
369
369
  return "" + R;
370
370
  }
371
371
  function Fe(R) {
372
- if (z(R))
372
+ if (U(R))
373
373
  return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", st(R)), Q(R);
374
374
  }
375
375
  var Ve = x.ReactCurrentOwner, bt = {
@@ -380,27 +380,27 @@ function hm() {
380
380
  }, pt, wt;
381
381
  function Gt(R) {
382
382
  if (ue.call(R, "ref")) {
383
- var U = Object.getOwnPropertyDescriptor(R, "ref").get;
384
- if (U && U.isReactWarning)
383
+ var W = Object.getOwnPropertyDescriptor(R, "ref").get;
384
+ if (W && W.isReactWarning)
385
385
  return !1;
386
386
  }
387
387
  return R.ref !== void 0;
388
388
  }
389
389
  function rt(R) {
390
390
  if (ue.call(R, "key")) {
391
- var U = Object.getOwnPropertyDescriptor(R, "key").get;
392
- if (U && U.isReactWarning)
391
+ var W = Object.getOwnPropertyDescriptor(R, "key").get;
392
+ if (W && W.isReactWarning)
393
393
  return !1;
394
394
  }
395
395
  return R.key !== void 0;
396
396
  }
397
- function yt(R, U) {
397
+ function yt(R, W) {
398
398
  typeof R.ref == "string" && Ve.current;
399
399
  }
400
- function it(R, U) {
400
+ function it(R, W) {
401
401
  {
402
402
  var re = function() {
403
- pt || (pt = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", U));
403
+ pt || (pt = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", W));
404
404
  };
405
405
  re.isReactWarning = !0, Object.defineProperty(R, "key", {
406
406
  get: re,
@@ -408,10 +408,10 @@ function hm() {
408
408
  });
409
409
  }
410
410
  }
411
- function St(R, U) {
411
+ function St(R, W) {
412
412
  {
413
413
  var re = function() {
414
- wt || (wt = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", U));
414
+ wt || (wt = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", W));
415
415
  };
416
416
  re.isReactWarning = !0, Object.defineProperty(R, "ref", {
417
417
  get: re,
@@ -419,13 +419,13 @@ function hm() {
419
419
  });
420
420
  }
421
421
  }
422
- var dn = function(R, U, re, be, Me, Be, ke) {
422
+ var dn = function(R, W, re, be, Me, Be, ke) {
423
423
  var Ee = {
424
424
  // This tag allows us to uniquely identify this as a React Element
425
425
  $$typeof: t,
426
426
  // Built-in properties that belong on the element
427
427
  type: R,
428
- key: U,
428
+ key: W,
429
429
  ref: re,
430
430
  props: ke,
431
431
  // Record the component responsible for creating this element.
@@ -448,12 +448,12 @@ function hm() {
448
448
  value: Me
449
449
  }), Object.freeze && (Object.freeze(Ee.props), Object.freeze(Ee)), Ee;
450
450
  };
451
- function mr(R, U, re, be, Me) {
451
+ function mr(R, W, re, be, Me) {
452
452
  {
453
453
  var Be, ke = {}, Ee = null, dt = null;
454
- re !== void 0 && (Fe(re), Ee = "" + re), rt(U) && (Fe(U.key), Ee = "" + U.key), Gt(U) && (dt = U.ref, yt(U, Me));
455
- for (Be in U)
456
- ue.call(U, Be) && !bt.hasOwnProperty(Be) && (ke[Be] = U[Be]);
454
+ re !== void 0 && (Fe(re), Ee = "" + re), rt(W) && (Fe(W.key), Ee = "" + W.key), Gt(W) && (dt = W.ref, yt(W, Me));
455
+ for (Be in W)
456
+ ue.call(W, Be) && !bt.hasOwnProperty(Be) && (ke[Be] = W[Be]);
457
457
  if (R && R.defaultProps) {
458
458
  var Xe = R.defaultProps;
459
459
  for (Be in Xe)
@@ -469,7 +469,7 @@ function hm() {
469
469
  var fn = x.ReactCurrentOwner, Mt = x.ReactDebugCurrentFrame;
470
470
  function Kt(R) {
471
471
  if (R) {
472
- var U = R._owner, re = je(R.type, R._source, U ? U.type : null);
472
+ var W = R._owner, re = je(R.type, R._source, W ? W.type : null);
473
473
  Mt.setExtraStackFrame(re);
474
474
  } else
475
475
  Mt.setExtraStackFrame(null);
@@ -497,22 +497,22 @@ Check the render method of \`` + R + "`.";
497
497
  var hn = {};
498
498
  function gr(R) {
499
499
  {
500
- var U = Ae();
501
- if (!U) {
500
+ var W = Ae();
501
+ if (!W) {
502
502
  var re = typeof R == "string" ? R : R.displayName || R.name;
503
- re && (U = `
503
+ re && (W = `
504
504
 
505
505
  Check the top-level render call using <` + re + ">.");
506
506
  }
507
- return U;
507
+ return W;
508
508
  }
509
509
  }
510
- function zn(R, U) {
510
+ function zn(R, W) {
511
511
  {
512
512
  if (!R._store || R._store.validated || R.key != null)
513
513
  return;
514
514
  R._store.validated = !0;
515
- var re = gr(U);
515
+ var re = gr(W);
516
516
  if (hn[re])
517
517
  return;
518
518
  hn[re] = !0;
@@ -520,14 +520,14 @@ Check the top-level render call using <` + re + ">.");
520
520
  R && R._owner && R._owner !== fn.current && (be = " It was passed a child from " + G(R._owner.type) + "."), Kt(R), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', re, be), Kt(null);
521
521
  }
522
522
  }
523
- function vr(R, U) {
523
+ function vr(R, W) {
524
524
  {
525
525
  if (typeof R != "object")
526
526
  return;
527
527
  if (Qe(R))
528
528
  for (var re = 0; re < R.length; re++) {
529
529
  var be = R[re];
530
- le(be) && zn(be, U);
530
+ le(be) && zn(be, W);
531
531
  }
532
532
  else if (le(R))
533
533
  R._store && (R._store.validated = !0);
@@ -535,39 +535,39 @@ Check the top-level render call using <` + re + ">.");
535
535
  var Me = p(R);
536
536
  if (typeof Me == "function" && Me !== R.entries)
537
537
  for (var Be = Me.call(R), ke; !(ke = Be.next()).done; )
538
- le(ke.value) && zn(ke.value, U);
538
+ le(ke.value) && zn(ke.value, W);
539
539
  }
540
540
  }
541
541
  }
542
542
  function to(R) {
543
543
  {
544
- var U = R.type;
545
- if (U == null || typeof U == "string")
544
+ var W = R.type;
545
+ if (W == null || typeof W == "string")
546
546
  return;
547
547
  var re;
548
- if (typeof U == "function")
549
- re = U.propTypes;
550
- else if (typeof U == "object" && (U.$$typeof === l || // Note: Memo only checks outer props here.
548
+ if (typeof W == "function")
549
+ re = W.propTypes;
550
+ else if (typeof W == "object" && (W.$$typeof === l || // Note: Memo only checks outer props here.
551
551
  // Inner props are checked in the reconciler.
552
- U.$$typeof === h))
553
- re = U.propTypes;
552
+ W.$$typeof === h))
553
+ re = W.propTypes;
554
554
  else
555
555
  return;
556
556
  if (re) {
557
- var be = G(U);
557
+ var be = G(W);
558
558
  Ne(re, R.props, "prop", be, R);
559
- } else if (U.PropTypes !== void 0 && !ie) {
559
+ } else if (W.PropTypes !== void 0 && !ie) {
560
560
  ie = !0;
561
- var Me = G(U);
561
+ var Me = G(W);
562
562
  w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Me || "Unknown");
563
563
  }
564
- typeof U.getDefaultProps == "function" && !U.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
564
+ typeof W.getDefaultProps == "function" && !W.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
565
565
  }
566
566
  }
567
567
  function on(R) {
568
568
  {
569
- for (var U = Object.keys(R.props), re = 0; re < U.length; re++) {
570
- var be = U[re];
569
+ for (var W = Object.keys(R.props), re = 0; re < W.length; re++) {
570
+ var be = W[re];
571
571
  if (be !== "children" && be !== "key") {
572
572
  Kt(R), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", be), Kt(null);
573
573
  break;
@@ -576,7 +576,7 @@ Check the top-level render call using <` + re + ">.");
576
576
  R.ref !== null && (Kt(R), w("Invalid attribute `ref` supplied to `React.Fragment`."), Kt(null));
577
577
  }
578
578
  }
579
- function Un(R, U, re, be, Me, Be) {
579
+ function Un(R, W, re, be, Me, Be) {
580
580
  {
581
581
  var ke = j(R);
582
582
  if (!ke) {
@@ -587,11 +587,11 @@ Check the top-level render call using <` + re + ">.");
587
587
  var Xe;
588
588
  R === null ? Xe = "null" : Qe(R) ? Xe = "array" : R !== void 0 && R.$$typeof === t ? (Xe = "<" + (G(R.type) || "Unknown") + " />", Ee = " Did you accidentally export a JSX literal instead of a component?") : Xe = typeof R, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Xe, Ee);
589
589
  }
590
- var et = mr(R, U, re, Me, Be);
590
+ var et = mr(R, W, re, Me, Be);
591
591
  if (et == null)
592
592
  return et;
593
593
  if (ke) {
594
- var Nt = U.children;
594
+ var Nt = W.children;
595
595
  if (Nt !== void 0)
596
596
  if (be)
597
597
  if (Qe(Nt)) {
@@ -606,11 +606,11 @@ Check the top-level render call using <` + re + ">.");
606
606
  return R === r ? on(et) : to(et), et;
607
607
  }
608
608
  }
609
- function _p(R, U, re) {
610
- return Un(R, U, re, !0);
609
+ function _p(R, W, re) {
610
+ return Un(R, W, re, !0);
611
611
  }
612
- function Op(R, U, re) {
613
- return Un(R, U, re, !1);
612
+ function Op(R, W, re) {
613
+ return Un(R, W, re, !1);
614
614
  }
615
615
  var Mp = Op, Dp = _p;
616
616
  br.Fragment = r, br.jsx = Mp, br.jsxs = Dp;
@@ -1849,7 +1849,7 @@ const Wl = (e) => {
1849
1849
  headers: N,
1850
1850
  withCredentials: I = "same-origin",
1851
1851
  fetchOptions: j
1852
- } = Wl(b), L = t || fetch;
1852
+ } = Wl(b), F = t || fetch;
1853
1853
  C = C ? (C + "").toLowerCase() : "text";
1854
1854
  let H = kg([w, y && y.toAbortSignal()], E), G = null;
1855
1855
  const P = H && H.unsubscribe && (() => {
@@ -1858,53 +1858,53 @@ const Wl = (e) => {
1858
1858
  let X;
1859
1859
  try {
1860
1860
  if (T && u && p !== "get" && p !== "head" && (X = await g(N, x)) !== 0) {
1861
- let V = new n(v, {
1861
+ let D = new n(v, {
1862
1862
  method: "POST",
1863
1863
  body: x,
1864
1864
  duplex: "half"
1865
- }), ee;
1866
- if (k.isFormData(x) && (ee = V.headers.get("content-type")) && N.setContentType(ee), V.body) {
1867
- const [F, Z] = rc(
1865
+ }), Z;
1866
+ if (k.isFormData(x) && (Z = D.headers.get("content-type")) && N.setContentType(Z), D.body) {
1867
+ const [B, J] = rc(
1868
1868
  X,
1869
1869
  _o(oc(T))
1870
1870
  );
1871
- x = ic(V.body, ac, F, Z);
1871
+ x = ic(D.body, ac, B, J);
1872
1872
  }
1873
1873
  }
1874
1874
  k.isString(I) || (I = I ? "include" : "omit");
1875
- const M = s && "credentials" in n.prototype, J = {
1875
+ const V = s && "credentials" in n.prototype, ne = {
1876
1876
  ...j,
1877
1877
  signal: H,
1878
1878
  method: p.toUpperCase(),
1879
1879
  headers: N.normalize().toJSON(),
1880
1880
  body: x,
1881
1881
  duplex: "half",
1882
- credentials: M ? I : void 0
1882
+ credentials: V ? I : void 0
1883
1883
  };
1884
- G = s && new n(v, J);
1885
- let _ = await (s ? L(G, j) : L(v, J));
1886
- const O = d && (C === "stream" || C === "response");
1887
- if (d && (S || O && P)) {
1888
- const V = {};
1884
+ G = s && new n(v, ne);
1885
+ let _ = await (s ? F(G, j) : F(v, ne));
1886
+ const M = d && (C === "stream" || C === "response");
1887
+ if (d && (S || M && P)) {
1888
+ const D = {};
1889
1889
  ["status", "statusText", "headers"].forEach((ae) => {
1890
- V[ae] = _[ae];
1890
+ D[ae] = _[ae];
1891
1891
  });
1892
- const ee = k.toFiniteNumber(_.headers.get("content-length")), [F, Z] = S && rc(
1893
- ee,
1892
+ const Z = k.toFiniteNumber(_.headers.get("content-length")), [B, J] = S && rc(
1893
+ Z,
1894
1894
  _o(oc(S), !0)
1895
1895
  ) || [];
1896
1896
  _ = new r(
1897
- ic(_.body, ac, F, () => {
1898
- Z && Z(), P && P();
1897
+ ic(_.body, ac, B, () => {
1898
+ J && J(), P && P();
1899
1899
  }),
1900
- V
1900
+ D
1901
1901
  );
1902
1902
  }
1903
1903
  C = C || "text";
1904
- let W = await h[k.findKey(h, C) || "text"](_, b);
1905
- return !O && P && P(), await new Promise((V, ee) => {
1906
- zl(V, ee, {
1907
- data: W,
1904
+ let O = await h[k.findKey(h, C) || "text"](_, b);
1905
+ return !M && P && P(), await new Promise((D, Z) => {
1906
+ zl(D, Z, {
1907
+ data: O,
1908
1908
  headers: gt.from(_.headers),
1909
1909
  status: _.status,
1910
1910
  statusText: _.statusText,
@@ -1912,13 +1912,13 @@ const Wl = (e) => {
1912
1912
  request: G
1913
1913
  });
1914
1914
  });
1915
- } catch (M) {
1916
- throw P && P(), M && M.name === "TypeError" && /Load failed|fetch/i.test(M.message) ? Object.assign(
1915
+ } catch (V) {
1916
+ throw P && P(), V && V.name === "TypeError" && /Load failed|fetch/i.test(V.message) ? Object.assign(
1917
1917
  new ye("Network Error", ye.ERR_NETWORK, b, G),
1918
1918
  {
1919
- cause: M.cause || M
1919
+ cause: V.cause || V
1920
1920
  }
1921
- ) : ye.from(M, M && M.code, b, G);
1921
+ ) : ye.from(V, V && V.code, b, G);
1922
1922
  }
1923
1923
  };
1924
1924
  }, Dg = /* @__PURE__ */ new Map(), Vl = (e) => {
@@ -2514,72 +2514,72 @@ function Yg(e = {}) {
2514
2514
  }, []), C = $e(
2515
2515
  (N, I, j) => {
2516
2516
  w.current && (w.current.abort(), w.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && h("");
2517
- const L = new AbortController();
2518
- return w.current = L, (async () => {
2519
- var P, X, M, J, _, O;
2517
+ const F = new AbortController();
2518
+ return w.current = F, (async () => {
2519
+ var P, X, V, ne, _, M;
2520
2520
  const H = (() => {
2521
- var W;
2521
+ var O;
2522
2522
  try {
2523
- return typeof window < "u" && ((W = window.localStorage) == null ? void 0 : W.getItem("chat-debug")) === "1";
2523
+ return typeof window < "u" && ((O = window.localStorage) == null ? void 0 : O.getItem("chat-debug")) === "1";
2524
2524
  } catch {
2525
2525
  return !1;
2526
2526
  }
2527
- })(), G = (W) => {
2528
- var V;
2527
+ })(), G = (O) => {
2528
+ var D;
2529
2529
  try {
2530
- const ee = JSON.parse(JSON.stringify(W));
2531
- return (V = ee == null ? void 0 : ee.payload) != null && V.files_info && Array.isArray(ee.payload.files_info) && (ee.payload.files_info = ee.payload.files_info.map((F) => ({
2532
- ...F,
2533
- data: F != null && F.data ? `<base64 ${String(F.data).length} chars>` : F == null ? void 0 : F.data
2534
- }))), ee;
2530
+ const Z = JSON.parse(JSON.stringify(O));
2531
+ return (D = Z == null ? void 0 : Z.payload) != null && D.files_info && Array.isArray(Z.payload.files_info) && (Z.payload.files_info = Z.payload.files_info.map((B) => ({
2532
+ ...B,
2533
+ data: B != null && B.data ? `<base64 ${String(B.data).length} chars>` : B == null ? void 0 : B.data
2534
+ }))), Z;
2535
2535
  } catch {
2536
- return W;
2536
+ return O;
2537
2537
  }
2538
2538
  };
2539
2539
  try {
2540
- let W = {};
2540
+ let O = {};
2541
2541
  try {
2542
2542
  if (r)
2543
- W = { Authorization: `Bearer ${r}` };
2543
+ O = { Authorization: `Bearer ${r}` };
2544
2544
  else if (typeof window < "u") {
2545
2545
  const ae = window.__AUTH_TOKEN__, ge = ((P = window.localStorage) == null ? void 0 : P.getItem("authToken")) || null;
2546
- let $ = null;
2546
+ let z = null;
2547
2547
  try {
2548
2548
  const K = (X = window.localStorage) == null ? void 0 : X.getItem("chat-settings");
2549
- K && ($ = ((M = JSON.parse(K)) == null ? void 0 : M.apiKey) || null);
2549
+ K && (z = ((V = JSON.parse(K)) == null ? void 0 : V.apiKey) || null);
2550
2550
  } catch {
2551
2551
  }
2552
- const A = ae || ge || $ || null;
2553
- A && (W = { Authorization: `Bearer ${A}` });
2552
+ const A = ae || ge || z || null;
2553
+ A && (O = { Authorization: `Bearer ${A}` });
2554
2554
  }
2555
2555
  } catch {
2556
2556
  }
2557
2557
  H && console.debug("[use-chat] POST", t + n, G(N));
2558
- const V = await fetch(t + n, {
2558
+ const D = await fetch(t + n, {
2559
2559
  method: "POST",
2560
2560
  headers: {
2561
2561
  "Content-Type": "application/json",
2562
2562
  Accept: "text/event-stream",
2563
- ...W,
2563
+ ...O,
2564
2564
  ...s.current
2565
2565
  },
2566
2566
  body: JSON.stringify(N),
2567
- signal: L.signal
2567
+ signal: F.signal
2568
2568
  });
2569
- if (!V.ok || !V.body) {
2570
- const Z = await V.text().catch(() => "");
2571
- throw H && console.debug("[use-chat] non-OK response", V.status, Z == null ? void 0 : Z.slice(0, 500)), new Error(`stream ${V.status}${Z ? ": " + Z : ""}`);
2569
+ if (!D.ok || !D.body) {
2570
+ const J = await D.text().catch(() => "");
2571
+ throw H && console.debug("[use-chat] non-OK response", D.status, J == null ? void 0 : J.slice(0, 500)), new Error(`stream ${D.status}${J ? ": " + J : ""}`);
2572
2572
  }
2573
2573
  x(!0);
2574
- let ee = null, F = null;
2574
+ let Z = null, B = null;
2575
2575
  try {
2576
- const Z = V.headers.get("X-Thread-Id") || V.headers.get("x-thread-id"), ae = V.headers.get("X-Thread-Created") || V.headers.get("x-thread-created"), ge = Z ?? null, $ = String(ae ?? "").toLowerCase() === "true";
2577
- (J = j == null ? void 0 : j.onOpen) == null || J.call(j, { threadId: ge, created: $ }), ee = V.body.getReader(), F = new TextDecoder();
2578
- let A = "", K = "", te = y.current;
2576
+ const J = D.headers.get("X-Thread-Id") || D.headers.get("x-thread-id"), ae = D.headers.get("X-Thread-Created") || D.headers.get("x-thread-created"), ge = J ?? null, z = String(ae ?? "").toLowerCase() === "true";
2577
+ (ne = j == null ? void 0 : j.onOpen) == null || ne.call(j, { threadId: ge, created: z }), Z = D.body.getReader(), B = new TextDecoder();
2578
+ let A = "", K = "", ee = y.current;
2579
2579
  for (; ; ) {
2580
- const { value: ce, done: se } = await ee.read();
2580
+ const { value: ce, done: se } = await Z.read();
2581
2581
  if (se) break;
2582
- A += F.decode(ce, { stream: !0 });
2582
+ A += B.decode(ce, { stream: !0 });
2583
2583
  let Ce;
2584
2584
  for (; (Ce = A.indexOf(`
2585
2585
 
@@ -2598,7 +2598,7 @@ function Yg(e = {}) {
2598
2598
  const pe = qg(ue) ? ue.data : ue;
2599
2599
  H && console.debug("[use-chat] event:", pe == null ? void 0 : pe.type, pe);
2600
2600
  const Le = pe.seq;
2601
- if (Le !== void 0 && (te > 0 && Le > te + 1 && console.warn(`[use-chat] Gap detected: expected ${te + 1}, got ${Le}`), te = Le, y.current = Le, v(Le)), Le !== void 0 && Le <= y.current) {
2601
+ if (Le !== void 0 && (ee > 0 && Le > ee + 1 && console.warn(`[use-chat] Gap detected: expected ${ee + 1}, got ${Le}`), ee = Le, y.current = Le, v(Le)), Le !== void 0 && Le <= y.current) {
2602
2602
  H && console.debug("[use-chat] Duplicate event ignored:", Le);
2603
2603
  continue;
2604
2604
  }
@@ -2612,25 +2612,25 @@ function Yg(e = {}) {
2612
2612
  }
2613
2613
  }
2614
2614
  K && h((ce) => ce + K);
2615
- } catch (Z) {
2616
- if ((Z == null ? void 0 : Z.name) === "AbortError") return;
2617
- const ae = (Z == null ? void 0 : Z.message) || String(Z);
2615
+ } catch (J) {
2616
+ if ((J == null ? void 0 : J.name) === "AbortError") return;
2617
+ const ae = (J == null ? void 0 : J.message) || String(J);
2618
2618
  H && console.debug("[use-chat] error:", ae), u(ae), (_ = j == null ? void 0 : j.onError) == null || _.call(j, ae);
2619
2619
  } finally {
2620
2620
  try {
2621
- ee == null || ee.cancel();
2621
+ Z == null || Z.cancel();
2622
2622
  } catch {
2623
2623
  }
2624
2624
  a(!1), x(!1), w.current = null;
2625
2625
  }
2626
- } catch (W) {
2627
- if ((W == null ? void 0 : W.name) === "AbortError") return;
2628
- const V = (W == null ? void 0 : W.message) || String(W);
2629
- H && console.debug("[use-chat] connection error:", V), u(V), (O = j == null ? void 0 : j.onError) == null || O.call(j, V);
2626
+ } catch (O) {
2627
+ if ((O == null ? void 0 : O.name) === "AbortError") return;
2628
+ const D = (O == null ? void 0 : O.message) || String(O);
2629
+ H && console.debug("[use-chat] connection error:", D), u(D), (M = j == null ? void 0 : j.onError) == null || M.call(j, D);
2630
2630
  } finally {
2631
2631
  a(!1), x(!1), w.current = null;
2632
2632
  }
2633
- })(), { close: () => L.abort() };
2633
+ })(), { close: () => F.abort() };
2634
2634
  },
2635
2635
  [t, r, e.autoAppendAssistant]
2636
2636
  );
@@ -2931,52 +2931,52 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2931
2931
  }), [b, v] = fe(() => typeof l.getAuthToken == "function" ? l.getAuthToken() : null);
2932
2932
  Ye(() => {
2933
2933
  g(typeof l.getAuthToken == "function" ? l.getAuthToken() : null);
2934
- const z = l.onTokenChange((Q) => {
2934
+ const U = l.onTokenChange((Q) => {
2935
2935
  v(Q), g(Q);
2936
2936
  });
2937
2937
  return () => {
2938
- z();
2938
+ U();
2939
2939
  };
2940
2940
  }, [l, g]);
2941
- const p = $e((z) => {
2942
- l.setAuthToken(z);
2943
- }, [l]), { state: x, seed: w, prepend: y, pushUser: E, onEvent: S, reset: T } = Qg(), C = 20, [N, I] = fe(!1), [j, L] = fe(!1), [H, G] = fe(null), [P, X] = fe(void 0), [M, J] = fe(void 0), _ = ze(!1), O = ze([]), W = $e((z) => {
2944
- z.cursor !== void 0 && G(z.cursor), z.hasMore !== void 0 && I(z.hasMore), z.checkpointId !== void 0 && X(z.checkpointId), z.checkpointNs !== void 0 && J(z.checkpointNs);
2945
- }, []), V = $e((z, Q) => {
2941
+ const p = $e((U) => {
2942
+ l.setAuthToken(U);
2943
+ }, [l]), { state: x, seed: w, prepend: y, pushUser: E, onEvent: S, reset: T } = Qg(), C = 20, [N, I] = fe(!1), [j, F] = fe(!1), [H, G] = fe(null), [P, X] = fe(void 0), [V, ne] = fe(void 0), _ = ze(!1), M = ze([]), O = $e((U) => {
2944
+ U.cursor !== void 0 && G(U.cursor), U.hasMore !== void 0 && I(U.hasMore), U.checkpointId !== void 0 && X(U.checkpointId), U.checkpointNs !== void 0 && ne(U.checkpointNs);
2945
+ }, []), D = $e((U, Q) => {
2946
2946
  const Fe = async () => {
2947
2947
  if (_.current) {
2948
- console.warn(`[ChatProvider] Operation "${Q}" queued - another operation in progress`), O.current.push(Fe);
2948
+ console.warn(`[ChatProvider] Operation "${Q}" queued - another operation in progress`), M.current.push(Fe);
2949
2949
  return;
2950
2950
  }
2951
2951
  _.current = !0;
2952
2952
  try {
2953
- console.log(`[ChatProvider] Executing operation: ${Q}`), await z();
2953
+ console.log(`[ChatProvider] Executing operation: ${Q}`), await U();
2954
2954
  } catch (Ve) {
2955
2955
  throw console.error(`[ChatProvider] Operation "${Q}" failed:`, Ve), Ve;
2956
2956
  } finally {
2957
2957
  _.current = !1;
2958
- const Ve = O.current.shift();
2958
+ const Ve = M.current.shift();
2959
2959
  Ve && Ve().catch(() => {
2960
2960
  });
2961
2961
  }
2962
2962
  };
2963
- _.current ? (O.current.push(Fe), console.log(`[ChatProvider] Queued operation: ${Q}`)) : Fe().catch(() => {
2963
+ _.current ? (M.current.push(Fe), console.log(`[ChatProvider] Queued operation: ${Q}`)) : Fe().catch(() => {
2964
2964
  });
2965
- }, []), ee = $e(
2966
- (z, Q) => {
2967
- const Fe = Array.isArray(z == null ? void 0 : z.messages) ? z.messages : [];
2965
+ }, []), Z = $e(
2966
+ (U, Q) => {
2967
+ const Fe = Array.isArray(U == null ? void 0 : U.messages) ? U.messages : [];
2968
2968
  Q === "replace" ? w(Fe, {
2969
- checkpointId: (z == null ? void 0 : z.checkpointId) ?? null,
2970
- checkpointNs: (z == null ? void 0 : z.checkpointNs) ?? null
2971
- }) : Q === "prepend" && Fe.length ? (console.log("[ChatProvider] Calling prepend with", Fe.length, "messages"), y(Fe)) : console.log("[ChatProvider] Skipping prepend - empty list or wrong mode"), G((z == null ? void 0 : z.nextCursor) ?? null), I(!!(z != null && z.hasMore)), X((Ve) => (z == null ? void 0 : z.checkpointId) ?? Ve ?? void 0), J((Ve) => (z == null ? void 0 : z.checkpointNs) ?? Ve ?? void 0);
2969
+ checkpointId: (U == null ? void 0 : U.checkpointId) ?? null,
2970
+ checkpointNs: (U == null ? void 0 : U.checkpointNs) ?? null
2971
+ }) : Q === "prepend" && Fe.length ? (console.log("[ChatProvider] Calling prepend with", Fe.length, "messages"), y(Fe)) : console.log("[ChatProvider] Skipping prepend - empty list or wrong mode"), G((U == null ? void 0 : U.nextCursor) ?? null), I(!!(U != null && U.hasMore)), X((Ve) => (U == null ? void 0 : U.checkpointId) ?? Ve ?? void 0), ne((Ve) => (U == null ? void 0 : U.checkpointNs) ?? Ve ?? void 0);
2972
2972
  },
2973
2973
  [w, y]
2974
- ), [F, Z] = fe([]), [ae, ge] = fe(null), $ = $e(async () => {
2975
- const z = await l.listThreads();
2976
- Z(z);
2977
- }, [l]), [A, K] = fe(!1), te = $e(
2978
- async (z) => {
2979
- const Q = (z == null ? void 0 : z.maxAttempts) ?? 5, Fe = (z == null ? void 0 : z.baseDelayMs) ?? 500, Ve = (z == null ? void 0 : z.timeoutMs) ?? 2e3;
2974
+ ), [B, J] = fe([]), [ae, ge] = fe(null), z = $e(async () => {
2975
+ const U = await l.listThreads();
2976
+ J(U);
2977
+ }, [l]), [A, K] = fe(!1), ee = $e(
2978
+ async (U) => {
2979
+ const Q = (U == null ? void 0 : U.maxAttempts) ?? 5, Fe = (U == null ? void 0 : U.baseDelayMs) ?? 500, Ve = (U == null ? void 0 : U.timeoutMs) ?? 2e3;
2980
2980
  if (!l.baseUrl) return !1;
2981
2981
  const bt = l.baseUrl.replace(/\/+$/, ""), pt = [
2982
2982
  "/health",
@@ -3017,23 +3017,23 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3017
3017
  [l.baseUrl]
3018
3018
  );
3019
3019
  Ye(() => {
3020
- let z = !0;
3020
+ let U = !0;
3021
3021
  if (!l.baseUrl) {
3022
3022
  console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
3023
3023
  return;
3024
3024
  }
3025
3025
  return (async () => {
3026
3026
  try {
3027
- const Q = await te();
3028
- if (!z) return;
3029
- Q ? $().catch(() => {
3027
+ const Q = await ee();
3028
+ if (!U) return;
3029
+ Q ? z().catch(() => {
3030
3030
  }) : console.warn("[ChatProvider] backend health-check failed — skipping initial loads");
3031
3031
  } catch {
3032
3032
  }
3033
3033
  })(), () => {
3034
- z = !1;
3034
+ U = !1;
3035
3035
  };
3036
- }, [$, l.baseUrl, te]), Ye(() => {
3036
+ }, [z, l.baseUrl, ee]), Ye(() => {
3037
3037
  r == null || r(ae);
3038
3038
  }, [ae, r]);
3039
3039
  const ce = ze(null);
@@ -3052,8 +3052,8 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3052
3052
  }
3053
3053
  }, [o, s, l.baseUrl, A]);
3054
3054
  const se = ze(null), Ce = $e(
3055
- async (z, Q, Fe) => {
3056
- await V(async () => {
3055
+ async (U, Q, Fe) => {
3056
+ await D(async () => {
3057
3057
  if (!l.baseUrl) {
3058
3058
  console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
3059
3059
  return;
@@ -3062,34 +3062,34 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3062
3062
  console.warn(`[ChatProvider] Thread load cancelled - another thread (${se.current}) is loading`);
3063
3063
  return;
3064
3064
  }
3065
- se.current = z;
3065
+ se.current = U;
3066
3066
  try {
3067
- W({
3067
+ O({
3068
3068
  cursor: null,
3069
3069
  hasMore: !1,
3070
3070
  checkpointId: void 0,
3071
3071
  checkpointNs: void 0
3072
3072
  });
3073
3073
  const Ve = await l.getMessages({
3074
- threadId: z,
3074
+ threadId: U,
3075
3075
  checkpointId: Q,
3076
3076
  checkpointNs: Fe,
3077
3077
  limit: C
3078
3078
  });
3079
- ge(z), ee(Ve, "replace");
3079
+ ge(U), Z(Ve, "replace");
3080
3080
  } finally {
3081
3081
  se.current = null;
3082
3082
  }
3083
- }, `loadThread-${z}`);
3083
+ }, `loadThread-${U}`);
3084
3084
  },
3085
- [l, ee, V, W]
3086
- ), Pe = $e(async (z) => {
3087
- const Q = await l.listCheckpoints(z);
3088
- return iv(Q, z);
3089
- }, [l]), je = $e(async (z, Q) => {
3090
- await V(async () => {
3085
+ [l, Z, D, O]
3086
+ ), Pe = $e(async (U) => {
3087
+ const Q = await l.listCheckpoints(U);
3088
+ return iv(Q, U);
3089
+ }, [l]), je = $e(async (U, Q) => {
3090
+ await D(async () => {
3091
3091
  if (!ae) throw new Error("No active thread");
3092
- W({
3092
+ O({
3093
3093
  cursor: null,
3094
3094
  hasMore: !1,
3095
3095
  checkpointId: void 0,
@@ -3097,19 +3097,19 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3097
3097
  });
3098
3098
  const Fe = await l.getMessages({
3099
3099
  threadId: ae,
3100
- checkpointId: z,
3100
+ checkpointId: U,
3101
3101
  checkpointNs: Q ?? void 0,
3102
3102
  limit: C
3103
3103
  });
3104
- ee(Fe, "replace");
3105
- }, `navigateToCheckpoint-${z}`);
3106
- }, [l, ae, ee, V, W]), ue = $e(async () => {
3104
+ Z(Fe, "replace");
3105
+ }, `navigateToCheckpoint-${U}`);
3106
+ }, [l, ae, Z, D, O]), ue = $e(async () => {
3107
3107
  if (!ae) throw new Error("No active thread");
3108
3108
  await Ce(ae);
3109
3109
  }, [ae, Ce]), pe = ze(!1);
3110
3110
  Ye(() => {
3111
- const z = pe.current;
3112
- pe.current = u, z && !u && ae && V(async () => {
3111
+ const U = pe.current;
3112
+ pe.current = u, U && !u && ae && D(async () => {
3113
3113
  try {
3114
3114
  const Q = await l.getMessages({
3115
3115
  threadId: ae,
@@ -3118,32 +3118,32 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3118
3118
  checkpointNs: void 0,
3119
3119
  limit: C
3120
3120
  });
3121
- ee(Q, "replace");
3121
+ Z(Q, "replace");
3122
3122
  } catch (Q) {
3123
3123
  console.warn("[ChatProvider] Post-streaming fetch failed:", Q);
3124
3124
  }
3125
3125
  try {
3126
- await $();
3126
+ await z();
3127
3127
  } catch (Q) {
3128
3128
  console.warn("[ChatProvider] Post-streaming thread refresh failed:", Q);
3129
3129
  }
3130
3130
  }, "postStreamingRefresh");
3131
- }, [u, ae, l, ee, $, V]);
3132
- const Le = $e(async (z) => {
3133
- const Q = await l.createThread(z);
3134
- return await $(), await Ce(Q.threadId), Q.threadId;
3135
- }, [l, $, Ce]), he = $e(async (z) => {
3136
- await l.deleteThread(z), await $(), ae === z && (ge(null), T([]), I(!1), G(null), X(void 0), J(void 0));
3137
- }, [l, $, ae, T]), Ne = $e(async (z, Q) => {
3138
- await l.updateThread(z, Q), await $();
3139
- }, [l, $]), Ke = $e(async (z, Q) => {
3131
+ }, [u, ae, l, Z, z, D]);
3132
+ const Le = $e(async (U) => {
3133
+ const Q = await l.createThread(U);
3134
+ return await z(), await Ce(Q.threadId), Q.threadId;
3135
+ }, [l, z, Ce]), he = $e(async (U) => {
3136
+ await l.deleteThread(U), await z(), ae === U && (ge(null), T([]), I(!1), G(null), X(void 0), ne(void 0));
3137
+ }, [l, z, ae, T]), Ne = $e(async (U, Q) => {
3138
+ await l.updateThread(U, Q), await z();
3139
+ }, [l, z]), Ke = $e(async (U, Q) => {
3140
3140
  var fn;
3141
3141
  const Fe = (Q == null ? void 0 : Q.attachments) || [], { contentParts: Ve, filesInfo: bt } = await cv(
3142
3142
  l,
3143
3143
  Fe,
3144
3144
  t == null ? void 0 : t.uploadPath
3145
3145
  ), pt = [];
3146
- z && z.trim() && pt.push({ type: "text", text: z.trim() });
3146
+ U && U.trim() && pt.push({ type: "text", text: U.trim() });
3147
3147
  const wt = {
3148
3148
  id: ((fn = crypto.randomUUID) == null ? void 0 : fn.call(crypto)) || `user-${Date.now()}`,
3149
3149
  role: "user",
@@ -3181,39 +3181,39 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3181
3181
  {
3182
3182
  onError: (Mt) => console.warn("stream error", Mt),
3183
3183
  onOpen: ({ threadId: Mt, created: Kt }) => {
3184
- !ae && Mt && (ge(Mt), Kt && $().catch(() => {
3184
+ !ae && Mt && (ge(Mt), Kt && z().catch(() => {
3185
3185
  }));
3186
3186
  }
3187
3187
  }
3188
3188
  );
3189
- }, [ae, E, h, S, x.lastCheckpointId, x.lastCheckpointNs, l, t == null ? void 0 : t.uploadPath, $, ge, i, a]), Qe = $e(
3190
- async (z) => {
3189
+ }, [ae, E, h, S, x.lastCheckpointId, x.lastCheckpointNs, l, t == null ? void 0 : t.uploadPath, z, ge, i, a]), Qe = $e(
3190
+ async (U) => {
3191
3191
  if (!ae) throw new Error("No active thread");
3192
3192
  if (j || !N) return;
3193
3193
  const Q = H;
3194
3194
  if (Q) {
3195
- L(!0);
3195
+ F(!0);
3196
3196
  try {
3197
3197
  const Fe = await l.getMessages({
3198
3198
  threadId: ae,
3199
3199
  checkpointId: P,
3200
- checkpointNs: M,
3201
- limit: (z == null ? void 0 : z.limit) ?? C,
3200
+ checkpointNs: V,
3201
+ limit: (U == null ? void 0 : U.limit) ?? C,
3202
3202
  beforeId: Q
3203
3203
  });
3204
- ee(Fe, "prepend");
3204
+ Z(Fe, "prepend");
3205
3205
  } finally {
3206
- L(!1);
3206
+ F(!1);
3207
3207
  }
3208
3208
  }
3209
3209
  },
3210
- [l, ae, P, M, H, N, j, ee, C]
3210
+ [l, ae, P, V, H, N, j, Z, C]
3211
3211
  ), st = {
3212
3212
  baseUrl: l.baseUrl,
3213
3213
  token: b,
3214
3214
  setToken: p,
3215
3215
  api: l,
3216
- threads: F,
3216
+ threads: B,
3217
3217
  currentThreadId: ae,
3218
3218
  setCurrentThreadId: ge,
3219
3219
  messages: x.messages,
@@ -3229,7 +3229,7 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3229
3229
  listCheckpoints: Pe,
3230
3230
  navigateToCheckpoint: je,
3231
3231
  returnToLatest: ue,
3232
- refreshThreads: $,
3232
+ refreshThreads: z,
3233
3233
  createThread: Le,
3234
3234
  deleteThread: he,
3235
3235
  renameThread: Ne,
@@ -3244,7 +3244,7 @@ function Ki() {
3244
3244
  if (!e) throw new Error("useChat must be used within ChatProvider");
3245
3245
  return e;
3246
3246
  }
3247
- function D(...e) {
3247
+ function L(...e) {
3248
3248
  return dm(um(e));
3249
3249
  }
3250
3250
  const lv = zr(
@@ -3277,7 +3277,7 @@ const lv = zr(
3277
3277
  return /* @__PURE__ */ c.jsx(
3278
3278
  i,
3279
3279
  {
3280
- className: D(lv({ variant: t, size: n, className: e })),
3280
+ className: L(lv({ variant: t, size: n, className: e })),
3281
3281
  ref: s,
3282
3282
  ...o
3283
3283
  }
@@ -3289,7 +3289,7 @@ const Jl = f.forwardRef(
3289
3289
  ({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
3290
3290
  "textarea",
3291
3291
  {
3292
- className: D(
3292
+ className: L(
3293
3293
  "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
3294
3294
  e
3295
3295
  ),
@@ -3478,7 +3478,7 @@ function qt(e) {
3478
3478
  t(e);
3479
3479
  };
3480
3480
  }
3481
- function B(e, ...t) {
3481
+ function $(e, ...t) {
3482
3482
  const n = gv(...t);
3483
3483
  return (r, o) => {
3484
3484
  switch (r) {
@@ -3624,7 +3624,7 @@ function tt(...e) {
3624
3624
  };
3625
3625
  }
3626
3626
  function me(e, t = eu) {
3627
- return B(e, Ue(t));
3627
+ return $(e, Ue(t));
3628
3628
  }
3629
3629
  function vi(...e) {
3630
3630
  return function(t, n) {
@@ -3774,13 +3774,13 @@ const ft = _e(
3774
3774
  () => {
3775
3775
  const e = Ie(), t = Ie(), n = q(0), r = Ie(), o = q(0), s = Ie(), i = Ie(), a = q(0), l = q(0), u = q(0), d = q(0), h = Ie(), m = Ie(), g = q(!1), b = q(!1), v = q(!1);
3776
3776
  return de(
3777
- B(
3777
+ $(
3778
3778
  e,
3779
3779
  oe(({ scrollTop: p }) => p)
3780
3780
  ),
3781
3781
  t
3782
3782
  ), de(
3783
- B(
3783
+ $(
3784
3784
  e,
3785
3785
  oe(({ scrollHeight: p }) => p)
3786
3786
  ),
@@ -4121,10 +4121,10 @@ const Mv = {
4121
4121
  }, tn = _e(
4122
4122
  ([{ log: e }, { recalcInProgress: t }]) => {
4123
4123
  const n = Ie(), r = Ie(), o = ut(r, 0), s = Ie(), i = Ie(), a = q(0), l = q([]), u = q(void 0), d = q(void 0), h = q((S, T) => vn(S, Mv[T])), m = q(void 0), g = q(0), b = Ev(), v = ut(
4124
- B(n, Te(l, e, g), Jt(Av, b), Ue()),
4124
+ $(n, Te(l, e, g), Jt(Av, b), Ue()),
4125
4125
  b
4126
4126
  ), p = ut(
4127
- B(
4127
+ $(
4128
4128
  l,
4129
4129
  Ue(),
4130
4130
  Jt((S, T) => ({ current: T, prev: S.current }), {
@@ -4136,12 +4136,12 @@ const Mv = {
4136
4136
  []
4137
4137
  );
4138
4138
  de(
4139
- B(
4139
+ $(
4140
4140
  l,
4141
4141
  ve((S) => S.length > 0),
4142
4142
  Te(v, g),
4143
4143
  oe(([S, T, C]) => {
4144
- const N = S.reduce((I, j, L) => Tt(I, j, Or(j, T.offsetTree, C) || L), Jn());
4144
+ const N = S.reduce((I, j, F) => Tt(I, j, Or(j, T.offsetTree, C) || F), Jn());
4145
4145
  return {
4146
4146
  ...T,
4147
4147
  groupIndices: S,
@@ -4151,7 +4151,7 @@ const Mv = {
4151
4151
  ),
4152
4152
  v
4153
4153
  ), de(
4154
- B(
4154
+ $(
4155
4155
  r,
4156
4156
  Te(v),
4157
4157
  ve(([S, { lastIndex: T }]) => S < T),
@@ -4166,14 +4166,14 @@ const Mv = {
4166
4166
  n
4167
4167
  ), de(u, d);
4168
4168
  const x = ut(
4169
- B(
4169
+ $(
4170
4170
  u,
4171
4171
  oe((S) => S === void 0)
4172
4172
  ),
4173
4173
  !0
4174
4174
  );
4175
4175
  de(
4176
- B(
4176
+ $(
4177
4177
  d,
4178
4178
  ve((S) => S !== void 0 && He(Je(v).sizeTree)),
4179
4179
  oe((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
@@ -4181,7 +4181,7 @@ const Mv = {
4181
4181
  n
4182
4182
  );
4183
4183
  const w = Rt(
4184
- B(
4184
+ $(
4185
4185
  n,
4186
4186
  Te(v),
4187
4187
  Jt(
@@ -4195,7 +4195,7 @@ const Mv = {
4195
4195
  )
4196
4196
  );
4197
4197
  De(
4198
- B(
4198
+ $(
4199
4199
  a,
4200
4200
  Jt(
4201
4201
  (S, T) => ({ diff: S.prev - T, prev: T }),
@@ -4212,7 +4212,7 @@ const Mv = {
4212
4212
  C.length > 0 && (S -= Cc(-S, C)), Se(i, S);
4213
4213
  }
4214
4214
  }
4215
- ), De(B(a, Te(e)), ([S, T]) => {
4215
+ ), De($(a, Te(e)), ([S, T]) => {
4216
4216
  S < 0 && T(
4217
4217
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
4218
4218
  { firstItemIndex: a },
@@ -4221,15 +4221,15 @@ const Mv = {
4221
4221
  });
4222
4222
  const y = Rt(s);
4223
4223
  de(
4224
- B(
4224
+ $(
4225
4225
  s,
4226
4226
  Te(v),
4227
4227
  oe(([S, T]) => {
4228
4228
  const C = T.groupIndices.length > 0, N = [], I = T.lastSize;
4229
4229
  if (C) {
4230
4230
  const j = Pr(T.sizeTree, 0);
4231
- let L = 0, H = 0;
4232
- for (; L < S; ) {
4231
+ let F = 0, H = 0;
4232
+ for (; F < S; ) {
4233
4233
  const P = T.groupIndices[H], X = T.groupIndices.length === H + 1 ? 1 / 0 : T.groupIndices[H + 1] - P - 1;
4234
4234
  N.push({
4235
4235
  endIndex: P,
@@ -4239,13 +4239,13 @@ const Mv = {
4239
4239
  endIndex: P + 1 + X - 1,
4240
4240
  size: I,
4241
4241
  startIndex: P + 1
4242
- }), H++, L += X + 1;
4242
+ }), H++, F += X + 1;
4243
4243
  }
4244
4244
  const G = In(T.sizeTree);
4245
- return L !== S && G.shift(), G.reduce(
4246
- (P, { k: X, v: M }) => {
4247
- let J = P.ranges;
4248
- return P.prevSize !== 0 && (J = [
4245
+ return F !== S && G.shift(), G.reduce(
4246
+ (P, { k: X, v: V }) => {
4247
+ let ne = P.ranges;
4248
+ return P.prevSize !== 0 && (ne = [
4249
4249
  ...P.ranges,
4250
4250
  {
4251
4251
  endIndex: X + S - 1,
@@ -4254,8 +4254,8 @@ const Mv = {
4254
4254
  }
4255
4255
  ]), {
4256
4256
  prevIndex: X + S,
4257
- prevSize: M,
4258
- ranges: J
4257
+ prevSize: V,
4258
+ ranges: ne
4259
4259
  };
4260
4260
  },
4261
4261
  {
@@ -4266,10 +4266,10 @@ const Mv = {
4266
4266
  ).ranges;
4267
4267
  }
4268
4268
  return In(T.sizeTree).reduce(
4269
- (j, { k: L, v: H }) => ({
4270
- prevIndex: L + S,
4269
+ (j, { k: F, v: H }) => ({
4270
+ prevIndex: F + S,
4271
4271
  prevSize: H,
4272
- ranges: [...j.ranges, { endIndex: L + S - 1, size: j.prevSize, startIndex: j.prevIndex }]
4272
+ ranges: [...j.ranges, { endIndex: F + S - 1, size: j.prevSize, startIndex: j.prevIndex }]
4273
4273
  }),
4274
4274
  {
4275
4275
  prevIndex: 0,
@@ -4282,7 +4282,7 @@ const Mv = {
4282
4282
  n
4283
4283
  );
4284
4284
  const E = Rt(
4285
- B(
4285
+ $(
4286
4286
  i,
4287
4287
  Te(v, g),
4288
4288
  oe(([S, { offsetTree: T }, C]) => {
@@ -4292,7 +4292,7 @@ const Mv = {
4292
4292
  )
4293
4293
  );
4294
4294
  return de(
4295
- B(
4295
+ $(
4296
4296
  i,
4297
4297
  Te(v, g),
4298
4298
  oe(([S, T, C]) => {
@@ -4301,11 +4301,11 @@ const Mv = {
4301
4301
  return T;
4302
4302
  let N = Jn();
4303
4303
  const I = Je(p);
4304
- let j = 0, L = 0, H = 0;
4304
+ let j = 0, F = 0, H = 0;
4305
4305
  for (; j < -S; ) {
4306
- H = I[L];
4307
- const G = I[L + 1] - H - 1;
4308
- L++, j += G + 1;
4306
+ H = I[F];
4307
+ const G = I[F + 1] - H - 1;
4308
+ F++, j += G + 1;
4309
4309
  }
4310
4310
  if (N = In(T.sizeTree).reduce((G, { k: P, v: X }) => Tt(G, Math.max(0, P + S), X), N), j !== -S) {
4311
4311
  const G = Pr(T.sizeTree, H);
@@ -4319,7 +4319,7 @@ const Mv = {
4319
4319
  ...yi(T.offsetTree, 0, N, C)
4320
4320
  };
4321
4321
  } else {
4322
- const N = In(T.sizeTree).reduce((I, { k: j, v: L }) => Tt(I, Math.max(0, j + S), L), Jn());
4322
+ const N = In(T.sizeTree).reduce((I, { k: j, v: F }) => Tt(I, Math.max(0, j + S), F), Jn());
4323
4323
  return {
4324
4324
  ...T,
4325
4325
  sizeTree: N,
@@ -4365,21 +4365,21 @@ function Dv(e) {
4365
4365
  }
4366
4366
  const du = _e(
4367
4367
  ([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
4368
- const s = Ie(), i = Ie(), a = Rt(B(s, oe(Dv)));
4368
+ const s = Ie(), i = Ie(), a = Rt($(s, oe(Dv)));
4369
4369
  return de(
4370
- B(
4370
+ $(
4371
4371
  a,
4372
4372
  oe((l) => l.totalCount)
4373
4373
  ),
4374
4374
  n
4375
4375
  ), de(
4376
- B(
4376
+ $(
4377
4377
  a,
4378
4378
  oe((l) => l.groupIndices)
4379
4379
  ),
4380
4380
  e
4381
4381
  ), de(
4382
- B(
4382
+ $(
4383
4383
  tt(o, t, r),
4384
4384
  ve(([l, u]) => ss(u)),
4385
4385
  oe(([l, u, d]) => $t(u.groupOffsetTree, Math.max(l - d, 0), "v")[0]),
@@ -4393,7 +4393,7 @@ const du = _e(
4393
4393
  ), Cn = _e(
4394
4394
  ([{ log: e }]) => {
4395
4395
  const t = q(!1), n = Rt(
4396
- B(
4396
+ $(
4397
4397
  t,
4398
4398
  ve((r) => r),
4399
4399
  Ue()
@@ -4431,35 +4431,35 @@ const Kr = _e(
4431
4431
  p && (p(), p = null), w && (w(), w = null), x && (clearTimeout(x), x = null), Se(l, !1);
4432
4432
  }
4433
4433
  return de(
4434
- B(
4434
+ $(
4435
4435
  g,
4436
4436
  Te(n, h, r, v, a, i, m),
4437
4437
  Te(e, s, o),
4438
4438
  oe(
4439
4439
  ([
4440
- [E, S, T, C, N, I, j, L],
4440
+ [E, S, T, C, N, I, j, F],
4441
4441
  H,
4442
4442
  G,
4443
4443
  P
4444
4444
  ]) => {
4445
- const X = fu(E), { align: M, behavior: J, offset: _ } = X, O = C - 1, W = uu(X, S, O);
4446
- let V = Or(W, S.offsetTree, H) + I;
4447
- M === "end" ? (V += G + $t(S.sizeTree, W)[1] - T + P, W === O && (V += j)) : M === "center" ? V += (G + $t(S.sizeTree, W)[1] - T + P) / 2 : V -= N, _ && (V += _);
4448
- const ee = (F) => {
4449
- y(), F ? (L("retrying to scroll to", { location: E }, vt.DEBUG), Se(g, E)) : (Se(b, !0), L("list did not change, scroll successful", {}, vt.DEBUG));
4445
+ const X = fu(E), { align: V, behavior: ne, offset: _ } = X, M = C - 1, O = uu(X, S, M);
4446
+ let D = Or(O, S.offsetTree, H) + I;
4447
+ V === "end" ? (D += G + $t(S.sizeTree, O)[1] - T + P, O === M && (D += j)) : V === "center" ? D += (G + $t(S.sizeTree, O)[1] - T + P) / 2 : D -= N, _ && (D += _);
4448
+ const Z = (B) => {
4449
+ y(), B ? (F("retrying to scroll to", { location: E }, vt.DEBUG), Se(g, E)) : (Se(b, !0), F("list did not change, scroll successful", {}, vt.DEBUG));
4450
4450
  };
4451
- if (y(), J === "smooth") {
4452
- let F = !1;
4453
- w = De(t, (Z) => {
4454
- F = F || Z;
4451
+ if (y(), ne === "smooth") {
4452
+ let B = !1;
4453
+ w = De(t, (J) => {
4454
+ B = B || J;
4455
4455
  }), p = Ft(d, () => {
4456
- ee(F);
4456
+ Z(B);
4457
4457
  });
4458
4458
  } else
4459
- p = Ft(B(t, Fv(150)), ee);
4459
+ p = Ft($(t, Fv(150)), Z);
4460
4460
  return x = setTimeout(() => {
4461
4461
  y();
4462
- }, 1200), Se(l, !0), L("scrolling from index to", { behavior: J, index: W, top: V }, vt.DEBUG), { behavior: J, top: V };
4462
+ }, 1200), Se(l, !0), F("scrolling from index to", { behavior: ne, index: O, top: D }, vt.DEBUG), { behavior: ne, top: D };
4463
4463
  }
4464
4464
  )
4465
4465
  ),
@@ -4496,7 +4496,7 @@ const Yr = _e(
4496
4496
  ([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: i }]) => {
4497
4497
  const a = q(!0), l = q(0), u = q(!0);
4498
4498
  return de(
4499
- B(
4499
+ $(
4500
4500
  i,
4501
4501
  Te(l),
4502
4502
  ve(([d, h]) => !!h),
@@ -4504,7 +4504,7 @@ const Yr = _e(
4504
4504
  ),
4505
4505
  a
4506
4506
  ), de(
4507
- B(
4507
+ $(
4508
4508
  i,
4509
4509
  Te(l),
4510
4510
  ve(([d, h]) => !!h),
@@ -4512,7 +4512,7 @@ const Yr = _e(
4512
4512
  ),
4513
4513
  u
4514
4514
  ), De(
4515
- B(
4515
+ $(
4516
4516
  tt(t, i),
4517
4517
  Te(a, n, e, u),
4518
4518
  ve(([[, d], h, { sizeTree: m }, g, b]) => d && (!He(m) || Yi(g)) && !h && !b),
@@ -4550,25 +4550,25 @@ const Mr = "up", Rr = "down", Bv = "none", $v = {
4550
4550
  }
4551
4551
  }, Hv = 0, qr = _e(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4552
4552
  const i = q(!1), a = q(!0), l = Ie(), u = Ie(), d = q(4), h = q(Hv), m = ut(
4553
- B(
4554
- vi(B(me(o), _n(1), qt(!0)), B(me(o), _n(1), qt(!1), wc(100))),
4553
+ $(
4554
+ vi($(me(o), _n(1), qt(!0)), $(me(o), _n(1), qt(!1), wc(100))),
4555
4555
  Ue()
4556
4556
  ),
4557
4557
  !1
4558
4558
  ), g = ut(
4559
- B(vi(B(n, qt(!0)), B(n, qt(!1), wc(200))), Ue()),
4559
+ $(vi($(n, qt(!0)), $(n, qt(!1), wc(200))), Ue()),
4560
4560
  !1
4561
4561
  );
4562
4562
  de(
4563
- B(
4563
+ $(
4564
4564
  tt(me(o), me(h)),
4565
4565
  oe(([w, y]) => w <= y),
4566
4566
  Ue()
4567
4567
  ),
4568
4568
  a
4569
- ), de(B(a, cn(50)), u);
4569
+ ), de($(a, cn(50)), u);
4570
4570
  const b = Rt(
4571
- B(
4571
+ $(
4572
4572
  tt(r, me(s), me(t), me(e), me(d)),
4573
4573
  Jt((w, [{ scrollHeight: y, scrollTop: E }, S, T, C, N]) => {
4574
4574
  const I = E + S - y > -N, j = {
@@ -4585,17 +4585,17 @@ const Mr = "up", Rr = "down", Bv = "none", $v = {
4585
4585
  state: j
4586
4586
  };
4587
4587
  }
4588
- let L;
4589
- return j.scrollHeight > w.state.scrollHeight ? L = "SIZE_INCREASED" : S < w.state.viewportHeight ? L = "VIEWPORT_HEIGHT_DECREASING" : E < w.state.scrollTop ? L = "SCROLLING_UPWARDS" : L = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
4588
+ let F;
4589
+ return j.scrollHeight > w.state.scrollHeight ? F = "SIZE_INCREASED" : S < w.state.viewportHeight ? F = "VIEWPORT_HEIGHT_DECREASING" : E < w.state.scrollTop ? F = "SCROLLING_UPWARDS" : F = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
4590
4590
  atBottom: !1,
4591
- notAtBottomBecause: L,
4591
+ notAtBottomBecause: F,
4592
4592
  state: j
4593
4593
  };
4594
4594
  }, $v),
4595
4595
  Ue((w, y) => w && w.atBottom === y.atBottom)
4596
4596
  )
4597
4597
  ), v = ut(
4598
- B(
4598
+ $(
4599
4599
  r,
4600
4600
  Jt(
4601
4601
  (w, { scrollHeight: y, scrollTop: E, viewportHeight: S }) => {
@@ -4629,15 +4629,15 @@ const Mr = "up", Rr = "down", Bv = "none", $v = {
4629
4629
  0
4630
4630
  );
4631
4631
  de(
4632
- B(
4632
+ $(
4633
4633
  b,
4634
4634
  oe((w) => w.atBottom)
4635
4635
  ),
4636
4636
  i
4637
- ), de(B(i, cn(50)), l);
4637
+ ), de($(i, cn(50)), l);
4638
4638
  const p = q(Rr);
4639
4639
  de(
4640
- B(
4640
+ $(
4641
4641
  r,
4642
4642
  oe(({ scrollTop: w }) => w),
4643
4643
  Ue(),
@@ -4648,17 +4648,17 @@ const Mr = "up", Rr = "down", Bv = "none", $v = {
4648
4648
  oe((w) => w.direction)
4649
4649
  ),
4650
4650
  p
4651
- ), de(B(r, cn(50), qt(Bv)), p);
4651
+ ), de($(r, cn(50), qt(Bv)), p);
4652
4652
  const x = q(0);
4653
4653
  return de(
4654
- B(
4654
+ $(
4655
4655
  m,
4656
4656
  ve((w) => !w),
4657
4657
  qt(0)
4658
4658
  ),
4659
4659
  x
4660
4660
  ), de(
4661
- B(
4661
+ $(
4662
4662
  o,
4663
4663
  cn(100),
4664
4664
  Te(m),
@@ -4691,7 +4691,7 @@ function Ec(e, t) {
4691
4691
  const ta = _e(
4692
4692
  ([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
4693
4693
  const s = Ie(), i = q(0), a = q(0), l = q(0), u = ut(
4694
- B(
4694
+ $(
4695
4695
  tt(
4696
4696
  me(r),
4697
4697
  me(o),
@@ -4840,7 +4840,7 @@ const Bn = _e(
4840
4840
  const v = q([]), p = q(0), x = Ie();
4841
4841
  de(s.topItemsIndexes, v);
4842
4842
  const w = ut(
4843
- B(
4843
+ $(
4844
4844
  tt(
4845
4845
  g,
4846
4846
  b,
@@ -4866,58 +4866,58 @@ const Bn = _e(
4866
4866
  N,
4867
4867
  I,
4868
4868
  j,
4869
- L,
4869
+ F,
4870
4870
  H,
4871
4871
  G,
4872
4872
  P,
4873
4873
  X
4874
4874
  ]) => {
4875
- const M = I, { offsetTree: J, sizeTree: _ } = M, O = Je(p);
4875
+ const V = I, { offsetTree: ne, sizeTree: _ } = V, M = Je(p);
4876
4876
  if (N === 0)
4877
4877
  return { ...Hs, totalCount: N };
4878
4878
  if (T === 0 && C === 0)
4879
- return O === 0 ? { ...Hs, totalCount: N } : pu(O, j, I, G, P, X || []);
4879
+ return M === 0 ? { ...Hs, totalCount: N } : pu(M, j, I, G, P, X || []);
4880
4880
  if (He(_))
4881
- return O > 0 ? null : bo(
4882
- zv(ea(j, N), M, X),
4881
+ return M > 0 ? null : bo(
4882
+ zv(ea(j, N), V, X),
4883
4883
  [],
4884
4884
  N,
4885
4885
  P,
4886
- M,
4886
+ V,
4887
4887
  G
4888
4888
  );
4889
- const W = [];
4889
+ const O = [];
4890
4890
  if (H.length > 0) {
4891
4891
  const ae = H[0], ge = H[H.length - 1];
4892
- let $ = 0;
4892
+ let z = 0;
4893
4893
  for (const A of os(_, ae, ge)) {
4894
- const K = A.value, te = Math.max(A.start, ae), ce = Math.min(A.end, ge);
4895
- for (let se = te; se <= ce; se++)
4896
- W.push({ data: X == null ? void 0 : X[se], index: se, offset: $, size: K }), $ += K;
4894
+ const K = A.value, ee = Math.max(A.start, ae), ce = Math.min(A.end, ge);
4895
+ for (let se = ee; se <= ce; se++)
4896
+ O.push({ data: X == null ? void 0 : X[se], index: se, offset: z, size: K }), z += K;
4897
4897
  }
4898
4898
  }
4899
- if (!L)
4900
- return bo([], W, N, P, M, G);
4901
- const V = H.length > 0 ? H[H.length - 1] + 1 : 0, ee = kv(J, T, C, V);
4902
- if (ee.length === 0)
4899
+ if (!F)
4900
+ return bo([], O, N, P, V, G);
4901
+ const D = H.length > 0 ? H[H.length - 1] + 1 : 0, Z = kv(ne, T, C, D);
4902
+ if (Z.length === 0)
4903
4903
  return null;
4904
- const F = N - 1, Z = rs([], (ae) => {
4905
- for (const ge of ee) {
4906
- const $ = ge.value;
4907
- let A = $.offset, K = ge.start;
4908
- const te = $.size;
4909
- if ($.offset < T) {
4910
- K += Math.floor((T - $.offset + P) / (te + P));
4904
+ const B = N - 1, J = rs([], (ae) => {
4905
+ for (const ge of Z) {
4906
+ const z = ge.value;
4907
+ let A = z.offset, K = ge.start;
4908
+ const ee = z.size;
4909
+ if (z.offset < T) {
4910
+ K += Math.floor((T - z.offset + P) / (ee + P));
4911
4911
  const se = K - ge.start;
4912
- A += se * te + se * P;
4912
+ A += se * ee + se * P;
4913
4913
  }
4914
- K < V && (A += (V - K) * te, K = V);
4915
- const ce = Math.min(ge.end, F);
4914
+ K < D && (A += (D - K) * ee, K = D);
4915
+ const ce = Math.min(ge.end, B);
4916
4916
  for (let se = K; se <= ce && !(A >= C); se++)
4917
- ae.push({ data: X == null ? void 0 : X[se], index: se, offset: A, size: te }), A += te + P;
4917
+ ae.push({ data: X == null ? void 0 : X[se], index: se, offset: A, size: ee }), A += ee + P;
4918
4918
  }
4919
4919
  });
4920
- return bo(Z, W, N, P, M, G);
4920
+ return bo(J, O, N, P, V, G);
4921
4921
  }
4922
4922
  ),
4923
4923
  //@ts-expect-error filter needs to be fixed
@@ -4927,33 +4927,33 @@ const Bn = _e(
4927
4927
  Hs
4928
4928
  );
4929
4929
  de(
4930
- B(
4930
+ $(
4931
4931
  e,
4932
4932
  ve(Yi),
4933
4933
  oe((T) => T == null ? void 0 : T.length)
4934
4934
  ),
4935
4935
  o
4936
4936
  ), de(
4937
- B(
4937
+ $(
4938
4938
  w,
4939
4939
  oe((T) => T.topListHeight)
4940
4940
  ),
4941
4941
  h
4942
4942
  ), de(h, a), de(
4943
- B(
4943
+ $(
4944
4944
  w,
4945
4945
  oe((T) => [T.top, T.bottom])
4946
4946
  ),
4947
4947
  i
4948
4948
  ), de(
4949
- B(
4949
+ $(
4950
4950
  w,
4951
4951
  oe((T) => T.items)
4952
4952
  ),
4953
4953
  x
4954
4954
  );
4955
4955
  const y = Rt(
4956
- B(
4956
+ $(
4957
4957
  w,
4958
4958
  ve(({ items: T }) => T.length > 0),
4959
4959
  Te(o, e),
@@ -4963,7 +4963,7 @@ const Bn = _e(
4963
4963
  oe(([T]) => T)
4964
4964
  )
4965
4965
  ), E = Rt(
4966
- B(
4966
+ $(
4967
4967
  w,
4968
4968
  cn(200),
4969
4969
  ve(({ items: T, topItems: C }) => T.length > 0 && T[0].originalIndex === C.length),
@@ -4971,7 +4971,7 @@ const Bn = _e(
4971
4971
  Ue()
4972
4972
  )
4973
4973
  ), S = Rt(
4974
- B(
4974
+ $(
4975
4975
  w,
4976
4976
  ve(({ items: T }) => T.length > 0),
4977
4977
  oe(({ items: T }) => {
@@ -5004,7 +5004,7 @@ const Bn = _e(
5004
5004
  ), mu = _e(
5005
5005
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
5006
5006
  const s = Ie(), i = ut(
5007
- B(
5007
+ $(
5008
5008
  tt(n, e, r, t, o),
5009
5009
  oe(([a, l, u, d, h]) => a + l + u + d + h.offsetBottom + h.bottom)
5010
5010
  ),
@@ -5017,7 +5017,7 @@ const Bn = _e(
5017
5017
  ), Uv = _e(
5018
5018
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
5019
5019
  const n = q(!1), r = ut(
5020
- B(
5020
+ $(
5021
5021
  tt(n, e, t),
5022
5022
  ve(([o]) => o),
5023
5023
  oe(([, o, s]) => Math.max(0, o - s)),
@@ -5046,20 +5046,20 @@ const Bn = _e(
5046
5046
  ]) => {
5047
5047
  const d = Ie();
5048
5048
  return de(
5049
- B(
5049
+ $(
5050
5050
  d,
5051
5051
  Te(t, l, n, s, o, r, a),
5052
5052
  Te(e),
5053
5053
  oe(([[h, m, g, b, v, p, x, w], y]) => {
5054
- const { align: E, behavior: S, calculateViewLocation: T = Wv, done: C, ...N } = h, I = uu(h, m, b - 1), j = Or(I, m.offsetTree, y) + v + p, L = j + $t(m.sizeTree, I)[1], H = w + p, G = w + g - x, P = T({
5055
- itemBottom: L,
5054
+ const { align: E, behavior: S, calculateViewLocation: T = Wv, done: C, ...N } = h, I = uu(h, m, b - 1), j = Or(I, m.offsetTree, y) + v + p, F = j + $t(m.sizeTree, I)[1], H = w + p, G = w + g - x, P = T({
5055
+ itemBottom: F,
5056
5056
  itemTop: j,
5057
5057
  locationParams: { align: E, behavior: S, ...N },
5058
5058
  viewportBottom: G,
5059
5059
  viewportTop: H
5060
5060
  });
5061
5061
  return P ? C && Ft(
5062
- B(
5062
+ $(
5063
5063
  i,
5064
5064
  ve((X) => !X),
5065
5065
  // skips the initial publish of false, and the cleanup call.
@@ -5104,12 +5104,12 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5104
5104
  });
5105
5105
  }
5106
5106
  De(
5107
- B(
5108
- tt(B(me(t), _n(1)), l),
5107
+ $(
5108
+ tt($(me(t), _n(1)), l),
5109
5109
  Te(me(b), s, a, h),
5110
5110
  oe(([[S, T], C, N, I, j]) => {
5111
- let L = T && I, H = "auto";
5112
- return L && (H = Vv(C, N || j), L = L && !!H), { followOutputBehavior: H, shouldFollow: L, totalCount: S };
5111
+ let F = T && I, H = "auto";
5112
+ return F && (H = Vv(C, N || j), F = F && !!H), { followOutputBehavior: H, shouldFollow: F, totalCount: S };
5113
5113
  }),
5114
5114
  ve(({ shouldFollow: S }) => S)
5115
5115
  ),
@@ -5128,7 +5128,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5128
5128
  setTimeout(T, 100);
5129
5129
  }
5130
5130
  De(
5131
- B(
5131
+ $(
5132
5132
  tt(me(b), t, u),
5133
5133
  ve(([S, , T]) => S && T),
5134
5134
  Jt(
@@ -5149,19 +5149,19 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5149
5149
  const y = q(null), E = Ie();
5150
5150
  return de(
5151
5151
  vi(
5152
- B(
5152
+ $(
5153
5153
  me(r),
5154
5154
  oe((S) => {
5155
5155
  var T;
5156
5156
  return (T = S == null ? void 0 : S.length) != null ? T : 0;
5157
5157
  })
5158
5158
  ),
5159
- B(me(t))
5159
+ $(me(t))
5160
5160
  ),
5161
5161
  E
5162
5162
  ), De(
5163
- B(
5164
- tt(B(E, _n(1)), l),
5163
+ $(
5164
+ tt($(E, _n(1)), l),
5165
5165
  Te(me(y), a, h, m),
5166
5166
  oe(([[S, T], C, N, I, j]) => T && N && (C == null ? void 0 : C({ context: j, totalCount: S, scrollingInProgress: I }))),
5167
5167
  ve((S) => !!S),
@@ -5189,7 +5189,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5189
5189
  )
5190
5190
  ), Kv = _e(
5191
5191
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (de(
5192
- B(
5192
+ $(
5193
5193
  a,
5194
5194
  Te(s),
5195
5195
  ve(([, l]) => l !== 0),
@@ -5204,7 +5204,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5204
5204
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
5205
5205
  const r = q(0);
5206
5206
  return De(
5207
- B(
5207
+ $(
5208
5208
  e,
5209
5209
  Te(r),
5210
5210
  ve(([, o]) => o !== 0),
@@ -5212,7 +5212,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5212
5212
  ),
5213
5213
  (o) => {
5214
5214
  Ft(
5215
- B(
5215
+ $(
5216
5216
  n,
5217
5217
  _n(1),
5218
5218
  ve((s) => s.items.length > 1)
@@ -5234,7 +5234,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5234
5234
  ([{ scrollVelocity: e }]) => {
5235
5235
  const t = q(!1), n = Ie(), r = q(!1);
5236
5236
  return de(
5237
- B(
5237
+ $(
5238
5238
  e,
5239
5239
  Te(r, t, n),
5240
5240
  ve(([o, s]) => !!s),
@@ -5251,7 +5251,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5251
5251
  ),
5252
5252
  t
5253
5253
  ), De(
5254
- B(tt(t, e, n), Te(r)),
5254
+ $(tt(t, e, n), Te(r)),
5255
5255
  ([[o, s, i], a]) => {
5256
5256
  o && a && a.change && a.change(s, i);
5257
5257
  }
@@ -5262,7 +5262,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5262
5262
  ), na = _e(([{ scrollContainerState: e, scrollTo: t }]) => {
5263
5263
  const n = Ie(), r = Ie(), o = Ie(), s = q(!1), i = q(void 0);
5264
5264
  return de(
5265
- B(
5265
+ $(
5266
5266
  tt(n, r),
5267
5267
  oe(([{ scrollHeight: a, scrollTop: l, viewportHeight: u }, { offsetTop: d }]) => ({
5268
5268
  scrollHeight: a,
@@ -5272,7 +5272,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5272
5272
  ),
5273
5273
  e
5274
5274
  ), de(
5275
- B(
5275
+ $(
5276
5276
  t,
5277
5277
  Te(r),
5278
5278
  oe(([a, { offsetTop: l }]) => ({
@@ -5301,7 +5301,7 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5301
5301
  ]) => {
5302
5302
  const u = Ie(), d = q(void 0), h = q(null), m = q(null);
5303
5303
  return de(a, h), de(l, m), De(
5304
- B(
5304
+ $(
5305
5305
  u,
5306
5306
  Te(t, r, i, h, m, n)
5307
5307
  ),
@@ -5309,8 +5309,8 @@ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5309
5309
  const E = Pv(b.sizeTree);
5310
5310
  p && x !== null && w !== null && (v = x.scrollTop - w.offsetTop), v -= y, g({ ranges: E, scrollTop: v });
5311
5311
  }
5312
- ), de(B(d, ve(Yi), oe(Xv)), o), de(
5313
- B(
5312
+ ), de($(d, ve(Yi), oe(Xv)), o), de(
5313
+ $(
5314
5314
  s,
5315
5315
  Te(d),
5316
5316
  ve(([, g]) => g !== void 0),
@@ -5331,7 +5331,7 @@ function Xv(e) {
5331
5331
  const Jv = _e(([{ topItemsIndexes: e }]) => {
5332
5332
  const t = q(0);
5333
5333
  return de(
5334
- B(
5334
+ $(
5335
5335
  t,
5336
5336
  ve((n) => n >= 0),
5337
5337
  oe((n) => Array.from({ length: n }).map((r, o) => o))
@@ -5353,7 +5353,7 @@ const Zv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5353
5353
  { recalcInProgress: b }
5354
5354
  ]) => {
5355
5355
  const v = Rt(
5356
- B(
5356
+ $(
5357
5357
  l,
5358
5358
  Te(i),
5359
5359
  Jt(
@@ -5373,10 +5373,10 @@ const Zv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5373
5373
  function p(x) {
5374
5374
  x > 0 ? (Se(t, { behavior: "auto", top: -x }), Se(e, 0)) : (Se(e, 0), Se(t, { behavior: "auto", top: -x }));
5375
5375
  }
5376
- return De(B(v, Te(e, s)), ([x, w, y]) => {
5376
+ return De($(v, Te(e, s)), ([x, w, y]) => {
5377
5377
  y && Zv() ? Se(e, w - x) : p(-x);
5378
5378
  }), De(
5379
- B(
5379
+ $(
5380
5380
  tt(ut(s, !1), e, b),
5381
5381
  ve(([x, w, y]) => !x && !y && w !== 0),
5382
5382
  oe(([x, w]) => w),
@@ -5384,13 +5384,13 @@ const Zv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5384
5384
  ),
5385
5385
  p
5386
5386
  ), de(
5387
- B(
5387
+ $(
5388
5388
  h,
5389
5389
  oe((x) => ({ top: -x }))
5390
5390
  ),
5391
5391
  t
5392
5392
  ), De(
5393
- B(
5393
+ $(
5394
5394
  u,
5395
5395
  Te(m, d),
5396
5396
  oe(([x, { groupIndices: w, lastSize: y, sizeTree: E }, S]) => {
@@ -5405,8 +5405,8 @@ const Zv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5405
5405
  let I = 0, j = 0;
5406
5406
  for (; I < x; ) {
5407
5407
  I++, C += N;
5408
- let L = w.length === j + 1 ? 1 / 0 : w[j + 1] - w[j] - 1;
5409
- I + L > x && (C -= N, L = x - I + 1), I += L, C += T(L), j++;
5408
+ let F = w.length === j + 1 ? 1 / 0 : w[j + 1] - w[j] - 1;
5409
+ I + F > x && (C -= N, F = x - I + 1), I += F, C += T(F), j++;
5410
5410
  }
5411
5411
  return C;
5412
5412
  }
@@ -5488,7 +5488,7 @@ const Zv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5488
5488
  { groupCounts: N },
5489
5489
  I
5490
5490
  ]) => (de(E.rangeChanged, I.scrollSeekRangeChanged), de(
5491
- B(
5491
+ $(
5492
5492
  I.windowViewportRect,
5493
5493
  oe((j) => j.visibleHeight)
5494
5494
  ),
@@ -5694,7 +5694,7 @@ function oa(e) {
5694
5694
  }
5695
5695
  const rx = /* @__PURE__ */ _e(() => {
5696
5696
  const e = q((a) => `Item ${a}`), t = q((a) => `Group ${a}`), n = q({}), r = q(oa), o = q("div"), s = q(ur), i = (a, l = null) => ut(
5697
- B(
5697
+ $(
5698
5698
  n,
5699
5699
  oe((u) => u[a]),
5700
5700
  Ue()
@@ -5736,17 +5736,17 @@ const rx = /* @__PURE__ */ _e(() => {
5736
5736
  sa("deviation", (P) => {
5737
5737
  x !== P && w(P);
5738
5738
  });
5739
- const y = we("EmptyPlaceholder"), E = we("ScrollSeekPlaceholder") || sx, S = we("ListComponent"), T = we("ItemComponent"), C = we("GroupComponent"), N = we("computeItemKey"), I = we("isSeeking"), j = we("groupIndices").length > 0, L = we("alignToBottom"), H = we("initialItemFinalLocationReached"), G = e ? {} : {
5739
+ const y = we("EmptyPlaceholder"), E = we("ScrollSeekPlaceholder") || sx, S = we("ListComponent"), T = we("ItemComponent"), C = we("GroupComponent"), N = we("computeItemKey"), I = we("isSeeking"), j = we("groupIndices").length > 0, F = we("alignToBottom"), H = we("initialItemFinalLocationReached"), G = e ? {} : {
5740
5740
  boxSizing: "border-box",
5741
5741
  ...v ? {
5742
5742
  display: "inline-block",
5743
5743
  height: "100%",
5744
- marginLeft: x !== 0 ? x : L ? "auto" : 0,
5744
+ marginLeft: x !== 0 ? x : F ? "auto" : 0,
5745
5745
  paddingLeft: t.offsetTop,
5746
5746
  paddingRight: t.offsetBottom,
5747
5747
  whiteSpace: "nowrap"
5748
5748
  } : {
5749
- marginTop: x !== 0 ? x : L ? "auto" : 0,
5749
+ marginTop: x !== 0 ? x : F ? "auto" : 0,
5750
5750
  paddingBottom: t.offsetBottom,
5751
5751
  paddingTop: t.offsetTop
5752
5752
  },
@@ -5760,14 +5760,14 @@ const rx = /* @__PURE__ */ _e(() => {
5760
5760
  ref: p,
5761
5761
  style: G,
5762
5762
  children: (e ? t.topItems : t.items).map((P) => {
5763
- const X = P.originalIndex, M = N(X + t.firstItemIndex, P.data, u);
5763
+ const X = P.originalIndex, V = N(X + t.firstItemIndex, P.data, u);
5764
5764
  return I ? /* @__PURE__ */ ho(
5765
5765
  E,
5766
5766
  {
5767
5767
  ...lt(E, u),
5768
5768
  height: P.size,
5769
5769
  index: P.index,
5770
- key: M,
5770
+ key: V,
5771
5771
  type: P.type || "item",
5772
5772
  ...P.type === "group" ? {} : { groupIndex: P.groupIndex }
5773
5773
  }
@@ -5778,7 +5778,7 @@ const rx = /* @__PURE__ */ _e(() => {
5778
5778
  "data-index": X,
5779
5779
  "data-item-index": P.index,
5780
5780
  "data-known-size": P.size,
5781
- key: M,
5781
+ key: V,
5782
5782
  style: ix
5783
5783
  },
5784
5784
  d(P.index, u)
@@ -5791,7 +5791,7 @@ const rx = /* @__PURE__ */ _e(() => {
5791
5791
  "data-item-group-index": P.groupIndex,
5792
5792
  "data-item-index": P.index,
5793
5793
  "data-known-size": P.size,
5794
- key: M,
5794
+ key: V,
5795
5795
  style: v ? ax : Eu
5796
5796
  },
5797
5797
  j ? l(P.index, P.groupIndex, P.data, u) : l(P.index, P.data, u)
@@ -6007,7 +6007,7 @@ const px = ({ children: e }) => {
6007
6007
  "Group ",
6008
6008
  u
6009
6009
  ] })), r = q(null), o = q(null), s = q({}), i = q(oa), a = q(ur), l = (u, d = null) => ut(
6010
- B(
6010
+ $(
6011
6011
  s,
6012
6012
  oe((h) => h[u]),
6013
6013
  Ue()
@@ -6079,70 +6079,70 @@ const Ex = /* @__PURE__ */ _e(
6079
6079
  { customScrollParent: p, useWindowScroll: x, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: E },
6080
6080
  S
6081
6081
  ]) => {
6082
- const T = q(0), C = q(0), N = q(Ac), I = q({ height: 0, width: 0 }), j = q({ height: 0, width: 0 }), L = Ie(), H = Ie(), G = q(0), P = q(null), X = q({ column: 0, row: 0 }), M = Ie(), J = Ie(), _ = q(!1), O = q(0), W = q(!0), V = q(!1), ee = q(!1);
6082
+ const T = q(0), C = q(0), N = q(Ac), I = q({ height: 0, width: 0 }), j = q({ height: 0, width: 0 }), F = Ie(), H = Ie(), G = q(0), P = q(null), X = q({ column: 0, row: 0 }), V = Ie(), ne = Ie(), _ = q(!1), M = q(0), O = q(!0), D = q(!1), Z = q(!1);
6083
6083
  De(
6084
- B(
6084
+ $(
6085
6085
  b,
6086
- Te(O),
6086
+ Te(M),
6087
6087
  ve(([A, K]) => !!K)
6088
6088
  ),
6089
6089
  () => {
6090
- Se(W, !1);
6090
+ Se(O, !1);
6091
6091
  }
6092
6092
  ), De(
6093
- B(
6094
- tt(b, W, j, I, O, V),
6095
- ve(([A, K, te, ce, , se]) => A && !K && te.height !== 0 && ce.height !== 0 && !se)
6093
+ $(
6094
+ tt(b, O, j, I, M, D),
6095
+ ve(([A, K, ee, ce, , se]) => A && !K && ee.height !== 0 && ce.height !== 0 && !se)
6096
6096
  ),
6097
6097
  ([, , , , A]) => {
6098
- Se(V, !0), Qi(1, () => {
6099
- Se(L, A);
6100
- }), Ft(B(u), () => {
6101
- Se(t, [0, 0]), Se(W, !0);
6098
+ Se(D, !0), Qi(1, () => {
6099
+ Se(F, A);
6100
+ }), Ft($(u), () => {
6101
+ Se(t, [0, 0]), Se(O, !0);
6102
6102
  });
6103
6103
  }
6104
6104
  ), de(
6105
- B(
6106
- J,
6105
+ $(
6106
+ ne,
6107
6107
  ve((A) => A != null && A.scrollTop > 0),
6108
6108
  qt(0)
6109
6109
  ),
6110
6110
  C
6111
6111
  ), De(
6112
- B(
6112
+ $(
6113
6113
  b,
6114
- Te(J),
6114
+ Te(ne),
6115
6115
  ve(([, A]) => A != null)
6116
6116
  ),
6117
6117
  ([, A]) => {
6118
- A && (Se(I, A.viewport), Se(j, A.item), Se(X, A.gap), A.scrollTop > 0 && (Se(_, !0), Ft(B(u, _n(1)), (K) => {
6118
+ A && (Se(I, A.viewport), Se(j, A.item), Se(X, A.gap), A.scrollTop > 0 && (Se(_, !0), Ft($(u, _n(1)), (K) => {
6119
6119
  Se(_, !1);
6120
6120
  }), Se(l, { top: A.scrollTop })));
6121
6121
  }
6122
6122
  ), de(
6123
- B(
6123
+ $(
6124
6124
  I,
6125
6125
  oe(({ height: A }) => A)
6126
6126
  ),
6127
6127
  h
6128
6128
  ), de(
6129
- B(
6129
+ $(
6130
6130
  tt(
6131
6131
  me(I, oo),
6132
6132
  me(j, oo),
6133
6133
  me(X, (A, K) => A && A.column === K.column && A.row === K.row),
6134
6134
  me(u)
6135
6135
  ),
6136
- oe(([A, K, te, ce]) => ({
6137
- gap: te,
6136
+ oe(([A, K, ee, ce]) => ({
6137
+ gap: ee,
6138
6138
  item: K,
6139
6139
  scrollTop: ce,
6140
6140
  viewport: A
6141
6141
  }))
6142
6142
  ),
6143
- M
6143
+ V
6144
6144
  ), de(
6145
- B(
6145
+ $(
6146
6146
  tt(
6147
6147
  me(T),
6148
6148
  r,
@@ -6152,14 +6152,14 @@ const Ex = /* @__PURE__ */ _e(
6152
6152
  me(P),
6153
6153
  me(C),
6154
6154
  me(_),
6155
- me(W),
6156
- me(O)
6155
+ me(O),
6156
+ me(M)
6157
6157
  ),
6158
6158
  ve(([, , , , , , , A]) => !A),
6159
6159
  oe(
6160
6160
  ([
6161
6161
  A,
6162
- [K, te],
6162
+ [K, ee],
6163
6163
  ce,
6164
6164
  se,
6165
6165
  Ce,
@@ -6177,63 +6177,63 @@ const Ex = /* @__PURE__ */ _e(
6177
6177
  return Tx(Oc(Gt, rt, Pe));
6178
6178
  }
6179
6179
  const st = ju(Qe, Ke, Le);
6180
- let z, Q;
6181
- ue ? K === 0 && te === 0 && je > 0 ? (z = 0, Q = je - 1) : (z = st * Fo((K + he) / (Ne + he)), Q = st * Pc((te + he) / (Ne + he)) - 1, Q = Ws(A - 1, Er(Q, st - 1)), z = Ws(Q, Er(0, z))) : (z = 0, Q = -1);
6182
- const Fe = Oc(z, Q, Pe), { bottom: Ve, top: bt } = Mc(Ce, ce, se, Fe), pt = Pc(A / st), wt = pt * Ne + (pt - 1) * he - Ve;
6180
+ let U, Q;
6181
+ ue ? K === 0 && ee === 0 && je > 0 ? (U = 0, Q = je - 1) : (U = st * Fo((K + he) / (Ne + he)), Q = st * Pc((ee + he) / (Ne + he)) - 1, Q = Ws(A - 1, Er(Q, st - 1)), U = Ws(Q, Er(0, U))) : (U = 0, Q = -1);
6182
+ const Fe = Oc(U, Q, Pe), { bottom: Ve, top: bt } = Mc(Ce, ce, se, Fe), pt = Pc(A / st), wt = pt * Ne + (pt - 1) * he - Ve;
6183
6183
  return { bottom: Ve, itemHeight: Ne, items: Fe, itemWidth: Ke, offsetBottom: wt, offsetTop: bt, top: bt };
6184
6184
  }
6185
6185
  )
6186
6186
  ),
6187
6187
  N
6188
6188
  ), de(
6189
- B(
6189
+ $(
6190
6190
  P,
6191
6191
  ve((A) => A !== null),
6192
6192
  oe((A) => A.length)
6193
6193
  ),
6194
6194
  T
6195
6195
  ), de(
6196
- B(
6196
+ $(
6197
6197
  tt(I, j, N, X),
6198
- ve(([A, K, { items: te }]) => te.length > 0 && K.height !== 0 && A.height !== 0),
6199
- oe(([A, K, { items: te }, ce]) => {
6200
- const { bottom: se, top: Ce } = Mc(A, ce, K, te);
6198
+ ve(([A, K, { items: ee }]) => ee.length > 0 && K.height !== 0 && A.height !== 0),
6199
+ oe(([A, K, { items: ee }, ce]) => {
6200
+ const { bottom: se, top: Ce } = Mc(A, ce, K, ee);
6201
6201
  return [Ce, se];
6202
6202
  }),
6203
6203
  Ue(_r)
6204
6204
  ),
6205
6205
  t
6206
6206
  );
6207
- const F = q(!1);
6207
+ const B = q(!1);
6208
6208
  de(
6209
- B(
6209
+ $(
6210
6210
  u,
6211
- Te(F),
6211
+ Te(B),
6212
6212
  oe(([A, K]) => K || A !== 0)
6213
6213
  ),
6214
- F
6214
+ B
6215
6215
  );
6216
- const Z = Rt(
6217
- B(
6216
+ const J = Rt(
6217
+ $(
6218
6218
  tt(N, T),
6219
6219
  ve(([{ items: A }]) => A.length > 0),
6220
- Te(F),
6221
- ve(([[A, K], te]) => {
6220
+ Te(B),
6221
+ ve(([[A, K], ee]) => {
6222
6222
  const ce = A.items[A.items.length - 1].index === K - 1;
6223
- return (te || A.bottom > 0 && A.itemHeight > 0 && A.offsetBottom === 0 && A.items.length === K) && ce;
6223
+ return (ee || A.bottom > 0 && A.itemHeight > 0 && A.offsetBottom === 0 && A.items.length === K) && ce;
6224
6224
  }),
6225
6225
  oe(([[, A]]) => A - 1),
6226
6226
  Ue()
6227
6227
  )
6228
6228
  ), ae = Rt(
6229
- B(
6229
+ $(
6230
6230
  me(N),
6231
6231
  ve(({ items: A }) => A.length > 0 && A[0].index === 0),
6232
6232
  qt(0),
6233
6233
  Ue()
6234
6234
  )
6235
6235
  ), ge = Rt(
6236
- B(
6236
+ $(
6237
6237
  me(N),
6238
6238
  Te(_),
6239
6239
  ve(([{ items: A }, K]) => A.length > 0 && !K),
@@ -6246,28 +6246,28 @@ const Ex = /* @__PURE__ */ _e(
6246
6246
  )
6247
6247
  );
6248
6248
  de(ge, g.scrollSeekRangeChanged), de(
6249
- B(
6250
- L,
6249
+ $(
6250
+ F,
6251
6251
  Te(I, j, T, X),
6252
- oe(([A, K, te, ce, se]) => {
6252
+ oe(([A, K, ee, ce, se]) => {
6253
6253
  const Ce = fu(A), { align: Pe, behavior: je, offset: ue } = Ce;
6254
6254
  let pe = Ce.index;
6255
6255
  pe === "LAST" && (pe = ce - 1), pe = Er(0, pe, Ws(ce - 1, pe));
6256
- let Le = Si(K, se, te, pe);
6257
- return Pe === "end" ? Le = _c(Le - K.height + te.height) : Pe === "center" && (Le = _c(Le - K.height / 2 + te.height / 2)), ue && (Le += ue), { behavior: je, top: Le };
6256
+ let Le = Si(K, se, ee, pe);
6257
+ return Pe === "end" ? Le = _c(Le - K.height + ee.height) : Pe === "center" && (Le = _c(Le - K.height / 2 + ee.height / 2)), ue && (Le += ue), { behavior: je, top: Le };
6258
6258
  })
6259
6259
  ),
6260
6260
  l
6261
6261
  );
6262
- const $ = ut(
6263
- B(
6262
+ const z = ut(
6263
+ $(
6264
6264
  N,
6265
6265
  oe((A) => A.offsetBottom + A.bottom)
6266
6266
  ),
6267
6267
  0
6268
6268
  );
6269
6269
  return de(
6270
- B(
6270
+ $(
6271
6271
  E,
6272
6272
  oe((A) => ({ height: A.visibleHeight, width: A.visibleWidth }))
6273
6273
  ),
@@ -6284,12 +6284,12 @@ const Ex = /* @__PURE__ */ _e(
6284
6284
  initialItemCount: C,
6285
6285
  itemDimensions: j,
6286
6286
  overscan: n,
6287
- restoreStateFrom: J,
6287
+ restoreStateFrom: ne,
6288
6288
  scrollBy: i,
6289
6289
  scrollContainerState: a,
6290
6290
  scrollHeight: H,
6291
6291
  scrollTo: l,
6292
- scrollToIndex: L,
6292
+ scrollToIndex: F,
6293
6293
  scrollTop: u,
6294
6294
  smoothScrollTargetReached: d,
6295
6295
  totalCount: T,
@@ -6301,15 +6301,15 @@ const Ex = /* @__PURE__ */ _e(
6301
6301
  ...g,
6302
6302
  // output
6303
6303
  gridState: N,
6304
- horizontalDirection: ee,
6305
- initialTopMostItemIndex: O,
6306
- totalListHeight: $,
6304
+ horizontalDirection: Z,
6305
+ initialTopMostItemIndex: M,
6306
+ totalListHeight: z,
6307
6307
  ...m,
6308
- endReached: Z,
6308
+ endReached: J,
6309
6309
  propsReady: v,
6310
6310
  rangeChanged: ge,
6311
6311
  startReached: ae,
6312
- stateChanged: M,
6312
+ stateChanged: V,
6313
6313
  stateRestoreInProgress: _,
6314
6314
  ...S
6315
6315
  };
@@ -6332,7 +6332,7 @@ function Si(e, t, n, r) {
6332
6332
  }
6333
6333
  const Nx = /* @__PURE__ */ _e(() => {
6334
6334
  const e = q((h) => `Item ${h}`), t = q({}), n = q(null), r = q("virtuoso-grid-item"), o = q("virtuoso-grid-list"), s = q(oa), i = q("div"), a = q(ur), l = (h, m = null) => ut(
6335
- B(
6335
+ $(
6336
6336
  t,
6337
6337
  oe((g) => g[h]),
6338
6338
  Ue()
@@ -6531,9 +6531,9 @@ const Lx = zr(
6531
6531
  }
6532
6532
  );
6533
6533
  function Au({ className: e, variant: t, ...n }) {
6534
- return /* @__PURE__ */ c.jsx("div", { className: D(Lx({ variant: t }), e), ...n });
6534
+ return /* @__PURE__ */ c.jsx("div", { className: L(Lx({ variant: t }), e), ...n });
6535
6535
  }
6536
- function ne(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
6536
+ function te(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
6537
6537
  return function(o) {
6538
6538
  if (e == null || e(o), n === !1 || !o.defaultPrevented)
6539
6539
  return t == null ? void 0 : t(o);
@@ -6829,7 +6829,7 @@ var Ou = "CollapsibleTrigger", Mu = f.forwardRef(
6829
6829
  disabled: o.disabled,
6830
6830
  ...r,
6831
6831
  ref: t,
6832
- onClick: ne(e.onClick, o.onOpenToggle)
6832
+ onClick: te(e.onClick, o.onOpenToggle)
6833
6833
  }
6834
6834
  );
6835
6835
  }
@@ -7165,7 +7165,7 @@ function Gs({
7165
7165
  return b.forEach((y) => w.observe(y)), () => {
7166
7166
  p = !0, w.disconnect();
7167
7167
  };
7168
- }, [l]), l ? /* @__PURE__ */ c.jsx("div", { ref: m, className: D("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: l } }) : r && o ? null : /* @__PURE__ */ c.jsx("div", { className: D("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
7168
+ }, [l]), l ? /* @__PURE__ */ c.jsx("div", { ref: m, className: L("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: l } }) : r && o ? null : /* @__PURE__ */ c.jsx("div", { className: L("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
7169
7169
  }
7170
7170
  async function Fu(e, t) {
7171
7171
  return await Dt(e, {
@@ -7345,9 +7345,9 @@ var gb = "DismissableLayer", Ti = "dismissableLayer.update", vb = "dismissableLa
7345
7345
  pointerEvents: y ? E ? "auto" : "none" : void 0,
7346
7346
  ...e.style
7347
7347
  },
7348
- onFocusCapture: ne(e.onFocusCapture, T.onFocusCapture),
7349
- onBlurCapture: ne(e.onBlurCapture, T.onBlurCapture),
7350
- onPointerDownCapture: ne(
7348
+ onFocusCapture: te(e.onFocusCapture, T.onFocusCapture),
7349
+ onBlurCapture: te(e.onBlurCapture, T.onBlurCapture),
7350
+ onPointerDownCapture: te(
7351
7351
  e.onPointerDownCapture,
7352
7352
  S.onPointerDownCapture
7353
7353
  )
@@ -8134,7 +8134,7 @@ var Zu = "DialogTrigger", Qu = f.forwardRef(
8134
8134
  "data-state": ga(o.open),
8135
8135
  ...r,
8136
8136
  ref: s,
8137
- onClick: ne(e.onClick, o.onOpenToggle)
8137
+ onClick: te(e.onClick, o.onOpenToggle)
8138
8138
  }
8139
8139
  );
8140
8140
  }
@@ -8191,15 +8191,15 @@ var ww = f.forwardRef(
8191
8191
  ref: o,
8192
8192
  trapFocus: n.open,
8193
8193
  disableOutsidePointerEvents: !0,
8194
- onCloseAutoFocus: ne(e.onCloseAutoFocus, (s) => {
8194
+ onCloseAutoFocus: te(e.onCloseAutoFocus, (s) => {
8195
8195
  var i;
8196
8196
  s.preventDefault(), (i = n.triggerRef.current) == null || i.focus();
8197
8197
  }),
8198
- onPointerDownOutside: ne(e.onPointerDownOutside, (s) => {
8198
+ onPointerDownOutside: te(e.onPointerDownOutside, (s) => {
8199
8199
  const i = s.detail.originalEvent, a = i.button === 0 && i.ctrlKey === !0;
8200
8200
  (i.button === 2 || a) && s.preventDefault();
8201
8201
  }),
8202
- onFocusOutside: ne(
8202
+ onFocusOutside: te(
8203
8203
  e.onFocusOutside,
8204
8204
  (s) => s.preventDefault()
8205
8205
  )
@@ -8285,7 +8285,7 @@ var cd = "DialogClose", ld = f.forwardRef(
8285
8285
  type: "button",
8286
8286
  ...r,
8287
8287
  ref: t,
8288
- onClick: ne(e.onClick, () => o.onOpenChange(!1))
8288
+ onClick: te(e.onClick, () => o.onOpenChange(!1))
8289
8289
  }
8290
8290
  );
8291
8291
  }
@@ -8319,7 +8319,7 @@ const Ew = fd, Nw = hd, md = f.forwardRef(({ className: e, ...t }, n) => /* @__P
8319
8319
  ps,
8320
8320
  {
8321
8321
  ref: n,
8322
- className: D(
8322
+ className: L(
8323
8323
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
8324
8324
  e
8325
8325
  ),
@@ -8349,7 +8349,7 @@ const gd = f.forwardRef(({ className: e, children: t, ...n }, r) => {
8349
8349
  ms,
8350
8350
  {
8351
8351
  ref: r,
8352
- className: D(
8352
+ className: L(
8353
8353
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
8354
8354
  e
8355
8355
  ),
@@ -8373,7 +8373,7 @@ const vd = ({
8373
8373
  }) => /* @__PURE__ */ c.jsx(
8374
8374
  "div",
8375
8375
  {
8376
- className: D(
8376
+ className: L(
8377
8377
  "flex flex-col space-y-1.5 text-center sm:text-left",
8378
8378
  e
8379
8379
  ),
@@ -8385,7 +8385,7 @@ const xd = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8385
8385
  kn,
8386
8386
  {
8387
8387
  ref: n,
8388
- className: D(
8388
+ className: L(
8389
8389
  "text-lg font-semibold leading-none tracking-tight",
8390
8390
  e
8391
8391
  ),
@@ -8397,7 +8397,7 @@ const Iw = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8397
8397
  gs,
8398
8398
  {
8399
8399
  ref: n,
8400
- className: D("text-sm text-muted-foreground", e),
8400
+ className: L("text-sm text-muted-foreground", e),
8401
8401
  ...t
8402
8402
  }
8403
8403
  ));
@@ -8520,7 +8520,7 @@ function kw({ className: e }) {
8520
8520
  "span",
8521
8521
  {
8522
8522
  "aria-live": "polite",
8523
- className: D("inline-block text-xs opacity-70 ml-1", e),
8523
+ className: L("inline-block text-xs opacity-70 ml-1", e),
8524
8524
  children: [
8525
8525
  "Is thinking",
8526
8526
  ".".repeat(t)
@@ -8548,10 +8548,10 @@ const Aw = Y.memo(function({
8548
8548
  onCancelEdit: x,
8549
8549
  onCopy: w
8550
8550
  }) {
8551
- const [y, E] = fe(!1), [S, T] = fe(!1), [C, N] = fe(!1), [I, j] = fe(!1), { currentThreadId: L } = Ki();
8551
+ const [y, E] = fe(!1), [S, T] = fe(!1), [C, N] = fe(!1), [I, j] = fe(!1), { currentThreadId: F } = Ki();
8552
8552
  da();
8553
- const [H, G] = fe({}), [P, X] = fe(!1), [M, J] = fe(null), _ = u === "phone" || u === "half-screen", O = t.role, W = O === "tool", V = Y.useMemo(() => {
8554
- switch (O) {
8553
+ const [H, G] = fe({}), [P, X] = fe(!1), [V, ne] = fe(null), _ = u === "phone" || u === "half-screen", M = t.role, O = M === "tool", D = Y.useMemo(() => {
8554
+ switch (M) {
8555
8555
  case "user":
8556
8556
  return "text-[hsl(var(--chat-bubble-user-text))]";
8557
8557
  case "assistant":
@@ -8563,20 +8563,20 @@ const Aw = Y.memo(function({
8563
8563
  default:
8564
8564
  return "text-[hsl(var(--chat-bubble-ai-text))]";
8565
8565
  }
8566
- }, [O]), ee = an(() => Pw(t.content), [t.content]), F = an(() => Lw(t.content), [t.content]), Z = an(() => t.content.filter((ue) => ue.type === "image_url"), [t.content]), ae = an(() => t.content.filter((ue) => ue.type === "file"), [t.content]), ge = Bw(ee, r), $ = async () => {
8566
+ }, [M]), Z = an(() => Pw(t.content), [t.content]), B = an(() => Lw(t.content), [t.content]), J = an(() => t.content.filter((ue) => ue.type === "image_url"), [t.content]), ae = an(() => t.content.filter((ue) => ue.type === "file"), [t.content]), ge = Bw(Z, r), z = async () => {
8567
8567
  try {
8568
- const ue = W ? Yn(t.content) : ee;
8568
+ const ue = O ? Yn(t.content) : Z;
8569
8569
  await navigator.clipboard.writeText(ue), E(!0), setTimeout(() => E(!1), 2e3), w == null || w(ue);
8570
8570
  } catch (ue) {
8571
8571
  console.error("Failed to copy:", ue);
8572
8572
  }
8573
8573
  }, A = () => {
8574
8574
  if (!v) return;
8575
- const ue = W ? Yn(t.content) : ee;
8575
+ const ue = O ? Yn(t.content) : Z;
8576
8576
  v(t.id, ue);
8577
- }, K = () => p == null ? void 0 : p(n), te = () => {
8578
- const pe = D(_ ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", V);
8579
- switch (O) {
8577
+ }, K = () => p == null ? void 0 : p(n), ee = () => {
8578
+ const pe = L(_ ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", D);
8579
+ switch (M) {
8580
8580
  case "user":
8581
8581
  return /* @__PURE__ */ c.jsx(Vp, { className: pe });
8582
8582
  case "assistant":
@@ -8588,42 +8588,42 @@ const Aw = Y.memo(function({
8588
8588
  }
8589
8589
  }, ce = () => {
8590
8590
  const ue = "group relative mb-4 flex w-full";
8591
- switch (O) {
8591
+ switch (M) {
8592
8592
  case "user":
8593
- return D(ue, "justify-end");
8593
+ return L(ue, "justify-end");
8594
8594
  case "assistant":
8595
8595
  case "tool":
8596
8596
  case "system":
8597
- return D(ue, "justify-start");
8597
+ return L(ue, "justify-start");
8598
8598
  default:
8599
8599
  return ue;
8600
8600
  }
8601
8601
  }, se = () => {
8602
- const ue = D(
8602
+ const ue = L(
8603
8603
  "rounded-lg px-4 py-3 relative min-w-0 max-w-full break-words",
8604
8604
  _ && "px-3 py-2 text-sm"
8605
8605
  );
8606
- switch (O) {
8606
+ switch (M) {
8607
8607
  case "user":
8608
- return D(
8608
+ return L(
8609
8609
  ue,
8610
8610
  "w-full md:max-w-[95%]",
8611
8611
  "bg-[hsl(var(--chat-bubble-user))] text-[hsl(var(--chat-bubble-user-text))]",
8612
8612
  "border border-transparent"
8613
8613
  );
8614
8614
  case "assistant":
8615
- return D(
8615
+ return L(
8616
8616
  ue,
8617
8617
  "w-full md:max-w-[95%]",
8618
8618
  "bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
8619
8619
  "border border-border/60 dark:border-border/40"
8620
8620
  );
8621
8621
  case "tool":
8622
- return D(ue, "w-full md:max-w-[95%] bg-secondary/50 text-secondary-foreground border border-dashed");
8622
+ return L(ue, "w-full md:max-w-[95%] bg-secondary/50 text-secondary-foreground border border-dashed");
8623
8623
  case "system":
8624
- return D(ue, "w-full md:max-w-[85%] bg-accent/40 text-muted-foreground border");
8624
+ return L(ue, "w-full md:max-w-[85%] bg-accent/40 text-muted-foreground border");
8625
8625
  default:
8626
- return D(
8626
+ return L(
8627
8627
  ue,
8628
8628
  "w-full md:max-w-[95%]",
8629
8629
  "bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
@@ -8638,31 +8638,31 @@ const Aw = Y.memo(function({
8638
8638
  return "";
8639
8639
  }
8640
8640
  }, Pe = () => {
8641
- if (!(ee.trim().length > 0 || Z.length > 0 || ae.length > 0))
8641
+ if (!(Z.trim().length > 0 || J.length > 0 || ae.length > 0))
8642
8642
  return /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 p-2 bg-muted/30 rounded", children: [
8643
8643
  /* @__PURE__ */ c.jsx(ci, { className: "h-4 w-4 text-muted-foreground" }),
8644
8644
  /* @__PURE__ */ c.jsx("span", { className: "text-sm text-muted-foreground", children: "File upload" })
8645
8645
  ] });
8646
8646
  if (t.model === "reflection") {
8647
- const he = ee.trim(), Ne = ni(he);
8647
+ const he = Z.trim(), Ne = ni(he);
8648
8648
  if (Ne && typeof Ne == "object")
8649
8649
  return /* @__PURE__ */ c.jsx($w, { data: Ne });
8650
8650
  }
8651
- if (W && F.name === "get_issues") {
8651
+ if (O && B.name === "get_issues") {
8652
8652
  const he = t.content.find((Qe) => Qe.type === "tool_result"), Ne = (he == null ? void 0 : he.output) ?? Yn(t.content), Ke = wd(Ne);
8653
8653
  if (Ke) return /* @__PURE__ */ c.jsx(Hw, { issues: Ke });
8654
8654
  }
8655
- if (W && !C) {
8655
+ if (O && !C) {
8656
8656
  const he = Yn(t.content).slice(0, 80).replace(/\s+/g, " ");
8657
- return /* @__PURE__ */ c.jsx("div", { className: D("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", _ && "text-[10px]"), children: /* @__PURE__ */ c.jsxs("span", { className: "truncate max-w-full text-current", children: [
8657
+ return /* @__PURE__ */ c.jsx("div", { className: L("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", _ && "text-[10px]"), children: /* @__PURE__ */ c.jsxs("span", { className: "truncate max-w-full text-current", children: [
8658
8658
  he,
8659
8659
  he.length >= 80 ? "…" : ""
8660
8660
  ] }) });
8661
8661
  }
8662
- if (W && d) {
8662
+ if (O && d) {
8663
8663
  const he = Yn(t.content), Ne = he.length > h;
8664
8664
  return /* @__PURE__ */ c.jsx(Fc, { open: S, onOpenChange: T, children: /* @__PURE__ */ c.jsxs("div", { className: "font-mono text-sm text-current", children: [
8665
- /* @__PURE__ */ c.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", _ && "text-xs"), children: Ne && !S ? he.substring(0, h) + "..." : he }),
8665
+ /* @__PURE__ */ c.jsx("pre", { className: L("whitespace-pre-wrap break-words text-current", _ && "text-xs"), children: Ne && !S ? he.substring(0, h) + "..." : he }),
8666
8666
  Ne && /* @__PURE__ */ c.jsx(Bc, { asChild: !0, children: /* @__PURE__ */ c.jsx(Oe, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8667
8667
  /* @__PURE__ */ c.jsx(Sr, { className: "h-3 w-3 mr-1" }),
8668
8668
  "Show less"
@@ -8674,14 +8674,14 @@ const Aw = Y.memo(function({
8674
8674
  ] }) }) })
8675
8675
  ] }) });
8676
8676
  }
8677
- if (W && C && !d) {
8677
+ if (O && C && !d) {
8678
8678
  const he = zw(t.content);
8679
8679
  if (he && _w(he))
8680
8680
  return /* @__PURE__ */ c.jsx(Gs, { content: he.trim(), hideFallbackDuringStreaming: !0 });
8681
8681
  const Ne = Yn(t.content);
8682
- return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", _ && "text-xs"), children: Ne }) });
8682
+ return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className: L("whitespace-pre-wrap break-words text-current", _ && "text-xs"), children: Ne }) });
8683
8683
  }
8684
- const pe = Z.length > 0 && O !== "tool", Le = ae.length > 0 && O !== "tool" && !1;
8684
+ const pe = J.length > 0 && M !== "tool", Le = ae.length > 0 && M !== "tool" && !1;
8685
8685
  return /* @__PURE__ */ c.jsxs("div", { children: [
8686
8686
  r ? (
8687
8687
  // Streaming container: reserve space and show a skeleton until we have text,
@@ -8689,7 +8689,7 @@ const Aw = Y.memo(function({
8689
8689
  /* @__PURE__ */ c.jsxs(
8690
8690
  "div",
8691
8691
  {
8692
- className: D(
8692
+ className: L(
8693
8693
  "relative transition-all duration-200 ease-out",
8694
8694
  _ ? "text-xs" : "text-sm"
8695
8695
  ),
@@ -8709,7 +8709,7 @@ const Aw = Y.memo(function({
8709
8709
  ] }) }) : /* @__PURE__ */ c.jsx(
8710
8710
  "pre",
8711
8711
  {
8712
- className: D(
8712
+ className: L(
8713
8713
  "whitespace-pre-wrap break-words font-sans leading-relaxed transition-opacity duration-200",
8714
8714
  _ && "text-xs"
8715
8715
  ),
@@ -8717,18 +8717,18 @@ const Aw = Y.memo(function({
8717
8717
  }
8718
8718
  ) });
8719
8719
  })(),
8720
- /* @__PURE__ */ c.jsx("div", { className: "mt-2", children: /* @__PURE__ */ c.jsx(kw, { className: D(V, _ ? "text-xs" : "text-sm") }) })
8720
+ /* @__PURE__ */ c.jsx("div", { className: "mt-2", children: /* @__PURE__ */ c.jsx(kw, { className: L(D, _ ? "text-xs" : "text-sm") }) })
8721
8721
  ]
8722
8722
  }
8723
8723
  )
8724
8724
  ) : (() => {
8725
- const he = ni(ee.trim());
8725
+ const he = ni(Z.trim());
8726
8726
  if (he !== null) return /* @__PURE__ */ c.jsx(nl, { data: he });
8727
- if (O === "user" && m) {
8728
- const Ne = ee.trim();
8727
+ if (M === "user" && m) {
8728
+ const Ne = Z.trim();
8729
8729
  if (Ne.length > g)
8730
8730
  return /* @__PURE__ */ c.jsxs(Fc, { open: I, onOpenChange: j, children: [
8731
- /* @__PURE__ */ c.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", _ && "text-xs"), children: I ? /* @__PURE__ */ c.jsx(Gs, { content: Ne, hideFallbackDuringStreaming: !0 }) : /* @__PURE__ */ c.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", _ && "text-xs"), children: [
8731
+ /* @__PURE__ */ c.jsx("div", { className: L("text-sm text-[hsl(var(--chat-bubble-user-text))]", _ && "text-xs"), children: I ? /* @__PURE__ */ c.jsx(Gs, { content: Ne, hideFallbackDuringStreaming: !0 }) : /* @__PURE__ */ c.jsxs("pre", { className: L("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", _ && "text-xs"), children: [
8732
8732
  Ne.substring(0, g),
8733
8733
  "..."
8734
8734
  ] }) }),
@@ -8754,20 +8754,20 @@ const Aw = Y.memo(function({
8754
8754
  return /* @__PURE__ */ c.jsx(
8755
8755
  Gs,
8756
8756
  {
8757
- content: ee.trim(),
8757
+ content: Z.trim(),
8758
8758
  isStreaming: r,
8759
8759
  hideFallbackDuringStreaming: !0,
8760
8760
  streamingThrottleMs: o
8761
8761
  }
8762
8762
  );
8763
8763
  })(),
8764
- pe && /* @__PURE__ */ c.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Z.map((he, Ne) => {
8765
- const Ke = he, Qe = typeof Ke.width == "number" ? Ke.width : void 0, st = typeof Ke.height == "number" ? Ke.height : void 0, z = Qe && st && st > 0 ? `${Qe} / ${st}` : "4 / 3", Q = Qe && st && st > 0 ? Math.max(120, Math.round(st / Qe * 140)) : 160;
8764
+ pe && /* @__PURE__ */ c.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: J.map((he, Ne) => {
8765
+ const Ke = he, Qe = typeof Ke.width == "number" ? Ke.width : void 0, st = typeof Ke.height == "number" ? Ke.height : void 0, U = Qe && st && st > 0 ? `${Qe} / ${st}` : "4 / 3", Q = Qe && st && st > 0 ? Math.max(120, Math.round(st / Qe * 140)) : 160;
8766
8766
  return /* @__PURE__ */ c.jsxs(
8767
8767
  "div",
8768
8768
  {
8769
8769
  className: "relative border rounded overflow-hidden bg-gray-100 dark:bg-gray-900/40",
8770
- style: { aspectRatio: z, minHeight: Q },
8770
+ style: { aspectRatio: U, minHeight: Q },
8771
8771
  "data-placeholder-height": Q,
8772
8772
  children: [
8773
8773
  /* @__PURE__ */ c.jsx(
@@ -8792,43 +8792,43 @@ const Aw = Y.memo(function({
8792
8792
  ] });
8793
8793
  }, je = an(() => Fw(t), [t]);
8794
8794
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8795
- /* @__PURE__ */ c.jsx("div", { className: D(ce(), b.container), children: /* @__PURE__ */ c.jsxs("div", { className: D(se(), b.content), children: [
8796
- (a || l || W) && /* @__PURE__ */ c.jsxs(
8795
+ /* @__PURE__ */ c.jsx("div", { className: L(ce(), b.container), children: /* @__PURE__ */ c.jsxs("div", { className: L(se(), b.content), children: [
8796
+ (a || l || O) && /* @__PURE__ */ c.jsxs(
8797
8797
  "div",
8798
8798
  {
8799
- className: D(
8799
+ className: L(
8800
8800
  "flex items-center justify-between mb-2 pb-2 border-b border-current/10",
8801
8801
  _ && "mb-1 pb-1",
8802
- V,
8802
+ D,
8803
8803
  b.header
8804
8804
  ),
8805
8805
  children: [
8806
8806
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
8807
- te(),
8808
- l && je && /* @__PURE__ */ c.jsx("span", { className: D("font-medium", _ ? "text-xs" : "text-sm"), children: je }),
8809
- W && F.name && /* @__PURE__ */ c.jsxs(
8807
+ ee(),
8808
+ l && je && /* @__PURE__ */ c.jsx("span", { className: L("font-medium", _ ? "text-xs" : "text-sm"), children: je }),
8809
+ O && B.name && /* @__PURE__ */ c.jsxs(
8810
8810
  Au,
8811
8811
  {
8812
8812
  variant: "outline",
8813
- className: D(
8813
+ className: L(
8814
8814
  "text-xs flex items-center gap-1 cursor-pointer",
8815
- V,
8815
+ D,
8816
8816
  "border border-current/40",
8817
8817
  _ && "text-xs h-4"
8818
8818
  ),
8819
8819
  onClick: () => N((ue) => !ue),
8820
8820
  children: [
8821
- /* @__PURE__ */ c.jsx("span", { children: F.name }),
8821
+ /* @__PURE__ */ c.jsx("span", { children: B.name }),
8822
8822
  /* @__PURE__ */ c.jsx("span", { className: "inline-flex items-center", children: C ? /* @__PURE__ */ c.jsx(Sr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(qn, { className: "h-3 w-3" }) })
8823
8823
  ]
8824
8824
  }
8825
8825
  ),
8826
- W && !F.name && /* @__PURE__ */ c.jsx(
8826
+ O && !B.name && /* @__PURE__ */ c.jsx(
8827
8827
  Oe,
8828
8828
  {
8829
8829
  variant: "ghost",
8830
8830
  size: "sm",
8831
- className: D("h-6 px-1", V, "hover:bg-foreground/10"),
8831
+ className: L("h-6 px-1", D, "hover:bg-foreground/10"),
8832
8832
  onClick: () => N((ue) => !ue),
8833
8833
  children: /* @__PURE__ */ c.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
8834
8834
  "Tool Output ",
@@ -8838,11 +8838,11 @@ const Aw = Y.memo(function({
8838
8838
  )
8839
8839
  ] }),
8840
8840
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
8841
- a && /* @__PURE__ */ c.jsx("span", { className: D("text-xs opacity-60", V, _ && "text-xs"), children: Ce(t.createdAt) }),
8841
+ a && /* @__PURE__ */ c.jsx("span", { className: L("text-xs opacity-60", D, _ && "text-xs"), children: Ce(t.createdAt) }),
8842
8842
  i && !s && /* @__PURE__ */ c.jsxs(
8843
8843
  "div",
8844
8844
  {
8845
- className: D(
8845
+ className: L(
8846
8846
  "opacity-0 group-hover:opacity-100 transition-opacity",
8847
8847
  "flex items-center gap-1",
8848
8848
  b.actions
@@ -8853,37 +8853,37 @@ const Aw = Y.memo(function({
8853
8853
  {
8854
8854
  variant: "ghost",
8855
8855
  size: "sm",
8856
- onClick: $,
8857
- className: D("h-6 w-6 p-0 hover:bg-foreground/10", V, _ && "h-5 w-5"),
8856
+ onClick: z,
8857
+ className: L("h-6 w-6 p-0 hover:bg-foreground/10", D, _ && "h-5 w-5"),
8858
8858
  children: /* @__PURE__ */ c.jsx(
8859
8859
  Ka,
8860
8860
  {
8861
- className: D(
8862
- y ? "text-success" : V,
8861
+ className: L(
8862
+ y ? "text-success" : D,
8863
8863
  _ ? "h-3 w-3" : "h-4 w-4"
8864
8864
  )
8865
8865
  }
8866
8866
  )
8867
8867
  }
8868
8868
  ),
8869
- O === "user" && v && /* @__PURE__ */ c.jsx(
8869
+ M === "user" && v && /* @__PURE__ */ c.jsx(
8870
8870
  Oe,
8871
8871
  {
8872
8872
  variant: "ghost",
8873
8873
  size: "sm",
8874
8874
  onClick: A,
8875
- className: D("h-6 w-6 p-0 hover:bg-foreground/10", V, _ && "h-5 w-5"),
8876
- children: /* @__PURE__ */ c.jsx(Ya, { className: D(V, _ ? "h-3 w-3" : "h-4 w-4") })
8875
+ className: L("h-6 w-6 p-0 hover:bg-foreground/10", D, _ && "h-5 w-5"),
8876
+ children: /* @__PURE__ */ c.jsx(Ya, { className: L(D, _ ? "h-3 w-3" : "h-4 w-4") })
8877
8877
  }
8878
8878
  ),
8879
- O === "assistant" && p && /* @__PURE__ */ c.jsx(
8879
+ M === "assistant" && p && /* @__PURE__ */ c.jsx(
8880
8880
  Oe,
8881
8881
  {
8882
8882
  variant: "ghost",
8883
8883
  size: "sm",
8884
8884
  onClick: K,
8885
- className: D("h-6 w-6 p-0 hover:bg-foreground/10", V, _ && "h-5 w-5"),
8886
- children: /* @__PURE__ */ c.jsx(ai, { className: D(V, _ ? "h-3 w-3" : "h-4 w-4") })
8885
+ className: L("h-6 w-6 p-0 hover:bg-foreground/10", D, _ && "h-5 w-5"),
8886
+ children: /* @__PURE__ */ c.jsx(ai, { className: L(D, _ ? "h-3 w-3" : "h-4 w-4") })
8887
8887
  }
8888
8888
  )
8889
8889
  ]
@@ -8894,20 +8894,20 @@ const Aw = Y.memo(function({
8894
8894
  }
8895
8895
  ),
8896
8896
  /* @__PURE__ */ c.jsx("div", { className: "relative", children: Pe() }),
8897
- W && C && (F.toolCallId || F.name) && /* @__PURE__ */ c.jsxs("div", { className: D("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", _ && "text-xs"), children: [
8898
- F.name && /* @__PURE__ */ c.jsxs("div", { children: [
8897
+ O && C && (B.toolCallId || B.name) && /* @__PURE__ */ c.jsxs("div", { className: L("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", _ && "text-xs"), children: [
8898
+ B.name && /* @__PURE__ */ c.jsxs("div", { children: [
8899
8899
  "Function: ",
8900
- F.name
8900
+ B.name
8901
8901
  ] }),
8902
- F.toolCallId && /* @__PURE__ */ c.jsxs("div", { children: [
8902
+ B.toolCallId && /* @__PURE__ */ c.jsxs("div", { children: [
8903
8903
  "Call ID: ",
8904
- F.toolCallId
8904
+ B.toolCallId
8905
8905
  ] })
8906
8906
  ] }),
8907
- !(a || l || W) && i && !s && /* @__PURE__ */ c.jsxs(
8907
+ !(a || l || O) && i && !s && /* @__PURE__ */ c.jsxs(
8908
8908
  "div",
8909
8909
  {
8910
- className: D(
8910
+ className: L(
8911
8911
  "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
8912
8912
  "flex items-center gap-1",
8913
8913
  b.actions
@@ -8918,45 +8918,45 @@ const Aw = Y.memo(function({
8918
8918
  {
8919
8919
  variant: "ghost",
8920
8920
  size: "sm",
8921
- onClick: $,
8922
- className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", _ && "h-5 w-5"),
8923
- children: /* @__PURE__ */ c.jsx(Ka, { className: D(y ? "text-success" : "text-current", _ ? "h-3 w-3" : "h-4 w-4") })
8921
+ onClick: z,
8922
+ className: L("h-6 w-6 p-0 hover:bg-background/50 text-current", _ && "h-5 w-5"),
8923
+ children: /* @__PURE__ */ c.jsx(Ka, { className: L(y ? "text-success" : "text-current", _ ? "h-3 w-3" : "h-4 w-4") })
8924
8924
  }
8925
8925
  ),
8926
- O === "user" && v && /* @__PURE__ */ c.jsx(
8926
+ M === "user" && v && /* @__PURE__ */ c.jsx(
8927
8927
  Oe,
8928
8928
  {
8929
8929
  variant: "ghost",
8930
8930
  size: "sm",
8931
8931
  onClick: A,
8932
- className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", _ && "h-5 w-5"),
8933
- children: /* @__PURE__ */ c.jsx(Ya, { className: D("text-current", _ ? "h-3 w-3" : "h-4 w-4") })
8932
+ className: L("h-6 w-6 p-0 hover:bg-background/50 text-current", _ && "h-5 w-5"),
8933
+ children: /* @__PURE__ */ c.jsx(Ya, { className: L("text-current", _ ? "h-3 w-3" : "h-4 w-4") })
8934
8934
  }
8935
8935
  ),
8936
- O === "assistant" && p && /* @__PURE__ */ c.jsx(
8936
+ M === "assistant" && p && /* @__PURE__ */ c.jsx(
8937
8937
  Oe,
8938
8938
  {
8939
8939
  variant: "ghost",
8940
8940
  size: "sm",
8941
8941
  onClick: K,
8942
- className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", _ && "h-5 w-5"),
8943
- children: /* @__PURE__ */ c.jsx(ai, { className: D("text-current", _ ? "h-3 w-3" : "h-4 w-4") })
8942
+ className: L("h-6 w-6 p-0 hover:bg-background/50 text-current", _ && "h-5 w-5"),
8943
+ children: /* @__PURE__ */ c.jsx(ai, { className: L("text-current", _ ? "h-3 w-3" : "h-4 w-4") })
8944
8944
  }
8945
8945
  )
8946
8946
  ]
8947
8947
  }
8948
8948
  )
8949
8949
  ] }) }),
8950
- M && /* @__PURE__ */ c.jsx(
8950
+ V && /* @__PURE__ */ c.jsx(
8951
8951
  jw,
8952
8952
  {
8953
8953
  isOpen: P,
8954
8954
  onClose: () => {
8955
- X(!1), J(null);
8955
+ X(!1), ne(null);
8956
8956
  },
8957
- fileId: M.id,
8958
- fileName: M.name,
8959
- mimeType: M.mimeType
8957
+ fileId: V.id,
8958
+ fileName: V.name,
8959
+ mimeType: V.mimeType
8960
8960
  }
8961
8961
  )
8962
8962
  ] });
@@ -9211,13 +9211,13 @@ const rl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, yd = Y.forwa
9211
9211
  onScrollAway: p,
9212
9212
  onAtBottom: x
9213
9213
  }, w) => {
9214
- const y = ze(null), E = ze(null), S = ze(!1), T = ze(!0), C = ze(null), N = ze(e.length), I = $e((M) => {
9215
- T.current = M, p && p(!M), x && x(M);
9214
+ const y = ze(null), E = ze(null), S = ze(!1), T = ze(!0), C = ze(null), N = ze(e.length), I = $e((O) => {
9215
+ T.current = O, p && p(!O), x && x(O);
9216
9216
  }, [p, x]), j = $e(
9217
- (M) => {
9217
+ (O) => {
9218
9218
  },
9219
9219
  []
9220
- ), L = an(() => {
9220
+ ), F = an(() => {
9221
9221
  if (a)
9222
9222
  return async () => {
9223
9223
  if (!S.current) {
@@ -9232,25 +9232,25 @@ const rl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, yd = Y.forwa
9232
9232
  }, [a]);
9233
9233
  Ye(() => {
9234
9234
  N.current;
9235
- const M = e.length;
9236
- N.current = M;
9235
+ const O = e.length;
9236
+ N.current = O;
9237
9237
  }, [e.length]), Ye(() => {
9238
9238
  if (typeof ResizeObserver > "u") return;
9239
- const M = E.current;
9240
- if (!M) return;
9241
- const J = () => {
9239
+ const O = E.current;
9240
+ if (!O) return;
9241
+ const D = () => {
9242
9242
  C.current !== null && (cancelAnimationFrame(C.current), C.current = null);
9243
- }, _ = new ResizeObserver(() => {
9244
- !T.current && !t || (J(), C.current = requestAnimationFrame(() => {
9243
+ }, Z = new ResizeObserver(() => {
9244
+ !T.current && !t || (D(), C.current = requestAnimationFrame(() => {
9245
9245
  t && T.current || (C.current = null);
9246
9246
  }));
9247
- }), O = M.firstElementChild;
9248
- return O && _.observe(O), () => {
9249
- J(), _.disconnect();
9247
+ }), B = O.firstElementChild;
9248
+ return B && Z.observe(B), () => {
9249
+ D(), Z.disconnect();
9250
9250
  };
9251
9251
  }, [t]);
9252
- const G = (t || e.length > N.current) && b && T.current && !v ? "smooth" : !1, P = an(() => {
9253
- }, []), X = {
9252
+ const H = b && T.current && !v, G = t, P = n && !t && e.length >= N.current, X = e.length > N.current, ne = H && (G || P || X) ? "smooth" : !1, _ = an(() => {
9253
+ }, []), M = {
9254
9254
  display: "flex",
9255
9255
  flexDirection: "column",
9256
9256
  overflowY: "auto",
@@ -9266,63 +9266,63 @@ const rl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, yd = Y.forwa
9266
9266
  return e.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: g || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx(
9267
9267
  yx,
9268
9268
  {
9269
- ref: (M) => {
9270
- y.current = M;
9269
+ ref: (O) => {
9270
+ y.current = O;
9271
9271
  },
9272
- scrollerRef: (M) => {
9273
- E.current = M instanceof HTMLDivElement ? M : null;
9272
+ scrollerRef: (O) => {
9273
+ E.current = O instanceof HTMLDivElement ? O : null;
9274
9274
  },
9275
9275
  data: e,
9276
- followOutput: G,
9277
- initialTopMostItemIndex: P,
9276
+ followOutput: ne,
9277
+ initialTopMostItemIndex: _,
9278
9278
  overscan: 200,
9279
9279
  increaseViewportBy: 200,
9280
9280
  defaultItemHeight: 120,
9281
9281
  atBottomThreshold: 50,
9282
9282
  alignToBottom: !1,
9283
9283
  startReached: () => {
9284
- L && L();
9284
+ F && F();
9285
9285
  },
9286
9286
  atBottomStateChange: I,
9287
9287
  rangeChanged: j,
9288
9288
  style: { height: "100%", overscrollBehavior: "contain" },
9289
- computeItemKey: (M, J) => rl(J, M),
9289
+ computeItemKey: (O, D) => rl(D, O),
9290
9290
  components: {
9291
- Scroller: Y.forwardRef((M, J) => /* @__PURE__ */ c.jsx(
9291
+ Scroller: Y.forwardRef((O, D) => /* @__PURE__ */ c.jsx(
9292
9292
  "div",
9293
9293
  {
9294
- ...M,
9295
- ref: J,
9294
+ ...O,
9295
+ ref: D,
9296
9296
  style: {
9297
- ...X,
9298
- ...(M == null ? void 0 : M.style) ?? {}
9297
+ ...M,
9298
+ ...(O == null ? void 0 : O.style) ?? {}
9299
9299
  }
9300
9300
  }
9301
9301
  ))
9302
9302
  },
9303
- itemContent: (M, J) => {
9304
- const _ = J.role === "user" && M === e.length - 1, O = t && n === J.id || _ && t, W = rl(J, M);
9303
+ itemContent: (O, D) => {
9304
+ const Z = D.role === "user" && O === e.length - 1, B = t && n === D.id || Z && t, J = rl(D, O);
9305
9305
  return /* @__PURE__ */ c.jsx(
9306
9306
  "div",
9307
9307
  {
9308
9308
  className: "mb-4 last:mb-0",
9309
- "data-message-id": W,
9309
+ "data-message-id": J,
9310
9310
  style: {
9311
9311
  contentVisibility: "auto",
9312
9312
  // Reserve space to prevent layout shifts during streaming
9313
- minHeight: O ? 120 : void 0,
9314
- containIntrinsicSize: O ? "auto 120px" : "auto 150px",
9313
+ minHeight: B ? 120 : void 0,
9314
+ containIntrinsicSize: B ? "auto 120px" : "auto 150px",
9315
9315
  transform: "translateZ(0)",
9316
9316
  isolation: "isolate"
9317
9317
  },
9318
9318
  children: /* @__PURE__ */ c.jsx(
9319
9319
  Aw,
9320
9320
  {
9321
- message: J,
9322
- messageIndex: M,
9323
- isStreamingMessage: t && n === J.id,
9321
+ message: D,
9322
+ messageIndex: O,
9323
+ isStreamingMessage: t && n === D.id,
9324
9324
  streamingDebounceMs: r,
9325
- isEditing: i === J.id,
9325
+ isEditing: i === D.id,
9326
9326
  showActions: s,
9327
9327
  showTimestamp: !1,
9328
9328
  showAgentName: !0,
@@ -9330,10 +9330,10 @@ const rl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, yd = Y.forwa
9330
9330
  truncateToolMessages: !1,
9331
9331
  toolMessagePreviewLength: 200,
9332
9332
  onEdit: l,
9333
- onRegenerate: () => u(M),
9333
+ onRegenerate: () => u(O),
9334
9334
  onCancelEdit: d
9335
9335
  },
9336
- J.id ?? `msg-${J.role}-${M}-${J.createdAt ?? ""}`
9336
+ D.id ?? `msg-${D.role}-${O}-${D.createdAt ?? ""}`
9337
9337
  )
9338
9338
  }
9339
9339
  );
@@ -9710,17 +9710,17 @@ const sy = (e) => ({
9710
9710
  }, g = wa(o), b = ba(g), v = await i.getDimensions(u), p = g === "y", x = p ? "top" : "left", w = p ? "bottom" : "right", y = p ? "clientHeight" : "clientWidth", E = s.reference[b] + s.reference[g] - m[g] - s.floating[b], S = m[g] - s.reference[g], T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
9711
9711
  let C = T ? T[y] : 0;
9712
9712
  (!C || !await (i.isElement == null ? void 0 : i.isElement(T))) && (C = a.floating[y] || s.floating[b]);
9713
- const N = E / 2 - S / 2, I = C / 2 - v[b] / 2 - 1, j = bn(h[x], I), L = bn(h[w], I), H = j, G = C - v[b] - L, P = C / 2 - v[b] / 2 + N, X = Ei(H, P, G), M = !l.arrow && dr(o) != null && P !== X && s.reference[b] / 2 - (P < H ? j : L) - v[b] / 2 < 0, J = M ? P < H ? P - H : P - G : 0;
9713
+ const N = E / 2 - S / 2, I = C / 2 - v[b] / 2 - 1, j = bn(h[x], I), F = bn(h[w], I), H = j, G = C - v[b] - F, P = C / 2 - v[b] / 2 + N, X = Ei(H, P, G), V = !l.arrow && dr(o) != null && P !== X && s.reference[b] / 2 - (P < H ? j : F) - v[b] / 2 < 0, ne = V ? P < H ? P - H : P - G : 0;
9714
9714
  return {
9715
- [g]: m[g] + J,
9715
+ [g]: m[g] + ne,
9716
9716
  data: {
9717
9717
  [g]: X,
9718
- centerOffset: P - X - J,
9719
- ...M && {
9720
- alignmentOffset: J
9718
+ centerOffset: P - X - ne,
9719
+ ...V && {
9720
+ alignmentOffset: ne
9721
9721
  }
9722
9722
  },
9723
- reset: M
9723
+ reset: V
9724
9724
  };
9725
9725
  }
9726
9726
  }), iy = function(e) {
@@ -9759,8 +9759,8 @@ const sy = (e) => ({
9759
9759
  placement: o,
9760
9760
  overflows: I
9761
9761
  }], !I.every((P) => P <= 0)) {
9762
- var L, H;
9763
- const P = (((L = s.flip) == null ? void 0 : L.index) || 0) + 1, X = C[P];
9762
+ var F, H;
9763
+ const P = (((F = s.flip) == null ? void 0 : F.index) || 0) + 1, X = C[P];
9764
9764
  if (X && (!(h === "alignment" ? w !== Zt(X) : !1) || // We leave the current main axis only if every placement on that axis
9765
9765
  // overflows the main axis.
9766
9766
  j.every((_) => Zt(_.placement) === w ? _.overflows[0] > 0 : !0)))
@@ -9773,31 +9773,31 @@ const sy = (e) => ({
9773
9773
  placement: X
9774
9774
  }
9775
9775
  };
9776
- let M = (H = j.filter((J) => J.overflows[0] <= 0).sort((J, _) => J.overflows[1] - _.overflows[1])[0]) == null ? void 0 : H.placement;
9777
- if (!M)
9776
+ let V = (H = j.filter((ne) => ne.overflows[0] <= 0).sort((ne, _) => ne.overflows[1] - _.overflows[1])[0]) == null ? void 0 : H.placement;
9777
+ if (!V)
9778
9778
  switch (g) {
9779
9779
  case "bestFit": {
9780
9780
  var G;
9781
- const J = (G = j.filter((_) => {
9781
+ const ne = (G = j.filter((_) => {
9782
9782
  if (T) {
9783
- const O = Zt(_.placement);
9784
- return O === w || // Create a bias to the `y` side axis due to horizontal
9783
+ const M = Zt(_.placement);
9784
+ return M === w || // Create a bias to the `y` side axis due to horizontal
9785
9785
  // reading directions favoring greater width.
9786
- O === "y";
9786
+ M === "y";
9787
9787
  }
9788
9788
  return !0;
9789
- }).map((_) => [_.placement, _.overflows.filter((O) => O > 0).reduce((O, W) => O + W, 0)]).sort((_, O) => _[1] - O[1])[0]) == null ? void 0 : G[0];
9790
- J && (M = J);
9789
+ }).map((_) => [_.placement, _.overflows.filter((M) => M > 0).reduce((M, O) => M + O, 0)]).sort((_, M) => _[1] - M[1])[0]) == null ? void 0 : G[0];
9790
+ ne && (V = ne);
9791
9791
  break;
9792
9792
  }
9793
9793
  case "initialPlacement":
9794
- M = a;
9794
+ V = a;
9795
9795
  break;
9796
9796
  }
9797
- if (o !== M)
9797
+ if (o !== V)
9798
9798
  return {
9799
9799
  reset: {
9800
- placement: M
9800
+ placement: V
9801
9801
  }
9802
9802
  };
9803
9803
  }
@@ -10029,8 +10029,8 @@ const ly = function(e) {
10029
10029
  const w = v - d.top - d.bottom, y = b - d.left - d.right, E = bn(v - d[p], w), S = bn(b - d[x], y), T = !t.middlewareData.shift;
10030
10030
  let C = E, N = S;
10031
10031
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (N = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = w), T && !m) {
10032
- const j = Ct(d.left, 0), L = Ct(d.right, 0), H = Ct(d.top, 0), G = Ct(d.bottom, 0);
10033
- g ? N = b - 2 * (j !== 0 || L !== 0 ? j + L : Ct(d.left, d.right)) : C = v - 2 * (H !== 0 || G !== 0 ? H + G : Ct(d.top, d.bottom));
10032
+ const j = Ct(d.left, 0), F = Ct(d.right, 0), H = Ct(d.top, 0), G = Ct(d.bottom, 0);
10033
+ g ? N = b - 2 * (j !== 0 || F !== 0 ? j + F : Ct(d.left, d.right)) : C = v - 2 * (H !== 0 || G !== 0 ? H + G : Ct(d.top, d.bottom));
10034
10034
  }
10035
10035
  await l({
10036
10036
  ...t,
@@ -10618,7 +10618,7 @@ function Yy(e) {
10618
10618
  _ !== T.current && (T.current = _, v(_));
10619
10619
  }, []), y = f.useCallback((_) => {
10620
10620
  _ !== C.current && (C.current = _, x(_));
10621
- }, []), E = s || b, S = i || p, T = f.useRef(null), C = f.useRef(null), N = f.useRef(d), I = l != null, j = oi(l), L = oi(o), H = oi(u), G = f.useCallback(() => {
10621
+ }, []), E = s || b, S = i || p, T = f.useRef(null), C = f.useRef(null), N = f.useRef(d), I = l != null, j = oi(l), F = oi(o), H = oi(u), G = f.useCallback(() => {
10622
10622
  if (!T.current || !C.current)
10623
10623
  return;
10624
10624
  const _ = {
@@ -10626,20 +10626,20 @@ function Yy(e) {
10626
10626
  strategy: n,
10627
10627
  middleware: m
10628
10628
  };
10629
- L.current && (_.platform = L.current), Vy(T.current, C.current, _).then((O) => {
10630
- const W = {
10631
- ...O,
10629
+ F.current && (_.platform = F.current), Vy(T.current, C.current, _).then((M) => {
10630
+ const O = {
10631
+ ...M,
10632
10632
  // The floating element's position may be recomputed while it's closed
10633
10633
  // but still mounted (such as when transitioning out). To ensure
10634
10634
  // `isPositioned` will be `false` initially on the next open, avoid
10635
10635
  // setting it to `true` when `open === false` (must be specified).
10636
10636
  isPositioned: H.current !== !1
10637
10637
  };
10638
- P.current && !Wo(N.current, W) && (N.current = W, Xo.flushSync(() => {
10639
- h(W);
10638
+ P.current && !Wo(N.current, O) && (N.current = O, Xo.flushSync(() => {
10639
+ h(O);
10640
10640
  }));
10641
10641
  });
10642
- }, [m, t, n, L, H]);
10642
+ }, [m, t, n, F, H]);
10643
10643
  No(() => {
10644
10644
  u === !1 && N.current.isPositioned && (N.current.isPositioned = !1, h((_) => ({
10645
10645
  ..._,
@@ -10661,37 +10661,37 @@ function Yy(e) {
10661
10661
  floating: C,
10662
10662
  setReference: w,
10663
10663
  setFloating: y
10664
- }), [w, y]), M = f.useMemo(() => ({
10664
+ }), [w, y]), V = f.useMemo(() => ({
10665
10665
  reference: E,
10666
10666
  floating: S
10667
- }), [E, S]), J = f.useMemo(() => {
10667
+ }), [E, S]), ne = f.useMemo(() => {
10668
10668
  const _ = {
10669
10669
  position: n,
10670
10670
  left: 0,
10671
10671
  top: 0
10672
10672
  };
10673
- if (!M.floating)
10673
+ if (!V.floating)
10674
10674
  return _;
10675
- const O = pl(M.floating, d.x), W = pl(M.floating, d.y);
10675
+ const M = pl(V.floating, d.x), O = pl(V.floating, d.y);
10676
10676
  return a ? {
10677
10677
  ..._,
10678
- transform: "translate(" + O + "px, " + W + "px)",
10679
- ...Pd(M.floating) >= 1.5 && {
10678
+ transform: "translate(" + M + "px, " + O + "px)",
10679
+ ...Pd(V.floating) >= 1.5 && {
10680
10680
  willChange: "transform"
10681
10681
  }
10682
10682
  } : {
10683
10683
  position: n,
10684
- left: O,
10685
- top: W
10684
+ left: M,
10685
+ top: O
10686
10686
  };
10687
- }, [n, a, M.floating, d.x, d.y]);
10687
+ }, [n, a, V.floating, d.x, d.y]);
10688
10688
  return f.useMemo(() => ({
10689
10689
  ...d,
10690
10690
  update: G,
10691
10691
  refs: X,
10692
- elements: M,
10693
- floatingStyles: J
10694
- }), [d, G, X, M, J]);
10692
+ elements: V,
10693
+ floatingStyles: ne
10694
+ }), [d, G, X, V, ne]);
10695
10695
  }
10696
10696
  const qy = (e) => {
10697
10697
  function t(n) {
@@ -10792,7 +10792,7 @@ var Fd = "PopperAnchor", Bd = f.forwardRef(
10792
10792
  Bd.displayName = Fd;
10793
10793
  var Ra = "PopperContent", [i0, a0] = Md(Ra), $d = f.forwardRef(
10794
10794
  (e, t) => {
10795
- var $, A, K, te, ce, se;
10795
+ var z, A, K, ee, ce, se;
10796
10796
  const {
10797
10797
  __scopePopper: n,
10798
10798
  side: r = "bottom",
@@ -10808,12 +10808,12 @@ var Ra = "PopperContent", [i0, a0] = Md(Ra), $d = f.forwardRef(
10808
10808
  updatePositionStrategy: g = "optimized",
10809
10809
  onPlaced: b,
10810
10810
  ...v
10811
- } = e, p = Dd(Ra, n), [x, w] = f.useState(null), y = Re(t, (Ce) => w(Ce)), [E, S] = f.useState(null), T = Od(E), C = (T == null ? void 0 : T.width) ?? 0, N = (T == null ? void 0 : T.height) ?? 0, I = r + (s !== "center" ? "-" + s : ""), j = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, L = Array.isArray(u) ? u : [u], H = L.length > 0, G = {
10811
+ } = e, p = Dd(Ra, n), [x, w] = f.useState(null), y = Re(t, (Ce) => w(Ce)), [E, S] = f.useState(null), T = Od(E), C = (T == null ? void 0 : T.width) ?? 0, N = (T == null ? void 0 : T.height) ?? 0, I = r + (s !== "center" ? "-" + s : ""), j = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, F = Array.isArray(u) ? u : [u], H = F.length > 0, G = {
10812
10812
  padding: j,
10813
- boundary: L.filter(l0),
10813
+ boundary: F.filter(l0),
10814
10814
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
10815
10815
  altBoundary: H
10816
- }, { refs: P, floatingStyles: X, placement: M, isPositioned: J, middlewareData: _ } = Yy({
10816
+ }, { refs: P, floatingStyles: X, placement: V, isPositioned: ne, middlewareData: _ } = Yy({
10817
10817
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
10818
10818
  strategy: "fixed",
10819
10819
  placement: I,
@@ -10843,11 +10843,11 @@ var Ra = "PopperContent", [i0, a0] = Md(Ra), $d = f.forwardRef(
10843
10843
  u0({ arrowWidth: C, arrowHeight: N }),
10844
10844
  m && t0({ strategy: "referenceHidden", ...G })
10845
10845
  ]
10846
- }), [O, W] = Ud(M), V = at(b);
10846
+ }), [M, O] = Ud(V), D = at(b);
10847
10847
  ot(() => {
10848
- J && (V == null || V());
10849
- }, [J, V]);
10850
- const ee = ($ = _.arrow) == null ? void 0 : $.x, F = (A = _.arrow) == null ? void 0 : A.y, Z = ((K = _.arrow) == null ? void 0 : K.centerOffset) !== 0, [ae, ge] = f.useState();
10848
+ ne && (D == null || D());
10849
+ }, [ne, D]);
10850
+ const Z = (z = _.arrow) == null ? void 0 : z.x, B = (A = _.arrow) == null ? void 0 : A.y, J = ((K = _.arrow) == null ? void 0 : K.centerOffset) !== 0, [ae, ge] = f.useState();
10851
10851
  return ot(() => {
10852
10852
  x && ge(window.getComputedStyle(x).zIndex);
10853
10853
  }, [x]), /* @__PURE__ */ c.jsx(
@@ -10857,12 +10857,12 @@ var Ra = "PopperContent", [i0, a0] = Md(Ra), $d = f.forwardRef(
10857
10857
  "data-radix-popper-content-wrapper": "",
10858
10858
  style: {
10859
10859
  ...X,
10860
- transform: J ? X.transform : "translate(0, -200%)",
10860
+ transform: ne ? X.transform : "translate(0, -200%)",
10861
10861
  // keep off the page when measuring
10862
10862
  minWidth: "max-content",
10863
10863
  zIndex: ae,
10864
10864
  "--radix-popper-transform-origin": [
10865
- (te = _.transformOrigin) == null ? void 0 : te.x,
10865
+ (ee = _.transformOrigin) == null ? void 0 : ee.x,
10866
10866
  (ce = _.transformOrigin) == null ? void 0 : ce.y
10867
10867
  ].join(" "),
10868
10868
  // hide the content if using the hide middleware and should be hidden
@@ -10878,23 +10878,23 @@ var Ra = "PopperContent", [i0, a0] = Md(Ra), $d = f.forwardRef(
10878
10878
  i0,
10879
10879
  {
10880
10880
  scope: n,
10881
- placedSide: O,
10881
+ placedSide: M,
10882
10882
  onArrowChange: S,
10883
- arrowX: ee,
10884
- arrowY: F,
10885
- shouldHideArrow: Z,
10883
+ arrowX: Z,
10884
+ arrowY: B,
10885
+ shouldHideArrow: J,
10886
10886
  children: /* @__PURE__ */ c.jsx(
10887
10887
  xe.div,
10888
10888
  {
10889
- "data-side": O,
10890
- "data-align": W,
10889
+ "data-side": M,
10890
+ "data-align": O,
10891
10891
  ...v,
10892
10892
  ref: y,
10893
10893
  style: {
10894
10894
  ...v.style,
10895
10895
  // if the PopperContent hasn't been placed yet (not all measurements done)
10896
10896
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
10897
- animation: J ? void 0 : "none"
10897
+ animation: ne ? void 0 : "none"
10898
10898
  }
10899
10899
  }
10900
10900
  )
@@ -11031,23 +11031,23 @@ var g0 = f.forwardRef((e, t) => {
11031
11031
  ...h,
11032
11032
  ref: g,
11033
11033
  style: { outline: "none", ...e.style },
11034
- onMouseDown: ne(e.onMouseDown, () => {
11034
+ onMouseDown: te(e.onMouseDown, () => {
11035
11035
  S.current = !0;
11036
11036
  }),
11037
- onFocus: ne(e.onFocus, (N) => {
11037
+ onFocus: te(e.onFocus, (N) => {
11038
11038
  const I = !S.current;
11039
11039
  if (N.target === N.currentTarget && I && !x) {
11040
11040
  const j = new CustomEvent(si, d0);
11041
11041
  if (N.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
11042
- const L = E().filter((M) => M.focusable), H = L.find((M) => M.active), G = L.find((M) => M.id === v), X = [H, G, ...L].filter(
11042
+ const F = E().filter((V) => V.focusable), H = F.find((V) => V.active), G = F.find((V) => V.id === v), X = [H, G, ...F].filter(
11043
11043
  Boolean
11044
- ).map((M) => M.ref.current);
11044
+ ).map((V) => V.ref.current);
11045
11045
  qd(X, d);
11046
11046
  }
11047
11047
  }
11048
11048
  S.current = !1;
11049
11049
  }),
11050
- onBlur: ne(e.onBlur, () => w(!1))
11050
+ onBlur: te(e.onBlur, () => w(!1))
11051
11051
  }
11052
11052
  )
11053
11053
  }
@@ -11079,11 +11079,11 @@ var g0 = f.forwardRef((e, t) => {
11079
11079
  "data-orientation": d.orientation,
11080
11080
  ...a,
11081
11081
  ref: t,
11082
- onMouseDown: ne(e.onMouseDown, (p) => {
11082
+ onMouseDown: te(e.onMouseDown, (p) => {
11083
11083
  r ? d.onItemFocus(u) : p.preventDefault();
11084
11084
  }),
11085
- onFocus: ne(e.onFocus, () => d.onItemFocus(u)),
11086
- onKeyDown: ne(e.onKeyDown, (p) => {
11085
+ onFocus: te(e.onFocus, () => d.onItemFocus(u)),
11086
+ onKeyDown: te(e.onKeyDown, (p) => {
11087
11087
  if (p.key === "Tab" && p.shiftKey) {
11088
11088
  d.onItemShiftTab();
11089
11089
  return;
@@ -11212,7 +11212,7 @@ var Pt = "MenuContent", [_0, Pa] = $n(Pt), nf = f.forwardRef(
11212
11212
  trapFocus: n.open,
11213
11213
  disableOutsidePointerEvents: n.open,
11214
11214
  disableOutsideScroll: !0,
11215
- onFocusOutside: ne(
11215
+ onFocusOutside: te(
11216
11216
  e.onFocusOutside,
11217
11217
  (s) => s.preventDefault(),
11218
11218
  { checkForDefaultPrevented: !1 }
@@ -11251,17 +11251,17 @@ var Pt = "MenuContent", [_0, Pa] = $n(Pt), nf = f.forwardRef(
11251
11251
  onDismiss: g,
11252
11252
  disableOutsideScroll: b,
11253
11253
  ...v
11254
- } = e, p = Hn(Pt, n), x = eo(Pt, n), w = Ss(n), y = Zd(n), E = N0(n), [S, T] = f.useState(null), C = f.useRef(null), N = Re(t, C, p.onContentChange), I = f.useRef(0), j = f.useRef(""), L = f.useRef(0), H = f.useRef(null), G = f.useRef("right"), P = f.useRef(0), X = b ? fs : f.Fragment, M = b ? { as: D0, allowPinchZoom: !0 } : void 0, J = (O) => {
11255
- var $, A;
11256
- const W = j.current + O, V = E().filter((K) => !K.disabled), ee = document.activeElement, F = ($ = V.find((K) => K.ref.current === ee)) == null ? void 0 : $.textValue, Z = V.map((K) => K.textValue), ae = Y0(Z, W, F), ge = (A = V.find((K) => K.textValue === ae)) == null ? void 0 : A.ref.current;
11257
- (function K(te) {
11258
- j.current = te, window.clearTimeout(I.current), te !== "" && (I.current = window.setTimeout(() => K(""), 1e3));
11259
- })(W), ge && setTimeout(() => ge.focus());
11254
+ } = e, p = Hn(Pt, n), x = eo(Pt, n), w = Ss(n), y = Zd(n), E = N0(n), [S, T] = f.useState(null), C = f.useRef(null), N = Re(t, C, p.onContentChange), I = f.useRef(0), j = f.useRef(""), F = f.useRef(0), H = f.useRef(null), G = f.useRef("right"), P = f.useRef(0), X = b ? fs : f.Fragment, V = b ? { as: D0, allowPinchZoom: !0 } : void 0, ne = (M) => {
11255
+ var z, A;
11256
+ const O = j.current + M, D = E().filter((K) => !K.disabled), Z = document.activeElement, B = (z = D.find((K) => K.ref.current === Z)) == null ? void 0 : z.textValue, J = D.map((K) => K.textValue), ae = Y0(J, O, B), ge = (A = D.find((K) => K.textValue === ae)) == null ? void 0 : A.ref.current;
11257
+ (function K(ee) {
11258
+ j.current = ee, window.clearTimeout(I.current), ee !== "" && (I.current = window.setTimeout(() => K(""), 1e3));
11259
+ })(O), ge && setTimeout(() => ge.focus());
11260
11260
  };
11261
11261
  f.useEffect(() => () => window.clearTimeout(I.current), []), fa();
11262
- const _ = f.useCallback((O) => {
11263
- var V, ee;
11264
- return G.current === ((V = H.current) == null ? void 0 : V.side) && X0(O, (ee = H.current) == null ? void 0 : ee.area);
11262
+ const _ = f.useCallback((M) => {
11263
+ var D, Z;
11264
+ return G.current === ((D = H.current) == null ? void 0 : D.side) && X0(M, (Z = H.current) == null ? void 0 : Z.area);
11265
11265
  }, []);
11266
11266
  return /* @__PURE__ */ c.jsx(
11267
11267
  _0,
@@ -11269,36 +11269,36 @@ var Pt = "MenuContent", [_0, Pa] = $n(Pt), nf = f.forwardRef(
11269
11269
  scope: n,
11270
11270
  searchRef: j,
11271
11271
  onItemEnter: f.useCallback(
11272
- (O) => {
11273
- _(O) && O.preventDefault();
11272
+ (M) => {
11273
+ _(M) && M.preventDefault();
11274
11274
  },
11275
11275
  [_]
11276
11276
  ),
11277
11277
  onItemLeave: f.useCallback(
11278
- (O) => {
11279
- var W;
11280
- _(O) || ((W = C.current) == null || W.focus(), T(null));
11278
+ (M) => {
11279
+ var O;
11280
+ _(M) || ((O = C.current) == null || O.focus(), T(null));
11281
11281
  },
11282
11282
  [_]
11283
11283
  ),
11284
11284
  onTriggerLeave: f.useCallback(
11285
- (O) => {
11286
- _(O) && O.preventDefault();
11285
+ (M) => {
11286
+ _(M) && M.preventDefault();
11287
11287
  },
11288
11288
  [_]
11289
11289
  ),
11290
- pointerGraceTimerRef: L,
11291
- onPointerGraceIntentChange: f.useCallback((O) => {
11292
- H.current = O;
11290
+ pointerGraceTimerRef: F,
11291
+ onPointerGraceIntentChange: f.useCallback((M) => {
11292
+ H.current = M;
11293
11293
  }, []),
11294
- children: /* @__PURE__ */ c.jsx(X, { ...M, children: /* @__PURE__ */ c.jsx(
11294
+ children: /* @__PURE__ */ c.jsx(X, { ...V, children: /* @__PURE__ */ c.jsx(
11295
11295
  ls,
11296
11296
  {
11297
11297
  asChild: !0,
11298
11298
  trapped: o,
11299
- onMountAutoFocus: ne(s, (O) => {
11300
- var W;
11301
- O.preventDefault(), (W = C.current) == null || W.focus({ preventScroll: !0 });
11299
+ onMountAutoFocus: te(s, (M) => {
11300
+ var O;
11301
+ M.preventDefault(), (O = C.current) == null || O.focus({ preventScroll: !0 });
11302
11302
  }),
11303
11303
  onUnmountAutoFocus: i,
11304
11304
  children: /* @__PURE__ */ c.jsx(
@@ -11321,8 +11321,8 @@ var Pt = "MenuContent", [_0, Pa] = $n(Pt), nf = f.forwardRef(
11321
11321
  loop: r,
11322
11322
  currentTabStopId: S,
11323
11323
  onCurrentTabStopIdChange: T,
11324
- onEntryFocus: ne(l, (O) => {
11325
- x.isUsingKeyboardRef.current || O.preventDefault();
11324
+ onEntryFocus: te(l, (M) => {
11325
+ x.isUsingKeyboardRef.current || M.preventDefault();
11326
11326
  }),
11327
11327
  preventScrollOnEntryFocus: !0,
11328
11328
  children: /* @__PURE__ */ c.jsx(
@@ -11337,25 +11337,25 @@ var Pt = "MenuContent", [_0, Pa] = $n(Pt), nf = f.forwardRef(
11337
11337
  ...v,
11338
11338
  ref: N,
11339
11339
  style: { outline: "none", ...v.style },
11340
- onKeyDown: ne(v.onKeyDown, (O) => {
11341
- const V = O.target.closest("[data-radix-menu-content]") === O.currentTarget, ee = O.ctrlKey || O.altKey || O.metaKey, F = O.key.length === 1;
11342
- V && (O.key === "Tab" && O.preventDefault(), !ee && F && J(O.key));
11343
- const Z = C.current;
11344
- if (O.target !== Z || !T0.includes(O.key)) return;
11345
- O.preventDefault();
11346
- const ge = E().filter(($) => !$.disabled).map(($) => $.ref.current);
11347
- Xd.includes(O.key) && ge.reverse(), G0(ge);
11340
+ onKeyDown: te(v.onKeyDown, (M) => {
11341
+ const D = M.target.closest("[data-radix-menu-content]") === M.currentTarget, Z = M.ctrlKey || M.altKey || M.metaKey, B = M.key.length === 1;
11342
+ D && (M.key === "Tab" && M.preventDefault(), !Z && B && ne(M.key));
11343
+ const J = C.current;
11344
+ if (M.target !== J || !T0.includes(M.key)) return;
11345
+ M.preventDefault();
11346
+ const ge = E().filter((z) => !z.disabled).map((z) => z.ref.current);
11347
+ Xd.includes(M.key) && ge.reverse(), G0(ge);
11348
11348
  }),
11349
- onBlur: ne(e.onBlur, (O) => {
11350
- O.currentTarget.contains(O.target) || (window.clearTimeout(I.current), j.current = "");
11349
+ onBlur: te(e.onBlur, (M) => {
11350
+ M.currentTarget.contains(M.target) || (window.clearTimeout(I.current), j.current = "");
11351
11351
  }),
11352
- onPointerMove: ne(
11352
+ onPointerMove: te(
11353
11353
  e.onPointerMove,
11354
- Br((O) => {
11355
- const W = O.target, V = P.current !== O.clientX;
11356
- if (O.currentTarget.contains(W) && V) {
11357
- const ee = O.clientX > P.current ? "right" : "left";
11358
- G.current = ee, P.current = O.clientX;
11354
+ Br((M) => {
11355
+ const O = M.target, D = P.current !== M.clientX;
11356
+ if (M.currentTarget.contains(O) && D) {
11357
+ const Z = M.clientX > P.current ? "right" : "left";
11358
+ G.current = Z, P.current = M.clientX;
11359
11359
  }
11360
11360
  })
11361
11361
  )
@@ -11401,16 +11401,16 @@ var Vo = "MenuItem", ml = "menu.itemSelect", Cs = f.forwardRef(
11401
11401
  ...o,
11402
11402
  ref: l,
11403
11403
  disabled: n,
11404
- onClick: ne(e.onClick, d),
11404
+ onClick: te(e.onClick, d),
11405
11405
  onPointerDown: (h) => {
11406
11406
  var m;
11407
11407
  (m = e.onPointerDown) == null || m.call(e, h), u.current = !0;
11408
11408
  },
11409
- onPointerUp: ne(e.onPointerUp, (h) => {
11409
+ onPointerUp: te(e.onPointerUp, (h) => {
11410
11410
  var m;
11411
11411
  u.current || (m = h.currentTarget) == null || m.click();
11412
11412
  }),
11413
- onKeyDown: ne(e.onKeyDown, (h) => {
11413
+ onKeyDown: te(e.onKeyDown, (h) => {
11414
11414
  const m = a.searchRef.current !== "";
11415
11415
  n || m && h.key === " " || ki.includes(h.key) && (h.currentTarget.click(), h.preventDefault());
11416
11416
  })
@@ -11440,18 +11440,18 @@ var of = f.forwardRef(
11440
11440
  "data-disabled": r ? "" : void 0,
11441
11441
  ...s,
11442
11442
  ref: u,
11443
- onPointerMove: ne(
11443
+ onPointerMove: te(
11444
11444
  e.onPointerMove,
11445
11445
  Br((b) => {
11446
11446
  r ? i.onItemLeave(b) : (i.onItemEnter(b), b.defaultPrevented || b.currentTarget.focus({ preventScroll: !0 }));
11447
11447
  })
11448
11448
  ),
11449
- onPointerLeave: ne(
11449
+ onPointerLeave: te(
11450
11450
  e.onPointerLeave,
11451
11451
  Br((b) => i.onItemLeave(b))
11452
11452
  ),
11453
- onFocus: ne(e.onFocus, () => h(!0)),
11454
- onBlur: ne(e.onBlur, () => h(!1))
11453
+ onFocus: te(e.onFocus, () => h(!0)),
11454
+ onBlur: te(e.onBlur, () => h(!1))
11455
11455
  }
11456
11456
  ) })
11457
11457
  }
@@ -11468,7 +11468,7 @@ var of = f.forwardRef(
11468
11468
  ...o,
11469
11469
  ref: t,
11470
11470
  "data-state": Da(n),
11471
- onSelect: ne(
11471
+ onSelect: te(
11472
11472
  o.onSelect,
11473
11473
  () => r == null ? void 0 : r(Go(n) ? !0 : !n),
11474
11474
  { checkForDefaultPrevented: !1 }
@@ -11500,7 +11500,7 @@ var lf = "MenuRadioItem", uf = f.forwardRef(
11500
11500
  ...r,
11501
11501
  ref: t,
11502
11502
  "data-state": Da(s),
11503
- onSelect: ne(
11503
+ onSelect: te(
11504
11504
  r.onSelect,
11505
11505
  () => {
11506
11506
  var i;
@@ -11582,7 +11582,7 @@ var V0 = "MenuSub", [hR, mf] = $n(V0), Cr = "MenuSubTrigger", gf = f.forwardRef(
11582
11582
  var m;
11583
11583
  (m = e.onClick) == null || m.call(e, h), !(e.disabled || h.defaultPrevented) && (h.currentTarget.focus(), n.open || n.onOpenChange(!0));
11584
11584
  },
11585
- onPointerMove: ne(
11585
+ onPointerMove: te(
11586
11586
  e.onPointerMove,
11587
11587
  Br((h) => {
11588
11588
  s.onItemEnter(h), !h.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
@@ -11590,7 +11590,7 @@ var V0 = "MenuSub", [hR, mf] = $n(V0), Cr = "MenuSubTrigger", gf = f.forwardRef(
11590
11590
  }, 100));
11591
11591
  })
11592
11592
  ),
11593
- onPointerLeave: ne(
11593
+ onPointerLeave: te(
11594
11594
  e.onPointerLeave,
11595
11595
  Br((h) => {
11596
11596
  var g, b;
@@ -11619,7 +11619,7 @@ var V0 = "MenuSub", [hR, mf] = $n(V0), Cr = "MenuSubTrigger", gf = f.forwardRef(
11619
11619
  }
11620
11620
  })
11621
11621
  ),
11622
- onKeyDown: ne(e.onKeyDown, (h) => {
11622
+ onKeyDown: te(e.onKeyDown, (h) => {
11623
11623
  var g;
11624
11624
  const m = s.searchRef.current !== "";
11625
11625
  e.disabled || m && h.key === " " || R0[r.dir].includes(h.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), h.preventDefault());
@@ -11649,13 +11649,13 @@ var vf = "MenuSubContent", xf = f.forwardRef(
11649
11649
  i.isUsingKeyboardRef.current && ((h = l.current) == null || h.focus()), d.preventDefault();
11650
11650
  },
11651
11651
  onCloseAutoFocus: (d) => d.preventDefault(),
11652
- onFocusOutside: ne(e.onFocusOutside, (d) => {
11652
+ onFocusOutside: te(e.onFocusOutside, (d) => {
11653
11653
  d.target !== a.trigger && s.onOpenChange(!1);
11654
11654
  }),
11655
- onEscapeKeyDown: ne(e.onEscapeKeyDown, (d) => {
11655
+ onEscapeKeyDown: te(e.onEscapeKeyDown, (d) => {
11656
11656
  i.onClose(), d.preventDefault();
11657
11657
  }),
11658
- onKeyDown: ne(e.onKeyDown, (d) => {
11658
+ onKeyDown: te(e.onKeyDown, (d) => {
11659
11659
  var g;
11660
11660
  const h = d.currentTarget.contains(d.target), m = E0[i.dir].includes(d.key);
11661
11661
  h && m && (s.onOpenChange(!1), (g = a.trigger) == null || g.focus(), d.preventDefault());
@@ -11758,10 +11758,10 @@ var Sf = "DropdownMenuTrigger", Cf = f.forwardRef(
11758
11758
  disabled: r,
11759
11759
  ...o,
11760
11760
  ref: ia(t, s.triggerRef),
11761
- onPointerDown: ne(e.onPointerDown, (a) => {
11761
+ onPointerDown: te(e.onPointerDown, (a) => {
11762
11762
  !r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
11763
11763
  }),
11764
- onKeyDown: ne(e.onKeyDown, (a) => {
11764
+ onKeyDown: te(e.onKeyDown, (a) => {
11765
11765
  r || (["Enter", " "].includes(a.key) && s.onOpenToggle(), a.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(a.key) && a.preventDefault());
11766
11766
  })
11767
11767
  }
@@ -11785,11 +11785,11 @@ var Rf = "DropdownMenuContent", Ef = f.forwardRef(
11785
11785
  ...s,
11786
11786
  ...r,
11787
11787
  ref: t,
11788
- onCloseAutoFocus: ne(e.onCloseAutoFocus, (a) => {
11788
+ onCloseAutoFocus: te(e.onCloseAutoFocus, (a) => {
11789
11789
  var l;
11790
11790
  i.current || (l = o.triggerRef.current) == null || l.focus(), i.current = !1, a.preventDefault();
11791
11791
  }),
11792
- onInteractOutside: ne(e.onInteractOutside, (a) => {
11792
+ onInteractOutside: te(e.onInteractOutside, (a) => {
11793
11793
  const l = a.detail.originalEvent, u = l.button === 0 && l.ctrlKey === !0, d = l.button === 2 || u;
11794
11794
  (!o.modal || d) && (i.current = !0);
11795
11795
  }),
@@ -11889,7 +11889,7 @@ const PS = jS, _S = kS, OS = f.forwardRef(({ className: e, inset: t, children: n
11889
11889
  zf,
11890
11890
  {
11891
11891
  ref: o,
11892
- className: D(
11892
+ className: L(
11893
11893
  "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
11894
11894
  t && "pl-8",
11895
11895
  e
@@ -11906,7 +11906,7 @@ const MS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11906
11906
  Uf,
11907
11907
  {
11908
11908
  ref: n,
11909
- className: D(
11909
+ className: L(
11910
11910
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
11911
11911
  e
11912
11912
  ),
@@ -11919,7 +11919,7 @@ const Wf = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
11919
11919
  {
11920
11920
  ref: r,
11921
11921
  sideOffset: t,
11922
- className: D(
11922
+ className: L(
11923
11923
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
11924
11924
  e
11925
11925
  ),
@@ -11931,7 +11931,7 @@ const Ai = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
11931
11931
  Lf,
11932
11932
  {
11933
11933
  ref: r,
11934
- className: D(
11934
+ className: L(
11935
11935
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
11936
11936
  t && "pl-8",
11937
11937
  e
@@ -11944,7 +11944,7 @@ const DS = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
11944
11944
  Ff,
11945
11945
  {
11946
11946
  ref: o,
11947
- className: D(
11947
+ className: L(
11948
11948
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
11949
11949
  e
11950
11950
  ),
@@ -11961,7 +11961,7 @@ const LS = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
11961
11961
  Bf,
11962
11962
  {
11963
11963
  ref: r,
11964
- className: D(
11964
+ className: L(
11965
11965
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
11966
11966
  e
11967
11967
  ),
@@ -11977,7 +11977,7 @@ const FS = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
11977
11977
  Df,
11978
11978
  {
11979
11979
  ref: r,
11980
- className: D(
11980
+ className: L(
11981
11981
  "px-2 py-1.5 text-sm font-semibold",
11982
11982
  t && "pl-8",
11983
11983
  e
@@ -11990,7 +11990,7 @@ const BS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11990
11990
  Hf,
11991
11991
  {
11992
11992
  ref: n,
11993
- className: D("-mx-1 my-1 h-px bg-muted", e),
11993
+ className: L("-mx-1 my-1 h-px bg-muted", e),
11994
11994
  ...t
11995
11995
  }
11996
11996
  ));
@@ -12025,14 +12025,14 @@ function Io({
12025
12025
  navigateToCheckpoint: N,
12026
12026
  returnToLatest: I,
12027
12027
  hasMoreHistory: j,
12028
- isLoadingHistory: L,
12028
+ isLoadingHistory: F,
12029
12029
  loadOlderMessages: H,
12030
12030
  api: G
12031
- } = Ki(), [P, X] = fe(null), [M, J] = fe(""), [_, O] = fe(null), [W, V] = fe([]), [ee, F] = fe(!1), [Z, ae] = fe(null), [ge, $] = fe(null), [A, K] = fe(!1), [te, ce] = fe(null), [se, Ce] = fe([]), [Pe, je] = fe(null), [ue, pe] = fe(null), [Le, he] = fe(!1), Ne = ze(null), Ke = ze(null), Qe = ze(null), [st, z] = fe("desktop");
12031
+ } = Ki(), [P, X] = fe(null), [V, ne] = fe(""), [_, M] = fe(null), [O, D] = fe([]), [Z, B] = fe(!1), [J, ae] = fe(null), [ge, z] = fe(null), [A, K] = fe(!1), [ee, ce] = fe(null), [se, Ce] = fe([]), [Pe, je] = fe(null), [ue, pe] = fe(null), [Le, he] = fe(!1), Ne = ze(null), Ke = ze(null), Qe = ze(null), [st, U] = fe("desktop");
12032
12032
  Ye(() => {
12033
12033
  const ie = () => {
12034
12034
  const le = window.innerWidth;
12035
- z(le < 640 ? "phone" : le < 1024 ? "tablet" : "desktop");
12035
+ U(le < 640 ? "phone" : le < 1024 ? "tablet" : "desktop");
12036
12036
  };
12037
12037
  return ie(), window.addEventListener("resize", ie), () => window.removeEventListener("resize", ie);
12038
12038
  }, []), Ye(() => {
@@ -12068,13 +12068,13 @@ function Io({
12068
12068
  S && (je(S), pe(T ?? null));
12069
12069
  }, [S, T]);
12070
12070
  const Q = $e(async () => {
12071
- if (!(!j || L))
12071
+ if (!(!j || F))
12072
12072
  try {
12073
12073
  await H();
12074
12074
  } catch (ie) {
12075
12075
  console.warn("loadOlderMessages failed", ie);
12076
12076
  }
12077
- }, [j, L, H]);
12077
+ }, [j, F, H]);
12078
12078
  Ye(() => {
12079
12079
  (async () => {
12080
12080
  try {
@@ -12105,11 +12105,11 @@ function Io({
12105
12105
  }
12106
12106
  }, bt = async (ie) => {
12107
12107
  const le = ie.trim();
12108
- if (!(!le && W.length === 0)) {
12108
+ if (!(!le && O.length === 0)) {
12109
12109
  if (le) {
12110
12110
  const Ae = Fe(le);
12111
12111
  if (Ae) {
12112
- O(Ae);
12112
+ M(Ae);
12113
12113
  return;
12114
12114
  }
12115
12115
  }
@@ -12118,17 +12118,17 @@ function Io({
12118
12118
  checkpointId: Pe ?? S ?? void 0,
12119
12119
  checkpointNs: ue ?? T ?? void 0,
12120
12120
  payloadExtras: P ? { edit: !0, originalMessageId: P } : void 0,
12121
- attachments: W
12122
- }), h == null || h(le), O(null), V([]), X(null), J("");
12121
+ attachments: O
12122
+ }), h == null || h(le), M(null), D([]), X(null), ne("");
12123
12123
  } catch (Ae) {
12124
12124
  const qe = (Ae == null ? void 0 : Ae.message) || "Failed to send message";
12125
- O(qe), g == null || g(qe);
12125
+ M(qe), g == null || g(qe);
12126
12126
  }
12127
12127
  }
12128
12128
  }, pt = Y.useCallback((ie, le) => {
12129
- u && (X(ie), J(le), O(null));
12129
+ u && (X(ie), ne(le), M(null));
12130
12130
  }, [u]), wt = Y.useCallback(() => {
12131
- X(null), J(""), O(null);
12131
+ X(null), ne(""), M(null);
12132
12132
  }, []), Gt = $e((ie, le) => {
12133
12133
  pt(ie, le);
12134
12134
  }, [pt]), rt = $e((ie) => {
@@ -12143,11 +12143,11 @@ function Io({
12143
12143
  }
12144
12144
  }, [v, y, Pe, ue, S, T, Ve]), yt = (ie) => {
12145
12145
  const le = Array.from(ie.target.files || []);
12146
- V((Ae) => [...Ae, ...le]);
12147
- }, it = (ie) => V((le) => le.filter((Ae, qe) => ie !== qe)), St = async (ie) => {
12146
+ D((Ae) => [...Ae, ...le]);
12147
+ }, it = (ie) => D((le) => le.filter((Ae, qe) => ie !== qe)), St = async (ie) => {
12148
12148
  const le = (ie.target.files || [])[0];
12149
12149
  if (le) {
12150
- ae(null), $(null), F(!0);
12150
+ ae(null), z(null), B(!0);
12151
12151
  try {
12152
12152
  await y("", {
12153
12153
  checkpointId: Pe ?? S ?? void 0,
@@ -12155,12 +12155,12 @@ function Io({
12155
12155
  attachments: [le]
12156
12156
  });
12157
12157
  const Ae = `Uploaded ${le.name} - processing through chat stream`;
12158
- $(Ae);
12158
+ z(Ae);
12159
12159
  } catch (Ae) {
12160
12160
  const qe = Ae instanceof Error ? Ae.message : "Failed to upload Excel file";
12161
12161
  console.error("Excel upload failed", Ae), ae(qe), g == null || g(qe);
12162
12162
  } finally {
12163
- F(!1), ie.target.value = "";
12163
+ B(!1), ie.target.value = "";
12164
12164
  }
12165
12165
  }
12166
12166
  }, dn = (ie) => {
@@ -12237,7 +12237,7 @@ function Io({
12237
12237
  onEdit: Gt,
12238
12238
  onRegenerate: rt,
12239
12239
  onCancelEdit: wt,
12240
- emptyMessage: te ?? void 0,
12240
+ emptyMessage: ee ?? void 0,
12241
12241
  isNavigatingCheckpoint: Le
12242
12242
  }
12243
12243
  ),
@@ -12270,7 +12270,7 @@ function Io({
12270
12270
  className: "hidden"
12271
12271
  }
12272
12272
  ),
12273
- W.length > 0 && /* @__PURE__ */ c.jsx("div", { className: "flex flex-wrap gap-2", children: W.map((ie, le) => /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
12273
+ O.length > 0 && /* @__PURE__ */ c.jsx("div", { className: "flex flex-wrap gap-2", children: O.map((ie, le) => /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
12274
12274
  /* @__PURE__ */ c.jsx(ci, { size: 14 }),
12275
12275
  /* @__PURE__ */ c.jsx("span", { className: "truncate max-w-[150px]", children: ie.name }),
12276
12276
  /* @__PURE__ */ c.jsx(
@@ -12297,12 +12297,12 @@ function Io({
12297
12297
  className: "hidden"
12298
12298
  }
12299
12299
  ),
12300
- ee && /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
12300
+ Z && /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
12301
12301
  /* @__PURE__ */ c.jsx(Yp, { className: "h-4 w-4 animate-spin" }),
12302
12302
  " Uploading Excel file..."
12303
12303
  ] }),
12304
- ge && !ee && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: ge }),
12305
- Z && !ee && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: Z })
12304
+ ge && !Z && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: ge }),
12305
+ J && !Z && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: J })
12306
12306
  ] })
12307
12307
  ] }),
12308
12308
  _ && /* @__PURE__ */ c.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: _ }),
@@ -12333,9 +12333,9 @@ function Io({
12333
12333
  {
12334
12334
  onClick: () => {
12335
12335
  var ie;
12336
- ee || (ie = Ke.current) == null || ie.click();
12336
+ Z || (ie = Ke.current) == null || ie.click();
12337
12337
  },
12338
- className: `cursor-pointer ${ee ? "opacity-60 pointer-events-none" : ""}`,
12338
+ className: `cursor-pointer ${Z ? "opacity-60 pointer-events-none" : ""}`,
12339
12339
  children: [
12340
12340
  /* @__PURE__ */ c.jsx(Xp, { className: "h-4 w-4 mr-2" }),
12341
12341
  " Upload Excel file"
@@ -12347,7 +12347,7 @@ function Io({
12347
12347
  /* @__PURE__ */ c.jsx("div", { className: "flex-1", children: /* @__PURE__ */ c.jsx(
12348
12348
  dv,
12349
12349
  {
12350
- initialValue: M,
12350
+ initialValue: V,
12351
12351
  editingMessageId: P,
12352
12352
  placeholder: P ? "Edit your message..." : t,
12353
12353
  isStreaming: p,
@@ -12356,7 +12356,7 @@ function Io({
12356
12356
  onSend: bt,
12357
12357
  onCancelEdit: wt,
12358
12358
  onStop: E,
12359
- allowEmptySend: W.length > 0,
12359
+ allowEmptySend: O.length > 0,
12360
12360
  textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${P ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${_ ? "border-red-400" : ""} ${d.textarea || ""}`
12361
12361
  }
12362
12362
  ) })
@@ -12369,7 +12369,7 @@ const $r = f.forwardRef(
12369
12369
  "input",
12370
12370
  {
12371
12371
  type: t,
12372
- className: D(
12372
+ className: L(
12373
12373
  "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
12374
12374
  e
12375
12375
  ),
@@ -12393,7 +12393,7 @@ var La = "ScrollArea", [Vf, mR] = Wt(La), [HS, Ot] = Vf(La), Gf = f.forwardRef(
12393
12393
  dir: o,
12394
12394
  scrollHideDelay: s = 600,
12395
12395
  ...i
12396
- } = e, [a, l] = f.useState(null), [u, d] = f.useState(null), [h, m] = f.useState(null), [g, b] = f.useState(null), [v, p] = f.useState(null), [x, w] = f.useState(0), [y, E] = f.useState(0), [S, T] = f.useState(!1), [C, N] = f.useState(!1), I = Re(t, (L) => l(L)), j = vs(o);
12396
+ } = e, [a, l] = f.useState(null), [u, d] = f.useState(null), [h, m] = f.useState(null), [g, b] = f.useState(null), [v, p] = f.useState(null), [x, w] = f.useState(0), [y, E] = f.useState(0), [S, T] = f.useState(!1), [C, N] = f.useState(!1), I = Re(t, (F) => l(F)), j = vs(o);
12397
12397
  return /* @__PURE__ */ c.jsx(
12398
12398
  HS,
12399
12399
  {
@@ -12550,8 +12550,8 @@ var zS = f.forwardRef((e, t) => {
12550
12550
  "data-state": a === "hidden" ? "hidden" : "visible",
12551
12551
  ...r,
12552
12552
  ref: t,
12553
- onPointerEnter: ne(e.onPointerEnter, () => l("POINTER_ENTER")),
12554
- onPointerLeave: ne(e.onPointerLeave, () => l("POINTER_LEAVE"))
12553
+ onPointerEnter: te(e.onPointerEnter, () => l("POINTER_ENTER")),
12554
+ onPointerLeave: te(e.onPointerLeave, () => l("POINTER_LEAVE"))
12555
12555
  }
12556
12556
  ) });
12557
12557
  }), qf = f.forwardRef((e, t) => {
@@ -12718,14 +12718,14 @@ var zS = f.forwardRef((e, t) => {
12718
12718
  } = e, g = Ot(rn, n), [b, v] = f.useState(null), p = Re(t, (I) => v(I)), x = f.useRef(null), w = f.useRef(""), y = g.viewport, E = r.content - r.viewport, S = at(d), T = at(l), C = Es(h, 10);
12719
12719
  function N(I) {
12720
12720
  if (x.current) {
12721
- const j = I.clientX - x.current.left, L = I.clientY - x.current.top;
12722
- u({ x: j, y: L });
12721
+ const j = I.clientX - x.current.left, F = I.clientY - x.current.top;
12722
+ u({ x: j, y: F });
12723
12723
  }
12724
12724
  }
12725
12725
  return f.useEffect(() => {
12726
12726
  const I = (j) => {
12727
- const L = j.target;
12728
- (b == null ? void 0 : b.contains(L)) && S(j, E);
12727
+ const F = j.target;
12728
+ (b == null ? void 0 : b.contains(F)) && S(j, E);
12729
12729
  };
12730
12730
  return document.addEventListener("wheel", I, { passive: !1 }), () => document.removeEventListener("wheel", I, { passive: !1 });
12731
12731
  }, [y, b, E, S]), f.useEffect(T, [r, T]), or(b, C), or(g.content, C), /* @__PURE__ */ c.jsx(
@@ -12744,11 +12744,11 @@ var zS = f.forwardRef((e, t) => {
12744
12744
  ...m,
12745
12745
  ref: p,
12746
12746
  style: { position: "absolute", ...m.style },
12747
- onPointerDown: ne(e.onPointerDown, (I) => {
12747
+ onPointerDown: te(e.onPointerDown, (I) => {
12748
12748
  I.button === 0 && (I.target.setPointerCapture(I.pointerId), x.current = b.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", g.viewport && (g.viewport.style.scrollBehavior = "auto"), N(I));
12749
12749
  }),
12750
- onPointerMove: ne(e.onPointerMove, N),
12751
- onPointerUp: ne(e.onPointerUp, (I) => {
12750
+ onPointerMove: te(e.onPointerMove, N),
12751
+ onPointerUp: te(e.onPointerUp, (I) => {
12752
12752
  const j = I.target;
12753
12753
  j.hasPointerCapture(I.pointerId) && j.releasePointerCapture(I.pointerId), document.body.style.webkitUserSelect = w.current, g.viewport && (g.viewport.style.scrollBehavior = ""), x.current = null;
12754
12754
  })
@@ -12791,11 +12791,11 @@ var zS = f.forwardRef((e, t) => {
12791
12791
  height: "var(--radix-scroll-area-thumb-height)",
12792
12792
  ...r
12793
12793
  },
12794
- onPointerDownCapture: ne(e.onPointerDownCapture, (h) => {
12794
+ onPointerDownCapture: te(e.onPointerDownCapture, (h) => {
12795
12795
  const g = h.target.getBoundingClientRect(), b = h.clientX - g.left, v = h.clientY - g.top;
12796
12796
  i.onThumbPointerDown({ x: b, y: v });
12797
12797
  }),
12798
- onPointerUp: ne(e.onPointerUp, i.onThumbPointerUp)
12798
+ onPointerUp: te(e.onPointerUp, i.onThumbPointerUp)
12799
12799
  }
12800
12800
  );
12801
12801
  }
@@ -12897,7 +12897,7 @@ const oh = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
12897
12897
  rh,
12898
12898
  {
12899
12899
  ref: r,
12900
- className: D("relative overflow-hidden", e),
12900
+ className: L("relative overflow-hidden", e),
12901
12901
  ...n,
12902
12902
  children: [
12903
12903
  /* @__PURE__ */ c.jsx(JS, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
@@ -12912,7 +12912,7 @@ const sh = f.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r)
12912
12912
  {
12913
12913
  ref: r,
12914
12914
  orientation: t,
12915
- className: D(
12915
+ className: L(
12916
12916
  "flex touch-none select-none transition-colors",
12917
12917
  t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
12918
12918
  t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
@@ -12944,55 +12944,55 @@ function _i({
12944
12944
  createThread: v,
12945
12945
  deleteThread: p,
12946
12946
  renameThread: x
12947
- } = Ki(), [w, y] = fe(m ?? []), [E, S] = fe(!1), [T, C] = fe(null), [N, I] = fe(null), [j, L] = fe(""), [H, G] = fe(!1);
12947
+ } = Ki(), [w, y] = fe(m ?? []), [E, S] = fe(!1), [T, C] = fe(null), [N, I] = fe(null), [j, F] = fe(""), [H, G] = fe(!1);
12948
12948
  Ye(() => {
12949
12949
  y(m ?? []);
12950
12950
  }, [m]);
12951
- const P = async (F) => {
12951
+ const P = async (B) => {
12952
12952
  try {
12953
- await h(F), a == null || a(F), l == null || l(F);
12954
- } catch (Z) {
12955
- console.error("Failed to select thread:", Z);
12953
+ await h(B), a == null || a(B), l == null || l(B);
12954
+ } catch (J) {
12955
+ console.error("Failed to select thread:", J);
12956
12956
  }
12957
12957
  }, X = async () => {
12958
12958
  try {
12959
12959
  G(!0);
12960
- const F = await v();
12961
- u == null || u(F), a == null || a(F);
12962
- } catch (F) {
12963
- console.error("Failed to create thread:", F);
12960
+ const B = await v();
12961
+ u == null || u(B), a == null || a(B);
12962
+ } catch (B) {
12963
+ console.error("Failed to create thread:", B);
12964
12964
  } finally {
12965
12965
  G(!1);
12966
12966
  }
12967
- }, M = async (F, Z) => {
12968
- if (Z.stopPropagation(), !!confirm("Delete this thread?"))
12967
+ }, V = async (B, J) => {
12968
+ if (J.stopPropagation(), !!confirm("Delete this thread?"))
12969
12969
  try {
12970
- await p(F), d == null || d(F);
12970
+ await p(B), d == null || d(B);
12971
12971
  } catch (ae) {
12972
12972
  console.error("Failed to delete thread:", ae);
12973
12973
  }
12974
- }, J = (F, Z) => {
12975
- Z.stopPropagation(), I(F.threadId), L(F.title || `Thread ${F.threadId.slice(0, 8)}`);
12976
- }, _ = async (F) => {
12974
+ }, ne = (B, J) => {
12975
+ J.stopPropagation(), I(B.threadId), F(B.title || `Thread ${B.threadId.slice(0, 8)}`);
12976
+ }, _ = async (B) => {
12977
12977
  if (j.trim())
12978
12978
  try {
12979
- await x(F, j.trim()), I(null), L("");
12980
- } catch (Z) {
12981
- console.error("Failed to update title:", Z);
12982
- }
12983
- }, O = () => {
12984
- I(null), L("");
12985
- }, W = (F, Z) => {
12986
- F.key === "Enter" ? _(Z) : F.key === "Escape" && O();
12987
- }, V = (F) => {
12988
- if (!F) return "";
12979
+ await x(B, j.trim()), I(null), F("");
12980
+ } catch (J) {
12981
+ console.error("Failed to update title:", J);
12982
+ }
12983
+ }, M = () => {
12984
+ I(null), F("");
12985
+ }, O = (B, J) => {
12986
+ B.key === "Enter" ? _(J) : B.key === "Escape" && M();
12987
+ }, D = (B) => {
12988
+ if (!B) return "";
12989
12989
  try {
12990
- const Z = new Date(F), ge = (/* @__PURE__ */ new Date()).getTime() - Z.getTime(), $ = Math.floor(ge / (1e3 * 60 * 60 * 24));
12991
- return $ === 0 ? Z.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : $ === 1 ? "Yesterday" : $ < 7 ? `${$} days ago` : Z.toLocaleDateString();
12990
+ const J = new Date(B), ge = (/* @__PURE__ */ new Date()).getTime() - J.getTime(), z = Math.floor(ge / (1e3 * 60 * 60 * 24));
12991
+ return z === 0 ? J.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : z === 1 ? "Yesterday" : z < 7 ? `${z} days ago` : J.toLocaleDateString();
12992
12992
  } catch {
12993
12993
  return "";
12994
12994
  }
12995
- }, ee = (F) => F.title || `Thread ${F.threadId.slice(0, 8)}`;
12995
+ }, Z = (B) => B.title || `Thread ${B.threadId.slice(0, 8)}`;
12996
12996
  return /* @__PURE__ */ c.jsxs("div", { className: `flex flex-col h-full ${e} ${s.container || ""}`, children: [
12997
12997
  t && /* @__PURE__ */ c.jsx("div", { className: s.header || "flex-shrink-0 p-2 border-b bg-slate-800 border-slate-700 text-slate-100 flex justify-end", children: /* @__PURE__ */ c.jsx(
12998
12998
  Oe,
@@ -13014,32 +13014,32 @@ function _i({
13014
13014
  children: /* @__PURE__ */ c.jsx("div", { className: "p-2 space-y-1 pb-4", children: E ? /* @__PURE__ */ c.jsx("div", { className: "text-center py-8 text-slate-400", children: "Loading…" }) : w.length === 0 ? /* @__PURE__ */ c.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
13015
13015
  /* @__PURE__ */ c.jsx(Zp, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
13016
13016
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-slate-500", children: "No conversations yet" })
13017
- ] }) : w.slice().sort((F, Z) => new Date(Z.updatedAt || Z.createdAt || "").getTime() - new Date(F.updatedAt || F.createdAt || "").getTime()).map((F) => /* @__PURE__ */ c.jsxs(
13017
+ ] }) : w.slice().sort((B, J) => new Date(J.updatedAt || J.createdAt || "").getTime() - new Date(B.updatedAt || B.createdAt || "").getTime()).map((B) => /* @__PURE__ */ c.jsxs(
13018
13018
  "div",
13019
13019
  {
13020
- onClick: () => P(F.threadId),
13021
- className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? b) === F.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
13020
+ onClick: () => P(B.threadId),
13021
+ className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? b) === B.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
13022
13022
  children: [
13023
13023
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
13024
- /* @__PURE__ */ c.jsx("div", { className: "flex-1 min-w-0", children: N === F.threadId ? /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", onClick: (Z) => Z.stopPropagation(), children: [
13025
- /* @__PURE__ */ c.jsx($r, { value: j, onChange: (Z) => L(Z.target.value), onKeyDown: (Z) => W(Z, F.threadId), className: "h-6 text-sm", autoFocus: !0 }),
13026
- /* @__PURE__ */ c.jsx(Oe, { variant: "ghost", size: "sm", onClick: () => _(F.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(Ui, { size: 12 }) }),
13027
- /* @__PURE__ */ c.jsx(Oe, { variant: "ghost", size: "sm", onClick: O, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(Xn, { size: 12 }) })
13024
+ /* @__PURE__ */ c.jsx("div", { className: "flex-1 min-w-0", children: N === B.threadId ? /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", onClick: (J) => J.stopPropagation(), children: [
13025
+ /* @__PURE__ */ c.jsx($r, { value: j, onChange: (J) => F(J.target.value), onKeyDown: (J) => O(J, B.threadId), className: "h-6 text-sm", autoFocus: !0 }),
13026
+ /* @__PURE__ */ c.jsx(Oe, { variant: "ghost", size: "sm", onClick: () => _(B.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(Ui, { size: 12 }) }),
13027
+ /* @__PURE__ */ c.jsx(Oe, { variant: "ghost", size: "sm", onClick: M, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(Xn, { size: 12 }) })
13028
13028
  ] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
13029
- /* @__PURE__ */ c.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: ee(F) }),
13029
+ /* @__PURE__ */ c.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: Z(B) }),
13030
13030
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
13031
13031
  /* @__PURE__ */ c.jsx(Qp, { size: 10 }),
13032
- /* @__PURE__ */ c.jsx("span", { children: V(F.updatedAt || F.createdAt) })
13032
+ /* @__PURE__ */ c.jsx("span", { children: D(B.updatedAt || B.createdAt) })
13033
13033
  ] })
13034
13034
  ] }) }),
13035
13035
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
13036
- r && N !== F.threadId && /* @__PURE__ */ c.jsx(Oe, { variant: "ghost", size: "sm", onClick: (Z) => J(F, Z), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c.jsx(Tl, { size: 12 }) }),
13036
+ r && N !== B.threadId && /* @__PURE__ */ c.jsx(Oe, { variant: "ghost", size: "sm", onClick: (J) => ne(B, J), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c.jsx(Tl, { size: 12 }) }),
13037
13037
  n && /* @__PURE__ */ c.jsx(
13038
13038
  Oe,
13039
13039
  {
13040
13040
  variant: "ghost",
13041
13041
  size: "sm",
13042
- onClick: (Z) => M(F.threadId, Z),
13042
+ onClick: (J) => V(B.threadId, J),
13043
13043
  className: "h-6 w-6 p-0 text-red-400 hover:text-red-300 hover:bg-red-900/20",
13044
13044
  title: "Delete thread",
13045
13045
  children: /* @__PURE__ */ c.jsx(em, { size: 12 })
@@ -13047,10 +13047,10 @@ function _i({
13047
13047
  )
13048
13048
  ] })
13049
13049
  ] }),
13050
- i === F.threadId && /* @__PURE__ */ c.jsx("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-1 h-8 bg-blue-400 rounded-r" })
13050
+ i === B.threadId && /* @__PURE__ */ c.jsx("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-1 h-8 bg-blue-400 rounded-r" })
13051
13051
  ]
13052
13052
  },
13053
- F.threadId
13053
+ B.threadId
13054
13054
  )) })
13055
13055
  }
13056
13056
  )
@@ -13190,7 +13190,7 @@ const Ha = f.forwardRef(
13190
13190
  ref: o,
13191
13191
  decorative: n,
13192
13192
  orientation: t,
13193
- className: D(
13193
+ className: L(
13194
13194
  "shrink-0 bg-border",
13195
13195
  t === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
13196
13196
  e
@@ -13203,7 +13203,7 @@ Ha.displayName = dh.displayName;
13203
13203
  const fh = fd, cC = Rw, lC = hd, hh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13204
13204
  ps,
13205
13205
  {
13206
- className: D(
13206
+ className: L(
13207
13207
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
13208
13208
  e
13209
13209
  ),
@@ -13233,7 +13233,7 @@ const uC = zr(
13233
13233
  ms,
13234
13234
  {
13235
13235
  ref: o,
13236
- className: D(uC({ side: e }), t),
13236
+ className: L(uC({ side: e }), t),
13237
13237
  ...r,
13238
13238
  children: [
13239
13239
  n,
@@ -13252,7 +13252,7 @@ const ph = ({
13252
13252
  }) => /* @__PURE__ */ c.jsx(
13253
13253
  "div",
13254
13254
  {
13255
- className: D(
13255
+ className: L(
13256
13256
  "flex flex-col space-y-2 text-center sm:text-left",
13257
13257
  e
13258
13258
  ),
@@ -13264,7 +13264,7 @@ const mh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13264
13264
  kn,
13265
13265
  {
13266
13266
  ref: n,
13267
- className: D("text-lg font-semibold text-foreground", e),
13267
+ className: L("text-lg font-semibold text-foreground", e),
13268
13268
  ...t
13269
13269
  }
13270
13270
  ));
@@ -13273,7 +13273,7 @@ const gh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13273
13273
  gs,
13274
13274
  {
13275
13275
  ref: n,
13276
- className: D("text-sm text-muted-foreground", e),
13276
+ className: L("text-sm text-muted-foreground", e),
13277
13277
  ...t
13278
13278
  }
13279
13279
  ));
@@ -13285,7 +13285,7 @@ function xl({
13285
13285
  return /* @__PURE__ */ c.jsx(
13286
13286
  "div",
13287
13287
  {
13288
- className: D("animate-pulse rounded-md bg-muted", e),
13288
+ className: L("animate-pulse rounded-md bg-muted", e),
13289
13289
  ...t
13290
13290
  }
13291
13291
  );
@@ -13411,20 +13411,20 @@ var Mi = "TooltipTrigger", Sh = f.forwardRef(
13411
13411
  "data-state": o.stateAttribute,
13412
13412
  ...r,
13413
13413
  ref: l,
13414
- onPointerMove: ne(e.onPointerMove, (m) => {
13414
+ onPointerMove: te(e.onPointerMove, (m) => {
13415
13415
  m.pointerType !== "touch" && !d.current && !s.isPointerInTransitRef.current && (o.onTriggerEnter(), d.current = !0);
13416
13416
  }),
13417
- onPointerLeave: ne(e.onPointerLeave, () => {
13417
+ onPointerLeave: te(e.onPointerLeave, () => {
13418
13418
  o.onTriggerLeave(), d.current = !1;
13419
13419
  }),
13420
- onPointerDown: ne(e.onPointerDown, () => {
13420
+ onPointerDown: te(e.onPointerDown, () => {
13421
13421
  o.open && o.onClose(), u.current = !0, document.addEventListener("pointerup", h, { once: !0 });
13422
13422
  }),
13423
- onFocus: ne(e.onFocus, () => {
13423
+ onFocus: te(e.onFocus, () => {
13424
13424
  u.current || o.onOpen();
13425
13425
  }),
13426
- onBlur: ne(e.onBlur, o.onClose),
13427
- onClick: ne(e.onClick, o.onClose)
13426
+ onBlur: te(e.onBlur, o.onClose),
13427
+ onClick: te(e.onClick, o.onClose)
13428
13428
  }
13429
13429
  ) });
13430
13430
  }
@@ -13624,7 +13624,7 @@ const PC = jC, _C = kC, OC = AC, Nh = f.forwardRef(({ className: e, sideOffset:
13624
13624
  {
13625
13625
  ref: r,
13626
13626
  sideOffset: t,
13627
- className: D(
13627
+ className: L(
13628
13628
  "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
13629
13629
  e
13630
13630
  ),
@@ -13682,7 +13682,7 @@ const jh = f.forwardRef(
13682
13682
  "--sidebar-width-icon": BC,
13683
13683
  ...o
13684
13684
  },
13685
- className: D(
13685
+ className: L(
13686
13686
  "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
13687
13687
  r
13688
13688
  ),
@@ -13707,7 +13707,7 @@ const kh = f.forwardRef(
13707
13707
  return n === "none" ? /* @__PURE__ */ c.jsx(
13708
13708
  "div",
13709
13709
  {
13710
- className: D(
13710
+ className: L(
13711
13711
  "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
13712
13712
  r
13713
13713
  ),
@@ -13740,7 +13740,7 @@ const kh = f.forwardRef(
13740
13740
  /* @__PURE__ */ c.jsx(
13741
13741
  "div",
13742
13742
  {
13743
- className: D(
13743
+ className: L(
13744
13744
  "duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear",
13745
13745
  "group-data-[collapsible=offcanvas]:w-0",
13746
13746
  "group-data-[side=right]:rotate-180",
@@ -13751,7 +13751,7 @@ const kh = f.forwardRef(
13751
13751
  /* @__PURE__ */ c.jsx(
13752
13752
  "div",
13753
13753
  {
13754
- className: D(
13754
+ className: L(
13755
13755
  "duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",
13756
13756
  e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
13757
13757
  // Adjust the padding for floating and inset variants.
@@ -13784,7 +13784,7 @@ const Ah = f.forwardRef(({ className: e, onClick: t, ...n }, r) => {
13784
13784
  "data-sidebar": "trigger",
13785
13785
  variant: "ghost",
13786
13786
  size: "icon",
13787
- className: D("h-7 w-7", e),
13787
+ className: L("h-7 w-7", e),
13788
13788
  onClick: (s) => {
13789
13789
  t == null || t(s), o();
13790
13790
  },
@@ -13808,7 +13808,7 @@ const HC = f.forwardRef(({ className: e, ...t }, n) => {
13808
13808
  tabIndex: -1,
13809
13809
  onClick: r,
13810
13810
  title: "Toggle Sidebar",
13811
- className: D(
13811
+ className: L(
13812
13812
  "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
13813
13813
  "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
13814
13814
  "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
@@ -13826,7 +13826,7 @@ const Ph = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13826
13826
  "main",
13827
13827
  {
13828
13828
  ref: n,
13829
- className: D(
13829
+ className: L(
13830
13830
  "relative flex min-h-svh flex-1 flex-col bg-background",
13831
13831
  "peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
13832
13832
  e
@@ -13840,7 +13840,7 @@ const zC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13840
13840
  {
13841
13841
  ref: n,
13842
13842
  "data-sidebar": "input",
13843
- className: D(
13843
+ className: L(
13844
13844
  "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
13845
13845
  e
13846
13846
  ),
@@ -13853,7 +13853,7 @@ const _h = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13853
13853
  {
13854
13854
  ref: n,
13855
13855
  "data-sidebar": "header",
13856
- className: D("flex flex-col gap-2 p-2", e),
13856
+ className: L("flex flex-col gap-2 p-2", e),
13857
13857
  ...t
13858
13858
  }
13859
13859
  ));
@@ -13863,7 +13863,7 @@ const UC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13863
13863
  {
13864
13864
  ref: n,
13865
13865
  "data-sidebar": "footer",
13866
- className: D("flex flex-col gap-2 p-2", e),
13866
+ className: L("flex flex-col gap-2 p-2", e),
13867
13867
  ...t
13868
13868
  }
13869
13869
  ));
@@ -13873,7 +13873,7 @@ const WC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13873
13873
  {
13874
13874
  ref: n,
13875
13875
  "data-sidebar": "separator",
13876
- className: D("mx-2 w-auto bg-sidebar-border", e),
13876
+ className: L("mx-2 w-auto bg-sidebar-border", e),
13877
13877
  ...t
13878
13878
  }
13879
13879
  ));
@@ -13883,7 +13883,7 @@ const Oh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13883
13883
  {
13884
13884
  ref: n,
13885
13885
  "data-sidebar": "content",
13886
- className: D(
13886
+ className: L(
13887
13887
  "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
13888
13888
  e
13889
13889
  ),
@@ -13896,7 +13896,7 @@ const Mh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13896
13896
  {
13897
13897
  ref: n,
13898
13898
  "data-sidebar": "group",
13899
- className: D("relative flex w-full min-w-0 flex-col p-2", e),
13899
+ className: L("relative flex w-full min-w-0 flex-col p-2", e),
13900
13900
  ...t
13901
13901
  }
13902
13902
  ));
@@ -13908,7 +13908,7 @@ const Dh = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
13908
13908
  {
13909
13909
  ref: r,
13910
13910
  "data-sidebar": "group-label",
13911
- className: D(
13911
+ className: L(
13912
13912
  "duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
13913
13913
  "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
13914
13914
  e
@@ -13925,7 +13925,7 @@ const VC = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
13925
13925
  {
13926
13926
  ref: r,
13927
13927
  "data-sidebar": "group-action",
13928
- className: D(
13928
+ className: L(
13929
13929
  "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
13930
13930
  // Increases the hit area of the button on mobile.
13931
13931
  "after:absolute after:-inset-2 after:md:hidden",
@@ -13942,7 +13942,7 @@ const Lh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13942
13942
  {
13943
13943
  ref: n,
13944
13944
  "data-sidebar": "group-content",
13945
- className: D("w-full text-sm", e),
13945
+ className: L("w-full text-sm", e),
13946
13946
  ...t
13947
13947
  }
13948
13948
  ));
@@ -13952,7 +13952,7 @@ const Fh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13952
13952
  {
13953
13953
  ref: n,
13954
13954
  "data-sidebar": "menu",
13955
- className: D("flex w-full min-w-0 flex-col gap-1", e),
13955
+ className: L("flex w-full min-w-0 flex-col gap-1", e),
13956
13956
  ...t
13957
13957
  }
13958
13958
  ));
@@ -13962,7 +13962,7 @@ const Bh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13962
13962
  {
13963
13963
  ref: n,
13964
13964
  "data-sidebar": "menu-item",
13965
- className: D("group/menu-item relative", e),
13965
+ className: L("group/menu-item relative", e),
13966
13966
  ...t
13967
13967
  }
13968
13968
  ));
@@ -14003,7 +14003,7 @@ const GC = zr(
14003
14003
  "data-sidebar": "menu-button",
14004
14004
  "data-size": r,
14005
14005
  "data-active": t,
14006
- className: D(GC({ variant: n, size: r }), s),
14006
+ className: L(GC({ variant: n, size: r }), s),
14007
14007
  ...i
14008
14008
  }
14009
14009
  );
@@ -14031,7 +14031,7 @@ const KC = f.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, .
14031
14031
  {
14032
14032
  ref: o,
14033
14033
  "data-sidebar": "menu-action",
14034
- className: D(
14034
+ className: L(
14035
14035
  "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
14036
14036
  // Increases the hit area of the button on mobile.
14037
14037
  "after:absolute after:-inset-2 after:md:hidden",
@@ -14052,7 +14052,7 @@ const YC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14052
14052
  {
14053
14053
  ref: n,
14054
14054
  "data-sidebar": "menu-badge",
14055
- className: D(
14055
+ className: L(
14056
14056
  "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
14057
14057
  "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
14058
14058
  "peer-data-[size=sm]/menu-button:top-1",
@@ -14072,7 +14072,7 @@ const qC = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
14072
14072
  {
14073
14073
  ref: r,
14074
14074
  "data-sidebar": "menu-skeleton",
14075
- className: D("rounded-md h-8 flex gap-2 px-2 items-center", e),
14075
+ className: L("rounded-md h-8 flex gap-2 px-2 items-center", e),
14076
14076
  ...n,
14077
14077
  children: [
14078
14078
  t && /* @__PURE__ */ c.jsx(
@@ -14102,7 +14102,7 @@ const XC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14102
14102
  {
14103
14103
  ref: n,
14104
14104
  "data-sidebar": "menu-sub",
14105
- className: D(
14105
+ className: L(
14106
14106
  "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
14107
14107
  "group-data-[collapsible=icon]:hidden",
14108
14108
  e
@@ -14122,7 +14122,7 @@ const ZC = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, classNa
14122
14122
  "data-sidebar": "menu-sub-button",
14123
14123
  "data-size": t,
14124
14124
  "data-active": n,
14125
- className: D(
14125
+ className: L(
14126
14126
  "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
14127
14127
  "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
14128
14128
  t === "sm" && "text-xs",
@@ -14189,7 +14189,7 @@ const eT = zr(
14189
14189
  zh,
14190
14190
  {
14191
14191
  ref: n,
14192
- className: D(eT(), e),
14192
+ className: L(eT(), e),
14193
14193
  ...t
14194
14194
  }
14195
14195
  ));
@@ -14231,7 +14231,7 @@ var As = "Switch", [tT, CR] = Wt(As), [nT, rT] = tT(As), Wh = f.forwardRef(
14231
14231
  value: l,
14232
14232
  ...h,
14233
14233
  ref: b,
14234
- onClick: ne(e.onClick, (y) => {
14234
+ onClick: te(e.onClick, (y) => {
14235
14235
  w((E) => !E), p && (v.current = y.isPropagationStopped(), v.current || y.stopPropagation());
14236
14236
  })
14237
14237
  }
@@ -14318,7 +14318,7 @@ var qh = Wh, sT = Gh;
14318
14318
  const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14319
14319
  qh,
14320
14320
  {
14321
- className: D(
14321
+ className: L(
14322
14322
  "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
14323
14323
  e
14324
14324
  ),
@@ -14327,7 +14327,7 @@ const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14327
14327
  children: /* @__PURE__ */ c.jsx(
14328
14328
  sT,
14329
14329
  {
14330
- className: D(
14330
+ className: L(
14331
14331
  "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
14332
14332
  )
14333
14333
  }
@@ -14364,7 +14364,7 @@ var iT = [" ", "Enter", "ArrowUp", "ArrowDown"], aT = [" ", "Enter"], Dn = "Sele
14364
14364
  defaultProp: a,
14365
14365
  onChange: l,
14366
14366
  caller: Dn
14367
- }), L = f.useRef(null), H = p ? b || !!p.closest("form") : !0, [G, P] = f.useState(/* @__PURE__ */ new Set()), X = Array.from(G).map((M) => M.props.value).join(";");
14367
+ }), F = f.useRef(null), H = p ? b || !!p.closest("form") : !0, [G, P] = f.useState(/* @__PURE__ */ new Set()), X = Array.from(G).map((V) => V.props.value).join(";");
14368
14368
  return /* @__PURE__ */ c.jsx(Ea, { ...v, children: /* @__PURE__ */ c.jsxs(
14369
14369
  lT,
14370
14370
  {
@@ -14382,20 +14382,20 @@ var iT = [" ", "Enter", "ArrowUp", "ArrowDown"], aT = [" ", "Enter"], Dn = "Sele
14382
14382
  open: C,
14383
14383
  onOpenChange: N,
14384
14384
  dir: T,
14385
- triggerPointerDownPosRef: L,
14385
+ triggerPointerDownPosRef: F,
14386
14386
  disabled: m,
14387
14387
  children: [
14388
14388
  /* @__PURE__ */ c.jsx(Ps.Provider, { scope: t, children: /* @__PURE__ */ c.jsx(
14389
14389
  uT,
14390
14390
  {
14391
14391
  scope: e.__scopeSelect,
14392
- onNativeOptionAdd: f.useCallback((M) => {
14393
- P((J) => new Set(J).add(M));
14392
+ onNativeOptionAdd: f.useCallback((V) => {
14393
+ P((ne) => new Set(ne).add(V));
14394
14394
  }, []),
14395
- onNativeOptionRemove: f.useCallback((M) => {
14396
- P((J) => {
14397
- const _ = new Set(J);
14398
- return _.delete(M), _;
14395
+ onNativeOptionRemove: f.useCallback((V) => {
14396
+ P((ne) => {
14397
+ const _ = new Set(ne);
14398
+ return _.delete(V), _;
14399
14399
  });
14400
14400
  }, []),
14401
14401
  children: n
@@ -14410,7 +14410,7 @@ var iT = [" ", "Enter", "ArrowUp", "ArrowDown"], aT = [" ", "Enter"], Dn = "Sele
14410
14410
  name: d,
14411
14411
  autoComplete: h,
14412
14412
  value: I,
14413
- onChange: (M) => j(M.target.value),
14413
+ onChange: (V) => j(V.target.value),
14414
14414
  disabled: m,
14415
14415
  form: b,
14416
14416
  children: [
@@ -14452,15 +14452,15 @@ var Jh = "SelectTrigger", Zh = f.forwardRef(
14452
14452
  "data-placeholder": yp(i.value) ? "" : void 0,
14453
14453
  ...o,
14454
14454
  ref: l,
14455
- onClick: ne(o.onClick, (v) => {
14455
+ onClick: te(o.onClick, (v) => {
14456
14456
  v.currentTarget.focus(), d.current !== "mouse" && b(v);
14457
14457
  }),
14458
- onPointerDown: ne(o.onPointerDown, (v) => {
14458
+ onPointerDown: te(o.onPointerDown, (v) => {
14459
14459
  d.current = v.pointerType;
14460
14460
  const p = v.target;
14461
14461
  p.hasPointerCapture(v.pointerId) && p.releasePointerCapture(v.pointerId), v.button === 0 && v.ctrlKey === !1 && v.pointerType === "mouse" && (b(v), v.preventDefault());
14462
14462
  }),
14463
- onKeyDown: ne(o.onKeyDown, (v) => {
14463
+ onKeyDown: te(o.onKeyDown, (v) => {
14464
14464
  const p = h.current !== "";
14465
14465
  !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && m(v.key), !(p && v.key === " ") && iT.includes(v.key) && (b(), v.preventDefault());
14466
14466
  })
@@ -14533,62 +14533,62 @@ var Lt = 10, [op, Rn] = pr(Ln), pT = "SelectContentImpl", mT = tr("SelectContent
14533
14533
  avoidCollisions: p,
14534
14534
  //
14535
14535
  ...x
14536
- } = e, w = Tn(Ln, n), [y, E] = f.useState(null), [S, T] = f.useState(null), C = Re(t, ($) => E($)), [N, I] = f.useState(null), [j, L] = f.useState(
14536
+ } = e, w = Tn(Ln, n), [y, E] = f.useState(null), [S, T] = f.useState(null), C = Re(t, (z) => E(z)), [N, I] = f.useState(null), [j, F] = f.useState(
14537
14537
  null
14538
14538
  ), H = _s(n), [G, P] = f.useState(!1), X = f.useRef(!1);
14539
14539
  f.useEffect(() => {
14540
14540
  if (y) return ha(y);
14541
14541
  }, [y]), fa();
14542
- const M = f.useCallback(
14543
- ($) => {
14544
- const [A, ...K] = H().map((se) => se.ref.current), [te] = K.slice(-1), ce = document.activeElement;
14545
- for (const se of $)
14546
- if (se === ce || (se == null || se.scrollIntoView({ block: "nearest" }), se === A && S && (S.scrollTop = 0), se === te && S && (S.scrollTop = S.scrollHeight), se == null || se.focus(), document.activeElement !== ce)) return;
14542
+ const V = f.useCallback(
14543
+ (z) => {
14544
+ const [A, ...K] = H().map((se) => se.ref.current), [ee] = K.slice(-1), ce = document.activeElement;
14545
+ for (const se of z)
14546
+ if (se === ce || (se == null || se.scrollIntoView({ block: "nearest" }), se === A && S && (S.scrollTop = 0), se === ee && S && (S.scrollTop = S.scrollHeight), se == null || se.focus(), document.activeElement !== ce)) return;
14547
14547
  },
14548
14548
  [H, S]
14549
- ), J = f.useCallback(
14550
- () => M([N, y]),
14551
- [M, N, y]
14549
+ ), ne = f.useCallback(
14550
+ () => V([N, y]),
14551
+ [V, N, y]
14552
14552
  );
14553
14553
  f.useEffect(() => {
14554
- G && J();
14555
- }, [G, J]);
14556
- const { onOpenChange: _, triggerPointerDownPosRef: O } = w;
14554
+ G && ne();
14555
+ }, [G, ne]);
14556
+ const { onOpenChange: _, triggerPointerDownPosRef: M } = w;
14557
14557
  f.useEffect(() => {
14558
14558
  if (y) {
14559
- let $ = { x: 0, y: 0 };
14560
- const A = (te) => {
14559
+ let z = { x: 0, y: 0 };
14560
+ const A = (ee) => {
14561
14561
  var ce, se;
14562
- $ = {
14563
- x: Math.abs(Math.round(te.pageX) - (((ce = O.current) == null ? void 0 : ce.x) ?? 0)),
14564
- y: Math.abs(Math.round(te.pageY) - (((se = O.current) == null ? void 0 : se.y) ?? 0))
14562
+ z = {
14563
+ x: Math.abs(Math.round(ee.pageX) - (((ce = M.current) == null ? void 0 : ce.x) ?? 0)),
14564
+ y: Math.abs(Math.round(ee.pageY) - (((se = M.current) == null ? void 0 : se.y) ?? 0))
14565
14565
  };
14566
- }, K = (te) => {
14567
- $.x <= 10 && $.y <= 10 ? te.preventDefault() : y.contains(te.target) || _(!1), document.removeEventListener("pointermove", A), O.current = null;
14566
+ }, K = (ee) => {
14567
+ z.x <= 10 && z.y <= 10 ? ee.preventDefault() : y.contains(ee.target) || _(!1), document.removeEventListener("pointermove", A), M.current = null;
14568
14568
  };
14569
- return O.current !== null && (document.addEventListener("pointermove", A), document.addEventListener("pointerup", K, { capture: !0, once: !0 })), () => {
14569
+ return M.current !== null && (document.addEventListener("pointermove", A), document.addEventListener("pointerup", K, { capture: !0, once: !0 })), () => {
14570
14570
  document.removeEventListener("pointermove", A), document.removeEventListener("pointerup", K, { capture: !0 });
14571
14571
  };
14572
14572
  }
14573
- }, [y, _, O]), f.useEffect(() => {
14574
- const $ = () => _(!1);
14575
- return window.addEventListener("blur", $), window.addEventListener("resize", $), () => {
14576
- window.removeEventListener("blur", $), window.removeEventListener("resize", $);
14573
+ }, [y, _, M]), f.useEffect(() => {
14574
+ const z = () => _(!1);
14575
+ return window.addEventListener("blur", z), window.addEventListener("resize", z), () => {
14576
+ window.removeEventListener("blur", z), window.removeEventListener("resize", z);
14577
14577
  };
14578
14578
  }, [_]);
14579
- const [W, V] = Sp(($) => {
14580
- const A = H().filter((ce) => !ce.disabled), K = A.find((ce) => ce.ref.current === document.activeElement), te = Cp(A, $, K);
14581
- te && setTimeout(() => te.ref.current.focus());
14582
- }), ee = f.useCallback(
14583
- ($, A, K) => {
14584
- const te = !X.current && !K;
14585
- (w.value !== void 0 && w.value === A || te) && (I($), te && (X.current = !0));
14579
+ const [O, D] = Sp((z) => {
14580
+ const A = H().filter((ce) => !ce.disabled), K = A.find((ce) => ce.ref.current === document.activeElement), ee = Cp(A, z, K);
14581
+ ee && setTimeout(() => ee.ref.current.focus());
14582
+ }), Z = f.useCallback(
14583
+ (z, A, K) => {
14584
+ const ee = !X.current && !K;
14585
+ (w.value !== void 0 && w.value === A || ee) && (I(z), ee && (X.current = !0));
14586
14586
  },
14587
14587
  [w.value]
14588
- ), F = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Z = f.useCallback(
14589
- ($, A, K) => {
14590
- const te = !X.current && !K;
14591
- (w.value !== void 0 && w.value === A || te) && L($);
14588
+ ), B = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), J = f.useCallback(
14589
+ (z, A, K) => {
14590
+ const ee = !X.current && !K;
14591
+ (w.value !== void 0 && w.value === A || ee) && F(z);
14592
14592
  },
14593
14593
  [w.value]
14594
14594
  ), ae = r === "popper" ? Di : ip, ge = ae === Di ? {
@@ -14610,26 +14610,26 @@ var Lt = 10, [op, Rn] = pr(Ln), pT = "SelectContentImpl", mT = tr("SelectContent
14610
14610
  content: y,
14611
14611
  viewport: S,
14612
14612
  onViewportChange: T,
14613
- itemRefCallback: ee,
14613
+ itemRefCallback: Z,
14614
14614
  selectedItem: N,
14615
- onItemLeave: F,
14616
- itemTextRefCallback: Z,
14617
- focusSelectedItem: J,
14615
+ onItemLeave: B,
14616
+ itemTextRefCallback: J,
14617
+ focusSelectedItem: ne,
14618
14618
  selectedItemText: j,
14619
14619
  position: r,
14620
14620
  isPositioned: G,
14621
- searchRef: W,
14621
+ searchRef: O,
14622
14622
  children: /* @__PURE__ */ c.jsx(fs, { as: mT, allowPinchZoom: !0, children: /* @__PURE__ */ c.jsx(
14623
14623
  ls,
14624
14624
  {
14625
14625
  asChild: !0,
14626
14626
  trapped: w.open,
14627
- onMountAutoFocus: ($) => {
14628
- $.preventDefault();
14627
+ onMountAutoFocus: (z) => {
14628
+ z.preventDefault();
14629
14629
  },
14630
- onUnmountAutoFocus: ne(o, ($) => {
14630
+ onUnmountAutoFocus: te(o, (z) => {
14631
14631
  var A;
14632
- (A = w.trigger) == null || A.focus({ preventScroll: !0 }), $.preventDefault();
14632
+ (A = w.trigger) == null || A.focus({ preventScroll: !0 }), z.preventDefault();
14633
14633
  }),
14634
14634
  children: /* @__PURE__ */ c.jsx(
14635
14635
  Xr,
@@ -14638,7 +14638,7 @@ var Lt = 10, [op, Rn] = pr(Ln), pT = "SelectContentImpl", mT = tr("SelectContent
14638
14638
  disableOutsidePointerEvents: !0,
14639
14639
  onEscapeKeyDown: s,
14640
14640
  onPointerDownOutside: i,
14641
- onFocusOutside: ($) => $.preventDefault(),
14641
+ onFocusOutside: (z) => z.preventDefault(),
14642
14642
  onDismiss: () => w.onOpenChange(!1),
14643
14643
  children: /* @__PURE__ */ c.jsx(
14644
14644
  ae,
@@ -14647,7 +14647,7 @@ var Lt = 10, [op, Rn] = pr(Ln), pT = "SelectContentImpl", mT = tr("SelectContent
14647
14647
  id: w.contentId,
14648
14648
  "data-state": w.open ? "open" : "closed",
14649
14649
  dir: w.dir,
14650
- onContextMenu: ($) => $.preventDefault(),
14650
+ onContextMenu: (z) => z.preventDefault(),
14651
14651
  ...x,
14652
14652
  ...ge,
14653
14653
  onPlaced: () => P(!0),
@@ -14660,15 +14660,15 @@ var Lt = 10, [op, Rn] = pr(Ln), pT = "SelectContentImpl", mT = tr("SelectContent
14660
14660
  outline: "none",
14661
14661
  ...x.style
14662
14662
  },
14663
- onKeyDown: ne(x.onKeyDown, ($) => {
14664
- const A = $.ctrlKey || $.altKey || $.metaKey;
14665
- if ($.key === "Tab" && $.preventDefault(), !A && $.key.length === 1 && V($.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes($.key)) {
14666
- let te = H().filter((ce) => !ce.disabled).map((ce) => ce.ref.current);
14667
- if (["ArrowUp", "End"].includes($.key) && (te = te.slice().reverse()), ["ArrowUp", "ArrowDown"].includes($.key)) {
14668
- const ce = $.target, se = te.indexOf(ce);
14669
- te = te.slice(se + 1);
14663
+ onKeyDown: te(x.onKeyDown, (z) => {
14664
+ const A = z.ctrlKey || z.altKey || z.metaKey;
14665
+ if (z.key === "Tab" && z.preventDefault(), !A && z.key.length === 1 && D(z.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(z.key)) {
14666
+ let ee = H().filter((ce) => !ce.disabled).map((ce) => ce.ref.current);
14667
+ if (["ArrowUp", "End"].includes(z.key) && (ee = ee.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(z.key)) {
14668
+ const ce = z.target, se = ee.indexOf(ce);
14669
+ ee = ee.slice(se + 1);
14670
14670
  }
14671
- setTimeout(() => M(te)), $.preventDefault();
14671
+ setTimeout(() => V(ee)), z.preventDefault();
14672
14672
  }
14673
14673
  })
14674
14674
  }
@@ -14704,27 +14704,27 @@ var gT = "SelectItemAlignedPosition", ip = f.forwardRef((e, t) => {
14704
14704
  ]);
14705
14705
  a.style.minWidth = Pe + "px", a.style.right = pe + "px";
14706
14706
  }
14707
- const L = m(), H = window.innerHeight - Lt * 2, G = v.scrollHeight, P = window.getComputedStyle(u), X = parseInt(P.borderTopWidth, 10), M = parseInt(P.paddingTop, 10), J = parseInt(P.borderBottomWidth, 10), _ = parseInt(P.paddingBottom, 10), O = X + M + G + _ + J, W = Math.min(p.offsetHeight * 5, O), V = window.getComputedStyle(v), ee = parseInt(V.paddingTop, 10), F = parseInt(V.paddingBottom, 10), Z = C.top + C.height / 2 - Lt, ae = H - Z, ge = p.offsetHeight / 2, $ = p.offsetTop + ge, A = X + M + $, K = O - A;
14708
- if (A <= Z) {
14709
- const ce = L.length > 0 && p === L[L.length - 1].ref.current;
14707
+ const F = m(), H = window.innerHeight - Lt * 2, G = v.scrollHeight, P = window.getComputedStyle(u), X = parseInt(P.borderTopWidth, 10), V = parseInt(P.paddingTop, 10), ne = parseInt(P.borderBottomWidth, 10), _ = parseInt(P.paddingBottom, 10), M = X + V + G + _ + ne, O = Math.min(p.offsetHeight * 5, M), D = window.getComputedStyle(v), Z = parseInt(D.paddingTop, 10), B = parseInt(D.paddingBottom, 10), J = C.top + C.height / 2 - Lt, ae = H - J, ge = p.offsetHeight / 2, z = p.offsetTop + ge, A = X + V + z, K = M - A;
14708
+ if (A <= J) {
14709
+ const ce = F.length > 0 && p === F[F.length - 1].ref.current;
14710
14710
  a.style.bottom = "0px";
14711
14711
  const se = u.clientHeight - v.offsetTop - v.offsetHeight, Ce = Math.max(
14712
14712
  ae,
14713
14713
  ge + // viewport might have padding bottom, include it to avoid a scrollable viewport
14714
- (ce ? F : 0) + se + J
14714
+ (ce ? B : 0) + se + ne
14715
14715
  ), Pe = A + Ce;
14716
14716
  a.style.height = Pe + "px";
14717
14717
  } else {
14718
- const ce = L.length > 0 && p === L[0].ref.current;
14718
+ const ce = F.length > 0 && p === F[0].ref.current;
14719
14719
  a.style.top = "0px";
14720
14720
  const Ce = Math.max(
14721
- Z,
14721
+ J,
14722
14722
  X + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
14723
- (ce ? ee : 0) + ge
14723
+ (ce ? Z : 0) + ge
14724
14724
  ) + K;
14725
- a.style.height = Ce + "px", v.scrollTop = A - Z + v.offsetTop;
14725
+ a.style.height = Ce + "px", v.scrollTop = A - J + v.offsetTop;
14726
14726
  }
14727
- a.style.margin = `${Lt}px 0`, a.style.minHeight = W + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => g.current = !0);
14727
+ a.style.margin = `${Lt}px 0`, a.style.minHeight = O + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => g.current = !0);
14728
14728
  }
14729
14729
  }, [
14730
14730
  m,
@@ -14849,7 +14849,7 @@ var [xT, Wa] = pr(Ln, {}), Li = "SelectViewport", ap = f.forwardRef(
14849
14849
  overflow: "hidden auto",
14850
14850
  ...o.style
14851
14851
  },
14852
- onScroll: ne(o.onScroll, (u) => {
14852
+ onScroll: te(o.onScroll, (u) => {
14853
14853
  const d = u.currentTarget, { contentWrapper: h, shouldExpandOnScrollRef: m } = i;
14854
14854
  if (m != null && m.current && h) {
14855
14855
  const g = Math.abs(l.current - d.scrollTop);
@@ -14935,26 +14935,26 @@ var qo = "SelectItem", [ST, dp] = pr(qo), fp = f.forwardRef(
14935
14935
  tabIndex: o ? void 0 : -1,
14936
14936
  ...i,
14937
14937
  ref: b,
14938
- onFocus: ne(i.onFocus, () => g(!0)),
14939
- onBlur: ne(i.onBlur, () => g(!1)),
14940
- onClick: ne(i.onClick, () => {
14938
+ onFocus: te(i.onFocus, () => g(!0)),
14939
+ onBlur: te(i.onBlur, () => g(!1)),
14940
+ onClick: te(i.onClick, () => {
14941
14941
  p.current !== "mouse" && x();
14942
14942
  }),
14943
- onPointerUp: ne(i.onPointerUp, () => {
14943
+ onPointerUp: te(i.onPointerUp, () => {
14944
14944
  p.current === "mouse" && x();
14945
14945
  }),
14946
- onPointerDown: ne(i.onPointerDown, (w) => {
14946
+ onPointerDown: te(i.onPointerDown, (w) => {
14947
14947
  p.current = w.pointerType;
14948
14948
  }),
14949
- onPointerMove: ne(i.onPointerMove, (w) => {
14949
+ onPointerMove: te(i.onPointerMove, (w) => {
14950
14950
  var y;
14951
14951
  p.current = w.pointerType, o ? (y = l.onItemLeave) == null || y.call(l) : p.current === "mouse" && w.currentTarget.focus({ preventScroll: !0 });
14952
14952
  }),
14953
- onPointerLeave: ne(i.onPointerLeave, (w) => {
14953
+ onPointerLeave: te(i.onPointerLeave, (w) => {
14954
14954
  var y;
14955
14955
  w.currentTarget === document.activeElement && ((y = l.onItemLeave) == null || y.call(l));
14956
14956
  }),
14957
- onKeyDown: ne(i.onKeyDown, (w) => {
14957
+ onKeyDown: te(i.onKeyDown, (w) => {
14958
14958
  var E;
14959
14959
  ((E = l.searchRef) == null ? void 0 : E.current) !== "" && w.key === " " || (aT.includes(w.key) && x(), w.key === " " && w.preventDefault());
14960
14960
  })
@@ -15058,14 +15058,14 @@ var xp = f.forwardRef((e, t) => {
15058
15058
  ...o,
15059
15059
  ref: t,
15060
15060
  style: { flexShrink: 0, ...o.style },
15061
- onPointerDown: ne(o.onPointerDown, () => {
15061
+ onPointerDown: te(o.onPointerDown, () => {
15062
15062
  i.current === null && (i.current = window.setInterval(r, 50));
15063
15063
  }),
15064
- onPointerMove: ne(o.onPointerMove, () => {
15064
+ onPointerMove: te(o.onPointerMove, () => {
15065
15065
  var u;
15066
15066
  (u = s.onItemLeave) == null || u.call(s), i.current === null && (i.current = window.setInterval(r, 50));
15067
15067
  }),
15068
- onPointerLeave: ne(o.onPointerLeave, () => {
15068
+ onPointerLeave: te(o.onPointerLeave, () => {
15069
15069
  l();
15070
15070
  })
15071
15071
  }
@@ -15144,7 +15144,7 @@ const bl = NT, wl = IT, Hi = f.forwardRef(({ className: e, children: t, ...n },
15144
15144
  Tp,
15145
15145
  {
15146
15146
  ref: r,
15147
- className: D(
15147
+ className: L(
15148
15148
  "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
15149
15149
  e
15150
15150
  ),
@@ -15160,7 +15160,7 @@ const Ap = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15160
15160
  Ip,
15161
15161
  {
15162
15162
  ref: n,
15163
- className: D(
15163
+ className: L(
15164
15164
  "flex cursor-default items-center justify-center py-1",
15165
15165
  e
15166
15166
  ),
@@ -15173,7 +15173,7 @@ const Pp = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15173
15173
  jp,
15174
15174
  {
15175
15175
  ref: n,
15176
- className: D(
15176
+ className: L(
15177
15177
  "flex cursor-default items-center justify-center py-1",
15178
15178
  e
15179
15179
  ),
@@ -15186,7 +15186,7 @@ const zi = f.forwardRef(({ className: e, children: t, position: n = "popper", ..
15186
15186
  Rp,
15187
15187
  {
15188
15188
  ref: o,
15189
- className: D(
15189
+ className: L(
15190
15190
  "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
15191
15191
  n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
15192
15192
  e
@@ -15198,7 +15198,7 @@ const zi = f.forwardRef(({ className: e, children: t, position: n = "popper", ..
15198
15198
  /* @__PURE__ */ c.jsx(
15199
15199
  AT,
15200
15200
  {
15201
- className: D(
15201
+ className: L(
15202
15202
  "p-1",
15203
15203
  n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
15204
15204
  ),
@@ -15214,7 +15214,7 @@ const OT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15214
15214
  Ep,
15215
15215
  {
15216
15216
  ref: n,
15217
- className: D("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
15217
+ className: L("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
15218
15218
  ...t
15219
15219
  }
15220
15220
  ));
@@ -15223,7 +15223,7 @@ const En = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
15223
15223
  Np,
15224
15224
  {
15225
15225
  ref: r,
15226
- className: D(
15226
+ className: L(
15227
15227
  "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
15228
15228
  e
15229
15229
  ),
@@ -15239,7 +15239,7 @@ const MT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15239
15239
  kp,
15240
15240
  {
15241
15241
  ref: n,
15242
- className: D("-mx-1 my-1 h-px bg-muted", e),
15242
+ className: L("-mx-1 my-1 h-px bg-muted", e),
15243
15243
  ...t
15244
15244
  }
15245
15245
  ));
@@ -15248,7 +15248,7 @@ const jo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15248
15248
  "div",
15249
15249
  {
15250
15250
  ref: n,
15251
- className: D(
15251
+ className: L(
15252
15252
  "rounded-lg border bg-card text-card-foreground shadow-sm",
15253
15253
  e
15254
15254
  ),
@@ -15260,7 +15260,7 @@ const ko = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15260
15260
  "div",
15261
15261
  {
15262
15262
  ref: n,
15263
- className: D("flex flex-col space-y-1.5 p-6", e),
15263
+ className: L("flex flex-col space-y-1.5 p-6", e),
15264
15264
  ...t
15265
15265
  }
15266
15266
  ));
@@ -15269,7 +15269,7 @@ const Ao = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15269
15269
  "h3",
15270
15270
  {
15271
15271
  ref: n,
15272
- className: D(
15272
+ className: L(
15273
15273
  "text-2xl font-semibold leading-none tracking-tight",
15274
15274
  e
15275
15275
  ),
@@ -15281,18 +15281,18 @@ const DT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15281
15281
  "p",
15282
15282
  {
15283
15283
  ref: n,
15284
- className: D("text-sm text-muted-foreground", e),
15284
+ className: L("text-sm text-muted-foreground", e),
15285
15285
  ...t
15286
15286
  }
15287
15287
  ));
15288
15288
  DT.displayName = "CardDescription";
15289
- const Po = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className: D("p-6 pt-0", e), ...t }));
15289
+ const Po = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className: L("p-6 pt-0", e), ...t }));
15290
15290
  Po.displayName = "CardContent";
15291
15291
  const LT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15292
15292
  "div",
15293
15293
  {
15294
15294
  ref: n,
15295
- className: D("flex items-center p-6 pt-0", e),
15295
+ className: L("flex items-center p-6 pt-0", e),
15296
15296
  ...t
15297
15297
  }
15298
15298
  ));