teodor-new-chat-ui 3.0.40 → 3.0.41
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 +434 -432
- package/dist/index.umd.js +8 -8
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as f from "react";
|
|
2
|
-
import Y, { useState as be, useRef as bt, useCallback as
|
|
2
|
+
import Y, { useState as be, useRef as bt, useCallback as qe, useEffect as et, useReducer as yh, useMemo as wn, createContext as cc, useContext as uc, createElement as no, useLayoutEffect as Sh } from "react";
|
|
3
3
|
import * as Bo from "react-dom";
|
|
4
4
|
import dc from "react-dom";
|
|
5
5
|
import { Square as fc, Send as Ch, ChevronUp as dr, ChevronDown as zn, Copy as Da, Edit as La, RotateCcw as Ks, Bot as Fa, Wrench as Th, User as Eh, Image as Rh, Loader as Ih, ChevronRight as Nh, Check as Pi, Circle as Ah, X as hr, Edit3 as pc, Paperclip as Ba, Loader2 as jh, Plus as Ph, FileSpreadsheet as kh, MessageSquarePlus as _h, MessageSquare as Oh, Calendar as Mh, Trash2 as Dh, PanelLeft as Lh, Settings as Fh, Server as Bh, EyeOff as Hh, Eye as $h, Layout as zh, MessageCircle as Uh, Save as Wh } from "lucide-react";
|
|
@@ -240,42 +240,42 @@ function Xh() {
|
|
|
240
240
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
241
241
|
try {
|
|
242
242
|
Reflect.construct(je, []);
|
|
243
|
-
} catch (
|
|
244
|
-
ve =
|
|
243
|
+
} catch (tn) {
|
|
244
|
+
ve = tn;
|
|
245
245
|
}
|
|
246
246
|
Reflect.construct(T, [], je);
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
je.call();
|
|
250
|
-
} catch (
|
|
251
|
-
ve =
|
|
250
|
+
} catch (tn) {
|
|
251
|
+
ve = tn;
|
|
252
252
|
}
|
|
253
253
|
T.call(je.prototype);
|
|
254
254
|
}
|
|
255
255
|
} else {
|
|
256
256
|
try {
|
|
257
257
|
throw Error();
|
|
258
|
-
} catch (
|
|
259
|
-
ve =
|
|
258
|
+
} catch (tn) {
|
|
259
|
+
ve = tn;
|
|
260
260
|
}
|
|
261
261
|
T();
|
|
262
262
|
}
|
|
263
|
-
} catch (
|
|
264
|
-
if (
|
|
265
|
-
for (var Ie =
|
|
263
|
+
} catch (tn) {
|
|
264
|
+
if (tn && ve && typeof tn.stack == "string") {
|
|
265
|
+
for (var Ie = tn.stack.split(`
|
|
266
266
|
`), dt = ve.stack.split(`
|
|
267
|
-
`),
|
|
267
|
+
`), Xe = Ie.length - 1, Qe = dt.length - 1; Xe >= 1 && Qe >= 0 && Ie[Xe] !== dt[Qe]; )
|
|
268
268
|
Qe--;
|
|
269
|
-
for (;
|
|
270
|
-
if (Ie[
|
|
271
|
-
if (
|
|
269
|
+
for (; Xe >= 1 && Qe >= 0; Xe--, Qe--)
|
|
270
|
+
if (Ie[Xe] !== dt[Qe]) {
|
|
271
|
+
if (Xe !== 1 || Qe !== 1)
|
|
272
272
|
do
|
|
273
|
-
if (
|
|
273
|
+
if (Xe--, Qe--, Qe < 0 || Ie[Xe] !== dt[Qe]) {
|
|
274
274
|
var Et = `
|
|
275
|
-
` + Ie[
|
|
275
|
+
` + Ie[Xe].replace(" at new ", " at ");
|
|
276
276
|
return T.displayName && Et.includes("<anonymous>") && (Et = Et.replace("<anonymous>", T.displayName)), typeof T == "function" && re.set(T, Et), Et;
|
|
277
277
|
}
|
|
278
|
-
while (
|
|
278
|
+
while (Xe >= 1 && Qe >= 0);
|
|
279
279
|
break;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
@@ -341,8 +341,8 @@ function Xh() {
|
|
|
341
341
|
throw dt.name = "Invariant Violation", dt;
|
|
342
342
|
}
|
|
343
343
|
Ie = T[je]($, je, ve, ne, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
344
|
-
} catch (
|
|
345
|
-
Ie =
|
|
344
|
+
} catch (Xe) {
|
|
345
|
+
Ie = Xe;
|
|
346
346
|
}
|
|
347
347
|
Ie && !(Ie instanceof Error) && (W(De), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ve || "React class", ne, je, typeof Ie), W(null)), Ie instanceof Error && !(Ie.message in fe) && (fe[Ie.message] = !0, W(De), b("Failed %s type: %s", ne, Ie.message), W(null));
|
|
348
348
|
}
|
|
@@ -352,7 +352,7 @@ function Xh() {
|
|
|
352
352
|
function _e(T) {
|
|
353
353
|
return ye(T);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Ge(T) {
|
|
356
356
|
{
|
|
357
357
|
var $ = typeof Symbol == "function" && Symbol.toStringTag, ne = $ && T[Symbol.toStringTag] || T.constructor.name || "Object";
|
|
358
358
|
return ne;
|
|
@@ -360,25 +360,25 @@ function Xh() {
|
|
|
360
360
|
}
|
|
361
361
|
function nt(T) {
|
|
362
362
|
try {
|
|
363
|
-
return
|
|
363
|
+
return Ke(T), !1;
|
|
364
364
|
} catch {
|
|
365
365
|
return !0;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Ke(T) {
|
|
369
369
|
return "" + T;
|
|
370
370
|
}
|
|
371
371
|
function Tt(T) {
|
|
372
372
|
if (nt(T))
|
|
373
|
-
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
373
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(T)), Ke(T);
|
|
374
374
|
}
|
|
375
375
|
var We = w.ReactCurrentOwner, it = {
|
|
376
376
|
key: !0,
|
|
377
377
|
ref: !0,
|
|
378
378
|
__self: !0,
|
|
379
379
|
__source: !0
|
|
380
|
-
},
|
|
381
|
-
function
|
|
380
|
+
}, Ye, at;
|
|
381
|
+
function kt(T) {
|
|
382
382
|
if (le.call(T, "ref")) {
|
|
383
383
|
var $ = Object.getOwnPropertyDescriptor(T, "ref").get;
|
|
384
384
|
if ($ && $.isReactWarning)
|
|
@@ -400,7 +400,7 @@ function Xh() {
|
|
|
400
400
|
function Ve(T, $) {
|
|
401
401
|
{
|
|
402
402
|
var ne = function() {
|
|
403
|
-
|
|
403
|
+
Ye || (Ye = !0, b("%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)", $));
|
|
404
404
|
};
|
|
405
405
|
ne.isReactWarning = !0, Object.defineProperty(T, "key", {
|
|
406
406
|
get: ne,
|
|
@@ -411,7 +411,7 @@ function Xh() {
|
|
|
411
411
|
function ir(T, $) {
|
|
412
412
|
{
|
|
413
413
|
var ne = function() {
|
|
414
|
-
|
|
414
|
+
at || (at = !0, b("%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)", $));
|
|
415
415
|
};
|
|
416
416
|
ne.isReactWarning = !0, Object.defineProperty(T, "ref", {
|
|
417
417
|
get: ne,
|
|
@@ -451,13 +451,13 @@ function Xh() {
|
|
|
451
451
|
function ys(T, $, ne, ve, De) {
|
|
452
452
|
{
|
|
453
453
|
var Be, je = {}, Ie = null, dt = null;
|
|
454
|
-
ne !== void 0 && (Tt(ne), Ie = "" + ne), xn($) && (Tt($.key), Ie = "" + $.key),
|
|
454
|
+
ne !== void 0 && (Tt(ne), Ie = "" + ne), xn($) && (Tt($.key), Ie = "" + $.key), kt($) && (dt = $.ref, On($, De));
|
|
455
455
|
for (Be in $)
|
|
456
456
|
le.call($, Be) && !it.hasOwnProperty(Be) && (je[Be] = $[Be]);
|
|
457
457
|
if (T && T.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (Be in
|
|
460
|
-
je[Be] === void 0 && (je[Be] =
|
|
458
|
+
var Xe = T.defaultProps;
|
|
459
|
+
for (Be in Xe)
|
|
460
|
+
je[Be] === void 0 && (je[Be] = Xe[Be]);
|
|
461
461
|
}
|
|
462
462
|
if (Ie || dt) {
|
|
463
463
|
var Qe = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
|
|
@@ -476,10 +476,10 @@ function Xh() {
|
|
|
476
476
|
}
|
|
477
477
|
var Pe;
|
|
478
478
|
Pe = !1;
|
|
479
|
-
function
|
|
479
|
+
function _t(T) {
|
|
480
480
|
return typeof T == "object" && T !== null && T.$$typeof === t;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Ot() {
|
|
483
483
|
{
|
|
484
484
|
if (q.current) {
|
|
485
485
|
var T = G(q.current.type);
|
|
@@ -497,7 +497,7 @@ Check the render method of \`` + T + "`.";
|
|
|
497
497
|
var Pa = {};
|
|
498
498
|
function hh(T) {
|
|
499
499
|
{
|
|
500
|
-
var $ =
|
|
500
|
+
var $ = Ot();
|
|
501
501
|
if (!$) {
|
|
502
502
|
var ne = typeof T == "string" ? T : T.displayName || T.name;
|
|
503
503
|
ne && ($ = `
|
|
@@ -527,15 +527,15 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
527
527
|
if (_e(T))
|
|
528
528
|
for (var ne = 0; ne < T.length; ne++) {
|
|
529
529
|
var ve = T[ne];
|
|
530
|
-
|
|
530
|
+
_t(ve) && ka(ve, $);
|
|
531
531
|
}
|
|
532
|
-
else if (
|
|
532
|
+
else if (_t(T))
|
|
533
533
|
T._store && (T._store.validated = !0);
|
|
534
534
|
else if (T) {
|
|
535
535
|
var De = g(T);
|
|
536
536
|
if (typeof De == "function" && De !== T.entries)
|
|
537
537
|
for (var Be = De.call(T), je; !(je = Be.next()).done; )
|
|
538
|
-
|
|
538
|
+
_t(je.value) && ka(je.value, $);
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
}
|
|
@@ -583,9 +583,9 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
583
583
|
var Ie = "";
|
|
584
584
|
(T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (Ie += " 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
585
|
var dt = Mn();
|
|
586
|
-
dt ? Ie += dt : Ie +=
|
|
587
|
-
var
|
|
588
|
-
T === null ?
|
|
586
|
+
dt ? Ie += dt : Ie += Ot();
|
|
587
|
+
var Xe;
|
|
588
|
+
T === null ? Xe = "null" : _e(T) ? Xe = "array" : T !== void 0 && T.$$typeof === t ? (Xe = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Xe = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Xe, Ie);
|
|
589
589
|
}
|
|
590
590
|
var Qe = ys(T, $, ne, De, Be);
|
|
591
591
|
if (Qe == null)
|
|
@@ -626,11 +626,11 @@ function hc(e, t) {
|
|
|
626
626
|
const { toString: qh } = Object.prototype, { getPrototypeOf: ki } = Object, { iterator: Ho, toStringTag: mc } = Symbol, $o = /* @__PURE__ */ ((e) => (t) => {
|
|
627
627
|
const n = qh.call(t);
|
|
628
628
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
629
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
629
|
+
})(/* @__PURE__ */ Object.create(null)), zt = (e) => (e = e.toLowerCase(), (t) => $o(t) === e), zo = (e) => (t) => typeof t === e, { isArray: Zn } = Array, Kn = zo("undefined");
|
|
630
630
|
function _r(e) {
|
|
631
631
|
return e !== null && !Kn(e) && e.constructor !== null && !Kn(e.constructor) && mt(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
632
632
|
}
|
|
633
|
-
const gc =
|
|
633
|
+
const gc = zt("ArrayBuffer");
|
|
634
634
|
function Jh(e) {
|
|
635
635
|
let t;
|
|
636
636
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && gc(e.buffer), t;
|
|
@@ -648,11 +648,11 @@ const Zh = zo("string"), mt = zo("function"), vc = zo("number"), Or = (e) => e !
|
|
|
648
648
|
} catch {
|
|
649
649
|
return !1;
|
|
650
650
|
}
|
|
651
|
-
}, tm =
|
|
651
|
+
}, tm = zt("Date"), nm = zt("File"), rm = zt("Blob"), om = zt("FileList"), sm = (e) => Or(e) && mt(e.pipe), im = (e) => {
|
|
652
652
|
let t;
|
|
653
653
|
return e && (typeof FormData == "function" && e instanceof FormData || mt(e.append) && ((t = $o(e)) === "formdata" || // detect form-data instance
|
|
654
654
|
t === "object" && mt(e.toString) && e.toString() === "[object FormData]"));
|
|
655
|
-
}, am =
|
|
655
|
+
}, am = zt("URLSearchParams"), [lm, cm, um, dm] = ["ReadableStream", "Request", "Response", "Headers"].map(zt), fm = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
656
656
|
function Mr(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
657
657
|
if (e === null || typeof e > "u")
|
|
658
658
|
return;
|
|
@@ -732,12 +732,12 @@ const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
|
|
|
732
732
|
for (; (n = e.exec(t)) !== null; )
|
|
733
733
|
r.push(n);
|
|
734
734
|
return r;
|
|
735
|
-
}, Sm =
|
|
735
|
+
}, Sm = zt("HTMLFormElement"), Cm = (e) => e.toLowerCase().replace(
|
|
736
736
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
737
737
|
function(n, r, o) {
|
|
738
738
|
return r.toUpperCase() + o;
|
|
739
739
|
}
|
|
740
|
-
), za = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tm =
|
|
740
|
+
), za = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tm = zt("RegExp"), wc = (e, t) => {
|
|
741
741
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
742
742
|
Mr(n, (o, s) => {
|
|
743
743
|
let i;
|
|
@@ -789,7 +789,7 @@ const jm = (e) => {
|
|
|
789
789
|
return r;
|
|
790
790
|
};
|
|
791
791
|
return n(e, 0);
|
|
792
|
-
}, Pm =
|
|
792
|
+
}, Pm = zt("AsyncFunction"), km = (e) => e && (Or(e) || mt(e)) && mt(e.then) && mt(e.catch), yc = ((e, t) => e ? setImmediate : t ? ((n, r) => (yn.addEventListener("message", ({ source: o, data: s }) => {
|
|
793
793
|
o === yn && s === n && r.length && r.shift()();
|
|
794
794
|
}, !1), (o) => {
|
|
795
795
|
r.push(o), yn.postMessage(n, "*");
|
|
@@ -830,7 +830,7 @@ const jm = (e) => {
|
|
|
830
830
|
inherits: mm,
|
|
831
831
|
toFlatObject: gm,
|
|
832
832
|
kindOf: $o,
|
|
833
|
-
kindOfTest:
|
|
833
|
+
kindOfTest: zt,
|
|
834
834
|
endsWith: vm,
|
|
835
835
|
toArray: xm,
|
|
836
836
|
forEachEntry: wm,
|
|
@@ -1110,14 +1110,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Vm
|
|
|
1110
1110
|
hasStandardBrowserWebWorkerEnv: Wm,
|
|
1111
1111
|
navigator: Js,
|
|
1112
1112
|
origin: Vm
|
|
1113
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1113
|
+
}, Symbol.toStringTag, { value: "Module" })), lt = {
|
|
1114
1114
|
...Gm,
|
|
1115
1115
|
...zm
|
|
1116
1116
|
};
|
|
1117
1117
|
function Km(e, t) {
|
|
1118
|
-
return Uo(e, new
|
|
1118
|
+
return Uo(e, new lt.classes.URLSearchParams(), {
|
|
1119
1119
|
visitor: function(n, r, o, s) {
|
|
1120
|
-
return
|
|
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
|
});
|
|
@@ -1212,8 +1212,8 @@ const Dr = {
|
|
|
1212
1212
|
maxContentLength: -1,
|
|
1213
1213
|
maxBodyLength: -1,
|
|
1214
1214
|
env: {
|
|
1215
|
-
FormData:
|
|
1216
|
-
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;
|
|
@@ -1513,10 +1513,10 @@ const So = (e, t, n = 3) => {
|
|
|
1513
1513
|
total: e,
|
|
1514
1514
|
loaded: r
|
|
1515
1515
|
}), t[1]];
|
|
1516
|
-
}, Ya = (e) => (...t) => A.asap(() => e(...t)), ig =
|
|
1517
|
-
new URL(
|
|
1518
|
-
|
|
1519
|
-
) : () => !0, ag =
|
|
1516
|
+
}, Ya = (e) => (...t) => A.asap(() => e(...t)), ig = 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, ag = lt.hasStandardBrowserEnv ? (
|
|
1520
1520
|
// Standard browser envs support document.cookie
|
|
1521
1521
|
{
|
|
1522
1522
|
write(e, t, n, r, o, s) {
|
|
@@ -1625,7 +1625,7 @@ const kc = (e) => {
|
|
|
1625
1625
|
"Authorization",
|
|
1626
1626
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1627
1627
|
), A.isFormData(n)) {
|
|
1628
|
-
if (
|
|
1628
|
+
if (lt.hasStandardBrowserEnv || lt.hasStandardBrowserWebWorkerEnv)
|
|
1629
1629
|
i.setContentType(void 0);
|
|
1630
1630
|
else if (A.isFunction(n.getHeaders)) {
|
|
1631
1631
|
const c = n.getHeaders(), u = ["content-type", "content-length"];
|
|
@@ -1634,7 +1634,7 @@ const kc = (e) => {
|
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
|
-
if (
|
|
1637
|
+
if (lt.hasStandardBrowserEnv && (r && A.isFunction(r) && (r = r(t)), r || r !== !1 && ig(t.url))) {
|
|
1638
1638
|
const c = o && s && ag.read(s);
|
|
1639
1639
|
c && i.set(o, c);
|
|
1640
1640
|
}
|
|
@@ -1691,7 +1691,7 @@ const kc = (e) => {
|
|
|
1691
1691
|
g && (r(!y || y.type ? new Qn(null, e, g) : y), g.abort(), g = null);
|
|
1692
1692
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
1693
1693
|
const b = rg(o.url);
|
|
1694
|
-
if (b &&
|
|
1694
|
+
if (b && lt.protocols.indexOf(b) === -1) {
|
|
1695
1695
|
r(new Se("Unsupported protocol " + b + ":", Se.ERR_BAD_REQUEST, e));
|
|
1696
1696
|
return;
|
|
1697
1697
|
}
|
|
@@ -1798,7 +1798,7 @@ const kc = (e) => {
|
|
|
1798
1798
|
return !1;
|
|
1799
1799
|
const a = o && Vr(Za), c = o && (typeof Qa == "function" ? /* @__PURE__ */ ((m) => (v) => m.encode(v))(new Qa()) : async (m) => new Uint8Array(await new n(m).arrayBuffer())), u = s && a && el(() => {
|
|
1800
1800
|
let m = !1;
|
|
1801
|
-
const v = new n(
|
|
1801
|
+
const v = new n(lt.origin, {
|
|
1802
1802
|
body: new Za(),
|
|
1803
1803
|
method: "POST",
|
|
1804
1804
|
get duplex() {
|
|
@@ -1823,7 +1823,7 @@ const kc = (e) => {
|
|
|
1823
1823
|
if (A.isBlob(m))
|
|
1824
1824
|
return m.size;
|
|
1825
1825
|
if (A.isSpecCompliantForm(m))
|
|
1826
|
-
return (await new n(
|
|
1826
|
+
return (await new n(lt.origin, {
|
|
1827
1827
|
method: "POST",
|
|
1828
1828
|
body: m
|
|
1829
1829
|
}).arrayBuffer()).byteLength;
|
|
@@ -2051,7 +2051,7 @@ function wg(e, t, n) {
|
|
|
2051
2051
|
const so = {
|
|
2052
2052
|
assertOptions: wg,
|
|
2053
2053
|
validators: Wo
|
|
2054
|
-
},
|
|
2054
|
+
}, Vt = so.validators;
|
|
2055
2055
|
let Cn = class {
|
|
2056
2056
|
constructor(t) {
|
|
2057
2057
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -2088,17 +2088,17 @@ let Cn = class {
|
|
|
2088
2088
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Tn(this.defaults, n);
|
|
2089
2089
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
2090
2090
|
r !== void 0 && so.assertOptions(r, {
|
|
2091
|
-
silentJSONParsing:
|
|
2092
|
-
forcedJSONParsing:
|
|
2093
|
-
clarifyTimeoutError:
|
|
2091
|
+
silentJSONParsing: Vt.transitional(Vt.boolean),
|
|
2092
|
+
forcedJSONParsing: Vt.transitional(Vt.boolean),
|
|
2093
|
+
clarifyTimeoutError: Vt.transitional(Vt.boolean)
|
|
2094
2094
|
}, !1), o != null && (A.isFunction(o) ? n.paramsSerializer = {
|
|
2095
2095
|
serialize: o
|
|
2096
2096
|
} : so.assertOptions(o, {
|
|
2097
|
-
encode:
|
|
2098
|
-
serialize:
|
|
2097
|
+
encode: Vt.function,
|
|
2098
|
+
serialize: Vt.function
|
|
2099
2099
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), so.assertOptions(n, {
|
|
2100
|
-
baseUrl:
|
|
2101
|
-
withXsrfToken:
|
|
2100
|
+
baseUrl: Vt.spelling("baseURL"),
|
|
2101
|
+
withXsrfToken: Vt.spelling("withXSRFToken")
|
|
2102
2102
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2103
2103
|
let i = s && A.merge(
|
|
2104
2104
|
s.common,
|
|
@@ -2331,26 +2331,26 @@ function Lc(e) {
|
|
|
2331
2331
|
return Lc(Tn(e, o));
|
|
2332
2332
|
}, n;
|
|
2333
2333
|
}
|
|
2334
|
-
const
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2334
|
+
const Ze = Lc(Dr);
|
|
2335
|
+
Ze.Axios = Cn;
|
|
2336
|
+
Ze.CanceledError = Qn;
|
|
2337
|
+
Ze.CancelToken = yg;
|
|
2338
|
+
Ze.isCancel = Ac;
|
|
2339
|
+
Ze.VERSION = Mc;
|
|
2340
|
+
Ze.toFormData = Uo;
|
|
2341
|
+
Ze.AxiosError = Se;
|
|
2342
|
+
Ze.Cancel = Ze.CanceledError;
|
|
2343
|
+
Ze.all = function(t) {
|
|
2344
2344
|
return Promise.all(t);
|
|
2345
2345
|
};
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2346
|
+
Ze.spread = Sg;
|
|
2347
|
+
Ze.isAxiosError = Cg;
|
|
2348
|
+
Ze.mergeConfig = Tn;
|
|
2349
|
+
Ze.AxiosHeaders = gt;
|
|
2350
|
+
Ze.formToJSON = (e) => Nc(A.isHTMLForm(e) ? new FormData(e) : e);
|
|
2351
|
+
Ze.getAdapter = Oc.getAdapter;
|
|
2352
|
+
Ze.HttpStatusCode = Qs;
|
|
2353
|
+
Ze.default = Ze;
|
|
2354
2354
|
const {
|
|
2355
2355
|
Axios: CT,
|
|
2356
2356
|
AxiosError: TT,
|
|
@@ -2368,7 +2368,7 @@ const {
|
|
|
2368
2368
|
formToJSON: DT,
|
|
2369
2369
|
getAdapter: LT,
|
|
2370
2370
|
mergeConfig: FT
|
|
2371
|
-
} =
|
|
2371
|
+
} = Ze, Es = {};
|
|
2372
2372
|
function Ln() {
|
|
2373
2373
|
var e;
|
|
2374
2374
|
try {
|
|
@@ -2390,7 +2390,7 @@ function sl(e) {
|
|
|
2390
2390
|
function Ig(e) {
|
|
2391
2391
|
return ti.add(e), () => ti.delete(e);
|
|
2392
2392
|
}
|
|
2393
|
-
const jt =
|
|
2393
|
+
const jt = Ze.create({
|
|
2394
2394
|
// Only set baseURL when configured — do NOT fall back to localhost. Falling back causes
|
|
2395
2395
|
// noisy network requests to the frontend Dev server when the backend isn't configured.
|
|
2396
2396
|
...ei ? { baseURL: ei } : {},
|
|
@@ -2402,7 +2402,7 @@ jt.interceptors.response.use(
|
|
|
2402
2402
|
(e) => e,
|
|
2403
2403
|
(e) => Promise.reject(e)
|
|
2404
2404
|
);
|
|
2405
|
-
async function
|
|
2405
|
+
async function Mt(e, t) {
|
|
2406
2406
|
return jt.defaults.baseURL ? (await jt.get(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
|
|
2407
2407
|
}
|
|
2408
2408
|
async function Gr(e, t, n) {
|
|
@@ -2438,7 +2438,7 @@ class jg {
|
|
|
2438
2438
|
}
|
|
2439
2439
|
// ---- Thread Management ----
|
|
2440
2440
|
async listThreads() {
|
|
2441
|
-
const t = await
|
|
2441
|
+
const t = await Mt("/chat/threads"), n = ft(t);
|
|
2442
2442
|
return (n == null ? void 0 : n.items) ?? (t == null ? void 0 : t.items) ?? [];
|
|
2443
2443
|
}
|
|
2444
2444
|
async createThread(t) {
|
|
@@ -2454,25 +2454,25 @@ class jg {
|
|
|
2454
2454
|
return ft(n);
|
|
2455
2455
|
}
|
|
2456
2456
|
async threadInfo(t) {
|
|
2457
|
-
const n = await
|
|
2457
|
+
const n = await Mt(`/chat/threads/${t}/info`);
|
|
2458
2458
|
return ft(n);
|
|
2459
2459
|
}
|
|
2460
2460
|
// ---- Agents ----
|
|
2461
2461
|
async listAgents() {
|
|
2462
|
-
const t = await
|
|
2462
|
+
const t = await Mt("/chat/agents"), n = ft(t);
|
|
2463
2463
|
return (n == null ? void 0 : n.items) ?? [];
|
|
2464
2464
|
}
|
|
2465
2465
|
async getAgent(t) {
|
|
2466
|
-
const n = await
|
|
2466
|
+
const n = await Mt(`/chat/agents/${t}`);
|
|
2467
2467
|
return ft(n);
|
|
2468
2468
|
}
|
|
2469
2469
|
async getAgentSchema(t) {
|
|
2470
|
-
const n = await
|
|
2470
|
+
const n = await Mt(`/chat/agents/${t}/schema`);
|
|
2471
2471
|
return ft(n);
|
|
2472
2472
|
}
|
|
2473
2473
|
// ---- Messages & State ----
|
|
2474
2474
|
async getMessages(t) {
|
|
2475
|
-
const n = await
|
|
2475
|
+
const n = await Mt(`/chat/threads/${t.threadId}/messages`, {
|
|
2476
2476
|
params: {
|
|
2477
2477
|
thread_id: t.threadId,
|
|
2478
2478
|
checkpoint_id: t.checkpointId,
|
|
@@ -2484,7 +2484,7 @@ class jg {
|
|
|
2484
2484
|
return ft(n);
|
|
2485
2485
|
}
|
|
2486
2486
|
async getState(t) {
|
|
2487
|
-
const n = await
|
|
2487
|
+
const n = await Mt(`/chat/threads/${t.threadId}/state`, {
|
|
2488
2488
|
params: {
|
|
2489
2489
|
thread_id: t.threadId,
|
|
2490
2490
|
checkpoint_id: t.checkpointId,
|
|
@@ -2494,7 +2494,7 @@ class jg {
|
|
|
2494
2494
|
return ft(n);
|
|
2495
2495
|
}
|
|
2496
2496
|
async getStateHistory(t) {
|
|
2497
|
-
const n = await
|
|
2497
|
+
const n = await Mt(`/chat/threads/${t.threadId}/state/history`, {
|
|
2498
2498
|
params: {
|
|
2499
2499
|
thread_id: t.threadId,
|
|
2500
2500
|
checkpoint_id: t.checkpointId,
|
|
@@ -2505,7 +2505,7 @@ class jg {
|
|
|
2505
2505
|
}
|
|
2506
2506
|
// ---- Checkpoints ----
|
|
2507
2507
|
async listCheckpoints(t) {
|
|
2508
|
-
const n = await
|
|
2508
|
+
const n = await Mt(`/chat/threads/${t}/checkpoints`, {
|
|
2509
2509
|
params: { thread_id: t }
|
|
2510
2510
|
});
|
|
2511
2511
|
return ft(n);
|
|
@@ -2550,14 +2550,14 @@ class jg {
|
|
|
2550
2550
|
}
|
|
2551
2551
|
const ln = new jg();
|
|
2552
2552
|
function Pg(e = {}) {
|
|
2553
|
-
const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = be(e.token ?? null), s = bt(e.headers ?? {}), [i, a] = be(!1), [c, u] = be(null), [d, p] = be(""), [h, x] = be(null), m = bt(null), v =
|
|
2553
|
+
const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = be(e.token ?? null), s = bt(e.headers ?? {}), [i, a] = be(!1), [c, u] = be(null), [d, p] = be(""), [h, x] = be(null), m = bt(null), v = qe((y) => {
|
|
2554
2554
|
o(y);
|
|
2555
|
-
}, []), g =
|
|
2555
|
+
}, []), g = qe(() => {
|
|
2556
2556
|
var y;
|
|
2557
2557
|
(y = m.current) == null || y.abort(), m.current = null, a(!1);
|
|
2558
|
-
}, []), w =
|
|
2558
|
+
}, []), w = qe(() => {
|
|
2559
2559
|
p(""), x(null), u(null);
|
|
2560
|
-
}, []), b =
|
|
2560
|
+
}, []), b = qe(
|
|
2561
2561
|
(y, R, S) => {
|
|
2562
2562
|
m.current && (m.current.abort(), m.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && p("");
|
|
2563
2563
|
const C = new AbortController();
|
|
@@ -2807,7 +2807,7 @@ function Mg(e, t) {
|
|
|
2807
2807
|
}
|
|
2808
2808
|
}
|
|
2809
2809
|
function Dg(e = []) {
|
|
2810
|
-
const [t, n] = yh(Mg, { ...Og, messages: e }), r =
|
|
2810
|
+
const [t, n] = yh(Mg, { ...Og, messages: e }), r = qe((s) => {
|
|
2811
2811
|
n({ type: "event", payload: { ev: s } });
|
|
2812
2812
|
}, []), o = wn(() => ({
|
|
2813
2813
|
reset: (s) => n({ type: "reset", payload: { messages: s } }),
|
|
@@ -2977,52 +2977,54 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2977
2977
|
W();
|
|
2978
2978
|
};
|
|
2979
2979
|
}, [u, m]);
|
|
2980
|
-
const w =
|
|
2980
|
+
const w = qe((W) => {
|
|
2981
2981
|
u.setAuthToken(W);
|
|
2982
|
-
}, [u]), { state: b, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Dg(), I = s && s > 0 ? s : 6, [j, P] = be(!1), [D, H] = be(!1), [G, N] = be(null), [_, M] = be(void 0), V =
|
|
2982
|
+
}, [u]), { state: b, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Dg(), I = s && s > 0 ? s : 6, [j, P] = be(!1), [D, H] = be(!1), [G, N] = be(null), [_, M] = be(void 0), V = qe(
|
|
2983
2983
|
(W, te) => {
|
|
2984
2984
|
const ye = Array.isArray(W == null ? void 0 : W.messages) ? W.messages : [];
|
|
2985
2985
|
te === "replace" ? y(ye) : te === "prepend" && ye.length && R(ye), N((W == null ? void 0 : W.nextCursor) ?? null), P(!!(W != null && W.hasMore)), M((_e) => (W == null ? void 0 : W.checkpointId) ?? _e ?? void 0);
|
|
2986
2986
|
},
|
|
2987
2987
|
[y, R]
|
|
2988
|
-
), [F, O] = be([]), [z, Q] = be(null), ae =
|
|
2988
|
+
), [F, O] = be([]), [z, Q] = be(null), ae = qe(async () => {
|
|
2989
2989
|
const W = await u.listThreads();
|
|
2990
2990
|
O(W);
|
|
2991
|
-
}, [u]), [U, ee] = be(!1), pe =
|
|
2991
|
+
}, [u]), [U, ee] = be(!1), pe = qe(
|
|
2992
2992
|
async (W) => {
|
|
2993
2993
|
const te = (W == null ? void 0 : W.maxAttempts) ?? 5, ye = (W == null ? void 0 : W.baseDelayMs) ?? 500, _e = (W == null ? void 0 : W.timeoutMs) ?? 2e3;
|
|
2994
2994
|
if (!u.baseUrl) return !1;
|
|
2995
|
-
const
|
|
2995
|
+
const Ge = u.baseUrl.replace(/\/+$/, ""), nt = [
|
|
2996
2996
|
"/health",
|
|
2997
2997
|
"/api/health",
|
|
2998
2998
|
"/",
|
|
2999
2999
|
// root
|
|
3000
3000
|
"/api/v2/health",
|
|
3001
3001
|
"/api/v2/chat/health"
|
|
3002
|
-
],
|
|
3002
|
+
], Ke = async (We) => {
|
|
3003
3003
|
try {
|
|
3004
|
-
const it = new AbortController(),
|
|
3005
|
-
return clearTimeout(
|
|
3004
|
+
const it = new AbortController(), Ye = setTimeout(() => it.abort(), _e), at = await fetch(We, { method: "GET", signal: it.signal });
|
|
3005
|
+
return clearTimeout(Ye), at.ok;
|
|
3006
3006
|
} catch {
|
|
3007
3007
|
return !1;
|
|
3008
3008
|
}
|
|
3009
3009
|
}, Tt = async (We) => {
|
|
3010
3010
|
try {
|
|
3011
|
-
const it = new AbortController(),
|
|
3012
|
-
return clearTimeout(
|
|
3011
|
+
const it = new AbortController(), Ye = setTimeout(() => it.abort(), _e), at = await fetch(We, { method: "HEAD", signal: it.signal });
|
|
3012
|
+
return clearTimeout(Ye), at.ok;
|
|
3013
3013
|
} catch {
|
|
3014
3014
|
return !1;
|
|
3015
3015
|
}
|
|
3016
3016
|
};
|
|
3017
3017
|
for (let We = 0; We < te; We++) {
|
|
3018
3018
|
console.debug(`[ChatProvider] health-check attempt ${We + 1}/${te}`);
|
|
3019
|
-
for (const
|
|
3020
|
-
|
|
3021
|
-
|
|
3019
|
+
for (const Ye of nt) {
|
|
3020
|
+
let at = Ye;
|
|
3021
|
+
Ge.endsWith("/api") && Ye.startsWith("/api") && (at = Ye.replace(/^\/api/, "") || "/");
|
|
3022
|
+
const kt = at === "/" ? Ge + "/" : Ge + at;
|
|
3023
|
+
if (console.debug(`[ChatProvider] checking ${kt}`), await Ke(kt) || Ye === "/" && await Tt(Ge + "/"))
|
|
3022
3024
|
return ee(!0), !0;
|
|
3023
3025
|
}
|
|
3024
3026
|
const it = ye * Math.pow(2, We);
|
|
3025
|
-
await new Promise((
|
|
3027
|
+
await new Promise((Ye) => setTimeout(Ye, it));
|
|
3026
3028
|
}
|
|
3027
3029
|
return ee(!1), !1;
|
|
3028
3030
|
},
|
|
@@ -3063,7 +3065,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3063
3065
|
}));
|
|
3064
3066
|
}
|
|
3065
3067
|
}, [o, i, u.baseUrl, U]);
|
|
3066
|
-
const X = bt(null), k =
|
|
3068
|
+
const X = bt(null), k = qe(
|
|
3067
3069
|
async (W, te, ye) => {
|
|
3068
3070
|
if (!u.baseUrl) {
|
|
3069
3071
|
console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
|
|
@@ -3086,10 +3088,10 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3086
3088
|
}
|
|
3087
3089
|
},
|
|
3088
3090
|
[u, V]
|
|
3089
|
-
), J =
|
|
3091
|
+
), J = qe(async (W) => {
|
|
3090
3092
|
const te = await u.listCheckpoints(W);
|
|
3091
3093
|
return $g(te, W);
|
|
3092
|
-
}, [u]), re =
|
|
3094
|
+
}, [u]), re = qe(async (W) => {
|
|
3093
3095
|
if (!z) throw new Error("No active thread");
|
|
3094
3096
|
P(!1), N(null), M(void 0);
|
|
3095
3097
|
const te = await u.getMessages({
|
|
@@ -3098,7 +3100,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3098
3100
|
limit: I
|
|
3099
3101
|
});
|
|
3100
3102
|
V(te, "replace");
|
|
3101
|
-
}, [u, z, V, I]), ce =
|
|
3103
|
+
}, [u, z, V, I]), ce = qe(async () => {
|
|
3102
3104
|
if (!z) throw new Error("No active thread");
|
|
3103
3105
|
await k(z);
|
|
3104
3106
|
}, [z, k]), ie = bt(!1);
|
|
@@ -3123,16 +3125,16 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3123
3125
|
})();
|
|
3124
3126
|
}
|
|
3125
3127
|
}, [d, z, b.lastCheckpointId, u, V, ae]);
|
|
3126
|
-
const Me =
|
|
3128
|
+
const Me = qe(async (W) => {
|
|
3127
3129
|
const te = await u.createThread(W);
|
|
3128
3130
|
return await ae(), await k(te.threadId), te.threadId;
|
|
3129
|
-
}, [u, ae, k]), ue =
|
|
3131
|
+
}, [u, ae, k]), ue = qe(async (W) => {
|
|
3130
3132
|
await u.deleteThread(W), await ae(), z === W && (Q(null), E([]), P(!1), N(null), M(void 0));
|
|
3131
|
-
}, [u, ae, z, E]), Ae =
|
|
3133
|
+
}, [u, ae, z, E]), Ae = qe(async (W, te) => {
|
|
3132
3134
|
await u.updateThread(W, te), await ae();
|
|
3133
|
-
}, [u, ae]), le =
|
|
3135
|
+
}, [u, ae]), le = qe(async (W, te) => {
|
|
3134
3136
|
var On;
|
|
3135
|
-
const ye = (te == null ? void 0 : te.attachments) || [], { contentParts: _e, filesInfo:
|
|
3137
|
+
const ye = (te == null ? void 0 : te.attachments) || [], { contentParts: _e, filesInfo: Ge } = await Wg(
|
|
3136
3138
|
u,
|
|
3137
3139
|
ye,
|
|
3138
3140
|
t == null ? void 0 : t.uploadPath,
|
|
@@ -3142,24 +3144,24 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3142
3144
|
), nt = [];
|
|
3143
3145
|
W && nt.push({ type: "text", text: W });
|
|
3144
3146
|
for (const Ve of _e) nt.push(Ve);
|
|
3145
|
-
const
|
|
3147
|
+
const Ke = {
|
|
3146
3148
|
id: ((On = crypto.randomUUID) == null ? void 0 : On.call(crypto)) || `user-${Date.now()}`,
|
|
3147
3149
|
role: "user",
|
|
3148
3150
|
content: nt,
|
|
3149
3151
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3150
3152
|
checkpointId: (te == null ? void 0 : te.checkpointId) ?? b.lastCheckpointId ?? void 0
|
|
3151
3153
|
};
|
|
3152
|
-
S(
|
|
3154
|
+
S(Ke);
|
|
3153
3155
|
const Tt = {
|
|
3154
|
-
...
|
|
3155
|
-
content:
|
|
3156
|
-
}, We = { ...(te == null ? void 0 : te.payloadExtras) ?? {} }, it = !!We.edit,
|
|
3156
|
+
...Ke,
|
|
3157
|
+
content: Ke.content.filter((Ve) => Ve.type === "text" || Ve.type === "image_url")
|
|
3158
|
+
}, We = { ...(te == null ? void 0 : te.payloadExtras) ?? {} }, it = !!We.edit, Ye = We.originalMessageId, at = typeof Ye == "string" ? Ye : void 0, kt = ye && ye.length > 0, xn = {
|
|
3157
3159
|
...z ? { threadId: z } : {},
|
|
3158
3160
|
payload: {
|
|
3159
3161
|
messages: [Tt],
|
|
3160
|
-
attachments:
|
|
3161
|
-
files_info:
|
|
3162
|
-
...a &&
|
|
3162
|
+
attachments: Ke.content.filter((Ve) => Ve.type === "file").map((Ve) => ({ type: "file", url: Ve.url, mimeType: Ve.mimeType, name: Ve.name, size: Ve.size })),
|
|
3163
|
+
files_info: Ge,
|
|
3164
|
+
...a && kt && c ? { agent_id: c } : {},
|
|
3163
3165
|
...We
|
|
3164
3166
|
},
|
|
3165
3167
|
checkpointId: (te == null ? void 0 : te.checkpointId) ?? b.lastCheckpointId ?? void 0,
|
|
@@ -3167,7 +3169,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3167
3169
|
nodeFilter: te == null ? void 0 : te.nodeFilter,
|
|
3168
3170
|
config: te == null ? void 0 : te.config,
|
|
3169
3171
|
edit: it,
|
|
3170
|
-
originalMessageId:
|
|
3172
|
+
originalMessageId: at
|
|
3171
3173
|
};
|
|
3172
3174
|
h(
|
|
3173
3175
|
xn,
|
|
@@ -3180,7 +3182,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3180
3182
|
}
|
|
3181
3183
|
}
|
|
3182
3184
|
);
|
|
3183
|
-
}, [z, S, h, C, b.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, ae, Q, a, c]), fe =
|
|
3185
|
+
}, [z, S, h, C, b.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, ae, Q, a, c]), fe = qe(
|
|
3184
3186
|
async (W) => {
|
|
3185
3187
|
if (!z) throw new Error("No active thread");
|
|
3186
3188
|
if (D || !j) return;
|
|
@@ -3280,13 +3282,13 @@ function Ce(e, t) {
|
|
|
3280
3282
|
function Li(e) {
|
|
3281
3283
|
e(er);
|
|
3282
3284
|
}
|
|
3283
|
-
function
|
|
3285
|
+
function Je(e) {
|
|
3284
3286
|
return e(Bc);
|
|
3285
3287
|
}
|
|
3286
3288
|
function de(e, t) {
|
|
3287
3289
|
return Le(e, Gg(t, Vo));
|
|
3288
3290
|
}
|
|
3289
|
-
function
|
|
3291
|
+
function Lt(e, t) {
|
|
3290
3292
|
const n = e(pn, (r) => {
|
|
3291
3293
|
n(), t(r);
|
|
3292
3294
|
});
|
|
@@ -3317,7 +3319,7 @@ function me(e) {
|
|
|
3317
3319
|
function oe(e) {
|
|
3318
3320
|
return (t) => Hc(t, e);
|
|
3319
3321
|
}
|
|
3320
|
-
function
|
|
3322
|
+
function Gt(e) {
|
|
3321
3323
|
return (t) => () => {
|
|
3322
3324
|
t(e);
|
|
3323
3325
|
};
|
|
@@ -3334,7 +3336,7 @@ function B(e, ...t) {
|
|
|
3334
3336
|
}
|
|
3335
3337
|
};
|
|
3336
3338
|
}
|
|
3337
|
-
function
|
|
3339
|
+
function Yt(e, t) {
|
|
3338
3340
|
return (n) => (r) => {
|
|
3339
3341
|
n(t = e(t, r));
|
|
3340
3342
|
};
|
|
@@ -3344,7 +3346,7 @@ function En(e) {
|
|
|
3344
3346
|
e > 0 ? e-- : t(n);
|
|
3345
3347
|
};
|
|
3346
3348
|
}
|
|
3347
|
-
function
|
|
3349
|
+
function nn(e) {
|
|
3348
3350
|
let t = null, n;
|
|
3349
3351
|
return (r) => (o) => {
|
|
3350
3352
|
t = o, !n && (n = setTimeout(() => {
|
|
@@ -3403,7 +3405,7 @@ function K(e) {
|
|
|
3403
3405
|
return n(r, o);
|
|
3404
3406
|
};
|
|
3405
3407
|
}
|
|
3406
|
-
function
|
|
3408
|
+
function ut(e, t) {
|
|
3407
3409
|
return Go(K(t), (n) => de(e, n));
|
|
3408
3410
|
}
|
|
3409
3411
|
function Ne() {
|
|
@@ -3495,7 +3497,7 @@ const Qg = {
|
|
|
3495
3497
|
return {
|
|
3496
3498
|
log: K((t, n, r = 1) => {
|
|
3497
3499
|
var o;
|
|
3498
|
-
const s = (o = ev().VIRTUOSO_LOG_LEVEL) != null ? o :
|
|
3500
|
+
const s = (o = ev().VIRTUOSO_LOG_LEVEL) != null ? o : Je(e);
|
|
3499
3501
|
r >= s && console[Qg[r]](
|
|
3500
3502
|
"%creact-virtuoso: %c%s %o",
|
|
3501
3503
|
"color: #0253b3; font-weight: bold",
|
|
@@ -3673,16 +3675,16 @@ function Sr(e, t) {
|
|
|
3673
3675
|
if (!He(e))
|
|
3674
3676
|
return t === e.k ? e.v : t < e.k ? Sr(e.l, t) : Sr(e.r, t);
|
|
3675
3677
|
}
|
|
3676
|
-
function
|
|
3678
|
+
function Bt(e, t, n = "k") {
|
|
3677
3679
|
if (He(e))
|
|
3678
3680
|
return [-1 / 0, void 0];
|
|
3679
3681
|
if (Number(e[n]) === t)
|
|
3680
3682
|
return [e.k, e.v];
|
|
3681
3683
|
if (Number(e[n]) < t) {
|
|
3682
|
-
const r =
|
|
3684
|
+
const r = Bt(e.r, t, n);
|
|
3683
3685
|
return r[0] === -1 / 0 ? [e.k, e.v] : r;
|
|
3684
3686
|
}
|
|
3685
|
-
return
|
|
3687
|
+
return Bt(e.l, t, n);
|
|
3686
3688
|
}
|
|
3687
3689
|
function yt(e, t, n) {
|
|
3688
3690
|
return He(e) ? Gc(t, n, 1) : t === e.k ? rt(e, { k: t, v: n }) : t < e.k ? dl(rt(e, { l: yt(e.l, t, n) })) : dl(rt(e, { r: yt(e.r, t, n) }));
|
|
@@ -3693,7 +3695,7 @@ function Un() {
|
|
|
3693
3695
|
function Ko(e, t, n) {
|
|
3694
3696
|
if (He(e))
|
|
3695
3697
|
return [];
|
|
3696
|
-
const r =
|
|
3698
|
+
const r = Bt(e, t)[0];
|
|
3697
3699
|
return rv(si(e, r, n));
|
|
3698
3700
|
}
|
|
3699
3701
|
function oi(e, t) {
|
|
@@ -3933,8 +3935,8 @@ function ai(e, t, n, r) {
|
|
|
3933
3935
|
let o = e, s = 0, i = 0, a = 0, c = 0;
|
|
3934
3936
|
if (t !== 0) {
|
|
3935
3937
|
c = To(o, t - 1, Hi), a = o[c].offset;
|
|
3936
|
-
const u =
|
|
3937
|
-
s = u[0], i = u[1], o.length && o[c].size ===
|
|
3938
|
+
const u = Bt(n, t - 1);
|
|
3939
|
+
s = u[0], i = u[1], o.length && o[c].size === Bt(n, t)[1] && (c -= 1), o = o.slice(0, c + 1);
|
|
3938
3940
|
} else
|
|
3939
3941
|
o = [];
|
|
3940
3942
|
for (const { start: u, value: d } of Ko(n, t, 1 / 0)) {
|
|
@@ -3962,16 +3964,16 @@ function pv(e) {
|
|
|
3962
3964
|
const hv = {
|
|
3963
3965
|
offsetHeight: "height",
|
|
3964
3966
|
offsetWidth: "width"
|
|
3965
|
-
},
|
|
3967
|
+
}, Zt = Oe(
|
|
3966
3968
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
3967
|
-
const n = Ne(), r = Ne(), o =
|
|
3968
|
-
B(n, Te(c, e, x),
|
|
3969
|
+
const n = Ne(), r = Ne(), o = ut(r, 0), s = Ne(), i = Ne(), a = K(0), c = K([]), u = K(void 0), d = K(void 0), p = K((S, C) => cn(S, hv[C])), h = K(void 0), x = K(0), m = sv(), v = ut(
|
|
3970
|
+
B(n, Te(c, e, x), Yt(uv, m), $e()),
|
|
3969
3971
|
m
|
|
3970
|
-
), g =
|
|
3972
|
+
), g = ut(
|
|
3971
3973
|
B(
|
|
3972
3974
|
c,
|
|
3973
3975
|
$e(),
|
|
3974
|
-
|
|
3976
|
+
Yt((S, C) => ({ current: C, prev: S.current }), {
|
|
3975
3977
|
current: [],
|
|
3976
3978
|
prev: []
|
|
3977
3979
|
}),
|
|
@@ -4009,7 +4011,7 @@ const hv = {
|
|
|
4009
4011
|
),
|
|
4010
4012
|
n
|
|
4011
4013
|
), de(u, d);
|
|
4012
|
-
const w =
|
|
4014
|
+
const w = ut(
|
|
4013
4015
|
B(
|
|
4014
4016
|
u,
|
|
4015
4017
|
oe((S) => S === void 0)
|
|
@@ -4019,7 +4021,7 @@ const hv = {
|
|
|
4019
4021
|
de(
|
|
4020
4022
|
B(
|
|
4021
4023
|
d,
|
|
4022
|
-
me((S) => S !== void 0 && He(
|
|
4024
|
+
me((S) => S !== void 0 && He(Je(v).sizeTree)),
|
|
4023
4025
|
oe((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
|
|
4024
4026
|
),
|
|
4025
4027
|
n
|
|
@@ -4028,7 +4030,7 @@ const hv = {
|
|
|
4028
4030
|
B(
|
|
4029
4031
|
n,
|
|
4030
4032
|
Te(v),
|
|
4031
|
-
|
|
4033
|
+
Yt(
|
|
4032
4034
|
({ sizes: S }, [C, E]) => ({
|
|
4033
4035
|
changed: E !== S,
|
|
4034
4036
|
sizes: E
|
|
@@ -4041,18 +4043,18 @@ const hv = {
|
|
|
4041
4043
|
Le(
|
|
4042
4044
|
B(
|
|
4043
4045
|
a,
|
|
4044
|
-
|
|
4046
|
+
Yt(
|
|
4045
4047
|
(S, C) => ({ diff: S.prev - C, prev: C }),
|
|
4046
4048
|
{ diff: 0, prev: 0 }
|
|
4047
4049
|
),
|
|
4048
4050
|
oe((S) => S.diff)
|
|
4049
4051
|
),
|
|
4050
4052
|
(S) => {
|
|
4051
|
-
const { groupIndices: C } =
|
|
4053
|
+
const { groupIndices: C } = Je(v);
|
|
4052
4054
|
if (S > 0)
|
|
4053
4055
|
Ce(t, !0), Ce(s, S + fl(S, C));
|
|
4054
4056
|
else if (S < 0) {
|
|
4055
|
-
const E =
|
|
4057
|
+
const E = Je(g);
|
|
4056
4058
|
E.length > 0 && (S -= fl(-S, E)), Ce(i, S);
|
|
4057
4059
|
}
|
|
4058
4060
|
}
|
|
@@ -4144,7 +4146,7 @@ const hv = {
|
|
|
4144
4146
|
if (He(C.sizeTree))
|
|
4145
4147
|
return C;
|
|
4146
4148
|
let I = Un();
|
|
4147
|
-
const j =
|
|
4149
|
+
const j = Je(g);
|
|
4148
4150
|
let P = 0, D = 0, H = 0;
|
|
4149
4151
|
for (; P < -S; ) {
|
|
4150
4152
|
H = j[D];
|
|
@@ -4154,7 +4156,7 @@ const hv = {
|
|
|
4154
4156
|
if (I = Sn(C.sizeTree).reduce((G, { k: N, v: _ }) => yt(G, Math.max(0, N + S), _), I), P !== -S) {
|
|
4155
4157
|
const G = Sr(C.sizeTree, H);
|
|
4156
4158
|
I = yt(I, 0, G);
|
|
4157
|
-
const N =
|
|
4159
|
+
const N = Bt(C.sizeTree, -S + 1)[1];
|
|
4158
4160
|
I = yt(I, 1, N);
|
|
4159
4161
|
}
|
|
4160
4162
|
return {
|
|
@@ -4226,14 +4228,14 @@ const Zc = Oe(
|
|
|
4226
4228
|
B(
|
|
4227
4229
|
tt(o, t, r),
|
|
4228
4230
|
me(([c, u]) => Yo(u)),
|
|
4229
|
-
oe(([c, u, d]) =>
|
|
4231
|
+
oe(([c, u, d]) => Bt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
|
|
4230
4232
|
$e(),
|
|
4231
4233
|
oe((c) => [c])
|
|
4232
4234
|
),
|
|
4233
4235
|
i
|
|
4234
4236
|
), { groupCounts: s, topItemsIndexes: i };
|
|
4235
4237
|
},
|
|
4236
|
-
ze(
|
|
4238
|
+
ze(Zt, pt)
|
|
4237
4239
|
), mn = Oe(
|
|
4238
4240
|
([{ log: e }]) => {
|
|
4239
4241
|
const t = K(!1), n = St(
|
|
@@ -4244,7 +4246,7 @@ const Zc = Oe(
|
|
|
4244
4246
|
)
|
|
4245
4247
|
);
|
|
4246
4248
|
return Le(t, (r) => {
|
|
4247
|
-
r &&
|
|
4249
|
+
r && Je(e)("props updated", {}, vt.DEBUG);
|
|
4248
4250
|
}), { didMount: n, propsReady: t };
|
|
4249
4251
|
},
|
|
4250
4252
|
ze(hn),
|
|
@@ -4288,7 +4290,7 @@ const Lr = Oe(
|
|
|
4288
4290
|
]) => {
|
|
4289
4291
|
const _ = Qc(R), { align: M, behavior: V, offset: F } = _, O = E - 1, z = Jc(_, S, O);
|
|
4290
4292
|
let Q = Tr(z, S.offsetTree, H) + j;
|
|
4291
|
-
M === "end" ? (Q += G +
|
|
4293
|
+
M === "end" ? (Q += G + Bt(S.sizeTree, z)[1] - C + N, z === O && (Q += P)) : M === "center" ? Q += (G + Bt(S.sizeTree, z)[1] - C + N) / 2 : Q -= I, F && (Q += F);
|
|
4292
4294
|
const ae = (U) => {
|
|
4293
4295
|
y(), U ? (D("retrying to scroll to", { location: R }, vt.DEBUG), Ce(x, R)) : (Ce(m, !0), D("list did not change, scroll successful", {}, vt.DEBUG));
|
|
4294
4296
|
};
|
|
@@ -4296,11 +4298,11 @@ const Lr = Oe(
|
|
|
4296
4298
|
let U = !1;
|
|
4297
4299
|
b = Le(t, (ee) => {
|
|
4298
4300
|
U = U || ee;
|
|
4299
|
-
}), g =
|
|
4301
|
+
}), g = Lt(d, () => {
|
|
4300
4302
|
ae(U);
|
|
4301
4303
|
});
|
|
4302
4304
|
} else
|
|
4303
|
-
g =
|
|
4305
|
+
g = Lt(B(t, vv(150)), ae);
|
|
4304
4306
|
return w = setTimeout(() => {
|
|
4305
4307
|
y();
|
|
4306
4308
|
}, 1200), Ce(c, !0), D("scrolling from index to", { behavior: V, index: z, top: Q }, vt.DEBUG), { behavior: V, top: Q };
|
|
@@ -4314,7 +4316,7 @@ const Lr = Oe(
|
|
|
4314
4316
|
topListHeight: v
|
|
4315
4317
|
};
|
|
4316
4318
|
},
|
|
4317
|
-
ze(
|
|
4319
|
+
ze(Zt, pt, hn),
|
|
4318
4320
|
{ singleton: !0 }
|
|
4319
4321
|
);
|
|
4320
4322
|
function vv(e) {
|
|
@@ -4344,7 +4346,7 @@ const Fr = Oe(
|
|
|
4344
4346
|
i,
|
|
4345
4347
|
Te(c),
|
|
4346
4348
|
me(([d, p]) => !!p),
|
|
4347
|
-
|
|
4349
|
+
Gt(!1)
|
|
4348
4350
|
),
|
|
4349
4351
|
a
|
|
4350
4352
|
), de(
|
|
@@ -4352,7 +4354,7 @@ const Fr = Oe(
|
|
|
4352
4354
|
i,
|
|
4353
4355
|
Te(c),
|
|
4354
4356
|
me(([d, p]) => !!p),
|
|
4355
|
-
|
|
4357
|
+
Gt(!1)
|
|
4356
4358
|
),
|
|
4357
4359
|
u
|
|
4358
4360
|
), Le(
|
|
@@ -4363,10 +4365,10 @@ const Fr = Oe(
|
|
|
4363
4365
|
Te(c)
|
|
4364
4366
|
),
|
|
4365
4367
|
([, d]) => {
|
|
4366
|
-
|
|
4368
|
+
Lt(o, () => {
|
|
4367
4369
|
Ce(u, !0);
|
|
4368
4370
|
}), $i(4, () => {
|
|
4369
|
-
|
|
4371
|
+
Lt(r, () => {
|
|
4370
4372
|
Ce(a, !0);
|
|
4371
4373
|
}), Ce(s, d);
|
|
4372
4374
|
});
|
|
@@ -4377,7 +4379,7 @@ const Fr = Oe(
|
|
|
4377
4379
|
scrolledToInitialItem: a
|
|
4378
4380
|
};
|
|
4379
4381
|
},
|
|
4380
|
-
ze(
|
|
4382
|
+
ze(Zt, pt, Lr, mn),
|
|
4381
4383
|
{ singleton: !0 }
|
|
4382
4384
|
);
|
|
4383
4385
|
function eu(e, t) {
|
|
@@ -4393,14 +4395,14 @@ const Er = "up", mr = "down", xv = "none", bv = {
|
|
|
4393
4395
|
viewportHeight: 0
|
|
4394
4396
|
}
|
|
4395
4397
|
}, wv = 0, Br = Oe(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
|
|
4396
|
-
const i = K(!1), a = K(!0), c = Ne(), u = Ne(), d = K(4), p = K(wv), h =
|
|
4398
|
+
const i = K(!1), a = K(!0), c = Ne(), u = Ne(), d = K(4), p = K(wv), h = ut(
|
|
4397
4399
|
B(
|
|
4398
|
-
ri(B(he(o), En(1),
|
|
4400
|
+
ri(B(he(o), En(1), Gt(!0)), B(he(o), En(1), Gt(!1), cl(100))),
|
|
4399
4401
|
$e()
|
|
4400
4402
|
),
|
|
4401
4403
|
!1
|
|
4402
|
-
), x =
|
|
4403
|
-
B(ri(B(n,
|
|
4404
|
+
), x = ut(
|
|
4405
|
+
B(ri(B(n, Gt(!0)), B(n, Gt(!1), cl(200))), $e()),
|
|
4404
4406
|
!1
|
|
4405
4407
|
);
|
|
4406
4408
|
de(
|
|
@@ -4410,11 +4412,11 @@ const Er = "up", mr = "down", xv = "none", bv = {
|
|
|
4410
4412
|
$e()
|
|
4411
4413
|
),
|
|
4412
4414
|
a
|
|
4413
|
-
), de(B(a,
|
|
4415
|
+
), de(B(a, nn(50)), u);
|
|
4414
4416
|
const m = St(
|
|
4415
4417
|
B(
|
|
4416
4418
|
tt(r, he(s), he(t), he(e), he(d)),
|
|
4417
|
-
|
|
4419
|
+
Yt((b, [{ scrollHeight: y, scrollTop: R }, S, C, E, I]) => {
|
|
4418
4420
|
const j = R + S - y > -I, P = {
|
|
4419
4421
|
scrollHeight: y,
|
|
4420
4422
|
scrollTop: R,
|
|
@@ -4438,10 +4440,10 @@ const Er = "up", mr = "down", xv = "none", bv = {
|
|
|
4438
4440
|
}, bv),
|
|
4439
4441
|
$e((b, y) => b && b.atBottom === y.atBottom)
|
|
4440
4442
|
)
|
|
4441
|
-
), v =
|
|
4443
|
+
), v = ut(
|
|
4442
4444
|
B(
|
|
4443
4445
|
r,
|
|
4444
|
-
|
|
4446
|
+
Yt(
|
|
4445
4447
|
(b, { scrollHeight: y, scrollTop: R, viewportHeight: S }) => {
|
|
4446
4448
|
if (eu(b.scrollHeight, y))
|
|
4447
4449
|
return {
|
|
@@ -4478,36 +4480,36 @@ const Er = "up", mr = "down", xv = "none", bv = {
|
|
|
4478
4480
|
oe((b) => b.atBottom)
|
|
4479
4481
|
),
|
|
4480
4482
|
i
|
|
4481
|
-
), de(B(i,
|
|
4483
|
+
), de(B(i, nn(50)), c);
|
|
4482
4484
|
const g = K(mr);
|
|
4483
4485
|
de(
|
|
4484
4486
|
B(
|
|
4485
4487
|
r,
|
|
4486
4488
|
oe(({ scrollTop: b }) => b),
|
|
4487
4489
|
$e(),
|
|
4488
|
-
|
|
4489
|
-
(b, y) =>
|
|
4490
|
+
Yt(
|
|
4491
|
+
(b, y) => Je(x) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? Er : mr, prevScrollTop: y },
|
|
4490
4492
|
{ direction: mr, prevScrollTop: 0 }
|
|
4491
4493
|
),
|
|
4492
4494
|
oe((b) => b.direction)
|
|
4493
4495
|
),
|
|
4494
4496
|
g
|
|
4495
|
-
), de(B(r,
|
|
4497
|
+
), de(B(r, nn(50), Gt(xv)), g);
|
|
4496
4498
|
const w = K(0);
|
|
4497
4499
|
return de(
|
|
4498
4500
|
B(
|
|
4499
4501
|
h,
|
|
4500
4502
|
me((b) => !b),
|
|
4501
|
-
|
|
4503
|
+
Gt(0)
|
|
4502
4504
|
),
|
|
4503
4505
|
w
|
|
4504
4506
|
), de(
|
|
4505
4507
|
B(
|
|
4506
4508
|
o,
|
|
4507
|
-
|
|
4509
|
+
nn(100),
|
|
4508
4510
|
Te(h),
|
|
4509
4511
|
me(([b, y]) => !!y),
|
|
4510
|
-
|
|
4512
|
+
Yt(([b, y], [R]) => [y, R], [0, 0]),
|
|
4511
4513
|
oe(([b, y]) => y - b)
|
|
4512
4514
|
),
|
|
4513
4515
|
w
|
|
@@ -4534,7 +4536,7 @@ function ml(e, t) {
|
|
|
4534
4536
|
}
|
|
4535
4537
|
const Ui = Oe(
|
|
4536
4538
|
([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
|
|
4537
|
-
const s = Ne(), i = K(0), a = K(0), c = K(0), u =
|
|
4539
|
+
const s = Ne(), i = K(0), a = K(0), c = K(0), u = ut(
|
|
4538
4540
|
B(
|
|
4539
4541
|
tt(
|
|
4540
4542
|
he(r),
|
|
@@ -4590,7 +4592,7 @@ function yv(e, t, n) {
|
|
|
4590
4592
|
if (Yo(t)) {
|
|
4591
4593
|
const r = qc(e, t);
|
|
4592
4594
|
return [
|
|
4593
|
-
{ index:
|
|
4595
|
+
{ index: Bt(t.groupOffsetTree, r)[0], offset: 0, size: 0 },
|
|
4594
4596
|
{ data: n == null ? void 0 : n[0], index: r, offset: 0, size: 0 }
|
|
4595
4597
|
];
|
|
4596
4598
|
}
|
|
@@ -4683,7 +4685,7 @@ const Pn = Oe(
|
|
|
4683
4685
|
]) => {
|
|
4684
4686
|
const v = K([]), g = K(0), w = Ne();
|
|
4685
4687
|
de(s.topItemsIndexes, v);
|
|
4686
|
-
const b =
|
|
4688
|
+
const b = ut(
|
|
4687
4689
|
B(
|
|
4688
4690
|
tt(
|
|
4689
4691
|
x,
|
|
@@ -4716,7 +4718,7 @@ const Pn = Oe(
|
|
|
4716
4718
|
N,
|
|
4717
4719
|
_
|
|
4718
4720
|
]) => {
|
|
4719
|
-
const M = j, { offsetTree: V, sizeTree: F } = M, O =
|
|
4721
|
+
const M = j, { offsetTree: V, sizeTree: F } = M, O = Je(g);
|
|
4720
4722
|
if (I === 0)
|
|
4721
4723
|
return { ...As, totalCount: I };
|
|
4722
4724
|
if (C === 0 && E === 0)
|
|
@@ -4809,7 +4811,7 @@ const Pn = Oe(
|
|
|
4809
4811
|
), R = St(
|
|
4810
4812
|
B(
|
|
4811
4813
|
b,
|
|
4812
|
-
|
|
4814
|
+
nn(200),
|
|
4813
4815
|
me(({ items: C, topItems: E }) => C.length > 0 && C[0].originalIndex === E.length),
|
|
4814
4816
|
oe(({ items: C }) => C[0].index),
|
|
4815
4817
|
$e()
|
|
@@ -4835,7 +4837,7 @@ const Pn = Oe(
|
|
|
4835
4837
|
return { endReached: y, initialItemCount: g, itemsRendered: w, listState: b, rangeChanged: S, startReached: R, topItemsIndexes: v, ...h };
|
|
4836
4838
|
},
|
|
4837
4839
|
ze(
|
|
4838
|
-
|
|
4840
|
+
Zt,
|
|
4839
4841
|
Zc,
|
|
4840
4842
|
Ui,
|
|
4841
4843
|
Fr,
|
|
@@ -4847,7 +4849,7 @@ const Pn = Oe(
|
|
|
4847
4849
|
{ singleton: !0 }
|
|
4848
4850
|
), nu = Oe(
|
|
4849
4851
|
([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
|
|
4850
|
-
const s = Ne(), i =
|
|
4852
|
+
const s = Ne(), i = ut(
|
|
4851
4853
|
B(
|
|
4852
4854
|
tt(n, e, r, t, o),
|
|
4853
4855
|
oe(([a, c, u, d, p]) => a + c + u + d + p.offsetBottom + p.bottom)
|
|
@@ -4860,12 +4862,12 @@ const Pn = Oe(
|
|
|
4860
4862
|
{ singleton: !0 }
|
|
4861
4863
|
), Sv = Oe(
|
|
4862
4864
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
4863
|
-
const n = K(!1), r =
|
|
4865
|
+
const n = K(!1), r = ut(
|
|
4864
4866
|
B(
|
|
4865
4867
|
tt(n, e, t),
|
|
4866
4868
|
me(([o]) => o),
|
|
4867
4869
|
oe(([, o, s]) => Math.max(0, o - s)),
|
|
4868
|
-
|
|
4870
|
+
nn(0),
|
|
4869
4871
|
$e()
|
|
4870
4872
|
),
|
|
4871
4873
|
0
|
|
@@ -4895,20 +4897,20 @@ const Pn = Oe(
|
|
|
4895
4897
|
Te(t, c, n, s, o, r, a),
|
|
4896
4898
|
Te(e),
|
|
4897
4899
|
oe(([[p, h, x, m, v, g, w, b], y]) => {
|
|
4898
|
-
const { align: R, behavior: S, calculateViewLocation: C = Cv, done: E, ...I } = p, j = Jc(p, h, m - 1), P = Tr(j, h.offsetTree, y) + v + g, D = P +
|
|
4900
|
+
const { align: R, behavior: S, calculateViewLocation: C = Cv, done: E, ...I } = p, j = Jc(p, h, m - 1), P = Tr(j, h.offsetTree, y) + v + g, D = P + Bt(h.sizeTree, j)[1], H = b + g, G = b + x - w, N = C({
|
|
4899
4901
|
itemBottom: D,
|
|
4900
4902
|
itemTop: P,
|
|
4901
4903
|
locationParams: { align: R, behavior: S, ...I },
|
|
4902
4904
|
viewportBottom: G,
|
|
4903
4905
|
viewportTop: H
|
|
4904
4906
|
});
|
|
4905
|
-
return N ? E &&
|
|
4907
|
+
return N ? E && Lt(
|
|
4906
4908
|
B(
|
|
4907
4909
|
i,
|
|
4908
4910
|
me((_) => !_),
|
|
4909
4911
|
// skips the initial publish of false, and the cleanup call.
|
|
4910
4912
|
// but if scrollingInProgress is true, we skip the initial publish.
|
|
4911
|
-
En(
|
|
4913
|
+
En(Je(i) ? 1 : 2)
|
|
4912
4914
|
),
|
|
4913
4915
|
E
|
|
4914
4916
|
) : E && E(), N;
|
|
@@ -4920,7 +4922,7 @@ const Pn = Oe(
|
|
|
4920
4922
|
scrollIntoView: d
|
|
4921
4923
|
};
|
|
4922
4924
|
},
|
|
4923
|
-
ze(
|
|
4925
|
+
ze(Zt, pt, Lr, Pn, hn),
|
|
4924
4926
|
{ singleton: !0 }
|
|
4925
4927
|
);
|
|
4926
4928
|
function vl(e) {
|
|
@@ -4958,16 +4960,16 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
|
|
|
4958
4960
|
me(({ shouldFollow: S }) => S)
|
|
4959
4961
|
),
|
|
4960
4962
|
({ followOutputBehavior: S, totalCount: C }) => {
|
|
4961
|
-
g && (g(), g = null),
|
|
4962
|
-
|
|
4963
|
-
}) : g =
|
|
4964
|
-
|
|
4963
|
+
g && (g(), g = null), Je(n) ? requestAnimationFrame(() => {
|
|
4964
|
+
Je(d)("following output to ", { totalCount: C }, vt.DEBUG), w(S);
|
|
4965
|
+
}) : g = Lt(e, () => {
|
|
4966
|
+
Je(d)("following output to ", { totalCount: C }, vt.DEBUG), w(S), g = null;
|
|
4965
4967
|
});
|
|
4966
4968
|
}
|
|
4967
4969
|
);
|
|
4968
4970
|
function b(S) {
|
|
4969
|
-
const C =
|
|
4970
|
-
S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !g && (
|
|
4971
|
+
const C = Lt(o, (E) => {
|
|
4972
|
+
S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !g && (Je(d)("scrolling to bottom due to increased size", {}, vt.DEBUG), w("auto"));
|
|
4971
4973
|
});
|
|
4972
4974
|
setTimeout(C, 100);
|
|
4973
4975
|
}
|
|
@@ -4975,7 +4977,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
|
|
|
4975
4977
|
B(
|
|
4976
4978
|
tt(he(m), t, u),
|
|
4977
4979
|
me(([S, , C]) => S && C),
|
|
4978
|
-
|
|
4980
|
+
Yt(
|
|
4979
4981
|
({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
|
|
4980
4982
|
{ refreshed: !1, value: 0 }
|
|
4981
4983
|
),
|
|
@@ -4983,10 +4985,10 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
|
|
|
4983
4985
|
Te(m, t)
|
|
4984
4986
|
),
|
|
4985
4987
|
([, S]) => {
|
|
4986
|
-
|
|
4988
|
+
Je(a) && b(S !== !1);
|
|
4987
4989
|
}
|
|
4988
4990
|
), Le(v, () => {
|
|
4989
|
-
b(
|
|
4991
|
+
b(Je(m) !== !1);
|
|
4990
4992
|
}), Le(tt(he(m), o), ([S, C]) => {
|
|
4991
4993
|
S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && w("auto");
|
|
4992
4994
|
});
|
|
@@ -5009,19 +5011,19 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
|
|
|
5009
5011
|
Te(he(y), a, p, h),
|
|
5010
5012
|
oe(([[S, C], E, I, j, P]) => C && I && (E == null ? void 0 : E({ context: P, totalCount: S, scrollingInProgress: j }))),
|
|
5011
5013
|
me((S) => !!S),
|
|
5012
|
-
|
|
5014
|
+
nn(0)
|
|
5013
5015
|
),
|
|
5014
5016
|
(S) => {
|
|
5015
|
-
g && (g(), g = null),
|
|
5016
|
-
|
|
5017
|
-
}) : g =
|
|
5018
|
-
|
|
5017
|
+
g && (g(), g = null), Je(n) ? requestAnimationFrame(() => {
|
|
5018
|
+
Je(d)("scrolling into view", {}), Ce(x, S);
|
|
5019
|
+
}) : g = Lt(e, () => {
|
|
5020
|
+
Je(d)("scrolling into view", {}), Ce(x, S), g = null;
|
|
5019
5021
|
});
|
|
5020
5022
|
}
|
|
5021
5023
|
), { autoscrollToBottom: v, followOutput: m, scrollIntoViewOnChange: y };
|
|
5022
5024
|
},
|
|
5023
5025
|
ze(
|
|
5024
|
-
|
|
5026
|
+
Zt,
|
|
5025
5027
|
Br,
|
|
5026
5028
|
Lr,
|
|
5027
5029
|
Fr,
|
|
@@ -5042,7 +5044,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
|
|
|
5042
5044
|
),
|
|
5043
5045
|
i
|
|
5044
5046
|
), {}),
|
|
5045
|
-
ze(
|
|
5047
|
+
ze(Zt, Fr, Pn, mn),
|
|
5046
5048
|
{ singleton: !0 }
|
|
5047
5049
|
), Iv = Oe(
|
|
5048
5050
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
@@ -5055,7 +5057,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
|
|
|
5055
5057
|
oe(([, o]) => ({ top: o }))
|
|
5056
5058
|
),
|
|
5057
5059
|
(o) => {
|
|
5058
|
-
|
|
5060
|
+
Lt(
|
|
5059
5061
|
B(
|
|
5060
5062
|
n,
|
|
5061
5063
|
En(1),
|
|
@@ -5167,7 +5169,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
|
|
|
5167
5169
|
restoreStateFrom: d
|
|
5168
5170
|
};
|
|
5169
5171
|
},
|
|
5170
|
-
ze(
|
|
5172
|
+
ze(Zt, pt, Fr, mn, Wi)
|
|
5171
5173
|
);
|
|
5172
5174
|
function Av(e) {
|
|
5173
5175
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
@@ -5200,7 +5202,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5200
5202
|
B(
|
|
5201
5203
|
c,
|
|
5202
5204
|
Te(i),
|
|
5203
|
-
|
|
5205
|
+
Yt(
|
|
5204
5206
|
([, w, b, y], [{ bottom: R, items: S, offsetBottom: C, totalCount: E }, I]) => {
|
|
5205
5207
|
const j = R + C;
|
|
5206
5208
|
let P = 0;
|
|
@@ -5221,10 +5223,10 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5221
5223
|
y && Pv() ? Ce(e, b - w) : g(-w);
|
|
5222
5224
|
}), Le(
|
|
5223
5225
|
B(
|
|
5224
|
-
tt(
|
|
5226
|
+
tt(ut(s, !1), e, m),
|
|
5225
5227
|
me(([w, b, y]) => !w && !y && b !== 0),
|
|
5226
5228
|
oe(([w, b]) => b),
|
|
5227
|
-
|
|
5229
|
+
nn(1)
|
|
5228
5230
|
),
|
|
5229
5231
|
g
|
|
5230
5232
|
), de(
|
|
@@ -5265,7 +5267,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5265
5267
|
}
|
|
5266
5268
|
), { deviation: e };
|
|
5267
5269
|
},
|
|
5268
|
-
ze(pt, Br, Pn,
|
|
5270
|
+
ze(pt, Br, Pn, Zt, hn, Bi)
|
|
5269
5271
|
), _v = Oe(
|
|
5270
5272
|
([
|
|
5271
5273
|
e,
|
|
@@ -5369,7 +5371,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5369
5371
|
...g
|
|
5370
5372
|
}),
|
|
5371
5373
|
ze(
|
|
5372
|
-
|
|
5374
|
+
Zt,
|
|
5373
5375
|
Fr,
|
|
5374
5376
|
pt,
|
|
5375
5377
|
Nv,
|
|
@@ -5447,11 +5449,11 @@ function lu(e, t, n) {
|
|
|
5447
5449
|
);
|
|
5448
5450
|
return Y.useSyncExternalStore(
|
|
5449
5451
|
b,
|
|
5450
|
-
() =>
|
|
5451
|
-
() =>
|
|
5452
|
+
() => Je(w),
|
|
5453
|
+
() => Je(w)
|
|
5452
5454
|
);
|
|
5453
5455
|
}, m = (g) => {
|
|
5454
|
-
const w = Y.useContext(a)[g], [b, y] = Y.useState(ll(
|
|
5456
|
+
const w = Y.useContext(a)[g], [b, y] = Y.useState(ll(Je, w));
|
|
5455
5457
|
return Kr(
|
|
5456
5458
|
() => Le(w, (R) => {
|
|
5457
5459
|
R !== b && y(al(R));
|
|
@@ -5537,7 +5539,7 @@ function Gi(e) {
|
|
|
5537
5539
|
return e;
|
|
5538
5540
|
}
|
|
5539
5541
|
const Dv = /* @__PURE__ */ Oe(() => {
|
|
5540
|
-
const e = K((a) => `Item ${a}`), t = K((a) => `Group ${a}`), n = K({}), r = K(Gi), o = K("div"), s = K(tr), i = (a, c = null) =>
|
|
5542
|
+
const e = K((a) => `Item ${a}`), t = K((a) => `Group ${a}`), n = K({}), r = K(Gi), o = K("div"), s = K(tr), i = (a, c = null) => ut(
|
|
5541
5543
|
B(
|
|
5542
5544
|
n,
|
|
5543
5545
|
oe((u) => u[a]),
|
|
@@ -5596,10 +5598,10 @@ const Dv = /* @__PURE__ */ Oe(() => {
|
|
|
5596
5598
|
},
|
|
5597
5599
|
...H ? {} : { visibility: "hidden" }
|
|
5598
5600
|
};
|
|
5599
|
-
return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...
|
|
5601
|
+
return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...ct(y, u) }) : /* @__PURE__ */ l.jsx(
|
|
5600
5602
|
S,
|
|
5601
5603
|
{
|
|
5602
|
-
...
|
|
5604
|
+
...ct(S, u),
|
|
5603
5605
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
5604
5606
|
ref: g,
|
|
5605
5607
|
style: G,
|
|
@@ -5608,7 +5610,7 @@ const Dv = /* @__PURE__ */ Oe(() => {
|
|
|
5608
5610
|
return j ? /* @__PURE__ */ no(
|
|
5609
5611
|
R,
|
|
5610
5612
|
{
|
|
5611
|
-
...
|
|
5613
|
+
...ct(R, u),
|
|
5612
5614
|
height: N.size,
|
|
5613
5615
|
index: N.index,
|
|
5614
5616
|
key: M,
|
|
@@ -5618,7 +5620,7 @@ const Dv = /* @__PURE__ */ Oe(() => {
|
|
|
5618
5620
|
) : N.type === "group" ? /* @__PURE__ */ no(
|
|
5619
5621
|
E,
|
|
5620
5622
|
{
|
|
5621
|
-
...
|
|
5623
|
+
...ct(E, u),
|
|
5622
5624
|
"data-index": _,
|
|
5623
5625
|
"data-item-index": N.index,
|
|
5624
5626
|
"data-known-size": N.size,
|
|
@@ -5629,7 +5631,7 @@ const Dv = /* @__PURE__ */ Oe(() => {
|
|
|
5629
5631
|
) : /* @__PURE__ */ no(
|
|
5630
5632
|
C,
|
|
5631
5633
|
{
|
|
5632
|
-
...
|
|
5634
|
+
...ct(C, u),
|
|
5633
5635
|
...Wv(C, N.data),
|
|
5634
5636
|
"data-index": _,
|
|
5635
5637
|
"data-item-group-index": N.groupIndex,
|
|
@@ -5665,7 +5667,7 @@ const Dv = /* @__PURE__ */ Oe(() => {
|
|
|
5665
5667
|
width: "100%",
|
|
5666
5668
|
zIndex: 1
|
|
5667
5669
|
};
|
|
5668
|
-
function
|
|
5670
|
+
function ct(e, t) {
|
|
5669
5671
|
if (typeof e != "string")
|
|
5670
5672
|
return { context: t };
|
|
5671
5673
|
}
|
|
@@ -5683,7 +5685,7 @@ const Vv = /* @__PURE__ */ Y.memo(function() {
|
|
|
5683
5685
|
!0,
|
|
5684
5686
|
xe("skipAnimationFrameInResizeObserver")
|
|
5685
5687
|
), o = xe("context");
|
|
5686
|
-
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...
|
|
5688
|
+
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
|
|
5687
5689
|
}), Gv = /* @__PURE__ */ Y.memo(function() {
|
|
5688
5690
|
const e = xe("FooterComponent"), t = It("footerHeight"), n = xe("HeaderFooterTag"), r = jn(
|
|
5689
5691
|
Y.useMemo(
|
|
@@ -5695,7 +5697,7 @@ const Vv = /* @__PURE__ */ Y.memo(function() {
|
|
|
5695
5697
|
!0,
|
|
5696
5698
|
xe("skipAnimationFrameInResizeObserver")
|
|
5697
5699
|
), o = xe("context");
|
|
5698
|
-
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...
|
|
5700
|
+
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
|
|
5699
5701
|
});
|
|
5700
5702
|
function hu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
5701
5703
|
return Y.memo(function({ children: r, style: o, context: s, ...i }) {
|
|
@@ -5716,7 +5718,7 @@ function hu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
5716
5718
|
style: { ...p ? zv : $v, ...o },
|
|
5717
5719
|
tabIndex: 0,
|
|
5718
5720
|
...i,
|
|
5719
|
-
...
|
|
5721
|
+
...ct(c, s),
|
|
5720
5722
|
children: r
|
|
5721
5723
|
}
|
|
5722
5724
|
);
|
|
@@ -5743,7 +5745,7 @@ function mu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
5743
5745
|
"data-virtuoso-scroller": !0,
|
|
5744
5746
|
style: { position: "relative", ...o, ...d !== 0 ? { height: d + p } : {} },
|
|
5745
5747
|
...i,
|
|
5746
|
-
...
|
|
5748
|
+
...ct(c, s),
|
|
5747
5749
|
children: r
|
|
5748
5750
|
}
|
|
5749
5751
|
);
|
|
@@ -5768,7 +5770,7 @@ const Kv = ({ children: e }) => {
|
|
|
5768
5770
|
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "window", ref: s, style: Xo(i), children: e });
|
|
5769
5771
|
}, Xv = ({ children: e }) => {
|
|
5770
5772
|
const t = xe("TopItemListComponent") || "div", n = xe("headerHeight"), r = { ...Uv, marginTop: `${n}px` }, o = xe("context");
|
|
5771
|
-
return /* @__PURE__ */ l.jsx(t, { style: r, ...
|
|
5773
|
+
return /* @__PURE__ */ l.jsx(t, { style: r, ...ct(t, o), children: e });
|
|
5772
5774
|
}, qv = /* @__PURE__ */ Y.memo(function(e) {
|
|
5773
5775
|
const t = xe("useWindowScroll"), n = xe("topItemsIndexes").length > 0, r = xe("customScrollParent"), o = xe("context");
|
|
5774
5776
|
return /* @__PURE__ */ l.jsxs(r || t ? Qv : Zv, { ...e, context: o, children: [
|
|
@@ -5850,7 +5852,7 @@ const Kv = ({ children: e }) => {
|
|
|
5850
5852
|
] })), t = K(null), n = K((u) => /* @__PURE__ */ l.jsxs("td", { colSpan: 1e3, children: [
|
|
5851
5853
|
"Group ",
|
|
5852
5854
|
u
|
|
5853
|
-
] })), r = K(null), o = K(null), s = K({}), i = K(Gi), a = K(tr), c = (u, d = null) =>
|
|
5855
|
+
] })), r = K(null), o = K(null), s = K({}), i = K(Gi), a = K(tr), c = (u, d = null) => ut(
|
|
5854
5856
|
B(
|
|
5855
5857
|
s,
|
|
5856
5858
|
oe((p) => p[u]),
|
|
@@ -5941,7 +5943,7 @@ const sx = /* @__PURE__ */ Oe(
|
|
|
5941
5943
|
([, , , , k]) => {
|
|
5942
5944
|
Ce(Q, !0), $i(1, () => {
|
|
5943
5945
|
Ce(D, k);
|
|
5944
|
-
}),
|
|
5946
|
+
}), Lt(B(u), () => {
|
|
5945
5947
|
Ce(t, [0, 0]), Ce(z, !0);
|
|
5946
5948
|
});
|
|
5947
5949
|
}
|
|
@@ -5949,7 +5951,7 @@ const sx = /* @__PURE__ */ Oe(
|
|
|
5949
5951
|
B(
|
|
5950
5952
|
V,
|
|
5951
5953
|
me((k) => k != null && k.scrollTop > 0),
|
|
5952
|
-
|
|
5954
|
+
Gt(0)
|
|
5953
5955
|
),
|
|
5954
5956
|
E
|
|
5955
5957
|
), Le(
|
|
@@ -5959,7 +5961,7 @@ const sx = /* @__PURE__ */ Oe(
|
|
|
5959
5961
|
me(([, k]) => k != null)
|
|
5960
5962
|
),
|
|
5961
5963
|
([, k]) => {
|
|
5962
|
-
k && (Ce(j, k.viewport), Ce(P, k.item), Ce(_, k.gap), k.scrollTop > 0 && (Ce(F, !0),
|
|
5964
|
+
k && (Ce(j, k.viewport), Ce(P, k.item), Ce(_, k.gap), k.scrollTop > 0 && (Ce(F, !0), Lt(B(u, En(1)), (J) => {
|
|
5963
5965
|
Ce(F, !1);
|
|
5964
5966
|
}), Ce(c, { top: k.scrollTop })));
|
|
5965
5967
|
}
|
|
@@ -6017,14 +6019,14 @@ const sx = /* @__PURE__ */ Oe(
|
|
|
6017
6019
|
if (Ae === 0 && (k === 0 || _e === 0))
|
|
6018
6020
|
return wl;
|
|
6019
6021
|
if (ye === 0) {
|
|
6020
|
-
const
|
|
6021
|
-
return rx(Cl(
|
|
6022
|
+
const kt = zi(fe, k), xn = kt + Math.max(Ae - 1, 0);
|
|
6023
|
+
return rx(Cl(kt, xn, ue));
|
|
6022
6024
|
}
|
|
6023
|
-
const
|
|
6024
|
-
let nt,
|
|
6025
|
-
le ? J === 0 && re === 0 && Ae > 0 ? (nt = 0,
|
|
6026
|
-
const Tt = Cl(nt,
|
|
6027
|
-
return { bottom: We, itemHeight: te, items: Tt, itemWidth: ye, offsetBottom:
|
|
6025
|
+
const Ge = gu(_e, ye, ke);
|
|
6026
|
+
let nt, Ke;
|
|
6027
|
+
le ? J === 0 && re === 0 && Ae > 0 ? (nt = 0, Ke = Ae - 1) : (nt = Ge * Io((J + W) / (te + W)), Ke = Ge * yl((re + W) / (te + W)) - 1, Ke = ks(k - 1, gr(Ke, Ge - 1)), nt = ks(Ke, gr(0, nt))) : (nt = 0, Ke = -1);
|
|
6028
|
+
const Tt = Cl(nt, Ke, ue), { bottom: We, top: it } = Tl(Me, ce, ie, Tt), Ye = yl(k / Ge), at = Ye * te + (Ye - 1) * W - We;
|
|
6029
|
+
return { bottom: We, itemHeight: te, items: Tt, itemWidth: ye, offsetBottom: at, offsetTop: it, top: it };
|
|
6028
6030
|
}
|
|
6029
6031
|
)
|
|
6030
6032
|
),
|
|
@@ -6073,7 +6075,7 @@ const sx = /* @__PURE__ */ Oe(
|
|
|
6073
6075
|
B(
|
|
6074
6076
|
he(I),
|
|
6075
6077
|
me(({ items: k }) => k.length > 0 && k[0].index === 0),
|
|
6076
|
-
|
|
6078
|
+
Gt(0),
|
|
6077
6079
|
$e()
|
|
6078
6080
|
)
|
|
6079
6081
|
), we = St(
|
|
@@ -6086,7 +6088,7 @@ const sx = /* @__PURE__ */ Oe(
|
|
|
6086
6088
|
startIndex: k[0].index
|
|
6087
6089
|
})),
|
|
6088
6090
|
$e(Yc),
|
|
6089
|
-
|
|
6091
|
+
nn(0)
|
|
6090
6092
|
)
|
|
6091
6093
|
);
|
|
6092
6094
|
de(we, x.scrollSeekRangeChanged), de(
|
|
@@ -6103,7 +6105,7 @@ const sx = /* @__PURE__ */ Oe(
|
|
|
6103
6105
|
),
|
|
6104
6106
|
c
|
|
6105
6107
|
);
|
|
6106
|
-
const X =
|
|
6108
|
+
const X = ut(
|
|
6107
6109
|
B(
|
|
6108
6110
|
I,
|
|
6109
6111
|
oe((k) => k.offsetBottom + k.bottom)
|
|
@@ -6175,7 +6177,7 @@ function li(e, t, n, r) {
|
|
|
6175
6177
|
return i > 0 ? i + t.row : i;
|
|
6176
6178
|
}
|
|
6177
6179
|
const ix = /* @__PURE__ */ Oe(() => {
|
|
6178
|
-
const e = K((p) => `Item ${p}`), t = K({}), n = K(null), r = K("virtuoso-grid-item"), o = K("virtuoso-grid-list"), s = K(Gi), i = K("div"), a = K(tr), c = (p, h = null) =>
|
|
6180
|
+
const e = K((p) => `Item ${p}`), t = K({}), n = K(null), r = K("virtuoso-grid-item"), o = K("virtuoso-grid-list"), s = K(Gi), i = K("div"), a = K(tr), c = (p, h = null) => ut(
|
|
6179
6181
|
B(
|
|
6180
6182
|
t,
|
|
6181
6183
|
oe((x) => x[p]),
|
|
@@ -6232,7 +6234,7 @@ const ix = /* @__PURE__ */ Oe(() => {
|
|
|
6232
6234
|
{
|
|
6233
6235
|
className: t,
|
|
6234
6236
|
ref: g,
|
|
6235
|
-
...
|
|
6237
|
+
...ct(c, d),
|
|
6236
6238
|
"data-testid": "virtuoso-item-list",
|
|
6237
6239
|
style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
|
|
6238
6240
|
children: e.items.map((w) => {
|
|
@@ -6240,7 +6242,7 @@ const ix = /* @__PURE__ */ Oe(() => {
|
|
|
6240
6242
|
return s ? /* @__PURE__ */ l.jsx(
|
|
6241
6243
|
u,
|
|
6242
6244
|
{
|
|
6243
|
-
...
|
|
6245
|
+
...ct(u, d),
|
|
6244
6246
|
height: e.itemHeight,
|
|
6245
6247
|
index: w.index,
|
|
6246
6248
|
width: e.itemWidth
|
|
@@ -6249,7 +6251,7 @@ const ix = /* @__PURE__ */ Oe(() => {
|
|
|
6249
6251
|
) : /* @__PURE__ */ no(
|
|
6250
6252
|
a,
|
|
6251
6253
|
{
|
|
6252
|
-
...
|
|
6254
|
+
...ct(a, d),
|
|
6253
6255
|
className: n,
|
|
6254
6256
|
"data-index": w.index,
|
|
6255
6257
|
key: b
|
|
@@ -6270,7 +6272,7 @@ const ix = /* @__PURE__ */ Oe(() => {
|
|
|
6270
6272
|
!0,
|
|
6271
6273
|
!1
|
|
6272
6274
|
), o = Ue("context");
|
|
6273
|
-
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...
|
|
6275
|
+
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
|
|
6274
6276
|
}), ux = Y.memo(function() {
|
|
6275
6277
|
const e = Ue("FooterComponent"), t = Nt("footerHeight"), n = Ue("headerFooterTag"), r = jn(
|
|
6276
6278
|
Y.useMemo(
|
|
@@ -6282,7 +6284,7 @@ const ix = /* @__PURE__ */ Oe(() => {
|
|
|
6282
6284
|
!0,
|
|
6283
6285
|
!1
|
|
6284
6286
|
), o = Ue("context");
|
|
6285
|
-
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...
|
|
6287
|
+
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
|
|
6286
6288
|
}), dx = ({ children: e }) => {
|
|
6287
6289
|
const t = Y.useContext(uu), n = Nt("itemDimensions"), r = Nt("viewportDimensions"), o = jn(
|
|
6288
6290
|
Y.useMemo(
|
|
@@ -6304,7 +6306,7 @@ const ix = /* @__PURE__ */ Oe(() => {
|
|
|
6304
6306
|
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: Xo(!1), children: e });
|
|
6305
6307
|
}, px = /* @__PURE__ */ Y.memo(function({ ...e }) {
|
|
6306
6308
|
const t = Ue("useWindowScroll"), n = Ue("customScrollParent"), r = n || t ? mx : hx, o = n || t ? fx : dx, s = Ue("context");
|
|
6307
|
-
return /* @__PURE__ */ l.jsx(r, { ...e, ...
|
|
6309
|
+
return /* @__PURE__ */ l.jsx(r, { ...e, ...ct(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
|
|
6308
6310
|
/* @__PURE__ */ l.jsx(cx, {}),
|
|
6309
6311
|
/* @__PURE__ */ l.jsx(lx, {}),
|
|
6310
6312
|
/* @__PURE__ */ l.jsx(ux, {})
|
|
@@ -6542,7 +6544,7 @@ function wx(e, t) {
|
|
|
6542
6544
|
}
|
|
6543
6545
|
return [r, o];
|
|
6544
6546
|
}
|
|
6545
|
-
function
|
|
6547
|
+
function Ut(e, t = []) {
|
|
6546
6548
|
let n = [];
|
|
6547
6549
|
function r(s, i) {
|
|
6548
6550
|
const a = f.createContext(i), c = n.length;
|
|
@@ -6761,13 +6763,13 @@ function Nx(e) {
|
|
|
6761
6763
|
}
|
|
6762
6764
|
var Ax = f[" useId ".trim().toString()] || (() => {
|
|
6763
6765
|
}), jx = 0;
|
|
6764
|
-
function
|
|
6766
|
+
function Ft(e) {
|
|
6765
6767
|
const [t, n] = f.useState(Ax());
|
|
6766
6768
|
return ot(() => {
|
|
6767
6769
|
n((r) => r ?? String(jx++));
|
|
6768
6770
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
6769
6771
|
}
|
|
6770
|
-
var qo = "Collapsible", [Px, BT] =
|
|
6772
|
+
var qo = "Collapsible", [Px, BT] = Ut(qo), [kx, Xi] = Px(qo), yu = f.forwardRef(
|
|
6771
6773
|
(e, t) => {
|
|
6772
6774
|
const {
|
|
6773
6775
|
__scopeCollapsible: n,
|
|
@@ -6787,7 +6789,7 @@ var qo = "Collapsible", [Px, BT] = zt(qo), [kx, Xi] = Px(qo), yu = f.forwardRef(
|
|
|
6787
6789
|
{
|
|
6788
6790
|
scope: n,
|
|
6789
6791
|
disabled: s,
|
|
6790
|
-
contentId:
|
|
6792
|
+
contentId: Ft(),
|
|
6791
6793
|
open: c,
|
|
6792
6794
|
onOpenToggle: f.useCallback(() => u((d) => !d), [u]),
|
|
6793
6795
|
children: /* @__PURE__ */ l.jsx(
|
|
@@ -7007,7 +7009,7 @@ function qr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx
|
|
|
7007
7009
|
}, [o]), o ? /* @__PURE__ */ l.jsx("div", { ref: i, className: L("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ l.jsx("div", { className: L("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
|
|
7008
7010
|
}
|
|
7009
7011
|
async function Tu(e, t) {
|
|
7010
|
-
return await
|
|
7012
|
+
return await Mt(e, {
|
|
7011
7013
|
responseType: "blob",
|
|
7012
7014
|
onDownloadProgress: (r) => {
|
|
7013
7015
|
try {
|
|
@@ -7030,7 +7032,7 @@ async function Fx(e, t) {
|
|
|
7030
7032
|
const n = await Tu(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
|
|
7031
7033
|
let o = `file_${e}`;
|
|
7032
7034
|
try {
|
|
7033
|
-
const i = await
|
|
7035
|
+
const i = await Mt(`/chat/files/${e}`);
|
|
7034
7036
|
o = (i == null ? void 0 : i.filename) ?? o;
|
|
7035
7037
|
} catch {
|
|
7036
7038
|
}
|
|
@@ -7201,8 +7203,8 @@ const Vx = Y.memo(function({
|
|
|
7201
7203
|
if (G[le]) return;
|
|
7202
7204
|
N((ye) => ({ ...ye, [le]: !0 }));
|
|
7203
7205
|
try {
|
|
7204
|
-
const ye = H({ title: te === "download" ? "Downloading file..." : "Opening file...", description: "", open: !0 }), _e = (
|
|
7205
|
-
ye.update({ id: ye.id, description: `Progress: ${(
|
|
7206
|
+
const ye = H({ title: te === "download" ? "Downloading file..." : "Opening file...", description: "", open: !0 }), _e = (Ge) => {
|
|
7207
|
+
ye.update({ id: ye.id, description: `Progress: ${(Ge * 100).toFixed(0)}%` });
|
|
7206
7208
|
};
|
|
7207
7209
|
te === "download" ? await Fx(W, _e) : await jl(W, _e), ye.update({ id: ye.id, title: "Done", description: void 0 });
|
|
7208
7210
|
} catch (ye) {
|
|
@@ -7222,10 +7224,10 @@ const Vx = Y.memo(function({
|
|
|
7222
7224
|
const ye = fe.substring(5, fe.indexOf(","));
|
|
7223
7225
|
ye && ye.includes(";") ? te = ye.split(";")[0] || te : ye && !ye.includes(";") && (te = ye || te);
|
|
7224
7226
|
try {
|
|
7225
|
-
const _e = H({ title: "Uploading file...", description: "", open: !0 }),
|
|
7226
|
-
if (
|
|
7227
|
-
const nt =
|
|
7228
|
-
await jl(nt, (
|
|
7227
|
+
const _e = H({ title: "Uploading file...", description: "", open: !0 }), Ge = await ln.uploadFile(W, Ae.name ?? "file", te, D ?? void 0);
|
|
7228
|
+
if (Ge && Ge.id) {
|
|
7229
|
+
const nt = Ge.id;
|
|
7230
|
+
await jl(nt, (Ke) => _e.update({ id: _e.id, description: `Progress: ${(Ke * 100).toFixed(0)}%` })), _e.update({ id: _e.id, title: "Done", description: void 0 });
|
|
7229
7231
|
}
|
|
7230
7232
|
} catch (_e) {
|
|
7231
7233
|
console.error("Failed to upload file for viewing:", _e), H({ title: "Failed to upload file", description: String(_e), open: !0 });
|
|
@@ -7841,7 +7843,7 @@ function sb(e) {
|
|
|
7841
7843
|
return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), ob(t), rb(t);
|
|
7842
7844
|
}
|
|
7843
7845
|
function Zi(e) {
|
|
7844
|
-
const t = e + "CollectionProvider", [n, r] =
|
|
7846
|
+
const t = e + "CollectionProvider", [n, r] = Ut(t), [o, s] = n(
|
|
7845
7847
|
t,
|
|
7846
7848
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
7847
7849
|
), i = (v) => {
|
|
@@ -8161,7 +8163,7 @@ function Bl(e, t) {
|
|
|
8161
8163
|
function yb(e) {
|
|
8162
8164
|
return e.filter((t) => t.tagName !== "A");
|
|
8163
8165
|
}
|
|
8164
|
-
const Sb = ["top", "right", "bottom", "left"], dn = Math.min, wt = Math.max, Ao = Math.round, Jr = Math.floor,
|
|
8166
|
+
const Sb = ["top", "right", "bottom", "left"], dn = Math.min, wt = Math.max, Ao = Math.round, Jr = Math.floor, qt = (e) => ({
|
|
8165
8167
|
x: e,
|
|
8166
8168
|
y: e
|
|
8167
8169
|
}), Cb = {
|
|
@@ -8176,10 +8178,10 @@ const Sb = ["top", "right", "bottom", "left"], dn = Math.min, wt = Math.max, Ao
|
|
|
8176
8178
|
function pi(e, t, n) {
|
|
8177
8179
|
return wt(e, dn(t, n));
|
|
8178
8180
|
}
|
|
8179
|
-
function
|
|
8181
|
+
function rn(e, t) {
|
|
8180
8182
|
return typeof e == "function" ? e(t) : e;
|
|
8181
8183
|
}
|
|
8182
|
-
function
|
|
8184
|
+
function on(e) {
|
|
8183
8185
|
return e.split("-")[0];
|
|
8184
8186
|
}
|
|
8185
8187
|
function nr(e) {
|
|
@@ -8192,11 +8194,11 @@ function ta(e) {
|
|
|
8192
8194
|
return e === "y" ? "height" : "width";
|
|
8193
8195
|
}
|
|
8194
8196
|
const Eb = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
8195
|
-
function
|
|
8196
|
-
return Eb.has(
|
|
8197
|
+
function Xt(e) {
|
|
8198
|
+
return Eb.has(on(e)) ? "y" : "x";
|
|
8197
8199
|
}
|
|
8198
8200
|
function na(e) {
|
|
8199
|
-
return ea(
|
|
8201
|
+
return ea(Xt(e));
|
|
8200
8202
|
}
|
|
8201
8203
|
function Rb(e, t, n) {
|
|
8202
8204
|
n === void 0 && (n = !1);
|
|
@@ -8226,7 +8228,7 @@ function jb(e, t, n) {
|
|
|
8226
8228
|
}
|
|
8227
8229
|
function Pb(e, t, n, r) {
|
|
8228
8230
|
const o = nr(e);
|
|
8229
|
-
let s = jb(
|
|
8231
|
+
let s = jb(on(e), n === "start", r);
|
|
8230
8232
|
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(hi)))), s;
|
|
8231
8233
|
}
|
|
8232
8234
|
function jo(e) {
|
|
@@ -8272,7 +8274,7 @@ function zl(e, t, n) {
|
|
|
8272
8274
|
reference: r,
|
|
8273
8275
|
floating: o
|
|
8274
8276
|
} = e;
|
|
8275
|
-
const s =
|
|
8277
|
+
const s = Xt(t), i = na(t), a = ta(i), c = on(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, h = r[a] / 2 - o[a] / 2;
|
|
8276
8278
|
let x;
|
|
8277
8279
|
switch (c) {
|
|
8278
8280
|
case "top":
|
|
@@ -8392,7 +8394,7 @@ async function Rr(e, t) {
|
|
|
8392
8394
|
elementContext: p = "floating",
|
|
8393
8395
|
altBoundary: h = !1,
|
|
8394
8396
|
padding: x = 0
|
|
8395
|
-
} =
|
|
8397
|
+
} = rn(t, e), m = Pu(x), g = a[h ? p === "floating" ? "reference" : "floating" : p], w = Po(await s.getClippingRect({
|
|
8396
8398
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
|
|
8397
8399
|
boundary: u,
|
|
8398
8400
|
rootBoundary: d,
|
|
@@ -8436,7 +8438,7 @@ const Ob = (e) => ({
|
|
|
8436
8438
|
} = t, {
|
|
8437
8439
|
element: u,
|
|
8438
8440
|
padding: d = 0
|
|
8439
|
-
} =
|
|
8441
|
+
} = rn(e, t) || {};
|
|
8440
8442
|
if (u == null)
|
|
8441
8443
|
return {};
|
|
8442
8444
|
const p = Pu(d), h = {
|
|
@@ -8479,10 +8481,10 @@ const Ob = (e) => ({
|
|
|
8479
8481
|
fallbackAxisSideDirection: m = "none",
|
|
8480
8482
|
flipAlignment: v = !0,
|
|
8481
8483
|
...g
|
|
8482
|
-
} =
|
|
8484
|
+
} = rn(e, t);
|
|
8483
8485
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
8484
8486
|
return {};
|
|
8485
|
-
const w =
|
|
8487
|
+
const w = on(o), b = Xt(a), y = on(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = h || (y || !v ? [jo(a)] : Ib(a)), C = m !== "none";
|
|
8486
8488
|
!h && C && S.push(...Pb(a, v, m, R));
|
|
8487
8489
|
const E = [a, ...S], I = await Rr(t, g), j = [];
|
|
8488
8490
|
let P = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
@@ -8496,9 +8498,9 @@ const Ob = (e) => ({
|
|
|
8496
8498
|
}], !j.every((N) => N <= 0)) {
|
|
8497
8499
|
var D, H;
|
|
8498
8500
|
const N = (((D = s.flip) == null ? void 0 : D.index) || 0) + 1, _ = E[N];
|
|
8499
|
-
if (_ && (!(p === "alignment" ? b !==
|
|
8501
|
+
if (_ && (!(p === "alignment" ? b !== Xt(_) : !1) || // We leave the current main axis only if every placement on that axis
|
|
8500
8502
|
// overflows the main axis.
|
|
8501
|
-
P.every((F) =>
|
|
8503
|
+
P.every((F) => Xt(F.placement) === b ? F.overflows[0] > 0 : !0)))
|
|
8502
8504
|
return {
|
|
8503
8505
|
data: {
|
|
8504
8506
|
index: N,
|
|
@@ -8515,7 +8517,7 @@ const Ob = (e) => ({
|
|
|
8515
8517
|
var G;
|
|
8516
8518
|
const V = (G = P.filter((F) => {
|
|
8517
8519
|
if (C) {
|
|
8518
|
-
const O =
|
|
8520
|
+
const O = Xt(F.placement);
|
|
8519
8521
|
return O === b || // Create a bias to the `y` side axis due to horizontal
|
|
8520
8522
|
// reading directions favoring greater width.
|
|
8521
8523
|
O === "y";
|
|
@@ -8561,7 +8563,7 @@ const Db = function(e) {
|
|
|
8561
8563
|
} = t, {
|
|
8562
8564
|
strategy: r = "referenceHidden",
|
|
8563
8565
|
...o
|
|
8564
|
-
} =
|
|
8566
|
+
} = rn(e, t);
|
|
8565
8567
|
switch (r) {
|
|
8566
8568
|
case "referenceHidden": {
|
|
8567
8569
|
const s = await Rr(t, {
|
|
@@ -8598,7 +8600,7 @@ async function Lb(e, t) {
|
|
|
8598
8600
|
placement: n,
|
|
8599
8601
|
platform: r,
|
|
8600
8602
|
elements: o
|
|
8601
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i =
|
|
8603
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = on(n), a = nr(n), c = Xt(n) === "y", u = ku.has(i) ? -1 : 1, d = s && c ? -1 : 1, p = rn(t, e);
|
|
8602
8604
|
let {
|
|
8603
8605
|
mainAxis: h,
|
|
8604
8606
|
crossAxis: x,
|
|
@@ -8667,10 +8669,10 @@ const Fb = function(e) {
|
|
|
8667
8669
|
}
|
|
8668
8670
|
},
|
|
8669
8671
|
...c
|
|
8670
|
-
} =
|
|
8672
|
+
} = rn(e, t), u = {
|
|
8671
8673
|
x: n,
|
|
8672
8674
|
y: r
|
|
8673
|
-
}, d = await Rr(t, c), p =
|
|
8675
|
+
}, d = await Rr(t, c), p = Xt(on(o)), h = ea(p);
|
|
8674
8676
|
let x = u[h], m = u[p];
|
|
8675
8677
|
if (s) {
|
|
8676
8678
|
const g = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", b = x + d[g], y = x - d[w];
|
|
@@ -8712,12 +8714,12 @@ const Fb = function(e) {
|
|
|
8712
8714
|
offset: a = 0,
|
|
8713
8715
|
mainAxis: c = !0,
|
|
8714
8716
|
crossAxis: u = !0
|
|
8715
|
-
} =
|
|
8717
|
+
} = rn(e, t), d = {
|
|
8716
8718
|
x: n,
|
|
8717
8719
|
y: r
|
|
8718
|
-
}, p =
|
|
8720
|
+
}, p = Xt(o), h = ea(p);
|
|
8719
8721
|
let x = d[h], m = d[p];
|
|
8720
|
-
const v =
|
|
8722
|
+
const v = rn(a, t), g = typeof v == "number" ? {
|
|
8721
8723
|
mainAxis: v,
|
|
8722
8724
|
crossAxis: 0
|
|
8723
8725
|
} : {
|
|
@@ -8731,7 +8733,7 @@ const Fb = function(e) {
|
|
|
8731
8733
|
}
|
|
8732
8734
|
if (u) {
|
|
8733
8735
|
var w, b;
|
|
8734
|
-
const y = h === "y" ? "width" : "height", R = ku.has(
|
|
8736
|
+
const y = h === "y" ? "width" : "height", R = ku.has(on(o)), S = s.reference[p] - s.floating[y] + (R && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (R ? 0 : g.crossAxis), C = s.reference[p] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[p]) || 0) - (R ? g.crossAxis : 0);
|
|
8735
8737
|
m < S ? m = S : m > C && (m = C);
|
|
8736
8738
|
}
|
|
8737
8739
|
return {
|
|
@@ -8755,7 +8757,7 @@ const Fb = function(e) {
|
|
|
8755
8757
|
apply: c = () => {
|
|
8756
8758
|
},
|
|
8757
8759
|
...u
|
|
8758
|
-
} =
|
|
8760
|
+
} = rn(e, t), d = await Rr(t, u), p = on(o), h = nr(o), x = Xt(o) === "y", {
|
|
8759
8761
|
width: m,
|
|
8760
8762
|
height: v
|
|
8761
8763
|
} = s.floating;
|
|
@@ -8791,17 +8793,17 @@ function Ct(e) {
|
|
|
8791
8793
|
var t;
|
|
8792
8794
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
8793
8795
|
}
|
|
8794
|
-
function
|
|
8796
|
+
function Qt(e) {
|
|
8795
8797
|
var t;
|
|
8796
8798
|
return (t = (_u(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
8797
8799
|
}
|
|
8798
8800
|
function _u(e) {
|
|
8799
8801
|
return Qo() ? e instanceof Node || e instanceof Ct(e).Node : !1;
|
|
8800
8802
|
}
|
|
8801
|
-
function
|
|
8803
|
+
function Ht(e) {
|
|
8802
8804
|
return Qo() ? e instanceof Element || e instanceof Ct(e).Element : !1;
|
|
8803
8805
|
}
|
|
8804
|
-
function
|
|
8806
|
+
function Jt(e) {
|
|
8805
8807
|
return Qo() ? e instanceof HTMLElement || e instanceof Ct(e).HTMLElement : !1;
|
|
8806
8808
|
}
|
|
8807
8809
|
function Vl(e) {
|
|
@@ -8814,7 +8816,7 @@ function $r(e) {
|
|
|
8814
8816
|
overflowX: n,
|
|
8815
8817
|
overflowY: r,
|
|
8816
8818
|
display: o
|
|
8817
|
-
} =
|
|
8819
|
+
} = $t(e);
|
|
8818
8820
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !zb.has(o);
|
|
8819
8821
|
}
|
|
8820
8822
|
const Ub = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
@@ -8833,12 +8835,12 @@ function es(e) {
|
|
|
8833
8835
|
}
|
|
8834
8836
|
const Gb = ["transform", "translate", "scale", "rotate", "perspective"], Kb = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Yb = ["paint", "layout", "strict", "content"];
|
|
8835
8837
|
function ra(e) {
|
|
8836
|
-
const t = oa(), n =
|
|
8838
|
+
const t = oa(), n = Ht(e) ? $t(e) : e;
|
|
8837
8839
|
return Gb.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Kb.some((r) => (n.willChange || "").includes(r)) || Yb.some((r) => (n.contain || "").includes(r));
|
|
8838
8840
|
}
|
|
8839
8841
|
function Xb(e) {
|
|
8840
8842
|
let t = fn(e);
|
|
8841
|
-
for (;
|
|
8843
|
+
for (; Jt(t) && !Yn(t); ) {
|
|
8842
8844
|
if (ra(t))
|
|
8843
8845
|
return t;
|
|
8844
8846
|
if (es(t))
|
|
@@ -8854,11 +8856,11 @@ const qb = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
|
8854
8856
|
function Yn(e) {
|
|
8855
8857
|
return qb.has(rr(e));
|
|
8856
8858
|
}
|
|
8857
|
-
function
|
|
8859
|
+
function $t(e) {
|
|
8858
8860
|
return Ct(e).getComputedStyle(e);
|
|
8859
8861
|
}
|
|
8860
8862
|
function ts(e) {
|
|
8861
|
-
return
|
|
8863
|
+
return Ht(e) ? {
|
|
8862
8864
|
scrollLeft: e.scrollLeft,
|
|
8863
8865
|
scrollTop: e.scrollTop
|
|
8864
8866
|
} : {
|
|
@@ -8874,13 +8876,13 @@ function fn(e) {
|
|
|
8874
8876
|
e.assignedSlot || // DOM Element detected.
|
|
8875
8877
|
e.parentNode || // ShadowRoot detected.
|
|
8876
8878
|
Vl(e) && e.host || // Fallback.
|
|
8877
|
-
|
|
8879
|
+
Qt(e)
|
|
8878
8880
|
);
|
|
8879
8881
|
return Vl(t) ? t.host : t;
|
|
8880
8882
|
}
|
|
8881
8883
|
function Ou(e) {
|
|
8882
8884
|
const t = fn(e);
|
|
8883
|
-
return Yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
8885
|
+
return Yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jt(t) && $r(t) ? t : Ou(t);
|
|
8884
8886
|
}
|
|
8885
8887
|
function Ir(e, t, n) {
|
|
8886
8888
|
var r;
|
|
@@ -8896,9 +8898,9 @@ function mi(e) {
|
|
|
8896
8898
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
8897
8899
|
}
|
|
8898
8900
|
function Mu(e) {
|
|
8899
|
-
const t =
|
|
8901
|
+
const t = $t(e);
|
|
8900
8902
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
8901
|
-
const o =
|
|
8903
|
+
const o = Jt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
|
|
8902
8904
|
return a && (n = s, r = i), {
|
|
8903
8905
|
width: n,
|
|
8904
8906
|
height: r,
|
|
@@ -8906,12 +8908,12 @@ function Mu(e) {
|
|
|
8906
8908
|
};
|
|
8907
8909
|
}
|
|
8908
8910
|
function sa(e) {
|
|
8909
|
-
return
|
|
8911
|
+
return Ht(e) ? e : e.contextElement;
|
|
8910
8912
|
}
|
|
8911
8913
|
function Wn(e) {
|
|
8912
8914
|
const t = sa(e);
|
|
8913
|
-
if (!
|
|
8914
|
-
return
|
|
8915
|
+
if (!Jt(t))
|
|
8916
|
+
return qt(1);
|
|
8915
8917
|
const n = t.getBoundingClientRect(), {
|
|
8916
8918
|
width: r,
|
|
8917
8919
|
height: o,
|
|
@@ -8923,7 +8925,7 @@ function Wn(e) {
|
|
|
8923
8925
|
y: a
|
|
8924
8926
|
};
|
|
8925
8927
|
}
|
|
8926
|
-
const Jb = /* @__PURE__ */
|
|
8928
|
+
const Jb = /* @__PURE__ */ qt(0);
|
|
8927
8929
|
function Du(e) {
|
|
8928
8930
|
const t = Ct(e);
|
|
8929
8931
|
return !oa() || !t.visualViewport ? Jb : {
|
|
@@ -8937,15 +8939,15 @@ function Zb(e, t, n) {
|
|
|
8937
8939
|
function Rn(e, t, n, r) {
|
|
8938
8940
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
8939
8941
|
const o = e.getBoundingClientRect(), s = sa(e);
|
|
8940
|
-
let i =
|
|
8941
|
-
t && (r ?
|
|
8942
|
-
const a = Zb(s, n, r) ? Du(s) :
|
|
8942
|
+
let i = qt(1);
|
|
8943
|
+
t && (r ? Ht(r) && (i = Wn(r)) : i = Wn(e));
|
|
8944
|
+
const a = Zb(s, n, r) ? Du(s) : qt(0);
|
|
8943
8945
|
let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, p = o.height / i.y;
|
|
8944
8946
|
if (s) {
|
|
8945
|
-
const h = Ct(s), x = r &&
|
|
8947
|
+
const h = Ct(s), x = r && Ht(r) ? Ct(r) : r;
|
|
8946
8948
|
let m = h, v = mi(m);
|
|
8947
8949
|
for (; v && r && x !== m; ) {
|
|
8948
|
-
const g = Wn(v), w = v.getBoundingClientRect(), b =
|
|
8950
|
+
const g = Wn(v), w = v.getBoundingClientRect(), b = $t(v), y = w.left + (v.clientLeft + parseFloat(b.paddingLeft)) * g.x, R = w.top + (v.clientTop + parseFloat(b.paddingTop)) * g.y;
|
|
8949
8951
|
c *= g.x, u *= g.y, d *= g.x, p *= g.y, c += y, u += R, m = Ct(v), v = mi(m);
|
|
8950
8952
|
}
|
|
8951
8953
|
}
|
|
@@ -8958,7 +8960,7 @@ function Rn(e, t, n, r) {
|
|
|
8958
8960
|
}
|
|
8959
8961
|
function ns(e, t) {
|
|
8960
8962
|
const n = ts(e).scrollLeft;
|
|
8961
|
-
return t ? t.left + n : Rn(
|
|
8963
|
+
return t ? t.left + n : Rn(Qt(e)).left + n;
|
|
8962
8964
|
}
|
|
8963
8965
|
function Lu(e, t) {
|
|
8964
8966
|
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - ns(e, n), o = n.top + t.scrollTop;
|
|
@@ -8974,19 +8976,19 @@ function Qb(e) {
|
|
|
8974
8976
|
offsetParent: r,
|
|
8975
8977
|
strategy: o
|
|
8976
8978
|
} = e;
|
|
8977
|
-
const s = o === "fixed", i =
|
|
8979
|
+
const s = o === "fixed", i = Qt(r), a = t ? es(t.floating) : !1;
|
|
8978
8980
|
if (r === i || a && s)
|
|
8979
8981
|
return n;
|
|
8980
8982
|
let c = {
|
|
8981
8983
|
scrollLeft: 0,
|
|
8982
8984
|
scrollTop: 0
|
|
8983
|
-
}, u =
|
|
8984
|
-
const d =
|
|
8985
|
-
if ((p || !p && !s) && ((rr(r) !== "body" || $r(i)) && (c = ts(r)),
|
|
8985
|
+
}, u = qt(1);
|
|
8986
|
+
const d = qt(0), p = Jt(r);
|
|
8987
|
+
if ((p || !p && !s) && ((rr(r) !== "body" || $r(i)) && (c = ts(r)), Jt(r))) {
|
|
8986
8988
|
const x = Rn(r);
|
|
8987
8989
|
u = Wn(r), d.x = x.x + r.clientLeft, d.y = x.y + r.clientTop;
|
|
8988
8990
|
}
|
|
8989
|
-
const h = i && !p && !s ? Lu(i, c) :
|
|
8991
|
+
const h = i && !p && !s ? Lu(i, c) : qt(0);
|
|
8990
8992
|
return {
|
|
8991
8993
|
width: n.width * u.x,
|
|
8992
8994
|
height: n.height * u.y,
|
|
@@ -8998,10 +9000,10 @@ function ew(e) {
|
|
|
8998
9000
|
return Array.from(e.getClientRects());
|
|
8999
9001
|
}
|
|
9000
9002
|
function tw(e) {
|
|
9001
|
-
const t =
|
|
9003
|
+
const t = Qt(e), n = ts(e), r = e.ownerDocument.body, o = wt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = wt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
9002
9004
|
let i = -n.scrollLeft + ns(e);
|
|
9003
9005
|
const a = -n.scrollTop;
|
|
9004
|
-
return
|
|
9006
|
+
return $t(r).direction === "rtl" && (i += wt(t.clientWidth, r.clientWidth) - o), {
|
|
9005
9007
|
width: o,
|
|
9006
9008
|
height: s,
|
|
9007
9009
|
x: i,
|
|
@@ -9010,7 +9012,7 @@ function tw(e) {
|
|
|
9010
9012
|
}
|
|
9011
9013
|
const Gl = 25;
|
|
9012
9014
|
function nw(e, t) {
|
|
9013
|
-
const n = Ct(e), r =
|
|
9015
|
+
const n = Ct(e), r = Qt(e), o = n.visualViewport;
|
|
9014
9016
|
let s = r.clientWidth, i = r.clientHeight, a = 0, c = 0;
|
|
9015
9017
|
if (o) {
|
|
9016
9018
|
s = o.width, i = o.height;
|
|
@@ -9031,7 +9033,7 @@ function nw(e, t) {
|
|
|
9031
9033
|
}
|
|
9032
9034
|
const rw = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
9033
9035
|
function ow(e, t) {
|
|
9034
|
-
const n = Rn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s =
|
|
9036
|
+
const n = Rn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Jt(e) ? Wn(e) : qt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
|
|
9035
9037
|
return {
|
|
9036
9038
|
width: i,
|
|
9037
9039
|
height: a,
|
|
@@ -9044,8 +9046,8 @@ function Kl(e, t, n) {
|
|
|
9044
9046
|
if (t === "viewport")
|
|
9045
9047
|
r = nw(e, n);
|
|
9046
9048
|
else if (t === "document")
|
|
9047
|
-
r = tw(
|
|
9048
|
-
else if (
|
|
9049
|
+
r = tw(Qt(e));
|
|
9050
|
+
else if (Ht(t))
|
|
9049
9051
|
r = ow(t, n);
|
|
9050
9052
|
else {
|
|
9051
9053
|
const o = Du(e);
|
|
@@ -9060,17 +9062,17 @@ function Kl(e, t, n) {
|
|
|
9060
9062
|
}
|
|
9061
9063
|
function Fu(e, t) {
|
|
9062
9064
|
const n = fn(e);
|
|
9063
|
-
return n === t || !
|
|
9065
|
+
return n === t || !Ht(n) || Yn(n) ? !1 : $t(n).position === "fixed" || Fu(n, t);
|
|
9064
9066
|
}
|
|
9065
9067
|
function sw(e, t) {
|
|
9066
9068
|
const n = t.get(e);
|
|
9067
9069
|
if (n)
|
|
9068
9070
|
return n;
|
|
9069
|
-
let r = Ir(e, [], !1).filter((a) =>
|
|
9070
|
-
const s =
|
|
9071
|
+
let r = Ir(e, [], !1).filter((a) => Ht(a) && rr(a) !== "body"), o = null;
|
|
9072
|
+
const s = $t(e).position === "fixed";
|
|
9071
9073
|
let i = s ? fn(e) : e;
|
|
9072
|
-
for (;
|
|
9073
|
-
const a =
|
|
9074
|
+
for (; Ht(i) && !Yn(i); ) {
|
|
9075
|
+
const a = $t(i), c = ra(i);
|
|
9074
9076
|
!c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && rw.has(o.position) || $r(i) && !c && Fu(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fn(i);
|
|
9075
9077
|
}
|
|
9076
9078
|
return t.set(e, r), r;
|
|
@@ -9104,12 +9106,12 @@ function aw(e) {
|
|
|
9104
9106
|
};
|
|
9105
9107
|
}
|
|
9106
9108
|
function lw(e, t, n) {
|
|
9107
|
-
const r =
|
|
9109
|
+
const r = Jt(t), o = Qt(t), s = n === "fixed", i = Rn(e, !0, s, t);
|
|
9108
9110
|
let a = {
|
|
9109
9111
|
scrollLeft: 0,
|
|
9110
9112
|
scrollTop: 0
|
|
9111
9113
|
};
|
|
9112
|
-
const c =
|
|
9114
|
+
const c = qt(0);
|
|
9113
9115
|
function u() {
|
|
9114
9116
|
c.x = ns(o);
|
|
9115
9117
|
}
|
|
@@ -9119,7 +9121,7 @@ function lw(e, t, n) {
|
|
|
9119
9121
|
c.x = x.x + t.clientLeft, c.y = x.y + t.clientTop;
|
|
9120
9122
|
} else o && u();
|
|
9121
9123
|
s && !r && o && u();
|
|
9122
|
-
const d = o && !r && !s ? Lu(o, a) :
|
|
9124
|
+
const d = o && !r && !s ? Lu(o, a) : qt(0), p = i.left + a.scrollLeft - c.x - d.x, h = i.top + a.scrollTop - c.y - d.y;
|
|
9123
9125
|
return {
|
|
9124
9126
|
x: p,
|
|
9125
9127
|
y: h,
|
|
@@ -9128,24 +9130,24 @@ function lw(e, t, n) {
|
|
|
9128
9130
|
};
|
|
9129
9131
|
}
|
|
9130
9132
|
function Bs(e) {
|
|
9131
|
-
return
|
|
9133
|
+
return $t(e).position === "static";
|
|
9132
9134
|
}
|
|
9133
9135
|
function Yl(e, t) {
|
|
9134
|
-
if (!
|
|
9136
|
+
if (!Jt(e) || $t(e).position === "fixed")
|
|
9135
9137
|
return null;
|
|
9136
9138
|
if (t)
|
|
9137
9139
|
return t(e);
|
|
9138
9140
|
let n = e.offsetParent;
|
|
9139
|
-
return
|
|
9141
|
+
return Qt(e) === n && (n = n.ownerDocument.body), n;
|
|
9140
9142
|
}
|
|
9141
9143
|
function Bu(e, t) {
|
|
9142
9144
|
const n = Ct(e);
|
|
9143
9145
|
if (es(e))
|
|
9144
9146
|
return n;
|
|
9145
|
-
if (!
|
|
9147
|
+
if (!Jt(e)) {
|
|
9146
9148
|
let o = fn(e);
|
|
9147
9149
|
for (; o && !Yn(o); ) {
|
|
9148
|
-
if (
|
|
9150
|
+
if (Ht(o) && !Bs(o))
|
|
9149
9151
|
return o;
|
|
9150
9152
|
o = fn(o);
|
|
9151
9153
|
}
|
|
@@ -9169,18 +9171,18 @@ const cw = async function(e) {
|
|
|
9169
9171
|
};
|
|
9170
9172
|
};
|
|
9171
9173
|
function uw(e) {
|
|
9172
|
-
return
|
|
9174
|
+
return $t(e).direction === "rtl";
|
|
9173
9175
|
}
|
|
9174
9176
|
const dw = {
|
|
9175
9177
|
convertOffsetParentRelativeRectToViewportRelativeRect: Qb,
|
|
9176
|
-
getDocumentElement:
|
|
9178
|
+
getDocumentElement: Qt,
|
|
9177
9179
|
getClippingRect: iw,
|
|
9178
9180
|
getOffsetParent: Bu,
|
|
9179
9181
|
getElementRects: cw,
|
|
9180
9182
|
getClientRects: ew,
|
|
9181
9183
|
getDimensions: aw,
|
|
9182
9184
|
getScale: Wn,
|
|
9183
|
-
isElement:
|
|
9185
|
+
isElement: Ht,
|
|
9184
9186
|
isRTL: uw
|
|
9185
9187
|
};
|
|
9186
9188
|
function Hu(e, t) {
|
|
@@ -9188,7 +9190,7 @@ function Hu(e, t) {
|
|
|
9188
9190
|
}
|
|
9189
9191
|
function fw(e, t) {
|
|
9190
9192
|
let n = null, r;
|
|
9191
|
-
const o =
|
|
9193
|
+
const o = Qt(e);
|
|
9192
9194
|
function s() {
|
|
9193
9195
|
var a;
|
|
9194
9196
|
clearTimeout(r), (a = n) == null || a.disconnect(), n = null;
|
|
@@ -9510,7 +9512,7 @@ function Uu(e) {
|
|
|
9510
9512
|
n(void 0);
|
|
9511
9513
|
}, [e]), t;
|
|
9512
9514
|
}
|
|
9513
|
-
var ia = "Popper", [Wu, or] =
|
|
9515
|
+
var ia = "Popper", [Wu, or] = Ut(ia), [Ow, Vu] = Wu(ia), Gu = (e) => {
|
|
9514
9516
|
const { __scopePopper: t, children: n } = e, [r, o] = f.useState(null);
|
|
9515
9517
|
return /* @__PURE__ */ l.jsx(Ow, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
9516
9518
|
};
|
|
@@ -9716,7 +9718,7 @@ var la = Gu, ca = Yu, ua = Xu, da = Ju, Hw = "Portal", rs = f.forwardRef((e, t)
|
|
|
9716
9718
|
return i ? dc.createPortal(/* @__PURE__ */ l.jsx(ge.div, { ...r, ref: t }), i) : null;
|
|
9717
9719
|
});
|
|
9718
9720
|
rs.displayName = Hw;
|
|
9719
|
-
var $s = "rovingFocusGroup.onEntryFocus", $w = { bubbles: !1, cancelable: !0 }, zr = "RovingFocusGroup", [gi, Qu, zw] = Zi(zr), [Uw, ed] =
|
|
9721
|
+
var $s = "rovingFocusGroup.onEntryFocus", $w = { bubbles: !1, cancelable: !0 }, zr = "RovingFocusGroup", [gi, Qu, zw] = Zi(zr), [Uw, ed] = Ut(
|
|
9720
9722
|
zr,
|
|
9721
9723
|
[zw]
|
|
9722
9724
|
), [Ww, Vw] = Uw(zr), td = f.forwardRef(
|
|
@@ -9804,7 +9806,7 @@ var Gw = f.forwardRef((e, t) => {
|
|
|
9804
9806
|
tabStopId: s,
|
|
9805
9807
|
children: i,
|
|
9806
9808
|
...a
|
|
9807
|
-
} = e, c =
|
|
9809
|
+
} = e, c = Ft(), u = s || c, d = Vw(nd, n), p = d.currentTabStopId === u, h = Qu(n), { onFocusableItemAdd: x, onFocusableItemRemove: m, currentTabStopId: v } = d;
|
|
9808
9810
|
return f.useEffect(() => {
|
|
9809
9811
|
if (r)
|
|
9810
9812
|
return x(), () => m();
|
|
@@ -9928,14 +9930,14 @@ var Jw = td, Zw = rd, Qw = function(e) {
|
|
|
9928
9930
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), ty(r, o, n, "aria-hidden")) : function() {
|
|
9929
9931
|
return null;
|
|
9930
9932
|
};
|
|
9931
|
-
},
|
|
9932
|
-
return
|
|
9933
|
+
}, Kt = function() {
|
|
9934
|
+
return Kt = Object.assign || function(t) {
|
|
9933
9935
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
9934
9936
|
n = arguments[r];
|
|
9935
9937
|
for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
|
|
9936
9938
|
}
|
|
9937
9939
|
return t;
|
|
9938
|
-
},
|
|
9940
|
+
}, Kt.apply(this, arguments);
|
|
9939
9941
|
};
|
|
9940
9942
|
function id(e, t) {
|
|
9941
9943
|
var n = {};
|
|
@@ -10056,7 +10058,7 @@ function cy(e, t) {
|
|
|
10056
10058
|
function uy(e) {
|
|
10057
10059
|
e === void 0 && (e = {});
|
|
10058
10060
|
var t = cy(null);
|
|
10059
|
-
return t.options =
|
|
10061
|
+
return t.options = Kt({ async: !0, ssr: !1 }, e), t;
|
|
10060
10062
|
}
|
|
10061
10063
|
var ad = function(e) {
|
|
10062
10064
|
var t = e.sideCar, n = id(e, ["sideCar"]);
|
|
@@ -10065,7 +10067,7 @@ var ad = function(e) {
|
|
|
10065
10067
|
var r = t.read();
|
|
10066
10068
|
if (!r)
|
|
10067
10069
|
throw new Error("Sidecar medium not found");
|
|
10068
|
-
return f.createElement(r,
|
|
10070
|
+
return f.createElement(r, Kt({}, n));
|
|
10069
10071
|
};
|
|
10070
10072
|
ad.isSideCarExport = !0;
|
|
10071
10073
|
function dy(e, t) {
|
|
@@ -10077,12 +10079,12 @@ var ld = uy(), Ws = function() {
|
|
|
10077
10079
|
onScrollCapture: Ws,
|
|
10078
10080
|
onWheelCapture: Ws,
|
|
10079
10081
|
onTouchMoveCapture: Ws
|
|
10080
|
-
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, x = e.noRelative, m = e.noIsolation, v = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, R = id(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = ay([n, t]), E =
|
|
10082
|
+
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, x = e.noRelative, m = e.noIsolation, v = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, R = id(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = ay([n, t]), E = Kt(Kt({}, R), o);
|
|
10081
10083
|
return f.createElement(
|
|
10082
10084
|
f.Fragment,
|
|
10083
10085
|
null,
|
|
10084
10086
|
d && f.createElement(S, { sideCar: ld, removeScrollBar: u, shards: p, noRelative: x, noIsolation: m, inert: v, setCallbacks: s, allowPinchZoom: !!g, lockRef: n, gapMode: y }),
|
|
10085
|
-
i ? f.cloneElement(f.Children.only(a),
|
|
10087
|
+
i ? f.cloneElement(f.Children.only(a), Kt(Kt({}, E), { ref: C })) : f.createElement(b, Kt({}, E, { className: c, ref: C }), a)
|
|
10086
10088
|
);
|
|
10087
10089
|
});
|
|
10088
10090
|
os.defaultProps = {
|
|
@@ -10397,7 +10399,7 @@ function Dy(e) {
|
|
|
10397
10399
|
}
|
|
10398
10400
|
const Ly = dy(ld, My);
|
|
10399
10401
|
var ss = f.forwardRef(function(e, t) {
|
|
10400
|
-
return f.createElement(os,
|
|
10402
|
+
return f.createElement(os, Kt({}, e, { ref: t, sideCar: Ly }));
|
|
10401
10403
|
});
|
|
10402
10404
|
ss.classNames = os.classNames;
|
|
10403
10405
|
var xi = ["Enter", " "], Fy = ["ArrowDown", "PageUp", "Home"], pd = ["ArrowUp", "PageDown", "End"], By = [...Fy, ...pd], Hy = {
|
|
@@ -10406,7 +10408,7 @@ var xi = ["Enter", " "], Fy = ["ArrowDown", "PageUp", "Home"], pd = ["ArrowUp",
|
|
|
10406
10408
|
}, $y = {
|
|
10407
10409
|
ltr: ["ArrowLeft"],
|
|
10408
10410
|
rtl: ["ArrowRight"]
|
|
10409
|
-
}, Ur = "Menu", [Nr, zy, Uy] = Zi(Ur), [kn, hd] =
|
|
10411
|
+
}, Ur = "Menu", [Nr, zy, Uy] = Zi(Ur), [kn, hd] = Ut(Ur, [
|
|
10410
10412
|
Uy,
|
|
10411
10413
|
or,
|
|
10412
10414
|
ed
|
|
@@ -10971,7 +10973,7 @@ function dS(e, t) {
|
|
|
10971
10973
|
function Ar(e) {
|
|
10972
10974
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
10973
10975
|
}
|
|
10974
|
-
var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS = Td, yS = Rd, SS = Nd, CS = Ad, TS = jd, ES = kd, RS = Od, ls = "DropdownMenu", [IS, $T] =
|
|
10976
|
+
var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS = Td, yS = Rd, SS = Nd, CS = Ad, TS = jd, ES = kd, RS = Od, ls = "DropdownMenu", [IS, $T] = Ut(
|
|
10975
10977
|
ls,
|
|
10976
10978
|
[hd]
|
|
10977
10979
|
), ht = hd(), [NS, Dd] = IS(ls), Ld = (e) => {
|
|
@@ -10993,9 +10995,9 @@ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS =
|
|
|
10993
10995
|
NS,
|
|
10994
10996
|
{
|
|
10995
10997
|
scope: t,
|
|
10996
|
-
triggerId:
|
|
10998
|
+
triggerId: Ft(),
|
|
10997
10999
|
triggerRef: u,
|
|
10998
|
-
contentId:
|
|
11000
|
+
contentId: Ft(),
|
|
10999
11001
|
open: d,
|
|
11000
11002
|
onOpenChange: p,
|
|
11001
11003
|
onOpenToggle: f.useCallback(() => p((h) => !h), [p]),
|
|
@@ -11310,10 +11312,10 @@ function vo({
|
|
|
11310
11312
|
if (!(Ee && Ee.threadId === se.threadId && Ee.checkpointId === se.checkpointId))
|
|
11311
11313
|
return R(h).then((Pe) => {
|
|
11312
11314
|
if (q) return;
|
|
11313
|
-
const
|
|
11314
|
-
re(
|
|
11315
|
+
const _t = ((Pe == null ? void 0 : Pe.checkpoints) ?? []).slice().sort((Ot, Mn) => new Date(Mn.createdAt).getTime() - new Date(Ot.createdAt).getTime());
|
|
11316
|
+
re(_t), ie((Ot) => {
|
|
11315
11317
|
var Mn;
|
|
11316
|
-
return
|
|
11318
|
+
return Ot ?? ((Mn = _t[0]) == null ? void 0 : Mn.checkpointId) ?? null;
|
|
11317
11319
|
}), W.current = se;
|
|
11318
11320
|
}).catch((Pe) => {
|
|
11319
11321
|
console.error("ChatInterface - listCheckpoints error:", Pe), q || (re([]), W.current = null);
|
|
@@ -11323,7 +11325,7 @@ function vo({
|
|
|
11323
11325
|
}, [h, y, R]), et(() => {
|
|
11324
11326
|
y && ie(y);
|
|
11325
11327
|
}, [y]);
|
|
11326
|
-
const _e =
|
|
11328
|
+
const _e = qe(async () => {
|
|
11327
11329
|
if (!E || I) return;
|
|
11328
11330
|
const q = Ae.current;
|
|
11329
11331
|
if (!q) return;
|
|
@@ -11340,10 +11342,10 @@ function vo({
|
|
|
11340
11342
|
le.current = !1;
|
|
11341
11343
|
return;
|
|
11342
11344
|
}
|
|
11343
|
-
const
|
|
11344
|
-
Pe.scrollTop = Ee + (
|
|
11345
|
-
const
|
|
11346
|
-
fe.current =
|
|
11345
|
+
const _t = Pe.scrollHeight;
|
|
11346
|
+
Pe.scrollTop = Ee + (_t - se);
|
|
11347
|
+
const Ot = _t - Pe.scrollTop - Pe.clientHeight;
|
|
11348
|
+
fe.current = Ot <= 32, le.current = !1;
|
|
11347
11349
|
});
|
|
11348
11350
|
}
|
|
11349
11351
|
}, [E, I, j]);
|
|
@@ -11364,7 +11366,7 @@ function vo({
|
|
|
11364
11366
|
}, [P]), et(() => {
|
|
11365
11367
|
g && !pe && (p == null || p(g));
|
|
11366
11368
|
}, [g, pe, p]);
|
|
11367
|
-
const
|
|
11369
|
+
const Ge = (q) => {
|
|
11368
11370
|
if (q.length > po)
|
|
11369
11371
|
return `Message too long (${q.length}/${po} characters)`;
|
|
11370
11372
|
try {
|
|
@@ -11380,11 +11382,11 @@ function vo({
|
|
|
11380
11382
|
} catch {
|
|
11381
11383
|
return String(se);
|
|
11382
11384
|
}
|
|
11383
|
-
},
|
|
11385
|
+
}, Ke = async (q) => {
|
|
11384
11386
|
const se = q.trim();
|
|
11385
11387
|
if (!(!se && V.length === 0)) {
|
|
11386
11388
|
if (se) {
|
|
11387
|
-
const Ee =
|
|
11389
|
+
const Ee = Ge(se);
|
|
11388
11390
|
if (Ee) {
|
|
11389
11391
|
M(Ee);
|
|
11390
11392
|
return;
|
|
@@ -11401,25 +11403,25 @@ function vo({
|
|
|
11401
11403
|
a && (H(q), N(se), M(null));
|
|
11402
11404
|
}, [a]), We = Y.useCallback(() => {
|
|
11403
11405
|
H(null), N(""), M(null);
|
|
11404
|
-
}, []), it =
|
|
11406
|
+
}, []), it = qe((q, se) => {
|
|
11405
11407
|
Tt(q, se);
|
|
11406
|
-
}, [Tt]),
|
|
11408
|
+
}, [Tt]), Ye = qe((q) => {
|
|
11407
11409
|
for (let se = q - 1; se >= 0; se--)
|
|
11408
11410
|
if (x[se].role === "user") {
|
|
11409
11411
|
const Ee = nt(x[se]);
|
|
11410
11412
|
Ee && w(Ee, { checkpointId: ce || y || void 0 });
|
|
11411
11413
|
break;
|
|
11412
11414
|
}
|
|
11413
|
-
}, [x, w, ce, y, nt]),
|
|
11415
|
+
}, [x, w, ce, y, nt]), at = (q) => {
|
|
11414
11416
|
const se = Array.from(q.target.files || []);
|
|
11415
11417
|
F((Ee) => [...Ee, ...se]);
|
|
11416
|
-
},
|
|
11418
|
+
}, kt = (q) => F((se) => se.filter((Ee, Pe) => q !== Pe)), xn = async (q) => {
|
|
11417
11419
|
const se = (q.target.files || [])[0];
|
|
11418
11420
|
if (se) {
|
|
11419
11421
|
ae(null), ee(null), z(!0);
|
|
11420
11422
|
try {
|
|
11421
|
-
const Ee = await P.uploadExcel(se), Pe = Ee.sheets.map((
|
|
11422
|
-
ee(
|
|
11423
|
+
const Ee = await P.uploadExcel(se), Pe = Ee.sheets.map((Ot) => `${Ot.sheetName} -> ${Ot.tableName}`).join(", "), _t = Pe ? `Uploaded ${se.name} (${Ee.sheets.length} sheet${Ee.sheets.length === 1 ? "" : "s"}: ${Pe})` : `Uploaded ${se.name}`;
|
|
11424
|
+
ee(_t), d == null || d({ file: se, response: Ee });
|
|
11423
11425
|
} catch (Ee) {
|
|
11424
11426
|
const Pe = Ee instanceof Error ? Ee.message : "Failed to upload Excel file";
|
|
11425
11427
|
console.error("Excel upload failed", Ee), ae(Pe), p == null || p(Pe);
|
|
@@ -11521,7 +11523,7 @@ function vo({
|
|
|
11521
11523
|
truncateToolMessages: !1,
|
|
11522
11524
|
toolMessagePreviewLength: 200,
|
|
11523
11525
|
onEdit: it,
|
|
11524
|
-
onRegenerate: () =>
|
|
11526
|
+
onRegenerate: () => Ye(q),
|
|
11525
11527
|
onCancelEdit: We
|
|
11526
11528
|
},
|
|
11527
11529
|
se.id ?? `msg-${se.role}-${q}-${se.createdAt ?? ""}`
|
|
@@ -11555,7 +11557,7 @@ function vo({
|
|
|
11555
11557
|
ref: Me,
|
|
11556
11558
|
type: "file",
|
|
11557
11559
|
multiple: !0,
|
|
11558
|
-
onChange: (q) =>
|
|
11560
|
+
onChange: (q) => at(q),
|
|
11559
11561
|
className: "hidden"
|
|
11560
11562
|
}
|
|
11561
11563
|
),
|
|
@@ -11567,7 +11569,7 @@ function vo({
|
|
|
11567
11569
|
{
|
|
11568
11570
|
variant: "ghost",
|
|
11569
11571
|
size: "sm",
|
|
11570
|
-
onClick: () =>
|
|
11572
|
+
onClick: () => kt(se),
|
|
11571
11573
|
className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
|
|
11572
11574
|
"aria-label": `Remove ${q.name}`,
|
|
11573
11575
|
children: /* @__PURE__ */ l.jsx(hr, { size: 12 })
|
|
@@ -11642,7 +11644,7 @@ function vo({
|
|
|
11642
11644
|
isStreaming: m,
|
|
11643
11645
|
disabled: !1,
|
|
11644
11646
|
maxLength: po,
|
|
11645
|
-
onSend:
|
|
11647
|
+
onSend: Ke,
|
|
11646
11648
|
onCancelEdit: We,
|
|
11647
11649
|
textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${D ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${_ ? "border-red-400" : ""} ${c.textarea || ""}`
|
|
11648
11650
|
}
|
|
@@ -11684,7 +11686,7 @@ function wi(e, [t, n]) {
|
|
|
11684
11686
|
function t0(e, t) {
|
|
11685
11687
|
return f.useReducer((n, r) => t[n][r] ?? n, e);
|
|
11686
11688
|
}
|
|
11687
|
-
var wa = "ScrollArea", [lf, zT] =
|
|
11689
|
+
var wa = "ScrollArea", [lf, zT] = Ut(wa), [n0, Pt] = lf(wa), cf = f.forwardRef(
|
|
11688
11690
|
(e, t) => {
|
|
11689
11691
|
const {
|
|
11690
11692
|
__scopeScrollArea: n,
|
|
@@ -11777,17 +11779,17 @@ var uf = "ScrollAreaViewport", df = f.forwardRef(
|
|
|
11777
11779
|
}
|
|
11778
11780
|
);
|
|
11779
11781
|
df.displayName = uf;
|
|
11780
|
-
var
|
|
11782
|
+
var en = "ScrollAreaScrollbar", ya = f.forwardRef(
|
|
11781
11783
|
(e, t) => {
|
|
11782
|
-
const { forceMount: n, ...r } = e, o = Pt(
|
|
11784
|
+
const { forceMount: n, ...r } = e, o = Pt(en, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
|
|
11783
11785
|
return f.useEffect(() => (a ? s(!0) : i(!0), () => {
|
|
11784
11786
|
a ? s(!1) : i(!1);
|
|
11785
11787
|
}), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(r0, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx(o0, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(ff, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx(Sa, { ...r, ref: t }) : null;
|
|
11786
11788
|
}
|
|
11787
11789
|
);
|
|
11788
|
-
ya.displayName =
|
|
11790
|
+
ya.displayName = en;
|
|
11789
11791
|
var r0 = f.forwardRef((e, t) => {
|
|
11790
|
-
const { forceMount: n, ...r } = e, o = Pt(
|
|
11792
|
+
const { forceMount: n, ...r } = e, o = Pt(en, e.__scopeScrollArea), [s, i] = f.useState(!1);
|
|
11791
11793
|
return f.useEffect(() => {
|
|
11792
11794
|
const a = o.scrollArea;
|
|
11793
11795
|
let c = 0;
|
|
@@ -11810,7 +11812,7 @@ var r0 = f.forwardRef((e, t) => {
|
|
|
11810
11812
|
}
|
|
11811
11813
|
) });
|
|
11812
11814
|
}), o0 = f.forwardRef((e, t) => {
|
|
11813
|
-
const { forceMount: n, ...r } = e, o = Pt(
|
|
11815
|
+
const { forceMount: n, ...r } = e, o = Pt(en, e.__scopeScrollArea), s = e.orientation === "horizontal", i = us(() => c("SCROLL_END"), 100), [a, c] = t0("hidden", {
|
|
11814
11816
|
hidden: {
|
|
11815
11817
|
SCROLL: "scrolling"
|
|
11816
11818
|
},
|
|
@@ -11854,7 +11856,7 @@ var r0 = f.forwardRef((e, t) => {
|
|
|
11854
11856
|
}
|
|
11855
11857
|
) });
|
|
11856
11858
|
}), ff = f.forwardRef((e, t) => {
|
|
11857
|
-
const n = Pt(
|
|
11859
|
+
const n = Pt(en, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = f.useState(!1), a = e.orientation === "horizontal", c = us(() => {
|
|
11858
11860
|
if (n.viewport) {
|
|
11859
11861
|
const u = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
11860
11862
|
i(a ? u : d);
|
|
@@ -11869,7 +11871,7 @@ var r0 = f.forwardRef((e, t) => {
|
|
|
11869
11871
|
}
|
|
11870
11872
|
) });
|
|
11871
11873
|
}), Sa = f.forwardRef((e, t) => {
|
|
11872
|
-
const { orientation: n = "vertical", ...r } = e, o = Pt(
|
|
11874
|
+
const { orientation: n = "vertical", ...r } = e, o = Pt(en, e.__scopeScrollArea), s = f.useRef(null), i = f.useRef(0), [a, c] = f.useState({
|
|
11873
11875
|
content: 0,
|
|
11874
11876
|
viewport: 0,
|
|
11875
11877
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -11923,7 +11925,7 @@ var r0 = f.forwardRef((e, t) => {
|
|
|
11923
11925
|
}
|
|
11924
11926
|
) : null;
|
|
11925
11927
|
}), s0 = f.forwardRef((e, t) => {
|
|
11926
|
-
const { sizes: n, onSizesChange: r, ...o } = e, s = Pt(
|
|
11928
|
+
const { sizes: n, onSizesChange: r, ...o } = e, s = Pt(en, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarXChange);
|
|
11927
11929
|
return f.useEffect(() => {
|
|
11928
11930
|
c.current && a(getComputedStyle(c.current));
|
|
11929
11931
|
}, [c]), /* @__PURE__ */ l.jsx(
|
|
@@ -11962,7 +11964,7 @@ var r0 = f.forwardRef((e, t) => {
|
|
|
11962
11964
|
}
|
|
11963
11965
|
);
|
|
11964
11966
|
}), i0 = f.forwardRef((e, t) => {
|
|
11965
|
-
const { sizes: n, onSizesChange: r, ...o } = e, s = Pt(
|
|
11967
|
+
const { sizes: n, onSizesChange: r, ...o } = e, s = Pt(en, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarYChange);
|
|
11966
11968
|
return f.useEffect(() => {
|
|
11967
11969
|
c.current && a(getComputedStyle(c.current));
|
|
11968
11970
|
}, [c]), /* @__PURE__ */ l.jsx(
|
|
@@ -12001,7 +12003,7 @@ var r0 = f.forwardRef((e, t) => {
|
|
|
12001
12003
|
}
|
|
12002
12004
|
}
|
|
12003
12005
|
);
|
|
12004
|
-
}), [a0, pf] = lf(
|
|
12006
|
+
}), [a0, pf] = lf(en), hf = f.forwardRef((e, t) => {
|
|
12005
12007
|
const {
|
|
12006
12008
|
__scopeScrollArea: n,
|
|
12007
12009
|
sizes: r,
|
|
@@ -12014,7 +12016,7 @@ var r0 = f.forwardRef((e, t) => {
|
|
|
12014
12016
|
onWheelScroll: d,
|
|
12015
12017
|
onResize: p,
|
|
12016
12018
|
...h
|
|
12017
|
-
} = e, x = Pt(
|
|
12019
|
+
} = e, x = Pt(en, n), [m, v] = f.useState(null), g = Re(t, (j) => v(j)), w = f.useRef(null), b = f.useRef(""), y = x.viewport, R = r.content - r.viewport, S = st(d), C = st(c), E = us(p, 10);
|
|
12018
12020
|
function I(j) {
|
|
12019
12021
|
if (w.current) {
|
|
12020
12022
|
const P = j.clientX - w.current.left, D = j.clientY - w.current.top;
|
|
@@ -12480,7 +12482,7 @@ const Ta = f.forwardRef(
|
|
|
12480
12482
|
)
|
|
12481
12483
|
);
|
|
12482
12484
|
Ta.displayName = Rf.displayName;
|
|
12483
|
-
var ds = "Dialog", [If, KT] =
|
|
12485
|
+
var ds = "Dialog", [If, KT] = Ut(ds), [T0, Wt] = If(ds), Nf = (e) => {
|
|
12484
12486
|
const {
|
|
12485
12487
|
__scopeDialog: t,
|
|
12486
12488
|
children: n,
|
|
@@ -12500,9 +12502,9 @@ var ds = "Dialog", [If, KT] = zt(ds), [T0, Ut] = If(ds), Nf = (e) => {
|
|
|
12500
12502
|
scope: t,
|
|
12501
12503
|
triggerRef: a,
|
|
12502
12504
|
contentRef: c,
|
|
12503
|
-
contentId:
|
|
12504
|
-
titleId:
|
|
12505
|
-
descriptionId:
|
|
12505
|
+
contentId: Ft(),
|
|
12506
|
+
titleId: Ft(),
|
|
12507
|
+
descriptionId: Ft(),
|
|
12506
12508
|
open: u,
|
|
12507
12509
|
onOpenChange: d,
|
|
12508
12510
|
onOpenToggle: f.useCallback(() => d((p) => !p), [d]),
|
|
@@ -12514,7 +12516,7 @@ var ds = "Dialog", [If, KT] = zt(ds), [T0, Ut] = If(ds), Nf = (e) => {
|
|
|
12514
12516
|
Nf.displayName = ds;
|
|
12515
12517
|
var Af = "DialogTrigger", jf = f.forwardRef(
|
|
12516
12518
|
(e, t) => {
|
|
12517
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
12519
|
+
const { __scopeDialog: n, ...r } = e, o = Wt(Af, n), s = Re(t, o.triggerRef);
|
|
12518
12520
|
return /* @__PURE__ */ l.jsx(
|
|
12519
12521
|
ge.button,
|
|
12520
12522
|
{
|
|
@@ -12534,20 +12536,20 @@ jf.displayName = Af;
|
|
|
12534
12536
|
var Ea = "DialogPortal", [E0, Pf] = If(Ea, {
|
|
12535
12537
|
forceMount: void 0
|
|
12536
12538
|
}), kf = (e) => {
|
|
12537
|
-
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s =
|
|
12539
|
+
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Wt(Ea, t);
|
|
12538
12540
|
return /* @__PURE__ */ l.jsx(E0, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: i }) })) });
|
|
12539
12541
|
};
|
|
12540
12542
|
kf.displayName = Ea;
|
|
12541
12543
|
var Lo = "DialogOverlay", _f = f.forwardRef(
|
|
12542
12544
|
(e, t) => {
|
|
12543
|
-
const n = Pf(Lo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s =
|
|
12545
|
+
const n = Pf(Lo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(Lo, e.__scopeDialog);
|
|
12544
12546
|
return s.modal ? /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(I0, { ...o, ref: t }) }) : null;
|
|
12545
12547
|
}
|
|
12546
12548
|
);
|
|
12547
12549
|
_f.displayName = Lo;
|
|
12548
12550
|
var R0 = Gn("DialogOverlay.RemoveScroll"), I0 = f.forwardRef(
|
|
12549
12551
|
(e, t) => {
|
|
12550
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
12552
|
+
const { __scopeDialog: n, ...r } = e, o = Wt(Lo, n);
|
|
12551
12553
|
return (
|
|
12552
12554
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
12553
12555
|
// ie. when `Overlay` and `Content` are siblings
|
|
@@ -12564,14 +12566,14 @@ var R0 = Gn("DialogOverlay.RemoveScroll"), I0 = f.forwardRef(
|
|
|
12564
12566
|
}
|
|
12565
12567
|
), In = "DialogContent", Of = f.forwardRef(
|
|
12566
12568
|
(e, t) => {
|
|
12567
|
-
const n = Pf(In, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s =
|
|
12569
|
+
const n = Pf(In, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(In, e.__scopeDialog);
|
|
12568
12570
|
return /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(N0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(A0, { ...o, ref: t }) });
|
|
12569
12571
|
}
|
|
12570
12572
|
);
|
|
12571
12573
|
Of.displayName = In;
|
|
12572
12574
|
var N0 = f.forwardRef(
|
|
12573
12575
|
(e, t) => {
|
|
12574
|
-
const n =
|
|
12576
|
+
const n = Wt(In, e.__scopeDialog), r = f.useRef(null), o = Re(t, n.contentRef, r);
|
|
12575
12577
|
return f.useEffect(() => {
|
|
12576
12578
|
const s = r.current;
|
|
12577
12579
|
if (s) return fa(s);
|
|
@@ -12599,7 +12601,7 @@ var N0 = f.forwardRef(
|
|
|
12599
12601
|
}
|
|
12600
12602
|
), A0 = f.forwardRef(
|
|
12601
12603
|
(e, t) => {
|
|
12602
|
-
const n =
|
|
12604
|
+
const n = Wt(In, e.__scopeDialog), r = f.useRef(!1), o = f.useRef(!1);
|
|
12603
12605
|
return /* @__PURE__ */ l.jsx(
|
|
12604
12606
|
Mf,
|
|
12605
12607
|
{
|
|
@@ -12622,7 +12624,7 @@ var N0 = f.forwardRef(
|
|
|
12622
12624
|
}
|
|
12623
12625
|
), Mf = f.forwardRef(
|
|
12624
12626
|
(e, t) => {
|
|
12625
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a =
|
|
12627
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Wt(In, n), c = f.useRef(null), u = Re(t, c);
|
|
12626
12628
|
return Qi(), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
12627
12629
|
/* @__PURE__ */ l.jsx(
|
|
12628
12630
|
Zo,
|
|
@@ -12655,21 +12657,21 @@ var N0 = f.forwardRef(
|
|
|
12655
12657
|
}
|
|
12656
12658
|
), Ra = "DialogTitle", Df = f.forwardRef(
|
|
12657
12659
|
(e, t) => {
|
|
12658
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
12660
|
+
const { __scopeDialog: n, ...r } = e, o = Wt(Ra, n);
|
|
12659
12661
|
return /* @__PURE__ */ l.jsx(ge.h2, { id: o.titleId, ...r, ref: t });
|
|
12660
12662
|
}
|
|
12661
12663
|
);
|
|
12662
12664
|
Df.displayName = Ra;
|
|
12663
12665
|
var Lf = "DialogDescription", Ff = f.forwardRef(
|
|
12664
12666
|
(e, t) => {
|
|
12665
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
12667
|
+
const { __scopeDialog: n, ...r } = e, o = Wt(Lf, n);
|
|
12666
12668
|
return /* @__PURE__ */ l.jsx(ge.p, { id: o.descriptionId, ...r, ref: t });
|
|
12667
12669
|
}
|
|
12668
12670
|
);
|
|
12669
12671
|
Ff.displayName = Lf;
|
|
12670
12672
|
var Bf = "DialogClose", Hf = f.forwardRef(
|
|
12671
12673
|
(e, t) => {
|
|
12672
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
12674
|
+
const { __scopeDialog: n, ...r } = e, o = Wt(Bf, n);
|
|
12673
12675
|
return /* @__PURE__ */ l.jsx(
|
|
12674
12676
|
ge.button,
|
|
12675
12677
|
{
|
|
@@ -12819,7 +12821,7 @@ var Zf = Object.freeze({
|
|
|
12819
12821
|
)
|
|
12820
12822
|
);
|
|
12821
12823
|
Qf.displayName = H0;
|
|
12822
|
-
var $0 = Qf, [fs, XT] =
|
|
12824
|
+
var $0 = Qf, [fs, XT] = Ut("Tooltip", [
|
|
12823
12825
|
or
|
|
12824
12826
|
]), ps = or(), ep = "TooltipProvider", z0 = 700, Si = "tooltip.open", [U0, Aa] = fs(ep), tp = (e) => {
|
|
12825
12827
|
const {
|
|
@@ -12866,7 +12868,7 @@ var Pr = "Tooltip", [W0, hs] = fs(Pr), np = (e) => {
|
|
|
12866
12868
|
onOpenChange: s,
|
|
12867
12869
|
disableHoverableContent: i,
|
|
12868
12870
|
delayDuration: a
|
|
12869
|
-
} = e, c = Aa(Pr, e.__scopeTooltip), u = ps(t), [d, p] = f.useState(null), h =
|
|
12871
|
+
} = e, c = Aa(Pr, e.__scopeTooltip), u = ps(t), [d, p] = f.useState(null), h = Ft(), x = f.useRef(0), m = i ?? c.disableHoverableContent, v = a ?? c.delayDuration, g = f.useRef(!1), [w, b] = un({
|
|
12870
12872
|
prop: r,
|
|
12871
12873
|
defaultProp: o ?? !1,
|
|
12872
12874
|
onChange: (E) => {
|
|
@@ -13704,7 +13706,7 @@ function Tp(e) {
|
|
|
13704
13706
|
const t = f.useRef({ value: e, previous: e });
|
|
13705
13707
|
return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
13706
13708
|
}
|
|
13707
|
-
var gs = "Switch", [jC, ZT] =
|
|
13709
|
+
var gs = "Switch", [jC, ZT] = Ut(gs), [PC, kC] = jC(gs), Ep = f.forwardRef(
|
|
13708
13710
|
(e, t) => {
|
|
13709
13711
|
const {
|
|
13710
13712
|
__scopeSwitch: n,
|
|
@@ -13841,7 +13843,7 @@ const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
13841
13843
|
}
|
|
13842
13844
|
));
|
|
13843
13845
|
an.displayName = jp.displayName;
|
|
13844
|
-
var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Select", [vs, xs, LC] = Zi(Nn), [sr, QT] =
|
|
13846
|
+
var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Select", [vs, xs, LC] = Zi(Nn), [sr, QT] = Ut(Nn, [
|
|
13845
13847
|
LC,
|
|
13846
13848
|
or
|
|
13847
13849
|
]), bs = or(), [FC, gn] = sr(Nn), [BC, HC] = sr(Nn), Pp = (e) => {
|
|
@@ -13882,7 +13884,7 @@ var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Sele
|
|
|
13882
13884
|
onValueNodeChange: y,
|
|
13883
13885
|
valueNodeHasChildren: R,
|
|
13884
13886
|
onValueNodeHasChildrenChange: S,
|
|
13885
|
-
contentId:
|
|
13887
|
+
contentId: Ft(),
|
|
13886
13888
|
value: j,
|
|
13887
13889
|
onValueChange: P,
|
|
13888
13890
|
open: E,
|
|
@@ -14017,7 +14019,7 @@ var An = "SelectContent", Fp = f.forwardRef(
|
|
|
14017
14019
|
}
|
|
14018
14020
|
);
|
|
14019
14021
|
Fp.displayName = An;
|
|
14020
|
-
var
|
|
14022
|
+
var Dt = 10, [Bp, vn] = sr(An), UC = "SelectContentImpl", WC = Gn("SelectContent.RemoveScroll"), Hp = f.forwardRef(
|
|
14021
14023
|
(e, t) => {
|
|
14022
14024
|
const {
|
|
14023
14025
|
__scopeSelect: n,
|
|
@@ -14193,24 +14195,24 @@ var VC = "SelectItemAlignedPosition", $p = f.forwardRef((e, t) => {
|
|
|
14193
14195
|
if (s.trigger && s.valueNode && a && u && v && g && w) {
|
|
14194
14196
|
const E = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), j = s.valueNode.getBoundingClientRect(), P = w.getBoundingClientRect();
|
|
14195
14197
|
if (s.dir !== "rtl") {
|
|
14196
|
-
const ce = P.left - I.left, ie = j.left - ce, Me = E.left - ie, ue = E.width + Me, Ae = Math.max(ue, I.width), le = window.innerWidth -
|
|
14197
|
-
|
|
14198
|
+
const ce = P.left - I.left, ie = j.left - ce, Me = E.left - ie, ue = E.width + Me, Ae = Math.max(ue, I.width), le = window.innerWidth - Dt, fe = wi(ie, [
|
|
14199
|
+
Dt,
|
|
14198
14200
|
// Prevents the content from going off the starting edge of the
|
|
14199
14201
|
// viewport. It may still go off the ending edge, but this can be
|
|
14200
14202
|
// controlled by the user since they may want to manage overflow in a
|
|
14201
14203
|
// specific way.
|
|
14202
14204
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
14203
|
-
Math.max(
|
|
14205
|
+
Math.max(Dt, le - Ae)
|
|
14204
14206
|
]);
|
|
14205
14207
|
a.style.minWidth = ue + "px", a.style.left = fe + "px";
|
|
14206
14208
|
} else {
|
|
14207
|
-
const ce = I.right - P.right, ie = window.innerWidth - j.right - ce, Me = window.innerWidth - E.right - ie, ue = E.width + Me, Ae = Math.max(ue, I.width), le = window.innerWidth -
|
|
14208
|
-
|
|
14209
|
-
Math.max(
|
|
14209
|
+
const ce = I.right - P.right, ie = window.innerWidth - j.right - ce, Me = window.innerWidth - E.right - ie, ue = E.width + Me, Ae = Math.max(ue, I.width), le = window.innerWidth - Dt, fe = wi(ie, [
|
|
14210
|
+
Dt,
|
|
14211
|
+
Math.max(Dt, le - Ae)
|
|
14210
14212
|
]);
|
|
14211
14213
|
a.style.minWidth = ue + "px", a.style.right = fe + "px";
|
|
14212
14214
|
}
|
|
14213
|
-
const D = h(), H = window.innerHeight -
|
|
14215
|
+
const D = h(), H = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), _ = parseInt(N.borderTopWidth, 10), M = parseInt(N.paddingTop, 10), V = parseInt(N.borderBottomWidth, 10), F = parseInt(N.paddingBottom, 10), O = _ + M + G + F + V, z = Math.min(g.offsetHeight * 5, O), Q = window.getComputedStyle(v), ae = parseInt(Q.paddingTop, 10), U = parseInt(Q.paddingBottom, 10), ee = E.top + E.height / 2 - Dt, pe = H - ee, we = g.offsetHeight / 2, X = g.offsetTop + we, k = _ + M + X, J = O - k;
|
|
14214
14216
|
if (k <= ee) {
|
|
14215
14217
|
const ce = D.length > 0 && g === D[D.length - 1].ref.current;
|
|
14216
14218
|
a.style.bottom = "0px";
|
|
@@ -14230,7 +14232,7 @@ var VC = "SelectItemAlignedPosition", $p = f.forwardRef((e, t) => {
|
|
|
14230
14232
|
) + J;
|
|
14231
14233
|
a.style.height = Me + "px", v.scrollTop = k - ee + v.offsetTop;
|
|
14232
14234
|
}
|
|
14233
|
-
a.style.margin = `${
|
|
14235
|
+
a.style.margin = `${Dt}px 0`, a.style.minHeight = z + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => x.current = !0);
|
|
14234
14236
|
}
|
|
14235
14237
|
}, [
|
|
14236
14238
|
h,
|
|
@@ -14297,7 +14299,7 @@ var GC = "SelectPopperPosition", Ti = f.forwardRef((e, t) => {
|
|
|
14297
14299
|
const {
|
|
14298
14300
|
__scopeSelect: n,
|
|
14299
14301
|
align: r = "start",
|
|
14300
|
-
collisionPadding: o =
|
|
14302
|
+
collisionPadding: o = Dt,
|
|
14301
14303
|
...s
|
|
14302
14304
|
} = e, i = bs(n);
|
|
14303
14305
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -14360,7 +14362,7 @@ var [KC, ja] = sr(An, {}), Ei = "SelectViewport", zp = f.forwardRef(
|
|
|
14360
14362
|
if (h != null && h.current && p) {
|
|
14361
14363
|
const x = Math.abs(c.current - d.scrollTop);
|
|
14362
14364
|
if (x > 0) {
|
|
14363
|
-
const m = window.innerHeight -
|
|
14365
|
+
const m = window.innerHeight - Dt * 2, v = parseFloat(p.style.minHeight), g = parseFloat(p.style.height), w = Math.max(v, g);
|
|
14364
14366
|
if (w < m) {
|
|
14365
14367
|
const b = w + x, y = Math.min(m, b), R = b - y;
|
|
14366
14368
|
p.style.height = y + "px", p.style.bottom === "0px" && (d.scrollTop = R > 0 ? R : 0, p.style.justifyContent = "flex-end");
|
|
@@ -14377,7 +14379,7 @@ var [KC, ja] = sr(An, {}), Ei = "SelectViewport", zp = f.forwardRef(
|
|
|
14377
14379
|
zp.displayName = Ei;
|
|
14378
14380
|
var Up = "SelectGroup", [YC, XC] = sr(Up), qC = f.forwardRef(
|
|
14379
14381
|
(e, t) => {
|
|
14380
|
-
const { __scopeSelect: n, ...r } = e, o =
|
|
14382
|
+
const { __scopeSelect: n, ...r } = e, o = Ft();
|
|
14381
14383
|
return /* @__PURE__ */ l.jsx(YC, { scope: n, id: o, children: /* @__PURE__ */ l.jsx(ge.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
14382
14384
|
}
|
|
14383
14385
|
);
|
|
@@ -14403,7 +14405,7 @@ var Fo = "SelectItem", [JC, Gp] = sr(Fo), Kp = f.forwardRef(
|
|
|
14403
14405
|
var y;
|
|
14404
14406
|
return (y = c.itemRefCallback) == null ? void 0 : y.call(c, b, r, o);
|
|
14405
14407
|
}
|
|
14406
|
-
), v =
|
|
14408
|
+
), v = Ft(), g = f.useRef("touch"), w = () => {
|
|
14407
14409
|
o || (a.onValueChange(r), a.onOpenChange(!1));
|
|
14408
14410
|
};
|
|
14409
14411
|
if (r === "")
|
|
@@ -15198,7 +15200,7 @@ export {
|
|
|
15198
15200
|
ln as chatApiClient,
|
|
15199
15201
|
tE as default,
|
|
15200
15202
|
Ag as del,
|
|
15201
|
-
|
|
15203
|
+
Mt as get,
|
|
15202
15204
|
Rg as getChatToken,
|
|
15203
15205
|
VT as getCurrentSettings,
|
|
15204
15206
|
g0 as getDefaultApiConfig,
|