teodor-new-chat-ui 4.3.116 → 4.3.117
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 +435 -438
- package/dist/index.umd.js +26 -26
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,15 +2,15 @@ var eg = Object.defineProperty;
|
|
|
2
2
|
var tg = (e, t, n) => t in e ? eg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Zl = (e, t, n) => tg(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as v from "react";
|
|
5
|
-
import V, { createContext as
|
|
6
|
-
import { Square as og, Send as sg, X as
|
|
7
|
-
import { Slot as Rg, createSlot as
|
|
5
|
+
import V, { createContext as $o, useContext as Qs, useReducer as ng, useRef as Re, useCallback as pe, useEffect as bt, useMemo as at, useState as we, startTransition as Qo, createElement as ps, useLayoutEffect as rg } from "react";
|
|
6
|
+
import { Square as og, Send as sg, X as Vr, ExternalLink as ig, Download as ag, Image as lg, FileText as Ql, Loader as Xa, Bot as $i, Wrench as cg, User as ug, Paperclip as ma, ChevronUp as Ja, ChevronDown as ei, ChevronLeft as dg, ChevronRight as Vu, Copy as ec, Edit as tc, RotateCcw as ga, Check as Za, Circle as fg, Loader2 as ms, Edit3 as Ku, Plus as hg, FileSpreadsheet as pg, MessageSquarePlus as mg, MessageSquare as gg, Calendar as xg, Trash2 as yg, Settings as vg, Server as wg, EyeOff as bg, Eye as Sg, Layout as Cg, MessageCircle as Tg, Save as kg } from "lucide-react";
|
|
7
|
+
import { Slot as Rg, createSlot as Xr } from "@radix-ui/react-slot";
|
|
8
8
|
import { cva as ti } from "class-variance-authority";
|
|
9
9
|
import { clsx as Eg } from "clsx";
|
|
10
10
|
import { twMerge as Ig } from "tailwind-merge";
|
|
11
11
|
import * as ni from "react-dom";
|
|
12
12
|
import qu from "react-dom";
|
|
13
|
-
var xa = { exports: {} },
|
|
13
|
+
var xa = { exports: {} }, po = {};
|
|
14
14
|
/**
|
|
15
15
|
* @license React
|
|
16
16
|
* react-jsx-runtime.production.min.js
|
|
@@ -22,7 +22,7 @@ var xa = { exports: {} }, mo = {};
|
|
|
22
22
|
*/
|
|
23
23
|
var nc;
|
|
24
24
|
function Ng() {
|
|
25
|
-
if (nc) return
|
|
25
|
+
if (nc) return po;
|
|
26
26
|
nc = 1;
|
|
27
27
|
var e = V, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
28
28
|
function i(a, l, c) {
|
|
@@ -32,9 +32,9 @@ function Ng() {
|
|
|
32
32
|
if (a && a.defaultProps) for (d in l = a.defaultProps, l) f[d] === void 0 && (f[d] = l[d]);
|
|
33
33
|
return { $$typeof: t, type: a, key: h, ref: p, props: f, _owner: o.current };
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return po.Fragment = n, po.jsx = i, po.jsxs = i, po;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var mo = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -375,7 +375,7 @@ function Ag() {
|
|
|
375
375
|
if (Je(R))
|
|
376
376
|
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ut(R)), Xe(R);
|
|
377
377
|
}
|
|
378
|
-
var
|
|
378
|
+
var xt = m.ReactCurrentOwner, Rt = {
|
|
379
379
|
key: !0,
|
|
380
380
|
ref: !0,
|
|
381
381
|
__self: !0,
|
|
@@ -398,7 +398,7 @@ function Ag() {
|
|
|
398
398
|
return R.key !== void 0;
|
|
399
399
|
}
|
|
400
400
|
function qt(R, G) {
|
|
401
|
-
typeof R.ref == "string" &&
|
|
401
|
+
typeof R.ref == "string" && xt.current;
|
|
402
402
|
}
|
|
403
403
|
function Wt(R, G) {
|
|
404
404
|
{
|
|
@@ -466,7 +466,7 @@ function Ag() {
|
|
|
466
466
|
var wt = typeof R == "function" ? R.displayName || R.name || "Unknown" : R;
|
|
467
467
|
ze && Wt(Ue, wt), Ot && Gt(Ue, wt);
|
|
468
468
|
}
|
|
469
|
-
return st(R, ze, Ot, qe, be,
|
|
469
|
+
return st(R, ze, Ot, qe, be, xt.current, Ue);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
var Pt = m.ReactCurrentOwner, Tt = m.ReactDebugCurrentFrame;
|
|
@@ -631,8 +631,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
631
631
|
return rr(R, G, ae, !1);
|
|
632
632
|
}
|
|
633
633
|
var Xn = vr, zr = or;
|
|
634
|
-
|
|
635
|
-
}()),
|
|
634
|
+
mo.Fragment = r, mo.jsx = Xn, mo.jsxs = zr;
|
|
635
|
+
}()), mo;
|
|
636
636
|
}
|
|
637
637
|
process.env.NODE_ENV === "production" ? xa.exports = Ng() : xa.exports = Ag();
|
|
638
638
|
var u = xa.exports;
|
|
@@ -644,42 +644,42 @@ function Gu(e, t) {
|
|
|
644
644
|
const { toString: _g } = Object.prototype, { getPrototypeOf: Qa } = Object, { iterator: ri, toStringTag: Yu } = Symbol, oi = /* @__PURE__ */ ((e) => (t) => {
|
|
645
645
|
const n = _g.call(t);
|
|
646
646
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
647
|
-
})(/* @__PURE__ */ Object.create(null)), Mn = (e) => (e = e.toLowerCase(), (t) => oi(t) === e), si = (e) => (t) => typeof t === e, { isArray:
|
|
648
|
-
function
|
|
649
|
-
return e !== null && !
|
|
647
|
+
})(/* @__PURE__ */ Object.create(null)), Mn = (e) => (e = e.toLowerCase(), (t) => oi(t) === e), si = (e) => (t) => typeof t === e, { isArray: to } = Array, Jr = si("undefined");
|
|
648
|
+
function zo(e) {
|
|
649
|
+
return e !== null && !Jr(e) && e.constructor !== null && !Jr(e.constructor) && fn(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
650
650
|
}
|
|
651
651
|
const Xu = Mn("ArrayBuffer");
|
|
652
652
|
function jg(e) {
|
|
653
653
|
let t;
|
|
654
654
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Xu(e.buffer), t;
|
|
655
655
|
}
|
|
656
|
-
const Pg = si("string"), fn = si("function"), Ju = si("number"),
|
|
656
|
+
const Pg = si("string"), fn = si("function"), Ju = si("number"), Bo = (e) => e !== null && typeof e == "object", Og = (e) => e === !0 || e === !1, gs = (e) => {
|
|
657
657
|
if (oi(e) !== "object")
|
|
658
658
|
return !1;
|
|
659
659
|
const t = Qa(e);
|
|
660
660
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Yu in e) && !(ri in e);
|
|
661
661
|
}, Mg = (e) => {
|
|
662
|
-
if (!
|
|
662
|
+
if (!Bo(e) || zo(e))
|
|
663
663
|
return !1;
|
|
664
664
|
try {
|
|
665
665
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
666
666
|
} catch {
|
|
667
667
|
return !1;
|
|
668
668
|
}
|
|
669
|
-
}, Dg = Mn("Date"), Lg = Mn("File"), Fg = Mn("Blob"), $g = Mn("FileList"), zg = (e) =>
|
|
669
|
+
}, Dg = Mn("Date"), Lg = Mn("File"), Fg = Mn("Blob"), $g = Mn("FileList"), zg = (e) => Bo(e) && fn(e.pipe), Bg = (e) => {
|
|
670
670
|
let t;
|
|
671
671
|
return e && (typeof FormData == "function" && e instanceof FormData || fn(e.append) && ((t = oi(e)) === "formdata" || // detect form-data instance
|
|
672
672
|
t === "object" && fn(e.toString) && e.toString() === "[object FormData]"));
|
|
673
673
|
}, Hg = Mn("URLSearchParams"), [Ug, Wg, Vg, Kg] = ["ReadableStream", "Request", "Response", "Headers"].map(Mn), qg = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
674
|
-
function
|
|
674
|
+
function Ho(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
675
675
|
if (e === null || typeof e > "u")
|
|
676
676
|
return;
|
|
677
677
|
let r, o;
|
|
678
|
-
if (typeof e != "object" && (e = [e]),
|
|
678
|
+
if (typeof e != "object" && (e = [e]), to(e))
|
|
679
679
|
for (r = 0, o = e.length; r < o; r++)
|
|
680
680
|
t.call(null, e[r], r, e);
|
|
681
681
|
else {
|
|
682
|
-
if (
|
|
682
|
+
if (zo(e))
|
|
683
683
|
return;
|
|
684
684
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
|
|
685
685
|
let a;
|
|
@@ -688,7 +688,7 @@ function Uo(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
690
|
function Zu(e, t) {
|
|
691
|
-
if (
|
|
691
|
+
if (zo(e))
|
|
692
692
|
return null;
|
|
693
693
|
t = t.toLowerCase();
|
|
694
694
|
const n = Object.keys(e);
|
|
@@ -698,17 +698,17 @@ function Zu(e, t) {
|
|
|
698
698
|
return o;
|
|
699
699
|
return null;
|
|
700
700
|
}
|
|
701
|
-
const Cr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Qu = (e) => !
|
|
701
|
+
const Cr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Qu = (e) => !Jr(e) && e !== Cr;
|
|
702
702
|
function ya() {
|
|
703
703
|
const { caseless: e, skipUndefined: t } = Qu(this) && this || {}, n = {}, r = (o, s) => {
|
|
704
704
|
const i = e && Zu(n, s) || s;
|
|
705
|
-
gs(n[i]) && gs(o) ? n[i] = ya(n[i], o) : gs(o) ? n[i] = ya({}, o) :
|
|
705
|
+
gs(n[i]) && gs(o) ? n[i] = ya(n[i], o) : gs(o) ? n[i] = ya({}, o) : to(o) ? n[i] = o.slice() : (!t || !Jr(o)) && (n[i] = o);
|
|
706
706
|
};
|
|
707
707
|
for (let o = 0, s = arguments.length; o < s; o++)
|
|
708
|
-
arguments[o] &&
|
|
708
|
+
arguments[o] && Ho(arguments[o], r);
|
|
709
709
|
return n;
|
|
710
710
|
}
|
|
711
|
-
const Gg = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
711
|
+
const Gg = (e, t, n, { allOwnKeys: r } = {}) => (Ho(t, (o, s) => {
|
|
712
712
|
n && fn(o) ? e[s] = Gu(o, n) : e[s] = o;
|
|
713
713
|
}, { allOwnKeys: r }), e), Yg = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Xg = (e, t, n, r) => {
|
|
714
714
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -730,7 +730,7 @@ const Gg = (e, t, n, { allOwnKeys: r } = {}) => (Uo(t, (o, s) => {
|
|
|
730
730
|
return r !== -1 && r === n;
|
|
731
731
|
}, Qg = (e) => {
|
|
732
732
|
if (!e) return null;
|
|
733
|
-
if (
|
|
733
|
+
if (to(e)) return e;
|
|
734
734
|
let t = e.length;
|
|
735
735
|
if (!Ju(t)) return null;
|
|
736
736
|
const n = new Array(t);
|
|
@@ -757,7 +757,7 @@ const Gg = (e, t, n, { allOwnKeys: r } = {}) => (Uo(t, (o, s) => {
|
|
|
757
757
|
}
|
|
758
758
|
), oc = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), sx = Mn("RegExp"), ed = (e, t) => {
|
|
759
759
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
760
|
-
|
|
760
|
+
Ho(n, (o, s) => {
|
|
761
761
|
let i;
|
|
762
762
|
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
763
763
|
}), Object.defineProperties(e, r);
|
|
@@ -782,7 +782,7 @@ const Gg = (e, t, n, { allOwnKeys: r } = {}) => (Uo(t, (o, s) => {
|
|
|
782
782
|
n[s] = !0;
|
|
783
783
|
});
|
|
784
784
|
};
|
|
785
|
-
return
|
|
785
|
+
return to(e) ? r(e) : r(String(e).split(t)), n;
|
|
786
786
|
}, lx = () => {
|
|
787
787
|
}, cx = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
788
788
|
function ux(e) {
|
|
@@ -790,24 +790,24 @@ function ux(e) {
|
|
|
790
790
|
}
|
|
791
791
|
const dx = (e) => {
|
|
792
792
|
const t = new Array(10), n = (r, o) => {
|
|
793
|
-
if (
|
|
793
|
+
if (Bo(r)) {
|
|
794
794
|
if (t.indexOf(r) >= 0)
|
|
795
795
|
return;
|
|
796
|
-
if (
|
|
796
|
+
if (zo(r))
|
|
797
797
|
return r;
|
|
798
798
|
if (!("toJSON" in r)) {
|
|
799
799
|
t[o] = r;
|
|
800
|
-
const s =
|
|
801
|
-
return
|
|
800
|
+
const s = to(r) ? [] : {};
|
|
801
|
+
return Ho(r, (i, a) => {
|
|
802
802
|
const l = n(i, o + 1);
|
|
803
|
-
!
|
|
803
|
+
!Jr(l) && (s[a] = l);
|
|
804
804
|
}), t[o] = void 0, s;
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
807
|
return r;
|
|
808
808
|
};
|
|
809
809
|
return n(e, 0);
|
|
810
|
-
}, fx = Mn("AsyncFunction"), hx = (e) => e && (
|
|
810
|
+
}, fx = Mn("AsyncFunction"), hx = (e) => e && (Bo(e) || fn(e)) && fn(e.then) && fn(e.catch), td = ((e, t) => e ? setImmediate : t ? ((n, r) => (Cr.addEventListener("message", ({ source: o, data: s }) => {
|
|
811
811
|
o === Cr && s === n && r.length && r.shift()();
|
|
812
812
|
}, !1), (o) => {
|
|
813
813
|
r.push(o), Cr.postMessage(n, "*");
|
|
@@ -815,22 +815,22 @@ const dx = (e) => {
|
|
|
815
815
|
typeof setImmediate == "function",
|
|
816
816
|
fn(Cr.postMessage)
|
|
817
817
|
), px = typeof queueMicrotask < "u" ? queueMicrotask.bind(Cr) : typeof process < "u" && process.nextTick || td, mx = (e) => e != null && fn(e[ri]), O = {
|
|
818
|
-
isArray:
|
|
818
|
+
isArray: to,
|
|
819
819
|
isArrayBuffer: Xu,
|
|
820
|
-
isBuffer:
|
|
820
|
+
isBuffer: zo,
|
|
821
821
|
isFormData: Bg,
|
|
822
822
|
isArrayBufferView: jg,
|
|
823
823
|
isString: Pg,
|
|
824
824
|
isNumber: Ju,
|
|
825
825
|
isBoolean: Og,
|
|
826
|
-
isObject:
|
|
826
|
+
isObject: Bo,
|
|
827
827
|
isPlainObject: gs,
|
|
828
828
|
isEmptyObject: Mg,
|
|
829
829
|
isReadableStream: Ug,
|
|
830
830
|
isRequest: Wg,
|
|
831
831
|
isResponse: Vg,
|
|
832
832
|
isHeaders: Kg,
|
|
833
|
-
isUndefined:
|
|
833
|
+
isUndefined: Jr,
|
|
834
834
|
isDate: Dg,
|
|
835
835
|
isFile: Lg,
|
|
836
836
|
isBlob: Fg,
|
|
@@ -840,7 +840,7 @@ const dx = (e) => {
|
|
|
840
840
|
isURLSearchParams: Hg,
|
|
841
841
|
isTypedArray: ex,
|
|
842
842
|
isFileList: $g,
|
|
843
|
-
forEach:
|
|
843
|
+
forEach: Ho,
|
|
844
844
|
merge: ya,
|
|
845
845
|
extend: Gg,
|
|
846
846
|
trim: qg,
|
|
@@ -1177,7 +1177,7 @@ function _x(e, t, n) {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
return (n || JSON.stringify)(e);
|
|
1179
1179
|
}
|
|
1180
|
-
const
|
|
1180
|
+
const Uo = {
|
|
1181
1181
|
transitional: ad,
|
|
1182
1182
|
adapter: ["xhr", "http", "fetch"],
|
|
1183
1183
|
transformRequest: [function(t, n) {
|
|
@@ -1206,7 +1206,7 @@ const Wo = {
|
|
|
1206
1206
|
return s || o ? (n.setContentType("application/json", !1), _x(t)) : t;
|
|
1207
1207
|
}],
|
|
1208
1208
|
transformResponse: [function(t) {
|
|
1209
|
-
const n = this.transitional ||
|
|
1209
|
+
const n = this.transitional || Uo.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
1210
1210
|
if (O.isResponse(t) || O.isReadableStream(t))
|
|
1211
1211
|
return t;
|
|
1212
1212
|
if (t && O.isString(t) && (r && !this.responseType || o)) {
|
|
@@ -1244,7 +1244,7 @@ const Wo = {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
};
|
|
1246
1246
|
O.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1247
|
-
|
|
1247
|
+
Uo.headers[e] = {};
|
|
1248
1248
|
});
|
|
1249
1249
|
const jx = O.toObjectSet([
|
|
1250
1250
|
"age",
|
|
@@ -1272,7 +1272,7 @@ const jx = O.toObjectSet([
|
|
|
1272
1272
|
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && jx[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1273
1273
|
}), t;
|
|
1274
1274
|
}, lc = Symbol("internals");
|
|
1275
|
-
function
|
|
1275
|
+
function go(e) {
|
|
1276
1276
|
return e && String(e).trim().toLowerCase();
|
|
1277
1277
|
}
|
|
1278
1278
|
function xs(e) {
|
|
@@ -1317,7 +1317,7 @@ let hn = class {
|
|
|
1317
1317
|
set(t, n, r) {
|
|
1318
1318
|
const o = this;
|
|
1319
1319
|
function s(a, l, c) {
|
|
1320
|
-
const d =
|
|
1320
|
+
const d = go(l);
|
|
1321
1321
|
if (!d)
|
|
1322
1322
|
throw new Error("header name must be a non-empty string");
|
|
1323
1323
|
const f = O.findKey(o, d);
|
|
@@ -1341,7 +1341,7 @@ let hn = class {
|
|
|
1341
1341
|
return this;
|
|
1342
1342
|
}
|
|
1343
1343
|
get(t, n) {
|
|
1344
|
-
if (t =
|
|
1344
|
+
if (t = go(t), t) {
|
|
1345
1345
|
const r = O.findKey(this, t);
|
|
1346
1346
|
if (r) {
|
|
1347
1347
|
const o = this[r];
|
|
@@ -1358,7 +1358,7 @@ let hn = class {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
1360
|
has(t, n) {
|
|
1361
|
-
if (t =
|
|
1361
|
+
if (t = go(t), t) {
|
|
1362
1362
|
const r = O.findKey(this, t);
|
|
1363
1363
|
return !!(r && this[r] !== void 0 && (!n || zi(this, this[r], r, n)));
|
|
1364
1364
|
}
|
|
@@ -1368,7 +1368,7 @@ let hn = class {
|
|
|
1368
1368
|
const r = this;
|
|
1369
1369
|
let o = !1;
|
|
1370
1370
|
function s(i) {
|
|
1371
|
-
if (i =
|
|
1371
|
+
if (i = go(i), i) {
|
|
1372
1372
|
const a = O.findKey(r, i);
|
|
1373
1373
|
a && (!n || zi(r, r[a], a, n)) && (delete r[a], o = !0);
|
|
1374
1374
|
}
|
|
@@ -1430,7 +1430,7 @@ let hn = class {
|
|
|
1430
1430
|
accessors: {}
|
|
1431
1431
|
}).accessors, o = this.prototype;
|
|
1432
1432
|
function s(i) {
|
|
1433
|
-
const a =
|
|
1433
|
+
const a = go(i);
|
|
1434
1434
|
r[a] || (Lx(o, i), r[a] = !0);
|
|
1435
1435
|
}
|
|
1436
1436
|
return O.isArray(t) ? t.forEach(s) : s(t), this;
|
|
@@ -1448,7 +1448,7 @@ O.reduceDescriptors(hn.prototype, ({ value: e }, t) => {
|
|
|
1448
1448
|
});
|
|
1449
1449
|
O.freezeMethods(hn);
|
|
1450
1450
|
function Bi(e, t) {
|
|
1451
|
-
const n = this ||
|
|
1451
|
+
const n = this || Uo, r = t || n, o = hn.from(r.headers);
|
|
1452
1452
|
let s = r.data;
|
|
1453
1453
|
return O.forEach(e, function(a) {
|
|
1454
1454
|
s = a.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
@@ -1457,10 +1457,10 @@ function Bi(e, t) {
|
|
|
1457
1457
|
function cd(e) {
|
|
1458
1458
|
return !!(e && e.__CANCEL__);
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function no(e, t, n) {
|
|
1461
1461
|
$e.call(this, e ?? "canceled", $e.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1462
1462
|
}
|
|
1463
|
-
O.inherits(
|
|
1463
|
+
O.inherits(no, $e, {
|
|
1464
1464
|
__CANCEL__: !0
|
|
1465
1465
|
});
|
|
1466
1466
|
function ud(e, t, n) {
|
|
@@ -1706,7 +1706,7 @@ const fd = (e) => {
|
|
|
1706
1706
|
}, s === void 0 && i.setContentType(null), "setRequestHeader" in y && O.forEach(i.toJSON(), function(T, C) {
|
|
1707
1707
|
y.setRequestHeader(C, T);
|
|
1708
1708
|
}), O.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), a && a !== "json" && (y.responseType = o.responseType), c && ([h, g] = _s(c, !0), y.addEventListener("progress", h)), l && y.upload && ([f, p] = _s(l), y.upload.addEventListener("progress", f), y.upload.addEventListener("loadend", p)), (o.cancelToken || o.signal) && (d = (b) => {
|
|
1709
|
-
y && (r(!b || b.type ? new
|
|
1709
|
+
y && (r(!b || b.type ? new no(null, e, y) : b), y.abort(), y = null);
|
|
1710
1710
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
1711
1711
|
const w = Fx(o.url);
|
|
1712
1712
|
if (w && nn.protocols.indexOf(w) === -1) {
|
|
@@ -1723,7 +1723,7 @@ const fd = (e) => {
|
|
|
1723
1723
|
if (!o) {
|
|
1724
1724
|
o = !0, a();
|
|
1725
1725
|
const d = c instanceof Error ? c : this.reason;
|
|
1726
|
-
r.abort(d instanceof $e ? d : new
|
|
1726
|
+
r.abort(d instanceof $e ? d : new no(d instanceof Error ? d.message : d));
|
|
1727
1727
|
}
|
|
1728
1728
|
};
|
|
1729
1729
|
let i = t && setTimeout(() => {
|
|
@@ -2001,13 +2001,13 @@ const xc = (e) => `- ${e}`, ey = (e) => O.isFunction(e) || e === null || e === !
|
|
|
2001
2001
|
};
|
|
2002
2002
|
function Hi(e) {
|
|
2003
2003
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2004
|
-
throw new
|
|
2004
|
+
throw new no(null, e);
|
|
2005
2005
|
}
|
|
2006
2006
|
function yc(e) {
|
|
2007
2007
|
return Hi(e), e.headers = hn.from(e.headers), e.data = Bi.call(
|
|
2008
2008
|
e,
|
|
2009
2009
|
e.transformRequest
|
|
2010
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pd.getAdapter(e.adapter ||
|
|
2010
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pd.getAdapter(e.adapter || Uo.adapter, e)(e).then(function(r) {
|
|
2011
2011
|
return Hi(e), r.data = Bi.call(
|
|
2012
2012
|
e,
|
|
2013
2013
|
e.transformResponse,
|
|
@@ -2218,7 +2218,7 @@ let ny = class gd {
|
|
|
2218
2218
|
r.unsubscribe(s);
|
|
2219
2219
|
}, i;
|
|
2220
2220
|
}, t(function(s, i, a) {
|
|
2221
|
-
r.reason || (r.reason = new
|
|
2221
|
+
r.reason || (r.reason = new no(s, i, a), n(r.reason));
|
|
2222
2222
|
});
|
|
2223
2223
|
}
|
|
2224
2224
|
/**
|
|
@@ -2349,9 +2349,9 @@ function xd(e) {
|
|
|
2349
2349
|
return xd(Er(e, o));
|
|
2350
2350
|
}, n;
|
|
2351
2351
|
}
|
|
2352
|
-
const Lt = xd(
|
|
2352
|
+
const Lt = xd(Uo);
|
|
2353
2353
|
Lt.Axios = kr;
|
|
2354
|
-
Lt.CanceledError =
|
|
2354
|
+
Lt.CanceledError = no;
|
|
2355
2355
|
Lt.CancelToken = ny;
|
|
2356
2356
|
Lt.isCancel = cd;
|
|
2357
2357
|
Lt.VERSION = md;
|
|
@@ -2508,7 +2508,7 @@ class cy {
|
|
|
2508
2508
|
return Nn(n);
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
|
-
const Ir = new cy(), yd =
|
|
2511
|
+
const Ir = new cy(), yd = $o(null);
|
|
2512
2512
|
function uy({ children: e, apiConfig: t }) {
|
|
2513
2513
|
const n = Ir;
|
|
2514
2514
|
if (t) {
|
|
@@ -2572,7 +2572,7 @@ function nl(e) {
|
|
|
2572
2572
|
const t = e;
|
|
2573
2573
|
return "values" in t && "config" in t && typeof t.values == "object" && t.values !== null && typeof t.config == "object" && t.config !== null;
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2575
|
+
function xo(e, t) {
|
|
2576
2576
|
return `${e ?? ""}::${t ?? ""}`;
|
|
2577
2577
|
}
|
|
2578
2578
|
function Ps(e) {
|
|
@@ -2628,7 +2628,7 @@ function my(e) {
|
|
|
2628
2628
|
if (!nl(o)) return;
|
|
2629
2629
|
const i = wd(o, s);
|
|
2630
2630
|
if (!(i != null && i.checkpointId)) return;
|
|
2631
|
-
const a =
|
|
2631
|
+
const a = xo(i.checkpointId, i.checkpointNs ?? null), l = t.get(a);
|
|
2632
2632
|
if (!l) {
|
|
2633
2633
|
t.set(a, i);
|
|
2634
2634
|
return;
|
|
@@ -2689,7 +2689,7 @@ function wy(e, t) {
|
|
|
2689
2689
|
const o = r.id || `task-${t}-${n}`;
|
|
2690
2690
|
if (Array.isArray(r.interrupts) && r.interrupts.length)
|
|
2691
2691
|
for (let s = r.interrupts.length - 1; s >= 0; s--) {
|
|
2692
|
-
const i =
|
|
2692
|
+
const i = wo(
|
|
2693
2693
|
r.interrupts[s],
|
|
2694
2694
|
`${o}-interrupt-${s}`
|
|
2695
2695
|
);
|
|
@@ -2697,7 +2697,7 @@ function wy(e, t) {
|
|
|
2697
2697
|
return i;
|
|
2698
2698
|
}
|
|
2699
2699
|
if (r.state !== void 0 && r.state !== null) {
|
|
2700
|
-
const s =
|
|
2700
|
+
const s = wo(r.state, `${o}-state`);
|
|
2701
2701
|
if (s)
|
|
2702
2702
|
return s;
|
|
2703
2703
|
}
|
|
@@ -2715,7 +2715,7 @@ function by(e, t) {
|
|
|
2715
2715
|
const r = $t(n, ["id", "task_id", "taskId"]) ?? t, o = $t(n, ["name"]) ?? "task", s = Array.isArray(n.interrupts) ? n.interrupts : void 0, i = Object.prototype.hasOwnProperty.call(n, "state") ? n.state : void 0;
|
|
2716
2716
|
return { id: r, name: o, interrupts: s, state: i };
|
|
2717
2717
|
}
|
|
2718
|
-
function
|
|
2718
|
+
function wo(e, t, n = 0, r = /* @__PURE__ */ new Set()) {
|
|
2719
2719
|
if (n > 6 || e == null)
|
|
2720
2720
|
return null;
|
|
2721
2721
|
if (typeof e == "object") {
|
|
@@ -2728,7 +2728,7 @@ function bo(e, t, n = 0, r = /* @__PURE__ */ new Set()) {
|
|
|
2728
2728
|
return o;
|
|
2729
2729
|
if (Array.isArray(e)) {
|
|
2730
2730
|
for (let s = e.length - 1; s >= 0; s--) {
|
|
2731
|
-
const i =
|
|
2731
|
+
const i = wo(e[s], t, n + 1, r);
|
|
2732
2732
|
if (i)
|
|
2733
2733
|
return i;
|
|
2734
2734
|
}
|
|
@@ -2747,14 +2747,14 @@ function bo(e, t, n = 0, r = /* @__PURE__ */ new Set()) {
|
|
|
2747
2747
|
];
|
|
2748
2748
|
for (const a of i)
|
|
2749
2749
|
if (a in s) {
|
|
2750
|
-
const l =
|
|
2750
|
+
const l = wo(s[a], t, n + 1, r);
|
|
2751
2751
|
if (l)
|
|
2752
2752
|
return l;
|
|
2753
2753
|
}
|
|
2754
2754
|
for (const [a, l] of Object.entries(s)) {
|
|
2755
2755
|
if (i.includes(a) || a === "messages" || a === "results")
|
|
2756
2756
|
continue;
|
|
2757
|
-
const c =
|
|
2757
|
+
const c = wo(l, t, n + 1, r);
|
|
2758
2758
|
if (c)
|
|
2759
2759
|
return c;
|
|
2760
2760
|
}
|
|
@@ -3422,7 +3422,7 @@ function Dy(e = {}) {
|
|
|
3422
3422
|
}
|
|
3423
3423
|
w(!0);
|
|
3424
3424
|
const Xe = Je.body.getReader(), dt = new TextDecoder();
|
|
3425
|
-
let
|
|
3425
|
+
let xt = "", Rt = [];
|
|
3426
3426
|
C.current = 0, y(0);
|
|
3427
3427
|
let Bt = 0, jt = null;
|
|
3428
3428
|
const Ye = () => {
|
|
@@ -3450,13 +3450,13 @@ function Dy(e = {}) {
|
|
|
3450
3450
|
}), (ne = j == null ? void 0 : j.onOpen) == null || ne.call(j, { threadId: Pt, created: Tt }); ; ) {
|
|
3451
3451
|
const { value: q, done: Te } = await Xe.read();
|
|
3452
3452
|
if (Te) break;
|
|
3453
|
-
|
|
3453
|
+
xt += dt.decode(q, { stream: !0 }), xt.length > Gt && (xt = "", console.warn("Stream buffer reset: exceeded 1MB"));
|
|
3454
3454
|
let ye;
|
|
3455
|
-
for (; (ye =
|
|
3455
|
+
for (; (ye = xt.indexOf(`
|
|
3456
3456
|
|
|
3457
3457
|
`)) >= 0; ) {
|
|
3458
|
-
const ot =
|
|
3459
|
-
|
|
3458
|
+
const ot = xt.slice(0, ye);
|
|
3459
|
+
xt = xt.slice(ye + 2);
|
|
3460
3460
|
const ht = Fy(ot);
|
|
3461
3461
|
if (!ht) continue;
|
|
3462
3462
|
let tt;
|
|
@@ -4023,7 +4023,7 @@ function Zy(e) {
|
|
|
4023
4023
|
} catch {
|
|
4024
4024
|
}
|
|
4025
4025
|
}
|
|
4026
|
-
const kd =
|
|
4026
|
+
const kd = $o(null), Rd = $o(null), Ed = $o(null), Qy = $o(!1), Oc = 50, ev = 750, tv = 5, nv = 1e3, rv = 15e3;
|
|
4027
4027
|
function Mc(e, t, n) {
|
|
4028
4028
|
return `${e}__${t ?? ""}__${n ?? ""}`;
|
|
4029
4029
|
}
|
|
@@ -4109,7 +4109,7 @@ function av({
|
|
|
4109
4109
|
bt(() => {
|
|
4110
4110
|
ke.current = k;
|
|
4111
4111
|
}, [k]);
|
|
4112
|
-
const rt = Re(!1), ut = Re([]), Je = Re(null), Xe = Re(null), dt = Re(/* @__PURE__ */ new Map()),
|
|
4112
|
+
const rt = Re(!1), ut = Re([]), Je = Re(null), Xe = Re(null), dt = Re(/* @__PURE__ */ new Map()), xt = Re(k), Rt = Re(!1), Bt = Re(null), jt = Re(/* @__PURE__ */ new Map()), Ye = Re(/* @__PURE__ */ new Map()), Mt = Re(/* @__PURE__ */ new Map()), qt = Re(/* @__PURE__ */ new Map()), Wt = pe(
|
|
4113
4113
|
(E) => {
|
|
4114
4114
|
if (!E) {
|
|
4115
4115
|
ee([]);
|
|
@@ -4171,7 +4171,7 @@ function av({
|
|
|
4171
4171
|
if (I && typeof I == "object")
|
|
4172
4172
|
for (const [re, We] of Object.entries(I)) {
|
|
4173
4173
|
if (!(We != null && We.checkpointId)) continue;
|
|
4174
|
-
const Ve = re ||
|
|
4174
|
+
const Ve = re || xo(We.checkpointId, We.checkpointNs ?? null);
|
|
4175
4175
|
le.set(Ve, bn(We, { cloneMessages: !0 }));
|
|
4176
4176
|
}
|
|
4177
4177
|
Ye.current.set(E, le);
|
|
@@ -4297,7 +4297,7 @@ function av({
|
|
|
4297
4297
|
threadId: le,
|
|
4298
4298
|
snapshot: bn(E, { cloneMessages: !0 })
|
|
4299
4299
|
};
|
|
4300
|
-
dt.current.set(le, Kt),
|
|
4300
|
+
dt.current.set(le, Kt), xt.current = le;
|
|
4301
4301
|
}
|
|
4302
4302
|
if (!We)
|
|
4303
4303
|
return;
|
|
@@ -4311,7 +4311,7 @@ function av({
|
|
|
4311
4311
|
const He = dt.current.get(le), kt = (He == null ? void 0 : He.snapshot) ?? null, At = Array.isArray(kt == null ? void 0 : kt.messages) ? kt.messages : [], en = bn(kt), Fn = Array.isArray(E == null ? void 0 : E.messages) ? E.messages : [], Vt = /* @__PURE__ */ new Set(), Ft = [...Fn, ...At].filter((Kt) => {
|
|
4312
4312
|
const Fi = Kt == null ? void 0 : Kt.id;
|
|
4313
4313
|
return Fi ? Vt.has(Fi) ? !1 : (Vt.add(Fi), !0) : !0;
|
|
4314
|
-
}),
|
|
4314
|
+
}), fo = Dc(en, re), ho = {
|
|
4315
4315
|
checkpointId: en.checkpointId ?? re.checkpointId ?? null,
|
|
4316
4316
|
checkpointNs: en.checkpointNs ?? re.checkpointNs ?? null,
|
|
4317
4317
|
createdAt: re.createdAt ?? en.createdAt ?? null,
|
|
@@ -4324,21 +4324,21 @@ function av({
|
|
|
4324
4324
|
nextCursor: re.nextCursor ?? en.nextCursor ?? null,
|
|
4325
4325
|
nextCursorNs: re.nextCursorNs ?? en.nextCursorNs ?? null,
|
|
4326
4326
|
interrupt: en.interrupt ?? re.interrupt ?? null,
|
|
4327
|
-
...
|
|
4327
|
+
...fo
|
|
4328
4328
|
};
|
|
4329
4329
|
if (dt.current.set(le, {
|
|
4330
4330
|
threadId: le,
|
|
4331
|
-
snapshot: bn(
|
|
4331
|
+
snapshot: bn(ho, { cloneMessages: !0 })
|
|
4332
4332
|
}), !We)
|
|
4333
4333
|
return;
|
|
4334
4334
|
Fn.length && Ge(Fn);
|
|
4335
|
-
const
|
|
4335
|
+
const Br = E && Object.prototype.hasOwnProperty.call(E, "checkpointId") ? E.checkpointId : void 0, sr = E && Object.prototype.hasOwnProperty.call(E, "checkpointNs") ? E.checkpointNs : void 0, br = E && Object.prototype.hasOwnProperty.call(E, "nextCursor") ? E.nextCursor : void 0, ir = E && Object.prototype.hasOwnProperty.call(E, "nextCursorNs") ? E.nextCursorNs : void 0;
|
|
4336
4336
|
ne(
|
|
4337
4337
|
(Kt) => br !== void 0 ? br ?? Kt ?? null : Kt ?? null
|
|
4338
4338
|
), Ne(
|
|
4339
4339
|
(Kt) => br !== void 0 ? !!br : Kt
|
|
4340
4340
|
), X(
|
|
4341
|
-
(Kt) =>
|
|
4341
|
+
(Kt) => Br !== void 0 ? Br ?? Kt ?? void 0 : Kt ?? void 0
|
|
4342
4342
|
), ue(
|
|
4343
4343
|
(Kt) => sr !== void 0 ? sr ?? Kt ?? void 0 : Kt ?? void 0
|
|
4344
4344
|
), he(
|
|
@@ -4355,7 +4355,7 @@ function av({
|
|
|
4355
4355
|
checkpointId: I.checkpointId ?? null,
|
|
4356
4356
|
checkpointNs: I.checkpointNs ?? null,
|
|
4357
4357
|
pendingInterrupt: I.interrupt ?? null
|
|
4358
|
-
}), F(I.interrupt ?? null), ne(I.nextCursor ?? null), Ne(!!I.nextCursor), X(I.checkpointId ?? void 0), ue(I.checkpointNs ?? void 0), he(I.nextCursorNs ?? void 0),
|
|
4358
|
+
}), F(I.interrupt ?? null), ne(I.nextCursor ?? null), Ne(!!I.nextCursor), X(I.checkpointId ?? void 0), ue(I.checkpointNs ?? void 0), he(I.nextCursorNs ?? void 0), xt.current = E.threadId, Wt(E.threadId ?? ke.current ?? null);
|
|
4359
4359
|
},
|
|
4360
4360
|
[De, F, Wt]
|
|
4361
4361
|
), ae = pe((E) => {
|
|
@@ -4366,7 +4366,7 @@ function av({
|
|
|
4366
4366
|
H.startsWith(I) && Mt.current.delete(H);
|
|
4367
4367
|
for (const H of qt.current.keys())
|
|
4368
4368
|
H.startsWith(I) && qt.current.delete(H);
|
|
4369
|
-
|
|
4369
|
+
xt.current === E && (xt.current = null);
|
|
4370
4370
|
}, [y]), be = pe(() => {
|
|
4371
4371
|
const E = ke.current;
|
|
4372
4372
|
E && ae(E), ct([]), Ne(!1), de(!1), ne(null), X(void 0), ue(void 0), he(void 0);
|
|
@@ -4512,10 +4512,10 @@ function av({
|
|
|
4512
4512
|
console.warn("[ChatSessionProvider] Stream connection error:", E), Y("connection-error");
|
|
4513
4513
|
},
|
|
4514
4514
|
[Y]
|
|
4515
|
-
),
|
|
4515
|
+
), yt = pe((E) => {
|
|
4516
4516
|
Ln.current = Date.now(), Fe((I) => I === "reconnecting" ? "connected" : I);
|
|
4517
4517
|
}, [Fe]);
|
|
4518
|
-
rr.current = fe, or.current = ce, vr.current =
|
|
4518
|
+
rr.current = fe, or.current = ce, vr.current = yt, bt(() => () => {
|
|
4519
4519
|
Xt();
|
|
4520
4520
|
}, [Xt]);
|
|
4521
4521
|
const Nt = pe(() => {
|
|
@@ -4617,7 +4617,7 @@ function av({
|
|
|
4617
4617
|
delete K[E];
|
|
4618
4618
|
const le = H.order.filter((We) => We !== E), re = { byId: K, order: le };
|
|
4619
4619
|
return I = Yi(re), re;
|
|
4620
|
-
}), I && Xn(I, { immediate: !0 }), ae(E), ke.current === E && (Xe.current = E, _(null), ke.current = null,
|
|
4620
|
+
}), I && Xn(I, { immediate: !0 }), ae(E), ke.current === E && (Xe.current = E, _(null), ke.current = null, xt.current = null, be()), await ye(), P(null);
|
|
4621
4621
|
} catch (I) {
|
|
4622
4622
|
throw P(String(I)), I;
|
|
4623
4623
|
}
|
|
@@ -4669,8 +4669,8 @@ function av({
|
|
|
4669
4669
|
const Ft = await Pt(
|
|
4670
4670
|
{ threadId: E, checkpointId: I, checkpointNs: H },
|
|
4671
4671
|
{ force: K }
|
|
4672
|
-
), { latest:
|
|
4673
|
-
R(
|
|
4672
|
+
), { latest: fo, checkpoints: ho, snapshots: Br } = Ps(Ft);
|
|
4673
|
+
R(fo, "replace", E), st(E, ho, "replace"), Oe(E, Br, "replace"), j(null);
|
|
4674
4674
|
} catch (Ft) {
|
|
4675
4675
|
throw (!At || K || Vt) && (i == null || i(String(Ft))), j(String(Ft)), Ft;
|
|
4676
4676
|
} finally {
|
|
@@ -4691,22 +4691,22 @@ function av({
|
|
|
4691
4691
|
st,
|
|
4692
4692
|
Oe
|
|
4693
4693
|
]
|
|
4694
|
-
),
|
|
4694
|
+
), lo = pe(async () => {
|
|
4695
4695
|
await Tt(async () => {
|
|
4696
4696
|
const E = ke.current;
|
|
4697
|
-
E && ae(E), Xe.current = null, _(null), ke.current = null,
|
|
4697
|
+
E && ae(E), Xe.current = null, _(null), ke.current = null, xt.current = null, be(), X(void 0), ue(void 0), he(void 0), ee([]);
|
|
4698
4698
|
try {
|
|
4699
4699
|
localStorage.removeItem("lastThreadId");
|
|
4700
4700
|
} catch (I) {
|
|
4701
4701
|
console.warn("[ChatSessionProvider] Failed to clear lastThreadId:", I);
|
|
4702
4702
|
}
|
|
4703
4703
|
}, "clearCurrentThread");
|
|
4704
|
-
}, [be, ae, Tt]),
|
|
4704
|
+
}, [be, ae, Tt]), co = pe(
|
|
4705
4705
|
async (E, I) => {
|
|
4706
4706
|
var re;
|
|
4707
4707
|
const H = ke.current;
|
|
4708
4708
|
if (!H) throw new Error("No active thread");
|
|
4709
|
-
const K =
|
|
4709
|
+
const K = xo(E, I ?? null), le = (re = Ye.current.get(H)) == null ? void 0 : re.get(K);
|
|
4710
4710
|
if (le) {
|
|
4711
4711
|
await Tt(async () => {
|
|
4712
4712
|
R(le, "replace", H, { persist: !1 });
|
|
@@ -4716,7 +4716,7 @@ function av({
|
|
|
4716
4716
|
await sn(H, E, I ?? void 0, !0);
|
|
4717
4717
|
},
|
|
4718
4718
|
[R, Tt, sn]
|
|
4719
|
-
),
|
|
4719
|
+
), Jo = pe(async () => {
|
|
4720
4720
|
if (!ke.current) throw new Error("No active thread");
|
|
4721
4721
|
await sn(ke.current, void 0, void 0, !0);
|
|
4722
4722
|
}, [sn]), wr = pe(
|
|
@@ -4736,7 +4736,7 @@ function av({
|
|
|
4736
4736
|
if (Ve && We && We.size > 0 && (Ve = le.some((He) => {
|
|
4737
4737
|
if (!(He != null && He.checkpointId))
|
|
4738
4738
|
return !1;
|
|
4739
|
-
const kt =
|
|
4739
|
+
const kt = xo(He.checkpointId, He.checkpointNs ?? null);
|
|
4740
4740
|
return !We.has(kt);
|
|
4741
4741
|
})), !Ve) {
|
|
4742
4742
|
ne(null), he(void 0), Ne(!1), j(null);
|
|
@@ -4766,7 +4766,7 @@ function av({
|
|
|
4766
4766
|
(E) => {
|
|
4767
4767
|
if (E != null && E.threadId) {
|
|
4768
4768
|
if (E.checkpointId) {
|
|
4769
|
-
const I =
|
|
4769
|
+
const I = xo(E.checkpointId, E.checkpointNs ?? null), H = bn(
|
|
4770
4770
|
{
|
|
4771
4771
|
...E,
|
|
4772
4772
|
interrupt: E.interrupt ?? null
|
|
@@ -4779,7 +4779,7 @@ function av({
|
|
|
4779
4779
|
}
|
|
4780
4780
|
},
|
|
4781
4781
|
[R, Oe]
|
|
4782
|
-
),
|
|
4782
|
+
), uo = pe(
|
|
4783
4783
|
async (E, I) => {
|
|
4784
4784
|
var br;
|
|
4785
4785
|
const H = ke.current, K = (E == null ? void 0 : E.text) ?? "", le = (E == null ? void 0 : E.attachments) ?? [], re = le.length ? le : (I == null ? void 0 : I.attachments) ?? [], We = E == null ? void 0 : E.messageAdditionalKwargs, Ve = {
|
|
@@ -4808,14 +4808,14 @@ function av({
|
|
|
4808
4808
|
...Ft.additionalKwargs ?? {},
|
|
4809
4809
|
...We
|
|
4810
4810
|
}), At.length > 0 && et(Ft);
|
|
4811
|
-
const
|
|
4812
|
-
messages: At.length > 0 ? [
|
|
4811
|
+
const fo = { ...Ft, content: At }, ho = re.length > 0, Br = {
|
|
4812
|
+
messages: At.length > 0 ? [fo] : [],
|
|
4813
4813
|
files_info: kt,
|
|
4814
|
-
...o &&
|
|
4814
|
+
...o && ho && s ? { active_agent: s } : {},
|
|
4815
4815
|
...Ve
|
|
4816
4816
|
}, sr = {
|
|
4817
4817
|
threadId: H ?? null,
|
|
4818
|
-
payload:
|
|
4818
|
+
payload: Br,
|
|
4819
4819
|
checkpointId: Fn ?? null,
|
|
4820
4820
|
checkpointNs: Vt ?? null,
|
|
4821
4821
|
nodeFilter: (I == null ? void 0 : I.nodeFilter) ?? null,
|
|
@@ -4857,7 +4857,7 @@ function av({
|
|
|
4857
4857
|
} catch (re) {
|
|
4858
4858
|
console.warn("[ChatSessionProvider] optimistic interrupt_response dispatch failed:", re);
|
|
4859
4859
|
}
|
|
4860
|
-
await
|
|
4860
|
+
await uo(
|
|
4861
4861
|
{ payload: {} },
|
|
4862
4862
|
{
|
|
4863
4863
|
checkpointId: oe.lastCheckpointId ?? void 0,
|
|
@@ -4869,7 +4869,7 @@ function av({
|
|
|
4869
4869
|
throw console.error(`[ChatSessionProvider] Failed to handle interrupt ${E}:`, re), re;
|
|
4870
4870
|
}
|
|
4871
4871
|
},
|
|
4872
|
-
[Pe, oe.lastCheckpointId, oe.lastCheckpointNs,
|
|
4872
|
+
[Pe, oe.lastCheckpointId, oe.lastCheckpointNs, uo]
|
|
4873
4873
|
);
|
|
4874
4874
|
bt(() => {
|
|
4875
4875
|
if (l == null || l(k), k)
|
|
@@ -4896,7 +4896,7 @@ function av({
|
|
|
4896
4896
|
})(), () => {
|
|
4897
4897
|
}), []), bt(() => {
|
|
4898
4898
|
const E = ke.current;
|
|
4899
|
-
if (!E ||
|
|
4899
|
+
if (!E || xt.current !== E) return;
|
|
4900
4900
|
oe.messages.length && oe.messages[oe.messages.length - 1];
|
|
4901
4901
|
const I = bn({
|
|
4902
4902
|
checkpointId: oe.lastCheckpointId ?? null,
|
|
@@ -4987,14 +4987,14 @@ function av({
|
|
|
4987
4987
|
loadOlder: wr,
|
|
4988
4988
|
seedFromSnapshot: Zo,
|
|
4989
4989
|
clearState: be,
|
|
4990
|
-
navigateToCheckpoint:
|
|
4991
|
-
returnToLatest:
|
|
4990
|
+
navigateToCheckpoint: co,
|
|
4991
|
+
returnToLatest: Jo,
|
|
4992
4992
|
loadThread: sn,
|
|
4993
|
-
clearThread:
|
|
4993
|
+
clearThread: lo,
|
|
4994
4994
|
respondToInterrupt: Jl
|
|
4995
4995
|
};
|
|
4996
4996
|
}, [
|
|
4997
|
-
|
|
4997
|
+
lo,
|
|
4998
4998
|
be,
|
|
4999
4999
|
k,
|
|
5000
5000
|
W,
|
|
@@ -5008,9 +5008,9 @@ function av({
|
|
|
5008
5008
|
oe.lastCheckpointId,
|
|
5009
5009
|
oe.lastCheckpointNs,
|
|
5010
5010
|
oe.messages,
|
|
5011
|
-
|
|
5011
|
+
co,
|
|
5012
5012
|
Jl,
|
|
5013
|
-
|
|
5013
|
+
Jo,
|
|
5014
5014
|
Zo,
|
|
5015
5015
|
B,
|
|
5016
5016
|
L
|
|
@@ -5019,12 +5019,12 @@ function av({
|
|
|
5019
5019
|
isStreaming: Ot,
|
|
5020
5020
|
error: vt,
|
|
5021
5021
|
connectionState: Qt,
|
|
5022
|
-
submit:
|
|
5023
|
-
send:
|
|
5022
|
+
submit: uo,
|
|
5023
|
+
send: uo,
|
|
5024
5024
|
stop: Nt,
|
|
5025
5025
|
setAuthToken: wt
|
|
5026
5026
|
}),
|
|
5027
|
-
[Qt, Ot, vt, Nt,
|
|
5027
|
+
[Qt, Ot, vt, Nt, uo, wt]
|
|
5028
5028
|
);
|
|
5029
5029
|
return /* @__PURE__ */ u.jsx(Qy.Provider, { value: !0, children: /* @__PURE__ */ u.jsx(Ed.Provider, { value: Qm, children: /* @__PURE__ */ u.jsx(kd.Provider, { value: Jm, children: /* @__PURE__ */ u.jsx(Rd.Provider, { value: Zm, children: e }) }) }) });
|
|
5030
5030
|
}
|
|
@@ -5100,7 +5100,7 @@ const cv = ti(
|
|
|
5100
5100
|
size: "default"
|
|
5101
5101
|
}
|
|
5102
5102
|
}
|
|
5103
|
-
),
|
|
5103
|
+
), mt = v.forwardRef(
|
|
5104
5104
|
({ className: e, variant: t, size: n, asChild: r = !1, ...o }, s) => {
|
|
5105
5105
|
const i = r ? Rg : "button";
|
|
5106
5106
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -5113,7 +5113,7 @@ const cv = ti(
|
|
|
5113
5113
|
);
|
|
5114
5114
|
}
|
|
5115
5115
|
);
|
|
5116
|
-
|
|
5116
|
+
mt.displayName = "Button";
|
|
5117
5117
|
const Id = v.forwardRef(
|
|
5118
5118
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
5119
5119
|
"textarea",
|
|
@@ -5214,7 +5214,7 @@ function uv({
|
|
|
5214
5214
|
}
|
|
5215
5215
|
) }),
|
|
5216
5216
|
/* @__PURE__ */ u.jsx("div", { children: r ? /* @__PURE__ */ u.jsx(
|
|
5217
|
-
|
|
5217
|
+
mt,
|
|
5218
5218
|
{
|
|
5219
5219
|
type: "button",
|
|
5220
5220
|
onClick: () => {
|
|
@@ -5228,7 +5228,7 @@ function uv({
|
|
|
5228
5228
|
children: /* @__PURE__ */ u.jsx(og, { size: 16 })
|
|
5229
5229
|
}
|
|
5230
5230
|
) : /* @__PURE__ */ u.jsx(
|
|
5231
|
-
|
|
5231
|
+
mt,
|
|
5232
5232
|
{
|
|
5233
5233
|
type: "submit",
|
|
5234
5234
|
size: "icon",
|
|
@@ -5240,7 +5240,7 @@ function uv({
|
|
|
5240
5240
|
) })
|
|
5241
5241
|
] }) });
|
|
5242
5242
|
}
|
|
5243
|
-
const dv = V.memo(uv), li = 0, pr = 1,
|
|
5243
|
+
const dv = V.memo(uv), li = 0, pr = 1, ro = 2, Nd = 4;
|
|
5244
5244
|
function Lc(e) {
|
|
5245
5245
|
return () => e;
|
|
5246
5246
|
}
|
|
@@ -5264,7 +5264,7 @@ function pv(...e) {
|
|
|
5264
5264
|
e.map(fv);
|
|
5265
5265
|
};
|
|
5266
5266
|
}
|
|
5267
|
-
function
|
|
5267
|
+
function oo() {
|
|
5268
5268
|
}
|
|
5269
5269
|
function ci(e, t) {
|
|
5270
5270
|
return t(e), e;
|
|
@@ -5275,20 +5275,20 @@ function mv(e, t) {
|
|
|
5275
5275
|
function It(...e) {
|
|
5276
5276
|
return e;
|
|
5277
5277
|
}
|
|
5278
|
-
function
|
|
5278
|
+
function gt(e, t) {
|
|
5279
5279
|
return e(pr, t);
|
|
5280
5280
|
}
|
|
5281
5281
|
function Be(e, t) {
|
|
5282
5282
|
e(li, t);
|
|
5283
5283
|
}
|
|
5284
5284
|
function cl(e) {
|
|
5285
|
-
e(
|
|
5285
|
+
e(ro);
|
|
5286
5286
|
}
|
|
5287
5287
|
function Dt(e) {
|
|
5288
5288
|
return e(Nd);
|
|
5289
5289
|
}
|
|
5290
5290
|
function Se(e, t) {
|
|
5291
|
-
return
|
|
5291
|
+
return gt(e, hv(t, li));
|
|
5292
5292
|
}
|
|
5293
5293
|
function _n(e, t) {
|
|
5294
5294
|
const n = e(pr, (r) => {
|
|
@@ -5330,11 +5330,11 @@ function J(e, ...t) {
|
|
|
5330
5330
|
const n = gv(...t);
|
|
5331
5331
|
return (r, o) => {
|
|
5332
5332
|
switch (r) {
|
|
5333
|
-
case
|
|
5333
|
+
case ro:
|
|
5334
5334
|
cl(e);
|
|
5335
5335
|
return;
|
|
5336
5336
|
case pr:
|
|
5337
|
-
return
|
|
5337
|
+
return gt(e, n(o));
|
|
5338
5338
|
}
|
|
5339
5339
|
};
|
|
5340
5340
|
}
|
|
@@ -5362,7 +5362,7 @@ function Ke(...e) {
|
|
|
5362
5362
|
const o = Math.pow(2, e.length) - 1;
|
|
5363
5363
|
return e.forEach((s, i) => {
|
|
5364
5364
|
const a = Math.pow(2, i);
|
|
5365
|
-
|
|
5365
|
+
gt(s, (l) => {
|
|
5366
5366
|
const c = n;
|
|
5367
5367
|
n = n | a, t[i] = l, c !== o && n === o && r && (r(), r = null);
|
|
5368
5368
|
});
|
|
@@ -5382,8 +5382,8 @@ function xv(e) {
|
|
|
5382
5382
|
return function(o, s) {
|
|
5383
5383
|
switch (o) {
|
|
5384
5384
|
case pr:
|
|
5385
|
-
return s ? n === s ? void 0 : (r(), n = s, t =
|
|
5386
|
-
case
|
|
5385
|
+
return s ? n === s ? void 0 : (r(), n = s, t = gt(e, s), t) : (r(), oo);
|
|
5386
|
+
case ro:
|
|
5387
5387
|
r(), n = null;
|
|
5388
5388
|
return;
|
|
5389
5389
|
}
|
|
@@ -5419,7 +5419,7 @@ function Ze() {
|
|
|
5419
5419
|
r(n);
|
|
5420
5420
|
});
|
|
5421
5421
|
return;
|
|
5422
|
-
case
|
|
5422
|
+
case ro:
|
|
5423
5423
|
e.splice(0, e.length);
|
|
5424
5424
|
return;
|
|
5425
5425
|
case pr:
|
|
@@ -5457,17 +5457,17 @@ function zt(...e) {
|
|
|
5457
5457
|
const o = Math.pow(2, e.length) - 1;
|
|
5458
5458
|
return e.forEach((s, i) => {
|
|
5459
5459
|
const a = Math.pow(2, i);
|
|
5460
|
-
|
|
5460
|
+
gt(s, (l) => {
|
|
5461
5461
|
n[i] = l, r = r | a, r === o && Be(t, n);
|
|
5462
5462
|
});
|
|
5463
5463
|
}), function(s, i) {
|
|
5464
5464
|
switch (s) {
|
|
5465
|
-
case
|
|
5465
|
+
case ro: {
|
|
5466
5466
|
cl(t);
|
|
5467
5467
|
return;
|
|
5468
5468
|
}
|
|
5469
5469
|
case pr:
|
|
5470
|
-
return r === o && i(n),
|
|
5470
|
+
return r === o && i(n), gt(t, i);
|
|
5471
5471
|
}
|
|
5472
5472
|
};
|
|
5473
5473
|
}
|
|
@@ -5477,10 +5477,10 @@ function Ae(e, t = _d) {
|
|
|
5477
5477
|
function Ia(...e) {
|
|
5478
5478
|
return function(t, n) {
|
|
5479
5479
|
switch (t) {
|
|
5480
|
-
case
|
|
5480
|
+
case ro:
|
|
5481
5481
|
return;
|
|
5482
5482
|
case pr:
|
|
5483
|
-
return pv(...e.map((r) =>
|
|
5483
|
+
return pv(...e.map((r) => gt(r, n)));
|
|
5484
5484
|
}
|
|
5485
5485
|
};
|
|
5486
5486
|
}
|
|
@@ -5657,7 +5657,7 @@ const an = lt(
|
|
|
5657
5657
|
},
|
|
5658
5658
|
[],
|
|
5659
5659
|
{ singleton: !0 }
|
|
5660
|
-
),
|
|
5660
|
+
), Io = { lvl: 0 };
|
|
5661
5661
|
function Pd(e, t) {
|
|
5662
5662
|
const n = e.length;
|
|
5663
5663
|
if (n === 0)
|
|
@@ -5671,11 +5671,11 @@ function Pd(e, t) {
|
|
|
5671
5671
|
return s.push({ end: 1 / 0, start: r, value: o }), s;
|
|
5672
5672
|
}
|
|
5673
5673
|
function St(e) {
|
|
5674
|
-
return e ===
|
|
5674
|
+
return e === Io;
|
|
5675
5675
|
}
|
|
5676
|
-
function
|
|
5676
|
+
function No(e, t) {
|
|
5677
5677
|
if (!St(e))
|
|
5678
|
-
return t === e.k ? e.v : t < e.k ?
|
|
5678
|
+
return t === e.k ? e.v : t < e.k ? No(e.l, t) : No(e.r, t);
|
|
5679
5679
|
}
|
|
5680
5680
|
function jn(e, t, n = "k") {
|
|
5681
5681
|
if (St(e))
|
|
@@ -5691,8 +5691,8 @@ function jn(e, t, n = "k") {
|
|
|
5691
5691
|
function gn(e, t, n) {
|
|
5692
5692
|
return St(e) ? Dd(t, n, 1) : t === e.k ? Ut(e, { k: t, v: n }) : t < e.k ? Bc(Ut(e, { l: gn(e.l, t, n) })) : Bc(Ut(e, { r: gn(e.r, t, n) }));
|
|
5693
5693
|
}
|
|
5694
|
-
function
|
|
5695
|
-
return
|
|
5694
|
+
function Kr() {
|
|
5695
|
+
return Io;
|
|
5696
5696
|
}
|
|
5697
5697
|
function ui(e, t, n) {
|
|
5698
5698
|
if (St(e))
|
|
@@ -5701,7 +5701,7 @@ function ui(e, t, n) {
|
|
|
5701
5701
|
return Tv(Aa(e, r, n));
|
|
5702
5702
|
}
|
|
5703
5703
|
function Na(e, t) {
|
|
5704
|
-
if (St(e)) return
|
|
5704
|
+
if (St(e)) return Io;
|
|
5705
5705
|
const { k: n, l: r, r: o } = e;
|
|
5706
5706
|
if (t === n) {
|
|
5707
5707
|
if (St(r))
|
|
@@ -5776,7 +5776,7 @@ function Ji(e) {
|
|
|
5776
5776
|
function Md(e) {
|
|
5777
5777
|
return St(e.r) ? [e.k, e.v] : Md(e.r);
|
|
5778
5778
|
}
|
|
5779
|
-
function Dd(e, t, n, r =
|
|
5779
|
+
function Dd(e, t, n, r = Io, o = Io) {
|
|
5780
5780
|
return { k: e, l: r, lvl: n, r: o, v: t };
|
|
5781
5781
|
}
|
|
5782
5782
|
function Bc(e) {
|
|
@@ -5796,7 +5796,7 @@ function Tv(e) {
|
|
|
5796
5796
|
function Fd(e, t) {
|
|
5797
5797
|
return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex);
|
|
5798
5798
|
}
|
|
5799
|
-
function
|
|
5799
|
+
function Ao(e, t) {
|
|
5800
5800
|
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
5801
5801
|
}
|
|
5802
5802
|
const dl = lt(
|
|
@@ -5841,12 +5841,12 @@ function fl({ index: e }, t) {
|
|
|
5841
5841
|
function Rv() {
|
|
5842
5842
|
return {
|
|
5843
5843
|
groupIndices: [],
|
|
5844
|
-
groupOffsetTree:
|
|
5844
|
+
groupOffsetTree: Kr(),
|
|
5845
5845
|
lastIndex: 0,
|
|
5846
5846
|
lastOffset: 0,
|
|
5847
5847
|
lastSize: 0,
|
|
5848
5848
|
offsetTree: [],
|
|
5849
|
-
sizeTree:
|
|
5849
|
+
sizeTree: Kr()
|
|
5850
5850
|
};
|
|
5851
5851
|
}
|
|
5852
5852
|
function Ev(e, t) {
|
|
@@ -5873,7 +5873,7 @@ function Iv(e) {
|
|
|
5873
5873
|
function Nv({ offset: e }, t) {
|
|
5874
5874
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
5875
5875
|
}
|
|
5876
|
-
function
|
|
5876
|
+
function _o(e, t, n) {
|
|
5877
5877
|
if (t.length === 0)
|
|
5878
5878
|
return 0;
|
|
5879
5879
|
const { index: r, offset: o, size: s } = $d(t, e, fl), i = e - r, a = s * i + (i - 1) * n + o;
|
|
@@ -5913,7 +5913,7 @@ function _v(e, [t, n, r, o]) {
|
|
|
5913
5913
|
const { lastIndex: l, lastOffset: c, lastSize: d, offsetTree: f } = ja(e.offsetTree, a, i, o);
|
|
5914
5914
|
return {
|
|
5915
5915
|
groupIndices: n,
|
|
5916
|
-
groupOffsetTree: n.reduce((h, p) => gn(h, p,
|
|
5916
|
+
groupOffsetTree: n.reduce((h, p) => gn(h, p, _o(p, f, o)), Kr()),
|
|
5917
5917
|
lastIndex: l,
|
|
5918
5918
|
lastOffset: c,
|
|
5919
5919
|
lastSize: d,
|
|
@@ -5989,7 +5989,7 @@ const Mv = {
|
|
|
5989
5989
|
_e((C) => C.length > 0),
|
|
5990
5990
|
Ke(x, p),
|
|
5991
5991
|
me(([C, S, k]) => {
|
|
5992
|
-
const _ = C.reduce((N, A, M) => gn(N, A,
|
|
5992
|
+
const _ = C.reduce((N, A, M) => gn(N, A, _o(A, S.offsetTree, k) || M), Kr());
|
|
5993
5993
|
return {
|
|
5994
5994
|
...S,
|
|
5995
5995
|
groupIndices: C,
|
|
@@ -6042,7 +6042,7 @@ const Mv = {
|
|
|
6042
6042
|
me((C) => C.changed)
|
|
6043
6043
|
)
|
|
6044
6044
|
);
|
|
6045
|
-
|
|
6045
|
+
gt(
|
|
6046
6046
|
J(
|
|
6047
6047
|
a,
|
|
6048
6048
|
Un(
|
|
@@ -6060,7 +6060,7 @@ const Mv = {
|
|
|
6060
6060
|
k.length > 0 && (C -= Hc(-C, k)), Be(i, C);
|
|
6061
6061
|
}
|
|
6062
6062
|
}
|
|
6063
|
-
),
|
|
6063
|
+
), gt(J(a, Ke(e)), ([C, S]) => {
|
|
6064
6064
|
C < 0 && S(
|
|
6065
6065
|
"`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
|
|
6066
6066
|
{ firstItemIndex: a },
|
|
@@ -6075,7 +6075,7 @@ const Mv = {
|
|
|
6075
6075
|
me(([C, S]) => {
|
|
6076
6076
|
const k = S.groupIndices.length > 0, _ = [], N = S.lastSize;
|
|
6077
6077
|
if (k) {
|
|
6078
|
-
const A =
|
|
6078
|
+
const A = No(S.sizeTree, 0);
|
|
6079
6079
|
let M = 0, $ = 0;
|
|
6080
6080
|
for (; M < C; ) {
|
|
6081
6081
|
const P = S.groupIndices[$], B = S.groupIndices.length === $ + 1 ? 1 / 0 : S.groupIndices[$ + 1] - P - 1;
|
|
@@ -6135,7 +6135,7 @@ const Mv = {
|
|
|
6135
6135
|
Ke(x, p),
|
|
6136
6136
|
me(([C, { offsetTree: S }, k]) => {
|
|
6137
6137
|
const _ = -C;
|
|
6138
|
-
return
|
|
6138
|
+
return _o(_, S, k);
|
|
6139
6139
|
})
|
|
6140
6140
|
)
|
|
6141
6141
|
);
|
|
@@ -6147,7 +6147,7 @@ const Mv = {
|
|
|
6147
6147
|
if (S.groupIndices.length > 0) {
|
|
6148
6148
|
if (St(S.sizeTree))
|
|
6149
6149
|
return S;
|
|
6150
|
-
let _ =
|
|
6150
|
+
let _ = Kr();
|
|
6151
6151
|
const N = Dt(y);
|
|
6152
6152
|
let A = 0, M = 0, $ = 0;
|
|
6153
6153
|
for (; A < -C; ) {
|
|
@@ -6156,7 +6156,7 @@ const Mv = {
|
|
|
6156
6156
|
M++, A += U + 1;
|
|
6157
6157
|
}
|
|
6158
6158
|
if (_ = Tr(S.sizeTree).reduce((U, { k: P, v: B }) => gn(U, Math.max(0, P + C), B), _), A !== -C) {
|
|
6159
|
-
const U =
|
|
6159
|
+
const U = No(S.sizeTree, $);
|
|
6160
6160
|
_ = gn(_, 0, U);
|
|
6161
6161
|
const P = jn(S.sizeTree, -C + 1)[1];
|
|
6162
6162
|
_ = gn(_, 1, P);
|
|
@@ -6167,7 +6167,7 @@ const Mv = {
|
|
|
6167
6167
|
...ja(S.offsetTree, 0, _, k)
|
|
6168
6168
|
};
|
|
6169
6169
|
} else {
|
|
6170
|
-
const _ = Tr(S.sizeTree).reduce((N, { k: A, v: M }) => gn(N, Math.max(0, A + C), M),
|
|
6170
|
+
const _ = Tr(S.sizeTree).reduce((N, { k: A, v: M }) => gn(N, Math.max(0, A + C), M), Kr());
|
|
6171
6171
|
return {
|
|
6172
6172
|
...S,
|
|
6173
6173
|
sizeTree: _,
|
|
@@ -6247,7 +6247,7 @@ const Hd = lt(
|
|
|
6247
6247
|
Et()
|
|
6248
6248
|
)
|
|
6249
6249
|
);
|
|
6250
|
-
return
|
|
6250
|
+
return gt(t, (r) => {
|
|
6251
6251
|
r && Dt(e)("props updated", {}, pn.DEBUG);
|
|
6252
6252
|
}), { didMount: n, propsReady: t };
|
|
6253
6253
|
},
|
|
@@ -6258,7 +6258,7 @@ function Ud(e) {
|
|
|
6258
6258
|
const t = typeof e == "number" ? { index: e } : e;
|
|
6259
6259
|
return t.align || (t.align = "start"), (!t.behavior || !Lv) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
|
|
6260
6260
|
}
|
|
6261
|
-
const
|
|
6261
|
+
const Wo = lt(
|
|
6262
6262
|
([
|
|
6263
6263
|
{ gap: e, listRefresh: t, sizes: n, totalCount: r },
|
|
6264
6264
|
{
|
|
@@ -6291,14 +6291,14 @@ const Vo = lt(
|
|
|
6291
6291
|
P
|
|
6292
6292
|
]) => {
|
|
6293
6293
|
const B = Ud(T), { align: j, behavior: W, offset: F } = B, L = k - 1, ee = Bd(B, C, L);
|
|
6294
|
-
let te =
|
|
6294
|
+
let te = _o(ee, C.offsetTree, $) + N;
|
|
6295
6295
|
j === "end" ? (te += U + jn(C.sizeTree, ee)[1] - S + P, ee === L && (te += A)) : j === "center" ? te += (U + jn(C.sizeTree, ee)[1] - S + P) / 2 : te -= _, F && (te += F);
|
|
6296
6296
|
const ve = (Ne) => {
|
|
6297
6297
|
b(), Ne ? (M("retrying to scroll to", { location: T }, pn.DEBUG), Be(p, T)) : (Be(g, !0), M("list did not change, scroll successful", {}, pn.DEBUG));
|
|
6298
6298
|
};
|
|
6299
6299
|
if (b(), W === "smooth") {
|
|
6300
6300
|
let Ne = !1;
|
|
6301
|
-
w =
|
|
6301
|
+
w = gt(t, (Z) => {
|
|
6302
6302
|
Ne = Ne || Z;
|
|
6303
6303
|
}), y = _n(d, () => {
|
|
6304
6304
|
ve(Ne);
|
|
@@ -6340,7 +6340,7 @@ function pl(e, t) {
|
|
|
6340
6340
|
const n = t - 1;
|
|
6341
6341
|
return typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
|
|
6342
6342
|
}
|
|
6343
|
-
const
|
|
6343
|
+
const Vo = lt(
|
|
6344
6344
|
([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: i }]) => {
|
|
6345
6345
|
const a = Q(!0), l = Q(0), c = Q(!0);
|
|
6346
6346
|
return Se(
|
|
@@ -6359,7 +6359,7 @@ const Ko = lt(
|
|
|
6359
6359
|
Bn(!1)
|
|
6360
6360
|
),
|
|
6361
6361
|
c
|
|
6362
|
-
),
|
|
6362
|
+
), gt(
|
|
6363
6363
|
J(
|
|
6364
6364
|
zt(t, i),
|
|
6365
6365
|
Ke(a, n, e, c),
|
|
@@ -6381,13 +6381,13 @@ const Ko = lt(
|
|
|
6381
6381
|
scrolledToInitialItem: a
|
|
6382
6382
|
};
|
|
6383
6383
|
},
|
|
6384
|
-
It(qn, an,
|
|
6384
|
+
It(qn, an, Wo, gr),
|
|
6385
6385
|
{ singleton: !0 }
|
|
6386
6386
|
);
|
|
6387
6387
|
function Wd(e, t) {
|
|
6388
6388
|
return Math.abs(e - t) < 1.01;
|
|
6389
6389
|
}
|
|
6390
|
-
const
|
|
6390
|
+
const jo = "up", bo = "down", $v = "none", zv = {
|
|
6391
6391
|
atBottom: !1,
|
|
6392
6392
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
6393
6393
|
state: {
|
|
@@ -6396,7 +6396,7 @@ const Po = "up", So = "down", $v = "none", zv = {
|
|
|
6396
6396
|
scrollTop: 0,
|
|
6397
6397
|
viewportHeight: 0
|
|
6398
6398
|
}
|
|
6399
|
-
}, Bv = 0,
|
|
6399
|
+
}, Bv = 0, Ko = lt(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
|
|
6400
6400
|
const i = Q(!1), a = Q(!0), l = Ze(), c = Ze(), d = Q(4), f = Q(Bv), h = on(
|
|
6401
6401
|
J(
|
|
6402
6402
|
Ia(J(Ae(o), Ar(1), Bn(!0)), J(Ae(o), Ar(1), Bn(!1), $c(100))),
|
|
@@ -6483,15 +6483,15 @@ const Po = "up", So = "down", $v = "none", zv = {
|
|
|
6483
6483
|
),
|
|
6484
6484
|
i
|
|
6485
6485
|
), Se(J(i, Jn(50)), l);
|
|
6486
|
-
const y = Q(
|
|
6486
|
+
const y = Q(bo);
|
|
6487
6487
|
Se(
|
|
6488
6488
|
J(
|
|
6489
6489
|
r,
|
|
6490
6490
|
me(({ scrollTop: w }) => w),
|
|
6491
6491
|
Et(),
|
|
6492
6492
|
Un(
|
|
6493
|
-
(w, b) => Dt(p) ? { direction: w.direction, prevScrollTop: b } : { direction: b < w.prevScrollTop ?
|
|
6494
|
-
{ direction:
|
|
6493
|
+
(w, b) => Dt(p) ? { direction: w.direction, prevScrollTop: b } : { direction: b < w.prevScrollTop ? jo : bo, prevScrollTop: b },
|
|
6494
|
+
{ direction: bo, prevScrollTop: 0 }
|
|
6495
6495
|
),
|
|
6496
6496
|
me((w) => w.direction)
|
|
6497
6497
|
),
|
|
@@ -6530,7 +6530,7 @@ const Po = "up", So = "down", $v = "none", zv = {
|
|
|
6530
6530
|
};
|
|
6531
6531
|
}, It(an)), Ms = "top", Ds = "bottom", Uc = "none";
|
|
6532
6532
|
function Wc(e, t, n) {
|
|
6533
|
-
return typeof e == "number" ? n ===
|
|
6533
|
+
return typeof e == "number" ? n === jo && t === Ms || n === bo && t === Ds ? e : 0 : n === jo ? t === Ms ? e.main : e.reverse : t === Ds ? e.main : e.reverse;
|
|
6534
6534
|
}
|
|
6535
6535
|
function Vc(e, t) {
|
|
6536
6536
|
var n;
|
|
@@ -6544,7 +6544,7 @@ const ml = lt(
|
|
|
6544
6544
|
Ae(r),
|
|
6545
6545
|
Ae(o),
|
|
6546
6546
|
Ae(n),
|
|
6547
|
-
Ae(s,
|
|
6547
|
+
Ae(s, Ao),
|
|
6548
6548
|
Ae(l),
|
|
6549
6549
|
Ae(i),
|
|
6550
6550
|
Ae(t),
|
|
@@ -6566,14 +6566,14 @@ const ml = lt(
|
|
|
6566
6566
|
const T = d - w, C = y + m, S = Math.max(h - T, 0);
|
|
6567
6567
|
let k = Uc;
|
|
6568
6568
|
const _ = Vc(b, Ms), N = Vc(b, Ds);
|
|
6569
|
-
return p -= w, p += h + m, g += h + m, g -= w, p > d + C - _ && (k =
|
|
6569
|
+
return p -= w, p += h + m, g += h + m, g -= w, p > d + C - _ && (k = jo), g < d - S + f + N && (k = bo), k !== Uc ? [
|
|
6570
6570
|
Math.max(T - h - Wc(x, Ms, k) - _, 0),
|
|
6571
6571
|
T - S - m + f + Wc(x, Ds, k) + N
|
|
6572
6572
|
] : null;
|
|
6573
6573
|
}
|
|
6574
6574
|
),
|
|
6575
6575
|
_e((d) => d != null),
|
|
6576
|
-
Et(
|
|
6576
|
+
Et(Ao)
|
|
6577
6577
|
),
|
|
6578
6578
|
[0, 0]
|
|
6579
6579
|
);
|
|
@@ -6692,7 +6692,7 @@ const Dr = lt(
|
|
|
6692
6692
|
zt(
|
|
6693
6693
|
p,
|
|
6694
6694
|
g,
|
|
6695
|
-
Ae(l,
|
|
6695
|
+
Ae(l, Ao),
|
|
6696
6696
|
Ae(o),
|
|
6697
6697
|
Ae(r),
|
|
6698
6698
|
Ae(c),
|
|
@@ -6807,7 +6807,7 @@ const Dr = lt(
|
|
|
6807
6807
|
Ke(o, e),
|
|
6808
6808
|
_e(([{ items: S }, k]) => S[S.length - 1].originalIndex === k - 1),
|
|
6809
6809
|
me(([, S, k]) => [S - 1, k]),
|
|
6810
|
-
Et(
|
|
6810
|
+
Et(Ao),
|
|
6811
6811
|
me(([S]) => S)
|
|
6812
6812
|
)
|
|
6813
6813
|
), T = xn(
|
|
@@ -6842,9 +6842,9 @@ const Dr = lt(
|
|
|
6842
6842
|
qn,
|
|
6843
6843
|
Hd,
|
|
6844
6844
|
ml,
|
|
6845
|
-
Ko,
|
|
6846
6845
|
Vo,
|
|
6847
|
-
|
|
6846
|
+
Wo,
|
|
6847
|
+
Ko,
|
|
6848
6848
|
gr,
|
|
6849
6849
|
dl
|
|
6850
6850
|
),
|
|
@@ -6899,7 +6899,7 @@ const Dr = lt(
|
|
|
6899
6899
|
Ke(t, l, n, s, o, r, a),
|
|
6900
6900
|
Ke(e),
|
|
6901
6901
|
me(([[f, h, p, g, x, y, m, w], b]) => {
|
|
6902
|
-
const { align: T, behavior: C, calculateViewLocation: S = Wv, done: k, ..._ } = f, N = Bd(f, h, g - 1), A =
|
|
6902
|
+
const { align: T, behavior: C, calculateViewLocation: S = Wv, done: k, ..._ } = f, N = Bd(f, h, g - 1), A = _o(N, h.offsetTree, b) + x + y, M = A + jn(h.sizeTree, N)[1], $ = w + y, U = w + p - m, P = S({
|
|
6903
6903
|
itemBottom: M,
|
|
6904
6904
|
itemTop: A,
|
|
6905
6905
|
locationParams: { align: T, behavior: C, ..._ },
|
|
@@ -6924,7 +6924,7 @@ const Dr = lt(
|
|
|
6924
6924
|
scrollIntoView: d
|
|
6925
6925
|
};
|
|
6926
6926
|
},
|
|
6927
|
-
It(qn, an,
|
|
6927
|
+
It(qn, an, Wo, Dr, mr),
|
|
6928
6928
|
{ singleton: !0 }
|
|
6929
6929
|
);
|
|
6930
6930
|
function qc(e) {
|
|
@@ -6951,7 +6951,7 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
6951
6951
|
index: "LAST"
|
|
6952
6952
|
});
|
|
6953
6953
|
}
|
|
6954
|
-
|
|
6954
|
+
gt(
|
|
6955
6955
|
J(
|
|
6956
6956
|
zt(J(Ae(t), Ar(1)), l),
|
|
6957
6957
|
Ke(Ae(g), s, a, f),
|
|
@@ -6975,7 +6975,7 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
6975
6975
|
});
|
|
6976
6976
|
setTimeout(S, 100);
|
|
6977
6977
|
}
|
|
6978
|
-
|
|
6978
|
+
gt(
|
|
6979
6979
|
J(
|
|
6980
6980
|
zt(Ae(g), t, c),
|
|
6981
6981
|
_e(([C, , S]) => C && S),
|
|
@@ -6989,9 +6989,9 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
6989
6989
|
([, C]) => {
|
|
6990
6990
|
Dt(a) && w(C !== !1);
|
|
6991
6991
|
}
|
|
6992
|
-
),
|
|
6992
|
+
), gt(x, () => {
|
|
6993
6993
|
w(Dt(g) !== !1);
|
|
6994
|
-
}),
|
|
6994
|
+
}), gt(zt(Ae(g), o), ([C, S]) => {
|
|
6995
6995
|
C && !S.atBottom && S.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && m("auto");
|
|
6996
6996
|
});
|
|
6997
6997
|
const b = Q(null), T = Ze();
|
|
@@ -7007,7 +7007,7 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
7007
7007
|
J(Ae(t))
|
|
7008
7008
|
),
|
|
7009
7009
|
T
|
|
7010
|
-
),
|
|
7010
|
+
), gt(
|
|
7011
7011
|
J(
|
|
7012
7012
|
zt(J(T, Ar(1)), l),
|
|
7013
7013
|
Ke(Ae(b), a, f, h),
|
|
@@ -7026,9 +7026,9 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
7026
7026
|
},
|
|
7027
7027
|
It(
|
|
7028
7028
|
qn,
|
|
7029
|
-
qo,
|
|
7030
|
-
Vo,
|
|
7031
7029
|
Ko,
|
|
7030
|
+
Wo,
|
|
7031
|
+
Vo,
|
|
7032
7032
|
gr,
|
|
7033
7033
|
mr,
|
|
7034
7034
|
an,
|
|
@@ -7046,12 +7046,12 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
7046
7046
|
),
|
|
7047
7047
|
i
|
|
7048
7048
|
), {}),
|
|
7049
|
-
It(qn,
|
|
7049
|
+
It(qn, Vo, Dr, gr),
|
|
7050
7050
|
{ singleton: !0 }
|
|
7051
7051
|
), Gv = lt(
|
|
7052
7052
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
7053
7053
|
const r = Q(0);
|
|
7054
|
-
return
|
|
7054
|
+
return gt(
|
|
7055
7055
|
J(
|
|
7056
7056
|
e,
|
|
7057
7057
|
Ke(r),
|
|
@@ -7098,14 +7098,14 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
7098
7098
|
Et()
|
|
7099
7099
|
),
|
|
7100
7100
|
t
|
|
7101
|
-
),
|
|
7101
|
+
), gt(
|
|
7102
7102
|
J(zt(t, e, n), Ke(r)),
|
|
7103
7103
|
([[o, s, i], a]) => {
|
|
7104
7104
|
o && a && a.change && a.change(s, i);
|
|
7105
7105
|
}
|
|
7106
7106
|
), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
|
|
7107
7107
|
},
|
|
7108
|
-
It(
|
|
7108
|
+
It(Ko),
|
|
7109
7109
|
{ singleton: !0 }
|
|
7110
7110
|
), gl = lt(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
7111
7111
|
const n = Ze(), r = Ze(), o = Ze(), s = Q(!1), i = Q(void 0);
|
|
@@ -7148,7 +7148,7 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
7148
7148
|
{ useWindowScroll: i, windowScrollContainerState: a, windowViewportRect: l }
|
|
7149
7149
|
]) => {
|
|
7150
7150
|
const c = Ze(), d = Q(void 0), f = Q(null), h = Q(null);
|
|
7151
|
-
return Se(a, f), Se(l, h),
|
|
7151
|
+
return Se(a, f), Se(l, h), gt(
|
|
7152
7152
|
J(
|
|
7153
7153
|
c,
|
|
7154
7154
|
Ke(t, r, i, f, h, n)
|
|
@@ -7171,7 +7171,7 @@ const Vv = (e, t) => typeof e == "function" ? qc(e(t)) : t && qc(e), Kv = lt(
|
|
|
7171
7171
|
restoreStateFrom: d
|
|
7172
7172
|
};
|
|
7173
7173
|
},
|
|
7174
|
-
It(qn, an,
|
|
7174
|
+
It(qn, an, Vo, gr, gl)
|
|
7175
7175
|
);
|
|
7176
7176
|
function Xv(e) {
|
|
7177
7177
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
@@ -7214,16 +7214,16 @@ const Zv = Xd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7214
7214
|
),
|
|
7215
7215
|
_e(([m]) => m !== 0),
|
|
7216
7216
|
Ke(r, a, n, o, p, g),
|
|
7217
|
-
_e(([, m, w, b, , , T]) => !T && !b && m !== 0 && w ===
|
|
7217
|
+
_e(([, m, w, b, , , T]) => !T && !b && m !== 0 && w === jo),
|
|
7218
7218
|
me(([[m], , , , , w]) => (w("Upward scrolling compensation", { amount: m }, pn.DEBUG), m))
|
|
7219
7219
|
)
|
|
7220
7220
|
);
|
|
7221
7221
|
function y(m) {
|
|
7222
7222
|
m > 0 ? (Be(t, { behavior: "auto", top: -m }), Be(e, 0)) : (Be(e, 0), Be(t, { behavior: "auto", top: -m }));
|
|
7223
7223
|
}
|
|
7224
|
-
return
|
|
7224
|
+
return gt(J(x, Ke(e, s)), ([m, w, b]) => {
|
|
7225
7225
|
b && Zv() ? Be(e, w - m) : y(-m);
|
|
7226
|
-
}),
|
|
7226
|
+
}), gt(
|
|
7227
7227
|
J(
|
|
7228
7228
|
zt(on(s, !1), e, g),
|
|
7229
7229
|
_e(([m, w, b]) => !m && !b && w !== 0),
|
|
@@ -7237,7 +7237,7 @@ const Zv = Xd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7237
7237
|
me((m) => ({ top: -m }))
|
|
7238
7238
|
),
|
|
7239
7239
|
t
|
|
7240
|
-
),
|
|
7240
|
+
), gt(
|
|
7241
7241
|
J(
|
|
7242
7242
|
c,
|
|
7243
7243
|
Ke(h, d),
|
|
@@ -7249,7 +7249,7 @@ const Zv = Xd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7249
7249
|
return S(m);
|
|
7250
7250
|
{
|
|
7251
7251
|
let k = 0;
|
|
7252
|
-
const _ =
|
|
7252
|
+
const _ = No(T, 0);
|
|
7253
7253
|
let N = 0, A = 0;
|
|
7254
7254
|
for (; N < m; ) {
|
|
7255
7255
|
N++, k += _;
|
|
@@ -7269,7 +7269,7 @@ const Zv = Xd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7269
7269
|
}
|
|
7270
7270
|
), { deviation: e };
|
|
7271
7271
|
},
|
|
7272
|
-
It(an,
|
|
7272
|
+
It(an, Ko, Dr, qn, mr, dl)
|
|
7273
7273
|
), ew = lt(
|
|
7274
7274
|
([
|
|
7275
7275
|
e,
|
|
@@ -7374,12 +7374,12 @@ const Zv = Xd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7374
7374
|
}),
|
|
7375
7375
|
It(
|
|
7376
7376
|
qn,
|
|
7377
|
-
|
|
7377
|
+
Vo,
|
|
7378
7378
|
an,
|
|
7379
7379
|
Yv,
|
|
7380
7380
|
Kv,
|
|
7381
7381
|
Dr,
|
|
7382
|
-
|
|
7382
|
+
Wo,
|
|
7383
7383
|
Qv,
|
|
7384
7384
|
Jv,
|
|
7385
7385
|
Hd,
|
|
@@ -7427,7 +7427,7 @@ function Zd(e, t, n) {
|
|
|
7427
7427
|
})), [C] = V.useState(Fc(d, T));
|
|
7428
7428
|
os(() => {
|
|
7429
7429
|
for (const k of i)
|
|
7430
|
-
k in b &&
|
|
7430
|
+
k in b && gt(C[k], b[k]);
|
|
7431
7431
|
return () => {
|
|
7432
7432
|
Object.values(C).map(cl);
|
|
7433
7433
|
};
|
|
@@ -7446,7 +7446,7 @@ function Zd(e, t, n) {
|
|
|
7446
7446
|
);
|
|
7447
7447
|
}, p = (y) => {
|
|
7448
7448
|
const m = V.useContext(a)[y], w = V.useCallback(
|
|
7449
|
-
(b) =>
|
|
7449
|
+
(b) => gt(m, b),
|
|
7450
7450
|
[m]
|
|
7451
7451
|
);
|
|
7452
7452
|
return V.useSyncExternalStore(
|
|
@@ -7457,7 +7457,7 @@ function Zd(e, t, n) {
|
|
|
7457
7457
|
}, g = (y) => {
|
|
7458
7458
|
const m = V.useContext(a)[y], [w, b] = V.useState(Fc(Dt, m));
|
|
7459
7459
|
return os(
|
|
7460
|
-
() =>
|
|
7460
|
+
() => gt(m, (T) => {
|
|
7461
7461
|
T !== w && b(Lc(T));
|
|
7462
7462
|
}),
|
|
7463
7463
|
[m, w]
|
|
@@ -7467,7 +7467,7 @@ function Zd(e, t, n) {
|
|
|
7467
7467
|
Component: f,
|
|
7468
7468
|
useEmitter: (y, m) => {
|
|
7469
7469
|
const w = V.useContext(a)[y];
|
|
7470
|
-
os(() =>
|
|
7470
|
+
os(() => gt(w, m), [m, w]);
|
|
7471
7471
|
},
|
|
7472
7472
|
useEmitterValue: x,
|
|
7473
7473
|
usePublisher: h
|
|
@@ -7480,7 +7480,7 @@ function Qi(e) {
|
|
|
7480
7480
|
function nw(e) {
|
|
7481
7481
|
return "body" in e;
|
|
7482
7482
|
}
|
|
7483
|
-
function nf(e, t, n, r =
|
|
7483
|
+
function nf(e, t, n, r = oo, o, s) {
|
|
7484
7484
|
const i = V.useRef(null), a = V.useRef(null), l = V.useRef(null), c = V.useCallback(
|
|
7485
7485
|
(h) => {
|
|
7486
7486
|
let p, g, x;
|
|
@@ -7541,7 +7541,7 @@ function yl(e) {
|
|
|
7541
7541
|
return e;
|
|
7542
7542
|
}
|
|
7543
7543
|
const rw = /* @__PURE__ */ lt(() => {
|
|
7544
|
-
const e = Q((a) => `Item ${a}`), t = Q((a) => `Group ${a}`), n = Q({}), r = Q(yl), o = Q("div"), s = Q(
|
|
7544
|
+
const e = Q((a) => `Item ${a}`), t = Q((a) => `Group ${a}`), n = Q({}), r = Q(yl), o = Q("div"), s = Q(oo), i = (a, l = null) => on(
|
|
7545
7545
|
J(
|
|
7546
7546
|
n,
|
|
7547
7547
|
me((c) => c[a]),
|
|
@@ -7574,7 +7574,7 @@ const rw = /* @__PURE__ */ lt(() => {
|
|
|
7574
7574
|
n,
|
|
7575
7575
|
h,
|
|
7576
7576
|
f,
|
|
7577
|
-
e ?
|
|
7577
|
+
e ? oo : a,
|
|
7578
7578
|
p,
|
|
7579
7579
|
g,
|
|
7580
7580
|
o,
|
|
@@ -7854,7 +7854,7 @@ const pw = ({ children: e }) => {
|
|
|
7854
7854
|
] })), t = Q(null), n = Q((c) => /* @__PURE__ */ u.jsxs("td", { colSpan: 1e3, children: [
|
|
7855
7855
|
"Group ",
|
|
7856
7856
|
c
|
|
7857
|
-
] })), r = Q(null), o = Q(null), s = Q({}), i = Q(yl), a = Q(
|
|
7857
|
+
] })), r = Q(null), o = Q(null), s = Q({}), i = Q(yl), a = Q(oo), l = (c, d = null) => on(
|
|
7858
7858
|
J(
|
|
7859
7859
|
s,
|
|
7860
7860
|
me((f) => f[c]),
|
|
@@ -7901,7 +7901,7 @@ const Xc = {
|
|
|
7901
7901
|
offsetBottom: 0,
|
|
7902
7902
|
offsetTop: 0,
|
|
7903
7903
|
top: 0
|
|
7904
|
-
}, { ceil: Jc, floor: Ls, max:
|
|
7904
|
+
}, { ceil: Jc, floor: Ls, max: So, min: ta, round: Zc } = Math;
|
|
7905
7905
|
function Qc(e, t, n) {
|
|
7906
7906
|
return Array.from({ length: t - e + 1 }).map((r, o) => ({ data: n === null ? null : n[o + e], index: o + e }));
|
|
7907
7907
|
}
|
|
@@ -7928,7 +7928,7 @@ const Rw = /* @__PURE__ */ lt(
|
|
|
7928
7928
|
C
|
|
7929
7929
|
]) => {
|
|
7930
7930
|
const S = Q(0), k = Q(0), _ = Q(Xc), N = Q({ height: 0, width: 0 }), A = Q({ height: 0, width: 0 }), M = Ze(), $ = Ze(), U = Q(0), P = Q(null), B = Q({ column: 0, row: 0 }), j = Ze(), W = Ze(), F = Q(!1), L = Q(0), ee = Q(!0), te = Q(!1), ve = Q(!1);
|
|
7931
|
-
|
|
7931
|
+
gt(
|
|
7932
7932
|
J(
|
|
7933
7933
|
g,
|
|
7934
7934
|
Ke(L),
|
|
@@ -7937,7 +7937,7 @@ const Rw = /* @__PURE__ */ lt(
|
|
|
7937
7937
|
() => {
|
|
7938
7938
|
Be(ee, !1);
|
|
7939
7939
|
}
|
|
7940
|
-
),
|
|
7940
|
+
), gt(
|
|
7941
7941
|
J(
|
|
7942
7942
|
zt(g, ee, A, N, L, te),
|
|
7943
7943
|
_e(([D, X, ie, ue, , z]) => D && !X && ie.height !== 0 && ue.height !== 0 && !z)
|
|
@@ -7956,7 +7956,7 @@ const Rw = /* @__PURE__ */ lt(
|
|
|
7956
7956
|
Bn(0)
|
|
7957
7957
|
),
|
|
7958
7958
|
k
|
|
7959
|
-
),
|
|
7959
|
+
), gt(
|
|
7960
7960
|
J(
|
|
7961
7961
|
g,
|
|
7962
7962
|
Ke(W),
|
|
@@ -8026,9 +8026,9 @@ const Rw = /* @__PURE__ */ lt(
|
|
|
8026
8026
|
}
|
|
8027
8027
|
const ut = af(rt, ke, et);
|
|
8028
8028
|
let Je, Xe;
|
|
8029
|
-
De ? X === 0 && ie === 0 && Pe > 0 ? (Je = 0, Xe = Pe - 1) : (Je = ut * Ls((X + nt) / (ct + nt)), Xe = ut * Jc((ie + nt) / (ct + nt)) - 1, Xe = ta(D - 1,
|
|
8030
|
-
const dt = Qc(Je, Xe, oe), { bottom:
|
|
8031
|
-
return { bottom:
|
|
8029
|
+
De ? X === 0 && ie === 0 && Pe > 0 ? (Je = 0, Xe = Pe - 1) : (Je = ut * Ls((X + nt) / (ct + nt)), Xe = ut * Jc((ie + nt) / (ct + nt)) - 1, Xe = ta(D - 1, So(Xe, ut - 1)), Je = ta(Xe, So(0, Je))) : (Je = 0, Xe = -1);
|
|
8030
|
+
const dt = Qc(Je, Xe, oe), { bottom: xt, top: Rt } = eu(he, ue, z, dt), Bt = Jc(D / ut), jt = Bt * ct + (Bt - 1) * nt - xt;
|
|
8031
|
+
return { bottom: xt, itemHeight: ct, items: dt, itemWidth: ke, offsetBottom: jt, offsetTop: Rt, top: Rt };
|
|
8032
8032
|
}
|
|
8033
8033
|
)
|
|
8034
8034
|
),
|
|
@@ -8048,7 +8048,7 @@ const Rw = /* @__PURE__ */ lt(
|
|
|
8048
8048
|
const { bottom: z, top: he } = eu(D, ue, X, ie);
|
|
8049
8049
|
return [he, z];
|
|
8050
8050
|
}),
|
|
8051
|
-
Et(
|
|
8051
|
+
Et(Ao)
|
|
8052
8052
|
),
|
|
8053
8053
|
t
|
|
8054
8054
|
);
|
|
@@ -8100,7 +8100,7 @@ const Rw = /* @__PURE__ */ lt(
|
|
|
8100
8100
|
me(([D, X, ie, ue, z]) => {
|
|
8101
8101
|
const he = Ud(D), { align: oe, behavior: Pe, offset: De } = he;
|
|
8102
8102
|
let Ge = he.index;
|
|
8103
|
-
Ge === "LAST" && (Ge = ue - 1), Ge =
|
|
8103
|
+
Ge === "LAST" && (Ge = ue - 1), Ge = So(0, Ge, ta(ue - 1, Ge));
|
|
8104
8104
|
let et = Pa(X, z, ie, Ge);
|
|
8105
8105
|
return oe === "end" ? et = Zc(et - X.height + ie.height) : oe === "center" && (et = Zc(et - X.height / 2 + ie.height / 2)), De && (et += De), { behavior: Pe, top: et };
|
|
8106
8106
|
})
|
|
@@ -8162,10 +8162,10 @@ const Rw = /* @__PURE__ */ lt(
|
|
|
8162
8162
|
...C
|
|
8163
8163
|
};
|
|
8164
8164
|
},
|
|
8165
|
-
It(ml, an,
|
|
8165
|
+
It(ml, an, Ko, Yd, gr, gl, mr)
|
|
8166
8166
|
);
|
|
8167
8167
|
function af(e, t, n) {
|
|
8168
|
-
return
|
|
8168
|
+
return So(1, Ls((e + n) / (Ls(t) + n)));
|
|
8169
8169
|
}
|
|
8170
8170
|
function eu(e, t, n, r) {
|
|
8171
8171
|
const { height: o } = n;
|
|
@@ -8175,11 +8175,11 @@ function eu(e, t, n, r) {
|
|
|
8175
8175
|
return { bottom: Pa(e, t, n, r[r.length - 1].index) + o, top: s };
|
|
8176
8176
|
}
|
|
8177
8177
|
function Pa(e, t, n, r) {
|
|
8178
|
-
const o = af(e.width, n.width, t.column), s = Ls(r / o), i = s * n.height +
|
|
8178
|
+
const o = af(e.width, n.width, t.column), s = Ls(r / o), i = s * n.height + So(0, s - 1) * t.row;
|
|
8179
8179
|
return i > 0 ? i + t.row : i;
|
|
8180
8180
|
}
|
|
8181
8181
|
const Ew = /* @__PURE__ */ lt(() => {
|
|
8182
|
-
const e = Q((f) => `Item ${f}`), t = Q({}), n = Q(null), r = Q("virtuoso-grid-item"), o = Q("virtuoso-grid-list"), s = Q(yl), i = Q("div"), a = Q(
|
|
8182
|
+
const e = Q((f) => `Item ${f}`), t = Q({}), n = Q(null), r = Q("virtuoso-grid-item"), o = Q("virtuoso-grid-list"), s = Q(yl), i = Q("div"), a = Q(oo), l = (f, h = null) => on(
|
|
8183
8183
|
J(
|
|
8184
8184
|
t,
|
|
8185
8185
|
me((p) => p[f]),
|
|
@@ -8381,7 +8381,7 @@ const Lw = ti(
|
|
|
8381
8381
|
function cf({ className: e, variant: t, ...n }) {
|
|
8382
8382
|
return /* @__PURE__ */ u.jsx("div", { className: se(Lw({ variant: t }), e), ...n });
|
|
8383
8383
|
}
|
|
8384
|
-
const
|
|
8384
|
+
const Co = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
8385
8385
|
"div",
|
|
8386
8386
|
{
|
|
8387
8387
|
ref: n,
|
|
@@ -8392,8 +8392,8 @@ const To = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
8392
8392
|
...t
|
|
8393
8393
|
}
|
|
8394
8394
|
));
|
|
8395
|
-
|
|
8396
|
-
const
|
|
8395
|
+
Co.displayName = "Card";
|
|
8396
|
+
const To = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
8397
8397
|
"div",
|
|
8398
8398
|
{
|
|
8399
8399
|
ref: n,
|
|
@@ -8401,8 +8401,8 @@ const ko = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
8401
8401
|
...t
|
|
8402
8402
|
}
|
|
8403
8403
|
));
|
|
8404
|
-
|
|
8405
|
-
const
|
|
8404
|
+
To.displayName = "CardHeader";
|
|
8405
|
+
const ko = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
8406
8406
|
"h3",
|
|
8407
8407
|
{
|
|
8408
8408
|
ref: n,
|
|
@@ -8413,7 +8413,7 @@ const Ro = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
8413
8413
|
...t
|
|
8414
8414
|
}
|
|
8415
8415
|
));
|
|
8416
|
-
|
|
8416
|
+
ko.displayName = "CardTitle";
|
|
8417
8417
|
const uf = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
8418
8418
|
"p",
|
|
8419
8419
|
{
|
|
@@ -8423,8 +8423,8 @@ const uf = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
8423
8423
|
}
|
|
8424
8424
|
));
|
|
8425
8425
|
uf.displayName = "CardDescription";
|
|
8426
|
-
const
|
|
8427
|
-
|
|
8426
|
+
const Ro = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx("div", { ref: n, className: se("p-6 pt-0", e), ...t }));
|
|
8427
|
+
Ro.displayName = "CardContent";
|
|
8428
8428
|
const df = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
8429
8429
|
"div",
|
|
8430
8430
|
{
|
|
@@ -8443,7 +8443,7 @@ const ra = /* @__PURE__ */ new Map(), nu = (e) => {
|
|
|
8443
8443
|
if (ra.has(e))
|
|
8444
8444
|
return;
|
|
8445
8445
|
const t = setTimeout(() => {
|
|
8446
|
-
ra.delete(e),
|
|
8446
|
+
ra.delete(e), Eo({
|
|
8447
8447
|
type: "REMOVE_TOAST",
|
|
8448
8448
|
toastId: e
|
|
8449
8449
|
});
|
|
@@ -8488,17 +8488,17 @@ const ra = /* @__PURE__ */ new Map(), nu = (e) => {
|
|
|
8488
8488
|
}
|
|
8489
8489
|
}, Ts = [];
|
|
8490
8490
|
let ks = { toasts: [] };
|
|
8491
|
-
function
|
|
8491
|
+
function Eo(e) {
|
|
8492
8492
|
ks = Bw(ks, e), Ts.forEach((t) => {
|
|
8493
8493
|
t(ks);
|
|
8494
8494
|
});
|
|
8495
8495
|
}
|
|
8496
8496
|
function Hw({ ...e }) {
|
|
8497
|
-
const t = zw(), n = (o) =>
|
|
8497
|
+
const t = zw(), n = (o) => Eo({
|
|
8498
8498
|
type: "UPDATE_TOAST",
|
|
8499
8499
|
toast: { ...o, id: t }
|
|
8500
|
-
}), r = () =>
|
|
8501
|
-
return
|
|
8500
|
+
}), r = () => Eo({ type: "DISMISS_TOAST", toastId: t });
|
|
8501
|
+
return Eo({
|
|
8502
8502
|
type: "ADD_TOAST",
|
|
8503
8503
|
toast: {
|
|
8504
8504
|
...e,
|
|
@@ -8522,7 +8522,7 @@ function wl() {
|
|
|
8522
8522
|
}), [e]), {
|
|
8523
8523
|
...e,
|
|
8524
8524
|
toast: Hw,
|
|
8525
|
-
dismiss: (n) =>
|
|
8525
|
+
dismiss: (n) => Eo({ type: "DISMISS_TOAST", toastId: n })
|
|
8526
8526
|
};
|
|
8527
8527
|
}
|
|
8528
8528
|
async function ff(e, t) {
|
|
@@ -8568,12 +8568,12 @@ function bl(e) {
|
|
|
8568
8568
|
function hf(e) {
|
|
8569
8569
|
return !!(e && typeof e == "object" && (e.type === "file" || e.mimeType || e.filename || e.sourceType === "base64"));
|
|
8570
8570
|
}
|
|
8571
|
-
function
|
|
8571
|
+
function Po(e) {
|
|
8572
8572
|
if (typeof e == "string")
|
|
8573
8573
|
return e;
|
|
8574
8574
|
if (e && typeof e == "object") {
|
|
8575
8575
|
if (Array.isArray(e)) {
|
|
8576
|
-
const n = e.map(
|
|
8576
|
+
const n = e.map(Po).filter((r) => r !== void 0);
|
|
8577
8577
|
if (!n.length) {
|
|
8578
8578
|
console.debug("[message-utils] sanitizeForDisplay - array emptied -> returning undefined", { originalLength: e.length });
|
|
8579
8579
|
return;
|
|
@@ -8597,7 +8597,7 @@ function Oo(e) {
|
|
|
8597
8597
|
if (n === "data" && typeof r == "string" && r.length > 100)
|
|
8598
8598
|
t[n] = `[base64 ${r.length} chars omitted]`;
|
|
8599
8599
|
else {
|
|
8600
|
-
const o =
|
|
8600
|
+
const o = Po(r);
|
|
8601
8601
|
o !== void 0 && (t[n] = o);
|
|
8602
8602
|
}
|
|
8603
8603
|
}
|
|
@@ -8612,11 +8612,11 @@ function Oo(e) {
|
|
|
8612
8612
|
}
|
|
8613
8613
|
return e;
|
|
8614
8614
|
}
|
|
8615
|
-
function
|
|
8615
|
+
function Oo(e) {
|
|
8616
8616
|
if (typeof e == "string") return e;
|
|
8617
8617
|
if (hf(e)) return "";
|
|
8618
8618
|
try {
|
|
8619
|
-
const t =
|
|
8619
|
+
const t = Po(e);
|
|
8620
8620
|
return t === void 0 ? "" : typeof t == "string" ? t : JSON.stringify(t, null, 2);
|
|
8621
8621
|
} catch {
|
|
8622
8622
|
return "";
|
|
@@ -8626,7 +8626,7 @@ function Vw(e) {
|
|
|
8626
8626
|
return typeof e != "string" ? !1 : /^[\s\n]*[-*]\s|^[\s\n]*#+\s|```|^\s*\[.*\]\(|^>\s/.test(e);
|
|
8627
8627
|
}
|
|
8628
8628
|
function Kw(e) {
|
|
8629
|
-
const t =
|
|
8629
|
+
const t = Oo(e);
|
|
8630
8630
|
return typeof e == "string" && Vw(e) ? { content: e, isMarkdown: !0 } : { content: t, isMarkdown: !1 };
|
|
8631
8631
|
}
|
|
8632
8632
|
function Fs(e) {
|
|
@@ -8746,7 +8746,7 @@ function Zn(e) {
|
|
|
8746
8746
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
8747
8747
|
}
|
|
8748
8748
|
var Jw = v[" useInsertionEffect ".trim().toString()] || Zt;
|
|
8749
|
-
function
|
|
8749
|
+
function Zr({
|
|
8750
8750
|
prop: e,
|
|
8751
8751
|
defaultProp: t,
|
|
8752
8752
|
onChange: n = () => {
|
|
@@ -8813,7 +8813,7 @@ var eb = [
|
|
|
8813
8813
|
"svg",
|
|
8814
8814
|
"ul"
|
|
8815
8815
|
], Me = eb.reduce((e, t) => {
|
|
8816
|
-
const n =
|
|
8816
|
+
const n = Xr(`Primitive.${t}`), r = v.forwardRef((o, s) => {
|
|
8817
8817
|
const { asChild: i, ...a } = o, l = i ? n : t;
|
|
8818
8818
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(l, { ...a, ref: s });
|
|
8819
8819
|
});
|
|
@@ -9401,14 +9401,14 @@ var Ob = function() {
|
|
|
9401
9401
|
right: t[2],
|
|
9402
9402
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
9403
9403
|
};
|
|
9404
|
-
}, $b = bf(),
|
|
9404
|
+
}, $b = bf(), qr = "data-scroll-locked", zb = function(e, t, n, r) {
|
|
9405
9405
|
var o = e.left, s = e.top, i = e.right, a = e.gap;
|
|
9406
9406
|
return n === void 0 && (n = "margin"), `
|
|
9407
9407
|
.`.concat(bb, ` {
|
|
9408
9408
|
overflow: hidden `).concat(r, `;
|
|
9409
9409
|
padding-right: `).concat(a, "px ").concat(r, `;
|
|
9410
9410
|
}
|
|
9411
|
-
body[`).concat(
|
|
9411
|
+
body[`).concat(qr, `] {
|
|
9412
9412
|
overflow: hidden `).concat(r, `;
|
|
9413
9413
|
overscroll-behavior: contain;
|
|
9414
9414
|
`).concat([
|
|
@@ -9441,18 +9441,18 @@ var Ob = function() {
|
|
|
9441
9441
|
margin-right: 0 `).concat(r, `;
|
|
9442
9442
|
}
|
|
9443
9443
|
|
|
9444
|
-
body[`).concat(
|
|
9444
|
+
body[`).concat(qr, `] {
|
|
9445
9445
|
`).concat(Sb, ": ").concat(a, `px;
|
|
9446
9446
|
}
|
|
9447
9447
|
`);
|
|
9448
9448
|
}, hu = function() {
|
|
9449
|
-
var e = parseInt(document.body.getAttribute(
|
|
9449
|
+
var e = parseInt(document.body.getAttribute(qr) || "0", 10);
|
|
9450
9450
|
return isFinite(e) ? e : 0;
|
|
9451
9451
|
}, Bb = function() {
|
|
9452
9452
|
v.useEffect(function() {
|
|
9453
|
-
return document.body.setAttribute(
|
|
9453
|
+
return document.body.setAttribute(qr, (hu() + 1).toString()), function() {
|
|
9454
9454
|
var e = hu() - 1;
|
|
9455
|
-
e <= 0 ? document.body.removeAttribute(
|
|
9455
|
+
e <= 0 ? document.body.removeAttribute(qr) : document.body.setAttribute(qr, e.toString());
|
|
9456
9456
|
};
|
|
9457
9457
|
}, []);
|
|
9458
9458
|
}, Hb = function(e) {
|
|
@@ -9474,7 +9474,7 @@ if (typeof window < "u")
|
|
|
9474
9474
|
} catch {
|
|
9475
9475
|
Ma = !1;
|
|
9476
9476
|
}
|
|
9477
|
-
var
|
|
9477
|
+
var Hr = Ma ? { passive: !1 } : !1, Ub = function(e) {
|
|
9478
9478
|
return e.tagName === "TEXTAREA";
|
|
9479
9479
|
}, Sf = function(e, t) {
|
|
9480
9480
|
if (!(e instanceof Element))
|
|
@@ -9550,7 +9550,7 @@ var Ur = Ma ? { passive: !1 } : !1, Ub = function(e) {
|
|
|
9550
9550
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
9551
9551
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
9552
9552
|
`);
|
|
9553
|
-
}, Zb = 0,
|
|
9553
|
+
}, Zb = 0, Ur = [];
|
|
9554
9554
|
function Qb(e) {
|
|
9555
9555
|
var t = v.useRef([]), n = v.useRef([0, 0]), r = v.useRef(), o = v.useState(Zb++)[0], s = v.useState(bf)[0], i = v.useRef(e);
|
|
9556
9556
|
v.useEffect(function() {
|
|
@@ -9585,7 +9585,7 @@ function Qb(e) {
|
|
|
9585
9585
|
return Yb(N, y, x, N === "h" ? b : T);
|
|
9586
9586
|
}, []), l = v.useCallback(function(x) {
|
|
9587
9587
|
var y = x;
|
|
9588
|
-
if (!(!
|
|
9588
|
+
if (!(!Ur.length || Ur[Ur.length - 1] !== s)) {
|
|
9589
9589
|
var m = "deltaY" in y ? mu(y) : ls(y), w = t.current.filter(function(C) {
|
|
9590
9590
|
return C.name === y.type && (C.target === y.target || y.target === C.shadowParent) && Xb(C.delta, m);
|
|
9591
9591
|
})[0];
|
|
@@ -9615,14 +9615,14 @@ function Qb(e) {
|
|
|
9615
9615
|
c(x.type, ls(x), x.target, a(x, e.lockRef.current));
|
|
9616
9616
|
}, []);
|
|
9617
9617
|
v.useEffect(function() {
|
|
9618
|
-
return
|
|
9618
|
+
return Ur.push(s), e.setCallbacks({
|
|
9619
9619
|
onScrollCapture: f,
|
|
9620
9620
|
onWheelCapture: f,
|
|
9621
9621
|
onTouchMoveCapture: h
|
|
9622
|
-
}), document.addEventListener("wheel", l,
|
|
9623
|
-
|
|
9622
|
+
}), document.addEventListener("wheel", l, Hr), document.addEventListener("touchmove", l, Hr), document.addEventListener("touchstart", d, Hr), function() {
|
|
9623
|
+
Ur = Ur.filter(function(x) {
|
|
9624
9624
|
return x !== s;
|
|
9625
|
-
}), document.removeEventListener("wheel", l,
|
|
9625
|
+
}), document.removeEventListener("wheel", l, Hr), document.removeEventListener("touchmove", l, Hr), document.removeEventListener("touchstart", d, Hr);
|
|
9626
9626
|
};
|
|
9627
9627
|
}, []);
|
|
9628
9628
|
var p = e.removeScrollBar, g = e.inert;
|
|
@@ -9648,7 +9648,7 @@ var n0 = function(e) {
|
|
|
9648
9648
|
return null;
|
|
9649
9649
|
var t = Array.isArray(e) ? e[0] : e;
|
|
9650
9650
|
return t.ownerDocument.body;
|
|
9651
|
-
},
|
|
9651
|
+
}, Wr = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), us = {}, ua = 0, kf = function(e) {
|
|
9652
9652
|
return e && (e.host || kf(e.parentNode));
|
|
9653
9653
|
}, r0 = function(e, t) {
|
|
9654
9654
|
return t.map(function(n) {
|
|
@@ -9672,8 +9672,8 @@ var n0 = function(e) {
|
|
|
9672
9672
|
d(h);
|
|
9673
9673
|
else
|
|
9674
9674
|
try {
|
|
9675
|
-
var p = h.getAttribute(r), g = p !== null && p !== "false", x = (
|
|
9676
|
-
|
|
9675
|
+
var p = h.getAttribute(r), g = p !== null && p !== "false", x = (Wr.get(h) || 0) + 1, y = (s.get(h) || 0) + 1;
|
|
9676
|
+
Wr.set(h, x), s.set(h, y), i.push(h), x === 1 && g && cs.set(h, !0), y === 1 && h.setAttribute(n, "true"), g || h.setAttribute(r, "true");
|
|
9677
9677
|
} catch (m) {
|
|
9678
9678
|
console.error("aria-hidden: cannot operate on ", h, m);
|
|
9679
9679
|
}
|
|
@@ -9681,9 +9681,9 @@ var n0 = function(e) {
|
|
|
9681
9681
|
};
|
|
9682
9682
|
return d(t), a.clear(), ua++, function() {
|
|
9683
9683
|
i.forEach(function(f) {
|
|
9684
|
-
var h =
|
|
9685
|
-
|
|
9686
|
-
}), ua--, ua || (
|
|
9684
|
+
var h = Wr.get(f) - 1, p = s.get(f) - 1;
|
|
9685
|
+
Wr.set(f, h), s.set(f, p), h || (cs.has(f) || f.removeAttribute(r), cs.delete(f)), p || f.removeAttribute(n);
|
|
9686
|
+
}), ua--, ua || (Wr = /* @__PURE__ */ new WeakMap(), Wr = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), us = {});
|
|
9687
9687
|
};
|
|
9688
9688
|
}, Tl = function(e, t, n) {
|
|
9689
9689
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -9699,7 +9699,7 @@ var n0 = function(e) {
|
|
|
9699
9699
|
defaultOpen: o,
|
|
9700
9700
|
onOpenChange: s,
|
|
9701
9701
|
modal: i = !0
|
|
9702
|
-
} = e, a = v.useRef(null), l = v.useRef(null), [c, d] =
|
|
9702
|
+
} = e, a = v.useRef(null), l = v.useRef(null), [c, d] = Zr({
|
|
9703
9703
|
prop: r,
|
|
9704
9704
|
defaultProp: o ?? !1,
|
|
9705
9705
|
onChange: s,
|
|
@@ -9756,7 +9756,7 @@ var $s = "DialogOverlay", jf = v.forwardRef(
|
|
|
9756
9756
|
}
|
|
9757
9757
|
);
|
|
9758
9758
|
jf.displayName = $s;
|
|
9759
|
-
var a0 =
|
|
9759
|
+
var a0 = Xr("DialogOverlay.RemoveScroll"), l0 = v.forwardRef(
|
|
9760
9760
|
(e, t) => {
|
|
9761
9761
|
const { __scopeDialog: n, ...r } = e, o = Dn($s, n);
|
|
9762
9762
|
return (
|
|
@@ -9960,7 +9960,7 @@ const Kf = v.forwardRef(({ className: e, children: t, ...n }, r) => {
|
|
|
9960
9960
|
!o && /* @__PURE__ */ u.jsx(Rr, { className: "sr-only", children: "Dialog" }),
|
|
9961
9961
|
t,
|
|
9962
9962
|
/* @__PURE__ */ u.jsxs(Wf, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
9963
|
-
/* @__PURE__ */ u.jsx(
|
|
9963
|
+
/* @__PURE__ */ u.jsx(Vr, { className: "h-4 w-4" }),
|
|
9964
9964
|
/* @__PURE__ */ u.jsx("span", { className: "sr-only", children: "Close" })
|
|
9965
9965
|
] })
|
|
9966
9966
|
]
|
|
@@ -10042,7 +10042,7 @@ function y0({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
10042
10042
|
] }) : c ? /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [
|
|
10043
10043
|
/* @__PURE__ */ u.jsx("div", { className: "text-red-500 mb-4", children: "⚠️" }),
|
|
10044
10044
|
/* @__PURE__ */ u.jsx("p", { className: "text-red-600 mb-4", children: c }),
|
|
10045
|
-
/* @__PURE__ */ u.jsx(
|
|
10045
|
+
/* @__PURE__ */ u.jsx(mt, { onClick: h, variant: "outline", children: "Try Again" })
|
|
10046
10046
|
] }) : a ? o.startsWith("image/") ? /* @__PURE__ */ u.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ u.jsx(
|
|
10047
10047
|
"img",
|
|
10048
10048
|
{
|
|
@@ -10082,7 +10082,7 @@ function y0({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
10082
10082
|
] }),
|
|
10083
10083
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10084
10084
|
/* @__PURE__ */ u.jsxs(
|
|
10085
|
-
|
|
10085
|
+
mt,
|
|
10086
10086
|
{
|
|
10087
10087
|
variant: "outline",
|
|
10088
10088
|
size: "sm",
|
|
@@ -10095,7 +10095,7 @@ function y0({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
10095
10095
|
}
|
|
10096
10096
|
),
|
|
10097
10097
|
/* @__PURE__ */ u.jsxs(
|
|
10098
|
-
|
|
10098
|
+
mt,
|
|
10099
10099
|
{
|
|
10100
10100
|
variant: "outline",
|
|
10101
10101
|
size: "sm",
|
|
@@ -11744,7 +11744,7 @@ function fs(e) {
|
|
|
11744
11744
|
function F0(e) {
|
|
11745
11745
|
const t = (o) => {
|
|
11746
11746
|
try {
|
|
11747
|
-
const s =
|
|
11747
|
+
const s = Po(o);
|
|
11748
11748
|
return typeof s == "string" ? s : JSON.stringify(s ?? "");
|
|
11749
11749
|
} catch {
|
|
11750
11750
|
return "";
|
|
@@ -11994,7 +11994,7 @@ const Tu = V.memo(function({
|
|
|
11994
11994
|
} finally {
|
|
11995
11995
|
T == null || T();
|
|
11996
11996
|
}
|
|
11997
|
-
}, [w, T, b, W]),
|
|
11997
|
+
}, [w, T, b, W]), xt = V.useCallback(({ part: q, i: Te }) => {
|
|
11998
11998
|
if (q.type === "text") {
|
|
11999
11999
|
const ye = q.text ?? "", ot = ye.trim(), ht = bl(ot);
|
|
12000
12000
|
return ht && L !== "tool" ? /* @__PURE__ */ u.jsx(rh, { data: ht }, Te) : L === "user" && c && ot.length > d ? /* @__PURE__ */ u.jsx(
|
|
@@ -12093,7 +12093,7 @@ const Tu = V.memo(function({
|
|
|
12093
12093
|
t.id
|
|
12094
12094
|
);
|
|
12095
12095
|
if (!ee && !te) {
|
|
12096
|
-
const Te = t, ye = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: Te.content.map((ot, ht) => /* @__PURE__ */ u.jsx(
|
|
12096
|
+
const Te = t, ye = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: Te.content.map((ot, ht) => /* @__PURE__ */ u.jsx(xt, { part: ot, i: ht }, ht)) });
|
|
12097
12097
|
return r ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
|
|
12098
12098
|
ye,
|
|
12099
12099
|
/* @__PURE__ */ u.jsx(z0, { className: X })
|
|
@@ -12242,7 +12242,7 @@ const Tu = V.memo(function({
|
|
|
12242
12242
|
),
|
|
12243
12243
|
children: [
|
|
12244
12244
|
/* @__PURE__ */ u.jsx("div", { className: "relative", children: /* @__PURE__ */ u.jsx(
|
|
12245
|
-
|
|
12245
|
+
mt,
|
|
12246
12246
|
{
|
|
12247
12247
|
variant: "ghost",
|
|
12248
12248
|
size: "sm",
|
|
@@ -12254,7 +12254,7 @@ const Tu = V.memo(function({
|
|
|
12254
12254
|
}
|
|
12255
12255
|
) }),
|
|
12256
12256
|
L === "user" && p && /* @__PURE__ */ u.jsx(
|
|
12257
|
-
|
|
12257
|
+
mt,
|
|
12258
12258
|
{
|
|
12259
12259
|
variant: "ghost",
|
|
12260
12260
|
size: "sm",
|
|
@@ -12265,7 +12265,7 @@ const Tu = V.memo(function({
|
|
|
12265
12265
|
}
|
|
12266
12266
|
),
|
|
12267
12267
|
L === "assistant" && g && /* @__PURE__ */ u.jsx(
|
|
12268
|
-
|
|
12268
|
+
mt,
|
|
12269
12269
|
{
|
|
12270
12270
|
variant: "ghost",
|
|
12271
12271
|
size: "sm",
|
|
@@ -12303,7 +12303,7 @@ const Tu = V.memo(function({
|
|
|
12303
12303
|
),
|
|
12304
12304
|
children: [
|
|
12305
12305
|
/* @__PURE__ */ u.jsx(
|
|
12306
|
-
|
|
12306
|
+
mt,
|
|
12307
12307
|
{
|
|
12308
12308
|
variant: "ghost",
|
|
12309
12309
|
size: "sm",
|
|
@@ -12313,7 +12313,7 @@ const Tu = V.memo(function({
|
|
|
12313
12313
|
}
|
|
12314
12314
|
),
|
|
12315
12315
|
L === "user" && p && /* @__PURE__ */ u.jsx(
|
|
12316
|
-
|
|
12316
|
+
mt,
|
|
12317
12317
|
{
|
|
12318
12318
|
variant: "ghost",
|
|
12319
12319
|
size: "sm",
|
|
@@ -12323,7 +12323,7 @@ const Tu = V.memo(function({
|
|
|
12323
12323
|
}
|
|
12324
12324
|
),
|
|
12325
12325
|
L === "assistant" && g && /* @__PURE__ */ u.jsx(
|
|
12326
|
-
|
|
12326
|
+
mt,
|
|
12327
12327
|
{
|
|
12328
12328
|
variant: "ghost",
|
|
12329
12329
|
size: "sm",
|
|
@@ -12363,7 +12363,7 @@ const Tu = V.memo(function({
|
|
|
12363
12363
|
return o && s;
|
|
12364
12364
|
});
|
|
12365
12365
|
function rh({ data: e }) {
|
|
12366
|
-
return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: D0, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children:
|
|
12366
|
+
return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: D0, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Oo(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Oo(e) });
|
|
12367
12367
|
}
|
|
12368
12368
|
function B0({
|
|
12369
12369
|
interruptPart: e,
|
|
@@ -12379,26 +12379,26 @@ function B0({
|
|
|
12379
12379
|
if (typeof s == "string")
|
|
12380
12380
|
a = /* @__PURE__ */ u.jsx("p", { className: "text-sm leading-relaxed text-blue-800/90 dark:text-blue-200/90 whitespace-pre-wrap", children: s });
|
|
12381
12381
|
else {
|
|
12382
|
-
const c =
|
|
12382
|
+
const c = Oo(s);
|
|
12383
12383
|
a = /* @__PURE__ */ u.jsx("pre", { className: "max-h-48 overflow-auto rounded bg-blue-100/60 p-2 text-xs text-blue-900/90 dark:bg-blue-900/40 dark:text-blue-100/80", children: c });
|
|
12384
12384
|
}
|
|
12385
12385
|
const l = o ? "Please approve or reject this action to resume the workflow." : "Waiting for approval from another participant.";
|
|
12386
12386
|
return /* @__PURE__ */ u.jsxs(
|
|
12387
|
-
|
|
12387
|
+
Co,
|
|
12388
12388
|
{
|
|
12389
12389
|
className: se(
|
|
12390
12390
|
"border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-950/10 transition-shadow",
|
|
12391
12391
|
o ? "shadow-md ring-1 ring-blue-300 dark:ring-blue-500/70" : "opacity-80"
|
|
12392
12392
|
),
|
|
12393
12393
|
children: [
|
|
12394
|
-
/* @__PURE__ */ u.jsxs(
|
|
12395
|
-
/* @__PURE__ */ u.jsx(
|
|
12394
|
+
/* @__PURE__ */ u.jsxs(To, { className: "pb-3", children: [
|
|
12395
|
+
/* @__PURE__ */ u.jsx(ko, { className: "text-blue-900 dark:text-blue-100 text-base", children: i }),
|
|
12396
12396
|
/* @__PURE__ */ u.jsx(uf, { className: "text-blue-700 dark:text-blue-300 text-sm", children: l })
|
|
12397
12397
|
] }),
|
|
12398
|
-
a && /* @__PURE__ */ u.jsx(
|
|
12398
|
+
a && /* @__PURE__ */ u.jsx(Ro, { className: "pt-0 pb-3", children: a }),
|
|
12399
12399
|
/* @__PURE__ */ u.jsx(df, { className: "pt-0", children: /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2 ml-auto", children: [
|
|
12400
12400
|
/* @__PURE__ */ u.jsx(
|
|
12401
|
-
|
|
12401
|
+
mt,
|
|
12402
12402
|
{
|
|
12403
12403
|
size: "sm",
|
|
12404
12404
|
variant: "outline",
|
|
@@ -12409,7 +12409,7 @@ function B0({
|
|
|
12409
12409
|
}
|
|
12410
12410
|
),
|
|
12411
12411
|
/* @__PURE__ */ u.jsx(
|
|
12412
|
-
|
|
12412
|
+
mt,
|
|
12413
12413
|
{
|
|
12414
12414
|
size: "sm",
|
|
12415
12415
|
onClick: () => t(e),
|
|
@@ -12518,7 +12518,7 @@ function U0({
|
|
|
12518
12518
|
}
|
|
12519
12519
|
) }),
|
|
12520
12520
|
/* @__PURE__ */ u.jsx(
|
|
12521
|
-
|
|
12521
|
+
mt,
|
|
12522
12522
|
{
|
|
12523
12523
|
type: "button",
|
|
12524
12524
|
variant: "ghost",
|
|
@@ -12546,7 +12546,7 @@ function W0({ message: e, viewMode: t }) {
|
|
|
12546
12546
|
return /* @__PURE__ */ u.jsx(rh, { data: d });
|
|
12547
12547
|
const f = typeof d == "string" ? d : (() => {
|
|
12548
12548
|
try {
|
|
12549
|
-
return
|
|
12549
|
+
return Oo(d);
|
|
12550
12550
|
} catch {
|
|
12551
12551
|
return String(d ?? "");
|
|
12552
12552
|
}
|
|
@@ -12576,7 +12576,7 @@ function W0({ message: e, viewMode: t }) {
|
|
|
12576
12576
|
const f = Fs(d);
|
|
12577
12577
|
return s(f);
|
|
12578
12578
|
}
|
|
12579
|
-
const a =
|
|
12579
|
+
const a = Po(i), l = Fs(a);
|
|
12580
12580
|
return s(l);
|
|
12581
12581
|
}
|
|
12582
12582
|
const ku = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, V0 = (e) => {
|
|
@@ -12770,8 +12770,8 @@ const ku = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, V0 = (e) =>
|
|
|
12770
12770
|
et = Je.additionalKwargs ?? {}, nt = Je.responseMetadata ?? {};
|
|
12771
12771
|
const dt = Xe && k ? k.get(Xe) ?? null : null;
|
|
12772
12772
|
ct = typeof et.step == "number" ? et.step : typeof nt.step == "number" ? nt.step : (dt == null ? void 0 : dt.step) ?? null;
|
|
12773
|
-
const
|
|
12774
|
-
ke =
|
|
12773
|
+
const xt = typeof et.source == "string" ? et.source : typeof nt.source == "string" ? nt.source : (dt == null ? void 0 : dt.source) ?? null;
|
|
12774
|
+
ke = xt ? String(xt) : null;
|
|
12775
12775
|
const Rt = ct !== null && ke ? `${ct}:${ke}` : null;
|
|
12776
12776
|
Rt && (_ != null && _.has(Rt)) ? De = _.get(Rt) ?? [] : Xe && dt && (De = [dt]), Ge = Xe ?? ((ut = De[0]) == null ? void 0 : ut.id) ?? null;
|
|
12777
12777
|
}
|
|
@@ -12873,14 +12873,14 @@ function Al(e) {
|
|
|
12873
12873
|
return /* @__PURE__ */ u.jsx(o, { scope: y, itemMap: b, collectionRef: w, children: m });
|
|
12874
12874
|
};
|
|
12875
12875
|
i.displayName = t;
|
|
12876
|
-
const a = e + "CollectionSlot", l =
|
|
12876
|
+
const a = e + "CollectionSlot", l = Xr(a), c = V.forwardRef(
|
|
12877
12877
|
(x, y) => {
|
|
12878
12878
|
const { scope: m, children: w } = x, b = s(a, m), T = Qe(y, b.collectionRef);
|
|
12879
12879
|
return /* @__PURE__ */ u.jsx(l, { ref: T, children: w });
|
|
12880
12880
|
}
|
|
12881
12881
|
);
|
|
12882
12882
|
c.displayName = a;
|
|
12883
|
-
const d = e + "CollectionItemSlot", f = "data-radix-collection-item", h =
|
|
12883
|
+
const d = e + "CollectionItemSlot", f = "data-radix-collection-item", h = Xr(d), p = V.forwardRef(
|
|
12884
12884
|
(x, y) => {
|
|
12885
12885
|
const { scope: m, children: w, ...b } = x, T = V.useRef(null), C = Qe(y, T), S = s(d, m);
|
|
12886
12886
|
return V.useEffect(() => (S.itemMap.set(T, { ref: T, ...b }), () => void S.itemMap.delete(T))), /* @__PURE__ */ u.jsx(h, { [f]: "", ref: C, children: w });
|
|
@@ -12930,7 +12930,7 @@ function er(e, t) {
|
|
|
12930
12930
|
function tr(e) {
|
|
12931
12931
|
return e.split("-")[0];
|
|
12932
12932
|
}
|
|
12933
|
-
function
|
|
12933
|
+
function so(e) {
|
|
12934
12934
|
return e.split("-")[1];
|
|
12935
12935
|
}
|
|
12936
12936
|
function _l(e) {
|
|
@@ -12948,7 +12948,7 @@ function Pl(e) {
|
|
|
12948
12948
|
}
|
|
12949
12949
|
function eS(e, t, n) {
|
|
12950
12950
|
n === void 0 && (n = !1);
|
|
12951
|
-
const r =
|
|
12951
|
+
const r = so(e), o = Pl(e), s = jl(o);
|
|
12952
12952
|
let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
12953
12953
|
return t.reference[s] > t.floating[s] && (i = Ws(i)), [i, Ws(i)];
|
|
12954
12954
|
}
|
|
@@ -12973,7 +12973,7 @@ function oS(e, t, n) {
|
|
|
12973
12973
|
}
|
|
12974
12974
|
}
|
|
12975
12975
|
function sS(e, t, n, r) {
|
|
12976
|
-
const o =
|
|
12976
|
+
const o = so(e);
|
|
12977
12977
|
let s = oS(tr(e), n === "start", r);
|
|
12978
12978
|
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(La)))), s;
|
|
12979
12979
|
}
|
|
@@ -13053,7 +13053,7 @@ function Iu(e, t, n) {
|
|
|
13053
13053
|
y: r.y
|
|
13054
13054
|
};
|
|
13055
13055
|
}
|
|
13056
|
-
switch (
|
|
13056
|
+
switch (so(t)) {
|
|
13057
13057
|
case "start":
|
|
13058
13058
|
p[i] -= h * (n && c ? -1 : 1);
|
|
13059
13059
|
break;
|
|
@@ -13124,7 +13124,7 @@ const aS = async (e, t, n) => {
|
|
|
13124
13124
|
middlewareData: p
|
|
13125
13125
|
};
|
|
13126
13126
|
};
|
|
13127
|
-
async function
|
|
13127
|
+
async function Mo(e, t) {
|
|
13128
13128
|
var n;
|
|
13129
13129
|
t === void 0 && (t = {});
|
|
13130
13130
|
const {
|
|
@@ -13193,7 +13193,7 @@ const lS = (e) => ({
|
|
|
13193
13193
|
}, p = Pl(o), g = jl(p), x = await i.getDimensions(c), y = p === "y", m = y ? "top" : "left", w = y ? "bottom" : "right", b = y ? "clientHeight" : "clientWidth", T = s.reference[g] + s.reference[p] - h[p] - s.floating[g], C = h[p] - s.reference[p], S = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
|
|
13194
13194
|
let k = S ? S[b] : 0;
|
|
13195
13195
|
(!k || !await (i.isElement == null ? void 0 : i.isElement(S))) && (k = a.floating[b] || s.floating[g]);
|
|
13196
|
-
const _ = T / 2 - C / 2, N = k / 2 - x[g] / 2 - 1, A = fr(f[m], N), M = fr(f[w], N), $ = A, U = k - x[g] - M, P = k / 2 - x[g] / 2 + _, B = Da($, P, U), j = !l.arrow &&
|
|
13196
|
+
const _ = T / 2 - C / 2, N = k / 2 - x[g] / 2 - 1, A = fr(f[m], N), M = fr(f[w], N), $ = A, U = k - x[g] - M, P = k / 2 - x[g] / 2 + _, B = Da($, P, U), j = !l.arrow && so(o) != null && P !== B && s.reference[g] / 2 - (P < $ ? A : M) - x[g] / 2 < 0, W = j ? P < $ ? P - $ : P - U : 0;
|
|
13197
13197
|
return {
|
|
13198
13198
|
[p]: h[p] + W,
|
|
13199
13199
|
data: {
|
|
@@ -13232,7 +13232,7 @@ const lS = (e) => ({
|
|
|
13232
13232
|
return {};
|
|
13233
13233
|
const m = tr(o), w = Wn(a), b = tr(a) === a, T = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), C = h || (b || !x ? [Ws(a)] : tS(a)), S = g !== "none";
|
|
13234
13234
|
!h && S && C.push(...sS(a, x, g, T));
|
|
13235
|
-
const k = [a, ...C], _ = await
|
|
13235
|
+
const k = [a, ...C], _ = await Mo(t, y), N = [];
|
|
13236
13236
|
let A = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
13237
13237
|
if (d && N.push(_[m]), f) {
|
|
13238
13238
|
const P = eS(o, i, T);
|
|
@@ -13312,7 +13312,7 @@ const uS = function(e) {
|
|
|
13312
13312
|
} = er(e, t);
|
|
13313
13313
|
switch (r) {
|
|
13314
13314
|
case "referenceHidden": {
|
|
13315
|
-
const s = await
|
|
13315
|
+
const s = await Mo(t, {
|
|
13316
13316
|
...o,
|
|
13317
13317
|
elementContext: "reference"
|
|
13318
13318
|
}), i = Nu(s, n.reference);
|
|
@@ -13324,7 +13324,7 @@ const uS = function(e) {
|
|
|
13324
13324
|
};
|
|
13325
13325
|
}
|
|
13326
13326
|
case "escaped": {
|
|
13327
|
-
const s = await
|
|
13327
|
+
const s = await Mo(t, {
|
|
13328
13328
|
...o,
|
|
13329
13329
|
altBoundary: !0
|
|
13330
13330
|
}), i = Nu(s, n.floating);
|
|
@@ -13346,7 +13346,7 @@ async function dS(e, t) {
|
|
|
13346
13346
|
placement: n,
|
|
13347
13347
|
platform: r,
|
|
13348
13348
|
elements: o
|
|
13349
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = tr(n), a =
|
|
13349
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = tr(n), a = so(n), l = Wn(n) === "y", c = ih.has(i) ? -1 : 1, d = s && l ? -1 : 1, f = er(t, e);
|
|
13350
13350
|
let {
|
|
13351
13351
|
mainAxis: h,
|
|
13352
13352
|
crossAxis: p,
|
|
@@ -13418,7 +13418,7 @@ const fS = function(e) {
|
|
|
13418
13418
|
} = er(e, t), c = {
|
|
13419
13419
|
x: n,
|
|
13420
13420
|
y: r
|
|
13421
|
-
}, d = await
|
|
13421
|
+
}, d = await Mo(t, l), f = Wn(tr(o)), h = _l(f);
|
|
13422
13422
|
let p = c[h], g = c[f];
|
|
13423
13423
|
if (s) {
|
|
13424
13424
|
const y = h === "y" ? "top" : "left", m = h === "y" ? "bottom" : "right", w = p + d[y], b = p - d[m];
|
|
@@ -13503,7 +13503,7 @@ const fS = function(e) {
|
|
|
13503
13503
|
apply: l = () => {
|
|
13504
13504
|
},
|
|
13505
13505
|
...c
|
|
13506
|
-
} = er(e, t), d = await
|
|
13506
|
+
} = er(e, t), d = await Mo(t, c), f = tr(o), h = so(o), p = Wn(o) === "y", {
|
|
13507
13507
|
width: g,
|
|
13508
13508
|
height: x
|
|
13509
13509
|
} = s.floating;
|
|
@@ -13532,7 +13532,7 @@ const fS = function(e) {
|
|
|
13532
13532
|
function Ci() {
|
|
13533
13533
|
return typeof window < "u";
|
|
13534
13534
|
}
|
|
13535
|
-
function
|
|
13535
|
+
function io(e) {
|
|
13536
13536
|
return ah(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
13537
13537
|
}
|
|
13538
13538
|
function yn(e) {
|
|
@@ -13556,7 +13556,7 @@ function _u(e) {
|
|
|
13556
13556
|
return !Ci() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof yn(e).ShadowRoot;
|
|
13557
13557
|
}
|
|
13558
13558
|
const gS = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
13559
|
-
function
|
|
13559
|
+
function qo(e) {
|
|
13560
13560
|
const {
|
|
13561
13561
|
overflow: t,
|
|
13562
13562
|
overflowX: n,
|
|
@@ -13567,7 +13567,7 @@ function Go(e) {
|
|
|
13567
13567
|
}
|
|
13568
13568
|
const xS = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
13569
13569
|
function yS(e) {
|
|
13570
|
-
return xS.has(
|
|
13570
|
+
return xS.has(io(e));
|
|
13571
13571
|
}
|
|
13572
13572
|
const vS = [":popover-open", ":modal"];
|
|
13573
13573
|
function Ti(e) {
|
|
@@ -13586,7 +13586,7 @@ function Ol(e) {
|
|
|
13586
13586
|
}
|
|
13587
13587
|
function CS(e) {
|
|
13588
13588
|
let t = hr(e);
|
|
13589
|
-
for (; Kn(t) && !
|
|
13589
|
+
for (; Kn(t) && !Qr(t); ) {
|
|
13590
13590
|
if (Ol(t))
|
|
13591
13591
|
return t;
|
|
13592
13592
|
if (Ti(t))
|
|
@@ -13599,8 +13599,8 @@ function Ml() {
|
|
|
13599
13599
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
13600
13600
|
}
|
|
13601
13601
|
const TS = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
13602
|
-
function
|
|
13603
|
-
return TS.has(
|
|
13602
|
+
function Qr(e) {
|
|
13603
|
+
return TS.has(io(e));
|
|
13604
13604
|
}
|
|
13605
13605
|
function On(e) {
|
|
13606
13606
|
return yn(e).getComputedStyle(e);
|
|
@@ -13615,7 +13615,7 @@ function ki(e) {
|
|
|
13615
13615
|
};
|
|
13616
13616
|
}
|
|
13617
13617
|
function hr(e) {
|
|
13618
|
-
if (
|
|
13618
|
+
if (io(e) === "html")
|
|
13619
13619
|
return e;
|
|
13620
13620
|
const t = (
|
|
13621
13621
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
@@ -13628,17 +13628,17 @@ function hr(e) {
|
|
|
13628
13628
|
}
|
|
13629
13629
|
function lh(e) {
|
|
13630
13630
|
const t = hr(e);
|
|
13631
|
-
return
|
|
13631
|
+
return Qr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Kn(t) && qo(t) ? t : lh(t);
|
|
13632
13632
|
}
|
|
13633
|
-
function
|
|
13633
|
+
function Do(e, t, n) {
|
|
13634
13634
|
var r;
|
|
13635
13635
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
13636
13636
|
const o = lh(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = yn(o);
|
|
13637
13637
|
if (s) {
|
|
13638
13638
|
const a = Fa(i);
|
|
13639
|
-
return t.concat(i, i.visualViewport || [],
|
|
13639
|
+
return t.concat(i, i.visualViewport || [], qo(o) ? o : [], a && n ? Do(a) : []);
|
|
13640
13640
|
}
|
|
13641
|
-
return t.concat(o,
|
|
13641
|
+
return t.concat(o, Do(o, [], n));
|
|
13642
13642
|
}
|
|
13643
13643
|
function Fa(e) {
|
|
13644
13644
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
@@ -13656,7 +13656,7 @@ function ch(e) {
|
|
|
13656
13656
|
function Dl(e) {
|
|
13657
13657
|
return Pn(e) ? e : e.contextElement;
|
|
13658
13658
|
}
|
|
13659
|
-
function
|
|
13659
|
+
function Gr(e) {
|
|
13660
13660
|
const t = Dl(e);
|
|
13661
13661
|
if (!Kn(t))
|
|
13662
13662
|
return Vn(1);
|
|
@@ -13686,14 +13686,14 @@ function jr(e, t, n, r) {
|
|
|
13686
13686
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
13687
13687
|
const o = e.getBoundingClientRect(), s = Dl(e);
|
|
13688
13688
|
let i = Vn(1);
|
|
13689
|
-
t && (r ? Pn(r) && (i =
|
|
13689
|
+
t && (r ? Pn(r) && (i = Gr(r)) : i = Gr(e));
|
|
13690
13690
|
const a = RS(s, n, r) ? uh(s) : Vn(0);
|
|
13691
13691
|
let l = (o.left + a.x) / i.x, c = (o.top + a.y) / i.y, d = o.width / i.x, f = o.height / i.y;
|
|
13692
13692
|
if (s) {
|
|
13693
13693
|
const h = yn(s), p = r && Pn(r) ? yn(r) : r;
|
|
13694
13694
|
let g = h, x = Fa(g);
|
|
13695
13695
|
for (; x && r && p !== g; ) {
|
|
13696
|
-
const y =
|
|
13696
|
+
const y = Gr(x), m = x.getBoundingClientRect(), w = On(x), b = m.left + (x.clientLeft + parseFloat(w.paddingLeft)) * y.x, T = m.top + (x.clientTop + parseFloat(w.paddingTop)) * y.y;
|
|
13697
13697
|
l *= y.x, c *= y.y, d *= y.x, f *= y.y, l += b, c += T, g = yn(x), x = Fa(g);
|
|
13698
13698
|
}
|
|
13699
13699
|
}
|
|
@@ -13730,9 +13730,9 @@ function ES(e) {
|
|
|
13730
13730
|
scrollTop: 0
|
|
13731
13731
|
}, c = Vn(1);
|
|
13732
13732
|
const d = Vn(0), f = Kn(r);
|
|
13733
|
-
if ((f || !f && !s) && ((
|
|
13733
|
+
if ((f || !f && !s) && ((io(r) !== "body" || qo(i)) && (l = ki(r)), Kn(r))) {
|
|
13734
13734
|
const p = jr(r);
|
|
13735
|
-
c =
|
|
13735
|
+
c = Gr(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
|
|
13736
13736
|
}
|
|
13737
13737
|
const h = i && !f && !s ? dh(i, l) : Vn(0);
|
|
13738
13738
|
return {
|
|
@@ -13779,7 +13779,7 @@ function AS(e, t) {
|
|
|
13779
13779
|
}
|
|
13780
13780
|
const _S = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
13781
13781
|
function jS(e, t) {
|
|
13782
|
-
const n = jr(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Kn(e) ?
|
|
13782
|
+
const n = jr(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Kn(e) ? Gr(e) : Vn(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, c = r * s.y;
|
|
13783
13783
|
return {
|
|
13784
13784
|
width: i,
|
|
13785
13785
|
height: a,
|
|
@@ -13808,18 +13808,18 @@ function Pu(e, t, n) {
|
|
|
13808
13808
|
}
|
|
13809
13809
|
function fh(e, t) {
|
|
13810
13810
|
const n = hr(e);
|
|
13811
|
-
return n === t || !Pn(n) ||
|
|
13811
|
+
return n === t || !Pn(n) || Qr(n) ? !1 : On(n).position === "fixed" || fh(n, t);
|
|
13812
13812
|
}
|
|
13813
13813
|
function PS(e, t) {
|
|
13814
13814
|
const n = t.get(e);
|
|
13815
13815
|
if (n)
|
|
13816
13816
|
return n;
|
|
13817
|
-
let r =
|
|
13817
|
+
let r = Do(e, [], !1).filter((a) => Pn(a) && io(a) !== "body"), o = null;
|
|
13818
13818
|
const s = On(e).position === "fixed";
|
|
13819
13819
|
let i = s ? hr(e) : e;
|
|
13820
|
-
for (; Pn(i) && !
|
|
13820
|
+
for (; Pn(i) && !Qr(i); ) {
|
|
13821
13821
|
const a = On(i), l = Ol(i);
|
|
13822
|
-
!l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && _S.has(o.position) ||
|
|
13822
|
+
!l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && _S.has(o.position) || qo(i) && !l && fh(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = hr(i);
|
|
13823
13823
|
}
|
|
13824
13824
|
return t.set(e, r), r;
|
|
13825
13825
|
}
|
|
@@ -13862,7 +13862,7 @@ function DS(e, t, n) {
|
|
|
13862
13862
|
l.x = Ri(o);
|
|
13863
13863
|
}
|
|
13864
13864
|
if (r || !r && !s)
|
|
13865
|
-
if ((
|
|
13865
|
+
if ((io(t) !== "body" || qo(o)) && (a = ki(t)), r) {
|
|
13866
13866
|
const p = jr(t, !0, s, t);
|
|
13867
13867
|
l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
|
|
13868
13868
|
} else o && c();
|
|
@@ -13892,7 +13892,7 @@ function hh(e, t) {
|
|
|
13892
13892
|
return n;
|
|
13893
13893
|
if (!Kn(e)) {
|
|
13894
13894
|
let o = hr(e);
|
|
13895
|
-
for (; o && !
|
|
13895
|
+
for (; o && !Qr(o); ) {
|
|
13896
13896
|
if (Pn(o) && !da(o))
|
|
13897
13897
|
return o;
|
|
13898
13898
|
o = hr(o);
|
|
@@ -13902,7 +13902,7 @@ function hh(e, t) {
|
|
|
13902
13902
|
let r = Ou(e, t);
|
|
13903
13903
|
for (; r && yS(r) && da(r); )
|
|
13904
13904
|
r = Ou(r, t);
|
|
13905
|
-
return r &&
|
|
13905
|
+
return r && Qr(r) && da(r) && !Ol(r) ? n : r || CS(e) || n;
|
|
13906
13906
|
}
|
|
13907
13907
|
const LS = async function(e) {
|
|
13908
13908
|
const t = this.getOffsetParent || hh, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -13927,7 +13927,7 @@ const $S = {
|
|
|
13927
13927
|
getElementRects: LS,
|
|
13928
13928
|
getClientRects: IS,
|
|
13929
13929
|
getDimensions: MS,
|
|
13930
|
-
getScale:
|
|
13930
|
+
getScale: Gr,
|
|
13931
13931
|
isElement: Pn,
|
|
13932
13932
|
isRTL: FS
|
|
13933
13933
|
};
|
|
@@ -13988,7 +13988,7 @@ function BS(e, t, n, r) {
|
|
|
13988
13988
|
elementResize: i = typeof ResizeObserver == "function",
|
|
13989
13989
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
13990
13990
|
animationFrame: l = !1
|
|
13991
|
-
} = r, c = Dl(e), d = o || s ? [...c ?
|
|
13991
|
+
} = r, c = Dl(e), d = o || s ? [...c ? Do(c) : [], ...Do(t)] : [];
|
|
13992
13992
|
d.forEach((m) => {
|
|
13993
13993
|
o && m.addEventListener("scroll", n, {
|
|
13994
13994
|
passive: !0
|
|
@@ -14456,13 +14456,13 @@ function Rh(e) {
|
|
|
14456
14456
|
const [t, n = "center"] = e.split("-");
|
|
14457
14457
|
return [t, n];
|
|
14458
14458
|
}
|
|
14459
|
-
var Eh = wh, Ih = Sh, Nh = Ch, Ah = kh, ha = "rovingFocusGroup.onEntryFocus", pC = { bubbles: !1, cancelable: !0 },
|
|
14460
|
-
|
|
14459
|
+
var Eh = wh, Ih = Sh, Nh = Ch, Ah = kh, ha = "rovingFocusGroup.onEntryFocus", pC = { bubbles: !1, cancelable: !0 }, Go = "RovingFocusGroup", [$a, _h, mC] = Al(Go), [gC, jh] = nr(
|
|
14460
|
+
Go,
|
|
14461
14461
|
[mC]
|
|
14462
|
-
), [xC, yC] = gC(
|
|
14462
|
+
), [xC, yC] = gC(Go), Ph = v.forwardRef(
|
|
14463
14463
|
(e, t) => /* @__PURE__ */ u.jsx($a.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx($a.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(vC, { ...e, ref: t }) }) })
|
|
14464
14464
|
);
|
|
14465
|
-
Ph.displayName =
|
|
14465
|
+
Ph.displayName = Go;
|
|
14466
14466
|
var vC = v.forwardRef((e, t) => {
|
|
14467
14467
|
const {
|
|
14468
14468
|
__scopeRovingFocusGroup: n,
|
|
@@ -14475,11 +14475,11 @@ var vC = v.forwardRef((e, t) => {
|
|
|
14475
14475
|
onEntryFocus: c,
|
|
14476
14476
|
preventScrollOnEntryFocus: d = !1,
|
|
14477
14477
|
...f
|
|
14478
|
-
} = e, h = v.useRef(null), p = Qe(t, h), g = Si(s), [x, y] =
|
|
14478
|
+
} = e, h = v.useRef(null), p = Qe(t, h), g = Si(s), [x, y] = Zr({
|
|
14479
14479
|
prop: i,
|
|
14480
14480
|
defaultProp: a ?? null,
|
|
14481
14481
|
onChange: l,
|
|
14482
|
-
caller:
|
|
14482
|
+
caller: Go
|
|
14483
14483
|
}), [m, w] = v.useState(!1), b = Jt(c), T = _h(n), C = v.useRef(!1), [S, k] = v.useState(0);
|
|
14484
14484
|
return v.useEffect(() => {
|
|
14485
14485
|
const _ = h.current;
|
|
@@ -14626,11 +14626,11 @@ var TC = Ph, kC = Mh, za = ["Enter", " "], RC = ["ArrowDown", "PageUp", "Home"],
|
|
|
14626
14626
|
}, NC = {
|
|
14627
14627
|
ltr: ["ArrowLeft"],
|
|
14628
14628
|
rtl: ["ArrowRight"]
|
|
14629
|
-
},
|
|
14629
|
+
}, Yo = "Menu", [Lo, AC, _C] = Al(Yo), [Fr, Fh] = nr(Yo, [
|
|
14630
14630
|
_C,
|
|
14631
14631
|
Ei,
|
|
14632
14632
|
jh
|
|
14633
|
-
]), Ii = Ei(), $h = jh(), [jC, $r] = Fr(
|
|
14633
|
+
]), Ii = Ei(), $h = jh(), [jC, $r] = Fr(Yo), [PC, Xo] = Fr(Yo), zh = (e) => {
|
|
14634
14634
|
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Ii(t), [l, c] = v.useState(null), d = v.useRef(!1), f = Jt(s), h = Si(o);
|
|
14635
14635
|
return v.useEffect(() => {
|
|
14636
14636
|
const p = () => {
|
|
@@ -14661,7 +14661,7 @@ var TC = Ph, kC = Mh, za = ["Enter", " "], RC = ["ArrowDown", "PageUp", "Home"],
|
|
|
14661
14661
|
}
|
|
14662
14662
|
) });
|
|
14663
14663
|
};
|
|
14664
|
-
zh.displayName =
|
|
14664
|
+
zh.displayName = Yo;
|
|
14665
14665
|
var OC = "MenuAnchor", $l = v.forwardRef(
|
|
14666
14666
|
(e, t) => {
|
|
14667
14667
|
const { __scopeMenu: n, ...r } = e, o = Ii(n);
|
|
@@ -14678,8 +14678,8 @@ var zl = "MenuPortal", [MC, Bh] = Fr(zl, {
|
|
|
14678
14678
|
Hh.displayName = zl;
|
|
14679
14679
|
var Tn = "MenuContent", [DC, Bl] = Fr(Tn), Uh = v.forwardRef(
|
|
14680
14680
|
(e, t) => {
|
|
14681
|
-
const n = Bh(Tn, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = $r(Tn, e.__scopeMenu), i =
|
|
14682
|
-
return /* @__PURE__ */ u.jsx(
|
|
14681
|
+
const n = Bh(Tn, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = $r(Tn, e.__scopeMenu), i = Xo(Tn, e.__scopeMenu);
|
|
14682
|
+
return /* @__PURE__ */ u.jsx(Lo.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(Rn, { present: r || s.open, children: /* @__PURE__ */ u.jsx(Lo.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ u.jsx(LC, { ...o, ref: t }) : /* @__PURE__ */ u.jsx(FC, { ...o, ref: t }) }) }) });
|
|
14683
14683
|
}
|
|
14684
14684
|
), LC = v.forwardRef(
|
|
14685
14685
|
(e, t) => {
|
|
@@ -14717,7 +14717,7 @@ var Tn = "MenuContent", [DC, Bl] = Fr(Tn), Uh = v.forwardRef(
|
|
|
14717
14717
|
onDismiss: () => n.onOpenChange(!1)
|
|
14718
14718
|
}
|
|
14719
14719
|
);
|
|
14720
|
-
}), $C =
|
|
14720
|
+
}), $C = Xr("MenuContent.ScrollLock"), Hl = v.forwardRef(
|
|
14721
14721
|
(e, t) => {
|
|
14722
14722
|
const {
|
|
14723
14723
|
__scopeMenu: n,
|
|
@@ -14734,7 +14734,7 @@ var Tn = "MenuContent", [DC, Bl] = Fr(Tn), Uh = v.forwardRef(
|
|
|
14734
14734
|
onDismiss: p,
|
|
14735
14735
|
disableOutsideScroll: g,
|
|
14736
14736
|
...x
|
|
14737
|
-
} = e, y = $r(Tn, n), m =
|
|
14737
|
+
} = e, y = $r(Tn, n), m = Xo(Tn, n), w = Ii(n), b = $h(n), T = AC(n), [C, S] = v.useState(null), k = v.useRef(null), _ = Qe(t, k, y.onContentChange), N = v.useRef(0), A = v.useRef(""), M = v.useRef(0), $ = v.useRef(null), U = v.useRef("right"), P = v.useRef(0), B = g ? xi : v.Fragment, j = g ? { as: $C, allowPinchZoom: !0 } : void 0, W = (L) => {
|
|
14738
14738
|
var ne, D;
|
|
14739
14739
|
const ee = A.current + L, te = T().filter((X) => !X.disabled), ve = document.activeElement, Ne = (ne = te.find((X) => X.ref.current === ve)) == null ? void 0 : ne.textValue, Z = te.map((X) => X.textValue), de = JC(Z, ee, Ne), Ce = (D = te.find((X) => X.textValue === de)) == null ? void 0 : D.ref.current;
|
|
14740
14740
|
(function X(ie) {
|
|
@@ -14834,7 +14834,7 @@ var Tn = "MenuContent", [DC, Bl] = Fr(Tn), Uh = v.forwardRef(
|
|
|
14834
14834
|
}),
|
|
14835
14835
|
onPointerMove: xe(
|
|
14836
14836
|
e.onPointerMove,
|
|
14837
|
-
|
|
14837
|
+
Fo((L) => {
|
|
14838
14838
|
const ee = L.target, te = P.current !== L.clientX;
|
|
14839
14839
|
if (L.currentTarget.contains(ee) && te) {
|
|
14840
14840
|
const ve = L.clientX > P.current ? "right" : "left";
|
|
@@ -14871,7 +14871,7 @@ var BC = "MenuLabel", Wh = v.forwardRef(
|
|
|
14871
14871
|
Wh.displayName = BC;
|
|
14872
14872
|
var qs = "MenuItem", Lu = "menu.itemSelect", Ni = v.forwardRef(
|
|
14873
14873
|
(e, t) => {
|
|
14874
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, s = v.useRef(null), i =
|
|
14874
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = v.useRef(null), i = Xo(qs, e.__scopeMenu), a = Bl(qs, e.__scopeMenu), l = Qe(t, s), c = v.useRef(!1), d = () => {
|
|
14875
14875
|
const f = s.current;
|
|
14876
14876
|
if (!n && f) {
|
|
14877
14877
|
const h = new CustomEvent(Lu, { bubbles: !0, cancelable: !0 });
|
|
@@ -14909,7 +14909,7 @@ var Vh = v.forwardRef(
|
|
|
14909
14909
|
const g = l.current;
|
|
14910
14910
|
g && p((g.textContent ?? "").trim());
|
|
14911
14911
|
}, [s.children]), /* @__PURE__ */ u.jsx(
|
|
14912
|
-
|
|
14912
|
+
Lo.ItemSlot,
|
|
14913
14913
|
{
|
|
14914
14914
|
scope: n,
|
|
14915
14915
|
disabled: r,
|
|
@@ -14925,13 +14925,13 @@ var Vh = v.forwardRef(
|
|
|
14925
14925
|
ref: c,
|
|
14926
14926
|
onPointerMove: xe(
|
|
14927
14927
|
e.onPointerMove,
|
|
14928
|
-
|
|
14928
|
+
Fo((g) => {
|
|
14929
14929
|
r ? i.onItemLeave(g) : (i.onItemEnter(g), g.defaultPrevented || g.currentTarget.focus({ preventScroll: !0 }));
|
|
14930
14930
|
})
|
|
14931
14931
|
),
|
|
14932
14932
|
onPointerLeave: xe(
|
|
14933
14933
|
e.onPointerLeave,
|
|
14934
|
-
|
|
14934
|
+
Fo((g) => i.onItemLeave(g))
|
|
14935
14935
|
),
|
|
14936
14936
|
onFocus: xe(e.onFocus, () => f(!0)),
|
|
14937
14937
|
onBlur: xe(e.onBlur, () => f(!1))
|
|
@@ -15041,9 +15041,9 @@ var qC = "MenuArrow", ep = v.forwardRef(
|
|
|
15041
15041
|
}
|
|
15042
15042
|
);
|
|
15043
15043
|
ep.displayName = qC;
|
|
15044
|
-
var GC = "MenuSub", [IR, tp] = Fr(GC),
|
|
15044
|
+
var GC = "MenuSub", [IR, tp] = Fr(GC), yo = "MenuSubTrigger", np = v.forwardRef(
|
|
15045
15045
|
(e, t) => {
|
|
15046
|
-
const n = $r(
|
|
15046
|
+
const n = $r(yo, e.__scopeMenu), r = Xo(yo, e.__scopeMenu), o = tp(yo, e.__scopeMenu), s = Bl(yo, e.__scopeMenu), i = v.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, d = v.useCallback(() => {
|
|
15047
15047
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
15048
15048
|
}, []);
|
|
15049
15049
|
return v.useEffect(() => d, [d]), v.useEffect(() => {
|
|
@@ -15067,7 +15067,7 @@ var GC = "MenuSub", [IR, tp] = Fr(GC), vo = "MenuSubTrigger", np = v.forwardRef(
|
|
|
15067
15067
|
},
|
|
15068
15068
|
onPointerMove: xe(
|
|
15069
15069
|
e.onPointerMove,
|
|
15070
|
-
|
|
15070
|
+
Fo((f) => {
|
|
15071
15071
|
s.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
15072
15072
|
n.onOpenChange(!0), d();
|
|
15073
15073
|
}, 100));
|
|
@@ -15075,7 +15075,7 @@ var GC = "MenuSub", [IR, tp] = Fr(GC), vo = "MenuSubTrigger", np = v.forwardRef(
|
|
|
15075
15075
|
),
|
|
15076
15076
|
onPointerLeave: xe(
|
|
15077
15077
|
e.onPointerLeave,
|
|
15078
|
-
|
|
15078
|
+
Fo((f) => {
|
|
15079
15079
|
var p, g;
|
|
15080
15080
|
d();
|
|
15081
15081
|
const h = (p = n.content) == null ? void 0 : p.getBoundingClientRect();
|
|
@@ -15111,11 +15111,11 @@ var GC = "MenuSub", [IR, tp] = Fr(GC), vo = "MenuSubTrigger", np = v.forwardRef(
|
|
|
15111
15111
|
) });
|
|
15112
15112
|
}
|
|
15113
15113
|
);
|
|
15114
|
-
np.displayName =
|
|
15114
|
+
np.displayName = yo;
|
|
15115
15115
|
var rp = "MenuSubContent", op = v.forwardRef(
|
|
15116
15116
|
(e, t) => {
|
|
15117
|
-
const n = Bh(Tn, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = $r(Tn, e.__scopeMenu), i =
|
|
15118
|
-
return /* @__PURE__ */ u.jsx(
|
|
15117
|
+
const n = Bh(Tn, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = $r(Tn, e.__scopeMenu), i = Xo(Tn, e.__scopeMenu), a = tp(rp, e.__scopeMenu), l = v.useRef(null), c = Qe(t, l);
|
|
15118
|
+
return /* @__PURE__ */ u.jsx(Lo.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(Rn, { present: r || s.open, children: /* @__PURE__ */ u.jsx(Lo.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(
|
|
15119
15119
|
Hl,
|
|
15120
15120
|
{
|
|
15121
15121
|
id: a.contentId,
|
|
@@ -15188,7 +15188,7 @@ function QC(e, t) {
|
|
|
15188
15188
|
const n = { x: e.clientX, y: e.clientY };
|
|
15189
15189
|
return ZC(n, t);
|
|
15190
15190
|
}
|
|
15191
|
-
function
|
|
15191
|
+
function Fo(e) {
|
|
15192
15192
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
15193
15193
|
}
|
|
15194
15194
|
var eT = zh, tT = $l, nT = Hh, rT = Uh, oT = Ul, sT = Wh, iT = Ni, aT = Kh, lT = Gh, cT = Xh, uT = Zh, dT = Qh, fT = ep, hT = np, pT = op, Ai = "DropdownMenu", [mT, NR] = nr(
|
|
@@ -15203,7 +15203,7 @@ var eT = zh, tT = $l, nT = Hh, rT = Uh, oT = Ul, sT = Wh, iT = Ni, aT = Kh, lT =
|
|
|
15203
15203
|
defaultOpen: s,
|
|
15204
15204
|
onOpenChange: i,
|
|
15205
15205
|
modal: a = !0
|
|
15206
|
-
} = e, l = ln(t), c = v.useRef(null), [d, f] =
|
|
15206
|
+
} = e, l = ln(t), c = v.useRef(null), [d, f] = Zr({
|
|
15207
15207
|
prop: o,
|
|
15208
15208
|
defaultProp: s ?? !1,
|
|
15209
15209
|
onChange: i,
|
|
@@ -15519,7 +15519,7 @@ function pa({
|
|
|
15519
15519
|
Z(!0);
|
|
15520
15520
|
}, []), Ce = pe(() => {
|
|
15521
15521
|
Z(!1);
|
|
15522
|
-
}, []), ne = !!ve || Ne, [D, X] = we(null), [ie, ue] = we(""), [z, he] = we(null), [oe, Pe] = we(null), [De, Ge] = we([]), [et, nt] = we(0), [ct, ke] = we(0), [rt, ut] = we(!1), [Je, Xe] = we(null), [dt,
|
|
15522
|
+
}, []), ne = !!ve || Ne, [D, X] = we(null), [ie, ue] = we(""), [z, he] = we(null), [oe, Pe] = we(null), [De, Ge] = we([]), [et, nt] = we(0), [ct, ke] = we(0), [rt, ut] = we(!1), [Je, Xe] = we(null), [dt, xt] = we(null), [Rt, Bt] = we(!1), [jt, Ye] = we(null), [Mt, qt] = we(!1), Wt = Re(!1), [Gt, st] = we(() => Fu.value), Oe = Re(Gt), Pt = Re(null), Tt = pe((Y) => {
|
|
15523
15523
|
Fu.value = Y, st(Y);
|
|
15524
15524
|
}, []), [q, Te] = we(!1), ye = pe((Y) => {
|
|
15525
15525
|
if (!Array.isArray(Y))
|
|
@@ -15527,9 +15527,9 @@ function pa({
|
|
|
15527
15527
|
for (let fe = Y.length - 1; fe >= 0; fe--) {
|
|
15528
15528
|
const ce = Y[fe];
|
|
15529
15529
|
if (!ce || ce.role !== "user") continue;
|
|
15530
|
-
const
|
|
15530
|
+
const yt = (ce.content ?? []).filter((it) => (it == null ? void 0 : it.type) === "text").map((it) => it.text).filter((it) => typeof it == "string" && it.trim().length > 0);
|
|
15531
15531
|
return {
|
|
15532
|
-
text:
|
|
15532
|
+
text: yt.length ? yt.join(" ").trim() : null,
|
|
15533
15533
|
messageId: ce.id ?? null
|
|
15534
15534
|
};
|
|
15535
15535
|
}
|
|
@@ -15550,55 +15550,52 @@ function pa({
|
|
|
15550
15550
|
[]
|
|
15551
15551
|
), tt = at(() => {
|
|
15552
15552
|
const Y = Array.isArray(A) ? [...A] : [];
|
|
15553
|
-
return Y.some((ce) => ot(ce.metadata, "step") !== null) && Y.sort((ce,
|
|
15554
|
-
const Nt = ot(ce.metadata, "step"), it = ot(
|
|
15553
|
+
return Y.some((ce) => ot(ce.metadata, "step") !== null) && Y.sort((ce, yt) => {
|
|
15554
|
+
const Nt = ot(ce.metadata, "step"), it = ot(yt.metadata, "step");
|
|
15555
15555
|
if (Nt !== null || it !== null)
|
|
15556
15556
|
return (it ?? Number.NEGATIVE_INFINITY) - (Nt ?? Number.NEGATIVE_INFINITY);
|
|
15557
|
-
const vn = Date.parse(ce.createdAt ?? ""), un = Date.parse(
|
|
15557
|
+
const vn = Date.parse(ce.createdAt ?? ""), un = Date.parse(yt.createdAt ?? "");
|
|
15558
15558
|
return Number.isNaN(vn) || Number.isNaN(un) ? 0 : un - vn;
|
|
15559
15559
|
}), Y;
|
|
15560
15560
|
}, [A, ot]), { checkpointMetaById: Le, checkpointIndexByKey: Qt } = at(() => {
|
|
15561
15561
|
const Y = /* @__PURE__ */ new Map(), fe = /* @__PURE__ */ new Map();
|
|
15562
15562
|
for (const ce of tt) {
|
|
15563
|
-
const
|
|
15564
|
-
if (!
|
|
15563
|
+
const yt = ce.checkpointId ?? null;
|
|
15564
|
+
if (!yt) continue;
|
|
15565
15565
|
const Nt = ot(ce.metadata, "step"), it = ht(ce.metadata, "source"), vn = {
|
|
15566
|
-
id:
|
|
15566
|
+
id: yt,
|
|
15567
15567
|
step: Nt,
|
|
15568
15568
|
source: it,
|
|
15569
15569
|
createdAt: ce.createdAt ?? null,
|
|
15570
15570
|
namespace: ce.checkpointNs ?? null,
|
|
15571
15571
|
parentId: ce.parentId ?? null
|
|
15572
15572
|
};
|
|
15573
|
-
if (Y.set(
|
|
15573
|
+
if (Y.set(yt, vn), Nt !== null && it) {
|
|
15574
15574
|
const un = `${Nt}:${it}`, sn = fe.get(un) ?? [];
|
|
15575
15575
|
sn.push(vn), fe.set(un, sn);
|
|
15576
15576
|
}
|
|
15577
15577
|
}
|
|
15578
15578
|
for (const ce of fe.values())
|
|
15579
|
-
ce.sort((
|
|
15580
|
-
const it =
|
|
15579
|
+
ce.sort((yt, Nt) => {
|
|
15580
|
+
const it = yt.createdAt ?? "";
|
|
15581
15581
|
return (Nt.createdAt ?? "").localeCompare(it);
|
|
15582
15582
|
});
|
|
15583
15583
|
return { checkpointMetaById: Y, checkpointIndexByKey: fe };
|
|
15584
15584
|
}, [tt, ot, ht]), Fe = at(() => {
|
|
15585
15585
|
if (!tt.length) return [];
|
|
15586
|
-
const Y = [...tt].reverse(), fe = (
|
|
15586
|
+
const Y = [...tt].reverse(), fe = (yt) => {
|
|
15587
15587
|
const Nt = [];
|
|
15588
15588
|
for (const it of Y) {
|
|
15589
15589
|
const vn = it.checkpointId ?? null;
|
|
15590
15590
|
if (!vn) continue;
|
|
15591
|
-
const un = ht(it.metadata, "source"), sn = (un == null ? void 0 : un.toLowerCase()) ?? null,
|
|
15592
|
-
if (
|
|
15593
|
-
continue;
|
|
15594
|
-
const { text: Br, messageId: uo } = ye(it.messages);
|
|
15595
|
-
if (!Br && !uo && mt)
|
|
15591
|
+
const un = ht(it.metadata, "source"), sn = (un == null ? void 0 : un.toLowerCase()) ?? null, lo = sn === "input" || sn === "user_input" || sn === "user";
|
|
15592
|
+
if (yt && !lo)
|
|
15596
15593
|
continue;
|
|
15597
|
-
const wr =
|
|
15594
|
+
const { text: co, messageId: Jo } = ye(it.messages), wr = co && co.replace(/\s+/g, " ").trim() || ht(it.metadata, "title") || ht(it.metadata, "label") || (lo ? "User input" : un ?? "Checkpoint"), Zo = wr ? wr.length > 60 ? `${wr.slice(0, 57)}…` : wr : "User input";
|
|
15598
15595
|
Nt.push({
|
|
15599
15596
|
id: vn,
|
|
15600
15597
|
label: Zo,
|
|
15601
|
-
messageId:
|
|
15598
|
+
messageId: Jo ?? null,
|
|
15602
15599
|
createdAt: it.createdAt ?? null,
|
|
15603
15600
|
step: ot(it.metadata, "step"),
|
|
15604
15601
|
source: un ?? null
|
|
@@ -15680,7 +15677,7 @@ function pa({
|
|
|
15680
15677
|
}
|
|
15681
15678
|
}
|
|
15682
15679
|
try {
|
|
15683
|
-
const ce = L ?? void 0,
|
|
15680
|
+
const ce = L ?? void 0, yt = ee ?? void 0, Nt = D ? {
|
|
15684
15681
|
edit: !0,
|
|
15685
15682
|
originalMessageId: D,
|
|
15686
15683
|
...z != null && z.checkpointId ? { originalCheckpointId: z.checkpointId } : {},
|
|
@@ -15694,12 +15691,12 @@ function pa({
|
|
|
15694
15691
|
},
|
|
15695
15692
|
{
|
|
15696
15693
|
checkpointId: ce,
|
|
15697
|
-
checkpointNs:
|
|
15694
|
+
checkpointNs: yt
|
|
15698
15695
|
}
|
|
15699
15696
|
), h == null || h(fe), Tt(""), Pe(null), Ge([]), Ln(), X(null), ue(""), he(null);
|
|
15700
15697
|
} catch (ce) {
|
|
15701
|
-
const
|
|
15702
|
-
Pe(
|
|
15698
|
+
const yt = (ce == null ? void 0 : ce.message) || "Failed to send message";
|
|
15699
|
+
Pe(yt), g == null || g(yt);
|
|
15703
15700
|
}
|
|
15704
15701
|
}
|
|
15705
15702
|
}, ae = V.useCallback(
|
|
@@ -15741,13 +15738,13 @@ function pa({
|
|
|
15741
15738
|
Ge((ce) => [...ce, ...fe]), Y.target.value = "";
|
|
15742
15739
|
}, ze = (Y) => {
|
|
15743
15740
|
Ge((fe) => {
|
|
15744
|
-
const ce = fe.filter((
|
|
15741
|
+
const ce = fe.filter((yt, Nt) => Y !== Nt);
|
|
15745
15742
|
return ce.length === 0 && Ln(), ce;
|
|
15746
15743
|
});
|
|
15747
15744
|
}, Ot = async (Y) => {
|
|
15748
15745
|
const fe = (Y.target.files || [])[0];
|
|
15749
15746
|
if (fe) {
|
|
15750
|
-
Xe(null),
|
|
15747
|
+
Xe(null), xt(null), ut(!0);
|
|
15751
15748
|
try {
|
|
15752
15749
|
await j(
|
|
15753
15750
|
{ attachments: [fe] },
|
|
@@ -15757,10 +15754,10 @@ function pa({
|
|
|
15757
15754
|
}
|
|
15758
15755
|
);
|
|
15759
15756
|
const ce = `Uploaded ${fe.name} - processing through chat stream`;
|
|
15760
|
-
|
|
15757
|
+
xt(ce);
|
|
15761
15758
|
} catch (ce) {
|
|
15762
|
-
const
|
|
15763
|
-
console.error("Excel upload failed", ce), Xe(
|
|
15759
|
+
const yt = ce instanceof Error ? ce.message : "Failed to upload Excel file";
|
|
15760
|
+
console.error("Excel upload failed", ce), Xe(yt), g == null || g(yt);
|
|
15764
15761
|
} finally {
|
|
15765
15762
|
ut(!1), Y.target.value = "", Ln();
|
|
15766
15763
|
}
|
|
@@ -15773,7 +15770,7 @@ function pa({
|
|
|
15773
15770
|
await _();
|
|
15774
15771
|
return;
|
|
15775
15772
|
}
|
|
15776
|
-
const fe = tt.find((
|
|
15773
|
+
const fe = tt.find((yt) => yt.checkpointId === Y), ce = (fe == null ? void 0 : fe.checkpointNs) ?? null;
|
|
15777
15774
|
await k(Y, ce);
|
|
15778
15775
|
} finally {
|
|
15779
15776
|
Te(!1);
|
|
@@ -15790,8 +15787,8 @@ function pa({
|
|
|
15790
15787
|
return "Latest";
|
|
15791
15788
|
const fe = [];
|
|
15792
15789
|
Y.step !== null && fe.push(`Step ${Y.step}`), Y.source && fe.push(Y.source);
|
|
15793
|
-
const ce = Y.createdAt ? new Date(Y.createdAt) : null,
|
|
15794
|
-
return `${
|
|
15790
|
+
const ce = Y.createdAt ? new Date(Y.createdAt) : null, yt = ce && !Number.isNaN(ce.getTime()) ? ce.toLocaleString() : Y.createdAt ?? Y.id, Nt = fe.length ? ` — ${fe.join(" • ")}` : "";
|
|
15791
|
+
return `${yt}${Nt}`;
|
|
15795
15792
|
},
|
|
15796
15793
|
[]
|
|
15797
15794
|
);
|
|
@@ -15799,14 +15796,14 @@ function pa({
|
|
|
15799
15796
|
!!P && !Rt && /* @__PURE__ */ u.jsxs("div", { className: "flex-shrink-0 bg-red-50 border border-red-200 text-red-800 px-4 py-2 text-sm flex items-center justify-between", children: [
|
|
15800
15797
|
/* @__PURE__ */ u.jsx("span", { children: P }),
|
|
15801
15798
|
/* @__PURE__ */ u.jsx(
|
|
15802
|
-
|
|
15799
|
+
mt,
|
|
15803
15800
|
{
|
|
15804
15801
|
variant: "ghost",
|
|
15805
15802
|
size: "sm",
|
|
15806
15803
|
onClick: () => Bt(!0),
|
|
15807
15804
|
className: "text-red-800 hover:bg-red-100",
|
|
15808
15805
|
"aria-label": "Dismiss error",
|
|
15809
|
-
children: /* @__PURE__ */ u.jsx(
|
|
15806
|
+
children: /* @__PURE__ */ u.jsx(Vr, { size: 16 })
|
|
15810
15807
|
}
|
|
15811
15808
|
)
|
|
15812
15809
|
] }),
|
|
@@ -15896,13 +15893,13 @@ function pa({
|
|
|
15896
15893
|
/* @__PURE__ */ u.jsx("span", { className: "text-sm font-medium text-blue-800", children: "Editing message" })
|
|
15897
15894
|
] }),
|
|
15898
15895
|
/* @__PURE__ */ u.jsx(
|
|
15899
|
-
|
|
15896
|
+
mt,
|
|
15900
15897
|
{
|
|
15901
15898
|
variant: "ghost",
|
|
15902
15899
|
size: "sm",
|
|
15903
15900
|
onClick: be,
|
|
15904
15901
|
className: "text-blue-600 hover:bg-blue-100",
|
|
15905
|
-
children: /* @__PURE__ */ u.jsx(
|
|
15902
|
+
children: /* @__PURE__ */ u.jsx(Vr, { size: 16 })
|
|
15906
15903
|
}
|
|
15907
15904
|
)
|
|
15908
15905
|
] }) }),
|
|
@@ -15923,14 +15920,14 @@ function pa({
|
|
|
15923
15920
|
/* @__PURE__ */ u.jsx(ma, { size: 14 }),
|
|
15924
15921
|
/* @__PURE__ */ u.jsx("span", { className: "truncate max-w-[150px]", children: Y.name }),
|
|
15925
15922
|
/* @__PURE__ */ u.jsx(
|
|
15926
|
-
|
|
15923
|
+
mt,
|
|
15927
15924
|
{
|
|
15928
15925
|
variant: "ghost",
|
|
15929
15926
|
size: "sm",
|
|
15930
15927
|
onClick: () => ze(fe),
|
|
15931
15928
|
className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
|
|
15932
15929
|
"aria-label": `Remove ${Y.name}`,
|
|
15933
|
-
children: /* @__PURE__ */ u.jsx(
|
|
15930
|
+
children: /* @__PURE__ */ u.jsx(Vr, { size: 12 })
|
|
15934
15931
|
}
|
|
15935
15932
|
)
|
|
15936
15933
|
] }, fe)) })
|
|
@@ -15959,7 +15956,7 @@ function pa({
|
|
|
15959
15956
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
15960
15957
|
(a || l) && /* @__PURE__ */ u.jsxs(MT, { children: [
|
|
15961
15958
|
/* @__PURE__ */ u.jsx(DT, { asChild: !0, children: /* @__PURE__ */ u.jsx(
|
|
15962
|
-
|
|
15959
|
+
mt,
|
|
15963
15960
|
{
|
|
15964
15961
|
type: "button",
|
|
15965
15962
|
size: "icon",
|
|
@@ -16213,7 +16210,7 @@ var VT = v.forwardRef((e, t) => {
|
|
|
16213
16210
|
i(a ? c : d);
|
|
16214
16211
|
}
|
|
16215
16212
|
}, 10);
|
|
16216
|
-
return
|
|
16213
|
+
return eo(n.viewport, l), eo(n.content, l), /* @__PURE__ */ u.jsx(Rn, { present: r || s, children: /* @__PURE__ */ u.jsx(
|
|
16217
16214
|
Gl,
|
|
16218
16215
|
{
|
|
16219
16216
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -16380,7 +16377,7 @@ var VT = v.forwardRef((e, t) => {
|
|
|
16380
16377
|
(g == null ? void 0 : g.contains(M)) && C(A, T);
|
|
16381
16378
|
};
|
|
16382
16379
|
return document.addEventListener("wheel", N, { passive: !1 }), () => document.removeEventListener("wheel", N, { passive: !1 });
|
|
16383
|
-
}, [b, g, T, C]), v.useEffect(S, [r, S]),
|
|
16380
|
+
}, [b, g, T, C]), v.useEffect(S, [r, S]), eo(g, k), eo(p.content, k), /* @__PURE__ */ u.jsx(
|
|
16384
16381
|
YT,
|
|
16385
16382
|
{
|
|
16386
16383
|
scope: n,
|
|
@@ -16462,11 +16459,11 @@ var Yl = "ScrollAreaCorner", $p = v.forwardRef(
|
|
|
16462
16459
|
$p.displayName = Yl;
|
|
16463
16460
|
var JT = v.forwardRef((e, t) => {
|
|
16464
16461
|
const { __scopeScrollArea: n, ...r } = e, o = En(Yl, n), [s, i] = v.useState(0), [a, l] = v.useState(0), c = !!(s && a);
|
|
16465
|
-
return
|
|
16462
|
+
return eo(o.scrollbarX, () => {
|
|
16466
16463
|
var f;
|
|
16467
16464
|
const d = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
|
|
16468
16465
|
o.onCornerHeightChange(d), l(d);
|
|
16469
|
-
}),
|
|
16466
|
+
}), eo(o.scrollbarY, () => {
|
|
16470
16467
|
var f;
|
|
16471
16468
|
const d = ((f = o.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
|
|
16472
16469
|
o.onCornerWidthChange(d), i(d);
|
|
@@ -16530,7 +16527,7 @@ function ji(e, t) {
|
|
|
16530
16527
|
window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
|
|
16531
16528
|
}, [n, t]);
|
|
16532
16529
|
}
|
|
16533
|
-
function
|
|
16530
|
+
function eo(e, t) {
|
|
16534
16531
|
const n = Jt(t);
|
|
16535
16532
|
Zt(() => {
|
|
16536
16533
|
let r = 0;
|
|
@@ -16672,7 +16669,7 @@ function Bu({
|
|
|
16672
16669
|
};
|
|
16673
16670
|
return /* @__PURE__ */ u.jsxs("div", { className: `flex flex-col h-full ${e} ${s.container || ""}`, children: [
|
|
16674
16671
|
t && /* @__PURE__ */ u.jsx("div", { className: s.header || "flex-shrink-0 p-2 border-b bg-slate-800 border-slate-700 text-slate-100 flex justify-end", children: /* @__PURE__ */ u.jsx(
|
|
16675
|
-
|
|
16672
|
+
mt,
|
|
16676
16673
|
{
|
|
16677
16674
|
onClick: B,
|
|
16678
16675
|
disabled: $ || p,
|
|
@@ -16704,8 +16701,8 @@ function Bu({
|
|
|
16704
16701
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16705
16702
|
/* @__PURE__ */ u.jsx("div", { className: "flex-1 min-w-0", children: _ === Z.threadId ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", onClick: (de) => de.stopPropagation(), children: [
|
|
16706
16703
|
/* @__PURE__ */ u.jsx(Ys, { value: A, onChange: (de) => M(de.target.value), onKeyDown: (de) => ee(de, Z.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
16707
|
-
/* @__PURE__ */ u.jsx(
|
|
16708
|
-
/* @__PURE__ */ u.jsx(
|
|
16704
|
+
/* @__PURE__ */ u.jsx(mt, { variant: "ghost", size: "sm", onClick: () => F(Z.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Za, { size: 12 }) }),
|
|
16705
|
+
/* @__PURE__ */ u.jsx(mt, { variant: "ghost", size: "sm", onClick: L, className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Vr, { size: 12 }) })
|
|
16709
16706
|
] }) : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
16710
16707
|
/* @__PURE__ */ u.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: Ne(Z) }),
|
|
16711
16708
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
|
|
@@ -16714,9 +16711,9 @@ function Bu({
|
|
|
16714
16711
|
] })
|
|
16715
16712
|
] }) }),
|
|
16716
16713
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
|
|
16717
|
-
r && _ !== Z.threadId && /* @__PURE__ */ u.jsx(
|
|
16714
|
+
r && _ !== Z.threadId && /* @__PURE__ */ u.jsx(mt, { variant: "ghost", size: "sm", onClick: (de) => W(Z, de), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ u.jsx(Ku, { size: 12 }) }),
|
|
16718
16715
|
n && /* @__PURE__ */ u.jsx(
|
|
16719
|
-
|
|
16716
|
+
mt,
|
|
16720
16717
|
{
|
|
16721
16718
|
variant: "ghost",
|
|
16722
16719
|
size: "sm",
|
|
@@ -16737,7 +16734,7 @@ function Bu({
|
|
|
16737
16734
|
)
|
|
16738
16735
|
] });
|
|
16739
16736
|
}
|
|
16740
|
-
function
|
|
16737
|
+
function Yr(e) {
|
|
16741
16738
|
if (!(typeof globalThis > "u"))
|
|
16742
16739
|
return globalThis[e];
|
|
16743
16740
|
}
|
|
@@ -16749,9 +16746,9 @@ function nk(e) {
|
|
|
16749
16746
|
}
|
|
16750
16747
|
function Kp() {
|
|
16751
16748
|
const e = [
|
|
16752
|
-
|
|
16753
|
-
|
|
16754
|
-
|
|
16749
|
+
Yr("__API_BASE_URL__"),
|
|
16750
|
+
Yr("__CHAT_API_BASE_URL__"),
|
|
16751
|
+
Yr("__CHAT_API_URL__")
|
|
16755
16752
|
];
|
|
16756
16753
|
for (const t of e) {
|
|
16757
16754
|
const n = nk(t);
|
|
@@ -16760,9 +16757,9 @@ function Kp() {
|
|
|
16760
16757
|
}
|
|
16761
16758
|
function qp() {
|
|
16762
16759
|
const e = [
|
|
16763
|
-
|
|
16764
|
-
|
|
16765
|
-
|
|
16760
|
+
Yr("__API_AUTH_TOKEN__"),
|
|
16761
|
+
Yr("__CHAT_API_KEY__"),
|
|
16762
|
+
Yr("__CHAT_AUTH_TOKEN__")
|
|
16766
16763
|
];
|
|
16767
16764
|
for (const t of e)
|
|
16768
16765
|
if (typeof t == "string" && t.trim())
|
|
@@ -16880,7 +16877,7 @@ var Pi = "Switch", [ck, PR] = nr(Pi), [uk, dk] = ck(Pi), Qp = v.forwardRef(
|
|
|
16880
16877
|
onCheckedChange: c,
|
|
16881
16878
|
form: d,
|
|
16882
16879
|
...f
|
|
16883
|
-
} = e, [h, p] = v.useState(null), g = Qe(t, (b) => p(b)), x = v.useRef(!1), y = h ? d || !!h.closest("form") : !0, [m, w] =
|
|
16880
|
+
} = e, [h, p] = v.useState(null), g = Qe(t, (b) => p(b)), x = v.useRef(!1), y = h ? d || !!h.closest("form") : !0, [m, w] = Zr({
|
|
16884
16881
|
prop: o,
|
|
16885
16882
|
defaultProp: s ?? !1,
|
|
16886
16883
|
onChange: c,
|
|
@@ -17027,10 +17024,10 @@ var sm = Object.freeze({
|
|
|
17027
17024
|
)
|
|
17028
17025
|
);
|
|
17029
17026
|
mk.displayName = pk;
|
|
17030
|
-
var gk = [" ", "Enter", "ArrowUp", "ArrowDown"], xk = [" ", "Enter"], Pr = "Select", [Oi, Mi, yk] = Al(Pr), [
|
|
17027
|
+
var gk = [" ", "Enter", "ArrowUp", "ArrowDown"], xk = [" ", "Enter"], Pr = "Select", [Oi, Mi, yk] = Al(Pr), [ao, OR] = nr(Pr, [
|
|
17031
17028
|
yk,
|
|
17032
17029
|
Ei
|
|
17033
|
-
]), Di = Ei(), [vk, xr] =
|
|
17030
|
+
]), Di = Ei(), [vk, xr] = ao(Pr), [wk, bk] = ao(Pr), im = (e) => {
|
|
17034
17031
|
const {
|
|
17035
17032
|
__scopeSelect: t,
|
|
17036
17033
|
children: n,
|
|
@@ -17046,12 +17043,12 @@ var gk = [" ", "Enter", "ArrowUp", "ArrowDown"], xk = [" ", "Enter"], Pr = "Sele
|
|
|
17046
17043
|
disabled: h,
|
|
17047
17044
|
required: p,
|
|
17048
17045
|
form: g
|
|
17049
|
-
} = e, x = Di(t), [y, m] = v.useState(null), [w, b] = v.useState(null), [T, C] = v.useState(!1), S = Si(c), [k, _] =
|
|
17046
|
+
} = e, x = Di(t), [y, m] = v.useState(null), [w, b] = v.useState(null), [T, C] = v.useState(!1), S = Si(c), [k, _] = Zr({
|
|
17050
17047
|
prop: r,
|
|
17051
17048
|
defaultProp: o ?? !1,
|
|
17052
17049
|
onChange: s,
|
|
17053
17050
|
caller: Pr
|
|
17054
|
-
}), [N, A] =
|
|
17051
|
+
}), [N, A] = Zr({
|
|
17055
17052
|
prop: i,
|
|
17056
17053
|
defaultProp: a,
|
|
17057
17054
|
onChange: l,
|
|
@@ -17203,7 +17200,7 @@ var Or = "SelectContent", hm = v.forwardRef(
|
|
|
17203
17200
|
}
|
|
17204
17201
|
);
|
|
17205
17202
|
hm.displayName = Or;
|
|
17206
|
-
var An = 10, [pm, yr] =
|
|
17203
|
+
var An = 10, [pm, yr] = ao(Or), Tk = "SelectContentImpl", kk = Xr("SelectContent.RemoveScroll"), mm = v.forwardRef(
|
|
17207
17204
|
(e, t) => {
|
|
17208
17205
|
const {
|
|
17209
17206
|
__scopeSelect: n,
|
|
@@ -17508,7 +17505,7 @@ var Ek = "SelectPopperPosition", Ua = v.forwardRef((e, t) => {
|
|
|
17508
17505
|
);
|
|
17509
17506
|
});
|
|
17510
17507
|
Ua.displayName = Ek;
|
|
17511
|
-
var [Ik, Xl] =
|
|
17508
|
+
var [Ik, Xl] = ao(Or, {}), Wa = "SelectViewport", xm = v.forwardRef(
|
|
17512
17509
|
(e, t) => {
|
|
17513
17510
|
const { __scopeSelect: n, nonce: r, ...o } = e, s = yr(Wa, n), i = Xl(Wa, n), a = Qe(t, s.onViewportChange), l = v.useRef(0);
|
|
17514
17511
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
@@ -17561,7 +17558,7 @@ var [Ik, Xl] = lo(Or, {}), Wa = "SelectViewport", xm = v.forwardRef(
|
|
|
17561
17558
|
}
|
|
17562
17559
|
);
|
|
17563
17560
|
xm.displayName = Wa;
|
|
17564
|
-
var ym = "SelectGroup", [Nk, Ak] =
|
|
17561
|
+
var ym = "SelectGroup", [Nk, Ak] = ao(ym), _k = v.forwardRef(
|
|
17565
17562
|
(e, t) => {
|
|
17566
17563
|
const { __scopeSelect: n, ...r } = e, o = Zn();
|
|
17567
17564
|
return /* @__PURE__ */ u.jsx(Nk, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(Me.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
@@ -17575,7 +17572,7 @@ var vm = "SelectLabel", wm = v.forwardRef(
|
|
|
17575
17572
|
}
|
|
17576
17573
|
);
|
|
17577
17574
|
wm.displayName = vm;
|
|
17578
|
-
var Zs = "SelectItem", [jk, bm] =
|
|
17575
|
+
var Zs = "SelectItem", [jk, bm] = ao(Zs), Sm = v.forwardRef(
|
|
17579
17576
|
(e, t) => {
|
|
17580
17577
|
const {
|
|
17581
17578
|
__scopeSelect: n,
|
|
@@ -17659,9 +17656,9 @@ var Zs = "SelectItem", [jk, bm] = lo(Zs), Sm = v.forwardRef(
|
|
|
17659
17656
|
}
|
|
17660
17657
|
);
|
|
17661
17658
|
Sm.displayName = Zs;
|
|
17662
|
-
var
|
|
17659
|
+
var vo = "SelectItemText", Cm = v.forwardRef(
|
|
17663
17660
|
(e, t) => {
|
|
17664
|
-
const { __scopeSelect: n, className: r, style: o, ...s } = e, i = xr(
|
|
17661
|
+
const { __scopeSelect: n, className: r, style: o, ...s } = e, i = xr(vo, n), a = yr(vo, n), l = bm(vo, n), c = bk(vo, n), [d, f] = v.useState(null), h = Qe(
|
|
17665
17662
|
t,
|
|
17666
17663
|
(m) => f(m),
|
|
17667
17664
|
l.onItemTextChange,
|
|
@@ -17679,7 +17676,7 @@ var wo = "SelectItemText", Cm = v.forwardRef(
|
|
|
17679
17676
|
] });
|
|
17680
17677
|
}
|
|
17681
17678
|
);
|
|
17682
|
-
Cm.displayName =
|
|
17679
|
+
Cm.displayName = vo;
|
|
17683
17680
|
var Tm = "SelectItemIndicator", km = v.forwardRef(
|
|
17684
17681
|
(e, t) => {
|
|
17685
17682
|
const { __scopeSelect: n, ...r } = e;
|
|
@@ -18008,7 +18005,7 @@ const Zk = ti(
|
|
|
18008
18005
|
children: [
|
|
18009
18006
|
n,
|
|
18010
18007
|
/* @__PURE__ */ u.jsxs(Wf, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
18011
|
-
/* @__PURE__ */ u.jsx(
|
|
18008
|
+
/* @__PURE__ */ u.jsx(Vr, { className: "h-4 w-4" }),
|
|
18012
18009
|
/* @__PURE__ */ u.jsx("span", { className: "sr-only", children: "Close" })
|
|
18013
18010
|
] })
|
|
18014
18011
|
]
|
|
@@ -18103,7 +18100,7 @@ function MR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
18103
18100
|
}
|
|
18104
18101
|
};
|
|
18105
18102
|
return /* @__PURE__ */ u.jsxs(Yk, { open: r, onOpenChange: o, children: [
|
|
18106
|
-
/* @__PURE__ */ u.jsx(Xk, { asChild: !0, children: /* @__PURE__ */ u.jsxs(
|
|
18103
|
+
/* @__PURE__ */ u.jsx(Xk, { asChild: !0, children: /* @__PURE__ */ u.jsxs(mt, { variant: "outline", size: "sm", className: n, children: [
|
|
18107
18104
|
/* @__PURE__ */ u.jsx(vg, { className: "h-4 w-4 mr-2" }),
|
|
18108
18105
|
"Settings",
|
|
18109
18106
|
c && /* @__PURE__ */ u.jsx(cf, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
|
|
@@ -18114,12 +18111,12 @@ function MR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
18114
18111
|
/* @__PURE__ */ u.jsx(Xm, { children: "Configure your chat interface, API connection, and behavior preferences." })
|
|
18115
18112
|
] }),
|
|
18116
18113
|
/* @__PURE__ */ u.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
18117
|
-
/* @__PURE__ */ u.jsxs(
|
|
18118
|
-
/* @__PURE__ */ u.jsx(
|
|
18114
|
+
/* @__PURE__ */ u.jsxs(Co, { children: [
|
|
18115
|
+
/* @__PURE__ */ u.jsx(To, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(ko, { className: "text-lg flex items-center gap-2", children: [
|
|
18119
18116
|
/* @__PURE__ */ u.jsx(wg, { className: "h-5 w-5" }),
|
|
18120
18117
|
"API Configuration"
|
|
18121
18118
|
] }) }),
|
|
18122
|
-
/* @__PURE__ */ u.jsxs(
|
|
18119
|
+
/* @__PURE__ */ u.jsxs(Ro, { className: "space-y-4", children: [
|
|
18123
18120
|
/* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
|
|
18124
18121
|
/* @__PURE__ */ u.jsx(wn, { htmlFor: "api-url", children: "API Base URL" }),
|
|
18125
18122
|
/* @__PURE__ */ u.jsxs("div", { className: "flex gap-2", children: [
|
|
@@ -18135,7 +18132,7 @@ function MR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
18135
18132
|
placeholder: "http://localhost:8000/api"
|
|
18136
18133
|
}
|
|
18137
18134
|
),
|
|
18138
|
-
/* @__PURE__ */ u.jsx(
|
|
18135
|
+
/* @__PURE__ */ u.jsx(mt, { variant: "outline", onClick: x, children: "Test" })
|
|
18139
18136
|
] })
|
|
18140
18137
|
] }),
|
|
18141
18138
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -18169,7 +18166,7 @@ function MR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
18169
18166
|
}
|
|
18170
18167
|
),
|
|
18171
18168
|
/* @__PURE__ */ u.jsx(
|
|
18172
|
-
|
|
18169
|
+
mt,
|
|
18173
18170
|
{
|
|
18174
18171
|
variant: "outline",
|
|
18175
18172
|
size: "icon",
|
|
@@ -18181,12 +18178,12 @@ function MR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
18181
18178
|
] })
|
|
18182
18179
|
] })
|
|
18183
18180
|
] }),
|
|
18184
|
-
/* @__PURE__ */ u.jsxs(
|
|
18185
|
-
/* @__PURE__ */ u.jsx(
|
|
18181
|
+
/* @__PURE__ */ u.jsxs(Co, { children: [
|
|
18182
|
+
/* @__PURE__ */ u.jsx(To, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(ko, { className: "text-lg flex items-center gap-2", children: [
|
|
18186
18183
|
/* @__PURE__ */ u.jsx(Cg, { className: "h-5 w-5" }),
|
|
18187
18184
|
"Interface Settings"
|
|
18188
18185
|
] }) }),
|
|
18189
|
-
/* @__PURE__ */ u.jsxs(
|
|
18186
|
+
/* @__PURE__ */ u.jsxs(Ro, { className: "space-y-4", children: [
|
|
18190
18187
|
/* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
|
|
18191
18188
|
/* @__PURE__ */ u.jsx(wn, { htmlFor: "layout", children: "Layout Style" }),
|
|
18192
18189
|
/* @__PURE__ */ u.jsxs(
|
|
@@ -18276,12 +18273,12 @@ function MR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
18276
18273
|
] })
|
|
18277
18274
|
] })
|
|
18278
18275
|
] }),
|
|
18279
|
-
/* @__PURE__ */ u.jsxs(
|
|
18280
|
-
/* @__PURE__ */ u.jsx(
|
|
18276
|
+
/* @__PURE__ */ u.jsxs(Co, { children: [
|
|
18277
|
+
/* @__PURE__ */ u.jsx(To, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(ko, { className: "text-lg flex items-center gap-2", children: [
|
|
18281
18278
|
/* @__PURE__ */ u.jsx(Tg, { className: "h-5 w-5" }),
|
|
18282
18279
|
"Behavior Settings"
|
|
18283
18280
|
] }) }),
|
|
18284
|
-
/* @__PURE__ */ u.jsxs(
|
|
18281
|
+
/* @__PURE__ */ u.jsxs(Ro, { className: "space-y-4", children: [
|
|
18285
18282
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
18286
18283
|
/* @__PURE__ */ u.jsxs("div", { children: [
|
|
18287
18284
|
/* @__PURE__ */ u.jsx(wn, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
|
|
@@ -18337,13 +18334,13 @@ function MR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
18337
18334
|
] })
|
|
18338
18335
|
] }),
|
|
18339
18336
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between pt-6 border-t", children: [
|
|
18340
|
-
/* @__PURE__ */ u.jsxs(
|
|
18337
|
+
/* @__PURE__ */ u.jsxs(mt, { variant: "outline", onClick: p, children: [
|
|
18341
18338
|
/* @__PURE__ */ u.jsx(ga, { className: "h-4 w-4 mr-2" }),
|
|
18342
18339
|
"Reset"
|
|
18343
18340
|
] }),
|
|
18344
18341
|
/* @__PURE__ */ u.jsxs("div", { className: "flex gap-2", children: [
|
|
18345
|
-
/* @__PURE__ */ u.jsx(
|
|
18346
|
-
/* @__PURE__ */ u.jsxs(
|
|
18342
|
+
/* @__PURE__ */ u.jsx(mt, { variant: "outline", onClick: g, children: "Cancel" }),
|
|
18343
|
+
/* @__PURE__ */ u.jsxs(mt, { onClick: h, disabled: !c, children: [
|
|
18347
18344
|
/* @__PURE__ */ u.jsx(kg, { className: "h-4 w-4 mr-2" }),
|
|
18348
18345
|
"Save Changes"
|
|
18349
18346
|
] })
|