teodor-new-chat-ui 4.3.454 → 4.3.456
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
CHANGED
|
@@ -2,7 +2,7 @@ var Ng = Object.defineProperty;
|
|
|
2
2
|
var Ag = (e, t, n) => t in e ? Ng(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var zl = (e, t, n) => Ag(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as h from "react";
|
|
5
|
-
import M, { useMemo as
|
|
5
|
+
import M, { useMemo as Je, createContext as Pr, useContext as Mr, useState as he, useRef as Fe, useCallback as ge, useEffect as Ze, useReducer as jg, useLayoutEffect as _g, createElement as Yo, memo as Pg, useImperativeHandle as Mg, forwardRef as Og, isValidElement as ga } from "react";
|
|
6
6
|
import { Slot as Dg, createSlot as Rr, createSlottable as Lg } from "@radix-ui/react-slot";
|
|
7
7
|
import { cva as mo } from "class-variance-authority";
|
|
8
8
|
import { clsx as $g } from "clsx";
|
|
@@ -23,7 +23,7 @@ function nx(e) {
|
|
|
23
23
|
function $u(e) {
|
|
24
24
|
return nx(e.content) || "";
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function HI(e) {
|
|
27
27
|
var n;
|
|
28
28
|
const t = /* @__PURE__ */ new Map();
|
|
29
29
|
for (const r of e) {
|
|
@@ -128,11 +128,11 @@ function ox(e, t, n) {
|
|
|
128
128
|
attempts: r
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function UI(e, t) {
|
|
132
132
|
return e ? t.getCheckpoint(e) ?? null : null;
|
|
133
133
|
}
|
|
134
134
|
function sx(e) {
|
|
135
|
-
return
|
|
135
|
+
return Je(() => rx(e), [e]);
|
|
136
136
|
}
|
|
137
137
|
function er(e) {
|
|
138
138
|
if (!(!e || typeof e != "object" || Array.isArray(e)))
|
|
@@ -526,18 +526,18 @@ function mx() {
|
|
|
526
526
|
if (Ut && ke && typeof Ut.stack == "string") {
|
|
527
527
|
for (var ue = Ut.stack.split(`
|
|
528
528
|
`), Ce = ke.stack.split(`
|
|
529
|
-
`),
|
|
529
|
+
`), Le = ue.length - 1, it = Ce.length - 1; Le >= 1 && it >= 0 && ue[Le] !== Ce[it]; )
|
|
530
530
|
it--;
|
|
531
|
-
for (;
|
|
532
|
-
if (ue[
|
|
533
|
-
if (
|
|
531
|
+
for (; Le >= 1 && it >= 0; Le--, it--)
|
|
532
|
+
if (ue[Le] !== Ce[it]) {
|
|
533
|
+
if (Le !== 1 || it !== 1)
|
|
534
534
|
do
|
|
535
|
-
if (
|
|
535
|
+
if (Le--, it--, it < 0 || ue[Le] !== Ce[it]) {
|
|
536
536
|
var ht = `
|
|
537
|
-
` + ue[
|
|
537
|
+
` + ue[Le].replace(" at new ", " at ");
|
|
538
538
|
return I.displayName && ht.includes("<anonymous>") && (ht = ht.replace("<anonymous>", I.displayName)), typeof I == "function" && Z.set(I, ht), ht;
|
|
539
539
|
}
|
|
540
|
-
while (
|
|
540
|
+
while (Le >= 1 && it >= 0);
|
|
541
541
|
break;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
@@ -603,8 +603,8 @@ function mx() {
|
|
|
603
603
|
throw Ce.name = "Invariant Violation", Ce;
|
|
604
604
|
}
|
|
605
605
|
ue = I[ie](Q, ie, ke, de, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
606
|
-
} catch (
|
|
607
|
-
ue =
|
|
606
|
+
} catch (Le) {
|
|
607
|
+
ue = Le;
|
|
608
608
|
}
|
|
609
609
|
ue && !(ue instanceof Error) && (Ee(Ge), 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).", ke || "React class", de, ie, typeof ue), Ee(null)), ue instanceof Error && !(ue.message in _e) && (_e[ue.message] = !0, Ee(Ge), w("Failed %s type: %s", de, ue.message), Ee(null));
|
|
610
610
|
}
|
|
@@ -630,7 +630,7 @@ function mx() {
|
|
|
630
630
|
function Ke(I) {
|
|
631
631
|
return "" + I;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function De(I) {
|
|
634
634
|
if (Ue(I))
|
|
635
635
|
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ve(I)), Ke(I);
|
|
636
636
|
}
|
|
@@ -713,13 +713,13 @@ function mx() {
|
|
|
713
713
|
function tn(I, Q, de, ke, Ge) {
|
|
714
714
|
{
|
|
715
715
|
var et, ie = {}, ue = null, Ce = null;
|
|
716
|
-
de !== void 0 && (
|
|
716
|
+
de !== void 0 && (De(de), ue = "" + de), kt(Q) && (De(Q.key), ue = "" + Q.key), Pt(Q) && (Ce = Q.ref, vt(Q, Ge));
|
|
717
717
|
for (et in Q)
|
|
718
718
|
Se.call(Q, et) && !mt.hasOwnProperty(et) && (ie[et] = Q[et]);
|
|
719
719
|
if (I && I.defaultProps) {
|
|
720
|
-
var
|
|
721
|
-
for (et in
|
|
722
|
-
ie[et] === void 0 && (ie[et] =
|
|
720
|
+
var Le = I.defaultProps;
|
|
721
|
+
for (et in Le)
|
|
722
|
+
ie[et] === void 0 && (ie[et] = Le[et]);
|
|
723
723
|
}
|
|
724
724
|
if (ue || Ce) {
|
|
725
725
|
var it = typeof I == "function" ? I.displayName || I.name || "Unknown" : I;
|
|
@@ -757,7 +757,7 @@ Check the render method of \`` + I + "`.";
|
|
|
757
757
|
return "";
|
|
758
758
|
}
|
|
759
759
|
var xe = {};
|
|
760
|
-
function
|
|
760
|
+
function $e(I) {
|
|
761
761
|
{
|
|
762
762
|
var Q = we();
|
|
763
763
|
if (!Q) {
|
|
@@ -774,7 +774,7 @@ Check the top-level render call using <` + de + ">.");
|
|
|
774
774
|
if (!I._store || I._store.validated || I.key != null)
|
|
775
775
|
return;
|
|
776
776
|
I._store.validated = !0;
|
|
777
|
-
var de =
|
|
777
|
+
var de = $e(Q);
|
|
778
778
|
if (xe[de])
|
|
779
779
|
return;
|
|
780
780
|
xe[de] = !0;
|
|
@@ -847,8 +847,8 @@ Check the top-level render call using <` + de + ">.");
|
|
|
847
847
|
(I === void 0 || typeof I == "object" && I !== null && Object.keys(I).length === 0) && (ue += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
848
848
|
var Ce = tt();
|
|
849
849
|
Ce ? ue += Ce : ue += we();
|
|
850
|
-
var
|
|
851
|
-
I === null ?
|
|
850
|
+
var Le;
|
|
851
|
+
I === null ? Le = "null" : Et(I) ? Le = "array" : I !== void 0 && I.$$typeof === t ? (Le = "<" + (H(I.type) || "Unknown") + " />", ue = " Did you accidentally export a JSX literal instead of a component?") : Le = typeof I, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Le, ue);
|
|
852
852
|
}
|
|
853
853
|
var it = tn(I, Q, de, Ge, et);
|
|
854
854
|
if (it == null)
|
|
@@ -886,16 +886,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
886
886
|
function pt(I, Q, de) {
|
|
887
887
|
return Ae(I, Q, de, !0);
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function Xe(I, Q, de) {
|
|
890
890
|
return Ae(I, Q, de, !1);
|
|
891
891
|
}
|
|
892
|
-
var dt =
|
|
892
|
+
var dt = Xe, nn = pt;
|
|
893
893
|
Vr.Fragment = r, Vr.jsx = dt, Vr.jsxs = nn;
|
|
894
894
|
}()), Vr;
|
|
895
895
|
}
|
|
896
896
|
process.env.NODE_ENV === "production" ? Wa.exports = hx() : Wa.exports = mx();
|
|
897
897
|
var u = Wa.exports;
|
|
898
|
-
const
|
|
898
|
+
const WI = ({
|
|
899
899
|
timelineEntries: e,
|
|
900
900
|
activeCheckpointId: t,
|
|
901
901
|
onSelectCheckpoint: n,
|
|
@@ -904,7 +904,7 @@ const HI = ({
|
|
|
904
904
|
onHoverStart: s,
|
|
905
905
|
onHoverEnd: a
|
|
906
906
|
}) => {
|
|
907
|
-
const i = e ?? [], l = i.length > 0, c =
|
|
907
|
+
const i = e ?? [], l = i.length > 0, c = Je(() => l ? [...i].reverse() : [], [i, l]), d = t ?? (i.length ? i[i.length - 1].id : null);
|
|
908
908
|
if (!l)
|
|
909
909
|
return null;
|
|
910
910
|
const m = ["w-32 flex-shrink-0 flex-col border-r border-border/40 pr-2 flex bg-white text-gray-900 dark:bg-slate-900 dark:text-slate-100", o].filter(Boolean).join(" ");
|
|
@@ -1207,10 +1207,10 @@ const Xx = (e) => {
|
|
|
1207
1207
|
asap: Qx,
|
|
1208
1208
|
isIterable: ev
|
|
1209
1209
|
};
|
|
1210
|
-
function
|
|
1210
|
+
function Me(e, t, n, r, o) {
|
|
1211
1211
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
1212
1212
|
}
|
|
1213
|
-
z.inherits(
|
|
1213
|
+
z.inherits(Me, Error, {
|
|
1214
1214
|
toJSON: function() {
|
|
1215
1215
|
return {
|
|
1216
1216
|
// Standard
|
|
@@ -1231,7 +1231,7 @@ z.inherits(Oe, Error, {
|
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
1233
|
});
|
|
1234
|
-
const qu =
|
|
1234
|
+
const qu = Me.prototype, Gu = {};
|
|
1235
1235
|
[
|
|
1236
1236
|
"ERR_BAD_OPTION_VALUE",
|
|
1237
1237
|
"ERR_BAD_OPTION",
|
|
@@ -1249,15 +1249,15 @@ const qu = Oe.prototype, Gu = {};
|
|
|
1249
1249
|
].forEach((e) => {
|
|
1250
1250
|
Gu[e] = { value: e };
|
|
1251
1251
|
});
|
|
1252
|
-
Object.defineProperties(
|
|
1252
|
+
Object.defineProperties(Me, Gu);
|
|
1253
1253
|
Object.defineProperty(qu, "isAxiosError", { value: !0 });
|
|
1254
|
-
|
|
1254
|
+
Me.from = (e, t, n, r, o, s) => {
|
|
1255
1255
|
const a = Object.create(qu);
|
|
1256
1256
|
z.toFlatObject(e, a, function(d) {
|
|
1257
1257
|
return d !== Error.prototype;
|
|
1258
1258
|
}, (c) => c !== "isAxiosError");
|
|
1259
1259
|
const i = e && e.message ? e.message : "Error", l = t == null && e ? e.code : t;
|
|
1260
|
-
return
|
|
1260
|
+
return Me.call(a, i, l, n, r, o), e && a.cause == null && Object.defineProperty(a, "cause", { value: e, configurable: !0 }), a.name = e && e.name || "Error", s && Object.assign(a, s), a;
|
|
1261
1261
|
};
|
|
1262
1262
|
const tv = null;
|
|
1263
1263
|
function Ka(e) {
|
|
@@ -1297,7 +1297,7 @@ function Ps(e, t, n) {
|
|
|
1297
1297
|
if (z.isBoolean(v))
|
|
1298
1298
|
return v.toString();
|
|
1299
1299
|
if (!l && z.isBlob(v))
|
|
1300
|
-
throw new
|
|
1300
|
+
throw new Me("Blob is not supported. Use a Buffer instead.");
|
|
1301
1301
|
return z.isArrayBuffer(v) || z.isTypedArray(v) ? l && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v;
|
|
1302
1302
|
}
|
|
1303
1303
|
function d(v, g, x) {
|
|
@@ -1548,7 +1548,7 @@ const yo = {
|
|
|
1548
1548
|
return JSON.parse(t, this.parseReviver);
|
|
1549
1549
|
} catch (i) {
|
|
1550
1550
|
if (a)
|
|
1551
|
-
throw i.name === "SyntaxError" ?
|
|
1551
|
+
throw i.name === "SyntaxError" ? Me.from(i, Me.ERR_BAD_RESPONSE, this, null, this.response) : i;
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
1554
|
return t;
|
|
@@ -1791,16 +1791,16 @@ function ed(e) {
|
|
|
1791
1791
|
return !!(e && e.__CANCEL__);
|
|
1792
1792
|
}
|
|
1793
1793
|
function Dr(e, t, n) {
|
|
1794
|
-
|
|
1794
|
+
Me.call(this, e ?? "canceled", Me.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1795
1795
|
}
|
|
1796
|
-
z.inherits(Dr,
|
|
1796
|
+
z.inherits(Dr, Me, {
|
|
1797
1797
|
__CANCEL__: !0
|
|
1798
1798
|
});
|
|
1799
1799
|
function td(e, t, n) {
|
|
1800
1800
|
const r = n.config.validateStatus;
|
|
1801
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
1801
|
+
!n.status || !r || r(n.status) ? e(n) : t(new Me(
|
|
1802
1802
|
"Request failed with status code " + n.status,
|
|
1803
|
-
[
|
|
1803
|
+
[Me.ERR_BAD_REQUEST, Me.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1804
1804
|
n.config,
|
|
1805
1805
|
n.request,
|
|
1806
1806
|
n
|
|
@@ -2023,16 +2023,16 @@ const rd = (e) => {
|
|
|
2023
2023
|
"onloadend" in x ? x.onloadend = b : x.onreadystatechange = function() {
|
|
2024
2024
|
!x || x.readyState !== 4 || x.status === 0 && !(x.responseURL && x.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
2025
2025
|
}, x.onabort = function() {
|
|
2026
|
-
x && (r(new
|
|
2026
|
+
x && (r(new Me("Request aborted", Me.ECONNABORTED, e, x)), x = null);
|
|
2027
2027
|
}, x.onerror = function(C) {
|
|
2028
|
-
const S = C && C.message ? C.message : "Network Error", T = new
|
|
2028
|
+
const S = C && C.message ? C.message : "Network Error", T = new Me(S, Me.ERR_NETWORK, e, x);
|
|
2029
2029
|
T.event = C || null, r(T), x = null;
|
|
2030
2030
|
}, x.ontimeout = function() {
|
|
2031
2031
|
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
2032
2032
|
const S = o.transitional || Zu;
|
|
2033
|
-
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), r(new
|
|
2033
|
+
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), r(new Me(
|
|
2034
2034
|
C,
|
|
2035
|
-
S.clarifyTimeoutError ?
|
|
2035
|
+
S.clarifyTimeoutError ? Me.ETIMEDOUT : Me.ECONNABORTED,
|
|
2036
2036
|
e,
|
|
2037
2037
|
x
|
|
2038
2038
|
)), x = null;
|
|
@@ -2043,7 +2043,7 @@ const rd = (e) => {
|
|
|
2043
2043
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
2044
2044
|
const w = Tv(o.url);
|
|
2045
2045
|
if (w && Lt.protocols.indexOf(w) === -1) {
|
|
2046
|
-
r(new
|
|
2046
|
+
r(new Me("Unsupported protocol " + w + ":", Me.ERR_BAD_REQUEST, e));
|
|
2047
2047
|
return;
|
|
2048
2048
|
}
|
|
2049
2049
|
x.send(s || null);
|
|
@@ -2056,11 +2056,11 @@ const rd = (e) => {
|
|
|
2056
2056
|
if (!o) {
|
|
2057
2057
|
o = !0, i();
|
|
2058
2058
|
const d = c instanceof Error ? c : this.reason;
|
|
2059
|
-
r.abort(d instanceof
|
|
2059
|
+
r.abort(d instanceof Me ? d : new Dr(d instanceof Error ? d.message : d));
|
|
2060
2060
|
}
|
|
2061
2061
|
};
|
|
2062
2062
|
let a = t && setTimeout(() => {
|
|
2063
|
-
a = null, s(new
|
|
2063
|
+
a = null, s(new Me(`timeout ${t} of ms exceeded`, Me.ETIMEDOUT));
|
|
2064
2064
|
}, t);
|
|
2065
2065
|
const i = () => {
|
|
2066
2066
|
e && (a && clearTimeout(a), a = null, e.forEach((c) => {
|
|
@@ -2165,7 +2165,7 @@ const rd = (e) => {
|
|
|
2165
2165
|
let b = g && g[v];
|
|
2166
2166
|
if (b)
|
|
2167
2167
|
return b.call(g);
|
|
2168
|
-
throw new
|
|
2168
|
+
throw new Me(`Response type '${v}' is not supported`, Me.ERR_NOT_SUPPORT, x);
|
|
2169
2169
|
});
|
|
2170
2170
|
});
|
|
2171
2171
|
const m = async (v) => {
|
|
@@ -2265,11 +2265,11 @@ const rd = (e) => {
|
|
|
2265
2265
|
});
|
|
2266
2266
|
} catch (L) {
|
|
2267
2267
|
throw N && N(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign(
|
|
2268
|
-
new
|
|
2268
|
+
new Me("Network Error", Me.ERR_NETWORK, v, H),
|
|
2269
2269
|
{
|
|
2270
2270
|
cause: L.cause || L
|
|
2271
2271
|
}
|
|
2272
|
-
) :
|
|
2272
|
+
) : Me.from(L, L && L.code, v, H);
|
|
2273
2273
|
}
|
|
2274
2274
|
};
|
|
2275
2275
|
}, $v = /* @__PURE__ */ new Map(), od = (e) => {
|
|
@@ -2311,7 +2311,7 @@ const lc = (e) => `- ${e}`, Fv = (e) => z.isFunction(e) || e === null || e === !
|
|
|
2311
2311
|
r = e[a];
|
|
2312
2312
|
let i;
|
|
2313
2313
|
if (o = r, !Fv(r) && (o = Ga[(i = String(r)).toLowerCase()], o === void 0))
|
|
2314
|
-
throw new
|
|
2314
|
+
throw new Me(`Unknown adapter '${i}'`);
|
|
2315
2315
|
if (o && (z.isFunction(o) || (o = o.get(t))))
|
|
2316
2316
|
break;
|
|
2317
2317
|
s[i || "#" + a] = o;
|
|
@@ -2323,7 +2323,7 @@ const lc = (e) => `- ${e}`, Fv = (e) => z.isFunction(e) || e === null || e === !
|
|
|
2323
2323
|
let i = n ? a.length > 1 ? `since :
|
|
2324
2324
|
` + a.map(lc).join(`
|
|
2325
2325
|
`) : " " + lc(a[0]) : "as no adapter specified";
|
|
2326
|
-
throw new
|
|
2326
|
+
throw new Me(
|
|
2327
2327
|
"There is no suitable adapter to dispatch the request " + i,
|
|
2328
2328
|
"ERR_NOT_SUPPORT"
|
|
2329
2329
|
);
|
|
@@ -2367,9 +2367,9 @@ Ms.transitional = function(t, n, r) {
|
|
|
2367
2367
|
}
|
|
2368
2368
|
return (s, a, i) => {
|
|
2369
2369
|
if (t === !1)
|
|
2370
|
-
throw new
|
|
2370
|
+
throw new Me(
|
|
2371
2371
|
o(a, " has been removed" + (n ? " in " + n : "")),
|
|
2372
|
-
|
|
2372
|
+
Me.ERR_DEPRECATED
|
|
2373
2373
|
);
|
|
2374
2374
|
return n && !uc[a] && (uc[a] = !0, console.warn(
|
|
2375
2375
|
o(
|
|
@@ -2384,7 +2384,7 @@ Ms.spelling = function(t) {
|
|
|
2384
2384
|
};
|
|
2385
2385
|
function Bv(e, t, n) {
|
|
2386
2386
|
if (typeof e != "object")
|
|
2387
|
-
throw new
|
|
2387
|
+
throw new Me("options must be an object", Me.ERR_BAD_OPTION_VALUE);
|
|
2388
2388
|
const r = Object.keys(e);
|
|
2389
2389
|
let o = r.length;
|
|
2390
2390
|
for (; o-- > 0; ) {
|
|
@@ -2392,11 +2392,11 @@ function Bv(e, t, n) {
|
|
|
2392
2392
|
if (a) {
|
|
2393
2393
|
const i = e[s], l = i === void 0 || a(i, s, e);
|
|
2394
2394
|
if (l !== !0)
|
|
2395
|
-
throw new
|
|
2395
|
+
throw new Me("option " + s + " must be " + l, Me.ERR_BAD_OPTION_VALUE);
|
|
2396
2396
|
continue;
|
|
2397
2397
|
}
|
|
2398
2398
|
if (n !== !0)
|
|
2399
|
-
throw new
|
|
2399
|
+
throw new Me("Unknown option " + s, Me.ERR_BAD_OPTION);
|
|
2400
2400
|
}
|
|
2401
2401
|
}
|
|
2402
2402
|
const Zo = {
|
|
@@ -2689,7 +2689,7 @@ yt.CancelToken = zv;
|
|
|
2689
2689
|
yt.isCancel = ed;
|
|
2690
2690
|
yt.VERSION = ad;
|
|
2691
2691
|
yt.toFormData = Ps;
|
|
2692
|
-
yt.AxiosError =
|
|
2692
|
+
yt.AxiosError = Me;
|
|
2693
2693
|
yt.Cancel = yt.CanceledError;
|
|
2694
2694
|
yt.all = function(t) {
|
|
2695
2695
|
return Promise.all(t);
|
|
@@ -2703,22 +2703,22 @@ yt.getAdapter = sd.getAdapter;
|
|
|
2703
2703
|
yt.HttpStatusCode = Ya;
|
|
2704
2704
|
yt.default = yt;
|
|
2705
2705
|
const {
|
|
2706
|
-
Axios:
|
|
2707
|
-
AxiosError:
|
|
2708
|
-
CanceledError:
|
|
2709
|
-
isCancel:
|
|
2710
|
-
CancelToken:
|
|
2711
|
-
VERSION:
|
|
2712
|
-
all:
|
|
2713
|
-
Cancel:
|
|
2714
|
-
isAxiosError:
|
|
2715
|
-
spread:
|
|
2716
|
-
toFormData:
|
|
2717
|
-
AxiosHeaders:
|
|
2718
|
-
HttpStatusCode:
|
|
2719
|
-
formToJSON:
|
|
2720
|
-
getAdapter:
|
|
2721
|
-
mergeConfig:
|
|
2706
|
+
Axios: qI,
|
|
2707
|
+
AxiosError: GI,
|
|
2708
|
+
CanceledError: YI,
|
|
2709
|
+
isCancel: XI,
|
|
2710
|
+
CancelToken: JI,
|
|
2711
|
+
VERSION: ZI,
|
|
2712
|
+
all: QI,
|
|
2713
|
+
Cancel: eN,
|
|
2714
|
+
isAxiosError: tN,
|
|
2715
|
+
spread: nN,
|
|
2716
|
+
toFormData: rN,
|
|
2717
|
+
AxiosHeaders: oN,
|
|
2718
|
+
HttpStatusCode: sN,
|
|
2719
|
+
formToJSON: aN,
|
|
2720
|
+
getAdapter: iN,
|
|
2721
|
+
mergeConfig: lN
|
|
2722
2722
|
} = yt, dc = typeof window < "u" ? window.__API_BASE_URL__ : void 0, fc = dc ? An(dc) : void 0;
|
|
2723
2723
|
function An(e) {
|
|
2724
2724
|
const n = (e != null && e.trim() ? e.trim() : "/api/chat").replace(/\/+$/, "");
|
|
@@ -2869,7 +2869,7 @@ class ji {
|
|
|
2869
2869
|
return Wt(r);
|
|
2870
2870
|
}
|
|
2871
2871
|
}
|
|
2872
|
-
const sr = new ji(),
|
|
2872
|
+
const sr = new ji(), cN = ji, uN = ji;
|
|
2873
2873
|
async function _i(e, t) {
|
|
2874
2874
|
return await rn(e, {
|
|
2875
2875
|
responseType: "blob",
|
|
@@ -2886,7 +2886,7 @@ async function _i(e, t) {
|
|
|
2886
2886
|
maxBodyLength: 1 / 0
|
|
2887
2887
|
});
|
|
2888
2888
|
}
|
|
2889
|
-
async function
|
|
2889
|
+
async function dN(e, t) {
|
|
2890
2890
|
const n = await _i(`/files/${e}/view`, t), r = URL.createObjectURL(n);
|
|
2891
2891
|
window.open(r, "_blank"), setTimeout(() => URL.revokeObjectURL(r), 6e4);
|
|
2892
2892
|
}
|
|
@@ -2904,7 +2904,7 @@ async function Yv(e, t) {
|
|
|
2904
2904
|
const s = document.createElement("a");
|
|
2905
2905
|
s.href = r, s.download = o, document.body.appendChild(s), s.click(), s.remove(), setTimeout(() => URL.revokeObjectURL(r), 6e4);
|
|
2906
2906
|
}
|
|
2907
|
-
async function
|
|
2907
|
+
async function fN(e) {
|
|
2908
2908
|
return await rn(`/files/${e}`);
|
|
2909
2909
|
}
|
|
2910
2910
|
async function Xv(e, t = 50, n = 0) {
|
|
@@ -3059,7 +3059,7 @@ function fd(e) {
|
|
|
3059
3059
|
return t[t.length - 1] || null;
|
|
3060
3060
|
}
|
|
3061
3061
|
function ow(e = {}) {
|
|
3062
|
-
const t =
|
|
3062
|
+
const t = Je(() => An(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = he(e.token ?? null), s = Fe(e.headers ?? {}), a = e.credentials ?? "include", [i, l] = he(!1), [c, d] = he(null), [p, m] = he(""), [f, v] = he(null), [g, x] = he(0), [b, w] = he(!1), [y, C] = he(null), S = Fe(null), T = Fe(!0), E = Fe(0), R = Fe(null), _ = Fe(null), D = Fe(null), F = Fe(null), V = Fe({
|
|
3063
3063
|
messageId: null,
|
|
3064
3064
|
lastSeq: null,
|
|
3065
3065
|
lastText: ""
|
|
@@ -3093,9 +3093,9 @@ function ow(e = {}) {
|
|
|
3093
3093
|
var Ue;
|
|
3094
3094
|
try {
|
|
3095
3095
|
const Ke = JSON.parse(JSON.stringify(Ve));
|
|
3096
|
-
return (Ue = Ke == null ? void 0 : Ke.payload) != null && Ue.files_info && Array.isArray(Ke.payload.files_info) && (Ke.payload.files_info = Ke.payload.files_info.map((
|
|
3097
|
-
...
|
|
3098
|
-
data:
|
|
3096
|
+
return (Ue = Ke == null ? void 0 : Ke.payload) != null && Ue.files_info && Array.isArray(Ke.payload.files_info) && (Ke.payload.files_info = Ke.payload.files_info.map((De) => ({
|
|
3097
|
+
...De,
|
|
3098
|
+
data: De != null && De.data ? `<base64 ${String(De.data).length} chars>` : De == null ? void 0 : De.data
|
|
3099
3099
|
}))), Ke;
|
|
3100
3100
|
} catch {
|
|
3101
3101
|
return Ve;
|
|
@@ -3135,13 +3135,13 @@ function ow(e = {}) {
|
|
|
3135
3135
|
...Ve,
|
|
3136
3136
|
...Ue,
|
|
3137
3137
|
...s.current
|
|
3138
|
-
},
|
|
3138
|
+
}, De = {
|
|
3139
3139
|
"Content-Type": "application/json",
|
|
3140
3140
|
Accept: "text/event-stream",
|
|
3141
3141
|
...Ke
|
|
3142
3142
|
}, He = await fetch(t + n, {
|
|
3143
3143
|
method: "POST",
|
|
3144
|
-
headers:
|
|
3144
|
+
headers: De,
|
|
3145
3145
|
body: JSON.stringify(O),
|
|
3146
3146
|
signal: K.signal,
|
|
3147
3147
|
credentials: a
|
|
@@ -3191,12 +3191,12 @@ function ow(e = {}) {
|
|
|
3191
3191
|
for (; (xe = at.indexOf(`
|
|
3192
3192
|
|
|
3193
3193
|
`)) >= 0; ) {
|
|
3194
|
-
const
|
|
3194
|
+
const $e = at.slice(0, xe);
|
|
3195
3195
|
at = at.slice(xe + 2);
|
|
3196
|
-
const qe =
|
|
3197
|
-
for (const
|
|
3198
|
-
if (!(!
|
|
3199
|
-
const dt =
|
|
3196
|
+
const qe = $e.split(/\r?\n/), Rt = [];
|
|
3197
|
+
for (const Xe of qe)
|
|
3198
|
+
if (!(!Xe || Xe.startsWith(":")) && Xe.startsWith("data:")) {
|
|
3199
|
+
const dt = Xe.slice(5);
|
|
3200
3200
|
Rt.push(dt.startsWith(" ") ? dt.slice(1) : dt);
|
|
3201
3201
|
}
|
|
3202
3202
|
const It = Rt.join(`
|
|
@@ -3225,7 +3225,7 @@ function ow(e = {}) {
|
|
|
3225
3225
|
kt > 0 && pt > kt + 1 && ((X = k == null ? void 0 : k.onGap) == null || X.call(k, { from: kt, to: pt })), kt = pt, E.current = pt, x(pt);
|
|
3226
3226
|
}
|
|
3227
3227
|
if (Ae.type === "message.start" && Ae.role === "assistant") {
|
|
3228
|
-
const
|
|
3228
|
+
const Xe = fd(Ae.model);
|
|
3229
3229
|
V.current = {
|
|
3230
3230
|
messageId: Ae.id,
|
|
3231
3231
|
lastSeq: pt ?? null,
|
|
@@ -3233,7 +3233,7 @@ function ow(e = {}) {
|
|
|
3233
3233
|
}, C({
|
|
3234
3234
|
id: Ae.id,
|
|
3235
3235
|
role: "assistant",
|
|
3236
|
-
name:
|
|
3236
|
+
name: Xe ?? void 0,
|
|
3237
3237
|
model: Ae.model,
|
|
3238
3238
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3239
3239
|
content: []
|
|
@@ -3246,14 +3246,14 @@ function ow(e = {}) {
|
|
|
3246
3246
|
try {
|
|
3247
3247
|
const dt = Yn(Ae).latest;
|
|
3248
3248
|
dt && (_.current = dt.checkpointId ?? null, D.current = dt.checkpointNs ?? null, v(dt.checkpointId ?? null));
|
|
3249
|
-
} catch (
|
|
3250
|
-
console.warn("[use-chat] Failed to hydrate state_history payload",
|
|
3249
|
+
} catch (Xe) {
|
|
3250
|
+
console.warn("[use-chat] Failed to hydrate state_history payload", Xe);
|
|
3251
3251
|
}
|
|
3252
3252
|
}
|
|
3253
3253
|
try {
|
|
3254
3254
|
j == null || j(Ae);
|
|
3255
|
-
} catch (
|
|
3256
|
-
console.error("[use-chat] Error in onEvent callback:",
|
|
3255
|
+
} catch (Xe) {
|
|
3256
|
+
console.error("[use-chat] Error in onEvent callback:", Xe, "for event:", Ae.type);
|
|
3257
3257
|
}
|
|
3258
3258
|
if (Ae.type === "message.delta") {
|
|
3259
3259
|
C((dt) => {
|
|
@@ -3271,23 +3271,23 @@ function ow(e = {}) {
|
|
|
3271
3271
|
lastText: Q.lastText ?? nn.lastText
|
|
3272
3272
|
}, { ...dt, content: I }) : dt;
|
|
3273
3273
|
});
|
|
3274
|
-
const
|
|
3275
|
-
|
|
3274
|
+
const Xe = Ae.delta.filter((dt) => dt.type === "text").map((dt) => dt.text).join("");
|
|
3275
|
+
Xe && e.autoAppendAssistant !== !1 && (Pt.push(Xe), gt());
|
|
3276
3276
|
} else if (Ae.type === "heartbeat") {
|
|
3277
3277
|
console.debug("[use-chat] heartbeat received");
|
|
3278
3278
|
try {
|
|
3279
3279
|
(B = k == null ? void 0 : k.onHeartbeat) == null || B.call(k, Ae);
|
|
3280
|
-
} catch (
|
|
3281
|
-
console.warn("[use-chat] heartbeat callback failed",
|
|
3280
|
+
} catch (Xe) {
|
|
3281
|
+
console.warn("[use-chat] heartbeat callback failed", Xe);
|
|
3282
3282
|
}
|
|
3283
3283
|
} else if (vt !== null && cancelAnimationFrame(vt), St(), Ae.type === "checkpoint")
|
|
3284
3284
|
v(Ae.checkpointId);
|
|
3285
3285
|
else if (Ae.type === "error") {
|
|
3286
|
-
const
|
|
3287
|
-
if (d(
|
|
3288
|
-
console.error("[use-chat] Auth error detected:",
|
|
3286
|
+
const Xe = Ae;
|
|
3287
|
+
if (d(Xe.message), J = "error", A = Xe.message, Xe.error_type === "auth_error" || Xe.code === "TOKEN_EXPIRED" || ((ae = Xe.message) == null ? void 0 : ae.includes("token")) || ((se = Xe.message) == null ? void 0 : se.includes("401")) || ((fe = Xe.message) == null ? void 0 : fe.includes("unauthorized")) || ((Se = Xe.message) == null ? void 0 : Se.includes("Unauthorized"))) {
|
|
3288
|
+
console.error("[use-chat] Auth error detected:", Xe.message);
|
|
3289
3289
|
try {
|
|
3290
|
-
(_e = k == null ? void 0 : k.onAuthError) == null || _e.call(k,
|
|
3290
|
+
(_e = k == null ? void 0 : k.onAuthError) == null || _e.call(k, Xe.message);
|
|
3291
3291
|
} catch (nn) {
|
|
3292
3292
|
console.warn("[use-chat] onAuthError handler failed", nn);
|
|
3293
3293
|
}
|
|
@@ -3321,14 +3321,14 @@ function ow(e = {}) {
|
|
|
3321
3321
|
J = "error", A = Ue, d(Ue), (st = k == null ? void 0 : k.onError) == null || st.call(k, Ue), P || ((xt = k == null ? void 0 : k.onConnectionError) == null || xt.call(k, Ue), P = !0);
|
|
3322
3322
|
}
|
|
3323
3323
|
} finally {
|
|
3324
|
-
const Ve = E.current, Ue = _.current, Ke = D.current,
|
|
3324
|
+
const Ve = E.current, Ue = _.current, Ke = D.current, De = F.current, He = J ?? (K.signal.aborted ? "aborted" : A ? "error" : "complete");
|
|
3325
3325
|
try {
|
|
3326
3326
|
(Et = k == null ? void 0 : k.onClosed) == null || Et.call(k, {
|
|
3327
3327
|
reason: He,
|
|
3328
3328
|
lastSeq: Ve,
|
|
3329
3329
|
lastCheckpointId: Ue,
|
|
3330
3330
|
lastCheckpointNs: Ke,
|
|
3331
|
-
lastStateHistory:
|
|
3331
|
+
lastStateHistory: De,
|
|
3332
3332
|
error: A
|
|
3333
3333
|
});
|
|
3334
3334
|
} catch (mt) {
|
|
@@ -3340,7 +3340,7 @@ function ow(e = {}) {
|
|
|
3340
3340
|
},
|
|
3341
3341
|
[t, n, r, e.autoAppendAssistant]
|
|
3342
3342
|
);
|
|
3343
|
-
return
|
|
3343
|
+
return Ze(() => () => {
|
|
3344
3344
|
var O;
|
|
3345
3345
|
T.current = !1, (O = S.current) == null || O.abort();
|
|
3346
3346
|
}, []), {
|
|
@@ -3407,8 +3407,8 @@ function iw({
|
|
|
3407
3407
|
onThreadChange: r,
|
|
3408
3408
|
onCurrentThreadDeleted: o
|
|
3409
3409
|
}) {
|
|
3410
|
-
const [s, a] =
|
|
3411
|
-
|
|
3410
|
+
const [s, a] = he([]), [i, l] = he(t), [c, d] = he(!1), [p, m] = he(null), [f, v] = he([]), [g, x] = he(!1), [, b] = he(null), [w, y] = he(null), [C, S] = he(!1), T = Fe(i), E = Fe(/* @__PURE__ */ new Map());
|
|
3411
|
+
Ze(() => {
|
|
3412
3412
|
T.current = i;
|
|
3413
3413
|
}, [i]);
|
|
3414
3414
|
const R = ge(async () => {
|
|
@@ -3434,11 +3434,11 @@ function iw({
|
|
|
3434
3434
|
x(!1);
|
|
3435
3435
|
}
|
|
3436
3436
|
}, [e, n]);
|
|
3437
|
-
|
|
3437
|
+
Ze(() => {
|
|
3438
3438
|
R();
|
|
3439
|
-
}, [R]),
|
|
3439
|
+
}, [R]), Ze(() => {
|
|
3440
3440
|
_();
|
|
3441
|
-
}, [_]),
|
|
3441
|
+
}, [_]), Ze(() => {
|
|
3442
3442
|
r == null || r(i);
|
|
3443
3443
|
}, [i, r]);
|
|
3444
3444
|
const D = ge(
|
|
@@ -3501,7 +3501,7 @@ function iw({
|
|
|
3501
3501
|
}
|
|
3502
3502
|
},
|
|
3503
3503
|
[e, n, _]
|
|
3504
|
-
), U =
|
|
3504
|
+
), U = Je(
|
|
3505
3505
|
() => ({
|
|
3506
3506
|
createThread: D,
|
|
3507
3507
|
deleteThread: F,
|
|
@@ -3574,7 +3574,7 @@ function lw({
|
|
|
3574
3574
|
initialThreadId: t,
|
|
3575
3575
|
onError: n,
|
|
3576
3576
|
onThreadChange: r
|
|
3577
|
-
}), w =
|
|
3577
|
+
}), w = Je(
|
|
3578
3578
|
() => ({
|
|
3579
3579
|
threads: s,
|
|
3580
3580
|
currentThreadId: a,
|
|
@@ -3852,7 +3852,7 @@ function ww(e, t) {
|
|
|
3852
3852
|
}
|
|
3853
3853
|
}
|
|
3854
3854
|
function bw(e = []) {
|
|
3855
|
-
const [t, n] = jg(ww, { ...vw, messages: e }), r =
|
|
3855
|
+
const [t, n] = jg(ww, { ...vw, messages: e }), r = Fe([]), o = Fe(null), s = Fe(null), a = ge(() => {
|
|
3856
3856
|
o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
|
|
3857
3857
|
const d = r.current;
|
|
3858
3858
|
d.length && (r.current = [], n({ type: "batch", payload: { events: d } }));
|
|
@@ -3861,10 +3861,10 @@ function bw(e = []) {
|
|
|
3861
3861
|
}, [a]), l = ge((d) => {
|
|
3862
3862
|
r.current.push(d), i();
|
|
3863
3863
|
}, [i]);
|
|
3864
|
-
|
|
3864
|
+
Ze(() => () => {
|
|
3865
3865
|
o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), r.current = [];
|
|
3866
3866
|
}, []);
|
|
3867
|
-
const c =
|
|
3867
|
+
const c = Je(() => ({
|
|
3868
3868
|
reset: (d) => n({ type: "reset", payload: { messages: d } }),
|
|
3869
3869
|
seed: (d, p) => n({ type: "seed", payload: { messages: d, ...p ?? {} } }),
|
|
3870
3870
|
prepend: (d) => n({ type: "prepend", payload: { messages: d } }),
|
|
@@ -4095,11 +4095,11 @@ function Ew({
|
|
|
4095
4095
|
isStreaming: c,
|
|
4096
4096
|
getMessages: d
|
|
4097
4097
|
}) {
|
|
4098
|
-
const [p, m] =
|
|
4098
|
+
const [p, m] = he(null), v = Je(
|
|
4099
4099
|
() => Yn(p),
|
|
4100
4100
|
[p]
|
|
4101
|
-
).checkpoints, g = sx(v), x = g.timeline, [b, w] =
|
|
4102
|
-
|
|
4101
|
+
).checkpoints, g = sx(v), x = g.timeline, [b, w] = he(!1), [y, C] = he(null), [S, T] = he(!1), [E, R] = he(!1), [_, D] = he(!1), [F, V] = he(null), H = Fe(o), N = Fe(null), U = Fe(null), L = Fe(null), O = Fe(null), j = Fe(null), k = Fe(/* @__PURE__ */ new Map());
|
|
4102
|
+
Ze(() => {
|
|
4103
4103
|
H.current = o;
|
|
4104
4104
|
}, [o]);
|
|
4105
4105
|
const K = ge(
|
|
@@ -4253,7 +4253,7 @@ function Ew({
|
|
|
4253
4253
|
}).catch(() => {
|
|
4254
4254
|
});
|
|
4255
4255
|
}, [e, y, r, n, K]);
|
|
4256
|
-
|
|
4256
|
+
Ze(() => {
|
|
4257
4257
|
if (!l || !o || S || c)
|
|
4258
4258
|
return;
|
|
4259
4259
|
if (U.current === o) {
|
|
@@ -4359,16 +4359,16 @@ function Rw({
|
|
|
4359
4359
|
autoLoadInitial: o,
|
|
4360
4360
|
isStreaming: s,
|
|
4361
4361
|
getMessages: ge(() => c.messages, [c.messages])
|
|
4362
|
-
}), [U, L] =
|
|
4362
|
+
}), [U, L] = he(
|
|
4363
4363
|
() => async () => {
|
|
4364
4364
|
throw new Error("clearThread is not ready");
|
|
4365
4365
|
}
|
|
4366
|
-
), [O, j] =
|
|
4366
|
+
), [O, j] = he(
|
|
4367
4367
|
() => async () => {
|
|
4368
4368
|
throw new Error("respondToInterrupt is not ready");
|
|
4369
4369
|
}
|
|
4370
4370
|
);
|
|
4371
|
-
|
|
4371
|
+
Ze(() => {
|
|
4372
4372
|
l || (d([], {}), N());
|
|
4373
4373
|
}, [l, d, N]);
|
|
4374
4374
|
const k = ge(
|
|
@@ -4377,7 +4377,7 @@ function Rw({
|
|
|
4377
4377
|
), K = ge(
|
|
4378
4378
|
(q) => j(() => q),
|
|
4379
4379
|
[]
|
|
4380
|
-
), J =
|
|
4380
|
+
), J = Je(() => ({ assemblingMessageId: c.assemblingId ?? null }), [c.assemblingId]), A = Je(
|
|
4381
4381
|
() => ({
|
|
4382
4382
|
threadId: l,
|
|
4383
4383
|
messages: c.messages,
|
|
@@ -4438,7 +4438,7 @@ function Rw({
|
|
|
4438
4438
|
m,
|
|
4439
4439
|
f
|
|
4440
4440
|
]
|
|
4441
|
-
), P =
|
|
4441
|
+
), P = Je(
|
|
4442
4442
|
() => ({
|
|
4443
4443
|
registerClearThread: k,
|
|
4444
4444
|
registerRespondToInterrupt: K
|
|
@@ -4490,8 +4490,8 @@ function jw({
|
|
|
4490
4490
|
onConnectionError: l,
|
|
4491
4491
|
onToolEnd: c
|
|
4492
4492
|
}) {
|
|
4493
|
-
const { api: d, baseUrl: p } = Os(), m =
|
|
4494
|
-
return
|
|
4493
|
+
const { api: d, baseUrl: p } = Os(), m = Je(() => An(p), [p]), { stream: f, stop: v, isStreaming: g, error: x, setToken: b } = ow({ baseUrl: m }), [w, y] = he(!1);
|
|
4494
|
+
return Ze(() => {
|
|
4495
4495
|
y(g);
|
|
4496
4496
|
}, [g]), /* @__PURE__ */ u.jsx(
|
|
4497
4497
|
lw,
|
|
@@ -4568,8 +4568,8 @@ function _w({
|
|
|
4568
4568
|
});
|
|
4569
4569
|
},
|
|
4570
4570
|
[i, D, r, o, s]
|
|
4571
|
-
), V =
|
|
4572
|
-
|
|
4571
|
+
), V = Fe(g);
|
|
4572
|
+
Ze(() => {
|
|
4573
4573
|
V.current = g;
|
|
4574
4574
|
}, [g]);
|
|
4575
4575
|
const H = ge(
|
|
@@ -4587,7 +4587,7 @@ function _w({
|
|
|
4587
4587
|
},
|
|
4588
4588
|
[f, F]
|
|
4589
4589
|
);
|
|
4590
|
-
|
|
4590
|
+
Ze(() => {
|
|
4591
4591
|
R(H);
|
|
4592
4592
|
}, [H, R]);
|
|
4593
4593
|
const N = ge(async () => {
|
|
@@ -4598,7 +4598,7 @@ function _w({
|
|
|
4598
4598
|
console.warn("[StreamingProvider] Failed to refetch agent after clearing thread:", O);
|
|
4599
4599
|
}
|
|
4600
4600
|
}, [t, C, m, l]);
|
|
4601
|
-
|
|
4601
|
+
Ze(() => {
|
|
4602
4602
|
E(N);
|
|
4603
4603
|
}, [N, E]);
|
|
4604
4604
|
const U = ge(
|
|
@@ -4642,7 +4642,7 @@ function _w({
|
|
|
4642
4642
|
F(_e);
|
|
4643
4643
|
},
|
|
4644
4644
|
[g, f, w, S, F, x]
|
|
4645
|
-
), L =
|
|
4645
|
+
), L = Je(
|
|
4646
4646
|
() => ({
|
|
4647
4647
|
isStreaming: c,
|
|
4648
4648
|
error: d,
|
|
@@ -4661,7 +4661,7 @@ function Pw() {
|
|
|
4661
4661
|
if (!e) throw new Error("useStream must be used within StreamingProvider");
|
|
4662
4662
|
return e;
|
|
4663
4663
|
}
|
|
4664
|
-
function
|
|
4664
|
+
function pN() {
|
|
4665
4665
|
return Mr(yd);
|
|
4666
4666
|
}
|
|
4667
4667
|
function yc(e) {
|
|
@@ -4679,7 +4679,7 @@ function Mw(e, t) {
|
|
|
4679
4679
|
return !0;
|
|
4680
4680
|
}
|
|
4681
4681
|
function Ow(e) {
|
|
4682
|
-
const t =
|
|
4682
|
+
const t = Fe(e), n = Fe(e);
|
|
4683
4683
|
return Mw(t.current, e) || (t.current = e, n.current = e), n.current;
|
|
4684
4684
|
}
|
|
4685
4685
|
function Jr({
|
|
@@ -4695,7 +4695,7 @@ function Jr({
|
|
|
4695
4695
|
onThreadChange: c,
|
|
4696
4696
|
onToolEnd: d
|
|
4697
4697
|
}) {
|
|
4698
|
-
const p = Ow(t), m = qr(i), f = qr(l), v = qr(a), g = qr(c), x = qr(d), b =
|
|
4698
|
+
const p = Ow(t), m = qr(i), f = qr(l), v = qr(a), g = qr(c), x = qr(d), b = Je(
|
|
4699
4699
|
() => ({
|
|
4700
4700
|
initialThreadId: n,
|
|
4701
4701
|
initialCheckpointId: r,
|
|
@@ -4722,8 +4722,8 @@ function Jr({
|
|
|
4722
4722
|
return /* @__PURE__ */ u.jsx(Jv, { apiConfig: p, children: /* @__PURE__ */ u.jsx(jw, { ...b, children: e }) });
|
|
4723
4723
|
}
|
|
4724
4724
|
function qr(e) {
|
|
4725
|
-
const t =
|
|
4726
|
-
return
|
|
4725
|
+
const t = Fe(e);
|
|
4726
|
+
return Ze(() => {
|
|
4727
4727
|
t.current = e;
|
|
4728
4728
|
}, [e]), ge((...n) => {
|
|
4729
4729
|
const r = t.current;
|
|
@@ -4812,7 +4812,7 @@ function Bw(e) {
|
|
|
4812
4812
|
console.error("Failed to save settings:", t);
|
|
4813
4813
|
}
|
|
4814
4814
|
}
|
|
4815
|
-
function
|
|
4815
|
+
function hN() {
|
|
4816
4816
|
const e = $w(), t = Fw(), n = sr.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
|
|
4817
4817
|
return {
|
|
4818
4818
|
...e,
|
|
@@ -4827,7 +4827,7 @@ function fN() {
|
|
|
4827
4827
|
)
|
|
4828
4828
|
};
|
|
4829
4829
|
}
|
|
4830
|
-
function
|
|
4830
|
+
function mN(e) {
|
|
4831
4831
|
sr.updateConfig({
|
|
4832
4832
|
baseUrl: e.apiBaseUrl,
|
|
4833
4833
|
authToken: e.apiKey ?? void 0
|
|
@@ -7234,7 +7234,7 @@ function Aa(e, t) {
|
|
|
7234
7234
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
7235
7235
|
}
|
|
7236
7236
|
function Qy(e, t) {
|
|
7237
|
-
var n =
|
|
7237
|
+
var n = he(function() {
|
|
7238
7238
|
return {
|
|
7239
7239
|
// value
|
|
7240
7240
|
value: e,
|
|
@@ -8100,7 +8100,7 @@ var Q0 = "MenuArrow", Af = h.forwardRef(
|
|
|
8100
8100
|
}
|
|
8101
8101
|
);
|
|
8102
8102
|
Af.displayName = Q0;
|
|
8103
|
-
var eS = "MenuSub", [
|
|
8103
|
+
var eS = "MenuSub", [gN, jf] = fr(eS), Yr = "MenuSubTrigger", _f = h.forwardRef(
|
|
8104
8104
|
(e, t) => {
|
|
8105
8105
|
const n = pr(Yr, e.__scopeMenu), r = Io(Yr, e.__scopeMenu), o = jf(Yr, e.__scopeMenu), s = el(Yr, e.__scopeMenu), a = h.useRef(null), { pointerGraceTimerRef: i, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, d = h.useCallback(() => {
|
|
8106
8106
|
a.current && window.clearTimeout(a.current), a.current = null;
|
|
@@ -8250,7 +8250,7 @@ function sS(e, t) {
|
|
|
8250
8250
|
function io(e) {
|
|
8251
8251
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
8252
8252
|
}
|
|
8253
|
-
var aS = gf, iS = Zi, lS = vf, cS = wf, uS = nl, dS = bf, fS = qs, pS = Sf, hS = Cf, mS = kf, gS = If, xS = Nf, vS = Af, wS = _f, bS = Mf, Gs = "DropdownMenu", [yS,
|
|
8253
|
+
var aS = gf, iS = Zi, lS = vf, cS = wf, uS = nl, dS = bf, fS = qs, pS = Sf, hS = Cf, mS = kf, gS = If, xS = Nf, vS = Af, wS = _f, bS = Mf, Gs = "DropdownMenu", [yS, xN] = xn(
|
|
8254
8254
|
Gs,
|
|
8255
8255
|
[hf]
|
|
8256
8256
|
), zt = hf(), [SS, Df] = yS(Gs), Lf = (e) => {
|
|
@@ -8721,7 +8721,7 @@ function ct(...e) {
|
|
|
8721
8721
|
function Qe(e, t) {
|
|
8722
8722
|
return e(Hn, t);
|
|
8723
8723
|
}
|
|
8724
|
-
function
|
|
8724
|
+
function Oe(e, t) {
|
|
8725
8725
|
e(Xs, t);
|
|
8726
8726
|
}
|
|
8727
8727
|
function ll(e) {
|
|
@@ -8761,7 +8761,7 @@ function Ne(e) {
|
|
|
8761
8761
|
e(n) && t(n);
|
|
8762
8762
|
};
|
|
8763
8763
|
}
|
|
8764
|
-
function
|
|
8764
|
+
function pe(e) {
|
|
8765
8765
|
return (t) => lp(t, e);
|
|
8766
8766
|
}
|
|
8767
8767
|
function bn(e) {
|
|
@@ -8876,7 +8876,7 @@ function We() {
|
|
|
8876
8876
|
function en(e) {
|
|
8877
8877
|
return Js(We(), (t) => be(e, t));
|
|
8878
8878
|
}
|
|
8879
|
-
function
|
|
8879
|
+
function Ye(e, t = [], { singleton: n } = { singleton: !0 }) {
|
|
8880
8880
|
return {
|
|
8881
8881
|
constructor: e,
|
|
8882
8882
|
dependencies: t,
|
|
@@ -8901,7 +8901,7 @@ function Ct(...e) {
|
|
|
8901
8901
|
return e.forEach((s, a) => {
|
|
8902
8902
|
const i = Math.pow(2, a);
|
|
8903
8903
|
Qe(s, (l) => {
|
|
8904
|
-
n[a] = l, r = r | i, r === o &&
|
|
8904
|
+
n[a] = l, r = r | i, r === o && Oe(t, n);
|
|
8905
8905
|
});
|
|
8906
8906
|
}), function(s, a) {
|
|
8907
8907
|
switch (s) {
|
|
@@ -8933,7 +8933,7 @@ const oT = {
|
|
|
8933
8933
|
3: "error",
|
|
8934
8934
|
1: "log",
|
|
8935
8935
|
2: "warn"
|
|
8936
|
-
}, sT = () => typeof globalThis > "u" ? window : globalThis, Un =
|
|
8936
|
+
}, sT = () => typeof globalThis > "u" ? window : globalThis, Un = Ye(
|
|
8937
8937
|
() => {
|
|
8938
8938
|
const e = oe(
|
|
8939
8939
|
3
|
|
@@ -9061,19 +9061,19 @@ function up(e, t, n) {
|
|
|
9061
9061
|
}
|
|
9062
9062
|
}, [i, t, a]), s;
|
|
9063
9063
|
}
|
|
9064
|
-
const Ht =
|
|
9064
|
+
const Ht = Ye(
|
|
9065
9065
|
() => {
|
|
9066
9066
|
const e = We(), t = We(), n = oe(0), r = We(), o = oe(0), s = We(), a = We(), i = oe(0), l = oe(0), c = oe(0), d = oe(0), p = We(), m = We(), f = oe(!1), v = oe(!1), g = oe(!1);
|
|
9067
9067
|
return be(
|
|
9068
9068
|
ee(
|
|
9069
9069
|
e,
|
|
9070
|
-
|
|
9070
|
+
pe(({ scrollTop: x }) => x)
|
|
9071
9071
|
),
|
|
9072
9072
|
t
|
|
9073
9073
|
), be(
|
|
9074
9074
|
ee(
|
|
9075
9075
|
e,
|
|
9076
|
-
|
|
9076
|
+
pe(({ scrollHeight: x }) => x)
|
|
9077
9077
|
),
|
|
9078
9078
|
a
|
|
9079
9079
|
), be(t, o), {
|
|
@@ -9242,7 +9242,7 @@ function gp(e, t) {
|
|
|
9242
9242
|
function uo(e, t) {
|
|
9243
9243
|
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
9244
9244
|
}
|
|
9245
|
-
const ul =
|
|
9245
|
+
const ul = Ye(
|
|
9246
9246
|
() => ({ recalcInProgress: oe(!1) }),
|
|
9247
9247
|
[],
|
|
9248
9248
|
{ singleton: !0 }
|
|
@@ -9409,7 +9409,7 @@ function vT(e) {
|
|
|
9409
9409
|
const wT = {
|
|
9410
9410
|
offsetHeight: "height",
|
|
9411
9411
|
offsetWidth: "width"
|
|
9412
|
-
}, Rn =
|
|
9412
|
+
}, Rn = Ye(
|
|
9413
9413
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
9414
9414
|
const n = We(), r = We(), o = Ft(r, 0), s = We(), a = We(), i = oe(0), l = oe([]), c = oe(void 0), d = oe(void 0), p = oe((S, T) => $n(S, wT[T])), m = oe(void 0), f = oe(0), v = uT(), g = Ft(
|
|
9415
9415
|
ee(n, Be(l, e, f), Tn(mT, v), lt()),
|
|
@@ -9422,7 +9422,7 @@ const wT = {
|
|
|
9422
9422
|
current: [],
|
|
9423
9423
|
prev: []
|
|
9424
9424
|
}),
|
|
9425
|
-
|
|
9425
|
+
pe(({ prev: S }) => S)
|
|
9426
9426
|
),
|
|
9427
9427
|
[]
|
|
9428
9428
|
);
|
|
@@ -9431,7 +9431,7 @@ const wT = {
|
|
|
9431
9431
|
l,
|
|
9432
9432
|
Ne((S) => S.length > 0),
|
|
9433
9433
|
Be(g, f),
|
|
9434
|
-
|
|
9434
|
+
pe(([S, T, E]) => {
|
|
9435
9435
|
const R = S.reduce((_, D, F) => Zt(_, D, fo(D, T.offsetTree, E) || F), kr());
|
|
9436
9436
|
return {
|
|
9437
9437
|
...T,
|
|
@@ -9446,7 +9446,7 @@ const wT = {
|
|
|
9446
9446
|
r,
|
|
9447
9447
|
Be(g),
|
|
9448
9448
|
Ne(([S, { lastIndex: T }]) => S < T),
|
|
9449
|
-
|
|
9449
|
+
pe(([S, { lastIndex: T, lastSize: E }]) => [
|
|
9450
9450
|
{
|
|
9451
9451
|
endIndex: T,
|
|
9452
9452
|
size: E,
|
|
@@ -9459,7 +9459,7 @@ const wT = {
|
|
|
9459
9459
|
const b = Ft(
|
|
9460
9460
|
ee(
|
|
9461
9461
|
c,
|
|
9462
|
-
|
|
9462
|
+
pe((S) => S === void 0)
|
|
9463
9463
|
),
|
|
9464
9464
|
!0
|
|
9465
9465
|
);
|
|
@@ -9467,7 +9467,7 @@ const wT = {
|
|
|
9467
9467
|
ee(
|
|
9468
9468
|
d,
|
|
9469
9469
|
Ne((S) => S !== void 0 && rt(wt(g).sizeTree)),
|
|
9470
|
-
|
|
9470
|
+
pe((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
|
|
9471
9471
|
),
|
|
9472
9472
|
n
|
|
9473
9473
|
);
|
|
@@ -9482,7 +9482,7 @@ const wT = {
|
|
|
9482
9482
|
}),
|
|
9483
9483
|
{ changed: !1, sizes: v }
|
|
9484
9484
|
),
|
|
9485
|
-
|
|
9485
|
+
pe((S) => S.changed)
|
|
9486
9486
|
)
|
|
9487
9487
|
);
|
|
9488
9488
|
Qe(
|
|
@@ -9492,15 +9492,15 @@ const wT = {
|
|
|
9492
9492
|
(S, T) => ({ diff: S.prev - T, prev: T }),
|
|
9493
9493
|
{ diff: 0, prev: 0 }
|
|
9494
9494
|
),
|
|
9495
|
-
|
|
9495
|
+
pe((S) => S.diff)
|
|
9496
9496
|
),
|
|
9497
9497
|
(S) => {
|
|
9498
9498
|
const { groupIndices: T } = wt(g);
|
|
9499
9499
|
if (S > 0)
|
|
9500
|
-
|
|
9500
|
+
Oe(t, !0), Oe(s, S + Zc(S, T));
|
|
9501
9501
|
else if (S < 0) {
|
|
9502
9502
|
const E = wt(x);
|
|
9503
|
-
E.length > 0 && (S -= Zc(-S, E)),
|
|
9503
|
+
E.length > 0 && (S -= Zc(-S, E)), Oe(a, S);
|
|
9504
9504
|
}
|
|
9505
9505
|
}
|
|
9506
9506
|
), Qe(ee(i, Be(e)), ([S, T]) => {
|
|
@@ -9515,7 +9515,7 @@ const wT = {
|
|
|
9515
9515
|
ee(
|
|
9516
9516
|
s,
|
|
9517
9517
|
Be(g),
|
|
9518
|
-
|
|
9518
|
+
pe(([S, T]) => {
|
|
9519
9519
|
const E = T.groupIndices.length > 0, R = [], _ = T.lastSize;
|
|
9520
9520
|
if (E) {
|
|
9521
9521
|
const D = co(T.sizeTree, 0);
|
|
@@ -9576,7 +9576,7 @@ const wT = {
|
|
|
9576
9576
|
ee(
|
|
9577
9577
|
a,
|
|
9578
9578
|
Be(g, f),
|
|
9579
|
-
|
|
9579
|
+
pe(([S, { offsetTree: T }, E]) => {
|
|
9580
9580
|
const R = -S;
|
|
9581
9581
|
return fo(R, T, E);
|
|
9582
9582
|
})
|
|
@@ -9586,7 +9586,7 @@ const wT = {
|
|
|
9586
9586
|
ee(
|
|
9587
9587
|
a,
|
|
9588
9588
|
Be(g, f),
|
|
9589
|
-
|
|
9589
|
+
pe(([S, T, E]) => {
|
|
9590
9590
|
if (T.groupIndices.length > 0) {
|
|
9591
9591
|
if (rt(T.sizeTree))
|
|
9592
9592
|
return T;
|
|
@@ -9654,34 +9654,34 @@ function bT(e) {
|
|
|
9654
9654
|
}
|
|
9655
9655
|
);
|
|
9656
9656
|
}
|
|
9657
|
-
const bp =
|
|
9657
|
+
const bp = Ye(
|
|
9658
9658
|
([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
|
|
9659
|
-
const s = We(), a = We(), i = en(ee(s,
|
|
9659
|
+
const s = We(), a = We(), i = en(ee(s, pe(bT)));
|
|
9660
9660
|
return be(
|
|
9661
9661
|
ee(
|
|
9662
9662
|
i,
|
|
9663
|
-
|
|
9663
|
+
pe((l) => l.totalCount)
|
|
9664
9664
|
),
|
|
9665
9665
|
n
|
|
9666
9666
|
), be(
|
|
9667
9667
|
ee(
|
|
9668
9668
|
i,
|
|
9669
|
-
|
|
9669
|
+
pe((l) => l.groupIndices)
|
|
9670
9670
|
),
|
|
9671
9671
|
e
|
|
9672
9672
|
), be(
|
|
9673
9673
|
ee(
|
|
9674
9674
|
Ct(o, t, r),
|
|
9675
9675
|
Ne(([l, c]) => Qs(c)),
|
|
9676
|
-
|
|
9676
|
+
pe(([l, c, d]) => mn(c.groupOffsetTree, Math.max(l - d, 0), "v")[0]),
|
|
9677
9677
|
lt(),
|
|
9678
|
-
|
|
9678
|
+
pe((l) => [l])
|
|
9679
9679
|
),
|
|
9680
9680
|
a
|
|
9681
9681
|
), { groupCounts: s, topItemsIndexes: a };
|
|
9682
9682
|
},
|
|
9683
9683
|
ct(Rn, Ht)
|
|
9684
|
-
), Wn =
|
|
9684
|
+
), Wn = Ye(
|
|
9685
9685
|
([{ log: e }]) => {
|
|
9686
9686
|
const t = oe(!1), n = en(
|
|
9687
9687
|
ee(
|
|
@@ -9701,7 +9701,7 @@ function yp(e) {
|
|
|
9701
9701
|
const t = typeof e == "number" ? { index: e } : e;
|
|
9702
9702
|
return t.align || (t.align = "start"), (!t.behavior || !yT) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
|
|
9703
9703
|
}
|
|
9704
|
-
const No =
|
|
9704
|
+
const No = Ye(
|
|
9705
9705
|
([
|
|
9706
9706
|
{ gap: e, listRefresh: t, sizes: n, totalCount: r },
|
|
9707
9707
|
{
|
|
@@ -9719,14 +9719,14 @@ const No = Xe(
|
|
|
9719
9719
|
const f = We(), v = We(), g = oe(0);
|
|
9720
9720
|
let x = null, b = null, w = null;
|
|
9721
9721
|
function y() {
|
|
9722
|
-
x && (x(), x = null), w && (w(), w = null), b && (clearTimeout(b), b = null),
|
|
9722
|
+
x && (x(), x = null), w && (w(), w = null), b && (clearTimeout(b), b = null), Oe(l, !1);
|
|
9723
9723
|
}
|
|
9724
9724
|
return be(
|
|
9725
9725
|
ee(
|
|
9726
9726
|
f,
|
|
9727
9727
|
Be(n, p, r, g, i, a, m),
|
|
9728
9728
|
Be(e, s, o),
|
|
9729
|
-
|
|
9729
|
+
pe(
|
|
9730
9730
|
([
|
|
9731
9731
|
[C, S, T, E, R, _, D, F],
|
|
9732
9732
|
V,
|
|
@@ -9737,7 +9737,7 @@ const No = Xe(
|
|
|
9737
9737
|
let J = fo(K, S.offsetTree, V) + _;
|
|
9738
9738
|
L === "end" ? (J += H + mn(S.sizeTree, K)[1] - T + N, K === k && (J += D)) : L === "center" ? J += (H + mn(S.sizeTree, K)[1] - T + N) / 2 : J -= R, j && (J += j);
|
|
9739
9739
|
const A = (P) => {
|
|
9740
|
-
y(), P ? (F("retrying to scroll to", { location: C }, Gt.DEBUG),
|
|
9740
|
+
y(), P ? (F("retrying to scroll to", { location: C }, Gt.DEBUG), Oe(f, C)) : (Oe(v, !0), F("list did not change, scroll successful", {}, Gt.DEBUG));
|
|
9741
9741
|
};
|
|
9742
9742
|
if (y(), O === "smooth") {
|
|
9743
9743
|
let P = !1;
|
|
@@ -9750,7 +9750,7 @@ const No = Xe(
|
|
|
9750
9750
|
x = fn(ee(t, ST(150)), A);
|
|
9751
9751
|
return b = setTimeout(() => {
|
|
9752
9752
|
y();
|
|
9753
|
-
}, 1200),
|
|
9753
|
+
}, 1200), Oe(l, !0), F("scrolling from index to", { behavior: O, index: K, top: J }, Gt.DEBUG), { behavior: O, top: J };
|
|
9754
9754
|
}
|
|
9755
9755
|
)
|
|
9756
9756
|
),
|
|
@@ -9783,7 +9783,7 @@ function pl(e, t) {
|
|
|
9783
9783
|
const n = t - 1;
|
|
9784
9784
|
return typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
|
|
9785
9785
|
}
|
|
9786
|
-
const Ao =
|
|
9786
|
+
const Ao = Ye(
|
|
9787
9787
|
([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: a }]) => {
|
|
9788
9788
|
const i = oe(!0), l = oe(0), c = oe(!0);
|
|
9789
9789
|
return be(
|
|
@@ -9811,11 +9811,11 @@ const Ao = Xe(
|
|
|
9811
9811
|
),
|
|
9812
9812
|
([, d]) => {
|
|
9813
9813
|
fn(o, () => {
|
|
9814
|
-
|
|
9814
|
+
Oe(c, !0);
|
|
9815
9815
|
}), fl(4, () => {
|
|
9816
9816
|
fn(r, () => {
|
|
9817
|
-
|
|
9818
|
-
}),
|
|
9817
|
+
Oe(i, !0);
|
|
9818
|
+
}), Oe(s, d);
|
|
9819
9819
|
});
|
|
9820
9820
|
}
|
|
9821
9821
|
), {
|
|
@@ -9839,7 +9839,7 @@ const po = "up", Zr = "down", TT = "none", CT = {
|
|
|
9839
9839
|
scrollTop: 0,
|
|
9840
9840
|
viewportHeight: 0
|
|
9841
9841
|
}
|
|
9842
|
-
}, ET = 0, jo =
|
|
9842
|
+
}, ET = 0, jo = Ye(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
|
|
9843
9843
|
const a = oe(!1), i = oe(!0), l = We(), c = We(), d = oe(4), p = oe(ET), m = Ft(
|
|
9844
9844
|
ee(
|
|
9845
9845
|
si(ee(Re(o), ir(1), bn(!0)), ee(Re(o), ir(1), bn(!1), Yc(100))),
|
|
@@ -9853,7 +9853,7 @@ const po = "up", Zr = "down", TT = "none", CT = {
|
|
|
9853
9853
|
be(
|
|
9854
9854
|
ee(
|
|
9855
9855
|
Ct(Re(o), Re(p)),
|
|
9856
|
-
|
|
9856
|
+
pe(([w, y]) => w <= y),
|
|
9857
9857
|
lt()
|
|
9858
9858
|
),
|
|
9859
9859
|
i
|
|
@@ -9915,14 +9915,14 @@ const po = "up", Zr = "down", TT = "none", CT = {
|
|
|
9915
9915
|
{ changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
|
|
9916
9916
|
),
|
|
9917
9917
|
Ne((w) => w.changed),
|
|
9918
|
-
|
|
9918
|
+
pe((w) => w.jump)
|
|
9919
9919
|
),
|
|
9920
9920
|
0
|
|
9921
9921
|
);
|
|
9922
9922
|
be(
|
|
9923
9923
|
ee(
|
|
9924
9924
|
v,
|
|
9925
|
-
|
|
9925
|
+
pe((w) => w.atBottom)
|
|
9926
9926
|
),
|
|
9927
9927
|
a
|
|
9928
9928
|
), be(ee(a, Nn(50)), l);
|
|
@@ -9930,13 +9930,13 @@ const po = "up", Zr = "down", TT = "none", CT = {
|
|
|
9930
9930
|
be(
|
|
9931
9931
|
ee(
|
|
9932
9932
|
r,
|
|
9933
|
-
|
|
9933
|
+
pe(({ scrollTop: w }) => w),
|
|
9934
9934
|
lt(),
|
|
9935
9935
|
Tn(
|
|
9936
9936
|
(w, y) => wt(f) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? po : Zr, prevScrollTop: y },
|
|
9937
9937
|
{ direction: Zr, prevScrollTop: 0 }
|
|
9938
9938
|
),
|
|
9939
|
-
|
|
9939
|
+
pe((w) => w.direction)
|
|
9940
9940
|
),
|
|
9941
9941
|
x
|
|
9942
9942
|
), be(ee(r, Nn(50), bn(TT)), x);
|
|
@@ -9955,7 +9955,7 @@ const po = "up", Zr = "down", TT = "none", CT = {
|
|
|
9955
9955
|
Be(m),
|
|
9956
9956
|
Ne(([w, y]) => !!y),
|
|
9957
9957
|
Tn(([w, y], [C]) => [y, C], [0, 0]),
|
|
9958
|
-
|
|
9958
|
+
pe(([w, y]) => y - w)
|
|
9959
9959
|
),
|
|
9960
9960
|
b
|
|
9961
9961
|
), {
|
|
@@ -9979,7 +9979,7 @@ function tu(e, t) {
|
|
|
9979
9979
|
var n;
|
|
9980
9980
|
return typeof e == "number" ? e : (n = e[t]) != null ? n : 0;
|
|
9981
9981
|
}
|
|
9982
|
-
const hl =
|
|
9982
|
+
const hl = Ye(
|
|
9983
9983
|
([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
|
|
9984
9984
|
const s = We(), a = oe(0), i = oe(0), l = oe(0), c = Ft(
|
|
9985
9985
|
ee(
|
|
@@ -9994,7 +9994,7 @@ const hl = Xe(
|
|
|
9994
9994
|
Re(e),
|
|
9995
9995
|
Re(i)
|
|
9996
9996
|
),
|
|
9997
|
-
|
|
9997
|
+
pe(
|
|
9998
9998
|
([
|
|
9999
9999
|
d,
|
|
10000
10000
|
p,
|
|
@@ -10117,7 +10117,7 @@ function nu(e, t, n) {
|
|
|
10117
10117
|
}
|
|
10118
10118
|
return s;
|
|
10119
10119
|
}
|
|
10120
|
-
const mr =
|
|
10120
|
+
const mr = Ye(
|
|
10121
10121
|
([
|
|
10122
10122
|
{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: o },
|
|
10123
10123
|
s,
|
|
@@ -10149,7 +10149,7 @@ const mr = Xe(
|
|
|
10149
10149
|
const D = _ && _.length !== R;
|
|
10150
10150
|
return T && !E && !D;
|
|
10151
10151
|
}),
|
|
10152
|
-
|
|
10152
|
+
pe(
|
|
10153
10153
|
([
|
|
10154
10154
|
,
|
|
10155
10155
|
,
|
|
@@ -10221,25 +10221,25 @@ const mr = Xe(
|
|
|
10221
10221
|
ee(
|
|
10222
10222
|
e,
|
|
10223
10223
|
Ne(il),
|
|
10224
|
-
|
|
10224
|
+
pe((T) => T == null ? void 0 : T.length)
|
|
10225
10225
|
),
|
|
10226
10226
|
o
|
|
10227
10227
|
), be(
|
|
10228
10228
|
ee(
|
|
10229
10229
|
w,
|
|
10230
|
-
|
|
10230
|
+
pe((T) => T.topListHeight)
|
|
10231
10231
|
),
|
|
10232
10232
|
p
|
|
10233
10233
|
), be(p, i), be(
|
|
10234
10234
|
ee(
|
|
10235
10235
|
w,
|
|
10236
|
-
|
|
10236
|
+
pe((T) => [T.top, T.bottom])
|
|
10237
10237
|
),
|
|
10238
10238
|
a
|
|
10239
10239
|
), be(
|
|
10240
10240
|
ee(
|
|
10241
10241
|
w,
|
|
10242
|
-
|
|
10242
|
+
pe((T) => T.items)
|
|
10243
10243
|
),
|
|
10244
10244
|
b
|
|
10245
10245
|
);
|
|
@@ -10249,23 +10249,23 @@ const mr = Xe(
|
|
|
10249
10249
|
Ne(({ items: T }) => T.length > 0),
|
|
10250
10250
|
Be(o, e),
|
|
10251
10251
|
Ne(([{ items: T }, E]) => T[T.length - 1].originalIndex === E - 1),
|
|
10252
|
-
|
|
10252
|
+
pe(([, T, E]) => [T - 1, E]),
|
|
10253
10253
|
lt(uo),
|
|
10254
|
-
|
|
10254
|
+
pe(([T]) => T)
|
|
10255
10255
|
)
|
|
10256
10256
|
), C = en(
|
|
10257
10257
|
ee(
|
|
10258
10258
|
w,
|
|
10259
10259
|
Nn(200),
|
|
10260
10260
|
Ne(({ items: T, topItems: E }) => T.length > 0 && T[0].originalIndex === E.length),
|
|
10261
|
-
|
|
10261
|
+
pe(({ items: T }) => T[0].index),
|
|
10262
10262
|
lt()
|
|
10263
10263
|
)
|
|
10264
10264
|
), S = en(
|
|
10265
10265
|
ee(
|
|
10266
10266
|
w,
|
|
10267
10267
|
Ne(({ items: T }) => T.length > 0),
|
|
10268
|
-
|
|
10268
|
+
pe(({ items: T }) => {
|
|
10269
10269
|
let E = 0, R = T.length - 1;
|
|
10270
10270
|
for (; T[E].type === "group" && E < R; )
|
|
10271
10271
|
E++;
|
|
@@ -10292,12 +10292,12 @@ const mr = Xe(
|
|
|
10292
10292
|
ul
|
|
10293
10293
|
),
|
|
10294
10294
|
{ singleton: !0 }
|
|
10295
|
-
), Cp =
|
|
10295
|
+
), Cp = Ye(
|
|
10296
10296
|
([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
|
|
10297
10297
|
const s = We(), a = Ft(
|
|
10298
10298
|
ee(
|
|
10299
10299
|
Ct(n, e, r, t, o),
|
|
10300
|
-
|
|
10300
|
+
pe(([i, l, c, d, p]) => i + l + c + d + p.offsetBottom + p.bottom)
|
|
10301
10301
|
),
|
|
10302
10302
|
0
|
|
10303
10303
|
);
|
|
@@ -10305,13 +10305,13 @@ const mr = Xe(
|
|
|
10305
10305
|
},
|
|
10306
10306
|
ct(Ht, mr),
|
|
10307
10307
|
{ singleton: !0 }
|
|
10308
|
-
), RT =
|
|
10308
|
+
), RT = Ye(
|
|
10309
10309
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
10310
10310
|
const n = oe(!1), r = Ft(
|
|
10311
10311
|
ee(
|
|
10312
10312
|
Ct(n, e, t),
|
|
10313
10313
|
Ne(([o]) => o),
|
|
10314
|
-
|
|
10314
|
+
pe(([, o, s]) => Math.max(0, o - s)),
|
|
10315
10315
|
Nn(0),
|
|
10316
10316
|
lt()
|
|
10317
10317
|
),
|
|
@@ -10321,7 +10321,7 @@ const mr = Xe(
|
|
|
10321
10321
|
},
|
|
10322
10322
|
ct(Ht, Cp),
|
|
10323
10323
|
{ singleton: !0 }
|
|
10324
|
-
), Ep =
|
|
10324
|
+
), Ep = Ye(() => ({
|
|
10325
10325
|
context: oe(null)
|
|
10326
10326
|
})), IT = ({
|
|
10327
10327
|
itemBottom: e,
|
|
@@ -10329,7 +10329,7 @@ const mr = Xe(
|
|
|
10329
10329
|
locationParams: { align: n, behavior: r, ...o },
|
|
10330
10330
|
viewportBottom: s,
|
|
10331
10331
|
viewportTop: a
|
|
10332
|
-
}) => t < a ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, kp =
|
|
10332
|
+
}) => t < a ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, kp = Ye(
|
|
10333
10333
|
([
|
|
10334
10334
|
{ gap: e, sizes: t, totalCount: n },
|
|
10335
10335
|
{ fixedFooterHeight: r, fixedHeaderHeight: o, headerHeight: s, scrollingInProgress: a, scrollTop: i, viewportHeight: l },
|
|
@@ -10341,7 +10341,7 @@ const mr = Xe(
|
|
|
10341
10341
|
d,
|
|
10342
10342
|
Be(t, l, n, s, o, r, i),
|
|
10343
10343
|
Be(e),
|
|
10344
|
-
|
|
10344
|
+
pe(([[p, m, f, v, g, x, b, w], y]) => {
|
|
10345
10345
|
const { align: C, behavior: S, calculateViewLocation: T = IT, done: E, ...R } = p, _ = wp(p, m, v - 1), D = fo(_, m.offsetTree, y) + g + x, F = D + mn(m.sizeTree, _)[1], V = w + x, H = w + f - b, N = T({
|
|
10346
10346
|
itemBottom: F,
|
|
10347
10347
|
itemTop: D,
|
|
@@ -10373,7 +10373,7 @@ const mr = Xe(
|
|
|
10373
10373
|
function ru(e) {
|
|
10374
10374
|
return e ? e === "smooth" ? "smooth" : "auto" : !1;
|
|
10375
10375
|
}
|
|
10376
|
-
const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT =
|
|
10376
|
+
const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Ye(
|
|
10377
10377
|
([
|
|
10378
10378
|
{ listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
|
|
10379
10379
|
{ atBottomState: o, isAtBottom: s },
|
|
@@ -10388,7 +10388,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10388
10388
|
const v = oe(!1), g = We();
|
|
10389
10389
|
let x = null;
|
|
10390
10390
|
function b(S) {
|
|
10391
|
-
|
|
10391
|
+
Oe(a, {
|
|
10392
10392
|
align: "end",
|
|
10393
10393
|
behavior: S,
|
|
10394
10394
|
index: "LAST"
|
|
@@ -10398,7 +10398,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10398
10398
|
ee(
|
|
10399
10399
|
Ct(ee(Re(t), ir(1)), l),
|
|
10400
10400
|
Be(Re(v), s, i, p),
|
|
10401
|
-
|
|
10401
|
+
pe(([[S, T], E, R, _, D]) => {
|
|
10402
10402
|
let F = T && _, V = "auto";
|
|
10403
10403
|
return F && (V = NT(E, R || D), F = F && !!V), { followOutputBehavior: V, shouldFollow: F, totalCount: S };
|
|
10404
10404
|
}),
|
|
@@ -10442,7 +10442,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10442
10442
|
si(
|
|
10443
10443
|
ee(
|
|
10444
10444
|
Re(r),
|
|
10445
|
-
|
|
10445
|
+
pe((S) => {
|
|
10446
10446
|
var T;
|
|
10447
10447
|
return (T = S == null ? void 0 : S.length) != null ? T : 0;
|
|
10448
10448
|
})
|
|
@@ -10454,15 +10454,15 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10454
10454
|
ee(
|
|
10455
10455
|
Ct(ee(C, ir(1)), l),
|
|
10456
10456
|
Be(Re(y), i, p, m),
|
|
10457
|
-
|
|
10457
|
+
pe(([[S, T], E, R, _, D]) => T && R && (E == null ? void 0 : E({ context: D, totalCount: S, scrollingInProgress: _ }))),
|
|
10458
10458
|
Ne((S) => !!S),
|
|
10459
10459
|
Nn(0)
|
|
10460
10460
|
),
|
|
10461
10461
|
(S) => {
|
|
10462
10462
|
x && (x(), x = null), wt(n) ? requestAnimationFrame(() => {
|
|
10463
|
-
wt(d)("scrolling into view", {}),
|
|
10463
|
+
wt(d)("scrolling into view", {}), Oe(f, S);
|
|
10464
10464
|
}) : x = fn(e, () => {
|
|
10465
|
-
wt(d)("scrolling into view", {}),
|
|
10465
|
+
wt(d)("scrolling into view", {}), Oe(f, S), x = null;
|
|
10466
10466
|
});
|
|
10467
10467
|
}
|
|
10468
10468
|
), { autoscrollToBottom: g, followOutput: v, scrollIntoViewOnChange: y };
|
|
@@ -10478,20 +10478,20 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10478
10478
|
Ep,
|
|
10479
10479
|
kp
|
|
10480
10480
|
)
|
|
10481
|
-
), jT =
|
|
10481
|
+
), jT = Ye(
|
|
10482
10482
|
([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: a }, { didMount: i }]) => (be(
|
|
10483
10483
|
ee(
|
|
10484
10484
|
i,
|
|
10485
10485
|
Be(s),
|
|
10486
10486
|
Ne(([, l]) => l !== 0),
|
|
10487
10487
|
Be(o, r, t, n, e),
|
|
10488
|
-
|
|
10488
|
+
pe(([[, l], c, d, p, m, f = []]) => Tp(l, c, d, p, m, f))
|
|
10489
10489
|
),
|
|
10490
10490
|
a
|
|
10491
10491
|
), {}),
|
|
10492
10492
|
ct(Rn, Ao, mr, Wn),
|
|
10493
10493
|
{ singleton: !0 }
|
|
10494
|
-
), _T =
|
|
10494
|
+
), _T = Ye(
|
|
10495
10495
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
10496
10496
|
const r = oe(0);
|
|
10497
10497
|
return Qe(
|
|
@@ -10499,7 +10499,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10499
10499
|
e,
|
|
10500
10500
|
Be(r),
|
|
10501
10501
|
Ne(([, o]) => o !== 0),
|
|
10502
|
-
|
|
10502
|
+
pe(([, o]) => ({ top: o }))
|
|
10503
10503
|
),
|
|
10504
10504
|
(o) => {
|
|
10505
10505
|
fn(
|
|
@@ -10510,7 +10510,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10510
10510
|
),
|
|
10511
10511
|
() => {
|
|
10512
10512
|
requestAnimationFrame(() => {
|
|
10513
|
-
|
|
10513
|
+
Oe(t, o);
|
|
10514
10514
|
});
|
|
10515
10515
|
}
|
|
10516
10516
|
);
|
|
@@ -10521,7 +10521,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10521
10521
|
},
|
|
10522
10522
|
ct(Wn, Ht, mr),
|
|
10523
10523
|
{ singleton: !0 }
|
|
10524
|
-
), Rp =
|
|
10524
|
+
), Rp = Ye(
|
|
10525
10525
|
([{ scrollVelocity: e }]) => {
|
|
10526
10526
|
const t = oe(!1), n = We(), r = oe(!1);
|
|
10527
10527
|
return be(
|
|
@@ -10529,7 +10529,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10529
10529
|
e,
|
|
10530
10530
|
Be(r, t, n),
|
|
10531
10531
|
Ne(([o, s]) => !!s),
|
|
10532
|
-
|
|
10532
|
+
pe(([o, s, a, i]) => {
|
|
10533
10533
|
const { enter: l, exit: c } = s;
|
|
10534
10534
|
if (a) {
|
|
10535
10535
|
if (c(o, i))
|
|
@@ -10550,12 +10550,12 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10550
10550
|
},
|
|
10551
10551
|
ct(jo),
|
|
10552
10552
|
{ singleton: !0 }
|
|
10553
|
-
), ml =
|
|
10553
|
+
), ml = Ye(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
10554
10554
|
const n = We(), r = We(), o = We(), s = oe(!1), a = oe(void 0);
|
|
10555
10555
|
return be(
|
|
10556
10556
|
ee(
|
|
10557
10557
|
Ct(n, r),
|
|
10558
|
-
|
|
10558
|
+
pe(([{ scrollHeight: i, scrollTop: l, viewportHeight: c }, { offsetTop: d }]) => ({
|
|
10559
10559
|
scrollHeight: i,
|
|
10560
10560
|
scrollTop: Math.max(0, l - d),
|
|
10561
10561
|
viewportHeight: c
|
|
@@ -10566,7 +10566,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10566
10566
|
ee(
|
|
10567
10567
|
t,
|
|
10568
10568
|
Be(r),
|
|
10569
|
-
|
|
10569
|
+
pe(([i, { offsetTop: l }]) => ({
|
|
10570
10570
|
...i,
|
|
10571
10571
|
top: i.top + l
|
|
10572
10572
|
}))
|
|
@@ -10582,7 +10582,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10582
10582
|
windowScrollTo: o,
|
|
10583
10583
|
windowViewportRect: r
|
|
10584
10584
|
};
|
|
10585
|
-
}, ct(Ht)), PT =
|
|
10585
|
+
}, ct(Ht)), PT = Ye(
|
|
10586
10586
|
([
|
|
10587
10587
|
{ sizeRanges: e, sizes: t },
|
|
10588
10588
|
{ headerHeight: n, scrollTop: r },
|
|
@@ -10600,13 +10600,13 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10600
10600
|
const C = gT(v.sizeTree);
|
|
10601
10601
|
x && b !== null && w !== null && (g = b.scrollTop - w.offsetTop), g -= y, f({ ranges: C, scrollTop: g });
|
|
10602
10602
|
}
|
|
10603
|
-
), be(ee(d, Ne(il),
|
|
10603
|
+
), be(ee(d, Ne(il), pe(MT)), o), be(
|
|
10604
10604
|
ee(
|
|
10605
10605
|
s,
|
|
10606
10606
|
Be(d),
|
|
10607
10607
|
Ne(([, f]) => f !== void 0),
|
|
10608
10608
|
lt(),
|
|
10609
|
-
|
|
10609
|
+
pe(([, f]) => f.ranges)
|
|
10610
10610
|
),
|
|
10611
10611
|
e
|
|
10612
10612
|
), {
|
|
@@ -10619,13 +10619,13 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
|
|
|
10619
10619
|
function MT(e) {
|
|
10620
10620
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
10621
10621
|
}
|
|
10622
|
-
const OT =
|
|
10622
|
+
const OT = Ye(([{ topItemsIndexes: e }]) => {
|
|
10623
10623
|
const t = oe(0);
|
|
10624
10624
|
return be(
|
|
10625
10625
|
ee(
|
|
10626
10626
|
t,
|
|
10627
10627
|
Ne((n) => n >= 0),
|
|
10628
|
-
|
|
10628
|
+
pe((n) => Array.from({ length: n }).map((r, o) => o))
|
|
10629
10629
|
),
|
|
10630
10630
|
e
|
|
10631
10631
|
), { topItemCount: t };
|
|
@@ -10634,7 +10634,7 @@ function Ip(e) {
|
|
|
10634
10634
|
let t = !1, n;
|
|
10635
10635
|
return () => (t || (t = !0, n = e()), n);
|
|
10636
10636
|
}
|
|
10637
|
-
const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), LT =
|
|
10637
|
+
const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), LT = Ye(
|
|
10638
10638
|
([
|
|
10639
10639
|
{ deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
|
|
10640
10640
|
{ isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: a, scrollDirection: i },
|
|
@@ -10658,33 +10658,33 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10658
10658
|
Ne(([b]) => b !== 0),
|
|
10659
10659
|
Be(r, i, n, o, f, v),
|
|
10660
10660
|
Ne(([, b, w, y, , , C]) => !C && !y && b !== 0 && w === po),
|
|
10661
|
-
|
|
10661
|
+
pe(([[b], , , , , w]) => (w("Upward scrolling compensation", { amount: b }, Gt.DEBUG), b))
|
|
10662
10662
|
)
|
|
10663
10663
|
);
|
|
10664
10664
|
function x(b) {
|
|
10665
|
-
b > 0 ? (
|
|
10665
|
+
b > 0 ? (Oe(t, { behavior: "auto", top: -b }), Oe(e, 0)) : (Oe(e, 0), Oe(t, { behavior: "auto", top: -b }));
|
|
10666
10666
|
}
|
|
10667
10667
|
return Qe(ee(g, Be(e, s)), ([b, w, y]) => {
|
|
10668
|
-
y && DT() ?
|
|
10668
|
+
y && DT() ? Oe(e, w - b) : x(-b);
|
|
10669
10669
|
}), Qe(
|
|
10670
10670
|
ee(
|
|
10671
10671
|
Ct(Ft(s, !1), e, v),
|
|
10672
10672
|
Ne(([b, w, y]) => !b && !y && w !== 0),
|
|
10673
|
-
|
|
10673
|
+
pe(([b, w]) => w),
|
|
10674
10674
|
Nn(1)
|
|
10675
10675
|
),
|
|
10676
10676
|
x
|
|
10677
10677
|
), be(
|
|
10678
10678
|
ee(
|
|
10679
10679
|
p,
|
|
10680
|
-
|
|
10680
|
+
pe((b) => ({ top: -b }))
|
|
10681
10681
|
),
|
|
10682
10682
|
t
|
|
10683
10683
|
), Qe(
|
|
10684
10684
|
ee(
|
|
10685
10685
|
c,
|
|
10686
10686
|
Be(m, d),
|
|
10687
|
-
|
|
10687
|
+
pe(([b, { groupIndices: w, lastSize: y, sizeTree: C }, S]) => {
|
|
10688
10688
|
function T(E) {
|
|
10689
10689
|
return E * (y + S);
|
|
10690
10690
|
}
|
|
@@ -10704,16 +10704,16 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10704
10704
|
})
|
|
10705
10705
|
),
|
|
10706
10706
|
(b) => {
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10707
|
+
Oe(e, b), requestAnimationFrame(() => {
|
|
10708
|
+
Oe(t, { top: b }), requestAnimationFrame(() => {
|
|
10709
|
+
Oe(e, 0), Oe(v, !1);
|
|
10710
10710
|
});
|
|
10711
10711
|
});
|
|
10712
10712
|
}
|
|
10713
10713
|
), { deviation: e };
|
|
10714
10714
|
},
|
|
10715
10715
|
ct(Ht, jo, mr, Rn, Un, ul)
|
|
10716
|
-
), $T =
|
|
10716
|
+
), $T = Ye(
|
|
10717
10717
|
([
|
|
10718
10718
|
e,
|
|
10719
10719
|
t,
|
|
@@ -10752,7 +10752,7 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10752
10752
|
Un,
|
|
10753
10753
|
Ep
|
|
10754
10754
|
)
|
|
10755
|
-
), Np =
|
|
10755
|
+
), Np = Ye(
|
|
10756
10756
|
([
|
|
10757
10757
|
{
|
|
10758
10758
|
data: e,
|
|
@@ -10781,7 +10781,7 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10781
10781
|
]) => (be(C.rangeChanged, _.scrollSeekRangeChanged), be(
|
|
10782
10782
|
ee(
|
|
10783
10783
|
_.windowViewportRect,
|
|
10784
|
-
|
|
10784
|
+
pe((D) => D.visibleHeight)
|
|
10785
10785
|
),
|
|
10786
10786
|
g.viewportHeight
|
|
10787
10787
|
), {
|
|
@@ -10843,22 +10843,22 @@ const Wo = typeof document < "u" ? M.useLayoutEffect : M.useEffect;
|
|
|
10843
10843
|
function Ap(e, t, n) {
|
|
10844
10844
|
const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), s = Object.keys(t.methods || {}), a = Object.keys(t.events || {}), i = M.createContext({});
|
|
10845
10845
|
function l(x, b) {
|
|
10846
|
-
x.propsReady &&
|
|
10846
|
+
x.propsReady && Oe(x.propsReady, !1);
|
|
10847
10847
|
for (const w of r) {
|
|
10848
10848
|
const y = x[t.required[w]];
|
|
10849
|
-
|
|
10849
|
+
Oe(y, b[w]);
|
|
10850
10850
|
}
|
|
10851
10851
|
for (const w of o)
|
|
10852
10852
|
if (w in b) {
|
|
10853
10853
|
const y = x[t.optional[w]];
|
|
10854
|
-
|
|
10854
|
+
Oe(y, b[w]);
|
|
10855
10855
|
}
|
|
10856
|
-
x.propsReady &&
|
|
10856
|
+
x.propsReady && Oe(x.propsReady, !0);
|
|
10857
10857
|
}
|
|
10858
10858
|
function c(x) {
|
|
10859
10859
|
return s.reduce((b, w) => (b[w] = (y) => {
|
|
10860
10860
|
const C = x[t.methods[w]];
|
|
10861
|
-
|
|
10861
|
+
Oe(C, y);
|
|
10862
10862
|
}, b), {});
|
|
10863
10863
|
}
|
|
10864
10864
|
function d(x) {
|
|
@@ -10883,7 +10883,7 @@ function Ap(e, t, n) {
|
|
|
10883
10883
|
const b = M.useContext(i);
|
|
10884
10884
|
return M.useCallback(
|
|
10885
10885
|
(w) => {
|
|
10886
|
-
|
|
10886
|
+
Oe(b[x], w);
|
|
10887
10887
|
},
|
|
10888
10888
|
[b, x]
|
|
10889
10889
|
);
|
|
@@ -10983,11 +10983,11 @@ const Da = "-webkit-sticky", ou = "sticky", gl = Ip(() => {
|
|
|
10983
10983
|
function xl(e) {
|
|
10984
10984
|
return e;
|
|
10985
10985
|
}
|
|
10986
|
-
const zT = /* @__PURE__ */
|
|
10986
|
+
const zT = /* @__PURE__ */ Ye(() => {
|
|
10987
10987
|
const e = oe((i) => `Item ${i}`), t = oe((i) => `Group ${i}`), n = oe({}), r = oe(xl), o = oe("div"), s = oe(Hr), a = (i, l = null) => Ft(
|
|
10988
10988
|
ee(
|
|
10989
10989
|
n,
|
|
10990
|
-
|
|
10990
|
+
pe((c) => c[i]),
|
|
10991
10991
|
lt()
|
|
10992
10992
|
),
|
|
10993
10993
|
l
|
|
@@ -11009,7 +11009,7 @@ const zT = /* @__PURE__ */ Xe(() => {
|
|
|
11009
11009
|
ScrollSeekPlaceholder: a("ScrollSeekPlaceholder"),
|
|
11010
11010
|
TopItemListComponent: a("TopItemList")
|
|
11011
11011
|
};
|
|
11012
|
-
}), HT = /* @__PURE__ */
|
|
11012
|
+
}), HT = /* @__PURE__ */ Ye(
|
|
11013
11013
|
([e, t]) => ({ ...e, ...t }),
|
|
11014
11014
|
ct(Np, zT)
|
|
11015
11015
|
), UT = ({ height: e }) => /* @__PURE__ */ u.jsx("div", { style: { height: e } }), WT = { overflowAnchor: "none", position: gl(), zIndex: 1 }, Op = { overflowAnchor: "none" }, VT = { ...Op, display: "inline-block", height: "100%" }, su = /* @__PURE__ */ M.memo(function({ showTopList: e = !1 }) {
|
|
@@ -11290,7 +11290,7 @@ const ZT = ({ children: e }) => {
|
|
|
11290
11290
|
}
|
|
11291
11291
|
},
|
|
11292
11292
|
tC
|
|
11293
|
-
), rC = /* @__PURE__ */ Dp({ useEmitter: vl, useEmitterValue: je, usePublisher: on }), oC = /* @__PURE__ */ Lp({ useEmitter: vl, useEmitterValue: je, usePublisher: on }), sC = nC, aC = /* @__PURE__ */
|
|
11293
|
+
), rC = /* @__PURE__ */ Dp({ useEmitter: vl, useEmitterValue: je, usePublisher: on }), oC = /* @__PURE__ */ Lp({ useEmitter: vl, useEmitterValue: je, usePublisher: on }), sC = nC, aC = /* @__PURE__ */ Ye(() => {
|
|
11294
11294
|
const e = oe((c) => /* @__PURE__ */ u.jsxs("td", { children: [
|
|
11295
11295
|
"Item $",
|
|
11296
11296
|
c
|
|
@@ -11300,7 +11300,7 @@ const ZT = ({ children: e }) => {
|
|
|
11300
11300
|
] })), r = oe(null), o = oe(null), s = oe({}), a = oe(xl), i = oe(Hr), l = (c, d = null) => Ft(
|
|
11301
11301
|
ee(
|
|
11302
11302
|
s,
|
|
11303
|
-
|
|
11303
|
+
pe((p) => p[c]),
|
|
11304
11304
|
lt()
|
|
11305
11305
|
),
|
|
11306
11306
|
d
|
|
@@ -11360,7 +11360,7 @@ function Vo(e, t) {
|
|
|
11360
11360
|
function cC(e, t) {
|
|
11361
11361
|
return e && e.column === t.column && e.row === t.row;
|
|
11362
11362
|
}
|
|
11363
|
-
const uC = /* @__PURE__ */
|
|
11363
|
+
const uC = /* @__PURE__ */ Ye(
|
|
11364
11364
|
([
|
|
11365
11365
|
{ increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
|
|
11366
11366
|
{ footerHeight: o, headerHeight: s, scrollBy: a, scrollContainerState: i, scrollTo: l, scrollTop: c, smoothScrollTargetReached: d, viewportHeight: p },
|
|
@@ -11378,7 +11378,7 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11378
11378
|
Ne(([$, G]) => !!G)
|
|
11379
11379
|
),
|
|
11380
11380
|
() => {
|
|
11381
|
-
|
|
11381
|
+
Oe(K, !1);
|
|
11382
11382
|
}
|
|
11383
11383
|
), Qe(
|
|
11384
11384
|
ee(
|
|
@@ -11386,10 +11386,10 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11386
11386
|
Ne(([$, G, Z, X, , B]) => $ && !G && Z.height !== 0 && X.height !== 0 && !B)
|
|
11387
11387
|
),
|
|
11388
11388
|
([, , , , $]) => {
|
|
11389
|
-
|
|
11390
|
-
|
|
11389
|
+
Oe(J, !0), fl(1, () => {
|
|
11390
|
+
Oe(F, $);
|
|
11391
11391
|
}), fn(ee(c), () => {
|
|
11392
|
-
|
|
11392
|
+
Oe(t, [0, 0]), Oe(K, !0);
|
|
11393
11393
|
});
|
|
11394
11394
|
}
|
|
11395
11395
|
), be(
|
|
@@ -11406,14 +11406,14 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11406
11406
|
Ne(([, $]) => $ != null)
|
|
11407
11407
|
),
|
|
11408
11408
|
([, $]) => {
|
|
11409
|
-
$ && (
|
|
11410
|
-
|
|
11411
|
-
}),
|
|
11409
|
+
$ && (Oe(_, $.viewport), Oe(D, $.item), Oe(U, $.gap), $.scrollTop > 0 && (Oe(j, !0), fn(ee(c, ir(1)), (G) => {
|
|
11410
|
+
Oe(j, !1);
|
|
11411
|
+
}), Oe(l, { top: $.scrollTop })));
|
|
11412
11412
|
}
|
|
11413
11413
|
), be(
|
|
11414
11414
|
ee(
|
|
11415
11415
|
_,
|
|
11416
|
-
|
|
11416
|
+
pe(({ height: $ }) => $)
|
|
11417
11417
|
),
|
|
11418
11418
|
p
|
|
11419
11419
|
), be(
|
|
@@ -11424,7 +11424,7 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11424
11424
|
Re(U, ($, G) => $ && $.column === G.column && $.row === G.row),
|
|
11425
11425
|
Re(c)
|
|
11426
11426
|
),
|
|
11427
|
-
|
|
11427
|
+
pe(([$, G, Z, X]) => ({
|
|
11428
11428
|
gap: Z,
|
|
11429
11429
|
item: G,
|
|
11430
11430
|
scrollTop: X,
|
|
@@ -11447,7 +11447,7 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11447
11447
|
Re(k)
|
|
11448
11448
|
),
|
|
11449
11449
|
Ne(([, , , , , , , $]) => !$),
|
|
11450
|
-
|
|
11450
|
+
pe(
|
|
11451
11451
|
([
|
|
11452
11452
|
$,
|
|
11453
11453
|
[G, Z],
|
|
@@ -11470,8 +11470,8 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11470
11470
|
const Ve = $p(Et, xt, Pe);
|
|
11471
11471
|
let Ue, Ke;
|
|
11472
11472
|
Se ? G === 0 && Z === 0 && fe > 0 ? (Ue = 0, Ke = fe - 1) : (Ue = Ve * ys((G + Ee) / (st + Ee)), Ke = Ve * iu((Z + Ee) / (st + Ee)) - 1, Ke = La($ - 1, Qr(Ke, Ve - 1)), Ue = La(Ke, Qr(0, Ue))) : (Ue = 0, Ke = -1);
|
|
11473
|
-
const
|
|
11474
|
-
return { bottom: He, itemHeight: st, items:
|
|
11473
|
+
const De = cu(Ue, Ke, se), { bottom: He, top: mt } = uu(ae, X, B, De), Mt = iu($ / Ve), at = Mt * st + (Mt - 1) * Ee - He;
|
|
11474
|
+
return { bottom: He, itemHeight: st, items: De, itemWidth: xt, offsetBottom: at, offsetTop: mt, top: mt };
|
|
11475
11475
|
}
|
|
11476
11476
|
)
|
|
11477
11477
|
),
|
|
@@ -11480,14 +11480,14 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11480
11480
|
ee(
|
|
11481
11481
|
N,
|
|
11482
11482
|
Ne(($) => $ !== null),
|
|
11483
|
-
|
|
11483
|
+
pe(($) => $.length)
|
|
11484
11484
|
),
|
|
11485
11485
|
T
|
|
11486
11486
|
), be(
|
|
11487
11487
|
ee(
|
|
11488
11488
|
Ct(_, D, R, U),
|
|
11489
11489
|
Ne(([$, G, { items: Z }]) => Z.length > 0 && G.height !== 0 && $.height !== 0),
|
|
11490
|
-
|
|
11490
|
+
pe(([$, G, { items: Z }, X]) => {
|
|
11491
11491
|
const { bottom: B, top: ae } = uu($, X, G, Z);
|
|
11492
11492
|
return [ae, B];
|
|
11493
11493
|
}),
|
|
@@ -11500,7 +11500,7 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11500
11500
|
ee(
|
|
11501
11501
|
c,
|
|
11502
11502
|
Be(P),
|
|
11503
|
-
|
|
11503
|
+
pe(([$, G]) => G || $ !== 0)
|
|
11504
11504
|
),
|
|
11505
11505
|
P
|
|
11506
11506
|
);
|
|
@@ -11513,7 +11513,7 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11513
11513
|
const X = $.items[$.items.length - 1].index === G - 1;
|
|
11514
11514
|
return (Z || $.bottom > 0 && $.itemHeight > 0 && $.offsetBottom === 0 && $.items.length === G) && X;
|
|
11515
11515
|
}),
|
|
11516
|
-
|
|
11516
|
+
pe(([[, $]]) => $ - 1),
|
|
11517
11517
|
lt()
|
|
11518
11518
|
)
|
|
11519
11519
|
), Y = en(
|
|
@@ -11528,7 +11528,7 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11528
11528
|
Re(R),
|
|
11529
11529
|
Be(j),
|
|
11530
11530
|
Ne(([{ items: $ }, G]) => $.length > 0 && !G),
|
|
11531
|
-
|
|
11531
|
+
pe(([{ items: $ }]) => ({
|
|
11532
11532
|
endIndex: $[$.length - 1].index,
|
|
11533
11533
|
startIndex: $[0].index
|
|
11534
11534
|
})),
|
|
@@ -11540,7 +11540,7 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11540
11540
|
ee(
|
|
11541
11541
|
F,
|
|
11542
11542
|
Be(_, D, T, U),
|
|
11543
|
-
|
|
11543
|
+
pe(([$, G, Z, X, B]) => {
|
|
11544
11544
|
const ae = yp($), { align: se, behavior: fe, offset: Se } = ae;
|
|
11545
11545
|
let _e = ae.index;
|
|
11546
11546
|
_e === "LAST" && (_e = X - 1), _e = Qr(0, _e, La(X - 1, _e));
|
|
@@ -11553,14 +11553,14 @@ const uC = /* @__PURE__ */ Xe(
|
|
|
11553
11553
|
const W = Ft(
|
|
11554
11554
|
ee(
|
|
11555
11555
|
R,
|
|
11556
|
-
|
|
11556
|
+
pe(($) => $.offsetBottom + $.bottom)
|
|
11557
11557
|
),
|
|
11558
11558
|
0
|
|
11559
11559
|
);
|
|
11560
11560
|
return be(
|
|
11561
11561
|
ee(
|
|
11562
11562
|
C,
|
|
11563
|
-
|
|
11563
|
+
pe(($) => ({ height: $.visibleHeight, width: $.visibleWidth }))
|
|
11564
11564
|
),
|
|
11565
11565
|
_
|
|
11566
11566
|
), {
|
|
@@ -11621,11 +11621,11 @@ function ui(e, t, n, r) {
|
|
|
11621
11621
|
const o = $p(e.width, n.width, t.column), s = ys(r / o), a = s * n.height + Qr(0, s - 1) * t.row;
|
|
11622
11622
|
return a > 0 ? a + t.row : a;
|
|
11623
11623
|
}
|
|
11624
|
-
const dC = /* @__PURE__ */
|
|
11624
|
+
const dC = /* @__PURE__ */ Ye(() => {
|
|
11625
11625
|
const e = oe((p) => `Item ${p}`), t = oe({}), n = oe(null), r = oe("virtuoso-grid-item"), o = oe("virtuoso-grid-list"), s = oe(xl), a = oe("div"), i = oe(Hr), l = (p, m = null) => Ft(
|
|
11626
11626
|
ee(
|
|
11627
11627
|
t,
|
|
11628
|
-
|
|
11628
|
+
pe((f) => f[p]),
|
|
11629
11629
|
lt()
|
|
11630
11630
|
),
|
|
11631
11631
|
m
|
|
@@ -11648,7 +11648,7 @@ const dC = /* @__PURE__ */ Xe(() => {
|
|
|
11648
11648
|
scrollerRef: i,
|
|
11649
11649
|
ScrollSeekPlaceholder: l("ScrollSeekPlaceholder", "div")
|
|
11650
11650
|
};
|
|
11651
|
-
}), fC = /* @__PURE__ */
|
|
11651
|
+
}), fC = /* @__PURE__ */ Ye(
|
|
11652
11652
|
([e, t]) => ({ ...e, ...t }),
|
|
11653
11653
|
ct(uC, dC)
|
|
11654
11654
|
), pC = /* @__PURE__ */ M.memo(function() {
|
|
@@ -11805,7 +11805,7 @@ const dC = /* @__PURE__ */ Xe(() => {
|
|
|
11805
11805
|
function du(e, t, n) {
|
|
11806
11806
|
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Gt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
11807
11807
|
}
|
|
11808
|
-
var ta = "Dialog", [Bp,
|
|
11808
|
+
var ta = "Dialog", [Bp, vN] = xn(ta), [yC, vn] = Bp(ta), zp = (e) => {
|
|
11809
11809
|
const {
|
|
11810
11810
|
__scopeDialog: t,
|
|
11811
11811
|
children: n,
|
|
@@ -12010,7 +12010,7 @@ Qp.displayName = Zp;
|
|
|
12010
12010
|
function yl(e) {
|
|
12011
12011
|
return e ? "open" : "closed";
|
|
12012
12012
|
}
|
|
12013
|
-
var eh = "DialogTitleWarning", [
|
|
12013
|
+
var eh = "DialogTitleWarning", [wN, th] = Hw(eh, {
|
|
12014
12014
|
contentName: lr,
|
|
12015
12015
|
titleName: bl,
|
|
12016
12016
|
docsSlug: "dialog"
|
|
@@ -12210,7 +12210,7 @@ function Rl() {
|
|
|
12210
12210
|
};
|
|
12211
12211
|
}
|
|
12212
12212
|
function $C({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
12213
|
-
const [s, a] =
|
|
12213
|
+
const [s, a] = he(!1), [i, l] = he(null), [c, d] = he(null), { toast: p } = Rl(), m = M.useCallback(async () => {
|
|
12214
12214
|
if (n) {
|
|
12215
12215
|
a(!0), d(null), l(null);
|
|
12216
12216
|
try {
|
|
@@ -12223,7 +12223,7 @@ function $C({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
12223
12223
|
}
|
|
12224
12224
|
}
|
|
12225
12225
|
}, [n]);
|
|
12226
|
-
|
|
12226
|
+
Ze(() => {
|
|
12227
12227
|
e && n && m();
|
|
12228
12228
|
}, [e, n, m]);
|
|
12229
12229
|
const f = async () => {
|
|
@@ -13872,7 +13872,7 @@ function Mo({
|
|
|
13872
13872
|
allowHtml: n = !1,
|
|
13873
13873
|
style: r
|
|
13874
13874
|
}) {
|
|
13875
|
-
const o =
|
|
13875
|
+
const o = Je(() => {
|
|
13876
13876
|
if (!e || typeof e != "string" || e.trim().length === 0)
|
|
13877
13877
|
return "";
|
|
13878
13878
|
try {
|
|
@@ -13884,7 +13884,7 @@ function Mo({
|
|
|
13884
13884
|
} catch (a) {
|
|
13885
13885
|
return console.error("[MarkdownContent] parse error", a), `<pre class="font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words">Error rendering markdown: ${String(a)}</pre>`;
|
|
13886
13886
|
}
|
|
13887
|
-
}, [e, n]), s =
|
|
13887
|
+
}, [e, n]), s = Je(() => {
|
|
13888
13888
|
const a = {
|
|
13889
13889
|
color: "currentColor",
|
|
13890
13890
|
...r
|
|
@@ -14060,7 +14060,7 @@ function sE({ artifact: e }) {
|
|
|
14060
14060
|
] });
|
|
14061
14061
|
}
|
|
14062
14062
|
function aE({ artifact: e, idx: t = 0 }) {
|
|
14063
|
-
const n =
|
|
14063
|
+
const n = Je(() => e ? (Array.isArray(e.plots) ? e.plots : []).map((o) => xw(o)).filter((o) => o !== null) : [], [e]);
|
|
14064
14064
|
return (e == null ? void 0 : e.type) === "research_task_info" ? /* @__PURE__ */ u.jsx(
|
|
14065
14065
|
sE,
|
|
14066
14066
|
{
|
|
@@ -14194,7 +14194,7 @@ function vh({ data: e }) {
|
|
|
14194
14194
|
return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: lE, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Nr(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Nr(e) });
|
|
14195
14195
|
}
|
|
14196
14196
|
function cE({ message: e, isStreaming: t = !1 }) {
|
|
14197
|
-
const n = e.name ?? "tool", r =
|
|
14197
|
+
const n = e.name ?? "tool", r = Je(() => {
|
|
14198
14198
|
const i = e.additionalKwargs ?? {};
|
|
14199
14199
|
return Array.isArray(i.toolProgress) ? [...i.toolProgress] : [];
|
|
14200
14200
|
}, [e]), s = r.some(
|
|
@@ -14235,8 +14235,8 @@ function cE({ message: e, isStreaming: t = !1 }) {
|
|
|
14235
14235
|
] }) : null;
|
|
14236
14236
|
}
|
|
14237
14237
|
function uE({ className: e }) {
|
|
14238
|
-
const [t, n] =
|
|
14239
|
-
return
|
|
14238
|
+
const [t, n] = he(0);
|
|
14239
|
+
return Ze(() => {
|
|
14240
14240
|
const r = setInterval(() => n((o) => (o + 1) % 4), 500);
|
|
14241
14241
|
return () => clearInterval(r);
|
|
14242
14242
|
}, []), /* @__PURE__ */ u.jsxs(
|
|
@@ -14337,7 +14337,7 @@ function fE({ message: e, viewMode: t, isStreaming: n = !1 }) {
|
|
|
14337
14337
|
] });
|
|
14338
14338
|
}
|
|
14339
14339
|
function pE(e) {
|
|
14340
|
-
const { allowFileOpen: t, currentThreadId: n } = e, { toast: r } = Rl(), [o, s] =
|
|
14340
|
+
const { allowFileOpen: t, currentThreadId: n } = e, { toast: r } = Rl(), [o, s] = he({}), [a, i] = he(null), [l, c] = he(!1), d = ge(() => {
|
|
14341
14341
|
c(!1), i(null);
|
|
14342
14342
|
}, []), p = ge((f) => {
|
|
14343
14343
|
i(f), c(!0);
|
|
@@ -14409,7 +14409,7 @@ function pE(e) {
|
|
|
14409
14409
|
};
|
|
14410
14410
|
}
|
|
14411
14411
|
function hE(e, t) {
|
|
14412
|
-
return
|
|
14412
|
+
return Je(() => {
|
|
14413
14413
|
if (t)
|
|
14414
14414
|
return {
|
|
14415
14415
|
contentParts: [],
|
|
@@ -14464,7 +14464,7 @@ const mE = {
|
|
|
14464
14464
|
checkpointIndex: b,
|
|
14465
14465
|
onSelectCheckpoint: w
|
|
14466
14466
|
}) {
|
|
14467
|
-
const y = wh(t, n), C = t.role === "default_message", T = !!t.__syntheticStreaming, E = b ?? mE, R = !C && "checkpointId" in t ? t.checkpointId ?? null : null, { attemptCount: _, attemptIndex: D, attempts: F } =
|
|
14467
|
+
const y = wh(t, n), C = t.role === "default_message", T = !!t.__syntheticStreaming, E = b ?? mE, R = !C && "checkpointId" in t ? t.checkpointId ?? null : null, { attemptCount: _, attemptIndex: D, attempts: F } = Je(
|
|
14468
14468
|
() => ox(t.id, R, E),
|
|
14469
14469
|
[t.id, R, E]
|
|
14470
14470
|
);
|
|
@@ -14507,30 +14507,7 @@ const mE = {
|
|
|
14507
14507
|
);
|
|
14508
14508
|
});
|
|
14509
14509
|
bh.displayName = "MessageRow";
|
|
14510
|
-
function gE(
|
|
14511
|
-
const [r, o] = pe(e), s = Me(e), a = Me(Date.now()), i = Me(null);
|
|
14512
|
-
return s.current = e, Ye(() => {
|
|
14513
|
-
if (!n || t <= 0) {
|
|
14514
|
-
i.current && (clearTimeout(i.current), i.current = null), a.current = Date.now(), o(e);
|
|
14515
|
-
return;
|
|
14516
|
-
}
|
|
14517
|
-
const c = Date.now() - a.current, d = () => {
|
|
14518
|
-
a.current = Date.now(), o(s.current);
|
|
14519
|
-
};
|
|
14520
|
-
if (c >= t) {
|
|
14521
|
-
d();
|
|
14522
|
-
return;
|
|
14523
|
-
}
|
|
14524
|
-
return i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
14525
|
-
i.current = null, d();
|
|
14526
|
-
}, t - c), () => {
|
|
14527
|
-
i.current && (clearTimeout(i.current), i.current = null);
|
|
14528
|
-
};
|
|
14529
|
-
}, [e, t, n]), Ye(() => () => {
|
|
14530
|
-
i.current && (clearTimeout(i.current), i.current = null);
|
|
14531
|
-
}, []), r;
|
|
14532
|
-
}
|
|
14533
|
-
function xE({
|
|
14510
|
+
function gE({
|
|
14534
14511
|
message: e,
|
|
14535
14512
|
isToolMessage: t,
|
|
14536
14513
|
showToolMessages: n,
|
|
@@ -14565,17 +14542,22 @@ function xE({
|
|
|
14565
14542
|
] }), []), V = ge(({ part: N, i: U }) => {
|
|
14566
14543
|
if (N.type === "text") {
|
|
14567
14544
|
const L = N.text ?? "", O = L.trim(), j = Pi(O);
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14578
|
-
|
|
14545
|
+
if (j && w !== "tool")
|
|
14546
|
+
return /* @__PURE__ */ u.jsx(vh, { data: j }, U);
|
|
14547
|
+
if (w === "user" && y && O.length > C)
|
|
14548
|
+
return /* @__PURE__ */ u.jsx(
|
|
14549
|
+
dE,
|
|
14550
|
+
{
|
|
14551
|
+
text: O,
|
|
14552
|
+
expanded: S,
|
|
14553
|
+
onExpandedChange: T,
|
|
14554
|
+
previewLength: C,
|
|
14555
|
+
isCompact: E
|
|
14556
|
+
},
|
|
14557
|
+
U
|
|
14558
|
+
);
|
|
14559
|
+
const k = d ? xE(L, d) : L;
|
|
14560
|
+
return /* @__PURE__ */ u.jsx(Mo, { content: k, allowHtml: !1 }, U);
|
|
14579
14561
|
}
|
|
14580
14562
|
if (N.type === "image_url") {
|
|
14581
14563
|
const L = N;
|
|
@@ -14657,15 +14639,31 @@ function xE({
|
|
|
14657
14639
|
e.id
|
|
14658
14640
|
) : null;
|
|
14659
14641
|
if (!m) {
|
|
14660
|
-
const N =
|
|
14642
|
+
const N = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: s.map((U, L) => /* @__PURE__ */ u.jsx(V, { part: U, i: L }, L)) });
|
|
14661
14643
|
return d ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
|
|
14662
|
-
|
|
14644
|
+
N,
|
|
14663
14645
|
/* @__PURE__ */ u.jsx(uE, { className: D })
|
|
14664
|
-
] }) :
|
|
14646
|
+
] }) : N;
|
|
14665
14647
|
}
|
|
14666
14648
|
return null;
|
|
14667
14649
|
}
|
|
14668
|
-
|
|
14650
|
+
function xE(e, t) {
|
|
14651
|
+
if (!t || !e) return e;
|
|
14652
|
+
let n = e;
|
|
14653
|
+
return n = vE(n), n = wE(n), n;
|
|
14654
|
+
}
|
|
14655
|
+
function vE(e) {
|
|
14656
|
+
const t = e.match(/\[[^\]]*\]\([^)]*$/);
|
|
14657
|
+
if (t && typeof t.index == "number")
|
|
14658
|
+
return e.slice(0, t.index);
|
|
14659
|
+
const n = e.match(/\[[^\]]*$/);
|
|
14660
|
+
return n && typeof n.index == "number" ? e.slice(0, n.index) : e;
|
|
14661
|
+
}
|
|
14662
|
+
function wE(e) {
|
|
14663
|
+
const t = e.match(/`[^`]*$/);
|
|
14664
|
+
return t && typeof t.index == "number" ? e.slice(0, t.index) : e;
|
|
14665
|
+
}
|
|
14666
|
+
const bE = mo(
|
|
14669
14667
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
14670
14668
|
{
|
|
14671
14669
|
variants: {
|
|
@@ -14681,10 +14679,10 @@ const vE = mo(
|
|
|
14681
14679
|
}
|
|
14682
14680
|
}
|
|
14683
14681
|
);
|
|
14684
|
-
function
|
|
14685
|
-
return /* @__PURE__ */ u.jsx("div", { className: ne(
|
|
14682
|
+
function yE({ className: e, variant: t, ...n }) {
|
|
14683
|
+
return /* @__PURE__ */ u.jsx("div", { className: ne(bE({ variant: t }), e), ...n });
|
|
14686
14684
|
}
|
|
14687
|
-
function
|
|
14685
|
+
function SE({
|
|
14688
14686
|
showTimestamp: e,
|
|
14689
14687
|
showAgentName: t,
|
|
14690
14688
|
isToolMessage: n,
|
|
@@ -14725,7 +14723,7 @@ function bE({
|
|
|
14725
14723
|
s,
|
|
14726
14724
|
t && o && /* @__PURE__ */ u.jsx("span", { className: ne("font-medium", l ? "text-xs" : "text-sm"), children: o }),
|
|
14727
14725
|
n && /* @__PURE__ */ u.jsxs(
|
|
14728
|
-
|
|
14726
|
+
yE,
|
|
14729
14727
|
{
|
|
14730
14728
|
variant: "outline",
|
|
14731
14729
|
className: ne(
|
|
@@ -14875,13 +14873,13 @@ const Al = Pg(function({
|
|
|
14875
14873
|
onSelectCheckpoint: E,
|
|
14876
14874
|
attemptMetas: R = []
|
|
14877
14875
|
}) {
|
|
14878
|
-
const [_, D] =
|
|
14876
|
+
const [_, D] = he(!1), [F, V] = he("preview"), [H, N] = he(!1), { currentThreadId: U } = To(), { respondToInterrupt: L } = Ds(), O = l === "phone" || l === "half-screen", j = t.role, k = j === "tool", K = Je(() => t.role === "default_message" ? t : null, [t]), J = !!K, A = !(r && j !== "user"), {
|
|
14879
14877
|
uploadingFiles: P,
|
|
14880
14878
|
handleFileClick: q,
|
|
14881
14879
|
fileViewerOpen: Y,
|
|
14882
14880
|
currentFileInfo: re,
|
|
14883
14881
|
closeFileViewer: W
|
|
14884
|
-
} = pE({ allowFileOpen: A, currentThreadId: U }), $ =
|
|
14882
|
+
} = pE({ allowFileOpen: A, currentThreadId: U }), $ = Je(() => {
|
|
14885
14883
|
switch (j) {
|
|
14886
14884
|
case "user":
|
|
14887
14885
|
return "text-[hsl(var(--chat-bubble-user-text))]";
|
|
@@ -14949,7 +14947,7 @@ const Al = Pg(function({
|
|
|
14949
14947
|
default:
|
|
14950
14948
|
return /* @__PURE__ */ u.jsx(xa, { className: Ie });
|
|
14951
14949
|
}
|
|
14952
|
-
}, [O, $, j]),
|
|
14950
|
+
}, [O, $, j]), De = ge(() => {
|
|
14953
14951
|
const ce = "group relative mb-4 flex w-full";
|
|
14954
14952
|
switch (j) {
|
|
14955
14953
|
case "user":
|
|
@@ -15035,7 +15033,7 @@ const Al = Pg(function({
|
|
|
15035
15033
|
C == null || C();
|
|
15036
15034
|
}
|
|
15037
15035
|
}, [w, C, y, L]), at = /* @__PURE__ */ u.jsx(
|
|
15038
|
-
|
|
15036
|
+
gE,
|
|
15039
15037
|
{
|
|
15040
15038
|
message: t,
|
|
15041
15039
|
isToolMessage: k,
|
|
@@ -15065,12 +15063,12 @@ const Al = Pg(function({
|
|
|
15065
15063
|
activeInterruptValue: st,
|
|
15066
15064
|
iconForeground: $
|
|
15067
15065
|
}
|
|
15068
|
-
), Pt =
|
|
15066
|
+
), Pt = Je(() => K ? "Assistant" : pw(t), [K, t]), kt = Ke(), vt = j === "user" && (S ?? 1) > 1 && typeof E == "function", St = (R == null ? void 0 : R.length) ?? 0, gt = St > 0 && T < St - 1 ? R[T + 1] : void 0, Tt = St > 0 && T > 0 ? R[T - 1] : void 0, tn = ge(() => {
|
|
15069
15067
|
!gt || !E || E(gt.id, void 0, !!gt.isLatestAttempt);
|
|
15070
15068
|
}, [gt, E]), At = ge(() => {
|
|
15071
15069
|
!Tt || !E || E(Tt.id, void 0, !!Tt.isLatestAttempt);
|
|
15072
15070
|
}, [Tt, E]);
|
|
15073
|
-
return k && !p ? null : J && K ? /* @__PURE__ */ u.jsx("div", { className: ne(
|
|
15071
|
+
return k && !p ? null : J && K ? /* @__PURE__ */ u.jsx("div", { className: ne(De(), m.container), children: /* @__PURE__ */ u.jsxs("div", { className: ne(He(), m.content), children: [
|
|
15074
15072
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 mb-2 pb-2 border-b border-current/10", children: [
|
|
15075
15073
|
/* @__PURE__ */ u.jsx(xa, { className: ne("h-4 w-4", $) }),
|
|
15076
15074
|
i && /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Assistant" })
|
|
@@ -15083,9 +15081,9 @@ const Al = Pg(function({
|
|
|
15083
15081
|
}
|
|
15084
15082
|
)
|
|
15085
15083
|
] }) }) : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
15086
|
-
/* @__PURE__ */ u.jsx("div", { className: ne(
|
|
15084
|
+
/* @__PURE__ */ u.jsx("div", { className: ne(De(), m.container), children: /* @__PURE__ */ u.jsxs("div", { className: ne(He(), m.content), children: [
|
|
15087
15085
|
/* @__PURE__ */ u.jsx(
|
|
15088
|
-
|
|
15086
|
+
SE,
|
|
15089
15087
|
{
|
|
15090
15088
|
showTimestamp: a,
|
|
15091
15089
|
showAgentName: i,
|
|
@@ -15228,9 +15226,9 @@ const yh = M.forwardRef(({
|
|
|
15228
15226
|
createSyntheticThinkingMessage: D = !0,
|
|
15229
15227
|
forceSyntheticThinking: F = !1
|
|
15230
15228
|
}, V) => {
|
|
15231
|
-
const H =
|
|
15229
|
+
const H = Fe(null), N = Fe(null), U = Fe(!1), L = Fe(!1), [O, j] = he(!0), k = Je(() => w ? e.some((B) => B.role === "default_message" ? !1 : Array.isArray(B == null ? void 0 : B.content) && B.content.some(
|
|
15232
15230
|
(ae) => ae && ae.type === "interrupt" && (ae.id ?? ae.interrupt_id) === w.id
|
|
15233
|
-
)) : !1, [w, e]), K =
|
|
15231
|
+
)) : !1, [w, e]), K = Je(() => {
|
|
15234
15232
|
if (!w || k)
|
|
15235
15233
|
return null;
|
|
15236
15234
|
const B = w.id && String(w.id).trim() ? String(w.id).trim() : "pending-interrupt";
|
|
@@ -15253,7 +15251,7 @@ const yh = M.forwardRef(({
|
|
|
15253
15251
|
}
|
|
15254
15252
|
]
|
|
15255
15253
|
};
|
|
15256
|
-
}, [w, k]), J =
|
|
15254
|
+
}, [w, k]), J = Je(() => K ? [...e, K] : e, [e, K]), A = Je(() => {
|
|
15257
15255
|
const B = n && J.some((se) => se.id === n);
|
|
15258
15256
|
return D && (t || F) && !B && J.length > 0 ? [
|
|
15259
15257
|
...J,
|
|
@@ -15265,9 +15263,9 @@ const yh = M.forwardRef(({
|
|
|
15265
15263
|
__syntheticStreaming: !0
|
|
15266
15264
|
}
|
|
15267
15265
|
] : J;
|
|
15268
|
-
}, [J, t, n, D, F]), P =
|
|
15266
|
+
}, [J, t, n, D, F]), P = Je(() => T ? A : A.filter((B) => (B == null ? void 0 : B.role) !== "tool"), [A, T]), q = ge((B) => {
|
|
15269
15267
|
j(B), x && x(!B), b && b(B);
|
|
15270
|
-
}, [x, b]), Y =
|
|
15268
|
+
}, [x, b]), Y = Je(() => {
|
|
15271
15269
|
if (i)
|
|
15272
15270
|
return async () => {
|
|
15273
15271
|
if (!U.current) {
|
|
@@ -15279,7 +15277,7 @@ const yh = M.forwardRef(({
|
|
|
15279
15277
|
}
|
|
15280
15278
|
}
|
|
15281
15279
|
};
|
|
15282
|
-
}, [i]), re =
|
|
15280
|
+
}, [i]), re = Je(() => !v || g ? !1 : O ? "auto" : !1, [O, v, g]), W = Je(() => {
|
|
15283
15281
|
if (typeof f != "string") return null;
|
|
15284
15282
|
const B = f.trim();
|
|
15285
15283
|
return !B || P && P.length > 0 ? null : {
|
|
@@ -15306,7 +15304,7 @@ const yh = M.forwardRef(({
|
|
|
15306
15304
|
}
|
|
15307
15305
|
}
|
|
15308
15306
|
) }) }) : /* @__PURE__ */ u.jsx("div", { className: "flex h-full items-center justify-center py-8 text-center text-muted-foreground", children: f ?? "No messages yet. Start a conversation!" }), Z = P.length, X = Z > 0;
|
|
15309
|
-
return
|
|
15307
|
+
return Ze(() => {
|
|
15310
15308
|
var B, ae;
|
|
15311
15309
|
if (Z === 0) {
|
|
15312
15310
|
L.current = !1;
|
|
@@ -15423,49 +15421,49 @@ function to({
|
|
|
15423
15421
|
interrupt: D,
|
|
15424
15422
|
metadata: F,
|
|
15425
15423
|
checkpointIndex: V
|
|
15426
|
-
} = Ds(), { isStreaming: H, error: N, connectionState: U, submit: L, stop: O } = Pw(), j = w ?? b ?? null, k = (R == null ? void 0 : R.id) ?? null, K = (R == null ? void 0 : R.namespace) ?? null, J = (F == null ? void 0 : F.assemblingMessageId) ?? null, A = D, [P, q] =
|
|
15427
|
-
|
|
15424
|
+
} = Ds(), { isStreaming: H, error: N, connectionState: U, submit: L, stop: O } = Pw(), j = w ?? b ?? null, k = (R == null ? void 0 : R.id) ?? null, K = (R == null ? void 0 : R.namespace) ?? null, J = (F == null ? void 0 : F.assemblingMessageId) ?? null, A = D, [P, q] = he(!1), [Y, re] = he(!1);
|
|
15425
|
+
Ze(() => {
|
|
15428
15426
|
A || q(!1);
|
|
15429
15427
|
}, [A]);
|
|
15430
15428
|
const W = ge(() => {
|
|
15431
15429
|
q(!0);
|
|
15432
15430
|
}, []), $ = ge(() => {
|
|
15433
15431
|
q(!1);
|
|
15434
|
-
}, []), G = !!A || P, [Z, X] =
|
|
15432
|
+
}, []), G = !!A || P, [Z, X] = he(null), [B, ae] = he(""), [se, fe] = he(null), [Se, _e] = he(null), [Pe, Ee] = he([]), [st, xt] = he(0), [Et, Ve] = he(0), [Ue, Ke] = he(!1), [De, He] = he(null), [mt, Mt] = he(null), [at, Pt] = he(!1), [kt, vt] = he(null), St = Fe(!1), [gt, Tt] = he(() => bu.value), tn = Fe(gt), At = Fe(null), ce = ge((ie) => {
|
|
15435
15433
|
bu.value = ie, Tt(ie);
|
|
15436
|
-
}, []), [Ie, ut] =
|
|
15434
|
+
}, []), [Ie, ut] = he(!1), te = Fe(null), we = Fe(null), tt = Fe(null), xe = ge(() => {
|
|
15437
15435
|
we.current && (we.current.value = ""), tt.current && (tt.current.value = ""), xt((ie) => ie + 1), Ve((ie) => ie + 1);
|
|
15438
|
-
}, []),
|
|
15436
|
+
}, []), $e = ge(
|
|
15439
15437
|
(ie) => {
|
|
15440
15438
|
ce(ie);
|
|
15441
15439
|
},
|
|
15442
15440
|
[ce]
|
|
15443
|
-
), qe =
|
|
15444
|
-
|
|
15441
|
+
), qe = Fe(!1);
|
|
15442
|
+
Ze(() => {
|
|
15445
15443
|
qe.current && !H && (Ee([]), xe()), qe.current = H;
|
|
15446
|
-
}, [H, xe]),
|
|
15444
|
+
}, [H, xe]), Ze(() => {
|
|
15447
15445
|
H || re(!1);
|
|
15448
|
-
}, [H]),
|
|
15446
|
+
}, [H]), Ze(() => {
|
|
15449
15447
|
F != null && F.assemblingMessageId && re(!1);
|
|
15450
15448
|
}, [F == null ? void 0 : F.assemblingMessageId]);
|
|
15451
|
-
const [Rt, It] =
|
|
15452
|
-
|
|
15449
|
+
const [Rt, It] = he("desktop");
|
|
15450
|
+
Ze(() => {
|
|
15453
15451
|
const ie = () => {
|
|
15454
15452
|
const ue = window.innerWidth;
|
|
15455
15453
|
It(ue < 640 ? "phone" : ue < 1024 ? "tablet" : "desktop");
|
|
15456
15454
|
};
|
|
15457
15455
|
return ie(), window.addEventListener("resize", ie), () => window.removeEventListener("resize", ie);
|
|
15458
|
-
}, []),
|
|
15456
|
+
}, []), Ze(() => {
|
|
15459
15457
|
St.current = !1;
|
|
15460
|
-
}, [j]),
|
|
15458
|
+
}, [j]), Ze(() => {
|
|
15461
15459
|
tn.current = gt;
|
|
15462
|
-
}, [gt]),
|
|
15460
|
+
}, [gt]), Ze(() => {
|
|
15463
15461
|
if (!Z) {
|
|
15464
15462
|
At.current = null;
|
|
15465
15463
|
return;
|
|
15466
15464
|
}
|
|
15467
15465
|
At.current === null && (At.current = tn.current), ce(B ?? "");
|
|
15468
|
-
}, [B, Z, ce]),
|
|
15466
|
+
}, [B, Z, ce]), Ze(() => {
|
|
15469
15467
|
(async () => {
|
|
15470
15468
|
if (!x.baseUrl) {
|
|
15471
15469
|
vt(null);
|
|
@@ -15478,14 +15476,14 @@ function to({
|
|
|
15478
15476
|
console.warn("Failed to fetch default message:", ue), vt(null);
|
|
15479
15477
|
}
|
|
15480
15478
|
})();
|
|
15481
|
-
}, [x.baseUrl]),
|
|
15479
|
+
}, [x.baseUrl]), Ze(() => {
|
|
15482
15480
|
N && !at && (g == null || g(N));
|
|
15483
15481
|
}, [N, at, g]);
|
|
15484
15482
|
const jt = async (ie) => {
|
|
15485
15483
|
const ue = ie.trim();
|
|
15486
15484
|
if (!(!ue && Pe.length === 0))
|
|
15487
15485
|
try {
|
|
15488
|
-
const Ce = Z ? (se == null ? void 0 : se.checkpointId) ?? k ?? void 0 : k ?? void 0,
|
|
15486
|
+
const Ce = Z ? (se == null ? void 0 : se.checkpointId) ?? k ?? void 0 : k ?? void 0, Le = Z ? (se == null ? void 0 : se.checkpointNs) ?? K ?? void 0 : K ?? void 0;
|
|
15489
15487
|
await L(
|
|
15490
15488
|
{
|
|
15491
15489
|
text: ue || "",
|
|
@@ -15494,14 +15492,14 @@ function to({
|
|
|
15494
15492
|
},
|
|
15495
15493
|
{
|
|
15496
15494
|
checkpointId: Ce,
|
|
15497
|
-
checkpointNs:
|
|
15495
|
+
checkpointNs: Le,
|
|
15498
15496
|
edit: !!Z,
|
|
15499
15497
|
originalMessageId: Z ?? void 0
|
|
15500
15498
|
}
|
|
15501
15499
|
), f == null || f(ue), re(!0), ce(""), _e(null), Ee([]), xe(), X(null), ae(""), fe(null);
|
|
15502
15500
|
} catch (Ce) {
|
|
15503
|
-
const
|
|
15504
|
-
_e(
|
|
15501
|
+
const Le = (Ce == null ? void 0 : Ce.message) || "Failed to send message";
|
|
15502
|
+
_e(Le), g == null || g(Le), re(!1);
|
|
15505
15503
|
}
|
|
15506
15504
|
}, Ot = M.useCallback(
|
|
15507
15505
|
(ie, ue, Ce) => {
|
|
@@ -15518,7 +15516,7 @@ function to({
|
|
|
15518
15516
|
Ot(ie, ue, Ce);
|
|
15519
15517
|
},
|
|
15520
15518
|
[Ot]
|
|
15521
|
-
),
|
|
15519
|
+
), Xe = ge((ie) => {
|
|
15522
15520
|
let ue = null;
|
|
15523
15521
|
for (let ht = ie - 1; ht >= 0; ht--)
|
|
15524
15522
|
if (y[ht].role === "user") {
|
|
@@ -15547,7 +15545,7 @@ function to({
|
|
|
15547
15545
|
Ee((Ce) => [...Ce, ...ue]), ie.target.value = "";
|
|
15548
15546
|
}, nn = (ie) => {
|
|
15549
15547
|
Ee((ue) => {
|
|
15550
|
-
const Ce = ue.filter((
|
|
15548
|
+
const Ce = ue.filter((Le, it) => ie !== it);
|
|
15551
15549
|
return Ce.length === 0 && xe(), Ce;
|
|
15552
15550
|
});
|
|
15553
15551
|
}, I = async (ie) => {
|
|
@@ -15565,8 +15563,8 @@ function to({
|
|
|
15565
15563
|
const Ce = `Uploaded ${ue.name} - processing through chat stream`;
|
|
15566
15564
|
Mt(Ce);
|
|
15567
15565
|
} catch (Ce) {
|
|
15568
|
-
const
|
|
15569
|
-
console.error("Excel upload failed", Ce), He(
|
|
15566
|
+
const Le = Ce instanceof Error ? Ce.message : "Failed to upload Excel file";
|
|
15567
|
+
console.error("Excel upload failed", Ce), He(Le), g == null || g(Le);
|
|
15570
15568
|
} finally {
|
|
15571
15569
|
Ke(!1), ie.target.value = "", xe();
|
|
15572
15570
|
}
|
|
@@ -15577,15 +15575,15 @@ function to({
|
|
|
15577
15575
|
try {
|
|
15578
15576
|
if (!ie) {
|
|
15579
15577
|
await E(), requestAnimationFrame(() => {
|
|
15580
|
-
var
|
|
15581
|
-
(
|
|
15578
|
+
var Le;
|
|
15579
|
+
(Le = te.current) == null || Le.scrollToLatest();
|
|
15582
15580
|
});
|
|
15583
15581
|
return;
|
|
15584
15582
|
}
|
|
15585
|
-
const ue = _.find((
|
|
15583
|
+
const ue = _.find((Le) => Le.checkpointId === ie), Ce = (ue == null ? void 0 : ue.checkpointNs) ?? null;
|
|
15586
15584
|
await T(ie, Ce), requestAnimationFrame(() => {
|
|
15587
|
-
var
|
|
15588
|
-
(
|
|
15585
|
+
var Le;
|
|
15586
|
+
(Le = te.current) == null || Le.scrollToTop();
|
|
15589
15587
|
});
|
|
15590
15588
|
} finally {
|
|
15591
15589
|
ut(!1);
|
|
@@ -15633,7 +15631,7 @@ function to({
|
|
|
15633
15631
|
enableMessageEditing: c,
|
|
15634
15632
|
editingMessageId: Z,
|
|
15635
15633
|
onEdit: pt,
|
|
15636
|
-
onRegenerate:
|
|
15634
|
+
onRegenerate: Xe,
|
|
15637
15635
|
onCancelEdit: Ae,
|
|
15638
15636
|
emptyMessage: kt ?? void 0,
|
|
15639
15637
|
isNavigatingCheckpoint: Ie,
|
|
@@ -15728,7 +15726,7 @@ function to({
|
|
|
15728
15726
|
" Uploading Excel file..."
|
|
15729
15727
|
] }),
|
|
15730
15728
|
mt && !Ue && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: mt }),
|
|
15731
|
-
|
|
15729
|
+
De && !Ue && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: De })
|
|
15732
15730
|
] })
|
|
15733
15731
|
] }),
|
|
15734
15732
|
Se && /* @__PURE__ */ u.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: Se }),
|
|
@@ -15776,7 +15774,7 @@ function to({
|
|
|
15776
15774
|
initialValue: B,
|
|
15777
15775
|
editingMessageId: Z,
|
|
15778
15776
|
value: gt,
|
|
15779
|
-
onValueChange:
|
|
15777
|
+
onValueChange: $e,
|
|
15780
15778
|
placeholder: Z ? "Edit your message..." : t,
|
|
15781
15779
|
isStreaming: H,
|
|
15782
15780
|
disabled: G,
|
|
@@ -15791,25 +15789,25 @@ function to({
|
|
|
15791
15789
|
] })
|
|
15792
15790
|
] });
|
|
15793
15791
|
}
|
|
15794
|
-
var yu = 1,
|
|
15792
|
+
var yu = 1, TE = 0.9, CE = 0.8, EE = 0.17, Ba = 0.1, za = 0.999, kE = 0.9999, RE = 0.99, IE = /[\\\/_+.#"@\[\(\{&]/, NE = /[\\\/_+.#"@\[\(\{&]/g, AE = /[\s-]/, Sh = /[\s-]/g;
|
|
15795
15793
|
function di(e, t, n, r, o, s, a) {
|
|
15796
|
-
if (s === t.length) return o === e.length ? yu :
|
|
15794
|
+
if (s === t.length) return o === e.length ? yu : RE;
|
|
15797
15795
|
var i = `${o},${s}`;
|
|
15798
15796
|
if (a[i] !== void 0) return a[i];
|
|
15799
|
-
for (var l = r.charAt(s), c = n.indexOf(l, o), d = 0, p, m, f, v; c >= 0; ) p = di(e, t, n, r, c + 1, s + 1, a), p > d && (c === o ? p *= yu :
|
|
15797
|
+
for (var l = r.charAt(s), c = n.indexOf(l, o), d = 0, p, m, f, v; c >= 0; ) p = di(e, t, n, r, c + 1, s + 1, a), p > d && (c === o ? p *= yu : IE.test(e.charAt(c - 1)) ? (p *= CE, f = e.slice(o, c - 1).match(NE), f && o > 0 && (p *= Math.pow(za, f.length))) : AE.test(e.charAt(c - 1)) ? (p *= TE, v = e.slice(o, c - 1).match(Sh), v && o > 0 && (p *= Math.pow(za, v.length))) : (p *= EE, o > 0 && (p *= Math.pow(za, c - o))), e.charAt(c) !== t.charAt(s) && (p *= kE)), (p < Ba && n.charAt(c - 1) === r.charAt(s + 1) || r.charAt(s + 1) === r.charAt(s) && n.charAt(c - 1) !== r.charAt(s)) && (m = di(e, t, n, r, c + 1, s + 2, a), m * Ba > p && (p = m * Ba)), p > d && (d = p), c = n.indexOf(l, c + 1);
|
|
15800
15798
|
return a[i] = d, d;
|
|
15801
15799
|
}
|
|
15802
15800
|
function Su(e) {
|
|
15803
15801
|
return e.toLowerCase().replace(Sh, " ");
|
|
15804
15802
|
}
|
|
15805
|
-
function
|
|
15803
|
+
function jE(e, t, n) {
|
|
15806
15804
|
return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, di(e, t, Su(e), Su(t), 0, 0, {});
|
|
15807
15805
|
}
|
|
15808
|
-
var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]',
|
|
15806
|
+
var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', _E = '[cmdk-group-heading=""]', Th = '[cmdk-item=""]', Tu = `${Th}:not([aria-disabled="true"])`, fi = "cmdk-item-select", yr = "data-value", PE = (e, t, n) => jE(e, t, n), Ch = h.createContext(void 0), Oo = () => h.useContext(Ch), Eh = h.createContext(void 0), jl = () => h.useContext(Eh), kh = h.createContext(void 0), Rh = h.forwardRef((e, t) => {
|
|
15809
15807
|
let n = Sr(() => {
|
|
15810
15808
|
var A, P;
|
|
15811
15809
|
return { search: "", value: (P = (A = e.value) != null ? A : e.defaultValue) != null ? P : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
15812
|
-
}), r = Sr(() => /* @__PURE__ */ new Set()), o = Sr(() => /* @__PURE__ */ new Map()), s = Sr(() => /* @__PURE__ */ new Map()), a = Sr(() => /* @__PURE__ */ new Set()), i = Ih(e), { label: l, children: c, value: d, onValueChange: p, filter: m, shouldFilter: f, loop: v, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, w = Bt(), y = Bt(), C = Bt(), S = h.useRef(null), T =
|
|
15810
|
+
}), r = Sr(() => /* @__PURE__ */ new Set()), o = Sr(() => /* @__PURE__ */ new Map()), s = Sr(() => /* @__PURE__ */ new Map()), a = Sr(() => /* @__PURE__ */ new Set()), i = Ih(e), { label: l, children: c, value: d, onValueChange: p, filter: m, shouldFilter: f, loop: v, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, w = Bt(), y = Bt(), C = Bt(), S = h.useRef(null), T = WE();
|
|
15813
15811
|
cr(() => {
|
|
15814
15812
|
if (d !== void 0) {
|
|
15815
15813
|
let A = d.trim();
|
|
@@ -15858,7 +15856,7 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', AE = '[cmdk-group-head
|
|
|
15858
15856
|
}), filter: () => i.current.shouldFilter, label: l || e["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId: w, inputId: C, labelId: y, listInnerRef: S }), []);
|
|
15859
15857
|
function _(A, P) {
|
|
15860
15858
|
var q, Y;
|
|
15861
|
-
let re = (Y = (q = i.current) == null ? void 0 : q.filter) != null ? Y :
|
|
15859
|
+
let re = (Y = (q = i.current) == null ? void 0 : q.filter) != null ? Y : PE;
|
|
15862
15860
|
return A ? re(A, n.current.search, P) : 0;
|
|
15863
15861
|
}
|
|
15864
15862
|
function D() {
|
|
@@ -15910,7 +15908,7 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', AE = '[cmdk-group-head
|
|
|
15910
15908
|
function H() {
|
|
15911
15909
|
var A, P, q;
|
|
15912
15910
|
let Y = N();
|
|
15913
|
-
Y && (((A = Y.parentElement) == null ? void 0 : A.firstChild) === Y && ((q = (P = Y.closest(Gr)) == null ? void 0 : P.querySelector(
|
|
15911
|
+
Y && (((A = Y.parentElement) == null ? void 0 : A.firstChild) === Y && ((q = (P = Y.closest(Gr)) == null ? void 0 : P.querySelector(_E)) == null || q.scrollIntoView({ block: "nearest" })), Y.scrollIntoView({ block: "nearest" }));
|
|
15914
15912
|
}
|
|
15915
15913
|
function N() {
|
|
15916
15914
|
var A;
|
|
@@ -15931,7 +15929,7 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', AE = '[cmdk-group-head
|
|
|
15931
15929
|
}
|
|
15932
15930
|
function j(A) {
|
|
15933
15931
|
let P = N(), q = P == null ? void 0 : P.closest(Gr), Y;
|
|
15934
|
-
for (; q && !Y; ) q = A > 0 ?
|
|
15932
|
+
for (; q && !Y; ) q = A > 0 ? HE(q, Gr) : UE(q, Gr), Y = q == null ? void 0 : q.querySelector(Tu);
|
|
15935
15933
|
Y ? E.setState("value", Y.getAttribute(yr)) : O(A);
|
|
15936
15934
|
}
|
|
15937
15935
|
let k = () => L(U().length - 1), K = (A) => {
|
|
@@ -15979,8 +15977,8 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', AE = '[cmdk-group-head
|
|
|
15979
15977
|
}
|
|
15980
15978
|
}
|
|
15981
15979
|
}
|
|
15982
|
-
} }, h.createElement("label", { "cmdk-label": "", htmlFor: R.inputId, id: R.labelId, style:
|
|
15983
|
-
}),
|
|
15980
|
+
} }, h.createElement("label", { "cmdk-label": "", htmlFor: R.inputId, id: R.labelId, style: KE }, l), ra(e, (A) => h.createElement(Eh.Provider, { value: E }, h.createElement(Ch.Provider, { value: R }, A))));
|
|
15981
|
+
}), ME = h.forwardRef((e, t) => {
|
|
15984
15982
|
var n, r;
|
|
15985
15983
|
let o = Bt(), s = h.useRef(null), a = h.useContext(kh), i = Oo(), l = Ih(e), c = (r = (n = l.current) == null ? void 0 : n.forceMount) != null ? r : a == null ? void 0 : a.forceMount;
|
|
15986
15984
|
cr(() => {
|
|
@@ -16001,22 +15999,22 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', AE = '[cmdk-group-head
|
|
|
16001
15999
|
if (!f) return null;
|
|
16002
16000
|
let { disabled: x, value: b, onSelect: w, forceMount: y, keywords: C, ...S } = e;
|
|
16003
16001
|
return h.createElement(ve.div, { ref: Mn(s, t), ...S, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!m, "data-disabled": !!x, "data-selected": !!m, onPointerMove: x || i.getDisablePointerSelection() ? void 0 : g, onClick: x ? void 0 : v }, e.children);
|
|
16004
|
-
}),
|
|
16002
|
+
}), OE = h.forwardRef((e, t) => {
|
|
16005
16003
|
let { heading: n, children: r, forceMount: o, ...s } = e, a = Bt(), i = h.useRef(null), l = h.useRef(null), c = Bt(), d = Oo(), p = zn((f) => o || d.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(a) : !0);
|
|
16006
16004
|
cr(() => d.group(a), []), Nh(a, i, [e.value, e.heading, l]);
|
|
16007
16005
|
let m = h.useMemo(() => ({ id: a, forceMount: o }), [o]);
|
|
16008
16006
|
return h.createElement(ve.div, { ref: Mn(i, t), ...s, "cmdk-group": "", role: "presentation", hidden: p ? void 0 : !0 }, n && h.createElement("div", { ref: l, "cmdk-group-heading": "", "aria-hidden": !0, id: c }, n), ra(e, (f) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, h.createElement(kh.Provider, { value: m }, f))));
|
|
16009
|
-
}),
|
|
16007
|
+
}), DE = h.forwardRef((e, t) => {
|
|
16010
16008
|
let { alwaysRender: n, ...r } = e, o = h.useRef(null), s = zn((a) => !a.search);
|
|
16011
16009
|
return !n && !s ? null : h.createElement(ve.div, { ref: Mn(o, t), ...r, "cmdk-separator": "", role: "separator" });
|
|
16012
|
-
}),
|
|
16010
|
+
}), LE = h.forwardRef((e, t) => {
|
|
16013
16011
|
let { onValueChange: n, ...r } = e, o = e.value != null, s = jl(), a = zn((c) => c.search), i = zn((c) => c.selectedItemId), l = Oo();
|
|
16014
16012
|
return h.useEffect(() => {
|
|
16015
16013
|
e.value != null && s.setState("search", e.value);
|
|
16016
16014
|
}, [e.value]), h.createElement(ve.input, { ref: t, ...r, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": l.listId, "aria-labelledby": l.labelId, "aria-activedescendant": i, id: l.inputId, type: "text", value: o ? e.value : a, onChange: (c) => {
|
|
16017
16015
|
o || s.setState("search", c.target.value), n == null || n(c.target.value);
|
|
16018
16016
|
} });
|
|
16019
|
-
}),
|
|
16017
|
+
}), $E = h.forwardRef((e, t) => {
|
|
16020
16018
|
let { children: n, label: r = "Suggestions", ...o } = e, s = h.useRef(null), a = h.useRef(null), i = zn((c) => c.selectedItemId), l = Oo();
|
|
16021
16019
|
return h.useEffect(() => {
|
|
16022
16020
|
if (a.current && s.current) {
|
|
@@ -16031,21 +16029,21 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', AE = '[cmdk-group-head
|
|
|
16031
16029
|
};
|
|
16032
16030
|
}
|
|
16033
16031
|
}, []), h.createElement(ve.div, { ref: Mn(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": r, id: l.listId }, ra(e, (c) => h.createElement("div", { ref: Mn(a, l.listInnerRef), "cmdk-list-sizer": "" }, c)));
|
|
16034
|
-
}),
|
|
16032
|
+
}), FE = h.forwardRef((e, t) => {
|
|
16035
16033
|
let { open: n, onOpenChange: r, overlayClassName: o, contentClassName: s, container: a, ...i } = e;
|
|
16036
16034
|
return h.createElement(Sl, { open: n, onOpenChange: r }, h.createElement(Tl, { container: a }, h.createElement(_o, { "cmdk-overlay": "", className: o }), h.createElement(Po, { "aria-label": e.label, "cmdk-dialog": "", className: s }, h.createElement(Rh, { ref: t, ...i }))));
|
|
16037
|
-
}),
|
|
16035
|
+
}), BE = h.forwardRef((e, t) => zn((n) => n.filtered.count === 0) ? h.createElement(ve.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), zE = h.forwardRef((e, t) => {
|
|
16038
16036
|
let { progress: n, children: r, label: o = "Loading...", ...s } = e;
|
|
16039
16037
|
return h.createElement(ve.div, { ref: t, ...s, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, ra(e, (a) => h.createElement("div", { "aria-hidden": !0 }, a)));
|
|
16040
|
-
}), Xt = Object.assign(Rh, { List:
|
|
16041
|
-
function
|
|
16038
|
+
}), Xt = Object.assign(Rh, { List: $E, Item: ME, Input: LE, Group: OE, Separator: DE, Dialog: FE, Empty: BE, Loading: zE });
|
|
16039
|
+
function HE(e, t) {
|
|
16042
16040
|
let n = e.nextElementSibling;
|
|
16043
16041
|
for (; n; ) {
|
|
16044
16042
|
if (n.matches(t)) return n;
|
|
16045
16043
|
n = n.nextElementSibling;
|
|
16046
16044
|
}
|
|
16047
16045
|
}
|
|
16048
|
-
function
|
|
16046
|
+
function UE(e, t) {
|
|
16049
16047
|
let n = e.previousElementSibling;
|
|
16050
16048
|
for (; n; ) {
|
|
16051
16049
|
if (n.matches(t)) return n;
|
|
@@ -16081,7 +16079,7 @@ function Nh(e, t, n, r = []) {
|
|
|
16081
16079
|
s.value(e, i, l), (a = t.current) == null || a.setAttribute(yr, i), o.current = i;
|
|
16082
16080
|
}), o;
|
|
16083
16081
|
}
|
|
16084
|
-
var
|
|
16082
|
+
var WE = () => {
|
|
16085
16083
|
let [e, t] = h.useState(), n = Sr(() => /* @__PURE__ */ new Map());
|
|
16086
16084
|
return cr(() => {
|
|
16087
16085
|
n.current.forEach((r) => r()), n.current = /* @__PURE__ */ new Map();
|
|
@@ -16089,14 +16087,14 @@ var HE = () => {
|
|
|
16089
16087
|
n.current.set(r, o), t({});
|
|
16090
16088
|
};
|
|
16091
16089
|
};
|
|
16092
|
-
function
|
|
16090
|
+
function VE(e) {
|
|
16093
16091
|
let t = e.type;
|
|
16094
16092
|
return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
|
|
16095
16093
|
}
|
|
16096
16094
|
function ra({ asChild: e, children: t }, n) {
|
|
16097
|
-
return e && h.isValidElement(t) ? h.cloneElement(
|
|
16095
|
+
return e && h.isValidElement(t) ? h.cloneElement(VE(t), { ref: t.ref }, n(t.props.children)) : n(t);
|
|
16098
16096
|
}
|
|
16099
|
-
var
|
|
16097
|
+
var KE = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
16100
16098
|
const Ah = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
16101
16099
|
Xt,
|
|
16102
16100
|
{
|
|
@@ -16154,7 +16152,7 @@ const Mh = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
16154
16152
|
}
|
|
16155
16153
|
));
|
|
16156
16154
|
Mh.displayName = Xt.Group.displayName;
|
|
16157
|
-
const
|
|
16155
|
+
const qE = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
16158
16156
|
Xt.Separator,
|
|
16159
16157
|
{
|
|
16160
16158
|
ref: n,
|
|
@@ -16162,7 +16160,7 @@ const VE = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
16162
16160
|
...t
|
|
16163
16161
|
}
|
|
16164
16162
|
));
|
|
16165
|
-
|
|
16163
|
+
qE.displayName = Xt.Separator.displayName;
|
|
16166
16164
|
const Oh = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
16167
16165
|
Xt.Item,
|
|
16168
16166
|
{
|
|
@@ -16178,10 +16176,10 @@ Oh.displayName = Xt.Item.displayName;
|
|
|
16178
16176
|
function pi(e, [t, n]) {
|
|
16179
16177
|
return Math.min(n, Math.max(t, e));
|
|
16180
16178
|
}
|
|
16181
|
-
function
|
|
16179
|
+
function GE(e, t) {
|
|
16182
16180
|
return h.useReducer((n, r) => t[n][r] ?? n, e);
|
|
16183
16181
|
}
|
|
16184
|
-
var _l = "ScrollArea", [Dh,
|
|
16182
|
+
var _l = "ScrollArea", [Dh, bN] = xn(_l), [YE, cn] = Dh(_l), Lh = h.forwardRef(
|
|
16185
16183
|
(e, t) => {
|
|
16186
16184
|
const {
|
|
16187
16185
|
__scopeScrollArea: n,
|
|
@@ -16191,7 +16189,7 @@ var _l = "ScrollArea", [Dh, vN] = xn(_l), [qE, cn] = Dh(_l), Lh = h.forwardRef(
|
|
|
16191
16189
|
...a
|
|
16192
16190
|
} = e, [i, l] = h.useState(null), [c, d] = h.useState(null), [p, m] = h.useState(null), [f, v] = h.useState(null), [g, x] = h.useState(null), [b, w] = h.useState(0), [y, C] = h.useState(0), [S, T] = h.useState(!1), [E, R] = h.useState(!1), _ = ze(t, (F) => l(F)), D = $s(o);
|
|
16193
16191
|
return /* @__PURE__ */ u.jsx(
|
|
16194
|
-
|
|
16192
|
+
YE,
|
|
16195
16193
|
{
|
|
16196
16194
|
scope: n,
|
|
16197
16195
|
type: r,
|
|
@@ -16279,11 +16277,11 @@ var In = "ScrollAreaScrollbar", Pl = h.forwardRef(
|
|
|
16279
16277
|
const { forceMount: n, ...r } = e, o = cn(In, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: a } = o, i = e.orientation === "horizontal";
|
|
16280
16278
|
return h.useEffect(() => (i ? s(!0) : a(!0), () => {
|
|
16281
16279
|
i ? s(!1) : a(!1);
|
|
16282
|
-
}), [i, s, a]), o.type === "hover" ? /* @__PURE__ */ u.jsx(
|
|
16280
|
+
}), [i, s, a]), o.type === "hover" ? /* @__PURE__ */ u.jsx(XE, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ u.jsx(JE, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ u.jsx(Bh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ u.jsx(Ml, { ...r, ref: t }) : null;
|
|
16283
16281
|
}
|
|
16284
16282
|
);
|
|
16285
16283
|
Pl.displayName = In;
|
|
16286
|
-
var
|
|
16284
|
+
var XE = h.forwardRef((e, t) => {
|
|
16287
16285
|
const { forceMount: n, ...r } = e, o = cn(In, e.__scopeScrollArea), [s, a] = h.useState(!1);
|
|
16288
16286
|
return h.useEffect(() => {
|
|
16289
16287
|
const i = o.scrollArea;
|
|
@@ -16306,8 +16304,8 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16306
16304
|
ref: t
|
|
16307
16305
|
}
|
|
16308
16306
|
) });
|
|
16309
|
-
}),
|
|
16310
|
-
const { forceMount: n, ...r } = e, o = cn(In, e.__scopeScrollArea), s = e.orientation === "horizontal", a = sa(() => l("SCROLL_END"), 100), [i, l] =
|
|
16307
|
+
}), JE = h.forwardRef((e, t) => {
|
|
16308
|
+
const { forceMount: n, ...r } = e, o = cn(In, e.__scopeScrollArea), s = e.orientation === "horizontal", a = sa(() => l("SCROLL_END"), 100), [i, l] = GE("hidden", {
|
|
16311
16309
|
hidden: {
|
|
16312
16310
|
SCROLL: "scrolling"
|
|
16313
16311
|
},
|
|
@@ -16380,10 +16378,10 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16380
16378
|
onThumbPointerDown: (m) => a.current = m
|
|
16381
16379
|
};
|
|
16382
16380
|
function p(m, f) {
|
|
16383
|
-
return
|
|
16381
|
+
return rk(m, a.current, i, f);
|
|
16384
16382
|
}
|
|
16385
16383
|
return n === "horizontal" ? /* @__PURE__ */ u.jsx(
|
|
16386
|
-
|
|
16384
|
+
ZE,
|
|
16387
16385
|
{
|
|
16388
16386
|
...d,
|
|
16389
16387
|
ref: t,
|
|
@@ -16401,7 +16399,7 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16401
16399
|
}
|
|
16402
16400
|
}
|
|
16403
16401
|
) : n === "vertical" ? /* @__PURE__ */ u.jsx(
|
|
16404
|
-
|
|
16402
|
+
QE,
|
|
16405
16403
|
{
|
|
16406
16404
|
...d,
|
|
16407
16405
|
ref: t,
|
|
@@ -16419,7 +16417,7 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16419
16417
|
}
|
|
16420
16418
|
}
|
|
16421
16419
|
) : null;
|
|
16422
|
-
}),
|
|
16420
|
+
}), ZE = h.forwardRef((e, t) => {
|
|
16423
16421
|
const { sizes: n, onSizesChange: r, ...o } = e, s = cn(In, e.__scopeScrollArea), [a, i] = h.useState(), l = h.useRef(null), c = ze(t, l, s.onScrollbarXChange);
|
|
16424
16422
|
return h.useEffect(() => {
|
|
16425
16423
|
l.current && i(getComputedStyle(l.current));
|
|
@@ -16458,7 +16456,7 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16458
16456
|
}
|
|
16459
16457
|
}
|
|
16460
16458
|
);
|
|
16461
|
-
}),
|
|
16459
|
+
}), QE = h.forwardRef((e, t) => {
|
|
16462
16460
|
const { sizes: n, onSizesChange: r, ...o } = e, s = cn(In, e.__scopeScrollArea), [a, i] = h.useState(), l = h.useRef(null), c = ze(t, l, s.onScrollbarYChange);
|
|
16463
16461
|
return h.useEffect(() => {
|
|
16464
16462
|
l.current && i(getComputedStyle(l.current));
|
|
@@ -16498,7 +16496,7 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16498
16496
|
}
|
|
16499
16497
|
}
|
|
16500
16498
|
);
|
|
16501
|
-
}), [
|
|
16499
|
+
}), [ek, zh] = Dh(In), Hh = h.forwardRef((e, t) => {
|
|
16502
16500
|
const {
|
|
16503
16501
|
__scopeScrollArea: n,
|
|
16504
16502
|
sizes: r,
|
|
@@ -16525,7 +16523,7 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16525
16523
|
};
|
|
16526
16524
|
return document.addEventListener("wheel", _, { passive: !1 }), () => document.removeEventListener("wheel", _, { passive: !1 });
|
|
16527
16525
|
}, [y, v, C, S]), h.useEffect(T, [r, T]), jr(v, E), jr(f.content, E), /* @__PURE__ */ u.jsx(
|
|
16528
|
-
|
|
16526
|
+
ek,
|
|
16529
16527
|
{
|
|
16530
16528
|
scope: n,
|
|
16531
16529
|
scrollbar: v,
|
|
@@ -16555,9 +16553,9 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16555
16553
|
}), Es = "ScrollAreaThumb", Uh = h.forwardRef(
|
|
16556
16554
|
(e, t) => {
|
|
16557
16555
|
const { forceMount: n, ...r } = e, o = zh(Es, e.__scopeScrollArea);
|
|
16558
|
-
return /* @__PURE__ */ u.jsx(Yt, { present: n || o.hasThumb, children: /* @__PURE__ */ u.jsx(
|
|
16556
|
+
return /* @__PURE__ */ u.jsx(Yt, { present: n || o.hasThumb, children: /* @__PURE__ */ u.jsx(tk, { ref: t, ...r }) });
|
|
16559
16557
|
}
|
|
16560
|
-
),
|
|
16558
|
+
), tk = h.forwardRef(
|
|
16561
16559
|
(e, t) => {
|
|
16562
16560
|
const { __scopeScrollArea: n, style: r, ...o } = e, s = cn(Es, n), a = zh(Es, n), { onThumbPositionChange: i } = a, l = ze(
|
|
16563
16561
|
t,
|
|
@@ -16570,7 +16568,7 @@ var GE = h.forwardRef((e, t) => {
|
|
|
16570
16568
|
if (p) {
|
|
16571
16569
|
const m = () => {
|
|
16572
16570
|
if (d(), !c.current) {
|
|
16573
|
-
const f =
|
|
16571
|
+
const f = ok(p, i);
|
|
16574
16572
|
c.current = f, i();
|
|
16575
16573
|
}
|
|
16576
16574
|
};
|
|
@@ -16600,11 +16598,11 @@ Uh.displayName = Es;
|
|
|
16600
16598
|
var Ol = "ScrollAreaCorner", Wh = h.forwardRef(
|
|
16601
16599
|
(e, t) => {
|
|
16602
16600
|
const n = cn(Ol, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
16603
|
-
return n.type !== "scroll" && r ? /* @__PURE__ */ u.jsx(
|
|
16601
|
+
return n.type !== "scroll" && r ? /* @__PURE__ */ u.jsx(nk, { ...e, ref: t }) : null;
|
|
16604
16602
|
}
|
|
16605
16603
|
);
|
|
16606
16604
|
Wh.displayName = Ol;
|
|
16607
|
-
var
|
|
16605
|
+
var nk = h.forwardRef((e, t) => {
|
|
16608
16606
|
const { __scopeScrollArea: n, ...r } = e, o = cn(Ol, n), [s, a] = h.useState(0), [i, l] = h.useState(0), c = !!(s && i);
|
|
16609
16607
|
return jr(o.scrollbarX, () => {
|
|
16610
16608
|
var p;
|
|
@@ -16642,7 +16640,7 @@ function oa(e) {
|
|
|
16642
16640
|
const t = Vh(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
|
|
16643
16641
|
return Math.max(r, 18);
|
|
16644
16642
|
}
|
|
16645
|
-
function
|
|
16643
|
+
function rk(e, t, n, r = "ltr") {
|
|
16646
16644
|
const o = oa(n), s = o / 2, a = t || s, i = o - a, l = n.scrollbar.paddingStart + a, c = n.scrollbar.size - n.scrollbar.paddingEnd - i, d = n.content - n.viewport, p = r === "ltr" ? [0, d] : [d * -1, 0];
|
|
16647
16645
|
return Kh([l, c], p)(e);
|
|
16648
16646
|
}
|
|
@@ -16660,7 +16658,7 @@ function Kh(e, t) {
|
|
|
16660
16658
|
function qh(e, t) {
|
|
16661
16659
|
return e > 0 && e < t;
|
|
16662
16660
|
}
|
|
16663
|
-
var
|
|
16661
|
+
var ok = (e, t = () => {
|
|
16664
16662
|
}) => {
|
|
16665
16663
|
let n = { left: e.scrollLeft, top: e.scrollTop }, r = 0;
|
|
16666
16664
|
return function o() {
|
|
@@ -16688,7 +16686,7 @@ function jr(e, t) {
|
|
|
16688
16686
|
}
|
|
16689
16687
|
}, [e, n]);
|
|
16690
16688
|
}
|
|
16691
|
-
var Gh = Lh,
|
|
16689
|
+
var Gh = Lh, sk = Fh, ak = Wh;
|
|
16692
16690
|
const Yh = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
|
|
16693
16691
|
Gh,
|
|
16694
16692
|
{
|
|
@@ -16696,9 +16694,9 @@ const Yh = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
16696
16694
|
className: ne("relative overflow-hidden", e),
|
|
16697
16695
|
...n,
|
|
16698
16696
|
children: [
|
|
16699
|
-
/* @__PURE__ */ u.jsx(
|
|
16697
|
+
/* @__PURE__ */ u.jsx(sk, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
|
|
16700
16698
|
/* @__PURE__ */ u.jsx(Xh, {}),
|
|
16701
|
-
/* @__PURE__ */ u.jsx(
|
|
16699
|
+
/* @__PURE__ */ u.jsx(ak, {})
|
|
16702
16700
|
]
|
|
16703
16701
|
}
|
|
16704
16702
|
));
|
|
@@ -16734,8 +16732,8 @@ const Jh = h.forwardRef(
|
|
|
16734
16732
|
)
|
|
16735
16733
|
);
|
|
16736
16734
|
Jh.displayName = "Input";
|
|
16737
|
-
const
|
|
16738
|
-
function
|
|
16735
|
+
const ik = "group relative p-3 rounded-lg cursor-pointer transition-colors border text-gray-900 dark:text-slate-100", lk = "bg-slate-700 border-slate-600 hover:bg-slate-600", ck = "bg-slate-600 border-slate-500";
|
|
16736
|
+
function uk({
|
|
16739
16737
|
thread: e,
|
|
16740
16738
|
isActive: t,
|
|
16741
16739
|
editingThreadId: n,
|
|
@@ -16755,14 +16753,14 @@ function lk({
|
|
|
16755
16753
|
itemClassName: x,
|
|
16756
16754
|
activeItemClassName: b
|
|
16757
16755
|
}) {
|
|
16758
|
-
const w = n === e.threadId, y = t ? `${b ??
|
|
16756
|
+
const w = n === e.threadId, y = t ? `${b ?? ck}` : `${x ?? lk}`, C = (S) => {
|
|
16759
16757
|
S.stopPropagation(), o(e.threadId);
|
|
16760
16758
|
};
|
|
16761
16759
|
return /* @__PURE__ */ u.jsxs(
|
|
16762
16760
|
"div",
|
|
16763
16761
|
{
|
|
16764
16762
|
onClick: C,
|
|
16765
|
-
className: `${
|
|
16763
|
+
className: `${ik} ${y}`,
|
|
16766
16764
|
children: [
|
|
16767
16765
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16768
16766
|
/* @__PURE__ */ u.jsx("div", { className: "flex-1 min-w-0", children: w ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", onClick: (S) => S.stopPropagation(), children: [
|
|
@@ -16845,22 +16843,22 @@ function lk({
|
|
|
16845
16843
|
}
|
|
16846
16844
|
);
|
|
16847
16845
|
}
|
|
16848
|
-
const Eu = 25, Zh = "thread-manager-view",
|
|
16846
|
+
const Eu = 25, Zh = "thread-manager-view", dk = (e) => e === "default" || e === "shared", fk = () => {
|
|
16849
16847
|
if (typeof window > "u")
|
|
16850
16848
|
return null;
|
|
16851
16849
|
try {
|
|
16852
16850
|
const e = window.localStorage.getItem(Zh);
|
|
16853
|
-
if (
|
|
16851
|
+
if (dk(e))
|
|
16854
16852
|
return e;
|
|
16855
16853
|
} catch {
|
|
16856
16854
|
}
|
|
16857
16855
|
return null;
|
|
16858
16856
|
};
|
|
16859
|
-
function
|
|
16857
|
+
function pk({
|
|
16860
16858
|
defaultView: e
|
|
16861
16859
|
} = {}) {
|
|
16862
|
-
const [t, n] =
|
|
16863
|
-
|
|
16860
|
+
const [t, n] = he(() => fk() ?? e ?? "default");
|
|
16861
|
+
Ze(() => {
|
|
16864
16862
|
if (!(typeof window > "u"))
|
|
16865
16863
|
try {
|
|
16866
16864
|
window.localStorage.setItem(Zh, t);
|
|
@@ -16872,7 +16870,7 @@ function dk({
|
|
|
16872
16870
|
}, []);
|
|
16873
16871
|
return { view: t, setView: r };
|
|
16874
16872
|
}
|
|
16875
|
-
const
|
|
16873
|
+
const hk = [
|
|
16876
16874
|
{ key: "default", label: "My chats" },
|
|
16877
16875
|
{ key: "shared", label: "Shared with you" }
|
|
16878
16876
|
];
|
|
@@ -16909,7 +16907,7 @@ function hi({
|
|
|
16909
16907
|
shareInFlight: F,
|
|
16910
16908
|
shareStatus: V,
|
|
16911
16909
|
clearShareStatus: H
|
|
16912
|
-
} = To(), { createThread: N, deleteThread: U, renameThread: L, shareThread: O } = D, { loadThread: j } = Ds(), k = a ?? T, [K, J] =
|
|
16910
|
+
} = To(), { createThread: N, deleteThread: U, renameThread: L, shareThread: O } = D, { loadThread: j } = Ds(), k = a ?? T, [K, J] = he(Array.isArray(C) ? C : []), A = Fe(K.length > 0), P = Fe(null), q = Fe(0), [Y, re] = he(null), [W, $] = he(""), [G, Z] = he(!1), [X, B] = he(!1), [ae, se] = he(null), [fe, Se] = he(""), _e = v && v.length > 0 ? v : hk, Pe = pk({ defaultView: m }), Ee = g ?? Pe, st = p ?? Ee.view, xt = ge(
|
|
16913
16911
|
(te) => {
|
|
16914
16912
|
p || Ee.setView(te), f == null || f(te);
|
|
16915
16913
|
},
|
|
@@ -16928,21 +16926,21 @@ function hi({
|
|
|
16928
16926
|
}
|
|
16929
16927
|
},
|
|
16930
16928
|
[Ue, F, ae, O]
|
|
16931
|
-
),
|
|
16929
|
+
), De = Je(() => {
|
|
16932
16930
|
const te = b ?? [], we = fe.trim().toLowerCase();
|
|
16933
16931
|
return we ? y ? te.filter((tt) => y(tt, we)) : te.filter((tt) => `${tt.label} ${tt.secondaryLabel ?? ""}`.toLowerCase().includes(we)) : te;
|
|
16934
16932
|
}, [b, fe, y]), He = st === "shared", mt = He ? S : K, Mt = He ? _ : R, at = He ? "No shared conversations yet" : "No conversations yet", Pt = (te) => {
|
|
16935
16933
|
const we = te.sharedAt ? ` • ${ce(te.sharedAt)}` : "";
|
|
16936
16934
|
return `Shared by ${te.sharedByUserId}${we}`;
|
|
16937
16935
|
}, kt = (te) => "sharedByUserId" in te;
|
|
16938
|
-
|
|
16936
|
+
Ze(() => {
|
|
16939
16937
|
const te = Array.isArray(C) ? C : [];
|
|
16940
16938
|
if (te.length > 0) {
|
|
16941
16939
|
A.current = !0, J(te);
|
|
16942
16940
|
return;
|
|
16943
16941
|
}
|
|
16944
16942
|
R || (A.current = !1, J(te));
|
|
16945
|
-
}, [C, R]),
|
|
16943
|
+
}, [C, R]), Ze(() => {
|
|
16946
16944
|
if (!P.current) return;
|
|
16947
16945
|
const te = P.current.querySelector(
|
|
16948
16946
|
"[data-radix-scroll-area-viewport]"
|
|
@@ -16999,8 +16997,8 @@ function hi({
|
|
|
16999
16997
|
}, ce = (te) => {
|
|
17000
16998
|
if (!te) return "";
|
|
17001
16999
|
try {
|
|
17002
|
-
const we = new Date(te), xe = (/* @__PURE__ */ new Date()).getTime() - we.getTime(),
|
|
17003
|
-
return
|
|
17000
|
+
const we = new Date(te), xe = (/* @__PURE__ */ new Date()).getTime() - we.getTime(), $e = Math.floor(xe / (1e3 * 60 * 60 * 24));
|
|
17001
|
+
return $e === 0 ? we.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : $e === 1 ? "Yesterday" : $e < 7 ? `${$e} days ago` : we.toLocaleDateString();
|
|
17004
17002
|
} catch {
|
|
17005
17003
|
return "";
|
|
17006
17004
|
}
|
|
@@ -17073,7 +17071,7 @@ function hi({
|
|
|
17073
17071
|
/* @__PURE__ */ u.jsx(Lu, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
|
|
17074
17072
|
/* @__PURE__ */ u.jsx("p", { className: "text-sm text-slate-500", children: at })
|
|
17075
17073
|
] }) : mt.slice().sort((te, we) => new Date(we.updatedAt || we.createdAt || "").getTime() - new Date(te.updatedAt || te.createdAt || "").getTime()).map((te) => /* @__PURE__ */ u.jsx(
|
|
17076
|
-
|
|
17074
|
+
uk,
|
|
17077
17075
|
{
|
|
17078
17076
|
thread: te,
|
|
17079
17077
|
isActive: k === te.threadId,
|
|
@@ -17125,7 +17123,7 @@ function hi({
|
|
|
17125
17123
|
/* @__PURE__ */ u.jsx(Xn, { className: "h-4 w-4 animate-spin" }),
|
|
17126
17124
|
"Loading recipients…"
|
|
17127
17125
|
] }) : "No matching recipients found" }),
|
|
17128
|
-
|
|
17126
|
+
De.length > 0 && /* @__PURE__ */ u.jsx(Mh, { heading: "Recipients", children: De.map((te) => /* @__PURE__ */ u.jsx(Oh, { onSelect: () => Ke(te), children: /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-start text-sm", children: [
|
|
17129
17127
|
/* @__PURE__ */ u.jsx("span", { className: "font-medium", children: te.label }),
|
|
17130
17128
|
te.secondaryLabel && /* @__PURE__ */ u.jsx("span", { className: "text-xs text-muted-foreground", children: te.secondaryLabel })
|
|
17131
17129
|
] }) }, te.id)) })
|
|
@@ -17134,7 +17132,7 @@ function hi({
|
|
|
17134
17132
|
] }) })
|
|
17135
17133
|
] });
|
|
17136
17134
|
}
|
|
17137
|
-
function
|
|
17135
|
+
function yN({
|
|
17138
17136
|
layout: e = "sidebar",
|
|
17139
17137
|
layoutSize: t = "desktop",
|
|
17140
17138
|
showThreads: n = !0,
|
|
@@ -17208,11 +17206,11 @@ function wN({
|
|
|
17208
17206
|
}
|
|
17209
17207
|
) });
|
|
17210
17208
|
}
|
|
17211
|
-
function
|
|
17209
|
+
function SN({ apiConfig: e, className: t = "", onError: n }) {
|
|
17212
17210
|
return /* @__PURE__ */ u.jsx(Jr, { apiConfig: e, onError: n, children: /* @__PURE__ */ u.jsx("div", { className: `h-full ${t}`, children: /* @__PURE__ */ u.jsx(to, {}) }) });
|
|
17213
17211
|
}
|
|
17214
|
-
function
|
|
17215
|
-
const [n, r] =
|
|
17212
|
+
function mk({ placeholder: e, onMessageSent: t }) {
|
|
17213
|
+
const [n, r] = he("chat");
|
|
17216
17214
|
return /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col h-full", children: [
|
|
17217
17215
|
/* @__PURE__ */ u.jsxs("div", { className: "flex border-b border-gray-200 bg-gray-50", children: [
|
|
17218
17216
|
/* @__PURE__ */ u.jsx(
|
|
@@ -17256,7 +17254,7 @@ function pk({ placeholder: e, onMessageSent: t }) {
|
|
|
17256
17254
|
) })
|
|
17257
17255
|
] });
|
|
17258
17256
|
}
|
|
17259
|
-
function
|
|
17257
|
+
function TN({
|
|
17260
17258
|
className: e = "",
|
|
17261
17259
|
placeholder: t,
|
|
17262
17260
|
isAuthenticated: n = !0,
|
|
@@ -17265,7 +17263,7 @@ function yN({
|
|
|
17265
17263
|
widgetSubtitle: s = "AI-Powered Assistant",
|
|
17266
17264
|
...a
|
|
17267
17265
|
}) {
|
|
17268
|
-
const [i, l] =
|
|
17266
|
+
const [i, l] = he(!1);
|
|
17269
17267
|
return n ? /* @__PURE__ */ u.jsx(Jr, { ...a, children: /* @__PURE__ */ u.jsx(
|
|
17270
17268
|
"div",
|
|
17271
17269
|
{
|
|
@@ -17323,14 +17321,14 @@ function yN({
|
|
|
17323
17321
|
)
|
|
17324
17322
|
] })
|
|
17325
17323
|
] }) }),
|
|
17326
|
-
!i && /* @__PURE__ */ u.jsx("div", { className: "h-96 flex flex-col", children: /* @__PURE__ */ u.jsx(
|
|
17324
|
+
!i && /* @__PURE__ */ u.jsx("div", { className: "h-96 flex flex-col", children: /* @__PURE__ */ u.jsx(mk, { placeholder: t, onMessageSent: r }) })
|
|
17327
17325
|
]
|
|
17328
17326
|
}
|
|
17329
17327
|
)
|
|
17330
17328
|
}
|
|
17331
17329
|
) }) : null;
|
|
17332
17330
|
}
|
|
17333
|
-
function
|
|
17331
|
+
function CN({
|
|
17334
17332
|
label: e = "New chat",
|
|
17335
17333
|
children: t,
|
|
17336
17334
|
className: n,
|
|
@@ -17355,7 +17353,7 @@ function SN({
|
|
|
17355
17353
|
}
|
|
17356
17354
|
);
|
|
17357
17355
|
}
|
|
17358
|
-
var
|
|
17356
|
+
var gk = "Label", Qh = h.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
|
|
17359
17357
|
ve.label,
|
|
17360
17358
|
{
|
|
17361
17359
|
...e,
|
|
@@ -17366,19 +17364,19 @@ var hk = "Label", Qh = h.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
|
|
|
17366
17364
|
}
|
|
17367
17365
|
}
|
|
17368
17366
|
));
|
|
17369
|
-
Qh.displayName =
|
|
17367
|
+
Qh.displayName = gk;
|
|
17370
17368
|
var em = Qh;
|
|
17371
|
-
const
|
|
17369
|
+
const xk = mo(
|
|
17372
17370
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
17373
|
-
),
|
|
17371
|
+
), vk = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
17374
17372
|
em,
|
|
17375
17373
|
{
|
|
17376
17374
|
ref: n,
|
|
17377
|
-
className: ne(
|
|
17375
|
+
className: ne(xk(), e),
|
|
17378
17376
|
...t
|
|
17379
17377
|
}
|
|
17380
17378
|
));
|
|
17381
|
-
|
|
17379
|
+
vk.displayName = em.displayName;
|
|
17382
17380
|
function tm(e) {
|
|
17383
17381
|
const t = h.useRef({ value: e, previous: e });
|
|
17384
17382
|
return h.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
@@ -17395,7 +17393,7 @@ var nm = Object.freeze({
|
|
|
17395
17393
|
clip: "rect(0, 0, 0, 0)",
|
|
17396
17394
|
whiteSpace: "nowrap",
|
|
17397
17395
|
wordWrap: "normal"
|
|
17398
|
-
}),
|
|
17396
|
+
}), wk = "VisuallyHidden", aa = h.forwardRef(
|
|
17399
17397
|
(e, t) => /* @__PURE__ */ u.jsx(
|
|
17400
17398
|
ve.span,
|
|
17401
17399
|
{
|
|
@@ -17405,11 +17403,11 @@ var nm = Object.freeze({
|
|
|
17405
17403
|
}
|
|
17406
17404
|
)
|
|
17407
17405
|
);
|
|
17408
|
-
aa.displayName =
|
|
17409
|
-
var
|
|
17410
|
-
|
|
17406
|
+
aa.displayName = wk;
|
|
17407
|
+
var bk = aa, yk = [" ", "Enter", "ArrowUp", "ArrowDown"], Sk = [" ", "Enter"], ur = "Select", [ia, la, Tk] = Ls(ur), [Ur, EN] = xn(ur, [
|
|
17408
|
+
Tk,
|
|
17411
17409
|
Br
|
|
17412
|
-
]), ca = Br(), [
|
|
17410
|
+
]), ca = Br(), [Ck, Vn] = Ur(ur), [Ek, kk] = Ur(ur), rm = (e) => {
|
|
17413
17411
|
const {
|
|
17414
17412
|
__scopeSelect: t,
|
|
17415
17413
|
children: n,
|
|
@@ -17437,7 +17435,7 @@ var vk = aa, wk = [" ", "Enter", "ArrowUp", "ArrowDown"], bk = [" ", "Enter"], u
|
|
|
17437
17435
|
caller: ur
|
|
17438
17436
|
}), F = h.useRef(null), V = x ? v || !!x.closest("form") : !0, [H, N] = h.useState(/* @__PURE__ */ new Set()), U = Array.from(H).map((L) => L.props.value).join(";");
|
|
17439
17437
|
return /* @__PURE__ */ u.jsx(qi, { ...g, children: /* @__PURE__ */ u.jsxs(
|
|
17440
|
-
|
|
17438
|
+
Ck,
|
|
17441
17439
|
{
|
|
17442
17440
|
required: f,
|
|
17443
17441
|
scope: t,
|
|
@@ -17457,7 +17455,7 @@ var vk = aa, wk = [" ", "Enter", "ArrowUp", "ArrowDown"], bk = [" ", "Enter"], u
|
|
|
17457
17455
|
disabled: m,
|
|
17458
17456
|
children: [
|
|
17459
17457
|
/* @__PURE__ */ u.jsx(ia.Provider, { scope: t, children: /* @__PURE__ */ u.jsx(
|
|
17460
|
-
|
|
17458
|
+
Ek,
|
|
17461
17459
|
{
|
|
17462
17460
|
scope: e.__scopeSelect,
|
|
17463
17461
|
onNativeOptionAdd: h.useCallback((L) => {
|
|
@@ -17533,7 +17531,7 @@ var om = "SelectTrigger", sm = h.forwardRef(
|
|
|
17533
17531
|
}),
|
|
17534
17532
|
onKeyDown: le(o.onKeyDown, (g) => {
|
|
17535
17533
|
const x = p.current !== "";
|
|
17536
|
-
!(g.ctrlKey || g.altKey || g.metaKey) && g.key.length === 1 && m(g.key), !(x && g.key === " ") &&
|
|
17534
|
+
!(g.ctrlKey || g.altKey || g.metaKey) && g.key.length === 1 && m(g.key), !(x && g.key === " ") && yk.includes(g.key) && (v(), g.preventDefault());
|
|
17537
17535
|
})
|
|
17538
17536
|
}
|
|
17539
17537
|
) });
|
|
@@ -17557,15 +17555,15 @@ var am = "SelectValue", im = h.forwardRef(
|
|
|
17557
17555
|
}
|
|
17558
17556
|
);
|
|
17559
17557
|
im.displayName = am;
|
|
17560
|
-
var
|
|
17558
|
+
var Rk = "SelectIcon", lm = h.forwardRef(
|
|
17561
17559
|
(e, t) => {
|
|
17562
17560
|
const { __scopeSelect: n, children: r, ...o } = e;
|
|
17563
17561
|
return /* @__PURE__ */ u.jsx(ve.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
|
|
17564
17562
|
}
|
|
17565
17563
|
);
|
|
17566
|
-
lm.displayName =
|
|
17567
|
-
var
|
|
17568
|
-
cm.displayName =
|
|
17564
|
+
lm.displayName = Rk;
|
|
17565
|
+
var Ik = "SelectPortal", cm = (e) => /* @__PURE__ */ u.jsx(Eo, { asChild: !0, ...e });
|
|
17566
|
+
cm.displayName = Ik;
|
|
17569
17567
|
var dr = "SelectContent", um = h.forwardRef(
|
|
17570
17568
|
(e, t) => {
|
|
17571
17569
|
const n = Vn(dr, e.__scopeSelect), [r, o] = h.useState();
|
|
@@ -17582,7 +17580,7 @@ var dr = "SelectContent", um = h.forwardRef(
|
|
|
17582
17580
|
}
|
|
17583
17581
|
);
|
|
17584
17582
|
um.displayName = dr;
|
|
17585
|
-
var dn = 10, [dm, Kn] = Ur(dr),
|
|
17583
|
+
var dn = 10, [dm, Kn] = Ur(dr), Nk = "SelectContentImpl", Ak = Rr("SelectContent.RemoveScroll"), fm = h.forwardRef(
|
|
17586
17584
|
(e, t) => {
|
|
17587
17585
|
const {
|
|
17588
17586
|
__scopeSelect: n,
|
|
@@ -17690,7 +17688,7 @@ var dn = 10, [dm, Kn] = Ur(dr), Rk = "SelectContentImpl", Ik = Rr("SelectContent
|
|
|
17690
17688
|
position: r,
|
|
17691
17689
|
isPositioned: H,
|
|
17692
17690
|
searchRef: K,
|
|
17693
|
-
children: /* @__PURE__ */ u.jsx(Vs, { as:
|
|
17691
|
+
children: /* @__PURE__ */ u.jsx(Vs, { as: Ak, allowPinchZoom: !0, children: /* @__PURE__ */ u.jsx(
|
|
17694
17692
|
Fs,
|
|
17695
17693
|
{
|
|
17696
17694
|
asChild: !0,
|
|
@@ -17752,8 +17750,8 @@ var dn = 10, [dm, Kn] = Ur(dr), Rk = "SelectContentImpl", Ik = Rr("SelectContent
|
|
|
17752
17750
|
);
|
|
17753
17751
|
}
|
|
17754
17752
|
);
|
|
17755
|
-
fm.displayName =
|
|
17756
|
-
var
|
|
17753
|
+
fm.displayName = Nk;
|
|
17754
|
+
var jk = "SelectItemAlignedPosition", pm = h.forwardRef((e, t) => {
|
|
17757
17755
|
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Vn(dr, n), a = Kn(dr, n), [i, l] = h.useState(null), [c, d] = h.useState(null), p = ze(t, (E) => d(E)), m = la(n), f = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = h.useCallback(() => {
|
|
17758
17756
|
if (s.trigger && s.valueNode && i && c && g && x && b) {
|
|
17759
17757
|
const E = s.trigger.getBoundingClientRect(), R = c.getBoundingClientRect(), _ = s.valueNode.getBoundingClientRect(), D = b.getBoundingClientRect();
|
|
@@ -17821,7 +17819,7 @@ var Nk = "SelectItemAlignedPosition", pm = h.forwardRef((e, t) => {
|
|
|
17821
17819
|
[y, w]
|
|
17822
17820
|
);
|
|
17823
17821
|
return /* @__PURE__ */ u.jsx(
|
|
17824
|
-
|
|
17822
|
+
Pk,
|
|
17825
17823
|
{
|
|
17826
17824
|
scope: n,
|
|
17827
17825
|
contentWrapper: i,
|
|
@@ -17857,8 +17855,8 @@ var Nk = "SelectItemAlignedPosition", pm = h.forwardRef((e, t) => {
|
|
|
17857
17855
|
}
|
|
17858
17856
|
);
|
|
17859
17857
|
});
|
|
17860
|
-
pm.displayName =
|
|
17861
|
-
var
|
|
17858
|
+
pm.displayName = jk;
|
|
17859
|
+
var _k = "SelectPopperPosition", mi = h.forwardRef((e, t) => {
|
|
17862
17860
|
const {
|
|
17863
17861
|
__scopeSelect: n,
|
|
17864
17862
|
align: r = "start",
|
|
@@ -17886,8 +17884,8 @@ var Ak = "SelectPopperPosition", mi = h.forwardRef((e, t) => {
|
|
|
17886
17884
|
}
|
|
17887
17885
|
);
|
|
17888
17886
|
});
|
|
17889
|
-
mi.displayName =
|
|
17890
|
-
var [
|
|
17887
|
+
mi.displayName = _k;
|
|
17888
|
+
var [Pk, Dl] = Ur(dr, {}), gi = "SelectViewport", hm = h.forwardRef(
|
|
17891
17889
|
(e, t) => {
|
|
17892
17890
|
const { __scopeSelect: n, nonce: r, ...o } = e, s = Kn(gi, n), a = Dl(gi, n), i = ze(t, s.onViewportChange), l = h.useRef(0);
|
|
17893
17891
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
@@ -17940,21 +17938,21 @@ var [jk, Dl] = Ur(dr, {}), gi = "SelectViewport", hm = h.forwardRef(
|
|
|
17940
17938
|
}
|
|
17941
17939
|
);
|
|
17942
17940
|
hm.displayName = gi;
|
|
17943
|
-
var mm = "SelectGroup", [
|
|
17941
|
+
var mm = "SelectGroup", [Mk, Ok] = Ur(mm), Dk = h.forwardRef(
|
|
17944
17942
|
(e, t) => {
|
|
17945
17943
|
const { __scopeSelect: n, ...r } = e, o = Bt();
|
|
17946
|
-
return /* @__PURE__ */ u.jsx(
|
|
17944
|
+
return /* @__PURE__ */ u.jsx(Mk, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(ve.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
17947
17945
|
}
|
|
17948
17946
|
);
|
|
17949
|
-
|
|
17947
|
+
Dk.displayName = mm;
|
|
17950
17948
|
var gm = "SelectLabel", xm = h.forwardRef(
|
|
17951
17949
|
(e, t) => {
|
|
17952
|
-
const { __scopeSelect: n, ...r } = e, o =
|
|
17950
|
+
const { __scopeSelect: n, ...r } = e, o = Ok(gm, n);
|
|
17953
17951
|
return /* @__PURE__ */ u.jsx(ve.div, { id: o.id, ...r, ref: t });
|
|
17954
17952
|
}
|
|
17955
17953
|
);
|
|
17956
17954
|
xm.displayName = gm;
|
|
17957
|
-
var Rs = "SelectItem", [
|
|
17955
|
+
var Rs = "SelectItem", [Lk, vm] = Ur(Rs), wm = h.forwardRef(
|
|
17958
17956
|
(e, t) => {
|
|
17959
17957
|
const {
|
|
17960
17958
|
__scopeSelect: n,
|
|
@@ -17976,7 +17974,7 @@ var Rs = "SelectItem", [Ok, vm] = Ur(Rs), wm = h.forwardRef(
|
|
|
17976
17974
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
17977
17975
|
);
|
|
17978
17976
|
return /* @__PURE__ */ u.jsx(
|
|
17979
|
-
|
|
17977
|
+
Lk,
|
|
17980
17978
|
{
|
|
17981
17979
|
scope: n,
|
|
17982
17980
|
value: r,
|
|
@@ -18027,7 +18025,7 @@ var Rs = "SelectItem", [Ok, vm] = Ur(Rs), wm = h.forwardRef(
|
|
|
18027
18025
|
}),
|
|
18028
18026
|
onKeyDown: le(a.onKeyDown, (w) => {
|
|
18029
18027
|
var C;
|
|
18030
|
-
((C = l.searchRef) == null ? void 0 : C.current) !== "" && w.key === " " || (
|
|
18028
|
+
((C = l.searchRef) == null ? void 0 : C.current) !== "" && w.key === " " || (Sk.includes(w.key) && b(), w.key === " " && w.preventDefault());
|
|
18031
18029
|
})
|
|
18032
18030
|
}
|
|
18033
18031
|
)
|
|
@@ -18040,7 +18038,7 @@ var Rs = "SelectItem", [Ok, vm] = Ur(Rs), wm = h.forwardRef(
|
|
|
18040
18038
|
wm.displayName = Rs;
|
|
18041
18039
|
var Xr = "SelectItemText", bm = h.forwardRef(
|
|
18042
18040
|
(e, t) => {
|
|
18043
|
-
const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Vn(Xr, n), i = Kn(Xr, n), l = vm(Xr, n), c =
|
|
18041
|
+
const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Vn(Xr, n), i = Kn(Xr, n), l = vm(Xr, n), c = kk(Xr, n), [d, p] = h.useState(null), m = ze(
|
|
18044
18042
|
t,
|
|
18045
18043
|
(b) => p(b),
|
|
18046
18044
|
l.onItemTextChange,
|
|
@@ -18141,21 +18139,21 @@ var Em = h.forwardRef((e, t) => {
|
|
|
18141
18139
|
})
|
|
18142
18140
|
}
|
|
18143
18141
|
);
|
|
18144
|
-
}),
|
|
18142
|
+
}), $k = "SelectSeparator", km = h.forwardRef(
|
|
18145
18143
|
(e, t) => {
|
|
18146
18144
|
const { __scopeSelect: n, ...r } = e;
|
|
18147
18145
|
return /* @__PURE__ */ u.jsx(ve.div, { "aria-hidden": !0, ...r, ref: t });
|
|
18148
18146
|
}
|
|
18149
18147
|
);
|
|
18150
|
-
km.displayName =
|
|
18151
|
-
var wi = "SelectArrow",
|
|
18148
|
+
km.displayName = $k;
|
|
18149
|
+
var wi = "SelectArrow", Fk = h.forwardRef(
|
|
18152
18150
|
(e, t) => {
|
|
18153
18151
|
const { __scopeSelect: n, ...r } = e, o = ca(n), s = Vn(wi, n), a = Kn(wi, n);
|
|
18154
18152
|
return s.open && a.position === "popper" ? /* @__PURE__ */ u.jsx(Xi, { ...o, ...r, ref: t }) : null;
|
|
18155
18153
|
}
|
|
18156
18154
|
);
|
|
18157
|
-
|
|
18158
|
-
var
|
|
18155
|
+
Fk.displayName = wi;
|
|
18156
|
+
var Bk = "SelectBubbleInput", Rm = h.forwardRef(
|
|
18159
18157
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
18160
18158
|
const o = h.useRef(null), s = ze(r, o), a = tm(t);
|
|
18161
18159
|
return h.useEffect(() => {
|
|
@@ -18180,7 +18178,7 @@ var $k = "SelectBubbleInput", Rm = h.forwardRef(
|
|
|
18180
18178
|
);
|
|
18181
18179
|
}
|
|
18182
18180
|
);
|
|
18183
|
-
Rm.displayName =
|
|
18181
|
+
Rm.displayName = Bk;
|
|
18184
18182
|
function Im(e) {
|
|
18185
18183
|
return e === "" || e === void 0;
|
|
18186
18184
|
}
|
|
@@ -18200,18 +18198,18 @@ function Nm(e) {
|
|
|
18200
18198
|
}
|
|
18201
18199
|
function Am(e, t, n) {
|
|
18202
18200
|
const o = t.length > 1 && Array.from(t).every((c) => c === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
18203
|
-
let a =
|
|
18201
|
+
let a = zk(e, Math.max(s, 0));
|
|
18204
18202
|
o.length === 1 && (a = a.filter((c) => c !== n));
|
|
18205
18203
|
const l = a.find(
|
|
18206
18204
|
(c) => c.textValue.toLowerCase().startsWith(o.toLowerCase())
|
|
18207
18205
|
);
|
|
18208
18206
|
return l !== n ? l : void 0;
|
|
18209
18207
|
}
|
|
18210
|
-
function
|
|
18208
|
+
function zk(e, t) {
|
|
18211
18209
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
18212
18210
|
}
|
|
18213
|
-
var
|
|
18214
|
-
const
|
|
18211
|
+
var Hk = rm, jm = sm, Uk = im, Wk = lm, Vk = cm, _m = um, Kk = hm, Pm = xm, Mm = wm, qk = bm, Gk = Sm, Om = Tm, Dm = Cm, Lm = km;
|
|
18212
|
+
const kN = Hk, RN = Uk, Yk = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
|
|
18215
18213
|
jm,
|
|
18216
18214
|
{
|
|
18217
18215
|
ref: r,
|
|
@@ -18222,11 +18220,11 @@ const CN = Bk, EN = zk, qk = h.forwardRef(({ className: e, children: t, ...n },
|
|
|
18222
18220
|
...n,
|
|
18223
18221
|
children: [
|
|
18224
18222
|
t,
|
|
18225
|
-
/* @__PURE__ */ u.jsx(
|
|
18223
|
+
/* @__PURE__ */ u.jsx(Wk, { asChild: !0, children: /* @__PURE__ */ u.jsx(Ns, { className: "h-4 w-4 opacity-50" }) })
|
|
18226
18224
|
]
|
|
18227
18225
|
}
|
|
18228
18226
|
));
|
|
18229
|
-
|
|
18227
|
+
Yk.displayName = jm.displayName;
|
|
18230
18228
|
const $m = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
18231
18229
|
Om,
|
|
18232
18230
|
{
|
|
@@ -18253,7 +18251,7 @@ const Fm = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18253
18251
|
}
|
|
18254
18252
|
));
|
|
18255
18253
|
Fm.displayName = Dm.displayName;
|
|
18256
|
-
const
|
|
18254
|
+
const Xk = h.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ u.jsx(Vk, { children: /* @__PURE__ */ u.jsxs(
|
|
18257
18255
|
_m,
|
|
18258
18256
|
{
|
|
18259
18257
|
ref: o,
|
|
@@ -18267,7 +18265,7 @@ const Gk = h.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
18267
18265
|
children: [
|
|
18268
18266
|
/* @__PURE__ */ u.jsx($m, {}),
|
|
18269
18267
|
/* @__PURE__ */ u.jsx(
|
|
18270
|
-
|
|
18268
|
+
Kk,
|
|
18271
18269
|
{
|
|
18272
18270
|
className: ne(
|
|
18273
18271
|
"p-1",
|
|
@@ -18280,8 +18278,8 @@ const Gk = h.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
18280
18278
|
]
|
|
18281
18279
|
}
|
|
18282
18280
|
) }));
|
|
18283
|
-
|
|
18284
|
-
const
|
|
18281
|
+
Xk.displayName = _m.displayName;
|
|
18282
|
+
const Jk = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
18285
18283
|
Pm,
|
|
18286
18284
|
{
|
|
18287
18285
|
ref: n,
|
|
@@ -18289,8 +18287,8 @@ const Yk = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18289
18287
|
...t
|
|
18290
18288
|
}
|
|
18291
18289
|
));
|
|
18292
|
-
|
|
18293
|
-
const
|
|
18290
|
+
Jk.displayName = Pm.displayName;
|
|
18291
|
+
const Zk = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
|
|
18294
18292
|
Mm,
|
|
18295
18293
|
{
|
|
18296
18294
|
ref: r,
|
|
@@ -18300,13 +18298,13 @@ const Xk = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
18300
18298
|
),
|
|
18301
18299
|
...n,
|
|
18302
18300
|
children: [
|
|
18303
|
-
/* @__PURE__ */ u.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ u.jsx(
|
|
18304
|
-
/* @__PURE__ */ u.jsx(
|
|
18301
|
+
/* @__PURE__ */ u.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ u.jsx(Gk, { children: /* @__PURE__ */ u.jsx(Is, { className: "h-4 w-4" }) }) }),
|
|
18302
|
+
/* @__PURE__ */ u.jsx(qk, { children: t })
|
|
18305
18303
|
]
|
|
18306
18304
|
}
|
|
18307
18305
|
));
|
|
18308
|
-
|
|
18309
|
-
const
|
|
18306
|
+
Zk.displayName = Mm.displayName;
|
|
18307
|
+
const Qk = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
18310
18308
|
Lm,
|
|
18311
18309
|
{
|
|
18312
18310
|
ref: n,
|
|
@@ -18314,9 +18312,9 @@ const Jk = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18314
18312
|
...t
|
|
18315
18313
|
}
|
|
18316
18314
|
));
|
|
18317
|
-
|
|
18318
|
-
var
|
|
18319
|
-
const { decorative: n, orientation: r = ku, ...o } = e, s =
|
|
18315
|
+
Qk.displayName = Lm.displayName;
|
|
18316
|
+
var eR = "Separator", ku = "horizontal", tR = ["horizontal", "vertical"], Bm = h.forwardRef((e, t) => {
|
|
18317
|
+
const { decorative: n, orientation: r = ku, ...o } = e, s = nR(r) ? r : ku, i = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
18320
18318
|
return /* @__PURE__ */ u.jsx(
|
|
18321
18319
|
ve.div,
|
|
18322
18320
|
{
|
|
@@ -18327,12 +18325,12 @@ var Zk = "Separator", ku = "horizontal", Qk = ["horizontal", "vertical"], Bm = h
|
|
|
18327
18325
|
}
|
|
18328
18326
|
);
|
|
18329
18327
|
});
|
|
18330
|
-
Bm.displayName =
|
|
18331
|
-
function
|
|
18332
|
-
return
|
|
18328
|
+
Bm.displayName = eR;
|
|
18329
|
+
function nR(e) {
|
|
18330
|
+
return tR.includes(e);
|
|
18333
18331
|
}
|
|
18334
18332
|
var zm = Bm;
|
|
18335
|
-
const
|
|
18333
|
+
const rR = h.forwardRef(
|
|
18336
18334
|
({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, o) => /* @__PURE__ */ u.jsx(
|
|
18337
18335
|
zm,
|
|
18338
18336
|
{
|
|
@@ -18348,8 +18346,8 @@ const tR = h.forwardRef(
|
|
|
18348
18346
|
}
|
|
18349
18347
|
)
|
|
18350
18348
|
);
|
|
18351
|
-
|
|
18352
|
-
var ua = "Switch", [
|
|
18349
|
+
rR.displayName = zm.displayName;
|
|
18350
|
+
var ua = "Switch", [oR, IN] = xn(ua), [sR, aR] = oR(ua), Hm = h.forwardRef(
|
|
18353
18351
|
(e, t) => {
|
|
18354
18352
|
const {
|
|
18355
18353
|
__scopeSwitch: n,
|
|
@@ -18368,7 +18366,7 @@ var ua = "Switch", [nR, kN] = xn(ua), [rR, oR] = nR(ua), Hm = h.forwardRef(
|
|
|
18368
18366
|
onChange: c,
|
|
18369
18367
|
caller: ua
|
|
18370
18368
|
});
|
|
18371
|
-
return /* @__PURE__ */ u.jsxs(
|
|
18369
|
+
return /* @__PURE__ */ u.jsxs(sR, { scope: n, checked: b, disabled: i, children: [
|
|
18372
18370
|
/* @__PURE__ */ u.jsx(
|
|
18373
18371
|
ve.button,
|
|
18374
18372
|
{
|
|
@@ -18407,7 +18405,7 @@ var ua = "Switch", [nR, kN] = xn(ua), [rR, oR] = nR(ua), Hm = h.forwardRef(
|
|
|
18407
18405
|
Hm.displayName = ua;
|
|
18408
18406
|
var Um = "SwitchThumb", Wm = h.forwardRef(
|
|
18409
18407
|
(e, t) => {
|
|
18410
|
-
const { __scopeSwitch: n, ...r } = e, o =
|
|
18408
|
+
const { __scopeSwitch: n, ...r } = e, o = aR(Um, n);
|
|
18411
18409
|
return /* @__PURE__ */ u.jsx(
|
|
18412
18410
|
ve.span,
|
|
18413
18411
|
{
|
|
@@ -18420,7 +18418,7 @@ var Um = "SwitchThumb", Wm = h.forwardRef(
|
|
|
18420
18418
|
}
|
|
18421
18419
|
);
|
|
18422
18420
|
Wm.displayName = Um;
|
|
18423
|
-
var
|
|
18421
|
+
var iR = "SwitchBubbleInput", Vm = h.forwardRef(
|
|
18424
18422
|
({
|
|
18425
18423
|
__scopeSwitch: e,
|
|
18426
18424
|
control: t,
|
|
@@ -18461,12 +18459,12 @@ var sR = "SwitchBubbleInput", Vm = h.forwardRef(
|
|
|
18461
18459
|
);
|
|
18462
18460
|
}
|
|
18463
18461
|
);
|
|
18464
|
-
Vm.displayName =
|
|
18462
|
+
Vm.displayName = iR;
|
|
18465
18463
|
function Km(e) {
|
|
18466
18464
|
return e ? "checked" : "unchecked";
|
|
18467
18465
|
}
|
|
18468
|
-
var qm = Hm,
|
|
18469
|
-
const
|
|
18466
|
+
var qm = Hm, lR = Wm;
|
|
18467
|
+
const cR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
18470
18468
|
qm,
|
|
18471
18469
|
{
|
|
18472
18470
|
className: ne(
|
|
@@ -18476,7 +18474,7 @@ const iR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18476
18474
|
...t,
|
|
18477
18475
|
ref: n,
|
|
18478
18476
|
children: /* @__PURE__ */ u.jsx(
|
|
18479
|
-
|
|
18477
|
+
lR,
|
|
18480
18478
|
{
|
|
18481
18479
|
className: ne(
|
|
18482
18480
|
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
@@ -18485,8 +18483,8 @@ const iR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18485
18483
|
)
|
|
18486
18484
|
}
|
|
18487
18485
|
));
|
|
18488
|
-
|
|
18489
|
-
const
|
|
18486
|
+
cR.displayName = qm.displayName;
|
|
18487
|
+
const NN = Sl, AN = AC, uR = Tl, Gm = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
18490
18488
|
_o,
|
|
18491
18489
|
{
|
|
18492
18490
|
className: ne(
|
|
@@ -18498,7 +18496,7 @@ const RN = Sl, IN = AC, lR = Tl, Gm = h.forwardRef(({ className: e, ...t }, n) =
|
|
|
18498
18496
|
}
|
|
18499
18497
|
));
|
|
18500
18498
|
Gm.displayName = _o.displayName;
|
|
18501
|
-
const
|
|
18499
|
+
const dR = mo(
|
|
18502
18500
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
18503
18501
|
{
|
|
18504
18502
|
variants: {
|
|
@@ -18513,13 +18511,13 @@ const cR = mo(
|
|
|
18513
18511
|
side: "right"
|
|
18514
18512
|
}
|
|
18515
18513
|
}
|
|
18516
|
-
),
|
|
18514
|
+
), fR = h.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ u.jsxs(uR, { children: [
|
|
18517
18515
|
/* @__PURE__ */ u.jsx(Gm, {}),
|
|
18518
18516
|
/* @__PURE__ */ u.jsxs(
|
|
18519
18517
|
Po,
|
|
18520
18518
|
{
|
|
18521
18519
|
ref: o,
|
|
18522
|
-
className: ne(
|
|
18520
|
+
className: ne(dR({ side: e }), t),
|
|
18523
18521
|
...r,
|
|
18524
18522
|
children: [
|
|
18525
18523
|
n,
|
|
@@ -18531,8 +18529,8 @@ const cR = mo(
|
|
|
18531
18529
|
}
|
|
18532
18530
|
)
|
|
18533
18531
|
] }));
|
|
18534
|
-
|
|
18535
|
-
const
|
|
18532
|
+
fR.displayName = Po.displayName;
|
|
18533
|
+
const pR = ({
|
|
18536
18534
|
className: e,
|
|
18537
18535
|
...t
|
|
18538
18536
|
}) => /* @__PURE__ */ u.jsx(
|
|
@@ -18545,8 +18543,8 @@ const dR = ({
|
|
|
18545
18543
|
...t
|
|
18546
18544
|
}
|
|
18547
18545
|
);
|
|
18548
|
-
|
|
18549
|
-
const
|
|
18546
|
+
pR.displayName = "SheetHeader";
|
|
18547
|
+
const hR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
18550
18548
|
rr,
|
|
18551
18549
|
{
|
|
18552
18550
|
ref: n,
|
|
@@ -18554,8 +18552,8 @@ const fR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18554
18552
|
...t
|
|
18555
18553
|
}
|
|
18556
18554
|
));
|
|
18557
|
-
|
|
18558
|
-
const
|
|
18555
|
+
hR.displayName = rr.displayName;
|
|
18556
|
+
const mR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
18559
18557
|
na,
|
|
18560
18558
|
{
|
|
18561
18559
|
ref: n,
|
|
@@ -18563,13 +18561,13 @@ const pR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18563
18561
|
...t
|
|
18564
18562
|
}
|
|
18565
18563
|
));
|
|
18566
|
-
|
|
18567
|
-
var [da,
|
|
18564
|
+
mR.displayName = na.displayName;
|
|
18565
|
+
var [da, jN] = xn("Tooltip", [
|
|
18568
18566
|
Br
|
|
18569
|
-
]), fa = Br(), Ym = "TooltipProvider",
|
|
18567
|
+
]), fa = Br(), Ym = "TooltipProvider", gR = 700, bi = "tooltip.open", [xR, Ll] = da(Ym), Xm = (e) => {
|
|
18570
18568
|
const {
|
|
18571
18569
|
__scopeTooltip: t,
|
|
18572
|
-
delayDuration: n =
|
|
18570
|
+
delayDuration: n = gR,
|
|
18573
18571
|
skipDelayDuration: r = 300,
|
|
18574
18572
|
disableHoverableContent: o = !1,
|
|
18575
18573
|
children: s
|
|
@@ -18578,7 +18576,7 @@ var [da, NN] = xn("Tooltip", [
|
|
|
18578
18576
|
const c = l.current;
|
|
18579
18577
|
return () => window.clearTimeout(c);
|
|
18580
18578
|
}, []), /* @__PURE__ */ u.jsx(
|
|
18581
|
-
|
|
18579
|
+
xR,
|
|
18582
18580
|
{
|
|
18583
18581
|
scope: t,
|
|
18584
18582
|
isOpenDelayedRef: a,
|
|
@@ -18602,7 +18600,7 @@ var [da, NN] = xn("Tooltip", [
|
|
|
18602
18600
|
);
|
|
18603
18601
|
};
|
|
18604
18602
|
Xm.displayName = Ym;
|
|
18605
|
-
var ho = "Tooltip", [
|
|
18603
|
+
var ho = "Tooltip", [vR, pa] = da(ho), Jm = (e) => {
|
|
18606
18604
|
const {
|
|
18607
18605
|
__scopeTooltip: t,
|
|
18608
18606
|
children: n,
|
|
@@ -18630,7 +18628,7 @@ var ho = "Tooltip", [gR, pa] = da(ho), Jm = (e) => {
|
|
|
18630
18628
|
return h.useEffect(() => () => {
|
|
18631
18629
|
f.current && (window.clearTimeout(f.current), f.current = 0);
|
|
18632
18630
|
}, []), /* @__PURE__ */ u.jsx(qi, { ...c, children: /* @__PURE__ */ u.jsx(
|
|
18633
|
-
|
|
18631
|
+
vR,
|
|
18634
18632
|
{
|
|
18635
18633
|
scope: t,
|
|
18636
18634
|
contentId: m,
|
|
@@ -18681,19 +18679,19 @@ var yi = "TooltipTrigger", Zm = h.forwardRef(
|
|
|
18681
18679
|
}
|
|
18682
18680
|
);
|
|
18683
18681
|
Zm.displayName = yi;
|
|
18684
|
-
var
|
|
18682
|
+
var wR = "TooltipPortal", [_N, bR] = da(wR, {
|
|
18685
18683
|
forceMount: void 0
|
|
18686
18684
|
}), _r = "TooltipContent", Qm = h.forwardRef(
|
|
18687
18685
|
(e, t) => {
|
|
18688
|
-
const n =
|
|
18689
|
-
return /* @__PURE__ */ u.jsx(Yt, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ u.jsx(eg, { side: o, ...s, ref: t }) : /* @__PURE__ */ u.jsx(
|
|
18686
|
+
const n = bR(_r, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, a = pa(_r, e.__scopeTooltip);
|
|
18687
|
+
return /* @__PURE__ */ u.jsx(Yt, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ u.jsx(eg, { side: o, ...s, ref: t }) : /* @__PURE__ */ u.jsx(yR, { side: o, ...s, ref: t }) });
|
|
18690
18688
|
}
|
|
18691
|
-
),
|
|
18689
|
+
), yR = h.forwardRef((e, t) => {
|
|
18692
18690
|
const n = pa(_r, e.__scopeTooltip), r = Ll(_r, e.__scopeTooltip), o = h.useRef(null), s = ze(t, o), [a, i] = h.useState(null), { trigger: l, onClose: c } = n, d = o.current, { onPointerInTransitChange: p } = r, m = h.useCallback(() => {
|
|
18693
18691
|
i(null), p(!1);
|
|
18694
18692
|
}, [p]), f = h.useCallback(
|
|
18695
18693
|
(v, g) => {
|
|
18696
|
-
const x = v.currentTarget, b = { x: v.clientX, y: v.clientY }, w =
|
|
18694
|
+
const x = v.currentTarget, b = { x: v.clientX, y: v.clientY }, w = kR(b, x.getBoundingClientRect()), y = RR(b, w), C = IR(g.getBoundingClientRect()), S = AR([...y, ...C]);
|
|
18697
18695
|
i(S), p(!0);
|
|
18698
18696
|
},
|
|
18699
18697
|
[p]
|
|
@@ -18708,13 +18706,13 @@ var xR = "TooltipPortal", [AN, vR] = da(xR, {
|
|
|
18708
18706
|
}, [l, d, f, m]), h.useEffect(() => {
|
|
18709
18707
|
if (a) {
|
|
18710
18708
|
const v = (g) => {
|
|
18711
|
-
const x = g.target, b = { x: g.clientX, y: g.clientY }, w = (l == null ? void 0 : l.contains(x)) || (d == null ? void 0 : d.contains(x)), y = !
|
|
18709
|
+
const x = g.target, b = { x: g.clientX, y: g.clientY }, w = (l == null ? void 0 : l.contains(x)) || (d == null ? void 0 : d.contains(x)), y = !NR(b, a);
|
|
18712
18710
|
w ? m() : y && (m(), c());
|
|
18713
18711
|
};
|
|
18714
18712
|
return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
|
|
18715
18713
|
}
|
|
18716
18714
|
}, [l, d, a, c, m]), /* @__PURE__ */ u.jsx(eg, { ...e, ref: s });
|
|
18717
|
-
}), [
|
|
18715
|
+
}), [SR, TR] = da(ho, { isInside: !1 }), CR = Lg("TooltipContent"), eg = h.forwardRef(
|
|
18718
18716
|
(e, t) => {
|
|
18719
18717
|
const {
|
|
18720
18718
|
__scopeTooltip: n,
|
|
@@ -18757,8 +18755,8 @@ var xR = "TooltipPortal", [AN, vR] = da(xR, {
|
|
|
18757
18755
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
18758
18756
|
},
|
|
18759
18757
|
children: [
|
|
18760
|
-
/* @__PURE__ */ u.jsx(
|
|
18761
|
-
/* @__PURE__ */ u.jsx(
|
|
18758
|
+
/* @__PURE__ */ u.jsx(CR, { children: r }),
|
|
18759
|
+
/* @__PURE__ */ u.jsx(SR, { scope: n, isInside: !0, children: /* @__PURE__ */ u.jsx(bk, { id: l.contentId, role: "tooltip", children: o || r }) })
|
|
18762
18760
|
]
|
|
18763
18761
|
}
|
|
18764
18762
|
)
|
|
@@ -18767,17 +18765,17 @@ var xR = "TooltipPortal", [AN, vR] = da(xR, {
|
|
|
18767
18765
|
}
|
|
18768
18766
|
);
|
|
18769
18767
|
Qm.displayName = _r;
|
|
18770
|
-
var tg = "TooltipArrow",
|
|
18768
|
+
var tg = "TooltipArrow", ER = h.forwardRef(
|
|
18771
18769
|
(e, t) => {
|
|
18772
18770
|
const { __scopeTooltip: n, ...r } = e, o = fa(n);
|
|
18773
|
-
return
|
|
18771
|
+
return TR(
|
|
18774
18772
|
tg,
|
|
18775
18773
|
n
|
|
18776
18774
|
).isInside ? null : /* @__PURE__ */ u.jsx(Xi, { ...o, ...r, ref: t });
|
|
18777
18775
|
}
|
|
18778
18776
|
);
|
|
18779
|
-
|
|
18780
|
-
function
|
|
18777
|
+
ER.displayName = tg;
|
|
18778
|
+
function kR(e, t) {
|
|
18781
18779
|
const n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), o = Math.abs(t.right - e.x), s = Math.abs(t.left - e.x);
|
|
18782
18780
|
switch (Math.min(n, r, o, s)) {
|
|
18783
18781
|
case s:
|
|
@@ -18792,7 +18790,7 @@ function CR(e, t) {
|
|
|
18792
18790
|
throw new Error("unreachable");
|
|
18793
18791
|
}
|
|
18794
18792
|
}
|
|
18795
|
-
function
|
|
18793
|
+
function RR(e, t, n = 5) {
|
|
18796
18794
|
const r = [];
|
|
18797
18795
|
switch (t) {
|
|
18798
18796
|
case "top":
|
|
@@ -18822,7 +18820,7 @@ function ER(e, t, n = 5) {
|
|
|
18822
18820
|
}
|
|
18823
18821
|
return r;
|
|
18824
18822
|
}
|
|
18825
|
-
function
|
|
18823
|
+
function IR(e) {
|
|
18826
18824
|
const { top: t, right: n, bottom: r, left: o } = e;
|
|
18827
18825
|
return [
|
|
18828
18826
|
{ x: o, y: t },
|
|
@@ -18831,7 +18829,7 @@ function kR(e) {
|
|
|
18831
18829
|
{ x: o, y: r }
|
|
18832
18830
|
];
|
|
18833
18831
|
}
|
|
18834
|
-
function
|
|
18832
|
+
function NR(e, t) {
|
|
18835
18833
|
const { x: n, y: r } = e;
|
|
18836
18834
|
let o = !1;
|
|
18837
18835
|
for (let s = 0, a = t.length - 1; s < t.length; a = s++) {
|
|
@@ -18840,11 +18838,11 @@ function RR(e, t) {
|
|
|
18840
18838
|
}
|
|
18841
18839
|
return o;
|
|
18842
18840
|
}
|
|
18843
|
-
function
|
|
18841
|
+
function AR(e) {
|
|
18844
18842
|
const t = e.slice();
|
|
18845
|
-
return t.sort((n, r) => n.x < r.x ? -1 : n.x > r.x ? 1 : n.y < r.y ? -1 : n.y > r.y ? 1 : 0),
|
|
18843
|
+
return t.sort((n, r) => n.x < r.x ? -1 : n.x > r.x ? 1 : n.y < r.y ? -1 : n.y > r.y ? 1 : 0), jR(t);
|
|
18846
18844
|
}
|
|
18847
|
-
function
|
|
18845
|
+
function jR(e) {
|
|
18848
18846
|
if (e.length <= 1) return e.slice();
|
|
18849
18847
|
const t = [];
|
|
18850
18848
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -18869,8 +18867,8 @@ function NR(e) {
|
|
|
18869
18867
|
}
|
|
18870
18868
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
18871
18869
|
}
|
|
18872
|
-
var
|
|
18873
|
-
const
|
|
18870
|
+
var _R = Xm, PR = Jm, MR = Zm, ng = Qm;
|
|
18871
|
+
const PN = _R, MN = PR, ON = MR, OR = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ u.jsx(
|
|
18874
18872
|
ng,
|
|
18875
18873
|
{
|
|
18876
18874
|
ref: r,
|
|
@@ -18882,8 +18880,8 @@ const jN = AR, _N = jR, PN = _R, PR = h.forwardRef(({ className: e, sideOffset:
|
|
|
18882
18880
|
...n
|
|
18883
18881
|
}
|
|
18884
18882
|
));
|
|
18885
|
-
|
|
18886
|
-
var $l = "ToastProvider", [Fl,
|
|
18883
|
+
OR.displayName = ng.displayName;
|
|
18884
|
+
var $l = "ToastProvider", [Fl, DR, LR] = Ls("Toast"), [rg, DN] = xn("Toast", [LR]), [$R, ha] = rg($l), og = (e) => {
|
|
18887
18885
|
const {
|
|
18888
18886
|
__scopeToast: t,
|
|
18889
18887
|
label: n = "Notification",
|
|
@@ -18895,7 +18893,7 @@ var $l = "ToastProvider", [Fl, MR, OR] = Ls("Toast"), [rg, MN] = xn("Toast", [OR
|
|
|
18895
18893
|
return n.trim() || console.error(
|
|
18896
18894
|
`Invalid prop \`label\` supplied to \`${$l}\`. Expected non-empty \`string\`.`
|
|
18897
18895
|
), /* @__PURE__ */ u.jsx(Fl.Provider, { scope: t, children: /* @__PURE__ */ u.jsx(
|
|
18898
|
-
|
|
18896
|
+
$R,
|
|
18899
18897
|
{
|
|
18900
18898
|
scope: t,
|
|
18901
18899
|
label: n,
|
|
@@ -18914,14 +18912,14 @@ var $l = "ToastProvider", [Fl, MR, OR] = Ls("Toast"), [rg, MN] = xn("Toast", [OR
|
|
|
18914
18912
|
) });
|
|
18915
18913
|
};
|
|
18916
18914
|
og.displayName = $l;
|
|
18917
|
-
var sg = "ToastViewport",
|
|
18915
|
+
var sg = "ToastViewport", FR = ["F8"], Si = "toast.viewportPause", Ti = "toast.viewportResume", ag = h.forwardRef(
|
|
18918
18916
|
(e, t) => {
|
|
18919
18917
|
const {
|
|
18920
18918
|
__scopeToast: n,
|
|
18921
|
-
hotkey: r =
|
|
18919
|
+
hotkey: r = FR,
|
|
18922
18920
|
label: o = "Notifications ({hotkey})",
|
|
18923
18921
|
...s
|
|
18924
|
-
} = e, a = ha(sg, n), i =
|
|
18922
|
+
} = e, a = ha(sg, n), i = DR(n), l = h.useRef(null), c = h.useRef(null), d = h.useRef(null), p = h.useRef(null), m = ze(t, p, a.onViewportChange), f = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), v = a.toastCount > 0;
|
|
18925
18923
|
h.useEffect(() => {
|
|
18926
18924
|
const x = (b) => {
|
|
18927
18925
|
var y;
|
|
@@ -18954,7 +18952,7 @@ var sg = "ToastViewport", LR = ["F8"], Si = "toast.viewportPause", Ti = "toast.v
|
|
|
18954
18952
|
const g = h.useCallback(
|
|
18955
18953
|
({ tabbingDirection: x }) => {
|
|
18956
18954
|
const w = i().map((y) => {
|
|
18957
|
-
const C = y.ref.current, S = [C, ...
|
|
18955
|
+
const C = y.ref.current, S = [C, ...ZR(C)];
|
|
18958
18956
|
return x === "forwards" ? S : S.reverse();
|
|
18959
18957
|
});
|
|
18960
18958
|
return (x === "forwards" ? w.reverse() : w).flat();
|
|
@@ -19039,7 +19037,7 @@ var ig = "ToastFocusProxy", Ci = h.forwardRef(
|
|
|
19039
19037
|
}
|
|
19040
19038
|
);
|
|
19041
19039
|
Ci.displayName = ig;
|
|
19042
|
-
var Do = "Toast",
|
|
19040
|
+
var Do = "Toast", BR = "toast.swipeStart", zR = "toast.swipeMove", HR = "toast.swipeCancel", UR = "toast.swipeEnd", lg = h.forwardRef(
|
|
19043
19041
|
(e, t) => {
|
|
19044
19042
|
const { forceMount: n, open: r, defaultOpen: o, onOpenChange: s, ...a } = e, [i, l] = On({
|
|
19045
19043
|
prop: r,
|
|
@@ -19048,7 +19046,7 @@ var Do = "Toast", $R = "toast.swipeStart", FR = "toast.swipeMove", BR = "toast.s
|
|
|
19048
19046
|
caller: Do
|
|
19049
19047
|
});
|
|
19050
19048
|
return /* @__PURE__ */ u.jsx(Yt, { present: n || i, children: /* @__PURE__ */ u.jsx(
|
|
19051
|
-
|
|
19049
|
+
KR,
|
|
19052
19050
|
{
|
|
19053
19051
|
open: i,
|
|
19054
19052
|
...a,
|
|
@@ -19075,10 +19073,10 @@ var Do = "Toast", $R = "toast.swipeStart", FR = "toast.swipeMove", BR = "toast.s
|
|
|
19075
19073
|
}
|
|
19076
19074
|
);
|
|
19077
19075
|
lg.displayName = Do;
|
|
19078
|
-
var [
|
|
19076
|
+
var [WR, VR] = rg(Do, {
|
|
19079
19077
|
onClose() {
|
|
19080
19078
|
}
|
|
19081
|
-
}),
|
|
19079
|
+
}), KR = h.forwardRef(
|
|
19082
19080
|
(e, t) => {
|
|
19083
19081
|
const {
|
|
19084
19082
|
__scopeToast: n,
|
|
@@ -19122,7 +19120,7 @@ var [HR, UR] = rg(Do, {
|
|
|
19122
19120
|
const H = h.useMemo(() => x ? mg(x) : null, [x]);
|
|
19123
19121
|
return g.viewport ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
19124
19122
|
H && /* @__PURE__ */ u.jsx(
|
|
19125
|
-
|
|
19123
|
+
qR,
|
|
19126
19124
|
{
|
|
19127
19125
|
__scopeToast: n,
|
|
19128
19126
|
role: "status",
|
|
@@ -19130,7 +19128,7 @@ var [HR, UR] = rg(Do, {
|
|
|
19130
19128
|
children: H
|
|
19131
19129
|
}
|
|
19132
19130
|
),
|
|
19133
|
-
/* @__PURE__ */ u.jsx(
|
|
19131
|
+
/* @__PURE__ */ u.jsx(WR, { scope: n, onClose: F, children: go.createPortal(
|
|
19134
19132
|
/* @__PURE__ */ u.jsx(Fl.ItemSlot, { scope: n, children: /* @__PURE__ */ u.jsx(
|
|
19135
19133
|
nb,
|
|
19136
19134
|
{
|
|
@@ -19156,9 +19154,9 @@ var [HR, UR] = rg(Do, {
|
|
|
19156
19154
|
onPointerMove: le(e.onPointerMove, (N) => {
|
|
19157
19155
|
if (!y.current) return;
|
|
19158
19156
|
const U = N.clientX - y.current.x, L = N.clientY - y.current.y, O = !!C.current, j = ["left", "right"].includes(g.swipeDirection), k = ["left", "up"].includes(g.swipeDirection) ? Math.min : Math.max, K = j ? k(0, U) : 0, J = j ? 0 : k(0, L), A = N.pointerType === "touch" ? 10 : 2, P = { x: K, y: J }, q = { originalEvent: N, delta: P };
|
|
19159
|
-
O ? (C.current = P, qo(
|
|
19157
|
+
O ? (C.current = P, qo(zR, p, q, {
|
|
19160
19158
|
discrete: !1
|
|
19161
|
-
})) : Ru(P, g.swipeDirection, A) ? (C.current = P, qo(
|
|
19159
|
+
})) : Ru(P, g.swipeDirection, A) ? (C.current = P, qo(BR, d, q, {
|
|
19162
19160
|
discrete: !1
|
|
19163
19161
|
}), N.target.setPointerCapture(N.pointerId)) : (Math.abs(U) > A || Math.abs(L) > A) && (y.current = null);
|
|
19164
19162
|
}),
|
|
@@ -19166,10 +19164,10 @@ var [HR, UR] = rg(Do, {
|
|
|
19166
19164
|
const U = C.current, L = N.target;
|
|
19167
19165
|
if (L.hasPointerCapture(N.pointerId) && L.releasePointerCapture(N.pointerId), C.current = null, y.current = null, U) {
|
|
19168
19166
|
const O = N.currentTarget, j = { originalEvent: N, delta: U };
|
|
19169
|
-
Ru(U, g.swipeDirection, g.swipeThreshold) ? qo(
|
|
19167
|
+
Ru(U, g.swipeDirection, g.swipeThreshold) ? qo(UR, f, j, {
|
|
19170
19168
|
discrete: !0
|
|
19171
19169
|
}) : qo(
|
|
19172
|
-
|
|
19170
|
+
HR,
|
|
19173
19171
|
m,
|
|
19174
19172
|
j,
|
|
19175
19173
|
{
|
|
@@ -19188,9 +19186,9 @@ var [HR, UR] = rg(Do, {
|
|
|
19188
19186
|
) })
|
|
19189
19187
|
] }) : null;
|
|
19190
19188
|
}
|
|
19191
|
-
),
|
|
19189
|
+
), qR = (e) => {
|
|
19192
19190
|
const { __scopeToast: t, children: n, ...r } = e, o = ha(Do, t), [s, a] = h.useState(!1), [i, l] = h.useState(!1);
|
|
19193
|
-
return
|
|
19191
|
+
return XR(() => a(!0)), h.useEffect(() => {
|
|
19194
19192
|
const c = window.setTimeout(() => l(!0), 1e3);
|
|
19195
19193
|
return () => window.clearTimeout(c);
|
|
19196
19194
|
}, []), i ? null : /* @__PURE__ */ u.jsx(Eo, { asChild: !0, children: /* @__PURE__ */ u.jsx(aa, { ...r, children: s && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
@@ -19198,20 +19196,20 @@ var [HR, UR] = rg(Do, {
|
|
|
19198
19196
|
" ",
|
|
19199
19197
|
n
|
|
19200
19198
|
] }) }) });
|
|
19201
|
-
},
|
|
19199
|
+
}, GR = "ToastTitle", cg = h.forwardRef(
|
|
19202
19200
|
(e, t) => {
|
|
19203
19201
|
const { __scopeToast: n, ...r } = e;
|
|
19204
19202
|
return /* @__PURE__ */ u.jsx(ve.div, { ...r, ref: t });
|
|
19205
19203
|
}
|
|
19206
19204
|
);
|
|
19207
|
-
cg.displayName =
|
|
19208
|
-
var
|
|
19205
|
+
cg.displayName = GR;
|
|
19206
|
+
var YR = "ToastDescription", ug = h.forwardRef(
|
|
19209
19207
|
(e, t) => {
|
|
19210
19208
|
const { __scopeToast: n, ...r } = e;
|
|
19211
19209
|
return /* @__PURE__ */ u.jsx(ve.div, { ...r, ref: t });
|
|
19212
19210
|
}
|
|
19213
19211
|
);
|
|
19214
|
-
ug.displayName =
|
|
19212
|
+
ug.displayName = YR;
|
|
19215
19213
|
var dg = "ToastAction", fg = h.forwardRef(
|
|
19216
19214
|
(e, t) => {
|
|
19217
19215
|
const { altText: n, ...r } = e;
|
|
@@ -19223,7 +19221,7 @@ var dg = "ToastAction", fg = h.forwardRef(
|
|
|
19223
19221
|
fg.displayName = dg;
|
|
19224
19222
|
var pg = "ToastClose", Bl = h.forwardRef(
|
|
19225
19223
|
(e, t) => {
|
|
19226
|
-
const { __scopeToast: n, ...r } = e, o =
|
|
19224
|
+
const { __scopeToast: n, ...r } = e, o = VR(pg, n);
|
|
19227
19225
|
return /* @__PURE__ */ u.jsx(hg, { asChild: !0, children: /* @__PURE__ */ u.jsx(
|
|
19228
19226
|
ve.button,
|
|
19229
19227
|
{
|
|
@@ -19251,7 +19249,7 @@ var hg = h.forwardRef((e, t) => {
|
|
|
19251
19249
|
function mg(e) {
|
|
19252
19250
|
const t = [];
|
|
19253
19251
|
return Array.from(e.childNodes).forEach((r) => {
|
|
19254
|
-
if (r.nodeType === r.TEXT_NODE && r.textContent && t.push(r.textContent),
|
|
19252
|
+
if (r.nodeType === r.TEXT_NODE && r.textContent && t.push(r.textContent), JR(r)) {
|
|
19255
19253
|
const o = r.ariaHidden || r.hidden || r.style.display === "none", s = r.dataset.radixToastAnnounceExclude === "";
|
|
19256
19254
|
if (!o)
|
|
19257
19255
|
if (s) {
|
|
@@ -19270,7 +19268,7 @@ var Ru = (e, t, n = 0) => {
|
|
|
19270
19268
|
const r = Math.abs(e.x), o = Math.abs(e.y), s = r > o;
|
|
19271
19269
|
return t === "left" || t === "right" ? s && r > n : !s && o > n;
|
|
19272
19270
|
};
|
|
19273
|
-
function
|
|
19271
|
+
function XR(e = () => {
|
|
19274
19272
|
}) {
|
|
19275
19273
|
const t = bt(e);
|
|
19276
19274
|
_t(() => {
|
|
@@ -19280,10 +19278,10 @@ function GR(e = () => {
|
|
|
19280
19278
|
};
|
|
19281
19279
|
}, [t]);
|
|
19282
19280
|
}
|
|
19283
|
-
function
|
|
19281
|
+
function JR(e) {
|
|
19284
19282
|
return e.nodeType === e.ELEMENT_NODE;
|
|
19285
19283
|
}
|
|
19286
|
-
function
|
|
19284
|
+
function ZR(e) {
|
|
19287
19285
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
19288
19286
|
acceptNode: (r) => {
|
|
19289
19287
|
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -19297,8 +19295,8 @@ function Ua(e) {
|
|
|
19297
19295
|
const t = document.activeElement;
|
|
19298
19296
|
return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
|
|
19299
19297
|
}
|
|
19300
|
-
var
|
|
19301
|
-
const
|
|
19298
|
+
var QR = og, gg = ag, xg = lg, vg = cg, wg = ug, bg = fg, yg = Bl;
|
|
19299
|
+
const eI = QR, Sg = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
19302
19300
|
gg,
|
|
19303
19301
|
{
|
|
19304
19302
|
ref: n,
|
|
@@ -19310,7 +19308,7 @@ const ZR = JR, Sg = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
|
19310
19308
|
}
|
|
19311
19309
|
));
|
|
19312
19310
|
Sg.displayName = gg.displayName;
|
|
19313
|
-
const
|
|
19311
|
+
const tI = mo(
|
|
19314
19312
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
19315
19313
|
{
|
|
19316
19314
|
variants: {
|
|
@@ -19327,12 +19325,12 @@ const QR = mo(
|
|
|
19327
19325
|
xg,
|
|
19328
19326
|
{
|
|
19329
19327
|
ref: r,
|
|
19330
|
-
className: ne(
|
|
19328
|
+
className: ne(tI({ variant: t }), e),
|
|
19331
19329
|
...n
|
|
19332
19330
|
}
|
|
19333
19331
|
));
|
|
19334
19332
|
Tg.displayName = xg.displayName;
|
|
19335
|
-
const
|
|
19333
|
+
const nI = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
19336
19334
|
bg,
|
|
19337
19335
|
{
|
|
19338
19336
|
ref: n,
|
|
@@ -19343,7 +19341,7 @@ const eI = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
19343
19341
|
...t
|
|
19344
19342
|
}
|
|
19345
19343
|
));
|
|
19346
|
-
|
|
19344
|
+
nI.displayName = bg.displayName;
|
|
19347
19345
|
const Cg = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
19348
19346
|
yg,
|
|
19349
19347
|
{
|
|
@@ -19376,9 +19374,9 @@ const kg = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
19376
19374
|
}
|
|
19377
19375
|
));
|
|
19378
19376
|
kg.displayName = wg.displayName;
|
|
19379
|
-
function
|
|
19377
|
+
function LN() {
|
|
19380
19378
|
const { toasts: e } = Rl();
|
|
19381
|
-
return /* @__PURE__ */ u.jsxs(
|
|
19379
|
+
return /* @__PURE__ */ u.jsxs(eI, { children: [
|
|
19382
19380
|
e.map(function({ id: t, title: n, description: r, action: o, ...s }) {
|
|
19383
19381
|
return /* @__PURE__ */ u.jsxs(Tg, { ...s, children: [
|
|
19384
19382
|
/* @__PURE__ */ u.jsxs("div", { className: "grid gap-1", children: [
|
|
@@ -19392,7 +19390,7 @@ function ON() {
|
|
|
19392
19390
|
/* @__PURE__ */ u.jsx(Sg, {})
|
|
19393
19391
|
] });
|
|
19394
19392
|
}
|
|
19395
|
-
var
|
|
19393
|
+
var rI = (e, t, n, r, o, s, a, i) => {
|
|
19396
19394
|
let l = document.documentElement, c = ["light", "dark"];
|
|
19397
19395
|
function d(f) {
|
|
19398
19396
|
(Array.isArray(e) ? e : [e]).forEach((v) => {
|
|
@@ -19412,29 +19410,29 @@ var tI = (e, t, n, r, o, s, a, i) => {
|
|
|
19412
19410
|
d(v);
|
|
19413
19411
|
} catch {
|
|
19414
19412
|
}
|
|
19415
|
-
},
|
|
19416
|
-
}, themes: [] },
|
|
19413
|
+
}, oI = h.createContext(void 0), sI = { setTheme: (e) => {
|
|
19414
|
+
}, themes: [] }, aI = () => {
|
|
19417
19415
|
var e;
|
|
19418
|
-
return (e = h.useContext(
|
|
19416
|
+
return (e = h.useContext(oI)) != null ? e : sI;
|
|
19419
19417
|
};
|
|
19420
19418
|
h.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: o, defaultTheme: s, value: a, themes: i, nonce: l, scriptProps: c }) => {
|
|
19421
19419
|
let d = JSON.stringify([n, t, s, e, i, a, r, o]).slice(1, -1);
|
|
19422
|
-
return h.createElement("script", { ...c, suppressHydrationWarning: !0, nonce: typeof window > "u" ? l : "", dangerouslySetInnerHTML: { __html: `(${
|
|
19420
|
+
return h.createElement("script", { ...c, suppressHydrationWarning: !0, nonce: typeof window > "u" ? l : "", dangerouslySetInnerHTML: { __html: `(${rI.toString()})(${d})` } });
|
|
19423
19421
|
});
|
|
19424
|
-
var
|
|
19422
|
+
var iI = (e) => {
|
|
19425
19423
|
switch (e) {
|
|
19426
19424
|
case "success":
|
|
19427
|
-
return lI;
|
|
19428
|
-
case "info":
|
|
19429
19425
|
return uI;
|
|
19426
|
+
case "info":
|
|
19427
|
+
return fI;
|
|
19430
19428
|
case "warning":
|
|
19431
|
-
return cI;
|
|
19432
|
-
case "error":
|
|
19433
19429
|
return dI;
|
|
19430
|
+
case "error":
|
|
19431
|
+
return pI;
|
|
19434
19432
|
default:
|
|
19435
19433
|
return null;
|
|
19436
19434
|
}
|
|
19437
|
-
},
|
|
19435
|
+
}, lI = Array(12).fill(0), cI = ({ visible: e, className: t }) => M.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, M.createElement("div", { className: "sonner-spinner" }, lI.map((n, r) => M.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), uI = M.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, M.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), dI = M.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, M.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), fI = M.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, M.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), pI = M.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, M.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), hI = M.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, M.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), M.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), mI = () => {
|
|
19438
19436
|
let [e, t] = M.useState(document.hidden);
|
|
19439
19437
|
return M.useEffect(() => {
|
|
19440
19438
|
let n = () => {
|
|
@@ -19442,7 +19440,7 @@ var sI = (e) => {
|
|
|
19442
19440
|
};
|
|
19443
19441
|
return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
|
|
19444
19442
|
}, []), e;
|
|
19445
|
-
}, Ei = 1,
|
|
19443
|
+
}, Ei = 1, gI = class {
|
|
19446
19444
|
constructor() {
|
|
19447
19445
|
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
|
19448
19446
|
let t = this.subscribers.indexOf(e);
|
|
@@ -19463,7 +19461,7 @@ var sI = (e) => {
|
|
|
19463
19461
|
t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
|
|
19464
19462
|
let r = e instanceof Promise ? e : e(), o = n !== void 0, s, a = r.then(async (l) => {
|
|
19465
19463
|
if (s = ["resolve", l], M.isValidElement(l)) o = !1, this.create({ id: n, type: "default", message: l });
|
|
19466
|
-
else if (
|
|
19464
|
+
else if (vI(l) && !l.ok) {
|
|
19467
19465
|
o = !1;
|
|
19468
19466
|
let c = typeof t.error == "function" ? await t.error(`HTTP error! status: ${l.status}`) : t.error, d = typeof t.description == "function" ? await t.description(`HTTP error! status: ${l.status}`) : t.description;
|
|
19469
19467
|
this.create({ id: n, type: "error", message: c, description: d });
|
|
@@ -19488,35 +19486,35 @@ var sI = (e) => {
|
|
|
19488
19486
|
return this.create({ jsx: e(n), id: n, ...t }), n;
|
|
19489
19487
|
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
19490
19488
|
}
|
|
19491
|
-
}, Vt = new
|
|
19489
|
+
}, Vt = new gI(), xI = (e, t) => {
|
|
19492
19490
|
let n = (t == null ? void 0 : t.id) || Ei++;
|
|
19493
19491
|
return Vt.addToast({ title: e, ...t, id: n }), n;
|
|
19494
|
-
},
|
|
19495
|
-
Object.assign(
|
|
19496
|
-
function
|
|
19492
|
+
}, vI = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", wI = xI, bI = () => Vt.toasts, yI = () => Vt.getActiveToasts();
|
|
19493
|
+
Object.assign(wI, { success: Vt.success, info: Vt.info, warning: Vt.warning, error: Vt.error, custom: Vt.custom, message: Vt.message, promise: Vt.promise, dismiss: Vt.dismiss, loading: Vt.loading }, { getHistory: bI, getToasts: yI });
|
|
19494
|
+
function SI(e, { insertAt: t } = {}) {
|
|
19497
19495
|
if (typeof document > "u") return;
|
|
19498
19496
|
let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
|
|
19499
19497
|
r.type = "text/css", t === "top" && n.firstChild ? n.insertBefore(r, n.firstChild) : n.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e));
|
|
19500
19498
|
}
|
|
19501
|
-
bI(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
19499
|
+
SI(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
19502
19500
|
`);
|
|
19503
19501
|
function Go(e) {
|
|
19504
19502
|
return e.label !== void 0;
|
|
19505
19503
|
}
|
|
19506
|
-
var
|
|
19504
|
+
var TI = 3, CI = "32px", EI = "16px", Iu = 4e3, kI = 356, RI = 14, II = 20, NI = 200;
|
|
19507
19505
|
function un(...e) {
|
|
19508
19506
|
return e.filter(Boolean).join(" ");
|
|
19509
19507
|
}
|
|
19510
|
-
function
|
|
19508
|
+
function AI(e) {
|
|
19511
19509
|
let [t, n] = e.split("-"), r = [];
|
|
19512
19510
|
return t && r.push(t), n && r.push(n), r;
|
|
19513
19511
|
}
|
|
19514
|
-
var
|
|
19512
|
+
var jI = (e) => {
|
|
19515
19513
|
var t, n, r, o, s, a, i, l, c, d, p;
|
|
19516
|
-
let { invert: m, toast: f, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: y, toasts: C, expanded: S, removeToast: T, defaultRichColors: E, closeButton: R, style: _, cancelButtonStyle: D, actionButtonStyle: F, className: V = "", descriptionClassName: H = "", duration: N, position: U, gap: L, loadingIcon: O, expandByDefault: j, classNames: k, icons: K, closeButtonAriaLabel: J = "Close toast", pauseWhenPageIsHidden: A } = e, [P, q] = M.useState(null), [Y, re] = M.useState(null), [W, $] = M.useState(!1), [G, Z] = M.useState(!1), [X, B] = M.useState(!1), [ae, se] = M.useState(!1), [fe, Se] = M.useState(!1), [_e, Pe] = M.useState(0), [Ee, st] = M.useState(0), xt = M.useRef(f.duration || N || Iu), Et = M.useRef(null), Ve = M.useRef(null), Ue = y === 0, Ke = y + 1 <= b,
|
|
19514
|
+
let { invert: m, toast: f, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: y, toasts: C, expanded: S, removeToast: T, defaultRichColors: E, closeButton: R, style: _, cancelButtonStyle: D, actionButtonStyle: F, className: V = "", descriptionClassName: H = "", duration: N, position: U, gap: L, loadingIcon: O, expandByDefault: j, classNames: k, icons: K, closeButtonAriaLabel: J = "Close toast", pauseWhenPageIsHidden: A } = e, [P, q] = M.useState(null), [Y, re] = M.useState(null), [W, $] = M.useState(!1), [G, Z] = M.useState(!1), [X, B] = M.useState(!1), [ae, se] = M.useState(!1), [fe, Se] = M.useState(!1), [_e, Pe] = M.useState(0), [Ee, st] = M.useState(0), xt = M.useRef(f.duration || N || Iu), Et = M.useRef(null), Ve = M.useRef(null), Ue = y === 0, Ke = y + 1 <= b, De = f.type, He = f.dismissible !== !1, mt = f.className || "", Mt = f.descriptionClassName || "", at = M.useMemo(() => w.findIndex((xe) => xe.toastId === f.id) || 0, [w, f.id]), Pt = M.useMemo(() => {
|
|
19517
19515
|
var xe;
|
|
19518
19516
|
return (xe = f.closeButton) != null ? xe : R;
|
|
19519
|
-
}, [f.closeButton, R]), kt = M.useMemo(() => f.duration || N || Iu, [f.duration, N]), vt = M.useRef(0), St = M.useRef(0), gt = M.useRef(0), Tt = M.useRef(null), [tn, At] = U.split("-"), ce = M.useMemo(() => w.reduce((xe,
|
|
19517
|
+
}, [f.closeButton, R]), kt = M.useMemo(() => f.duration || N || Iu, [f.duration, N]), vt = M.useRef(0), St = M.useRef(0), gt = M.useRef(0), Tt = M.useRef(null), [tn, At] = U.split("-"), ce = M.useMemo(() => w.reduce((xe, $e, qe) => qe >= at ? xe : xe + $e.height, 0), [w, at]), Ie = mI(), ut = f.invert || m, te = De === "loading";
|
|
19520
19518
|
St.current = M.useMemo(() => at * L + ce, [at, ce]), M.useEffect(() => {
|
|
19521
19519
|
xt.current = kt;
|
|
19522
19520
|
}, [kt]), M.useEffect(() => {
|
|
@@ -19524,59 +19522,59 @@ var NI = (e) => {
|
|
|
19524
19522
|
}, []), M.useEffect(() => {
|
|
19525
19523
|
let xe = Ve.current;
|
|
19526
19524
|
if (xe) {
|
|
19527
|
-
let
|
|
19528
|
-
return st(
|
|
19525
|
+
let $e = xe.getBoundingClientRect().height;
|
|
19526
|
+
return st($e), x((qe) => [{ toastId: f.id, height: $e, position: f.position }, ...qe]), () => x((qe) => qe.filter((Rt) => Rt.toastId !== f.id));
|
|
19529
19527
|
}
|
|
19530
19528
|
}, [x, f.id]), M.useLayoutEffect(() => {
|
|
19531
19529
|
if (!W) return;
|
|
19532
|
-
let xe = Ve.current,
|
|
19530
|
+
let xe = Ve.current, $e = xe.style.height;
|
|
19533
19531
|
xe.style.height = "auto";
|
|
19534
19532
|
let qe = xe.getBoundingClientRect().height;
|
|
19535
|
-
xe.style.height =
|
|
19533
|
+
xe.style.height = $e, st(qe), x((Rt) => Rt.find((It) => It.toastId === f.id) ? Rt.map((It) => It.toastId === f.id ? { ...It, height: qe } : It) : [{ toastId: f.id, height: qe, position: f.position }, ...Rt]);
|
|
19536
19534
|
}, [W, f.title, f.description, x, f.id]);
|
|
19537
19535
|
let we = M.useCallback(() => {
|
|
19538
|
-
Z(!0), Pe(St.current), x((xe) => xe.filter((
|
|
19536
|
+
Z(!0), Pe(St.current), x((xe) => xe.filter(($e) => $e.toastId !== f.id)), setTimeout(() => {
|
|
19539
19537
|
T(f);
|
|
19540
|
-
},
|
|
19538
|
+
}, NI);
|
|
19541
19539
|
}, [f, T, x, St]);
|
|
19542
19540
|
M.useEffect(() => {
|
|
19543
|
-
if (f.promise &&
|
|
19541
|
+
if (f.promise && De === "loading" || f.duration === 1 / 0 || f.type === "loading") return;
|
|
19544
19542
|
let xe;
|
|
19545
19543
|
return S || g || A && Ie ? (() => {
|
|
19546
19544
|
if (gt.current < vt.current) {
|
|
19547
|
-
let
|
|
19548
|
-
xt.current = xt.current -
|
|
19545
|
+
let $e = (/* @__PURE__ */ new Date()).getTime() - vt.current;
|
|
19546
|
+
xt.current = xt.current - $e;
|
|
19549
19547
|
}
|
|
19550
19548
|
gt.current = (/* @__PURE__ */ new Date()).getTime();
|
|
19551
19549
|
})() : xt.current !== 1 / 0 && (vt.current = (/* @__PURE__ */ new Date()).getTime(), xe = setTimeout(() => {
|
|
19552
|
-
var
|
|
19553
|
-
(
|
|
19550
|
+
var $e;
|
|
19551
|
+
($e = f.onAutoClose) == null || $e.call(f, f), we();
|
|
19554
19552
|
}, xt.current)), () => clearTimeout(xe);
|
|
19555
|
-
}, [S, g, f,
|
|
19553
|
+
}, [S, g, f, De, A, Ie, we]), M.useEffect(() => {
|
|
19556
19554
|
f.delete && we();
|
|
19557
19555
|
}, [we, f.delete]);
|
|
19558
19556
|
function tt() {
|
|
19559
|
-
var xe,
|
|
19560
|
-
return K != null && K.loading ? M.createElement("div", { className: un(k == null ? void 0 : k.loader, (xe = f == null ? void 0 : f.classNames) == null ? void 0 : xe.loader, "sonner-loader"), "data-visible":
|
|
19557
|
+
var xe, $e, qe;
|
|
19558
|
+
return K != null && K.loading ? M.createElement("div", { className: un(k == null ? void 0 : k.loader, (xe = f == null ? void 0 : f.classNames) == null ? void 0 : xe.loader, "sonner-loader"), "data-visible": De === "loading" }, K.loading) : O ? M.createElement("div", { className: un(k == null ? void 0 : k.loader, ($e = f == null ? void 0 : f.classNames) == null ? void 0 : $e.loader, "sonner-loader"), "data-visible": De === "loading" }, O) : M.createElement(cI, { className: un(k == null ? void 0 : k.loader, (qe = f == null ? void 0 : f.classNames) == null ? void 0 : qe.loader), visible: De === "loading" });
|
|
19561
19559
|
}
|
|
19562
|
-
return M.createElement("li", { tabIndex: 0, ref: Ve, className: un(V, mt, k == null ? void 0 : k.toast, (t = f == null ? void 0 : f.classNames) == null ? void 0 : t.toast, k == null ? void 0 : k.default, k == null ? void 0 : k[
|
|
19560
|
+
return M.createElement("li", { tabIndex: 0, ref: Ve, className: un(V, mt, k == null ? void 0 : k.toast, (t = f == null ? void 0 : f.classNames) == null ? void 0 : t.toast, k == null ? void 0 : k.default, k == null ? void 0 : k[De], (n = f == null ? void 0 : f.classNames) == null ? void 0 : n[De]), "data-sonner-toast": "", "data-rich-colors": (r = f.richColors) != null ? r : E, "data-styled": !(f.jsx || f.unstyled || v), "data-mounted": W, "data-promise": !!f.promise, "data-swiped": fe, "data-removed": G, "data-visible": Ke, "data-y-position": tn, "data-x-position": At, "data-index": y, "data-front": Ue, "data-swiping": X, "data-dismissible": He, "data-type": De, "data-invert": ut, "data-swipe-out": ae, "data-swipe-direction": Y, "data-expanded": !!(S || j && W), style: { "--index": y, "--toasts-before": y, "--z-index": C.length - y, "--offset": `${G ? _e : St.current}px`, "--initial-height": j ? "auto" : `${Ee}px`, ..._, ...f.style }, onDragEnd: () => {
|
|
19563
19561
|
B(!1), q(null), Tt.current = null;
|
|
19564
19562
|
}, onPointerDown: (xe) => {
|
|
19565
19563
|
te || !He || (Et.current = /* @__PURE__ */ new Date(), Pe(St.current), xe.target.setPointerCapture(xe.pointerId), xe.target.tagName !== "BUTTON" && (B(!0), Tt.current = { x: xe.clientX, y: xe.clientY }));
|
|
19566
19564
|
}, onPointerUp: () => {
|
|
19567
|
-
var xe,
|
|
19565
|
+
var xe, $e, qe, Rt;
|
|
19568
19566
|
if (ae || !He) return;
|
|
19569
19567
|
Tt.current = null;
|
|
19570
|
-
let It = Number(((xe = Ve.current) == null ? void 0 : xe.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), jt = Number(((
|
|
19571
|
-
if (Math.abs(Ae) >=
|
|
19568
|
+
let It = Number(((xe = Ve.current) == null ? void 0 : xe.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), jt = Number((($e = Ve.current) == null ? void 0 : $e.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Ot = (/* @__PURE__ */ new Date()).getTime() - ((qe = Et.current) == null ? void 0 : qe.getTime()), Ae = P === "x" ? It : jt, pt = Math.abs(Ae) / Ot;
|
|
19569
|
+
if (Math.abs(Ae) >= II || pt > 0.11) {
|
|
19572
19570
|
Pe(St.current), (Rt = f.onDismiss) == null || Rt.call(f, f), re(P === "x" ? It > 0 ? "right" : "left" : jt > 0 ? "down" : "up"), we(), se(!0), Se(!1);
|
|
19573
19571
|
return;
|
|
19574
19572
|
}
|
|
19575
19573
|
B(!1), q(null);
|
|
19576
19574
|
}, onPointerMove: (xe) => {
|
|
19577
|
-
var
|
|
19578
|
-
if (!Tt.current || !He || ((
|
|
19579
|
-
let jt = xe.clientY - Tt.current.y, Ot = xe.clientX - Tt.current.x, Ae = (qe = e.swipeDirections) != null ? qe :
|
|
19575
|
+
var $e, qe, Rt, It;
|
|
19576
|
+
if (!Tt.current || !He || (($e = window.getSelection()) == null ? void 0 : $e.toString().length) > 0) return;
|
|
19577
|
+
let jt = xe.clientY - Tt.current.y, Ot = xe.clientX - Tt.current.x, Ae = (qe = e.swipeDirections) != null ? qe : AI(U);
|
|
19580
19578
|
!P && (Math.abs(Ot) > 1 || Math.abs(jt) > 1) && q(Math.abs(Ot) > Math.abs(jt) ? "x" : "y");
|
|
19581
19579
|
let pt = { x: 0, y: 0 };
|
|
19582
19580
|
P === "y" ? (Ae.includes("top") || Ae.includes("bottom")) && (Ae.includes("top") && jt < 0 || Ae.includes("bottom") && jt > 0) && (pt.y = jt) : P === "x" && (Ae.includes("left") || Ae.includes("right")) && (Ae.includes("left") && Ot < 0 || Ae.includes("right") && Ot > 0) && (pt.x = Ot), (Math.abs(pt.x) > 0 || Math.abs(pt.y) > 0) && Se(!0), (Rt = Ve.current) == null || Rt.style.setProperty("--swipe-amount-x", `${pt.x}px`), (It = Ve.current) == null || It.style.setProperty("--swipe-amount-y", `${pt.y}px`);
|
|
@@ -19584,12 +19582,12 @@ var NI = (e) => {
|
|
|
19584
19582
|
} : () => {
|
|
19585
19583
|
var xe;
|
|
19586
19584
|
we(), (xe = f.onDismiss) == null || xe.call(f, f);
|
|
19587
|
-
}, className: un(k == null ? void 0 : k.closeButton, (o = f == null ? void 0 : f.classNames) == null ? void 0 : o.closeButton) }, (s = K == null ? void 0 : K.close) != null ? s :
|
|
19588
|
-
var
|
|
19589
|
-
Go(f.cancel) && He && ((qe = (
|
|
19585
|
+
}, className: un(k == null ? void 0 : k.closeButton, (o = f == null ? void 0 : f.classNames) == null ? void 0 : o.closeButton) }, (s = K == null ? void 0 : K.close) != null ? s : hI) : null, f.jsx || ga(f.title) ? f.jsx ? f.jsx : typeof f.title == "function" ? f.title() : f.title : M.createElement(M.Fragment, null, De || f.icon || f.promise ? M.createElement("div", { "data-icon": "", className: un(k == null ? void 0 : k.icon, (a = f == null ? void 0 : f.classNames) == null ? void 0 : a.icon) }, f.promise || f.type === "loading" && !f.icon ? f.icon || tt() : null, f.type !== "loading" ? f.icon || (K == null ? void 0 : K[De]) || iI(De) : null) : null, M.createElement("div", { "data-content": "", className: un(k == null ? void 0 : k.content, (i = f == null ? void 0 : f.classNames) == null ? void 0 : i.content) }, M.createElement("div", { "data-title": "", className: un(k == null ? void 0 : k.title, (l = f == null ? void 0 : f.classNames) == null ? void 0 : l.title) }, typeof f.title == "function" ? f.title() : f.title), f.description ? M.createElement("div", { "data-description": "", className: un(H, Mt, k == null ? void 0 : k.description, (c = f == null ? void 0 : f.classNames) == null ? void 0 : c.description) }, typeof f.description == "function" ? f.description() : f.description) : null), ga(f.cancel) ? f.cancel : f.cancel && Go(f.cancel) ? M.createElement("button", { "data-button": !0, "data-cancel": !0, style: f.cancelButtonStyle || D, onClick: (xe) => {
|
|
19586
|
+
var $e, qe;
|
|
19587
|
+
Go(f.cancel) && He && ((qe = ($e = f.cancel).onClick) == null || qe.call($e, xe), we());
|
|
19590
19588
|
}, className: un(k == null ? void 0 : k.cancelButton, (d = f == null ? void 0 : f.classNames) == null ? void 0 : d.cancelButton) }, f.cancel.label) : null, ga(f.action) ? f.action : f.action && Go(f.action) ? M.createElement("button", { "data-button": !0, "data-action": !0, style: f.actionButtonStyle || F, onClick: (xe) => {
|
|
19591
|
-
var
|
|
19592
|
-
Go(f.action) && ((qe = (
|
|
19589
|
+
var $e, qe;
|
|
19590
|
+
Go(f.action) && ((qe = ($e = f.action).onClick) == null || qe.call($e, xe), !xe.defaultPrevented && we());
|
|
19593
19591
|
}, className: un(k == null ? void 0 : k.actionButton, (p = f == null ? void 0 : f.classNames) == null ? void 0 : p.actionButton) }, f.action.label) : null));
|
|
19594
19592
|
};
|
|
19595
19593
|
function Nu() {
|
|
@@ -19597,10 +19595,10 @@ function Nu() {
|
|
|
19597
19595
|
let e = document.documentElement.getAttribute("dir");
|
|
19598
19596
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
19599
19597
|
}
|
|
19600
|
-
function
|
|
19598
|
+
function _I(e, t) {
|
|
19601
19599
|
let n = {};
|
|
19602
19600
|
return [e, t].forEach((r, o) => {
|
|
19603
|
-
let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ?
|
|
19601
|
+
let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ? EI : CI;
|
|
19604
19602
|
function l(c) {
|
|
19605
19603
|
["top", "right", "bottom", "left"].forEach((d) => {
|
|
19606
19604
|
n[`${a}-${d}`] = typeof c == "number" ? `${c}px` : c;
|
|
@@ -19611,8 +19609,8 @@ function AI(e, t) {
|
|
|
19611
19609
|
}) : l(i);
|
|
19612
19610
|
}), n;
|
|
19613
19611
|
}
|
|
19614
|
-
var
|
|
19615
|
-
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: p, duration: m, style: f, visibleToasts: v =
|
|
19612
|
+
var PI = Og(function(e, t) {
|
|
19613
|
+
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: p, duration: m, style: f, visibleToasts: v = TI, toastOptions: g, dir: x = Nu(), gap: b = RI, loadingIcon: w, icons: y, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: S } = e, [T, E] = M.useState([]), R = M.useMemo(() => Array.from(new Set([r].concat(T.filter((A) => A.position).map((A) => A.position)))), [T, r]), [_, D] = M.useState([]), [F, V] = M.useState(!1), [H, N] = M.useState(!1), [U, L] = M.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), O = M.useRef(null), j = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), k = M.useRef(null), K = M.useRef(!1), J = M.useCallback((A) => {
|
|
19616
19614
|
E((P) => {
|
|
19617
19615
|
var q;
|
|
19618
19616
|
return (q = P.find((Y) => Y.id === A.id)) != null && q.delete || Vt.dismiss(A.id), P.filter(({ id: Y }) => Y !== A.id);
|
|
@@ -19666,7 +19664,7 @@ var jI = Og(function(e, t) {
|
|
|
19666
19664
|
}, [O.current]), M.createElement("section", { ref: t, "aria-label": `${C} ${j}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, R.map((A, P) => {
|
|
19667
19665
|
var q;
|
|
19668
19666
|
let [Y, re] = A.split("-");
|
|
19669
|
-
return T.length ? M.createElement("ol", { key: A, dir: x === "auto" ? Nu() : x, tabIndex: -1, ref: O, className: i, "data-sonner-toaster": !0, "data-theme": U, "data-y-position": Y, "data-lifted": F && T.length > 1 && !s, "data-x-position": re, style: { "--front-toast-height": `${((q = _[0]) == null ? void 0 : q.height) || 0}px`, "--width": `${
|
|
19667
|
+
return T.length ? M.createElement("ol", { key: A, dir: x === "auto" ? Nu() : x, tabIndex: -1, ref: O, className: i, "data-sonner-toaster": !0, "data-theme": U, "data-y-position": Y, "data-lifted": F && T.length > 1 && !s, "data-x-position": re, style: { "--front-toast-height": `${((q = _[0]) == null ? void 0 : q.height) || 0}px`, "--width": `${kI}px`, "--gap": `${b}px`, ...f, ..._I(l, c) }, onBlur: (W) => {
|
|
19670
19668
|
K.current && !W.currentTarget.contains(W.relatedTarget) && (K.current = !1, k.current && (k.current.focus({ preventScroll: !0 }), k.current = null));
|
|
19671
19669
|
}, onFocus: (W) => {
|
|
19672
19670
|
W.target instanceof HTMLElement && W.target.dataset.dismissible === "false" || K.current || (K.current = !0, k.current = W.relatedTarget);
|
|
@@ -19676,14 +19674,14 @@ var jI = Og(function(e, t) {
|
|
|
19676
19674
|
W.target instanceof HTMLElement && W.target.dataset.dismissible === "false" || N(!0);
|
|
19677
19675
|
}, onPointerUp: () => N(!1) }, T.filter((W) => !W.position && P === 0 || W.position === A).map((W, $) => {
|
|
19678
19676
|
var G, Z;
|
|
19679
|
-
return M.createElement(
|
|
19677
|
+
return M.createElement(jI, { key: W.id, icons: y, index: $, toast: W, defaultRichColors: p, duration: (G = g == null ? void 0 : g.duration) != null ? G : m, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (Z = g == null ? void 0 : g.closeButton) != null ? Z : a, interacting: H, position: A, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: J, toasts: T.filter((X) => X.position == W.position), heights: _.filter((X) => X.position == W.position), setHeights: D, expandByDefault: s, gap: b, loadingIcon: w, expanded: F, pauseWhenPageIsHidden: S, swipeDirections: e.swipeDirections });
|
|
19680
19678
|
})) : null;
|
|
19681
19679
|
}));
|
|
19682
19680
|
});
|
|
19683
|
-
const
|
|
19684
|
-
const { theme: t = "system" } =
|
|
19681
|
+
const $N = ({ ...e }) => {
|
|
19682
|
+
const { theme: t = "system" } = aI();
|
|
19685
19683
|
return /* @__PURE__ */ u.jsx(
|
|
19686
|
-
|
|
19684
|
+
PI,
|
|
19687
19685
|
{
|
|
19688
19686
|
theme: t,
|
|
19689
19687
|
className: "toaster group",
|
|
@@ -19700,11 +19698,11 @@ const DN = ({ ...e }) => {
|
|
|
19700
19698
|
);
|
|
19701
19699
|
};
|
|
19702
19700
|
export {
|
|
19703
|
-
|
|
19704
|
-
|
|
19701
|
+
uN as Api,
|
|
19702
|
+
cN as ApiClient,
|
|
19705
19703
|
Jv as ApiProvider,
|
|
19706
19704
|
aE as ArtifactRenderer,
|
|
19707
|
-
|
|
19705
|
+
yE as Badge,
|
|
19708
19706
|
nt as Button,
|
|
19709
19707
|
fh as Card,
|
|
19710
19708
|
gh as CardContent,
|
|
@@ -19712,11 +19710,11 @@ export {
|
|
|
19712
19710
|
ph as CardHeader,
|
|
19713
19711
|
hh as CardTitle,
|
|
19714
19712
|
ji as ChatApi,
|
|
19715
|
-
|
|
19713
|
+
yN as ChatApp,
|
|
19716
19714
|
GS as ChatInput,
|
|
19717
19715
|
to as ChatInterface,
|
|
19718
19716
|
Jr as ChatProviders,
|
|
19719
|
-
|
|
19717
|
+
TN as ChatWidget,
|
|
19720
19718
|
Ah as Command,
|
|
19721
19719
|
Ph as CommandEmpty,
|
|
19722
19720
|
Mh as CommandGroup,
|
|
@@ -19736,50 +19734,50 @@ export {
|
|
|
19736
19734
|
qv as HISTORY_TIMEOUT_MS,
|
|
19737
19735
|
Jh as Input,
|
|
19738
19736
|
iE as InterruptPartRenderer,
|
|
19739
|
-
|
|
19737
|
+
vk as Label,
|
|
19740
19738
|
Mo as MarkdownContent,
|
|
19741
19739
|
Al as MessageComponent,
|
|
19742
19740
|
yh as MessageList,
|
|
19743
19741
|
bh as MessageRow,
|
|
19744
|
-
|
|
19742
|
+
CN as NewChatButton,
|
|
19745
19743
|
nE as PlotArtifact,
|
|
19746
19744
|
sE as ResearchTaskArtifact,
|
|
19747
19745
|
Ed as SETTINGS_STORAGE_KEY,
|
|
19748
19746
|
Yh as ScrollArea,
|
|
19749
|
-
|
|
19750
|
-
|
|
19751
|
-
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
-
|
|
19755
|
-
|
|
19756
|
-
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19747
|
+
kN as Select,
|
|
19748
|
+
Xk as SelectContent,
|
|
19749
|
+
Zk as SelectItem,
|
|
19750
|
+
Yk as SelectTrigger,
|
|
19751
|
+
RN as SelectValue,
|
|
19752
|
+
rR as Separator,
|
|
19753
|
+
NN as Sheet,
|
|
19754
|
+
fR as SheetContent,
|
|
19755
|
+
mR as SheetDescription,
|
|
19756
|
+
pR as SheetHeader,
|
|
19757
|
+
hR as SheetTitle,
|
|
19758
|
+
AN as SheetTrigger,
|
|
19759
|
+
SN as SimpleChat,
|
|
19762
19760
|
vh as SimpleJsonView,
|
|
19763
|
-
|
|
19761
|
+
$N as Sonner,
|
|
19764
19762
|
cE as StreamProgress,
|
|
19765
|
-
|
|
19763
|
+
cR as Switch,
|
|
19766
19764
|
ap as Textarea,
|
|
19767
19765
|
uE as ThinkingIndicator,
|
|
19768
|
-
|
|
19766
|
+
uk as ThreadListItem,
|
|
19769
19767
|
hi as ThreadManager,
|
|
19770
19768
|
Rw as ThreadStateProvider,
|
|
19771
19769
|
lw as ThreadsProvider,
|
|
19772
|
-
|
|
19773
|
-
|
|
19770
|
+
WI as TimelineColumn,
|
|
19771
|
+
LN as Toaster,
|
|
19774
19772
|
fE as ToolComponent,
|
|
19775
|
-
|
|
19776
|
-
|
|
19777
|
-
|
|
19778
|
-
|
|
19773
|
+
MN as Tooltip,
|
|
19774
|
+
OR as TooltipContent,
|
|
19775
|
+
PN as TooltipProvider,
|
|
19776
|
+
ON as TooltipTrigger,
|
|
19779
19777
|
dE as UserTextContent,
|
|
19780
|
-
|
|
19778
|
+
mN as applySettings,
|
|
19781
19779
|
rx as buildCheckpointIndex,
|
|
19782
|
-
|
|
19780
|
+
HI as buildCheckpointPreviewMap,
|
|
19783
19781
|
sr as chatApiClient,
|
|
19784
19782
|
pc as del,
|
|
19785
19783
|
Yv as downloadFileById,
|
|
@@ -19787,12 +19785,12 @@ export {
|
|
|
19787
19785
|
Zv as fileToBase64,
|
|
19788
19786
|
rn as get,
|
|
19789
19787
|
Wv as getChatToken,
|
|
19790
|
-
|
|
19791
|
-
|
|
19788
|
+
UI as getCheckpointForMessage,
|
|
19789
|
+
hN as getCurrentSettings,
|
|
19792
19790
|
Lw as getDefaultApiConfig,
|
|
19793
19791
|
$w as getDefaultChatSettings,
|
|
19794
19792
|
hc as getFileContent,
|
|
19795
|
-
|
|
19793
|
+
fN as getFileInfo,
|
|
19796
19794
|
ox as getMessageAttemptInfo,
|
|
19797
19795
|
wh as getMessageDomKey,
|
|
19798
19796
|
$u as getPreviewForMessage,
|
|
@@ -19815,16 +19813,16 @@ export {
|
|
|
19815
19813
|
Os as useApi,
|
|
19816
19814
|
sx as useCheckpointIndex,
|
|
19817
19815
|
pE as useFilePreview,
|
|
19818
|
-
|
|
19816
|
+
pN as useHasChatSession,
|
|
19819
19817
|
hE as useParsedMessageContent,
|
|
19820
19818
|
Ow as useShallowStableValue,
|
|
19821
19819
|
Pw as useStream,
|
|
19822
19820
|
Pw as useStreamingHook,
|
|
19823
19821
|
Ew as useThreadHistoryState,
|
|
19824
|
-
|
|
19822
|
+
pk as useThreadManagerViewState,
|
|
19825
19823
|
Ds as useThreadState,
|
|
19826
19824
|
kw as useThreadStateUpdater,
|
|
19827
19825
|
To as useThreads,
|
|
19828
19826
|
iw as useThreadsState,
|
|
19829
|
-
|
|
19827
|
+
dN as viewFileById
|
|
19830
19828
|
};
|