teodor-new-chat-ui 3.0.94 → 3.0.95
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 +770 -758
- package/dist/index.umd.js +13 -13
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as f from "react";
|
|
2
|
-
import V, { useState as fe, useRef as Ye, useCallback as Ke, useEffect as
|
|
2
|
+
import V, { useState as fe, useRef as Ye, useCallback as Ke, useEffect as Be, useReducer as Dp, useMemo as un, createContext as wc, useContext as yc, createElement as uo, useLayoutEffect as Lp } from "react";
|
|
3
3
|
import { Square as Fp, Send as Bp, X as Vn, ExternalLink as $p, Download as Hp, Image as Sc, FileText as Va, Loader as zp, ChevronUp as wr, ChevronDown as Wn, Copy as Ga, Edit as Ka, RotateCcw as si, Bot as Ya, Wrench as Up, User as Wp, ChevronRight as Vp, Check as Hi, Circle as Gp, Edit3 as Cc, Paperclip as qa, Loader2 as Kp, Plus as Yp, FileSpreadsheet as qp, MessageSquarePlus as Xp, MessageSquare as Jp, Calendar as Zp, Trash2 as Qp, PanelLeft as em, Settings as tm, Server as nm, EyeOff as rm, Eye as om, Layout as sm, MessageCircle as im, Save as am } from "lucide-react";
|
|
4
4
|
import { Slot as tr, createSlot as Xn, createSlottable as lm } from "@radix-ui/react-slot";
|
|
5
5
|
import { cva as $r } from "class-variance-authority";
|
|
@@ -23,11 +23,11 @@ function dm() {
|
|
|
23
23
|
Xa = 1;
|
|
24
24
|
var e = V, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
25
|
function i(a, c, u) {
|
|
26
|
-
var d, h = {}, m = null,
|
|
27
|
-
u !== void 0 && (m = "" + u), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (
|
|
26
|
+
var d, h = {}, m = null, v = null;
|
|
27
|
+
u !== void 0 && (m = "" + u), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (v = c.ref);
|
|
28
28
|
for (d in c) r.call(c, d) && !s.hasOwnProperty(d) && (h[d] = c[d]);
|
|
29
29
|
if (a && a.defaultProps) for (d in c = a.defaultProps, c) h[d] === void 0 && (h[d] = c[d]);
|
|
30
|
-
return { $$typeof: t, type: a, key: m, ref:
|
|
30
|
+
return { $$typeof: t, type: a, key: m, ref: v, props: h, _owner: o.current };
|
|
31
31
|
}
|
|
32
32
|
return gr.Fragment = n, gr.jsx = i, gr.jsxs = i, gr;
|
|
33
33
|
}
|
|
@@ -44,11 +44,11 @@ var xr = {};
|
|
|
44
44
|
var Ja;
|
|
45
45
|
function fm() {
|
|
46
46
|
return Ja || (Ja = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
-
var e = V, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), m = Symbol.for("react.lazy"),
|
|
47
|
+
var e = V, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), x = Symbol.iterator, g = "@@iterator";
|
|
48
48
|
function p(E) {
|
|
49
49
|
if (E === null || typeof E != "object")
|
|
50
50
|
return null;
|
|
51
|
-
var z =
|
|
51
|
+
var z = x && E[x] || E[g];
|
|
52
52
|
return typeof z == "function" ? z : null;
|
|
53
53
|
}
|
|
54
54
|
var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -71,8 +71,8 @@ function fm() {
|
|
|
71
71
|
}
|
|
72
72
|
var N = !1, S = !1, T = !1, C = !1, R = !1, I;
|
|
73
73
|
I = Symbol.for("react.module.reference");
|
|
74
|
-
function
|
|
75
|
-
return !!(typeof E == "string" || typeof E == "function" || E === r || E === s || R || E === o || E === u || E === d || C || E ===
|
|
74
|
+
function k(E) {
|
|
75
|
+
return !!(typeof E == "string" || typeof E == "function" || E === r || E === s || R || E === o || E === u || E === d || C || E === v || N || S || T || typeof E == "object" && E !== null && (E.$$typeof === m || E.$$typeof === h || E.$$typeof === i || E.$$typeof === a || E.$$typeof === c || // This needs to include all possible module reference object
|
|
76
76
|
// types supported by any Flight configuration anywhere since
|
|
77
77
|
// we don't know which Flight build this will end up being used
|
|
78
78
|
// with.
|
|
@@ -578,7 +578,7 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
578
578
|
}
|
|
579
579
|
function Ua(E, z, ne, ge, Oe, Fe) {
|
|
580
580
|
{
|
|
581
|
-
var Ie =
|
|
581
|
+
var Ie = k(E);
|
|
582
582
|
if (!Ie) {
|
|
583
583
|
var Re = "";
|
|
584
584
|
(E === void 0 || typeof E == "object" && E !== null && Object.keys(E).length === 0) && (Re += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
@@ -796,7 +796,7 @@ const Km = (e) => {
|
|
|
796
796
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
797
797
|
typeof setImmediate == "function",
|
|
798
798
|
gt(Sn.postMessage)
|
|
799
|
-
), Xm = typeof queueMicrotask < "u" ? queueMicrotask.bind(Sn) : typeof process < "u" && process.nextTick || Pc, Jm = (e) => e != null && gt(e[qo]),
|
|
799
|
+
), Xm = typeof queueMicrotask < "u" ? queueMicrotask.bind(Sn) : typeof process < "u" && process.nextTick || Pc, Jm = (e) => e != null && gt(e[qo]), A = {
|
|
800
800
|
isArray: nr,
|
|
801
801
|
isArrayBuffer: Nc,
|
|
802
802
|
isBuffer: Hr,
|
|
@@ -859,7 +859,7 @@ const Km = (e) => {
|
|
|
859
859
|
function be(e, t, n, r, o) {
|
|
860
860
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
861
861
|
}
|
|
862
|
-
|
|
862
|
+
A.inherits(be, Error, {
|
|
863
863
|
toJSON: function() {
|
|
864
864
|
return {
|
|
865
865
|
// Standard
|
|
@@ -874,7 +874,7 @@ k.inherits(be, Error, {
|
|
|
874
874
|
columnNumber: this.columnNumber,
|
|
875
875
|
stack: this.stack,
|
|
876
876
|
// Axios
|
|
877
|
-
config:
|
|
877
|
+
config: A.toJSONObject(this.config),
|
|
878
878
|
code: this.code,
|
|
879
879
|
status: this.status
|
|
880
880
|
};
|
|
@@ -902,7 +902,7 @@ Object.defineProperties(be, Oc);
|
|
|
902
902
|
Object.defineProperty(_c, "isAxiosError", { value: !0 });
|
|
903
903
|
be.from = (e, t, n, r, o, s) => {
|
|
904
904
|
const i = Object.create(_c);
|
|
905
|
-
|
|
905
|
+
A.toFlatObject(e, i, function(d) {
|
|
906
906
|
return d !== Error.prototype;
|
|
907
907
|
}, (u) => u !== "isAxiosError");
|
|
908
908
|
const a = e && e.message ? e.message : "Error", c = t == null && e ? e.code : t;
|
|
@@ -910,10 +910,10 @@ be.from = (e, t, n, r, o, s) => {
|
|
|
910
910
|
};
|
|
911
911
|
const Zm = null;
|
|
912
912
|
function li(e) {
|
|
913
|
-
return
|
|
913
|
+
return A.isPlainObject(e) || A.isArray(e);
|
|
914
914
|
}
|
|
915
915
|
function Mc(e) {
|
|
916
|
-
return
|
|
916
|
+
return A.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
917
917
|
}
|
|
918
918
|
function Qa(e, t, n) {
|
|
919
919
|
return e ? e.concat(t).map(function(o, s) {
|
|
@@ -921,73 +921,73 @@ function Qa(e, t, n) {
|
|
|
921
921
|
}).join(n ? "." : "") : t;
|
|
922
922
|
}
|
|
923
923
|
function Qm(e) {
|
|
924
|
-
return
|
|
924
|
+
return A.isArray(e) && !e.some(li);
|
|
925
925
|
}
|
|
926
|
-
const eg =
|
|
926
|
+
const eg = A.toFlatObject(A, {}, null, function(t) {
|
|
927
927
|
return /^is[A-Z]/.test(t);
|
|
928
928
|
});
|
|
929
929
|
function Zo(e, t, n) {
|
|
930
|
-
if (!
|
|
930
|
+
if (!A.isObject(e))
|
|
931
931
|
throw new TypeError("target must be an object");
|
|
932
|
-
t = t || new FormData(), n =
|
|
932
|
+
t = t || new FormData(), n = A.toFlatObject(n, {
|
|
933
933
|
metaTokens: !0,
|
|
934
934
|
dots: !1,
|
|
935
935
|
indexes: !1
|
|
936
936
|
}, !1, function(g, p) {
|
|
937
|
-
return !
|
|
937
|
+
return !A.isUndefined(p[g]);
|
|
938
938
|
});
|
|
939
|
-
const r = n.metaTokens, o = n.visitor || d, s = n.dots, i = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) &&
|
|
940
|
-
if (!
|
|
939
|
+
const r = n.metaTokens, o = n.visitor || d, s = n.dots, i = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) && A.isSpecCompliantForm(t);
|
|
940
|
+
if (!A.isFunction(o))
|
|
941
941
|
throw new TypeError("visitor must be a function");
|
|
942
|
-
function u(
|
|
943
|
-
if (
|
|
944
|
-
if (
|
|
945
|
-
return
|
|
946
|
-
if (
|
|
947
|
-
return
|
|
948
|
-
if (!c &&
|
|
942
|
+
function u(x) {
|
|
943
|
+
if (x === null) return "";
|
|
944
|
+
if (A.isDate(x))
|
|
945
|
+
return x.toISOString();
|
|
946
|
+
if (A.isBoolean(x))
|
|
947
|
+
return x.toString();
|
|
948
|
+
if (!c && A.isBlob(x))
|
|
949
949
|
throw new be("Blob is not supported. Use a Buffer instead.");
|
|
950
|
-
return
|
|
951
|
-
}
|
|
952
|
-
function d(
|
|
953
|
-
let w =
|
|
954
|
-
if (
|
|
955
|
-
if (
|
|
956
|
-
g = r ? g : g.slice(0, -2),
|
|
957
|
-
else if (
|
|
950
|
+
return A.isArrayBuffer(x) || A.isTypedArray(x) ? c && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x;
|
|
951
|
+
}
|
|
952
|
+
function d(x, g, p) {
|
|
953
|
+
let w = x;
|
|
954
|
+
if (x && !p && typeof x == "object") {
|
|
955
|
+
if (A.endsWith(g, "{}"))
|
|
956
|
+
g = r ? g : g.slice(0, -2), x = JSON.stringify(x);
|
|
957
|
+
else if (A.isArray(x) && Qm(x) || (A.isFileList(x) || A.endsWith(g, "[]")) && (w = A.toArray(x)))
|
|
958
958
|
return g = Mc(g), w.forEach(function(y, N) {
|
|
959
|
-
!(
|
|
959
|
+
!(A.isUndefined(y) || y === null) && t.append(
|
|
960
960
|
// eslint-disable-next-line no-nested-ternary
|
|
961
961
|
i === !0 ? Qa([g], N, s) : i === null ? g : g + "[]",
|
|
962
962
|
u(y)
|
|
963
963
|
);
|
|
964
964
|
}), !1;
|
|
965
965
|
}
|
|
966
|
-
return li(
|
|
966
|
+
return li(x) ? !0 : (t.append(Qa(p, g, s), u(x)), !1);
|
|
967
967
|
}
|
|
968
968
|
const h = [], m = Object.assign(eg, {
|
|
969
969
|
defaultVisitor: d,
|
|
970
970
|
convertValue: u,
|
|
971
971
|
isVisitable: li
|
|
972
972
|
});
|
|
973
|
-
function x
|
|
974
|
-
if (!
|
|
975
|
-
if (h.indexOf(
|
|
973
|
+
function v(x, g) {
|
|
974
|
+
if (!A.isUndefined(x)) {
|
|
975
|
+
if (h.indexOf(x) !== -1)
|
|
976
976
|
throw Error("Circular reference detected in " + g.join("."));
|
|
977
|
-
h.push(
|
|
978
|
-
(!(
|
|
977
|
+
h.push(x), A.forEach(x, function(w, b) {
|
|
978
|
+
(!(A.isUndefined(w) || w === null) && o.call(
|
|
979
979
|
t,
|
|
980
980
|
w,
|
|
981
|
-
|
|
981
|
+
A.isString(b) ? b.trim() : b,
|
|
982
982
|
g,
|
|
983
983
|
m
|
|
984
|
-
)) === !0 &&
|
|
984
|
+
)) === !0 && v(w, g ? g.concat(b) : [b]);
|
|
985
985
|
}), h.pop();
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
|
-
if (!
|
|
988
|
+
if (!A.isObject(e))
|
|
989
989
|
throw new TypeError("data must be an object");
|
|
990
|
-
return
|
|
990
|
+
return v(e), t;
|
|
991
991
|
}
|
|
992
992
|
function el(e) {
|
|
993
993
|
const t = {
|
|
@@ -1025,12 +1025,12 @@ function Lc(e, t, n) {
|
|
|
1025
1025
|
if (!t)
|
|
1026
1026
|
return e;
|
|
1027
1027
|
const r = n && n.encode || tg;
|
|
1028
|
-
|
|
1028
|
+
A.isFunction(n) && (n = {
|
|
1029
1029
|
serialize: n
|
|
1030
1030
|
});
|
|
1031
1031
|
const o = n && n.serialize;
|
|
1032
1032
|
let s;
|
|
1033
|
-
if (o ? s = o(t, n) : s =
|
|
1033
|
+
if (o ? s = o(t, n) : s = A.isURLSearchParams(t) ? t.toString() : new Ui(t, n).toString(r), s) {
|
|
1034
1034
|
const i = e.indexOf("#");
|
|
1035
1035
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
1036
1036
|
}
|
|
@@ -1085,7 +1085,7 @@ class tl {
|
|
|
1085
1085
|
* @returns {void}
|
|
1086
1086
|
*/
|
|
1087
1087
|
forEach(t) {
|
|
1088
|
-
|
|
1088
|
+
A.forEach(this.handlers, function(r) {
|
|
1089
1089
|
r !== null && t(r);
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
@@ -1117,13 +1117,13 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", lg
|
|
|
1117
1117
|
function ug(e, t) {
|
|
1118
1118
|
return Zo(e, new lt.classes.URLSearchParams(), {
|
|
1119
1119
|
visitor: function(n, r, o, s) {
|
|
1120
|
-
return lt.isNode &&
|
|
1120
|
+
return lt.isNode && A.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
1121
1121
|
},
|
|
1122
1122
|
...t
|
|
1123
1123
|
});
|
|
1124
1124
|
}
|
|
1125
1125
|
function dg(e) {
|
|
1126
|
-
return
|
|
1126
|
+
return A.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1127
1127
|
}
|
|
1128
1128
|
function fg(e) {
|
|
1129
1129
|
const t = {}, n = Object.keys(e);
|
|
@@ -1139,20 +1139,20 @@ function Bc(e) {
|
|
|
1139
1139
|
let i = n[s++];
|
|
1140
1140
|
if (i === "__proto__") return !0;
|
|
1141
1141
|
const a = Number.isFinite(+i), c = s >= n.length;
|
|
1142
|
-
return i = !i &&
|
|
1142
|
+
return i = !i && A.isArray(o) ? o.length : i, c ? (A.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !A.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && A.isArray(o[i]) && (o[i] = fg(o[i])), !a);
|
|
1143
1143
|
}
|
|
1144
|
-
if (
|
|
1144
|
+
if (A.isFormData(e) && A.isFunction(e.entries)) {
|
|
1145
1145
|
const n = {};
|
|
1146
|
-
return
|
|
1146
|
+
return A.forEachEntry(e, (r, o) => {
|
|
1147
1147
|
t(dg(r), o, n, 0);
|
|
1148
1148
|
}), n;
|
|
1149
1149
|
}
|
|
1150
1150
|
return null;
|
|
1151
1151
|
}
|
|
1152
1152
|
function hg(e, t, n) {
|
|
1153
|
-
if (
|
|
1153
|
+
if (A.isString(e))
|
|
1154
1154
|
try {
|
|
1155
|
-
return (t || JSON.parse)(e),
|
|
1155
|
+
return (t || JSON.parse)(e), A.trim(e);
|
|
1156
1156
|
} catch (r) {
|
|
1157
1157
|
if (r.name !== "SyntaxError")
|
|
1158
1158
|
throw r;
|
|
@@ -1163,20 +1163,20 @@ const Wr = {
|
|
|
1163
1163
|
transitional: Fc,
|
|
1164
1164
|
adapter: ["xhr", "http", "fetch"],
|
|
1165
1165
|
transformRequest: [function(t, n) {
|
|
1166
|
-
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s =
|
|
1167
|
-
if (s &&
|
|
1166
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = A.isObject(t);
|
|
1167
|
+
if (s && A.isHTMLForm(t) && (t = new FormData(t)), A.isFormData(t))
|
|
1168
1168
|
return o ? JSON.stringify(Bc(t)) : t;
|
|
1169
|
-
if (
|
|
1169
|
+
if (A.isArrayBuffer(t) || A.isBuffer(t) || A.isStream(t) || A.isFile(t) || A.isBlob(t) || A.isReadableStream(t))
|
|
1170
1170
|
return t;
|
|
1171
|
-
if (
|
|
1171
|
+
if (A.isArrayBufferView(t))
|
|
1172
1172
|
return t.buffer;
|
|
1173
|
-
if (
|
|
1173
|
+
if (A.isURLSearchParams(t))
|
|
1174
1174
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1175
1175
|
let a;
|
|
1176
1176
|
if (s) {
|
|
1177
1177
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1178
1178
|
return ug(t, this.formSerializer).toString();
|
|
1179
|
-
if ((a =
|
|
1179
|
+
if ((a = A.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
1180
1180
|
const c = this.env && this.env.FormData;
|
|
1181
1181
|
return Zo(
|
|
1182
1182
|
a ? { "files[]": t } : t,
|
|
@@ -1189,9 +1189,9 @@ const Wr = {
|
|
|
1189
1189
|
}],
|
|
1190
1190
|
transformResponse: [function(t) {
|
|
1191
1191
|
const n = this.transitional || Wr.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
1192
|
-
if (
|
|
1192
|
+
if (A.isResponse(t) || A.isReadableStream(t))
|
|
1193
1193
|
return t;
|
|
1194
|
-
if (t &&
|
|
1194
|
+
if (t && A.isString(t) && (r && !this.responseType || o)) {
|
|
1195
1195
|
const i = !(n && n.silentJSONParsing) && o;
|
|
1196
1196
|
try {
|
|
1197
1197
|
return JSON.parse(t, this.parseReviver);
|
|
@@ -1225,10 +1225,10 @@ const Wr = {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
};
|
|
1228
|
-
|
|
1228
|
+
A.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1229
1229
|
Wr.headers[e] = {};
|
|
1230
1230
|
});
|
|
1231
|
-
const pg =
|
|
1231
|
+
const pg = A.toObjectSet([
|
|
1232
1232
|
"age",
|
|
1233
1233
|
"authorization",
|
|
1234
1234
|
"content-length",
|
|
@@ -1258,7 +1258,7 @@ function vr(e) {
|
|
|
1258
1258
|
return e && String(e).trim().toLowerCase();
|
|
1259
1259
|
}
|
|
1260
1260
|
function ho(e) {
|
|
1261
|
-
return e === !1 || e == null ? e :
|
|
1261
|
+
return e === !1 || e == null ? e : A.isArray(e) ? e.map(ho) : String(e);
|
|
1262
1262
|
}
|
|
1263
1263
|
function gg(e) {
|
|
1264
1264
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -1269,12 +1269,12 @@ function gg(e) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
const xg = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1271
1271
|
function _s(e, t, n, r, o) {
|
|
1272
|
-
if (
|
|
1272
|
+
if (A.isFunction(r))
|
|
1273
1273
|
return r.call(this, t, n);
|
|
1274
|
-
if (o && (t = n), !!
|
|
1275
|
-
if (
|
|
1274
|
+
if (o && (t = n), !!A.isString(t)) {
|
|
1275
|
+
if (A.isString(r))
|
|
1276
1276
|
return t.indexOf(r) !== -1;
|
|
1277
|
-
if (
|
|
1277
|
+
if (A.isRegExp(r))
|
|
1278
1278
|
return r.test(t);
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
@@ -1282,7 +1282,7 @@ function vg(e) {
|
|
|
1282
1282
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1283
1283
|
}
|
|
1284
1284
|
function bg(e, t) {
|
|
1285
|
-
const n =
|
|
1285
|
+
const n = A.toCamelCase(" " + t);
|
|
1286
1286
|
["get", "set", "has"].forEach((r) => {
|
|
1287
1287
|
Object.defineProperty(e, r + n, {
|
|
1288
1288
|
value: function(o, s, i) {
|
|
@@ -1302,20 +1302,20 @@ let xt = class {
|
|
|
1302
1302
|
const d = vr(c);
|
|
1303
1303
|
if (!d)
|
|
1304
1304
|
throw new Error("header name must be a non-empty string");
|
|
1305
|
-
const h =
|
|
1305
|
+
const h = A.findKey(o, d);
|
|
1306
1306
|
(!h || o[h] === void 0 || u === !0 || u === void 0 && o[h] !== !1) && (o[h || c] = ho(a));
|
|
1307
1307
|
}
|
|
1308
|
-
const i = (a, c) =>
|
|
1309
|
-
if (
|
|
1308
|
+
const i = (a, c) => A.forEach(a, (u, d) => s(u, d, c));
|
|
1309
|
+
if (A.isPlainObject(t) || t instanceof this.constructor)
|
|
1310
1310
|
i(t, n);
|
|
1311
|
-
else if (
|
|
1311
|
+
else if (A.isString(t) && (t = t.trim()) && !xg(t))
|
|
1312
1312
|
i(mg(t), n);
|
|
1313
|
-
else if (
|
|
1313
|
+
else if (A.isObject(t) && A.isIterable(t)) {
|
|
1314
1314
|
let a = {}, c, u;
|
|
1315
1315
|
for (const d of t) {
|
|
1316
|
-
if (!
|
|
1316
|
+
if (!A.isArray(d))
|
|
1317
1317
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1318
|
-
a[u = d[0]] = (c = a[u]) ?
|
|
1318
|
+
a[u = d[0]] = (c = a[u]) ? A.isArray(c) ? [...c, d[1]] : [c, d[1]] : d[1];
|
|
1319
1319
|
}
|
|
1320
1320
|
i(a, n);
|
|
1321
1321
|
} else
|
|
@@ -1324,16 +1324,16 @@ let xt = class {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
get(t, n) {
|
|
1326
1326
|
if (t = vr(t), t) {
|
|
1327
|
-
const r =
|
|
1327
|
+
const r = A.findKey(this, t);
|
|
1328
1328
|
if (r) {
|
|
1329
1329
|
const o = this[r];
|
|
1330
1330
|
if (!n)
|
|
1331
1331
|
return o;
|
|
1332
1332
|
if (n === !0)
|
|
1333
1333
|
return gg(o);
|
|
1334
|
-
if (
|
|
1334
|
+
if (A.isFunction(n))
|
|
1335
1335
|
return n.call(this, o, r);
|
|
1336
|
-
if (
|
|
1336
|
+
if (A.isRegExp(n))
|
|
1337
1337
|
return n.exec(o);
|
|
1338
1338
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1339
1339
|
}
|
|
@@ -1341,7 +1341,7 @@ let xt = class {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
has(t, n) {
|
|
1343
1343
|
if (t = vr(t), t) {
|
|
1344
|
-
const r =
|
|
1344
|
+
const r = A.findKey(this, t);
|
|
1345
1345
|
return !!(r && this[r] !== void 0 && (!n || _s(this, this[r], r, n)));
|
|
1346
1346
|
}
|
|
1347
1347
|
return !1;
|
|
@@ -1351,11 +1351,11 @@ let xt = class {
|
|
|
1351
1351
|
let o = !1;
|
|
1352
1352
|
function s(i) {
|
|
1353
1353
|
if (i = vr(i), i) {
|
|
1354
|
-
const a =
|
|
1354
|
+
const a = A.findKey(r, i);
|
|
1355
1355
|
a && (!n || _s(r, r[a], a, n)) && (delete r[a], o = !0);
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
|
-
return
|
|
1358
|
+
return A.isArray(t) ? t.forEach(s) : s(t), o;
|
|
1359
1359
|
}
|
|
1360
1360
|
clear(t) {
|
|
1361
1361
|
const n = Object.keys(this);
|
|
@@ -1368,8 +1368,8 @@ let xt = class {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
normalize(t) {
|
|
1370
1370
|
const n = this, r = {};
|
|
1371
|
-
return
|
|
1372
|
-
const i =
|
|
1371
|
+
return A.forEach(this, (o, s) => {
|
|
1372
|
+
const i = A.findKey(r, s);
|
|
1373
1373
|
if (i) {
|
|
1374
1374
|
n[i] = ho(o), delete n[s];
|
|
1375
1375
|
return;
|
|
@@ -1383,8 +1383,8 @@ let xt = class {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
toJSON(t) {
|
|
1385
1385
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1386
|
-
return
|
|
1387
|
-
r != null && r !== !1 && (n[o] = t &&
|
|
1386
|
+
return A.forEach(this, (r, o) => {
|
|
1387
|
+
r != null && r !== !1 && (n[o] = t && A.isArray(r) ? r.join(", ") : r);
|
|
1388
1388
|
}), n;
|
|
1389
1389
|
}
|
|
1390
1390
|
[Symbol.iterator]() {
|
|
@@ -1415,11 +1415,11 @@ let xt = class {
|
|
|
1415
1415
|
const a = vr(i);
|
|
1416
1416
|
r[a] || (bg(o, i), r[a] = !0);
|
|
1417
1417
|
}
|
|
1418
|
-
return
|
|
1418
|
+
return A.isArray(t) ? t.forEach(s) : s(t), this;
|
|
1419
1419
|
}
|
|
1420
1420
|
};
|
|
1421
1421
|
xt.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1422
|
-
|
|
1422
|
+
A.reduceDescriptors(xt.prototype, ({ value: e }, t) => {
|
|
1423
1423
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1424
1424
|
return {
|
|
1425
1425
|
get: () => e,
|
|
@@ -1428,11 +1428,11 @@ k.reduceDescriptors(xt.prototype, ({ value: e }, t) => {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
};
|
|
1430
1430
|
});
|
|
1431
|
-
|
|
1431
|
+
A.freezeMethods(xt);
|
|
1432
1432
|
function Os(e, t) {
|
|
1433
1433
|
const n = this || Wr, r = t || n, o = xt.from(r.headers);
|
|
1434
1434
|
let s = r.data;
|
|
1435
|
-
return
|
|
1435
|
+
return A.forEach(e, function(a) {
|
|
1436
1436
|
s = a.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
1437
1437
|
}), o.normalize(), s;
|
|
1438
1438
|
}
|
|
@@ -1442,7 +1442,7 @@ function $c(e) {
|
|
|
1442
1442
|
function rr(e, t, n) {
|
|
1443
1443
|
be.call(this, e ?? "canceled", be.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1444
1444
|
}
|
|
1445
|
-
|
|
1445
|
+
A.inherits(rr, be, {
|
|
1446
1446
|
__CANCEL__: !0
|
|
1447
1447
|
});
|
|
1448
1448
|
function Hc(e, t, n) {
|
|
@@ -1471,8 +1471,8 @@ function yg(e, t) {
|
|
|
1471
1471
|
m += n[h++], h = h % e;
|
|
1472
1472
|
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), u - i < t)
|
|
1473
1473
|
return;
|
|
1474
|
-
const
|
|
1475
|
-
return
|
|
1474
|
+
const v = d && u - d;
|
|
1475
|
+
return v ? Math.round(m * 1e3 / v) : void 0;
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
1478
|
function Sg(e, t) {
|
|
@@ -1513,7 +1513,7 @@ const Ao = (e, t, n = 3) => {
|
|
|
1513
1513
|
total: e,
|
|
1514
1514
|
loaded: r
|
|
1515
1515
|
}), t[1]];
|
|
1516
|
-
}, ol = (e) => (...t) =>
|
|
1516
|
+
}, ol = (e) => (...t) => A.asap(() => e(...t)), Cg = lt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, lt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1517
1517
|
new URL(lt.origin),
|
|
1518
1518
|
lt.navigator && /(msie|trident)/i.test(lt.navigator.userAgent)
|
|
1519
1519
|
) : () => !0, Tg = lt.hasStandardBrowserEnv ? (
|
|
@@ -1521,7 +1521,7 @@ const Ao = (e, t, n = 3) => {
|
|
|
1521
1521
|
{
|
|
1522
1522
|
write(e, t, n, r, o, s) {
|
|
1523
1523
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
1524
|
-
|
|
1524
|
+
A.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), A.isString(r) && i.push("path=" + r), A.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
1525
1525
|
},
|
|
1526
1526
|
read(e) {
|
|
1527
1527
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -1558,21 +1558,21 @@ function En(e, t) {
|
|
|
1558
1558
|
t = t || {};
|
|
1559
1559
|
const n = {};
|
|
1560
1560
|
function r(u, d, h, m) {
|
|
1561
|
-
return
|
|
1561
|
+
return A.isPlainObject(u) && A.isPlainObject(d) ? A.merge.call({ caseless: m }, u, d) : A.isPlainObject(d) ? A.merge({}, d) : A.isArray(d) ? d.slice() : d;
|
|
1562
1562
|
}
|
|
1563
1563
|
function o(u, d, h, m) {
|
|
1564
|
-
if (
|
|
1565
|
-
if (!
|
|
1564
|
+
if (A.isUndefined(d)) {
|
|
1565
|
+
if (!A.isUndefined(u))
|
|
1566
1566
|
return r(void 0, u, h, m);
|
|
1567
1567
|
} else return r(u, d, h, m);
|
|
1568
1568
|
}
|
|
1569
1569
|
function s(u, d) {
|
|
1570
|
-
if (!
|
|
1570
|
+
if (!A.isUndefined(d))
|
|
1571
1571
|
return r(void 0, d);
|
|
1572
1572
|
}
|
|
1573
1573
|
function i(u, d) {
|
|
1574
|
-
if (
|
|
1575
|
-
if (!
|
|
1574
|
+
if (A.isUndefined(d)) {
|
|
1575
|
+
if (!A.isUndefined(u))
|
|
1576
1576
|
return r(void 0, u);
|
|
1577
1577
|
} else return r(void 0, d);
|
|
1578
1578
|
}
|
|
@@ -1613,9 +1613,9 @@ function En(e, t) {
|
|
|
1613
1613
|
validateStatus: a,
|
|
1614
1614
|
headers: (u, d, h) => o(sl(u), sl(d), h, !0)
|
|
1615
1615
|
};
|
|
1616
|
-
return
|
|
1616
|
+
return A.forEach(Object.keys({ ...e, ...t }), function(d) {
|
|
1617
1617
|
const h = c[d] || o, m = h(e[d], t[d], d);
|
|
1618
|
-
|
|
1618
|
+
A.isUndefined(m) && h !== a || (n[d] = m);
|
|
1619
1619
|
}), n;
|
|
1620
1620
|
}
|
|
1621
1621
|
const Uc = (e) => {
|
|
@@ -1624,17 +1624,17 @@ const Uc = (e) => {
|
|
|
1624
1624
|
if (t.headers = i = xt.from(i), t.url = Lc(zc(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1625
1625
|
"Authorization",
|
|
1626
1626
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1627
|
-
),
|
|
1627
|
+
), A.isFormData(n)) {
|
|
1628
1628
|
if (lt.hasStandardBrowserEnv || lt.hasStandardBrowserWebWorkerEnv)
|
|
1629
1629
|
i.setContentType(void 0);
|
|
1630
|
-
else if (
|
|
1630
|
+
else if (A.isFunction(n.getHeaders)) {
|
|
1631
1631
|
const c = n.getHeaders(), u = ["content-type", "content-length"];
|
|
1632
1632
|
Object.entries(c).forEach(([d, h]) => {
|
|
1633
1633
|
u.includes(d.toLowerCase()) && i.set(d, h);
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
|
-
if (lt.hasStandardBrowserEnv && (r &&
|
|
1637
|
+
if (lt.hasStandardBrowserEnv && (r && A.isFunction(r) && (r = r(t)), r || r !== !1 && Cg(t.url))) {
|
|
1638
1638
|
const c = o && s && Tg.read(s);
|
|
1639
1639
|
c && i.set(o, c);
|
|
1640
1640
|
}
|
|
@@ -1644,9 +1644,9 @@ const Uc = (e) => {
|
|
|
1644
1644
|
const o = Uc(e);
|
|
1645
1645
|
let s = o.data;
|
|
1646
1646
|
const i = xt.from(o.headers).normalize();
|
|
1647
|
-
let { responseType: a, onUploadProgress: c, onDownloadProgress: u } = o, d, h, m,
|
|
1647
|
+
let { responseType: a, onUploadProgress: c, onDownloadProgress: u } = o, d, h, m, v, x;
|
|
1648
1648
|
function g() {
|
|
1649
|
-
|
|
1649
|
+
v && v(), x && x(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
|
|
1650
1650
|
}
|
|
1651
1651
|
let p = new XMLHttpRequest();
|
|
1652
1652
|
p.open(o.method.toUpperCase(), o.url, !0), p.timeout = o.timeout;
|
|
@@ -1685,9 +1685,9 @@ const Uc = (e) => {
|
|
|
1685
1685
|
e,
|
|
1686
1686
|
p
|
|
1687
1687
|
)), p = null;
|
|
1688
|
-
}, s === void 0 && i.setContentType(null), "setRequestHeader" in p &&
|
|
1688
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in p && A.forEach(i.toJSON(), function(N, S) {
|
|
1689
1689
|
p.setRequestHeader(S, N);
|
|
1690
|
-
}),
|
|
1690
|
+
}), A.isUndefined(o.withCredentials) || (p.withCredentials = !!o.withCredentials), a && a !== "json" && (p.responseType = o.responseType), u && ([m, x] = Ao(u, !0), p.addEventListener("progress", m)), c && p.upload && ([h, v] = Ao(c), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", v)), (o.cancelToken || o.signal) && (d = (y) => {
|
|
1691
1691
|
p && (r(!y || y.type ? new rr(null, e, p) : y), p.abort(), p = null);
|
|
1692
1692
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
1693
1693
|
const b = wg(o.url);
|
|
@@ -1718,7 +1718,7 @@ const Uc = (e) => {
|
|
|
1718
1718
|
};
|
|
1719
1719
|
e.forEach((u) => u.addEventListener("abort", s));
|
|
1720
1720
|
const { signal: c } = r;
|
|
1721
|
-
return c.unsubscribe = () =>
|
|
1721
|
+
return c.unsubscribe = () => A.asap(a), c;
|
|
1722
1722
|
}
|
|
1723
1723
|
}, kg = function* (e, t) {
|
|
1724
1724
|
let n = e.byteLength;
|
|
@@ -1777,65 +1777,65 @@ const Uc = (e) => {
|
|
|
1777
1777
|
}, {
|
|
1778
1778
|
highWaterMark: 2
|
|
1779
1779
|
});
|
|
1780
|
-
}, al = 64 * 1024, { isFunction: eo } =
|
|
1780
|
+
}, al = 64 * 1024, { isFunction: eo } = A, _g = (({ Request: e, Response: t }) => ({
|
|
1781
1781
|
Request: e,
|
|
1782
1782
|
Response: t
|
|
1783
|
-
}))(
|
|
1783
|
+
}))(A.global), {
|
|
1784
1784
|
ReadableStream: ll,
|
|
1785
1785
|
TextEncoder: cl
|
|
1786
|
-
} =
|
|
1786
|
+
} = A.global, ul = (e, ...t) => {
|
|
1787
1787
|
try {
|
|
1788
1788
|
return !!e(...t);
|
|
1789
1789
|
} catch {
|
|
1790
1790
|
return !1;
|
|
1791
1791
|
}
|
|
1792
1792
|
}, Og = (e) => {
|
|
1793
|
-
e =
|
|
1793
|
+
e = A.merge.call({
|
|
1794
1794
|
skipUndefined: !0
|
|
1795
1795
|
}, _g, e);
|
|
1796
1796
|
const { fetch: t, Request: n, Response: r } = e, o = t ? eo(t) : typeof fetch == "function", s = eo(n), i = eo(r);
|
|
1797
1797
|
if (!o)
|
|
1798
1798
|
return !1;
|
|
1799
|
-
const a = o && eo(ll), c = o && (typeof cl == "function" ? /* @__PURE__ */ ((
|
|
1800
|
-
let
|
|
1799
|
+
const a = o && eo(ll), c = o && (typeof cl == "function" ? /* @__PURE__ */ ((x) => (g) => x.encode(g))(new cl()) : async (x) => new Uint8Array(await new n(x).arrayBuffer())), u = s && a && ul(() => {
|
|
1800
|
+
let x = !1;
|
|
1801
1801
|
const g = new n(lt.origin, {
|
|
1802
1802
|
body: new ll(),
|
|
1803
1803
|
method: "POST",
|
|
1804
1804
|
get duplex() {
|
|
1805
|
-
return
|
|
1805
|
+
return x = !0, "half";
|
|
1806
1806
|
}
|
|
1807
1807
|
}).headers.has("Content-Type");
|
|
1808
|
-
return
|
|
1809
|
-
}), d = i && a && ul(() =>
|
|
1810
|
-
stream: d && ((
|
|
1808
|
+
return x && !g;
|
|
1809
|
+
}), d = i && a && ul(() => A.isReadableStream(new r("").body)), h = {
|
|
1810
|
+
stream: d && ((x) => x.body)
|
|
1811
1811
|
};
|
|
1812
|
-
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1813
|
-
!h[
|
|
1814
|
-
let w = g && g[
|
|
1812
|
+
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((x) => {
|
|
1813
|
+
!h[x] && (h[x] = (g, p) => {
|
|
1814
|
+
let w = g && g[x];
|
|
1815
1815
|
if (w)
|
|
1816
1816
|
return w.call(g);
|
|
1817
|
-
throw new be(`Response type '${
|
|
1817
|
+
throw new be(`Response type '${x}' is not supported`, be.ERR_NOT_SUPPORT, p);
|
|
1818
1818
|
});
|
|
1819
1819
|
});
|
|
1820
|
-
const m = async (
|
|
1821
|
-
if (
|
|
1820
|
+
const m = async (x) => {
|
|
1821
|
+
if (x == null)
|
|
1822
1822
|
return 0;
|
|
1823
|
-
if (
|
|
1824
|
-
return
|
|
1825
|
-
if (
|
|
1823
|
+
if (A.isBlob(x))
|
|
1824
|
+
return x.size;
|
|
1825
|
+
if (A.isSpecCompliantForm(x))
|
|
1826
1826
|
return (await new n(lt.origin, {
|
|
1827
1827
|
method: "POST",
|
|
1828
|
-
body:
|
|
1828
|
+
body: x
|
|
1829
1829
|
}).arrayBuffer()).byteLength;
|
|
1830
|
-
if (
|
|
1831
|
-
return
|
|
1832
|
-
if (
|
|
1833
|
-
return (await c(
|
|
1834
|
-
},
|
|
1835
|
-
const p =
|
|
1830
|
+
if (A.isArrayBufferView(x) || A.isArrayBuffer(x))
|
|
1831
|
+
return x.byteLength;
|
|
1832
|
+
if (A.isURLSearchParams(x) && (x = x + ""), A.isString(x))
|
|
1833
|
+
return (await c(x)).byteLength;
|
|
1834
|
+
}, v = async (x, g) => {
|
|
1835
|
+
const p = A.toFiniteNumber(x.getContentLength());
|
|
1836
1836
|
return p ?? m(g);
|
|
1837
1837
|
};
|
|
1838
|
-
return async (
|
|
1838
|
+
return async (x) => {
|
|
1839
1839
|
let {
|
|
1840
1840
|
url: g,
|
|
1841
1841
|
method: p,
|
|
@@ -1848,8 +1848,8 @@ const Uc = (e) => {
|
|
|
1848
1848
|
responseType: C,
|
|
1849
1849
|
headers: R,
|
|
1850
1850
|
withCredentials: I = "same-origin",
|
|
1851
|
-
fetchOptions:
|
|
1852
|
-
} = Uc(
|
|
1851
|
+
fetchOptions: k
|
|
1852
|
+
} = Uc(x), M = t || fetch;
|
|
1853
1853
|
C = C ? (C + "").toLowerCase() : "text";
|
|
1854
1854
|
let H = jg([b, y && y.toAbortSignal()], N), U = null;
|
|
1855
1855
|
const j = H && H.unsubscribe && (() => {
|
|
@@ -1857,13 +1857,13 @@ const Uc = (e) => {
|
|
|
1857
1857
|
});
|
|
1858
1858
|
let $;
|
|
1859
1859
|
try {
|
|
1860
|
-
if (T && u && p !== "get" && p !== "head" && ($ = await
|
|
1860
|
+
if (T && u && p !== "get" && p !== "head" && ($ = await v(R, w)) !== 0) {
|
|
1861
1861
|
let Z = new n(g, {
|
|
1862
1862
|
method: "POST",
|
|
1863
1863
|
body: w,
|
|
1864
1864
|
duplex: "half"
|
|
1865
1865
|
}), q;
|
|
1866
|
-
if (
|
|
1866
|
+
if (A.isFormData(w) && (q = Z.headers.get("content-type")) && R.setContentType(q), Z.body) {
|
|
1867
1867
|
const [F, Y] = rl(
|
|
1868
1868
|
$,
|
|
1869
1869
|
Ao(ol(T))
|
|
@@ -1871,9 +1871,9 @@ const Uc = (e) => {
|
|
|
1871
1871
|
w = il(Z.body, al, F, Y);
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
|
-
|
|
1874
|
+
A.isString(I) || (I = I ? "include" : "omit");
|
|
1875
1875
|
const L = s && "credentials" in n.prototype, Q = {
|
|
1876
|
-
...
|
|
1876
|
+
...k,
|
|
1877
1877
|
signal: H,
|
|
1878
1878
|
method: p.toUpperCase(),
|
|
1879
1879
|
headers: R.normalize().toJSON(),
|
|
@@ -1882,14 +1882,14 @@ const Uc = (e) => {
|
|
|
1882
1882
|
credentials: L ? I : void 0
|
|
1883
1883
|
};
|
|
1884
1884
|
U = s && new n(g, Q);
|
|
1885
|
-
let O = await (s ? M(U,
|
|
1885
|
+
let O = await (s ? M(U, k) : M(g, Q));
|
|
1886
1886
|
const _ = d && (C === "stream" || C === "response");
|
|
1887
1887
|
if (d && (S || _ && j)) {
|
|
1888
1888
|
const Z = {};
|
|
1889
1889
|
["status", "statusText", "headers"].forEach((ye) => {
|
|
1890
1890
|
Z[ye] = O[ye];
|
|
1891
1891
|
});
|
|
1892
|
-
const q =
|
|
1892
|
+
const q = A.toFiniteNumber(O.headers.get("content-length")), [F, Y] = S && rl(
|
|
1893
1893
|
q,
|
|
1894
1894
|
Ao(ol(S), !0)
|
|
1895
1895
|
) || [];
|
|
@@ -1901,24 +1901,24 @@ const Uc = (e) => {
|
|
|
1901
1901
|
);
|
|
1902
1902
|
}
|
|
1903
1903
|
C = C || "text";
|
|
1904
|
-
let G = await h[
|
|
1904
|
+
let G = await h[A.findKey(h, C) || "text"](O, x);
|
|
1905
1905
|
return !_ && j && j(), await new Promise((Z, q) => {
|
|
1906
1906
|
Hc(Z, q, {
|
|
1907
1907
|
data: G,
|
|
1908
1908
|
headers: xt.from(O.headers),
|
|
1909
1909
|
status: O.status,
|
|
1910
1910
|
statusText: O.statusText,
|
|
1911
|
-
config:
|
|
1911
|
+
config: x,
|
|
1912
1912
|
request: U
|
|
1913
1913
|
});
|
|
1914
1914
|
});
|
|
1915
1915
|
} catch (L) {
|
|
1916
1916
|
throw j && j(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign(
|
|
1917
|
-
new be("Network Error", be.ERR_NETWORK,
|
|
1917
|
+
new be("Network Error", be.ERR_NETWORK, x, U),
|
|
1918
1918
|
{
|
|
1919
1919
|
cause: L.cause || L
|
|
1920
1920
|
}
|
|
1921
|
-
) : be.from(L, L && L.code,
|
|
1921
|
+
) : be.from(L, L && L.code, x, U);
|
|
1922
1922
|
}
|
|
1923
1923
|
};
|
|
1924
1924
|
}, Mg = /* @__PURE__ */ new Map(), Wc = (e) => {
|
|
@@ -1941,7 +1941,7 @@ const ui = {
|
|
|
1941
1941
|
get: Wc
|
|
1942
1942
|
}
|
|
1943
1943
|
};
|
|
1944
|
-
|
|
1944
|
+
A.forEach(ui, (e, t) => {
|
|
1945
1945
|
if (e) {
|
|
1946
1946
|
try {
|
|
1947
1947
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1950,9 +1950,9 @@ k.forEach(ui, (e, t) => {
|
|
|
1950
1950
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1951
1951
|
}
|
|
1952
1952
|
});
|
|
1953
|
-
const dl = (e) => `- ${e}`, Dg = (e) =>
|
|
1953
|
+
const dl = (e) => `- ${e}`, Dg = (e) => A.isFunction(e) || e === null || e === !1, Vc = {
|
|
1954
1954
|
getAdapter: (e, t) => {
|
|
1955
|
-
e =
|
|
1955
|
+
e = A.isArray(e) ? e : [e];
|
|
1956
1956
|
const { length: n } = e;
|
|
1957
1957
|
let r, o;
|
|
1958
1958
|
const s = {};
|
|
@@ -1961,7 +1961,7 @@ const dl = (e) => `- ${e}`, Dg = (e) => k.isFunction(e) || e === null || e === !
|
|
|
1961
1961
|
let a;
|
|
1962
1962
|
if (o = r, !Dg(r) && (o = ui[(a = String(r)).toLowerCase()], o === void 0))
|
|
1963
1963
|
throw new be(`Unknown adapter '${a}'`);
|
|
1964
|
-
if (o && (
|
|
1964
|
+
if (o && (A.isFunction(o) || (o = o.get(t))))
|
|
1965
1965
|
break;
|
|
1966
1966
|
s[a || "#" + i] = o;
|
|
1967
1967
|
}
|
|
@@ -2091,7 +2091,7 @@ let Tn = class {
|
|
|
2091
2091
|
silentJSONParsing: Vt.transitional(Vt.boolean),
|
|
2092
2092
|
forcedJSONParsing: Vt.transitional(Vt.boolean),
|
|
2093
2093
|
clarifyTimeoutError: Vt.transitional(Vt.boolean)
|
|
2094
|
-
}, !1), o != null && (
|
|
2094
|
+
}, !1), o != null && (A.isFunction(o) ? n.paramsSerializer = {
|
|
2095
2095
|
serialize: o
|
|
2096
2096
|
} : po.assertOptions(o, {
|
|
2097
2097
|
encode: Vt.function,
|
|
@@ -2100,14 +2100,14 @@ let Tn = class {
|
|
|
2100
2100
|
baseUrl: Vt.spelling("baseURL"),
|
|
2101
2101
|
withXsrfToken: Vt.spelling("withXSRFToken")
|
|
2102
2102
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2103
|
-
let i = s &&
|
|
2103
|
+
let i = s && A.merge(
|
|
2104
2104
|
s.common,
|
|
2105
2105
|
s[n.method]
|
|
2106
2106
|
);
|
|
2107
|
-
s &&
|
|
2107
|
+
s && A.forEach(
|
|
2108
2108
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2109
|
-
(
|
|
2110
|
-
delete s[
|
|
2109
|
+
(x) => {
|
|
2110
|
+
delete s[x];
|
|
2111
2111
|
}
|
|
2112
2112
|
), n.headers = xt.concat(i, s);
|
|
2113
2113
|
const a = [];
|
|
@@ -2121,26 +2121,26 @@ let Tn = class {
|
|
|
2121
2121
|
});
|
|
2122
2122
|
let d, h = 0, m;
|
|
2123
2123
|
if (!c) {
|
|
2124
|
-
const
|
|
2125
|
-
for (
|
|
2126
|
-
d = d.then(
|
|
2124
|
+
const x = [fl.bind(this), void 0];
|
|
2125
|
+
for (x.unshift(...a), x.push(...u), m = x.length, d = Promise.resolve(n); h < m; )
|
|
2126
|
+
d = d.then(x[h++], x[h++]);
|
|
2127
2127
|
return d;
|
|
2128
2128
|
}
|
|
2129
2129
|
m = a.length;
|
|
2130
|
-
let
|
|
2130
|
+
let v = n;
|
|
2131
2131
|
for (; h < m; ) {
|
|
2132
|
-
const
|
|
2132
|
+
const x = a[h++], g = a[h++];
|
|
2133
2133
|
try {
|
|
2134
|
-
|
|
2134
|
+
v = x(v);
|
|
2135
2135
|
} catch (p) {
|
|
2136
2136
|
g.call(this, p);
|
|
2137
2137
|
break;
|
|
2138
2138
|
}
|
|
2139
2139
|
}
|
|
2140
2140
|
try {
|
|
2141
|
-
d = fl.call(this,
|
|
2142
|
-
} catch (
|
|
2143
|
-
return Promise.reject(
|
|
2141
|
+
d = fl.call(this, v);
|
|
2142
|
+
} catch (x) {
|
|
2143
|
+
return Promise.reject(x);
|
|
2144
2144
|
}
|
|
2145
2145
|
for (h = 0, m = u.length; h < m; )
|
|
2146
2146
|
d = d.then(u[h++], u[h++]);
|
|
@@ -2152,7 +2152,7 @@ let Tn = class {
|
|
|
2152
2152
|
return Lc(n, t.params, t.paramsSerializer);
|
|
2153
2153
|
}
|
|
2154
2154
|
};
|
|
2155
|
-
|
|
2155
|
+
A.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2156
2156
|
Tn.prototype[t] = function(n, r) {
|
|
2157
2157
|
return this.request(En(r || {}, {
|
|
2158
2158
|
method: t,
|
|
@@ -2161,7 +2161,7 @@ k.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
2161
2161
|
}));
|
|
2162
2162
|
};
|
|
2163
2163
|
});
|
|
2164
|
-
|
|
2164
|
+
A.forEach(["post", "put", "patch"], function(t) {
|
|
2165
2165
|
function n(r) {
|
|
2166
2166
|
return function(s, i, a) {
|
|
2167
2167
|
return this.request(En(a || {}, {
|
|
@@ -2255,7 +2255,7 @@ function Bg(e) {
|
|
|
2255
2255
|
};
|
|
2256
2256
|
}
|
|
2257
2257
|
function $g(e) {
|
|
2258
|
-
return
|
|
2258
|
+
return A.isObject(e) && e.isAxiosError === !0;
|
|
2259
2259
|
}
|
|
2260
2260
|
const di = {
|
|
2261
2261
|
Continue: 100,
|
|
@@ -2327,7 +2327,7 @@ Object.entries(di).forEach(([e, t]) => {
|
|
|
2327
2327
|
});
|
|
2328
2328
|
function Yc(e) {
|
|
2329
2329
|
const t = new Tn(e), n = Rc(Tn.prototype.request, t);
|
|
2330
|
-
return
|
|
2330
|
+
return A.extend(n, Tn.prototype, t, { allOwnKeys: !0 }), A.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
2331
2331
|
return Yc(En(e, o));
|
|
2332
2332
|
}, n;
|
|
2333
2333
|
}
|
|
@@ -2347,7 +2347,7 @@ Je.spread = Bg;
|
|
|
2347
2347
|
Je.isAxiosError = $g;
|
|
2348
2348
|
Je.mergeConfig = En;
|
|
2349
2349
|
Je.AxiosHeaders = xt;
|
|
2350
|
-
Je.formToJSON = (e) => Bc(
|
|
2350
|
+
Je.formToJSON = (e) => Bc(A.isHTMLForm(e) ? new FormData(e) : e);
|
|
2351
2351
|
Je.getAdapter = Vc.getAdapter;
|
|
2352
2352
|
Je.HttpStatusCode = di;
|
|
2353
2353
|
Je.default = Je;
|
|
@@ -2504,19 +2504,19 @@ class Gg {
|
|
|
2504
2504
|
}
|
|
2505
2505
|
const Nn = new Gg();
|
|
2506
2506
|
function Kg(e = {}) {
|
|
2507
|
-
const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = fe(e.token ?? null), s = Ye(e.headers ?? {}), [i, a] = fe(!1), [c, u] = fe(null), [d, h] = fe(""), [m,
|
|
2507
|
+
const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = fe(e.token ?? null), s = Ye(e.headers ?? {}), [i, a] = fe(!1), [c, u] = fe(null), [d, h] = fe(""), [m, v] = fe(null), x = Ye(null), g = Ke((y) => {
|
|
2508
2508
|
o(y);
|
|
2509
2509
|
}, []), p = Ke(() => {
|
|
2510
2510
|
var y;
|
|
2511
|
-
(y =
|
|
2511
|
+
(y = x.current) == null || y.abort(), x.current = null, a(!1);
|
|
2512
2512
|
}, []), w = Ke(() => {
|
|
2513
|
-
h(""),
|
|
2513
|
+
h(""), v(null), u(null);
|
|
2514
2514
|
}, []), b = Ke(
|
|
2515
2515
|
(y, N, S) => {
|
|
2516
|
-
|
|
2516
|
+
x.current && (x.current.abort(), x.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && h("");
|
|
2517
2517
|
const T = new AbortController();
|
|
2518
|
-
return
|
|
2519
|
-
var I,
|
|
2518
|
+
return x.current = T, (async () => {
|
|
2519
|
+
var I, k, M, H, U;
|
|
2520
2520
|
const C = (() => {
|
|
2521
2521
|
var j;
|
|
2522
2522
|
try {
|
|
@@ -2545,7 +2545,7 @@ function Kg(e = {}) {
|
|
|
2545
2545
|
const Z = window.__AUTH_TOKEN__, q = ((I = window.localStorage) == null ? void 0 : I.getItem("authToken")) || null;
|
|
2546
2546
|
let F = null;
|
|
2547
2547
|
try {
|
|
2548
|
-
const ye = (
|
|
2548
|
+
const ye = (k = window.localStorage) == null ? void 0 : k.getItem("chat-settings");
|
|
2549
2549
|
ye && (F = ((M = JSON.parse(ye)) == null ? void 0 : M.apiKey) || null);
|
|
2550
2550
|
} catch {
|
|
2551
2551
|
}
|
|
@@ -2608,7 +2608,7 @@ function Kg(e = {}) {
|
|
|
2608
2608
|
const K = ce.delta.filter((P) => P.type === "text").map((P) => P.text).join("");
|
|
2609
2609
|
K && e.autoAppendAssistant !== !1 && (_ += K);
|
|
2610
2610
|
} else
|
|
2611
|
-
_ && (h((K) => K + _), _ = ""), N == null || N(ce), ce.type === "checkpoint" ?
|
|
2611
|
+
_ && (h((K) => K + _), _ = ""), N == null || N(ce), ce.type === "checkpoint" ? v(ce.checkpointId) : ce.type === "error" && u(ce.message);
|
|
2612
2612
|
}
|
|
2613
2613
|
}
|
|
2614
2614
|
_ && h((G) => G + _);
|
|
@@ -2617,15 +2617,15 @@ function Kg(e = {}) {
|
|
|
2617
2617
|
const $ = (j == null ? void 0 : j.message) || String(j);
|
|
2618
2618
|
C && console.debug("[use-chat] error:", $), u($), (U = S == null ? void 0 : S.onError) == null || U.call(S, $);
|
|
2619
2619
|
} finally {
|
|
2620
|
-
a(!1),
|
|
2620
|
+
a(!1), x.current = null;
|
|
2621
2621
|
}
|
|
2622
2622
|
})(), { close: () => T.abort() };
|
|
2623
2623
|
},
|
|
2624
2624
|
[t, r, e.autoAppendAssistant]
|
|
2625
2625
|
);
|
|
2626
|
-
return
|
|
2626
|
+
return Be(() => () => {
|
|
2627
2627
|
var y;
|
|
2628
|
-
return (y =
|
|
2628
|
+
return (y = x.current) == null ? void 0 : y.abort();
|
|
2629
2629
|
}, []), {
|
|
2630
2630
|
isStreaming: i,
|
|
2631
2631
|
error: c,
|
|
@@ -2716,7 +2716,7 @@ function Zg(e = []) {
|
|
|
2716
2716
|
}, [i]), c = Ke((d) => {
|
|
2717
2717
|
r.current.push(d), a();
|
|
2718
2718
|
}, [a]);
|
|
2719
|
-
|
|
2719
|
+
Be(() => () => {
|
|
2720
2720
|
o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), r.current = [];
|
|
2721
2721
|
}, []);
|
|
2722
2722
|
const u = un(() => ({
|
|
@@ -2936,13 +2936,13 @@ async function ix(e, t = [], n, r, o, s) {
|
|
|
2936
2936
|
const qc = wc(null);
|
|
2937
2937
|
function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialThreadId: o = null, historyPageSize: s, autoLoadInitial: i = !0, enableFileAgentRouting: a = !1, fileAgentId: c = "invoice_reader" }) {
|
|
2938
2938
|
const u = Nn;
|
|
2939
|
-
|
|
2939
|
+
Be(() => {
|
|
2940
2940
|
t && u.updateConfig({
|
|
2941
2941
|
baseUrl: t.baseUrl,
|
|
2942
2942
|
authToken: t.apiKey
|
|
2943
2943
|
});
|
|
2944
2944
|
}, [u, t]);
|
|
2945
|
-
const { isStreaming: d, error: h, stream: m, stop:
|
|
2945
|
+
const { isStreaming: d, error: h, stream: m, stop: v, setToken: x } = Kg({
|
|
2946
2946
|
baseUrl: u.baseUrl,
|
|
2947
2947
|
token: null,
|
|
2948
2948
|
// we update with setStreamToken below when the API tells us the token
|
|
@@ -2951,24 +2951,24 @@ function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2951
2951
|
// Ensure the path matches the chat endpoint
|
|
2952
2952
|
streamPath: "/chat/runs/stream"
|
|
2953
2953
|
}), [g, p] = fe(() => typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
|
|
2954
|
-
|
|
2955
|
-
|
|
2954
|
+
Be(() => {
|
|
2955
|
+
x(typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
|
|
2956
2956
|
const J = u.onTokenChange((ae) => {
|
|
2957
|
-
p(ae),
|
|
2957
|
+
p(ae), x(ae);
|
|
2958
2958
|
});
|
|
2959
2959
|
return () => {
|
|
2960
2960
|
J();
|
|
2961
2961
|
};
|
|
2962
|
-
}, [u,
|
|
2962
|
+
}, [u, x]);
|
|
2963
2963
|
const w = Ke((J) => {
|
|
2964
2964
|
u.setAuthToken(J);
|
|
2965
|
-
}, [u]), { state: b, seed: y, prepend: N, pushUser: S, onEvent: T, reset: C } = Zg(), R = s && s > 0 ? s : 6, [I,
|
|
2965
|
+
}, [u]), { state: b, seed: y, prepend: N, pushUser: S, onEvent: T, reset: C } = Zg(), R = s && s > 0 ? s : 6, [I, k] = fe(!1), [M, H] = fe(!1), [U, j] = fe(null), [$, L] = fe(void 0), [Q, O] = fe(void 0), _ = Ke(
|
|
2966
2966
|
(J, ae) => {
|
|
2967
2967
|
const Le = Array.isArray(J == null ? void 0 : J.messages) ? J.messages : [];
|
|
2968
2968
|
ae === "replace" ? y(Le, {
|
|
2969
2969
|
checkpointId: (J == null ? void 0 : J.checkpointId) ?? null,
|
|
2970
2970
|
checkpointNs: (J == null ? void 0 : J.checkpointNs) ?? null
|
|
2971
|
-
}) : ae === "prepend" && Le.length ? (console.log("[ChatProvider] Calling prepend with", Le.length, "messages"), N(Le)) : console.log("[ChatProvider] Skipping prepend - empty list or wrong mode"), j((J == null ? void 0 : J.nextCursor) ?? null),
|
|
2971
|
+
}) : ae === "prepend" && Le.length ? (console.log("[ChatProvider] Calling prepend with", Le.length, "messages"), N(Le)) : console.log("[ChatProvider] Skipping prepend - empty list or wrong mode"), j((J == null ? void 0 : J.nextCursor) ?? null), k(!!(J != null && J.hasMore)), L((Ve) => (J == null ? void 0 : J.checkpointId) ?? Ve ?? void 0), O((Ve) => (J == null ? void 0 : J.checkpointNs) ?? Ve ?? void 0);
|
|
2972
2972
|
},
|
|
2973
2973
|
[y, N]
|
|
2974
2974
|
), [G, Z] = fe([]), [q, F] = fe(null), Y = Ke(async () => {
|
|
@@ -3016,7 +3016,7 @@ function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3016
3016
|
},
|
|
3017
3017
|
[u.baseUrl]
|
|
3018
3018
|
);
|
|
3019
|
-
|
|
3019
|
+
Be(() => {
|
|
3020
3020
|
let J = !0;
|
|
3021
3021
|
if (!u.baseUrl) {
|
|
3022
3022
|
console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
|
|
@@ -3033,11 +3033,11 @@ function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3033
3033
|
})(), () => {
|
|
3034
3034
|
J = !1;
|
|
3035
3035
|
};
|
|
3036
|
-
}, [Y, u.baseUrl, K]),
|
|
3036
|
+
}, [Y, u.baseUrl, K]), Be(() => {
|
|
3037
3037
|
r == null || r(q);
|
|
3038
3038
|
}, [q, r]);
|
|
3039
3039
|
const P = Ye(null);
|
|
3040
|
-
|
|
3040
|
+
Be(() => {
|
|
3041
3041
|
if (o && i) {
|
|
3042
3042
|
if (!u.baseUrl) {
|
|
3043
3043
|
console.debug("[ChatProvider] skipping initial load: api.baseUrl not configured");
|
|
@@ -3060,7 +3060,7 @@ function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3060
3060
|
if (X.current !== J) {
|
|
3061
3061
|
X.current = J;
|
|
3062
3062
|
try {
|
|
3063
|
-
|
|
3063
|
+
k(!1), j(null), L(void 0), O(void 0);
|
|
3064
3064
|
const Ve = await u.getMessages({
|
|
3065
3065
|
threadId: J,
|
|
3066
3066
|
checkpointId: ae,
|
|
@@ -3079,7 +3079,7 @@ function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3079
3079
|
return rx(ae, J);
|
|
3080
3080
|
}, [u]), se = Ke(async (J, ae) => {
|
|
3081
3081
|
if (!q) throw new Error("No active thread");
|
|
3082
|
-
|
|
3082
|
+
k(!1), j(null), L(void 0), O(void 0);
|
|
3083
3083
|
const Le = await u.getMessages({
|
|
3084
3084
|
threadId: q,
|
|
3085
3085
|
checkpointId: J,
|
|
@@ -3091,7 +3091,7 @@ function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3091
3091
|
if (!q) throw new Error("No active thread");
|
|
3092
3092
|
await te(q);
|
|
3093
3093
|
}, [q, te]), Pe = Ye(!1);
|
|
3094
|
-
|
|
3094
|
+
Be(() => {
|
|
3095
3095
|
const J = Pe.current;
|
|
3096
3096
|
if (Pe.current = d, J && !d && q) {
|
|
3097
3097
|
const ae = b.lastCheckpointId ?? void 0, Le = b.lastCheckpointNs ?? void 0;
|
|
@@ -3117,7 +3117,7 @@ function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3117
3117
|
const ae = await u.createThread(J);
|
|
3118
3118
|
return await Y(), await te(ae.threadId), ae.threadId;
|
|
3119
3119
|
}, [u, Y, te]), de = Ke(async (J) => {
|
|
3120
|
-
await u.deleteThread(J), await Y(), q === J && (F(null), C([]),
|
|
3120
|
+
await u.deleteThread(J), await Y(), q === J && (F(null), C([]), k(!1), j(null), L(void 0), O(void 0));
|
|
3121
3121
|
}, [u, Y, q, C]), je = Ke(async (J, ae) => {
|
|
3122
3122
|
await u.updateThread(J, ae), await Y();
|
|
3123
3123
|
}, [u, Y]), xe = Ke(async (J, ae) => {
|
|
@@ -3220,7 +3220,7 @@ function mo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3220
3220
|
renameThread: je,
|
|
3221
3221
|
loadThread: te,
|
|
3222
3222
|
send: xe,
|
|
3223
|
-
stop:
|
|
3223
|
+
stop: v
|
|
3224
3224
|
};
|
|
3225
3225
|
return /* @__PURE__ */ l.jsx(qc.Provider, { value: rt, children: e });
|
|
3226
3226
|
}
|
|
@@ -3298,9 +3298,9 @@ function lx({
|
|
|
3298
3298
|
textareaClassName: d = "",
|
|
3299
3299
|
allowEmptySend: h = !1
|
|
3300
3300
|
}) {
|
|
3301
|
-
const [m,
|
|
3301
|
+
const [m, v] = V.useState(e), [x, g] = V.useTransition(), p = V.useRef(null);
|
|
3302
3302
|
V.useEffect(() => {
|
|
3303
|
-
|
|
3303
|
+
v(e ?? ""), p.current && (p.current.style.height = "auto", p.current.style.height = `${p.current.scrollHeight}px`);
|
|
3304
3304
|
}, [e, t]);
|
|
3305
3305
|
const w = V.useCallback(() => {
|
|
3306
3306
|
const R = p.current;
|
|
@@ -3315,18 +3315,18 @@ function lx({
|
|
|
3315
3315
|
const I = (m ?? "").trim();
|
|
3316
3316
|
!I && !h || g(() => {
|
|
3317
3317
|
try {
|
|
3318
|
-
const
|
|
3319
|
-
|
|
3320
|
-
|
|
3318
|
+
const k = i(I);
|
|
3319
|
+
k && typeof k.then == "function" ? k.then(() => {
|
|
3320
|
+
v(""), p.current && (p.current.style.height = "auto");
|
|
3321
3321
|
}).catch(() => {
|
|
3322
|
-
}) : (
|
|
3322
|
+
}) : (v(""), p.current && (p.current.style.height = "auto"));
|
|
3323
3323
|
} catch {
|
|
3324
3324
|
}
|
|
3325
3325
|
});
|
|
3326
3326
|
},
|
|
3327
3327
|
[m, i, h]
|
|
3328
3328
|
), y = V.useCallback((R) => {
|
|
3329
|
-
|
|
3329
|
+
v(R.target.value), p.current && (p.current.style.height = "auto", p.current.style.height = `${p.current.scrollHeight}px`);
|
|
3330
3330
|
}, []), N = V.useCallback(
|
|
3331
3331
|
(R) => {
|
|
3332
3332
|
R.key === "Enter" && !R.shiftKey ? (R.preventDefault(), b()) : R.key === "Escape" && t && (R.preventDefault(), a == null || a());
|
|
@@ -3371,7 +3371,7 @@ function lx({
|
|
|
3371
3371
|
size: "icon",
|
|
3372
3372
|
className: "shrink-0",
|
|
3373
3373
|
title: t ? "Save changes" : "Send message",
|
|
3374
|
-
disabled: o || !m.trim() && !h ||
|
|
3374
|
+
disabled: o || !m.trim() && !h || x,
|
|
3375
3375
|
children: /* @__PURE__ */ l.jsx(Bp, { size: 16 })
|
|
3376
3376
|
}
|
|
3377
3377
|
) })
|
|
@@ -3676,10 +3676,10 @@ function wx(e, t, n, r, o, s, i, a, c) {
|
|
|
3676
3676
|
let m = d.parentElement;
|
|
3677
3677
|
for (; !m.dataset.virtuosoScroller; )
|
|
3678
3678
|
m = m.parentElement;
|
|
3679
|
-
const
|
|
3680
|
-
let
|
|
3681
|
-
|
|
3682
|
-
const g = i ? a ? i.scrollLeft : i.scrollTop :
|
|
3679
|
+
const v = m.lastElementChild.dataset.viewportType === "window";
|
|
3680
|
+
let x;
|
|
3681
|
+
v && (x = m.ownerDocument.defaultView);
|
|
3682
|
+
const g = i ? a ? i.scrollLeft : i.scrollTop : v ? a ? x.scrollX || x.document.documentElement.scrollLeft : x.scrollY || x.document.documentElement.scrollTop : a ? m.scrollLeft : m.scrollTop, p = i ? a ? i.scrollWidth : i.scrollHeight : v ? a ? x.document.documentElement.scrollWidth : x.document.documentElement.scrollHeight : a ? m.scrollWidth : m.scrollHeight, w = i ? a ? i.offsetWidth : i.offsetHeight : v ? a ? x.innerWidth : x.innerHeight : a ? m.offsetWidth : m.offsetHeight;
|
|
3683
3683
|
r({
|
|
3684
3684
|
scrollHeight: p,
|
|
3685
3685
|
scrollTop: Math.max(g, 0),
|
|
@@ -3720,11 +3720,11 @@ function eu(e, t, n) {
|
|
|
3720
3720
|
const u = c.getBoundingClientRect(), d = u.width;
|
|
3721
3721
|
let h, m;
|
|
3722
3722
|
if (t) {
|
|
3723
|
-
const
|
|
3724
|
-
m =
|
|
3723
|
+
const v = t.getBoundingClientRect(), x = u.top - v.top;
|
|
3724
|
+
m = v.height - Math.max(0, x), h = x + t.scrollTop;
|
|
3725
3725
|
} else {
|
|
3726
|
-
const
|
|
3727
|
-
m =
|
|
3726
|
+
const v = i.current.ownerDocument.defaultView;
|
|
3727
|
+
m = v.innerHeight - Math.max(0, u.top), h = u.top + v.scrollY;
|
|
3728
3728
|
}
|
|
3729
3729
|
r.current = {
|
|
3730
3730
|
offsetTop: h,
|
|
@@ -3757,7 +3757,7 @@ function eu(e, t, n) {
|
|
|
3757
3757
|
}
|
|
3758
3758
|
const pt = ke(
|
|
3759
3759
|
() => {
|
|
3760
|
-
const e = Ee(), t = Ee(), n = W(0), r = Ee(), o = W(0), s = Ee(), i = Ee(), a = W(0), c = W(0), u = W(0), d = W(0), h = Ee(), m = Ee(),
|
|
3760
|
+
const e = Ee(), t = Ee(), n = W(0), r = Ee(), o = W(0), s = Ee(), i = Ee(), a = W(0), c = W(0), u = W(0), d = W(0), h = Ee(), m = Ee(), v = W(!1), x = W(!1), g = W(!1);
|
|
3761
3761
|
return le(
|
|
3762
3762
|
B(
|
|
3763
3763
|
e,
|
|
@@ -3776,12 +3776,12 @@ const pt = ke(
|
|
|
3776
3776
|
fixedHeaderHeight: c,
|
|
3777
3777
|
footerHeight: d,
|
|
3778
3778
|
headerHeight: a,
|
|
3779
|
-
horizontalDirection:
|
|
3779
|
+
horizontalDirection: x,
|
|
3780
3780
|
scrollBy: m,
|
|
3781
3781
|
// input
|
|
3782
3782
|
scrollContainerState: e,
|
|
3783
3783
|
scrollHeight: i,
|
|
3784
|
-
scrollingInProgress:
|
|
3784
|
+
scrollingInProgress: v,
|
|
3785
3785
|
// signals
|
|
3786
3786
|
scrollTo: h,
|
|
3787
3787
|
scrollTop: t,
|
|
@@ -3807,15 +3807,15 @@ function tu(e, t) {
|
|
|
3807
3807
|
}
|
|
3808
3808
|
return s.push({ end: 1 / 0, start: r, value: o }), s;
|
|
3809
3809
|
}
|
|
3810
|
-
function
|
|
3810
|
+
function $e(e) {
|
|
3811
3811
|
return e === jr;
|
|
3812
3812
|
}
|
|
3813
3813
|
function kr(e, t) {
|
|
3814
|
-
if (
|
|
3814
|
+
if (!$e(e))
|
|
3815
3815
|
return t === e.k ? e.v : t < e.k ? kr(e.l, t) : kr(e.r, t);
|
|
3816
3816
|
}
|
|
3817
3817
|
function Ft(e, t, n = "k") {
|
|
3818
|
-
if (
|
|
3818
|
+
if ($e(e))
|
|
3819
3819
|
return [-1 / 0, void 0];
|
|
3820
3820
|
if (Number(e[n]) === t)
|
|
3821
3821
|
return [e.k, e.v];
|
|
@@ -3826,24 +3826,24 @@ function Ft(e, t, n = "k") {
|
|
|
3826
3826
|
return Ft(e.l, t, n);
|
|
3827
3827
|
}
|
|
3828
3828
|
function St(e, t, n) {
|
|
3829
|
-
return
|
|
3829
|
+
return $e(e) ? ou(t, n, 1) : t === e.k ? ot(e, { k: t, v: n }) : t < e.k ? Sl(ot(e, { l: St(e.l, t, n) })) : Sl(ot(e, { r: St(e.r, t, n) }));
|
|
3830
3830
|
}
|
|
3831
3831
|
function Gn() {
|
|
3832
3832
|
return jr;
|
|
3833
3833
|
}
|
|
3834
3834
|
function ns(e, t, n) {
|
|
3835
|
-
if (
|
|
3835
|
+
if ($e(e))
|
|
3836
3836
|
return [];
|
|
3837
3837
|
const r = Ft(e, t)[0];
|
|
3838
3838
|
return Sx(xi(e, r, n));
|
|
3839
3839
|
}
|
|
3840
3840
|
function gi(e, t) {
|
|
3841
|
-
if (
|
|
3841
|
+
if ($e(e)) return jr;
|
|
3842
3842
|
const { k: n, l: r, r: o } = e;
|
|
3843
3843
|
if (t === n) {
|
|
3844
|
-
if (
|
|
3844
|
+
if ($e(r))
|
|
3845
3845
|
return o;
|
|
3846
|
-
if (
|
|
3846
|
+
if ($e(o))
|
|
3847
3847
|
return r;
|
|
3848
3848
|
{
|
|
3849
3849
|
const [s, i] = ru(r);
|
|
@@ -3852,10 +3852,10 @@ function gi(e, t) {
|
|
|
3852
3852
|
} else return t < n ? go(ot(e, { l: gi(r, t) })) : go(ot(e, { r: gi(o, t) }));
|
|
3853
3853
|
}
|
|
3854
3854
|
function Cn(e) {
|
|
3855
|
-
return
|
|
3855
|
+
return $e(e) ? [] : [...Cn(e.l), { k: e.k, v: e.v }, ...Cn(e.r)];
|
|
3856
3856
|
}
|
|
3857
3857
|
function xi(e, t, n) {
|
|
3858
|
-
if (
|
|
3858
|
+
if ($e(e))
|
|
3859
3859
|
return [];
|
|
3860
3860
|
const { k: r, l: o, r: s, v: i } = e;
|
|
3861
3861
|
let a = [];
|
|
@@ -3868,7 +3868,7 @@ function go(e) {
|
|
|
3868
3868
|
if (n > r.lvl + 1) {
|
|
3869
3869
|
if (Fs(t))
|
|
3870
3870
|
return su(ot(e, { lvl: n - 1 }));
|
|
3871
|
-
if (
|
|
3871
|
+
if (!$e(t) && !$e(t.r))
|
|
3872
3872
|
return ot(t.r, {
|
|
3873
3873
|
l: ot(t, { r: t.r.l }),
|
|
3874
3874
|
lvl: n,
|
|
@@ -3881,7 +3881,7 @@ function go(e) {
|
|
|
3881
3881
|
} else {
|
|
3882
3882
|
if (Fs(e))
|
|
3883
3883
|
return vi(ot(e, { lvl: n - 1 }));
|
|
3884
|
-
if (
|
|
3884
|
+
if (!$e(r) && !$e(r.l)) {
|
|
3885
3885
|
const o = r.l, s = Fs(o) ? r.lvl - 1 : r.lvl;
|
|
3886
3886
|
return ot(o, {
|
|
3887
3887
|
l: ot(e, {
|
|
@@ -3905,13 +3905,13 @@ function ot(e, t) {
|
|
|
3905
3905
|
);
|
|
3906
3906
|
}
|
|
3907
3907
|
function nu(e) {
|
|
3908
|
-
return
|
|
3908
|
+
return $e(e.r) ? e.l : go(ot(e, { r: nu(e.r) }));
|
|
3909
3909
|
}
|
|
3910
3910
|
function Fs(e) {
|
|
3911
|
-
return
|
|
3911
|
+
return $e(e) || e.lvl > e.r.lvl;
|
|
3912
3912
|
}
|
|
3913
3913
|
function ru(e) {
|
|
3914
|
-
return
|
|
3914
|
+
return $e(e.r) ? [e.k, e.v] : ru(e.r);
|
|
3915
3915
|
}
|
|
3916
3916
|
function ou(e, t, n, r = jr, o = jr) {
|
|
3917
3917
|
return { k: e, l: r, lvl: n, r: o, v: t };
|
|
@@ -3921,11 +3921,11 @@ function Sl(e) {
|
|
|
3921
3921
|
}
|
|
3922
3922
|
function su(e) {
|
|
3923
3923
|
const { l: t } = e;
|
|
3924
|
-
return
|
|
3924
|
+
return !$e(t) && t.lvl === e.lvl ? ot(t, { r: ot(e, { l: t.r }) }) : e;
|
|
3925
3925
|
}
|
|
3926
3926
|
function vi(e) {
|
|
3927
3927
|
const { lvl: t, r: n } = e;
|
|
3928
|
-
return
|
|
3928
|
+
return !$e(n) && !$e(n.r) && n.lvl === t && n.r.lvl === t ? ot(n, { l: ot(e, { r: n.l }), lvl: t + 1 }) : e;
|
|
3929
3929
|
}
|
|
3930
3930
|
function Sx(e) {
|
|
3931
3931
|
return tu(e, ({ k: t, v: n }) => ({ index: t, value: n }));
|
|
@@ -3970,7 +3970,7 @@ function fn(e, t) {
|
|
|
3970
3970
|
return Math.round(e.getBoundingClientRect()[t]);
|
|
3971
3971
|
}
|
|
3972
3972
|
function rs(e) {
|
|
3973
|
-
return
|
|
3973
|
+
return !$e(e.groupOffsetTree);
|
|
3974
3974
|
}
|
|
3975
3975
|
function Xi({ index: e }, t) {
|
|
3976
3976
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
@@ -3987,10 +3987,10 @@ function Tx() {
|
|
|
3987
3987
|
};
|
|
3988
3988
|
}
|
|
3989
3989
|
function Rx(e, t) {
|
|
3990
|
-
let n =
|
|
3990
|
+
let n = $e(e) ? 0 : 1 / 0;
|
|
3991
3991
|
for (const r of t) {
|
|
3992
3992
|
const { endIndex: o, size: s, startIndex: i } = r;
|
|
3993
|
-
if (n = Math.min(n, i),
|
|
3993
|
+
if (n = Math.min(n, i), $e(e)) {
|
|
3994
3994
|
e = St(e, 0, s);
|
|
3995
3995
|
continue;
|
|
3996
3996
|
}
|
|
@@ -4040,9 +4040,9 @@ function jx(e, [t, n, r, o]) {
|
|
|
4040
4040
|
t.length > 0 && r("received item sizes", t, vt.DEBUG);
|
|
4041
4041
|
const s = e.sizeTree;
|
|
4042
4042
|
let i = s, a = 0;
|
|
4043
|
-
if (n.length > 0 &&
|
|
4044
|
-
const m = t[0].size,
|
|
4045
|
-
i = n.reduce((
|
|
4043
|
+
if (n.length > 0 && $e(s) && t.length === 2) {
|
|
4044
|
+
const m = t[0].size, v = t[1].size;
|
|
4045
|
+
i = n.reduce((x, g) => St(St(x, g, m), g + 1, v), i);
|
|
4046
4046
|
} else
|
|
4047
4047
|
[i, a] = Rx(i, t);
|
|
4048
4048
|
if (i === s)
|
|
@@ -4050,7 +4050,7 @@ function jx(e, [t, n, r, o]) {
|
|
|
4050
4050
|
const { lastIndex: c, lastOffset: u, lastSize: d, offsetTree: h } = bi(e.offsetTree, a, i, o);
|
|
4051
4051
|
return {
|
|
4052
4052
|
groupIndices: n,
|
|
4053
|
-
groupOffsetTree: n.reduce((m,
|
|
4053
|
+
groupOffsetTree: n.reduce((m, v) => St(m, v, Pr(v, h, o)), Gn()),
|
|
4054
4054
|
lastIndex: c,
|
|
4055
4055
|
lastOffset: u,
|
|
4056
4056
|
lastSize: d,
|
|
@@ -4105,9 +4105,9 @@ const _x = {
|
|
|
4105
4105
|
offsetWidth: "width"
|
|
4106
4106
|
}, Zt = ke(
|
|
4107
4107
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
4108
|
-
const n = Ee(), r = Ee(), o = ut(r, 0), s = Ee(), i = Ee(), a = W(0), c = W([]), u = W(void 0), d = W(void 0), h = W((S, T) => fn(S, _x[T])), m = W(void 0),
|
|
4109
|
-
B(n, Ce(c, e,
|
|
4110
|
-
|
|
4108
|
+
const n = Ee(), r = Ee(), o = ut(r, 0), s = Ee(), i = Ee(), a = W(0), c = W([]), u = W(void 0), d = W(void 0), h = W((S, T) => fn(S, _x[T])), m = W(void 0), v = W(0), x = Tx(), g = ut(
|
|
4109
|
+
B(n, Ce(c, e, v), Yt(jx, x), He()),
|
|
4110
|
+
x
|
|
4111
4111
|
), p = ut(
|
|
4112
4112
|
B(
|
|
4113
4113
|
c,
|
|
@@ -4124,9 +4124,9 @@ const _x = {
|
|
|
4124
4124
|
B(
|
|
4125
4125
|
c,
|
|
4126
4126
|
pe((S) => S.length > 0),
|
|
4127
|
-
Ce(g,
|
|
4127
|
+
Ce(g, v),
|
|
4128
4128
|
re(([S, T, C]) => {
|
|
4129
|
-
const R = S.reduce((I,
|
|
4129
|
+
const R = S.reduce((I, k, M) => St(I, k, Pr(k, T.offsetTree, C) || M), Gn());
|
|
4130
4130
|
return {
|
|
4131
4131
|
...T,
|
|
4132
4132
|
groupIndices: S,
|
|
@@ -4160,7 +4160,7 @@ const _x = {
|
|
|
4160
4160
|
le(
|
|
4161
4161
|
B(
|
|
4162
4162
|
d,
|
|
4163
|
-
pe((S) => S !== void 0 &&
|
|
4163
|
+
pe((S) => S !== void 0 && $e(Xe(g).sizeTree)),
|
|
4164
4164
|
re((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
|
|
4165
4165
|
),
|
|
4166
4166
|
n
|
|
@@ -4174,7 +4174,7 @@ const _x = {
|
|
|
4174
4174
|
changed: C !== S,
|
|
4175
4175
|
sizes: C
|
|
4176
4176
|
}),
|
|
4177
|
-
{ changed: !1, sizes:
|
|
4177
|
+
{ changed: !1, sizes: x }
|
|
4178
4178
|
),
|
|
4179
4179
|
re((S) => S.changed)
|
|
4180
4180
|
)
|
|
@@ -4212,13 +4212,13 @@ const _x = {
|
|
|
4212
4212
|
re(([S, T]) => {
|
|
4213
4213
|
const C = T.groupIndices.length > 0, R = [], I = T.lastSize;
|
|
4214
4214
|
if (C) {
|
|
4215
|
-
const
|
|
4215
|
+
const k = kr(T.sizeTree, 0);
|
|
4216
4216
|
let M = 0, H = 0;
|
|
4217
4217
|
for (; M < S; ) {
|
|
4218
4218
|
const j = T.groupIndices[H], $ = T.groupIndices.length === H + 1 ? 1 / 0 : T.groupIndices[H + 1] - j - 1;
|
|
4219
4219
|
R.push({
|
|
4220
4220
|
endIndex: j,
|
|
4221
|
-
size:
|
|
4221
|
+
size: k,
|
|
4222
4222
|
startIndex: j
|
|
4223
4223
|
}), R.push({
|
|
4224
4224
|
endIndex: j + 1 + $ - 1,
|
|
@@ -4251,10 +4251,10 @@ const _x = {
|
|
|
4251
4251
|
).ranges;
|
|
4252
4252
|
}
|
|
4253
4253
|
return Cn(T.sizeTree).reduce(
|
|
4254
|
-
(
|
|
4254
|
+
(k, { k: M, v: H }) => ({
|
|
4255
4255
|
prevIndex: M + S,
|
|
4256
4256
|
prevSize: H,
|
|
4257
|
-
ranges: [...
|
|
4257
|
+
ranges: [...k.ranges, { endIndex: M + S - 1, size: k.prevSize, startIndex: k.prevIndex }]
|
|
4258
4258
|
}),
|
|
4259
4259
|
{
|
|
4260
4260
|
prevIndex: 0,
|
|
@@ -4269,7 +4269,7 @@ const _x = {
|
|
|
4269
4269
|
const N = Ct(
|
|
4270
4270
|
B(
|
|
4271
4271
|
i,
|
|
4272
|
-
Ce(g,
|
|
4272
|
+
Ce(g, v),
|
|
4273
4273
|
re(([S, { offsetTree: T }, C]) => {
|
|
4274
4274
|
const R = -S;
|
|
4275
4275
|
return Pr(R, T, C);
|
|
@@ -4279,20 +4279,20 @@ const _x = {
|
|
|
4279
4279
|
return le(
|
|
4280
4280
|
B(
|
|
4281
4281
|
i,
|
|
4282
|
-
Ce(g,
|
|
4282
|
+
Ce(g, v),
|
|
4283
4283
|
re(([S, T, C]) => {
|
|
4284
4284
|
if (T.groupIndices.length > 0) {
|
|
4285
|
-
if (
|
|
4285
|
+
if ($e(T.sizeTree))
|
|
4286
4286
|
return T;
|
|
4287
4287
|
let R = Gn();
|
|
4288
4288
|
const I = Xe(p);
|
|
4289
|
-
let
|
|
4290
|
-
for (;
|
|
4289
|
+
let k = 0, M = 0, H = 0;
|
|
4290
|
+
for (; k < -S; ) {
|
|
4291
4291
|
H = I[M];
|
|
4292
4292
|
const U = I[M + 1] - H - 1;
|
|
4293
|
-
M++,
|
|
4293
|
+
M++, k += U + 1;
|
|
4294
4294
|
}
|
|
4295
|
-
if (R = Cn(T.sizeTree).reduce((U, { k: j, v: $ }) => St(U, Math.max(0, j + S), $), R),
|
|
4295
|
+
if (R = Cn(T.sizeTree).reduce((U, { k: j, v: $ }) => St(U, Math.max(0, j + S), $), R), k !== -S) {
|
|
4296
4296
|
const U = kr(T.sizeTree, H);
|
|
4297
4297
|
R = St(R, 0, U);
|
|
4298
4298
|
const j = Ft(T.sizeTree, -S + 1)[1];
|
|
@@ -4304,7 +4304,7 @@ const _x = {
|
|
|
4304
4304
|
...bi(T.offsetTree, 0, R, C)
|
|
4305
4305
|
};
|
|
4306
4306
|
} else {
|
|
4307
|
-
const R = Cn(T.sizeTree).reduce((I, { k
|
|
4307
|
+
const R = Cn(T.sizeTree).reduce((I, { k, v: M }) => St(I, Math.max(0, k + S), M), Gn());
|
|
4308
4308
|
return {
|
|
4309
4309
|
...T,
|
|
4310
4310
|
sizeTree: R,
|
|
@@ -4321,7 +4321,7 @@ const _x = {
|
|
|
4321
4321
|
defaultItemSize: d,
|
|
4322
4322
|
firstItemIndex: a,
|
|
4323
4323
|
fixedItemSize: u,
|
|
4324
|
-
gap:
|
|
4324
|
+
gap: v,
|
|
4325
4325
|
groupIndices: c,
|
|
4326
4326
|
itemSize: h,
|
|
4327
4327
|
listRefresh: b,
|
|
@@ -4410,28 +4410,28 @@ const Vr = ke(
|
|
|
4410
4410
|
},
|
|
4411
4411
|
{ log: m }
|
|
4412
4412
|
]) => {
|
|
4413
|
-
const
|
|
4413
|
+
const v = Ee(), x = Ee(), g = W(0);
|
|
4414
4414
|
let p = null, w = null, b = null;
|
|
4415
4415
|
function y() {
|
|
4416
4416
|
p && (p(), p = null), b && (b(), b = null), w && (clearTimeout(w), w = null), we(c, !1);
|
|
4417
4417
|
}
|
|
4418
4418
|
return le(
|
|
4419
4419
|
B(
|
|
4420
|
-
|
|
4420
|
+
v,
|
|
4421
4421
|
Ce(n, h, r, g, a, i, m),
|
|
4422
4422
|
Ce(e, s, o),
|
|
4423
4423
|
re(
|
|
4424
4424
|
([
|
|
4425
|
-
[N, S, T, C, R, I,
|
|
4425
|
+
[N, S, T, C, R, I, k, M],
|
|
4426
4426
|
H,
|
|
4427
4427
|
U,
|
|
4428
4428
|
j
|
|
4429
4429
|
]) => {
|
|
4430
4430
|
const $ = du(N), { align: L, behavior: Q, offset: O } = $, _ = C - 1, G = cu($, S, _);
|
|
4431
4431
|
let Z = Pr(G, S.offsetTree, H) + I;
|
|
4432
|
-
L === "end" ? (Z += U + Ft(S.sizeTree, G)[1] - T + j, G === _ && (Z +=
|
|
4432
|
+
L === "end" ? (Z += U + Ft(S.sizeTree, G)[1] - T + j, G === _ && (Z += k)) : L === "center" ? Z += (U + Ft(S.sizeTree, G)[1] - T + j) / 2 : Z -= R, O && (Z += O);
|
|
4433
4433
|
const q = (F) => {
|
|
4434
|
-
y(), F ? (M("retrying to scroll to", { location: N }, vt.DEBUG), we(
|
|
4434
|
+
y(), F ? (M("retrying to scroll to", { location: N }, vt.DEBUG), we(v, N)) : (we(x, !0), M("list did not change, scroll successful", {}, vt.DEBUG));
|
|
4435
4435
|
};
|
|
4436
4436
|
if (y(), Q === "smooth") {
|
|
4437
4437
|
let F = !1;
|
|
@@ -4450,8 +4450,8 @@ const Vr = ke(
|
|
|
4450
4450
|
),
|
|
4451
4451
|
u
|
|
4452
4452
|
), {
|
|
4453
|
-
scrollTargetReached:
|
|
4454
|
-
scrollToIndex:
|
|
4453
|
+
scrollTargetReached: x,
|
|
4454
|
+
scrollToIndex: v,
|
|
4455
4455
|
topListHeight: g
|
|
4456
4456
|
};
|
|
4457
4457
|
},
|
|
@@ -4500,7 +4500,7 @@ const Gr = ke(
|
|
|
4500
4500
|
B(
|
|
4501
4501
|
nt(t, i),
|
|
4502
4502
|
Ce(a, n, e, u),
|
|
4503
|
-
pe(([[, d], h, { sizeTree: m },
|
|
4503
|
+
pe(([[, d], h, { sizeTree: m }, v, x]) => d && (!$e(m) || Gi(v)) && !h && !x),
|
|
4504
4504
|
Ce(c)
|
|
4505
4505
|
),
|
|
4506
4506
|
([, d]) => {
|
|
@@ -4540,7 +4540,7 @@ const _r = "up", Cr = "down", Lx = "none", Fx = {
|
|
|
4540
4540
|
He()
|
|
4541
4541
|
),
|
|
4542
4542
|
!1
|
|
4543
|
-
),
|
|
4543
|
+
), v = ut(
|
|
4544
4544
|
B(mi(B(n, Gt(!0)), B(n, Gt(!1), wl(200))), He()),
|
|
4545
4545
|
!1
|
|
4546
4546
|
);
|
|
@@ -4552,11 +4552,11 @@ const _r = "up", Cr = "down", Lx = "none", Fx = {
|
|
|
4552
4552
|
),
|
|
4553
4553
|
a
|
|
4554
4554
|
), le(B(a, nn(50)), u);
|
|
4555
|
-
const
|
|
4555
|
+
const x = Ct(
|
|
4556
4556
|
B(
|
|
4557
4557
|
nt(r, he(s), he(t), he(e), he(d)),
|
|
4558
4558
|
Yt((b, [{ scrollHeight: y, scrollTop: N }, S, T, C, R]) => {
|
|
4559
|
-
const I = N + S - y > -R,
|
|
4559
|
+
const I = N + S - y > -R, k = {
|
|
4560
4560
|
scrollHeight: y,
|
|
4561
4561
|
scrollTop: N,
|
|
4562
4562
|
viewportHeight: S
|
|
@@ -4567,14 +4567,14 @@ const _r = "up", Cr = "down", Lx = "none", Fx = {
|
|
|
4567
4567
|
atBottom: !0,
|
|
4568
4568
|
atBottomBecause: H,
|
|
4569
4569
|
scrollTopDelta: U,
|
|
4570
|
-
state:
|
|
4570
|
+
state: k
|
|
4571
4571
|
};
|
|
4572
4572
|
}
|
|
4573
4573
|
let M;
|
|
4574
|
-
return
|
|
4574
|
+
return k.scrollHeight > b.state.scrollHeight ? M = "SIZE_INCREASED" : S < b.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" : N < b.state.scrollTop ? M = "SCROLLING_UPWARDS" : M = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
4575
4575
|
atBottom: !1,
|
|
4576
4576
|
notAtBottomBecause: M,
|
|
4577
|
-
state:
|
|
4577
|
+
state: k
|
|
4578
4578
|
};
|
|
4579
4579
|
}, Fx),
|
|
4580
4580
|
He((b, y) => b && b.atBottom === y.atBottom)
|
|
@@ -4615,7 +4615,7 @@ const _r = "up", Cr = "down", Lx = "none", Fx = {
|
|
|
4615
4615
|
);
|
|
4616
4616
|
le(
|
|
4617
4617
|
B(
|
|
4618
|
-
|
|
4618
|
+
x,
|
|
4619
4619
|
re((b) => b.atBottom)
|
|
4620
4620
|
),
|
|
4621
4621
|
i
|
|
@@ -4627,7 +4627,7 @@ const _r = "up", Cr = "down", Lx = "none", Fx = {
|
|
|
4627
4627
|
re(({ scrollTop: b }) => b),
|
|
4628
4628
|
He(),
|
|
4629
4629
|
Yt(
|
|
4630
|
-
(b, y) => Xe(
|
|
4630
|
+
(b, y) => Xe(v) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? _r : Cr, prevScrollTop: y },
|
|
4631
4631
|
{ direction: Cr, prevScrollTop: 0 }
|
|
4632
4632
|
),
|
|
4633
4633
|
re((b) => b.direction)
|
|
@@ -4653,7 +4653,7 @@ const _r = "up", Cr = "down", Lx = "none", Fx = {
|
|
|
4653
4653
|
),
|
|
4654
4654
|
w
|
|
4655
4655
|
), {
|
|
4656
|
-
atBottomState:
|
|
4656
|
+
atBottomState: x,
|
|
4657
4657
|
atBottomStateChange: c,
|
|
4658
4658
|
atBottomThreshold: d,
|
|
4659
4659
|
atTopStateChange: u,
|
|
@@ -4693,7 +4693,7 @@ const Qi = ke(
|
|
|
4693
4693
|
d,
|
|
4694
4694
|
h,
|
|
4695
4695
|
m,
|
|
4696
|
-
[
|
|
4696
|
+
[v, x],
|
|
4697
4697
|
g,
|
|
4698
4698
|
p,
|
|
4699
4699
|
w,
|
|
@@ -4703,7 +4703,7 @@ const Qi = ke(
|
|
|
4703
4703
|
const N = d - b, S = p + w, T = Math.max(m - N, 0);
|
|
4704
4704
|
let C = Tl;
|
|
4705
4705
|
const R = El(y, Oo), I = El(y, Mo);
|
|
4706
|
-
return
|
|
4706
|
+
return v -= b, v += m + w, x += m + w, x -= b, v > d + S - R && (C = _r), x < d - T + h + I && (C = Cr), C !== Tl ? [
|
|
4707
4707
|
Math.max(N - m - Rl(g, Oo, C) - R, 0),
|
|
4708
4708
|
N - T - w + h + Rl(g, Mo, C) + I
|
|
4709
4709
|
] : null;
|
|
@@ -4756,14 +4756,14 @@ function xo(e, t, n, r, o, s) {
|
|
|
4756
4756
|
const g = e[e.length - 1];
|
|
4757
4757
|
d = g.offset + g.size;
|
|
4758
4758
|
}
|
|
4759
|
-
const h = n - i, m = a + h * c + (h - 1) * r,
|
|
4759
|
+
const h = n - i, m = a + h * c + (h - 1) * r, v = u, x = m - d;
|
|
4760
4760
|
return {
|
|
4761
4761
|
bottom: d,
|
|
4762
4762
|
firstItemIndex: s,
|
|
4763
4763
|
items: Nl(e, o, s),
|
|
4764
|
-
offsetBottom:
|
|
4764
|
+
offsetBottom: x,
|
|
4765
4765
|
offsetTop: u,
|
|
4766
|
-
top:
|
|
4766
|
+
top: v,
|
|
4767
4767
|
topItems: Nl(t, o, s),
|
|
4768
4768
|
topListHeight: t.reduce((g, p) => p.size + g, 0),
|
|
4769
4769
|
totalCount: n
|
|
@@ -4819,16 +4819,16 @@ const On = ke(
|
|
|
4819
4819
|
{ initialTopMostItemIndex: u, scrolledToInitialItem: d },
|
|
4820
4820
|
{ topListHeight: h },
|
|
4821
4821
|
m,
|
|
4822
|
-
{ didMount:
|
|
4823
|
-
{ recalcInProgress:
|
|
4822
|
+
{ didMount: v },
|
|
4823
|
+
{ recalcInProgress: x }
|
|
4824
4824
|
]) => {
|
|
4825
4825
|
const g = W([]), p = W(0), w = Ee();
|
|
4826
4826
|
le(s.topItemsIndexes, g);
|
|
4827
4827
|
const b = ut(
|
|
4828
4828
|
B(
|
|
4829
4829
|
nt(
|
|
4830
|
-
x,
|
|
4831
4830
|
v,
|
|
4831
|
+
x,
|
|
4832
4832
|
he(c, Ar),
|
|
4833
4833
|
he(o),
|
|
4834
4834
|
he(r),
|
|
@@ -4840,8 +4840,8 @@ const On = ke(
|
|
|
4840
4840
|
e
|
|
4841
4841
|
),
|
|
4842
4842
|
pe(([T, C, , R, , , , , , , I]) => {
|
|
4843
|
-
const
|
|
4844
|
-
return T && !C && !
|
|
4843
|
+
const k = I && I.length !== R;
|
|
4844
|
+
return T && !C && !k;
|
|
4845
4845
|
}),
|
|
4846
4846
|
re(
|
|
4847
4847
|
([
|
|
@@ -4850,7 +4850,7 @@ const On = ke(
|
|
|
4850
4850
|
[T, C],
|
|
4851
4851
|
R,
|
|
4852
4852
|
I,
|
|
4853
|
-
|
|
4853
|
+
k,
|
|
4854
4854
|
M,
|
|
4855
4855
|
H,
|
|
4856
4856
|
U,
|
|
@@ -4861,10 +4861,10 @@ const On = ke(
|
|
|
4861
4861
|
if (R === 0)
|
|
4862
4862
|
return { ...Bs, totalCount: R };
|
|
4863
4863
|
if (T === 0 && C === 0)
|
|
4864
|
-
return _ === 0 ? { ...Bs, totalCount: R } : hu(_,
|
|
4865
|
-
if (
|
|
4864
|
+
return _ === 0 ? { ...Bs, totalCount: R } : hu(_, k, I, U, j, $ || []);
|
|
4865
|
+
if ($e(O))
|
|
4866
4866
|
return _ > 0 ? null : xo(
|
|
4867
|
-
$x(Zi(
|
|
4867
|
+
$x(Zi(k, R), L, $),
|
|
4868
4868
|
[],
|
|
4869
4869
|
R,
|
|
4870
4870
|
j,
|
|
@@ -5035,10 +5035,10 @@ const On = ke(
|
|
|
5035
5035
|
d,
|
|
5036
5036
|
Ce(t, c, n, s, o, r, a),
|
|
5037
5037
|
Ce(e),
|
|
5038
|
-
re(([[h, m,
|
|
5039
|
-
const { align: N, behavior: S, calculateViewLocation: T = zx, done: C, ...R } = h, I = cu(h, m,
|
|
5038
|
+
re(([[h, m, v, x, g, p, w, b], y]) => {
|
|
5039
|
+
const { align: N, behavior: S, calculateViewLocation: T = zx, done: C, ...R } = h, I = cu(h, m, x - 1), k = Pr(I, m.offsetTree, y) + g + p, M = k + Ft(m.sizeTree, I)[1], H = b + p, U = b + v - w, j = T({
|
|
5040
5040
|
itemBottom: M,
|
|
5041
|
-
itemTop:
|
|
5041
|
+
itemTop: k,
|
|
5042
5042
|
locationParams: { align: N, behavior: S, ...R },
|
|
5043
5043
|
viewportBottom: U,
|
|
5044
5044
|
viewportTop: H
|
|
@@ -5077,9 +5077,9 @@ const Ux = (e, t) => typeof e == "function" ? Il(e(t)) : t && Il(e), Wx = ke(
|
|
|
5077
5077
|
{ log: d },
|
|
5078
5078
|
{ scrollingInProgress: h },
|
|
5079
5079
|
{ context: m },
|
|
5080
|
-
{ scrollIntoView:
|
|
5080
|
+
{ scrollIntoView: v }
|
|
5081
5081
|
]) => {
|
|
5082
|
-
const
|
|
5082
|
+
const x = W(!1), g = Ee();
|
|
5083
5083
|
let p = null;
|
|
5084
5084
|
function w(S) {
|
|
5085
5085
|
we(i, {
|
|
@@ -5091,10 +5091,10 @@ const Ux = (e, t) => typeof e == "function" ? Il(e(t)) : t && Il(e), Wx = ke(
|
|
|
5091
5091
|
Me(
|
|
5092
5092
|
B(
|
|
5093
5093
|
nt(B(he(t), In(1)), c),
|
|
5094
|
-
Ce(he(
|
|
5095
|
-
re(([[S, T], C, R, I,
|
|
5094
|
+
Ce(he(x), s, a, h),
|
|
5095
|
+
re(([[S, T], C, R, I, k]) => {
|
|
5096
5096
|
let M = T && I, H = "auto";
|
|
5097
|
-
return M && (H = Ux(C, R ||
|
|
5097
|
+
return M && (H = Ux(C, R || k), M = M && !!H), { followOutputBehavior: H, shouldFollow: M, totalCount: S };
|
|
5098
5098
|
}),
|
|
5099
5099
|
pe(({ shouldFollow: S }) => S)
|
|
5100
5100
|
),
|
|
@@ -5114,21 +5114,21 @@ const Ux = (e, t) => typeof e == "function" ? Il(e(t)) : t && Il(e), Wx = ke(
|
|
|
5114
5114
|
}
|
|
5115
5115
|
Me(
|
|
5116
5116
|
B(
|
|
5117
|
-
nt(he(
|
|
5117
|
+
nt(he(x), t, u),
|
|
5118
5118
|
pe(([S, , T]) => S && T),
|
|
5119
5119
|
Yt(
|
|
5120
5120
|
({ value: S }, [, T]) => ({ refreshed: S === T, value: T }),
|
|
5121
5121
|
{ refreshed: !1, value: 0 }
|
|
5122
5122
|
),
|
|
5123
5123
|
pe(({ refreshed: S }) => S),
|
|
5124
|
-
Ce(
|
|
5124
|
+
Ce(x, t)
|
|
5125
5125
|
),
|
|
5126
5126
|
([, S]) => {
|
|
5127
5127
|
Xe(a) && b(S !== !1);
|
|
5128
5128
|
}
|
|
5129
5129
|
), Me(g, () => {
|
|
5130
|
-
b(Xe(
|
|
5131
|
-
}), Me(nt(he(
|
|
5130
|
+
b(Xe(x) !== !1);
|
|
5131
|
+
}), Me(nt(he(x), o), ([S, T]) => {
|
|
5132
5132
|
S && !T.atBottom && T.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && w("auto");
|
|
5133
5133
|
});
|
|
5134
5134
|
const y = W(null), N = Ee();
|
|
@@ -5148,18 +5148,18 @@ const Ux = (e, t) => typeof e == "function" ? Il(e(t)) : t && Il(e), Wx = ke(
|
|
|
5148
5148
|
B(
|
|
5149
5149
|
nt(B(N, In(1)), c),
|
|
5150
5150
|
Ce(he(y), a, h, m),
|
|
5151
|
-
re(([[S, T], C, R, I,
|
|
5151
|
+
re(([[S, T], C, R, I, k]) => T && R && (C == null ? void 0 : C({ context: k, totalCount: S, scrollingInProgress: I }))),
|
|
5152
5152
|
pe((S) => !!S),
|
|
5153
5153
|
nn(0)
|
|
5154
5154
|
),
|
|
5155
5155
|
(S) => {
|
|
5156
5156
|
p && (p(), p = null), Xe(n) ? requestAnimationFrame(() => {
|
|
5157
|
-
Xe(d)("scrolling into view", {}), we(
|
|
5157
|
+
Xe(d)("scrolling into view", {}), we(v, S);
|
|
5158
5158
|
}) : p = Dt(e, () => {
|
|
5159
|
-
Xe(d)("scrolling into view", {}), we(
|
|
5159
|
+
Xe(d)("scrolling into view", {}), we(v, S), p = null;
|
|
5160
5160
|
});
|
|
5161
5161
|
}
|
|
5162
|
-
), { autoscrollToBottom: g, followOutput:
|
|
5162
|
+
), { autoscrollToBottom: g, followOutput: x, scrollIntoViewOnChange: y };
|
|
5163
5163
|
},
|
|
5164
5164
|
ze(
|
|
5165
5165
|
Zt,
|
|
@@ -5179,7 +5179,7 @@ const Ux = (e, t) => typeof e == "function" ? Il(e(t)) : t && Il(e), Wx = ke(
|
|
|
5179
5179
|
Ce(s),
|
|
5180
5180
|
pe(([, c]) => c !== 0),
|
|
5181
5181
|
Ce(o, r, t, n, e),
|
|
5182
|
-
re(([[, c], u, d, h, m,
|
|
5182
|
+
re(([[, c], u, d, h, m, v = []]) => hu(c, u, d, h, m, v))
|
|
5183
5183
|
),
|
|
5184
5184
|
i
|
|
5185
5185
|
), {}),
|
|
@@ -5290,17 +5290,17 @@ const Ux = (e, t) => typeof e == "function" ? Il(e(t)) : t && Il(e), Wx = ke(
|
|
|
5290
5290
|
u,
|
|
5291
5291
|
Ce(t, r, i, h, m, n)
|
|
5292
5292
|
),
|
|
5293
|
-
([
|
|
5294
|
-
const N = kx(
|
|
5295
|
-
p && w !== null && b !== null && (g = w.scrollTop - b.offsetTop), g -= y,
|
|
5293
|
+
([v, x, g, p, w, b, y]) => {
|
|
5294
|
+
const N = kx(x.sizeTree);
|
|
5295
|
+
p && w !== null && b !== null && (g = w.scrollTop - b.offsetTop), g -= y, v({ ranges: N, scrollTop: g });
|
|
5296
5296
|
}
|
|
5297
5297
|
), le(B(d, pe(Gi), re(Yx)), o), le(
|
|
5298
5298
|
B(
|
|
5299
5299
|
s,
|
|
5300
5300
|
Ce(d),
|
|
5301
|
-
pe(([,
|
|
5301
|
+
pe(([, v]) => v !== void 0),
|
|
5302
5302
|
He(),
|
|
5303
|
-
re(([,
|
|
5303
|
+
re(([, v]) => v.ranges)
|
|
5304
5304
|
),
|
|
5305
5305
|
e
|
|
5306
5306
|
), {
|
|
@@ -5334,8 +5334,8 @@ const Xx = vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5334
5334
|
{ isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: a },
|
|
5335
5335
|
{ listState: c },
|
|
5336
5336
|
{ beforeUnshiftWith: u, gap: d, shiftWithOffset: h, sizes: m },
|
|
5337
|
-
{ log:
|
|
5338
|
-
{ recalcInProgress:
|
|
5337
|
+
{ log: v },
|
|
5338
|
+
{ recalcInProgress: x }
|
|
5339
5339
|
]) => {
|
|
5340
5340
|
const g = Ct(
|
|
5341
5341
|
B(
|
|
@@ -5344,13 +5344,13 @@ const Xx = vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5344
5344
|
Yt(
|
|
5345
5345
|
([, w, b, y], [{ bottom: N, items: S, offsetBottom: T, totalCount: C }, R]) => {
|
|
5346
5346
|
const I = N + T;
|
|
5347
|
-
let
|
|
5348
|
-
return b === C && w.length > 0 && S.length > 0 && (S[0].originalIndex === 0 && w[0].originalIndex === 0 || (
|
|
5347
|
+
let k = 0;
|
|
5348
|
+
return b === C && w.length > 0 && S.length > 0 && (S[0].originalIndex === 0 && w[0].originalIndex === 0 || (k = I - y, k !== 0 && (k += R))), [k, S, C, I];
|
|
5349
5349
|
},
|
|
5350
5350
|
[0, [], 0, 0]
|
|
5351
5351
|
),
|
|
5352
5352
|
pe(([w]) => w !== 0),
|
|
5353
|
-
Ce(r, a, n, o,
|
|
5353
|
+
Ce(r, a, n, o, v, x),
|
|
5354
5354
|
pe(([, w, b, y, , , N]) => !N && !y && w !== 0 && b === _r),
|
|
5355
5355
|
re(([[w], , , , , b]) => (b("Upward scrolling compensation", { amount: w }, vt.DEBUG), w))
|
|
5356
5356
|
)
|
|
@@ -5362,7 +5362,7 @@ const Xx = vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5362
5362
|
y && Xx() ? we(e, b - w) : p(-w);
|
|
5363
5363
|
}), Me(
|
|
5364
5364
|
B(
|
|
5365
|
-
nt(ut(s, !1), e,
|
|
5365
|
+
nt(ut(s, !1), e, x),
|
|
5366
5366
|
pe(([w, b, y]) => !w && !y && b !== 0),
|
|
5367
5367
|
re(([w, b]) => b),
|
|
5368
5368
|
nn(1)
|
|
@@ -5387,11 +5387,11 @@ const Xx = vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5387
5387
|
{
|
|
5388
5388
|
let C = 0;
|
|
5389
5389
|
const R = kr(N, 0);
|
|
5390
|
-
let I = 0,
|
|
5390
|
+
let I = 0, k = 0;
|
|
5391
5391
|
for (; I < w; ) {
|
|
5392
5392
|
I++, C += R;
|
|
5393
|
-
let M = b.length ===
|
|
5394
|
-
I + M > w && (C -= R, M = w - I + 1), I += M, C += T(M),
|
|
5393
|
+
let M = b.length === k + 1 ? 1 / 0 : b[k + 1] - b[k] - 1;
|
|
5394
|
+
I + M > w && (C -= R, M = w - I + 1), I += M, C += T(M), k++;
|
|
5395
5395
|
}
|
|
5396
5396
|
return C;
|
|
5397
5397
|
}
|
|
@@ -5400,7 +5400,7 @@ const Xx = vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5400
5400
|
(w) => {
|
|
5401
5401
|
we(e, w), requestAnimationFrame(() => {
|
|
5402
5402
|
we(t, { top: w }), requestAnimationFrame(() => {
|
|
5403
|
-
we(e, 0), we(
|
|
5403
|
+
we(e, 0), we(x, !1);
|
|
5404
5404
|
});
|
|
5405
5405
|
});
|
|
5406
5406
|
}
|
|
@@ -5462,7 +5462,7 @@ const Xx = vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5462
5462
|
totalCount: d,
|
|
5463
5463
|
trackItemSizes: h
|
|
5464
5464
|
},
|
|
5465
|
-
{ initialItemFinalLocationReached: m, initialTopMostItemIndex:
|
|
5465
|
+
{ initialItemFinalLocationReached: m, initialTopMostItemIndex: v, scrolledToInitialItem: x },
|
|
5466
5466
|
g,
|
|
5467
5467
|
p,
|
|
5468
5468
|
w,
|
|
@@ -5475,7 +5475,7 @@ const Xx = vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5475
5475
|
]) => (le(N.rangeChanged, I.scrollSeekRangeChanged), le(
|
|
5476
5476
|
B(
|
|
5477
5477
|
I.windowViewportRect,
|
|
5478
|
-
re((
|
|
5478
|
+
re((k) => k.visibleHeight)
|
|
5479
5479
|
),
|
|
5480
5480
|
g.viewportHeight
|
|
5481
5481
|
), {
|
|
@@ -5486,8 +5486,8 @@ const Xx = vu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5486
5486
|
gap: o,
|
|
5487
5487
|
groupCounts: R,
|
|
5488
5488
|
initialItemFinalLocationReached: m,
|
|
5489
|
-
initialTopMostItemIndex:
|
|
5490
|
-
scrolledToInitialItem:
|
|
5489
|
+
initialTopMostItemIndex: v,
|
|
5490
|
+
scrolledToInitialItem: x,
|
|
5491
5491
|
sizeRanges: a,
|
|
5492
5492
|
topItemCount: C,
|
|
5493
5493
|
topItemsIndexes: y,
|
|
@@ -5581,7 +5581,7 @@ function wu(e, t, n) {
|
|
|
5581
5581
|
},
|
|
5582
5582
|
[w, p]
|
|
5583
5583
|
);
|
|
5584
|
-
},
|
|
5584
|
+
}, v = (p) => {
|
|
5585
5585
|
const w = V.useContext(a)[p], b = V.useCallback(
|
|
5586
5586
|
(y) => Me(w, y),
|
|
5587
5587
|
[w]
|
|
@@ -5591,7 +5591,7 @@ function wu(e, t, n) {
|
|
|
5591
5591
|
() => Xe(w),
|
|
5592
5592
|
() => Xe(w)
|
|
5593
5593
|
);
|
|
5594
|
-
},
|
|
5594
|
+
}, x = (p) => {
|
|
5595
5595
|
const w = V.useContext(a)[p], [b, y] = V.useState(bl(Xe, w));
|
|
5596
5596
|
return to(
|
|
5597
5597
|
() => Me(w, (N) => {
|
|
@@ -5599,7 +5599,7 @@ function wu(e, t, n) {
|
|
|
5599
5599
|
}),
|
|
5600
5600
|
[w, b]
|
|
5601
5601
|
), b;
|
|
5602
|
-
}, g = V.version.startsWith("18") ?
|
|
5602
|
+
}, g = V.version.startsWith("18") ? v : x;
|
|
5603
5603
|
return {
|
|
5604
5604
|
Component: h,
|
|
5605
5605
|
useEmitter: (p, w) => {
|
|
@@ -5620,21 +5620,21 @@ function ev(e) {
|
|
|
5620
5620
|
function Tu(e, t, n, r = sr, o, s) {
|
|
5621
5621
|
const i = V.useRef(null), a = V.useRef(null), c = V.useRef(null), u = V.useCallback(
|
|
5622
5622
|
(m) => {
|
|
5623
|
-
let
|
|
5623
|
+
let v, x, g;
|
|
5624
5624
|
const p = m.target;
|
|
5625
5625
|
if (ev(p) || $s(p)) {
|
|
5626
5626
|
const b = $s(p) ? p : p.defaultView;
|
|
5627
|
-
g = s ? b.scrollX : b.scrollY,
|
|
5627
|
+
g = s ? b.scrollX : b.scrollY, v = s ? b.document.documentElement.scrollWidth : b.document.documentElement.scrollHeight, x = s ? b.innerWidth : b.innerHeight;
|
|
5628
5628
|
} else
|
|
5629
|
-
g = s ? p.scrollLeft : p.scrollTop,
|
|
5629
|
+
g = s ? p.scrollLeft : p.scrollTop, v = s ? p.scrollWidth : p.scrollHeight, x = s ? p.offsetWidth : p.offsetHeight;
|
|
5630
5630
|
const w = () => {
|
|
5631
5631
|
e({
|
|
5632
|
-
scrollHeight:
|
|
5632
|
+
scrollHeight: v,
|
|
5633
5633
|
scrollTop: Math.max(g, 0),
|
|
5634
|
-
viewportHeight:
|
|
5634
|
+
viewportHeight: x
|
|
5635
5635
|
});
|
|
5636
5636
|
};
|
|
5637
|
-
m.suppressFlushSync ? w() : Tc.flushSync(w), a.current !== null && (g === a.current || g <= 0 || g ===
|
|
5637
|
+
m.suppressFlushSync ? w() : Tc.flushSync(w), a.current !== null && (g === a.current || g <= 0 || g === v - x) && (a.current = null, t(!0), c.current && (clearTimeout(c.current), c.current = null));
|
|
5638
5638
|
},
|
|
5639
5639
|
[e, t, s]
|
|
5640
5640
|
);
|
|
@@ -5645,23 +5645,23 @@ function Tu(e, t, n, r = sr, o, s) {
|
|
|
5645
5645
|
};
|
|
5646
5646
|
}, [i, u, n, r, o]);
|
|
5647
5647
|
function d(m) {
|
|
5648
|
-
const
|
|
5649
|
-
if (!
|
|
5648
|
+
const v = i.current;
|
|
5649
|
+
if (!v || (s ? "offsetWidth" in v && v.offsetWidth === 0 : "offsetHeight" in v && v.offsetHeight === 0))
|
|
5650
5650
|
return;
|
|
5651
|
-
const
|
|
5651
|
+
const x = m.behavior === "smooth";
|
|
5652
5652
|
let g, p, w;
|
|
5653
|
-
$s(
|
|
5654
|
-
fn(
|
|
5655
|
-
s ?
|
|
5656
|
-
), g = s ?
|
|
5653
|
+
$s(v) ? (p = Math.max(
|
|
5654
|
+
fn(v.document.documentElement, s ? "width" : "height"),
|
|
5655
|
+
s ? v.document.documentElement.scrollWidth : v.document.documentElement.scrollHeight
|
|
5656
|
+
), g = s ? v.innerWidth : v.innerHeight, w = s ? window.scrollX : window.scrollY) : (p = v[s ? "scrollWidth" : "scrollHeight"], g = fn(v, s ? "width" : "height"), w = v[s ? "scrollLeft" : "scrollTop"]);
|
|
5657
5657
|
const b = p - g;
|
|
5658
5658
|
if (m.top = Math.ceil(Math.max(Math.min(b, m.top), 0)), fu(g, p) || m.top === w) {
|
|
5659
|
-
e({ scrollHeight: p, scrollTop: w, viewportHeight: g }),
|
|
5659
|
+
e({ scrollHeight: p, scrollTop: w, viewportHeight: g }), x && t(!0);
|
|
5660
5660
|
return;
|
|
5661
5661
|
}
|
|
5662
|
-
|
|
5662
|
+
x ? (a.current = m.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
5663
5663
|
c.current = null, a.current = null, t(!0);
|
|
5664
|
-
}, 1e3)) : a.current = null, s && (m = { behavior: m.behavior, left: m.top }),
|
|
5664
|
+
}, 1e3)) : a.current = null, s && (m = { behavior: m.behavior, left: m.top }), v.scrollTo(m);
|
|
5665
5665
|
}
|
|
5666
5666
|
function h(m) {
|
|
5667
5667
|
s && (m = { behavior: m.behavior, left: m.top }), i.current.scrollBy(m);
|
|
@@ -5707,13 +5707,13 @@ const tv = /* @__PURE__ */ ke(() => {
|
|
|
5707
5707
|
([e, t]) => ({ ...e, ...t }),
|
|
5708
5708
|
ze(bu, tv)
|
|
5709
5709
|
), rv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), ov = { overflowAnchor: "none", position: ta(), zIndex: 1 }, Ru = { overflowAnchor: "none" }, sv = { ...Ru, display: "inline-block", height: "100%" }, kl = /* @__PURE__ */ V.memo(function({ showTopList: e = !1 }) {
|
|
5710
|
-
const t = ve("listState"), n = jt("sizeRanges"), r = ve("useWindowScroll"), o = ve("customScrollParent"), s = jt("windowScrollContainerState"), i = jt("scrollContainerState"), a = o || r ? s : i, c = ve("itemContent"), u = ve("context"), d = ve("groupContent"), h = ve("trackItemSizes"), m = ve("itemSize"),
|
|
5710
|
+
const t = ve("listState"), n = jt("sizeRanges"), r = ve("useWindowScroll"), o = ve("customScrollParent"), s = jt("windowScrollContainerState"), i = jt("scrollContainerState"), a = o || r ? s : i, c = ve("itemContent"), u = ve("context"), d = ve("groupContent"), h = ve("trackItemSizes"), m = ve("itemSize"), v = ve("log"), x = jt("gap"), g = ve("horizontalDirection"), { callbackRef: p } = wx(
|
|
5711
5711
|
n,
|
|
5712
5712
|
m,
|
|
5713
5713
|
h,
|
|
5714
5714
|
e ? sr : a,
|
|
5715
|
-
x,
|
|
5716
5715
|
v,
|
|
5716
|
+
x,
|
|
5717
5717
|
o,
|
|
5718
5718
|
g,
|
|
5719
5719
|
ve("skipAnimationFrameInResizeObserver")
|
|
@@ -5721,7 +5721,7 @@ const tv = /* @__PURE__ */ ke(() => {
|
|
|
5721
5721
|
ra("deviation", (j) => {
|
|
5722
5722
|
w !== j && b(j);
|
|
5723
5723
|
});
|
|
5724
|
-
const y = ve("EmptyPlaceholder"), N = ve("ScrollSeekPlaceholder") || rv, S = ve("ListComponent"), T = ve("ItemComponent"), C = ve("GroupComponent"), R = ve("computeItemKey"), I = ve("isSeeking"),
|
|
5724
|
+
const y = ve("EmptyPlaceholder"), N = ve("ScrollSeekPlaceholder") || rv, S = ve("ListComponent"), T = ve("ItemComponent"), C = ve("GroupComponent"), R = ve("computeItemKey"), I = ve("isSeeking"), k = ve("groupIndices").length > 0, M = ve("alignToBottom"), H = ve("initialItemFinalLocationReached"), U = e ? {} : {
|
|
5725
5725
|
boxSizing: "border-box",
|
|
5726
5726
|
...g ? {
|
|
5727
5727
|
display: "inline-block",
|
|
@@ -5779,7 +5779,7 @@ const tv = /* @__PURE__ */ ke(() => {
|
|
|
5779
5779
|
key: L,
|
|
5780
5780
|
style: g ? sv : Ru
|
|
5781
5781
|
},
|
|
5782
|
-
|
|
5782
|
+
k ? c(j.index, j.groupIndex, j.data, u) : c(j.index, j.data, u)
|
|
5783
5783
|
);
|
|
5784
5784
|
})
|
|
5785
5785
|
}
|
|
@@ -5840,7 +5840,7 @@ const uv = /* @__PURE__ */ V.memo(function() {
|
|
|
5840
5840
|
});
|
|
5841
5841
|
function Eu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
5842
5842
|
return V.memo(function({ children: r, style: o, context: s, ...i }) {
|
|
5843
|
-
const a = n("scrollContainerState"), c = t("ScrollerComponent"), u = n("smoothScrollTargetReached"), d = t("scrollerRef"), h = t("horizontalDirection") || !1, { scrollByCallback: m, scrollerRef:
|
|
5843
|
+
const a = n("scrollContainerState"), c = t("ScrollerComponent"), u = n("smoothScrollTargetReached"), d = t("scrollerRef"), h = t("horizontalDirection") || !1, { scrollByCallback: m, scrollerRef: v, scrollToCallback: x } = Tu(
|
|
5844
5844
|
a,
|
|
5845
5845
|
u,
|
|
5846
5846
|
c,
|
|
@@ -5848,12 +5848,12 @@ function Eu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
5848
5848
|
void 0,
|
|
5849
5849
|
h
|
|
5850
5850
|
);
|
|
5851
|
-
return e("scrollTo",
|
|
5851
|
+
return e("scrollTo", x), e("scrollBy", m), /* @__PURE__ */ l.jsx(
|
|
5852
5852
|
c,
|
|
5853
5853
|
{
|
|
5854
5854
|
"data-testid": "virtuoso-scroller",
|
|
5855
5855
|
"data-virtuoso-scroller": !0,
|
|
5856
|
-
ref:
|
|
5856
|
+
ref: v,
|
|
5857
5857
|
style: { ...h ? av : iv, ...o },
|
|
5858
5858
|
tabIndex: 0,
|
|
5859
5859
|
...i,
|
|
@@ -5865,22 +5865,22 @@ function Eu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
5865
5865
|
}
|
|
5866
5866
|
function Nu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
5867
5867
|
return V.memo(function({ children: r, style: o, context: s, ...i }) {
|
|
5868
|
-
const a = n("windowScrollContainerState"), c = t("ScrollerComponent"), u = n("smoothScrollTargetReached"), d = t("totalListHeight"), h = t("deviation"), m = t("customScrollParent"),
|
|
5868
|
+
const a = n("windowScrollContainerState"), c = t("ScrollerComponent"), u = n("smoothScrollTargetReached"), d = t("totalListHeight"), h = t("deviation"), m = t("customScrollParent"), v = V.useRef(null), x = t("scrollerRef"), { scrollByCallback: g, scrollerRef: p, scrollToCallback: w } = Tu(
|
|
5869
5869
|
a,
|
|
5870
5870
|
u,
|
|
5871
5871
|
c,
|
|
5872
|
-
|
|
5872
|
+
x,
|
|
5873
5873
|
m
|
|
5874
5874
|
);
|
|
5875
5875
|
return Cu(() => {
|
|
5876
5876
|
var b;
|
|
5877
|
-
return p.current = m || ((b =
|
|
5877
|
+
return p.current = m || ((b = v.current) == null ? void 0 : b.ownerDocument.defaultView), () => {
|
|
5878
5878
|
p.current = null;
|
|
5879
5879
|
};
|
|
5880
5880
|
}, [p, m]), e("windowScrollTo", w), e("scrollBy", g), /* @__PURE__ */ l.jsx(
|
|
5881
5881
|
c,
|
|
5882
5882
|
{
|
|
5883
|
-
ref:
|
|
5883
|
+
ref: v,
|
|
5884
5884
|
"data-virtuoso-scroller": !0,
|
|
5885
5885
|
style: { position: "relative", ...o, ...d !== 0 ? { height: d + h } : {} },
|
|
5886
5886
|
...i,
|
|
@@ -6059,15 +6059,15 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6059
6059
|
{ increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
|
|
6060
6060
|
{ footerHeight: o, headerHeight: s, scrollBy: i, scrollContainerState: a, scrollTo: c, scrollTop: u, smoothScrollTargetReached: d, viewportHeight: h },
|
|
6061
6061
|
m,
|
|
6062
|
-
|
|
6063
|
-
{ didMount:
|
|
6062
|
+
v,
|
|
6063
|
+
{ didMount: x, propsReady: g },
|
|
6064
6064
|
{ customScrollParent: p, useWindowScroll: w, windowScrollContainerState: b, windowScrollTo: y, windowViewportRect: N },
|
|
6065
6065
|
S
|
|
6066
6066
|
]) => {
|
|
6067
|
-
const T = W(0), C = W(0), R = W(Al), I = W({ height: 0, width: 0 }),
|
|
6067
|
+
const T = W(0), C = W(0), R = W(Al), I = W({ height: 0, width: 0 }), k = W({ height: 0, width: 0 }), M = Ee(), H = Ee(), U = W(0), j = W(null), $ = W({ column: 0, row: 0 }), L = Ee(), Q = Ee(), O = W(!1), _ = W(0), G = W(!0), Z = W(!1), q = W(!1);
|
|
6068
6068
|
Me(
|
|
6069
6069
|
B(
|
|
6070
|
-
|
|
6070
|
+
x,
|
|
6071
6071
|
Ce(_),
|
|
6072
6072
|
pe(([P, X]) => !!X)
|
|
6073
6073
|
),
|
|
@@ -6076,7 +6076,7 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6076
6076
|
}
|
|
6077
6077
|
), Me(
|
|
6078
6078
|
B(
|
|
6079
|
-
nt(
|
|
6079
|
+
nt(x, G, k, I, _, Z),
|
|
6080
6080
|
pe(([P, X, te, ue, , se]) => P && !X && te.height !== 0 && ue.height !== 0 && !se)
|
|
6081
6081
|
),
|
|
6082
6082
|
([, , , , P]) => {
|
|
@@ -6095,12 +6095,12 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6095
6095
|
C
|
|
6096
6096
|
), Me(
|
|
6097
6097
|
B(
|
|
6098
|
-
|
|
6098
|
+
x,
|
|
6099
6099
|
Ce(Q),
|
|
6100
6100
|
pe(([, P]) => P != null)
|
|
6101
6101
|
),
|
|
6102
6102
|
([, P]) => {
|
|
6103
|
-
P && (we(I, P.viewport), we(
|
|
6103
|
+
P && (we(I, P.viewport), we(k, P.item), we($, P.gap), P.scrollTop > 0 && (we(O, !0), Dt(B(u, In(1)), (X) => {
|
|
6104
6104
|
we(O, !1);
|
|
6105
6105
|
}), we(c, { top: P.scrollTop })));
|
|
6106
6106
|
}
|
|
@@ -6114,7 +6114,7 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6114
6114
|
B(
|
|
6115
6115
|
nt(
|
|
6116
6116
|
he(I, no),
|
|
6117
|
-
he(
|
|
6117
|
+
he(k, no),
|
|
6118
6118
|
he($, (P, X) => P && P.column === X.column && P.row === X.row),
|
|
6119
6119
|
he(u)
|
|
6120
6120
|
),
|
|
@@ -6132,7 +6132,7 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6132
6132
|
he(T),
|
|
6133
6133
|
r,
|
|
6134
6134
|
he($, Cv),
|
|
6135
|
-
he(
|
|
6135
|
+
he(k, no),
|
|
6136
6136
|
he(I, no),
|
|
6137
6137
|
he(j),
|
|
6138
6138
|
he(C),
|
|
@@ -6179,7 +6179,7 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6179
6179
|
T
|
|
6180
6180
|
), le(
|
|
6181
6181
|
B(
|
|
6182
|
-
nt(I,
|
|
6182
|
+
nt(I, k, R, $),
|
|
6183
6183
|
pe(([P, X, { items: te }]) => te.length > 0 && X.height !== 0 && P.height !== 0),
|
|
6184
6184
|
re(([P, X, { items: te }, ue]) => {
|
|
6185
6185
|
const { bottom: se, top: Ae } = Ml(P, ue, X, te);
|
|
@@ -6230,10 +6230,10 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6230
6230
|
nn(0)
|
|
6231
6231
|
)
|
|
6232
6232
|
);
|
|
6233
|
-
le(ce,
|
|
6233
|
+
le(ce, v.scrollSeekRangeChanged), le(
|
|
6234
6234
|
B(
|
|
6235
6235
|
M,
|
|
6236
|
-
Ce(I,
|
|
6236
|
+
Ce(I, k, T, $),
|
|
6237
6237
|
re(([P, X, te, ue, se]) => {
|
|
6238
6238
|
const Ae = du(P), { align: Pe, behavior: De, offset: de } = Ae;
|
|
6239
6239
|
let je = Ae.index;
|
|
@@ -6267,7 +6267,7 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6267
6267
|
headerHeight: s,
|
|
6268
6268
|
increaseViewportBy: e,
|
|
6269
6269
|
initialItemCount: C,
|
|
6270
|
-
itemDimensions:
|
|
6270
|
+
itemDimensions: k,
|
|
6271
6271
|
overscan: n,
|
|
6272
6272
|
restoreStateFrom: Q,
|
|
6273
6273
|
scrollBy: i,
|
|
@@ -6283,7 +6283,7 @@ const Tv = /* @__PURE__ */ ke(
|
|
|
6283
6283
|
windowScrollContainerState: b,
|
|
6284
6284
|
windowScrollTo: y,
|
|
6285
6285
|
windowViewportRect: N,
|
|
6286
|
-
...
|
|
6286
|
+
...v,
|
|
6287
6287
|
// output
|
|
6288
6288
|
gridState: R,
|
|
6289
6289
|
horizontalDirection: q,
|
|
@@ -6319,7 +6319,7 @@ const Rv = /* @__PURE__ */ ke(() => {
|
|
|
6319
6319
|
const e = W((h) => `Item ${h}`), t = W({}), n = W(null), r = W("virtuoso-grid-item"), o = W("virtuoso-grid-list"), s = W(na), i = W("div"), a = W(sr), c = (h, m = null) => ut(
|
|
6320
6320
|
B(
|
|
6321
6321
|
t,
|
|
6322
|
-
re((
|
|
6322
|
+
re((v) => v[h]),
|
|
6323
6323
|
He()
|
|
6324
6324
|
),
|
|
6325
6325
|
m
|
|
@@ -6346,7 +6346,7 @@ const Rv = /* @__PURE__ */ ke(() => {
|
|
|
6346
6346
|
([e, t]) => ({ ...e, ...t }),
|
|
6347
6347
|
ze(Tv, Rv)
|
|
6348
6348
|
), Nv = /* @__PURE__ */ V.memo(function() {
|
|
6349
|
-
const e = We("gridState"), t = We("listClassName"), n = We("itemClassName"), r = We("itemContent"), o = We("computeItemKey"), s = We("isSeeking"), i = kt("scrollHeight"), a = We("ItemComponent"), c = We("ListComponent"), u = We("ScrollSeekPlaceholder"), d = We("context"), h = kt("itemDimensions"), m = kt("gap"),
|
|
6349
|
+
const e = We("gridState"), t = We("listClassName"), n = We("itemClassName"), r = We("itemContent"), o = We("computeItemKey"), s = We("isSeeking"), i = kt("scrollHeight"), a = We("ItemComponent"), c = We("ListComponent"), u = We("ScrollSeekPlaceholder"), d = We("context"), h = kt("itemDimensions"), m = kt("gap"), v = We("log"), x = We("stateRestoreInProgress"), g = kt("reportReadyState"), p = _n(
|
|
6350
6350
|
V.useMemo(
|
|
6351
6351
|
() => (w) => {
|
|
6352
6352
|
const b = w.parentElement.parentElement.scrollHeight;
|
|
@@ -6357,18 +6357,18 @@ const Rv = /* @__PURE__ */ ke(() => {
|
|
|
6357
6357
|
h({ height: N, width: S });
|
|
6358
6358
|
}
|
|
6359
6359
|
m({
|
|
6360
|
-
column: Dl("column-gap", getComputedStyle(w).columnGap,
|
|
6361
|
-
row: Dl("row-gap", getComputedStyle(w).rowGap,
|
|
6360
|
+
column: Dl("column-gap", getComputedStyle(w).columnGap, v),
|
|
6361
|
+
row: Dl("row-gap", getComputedStyle(w).rowGap, v)
|
|
6362
6362
|
});
|
|
6363
6363
|
},
|
|
6364
|
-
[i, h, m,
|
|
6364
|
+
[i, h, m, v]
|
|
6365
6365
|
),
|
|
6366
6366
|
!0,
|
|
6367
6367
|
!1
|
|
6368
6368
|
);
|
|
6369
6369
|
return Cu(() => {
|
|
6370
6370
|
e.itemHeight > 0 && e.itemWidth > 0 && g(!0);
|
|
6371
|
-
}, [e]),
|
|
6371
|
+
}, [e]), x ? null : /* @__PURE__ */ l.jsx(
|
|
6372
6372
|
c,
|
|
6373
6373
|
{
|
|
6374
6374
|
className: t,
|
|
@@ -6545,14 +6545,14 @@ function zt(e, t = []) {
|
|
|
6545
6545
|
n = [...n, i];
|
|
6546
6546
|
const u = (h) => {
|
|
6547
6547
|
var w;
|
|
6548
|
-
const { scope: m, children:
|
|
6549
|
-
return /* @__PURE__ */ l.jsx(g.Provider, { value: p, children:
|
|
6548
|
+
const { scope: m, children: v, ...x } = h, g = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[c]) || a, p = f.useMemo(() => x, Object.values(x));
|
|
6549
|
+
return /* @__PURE__ */ l.jsx(g.Provider, { value: p, children: v });
|
|
6550
6550
|
};
|
|
6551
6551
|
u.displayName = s + "Provider";
|
|
6552
6552
|
function d(h, m) {
|
|
6553
6553
|
var g;
|
|
6554
|
-
const
|
|
6555
|
-
if (
|
|
6554
|
+
const v = ((g = m == null ? void 0 : m[e]) == null ? void 0 : g[c]) || a, x = f.useContext(v);
|
|
6555
|
+
if (x) return x;
|
|
6556
6556
|
if (i !== void 0) return i;
|
|
6557
6557
|
throw new Error(`\`${h}\` must be used within \`${s}\``);
|
|
6558
6558
|
}
|
|
@@ -6718,22 +6718,22 @@ function Uv(e) {
|
|
|
6718
6718
|
}, [a]), st(() => {
|
|
6719
6719
|
const u = r.current, d = o.current;
|
|
6720
6720
|
if (d !== e) {
|
|
6721
|
-
const m = s.current,
|
|
6722
|
-
e ? c("MOUNT") :
|
|
6721
|
+
const m = s.current, v = ro(u);
|
|
6722
|
+
e ? c("MOUNT") : v === "none" || (u == null ? void 0 : u.display) === "none" ? c("UNMOUNT") : c(d && m !== v ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
6723
6723
|
}
|
|
6724
6724
|
}, [e, c]), st(() => {
|
|
6725
6725
|
if (t) {
|
|
6726
6726
|
let u;
|
|
6727
|
-
const d = t.ownerDocument.defaultView ?? window, h = (
|
|
6728
|
-
const g = ro(r.current).includes(CSS.escape(
|
|
6729
|
-
if (
|
|
6727
|
+
const d = t.ownerDocument.defaultView ?? window, h = (v) => {
|
|
6728
|
+
const g = ro(r.current).includes(CSS.escape(v.animationName));
|
|
6729
|
+
if (v.target === t && g && (c("ANIMATION_END"), !o.current)) {
|
|
6730
6730
|
const p = t.style.animationFillMode;
|
|
6731
6731
|
t.style.animationFillMode = "forwards", u = d.setTimeout(() => {
|
|
6732
6732
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = p);
|
|
6733
6733
|
});
|
|
6734
6734
|
}
|
|
6735
|
-
}, m = (
|
|
6736
|
-
|
|
6735
|
+
}, m = (v) => {
|
|
6736
|
+
v.target === t && (s.current = ro(r.current));
|
|
6737
6737
|
};
|
|
6738
6738
|
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", h), t.addEventListener("animationend", h), () => {
|
|
6739
6739
|
d.clearTimeout(u), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", h), t.removeEventListener("animationend", h);
|
|
@@ -6828,7 +6828,7 @@ var ia = "CollapsibleContent", qv = f.forwardRef(
|
|
|
6828
6828
|
);
|
|
6829
6829
|
qv.displayName = ia;
|
|
6830
6830
|
var Xv = f.forwardRef((e, t) => {
|
|
6831
|
-
const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = sa(ia, n), [a, c] = f.useState(r), u = f.useRef(null), d = Te(t, u), h = f.useRef(0), m = h.current,
|
|
6831
|
+
const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = sa(ia, n), [a, c] = f.useState(r), u = f.useRef(null), d = Te(t, u), h = f.useRef(0), m = h.current, v = f.useRef(0), x = v.current, g = i.open || a, p = f.useRef(g), w = f.useRef(void 0);
|
|
6832
6832
|
return f.useEffect(() => {
|
|
6833
6833
|
const b = requestAnimationFrame(() => p.current = !1);
|
|
6834
6834
|
return () => cancelAnimationFrame(b);
|
|
@@ -6840,7 +6840,7 @@ var Xv = f.forwardRef((e, t) => {
|
|
|
6840
6840
|
animationName: b.style.animationName
|
|
6841
6841
|
}, b.style.transitionDuration = "0s", b.style.animationName = "none";
|
|
6842
6842
|
const y = b.getBoundingClientRect();
|
|
6843
|
-
h.current = y.height,
|
|
6843
|
+
h.current = y.height, v.current = y.width, p.current || (b.style.transitionDuration = w.current.transitionDuration, b.style.animationName = w.current.animationName), c(r);
|
|
6844
6844
|
}
|
|
6845
6845
|
}, [i.open, r]), /* @__PURE__ */ l.jsx(
|
|
6846
6846
|
me.div,
|
|
@@ -6853,7 +6853,7 @@ var Xv = f.forwardRef((e, t) => {
|
|
|
6853
6853
|
ref: d,
|
|
6854
6854
|
style: {
|
|
6855
6855
|
"--radix-collapsible-content-height": m ? `${m}px` : void 0,
|
|
6856
|
-
"--radix-collapsible-content-width":
|
|
6856
|
+
"--radix-collapsible-content-width": x ? `${x}px` : void 0,
|
|
6857
6857
|
...e.style
|
|
6858
6858
|
},
|
|
6859
6859
|
children: g && o
|
|
@@ -7007,7 +7007,7 @@ function sb(e, t = !1) {
|
|
|
7007
7007
|
}
|
|
7008
7008
|
function ib(e, t) {
|
|
7009
7009
|
const [n, r] = fe(e), o = Ye(e), s = Ye(null);
|
|
7010
|
-
return
|
|
7010
|
+
return Be(() => {
|
|
7011
7011
|
if (!t) {
|
|
7012
7012
|
r(e);
|
|
7013
7013
|
return;
|
|
@@ -7030,17 +7030,17 @@ function Ws({
|
|
|
7030
7030
|
streamingThrottleMs: s = 100
|
|
7031
7031
|
}) {
|
|
7032
7032
|
const i = ib(e, r), a = sb(i, r), [c, u] = fe(() => {
|
|
7033
|
-
var
|
|
7034
|
-
return ((
|
|
7033
|
+
var v;
|
|
7034
|
+
return ((v = br.get(a)) == null ? void 0 : v.html) ?? null;
|
|
7035
7035
|
}), d = Ye(null), h = Ye([]);
|
|
7036
|
-
|
|
7036
|
+
Be(() => {
|
|
7037
7037
|
h.current = [];
|
|
7038
|
-
const
|
|
7039
|
-
if (
|
|
7040
|
-
|
|
7038
|
+
const v = br.get(a);
|
|
7039
|
+
if (v && v.source === i) {
|
|
7040
|
+
v.html !== c && u(v.html);
|
|
7041
7041
|
return;
|
|
7042
7042
|
}
|
|
7043
|
-
if (
|
|
7043
|
+
if (v && v.html !== c && u(v.html), !is) {
|
|
7044
7044
|
let C = !1;
|
|
7045
7045
|
return (async () => {
|
|
7046
7046
|
try {
|
|
@@ -7053,12 +7053,12 @@ function Ws({
|
|
|
7053
7053
|
C = !0;
|
|
7054
7054
|
};
|
|
7055
7055
|
}
|
|
7056
|
-
let
|
|
7056
|
+
let x = !0, g = !1;
|
|
7057
7057
|
const p = `${a}::${Date.now().toString(36)}::${Math.random().toString(36).slice(2)}`;
|
|
7058
7058
|
d.current = p;
|
|
7059
7059
|
const w = (C) => {
|
|
7060
7060
|
const R = C.data;
|
|
7061
|
-
if (!R || R.id !== p || R.key && R.key !== a || !
|
|
7061
|
+
if (!R || R.id !== p || R.key && R.key !== a || !x) return;
|
|
7062
7062
|
g = !0;
|
|
7063
7063
|
const I = R.html ?? "";
|
|
7064
7064
|
br.set(a, { html: I, source: i }), u(I);
|
|
@@ -7096,14 +7096,14 @@ function Ws({
|
|
|
7096
7096
|
console.warn("[MarkdownContent] worker timeout (ms=" + S + "), falling back to main-thread parse for", a);
|
|
7097
7097
|
try {
|
|
7098
7098
|
const C = await $l(i);
|
|
7099
|
-
br.set(a, { html: C, source: i }),
|
|
7099
|
+
br.set(a, { html: C, source: i }), x && d.current === p && u(C);
|
|
7100
7100
|
} catch (C) {
|
|
7101
7101
|
console.error("[MarkdownContent] fallback parse failed", C);
|
|
7102
7102
|
}
|
|
7103
7103
|
}
|
|
7104
7104
|
}, S);
|
|
7105
7105
|
return () => {
|
|
7106
|
-
if (
|
|
7106
|
+
if (x = !1, clearTimeout(T), dn.removeEventListener("message", w), d.current === p && (d.current = null), !vo) {
|
|
7107
7107
|
const C = Er.indexOf(y);
|
|
7108
7108
|
C >= 0 && Er.splice(C, 1);
|
|
7109
7109
|
}
|
|
@@ -7115,10 +7115,10 @@ function Ws({
|
|
|
7115
7115
|
const m = V.useRef(null);
|
|
7116
7116
|
return V.useEffect(() => {
|
|
7117
7117
|
if (!c) return;
|
|
7118
|
-
const
|
|
7119
|
-
if (!
|
|
7120
|
-
const
|
|
7121
|
-
if (!
|
|
7118
|
+
const v = m.current;
|
|
7119
|
+
if (!v) return;
|
|
7120
|
+
const x = Array.from(v.querySelectorAll("pre code"));
|
|
7121
|
+
if (!x.length) return;
|
|
7122
7122
|
let g = null, p = !1;
|
|
7123
7123
|
const w = (y, N) => {
|
|
7124
7124
|
for (const S of y) {
|
|
@@ -7131,8 +7131,8 @@ function Ws({
|
|
|
7131
7131
|
if (R) {
|
|
7132
7132
|
g = R;
|
|
7133
7133
|
try {
|
|
7134
|
-
|
|
7135
|
-
|
|
7134
|
+
x.forEach((I) => {
|
|
7135
|
+
v.contains(I) && (g == null || g.highlightElement(I));
|
|
7136
7136
|
});
|
|
7137
7137
|
} catch {
|
|
7138
7138
|
}
|
|
@@ -7146,8 +7146,8 @@ function Ws({
|
|
|
7146
7146
|
}
|
|
7147
7147
|
N.unobserve(T);
|
|
7148
7148
|
}
|
|
7149
|
-
}, b = new IntersectionObserver(w, { root:
|
|
7150
|
-
return
|
|
7149
|
+
}, b = new IntersectionObserver(w, { root: v, threshold: 0.1 });
|
|
7150
|
+
return x.forEach((y) => b.observe(y)), () => {
|
|
7151
7151
|
p = !0, b.disconnect();
|
|
7152
7152
|
};
|
|
7153
7153
|
}, [c]), c ? /* @__PURE__ */ l.jsx("div", { ref: m, className: D("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: c } }) : r && o ? null : /* @__PURE__ */ l.jsx("div", { className: D("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
|
|
@@ -7302,12 +7302,12 @@ var pb = "DismissableLayer", Si = "dismissableLayer.update", mb = "dismissableLa
|
|
|
7302
7302
|
onInteractOutside: i,
|
|
7303
7303
|
onDismiss: a,
|
|
7304
7304
|
...c
|
|
7305
|
-
} = e, u = f.useContext(Fu), [d, h] = f.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [,
|
|
7306
|
-
const R = C.target, I = [...u.branches].some((
|
|
7305
|
+
} = e, u = f.useContext(Fu), [d, h] = f.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = f.useState({}), x = Te(t, (C) => h(C)), g = Array.from(u.layers), [p] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = g.indexOf(p), b = d ? g.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, N = b >= w, S = bb((C) => {
|
|
7306
|
+
const R = C.target, I = [...u.branches].some((k) => k.contains(R));
|
|
7307
7307
|
!N || I || (o == null || o(C), i == null || i(C), C.defaultPrevented || a == null || a());
|
|
7308
7308
|
}, m), T = wb((C) => {
|
|
7309
7309
|
const R = C.target;
|
|
7310
|
-
[...u.branches].some((
|
|
7310
|
+
[...u.branches].some((k) => k.contains(R)) || (s == null || s(C), i == null || i(C), C.defaultPrevented || a == null || a());
|
|
7311
7311
|
}, m);
|
|
7312
7312
|
return hb((C) => {
|
|
7313
7313
|
b === u.layers.size - 1 && (r == null || r(C), !C.defaultPrevented && a && (C.preventDefault(), a()));
|
|
@@ -7319,13 +7319,13 @@ var pb = "DismissableLayer", Si = "dismissableLayer.update", mb = "dismissableLa
|
|
|
7319
7319
|
}, [d, m, n, u]), f.useEffect(() => () => {
|
|
7320
7320
|
d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), Vl());
|
|
7321
7321
|
}, [d, u]), f.useEffect(() => {
|
|
7322
|
-
const C = () =>
|
|
7322
|
+
const C = () => v({});
|
|
7323
7323
|
return document.addEventListener(Si, C), () => document.removeEventListener(Si, C);
|
|
7324
7324
|
}, []), /* @__PURE__ */ l.jsx(
|
|
7325
7325
|
me.div,
|
|
7326
7326
|
{
|
|
7327
7327
|
...c,
|
|
7328
|
-
ref:
|
|
7328
|
+
ref: x,
|
|
7329
7329
|
style: {
|
|
7330
7330
|
pointerEvents: y ? N ? "auto" : "none" : void 0,
|
|
7331
7331
|
...e.style
|
|
@@ -7411,7 +7411,7 @@ var Ks = "focusScope.autoFocusOnMount", Ys = "focusScope.autoFocusOnUnmount", Gl
|
|
|
7411
7411
|
onMountAutoFocus: o,
|
|
7412
7412
|
onUnmountAutoFocus: s,
|
|
7413
7413
|
...i
|
|
7414
|
-
} = e, [a, c] = f.useState(null), u = it(o), d = it(s), h = f.useRef(null), m = Te(t, (g) => c(g)),
|
|
7414
|
+
} = e, [a, c] = f.useState(null), u = it(o), d = it(s), h = f.useRef(null), m = Te(t, (g) => c(g)), v = f.useRef({
|
|
7415
7415
|
paused: !1,
|
|
7416
7416
|
pause() {
|
|
7417
7417
|
this.paused = !0;
|
|
@@ -7423,11 +7423,11 @@ var Ks = "focusScope.autoFocusOnMount", Ys = "focusScope.autoFocusOnUnmount", Gl
|
|
|
7423
7423
|
f.useEffect(() => {
|
|
7424
7424
|
if (r) {
|
|
7425
7425
|
let g = function(y) {
|
|
7426
|
-
if (
|
|
7426
|
+
if (v.paused || !a) return;
|
|
7427
7427
|
const N = y.target;
|
|
7428
7428
|
a.contains(N) ? h.current = N : ln(h.current, { select: !0 });
|
|
7429
7429
|
}, p = function(y) {
|
|
7430
|
-
if (
|
|
7430
|
+
if (v.paused || !a) return;
|
|
7431
7431
|
const N = y.relatedTarget;
|
|
7432
7432
|
N !== null && (a.contains(N) || ln(h.current, { select: !0 }));
|
|
7433
7433
|
}, w = function(y) {
|
|
@@ -7441,9 +7441,9 @@ var Ks = "focusScope.autoFocusOnMount", Ys = "focusScope.autoFocusOnUnmount", Gl
|
|
|
7441
7441
|
document.removeEventListener("focusin", g), document.removeEventListener("focusout", p), b.disconnect();
|
|
7442
7442
|
};
|
|
7443
7443
|
}
|
|
7444
|
-
}, [r, a,
|
|
7444
|
+
}, [r, a, v.paused]), f.useEffect(() => {
|
|
7445
7445
|
if (a) {
|
|
7446
|
-
Yl.add(
|
|
7446
|
+
Yl.add(v);
|
|
7447
7447
|
const g = document.activeElement;
|
|
7448
7448
|
if (!a.contains(g)) {
|
|
7449
7449
|
const w = new CustomEvent(Ks, Gl);
|
|
@@ -7452,23 +7452,23 @@ var Ks = "focusScope.autoFocusOnMount", Ys = "focusScope.autoFocusOnUnmount", Gl
|
|
|
7452
7452
|
return () => {
|
|
7453
7453
|
a.removeEventListener(Ks, u), setTimeout(() => {
|
|
7454
7454
|
const w = new CustomEvent(Ys, Gl);
|
|
7455
|
-
a.addEventListener(Ys, d), a.dispatchEvent(w), w.defaultPrevented || ln(g ?? document.body, { select: !0 }), a.removeEventListener(Ys, d), Yl.remove(
|
|
7455
|
+
a.addEventListener(Ys, d), a.dispatchEvent(w), w.defaultPrevented || ln(g ?? document.body, { select: !0 }), a.removeEventListener(Ys, d), Yl.remove(v);
|
|
7456
7456
|
}, 0);
|
|
7457
7457
|
};
|
|
7458
7458
|
}
|
|
7459
|
-
}, [a, u, d,
|
|
7460
|
-
const
|
|
7459
|
+
}, [a, u, d, v]);
|
|
7460
|
+
const x = f.useCallback(
|
|
7461
7461
|
(g) => {
|
|
7462
|
-
if (!n && !r ||
|
|
7462
|
+
if (!n && !r || v.paused) return;
|
|
7463
7463
|
const p = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, w = document.activeElement;
|
|
7464
7464
|
if (p && w) {
|
|
7465
7465
|
const b = g.currentTarget, [y, N] = Cb(b);
|
|
7466
7466
|
y && N ? !g.shiftKey && w === N ? (g.preventDefault(), n && ln(y, { select: !0 })) : g.shiftKey && w === y && (g.preventDefault(), n && ln(N, { select: !0 })) : w === b && g.preventDefault();
|
|
7467
7467
|
}
|
|
7468
7468
|
},
|
|
7469
|
-
[n, r,
|
|
7469
|
+
[n, r, v.paused]
|
|
7470
7470
|
);
|
|
7471
|
-
return /* @__PURE__ */ l.jsx(me.div, { tabIndex: -1, ...i, ref: m, onKeyDown:
|
|
7471
|
+
return /* @__PURE__ */ l.jsx(me.div, { tabIndex: -1, ...i, ref: m, onKeyDown: x });
|
|
7472
7472
|
});
|
|
7473
7473
|
as.displayName = yb;
|
|
7474
7474
|
function Sb(e, { select: t = !1 } = {}) {
|
|
@@ -7703,11 +7703,11 @@ var Uu = Lb(), Js = function() {
|
|
|
7703
7703
|
onScrollCapture: Js,
|
|
7704
7704
|
onWheelCapture: Js,
|
|
7705
7705
|
onTouchMoveCapture: Js
|
|
7706
|
-
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, m = e.sideCar,
|
|
7706
|
+
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, m = e.sideCar, v = e.noRelative, x = e.noIsolation, g = e.inert, p = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, N = Hu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, T = Ob([n, t]), C = Kt(Kt({}, N), o);
|
|
7707
7707
|
return f.createElement(
|
|
7708
7708
|
f.Fragment,
|
|
7709
7709
|
null,
|
|
7710
|
-
d && f.createElement(S, { sideCar: Uu, removeScrollBar: u, shards: h, noRelative:
|
|
7710
|
+
d && f.createElement(S, { sideCar: Uu, removeScrollBar: u, shards: h, noRelative: v, noIsolation: x, inert: g, setCallbacks: s, allowPinchZoom: !!p, lockRef: n, gapMode: y }),
|
|
7711
7711
|
i ? f.cloneElement(f.Children.only(a), Kt(Kt({}, C), { ref: T })) : f.createElement(b, Kt({}, C, { className: c, ref: T }), a)
|
|
7712
7712
|
);
|
|
7713
7713
|
});
|
|
@@ -7910,8 +7910,8 @@ var $n = Ci ? { passive: !1 } : !1, Zb = function(e) {
|
|
|
7910
7910
|
do {
|
|
7911
7911
|
if (!a)
|
|
7912
7912
|
break;
|
|
7913
|
-
var
|
|
7914
|
-
(
|
|
7913
|
+
var v = Ku(e, a), x = v[0], g = v[1], p = v[2], w = g - p - s * x;
|
|
7914
|
+
(x || w) && Gu(e, a) && (h += w, m += x);
|
|
7915
7915
|
var b = a.parentNode;
|
|
7916
7916
|
a = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
|
|
7917
7917
|
} while (
|
|
@@ -8008,12 +8008,12 @@ function lw(e) {
|
|
|
8008
8008
|
}), document.removeEventListener("wheel", c, $n), document.removeEventListener("touchmove", c, $n), document.removeEventListener("touchstart", d, $n);
|
|
8009
8009
|
};
|
|
8010
8010
|
}, []);
|
|
8011
|
-
var
|
|
8011
|
+
var v = e.removeScrollBar, x = e.inert;
|
|
8012
8012
|
return f.createElement(
|
|
8013
8013
|
f.Fragment,
|
|
8014
8014
|
null,
|
|
8015
|
-
|
|
8016
|
-
|
|
8015
|
+
x ? f.createElement(s, { styles: iw(o) }) : null,
|
|
8016
|
+
v ? f.createElement(Jb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
8017
8017
|
);
|
|
8018
8018
|
}
|
|
8019
8019
|
function cw(e) {
|
|
@@ -8055,8 +8055,8 @@ var dw = function(e) {
|
|
|
8055
8055
|
d(m);
|
|
8056
8056
|
else
|
|
8057
8057
|
try {
|
|
8058
|
-
var
|
|
8059
|
-
zn.set(m, g), s.set(m, p), i.push(m), g === 1 &&
|
|
8058
|
+
var v = m.getAttribute(r), x = v !== null && v !== "false", g = (zn.get(m) || 0) + 1, p = (s.get(m) || 0) + 1;
|
|
8059
|
+
zn.set(m, g), s.set(m, p), i.push(m), g === 1 && x && ao.set(m, !0), p === 1 && m.setAttribute(n, "true"), x || m.setAttribute(r, "true");
|
|
8060
8060
|
} catch (w) {
|
|
8061
8061
|
console.error("aria-hidden: cannot operate on ", m, w);
|
|
8062
8062
|
}
|
|
@@ -8064,8 +8064,8 @@ var dw = function(e) {
|
|
|
8064
8064
|
};
|
|
8065
8065
|
return d(t), a.clear(), Qs++, function() {
|
|
8066
8066
|
i.forEach(function(h) {
|
|
8067
|
-
var m = zn.get(h) - 1,
|
|
8068
|
-
zn.set(h, m), s.set(h,
|
|
8067
|
+
var m = zn.get(h) - 1, v = s.get(h) - 1;
|
|
8068
|
+
zn.set(h, m), s.set(h, v), m || (ao.has(h) || h.removeAttribute(r), ao.delete(h)), v || h.removeAttribute(n);
|
|
8069
8069
|
}), Qs--, Qs || (zn = /* @__PURE__ */ new WeakMap(), zn = /* @__PURE__ */ new WeakMap(), ao = /* @__PURE__ */ new WeakMap(), lo = {});
|
|
8070
8070
|
};
|
|
8071
8071
|
}, da = function(e, t, n) {
|
|
@@ -8389,7 +8389,7 @@ const Ew = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
8389
8389
|
Ew.displayName = ps.displayName;
|
|
8390
8390
|
function Nw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
8391
8391
|
const [s, i] = fe(!1), [a, c] = fe(null), [u, d] = fe(null), { toast: h } = ca();
|
|
8392
|
-
|
|
8392
|
+
Be(() => {
|
|
8393
8393
|
e && n && m();
|
|
8394
8394
|
}, [e, n]);
|
|
8395
8395
|
const m = async () => {
|
|
@@ -8404,14 +8404,14 @@ function Nw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
8404
8404
|
i(!1);
|
|
8405
8405
|
}
|
|
8406
8406
|
}
|
|
8407
|
-
},
|
|
8407
|
+
}, v = async () => {
|
|
8408
8408
|
if (n)
|
|
8409
8409
|
try {
|
|
8410
8410
|
await ab(n), h({ title: "Download started", description: `Downloading ${r}` });
|
|
8411
8411
|
} catch (w) {
|
|
8412
8412
|
console.error("Failed to download file:", w), h({ title: "Download failed", description: String(w), variant: "destructive" });
|
|
8413
8413
|
}
|
|
8414
|
-
},
|
|
8414
|
+
}, x = async () => {
|
|
8415
8415
|
if (n)
|
|
8416
8416
|
try {
|
|
8417
8417
|
const w = await zl(n), b = new Blob([w], { type: o }), y = URL.createObjectURL(b);
|
|
@@ -8469,7 +8469,7 @@ function Nw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
8469
8469
|
{
|
|
8470
8470
|
variant: "outline",
|
|
8471
8471
|
size: "sm",
|
|
8472
|
-
onClick:
|
|
8472
|
+
onClick: x,
|
|
8473
8473
|
className: "flex items-center gap-2",
|
|
8474
8474
|
children: [
|
|
8475
8475
|
/* @__PURE__ */ l.jsx($p, { className: "h-4 w-4" }),
|
|
@@ -8482,7 +8482,7 @@ function Nw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
8482
8482
|
{
|
|
8483
8483
|
variant: "outline",
|
|
8484
8484
|
size: "sm",
|
|
8485
|
-
onClick:
|
|
8485
|
+
onClick: v,
|
|
8486
8486
|
className: "flex items-center gap-2",
|
|
8487
8487
|
children: [
|
|
8488
8488
|
/* @__PURE__ */ l.jsx(Hp, { className: "h-4 w-4" }),
|
|
@@ -8498,7 +8498,7 @@ function Nw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
8498
8498
|
const Co = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
|
|
8499
8499
|
function Iw({ className: e }) {
|
|
8500
8500
|
const [t, n] = fe(0);
|
|
8501
|
-
return
|
|
8501
|
+
return Be(() => {
|
|
8502
8502
|
const r = setInterval(() => n((o) => (o + 1) % 4), 500);
|
|
8503
8503
|
return () => clearInterval(r);
|
|
8504
8504
|
}, []), /* @__PURE__ */ l.jsxs(
|
|
@@ -8526,14 +8526,14 @@ const jw = V.memo(function({
|
|
|
8526
8526
|
truncateToolMessages: d = !0,
|
|
8527
8527
|
toolMessagePreviewLength: h = 200,
|
|
8528
8528
|
truncateUserMessages: m = !0,
|
|
8529
|
-
userMessagePreviewLength:
|
|
8530
|
-
customStyles:
|
|
8529
|
+
userMessagePreviewLength: v = 200,
|
|
8530
|
+
customStyles: x = {},
|
|
8531
8531
|
onEdit: g,
|
|
8532
8532
|
onRegenerate: p,
|
|
8533
8533
|
onCancelEdit: w,
|
|
8534
8534
|
onCopy: b
|
|
8535
8535
|
}) {
|
|
8536
|
-
const [y, N] = fe(!1), [S, T] = fe(!1), [C, R] = fe(!1), [I,
|
|
8536
|
+
const [y, N] = fe(!1), [S, T] = fe(!1), [C, R] = fe(!1), [I, k] = fe(!1), { currentThreadId: M } = Vi();
|
|
8537
8537
|
ca();
|
|
8538
8538
|
const [H, U] = fe({}), [j, $] = fe(!1), [L, Q] = fe(null), O = u === "phone" || u === "half-screen", _ = t.role, G = _ === "tool", Z = V.useMemo(() => {
|
|
8539
8539
|
switch (_) {
|
|
@@ -8706,10 +8706,10 @@ const jw = V.memo(function({
|
|
|
8706
8706
|
if (xe !== null) return /* @__PURE__ */ l.jsx(nc, { data: xe });
|
|
8707
8707
|
if (_ === "user" && m) {
|
|
8708
8708
|
const Se = q.trim();
|
|
8709
|
-
if (Se.length >
|
|
8710
|
-
return /* @__PURE__ */ l.jsxs(Fl, { open: I, onOpenChange:
|
|
8709
|
+
if (Se.length > v)
|
|
8710
|
+
return /* @__PURE__ */ l.jsxs(Fl, { open: I, onOpenChange: k, children: [
|
|
8711
8711
|
/* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: I ? /* @__PURE__ */ l.jsx(Ws, { content: Se, hideFallbackDuringStreaming: !0 }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
|
|
8712
|
-
Se.substring(0,
|
|
8712
|
+
Se.substring(0, v),
|
|
8713
8713
|
"..."
|
|
8714
8714
|
] }) }),
|
|
8715
8715
|
/* @__PURE__ */ l.jsx(Bl, { asChild: !0, children: /* @__PURE__ */ l.jsx(
|
|
@@ -8724,7 +8724,7 @@ const jw = V.memo(function({
|
|
|
8724
8724
|
] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
8725
8725
|
/* @__PURE__ */ l.jsx(Wn, { className: "h-3 w-3 mr-1" }),
|
|
8726
8726
|
" Show more (",
|
|
8727
|
-
Se.length -
|
|
8727
|
+
Se.length - v,
|
|
8728
8728
|
" chars)"
|
|
8729
8729
|
] })
|
|
8730
8730
|
}
|
|
@@ -8752,7 +8752,7 @@ const jw = V.memo(function({
|
|
|
8752
8752
|
] });
|
|
8753
8753
|
}, De = un(() => Dw(t), [t]);
|
|
8754
8754
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
8755
|
-
/* @__PURE__ */ l.jsx("div", { className: D(ue(),
|
|
8755
|
+
/* @__PURE__ */ l.jsx("div", { className: D(ue(), x.container), children: /* @__PURE__ */ l.jsxs("div", { className: D(se(), x.content), children: [
|
|
8756
8756
|
(a || c || G) && /* @__PURE__ */ l.jsxs(
|
|
8757
8757
|
"div",
|
|
8758
8758
|
{
|
|
@@ -8760,7 +8760,7 @@ const jw = V.memo(function({
|
|
|
8760
8760
|
"flex items-center justify-between mb-2 pb-2 border-b border-current/10",
|
|
8761
8761
|
O && "mb-1 pb-1",
|
|
8762
8762
|
Z,
|
|
8763
|
-
|
|
8763
|
+
x.header
|
|
8764
8764
|
),
|
|
8765
8765
|
children: [
|
|
8766
8766
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -8805,7 +8805,7 @@ const jw = V.memo(function({
|
|
|
8805
8805
|
className: D(
|
|
8806
8806
|
"opacity-0 group-hover:opacity-100 transition-opacity",
|
|
8807
8807
|
"flex items-center gap-1",
|
|
8808
|
-
|
|
8808
|
+
x.actions
|
|
8809
8809
|
),
|
|
8810
8810
|
children: [
|
|
8811
8811
|
/* @__PURE__ */ l.jsx(
|
|
@@ -8870,7 +8870,7 @@ const jw = V.memo(function({
|
|
|
8870
8870
|
className: D(
|
|
8871
8871
|
"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
8872
8872
|
"flex items-center gap-1",
|
|
8873
|
-
|
|
8873
|
+
x.actions
|
|
8874
8874
|
),
|
|
8875
8875
|
children: [
|
|
8876
8876
|
/* @__PURE__ */ l.jsx(
|
|
@@ -9048,7 +9048,7 @@ function Dw(e) {
|
|
|
9048
9048
|
}
|
|
9049
9049
|
function Lw(e, t) {
|
|
9050
9050
|
const [n, r] = fe(e), o = Ye(e), s = Ye(null);
|
|
9051
|
-
return
|
|
9051
|
+
return Be(() => {
|
|
9052
9052
|
if (!t) {
|
|
9053
9053
|
r(e);
|
|
9054
9054
|
return;
|
|
@@ -9107,7 +9107,7 @@ function bd(e) {
|
|
|
9107
9107
|
const u = c[1], d = /Issue\(([\s\S]*?)\)(?:,|$)/g;
|
|
9108
9108
|
let h = null;
|
|
9109
9109
|
for (; (h = d.exec(u)) !== null; ) {
|
|
9110
|
-
const m = h[1],
|
|
9110
|
+
const m = h[1], v = /title\s*=\s*(['"])([\s\S]*?)\1/.exec(m), x = /description\s*=\s*(['"])([\s\S]*?)\1/.exec(m), g = v ? v[2].trim() : "", p = x ? x[2].trim() : "";
|
|
9111
9111
|
n[i].push({ title: g, description: p });
|
|
9112
9112
|
}
|
|
9113
9113
|
}
|
|
@@ -9165,32 +9165,44 @@ function Hw({
|
|
|
9165
9165
|
onCancelEdit: d,
|
|
9166
9166
|
className: h,
|
|
9167
9167
|
style: m,
|
|
9168
|
-
emptyMessage:
|
|
9169
|
-
followNewMessages:
|
|
9168
|
+
emptyMessage: v,
|
|
9169
|
+
followNewMessages: x = !0
|
|
9170
9170
|
}) {
|
|
9171
|
-
const g = Ye(null), p = Ye(null), w = Ye(!1), b = Ye(!0), y = Ye(e.length), N = Ye(!!
|
|
9172
|
-
|
|
9171
|
+
const g = Ye(null), p = Ye(null), w = Ye(!1), b = Ye(!0), y = Ye(e.length), N = Ye(!!x), S = t ? b.current ? "smooth" : !1 : "smooth";
|
|
9172
|
+
Be(() => {
|
|
9173
9173
|
console.log("[MessageList] Messages updated:", {
|
|
9174
9174
|
count: e.length,
|
|
9175
9175
|
firstThree: e.slice(0, 3).map((R) => `${R.role}:${R.id.slice(0, 8)}`),
|
|
9176
9176
|
lastThree: e.slice(-3).map((R) => `${R.role}:${R.id.slice(0, 8)}`)
|
|
9177
9177
|
});
|
|
9178
|
-
}, [e]),
|
|
9178
|
+
}, [e]), Be(() => {
|
|
9179
9179
|
const R = g.current;
|
|
9180
9180
|
if (!R) return;
|
|
9181
9181
|
let I = !1;
|
|
9182
|
-
const
|
|
9182
|
+
const k = () => {
|
|
9183
9183
|
I || (window.requestAnimationFrame(() => {
|
|
9184
9184
|
const H = R.scrollHeight - R.scrollTop - R.clientHeight <= 32;
|
|
9185
9185
|
N.current && !H && (N.current = !1), b.current = H, I = !1;
|
|
9186
9186
|
}), I = !0);
|
|
9187
9187
|
};
|
|
9188
|
-
return R.addEventListener("scroll",
|
|
9189
|
-
R.removeEventListener("scroll",
|
|
9188
|
+
return R.addEventListener("scroll", k, { passive: !0 }), k(), () => {
|
|
9189
|
+
R.removeEventListener("scroll", k);
|
|
9190
9190
|
};
|
|
9191
|
-
}, []),
|
|
9191
|
+
}, []), Be(() => {
|
|
9192
|
+
const R = y.current, I = e.length;
|
|
9193
|
+
if (I > R) {
|
|
9194
|
+
const k = e[I - 1];
|
|
9195
|
+
k && k.role === "user" && requestAnimationFrame(() => {
|
|
9196
|
+
var M;
|
|
9197
|
+
try {
|
|
9198
|
+
(M = p.current) == null || M.scrollToIndex({ index: Math.max(0, e.length - 1), behavior: "auto", align: "end" }), b.current = !0, N.current = !!x;
|
|
9199
|
+
} catch {
|
|
9200
|
+
}
|
|
9201
|
+
});
|
|
9202
|
+
}
|
|
9203
|
+
}, [e.length, x]), Be(() => {
|
|
9192
9204
|
e.length < y.current && (b.current = !0), y.current = e.length;
|
|
9193
|
-
}, [e.length]),
|
|
9205
|
+
}, [e.length]), Be(() => {
|
|
9194
9206
|
var R;
|
|
9195
9207
|
t || w.current || b.current && ((R = p.current) == null || R.scrollToIndex({
|
|
9196
9208
|
index: Math.max(0, e.length - 1),
|
|
@@ -9207,7 +9219,7 @@ function Hw({
|
|
|
9207
9219
|
await (a == null ? void 0 : a());
|
|
9208
9220
|
return;
|
|
9209
9221
|
}
|
|
9210
|
-
const I = R.scrollHeight,
|
|
9222
|
+
const I = R.scrollHeight, k = R.scrollTop;
|
|
9211
9223
|
w.current = !0;
|
|
9212
9224
|
try {
|
|
9213
9225
|
await a();
|
|
@@ -9219,7 +9231,7 @@ function Hw({
|
|
|
9219
9231
|
return;
|
|
9220
9232
|
}
|
|
9221
9233
|
const H = M.scrollHeight;
|
|
9222
|
-
M.scrollTop =
|
|
9234
|
+
M.scrollTop = k + (H - I);
|
|
9223
9235
|
const U = H - M.scrollTop - M.clientHeight;
|
|
9224
9236
|
b.current = U <= 32, w.current = !1;
|
|
9225
9237
|
});
|
|
@@ -9228,12 +9240,12 @@ function Hw({
|
|
|
9228
9240
|
}, [a]), C = (R, I) => {
|
|
9229
9241
|
g.current = R, I && (typeof I == "function" ? I(R) : I.current = R);
|
|
9230
9242
|
};
|
|
9231
|
-
return
|
|
9243
|
+
return Be(() => {
|
|
9232
9244
|
if (!t) {
|
|
9233
|
-
N.current = !!
|
|
9245
|
+
N.current = !!x;
|
|
9234
9246
|
return;
|
|
9235
9247
|
}
|
|
9236
|
-
|
|
9248
|
+
x && requestAnimationFrame(() => {
|
|
9237
9249
|
var R;
|
|
9238
9250
|
if (b.current)
|
|
9239
9251
|
try {
|
|
@@ -9241,7 +9253,7 @@ function Hw({
|
|
|
9241
9253
|
} catch {
|
|
9242
9254
|
}
|
|
9243
9255
|
});
|
|
9244
|
-
}, [t, n]), e.length === 0 ? /* @__PURE__ */ l.jsx("div", { className: h, style: m, children: /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children:
|
|
9256
|
+
}, [t, n]), e.length === 0 ? /* @__PURE__ */ l.jsx("div", { className: h, style: m, children: /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: v || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ l.jsx("div", { className: h, style: m, children: /* @__PURE__ */ l.jsx(
|
|
9245
9257
|
bv,
|
|
9246
9258
|
{
|
|
9247
9259
|
ref: (R) => {
|
|
@@ -9265,7 +9277,7 @@ function Hw({
|
|
|
9265
9277
|
"div",
|
|
9266
9278
|
{
|
|
9267
9279
|
...R,
|
|
9268
|
-
ref: (
|
|
9280
|
+
ref: (k) => C(k, I),
|
|
9269
9281
|
style: {
|
|
9270
9282
|
overflowAnchor: "none",
|
|
9271
9283
|
willChange: t ? "scroll-position" : "transform",
|
|
@@ -9368,14 +9380,14 @@ function ma(e) {
|
|
|
9368
9380
|
}
|
|
9369
9381
|
);
|
|
9370
9382
|
u.displayName = a;
|
|
9371
|
-
const d = e + "CollectionItemSlot", h = "data-radix-collection-item", m = Xn(d),
|
|
9383
|
+
const d = e + "CollectionItemSlot", h = "data-radix-collection-item", m = Xn(d), v = V.forwardRef(
|
|
9372
9384
|
(g, p) => {
|
|
9373
9385
|
const { scope: w, children: b, ...y } = g, N = V.useRef(null), S = Te(p, N), T = s(d, w);
|
|
9374
9386
|
return V.useEffect(() => (T.itemMap.set(N, { ref: N, ...y }), () => void T.itemMap.delete(N))), /* @__PURE__ */ l.jsx(m, { [h]: "", ref: S, children: b });
|
|
9375
9387
|
}
|
|
9376
9388
|
);
|
|
9377
|
-
|
|
9378
|
-
function
|
|
9389
|
+
v.displayName = d;
|
|
9390
|
+
function x(g) {
|
|
9379
9391
|
const p = s(e + "CollectionConsumer", g);
|
|
9380
9392
|
return V.useCallback(() => {
|
|
9381
9393
|
const b = p.collectionRef.current;
|
|
@@ -9387,8 +9399,8 @@ function ma(e) {
|
|
|
9387
9399
|
}, [p.collectionRef, p.itemMap]);
|
|
9388
9400
|
}
|
|
9389
9401
|
return [
|
|
9390
|
-
{ Provider: i, Slot: u, ItemSlot:
|
|
9391
|
-
|
|
9402
|
+
{ Provider: i, Slot: u, ItemSlot: v },
|
|
9403
|
+
x,
|
|
9392
9404
|
r
|
|
9393
9405
|
];
|
|
9394
9406
|
}
|
|
@@ -9509,47 +9521,47 @@ function sc(e, t, n) {
|
|
|
9509
9521
|
floating: o
|
|
9510
9522
|
} = e;
|
|
9511
9523
|
const s = qt(t), i = va(t), a = xa(i), c = on(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, h = r.y + r.height / 2 - o.height / 2, m = r[a] / 2 - o[a] / 2;
|
|
9512
|
-
let
|
|
9524
|
+
let v;
|
|
9513
9525
|
switch (c) {
|
|
9514
9526
|
case "top":
|
|
9515
|
-
|
|
9527
|
+
v = {
|
|
9516
9528
|
x: d,
|
|
9517
9529
|
y: r.y - o.height
|
|
9518
9530
|
};
|
|
9519
9531
|
break;
|
|
9520
9532
|
case "bottom":
|
|
9521
|
-
|
|
9533
|
+
v = {
|
|
9522
9534
|
x: d,
|
|
9523
9535
|
y: r.y + r.height
|
|
9524
9536
|
};
|
|
9525
9537
|
break;
|
|
9526
9538
|
case "right":
|
|
9527
|
-
|
|
9539
|
+
v = {
|
|
9528
9540
|
x: r.x + r.width,
|
|
9529
9541
|
y: h
|
|
9530
9542
|
};
|
|
9531
9543
|
break;
|
|
9532
9544
|
case "left":
|
|
9533
|
-
|
|
9545
|
+
v = {
|
|
9534
9546
|
x: r.x - o.width,
|
|
9535
9547
|
y: h
|
|
9536
9548
|
};
|
|
9537
9549
|
break;
|
|
9538
9550
|
default:
|
|
9539
|
-
|
|
9551
|
+
v = {
|
|
9540
9552
|
x: r.x,
|
|
9541
9553
|
y: r.y
|
|
9542
9554
|
};
|
|
9543
9555
|
}
|
|
9544
9556
|
switch (ir(t)) {
|
|
9545
9557
|
case "start":
|
|
9546
|
-
|
|
9558
|
+
v[i] -= m * (n && u ? -1 : 1);
|
|
9547
9559
|
break;
|
|
9548
9560
|
case "end":
|
|
9549
|
-
|
|
9561
|
+
v[i] += m * (n && u ? -1 : 1);
|
|
9550
9562
|
break;
|
|
9551
9563
|
}
|
|
9552
|
-
return
|
|
9564
|
+
return v;
|
|
9553
9565
|
}
|
|
9554
9566
|
const ry = async (e, t, n) => {
|
|
9555
9567
|
const {
|
|
@@ -9565,7 +9577,7 @@ const ry = async (e, t, n) => {
|
|
|
9565
9577
|
}), {
|
|
9566
9578
|
x: d,
|
|
9567
9579
|
y: h
|
|
9568
|
-
} = sc(u, r, c), m = r,
|
|
9580
|
+
} = sc(u, r, c), m = r, v = {}, x = 0;
|
|
9569
9581
|
for (let g = 0; g < a.length; g++) {
|
|
9570
9582
|
const {
|
|
9571
9583
|
name: p,
|
|
@@ -9581,7 +9593,7 @@ const ry = async (e, t, n) => {
|
|
|
9581
9593
|
initialPlacement: r,
|
|
9582
9594
|
placement: m,
|
|
9583
9595
|
strategy: o,
|
|
9584
|
-
middlewareData:
|
|
9596
|
+
middlewareData: v,
|
|
9585
9597
|
rects: u,
|
|
9586
9598
|
platform: i,
|
|
9587
9599
|
elements: {
|
|
@@ -9589,13 +9601,13 @@ const ry = async (e, t, n) => {
|
|
|
9589
9601
|
floating: t
|
|
9590
9602
|
}
|
|
9591
9603
|
});
|
|
9592
|
-
d = b ?? d, h = y ?? h,
|
|
9593
|
-
...
|
|
9604
|
+
d = b ?? d, h = y ?? h, v = {
|
|
9605
|
+
...v,
|
|
9594
9606
|
[p]: {
|
|
9595
|
-
...
|
|
9607
|
+
...v[p],
|
|
9596
9608
|
...N
|
|
9597
9609
|
}
|
|
9598
|
-
}, S &&
|
|
9610
|
+
}, S && x <= 50 && (x++, typeof S == "object" && (S.placement && (m = S.placement), S.rects && (u = S.rects === !0 ? await i.getElementRects({
|
|
9599
9611
|
reference: e,
|
|
9600
9612
|
floating: t,
|
|
9601
9613
|
strategy: o
|
|
@@ -9609,7 +9621,7 @@ const ry = async (e, t, n) => {
|
|
|
9609
9621
|
y: h,
|
|
9610
9622
|
placement: m,
|
|
9611
9623
|
strategy: o,
|
|
9612
|
-
middlewareData:
|
|
9624
|
+
middlewareData: v
|
|
9613
9625
|
};
|
|
9614
9626
|
};
|
|
9615
9627
|
async function Or(e, t) {
|
|
@@ -9627,8 +9639,8 @@ async function Or(e, t) {
|
|
|
9627
9639
|
rootBoundary: d = "viewport",
|
|
9628
9640
|
elementContext: h = "floating",
|
|
9629
9641
|
altBoundary: m = !1,
|
|
9630
|
-
padding:
|
|
9631
|
-
} = rn(t, e),
|
|
9642
|
+
padding: v = 0
|
|
9643
|
+
} = rn(t, e), x = wd(v), p = a[m ? h === "floating" ? "reference" : "floating" : h], w = Ho(await s.getClippingRect({
|
|
9632
9644
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(p))) == null || n ? p : p.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
|
|
9633
9645
|
boundary: u,
|
|
9634
9646
|
rootBoundary: d,
|
|
@@ -9651,10 +9663,10 @@ async function Or(e, t) {
|
|
|
9651
9663
|
strategy: c
|
|
9652
9664
|
}) : b);
|
|
9653
9665
|
return {
|
|
9654
|
-
top: (w.top - S.top +
|
|
9655
|
-
bottom: (S.bottom - w.bottom +
|
|
9656
|
-
left: (w.left - S.left +
|
|
9657
|
-
right: (S.right - w.right +
|
|
9666
|
+
top: (w.top - S.top + x.top) / N.y,
|
|
9667
|
+
bottom: (S.bottom - w.bottom + x.bottom) / N.y,
|
|
9668
|
+
left: (w.left - S.left + x.left) / N.x,
|
|
9669
|
+
right: (S.right - w.right + x.right) / N.x
|
|
9658
9670
|
};
|
|
9659
9671
|
}
|
|
9660
9672
|
const oy = (e) => ({
|
|
@@ -9678,14 +9690,14 @@ const oy = (e) => ({
|
|
|
9678
9690
|
const h = wd(d), m = {
|
|
9679
9691
|
x: n,
|
|
9680
9692
|
y: r
|
|
9681
|
-
},
|
|
9693
|
+
}, v = va(o), x = xa(v), g = await i.getDimensions(u), p = v === "y", w = p ? "top" : "left", b = p ? "bottom" : "right", y = p ? "clientHeight" : "clientWidth", N = s.reference[x] + s.reference[v] - m[v] - s.floating[x], S = m[v] - s.reference[v], T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
9682
9694
|
let C = T ? T[y] : 0;
|
|
9683
|
-
(!C || !await (i.isElement == null ? void 0 : i.isElement(T))) && (C = a.floating[y] || s.floating[
|
|
9684
|
-
const R = N / 2 - S / 2, I = C / 2 - g[
|
|
9695
|
+
(!C || !await (i.isElement == null ? void 0 : i.isElement(T))) && (C = a.floating[y] || s.floating[x]);
|
|
9696
|
+
const R = N / 2 - S / 2, I = C / 2 - g[x] / 2 - 1, k = pn(h[w], I), M = pn(h[b], I), H = k, U = C - g[x] - M, j = C / 2 - g[x] / 2 + R, $ = Ti(H, j, U), L = !c.arrow && ir(o) != null && j !== $ && s.reference[x] / 2 - (j < H ? k : M) - g[x] / 2 < 0, Q = L ? j < H ? j - H : j - U : 0;
|
|
9685
9697
|
return {
|
|
9686
|
-
[
|
|
9698
|
+
[v]: m[v] + Q,
|
|
9687
9699
|
data: {
|
|
9688
|
-
[
|
|
9700
|
+
[v]: $,
|
|
9689
9701
|
centerOffset: j - $ - Q,
|
|
9690
9702
|
...L && {
|
|
9691
9703
|
alignmentOffset: Q
|
|
@@ -9711,22 +9723,22 @@ const oy = (e) => ({
|
|
|
9711
9723
|
mainAxis: d = !0,
|
|
9712
9724
|
crossAxis: h = !0,
|
|
9713
9725
|
fallbackPlacements: m,
|
|
9714
|
-
fallbackStrategy:
|
|
9715
|
-
fallbackAxisSideDirection:
|
|
9726
|
+
fallbackStrategy: v = "bestFit",
|
|
9727
|
+
fallbackAxisSideDirection: x = "none",
|
|
9716
9728
|
flipAlignment: g = !0,
|
|
9717
9729
|
...p
|
|
9718
9730
|
} = rn(e, t);
|
|
9719
9731
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
9720
9732
|
return {};
|
|
9721
|
-
const w = on(o), b = qt(a), y = on(a) === a, N = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = m || (y || !g ? [$o(a)] : Jw(a)), T =
|
|
9722
|
-
!m && T && S.push(...ty(a, g,
|
|
9733
|
+
const w = on(o), b = qt(a), y = on(a) === a, N = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = m || (y || !g ? [$o(a)] : Jw(a)), T = x !== "none";
|
|
9734
|
+
!m && T && S.push(...ty(a, g, x, N));
|
|
9723
9735
|
const C = [a, ...S], R = await Or(t, p), I = [];
|
|
9724
|
-
let
|
|
9736
|
+
let k = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
9725
9737
|
if (d && I.push(R[w]), h) {
|
|
9726
9738
|
const j = Xw(o, i, N);
|
|
9727
9739
|
I.push(R[j[0]], R[j[1]]);
|
|
9728
9740
|
}
|
|
9729
|
-
if (
|
|
9741
|
+
if (k = [...k, {
|
|
9730
9742
|
placement: o,
|
|
9731
9743
|
overflows: I
|
|
9732
9744
|
}], !I.every((j) => j <= 0)) {
|
|
@@ -9734,22 +9746,22 @@ const oy = (e) => ({
|
|
|
9734
9746
|
const j = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, $ = C[j];
|
|
9735
9747
|
if ($ && (!(h === "alignment" ? b !== qt($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
9736
9748
|
// overflows the main axis.
|
|
9737
|
-
|
|
9749
|
+
k.every((O) => qt(O.placement) === b ? O.overflows[0] > 0 : !0)))
|
|
9738
9750
|
return {
|
|
9739
9751
|
data: {
|
|
9740
9752
|
index: j,
|
|
9741
|
-
overflows:
|
|
9753
|
+
overflows: k
|
|
9742
9754
|
},
|
|
9743
9755
|
reset: {
|
|
9744
9756
|
placement: $
|
|
9745
9757
|
}
|
|
9746
9758
|
};
|
|
9747
|
-
let L = (H =
|
|
9759
|
+
let L = (H = k.filter((Q) => Q.overflows[0] <= 0).sort((Q, O) => Q.overflows[1] - O.overflows[1])[0]) == null ? void 0 : H.placement;
|
|
9748
9760
|
if (!L)
|
|
9749
|
-
switch (
|
|
9761
|
+
switch (v) {
|
|
9750
9762
|
case "bestFit": {
|
|
9751
9763
|
var U;
|
|
9752
|
-
const Q = (U =
|
|
9764
|
+
const Q = (U = k.filter((O) => {
|
|
9753
9765
|
if (T) {
|
|
9754
9766
|
const _ = qt(O.placement);
|
|
9755
9767
|
return _ === b || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -9837,8 +9849,8 @@ async function ay(e, t) {
|
|
|
9837
9849
|
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = on(n), a = ir(n), c = qt(n) === "y", u = yd.has(i) ? -1 : 1, d = s && c ? -1 : 1, h = rn(t, e);
|
|
9838
9850
|
let {
|
|
9839
9851
|
mainAxis: m,
|
|
9840
|
-
crossAxis:
|
|
9841
|
-
alignmentAxis:
|
|
9852
|
+
crossAxis: v,
|
|
9853
|
+
alignmentAxis: x
|
|
9842
9854
|
} = typeof h == "number" ? {
|
|
9843
9855
|
mainAxis: h,
|
|
9844
9856
|
crossAxis: 0,
|
|
@@ -9848,12 +9860,12 @@ async function ay(e, t) {
|
|
|
9848
9860
|
crossAxis: h.crossAxis || 0,
|
|
9849
9861
|
alignmentAxis: h.alignmentAxis
|
|
9850
9862
|
};
|
|
9851
|
-
return a && typeof
|
|
9852
|
-
x:
|
|
9863
|
+
return a && typeof x == "number" && (v = a === "end" ? x * -1 : x), c ? {
|
|
9864
|
+
x: v * d,
|
|
9853
9865
|
y: m * u
|
|
9854
9866
|
} : {
|
|
9855
9867
|
x: m * u,
|
|
9856
|
-
y:
|
|
9868
|
+
y: v * d
|
|
9857
9869
|
};
|
|
9858
9870
|
}
|
|
9859
9871
|
const ly = function(e) {
|
|
@@ -9907,19 +9919,19 @@ const ly = function(e) {
|
|
|
9907
9919
|
x: n,
|
|
9908
9920
|
y: r
|
|
9909
9921
|
}, d = await Or(t, c), h = qt(on(o)), m = ga(h);
|
|
9910
|
-
let
|
|
9922
|
+
let v = u[m], x = u[h];
|
|
9911
9923
|
if (s) {
|
|
9912
|
-
const p = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", b =
|
|
9913
|
-
|
|
9924
|
+
const p = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", b = v + d[p], y = v - d[w];
|
|
9925
|
+
v = Ti(b, v, y);
|
|
9914
9926
|
}
|
|
9915
9927
|
if (i) {
|
|
9916
|
-
const p = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", b =
|
|
9917
|
-
|
|
9928
|
+
const p = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", b = x + d[p], y = x - d[w];
|
|
9929
|
+
x = Ti(b, x, y);
|
|
9918
9930
|
}
|
|
9919
9931
|
const g = a.fn({
|
|
9920
9932
|
...t,
|
|
9921
|
-
[m]:
|
|
9922
|
-
[h]:
|
|
9933
|
+
[m]: v,
|
|
9934
|
+
[h]: x
|
|
9923
9935
|
});
|
|
9924
9936
|
return {
|
|
9925
9937
|
...g,
|
|
@@ -9952,7 +9964,7 @@ const ly = function(e) {
|
|
|
9952
9964
|
x: n,
|
|
9953
9965
|
y: r
|
|
9954
9966
|
}, h = qt(o), m = ga(h);
|
|
9955
|
-
let
|
|
9967
|
+
let v = d[m], x = d[h];
|
|
9956
9968
|
const g = rn(a, t), p = typeof g == "number" ? {
|
|
9957
9969
|
mainAxis: g,
|
|
9958
9970
|
crossAxis: 0
|
|
@@ -9963,16 +9975,16 @@ const ly = function(e) {
|
|
|
9963
9975
|
};
|
|
9964
9976
|
if (c) {
|
|
9965
9977
|
const y = m === "y" ? "height" : "width", N = s.reference[m] - s.floating[y] + p.mainAxis, S = s.reference[m] + s.reference[y] - p.mainAxis;
|
|
9966
|
-
|
|
9978
|
+
v < N ? v = N : v > S && (v = S);
|
|
9967
9979
|
}
|
|
9968
9980
|
if (u) {
|
|
9969
9981
|
var w, b;
|
|
9970
9982
|
const y = m === "y" ? "width" : "height", N = yd.has(on(o)), S = s.reference[h] - s.floating[y] + (N && ((w = i.offset) == null ? void 0 : w[h]) || 0) + (N ? 0 : p.crossAxis), T = s.reference[h] + s.reference[y] + (N ? 0 : ((b = i.offset) == null ? void 0 : b[h]) || 0) - (N ? p.crossAxis : 0);
|
|
9971
|
-
|
|
9983
|
+
x < S ? x = S : x > T && (x = T);
|
|
9972
9984
|
}
|
|
9973
9985
|
return {
|
|
9974
|
-
[m]:
|
|
9975
|
-
[h]:
|
|
9986
|
+
[m]: v,
|
|
9987
|
+
[h]: x
|
|
9976
9988
|
};
|
|
9977
9989
|
}
|
|
9978
9990
|
};
|
|
@@ -9991,17 +10003,17 @@ const ly = function(e) {
|
|
|
9991
10003
|
apply: c = () => {
|
|
9992
10004
|
},
|
|
9993
10005
|
...u
|
|
9994
|
-
} = rn(e, t), d = await Or(t, u), h = on(o), m = ir(o),
|
|
9995
|
-
width:
|
|
10006
|
+
} = rn(e, t), d = await Or(t, u), h = on(o), m = ir(o), v = qt(o) === "y", {
|
|
10007
|
+
width: x,
|
|
9996
10008
|
height: g
|
|
9997
10009
|
} = s.floating;
|
|
9998
10010
|
let p, w;
|
|
9999
10011
|
h === "top" || h === "bottom" ? (p = h, w = m === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (w = h, p = m === "end" ? "top" : "bottom");
|
|
10000
|
-
const b = g - d.top - d.bottom, y =
|
|
10012
|
+
const b = g - d.top - d.bottom, y = x - d.left - d.right, N = pn(g - d[p], b), S = pn(x - d[w], y), T = !t.middlewareData.shift;
|
|
10001
10013
|
let C = N, R = S;
|
|
10002
10014
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = b), T && !m) {
|
|
10003
|
-
const
|
|
10004
|
-
|
|
10015
|
+
const k = yt(d.left, 0), M = yt(d.right, 0), H = yt(d.top, 0), U = yt(d.bottom, 0);
|
|
10016
|
+
v ? R = x - 2 * (k !== 0 || M !== 0 ? k + M : yt(d.left, d.right)) : C = g - 2 * (H !== 0 || U !== 0 ? H + U : yt(d.top, d.bottom));
|
|
10005
10017
|
}
|
|
10006
10018
|
await c({
|
|
10007
10019
|
...t,
|
|
@@ -10009,7 +10021,7 @@ const ly = function(e) {
|
|
|
10009
10021
|
availableHeight: C
|
|
10010
10022
|
});
|
|
10011
10023
|
const I = await i.getDimensions(a.floating);
|
|
10012
|
-
return
|
|
10024
|
+
return x !== I.width || g !== I.height ? {
|
|
10013
10025
|
reset: {
|
|
10014
10026
|
rects: !0
|
|
10015
10027
|
}
|
|
@@ -10178,11 +10190,11 @@ function kn(e, t, n, r) {
|
|
|
10178
10190
|
const a = Sy(s, n, r) ? Rd(s) : Xt(0);
|
|
10179
10191
|
let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, h = o.height / i.y;
|
|
10180
10192
|
if (s) {
|
|
10181
|
-
const m = Tt(s),
|
|
10182
|
-
let
|
|
10183
|
-
for (; g && r &&
|
|
10193
|
+
const m = Tt(s), v = r && Bt(r) ? Tt(r) : r;
|
|
10194
|
+
let x = m, g = Ei(x);
|
|
10195
|
+
for (; g && r && v !== x; ) {
|
|
10184
10196
|
const p = Yn(g), w = g.getBoundingClientRect(), b = $t(g), y = w.left + (g.clientLeft + parseFloat(b.paddingLeft)) * p.x, N = w.top + (g.clientTop + parseFloat(b.paddingTop)) * p.y;
|
|
10185
|
-
c *= p.x, u *= p.y, d *= p.x, h *= p.y, c += y, u += N,
|
|
10197
|
+
c *= p.x, u *= p.y, d *= p.x, h *= p.y, c += y, u += N, x = Tt(g), g = Ei(x);
|
|
10186
10198
|
}
|
|
10187
10199
|
}
|
|
10188
10200
|
return Ho({
|
|
@@ -10219,8 +10231,8 @@ function Cy(e) {
|
|
|
10219
10231
|
}, u = Xt(1);
|
|
10220
10232
|
const d = Xt(0), h = Jt(r);
|
|
10221
10233
|
if ((h || !h && !s) && ((ar(r) !== "body" || qr(i)) && (c = vs(r)), Jt(r))) {
|
|
10222
|
-
const
|
|
10223
|
-
u = Yn(r), d.x =
|
|
10234
|
+
const v = kn(r);
|
|
10235
|
+
u = Yn(r), d.x = v.x + r.clientLeft, d.y = v.y + r.clientTop;
|
|
10224
10236
|
}
|
|
10225
10237
|
const m = i && !h && !s ? Ed(i, c) : Xt(0);
|
|
10226
10238
|
return {
|
|
@@ -10255,8 +10267,8 @@ function Ey(e, t) {
|
|
|
10255
10267
|
}
|
|
10256
10268
|
const u = bs(r);
|
|
10257
10269
|
if (u <= 0) {
|
|
10258
|
-
const d = r.ownerDocument, h = d.body, m = getComputedStyle(h),
|
|
10259
|
-
|
|
10270
|
+
const d = r.ownerDocument, h = d.body, m = getComputedStyle(h), v = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, x = Math.abs(r.clientWidth - h.clientWidth - v);
|
|
10271
|
+
x <= cc && (s -= x);
|
|
10260
10272
|
} else u <= cc && (s += u);
|
|
10261
10273
|
return {
|
|
10262
10274
|
width: s,
|
|
@@ -10351,8 +10363,8 @@ function Py(e, t, n) {
|
|
|
10351
10363
|
}
|
|
10352
10364
|
if (r || !r && !s)
|
|
10353
10365
|
if ((ar(t) !== "body" || qr(o)) && (a = vs(t)), r) {
|
|
10354
|
-
const
|
|
10355
|
-
c.x =
|
|
10366
|
+
const v = kn(t, !0, s, t);
|
|
10367
|
+
c.x = v.x + t.clientLeft, c.y = v.y + t.clientTop;
|
|
10356
10368
|
} else o && u();
|
|
10357
10369
|
s && !r && o && u();
|
|
10358
10370
|
const d = o && !r && !s ? Ed(o, a) : Xt(0), h = i.left + a.scrollLeft - c.x - d.x, m = i.top + a.scrollTop - c.y - d.y;
|
|
@@ -10435,12 +10447,12 @@ function Dy(e, t) {
|
|
|
10435
10447
|
left: d,
|
|
10436
10448
|
top: h,
|
|
10437
10449
|
width: m,
|
|
10438
|
-
height:
|
|
10450
|
+
height: v
|
|
10439
10451
|
} = u;
|
|
10440
|
-
if (a || t(), !m || !
|
|
10452
|
+
if (a || t(), !m || !v)
|
|
10441
10453
|
return;
|
|
10442
|
-
const
|
|
10443
|
-
rootMargin: -
|
|
10454
|
+
const x = co(h), g = co(o.clientWidth - (d + m)), p = co(o.clientHeight - (h + v)), w = co(d), y = {
|
|
10455
|
+
rootMargin: -x + "px " + -g + "px " + -p + "px " + -w + "px",
|
|
10444
10456
|
threshold: yt(0, pn(1, c)) || 1
|
|
10445
10457
|
};
|
|
10446
10458
|
let N = !0;
|
|
@@ -10483,25 +10495,25 @@ function Ly(e, t, n, r) {
|
|
|
10483
10495
|
}), s && w.addEventListener("resize", n);
|
|
10484
10496
|
});
|
|
10485
10497
|
const h = u && a ? Dy(u, n) : null;
|
|
10486
|
-
let m = -1,
|
|
10487
|
-
i && (
|
|
10498
|
+
let m = -1, v = null;
|
|
10499
|
+
i && (v = new ResizeObserver((w) => {
|
|
10488
10500
|
let [b] = w;
|
|
10489
|
-
b && b.target === u &&
|
|
10501
|
+
b && b.target === u && v && (v.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
10490
10502
|
var y;
|
|
10491
|
-
(y =
|
|
10503
|
+
(y = v) == null || y.observe(t);
|
|
10492
10504
|
})), n();
|
|
10493
|
-
}), u && !c &&
|
|
10494
|
-
let
|
|
10505
|
+
}), u && !c && v.observe(u), v.observe(t));
|
|
10506
|
+
let x, g = c ? kn(e) : null;
|
|
10495
10507
|
c && p();
|
|
10496
10508
|
function p() {
|
|
10497
10509
|
const w = kn(e);
|
|
10498
|
-
g && !jd(g, w) && n(), g = w,
|
|
10510
|
+
g && !jd(g, w) && n(), g = w, x = requestAnimationFrame(p);
|
|
10499
10511
|
}
|
|
10500
10512
|
return n(), () => {
|
|
10501
10513
|
var w;
|
|
10502
10514
|
d.forEach((b) => {
|
|
10503
10515
|
o && b.removeEventListener("scroll", n), s && b.removeEventListener("resize", n);
|
|
10504
|
-
}), h == null || h(), (w =
|
|
10516
|
+
}), h == null || h(), (w = v) == null || w.disconnect(), v = null, c && cancelAnimationFrame(x);
|
|
10505
10517
|
};
|
|
10506
10518
|
}
|
|
10507
10519
|
const Fy = ly, By = cy, $y = sy, Hy = dy, zy = iy, fc = oy, Uy = uy, Wy = (e, t, n) => {
|
|
@@ -10583,13 +10595,13 @@ function Ky(e) {
|
|
|
10583
10595
|
placement: t,
|
|
10584
10596
|
middlewareData: {},
|
|
10585
10597
|
isPositioned: !1
|
|
10586
|
-
}), [m,
|
|
10587
|
-
zo(m, r) ||
|
|
10588
|
-
const [
|
|
10598
|
+
}), [m, v] = f.useState(r);
|
|
10599
|
+
zo(m, r) || v(r);
|
|
10600
|
+
const [x, g] = f.useState(null), [p, w] = f.useState(null), b = f.useCallback((O) => {
|
|
10589
10601
|
O !== T.current && (T.current = O, g(O));
|
|
10590
10602
|
}, []), y = f.useCallback((O) => {
|
|
10591
10603
|
O !== C.current && (C.current = O, w(O));
|
|
10592
|
-
}, []), N = s ||
|
|
10604
|
+
}, []), N = s || x, S = i || p, T = f.useRef(null), C = f.useRef(null), R = f.useRef(d), I = c != null, k = ni(c), M = ni(o), H = ni(u), U = f.useCallback(() => {
|
|
10593
10605
|
if (!T.current || !C.current)
|
|
10594
10606
|
return;
|
|
10595
10607
|
const O = {
|
|
@@ -10622,11 +10634,11 @@ function Ky(e) {
|
|
|
10622
10634
|
j.current = !1;
|
|
10623
10635
|
}), []), Ro(() => {
|
|
10624
10636
|
if (N && (T.current = N), S && (C.current = S), N && S) {
|
|
10625
|
-
if (
|
|
10626
|
-
return
|
|
10637
|
+
if (k.current)
|
|
10638
|
+
return k.current(N, S, U);
|
|
10627
10639
|
U();
|
|
10628
10640
|
}
|
|
10629
|
-
}, [N, S, U,
|
|
10641
|
+
}, [N, S, U, k, I]);
|
|
10630
10642
|
const $ = f.useMemo(() => ({
|
|
10631
10643
|
reference: T,
|
|
10632
10644
|
floating: C,
|
|
@@ -10776,11 +10788,11 @@ var Ca = "PopperContent", [s0, i0] = _d(Ca), Fd = f.forwardRef(
|
|
|
10776
10788
|
collisionPadding: d = 0,
|
|
10777
10789
|
sticky: h = "partial",
|
|
10778
10790
|
hideWhenDetached: m = !1,
|
|
10779
|
-
updatePositionStrategy:
|
|
10780
|
-
onPlaced:
|
|
10791
|
+
updatePositionStrategy: v = "optimized",
|
|
10792
|
+
onPlaced: x,
|
|
10781
10793
|
...g
|
|
10782
|
-
} = e, p = Od(Ca, n), [w, b] = f.useState(null), y = Te(t, (Ae) => b(Ae)), [N, S] = f.useState(null), T = Pd(N), C = (T == null ? void 0 : T.width) ?? 0, R = (T == null ? void 0 : T.height) ?? 0, I = r + (s !== "center" ? "-" + s : ""),
|
|
10783
|
-
padding:
|
|
10794
|
+
} = e, p = Od(Ca, n), [w, b] = f.useState(null), y = Te(t, (Ae) => b(Ae)), [N, S] = f.useState(null), T = Pd(N), C = (T == null ? void 0 : T.width) ?? 0, R = (T == null ? void 0 : T.height) ?? 0, I = r + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], H = M.length > 0, U = {
|
|
10795
|
+
padding: k,
|
|
10784
10796
|
boundary: M.filter(l0),
|
|
10785
10797
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
10786
10798
|
altBoundary: H
|
|
@@ -10789,7 +10801,7 @@ var Ca = "PopperContent", [s0, i0] = _d(Ca), Fd = f.forwardRef(
|
|
|
10789
10801
|
strategy: "fixed",
|
|
10790
10802
|
placement: I,
|
|
10791
10803
|
whileElementsMounted: (...Ae) => Ly(...Ae, {
|
|
10792
|
-
animationFrame:
|
|
10804
|
+
animationFrame: v === "always"
|
|
10793
10805
|
}),
|
|
10794
10806
|
elements: {
|
|
10795
10807
|
reference: p.anchor
|
|
@@ -10814,7 +10826,7 @@ var Ca = "PopperContent", [s0, i0] = _d(Ca), Fd = f.forwardRef(
|
|
|
10814
10826
|
c0({ arrowWidth: C, arrowHeight: R }),
|
|
10815
10827
|
m && e0({ strategy: "referenceHidden", ...U })
|
|
10816
10828
|
]
|
|
10817
|
-
}), [_, G] = Hd(L), Z = it(
|
|
10829
|
+
}), [_, G] = Hd(L), Z = it(x);
|
|
10818
10830
|
st(() => {
|
|
10819
10831
|
Q && (Z == null || Z());
|
|
10820
10832
|
}, [Q, Z]);
|
|
@@ -10935,9 +10947,9 @@ var c0 = (e) => ({
|
|
|
10935
10947
|
options: e,
|
|
10936
10948
|
fn(t) {
|
|
10937
10949
|
var p, w, b;
|
|
10938
|
-
const { placement: n, rects: r, middlewareData: o } = t, i = ((p = o.arrow) == null ? void 0 : p.centerOffset) !== 0, a = i ? 0 : e.arrowWidth, c = i ? 0 : e.arrowHeight, [u, d] = Hd(n), h = { start: "0%", center: "50%", end: "100%" }[d], m = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + a / 2,
|
|
10939
|
-
let
|
|
10940
|
-
return u === "bottom" ? (
|
|
10950
|
+
const { placement: n, rects: r, middlewareData: o } = t, i = ((p = o.arrow) == null ? void 0 : p.centerOffset) !== 0, a = i ? 0 : e.arrowWidth, c = i ? 0 : e.arrowHeight, [u, d] = Hd(n), h = { start: "0%", center: "50%", end: "100%" }[d], m = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + a / 2, v = (((b = o.arrow) == null ? void 0 : b.y) ?? 0) + c / 2;
|
|
10951
|
+
let x = "", g = "";
|
|
10952
|
+
return u === "bottom" ? (x = i ? h : `${m}px`, g = `${-c}px`) : u === "top" ? (x = i ? h : `${m}px`, g = `${r.floating.height + c}px`) : u === "right" ? (x = `${-c}px`, g = i ? h : `${v}px`) : u === "left" && (x = `${r.floating.width + c}px`, g = i ? h : `${v}px`), { data: { x, y: g } };
|
|
10941
10953
|
}
|
|
10942
10954
|
});
|
|
10943
10955
|
function Hd(e) {
|
|
@@ -10963,7 +10975,7 @@ var m0 = f.forwardRef((e, t) => {
|
|
|
10963
10975
|
onEntryFocus: u,
|
|
10964
10976
|
preventScrollOnEntryFocus: d = !1,
|
|
10965
10977
|
...h
|
|
10966
|
-
} = e, m = f.useRef(null),
|
|
10978
|
+
} = e, m = f.useRef(null), v = Te(t, m), x = ms(s), [g, p] = hn({
|
|
10967
10979
|
prop: i,
|
|
10968
10980
|
defaultProp: a ?? null,
|
|
10969
10981
|
onChange: c,
|
|
@@ -10978,7 +10990,7 @@ var m0 = f.forwardRef((e, t) => {
|
|
|
10978
10990
|
{
|
|
10979
10991
|
scope: n,
|
|
10980
10992
|
orientation: r,
|
|
10981
|
-
dir:
|
|
10993
|
+
dir: x,
|
|
10982
10994
|
loop: o,
|
|
10983
10995
|
currentTabStopId: g,
|
|
10984
10996
|
onItemFocus: f.useCallback(
|
|
@@ -11000,7 +11012,7 @@ var m0 = f.forwardRef((e, t) => {
|
|
|
11000
11012
|
tabIndex: w || T === 0 ? -1 : 0,
|
|
11001
11013
|
"data-orientation": r,
|
|
11002
11014
|
...h,
|
|
11003
|
-
ref:
|
|
11015
|
+
ref: v,
|
|
11004
11016
|
style: { outline: "none", ...e.style },
|
|
11005
11017
|
onMouseDown: ee(e.onMouseDown, () => {
|
|
11006
11018
|
S.current = !0;
|
|
@@ -11008,8 +11020,8 @@ var m0 = f.forwardRef((e, t) => {
|
|
|
11008
11020
|
onFocus: ee(e.onFocus, (R) => {
|
|
11009
11021
|
const I = !S.current;
|
|
11010
11022
|
if (R.target === R.currentTarget && I && !w) {
|
|
11011
|
-
const
|
|
11012
|
-
if (R.currentTarget.dispatchEvent(
|
|
11023
|
+
const k = new CustomEvent(ri, u0);
|
|
11024
|
+
if (R.currentTarget.dispatchEvent(k), !k.defaultPrevented) {
|
|
11013
11025
|
const M = N().filter((L) => L.focusable), H = M.find((L) => L.active), U = M.find((L) => L.id === g), $ = [H, U, ...M].filter(
|
|
11014
11026
|
Boolean
|
|
11015
11027
|
).map((L) => L.ref.current);
|
|
@@ -11032,11 +11044,11 @@ var m0 = f.forwardRef((e, t) => {
|
|
|
11032
11044
|
tabStopId: s,
|
|
11033
11045
|
children: i,
|
|
11034
11046
|
...a
|
|
11035
|
-
} = e, c = Lt(), u = s || c, d = p0(Vd, n), h = d.currentTabStopId === u, m = zd(n), { onFocusableItemAdd:
|
|
11047
|
+
} = e, c = Lt(), u = s || c, d = p0(Vd, n), h = d.currentTabStopId === u, m = zd(n), { onFocusableItemAdd: v, onFocusableItemRemove: x, currentTabStopId: g } = d;
|
|
11036
11048
|
return f.useEffect(() => {
|
|
11037
11049
|
if (r)
|
|
11038
|
-
return
|
|
11039
|
-
}, [r,
|
|
11050
|
+
return v(), () => x();
|
|
11051
|
+
}, [r, v, x]), /* @__PURE__ */ l.jsx(
|
|
11040
11052
|
Ni.ItemSlot,
|
|
11041
11053
|
{
|
|
11042
11054
|
scope: n,
|
|
@@ -11121,11 +11133,11 @@ var w0 = Wd, y0 = Gd, Ii = ["Enter", " "], S0 = ["ArrowDown", "PageUp", "Home"],
|
|
|
11121
11133
|
]), ws = lr(), Xd = Ud(), [I0, Dn] = Mn(Jr), [j0, Zr] = Mn(Jr), Jd = (e) => {
|
|
11122
11134
|
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = ws(t), [c, u] = f.useState(null), d = f.useRef(!1), h = it(s), m = ms(o);
|
|
11123
11135
|
return f.useEffect(() => {
|
|
11124
|
-
const
|
|
11125
|
-
d.current = !0, document.addEventListener("pointerdown",
|
|
11126
|
-
},
|
|
11127
|
-
return document.addEventListener("keydown",
|
|
11128
|
-
document.removeEventListener("keydown",
|
|
11136
|
+
const v = () => {
|
|
11137
|
+
d.current = !0, document.addEventListener("pointerdown", x, { capture: !0, once: !0 }), document.addEventListener("pointermove", x, { capture: !0, once: !0 });
|
|
11138
|
+
}, x = () => d.current = !1;
|
|
11139
|
+
return document.addEventListener("keydown", v, { capture: !0 }), () => {
|
|
11140
|
+
document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", x, { capture: !0 }), document.removeEventListener("pointermove", x, { capture: !0 });
|
|
11129
11141
|
};
|
|
11130
11142
|
}, []), /* @__PURE__ */ l.jsx(Ta, { ...a, children: /* @__PURE__ */ l.jsx(
|
|
11131
11143
|
I0,
|
|
@@ -11219,14 +11231,14 @@ var At = "MenuContent", [P0, ka] = Mn(At), ef = f.forwardRef(
|
|
|
11219
11231
|
onPointerDownOutside: d,
|
|
11220
11232
|
onFocusOutside: h,
|
|
11221
11233
|
onInteractOutside: m,
|
|
11222
|
-
onDismiss:
|
|
11223
|
-
disableOutsideScroll:
|
|
11234
|
+
onDismiss: v,
|
|
11235
|
+
disableOutsideScroll: x,
|
|
11224
11236
|
...g
|
|
11225
|
-
} = e, p = Dn(At, n), w = Zr(At, n), b = ws(n), y = Xd(n), N = E0(n), [S, T] = f.useState(null), C = f.useRef(null), R = Te(t, C, p.onContentChange), I = f.useRef(0),
|
|
11237
|
+
} = e, p = Dn(At, n), w = Zr(At, n), b = ws(n), y = Xd(n), N = E0(n), [S, T] = f.useState(null), C = f.useRef(null), R = Te(t, C, p.onContentChange), I = f.useRef(0), k = f.useRef(""), M = f.useRef(0), H = f.useRef(null), U = f.useRef("right"), j = f.useRef(0), $ = x ? us : f.Fragment, L = x ? { as: M0, allowPinchZoom: !0 } : void 0, Q = (_) => {
|
|
11226
11238
|
var K, P;
|
|
11227
|
-
const G =
|
|
11239
|
+
const G = k.current + _, Z = N().filter((X) => !X.disabled), q = document.activeElement, F = (K = Z.find((X) => X.ref.current === q)) == null ? void 0 : K.textValue, Y = Z.map((X) => X.textValue), ye = K0(Y, G, F), ce = (P = Z.find((X) => X.textValue === ye)) == null ? void 0 : P.ref.current;
|
|
11228
11240
|
(function X(te) {
|
|
11229
|
-
|
|
11241
|
+
k.current = te, window.clearTimeout(I.current), te !== "" && (I.current = window.setTimeout(() => X(""), 1e3));
|
|
11230
11242
|
})(G), ce && setTimeout(() => ce.focus());
|
|
11231
11243
|
};
|
|
11232
11244
|
f.useEffect(() => () => window.clearTimeout(I.current), []), ua();
|
|
@@ -11238,7 +11250,7 @@ var At = "MenuContent", [P0, ka] = Mn(At), ef = f.forwardRef(
|
|
|
11238
11250
|
P0,
|
|
11239
11251
|
{
|
|
11240
11252
|
scope: n,
|
|
11241
|
-
searchRef:
|
|
11253
|
+
searchRef: k,
|
|
11242
11254
|
onItemEnter: f.useCallback(
|
|
11243
11255
|
(_) => {
|
|
11244
11256
|
O(_) && _.preventDefault();
|
|
@@ -11281,7 +11293,7 @@ var At = "MenuContent", [P0, ka] = Mn(At), ef = f.forwardRef(
|
|
|
11281
11293
|
onPointerDownOutside: d,
|
|
11282
11294
|
onFocusOutside: h,
|
|
11283
11295
|
onInteractOutside: m,
|
|
11284
|
-
onDismiss:
|
|
11296
|
+
onDismiss: v,
|
|
11285
11297
|
children: /* @__PURE__ */ l.jsx(
|
|
11286
11298
|
w0,
|
|
11287
11299
|
{
|
|
@@ -11318,7 +11330,7 @@ var At = "MenuContent", [P0, ka] = Mn(At), ef = f.forwardRef(
|
|
|
11318
11330
|
Yd.includes(_.key) && ce.reverse(), V0(ce);
|
|
11319
11331
|
}),
|
|
11320
11332
|
onBlur: ee(e.onBlur, (_) => {
|
|
11321
|
-
_.currentTarget.contains(_.target) || (window.clearTimeout(I.current),
|
|
11333
|
+
_.currentTarget.contains(_.target) || (window.clearTimeout(I.current), k.current = "");
|
|
11322
11334
|
}),
|
|
11323
11335
|
onPointerMove: ee(
|
|
11324
11336
|
e.onPointerMove,
|
|
@@ -11363,7 +11375,7 @@ var Uo = "MenuItem", pc = "menu.itemSelect", ys = f.forwardRef(
|
|
|
11363
11375
|
const h = s.current;
|
|
11364
11376
|
if (!n && h) {
|
|
11365
11377
|
const m = new CustomEvent(pc, { bubbles: !0, cancelable: !0 });
|
|
11366
|
-
h.addEventListener(pc, (
|
|
11378
|
+
h.addEventListener(pc, (v) => r == null ? void 0 : r(v), { once: !0 }), Au(h, m), m.defaultPrevented ? u.current = !1 : i.onClose();
|
|
11367
11379
|
}
|
|
11368
11380
|
};
|
|
11369
11381
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -11392,10 +11404,10 @@ var Uo = "MenuItem", pc = "menu.itemSelect", ys = f.forwardRef(
|
|
|
11392
11404
|
ys.displayName = Uo;
|
|
11393
11405
|
var nf = f.forwardRef(
|
|
11394
11406
|
(e, t) => {
|
|
11395
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = ka(Uo, n), a = Xd(n), c = f.useRef(null), u = Te(t, c), [d, h] = f.useState(!1), [m,
|
|
11407
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = ka(Uo, n), a = Xd(n), c = f.useRef(null), u = Te(t, c), [d, h] = f.useState(!1), [m, v] = f.useState("");
|
|
11396
11408
|
return f.useEffect(() => {
|
|
11397
|
-
const
|
|
11398
|
-
|
|
11409
|
+
const x = c.current;
|
|
11410
|
+
x && v((x.textContent ?? "").trim());
|
|
11399
11411
|
}, [s.children]), /* @__PURE__ */ l.jsx(
|
|
11400
11412
|
Dr.ItemSlot,
|
|
11401
11413
|
{
|
|
@@ -11413,13 +11425,13 @@ var nf = f.forwardRef(
|
|
|
11413
11425
|
ref: u,
|
|
11414
11426
|
onPointerMove: ee(
|
|
11415
11427
|
e.onPointerMove,
|
|
11416
|
-
Lr((
|
|
11417
|
-
r ? i.onItemLeave(
|
|
11428
|
+
Lr((x) => {
|
|
11429
|
+
r ? i.onItemLeave(x) : (i.onItemEnter(x), x.defaultPrevented || x.currentTarget.focus({ preventScroll: !0 }));
|
|
11418
11430
|
})
|
|
11419
11431
|
),
|
|
11420
11432
|
onPointerLeave: ee(
|
|
11421
11433
|
e.onPointerLeave,
|
|
11422
|
-
Lr((
|
|
11434
|
+
Lr((x) => i.onItemLeave(x))
|
|
11423
11435
|
),
|
|
11424
11436
|
onFocus: ee(e.onFocus, () => h(!0)),
|
|
11425
11437
|
onBlur: ee(e.onBlur, () => h(!1))
|
|
@@ -11564,11 +11576,11 @@ var W0 = "MenuSub", [fR, hf] = Mn(W0), yr = "MenuSubTrigger", pf = f.forwardRef(
|
|
|
11564
11576
|
onPointerLeave: ee(
|
|
11565
11577
|
e.onPointerLeave,
|
|
11566
11578
|
Lr((h) => {
|
|
11567
|
-
var
|
|
11579
|
+
var v, x;
|
|
11568
11580
|
d();
|
|
11569
|
-
const m = (
|
|
11581
|
+
const m = (v = n.content) == null ? void 0 : v.getBoundingClientRect();
|
|
11570
11582
|
if (m) {
|
|
11571
|
-
const g = (
|
|
11583
|
+
const g = (x = n.content) == null ? void 0 : x.dataset.side, p = g === "right", w = p ? -5 : 5, b = m[p ? "left" : "right"], y = m[p ? "right" : "left"];
|
|
11572
11584
|
s.onPointerGraceIntentChange({
|
|
11573
11585
|
area: [
|
|
11574
11586
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
@@ -11591,9 +11603,9 @@ var W0 = "MenuSub", [fR, hf] = Mn(W0), yr = "MenuSubTrigger", pf = f.forwardRef(
|
|
|
11591
11603
|
})
|
|
11592
11604
|
),
|
|
11593
11605
|
onKeyDown: ee(e.onKeyDown, (h) => {
|
|
11594
|
-
var
|
|
11606
|
+
var v;
|
|
11595
11607
|
const m = s.searchRef.current !== "";
|
|
11596
|
-
e.disabled || m && h.key === " " || T0[r.dir].includes(h.key) && (n.onOpenChange(!0), (
|
|
11608
|
+
e.disabled || m && h.key === " " || T0[r.dir].includes(h.key) && (n.onOpenChange(!0), (v = n.content) == null || v.focus(), h.preventDefault());
|
|
11597
11609
|
})
|
|
11598
11610
|
}
|
|
11599
11611
|
) });
|
|
@@ -11627,9 +11639,9 @@ var mf = "MenuSubContent", gf = f.forwardRef(
|
|
|
11627
11639
|
i.onClose(), d.preventDefault();
|
|
11628
11640
|
}),
|
|
11629
11641
|
onKeyDown: ee(e.onKeyDown, (d) => {
|
|
11630
|
-
var
|
|
11642
|
+
var v;
|
|
11631
11643
|
const h = d.currentTarget.contains(d.target), m = R0[i.dir].includes(d.key);
|
|
11632
|
-
h && m && (s.onOpenChange(!1), (
|
|
11644
|
+
h && m && (s.onOpenChange(!1), (v = a.trigger) == null || v.focus(), d.preventDefault());
|
|
11633
11645
|
})
|
|
11634
11646
|
}
|
|
11635
11647
|
) }) }) });
|
|
@@ -11980,10 +11992,10 @@ function Eo({
|
|
|
11980
11992
|
customStyles: d = {},
|
|
11981
11993
|
onMessageSent: h,
|
|
11982
11994
|
onExcelUploadSuccess: m,
|
|
11983
|
-
onError:
|
|
11995
|
+
onError: v
|
|
11984
11996
|
}) {
|
|
11985
11997
|
const {
|
|
11986
|
-
currentThreadId:
|
|
11998
|
+
currentThreadId: x,
|
|
11987
11999
|
messages: g,
|
|
11988
12000
|
isStreaming: p,
|
|
11989
12001
|
streamingAssistantId: w,
|
|
@@ -11995,30 +12007,30 @@ function Eo({
|
|
|
11995
12007
|
listCheckpoints: C,
|
|
11996
12008
|
navigateToCheckpoint: R,
|
|
11997
12009
|
returnToLatest: I,
|
|
11998
|
-
hasMoreHistory:
|
|
12010
|
+
hasMoreHistory: k,
|
|
11999
12011
|
isLoadingHistory: M,
|
|
12000
12012
|
loadOlderMessages: H,
|
|
12001
12013
|
api: U
|
|
12002
12014
|
} = Vi(), [j, $] = fe(null), [L, Q] = fe(""), [O, _] = fe(null), [G, Z] = fe([]), [q, F] = fe(!1), [Y, ye] = fe(null), [ce, K] = fe(null), [P, X] = fe(!1), [te, ue] = fe(null), [se, Ae] = fe([]), [Pe, De] = fe(null), [de, je] = fe(null), xe = Ye(null), Se = Ye(null), rt = Ye(null), [J, ae] = fe("desktop");
|
|
12003
|
-
|
|
12015
|
+
Be(() => {
|
|
12004
12016
|
const oe = () => {
|
|
12005
12017
|
const ie = window.innerWidth;
|
|
12006
12018
|
ae(ie < 640 ? "phone" : ie < 1024 ? "tablet" : "desktop");
|
|
12007
12019
|
};
|
|
12008
12020
|
return oe(), window.addEventListener("resize", oe), () => window.removeEventListener("resize", oe);
|
|
12009
|
-
}, []),
|
|
12021
|
+
}, []), Be(() => {
|
|
12010
12022
|
let oe = !1;
|
|
12011
|
-
if (!
|
|
12023
|
+
if (!x) {
|
|
12012
12024
|
Ae([]), De(null), je(null), rt.current = null;
|
|
12013
12025
|
return;
|
|
12014
12026
|
}
|
|
12015
12027
|
const ie = {
|
|
12016
|
-
threadId:
|
|
12028
|
+
threadId: x,
|
|
12017
12029
|
checkpointId: S ?? null,
|
|
12018
12030
|
checkpointNs: T ?? null
|
|
12019
12031
|
}, Ne = rt.current;
|
|
12020
12032
|
if (!(Ne && Ne.threadId === ie.threadId && Ne.checkpointId === ie.checkpointId && Ne.checkpointNs === ie.checkpointNs))
|
|
12021
|
-
return C(
|
|
12033
|
+
return C(x).then((Ue) => {
|
|
12022
12034
|
var pr;
|
|
12023
12035
|
if (oe) return;
|
|
12024
12036
|
const an = ((Ue == null ? void 0 : Ue.checkpoints) ?? []).slice().sort((Wt, mr) => new Date(mr.createdAt).getTime() - new Date(Wt.createdAt).getTime());
|
|
@@ -12035,18 +12047,18 @@ function Eo({
|
|
|
12035
12047
|
}), () => {
|
|
12036
12048
|
oe = !0;
|
|
12037
12049
|
};
|
|
12038
|
-
}, [
|
|
12050
|
+
}, [x, S, T, Pe, C]), Be(() => {
|
|
12039
12051
|
S && (De(S), je(T ?? null));
|
|
12040
12052
|
}, [S, T]);
|
|
12041
12053
|
const Le = Ke(async () => {
|
|
12042
|
-
if (!(!
|
|
12054
|
+
if (!(!k || M))
|
|
12043
12055
|
try {
|
|
12044
12056
|
await H();
|
|
12045
12057
|
} catch (oe) {
|
|
12046
12058
|
console.warn("loadOlderMessages failed", oe);
|
|
12047
12059
|
}
|
|
12048
|
-
}, [
|
|
12049
|
-
|
|
12060
|
+
}, [k, M, H]);
|
|
12061
|
+
Be(() => {
|
|
12050
12062
|
(async () => {
|
|
12051
12063
|
try {
|
|
12052
12064
|
const ie = await U.getAgent("default");
|
|
@@ -12055,9 +12067,9 @@ function Eo({
|
|
|
12055
12067
|
console.warn("Failed to fetch default message:", ie), ue(null);
|
|
12056
12068
|
}
|
|
12057
12069
|
})();
|
|
12058
|
-
}, [U]),
|
|
12059
|
-
b && !P && (
|
|
12060
|
-
}, [b, P,
|
|
12070
|
+
}, [U]), Be(() => {
|
|
12071
|
+
b && !P && (v == null || v(b));
|
|
12072
|
+
}, [b, P, v]);
|
|
12061
12073
|
const Ve = (oe) => {
|
|
12062
12074
|
if (oe.length > To)
|
|
12063
12075
|
return `Message too long (${oe.length}/${To} characters)`;
|
|
@@ -12093,7 +12105,7 @@ function Eo({
|
|
|
12093
12105
|
}), h == null || h(ie), _(null), Z([]), $(null), Q("");
|
|
12094
12106
|
} catch (Ne) {
|
|
12095
12107
|
const Ue = (Ne == null ? void 0 : Ne.message) || "Failed to send message";
|
|
12096
|
-
_(Ue),
|
|
12108
|
+
_(Ue), v == null || v(Ue);
|
|
12097
12109
|
}
|
|
12098
12110
|
}
|
|
12099
12111
|
}, dt = V.useCallback((oe, ie) => {
|
|
@@ -12129,7 +12141,7 @@ function Eo({
|
|
|
12129
12141
|
K(Ne);
|
|
12130
12142
|
} catch (Ne) {
|
|
12131
12143
|
const Ue = Ne instanceof Error ? Ne.message : "Failed to upload Excel file";
|
|
12132
|
-
console.error("Excel upload failed", Ne), ye(Ue),
|
|
12144
|
+
console.error("Excel upload failed", Ne), ye(Ue), v == null || v(Ue);
|
|
12133
12145
|
} finally {
|
|
12134
12146
|
F(!1), oe.target.value = "";
|
|
12135
12147
|
}
|
|
@@ -12139,7 +12151,7 @@ function Eo({
|
|
|
12139
12151
|
const ie = Date.parse(oe);
|
|
12140
12152
|
return Number.isNaN(ie) ? oe : new Date(ie).toLocaleString();
|
|
12141
12153
|
}, Ln = async (oe) => {
|
|
12142
|
-
if (!
|
|
12154
|
+
if (!x) return;
|
|
12143
12155
|
if (!oe) {
|
|
12144
12156
|
await I(), De(null), je(null);
|
|
12145
12157
|
return;
|
|
@@ -12162,7 +12174,7 @@ function Eo({
|
|
|
12162
12174
|
}
|
|
12163
12175
|
)
|
|
12164
12176
|
] }),
|
|
12165
|
-
|
|
12177
|
+
x && se.length > 0 && /* @__PURE__ */ l.jsxs("div", { className: "flex-shrink-0 flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/60 text-xs dark:bg-muted/50", children: [
|
|
12166
12178
|
/* @__PURE__ */ l.jsx("span", { className: "opacity-70", children: "Checkpoint:" }),
|
|
12167
12179
|
/* @__PURE__ */ l.jsxs(
|
|
12168
12180
|
"select",
|
|
@@ -12357,21 +12369,21 @@ var Ma = "ScrollArea", [Uf, pR] = zt(Ma), [$S, _t] = Uf(Ma), Wf = f.forwardRef(
|
|
|
12357
12369
|
dir: o,
|
|
12358
12370
|
scrollHideDelay: s = 600,
|
|
12359
12371
|
...i
|
|
12360
|
-
} = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, m] = f.useState(null), [
|
|
12372
|
+
} = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, m] = f.useState(null), [v, x] = f.useState(null), [g, p] = f.useState(null), [w, b] = f.useState(0), [y, N] = f.useState(0), [S, T] = f.useState(!1), [C, R] = f.useState(!1), I = Te(t, (M) => c(M)), k = ms(o);
|
|
12361
12373
|
return /* @__PURE__ */ l.jsx(
|
|
12362
12374
|
$S,
|
|
12363
12375
|
{
|
|
12364
12376
|
scope: n,
|
|
12365
12377
|
type: r,
|
|
12366
|
-
dir:
|
|
12378
|
+
dir: k,
|
|
12367
12379
|
scrollHideDelay: s,
|
|
12368
12380
|
scrollArea: a,
|
|
12369
12381
|
viewport: u,
|
|
12370
12382
|
onViewportChange: d,
|
|
12371
12383
|
content: h,
|
|
12372
12384
|
onContentChange: m,
|
|
12373
|
-
scrollbarX:
|
|
12374
|
-
onScrollbarXChange:
|
|
12385
|
+
scrollbarX: v,
|
|
12386
|
+
onScrollbarXChange: x,
|
|
12375
12387
|
scrollbarXEnabled: S,
|
|
12376
12388
|
onScrollbarXEnabledChange: T,
|
|
12377
12389
|
scrollbarY: g,
|
|
@@ -12383,7 +12395,7 @@ var Ma = "ScrollArea", [Uf, pR] = zt(Ma), [$S, _t] = Uf(Ma), Wf = f.forwardRef(
|
|
|
12383
12395
|
children: /* @__PURE__ */ l.jsx(
|
|
12384
12396
|
me.div,
|
|
12385
12397
|
{
|
|
12386
|
-
dir:
|
|
12398
|
+
dir: k,
|
|
12387
12399
|
...i,
|
|
12388
12400
|
ref: I,
|
|
12389
12401
|
style: {
|
|
@@ -12503,8 +12515,8 @@ var HS = f.forwardRef((e, t) => {
|
|
|
12503
12515
|
if (u) {
|
|
12504
12516
|
let h = u[d];
|
|
12505
12517
|
const m = () => {
|
|
12506
|
-
const
|
|
12507
|
-
h !==
|
|
12518
|
+
const v = u[d];
|
|
12519
|
+
h !== v && (c("SCROLL"), i()), h = v;
|
|
12508
12520
|
};
|
|
12509
12521
|
return u.addEventListener("scroll", m), () => u.removeEventListener("scroll", m);
|
|
12510
12522
|
}
|
|
@@ -12547,8 +12559,8 @@ var HS = f.forwardRef((e, t) => {
|
|
|
12547
12559
|
onThumbPointerUp: () => i.current = 0,
|
|
12548
12560
|
onThumbPointerDown: (m) => i.current = m
|
|
12549
12561
|
};
|
|
12550
|
-
function h(m,
|
|
12551
|
-
return YS(m, i.current, a,
|
|
12562
|
+
function h(m, v) {
|
|
12563
|
+
return YS(m, i.current, a, v);
|
|
12552
12564
|
}
|
|
12553
12565
|
return n === "horizontal" ? /* @__PURE__ */ l.jsx(
|
|
12554
12566
|
US,
|
|
@@ -12557,8 +12569,8 @@ var HS = f.forwardRef((e, t) => {
|
|
|
12557
12569
|
ref: t,
|
|
12558
12570
|
onThumbPositionChange: () => {
|
|
12559
12571
|
if (o.viewport && s.current) {
|
|
12560
|
-
const m = o.viewport.scrollLeft,
|
|
12561
|
-
s.current.style.transform = `translate3d(${
|
|
12572
|
+
const m = o.viewport.scrollLeft, v = mc(m, a, o.dir);
|
|
12573
|
+
s.current.style.transform = `translate3d(${v}px, 0, 0)`;
|
|
12562
12574
|
}
|
|
12563
12575
|
},
|
|
12564
12576
|
onWheelScroll: (m) => {
|
|
@@ -12575,8 +12587,8 @@ var HS = f.forwardRef((e, t) => {
|
|
|
12575
12587
|
ref: t,
|
|
12576
12588
|
onThumbPositionChange: () => {
|
|
12577
12589
|
if (o.viewport && s.current) {
|
|
12578
|
-
const m = o.viewport.scrollTop,
|
|
12579
|
-
s.current.style.transform = `translate3d(0, ${
|
|
12590
|
+
const m = o.viewport.scrollTop, v = mc(m, a);
|
|
12591
|
+
s.current.style.transform = `translate3d(0, ${v}px, 0)`;
|
|
12580
12592
|
}
|
|
12581
12593
|
},
|
|
12582
12594
|
onWheelScroll: (m) => {
|
|
@@ -12679,24 +12691,24 @@ var HS = f.forwardRef((e, t) => {
|
|
|
12679
12691
|
onWheelScroll: d,
|
|
12680
12692
|
onResize: h,
|
|
12681
12693
|
...m
|
|
12682
|
-
} = e,
|
|
12694
|
+
} = e, v = _t(en, n), [x, g] = f.useState(null), p = Te(t, (I) => g(I)), w = f.useRef(null), b = f.useRef(""), y = v.viewport, N = r.content - r.viewport, S = it(d), T = it(c), C = Ts(h, 10);
|
|
12683
12695
|
function R(I) {
|
|
12684
12696
|
if (w.current) {
|
|
12685
|
-
const
|
|
12686
|
-
u({ x:
|
|
12697
|
+
const k = I.clientX - w.current.left, M = I.clientY - w.current.top;
|
|
12698
|
+
u({ x: k, y: M });
|
|
12687
12699
|
}
|
|
12688
12700
|
}
|
|
12689
12701
|
return f.useEffect(() => {
|
|
12690
|
-
const I = (
|
|
12691
|
-
const M =
|
|
12692
|
-
(
|
|
12702
|
+
const I = (k) => {
|
|
12703
|
+
const M = k.target;
|
|
12704
|
+
(x == null ? void 0 : x.contains(M)) && S(k, N);
|
|
12693
12705
|
};
|
|
12694
12706
|
return document.addEventListener("wheel", I, { passive: !1 }), () => document.removeEventListener("wheel", I, { passive: !1 });
|
|
12695
|
-
}, [y,
|
|
12707
|
+
}, [y, x, N, S]), f.useEffect(T, [r, T]), Qn(x, C), Qn(v.content, C), /* @__PURE__ */ l.jsx(
|
|
12696
12708
|
VS,
|
|
12697
12709
|
{
|
|
12698
12710
|
scope: n,
|
|
12699
|
-
scrollbar:
|
|
12711
|
+
scrollbar: x,
|
|
12700
12712
|
hasThumb: o,
|
|
12701
12713
|
onThumbChange: it(s),
|
|
12702
12714
|
onThumbPointerUp: it(i),
|
|
@@ -12709,12 +12721,12 @@ var HS = f.forwardRef((e, t) => {
|
|
|
12709
12721
|
ref: p,
|
|
12710
12722
|
style: { position: "absolute", ...m.style },
|
|
12711
12723
|
onPointerDown: ee(e.onPointerDown, (I) => {
|
|
12712
|
-
I.button === 0 && (I.target.setPointerCapture(I.pointerId), w.current =
|
|
12724
|
+
I.button === 0 && (I.target.setPointerCapture(I.pointerId), w.current = x.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", v.viewport && (v.viewport.style.scrollBehavior = "auto"), R(I));
|
|
12713
12725
|
}),
|
|
12714
12726
|
onPointerMove: ee(e.onPointerMove, R),
|
|
12715
12727
|
onPointerUp: ee(e.onPointerUp, (I) => {
|
|
12716
|
-
const
|
|
12717
|
-
|
|
12728
|
+
const k = I.target;
|
|
12729
|
+
k.hasPointerCapture(I.pointerId) && k.releasePointerCapture(I.pointerId), document.body.style.webkitUserSelect = b.current, v.viewport && (v.viewport.style.scrollBehavior = ""), w.current = null;
|
|
12718
12730
|
})
|
|
12719
12731
|
}
|
|
12720
12732
|
)
|
|
@@ -12738,8 +12750,8 @@ var HS = f.forwardRef((e, t) => {
|
|
|
12738
12750
|
if (h) {
|
|
12739
12751
|
const m = () => {
|
|
12740
12752
|
if (d(), !u.current) {
|
|
12741
|
-
const
|
|
12742
|
-
u.current =
|
|
12753
|
+
const v = qS(h, a);
|
|
12754
|
+
u.current = v, a();
|
|
12743
12755
|
}
|
|
12744
12756
|
};
|
|
12745
12757
|
return a(), h.addEventListener("scroll", m), () => h.removeEventListener("scroll", m);
|
|
@@ -12756,8 +12768,8 @@ var HS = f.forwardRef((e, t) => {
|
|
|
12756
12768
|
...r
|
|
12757
12769
|
},
|
|
12758
12770
|
onPointerDownCapture: ee(e.onPointerDownCapture, (h) => {
|
|
12759
|
-
const
|
|
12760
|
-
i.onThumbPointerDown({ x
|
|
12771
|
+
const v = h.target.getBoundingClientRect(), x = h.clientX - v.left, g = h.clientY - v.top;
|
|
12772
|
+
i.onThumbPointerDown({ x, y: g });
|
|
12761
12773
|
}),
|
|
12762
12774
|
onPointerUp: ee(e.onPointerUp, i.onThumbPointerUp)
|
|
12763
12775
|
}
|
|
@@ -12903,13 +12915,13 @@ function Ai({
|
|
|
12903
12915
|
const {
|
|
12904
12916
|
loadThread: h,
|
|
12905
12917
|
threads: m,
|
|
12906
|
-
refreshThreads:
|
|
12907
|
-
currentThreadId:
|
|
12918
|
+
refreshThreads: v,
|
|
12919
|
+
currentThreadId: x,
|
|
12908
12920
|
createThread: g,
|
|
12909
12921
|
deleteThread: p,
|
|
12910
12922
|
renameThread: w
|
|
12911
|
-
} = Vi(), [b, y] = fe(m ?? []), [N, S] = fe(!1), [T, C] = fe(null), [R, I] = fe(null), [
|
|
12912
|
-
|
|
12923
|
+
} = Vi(), [b, y] = fe(m ?? []), [N, S] = fe(!1), [T, C] = fe(null), [R, I] = fe(null), [k, M] = fe(""), [H, U] = fe(!1);
|
|
12924
|
+
Be(() => {
|
|
12913
12925
|
y(m ?? []);
|
|
12914
12926
|
}, [m]);
|
|
12915
12927
|
const j = async (F) => {
|
|
@@ -12938,9 +12950,9 @@ function Ai({
|
|
|
12938
12950
|
}, Q = (F, Y) => {
|
|
12939
12951
|
Y.stopPropagation(), I(F.threadId), M(F.title || `Thread ${F.threadId.slice(0, 8)}`);
|
|
12940
12952
|
}, O = async (F) => {
|
|
12941
|
-
if (
|
|
12953
|
+
if (k.trim())
|
|
12942
12954
|
try {
|
|
12943
|
-
await w(F,
|
|
12955
|
+
await w(F, k.trim()), I(null), M("");
|
|
12944
12956
|
} catch (Y) {
|
|
12945
12957
|
console.error("Failed to update title:", Y);
|
|
12946
12958
|
}
|
|
@@ -12982,11 +12994,11 @@ function Ai({
|
|
|
12982
12994
|
"div",
|
|
12983
12995
|
{
|
|
12984
12996
|
onClick: () => j(F.threadId),
|
|
12985
|
-
className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ??
|
|
12997
|
+
className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? x) === F.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
|
|
12986
12998
|
children: [
|
|
12987
12999
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
12988
13000
|
/* @__PURE__ */ l.jsx("div", { className: "flex-1 min-w-0", children: R === F.threadId ? /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2", onClick: (Y) => Y.stopPropagation(), children: [
|
|
12989
|
-
/* @__PURE__ */ l.jsx(Fr, { value:
|
|
13001
|
+
/* @__PURE__ */ l.jsx(Fr, { value: k, onChange: (Y) => M(Y.target.value), onKeyDown: (Y) => G(Y, F.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
12990
13002
|
/* @__PURE__ */ l.jsx(_e, { variant: "ghost", size: "sm", onClick: () => O(F.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ l.jsx(Hi, { size: 12 }) }),
|
|
12991
13003
|
/* @__PURE__ */ l.jsx(_e, { variant: "ghost", size: "sm", onClick: _, className: "h-6 w-6 p-0", children: /* @__PURE__ */ l.jsx(Vn, { size: 12 }) })
|
|
12992
13004
|
] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
@@ -13324,7 +13336,7 @@ var Br = "Tooltip", [pC, Ns] = Rs(Br), bh = (e) => {
|
|
|
13324
13336
|
onOpenChange: s,
|
|
13325
13337
|
disableHoverableContent: i,
|
|
13326
13338
|
delayDuration: a
|
|
13327
|
-
} = e, c = Ha(Br, e.__scopeTooltip), u = Es(t), [d, h] = f.useState(null), m = Lt(),
|
|
13339
|
+
} = e, c = Ha(Br, e.__scopeTooltip), u = Es(t), [d, h] = f.useState(null), m = Lt(), v = f.useRef(0), x = i ?? c.disableHoverableContent, g = a ?? c.delayDuration, p = f.useRef(!1), [w, b] = hn({
|
|
13328
13340
|
prop: r,
|
|
13329
13341
|
defaultProp: o ?? !1,
|
|
13330
13342
|
onChange: (C) => {
|
|
@@ -13332,16 +13344,16 @@ var Br = "Tooltip", [pC, Ns] = Rs(Br), bh = (e) => {
|
|
|
13332
13344
|
},
|
|
13333
13345
|
caller: Br
|
|
13334
13346
|
}), y = f.useMemo(() => w ? p.current ? "delayed-open" : "instant-open" : "closed", [w]), N = f.useCallback(() => {
|
|
13335
|
-
window.clearTimeout(
|
|
13347
|
+
window.clearTimeout(v.current), v.current = 0, p.current = !1, b(!0);
|
|
13336
13348
|
}, [b]), S = f.useCallback(() => {
|
|
13337
|
-
window.clearTimeout(
|
|
13349
|
+
window.clearTimeout(v.current), v.current = 0, b(!1);
|
|
13338
13350
|
}, [b]), T = f.useCallback(() => {
|
|
13339
|
-
window.clearTimeout(
|
|
13340
|
-
p.current = !0, b(!0),
|
|
13351
|
+
window.clearTimeout(v.current), v.current = window.setTimeout(() => {
|
|
13352
|
+
p.current = !0, b(!0), v.current = 0;
|
|
13341
13353
|
}, g);
|
|
13342
13354
|
}, [g, b]);
|
|
13343
13355
|
return f.useEffect(() => () => {
|
|
13344
|
-
|
|
13356
|
+
v.current && (window.clearTimeout(v.current), v.current = 0);
|
|
13345
13357
|
}, []), /* @__PURE__ */ l.jsx(Ta, { ...u, children: /* @__PURE__ */ l.jsx(
|
|
13346
13358
|
pC,
|
|
13347
13359
|
{
|
|
@@ -13355,11 +13367,11 @@ var Br = "Tooltip", [pC, Ns] = Rs(Br), bh = (e) => {
|
|
|
13355
13367
|
c.isOpenDelayedRef.current ? T() : N();
|
|
13356
13368
|
}, [c.isOpenDelayedRef, T, N]),
|
|
13357
13369
|
onTriggerLeave: f.useCallback(() => {
|
|
13358
|
-
|
|
13359
|
-
}, [S,
|
|
13370
|
+
x ? S() : (window.clearTimeout(v.current), v.current = 0);
|
|
13371
|
+
}, [S, x]),
|
|
13360
13372
|
onOpen: N,
|
|
13361
13373
|
onClose: S,
|
|
13362
|
-
disableHoverableContent:
|
|
13374
|
+
disableHoverableContent: x,
|
|
13363
13375
|
children: n
|
|
13364
13376
|
}
|
|
13365
13377
|
) });
|
|
@@ -13404,27 +13416,27 @@ var mC = "TooltipPortal", [wR, gC] = Rs(mC, {
|
|
|
13404
13416
|
), xC = f.forwardRef((e, t) => {
|
|
13405
13417
|
const n = Ns(er, e.__scopeTooltip), r = Ha(er, e.__scopeTooltip), o = f.useRef(null), s = Te(t, o), [i, a] = f.useState(null), { trigger: c, onClose: u } = n, d = o.current, { onPointerInTransitChange: h } = r, m = f.useCallback(() => {
|
|
13406
13418
|
a(null), h(!1);
|
|
13407
|
-
}, [h]),
|
|
13408
|
-
(
|
|
13409
|
-
const p =
|
|
13419
|
+
}, [h]), v = f.useCallback(
|
|
13420
|
+
(x, g) => {
|
|
13421
|
+
const p = x.currentTarget, w = { x: x.clientX, y: x.clientY }, b = SC(w, p.getBoundingClientRect()), y = CC(w, b), N = TC(g.getBoundingClientRect()), S = EC([...y, ...N]);
|
|
13410
13422
|
a(S), h(!0);
|
|
13411
13423
|
},
|
|
13412
13424
|
[h]
|
|
13413
13425
|
);
|
|
13414
13426
|
return f.useEffect(() => () => m(), [m]), f.useEffect(() => {
|
|
13415
13427
|
if (c && d) {
|
|
13416
|
-
const
|
|
13417
|
-
return c.addEventListener("pointerleave",
|
|
13418
|
-
c.removeEventListener("pointerleave",
|
|
13428
|
+
const x = (p) => v(p, d), g = (p) => v(p, c);
|
|
13429
|
+
return c.addEventListener("pointerleave", x), d.addEventListener("pointerleave", g), () => {
|
|
13430
|
+
c.removeEventListener("pointerleave", x), d.removeEventListener("pointerleave", g);
|
|
13419
13431
|
};
|
|
13420
13432
|
}
|
|
13421
|
-
}, [c, d,
|
|
13433
|
+
}, [c, d, v, m]), f.useEffect(() => {
|
|
13422
13434
|
if (i) {
|
|
13423
|
-
const
|
|
13435
|
+
const x = (g) => {
|
|
13424
13436
|
const p = g.target, w = { x: g.clientX, y: g.clientY }, b = (c == null ? void 0 : c.contains(p)) || (d == null ? void 0 : d.contains(p)), y = !RC(w, i);
|
|
13425
13437
|
b ? m() : y && (m(), u());
|
|
13426
13438
|
};
|
|
13427
|
-
return document.addEventListener("pointermove",
|
|
13439
|
+
return document.addEventListener("pointermove", x), () => document.removeEventListener("pointermove", x);
|
|
13428
13440
|
}
|
|
13429
13441
|
}, [c, d, i, u, m]), /* @__PURE__ */ l.jsx(Sh, { ...e, ref: s });
|
|
13430
13442
|
}), [vC, bC] = Rs(Br, { isInside: !1 }), wC = lm("TooltipContent"), Sh = f.forwardRef(
|
|
@@ -13440,8 +13452,8 @@ var mC = "TooltipPortal", [wR, gC] = Rs(mC, {
|
|
|
13440
13452
|
return f.useEffect(() => (document.addEventListener(Pi, d), () => document.removeEventListener(Pi, d)), [d]), f.useEffect(() => {
|
|
13441
13453
|
if (c.trigger) {
|
|
13442
13454
|
const h = (m) => {
|
|
13443
|
-
const
|
|
13444
|
-
|
|
13455
|
+
const v = m.target;
|
|
13456
|
+
v != null && v.contains(c.trigger) && d();
|
|
13445
13457
|
};
|
|
13446
13458
|
return window.addEventListener("scroll", h, { capture: !0 }), () => window.removeEventListener("scroll", h, { capture: !0 });
|
|
13447
13459
|
}
|
|
@@ -13613,30 +13625,30 @@ const Nh = f.forwardRef(
|
|
|
13613
13625
|
children: s,
|
|
13614
13626
|
...i
|
|
13615
13627
|
}, a) => {
|
|
13616
|
-
const c = rC(), [u, d] = f.useState(!1), [h, m] = f.useState(e),
|
|
13628
|
+
const c = rC(), [u, d] = f.useState(!1), [h, m] = f.useState(e), v = t ?? h, x = f.useCallback(
|
|
13617
13629
|
(b) => {
|
|
13618
|
-
const y = typeof b == "function" ? b(
|
|
13630
|
+
const y = typeof b == "function" ? b(v) : b;
|
|
13619
13631
|
n ? n(y) : m(y), document.cookie = `${OC}=${y}; path=/; max-age=${MC}`;
|
|
13620
13632
|
},
|
|
13621
|
-
[n,
|
|
13622
|
-
), g = f.useCallback(() => c ? d((b) => !b) :
|
|
13633
|
+
[n, v]
|
|
13634
|
+
), g = f.useCallback(() => c ? d((b) => !b) : x((b) => !b), [c, x, d]);
|
|
13623
13635
|
f.useEffect(() => {
|
|
13624
13636
|
const b = (y) => {
|
|
13625
13637
|
y.key === BC && (y.metaKey || y.ctrlKey) && (y.preventDefault(), g());
|
|
13626
13638
|
};
|
|
13627
13639
|
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
13628
13640
|
}, [g]);
|
|
13629
|
-
const p =
|
|
13641
|
+
const p = v ? "expanded" : "collapsed", w = f.useMemo(
|
|
13630
13642
|
() => ({
|
|
13631
13643
|
state: p,
|
|
13632
|
-
open:
|
|
13633
|
-
setOpen:
|
|
13644
|
+
open: v,
|
|
13645
|
+
setOpen: x,
|
|
13634
13646
|
isMobile: c,
|
|
13635
13647
|
openMobile: u,
|
|
13636
13648
|
setOpenMobile: d,
|
|
13637
13649
|
toggleSidebar: g
|
|
13638
13650
|
}),
|
|
13639
|
-
[p,
|
|
13651
|
+
[p, v, x, c, u, d, g]
|
|
13640
13652
|
);
|
|
13641
13653
|
return /* @__PURE__ */ l.jsx(Eh.Provider, { value: w, children: /* @__PURE__ */ l.jsx(AC, { delayDuration: 0, children: /* @__PURE__ */ l.jsx(
|
|
13642
13654
|
"div",
|
|
@@ -14175,7 +14187,7 @@ var js = "Switch", [eT, SR] = zt(js), [tT, nT] = eT(js), zh = f.forwardRef(
|
|
|
14175
14187
|
onCheckedChange: u,
|
|
14176
14188
|
form: d,
|
|
14177
14189
|
...h
|
|
14178
|
-
} = e, [m,
|
|
14190
|
+
} = e, [m, v] = f.useState(null), x = Te(t, (y) => v(y)), g = f.useRef(!1), p = m ? d || !!m.closest("form") : !0, [w, b] = hn({
|
|
14179
14191
|
prop: o,
|
|
14180
14192
|
defaultProp: s ?? !1,
|
|
14181
14193
|
onChange: u,
|
|
@@ -14194,7 +14206,7 @@ var js = "Switch", [eT, SR] = zt(js), [tT, nT] = eT(js), zh = f.forwardRef(
|
|
|
14194
14206
|
disabled: a,
|
|
14195
14207
|
value: c,
|
|
14196
14208
|
...h,
|
|
14197
|
-
ref:
|
|
14209
|
+
ref: x,
|
|
14198
14210
|
onClick: ee(e.onClick, (y) => {
|
|
14199
14211
|
b((N) => !N), p && (g.current = y.isPropagationStopped(), g.current || y.stopPropagation());
|
|
14200
14212
|
})
|
|
@@ -14245,13 +14257,13 @@ var rT = "SwitchBubbleInput", Vh = f.forwardRef(
|
|
|
14245
14257
|
return f.useEffect(() => {
|
|
14246
14258
|
const d = i.current;
|
|
14247
14259
|
if (!d) return;
|
|
14248
|
-
const h = window.HTMLInputElement.prototype,
|
|
14260
|
+
const h = window.HTMLInputElement.prototype, v = Object.getOwnPropertyDescriptor(
|
|
14249
14261
|
h,
|
|
14250
14262
|
"checked"
|
|
14251
14263
|
).set;
|
|
14252
|
-
if (c !== n &&
|
|
14253
|
-
const
|
|
14254
|
-
|
|
14264
|
+
if (c !== n && v) {
|
|
14265
|
+
const x = new Event("click", { bubbles: r });
|
|
14266
|
+
v.call(d, n), d.dispatchEvent(x);
|
|
14255
14267
|
}
|
|
14256
14268
|
}, [c, n, r]), /* @__PURE__ */ l.jsx(
|
|
14257
14269
|
"input",
|
|
@@ -14316,23 +14328,23 @@ var sT = [" ", "Enter", "ArrowUp", "ArrowDown"], iT = [" ", "Enter"], An = "Sele
|
|
|
14316
14328
|
name: d,
|
|
14317
14329
|
autoComplete: h,
|
|
14318
14330
|
disabled: m,
|
|
14319
|
-
required:
|
|
14320
|
-
form:
|
|
14331
|
+
required: v,
|
|
14332
|
+
form: x
|
|
14321
14333
|
} = e, g = Ps(t), [p, w] = f.useState(null), [b, y] = f.useState(null), [N, S] = f.useState(!1), T = ms(u), [C, R] = hn({
|
|
14322
14334
|
prop: r,
|
|
14323
14335
|
defaultProp: o ?? !1,
|
|
14324
14336
|
onChange: s,
|
|
14325
14337
|
caller: An
|
|
14326
|
-
}), [I,
|
|
14338
|
+
}), [I, k] = hn({
|
|
14327
14339
|
prop: i,
|
|
14328
14340
|
defaultProp: a,
|
|
14329
14341
|
onChange: c,
|
|
14330
14342
|
caller: An
|
|
14331
|
-
}), M = f.useRef(null), H = p ?
|
|
14343
|
+
}), M = f.useRef(null), H = p ? x || !!p.closest("form") : !0, [U, j] = f.useState(/* @__PURE__ */ new Set()), $ = Array.from(U).map((L) => L.props.value).join(";");
|
|
14332
14344
|
return /* @__PURE__ */ l.jsx(Ta, { ...g, children: /* @__PURE__ */ l.jsxs(
|
|
14333
14345
|
lT,
|
|
14334
14346
|
{
|
|
14335
|
-
required:
|
|
14347
|
+
required: v,
|
|
14336
14348
|
scope: t,
|
|
14337
14349
|
trigger: p,
|
|
14338
14350
|
onTriggerChange: w,
|
|
@@ -14342,7 +14354,7 @@ var sT = [" ", "Enter", "ArrowUp", "ArrowDown"], iT = [" ", "Enter"], An = "Sele
|
|
|
14342
14354
|
onValueNodeHasChildrenChange: S,
|
|
14343
14355
|
contentId: Lt(),
|
|
14344
14356
|
value: I,
|
|
14345
|
-
onValueChange:
|
|
14357
|
+
onValueChange: k,
|
|
14346
14358
|
open: C,
|
|
14347
14359
|
onOpenChange: R,
|
|
14348
14360
|
dir: T,
|
|
@@ -14369,14 +14381,14 @@ var sT = [" ", "Enter", "ArrowUp", "ArrowDown"], iT = [" ", "Enter"], An = "Sele
|
|
|
14369
14381
|
vp,
|
|
14370
14382
|
{
|
|
14371
14383
|
"aria-hidden": !0,
|
|
14372
|
-
required:
|
|
14384
|
+
required: v,
|
|
14373
14385
|
tabIndex: -1,
|
|
14374
14386
|
name: d,
|
|
14375
14387
|
autoComplete: h,
|
|
14376
14388
|
value: I,
|
|
14377
|
-
onChange: (L) =>
|
|
14389
|
+
onChange: (L) => k(L.target.value),
|
|
14378
14390
|
disabled: m,
|
|
14379
|
-
form:
|
|
14391
|
+
form: x,
|
|
14380
14392
|
children: [
|
|
14381
14393
|
I === void 0 ? /* @__PURE__ */ l.jsx("option", { value: "" }) : null,
|
|
14382
14394
|
Array.from(U)
|
|
@@ -14391,11 +14403,11 @@ var sT = [" ", "Enter", "ArrowUp", "ArrowDown"], iT = [" ", "Enter"], An = "Sele
|
|
|
14391
14403
|
Yh.displayName = An;
|
|
14392
14404
|
var qh = "SelectTrigger", Xh = f.forwardRef(
|
|
14393
14405
|
(e, t) => {
|
|
14394
|
-
const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = Ps(n), i = bn(qh, n), a = i.disabled || r, c = Te(t, i.onTriggerChange), u = As(n), d = f.useRef("touch"), [h, m,
|
|
14406
|
+
const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = Ps(n), i = bn(qh, n), a = i.disabled || r, c = Te(t, i.onTriggerChange), u = As(n), d = f.useRef("touch"), [h, m, v] = wp((g) => {
|
|
14395
14407
|
const p = u().filter((y) => !y.disabled), w = p.find((y) => y.value === i.value), b = yp(p, g, w);
|
|
14396
14408
|
b !== void 0 && i.onValueChange(b.value);
|
|
14397
|
-
}),
|
|
14398
|
-
a || (i.onOpenChange(!0),
|
|
14409
|
+
}), x = (g) => {
|
|
14410
|
+
a || (i.onOpenChange(!0), v()), g && (i.triggerPointerDownPosRef.current = {
|
|
14399
14411
|
x: Math.round(g.pageX),
|
|
14400
14412
|
y: Math.round(g.pageY)
|
|
14401
14413
|
});
|
|
@@ -14417,16 +14429,16 @@ var qh = "SelectTrigger", Xh = f.forwardRef(
|
|
|
14417
14429
|
...o,
|
|
14418
14430
|
ref: c,
|
|
14419
14431
|
onClick: ee(o.onClick, (g) => {
|
|
14420
|
-
g.currentTarget.focus(), d.current !== "mouse" &&
|
|
14432
|
+
g.currentTarget.focus(), d.current !== "mouse" && x(g);
|
|
14421
14433
|
}),
|
|
14422
14434
|
onPointerDown: ee(o.onPointerDown, (g) => {
|
|
14423
14435
|
d.current = g.pointerType;
|
|
14424
14436
|
const p = g.target;
|
|
14425
|
-
p.hasPointerCapture(g.pointerId) && p.releasePointerCapture(g.pointerId), g.button === 0 && g.ctrlKey === !1 && g.pointerType === "mouse" && (
|
|
14437
|
+
p.hasPointerCapture(g.pointerId) && p.releasePointerCapture(g.pointerId), g.button === 0 && g.ctrlKey === !1 && g.pointerType === "mouse" && (x(g), g.preventDefault());
|
|
14426
14438
|
}),
|
|
14427
14439
|
onKeyDown: ee(o.onKeyDown, (g) => {
|
|
14428
14440
|
const p = h.current !== "";
|
|
14429
|
-
!(g.ctrlKey || g.altKey || g.metaKey) && g.key.length === 1 && m(g.key), !(p && g.key === " ") && sT.includes(g.key) && (
|
|
14441
|
+
!(g.ctrlKey || g.altKey || g.metaKey) && g.key.length === 1 && m(g.key), !(p && g.key === " ") && sT.includes(g.key) && (x(), g.preventDefault());
|
|
14430
14442
|
})
|
|
14431
14443
|
}
|
|
14432
14444
|
) });
|
|
@@ -14491,13 +14503,13 @@ var Mt = 10, [np, wn] = cr(Pn), hT = "SelectContentImpl", pT = Xn("SelectContent
|
|
|
14491
14503
|
alignOffset: d,
|
|
14492
14504
|
arrowPadding: h,
|
|
14493
14505
|
collisionBoundary: m,
|
|
14494
|
-
collisionPadding:
|
|
14495
|
-
sticky:
|
|
14506
|
+
collisionPadding: v,
|
|
14507
|
+
sticky: x,
|
|
14496
14508
|
hideWhenDetached: g,
|
|
14497
14509
|
avoidCollisions: p,
|
|
14498
14510
|
//
|
|
14499
14511
|
...w
|
|
14500
|
-
} = e, b = bn(Pn, n), [y, N] = f.useState(null), [S, T] = f.useState(null), C = Te(t, (K) => N(K)), [R, I] = f.useState(null), [
|
|
14512
|
+
} = e, b = bn(Pn, n), [y, N] = f.useState(null), [S, T] = f.useState(null), C = Te(t, (K) => N(K)), [R, I] = f.useState(null), [k, M] = f.useState(
|
|
14501
14513
|
null
|
|
14502
14514
|
), H = As(n), [U, j] = f.useState(!1), $ = f.useRef(!1);
|
|
14503
14515
|
f.useEffect(() => {
|
|
@@ -14562,8 +14574,8 @@ var Mt = 10, [np, wn] = cr(Pn), hT = "SelectContentImpl", pT = Xn("SelectContent
|
|
|
14562
14574
|
alignOffset: d,
|
|
14563
14575
|
arrowPadding: h,
|
|
14564
14576
|
collisionBoundary: m,
|
|
14565
|
-
collisionPadding:
|
|
14566
|
-
sticky:
|
|
14577
|
+
collisionPadding: v,
|
|
14578
|
+
sticky: x,
|
|
14567
14579
|
hideWhenDetached: g,
|
|
14568
14580
|
avoidCollisions: p
|
|
14569
14581
|
} : {};
|
|
@@ -14579,7 +14591,7 @@ var Mt = 10, [np, wn] = cr(Pn), hT = "SelectContentImpl", pT = Xn("SelectContent
|
|
|
14579
14591
|
onItemLeave: F,
|
|
14580
14592
|
itemTextRefCallback: Y,
|
|
14581
14593
|
focusSelectedItem: Q,
|
|
14582
|
-
selectedItemText:
|
|
14594
|
+
selectedItemText: k,
|
|
14583
14595
|
position: r,
|
|
14584
14596
|
isPositioned: U,
|
|
14585
14597
|
searchRef: G,
|
|
@@ -14647,11 +14659,11 @@ var Mt = 10, [np, wn] = cr(Pn), hT = "SelectContentImpl", pT = Xn("SelectContent
|
|
|
14647
14659
|
);
|
|
14648
14660
|
rp.displayName = hT;
|
|
14649
14661
|
var mT = "SelectItemAlignedPosition", op = f.forwardRef((e, t) => {
|
|
14650
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = bn(Pn, n), i = wn(Pn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Te(t, (C) => d(C)), m = As(n),
|
|
14662
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = bn(Pn, n), i = wn(Pn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Te(t, (C) => d(C)), m = As(n), v = f.useRef(!1), x = f.useRef(!0), { viewport: g, selectedItem: p, selectedItemText: w, focusSelectedItem: b } = i, y = f.useCallback(() => {
|
|
14651
14663
|
if (s.trigger && s.valueNode && a && u && g && p && w) {
|
|
14652
|
-
const C = s.trigger.getBoundingClientRect(), R = u.getBoundingClientRect(), I = s.valueNode.getBoundingClientRect(),
|
|
14664
|
+
const C = s.trigger.getBoundingClientRect(), R = u.getBoundingClientRect(), I = s.valueNode.getBoundingClientRect(), k = w.getBoundingClientRect();
|
|
14653
14665
|
if (s.dir !== "rtl") {
|
|
14654
|
-
const ue =
|
|
14666
|
+
const ue = k.left - R.left, se = I.left - ue, Ae = C.left - se, Pe = C.width + Ae, De = Math.max(Pe, R.width), de = window.innerWidth - Mt, je = ki(se, [
|
|
14655
14667
|
Mt,
|
|
14656
14668
|
// Prevents the content from going off the starting edge of the
|
|
14657
14669
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -14662,7 +14674,7 @@ var mT = "SelectItemAlignedPosition", op = f.forwardRef((e, t) => {
|
|
|
14662
14674
|
]);
|
|
14663
14675
|
a.style.minWidth = Pe + "px", a.style.left = je + "px";
|
|
14664
14676
|
} else {
|
|
14665
|
-
const ue = R.right -
|
|
14677
|
+
const ue = R.right - k.right, se = window.innerWidth - I.right - ue, Ae = window.innerWidth - C.right - se, Pe = C.width + Ae, De = Math.max(Pe, R.width), de = window.innerWidth - Mt, je = ki(se, [
|
|
14666
14678
|
Mt,
|
|
14667
14679
|
Math.max(Mt, de - De)
|
|
14668
14680
|
]);
|
|
@@ -14688,7 +14700,7 @@ var mT = "SelectItemAlignedPosition", op = f.forwardRef((e, t) => {
|
|
|
14688
14700
|
) + X;
|
|
14689
14701
|
a.style.height = Ae + "px", g.scrollTop = P - Y + g.offsetTop;
|
|
14690
14702
|
}
|
|
14691
|
-
a.style.margin = `${Mt}px 0`, a.style.minHeight = G + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() =>
|
|
14703
|
+
a.style.margin = `${Mt}px 0`, a.style.minHeight = G + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => v.current = !0);
|
|
14692
14704
|
}
|
|
14693
14705
|
}, [
|
|
14694
14706
|
m,
|
|
@@ -14709,7 +14721,7 @@ var mT = "SelectItemAlignedPosition", op = f.forwardRef((e, t) => {
|
|
|
14709
14721
|
}, [u]);
|
|
14710
14722
|
const T = f.useCallback(
|
|
14711
14723
|
(C) => {
|
|
14712
|
-
C &&
|
|
14724
|
+
C && x.current === !0 && (y(), b == null || b(), x.current = !1);
|
|
14713
14725
|
},
|
|
14714
14726
|
[y, b]
|
|
14715
14727
|
);
|
|
@@ -14718,7 +14730,7 @@ var mT = "SelectItemAlignedPosition", op = f.forwardRef((e, t) => {
|
|
|
14718
14730
|
{
|
|
14719
14731
|
scope: n,
|
|
14720
14732
|
contentWrapper: a,
|
|
14721
|
-
shouldExpandOnScrollRef:
|
|
14733
|
+
shouldExpandOnScrollRef: v,
|
|
14722
14734
|
onScrollButtonChange: T,
|
|
14723
14735
|
children: /* @__PURE__ */ l.jsx(
|
|
14724
14736
|
"div",
|
|
@@ -14816,11 +14828,11 @@ var [xT, za] = cr(Pn, {}), Mi = "SelectViewport", sp = f.forwardRef(
|
|
|
14816
14828
|
onScroll: ee(o.onScroll, (u) => {
|
|
14817
14829
|
const d = u.currentTarget, { contentWrapper: h, shouldExpandOnScrollRef: m } = i;
|
|
14818
14830
|
if (m != null && m.current && h) {
|
|
14819
|
-
const
|
|
14820
|
-
if (
|
|
14821
|
-
const
|
|
14822
|
-
if (w <
|
|
14823
|
-
const b = w +
|
|
14831
|
+
const v = Math.abs(c.current - d.scrollTop);
|
|
14832
|
+
if (v > 0) {
|
|
14833
|
+
const x = window.innerHeight - Mt * 2, g = parseFloat(h.style.minHeight), p = parseFloat(h.style.height), w = Math.max(g, p);
|
|
14834
|
+
if (w < x) {
|
|
14835
|
+
const b = w + v, y = Math.min(x, b), N = b - y;
|
|
14824
14836
|
h.style.height = y + "px", h.style.bottom === "0px" && (d.scrollTop = N > 0 ? N : 0, h.style.justifyContent = "flex-end");
|
|
14825
14837
|
}
|
|
14826
14838
|
}
|
|
@@ -14855,7 +14867,7 @@ var Ko = "SelectItem", [yT, cp] = cr(Ko), up = f.forwardRef(
|
|
|
14855
14867
|
disabled: o = !1,
|
|
14856
14868
|
textValue: s,
|
|
14857
14869
|
...i
|
|
14858
|
-
} = e, a = bn(Ko, n), c = wn(Ko, n), u = a.value === r, [d, h] = f.useState(s ?? ""), [m,
|
|
14870
|
+
} = e, a = bn(Ko, n), c = wn(Ko, n), u = a.value === r, [d, h] = f.useState(s ?? ""), [m, v] = f.useState(!1), x = Te(
|
|
14859
14871
|
t,
|
|
14860
14872
|
(b) => {
|
|
14861
14873
|
var y;
|
|
@@ -14898,9 +14910,9 @@ var Ko = "SelectItem", [yT, cp] = cr(Ko), up = f.forwardRef(
|
|
|
14898
14910
|
"data-disabled": o ? "" : void 0,
|
|
14899
14911
|
tabIndex: o ? void 0 : -1,
|
|
14900
14912
|
...i,
|
|
14901
|
-
ref:
|
|
14902
|
-
onFocus: ee(i.onFocus, () =>
|
|
14903
|
-
onBlur: ee(i.onBlur, () =>
|
|
14913
|
+
ref: x,
|
|
14914
|
+
onFocus: ee(i.onFocus, () => v(!0)),
|
|
14915
|
+
onBlur: ee(i.onBlur, () => v(!1)),
|
|
14904
14916
|
onClick: ee(i.onClick, () => {
|
|
14905
14917
|
p.current !== "mouse" && w();
|
|
14906
14918
|
}),
|
|
@@ -14941,11 +14953,11 @@ var Sr = "SelectItemText", dp = f.forwardRef(
|
|
|
14941
14953
|
var b;
|
|
14942
14954
|
return (b = a.itemTextRefCallback) == null ? void 0 : b.call(a, w, c.value, c.disabled);
|
|
14943
14955
|
}
|
|
14944
|
-
),
|
|
14945
|
-
() => /* @__PURE__ */ l.jsx("option", { value: c.value, disabled: c.disabled, children:
|
|
14946
|
-
[c.disabled, c.value,
|
|
14956
|
+
), v = d == null ? void 0 : d.textContent, x = f.useMemo(
|
|
14957
|
+
() => /* @__PURE__ */ l.jsx("option", { value: c.value, disabled: c.disabled, children: v }, c.value),
|
|
14958
|
+
[c.disabled, c.value, v]
|
|
14947
14959
|
), { onNativeOptionAdd: g, onNativeOptionRemove: p } = u;
|
|
14948
|
-
return st(() => (g(
|
|
14960
|
+
return st(() => (g(x), () => p(x)), [g, p, x]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
14949
14961
|
/* @__PURE__ */ l.jsx(me.span, { id: c.textId, ...s, ref: m }),
|
|
14950
14962
|
c.isSelected && i.valueNode && !i.valueNodeHasChildren ? Yo.createPortal(s.children, i.valueNode) : null
|
|
14951
14963
|
] });
|
|
@@ -15282,10 +15294,10 @@ const LT = {
|
|
|
15282
15294
|
};
|
|
15283
15295
|
function TR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
15284
15296
|
const [r, o] = fe(!1), [s, i] = fe(!1), [a, c] = fe(e), [u, d] = fe(!1), { toast: h } = ca();
|
|
15285
|
-
|
|
15297
|
+
Be(() => {
|
|
15286
15298
|
const p = JSON.stringify(a) !== JSON.stringify(e);
|
|
15287
15299
|
d(p);
|
|
15288
|
-
}, [a, e]),
|
|
15300
|
+
}, [a, e]), Be(() => {
|
|
15289
15301
|
c(e);
|
|
15290
15302
|
}, [e]);
|
|
15291
15303
|
const m = () => {
|
|
@@ -15293,12 +15305,12 @@ function TR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15293
15305
|
title: "Settings saved",
|
|
15294
15306
|
description: "Your chat configuration has been updated successfully."
|
|
15295
15307
|
});
|
|
15296
|
-
},
|
|
15308
|
+
}, v = () => {
|
|
15297
15309
|
c(LT), d(!0), h({
|
|
15298
15310
|
title: "Settings reset",
|
|
15299
15311
|
description: "Configuration has been reset to defaults."
|
|
15300
15312
|
});
|
|
15301
|
-
},
|
|
15313
|
+
}, x = () => {
|
|
15302
15314
|
c(e), d(!1), o(!1);
|
|
15303
15315
|
}, g = async () => {
|
|
15304
15316
|
try {
|
|
@@ -15550,12 +15562,12 @@ function TR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15550
15562
|
] })
|
|
15551
15563
|
] }),
|
|
15552
15564
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between pt-6 border-t", children: [
|
|
15553
|
-
/* @__PURE__ */ l.jsxs(_e, { variant: "outline", onClick:
|
|
15565
|
+
/* @__PURE__ */ l.jsxs(_e, { variant: "outline", onClick: v, children: [
|
|
15554
15566
|
/* @__PURE__ */ l.jsx(si, { className: "h-4 w-4 mr-2" }),
|
|
15555
15567
|
"Reset"
|
|
15556
15568
|
] }),
|
|
15557
15569
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
|
|
15558
|
-
/* @__PURE__ */ l.jsx(_e, { variant: "outline", onClick:
|
|
15570
|
+
/* @__PURE__ */ l.jsx(_e, { variant: "outline", onClick: x, children: "Cancel" }),
|
|
15559
15571
|
/* @__PURE__ */ l.jsxs(_e, { onClick: m, disabled: !u, children: [
|
|
15560
15572
|
/* @__PURE__ */ l.jsx(am, { className: "h-4 w-4 mr-2" }),
|
|
15561
15573
|
"Save Changes"
|