teodor-new-chat-ui 4.3.92 → 4.3.93
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 +441 -448
- package/dist/index.umd.js +14 -14
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -72,14 +72,14 @@ function gg() {
|
|
|
72
72
|
ze.unshift("Warning: " + H), Function.prototype.apply.call(console[R], console, ze);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
var T = !1, C = !1, S = !1, k = !1,
|
|
76
|
-
|
|
75
|
+
var T = !1, C = !1, S = !1, k = !1, N = !1, A;
|
|
76
|
+
A = Symbol.for("react.module.reference");
|
|
77
77
|
function M(R) {
|
|
78
|
-
return !!(typeof R == "string" || typeof R == "function" || R === r || R === s ||
|
|
78
|
+
return !!(typeof R == "string" || typeof R == "function" || R === r || R === s || N || R === o || R === c || R === u || k || R === h || T || C || S || typeof R == "object" && R !== null && (R.$$typeof === p || R.$$typeof === f || R.$$typeof === i || R.$$typeof === a || R.$$typeof === l || // This needs to include all possible module reference object
|
|
79
79
|
// types supported by any Flight configuration anywhere since
|
|
80
80
|
// we don't know which Flight build this will end up being used
|
|
81
81
|
// with.
|
|
82
|
-
R.$$typeof ===
|
|
82
|
+
R.$$typeof === A || R.getModuleId !== void 0));
|
|
83
83
|
}
|
|
84
84
|
function F(R, H, le) {
|
|
85
85
|
var Ce = R.displayName;
|
|
@@ -375,7 +375,7 @@ function gg() {
|
|
|
375
375
|
if (ft(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.", yt(R)), Ze(R);
|
|
377
377
|
}
|
|
378
|
-
var
|
|
378
|
+
var Ae = g.ReactCurrentOwner, ke = {
|
|
379
379
|
key: !0,
|
|
380
380
|
ref: !0,
|
|
381
381
|
__self: !0,
|
|
@@ -398,7 +398,7 @@ function gg() {
|
|
|
398
398
|
return R.key !== void 0;
|
|
399
399
|
}
|
|
400
400
|
function Et(R, H) {
|
|
401
|
-
typeof R.ref == "string" &&
|
|
401
|
+
typeof R.ref == "string" && Ae.current;
|
|
402
402
|
}
|
|
403
403
|
function Tt(R, H) {
|
|
404
404
|
{
|
|
@@ -466,7 +466,7 @@ function gg() {
|
|
|
466
466
|
var _e = typeof R == "function" ? R.displayName || R.name || "Unknown" : R;
|
|
467
467
|
$ && Tt(Fe, _e), ue && qt(Fe, _e);
|
|
468
468
|
}
|
|
469
|
-
return It(R, $, ue, Ge, Ce,
|
|
469
|
+
return It(R, $, ue, Ge, Ce, Ae.current, Fe);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
var Gt = g.ReactCurrentOwner, dn = g.ReactDebugCurrentFrame;
|
|
@@ -627,11 +627,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
627
627
|
function cr(R, H, le) {
|
|
628
628
|
return Hn(R, H, le, !0);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function Nr(R, H, le) {
|
|
631
631
|
return Hn(R, H, le, !1);
|
|
632
632
|
}
|
|
633
|
-
var
|
|
634
|
-
to.Fragment = r, to.jsx =
|
|
633
|
+
var Ar = Nr, Gn = cr;
|
|
634
|
+
to.Fragment = r, to.jsx = Ar, to.jsxs = Gn;
|
|
635
635
|
}()), to;
|
|
636
636
|
}
|
|
637
637
|
process.env.NODE_ENV === "production" ? na.exports = mg() : na.exports = gg();
|
|
@@ -670,8 +670,8 @@ const vg = Hs("string"), Wt = Hs("function"), Lu = Hs("number"), Io = (e) => e !
|
|
|
670
670
|
let t;
|
|
671
671
|
return e && (typeof FormData == "function" && e instanceof FormData || Wt(e.append) && ((t = Bs(e)) === "formdata" || // detect form-data instance
|
|
672
672
|
t === "object" && Wt(e.toString) && e.toString() === "[object FormData]"));
|
|
673
|
-
}, Ig = bn("URLSearchParams"), [
|
|
674
|
-
function
|
|
673
|
+
}, Ig = bn("URLSearchParams"), [Ng, Ag, _g, jg] = ["ReadableStream", "Request", "Response", "Headers"].map(bn), Pg = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
674
|
+
function No(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
675
675
|
if (e === null || typeof e > "u")
|
|
676
676
|
return;
|
|
677
677
|
let r, o;
|
|
@@ -705,10 +705,10 @@ function ra() {
|
|
|
705
705
|
es(n[i]) && es(o) ? n[i] = ra(n[i], o) : es(o) ? n[i] = ra({}, o) : Ur(o) ? n[i] = o.slice() : (!t || !zr(o)) && (n[i] = o);
|
|
706
706
|
};
|
|
707
707
|
for (let o = 0, s = arguments.length; o < s; o++)
|
|
708
|
-
arguments[o] &&
|
|
708
|
+
arguments[o] && No(arguments[o], r);
|
|
709
709
|
return n;
|
|
710
710
|
}
|
|
711
|
-
const Og = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
711
|
+
const Og = (e, t, n, { allOwnKeys: r } = {}) => (No(t, (o, s) => {
|
|
712
712
|
n && Wt(o) ? e[s] = Ou(o, n) : e[s] = o;
|
|
713
713
|
}, { allOwnKeys: r }), e), Mg = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Dg = (e, t, n, r) => {
|
|
714
714
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -757,7 +757,7 @@ const Og = (e, t, n, { allOwnKeys: r } = {}) => (Ao(t, (o, s) => {
|
|
|
757
757
|
}
|
|
758
758
|
), ql = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Vg = bn("RegExp"), zu = (e, t) => {
|
|
759
759
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
760
|
-
|
|
760
|
+
No(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);
|
|
@@ -798,7 +798,7 @@ const Jg = (e) => {
|
|
|
798
798
|
if (!("toJSON" in r)) {
|
|
799
799
|
t[o] = r;
|
|
800
800
|
const s = Ur(r) ? [] : {};
|
|
801
|
-
return
|
|
801
|
+
return No(r, (i, a) => {
|
|
802
802
|
const l = n(i, o + 1);
|
|
803
803
|
!zr(l) && (s[a] = l);
|
|
804
804
|
}), t[o] = void 0, s;
|
|
@@ -826,8 +826,8 @@ const Jg = (e) => {
|
|
|
826
826
|
isObject: Io,
|
|
827
827
|
isPlainObject: es,
|
|
828
828
|
isEmptyObject: bg,
|
|
829
|
-
isReadableStream:
|
|
830
|
-
isRequest:
|
|
829
|
+
isReadableStream: Ng,
|
|
830
|
+
isRequest: Ag,
|
|
831
831
|
isResponse: _g,
|
|
832
832
|
isHeaders: jg,
|
|
833
833
|
isUndefined: zr,
|
|
@@ -840,7 +840,7 @@ const Jg = (e) => {
|
|
|
840
840
|
isURLSearchParams: Ig,
|
|
841
841
|
isTypedArray: zg,
|
|
842
842
|
isFileList: kg,
|
|
843
|
-
forEach:
|
|
843
|
+
forEach: No,
|
|
844
844
|
merge: ra,
|
|
845
845
|
extend: Og,
|
|
846
846
|
trim: Pg,
|
|
@@ -1177,7 +1177,7 @@ function xx(e, t, n) {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
return (n || JSON.stringify)(e);
|
|
1179
1179
|
}
|
|
1180
|
-
const
|
|
1180
|
+
const Ao = {
|
|
1181
1181
|
transitional: qu,
|
|
1182
1182
|
adapter: ["xhr", "http", "fetch"],
|
|
1183
1183
|
transformRequest: [function(t, n) {
|
|
@@ -1206,7 +1206,7 @@ const No = {
|
|
|
1206
1206
|
return s || o ? (n.setContentType("application/json", !1), xx(t)) : t;
|
|
1207
1207
|
}],
|
|
1208
1208
|
transformResponse: [function(t) {
|
|
1209
|
-
const n = this.transitional ||
|
|
1209
|
+
const n = this.transitional || Ao.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
1210
1210
|
if (P.isResponse(t) || P.isReadableStream(t))
|
|
1211
1211
|
return t;
|
|
1212
1212
|
if (t && P.isString(t) && (r && !this.responseType || o)) {
|
|
@@ -1244,7 +1244,7 @@ const No = {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
};
|
|
1246
1246
|
P.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1247
|
-
|
|
1247
|
+
Ao.headers[e] = {};
|
|
1248
1248
|
});
|
|
1249
1249
|
const yx = P.toObjectSet([
|
|
1250
1250
|
"age",
|
|
@@ -1448,7 +1448,7 @@ P.reduceDescriptors(Vt.prototype, ({ value: e }, t) => {
|
|
|
1448
1448
|
});
|
|
1449
1449
|
P.freezeMethods(Vt);
|
|
1450
1450
|
function ki(e, t) {
|
|
1451
|
-
const n = this ||
|
|
1451
|
+
const n = this || Ao, r = t || n, o = Vt.from(r.headers);
|
|
1452
1452
|
let s = r.data;
|
|
1453
1453
|
return P.forEach(e, function(a) {
|
|
1454
1454
|
s = a.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
@@ -1561,15 +1561,15 @@ const ms = (e, t, n = 3) => {
|
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
1563
|
);
|
|
1564
|
-
function
|
|
1564
|
+
function Nx(e) {
|
|
1565
1565
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function Ax(e, t) {
|
|
1568
1568
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1569
1569
|
}
|
|
1570
1570
|
function Ju(e, t, n) {
|
|
1571
|
-
let r = !
|
|
1572
|
-
return e && (r || n == !1) ?
|
|
1571
|
+
let r = !Nx(t);
|
|
1572
|
+
return e && (r || n == !1) ? Ax(e, t) : t;
|
|
1573
1573
|
}
|
|
1574
1574
|
const ec = (e) => e instanceof Vt ? { ...e } : e;
|
|
1575
1575
|
function mr(e, t) {
|
|
@@ -1864,8 +1864,8 @@ const Zu = (e) => {
|
|
|
1864
1864
|
onDownloadProgress: C,
|
|
1865
1865
|
onUploadProgress: S,
|
|
1866
1866
|
responseType: k,
|
|
1867
|
-
headers:
|
|
1868
|
-
withCredentials:
|
|
1867
|
+
headers: N,
|
|
1868
|
+
withCredentials: A = "same-origin",
|
|
1869
1869
|
fetchOptions: M
|
|
1870
1870
|
} = Zu(m), F = t || fetch;
|
|
1871
1871
|
k = k ? (k + "").toLowerCase() : "text";
|
|
@@ -1875,13 +1875,13 @@ const Zu = (e) => {
|
|
|
1875
1875
|
});
|
|
1876
1876
|
let D;
|
|
1877
1877
|
try {
|
|
1878
|
-
if (S && c && v !== "get" && v !== "head" && (D = await h(
|
|
1878
|
+
if (S && c && v !== "get" && v !== "head" && (D = await h(N, g)) !== 0) {
|
|
1879
1879
|
let W = new n(x, {
|
|
1880
1880
|
method: "POST",
|
|
1881
1881
|
body: g,
|
|
1882
1882
|
duplex: "half"
|
|
1883
1883
|
}), ce;
|
|
1884
|
-
if (P.isFormData(g) && (ce = W.headers.get("content-type")) &&
|
|
1884
|
+
if (P.isFormData(g) && (ce = W.headers.get("content-type")) && N.setContentType(ce), W.body) {
|
|
1885
1885
|
const [B, Z] = Zl(
|
|
1886
1886
|
D,
|
|
1887
1887
|
ms(Ql(S))
|
|
@@ -1889,15 +1889,15 @@ const Zu = (e) => {
|
|
|
1889
1889
|
g = tc(W.body, nc, B, Z);
|
|
1890
1890
|
}
|
|
1891
1891
|
}
|
|
1892
|
-
P.isString(
|
|
1892
|
+
P.isString(A) || (A = A ? "include" : "omit");
|
|
1893
1893
|
const L = s && "credentials" in n.prototype, ne = {
|
|
1894
1894
|
...M,
|
|
1895
1895
|
signal: q,
|
|
1896
1896
|
method: v.toUpperCase(),
|
|
1897
|
-
headers:
|
|
1897
|
+
headers: N.normalize().toJSON(),
|
|
1898
1898
|
body: g,
|
|
1899
1899
|
duplex: "half",
|
|
1900
|
-
credentials: L ?
|
|
1900
|
+
credentials: L ? A : void 0
|
|
1901
1901
|
};
|
|
1902
1902
|
j = s && new n(x, ne);
|
|
1903
1903
|
let K = await (s ? F(j, M) : F(x, ne));
|
|
@@ -2007,7 +2007,7 @@ function ac(e) {
|
|
|
2007
2007
|
return Ri(e), e.headers = Vt.from(e.headers), e.data = ki.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), ed.getAdapter(e.adapter ||
|
|
2010
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ed.getAdapter(e.adapter || Ao.adapter, e)(e).then(function(r) {
|
|
2011
2011
|
return Ri(e), r.data = ki.call(
|
|
2012
2012
|
e,
|
|
2013
2013
|
e.transformResponse,
|
|
@@ -2069,7 +2069,7 @@ function Bx(e, t, n) {
|
|
|
2069
2069
|
const ns = {
|
|
2070
2070
|
assertOptions: Bx,
|
|
2071
2071
|
validators: Ws
|
|
2072
|
-
},
|
|
2072
|
+
}, Nn = ns.validators;
|
|
2073
2073
|
let pr = class {
|
|
2074
2074
|
constructor(t) {
|
|
2075
2075
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -2106,17 +2106,17 @@ let pr = class {
|
|
|
2106
2106
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = mr(this.defaults, n);
|
|
2107
2107
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
2108
2108
|
r !== void 0 && ns.assertOptions(r, {
|
|
2109
|
-
silentJSONParsing:
|
|
2110
|
-
forcedJSONParsing:
|
|
2111
|
-
clarifyTimeoutError:
|
|
2109
|
+
silentJSONParsing: Nn.transitional(Nn.boolean),
|
|
2110
|
+
forcedJSONParsing: Nn.transitional(Nn.boolean),
|
|
2111
|
+
clarifyTimeoutError: Nn.transitional(Nn.boolean)
|
|
2112
2112
|
}, !1), o != null && (P.isFunction(o) ? n.paramsSerializer = {
|
|
2113
2113
|
serialize: o
|
|
2114
2114
|
} : ns.assertOptions(o, {
|
|
2115
|
-
encode:
|
|
2116
|
-
serialize:
|
|
2115
|
+
encode: Nn.function,
|
|
2116
|
+
serialize: Nn.function
|
|
2117
2117
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ns.assertOptions(n, {
|
|
2118
|
-
baseUrl:
|
|
2119
|
-
withXsrfToken:
|
|
2118
|
+
baseUrl: Nn.spelling("baseURL"),
|
|
2119
|
+
withXsrfToken: Nn.spelling("withXSRFToken")
|
|
2120
2120
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2121
2121
|
let i = s && P.merge(
|
|
2122
2122
|
s.common,
|
|
@@ -2349,7 +2349,7 @@ function rd(e) {
|
|
|
2349
2349
|
return rd(mr(e, o));
|
|
2350
2350
|
}, n;
|
|
2351
2351
|
}
|
|
2352
|
-
const bt = rd(
|
|
2352
|
+
const bt = rd(Ao);
|
|
2353
2353
|
bt.Axios = pr;
|
|
2354
2354
|
bt.CanceledError = Wr;
|
|
2355
2355
|
bt.CancelToken = Hx;
|
|
@@ -2414,7 +2414,7 @@ cn.interceptors.response.use(
|
|
|
2414
2414
|
(e) => e,
|
|
2415
2415
|
(e) => Promise.reject(e)
|
|
2416
2416
|
);
|
|
2417
|
-
async function
|
|
2417
|
+
async function An(e, t) {
|
|
2418
2418
|
return cn.defaults.baseURL ? (await cn.get(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
|
|
2419
2419
|
}
|
|
2420
2420
|
async function fc(e, t, n) {
|
|
@@ -2450,7 +2450,7 @@ class Yx {
|
|
|
2450
2450
|
}
|
|
2451
2451
|
// ---- Thread Management ----
|
|
2452
2452
|
async listThreads() {
|
|
2453
|
-
const t = await
|
|
2453
|
+
const t = await An("/threads"), n = mn(t);
|
|
2454
2454
|
return (n == null ? void 0 : n.items) ?? (t == null ? void 0 : t.items) ?? [];
|
|
2455
2455
|
}
|
|
2456
2456
|
async createThread(t) {
|
|
@@ -2466,24 +2466,24 @@ class Yx {
|
|
|
2466
2466
|
return mn(n);
|
|
2467
2467
|
}
|
|
2468
2468
|
async threadInfo(t) {
|
|
2469
|
-
const n = await
|
|
2469
|
+
const n = await An(`/threads/${t}/info`);
|
|
2470
2470
|
return mn(n);
|
|
2471
2471
|
}
|
|
2472
2472
|
// ---- Agents ----
|
|
2473
2473
|
async listAgents() {
|
|
2474
|
-
const t = await
|
|
2474
|
+
const t = await An("/agents"), n = mn(t);
|
|
2475
2475
|
return (n == null ? void 0 : n.items) ?? [];
|
|
2476
2476
|
}
|
|
2477
2477
|
async getAgent(t) {
|
|
2478
|
-
const n = await
|
|
2478
|
+
const n = await An(`/agents/${t}`);
|
|
2479
2479
|
return mn(n);
|
|
2480
2480
|
}
|
|
2481
2481
|
async getAgentSchema(t) {
|
|
2482
|
-
const n = await
|
|
2482
|
+
const n = await An(`/agents/${t}/schema`);
|
|
2483
2483
|
return mn(n);
|
|
2484
2484
|
}
|
|
2485
2485
|
async getState(t) {
|
|
2486
|
-
const n = await
|
|
2486
|
+
const n = await An(`/threads/${t.threadId}/state`, {
|
|
2487
2487
|
params: {
|
|
2488
2488
|
thread_id: t.threadId,
|
|
2489
2489
|
checkpoint_id: t.checkpointId,
|
|
@@ -2493,7 +2493,7 @@ class Yx {
|
|
|
2493
2493
|
return mn(n);
|
|
2494
2494
|
}
|
|
2495
2495
|
async getStateHistory(t) {
|
|
2496
|
-
const n = await
|
|
2496
|
+
const n = await An(`/threads/${t.threadId}/state/history`, {
|
|
2497
2497
|
params: {
|
|
2498
2498
|
thread_id: t.threadId,
|
|
2499
2499
|
checkpoint_id: t.checkpointId,
|
|
@@ -2596,7 +2596,7 @@ function ca(e) {
|
|
|
2596
2596
|
}
|
|
2597
2597
|
function id(e, t) {
|
|
2598
2598
|
if (!Ha(e)) return null;
|
|
2599
|
-
const n = e.values ?? { messages: [] }, r = Array.isArray(n == null ? void 0 : n.messages) ? n.messages : [], { messages: o, ...s } = n, i = Object.keys(s).length ? s : null, a = e.tasks, l = Array.isArray(a) ? a.filter((
|
|
2599
|
+
const n = e.values ?? { messages: [] }, r = Array.isArray(n == null ? void 0 : n.messages) ? n.messages : [], { messages: o, ...s } = n, i = Object.keys(s).length ? s : null, a = e.tasks, l = Array.isArray(a) ? a.filter((A) => !!A && typeof A == "object").map((A) => ({ ...A })) : a === null ? null : void 0, c = r.map((A, M) => ly(A, M)).filter((A) => !!A), u = Ut(e.config), f = Ut(u == null ? void 0 : u.configurable), p = St(f, ["checkpoint_id", "checkpointId"]), h = St(f, ["checkpoint_ns", "checkpointNs"]), m = Ut(e == null ? void 0 : e.parentConfig), x = Ut(m == null ? void 0 : m.configurable), v = St(x, ["checkpoint_id", "checkpointId"]) ?? null, g = St(x, ["checkpoint_ns", "checkpointNs"]) ?? null, w = e == null ? void 0 : e.createdAt, b = typeof w == "string" && w.trim() ? w : new Date(Date.now() - t).toISOString(), T = c[c.length - 1] ?? null, C = Ut(e == null ? void 0 : e.metadata), S = St(C, ["branch_label", "branchLabel"]), k = St(x, ["checkpoint_id", "checkpointId"]), N = Array.isArray(e.next) ? [...e.next] : (e == null ? void 0 : e.next) === null ? null : void 0;
|
|
2600
2600
|
return {
|
|
2601
2601
|
messages: c,
|
|
2602
2602
|
checkpointId: p ?? null,
|
|
@@ -2613,7 +2613,7 @@ function id(e, t) {
|
|
|
2613
2613
|
metadata: C ?? null,
|
|
2614
2614
|
config: u ?? null,
|
|
2615
2615
|
parentConfig: m ?? null,
|
|
2616
|
-
next:
|
|
2616
|
+
next: N ?? null,
|
|
2617
2617
|
tasks: l ?? null,
|
|
2618
2618
|
values: i ?? null
|
|
2619
2619
|
};
|
|
@@ -2944,9 +2944,8 @@ const my = {
|
|
|
2944
2944
|
function gy(e, t) {
|
|
2945
2945
|
var n;
|
|
2946
2946
|
switch (t.type) {
|
|
2947
|
-
case "reset":
|
|
2948
|
-
|
|
2949
|
-
const r = {
|
|
2947
|
+
case "reset":
|
|
2948
|
+
return {
|
|
2950
2949
|
messages: Ei(((n = t.payload) == null ? void 0 : n.messages) ?? []),
|
|
2951
2950
|
assemblingId: null,
|
|
2952
2951
|
lastCheckpointId: null,
|
|
@@ -2955,8 +2954,6 @@ function gy(e, t) {
|
|
|
2955
2954
|
lastBranch: null,
|
|
2956
2955
|
pendingInterrupt: null
|
|
2957
2956
|
};
|
|
2958
|
-
return console.log("[MessageReducer] 📊 After reset - messages count:", r.messages.length), r;
|
|
2959
|
-
}
|
|
2960
2957
|
case "seed": {
|
|
2961
2958
|
const r = Ei(t.payload.messages), o = {
|
|
2962
2959
|
...e,
|
|
@@ -2973,11 +2970,7 @@ function gy(e, t) {
|
|
|
2973
2970
|
if (!r.length)
|
|
2974
2971
|
return e;
|
|
2975
2972
|
const o = new Set(e.messages.map((i) => i.id)), s = r.filter((i) => !o.has(i.id));
|
|
2976
|
-
return
|
|
2977
|
-
uniqueCount: s.length,
|
|
2978
|
-
duplicates: r.length - s.length,
|
|
2979
|
-
finalTotal: s.length + e.messages.length
|
|
2980
|
-
}), s.length ? { ...e, messages: [...s, ...e.messages] } : (console.log("[MessageReducer] All messages were duplicates - skipping"), e);
|
|
2973
|
+
return s.length ? { ...e, messages: [...s, ...e.messages] } : e;
|
|
2981
2974
|
}
|
|
2982
2975
|
case "user_message": {
|
|
2983
2976
|
const r = t.payload.message;
|
|
@@ -3081,11 +3074,11 @@ function mc(e, t) {
|
|
|
3081
3074
|
...p,
|
|
3082
3075
|
name: p.name ?? c,
|
|
3083
3076
|
additionalKwargs: b
|
|
3084
|
-
}, C = f, S = C >= 0 ? rs(e.messages, C, T) : e.messages, k = Bo(T, u),
|
|
3077
|
+
}, C = f, S = C >= 0 ? rs(e.messages, C, T) : e.messages, k = Bo(T, u), N = Ni(e.toolIndex, m, k);
|
|
3085
3078
|
return {
|
|
3086
3079
|
...e,
|
|
3087
3080
|
messages: S,
|
|
3088
|
-
toolIndex:
|
|
3081
|
+
toolIndex: N
|
|
3089
3082
|
};
|
|
3090
3083
|
}
|
|
3091
3084
|
const g = {
|
|
@@ -3099,7 +3092,7 @@ function mc(e, t) {
|
|
|
3099
3092
|
return {
|
|
3100
3093
|
...e,
|
|
3101
3094
|
messages: [...e.messages, g],
|
|
3102
|
-
toolIndex:
|
|
3095
|
+
toolIndex: Ni(e.toolIndex, m, w)
|
|
3103
3096
|
};
|
|
3104
3097
|
}
|
|
3105
3098
|
if (t.type === "tool_end") {
|
|
@@ -3129,7 +3122,7 @@ function mc(e, t) {
|
|
|
3129
3122
|
return {
|
|
3130
3123
|
...e,
|
|
3131
3124
|
messages: T,
|
|
3132
|
-
toolIndex:
|
|
3125
|
+
toolIndex: Ni(e.toolIndex, h, C)
|
|
3133
3126
|
};
|
|
3134
3127
|
}
|
|
3135
3128
|
if (t.type === "checkpoint") {
|
|
@@ -3241,7 +3234,7 @@ function Bo(e, t) {
|
|
|
3241
3234
|
n.add(o);
|
|
3242
3235
|
return Array.from(n);
|
|
3243
3236
|
}
|
|
3244
|
-
function
|
|
3237
|
+
function Ni(e, t, n) {
|
|
3245
3238
|
if (!n.length) return e;
|
|
3246
3239
|
let r = !1;
|
|
3247
3240
|
const o = { ...e };
|
|
@@ -3344,9 +3337,9 @@ function by(e) {
|
|
|
3344
3337
|
function Sy(e = {}) {
|
|
3345
3338
|
const t = it(() => Wn(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = ye(e.token ?? null), s = Le(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = ye(!1), [c, u] = ye(null), [f, p] = ye(""), [h, m] = ye(null), [x, v] = ye(0), [g, w] = ye(!1), b = Le(null), T = Le(!0), C = Le(0), S = Le(null), k = Te((F) => {
|
|
3346
3339
|
o(F);
|
|
3347
|
-
}, []), A = Te(() => {
|
|
3348
|
-
p(""), m(null), u(null);
|
|
3349
3340
|
}, []), N = Te(() => {
|
|
3341
|
+
p(""), m(null), u(null);
|
|
3342
|
+
}, []), A = Te(() => {
|
|
3350
3343
|
var F;
|
|
3351
3344
|
console.debug("[use-chat] stop() invoked - aborting stream"), (F = b.current) == null || F.abort(), b.current = null, S.current = null, l(!1), w(!1), C.current = 0, v(0);
|
|
3352
3345
|
}, []), M = Te(
|
|
@@ -3456,12 +3449,12 @@ function Sy(e = {}) {
|
|
|
3456
3449
|
const { value: Ze, done: ie } = await oe.read();
|
|
3457
3450
|
if (ie) break;
|
|
3458
3451
|
se += ge.decode(Ze, { stream: !0 }), se.length > Me && (se = "", console.warn("Stream buffer reset: exceeded 1MB"));
|
|
3459
|
-
let
|
|
3460
|
-
for (; (
|
|
3452
|
+
let Ae;
|
|
3453
|
+
for (; (Ae = se.indexOf(`
|
|
3461
3454
|
|
|
3462
3455
|
`)) >= 0; ) {
|
|
3463
|
-
const ke = se.slice(0,
|
|
3464
|
-
se = se.slice(
|
|
3456
|
+
const ke = se.slice(0, Ae);
|
|
3457
|
+
se = se.slice(Ae + 2);
|
|
3465
3458
|
const qe = Ty(ke);
|
|
3466
3459
|
if (!qe) continue;
|
|
3467
3460
|
let rt;
|
|
@@ -3544,8 +3537,8 @@ function Sy(e = {}) {
|
|
|
3544
3537
|
lastSeq: x,
|
|
3545
3538
|
connected: g,
|
|
3546
3539
|
stream: M,
|
|
3547
|
-
stop:
|
|
3548
|
-
clear:
|
|
3540
|
+
stop: A,
|
|
3541
|
+
clear: N,
|
|
3549
3542
|
setToken: k
|
|
3550
3543
|
};
|
|
3551
3544
|
}
|
|
@@ -3636,7 +3629,7 @@ function ky({
|
|
|
3636
3629
|
[p, l, c, u, f]
|
|
3637
3630
|
);
|
|
3638
3631
|
}
|
|
3639
|
-
function
|
|
3632
|
+
function Ai(e) {
|
|
3640
3633
|
return e == null ? e : { ...e };
|
|
3641
3634
|
}
|
|
3642
3635
|
function Ry(e) {
|
|
@@ -3655,7 +3648,7 @@ function Iy(e) {
|
|
|
3655
3648
|
return e;
|
|
3656
3649
|
}
|
|
3657
3650
|
function on(e, t = {}) {
|
|
3658
|
-
const n = t.cloneMessages ?? !1, r = Array.isArray(e == null ? void 0 : e.messages) ? e.messages : [], o =
|
|
3651
|
+
const n = t.cloneMessages ?? !1, r = Array.isArray(e == null ? void 0 : e.messages) ? e.messages : [], o = Ai(e == null ? void 0 : e.metadata), s = Ai(e == null ? void 0 : e.config), i = Ai(e == null ? void 0 : e.parentConfig), a = Ey(e == null ? void 0 : e.next), l = Iy(e == null ? void 0 : e.tasks), c = Ry(e == null ? void 0 : e.values), u = {
|
|
3659
3652
|
checkpointId: (e == null ? void 0 : e.checkpointId) ?? null,
|
|
3660
3653
|
checkpointNs: (e == null ? void 0 : e.checkpointNs) ?? null,
|
|
3661
3654
|
createdAt: (e == null ? void 0 : e.createdAt) ?? null,
|
|
@@ -3671,7 +3664,7 @@ function on(e, t = {}) {
|
|
|
3671
3664
|
};
|
|
3672
3665
|
return o !== void 0 && (u.metadata = o), s !== void 0 && (u.config = s), i !== void 0 && (u.parentConfig = i), a !== void 0 && (u.next = a), l !== void 0 && (u.tasks = l), c !== void 0 && (u.values = c), u;
|
|
3673
3666
|
}
|
|
3674
|
-
function
|
|
3667
|
+
function Ny(e) {
|
|
3675
3668
|
var t;
|
|
3676
3669
|
for (let n = e.length - 1; n >= 0; n--) {
|
|
3677
3670
|
const r = ((t = e[n]) == null ? void 0 : t.content) ?? [];
|
|
@@ -3733,7 +3726,7 @@ function da(e) {
|
|
|
3733
3726
|
} catch {
|
|
3734
3727
|
}
|
|
3735
3728
|
}
|
|
3736
|
-
const
|
|
3729
|
+
const Ay = "cachedThreads", _y = "v1", fa = 200;
|
|
3737
3730
|
function jy(e) {
|
|
3738
3731
|
let t = 5381;
|
|
3739
3732
|
for (let n = 0; n < e.length; n++)
|
|
@@ -3744,7 +3737,7 @@ function _i(e, t) {
|
|
|
3744
3737
|
return `cachedThreads:v1:${e}:${jy(t || "anon")}`;
|
|
3745
3738
|
}
|
|
3746
3739
|
function Py() {
|
|
3747
|
-
const e = Wa(
|
|
3740
|
+
const e = Wa(Ay);
|
|
3748
3741
|
if (!e) return [];
|
|
3749
3742
|
try {
|
|
3750
3743
|
const t = JSON.parse(e);
|
|
@@ -3928,7 +3921,7 @@ function Wy({
|
|
|
3928
3921
|
_i(f, (I = l.getAuthToken) == null ? void 0 : I.call(l))
|
|
3929
3922
|
);
|
|
3930
3923
|
return Ho(E);
|
|
3931
|
-
}), C = it(() => Pi(b), [b]), [S, k] = ye(t), [
|
|
3924
|
+
}), C = it(() => Pi(b), [b]), [S, k] = ye(t), [N, A] = ye(!1), [M, F] = ye(!1), [q, j] = ye(null), [_, D] = ye(null), [L, ne] = ye(null), [K, z] = ye([]), fe = Te(() => {
|
|
3932
3925
|
const E = ji(g);
|
|
3933
3926
|
Fo(() => {
|
|
3934
3927
|
T(Ho(E));
|
|
@@ -3945,7 +3938,7 @@ function Wy({
|
|
|
3945
3938
|
dt(() => {
|
|
3946
3939
|
Me.current = S;
|
|
3947
3940
|
}, [S]);
|
|
3948
|
-
const We = Le(!1), ut = Le([]), yt = Le(null), ft = Le(null), Ze = Le(/* @__PURE__ */ new Map()), ie = Le(S),
|
|
3941
|
+
const We = Le(!1), ut = Le([]), yt = Le(null), ft = Le(null), Ze = Le(/* @__PURE__ */ new Map()), ie = Le(S), Ae = Le(!1), ke = Le(null), qe = Le(/* @__PURE__ */ new Map()), rt = Le(/* @__PURE__ */ new Map()), Pe = Le(/* @__PURE__ */ new Map()), Xe = Le(/* @__PURE__ */ new Map()), Et = Te(
|
|
3949
3942
|
(E) => {
|
|
3950
3943
|
if (!E) {
|
|
3951
3944
|
z([]);
|
|
@@ -4059,12 +4052,12 @@ function Wy({
|
|
|
4059
4052
|
dt(() => {
|
|
4060
4053
|
dn.current = C.length;
|
|
4061
4054
|
}, [C.length]), dt(() => {
|
|
4062
|
-
const E = re.pendingInterrupt ??
|
|
4055
|
+
const E = re.pendingInterrupt ?? Ny(re.messages);
|
|
4063
4056
|
wc(L, E) || ne(E ?? null);
|
|
4064
4057
|
}, [L, re.messages, re.pendingInterrupt]);
|
|
4065
4058
|
const Mt = Te(async () => {
|
|
4066
4059
|
const E = dn.current > 0;
|
|
4067
|
-
E ||
|
|
4060
|
+
E || A(!0);
|
|
4068
4061
|
try {
|
|
4069
4062
|
const I = await l.listThreads();
|
|
4070
4063
|
Fo(() => {
|
|
@@ -4076,7 +4069,7 @@ function Wy({
|
|
|
4076
4069
|
} catch (I) {
|
|
4077
4070
|
i == null || i(String(I)), console.error("[ChatSessionProvider] Failed to refresh threads:", I), j(String(I));
|
|
4078
4071
|
} finally {
|
|
4079
|
-
E ||
|
|
4072
|
+
E || A(!1);
|
|
4080
4073
|
}
|
|
4081
4074
|
}, [l, i]), Cn = Le(!1), fn = Le(null), xt = Le(null), pn = Le(""), Tn = Te(
|
|
4082
4075
|
(E, I) => {
|
|
@@ -4122,11 +4115,11 @@ function Wy({
|
|
|
4122
4115
|
const Q = on(E), Be = ae === Me.current, He = (ee == null ? void 0 : ee.persist) !== !1;
|
|
4123
4116
|
if (I === "replace") {
|
|
4124
4117
|
if (He) {
|
|
4125
|
-
const
|
|
4118
|
+
const Nt = {
|
|
4126
4119
|
threadId: ae,
|
|
4127
4120
|
snapshot: on(E, { cloneMessages: !0 })
|
|
4128
4121
|
};
|
|
4129
|
-
Ze.current.set(ae,
|
|
4122
|
+
Ze.current.set(ae, Nt), ie.current = ae;
|
|
4130
4123
|
}
|
|
4131
4124
|
if (!Be)
|
|
4132
4125
|
return;
|
|
@@ -4137,8 +4130,8 @@ function Wy({
|
|
|
4137
4130
|
}), ne(Q.interrupt ?? null), xe(Q.nextCursor ?? null), ce(!!Q.nextCursor), O(Q.checkpointId ?? void 0), oe(Q.checkpointNs ?? void 0), se(Q.nextCursorNs ?? void 0);
|
|
4138
4131
|
return;
|
|
4139
4132
|
}
|
|
4140
|
-
const De = Ze.current.get(ae), Qe = (De == null ? void 0 : De.snapshot) ?? null, vt = Array.isArray(Qe == null ? void 0 : Qe.messages) ? Qe.messages : [], _t = on(Qe), Rn = Array.isArray(E == null ? void 0 : E.messages) ? E.messages : [], jt = /* @__PURE__ */ new Set(), Pt = [...Rn, ...vt].filter((
|
|
4141
|
-
const Si =
|
|
4133
|
+
const De = Ze.current.get(ae), Qe = (De == null ? void 0 : De.snapshot) ?? null, vt = Array.isArray(Qe == null ? void 0 : Qe.messages) ? Qe.messages : [], _t = on(Qe), Rn = Array.isArray(E == null ? void 0 : E.messages) ? E.messages : [], jt = /* @__PURE__ */ new Set(), Pt = [...Rn, ...vt].filter((Nt) => {
|
|
4134
|
+
const Si = Nt == null ? void 0 : Nt.id;
|
|
4142
4135
|
return Si ? jt.has(Si) ? !1 : (jt.add(Si), !0) : !0;
|
|
4143
4136
|
}), Jr = Tc(_t, Q), Zr = {
|
|
4144
4137
|
checkpointId: _t.checkpointId ?? Q.checkpointId ?? null,
|
|
@@ -4163,15 +4156,15 @@ function Wy({
|
|
|
4163
4156
|
Rn.length && st(Rn);
|
|
4164
4157
|
const En = E && Object.prototype.hasOwnProperty.call(E, "checkpointId") ? E.checkpointId : void 0, Qr = E && Object.prototype.hasOwnProperty.call(E, "checkpointNs") ? E.checkpointNs : void 0, In = E && Object.prototype.hasOwnProperty.call(E, "nextCursor") ? E.nextCursor : void 0, bi = E && Object.prototype.hasOwnProperty.call(E, "nextCursorNs") ? E.nextCursorNs : void 0;
|
|
4165
4158
|
xe(
|
|
4166
|
-
(
|
|
4159
|
+
(Nt) => In !== void 0 ? In ?? Nt ?? null : Nt ?? null
|
|
4167
4160
|
), ce(
|
|
4168
|
-
(
|
|
4161
|
+
(Nt) => In !== void 0 ? !!In : Nt
|
|
4169
4162
|
), O(
|
|
4170
|
-
(
|
|
4163
|
+
(Nt) => En !== void 0 ? En ?? Nt ?? void 0 : Nt ?? void 0
|
|
4171
4164
|
), oe(
|
|
4172
|
-
(
|
|
4165
|
+
(Nt) => Qr !== void 0 ? Qr ?? Nt ?? void 0 : Nt ?? void 0
|
|
4173
4166
|
), se(
|
|
4174
|
-
(
|
|
4167
|
+
(Nt) => bi !== void 0 ? bi ?? void 0 : Nt
|
|
4175
4168
|
);
|
|
4176
4169
|
},
|
|
4177
4170
|
[st, Ke, ne]
|
|
@@ -4234,7 +4227,7 @@ function Wy({
|
|
|
4234
4227
|
});
|
|
4235
4228
|
},
|
|
4236
4229
|
[re.messages.length]
|
|
4237
|
-
), { startStream:
|
|
4230
|
+
), { startStream: Nr, stop: Ar, isStreaming: Gn, error: R, setAuthToken: H } = ky({
|
|
4238
4231
|
baseUrl: u,
|
|
4239
4232
|
onThreadInfo: cr,
|
|
4240
4233
|
onMessageEvent: gt,
|
|
@@ -4279,11 +4272,11 @@ function Wy({
|
|
|
4279
4272
|
H(E);
|
|
4280
4273
|
const I = (ae) => {
|
|
4281
4274
|
const Q = _i(f, ae);
|
|
4282
|
-
ke.current !== Q && (ke.current = Q,
|
|
4275
|
+
ke.current !== Q && (ke.current = Q, Ae.current = !1), w(Q);
|
|
4283
4276
|
const Be = ji(Q);
|
|
4284
4277
|
Fo(() => {
|
|
4285
4278
|
T(Ho(Be));
|
|
4286
|
-
}), ae && !
|
|
4279
|
+
}), ae && !Ae.current && (Ae.current = !0);
|
|
4287
4280
|
};
|
|
4288
4281
|
I(E);
|
|
4289
4282
|
const Y = (ee = l.onTokenChange) == null ? void 0 : ee.call(l, (ae) => {
|
|
@@ -4541,7 +4534,7 @@ function Wy({
|
|
|
4541
4534
|
config: I == null ? void 0 : I.config,
|
|
4542
4535
|
command: (I == null ? void 0 : I.command) ?? null
|
|
4543
4536
|
};
|
|
4544
|
-
En.threadId || delete En.threadId, En.command || delete En.command,
|
|
4537
|
+
En.threadId || delete En.threadId, En.command || delete En.command, Nr(
|
|
4545
4538
|
En,
|
|
4546
4539
|
{
|
|
4547
4540
|
onError: (In) => {
|
|
@@ -4563,7 +4556,7 @@ function Wy({
|
|
|
4563
4556
|
re.lastCheckpointNs,
|
|
4564
4557
|
re.messages.length,
|
|
4565
4558
|
at,
|
|
4566
|
-
|
|
4559
|
+
Nr
|
|
4567
4560
|
]
|
|
4568
4561
|
), Dt = Te(
|
|
4569
4562
|
async (E, I, Y) => {
|
|
@@ -4659,7 +4652,7 @@ function Wy({
|
|
|
4659
4652
|
threads: C,
|
|
4660
4653
|
currentThreadId: S,
|
|
4661
4654
|
setCurrentThreadId: k,
|
|
4662
|
-
isLoading:
|
|
4655
|
+
isLoading: N,
|
|
4663
4656
|
error: q,
|
|
4664
4657
|
actions: {
|
|
4665
4658
|
createThread: le,
|
|
@@ -4673,7 +4666,7 @@ function Wy({
|
|
|
4673
4666
|
[
|
|
4674
4667
|
C,
|
|
4675
4668
|
S,
|
|
4676
|
-
|
|
4669
|
+
N,
|
|
4677
4670
|
q,
|
|
4678
4671
|
le,
|
|
4679
4672
|
Ce,
|
|
@@ -4739,10 +4732,10 @@ function Wy({
|
|
|
4739
4732
|
error: R,
|
|
4740
4733
|
submit: ot,
|
|
4741
4734
|
send: ot,
|
|
4742
|
-
stop:
|
|
4735
|
+
stop: Ar,
|
|
4743
4736
|
setAuthToken: H
|
|
4744
4737
|
}),
|
|
4745
|
-
[Gn, R, ot,
|
|
4738
|
+
[Gn, R, ot, Ar, H]
|
|
4746
4739
|
);
|
|
4747
4740
|
return /* @__PURE__ */ d.jsx($y.Provider, { value: !0, children: /* @__PURE__ */ d.jsx(pd.Provider, { value: Xr, children: /* @__PURE__ */ d.jsx(dd.Provider, { value: nn, children: /* @__PURE__ */ d.jsx(fd.Provider, { value: kt, children: e }) }) }) });
|
|
4748
4741
|
}
|
|
@@ -4871,12 +4864,12 @@ function qy({
|
|
|
4871
4864
|
U.useEffect(() => {
|
|
4872
4865
|
k();
|
|
4873
4866
|
}, [k, g]);
|
|
4874
|
-
const
|
|
4867
|
+
const N = U.useCallback(
|
|
4875
4868
|
(D, { fromUser: L }) => {
|
|
4876
4869
|
m || v(D), L && (a == null || a(D));
|
|
4877
4870
|
},
|
|
4878
4871
|
[m, a]
|
|
4879
|
-
),
|
|
4872
|
+
), A = U.useCallback(
|
|
4880
4873
|
async (D) => {
|
|
4881
4874
|
D && D.preventDefault();
|
|
4882
4875
|
const L = (g ?? "").trim();
|
|
@@ -4905,14 +4898,14 @@ function qy({
|
|
|
4905
4898
|
[g, l, h, m, a]
|
|
4906
4899
|
), M = U.useCallback((D) => {
|
|
4907
4900
|
const L = D.target.value;
|
|
4908
|
-
|
|
4909
|
-
}, [
|
|
4901
|
+
N(L, { fromUser: !0 }), S.current && (S.current.shouldClear = !1), T.current && (T.current.style.height = "auto", T.current.style.height = `${T.current.scrollHeight}px`);
|
|
4902
|
+
}, [N]), F = U.useCallback(
|
|
4910
4903
|
(D) => {
|
|
4911
|
-
D.key === "Enter" && !D.shiftKey ? (D.preventDefault(),
|
|
4904
|
+
D.key === "Enter" && !D.shiftKey ? (D.preventDefault(), A()) : D.key === "Escape" && t && (D.preventDefault(), c == null || c());
|
|
4912
4905
|
},
|
|
4913
|
-
[
|
|
4906
|
+
[A, t, c]
|
|
4914
4907
|
), _ = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${t ? "border-[hsl(var(--ring))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] dark:bg-[hsl(var(--card))] dark:text-[hsl(var(--card-foreground))]" : ""} ${p}`;
|
|
4915
|
-
return /* @__PURE__ */ d.jsx("form", { onSubmit: (D) => void
|
|
4908
|
+
return /* @__PURE__ */ d.jsx("form", { onSubmit: (D) => void A(D), className: `w-full ${f}`, children: /* @__PURE__ */ d.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
4916
4909
|
/* @__PURE__ */ d.jsx("div", { className: "flex-1", children: /* @__PURE__ */ d.jsx(
|
|
4917
4910
|
hd,
|
|
4918
4911
|
{
|
|
@@ -5405,7 +5398,7 @@ function yn(e, t, n = "k") {
|
|
|
5405
5398
|
return yn(e.l, t, n);
|
|
5406
5399
|
}
|
|
5407
5400
|
function Jt(e, t, n) {
|
|
5408
|
-
return lt(e) ? Sd(t, n, 1) : t === e.k ? Rt(e, { k: t, v: n }) : t < e.k ?
|
|
5401
|
+
return lt(e) ? Sd(t, n, 1) : t === e.k ? Rt(e, { k: t, v: n }) : t < e.k ? Nc(Rt(e, { l: Jt(e.l, t, n) })) : Nc(Rt(e, { r: Jt(e.r, t, n) }));
|
|
5409
5402
|
}
|
|
5410
5403
|
function Mr() {
|
|
5411
5404
|
return mo;
|
|
@@ -5495,7 +5488,7 @@ function bd(e) {
|
|
|
5495
5488
|
function Sd(e, t, n, r = mo, o = mo) {
|
|
5496
5489
|
return { k: e, l: r, lvl: n, r: o, v: t };
|
|
5497
5490
|
}
|
|
5498
|
-
function
|
|
5491
|
+
function Nc(e) {
|
|
5499
5492
|
return xa(Cd(e));
|
|
5500
5493
|
}
|
|
5501
5494
|
function Cd(e) {
|
|
@@ -5643,7 +5636,7 @@ function mv(e) {
|
|
|
5643
5636
|
return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: t };
|
|
5644
5637
|
});
|
|
5645
5638
|
}
|
|
5646
|
-
function
|
|
5639
|
+
function Ac(e, t) {
|
|
5647
5640
|
let n = 0, r = 0;
|
|
5648
5641
|
for (; n < e; )
|
|
5649
5642
|
n += t[r + 1] - t[r] - 1, r++;
|
|
@@ -5705,11 +5698,11 @@ const yv = {
|
|
|
5705
5698
|
Ee((C) => C.length > 0),
|
|
5706
5699
|
$e(x, h),
|
|
5707
5700
|
de(([C, S, k]) => {
|
|
5708
|
-
const
|
|
5701
|
+
const N = C.reduce((A, M, F) => Jt(A, M, yo(M, S.offsetTree, k) || F), Mr());
|
|
5709
5702
|
return {
|
|
5710
5703
|
...S,
|
|
5711
5704
|
groupIndices: C,
|
|
5712
|
-
groupOffsetTree:
|
|
5705
|
+
groupOffsetTree: N
|
|
5713
5706
|
};
|
|
5714
5707
|
})
|
|
5715
5708
|
),
|
|
@@ -5770,10 +5763,10 @@ const yv = {
|
|
|
5770
5763
|
(C) => {
|
|
5771
5764
|
const { groupIndices: S } = wt(x);
|
|
5772
5765
|
if (C > 0)
|
|
5773
|
-
Oe(t, !0), Oe(s, C +
|
|
5766
|
+
Oe(t, !0), Oe(s, C + Ac(C, S));
|
|
5774
5767
|
else if (C < 0) {
|
|
5775
5768
|
const k = wt(v);
|
|
5776
|
-
k.length > 0 && (C -=
|
|
5769
|
+
k.length > 0 && (C -= Ac(-C, k)), Oe(i, C);
|
|
5777
5770
|
}
|
|
5778
5771
|
}
|
|
5779
5772
|
), tt(V(a, $e(e)), ([C, S]) => {
|
|
@@ -5789,19 +5782,19 @@ const yv = {
|
|
|
5789
5782
|
s,
|
|
5790
5783
|
$e(x),
|
|
5791
5784
|
de(([C, S]) => {
|
|
5792
|
-
const k = S.groupIndices.length > 0,
|
|
5785
|
+
const k = S.groupIndices.length > 0, N = [], A = S.lastSize;
|
|
5793
5786
|
if (k) {
|
|
5794
5787
|
const M = go(S.sizeTree, 0);
|
|
5795
5788
|
let F = 0, q = 0;
|
|
5796
5789
|
for (; F < C; ) {
|
|
5797
5790
|
const _ = S.groupIndices[q], D = S.groupIndices.length === q + 1 ? 1 / 0 : S.groupIndices[q + 1] - _ - 1;
|
|
5798
|
-
|
|
5791
|
+
N.push({
|
|
5799
5792
|
endIndex: _,
|
|
5800
5793
|
size: M,
|
|
5801
5794
|
startIndex: _
|
|
5802
|
-
}),
|
|
5795
|
+
}), N.push({
|
|
5803
5796
|
endIndex: _ + 1 + D - 1,
|
|
5804
|
-
size:
|
|
5797
|
+
size: A,
|
|
5805
5798
|
startIndex: _ + 1
|
|
5806
5799
|
}), q++, F += D + 1;
|
|
5807
5800
|
}
|
|
@@ -5825,7 +5818,7 @@ const yv = {
|
|
|
5825
5818
|
{
|
|
5826
5819
|
prevIndex: C,
|
|
5827
5820
|
prevSize: 0,
|
|
5828
|
-
ranges:
|
|
5821
|
+
ranges: N
|
|
5829
5822
|
}
|
|
5830
5823
|
).ranges;
|
|
5831
5824
|
}
|
|
@@ -5837,7 +5830,7 @@ const yv = {
|
|
|
5837
5830
|
}),
|
|
5838
5831
|
{
|
|
5839
5832
|
prevIndex: 0,
|
|
5840
|
-
prevSize:
|
|
5833
|
+
prevSize: A,
|
|
5841
5834
|
ranges: []
|
|
5842
5835
|
}
|
|
5843
5836
|
).ranges;
|
|
@@ -5850,8 +5843,8 @@ const yv = {
|
|
|
5850
5843
|
i,
|
|
5851
5844
|
$e(x, h),
|
|
5852
5845
|
de(([C, { offsetTree: S }, k]) => {
|
|
5853
|
-
const
|
|
5854
|
-
return yo(
|
|
5846
|
+
const N = -C;
|
|
5847
|
+
return yo(N, S, k);
|
|
5855
5848
|
})
|
|
5856
5849
|
)
|
|
5857
5850
|
);
|
|
@@ -5863,31 +5856,31 @@ const yv = {
|
|
|
5863
5856
|
if (S.groupIndices.length > 0) {
|
|
5864
5857
|
if (lt(S.sizeTree))
|
|
5865
5858
|
return S;
|
|
5866
|
-
let
|
|
5867
|
-
const
|
|
5859
|
+
let N = Mr();
|
|
5860
|
+
const A = wt(v);
|
|
5868
5861
|
let M = 0, F = 0, q = 0;
|
|
5869
5862
|
for (; M < -C; ) {
|
|
5870
|
-
q =
|
|
5871
|
-
const j =
|
|
5863
|
+
q = A[F];
|
|
5864
|
+
const j = A[F + 1] - q - 1;
|
|
5872
5865
|
F++, M += j + 1;
|
|
5873
5866
|
}
|
|
5874
|
-
if (
|
|
5867
|
+
if (N = fr(S.sizeTree).reduce((j, { k: _, v: D }) => Jt(j, Math.max(0, _ + C), D), N), M !== -C) {
|
|
5875
5868
|
const j = go(S.sizeTree, q);
|
|
5876
|
-
|
|
5869
|
+
N = Jt(N, 0, j);
|
|
5877
5870
|
const _ = yn(S.sizeTree, -C + 1)[1];
|
|
5878
|
-
|
|
5871
|
+
N = Jt(N, 1, _);
|
|
5879
5872
|
}
|
|
5880
5873
|
return {
|
|
5881
5874
|
...S,
|
|
5882
|
-
sizeTree:
|
|
5883
|
-
...ya(S.offsetTree, 0,
|
|
5875
|
+
sizeTree: N,
|
|
5876
|
+
...ya(S.offsetTree, 0, N, k)
|
|
5884
5877
|
};
|
|
5885
5878
|
} else {
|
|
5886
|
-
const
|
|
5879
|
+
const N = fr(S.sizeTree).reduce((A, { k: M, v: F }) => Jt(A, Math.max(0, M + C), F), Mr());
|
|
5887
5880
|
return {
|
|
5888
5881
|
...S,
|
|
5889
|
-
sizeTree:
|
|
5890
|
-
...ya(S.offsetTree, 0,
|
|
5882
|
+
sizeTree: N,
|
|
5883
|
+
...ya(S.offsetTree, 0, N, k)
|
|
5891
5884
|
};
|
|
5892
5885
|
}
|
|
5893
5886
|
})
|
|
@@ -5970,7 +5963,7 @@ const Id = Je(
|
|
|
5970
5963
|
ht(rr),
|
|
5971
5964
|
{ singleton: !0 }
|
|
5972
5965
|
), wv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
5973
|
-
function
|
|
5966
|
+
function Nd(e) {
|
|
5974
5967
|
const t = typeof e == "number" ? { index: e } : e;
|
|
5975
5968
|
return t.align || (t.align = "start"), (!t.behavior || !wv) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
|
|
5976
5969
|
}
|
|
@@ -6001,14 +5994,14 @@ const _o = Je(
|
|
|
6001
5994
|
$e(e, s, o),
|
|
6002
5995
|
de(
|
|
6003
5996
|
([
|
|
6004
|
-
[T, C, S, k,
|
|
5997
|
+
[T, C, S, k, N, A, M, F],
|
|
6005
5998
|
q,
|
|
6006
5999
|
j,
|
|
6007
6000
|
_
|
|
6008
6001
|
]) => {
|
|
6009
|
-
const D =
|
|
6010
|
-
let W = yo(fe, C.offsetTree, q) +
|
|
6011
|
-
L === "end" ? (W += j + yn(C.sizeTree, fe)[1] - S + _, fe === z && (W += M)) : L === "center" ? W += (j + yn(C.sizeTree, fe)[1] - S + _) / 2 : W -=
|
|
6002
|
+
const D = Nd(T), { align: L, behavior: ne, offset: K } = D, z = k - 1, fe = Ed(D, C, z);
|
|
6003
|
+
let W = yo(fe, C.offsetTree, q) + A;
|
|
6004
|
+
L === "end" ? (W += j + yn(C.sizeTree, fe)[1] - S + _, fe === z && (W += M)) : L === "center" ? W += (j + yn(C.sizeTree, fe)[1] - S + _) / 2 : W -= N, K && (W += K);
|
|
6012
6005
|
const ce = (B) => {
|
|
6013
6006
|
b(), B ? (F("retrying to scroll to", { location: T }, Kt.DEBUG), Oe(h, T)) : (Oe(m, !0), F("list did not change, scroll successful", {}, Kt.DEBUG));
|
|
6014
6007
|
};
|
|
@@ -6100,7 +6093,7 @@ const jo = Je(
|
|
|
6100
6093
|
ht(Fn, Bt, _o, or),
|
|
6101
6094
|
{ singleton: !0 }
|
|
6102
6095
|
);
|
|
6103
|
-
function
|
|
6096
|
+
function Ad(e, t) {
|
|
6104
6097
|
return Math.abs(e - t) < 1.01;
|
|
6105
6098
|
}
|
|
6106
6099
|
const vo = "up", ao = "down", Sv = "none", Cv = {
|
|
@@ -6134,13 +6127,13 @@ const vo = "up", ao = "down", Sv = "none", Cv = {
|
|
|
6134
6127
|
const m = Zt(
|
|
6135
6128
|
V(
|
|
6136
6129
|
Ct(r, Re(s), Re(t), Re(e), Re(u)),
|
|
6137
|
-
Pn((w, [{ scrollHeight: b, scrollTop: T }, C, S, k,
|
|
6138
|
-
const
|
|
6130
|
+
Pn((w, [{ scrollHeight: b, scrollTop: T }, C, S, k, N]) => {
|
|
6131
|
+
const A = T + C - b > -N, M = {
|
|
6139
6132
|
scrollHeight: b,
|
|
6140
6133
|
scrollTop: T,
|
|
6141
6134
|
viewportHeight: C
|
|
6142
6135
|
};
|
|
6143
|
-
if (
|
|
6136
|
+
if (A) {
|
|
6144
6137
|
let q, j;
|
|
6145
6138
|
return T > w.state.scrollTop ? (q = "SCROLLED_DOWN", j = w.state.scrollTop - T) : (q = "SIZE_DECREASED", j = w.state.scrollTop - T || w.scrollTopDelta), {
|
|
6146
6139
|
atBottom: !0,
|
|
@@ -6163,7 +6156,7 @@ const vo = "up", ao = "down", Sv = "none", Cv = {
|
|
|
6163
6156
|
r,
|
|
6164
6157
|
Pn(
|
|
6165
6158
|
(w, { scrollHeight: b, scrollTop: T, viewportHeight: C }) => {
|
|
6166
|
-
if (
|
|
6159
|
+
if (Ad(w.scrollHeight, b))
|
|
6167
6160
|
return {
|
|
6168
6161
|
changed: !1,
|
|
6169
6162
|
jump: 0,
|
|
@@ -6281,10 +6274,10 @@ const tl = Je(
|
|
|
6281
6274
|
]) => {
|
|
6282
6275
|
const T = u - w, C = v + g, S = Math.max(p - T, 0);
|
|
6283
6276
|
let k = _c;
|
|
6284
|
-
const
|
|
6285
|
-
return h -= w, h += p + g, m += p + g, m -= w, h > u + C -
|
|
6286
|
-
Math.max(T - p - jc(x, ys, k) -
|
|
6287
|
-
T - S - g + f + jc(x, vs, k) +
|
|
6277
|
+
const N = Pc(b, ys), A = Pc(b, vs);
|
|
6278
|
+
return h -= w, h += p + g, m += p + g, m -= w, h > u + C - N && (k = vo), m < u - S + f + A && (k = ao), k !== _c ? [
|
|
6279
|
+
Math.max(T - p - jc(x, ys, k) - N, 0),
|
|
6280
|
+
T - S - g + f + jc(x, vs, k) + A
|
|
6288
6281
|
] : null;
|
|
6289
6282
|
}
|
|
6290
6283
|
),
|
|
@@ -6418,8 +6411,8 @@ const kr = Je(
|
|
|
6418
6411
|
Re(n),
|
|
6419
6412
|
e
|
|
6420
6413
|
),
|
|
6421
|
-
Ee(([S, k, ,
|
|
6422
|
-
const M =
|
|
6414
|
+
Ee(([S, k, , N, , , , , , , A]) => {
|
|
6415
|
+
const M = A && A.length !== N;
|
|
6423
6416
|
return S && !k && !M;
|
|
6424
6417
|
}),
|
|
6425
6418
|
de(
|
|
@@ -6427,8 +6420,8 @@ const kr = Je(
|
|
|
6427
6420
|
,
|
|
6428
6421
|
,
|
|
6429
6422
|
[S, k],
|
|
6430
|
-
A,
|
|
6431
6423
|
N,
|
|
6424
|
+
A,
|
|
6432
6425
|
M,
|
|
6433
6426
|
F,
|
|
6434
6427
|
q,
|
|
@@ -6436,16 +6429,16 @@ const kr = Je(
|
|
|
6436
6429
|
_,
|
|
6437
6430
|
D
|
|
6438
6431
|
]) => {
|
|
6439
|
-
const L =
|
|
6440
|
-
if (
|
|
6441
|
-
return { ...Di, totalCount:
|
|
6432
|
+
const L = A, { offsetTree: ne, sizeTree: K } = L, z = wt(v);
|
|
6433
|
+
if (N === 0)
|
|
6434
|
+
return { ...Di, totalCount: N };
|
|
6442
6435
|
if (S === 0 && k === 0)
|
|
6443
|
-
return z === 0 ? { ...Di, totalCount:
|
|
6436
|
+
return z === 0 ? { ...Di, totalCount: N } : _d(z, M, A, j, _, D || []);
|
|
6444
6437
|
if (lt(K))
|
|
6445
6438
|
return z > 0 ? null : as(
|
|
6446
|
-
kv(el(M,
|
|
6439
|
+
kv(el(M, N), L, D),
|
|
6447
6440
|
[],
|
|
6448
|
-
|
|
6441
|
+
N,
|
|
6449
6442
|
_,
|
|
6450
6443
|
L,
|
|
6451
6444
|
j
|
|
@@ -6461,11 +6454,11 @@ const kr = Je(
|
|
|
6461
6454
|
}
|
|
6462
6455
|
}
|
|
6463
6456
|
if (!F)
|
|
6464
|
-
return as([], fe,
|
|
6457
|
+
return as([], fe, N, _, L, j);
|
|
6465
6458
|
const W = q.length > 0 ? q[q.length - 1] + 1 : 0, ce = pv(ne, S, k, W);
|
|
6466
6459
|
if (ce.length === 0)
|
|
6467
6460
|
return null;
|
|
6468
|
-
const B =
|
|
6461
|
+
const B = N - 1, Z = Ks([], (we) => {
|
|
6469
6462
|
for (const xe of ce) {
|
|
6470
6463
|
const G = xe.value;
|
|
6471
6464
|
let O = G.offset, X = xe.start;
|
|
@@ -6481,7 +6474,7 @@ const kr = Je(
|
|
|
6481
6474
|
we.push({ data: D == null ? void 0 : D[se], index: se, offset: O, size: oe }), O += oe + _;
|
|
6482
6475
|
}
|
|
6483
6476
|
});
|
|
6484
|
-
return as(Z, fe,
|
|
6477
|
+
return as(Z, fe, N, _, L, j);
|
|
6485
6478
|
}
|
|
6486
6479
|
),
|
|
6487
6480
|
//@ts-expect-error filter needs to be fixed
|
|
@@ -6539,13 +6532,13 @@ const kr = Je(
|
|
|
6539
6532
|
w,
|
|
6540
6533
|
Ee(({ items: S }) => S.length > 0),
|
|
6541
6534
|
de(({ items: S }) => {
|
|
6542
|
-
let k = 0,
|
|
6543
|
-
for (; S[k].type === "group" && k <
|
|
6535
|
+
let k = 0, N = S.length - 1;
|
|
6536
|
+
for (; S[k].type === "group" && k < N; )
|
|
6544
6537
|
k++;
|
|
6545
|
-
for (; S[
|
|
6546
|
-
|
|
6538
|
+
for (; S[N].type === "group" && N > k; )
|
|
6539
|
+
N--;
|
|
6547
6540
|
return {
|
|
6548
|
-
endIndex: S[
|
|
6541
|
+
endIndex: S[N].index,
|
|
6549
6542
|
startIndex: S[k].index
|
|
6550
6543
|
};
|
|
6551
6544
|
}),
|
|
@@ -6615,10 +6608,10 @@ const kr = Je(
|
|
|
6615
6608
|
$e(t, l, n, s, o, r, a),
|
|
6616
6609
|
$e(e),
|
|
6617
6610
|
de(([[f, p, h, m, x, v, g, w], b]) => {
|
|
6618
|
-
const { align: T, behavior: C, calculateViewLocation: S = Ev, done: k, ...
|
|
6611
|
+
const { align: T, behavior: C, calculateViewLocation: S = Ev, done: k, ...N } = f, A = Ed(f, p, m - 1), M = yo(A, p.offsetTree, b) + x + v, F = M + yn(p.sizeTree, A)[1], q = w + v, j = w + h - g, _ = S({
|
|
6619
6612
|
itemBottom: F,
|
|
6620
6613
|
itemTop: M,
|
|
6621
|
-
locationParams: { align: T, behavior: C, ...
|
|
6614
|
+
locationParams: { align: T, behavior: C, ...N },
|
|
6622
6615
|
viewportBottom: j,
|
|
6623
6616
|
viewportTop: q
|
|
6624
6617
|
});
|
|
@@ -6646,7 +6639,7 @@ const kr = Je(
|
|
|
6646
6639
|
function Mc(e) {
|
|
6647
6640
|
return e ? e === "smooth" ? "smooth" : "auto" : !1;
|
|
6648
6641
|
}
|
|
6649
|
-
const Iv = (e, t) => typeof e == "function" ? Mc(e(t)) : t && Mc(e),
|
|
6642
|
+
const Iv = (e, t) => typeof e == "function" ? Mc(e(t)) : t && Mc(e), Nv = Je(
|
|
6650
6643
|
([
|
|
6651
6644
|
{ listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
|
|
6652
6645
|
{ atBottomState: o, isAtBottom: s },
|
|
@@ -6671,9 +6664,9 @@ const Iv = (e, t) => typeof e == "function" ? Mc(e(t)) : t && Mc(e), Av = Je(
|
|
|
6671
6664
|
V(
|
|
6672
6665
|
Ct(V(Re(t), yr(1)), l),
|
|
6673
6666
|
$e(Re(m), s, a, f),
|
|
6674
|
-
de(([[C, S], k,
|
|
6675
|
-
let F = S &&
|
|
6676
|
-
return F && (q = Iv(k,
|
|
6667
|
+
de(([[C, S], k, N, A, M]) => {
|
|
6668
|
+
let F = S && A, q = "auto";
|
|
6669
|
+
return F && (q = Iv(k, N || M), F = F && !!q), { followOutputBehavior: q, shouldFollow: F, totalCount: C };
|
|
6677
6670
|
}),
|
|
6678
6671
|
Ee(({ shouldFollow: C }) => C)
|
|
6679
6672
|
),
|
|
@@ -6727,7 +6720,7 @@ const Iv = (e, t) => typeof e == "function" ? Mc(e(t)) : t && Mc(e), Av = Je(
|
|
|
6727
6720
|
V(
|
|
6728
6721
|
Ct(V(T, yr(1)), l),
|
|
6729
6722
|
$e(Re(b), a, f, p),
|
|
6730
|
-
de(([[C, S], k,
|
|
6723
|
+
de(([[C, S], k, N, A, M]) => S && N && (k == null ? void 0 : k({ context: M, totalCount: C, scrollingInProgress: A }))),
|
|
6731
6724
|
Ee((C) => !!C),
|
|
6732
6725
|
Un(0)
|
|
6733
6726
|
),
|
|
@@ -6751,7 +6744,7 @@ const Iv = (e, t) => typeof e == "function" ? Mc(e(t)) : t && Mc(e), Av = Je(
|
|
|
6751
6744
|
Pd,
|
|
6752
6745
|
Od
|
|
6753
6746
|
)
|
|
6754
|
-
),
|
|
6747
|
+
), Av = Je(
|
|
6755
6748
|
([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (ve(
|
|
6756
6749
|
V(
|
|
6757
6750
|
a,
|
|
@@ -6921,10 +6914,10 @@ const Mv = Dd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
6921
6914
|
l,
|
|
6922
6915
|
$e(i),
|
|
6923
6916
|
Pn(
|
|
6924
|
-
([, g, w, b], [{ bottom: T, items: C, offsetBottom: S, totalCount: k },
|
|
6925
|
-
const
|
|
6917
|
+
([, g, w, b], [{ bottom: T, items: C, offsetBottom: S, totalCount: k }, N]) => {
|
|
6918
|
+
const A = T + S;
|
|
6926
6919
|
let M = 0;
|
|
6927
|
-
return w === k && g.length > 0 && C.length > 0 && (C[0].originalIndex === 0 && g[0].originalIndex === 0 || (M =
|
|
6920
|
+
return w === k && g.length > 0 && C.length > 0 && (C[0].originalIndex === 0 && g[0].originalIndex === 0 || (M = A - b, M !== 0 && (M += N))), [M, C, k, A];
|
|
6928
6921
|
},
|
|
6929
6922
|
[0, [], 0, 0]
|
|
6930
6923
|
),
|
|
@@ -6965,12 +6958,12 @@ const Mv = Dd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
6965
6958
|
return S(g);
|
|
6966
6959
|
{
|
|
6967
6960
|
let k = 0;
|
|
6968
|
-
const
|
|
6969
|
-
let
|
|
6970
|
-
for (;
|
|
6971
|
-
|
|
6961
|
+
const N = go(T, 0);
|
|
6962
|
+
let A = 0, M = 0;
|
|
6963
|
+
for (; A < g; ) {
|
|
6964
|
+
A++, k += N;
|
|
6972
6965
|
let F = w.length === M + 1 ? 1 / 0 : w[M + 1] - w[M] - 1;
|
|
6973
|
-
|
|
6966
|
+
A + F > g && (k -= N, F = g - A + 1), A += F, k += S(F), M++;
|
|
6974
6967
|
}
|
|
6975
6968
|
return k;
|
|
6976
6969
|
}
|
|
@@ -7014,7 +7007,7 @@ const Mv = Dd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7014
7007
|
}),
|
|
7015
7008
|
ht(
|
|
7016
7009
|
tl,
|
|
7017
|
-
|
|
7010
|
+
Av,
|
|
7018
7011
|
or,
|
|
7019
7012
|
Md,
|
|
7020
7013
|
jd,
|
|
@@ -7049,11 +7042,11 @@ const Mv = Dd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7049
7042
|
{ scrollToIndex: C },
|
|
7050
7043
|
S,
|
|
7051
7044
|
{ topItemCount: k },
|
|
7052
|
-
{ groupCounts:
|
|
7053
|
-
|
|
7054
|
-
]) => (ve(T.rangeChanged,
|
|
7045
|
+
{ groupCounts: N },
|
|
7046
|
+
A
|
|
7047
|
+
]) => (ve(T.rangeChanged, A.scrollSeekRangeChanged), ve(
|
|
7055
7048
|
V(
|
|
7056
|
-
|
|
7049
|
+
A.windowViewportRect,
|
|
7057
7050
|
de((M) => M.visibleHeight)
|
|
7058
7051
|
),
|
|
7059
7052
|
x.viewportHeight
|
|
@@ -7063,7 +7056,7 @@ const Mv = Dd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7063
7056
|
firstItemIndex: n,
|
|
7064
7057
|
fixedItemHeight: r,
|
|
7065
7058
|
gap: o,
|
|
7066
|
-
groupCounts:
|
|
7059
|
+
groupCounts: N,
|
|
7067
7060
|
initialItemFinalLocationReached: p,
|
|
7068
7061
|
initialTopMostItemIndex: h,
|
|
7069
7062
|
scrolledToInitialItem: m,
|
|
@@ -7083,7 +7076,7 @@ const Mv = Dd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7083
7076
|
// exported from stateFlagsSystem
|
|
7084
7077
|
...T,
|
|
7085
7078
|
// the bag of IO from featureGroup1System
|
|
7086
|
-
...
|
|
7079
|
+
...A,
|
|
7087
7080
|
...x,
|
|
7088
7081
|
sizes: l,
|
|
7089
7082
|
...v
|
|
@@ -7093,7 +7086,7 @@ const Mv = Dd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
7093
7086
|
jo,
|
|
7094
7087
|
Bt,
|
|
7095
7088
|
jv,
|
|
7096
|
-
|
|
7089
|
+
Nv,
|
|
7097
7090
|
kr,
|
|
7098
7091
|
_o,
|
|
7099
7092
|
Dv,
|
|
@@ -7234,7 +7227,7 @@ function Hd(e, t, n, r = Kr, o, s) {
|
|
|
7234
7227
|
s ? h.document.documentElement.scrollWidth : h.document.documentElement.scrollHeight
|
|
7235
7228
|
), x = s ? h.innerWidth : h.innerHeight, g = s ? window.scrollX : window.scrollY) : (v = h[s ? "scrollWidth" : "scrollHeight"], x = Jn(h, s ? "width" : "height"), g = h[s ? "scrollLeft" : "scrollTop"]);
|
|
7236
7229
|
const w = v - x;
|
|
7237
|
-
if (p.top = Math.ceil(Math.max(Math.min(w, p.top), 0)),
|
|
7230
|
+
if (p.top = Math.ceil(Math.max(Math.min(w, p.top), 0)), Ad(x, v) || p.top === g) {
|
|
7238
7231
|
e({ scrollHeight: v, scrollTop: g, viewportHeight: x }), m && t(!0);
|
|
7239
7232
|
return;
|
|
7240
7233
|
}
|
|
@@ -7286,7 +7279,7 @@ const zv = /* @__PURE__ */ Je(() => {
|
|
|
7286
7279
|
([e, t]) => ({ ...e, ...t }),
|
|
7287
7280
|
ht(Ld, zv)
|
|
7288
7281
|
), Hv = ({ height: e }) => /* @__PURE__ */ d.jsx("div", { style: { height: e } }), Uv = { overflowAnchor: "none", position: rl(), zIndex: 1 }, Ud = { overflowAnchor: "none" }, Wv = { ...Ud, display: "inline-block", height: "100%" }, Lc = /* @__PURE__ */ U.memo(function({ showTopList: e = !1 }) {
|
|
7289
|
-
const t =
|
|
7282
|
+
const t = Ne("listState"), n = sn("sizeRanges"), r = Ne("useWindowScroll"), o = Ne("customScrollParent"), s = sn("windowScrollContainerState"), i = sn("scrollContainerState"), a = o || r ? s : i, l = Ne("itemContent"), c = Ne("context"), u = Ne("groupContent"), f = Ne("trackItemSizes"), p = Ne("itemSize"), h = Ne("log"), m = sn("gap"), x = Ne("horizontalDirection"), { callbackRef: v } = sv(
|
|
7290
7283
|
n,
|
|
7291
7284
|
p,
|
|
7292
7285
|
f,
|
|
@@ -7295,12 +7288,12 @@ const zv = /* @__PURE__ */ Je(() => {
|
|
|
7295
7288
|
m,
|
|
7296
7289
|
o,
|
|
7297
7290
|
x,
|
|
7298
|
-
|
|
7291
|
+
Ne("skipAnimationFrameInResizeObserver")
|
|
7299
7292
|
), [g, w] = U.useState(0);
|
|
7300
7293
|
sl("deviation", (_) => {
|
|
7301
7294
|
g !== _ && w(_);
|
|
7302
7295
|
});
|
|
7303
|
-
const b =
|
|
7296
|
+
const b = Ne("EmptyPlaceholder"), T = Ne("ScrollSeekPlaceholder") || Hv, C = Ne("ListComponent"), S = Ne("ItemComponent"), k = Ne("GroupComponent"), N = Ne("computeItemKey"), A = Ne("isSeeking"), M = Ne("groupIndices").length > 0, F = Ne("alignToBottom"), q = Ne("initialItemFinalLocationReached"), j = e ? {} : {
|
|
7304
7297
|
boxSizing: "border-box",
|
|
7305
7298
|
...x ? {
|
|
7306
7299
|
display: "inline-block",
|
|
@@ -7324,8 +7317,8 @@ const zv = /* @__PURE__ */ Je(() => {
|
|
|
7324
7317
|
ref: v,
|
|
7325
7318
|
style: j,
|
|
7326
7319
|
children: (e ? t.topItems : t.items).map((_) => {
|
|
7327
|
-
const D = _.originalIndex, L =
|
|
7328
|
-
return
|
|
7320
|
+
const D = _.originalIndex, L = N(D + t.firstItemIndex, _.data, c);
|
|
7321
|
+
return A ? /* @__PURE__ */ Qo(
|
|
7329
7322
|
T,
|
|
7330
7323
|
{
|
|
7331
7324
|
...$t(T, c),
|
|
@@ -7393,7 +7386,7 @@ function Gv(e, t) {
|
|
|
7393
7386
|
return { item: typeof e == "string" ? void 0 : t };
|
|
7394
7387
|
}
|
|
7395
7388
|
const Yv = /* @__PURE__ */ U.memo(function() {
|
|
7396
|
-
const e =
|
|
7389
|
+
const e = Ne("HeaderComponent"), t = sn("headerHeight"), n = Ne("HeaderFooterTag"), r = Tr(
|
|
7397
7390
|
U.useMemo(
|
|
7398
7391
|
() => (s) => {
|
|
7399
7392
|
t(Jn(s, "height"));
|
|
@@ -7401,11 +7394,11 @@ const Yv = /* @__PURE__ */ U.memo(function() {
|
|
|
7401
7394
|
[t]
|
|
7402
7395
|
),
|
|
7403
7396
|
!0,
|
|
7404
|
-
|
|
7405
|
-
), o =
|
|
7397
|
+
Ne("skipAnimationFrameInResizeObserver")
|
|
7398
|
+
), o = Ne("context");
|
|
7406
7399
|
return e ? /* @__PURE__ */ d.jsx(n, { ref: r, children: /* @__PURE__ */ d.jsx(e, { ...$t(e, o) }) }) : null;
|
|
7407
7400
|
}), Xv = /* @__PURE__ */ U.memo(function() {
|
|
7408
|
-
const e =
|
|
7401
|
+
const e = Ne("FooterComponent"), t = sn("footerHeight"), n = Ne("HeaderFooterTag"), r = Tr(
|
|
7409
7402
|
U.useMemo(
|
|
7410
7403
|
() => (s) => {
|
|
7411
7404
|
t(Jn(s, "height"));
|
|
@@ -7413,8 +7406,8 @@ const Yv = /* @__PURE__ */ U.memo(function() {
|
|
|
7413
7406
|
[t]
|
|
7414
7407
|
),
|
|
7415
7408
|
!0,
|
|
7416
|
-
|
|
7417
|
-
), o =
|
|
7409
|
+
Ne("skipAnimationFrameInResizeObserver")
|
|
7410
|
+
), o = Ne("context");
|
|
7418
7411
|
return e ? /* @__PURE__ */ d.jsx(n, { ref: r, children: /* @__PURE__ */ d.jsx(e, { ...$t(e, o) }) }) : null;
|
|
7419
7412
|
});
|
|
7420
7413
|
function Wd({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
@@ -7470,27 +7463,27 @@ function Vd({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
7470
7463
|
});
|
|
7471
7464
|
}
|
|
7472
7465
|
const Jv = ({ children: e }) => {
|
|
7473
|
-
const t = U.useContext($d), n = sn("viewportHeight"), r = sn("fixedItemHeight"), o =
|
|
7466
|
+
const t = U.useContext($d), n = sn("viewportHeight"), r = sn("fixedItemHeight"), o = Ne("alignToBottom"), s = Ne("horizontalDirection"), i = U.useMemo(
|
|
7474
7467
|
() => gd(n, (l) => Jn(l, s ? "width" : "height")),
|
|
7475
7468
|
[n, s]
|
|
7476
|
-
), a = Tr(i, !0,
|
|
7469
|
+
), a = Tr(i, !0, Ne("skipAnimationFrameInResizeObserver"));
|
|
7477
7470
|
return U.useEffect(() => {
|
|
7478
7471
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
7479
7472
|
}, [t, n, r]), /* @__PURE__ */ d.jsx("div", { "data-viewport-type": "element", ref: a, style: Ys(o), children: e });
|
|
7480
7473
|
}, Zv = ({ children: e }) => {
|
|
7481
|
-
const t = U.useContext($d), n = sn("windowViewportRect"), r = sn("fixedItemHeight"), o =
|
|
7474
|
+
const t = U.useContext($d), n = sn("windowViewportRect"), r = sn("fixedItemHeight"), o = Ne("customScrollParent"), s = yd(
|
|
7482
7475
|
n,
|
|
7483
7476
|
o,
|
|
7484
|
-
|
|
7485
|
-
), i =
|
|
7477
|
+
Ne("skipAnimationFrameInResizeObserver")
|
|
7478
|
+
), i = Ne("alignToBottom");
|
|
7486
7479
|
return U.useEffect(() => {
|
|
7487
7480
|
t && (r(t.itemHeight), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
|
|
7488
7481
|
}, [t, n, r]), /* @__PURE__ */ d.jsx("div", { "data-viewport-type": "window", ref: s, style: Ys(i), children: e });
|
|
7489
7482
|
}, Qv = ({ children: e }) => {
|
|
7490
|
-
const t =
|
|
7483
|
+
const t = Ne("TopItemListComponent") || "div", n = Ne("headerHeight"), r = { ...qv, marginTop: `${n}px` }, o = Ne("context");
|
|
7491
7484
|
return /* @__PURE__ */ d.jsx(t, { style: r, ...$t(t, o), children: e });
|
|
7492
7485
|
}, ew = /* @__PURE__ */ U.memo(function(e) {
|
|
7493
|
-
const t =
|
|
7486
|
+
const t = Ne("useWindowScroll"), n = Ne("topItemsIndexes").length > 0, r = Ne("customScrollParent"), o = Ne("context");
|
|
7494
7487
|
return /* @__PURE__ */ d.jsxs(r || t ? rw : nw, { ...e, context: o, children: [
|
|
7495
7488
|
n && /* @__PURE__ */ d.jsx(Qv, { children: /* @__PURE__ */ d.jsx(Lc, { showTopList: !0 }) }),
|
|
7496
7489
|
/* @__PURE__ */ d.jsxs(r || t ? Zv : Jv, { children: [
|
|
@@ -7502,7 +7495,7 @@ const Jv = ({ children: e }) => {
|
|
|
7502
7495
|
}), {
|
|
7503
7496
|
Component: tw,
|
|
7504
7497
|
useEmitter: sl,
|
|
7505
|
-
useEmitterValue:
|
|
7498
|
+
useEmitterValue: Ne,
|
|
7506
7499
|
usePublisher: sn
|
|
7507
7500
|
} = /* @__PURE__ */ Fd(
|
|
7508
7501
|
Bv,
|
|
@@ -7563,7 +7556,7 @@ const Jv = ({ children: e }) => {
|
|
|
7563
7556
|
}
|
|
7564
7557
|
},
|
|
7565
7558
|
ew
|
|
7566
|
-
), nw = /* @__PURE__ */ Wd({ useEmitter: sl, useEmitterValue:
|
|
7559
|
+
), nw = /* @__PURE__ */ Wd({ useEmitter: sl, useEmitterValue: Ne, usePublisher: sn }), rw = /* @__PURE__ */ Vd({ useEmitter: sl, useEmitterValue: Ne, usePublisher: sn }), ow = tw, sw = /* @__PURE__ */ Je(() => {
|
|
7567
7560
|
const e = J((c) => /* @__PURE__ */ d.jsxs("td", { children: [
|
|
7568
7561
|
"Item $",
|
|
7569
7562
|
c
|
|
@@ -7643,7 +7636,7 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7643
7636
|
{ customScrollParent: v, useWindowScroll: g, windowScrollContainerState: w, windowScrollTo: b, windowViewportRect: T },
|
|
7644
7637
|
C
|
|
7645
7638
|
]) => {
|
|
7646
|
-
const S = J(0), k = J(0),
|
|
7639
|
+
const S = J(0), k = J(0), N = J(Fc), A = J({ height: 0, width: 0 }), M = J({ height: 0, width: 0 }), F = Ye(), q = Ye(), j = J(0), _ = J(null), D = J({ column: 0, row: 0 }), L = Ye(), ne = Ye(), K = J(!1), z = J(0), fe = J(!0), W = J(!1), ce = J(!1);
|
|
7647
7640
|
tt(
|
|
7648
7641
|
V(
|
|
7649
7642
|
m,
|
|
@@ -7655,7 +7648,7 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7655
7648
|
}
|
|
7656
7649
|
), tt(
|
|
7657
7650
|
V(
|
|
7658
|
-
Ct(m, fe, M,
|
|
7651
|
+
Ct(m, fe, M, A, z, W),
|
|
7659
7652
|
Ee(([O, X, oe, ge, , se]) => O && !X && oe.height !== 0 && ge.height !== 0 && !se)
|
|
7660
7653
|
),
|
|
7661
7654
|
([, , , , O]) => {
|
|
@@ -7679,20 +7672,20 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7679
7672
|
Ee(([, O]) => O != null)
|
|
7680
7673
|
),
|
|
7681
7674
|
([, O]) => {
|
|
7682
|
-
O && (Oe(
|
|
7675
|
+
O && (Oe(A, O.viewport), Oe(M, O.item), Oe(D, O.gap), O.scrollTop > 0 && (Oe(K, !0), xn(V(c, yr(1)), (X) => {
|
|
7683
7676
|
Oe(K, !1);
|
|
7684
7677
|
}), Oe(l, { top: O.scrollTop })));
|
|
7685
7678
|
}
|
|
7686
7679
|
), ve(
|
|
7687
7680
|
V(
|
|
7688
|
-
|
|
7681
|
+
A,
|
|
7689
7682
|
de(({ height: O }) => O)
|
|
7690
7683
|
),
|
|
7691
7684
|
f
|
|
7692
7685
|
), ve(
|
|
7693
7686
|
V(
|
|
7694
7687
|
Ct(
|
|
7695
|
-
Re(
|
|
7688
|
+
Re(A, Wo),
|
|
7696
7689
|
Re(M, Wo),
|
|
7697
7690
|
Re(D, (O, X) => O && O.column === X.column && O.row === X.row),
|
|
7698
7691
|
Re(c)
|
|
@@ -7712,7 +7705,7 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7712
7705
|
r,
|
|
7713
7706
|
Re(D, lw),
|
|
7714
7707
|
Re(M, Wo),
|
|
7715
|
-
Re(
|
|
7708
|
+
Re(A, Wo),
|
|
7716
7709
|
Re(_),
|
|
7717
7710
|
Re(k),
|
|
7718
7711
|
Re(K),
|
|
@@ -7743,12 +7736,12 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7743
7736
|
const yt = Kd(ut, We, gt);
|
|
7744
7737
|
let ft, Ze;
|
|
7745
7738
|
st ? X === 0 && oe === 0 && Ke > 0 ? (ft = 0, Ze = Ke - 1) : (ft = yt * ws((X + nt) / (Me + nt)), Ze = yt * $c((oe + nt) / (Me + nt)) - 1, Ze = $i(O - 1, lo(Ze, yt - 1)), ft = $i(Ze, lo(0, ft))) : (ft = 0, Ze = -1);
|
|
7746
|
-
const ie = Bc(ft, Ze, Ue), { bottom:
|
|
7747
|
-
return { bottom:
|
|
7739
|
+
const ie = Bc(ft, Ze, Ue), { bottom: Ae, top: ke } = Hc(re, ge, se, ie), qe = $c(O / yt), rt = qe * Me + (qe - 1) * nt - Ae;
|
|
7740
|
+
return { bottom: Ae, itemHeight: Me, items: ie, itemWidth: We, offsetBottom: rt, offsetTop: ke, top: ke };
|
|
7748
7741
|
}
|
|
7749
7742
|
)
|
|
7750
7743
|
),
|
|
7751
|
-
|
|
7744
|
+
N
|
|
7752
7745
|
), ve(
|
|
7753
7746
|
V(
|
|
7754
7747
|
_,
|
|
@@ -7758,7 +7751,7 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7758
7751
|
S
|
|
7759
7752
|
), ve(
|
|
7760
7753
|
V(
|
|
7761
|
-
Ct(
|
|
7754
|
+
Ct(A, M, N, D),
|
|
7762
7755
|
Ee(([O, X, { items: oe }]) => oe.length > 0 && X.height !== 0 && O.height !== 0),
|
|
7763
7756
|
de(([O, X, { items: oe }, ge]) => {
|
|
7764
7757
|
const { bottom: se, top: re } = Hc(O, ge, X, oe);
|
|
@@ -7779,7 +7772,7 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7779
7772
|
);
|
|
7780
7773
|
const Z = Zt(
|
|
7781
7774
|
V(
|
|
7782
|
-
Ct(
|
|
7775
|
+
Ct(N, S),
|
|
7783
7776
|
Ee(([{ items: O }]) => O.length > 0),
|
|
7784
7777
|
$e(B),
|
|
7785
7778
|
Ee(([[O, X], oe]) => {
|
|
@@ -7791,14 +7784,14 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7791
7784
|
)
|
|
7792
7785
|
), we = Zt(
|
|
7793
7786
|
V(
|
|
7794
|
-
Re(
|
|
7787
|
+
Re(N),
|
|
7795
7788
|
Ee(({ items: O }) => O.length > 0 && O[0].index === 0),
|
|
7796
7789
|
_n(0),
|
|
7797
7790
|
pt()
|
|
7798
7791
|
)
|
|
7799
7792
|
), xe = Zt(
|
|
7800
7793
|
V(
|
|
7801
|
-
Re(
|
|
7794
|
+
Re(N),
|
|
7802
7795
|
$e(K),
|
|
7803
7796
|
Ee(([{ items: O }, X]) => O.length > 0 && !X),
|
|
7804
7797
|
de(([{ items: O }]) => ({
|
|
@@ -7812,9 +7805,9 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7812
7805
|
ve(xe, h.scrollSeekRangeChanged), ve(
|
|
7813
7806
|
V(
|
|
7814
7807
|
F,
|
|
7815
|
-
$e(
|
|
7808
|
+
$e(A, M, S, D),
|
|
7816
7809
|
de(([O, X, oe, ge, se]) => {
|
|
7817
|
-
const re =
|
|
7810
|
+
const re = Nd(O), { align: Ue, behavior: Ke, offset: st } = re;
|
|
7818
7811
|
let at = re.index;
|
|
7819
7812
|
at === "LAST" && (at = ge - 1), at = lo(0, at, $i(ge - 1, at));
|
|
7820
7813
|
let gt = va(X, se, oe, at);
|
|
@@ -7825,7 +7818,7 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7825
7818
|
);
|
|
7826
7819
|
const G = zt(
|
|
7827
7820
|
V(
|
|
7828
|
-
|
|
7821
|
+
N,
|
|
7829
7822
|
de((O) => O.offsetBottom + O.bottom)
|
|
7830
7823
|
),
|
|
7831
7824
|
0
|
|
@@ -7835,7 +7828,7 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7835
7828
|
T,
|
|
7836
7829
|
de((O) => ({ height: O.visibleHeight, width: O.visibleWidth }))
|
|
7837
7830
|
),
|
|
7838
|
-
|
|
7831
|
+
A
|
|
7839
7832
|
), {
|
|
7840
7833
|
customScrollParent: v,
|
|
7841
7834
|
// input
|
|
@@ -7858,13 +7851,13 @@ const cw = /* @__PURE__ */ Je(
|
|
|
7858
7851
|
smoothScrollTargetReached: u,
|
|
7859
7852
|
totalCount: S,
|
|
7860
7853
|
useWindowScroll: g,
|
|
7861
|
-
viewportDimensions:
|
|
7854
|
+
viewportDimensions: A,
|
|
7862
7855
|
windowScrollContainerState: w,
|
|
7863
7856
|
windowScrollTo: b,
|
|
7864
7857
|
windowViewportRect: T,
|
|
7865
7858
|
...h,
|
|
7866
7859
|
// output
|
|
7867
|
-
gridState:
|
|
7860
|
+
gridState: N,
|
|
7868
7861
|
horizontalDirection: ce,
|
|
7869
7862
|
initialTopMostItemIndex: z,
|
|
7870
7863
|
totalListHeight: G,
|
|
@@ -8220,8 +8213,8 @@ function Sw(...e) {
|
|
|
8220
8213
|
};
|
|
8221
8214
|
return n.scopeName = t.scopeName, n;
|
|
8222
8215
|
}
|
|
8223
|
-
var
|
|
8224
|
-
}, Cw = y[" useInsertionEffect ".trim().toString()] ||
|
|
8216
|
+
var At = globalThis != null && globalThis.document ? y.useLayoutEffect : () => {
|
|
8217
|
+
}, Cw = y[" useInsertionEffect ".trim().toString()] || At;
|
|
8225
8218
|
function vr({
|
|
8226
8219
|
prop: e,
|
|
8227
8220
|
defaultProp: t,
|
|
@@ -8326,7 +8319,7 @@ function Ew(e, t) {
|
|
|
8326
8319
|
return y.useReducer((n, r) => t[n][r] ?? n, e);
|
|
8327
8320
|
}
|
|
8328
8321
|
var en = (e) => {
|
|
8329
|
-
const { present: t, children: n } = e, r = Iw(t), o = typeof n == "function" ? n({ present: r.isPresent }) : y.Children.only(n), s = Ve(r.ref,
|
|
8322
|
+
const { present: t, children: n } = e, r = Iw(t), o = typeof n == "function" ? n({ present: r.isPresent }) : y.Children.only(n), s = Ve(r.ref, Nw(o));
|
|
8330
8323
|
return typeof n == "function" || r.isPresent ? y.cloneElement(o, { ref: s }) : null;
|
|
8331
8324
|
};
|
|
8332
8325
|
en.displayName = "Presence";
|
|
@@ -8347,13 +8340,13 @@ function Iw(e) {
|
|
|
8347
8340
|
return y.useEffect(() => {
|
|
8348
8341
|
const c = Vo(r.current);
|
|
8349
8342
|
s.current = a === "mounted" ? c : "none";
|
|
8350
|
-
}, [a]),
|
|
8343
|
+
}, [a]), At(() => {
|
|
8351
8344
|
const c = r.current, u = o.current;
|
|
8352
8345
|
if (u !== e) {
|
|
8353
8346
|
const p = s.current, h = Vo(c);
|
|
8354
8347
|
e ? l("MOUNT") : h === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(u && p !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
8355
8348
|
}
|
|
8356
|
-
}, [e, l]),
|
|
8349
|
+
}, [e, l]), At(() => {
|
|
8357
8350
|
if (t) {
|
|
8358
8351
|
let c;
|
|
8359
8352
|
const u = t.ownerDocument.defaultView ?? window, f = (h) => {
|
|
@@ -8382,16 +8375,16 @@ function Iw(e) {
|
|
|
8382
8375
|
function Vo(e) {
|
|
8383
8376
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
8384
8377
|
}
|
|
8385
|
-
function
|
|
8378
|
+
function Nw(e) {
|
|
8386
8379
|
var r, o;
|
|
8387
8380
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
8388
8381
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
8389
8382
|
}
|
|
8390
|
-
var
|
|
8383
|
+
var Aw = y[" useId ".trim().toString()] || (() => {
|
|
8391
8384
|
}), _w = 0;
|
|
8392
8385
|
function Mn(e) {
|
|
8393
|
-
const [t, n] = y.useState(
|
|
8394
|
-
return
|
|
8386
|
+
const [t, n] = y.useState(Aw());
|
|
8387
|
+
return At(() => {
|
|
8395
8388
|
n((r) => r ?? String(_w++));
|
|
8396
8389
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
8397
8390
|
}
|
|
@@ -8464,7 +8457,7 @@ var Mw = y.forwardRef((e, t) => {
|
|
|
8464
8457
|
return y.useEffect(() => {
|
|
8465
8458
|
const w = requestAnimationFrame(() => v.current = !1);
|
|
8466
8459
|
return () => cancelAnimationFrame(w);
|
|
8467
|
-
}, []),
|
|
8460
|
+
}, []), At(() => {
|
|
8468
8461
|
const w = c.current;
|
|
8469
8462
|
if (w) {
|
|
8470
8463
|
g.current = g.current || {
|
|
@@ -8588,7 +8581,7 @@ function ul() {
|
|
|
8588
8581
|
};
|
|
8589
8582
|
}
|
|
8590
8583
|
async function tf(e, t) {
|
|
8591
|
-
return await
|
|
8584
|
+
return await An(e, {
|
|
8592
8585
|
responseType: "blob",
|
|
8593
8586
|
onDownloadProgress: (r) => {
|
|
8594
8587
|
try {
|
|
@@ -8607,7 +8600,7 @@ async function Ww(e, t) {
|
|
|
8607
8600
|
const n = await tf(`/files/${e}/download`, t), r = URL.createObjectURL(n);
|
|
8608
8601
|
let o = `file_${e}`;
|
|
8609
8602
|
try {
|
|
8610
|
-
const i = await
|
|
8603
|
+
const i = await An(`/files/${e}`);
|
|
8611
8604
|
o = (i == null ? void 0 : i.filename) ?? o;
|
|
8612
8605
|
} catch {
|
|
8613
8606
|
}
|
|
@@ -8616,7 +8609,7 @@ async function Ww(e, t) {
|
|
|
8616
8609
|
}
|
|
8617
8610
|
async function Vw(e, t = 50, n = 0) {
|
|
8618
8611
|
const r = { limit: t, offset: n };
|
|
8619
|
-
return e && (r.thread_id = e), await
|
|
8612
|
+
return e && (r.thread_id = e), await An("/files", { params: r });
|
|
8620
8613
|
}
|
|
8621
8614
|
function dl(e) {
|
|
8622
8615
|
const t = e == null ? void 0 : e.trim();
|
|
@@ -8737,11 +8730,11 @@ var Yw = "DismissableLayer", wa = "dismissableLayer.update", Xw = "dismissableLa
|
|
|
8737
8730
|
onDismiss: a,
|
|
8738
8731
|
...l
|
|
8739
8732
|
} = e, c = y.useContext(rf), [u, f] = y.useState(null), p = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = y.useState({}), m = Ve(t, (k) => f(k)), x = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), g = x.indexOf(v), w = u ? x.indexOf(u) : -1, b = c.layersWithOutsidePointerEventsDisabled.size > 0, T = w >= g, C = eb((k) => {
|
|
8740
|
-
const
|
|
8741
|
-
!T ||
|
|
8733
|
+
const N = k.target, A = [...c.branches].some((M) => M.contains(N));
|
|
8734
|
+
!T || A || (o == null || o(k), i == null || i(k), k.defaultPrevented || a == null || a());
|
|
8742
8735
|
}, p), S = tb((k) => {
|
|
8743
|
-
const
|
|
8744
|
-
[...c.branches].some((M) => M.contains(
|
|
8736
|
+
const N = k.target;
|
|
8737
|
+
[...c.branches].some((M) => M.contains(N)) || (s == null || s(k), i == null || i(k), k.defaultPrevented || a == null || a());
|
|
8745
8738
|
}, p);
|
|
8746
8739
|
return Gw((k) => {
|
|
8747
8740
|
w === c.layers.size - 1 && (r == null || r(k), !k.defaultPrevented && a && (k.preventDefault(), a()));
|
|
@@ -8970,7 +8963,7 @@ function lb(e) {
|
|
|
8970
8963
|
var cb = "Portal", Qs = y.forwardRef((e, t) => {
|
|
8971
8964
|
var a;
|
|
8972
8965
|
const { container: n, ...r } = e, [o, s] = y.useState(!1);
|
|
8973
|
-
|
|
8966
|
+
At(() => s(!0), []);
|
|
8974
8967
|
const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
8975
8968
|
return i ? Pu.createPortal(/* @__PURE__ */ d.jsx(Ie.div, { ...r, ref: t }), i) : null;
|
|
8976
8969
|
});
|
|
@@ -9218,7 +9211,7 @@ var Tb = function() {
|
|
|
9218
9211
|
right: t[2],
|
|
9219
9212
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
9220
9213
|
};
|
|
9221
|
-
},
|
|
9214
|
+
}, Nb = uf(), Dr = "data-scroll-locked", Ab = function(e, t, n, r) {
|
|
9222
9215
|
var o = e.left, s = e.top, i = e.right, a = e.gap;
|
|
9223
9216
|
return n === void 0 && (n = "margin"), `
|
|
9224
9217
|
.`.concat(db, ` {
|
|
@@ -9278,7 +9271,7 @@ var Tb = function() {
|
|
|
9278
9271
|
var s = y.useMemo(function() {
|
|
9279
9272
|
return Ib(o);
|
|
9280
9273
|
}, [o]);
|
|
9281
|
-
return y.createElement(
|
|
9274
|
+
return y.createElement(Nb, { styles: Ab(s, !t, o, n ? "" : "!important") });
|
|
9282
9275
|
}, ba = !1;
|
|
9283
9276
|
if (typeof window < "u")
|
|
9284
9277
|
try {
|
|
@@ -9391,15 +9384,15 @@ function Ub(e) {
|
|
|
9391
9384
|
var g = qo(x), w = n.current, b = "deltaX" in x ? x.deltaX : w[0] - g[0], T = "deltaY" in x ? x.deltaY : w[1] - g[1], C, S = x.target, k = Math.abs(b) > Math.abs(T) ? "h" : "v";
|
|
9392
9385
|
if ("touches" in x && k === "h" && S.type === "range")
|
|
9393
9386
|
return !1;
|
|
9394
|
-
var
|
|
9395
|
-
if (!
|
|
9387
|
+
var N = nu(k, S);
|
|
9388
|
+
if (!N)
|
|
9396
9389
|
return !0;
|
|
9397
|
-
if (
|
|
9390
|
+
if (N ? C = k : (C = k === "v" ? "h" : "v", N = nu(k, S)), !N)
|
|
9398
9391
|
return !1;
|
|
9399
9392
|
if (!r.current && "changedTouches" in x && (b || T) && (r.current = C), !C)
|
|
9400
9393
|
return !0;
|
|
9401
|
-
var
|
|
9402
|
-
return $b(
|
|
9394
|
+
var A = r.current || C;
|
|
9395
|
+
return $b(A, v, x, A === "h" ? b : T);
|
|
9403
9396
|
}, []), l = y.useCallback(function(x) {
|
|
9404
9397
|
var v = x;
|
|
9405
9398
|
if (!(!jr.length || jr[jr.length - 1] !== s)) {
|
|
@@ -9713,12 +9706,12 @@ If.displayName = Ef;
|
|
|
9713
9706
|
function gl(e) {
|
|
9714
9707
|
return e ? "open" : "closed";
|
|
9715
9708
|
}
|
|
9716
|
-
var
|
|
9709
|
+
var Nf = "DialogTitleWarning", [xR, Af] = bw(Nf, {
|
|
9717
9710
|
contentName: wr,
|
|
9718
9711
|
titleName: ml,
|
|
9719
9712
|
docsSlug: "dialog"
|
|
9720
9713
|
}), t0 = ({ titleId: e }) => {
|
|
9721
|
-
const t = Nf
|
|
9714
|
+
const t = Af(Nf), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
9722
9715
|
|
|
9723
9716
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
9724
9717
|
|
|
@@ -9727,7 +9720,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
9727
9720
|
e && (document.getElementById(e) || console.error(n));
|
|
9728
9721
|
}, [n, e]), null;
|
|
9729
9722
|
}, n0 = "DialogDescriptionWarning", r0 = ({ contentRef: e, descriptionId: t }) => {
|
|
9730
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
9723
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Af(n0).contentName}}.`;
|
|
9731
9724
|
return y.useEffect(() => {
|
|
9732
9725
|
var s;
|
|
9733
9726
|
const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
@@ -11187,12 +11180,12 @@ class Qn {
|
|
|
11187
11180
|
continue;
|
|
11188
11181
|
}
|
|
11189
11182
|
default: {
|
|
11190
|
-
const
|
|
11183
|
+
const N = 'Token with "' + h.type + '" type was not found.';
|
|
11191
11184
|
if (this.options.silent) {
|
|
11192
|
-
console.error(
|
|
11185
|
+
console.error(N);
|
|
11193
11186
|
return;
|
|
11194
11187
|
} else
|
|
11195
|
-
throw new Error(
|
|
11188
|
+
throw new Error(N);
|
|
11196
11189
|
}
|
|
11197
11190
|
}
|
|
11198
11191
|
}
|
|
@@ -11571,7 +11564,7 @@ function I0(e) {
|
|
|
11571
11564
|
return n.length ? r = t(n.map((o) => o.text).join(`
|
|
11572
11565
|
`)) : r = t(e), r || "";
|
|
11573
11566
|
}
|
|
11574
|
-
function
|
|
11567
|
+
function N0(e) {
|
|
11575
11568
|
return e.name && e.name.trim() ? e.name : e.model && e.model.includes("/") ? e.model.split("/").pop() || null : e.model || null;
|
|
11576
11569
|
}
|
|
11577
11570
|
function du(e) {
|
|
@@ -11595,7 +11588,7 @@ function du(e) {
|
|
|
11595
11588
|
}).join("|") : "";
|
|
11596
11589
|
return `${e.id}:${t}:${n}`;
|
|
11597
11590
|
}
|
|
11598
|
-
function
|
|
11591
|
+
function A0({ className: e }) {
|
|
11599
11592
|
const [t, n] = ye(0);
|
|
11600
11593
|
return dt(() => {
|
|
11601
11594
|
const r = setInterval(() => n((o) => (o + 1) % 4), 500);
|
|
@@ -11634,7 +11627,7 @@ const fu = U.memo(function({
|
|
|
11634
11627
|
onInterruptActionStart: b,
|
|
11635
11628
|
onInterruptActionEnd: T
|
|
11636
11629
|
}) {
|
|
11637
|
-
const [C, S] = ye(!1), [k,
|
|
11630
|
+
const [C, S] = ye(!1), [k, N] = ye("preview"), [A, M] = ye(!1), { currentThreadId: F } = Ka(), { respondToInterrupt: q } = qa(), j = l === "phone" || l === "half-screen", _ = t.role, D = _ === "tool", L = it(() => "type" in t && t.type === "default_message" ? t : null, [t]), ne = !!L, K = !(r && _ !== "user"), {
|
|
11638
11631
|
uploadingFiles: z,
|
|
11639
11632
|
handleFileClick: fe,
|
|
11640
11633
|
fileViewerOpen: W,
|
|
@@ -11664,7 +11657,7 @@ const fu = U.memo(function({
|
|
|
11664
11657
|
[L, t]
|
|
11665
11658
|
), oe = (g == null ? void 0 : g.id) ?? (g == null ? void 0 : g.interrupt_id), ge = Jo(oe), se = g == null ? void 0 : g.value, re = it(() => L ? "" : I0(t.content), [L, t]), Ue = U.useCallback(async () => {
|
|
11666
11659
|
const ie = D ? re : we;
|
|
11667
|
-
async function
|
|
11660
|
+
async function Ae(ke) {
|
|
11668
11661
|
if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
|
|
11669
11662
|
await navigator.clipboard.writeText(ke);
|
|
11670
11663
|
return;
|
|
@@ -11681,7 +11674,7 @@ const fu = U.memo(function({
|
|
|
11681
11674
|
throw new Error("Clipboard API not supported in this context.");
|
|
11682
11675
|
}
|
|
11683
11676
|
try {
|
|
11684
|
-
await
|
|
11677
|
+
await Ae(ie), S(!0), setTimeout(() => S(!1), 2e3), v == null || v(ie);
|
|
11685
11678
|
} catch (ke) {
|
|
11686
11679
|
console.error("Failed to copy:", ke);
|
|
11687
11680
|
}
|
|
@@ -11692,16 +11685,16 @@ const fu = U.memo(function({
|
|
|
11692
11685
|
}, [h, t.id, D, re, we]), st = U.useCallback(() => {
|
|
11693
11686
|
m == null || m(n);
|
|
11694
11687
|
}, [m, n]), at = U.useCallback(() => {
|
|
11695
|
-
const
|
|
11688
|
+
const Ae = te(j ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", Z);
|
|
11696
11689
|
switch (_) {
|
|
11697
11690
|
case "user":
|
|
11698
|
-
return /* @__PURE__ */ d.jsx(Xm, { className:
|
|
11691
|
+
return /* @__PURE__ */ d.jsx(Xm, { className: Ae });
|
|
11699
11692
|
case "assistant":
|
|
11700
|
-
return /* @__PURE__ */ d.jsx(Ci, { className:
|
|
11693
|
+
return /* @__PURE__ */ d.jsx(Ci, { className: Ae });
|
|
11701
11694
|
case "tool":
|
|
11702
|
-
return /* @__PURE__ */ d.jsx(Ym, { className:
|
|
11695
|
+
return /* @__PURE__ */ d.jsx(Ym, { className: Ae });
|
|
11703
11696
|
default:
|
|
11704
|
-
return /* @__PURE__ */ d.jsx(Ci, { className:
|
|
11697
|
+
return /* @__PURE__ */ d.jsx(Ci, { className: Ae });
|
|
11705
11698
|
}
|
|
11706
11699
|
}, [j, Z, _]), gt = U.useCallback(() => {
|
|
11707
11700
|
const ie = "group relative mb-4 flex w-full";
|
|
@@ -11772,15 +11765,15 @@ const fu = U.memo(function({
|
|
|
11772
11765
|
const Me = U.useCallback(async (ie) => {
|
|
11773
11766
|
if (w)
|
|
11774
11767
|
return;
|
|
11775
|
-
const
|
|
11768
|
+
const Ae = Jo(
|
|
11776
11769
|
(ie == null ? void 0 : ie.id) ?? (ie == null ? void 0 : ie.interrupt_id)
|
|
11777
11770
|
);
|
|
11778
|
-
if (!
|
|
11771
|
+
if (!Ae) {
|
|
11779
11772
|
console.warn("Interrupt part missing id", ie);
|
|
11780
11773
|
return;
|
|
11781
11774
|
}
|
|
11782
11775
|
try {
|
|
11783
|
-
b == null || b(), await q(
|
|
11776
|
+
b == null || b(), await q(Ae, !0);
|
|
11784
11777
|
} catch (ke) {
|
|
11785
11778
|
console.error("Failed to approve interrupt:", ke);
|
|
11786
11779
|
} finally {
|
|
@@ -11789,34 +11782,34 @@ const fu = U.memo(function({
|
|
|
11789
11782
|
}, [w, T, b, q]), We = U.useCallback(async (ie) => {
|
|
11790
11783
|
if (w)
|
|
11791
11784
|
return;
|
|
11792
|
-
const
|
|
11785
|
+
const Ae = Jo(
|
|
11793
11786
|
(ie == null ? void 0 : ie.id) ?? (ie == null ? void 0 : ie.interrupt_id)
|
|
11794
11787
|
);
|
|
11795
|
-
if (!
|
|
11788
|
+
if (!Ae) {
|
|
11796
11789
|
console.warn("Interrupt part missing id", ie);
|
|
11797
11790
|
return;
|
|
11798
11791
|
}
|
|
11799
11792
|
try {
|
|
11800
|
-
b == null || b(), await q(
|
|
11793
|
+
b == null || b(), await q(Ae, !1);
|
|
11801
11794
|
} catch (ke) {
|
|
11802
11795
|
console.error("Failed to reject interrupt:", ke);
|
|
11803
11796
|
} finally {
|
|
11804
11797
|
T == null || T();
|
|
11805
11798
|
}
|
|
11806
|
-
}, [w, T, b, q]), ut = U.useCallback(({ part: ie, i:
|
|
11799
|
+
}, [w, T, b, q]), ut = U.useCallback(({ part: ie, i: Ae }) => {
|
|
11807
11800
|
if (ie.type === "text") {
|
|
11808
11801
|
const ke = ie.text ?? "", qe = ke.trim(), rt = dl(qe);
|
|
11809
|
-
return rt && _ !== "tool" ? /* @__PURE__ */ d.jsx(Kf, { data: rt },
|
|
11802
|
+
return rt && _ !== "tool" ? /* @__PURE__ */ d.jsx(Kf, { data: rt }, Ae) : _ === "user" && c && qe.length > u ? /* @__PURE__ */ d.jsx(
|
|
11810
11803
|
P0,
|
|
11811
11804
|
{
|
|
11812
11805
|
text: qe,
|
|
11813
|
-
expanded:
|
|
11806
|
+
expanded: A,
|
|
11814
11807
|
onExpandedChange: M,
|
|
11815
11808
|
previewLength: u,
|
|
11816
11809
|
isCompact: j
|
|
11817
11810
|
},
|
|
11818
|
-
|
|
11819
|
-
) : /* @__PURE__ */ d.jsx(ks, { content: ke, allowHtml: !1 },
|
|
11811
|
+
Ae
|
|
11812
|
+
) : /* @__PURE__ */ d.jsx(ks, { content: ke, allowHtml: !1 }, Ae);
|
|
11820
11813
|
}
|
|
11821
11814
|
if (ie.type === "image_url") {
|
|
11822
11815
|
const ke = ie;
|
|
@@ -11828,7 +11821,7 @@ const fu = U.memo(function({
|
|
|
11828
11821
|
loading: "lazy",
|
|
11829
11822
|
className: "border rounded max-h-[420px] w-auto object-contain"
|
|
11830
11823
|
}
|
|
11831
|
-
) },
|
|
11824
|
+
) }, Ae);
|
|
11832
11825
|
}
|
|
11833
11826
|
if (ie.type === "file") {
|
|
11834
11827
|
const ke = ie, qe = ke.name || "file";
|
|
@@ -11836,18 +11829,18 @@ const fu = U.memo(function({
|
|
|
11836
11829
|
"a",
|
|
11837
11830
|
{
|
|
11838
11831
|
href: ke.url,
|
|
11839
|
-
onClick: (rt) => fe(rt, ke,
|
|
11832
|
+
onClick: (rt) => fe(rt, ke, Ae),
|
|
11840
11833
|
className: `inline-flex items-center gap-2 rounded px-2 py-1 text-xs bg-gray-100 border hover:bg-gray-200
|
|
11841
11834
|
dark:bg-background/10 dark:border-border/30 dark:hover:bg-background/20`,
|
|
11842
11835
|
children: [
|
|
11843
|
-
z[
|
|
11836
|
+
z[Ae] ? /* @__PURE__ */ d.jsx(Da, { className: "h-4 w-4 animate-spin" }) : null,
|
|
11844
11837
|
/* @__PURE__ */ d.jsxs("span", { className: "truncate max-w-[180px]", children: [
|
|
11845
11838
|
qe,
|
|
11846
|
-
z[
|
|
11839
|
+
z[Ae] ? " (processing)" : ""
|
|
11847
11840
|
] })
|
|
11848
11841
|
]
|
|
11849
11842
|
},
|
|
11850
|
-
|
|
11843
|
+
Ae
|
|
11851
11844
|
);
|
|
11852
11845
|
}
|
|
11853
11846
|
if (ie.type === "interrupt") {
|
|
@@ -11864,7 +11857,7 @@ const fu = U.memo(function({
|
|
|
11864
11857
|
isActive: rt,
|
|
11865
11858
|
payload: Pe
|
|
11866
11859
|
},
|
|
11867
|
-
|
|
11860
|
+
Ae
|
|
11868
11861
|
);
|
|
11869
11862
|
}
|
|
11870
11863
|
return null;
|
|
@@ -11876,7 +11869,7 @@ const fu = U.memo(function({
|
|
|
11876
11869
|
_,
|
|
11877
11870
|
c,
|
|
11878
11871
|
u,
|
|
11879
|
-
|
|
11872
|
+
A,
|
|
11880
11873
|
j,
|
|
11881
11874
|
ge,
|
|
11882
11875
|
se,
|
|
@@ -11902,10 +11895,10 @@ const fu = U.memo(function({
|
|
|
11902
11895
|
t.id
|
|
11903
11896
|
);
|
|
11904
11897
|
if (!D && !L) {
|
|
11905
|
-
const
|
|
11898
|
+
const Ae = t, ke = /* @__PURE__ */ d.jsx("div", { className: "space-y-2", children: Ae.content.map((qe, rt) => /* @__PURE__ */ d.jsx(ut, { part: qe, i: rt }, rt)) });
|
|
11906
11899
|
return r ? /* @__PURE__ */ d.jsxs("div", { "aria-busy": "true", role: "status", children: [
|
|
11907
11900
|
ke,
|
|
11908
|
-
/* @__PURE__ */ d.jsx(
|
|
11901
|
+
/* @__PURE__ */ d.jsx(A0, { className: Z })
|
|
11909
11902
|
] }) : ke;
|
|
11910
11903
|
}
|
|
11911
11904
|
}, [
|
|
@@ -11918,7 +11911,7 @@ const fu = U.memo(function({
|
|
|
11918
11911
|
k,
|
|
11919
11912
|
yt,
|
|
11920
11913
|
Z
|
|
11921
|
-
]), Ze = it(() => L ? "Assistant" :
|
|
11914
|
+
]), Ze = it(() => L ? "Assistant" : N0(t), [L, t]);
|
|
11922
11915
|
return D && !f ? null : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
11923
11916
|
/* @__PURE__ */ d.jsx("div", { className: te(gt(), p.container), children: /* @__PURE__ */ d.jsxs("div", { className: te(nt(), p.content), children: [
|
|
11924
11917
|
(i || a || D) && /* @__PURE__ */ d.jsxs(
|
|
@@ -11947,9 +11940,9 @@ const fu = U.memo(function({
|
|
|
11947
11940
|
role: "button",
|
|
11948
11941
|
tabIndex: 0,
|
|
11949
11942
|
"aria-expanded": k === "expanded",
|
|
11950
|
-
onClick: () =>
|
|
11943
|
+
onClick: () => N((ie) => ie === "expanded" ? "preview" : "expanded"),
|
|
11951
11944
|
onKeyDown: (ie) => {
|
|
11952
|
-
(ie.key === "Enter" || ie.key === " ") && (ie.preventDefault(),
|
|
11945
|
+
(ie.key === "Enter" || ie.key === " ") && (ie.preventDefault(), N((Ae) => Ae === "expanded" ? "preview" : "expanded"));
|
|
11953
11946
|
},
|
|
11954
11947
|
children: [
|
|
11955
11948
|
/* @__PURE__ */ d.jsx("span", { children: xe.name ?? "Tool Output" }),
|
|
@@ -12330,7 +12323,7 @@ const pu = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, qf = U.forwa
|
|
|
12330
12323
|
onInterruptActionEnd: C,
|
|
12331
12324
|
showToolMessages: S = !0
|
|
12332
12325
|
}, k) => {
|
|
12333
|
-
const
|
|
12326
|
+
const N = Le(null), A = Le(null), M = Le(!1), [F, q] = ye(!0), j = it(() => w ? e.some((W) => "type" in W && W.type === "default_message" ? !1 : Array.isArray(W == null ? void 0 : W.content) && W.content.some(
|
|
12334
12327
|
(ce) => ce && ce.type === "interrupt" && (ce.id ?? ce.interrupt_id) === w.id
|
|
12335
12328
|
)) : !1, [w, e]), _ = it(() => {
|
|
12336
12329
|
if (!w || j)
|
|
@@ -12401,10 +12394,10 @@ const pu = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, qf = U.forwa
|
|
|
12401
12394
|
ow,
|
|
12402
12395
|
{
|
|
12403
12396
|
ref: (W) => {
|
|
12404
|
-
|
|
12397
|
+
N.current = W;
|
|
12405
12398
|
},
|
|
12406
12399
|
scrollerRef: (W) => {
|
|
12407
|
-
|
|
12400
|
+
A.current = W instanceof HTMLDivElement ? W : null;
|
|
12408
12401
|
},
|
|
12409
12402
|
data: L,
|
|
12410
12403
|
followOutput: z,
|
|
@@ -12827,7 +12820,7 @@ const J0 = (e) => ({
|
|
|
12827
12820
|
}, h = Sl(o), m = bl(h), x = await i.getDimensions(c), v = h === "y", g = v ? "top" : "left", w = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", T = s.reference[m] + s.reference[h] - p[h] - s.floating[m], C = p[h] - s.reference[h], S = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
|
|
12828
12821
|
let k = S ? S[b] : 0;
|
|
12829
12822
|
(!k || !await (i.isElement == null ? void 0 : i.isElement(S))) && (k = a.floating[b] || s.floating[m]);
|
|
12830
|
-
const
|
|
12823
|
+
const N = T / 2 - C / 2, A = k / 2 - x[m] / 2 - 1, M = er(f[g], A), F = er(f[w], A), q = M, j = k - x[m] - F, _ = k / 2 - x[m] / 2 + N, D = Sa(q, _, j), L = !l.arrow && qr(o) != null && _ !== D && s.reference[m] / 2 - (_ < q ? M : F) - x[m] / 2 < 0, ne = L ? _ < q ? _ - q : _ - j : 0;
|
|
12831
12824
|
return {
|
|
12832
12825
|
[h]: p[h] + ne,
|
|
12833
12826
|
data: {
|
|
@@ -12866,16 +12859,16 @@ const J0 = (e) => ({
|
|
|
12866
12859
|
return {};
|
|
12867
12860
|
const g = Kn(o), w = On(a), b = Kn(a) === a, T = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), C = p || (b || !x ? [Es(a)] : W0(a)), S = m !== "none";
|
|
12868
12861
|
!p && S && C.push(...G0(a, x, m, T));
|
|
12869
|
-
const k = [a, ...C],
|
|
12862
|
+
const k = [a, ...C], N = await So(t, v), A = [];
|
|
12870
12863
|
let M = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
12871
|
-
if (u &&
|
|
12864
|
+
if (u && A.push(N[g]), f) {
|
|
12872
12865
|
const _ = U0(o, i, T);
|
|
12873
|
-
|
|
12866
|
+
A.push(N[_[0]], N[_[1]]);
|
|
12874
12867
|
}
|
|
12875
12868
|
if (M = [...M, {
|
|
12876
12869
|
placement: o,
|
|
12877
|
-
overflows:
|
|
12878
|
-
}], !
|
|
12870
|
+
overflows: A
|
|
12871
|
+
}], !A.every((_) => _ <= 0)) {
|
|
12879
12872
|
var F, q;
|
|
12880
12873
|
const _ = (((F = s.flip) == null ? void 0 : F.index) || 0) + 1, D = k[_];
|
|
12881
12874
|
if (D && (!(f === "alignment" ? w !== On(D) : !1) || // We leave the current main axis only if every placement on that axis
|
|
@@ -13144,18 +13137,18 @@ const tS = function(e) {
|
|
|
13144
13137
|
let v, g;
|
|
13145
13138
|
f === "top" || f === "bottom" ? (v = f, g = p === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = f, v = p === "end" ? "top" : "bottom");
|
|
13146
13139
|
const w = x - u.top - u.bottom, b = m - u.left - u.right, T = er(x - u[v], w), C = er(m - u[g], b), S = !t.middlewareData.shift;
|
|
13147
|
-
let k = T,
|
|
13148
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
13140
|
+
let k = T, N = C;
|
|
13141
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (N = b), (r = t.middlewareData.shift) != null && r.enabled.y && (k = w), S && !p) {
|
|
13149
13142
|
const M = Xt(u.left, 0), F = Xt(u.right, 0), q = Xt(u.top, 0), j = Xt(u.bottom, 0);
|
|
13150
|
-
h ?
|
|
13143
|
+
h ? N = m - 2 * (M !== 0 || F !== 0 ? M + F : Xt(u.left, u.right)) : k = x - 2 * (q !== 0 || j !== 0 ? q + j : Xt(u.top, u.bottom));
|
|
13151
13144
|
}
|
|
13152
13145
|
await l({
|
|
13153
13146
|
...t,
|
|
13154
|
-
availableWidth:
|
|
13147
|
+
availableWidth: N,
|
|
13155
13148
|
availableHeight: k
|
|
13156
13149
|
});
|
|
13157
|
-
const
|
|
13158
|
-
return m !==
|
|
13150
|
+
const A = await i.getDimensions(a.floating);
|
|
13151
|
+
return m !== A.width || x !== A.height ? {
|
|
13159
13152
|
reset: {
|
|
13160
13153
|
rects: !0
|
|
13161
13154
|
}
|
|
@@ -13568,7 +13561,7 @@ const IS = {
|
|
|
13568
13561
|
function rp(e, t) {
|
|
13569
13562
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
13570
13563
|
}
|
|
13571
|
-
function
|
|
13564
|
+
function NS(e, t) {
|
|
13572
13565
|
let n = null, r;
|
|
13573
13566
|
const o = zn(e);
|
|
13574
13567
|
function s() {
|
|
@@ -13614,7 +13607,7 @@ function AS(e, t) {
|
|
|
13614
13607
|
}
|
|
13615
13608
|
return i(!0), s;
|
|
13616
13609
|
}
|
|
13617
|
-
function
|
|
13610
|
+
function AS(e, t, n, r) {
|
|
13618
13611
|
r === void 0 && (r = {});
|
|
13619
13612
|
const {
|
|
13620
13613
|
ancestorScroll: o = !0,
|
|
@@ -13628,7 +13621,7 @@ function NS(e, t, n, r) {
|
|
|
13628
13621
|
passive: !0
|
|
13629
13622
|
}), s && g.addEventListener("resize", n);
|
|
13630
13623
|
});
|
|
13631
|
-
const f = c && a ?
|
|
13624
|
+
const f = c && a ? NS(c, n) : null;
|
|
13632
13625
|
let p = -1, h = null;
|
|
13633
13626
|
i && (h = new ResizeObserver((g) => {
|
|
13634
13627
|
let [w] = g;
|
|
@@ -13665,7 +13658,7 @@ const _S = tS, jS = nS, PS = Z0, OS = oS, MS = Q0, Cu = J0, DS = rS, LS = (e, t,
|
|
|
13665
13658
|
};
|
|
13666
13659
|
var FS = typeof document < "u", $S = function() {
|
|
13667
13660
|
}, hs = FS ? Um : $S;
|
|
13668
|
-
function
|
|
13661
|
+
function Ns(e, t) {
|
|
13669
13662
|
if (e === t)
|
|
13670
13663
|
return !0;
|
|
13671
13664
|
if (typeof e != typeof t)
|
|
@@ -13677,7 +13670,7 @@ function As(e, t) {
|
|
|
13677
13670
|
if (Array.isArray(e)) {
|
|
13678
13671
|
if (n = e.length, n !== t.length) return !1;
|
|
13679
13672
|
for (r = n; r-- !== 0; )
|
|
13680
|
-
if (!
|
|
13673
|
+
if (!Ns(e[r], t[r]))
|
|
13681
13674
|
return !1;
|
|
13682
13675
|
return !0;
|
|
13683
13676
|
}
|
|
@@ -13688,7 +13681,7 @@ function As(e, t) {
|
|
|
13688
13681
|
return !1;
|
|
13689
13682
|
for (r = n; r-- !== 0; ) {
|
|
13690
13683
|
const s = o[r];
|
|
13691
|
-
if (!(s === "_owner" && e.$$typeof) && !
|
|
13684
|
+
if (!(s === "_owner" && e.$$typeof) && !Ns(e[s], t[s]))
|
|
13692
13685
|
return !1;
|
|
13693
13686
|
}
|
|
13694
13687
|
return !0;
|
|
@@ -13730,12 +13723,12 @@ function zS(e) {
|
|
|
13730
13723
|
middlewareData: {},
|
|
13731
13724
|
isPositioned: !1
|
|
13732
13725
|
}), [p, h] = y.useState(r);
|
|
13733
|
-
|
|
13726
|
+
Ns(p, r) || h(r);
|
|
13734
13727
|
const [m, x] = y.useState(null), [v, g] = y.useState(null), w = y.useCallback((K) => {
|
|
13735
13728
|
K !== S.current && (S.current = K, x(K));
|
|
13736
13729
|
}, []), b = y.useCallback((K) => {
|
|
13737
13730
|
K !== k.current && (k.current = K, g(K));
|
|
13738
|
-
}, []), T = s || m, C = i || v, S = y.useRef(null), k = y.useRef(null),
|
|
13731
|
+
}, []), T = s || m, C = i || v, S = y.useRef(null), k = y.useRef(null), N = y.useRef(u), A = l != null, M = Xi(l), F = Xi(o), q = Xi(c), j = y.useCallback(() => {
|
|
13739
13732
|
if (!S.current || !k.current)
|
|
13740
13733
|
return;
|
|
13741
13734
|
const K = {
|
|
@@ -13752,13 +13745,13 @@ function zS(e) {
|
|
|
13752
13745
|
// setting it to `true` when `open === false` (must be specified).
|
|
13753
13746
|
isPositioned: q.current !== !1
|
|
13754
13747
|
};
|
|
13755
|
-
_.current && !
|
|
13748
|
+
_.current && !Ns(N.current, fe) && (N.current = fe, $s.flushSync(() => {
|
|
13756
13749
|
f(fe);
|
|
13757
13750
|
}));
|
|
13758
13751
|
});
|
|
13759
13752
|
}, [p, t, n, F, q]);
|
|
13760
13753
|
hs(() => {
|
|
13761
|
-
c === !1 &&
|
|
13754
|
+
c === !1 && N.current.isPositioned && (N.current.isPositioned = !1, f((K) => ({
|
|
13762
13755
|
...K,
|
|
13763
13756
|
isPositioned: !1
|
|
13764
13757
|
})));
|
|
@@ -13772,7 +13765,7 @@ function zS(e) {
|
|
|
13772
13765
|
return M.current(T, C, j);
|
|
13773
13766
|
j();
|
|
13774
13767
|
}
|
|
13775
|
-
}, [T, C, j, M,
|
|
13768
|
+
}, [T, C, j, M, A]);
|
|
13776
13769
|
const D = y.useMemo(() => ({
|
|
13777
13770
|
reference: S,
|
|
13778
13771
|
floating: k,
|
|
@@ -13872,7 +13865,7 @@ sp.displayName = YS;
|
|
|
13872
13865
|
var XS = sp;
|
|
13873
13866
|
function ip(e) {
|
|
13874
13867
|
const [t, n] = y.useState(void 0);
|
|
13875
|
-
return
|
|
13868
|
+
return At(() => {
|
|
13876
13869
|
if (e) {
|
|
13877
13870
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
13878
13871
|
const r = new ResizeObserver((o) => {
|
|
@@ -13925,7 +13918,7 @@ var El = "PopperContent", [ZS, QS] = ap(El), fp = y.forwardRef(
|
|
|
13925
13918
|
updatePositionStrategy: h = "optimized",
|
|
13926
13919
|
onPlaced: m,
|
|
13927
13920
|
...x
|
|
13928
|
-
} = e, v = lp(El, n), [g, w] = y.useState(null), b = Ve(t, (re) => w(re)), [T, C] = y.useState(null), S = ip(T), k = (S == null ? void 0 : S.width) ?? 0,
|
|
13921
|
+
} = e, v = lp(El, n), [g, w] = y.useState(null), b = Ve(t, (re) => w(re)), [T, C] = y.useState(null), S = ip(T), k = (S == null ? void 0 : S.width) ?? 0, N = (S == null ? void 0 : S.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), M = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, F = Array.isArray(c) ? c : [c], q = F.length > 0, j = {
|
|
13929
13922
|
padding: M,
|
|
13930
13923
|
boundary: F.filter(tC),
|
|
13931
13924
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -13933,15 +13926,15 @@ var El = "PopperContent", [ZS, QS] = ap(El), fp = y.forwardRef(
|
|
|
13933
13926
|
}, { refs: _, floatingStyles: D, placement: L, isPositioned: ne, middlewareData: K } = zS({
|
|
13934
13927
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
13935
13928
|
strategy: "fixed",
|
|
13936
|
-
placement:
|
|
13937
|
-
whileElementsMounted: (...re) =>
|
|
13929
|
+
placement: A,
|
|
13930
|
+
whileElementsMounted: (...re) => AS(...re, {
|
|
13938
13931
|
animationFrame: h === "always"
|
|
13939
13932
|
}),
|
|
13940
13933
|
elements: {
|
|
13941
13934
|
reference: v.anchor
|
|
13942
13935
|
},
|
|
13943
13936
|
middleware: [
|
|
13944
|
-
HS({ mainAxis: o +
|
|
13937
|
+
HS({ mainAxis: o + N, alignmentAxis: i }),
|
|
13945
13938
|
l && US({
|
|
13946
13939
|
mainAxis: !0,
|
|
13947
13940
|
crossAxis: !1,
|
|
@@ -13957,15 +13950,15 @@ var El = "PopperContent", [ZS, QS] = ap(El), fp = y.forwardRef(
|
|
|
13957
13950
|
}
|
|
13958
13951
|
}),
|
|
13959
13952
|
T && GS({ element: T, padding: a }),
|
|
13960
|
-
nC({ arrowWidth: k, arrowHeight:
|
|
13953
|
+
nC({ arrowWidth: k, arrowHeight: N }),
|
|
13961
13954
|
p && qS({ strategy: "referenceHidden", ...j })
|
|
13962
13955
|
]
|
|
13963
13956
|
}), [z, fe] = mp(L), W = Ot(m);
|
|
13964
|
-
|
|
13957
|
+
At(() => {
|
|
13965
13958
|
ne && (W == null || W());
|
|
13966
13959
|
}, [ne, W]);
|
|
13967
13960
|
const ce = (G = K.arrow) == null ? void 0 : G.x, B = (O = K.arrow) == null ? void 0 : O.y, Z = ((X = K.arrow) == null ? void 0 : X.centerOffset) !== 0, [we, xe] = y.useState();
|
|
13968
|
-
return
|
|
13961
|
+
return At(() => {
|
|
13969
13962
|
g && xe(window.getComputedStyle(g).zIndex);
|
|
13970
13963
|
}, [g]), /* @__PURE__ */ d.jsx(
|
|
13971
13964
|
"div",
|
|
@@ -14116,9 +14109,9 @@ var lC = y.forwardRef((e, t) => {
|
|
|
14116
14109
|
caller: Mo
|
|
14117
14110
|
}), [g, w] = y.useState(!1), b = Ot(c), T = wp(n), C = y.useRef(!1), [S, k] = y.useState(0);
|
|
14118
14111
|
return y.useEffect(() => {
|
|
14119
|
-
const
|
|
14120
|
-
if (
|
|
14121
|
-
return
|
|
14112
|
+
const N = p.current;
|
|
14113
|
+
if (N)
|
|
14114
|
+
return N.addEventListener(Ji, b), () => N.removeEventListener(Ji, b);
|
|
14122
14115
|
}, [b]), /* @__PURE__ */ d.jsx(
|
|
14123
14116
|
iC,
|
|
14124
14117
|
{
|
|
@@ -14128,16 +14121,16 @@ var lC = y.forwardRef((e, t) => {
|
|
|
14128
14121
|
loop: o,
|
|
14129
14122
|
currentTabStopId: x,
|
|
14130
14123
|
onItemFocus: y.useCallback(
|
|
14131
|
-
(
|
|
14124
|
+
(N) => v(N),
|
|
14132
14125
|
[v]
|
|
14133
14126
|
),
|
|
14134
14127
|
onItemShiftTab: y.useCallback(() => w(!0), []),
|
|
14135
14128
|
onFocusableItemAdd: y.useCallback(
|
|
14136
|
-
() => k((
|
|
14129
|
+
() => k((N) => N + 1),
|
|
14137
14130
|
[]
|
|
14138
14131
|
),
|
|
14139
14132
|
onFocusableItemRemove: y.useCallback(
|
|
14140
|
-
() => k((
|
|
14133
|
+
() => k((N) => N - 1),
|
|
14141
14134
|
[]
|
|
14142
14135
|
),
|
|
14143
14136
|
children: /* @__PURE__ */ d.jsx(
|
|
@@ -14151,11 +14144,11 @@ var lC = y.forwardRef((e, t) => {
|
|
|
14151
14144
|
onMouseDown: me(e.onMouseDown, () => {
|
|
14152
14145
|
C.current = !0;
|
|
14153
14146
|
}),
|
|
14154
|
-
onFocus: me(e.onFocus, (
|
|
14155
|
-
const
|
|
14156
|
-
if (
|
|
14147
|
+
onFocus: me(e.onFocus, (N) => {
|
|
14148
|
+
const A = !C.current;
|
|
14149
|
+
if (N.target === N.currentTarget && A && !g) {
|
|
14157
14150
|
const M = new CustomEvent(Ji, rC);
|
|
14158
|
-
if (
|
|
14151
|
+
if (N.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
|
|
14159
14152
|
const F = T().filter((L) => L.focusable), q = F.find((L) => L.active), j = F.find((L) => L.id === x), D = [q, j, ...F].filter(
|
|
14160
14153
|
Boolean
|
|
14161
14154
|
).map((L) => L.ref.current);
|
|
@@ -14264,7 +14257,7 @@ var pC = Sp, hC = Tp, Ra = ["Enter", " "], mC = ["ArrowDown", "PageUp", "Home"],
|
|
|
14264
14257
|
wC,
|
|
14265
14258
|
di,
|
|
14266
14259
|
bp
|
|
14267
|
-
]), fi = di(), Ip = bp(), [bC, Ir] = Er(Do), [SC, Lo] = Er(Do),
|
|
14260
|
+
]), fi = di(), Ip = bp(), [bC, Ir] = Er(Do), [SC, Lo] = Er(Do), Np = (e) => {
|
|
14268
14261
|
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = fi(t), [l, c] = y.useState(null), u = y.useRef(!1), f = Ot(s), p = ii(o);
|
|
14269
14262
|
return y.useEffect(() => {
|
|
14270
14263
|
const h = () => {
|
|
@@ -14295,7 +14288,7 @@ var pC = Sp, hC = Tp, Ra = ["Enter", " "], mC = ["ArrowDown", "PageUp", "Home"],
|
|
|
14295
14288
|
}
|
|
14296
14289
|
) });
|
|
14297
14290
|
};
|
|
14298
|
-
|
|
14291
|
+
Np.displayName = Do;
|
|
14299
14292
|
var CC = "MenuAnchor", Il = y.forwardRef(
|
|
14300
14293
|
(e, t) => {
|
|
14301
14294
|
const { __scopeMenu: n, ...r } = e, o = fi(n);
|
|
@@ -14303,16 +14296,16 @@ var CC = "MenuAnchor", Il = y.forwardRef(
|
|
|
14303
14296
|
}
|
|
14304
14297
|
);
|
|
14305
14298
|
Il.displayName = CC;
|
|
14306
|
-
var
|
|
14299
|
+
var Nl = "MenuPortal", [TC, Ap] = Er(Nl, {
|
|
14307
14300
|
forceMount: void 0
|
|
14308
14301
|
}), _p = (e) => {
|
|
14309
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Ir(
|
|
14302
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Ir(Nl, t);
|
|
14310
14303
|
return /* @__PURE__ */ d.jsx(TC, { scope: t, forceMount: n, children: /* @__PURE__ */ d.jsx(en, { present: n || s.open, children: /* @__PURE__ */ d.jsx(Qs, { asChild: !0, container: o, children: r }) }) });
|
|
14311
14304
|
};
|
|
14312
|
-
_p.displayName =
|
|
14313
|
-
var ln = "MenuContent", [kC,
|
|
14305
|
+
_p.displayName = Nl;
|
|
14306
|
+
var ln = "MenuContent", [kC, Al] = Er(ln), jp = y.forwardRef(
|
|
14314
14307
|
(e, t) => {
|
|
14315
|
-
const n =
|
|
14308
|
+
const n = Ap(ln, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Ir(ln, e.__scopeMenu), i = Lo(ln, e.__scopeMenu);
|
|
14316
14309
|
return /* @__PURE__ */ d.jsx(To.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(en, { present: r || s.open, children: /* @__PURE__ */ d.jsx(To.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ d.jsx(RC, { ...o, ref: t }) : /* @__PURE__ */ d.jsx(EC, { ...o, ref: t }) }) }) });
|
|
14317
14310
|
}
|
|
14318
14311
|
), RC = y.forwardRef(
|
|
@@ -14368,14 +14361,14 @@ var ln = "MenuContent", [kC, Nl] = Er(ln), jp = y.forwardRef(
|
|
|
14368
14361
|
onDismiss: h,
|
|
14369
14362
|
disableOutsideScroll: m,
|
|
14370
14363
|
...x
|
|
14371
|
-
} = e, v = Ir(ln, n), g = Lo(ln, n), w = fi(n), b = Ip(n), T = vC(n), [C, S] = y.useState(null), k = y.useRef(null),
|
|
14364
|
+
} = e, v = Ir(ln, n), g = Lo(ln, n), w = fi(n), b = Ip(n), T = vC(n), [C, S] = y.useState(null), k = y.useRef(null), N = Ve(t, k, v.onContentChange), A = y.useRef(0), M = y.useRef(""), F = y.useRef(0), q = y.useRef(null), j = y.useRef("right"), _ = y.useRef(0), D = m ? ti : y.Fragment, L = m ? { as: IC, allowPinchZoom: !0 } : void 0, ne = (z) => {
|
|
14372
14365
|
var G, O;
|
|
14373
14366
|
const fe = M.current + z, W = T().filter((X) => !X.disabled), ce = document.activeElement, B = (G = W.find((X) => X.ref.current === ce)) == null ? void 0 : G.textValue, Z = W.map((X) => X.textValue), we = zC(Z, fe, B), xe = (O = W.find((X) => X.textValue === we)) == null ? void 0 : O.ref.current;
|
|
14374
14367
|
(function X(oe) {
|
|
14375
|
-
M.current = oe, window.clearTimeout(
|
|
14368
|
+
M.current = oe, window.clearTimeout(A.current), oe !== "" && (A.current = window.setTimeout(() => X(""), 1e3));
|
|
14376
14369
|
})(fe), xe && setTimeout(() => xe.focus());
|
|
14377
14370
|
};
|
|
14378
|
-
y.useEffect(() => () => window.clearTimeout(
|
|
14371
|
+
y.useEffect(() => () => window.clearTimeout(A.current), []), fl();
|
|
14379
14372
|
const K = y.useCallback((z) => {
|
|
14380
14373
|
var W, ce;
|
|
14381
14374
|
return j.current === ((W = q.current) == null ? void 0 : W.side) && HC(z, (ce = q.current) == null ? void 0 : ce.area);
|
|
@@ -14452,7 +14445,7 @@ var ln = "MenuContent", [kC, Nl] = Er(ln), jp = y.forwardRef(
|
|
|
14452
14445
|
dir: g.dir,
|
|
14453
14446
|
...w,
|
|
14454
14447
|
...x,
|
|
14455
|
-
ref:
|
|
14448
|
+
ref: N,
|
|
14456
14449
|
style: { outline: "none", ...x.style },
|
|
14457
14450
|
onKeyDown: me(x.onKeyDown, (z) => {
|
|
14458
14451
|
const W = z.target.closest("[data-radix-menu-content]") === z.currentTarget, ce = z.ctrlKey || z.altKey || z.metaKey, B = z.key.length === 1;
|
|
@@ -14464,7 +14457,7 @@ var ln = "MenuContent", [kC, Nl] = Er(ln), jp = y.forwardRef(
|
|
|
14464
14457
|
Rp.includes(z.key) && xe.reverse(), FC(xe);
|
|
14465
14458
|
}),
|
|
14466
14459
|
onBlur: me(e.onBlur, (z) => {
|
|
14467
|
-
z.currentTarget.contains(z.target) || (window.clearTimeout(
|
|
14460
|
+
z.currentTarget.contains(z.target) || (window.clearTimeout(A.current), M.current = "");
|
|
14468
14461
|
}),
|
|
14469
14462
|
onPointerMove: me(
|
|
14470
14463
|
e.onPointerMove,
|
|
@@ -14489,23 +14482,23 @@ var ln = "MenuContent", [kC, Nl] = Er(ln), jp = y.forwardRef(
|
|
|
14489
14482
|
}
|
|
14490
14483
|
);
|
|
14491
14484
|
jp.displayName = ln;
|
|
14492
|
-
var
|
|
14485
|
+
var NC = "MenuGroup", jl = y.forwardRef(
|
|
14493
14486
|
(e, t) => {
|
|
14494
14487
|
const { __scopeMenu: n, ...r } = e;
|
|
14495
14488
|
return /* @__PURE__ */ d.jsx(Ie.div, { role: "group", ...r, ref: t });
|
|
14496
14489
|
}
|
|
14497
14490
|
);
|
|
14498
|
-
jl.displayName =
|
|
14499
|
-
var
|
|
14491
|
+
jl.displayName = NC;
|
|
14492
|
+
var AC = "MenuLabel", Pp = y.forwardRef(
|
|
14500
14493
|
(e, t) => {
|
|
14501
14494
|
const { __scopeMenu: n, ...r } = e;
|
|
14502
14495
|
return /* @__PURE__ */ d.jsx(Ie.div, { ...r, ref: t });
|
|
14503
14496
|
}
|
|
14504
14497
|
);
|
|
14505
|
-
Pp.displayName =
|
|
14506
|
-
var
|
|
14498
|
+
Pp.displayName = AC;
|
|
14499
|
+
var As = "MenuItem", ku = "menu.itemSelect", pi = y.forwardRef(
|
|
14507
14500
|
(e, t) => {
|
|
14508
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, s = y.useRef(null), i = Lo(
|
|
14501
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = y.useRef(null), i = Lo(As, e.__scopeMenu), a = Al(As, e.__scopeMenu), l = Ve(t, s), c = y.useRef(!1), u = () => {
|
|
14509
14502
|
const f = s.current;
|
|
14510
14503
|
if (!n && f) {
|
|
14511
14504
|
const p = new CustomEvent(ku, { bubbles: !0, cancelable: !0 });
|
|
@@ -14535,10 +14528,10 @@ var Ns = "MenuItem", ku = "menu.itemSelect", pi = y.forwardRef(
|
|
|
14535
14528
|
);
|
|
14536
14529
|
}
|
|
14537
14530
|
);
|
|
14538
|
-
pi.displayName =
|
|
14531
|
+
pi.displayName = As;
|
|
14539
14532
|
var Op = y.forwardRef(
|
|
14540
14533
|
(e, t) => {
|
|
14541
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i =
|
|
14534
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Al(As, n), a = Ip(n), l = y.useRef(null), c = Ve(t, l), [u, f] = y.useState(!1), [p, h] = y.useState("");
|
|
14542
14535
|
return y.useEffect(() => {
|
|
14543
14536
|
const m = l.current;
|
|
14544
14537
|
m && h((m.textContent ?? "").trim());
|
|
@@ -14677,7 +14670,7 @@ var DC = "MenuArrow", Up = y.forwardRef(
|
|
|
14677
14670
|
Up.displayName = DC;
|
|
14678
14671
|
var LC = "MenuSub", [yR, Wp] = Er(LC), oo = "MenuSubTrigger", Vp = y.forwardRef(
|
|
14679
14672
|
(e, t) => {
|
|
14680
|
-
const n = Ir(oo, e.__scopeMenu), r = Lo(oo, e.__scopeMenu), o = Wp(oo, e.__scopeMenu), s =
|
|
14673
|
+
const n = Ir(oo, e.__scopeMenu), r = Lo(oo, e.__scopeMenu), o = Wp(oo, e.__scopeMenu), s = Al(oo, e.__scopeMenu), i = y.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, u = y.useCallback(() => {
|
|
14681
14674
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
14682
14675
|
}, []);
|
|
14683
14676
|
return y.useEffect(() => u, [u]), y.useEffect(() => {
|
|
@@ -14748,7 +14741,7 @@ var LC = "MenuSub", [yR, Wp] = Er(LC), oo = "MenuSubTrigger", Vp = y.forwardRef(
|
|
|
14748
14741
|
Vp.displayName = oo;
|
|
14749
14742
|
var Kp = "MenuSubContent", qp = y.forwardRef(
|
|
14750
14743
|
(e, t) => {
|
|
14751
|
-
const n =
|
|
14744
|
+
const n = Ap(ln, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Ir(ln, e.__scopeMenu), i = Lo(ln, e.__scopeMenu), a = Wp(Kp, e.__scopeMenu), l = y.useRef(null), c = Ve(t, l);
|
|
14752
14745
|
return /* @__PURE__ */ d.jsx(To.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(en, { present: r || s.open, children: /* @__PURE__ */ d.jsx(To.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(
|
|
14753
14746
|
_l,
|
|
14754
14747
|
{
|
|
@@ -14825,7 +14818,7 @@ function HC(e, t) {
|
|
|
14825
14818
|
function ko(e) {
|
|
14826
14819
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
14827
14820
|
}
|
|
14828
|
-
var UC =
|
|
14821
|
+
var UC = Np, WC = Il, VC = _p, KC = jp, qC = jl, GC = Pp, YC = pi, XC = Mp, JC = Lp, ZC = $p, QC = Bp, eT = Hp, tT = Up, nT = Vp, rT = qp, hi = "DropdownMenu", [oT, vR] = $n(
|
|
14829
14822
|
hi,
|
|
14830
14823
|
[Ep]
|
|
14831
14824
|
), Ht = Ep(), [sT, Yp] = oT(hi), Xp = (e) => {
|
|
@@ -15074,7 +15067,7 @@ const IT = y.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
|
|
|
15074
15067
|
}
|
|
15075
15068
|
));
|
|
15076
15069
|
IT.displayName = ph.displayName;
|
|
15077
|
-
const
|
|
15070
|
+
const NT = y.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
|
|
15078
15071
|
hh,
|
|
15079
15072
|
{
|
|
15080
15073
|
ref: r,
|
|
@@ -15089,8 +15082,8 @@ const AT = y.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
15089
15082
|
]
|
|
15090
15083
|
}
|
|
15091
15084
|
));
|
|
15092
|
-
|
|
15093
|
-
const
|
|
15085
|
+
NT.displayName = hh.displayName;
|
|
15086
|
+
const AT = y.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ d.jsx(
|
|
15094
15087
|
dh,
|
|
15095
15088
|
{
|
|
15096
15089
|
ref: r,
|
|
@@ -15102,7 +15095,7 @@ const NT = y.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
15102
15095
|
...n
|
|
15103
15096
|
}
|
|
15104
15097
|
));
|
|
15105
|
-
|
|
15098
|
+
AT.displayName = dh.displayName;
|
|
15106
15099
|
const _T = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
|
|
15107
15100
|
gh,
|
|
15108
15101
|
{
|
|
@@ -15140,12 +15133,12 @@ function Zi({
|
|
|
15140
15133
|
isLoading: C,
|
|
15141
15134
|
loadOlder: S,
|
|
15142
15135
|
navigateToCheckpoint: k,
|
|
15143
|
-
returnToLatest:
|
|
15144
|
-
checkpoint:
|
|
15136
|
+
returnToLatest: N,
|
|
15137
|
+
checkpoint: A,
|
|
15145
15138
|
checkpoints: M,
|
|
15146
15139
|
interrupt: F,
|
|
15147
15140
|
metadata: q
|
|
15148
|
-
} = qa(), { isStreaming: j, error: _, submit: D, stop: L } = Vy(), ne = g ?? v ?? null, K = (
|
|
15141
|
+
} = qa(), { isStreaming: j, error: _, submit: D, stop: L } = Vy(), ne = g ?? v ?? null, K = (A == null ? void 0 : A.id) ?? null, z = (A == null ? void 0 : A.namespace) ?? null, fe = (q == null ? void 0 : q.assemblingMessageId) ?? null, W = F, [ce, B] = ye(!1);
|
|
15149
15142
|
dt(() => {
|
|
15150
15143
|
W || B(!1);
|
|
15151
15144
|
}, [W]);
|
|
@@ -15153,7 +15146,7 @@ function Zi({
|
|
|
15153
15146
|
B(!0);
|
|
15154
15147
|
}, []), we = Te(() => {
|
|
15155
15148
|
B(!1);
|
|
15156
|
-
}, []), xe = !!W || ce, [G, O] = ye(null), [X, oe] = ye(""), [ge, se] = ye(null), [re, Ue] = ye([]), [Ke, st] = ye(0), [at, gt] = ye(0), [nt, Me] = ye(!1), [We, ut] = ye(null), [yt, ft] = ye(null), [Ze, ie] = ye(!1), [
|
|
15149
|
+
}, []), xe = !!W || ce, [G, O] = ye(null), [X, oe] = ye(""), [ge, se] = ye(null), [re, Ue] = ye([]), [Ke, st] = ye(0), [at, gt] = ye(0), [nt, Me] = ye(!1), [We, ut] = ye(null), [yt, ft] = ye(null), [Ze, ie] = ye(!1), [Ae, ke] = ye(null), [qe, rt] = ye(!1), Pe = Le(!1), [Xe, Et] = ye(() => Ru.value), Tt = Le(Xe), qt = Le(null), It = Te(($) => {
|
|
15157
15150
|
Ru.value = $, Et($);
|
|
15158
15151
|
}, []), [qn, Gt] = ye(!1), dn = Te(
|
|
15159
15152
|
($, ue) => {
|
|
@@ -15273,9 +15266,9 @@ function Zi({
|
|
|
15273
15266
|
[Xe, c, It]
|
|
15274
15267
|
), cr = U.useCallback(() => {
|
|
15275
15268
|
O(null), oe(""), se(null), It(qt.current ?? Xe), qt.current = null;
|
|
15276
|
-
}, [Xe, It]),
|
|
15269
|
+
}, [Xe, It]), Nr = Te(($, ue) => {
|
|
15277
15270
|
Hn($, ue);
|
|
15278
|
-
}, [Hn]),
|
|
15271
|
+
}, [Hn]), Ar = Te(($) => {
|
|
15279
15272
|
for (let ue = $ - 1; ue >= 0; ue--)
|
|
15280
15273
|
if (w[ue].role === "user") {
|
|
15281
15274
|
const pe = w[ue].content || [], ot = pe.filter((Dt) => Dt.type === "text").map((Dt) => Dt.text).join("") || (() => {
|
|
@@ -15332,7 +15325,7 @@ function Zi({
|
|
|
15332
15325
|
Gt(!0);
|
|
15333
15326
|
try {
|
|
15334
15327
|
if (!$) {
|
|
15335
|
-
await
|
|
15328
|
+
await N();
|
|
15336
15329
|
return;
|
|
15337
15330
|
}
|
|
15338
15331
|
const ue = Mt.find((_e) => _e.checkpointId === $), pe = (ue == null ? void 0 : ue.checkpointNs) ?? null;
|
|
@@ -15412,10 +15405,10 @@ function Zi({
|
|
|
15412
15405
|
}
|
|
15413
15406
|
$ && rt(!0);
|
|
15414
15407
|
},
|
|
15415
|
-
onEdit:
|
|
15416
|
-
onRegenerate:
|
|
15408
|
+
onEdit: Nr,
|
|
15409
|
+
onRegenerate: Ar,
|
|
15417
15410
|
onCancelEdit: cr,
|
|
15418
|
-
emptyMessage:
|
|
15411
|
+
emptyMessage: Ae ?? void 0,
|
|
15419
15412
|
isNavigatingCheckpoint: qn,
|
|
15420
15413
|
activeInterrupt: W,
|
|
15421
15414
|
disableInterruptActions: ce,
|
|
@@ -15587,7 +15580,7 @@ var Ml = "ScrollArea", [wh, wR] = $n(Ml), [PT, un] = wh(Ml), bh = y.forwardRef(
|
|
|
15587
15580
|
dir: o,
|
|
15588
15581
|
scrollHideDelay: s = 600,
|
|
15589
15582
|
...i
|
|
15590
|
-
} = e, [a, l] = y.useState(null), [c, u] = y.useState(null), [f, p] = y.useState(null), [h, m] = y.useState(null), [x, v] = y.useState(null), [g, w] = y.useState(0), [b, T] = y.useState(0), [C, S] = y.useState(!1), [k,
|
|
15583
|
+
} = e, [a, l] = y.useState(null), [c, u] = y.useState(null), [f, p] = y.useState(null), [h, m] = y.useState(null), [x, v] = y.useState(null), [g, w] = y.useState(0), [b, T] = y.useState(0), [C, S] = y.useState(!1), [k, N] = y.useState(!1), A = Ve(t, (F) => l(F)), M = ii(o);
|
|
15591
15584
|
return /* @__PURE__ */ d.jsx(
|
|
15592
15585
|
PT,
|
|
15593
15586
|
{
|
|
@@ -15607,7 +15600,7 @@ var Ml = "ScrollArea", [wh, wR] = $n(Ml), [PT, un] = wh(Ml), bh = y.forwardRef(
|
|
|
15607
15600
|
scrollbarY: x,
|
|
15608
15601
|
onScrollbarYChange: v,
|
|
15609
15602
|
scrollbarYEnabled: k,
|
|
15610
|
-
onScrollbarYEnabledChange:
|
|
15603
|
+
onScrollbarYEnabledChange: N,
|
|
15611
15604
|
onCornerWidthChange: w,
|
|
15612
15605
|
onCornerHeightChange: T,
|
|
15613
15606
|
children: /* @__PURE__ */ d.jsx(
|
|
@@ -15615,7 +15608,7 @@ var Ml = "ScrollArea", [wh, wR] = $n(Ml), [PT, un] = wh(Ml), bh = y.forwardRef(
|
|
|
15615
15608
|
{
|
|
15616
15609
|
dir: M,
|
|
15617
15610
|
...i,
|
|
15618
|
-
ref:
|
|
15611
|
+
ref: A,
|
|
15619
15612
|
style: {
|
|
15620
15613
|
position: "relative",
|
|
15621
15614
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
@@ -15768,7 +15761,7 @@ var OT = y.forwardRef((e, t) => {
|
|
|
15768
15761
|
content: 0,
|
|
15769
15762
|
viewport: 0,
|
|
15770
15763
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
15771
|
-
}), c =
|
|
15764
|
+
}), c = Nh(a.viewport, a.content), u = {
|
|
15772
15765
|
...r,
|
|
15773
15766
|
sizes: a,
|
|
15774
15767
|
onSizesChange: l,
|
|
@@ -15909,19 +15902,19 @@ var OT = y.forwardRef((e, t) => {
|
|
|
15909
15902
|
onWheelScroll: u,
|
|
15910
15903
|
onResize: f,
|
|
15911
15904
|
...p
|
|
15912
|
-
} = e, h = un(Bn, n), [m, x] = y.useState(null), v = Ve(t, (
|
|
15913
|
-
function A
|
|
15905
|
+
} = e, h = un(Bn, n), [m, x] = y.useState(null), v = Ve(t, (A) => x(A)), g = y.useRef(null), w = y.useRef(""), b = h.viewport, T = r.content - r.viewport, C = Ot(u), S = Ot(l), k = gi(f, 10);
|
|
15906
|
+
function N(A) {
|
|
15914
15907
|
if (g.current) {
|
|
15915
|
-
const M =
|
|
15908
|
+
const M = A.clientX - g.current.left, F = A.clientY - g.current.top;
|
|
15916
15909
|
c({ x: M, y: F });
|
|
15917
15910
|
}
|
|
15918
15911
|
}
|
|
15919
15912
|
return y.useEffect(() => {
|
|
15920
|
-
const
|
|
15913
|
+
const A = (M) => {
|
|
15921
15914
|
const F = M.target;
|
|
15922
15915
|
(m == null ? void 0 : m.contains(F)) && C(M, T);
|
|
15923
15916
|
};
|
|
15924
|
-
return document.addEventListener("wheel",
|
|
15917
|
+
return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
|
|
15925
15918
|
}, [b, m, T, C]), y.useEffect(S, [r, S]), Hr(m, k), Hr(h.content, k), /* @__PURE__ */ d.jsx(
|
|
15926
15919
|
FT,
|
|
15927
15920
|
{
|
|
@@ -15938,13 +15931,13 @@ var OT = y.forwardRef((e, t) => {
|
|
|
15938
15931
|
...p,
|
|
15939
15932
|
ref: v,
|
|
15940
15933
|
style: { position: "absolute", ...p.style },
|
|
15941
|
-
onPointerDown: me(e.onPointerDown, (
|
|
15942
|
-
|
|
15934
|
+
onPointerDown: me(e.onPointerDown, (A) => {
|
|
15935
|
+
A.button === 0 && (A.target.setPointerCapture(A.pointerId), g.current = m.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", h.viewport && (h.viewport.style.scrollBehavior = "auto"), N(A));
|
|
15943
15936
|
}),
|
|
15944
|
-
onPointerMove: me(e.onPointerMove,
|
|
15945
|
-
onPointerUp: me(e.onPointerUp, (
|
|
15946
|
-
const M =
|
|
15947
|
-
M.hasPointerCapture(
|
|
15937
|
+
onPointerMove: me(e.onPointerMove, N),
|
|
15938
|
+
onPointerUp: me(e.onPointerUp, (A) => {
|
|
15939
|
+
const M = A.target;
|
|
15940
|
+
M.hasPointerCapture(A.pointerId) && M.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = w.current, h.viewport && (h.viewport.style.scrollBehavior = ""), g.current = null;
|
|
15948
15941
|
})
|
|
15949
15942
|
}
|
|
15950
15943
|
)
|
|
@@ -16032,23 +16025,23 @@ var zT = y.forwardRef((e, t) => {
|
|
|
16032
16025
|
function Os(e) {
|
|
16033
16026
|
return e ? parseInt(e, 10) : 0;
|
|
16034
16027
|
}
|
|
16035
|
-
function
|
|
16028
|
+
function Nh(e, t) {
|
|
16036
16029
|
const n = e / t;
|
|
16037
16030
|
return isNaN(n) ? 0 : n;
|
|
16038
16031
|
}
|
|
16039
16032
|
function mi(e) {
|
|
16040
|
-
const t =
|
|
16033
|
+
const t = Nh(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
|
|
16041
16034
|
return Math.max(r, 18);
|
|
16042
16035
|
}
|
|
16043
16036
|
function BT(e, t, n, r = "ltr") {
|
|
16044
16037
|
const o = mi(n), s = o / 2, i = t || s, a = o - i, l = n.scrollbar.paddingStart + i, c = n.scrollbar.size - n.scrollbar.paddingEnd - a, u = n.content - n.viewport, f = r === "ltr" ? [0, u] : [u * -1, 0];
|
|
16045
|
-
return
|
|
16038
|
+
return Ah([l, c], f)(e);
|
|
16046
16039
|
}
|
|
16047
16040
|
function Eu(e, t, n = "ltr") {
|
|
16048
16041
|
const r = mi(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - o, i = t.content - t.viewport, a = s - r, l = n === "ltr" ? [0, i] : [i * -1, 0], c = Ia(e, l);
|
|
16049
|
-
return
|
|
16042
|
+
return Ah([0, i], [0, a])(c);
|
|
16050
16043
|
}
|
|
16051
|
-
function
|
|
16044
|
+
function Ah(e, t) {
|
|
16052
16045
|
return (n) => {
|
|
16053
16046
|
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
16054
16047
|
const r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
@@ -16074,7 +16067,7 @@ function gi(e, t) {
|
|
|
16074
16067
|
}
|
|
16075
16068
|
function Hr(e, t) {
|
|
16076
16069
|
const n = Ot(t);
|
|
16077
|
-
|
|
16070
|
+
At(() => {
|
|
16078
16071
|
let r = 0;
|
|
16079
16072
|
if (e) {
|
|
16080
16073
|
const o = new ResizeObserver(() => {
|
|
@@ -16135,7 +16128,7 @@ function Iu({
|
|
|
16135
16128
|
currentThreadId: p,
|
|
16136
16129
|
isLoading: h,
|
|
16137
16130
|
actions: m
|
|
16138
|
-
} = Ka(), { loadThread: x } = qa(), { createThread: v, deleteThread: g, renameThread: w } = m, [b, T] = ye(Array.isArray(f) ? f : []), C = Le(b.length > 0), S = Le(null), k = Le(0), [
|
|
16131
|
+
} = Ka(), { loadThread: x } = qa(), { createThread: v, deleteThread: g, renameThread: w } = m, [b, T] = ye(Array.isArray(f) ? f : []), C = Le(b.length > 0), S = Le(null), k = Le(0), [N, A] = ye(null), [M, F] = ye(""), [q, j] = ye(!1);
|
|
16139
16132
|
dt(() => {
|
|
16140
16133
|
const B = Array.isArray(f) ? f : [];
|
|
16141
16134
|
if (B.length > 0) {
|
|
@@ -16187,16 +16180,16 @@ function Iu({
|
|
|
16187
16180
|
}
|
|
16188
16181
|
}
|
|
16189
16182
|
}, ne = (B, Z) => {
|
|
16190
|
-
Z.stopPropagation(),
|
|
16183
|
+
Z.stopPropagation(), A(B.threadId), F(B.title || `Thread ${B.threadId.slice(0, 8)}`);
|
|
16191
16184
|
}, K = async (B) => {
|
|
16192
16185
|
if (M.trim())
|
|
16193
16186
|
try {
|
|
16194
|
-
await w(B, M.trim()),
|
|
16187
|
+
await w(B, M.trim()), A(null), F("");
|
|
16195
16188
|
} catch (Z) {
|
|
16196
16189
|
console.error("Failed to update title:", Z);
|
|
16197
16190
|
}
|
|
16198
16191
|
}, z = () => {
|
|
16199
|
-
|
|
16192
|
+
A(null), F("");
|
|
16200
16193
|
}, fe = (B, Z) => {
|
|
16201
16194
|
B.key === "Enter" ? K(Z) : B.key === "Escape" && z();
|
|
16202
16195
|
}, W = (B) => {
|
|
@@ -16240,7 +16233,7 @@ function Iu({
|
|
|
16240
16233
|
className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? p) === B.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
|
|
16241
16234
|
children: [
|
|
16242
16235
|
/* @__PURE__ */ d.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16243
|
-
/* @__PURE__ */ d.jsx("div", { className: "flex-1 min-w-0", children:
|
|
16236
|
+
/* @__PURE__ */ d.jsx("div", { className: "flex-1 min-w-0", children: N === B.threadId ? /* @__PURE__ */ d.jsxs("div", { className: "flex items-center gap-2", onClick: (Z) => Z.stopPropagation(), children: [
|
|
16244
16237
|
/* @__PURE__ */ d.jsx(js, { value: M, onChange: (Z) => F(Z.target.value), onKeyDown: (Z) => fe(Z, B.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
16245
16238
|
/* @__PURE__ */ d.jsx(et, { variant: "ghost", size: "sm", onClick: () => K(B.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ d.jsx(Fa, { size: 12 }) }),
|
|
16246
16239
|
/* @__PURE__ */ d.jsx(et, { variant: "ghost", size: "sm", onClick: z, className: "h-6 w-6 p-0", children: /* @__PURE__ */ d.jsx(Or, { size: 12 }) })
|
|
@@ -16252,7 +16245,7 @@ function Iu({
|
|
|
16252
16245
|
] })
|
|
16253
16246
|
] }) }),
|
|
16254
16247
|
/* @__PURE__ */ d.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
|
|
16255
|
-
r &&
|
|
16248
|
+
r && N !== B.threadId && /* @__PURE__ */ d.jsx(et, { variant: "ghost", size: "sm", onClick: (Z) => ne(B, Z), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ d.jsx(ju, { size: 12 }) }),
|
|
16256
16249
|
n && /* @__PURE__ */ d.jsx(
|
|
16257
16250
|
et,
|
|
16258
16251
|
{
|
|
@@ -16584,12 +16577,12 @@ var sk = [" ", "Enter", "ArrowUp", "ArrowDown"], ik = [" ", "Enter"], Sr = "Sele
|
|
|
16584
16577
|
disabled: p,
|
|
16585
16578
|
required: h,
|
|
16586
16579
|
form: m
|
|
16587
|
-
} = e, x = wi(t), [v, g] = y.useState(null), [w, b] = y.useState(null), [T, C] = y.useState(!1), S = ii(c), [k,
|
|
16580
|
+
} = e, x = wi(t), [v, g] = y.useState(null), [w, b] = y.useState(null), [T, C] = y.useState(!1), S = ii(c), [k, N] = vr({
|
|
16588
16581
|
prop: r,
|
|
16589
16582
|
defaultProp: o ?? !1,
|
|
16590
16583
|
onChange: s,
|
|
16591
16584
|
caller: Sr
|
|
16592
|
-
}), [
|
|
16585
|
+
}), [A, M] = vr({
|
|
16593
16586
|
prop: i,
|
|
16594
16587
|
defaultProp: a,
|
|
16595
16588
|
onChange: l,
|
|
@@ -16607,10 +16600,10 @@ var sk = [" ", "Enter", "ArrowUp", "ArrowDown"], ik = [" ", "Enter"], Sr = "Sele
|
|
|
16607
16600
|
valueNodeHasChildren: T,
|
|
16608
16601
|
onValueNodeHasChildrenChange: C,
|
|
16609
16602
|
contentId: Mn(),
|
|
16610
|
-
value:
|
|
16603
|
+
value: A,
|
|
16611
16604
|
onValueChange: M,
|
|
16612
16605
|
open: k,
|
|
16613
|
-
onOpenChange:
|
|
16606
|
+
onOpenChange: N,
|
|
16614
16607
|
dir: S,
|
|
16615
16608
|
triggerPointerDownPosRef: F,
|
|
16616
16609
|
disabled: p,
|
|
@@ -16639,12 +16632,12 @@ var sk = [" ", "Enter", "ArrowUp", "ArrowDown"], ik = [" ", "Enter"], Sr = "Sele
|
|
|
16639
16632
|
tabIndex: -1,
|
|
16640
16633
|
name: u,
|
|
16641
16634
|
autoComplete: f,
|
|
16642
|
-
value:
|
|
16635
|
+
value: A,
|
|
16643
16636
|
onChange: (L) => M(L.target.value),
|
|
16644
16637
|
disabled: p,
|
|
16645
16638
|
form: m,
|
|
16646
16639
|
children: [
|
|
16647
|
-
|
|
16640
|
+
A === void 0 ? /* @__PURE__ */ d.jsx("option", { value: "" }) : null,
|
|
16648
16641
|
Array.from(j)
|
|
16649
16642
|
]
|
|
16650
16643
|
},
|
|
@@ -16702,7 +16695,7 @@ Jh.displayName = Xh;
|
|
|
16702
16695
|
var Zh = "SelectValue", Qh = y.forwardRef(
|
|
16703
16696
|
(e, t) => {
|
|
16704
16697
|
const { __scopeSelect: n, className: r, style: o, children: s, placeholder: i = "", ...a } = e, l = sr(Zh, n), { onValueNodeHasChildrenChange: c } = l, u = s !== void 0, f = Ve(t, l.onValueNodeChange);
|
|
16705
|
-
return
|
|
16698
|
+
return At(() => {
|
|
16706
16699
|
c(u);
|
|
16707
16700
|
}, [c, u]), /* @__PURE__ */ d.jsx(
|
|
16708
16701
|
Ie.span,
|
|
@@ -16728,7 +16721,7 @@ tm.displayName = fk;
|
|
|
16728
16721
|
var Cr = "SelectContent", nm = y.forwardRef(
|
|
16729
16722
|
(e, t) => {
|
|
16730
16723
|
const n = sr(Cr, e.__scopeSelect), [r, o] = y.useState();
|
|
16731
|
-
if (
|
|
16724
|
+
if (At(() => {
|
|
16732
16725
|
o(new DocumentFragment());
|
|
16733
16726
|
}, []), !n.open) {
|
|
16734
16727
|
const s = r;
|
|
@@ -16763,7 +16756,7 @@ var gn = 10, [rm, ir] = Yr(Cr), pk = "SelectContentImpl", hk = $r("SelectContent
|
|
|
16763
16756
|
avoidCollisions: v,
|
|
16764
16757
|
//
|
|
16765
16758
|
...g
|
|
16766
|
-
} = e, w = sr(Cr, n), [b, T] = y.useState(null), [C, S] = y.useState(null), k = Ve(t, (G) => T(G)), [
|
|
16759
|
+
} = e, w = sr(Cr, n), [b, T] = y.useState(null), [C, S] = y.useState(null), k = Ve(t, (G) => T(G)), [N, A] = y.useState(null), [M, F] = y.useState(
|
|
16767
16760
|
null
|
|
16768
16761
|
), q = vi(n), [j, _] = y.useState(!1), D = y.useRef(!1);
|
|
16769
16762
|
y.useEffect(() => {
|
|
@@ -16777,8 +16770,8 @@ var gn = 10, [rm, ir] = Yr(Cr), pk = "SelectContentImpl", hk = $r("SelectContent
|
|
|
16777
16770
|
},
|
|
16778
16771
|
[q, C]
|
|
16779
16772
|
), ne = y.useCallback(
|
|
16780
|
-
() => L([
|
|
16781
|
-
[L,
|
|
16773
|
+
() => L([N, b]),
|
|
16774
|
+
[L, N, b]
|
|
16782
16775
|
);
|
|
16783
16776
|
y.useEffect(() => {
|
|
16784
16777
|
j && ne();
|
|
@@ -16812,7 +16805,7 @@ var gn = 10, [rm, ir] = Yr(Cr), pk = "SelectContentImpl", hk = $r("SelectContent
|
|
|
16812
16805
|
}), ce = y.useCallback(
|
|
16813
16806
|
(G, O, X) => {
|
|
16814
16807
|
const oe = !D.current && !X;
|
|
16815
|
-
(w.value !== void 0 && w.value === O || oe) && (
|
|
16808
|
+
(w.value !== void 0 && w.value === O || oe) && (A(G), oe && (D.current = !0));
|
|
16816
16809
|
},
|
|
16817
16810
|
[w.value]
|
|
16818
16811
|
), B = y.useCallback(() => b == null ? void 0 : b.focus(), [b]), Z = y.useCallback(
|
|
@@ -16821,7 +16814,7 @@ var gn = 10, [rm, ir] = Yr(Cr), pk = "SelectContentImpl", hk = $r("SelectContent
|
|
|
16821
16814
|
(w.value !== void 0 && w.value === O || oe) && F(G);
|
|
16822
16815
|
},
|
|
16823
16816
|
[w.value]
|
|
16824
|
-
), we = r === "popper" ?
|
|
16817
|
+
), we = r === "popper" ? Na : sm, xe = we === Na ? {
|
|
16825
16818
|
side: a,
|
|
16826
16819
|
sideOffset: l,
|
|
16827
16820
|
align: c,
|
|
@@ -16841,7 +16834,7 @@ var gn = 10, [rm, ir] = Yr(Cr), pk = "SelectContentImpl", hk = $r("SelectContent
|
|
|
16841
16834
|
viewport: C,
|
|
16842
16835
|
onViewportChange: S,
|
|
16843
16836
|
itemRefCallback: ce,
|
|
16844
|
-
selectedItem:
|
|
16837
|
+
selectedItem: N,
|
|
16845
16838
|
onItemLeave: B,
|
|
16846
16839
|
itemTextRefCallback: Z,
|
|
16847
16840
|
focusSelectedItem: ne,
|
|
@@ -16915,9 +16908,9 @@ om.displayName = pk;
|
|
|
16915
16908
|
var mk = "SelectItemAlignedPosition", sm = y.forwardRef((e, t) => {
|
|
16916
16909
|
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = sr(Cr, n), i = ir(Cr, n), [a, l] = y.useState(null), [c, u] = y.useState(null), f = Ve(t, (k) => u(k)), p = vi(n), h = y.useRef(!1), m = y.useRef(!0), { viewport: x, selectedItem: v, selectedItemText: g, focusSelectedItem: w } = i, b = y.useCallback(() => {
|
|
16917
16910
|
if (s.trigger && s.valueNode && a && c && x && v && g) {
|
|
16918
|
-
const k = s.trigger.getBoundingClientRect(),
|
|
16911
|
+
const k = s.trigger.getBoundingClientRect(), N = c.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), M = g.getBoundingClientRect();
|
|
16919
16912
|
if (s.dir !== "rtl") {
|
|
16920
|
-
const ge = M.left -
|
|
16913
|
+
const ge = M.left - N.left, se = A.left - ge, re = k.left - se, Ue = k.width + re, Ke = Math.max(Ue, N.width), st = window.innerWidth - gn, at = Ia(se, [
|
|
16921
16914
|
gn,
|
|
16922
16915
|
// Prevents the content from going off the starting edge of the
|
|
16923
16916
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -16928,7 +16921,7 @@ var mk = "SelectItemAlignedPosition", sm = y.forwardRef((e, t) => {
|
|
|
16928
16921
|
]);
|
|
16929
16922
|
a.style.minWidth = Ue + "px", a.style.left = at + "px";
|
|
16930
16923
|
} else {
|
|
16931
|
-
const ge =
|
|
16924
|
+
const ge = N.right - M.right, se = window.innerWidth - A.right - ge, re = window.innerWidth - k.right - se, Ue = k.width + re, Ke = Math.max(Ue, N.width), st = window.innerWidth - gn, at = Ia(se, [
|
|
16932
16925
|
gn,
|
|
16933
16926
|
Math.max(gn, st - Ke)
|
|
16934
16927
|
]);
|
|
@@ -16968,9 +16961,9 @@ var mk = "SelectItemAlignedPosition", sm = y.forwardRef((e, t) => {
|
|
|
16968
16961
|
s.dir,
|
|
16969
16962
|
r
|
|
16970
16963
|
]);
|
|
16971
|
-
|
|
16964
|
+
At(() => b(), [b]);
|
|
16972
16965
|
const [T, C] = y.useState();
|
|
16973
|
-
|
|
16966
|
+
At(() => {
|
|
16974
16967
|
c && C(window.getComputedStyle(c).zIndex);
|
|
16975
16968
|
}, [c]);
|
|
16976
16969
|
const S = y.useCallback(
|
|
@@ -17017,7 +17010,7 @@ var mk = "SelectItemAlignedPosition", sm = y.forwardRef((e, t) => {
|
|
|
17017
17010
|
);
|
|
17018
17011
|
});
|
|
17019
17012
|
sm.displayName = mk;
|
|
17020
|
-
var gk = "SelectPopperPosition",
|
|
17013
|
+
var gk = "SelectPopperPosition", Na = y.forwardRef((e, t) => {
|
|
17021
17014
|
const {
|
|
17022
17015
|
__scopeSelect: n,
|
|
17023
17016
|
align: r = "start",
|
|
@@ -17045,10 +17038,10 @@ var gk = "SelectPopperPosition", Aa = y.forwardRef((e, t) => {
|
|
|
17045
17038
|
}
|
|
17046
17039
|
);
|
|
17047
17040
|
});
|
|
17048
|
-
|
|
17049
|
-
var [xk, $l] = Yr(Cr, {}),
|
|
17041
|
+
Na.displayName = gk;
|
|
17042
|
+
var [xk, $l] = Yr(Cr, {}), Aa = "SelectViewport", im = y.forwardRef(
|
|
17050
17043
|
(e, t) => {
|
|
17051
|
-
const { __scopeSelect: n, nonce: r, ...o } = e, s = ir(
|
|
17044
|
+
const { __scopeSelect: n, nonce: r, ...o } = e, s = ir(Aa, n), i = $l(Aa, n), a = Ve(t, s.onViewportChange), l = y.useRef(0);
|
|
17052
17045
|
return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
17053
17046
|
/* @__PURE__ */ d.jsx(
|
|
17054
17047
|
"style",
|
|
@@ -17098,7 +17091,7 @@ var [xk, $l] = Yr(Cr, {}), Na = "SelectViewport", im = y.forwardRef(
|
|
|
17098
17091
|
] });
|
|
17099
17092
|
}
|
|
17100
17093
|
);
|
|
17101
|
-
im.displayName =
|
|
17094
|
+
im.displayName = Aa;
|
|
17102
17095
|
var am = "SelectGroup", [yk, vk] = Yr(am), wk = y.forwardRef(
|
|
17103
17096
|
(e, t) => {
|
|
17104
17097
|
const { __scopeSelect: n, ...r } = e, o = Mn();
|
|
@@ -17211,7 +17204,7 @@ var so = "SelectItemText", fm = y.forwardRef(
|
|
|
17211
17204
|
() => /* @__PURE__ */ d.jsx("option", { value: l.value, disabled: l.disabled, children: h }, l.value),
|
|
17212
17205
|
[l.disabled, l.value, h]
|
|
17213
17206
|
), { onNativeOptionAdd: x, onNativeOptionRemove: v } = c;
|
|
17214
|
-
return
|
|
17207
|
+
return At(() => (x(m), () => v(m)), [x, v, m]), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
17215
17208
|
/* @__PURE__ */ d.jsx(Ie.span, { id: l.textId, ...s, ref: p }),
|
|
17216
17209
|
l.isSelected && i.valueNode && !i.valueNodeHasChildren ? $s.createPortal(s.children, i.valueNode) : null
|
|
17217
17210
|
] });
|
|
@@ -17227,7 +17220,7 @@ var pm = "SelectItemIndicator", hm = y.forwardRef(
|
|
|
17227
17220
|
hm.displayName = pm;
|
|
17228
17221
|
var _a = "SelectScrollUpButton", mm = y.forwardRef((e, t) => {
|
|
17229
17222
|
const n = ir(_a, e.__scopeSelect), r = $l(_a, e.__scopeSelect), [o, s] = y.useState(!1), i = Ve(t, r.onScrollButtonChange);
|
|
17230
|
-
return
|
|
17223
|
+
return At(() => {
|
|
17231
17224
|
if (n.viewport && n.isPositioned) {
|
|
17232
17225
|
let a = function() {
|
|
17233
17226
|
const c = l.scrollTop > 0;
|
|
@@ -17251,7 +17244,7 @@ var _a = "SelectScrollUpButton", mm = y.forwardRef((e, t) => {
|
|
|
17251
17244
|
mm.displayName = _a;
|
|
17252
17245
|
var ja = "SelectScrollDownButton", gm = y.forwardRef((e, t) => {
|
|
17253
17246
|
const n = ir(ja, e.__scopeSelect), r = $l(ja, e.__scopeSelect), [o, s] = y.useState(!1), i = Ve(t, r.onScrollButtonChange);
|
|
17254
|
-
return
|
|
17247
|
+
return At(() => {
|
|
17255
17248
|
if (n.viewport && n.isPositioned) {
|
|
17256
17249
|
let a = function() {
|
|
17257
17250
|
const c = l.scrollHeight - l.clientHeight, u = Math.ceil(l.scrollTop) < c;
|
|
@@ -17277,7 +17270,7 @@ var xm = y.forwardRef((e, t) => {
|
|
|
17277
17270
|
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = ir("SelectScrollButton", n), i = y.useRef(null), a = vi(n), l = y.useCallback(() => {
|
|
17278
17271
|
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
17279
17272
|
}, []);
|
|
17280
|
-
return y.useEffect(() => () => l(), [l]),
|
|
17273
|
+
return y.useEffect(() => () => l(), [l]), At(() => {
|
|
17281
17274
|
var u;
|
|
17282
17275
|
const c = a().find((f) => f.ref.current === document.activeElement);
|
|
17283
17276
|
(u = c == null ? void 0 : c.ref.current) == null || u.scrollIntoView({ block: "nearest" });
|
|
@@ -17369,8 +17362,8 @@ function Sm(e, t, n) {
|
|
|
17369
17362
|
function kk(e, t) {
|
|
17370
17363
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
17371
17364
|
}
|
|
17372
|
-
var Rk = Yh, Cm = Jh, Ek = Qh, Ik = em,
|
|
17373
|
-
const
|
|
17365
|
+
var Rk = Yh, Cm = Jh, Ek = Qh, Ik = em, Nk = tm, Tm = nm, Ak = im, km = cm, Rm = dm, _k = fm, jk = hm, Em = mm, Im = gm, Nm = ym;
|
|
17366
|
+
const Nu = Rk, Au = Ek, Oa = y.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
|
|
17374
17367
|
Cm,
|
|
17375
17368
|
{
|
|
17376
17369
|
ref: r,
|
|
@@ -17386,7 +17379,7 @@ const Au = Rk, Nu = Ek, Oa = y.forwardRef(({ className: e, children: t, ...n },
|
|
|
17386
17379
|
}
|
|
17387
17380
|
));
|
|
17388
17381
|
Oa.displayName = Cm.displayName;
|
|
17389
|
-
const
|
|
17382
|
+
const Am = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
|
|
17390
17383
|
Em,
|
|
17391
17384
|
{
|
|
17392
17385
|
ref: n,
|
|
@@ -17398,7 +17391,7 @@ const Nm = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
|
|
|
17398
17391
|
children: /* @__PURE__ */ d.jsx(La, { className: "h-4 w-4" })
|
|
17399
17392
|
}
|
|
17400
17393
|
));
|
|
17401
|
-
|
|
17394
|
+
Am.displayName = Em.displayName;
|
|
17402
17395
|
const _m = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
|
|
17403
17396
|
Im,
|
|
17404
17397
|
{
|
|
@@ -17412,7 +17405,7 @@ const _m = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
|
|
|
17412
17405
|
}
|
|
17413
17406
|
));
|
|
17414
17407
|
_m.displayName = Im.displayName;
|
|
17415
|
-
const Ma = y.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ d.jsx(
|
|
17408
|
+
const Ma = y.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ d.jsx(Nk, { children: /* @__PURE__ */ d.jsxs(
|
|
17416
17409
|
Tm,
|
|
17417
17410
|
{
|
|
17418
17411
|
ref: o,
|
|
@@ -17424,9 +17417,9 @@ const Ma = y.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
17424
17417
|
position: n,
|
|
17425
17418
|
...r,
|
|
17426
17419
|
children: [
|
|
17427
|
-
/* @__PURE__ */ d.jsx(
|
|
17420
|
+
/* @__PURE__ */ d.jsx(Am, {}),
|
|
17428
17421
|
/* @__PURE__ */ d.jsx(
|
|
17429
|
-
|
|
17422
|
+
Ak,
|
|
17430
17423
|
{
|
|
17431
17424
|
className: te(
|
|
17432
17425
|
"p-1",
|
|
@@ -17466,14 +17459,14 @@ const ur = y.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
17466
17459
|
));
|
|
17467
17460
|
ur.displayName = Rm.displayName;
|
|
17468
17461
|
const Ok = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
|
|
17469
|
-
|
|
17462
|
+
Nm,
|
|
17470
17463
|
{
|
|
17471
17464
|
ref: n,
|
|
17472
17465
|
className: te("-mx-1 my-1 h-px bg-muted", e),
|
|
17473
17466
|
...t
|
|
17474
17467
|
}
|
|
17475
17468
|
));
|
|
17476
|
-
Ok.displayName =
|
|
17469
|
+
Ok.displayName = Nm.displayName;
|
|
17477
17470
|
var Mk = "Separator", _u = "horizontal", Dk = ["horizontal", "vertical"], jm = y.forwardRef((e, t) => {
|
|
17478
17471
|
const { decorative: n, orientation: r = _u, ...o } = e, s = Lk(r) ? r : _u, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
17479
17472
|
return /* @__PURE__ */ d.jsx(
|
|
@@ -17728,7 +17721,7 @@ function kR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17728
17721
|
/* @__PURE__ */ d.jsxs("div", { className: "space-y-2", children: [
|
|
17729
17722
|
/* @__PURE__ */ d.jsx(rn, { htmlFor: "layout", children: "Layout Style" }),
|
|
17730
17723
|
/* @__PURE__ */ d.jsxs(
|
|
17731
|
-
|
|
17724
|
+
Nu,
|
|
17732
17725
|
{
|
|
17733
17726
|
value: a.ui.layout,
|
|
17734
17727
|
onValueChange: (v) => l((g) => ({
|
|
@@ -17736,7 +17729,7 @@ function kR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17736
17729
|
ui: { ...g.ui, layout: v }
|
|
17737
17730
|
})),
|
|
17738
17731
|
children: [
|
|
17739
|
-
/* @__PURE__ */ d.jsx(Oa, { children: /* @__PURE__ */ d.jsx(
|
|
17732
|
+
/* @__PURE__ */ d.jsx(Oa, { children: /* @__PURE__ */ d.jsx(Au, {}) }),
|
|
17740
17733
|
/* @__PURE__ */ d.jsxs(Ma, { children: [
|
|
17741
17734
|
/* @__PURE__ */ d.jsx(ur, { value: "sidebar", children: "Sidebar Layout" }),
|
|
17742
17735
|
/* @__PURE__ */ d.jsx(ur, { value: "fullscreen", children: "Fullscreen" }),
|
|
@@ -17749,7 +17742,7 @@ function kR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17749
17742
|
/* @__PURE__ */ d.jsxs("div", { className: "space-y-2", children: [
|
|
17750
17743
|
/* @__PURE__ */ d.jsx(rn, { htmlFor: "theme", children: "Theme" }),
|
|
17751
17744
|
/* @__PURE__ */ d.jsxs(
|
|
17752
|
-
|
|
17745
|
+
Nu,
|
|
17753
17746
|
{
|
|
17754
17747
|
value: a.ui.theme,
|
|
17755
17748
|
onValueChange: (v) => l((g) => ({
|
|
@@ -17757,7 +17750,7 @@ function kR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17757
17750
|
ui: { ...g.ui, theme: v }
|
|
17758
17751
|
})),
|
|
17759
17752
|
children: [
|
|
17760
|
-
/* @__PURE__ */ d.jsx(Oa, { children: /* @__PURE__ */ d.jsx(
|
|
17753
|
+
/* @__PURE__ */ d.jsx(Oa, { children: /* @__PURE__ */ d.jsx(Au, {}) }),
|
|
17761
17754
|
/* @__PURE__ */ d.jsxs(Ma, { children: [
|
|
17762
17755
|
/* @__PURE__ */ d.jsx(ur, { value: "light", children: "Light" }),
|
|
17763
17756
|
/* @__PURE__ */ d.jsx(ur, { value: "dark", children: "Dark" }),
|
|
@@ -17977,7 +17970,7 @@ export {
|
|
|
17977
17970
|
gr as chatApiClient,
|
|
17978
17971
|
RR as default,
|
|
17979
17972
|
Gx as del,
|
|
17980
|
-
|
|
17973
|
+
An as get,
|
|
17981
17974
|
Vx as getChatToken,
|
|
17982
17975
|
bR as getCurrentSettings,
|
|
17983
17976
|
KT as getDefaultApiConfig,
|