teodor-new-chat-ui 3.0.73 → 3.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as f from "react";
2
- import K, { useState as de, useRef as dt, useCallback as ze, useEffect as Ue, useReducer as Dp, useMemo as sn, createContext as xc, useContext as vc, createElement as to, useLayoutEffect as Lp } from "react";
2
+ import K, { useState as de, useRef as at, useCallback as ze, useEffect as Ue, useReducer as Dp, useMemo as sn, createContext as xc, useContext as vc, createElement as to, useLayoutEffect as Lp } from "react";
3
3
  import { Square as Fp, Send as Bp, X as Wn, ExternalLink as Hp, Download as $p, Image as bc, FileText as za, Loader as zp, ChevronUp as fr, ChevronDown as Un, Copy as Ua, Edit as Wa, RotateCcw as Xs, Bot as Va, Wrench as Up, User as Wp, ChevronRight as Vp, Check as Oi, Circle as Gp, Edit3 as wc, Paperclip as Ga, Loader2 as Kp, Plus as Yp, FileSpreadsheet as qp, MessageSquarePlus as Xp, MessageSquare as Jp, Calendar as Zp, Trash2 as Qp, PanelLeft as em, Settings as tm, Server as nm, EyeOff as rm, Eye as om, Layout as sm, MessageCircle as im, Save as am } from "lucide-react";
4
4
  import { Slot as er, createSlot as qn, createSlottable as lm } from "@radix-ui/react-slot";
5
5
  import { cva as kr } from "class-variance-authority";
