teodor-new-chat-ui 3.0.63 → 3.0.65
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 +615 -615
- package/dist/index.umd.js +34 -34
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,12 +2,12 @@ import * as f from "react";
|
|
|
2
2
|
import K, { useState as fe, useRef as bt, useCallback as Ye, useEffect as Ve, useReducer as Pp, useMemo as wn, createContext as pc, useContext as mc, createElement as to, useLayoutEffect as _p } from "react";
|
|
3
3
|
import * as Bo from "react-dom";
|
|
4
4
|
import gc from "react-dom";
|
|
5
|
-
import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as vc, FileText as Ba, Loader as Fp, ChevronUp as pr, ChevronDown as Un, Copy as
|
|
6
|
-
import { Slot as er, createSlot as
|
|
5
|
+
import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as vc, FileText as Ba, Loader as Fp, ChevronUp as pr, ChevronDown as Un, Copy as $a, Edit as Ha, RotateCcw as qs, Bot as za, Wrench as Bp, User as $p, ChevronRight as Hp, Check as _i, Circle as zp, Edit3 as xc, Paperclip as Ua, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as qp, PanelLeft as Xp, Settings as Jp, Server as Zp, EyeOff as Qp, Eye as em, Layout as tm, MessageCircle as nm, Save as rm } from "lucide-react";
|
|
6
|
+
import { Slot as er, createSlot as qn, createSlottable as om } from "@radix-ui/react-slot";
|
|
7
7
|
import { cva as Pr } from "class-variance-authority";
|
|
8
8
|
import { clsx as sm } from "clsx";
|
|
9
9
|
import { twMerge as im } from "tailwind-merge";
|
|
10
|
-
var
|
|
10
|
+
var Xs = { exports: {} }, ur = {};
|
|
11
11
|
/**
|
|
12
12
|
* @license React
|
|
13
13
|
* react-jsx-runtime.production.min.js
|
|
@@ -133,14 +133,14 @@ function lm() {
|
|
|
133
133
|
}
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
|
-
var N = Object.assign,
|
|
136
|
+
var N = Object.assign, H = 0, L, q, O, _, z, X, oe;
|
|
137
137
|
function F() {
|
|
138
138
|
}
|
|
139
139
|
F.__reactDisabledLog = !0;
|
|
140
140
|
function Q() {
|
|
141
141
|
{
|
|
142
|
-
if (
|
|
143
|
-
L = console.log,
|
|
142
|
+
if (H === 0) {
|
|
143
|
+
L = console.log, q = console.info, O = console.warn, _ = console.error, z = console.group, X = console.groupCollapsed, oe = console.groupEnd;
|
|
144
144
|
var T = {
|
|
145
145
|
configurable: !0,
|
|
146
146
|
enumerable: !0,
|
|
@@ -157,12 +157,12 @@ function lm() {
|
|
|
157
157
|
groupEnd: T
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
H++;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
function de() {
|
|
164
164
|
{
|
|
165
|
-
if (
|
|
165
|
+
if (H--, H === 0) {
|
|
166
166
|
var T = {
|
|
167
167
|
configurable: !0,
|
|
168
168
|
enumerable: !0,
|
|
@@ -173,7 +173,7 @@ function lm() {
|
|
|
173
173
|
value: L
|
|
174
174
|
}),
|
|
175
175
|
info: N({}, T, {
|
|
176
|
-
value:
|
|
176
|
+
value: q
|
|
177
177
|
}),
|
|
178
178
|
warn: N({}, T, {
|
|
179
179
|
value: O
|
|
@@ -185,14 +185,14 @@ function lm() {
|
|
|
185
185
|
value: z
|
|
186
186
|
}),
|
|
187
187
|
groupCollapsed: N({}, T, {
|
|
188
|
-
value:
|
|
188
|
+
value: X
|
|
189
189
|
}),
|
|
190
190
|
groupEnd: N({}, T, {
|
|
191
191
|
value: oe
|
|
192
192
|
})
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
H < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
var be = b.ReactCurrentDispatcher, Y;
|
|
@@ -322,7 +322,7 @@ function lm() {
|
|
|
322
322
|
return "";
|
|
323
323
|
}
|
|
324
324
|
var ce = Object.prototype.hasOwnProperty, Ae = {}, ve = b.ReactDebugCurrentFrame;
|
|
325
|
-
function
|
|
325
|
+
function $(T) {
|
|
326
326
|
if (T) {
|
|
327
327
|
var U = T._owner, te = Le(T.type, T._source, U ? U.type : null);
|
|
328
328
|
ve.setExtraStackFrame(te);
|
|
@@ -344,7 +344,7 @@ function lm() {
|
|
|
344
344
|
} catch (Ke) {
|
|
345
345
|
Re = Ke;
|
|
346
346
|
}
|
|
347
|
-
Re && !(Re instanceof Error) && (
|
|
347
|
+
Re && !(Re instanceof Error) && ($(_e), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ge || "React class", te, Ie, typeof Re), $(null)), Re instanceof Error && !(Re.message in Ae) && (Ae[Re.message] = !0, $(_e), w("Failed %s type: %s", te, Re.message), $(null));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -616,19 +616,19 @@ Check the top-level render call using <` + te + ">.");
|
|
|
616
616
|
dr.Fragment = r, dr.jsx = Ap, dr.jsxs = kp;
|
|
617
617
|
}()), dr;
|
|
618
618
|
}
|
|
619
|
-
process.env.NODE_ENV === "production" ?
|
|
620
|
-
var l =
|
|
619
|
+
process.env.NODE_ENV === "production" ? Xs.exports = am() : Xs.exports = lm();
|
|
620
|
+
var l = Xs.exports;
|
|
621
621
|
function bc(e, t) {
|
|
622
622
|
return function() {
|
|
623
623
|
return e.apply(t, arguments);
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
const { toString: cm } = Object.prototype, { getPrototypeOf: Oi } = Object, { iterator:
|
|
626
|
+
const { toString: cm } = Object.prototype, { getPrototypeOf: Oi } = Object, { iterator: $o, toStringTag: wc } = Symbol, Ho = /* @__PURE__ */ ((e) => (t) => {
|
|
627
627
|
const n = cm.call(t);
|
|
628
628
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
629
|
-
})(/* @__PURE__ */ Object.create(null)), zt = (e) => (e = e.toLowerCase(), (t) =>
|
|
629
|
+
})(/* @__PURE__ */ Object.create(null)), zt = (e) => (e = e.toLowerCase(), (t) => Ho(t) === e), zo = (e) => (t) => typeof t === e, { isArray: tr } = Array, Xn = zo("undefined");
|
|
630
630
|
function _r(e) {
|
|
631
|
-
return e !== null && !
|
|
631
|
+
return e !== null && !Xn(e) && e.constructor !== null && !Xn(e.constructor) && pt(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
632
632
|
}
|
|
633
633
|
const yc = zt("ArrayBuffer");
|
|
634
634
|
function um(e) {
|
|
@@ -636,10 +636,10 @@ function um(e) {
|
|
|
636
636
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && yc(e.buffer), t;
|
|
637
637
|
}
|
|
638
638
|
const dm = zo("string"), pt = zo("function"), Sc = zo("number"), Or = (e) => e !== null && typeof e == "object", fm = (e) => e === !0 || e === !1, no = (e) => {
|
|
639
|
-
if (
|
|
639
|
+
if (Ho(e) !== "object")
|
|
640
640
|
return !1;
|
|
641
641
|
const t = Oi(e);
|
|
642
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(wc in e) && !(
|
|
642
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(wc in e) && !($o in e);
|
|
643
643
|
}, hm = (e) => {
|
|
644
644
|
if (!Or(e) || _r(e))
|
|
645
645
|
return !1;
|
|
@@ -650,7 +650,7 @@ const dm = zo("string"), pt = zo("function"), Sc = zo("number"), Or = (e) => e !
|
|
|
650
650
|
}
|
|
651
651
|
}, pm = zt("Date"), mm = zt("File"), gm = zt("Blob"), vm = zt("FileList"), xm = (e) => Or(e) && pt(e.pipe), bm = (e) => {
|
|
652
652
|
let t;
|
|
653
|
-
return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t =
|
|
653
|
+
return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t = Ho(e)) === "formdata" || // detect form-data instance
|
|
654
654
|
t === "object" && pt(e.toString) && e.toString() === "[object FormData]"));
|
|
655
655
|
}, wm = zt("URLSearchParams"), [ym, Sm, Cm, Tm] = ["ReadableStream", "Request", "Response", "Headers"].map(zt), Rm = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
656
656
|
function Mr(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
@@ -680,11 +680,11 @@ function Cc(e, t) {
|
|
|
680
680
|
return o;
|
|
681
681
|
return null;
|
|
682
682
|
}
|
|
683
|
-
const yn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Tc = (e) => !
|
|
683
|
+
const yn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Tc = (e) => !Xn(e) && e !== yn;
|
|
684
684
|
function Js() {
|
|
685
685
|
const { caseless: e, skipUndefined: t } = Tc(this) && this || {}, n = {}, r = (o, s) => {
|
|
686
686
|
const i = e && Cc(n, s) || s;
|
|
687
|
-
no(n[i]) && no(o) ? n[i] = Js(n[i], o) : no(o) ? n[i] = Js({}, o) : tr(o) ? n[i] = o.slice() : (!t || !
|
|
687
|
+
no(n[i]) && no(o) ? n[i] = Js(n[i], o) : no(o) ? n[i] = Js({}, o) : tr(o) ? n[i] = o.slice() : (!t || !Xn(o)) && (n[i] = o);
|
|
688
688
|
};
|
|
689
689
|
for (let o = 0, s = arguments.length; o < s; o++)
|
|
690
690
|
arguments[o] && Mr(arguments[o], r);
|
|
@@ -720,7 +720,7 @@ const Em = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
|
|
|
720
720
|
n[t] = e[t];
|
|
721
721
|
return n;
|
|
722
722
|
}, Pm = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Oi(Uint8Array)), _m = (e, t) => {
|
|
723
|
-
const r = (e && e[
|
|
723
|
+
const r = (e && e[$o]).call(e);
|
|
724
724
|
let o;
|
|
725
725
|
for (; (o = r.next()) && !o.done; ) {
|
|
726
726
|
const s = o.value;
|
|
@@ -765,10 +765,10 @@ const Em = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
|
|
|
765
765
|
});
|
|
766
766
|
};
|
|
767
767
|
return tr(e) ? r(e) : r(String(e).split(t)), n;
|
|
768
|
-
},
|
|
769
|
-
},
|
|
768
|
+
}, $m = () => {
|
|
769
|
+
}, Hm = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
770
770
|
function zm(e) {
|
|
771
|
-
return !!(e && pt(e.append) && e[wc] === "FormData" && e[
|
|
771
|
+
return !!(e && pt(e.append) && e[wc] === "FormData" && e[$o]);
|
|
772
772
|
}
|
|
773
773
|
const Um = (e) => {
|
|
774
774
|
const t = new Array(10), n = (r, o) => {
|
|
@@ -782,7 +782,7 @@ const Um = (e) => {
|
|
|
782
782
|
const s = tr(r) ? [] : {};
|
|
783
783
|
return Mr(r, (i, a) => {
|
|
784
784
|
const c = n(i, o + 1);
|
|
785
|
-
!
|
|
785
|
+
!Xn(c) && (s[a] = c);
|
|
786
786
|
}), t[o] = void 0, s;
|
|
787
787
|
}
|
|
788
788
|
}
|
|
@@ -796,7 +796,7 @@ const Um = (e) => {
|
|
|
796
796
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
797
797
|
typeof setImmediate == "function",
|
|
798
798
|
pt(yn.postMessage)
|
|
799
|
-
), Gm = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || Ec, Km = (e) => e != null && pt(e[
|
|
799
|
+
), Gm = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || Ec, Km = (e) => e != null && pt(e[$o]), j = {
|
|
800
800
|
isArray: tr,
|
|
801
801
|
isArrayBuffer: yc,
|
|
802
802
|
isBuffer: _r,
|
|
@@ -812,7 +812,7 @@ const Um = (e) => {
|
|
|
812
812
|
isRequest: Sm,
|
|
813
813
|
isResponse: Cm,
|
|
814
814
|
isHeaders: Tm,
|
|
815
|
-
isUndefined:
|
|
815
|
+
isUndefined: Xn,
|
|
816
816
|
isDate: pm,
|
|
817
817
|
isFile: mm,
|
|
818
818
|
isBlob: gm,
|
|
@@ -829,7 +829,7 @@ const Um = (e) => {
|
|
|
829
829
|
stripBOM: Im,
|
|
830
830
|
inherits: Nm,
|
|
831
831
|
toFlatObject: jm,
|
|
832
|
-
kindOf:
|
|
832
|
+
kindOf: Ho,
|
|
833
833
|
kindOfTest: zt,
|
|
834
834
|
endsWith: Am,
|
|
835
835
|
toArray: km,
|
|
@@ -843,8 +843,8 @@ const Um = (e) => {
|
|
|
843
843
|
freezeMethods: Fm,
|
|
844
844
|
toObjectSet: Bm,
|
|
845
845
|
toCamelCase: Dm,
|
|
846
|
-
noop:
|
|
847
|
-
toFiniteNumber:
|
|
846
|
+
noop: $m,
|
|
847
|
+
toFiniteNumber: Hm,
|
|
848
848
|
findKey: Cc,
|
|
849
849
|
global: yn,
|
|
850
850
|
isContextDefined: Tc,
|
|
@@ -920,10 +920,10 @@ function Ka(e, t, n) {
|
|
|
920
920
|
return o = jc(o), !n && s ? "[" + o + "]" : o;
|
|
921
921
|
}).join(n ? "." : "") : t;
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function qm(e) {
|
|
924
924
|
return j.isArray(e) && !e.some(Zs);
|
|
925
925
|
}
|
|
926
|
-
const
|
|
926
|
+
const Xm = j.toFlatObject(j, {}, null, function(t) {
|
|
927
927
|
return /^is[A-Z]/.test(t);
|
|
928
928
|
});
|
|
929
929
|
function Uo(e, t, n) {
|
|
@@ -954,7 +954,7 @@ function Uo(e, t, n) {
|
|
|
954
954
|
if (g && !m && typeof g == "object") {
|
|
955
955
|
if (j.endsWith(v, "{}"))
|
|
956
956
|
v = r ? v : v.slice(0, -2), g = JSON.stringify(g);
|
|
957
|
-
else if (j.isArray(g) &&
|
|
957
|
+
else if (j.isArray(g) && qm(g) || (j.isFileList(g) || j.endsWith(v, "[]")) && (b = j.toArray(g)))
|
|
958
958
|
return v = jc(v), b.forEach(function(y, E) {
|
|
959
959
|
!(j.isUndefined(y) || y === null) && t.append(
|
|
960
960
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -965,7 +965,7 @@ function Uo(e, t, n) {
|
|
|
965
965
|
}
|
|
966
966
|
return Zs(g) ? !0 : (t.append(Ka(m, v, s), u(g)), !1);
|
|
967
967
|
}
|
|
968
|
-
const h = [], p = Object.assign(
|
|
968
|
+
const h = [], p = Object.assign(Xm, {
|
|
969
969
|
defaultVisitor: d,
|
|
970
970
|
convertValue: u,
|
|
971
971
|
isVisitable: Zs
|
|
@@ -1036,7 +1036,7 @@ function kc(e, t, n) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
return e;
|
|
1038
1038
|
}
|
|
1039
|
-
class
|
|
1039
|
+
class qa {
|
|
1040
1040
|
constructor() {
|
|
1041
1041
|
this.handlers = [];
|
|
1042
1042
|
}
|
|
@@ -1253,7 +1253,7 @@ const ug = j.toObjectSet([
|
|
|
1253
1253
|
`).forEach(function(i) {
|
|
1254
1254
|
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && ug[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1255
1255
|
}), t;
|
|
1256
|
-
},
|
|
1256
|
+
}, Xa = Symbol("internals");
|
|
1257
1257
|
function fr(e) {
|
|
1258
1258
|
return e && String(e).trim().toLowerCase();
|
|
1259
1259
|
}
|
|
@@ -1408,7 +1408,7 @@ let mt = class {
|
|
|
1408
1408
|
return n.forEach((o) => r.set(o)), r;
|
|
1409
1409
|
}
|
|
1410
1410
|
static accessor(t) {
|
|
1411
|
-
const r = (this[
|
|
1411
|
+
const r = (this[Xa] = this[Xa] = {
|
|
1412
1412
|
accessors: {}
|
|
1413
1413
|
}).accessors, o = this.prototype;
|
|
1414
1414
|
function s(i) {
|
|
@@ -1855,24 +1855,24 @@ const Lc = (e) => {
|
|
|
1855
1855
|
const N = W && W.unsubscribe && (() => {
|
|
1856
1856
|
W.unsubscribe();
|
|
1857
1857
|
});
|
|
1858
|
-
let
|
|
1858
|
+
let H;
|
|
1859
1859
|
try {
|
|
1860
|
-
if (C && u && m !== "get" && m !== "head" && (
|
|
1861
|
-
let
|
|
1860
|
+
if (C && u && m !== "get" && m !== "head" && (H = await x(I, b)) !== 0) {
|
|
1861
|
+
let X = new n(v, {
|
|
1862
1862
|
method: "POST",
|
|
1863
1863
|
body: b,
|
|
1864
1864
|
duplex: "half"
|
|
1865
1865
|
}), oe;
|
|
1866
|
-
if (j.isFormData(b) && (oe =
|
|
1866
|
+
if (j.isFormData(b) && (oe = X.headers.get("content-type")) && I.setContentType(oe), X.body) {
|
|
1867
1867
|
const [F, Q] = Ja(
|
|
1868
|
-
|
|
1868
|
+
H,
|
|
1869
1869
|
So(Za(C))
|
|
1870
1870
|
);
|
|
1871
|
-
b = el(
|
|
1871
|
+
b = el(X.body, tl, F, Q);
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
1874
|
j.isString(A) || (A = A ? "include" : "omit");
|
|
1875
|
-
const L = s && "credentials" in n.prototype,
|
|
1875
|
+
const L = s && "credentials" in n.prototype, q = {
|
|
1876
1876
|
...k,
|
|
1877
1877
|
signal: W,
|
|
1878
1878
|
method: m.toUpperCase(),
|
|
@@ -1881,13 +1881,13 @@ const Lc = (e) => {
|
|
|
1881
1881
|
duplex: "half",
|
|
1882
1882
|
credentials: L ? A : void 0
|
|
1883
1883
|
};
|
|
1884
|
-
G = s && new n(v,
|
|
1885
|
-
let O = await (s ? M(G, k) : M(v,
|
|
1884
|
+
G = s && new n(v, q);
|
|
1885
|
+
let O = await (s ? M(G, k) : M(v, q));
|
|
1886
1886
|
const _ = d && (R === "stream" || R === "response");
|
|
1887
1887
|
if (d && (S || _ && N)) {
|
|
1888
|
-
const
|
|
1888
|
+
const X = {};
|
|
1889
1889
|
["status", "statusText", "headers"].forEach((de) => {
|
|
1890
|
-
|
|
1890
|
+
X[de] = O[de];
|
|
1891
1891
|
});
|
|
1892
1892
|
const oe = j.toFiniteNumber(O.headers.get("content-length")), [F, Q] = S && Ja(
|
|
1893
1893
|
oe,
|
|
@@ -1897,13 +1897,13 @@ const Lc = (e) => {
|
|
|
1897
1897
|
el(O.body, tl, F, () => {
|
|
1898
1898
|
Q && Q(), N && N();
|
|
1899
1899
|
}),
|
|
1900
|
-
|
|
1900
|
+
X
|
|
1901
1901
|
);
|
|
1902
1902
|
}
|
|
1903
1903
|
R = R || "text";
|
|
1904
1904
|
let z = await h[j.findKey(h, R) || "text"](O, g);
|
|
1905
|
-
return !_ && N && N(), await new Promise((
|
|
1906
|
-
Mc(
|
|
1905
|
+
return !_ && N && N(), await new Promise((X, oe) => {
|
|
1906
|
+
Mc(X, oe, {
|
|
1907
1907
|
data: z,
|
|
1908
1908
|
headers: mt.from(O.headers),
|
|
1909
1909
|
status: O.status,
|
|
@@ -2003,7 +2003,7 @@ function il(e) {
|
|
|
2003
2003
|
), r.response.headers = mt.from(r.response.headers))), Promise.reject(r);
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
|
-
const
|
|
2006
|
+
const $c = "1.12.2", Wo = {};
|
|
2007
2007
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2008
2008
|
Wo[e] = function(r) {
|
|
2009
2009
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
@@ -2012,7 +2012,7 @@ const Hc = "1.12.2", Wo = {};
|
|
|
2012
2012
|
const al = {};
|
|
2013
2013
|
Wo.transitional = function(t, n, r) {
|
|
2014
2014
|
function o(s, i) {
|
|
2015
|
-
return "[Axios v" +
|
|
2015
|
+
return "[Axios v" + $c + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
|
|
2016
2016
|
}
|
|
2017
2017
|
return (s, i, a) => {
|
|
2018
2018
|
if (t === !1)
|
|
@@ -2055,8 +2055,8 @@ const oo = {
|
|
|
2055
2055
|
let Cn = class {
|
|
2056
2056
|
constructor(t) {
|
|
2057
2057
|
this.defaults = t || {}, this.interceptors = {
|
|
2058
|
-
request: new
|
|
2059
|
-
response: new
|
|
2058
|
+
request: new qa(),
|
|
2059
|
+
response: new qa()
|
|
2060
2060
|
};
|
|
2061
2061
|
}
|
|
2062
2062
|
/**
|
|
@@ -2176,7 +2176,7 @@ j.forEach(["post", "put", "patch"], function(t) {
|
|
|
2176
2176
|
}
|
|
2177
2177
|
Cn.prototype[t] = n(), Cn.prototype[t + "Form"] = n(!0);
|
|
2178
2178
|
});
|
|
2179
|
-
let Og = class
|
|
2179
|
+
let Og = class Hc {
|
|
2180
2180
|
constructor(t) {
|
|
2181
2181
|
if (typeof t != "function")
|
|
2182
2182
|
throw new TypeError("executor must be a function.");
|
|
@@ -2242,7 +2242,7 @@ let Og = class $c {
|
|
|
2242
2242
|
static source() {
|
|
2243
2243
|
let t;
|
|
2244
2244
|
return {
|
|
2245
|
-
token: new
|
|
2245
|
+
token: new Hc(function(o) {
|
|
2246
2246
|
t = o;
|
|
2247
2247
|
}),
|
|
2248
2248
|
cancel: t
|
|
@@ -2331,34 +2331,34 @@ function zc(e) {
|
|
|
2331
2331
|
return zc(Rn(e, o));
|
|
2332
2332
|
}, n;
|
|
2333
2333
|
}
|
|
2334
|
-
const
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2334
|
+
const Xe = zc(Dr);
|
|
2335
|
+
Xe.Axios = Cn;
|
|
2336
|
+
Xe.CanceledError = nr;
|
|
2337
|
+
Xe.CancelToken = Og;
|
|
2338
|
+
Xe.isCancel = Oc;
|
|
2339
|
+
Xe.VERSION = $c;
|
|
2340
|
+
Xe.toFormData = Uo;
|
|
2341
|
+
Xe.AxiosError = we;
|
|
2342
|
+
Xe.Cancel = Xe.CanceledError;
|
|
2343
|
+
Xe.all = function(t) {
|
|
2344
2344
|
return Promise.all(t);
|
|
2345
2345
|
};
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2346
|
+
Xe.spread = Mg;
|
|
2347
|
+
Xe.isAxiosError = Dg;
|
|
2348
|
+
Xe.mergeConfig = Rn;
|
|
2349
|
+
Xe.AxiosHeaders = mt;
|
|
2350
|
+
Xe.formToJSON = (e) => _c(j.isHTMLForm(e) ? new FormData(e) : e);
|
|
2351
|
+
Xe.getAdapter = Bc.getAdapter;
|
|
2352
|
+
Xe.HttpStatusCode = ti;
|
|
2353
|
+
Xe.default = Xe;
|
|
2354
2354
|
const {
|
|
2355
2355
|
Axios: MT,
|
|
2356
2356
|
AxiosError: DT,
|
|
2357
2357
|
CanceledError: LT,
|
|
2358
2358
|
isCancel: FT,
|
|
2359
2359
|
CancelToken: BT,
|
|
2360
|
-
VERSION:
|
|
2361
|
-
all:
|
|
2360
|
+
VERSION: $T,
|
|
2361
|
+
all: HT,
|
|
2362
2362
|
Cancel: zT,
|
|
2363
2363
|
isAxiosError: UT,
|
|
2364
2364
|
spread: WT,
|
|
@@ -2366,9 +2366,9 @@ const {
|
|
|
2366
2366
|
AxiosHeaders: GT,
|
|
2367
2367
|
HttpStatusCode: KT,
|
|
2368
2368
|
formToJSON: YT,
|
|
2369
|
-
getAdapter:
|
|
2370
|
-
mergeConfig:
|
|
2371
|
-
} =
|
|
2369
|
+
getAdapter: qT,
|
|
2370
|
+
mergeConfig: XT
|
|
2371
|
+
} = Xe;
|
|
2372
2372
|
function ll() {
|
|
2373
2373
|
var e;
|
|
2374
2374
|
try {
|
|
@@ -2390,7 +2390,7 @@ function ul(e) {
|
|
|
2390
2390
|
function Fg(e) {
|
|
2391
2391
|
return ri.add(e), () => ri.delete(e);
|
|
2392
2392
|
}
|
|
2393
|
-
const At =
|
|
2393
|
+
const At = Xe.create({
|
|
2394
2394
|
// Only set baseURL when configured — do NOT fall back to localhost. Falling back causes
|
|
2395
2395
|
// noisy network requests to the frontend Dev server when the backend isn't configured.
|
|
2396
2396
|
...ni ? { baseURL: ni } : {},
|
|
@@ -2411,13 +2411,13 @@ async function dl(e, t, n) {
|
|
|
2411
2411
|
async function Bg(e, t, n) {
|
|
2412
2412
|
return At.defaults.baseURL ? (await At.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
|
|
2413
2413
|
}
|
|
2414
|
-
async function
|
|
2414
|
+
async function $g(e, t) {
|
|
2415
2415
|
return At.defaults.baseURL ? (await At.delete(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
|
|
2416
2416
|
}
|
|
2417
2417
|
function xt(e) {
|
|
2418
2418
|
return e && typeof e == "object" && "data" in e ? e.data : e;
|
|
2419
2419
|
}
|
|
2420
|
-
class
|
|
2420
|
+
class Hg {
|
|
2421
2421
|
// ---- Configuration ----
|
|
2422
2422
|
get baseUrl() {
|
|
2423
2423
|
const t = At.defaults.baseURL || "";
|
|
@@ -2450,7 +2450,7 @@ class $g {
|
|
|
2450
2450
|
return xt(r);
|
|
2451
2451
|
}
|
|
2452
2452
|
async deleteThread(t) {
|
|
2453
|
-
const n = await
|
|
2453
|
+
const n = await $g(`/chat/threads/${t}`);
|
|
2454
2454
|
return xt(n);
|
|
2455
2455
|
}
|
|
2456
2456
|
async threadInfo(t) {
|
|
@@ -2521,7 +2521,7 @@ class $g {
|
|
|
2521
2521
|
return ll() && console.debug("[api.uploadExcel] <-", c), c;
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
|
-
const En = new
|
|
2524
|
+
const En = new Hg();
|
|
2525
2525
|
function zg(e = {}) {
|
|
2526
2526
|
const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = fe(e.token ?? null), s = bt(e.headers ?? {}), [i, a] = fe(!1), [c, u] = fe(null), [d, h] = fe(""), [p, x] = fe(null), g = bt(null), v = Ye((y) => {
|
|
2527
2527
|
o(y);
|
|
@@ -2544,12 +2544,12 @@ function zg(e = {}) {
|
|
|
2544
2544
|
return !1;
|
|
2545
2545
|
}
|
|
2546
2546
|
})(), I = (N) => {
|
|
2547
|
-
var
|
|
2547
|
+
var H;
|
|
2548
2548
|
try {
|
|
2549
2549
|
const L = JSON.parse(JSON.stringify(N));
|
|
2550
|
-
return (
|
|
2551
|
-
...
|
|
2552
|
-
data:
|
|
2550
|
+
return (H = L == null ? void 0 : L.payload) != null && H.files_info && Array.isArray(L.payload.files_info) && (L.payload.files_info = L.payload.files_info.map((q) => ({
|
|
2551
|
+
...q,
|
|
2552
|
+
data: q != null && q.data ? `<base64 ${String(q.data).length} chars>` : q == null ? void 0 : q.data
|
|
2553
2553
|
}))), L;
|
|
2554
2554
|
} catch {
|
|
2555
2555
|
return N;
|
|
@@ -2561,20 +2561,20 @@ function zg(e = {}) {
|
|
|
2561
2561
|
if (r)
|
|
2562
2562
|
N = { Authorization: `Bearer ${r}` };
|
|
2563
2563
|
else if (typeof window < "u") {
|
|
2564
|
-
const z = window.__AUTH_TOKEN__,
|
|
2564
|
+
const z = window.__AUTH_TOKEN__, X = ((A = window.localStorage) == null ? void 0 : A.getItem("authToken")) || null;
|
|
2565
2565
|
let oe = null;
|
|
2566
2566
|
try {
|
|
2567
2567
|
const Q = (k = window.localStorage) == null ? void 0 : k.getItem("chat-settings");
|
|
2568
2568
|
Q && (oe = ((M = JSON.parse(Q)) == null ? void 0 : M.apiKey) || null);
|
|
2569
2569
|
} catch {
|
|
2570
2570
|
}
|
|
2571
|
-
const F = z ||
|
|
2571
|
+
const F = z || X || oe || null;
|
|
2572
2572
|
F && (N = { Authorization: `Bearer ${F}` });
|
|
2573
2573
|
}
|
|
2574
2574
|
} catch {
|
|
2575
2575
|
}
|
|
2576
2576
|
R && console.debug("[use-chat] POST", t + n, I(y));
|
|
2577
|
-
const
|
|
2577
|
+
const H = await fetch(t + n, {
|
|
2578
2578
|
method: "POST",
|
|
2579
2579
|
headers: {
|
|
2580
2580
|
"Content-Type": "application/json",
|
|
@@ -2585,32 +2585,32 @@ function zg(e = {}) {
|
|
|
2585
2585
|
body: JSON.stringify(y),
|
|
2586
2586
|
signal: C.signal
|
|
2587
2587
|
});
|
|
2588
|
-
if (
|
|
2589
|
-
const _ = await
|
|
2590
|
-
throw R && console.debug("[use-chat] non-OK response",
|
|
2588
|
+
if (!H.ok || !H.body) {
|
|
2589
|
+
const _ = await H.text().catch(() => "");
|
|
2590
|
+
throw R && console.debug("[use-chat] non-OK response", H.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${H.status}${_ ? ": " + _ : ""}`);
|
|
2591
2591
|
}
|
|
2592
2592
|
try {
|
|
2593
|
-
const _ =
|
|
2593
|
+
const _ = H.headers.get("X-Thread-Id") || H.headers.get("x-thread-id"), z = H.headers.get("X-Thread-Created") || H.headers.get("x-thread-created"), X = _ ?? null, oe = String(z ?? "").toLowerCase() === "true";
|
|
2594
2594
|
try {
|
|
2595
|
-
(W = S == null ? void 0 : S.onOpen) == null || W.call(S, { threadId:
|
|
2595
|
+
(W = S == null ? void 0 : S.onOpen) == null || W.call(S, { threadId: X, created: oe });
|
|
2596
2596
|
} catch (F) {
|
|
2597
2597
|
R && console.debug("[use-chat] onOpen handler threw:", F);
|
|
2598
2598
|
}
|
|
2599
2599
|
} catch (_) {
|
|
2600
2600
|
R && console.debug("[use-chat] failed to read headers:", _);
|
|
2601
2601
|
}
|
|
2602
|
-
const L =
|
|
2602
|
+
const L = H.body.getReader(), q = new TextDecoder();
|
|
2603
2603
|
let O = "";
|
|
2604
2604
|
for (; ; ) {
|
|
2605
2605
|
const { value: _, done: z } = await L.read();
|
|
2606
2606
|
if (z) break;
|
|
2607
|
-
O +=
|
|
2608
|
-
let
|
|
2609
|
-
for (; (
|
|
2607
|
+
O += q.decode(_, { stream: !0 });
|
|
2608
|
+
let X;
|
|
2609
|
+
for (; (X = O.indexOf(`
|
|
2610
2610
|
|
|
2611
2611
|
`)) >= 0; ) {
|
|
2612
|
-
const oe = O.slice(0,
|
|
2613
|
-
O = O.slice(
|
|
2612
|
+
const oe = O.slice(0, X);
|
|
2613
|
+
O = O.slice(X + 2);
|
|
2614
2614
|
const F = Wg(oe);
|
|
2615
2615
|
if (!F) continue;
|
|
2616
2616
|
let Q;
|
|
@@ -2631,8 +2631,8 @@ function zg(e = {}) {
|
|
|
2631
2631
|
}
|
|
2632
2632
|
} catch (N) {
|
|
2633
2633
|
if ((N == null ? void 0 : N.name) === "AbortError") return;
|
|
2634
|
-
const
|
|
2635
|
-
R && console.debug("[use-chat] error:",
|
|
2634
|
+
const H = (N == null ? void 0 : N.message) || String(N);
|
|
2635
|
+
R && console.debug("[use-chat] error:", H), u(H), (G = S == null ? void 0 : S.onError) == null || G.call(S, H);
|
|
2636
2636
|
} finally {
|
|
2637
2637
|
a(!1), g.current = null;
|
|
2638
2638
|
}
|
|
@@ -2757,7 +2757,7 @@ function Gg(e, t) {
|
|
|
2757
2757
|
return { ...e, messages: u };
|
|
2758
2758
|
}
|
|
2759
2759
|
if (o.type === "checkpoint") {
|
|
2760
|
-
const s =
|
|
2760
|
+
const s = Xg(e.messages, o.checkpointId);
|
|
2761
2761
|
return { ...e, lastCheckpointId: o.checkpointId, messages: s };
|
|
2762
2762
|
}
|
|
2763
2763
|
if (o.type === "branch") {
|
|
@@ -2816,9 +2816,9 @@ function Yg(e, t, n) {
|
|
|
2816
2816
|
});
|
|
2817
2817
|
}
|
|
2818
2818
|
function fl(e, t, n) {
|
|
2819
|
-
return e.map((r) => r.id === t ? { ...r, content:
|
|
2819
|
+
return e.map((r) => r.id === t ? { ...r, content: qg(r.content, n) } : r);
|
|
2820
2820
|
}
|
|
2821
|
-
function
|
|
2821
|
+
function qg(e, t) {
|
|
2822
2822
|
const n = e.slice();
|
|
2823
2823
|
for (const r of t)
|
|
2824
2824
|
if (r.type === "text") {
|
|
@@ -2828,7 +2828,7 @@ function Xg(e, t) {
|
|
|
2828
2828
|
n.push(r);
|
|
2829
2829
|
return n;
|
|
2830
2830
|
}
|
|
2831
|
-
function
|
|
2831
|
+
function Xg(e, t) {
|
|
2832
2832
|
for (let n = e.length - 1; n >= 0; n--)
|
|
2833
2833
|
if (e[n].role === "assistant") {
|
|
2834
2834
|
const o = { ...e[n], checkpointId: t };
|
|
@@ -2943,27 +2943,27 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2943
2943
|
}), [v, m] = fe(() => typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
|
|
2944
2944
|
Ve(() => {
|
|
2945
2945
|
g(typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
|
|
2946
|
-
const
|
|
2946
|
+
const $ = u.onTokenChange((ae) => {
|
|
2947
2947
|
m(ae), g(ae);
|
|
2948
2948
|
});
|
|
2949
2949
|
return () => {
|
|
2950
|
-
|
|
2950
|
+
$();
|
|
2951
2951
|
};
|
|
2952
2952
|
}, [u, g]);
|
|
2953
|
-
const b = Ye((
|
|
2954
|
-
u.setAuthToken(
|
|
2955
|
-
}, [u]), { state: w, seed: y, prepend: E, pushUser: S, onEvent: C, reset: R } = Kg(), I = s && s > 0 ? s : 6, [A, k] = fe(!1), [M, W] = fe(!1), [G, N] = fe(null), [
|
|
2956
|
-
(
|
|
2957
|
-
const Be = Array.isArray(
|
|
2958
|
-
ae === "replace" ? y(Be) : ae === "prepend" && Be.length && E(Be), N((
|
|
2953
|
+
const b = Ye(($) => {
|
|
2954
|
+
u.setAuthToken($);
|
|
2955
|
+
}, [u]), { state: w, seed: y, prepend: E, pushUser: S, onEvent: C, reset: R } = Kg(), I = s && s > 0 ? s : 6, [A, k] = fe(!1), [M, W] = fe(!1), [G, N] = fe(null), [H, L] = fe(void 0), q = Ye(
|
|
2956
|
+
($, ae) => {
|
|
2957
|
+
const Be = Array.isArray($ == null ? void 0 : $.messages) ? $.messages : [];
|
|
2958
|
+
ae === "replace" ? y(Be) : ae === "prepend" && Be.length && E(Be), N(($ == null ? void 0 : $.nextCursor) ?? null), k(!!($ != null && $.hasMore)), L((nt) => ($ == null ? void 0 : $.checkpointId) ?? nt ?? void 0);
|
|
2959
2959
|
},
|
|
2960
2960
|
[y, E]
|
|
2961
|
-
), [O, _] = fe([]), [z,
|
|
2962
|
-
const
|
|
2963
|
-
_(
|
|
2961
|
+
), [O, _] = fe([]), [z, X] = fe(null), oe = Ye(async () => {
|
|
2962
|
+
const $ = await u.listThreads();
|
|
2963
|
+
_($);
|
|
2964
2964
|
}, [u]), [F, Q] = fe(!1), de = Ye(
|
|
2965
|
-
async (
|
|
2966
|
-
const ae = (
|
|
2965
|
+
async ($) => {
|
|
2966
|
+
const ae = ($ == null ? void 0 : $.maxAttempts) ?? 5, Be = ($ == null ? void 0 : $.baseDelayMs) ?? 500, nt = ($ == null ? void 0 : $.timeoutMs) ?? 2e3;
|
|
2967
2967
|
if (!u.baseUrl) return !1;
|
|
2968
2968
|
const ut = u.baseUrl.replace(/\/+$/, ""), rt = [
|
|
2969
2969
|
"/health",
|
|
@@ -3004,7 +3004,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3004
3004
|
[u.baseUrl]
|
|
3005
3005
|
);
|
|
3006
3006
|
Ve(() => {
|
|
3007
|
-
let
|
|
3007
|
+
let $ = !0;
|
|
3008
3008
|
if (!u.baseUrl) {
|
|
3009
3009
|
console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
|
|
3010
3010
|
return;
|
|
@@ -3012,13 +3012,13 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3012
3012
|
return (async () => {
|
|
3013
3013
|
try {
|
|
3014
3014
|
const ae = await de();
|
|
3015
|
-
if (
|
|
3015
|
+
if (!$) return;
|
|
3016
3016
|
ae ? oe().catch(() => {
|
|
3017
3017
|
}) : console.warn("[ChatProvider] backend health-check failed — skipping initial loads");
|
|
3018
3018
|
} catch {
|
|
3019
3019
|
}
|
|
3020
3020
|
})(), () => {
|
|
3021
|
-
|
|
3021
|
+
$ = !1;
|
|
3022
3022
|
};
|
|
3023
3023
|
}, [oe, u.baseUrl, de]), Ve(() => {
|
|
3024
3024
|
r == null || r(z);
|
|
@@ -3039,47 +3039,47 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3039
3039
|
}
|
|
3040
3040
|
}, [o, i, u.baseUrl, F]);
|
|
3041
3041
|
const Y = bt(null), P = Ye(
|
|
3042
|
-
async (
|
|
3042
|
+
async ($, ae, Be) => {
|
|
3043
3043
|
if (!u.baseUrl) {
|
|
3044
3044
|
console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
|
|
3045
3045
|
return;
|
|
3046
3046
|
}
|
|
3047
|
-
if (Y.current !==
|
|
3048
|
-
Y.current =
|
|
3047
|
+
if (Y.current !== $) {
|
|
3048
|
+
Y.current = $;
|
|
3049
3049
|
try {
|
|
3050
3050
|
k(!1), N(null), L(void 0);
|
|
3051
3051
|
const nt = await u.getMessages({
|
|
3052
|
-
threadId:
|
|
3052
|
+
threadId: $,
|
|
3053
3053
|
checkpointId: ae,
|
|
3054
3054
|
checkpointNs: Be,
|
|
3055
3055
|
limit: I
|
|
3056
3056
|
});
|
|
3057
|
-
|
|
3057
|
+
X($), q(nt, "replace");
|
|
3058
3058
|
} finally {
|
|
3059
3059
|
Y.current = null;
|
|
3060
3060
|
}
|
|
3061
3061
|
}
|
|
3062
3062
|
},
|
|
3063
|
-
[u,
|
|
3064
|
-
), Z = Ye(async (
|
|
3065
|
-
const ae = await u.listCheckpoints(
|
|
3066
|
-
return Zg(ae,
|
|
3067
|
-
}, [u]), ne = Ye(async (
|
|
3063
|
+
[u, q]
|
|
3064
|
+
), Z = Ye(async ($) => {
|
|
3065
|
+
const ae = await u.listCheckpoints($);
|
|
3066
|
+
return Zg(ae, $);
|
|
3067
|
+
}, [u]), ne = Ye(async ($) => {
|
|
3068
3068
|
if (!z) throw new Error("No active thread");
|
|
3069
3069
|
k(!1), N(null), L(void 0);
|
|
3070
3070
|
const ae = await u.getMessages({
|
|
3071
3071
|
threadId: z,
|
|
3072
|
-
checkpointId:
|
|
3072
|
+
checkpointId: $,
|
|
3073
3073
|
limit: I
|
|
3074
3074
|
});
|
|
3075
|
-
|
|
3076
|
-
}, [u, z,
|
|
3075
|
+
q(ae, "replace");
|
|
3076
|
+
}, [u, z, q, I]), le = Ye(async () => {
|
|
3077
3077
|
if (!z) throw new Error("No active thread");
|
|
3078
3078
|
await P(z);
|
|
3079
3079
|
}, [z, P]), ie = bt(!1);
|
|
3080
3080
|
Ve(() => {
|
|
3081
|
-
const
|
|
3082
|
-
if (ie.current = d,
|
|
3081
|
+
const $ = ie.current;
|
|
3082
|
+
if (ie.current = d, $ && !d && z) {
|
|
3083
3083
|
const ae = w.lastCheckpointId ?? void 0;
|
|
3084
3084
|
(async () => {
|
|
3085
3085
|
try {
|
|
@@ -3088,7 +3088,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3088
3088
|
checkpointId: ae,
|
|
3089
3089
|
limit: I
|
|
3090
3090
|
});
|
|
3091
|
-
|
|
3091
|
+
q(Be, "replace");
|
|
3092
3092
|
} catch {
|
|
3093
3093
|
}
|
|
3094
3094
|
try {
|
|
@@ -3097,15 +3097,15 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3097
3097
|
}
|
|
3098
3098
|
})();
|
|
3099
3099
|
}
|
|
3100
|
-
}, [d, z, w.lastCheckpointId, u,
|
|
3101
|
-
const Pe = Ye(async (
|
|
3102
|
-
const ae = await u.createThread(
|
|
3100
|
+
}, [d, z, w.lastCheckpointId, u, q, oe]);
|
|
3101
|
+
const Pe = Ye(async ($) => {
|
|
3102
|
+
const ae = await u.createThread($);
|
|
3103
3103
|
return await oe(), await P(ae.threadId), ae.threadId;
|
|
3104
|
-
}, [u, oe, P]), Fe = Ye(async (
|
|
3105
|
-
await u.deleteThread(
|
|
3106
|
-
}, [u, oe, z, R]), Le = Ye(async (
|
|
3107
|
-
await u.updateThread(
|
|
3108
|
-
}, [u, oe]), ce = Ye(async (
|
|
3104
|
+
}, [u, oe, P]), Fe = Ye(async ($) => {
|
|
3105
|
+
await u.deleteThread($), await oe(), z === $ && (X(null), R([]), k(!1), N(null), L(void 0));
|
|
3106
|
+
}, [u, oe, z, R]), Le = Ye(async ($, ae) => {
|
|
3107
|
+
await u.updateThread($, ae), await oe();
|
|
3108
|
+
}, [u, oe]), ce = Ye(async ($, ae) => {
|
|
3109
3109
|
var Dn;
|
|
3110
3110
|
const Be = (ae == null ? void 0 : ae.attachments) || [], { contentParts: nt, filesInfo: ut } = await tv(
|
|
3111
3111
|
u,
|
|
@@ -3115,7 +3115,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3115
3115
|
c,
|
|
3116
3116
|
z
|
|
3117
3117
|
), rt = [];
|
|
3118
|
-
|
|
3118
|
+
$ && rt.push({ type: "text", text: $ });
|
|
3119
3119
|
for (const Ue of nt) rt.push(Ue);
|
|
3120
3120
|
const Qe = {
|
|
3121
3121
|
id: ((Dn = crypto.randomUUID) == null ? void 0 : Dn.call(crypto)) || `user-${Date.now()}`,
|
|
@@ -3150,13 +3150,13 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3150
3150
|
{
|
|
3151
3151
|
onError: (Ue) => console.warn("stream error", Ue),
|
|
3152
3152
|
onOpen: ({ threadId: Ue, created: cr }) => {
|
|
3153
|
-
!z && Ue && (
|
|
3153
|
+
!z && Ue && (X(Ue), cr && oe().catch(() => {
|
|
3154
3154
|
}));
|
|
3155
3155
|
}
|
|
3156
3156
|
}
|
|
3157
3157
|
);
|
|
3158
|
-
}, [z, S, p, C, w.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, oe,
|
|
3159
|
-
async (
|
|
3158
|
+
}, [z, S, p, C, w.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, oe, X, a, c]), Ae = Ye(
|
|
3159
|
+
async ($) => {
|
|
3160
3160
|
if (!z) throw new Error("No active thread");
|
|
3161
3161
|
if (M || !A) return;
|
|
3162
3162
|
const ae = G;
|
|
@@ -3165,17 +3165,17 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3165
3165
|
try {
|
|
3166
3166
|
const Be = await u.getMessages({
|
|
3167
3167
|
threadId: z,
|
|
3168
|
-
checkpointId:
|
|
3169
|
-
limit: (
|
|
3168
|
+
checkpointId: H,
|
|
3169
|
+
limit: ($ == null ? void 0 : $.limit) ?? I,
|
|
3170
3170
|
beforeId: ae
|
|
3171
3171
|
});
|
|
3172
|
-
|
|
3172
|
+
q(Be, "prepend");
|
|
3173
3173
|
} finally {
|
|
3174
3174
|
W(!1);
|
|
3175
3175
|
}
|
|
3176
3176
|
}
|
|
3177
3177
|
},
|
|
3178
|
-
[u, z,
|
|
3178
|
+
[u, z, H, G, A, M, q]
|
|
3179
3179
|
), ve = {
|
|
3180
3180
|
baseUrl: u.baseUrl,
|
|
3181
3181
|
token: v,
|
|
@@ -3183,7 +3183,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3183
3183
|
api: u,
|
|
3184
3184
|
threads: O,
|
|
3185
3185
|
currentThreadId: z,
|
|
3186
|
-
setCurrentThreadId:
|
|
3186
|
+
setCurrentThreadId: X,
|
|
3187
3187
|
messages: w.messages,
|
|
3188
3188
|
isStreaming: d,
|
|
3189
3189
|
error: h,
|
|
@@ -3243,7 +3243,7 @@ function Go(e, t) {
|
|
|
3243
3243
|
function sv(e, t) {
|
|
3244
3244
|
return t(e);
|
|
3245
3245
|
}
|
|
3246
|
-
function
|
|
3246
|
+
function He(...e) {
|
|
3247
3247
|
return e;
|
|
3248
3248
|
}
|
|
3249
3249
|
function Oe(e, t) {
|
|
@@ -3255,7 +3255,7 @@ function ye(e, t) {
|
|
|
3255
3255
|
function Bi(e) {
|
|
3256
3256
|
e(rr);
|
|
3257
3257
|
}
|
|
3258
|
-
function
|
|
3258
|
+
function qe(e) {
|
|
3259
3259
|
return e(Wc);
|
|
3260
3260
|
}
|
|
3261
3261
|
function ue(e, t) {
|
|
@@ -3278,7 +3278,7 @@ function ml(e) {
|
|
|
3278
3278
|
function Gc(e, t) {
|
|
3279
3279
|
return e === t;
|
|
3280
3280
|
}
|
|
3281
|
-
function
|
|
3281
|
+
function $e(e = Gc) {
|
|
3282
3282
|
let t;
|
|
3283
3283
|
return (n) => (r) => {
|
|
3284
3284
|
e(t, r) || (t = r, n(r));
|
|
@@ -3443,7 +3443,7 @@ function Ze(...e) {
|
|
|
3443
3443
|
};
|
|
3444
3444
|
}
|
|
3445
3445
|
function he(e, t = Gc) {
|
|
3446
|
-
return B(e,
|
|
3446
|
+
return B(e, $e(t));
|
|
3447
3447
|
}
|
|
3448
3448
|
function si(...e) {
|
|
3449
3449
|
return function(t, n) {
|
|
@@ -3470,7 +3470,7 @@ const uv = {
|
|
|
3470
3470
|
return {
|
|
3471
3471
|
log: V((t, n, r = 1) => {
|
|
3472
3472
|
var o;
|
|
3473
|
-
const s = (o = dv().VIRTUOSO_LOG_LEVEL) != null ? o :
|
|
3473
|
+
const s = (o = dv().VIRTUOSO_LOG_LEVEL) != null ? o : qe(e);
|
|
3474
3474
|
r >= s && console[uv[r]](
|
|
3475
3475
|
"%creact-virtuoso: %c%s %o",
|
|
3476
3476
|
"color: #0253b3; font-weight: bold",
|
|
@@ -3486,9 +3486,9 @@ const uv = {
|
|
|
3486
3486
|
{ singleton: !0 }
|
|
3487
3487
|
);
|
|
3488
3488
|
function Pn(e, t, n) {
|
|
3489
|
-
return
|
|
3489
|
+
return $i(e, t, n).callbackRef;
|
|
3490
3490
|
}
|
|
3491
|
-
function
|
|
3491
|
+
function $i(e, t, n) {
|
|
3492
3492
|
const r = K.useRef(null);
|
|
3493
3493
|
let o = (i) => {
|
|
3494
3494
|
};
|
|
@@ -3524,7 +3524,7 @@ function fv(e, t, n, r, o, s, i, a, c) {
|
|
|
3524
3524
|
},
|
|
3525
3525
|
[e, t, o, s, i, r, a]
|
|
3526
3526
|
);
|
|
3527
|
-
return
|
|
3527
|
+
return $i(u, n, c);
|
|
3528
3528
|
}
|
|
3529
3529
|
function hv(e, t, n, r) {
|
|
3530
3530
|
const o = e.length;
|
|
@@ -3568,7 +3568,7 @@ function Kc(e, t, n) {
|
|
|
3568
3568
|
},
|
|
3569
3569
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3570
3570
|
[e, t]
|
|
3571
|
-
), { callbackRef: s, ref: i } =
|
|
3571
|
+
), { callbackRef: s, ref: i } = $i(o, !0, n), a = K.useCallback(() => {
|
|
3572
3572
|
o(i.current);
|
|
3573
3573
|
}, [o, i]);
|
|
3574
3574
|
return K.useEffect(() => {
|
|
@@ -3680,8 +3680,8 @@ function ii(e, t) {
|
|
|
3680
3680
|
if (De(o))
|
|
3681
3681
|
return r;
|
|
3682
3682
|
{
|
|
3683
|
-
const [s, i] =
|
|
3684
|
-
return io(et(e, { k: s, l:
|
|
3683
|
+
const [s, i] = Xc(r);
|
|
3684
|
+
return io(et(e, { k: s, l: qc(r), v: i }));
|
|
3685
3685
|
}
|
|
3686
3686
|
} else return t < n ? io(et(e, { l: ii(r, t) })) : io(et(e, { r: ii(o, t) }));
|
|
3687
3687
|
}
|
|
@@ -3738,14 +3738,14 @@ function et(e, t) {
|
|
|
3738
3738
|
t.r !== void 0 ? t.r : e.r
|
|
3739
3739
|
);
|
|
3740
3740
|
}
|
|
3741
|
-
function
|
|
3742
|
-
return De(e.r) ? e.l : io(et(e, { r:
|
|
3741
|
+
function qc(e) {
|
|
3742
|
+
return De(e.r) ? e.l : io(et(e, { r: qc(e.r) }));
|
|
3743
3743
|
}
|
|
3744
3744
|
function As(e) {
|
|
3745
3745
|
return De(e) || e.lvl > e.r.lvl;
|
|
3746
3746
|
}
|
|
3747
|
-
function
|
|
3748
|
-
return De(e.r) ? [e.k, e.v] :
|
|
3747
|
+
function Xc(e) {
|
|
3748
|
+
return De(e.r) ? [e.k, e.v] : Xc(e.r);
|
|
3749
3749
|
}
|
|
3750
3750
|
function Jc(e, t, n, r = yr, o = yr) {
|
|
3751
3751
|
return { k: e, l: r, lvl: n, r: o, v: t };
|
|
@@ -3770,7 +3770,7 @@ function Qc(e, t) {
|
|
|
3770
3770
|
function Cr(e, t) {
|
|
3771
3771
|
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
3772
3772
|
}
|
|
3773
|
-
const
|
|
3773
|
+
const Hi = je(
|
|
3774
3774
|
() => ({ recalcInProgress: V(!1) }),
|
|
3775
3775
|
[],
|
|
3776
3776
|
{ singleton: !0 }
|
|
@@ -3940,12 +3940,12 @@ const Rv = {
|
|
|
3940
3940
|
}, Zt = je(
|
|
3941
3941
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
3942
3942
|
const n = Ee(), r = Ee(), o = ct(r, 0), s = Ee(), i = Ee(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S, C) => cn(S, Rv[C])), p = V(void 0), x = V(0), g = gv(), v = ct(
|
|
3943
|
-
B(n, Se(c, e, x), Yt(yv, g),
|
|
3943
|
+
B(n, Se(c, e, x), Yt(yv, g), $e()),
|
|
3944
3944
|
g
|
|
3945
3945
|
), m = ct(
|
|
3946
3946
|
B(
|
|
3947
3947
|
c,
|
|
3948
|
-
|
|
3948
|
+
$e(),
|
|
3949
3949
|
Yt((S, C) => ({ current: C, prev: S.current }), {
|
|
3950
3950
|
current: [],
|
|
3951
3951
|
prev: []
|
|
@@ -3994,7 +3994,7 @@ const Rv = {
|
|
|
3994
3994
|
ue(
|
|
3995
3995
|
B(
|
|
3996
3996
|
d,
|
|
3997
|
-
pe((S) => S !== void 0 && De(
|
|
3997
|
+
pe((S) => S !== void 0 && De(qe(v).sizeTree)),
|
|
3998
3998
|
re((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
|
|
3999
3999
|
),
|
|
4000
4000
|
n
|
|
@@ -4023,11 +4023,11 @@ const Rv = {
|
|
|
4023
4023
|
re((S) => S.diff)
|
|
4024
4024
|
),
|
|
4025
4025
|
(S) => {
|
|
4026
|
-
const { groupIndices: C } =
|
|
4026
|
+
const { groupIndices: C } = qe(v);
|
|
4027
4027
|
if (S > 0)
|
|
4028
4028
|
ye(t, !0), ye(s, S + xl(S, C));
|
|
4029
4029
|
else if (S < 0) {
|
|
4030
|
-
const R =
|
|
4030
|
+
const R = qe(m);
|
|
4031
4031
|
R.length > 0 && (S -= xl(-S, R)), ye(i, S);
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
@@ -4049,32 +4049,32 @@ const Rv = {
|
|
|
4049
4049
|
const k = Sr(C.sizeTree, 0);
|
|
4050
4050
|
let M = 0, W = 0;
|
|
4051
4051
|
for (; M < S; ) {
|
|
4052
|
-
const N = C.groupIndices[W],
|
|
4052
|
+
const N = C.groupIndices[W], H = C.groupIndices.length === W + 1 ? 1 / 0 : C.groupIndices[W + 1] - N - 1;
|
|
4053
4053
|
I.push({
|
|
4054
4054
|
endIndex: N,
|
|
4055
4055
|
size: k,
|
|
4056
4056
|
startIndex: N
|
|
4057
4057
|
}), I.push({
|
|
4058
|
-
endIndex: N + 1 +
|
|
4058
|
+
endIndex: N + 1 + H - 1,
|
|
4059
4059
|
size: A,
|
|
4060
4060
|
startIndex: N + 1
|
|
4061
|
-
}), W++, M +=
|
|
4061
|
+
}), W++, M += H + 1;
|
|
4062
4062
|
}
|
|
4063
4063
|
const G = Sn(C.sizeTree);
|
|
4064
4064
|
return M !== S && G.shift(), G.reduce(
|
|
4065
|
-
(N, { k:
|
|
4066
|
-
let
|
|
4067
|
-
return N.prevSize !== 0 && (
|
|
4065
|
+
(N, { k: H, v: L }) => {
|
|
4066
|
+
let q = N.ranges;
|
|
4067
|
+
return N.prevSize !== 0 && (q = [
|
|
4068
4068
|
...N.ranges,
|
|
4069
4069
|
{
|
|
4070
|
-
endIndex:
|
|
4070
|
+
endIndex: H + S - 1,
|
|
4071
4071
|
size: N.prevSize,
|
|
4072
4072
|
startIndex: N.prevIndex
|
|
4073
4073
|
}
|
|
4074
4074
|
]), {
|
|
4075
|
-
prevIndex:
|
|
4075
|
+
prevIndex: H + S,
|
|
4076
4076
|
prevSize: L,
|
|
4077
|
-
ranges:
|
|
4077
|
+
ranges: q
|
|
4078
4078
|
};
|
|
4079
4079
|
},
|
|
4080
4080
|
{
|
|
@@ -4119,14 +4119,14 @@ const Rv = {
|
|
|
4119
4119
|
if (De(C.sizeTree))
|
|
4120
4120
|
return C;
|
|
4121
4121
|
let I = Vn();
|
|
4122
|
-
const A =
|
|
4122
|
+
const A = qe(m);
|
|
4123
4123
|
let k = 0, M = 0, W = 0;
|
|
4124
4124
|
for (; k < -S; ) {
|
|
4125
4125
|
W = A[M];
|
|
4126
4126
|
const G = A[M + 1] - W - 1;
|
|
4127
4127
|
M++, k += G + 1;
|
|
4128
4128
|
}
|
|
4129
|
-
if (I = Sn(C.sizeTree).reduce((G, { k: N, v:
|
|
4129
|
+
if (I = Sn(C.sizeTree).reduce((G, { k: N, v: H }) => yt(G, Math.max(0, N + S), H), I), k !== -S) {
|
|
4130
4130
|
const G = Sr(C.sizeTree, W);
|
|
4131
4131
|
I = yt(I, 0, G);
|
|
4132
4132
|
const N = Bt(C.sizeTree, -S + 1)[1];
|
|
@@ -4170,7 +4170,7 @@ const Rv = {
|
|
|
4170
4170
|
unshiftWith: s
|
|
4171
4171
|
};
|
|
4172
4172
|
},
|
|
4173
|
-
|
|
4173
|
+
He(pn, Hi),
|
|
4174
4174
|
{ singleton: !0 }
|
|
4175
4175
|
);
|
|
4176
4176
|
function Ev(e) {
|
|
@@ -4202,27 +4202,27 @@ const ru = je(
|
|
|
4202
4202
|
Ze(o, t, r),
|
|
4203
4203
|
pe(([c, u]) => Yo(u)),
|
|
4204
4204
|
re(([c, u, d]) => Bt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
|
|
4205
|
-
|
|
4205
|
+
$e(),
|
|
4206
4206
|
re((c) => [c])
|
|
4207
4207
|
),
|
|
4208
4208
|
i
|
|
4209
4209
|
), { groupCounts: s, topItemsIndexes: i };
|
|
4210
4210
|
},
|
|
4211
|
-
|
|
4211
|
+
He(Zt, ft)
|
|
4212
4212
|
), mn = je(
|
|
4213
4213
|
([{ log: e }]) => {
|
|
4214
4214
|
const t = V(!1), n = St(
|
|
4215
4215
|
B(
|
|
4216
4216
|
t,
|
|
4217
4217
|
pe((r) => r),
|
|
4218
|
-
|
|
4218
|
+
$e()
|
|
4219
4219
|
)
|
|
4220
4220
|
);
|
|
4221
4221
|
return Oe(t, (r) => {
|
|
4222
|
-
r &&
|
|
4222
|
+
r && qe(e)("props updated", {}, gt.DEBUG);
|
|
4223
4223
|
}), { didMount: n, propsReady: t };
|
|
4224
4224
|
},
|
|
4225
|
-
|
|
4225
|
+
He(pn),
|
|
4226
4226
|
{ singleton: !0 }
|
|
4227
4227
|
), Iv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
4228
4228
|
function ou(e) {
|
|
@@ -4261,13 +4261,13 @@ const Lr = je(
|
|
|
4261
4261
|
G,
|
|
4262
4262
|
N
|
|
4263
4263
|
]) => {
|
|
4264
|
-
const
|
|
4265
|
-
let
|
|
4266
|
-
L === "end" ? (
|
|
4264
|
+
const H = ou(E), { align: L, behavior: q, offset: O } = H, _ = R - 1, z = nu(H, S, _);
|
|
4265
|
+
let X = Tr(z, S.offsetTree, W) + A;
|
|
4266
|
+
L === "end" ? (X += G + Bt(S.sizeTree, z)[1] - C + N, z === _ && (X += k)) : L === "center" ? X += (G + Bt(S.sizeTree, z)[1] - C + N) / 2 : X -= I, O && (X += O);
|
|
4267
4267
|
const oe = (F) => {
|
|
4268
4268
|
y(), F ? (M("retrying to scroll to", { location: E }, gt.DEBUG), ye(x, E)) : (ye(g, !0), M("list did not change, scroll successful", {}, gt.DEBUG));
|
|
4269
4269
|
};
|
|
4270
|
-
if (y(),
|
|
4270
|
+
if (y(), q === "smooth") {
|
|
4271
4271
|
let F = !1;
|
|
4272
4272
|
w = Oe(t, (Q) => {
|
|
4273
4273
|
F = F || Q;
|
|
@@ -4278,7 +4278,7 @@ const Lr = je(
|
|
|
4278
4278
|
m = Lt(B(t, Nv(150)), oe);
|
|
4279
4279
|
return b = setTimeout(() => {
|
|
4280
4280
|
y();
|
|
4281
|
-
}, 1200), ye(c, !0), M("scrolling from index to", { behavior:
|
|
4281
|
+
}, 1200), ye(c, !0), M("scrolling from index to", { behavior: q, index: z, top: X }, gt.DEBUG), { behavior: q, top: X };
|
|
4282
4282
|
}
|
|
4283
4283
|
)
|
|
4284
4284
|
),
|
|
@@ -4289,7 +4289,7 @@ const Lr = je(
|
|
|
4289
4289
|
topListHeight: v
|
|
4290
4290
|
};
|
|
4291
4291
|
},
|
|
4292
|
-
|
|
4292
|
+
He(Zt, ft, pn),
|
|
4293
4293
|
{ singleton: !0 }
|
|
4294
4294
|
);
|
|
4295
4295
|
function Nv(e) {
|
|
@@ -4352,7 +4352,7 @@ const Fr = je(
|
|
|
4352
4352
|
scrolledToInitialItem: a
|
|
4353
4353
|
};
|
|
4354
4354
|
},
|
|
4355
|
-
|
|
4355
|
+
He(Zt, ft, Lr, mn),
|
|
4356
4356
|
{ singleton: !0 }
|
|
4357
4357
|
);
|
|
4358
4358
|
function su(e, t) {
|
|
@@ -4371,18 +4371,18 @@ const Rr = "up", vr = "down", jv = "none", Av = {
|
|
|
4371
4371
|
const i = V(!1), a = V(!0), c = Ee(), u = Ee(), d = V(4), h = V(kv), p = ct(
|
|
4372
4372
|
B(
|
|
4373
4373
|
si(B(he(o), In(1), Gt(!0)), B(he(o), In(1), Gt(!1), ml(100))),
|
|
4374
|
-
|
|
4374
|
+
$e()
|
|
4375
4375
|
),
|
|
4376
4376
|
!1
|
|
4377
4377
|
), x = ct(
|
|
4378
|
-
B(si(B(n, Gt(!0)), B(n, Gt(!1), ml(200))),
|
|
4378
|
+
B(si(B(n, Gt(!0)), B(n, Gt(!1), ml(200))), $e()),
|
|
4379
4379
|
!1
|
|
4380
4380
|
);
|
|
4381
4381
|
ue(
|
|
4382
4382
|
B(
|
|
4383
4383
|
Ze(he(o), he(h)),
|
|
4384
4384
|
re(([w, y]) => w <= y),
|
|
4385
|
-
|
|
4385
|
+
$e()
|
|
4386
4386
|
),
|
|
4387
4387
|
a
|
|
4388
4388
|
), ue(B(a, nn(50)), u);
|
|
@@ -4411,7 +4411,7 @@ const Rr = "up", vr = "down", jv = "none", Av = {
|
|
|
4411
4411
|
state: k
|
|
4412
4412
|
};
|
|
4413
4413
|
}, Av),
|
|
4414
|
-
|
|
4414
|
+
$e((w, y) => w && w.atBottom === y.atBottom)
|
|
4415
4415
|
)
|
|
4416
4416
|
), v = ct(
|
|
4417
4417
|
B(
|
|
@@ -4459,9 +4459,9 @@ const Rr = "up", vr = "down", jv = "none", Av = {
|
|
|
4459
4459
|
B(
|
|
4460
4460
|
r,
|
|
4461
4461
|
re(({ scrollTop: w }) => w),
|
|
4462
|
-
|
|
4462
|
+
$e(),
|
|
4463
4463
|
Yt(
|
|
4464
|
-
(w, y) =>
|
|
4464
|
+
(w, y) => qe(x) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? Rr : vr, prevScrollTop: y },
|
|
4465
4465
|
{ direction: vr, prevScrollTop: 0 }
|
|
4466
4466
|
),
|
|
4467
4467
|
re((w) => w.direction)
|
|
@@ -4499,7 +4499,7 @@ const Rr = "up", vr = "down", jv = "none", Av = {
|
|
|
4499
4499
|
scrollDirection: m,
|
|
4500
4500
|
scrollVelocity: b
|
|
4501
4501
|
};
|
|
4502
|
-
},
|
|
4502
|
+
}, He(ft)), Ro = "top", Eo = "bottom", bl = "none";
|
|
4503
4503
|
function wl(e, t, n) {
|
|
4504
4504
|
return typeof e == "number" ? n === Rr && t === Ro || n === vr && t === Eo ? e : 0 : n === Rr ? t === Ro ? e.main : e.reverse : t === Eo ? e.main : e.reverse;
|
|
4505
4505
|
}
|
|
@@ -4544,7 +4544,7 @@ const Vi = je(
|
|
|
4544
4544
|
}
|
|
4545
4545
|
),
|
|
4546
4546
|
pe((d) => d != null),
|
|
4547
|
-
|
|
4547
|
+
$e(Cr)
|
|
4548
4548
|
),
|
|
4549
4549
|
[0, 0]
|
|
4550
4550
|
);
|
|
@@ -4558,7 +4558,7 @@ const Vi = je(
|
|
|
4558
4558
|
visibleRange: u
|
|
4559
4559
|
};
|
|
4560
4560
|
},
|
|
4561
|
-
|
|
4561
|
+
He(ft),
|
|
4562
4562
|
{ singleton: !0 }
|
|
4563
4563
|
);
|
|
4564
4564
|
function Pv(e, t, n) {
|
|
@@ -4689,16 +4689,16 @@ const _n = je(
|
|
|
4689
4689
|
W,
|
|
4690
4690
|
G,
|
|
4691
4691
|
N,
|
|
4692
|
-
|
|
4692
|
+
H
|
|
4693
4693
|
]) => {
|
|
4694
|
-
const L = A, { offsetTree:
|
|
4694
|
+
const L = A, { offsetTree: q, sizeTree: O } = L, _ = qe(m);
|
|
4695
4695
|
if (I === 0)
|
|
4696
4696
|
return { ...ks, totalCount: I };
|
|
4697
4697
|
if (C === 0 && R === 0)
|
|
4698
|
-
return _ === 0 ? { ...ks, totalCount: I } : iu(_, k, A, G, N,
|
|
4698
|
+
return _ === 0 ? { ...ks, totalCount: I } : iu(_, k, A, G, N, H || []);
|
|
4699
4699
|
if (De(O))
|
|
4700
4700
|
return _ > 0 ? null : ao(
|
|
4701
|
-
Pv(Wi(k, I), L,
|
|
4701
|
+
Pv(Wi(k, I), L, H),
|
|
4702
4702
|
[],
|
|
4703
4703
|
I,
|
|
4704
4704
|
N,
|
|
@@ -4712,12 +4712,12 @@ const _n = je(
|
|
|
4712
4712
|
for (const P of Ko(O, de, be)) {
|
|
4713
4713
|
const Z = P.value, ne = Math.max(P.start, de), le = Math.min(P.end, be);
|
|
4714
4714
|
for (let ie = ne; ie <= le; ie++)
|
|
4715
|
-
z.push({ data:
|
|
4715
|
+
z.push({ data: H == null ? void 0 : H[ie], index: ie, offset: Y, size: Z }), Y += Z;
|
|
4716
4716
|
}
|
|
4717
4717
|
}
|
|
4718
4718
|
if (!M)
|
|
4719
4719
|
return ao([], z, I, N, L, G);
|
|
4720
|
-
const
|
|
4720
|
+
const X = W.length > 0 ? W[W.length - 1] + 1 : 0, oe = wv(q, C, R, X);
|
|
4721
4721
|
if (oe.length === 0)
|
|
4722
4722
|
return null;
|
|
4723
4723
|
const F = I - 1, Q = Go([], (de) => {
|
|
@@ -4730,10 +4730,10 @@ const _n = je(
|
|
|
4730
4730
|
const ie = Z - be.start;
|
|
4731
4731
|
P += ie * ne + ie * N;
|
|
4732
4732
|
}
|
|
4733
|
-
Z <
|
|
4733
|
+
Z < X && (P += (X - Z) * ne, Z = X);
|
|
4734
4734
|
const le = Math.min(be.end, F);
|
|
4735
4735
|
for (let ie = Z; ie <= le && !(P >= R); ie++)
|
|
4736
|
-
de.push({ data:
|
|
4736
|
+
de.push({ data: H == null ? void 0 : H[ie], index: ie, offset: P, size: ne }), P += ne + N;
|
|
4737
4737
|
}
|
|
4738
4738
|
});
|
|
4739
4739
|
return ao(Q, z, I, N, L, G);
|
|
@@ -4741,7 +4741,7 @@ const _n = je(
|
|
|
4741
4741
|
),
|
|
4742
4742
|
//@ts-expect-error filter needs to be fixed
|
|
4743
4743
|
pe((C) => C !== null),
|
|
4744
|
-
|
|
4744
|
+
$e()
|
|
4745
4745
|
),
|
|
4746
4746
|
ks
|
|
4747
4747
|
);
|
|
@@ -4778,7 +4778,7 @@ const _n = je(
|
|
|
4778
4778
|
Se(o, e),
|
|
4779
4779
|
pe(([{ items: C }, R]) => C[C.length - 1].originalIndex === R - 1),
|
|
4780
4780
|
re(([, C, R]) => [C - 1, R]),
|
|
4781
|
-
|
|
4781
|
+
$e(Cr),
|
|
4782
4782
|
re(([C]) => C)
|
|
4783
4783
|
)
|
|
4784
4784
|
), E = St(
|
|
@@ -4787,7 +4787,7 @@ const _n = je(
|
|
|
4787
4787
|
nn(200),
|
|
4788
4788
|
pe(({ items: C, topItems: R }) => C.length > 0 && C[0].originalIndex === R.length),
|
|
4789
4789
|
re(({ items: C }) => C[0].index),
|
|
4790
|
-
|
|
4790
|
+
$e()
|
|
4791
4791
|
)
|
|
4792
4792
|
), S = St(
|
|
4793
4793
|
B(
|
|
@@ -4804,12 +4804,12 @@ const _n = je(
|
|
|
4804
4804
|
startIndex: C[R].index
|
|
4805
4805
|
};
|
|
4806
4806
|
}),
|
|
4807
|
-
|
|
4807
|
+
$e(Qc)
|
|
4808
4808
|
)
|
|
4809
4809
|
);
|
|
4810
4810
|
return { endReached: y, initialItemCount: m, itemsRendered: b, listState: w, rangeChanged: S, startReached: E, topItemsIndexes: v, ...p };
|
|
4811
4811
|
},
|
|
4812
|
-
|
|
4812
|
+
He(
|
|
4813
4813
|
Zt,
|
|
4814
4814
|
ru,
|
|
4815
4815
|
Vi,
|
|
@@ -4817,7 +4817,7 @@ const _n = je(
|
|
|
4817
4817
|
Lr,
|
|
4818
4818
|
Br,
|
|
4819
4819
|
mn,
|
|
4820
|
-
|
|
4820
|
+
Hi
|
|
4821
4821
|
),
|
|
4822
4822
|
{ singleton: !0 }
|
|
4823
4823
|
), au = je(
|
|
@@ -4831,7 +4831,7 @@ const _n = je(
|
|
|
4831
4831
|
);
|
|
4832
4832
|
return ue(he(i), s), { totalListHeight: i, totalListHeightChanged: s };
|
|
4833
4833
|
},
|
|
4834
|
-
|
|
4834
|
+
He(ft, _n),
|
|
4835
4835
|
{ singleton: !0 }
|
|
4836
4836
|
), _v = je(
|
|
4837
4837
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
@@ -4841,13 +4841,13 @@ const _n = je(
|
|
|
4841
4841
|
pe(([o]) => o),
|
|
4842
4842
|
re(([, o, s]) => Math.max(0, o - s)),
|
|
4843
4843
|
nn(0),
|
|
4844
|
-
|
|
4844
|
+
$e()
|
|
4845
4845
|
),
|
|
4846
4846
|
0
|
|
4847
4847
|
);
|
|
4848
4848
|
return { alignToBottom: n, paddingTopAddition: r };
|
|
4849
4849
|
},
|
|
4850
|
-
|
|
4850
|
+
He(ft, au),
|
|
4851
4851
|
{ singleton: !0 }
|
|
4852
4852
|
), lu = je(() => ({
|
|
4853
4853
|
context: V(null)
|
|
@@ -4880,10 +4880,10 @@ const _n = je(
|
|
|
4880
4880
|
return N ? R && Lt(
|
|
4881
4881
|
B(
|
|
4882
4882
|
i,
|
|
4883
|
-
pe((
|
|
4883
|
+
pe((H) => !H),
|
|
4884
4884
|
// skips the initial publish of false, and the cleanup call.
|
|
4885
4885
|
// but if scrollingInProgress is true, we skip the initial publish.
|
|
4886
|
-
In(
|
|
4886
|
+
In(qe(i) ? 1 : 2)
|
|
4887
4887
|
),
|
|
4888
4888
|
R
|
|
4889
4889
|
) : R && R(), N;
|
|
@@ -4895,7 +4895,7 @@ const _n = je(
|
|
|
4895
4895
|
scrollIntoView: d
|
|
4896
4896
|
};
|
|
4897
4897
|
},
|
|
4898
|
-
|
|
4898
|
+
He(Zt, ft, Lr, _n, pn),
|
|
4899
4899
|
{ singleton: !0 }
|
|
4900
4900
|
);
|
|
4901
4901
|
function Cl(e) {
|
|
@@ -4933,16 +4933,16 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
4933
4933
|
pe(({ shouldFollow: S }) => S)
|
|
4934
4934
|
),
|
|
4935
4935
|
({ followOutputBehavior: S, totalCount: C }) => {
|
|
4936
|
-
m && (m(), m = null),
|
|
4937
|
-
|
|
4936
|
+
m && (m(), m = null), qe(n) ? requestAnimationFrame(() => {
|
|
4937
|
+
qe(d)("following output to ", { totalCount: C }, gt.DEBUG), b(S);
|
|
4938
4938
|
}) : m = Lt(e, () => {
|
|
4939
|
-
|
|
4939
|
+
qe(d)("following output to ", { totalCount: C }, gt.DEBUG), b(S), m = null;
|
|
4940
4940
|
});
|
|
4941
4941
|
}
|
|
4942
4942
|
);
|
|
4943
4943
|
function w(S) {
|
|
4944
4944
|
const C = Lt(o, (R) => {
|
|
4945
|
-
S && !R.atBottom && R.notAtBottomBecause === "SIZE_INCREASED" && !m && (
|
|
4945
|
+
S && !R.atBottom && R.notAtBottomBecause === "SIZE_INCREASED" && !m && (qe(d)("scrolling to bottom due to increased size", {}, gt.DEBUG), b("auto"));
|
|
4946
4946
|
});
|
|
4947
4947
|
setTimeout(C, 100);
|
|
4948
4948
|
}
|
|
@@ -4958,10 +4958,10 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
4958
4958
|
Se(g, t)
|
|
4959
4959
|
),
|
|
4960
4960
|
([, S]) => {
|
|
4961
|
-
|
|
4961
|
+
qe(a) && w(S !== !1);
|
|
4962
4962
|
}
|
|
4963
4963
|
), Oe(v, () => {
|
|
4964
|
-
w(
|
|
4964
|
+
w(qe(g) !== !1);
|
|
4965
4965
|
}), Oe(Ze(he(g), o), ([S, C]) => {
|
|
4966
4966
|
S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && b("auto");
|
|
4967
4967
|
});
|
|
@@ -4987,15 +4987,15 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
4987
4987
|
nn(0)
|
|
4988
4988
|
),
|
|
4989
4989
|
(S) => {
|
|
4990
|
-
m && (m(), m = null),
|
|
4991
|
-
|
|
4990
|
+
m && (m(), m = null), qe(n) ? requestAnimationFrame(() => {
|
|
4991
|
+
qe(d)("scrolling into view", {}), ye(x, S);
|
|
4992
4992
|
}) : m = Lt(e, () => {
|
|
4993
|
-
|
|
4993
|
+
qe(d)("scrolling into view", {}), ye(x, S), m = null;
|
|
4994
4994
|
});
|
|
4995
4995
|
}
|
|
4996
4996
|
), { autoscrollToBottom: v, followOutput: g, scrollIntoViewOnChange: y };
|
|
4997
4997
|
},
|
|
4998
|
-
|
|
4998
|
+
He(
|
|
4999
4999
|
Zt,
|
|
5000
5000
|
Br,
|
|
5001
5001
|
Lr,
|
|
@@ -5017,7 +5017,7 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
5017
5017
|
),
|
|
5018
5018
|
i
|
|
5019
5019
|
), {}),
|
|
5020
|
-
|
|
5020
|
+
He(Zt, Fr, _n, mn),
|
|
5021
5021
|
{ singleton: !0 }
|
|
5022
5022
|
), Fv = je(
|
|
5023
5023
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
@@ -5047,7 +5047,7 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
5047
5047
|
initialScrollTop: r
|
|
5048
5048
|
};
|
|
5049
5049
|
},
|
|
5050
|
-
|
|
5050
|
+
He(mn, ft, _n),
|
|
5051
5051
|
{ singleton: !0 }
|
|
5052
5052
|
), uu = je(
|
|
5053
5053
|
([{ scrollVelocity: e }]) => {
|
|
@@ -5066,7 +5066,7 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
5066
5066
|
return !0;
|
|
5067
5067
|
return i;
|
|
5068
5068
|
}),
|
|
5069
|
-
|
|
5069
|
+
$e()
|
|
5070
5070
|
),
|
|
5071
5071
|
t
|
|
5072
5072
|
), Oe(
|
|
@@ -5076,7 +5076,7 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
5076
5076
|
}
|
|
5077
5077
|
), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
|
|
5078
5078
|
},
|
|
5079
|
-
|
|
5079
|
+
He(Br),
|
|
5080
5080
|
{ singleton: !0 }
|
|
5081
5081
|
), Gi = je(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
5082
5082
|
const n = Ee(), r = Ee(), o = Ee(), s = V(!1), i = V(void 0);
|
|
@@ -5110,7 +5110,7 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
5110
5110
|
windowScrollTo: o,
|
|
5111
5111
|
windowViewportRect: r
|
|
5112
5112
|
};
|
|
5113
|
-
},
|
|
5113
|
+
}, He(ft)), Bv = je(
|
|
5114
5114
|
([
|
|
5115
5115
|
{ sizeRanges: e, sizes: t },
|
|
5116
5116
|
{ headerHeight: n, scrollTop: r },
|
|
@@ -5128,12 +5128,12 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
5128
5128
|
const E = Sv(g.sizeTree);
|
|
5129
5129
|
m && b !== null && w !== null && (v = b.scrollTop - w.offsetTop), v -= y, x({ ranges: E, scrollTop: v });
|
|
5130
5130
|
}
|
|
5131
|
-
), ue(B(d, pe(Fi), re(
|
|
5131
|
+
), ue(B(d, pe(Fi), re($v)), o), ue(
|
|
5132
5132
|
B(
|
|
5133
5133
|
s,
|
|
5134
5134
|
Se(d),
|
|
5135
5135
|
pe(([, x]) => x !== void 0),
|
|
5136
|
-
|
|
5136
|
+
$e(),
|
|
5137
5137
|
re(([, x]) => x.ranges)
|
|
5138
5138
|
),
|
|
5139
5139
|
e
|
|
@@ -5142,12 +5142,12 @@ const Mv = (e, t) => typeof e == "function" ? Cl(e(t)) : t && Cl(e), Dv = je(
|
|
|
5142
5142
|
restoreStateFrom: d
|
|
5143
5143
|
};
|
|
5144
5144
|
},
|
|
5145
|
-
|
|
5145
|
+
He(Zt, ft, Fr, mn, Gi)
|
|
5146
5146
|
);
|
|
5147
|
-
function
|
|
5147
|
+
function $v(e) {
|
|
5148
5148
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
5149
5149
|
}
|
|
5150
|
-
const
|
|
5150
|
+
const Hv = je(([{ topItemsIndexes: e }]) => {
|
|
5151
5151
|
const t = V(0);
|
|
5152
5152
|
return ue(
|
|
5153
5153
|
B(
|
|
@@ -5157,7 +5157,7 @@ const $v = je(([{ topItemsIndexes: e }]) => {
|
|
|
5157
5157
|
),
|
|
5158
5158
|
e
|
|
5159
5159
|
), { topItemCount: t };
|
|
5160
|
-
},
|
|
5160
|
+
}, He(_n));
|
|
5161
5161
|
function du(e) {
|
|
5162
5162
|
let t = !1, n;
|
|
5163
5163
|
return () => (t || (t = !0, n = e()), n);
|
|
@@ -5240,7 +5240,7 @@ const zv = du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5240
5240
|
}
|
|
5241
5241
|
), { deviation: e };
|
|
5242
5242
|
},
|
|
5243
|
-
|
|
5243
|
+
He(ft, Br, _n, Zt, pn, Hi)
|
|
5244
5244
|
), Wv = je(
|
|
5245
5245
|
([
|
|
5246
5246
|
e,
|
|
@@ -5267,7 +5267,7 @@ const zv = du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5267
5267
|
...u,
|
|
5268
5268
|
...d
|
|
5269
5269
|
}),
|
|
5270
|
-
|
|
5270
|
+
He(
|
|
5271
5271
|
Vi,
|
|
5272
5272
|
Lv,
|
|
5273
5273
|
mn,
|
|
@@ -5343,7 +5343,7 @@ const zv = du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5343
5343
|
sizes: c,
|
|
5344
5344
|
...m
|
|
5345
5345
|
}),
|
|
5346
|
-
|
|
5346
|
+
He(
|
|
5347
5347
|
Zt,
|
|
5348
5348
|
Fr,
|
|
5349
5349
|
ft,
|
|
@@ -5352,7 +5352,7 @@ const zv = du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5352
5352
|
_n,
|
|
5353
5353
|
Lr,
|
|
5354
5354
|
Uv,
|
|
5355
|
-
|
|
5355
|
+
Hv,
|
|
5356
5356
|
ru,
|
|
5357
5357
|
Wv
|
|
5358
5358
|
)
|
|
@@ -5422,11 +5422,11 @@ function hu(e, t, n) {
|
|
|
5422
5422
|
);
|
|
5423
5423
|
return K.useSyncExternalStore(
|
|
5424
5424
|
w,
|
|
5425
|
-
() =>
|
|
5426
|
-
() =>
|
|
5425
|
+
() => qe(b),
|
|
5426
|
+
() => qe(b)
|
|
5427
5427
|
);
|
|
5428
5428
|
}, g = (m) => {
|
|
5429
|
-
const b = K.useContext(a)[m], [w, y] = K.useState(pl(
|
|
5429
|
+
const b = K.useContext(a)[m], [w, y] = K.useState(pl(qe, b));
|
|
5430
5430
|
return Gr(
|
|
5431
5431
|
() => Oe(b, (E) => {
|
|
5432
5432
|
E !== w && y(hl(E));
|
|
@@ -5516,7 +5516,7 @@ const Kv = /* @__PURE__ */ je(() => {
|
|
|
5516
5516
|
B(
|
|
5517
5517
|
n,
|
|
5518
5518
|
re((u) => u[a]),
|
|
5519
|
-
|
|
5519
|
+
$e()
|
|
5520
5520
|
),
|
|
5521
5521
|
c
|
|
5522
5522
|
);
|
|
@@ -5539,8 +5539,8 @@ const Kv = /* @__PURE__ */ je(() => {
|
|
|
5539
5539
|
};
|
|
5540
5540
|
}), Yv = /* @__PURE__ */ je(
|
|
5541
5541
|
([e, t]) => ({ ...e, ...t }),
|
|
5542
|
-
|
|
5543
|
-
),
|
|
5542
|
+
He(fu, Kv)
|
|
5543
|
+
), qv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Xv = { overflowAnchor: "none", position: Ki(), zIndex: 1 }, xu = { overflowAnchor: "none" }, Jv = { ...xu, display: "inline-block", height: "100%" }, Rl = /* @__PURE__ */ K.memo(function({ showTopList: e = !1 }) {
|
|
5544
5544
|
const t = xe("listState"), n = It("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = It("windowScrollContainerState"), i = It("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), h = xe("trackItemSizes"), p = xe("itemSize"), x = xe("log"), g = It("gap"), v = xe("horizontalDirection"), { callbackRef: m } = fv(
|
|
5545
5545
|
n,
|
|
5546
5546
|
p,
|
|
@@ -5552,10 +5552,10 @@ const Kv = /* @__PURE__ */ je(() => {
|
|
|
5552
5552
|
v,
|
|
5553
5553
|
xe("skipAnimationFrameInResizeObserver")
|
|
5554
5554
|
), [b, w] = K.useState(0);
|
|
5555
|
-
|
|
5555
|
+
qi("deviation", (N) => {
|
|
5556
5556
|
b !== N && w(N);
|
|
5557
5557
|
});
|
|
5558
|
-
const y = xe("EmptyPlaceholder"), E = xe("ScrollSeekPlaceholder") ||
|
|
5558
|
+
const y = xe("EmptyPlaceholder"), E = xe("ScrollSeekPlaceholder") || qv, S = xe("ListComponent"), C = xe("ItemComponent"), R = xe("GroupComponent"), I = xe("computeItemKey"), A = xe("isSeeking"), k = xe("groupIndices").length > 0, M = xe("alignToBottom"), W = xe("initialItemFinalLocationReached"), G = e ? {} : {
|
|
5559
5559
|
boxSizing: "border-box",
|
|
5560
5560
|
...v ? {
|
|
5561
5561
|
display: "inline-block",
|
|
@@ -5579,7 +5579,7 @@ const Kv = /* @__PURE__ */ je(() => {
|
|
|
5579
5579
|
ref: m,
|
|
5580
5580
|
style: G,
|
|
5581
5581
|
children: (e ? t.topItems : t.items).map((N) => {
|
|
5582
|
-
const
|
|
5582
|
+
const H = N.originalIndex, L = I(H + t.firstItemIndex, N.data, u);
|
|
5583
5583
|
return A ? /* @__PURE__ */ to(
|
|
5584
5584
|
E,
|
|
5585
5585
|
{
|
|
@@ -5594,11 +5594,11 @@ const Kv = /* @__PURE__ */ je(() => {
|
|
|
5594
5594
|
R,
|
|
5595
5595
|
{
|
|
5596
5596
|
...lt(R, u),
|
|
5597
|
-
"data-index":
|
|
5597
|
+
"data-index": H,
|
|
5598
5598
|
"data-item-index": N.index,
|
|
5599
5599
|
"data-known-size": N.size,
|
|
5600
5600
|
key: L,
|
|
5601
|
-
style:
|
|
5601
|
+
style: Xv
|
|
5602
5602
|
},
|
|
5603
5603
|
d(N.index, u)
|
|
5604
5604
|
) : /* @__PURE__ */ to(
|
|
@@ -5606,7 +5606,7 @@ const Kv = /* @__PURE__ */ je(() => {
|
|
|
5606
5606
|
{
|
|
5607
5607
|
...lt(C, u),
|
|
5608
5608
|
...tx(C, N.data),
|
|
5609
|
-
"data-index":
|
|
5609
|
+
"data-index": H,
|
|
5610
5610
|
"data-item-group-index": N.groupIndex,
|
|
5611
5611
|
"data-item-index": N.index,
|
|
5612
5612
|
"data-known-size": N.size,
|
|
@@ -5628,7 +5628,7 @@ const Kv = /* @__PURE__ */ je(() => {
|
|
|
5628
5628
|
outline: "none",
|
|
5629
5629
|
overflowX: "auto",
|
|
5630
5630
|
position: "relative"
|
|
5631
|
-
},
|
|
5631
|
+
}, qo = (e) => ({
|
|
5632
5632
|
height: "100%",
|
|
5633
5633
|
position: "absolute",
|
|
5634
5634
|
top: 0,
|
|
@@ -5731,7 +5731,7 @@ const ox = ({ children: e }) => {
|
|
|
5731
5731
|
), a = Pn(i, !0, xe("skipAnimationFrameInResizeObserver"));
|
|
5732
5732
|
return K.useEffect(() => {
|
|
5733
5733
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
5734
|
-
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "element", ref: a, style:
|
|
5734
|
+
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "element", ref: a, style: qo(o), children: e });
|
|
5735
5735
|
}, sx = ({ children: e }) => {
|
|
5736
5736
|
const t = K.useContext(pu), n = It("windowViewportRect"), r = It("fixedItemHeight"), o = xe("customScrollParent"), s = Kc(
|
|
5737
5737
|
n,
|
|
@@ -5740,7 +5740,7 @@ const ox = ({ children: e }) => {
|
|
|
5740
5740
|
), i = xe("alignToBottom");
|
|
5741
5741
|
return K.useEffect(() => {
|
|
5742
5742
|
t && (r(t.itemHeight), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
|
|
5743
|
-
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "window", ref: s, style:
|
|
5743
|
+
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "window", ref: s, style: qo(i), children: e });
|
|
5744
5744
|
}, ix = ({ children: e }) => {
|
|
5745
5745
|
const t = xe("TopItemListComponent") || "div", n = xe("headerHeight"), r = { ...ex, marginTop: `${n}px` }, o = xe("context");
|
|
5746
5746
|
return /* @__PURE__ */ l.jsx(t, { style: r, ...lt(t, o), children: e });
|
|
@@ -5756,7 +5756,7 @@ const ox = ({ children: e }) => {
|
|
|
5756
5756
|
] });
|
|
5757
5757
|
}), {
|
|
5758
5758
|
Component: lx,
|
|
5759
|
-
useEmitter:
|
|
5759
|
+
useEmitter: qi,
|
|
5760
5760
|
useEmitterValue: xe,
|
|
5761
5761
|
usePublisher: It
|
|
5762
5762
|
} = /* @__PURE__ */ hu(
|
|
@@ -5818,7 +5818,7 @@ const ox = ({ children: e }) => {
|
|
|
5818
5818
|
}
|
|
5819
5819
|
},
|
|
5820
5820
|
ax
|
|
5821
|
-
), cx = /* @__PURE__ */ bu({ useEmitter:
|
|
5821
|
+
), cx = /* @__PURE__ */ bu({ useEmitter: qi, useEmitterValue: xe, usePublisher: It }), ux = /* @__PURE__ */ wu({ useEmitter: qi, useEmitterValue: xe, usePublisher: It }), dx = lx, fx = /* @__PURE__ */ je(() => {
|
|
5822
5822
|
const e = V((u) => /* @__PURE__ */ l.jsxs("td", { children: [
|
|
5823
5823
|
"Item $",
|
|
5824
5824
|
u
|
|
@@ -5829,7 +5829,7 @@ const ox = ({ children: e }) => {
|
|
|
5829
5829
|
B(
|
|
5830
5830
|
s,
|
|
5831
5831
|
re((h) => h[u]),
|
|
5832
|
-
|
|
5832
|
+
$e()
|
|
5833
5833
|
),
|
|
5834
5834
|
d
|
|
5835
5835
|
);
|
|
@@ -5854,7 +5854,7 @@ const ox = ({ children: e }) => {
|
|
|
5854
5854
|
GroupComponent: c("Group", "tr")
|
|
5855
5855
|
};
|
|
5856
5856
|
});
|
|
5857
|
-
|
|
5857
|
+
He(fu, fx);
|
|
5858
5858
|
Ki();
|
|
5859
5859
|
const El = {
|
|
5860
5860
|
bottom: 0,
|
|
@@ -5898,7 +5898,7 @@ const gx = /* @__PURE__ */ je(
|
|
|
5898
5898
|
{ customScrollParent: m, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: E },
|
|
5899
5899
|
S
|
|
5900
5900
|
]) => {
|
|
5901
|
-
const C = V(0), R = V(0), I = V(El), A = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Ee(), W = Ee(), G = V(0), N = V(null),
|
|
5901
|
+
const C = V(0), R = V(0), I = V(El), A = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Ee(), W = Ee(), G = V(0), N = V(null), H = V({ column: 0, row: 0 }), L = Ee(), q = Ee(), O = V(!1), _ = V(0), z = V(!0), X = V(!1), oe = V(!1);
|
|
5902
5902
|
Oe(
|
|
5903
5903
|
B(
|
|
5904
5904
|
g,
|
|
@@ -5910,11 +5910,11 @@ const gx = /* @__PURE__ */ je(
|
|
|
5910
5910
|
}
|
|
5911
5911
|
), Oe(
|
|
5912
5912
|
B(
|
|
5913
|
-
Ze(g, z, k, A, _,
|
|
5913
|
+
Ze(g, z, k, A, _, X),
|
|
5914
5914
|
pe(([P, Z, ne, le, , ie]) => P && !Z && ne.height !== 0 && le.height !== 0 && !ie)
|
|
5915
5915
|
),
|
|
5916
5916
|
([, , , , P]) => {
|
|
5917
|
-
ye(
|
|
5917
|
+
ye(X, !0), Ui(1, () => {
|
|
5918
5918
|
ye(M, P);
|
|
5919
5919
|
}), Lt(B(u), () => {
|
|
5920
5920
|
ye(t, [0, 0]), ye(z, !0);
|
|
@@ -5922,7 +5922,7 @@ const gx = /* @__PURE__ */ je(
|
|
|
5922
5922
|
}
|
|
5923
5923
|
), ue(
|
|
5924
5924
|
B(
|
|
5925
|
-
|
|
5925
|
+
q,
|
|
5926
5926
|
pe((P) => P != null && P.scrollTop > 0),
|
|
5927
5927
|
Gt(0)
|
|
5928
5928
|
),
|
|
@@ -5930,11 +5930,11 @@ const gx = /* @__PURE__ */ je(
|
|
|
5930
5930
|
), Oe(
|
|
5931
5931
|
B(
|
|
5932
5932
|
g,
|
|
5933
|
-
Se(
|
|
5933
|
+
Se(q),
|
|
5934
5934
|
pe(([, P]) => P != null)
|
|
5935
5935
|
),
|
|
5936
5936
|
([, P]) => {
|
|
5937
|
-
P && (ye(A, P.viewport), ye(k, P.item), ye(
|
|
5937
|
+
P && (ye(A, P.viewport), ye(k, P.item), ye(H, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (Z) => {
|
|
5938
5938
|
ye(O, !1);
|
|
5939
5939
|
}), ye(c, { top: P.scrollTop })));
|
|
5940
5940
|
}
|
|
@@ -5949,7 +5949,7 @@ const gx = /* @__PURE__ */ je(
|
|
|
5949
5949
|
Ze(
|
|
5950
5950
|
he(A, Kr),
|
|
5951
5951
|
he(k, Kr),
|
|
5952
|
-
he(
|
|
5952
|
+
he(H, (P, Z) => P && P.column === Z.column && P.row === Z.row),
|
|
5953
5953
|
he(u)
|
|
5954
5954
|
),
|
|
5955
5955
|
re(([P, Z, ne, le]) => ({
|
|
@@ -5965,7 +5965,7 @@ const gx = /* @__PURE__ */ je(
|
|
|
5965
5965
|
Ze(
|
|
5966
5966
|
he(C),
|
|
5967
5967
|
r,
|
|
5968
|
-
he(
|
|
5968
|
+
he(H, mx),
|
|
5969
5969
|
he(k, Kr),
|
|
5970
5970
|
he(A, Kr),
|
|
5971
5971
|
he(N),
|
|
@@ -5988,7 +5988,7 @@ const gx = /* @__PURE__ */ je(
|
|
|
5988
5988
|
ce,
|
|
5989
5989
|
Ae
|
|
5990
5990
|
]) => {
|
|
5991
|
-
const { column: ve, row:
|
|
5991
|
+
const { column: ve, row: $ } = le, { height: ae, width: Be } = ie, { width: nt } = Pe;
|
|
5992
5992
|
if (Le === 0 && (P === 0 || nt === 0))
|
|
5993
5993
|
return El;
|
|
5994
5994
|
if (Be === 0) {
|
|
@@ -5997,8 +5997,8 @@ const gx = /* @__PURE__ */ je(
|
|
|
5997
5997
|
}
|
|
5998
5998
|
const ut = yu(nt, Be, ve);
|
|
5999
5999
|
let rt, Qe;
|
|
6000
|
-
ce ? Z === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((Z +
|
|
6001
|
-
const Tt = jl(rt, Qe, Fe), { bottom: We, top: st } = Al(Pe, le, ie, Tt), Ge = Il(P / ut), it = Ge * ae + (Ge - 1) *
|
|
6000
|
+
ce ? Z === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((Z + $) / (ae + $)), Qe = ut * Il((ne + $) / (ae + $)) - 1, Qe = Os(P - 1, xr(Qe, ut - 1)), rt = Os(Qe, xr(0, rt))) : (rt = 0, Qe = -1);
|
|
6001
|
+
const Tt = jl(rt, Qe, Fe), { bottom: We, top: st } = Al(Pe, le, ie, Tt), Ge = Il(P / ut), it = Ge * ae + (Ge - 1) * $ - We;
|
|
6002
6002
|
return { bottom: We, itemHeight: ae, items: Tt, itemWidth: Be, offsetBottom: it, offsetTop: st, top: st };
|
|
6003
6003
|
}
|
|
6004
6004
|
)
|
|
@@ -6013,13 +6013,13 @@ const gx = /* @__PURE__ */ je(
|
|
|
6013
6013
|
C
|
|
6014
6014
|
), ue(
|
|
6015
6015
|
B(
|
|
6016
|
-
Ze(A, k, I,
|
|
6016
|
+
Ze(A, k, I, H),
|
|
6017
6017
|
pe(([P, Z, { items: ne }]) => ne.length > 0 && Z.height !== 0 && P.height !== 0),
|
|
6018
6018
|
re(([P, Z, { items: ne }, le]) => {
|
|
6019
6019
|
const { bottom: ie, top: Pe } = Al(P, le, Z, ne);
|
|
6020
6020
|
return [Pe, ie];
|
|
6021
6021
|
}),
|
|
6022
|
-
|
|
6022
|
+
$e(Cr)
|
|
6023
6023
|
),
|
|
6024
6024
|
t
|
|
6025
6025
|
);
|
|
@@ -6042,14 +6042,14 @@ const gx = /* @__PURE__ */ je(
|
|
|
6042
6042
|
return (ne || P.bottom > 0 && P.itemHeight > 0 && P.offsetBottom === 0 && P.items.length === Z) && le;
|
|
6043
6043
|
}),
|
|
6044
6044
|
re(([[, P]]) => P - 1),
|
|
6045
|
-
|
|
6045
|
+
$e()
|
|
6046
6046
|
)
|
|
6047
6047
|
), de = St(
|
|
6048
6048
|
B(
|
|
6049
6049
|
he(I),
|
|
6050
6050
|
pe(({ items: P }) => P.length > 0 && P[0].index === 0),
|
|
6051
6051
|
Gt(0),
|
|
6052
|
-
|
|
6052
|
+
$e()
|
|
6053
6053
|
)
|
|
6054
6054
|
), be = St(
|
|
6055
6055
|
B(
|
|
@@ -6060,14 +6060,14 @@ const gx = /* @__PURE__ */ je(
|
|
|
6060
6060
|
endIndex: P[P.length - 1].index,
|
|
6061
6061
|
startIndex: P[0].index
|
|
6062
6062
|
})),
|
|
6063
|
-
|
|
6063
|
+
$e(Qc),
|
|
6064
6064
|
nn(0)
|
|
6065
6065
|
)
|
|
6066
6066
|
);
|
|
6067
6067
|
ue(be, x.scrollSeekRangeChanged), ue(
|
|
6068
6068
|
B(
|
|
6069
6069
|
M,
|
|
6070
|
-
Se(A, k, C,
|
|
6070
|
+
Se(A, k, C, H),
|
|
6071
6071
|
re(([P, Z, ne, le, ie]) => {
|
|
6072
6072
|
const Pe = ou(P), { align: Fe, behavior: Le, offset: ce } = Pe;
|
|
6073
6073
|
let Ae = Pe.index;
|
|
@@ -6097,13 +6097,13 @@ const gx = /* @__PURE__ */ je(
|
|
|
6097
6097
|
data: N,
|
|
6098
6098
|
deviation: G,
|
|
6099
6099
|
footerHeight: o,
|
|
6100
|
-
gap:
|
|
6100
|
+
gap: H,
|
|
6101
6101
|
headerHeight: s,
|
|
6102
6102
|
increaseViewportBy: e,
|
|
6103
6103
|
initialItemCount: R,
|
|
6104
6104
|
itemDimensions: k,
|
|
6105
6105
|
overscan: n,
|
|
6106
|
-
restoreStateFrom:
|
|
6106
|
+
restoreStateFrom: q,
|
|
6107
6107
|
scrollBy: i,
|
|
6108
6108
|
scrollContainerState: a,
|
|
6109
6109
|
scrollHeight: W,
|
|
@@ -6133,7 +6133,7 @@ const gx = /* @__PURE__ */ je(
|
|
|
6133
6133
|
...S
|
|
6134
6134
|
};
|
|
6135
6135
|
},
|
|
6136
|
-
|
|
6136
|
+
He(Vi, ft, Br, uu, mn, Gi, pn)
|
|
6137
6137
|
);
|
|
6138
6138
|
function yu(e, t, n) {
|
|
6139
6139
|
return xr(1, Io((e + n) / (Io(t) + n)));
|
|
@@ -6154,7 +6154,7 @@ const vx = /* @__PURE__ */ je(() => {
|
|
|
6154
6154
|
B(
|
|
6155
6155
|
t,
|
|
6156
6156
|
re((x) => x[h]),
|
|
6157
|
-
|
|
6157
|
+
$e()
|
|
6158
6158
|
),
|
|
6159
6159
|
p
|
|
6160
6160
|
), u = V(!1), d = V(!1);
|
|
@@ -6178,7 +6178,7 @@ const vx = /* @__PURE__ */ je(() => {
|
|
|
6178
6178
|
};
|
|
6179
6179
|
}), xx = /* @__PURE__ */ je(
|
|
6180
6180
|
([e, t]) => ({ ...e, ...t }),
|
|
6181
|
-
|
|
6181
|
+
He(gx, vx)
|
|
6182
6182
|
), bx = /* @__PURE__ */ K.memo(function() {
|
|
6183
6183
|
const e = ze("gridState"), t = ze("listClassName"), n = ze("itemClassName"), r = ze("itemContent"), o = ze("computeItemKey"), s = ze("isSeeking"), i = Nt("scrollHeight"), a = ze("ItemComponent"), c = ze("ListComponent"), u = ze("ScrollSeekPlaceholder"), d = ze("context"), h = Nt("itemDimensions"), p = Nt("gap"), x = ze("log"), g = ze("stateRestoreInProgress"), v = Nt("reportReadyState"), m = Pn(
|
|
6184
6184
|
K.useMemo(
|
|
@@ -6271,12 +6271,12 @@ const vx = /* @__PURE__ */ je(() => {
|
|
|
6271
6271
|
);
|
|
6272
6272
|
return K.useEffect(() => {
|
|
6273
6273
|
t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
|
|
6274
|
-
}, [t, r, n]), /* @__PURE__ */ l.jsx("div", { ref: o, style:
|
|
6274
|
+
}, [t, r, n]), /* @__PURE__ */ l.jsx("div", { ref: o, style: qo(!1), children: e });
|
|
6275
6275
|
}, Cx = ({ children: e }) => {
|
|
6276
6276
|
const t = K.useContext(mu), n = Nt("windowViewportRect"), r = Nt("itemDimensions"), o = ze("customScrollParent"), s = Kc(n, o, !1);
|
|
6277
6277
|
return K.useEffect(() => {
|
|
6278
6278
|
t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
|
|
6279
|
-
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style:
|
|
6279
|
+
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: qo(!1), children: e });
|
|
6280
6280
|
}, Tx = /* @__PURE__ */ K.memo(function({ ...e }) {
|
|
6281
6281
|
const t = ze("useWindowScroll"), n = ze("customScrollParent"), r = n || t ? Ex : Rx, o = n || t ? Cx : Sx, s = ze("context");
|
|
6282
6282
|
return /* @__PURE__ */ l.jsx(r, { ...e, ...lt(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
|
|
@@ -6625,7 +6625,7 @@ function Pl(e, t) {
|
|
|
6625
6625
|
return e(t);
|
|
6626
6626
|
e != null && (e.current = t);
|
|
6627
6627
|
}
|
|
6628
|
-
function
|
|
6628
|
+
function Xi(...e) {
|
|
6629
6629
|
return (t) => {
|
|
6630
6630
|
let n = !1;
|
|
6631
6631
|
const r = e.map((o) => {
|
|
@@ -6642,7 +6642,7 @@ function qi(...e) {
|
|
|
6642
6642
|
};
|
|
6643
6643
|
}
|
|
6644
6644
|
function Te(...e) {
|
|
6645
|
-
return f.useCallback(
|
|
6645
|
+
return f.useCallback(Xi(...e), e);
|
|
6646
6646
|
}
|
|
6647
6647
|
var Dx = [
|
|
6648
6648
|
"a",
|
|
@@ -6663,7 +6663,7 @@ var Dx = [
|
|
|
6663
6663
|
"svg",
|
|
6664
6664
|
"ul"
|
|
6665
6665
|
], me = Dx.reduce((e, t) => {
|
|
6666
|
-
const n =
|
|
6666
|
+
const n = qn(`Primitive.${t}`), r = f.forwardRef((o, s) => {
|
|
6667
6667
|
const { asChild: i, ...a } = o, c = i ? n : t;
|
|
6668
6668
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l.jsx(c, { ...a, ref: s });
|
|
6669
6669
|
});
|
|
@@ -6737,15 +6737,15 @@ function Bx(e) {
|
|
|
6737
6737
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
6738
6738
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
6739
6739
|
}
|
|
6740
|
-
var
|
|
6741
|
-
}),
|
|
6740
|
+
var $x = f[" useId ".trim().toString()] || (() => {
|
|
6741
|
+
}), Hx = 0;
|
|
6742
6742
|
function Ft(e) {
|
|
6743
|
-
const [t, n] = f.useState(
|
|
6743
|
+
const [t, n] = f.useState($x());
|
|
6744
6744
|
return tt(() => {
|
|
6745
|
-
n((r) => r ?? String(
|
|
6745
|
+
n((r) => r ?? String(Hx++));
|
|
6746
6746
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
6747
6747
|
}
|
|
6748
|
-
var
|
|
6748
|
+
var Xo = "Collapsible", [zx, JT] = Ut(Xo), [Ux, Ji] = zx(Xo), Eu = f.forwardRef(
|
|
6749
6749
|
(e, t) => {
|
|
6750
6750
|
const {
|
|
6751
6751
|
__scopeCollapsible: n,
|
|
@@ -6758,7 +6758,7 @@ var qo = "Collapsible", [zx, JT] = Ut(qo), [Ux, Ji] = zx(qo), Eu = f.forwardRef(
|
|
|
6758
6758
|
prop: r,
|
|
6759
6759
|
defaultProp: o ?? !1,
|
|
6760
6760
|
onChange: i,
|
|
6761
|
-
caller:
|
|
6761
|
+
caller: Xo
|
|
6762
6762
|
});
|
|
6763
6763
|
return /* @__PURE__ */ l.jsx(
|
|
6764
6764
|
Ux,
|
|
@@ -6781,7 +6781,7 @@ var qo = "Collapsible", [zx, JT] = Ut(qo), [Ux, Ji] = zx(qo), Eu = f.forwardRef(
|
|
|
6781
6781
|
);
|
|
6782
6782
|
}
|
|
6783
6783
|
);
|
|
6784
|
-
Eu.displayName =
|
|
6784
|
+
Eu.displayName = Xo;
|
|
6785
6785
|
var Iu = "CollapsibleTrigger", Nu = f.forwardRef(
|
|
6786
6786
|
(e, t) => {
|
|
6787
6787
|
const { __scopeCollapsible: n, ...r } = e, o = Ji(Iu, n);
|
|
@@ -6846,7 +6846,7 @@ function Qi(e) {
|
|
|
6846
6846
|
return e ? "open" : "closed";
|
|
6847
6847
|
}
|
|
6848
6848
|
var Gx = Eu;
|
|
6849
|
-
const _l = Gx, Ol = Nu, ju = new URL("data:video/mp2t;base64,
|
|
6849
|
+
const _l = Gx, Ol = Nu, ju = new URL("data:video/mp2t;base64,Ly8vIDxyZWZlcmVuY2UgbGliPSJ3ZWJ3b3JrZXIiIC8+CmltcG9ydCBtYXJrZWQgZnJvbSAnbWFya2VkJzsKCmRlY2xhcmUgY29uc3Qgc2VsZjogRGVkaWNhdGVkV29ya2VyR2xvYmFsU2NvcGU7CmNvbnN0IHNjb3BlOiBEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSA9IHNlbGY7CgpzY29wZS5wb3N0TWVzc2FnZT8uKHsgd29ya2VyX3JlYWR5OiB0cnVlIH0pOwoKc2NvcGUuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIChldmVudDogTWVzc2FnZUV2ZW50KSA9PiB7CiAgY29uc3QgcGF5bG9hZDogYW55ID0gZXZlbnQ/LmRhdGEgPz8ge307CiAgY29uc3QgaWQgPSB0eXBlb2YgcGF5bG9hZC5pZCA9PT0gJ3N0cmluZycgPyBwYXlsb2FkLmlkIDogdW5kZWZpbmVkOwogIGNvbnN0IHNvdXJjZSA9IHR5cGVvZiBwYXlsb2FkLnNvdXJjZSA9PT0gJ3N0cmluZycgPyBwYXlsb2FkLnNvdXJjZSA6IHVuZGVmaW5lZDsKICBpZiAoIWlkIHx8IHR5cGVvZiBzb3VyY2UgIT09ICdzdHJpbmcnKSByZXR1cm47CgogIHRyeSB7CiAgICBjb25zdCBodG1sID0gbWFya2VkLnBhcnNlKHNvdXJjZSk7CiAgICBzY29wZS5wb3N0TWVzc2FnZSh7IGlkLCBodG1sIH0pOwogIH0gY2F0Y2ggKGVycikgewogICAgc2NvcGUucG9zdE1lc3NhZ2UoeyBpZCwgaHRtbDogYDxwcmU+RXJyb3IgcmVuZGVyaW5nIG1hcmtkb3duOiAke1N0cmluZyhlcnIpfTwvcHJlPmAgfSk7CiAgfQp9KTsK", import.meta.url), lo = ju.toString();
|
|
6850
6850
|
console.log("[MarkdownContent] worker url", lo);
|
|
6851
6851
|
const di = [];
|
|
6852
6852
|
let fi = !1;
|
|
@@ -6950,12 +6950,12 @@ async function Yx(e) {
|
|
|
6950
6950
|
}
|
|
6951
6951
|
})();
|
|
6952
6952
|
const hr = /* @__PURE__ */ new Map();
|
|
6953
|
-
function
|
|
6953
|
+
function qx(e) {
|
|
6954
6954
|
const t = e.slice(0, 64), n = e.length > 64 ? e.slice(-64) : "";
|
|
6955
6955
|
return `${e.length}:${t}:${n}`;
|
|
6956
6956
|
}
|
|
6957
|
-
function
|
|
6958
|
-
const r =
|
|
6957
|
+
function qr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx("div", { "aria-busy": !0, children: "Rendering…" }) }) {
|
|
6958
|
+
const r = qx(e), [o, s] = fe(() => hr.get(r) ?? null);
|
|
6959
6959
|
Ve(() => {
|
|
6960
6960
|
if (hr.has(r)) {
|
|
6961
6961
|
const g = hr.get(r) ?? null;
|
|
@@ -7048,7 +7048,7 @@ async function ku(e, t) {
|
|
|
7048
7048
|
async function Dl(e, t) {
|
|
7049
7049
|
return await (await ku(`/chat/files/${e}/view`, t)).text();
|
|
7050
7050
|
}
|
|
7051
|
-
async function
|
|
7051
|
+
async function Xx(e, t) {
|
|
7052
7052
|
const n = await ku(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
|
|
7053
7053
|
let o = `file_${e}`;
|
|
7054
7054
|
try {
|
|
@@ -7172,7 +7172,7 @@ var rb = "DismissableLayer", pi = "dismissableLayer.update", ob = "dismissableLa
|
|
|
7172
7172
|
layers: /* @__PURE__ */ new Set(),
|
|
7173
7173
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
7174
7174
|
branches: /* @__PURE__ */ new Set()
|
|
7175
|
-
}),
|
|
7175
|
+
}), $r = f.forwardRef(
|
|
7176
7176
|
(e, t) => {
|
|
7177
7177
|
const {
|
|
7178
7178
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -7220,7 +7220,7 @@ var rb = "DismissableLayer", pi = "dismissableLayer.update", ob = "dismissableLa
|
|
|
7220
7220
|
);
|
|
7221
7221
|
}
|
|
7222
7222
|
);
|
|
7223
|
-
|
|
7223
|
+
$r.displayName = rb;
|
|
7224
7224
|
var ib = "DismissableLayerBranch", ab = f.forwardRef((e, t) => {
|
|
7225
7225
|
const n = f.useContext(Pu), r = f.useRef(null), o = Te(t, r);
|
|
7226
7226
|
return f.useEffect(() => {
|
|
@@ -7284,7 +7284,7 @@ function _u(e, t, n, { discrete: r }) {
|
|
|
7284
7284
|
const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
7285
7285
|
t && o.addEventListener(e, t, { once: !0 }), r ? Ru(o, s) : o.dispatchEvent(s);
|
|
7286
7286
|
}
|
|
7287
|
-
var Ls = "focusScope.autoFocusOnMount", Fs = "focusScope.autoFocusOnUnmount",
|
|
7287
|
+
var Ls = "focusScope.autoFocusOnMount", Fs = "focusScope.autoFocusOnUnmount", $l = { bubbles: !1, cancelable: !0 }, ub = "FocusScope", Jo = f.forwardRef((e, t) => {
|
|
7288
7288
|
const {
|
|
7289
7289
|
loop: n = !1,
|
|
7290
7290
|
trapped: r = !1,
|
|
@@ -7326,12 +7326,12 @@ var Ls = "focusScope.autoFocusOnMount", Fs = "focusScope.autoFocusOnUnmount", Hl
|
|
|
7326
7326
|
zl.add(x);
|
|
7327
7327
|
const v = document.activeElement;
|
|
7328
7328
|
if (!a.contains(v)) {
|
|
7329
|
-
const b = new CustomEvent(Ls,
|
|
7329
|
+
const b = new CustomEvent(Ls, $l);
|
|
7330
7330
|
a.addEventListener(Ls, u), a.dispatchEvent(b), b.defaultPrevented || (db(gb(Ou(a)), { select: !0 }), document.activeElement === v && sn(a));
|
|
7331
7331
|
}
|
|
7332
7332
|
return () => {
|
|
7333
7333
|
a.removeEventListener(Ls, u), setTimeout(() => {
|
|
7334
|
-
const b = new CustomEvent(Fs,
|
|
7334
|
+
const b = new CustomEvent(Fs, $l);
|
|
7335
7335
|
a.addEventListener(Fs, d), a.dispatchEvent(b), b.defaultPrevented || sn(v ?? document.body, { select: !0 }), a.removeEventListener(Fs, d), zl.remove(x);
|
|
7336
7336
|
}, 0);
|
|
7337
7337
|
};
|
|
@@ -7357,7 +7357,7 @@ function db(e, { select: t = !1 } = {}) {
|
|
|
7357
7357
|
if (sn(r, { select: t }), document.activeElement !== n) return;
|
|
7358
7358
|
}
|
|
7359
7359
|
function fb(e) {
|
|
7360
|
-
const t = Ou(e), n =
|
|
7360
|
+
const t = Ou(e), n = Hl(t, e), r = Hl(t.reverse(), e);
|
|
7361
7361
|
return [n, r];
|
|
7362
7362
|
}
|
|
7363
7363
|
function Ou(e) {
|
|
@@ -7370,7 +7370,7 @@ function Ou(e) {
|
|
|
7370
7370
|
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
7371
7371
|
return t;
|
|
7372
7372
|
}
|
|
7373
|
-
function
|
|
7373
|
+
function Hl(e, t) {
|
|
7374
7374
|
for (const n of e)
|
|
7375
7375
|
if (!hb(n, { upTo: t })) return n;
|
|
7376
7376
|
}
|
|
@@ -7457,7 +7457,7 @@ function xb(e, t, n) {
|
|
|
7457
7457
|
return e.concat(s || Array.prototype.slice.call(t));
|
|
7458
7458
|
}
|
|
7459
7459
|
var fo = "right-scroll-bar-position", ho = "width-before-scroll-bar", bb = "with-scroll-bars-hidden", wb = "--removed-body-scroll-bar-size";
|
|
7460
|
-
function
|
|
7460
|
+
function $s(e, t) {
|
|
7461
7461
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
7462
7462
|
}
|
|
7463
7463
|
function yb(e, t) {
|
|
@@ -7485,7 +7485,7 @@ var Sb = typeof window < "u" ? f.useLayoutEffect : f.useEffect, Vl = /* @__PURE_
|
|
|
7485
7485
|
function Cb(e, t) {
|
|
7486
7486
|
var n = yb(null, function(r) {
|
|
7487
7487
|
return e.forEach(function(o) {
|
|
7488
|
-
return
|
|
7488
|
+
return $s(o, r);
|
|
7489
7489
|
});
|
|
7490
7490
|
});
|
|
7491
7491
|
return Sb(function() {
|
|
@@ -7493,9 +7493,9 @@ function Cb(e, t) {
|
|
|
7493
7493
|
if (r) {
|
|
7494
7494
|
var o = new Set(r), s = new Set(e), i = n.current;
|
|
7495
7495
|
o.forEach(function(a) {
|
|
7496
|
-
s.has(a) ||
|
|
7496
|
+
s.has(a) || $s(a, null);
|
|
7497
7497
|
}), s.forEach(function(a) {
|
|
7498
|
-
o.has(a) ||
|
|
7498
|
+
o.has(a) || $s(a, i);
|
|
7499
7499
|
});
|
|
7500
7500
|
}
|
|
7501
7501
|
Vl.set(n, e);
|
|
@@ -7577,12 +7577,12 @@ Du.isSideCarExport = !0;
|
|
|
7577
7577
|
function Ib(e, t) {
|
|
7578
7578
|
return e.useMedium(t), Du;
|
|
7579
7579
|
}
|
|
7580
|
-
var Lu = Eb(),
|
|
7580
|
+
var Lu = Eb(), Hs = function() {
|
|
7581
7581
|
}, Qo = f.forwardRef(function(e, t) {
|
|
7582
7582
|
var n = f.useRef(null), r = f.useState({
|
|
7583
|
-
onScrollCapture:
|
|
7584
|
-
onWheelCapture:
|
|
7585
|
-
onTouchMoveCapture:
|
|
7583
|
+
onScrollCapture: Hs,
|
|
7584
|
+
onWheelCapture: Hs,
|
|
7585
|
+
onTouchMoveCapture: Hs
|
|
7586
7586
|
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, p = e.sideCar, x = e.noRelative, g = e.noIsolation, v = e.inert, m = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, y = e.gapMode, E = Mu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = p, C = Cb([n, t]), R = Kt(Kt({}, E), o);
|
|
7587
7587
|
return f.createElement(
|
|
7588
7588
|
f.Fragment,
|
|
@@ -7718,7 +7718,7 @@ var Pb = function() {
|
|
|
7718
7718
|
e <= 0 ? document.body.removeAttribute(Gn) : document.body.setAttribute(Gn, e.toString());
|
|
7719
7719
|
};
|
|
7720
7720
|
}, []);
|
|
7721
|
-
},
|
|
7721
|
+
}, $b = function(e) {
|
|
7722
7722
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
7723
7723
|
Bb();
|
|
7724
7724
|
var s = f.useMemo(function() {
|
|
@@ -7728,16 +7728,16 @@ var Pb = function() {
|
|
|
7728
7728
|
}, mi = !1;
|
|
7729
7729
|
if (typeof window < "u")
|
|
7730
7730
|
try {
|
|
7731
|
-
var
|
|
7731
|
+
var Xr = Object.defineProperty({}, "passive", {
|
|
7732
7732
|
get: function() {
|
|
7733
7733
|
return mi = !0, !0;
|
|
7734
7734
|
}
|
|
7735
7735
|
});
|
|
7736
|
-
window.addEventListener("test",
|
|
7736
|
+
window.addEventListener("test", Xr, Xr), window.removeEventListener("test", Xr, Xr);
|
|
7737
7737
|
} catch {
|
|
7738
7738
|
mi = !1;
|
|
7739
7739
|
}
|
|
7740
|
-
var Bn = mi ? { passive: !1 } : !1,
|
|
7740
|
+
var Bn = mi ? { passive: !1 } : !1, Hb = function(e) {
|
|
7741
7741
|
return e.tagName === "TEXTAREA";
|
|
7742
7742
|
}, Bu = function(e, t) {
|
|
7743
7743
|
if (!(e instanceof Element))
|
|
@@ -7746,7 +7746,7 @@ var Bn = mi ? { passive: !1 } : !1, $b = function(e) {
|
|
|
7746
7746
|
return (
|
|
7747
7747
|
// not-not-scrollable
|
|
7748
7748
|
n[t] !== "hidden" && // contains scroll inside self
|
|
7749
|
-
!(n.overflowY === n.overflowX &&
|
|
7749
|
+
!(n.overflowY === n.overflowX && !Hb(e) && n[t] === "visible")
|
|
7750
7750
|
);
|
|
7751
7751
|
}, zb = function(e) {
|
|
7752
7752
|
return Bu(e, "overflowY");
|
|
@@ -7756,9 +7756,9 @@ var Bn = mi ? { passive: !1 } : !1, $b = function(e) {
|
|
|
7756
7756
|
var n = t.ownerDocument, r = t;
|
|
7757
7757
|
do {
|
|
7758
7758
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
7759
|
-
var o =
|
|
7759
|
+
var o = $u(e, r);
|
|
7760
7760
|
if (o) {
|
|
7761
|
-
var s =
|
|
7761
|
+
var s = Hu(e, r), i = s[1], a = s[2];
|
|
7762
7762
|
if (i > a)
|
|
7763
7763
|
return !0;
|
|
7764
7764
|
}
|
|
@@ -7779,9 +7779,9 @@ var Bn = mi ? { passive: !1 } : !1, $b = function(e) {
|
|
|
7779
7779
|
n,
|
|
7780
7780
|
r
|
|
7781
7781
|
];
|
|
7782
|
-
}, Hu = function(e, t) {
|
|
7783
|
-
return e === "v" ? zb(t) : Ub(t);
|
|
7784
7782
|
}, $u = function(e, t) {
|
|
7783
|
+
return e === "v" ? zb(t) : Ub(t);
|
|
7784
|
+
}, Hu = function(e, t) {
|
|
7785
7785
|
return e === "v" ? Wb(t) : Vb(t);
|
|
7786
7786
|
}, Gb = function(e, t) {
|
|
7787
7787
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
@@ -7790,8 +7790,8 @@ var Bn = mi ? { passive: !1 } : !1, $b = function(e) {
|
|
|
7790
7790
|
do {
|
|
7791
7791
|
if (!a)
|
|
7792
7792
|
break;
|
|
7793
|
-
var x =
|
|
7794
|
-
(g || b) &&
|
|
7793
|
+
var x = Hu(e, a), g = x[0], v = x[1], m = x[2], b = v - m - s * g;
|
|
7794
|
+
(g || b) && $u(e, a) && (h += b, p += g);
|
|
7795
7795
|
var w = a.parentNode;
|
|
7796
7796
|
a = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
7797
7797
|
} while (
|
|
@@ -7804,24 +7804,24 @@ var Bn = mi ? { passive: !1 } : !1, $b = function(e) {
|
|
|
7804
7804
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
7805
7805
|
}, Yl = function(e) {
|
|
7806
7806
|
return [e.deltaX, e.deltaY];
|
|
7807
|
-
},
|
|
7807
|
+
}, ql = function(e) {
|
|
7808
7808
|
return e && "current" in e ? e.current : e;
|
|
7809
7809
|
}, Yb = function(e, t) {
|
|
7810
7810
|
return e[0] === t[0] && e[1] === t[1];
|
|
7811
|
-
},
|
|
7811
|
+
}, qb = function(e) {
|
|
7812
7812
|
return `
|
|
7813
7813
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
7814
7814
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
7815
7815
|
`);
|
|
7816
|
-
},
|
|
7816
|
+
}, Xb = 0, $n = [];
|
|
7817
7817
|
function Jb(e) {
|
|
7818
|
-
var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(
|
|
7818
|
+
var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Xb++)[0], s = f.useState(Fu)[0], i = f.useRef(e);
|
|
7819
7819
|
f.useEffect(function() {
|
|
7820
7820
|
i.current = e;
|
|
7821
7821
|
}, [e]), f.useEffect(function() {
|
|
7822
7822
|
if (e.inert) {
|
|
7823
7823
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
7824
|
-
var v = xb([e.lockRef.current], (e.shards || []).map(
|
|
7824
|
+
var v = xb([e.lockRef.current], (e.shards || []).map(ql), !0).filter(Boolean);
|
|
7825
7825
|
return v.forEach(function(m) {
|
|
7826
7826
|
return m.classList.add("allow-interactivity-".concat(o));
|
|
7827
7827
|
}), function() {
|
|
@@ -7848,7 +7848,7 @@ function Jb(e) {
|
|
|
7848
7848
|
return Kb(A, m, v, A === "h" ? y : E);
|
|
7849
7849
|
}, []), c = f.useCallback(function(v) {
|
|
7850
7850
|
var m = v;
|
|
7851
|
-
if (!(
|
|
7851
|
+
if (!(!$n.length || $n[$n.length - 1] !== s)) {
|
|
7852
7852
|
var b = "deltaY" in m ? Yl(m) : Jr(m), w = t.current.filter(function(S) {
|
|
7853
7853
|
return S.name === m.type && (S.target === m.target || m.target === S.shadowParent) && Yb(S.delta, b);
|
|
7854
7854
|
})[0];
|
|
@@ -7857,7 +7857,7 @@ function Jb(e) {
|
|
|
7857
7857
|
return;
|
|
7858
7858
|
}
|
|
7859
7859
|
if (!w) {
|
|
7860
|
-
var y = (i.current.shards || []).map(
|
|
7860
|
+
var y = (i.current.shards || []).map(ql).filter(Boolean).filter(function(S) {
|
|
7861
7861
|
return S.contains(m.target);
|
|
7862
7862
|
}), E = y.length > 0 ? a(m, y[0]) : !i.current.noIsolation;
|
|
7863
7863
|
E && m.cancelable && m.preventDefault();
|
|
@@ -7878,12 +7878,12 @@ function Jb(e) {
|
|
|
7878
7878
|
u(v.type, Jr(v), v.target, a(v, e.lockRef.current));
|
|
7879
7879
|
}, []);
|
|
7880
7880
|
f.useEffect(function() {
|
|
7881
|
-
return
|
|
7881
|
+
return $n.push(s), e.setCallbacks({
|
|
7882
7882
|
onScrollCapture: h,
|
|
7883
7883
|
onWheelCapture: h,
|
|
7884
7884
|
onTouchMoveCapture: p
|
|
7885
7885
|
}), document.addEventListener("wheel", c, Bn), document.addEventListener("touchmove", c, Bn), document.addEventListener("touchstart", d, Bn), function() {
|
|
7886
|
-
|
|
7886
|
+
$n = $n.filter(function(v) {
|
|
7887
7887
|
return v !== s;
|
|
7888
7888
|
}), document.removeEventListener("wheel", c, Bn), document.removeEventListener("touchmove", c, Bn), document.removeEventListener("touchstart", d, Bn);
|
|
7889
7889
|
};
|
|
@@ -7892,8 +7892,8 @@ function Jb(e) {
|
|
|
7892
7892
|
return f.createElement(
|
|
7893
7893
|
f.Fragment,
|
|
7894
7894
|
null,
|
|
7895
|
-
g ? f.createElement(s, { styles:
|
|
7896
|
-
x ? f.createElement(
|
|
7895
|
+
g ? f.createElement(s, { styles: qb(o) }) : null,
|
|
7896
|
+
x ? f.createElement($b, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
7897
7897
|
);
|
|
7898
7898
|
}
|
|
7899
7899
|
function Zb(e) {
|
|
@@ -7911,7 +7911,7 @@ var ew = function(e) {
|
|
|
7911
7911
|
return null;
|
|
7912
7912
|
var t = Array.isArray(e) ? e[0] : e;
|
|
7913
7913
|
return t.ownerDocument.body;
|
|
7914
|
-
},
|
|
7914
|
+
}, Hn = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = {}, Us = 0, zu = function(e) {
|
|
7915
7915
|
return e && (e.host || zu(e.parentNode));
|
|
7916
7916
|
}, tw = function(e, t) {
|
|
7917
7917
|
return t.map(function(n) {
|
|
@@ -7935,8 +7935,8 @@ var ew = function(e) {
|
|
|
7935
7935
|
d(p);
|
|
7936
7936
|
else
|
|
7937
7937
|
try {
|
|
7938
|
-
var x = p.getAttribute(r), g = x !== null && x !== "false", v = (
|
|
7939
|
-
|
|
7938
|
+
var x = p.getAttribute(r), g = x !== null && x !== "false", v = (Hn.get(p) || 0) + 1, m = (s.get(p) || 0) + 1;
|
|
7939
|
+
Hn.set(p, v), s.set(p, m), i.push(p), v === 1 && g && Zr.set(p, !0), m === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
|
|
7940
7940
|
} catch (b) {
|
|
7941
7941
|
console.error("aria-hidden: cannot operate on ", p, b);
|
|
7942
7942
|
}
|
|
@@ -7944,9 +7944,9 @@ var ew = function(e) {
|
|
|
7944
7944
|
};
|
|
7945
7945
|
return d(t), a.clear(), Us++, function() {
|
|
7946
7946
|
i.forEach(function(h) {
|
|
7947
|
-
var p =
|
|
7948
|
-
|
|
7949
|
-
}), Us--, Us || (
|
|
7947
|
+
var p = Hn.get(h) - 1, x = s.get(h) - 1;
|
|
7948
|
+
Hn.set(h, p), s.set(h, x), p || (Zr.has(h) || h.removeAttribute(r), Zr.delete(h)), x || h.removeAttribute(n);
|
|
7949
|
+
}), Us--, Us || (Hn = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = {});
|
|
7950
7950
|
};
|
|
7951
7951
|
}, na = function(e, t, n) {
|
|
7952
7952
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -8012,14 +8012,14 @@ var ra = "DialogPortal", [ow, Ku] = Uu(ra, {
|
|
|
8012
8012
|
return /* @__PURE__ */ l.jsx(ow, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: i }) })) });
|
|
8013
8013
|
};
|
|
8014
8014
|
Yu.displayName = ra;
|
|
8015
|
-
var No = "DialogOverlay",
|
|
8015
|
+
var No = "DialogOverlay", qu = f.forwardRef(
|
|
8016
8016
|
(e, t) => {
|
|
8017
8017
|
const n = Ku(No, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(No, e.__scopeDialog);
|
|
8018
8018
|
return s.modal ? /* @__PURE__ */ l.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(iw, { ...o, ref: t }) }) : null;
|
|
8019
8019
|
}
|
|
8020
8020
|
);
|
|
8021
|
-
|
|
8022
|
-
var sw =
|
|
8021
|
+
qu.displayName = No;
|
|
8022
|
+
var sw = qn("DialogOverlay.RemoveScroll"), iw = f.forwardRef(
|
|
8023
8023
|
(e, t) => {
|
|
8024
8024
|
const { __scopeDialog: n, ...r } = e, o = Wt(No, n);
|
|
8025
8025
|
return (
|
|
@@ -8036,13 +8036,13 @@ var sw = Xn("DialogOverlay.RemoveScroll"), iw = f.forwardRef(
|
|
|
8036
8036
|
) })
|
|
8037
8037
|
);
|
|
8038
8038
|
}
|
|
8039
|
-
), Nn = "DialogContent",
|
|
8039
|
+
), Nn = "DialogContent", Xu = f.forwardRef(
|
|
8040
8040
|
(e, t) => {
|
|
8041
8041
|
const n = Ku(Nn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(Nn, e.__scopeDialog);
|
|
8042
8042
|
return /* @__PURE__ */ l.jsx(vt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(aw, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(lw, { ...o, ref: t }) });
|
|
8043
8043
|
}
|
|
8044
8044
|
);
|
|
8045
|
-
|
|
8045
|
+
Xu.displayName = Nn;
|
|
8046
8046
|
var aw = f.forwardRef(
|
|
8047
8047
|
(e, t) => {
|
|
8048
8048
|
const n = Wt(Nn, e.__scopeDialog), r = f.useRef(null), o = Te(t, n.contentRef, r);
|
|
@@ -8107,7 +8107,7 @@ var aw = f.forwardRef(
|
|
|
8107
8107
|
onMountAutoFocus: o,
|
|
8108
8108
|
onUnmountAutoFocus: s,
|
|
8109
8109
|
children: /* @__PURE__ */ l.jsx(
|
|
8110
|
-
|
|
8110
|
+
$r,
|
|
8111
8111
|
{
|
|
8112
8112
|
role: "dialog",
|
|
8113
8113
|
id: a.contentId,
|
|
@@ -8179,7 +8179,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
8179
8179
|
const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
8180
8180
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
8181
8181
|
}, [r, e, t]), null;
|
|
8182
|
-
}, sd = Wu, fw = Gu, id = Yu, ns =
|
|
8182
|
+
}, sd = Wu, fw = Gu, id = Yu, ns = qu, rs = Xu, Tn = Zu, os = ed, ad = nd;
|
|
8183
8183
|
const hw = sd, pw = id, ld = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
8184
8184
|
ns,
|
|
8185
8185
|
{
|
|
@@ -8287,7 +8287,7 @@ function gw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
8287
8287
|
}, x = async () => {
|
|
8288
8288
|
if (n)
|
|
8289
8289
|
try {
|
|
8290
|
-
await
|
|
8290
|
+
await Xx(n), h({ title: "Download started", description: `Downloading ${r}` });
|
|
8291
8291
|
} catch (b) {
|
|
8292
8292
|
console.error("Failed to download file:", b), h({ title: "Download failed", description: String(b), variant: "destructive" });
|
|
8293
8293
|
}
|
|
@@ -8415,7 +8415,7 @@ const xw = K.memo(function({
|
|
|
8415
8415
|
}) {
|
|
8416
8416
|
const [y, E] = fe(!1), [S, C] = fe(!1), [R, I] = fe(!1), [A, k] = fe(!1), { currentThreadId: M } = Li();
|
|
8417
8417
|
ea();
|
|
8418
|
-
const [W, G] = fe({}), [N,
|
|
8418
|
+
const [W, G] = fe({}), [N, H] = fe(!1), [L, q] = fe(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", X = K.useMemo(() => {
|
|
8419
8419
|
switch (_) {
|
|
8420
8420
|
case "user":
|
|
8421
8421
|
return "text-[hsl(var(--chat-bubble-user-text))]";
|
|
@@ -8451,10 +8451,10 @@ const xw = K.memo(function({
|
|
|
8451
8451
|
const ce = z ? zn(t.content) : oe;
|
|
8452
8452
|
v(t.id, ce);
|
|
8453
8453
|
}, Z = () => m == null ? void 0 : m(n), ne = () => {
|
|
8454
|
-
const Ae = D(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0",
|
|
8454
|
+
const Ae = D(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", X);
|
|
8455
8455
|
switch (_) {
|
|
8456
8456
|
case "user":
|
|
8457
|
-
return /* @__PURE__ */ l.jsx(
|
|
8457
|
+
return /* @__PURE__ */ l.jsx($p, { className: Ae });
|
|
8458
8458
|
case "assistant":
|
|
8459
8459
|
return /* @__PURE__ */ l.jsx(za, { className: Ae });
|
|
8460
8460
|
case "tool":
|
|
@@ -8515,12 +8515,12 @@ const xw = K.memo(function({
|
|
|
8515
8515
|
}
|
|
8516
8516
|
}, Fe = () => {
|
|
8517
8517
|
if (t.model === "reflection") {
|
|
8518
|
-
const ve = oe.trim(),
|
|
8519
|
-
if (
|
|
8520
|
-
return /* @__PURE__ */ l.jsx(Iw, { data:
|
|
8518
|
+
const ve = oe.trim(), $ = Ws(ve);
|
|
8519
|
+
if ($ && typeof $ == "object")
|
|
8520
|
+
return /* @__PURE__ */ l.jsx(Iw, { data: $ });
|
|
8521
8521
|
}
|
|
8522
8522
|
if (z && F.name === "get_issues") {
|
|
8523
|
-
const ve = t.content.find((Be) => Be.type === "tool_result"),
|
|
8523
|
+
const ve = t.content.find((Be) => Be.type === "tool_result"), $ = (ve == null ? void 0 : ve.output) ?? zn(t.content), ae = hd($);
|
|
8524
8524
|
if (ae) return /* @__PURE__ */ l.jsx(Nw, { issues: ae });
|
|
8525
8525
|
}
|
|
8526
8526
|
if (z && !R) {
|
|
@@ -8531,10 +8531,10 @@ const xw = K.memo(function({
|
|
|
8531
8531
|
] }) });
|
|
8532
8532
|
}
|
|
8533
8533
|
if (z && d) {
|
|
8534
|
-
const ve = zn(t.content),
|
|
8534
|
+
const ve = zn(t.content), $ = ve.length > h;
|
|
8535
8535
|
return /* @__PURE__ */ l.jsx(_l, { open: S, onOpenChange: C, children: /* @__PURE__ */ l.jsxs("div", { className: "font-mono text-sm text-current", children: [
|
|
8536
|
-
/* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children:
|
|
8537
|
-
|
|
8536
|
+
/* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: $ && !S ? ve.substring(0, h) + "..." : ve }),
|
|
8537
|
+
$ && /* @__PURE__ */ l.jsx(Ol, { asChild: !0, children: /* @__PURE__ */ l.jsx(ke, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
8538
8538
|
/* @__PURE__ */ l.jsx(pr, { className: "h-3 w-3 mr-1" }),
|
|
8539
8539
|
"Show less"
|
|
8540
8540
|
] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
@@ -8548,27 +8548,27 @@ const xw = K.memo(function({
|
|
|
8548
8548
|
if (z && R && !d) {
|
|
8549
8549
|
const ve = jw(t.content);
|
|
8550
8550
|
if (ve && ww(ve))
|
|
8551
|
-
return /* @__PURE__ */ l.jsx(
|
|
8552
|
-
const
|
|
8553
|
-
return /* @__PURE__ */ l.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children:
|
|
8551
|
+
return /* @__PURE__ */ l.jsx(qr, { content: ve.trim() });
|
|
8552
|
+
const $ = zn(t.content);
|
|
8553
|
+
return /* @__PURE__ */ l.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: $ }) });
|
|
8554
8554
|
}
|
|
8555
8555
|
const ce = Q.length > 0 && _ !== "tool", Ae = de.length > 0 && _ !== "tool" && !1;
|
|
8556
8556
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
8557
8557
|
r ? /* @__PURE__ */ l.jsxs("div", { className: "relative", children: [
|
|
8558
8558
|
(() => {
|
|
8559
8559
|
const ve = Ws(be);
|
|
8560
|
-
return ve !== null ? /* @__PURE__ */ l.jsx(
|
|
8560
|
+
return ve !== null ? /* @__PURE__ */ l.jsx(Xl, { data: ve }) : /* @__PURE__ */ l.jsx(qr, { content: Sw(yw(be)) });
|
|
8561
8561
|
})(),
|
|
8562
|
-
/* @__PURE__ */ l.jsx(vw, { className: D(
|
|
8562
|
+
/* @__PURE__ */ l.jsx(vw, { className: D(X, O ? "text-xs" : "text-sm") })
|
|
8563
8563
|
] }) : (() => {
|
|
8564
8564
|
const ve = Ws(oe.trim());
|
|
8565
|
-
if (ve !== null) return /* @__PURE__ */ l.jsx(
|
|
8565
|
+
if (ve !== null) return /* @__PURE__ */ l.jsx(Xl, { data: ve });
|
|
8566
8566
|
if (_ === "user" && p) {
|
|
8567
|
-
const
|
|
8568
|
-
if (
|
|
8567
|
+
const $ = oe.trim();
|
|
8568
|
+
if ($.length > x)
|
|
8569
8569
|
return /* @__PURE__ */ l.jsxs(_l, { open: A, onOpenChange: k, children: [
|
|
8570
|
-
/* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: A ? /* @__PURE__ */ l.jsx(
|
|
8571
|
-
|
|
8570
|
+
/* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: A ? /* @__PURE__ */ l.jsx(qr, { content: $ }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
|
|
8571
|
+
$.substring(0, x),
|
|
8572
8572
|
"..."
|
|
8573
8573
|
] }) }),
|
|
8574
8574
|
/* @__PURE__ */ l.jsx(Ol, { asChild: !0, children: /* @__PURE__ */ l.jsx(
|
|
@@ -8583,22 +8583,22 @@ const xw = K.memo(function({
|
|
|
8583
8583
|
] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
8584
8584
|
/* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3 mr-1" }),
|
|
8585
8585
|
" Show more (",
|
|
8586
|
-
|
|
8586
|
+
$.length - x,
|
|
8587
8587
|
" chars)"
|
|
8588
8588
|
] })
|
|
8589
8589
|
}
|
|
8590
8590
|
) })
|
|
8591
8591
|
] });
|
|
8592
8592
|
}
|
|
8593
|
-
return /* @__PURE__ */ l.jsx(
|
|
8593
|
+
return /* @__PURE__ */ l.jsx(qr, { content: oe.trim() });
|
|
8594
8594
|
})(),
|
|
8595
|
-
ce && /* @__PURE__ */ l.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Q.map((ve,
|
|
8595
|
+
ce && /* @__PURE__ */ l.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Q.map((ve, $) => /* @__PURE__ */ l.jsxs("div", { className: "relative border rounded overflow-hidden", children: [
|
|
8596
8596
|
/* @__PURE__ */ l.jsx("img", { src: ve.url, alt: ve.alt ?? "image", className: "w-full h-auto" }),
|
|
8597
8597
|
/* @__PURE__ */ l.jsxs("div", { className: "absolute top-1 right-1 bg-background/70 rounded px-1 py-0.5 text-[10px] flex items-center gap-1", children: [
|
|
8598
8598
|
/* @__PURE__ */ l.jsx(vc, { className: "h-3 w-3" }),
|
|
8599
8599
|
/* @__PURE__ */ l.jsx("span", { children: "image" })
|
|
8600
8600
|
] })
|
|
8601
|
-
] },
|
|
8601
|
+
] }, $)) }),
|
|
8602
8602
|
Ae
|
|
8603
8603
|
] });
|
|
8604
8604
|
}, Le = wn(() => Rw(t), [t]);
|
|
@@ -8610,7 +8610,7 @@ const xw = K.memo(function({
|
|
|
8610
8610
|
className: D(
|
|
8611
8611
|
"flex items-center justify-between mb-2 pb-2 border-b border-current/10",
|
|
8612
8612
|
O && "mb-1 pb-1",
|
|
8613
|
-
|
|
8613
|
+
X,
|
|
8614
8614
|
g.header
|
|
8615
8615
|
),
|
|
8616
8616
|
children: [
|
|
@@ -8623,7 +8623,7 @@ const xw = K.memo(function({
|
|
|
8623
8623
|
variant: "outline",
|
|
8624
8624
|
className: D(
|
|
8625
8625
|
"text-xs flex items-center gap-1 cursor-pointer",
|
|
8626
|
-
|
|
8626
|
+
X,
|
|
8627
8627
|
"border border-current/40",
|
|
8628
8628
|
O && "text-xs h-4"
|
|
8629
8629
|
),
|
|
@@ -8639,7 +8639,7 @@ const xw = K.memo(function({
|
|
|
8639
8639
|
{
|
|
8640
8640
|
variant: "ghost",
|
|
8641
8641
|
size: "sm",
|
|
8642
|
-
className: D("h-6 px-1",
|
|
8642
|
+
className: D("h-6 px-1", X, "hover:bg-foreground/10"),
|
|
8643
8643
|
onClick: () => I((ce) => !ce),
|
|
8644
8644
|
children: /* @__PURE__ */ l.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
|
|
8645
8645
|
"Tool Output ",
|
|
@@ -8649,7 +8649,7 @@ const xw = K.memo(function({
|
|
|
8649
8649
|
)
|
|
8650
8650
|
] }),
|
|
8651
8651
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8652
|
-
a && /* @__PURE__ */ l.jsx("span", { className: D("text-xs opacity-60",
|
|
8652
|
+
a && /* @__PURE__ */ l.jsx("span", { className: D("text-xs opacity-60", X, O && "text-xs"), children: Pe(t.createdAt) }),
|
|
8653
8653
|
i && !s && /* @__PURE__ */ l.jsxs(
|
|
8654
8654
|
"div",
|
|
8655
8655
|
{
|
|
@@ -8665,12 +8665,12 @@ const xw = K.memo(function({
|
|
|
8665
8665
|
variant: "ghost",
|
|
8666
8666
|
size: "sm",
|
|
8667
8667
|
onClick: Y,
|
|
8668
|
-
className: D("h-6 w-6 p-0 hover:bg-foreground/10",
|
|
8668
|
+
className: D("h-6 w-6 p-0 hover:bg-foreground/10", X, O && "h-5 w-5"),
|
|
8669
8669
|
children: /* @__PURE__ */ l.jsx(
|
|
8670
|
-
|
|
8670
|
+
$a,
|
|
8671
8671
|
{
|
|
8672
8672
|
className: D(
|
|
8673
|
-
y ? "text-success" :
|
|
8673
|
+
y ? "text-success" : X,
|
|
8674
8674
|
O ? "h-3 w-3" : "h-4 w-4"
|
|
8675
8675
|
)
|
|
8676
8676
|
}
|
|
@@ -8683,8 +8683,8 @@ const xw = K.memo(function({
|
|
|
8683
8683
|
variant: "ghost",
|
|
8684
8684
|
size: "sm",
|
|
8685
8685
|
onClick: P,
|
|
8686
|
-
className: D("h-6 w-6 p-0 hover:bg-foreground/10",
|
|
8687
|
-
children: /* @__PURE__ */ l.jsx(
|
|
8686
|
+
className: D("h-6 w-6 p-0 hover:bg-foreground/10", X, O && "h-5 w-5"),
|
|
8687
|
+
children: /* @__PURE__ */ l.jsx(Ha, { className: D(X, O ? "h-3 w-3" : "h-4 w-4") })
|
|
8688
8688
|
}
|
|
8689
8689
|
),
|
|
8690
8690
|
_ === "assistant" && m && /* @__PURE__ */ l.jsx(
|
|
@@ -8693,8 +8693,8 @@ const xw = K.memo(function({
|
|
|
8693
8693
|
variant: "ghost",
|
|
8694
8694
|
size: "sm",
|
|
8695
8695
|
onClick: Z,
|
|
8696
|
-
className: D("h-6 w-6 p-0 hover:bg-foreground/10",
|
|
8697
|
-
children: /* @__PURE__ */ l.jsx(
|
|
8696
|
+
className: D("h-6 w-6 p-0 hover:bg-foreground/10", X, O && "h-5 w-5"),
|
|
8697
|
+
children: /* @__PURE__ */ l.jsx(qs, { className: D(X, O ? "h-3 w-3" : "h-4 w-4") })
|
|
8698
8698
|
}
|
|
8699
8699
|
)
|
|
8700
8700
|
]
|
|
@@ -8731,7 +8731,7 @@ const xw = K.memo(function({
|
|
|
8731
8731
|
size: "sm",
|
|
8732
8732
|
onClick: Y,
|
|
8733
8733
|
className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
|
|
8734
|
-
children: /* @__PURE__ */ l.jsx(
|
|
8734
|
+
children: /* @__PURE__ */ l.jsx($a, { className: D(y ? "text-success" : "text-current", O ? "h-3 w-3" : "h-4 w-4") })
|
|
8735
8735
|
}
|
|
8736
8736
|
),
|
|
8737
8737
|
_ === "user" && v && /* @__PURE__ */ l.jsx(
|
|
@@ -8741,7 +8741,7 @@ const xw = K.memo(function({
|
|
|
8741
8741
|
size: "sm",
|
|
8742
8742
|
onClick: P,
|
|
8743
8743
|
className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
|
|
8744
|
-
children: /* @__PURE__ */ l.jsx(
|
|
8744
|
+
children: /* @__PURE__ */ l.jsx(Ha, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
|
|
8745
8745
|
}
|
|
8746
8746
|
),
|
|
8747
8747
|
_ === "assistant" && m && /* @__PURE__ */ l.jsx(
|
|
@@ -8751,7 +8751,7 @@ const xw = K.memo(function({
|
|
|
8751
8751
|
size: "sm",
|
|
8752
8752
|
onClick: Z,
|
|
8753
8753
|
className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
|
|
8754
|
-
children: /* @__PURE__ */ l.jsx(
|
|
8754
|
+
children: /* @__PURE__ */ l.jsx(qs, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
|
|
8755
8755
|
}
|
|
8756
8756
|
)
|
|
8757
8757
|
]
|
|
@@ -8763,7 +8763,7 @@ const xw = K.memo(function({
|
|
|
8763
8763
|
{
|
|
8764
8764
|
isOpen: N,
|
|
8765
8765
|
onClose: () => {
|
|
8766
|
-
|
|
8766
|
+
H(!1), q(null);
|
|
8767
8767
|
},
|
|
8768
8768
|
fileId: L.id,
|
|
8769
8769
|
fileName: L.name,
|
|
@@ -8807,7 +8807,7 @@ function Ws(e) {
|
|
|
8807
8807
|
return null;
|
|
8808
8808
|
}
|
|
8809
8809
|
}
|
|
8810
|
-
function
|
|
8810
|
+
function Xl({ data: e }) {
|
|
8811
8811
|
if (Array.isArray(e))
|
|
8812
8812
|
return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ l.jsx("div", { className: po, children: /* @__PURE__ */ l.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ l.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ l.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: wr(e) });
|
|
8813
8813
|
if (e && typeof e == "object") {
|
|
@@ -9047,14 +9047,14 @@ function ia(e) {
|
|
|
9047
9047
|
return /* @__PURE__ */ l.jsx(o, { scope: m, itemMap: y, collectionRef: w, children: b });
|
|
9048
9048
|
};
|
|
9049
9049
|
i.displayName = t;
|
|
9050
|
-
const a = e + "CollectionSlot", c =
|
|
9050
|
+
const a = e + "CollectionSlot", c = qn(a), u = K.forwardRef(
|
|
9051
9051
|
(v, m) => {
|
|
9052
9052
|
const { scope: b, children: w } = v, y = s(a, b), E = Te(m, y.collectionRef);
|
|
9053
9053
|
return /* @__PURE__ */ l.jsx(c, { ref: E, children: w });
|
|
9054
9054
|
}
|
|
9055
9055
|
);
|
|
9056
9056
|
u.displayName = a;
|
|
9057
|
-
const d = e + "CollectionItemSlot", h = "data-radix-collection-item", p =
|
|
9057
|
+
const d = e + "CollectionItemSlot", h = "data-radix-collection-item", p = qn(d), x = K.forwardRef(
|
|
9058
9058
|
(v, m) => {
|
|
9059
9059
|
const { scope: b, children: w, ...y } = v, E = K.useRef(null), S = Te(m, E), C = s(d, b);
|
|
9060
9060
|
return K.useEffect(() => (C.itemMap.set(E, { ref: E, ...y }), () => void C.itemMap.delete(E))), /* @__PURE__ */ l.jsx(p, { [h]: "", ref: S, children: w });
|
|
@@ -9083,7 +9083,7 @@ function ss(e) {
|
|
|
9083
9083
|
const t = f.useContext(_w);
|
|
9084
9084
|
return e || t || "ltr";
|
|
9085
9085
|
}
|
|
9086
|
-
const Ow = ["top", "right", "bottom", "left"], dn = Math.min, wt = Math.max, Ao = Math.round, eo = Math.floor,
|
|
9086
|
+
const Ow = ["top", "right", "bottom", "left"], dn = Math.min, wt = Math.max, Ao = Math.round, eo = Math.floor, Xt = (e) => ({
|
|
9087
9087
|
x: e,
|
|
9088
9088
|
y: e
|
|
9089
9089
|
}), Mw = {
|
|
@@ -9114,11 +9114,11 @@ function la(e) {
|
|
|
9114
9114
|
return e === "y" ? "height" : "width";
|
|
9115
9115
|
}
|
|
9116
9116
|
const Lw = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
9117
|
-
function
|
|
9117
|
+
function qt(e) {
|
|
9118
9118
|
return Lw.has(on(e)) ? "y" : "x";
|
|
9119
9119
|
}
|
|
9120
9120
|
function ca(e) {
|
|
9121
|
-
return aa(
|
|
9121
|
+
return aa(qt(e));
|
|
9122
9122
|
}
|
|
9123
9123
|
function Fw(e, t, n) {
|
|
9124
9124
|
n === void 0 && (n = !1);
|
|
@@ -9133,7 +9133,7 @@ function Bw(e) {
|
|
|
9133
9133
|
function vi(e) {
|
|
9134
9134
|
return e.replace(/start|end/g, (t) => Dw[t]);
|
|
9135
9135
|
}
|
|
9136
|
-
const Jl = ["left", "right"], Zl = ["right", "left"],
|
|
9136
|
+
const Jl = ["left", "right"], Zl = ["right", "left"], $w = ["top", "bottom"], Hw = ["bottom", "top"];
|
|
9137
9137
|
function zw(e, t, n) {
|
|
9138
9138
|
switch (e) {
|
|
9139
9139
|
case "top":
|
|
@@ -9141,7 +9141,7 @@ function zw(e, t, n) {
|
|
|
9141
9141
|
return n ? t ? Zl : Jl : t ? Jl : Zl;
|
|
9142
9142
|
case "left":
|
|
9143
9143
|
case "right":
|
|
9144
|
-
return t ?
|
|
9144
|
+
return t ? $w : Hw;
|
|
9145
9145
|
default:
|
|
9146
9146
|
return [];
|
|
9147
9147
|
}
|
|
@@ -9194,7 +9194,7 @@ function Ql(e, t, n) {
|
|
|
9194
9194
|
reference: r,
|
|
9195
9195
|
floating: o
|
|
9196
9196
|
} = e;
|
|
9197
|
-
const s =
|
|
9197
|
+
const s = qt(t), i = ca(t), a = la(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, p = r[a] / 2 - o[a] / 2;
|
|
9198
9198
|
let x;
|
|
9199
9199
|
switch (c) {
|
|
9200
9200
|
case "top":
|
|
@@ -9367,14 +9367,14 @@ const Gw = (e) => ({
|
|
|
9367
9367
|
}, x = ca(o), g = la(x), v = await i.getDimensions(u), m = x === "y", b = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", E = s.reference[g] + s.reference[x] - p[x] - s.floating[g], S = p[x] - s.reference[x], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
9368
9368
|
let R = C ? C[y] : 0;
|
|
9369
9369
|
(!R || !await (i.isElement == null ? void 0 : i.isElement(C))) && (R = a.floating[y] || s.floating[g]);
|
|
9370
|
-
const I = E / 2 - S / 2, A = R / 2 - v[g] / 2 - 1, k = dn(h[b], A), M = dn(h[w], A), W = k, G = R - v[g] - M, N = R / 2 - v[g] / 2 + I,
|
|
9370
|
+
const I = E / 2 - S / 2, A = R / 2 - v[g] / 2 - 1, k = dn(h[b], A), M = dn(h[w], A), W = k, G = R - v[g] - M, N = R / 2 - v[g] / 2 + I, H = gi(W, N, G), L = !c.arrow && sr(o) != null && N !== H && s.reference[g] / 2 - (N < W ? k : M) - v[g] / 2 < 0, q = L ? N < W ? N - W : N - G : 0;
|
|
9371
9371
|
return {
|
|
9372
|
-
[x]: p[x] +
|
|
9372
|
+
[x]: p[x] + q,
|
|
9373
9373
|
data: {
|
|
9374
|
-
[x]:
|
|
9375
|
-
centerOffset: N -
|
|
9374
|
+
[x]: H,
|
|
9375
|
+
centerOffset: N - H - q,
|
|
9376
9376
|
...L && {
|
|
9377
|
-
alignmentOffset:
|
|
9377
|
+
alignmentOffset: q
|
|
9378
9378
|
}
|
|
9379
9379
|
},
|
|
9380
9380
|
reset: L
|
|
@@ -9404,7 +9404,7 @@ const Gw = (e) => ({
|
|
|
9404
9404
|
} = rn(e, t);
|
|
9405
9405
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
9406
9406
|
return {};
|
|
9407
|
-
const b = on(o), w =
|
|
9407
|
+
const b = on(o), w = qt(a), y = on(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !v ? [ko(a)] : Bw(a)), C = g !== "none";
|
|
9408
9408
|
!p && C && S.push(...Uw(a, v, g, E));
|
|
9409
9409
|
const R = [a, ...S], I = await Er(t, m), A = [];
|
|
9410
9410
|
let k = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
@@ -9417,34 +9417,34 @@ const Gw = (e) => ({
|
|
|
9417
9417
|
overflows: A
|
|
9418
9418
|
}], !A.every((N) => N <= 0)) {
|
|
9419
9419
|
var M, W;
|
|
9420
|
-
const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1,
|
|
9421
|
-
if (
|
|
9420
|
+
const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, H = R[N];
|
|
9421
|
+
if (H && (!(h === "alignment" ? w !== qt(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
9422
9422
|
// overflows the main axis.
|
|
9423
|
-
k.every((O) =>
|
|
9423
|
+
k.every((O) => qt(O.placement) === w ? O.overflows[0] > 0 : !0)))
|
|
9424
9424
|
return {
|
|
9425
9425
|
data: {
|
|
9426
9426
|
index: N,
|
|
9427
9427
|
overflows: k
|
|
9428
9428
|
},
|
|
9429
9429
|
reset: {
|
|
9430
|
-
placement:
|
|
9430
|
+
placement: H
|
|
9431
9431
|
}
|
|
9432
9432
|
};
|
|
9433
|
-
let L = (W = k.filter((
|
|
9433
|
+
let L = (W = k.filter((q) => q.overflows[0] <= 0).sort((q, O) => q.overflows[1] - O.overflows[1])[0]) == null ? void 0 : W.placement;
|
|
9434
9434
|
if (!L)
|
|
9435
9435
|
switch (x) {
|
|
9436
9436
|
case "bestFit": {
|
|
9437
9437
|
var G;
|
|
9438
|
-
const
|
|
9438
|
+
const q = (G = k.filter((O) => {
|
|
9439
9439
|
if (C) {
|
|
9440
|
-
const _ =
|
|
9440
|
+
const _ = qt(O.placement);
|
|
9441
9441
|
return _ === w || // Create a bias to the `y` side axis due to horizontal
|
|
9442
9442
|
// reading directions favoring greater width.
|
|
9443
9443
|
_ === "y";
|
|
9444
9444
|
}
|
|
9445
9445
|
return !0;
|
|
9446
9446
|
}).map((O) => [O.placement, O.overflows.filter((_) => _ > 0).reduce((_, z) => _ + z, 0)]).sort((O, _) => O[1] - _[1])[0]) == null ? void 0 : G[0];
|
|
9447
|
-
|
|
9447
|
+
q && (L = q);
|
|
9448
9448
|
break;
|
|
9449
9449
|
}
|
|
9450
9450
|
case "initialPlacement":
|
|
@@ -9515,12 +9515,12 @@ const Yw = function(e) {
|
|
|
9515
9515
|
}
|
|
9516
9516
|
};
|
|
9517
9517
|
}, md = /* @__PURE__ */ new Set(["left", "top"]);
|
|
9518
|
-
async function
|
|
9518
|
+
async function qw(e, t) {
|
|
9519
9519
|
const {
|
|
9520
9520
|
placement: n,
|
|
9521
9521
|
platform: r,
|
|
9522
9522
|
elements: o
|
|
9523
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = on(n), a = sr(n), c =
|
|
9523
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = on(n), a = sr(n), c = qt(n) === "y", u = md.has(i) ? -1 : 1, d = s && c ? -1 : 1, h = rn(t, e);
|
|
9524
9524
|
let {
|
|
9525
9525
|
mainAxis: p,
|
|
9526
9526
|
crossAxis: x,
|
|
@@ -9542,7 +9542,7 @@ async function Xw(e, t) {
|
|
|
9542
9542
|
y: x * d
|
|
9543
9543
|
};
|
|
9544
9544
|
}
|
|
9545
|
-
const
|
|
9545
|
+
const Xw = function(e) {
|
|
9546
9546
|
return e === void 0 && (e = 0), {
|
|
9547
9547
|
name: "offset",
|
|
9548
9548
|
options: e,
|
|
@@ -9553,7 +9553,7 @@ const qw = function(e) {
|
|
|
9553
9553
|
y: s,
|
|
9554
9554
|
placement: i,
|
|
9555
9555
|
middlewareData: a
|
|
9556
|
-
} = t, c = await
|
|
9556
|
+
} = t, c = await qw(t, e);
|
|
9557
9557
|
return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
|
|
9558
9558
|
x: o + c.x,
|
|
9559
9559
|
y: s + c.y,
|
|
@@ -9592,7 +9592,7 @@ const qw = function(e) {
|
|
|
9592
9592
|
} = rn(e, t), u = {
|
|
9593
9593
|
x: n,
|
|
9594
9594
|
y: r
|
|
9595
|
-
}, d = await Er(t, c), h =
|
|
9595
|
+
}, d = await Er(t, c), h = qt(on(o)), p = aa(h);
|
|
9596
9596
|
let x = u[p], g = u[h];
|
|
9597
9597
|
if (s) {
|
|
9598
9598
|
const m = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", w = x + d[m], y = x - d[b];
|
|
@@ -9637,7 +9637,7 @@ const qw = function(e) {
|
|
|
9637
9637
|
} = rn(e, t), d = {
|
|
9638
9638
|
x: n,
|
|
9639
9639
|
y: r
|
|
9640
|
-
}, h =
|
|
9640
|
+
}, h = qt(o), p = aa(h);
|
|
9641
9641
|
let x = d[p], g = d[h];
|
|
9642
9642
|
const v = rn(a, t), m = typeof v == "number" ? {
|
|
9643
9643
|
mainAxis: v,
|
|
@@ -9677,7 +9677,7 @@ const qw = function(e) {
|
|
|
9677
9677
|
apply: c = () => {
|
|
9678
9678
|
},
|
|
9679
9679
|
...u
|
|
9680
|
-
} = rn(e, t), d = await Er(t, u), h = on(o), p = sr(o), x =
|
|
9680
|
+
} = rn(e, t), d = await Er(t, u), h = on(o), p = sr(o), x = qt(o) === "y", {
|
|
9681
9681
|
width: g,
|
|
9682
9682
|
height: v
|
|
9683
9683
|
} = s.floating;
|
|
@@ -9720,7 +9720,7 @@ function Qt(e) {
|
|
|
9720
9720
|
function gd(e) {
|
|
9721
9721
|
return is() ? e instanceof Node || e instanceof Ct(e).Node : !1;
|
|
9722
9722
|
}
|
|
9723
|
-
function
|
|
9723
|
+
function $t(e) {
|
|
9724
9724
|
return is() ? e instanceof Element || e instanceof Ct(e).Element : !1;
|
|
9725
9725
|
}
|
|
9726
9726
|
function Jt(e) {
|
|
@@ -9730,13 +9730,13 @@ function nc(e) {
|
|
|
9730
9730
|
return !is() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Ct(e).ShadowRoot;
|
|
9731
9731
|
}
|
|
9732
9732
|
const ey = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
9733
|
-
function
|
|
9733
|
+
function Hr(e) {
|
|
9734
9734
|
const {
|
|
9735
9735
|
overflow: t,
|
|
9736
9736
|
overflowX: n,
|
|
9737
9737
|
overflowY: r,
|
|
9738
9738
|
display: o
|
|
9739
|
-
} =
|
|
9739
|
+
} = Ht(e);
|
|
9740
9740
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !ey.has(o);
|
|
9741
9741
|
}
|
|
9742
9742
|
const ty = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
@@ -9755,7 +9755,7 @@ function as(e) {
|
|
|
9755
9755
|
}
|
|
9756
9756
|
const oy = ["transform", "translate", "scale", "rotate", "perspective"], sy = ["transform", "translate", "scale", "rotate", "perspective", "filter"], iy = ["paint", "layout", "strict", "content"];
|
|
9757
9757
|
function ua(e) {
|
|
9758
|
-
const t = da(), n =
|
|
9758
|
+
const t = da(), n = $t(e) ? Ht(e) : e;
|
|
9759
9759
|
return oy.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || sy.some((r) => (n.willChange || "").includes(r)) || iy.some((r) => (n.contain || "").includes(r));
|
|
9760
9760
|
}
|
|
9761
9761
|
function ay(e) {
|
|
@@ -9776,11 +9776,11 @@ const ly = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
|
9776
9776
|
function Jn(e) {
|
|
9777
9777
|
return ly.has(ir(e));
|
|
9778
9778
|
}
|
|
9779
|
-
function
|
|
9779
|
+
function Ht(e) {
|
|
9780
9780
|
return Ct(e).getComputedStyle(e);
|
|
9781
9781
|
}
|
|
9782
9782
|
function ls(e) {
|
|
9783
|
-
return
|
|
9783
|
+
return $t(e) ? {
|
|
9784
9784
|
scrollLeft: e.scrollLeft,
|
|
9785
9785
|
scrollTop: e.scrollTop
|
|
9786
9786
|
} : {
|
|
@@ -9802,7 +9802,7 @@ function fn(e) {
|
|
|
9802
9802
|
}
|
|
9803
9803
|
function vd(e) {
|
|
9804
9804
|
const t = fn(e);
|
|
9805
|
-
return Jn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jt(t) &&
|
|
9805
|
+
return Jn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jt(t) && Hr(t) ? t : vd(t);
|
|
9806
9806
|
}
|
|
9807
9807
|
function Ir(e, t, n) {
|
|
9808
9808
|
var r;
|
|
@@ -9810,7 +9810,7 @@ function Ir(e, t, n) {
|
|
|
9810
9810
|
const o = vd(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Ct(o);
|
|
9811
9811
|
if (s) {
|
|
9812
9812
|
const a = xi(i);
|
|
9813
|
-
return t.concat(i, i.visualViewport || [],
|
|
9813
|
+
return t.concat(i, i.visualViewport || [], Hr(o) ? o : [], a && n ? Ir(a) : []);
|
|
9814
9814
|
}
|
|
9815
9815
|
return t.concat(o, Ir(o, [], n));
|
|
9816
9816
|
}
|
|
@@ -9818,7 +9818,7 @@ function xi(e) {
|
|
|
9818
9818
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
9819
9819
|
}
|
|
9820
9820
|
function xd(e) {
|
|
9821
|
-
const t =
|
|
9821
|
+
const t = Ht(e);
|
|
9822
9822
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
9823
9823
|
const o = Jt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
|
|
9824
9824
|
return a && (n = s, r = i), {
|
|
@@ -9828,12 +9828,12 @@ function xd(e) {
|
|
|
9828
9828
|
};
|
|
9829
9829
|
}
|
|
9830
9830
|
function fa(e) {
|
|
9831
|
-
return
|
|
9831
|
+
return $t(e) ? e : e.contextElement;
|
|
9832
9832
|
}
|
|
9833
9833
|
function Kn(e) {
|
|
9834
9834
|
const t = fa(e);
|
|
9835
9835
|
if (!Jt(t))
|
|
9836
|
-
return
|
|
9836
|
+
return Xt(1);
|
|
9837
9837
|
const n = t.getBoundingClientRect(), {
|
|
9838
9838
|
width: r,
|
|
9839
9839
|
height: o,
|
|
@@ -9845,7 +9845,7 @@ function Kn(e) {
|
|
|
9845
9845
|
y: a
|
|
9846
9846
|
};
|
|
9847
9847
|
}
|
|
9848
|
-
const cy = /* @__PURE__ */
|
|
9848
|
+
const cy = /* @__PURE__ */ Xt(0);
|
|
9849
9849
|
function bd(e) {
|
|
9850
9850
|
const t = Ct(e);
|
|
9851
9851
|
return !da() || !t.visualViewport ? cy : {
|
|
@@ -9859,15 +9859,15 @@ function uy(e, t, n) {
|
|
|
9859
9859
|
function jn(e, t, n, r) {
|
|
9860
9860
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
9861
9861
|
const o = e.getBoundingClientRect(), s = fa(e);
|
|
9862
|
-
let i =
|
|
9863
|
-
t && (r ?
|
|
9864
|
-
const a = uy(s, n, r) ? bd(s) :
|
|
9862
|
+
let i = Xt(1);
|
|
9863
|
+
t && (r ? $t(r) && (i = Kn(r)) : i = Kn(e));
|
|
9864
|
+
const a = uy(s, n, r) ? bd(s) : Xt(0);
|
|
9865
9865
|
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;
|
|
9866
9866
|
if (s) {
|
|
9867
|
-
const p = Ct(s), x = r &&
|
|
9867
|
+
const p = Ct(s), x = r && $t(r) ? Ct(r) : r;
|
|
9868
9868
|
let g = p, v = xi(g);
|
|
9869
9869
|
for (; v && r && x !== g; ) {
|
|
9870
|
-
const m = Kn(v), b = v.getBoundingClientRect(), w =
|
|
9870
|
+
const m = Kn(v), b = v.getBoundingClientRect(), w = Ht(v), y = b.left + (v.clientLeft + parseFloat(w.paddingLeft)) * m.x, E = b.top + (v.clientTop + parseFloat(w.paddingTop)) * m.y;
|
|
9871
9871
|
c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u += E, g = Ct(v), v = xi(g);
|
|
9872
9872
|
}
|
|
9873
9873
|
}
|
|
@@ -9902,13 +9902,13 @@ function dy(e) {
|
|
|
9902
9902
|
let c = {
|
|
9903
9903
|
scrollLeft: 0,
|
|
9904
9904
|
scrollTop: 0
|
|
9905
|
-
}, u =
|
|
9906
|
-
const d =
|
|
9907
|
-
if ((h || !h && !s) && ((ir(r) !== "body" ||
|
|
9905
|
+
}, u = Xt(1);
|
|
9906
|
+
const d = Xt(0), h = Jt(r);
|
|
9907
|
+
if ((h || !h && !s) && ((ir(r) !== "body" || Hr(i)) && (c = ls(r)), Jt(r))) {
|
|
9908
9908
|
const x = jn(r);
|
|
9909
9909
|
u = Kn(r), d.x = x.x + r.clientLeft, d.y = x.y + r.clientTop;
|
|
9910
9910
|
}
|
|
9911
|
-
const p = i && !h && !s ? wd(i, c) :
|
|
9911
|
+
const p = i && !h && !s ? wd(i, c) : Xt(0);
|
|
9912
9912
|
return {
|
|
9913
9913
|
width: n.width * u.x,
|
|
9914
9914
|
height: n.height * u.y,
|
|
@@ -9923,7 +9923,7 @@ function hy(e) {
|
|
|
9923
9923
|
const t = Qt(e), n = ls(e), r = e.ownerDocument.body, o = wt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = wt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
9924
9924
|
let i = -n.scrollLeft + cs(e);
|
|
9925
9925
|
const a = -n.scrollTop;
|
|
9926
|
-
return
|
|
9926
|
+
return Ht(r).direction === "rtl" && (i += wt(t.clientWidth, r.clientWidth) - o), {
|
|
9927
9927
|
width: o,
|
|
9928
9928
|
height: s,
|
|
9929
9929
|
x: i,
|
|
@@ -9953,7 +9953,7 @@ function py(e, t) {
|
|
|
9953
9953
|
}
|
|
9954
9954
|
const my = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
9955
9955
|
function gy(e, t) {
|
|
9956
|
-
const n = jn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Jt(e) ? Kn(e) :
|
|
9956
|
+
const n = jn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Jt(e) ? Kn(e) : Xt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
|
|
9957
9957
|
return {
|
|
9958
9958
|
width: i,
|
|
9959
9959
|
height: a,
|
|
@@ -9967,7 +9967,7 @@ function oc(e, t, n) {
|
|
|
9967
9967
|
r = py(e, n);
|
|
9968
9968
|
else if (t === "document")
|
|
9969
9969
|
r = hy(Qt(e));
|
|
9970
|
-
else if (
|
|
9970
|
+
else if ($t(t))
|
|
9971
9971
|
r = gy(t, n);
|
|
9972
9972
|
else {
|
|
9973
9973
|
const o = bd(e);
|
|
@@ -9982,18 +9982,18 @@ function oc(e, t, n) {
|
|
|
9982
9982
|
}
|
|
9983
9983
|
function yd(e, t) {
|
|
9984
9984
|
const n = fn(e);
|
|
9985
|
-
return n === t ||
|
|
9985
|
+
return n === t || !$t(n) || Jn(n) ? !1 : Ht(n).position === "fixed" || yd(n, t);
|
|
9986
9986
|
}
|
|
9987
9987
|
function vy(e, t) {
|
|
9988
9988
|
const n = t.get(e);
|
|
9989
9989
|
if (n)
|
|
9990
9990
|
return n;
|
|
9991
|
-
let r = Ir(e, [], !1).filter((a) =>
|
|
9992
|
-
const s =
|
|
9991
|
+
let r = Ir(e, [], !1).filter((a) => $t(a) && ir(a) !== "body"), o = null;
|
|
9992
|
+
const s = Ht(e).position === "fixed";
|
|
9993
9993
|
let i = s ? fn(e) : e;
|
|
9994
|
-
for (;
|
|
9995
|
-
const a =
|
|
9996
|
-
!c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && my.has(o.position) ||
|
|
9994
|
+
for (; $t(i) && !Jn(i); ) {
|
|
9995
|
+
const a = Ht(i), c = ua(i);
|
|
9996
|
+
!c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && my.has(o.position) || Hr(i) && !c && yd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fn(i);
|
|
9997
9997
|
}
|
|
9998
9998
|
return t.set(e, r), r;
|
|
9999
9999
|
}
|
|
@@ -10031,17 +10031,17 @@ function wy(e, t, n) {
|
|
|
10031
10031
|
scrollLeft: 0,
|
|
10032
10032
|
scrollTop: 0
|
|
10033
10033
|
};
|
|
10034
|
-
const c =
|
|
10034
|
+
const c = Xt(0);
|
|
10035
10035
|
function u() {
|
|
10036
10036
|
c.x = cs(o);
|
|
10037
10037
|
}
|
|
10038
10038
|
if (r || !r && !s)
|
|
10039
|
-
if ((ir(t) !== "body" ||
|
|
10039
|
+
if ((ir(t) !== "body" || Hr(o)) && (a = ls(t)), r) {
|
|
10040
10040
|
const x = jn(t, !0, s, t);
|
|
10041
10041
|
c.x = x.x + t.clientLeft, c.y = x.y + t.clientTop;
|
|
10042
10042
|
} else o && u();
|
|
10043
10043
|
s && !r && o && u();
|
|
10044
|
-
const d = o && !r && !s ? wd(o, a) :
|
|
10044
|
+
const d = o && !r && !s ? wd(o, a) : Xt(0), h = i.left + a.scrollLeft - c.x - d.x, p = i.top + a.scrollTop - c.y - d.y;
|
|
10045
10045
|
return {
|
|
10046
10046
|
x: h,
|
|
10047
10047
|
y: p,
|
|
@@ -10050,10 +10050,10 @@ function wy(e, t, n) {
|
|
|
10050
10050
|
};
|
|
10051
10051
|
}
|
|
10052
10052
|
function Vs(e) {
|
|
10053
|
-
return
|
|
10053
|
+
return Ht(e).position === "static";
|
|
10054
10054
|
}
|
|
10055
10055
|
function sc(e, t) {
|
|
10056
|
-
if (!Jt(e) ||
|
|
10056
|
+
if (!Jt(e) || Ht(e).position === "fixed")
|
|
10057
10057
|
return null;
|
|
10058
10058
|
if (t)
|
|
10059
10059
|
return t(e);
|
|
@@ -10067,7 +10067,7 @@ function Sd(e, t) {
|
|
|
10067
10067
|
if (!Jt(e)) {
|
|
10068
10068
|
let o = fn(e);
|
|
10069
10069
|
for (; o && !Jn(o); ) {
|
|
10070
|
-
if (
|
|
10070
|
+
if ($t(o) && !Vs(o))
|
|
10071
10071
|
return o;
|
|
10072
10072
|
o = fn(o);
|
|
10073
10073
|
}
|
|
@@ -10091,7 +10091,7 @@ const yy = async function(e) {
|
|
|
10091
10091
|
};
|
|
10092
10092
|
};
|
|
10093
10093
|
function Sy(e) {
|
|
10094
|
-
return
|
|
10094
|
+
return Ht(e).direction === "rtl";
|
|
10095
10095
|
}
|
|
10096
10096
|
const Cy = {
|
|
10097
10097
|
convertOffsetParentRelativeRectToViewportRelativeRect: dy,
|
|
@@ -10102,7 +10102,7 @@ const Cy = {
|
|
|
10102
10102
|
getClientRects: fy,
|
|
10103
10103
|
getDimensions: by,
|
|
10104
10104
|
getScale: Kn,
|
|
10105
|
-
isElement:
|
|
10105
|
+
isElement: $t,
|
|
10106
10106
|
isRTL: Sy
|
|
10107
10107
|
};
|
|
10108
10108
|
function Cd(e, t) {
|
|
@@ -10190,7 +10190,7 @@ function Ry(e, t, n, r) {
|
|
|
10190
10190
|
}), h == null || h(), (b = x) == null || b.disconnect(), x = null, c && cancelAnimationFrame(g);
|
|
10191
10191
|
};
|
|
10192
10192
|
}
|
|
10193
|
-
const Ey =
|
|
10193
|
+
const Ey = Xw, Iy = Jw, Ny = Kw, jy = Qw, Ay = Yw, ic = Gw, ky = Zw, Py = (e, t, n) => {
|
|
10194
10194
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
10195
10195
|
platform: Cy,
|
|
10196
10196
|
...n
|
|
@@ -10313,7 +10313,7 @@ function My(e) {
|
|
|
10313
10313
|
G();
|
|
10314
10314
|
}
|
|
10315
10315
|
}, [E, S, G, k, A]);
|
|
10316
|
-
const
|
|
10316
|
+
const H = f.useMemo(() => ({
|
|
10317
10317
|
reference: C,
|
|
10318
10318
|
floating: R,
|
|
10319
10319
|
setReference: w,
|
|
@@ -10321,7 +10321,7 @@ function My(e) {
|
|
|
10321
10321
|
}), [w, y]), L = f.useMemo(() => ({
|
|
10322
10322
|
reference: E,
|
|
10323
10323
|
floating: S
|
|
10324
|
-
}), [E, S]),
|
|
10324
|
+
}), [E, S]), q = f.useMemo(() => {
|
|
10325
10325
|
const O = {
|
|
10326
10326
|
position: n,
|
|
10327
10327
|
left: 0,
|
|
@@ -10345,10 +10345,10 @@ function My(e) {
|
|
|
10345
10345
|
return f.useMemo(() => ({
|
|
10346
10346
|
...d,
|
|
10347
10347
|
update: G,
|
|
10348
|
-
refs:
|
|
10348
|
+
refs: H,
|
|
10349
10349
|
elements: L,
|
|
10350
|
-
floatingStyles:
|
|
10351
|
-
}), [d, G,
|
|
10350
|
+
floatingStyles: q
|
|
10351
|
+
}), [d, G, H, L, q]);
|
|
10352
10352
|
}
|
|
10353
10353
|
const Dy = (e) => {
|
|
10354
10354
|
function t(n) {
|
|
@@ -10380,10 +10380,10 @@ const Dy = (e) => {
|
|
|
10380
10380
|
}), By = (e, t) => ({
|
|
10381
10381
|
...ky(e),
|
|
10382
10382
|
options: [e, t]
|
|
10383
|
-
}),
|
|
10383
|
+
}), $y = (e, t) => ({
|
|
10384
10384
|
...Ny(e),
|
|
10385
10385
|
options: [e, t]
|
|
10386
|
-
}),
|
|
10386
|
+
}), Hy = (e, t) => ({
|
|
10387
10387
|
...jy(e),
|
|
10388
10388
|
options: [e, t]
|
|
10389
10389
|
}), zy = (e, t) => ({
|
|
@@ -10467,10 +10467,10 @@ var pa = "PopperContent", [Ky, Yy] = Id(pa), Pd = f.forwardRef(
|
|
|
10467
10467
|
...v
|
|
10468
10468
|
} = e, m = Nd(pa, n), [b, w] = f.useState(null), y = Te(t, (Pe) => w(Pe)), [E, S] = f.useState(null), C = Ed(E), R = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
|
|
10469
10469
|
padding: k,
|
|
10470
|
-
boundary: M.filter(
|
|
10470
|
+
boundary: M.filter(Xy),
|
|
10471
10471
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
10472
10472
|
altBoundary: W
|
|
10473
|
-
}, { refs: N, floatingStyles:
|
|
10473
|
+
}, { refs: N, floatingStyles: H, placement: L, isPositioned: q, middlewareData: O } = My({
|
|
10474
10474
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
10475
10475
|
strategy: "fixed",
|
|
10476
10476
|
placement: A,
|
|
@@ -10488,22 +10488,22 @@ var pa = "PopperContent", [Ky, Yy] = Id(pa), Pd = f.forwardRef(
|
|
|
10488
10488
|
limiter: h === "partial" ? By() : void 0,
|
|
10489
10489
|
...G
|
|
10490
10490
|
}),
|
|
10491
|
-
c &&
|
|
10492
|
-
|
|
10491
|
+
c && $y({ ...G }),
|
|
10492
|
+
Hy({
|
|
10493
10493
|
...G,
|
|
10494
10494
|
apply: ({ elements: Pe, rects: Fe, availableWidth: Le, availableHeight: ce }) => {
|
|
10495
|
-
const { width: Ae, height: ve } = Fe.reference,
|
|
10496
|
-
|
|
10495
|
+
const { width: Ae, height: ve } = Fe.reference, $ = Pe.floating.style;
|
|
10496
|
+
$.setProperty("--radix-popper-available-width", `${Le}px`), $.setProperty("--radix-popper-available-height", `${ce}px`), $.setProperty("--radix-popper-anchor-width", `${Ae}px`), $.setProperty("--radix-popper-anchor-height", `${ve}px`);
|
|
10497
10497
|
}
|
|
10498
10498
|
}),
|
|
10499
10499
|
E && Uy({ element: E, padding: a }),
|
|
10500
10500
|
Jy({ arrowWidth: R, arrowHeight: I }),
|
|
10501
10501
|
p && zy({ strategy: "referenceHidden", ...G })
|
|
10502
10502
|
]
|
|
10503
|
-
}), [_, z] = Md(L),
|
|
10503
|
+
}), [_, z] = Md(L), X = ot(g);
|
|
10504
10504
|
tt(() => {
|
|
10505
|
-
|
|
10506
|
-
}, [
|
|
10505
|
+
q && (X == null || X());
|
|
10506
|
+
}, [q, X]);
|
|
10507
10507
|
const oe = (Y = O.arrow) == null ? void 0 : Y.x, F = (P = O.arrow) == null ? void 0 : P.y, Q = ((Z = O.arrow) == null ? void 0 : Z.centerOffset) !== 0, [de, be] = f.useState();
|
|
10508
10508
|
return tt(() => {
|
|
10509
10509
|
b && be(window.getComputedStyle(b).zIndex);
|
|
@@ -10513,8 +10513,8 @@ var pa = "PopperContent", [Ky, Yy] = Id(pa), Pd = f.forwardRef(
|
|
|
10513
10513
|
ref: N.setFloating,
|
|
10514
10514
|
"data-radix-popper-content-wrapper": "",
|
|
10515
10515
|
style: {
|
|
10516
|
-
|
|
10517
|
-
transform:
|
|
10516
|
+
...H,
|
|
10517
|
+
transform: q ? H.transform : "translate(0, -200%)",
|
|
10518
10518
|
// keep off the page when measuring
|
|
10519
10519
|
minWidth: "max-content",
|
|
10520
10520
|
zIndex: de,
|
|
@@ -10551,7 +10551,7 @@ var pa = "PopperContent", [Ky, Yy] = Id(pa), Pd = f.forwardRef(
|
|
|
10551
10551
|
...v.style,
|
|
10552
10552
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
10553
10553
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
10554
|
-
animation:
|
|
10554
|
+
animation: q ? void 0 : "none"
|
|
10555
10555
|
}
|
|
10556
10556
|
}
|
|
10557
10557
|
)
|
|
@@ -10562,13 +10562,13 @@ var pa = "PopperContent", [Ky, Yy] = Id(pa), Pd = f.forwardRef(
|
|
|
10562
10562
|
}
|
|
10563
10563
|
);
|
|
10564
10564
|
Pd.displayName = pa;
|
|
10565
|
-
var _d = "PopperArrow",
|
|
10565
|
+
var _d = "PopperArrow", qy = {
|
|
10566
10566
|
top: "bottom",
|
|
10567
10567
|
right: "left",
|
|
10568
10568
|
bottom: "top",
|
|
10569
10569
|
left: "right"
|
|
10570
10570
|
}, Od = f.forwardRef(function(t, n) {
|
|
10571
|
-
const { __scopePopper: r, ...o } = t, s = Yy(_d, r), i =
|
|
10571
|
+
const { __scopePopper: r, ...o } = t, s = Yy(_d, r), i = qy[s.placedSide];
|
|
10572
10572
|
return (
|
|
10573
10573
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
10574
10574
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -10613,7 +10613,7 @@ var _d = "PopperArrow", Xy = {
|
|
|
10613
10613
|
);
|
|
10614
10614
|
});
|
|
10615
10615
|
Od.displayName = _d;
|
|
10616
|
-
function
|
|
10616
|
+
function Xy(e) {
|
|
10617
10617
|
return e !== null;
|
|
10618
10618
|
}
|
|
10619
10619
|
var Jy = (e) => ({
|
|
@@ -10696,10 +10696,10 @@ var rS = f.forwardRef((e, t) => {
|
|
|
10696
10696
|
if (I.target === I.currentTarget && A && !b) {
|
|
10697
10697
|
const k = new CustomEvent(Ks, Zy);
|
|
10698
10698
|
if (I.currentTarget.dispatchEvent(k), !k.defaultPrevented) {
|
|
10699
|
-
const M = E().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === v),
|
|
10699
|
+
const M = E().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === v), H = [W, G, ...M].filter(
|
|
10700
10700
|
Boolean
|
|
10701
10701
|
).map((L) => L.ref.current);
|
|
10702
|
-
|
|
10702
|
+
Hd(H, d);
|
|
10703
10703
|
}
|
|
10704
10704
|
}
|
|
10705
10705
|
S.current = !1;
|
|
@@ -10709,7 +10709,7 @@ var rS = f.forwardRef((e, t) => {
|
|
|
10709
10709
|
)
|
|
10710
10710
|
}
|
|
10711
10711
|
);
|
|
10712
|
-
}), Bd = "RovingFocusGroupItem",
|
|
10712
|
+
}), Bd = "RovingFocusGroupItem", $d = f.forwardRef(
|
|
10713
10713
|
(e, t) => {
|
|
10714
10714
|
const {
|
|
10715
10715
|
__scopeRovingFocusGroup: n,
|
|
@@ -10757,7 +10757,7 @@ var rS = f.forwardRef((e, t) => {
|
|
|
10757
10757
|
const E = y.indexOf(m.currentTarget);
|
|
10758
10758
|
y = d.loop ? aS(y, E + 1) : y.slice(E + 1);
|
|
10759
10759
|
}
|
|
10760
|
-
setTimeout(() =>
|
|
10760
|
+
setTimeout(() => Hd(y));
|
|
10761
10761
|
}
|
|
10762
10762
|
}),
|
|
10763
10763
|
children: typeof i == "function" ? i({ isCurrentTabStop: h, hasTabStop: v != null }) : i
|
|
@@ -10767,7 +10767,7 @@ var rS = f.forwardRef((e, t) => {
|
|
|
10767
10767
|
);
|
|
10768
10768
|
}
|
|
10769
10769
|
);
|
|
10770
|
-
|
|
10770
|
+
$d.displayName = Bd;
|
|
10771
10771
|
var oS = {
|
|
10772
10772
|
ArrowLeft: "prev",
|
|
10773
10773
|
ArrowUp: "prev",
|
|
@@ -10786,7 +10786,7 @@ function iS(e, t, n) {
|
|
|
10786
10786
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
10787
10787
|
return oS[r];
|
|
10788
10788
|
}
|
|
10789
|
-
function
|
|
10789
|
+
function Hd(e, t = !1) {
|
|
10790
10790
|
const n = document.activeElement;
|
|
10791
10791
|
for (const r of e)
|
|
10792
10792
|
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
@@ -10794,7 +10794,7 @@ function $d(e, t = !1) {
|
|
|
10794
10794
|
function aS(e, t) {
|
|
10795
10795
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
10796
10796
|
}
|
|
10797
|
-
var lS = Fd, cS =
|
|
10797
|
+
var lS = Fd, cS = $d, wi = ["Enter", " "], uS = ["ArrowDown", "PageUp", "Home"], zd = ["ArrowUp", "PageDown", "End"], dS = [...uS, ...zd], fS = {
|
|
10798
10798
|
ltr: [...wi, "ArrowRight"],
|
|
10799
10799
|
rtl: [...wi, "ArrowLeft"]
|
|
10800
10800
|
}, hS = {
|
|
@@ -10891,7 +10891,7 @@ var jt = "MenuContent", [wS, ya] = On(jt), Yd = f.forwardRef(
|
|
|
10891
10891
|
onDismiss: () => n.onOpenChange(!1)
|
|
10892
10892
|
}
|
|
10893
10893
|
);
|
|
10894
|
-
}), CS =
|
|
10894
|
+
}), CS = qn("MenuContent.ScrollLock"), Sa = f.forwardRef(
|
|
10895
10895
|
(e, t) => {
|
|
10896
10896
|
const {
|
|
10897
10897
|
__scopeMenu: n,
|
|
@@ -10908,17 +10908,17 @@ var jt = "MenuContent", [wS, ya] = On(jt), Yd = f.forwardRef(
|
|
|
10908
10908
|
onDismiss: x,
|
|
10909
10909
|
disableOutsideScroll: g,
|
|
10910
10910
|
...v
|
|
10911
|
-
} = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Wd(n), E = pS(n), [S, C] = f.useState(null), R = f.useRef(null), I = Te(t, R, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0),
|
|
10911
|
+
} = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Wd(n), E = pS(n), [S, C] = f.useState(null), R = f.useRef(null), I = Te(t, R, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: CS, allowPinchZoom: !0 } : void 0, q = (_) => {
|
|
10912
10912
|
var Y, P;
|
|
10913
|
-
const z = k.current + _,
|
|
10913
|
+
const z = k.current + _, X = E().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = X.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, Q = X.map((Z) => Z.textValue), de = MS(Q, z, F), be = (P = X.find((Z) => Z.textValue === de)) == null ? void 0 : P.ref.current;
|
|
10914
10914
|
(function Z(ne) {
|
|
10915
10915
|
k.current = ne, window.clearTimeout(A.current), ne !== "" && (A.current = window.setTimeout(() => Z(""), 1e3));
|
|
10916
10916
|
})(z), be && setTimeout(() => be.focus());
|
|
10917
10917
|
};
|
|
10918
10918
|
f.useEffect(() => () => window.clearTimeout(A.current), []), ta();
|
|
10919
10919
|
const O = f.useCallback((_) => {
|
|
10920
|
-
var
|
|
10921
|
-
return G.current === ((
|
|
10920
|
+
var X, oe;
|
|
10921
|
+
return G.current === ((X = W.current) == null ? void 0 : X.side) && LS(_, (oe = W.current) == null ? void 0 : oe.area);
|
|
10922
10922
|
}, []);
|
|
10923
10923
|
return /* @__PURE__ */ l.jsx(
|
|
10924
10924
|
wS,
|
|
@@ -10948,7 +10948,7 @@ var jt = "MenuContent", [wS, ya] = On(jt), Yd = f.forwardRef(
|
|
|
10948
10948
|
onPointerGraceIntentChange: f.useCallback((_) => {
|
|
10949
10949
|
W.current = _;
|
|
10950
10950
|
}, []),
|
|
10951
|
-
children: /* @__PURE__ */ l.jsx(
|
|
10951
|
+
children: /* @__PURE__ */ l.jsx(H, { ...L, children: /* @__PURE__ */ l.jsx(
|
|
10952
10952
|
Jo,
|
|
10953
10953
|
{
|
|
10954
10954
|
asChild: !0,
|
|
@@ -10959,7 +10959,7 @@ var jt = "MenuContent", [wS, ya] = On(jt), Yd = f.forwardRef(
|
|
|
10959
10959
|
}),
|
|
10960
10960
|
onUnmountAutoFocus: i,
|
|
10961
10961
|
children: /* @__PURE__ */ l.jsx(
|
|
10962
|
-
|
|
10962
|
+
$r,
|
|
10963
10963
|
{
|
|
10964
10964
|
asChild: !0,
|
|
10965
10965
|
disableOutsidePointerEvents: a,
|
|
@@ -10995,8 +10995,8 @@ var jt = "MenuContent", [wS, ya] = On(jt), Yd = f.forwardRef(
|
|
|
10995
10995
|
ref: I,
|
|
10996
10996
|
style: { outline: "none", ...v.style },
|
|
10997
10997
|
onKeyDown: ee(v.onKeyDown, (_) => {
|
|
10998
|
-
const
|
|
10999
|
-
|
|
10998
|
+
const X = _.target.closest("[data-radix-menu-content]") === _.currentTarget, oe = _.ctrlKey || _.altKey || _.metaKey, F = _.key.length === 1;
|
|
10999
|
+
X && (_.key === "Tab" && _.preventDefault(), !oe && F && q(_.key));
|
|
11000
11000
|
const Q = R.current;
|
|
11001
11001
|
if (_.target !== Q || !dS.includes(_.key)) return;
|
|
11002
11002
|
_.preventDefault();
|
|
@@ -11009,8 +11009,8 @@ var jt = "MenuContent", [wS, ya] = On(jt), Yd = f.forwardRef(
|
|
|
11009
11009
|
onPointerMove: ee(
|
|
11010
11010
|
e.onPointerMove,
|
|
11011
11011
|
jr((_) => {
|
|
11012
|
-
const z = _.target,
|
|
11013
|
-
if (_.currentTarget.contains(z) &&
|
|
11012
|
+
const z = _.target, X = N.current !== _.clientX;
|
|
11013
|
+
if (_.currentTarget.contains(z) && X) {
|
|
11014
11014
|
const oe = _.clientX > N.current ? "right" : "left";
|
|
11015
11015
|
G.current = oe, N.current = _.clientX;
|
|
11016
11016
|
}
|
|
@@ -11036,13 +11036,13 @@ var TS = "MenuGroup", Ca = f.forwardRef(
|
|
|
11036
11036
|
}
|
|
11037
11037
|
);
|
|
11038
11038
|
Ca.displayName = TS;
|
|
11039
|
-
var RS = "MenuLabel",
|
|
11039
|
+
var RS = "MenuLabel", qd = f.forwardRef(
|
|
11040
11040
|
(e, t) => {
|
|
11041
11041
|
const { __scopeMenu: n, ...r } = e;
|
|
11042
11042
|
return /* @__PURE__ */ l.jsx(me.div, { ...r, ref: t });
|
|
11043
11043
|
}
|
|
11044
11044
|
);
|
|
11045
|
-
|
|
11045
|
+
qd.displayName = RS;
|
|
11046
11046
|
var Oo = "MenuItem", lc = "menu.itemSelect", ds = f.forwardRef(
|
|
11047
11047
|
(e, t) => {
|
|
11048
11048
|
const { disabled: n = !1, onSelect: r, ...o } = e, s = f.useRef(null), i = Wr(Oo, e.__scopeMenu), a = ya(Oo, e.__scopeMenu), c = Te(t, s), u = f.useRef(!1), d = () => {
|
|
@@ -11053,7 +11053,7 @@ var Oo = "MenuItem", lc = "menu.itemSelect", ds = f.forwardRef(
|
|
|
11053
11053
|
}
|
|
11054
11054
|
};
|
|
11055
11055
|
return /* @__PURE__ */ l.jsx(
|
|
11056
|
-
|
|
11056
|
+
Xd,
|
|
11057
11057
|
{
|
|
11058
11058
|
...o,
|
|
11059
11059
|
ref: c,
|
|
@@ -11076,7 +11076,7 @@ var Oo = "MenuItem", lc = "menu.itemSelect", ds = f.forwardRef(
|
|
|
11076
11076
|
}
|
|
11077
11077
|
);
|
|
11078
11078
|
ds.displayName = Oo;
|
|
11079
|
-
var
|
|
11079
|
+
var Xd = f.forwardRef(
|
|
11080
11080
|
(e, t) => {
|
|
11081
11081
|
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = ya(Oo, n), a = Wd(n), c = f.useRef(null), u = Te(t, c), [d, h] = f.useState(!1), [p, x] = f.useState("");
|
|
11082
11082
|
return f.useEffect(() => {
|
|
@@ -11226,7 +11226,7 @@ var PS = "MenuSub", [eR, af] = On(PS), mr = "MenuSubTrigger", lf = f.forwardRef(
|
|
|
11226
11226
|
window.clearTimeout(h), c(null);
|
|
11227
11227
|
};
|
|
11228
11228
|
}, [a, c]), /* @__PURE__ */ l.jsx(ba, { asChild: !0, ...u, children: /* @__PURE__ */ l.jsx(
|
|
11229
|
-
|
|
11229
|
+
Xd,
|
|
11230
11230
|
{
|
|
11231
11231
|
id: o.triggerId,
|
|
11232
11232
|
"aria-haspopup": "menu",
|
|
@@ -11234,7 +11234,7 @@ var PS = "MenuSub", [eR, af] = On(PS), mr = "MenuSubTrigger", lf = f.forwardRef(
|
|
|
11234
11234
|
"aria-controls": o.contentId,
|
|
11235
11235
|
"data-state": df(n.open),
|
|
11236
11236
|
...e,
|
|
11237
|
-
ref:
|
|
11237
|
+
ref: Xi(t, o.onTriggerChange),
|
|
11238
11238
|
onClick: (h) => {
|
|
11239
11239
|
var p;
|
|
11240
11240
|
(p = e.onClick) == null || p.call(e, h), !(e.disabled || h.defaultPrevented) && (h.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
@@ -11365,7 +11365,7 @@ function LS(e, t) {
|
|
|
11365
11365
|
function jr(e) {
|
|
11366
11366
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
11367
11367
|
}
|
|
11368
|
-
var FS = Vd, BS = ba,
|
|
11368
|
+
var FS = Vd, BS = ba, $S = Kd, HS = Yd, zS = Ca, US = qd, WS = ds, VS = Jd, GS = Qd, KS = tf, YS = rf, qS = of, XS = sf, JS = lf, ZS = uf, fs = "DropdownMenu", [QS, tR] = Ut(
|
|
11369
11369
|
fs,
|
|
11370
11370
|
[Ud]
|
|
11371
11371
|
), ht = Ud(), [e0, ff] = QS(fs), hf = (e) => {
|
|
@@ -11414,7 +11414,7 @@ var pf = "DropdownMenuTrigger", mf = f.forwardRef(
|
|
|
11414
11414
|
"data-disabled": r ? "" : void 0,
|
|
11415
11415
|
disabled: r,
|
|
11416
11416
|
...o,
|
|
11417
|
-
ref:
|
|
11417
|
+
ref: Xi(t, s.triggerRef),
|
|
11418
11418
|
onPointerDown: ee(e.onPointerDown, (a) => {
|
|
11419
11419
|
!r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
|
|
11420
11420
|
}),
|
|
@@ -11428,14 +11428,14 @@ var pf = "DropdownMenuTrigger", mf = f.forwardRef(
|
|
|
11428
11428
|
mf.displayName = pf;
|
|
11429
11429
|
var t0 = "DropdownMenuPortal", gf = (e) => {
|
|
11430
11430
|
const { __scopeDropdownMenu: t, ...n } = e, r = ht(t);
|
|
11431
|
-
return /* @__PURE__ */ l.jsx(
|
|
11431
|
+
return /* @__PURE__ */ l.jsx($S, { ...r, ...n });
|
|
11432
11432
|
};
|
|
11433
11433
|
gf.displayName = t0;
|
|
11434
11434
|
var vf = "DropdownMenuContent", xf = f.forwardRef(
|
|
11435
11435
|
(e, t) => {
|
|
11436
11436
|
const { __scopeDropdownMenu: n, ...r } = e, o = ff(vf, n), s = ht(n), i = f.useRef(!1);
|
|
11437
11437
|
return /* @__PURE__ */ l.jsx(
|
|
11438
|
-
|
|
11438
|
+
HS,
|
|
11439
11439
|
{
|
|
11440
11440
|
id: o.contentId,
|
|
11441
11441
|
"aria-labelledby": o.triggerId,
|
|
@@ -11506,13 +11506,13 @@ var u0 = "DropdownMenuItemIndicator", Cf = f.forwardRef((e, t) => {
|
|
|
11506
11506
|
Cf.displayName = u0;
|
|
11507
11507
|
var d0 = "DropdownMenuSeparator", Tf = f.forwardRef((e, t) => {
|
|
11508
11508
|
const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
|
|
11509
|
-
return /* @__PURE__ */ l.jsx(
|
|
11509
|
+
return /* @__PURE__ */ l.jsx(qS, { ...o, ...r, ref: t });
|
|
11510
11510
|
});
|
|
11511
11511
|
Tf.displayName = d0;
|
|
11512
11512
|
var f0 = "DropdownMenuArrow", h0 = f.forwardRef(
|
|
11513
11513
|
(e, t) => {
|
|
11514
11514
|
const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
|
|
11515
|
-
return /* @__PURE__ */ l.jsx(
|
|
11515
|
+
return /* @__PURE__ */ l.jsx(XS, { ...o, ...r, ref: t });
|
|
11516
11516
|
}
|
|
11517
11517
|
);
|
|
11518
11518
|
h0.displayName = f0;
|
|
@@ -11554,7 +11554,7 @@ const b0 = g0, w0 = v0, y0 = f.forwardRef(({ className: e, inset: t, children: n
|
|
|
11554
11554
|
...r,
|
|
11555
11555
|
children: [
|
|
11556
11556
|
n,
|
|
11557
|
-
/* @__PURE__ */ l.jsx(
|
|
11557
|
+
/* @__PURE__ */ l.jsx(Hp, { className: "ml-auto h-4 w-4" })
|
|
11558
11558
|
]
|
|
11559
11559
|
}
|
|
11560
11560
|
));
|
|
@@ -11682,9 +11682,9 @@ function vo({
|
|
|
11682
11682
|
isLoadingHistory: I,
|
|
11683
11683
|
loadOlderMessages: A,
|
|
11684
11684
|
api: k
|
|
11685
|
-
} = Li(), [M, W] = fe(null), [G, N] = fe(""), [
|
|
11685
|
+
} = Li(), [M, W] = fe(null), [G, N] = fe(""), [H, L] = fe(null), [q, O] = fe([]), [_, z] = fe(!1), [X, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [Z, ne] = fe([]), [le, ie] = fe(null);
|
|
11686
11686
|
bt(null);
|
|
11687
|
-
const Pe = bt(null), Fe = bt(null), Le = bt(null), ce = bt(!1), Ae = bt(!0), ve = bt(0),
|
|
11687
|
+
const Pe = bt(null), Fe = bt(null), Le = bt(null), ce = bt(!1), Ae = bt(!0), ve = bt(0), $ = bt(null), [ae, Be] = fe("desktop");
|
|
11688
11688
|
Ve(() => {
|
|
11689
11689
|
const J = () => {
|
|
11690
11690
|
const se = window.innerWidth;
|
|
@@ -11694,13 +11694,13 @@ function vo({
|
|
|
11694
11694
|
}, []), Ve(() => {
|
|
11695
11695
|
let J = !1;
|
|
11696
11696
|
if (!p) {
|
|
11697
|
-
ne([]), ie(null),
|
|
11697
|
+
ne([]), ie(null), $.current = null;
|
|
11698
11698
|
return;
|
|
11699
11699
|
}
|
|
11700
11700
|
const se = {
|
|
11701
11701
|
threadId: p,
|
|
11702
11702
|
checkpointId: y ?? null
|
|
11703
|
-
}, Ce =
|
|
11703
|
+
}, Ce = $.current;
|
|
11704
11704
|
if (!(Ce && Ce.threadId === se.threadId && Ce.checkpointId === se.checkpointId))
|
|
11705
11705
|
return E(p).then((Ne) => {
|
|
11706
11706
|
if (J) return;
|
|
@@ -11708,9 +11708,9 @@ function vo({
|
|
|
11708
11708
|
ne(_t), ie((Ot) => {
|
|
11709
11709
|
var Ln;
|
|
11710
11710
|
return Ot ?? ((Ln = _t[0]) == null ? void 0 : Ln.checkpointId) ?? null;
|
|
11711
|
-
}),
|
|
11711
|
+
}), $.current = se;
|
|
11712
11712
|
}).catch((Ne) => {
|
|
11713
|
-
console.error("ChatInterface - listCheckpoints error:", Ne), J || (ne([]),
|
|
11713
|
+
console.error("ChatInterface - listCheckpoints error:", Ne), J || (ne([]), $.current = null);
|
|
11714
11714
|
}), () => {
|
|
11715
11715
|
J = !0;
|
|
11716
11716
|
};
|
|
@@ -11776,7 +11776,7 @@ function vo({
|
|
|
11776
11776
|
}
|
|
11777
11777
|
}, Qe = async (J) => {
|
|
11778
11778
|
const se = J.trim();
|
|
11779
|
-
if (!(!se &&
|
|
11779
|
+
if (!(!se && q.length === 0)) {
|
|
11780
11780
|
if (se) {
|
|
11781
11781
|
const Ce = ut(se);
|
|
11782
11782
|
if (Ce) {
|
|
@@ -11785,7 +11785,7 @@ function vo({
|
|
|
11785
11785
|
}
|
|
11786
11786
|
}
|
|
11787
11787
|
try {
|
|
11788
|
-
await b(se, { checkpointId: le || y || void 0, payloadExtras: M ? { edit: !0, originalMessageId: M } : void 0, attachments:
|
|
11788
|
+
await b(se, { checkpointId: le || y || void 0, payloadExtras: M ? { edit: !0, originalMessageId: M } : void 0, attachments: q }), u == null || u(se), L(null), O([]), W(null), N("");
|
|
11789
11789
|
} catch (Ce) {
|
|
11790
11790
|
const Ne = (Ce == null ? void 0 : Ce.message) || "Failed to send message";
|
|
11791
11791
|
L(Ne), h == null || h(Ne);
|
|
@@ -11953,7 +11953,7 @@ function vo({
|
|
|
11953
11953
|
className: "hidden"
|
|
11954
11954
|
}
|
|
11955
11955
|
),
|
|
11956
|
-
|
|
11956
|
+
q.length > 0 && /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: q.map((J, se) => /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
|
|
11957
11957
|
/* @__PURE__ */ l.jsx(Ua, { size: 14 }),
|
|
11958
11958
|
/* @__PURE__ */ l.jsx("span", { className: "truncate max-w-[150px]", children: J.name }),
|
|
11959
11959
|
/* @__PURE__ */ l.jsx(
|
|
@@ -11985,10 +11985,10 @@ function vo({
|
|
|
11985
11985
|
" Uploading Excel file..."
|
|
11986
11986
|
] }),
|
|
11987
11987
|
F && !_ && /* @__PURE__ */ l.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: F }),
|
|
11988
|
-
|
|
11988
|
+
X && !_ && /* @__PURE__ */ l.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: X })
|
|
11989
11989
|
] })
|
|
11990
11990
|
] }),
|
|
11991
|
-
|
|
11991
|
+
H && /* @__PURE__ */ l.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: H }),
|
|
11992
11992
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
11993
11993
|
(s || i) && /* @__PURE__ */ l.jsxs(b0, { children: [
|
|
11994
11994
|
/* @__PURE__ */ l.jsx(w0, { asChild: !0, children: /* @__PURE__ */ l.jsx(
|
|
@@ -12039,8 +12039,8 @@ function vo({
|
|
|
12039
12039
|
onSend: Qe,
|
|
12040
12040
|
onCancelEdit: We,
|
|
12041
12041
|
onStop: w,
|
|
12042
|
-
allowEmptySend:
|
|
12043
|
-
textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${M ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${
|
|
12042
|
+
allowEmptySend: q.length > 0,
|
|
12043
|
+
textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${M ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${H ? "border-red-400" : ""} ${c.textarea || ""}`
|
|
12044
12044
|
}
|
|
12045
12045
|
) })
|
|
12046
12046
|
] })
|
|
@@ -12119,7 +12119,7 @@ var Ea = "ScrollArea", [Lf, nR] = Ut(Ea), [N0, kt] = Lf(Ea), Ff = f.forwardRef(
|
|
|
12119
12119
|
}
|
|
12120
12120
|
);
|
|
12121
12121
|
Ff.displayName = Ea;
|
|
12122
|
-
var Bf = "ScrollAreaViewport",
|
|
12122
|
+
var Bf = "ScrollAreaViewport", $f = f.forwardRef(
|
|
12123
12123
|
(e, t) => {
|
|
12124
12124
|
const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = kt(Bf, n), a = f.useRef(null), c = Te(t, a, i.onViewportChange);
|
|
12125
12125
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
@@ -12160,13 +12160,13 @@ var Bf = "ScrollAreaViewport", Hf = f.forwardRef(
|
|
|
12160
12160
|
] });
|
|
12161
12161
|
}
|
|
12162
12162
|
);
|
|
12163
|
-
|
|
12163
|
+
$f.displayName = Bf;
|
|
12164
12164
|
var en = "ScrollAreaScrollbar", Ia = f.forwardRef(
|
|
12165
12165
|
(e, t) => {
|
|
12166
12166
|
const { forceMount: n, ...r } = e, o = kt(en, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
|
|
12167
12167
|
return f.useEffect(() => (a ? s(!0) : i(!0), () => {
|
|
12168
12168
|
a ? s(!1) : i(!1);
|
|
12169
|
-
}), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(j0, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx(A0, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(
|
|
12169
|
+
}), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(j0, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx(A0, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(Hf, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx(Na, { ...r, ref: t }) : null;
|
|
12170
12170
|
}
|
|
12171
12171
|
);
|
|
12172
12172
|
Ia.displayName = en;
|
|
@@ -12186,7 +12186,7 @@ var j0 = f.forwardRef((e, t) => {
|
|
|
12186
12186
|
};
|
|
12187
12187
|
}
|
|
12188
12188
|
}, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ l.jsx(vt, { present: n || s, children: /* @__PURE__ */ l.jsx(
|
|
12189
|
-
|
|
12189
|
+
Hf,
|
|
12190
12190
|
{
|
|
12191
12191
|
"data-state": s ? "visible" : "hidden",
|
|
12192
12192
|
...r,
|
|
@@ -12237,7 +12237,7 @@ var j0 = f.forwardRef((e, t) => {
|
|
|
12237
12237
|
onPointerLeave: ee(e.onPointerLeave, () => c("POINTER_LEAVE"))
|
|
12238
12238
|
}
|
|
12239
12239
|
) });
|
|
12240
|
-
}),
|
|
12240
|
+
}), Hf = f.forwardRef((e, t) => {
|
|
12241
12241
|
const n = kt(en, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = f.useState(!1), a = e.orientation === "horizontal", c = ps(() => {
|
|
12242
12242
|
if (n.viewport) {
|
|
12243
12243
|
const u = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
@@ -12575,9 +12575,9 @@ function Zn(e, t) {
|
|
|
12575
12575
|
}
|
|
12576
12576
|
}, [e, n]);
|
|
12577
12577
|
}
|
|
12578
|
-
var
|
|
12579
|
-
const
|
|
12580
|
-
|
|
12578
|
+
var qf = Ff, F0 = $f, B0 = Vf;
|
|
12579
|
+
const Xf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
|
|
12580
|
+
qf,
|
|
12581
12581
|
{
|
|
12582
12582
|
ref: r,
|
|
12583
12583
|
className: D("relative overflow-hidden", e),
|
|
@@ -12589,7 +12589,7 @@ const qf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
12589
12589
|
]
|
|
12590
12590
|
}
|
|
12591
12591
|
));
|
|
12592
|
-
|
|
12592
|
+
Xf.displayName = qf.displayName;
|
|
12593
12593
|
const Jf = f.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ l.jsx(
|
|
12594
12594
|
Ia,
|
|
12595
12595
|
{
|
|
@@ -12637,7 +12637,7 @@ function Ci({
|
|
|
12637
12637
|
} catch (Q) {
|
|
12638
12638
|
console.error("Failed to select thread:", Q);
|
|
12639
12639
|
}
|
|
12640
|
-
},
|
|
12640
|
+
}, H = async () => {
|
|
12641
12641
|
try {
|
|
12642
12642
|
G(!0);
|
|
12643
12643
|
const F = await v();
|
|
@@ -12654,7 +12654,7 @@ function Ci({
|
|
|
12654
12654
|
} catch (de) {
|
|
12655
12655
|
console.error("Failed to delete thread:", de);
|
|
12656
12656
|
}
|
|
12657
|
-
},
|
|
12657
|
+
}, q = (F, Q) => {
|
|
12658
12658
|
Q.stopPropagation(), A(F.threadId), M(F.title || `Thread ${F.threadId.slice(0, 8)}`);
|
|
12659
12659
|
}, O = async (F) => {
|
|
12660
12660
|
if (k.trim())
|
|
@@ -12667,7 +12667,7 @@ function Ci({
|
|
|
12667
12667
|
A(null), M("");
|
|
12668
12668
|
}, z = (F, Q) => {
|
|
12669
12669
|
F.key === "Enter" ? O(Q) : F.key === "Escape" && _();
|
|
12670
|
-
},
|
|
12670
|
+
}, X = (F) => {
|
|
12671
12671
|
if (!F) return "";
|
|
12672
12672
|
try {
|
|
12673
12673
|
const Q = new Date(F), be = (/* @__PURE__ */ new Date()).getTime() - Q.getTime(), Y = Math.floor(be / (1e3 * 60 * 60 * 24));
|
|
@@ -12680,7 +12680,7 @@ function Ci({
|
|
|
12680
12680
|
t && /* @__PURE__ */ l.jsx("div", { className: s.header || "flex-shrink-0 p-2 border-b bg-slate-800 border-slate-700 text-slate-100 flex justify-end", children: /* @__PURE__ */ l.jsx(
|
|
12681
12681
|
ke,
|
|
12682
12682
|
{
|
|
12683
|
-
onClick:
|
|
12683
|
+
onClick: H,
|
|
12684
12684
|
disabled: W || E,
|
|
12685
12685
|
className: s.createButton || "p-2",
|
|
12686
12686
|
size: "sm",
|
|
@@ -12690,7 +12690,7 @@ function Ci({
|
|
|
12690
12690
|
}
|
|
12691
12691
|
) }),
|
|
12692
12692
|
/* @__PURE__ */ l.jsx(
|
|
12693
|
-
|
|
12693
|
+
Xf,
|
|
12694
12694
|
{
|
|
12695
12695
|
className: `flex-1 min-h-0 ${s.threadList || ""}`,
|
|
12696
12696
|
style: o ? { maxHeight: o } : void 0,
|
|
@@ -12712,11 +12712,11 @@ function Ci({
|
|
|
12712
12712
|
/* @__PURE__ */ l.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: oe(F) }),
|
|
12713
12713
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
|
|
12714
12714
|
/* @__PURE__ */ l.jsx(Yp, { size: 10 }),
|
|
12715
|
-
/* @__PURE__ */ l.jsx("span", { children:
|
|
12715
|
+
/* @__PURE__ */ l.jsx("span", { children: X(F.updatedAt || F.createdAt) })
|
|
12716
12716
|
] })
|
|
12717
12717
|
] }) }),
|
|
12718
12718
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
|
|
12719
|
-
r && I !== F.threadId && /* @__PURE__ */ l.jsx(ke, { variant: "ghost", size: "sm", onClick: (Q) =>
|
|
12719
|
+
r && I !== F.threadId && /* @__PURE__ */ l.jsx(ke, { variant: "ghost", size: "sm", onClick: (Q) => q(F, Q), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ l.jsx(xc, { size: 12 }) }),
|
|
12720
12720
|
n && /* @__PURE__ */ l.jsx(
|
|
12721
12721
|
ke,
|
|
12722
12722
|
{
|
|
@@ -12725,7 +12725,7 @@ function Ci({
|
|
|
12725
12725
|
onClick: (Q) => L(F.threadId, Q),
|
|
12726
12726
|
className: "h-6 w-6 p-0 text-red-400 hover:text-red-300 hover:bg-red-900/20",
|
|
12727
12727
|
title: "Delete thread",
|
|
12728
|
-
children: /* @__PURE__ */ l.jsx(
|
|
12728
|
+
children: /* @__PURE__ */ l.jsx(qp, { size: 12 })
|
|
12729
12729
|
}
|
|
12730
12730
|
)
|
|
12731
12731
|
] })
|
|
@@ -12760,7 +12760,7 @@ function Yn(e) {
|
|
|
12760
12760
|
if (!(typeof globalThis > "u"))
|
|
12761
12761
|
return globalThis[e];
|
|
12762
12762
|
}
|
|
12763
|
-
function
|
|
12763
|
+
function $0(e) {
|
|
12764
12764
|
if (typeof e != "string") return;
|
|
12765
12765
|
const t = e.trim();
|
|
12766
12766
|
if (t)
|
|
@@ -12773,7 +12773,7 @@ function Qf() {
|
|
|
12773
12773
|
Yn("__CHAT_API_URL__")
|
|
12774
12774
|
];
|
|
12775
12775
|
for (const t of e) {
|
|
12776
|
-
const n =
|
|
12776
|
+
const n = $0(t);
|
|
12777
12777
|
if (n) return n;
|
|
12778
12778
|
}
|
|
12779
12779
|
}
|
|
@@ -12787,12 +12787,12 @@ function eh() {
|
|
|
12787
12787
|
if (typeof t == "string" && t.trim())
|
|
12788
12788
|
return t.trim();
|
|
12789
12789
|
}
|
|
12790
|
-
function
|
|
12790
|
+
function H0() {
|
|
12791
12791
|
const e = {}, t = Qf(), n = eh();
|
|
12792
12792
|
return t && (e.baseUrl = t), n && (e.apiKey = n), e;
|
|
12793
12793
|
}
|
|
12794
12794
|
function z0() {
|
|
12795
|
-
const e =
|
|
12795
|
+
const e = H0(), t = En.getAuthToken(), n = Qf();
|
|
12796
12796
|
return {
|
|
12797
12797
|
apiBaseUrl: e.baseUrl || En.baseUrl || n || "http://localhost:8000",
|
|
12798
12798
|
apiKey: t || e.apiKey || eh() || "",
|
|
@@ -12883,7 +12883,7 @@ const Aa = f.forwardRef(
|
|
|
12883
12883
|
)
|
|
12884
12884
|
);
|
|
12885
12885
|
Aa.displayName = rh.displayName;
|
|
12886
|
-
const oh = sd,
|
|
12886
|
+
const oh = sd, q0 = fw, X0 = id, sh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
12887
12887
|
ns,
|
|
12888
12888
|
{
|
|
12889
12889
|
className: D(
|
|
@@ -12910,7 +12910,7 @@ const J0 = Pr(
|
|
|
12910
12910
|
side: "right"
|
|
12911
12911
|
}
|
|
12912
12912
|
}
|
|
12913
|
-
), ka = f.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
|
|
12913
|
+
), ka = f.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(X0, { children: [
|
|
12914
12914
|
/* @__PURE__ */ l.jsx(sh, {}),
|
|
12915
12915
|
/* @__PURE__ */ l.jsxs(
|
|
12916
12916
|
rs,
|
|
@@ -13165,7 +13165,7 @@ var rC = "TooltipPortal", [lR, oC] = ms(rC, {
|
|
|
13165
13165
|
return window.addEventListener("scroll", h, { capture: !0 }), () => window.removeEventListener("scroll", h, { capture: !0 });
|
|
13166
13166
|
}
|
|
13167
13167
|
}, [c.trigger, d]), /* @__PURE__ */ l.jsx(
|
|
13168
|
-
|
|
13168
|
+
$r,
|
|
13169
13169
|
{
|
|
13170
13170
|
asChild: !0,
|
|
13171
13171
|
disableOutsidePointerEvents: !1,
|
|
@@ -13473,7 +13473,7 @@ const Ch = f.forwardRef(({ className: e, onClick: t, ...n }, r) => {
|
|
|
13473
13473
|
},
|
|
13474
13474
|
...n,
|
|
13475
13475
|
children: [
|
|
13476
|
-
/* @__PURE__ */ l.jsx(
|
|
13476
|
+
/* @__PURE__ */ l.jsx(Xp, {}),
|
|
13477
13477
|
/* @__PURE__ */ l.jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
13478
13478
|
]
|
|
13479
13479
|
}
|
|
@@ -13853,7 +13853,7 @@ function cR({
|
|
|
13853
13853
|
] })
|
|
13854
13854
|
] }) });
|
|
13855
13855
|
}
|
|
13856
|
-
var
|
|
13856
|
+
var $C = "Label", _h = f.forwardRef((e, t) => /* @__PURE__ */ l.jsx(
|
|
13857
13857
|
me.label,
|
|
13858
13858
|
{
|
|
13859
13859
|
...e,
|
|
@@ -13864,15 +13864,15 @@ var HC = "Label", _h = f.forwardRef((e, t) => /* @__PURE__ */ l.jsx(
|
|
|
13864
13864
|
}
|
|
13865
13865
|
}
|
|
13866
13866
|
));
|
|
13867
|
-
_h.displayName =
|
|
13867
|
+
_h.displayName = $C;
|
|
13868
13868
|
var Oh = _h;
|
|
13869
|
-
const
|
|
13869
|
+
const HC = Pr(
|
|
13870
13870
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
13871
13871
|
), Et = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
13872
13872
|
Oh,
|
|
13873
13873
|
{
|
|
13874
13874
|
ref: n,
|
|
13875
|
-
className: D(
|
|
13875
|
+
className: D(HC(), e),
|
|
13876
13876
|
...t
|
|
13877
13877
|
}
|
|
13878
13878
|
));
|
|
@@ -13908,7 +13908,7 @@ var bs = "Switch", [zC, uR] = Ut(bs), [UC, WC] = zC(bs), Dh = f.forwardRef(
|
|
|
13908
13908
|
role: "switch",
|
|
13909
13909
|
"aria-checked": b,
|
|
13910
13910
|
"aria-required": i,
|
|
13911
|
-
"data-state":
|
|
13911
|
+
"data-state": $h(b),
|
|
13912
13912
|
"data-disabled": a ? "" : void 0,
|
|
13913
13913
|
disabled: a,
|
|
13914
13914
|
value: c,
|
|
@@ -13943,7 +13943,7 @@ var Lh = "SwitchThumb", Fh = f.forwardRef(
|
|
|
13943
13943
|
return /* @__PURE__ */ l.jsx(
|
|
13944
13944
|
me.span,
|
|
13945
13945
|
{
|
|
13946
|
-
"data-state":
|
|
13946
|
+
"data-state": $h(o.checked),
|
|
13947
13947
|
"data-disabled": o.disabled ? "" : void 0,
|
|
13948
13948
|
...r,
|
|
13949
13949
|
ref: t
|
|
@@ -13994,12 +13994,12 @@ var VC = "SwitchBubbleInput", Bh = f.forwardRef(
|
|
|
13994
13994
|
}
|
|
13995
13995
|
);
|
|
13996
13996
|
Bh.displayName = VC;
|
|
13997
|
-
function
|
|
13997
|
+
function $h(e) {
|
|
13998
13998
|
return e ? "checked" : "unchecked";
|
|
13999
13999
|
}
|
|
14000
|
-
var
|
|
14000
|
+
var Hh = Dh, GC = Fh;
|
|
14001
14001
|
const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
14002
|
-
|
|
14002
|
+
Hh,
|
|
14003
14003
|
{
|
|
14004
14004
|
className: D(
|
|
14005
14005
|
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
@@ -14017,11 +14017,11 @@ const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
14017
14017
|
)
|
|
14018
14018
|
}
|
|
14019
14019
|
));
|
|
14020
|
-
an.displayName =
|
|
14021
|
-
var KC = [" ", "Enter", "ArrowUp", "ArrowDown"], YC = [" ", "Enter"], An = "Select", [ws, ys,
|
|
14022
|
-
|
|
14020
|
+
an.displayName = Hh.displayName;
|
|
14021
|
+
var KC = [" ", "Enter", "ArrowUp", "ArrowDown"], YC = [" ", "Enter"], An = "Select", [ws, ys, qC] = ia(An), [lr, dR] = Ut(An, [
|
|
14022
|
+
qC,
|
|
14023
14023
|
ar
|
|
14024
|
-
]), Ss = ar(), [
|
|
14024
|
+
]), Ss = ar(), [XC, gn] = lr(An), [JC, ZC] = lr(An), zh = (e) => {
|
|
14025
14025
|
const {
|
|
14026
14026
|
__scopeSelect: t,
|
|
14027
14027
|
children: n,
|
|
@@ -14047,9 +14047,9 @@ var KC = [" ", "Enter", "ArrowUp", "ArrowDown"], YC = [" ", "Enter"], An = "Sele
|
|
|
14047
14047
|
defaultProp: a,
|
|
14048
14048
|
onChange: c,
|
|
14049
14049
|
caller: An
|
|
14050
|
-
}), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, N] = f.useState(/* @__PURE__ */ new Set()),
|
|
14050
|
+
}), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, N] = f.useState(/* @__PURE__ */ new Set()), H = Array.from(G).map((L) => L.props.value).join(";");
|
|
14051
14051
|
return /* @__PURE__ */ l.jsx(ma, { ...v, children: /* @__PURE__ */ l.jsxs(
|
|
14052
|
-
|
|
14052
|
+
XC,
|
|
14053
14053
|
{
|
|
14054
14054
|
required: x,
|
|
14055
14055
|
scope: t,
|
|
@@ -14073,11 +14073,11 @@ var KC = [" ", "Enter", "ArrowUp", "ArrowDown"], YC = [" ", "Enter"], An = "Sele
|
|
|
14073
14073
|
{
|
|
14074
14074
|
scope: e.__scopeSelect,
|
|
14075
14075
|
onNativeOptionAdd: f.useCallback((L) => {
|
|
14076
|
-
N((
|
|
14076
|
+
N((q) => new Set(q).add(L));
|
|
14077
14077
|
}, []),
|
|
14078
14078
|
onNativeOptionRemove: f.useCallback((L) => {
|
|
14079
|
-
N((
|
|
14080
|
-
const O = new Set(
|
|
14079
|
+
N((q) => {
|
|
14080
|
+
const O = new Set(q);
|
|
14081
14081
|
return O.delete(L), O;
|
|
14082
14082
|
});
|
|
14083
14083
|
}, []),
|
|
@@ -14101,7 +14101,7 @@ var KC = [" ", "Enter", "ArrowUp", "ArrowDown"], YC = [" ", "Enter"], An = "Sele
|
|
|
14101
14101
|
Array.from(G)
|
|
14102
14102
|
]
|
|
14103
14103
|
},
|
|
14104
|
-
|
|
14104
|
+
H
|
|
14105
14105
|
) : null
|
|
14106
14106
|
]
|
|
14107
14107
|
}
|
|
@@ -14178,7 +14178,7 @@ var QC = "SelectIcon", Kh = f.forwardRef(
|
|
|
14178
14178
|
Kh.displayName = QC;
|
|
14179
14179
|
var eT = "SelectPortal", Yh = (e) => /* @__PURE__ */ l.jsx(Zo, { asChild: !0, ...e });
|
|
14180
14180
|
Yh.displayName = eT;
|
|
14181
|
-
var kn = "SelectContent",
|
|
14181
|
+
var kn = "SelectContent", qh = f.forwardRef(
|
|
14182
14182
|
(e, t) => {
|
|
14183
14183
|
const n = gn(kn, e.__scopeSelect), [r, o] = f.useState();
|
|
14184
14184
|
if (tt(() => {
|
|
@@ -14186,15 +14186,15 @@ var kn = "SelectContent", Xh = f.forwardRef(
|
|
|
14186
14186
|
}, []), !n.open) {
|
|
14187
14187
|
const s = r;
|
|
14188
14188
|
return s ? Bo.createPortal(
|
|
14189
|
-
/* @__PURE__ */ l.jsx(
|
|
14189
|
+
/* @__PURE__ */ l.jsx(Xh, { scope: e.__scopeSelect, children: /* @__PURE__ */ l.jsx(ws.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ l.jsx("div", { children: e.children }) }) }),
|
|
14190
14190
|
s
|
|
14191
14191
|
) : null;
|
|
14192
14192
|
}
|
|
14193
14193
|
return /* @__PURE__ */ l.jsx(Jh, { ...e, ref: t });
|
|
14194
14194
|
}
|
|
14195
14195
|
);
|
|
14196
|
-
|
|
14197
|
-
var Dt = 10, [
|
|
14196
|
+
qh.displayName = kn;
|
|
14197
|
+
var Dt = 10, [Xh, vn] = lr(kn), tT = "SelectContentImpl", nT = qn("SelectContent.RemoveScroll"), Jh = f.forwardRef(
|
|
14198
14198
|
(e, t) => {
|
|
14199
14199
|
const {
|
|
14200
14200
|
__scopeSelect: n,
|
|
@@ -14218,7 +14218,7 @@ var Dt = 10, [qh, vn] = lr(kn), tT = "SelectContentImpl", nT = Xn("SelectContent
|
|
|
14218
14218
|
...b
|
|
14219
14219
|
} = e, w = gn(kn, n), [y, E] = f.useState(null), [S, C] = f.useState(null), R = Te(t, (Y) => E(Y)), [I, A] = f.useState(null), [k, M] = f.useState(
|
|
14220
14220
|
null
|
|
14221
|
-
), W = ys(n), [G, N] = f.useState(!1),
|
|
14221
|
+
), W = ys(n), [G, N] = f.useState(!1), H = f.useRef(!1);
|
|
14222
14222
|
f.useEffect(() => {
|
|
14223
14223
|
if (y) return na(y);
|
|
14224
14224
|
}, [y]), ta();
|
|
@@ -14229,13 +14229,13 @@ var Dt = 10, [qh, vn] = lr(kn), tT = "SelectContentImpl", nT = Xn("SelectContent
|
|
|
14229
14229
|
if (ie === le || (ie == null || ie.scrollIntoView({ block: "nearest" }), ie === P && S && (S.scrollTop = 0), ie === ne && S && (S.scrollTop = S.scrollHeight), ie == null || ie.focus(), document.activeElement !== le)) return;
|
|
14230
14230
|
},
|
|
14231
14231
|
[W, S]
|
|
14232
|
-
),
|
|
14232
|
+
), q = f.useCallback(
|
|
14233
14233
|
() => L([I, y]),
|
|
14234
14234
|
[L, I, y]
|
|
14235
14235
|
);
|
|
14236
14236
|
f.useEffect(() => {
|
|
14237
|
-
G &&
|
|
14238
|
-
}, [G,
|
|
14237
|
+
G && q();
|
|
14238
|
+
}, [G, q]);
|
|
14239
14239
|
const { onOpenChange: O, triggerPointerDownPosRef: _ } = w;
|
|
14240
14240
|
f.useEffect(() => {
|
|
14241
14241
|
if (y) {
|
|
@@ -14259,18 +14259,18 @@ var Dt = 10, [qh, vn] = lr(kn), tT = "SelectContentImpl", nT = Xn("SelectContent
|
|
|
14259
14259
|
window.removeEventListener("blur", Y), window.removeEventListener("resize", Y);
|
|
14260
14260
|
};
|
|
14261
14261
|
}, [O]);
|
|
14262
|
-
const [z,
|
|
14262
|
+
const [z, X] = pp((Y) => {
|
|
14263
14263
|
const P = W().filter((le) => !le.disabled), Z = P.find((le) => le.ref.current === document.activeElement), ne = mp(P, Y, Z);
|
|
14264
14264
|
ne && setTimeout(() => ne.ref.current.focus());
|
|
14265
14265
|
}), oe = f.useCallback(
|
|
14266
14266
|
(Y, P, Z) => {
|
|
14267
|
-
const ne =
|
|
14268
|
-
(w.value !== void 0 && w.value === P || ne) && (A(Y), ne && (
|
|
14267
|
+
const ne = !H.current && !Z;
|
|
14268
|
+
(w.value !== void 0 && w.value === P || ne) && (A(Y), ne && (H.current = !0));
|
|
14269
14269
|
},
|
|
14270
14270
|
[w.value]
|
|
14271
14271
|
), F = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Q = f.useCallback(
|
|
14272
14272
|
(Y, P, Z) => {
|
|
14273
|
-
const ne =
|
|
14273
|
+
const ne = !H.current && !Z;
|
|
14274
14274
|
(w.value !== void 0 && w.value === P || ne) && M(Y);
|
|
14275
14275
|
},
|
|
14276
14276
|
[w.value]
|
|
@@ -14287,7 +14287,7 @@ var Dt = 10, [qh, vn] = lr(kn), tT = "SelectContentImpl", nT = Xn("SelectContent
|
|
|
14287
14287
|
avoidCollisions: m
|
|
14288
14288
|
} : {};
|
|
14289
14289
|
return /* @__PURE__ */ l.jsx(
|
|
14290
|
-
|
|
14290
|
+
Xh,
|
|
14291
14291
|
{
|
|
14292
14292
|
scope: n,
|
|
14293
14293
|
content: y,
|
|
@@ -14297,7 +14297,7 @@ var Dt = 10, [qh, vn] = lr(kn), tT = "SelectContentImpl", nT = Xn("SelectContent
|
|
|
14297
14297
|
selectedItem: I,
|
|
14298
14298
|
onItemLeave: F,
|
|
14299
14299
|
itemTextRefCallback: Q,
|
|
14300
|
-
focusSelectedItem:
|
|
14300
|
+
focusSelectedItem: q,
|
|
14301
14301
|
selectedItemText: k,
|
|
14302
14302
|
position: r,
|
|
14303
14303
|
isPositioned: G,
|
|
@@ -14315,7 +14315,7 @@ var Dt = 10, [qh, vn] = lr(kn), tT = "SelectContentImpl", nT = Xn("SelectContent
|
|
|
14315
14315
|
(P = w.trigger) == null || P.focus({ preventScroll: !0 }), Y.preventDefault();
|
|
14316
14316
|
}),
|
|
14317
14317
|
children: /* @__PURE__ */ l.jsx(
|
|
14318
|
-
|
|
14318
|
+
$r,
|
|
14319
14319
|
{
|
|
14320
14320
|
asChild: !0,
|
|
14321
14321
|
disableOutsidePointerEvents: !0,
|
|
@@ -14345,7 +14345,7 @@ var Dt = 10, [qh, vn] = lr(kn), tT = "SelectContentImpl", nT = Xn("SelectContent
|
|
|
14345
14345
|
},
|
|
14346
14346
|
onKeyDown: ee(b.onKeyDown, (Y) => {
|
|
14347
14347
|
const P = Y.ctrlKey || Y.altKey || Y.metaKey;
|
|
14348
|
-
if (Y.key === "Tab" && Y.preventDefault(), !P && Y.key.length === 1 &&
|
|
14348
|
+
if (Y.key === "Tab" && Y.preventDefault(), !P && Y.key.length === 1 && X(Y.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(Y.key)) {
|
|
14349
14349
|
let ne = W().filter((le) => !le.disabled).map((le) => le.ref.current);
|
|
14350
14350
|
if (["ArrowUp", "End"].includes(Y.key) && (ne = ne.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(Y.key)) {
|
|
14351
14351
|
const le = Y.target, ie = ne.indexOf(le);
|
|
@@ -14387,14 +14387,14 @@ var rT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
|
|
|
14387
14387
|
]);
|
|
14388
14388
|
a.style.minWidth = Fe + "px", a.style.right = Ae + "px";
|
|
14389
14389
|
}
|
|
14390
|
-
const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u),
|
|
14390
|
+
const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), H = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), q = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = H + L + G + O + q, z = Math.min(m.offsetHeight * 5, _), X = window.getComputedStyle(v), oe = parseInt(X.paddingTop, 10), F = parseInt(X.paddingBottom, 10), Q = R.top + R.height / 2 - Dt, de = W - Q, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = H + L + Y, Z = _ - P;
|
|
14391
14391
|
if (P <= Q) {
|
|
14392
14392
|
const le = M.length > 0 && m === M[M.length - 1].ref.current;
|
|
14393
14393
|
a.style.bottom = "0px";
|
|
14394
14394
|
const ie = u.clientHeight - v.offsetTop - v.offsetHeight, Pe = Math.max(
|
|
14395
14395
|
de,
|
|
14396
14396
|
be + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
14397
|
-
(le ? F : 0) + ie +
|
|
14397
|
+
(le ? F : 0) + ie + q
|
|
14398
14398
|
), Fe = P + Pe;
|
|
14399
14399
|
a.style.height = Fe + "px";
|
|
14400
14400
|
} else {
|
|
@@ -14402,7 +14402,7 @@ var rT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
|
|
|
14402
14402
|
a.style.top = "0px";
|
|
14403
14403
|
const Pe = Math.max(
|
|
14404
14404
|
Q,
|
|
14405
|
-
|
|
14405
|
+
H + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
14406
14406
|
(le ? oe : 0) + be
|
|
14407
14407
|
) + Z;
|
|
14408
14408
|
a.style.height = Pe + "px", v.scrollTop = P - Q + v.offsetTop;
|
|
@@ -14822,7 +14822,7 @@ function mp(e, t, n) {
|
|
|
14822
14822
|
function hT(e, t) {
|
|
14823
14823
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
14824
14824
|
}
|
|
14825
|
-
var pT = zh, gp = Wh, mT = Gh, gT = Kh, vT = Yh, vp =
|
|
14825
|
+
var pT = zh, gp = Wh, mT = Gh, gT = Kh, vT = Yh, vp = qh, xT = Qh, xp = np, bp = op, bT = sp, wT = ap, wp = lp, yp = cp, Sp = dp;
|
|
14826
14826
|
const fc = pT, hc = mT, ki = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
|
|
14827
14827
|
gp,
|
|
14828
14828
|
{
|
|
@@ -15035,7 +15035,7 @@ function fR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15035
15035
|
}
|
|
15036
15036
|
};
|
|
15037
15037
|
return /* @__PURE__ */ l.jsxs(oh, { open: r, onOpenChange: o, children: [
|
|
15038
|
-
/* @__PURE__ */ l.jsx(
|
|
15038
|
+
/* @__PURE__ */ l.jsx(q0, { asChild: !0, children: /* @__PURE__ */ l.jsxs(ke, { variant: "outline", size: "sm", className: n, children: [
|
|
15039
15039
|
/* @__PURE__ */ l.jsx(Jp, { className: "h-4 w-4 mr-2" }),
|
|
15040
15040
|
"Settings",
|
|
15041
15041
|
u && /* @__PURE__ */ l.jsx(Tu, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
|
|
@@ -15270,7 +15270,7 @@ function fR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15270
15270
|
] }),
|
|
15271
15271
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between pt-6 border-t", children: [
|
|
15272
15272
|
/* @__PURE__ */ l.jsxs(ke, { variant: "outline", onClick: x, children: [
|
|
15273
|
-
/* @__PURE__ */ l.jsx(
|
|
15273
|
+
/* @__PURE__ */ l.jsx(qs, { className: "h-4 w-4 mr-2" }),
|
|
15274
15274
|
"Reset"
|
|
15275
15275
|
] }),
|
|
15276
15276
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
|
|
@@ -15359,26 +15359,26 @@ function hR({
|
|
|
15359
15359
|
) });
|
|
15360
15360
|
}
|
|
15361
15361
|
export {
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
|
|
15362
|
+
Hg as Api,
|
|
15363
|
+
Hg as ApiClient,
|
|
15364
|
+
Hg as ChatApi,
|
|
15365
15365
|
vo as ChatInterface,
|
|
15366
15366
|
cR as ChatMainLayout,
|
|
15367
15367
|
so as ChatProvider,
|
|
15368
15368
|
rR as ChatRoutingProvider,
|
|
15369
15369
|
fR as ChatSettings,
|
|
15370
|
-
|
|
15370
|
+
qr as MarkdownContent,
|
|
15371
15371
|
xw as MessageComponent,
|
|
15372
15372
|
Ci as ThreadManager,
|
|
15373
15373
|
En as apiClient,
|
|
15374
15374
|
iR as applySettings,
|
|
15375
15375
|
En as chatApiClient,
|
|
15376
15376
|
hR as default,
|
|
15377
|
-
|
|
15377
|
+
$g as del,
|
|
15378
15378
|
Mt as get,
|
|
15379
15379
|
Lg as getChatToken,
|
|
15380
15380
|
sR as getCurrentSettings,
|
|
15381
|
-
|
|
15381
|
+
H0 as getDefaultApiConfig,
|
|
15382
15382
|
z0 as getDefaultChatSettings,
|
|
15383
15383
|
Fg as onChatTokenChanged,
|
|
15384
15384
|
dl as post,
|