@@ -45,57 +45,57 @@ var Ya;
45
45
  function fm() {
46
46
  return Ya || (Ya = 1, process.env.NODE_ENV !== "production" && function() {
47
47
  var e = K, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), g = Symbol.iterator, x = "@@iterator";
48
- function m(R) {
49
- if (R === null || typeof R != "object")
48
+ function m(T) {
49
+ if (T === null || typeof T != "object")
50
50
  return null;
51
- var U = g && R[g] || R[x];
51
+ var U = g && T[g] || T[x];
52
52
  return typeof U == "function" ? U : null;
53
53
  }
54
54
  var v = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
55
- function w(R) {
55
+ function w(T) {
56
56
  {
57
57
  for (var U = arguments.length, te = new Array(U > 1 ? U - 1 : 0), ge = 1; ge < U; ge++)
58
58
  te[ge - 1] = arguments[ge];
59
- y("error", R, te);
59
+ y("error", T, te);
60
60
  }
61
61
  }
62
- function y(R, U, te) {
62
+ function y(T, U, te) {
63
63
  {
64
64
  var ge = v.ReactDebugCurrentFrame, Ae = ge.getStackAddendum();
65
65
  Ae !== "" && (U += "%s", te = te.concat([Ae]));
66
66
  var Me = te.map(function(Ee) {
67
67
  return String(Ee);
68
68
  });
69
- Me.unshift("Warning: " + U), Function.prototype.apply.call(console[R], console, Me);
69
+ Me.unshift("Warning: " + U), Function.prototype.apply.call(console[T], console, Me);
70
70
  }
71
71
  }
72
- var C = !1, S = !1, T = !1, E = !1, I = !1, A;
73
- A = Symbol.for("react.module.reference");
74
- function k(R) {
75
- return !!(typeof R == "string" || typeof R == "function" || R === r || R === s || I || R === o || R === u || R === d || E || R === b || C || S || T || typeof R == "object" && R !== null && (R.$$typeof === p || R.$$typeof === h || R.$$typeof === i || R.$$typeof === a || R.$$typeof === c || // This needs to include all possible module reference object
72
+ var E = !1, S = !1, C = !1, R = !1, I = !1, N;
73
+ N = Symbol.for("react.module.reference");
74
+ function k(T) {
75
+ return !!(typeof T == "string" || typeof T == "function" || T === r || T === s || I || T === o || T === u || T === d || R || T === b || E || S || C || typeof T == "object" && T !== null && (T.$$typeof === p || T.$$typeof === h || T.$$typeof === i || T.$$typeof === a || T.$$typeof === c || // This needs to include all possible module reference object
76
76
  // types supported by any Flight configuration anywhere since
77
77
  // we don't know which Flight build this will end up being used
78
78
  // with.
79
- R.$$typeof === A || R.getModuleId !== void 0));
79
+ T.$$typeof === N || T.getModuleId !== void 0));
80
80
  }
81
- function M(R, U, te) {
82
- var ge = R.displayName;
81
+ function M(T, U, te) {
82
+ var ge = T.displayName;
83
83
  if (ge)
84
84
  return ge;
85
85
  var Ae = U.displayName || U.name || "";
86
86
  return Ae !== "" ? te + "(" + Ae + ")" : te;
87
87
  }
88
- function W(R) {
89
- return R.displayName || "Context";
88
+ function W(T) {
89
+ return T.displayName || "Context";
90
90
  }
91
- function G(R) {
92
- if (R == null)
91
+ function G(T) {
92
+ if (T == null)
93
93
  return null;
94
- if (typeof R.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof R == "function")
95
- return R.displayName || R.name || null;
96
- if (typeof R == "string")
97
- return R;
98
- switch (R) {
94
+ if (typeof T.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof T == "function")
95
+ return T.displayName || T.name || null;
96
+ if (typeof T == "string")
97
+ return T;
98
+ switch (T) {
99
99
  case r:
100
100
  return "Fragment";
101
101
  case n:
@@ -109,21 +109,21 @@ function fm() {
109
109
  case d:
110
110
  return "SuspenseList";
111
111
  }
112
- if (typeof R == "object")
113
- switch (R.$$typeof) {
112
+ if (typeof T == "object")
113
+ switch (T.$$typeof) {
114
114
  case a:
115
- var U = R;
115
+ var U = T;
116
116
  return W(U) + ".Consumer";
117
117
  case i:
118
- var te = R;
118
+ var te = T;
119
119
  return W(te._context) + ".Provider";
120
120
  case c:
121
- return M(R, R.render, "ForwardRef");
121
+ return M(T, T.render, "ForwardRef");
122
122
  case h:
123
- var ge = R.displayName || null;
124
- return ge !== null ? ge : G(R.type) || "Memo";
123
+ var ge = T.displayName || null;
124
+ return ge !== null ? ge : G(T.type) || "Memo";
125
125
  case p: {
126
- var Ae = R, Me = Ae._payload, Ee = Ae._init;
126
+ var Ae = T, Me = Ae._payload, Ee = Ae._init;
127
127
  try {
128
128
  return G(Ee(Me));
129
129
  } catch {
@@ -133,7 +133,7 @@ function fm() {
133
133
  }
134
134
  return null;
135
135
  }
136
- var N = Object.assign, H = 0, L, q, O, _, z, X, oe;
136
+ var j = Object.assign, H = 0, L, q, O, _, z, X, oe;
137
137
  function F() {
138
138
  }
139
139
  F.__reactDisabledLog = !0;
@@ -141,20 +141,20 @@ function fm() {
141
141
  {
142
142
  if (H === 0) {
143
143
  L = console.log, q = console.info, O = console.warn, _ = console.error, z = console.group, X = console.groupCollapsed, oe = console.groupEnd;
144
- var R = {
144
+ var T = {
145
145
  configurable: !0,
146
146
  enumerable: !0,
147
147
  value: F,
148
148
  writable: !0
149
149
  };
150
150
  Object.defineProperties(console, {
151
- info: R,
152
- log: R,
153
- warn: R,
154
- error: R,
155
- group: R,
156
- groupCollapsed: R,
157
- groupEnd: R
151
+ info: T,
152
+ log: T,
153
+ warn: T,
154
+ error: T,
155
+ group: T,
156
+ groupCollapsed: T,
157
+ groupEnd: T
158
158
  });
159
159
  }
160
160
  H++;
@@ -163,31 +163,31 @@ function fm() {
163
163
  function he() {
164
164
  {
165
165
  if (H--, H === 0) {
166
- var R = {
166
+ var T = {
167
167
  configurable: !0,
168
168
  enumerable: !0,
169
169
  writable: !0
170
170
  };
171
171
  Object.defineProperties(console, {
172
- log: N({}, R, {
172
+ log: j({}, T, {
173
173
  value: L
174
174
  }),
175
- info: N({}, R, {
175
+ info: j({}, T, {
176
176
  value: q
177
177
  }),
178
- warn: N({}, R, {
178
+ warn: j({}, T, {
179
179
  value: O
180
180
  }),
181
- error: N({}, R, {
181
+ error: j({}, T, {
182
182
  value: _
183
183
  }),
184
- group: N({}, R, {
184
+ group: j({}, T, {
185
185
  value: z
186
186
  }),
187
- groupCollapsed: N({}, R, {
187
+ groupCollapsed: j({}, T, {
188
188
  value: X
189
189
  }),
190
- groupEnd: N({}, R, {
190
+ groupEnd: j({}, T, {
191
191
  value: oe
192
192
  })
193
193
  });
@@ -196,7 +196,7 @@ function fm() {
196
196
  }
197
197
  }
198
198
  var be = v.ReactCurrentDispatcher, Y;
199
- function P(R, U, te) {
199
+ function P(T, U, te) {
200
200
  {
201
201
  if (Y === void 0)
202
202
  try {
@@ -206,7 +206,7 @@ function fm() {
206
206
  Y = ge && ge[1] || "";
207
207
  }
208
208
  return `
209
- ` + Y + R;
209
+ ` + Y + T;
210
210
  }
211
211
  }
212
212
  var Z = !1, ne;
@@ -214,11 +214,11 @@ function fm() {
214
214
  var ae = typeof WeakMap == "function" ? WeakMap : Map;
215
215
  ne = new ae();
216
216
  }
217
- function se(R, U) {
218
- if (!R || Z)
217
+ function se(T, U) {
218
+ if (!T || Z)
219
219
  return "";
220
220
  {
221
- var te = ne.get(R);
221
+ var te = ne.get(T);
222
222
  if (te !== void 0)
223
223
  return te;
224
224
  }
@@ -243,14 +243,14 @@ function fm() {
243
243
  } catch (Qt) {
244
244
  ge = Qt;
245
245
  }
246
- Reflect.construct(R, [], Ee);
246
+ Reflect.construct(T, [], Ee);
247
247
  } else {
248
248
  try {
249
249
  Ee.call();
250
250
  } catch (Qt) {
251
251
  ge = Qt;
252
252
  }
253
- R.call(Ee.prototype);
253
+ T.call(Ee.prototype);
254
254
  }
255
255
  } else {
256
256
  try {
@@ -258,22 +258,22 @@ function fm() {
258
258
  } catch (Qt) {
259
259
  ge = Qt;
260
260
  }
261
- R();
261
+ T();
262
262
  }
263
263
  } catch (Qt) {
264
264
  if (Qt && ge && typeof Qt.stack == "string") {
265
265
  for (var Te = Qt.stack.split(`
266
- `), ut = ge.stack.split(`
267
- `), Ve = Te.length - 1, Xe = ut.length - 1; Ve >= 1 && Xe >= 0 && Te[Ve] !== ut[Xe]; )
266
+ `), dt = ge.stack.split(`
267
+ `), Ve = Te.length - 1, Xe = dt.length - 1; Ve >= 1 && Xe >= 0 && Te[Ve] !== dt[Xe]; )
268
268
  Xe--;
269
269
  for (; Ve >= 1 && Xe >= 0; Ve--, Xe--)
270
- if (Te[Ve] !== ut[Xe]) {
270
+ if (Te[Ve] !== dt[Xe]) {
271
271
  if (Ve !== 1 || Xe !== 1)
272
272
  do
273
- if (Ve--, Xe--, Xe < 0 || Te[Ve] !== ut[Xe]) {
273
+ if (Ve--, Xe--, Xe < 0 || Te[Ve] !== dt[Xe]) {
274
274
  var St = `
275
275
  ` + Te[Ve].replace(" at new ", " at ");
276
- return R.displayName && St.includes("<anonymous>") && (St = St.replace("<anonymous>", R.displayName)), typeof R == "function" && ne.set(R, St), St;
276
+ return T.displayName && St.includes("<anonymous>") && (St = St.replace("<anonymous>", T.displayName)), typeof T == "function" && ne.set(T, St), St;
277
277
  }
278
278
  while (Ve >= 1 && Xe >= 0);
279
279
  break;
@@ -282,37 +282,37 @@ function fm() {
282
282
  } finally {
283
283
  Z = !1, be.current = Me, he(), Error.prepareStackTrace = Ae;
284
284
  }
285
- var Ln = R ? R.displayName || R.name : "", $a = Ln ? P(Ln) : "";
286
- return typeof R == "function" && ne.set(R, $a), $a;
285
+ var Ln = T ? T.displayName || T.name : "", $a = Ln ? P(Ln) : "";
286
+ return typeof T == "function" && ne.set(T, $a), $a;
287
287
  }
288
- function je(R, U, te) {
289
- return se(R, !1);
288
+ function je(T, U, te) {
289
+ return se(T, !1);
290
290
  }
291
- function Le(R) {
292
- var U = R.prototype;
291
+ function Le(T) {
292
+ var U = T.prototype;
293
293
  return !!(U && U.isReactComponent);
294
294
  }
295
- function Oe(R, U, te) {
296
- if (R == null)
295
+ function Oe(T, U, te) {
296
+ if (T == null)
297
297
  return "";
298
- if (typeof R == "function")
299
- return se(R, Le(R));
300
- if (typeof R == "string")
301
- return P(R);
302
- switch (R) {
298
+ if (typeof T == "function")
299
+ return se(T, Le(T));
300
+ if (typeof T == "string")
301
+ return P(T);
302
+ switch (T) {
303
303
  case u:
304
304
  return P("Suspense");
305
305
  case d:
306
306
  return P("SuspenseList");
307
307
  }
308
- if (typeof R == "object")
309
- switch (R.$$typeof) {
308
+ if (typeof T == "object")
309
+ switch (T.$$typeof) {
310
310
  case c:
311
- return je(R.render);
311
+ return je(T.render);
312
312
  case h:
313
- return Oe(R.type, U, te);
313
+ return Oe(T.type, U, te);
314
314
  case p: {
315
- var ge = R, Ae = ge._payload, Me = ge._init;
315
+ var ge = T, Ae = ge._payload, Me = ge._init;
316
316
  try {
317
317
  return Oe(Me(Ae), U, te);
318
318
  } catch {
@@ -322,25 +322,25 @@ function fm() {
322
322
  return "";
323
323
  }
324
324
  var ue = Object.prototype.hasOwnProperty, Pe = {}, xe = v.ReactDebugCurrentFrame;
325
- function $(R) {
326
- if (R) {
327
- var U = R._owner, te = Oe(R.type, R._source, U ? U.type : null);
325
+ function $(T) {
326
+ if (T) {
327
+ var U = T._owner, te = Oe(T.type, T._source, U ? U.type : null);
328
328
  xe.setExtraStackFrame(te);
329
329
  } else
330
330
  xe.setExtraStackFrame(null);
331
331
  }
332
- function ie(R, U, te, ge, Ae) {
332
+ function ie(T, U, te, ge, Ae) {
333
333
  {
334
334
  var Me = Function.call.bind(ue);
335
- for (var Ee in R)
336
- if (Me(R, Ee)) {
335
+ for (var Ee in T)
336
+ if (Me(T, Ee)) {
337
337
  var Te = void 0;
338
338
  try {
339
- if (typeof R[Ee] != "function") {
340
- var ut = Error((ge || "React class") + ": " + te + " type `" + Ee + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof R[Ee] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
- throw ut.name = "Invariant Violation", ut;
339
+ if (typeof T[Ee] != "function") {
340
+ var dt = Error((ge || "React class") + ": " + te + " type `" + Ee + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[Ee] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
+ throw dt.name = "Invariant Violation", dt;
342
342
  }
343
- Te = R[Ee](U, Ee, ge, te, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
343
+ Te = T[Ee](U, Ee, ge, te, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
344
344
  } catch (Ve) {
345
345
  Te = Ve;
346
346
  }
@@ -349,28 +349,28 @@ function fm() {
349
349
  }
350
350
  }
351
351
  var Fe = Array.isArray;
352
- function et(R) {
353
- return Fe(R);
352
+ function et(T) {
353
+ return Fe(T);
354
354
  }
355
- function nt(R) {
355
+ function nt(T) {
356
356
  {
357
- var U = typeof Symbol == "function" && Symbol.toStringTag, te = U && R[Symbol.toStringTag] || R.constructor.name || "Object";
357
+ var U = typeof Symbol == "function" && Symbol.toStringTag, te = U && T[Symbol.toStringTag] || T.constructor.name || "Object";
358
358
  return te;
359
359
  }
360
360
  }
361
- function ot(R) {
361
+ function ot(T) {
362
362
  try {
363
- return Ze(R), !1;
363
+ return Ze(T), !1;
364
364
  } catch {
365
365
  return !0;
366
366
  }
367
367
  }
368
- function Ze(R) {
369
- return "" + R;
368
+ function Ze(T) {
369
+ return "" + T;
370
370
  }
371
- function At(R) {
372
- if (ot(R))
373
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(R)), Ze(R);
371
+ function At(T) {
372
+ if (ot(T))
373
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(T)), Ze(T);
374
374
  }
375
375
  var Ye = v.ReactCurrentOwner, st = {
376
376
  key: !0,
@@ -378,53 +378,53 @@ function fm() {
378
378
  __self: !0,
379
379
  __source: !0
380
380
  }, We, it;
381
- function kt(R) {
382
- if (ue.call(R, "ref")) {
383
- var U = Object.getOwnPropertyDescriptor(R, "ref").get;
381
+ function kt(T) {
382
+ if (ue.call(T, "ref")) {
383
+ var U = Object.getOwnPropertyDescriptor(T, "ref").get;
384
384
  if (U && U.isReactWarning)
385
385
  return !1;
386
386
  }
387
- return R.ref !== void 0;
387
+ return T.ref !== void 0;
388
388
  }
389
- function xn(R) {
390
- if (ue.call(R, "key")) {
391
- var U = Object.getOwnPropertyDescriptor(R, "key").get;
389
+ function xn(T) {
390
+ if (ue.call(T, "key")) {
391
+ var U = Object.getOwnPropertyDescriptor(T, "key").get;
392
392
  if (U && U.isReactWarning)
393
393
  return !1;
394
394
  }
395
- return R.key !== void 0;
395
+ return T.key !== void 0;
396
396
  }
397
- function On(R, U) {
398
- typeof R.ref == "string" && Ye.current;
397
+ function On(T, U) {
398
+ typeof T.ref == "string" && Ye.current;
399
399
  }
400
- function J(R, U) {
400
+ function J(T, U) {
401
401
  {
402
402
  var te = function() {
403
403
  We || (We = !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));
404
404
  };
405
- te.isReactWarning = !0, Object.defineProperty(R, "key", {
405
+ te.isReactWarning = !0, Object.defineProperty(T, "key", {
406
406
  get: te,
407
407
  configurable: !0
408
408
  });
409
409
  }
410
410
  }
411
- function ce(R, U) {
411
+ function ce(T, U) {
412
412
  {
413
413
  var te = function() {
414
414
  it || (it = !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));
415
415
  };
416
- te.isReactWarning = !0, Object.defineProperty(R, "ref", {
416
+ te.isReactWarning = !0, Object.defineProperty(T, "ref", {
417
417
  get: te,
418
418
  configurable: !0
419
419
  });
420
420
  }
421
421
  }
422
- var _e = function(R, U, te, ge, Ae, Me, Ee) {
422
+ var _e = function(T, U, te, ge, Ae, Me, Ee) {
423
423
  var Te = {
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
- type: R,
427
+ type: T,
428
428
  key: U,
429
429
  ref: te,
430
430
  props: Ee,
@@ -448,58 +448,58 @@ function fm() {
448
448
  value: Ae
449
449
  }), Object.freeze && (Object.freeze(Te.props), Object.freeze(Te)), Te;
450
450
  };
451
- function qe(R, U, te, ge, Ae) {
451
+ function qe(T, U, te, ge, Ae) {
452
452
  {
453
- var Me, Ee = {}, Te = null, ut = null;
454
- te !== void 0 && (At(te), Te = "" + te), xn(U) && (At(U.key), Te = "" + U.key), kt(U) && (ut = U.ref, On(U, Ae));
453
+ var Me, Ee = {}, Te = null, dt = null;
454
+ te !== void 0 && (At(te), Te = "" + te), xn(U) && (At(U.key), Te = "" + U.key), kt(U) && (dt = U.ref, On(U, Ae));
455
455
  for (Me in U)
456
456
  ue.call(U, Me) && !st.hasOwnProperty(Me) && (Ee[Me] = U[Me]);
457
- if (R && R.defaultProps) {
458
- var Ve = R.defaultProps;
457
+ if (T && T.defaultProps) {
458
+ var Ve = T.defaultProps;
459
459
  for (Me in Ve)
460
460
  Ee[Me] === void 0 && (Ee[Me] = Ve[Me]);
461
461
  }
462
- if (Te || ut) {
463
- var Xe = typeof R == "function" ? R.displayName || R.name || "Unknown" : R;
464
- Te && J(Ee, Xe), ut && ce(Ee, Xe);
462
+ if (Te || dt) {
463
+ var Xe = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
+ Te && J(Ee, Xe), dt && ce(Ee, Xe);
465
465
  }
466
- return _e(R, Te, ut, Ae, ge, Ye.current, Ee);
466
+ return _e(T, Te, dt, Ae, ge, Ye.current, Ee);
467
467
  }
468
468
  }
469
469
  var Mn = v.ReactCurrentOwner, Dn = v.ReactDebugCurrentFrame;
470
- function Pt(R) {
471
- if (R) {
472
- var U = R._owner, te = Oe(R.type, R._source, U ? U.type : null);
470
+ function Pt(T) {
471
+ if (T) {
472
+ var U = T._owner, te = Oe(T.type, T._source, U ? U.type : null);
473
473
  Dn.setExtraStackFrame(te);
474
474
  } else
475
475
  Dn.setExtraStackFrame(null);
476
476
  }
477
477
  var Cs;
478
478
  Cs = !1;
479
- function Ts(R) {
480
- return typeof R == "object" && R !== null && R.$$typeof === t;
479
+ function Ts(T) {
480
+ return typeof T == "object" && T !== null && T.$$typeof === t;
481
481
  }
482
482
  function Da() {
483
483
  {
484
484
  if (Mn.current) {
485
- var R = G(Mn.current.type);
486
- if (R)
485
+ var T = G(Mn.current.type);
486
+ if (T)
487
487
  return `
488
488
 
489
- Check the render method of \`` + R + "`.";
489
+ Check the render method of \`` + T + "`.";
490
490
  }
491
491
  return "";
492
492
  }
493
493
  }
494
- function Np(R) {
494
+ function Np(T) {
495
495
  return "";
496
496
  }
497
497
  var La = {};
498
- function jp(R) {
498
+ function jp(T) {
499
499
  {
500
500
  var U = Da();
501
501
  if (!U) {
502
- var te = typeof R == "string" ? R : R.displayName || R.name;
502
+ var te = typeof T == "string" ? T : T.displayName || T.name;
503
503
  te && (U = `
504
504
 
505
505
  Check the top-level render call using <` + te + ">.");
@@ -507,41 +507,41 @@ Check the top-level render call using <` + te + ">.");
507
507
  return U;
508
508
  }
509
509
  }
510
- function Fa(R, U) {
510
+ function Fa(T, U) {
511
511
  {
512
- if (!R._store || R._store.validated || R.key != null)
512
+ if (!T._store || T._store.validated || T.key != null)
513
513
  return;
514
- R._store.validated = !0;
514
+ T._store.validated = !0;
515
515
  var te = jp(U);
516
516
  if (La[te])
517
517
  return;
518
518
  La[te] = !0;
519
519
  var ge = "";
520
- R && R._owner && R._owner !== Mn.current && (ge = " It was passed a child from " + G(R._owner.type) + "."), Pt(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.', te, ge), Pt(null);
520
+ T && T._owner && T._owner !== Mn.current && (ge = " It was passed a child from " + G(T._owner.type) + "."), Pt(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', te, ge), Pt(null);
521
521
  }
522
522
  }
523
- function Ba(R, U) {
523
+ function Ba(T, U) {
524
524
  {
525
- if (typeof R != "object")
525
+ if (typeof T != "object")
526
526
  return;
527
- if (et(R))
528
- for (var te = 0; te < R.length; te++) {
529
- var ge = R[te];
527
+ if (et(T))
528
+ for (var te = 0; te < T.length; te++) {
529
+ var ge = T[te];
530
530
  Ts(ge) && Fa(ge, U);
531
531
  }
532
- else if (Ts(R))
533
- R._store && (R._store.validated = !0);
534
- else if (R) {
535
- var Ae = m(R);
536
- if (typeof Ae == "function" && Ae !== R.entries)
537
- for (var Me = Ae.call(R), Ee; !(Ee = Me.next()).done; )
532
+ else if (Ts(T))
533
+ T._store && (T._store.validated = !0);
534
+ else if (T) {
535
+ var Ae = m(T);
536
+ if (typeof Ae == "function" && Ae !== T.entries)
537
+ for (var Me = Ae.call(T), Ee; !(Ee = Me.next()).done; )
538
538
  Ts(Ee.value) && Fa(Ee.value, U);
539
539
  }
540
540
  }
541
541
  }
542
- function Ap(R) {
542
+ function Ap(T) {
543
543
  {
544
- var U = R.type;
544
+ var U = T.type;
545
545
  if (U == null || typeof U == "string")
546
546
  return;
547
547
  var te;
@@ -555,7 +555,7 @@ Check the top-level render call using <` + te + ">.");
555
555
  return;
556
556
  if (te) {
557
557
  var ge = G(U);
558
- ie(te, R.props, "prop", ge, R);
558
+ ie(te, T.props, "prop", ge, T);
559
559
  } else if (U.PropTypes !== void 0 && !Cs) {
560
560
  Cs = !0;
561
561
  var Ae = G(U);
@@ -564,30 +564,30 @@ Check the top-level render call using <` + te + ">.");
564
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.");
565
565
  }
566
566
  }
567
- function kp(R) {
567
+ function kp(T) {
568
568
  {
569
- for (var U = Object.keys(R.props), te = 0; te < U.length; te++) {
569
+ for (var U = Object.keys(T.props), te = 0; te < U.length; te++) {
570
570
  var ge = U[te];
571
571
  if (ge !== "children" && ge !== "key") {
572
- Pt(R), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ge), Pt(null);
572
+ Pt(T), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ge), Pt(null);
573
573
  break;
574
574
  }
575
575
  }
576
- R.ref !== null && (Pt(R), w("Invalid attribute `ref` supplied to `React.Fragment`."), Pt(null));
576
+ T.ref !== null && (Pt(T), w("Invalid attribute `ref` supplied to `React.Fragment`."), Pt(null));
577
577
  }
578
578
  }
579
- function Ha(R, U, te, ge, Ae, Me) {
579
+ function Ha(T, U, te, ge, Ae, Me) {
580
580
  {
581
- var Ee = k(R);
581
+ var Ee = k(T);
582
582
  if (!Ee) {
583
583
  var Te = "";
584
- (R === void 0 || typeof R == "object" && R !== null && Object.keys(R).length === 0) && (Te += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
585
- var ut = Np();
586
- ut ? Te += ut : Te += Da();
584
+ (T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (Te += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
585
+ var dt = Np();
586
+ dt ? Te += dt : Te += Da();
587
587
  var Ve;
588
- R === null ? Ve = "null" : et(R) ? Ve = "array" : R !== void 0 && R.$$typeof === t ? (Ve = "<" + (G(R.type) || "Unknown") + " />", Te = " Did you accidentally export a JSX literal instead of a component?") : Ve = 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", Ve, Te);
588
+ T === null ? Ve = "null" : et(T) ? Ve = "array" : T !== void 0 && T.$$typeof === t ? (Ve = "<" + (G(T.type) || "Unknown") + " />", Te = " Did you accidentally export a JSX literal instead of a component?") : Ve = typeof T, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ve, Te);
589
589
  }
590
- var Xe = qe(R, U, te, Ae, Me);
590
+ var Xe = qe(T, U, te, Ae, Me);
591
591
  if (Xe == null)
592
592
  return Xe;
593
593
  if (Ee) {
@@ -596,21 +596,21 @@ Check the top-level render call using <` + te + ">.");
596
596
  if (ge)
597
597
  if (et(St)) {
598
598
  for (var Ln = 0; Ln < St.length; Ln++)
599
- Ba(St[Ln], R);
599
+ Ba(St[Ln], T);
600
600
  Object.freeze && Object.freeze(St);
601
601
  } else
602
602
  w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
603
603
  else
604
- Ba(St, R);
604
+ Ba(St, T);
605
605
  }
606
- return R === r ? kp(Xe) : Ap(Xe), Xe;
606
+ return T === r ? kp(Xe) : Ap(Xe), Xe;
607
607
  }
608
608
  }
609
- function Pp(R, U, te) {
610
- return Ha(R, U, te, !0);
609
+ function Pp(T, U, te) {
610
+ return Ha(T, U, te, !0);
611
611
  }
612
- function _p(R, U, te) {
613
- return Ha(R, U, te, !1);
612
+ function _p(T, U, te) {
613
+ return Ha(T, U, te, !1);
614
614
  }
615
615
  var Op = _p, Mp = Pp;
616
616
  ur.Fragment = r, ur.jsx = Op, ur.jsxs = Mp;
@@ -796,7 +796,7 @@ const Km = (e) => {
796
796
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
797
797
  typeof setImmediate == "function",
798
798
  pt(bn.postMessage)
799
- ), Xm = typeof queueMicrotask < "u" ? queueMicrotask.bind(bn) : typeof process < "u" && process.nextTick || jc, Jm = (e) => e != null && pt(e[Bo]), j = {
799
+ ), Xm = typeof queueMicrotask < "u" ? queueMicrotask.bind(bn) : typeof process < "u" && process.nextTick || jc, Jm = (e) => e != null && pt(e[Bo]), A = {
800
800
  isArray: tr,
801
801
  isArrayBuffer: Tc,
802
802
  isBuffer: Pr,
@@ -859,7 +859,7 @@ const Km = (e) => {
859
859
  function we(e, t, n, r, o) {
860
860
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
861
861
  }
862
- j.inherits(we, Error, {
862
+ A.inherits(we, Error, {
863
863
  toJSON: function() {
864
864
  return {
865
865
  // Standard
@@ -874,7 +874,7 @@ j.inherits(we, Error, {
874
874
  columnNumber: this.columnNumber,
875
875
  stack: this.stack,
876
876
  // Axios
877
- config: j.toJSONObject(this.config),
877
+ config: A.toJSONObject(this.config),
878
878
  code: this.code,
879
879
  status: this.status
880
880
  };
@@ -902,7 +902,7 @@ Object.defineProperties(we, kc);
902
902
  Object.defineProperty(Ac, "isAxiosError", { value: !0 });
903
903
  we.from = (e, t, n, r, o, s) => {
904
904
  const i = Object.create(Ac);
905
- j.toFlatObject(e, i, function(d) {
905
+ A.toFlatObject(e, i, function(d) {
906
906
  return d !== Error.prototype;
907
907
  }, (u) => u !== "isAxiosError");
908
908
  const a = e && e.message ? e.message : "Error", c = t == null && e ? e.code : t;
@@ -910,10 +910,10 @@ we.from = (e, t, n, r, o, s) => {
910
910
  };
911
911
  const Zm = null;
912
912
  function Qs(e) {
913
- return j.isPlainObject(e) || j.isArray(e);
913
+ return A.isPlainObject(e) || A.isArray(e);
914
914
  }
915
915
  function Pc(e) {
916
- return j.endsWith(e, "[]") ? e.slice(0, -2) : e;
916
+ return A.endsWith(e, "[]") ? e.slice(0, -2) : e;
917
917
  }
918
918
  function Xa(e, t, n) {
919
919
  return e ? e.concat(t).map(function(o, s) {
@@ -921,44 +921,44 @@ function Xa(e, t, n) {
921
921
  }).join(n ? "." : "") : t;
922
922
  }
923
923
  function Qm(e) {
924
- return j.isArray(e) && !e.some(Qs);
924
+ return A.isArray(e) && !e.some(Qs);
925
925
  }
926
- const eg = j.toFlatObject(j, {}, null, function(t) {
926
+ const eg = A.toFlatObject(A, {}, null, function(t) {
927
927
  return /^is[A-Z]/.test(t);
928
928
  });
929
929
  function zo(e, t, n) {
930
- if (!j.isObject(e))
930
+ if (!A.isObject(e))
931
931
  throw new TypeError("target must be an object");
932
- t = t || new FormData(), n = j.toFlatObject(n, {
932
+ t = t || new FormData(), n = A.toFlatObject(n, {
933
933
  metaTokens: !0,
934
934
  dots: !1,
935
935
  indexes: !1
936
936
  }, !1, function(x, m) {
937
- return !j.isUndefined(m[x]);
937
+ return !A.isUndefined(m[x]);
938
938
  });
939
- const r = n.metaTokens, o = n.visitor || d, s = n.dots, i = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) && j.isSpecCompliantForm(t);
940
- if (!j.isFunction(o))
939
+ const r = n.metaTokens, o = n.visitor || d, s = n.dots, i = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) && A.isSpecCompliantForm(t);
940
+ if (!A.isFunction(o))
941
941
  throw new TypeError("visitor must be a function");
942
942
  function u(g) {
943
943
  if (g === null) return "";
944
- if (j.isDate(g))
944
+ if (A.isDate(g))
945
945
  return g.toISOString();
946
- if (j.isBoolean(g))
946
+ if (A.isBoolean(g))
947
947
  return g.toString();
948
- if (!c && j.isBlob(g))
948
+ if (!c && A.isBlob(g))
949
949
  throw new we("Blob is not supported. Use a Buffer instead.");
950
- return j.isArrayBuffer(g) || j.isTypedArray(g) ? c && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
950
+ return A.isArrayBuffer(g) || A.isTypedArray(g) ? c && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
951
951
  }
952
952
  function d(g, x, m) {
953
953
  let v = g;
954
954
  if (g && !m && typeof g == "object") {
955
- if (j.endsWith(x, "{}"))
955
+ if (A.endsWith(x, "{}"))
956
956
  x = r ? x : x.slice(0, -2), g = JSON.stringify(g);
957
- else if (j.isArray(g) && Qm(g) || (j.isFileList(g) || j.endsWith(x, "[]")) && (v = j.toArray(g)))
958
- return x = Pc(x), v.forEach(function(y, C) {
959
- !(j.isUndefined(y) || y === null) && t.append(
957
+ else if (A.isArray(g) && Qm(g) || (A.isFileList(g) || A.endsWith(x, "[]")) && (v = A.toArray(g)))
958
+ return x = Pc(x), v.forEach(function(y, E) {
959
+ !(A.isUndefined(y) || y === null) && t.append(
960
960
  // eslint-disable-next-line no-nested-ternary
961
- i === !0 ? Xa([x], C, s) : i === null ? x : x + "[]",
961
+ i === !0 ? Xa([x], E, s) : i === null ? x : x + "[]",
962
962
  u(y)
963
963
  );
964
964
  }), !1;
@@ -971,21 +971,21 @@ function zo(e, t, n) {
971
971
  isVisitable: Qs
972
972
  });
973
973
  function b(g, x) {
974
- if (!j.isUndefined(g)) {
974
+ if (!A.isUndefined(g)) {
975
975
  if (h.indexOf(g) !== -1)
976
976
  throw Error("Circular reference detected in " + x.join("."));
977
- h.push(g), j.forEach(g, function(v, w) {
978
- (!(j.isUndefined(v) || v === null) && o.call(
977
+ h.push(g), A.forEach(g, function(v, w) {
978
+ (!(A.isUndefined(v) || v === null) && o.call(
979
979
  t,
980
980
  v,
981
- j.isString(w) ? w.trim() : w,
981
+ A.isString(w) ? w.trim() : w,
982
982
  x,
983
983
  p
984
984
  )) === !0 && b(v, x ? x.concat(w) : [w]);
985
985
  }), h.pop();
986
986
  }
987
987
  }
988
- if (!j.isObject(e))
988
+ if (!A.isObject(e))
989
989
  throw new TypeError("data must be an object");
990
990
  return b(e), t;
991
991
  }
@@ -1025,12 +1025,12 @@ function Oc(e, t, n) {
1025
1025
  if (!t)
1026
1026
  return e;
1027
1027
  const r = n && n.encode || tg;
1028
- j.isFunction(n) && (n = {
1028
+ A.isFunction(n) && (n = {
1029
1029
  serialize: n
1030
1030
  });
1031
1031
  const o = n && n.serialize;
1032
1032
  let s;
1033
- if (o ? s = o(t, n) : s = j.isURLSearchParams(t) ? t.toString() : new Di(t, n).toString(r), s) {
1033
+ if (o ? s = o(t, n) : s = A.isURLSearchParams(t) ? t.toString() : new Di(t, n).toString(r), s) {
1034
1034
  const i = e.indexOf("#");
1035
1035
  i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
1036
1036
  }
@@ -1085,7 +1085,7 @@ class Za {
1085
1085
  * @returns {void}
1086
1086
  */
1087
1087
  forEach(t) {
1088
- j.forEach(this.handlers, function(r) {
1088
+ A.forEach(this.handlers, function(r) {
1089
1089
  r !== null && t(r);
1090
1090
  });
1091
1091
  }
@@ -1110,20 +1110,20 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", lg
1110
1110
  hasStandardBrowserWebWorkerEnv: ag,
1111
1111
  navigator: ei,
1112
1112
  origin: lg
1113
- }, Symbol.toStringTag, { value: "Module" })), at = {
1113
+ }, Symbol.toStringTag, { value: "Module" })), lt = {
1114
1114
  ...cg,
1115
1115
  ...sg
1116
1116
  };
1117
1117
  function ug(e, t) {
1118
- return zo(e, new at.classes.URLSearchParams(), {
1118
+ return zo(e, new lt.classes.URLSearchParams(), {
1119
1119
  visitor: function(n, r, o, s) {
1120
- return at.isNode && j.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1120
+ return lt.isNode && A.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1121
1121
  },
1122
1122
  ...t
1123
1123
  });
1124
1124
  }
1125
1125
  function dg(e) {
1126
- return j.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1126
+ return A.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1127
1127
  }
1128
1128
  function fg(e) {
1129
1129
  const t = {}, n = Object.keys(e);
@@ -1139,20 +1139,20 @@ function Dc(e) {
1139
1139
  let i = n[s++];
1140
1140
  if (i === "__proto__") return !0;
1141
1141
  const a = Number.isFinite(+i), c = s >= n.length;
1142
- return i = !i && j.isArray(o) ? o.length : i, c ? (j.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !j.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && j.isArray(o[i]) && (o[i] = fg(o[i])), !a);
1142
+ return i = !i && A.isArray(o) ? o.length : i, c ? (A.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !A.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && A.isArray(o[i]) && (o[i] = fg(o[i])), !a);
1143
1143
  }
1144
- if (j.isFormData(e) && j.isFunction(e.entries)) {
1144
+ if (A.isFormData(e) && A.isFunction(e.entries)) {
1145
1145
  const n = {};
1146
- return j.forEachEntry(e, (r, o) => {
1146
+ return A.forEachEntry(e, (r, o) => {
1147
1147
  t(dg(r), o, n, 0);
1148
1148
  }), n;
1149
1149
  }
1150
1150
  return null;
1151
1151
  }
1152
1152
  function hg(e, t, n) {
1153
- if (j.isString(e))
1153
+ if (A.isString(e))
1154
1154
  try {
1155
- return (t || JSON.parse)(e), j.trim(e);
1155
+ return (t || JSON.parse)(e), A.trim(e);
1156
1156
  } catch (r) {
1157
1157
  if (r.name !== "SyntaxError")
1158
1158
  throw r;
@@ -1163,20 +1163,20 @@ const Mr = {
1163
1163
  transitional: Mc,
1164
1164
  adapter: ["xhr", "http", "fetch"],
1165
1165
  transformRequest: [function(t, n) {
1166
- const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = j.isObject(t);
1167
- if (s && j.isHTMLForm(t) && (t = new FormData(t)), j.isFormData(t))
1166
+ const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = A.isObject(t);
1167
+ if (s && A.isHTMLForm(t) && (t = new FormData(t)), A.isFormData(t))
1168
1168
  return o ? JSON.stringify(Dc(t)) : t;
1169
- if (j.isArrayBuffer(t) || j.isBuffer(t) || j.isStream(t) || j.isFile(t) || j.isBlob(t) || j.isReadableStream(t))
1169
+ if (A.isArrayBuffer(t) || A.isBuffer(t) || A.isStream(t) || A.isFile(t) || A.isBlob(t) || A.isReadableStream(t))
1170
1170
  return t;
1171
- if (j.isArrayBufferView(t))
1171
+ if (A.isArrayBufferView(t))
1172
1172
  return t.buffer;
1173
- if (j.isURLSearchParams(t))
1173
+ if (A.isURLSearchParams(t))
1174
1174
  return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1175
1175
  let a;
1176
1176
  if (s) {
1177
1177
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
1178
1178
  return ug(t, this.formSerializer).toString();
1179
- if ((a = j.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1179
+ if ((a = A.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1180
1180
  const c = this.env && this.env.FormData;
1181
1181
  return zo(
1182
1182
  a ? { "files[]": t } : t,
@@ -1189,9 +1189,9 @@ const Mr = {
1189
1189
  }],
1190
1190
  transformResponse: [function(t) {
1191
1191
  const n = this.transitional || Mr.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1192
- if (j.isResponse(t) || j.isReadableStream(t))
1192
+ if (A.isResponse(t) || A.isReadableStream(t))
1193
1193
  return t;
1194
- if (t && j.isString(t) && (r && !this.responseType || o)) {
1194
+ if (t && A.isString(t) && (r && !this.responseType || o)) {
1195
1195
  const i = !(n && n.silentJSONParsing) && o;
1196
1196
  try {
1197
1197
  return JSON.parse(t, this.parseReviver);
@@ -1212,8 +1212,8 @@ const Mr = {
1212
1212
  maxContentLength: -1,
1213
1213
  maxBodyLength: -1,
1214
1214
  env: {
1215
- FormData: at.classes.FormData,
1216
- Blob: at.classes.Blob
1215
+ FormData: lt.classes.FormData,
1216
+ Blob: lt.classes.Blob
1217
1217
  },
1218
1218
  validateStatus: function(t) {
1219
1219
  return t >= 200 && t < 300;
@@ -1225,10 +1225,10 @@ const Mr = {
1225
1225
  }
1226
1226
  }
1227
1227
  };
1228
- j.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1228
+ A.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1229
1229
  Mr.headers[e] = {};
1230
1230
  });
1231
- const pg = j.toObjectSet([
1231
+ const pg = A.toObjectSet([
1232
1232
  "age",
1233
1233
  "authorization",
1234
1234
  "content-length",
@@ -1258,7 +1258,7 @@ function dr(e) {
1258
1258
  return e && String(e).trim().toLowerCase();
1259
1259
  }
1260
1260
  function ro(e) {
1261
- return e === !1 || e == null ? e : j.isArray(e) ? e.map(ro) : String(e);
1261
+ return e === !1 || e == null ? e : A.isArray(e) ? e.map(ro) : String(e);
1262
1262
  }
1263
1263
  function gg(e) {
1264
1264
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -1269,12 +1269,12 @@ function gg(e) {
1269
1269
  }
1270
1270
  const xg = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1271
1271
  function Rs(e, t, n, r, o) {
1272
- if (j.isFunction(r))
1272
+ if (A.isFunction(r))
1273
1273
  return r.call(this, t, n);
1274
- if (o && (t = n), !!j.isString(t)) {
1275
- if (j.isString(r))
1274
+ if (o && (t = n), !!A.isString(t)) {
1275
+ if (A.isString(r))
1276
1276
  return t.indexOf(r) !== -1;
1277
- if (j.isRegExp(r))
1277
+ if (A.isRegExp(r))
1278
1278
  return r.test(t);
1279
1279
  }
1280
1280
  }
@@ -1282,7 +1282,7 @@ function vg(e) {
1282
1282
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
1283
1283
  }
1284
1284
  function bg(e, t) {
1285
- const n = j.toCamelCase(" " + t);
1285
+ const n = A.toCamelCase(" " + t);
1286
1286
  ["get", "set", "has"].forEach((r) => {
1287
1287
  Object.defineProperty(e, r + n, {
1288
1288
  value: function(o, s, i) {
@@ -1302,20 +1302,20 @@ let mt = class {
1302
1302
  const d = dr(c);
1303
1303
  if (!d)
1304
1304
  throw new Error("header name must be a non-empty string");
1305
- const h = j.findKey(o, d);
1305
+ const h = A.findKey(o, d);
1306
1306
  (!h || o[h] === void 0 || u === !0 || u === void 0 && o[h] !== !1) && (o[h || c] = ro(a));
1307
1307
  }
1308
- const i = (a, c) => j.forEach(a, (u, d) => s(u, d, c));
1309
- if (j.isPlainObject(t) || t instanceof this.constructor)
1308
+ const i = (a, c) => A.forEach(a, (u, d) => s(u, d, c));
1309
+ if (A.isPlainObject(t) || t instanceof this.constructor)
1310
1310
  i(t, n);
1311
- else if (j.isString(t) && (t = t.trim()) && !xg(t))
1311
+ else if (A.isString(t) && (t = t.trim()) && !xg(t))
1312
1312
  i(mg(t), n);
1313
- else if (j.isObject(t) && j.isIterable(t)) {
1313
+ else if (A.isObject(t) && A.isIterable(t)) {
1314
1314
  let a = {}, c, u;
1315
1315
  for (const d of t) {
1316
- if (!j.isArray(d))
1316
+ if (!A.isArray(d))
1317
1317
  throw TypeError("Object iterator must return a key-value pair");
1318
- a[u = d[0]] = (c = a[u]) ? j.isArray(c) ? [...c, d[1]] : [c, d[1]] : d[1];
1318
+ a[u = d[0]] = (c = a[u]) ? A.isArray(c) ? [...c, d[1]] : [c, d[1]] : d[1];
1319
1319
  }
1320
1320
  i(a, n);
1321
1321
  } else
@@ -1324,16 +1324,16 @@ let mt = class {
1324
1324
  }
1325
1325
  get(t, n) {
1326
1326
  if (t = dr(t), t) {
1327
- const r = j.findKey(this, t);
1327
+ const r = A.findKey(this, t);
1328
1328
  if (r) {
1329
1329
  const o = this[r];
1330
1330
  if (!n)
1331
1331
  return o;
1332
1332
  if (n === !0)
1333
1333
  return gg(o);
1334
- if (j.isFunction(n))
1334
+ if (A.isFunction(n))
1335
1335
  return n.call(this, o, r);
1336
- if (j.isRegExp(n))
1336
+ if (A.isRegExp(n))
1337
1337
  return n.exec(o);
1338
1338
  throw new TypeError("parser must be boolean|regexp|function");
1339
1339
  }
@@ -1341,7 +1341,7 @@ let mt = class {
1341
1341
  }
1342
1342
  has(t, n) {
1343
1343
  if (t = dr(t), t) {
1344
- const r = j.findKey(this, t);
1344
+ const r = A.findKey(this, t);
1345
1345
  return !!(r && this[r] !== void 0 && (!n || Rs(this, this[r], r, n)));
1346
1346
  }
1347
1347
  return !1;
@@ -1351,11 +1351,11 @@ let mt = class {
1351
1351
  let o = !1;
1352
1352
  function s(i) {
1353
1353
  if (i = dr(i), i) {
1354
- const a = j.findKey(r, i);
1354
+ const a = A.findKey(r, i);
1355
1355
  a && (!n || Rs(r, r[a], a, n)) && (delete r[a], o = !0);
1356
1356
  }
1357
1357
  }
1358
- return j.isArray(t) ? t.forEach(s) : s(t), o;
1358
+ return A.isArray(t) ? t.forEach(s) : s(t), o;
1359
1359
  }
1360
1360
  clear(t) {
1361
1361
  const n = Object.keys(this);
@@ -1368,8 +1368,8 @@ let mt = class {
1368
1368
  }
1369
1369
  normalize(t) {
1370
1370
  const n = this, r = {};
1371
- return j.forEach(this, (o, s) => {
1372
- const i = j.findKey(r, s);
1371
+ return A.forEach(this, (o, s) => {
1372
+ const i = A.findKey(r, s);
1373
1373
  if (i) {
1374
1374
  n[i] = ro(o), delete n[s];
1375
1375
  return;
@@ -1383,8 +1383,8 @@ let mt = class {
1383
1383
  }
1384
1384
  toJSON(t) {
1385
1385
  const n = /* @__PURE__ */ Object.create(null);
1386
- return j.forEach(this, (r, o) => {
1387
- r != null && r !== !1 && (n[o] = t && j.isArray(r) ? r.join(", ") : r);
1386
+ return A.forEach(this, (r, o) => {
1387
+ r != null && r !== !1 && (n[o] = t && A.isArray(r) ? r.join(", ") : r);
1388
1388
  }), n;
1389
1389
  }
1390
1390
  [Symbol.iterator]() {
@@ -1415,11 +1415,11 @@ let mt = class {
1415
1415
  const a = dr(i);
1416
1416
  r[a] || (bg(o, i), r[a] = !0);
1417
1417
  }
1418
- return j.isArray(t) ? t.forEach(s) : s(t), this;
1418
+ return A.isArray(t) ? t.forEach(s) : s(t), this;
1419
1419
  }
1420
1420
  };
1421
1421
  mt.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1422
- j.reduceDescriptors(mt.prototype, ({ value: e }, t) => {
1422
+ A.reduceDescriptors(mt.prototype, ({ value: e }, t) => {
1423
1423
  let n = t[0].toUpperCase() + t.slice(1);
1424
1424
  return {
1425
1425
  get: () => e,
@@ -1428,11 +1428,11 @@ j.reduceDescriptors(mt.prototype, ({ value: e }, t) => {
1428
1428
  }
1429
1429
  };
1430
1430
  });
1431
- j.freezeMethods(mt);
1431
+ A.freezeMethods(mt);
1432
1432
  function Es(e, t) {
1433
1433
  const n = this || Mr, r = t || n, o = mt.from(r.headers);
1434
1434
  let s = r.data;
1435
- return j.forEach(e, function(a) {
1435
+ return A.forEach(e, function(a) {
1436
1436
  s = a.call(n, s, o.normalize(), t ? t.status : void 0);
1437
1437
  }), o.normalize(), s;
1438
1438
  }
@@ -1442,7 +1442,7 @@ function Lc(e) {
1442
1442
  function nr(e, t, n) {
1443
1443
  we.call(this, e ?? "canceled", we.ERR_CANCELED, t, n), this.name = "CanceledError";
1444
1444
  }
1445
- j.inherits(nr, we, {
1445
+ A.inherits(nr, we, {
1446
1446
  __CANCEL__: !0
1447
1447
  });
1448
1448
  function Fc(e, t, n) {
@@ -1513,15 +1513,15 @@ const yo = (e, t, n = 3) => {
1513
1513
  total: e,
1514
1514
  loaded: r
1515
1515
  }), t[1]];
1516
- }, tl = (e) => (...t) => j.asap(() => e(...t)), Cg = at.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, at.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1517
- new URL(at.origin),
1518
- at.navigator && /(msie|trident)/i.test(at.navigator.userAgent)
1519
- ) : () => !0, Tg = at.hasStandardBrowserEnv ? (
1516
+ }, tl = (e) => (...t) => A.asap(() => e(...t)), Cg = lt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, lt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1517
+ new URL(lt.origin),
1518
+ lt.navigator && /(msie|trident)/i.test(lt.navigator.userAgent)
1519
+ ) : () => !0, Tg = lt.hasStandardBrowserEnv ? (
1520
1520
  // Standard browser envs support document.cookie
1521
1521
  {
1522
1522
  write(e, t, n, r, o, s) {
1523
1523
  const i = [e + "=" + encodeURIComponent(t)];
1524
- j.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), j.isString(r) && i.push("path=" + r), j.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
1524
+ A.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), A.isString(r) && i.push("path=" + r), A.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
1525
1525
  },
1526
1526
  read(e) {
1527
1527
  const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
@@ -1558,21 +1558,21 @@ function Cn(e, t) {
1558
1558
  t = t || {};
1559
1559
  const n = {};
1560
1560
  function r(u, d, h, p) {
1561
- return j.isPlainObject(u) && j.isPlainObject(d) ? j.merge.call({ caseless: p }, u, d) : j.isPlainObject(d) ? j.merge({}, d) : j.isArray(d) ? d.slice() : d;
1561
+ return A.isPlainObject(u) && A.isPlainObject(d) ? A.merge.call({ caseless: p }, u, d) : A.isPlainObject(d) ? A.merge({}, d) : A.isArray(d) ? d.slice() : d;
1562
1562
  }
1563
1563
  function o(u, d, h, p) {
1564
- if (j.isUndefined(d)) {
1565
- if (!j.isUndefined(u))
1564
+ if (A.isUndefined(d)) {
1565
+ if (!A.isUndefined(u))
1566
1566
  return r(void 0, u, h, p);
1567
1567
  } else return r(u, d, h, p);
1568
1568
  }
1569
1569
  function s(u, d) {
1570
- if (!j.isUndefined(d))
1570
+ if (!A.isUndefined(d))
1571
1571
  return r(void 0, d);
1572
1572
  }
1573
1573
  function i(u, d) {
1574
- if (j.isUndefined(d)) {
1575
- if (!j.isUndefined(u))
1574
+ if (A.isUndefined(d)) {
1575
+ if (!A.isUndefined(u))
1576
1576
  return r(void 0, u);
1577
1577
  } else return r(void 0, d);
1578
1578
  }
@@ -1613,9 +1613,9 @@ function Cn(e, t) {
1613
1613
  validateStatus: a,
1614
1614
  headers: (u, d, h) => o(nl(u), nl(d), h, !0)
1615
1615
  };
1616
- return j.forEach(Object.keys({ ...e, ...t }), function(d) {
1616
+ return A.forEach(Object.keys({ ...e, ...t }), function(d) {
1617
1617
  const h = c[d] || o, p = h(e[d], t[d], d);
1618
- j.isUndefined(p) && h !== a || (n[d] = p);
1618
+ A.isUndefined(p) && h !== a || (n[d] = p);
1619
1619
  }), n;
1620
1620
  }
1621
1621
  const Hc = (e) => {
@@ -1624,17 +1624,17 @@ const Hc = (e) => {
1624
1624
  if (t.headers = i = mt.from(i), t.url = Oc(Bc(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
1625
1625
  "Authorization",
1626
1626
  "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1627
- ), j.isFormData(n)) {
1628
- if (at.hasStandardBrowserEnv || at.hasStandardBrowserWebWorkerEnv)
1627
+ ), A.isFormData(n)) {
1628
+ if (lt.hasStandardBrowserEnv || lt.hasStandardBrowserWebWorkerEnv)
1629
1629
  i.setContentType(void 0);
1630
- else if (j.isFunction(n.getHeaders)) {
1630
+ else if (A.isFunction(n.getHeaders)) {
1631
1631
  const c = n.getHeaders(), u = ["content-type", "content-length"];
1632
1632
  Object.entries(c).forEach(([d, h]) => {
1633
1633
  u.includes(d.toLowerCase()) && i.set(d, h);
1634
1634
  });
1635
1635
  }
1636
1636
  }
1637
- if (at.hasStandardBrowserEnv && (r && j.isFunction(r) && (r = r(t)), r || r !== !1 && Cg(t.url))) {
1637
+ if (lt.hasStandardBrowserEnv && (r && A.isFunction(r) && (r = r(t)), r || r !== !1 && Cg(t.url))) {
1638
1638
  const c = o && s && Tg.read(s);
1639
1639
  c && i.set(o, c);
1640
1640
  }
@@ -1663,35 +1663,35 @@ const Hc = (e) => {
1663
1663
  config: e,
1664
1664
  request: m
1665
1665
  };
1666
- Fc(function(E) {
1667
- n(E), x();
1668
- }, function(E) {
1669
- r(E), x();
1666
+ Fc(function(R) {
1667
+ n(R), x();
1668
+ }, function(R) {
1669
+ r(R), x();
1670
1670
  }, S), m = null;
1671
1671
  }
1672
1672
  "onloadend" in m ? m.onloadend = v : m.onreadystatechange = function() {
1673
1673
  !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(v);
1674
1674
  }, m.onabort = function() {
1675
1675
  m && (r(new we("Request aborted", we.ECONNABORTED, e, m)), m = null);
1676
- }, m.onerror = function(C) {
1677
- const S = C && C.message ? C.message : "Network Error", T = new we(S, we.ERR_NETWORK, e, m);
1678
- T.event = C || null, r(T), m = null;
1676
+ }, m.onerror = function(E) {
1677
+ const S = E && E.message ? E.message : "Network Error", C = new we(S, we.ERR_NETWORK, e, m);
1678
+ C.event = E || null, r(C), m = null;
1679
1679
  }, m.ontimeout = function() {
1680
- let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1680
+ let E = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1681
1681
  const S = o.transitional || Mc;
1682
- o.timeoutErrorMessage && (C = o.timeoutErrorMessage), r(new we(
1683
- C,
1682
+ o.timeoutErrorMessage && (E = o.timeoutErrorMessage), r(new we(
1683
+ E,
1684
1684
  S.clarifyTimeoutError ? we.ETIMEDOUT : we.ECONNABORTED,
1685
1685
  e,
1686
1686
  m
1687
1687
  )), m = null;
1688
- }, s === void 0 && i.setContentType(null), "setRequestHeader" in m && j.forEach(i.toJSON(), function(C, S) {
1689
- m.setRequestHeader(S, C);
1690
- }), j.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), a && a !== "json" && (m.responseType = o.responseType), u && ([p, g] = yo(u, !0), m.addEventListener("progress", p)), c && m.upload && ([h, b] = yo(c), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", b)), (o.cancelToken || o.signal) && (d = (y) => {
1688
+ }, s === void 0 && i.setContentType(null), "setRequestHeader" in m && A.forEach(i.toJSON(), function(E, S) {
1689
+ m.setRequestHeader(S, E);
1690
+ }), A.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), a && a !== "json" && (m.responseType = o.responseType), u && ([p, g] = yo(u, !0), m.addEventListener("progress", p)), c && m.upload && ([h, b] = yo(c), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", b)), (o.cancelToken || o.signal) && (d = (y) => {
1691
1691
  m && (r(!y || y.type ? new nr(null, e, m) : y), m.abort(), m = null);
1692
1692
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
1693
1693
  const w = wg(o.url);
1694
- if (w && at.protocols.indexOf(w) === -1) {
1694
+ if (w && lt.protocols.indexOf(w) === -1) {
1695
1695
  r(new we("Unsupported protocol " + w + ":", we.ERR_BAD_REQUEST, e));
1696
1696
  return;
1697
1697
  }
@@ -1718,7 +1718,7 @@ const Hc = (e) => {
1718
1718
  };
1719
1719
  e.forEach((u) => u.addEventListener("abort", s));
1720
1720
  const { signal: c } = r;
1721
- return c.unsubscribe = () => j.asap(a), c;
1721
+ return c.unsubscribe = () => A.asap(a), c;
1722
1722
  }
1723
1723
  }, Ag = function* (e, t) {
1724
1724
  let n = e.byteLength;
@@ -1777,20 +1777,20 @@ const Hc = (e) => {
1777
1777
  }, {
1778
1778
  highWaterMark: 2
1779
1779
  });
1780
- }, ol = 64 * 1024, { isFunction: Wr } = j, _g = (({ Request: e, Response: t }) => ({
1780
+ }, ol = 64 * 1024, { isFunction: Wr } = A, _g = (({ Request: e, Response: t }) => ({
1781
1781
  Request: e,
1782
1782
  Response: t
1783
- }))(j.global), {
1783
+ }))(A.global), {
1784
1784
  ReadableStream: sl,
1785
1785
  TextEncoder: il
1786
- } = j.global, al = (e, ...t) => {
1786
+ } = A.global, al = (e, ...t) => {
1787
1787
  try {
1788
1788
  return !!e(...t);
1789
1789
  } catch {
1790
1790
  return !1;
1791
1791
  }
1792
1792
  }, Og = (e) => {
1793
- e = j.merge.call({
1793
+ e = A.merge.call({
1794
1794
  skipUndefined: !0
1795
1795
  }, _g, e);
1796
1796
  const { fetch: t, Request: n, Response: r } = e, o = t ? Wr(t) : typeof fetch == "function", s = Wr(n), i = Wr(r);
@@ -1798,7 +1798,7 @@ const Hc = (e) => {
1798
1798
  return !1;
1799
1799
  const a = o && Wr(sl), c = o && (typeof il == "function" ? /* @__PURE__ */ ((g) => (x) => g.encode(x))(new il()) : async (g) => new Uint8Array(await new n(g).arrayBuffer())), u = s && a && al(() => {
1800
1800
  let g = !1;
1801
- const x = new n(at.origin, {
1801
+ const x = new n(lt.origin, {
1802
1802
  body: new sl(),
1803
1803
  method: "POST",
1804
1804
  get duplex() {
@@ -1806,7 +1806,7 @@ const Hc = (e) => {
1806
1806
  }
1807
1807
  }).headers.has("Content-Type");
1808
1808
  return g && !x;
1809
- }), d = i && a && al(() => j.isReadableStream(new r("").body)), h = {
1809
+ }), d = i && a && al(() => A.isReadableStream(new r("").body)), h = {
1810
1810
  stream: d && ((g) => g.body)
1811
1811
  };
1812
1812
  o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((g) => {
@@ -1820,19 +1820,19 @@ const Hc = (e) => {
1820
1820
  const p = async (g) => {
1821
1821
  if (g == null)
1822
1822
  return 0;
1823
- if (j.isBlob(g))
1823
+ if (A.isBlob(g))
1824
1824
  return g.size;
1825
- if (j.isSpecCompliantForm(g))
1826
- return (await new n(at.origin, {
1825
+ if (A.isSpecCompliantForm(g))
1826
+ return (await new n(lt.origin, {
1827
1827
  method: "POST",
1828
1828
  body: g
1829
1829
  }).arrayBuffer()).byteLength;
1830
- if (j.isArrayBufferView(g) || j.isArrayBuffer(g))
1830
+ if (A.isArrayBufferView(g) || A.isArrayBuffer(g))
1831
1831
  return g.byteLength;
1832
- if (j.isURLSearchParams(g) && (g = g + ""), j.isString(g))
1832
+ if (A.isURLSearchParams(g) && (g = g + ""), A.isString(g))
1833
1833
  return (await c(g)).byteLength;
1834
1834
  }, b = async (g, x) => {
1835
- const m = j.toFiniteNumber(g.getContentLength());
1835
+ const m = A.toFiniteNumber(g.getContentLength());
1836
1836
  return m ?? p(x);
1837
1837
  };
1838
1838
  return async (g) => {
@@ -1842,36 +1842,36 @@ const Hc = (e) => {
1842
1842
  data: v,
1843
1843
  signal: w,
1844
1844
  cancelToken: y,
1845
- timeout: C,
1845
+ timeout: E,
1846
1846
  onDownloadProgress: S,
1847
- onUploadProgress: T,
1848
- responseType: E,
1847
+ onUploadProgress: C,
1848
+ responseType: R,
1849
1849
  headers: I,
1850
- withCredentials: A = "same-origin",
1850
+ withCredentials: N = "same-origin",
1851
1851
  fetchOptions: k
1852
1852
  } = Hc(g), M = t || fetch;
1853
- E = E ? (E + "").toLowerCase() : "text";
1854
- let W = jg([w, y && y.toAbortSignal()], C), G = null;
1855
- const N = W && W.unsubscribe && (() => {
1853
+ R = R ? (R + "").toLowerCase() : "text";
1854
+ let W = jg([w, y && y.toAbortSignal()], E), G = null;
1855
+ const j = W && W.unsubscribe && (() => {
1856
1856
  W.unsubscribe();
1857
1857
  });
1858
1858
  let H;
1859
1859
  try {
1860
- if (T && u && m !== "get" && m !== "head" && (H = await b(I, v)) !== 0) {
1860
+ if (C && u && m !== "get" && m !== "head" && (H = await b(I, v)) !== 0) {
1861
1861
  let X = new n(x, {
1862
1862
  method: "POST",
1863
1863
  body: v,
1864
1864
  duplex: "half"
1865
1865
  }), oe;
1866
- if (j.isFormData(v) && (oe = X.headers.get("content-type")) && I.setContentType(oe), X.body) {
1866
+ if (A.isFormData(v) && (oe = X.headers.get("content-type")) && I.setContentType(oe), X.body) {
1867
1867
  const [F, ee] = el(
1868
1868
  H,
1869
- yo(tl(T))
1869
+ yo(tl(C))
1870
1870
  );
1871
1871
  v = rl(X.body, ol, F, ee);
1872
1872
  }
1873
1873
  }
1874
- j.isString(A) || (A = A ? "include" : "omit");
1874
+ A.isString(N) || (N = N ? "include" : "omit");
1875
1875
  const L = s && "credentials" in n.prototype, q = {
1876
1876
  ...k,
1877
1877
  signal: W,
@@ -1879,30 +1879,30 @@ const Hc = (e) => {
1879
1879
  headers: I.normalize().toJSON(),
1880
1880
  body: v,
1881
1881
  duplex: "half",
1882
- credentials: L ? A : void 0
1882
+ credentials: L ? N : void 0
1883
1883
  };
1884
1884
  G = s && new n(x, q);
1885
1885
  let O = await (s ? M(G, k) : M(x, q));
1886
- const _ = d && (E === "stream" || E === "response");
1887
- if (d && (S || _ && N)) {
1886
+ const _ = d && (R === "stream" || R === "response");
1887
+ if (d && (S || _ && j)) {
1888
1888
  const X = {};
1889
1889
  ["status", "statusText", "headers"].forEach((he) => {
1890
1890
  X[he] = O[he];
1891
1891
  });
1892
- const oe = j.toFiniteNumber(O.headers.get("content-length")), [F, ee] = S && el(
1892
+ const oe = A.toFiniteNumber(O.headers.get("content-length")), [F, ee] = S && el(
1893
1893
  oe,
1894
1894
  yo(tl(S), !0)
1895
1895
  ) || [];
1896
1896
  O = new r(
1897
1897
  rl(O.body, ol, F, () => {
1898
- ee && ee(), N && N();
1898
+ ee && ee(), j && j();
1899
1899
  }),
1900
1900
  X
1901
1901
  );
1902
1902
  }
1903
- E = E || "text";
1904
- let z = await h[j.findKey(h, E) || "text"](O, g);
1905
- return !_ && N && N(), await new Promise((X, oe) => {
1903
+ R = R || "text";
1904
+ let z = await h[A.findKey(h, R) || "text"](O, g);
1905
+ return !_ && j && j(), await new Promise((X, oe) => {
1906
1906
  Fc(X, oe, {
1907
1907
  data: z,
1908
1908
  headers: mt.from(O.headers),
@@ -1913,7 +1913,7 @@ const Hc = (e) => {
1913
1913
  });
1914
1914
  });
1915
1915
  } catch (L) {
1916
- throw N && N(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign(
1916
+ throw j && j(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign(
1917
1917
  new we("Network Error", we.ERR_NETWORK, g, G),
1918
1918
  {
1919
1919
  cause: L.cause || L
@@ -1941,7 +1941,7 @@ const ti = {
1941
1941
  get: $c
1942
1942
  }
1943
1943
  };
1944
- j.forEach(ti, (e, t) => {
1944
+ A.forEach(ti, (e, t) => {
1945
1945
  if (e) {
1946
1946
  try {
1947
1947
  Object.defineProperty(e, "name", { value: t });
@@ -1950,9 +1950,9 @@ j.forEach(ti, (e, t) => {
1950
1950
  Object.defineProperty(e, "adapterName", { value: t });
1951
1951
  }
1952
1952
  });
1953
- const ll = (e) => `- ${e}`, Dg = (e) => j.isFunction(e) || e === null || e === !1, zc = {
1953
+ const ll = (e) => `- ${e}`, Dg = (e) => A.isFunction(e) || e === null || e === !1, zc = {
1954
1954
  getAdapter: (e, t) => {
1955
- e = j.isArray(e) ? e : [e];
1955
+ e = A.isArray(e) ? e : [e];
1956
1956
  const { length: n } = e;
1957
1957
  let r, o;
1958
1958
  const s = {};
@@ -1961,7 +1961,7 @@ const ll = (e) => `- ${e}`, Dg = (e) => j.isFunction(e) || e === null || e === !
1961
1961
  let a;
1962
1962
  if (o = r, !Dg(r) && (o = ti[(a = String(r)).toLowerCase()], o === void 0))
1963
1963
  throw new we(`Unknown adapter '${a}'`);
1964
- if (o && (j.isFunction(o) || (o = o.get(t))))
1964
+ if (o && (A.isFunction(o) || (o = o.get(t))))
1965
1965
  break;
1966
1966
  s[a || "#" + i] = o;
1967
1967
  }
@@ -2091,7 +2091,7 @@ let yn = class {
2091
2091
  silentJSONParsing: Ut.transitional(Ut.boolean),
2092
2092
  forcedJSONParsing: Ut.transitional(Ut.boolean),
2093
2093
  clarifyTimeoutError: Ut.transitional(Ut.boolean)
2094
- }, !1), o != null && (j.isFunction(o) ? n.paramsSerializer = {
2094
+ }, !1), o != null && (A.isFunction(o) ? n.paramsSerializer = {
2095
2095
  serialize: o
2096
2096
  } : oo.assertOptions(o, {
2097
2097
  encode: Ut.function,
@@ -2100,11 +2100,11 @@ let yn = class {
2100
2100
  baseUrl: Ut.spelling("baseURL"),
2101
2101
  withXsrfToken: Ut.spelling("withXSRFToken")
2102
2102
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2103
- let i = s && j.merge(
2103
+ let i = s && A.merge(
2104
2104
  s.common,
2105
2105
  s[n.method]
2106
2106
  );
2107
- s && j.forEach(
2107
+ s && A.forEach(
2108
2108
  ["delete", "get", "head", "post", "put", "patch", "common"],
2109
2109
  (g) => {
2110
2110
  delete s[g];
@@ -2152,7 +2152,7 @@ let yn = class {
2152
2152
  return Oc(n, t.params, t.paramsSerializer);
2153
2153
  }
2154
2154
  };
2155
- j.forEach(["delete", "get", "head", "options"], function(t) {
2155
+ A.forEach(["delete", "get", "head", "options"], function(t) {
2156
2156
  yn.prototype[t] = function(n, r) {
2157
2157
  return this.request(Cn(r || {}, {
2158
2158
  method: t,
@@ -2161,7 +2161,7 @@ j.forEach(["delete", "get", "head", "options"], function(t) {
2161
2161
  }));
2162
2162
  };
2163
2163
  });
2164
- j.forEach(["post", "put", "patch"], function(t) {
2164
+ A.forEach(["post", "put", "patch"], function(t) {
2165
2165
  function n(r) {
2166
2166
  return function(s, i, a) {
2167
2167
  return this.request(Cn(a || {}, {
@@ -2255,7 +2255,7 @@ function Bg(e) {
2255
2255
  };
2256
2256
  }
2257
2257
  function Hg(e) {
2258
- return j.isObject(e) && e.isAxiosError === !0;
2258
+ return A.isObject(e) && e.isAxiosError === !0;
2259
2259
  }
2260
2260
  const ni = {
2261
2261
  Continue: 100,
@@ -2327,7 +2327,7 @@ Object.entries(ni).forEach(([e, t]) => {
2327
2327
  });
2328
2328
  function Vc(e) {
2329
2329
  const t = new yn(e), n = Sc(yn.prototype.request, t);
2330
- return j.extend(n, yn.prototype, t, { allOwnKeys: !0 }), j.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2330
+ return A.extend(n, yn.prototype, t, { allOwnKeys: !0 }), A.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2331
2331
  return Vc(Cn(e, o));
2332
2332
  }, n;
2333
2333
  }
@@ -2347,7 +2347,7 @@ Ke.spread = Bg;
2347
2347
  Ke.isAxiosError = Hg;
2348
2348
  Ke.mergeConfig = Cn;
2349
2349
  Ke.AxiosHeaders = mt;
2350
- Ke.formToJSON = (e) => Dc(j.isHTMLForm(e) ? new FormData(e) : e);
2350
+ Ke.formToJSON = (e) => Dc(A.isHTMLForm(e) ? new FormData(e) : e);
2351
2351
  Ke.getAdapter = zc.getAdapter;
2352
2352
  Ke.HttpStatusCode = ni;
2353
2353
  Ke.default = Ke;
@@ -2504,7 +2504,7 @@ class Gg {
2504
2504
  }
2505
2505
  const Tn = new Gg();
2506
2506
  function Kg(e = {}) {
2507
- const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s = dt(e.headers ?? {}), [i, a] = de(!1), [c, u] = de(null), [d, h] = de(""), [p, b] = de(null), g = dt(null), x = ze((y) => {
2507
+ const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s = at(e.headers ?? {}), [i, a] = de(!1), [c, u] = de(null), [d, h] = de(""), [p, b] = de(null), g = at(null), x = ze((y) => {
2508
2508
  o(y);
2509
2509
  }, []), m = ze(() => {
2510
2510
  var y;
@@ -2512,37 +2512,37 @@ function Kg(e = {}) {
2512
2512
  }, []), v = ze(() => {
2513
2513
  h(""), b(null), u(null);
2514
2514
  }, []), w = ze(
2515
- (y, C, S) => {
2515
+ (y, E, S) => {
2516
2516
  g.current && (g.current.abort(), g.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && h("");
2517
- const T = new AbortController();
2518
- return g.current = T, (async () => {
2519
- var A, k, M, W, G;
2520
- const E = (() => {
2521
- var N;
2517
+ const C = new AbortController();
2518
+ return g.current = C, (async () => {
2519
+ var N, k, M, W, G;
2520
+ const R = (() => {
2521
+ var j;
2522
2522
  try {
2523
- return typeof window < "u" && ((N = window.localStorage) == null ? void 0 : N.getItem("chat-debug")) === "1";
2523
+ return typeof window < "u" && ((j = window.localStorage) == null ? void 0 : j.getItem("chat-debug")) === "1";
2524
2524
  } catch {
2525
2525
  return !1;
2526
2526
  }
2527
- })(), I = (N) => {
2527
+ })(), I = (j) => {
2528
2528
  var H;
2529
2529
  try {
2530
- const L = JSON.parse(JSON.stringify(N));
2530
+ const L = JSON.parse(JSON.stringify(j));
2531
2531
  return (H = L == null ? void 0 : L.payload) != null && H.files_info && Array.isArray(L.payload.files_info) && (L.payload.files_info = L.payload.files_info.map((q) => ({
2532
2532
  ...q,
2533
2533
  data: q != null && q.data ? `<base64 ${String(q.data).length} chars>` : q == null ? void 0 : q.data
2534
2534
  }))), L;
2535
2535
  } catch {
2536
- return N;
2536
+ return j;
2537
2537
  }
2538
2538
  };
2539
2539
  try {
2540
- let N = {};
2540
+ let j = {};
2541
2541
  try {
2542
2542
  if (r)
2543
- N = { Authorization: `Bearer ${r}` };
2543
+ j = { Authorization: `Bearer ${r}` };
2544
2544
  else if (typeof window < "u") {
2545
- const z = window.__AUTH_TOKEN__, X = ((A = window.localStorage) == null ? void 0 : A.getItem("authToken")) || null;
2545
+ const z = window.__AUTH_TOKEN__, X = ((N = window.localStorage) == null ? void 0 : N.getItem("authToken")) || null;
2546
2546
  let oe = null;
2547
2547
  try {
2548
2548
  const ee = (k = window.localStorage) == null ? void 0 : k.getItem("chat-settings");
@@ -2550,35 +2550,35 @@ function Kg(e = {}) {
2550
2550
  } catch {
2551
2551
  }
2552
2552
  const F = z || X || oe || null;
2553
- F && (N = { Authorization: `Bearer ${F}` });
2553
+ F && (j = { Authorization: `Bearer ${F}` });
2554
2554
  }
2555
2555
  } catch {
2556
2556
  }
2557
- E && console.debug("[use-chat] POST", t + n, I(y));
2557
+ R && console.debug("[use-chat] POST", t + n, I(y));
2558
2558
  const H = await fetch(t + n, {
2559
2559
  method: "POST",
2560
2560
  headers: {
2561
2561
  "Content-Type": "application/json",
2562
2562
  Accept: "text/event-stream",
2563
- ...N,
2563
+ ...j,
2564
2564
  ...s.current
2565
2565
  },
2566
2566
  body: JSON.stringify(y),
2567
- signal: T.signal
2567
+ signal: C.signal
2568
2568
  });
2569
2569
  if (!H.ok || !H.body) {
2570
2570
  const _ = await H.text().catch(() => "");
2571
- throw E && console.debug("[use-chat] non-OK response", H.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${H.status}${_ ? ": " + _ : ""}`);
2571
+ throw R && console.debug("[use-chat] non-OK response", H.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${H.status}${_ ? ": " + _ : ""}`);
2572
2572
  }
2573
2573
  try {
2574
2574
  const _ = H.headers.get("X-Thread-Id") || H.headers.get("x-thread-id"), z = H.headers.get("X-Thread-Created") || H.headers.get("x-thread-created"), X = _ ?? null, oe = String(z ?? "").toLowerCase() === "true";
2575
2575
  try {
2576
2576
  (W = S == null ? void 0 : S.onOpen) == null || W.call(S, { threadId: X, created: oe });
2577
2577
  } catch (F) {
2578
- E && console.debug("[use-chat] onOpen handler threw:", F);
2578
+ R && console.debug("[use-chat] onOpen handler threw:", F);
2579
2579
  }
2580
2580
  } catch (_) {
2581
- E && console.debug("[use-chat] failed to read headers:", _);
2581
+ R && console.debug("[use-chat] failed to read headers:", _);
2582
2582
  }
2583
2583
  const L = H.body.getReader(), q = new TextDecoder();
2584
2584
  let O = "";
@@ -2598,11 +2598,11 @@ function Kg(e = {}) {
2598
2598
  try {
2599
2599
  ee = JSON.parse(F);
2600
2600
  } catch {
2601
- E && console.debug("[use-chat] skip malformed SSE data:", F == null ? void 0 : F.slice(0, 200));
2601
+ R && console.debug("[use-chat] skip malformed SSE data:", F == null ? void 0 : F.slice(0, 200));
2602
2602
  continue;
2603
2603
  }
2604
2604
  const he = Yg(ee) ? ee.data : ee;
2605
- if (E && console.debug("[use-chat] event:", he == null ? void 0 : he.type, he), C == null || C(he), he.type === "token")
2605
+ if (R && console.debug("[use-chat] event:", he == null ? void 0 : he.type, he), E == null || E(he), he.type === "token")
2606
2606
  e.autoAppendAssistant !== !1 && h((be) => be + he.content);
2607
2607
  else if (he.type === "message_delta") {
2608
2608
  const be = he.delta.filter((Y) => Y.type === "text").map((Y) => Y.text).join("");
@@ -2610,14 +2610,14 @@ function Kg(e = {}) {
2610
2610
  } else he.type === "checkpoint" ? b(he.checkpointId) : he.type === "error" && u(he.message);
2611
2611
  }
2612
2612
  }
2613
- } catch (N) {
2614
- if ((N == null ? void 0 : N.name) === "AbortError") return;
2615
- const H = (N == null ? void 0 : N.message) || String(N);
2616
- E && console.debug("[use-chat] error:", H), u(H), (G = S == null ? void 0 : S.onError) == null || G.call(S, H);
2613
+ } catch (j) {
2614
+ if ((j == null ? void 0 : j.name) === "AbortError") return;
2615
+ const H = (j == null ? void 0 : j.message) || String(j);
2616
+ R && console.debug("[use-chat] error:", H), u(H), (G = S == null ? void 0 : S.onError) == null || G.call(S, H);
2617
2617
  } finally {
2618
2618
  a(!1), g.current = null;
2619
2619
  }
2620
- })(), { close: () => T.abort() };
2620
+ })(), { close: () => C.abort() };
2621
2621
  },
2622
2622
  [t, r, e.autoAppendAssistant]
2623
2623
  );
@@ -2696,7 +2696,7 @@ function Jg(e, t) {
2696
2696
  }
2697
2697
  }
2698
2698
  function Zg(e = []) {
2699
- const [t, n] = Dp(Jg, { ...Xg, messages: e }), r = dt([]), o = dt(null), s = dt(null), i = ze(() => {
2699
+ const [t, n] = Dp(Jg, { ...Xg, messages: e }), r = at([]), o = at(null), s = at(null), i = ze(() => {
2700
2700
  o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
2701
2701
  const d = r.current;
2702
2702
  d.length && (r.current = [], n({ type: "batch", payload: { events: d } }));
@@ -2949,12 +2949,12 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2949
2949
  }, [u, g]);
2950
2950
  const v = ze(($) => {
2951
2951
  u.setAuthToken($);
2952
- }, [u]), { state: w, seed: y, prepend: C, pushUser: S, onEvent: T, reset: E } = Zg(), I = s && s > 0 ? s : 6, [A, k] = de(!1), [M, W] = de(!1), [G, N] = de(null), [H, L] = de(void 0), q = ze(
2952
+ }, [u]), { state: w, seed: y, prepend: E, pushUser: S, onEvent: C, reset: R } = Zg(), I = s && s > 0 ? s : 6, [N, k] = de(!1), [M, W] = de(!1), [G, j] = de(null), [H, L] = de(void 0), q = ze(
2953
2953
  ($, ie) => {
2954
2954
  const Fe = Array.isArray($ == null ? void 0 : $.messages) ? $.messages : [];
2955
- ie === "replace" ? y(Fe) : ie === "prepend" && Fe.length && C(Fe), N(($ == null ? void 0 : $.nextCursor) ?? null), k(!!($ != null && $.hasMore)), L((et) => ($ == null ? void 0 : $.checkpointId) ?? et ?? void 0);
2955
+ ie === "replace" ? y(Fe) : ie === "prepend" && Fe.length && E(Fe), j(($ == null ? void 0 : $.nextCursor) ?? null), k(!!($ != null && $.hasMore)), L((et) => ($ == null ? void 0 : $.checkpointId) ?? et ?? void 0);
2956
2956
  },
2957
- [y, C]
2957
+ [y, E]
2958
2958
  ), [O, _] = de([]), [z, X] = de(null), oe = ze(async () => {
2959
2959
  const $ = await u.listThreads();
2960
2960
  _($);
@@ -3020,7 +3020,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3020
3020
  }, [oe, u.baseUrl, he]), Ue(() => {
3021
3021
  r == null || r(z);
3022
3022
  }, [z, r]);
3023
- const be = dt(null);
3023
+ const be = at(null);
3024
3024
  Ue(() => {
3025
3025
  if (o && i) {
3026
3026
  if (!u.baseUrl) {
@@ -3035,7 +3035,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3035
3035
  }));
3036
3036
  }
3037
3037
  }, [o, i, u.baseUrl, F]);
3038
- const Y = dt(null), P = ze(
3038
+ const Y = at(null), P = ze(
3039
3039
  async ($, ie, Fe) => {
3040
3040
  if (!u.baseUrl) {
3041
3041
  console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
@@ -3044,7 +3044,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3044
3044
  if (Y.current !== $) {
3045
3045
  Y.current = $;
3046
3046
  try {
3047
- k(!1), N(null), L(void 0);
3047
+ k(!1), j(null), L(void 0);
3048
3048
  const et = await u.getMessages({
3049
3049
  threadId: $,
3050
3050
  checkpointId: ie,
@@ -3063,7 +3063,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3063
3063
  return rx(ie, $);
3064
3064
  }, [u]), ne = ze(async ($) => {
3065
3065
  if (!z) throw new Error("No active thread");
3066
- k(!1), N(null), L(void 0);
3066
+ k(!1), j(null), L(void 0);
3067
3067
  const ie = await u.getMessages({
3068
3068
  threadId: z,
3069
3069
  checkpointId: $,
@@ -3073,7 +3073,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3073
3073
  }, [u, z, q, I]), ae = ze(async () => {
3074
3074
  if (!z) throw new Error("No active thread");
3075
3075
  await P(z);
3076
- }, [z, P]), se = dt(!1);
3076
+ }, [z, P]), se = at(!1);
3077
3077
  Ue(() => {
3078
3078
  const $ = se.current;
3079
3079
  if (se.current = d, $ && !d && z) {
@@ -3099,8 +3099,8 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3099
3099
  const ie = await u.createThread($);
3100
3100
  return await oe(), await P(ie.threadId), ie.threadId;
3101
3101
  }, [u, oe, P]), Le = ze(async ($) => {
3102
- await u.deleteThread($), await oe(), z === $ && (X(null), E([]), k(!1), N(null), L(void 0));
3103
- }, [u, oe, z, E]), Oe = ze(async ($, ie) => {
3102
+ await u.deleteThread($), await oe(), z === $ && (X(null), R([]), k(!1), j(null), L(void 0));
3103
+ }, [u, oe, z, R]), Oe = ze(async ($, ie) => {
3104
3104
  await u.updateThread($, ie), await oe();
3105
3105
  }, [u, oe]), ue = ze(async ($, ie) => {
3106
3106
  var On;
@@ -3143,7 +3143,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3143
3143
  };
3144
3144
  p(
3145
3145
  xn,
3146
- (J) => T(J),
3146
+ (J) => C(J),
3147
3147
  {
3148
3148
  onError: (J) => console.warn("stream error", J),
3149
3149
  onOpen: ({ threadId: J, created: ce }) => {
@@ -3152,10 +3152,10 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3152
3152
  }
3153
3153
  }
3154
3154
  );
3155
- }, [z, S, p, T, w.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, oe, X, a, c]), Pe = ze(
3155
+ }, [z, S, p, C, w.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, oe, X, a, c]), Pe = ze(
3156
3156
  async ($) => {
3157
3157
  if (!z) throw new Error("No active thread");
3158
- if (M || !A) return;
3158
+ if (M || !N) return;
3159
3159
  const ie = G;
3160
3160
  if (ie) {
3161
3161
  W(!0);
@@ -3172,7 +3172,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3172
3172
  }
3173
3173
  }
3174
3174
  },
3175
- [u, z, H, G, A, M, q]
3175
+ [u, z, H, G, N, M, q]
3176
3176
  ), xe = {
3177
3177
  baseUrl: u.baseUrl,
3178
3178
  token: x,
@@ -3186,7 +3186,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3186
3186
  error: h,
3187
3187
  lastCheckpointId: w.lastCheckpointId,
3188
3188
  streamingAssistantId: w.assemblingId,
3189
- hasMoreHistory: A,
3189
+ hasMoreHistory: N,
3190
3190
  isLoadingHistory: M,
3191
3191
  loadOlderMessages: Pe,
3192
3192
  historyPageSize: I,
@@ -3291,10 +3291,10 @@ function lx({
3291
3291
  const w = K.useCallback(
3292
3292
  async (I) => {
3293
3293
  I && I.preventDefault();
3294
- const A = (p ?? "").trim();
3295
- !A && !h || x(() => {
3294
+ const N = (p ?? "").trim();
3295
+ !N && !h || x(() => {
3296
3296
  try {
3297
- const k = i(A);
3297
+ const k = i(N);
3298
3298
  k && typeof k.then == "function" ? k.then(() => {
3299
3299
  b(""), m.current && (m.current.style.height = "auto");
3300
3300
  }).catch(() => {
@@ -3306,12 +3306,12 @@ function lx({
3306
3306
  [p, i, h]
3307
3307
  ), y = K.useCallback((I) => {
3308
3308
  b(I.target.value), m.current && (m.current.style.height = "auto", m.current.style.height = `${m.current.scrollHeight}px`);
3309
- }, []), C = K.useCallback(
3309
+ }, []), E = K.useCallback(
3310
3310
  (I) => {
3311
3311
  I.key === "Enter" && !I.shiftKey ? (I.preventDefault(), w()) : I.key === "Escape" && t && (I.preventDefault(), a == null || a());
3312
3312
  },
3313
3313
  [w, t, a]
3314
- ), E = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${t ? "border-[hsl(var(--ring))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] dark:bg-[hsl(var(--card))] dark:text-[hsl(var(--card-foreground))]" : ""} ${d}`;
3314
+ ), R = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${t ? "border-[hsl(var(--ring))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] dark:bg-[hsl(var(--card))] dark:text-[hsl(var(--card-foreground))]" : ""} ${d}`;
3315
3315
  return /* @__PURE__ */ l.jsx("form", { onSubmit: (I) => void w(I), className: `w-full ${u}`, children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-end gap-2", children: [
3316
3316
  /* @__PURE__ */ l.jsx("div", { className: "flex-1", children: /* @__PURE__ */ l.jsx(
3317
3317
  Kc,
@@ -3319,9 +3319,9 @@ function lx({
3319
3319
  ref: m,
3320
3320
  value: p,
3321
3321
  onChange: y,
3322
- onKeyDown: C,
3322
+ onKeyDown: E,
3323
3323
  placeholder: t ? "Edit your message..." : n,
3324
- className: E,
3324
+ className: R,
3325
3325
  disabled: o,
3326
3326
  maxLength: s,
3327
3327
  rows: 1,
@@ -3523,7 +3523,7 @@ function V(e) {
3523
3523
  return n(r, o);
3524
3524
  };
3525
3525
  }
3526
- function ct(e, t) {
3526
+ function ut(e, t) {
3527
3527
  return Vo(V(t), (n) => le(e, n));
3528
3528
  }
3529
3529
  function Re() {
@@ -4084,14 +4084,14 @@ const _x = {
4084
4084
  offsetWidth: "width"
4085
4085
  }, Xt = Ie(
4086
4086
  ([{ log: e }, { recalcInProgress: t }]) => {
4087
- const n = Re(), r = Re(), o = ct(r, 0), s = Re(), i = Re(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S, T) => ln(S, _x[T])), p = V(void 0), b = V(0), g = Tx(), x = ct(
4087
+ const n = Re(), r = Re(), o = ut(r, 0), s = Re(), i = Re(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S, C) => ln(S, _x[C])), p = V(void 0), b = V(0), g = Tx(), x = ut(
4088
4088
  B(n, Se(c, e, b), Gt(jx, g), Be()),
4089
4089
  g
4090
- ), m = ct(
4090
+ ), m = ut(
4091
4091
  B(
4092
4092
  c,
4093
4093
  Be(),
4094
- Gt((S, T) => ({ current: T, prev: S.current }), {
4094
+ Gt((S, C) => ({ current: C, prev: S.current }), {
4095
4095
  current: [],
4096
4096
  prev: []
4097
4097
  }),
@@ -4104,10 +4104,10 @@ const _x = {
4104
4104
  c,
4105
4105
  pe((S) => S.length > 0),
4106
4106
  Se(x, b),
4107
- re(([S, T, E]) => {
4108
- const I = S.reduce((A, k, M) => bt(A, k, Cr(k, T.offsetTree, E) || M), Vn());
4107
+ re(([S, C, R]) => {
4108
+ const I = S.reduce((N, k, M) => bt(N, k, Cr(k, C.offsetTree, R) || M), Vn());
4109
4109
  return {
4110
- ...T,
4110
+ ...C,
4111
4111
  groupIndices: S,
4112
4112
  groupOffsetTree: I
4113
4113
  };
@@ -4118,18 +4118,18 @@ const _x = {
4118
4118
  B(
4119
4119
  r,
4120
4120
  Se(x),
4121
- pe(([S, { lastIndex: T }]) => S < T),
4122
- re(([S, { lastIndex: T, lastSize: E }]) => [
4121
+ pe(([S, { lastIndex: C }]) => S < C),
4122
+ re(([S, { lastIndex: C, lastSize: R }]) => [
4123
4123
  {
4124
- endIndex: T,
4125
- size: E,
4124
+ endIndex: C,
4125
+ size: R,
4126
4126
  startIndex: S
4127
4127
  }
4128
4128
  ])
4129
4129
  ),
4130
4130
  n
4131
4131
  ), le(u, d);
4132
- const v = ct(
4132
+ const v = ut(
4133
4133
  B(
4134
4134
  u,
4135
4135
  re((S) => S === void 0)
@@ -4149,9 +4149,9 @@ const _x = {
4149
4149
  n,
4150
4150
  Se(x),
4151
4151
  Gt(
4152
- ({ sizes: S }, [T, E]) => ({
4153
- changed: E !== S,
4154
- sizes: E
4152
+ ({ sizes: S }, [C, R]) => ({
4153
+ changed: R !== S,
4154
+ sizes: R
4155
4155
  }),
4156
4156
  { changed: !1, sizes: g }
4157
4157
  ),
@@ -4162,22 +4162,22 @@ const _x = {
4162
4162
  B(
4163
4163
  a,
4164
4164
  Gt(
4165
- (S, T) => ({ diff: S.prev - T, prev: T }),
4165
+ (S, C) => ({ diff: S.prev - C, prev: C }),
4166
4166
  { diff: 0, prev: 0 }
4167
4167
  ),
4168
4168
  re((S) => S.diff)
4169
4169
  ),
4170
4170
  (S) => {
4171
- const { groupIndices: T } = Ge(x);
4171
+ const { groupIndices: C } = Ge(x);
4172
4172
  if (S > 0)
4173
- ye(t, !0), ye(s, S + wl(S, T));
4173
+ ye(t, !0), ye(s, S + wl(S, C));
4174
4174
  else if (S < 0) {
4175
- const E = Ge(m);
4176
- E.length > 0 && (S -= wl(-S, E)), ye(i, S);
4175
+ const R = Ge(m);
4176
+ R.length > 0 && (S -= wl(-S, R)), ye(i, S);
4177
4177
  }
4178
4178
  }
4179
- ), ke(B(a, Se(e)), ([S, T]) => {
4180
- S < 0 && T(
4179
+ ), ke(B(a, Se(e)), ([S, C]) => {
4180
+ S < 0 && C(
4181
4181
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
4182
4182
  { firstItemIndex: a },
4183
4183
  gt.ERROR
@@ -4188,33 +4188,33 @@ const _x = {
4188
4188
  B(
4189
4189
  s,
4190
4190
  Se(x),
4191
- re(([S, T]) => {
4192
- const E = T.groupIndices.length > 0, I = [], A = T.lastSize;
4193
- if (E) {
4194
- const k = yr(T.sizeTree, 0);
4191
+ re(([S, C]) => {
4192
+ const R = C.groupIndices.length > 0, I = [], N = C.lastSize;
4193
+ if (R) {
4194
+ const k = yr(C.sizeTree, 0);
4195
4195
  let M = 0, W = 0;
4196
4196
  for (; M < S; ) {
4197
- const N = T.groupIndices[W], H = T.groupIndices.length === W + 1 ? 1 / 0 : T.groupIndices[W + 1] - N - 1;
4197
+ const j = C.groupIndices[W], H = C.groupIndices.length === W + 1 ? 1 / 0 : C.groupIndices[W + 1] - j - 1;
4198
4198
  I.push({
4199
- endIndex: N,
4199
+ endIndex: j,
4200
4200
  size: k,
4201
- startIndex: N
4201
+ startIndex: j
4202
4202
  }), I.push({
4203
- endIndex: N + 1 + H - 1,
4204
- size: A,
4205
- startIndex: N + 1
4203
+ endIndex: j + 1 + H - 1,
4204
+ size: N,
4205
+ startIndex: j + 1
4206
4206
  }), W++, M += H + 1;
4207
4207
  }
4208
- const G = wn(T.sizeTree);
4208
+ const G = wn(C.sizeTree);
4209
4209
  return M !== S && G.shift(), G.reduce(
4210
- (N, { k: H, v: L }) => {
4211
- let q = N.ranges;
4212
- return N.prevSize !== 0 && (q = [
4213
- ...N.ranges,
4210
+ (j, { k: H, v: L }) => {
4211
+ let q = j.ranges;
4212
+ return j.prevSize !== 0 && (q = [
4213
+ ...j.ranges,
4214
4214
  {
4215
4215
  endIndex: H + S - 1,
4216
- size: N.prevSize,
4217
- startIndex: N.prevIndex
4216
+ size: j.prevSize,
4217
+ startIndex: j.prevIndex
4218
4218
  }
4219
4219
  ]), {
4220
4220
  prevIndex: H + S,
@@ -4229,7 +4229,7 @@ const _x = {
4229
4229
  }
4230
4230
  ).ranges;
4231
4231
  }
4232
- return wn(T.sizeTree).reduce(
4232
+ return wn(C.sizeTree).reduce(
4233
4233
  (k, { k: M, v: W }) => ({
4234
4234
  prevIndex: M + S,
4235
4235
  prevSize: W,
@@ -4237,7 +4237,7 @@ const _x = {
4237
4237
  }),
4238
4238
  {
4239
4239
  prevIndex: 0,
4240
- prevSize: A,
4240
+ prevSize: N,
4241
4241
  ranges: []
4242
4242
  }
4243
4243
  ).ranges;
@@ -4245,13 +4245,13 @@ const _x = {
4245
4245
  ),
4246
4246
  n
4247
4247
  );
4248
- const C = wt(
4248
+ const E = wt(
4249
4249
  B(
4250
4250
  i,
4251
4251
  Se(x, b),
4252
- re(([S, { offsetTree: T }, E]) => {
4252
+ re(([S, { offsetTree: C }, R]) => {
4253
4253
  const I = -S;
4254
- return Cr(I, T, E);
4254
+ return Cr(I, C, R);
4255
4255
  })
4256
4256
  )
4257
4257
  );
@@ -4259,35 +4259,35 @@ const _x = {
4259
4259
  B(
4260
4260
  i,
4261
4261
  Se(x, b),
4262
- re(([S, T, E]) => {
4263
- if (T.groupIndices.length > 0) {
4264
- if (De(T.sizeTree))
4265
- return T;
4262
+ re(([S, C, R]) => {
4263
+ if (C.groupIndices.length > 0) {
4264
+ if (De(C.sizeTree))
4265
+ return C;
4266
4266
  let I = Vn();
4267
- const A = Ge(m);
4267
+ const N = Ge(m);
4268
4268
  let k = 0, M = 0, W = 0;
4269
4269
  for (; k < -S; ) {
4270
- W = A[M];
4271
- const G = A[M + 1] - W - 1;
4270
+ W = N[M];
4271
+ const G = N[M + 1] - W - 1;
4272
4272
  M++, k += G + 1;
4273
4273
  }
4274
- if (I = wn(T.sizeTree).reduce((G, { k: N, v: H }) => bt(G, Math.max(0, N + S), H), I), k !== -S) {
4275
- const G = yr(T.sizeTree, W);
4274
+ if (I = wn(C.sizeTree).reduce((G, { k: j, v: H }) => bt(G, Math.max(0, j + S), H), I), k !== -S) {
4275
+ const G = yr(C.sizeTree, W);
4276
4276
  I = bt(I, 0, G);
4277
- const N = Lt(T.sizeTree, -S + 1)[1];
4278
- I = bt(I, 1, N);
4277
+ const j = Lt(C.sizeTree, -S + 1)[1];
4278
+ I = bt(I, 1, j);
4279
4279
  }
4280
4280
  return {
4281
- ...T,
4281
+ ...C,
4282
4282
  sizeTree: I,
4283
- ...ui(T.offsetTree, 0, I, E)
4283
+ ...ui(C.offsetTree, 0, I, R)
4284
4284
  };
4285
4285
  } else {
4286
- const I = wn(T.sizeTree).reduce((A, { k, v: M }) => bt(A, Math.max(0, k + S), M), Vn());
4286
+ const I = wn(C.sizeTree).reduce((N, { k, v: M }) => bt(N, Math.max(0, k + S), M), Vn());
4287
4287
  return {
4288
- ...T,
4288
+ ...C,
4289
4289
  sizeTree: I,
4290
- ...ui(T.offsetTree, 0, I, E)
4290
+ ...ui(C.offsetTree, 0, I, R)
4291
4291
  };
4292
4292
  }
4293
4293
  })
@@ -4305,7 +4305,7 @@ const _x = {
4305
4305
  itemSize: h,
4306
4306
  listRefresh: w,
4307
4307
  shiftWith: i,
4308
- shiftWithOffset: C,
4308
+ shiftWithOffset: E,
4309
4309
  sizeRanges: n,
4310
4310
  // output
4311
4311
  sizes: x,
@@ -4401,16 +4401,16 @@ const Dr = Ie(
4401
4401
  Se(e, s, o),
4402
4402
  re(
4403
4403
  ([
4404
- [C, S, T, E, I, A, k, M],
4404
+ [E, S, C, R, I, N, k, M],
4405
4405
  W,
4406
4406
  G,
4407
- N
4407
+ j
4408
4408
  ]) => {
4409
- const H = lu(C), { align: L, behavior: q, offset: O } = H, _ = E - 1, z = iu(H, S, _);
4410
- let X = Cr(z, S.offsetTree, W) + A;
4411
- L === "end" ? (X += G + Lt(S.sizeTree, z)[1] - T + N, z === _ && (X += k)) : L === "center" ? X += (G + Lt(S.sizeTree, z)[1] - T + N) / 2 : X -= I, O && (X += O);
4409
+ const H = lu(E), { align: L, behavior: q, offset: O } = H, _ = R - 1, z = iu(H, S, _);
4410
+ let X = Cr(z, S.offsetTree, W) + N;
4411
+ L === "end" ? (X += G + Lt(S.sizeTree, z)[1] - C + j, z === _ && (X += k)) : L === "center" ? X += (G + Lt(S.sizeTree, z)[1] - C + j) / 2 : X -= I, O && (X += O);
4412
4412
  const oe = (F) => {
4413
- y(), F ? (M("retrying to scroll to", { location: C }, gt.DEBUG), ye(b, C)) : (ye(g, !0), M("list did not change, scroll successful", {}, gt.DEBUG));
4413
+ y(), F ? (M("retrying to scroll to", { location: E }, gt.DEBUG), ye(b, E)) : (ye(g, !0), M("list did not change, scroll successful", {}, gt.DEBUG));
4414
4414
  };
4415
4415
  if (y(), q === "smooth") {
4416
4416
  let F = !1;
@@ -4513,13 +4513,13 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
4513
4513
  viewportHeight: 0
4514
4514
  }
4515
4515
  }, Bx = 0, Fr = Ie(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4516
- const i = V(!1), a = V(!0), c = Re(), u = Re(), d = V(4), h = V(Bx), p = ct(
4516
+ const i = V(!1), a = V(!0), c = Re(), u = Re(), d = V(4), h = V(Bx), p = ut(
4517
4517
  B(
4518
4518
  ii(B(fe(o), Rn(1), Wt(!0)), B(fe(o), Rn(1), Wt(!1), xl(100))),
4519
4519
  Be()
4520
4520
  ),
4521
4521
  !1
4522
- ), b = ct(
4522
+ ), b = ut(
4523
4523
  B(ii(B(n, Wt(!0)), B(n, Wt(!1), xl(200))), Be()),
4524
4524
  !1
4525
4525
  );
@@ -4534,15 +4534,15 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
4534
4534
  const g = wt(
4535
4535
  B(
4536
4536
  Je(r, fe(s), fe(t), fe(e), fe(d)),
4537
- Gt((w, [{ scrollHeight: y, scrollTop: C }, S, T, E, I]) => {
4538
- const A = C + S - y > -I, k = {
4537
+ Gt((w, [{ scrollHeight: y, scrollTop: E }, S, C, R, I]) => {
4538
+ const N = E + S - y > -I, k = {
4539
4539
  scrollHeight: y,
4540
- scrollTop: C,
4540
+ scrollTop: E,
4541
4541
  viewportHeight: S
4542
4542
  };
4543
- if (A) {
4543
+ if (N) {
4544
4544
  let W, G;
4545
- return C > w.state.scrollTop ? (W = "SCROLLED_DOWN", G = w.state.scrollTop - C) : (W = "SIZE_DECREASED", G = w.state.scrollTop - C || w.scrollTopDelta), {
4545
+ return E > w.state.scrollTop ? (W = "SCROLLED_DOWN", G = w.state.scrollTop - E) : (W = "SIZE_DECREASED", G = w.state.scrollTop - E || w.scrollTopDelta), {
4546
4546
  atBottom: !0,
4547
4547
  atBottomBecause: W,
4548
4548
  scrollTopDelta: G,
@@ -4550,7 +4550,7 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
4550
4550
  };
4551
4551
  }
4552
4552
  let M;
4553
- return k.scrollHeight > w.state.scrollHeight ? M = "SIZE_INCREASED" : S < w.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" : C < w.state.scrollTop ? M = "SCROLLING_UPWARDS" : M = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
4553
+ return k.scrollHeight > w.state.scrollHeight ? M = "SIZE_INCREASED" : S < w.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" : E < w.state.scrollTop ? M = "SCROLLING_UPWARDS" : M = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
4554
4554
  atBottom: !1,
4555
4555
  notAtBottomBecause: M,
4556
4556
  state: k
@@ -4558,30 +4558,30 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
4558
4558
  }, Fx),
4559
4559
  Be((w, y) => w && w.atBottom === y.atBottom)
4560
4560
  )
4561
- ), x = ct(
4561
+ ), x = ut(
4562
4562
  B(
4563
4563
  r,
4564
4564
  Gt(
4565
- (w, { scrollHeight: y, scrollTop: C, viewportHeight: S }) => {
4565
+ (w, { scrollHeight: y, scrollTop: E, viewportHeight: S }) => {
4566
4566
  if (cu(w.scrollHeight, y))
4567
4567
  return {
4568
4568
  changed: !1,
4569
4569
  jump: 0,
4570
4570
  scrollHeight: y,
4571
- scrollTop: C
4571
+ scrollTop: E
4572
4572
  };
4573
4573
  {
4574
- const T = y - (C + S) < 1;
4575
- return w.scrollTop !== C && T ? {
4574
+ const C = y - (E + S) < 1;
4575
+ return w.scrollTop !== E && C ? {
4576
4576
  changed: !0,
4577
- jump: w.scrollTop - C,
4577
+ jump: w.scrollTop - E,
4578
4578
  scrollHeight: y,
4579
- scrollTop: C
4579
+ scrollTop: E
4580
4580
  } : {
4581
4581
  changed: !0,
4582
4582
  jump: 0,
4583
4583
  scrollHeight: y,
4584
- scrollTop: C
4584
+ scrollTop: E
4585
4585
  };
4586
4586
  }
4587
4587
  },
@@ -4627,7 +4627,7 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
4627
4627
  en(100),
4628
4628
  Se(p),
4629
4629
  pe(([w, y]) => !!y),
4630
- Gt(([w, y], [C]) => [y, C], [0, 0]),
4630
+ Gt(([w, y], [E]) => [y, E], [0, 0]),
4631
4631
  re(([w, y]) => y - w)
4632
4632
  ),
4633
4633
  v
@@ -4654,7 +4654,7 @@ function Cl(e, t) {
4654
4654
  }
4655
4655
  const Gi = Ie(
4656
4656
  ([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
4657
- const s = Re(), i = V(0), a = V(0), c = V(0), u = ct(
4657
+ const s = Re(), i = V(0), a = V(0), c = V(0), u = ut(
4658
4658
  B(
4659
4659
  Je(
4660
4660
  fe(r),
@@ -4679,12 +4679,12 @@ const Gi = Ie(
4679
4679
  w,
4680
4680
  y
4681
4681
  ]) => {
4682
- const C = d - w, S = m + v, T = Math.max(p - C, 0);
4683
- let E = yl;
4684
- const I = Cl(y, To), A = Cl(y, Ro);
4685
- return b -= w, b += p + v, g += p + v, g -= w, b > d + S - I && (E = Tr), g < d - T + h + A && (E = mr), E !== yl ? [
4686
- Math.max(C - p - Sl(x, To, E) - I, 0),
4687
- C - T - v + h + Sl(x, Ro, E) + A
4682
+ const E = d - w, S = m + v, C = Math.max(p - E, 0);
4683
+ let R = yl;
4684
+ const I = Cl(y, To), N = Cl(y, Ro);
4685
+ return b -= w, b += p + v, g += p + v, g -= w, b > d + S - I && (R = Tr), g < d - C + h + N && (R = mr), R !== yl ? [
4686
+ Math.max(E - p - Sl(x, To, R) - I, 0),
4687
+ E - C - v + h + Sl(x, Ro, R) + N
4688
4688
  ] : null;
4689
4689
  }
4690
4690
  ),
@@ -4803,7 +4803,7 @@ const kn = Ie(
4803
4803
  ]) => {
4804
4804
  const x = V([]), m = V(0), v = Re();
4805
4805
  le(s.topItemsIndexes, x);
4806
- const w = ct(
4806
+ const w = ut(
4807
4807
  B(
4808
4808
  Je(
4809
4809
  b,
@@ -4818,35 +4818,35 @@ const kn = Ie(
4818
4818
  fe(n),
4819
4819
  e
4820
4820
  ),
4821
- pe(([T, E, , I, , , , , , , A]) => {
4822
- const k = A && A.length !== I;
4823
- return T && !E && !k;
4821
+ pe(([C, R, , I, , , , , , , N]) => {
4822
+ const k = N && N.length !== I;
4823
+ return C && !R && !k;
4824
4824
  }),
4825
4825
  re(
4826
4826
  ([
4827
4827
  ,
4828
4828
  ,
4829
- [T, E],
4829
+ [C, R],
4830
4830
  I,
4831
- A,
4831
+ N,
4832
4832
  k,
4833
4833
  M,
4834
4834
  W,
4835
4835
  G,
4836
- N,
4836
+ j,
4837
4837
  H
4838
4838
  ]) => {
4839
- const L = A, { offsetTree: q, sizeTree: O } = L, _ = Ge(m);
4839
+ const L = N, { offsetTree: q, sizeTree: O } = L, _ = Ge(m);
4840
4840
  if (I === 0)
4841
4841
  return { ...ks, totalCount: I };
4842
- if (T === 0 && E === 0)
4843
- return _ === 0 ? { ...ks, totalCount: I } : uu(_, k, A, G, N, H || []);
4842
+ if (C === 0 && R === 0)
4843
+ return _ === 0 ? { ...ks, totalCount: I } : uu(_, k, N, G, j, H || []);
4844
4844
  if (De(O))
4845
4845
  return _ > 0 ? null : ao(
4846
4846
  Hx(Vi(k, I), L, H),
4847
4847
  [],
4848
4848
  I,
4849
- N,
4849
+ j,
4850
4850
  L,
4851
4851
  G
4852
4852
  );
@@ -4861,8 +4861,8 @@ const kn = Ie(
4861
4861
  }
4862
4862
  }
4863
4863
  if (!M)
4864
- return ao([], z, I, N, L, G);
4865
- const X = W.length > 0 ? W[W.length - 1] + 1 : 0, oe = Nx(q, T, E, X);
4864
+ return ao([], z, I, j, L, G);
4865
+ const X = W.length > 0 ? W[W.length - 1] + 1 : 0, oe = Nx(q, C, R, X);
4866
4866
  if (oe.length === 0)
4867
4867
  return null;
4868
4868
  const F = I - 1, ee = Vo([], (he) => {
@@ -4870,22 +4870,22 @@ const kn = Ie(
4870
4870
  const Y = be.value;
4871
4871
  let P = Y.offset, Z = be.start;
4872
4872
  const ne = Y.size;
4873
- if (Y.offset < T) {
4874
- Z += Math.floor((T - Y.offset + N) / (ne + N));
4873
+ if (Y.offset < C) {
4874
+ Z += Math.floor((C - Y.offset + j) / (ne + j));
4875
4875
  const se = Z - be.start;
4876
- P += se * ne + se * N;
4876
+ P += se * ne + se * j;
4877
4877
  }
4878
4878
  Z < X && (P += (X - Z) * ne, Z = X);
4879
4879
  const ae = Math.min(be.end, F);
4880
- for (let se = Z; se <= ae && !(P >= E); se++)
4881
- he.push({ data: H == null ? void 0 : H[se], index: se, offset: P, size: ne }), P += ne + N;
4880
+ for (let se = Z; se <= ae && !(P >= R); se++)
4881
+ he.push({ data: H == null ? void 0 : H[se], index: se, offset: P, size: ne }), P += ne + j;
4882
4882
  }
4883
4883
  });
4884
- return ao(ee, z, I, N, L, G);
4884
+ return ao(ee, z, I, j, L, G);
4885
4885
  }
4886
4886
  ),
4887
4887
  //@ts-expect-error filter needs to be fixed
4888
- pe((T) => T !== null),
4888
+ pe((C) => C !== null),
4889
4889
  Be()
4890
4890
  ),
4891
4891
  ks
@@ -4894,65 +4894,65 @@ const kn = Ie(
4894
4894
  B(
4895
4895
  e,
4896
4896
  pe(Bi),
4897
- re((T) => T == null ? void 0 : T.length)
4897
+ re((C) => C == null ? void 0 : C.length)
4898
4898
  ),
4899
4899
  o
4900
4900
  ), le(
4901
4901
  B(
4902
4902
  w,
4903
- re((T) => T.topListHeight)
4903
+ re((C) => C.topListHeight)
4904
4904
  ),
4905
4905
  h
4906
4906
  ), le(h, a), le(
4907
4907
  B(
4908
4908
  w,
4909
- re((T) => [T.top, T.bottom])
4909
+ re((C) => [C.top, C.bottom])
4910
4910
  ),
4911
4911
  i
4912
4912
  ), le(
4913
4913
  B(
4914
4914
  w,
4915
- re((T) => T.items)
4915
+ re((C) => C.items)
4916
4916
  ),
4917
4917
  v
4918
4918
  );
4919
4919
  const y = wt(
4920
4920
  B(
4921
4921
  w,
4922
- pe(({ items: T }) => T.length > 0),
4922
+ pe(({ items: C }) => C.length > 0),
4923
4923
  Se(o, e),
4924
- pe(([{ items: T }, E]) => T[T.length - 1].originalIndex === E - 1),
4925
- re(([, T, E]) => [T - 1, E]),
4924
+ pe(([{ items: C }, R]) => C[C.length - 1].originalIndex === R - 1),
4925
+ re(([, C, R]) => [C - 1, R]),
4926
4926
  Be(Sr),
4927
- re(([T]) => T)
4927
+ re(([C]) => C)
4928
4928
  )
4929
- ), C = wt(
4929
+ ), E = wt(
4930
4930
  B(
4931
4931
  w,
4932
4932
  en(200),
4933
- pe(({ items: T, topItems: E }) => T.length > 0 && T[0].originalIndex === E.length),
4934
- re(({ items: T }) => T[0].index),
4933
+ pe(({ items: C, topItems: R }) => C.length > 0 && C[0].originalIndex === R.length),
4934
+ re(({ items: C }) => C[0].index),
4935
4935
  Be()
4936
4936
  )
4937
4937
  ), S = wt(
4938
4938
  B(
4939
4939
  w,
4940
- pe(({ items: T }) => T.length > 0),
4941
- re(({ items: T }) => {
4942
- let E = 0, I = T.length - 1;
4943
- for (; T[E].type === "group" && E < I; )
4944
- E++;
4945
- for (; T[I].type === "group" && I > E; )
4940
+ pe(({ items: C }) => C.length > 0),
4941
+ re(({ items: C }) => {
4942
+ let R = 0, I = C.length - 1;
4943
+ for (; C[R].type === "group" && R < I; )
4944
+ R++;
4945
+ for (; C[I].type === "group" && I > R; )
4946
4946
  I--;
4947
4947
  return {
4948
- endIndex: T[I].index,
4949
- startIndex: T[E].index
4948
+ endIndex: C[I].index,
4949
+ startIndex: C[R].index
4950
4950
  };
4951
4951
  }),
4952
4952
  Be(ru)
4953
4953
  )
4954
4954
  );
4955
- return { endReached: y, initialItemCount: m, itemsRendered: v, listState: w, rangeChanged: S, startReached: C, topItemsIndexes: x, ...p };
4955
+ return { endReached: y, initialItemCount: m, itemsRendered: v, listState: w, rangeChanged: S, startReached: E, topItemsIndexes: x, ...p };
4956
4956
  },
4957
4957
  He(
4958
4958
  Xt,
@@ -4967,7 +4967,7 @@ const kn = Ie(
4967
4967
  { singleton: !0 }
4968
4968
  ), du = Ie(
4969
4969
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
4970
- const s = Re(), i = ct(
4970
+ const s = Re(), i = ut(
4971
4971
  B(
4972
4972
  Je(n, e, r, t, o),
4973
4973
  re(([a, c, u, d, h]) => a + c + u + d + h.offsetBottom + h.bottom)
@@ -4980,7 +4980,7 @@ const kn = Ie(
4980
4980
  { singleton: !0 }
4981
4981
  ), $x = Ie(
4982
4982
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
4983
- const n = V(!1), r = ct(
4983
+ const n = V(!1), r = ut(
4984
4984
  B(
4985
4985
  Je(n, e, t),
4986
4986
  pe(([o]) => o),
@@ -5015,14 +5015,14 @@ const kn = Ie(
5015
5015
  Se(t, c, n, s, o, r, a),
5016
5016
  Se(e),
5017
5017
  re(([[h, p, b, g, x, m, v, w], y]) => {
5018
- const { align: C, behavior: S, calculateViewLocation: T = zx, done: E, ...I } = h, A = iu(h, p, g - 1), k = Cr(A, p.offsetTree, y) + x + m, M = k + Lt(p.sizeTree, A)[1], W = w + m, G = w + b - v, N = T({
5018
+ const { align: E, behavior: S, calculateViewLocation: C = zx, done: R, ...I } = h, N = iu(h, p, g - 1), k = Cr(N, p.offsetTree, y) + x + m, M = k + Lt(p.sizeTree, N)[1], W = w + m, G = w + b - v, j = C({
5019
5019
  itemBottom: M,
5020
5020
  itemTop: k,
5021
- locationParams: { align: C, behavior: S, ...I },
5021
+ locationParams: { align: E, behavior: S, ...I },
5022
5022
  viewportBottom: G,
5023
5023
  viewportTop: W
5024
5024
  });
5025
- return N ? E && Mt(
5025
+ return j ? R && Mt(
5026
5026
  B(
5027
5027
  i,
5028
5028
  pe((H) => !H),
@@ -5030,8 +5030,8 @@ const kn = Ie(
5030
5030
  // but if scrollingInProgress is true, we skip the initial publish.
5031
5031
  Rn(Ge(i) ? 1 : 2)
5032
5032
  ),
5033
- E
5034
- ) : E && E(), N;
5033
+ R
5034
+ ) : R && R(), j;
5035
5035
  }),
5036
5036
  pe((h) => h !== null)
5037
5037
  ),
@@ -5071,32 +5071,32 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
5071
5071
  B(
5072
5072
  Je(B(fe(t), Rn(1)), c),
5073
5073
  Se(fe(g), s, a, h),
5074
- re(([[S, T], E, I, A, k]) => {
5075
- let M = T && A, W = "auto";
5076
- return M && (W = Ux(E, I || k), M = M && !!W), { followOutputBehavior: W, shouldFollow: M, totalCount: S };
5074
+ re(([[S, C], R, I, N, k]) => {
5075
+ let M = C && N, W = "auto";
5076
+ return M && (W = Ux(R, I || k), M = M && !!W), { followOutputBehavior: W, shouldFollow: M, totalCount: S };
5077
5077
  }),
5078
5078
  pe(({ shouldFollow: S }) => S)
5079
5079
  ),
5080
- ({ followOutputBehavior: S, totalCount: T }) => {
5080
+ ({ followOutputBehavior: S, totalCount: C }) => {
5081
5081
  m && (m(), m = null), Ge(n) ? requestAnimationFrame(() => {
5082
- Ge(d)("following output to ", { totalCount: T }, gt.DEBUG), v(S);
5082
+ Ge(d)("following output to ", { totalCount: C }, gt.DEBUG), v(S);
5083
5083
  }) : m = Mt(e, () => {
5084
- Ge(d)("following output to ", { totalCount: T }, gt.DEBUG), v(S), m = null;
5084
+ Ge(d)("following output to ", { totalCount: C }, gt.DEBUG), v(S), m = null;
5085
5085
  });
5086
5086
  }
5087
5087
  );
5088
5088
  function w(S) {
5089
- const T = Mt(o, (E) => {
5090
- S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !m && (Ge(d)("scrolling to bottom due to increased size", {}, gt.DEBUG), v("auto"));
5089
+ const C = Mt(o, (R) => {
5090
+ S && !R.atBottom && R.notAtBottomBecause === "SIZE_INCREASED" && !m && (Ge(d)("scrolling to bottom due to increased size", {}, gt.DEBUG), v("auto"));
5091
5091
  });
5092
- setTimeout(T, 100);
5092
+ setTimeout(C, 100);
5093
5093
  }
5094
5094
  ke(
5095
5095
  B(
5096
5096
  Je(fe(g), t, u),
5097
- pe(([S, , T]) => S && T),
5097
+ pe(([S, , C]) => S && C),
5098
5098
  Gt(
5099
- ({ value: S }, [, T]) => ({ refreshed: S === T, value: T }),
5099
+ ({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
5100
5100
  { refreshed: !1, value: 0 }
5101
5101
  ),
5102
5102
  pe(({ refreshed: S }) => S),
@@ -5107,27 +5107,27 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
5107
5107
  }
5108
5108
  ), ke(x, () => {
5109
5109
  w(Ge(g) !== !1);
5110
- }), ke(Je(fe(g), o), ([S, T]) => {
5111
- S && !T.atBottom && T.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && v("auto");
5110
+ }), ke(Je(fe(g), o), ([S, C]) => {
5111
+ S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && v("auto");
5112
5112
  });
5113
- const y = V(null), C = Re();
5113
+ const y = V(null), E = Re();
5114
5114
  return le(
5115
5115
  ii(
5116
5116
  B(
5117
5117
  fe(r),
5118
5118
  re((S) => {
5119
- var T;
5120
- return (T = S == null ? void 0 : S.length) != null ? T : 0;
5119
+ var C;
5120
+ return (C = S == null ? void 0 : S.length) != null ? C : 0;
5121
5121
  })
5122
5122
  ),
5123
5123
  B(fe(t))
5124
5124
  ),
5125
- C
5125
+ E
5126
5126
  ), ke(
5127
5127
  B(
5128
- Je(B(C, Rn(1)), c),
5128
+ Je(B(E, Rn(1)), c),
5129
5129
  Se(fe(y), a, h, p),
5130
- re(([[S, T], E, I, A, k]) => T && I && (E == null ? void 0 : E({ context: k, totalCount: S, scrollingInProgress: A }))),
5130
+ re(([[S, C], R, I, N, k]) => C && I && (R == null ? void 0 : R({ context: k, totalCount: S, scrollingInProgress: N }))),
5131
5131
  pe((S) => !!S),
5132
5132
  en(0)
5133
5133
  ),
@@ -5270,8 +5270,8 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
5270
5270
  Se(t, r, i, h, p, n)
5271
5271
  ),
5272
5272
  ([b, g, x, m, v, w, y]) => {
5273
- const C = Ax(g.sizeTree);
5274
- m && v !== null && w !== null && (x = v.scrollTop - w.offsetTop), x -= y, b({ ranges: C, scrollTop: x });
5273
+ const E = Ax(g.sizeTree);
5274
+ m && v !== null && w !== null && (x = v.scrollTop - w.offsetTop), x -= y, b({ ranges: E, scrollTop: x });
5275
5275
  }
5276
5276
  ), le(B(d, pe(Bi), re(Yx)), o), le(
5277
5277
  B(
@@ -5321,16 +5321,16 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5321
5321
  c,
5322
5322
  Se(i),
5323
5323
  Gt(
5324
- ([, v, w, y], [{ bottom: C, items: S, offsetBottom: T, totalCount: E }, I]) => {
5325
- const A = C + T;
5324
+ ([, v, w, y], [{ bottom: E, items: S, offsetBottom: C, totalCount: R }, I]) => {
5325
+ const N = E + C;
5326
5326
  let k = 0;
5327
- return w === E && v.length > 0 && S.length > 0 && (S[0].originalIndex === 0 && v[0].originalIndex === 0 || (k = A - y, k !== 0 && (k += I))), [k, S, E, A];
5327
+ return w === R && v.length > 0 && S.length > 0 && (S[0].originalIndex === 0 && v[0].originalIndex === 0 || (k = N - y, k !== 0 && (k += I))), [k, S, R, N];
5328
5328
  },
5329
5329
  [0, [], 0, 0]
5330
5330
  ),
5331
5331
  pe(([v]) => v !== 0),
5332
5332
  Se(r, a, n, o, b, g),
5333
- pe(([, v, w, y, , , C]) => !C && !y && v !== 0 && w === Tr),
5333
+ pe(([, v, w, y, , , E]) => !E && !y && v !== 0 && w === Tr),
5334
5334
  re(([[v], , , , , w]) => (w("Upward scrolling compensation", { amount: v }, gt.DEBUG), v))
5335
5335
  )
5336
5336
  );
@@ -5341,7 +5341,7 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5341
5341
  y && Xx() ? ye(e, w - v) : m(-v);
5342
5342
  }), ke(
5343
5343
  B(
5344
- Je(ct(s, !1), e, g),
5344
+ Je(ut(s, !1), e, g),
5345
5345
  pe(([v, w, y]) => !v && !y && w !== 0),
5346
5346
  re(([v, w]) => w),
5347
5347
  en(1)
@@ -5357,22 +5357,22 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5357
5357
  B(
5358
5358
  u,
5359
5359
  Se(p, d),
5360
- re(([v, { groupIndices: w, lastSize: y, sizeTree: C }, S]) => {
5361
- function T(E) {
5362
- return E * (y + S);
5360
+ re(([v, { groupIndices: w, lastSize: y, sizeTree: E }, S]) => {
5361
+ function C(R) {
5362
+ return R * (y + S);
5363
5363
  }
5364
5364
  if (w.length === 0)
5365
- return T(v);
5365
+ return C(v);
5366
5366
  {
5367
- let E = 0;
5368
- const I = yr(C, 0);
5369
- let A = 0, k = 0;
5370
- for (; A < v; ) {
5371
- A++, E += I;
5367
+ let R = 0;
5368
+ const I = yr(E, 0);
5369
+ let N = 0, k = 0;
5370
+ for (; N < v; ) {
5371
+ N++, R += I;
5372
5372
  let M = w.length === k + 1 ? 1 / 0 : w[k + 1] - w[k] - 1;
5373
- A + M > v && (E -= I, M = v - A + 1), A += M, E += T(M), k++;
5373
+ N + M > v && (R -= I, M = v - N + 1), N += M, R += C(M), k++;
5374
5374
  }
5375
- return E;
5375
+ return R;
5376
5376
  }
5377
5377
  })
5378
5378
  ),
@@ -5445,15 +5445,15 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5445
5445
  x,
5446
5446
  m,
5447
5447
  v,
5448
- { listState: w, topItemsIndexes: y, ...C },
5448
+ { listState: w, topItemsIndexes: y, ...E },
5449
5449
  { scrollToIndex: S },
5450
- T,
5451
- { topItemCount: E },
5450
+ C,
5451
+ { topItemCount: R },
5452
5452
  { groupCounts: I },
5453
- A
5454
- ]) => (le(C.rangeChanged, A.scrollSeekRangeChanged), le(
5453
+ N
5454
+ ]) => (le(E.rangeChanged, N.scrollSeekRangeChanged), le(
5455
5455
  B(
5456
- A.windowViewportRect,
5456
+ N.windowViewportRect,
5457
5457
  re((k) => k.visibleHeight)
5458
5458
  ),
5459
5459
  x.viewportHeight
@@ -5468,7 +5468,7 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5468
5468
  initialTopMostItemIndex: b,
5469
5469
  scrolledToInitialItem: g,
5470
5470
  sizeRanges: a,
5471
- topItemCount: E,
5471
+ topItemCount: R,
5472
5472
  topItemsIndexes: y,
5473
5473
  // input
5474
5474
  totalCount: d,
@@ -5481,9 +5481,9 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5481
5481
  statefulTotalCount: u,
5482
5482
  trackItemSizes: h,
5483
5483
  // exported from stateFlagsSystem
5484
- ...C,
5484
+ ...E,
5485
5485
  // the bag of IO from featureGroup1System
5486
- ...A,
5486
+ ...N,
5487
5487
  ...x,
5488
5488
  sizes: c,
5489
5489
  ...m
@@ -5530,28 +5530,28 @@ function xu(e, t, n) {
5530
5530
  }
5531
5531
  function u(m) {
5532
5532
  return s.reduce((v, w) => (v[w] = (y) => {
5533
- const C = m[t.methods[w]];
5534
- ye(C, y);
5533
+ const E = m[t.methods[w]];
5534
+ ye(E, y);
5535
5535
  }, v), {});
5536
5536
  }
5537
5537
  function d(m) {
5538
5538
  return i.reduce((v, w) => (v[w] = mx(m[t.events[w]]), v), {});
5539
5539
  }
5540
5540
  const h = K.forwardRef((m, v) => {
5541
- const { children: w, ...y } = m, [C] = K.useState(() => Vo(xx(e), (E) => {
5542
- c(E, y);
5543
- })), [S] = K.useState(gl(d, C));
5541
+ const { children: w, ...y } = m, [E] = K.useState(() => Vo(xx(e), (R) => {
5542
+ c(R, y);
5543
+ })), [S] = K.useState(gl(d, E));
5544
5544
  Vr(() => {
5545
- for (const E of i)
5546
- E in y && ke(S[E], y[E]);
5545
+ for (const R of i)
5546
+ R in y && ke(S[R], y[R]);
5547
5547
  return () => {
5548
5548
  Object.values(S).map(Hi);
5549
5549
  };
5550
- }, [y, S, C]), Vr(() => {
5551
- c(C, y);
5552
- }), K.useImperativeHandle(v, ml(u(C)));
5553
- const T = n;
5554
- return /* @__PURE__ */ l.jsx(a.Provider, { value: C, children: n ? /* @__PURE__ */ l.jsx(T, { ...Qx([...r, ...o, ...i], y), children: w }) : w });
5550
+ }, [y, S, E]), Vr(() => {
5551
+ c(E, y);
5552
+ }), K.useImperativeHandle(v, ml(u(E)));
5553
+ const C = n;
5554
+ return /* @__PURE__ */ l.jsx(a.Provider, { value: E, children: n ? /* @__PURE__ */ l.jsx(C, { ...Qx([...r, ...o, ...i], y), children: w }) : w });
5555
5555
  }), p = (m) => {
5556
5556
  const v = K.useContext(a);
5557
5557
  return K.useCallback(
@@ -5573,8 +5573,8 @@ function xu(e, t, n) {
5573
5573
  }, g = (m) => {
5574
5574
  const v = K.useContext(a)[m], [w, y] = K.useState(gl(Ge, v));
5575
5575
  return Vr(
5576
- () => ke(v, (C) => {
5577
- C !== w && y(ml(C));
5576
+ () => ke(v, (E) => {
5577
+ E !== w && y(ml(E));
5578
5578
  }),
5579
5579
  [v, w]
5580
5580
  ), w;
@@ -5657,7 +5657,7 @@ function qi(e) {
5657
5657
  return e;
5658
5658
  }
5659
5659
  const tv = /* @__PURE__ */ Ie(() => {
5660
- const e = V((a) => `Item ${a}`), t = V((a) => `Group ${a}`), n = V({}), r = V(qi), o = V("div"), s = V(or), i = (a, c = null) => ct(
5660
+ const e = V((a) => `Item ${a}`), t = V((a) => `Group ${a}`), n = V({}), r = V(qi), o = V("div"), s = V(or), i = (a, c = null) => ut(
5661
5661
  B(
5662
5662
  n,
5663
5663
  re((u) => u[a]),
@@ -5697,10 +5697,10 @@ const tv = /* @__PURE__ */ Ie(() => {
5697
5697
  x,
5698
5698
  ve("skipAnimationFrameInResizeObserver")
5699
5699
  ), [v, w] = K.useState(0);
5700
- Xi("deviation", (N) => {
5701
- v !== N && w(N);
5700
+ Xi("deviation", (j) => {
5701
+ v !== j && w(j);
5702
5702
  });
5703
- const y = ve("EmptyPlaceholder"), C = ve("ScrollSeekPlaceholder") || rv, S = ve("ListComponent"), T = ve("ItemComponent"), E = ve("GroupComponent"), I = ve("computeItemKey"), A = ve("isSeeking"), k = ve("groupIndices").length > 0, M = ve("alignToBottom"), W = ve("initialItemFinalLocationReached"), G = e ? {} : {
5703
+ const y = ve("EmptyPlaceholder"), E = ve("ScrollSeekPlaceholder") || rv, S = ve("ListComponent"), C = ve("ItemComponent"), R = ve("GroupComponent"), I = ve("computeItemKey"), N = ve("isSeeking"), k = ve("groupIndices").length > 0, M = ve("alignToBottom"), W = ve("initialItemFinalLocationReached"), G = e ? {} : {
5704
5704
  boxSizing: "border-box",
5705
5705
  ...x ? {
5706
5706
  display: "inline-block",
@@ -5716,49 +5716,49 @@ const tv = /* @__PURE__ */ Ie(() => {
5716
5716
  },
5717
5717
  ...W ? {} : { visibility: "hidden" }
5718
5718
  };
5719
- return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...lt(y, u) }) : /* @__PURE__ */ l.jsx(
5719
+ return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...ct(y, u) }) : /* @__PURE__ */ l.jsx(
5720
5720
  S,
5721
5721
  {
5722
- ...lt(S, u),
5722
+ ...ct(S, u),
5723
5723
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
5724
5724
  ref: m,
5725
5725
  style: G,
5726
- children: (e ? t.topItems : t.items).map((N) => {
5727
- const H = N.originalIndex, L = I(H + t.firstItemIndex, N.data, u);
5728
- return A ? /* @__PURE__ */ to(
5729
- C,
5726
+ children: (e ? t.topItems : t.items).map((j) => {
5727
+ const H = j.originalIndex, L = I(H + t.firstItemIndex, j.data, u);
5728
+ return N ? /* @__PURE__ */ to(
5729
+ E,
5730
5730
  {
5731
- ...lt(C, u),
5732
- height: N.size,
5733
- index: N.index,
5731
+ ...ct(E, u),
5732
+ height: j.size,
5733
+ index: j.index,
5734
5734
  key: L,
5735
- type: N.type || "item",
5736
- ...N.type === "group" ? {} : { groupIndex: N.groupIndex }
5735
+ type: j.type || "item",
5736
+ ...j.type === "group" ? {} : { groupIndex: j.groupIndex }
5737
5737
  }
5738
- ) : N.type === "group" ? /* @__PURE__ */ to(
5739
- E,
5738
+ ) : j.type === "group" ? /* @__PURE__ */ to(
5739
+ R,
5740
5740
  {
5741
- ...lt(E, u),
5741
+ ...ct(R, u),
5742
5742
  "data-index": H,
5743
- "data-item-index": N.index,
5744
- "data-known-size": N.size,
5743
+ "data-item-index": j.index,
5744
+ "data-known-size": j.size,
5745
5745
  key: L,
5746
5746
  style: ov
5747
5747
  },
5748
- d(N.index, u)
5748
+ d(j.index, u)
5749
5749
  ) : /* @__PURE__ */ to(
5750
- T,
5750
+ C,
5751
5751
  {
5752
- ...lt(T, u),
5753
- ...cv(T, N.data),
5752
+ ...ct(C, u),
5753
+ ...cv(C, j.data),
5754
5754
  "data-index": H,
5755
- "data-item-group-index": N.groupIndex,
5756
- "data-item-index": N.index,
5757
- "data-known-size": N.size,
5755
+ "data-item-group-index": j.groupIndex,
5756
+ "data-item-index": j.index,
5757
+ "data-known-size": j.size,
5758
5758
  key: L,
5759
5759
  style: x ? sv : Su
5760
5760
  },
5761
- k ? c(N.index, N.groupIndex, N.data, u) : c(N.index, N.data, u)
5761
+ k ? c(j.index, j.groupIndex, j.data, u) : c(j.index, j.data, u)
5762
5762
  );
5763
5763
  })
5764
5764
  }
@@ -5785,7 +5785,7 @@ const tv = /* @__PURE__ */ Ie(() => {
5785
5785
  width: "100%",
5786
5786
  zIndex: 1
5787
5787
  };
5788
- function lt(e, t) {
5788
+ function ct(e, t) {
5789
5789
  if (typeof e != "string")
5790
5790
  return { context: t };
5791
5791
  }
@@ -5803,7 +5803,7 @@ const uv = /* @__PURE__ */ K.memo(function() {
5803
5803
  !0,
5804
5804
  ve("skipAnimationFrameInResizeObserver")
5805
5805
  ), o = ve("context");
5806
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...lt(e, o) }) }) : null;
5806
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
5807
5807
  }), dv = /* @__PURE__ */ K.memo(function() {
5808
5808
  const e = ve("FooterComponent"), t = Rt("footerHeight"), n = ve("HeaderFooterTag"), r = An(
5809
5809
  K.useMemo(
@@ -5815,7 +5815,7 @@ const uv = /* @__PURE__ */ K.memo(function() {
5815
5815
  !0,
5816
5816
  ve("skipAnimationFrameInResizeObserver")
5817
5817
  ), o = ve("context");
5818
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...lt(e, o) }) }) : null;
5818
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
5819
5819
  });
5820
5820
  function Cu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5821
5821
  return K.memo(function({ children: r, style: o, context: s, ...i }) {
@@ -5836,7 +5836,7 @@ function Cu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5836
5836
  style: { ...h ? av : iv, ...o },
5837
5837
  tabIndex: 0,
5838
5838
  ...i,
5839
- ...lt(c, s),
5839
+ ...ct(c, s),
5840
5840
  children: r
5841
5841
  }
5842
5842
  );
@@ -5863,7 +5863,7 @@ function Tu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5863
5863
  "data-virtuoso-scroller": !0,
5864
5864
  style: { position: "relative", ...o, ...d !== 0 ? { height: d + h } : {} },
5865
5865
  ...i,
5866
- ...lt(c, s),
5866
+ ...ct(c, s),
5867
5867
  children: r
5868
5868
  }
5869
5869
  );
@@ -5888,7 +5888,7 @@ const fv = ({ children: e }) => {
5888
5888
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "window", ref: s, style: Yo(i), children: e });
5889
5889
  }, pv = ({ children: e }) => {
5890
5890
  const t = ve("TopItemListComponent") || "div", n = ve("headerHeight"), r = { ...lv, marginTop: `${n}px` }, o = ve("context");
5891
- return /* @__PURE__ */ l.jsx(t, { style: r, ...lt(t, o), children: e });
5891
+ return /* @__PURE__ */ l.jsx(t, { style: r, ...ct(t, o), children: e });
5892
5892
  }, mv = /* @__PURE__ */ K.memo(function(e) {
5893
5893
  const t = ve("useWindowScroll"), n = ve("topItemsIndexes").length > 0, r = ve("customScrollParent"), o = ve("context");
5894
5894
  return /* @__PURE__ */ l.jsxs(r || t ? vv : xv, { ...e, context: o, children: [
@@ -5970,7 +5970,7 @@ const fv = ({ children: e }) => {
5970
5970
  ] })), t = V(null), n = V((u) => /* @__PURE__ */ l.jsxs("td", { colSpan: 1e3, children: [
5971
5971
  "Group ",
5972
5972
  u
5973
- ] })), r = V(null), o = V(null), s = V({}), i = V(qi), a = V(or), c = (u, d = null) => ct(
5973
+ ] })), r = V(null), o = V(null), s = V({}), i = V(qi), a = V(or), c = (u, d = null) => ut(
5974
5974
  B(
5975
5975
  s,
5976
5976
  re((h) => h[u]),
@@ -6040,10 +6040,10 @@ const Tv = /* @__PURE__ */ Ie(
6040
6040
  p,
6041
6041
  b,
6042
6042
  { didMount: g, propsReady: x },
6043
- { customScrollParent: m, useWindowScroll: v, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: C },
6043
+ { customScrollParent: m, useWindowScroll: v, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: E },
6044
6044
  S
6045
6045
  ]) => {
6046
- const T = V(0), E = V(0), I = V(Nl), A = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Re(), W = Re(), G = V(0), N = V(null), H = V({ column: 0, row: 0 }), L = Re(), q = Re(), O = V(!1), _ = V(0), z = V(!0), X = V(!1), oe = V(!1);
6046
+ const C = V(0), R = V(0), I = V(Nl), N = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Re(), W = Re(), G = V(0), j = V(null), H = V({ column: 0, row: 0 }), L = Re(), q = Re(), O = V(!1), _ = V(0), z = V(!0), X = V(!1), oe = V(!1);
6047
6047
  ke(
6048
6048
  B(
6049
6049
  g,
@@ -6055,7 +6055,7 @@ const Tv = /* @__PURE__ */ Ie(
6055
6055
  }
6056
6056
  ), ke(
6057
6057
  B(
6058
- Je(g, z, k, A, _, X),
6058
+ Je(g, z, k, N, _, X),
6059
6059
  pe(([P, Z, ne, ae, , se]) => P && !Z && ne.height !== 0 && ae.height !== 0 && !se)
6060
6060
  ),
6061
6061
  ([, , , , P]) => {
@@ -6071,7 +6071,7 @@ const Tv = /* @__PURE__ */ Ie(
6071
6071
  pe((P) => P != null && P.scrollTop > 0),
6072
6072
  Wt(0)
6073
6073
  ),
6074
- E
6074
+ R
6075
6075
  ), ke(
6076
6076
  B(
6077
6077
  g,
@@ -6079,20 +6079,20 @@ const Tv = /* @__PURE__ */ Ie(
6079
6079
  pe(([, P]) => P != null)
6080
6080
  ),
6081
6081
  ([, P]) => {
6082
- P && (ye(A, P.viewport), ye(k, P.item), ye(H, P.gap), P.scrollTop > 0 && (ye(O, !0), Mt(B(u, Rn(1)), (Z) => {
6082
+ P && (ye(N, P.viewport), ye(k, P.item), ye(H, P.gap), P.scrollTop > 0 && (ye(O, !0), Mt(B(u, Rn(1)), (Z) => {
6083
6083
  ye(O, !1);
6084
6084
  }), ye(c, { top: P.scrollTop })));
6085
6085
  }
6086
6086
  ), le(
6087
6087
  B(
6088
- A,
6088
+ N,
6089
6089
  re(({ height: P }) => P)
6090
6090
  ),
6091
6091
  h
6092
6092
  ), le(
6093
6093
  B(
6094
6094
  Je(
6095
- fe(A, Gr),
6095
+ fe(N, Gr),
6096
6096
  fe(k, Gr),
6097
6097
  fe(H, (P, Z) => P && P.column === Z.column && P.row === Z.row),
6098
6098
  fe(u)
@@ -6108,13 +6108,13 @@ const Tv = /* @__PURE__ */ Ie(
6108
6108
  ), le(
6109
6109
  B(
6110
6110
  Je(
6111
- fe(T),
6111
+ fe(C),
6112
6112
  r,
6113
6113
  fe(H, Cv),
6114
6114
  fe(k, Gr),
6115
- fe(A, Gr),
6116
- fe(N),
6117
- fe(E),
6115
+ fe(N, Gr),
6116
+ fe(j),
6117
+ fe(R),
6118
6118
  fe(O),
6119
6119
  fe(z),
6120
6120
  fe(_)
@@ -6151,14 +6151,14 @@ const Tv = /* @__PURE__ */ Ie(
6151
6151
  I
6152
6152
  ), le(
6153
6153
  B(
6154
- N,
6154
+ j,
6155
6155
  pe((P) => P !== null),
6156
6156
  re((P) => P.length)
6157
6157
  ),
6158
- T
6158
+ C
6159
6159
  ), le(
6160
6160
  B(
6161
- Je(A, k, I, H),
6161
+ Je(N, k, I, H),
6162
6162
  pe(([P, Z, { items: ne }]) => ne.length > 0 && Z.height !== 0 && P.height !== 0),
6163
6163
  re(([P, Z, { items: ne }, ae]) => {
6164
6164
  const { bottom: se, top: je } = Pl(P, ae, Z, ne);
@@ -6179,7 +6179,7 @@ const Tv = /* @__PURE__ */ Ie(
6179
6179
  );
6180
6180
  const ee = wt(
6181
6181
  B(
6182
- Je(I, T),
6182
+ Je(I, C),
6183
6183
  pe(([{ items: P }]) => P.length > 0),
6184
6184
  Se(F),
6185
6185
  pe(([[P, Z], ne]) => {
@@ -6212,7 +6212,7 @@ const Tv = /* @__PURE__ */ Ie(
6212
6212
  le(be, b.scrollSeekRangeChanged), le(
6213
6213
  B(
6214
6214
  M,
6215
- Se(A, k, T, H),
6215
+ Se(N, k, C, H),
6216
6216
  re(([P, Z, ne, ae, se]) => {
6217
6217
  const je = lu(P), { align: Le, behavior: Oe, offset: ue } = je;
6218
6218
  let Pe = je.index;
@@ -6223,7 +6223,7 @@ const Tv = /* @__PURE__ */ Ie(
6223
6223
  ),
6224
6224
  c
6225
6225
  );
6226
- const Y = ct(
6226
+ const Y = ut(
6227
6227
  B(
6228
6228
  I,
6229
6229
  re((P) => P.offsetBottom + P.bottom)
@@ -6232,20 +6232,20 @@ const Tv = /* @__PURE__ */ Ie(
6232
6232
  );
6233
6233
  return le(
6234
6234
  B(
6235
- C,
6235
+ E,
6236
6236
  re((P) => ({ height: P.visibleHeight, width: P.visibleWidth }))
6237
6237
  ),
6238
- A
6238
+ N
6239
6239
  ), {
6240
6240
  customScrollParent: m,
6241
6241
  // input
6242
- data: N,
6242
+ data: j,
6243
6243
  deviation: G,
6244
6244
  footerHeight: o,
6245
6245
  gap: H,
6246
6246
  headerHeight: s,
6247
6247
  increaseViewportBy: e,
6248
- initialItemCount: E,
6248
+ initialItemCount: R,
6249
6249
  itemDimensions: k,
6250
6250
  overscan: n,
6251
6251
  restoreStateFrom: q,
@@ -6256,12 +6256,12 @@ const Tv = /* @__PURE__ */ Ie(
6256
6256
  scrollToIndex: M,
6257
6257
  scrollTop: u,
6258
6258
  smoothScrollTargetReached: d,
6259
- totalCount: T,
6259
+ totalCount: C,
6260
6260
  useWindowScroll: v,
6261
- viewportDimensions: A,
6261
+ viewportDimensions: N,
6262
6262
  windowScrollContainerState: w,
6263
6263
  windowScrollTo: y,
6264
- windowViewportRect: C,
6264
+ windowViewportRect: E,
6265
6265
  ...b,
6266
6266
  // output
6267
6267
  gridState: I,
@@ -6295,7 +6295,7 @@ function di(e, t, n, r) {
6295
6295
  return i > 0 ? i + t.row : i;
6296
6296
  }
6297
6297
  const Rv = /* @__PURE__ */ Ie(() => {
6298
- const e = V((h) => `Item ${h}`), t = V({}), n = V(null), r = V("virtuoso-grid-item"), o = V("virtuoso-grid-list"), s = V(qi), i = V("div"), a = V(or), c = (h, p = null) => ct(
6298
+ const e = V((h) => `Item ${h}`), t = V({}), n = V(null), r = V("virtuoso-grid-item"), o = V("virtuoso-grid-list"), s = V(qi), i = V("div"), a = V(or), c = (h, p = null) => ut(
6299
6299
  B(
6300
6300
  t,
6301
6301
  re((b) => b[h]),
@@ -6332,8 +6332,8 @@ const Rv = /* @__PURE__ */ Ie(() => {
6332
6332
  i(w);
6333
6333
  const y = v.firstChild;
6334
6334
  if (y) {
6335
- const { height: C, width: S } = y.getBoundingClientRect();
6336
- h({ height: C, width: S });
6335
+ const { height: E, width: S } = y.getBoundingClientRect();
6336
+ h({ height: E, width: S });
6337
6337
  }
6338
6338
  p({
6339
6339
  column: _l("column-gap", getComputedStyle(v).columnGap, b),
@@ -6352,7 +6352,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
6352
6352
  {
6353
6353
  className: t,
6354
6354
  ref: m,
6355
- ...lt(c, d),
6355
+ ...ct(c, d),
6356
6356
  "data-testid": "virtuoso-item-list",
6357
6357
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
6358
6358
  children: e.items.map((v) => {
@@ -6360,7 +6360,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
6360
6360
  return s ? /* @__PURE__ */ l.jsx(
6361
6361
  u,
6362
6362
  {
6363
- ...lt(u, d),
6363
+ ...ct(u, d),
6364
6364
  height: e.itemHeight,
6365
6365
  index: v.index,
6366
6366
  width: e.itemWidth
@@ -6369,7 +6369,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
6369
6369
  ) : /* @__PURE__ */ to(
6370
6370
  a,
6371
6371
  {
6372
- ...lt(a, d),
6372
+ ...ct(a, d),
6373
6373
  className: n,
6374
6374
  "data-index": v.index,
6375
6375
  key: w
@@ -6390,7 +6390,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
6390
6390
  !0,
6391
6391
  !1
6392
6392
  ), o = $e("context");
6393
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...lt(e, o) }) }) : null;
6393
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
6394
6394
  }), jv = K.memo(function() {
6395
6395
  const e = $e("FooterComponent"), t = Et("footerHeight"), n = $e("headerFooterTag"), r = An(
6396
6396
  K.useMemo(
@@ -6402,7 +6402,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
6402
6402
  !0,
6403
6403
  !1
6404
6404
  ), o = $e("context");
6405
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...lt(e, o) }) }) : null;
6405
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
6406
6406
  }), Av = ({ children: e }) => {
6407
6407
  const t = K.useContext(bu), n = Et("itemDimensions"), r = Et("viewportDimensions"), o = An(
6408
6408
  K.useMemo(
@@ -6424,7 +6424,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
6424
6424
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: Yo(!1), children: e });
6425
6425
  }, Pv = /* @__PURE__ */ K.memo(function({ ...e }) {
6426
6426
  const t = $e("useWindowScroll"), n = $e("customScrollParent"), r = n || t ? Ov : _v, o = n || t ? kv : Av, s = $e("context");
6427
- return /* @__PURE__ */ l.jsx(r, { ...e, ...lt(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
6427
+ return /* @__PURE__ */ l.jsx(r, { ...e, ...ct(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
6428
6428
  /* @__PURE__ */ l.jsx(Nv, {}),
6429
6429
  /* @__PURE__ */ l.jsx(Iv, {}),
6430
6430
  /* @__PURE__ */ l.jsx(jv, {})
@@ -7223,15 +7223,15 @@ var hb = "DismissableLayer", mi = "dismissableLayer.update", pb = "dismissableLa
7223
7223
  onInteractOutside: i,
7224
7224
  onDismiss: a,
7225
7225
  ...c
7226
- } = e, u = f.useContext(Mu), [d, h] = f.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, b] = f.useState({}), g = Ce(t, (E) => h(E)), x = Array.from(u.layers), [m] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), v = x.indexOf(m), w = d ? x.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= v, S = vb((E) => {
7227
- const I = E.target, A = [...u.branches].some((k) => k.contains(I));
7228
- !C || A || (o == null || o(E), i == null || i(E), E.defaultPrevented || a == null || a());
7229
- }, p), T = bb((E) => {
7230
- const I = E.target;
7231
- [...u.branches].some((k) => k.contains(I)) || (s == null || s(E), i == null || i(E), E.defaultPrevented || a == null || a());
7226
+ } = e, u = f.useContext(Mu), [d, h] = f.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, b] = f.useState({}), g = Ce(t, (R) => h(R)), x = Array.from(u.layers), [m] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), v = x.indexOf(m), w = d ? x.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, E = w >= v, S = vb((R) => {
7227
+ const I = R.target, N = [...u.branches].some((k) => k.contains(I));
7228
+ !E || N || (o == null || o(R), i == null || i(R), R.defaultPrevented || a == null || a());
7229
+ }, p), C = bb((R) => {
7230
+ const I = R.target;
7231
+ [...u.branches].some((k) => k.contains(I)) || (s == null || s(R), i == null || i(R), R.defaultPrevented || a == null || a());
7232
7232
  }, p);
7233
- return fb((E) => {
7234
- w === u.layers.size - 1 && (r == null || r(E), !E.defaultPrevented && a && (E.preventDefault(), a()));
7233
+ return fb((R) => {
7234
+ w === u.layers.size - 1 && (r == null || r(R), !R.defaultPrevented && a && (R.preventDefault(), a()));
7235
7235
  }, p), f.useEffect(() => {
7236
7236
  if (d)
7237
7237
  return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && ($l = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), zl(), () => {
@@ -7240,19 +7240,19 @@ var hb = "DismissableLayer", mi = "dismissableLayer.update", pb = "dismissableLa
7240
7240
  }, [d, p, n, u]), f.useEffect(() => () => {
7241
7241
  d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), zl());
7242
7242
  }, [d, u]), f.useEffect(() => {
7243
- const E = () => b({});
7244
- return document.addEventListener(mi, E), () => document.removeEventListener(mi, E);
7243
+ const R = () => b({});
7244
+ return document.addEventListener(mi, R), () => document.removeEventListener(mi, R);
7245
7245
  }, []), /* @__PURE__ */ l.jsx(
7246
7246
  me.div,
7247
7247
  {
7248
7248
  ...c,
7249
7249
  ref: g,
7250
7250
  style: {
7251
- pointerEvents: y ? C ? "auto" : "none" : void 0,
7251
+ pointerEvents: y ? E ? "auto" : "none" : void 0,
7252
7252
  ...e.style
7253
7253
  },
7254
- onFocusCapture: Q(e.onFocusCapture, T.onFocusCapture),
7255
- onBlurCapture: Q(e.onBlurCapture, T.onBlurCapture),
7254
+ onFocusCapture: Q(e.onFocusCapture, C.onFocusCapture),
7255
+ onBlurCapture: Q(e.onBlurCapture, C.onBlurCapture),
7256
7256
  onPointerDownCapture: Q(
7257
7257
  e.onPointerDownCapture,
7258
7258
  S.onPointerDownCapture
@@ -7345,12 +7345,12 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", Ul
7345
7345
  if (r) {
7346
7346
  let x = function(y) {
7347
7347
  if (b.paused || !a) return;
7348
- const C = y.target;
7349
- a.contains(C) ? h.current = C : rn(h.current, { select: !0 });
7348
+ const E = y.target;
7349
+ a.contains(E) ? h.current = E : rn(h.current, { select: !0 });
7350
7350
  }, m = function(y) {
7351
7351
  if (b.paused || !a) return;
7352
- const C = y.relatedTarget;
7353
- C !== null && (a.contains(C) || rn(h.current, { select: !0 }));
7352
+ const E = y.relatedTarget;
7353
+ E !== null && (a.contains(E) || rn(h.current, { select: !0 }));
7354
7354
  }, v = function(y) {
7355
7355
  if (document.activeElement === document.body)
7356
7356
  for (const S of y)
@@ -7383,8 +7383,8 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", Ul
7383
7383
  if (!n && !r || b.paused) return;
7384
7384
  const m = x.key === "Tab" && !x.altKey && !x.ctrlKey && !x.metaKey, v = document.activeElement;
7385
7385
  if (m && v) {
7386
- const w = x.currentTarget, [y, C] = Sb(w);
7387
- y && C ? !x.shiftKey && v === C ? (x.preventDefault(), n && rn(y, { select: !0 })) : x.shiftKey && v === y && (x.preventDefault(), n && rn(C, { select: !0 })) : v === w && x.preventDefault();
7386
+ const w = x.currentTarget, [y, E] = Sb(w);
7387
+ y && E ? !x.shiftKey && v === E ? (x.preventDefault(), n && rn(y, { select: !0 })) : x.shiftKey && v === y && (x.preventDefault(), n && rn(E, { select: !0 })) : v === w && x.preventDefault();
7388
7388
  }
7389
7389
  },
7390
7390
  [n, r, b.paused]
@@ -7624,12 +7624,12 @@ var Hu = Db(), zs = function() {
7624
7624
  onScrollCapture: zs,
7625
7625
  onWheelCapture: zs,
7626
7626
  onTouchMoveCapture: zs
7627
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, p = e.sideCar, b = e.noRelative, g = e.noIsolation, x = e.inert, m = e.allowPinchZoom, v = e.as, w = v === void 0 ? "div" : v, y = e.gapMode, C = Fu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = p, T = _b([n, t]), E = Vt(Vt({}, C), o);
7627
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, p = e.sideCar, b = e.noRelative, g = e.noIsolation, x = e.inert, m = e.allowPinchZoom, v = e.as, w = v === void 0 ? "div" : v, y = e.gapMode, E = Fu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = p, C = _b([n, t]), R = Vt(Vt({}, E), o);
7628
7628
  return f.createElement(
7629
7629
  f.Fragment,
7630
7630
  null,
7631
7631
  d && f.createElement(S, { sideCar: Hu, removeScrollBar: u, shards: h, noRelative: b, noIsolation: g, inert: x, setCallbacks: s, allowPinchZoom: !!m, lockRef: n, gapMode: y }),
7632
- i ? f.cloneElement(f.Children.only(a), Vt(Vt({}, E), { ref: T })) : f.createElement(w, Vt({}, E, { className: c, ref: T }), a)
7632
+ i ? f.cloneElement(f.Children.only(a), Vt(Vt({}, R), { ref: C })) : f.createElement(w, Vt({}, R, { className: c, ref: C }), a)
7633
7633
  );
7634
7634
  });
7635
7635
  Qo.defaultProps = {
@@ -7875,18 +7875,18 @@ function aw(e) {
7875
7875
  var a = f.useCallback(function(x, m) {
7876
7876
  if ("touches" in x && x.touches.length === 2 || x.type === "wheel" && x.ctrlKey)
7877
7877
  return !i.current.allowPinchZoom;
7878
- var v = Jr(x), w = n.current, y = "deltaX" in x ? x.deltaX : w[0] - v[0], C = "deltaY" in x ? x.deltaY : w[1] - v[1], S, T = x.target, E = Math.abs(y) > Math.abs(C) ? "h" : "v";
7879
- if ("touches" in x && E === "h" && T.type === "range")
7878
+ var v = Jr(x), w = n.current, y = "deltaX" in x ? x.deltaX : w[0] - v[0], E = "deltaY" in x ? x.deltaY : w[1] - v[1], S, C = x.target, R = Math.abs(y) > Math.abs(E) ? "h" : "v";
7879
+ if ("touches" in x && R === "h" && C.type === "range")
7880
7880
  return !1;
7881
- var I = Xl(E, T);
7881
+ var I = Xl(R, C);
7882
7882
  if (!I)
7883
7883
  return !0;
7884
- if (I ? S = E : (S = E === "v" ? "h" : "v", I = Xl(E, T)), !I)
7884
+ if (I ? S = R : (S = R === "v" ? "h" : "v", I = Xl(R, C)), !I)
7885
7885
  return !1;
7886
- if (!r.current && "changedTouches" in x && (y || C) && (r.current = S), !S)
7886
+ if (!r.current && "changedTouches" in x && (y || E) && (r.current = S), !S)
7887
7887
  return !0;
7888
- var A = r.current || S;
7889
- return rw(A, m, x, A === "h" ? y : C);
7888
+ var N = r.current || S;
7889
+ return rw(N, m, x, N === "h" ? y : E);
7890
7890
  }, []), c = f.useCallback(function(x) {
7891
7891
  var m = x;
7892
7892
  if (!(!Hn.length || Hn[Hn.length - 1] !== s)) {
@@ -7900,15 +7900,15 @@ function aw(e) {
7900
7900
  if (!w) {
7901
7901
  var y = (i.current.shards || []).map(Zl).filter(Boolean).filter(function(S) {
7902
7902
  return S.contains(m.target);
7903
- }), C = y.length > 0 ? a(m, y[0]) : !i.current.noIsolation;
7904
- C && m.cancelable && m.preventDefault();
7903
+ }), E = y.length > 0 ? a(m, y[0]) : !i.current.noIsolation;
7904
+ E && m.cancelable && m.preventDefault();
7905
7905
  }
7906
7906
  }
7907
7907
  }, []), u = f.useCallback(function(x, m, v, w) {
7908
7908
  var y = { name: x, delta: m, target: v, should: w, shadowParent: lw(v) };
7909
7909
  t.current.push(y), setTimeout(function() {
7910
- t.current = t.current.filter(function(C) {
7911
- return C !== y;
7910
+ t.current = t.current.filter(function(E) {
7911
+ return E !== y;
7912
7912
  });
7913
7913
  }, 1);
7914
7914
  }, []), d = f.useCallback(function(x) {
@@ -8454,9 +8454,9 @@ const Nw = K.memo(function({
8454
8454
  onCancelEdit: v,
8455
8455
  onCopy: w
8456
8456
  }) {
8457
- const [y, C] = de(!1), [S, T] = de(!1), [E, I] = de(!1), [A, k] = de(!1), { currentThreadId: M } = Fi();
8457
+ const [y, E] = de(!1), [S, C] = de(!1), [R, I] = de(!1), [N, k] = de(!1), { currentThreadId: M } = Fi();
8458
8458
  na();
8459
- const [W, G] = de({}), [N, H] = de(!1), [L, q] = de(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", X = K.useMemo(() => {
8459
+ const [W, G] = de({}), [j, H] = de(!1), [L, q] = de(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", X = K.useMemo(() => {
8460
8460
  switch (_) {
8461
8461
  case "user":
8462
8462
  return "text-[hsl(var(--chat-bubble-user-text))]";
@@ -8472,7 +8472,7 @@ const Nw = K.memo(function({
8472
8472
  }, [_]), oe = sn(() => jw(t.content), [t.content]), F = sn(() => Ow(t.content), [t.content]), ee = sn(() => t.content.filter((ue) => ue.type === "image_url"), [t.content]), he = sn(() => t.content.filter((ue) => ue.type === "file"), [t.content]), be = Dw(oe, r ? o : 0), Y = async () => {
8473
8473
  try {
8474
8474
  const ue = z ? zn(t.content) : oe;
8475
- await navigator.clipboard.writeText(ue), C(!0), setTimeout(() => C(!1), 2e3), w == null || w(ue);
8475
+ await navigator.clipboard.writeText(ue), E(!0), setTimeout(() => E(!1), 2e3), w == null || w(ue);
8476
8476
  } catch (ue) {
8477
8477
  console.error("Failed to copy:", ue);
8478
8478
  }
@@ -8553,7 +8553,7 @@ const Nw = K.memo(function({
8553
8553
  const xe = t.content.find((Fe) => Fe.type === "tool_result"), $ = (xe == null ? void 0 : xe.output) ?? zn(t.content), ie = gd($);
8554
8554
  if (ie) return /* @__PURE__ */ l.jsx(Fw, { issues: ie });
8555
8555
  }
8556
- if (z && !E) {
8556
+ if (z && !R) {
8557
8557
  const xe = zn(t.content).slice(0, 80).replace(/\s+/g, " ");
8558
8558
  return /* @__PURE__ */ l.jsx("div", { className: D("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", O && "text-[10px]"), children: /* @__PURE__ */ l.jsxs("span", { className: "truncate max-w-full text-current", children: [
8559
8559
  xe,
@@ -8562,7 +8562,7 @@ const Nw = K.memo(function({
8562
8562
  }
8563
8563
  if (z && d) {
8564
8564
  const xe = zn(t.content), $ = xe.length > h;
8565
- return /* @__PURE__ */ l.jsx(Ml, { open: S, onOpenChange: T, children: /* @__PURE__ */ l.jsxs("div", { className: "font-mono text-sm text-current", children: [
8565
+ return /* @__PURE__ */ l.jsx(Ml, { open: S, onOpenChange: C, children: /* @__PURE__ */ l.jsxs("div", { className: "font-mono text-sm text-current", children: [
8566
8566
  /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: $ && !S ? xe.substring(0, h) + "..." : xe }),
8567
8567
  $ && /* @__PURE__ */ l.jsx(Dl, { asChild: !0, children: /* @__PURE__ */ l.jsx(Ne, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8568
8568
  /* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3 mr-1" }),
@@ -8575,7 +8575,7 @@ const Nw = K.memo(function({
8575
8575
  ] }) }) })
8576
8576
  ] }) });
8577
8577
  }
8578
- if (z && E && !d) {
8578
+ if (z && R && !d) {
8579
8579
  const xe = Bw(t.content);
8580
8580
  if (xe && Aw(xe))
8581
8581
  return /* @__PURE__ */ l.jsx(qr, { content: xe.trim() });
@@ -8596,8 +8596,8 @@ const Nw = K.memo(function({
8596
8596
  if (_ === "user" && p) {
8597
8597
  const $ = oe.trim();
8598
8598
  if ($.length > b)
8599
- return /* @__PURE__ */ l.jsxs(Ml, { open: A, onOpenChange: k, children: [
8600
- /* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: A ? /* @__PURE__ */ l.jsx(qr, { content: $ }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8599
+ return /* @__PURE__ */ l.jsxs(Ml, { open: N, onOpenChange: k, children: [
8600
+ /* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: N ? /* @__PURE__ */ l.jsx(qr, { content: $ }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8601
8601
  $.substring(0, b),
8602
8602
  "..."
8603
8603
  ] }) }),
@@ -8607,7 +8607,7 @@ const Nw = K.memo(function({
8607
8607
  variant: "ghost",
8608
8608
  size: "sm",
8609
8609
  className: "h-6 text-xs !text-[hsl(var(--chat-bubble-user-text))]",
8610
- children: A ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8610
+ children: N ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8611
8611
  /* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3 mr-1" }),
8612
8612
  " Show less"
8613
8613
  ] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
@@ -8660,7 +8660,7 @@ const Nw = K.memo(function({
8660
8660
  onClick: () => I((ue) => !ue),
8661
8661
  children: [
8662
8662
  /* @__PURE__ */ l.jsx("span", { children: F.name }),
8663
- /* @__PURE__ */ l.jsx("span", { className: "inline-flex items-center", children: E ? /* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3" }) : /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3" }) })
8663
+ /* @__PURE__ */ l.jsx("span", { className: "inline-flex items-center", children: R ? /* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3" }) : /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3" }) })
8664
8664
  ]
8665
8665
  }
8666
8666
  ),
@@ -8673,7 +8673,7 @@ const Nw = K.memo(function({
8673
8673
  onClick: () => I((ue) => !ue),
8674
8674
  children: /* @__PURE__ */ l.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
8675
8675
  "Tool Output ",
8676
- E ? /* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3" }) : /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3" })
8676
+ R ? /* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3" }) : /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3" })
8677
8677
  ] })
8678
8678
  }
8679
8679
  )
@@ -8735,7 +8735,7 @@ const Nw = K.memo(function({
8735
8735
  }
8736
8736
  ),
8737
8737
  /* @__PURE__ */ l.jsx("div", { className: "relative", children: Le() }),
8738
- z && E && (F.toolCallId || F.name) && /* @__PURE__ */ l.jsxs("div", { className: D("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", O && "text-xs"), children: [
8738
+ z && R && (F.toolCallId || F.name) && /* @__PURE__ */ l.jsxs("div", { className: D("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", O && "text-xs"), children: [
8739
8739
  F.name && /* @__PURE__ */ l.jsxs("div", { children: [
8740
8740
  "Function: ",
8741
8741
  F.name
@@ -8791,7 +8791,7 @@ const Nw = K.memo(function({
8791
8791
  L && /* @__PURE__ */ l.jsx(
8792
8792
  Ew,
8793
8793
  {
8794
- isOpen: N,
8794
+ isOpen: j,
8795
8795
  onClose: () => {
8796
8796
  H(!1), q(null);
8797
8797
  },
@@ -9045,88 +9045,93 @@ function Hw({
9045
9045
  style: p,
9046
9046
  emptyMessage: b
9047
9047
  }) {
9048
- const g = dt(null), x = dt(!1), m = dt(!0), v = dt(e.length);
9048
+ const g = at(null), x = at(null), m = at(!1), v = at(!0), w = at(e.length);
9049
9049
  Ue(() => {
9050
- const C = g.current;
9051
- if (!C) return;
9052
- const S = () => {
9053
- const T = C.scrollHeight - C.scrollTop - C.clientHeight;
9054
- m.current = T <= 32;
9050
+ const S = g.current;
9051
+ if (!S) return;
9052
+ const C = () => {
9053
+ const R = S.scrollHeight - S.scrollTop - S.clientHeight;
9054
+ v.current = R <= 32;
9055
9055
  };
9056
- return C.addEventListener("scroll", S, { passive: !0 }), S(), () => {
9057
- C.removeEventListener("scroll", S);
9056
+ return S.addEventListener("scroll", C, { passive: !0 }), C(), () => {
9057
+ S.removeEventListener("scroll", C);
9058
9058
  };
9059
9059
  }, [e.length]), Ue(() => {
9060
- e.length < v.current && (m.current = !0), v.current = e.length;
9060
+ e.length < w.current && (v.current = !0), w.current = e.length;
9061
9061
  }, [e.length]), Ue(() => {
9062
- if (x.current || !m.current) return;
9063
- const C = g.current;
9064
- C && (C.scrollTop = C.scrollHeight, m.current = !0);
9062
+ var S;
9063
+ m.current || v.current && v.current && ((S = x.current) == null || S.scrollToIndex({ index: Math.max(0, e.length - 1), behavior: "auto", align: "end" }), v.current = !0);
9065
9064
  }, [e]);
9066
- const w = sn(() => {
9065
+ const y = sn(() => {
9067
9066
  if (a)
9068
9067
  return async () => {
9069
- if (x.current) return;
9070
- const C = g.current;
9071
- if (!C) {
9068
+ if (m.current) return;
9069
+ const S = g.current;
9070
+ if (!S) {
9072
9071
  await (a == null ? void 0 : a());
9073
9072
  return;
9074
9073
  }
9075
- const S = C.scrollHeight, T = C.scrollTop;
9076
- x.current = !0;
9074
+ const C = S.scrollHeight, R = S.scrollTop;
9075
+ m.current = !0;
9077
9076
  try {
9078
9077
  await a();
9079
9078
  } finally {
9080
9079
  requestAnimationFrame(() => {
9081
- const E = g.current;
9082
- if (!E) {
9083
- x.current = !1;
9080
+ const I = g.current;
9081
+ if (!I) {
9082
+ m.current = !1;
9084
9083
  return;
9085
9084
  }
9086
- const I = E.scrollHeight;
9087
- E.scrollTop = T + (I - S);
9088
- const A = I - E.scrollTop - E.clientHeight;
9089
- m.current = A <= 32, x.current = !1;
9085
+ const N = I.scrollHeight;
9086
+ I.scrollTop = R + (N - C);
9087
+ const k = N - I.scrollTop - I.clientHeight;
9088
+ v.current = k <= 32, m.current = !1;
9090
9089
  });
9091
9090
  }
9092
9091
  };
9093
- }, [a]), y = (C, S) => {
9094
- g.current = C, S && (typeof S == "function" ? S(C) : S.current = C);
9092
+ }, [a]), E = (S, C) => {
9093
+ g.current = S, C && (typeof C == "function" ? C(S) : C.current = S);
9095
9094
  };
9096
9095
  return e.length === 0 ? /* @__PURE__ */ l.jsx("div", { className: h, style: p, children: /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: b || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ l.jsx("div", { className: h, style: p, children: /* @__PURE__ */ l.jsx(
9097
9096
  bv,
9098
9097
  {
9098
+ ref: (S) => {
9099
+ x.current = S;
9100
+ },
9099
9101
  data: e,
9100
- followOutput: t ? "auto" : "smooth",
9102
+ followOutput: "smooth",
9101
9103
  overscan: 120,
9102
9104
  increaseViewportBy: { top: 200, bottom: 200 },
9103
9105
  startReached: () => {
9104
- w && w();
9106
+ y && y();
9107
+ },
9108
+ atBottomStateChange: (S) => {
9109
+ v.current = S;
9105
9110
  },
9106
9111
  style: { height: "100%", overscrollBehavior: "contain" },
9107
- computeItemKey: (C, S) => S.id ?? `message-${C}`,
9112
+ computeItemKey: (S, C) => C.id ?? `message-${S}`,
9108
9113
  components: {
9109
- Scroller: K.forwardRef((C, S) => /* @__PURE__ */ l.jsx(
9114
+ Scroller: K.forwardRef((S, C) => /* @__PURE__ */ l.jsx(
9110
9115
  "div",
9111
9116
  {
9112
- ...C,
9113
- ref: (T) => y(T, S),
9117
+ ...S,
9118
+ ref: (R) => E(R, C),
9114
9119
  style: {
9115
9120
  overflowAnchor: "none",
9116
9121
  willChange: "transform",
9117
- ...(C == null ? void 0 : C.style) ?? {}
9122
+ ...(S == null ? void 0 : S.style) ?? {}
9118
9123
  }
9119
9124
  }
9120
9125
  ))
9121
9126
  },
9122
- itemContent: (C, S) => /* @__PURE__ */ l.jsx(
9127
+ itemContent: (S, C) => /* @__PURE__ */ l.jsx("div", { className: "mb-4 last:mb-0", children: /* @__PURE__ */ l.jsx(
9123
9128
  Nw,
9124
9129
  {
9125
- message: S,
9126
- messageIndex: C,
9127
- isStreamingMessage: t && n === S.id,
9130
+ message: C,
9131
+ messageIndex: S,
9132
+ isStreamingMessage: t && n === C.id,
9128
9133
  streamingDebounceMs: r,
9129
- isEditing: i === S.id,
9134
+ isEditing: i === C.id,
9130
9135
  showActions: s,
9131
9136
  showTimestamp: !1,
9132
9137
  showAgentName: !0,
@@ -9134,11 +9139,11 @@ function Hw({
9134
9139
  truncateToolMessages: !1,
9135
9140
  toolMessagePreviewLength: 200,
9136
9141
  onEdit: c,
9137
- onRegenerate: () => u(C),
9142
+ onRegenerate: () => u(S),
9138
9143
  onCancelEdit: d
9139
9144
  },
9140
- S.id ?? `msg-${S.role}-${C}-${S.createdAt ?? ""}`
9141
- )
9145
+ C.id ?? `msg-${C.role}-${S}-${C.createdAt ?? ""}`
9146
+ ) })
9142
9147
  }
9143
9148
  ) });
9144
9149
  }
@@ -9192,15 +9197,15 @@ function la(e) {
9192
9197
  i.displayName = t;
9193
9198
  const a = e + "CollectionSlot", c = qn(a), u = K.forwardRef(
9194
9199
  (x, m) => {
9195
- const { scope: v, children: w } = x, y = s(a, v), C = Ce(m, y.collectionRef);
9196
- return /* @__PURE__ */ l.jsx(c, { ref: C, children: w });
9200
+ const { scope: v, children: w } = x, y = s(a, v), E = Ce(m, y.collectionRef);
9201
+ return /* @__PURE__ */ l.jsx(c, { ref: E, children: w });
9197
9202
  }
9198
9203
  );
9199
9204
  u.displayName = a;
9200
9205
  const d = e + "CollectionItemSlot", h = "data-radix-collection-item", p = qn(d), b = K.forwardRef(
9201
9206
  (x, m) => {
9202
- const { scope: v, children: w, ...y } = x, C = K.useRef(null), S = Ce(m, C), T = s(d, v);
9203
- return K.useEffect(() => (T.itemMap.set(C, { ref: C, ...y }), () => void T.itemMap.delete(C))), /* @__PURE__ */ l.jsx(p, { [h]: "", ref: S, children: w });
9207
+ const { scope: v, children: w, ...y } = x, E = K.useRef(null), S = Ce(m, E), C = s(d, v);
9208
+ return K.useEffect(() => (C.itemMap.set(E, { ref: E, ...y }), () => void C.itemMap.delete(E))), /* @__PURE__ */ l.jsx(p, { [h]: "", ref: S, children: w });
9204
9209
  }
9205
9210
  );
9206
9211
  b.displayName = d;
@@ -9211,7 +9216,7 @@ function la(e) {
9211
9216
  if (!w) return [];
9212
9217
  const y = Array.from(w.querySelectorAll(`[${h}]`));
9213
9218
  return Array.from(m.itemMap.values()).sort(
9214
- (T, E) => y.indexOf(T.ref.current) - y.indexOf(E.ref.current)
9219
+ (C, R) => y.indexOf(C.ref.current) - y.indexOf(R.ref.current)
9215
9220
  );
9216
9221
  }, [m.collectionRef, m.itemMap]);
9217
9222
  }
@@ -9402,7 +9407,7 @@ const ny = async (e, t, n) => {
9402
9407
  } = a[x], {
9403
9408
  x: w,
9404
9409
  y,
9405
- data: C,
9410
+ data: E,
9406
9411
  reset: S
9407
9412
  } = await v({
9408
9413
  x: d,
@@ -9422,7 +9427,7 @@ const ny = async (e, t, n) => {
9422
9427
  ...b,
9423
9428
  [m]: {
9424
9429
  ...b[m],
9425
- ...C
9430
+ ...E
9426
9431
  }
9427
9432
  }, S && g <= 50 && (g++, typeof S == "object" && (S.placement && (p = S.placement), S.rects && (u = S.rects === !0 ? await i.getElementRects({
9428
9433
  reference: e,
@@ -9467,7 +9472,7 @@ async function Rr(e, t) {
9467
9472
  y: o,
9468
9473
  width: i.floating.width,
9469
9474
  height: i.floating.height
9470
- } : i.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), C = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
9475
+ } : i.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), E = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
9471
9476
  x: 1,
9472
9477
  y: 1
9473
9478
  } : {
@@ -9480,10 +9485,10 @@ async function Rr(e, t) {
9480
9485
  strategy: c
9481
9486
  }) : w);
9482
9487
  return {
9483
- top: (v.top - S.top + g.top) / C.y,
9484
- bottom: (S.bottom - v.bottom + g.bottom) / C.y,
9485
- left: (v.left - S.left + g.left) / C.x,
9486
- right: (S.right - v.right + g.right) / C.x
9488
+ top: (v.top - S.top + g.top) / E.y,
9489
+ bottom: (S.bottom - v.bottom + g.bottom) / E.y,
9490
+ left: (v.left - S.left + g.left) / E.x,
9491
+ right: (S.right - v.right + g.right) / E.x
9487
9492
  };
9488
9493
  }
9489
9494
  const ry = (e) => ({
@@ -9507,15 +9512,15 @@ const ry = (e) => ({
9507
9512
  const h = xd(d), p = {
9508
9513
  x: n,
9509
9514
  y: r
9510
- }, b = da(o), g = ua(b), x = await i.getDimensions(u), m = b === "y", v = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", C = s.reference[g] + s.reference[b] - p[b] - s.floating[g], S = p[b] - s.reference[b], T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
9511
- let E = T ? T[y] : 0;
9512
- (!E || !await (i.isElement == null ? void 0 : i.isElement(T))) && (E = a.floating[y] || s.floating[g]);
9513
- const I = C / 2 - S / 2, A = E / 2 - x[g] / 2 - 1, k = un(h[v], A), M = un(h[w], A), W = k, G = E - x[g] - M, N = E / 2 - x[g] / 2 + I, H = xi(W, N, G), L = !c.arrow && sr(o) != null && N !== H && s.reference[g] / 2 - (N < W ? k : M) - x[g] / 2 < 0, q = L ? N < W ? N - W : N - G : 0;
9515
+ }, b = da(o), g = ua(b), x = await i.getDimensions(u), m = b === "y", v = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", E = s.reference[g] + s.reference[b] - p[b] - s.floating[g], S = p[b] - s.reference[b], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
9516
+ let R = C ? C[y] : 0;
9517
+ (!R || !await (i.isElement == null ? void 0 : i.isElement(C))) && (R = a.floating[y] || s.floating[g]);
9518
+ const I = E / 2 - S / 2, N = R / 2 - x[g] / 2 - 1, k = un(h[v], N), M = un(h[w], N), W = k, G = R - x[g] - M, j = R / 2 - x[g] / 2 + I, H = xi(W, j, G), L = !c.arrow && sr(o) != null && j !== H && s.reference[g] / 2 - (j < W ? k : M) - x[g] / 2 < 0, q = L ? j < W ? j - W : j - G : 0;
9514
9519
  return {
9515
9520
  [b]: p[b] + q,
9516
9521
  data: {
9517
9522
  [b]: H,
9518
- centerOffset: N - H - q,
9523
+ centerOffset: j - H - q,
9519
9524
  ...L && {
9520
9525
  alignmentOffset: q
9521
9526
  }
@@ -9547,26 +9552,26 @@ const ry = (e) => ({
9547
9552
  } = tn(e, t);
9548
9553
  if ((n = s.arrow) != null && n.alignmentOffset)
9549
9554
  return {};
9550
- const v = nn(o), w = Kt(a), y = nn(a) === a, C = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !x ? [Ao(a)] : Xw(a)), T = g !== "none";
9551
- !p && T && S.push(...ey(a, x, g, C));
9552
- const E = [a, ...S], I = await Rr(t, m), A = [];
9555
+ const v = nn(o), w = Kt(a), y = nn(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !x ? [Ao(a)] : Xw(a)), C = g !== "none";
9556
+ !p && C && S.push(...ey(a, x, g, E));
9557
+ const R = [a, ...S], I = await Rr(t, m), N = [];
9553
9558
  let k = ((r = s.flip) == null ? void 0 : r.overflows) || [];
9554
- if (d && A.push(I[v]), h) {
9555
- const N = qw(o, i, C);
9556
- A.push(I[N[0]], I[N[1]]);
9559
+ if (d && N.push(I[v]), h) {
9560
+ const j = qw(o, i, E);
9561
+ N.push(I[j[0]], I[j[1]]);
9557
9562
  }
9558
9563
  if (k = [...k, {
9559
9564
  placement: o,
9560
- overflows: A
9561
- }], !A.every((N) => N <= 0)) {
9565
+ overflows: N
9566
+ }], !N.every((j) => j <= 0)) {
9562
9567
  var M, W;
9563
- const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, H = E[N];
9568
+ const j = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, H = R[j];
9564
9569
  if (H && (!(h === "alignment" ? w !== Kt(H) : !1) || // We leave the current main axis only if every placement on that axis
9565
9570
  // overflows the main axis.
9566
9571
  k.every((O) => Kt(O.placement) === w ? O.overflows[0] > 0 : !0)))
9567
9572
  return {
9568
9573
  data: {
9569
- index: N,
9574
+ index: j,
9570
9575
  overflows: k
9571
9576
  },
9572
9577
  reset: {
@@ -9579,7 +9584,7 @@ const ry = (e) => ({
9579
9584
  case "bestFit": {
9580
9585
  var G;
9581
9586
  const q = (G = k.filter((O) => {
9582
- if (T) {
9587
+ if (C) {
9583
9588
  const _ = Kt(O.placement);
9584
9589
  return _ === w || // Create a bias to the `y` side axis due to horizontal
9585
9590
  // reading directions favoring greater width.
@@ -9791,13 +9796,13 @@ const ay = function(e) {
9791
9796
  ...x
9792
9797
  };
9793
9798
  if (c) {
9794
- const y = p === "y" ? "height" : "width", C = s.reference[p] - s.floating[y] + m.mainAxis, S = s.reference[p] + s.reference[y] - m.mainAxis;
9795
- b < C ? b = C : b > S && (b = S);
9799
+ const y = p === "y" ? "height" : "width", E = s.reference[p] - s.floating[y] + m.mainAxis, S = s.reference[p] + s.reference[y] - m.mainAxis;
9800
+ b < E ? b = E : b > S && (b = S);
9796
9801
  }
9797
9802
  if (u) {
9798
9803
  var v, w;
9799
- const y = p === "y" ? "width" : "height", C = vd.has(nn(o)), S = s.reference[h] - s.floating[y] + (C && ((v = i.offset) == null ? void 0 : v[h]) || 0) + (C ? 0 : m.crossAxis), T = s.reference[h] + s.reference[y] + (C ? 0 : ((w = i.offset) == null ? void 0 : w[h]) || 0) - (C ? m.crossAxis : 0);
9800
- g < S ? g = S : g > T && (g = T);
9804
+ const y = p === "y" ? "width" : "height", E = vd.has(nn(o)), S = s.reference[h] - s.floating[y] + (E && ((v = i.offset) == null ? void 0 : v[h]) || 0) + (E ? 0 : m.crossAxis), C = s.reference[h] + s.reference[y] + (E ? 0 : ((w = i.offset) == null ? void 0 : w[h]) || 0) - (E ? m.crossAxis : 0);
9805
+ g < S ? g = S : g > C && (g = C);
9801
9806
  }
9802
9807
  return {
9803
9808
  [p]: b,
@@ -9826,19 +9831,19 @@ const ay = function(e) {
9826
9831
  } = s.floating;
9827
9832
  let m, v;
9828
9833
  h === "top" || h === "bottom" ? (m = h, v = p === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (v = h, m = p === "end" ? "top" : "bottom");
9829
- const w = x - d.top - d.bottom, y = g - d.left - d.right, C = un(x - d[m], w), S = un(g - d[v], y), T = !t.middlewareData.shift;
9830
- let E = C, I = S;
9831
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (E = w), T && !p) {
9834
+ const w = x - d.top - d.bottom, y = g - d.left - d.right, E = un(x - d[m], w), S = un(g - d[v], y), C = !t.middlewareData.shift;
9835
+ let R = E, I = S;
9836
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (R = w), C && !p) {
9832
9837
  const k = vt(d.left, 0), M = vt(d.right, 0), W = vt(d.top, 0), G = vt(d.bottom, 0);
9833
- b ? I = g - 2 * (k !== 0 || M !== 0 ? k + M : vt(d.left, d.right)) : E = x - 2 * (W !== 0 || G !== 0 ? W + G : vt(d.top, d.bottom));
9838
+ b ? I = g - 2 * (k !== 0 || M !== 0 ? k + M : vt(d.left, d.right)) : R = x - 2 * (W !== 0 || G !== 0 ? W + G : vt(d.top, d.bottom));
9834
9839
  }
9835
9840
  await c({
9836
9841
  ...t,
9837
9842
  availableWidth: I,
9838
- availableHeight: E
9843
+ availableHeight: R
9839
9844
  });
9840
- const A = await i.getDimensions(a.floating);
9841
- return g !== A.width || x !== A.height ? {
9845
+ const N = await i.getDimensions(a.floating);
9846
+ return g !== N.width || x !== N.height ? {
9842
9847
  reset: {
9843
9848
  rects: !0
9844
9849
  }
@@ -10010,8 +10015,8 @@ function In(e, t, n, r) {
10010
10015
  const p = yt(s), b = r && Ft(r) ? yt(r) : r;
10011
10016
  let g = p, x = bi(g);
10012
10017
  for (; x && r && b !== g; ) {
10013
- const m = Kn(x), v = x.getBoundingClientRect(), w = Bt(x), y = v.left + (x.clientLeft + parseFloat(w.paddingLeft)) * m.x, C = v.top + (x.clientTop + parseFloat(w.paddingTop)) * m.y;
10014
- c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u += C, g = yt(x), x = bi(g);
10018
+ const m = Kn(x), v = x.getBoundingClientRect(), w = Bt(x), y = v.left + (x.clientLeft + parseFloat(w.paddingLeft)) * m.x, E = v.top + (x.clientTop + parseFloat(w.paddingTop)) * m.y;
10019
+ c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u += E, g = yt(x), x = bi(g);
10015
10020
  }
10016
10021
  }
10017
10022
  return ko({
@@ -10272,17 +10277,17 @@ function My(e, t) {
10272
10277
  rootMargin: -g + "px " + -x + "px " + -m + "px " + -v + "px",
10273
10278
  threshold: vt(0, un(1, c)) || 1
10274
10279
  };
10275
- let C = !0;
10276
- function S(T) {
10277
- const E = T[0].intersectionRatio;
10278
- if (E !== c) {
10279
- if (!C)
10280
+ let E = !0;
10281
+ function S(C) {
10282
+ const R = C[0].intersectionRatio;
10283
+ if (R !== c) {
10284
+ if (!E)
10280
10285
  return i();
10281
- E ? i(!1, E) : r = setTimeout(() => {
10286
+ R ? i(!1, R) : r = setTimeout(() => {
10282
10287
  i(!1, 1e-7);
10283
10288
  }, 1e3);
10284
10289
  }
10285
- E === 1 && !Ed(u, e.getBoundingClientRect()) && i(), C = !1;
10290
+ R === 1 && !Ed(u, e.getBoundingClientRect()) && i(), E = !1;
10286
10291
  }
10287
10292
  try {
10288
10293
  n = new IntersectionObserver(S, {
@@ -10415,18 +10420,18 @@ function Gy(e) {
10415
10420
  }), [p, b] = f.useState(r);
10416
10421
  Po(p, r) || b(r);
10417
10422
  const [g, x] = f.useState(null), [m, v] = f.useState(null), w = f.useCallback((O) => {
10418
- O !== T.current && (T.current = O, x(O));
10423
+ O !== C.current && (C.current = O, x(O));
10419
10424
  }, []), y = f.useCallback((O) => {
10420
- O !== E.current && (E.current = O, v(O));
10421
- }, []), C = s || g, S = i || m, T = f.useRef(null), E = f.useRef(null), I = f.useRef(d), A = c != null, k = Ks(c), M = Ks(o), W = Ks(u), G = f.useCallback(() => {
10422
- if (!T.current || !E.current)
10425
+ O !== R.current && (R.current = O, v(O));
10426
+ }, []), E = s || g, S = i || m, C = f.useRef(null), R = f.useRef(null), I = f.useRef(d), N = c != null, k = Ks(c), M = Ks(o), W = Ks(u), G = f.useCallback(() => {
10427
+ if (!C.current || !R.current)
10423
10428
  return;
10424
10429
  const O = {
10425
10430
  placement: t,
10426
10431
  strategy: n,
10427
10432
  middleware: p
10428
10433
  };
10429
- M.current && (O.platform = M.current), Uy(T.current, E.current, O).then((_) => {
10434
+ M.current && (O.platform = M.current), Uy(C.current, R.current, O).then((_) => {
10430
10435
  const z = {
10431
10436
  ..._,
10432
10437
  // The floating element's position may be recomputed while it's closed
@@ -10435,7 +10440,7 @@ function Gy(e) {
10435
10440
  // setting it to `true` when `open === false` (must be specified).
10436
10441
  isPositioned: W.current !== !1
10437
10442
  };
10438
- N.current && !Po(I.current, z) && (I.current = z, Fo.flushSync(() => {
10443
+ j.current && !Po(I.current, z) && (I.current = z, Fo.flushSync(() => {
10439
10444
  h(z);
10440
10445
  }));
10441
10446
  });
@@ -10446,25 +10451,25 @@ function Gy(e) {
10446
10451
  isPositioned: !1
10447
10452
  })));
10448
10453
  }, [u]);
10449
- const N = f.useRef(!1);
10450
- mo(() => (N.current = !0, () => {
10451
- N.current = !1;
10454
+ const j = f.useRef(!1);
10455
+ mo(() => (j.current = !0, () => {
10456
+ j.current = !1;
10452
10457
  }), []), mo(() => {
10453
- if (C && (T.current = C), S && (E.current = S), C && S) {
10458
+ if (E && (C.current = E), S && (R.current = S), E && S) {
10454
10459
  if (k.current)
10455
- return k.current(C, S, G);
10460
+ return k.current(E, S, G);
10456
10461
  G();
10457
10462
  }
10458
- }, [C, S, G, k, A]);
10463
+ }, [E, S, G, k, N]);
10459
10464
  const H = f.useMemo(() => ({
10460
- reference: T,
10461
- floating: E,
10465
+ reference: C,
10466
+ floating: R,
10462
10467
  setReference: w,
10463
10468
  setFloating: y
10464
10469
  }), [w, y]), L = f.useMemo(() => ({
10465
- reference: C,
10470
+ reference: E,
10466
10471
  floating: S
10467
- }), [C, S]), q = f.useMemo(() => {
10472
+ }), [E, S]), q = f.useMemo(() => {
10468
10473
  const O = {
10469
10474
  position: n,
10470
10475
  left: 0,
@@ -10608,15 +10613,15 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
10608
10613
  updatePositionStrategy: b = "optimized",
10609
10614
  onPlaced: g,
10610
10615
  ...x
10611
- } = e, m = kd(ga, n), [v, w] = f.useState(null), y = Ce(t, (je) => w(je)), [C, S] = f.useState(null), T = jd(C), E = (T == null ? void 0 : T.width) ?? 0, I = (T == null ? void 0 : T.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
10616
+ } = e, m = kd(ga, n), [v, w] = f.useState(null), y = Ce(t, (je) => w(je)), [E, S] = f.useState(null), C = jd(E), R = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, N = r + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
10612
10617
  padding: k,
10613
10618
  boundary: M.filter(aS),
10614
10619
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
10615
10620
  altBoundary: W
10616
- }, { refs: N, floatingStyles: H, placement: L, isPositioned: q, middlewareData: O } = Gy({
10621
+ }, { refs: j, floatingStyles: H, placement: L, isPositioned: q, middlewareData: O } = Gy({
10617
10622
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
10618
10623
  strategy: "fixed",
10619
- placement: A,
10624
+ placement: N,
10620
10625
  whileElementsMounted: (...je) => Dy(...je, {
10621
10626
  animationFrame: b === "always"
10622
10627
  }),
@@ -10639,8 +10644,8 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
10639
10644
  $.setProperty("--radix-popper-available-width", `${Oe}px`), $.setProperty("--radix-popper-available-height", `${ue}px`), $.setProperty("--radix-popper-anchor-width", `${Pe}px`), $.setProperty("--radix-popper-anchor-height", `${xe}px`);
10640
10645
  }
10641
10646
  }),
10642
- C && eS({ element: C, padding: a }),
10643
- lS({ arrowWidth: E, arrowHeight: I }),
10647
+ E && eS({ element: E, padding: a }),
10648
+ lS({ arrowWidth: R, arrowHeight: I }),
10644
10649
  p && Qy({ strategy: "referenceHidden", ...G })
10645
10650
  ]
10646
10651
  }), [_, z] = Fd(L), X = rt(g);
@@ -10653,7 +10658,7 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
10653
10658
  }, [v]), /* @__PURE__ */ l.jsx(
10654
10659
  "div",
10655
10660
  {
10656
- ref: N.setFloating,
10661
+ ref: j.setFloating,
10657
10662
  "data-radix-popper-content-wrapper": "",
10658
10663
  style: {
10659
10664
  ...H,
@@ -10797,7 +10802,7 @@ var pS = f.forwardRef((e, t) => {
10797
10802
  defaultProp: a ?? null,
10798
10803
  onChange: c,
10799
10804
  caller: $r
10800
- }), [v, w] = f.useState(!1), y = rt(u), C = Bd(n), S = f.useRef(!1), [T, E] = f.useState(0);
10805
+ }), [v, w] = f.useState(!1), y = rt(u), E = Bd(n), S = f.useRef(!1), [C, R] = f.useState(0);
10801
10806
  return f.useEffect(() => {
10802
10807
  const I = p.current;
10803
10808
  if (I)
@@ -10816,17 +10821,17 @@ var pS = f.forwardRef((e, t) => {
10816
10821
  ),
10817
10822
  onItemShiftTab: f.useCallback(() => w(!0), []),
10818
10823
  onFocusableItemAdd: f.useCallback(
10819
- () => E((I) => I + 1),
10824
+ () => R((I) => I + 1),
10820
10825
  []
10821
10826
  ),
10822
10827
  onFocusableItemRemove: f.useCallback(
10823
- () => E((I) => I - 1),
10828
+ () => R((I) => I - 1),
10824
10829
  []
10825
10830
  ),
10826
10831
  children: /* @__PURE__ */ l.jsx(
10827
10832
  me.div,
10828
10833
  {
10829
- tabIndex: v || T === 0 ? -1 : 0,
10834
+ tabIndex: v || C === 0 ? -1 : 0,
10830
10835
  "data-orientation": r,
10831
10836
  ...h,
10832
10837
  ref: b,
@@ -10835,11 +10840,11 @@ var pS = f.forwardRef((e, t) => {
10835
10840
  S.current = !0;
10836
10841
  }),
10837
10842
  onFocus: Q(e.onFocus, (I) => {
10838
- const A = !S.current;
10839
- if (I.target === I.currentTarget && A && !v) {
10843
+ const N = !S.current;
10844
+ if (I.target === I.currentTarget && N && !v) {
10840
10845
  const k = new CustomEvent(Ys, cS);
10841
10846
  if (I.currentTarget.dispatchEvent(k), !k.defaultPrevented) {
10842
- const M = C().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === x), H = [W, G, ...M].filter(
10847
+ const M = E().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === x), H = [W, G, ...M].filter(
10843
10848
  Boolean
10844
10849
  ).map((L) => L.ref.current);
10845
10850
  Wd(H, d);
@@ -10893,12 +10898,12 @@ var pS = f.forwardRef((e, t) => {
10893
10898
  if (v !== void 0) {
10894
10899
  if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
10895
10900
  m.preventDefault();
10896
- let y = p().filter((C) => C.focusable).map((C) => C.ref.current);
10901
+ let y = p().filter((E) => E.focusable).map((E) => E.ref.current);
10897
10902
  if (v === "last") y.reverse();
10898
10903
  else if (v === "prev" || v === "next") {
10899
10904
  v === "prev" && y.reverse();
10900
- const C = y.indexOf(m.currentTarget);
10901
- y = d.loop ? vS(y, C + 1) : y.slice(C + 1);
10905
+ const E = y.indexOf(m.currentTarget);
10906
+ y = d.loop ? vS(y, E + 1) : y.slice(E + 1);
10902
10907
  }
10903
10908
  setTimeout(() => Wd(y));
10904
10909
  }
@@ -11051,14 +11056,14 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11051
11056
  onDismiss: b,
11052
11057
  disableOutsideScroll: g,
11053
11058
  ...x
11054
- } = e, m = _n(It, n), v = Ur(It, n), w = us(n), y = Kd(n), C = RS(n), [S, T] = f.useState(null), E = f.useRef(null), I = Ce(t, E, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: OS, allowPinchZoom: !0 } : void 0, q = (_) => {
11059
+ } = e, m = _n(It, n), v = Ur(It, n), w = us(n), y = Kd(n), E = RS(n), [S, C] = f.useState(null), R = f.useRef(null), I = Ce(t, R, m.onContentChange), N = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), j = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: OS, allowPinchZoom: !0 } : void 0, q = (_) => {
11055
11060
  var Y, P;
11056
- const z = k.current + _, X = C().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = X.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, ee = X.map((Z) => Z.textValue), he = GS(ee, z, F), be = (P = X.find((Z) => Z.textValue === he)) == null ? void 0 : P.ref.current;
11061
+ const z = k.current + _, X = E().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = X.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, ee = X.map((Z) => Z.textValue), he = GS(ee, z, F), be = (P = X.find((Z) => Z.textValue === he)) == null ? void 0 : P.ref.current;
11057
11062
  (function Z(ne) {
11058
- k.current = ne, window.clearTimeout(A.current), ne !== "" && (A.current = window.setTimeout(() => Z(""), 1e3));
11063
+ k.current = ne, window.clearTimeout(N.current), ne !== "" && (N.current = window.setTimeout(() => Z(""), 1e3));
11059
11064
  })(z), be && setTimeout(() => be.focus());
11060
11065
  };
11061
- f.useEffect(() => () => window.clearTimeout(A.current), []), ra();
11066
+ f.useEffect(() => () => window.clearTimeout(N.current), []), ra();
11062
11067
  const O = f.useCallback((_) => {
11063
11068
  var X, oe;
11064
11069
  return G.current === ((X = W.current) == null ? void 0 : X.side) && YS(_, (oe = W.current) == null ? void 0 : oe.area);
@@ -11077,7 +11082,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11077
11082
  onItemLeave: f.useCallback(
11078
11083
  (_) => {
11079
11084
  var z;
11080
- O(_) || ((z = E.current) == null || z.focus(), T(null));
11085
+ O(_) || ((z = R.current) == null || z.focus(), C(null));
11081
11086
  },
11082
11087
  [O]
11083
11088
  ),
@@ -11098,7 +11103,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11098
11103
  trapped: o,
11099
11104
  onMountAutoFocus: Q(s, (_) => {
11100
11105
  var z;
11101
- _.preventDefault(), (z = E.current) == null || z.focus({ preventScroll: !0 });
11106
+ _.preventDefault(), (z = R.current) == null || z.focus({ preventScroll: !0 });
11102
11107
  }),
11103
11108
  onUnmountAutoFocus: i,
11104
11109
  children: /* @__PURE__ */ l.jsx(
@@ -11120,7 +11125,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11120
11125
  orientation: "vertical",
11121
11126
  loop: r,
11122
11127
  currentTabStopId: S,
11123
- onCurrentTabStopIdChange: T,
11128
+ onCurrentTabStopIdChange: C,
11124
11129
  onEntryFocus: Q(c, (_) => {
11125
11130
  v.isUsingKeyboardRef.current || _.preventDefault();
11126
11131
  }),
@@ -11140,22 +11145,22 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11140
11145
  onKeyDown: Q(x.onKeyDown, (_) => {
11141
11146
  const X = _.target.closest("[data-radix-menu-content]") === _.currentTarget, oe = _.ctrlKey || _.altKey || _.metaKey, F = _.key.length === 1;
11142
11147
  X && (_.key === "Tab" && _.preventDefault(), !oe && F && q(_.key));
11143
- const ee = E.current;
11148
+ const ee = R.current;
11144
11149
  if (_.target !== ee || !SS.includes(_.key)) return;
11145
11150
  _.preventDefault();
11146
- const be = C().filter((Y) => !Y.disabled).map((Y) => Y.ref.current);
11151
+ const be = E().filter((Y) => !Y.disabled).map((Y) => Y.ref.current);
11147
11152
  Vd.includes(_.key) && be.reverse(), WS(be);
11148
11153
  }),
11149
11154
  onBlur: Q(e.onBlur, (_) => {
11150
- _.currentTarget.contains(_.target) || (window.clearTimeout(A.current), k.current = "");
11155
+ _.currentTarget.contains(_.target) || (window.clearTimeout(N.current), k.current = "");
11151
11156
  }),
11152
11157
  onPointerMove: Q(
11153
11158
  e.onPointerMove,
11154
11159
  Nr((_) => {
11155
- const z = _.target, X = N.current !== _.clientX;
11160
+ const z = _.target, X = j.current !== _.clientX;
11156
11161
  if (_.currentTarget.contains(z) && X) {
11157
- const oe = _.clientX > N.current ? "right" : "left";
11158
- G.current = oe, N.current = _.clientX;
11162
+ const oe = _.clientX > j.current ? "right" : "left";
11163
+ G.current = oe, j.current = _.clientX;
11159
11164
  }
11160
11165
  })
11161
11166
  )
@@ -11818,14 +11823,14 @@ function go({
11818
11823
  send: v,
11819
11824
  stop: w,
11820
11825
  lastCheckpointId: y,
11821
- listCheckpoints: C,
11826
+ listCheckpoints: E,
11822
11827
  navigateToCheckpoint: S,
11823
- returnToLatest: T,
11824
- hasMoreHistory: E,
11828
+ returnToLatest: C,
11829
+ hasMoreHistory: R,
11825
11830
  isLoadingHistory: I,
11826
- loadOlderMessages: A,
11831
+ loadOlderMessages: N,
11827
11832
  api: k
11828
- } = Fi(), [M, W] = de(null), [G, N] = de(""), [H, L] = de(null), [q, O] = de([]), [_, z] = de(!1), [X, oe] = de(null), [F, ee] = de(null), [he, be] = de(!1), [Y, P] = de(null), [Z, ne] = de([]), [ae, se] = de(null), je = dt(null), Le = dt(null), Oe = dt(null), [ue, Pe] = de("desktop");
11833
+ } = Fi(), [M, W] = de(null), [G, j] = de(""), [H, L] = de(null), [q, O] = de([]), [_, z] = de(!1), [X, oe] = de(null), [F, ee] = de(null), [he, be] = de(!1), [Y, P] = de(null), [Z, ne] = de([]), [ae, se] = de(null), je = at(null), Le = at(null), Oe = at(null), [ue, Pe] = de("desktop");
11829
11834
  Ue(() => {
11830
11835
  const J = () => {
11831
11836
  const ce = window.innerWidth;
@@ -11843,7 +11848,7 @@ function go({
11843
11848
  checkpointId: y ?? null
11844
11849
  }, _e = Oe.current;
11845
11850
  if (!(_e && _e.threadId === ce.threadId && _e.checkpointId === ce.checkpointId))
11846
- return C(p).then((qe) => {
11851
+ return E(p).then((qe) => {
11847
11852
  if (J) return;
11848
11853
  const Mn = ((qe == null ? void 0 : qe.checkpoints) ?? []).slice().sort((Dn, Pt) => new Date(Pt.createdAt).getTime() - new Date(Dn.createdAt).getTime());
11849
11854
  ne(Mn), se((Dn) => {
@@ -11855,17 +11860,17 @@ function go({
11855
11860
  }), () => {
11856
11861
  J = !0;
11857
11862
  };
11858
- }, [p, y, C]), Ue(() => {
11863
+ }, [p, y, E]), Ue(() => {
11859
11864
  y && se(y);
11860
11865
  }, [y]);
11861
11866
  const xe = ze(async () => {
11862
- if (!(!E || I))
11867
+ if (!(!R || I))
11863
11868
  try {
11864
- await A();
11869
+ await N();
11865
11870
  } catch (J) {
11866
11871
  console.warn("loadOlderMessages failed", J);
11867
11872
  }
11868
- }, [E, I, A]);
11873
+ }, [R, I, N]);
11869
11874
  Ue(() => {
11870
11875
  (async () => {
11871
11876
  try {
@@ -11905,16 +11910,16 @@ function go({
11905
11910
  }
11906
11911
  }
11907
11912
  try {
11908
- await v(ce, { checkpointId: ae || y || void 0, payloadExtras: M ? { edit: !0, originalMessageId: M } : void 0, attachments: q }), u == null || u(ce), L(null), O([]), W(null), N("");
11913
+ await v(ce, { checkpointId: ae || y || void 0, payloadExtras: M ? { edit: !0, originalMessageId: M } : void 0, attachments: q }), u == null || u(ce), L(null), O([]), W(null), j("");
11909
11914
  } catch (_e) {
11910
11915
  const qe = (_e == null ? void 0 : _e.message) || "Failed to send message";
11911
11916
  L(qe), h == null || h(qe);
11912
11917
  }
11913
11918
  }
11914
11919
  }, et = K.useCallback((J, ce) => {
11915
- a && (W(J), N(ce), L(null));
11920
+ a && (W(J), j(ce), L(null));
11916
11921
  }, [a]), nt = K.useCallback(() => {
11917
- W(null), N(""), L(null);
11922
+ W(null), j(""), L(null);
11918
11923
  }, []), ot = ze((J, ce) => {
11919
11924
  et(J, ce);
11920
11925
  }, [et]), Ze = ze((J) => {
@@ -11952,12 +11957,12 @@ function go({
11952
11957
  }, it = async (J) => {
11953
11958
  if (p) {
11954
11959
  if (!J) {
11955
- await T(), se(null);
11960
+ await C(), se(null);
11956
11961
  return;
11957
11962
  }
11958
11963
  await S(J), se(J);
11959
11964
  }
11960
- }, kt = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${c.container || ""}`, xn = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 space-y-4 bg-transparent ${c.messagesArea || ""}`, On = `flex-shrink-0 w-full border-t p-4 bg-transparent ${c.inputArea || ""}`;
11965
+ }, kt = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${c.container || ""}`, xn = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 bg-transparent ${c.messagesArea || ""}`, On = `flex-shrink-0 w-full border-t p-4 bg-transparent ${c.inputArea || ""}`;
11961
11966
  return /* @__PURE__ */ l.jsxs("div", { className: kt, children: [
11962
11967
  !!m && !he && /* @__PURE__ */ l.jsxs("div", { className: "flex-shrink-0 bg-red-50 border border-red-200 text-red-800 px-4 py-2 text-sm flex items-center justify-between", children: [
11963
11968
  /* @__PURE__ */ l.jsx("span", { children: m }),
@@ -12167,7 +12172,7 @@ var Na = "ScrollArea", [Hf, hR] = $t(Na), [B0, jt] = Hf(Na), $f = f.forwardRef(
12167
12172
  dir: o,
12168
12173
  scrollHideDelay: s = 600,
12169
12174
  ...i
12170
- } = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, p] = f.useState(null), [b, g] = f.useState(null), [x, m] = f.useState(null), [v, w] = f.useState(0), [y, C] = f.useState(0), [S, T] = f.useState(!1), [E, I] = f.useState(!1), A = Ce(t, (M) => c(M)), k = ss(o);
12175
+ } = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, p] = f.useState(null), [b, g] = f.useState(null), [x, m] = f.useState(null), [v, w] = f.useState(0), [y, E] = f.useState(0), [S, C] = f.useState(!1), [R, I] = f.useState(!1), N = Ce(t, (M) => c(M)), k = ss(o);
12171
12176
  return /* @__PURE__ */ l.jsx(
12172
12177
  B0,
12173
12178
  {
@@ -12183,19 +12188,19 @@ var Na = "ScrollArea", [Hf, hR] = $t(Na), [B0, jt] = Hf(Na), $f = f.forwardRef(
12183
12188
  scrollbarX: b,
12184
12189
  onScrollbarXChange: g,
12185
12190
  scrollbarXEnabled: S,
12186
- onScrollbarXEnabledChange: T,
12191
+ onScrollbarXEnabledChange: C,
12187
12192
  scrollbarY: x,
12188
12193
  onScrollbarYChange: m,
12189
- scrollbarYEnabled: E,
12194
+ scrollbarYEnabled: R,
12190
12195
  onScrollbarYEnabledChange: I,
12191
12196
  onCornerWidthChange: w,
12192
- onCornerHeightChange: C,
12197
+ onCornerHeightChange: E,
12193
12198
  children: /* @__PURE__ */ l.jsx(
12194
12199
  me.div,
12195
12200
  {
12196
12201
  dir: k,
12197
12202
  ...i,
12198
- ref: A,
12203
+ ref: N,
12199
12204
  style: {
12200
12205
  position: "relative",
12201
12206
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
@@ -12489,20 +12494,20 @@ var H0 = f.forwardRef((e, t) => {
12489
12494
  onWheelScroll: d,
12490
12495
  onResize: h,
12491
12496
  ...p
12492
- } = e, b = jt(Zt, n), [g, x] = f.useState(null), m = Ce(t, (A) => x(A)), v = f.useRef(null), w = f.useRef(""), y = b.viewport, C = r.content - r.viewport, S = rt(d), T = rt(c), E = ps(h, 10);
12493
- function I(A) {
12497
+ } = e, b = jt(Zt, n), [g, x] = f.useState(null), m = Ce(t, (N) => x(N)), v = f.useRef(null), w = f.useRef(""), y = b.viewport, E = r.content - r.viewport, S = rt(d), C = rt(c), R = ps(h, 10);
12498
+ function I(N) {
12494
12499
  if (v.current) {
12495
- const k = A.clientX - v.current.left, M = A.clientY - v.current.top;
12500
+ const k = N.clientX - v.current.left, M = N.clientY - v.current.top;
12496
12501
  u({ x: k, y: M });
12497
12502
  }
12498
12503
  }
12499
12504
  return f.useEffect(() => {
12500
- const A = (k) => {
12505
+ const N = (k) => {
12501
12506
  const M = k.target;
12502
- (g == null ? void 0 : g.contains(M)) && S(k, C);
12507
+ (g == null ? void 0 : g.contains(M)) && S(k, E);
12503
12508
  };
12504
- return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
12505
- }, [y, g, C, S]), f.useEffect(T, [r, T]), Zn(g, E), Zn(b.content, E), /* @__PURE__ */ l.jsx(
12509
+ return document.addEventListener("wheel", N, { passive: !1 }), () => document.removeEventListener("wheel", N, { passive: !1 });
12510
+ }, [y, g, E, S]), f.useEffect(C, [r, C]), Zn(g, R), Zn(b.content, R), /* @__PURE__ */ l.jsx(
12506
12511
  W0,
12507
12512
  {
12508
12513
  scope: n,
@@ -12510,7 +12515,7 @@ var H0 = f.forwardRef((e, t) => {
12510
12515
  hasThumb: o,
12511
12516
  onThumbChange: rt(s),
12512
12517
  onThumbPointerUp: rt(i),
12513
- onThumbPositionChange: T,
12518
+ onThumbPositionChange: C,
12514
12519
  onThumbPointerDown: rt(a),
12515
12520
  children: /* @__PURE__ */ l.jsx(
12516
12521
  me.div,
@@ -12518,13 +12523,13 @@ var H0 = f.forwardRef((e, t) => {
12518
12523
  ...p,
12519
12524
  ref: m,
12520
12525
  style: { position: "absolute", ...p.style },
12521
- onPointerDown: Q(e.onPointerDown, (A) => {
12522
- A.button === 0 && (A.target.setPointerCapture(A.pointerId), v.current = g.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", b.viewport && (b.viewport.style.scrollBehavior = "auto"), I(A));
12526
+ onPointerDown: Q(e.onPointerDown, (N) => {
12527
+ N.button === 0 && (N.target.setPointerCapture(N.pointerId), v.current = g.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", b.viewport && (b.viewport.style.scrollBehavior = "auto"), I(N));
12523
12528
  }),
12524
12529
  onPointerMove: Q(e.onPointerMove, I),
12525
- onPointerUp: Q(e.onPointerUp, (A) => {
12526
- const k = A.target;
12527
- k.hasPointerCapture(A.pointerId) && k.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = w.current, b.viewport && (b.viewport.style.scrollBehavior = ""), v.current = null;
12530
+ onPointerUp: Q(e.onPointerUp, (N) => {
12531
+ const k = N.target;
12532
+ k.hasPointerCapture(N.pointerId) && k.releasePointerCapture(N.pointerId), document.body.style.webkitUserSelect = w.current, b.viewport && (b.viewport.style.scrollBehavior = ""), v.current = null;
12528
12533
  })
12529
12534
  }
12530
12535
  )
@@ -12718,11 +12723,11 @@ function Ti({
12718
12723
  createThread: x,
12719
12724
  deleteThread: m,
12720
12725
  renameThread: v
12721
- } = Fi(), [w, y] = de(p ?? []), [C, S] = de(!1), [T, E] = de(null), [I, A] = de(null), [k, M] = de(""), [W, G] = de(!1);
12726
+ } = Fi(), [w, y] = de(p ?? []), [E, S] = de(!1), [C, R] = de(null), [I, N] = de(null), [k, M] = de(""), [W, G] = de(!1);
12722
12727
  Ue(() => {
12723
12728
  y(p ?? []);
12724
12729
  }, [p]);
12725
- const N = async (F) => {
12730
+ const j = async (F) => {
12726
12731
  try {
12727
12732
  await h(F), a == null || a(F), c == null || c(F);
12728
12733
  } catch (ee) {
@@ -12746,16 +12751,16 @@ function Ti({
12746
12751
  console.error("Failed to delete thread:", he);
12747
12752
  }
12748
12753
  }, q = (F, ee) => {
12749
- ee.stopPropagation(), A(F.threadId), M(F.title || `Thread ${F.threadId.slice(0, 8)}`);
12754
+ ee.stopPropagation(), N(F.threadId), M(F.title || `Thread ${F.threadId.slice(0, 8)}`);
12750
12755
  }, O = async (F) => {
12751
12756
  if (k.trim())
12752
12757
  try {
12753
- await v(F, k.trim()), A(null), M("");
12758
+ await v(F, k.trim()), N(null), M("");
12754
12759
  } catch (ee) {
12755
12760
  console.error("Failed to update title:", ee);
12756
12761
  }
12757
12762
  }, _ = () => {
12758
- A(null), M("");
12763
+ N(null), M("");
12759
12764
  }, z = (F, ee) => {
12760
12765
  F.key === "Enter" ? O(ee) : F.key === "Escape" && _();
12761
12766
  }, X = (F) => {
@@ -12772,7 +12777,7 @@ function Ti({
12772
12777
  Ne,
12773
12778
  {
12774
12779
  onClick: H,
12775
- disabled: W || C,
12780
+ disabled: W || E,
12776
12781
  className: s.createButton || "p-2",
12777
12782
  size: "sm",
12778
12783
  variant: "ghost",
@@ -12785,13 +12790,13 @@ function Ti({
12785
12790
  {
12786
12791
  className: `flex-1 min-h-0 ${s.threadList || ""}`,
12787
12792
  style: o ? { maxHeight: o } : void 0,
12788
- children: /* @__PURE__ */ l.jsx("div", { className: "p-2 space-y-1 pb-4", children: C ? /* @__PURE__ */ l.jsx("div", { className: "text-center py-8 text-slate-400", children: "Loading…" }) : w.length === 0 ? /* @__PURE__ */ l.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
12793
+ children: /* @__PURE__ */ l.jsx("div", { className: "p-2 space-y-1 pb-4", children: E ? /* @__PURE__ */ l.jsx("div", { className: "text-center py-8 text-slate-400", children: "Loading…" }) : w.length === 0 ? /* @__PURE__ */ l.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
12789
12794
  /* @__PURE__ */ l.jsx(Jp, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
12790
12795
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-slate-500", children: "No conversations yet" })
12791
12796
  ] }) : w.slice().sort((F, ee) => new Date(ee.updatedAt || ee.createdAt || "").getTime() - new Date(F.updatedAt || F.createdAt || "").getTime()).map((F) => /* @__PURE__ */ l.jsxs(
12792
12797
  "div",
12793
12798
  {
12794
- onClick: () => N(F.threadId),
12799
+ onClick: () => j(F.threadId),
12795
12800
  className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? g) === 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`,
12796
12801
  children: [
12797
12802
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
@@ -13137,15 +13142,15 @@ var Ar = "Tooltip", [hC, xs] = ms(Ar), gh = (e) => {
13137
13142
  } = e, c = Oa(Ar, e.__scopeTooltip), u = gs(t), [d, h] = f.useState(null), p = Dt(), b = f.useRef(0), g = i ?? c.disableHoverableContent, x = a ?? c.delayDuration, m = f.useRef(!1), [v, w] = cn({
13138
13143
  prop: r,
13139
13144
  defaultProp: o ?? !1,
13140
- onChange: (E) => {
13141
- E ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Ri))) : c.onClose(), s == null || s(E);
13145
+ onChange: (R) => {
13146
+ R ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Ri))) : c.onClose(), s == null || s(R);
13142
13147
  },
13143
13148
  caller: Ar
13144
- }), y = f.useMemo(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [v]), C = f.useCallback(() => {
13149
+ }), y = f.useMemo(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [v]), E = f.useCallback(() => {
13145
13150
  window.clearTimeout(b.current), b.current = 0, m.current = !1, w(!0);
13146
13151
  }, [w]), S = f.useCallback(() => {
13147
13152
  window.clearTimeout(b.current), b.current = 0, w(!1);
13148
- }, [w]), T = f.useCallback(() => {
13153
+ }, [w]), C = f.useCallback(() => {
13149
13154
  window.clearTimeout(b.current), b.current = window.setTimeout(() => {
13150
13155
  m.current = !0, w(!0), b.current = 0;
13151
13156
  }, x);
@@ -13162,12 +13167,12 @@ var Ar = "Tooltip", [hC, xs] = ms(Ar), gh = (e) => {
13162
13167
  trigger: d,
13163
13168
  onTriggerChange: h,
13164
13169
  onTriggerEnter: f.useCallback(() => {
13165
- c.isOpenDelayedRef.current ? T() : C();
13166
- }, [c.isOpenDelayedRef, T, C]),
13170
+ c.isOpenDelayedRef.current ? C() : E();
13171
+ }, [c.isOpenDelayedRef, C, E]),
13167
13172
  onTriggerLeave: f.useCallback(() => {
13168
13173
  g ? S() : (window.clearTimeout(b.current), b.current = 0);
13169
13174
  }, [S, g]),
13170
- onOpen: C,
13175
+ onOpen: E,
13171
13176
  onClose: S,
13172
13177
  disableHoverableContent: g,
13173
13178
  children: n
@@ -13216,7 +13221,7 @@ var pC = "TooltipPortal", [bR, mC] = ms(pC, {
13216
13221
  a(null), h(!1);
13217
13222
  }, [h]), b = f.useCallback(
13218
13223
  (g, x) => {
13219
- const m = g.currentTarget, v = { x: g.clientX, y: g.clientY }, w = yC(v, m.getBoundingClientRect()), y = SC(v, w), C = CC(x.getBoundingClientRect()), S = RC([...y, ...C]);
13224
+ const m = g.currentTarget, v = { x: g.clientX, y: g.clientY }, w = yC(v, m.getBoundingClientRect()), y = SC(v, w), E = CC(x.getBoundingClientRect()), S = RC([...y, ...E]);
13220
13225
  a(S), h(!0);
13221
13226
  },
13222
13227
  [h]
@@ -14006,7 +14011,7 @@ var bs = "Switch", [QC, yR] = $t(bs), [eT, tT] = QC(bs), Bh = f.forwardRef(
14006
14011
  ...h,
14007
14012
  ref: g,
14008
14013
  onClick: Q(e.onClick, (y) => {
14009
- w((C) => !C), m && (x.current = y.isPropagationStopped(), x.current || y.stopPropagation());
14014
+ w((E) => !E), m && (x.current = y.isPropagationStopped(), x.current || y.stopPropagation());
14010
14015
  })
14011
14016
  }
14012
14017
  ),
@@ -14128,17 +14133,17 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
14128
14133
  disabled: p,
14129
14134
  required: b,
14130
14135
  form: g
14131
- } = e, x = Ss(t), [m, v] = f.useState(null), [w, y] = f.useState(null), [C, S] = f.useState(!1), T = ss(u), [E, I] = cn({
14136
+ } = e, x = Ss(t), [m, v] = f.useState(null), [w, y] = f.useState(null), [E, S] = f.useState(!1), C = ss(u), [R, I] = cn({
14132
14137
  prop: r,
14133
14138
  defaultProp: o ?? !1,
14134
14139
  onChange: s,
14135
14140
  caller: Nn
14136
- }), [A, k] = cn({
14141
+ }), [N, k] = cn({
14137
14142
  prop: i,
14138
14143
  defaultProp: a,
14139
14144
  onChange: c,
14140
14145
  caller: Nn
14141
- }), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, N] = f.useState(/* @__PURE__ */ new Set()), H = Array.from(G).map((L) => L.props.value).join(";");
14146
+ }), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, j] = f.useState(/* @__PURE__ */ new Set()), H = Array.from(G).map((L) => L.props.value).join(";");
14142
14147
  return /* @__PURE__ */ l.jsx(xa, { ...x, children: /* @__PURE__ */ l.jsxs(
14143
14148
  aT,
14144
14149
  {
@@ -14148,14 +14153,14 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
14148
14153
  onTriggerChange: v,
14149
14154
  valueNode: w,
14150
14155
  onValueNodeChange: y,
14151
- valueNodeHasChildren: C,
14156
+ valueNodeHasChildren: E,
14152
14157
  onValueNodeHasChildrenChange: S,
14153
14158
  contentId: Dt(),
14154
- value: A,
14159
+ value: N,
14155
14160
  onValueChange: k,
14156
- open: E,
14161
+ open: R,
14157
14162
  onOpenChange: I,
14158
- dir: T,
14163
+ dir: C,
14159
14164
  triggerPointerDownPosRef: M,
14160
14165
  disabled: p,
14161
14166
  children: [
@@ -14164,10 +14169,10 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
14164
14169
  {
14165
14170
  scope: e.__scopeSelect,
14166
14171
  onNativeOptionAdd: f.useCallback((L) => {
14167
- N((q) => new Set(q).add(L));
14172
+ j((q) => new Set(q).add(L));
14168
14173
  }, []),
14169
14174
  onNativeOptionRemove: f.useCallback((L) => {
14170
- N((q) => {
14175
+ j((q) => {
14171
14176
  const O = new Set(q);
14172
14177
  return O.delete(L), O;
14173
14178
  });
@@ -14183,12 +14188,12 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
14183
14188
  tabIndex: -1,
14184
14189
  name: d,
14185
14190
  autoComplete: h,
14186
- value: A,
14191
+ value: N,
14187
14192
  onChange: (L) => k(L.target.value),
14188
14193
  disabled: p,
14189
14194
  form: g,
14190
14195
  children: [
14191
- A === void 0 ? /* @__PURE__ */ l.jsx("option", { value: "" }) : null,
14196
+ N === void 0 ? /* @__PURE__ */ l.jsx("option", { value: "" }) : null,
14192
14197
  Array.from(G)
14193
14198
  ]
14194
14199
  },
@@ -14307,9 +14312,9 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
14307
14312
  avoidCollisions: m,
14308
14313
  //
14309
14314
  ...v
14310
- } = e, w = mn(jn, n), [y, C] = f.useState(null), [S, T] = f.useState(null), E = Ce(t, (Y) => C(Y)), [I, A] = f.useState(null), [k, M] = f.useState(
14315
+ } = e, w = mn(jn, n), [y, E] = f.useState(null), [S, C] = f.useState(null), R = Ce(t, (Y) => E(Y)), [I, N] = f.useState(null), [k, M] = f.useState(
14311
14316
  null
14312
- ), W = ys(n), [G, N] = f.useState(!1), H = f.useRef(!1);
14317
+ ), W = ys(n), [G, j] = f.useState(!1), H = f.useRef(!1);
14313
14318
  f.useEffect(() => {
14314
14319
  if (y) return oa(y);
14315
14320
  }, [y]), ra();
@@ -14356,7 +14361,7 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
14356
14361
  }), oe = f.useCallback(
14357
14362
  (Y, P, Z) => {
14358
14363
  const ne = !H.current && !Z;
14359
- (w.value !== void 0 && w.value === P || ne) && (A(Y), ne && (H.current = !0));
14364
+ (w.value !== void 0 && w.value === P || ne) && (N(Y), ne && (H.current = !0));
14360
14365
  },
14361
14366
  [w.value]
14362
14367
  ), F = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), ee = f.useCallback(
@@ -14383,7 +14388,7 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
14383
14388
  scope: n,
14384
14389
  content: y,
14385
14390
  viewport: S,
14386
- onViewportChange: T,
14391
+ onViewportChange: C,
14387
14392
  itemRefCallback: oe,
14388
14393
  selectedItem: I,
14389
14394
  onItemLeave: F,
@@ -14424,8 +14429,8 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
14424
14429
  onContextMenu: (Y) => Y.preventDefault(),
14425
14430
  ...v,
14426
14431
  ...be,
14427
- onPlaced: () => N(!0),
14428
- ref: E,
14432
+ onPlaced: () => j(!0),
14433
+ ref: R,
14429
14434
  style: {
14430
14435
  // flex layout so we can place the scroll buttons properly
14431
14436
  display: "flex",
@@ -14457,11 +14462,11 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
14457
14462
  );
14458
14463
  ep.displayName = fT;
14459
14464
  var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
14460
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = mn(jn, n), i = gn(jn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Ce(t, (E) => d(E)), p = ys(n), b = f.useRef(!1), g = f.useRef(!0), { viewport: x, selectedItem: m, selectedItemText: v, focusSelectedItem: w } = i, y = f.useCallback(() => {
14465
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = mn(jn, n), i = gn(jn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Ce(t, (R) => d(R)), p = ys(n), b = f.useRef(!1), g = f.useRef(!0), { viewport: x, selectedItem: m, selectedItemText: v, focusSelectedItem: w } = i, y = f.useCallback(() => {
14461
14466
  if (s.trigger && s.valueNode && a && u && x && m && v) {
14462
- const E = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), k = v.getBoundingClientRect();
14467
+ const R = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), k = v.getBoundingClientRect();
14463
14468
  if (s.dir !== "rtl") {
14464
- const ae = k.left - I.left, se = A.left - ae, je = E.left - se, Le = E.width + je, Oe = Math.max(Le, I.width), ue = window.innerWidth - Ot, Pe = Ci(se, [
14469
+ const ae = k.left - I.left, se = N.left - ae, je = R.left - se, Le = R.width + je, Oe = Math.max(Le, I.width), ue = window.innerWidth - Ot, Pe = Ci(se, [
14465
14470
  Ot,
14466
14471
  // Prevents the content from going off the starting edge of the
14467
14472
  // viewport. It may still go off the ending edge, but this can be
@@ -14472,13 +14477,13 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
14472
14477
  ]);
14473
14478
  a.style.minWidth = Le + "px", a.style.left = Pe + "px";
14474
14479
  } else {
14475
- const ae = I.right - k.right, se = window.innerWidth - A.right - ae, je = window.innerWidth - E.right - se, Le = E.width + je, Oe = Math.max(Le, I.width), ue = window.innerWidth - Ot, Pe = Ci(se, [
14480
+ const ae = I.right - k.right, se = window.innerWidth - N.right - ae, je = window.innerWidth - R.right - se, Le = R.width + je, Oe = Math.max(Le, I.width), ue = window.innerWidth - Ot, Pe = Ci(se, [
14476
14481
  Ot,
14477
14482
  Math.max(Ot, ue - Oe)
14478
14483
  ]);
14479
14484
  a.style.minWidth = Le + "px", a.style.right = Pe + "px";
14480
14485
  }
14481
- const M = p(), W = window.innerHeight - Ot * 2, G = x.scrollHeight, N = window.getComputedStyle(u), H = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), q = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = H + L + G + O + q, z = Math.min(m.offsetHeight * 5, _), X = window.getComputedStyle(x), oe = parseInt(X.paddingTop, 10), F = parseInt(X.paddingBottom, 10), ee = E.top + E.height / 2 - Ot, he = W - ee, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = H + L + Y, Z = _ - P;
14486
+ const M = p(), W = window.innerHeight - Ot * 2, G = x.scrollHeight, j = window.getComputedStyle(u), H = parseInt(j.borderTopWidth, 10), L = parseInt(j.paddingTop, 10), q = parseInt(j.borderBottomWidth, 10), O = parseInt(j.paddingBottom, 10), _ = H + L + G + O + q, z = Math.min(m.offsetHeight * 5, _), X = window.getComputedStyle(x), oe = parseInt(X.paddingTop, 10), F = parseInt(X.paddingBottom, 10), ee = R.top + R.height / 2 - Ot, he = W - ee, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = H + L + Y, Z = _ - P;
14482
14487
  if (P <= ee) {
14483
14488
  const ae = M.length > 0 && m === M[M.length - 1].ref.current;
14484
14489
  a.style.bottom = "0px";
@@ -14513,13 +14518,13 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
14513
14518
  r
14514
14519
  ]);
14515
14520
  tt(() => y(), [y]);
14516
- const [C, S] = f.useState();
14521
+ const [E, S] = f.useState();
14517
14522
  tt(() => {
14518
14523
  u && S(window.getComputedStyle(u).zIndex);
14519
14524
  }, [u]);
14520
- const T = f.useCallback(
14521
- (E) => {
14522
- E && g.current === !0 && (y(), w == null || w(), g.current = !1);
14525
+ const C = f.useCallback(
14526
+ (R) => {
14527
+ R && g.current === !0 && (y(), w == null || w(), g.current = !1);
14523
14528
  },
14524
14529
  [y, w]
14525
14530
  );
@@ -14529,7 +14534,7 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
14529
14534
  scope: n,
14530
14535
  contentWrapper: a,
14531
14536
  shouldExpandOnScrollRef: b,
14532
- onScrollButtonChange: T,
14537
+ onScrollButtonChange: C,
14533
14538
  children: /* @__PURE__ */ l.jsx(
14534
14539
  "div",
14535
14540
  {
@@ -14538,7 +14543,7 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
14538
14543
  display: "flex",
14539
14544
  flexDirection: "column",
14540
14545
  position: "fixed",
14541
- zIndex: C
14546
+ zIndex: E
14542
14547
  },
14543
14548
  children: /* @__PURE__ */ l.jsx(
14544
14549
  me.div,
@@ -14630,8 +14635,8 @@ var [gT, Ma] = lr(jn, {}), Ni = "SelectViewport", np = f.forwardRef(
14630
14635
  if (b > 0) {
14631
14636
  const g = window.innerHeight - Ot * 2, x = parseFloat(h.style.minHeight), m = parseFloat(h.style.height), v = Math.max(x, m);
14632
14637
  if (v < g) {
14633
- const w = v + b, y = Math.min(g, w), C = w - y;
14634
- h.style.height = y + "px", h.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, h.style.justifyContent = "flex-end");
14638
+ const w = v + b, y = Math.min(g, w), E = w - y;
14639
+ h.style.height = y + "px", h.style.bottom === "0px" && (d.scrollTop = E > 0 ? E : 0, h.style.justifyContent = "flex-end");
14635
14640
  }
14636
14641
  }
14637
14642
  }
@@ -14729,8 +14734,8 @@ var Lo = "SelectItem", [wT, ip] = lr(Lo), ap = f.forwardRef(
14729
14734
  w.currentTarget === document.activeElement && ((y = c.onItemLeave) == null || y.call(c));
14730
14735
  }),
14731
14736
  onKeyDown: Q(i.onKeyDown, (w) => {
14732
- var C;
14733
- ((C = c.searchRef) == null ? void 0 : C.current) !== "" && w.key === " " || (sT.includes(w.key) && v(), w.key === " " && w.preventDefault());
14737
+ var E;
14738
+ ((E = c.searchRef) == null ? void 0 : E.current) !== "" && w.key === " " || (sT.includes(w.key) && v(), w.key === " " && w.preventDefault());
14734
14739
  })
14735
14740
  }
14736
14741
  )