teodor-new-chat-ui 3.0.173 → 3.0.175
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 +566 -563
- package/dist/index.umd.js +27 -27
- package/package.json +1 -1
- package/dist/components/chat/MessageListDevHarness.d.ts +0 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var vp = Object.defineProperty;
|
|
2
2
|
var wp = (e, t, n) => t in e ? vp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var Oa = (e, t, n) => wp(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as p from "react";
|
|
5
5
|
import z, { useState as xe, useRef as tt, useCallback as Je, useEffect as at, useReducer as bp, useMemo as Wt, createContext as yp, useContext as Sp, createElement as co, useLayoutEffect as Cp } from "react";
|
|
6
|
-
import { Square as Tp, Send as Rp, X as rr, ExternalLink as kp, Download as Ep, Image as Ip, FileText as
|
|
6
|
+
import { Square as Tp, Send as Rp, X as rr, ExternalLink as kp, Download as Ep, Image as Ip, FileText as Ma, Loader as gc, Bot as Da, Wrench as Np, User as Ap, Paperclip as ni, ChevronUp as kr, ChevronDown as nr, Copy as La, Edit as $a, RotateCcw as ri, ChevronRight as _p, Check as Mi, Circle as jp, Edit3 as xc, Loader2 as Pp, Plus as Op, FileSpreadsheet as Mp, MessageSquarePlus as Dp, MessageSquare as Lp, Calendar as $p, Trash2 as Fp, Settings as zp, Server as Bp, EyeOff as Hp, Eye as Up, Layout as Wp, MessageCircle as Vp, Save as Kp } from "lucide-react";
|
|
7
7
|
import { Slot as qp, createSlot as lr } from "@radix-ui/react-slot";
|
|
8
8
|
import { cva as qo } from "class-variance-authority";
|
|
9
9
|
import { clsx as Gp } from "clsx";
|
|
@@ -20,10 +20,10 @@ var oi = { exports: {} }, Cr = {};
|
|
|
20
20
|
* This source code is licensed under the MIT license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var Fa;
|
|
24
24
|
function Xp() {
|
|
25
|
-
if (
|
|
26
|
-
|
|
25
|
+
if (Fa) return Cr;
|
|
26
|
+
Fa = 1;
|
|
27
27
|
var e = z, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
28
28
|
function i(a, l, u) {
|
|
29
29
|
var d, f = {}, h = null, m = null;
|
|
@@ -44,9 +44,9 @@ var Tr = {};
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
var
|
|
47
|
+
var za;
|
|
48
48
|
function Jp() {
|
|
49
|
-
return
|
|
49
|
+
return za || (za = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
50
|
var e = z, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), b = Symbol.iterator, v = "@@iterator";
|
|
51
51
|
function g(T) {
|
|
52
52
|
if (T === null || typeof T != "object")
|
|
@@ -91,7 +91,7 @@ function Jp() {
|
|
|
91
91
|
function $(T) {
|
|
92
92
|
return T.displayName || "Context";
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function U(T) {
|
|
95
95
|
if (T == null)
|
|
96
96
|
return null;
|
|
97
97
|
if (typeof T.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof T == "function")
|
|
@@ -124,11 +124,11 @@ function Jp() {
|
|
|
124
124
|
return I(T, T.render, "ForwardRef");
|
|
125
125
|
case f:
|
|
126
126
|
var Ce = T.displayName || null;
|
|
127
|
-
return Ce !== null ? Ce :
|
|
127
|
+
return Ce !== null ? Ce : U(T.type) || "Memo";
|
|
128
128
|
case h: {
|
|
129
129
|
var Ue = T, Ke = Ue._payload, Fe = Ue._init;
|
|
130
130
|
try {
|
|
131
|
-
return
|
|
131
|
+
return U(Fe(Ke));
|
|
132
132
|
} catch {
|
|
133
133
|
return null;
|
|
134
134
|
}
|
|
@@ -136,14 +136,14 @@ function Jp() {
|
|
|
136
136
|
}
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
-
var P = Object.assign, G = 0, K,
|
|
139
|
+
var P = Object.assign, G = 0, K, W, D, M, se, X, te;
|
|
140
140
|
function L() {
|
|
141
141
|
}
|
|
142
142
|
L.__reactDisabledLog = !0;
|
|
143
143
|
function Z() {
|
|
144
144
|
{
|
|
145
145
|
if (G === 0) {
|
|
146
|
-
K = console.log,
|
|
146
|
+
K = console.log, W = console.info, D = console.warn, M = console.error, se = console.group, X = console.groupCollapsed, te = console.groupEnd;
|
|
147
147
|
var T = {
|
|
148
148
|
configurable: !0,
|
|
149
149
|
enumerable: !0,
|
|
@@ -176,7 +176,7 @@ function Jp() {
|
|
|
176
176
|
value: K
|
|
177
177
|
}),
|
|
178
178
|
info: P({}, T, {
|
|
179
|
-
value:
|
|
179
|
+
value: W
|
|
180
180
|
}),
|
|
181
181
|
warn: P({}, T, {
|
|
182
182
|
value: D
|
|
@@ -214,8 +214,8 @@ function Jp() {
|
|
|
214
214
|
}
|
|
215
215
|
var Y = !1, Q;
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
Q = new
|
|
217
|
+
var ce = typeof WeakMap == "function" ? WeakMap : Map;
|
|
218
|
+
Q = new ce();
|
|
219
219
|
}
|
|
220
220
|
function ne(T, H) {
|
|
221
221
|
if (!T || Y)
|
|
@@ -352,7 +352,7 @@ function Jp() {
|
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
var ft = Array.isArray;
|
|
355
|
-
function
|
|
355
|
+
function ue(T) {
|
|
356
356
|
return ft(T);
|
|
357
357
|
}
|
|
358
358
|
function he(T) {
|
|
@@ -485,7 +485,7 @@ function Jp() {
|
|
|
485
485
|
function Xe() {
|
|
486
486
|
{
|
|
487
487
|
if (An.current) {
|
|
488
|
-
var T =
|
|
488
|
+
var T = U(An.current.type);
|
|
489
489
|
if (T)
|
|
490
490
|
return `
|
|
491
491
|
|
|
@@ -520,14 +520,14 @@ Check the top-level render call using <` + re + ">.");
|
|
|
520
520
|
return;
|
|
521
521
|
Qt[re] = !0;
|
|
522
522
|
var Ce = "";
|
|
523
|
-
T && T._owner && T._owner !== An.current && (Ce = " It was passed a child from " +
|
|
523
|
+
T && T._owner && T._owner !== An.current && (Ce = " It was passed a child from " + U(T._owner.type) + "."), ee(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', re, Ce), ee(null);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
function yr(T, H) {
|
|
527
527
|
{
|
|
528
528
|
if (typeof T != "object")
|
|
529
529
|
return;
|
|
530
|
-
if (
|
|
530
|
+
if (ue(T))
|
|
531
531
|
for (var re = 0; re < T.length; re++) {
|
|
532
532
|
var Ce = T[re];
|
|
533
533
|
De(Ce) && br(Ce, H);
|
|
@@ -557,11 +557,11 @@ Check the top-level render call using <` + re + ">.");
|
|
|
557
557
|
else
|
|
558
558
|
return;
|
|
559
559
|
if (re) {
|
|
560
|
-
var Ce =
|
|
560
|
+
var Ce = U(H);
|
|
561
561
|
ut(re, T.props, "prop", Ce, T);
|
|
562
562
|
} else if (H.PropTypes !== void 0 && !ge) {
|
|
563
563
|
ge = !0;
|
|
564
|
-
var Ue =
|
|
564
|
+
var Ue = U(H);
|
|
565
565
|
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Ue || "Unknown");
|
|
566
566
|
}
|
|
567
567
|
typeof H.getDefaultProps == "function" && !H.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -579,8 +579,8 @@ Check the top-level render call using <` + re + ">.");
|
|
|
579
579
|
T.ref !== null && (ee(T), w("Invalid attribute `ref` supplied to `React.Fragment`."), ee(null));
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
var
|
|
583
|
-
function
|
|
582
|
+
var ja = {};
|
|
583
|
+
function Pa(T, H, re, Ce, Ue, Ke) {
|
|
584
584
|
{
|
|
585
585
|
var Fe = _(T);
|
|
586
586
|
if (!Fe) {
|
|
@@ -589,7 +589,7 @@ Check the top-level render call using <` + re + ">.");
|
|
|
589
589
|
var bt = Zt();
|
|
590
590
|
bt ? Oe += bt : Oe += Xe();
|
|
591
591
|
var rt;
|
|
592
|
-
T === null ? rt = "null" :
|
|
592
|
+
T === null ? rt = "null" : ue(T) ? rt = "array" : T !== void 0 && T.$$typeof === t ? (rt = "<" + (U(T.type) || "Unknown") + " />", Oe = " Did you accidentally export a JSX literal instead of a component?") : rt = typeof T, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", rt, Oe);
|
|
593
593
|
}
|
|
594
594
|
var it = xn(T, H, re, Ue, Ke);
|
|
595
595
|
if (it == null)
|
|
@@ -598,7 +598,7 @@ Check the top-level render call using <` + re + ">.");
|
|
|
598
598
|
var Ot = H.children;
|
|
599
599
|
if (Ot !== void 0)
|
|
600
600
|
if (Ce)
|
|
601
|
-
if (
|
|
601
|
+
if (ue(Ot)) {
|
|
602
602
|
for (var Zn = 0; Zn < Ot.length; Zn++)
|
|
603
603
|
yr(Ot[Zn], T);
|
|
604
604
|
Object.freeze && Object.freeze(Ot);
|
|
@@ -608,27 +608,27 @@ Check the top-level render call using <` + re + ">.");
|
|
|
608
608
|
yr(Ot, T);
|
|
609
609
|
}
|
|
610
610
|
if (_e.call(H, "key")) {
|
|
611
|
-
var jn =
|
|
611
|
+
var jn = U(T), Ct = Object.keys(H).filter(function(xp) {
|
|
612
612
|
return xp !== "key";
|
|
613
613
|
}), Ns = Ct.length > 0 ? "{key: someKey, " + Ct.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
614
|
-
if (!
|
|
614
|
+
if (!ja[jn + Ns]) {
|
|
615
615
|
var gp = Ct.length > 0 ? "{" + Ct.join(": ..., ") + ": ...}" : "{}";
|
|
616
616
|
w(`A props object containing a "key" prop is being spread into JSX:
|
|
617
617
|
let props = %s;
|
|
618
618
|
<%s {...props} />
|
|
619
619
|
React keys must be passed directly to JSX without using spread:
|
|
620
620
|
let props = %s;
|
|
621
|
-
<%s key={someKey} {...props} />`, Ns, jn, gp, jn),
|
|
621
|
+
<%s key={someKey} {...props} />`, Ns, jn, gp, jn), ja[jn + Ns] = !0;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
return T === r ? Sr(it) : hn(it), it;
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
function fp(T, H, re) {
|
|
628
|
-
return
|
|
628
|
+
return Pa(T, H, re, !0);
|
|
629
629
|
}
|
|
630
630
|
function hp(T, H, re) {
|
|
631
|
-
return
|
|
631
|
+
return Pa(T, H, re, !1);
|
|
632
632
|
}
|
|
633
633
|
var pp = hp, mp = fp;
|
|
634
634
|
Tr.Fragment = r, Tr.jsx = pp, Tr.jsxs = mp;
|
|
@@ -641,7 +641,7 @@ function wc(e, t) {
|
|
|
641
641
|
return e.apply(t, arguments);
|
|
642
642
|
};
|
|
643
643
|
}
|
|
644
|
-
const { toString: Zp } = Object.prototype, { getPrototypeOf:
|
|
644
|
+
const { toString: Zp } = Object.prototype, { getPrototypeOf: Di } = Object, { iterator: Yo, toStringTag: bc } = Symbol, Xo = /* @__PURE__ */ ((e) => (t) => {
|
|
645
645
|
const n = Zp.call(t);
|
|
646
646
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
647
647
|
})(/* @__PURE__ */ Object.create(null)), Yt = (e) => (e = e.toLowerCase(), (t) => Xo(t) === e), Jo = (e) => (t) => typeof t === e, { isArray: fr } = Array, cr = Jo("undefined");
|
|
@@ -656,7 +656,7 @@ function Qp(e) {
|
|
|
656
656
|
const em = Jo("string"), Tt = Jo("function"), Sc = Jo("number"), Ur = (e) => e !== null && typeof e == "object", tm = (e) => e === !0 || e === !1, uo = (e) => {
|
|
657
657
|
if (Xo(e) !== "object")
|
|
658
658
|
return !1;
|
|
659
|
-
const t =
|
|
659
|
+
const t = Di(e);
|
|
660
660
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(bc in e) && !(Yo in e);
|
|
661
661
|
}, nm = (e) => {
|
|
662
662
|
if (!Ur(e) || Hr(e))
|
|
@@ -721,7 +721,7 @@ const mm = (e, t, n, { allOwnKeys: r } = {}) => (Wr(t, (o, s) => {
|
|
|
721
721
|
do {
|
|
722
722
|
for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
|
|
723
723
|
i = o[s], (!r || r(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);
|
|
724
|
-
e = n !== !1 &&
|
|
724
|
+
e = n !== !1 && Di(e);
|
|
725
725
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
726
726
|
return t;
|
|
727
727
|
}, wm = (e, t, n) => {
|
|
@@ -737,7 +737,7 @@ const mm = (e, t, n, { allOwnKeys: r } = {}) => (Wr(t, (o, s) => {
|
|
|
737
737
|
for (; t-- > 0; )
|
|
738
738
|
n[t] = e[t];
|
|
739
739
|
return n;
|
|
740
|
-
}, ym = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
740
|
+
}, ym = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Di(Uint8Array)), Sm = (e, t) => {
|
|
741
741
|
const r = (e && e[Yo]).call(e);
|
|
742
742
|
let o;
|
|
743
743
|
for (; (o = r.next()) && !o.done; ) {
|
|
@@ -755,7 +755,7 @@ const mm = (e, t, n, { allOwnKeys: r } = {}) => (Wr(t, (o, s) => {
|
|
|
755
755
|
function(n, r, o) {
|
|
756
756
|
return r.toUpperCase() + o;
|
|
757
757
|
}
|
|
758
|
-
),
|
|
758
|
+
), Ba = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), km = Yt("RegExp"), Rc = (e, t) => {
|
|
759
759
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
760
760
|
Wr(n, (o, s) => {
|
|
761
761
|
let i;
|
|
@@ -854,8 +854,8 @@ const jm = (e) => {
|
|
|
854
854
|
forEachEntry: Sm,
|
|
855
855
|
matchAll: Cm,
|
|
856
856
|
isHTMLForm: Tm,
|
|
857
|
-
hasOwnProperty:
|
|
858
|
-
hasOwnProp:
|
|
857
|
+
hasOwnProperty: Ba,
|
|
858
|
+
hasOwnProp: Ba,
|
|
859
859
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
860
860
|
reduceDescriptors: Rc,
|
|
861
861
|
freezeMethods: Em,
|
|
@@ -933,7 +933,7 @@ function ii(e) {
|
|
|
933
933
|
function Nc(e) {
|
|
934
934
|
return A.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Ha(e, t, n) {
|
|
937
937
|
return e ? e.concat(t).map(function(o, s) {
|
|
938
938
|
return o = Nc(o), !n && s ? "[" + o + "]" : o;
|
|
939
939
|
}).join(n ? "." : "") : t;
|
|
@@ -976,12 +976,12 @@ function Zo(e, t, n) {
|
|
|
976
976
|
return v = Nc(v), x.forEach(function(y, R) {
|
|
977
977
|
!(A.isUndefined(y) || y === null) && t.append(
|
|
978
978
|
// eslint-disable-next-line no-nested-ternary
|
|
979
|
-
i === !0 ?
|
|
979
|
+
i === !0 ? Ha([v], R, s) : i === null ? v : v + "[]",
|
|
980
980
|
u(y)
|
|
981
981
|
);
|
|
982
982
|
}), !1;
|
|
983
983
|
}
|
|
984
|
-
return ii(b) ? !0 : (t.append(
|
|
984
|
+
return ii(b) ? !0 : (t.append(Ha(g, v, s), u(b)), !1);
|
|
985
985
|
}
|
|
986
986
|
const f = [], h = Object.assign(Fm, {
|
|
987
987
|
defaultVisitor: d,
|
|
@@ -1007,7 +1007,7 @@ function Zo(e, t, n) {
|
|
|
1007
1007
|
throw new TypeError("data must be an object");
|
|
1008
1008
|
return m(e), t;
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function Ua(e) {
|
|
1011
1011
|
const t = {
|
|
1012
1012
|
"!": "%21",
|
|
1013
1013
|
"'": "%27",
|
|
@@ -1021,17 +1021,17 @@ function Wa(e) {
|
|
|
1021
1021
|
return t[r];
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function Li(e, t) {
|
|
1025
1025
|
this._pairs = [], e && Zo(e, this, t);
|
|
1026
1026
|
}
|
|
1027
|
-
const Ac =
|
|
1027
|
+
const Ac = Li.prototype;
|
|
1028
1028
|
Ac.append = function(t, n) {
|
|
1029
1029
|
this._pairs.push([t, n]);
|
|
1030
1030
|
};
|
|
1031
1031
|
Ac.toString = function(t) {
|
|
1032
1032
|
const n = t ? function(r) {
|
|
1033
|
-
return t.call(this, r,
|
|
1034
|
-
} :
|
|
1033
|
+
return t.call(this, r, Ua);
|
|
1034
|
+
} : Ua;
|
|
1035
1035
|
return this._pairs.map(function(o) {
|
|
1036
1036
|
return n(o[0]) + "=" + n(o[1]);
|
|
1037
1037
|
}, "").join("&");
|
|
@@ -1048,13 +1048,13 @@ function _c(e, t, n) {
|
|
|
1048
1048
|
});
|
|
1049
1049
|
const o = n && n.serialize;
|
|
1050
1050
|
let s;
|
|
1051
|
-
if (o ? s = o(t, n) : s = A.isURLSearchParams(t) ? t.toString() : new
|
|
1051
|
+
if (o ? s = o(t, n) : s = A.isURLSearchParams(t) ? t.toString() : new Li(t, n).toString(r), s) {
|
|
1052
1052
|
const i = e.indexOf("#");
|
|
1053
1053
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
1054
1054
|
}
|
|
1055
1055
|
return e;
|
|
1056
1056
|
}
|
|
1057
|
-
class
|
|
1057
|
+
class Wa {
|
|
1058
1058
|
constructor() {
|
|
1059
1059
|
this.handlers = [];
|
|
1060
1060
|
}
|
|
@@ -1112,7 +1112,7 @@ const jc = {
|
|
|
1112
1112
|
silentJSONParsing: !0,
|
|
1113
1113
|
forcedJSONParsing: !0,
|
|
1114
1114
|
clarifyTimeoutError: !1
|
|
1115
|
-
}, Bm = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
1115
|
+
}, Bm = typeof URLSearchParams < "u" ? URLSearchParams : Li, Hm = typeof FormData < "u" ? FormData : null, Um = typeof Blob < "u" ? Blob : null, Wm = {
|
|
1116
1116
|
isBrowser: !0,
|
|
1117
1117
|
classes: {
|
|
1118
1118
|
URLSearchParams: Bm,
|
|
@@ -1120,10 +1120,10 @@ const jc = {
|
|
|
1120
1120
|
Blob: Um
|
|
1121
1121
|
},
|
|
1122
1122
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1123
|
-
},
|
|
1124
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", qm =
|
|
1123
|
+
}, $i = typeof window < "u" && typeof document < "u", ai = typeof navigator == "object" && navigator || void 0, Vm = $i && (!ai || ["ReactNative", "NativeScript", "NS"].indexOf(ai.product) < 0), Km = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1124
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", qm = $i && window.location.href || "http://localhost", Gm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1125
1125
|
__proto__: null,
|
|
1126
|
-
hasBrowserEnv:
|
|
1126
|
+
hasBrowserEnv: $i,
|
|
1127
1127
|
hasStandardBrowserEnv: Vm,
|
|
1128
1128
|
hasStandardBrowserWebWorkerEnv: Km,
|
|
1129
1129
|
navigator: ai,
|
|
@@ -1271,7 +1271,7 @@ const Qm = A.toObjectSet([
|
|
|
1271
1271
|
`).forEach(function(i) {
|
|
1272
1272
|
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Qm[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1273
1273
|
}), t;
|
|
1274
|
-
},
|
|
1274
|
+
}, Va = Symbol("internals");
|
|
1275
1275
|
function Rr(e) {
|
|
1276
1276
|
return e && String(e).trim().toLowerCase();
|
|
1277
1277
|
}
|
|
@@ -1426,7 +1426,7 @@ let Rt = class {
|
|
|
1426
1426
|
return n.forEach((o) => r.set(o)), r;
|
|
1427
1427
|
}
|
|
1428
1428
|
static accessor(t) {
|
|
1429
|
-
const r = (this[
|
|
1429
|
+
const r = (this[Va] = this[Va] = {
|
|
1430
1430
|
accessors: {}
|
|
1431
1431
|
}).accessors, o = this.prototype;
|
|
1432
1432
|
function s(i) {
|
|
@@ -1524,14 +1524,14 @@ const Io = (e, t, n = 3) => {
|
|
|
1524
1524
|
};
|
|
1525
1525
|
e(f);
|
|
1526
1526
|
}, n);
|
|
1527
|
-
},
|
|
1527
|
+
}, Ka = (e, t) => {
|
|
1528
1528
|
const n = e != null;
|
|
1529
1529
|
return [(r) => t[0]({
|
|
1530
1530
|
lengthComputable: n,
|
|
1531
1531
|
total: e,
|
|
1532
1532
|
loaded: r
|
|
1533
1533
|
}), t[1]];
|
|
1534
|
-
},
|
|
1534
|
+
}, qa = (e) => (...t) => A.asap(() => e(...t)), lg = xt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, xt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1535
1535
|
new URL(xt.origin),
|
|
1536
1536
|
xt.navigator && /(msie|trident)/i.test(xt.navigator.userAgent)
|
|
1537
1537
|
) : () => !0, cg = xt.hasStandardBrowserEnv ? (
|
|
@@ -1571,7 +1571,7 @@ function Dc(e, t, n) {
|
|
|
1571
1571
|
let r = !ug(t);
|
|
1572
1572
|
return e && (r || n == !1) ? dg(e, t) : t;
|
|
1573
1573
|
}
|
|
1574
|
-
const
|
|
1574
|
+
const Ga = (e) => e instanceof Rt ? { ...e } : e;
|
|
1575
1575
|
function Fn(e, t) {
|
|
1576
1576
|
t = t || {};
|
|
1577
1577
|
const n = {};
|
|
@@ -1629,7 +1629,7 @@ function Fn(e, t) {
|
|
|
1629
1629
|
socketPath: i,
|
|
1630
1630
|
responseEncoding: i,
|
|
1631
1631
|
validateStatus: a,
|
|
1632
|
-
headers: (u, d, f) => o(
|
|
1632
|
+
headers: (u, d, f) => o(Ga(u), Ga(d), f, !0)
|
|
1633
1633
|
};
|
|
1634
1634
|
return A.forEach(Object.keys({ ...e, ...t }), function(d) {
|
|
1635
1635
|
const f = l[d] || o, h = f(e[d], t[d], d);
|
|
@@ -1766,7 +1766,7 @@ const Lc = (e) => {
|
|
|
1766
1766
|
} finally {
|
|
1767
1767
|
await t.cancel();
|
|
1768
1768
|
}
|
|
1769
|
-
},
|
|
1769
|
+
}, Ya = (e, t, n, r) => {
|
|
1770
1770
|
const o = gg(e, t);
|
|
1771
1771
|
let s = 0, i, a = (l) => {
|
|
1772
1772
|
i || (i = !0, r && r(l));
|
|
@@ -1795,13 +1795,13 @@ const Lc = (e) => {
|
|
|
1795
1795
|
}, {
|
|
1796
1796
|
highWaterMark: 2
|
|
1797
1797
|
});
|
|
1798
|
-
},
|
|
1798
|
+
}, Xa = 64 * 1024, { isFunction: Qr } = A, vg = (({ Request: e, Response: t }) => ({
|
|
1799
1799
|
Request: e,
|
|
1800
1800
|
Response: t
|
|
1801
1801
|
}))(A.global), {
|
|
1802
|
-
ReadableStream:
|
|
1803
|
-
TextEncoder:
|
|
1804
|
-
} = A.global,
|
|
1802
|
+
ReadableStream: Ja,
|
|
1803
|
+
TextEncoder: Za
|
|
1804
|
+
} = A.global, Qa = (e, ...t) => {
|
|
1805
1805
|
try {
|
|
1806
1806
|
return !!e(...t);
|
|
1807
1807
|
} catch {
|
|
@@ -1814,17 +1814,17 @@ const Lc = (e) => {
|
|
|
1814
1814
|
const { fetch: t, Request: n, Response: r } = e, o = t ? Qr(t) : typeof fetch == "function", s = Qr(n), i = Qr(r);
|
|
1815
1815
|
if (!o)
|
|
1816
1816
|
return !1;
|
|
1817
|
-
const a = o && Qr(
|
|
1817
|
+
const a = o && Qr(Ja), l = o && (typeof Za == "function" ? /* @__PURE__ */ ((b) => (v) => b.encode(v))(new Za()) : async (b) => new Uint8Array(await new n(b).arrayBuffer())), u = s && a && Qa(() => {
|
|
1818
1818
|
let b = !1;
|
|
1819
1819
|
const v = new n(xt.origin, {
|
|
1820
|
-
body: new
|
|
1820
|
+
body: new Ja(),
|
|
1821
1821
|
method: "POST",
|
|
1822
1822
|
get duplex() {
|
|
1823
1823
|
return b = !0, "half";
|
|
1824
1824
|
}
|
|
1825
1825
|
}).headers.has("Content-Type");
|
|
1826
1826
|
return b && !v;
|
|
1827
|
-
}), d = i && a &&
|
|
1827
|
+
}), d = i && a && Qa(() => A.isReadableStream(new r("").body)), f = {
|
|
1828
1828
|
stream: d && ((b) => b.body)
|
|
1829
1829
|
};
|
|
1830
1830
|
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((b) => {
|
|
@@ -1869,7 +1869,7 @@ const Lc = (e) => {
|
|
|
1869
1869
|
fetchOptions: _
|
|
1870
1870
|
} = Lc(b), I = t || fetch;
|
|
1871
1871
|
k = k ? (k + "").toLowerCase() : "text";
|
|
1872
|
-
let $ = pg([w, y && y.toAbortSignal()], R),
|
|
1872
|
+
let $ = pg([w, y && y.toAbortSignal()], R), U = null;
|
|
1873
1873
|
const P = $ && $.unsubscribe && (() => {
|
|
1874
1874
|
$.unsubscribe();
|
|
1875
1875
|
});
|
|
@@ -1882,15 +1882,15 @@ const Lc = (e) => {
|
|
|
1882
1882
|
duplex: "half"
|
|
1883
1883
|
}), te;
|
|
1884
1884
|
if (A.isFormData(x) && (te = X.headers.get("content-type")) && E.setContentType(te), X.body) {
|
|
1885
|
-
const [L, Z] =
|
|
1885
|
+
const [L, Z] = Ka(
|
|
1886
1886
|
G,
|
|
1887
|
-
Io(
|
|
1887
|
+
Io(qa(C))
|
|
1888
1888
|
);
|
|
1889
|
-
x =
|
|
1889
|
+
x = Ya(X.body, Xa, L, Z);
|
|
1890
1890
|
}
|
|
1891
1891
|
}
|
|
1892
1892
|
A.isString(N) || (N = N ? "include" : "omit");
|
|
1893
|
-
const K = s && "credentials" in n.prototype,
|
|
1893
|
+
const K = s && "credentials" in n.prototype, W = {
|
|
1894
1894
|
..._,
|
|
1895
1895
|
signal: $,
|
|
1896
1896
|
method: g.toUpperCase(),
|
|
@@ -1899,20 +1899,20 @@ const Lc = (e) => {
|
|
|
1899
1899
|
duplex: "half",
|
|
1900
1900
|
credentials: K ? N : void 0
|
|
1901
1901
|
};
|
|
1902
|
-
|
|
1903
|
-
let D = await (s ? I(
|
|
1902
|
+
U = s && new n(v, W);
|
|
1903
|
+
let D = await (s ? I(U, _) : I(v, W));
|
|
1904
1904
|
const M = d && (k === "stream" || k === "response");
|
|
1905
1905
|
if (d && (S || M && P)) {
|
|
1906
1906
|
const X = {};
|
|
1907
1907
|
["status", "statusText", "headers"].forEach((le) => {
|
|
1908
1908
|
X[le] = D[le];
|
|
1909
1909
|
});
|
|
1910
|
-
const te = A.toFiniteNumber(D.headers.get("content-length")), [L, Z] = S &&
|
|
1910
|
+
const te = A.toFiniteNumber(D.headers.get("content-length")), [L, Z] = S && Ka(
|
|
1911
1911
|
te,
|
|
1912
|
-
Io(
|
|
1912
|
+
Io(qa(S), !0)
|
|
1913
1913
|
) || [];
|
|
1914
1914
|
D = new r(
|
|
1915
|
-
|
|
1915
|
+
Ya(D.body, Xa, L, () => {
|
|
1916
1916
|
Z && Z(), P && P();
|
|
1917
1917
|
}),
|
|
1918
1918
|
X
|
|
@@ -1927,16 +1927,16 @@ const Lc = (e) => {
|
|
|
1927
1927
|
status: D.status,
|
|
1928
1928
|
statusText: D.statusText,
|
|
1929
1929
|
config: b,
|
|
1930
|
-
request:
|
|
1930
|
+
request: U
|
|
1931
1931
|
});
|
|
1932
1932
|
});
|
|
1933
1933
|
} catch (K) {
|
|
1934
1934
|
throw P && P(), K && K.name === "TypeError" && /Load failed|fetch/i.test(K.message) ? Object.assign(
|
|
1935
|
-
new Ee("Network Error", Ee.ERR_NETWORK, b,
|
|
1935
|
+
new Ee("Network Error", Ee.ERR_NETWORK, b, U),
|
|
1936
1936
|
{
|
|
1937
1937
|
cause: K.cause || K
|
|
1938
1938
|
}
|
|
1939
|
-
) : Ee.from(K, K && K.code, b,
|
|
1939
|
+
) : Ee.from(K, K && K.code, b, U);
|
|
1940
1940
|
}
|
|
1941
1941
|
};
|
|
1942
1942
|
}, bg = /* @__PURE__ */ new Map(), $c = (e) => {
|
|
@@ -1968,7 +1968,7 @@ A.forEach(li, (e, t) => {
|
|
|
1968
1968
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1969
1969
|
}
|
|
1970
1970
|
});
|
|
1971
|
-
const
|
|
1971
|
+
const el = (e) => `- ${e}`, yg = (e) => A.isFunction(e) || e === null || e === !1, Fc = {
|
|
1972
1972
|
getAdapter: (e, t) => {
|
|
1973
1973
|
e = A.isArray(e) ? e : [e];
|
|
1974
1974
|
const { length: n } = e;
|
|
@@ -1988,8 +1988,8 @@ const tl = (e) => `- ${e}`, yg = (e) => A.isFunction(e) || e === null || e === !
|
|
|
1988
1988
|
([l, u]) => `adapter ${l} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1989
1989
|
);
|
|
1990
1990
|
let a = n ? i.length > 1 ? `since :
|
|
1991
|
-
` + i.map(
|
|
1992
|
-
`) : " " +
|
|
1991
|
+
` + i.map(el).join(`
|
|
1992
|
+
`) : " " + el(i[0]) : "as no adapter specified";
|
|
1993
1993
|
throw new Ee(
|
|
1994
1994
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1995
1995
|
"ERR_NOT_SUPPORT"
|
|
@@ -2003,7 +2003,7 @@ function js(e) {
|
|
|
2003
2003
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2004
2004
|
throw new hr(null, e);
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2006
|
+
function tl(e) {
|
|
2007
2007
|
return js(e), e.headers = Rt.from(e.headers), e.data = _s.call(
|
|
2008
2008
|
e,
|
|
2009
2009
|
e.transformRequest
|
|
@@ -2027,7 +2027,7 @@ const zc = "1.12.2", Qo = {};
|
|
|
2027
2027
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2028
2028
|
};
|
|
2029
2029
|
});
|
|
2030
|
-
const
|
|
2030
|
+
const nl = {};
|
|
2031
2031
|
Qo.transitional = function(t, n, r) {
|
|
2032
2032
|
function o(s, i) {
|
|
2033
2033
|
return "[Axios v" + zc + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
|
|
@@ -2038,7 +2038,7 @@ Qo.transitional = function(t, n, r) {
|
|
|
2038
2038
|
o(i, " has been removed" + (n ? " in " + n : "")),
|
|
2039
2039
|
Ee.ERR_DEPRECATED
|
|
2040
2040
|
);
|
|
2041
|
-
return n && !
|
|
2041
|
+
return n && !nl[i] && (nl[i] = !0, console.warn(
|
|
2042
2042
|
o(
|
|
2043
2043
|
i,
|
|
2044
2044
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -2073,8 +2073,8 @@ const ho = {
|
|
|
2073
2073
|
let Ln = class {
|
|
2074
2074
|
constructor(t) {
|
|
2075
2075
|
this.defaults = t || {}, this.interceptors = {
|
|
2076
|
-
request: new
|
|
2077
|
-
response: new
|
|
2076
|
+
request: new Wa(),
|
|
2077
|
+
response: new Wa()
|
|
2078
2078
|
};
|
|
2079
2079
|
}
|
|
2080
2080
|
/**
|
|
@@ -2139,7 +2139,7 @@ let Ln = class {
|
|
|
2139
2139
|
});
|
|
2140
2140
|
let d, f = 0, h;
|
|
2141
2141
|
if (!l) {
|
|
2142
|
-
const b = [
|
|
2142
|
+
const b = [tl.bind(this), void 0];
|
|
2143
2143
|
for (b.unshift(...a), b.push(...u), h = b.length, d = Promise.resolve(n); f < h; )
|
|
2144
2144
|
d = d.then(b[f++], b[f++]);
|
|
2145
2145
|
return d;
|
|
@@ -2156,7 +2156,7 @@ let Ln = class {
|
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
2158
|
try {
|
|
2159
|
-
d =
|
|
2159
|
+
d = tl.call(this, m);
|
|
2160
2160
|
} catch (b) {
|
|
2161
2161
|
return Promise.reject(b);
|
|
2162
2162
|
}
|
|
@@ -2386,23 +2386,22 @@ const {
|
|
|
2386
2386
|
formToJSON: mT,
|
|
2387
2387
|
getAdapter: gT,
|
|
2388
2388
|
mergeConfig: xT
|
|
2389
|
-
} = st,
|
|
2390
|
-
!ui && typeof window < "u" && console.warn("API base URL is not configured. The API client will need to be configured via apiConfig prop or window.__API_BASE_URL__.");
|
|
2389
|
+
} = st, rl = typeof window < "u" ? window.__API_BASE_URL__ : void 0, ol = rl ? rl.replace(/\/+$/, "") : void 0;
|
|
2391
2390
|
let No = null;
|
|
2392
|
-
const
|
|
2391
|
+
const ui = /* @__PURE__ */ new Set();
|
|
2393
2392
|
function kg() {
|
|
2394
2393
|
return No;
|
|
2395
2394
|
}
|
|
2396
2395
|
function sl(e) {
|
|
2397
|
-
No = e,
|
|
2396
|
+
No = e, ui.forEach((t) => t(e));
|
|
2398
2397
|
}
|
|
2399
2398
|
function Eg(e) {
|
|
2400
|
-
return
|
|
2399
|
+
return ui.add(e), () => ui.delete(e);
|
|
2401
2400
|
}
|
|
2402
2401
|
const Bt = st.create({
|
|
2403
2402
|
// Only set baseURL when configured — do NOT fall back to localhost. Falling back causes
|
|
2404
2403
|
// noisy network requests to the frontend Dev server when the backend isn't configured.
|
|
2405
|
-
...
|
|
2404
|
+
...ol ? { baseURL: ol } : {},
|
|
2406
2405
|
timeout: 3e4,
|
|
2407
2406
|
withCredentials: !0
|
|
2408
2407
|
});
|
|
@@ -2534,8 +2533,8 @@ function jg(e = {}) {
|
|
|
2534
2533
|
w.current && (w.current.abort(), w.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && f("");
|
|
2535
2534
|
const $ = new AbortController();
|
|
2536
2535
|
return w.current = $, (async () => {
|
|
2537
|
-
var P, G, K,
|
|
2538
|
-
const
|
|
2536
|
+
var P, G, K, W, D, M, se, X;
|
|
2537
|
+
const U = (te) => {
|
|
2539
2538
|
var L;
|
|
2540
2539
|
try {
|
|
2541
2540
|
const Z = JSON.parse(JSON.stringify(te));
|
|
@@ -2568,7 +2567,7 @@ function jg(e = {}) {
|
|
|
2568
2567
|
console.debug(
|
|
2569
2568
|
"[use-chat] POST",
|
|
2570
2569
|
t + n,
|
|
2571
|
-
|
|
2570
|
+
U(N)
|
|
2572
2571
|
);
|
|
2573
2572
|
const L = await fetch(t + n, {
|
|
2574
2573
|
method: "POST",
|
|
@@ -2600,7 +2599,7 @@ function jg(e = {}) {
|
|
|
2600
2599
|
B = [], y.current && f((_e) => _e + Re);
|
|
2601
2600
|
}
|
|
2602
2601
|
Y = null;
|
|
2603
|
-
},
|
|
2602
|
+
}, ce = () => {
|
|
2604
2603
|
typeof window < "u" && Y == null && (Y = requestAnimationFrame(Q));
|
|
2605
2604
|
};
|
|
2606
2605
|
let ne = Date.now();
|
|
@@ -2613,7 +2612,7 @@ function jg(e = {}) {
|
|
|
2613
2612
|
}, 5e3), Ae = 1024 * 1024;
|
|
2614
2613
|
try {
|
|
2615
2614
|
const Re = L.headers.get("X-Thread-Id") || L.headers.get("x-thread-id"), _e = L.headers.get("X-Thread-Created") || L.headers.get("x-thread-created"), ze = Re ?? null, Ye = String(_e ?? "").toLowerCase() === "true";
|
|
2616
|
-
for ((
|
|
2615
|
+
for ((W = I == null ? void 0 : I.onOpen) == null || W.call(I, { threadId: ze, created: Ye }); ; ) {
|
|
2617
2616
|
const { value: Ve, done: ut } = await Z.read();
|
|
2618
2617
|
if (ut) break;
|
|
2619
2618
|
de += le.decode(Ve, { stream: !0 }), de.length > Ae && (de = "", console.warn("Stream buffer reset: exceeded 1MB"));
|
|
@@ -2621,9 +2620,9 @@ function jg(e = {}) {
|
|
|
2621
2620
|
for (; (ft = de.indexOf(`
|
|
2622
2621
|
|
|
2623
2622
|
`)) >= 0; ) {
|
|
2624
|
-
const
|
|
2623
|
+
const ue = de.slice(0, ft);
|
|
2625
2624
|
de = de.slice(ft + 2);
|
|
2626
|
-
const he = Og(
|
|
2625
|
+
const he = Og(ue);
|
|
2627
2626
|
if (!he) continue;
|
|
2628
2627
|
let me;
|
|
2629
2628
|
try {
|
|
@@ -2640,10 +2639,10 @@ function jg(e = {}) {
|
|
|
2640
2639
|
j > 0 && V > j + 1 && ((D = I == null ? void 0 : I.onGap) == null || D.call(I, { from: j, to: V })), j = V, R.current = V, v(V);
|
|
2641
2640
|
}
|
|
2642
2641
|
if (O.type === "token" && e.autoAppendAssistant !== !1)
|
|
2643
|
-
B.push(O.content),
|
|
2642
|
+
B.push(O.content), ce();
|
|
2644
2643
|
else if (O.type === "message_delta") {
|
|
2645
2644
|
const be = O.delta.filter(($e) => $e.type === "text").map(($e) => $e.text).join("");
|
|
2646
|
-
be && e.autoAppendAssistant !== !1 && (B.push(be),
|
|
2645
|
+
be && e.autoAppendAssistant !== !1 && (B.push(be), ce());
|
|
2647
2646
|
} else
|
|
2648
2647
|
Y !== null && cancelAnimationFrame(Y), Q(), O.type === "checkpoint" ? m(O.checkpointId) : O.type === "error" && u(O.message);
|
|
2649
2648
|
}
|
|
@@ -3000,8 +2999,8 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3000
2999
|
}, [l, m]);
|
|
3001
3000
|
const g = Je((O) => {
|
|
3002
3001
|
l.setAuthToken(O);
|
|
3003
|
-
}, [l]), { state: x, seed: w, prepend: y, pushUser: R, onEvent: S, reset: C } = Lg(), k = 20, [E, N] = xe(!1), [_, I] = xe(!1), [$,
|
|
3004
|
-
O.cursor !== void 0 &&
|
|
3002
|
+
}, [l]), { state: x, seed: w, prepend: y, pushUser: R, onEvent: S, reset: C } = Lg(), k = 20, [E, N] = xe(!1), [_, I] = xe(!1), [$, U] = xe(null), [P, G] = xe(void 0), [K, W] = xe(void 0), D = tt(!1), M = tt([]), se = Je((O) => {
|
|
3003
|
+
O.cursor !== void 0 && U(O.cursor), O.hasMore !== void 0 && N(O.hasMore), O.checkpointId !== void 0 && G(O.checkpointId), O.checkpointNs !== void 0 && W(O.checkpointNs);
|
|
3005
3004
|
}, []), X = Je((O, V) => new Promise((be, $e) => {
|
|
3006
3005
|
const fe = async () => {
|
|
3007
3006
|
if (D.current) {
|
|
@@ -3029,7 +3028,7 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3029
3028
|
V === "replace" ? (console.log("[ChatProvider] Replacing messages, count:", be.length), w(be, {
|
|
3030
3029
|
checkpointId: (O == null ? void 0 : O.checkpointId) ?? null,
|
|
3031
3030
|
checkpointNs: (O == null ? void 0 : O.checkpointNs) ?? null
|
|
3032
|
-
})) : V === "prepend" && be.length ? (console.log("[ChatProvider] Calling prepend with", be.length, "messages"), y(be)) : console.log("[ChatProvider] Skipping prepend - empty list or wrong mode"),
|
|
3031
|
+
})) : V === "prepend" && be.length ? (console.log("[ChatProvider] Calling prepend with", be.length, "messages"), y(be)) : console.log("[ChatProvider] Skipping prepend - empty list or wrong mode"), U((O == null ? void 0 : O.nextCursor) ?? null), N(!!(O != null && O.hasMore)), G(($e) => (O == null ? void 0 : O.checkpointId) ?? $e ?? void 0), W(($e) => (O == null ? void 0 : O.checkpointNs) ?? $e ?? void 0);
|
|
3033
3032
|
},
|
|
3034
3033
|
[w, y]
|
|
3035
3034
|
), [L, Z] = xe([]), [le, de] = xe(null), B = Je(async () => {
|
|
@@ -3097,7 +3096,7 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3097
3096
|
}, [B, l.baseUrl, Q]), at(() => {
|
|
3098
3097
|
r == null || r(le);
|
|
3099
3098
|
}, [le, r]);
|
|
3100
|
-
const
|
|
3099
|
+
const ce = tt(null);
|
|
3101
3100
|
at(() => {
|
|
3102
3101
|
if (o && s) {
|
|
3103
3102
|
if (!l.baseUrl) {
|
|
@@ -3108,7 +3107,7 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3108
3107
|
console.debug("[ChatProvider] deferring initial load until backend health-check passes");
|
|
3109
3108
|
return;
|
|
3110
3109
|
}
|
|
3111
|
-
|
|
3110
|
+
ce.current !== o && (ce.current = o, Ae(o).catch(() => {
|
|
3112
3111
|
}));
|
|
3113
3112
|
}
|
|
3114
3113
|
}, [o, s, l.baseUrl, j]);
|
|
@@ -3140,7 +3139,7 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3140
3139
|
console.log("[ChatProvider] Loading thread with", Pe.length, "messages"), w(Pe, {
|
|
3141
3140
|
checkpointId: (fe == null ? void 0 : fe.checkpointId) ?? null,
|
|
3142
3141
|
checkpointNs: (fe == null ? void 0 : fe.checkpointNs) ?? null
|
|
3143
|
-
}),
|
|
3142
|
+
}), U((fe == null ? void 0 : fe.nextCursor) ?? null), N(!!(fe != null && fe.hasMore)), G((nt) => (fe == null ? void 0 : fe.checkpointId) ?? nt ?? void 0), W((nt) => (fe == null ? void 0 : fe.checkpointNs) ?? nt ?? void 0);
|
|
3144
3143
|
} finally {
|
|
3145
3144
|
ne.current = null;
|
|
3146
3145
|
}
|
|
@@ -3185,10 +3184,10 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3185
3184
|
const V = await l.createThread(O);
|
|
3186
3185
|
return await B(), await Ae(V.threadId), V.threadId;
|
|
3187
3186
|
}, [l, B, Ae]), ut = Je(async (O) => {
|
|
3188
|
-
await l.deleteThread(O), await B(), le === O && (de(null), C([]), N(!1),
|
|
3187
|
+
await l.deleteThread(O), await B(), le === O && (de(null), C([]), N(!1), U(null), G(void 0), W(void 0));
|
|
3189
3188
|
}, [l, B, le, C]), ft = Je(async (O, V) => {
|
|
3190
3189
|
await l.updateThread(O, V), await B();
|
|
3191
|
-
}, [l, B]),
|
|
3190
|
+
}, [l, B]), ue = Je(async (O, V) => {
|
|
3192
3191
|
await X(async () => {
|
|
3193
3192
|
var _n;
|
|
3194
3193
|
const be = (V == null ? void 0 : V.attachments) || [], { contentParts: $e, filesInfo: fe } = await Vg(
|
|
@@ -3288,12 +3287,12 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3288
3287
|
deleteThread: ut,
|
|
3289
3288
|
renameThread: ft,
|
|
3290
3289
|
loadThread: Ae,
|
|
3291
|
-
send:
|
|
3290
|
+
send: ue,
|
|
3292
3291
|
stop: h
|
|
3293
3292
|
};
|
|
3294
3293
|
return /* @__PURE__ */ c.jsx(Wc.Provider, { value: me, children: e });
|
|
3295
3294
|
}
|
|
3296
|
-
function
|
|
3295
|
+
function Fi() {
|
|
3297
3296
|
const e = Sp(Wc);
|
|
3298
3297
|
if (!e) throw new Error("useChat must be used within ChatProvider");
|
|
3299
3298
|
return e;
|
|
@@ -3462,7 +3461,7 @@ function cl(e, t) {
|
|
|
3462
3461
|
function Xg(e, t) {
|
|
3463
3462
|
return (n) => e(t, n);
|
|
3464
3463
|
}
|
|
3465
|
-
function
|
|
3464
|
+
function zi(e) {
|
|
3466
3465
|
return e !== void 0;
|
|
3467
3466
|
}
|
|
3468
3467
|
function Jg(...e) {
|
|
@@ -3487,7 +3486,7 @@ function We(e, t) {
|
|
|
3487
3486
|
function Ie(e, t) {
|
|
3488
3487
|
e(es, t);
|
|
3489
3488
|
}
|
|
3490
|
-
function
|
|
3489
|
+
function Bi(e) {
|
|
3491
3490
|
e(pr);
|
|
3492
3491
|
}
|
|
3493
3492
|
function ot(e) {
|
|
@@ -3537,7 +3536,7 @@ function F(e, ...t) {
|
|
|
3537
3536
|
return (r, o) => {
|
|
3538
3537
|
switch (r) {
|
|
3539
3538
|
case pr:
|
|
3540
|
-
|
|
3539
|
+
Bi(e);
|
|
3541
3540
|
return;
|
|
3542
3541
|
case Rn:
|
|
3543
3542
|
return We(e, n(o));
|
|
@@ -3669,7 +3668,7 @@ function lt(...e) {
|
|
|
3669
3668
|
}), function(s, i) {
|
|
3670
3669
|
switch (s) {
|
|
3671
3670
|
case pr: {
|
|
3672
|
-
|
|
3671
|
+
Bi(t);
|
|
3673
3672
|
return;
|
|
3674
3673
|
}
|
|
3675
3674
|
case Rn:
|
|
@@ -3680,7 +3679,7 @@ function lt(...e) {
|
|
|
3680
3679
|
function ye(e, t = Gc) {
|
|
3681
3680
|
return F(e, Ze(t));
|
|
3682
3681
|
}
|
|
3683
|
-
function
|
|
3682
|
+
function di(...e) {
|
|
3684
3683
|
return function(t, n) {
|
|
3685
3684
|
switch (t) {
|
|
3686
3685
|
case pr:
|
|
@@ -3721,9 +3720,9 @@ const rx = {
|
|
|
3721
3720
|
{ singleton: !0 }
|
|
3722
3721
|
);
|
|
3723
3722
|
function qn(e, t, n) {
|
|
3724
|
-
return
|
|
3723
|
+
return Hi(e, t, n).callbackRef;
|
|
3725
3724
|
}
|
|
3726
|
-
function
|
|
3725
|
+
function Hi(e, t, n) {
|
|
3727
3726
|
const r = z.useRef(null);
|
|
3728
3727
|
let o = (i) => {
|
|
3729
3728
|
};
|
|
@@ -3759,7 +3758,7 @@ function sx(e, t, n, r, o, s, i, a, l) {
|
|
|
3759
3758
|
},
|
|
3760
3759
|
[e, t, o, s, i, r, a]
|
|
3761
3760
|
);
|
|
3762
|
-
return
|
|
3761
|
+
return Hi(u, n, l);
|
|
3763
3762
|
}
|
|
3764
3763
|
function ix(e, t, n, r) {
|
|
3765
3764
|
const o = e.length;
|
|
@@ -3803,7 +3802,7 @@ function Yc(e, t, n) {
|
|
|
3803
3802
|
},
|
|
3804
3803
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3805
3804
|
[e, t]
|
|
3806
|
-
), { callbackRef: s, ref: i } =
|
|
3805
|
+
), { callbackRef: s, ref: i } = Hi(o, !0, n), a = z.useCallback(() => {
|
|
3807
3806
|
o(i.current);
|
|
3808
3807
|
}, [o, i]);
|
|
3809
3808
|
return z.useEffect(() => {
|
|
@@ -3904,9 +3903,9 @@ function ns(e, t, n) {
|
|
|
3904
3903
|
if (qe(e))
|
|
3905
3904
|
return [];
|
|
3906
3905
|
const r = Kt(e, t)[0];
|
|
3907
|
-
return ax(
|
|
3906
|
+
return ax(hi(e, r, n));
|
|
3908
3907
|
}
|
|
3909
|
-
function
|
|
3908
|
+
function fi(e, t) {
|
|
3910
3909
|
if (qe(e)) return jr;
|
|
3911
3910
|
const { k: n, l: r, r: o } = e;
|
|
3912
3911
|
if (t === n) {
|
|
@@ -3918,17 +3917,17 @@ function hi(e, t) {
|
|
|
3918
3917
|
const [s, i] = Zc(r);
|
|
3919
3918
|
return po(ct(e, { k: s, l: Jc(r), v: i }));
|
|
3920
3919
|
}
|
|
3921
|
-
} else return t < n ? po(ct(e, { l:
|
|
3920
|
+
} else return t < n ? po(ct(e, { l: fi(r, t) })) : po(ct(e, { r: fi(o, t) }));
|
|
3922
3921
|
}
|
|
3923
3922
|
function Dn(e) {
|
|
3924
3923
|
return qe(e) ? [] : [...Dn(e.l), { k: e.k, v: e.v }, ...Dn(e.r)];
|
|
3925
3924
|
}
|
|
3926
|
-
function
|
|
3925
|
+
function hi(e, t, n) {
|
|
3927
3926
|
if (qe(e))
|
|
3928
3927
|
return [];
|
|
3929
3928
|
const { k: r, l: o, r: s, v: i } = e;
|
|
3930
3929
|
let a = [];
|
|
3931
|
-
return r > t && (a = a.concat(
|
|
3930
|
+
return r > t && (a = a.concat(hi(o, t, n))), r >= t && r <= n && a.push({ k: r, v: i }), r <= n && (a = a.concat(hi(s, t, n))), a;
|
|
3932
3931
|
}
|
|
3933
3932
|
function po(e) {
|
|
3934
3933
|
const { l: t, lvl: n, r } = e;
|
|
@@ -3949,7 +3948,7 @@ function po(e) {
|
|
|
3949
3948
|
throw new Error("Unexpected empty nodes");
|
|
3950
3949
|
} else {
|
|
3951
3950
|
if (Ds(e))
|
|
3952
|
-
return
|
|
3951
|
+
return pi(ct(e, { lvl: n - 1 }));
|
|
3953
3952
|
if (!qe(r) && !qe(r.l)) {
|
|
3954
3953
|
const o = r.l, s = Ds(o) ? r.lvl - 1 : r.lvl;
|
|
3955
3954
|
return ct(o, {
|
|
@@ -3958,7 +3957,7 @@ function po(e) {
|
|
|
3958
3957
|
r: o.l
|
|
3959
3958
|
}),
|
|
3960
3959
|
lvl: o.lvl + 1,
|
|
3961
|
-
r:
|
|
3960
|
+
r: pi(ct(r, { l: o.r, lvl: s }))
|
|
3962
3961
|
});
|
|
3963
3962
|
} else
|
|
3964
3963
|
throw new Error("Unexpected empty nodes");
|
|
@@ -3986,13 +3985,13 @@ function Qc(e, t, n, r = jr, o = jr) {
|
|
|
3986
3985
|
return { k: e, l: r, lvl: n, r: o, v: t };
|
|
3987
3986
|
}
|
|
3988
3987
|
function fl(e) {
|
|
3989
|
-
return
|
|
3988
|
+
return pi(eu(e));
|
|
3990
3989
|
}
|
|
3991
3990
|
function eu(e) {
|
|
3992
3991
|
const { l: t } = e;
|
|
3993
3992
|
return !qe(t) && t.lvl === e.lvl ? ct(t, { r: ct(e, { l: t.r }) }) : e;
|
|
3994
3993
|
}
|
|
3995
|
-
function
|
|
3994
|
+
function pi(e) {
|
|
3996
3995
|
const { lvl: t, r: n } = e;
|
|
3997
3996
|
return !qe(n) && !qe(n.r) && n.lvl === t && n.r.lvl === t ? ct(n, { l: ct(e, { r: n.l }), lvl: t + 1 }) : e;
|
|
3998
3997
|
}
|
|
@@ -4005,7 +4004,7 @@ function tu(e, t) {
|
|
|
4005
4004
|
function Or(e, t) {
|
|
4006
4005
|
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
4007
4006
|
}
|
|
4008
|
-
const
|
|
4007
|
+
const Ui = Be(
|
|
4009
4008
|
() => ({ recalcInProgress: q(!1) }),
|
|
4010
4009
|
[],
|
|
4011
4010
|
{ singleton: !0 }
|
|
@@ -4041,7 +4040,7 @@ function bn(e, t) {
|
|
|
4041
4040
|
function rs(e) {
|
|
4042
4041
|
return !qe(e.groupOffsetTree);
|
|
4043
4042
|
}
|
|
4044
|
-
function
|
|
4043
|
+
function Wi({ index: e }, t) {
|
|
4045
4044
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
4046
4045
|
}
|
|
4047
4046
|
function cx() {
|
|
@@ -4068,7 +4067,7 @@ function ux(e, t) {
|
|
|
4068
4067
|
continue;
|
|
4069
4068
|
let l = !1, u = !1;
|
|
4070
4069
|
for (const { end: d, start: f, value: h } of a)
|
|
4071
|
-
l ? (o >= f || s === h) && (e =
|
|
4070
|
+
l ? (o >= f || s === h) && (e = fi(e, f)) : (u = h !== s, l = !0), d > o && o >= f && h !== s && (e = At(e, o + 1, h));
|
|
4072
4071
|
u && (e = At(e, i, s));
|
|
4073
4072
|
}
|
|
4074
4073
|
return [e, n];
|
|
@@ -4082,7 +4081,7 @@ function fx({ offset: e }, t) {
|
|
|
4082
4081
|
function Mr(e, t, n) {
|
|
4083
4082
|
if (t.length === 0)
|
|
4084
4083
|
return 0;
|
|
4085
|
-
const { index: r, offset: o, size: s } = nu(t, e,
|
|
4084
|
+
const { index: r, offset: o, size: s } = nu(t, e, Wi), i = e - r, a = s * i + (i - 1) * n + o;
|
|
4086
4085
|
return a > 0 ? a + n : a;
|
|
4087
4086
|
}
|
|
4088
4087
|
function ru(e, t) {
|
|
@@ -4103,7 +4102,7 @@ function ou(e, t, n) {
|
|
|
4103
4102
|
}
|
|
4104
4103
|
}
|
|
4105
4104
|
function hx(e, t, n, r = 0) {
|
|
4106
|
-
return r > 0 && (t = Math.max(t, nu(e, r,
|
|
4105
|
+
return r > 0 && (t = Math.max(t, nu(e, r, Wi).offset)), Xc(lx(e, t, n, fx), gx);
|
|
4107
4106
|
}
|
|
4108
4107
|
function px(e, [t, n, r, o]) {
|
|
4109
4108
|
t.length > 0 && r("received item sizes", t, kt.DEBUG);
|
|
@@ -4116,7 +4115,7 @@ function px(e, [t, n, r, o]) {
|
|
|
4116
4115
|
[i, a] = ux(i, t);
|
|
4117
4116
|
if (i === s)
|
|
4118
4117
|
return e;
|
|
4119
|
-
const { lastIndex: l, lastOffset: u, lastSize: d, offsetTree: f } =
|
|
4118
|
+
const { lastIndex: l, lastOffset: u, lastSize: d, offsetTree: f } = mi(e.offsetTree, a, i, o);
|
|
4120
4119
|
return {
|
|
4121
4120
|
groupIndices: n,
|
|
4122
4121
|
groupOffsetTree: n.reduce((h, m) => At(h, m, Mr(m, f, o)), or()),
|
|
@@ -4139,10 +4138,10 @@ function hl(e, t) {
|
|
|
4139
4138
|
n += t[r + 1] - t[r] - 1, r++;
|
|
4140
4139
|
return r - (n === e ? 0 : 1);
|
|
4141
4140
|
}
|
|
4142
|
-
function
|
|
4141
|
+
function mi(e, t, n, r) {
|
|
4143
4142
|
let o = e, s = 0, i = 0, a = 0, l = 0;
|
|
4144
4143
|
if (t !== 0) {
|
|
4145
|
-
l = Ao(o, t - 1,
|
|
4144
|
+
l = Ao(o, t - 1, Wi), a = o[l].offset;
|
|
4146
4145
|
const u = Kt(n, t - 1);
|
|
4147
4146
|
s = u[0], i = u[1], o.length && o[l].size === Kt(n, t)[1] && (l -= 1), o = o.slice(0, l + 1);
|
|
4148
4147
|
} else
|
|
@@ -4295,11 +4294,11 @@ const vx = {
|
|
|
4295
4294
|
startIndex: P + 1
|
|
4296
4295
|
}), $++, I += G + 1;
|
|
4297
4296
|
}
|
|
4298
|
-
const
|
|
4299
|
-
return I !== S &&
|
|
4297
|
+
const U = Dn(C.sizeTree);
|
|
4298
|
+
return I !== S && U.shift(), U.reduce(
|
|
4300
4299
|
(P, { k: G, v: K }) => {
|
|
4301
|
-
let
|
|
4302
|
-
return P.prevSize !== 0 && (
|
|
4300
|
+
let W = P.ranges;
|
|
4301
|
+
return P.prevSize !== 0 && (W = [
|
|
4303
4302
|
...P.ranges,
|
|
4304
4303
|
{
|
|
4305
4304
|
endIndex: G + S - 1,
|
|
@@ -4309,7 +4308,7 @@ const vx = {
|
|
|
4309
4308
|
]), {
|
|
4310
4309
|
prevIndex: G + S,
|
|
4311
4310
|
prevSize: K,
|
|
4312
|
-
ranges:
|
|
4311
|
+
ranges: W
|
|
4313
4312
|
};
|
|
4314
4313
|
},
|
|
4315
4314
|
{
|
|
@@ -4358,26 +4357,26 @@ const vx = {
|
|
|
4358
4357
|
let _ = 0, I = 0, $ = 0;
|
|
4359
4358
|
for (; _ < -S; ) {
|
|
4360
4359
|
$ = N[I];
|
|
4361
|
-
const
|
|
4362
|
-
I++, _ +=
|
|
4360
|
+
const U = N[I + 1] - $ - 1;
|
|
4361
|
+
I++, _ += U + 1;
|
|
4363
4362
|
}
|
|
4364
|
-
if (E = Dn(C.sizeTree).reduce((
|
|
4365
|
-
const
|
|
4366
|
-
E = At(E, 0,
|
|
4363
|
+
if (E = Dn(C.sizeTree).reduce((U, { k: P, v: G }) => At(U, Math.max(0, P + S), G), E), _ !== -S) {
|
|
4364
|
+
const U = Pr(C.sizeTree, $);
|
|
4365
|
+
E = At(E, 0, U);
|
|
4367
4366
|
const P = Kt(C.sizeTree, -S + 1)[1];
|
|
4368
4367
|
E = At(E, 1, P);
|
|
4369
4368
|
}
|
|
4370
4369
|
return {
|
|
4371
4370
|
...C,
|
|
4372
4371
|
sizeTree: E,
|
|
4373
|
-
...
|
|
4372
|
+
...mi(C.offsetTree, 0, E, k)
|
|
4374
4373
|
};
|
|
4375
4374
|
} else {
|
|
4376
4375
|
const E = Dn(C.sizeTree).reduce((N, { k: _, v: I }) => At(N, Math.max(0, _ + S), I), or());
|
|
4377
4376
|
return {
|
|
4378
4377
|
...C,
|
|
4379
4378
|
sizeTree: E,
|
|
4380
|
-
...
|
|
4379
|
+
...mi(C.offsetTree, 0, E, k)
|
|
4381
4380
|
};
|
|
4382
4381
|
}
|
|
4383
4382
|
})
|
|
@@ -4405,7 +4404,7 @@ const vx = {
|
|
|
4405
4404
|
unshiftWith: s
|
|
4406
4405
|
};
|
|
4407
4406
|
},
|
|
4408
|
-
Qe(kn,
|
|
4407
|
+
Qe(kn, Ui),
|
|
4409
4408
|
{ singleton: !0 }
|
|
4410
4409
|
);
|
|
4411
4410
|
function wx(e) {
|
|
@@ -4493,16 +4492,16 @@ const Kr = Be(
|
|
|
4493
4492
|
([
|
|
4494
4493
|
[R, S, C, k, E, N, _, I],
|
|
4495
4494
|
$,
|
|
4496
|
-
|
|
4495
|
+
U,
|
|
4497
4496
|
P
|
|
4498
4497
|
]) => {
|
|
4499
|
-
const G = iu(R), { align: K, behavior:
|
|
4498
|
+
const G = iu(R), { align: K, behavior: W, offset: D } = G, M = k - 1, se = ou(G, S, M);
|
|
4500
4499
|
let X = Mr(se, S.offsetTree, $) + N;
|
|
4501
|
-
K === "end" ? (X +=
|
|
4500
|
+
K === "end" ? (X += U + Kt(S.sizeTree, se)[1] - C + P, se === M && (X += _)) : K === "center" ? X += (U + Kt(S.sizeTree, se)[1] - C + P) / 2 : X -= E, D && (X += D);
|
|
4502
4501
|
const te = (L) => {
|
|
4503
4502
|
y(), L ? (I("retrying to scroll to", { location: R }, kt.DEBUG), Ie(m, R)) : (Ie(b, !0), I("list did not change, scroll successful", {}, kt.DEBUG));
|
|
4504
4503
|
};
|
|
4505
|
-
if (y(),
|
|
4504
|
+
if (y(), W === "smooth") {
|
|
4506
4505
|
let L = !1;
|
|
4507
4506
|
w = We(t, (Z) => {
|
|
4508
4507
|
L = L || Z;
|
|
@@ -4513,7 +4512,7 @@ const Kr = Be(
|
|
|
4513
4512
|
g = Vt(F(t, yx(150)), te);
|
|
4514
4513
|
return x = setTimeout(() => {
|
|
4515
4514
|
y();
|
|
4516
|
-
}, 1200), Ie(l, !0), I("scrolling from index to", { behavior:
|
|
4515
|
+
}, 1200), Ie(l, !0), I("scrolling from index to", { behavior: W, index: se, top: X }, kt.DEBUG), { behavior: W, top: X };
|
|
4517
4516
|
}
|
|
4518
4517
|
)
|
|
4519
4518
|
),
|
|
@@ -4537,12 +4536,12 @@ function yx(e) {
|
|
|
4537
4536
|
};
|
|
4538
4537
|
};
|
|
4539
4538
|
}
|
|
4540
|
-
function
|
|
4539
|
+
function Vi(e, t) {
|
|
4541
4540
|
e == 0 ? t() : requestAnimationFrame(() => {
|
|
4542
|
-
|
|
4541
|
+
Vi(e - 1, t);
|
|
4543
4542
|
});
|
|
4544
4543
|
}
|
|
4545
|
-
function
|
|
4544
|
+
function Ki(e, t) {
|
|
4546
4545
|
const n = t - 1;
|
|
4547
4546
|
return typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
|
|
4548
4547
|
}
|
|
@@ -4569,13 +4568,13 @@ const qr = Be(
|
|
|
4569
4568
|
F(
|
|
4570
4569
|
lt(t, i),
|
|
4571
4570
|
Ne(a, n, e, u),
|
|
4572
|
-
Se(([[, d], f, { sizeTree: h }, m, b]) => d && (!qe(h) ||
|
|
4571
|
+
Se(([[, d], f, { sizeTree: h }, m, b]) => d && (!qe(h) || zi(m)) && !f && !b),
|
|
4573
4572
|
Ne(l)
|
|
4574
4573
|
),
|
|
4575
4574
|
([, d]) => {
|
|
4576
4575
|
Vt(o, () => {
|
|
4577
4576
|
Ie(u, !0);
|
|
4578
|
-
}),
|
|
4577
|
+
}), Vi(4, () => {
|
|
4579
4578
|
Vt(r, () => {
|
|
4580
4579
|
Ie(a, !0);
|
|
4581
4580
|
}), Ie(s, d);
|
|
@@ -4605,12 +4604,12 @@ const Dr = "up", Nr = "down", Sx = "none", Cx = {
|
|
|
4605
4604
|
}, Tx = 0, Gr = Be(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
|
|
4606
4605
|
const i = q(!1), a = q(!0), l = Le(), u = Le(), d = q(4), f = q(Tx), h = wt(
|
|
4607
4606
|
F(
|
|
4608
|
-
|
|
4607
|
+
di(F(ye(o), Bn(1), tn(!0)), F(ye(o), Bn(1), tn(!1), ul(100))),
|
|
4609
4608
|
Ze()
|
|
4610
4609
|
),
|
|
4611
4610
|
!1
|
|
4612
4611
|
), m = wt(
|
|
4613
|
-
F(
|
|
4612
|
+
F(di(F(n, tn(!0)), F(n, tn(!1), ul(200))), Ze()),
|
|
4614
4613
|
!1
|
|
4615
4614
|
);
|
|
4616
4615
|
pe(
|
|
@@ -4631,11 +4630,11 @@ const Dr = "up", Nr = "down", Sx = "none", Cx = {
|
|
|
4631
4630
|
viewportHeight: S
|
|
4632
4631
|
};
|
|
4633
4632
|
if (N) {
|
|
4634
|
-
let $,
|
|
4635
|
-
return R > w.state.scrollTop ? ($ = "SCROLLED_DOWN",
|
|
4633
|
+
let $, U;
|
|
4634
|
+
return R > w.state.scrollTop ? ($ = "SCROLLED_DOWN", U = w.state.scrollTop - R) : ($ = "SIZE_DECREASED", U = w.state.scrollTop - R || w.scrollTopDelta), {
|
|
4636
4635
|
atBottom: !0,
|
|
4637
4636
|
atBottomBecause: $,
|
|
4638
|
-
scrollTopDelta:
|
|
4637
|
+
scrollTopDelta: U,
|
|
4639
4638
|
state: _
|
|
4640
4639
|
};
|
|
4641
4640
|
}
|
|
@@ -4742,7 +4741,7 @@ function gl(e, t) {
|
|
|
4742
4741
|
var n;
|
|
4743
4742
|
return typeof e == "number" ? e : (n = e[t]) != null ? n : 0;
|
|
4744
4743
|
}
|
|
4745
|
-
const
|
|
4744
|
+
const qi = Be(
|
|
4746
4745
|
([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
|
|
4747
4746
|
const s = Le(), i = q(0), a = q(0), l = q(0), u = wt(
|
|
4748
4747
|
F(
|
|
@@ -4846,7 +4845,7 @@ function lu(e, t, n, r, o, s) {
|
|
|
4846
4845
|
break;
|
|
4847
4846
|
i++;
|
|
4848
4847
|
}
|
|
4849
|
-
const a = e + i, l =
|
|
4848
|
+
const a = e + i, l = Ki(t, a), u = Array.from({ length: a }).map((d, f) => ({
|
|
4850
4849
|
data: s[f + l],
|
|
4851
4850
|
index: f + l,
|
|
4852
4851
|
offset: 0,
|
|
@@ -4922,37 +4921,37 @@ const Gn = Be(
|
|
|
4922
4921
|
_,
|
|
4923
4922
|
I,
|
|
4924
4923
|
$,
|
|
4925
|
-
|
|
4924
|
+
U,
|
|
4926
4925
|
P,
|
|
4927
4926
|
G
|
|
4928
4927
|
]) => {
|
|
4929
|
-
const K = N, { offsetTree:
|
|
4928
|
+
const K = N, { offsetTree: W, sizeTree: D } = K, M = ot(g);
|
|
4930
4929
|
if (E === 0)
|
|
4931
4930
|
return { ...Ls, totalCount: E };
|
|
4932
4931
|
if (C === 0 && k === 0)
|
|
4933
|
-
return M === 0 ? { ...Ls, totalCount: E } : lu(M, _, N,
|
|
4932
|
+
return M === 0 ? { ...Ls, totalCount: E } : lu(M, _, N, U, P, G || []);
|
|
4934
4933
|
if (qe(D))
|
|
4935
4934
|
return M > 0 ? null : mo(
|
|
4936
|
-
Rx(
|
|
4935
|
+
Rx(Ki(_, E), K, G),
|
|
4937
4936
|
[],
|
|
4938
4937
|
E,
|
|
4939
4938
|
P,
|
|
4940
4939
|
K,
|
|
4941
|
-
|
|
4940
|
+
U
|
|
4942
4941
|
);
|
|
4943
4942
|
const se = [];
|
|
4944
4943
|
if ($.length > 0) {
|
|
4945
4944
|
const le = $[0], de = $[$.length - 1];
|
|
4946
4945
|
let B = 0;
|
|
4947
4946
|
for (const j of ns(D, le, de)) {
|
|
4948
|
-
const Y = j.value, Q = Math.max(j.start, le),
|
|
4949
|
-
for (let ne = Q; ne <=
|
|
4947
|
+
const Y = j.value, Q = Math.max(j.start, le), ce = Math.min(j.end, de);
|
|
4948
|
+
for (let ne = Q; ne <= ce; ne++)
|
|
4950
4949
|
se.push({ data: G == null ? void 0 : G[ne], index: ne, offset: B, size: Y }), B += Y;
|
|
4951
4950
|
}
|
|
4952
4951
|
}
|
|
4953
4952
|
if (!I)
|
|
4954
|
-
return mo([], se, E, P, K,
|
|
4955
|
-
const X = $.length > 0 ? $[$.length - 1] + 1 : 0, te = hx(
|
|
4953
|
+
return mo([], se, E, P, K, U);
|
|
4954
|
+
const X = $.length > 0 ? $[$.length - 1] + 1 : 0, te = hx(W, C, k, X);
|
|
4956
4955
|
if (te.length === 0)
|
|
4957
4956
|
return null;
|
|
4958
4957
|
const L = E - 1, Z = ts([], (le) => {
|
|
@@ -4966,12 +4965,12 @@ const Gn = Be(
|
|
|
4966
4965
|
j += ne * Q + ne * P;
|
|
4967
4966
|
}
|
|
4968
4967
|
Y < X && (j += (X - Y) * Q, Y = X);
|
|
4969
|
-
const
|
|
4970
|
-
for (let ne = Y; ne <=
|
|
4968
|
+
const ce = Math.min(de.end, L);
|
|
4969
|
+
for (let ne = Y; ne <= ce && !(j >= k); ne++)
|
|
4971
4970
|
le.push({ data: G == null ? void 0 : G[ne], index: ne, offset: j, size: Q }), j += Q + P;
|
|
4972
4971
|
}
|
|
4973
4972
|
});
|
|
4974
|
-
return mo(Z, se, E, P, K,
|
|
4973
|
+
return mo(Z, se, E, P, K, U);
|
|
4975
4974
|
}
|
|
4976
4975
|
),
|
|
4977
4976
|
//@ts-expect-error filter needs to be fixed
|
|
@@ -4983,7 +4982,7 @@ const Gn = Be(
|
|
|
4983
4982
|
pe(
|
|
4984
4983
|
F(
|
|
4985
4984
|
e,
|
|
4986
|
-
Se(
|
|
4985
|
+
Se(zi),
|
|
4987
4986
|
oe((C) => C == null ? void 0 : C.length)
|
|
4988
4987
|
),
|
|
4989
4988
|
o
|
|
@@ -5047,12 +5046,12 @@ const Gn = Be(
|
|
|
5047
5046
|
Qe(
|
|
5048
5047
|
cn,
|
|
5049
5048
|
su,
|
|
5050
|
-
|
|
5049
|
+
qi,
|
|
5051
5050
|
qr,
|
|
5052
5051
|
Kr,
|
|
5053
5052
|
Gr,
|
|
5054
5053
|
En,
|
|
5055
|
-
|
|
5054
|
+
Ui
|
|
5056
5055
|
),
|
|
5057
5056
|
{ singleton: !0 }
|
|
5058
5057
|
), cu = Be(
|
|
@@ -5105,11 +5104,11 @@ const Gn = Be(
|
|
|
5105
5104
|
Ne(t, l, n, s, o, r, a),
|
|
5106
5105
|
Ne(e),
|
|
5107
5106
|
oe(([[f, h, m, b, v, g, x, w], y]) => {
|
|
5108
|
-
const { align: R, behavior: S, calculateViewLocation: C = Ex, done: k, ...E } = f, N = ou(f, h, b - 1), _ = Mr(N, h.offsetTree, y) + v + g, I = _ + Kt(h.sizeTree, N)[1], $ = w + g,
|
|
5107
|
+
const { align: R, behavior: S, calculateViewLocation: C = Ex, done: k, ...E } = f, N = ou(f, h, b - 1), _ = Mr(N, h.offsetTree, y) + v + g, I = _ + Kt(h.sizeTree, N)[1], $ = w + g, U = w + m - x, P = C({
|
|
5109
5108
|
itemBottom: I,
|
|
5110
5109
|
itemTop: _,
|
|
5111
5110
|
locationParams: { align: R, behavior: S, ...E },
|
|
5112
|
-
viewportBottom:
|
|
5111
|
+
viewportBottom: U,
|
|
5113
5112
|
viewportTop: $
|
|
5114
5113
|
});
|
|
5115
5114
|
return P ? k && Vt(
|
|
@@ -5202,7 +5201,7 @@ const Ix = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Nx = Be(
|
|
|
5202
5201
|
});
|
|
5203
5202
|
const y = q(null), R = Le();
|
|
5204
5203
|
return pe(
|
|
5205
|
-
|
|
5204
|
+
di(
|
|
5206
5205
|
F(
|
|
5207
5206
|
ye(r),
|
|
5208
5207
|
oe((S) => {
|
|
@@ -5313,7 +5312,7 @@ const Ix = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Nx = Be(
|
|
|
5313
5312
|
},
|
|
5314
5313
|
Qe(Gr),
|
|
5315
5314
|
{ singleton: !0 }
|
|
5316
|
-
),
|
|
5315
|
+
), Gi = Be(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
5317
5316
|
const n = Le(), r = Le(), o = Le(), s = q(!1), i = q(void 0);
|
|
5318
5317
|
return pe(
|
|
5319
5318
|
F(
|
|
@@ -5363,7 +5362,7 @@ const Ix = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Nx = Be(
|
|
|
5363
5362
|
const R = mx(b.sizeTree);
|
|
5364
5363
|
g && x !== null && w !== null && (v = x.scrollTop - w.offsetTop), v -= y, m({ ranges: R, scrollTop: v });
|
|
5365
5364
|
}
|
|
5366
|
-
), pe(F(d, Se(
|
|
5365
|
+
), pe(F(d, Se(zi), oe(Px)), o), pe(
|
|
5367
5366
|
F(
|
|
5368
5367
|
s,
|
|
5369
5368
|
Ne(d),
|
|
@@ -5377,7 +5376,7 @@ const Ix = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Nx = Be(
|
|
|
5377
5376
|
restoreStateFrom: d
|
|
5378
5377
|
};
|
|
5379
5378
|
},
|
|
5380
|
-
Qe(cn, yt, qr, En,
|
|
5379
|
+
Qe(cn, yt, qr, En, Gi)
|
|
5381
5380
|
);
|
|
5382
5381
|
function Px(e) {
|
|
5383
5382
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
@@ -5475,7 +5474,7 @@ const Mx = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5475
5474
|
}
|
|
5476
5475
|
), { deviation: e };
|
|
5477
5476
|
},
|
|
5478
|
-
Qe(yt, Gr, Gn, cn, kn,
|
|
5477
|
+
Qe(yt, Gr, Gn, cn, kn, Ui)
|
|
5479
5478
|
), Lx = Be(
|
|
5480
5479
|
([
|
|
5481
5480
|
e,
|
|
@@ -5503,14 +5502,14 @@ const Mx = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5503
5502
|
...d
|
|
5504
5503
|
}),
|
|
5505
5504
|
Qe(
|
|
5506
|
-
|
|
5505
|
+
qi,
|
|
5507
5506
|
Ax,
|
|
5508
5507
|
En,
|
|
5509
5508
|
fu,
|
|
5510
5509
|
cu,
|
|
5511
5510
|
_x,
|
|
5512
5511
|
kx,
|
|
5513
|
-
|
|
5512
|
+
Gi,
|
|
5514
5513
|
du,
|
|
5515
5514
|
kn,
|
|
5516
5515
|
uu
|
|
@@ -5635,7 +5634,7 @@ function mu(e, t, n) {
|
|
|
5635
5634
|
for (const k of i)
|
|
5636
5635
|
k in y && We(S[k], y[k]);
|
|
5637
5636
|
return () => {
|
|
5638
|
-
Object.values(S).map(
|
|
5637
|
+
Object.values(S).map(Bi);
|
|
5639
5638
|
};
|
|
5640
5639
|
}, [y, S, R]), eo(() => {
|
|
5641
5640
|
l(R, y);
|
|
@@ -5737,17 +5736,17 @@ function wu(e, t, n, r = mr, o, s) {
|
|
|
5737
5736
|
}
|
|
5738
5737
|
return { scrollByCallback: f, scrollerRef: i, scrollToCallback: d };
|
|
5739
5738
|
}
|
|
5740
|
-
const Fs = "-webkit-sticky", wl = "sticky",
|
|
5739
|
+
const Fs = "-webkit-sticky", wl = "sticky", Yi = hu(() => {
|
|
5741
5740
|
if (typeof document > "u")
|
|
5742
5741
|
return wl;
|
|
5743
5742
|
const e = document.createElement("div");
|
|
5744
5743
|
return e.style.position = Fs, e.style.position === Fs ? Fs : wl;
|
|
5745
5744
|
});
|
|
5746
|
-
function
|
|
5745
|
+
function Xi(e) {
|
|
5747
5746
|
return e;
|
|
5748
5747
|
}
|
|
5749
5748
|
const zx = /* @__PURE__ */ Be(() => {
|
|
5750
|
-
const e = q((a) => `Item ${a}`), t = q((a) => `Group ${a}`), n = q({}), r = q(
|
|
5749
|
+
const e = q((a) => `Item ${a}`), t = q((a) => `Group ${a}`), n = q({}), r = q(Xi), o = q("div"), s = q(mr), i = (a, l = null) => wt(
|
|
5751
5750
|
F(
|
|
5752
5751
|
n,
|
|
5753
5752
|
oe((u) => u[a]),
|
|
@@ -5775,7 +5774,7 @@ const zx = /* @__PURE__ */ Be(() => {
|
|
|
5775
5774
|
}), Bx = /* @__PURE__ */ Be(
|
|
5776
5775
|
([e, t]) => ({ ...e, ...t }),
|
|
5777
5776
|
Qe(pu, zx)
|
|
5778
|
-
), Hx = ({ height: e }) => /* @__PURE__ */ c.jsx("div", { style: { height: e } }), Ux = { overflowAnchor: "none", position:
|
|
5777
|
+
), Hx = ({ height: e }) => /* @__PURE__ */ c.jsx("div", { style: { height: e } }), Ux = { overflowAnchor: "none", position: Yi(), zIndex: 1 }, bu = { overflowAnchor: "none" }, Wx = { ...bu, display: "inline-block", height: "100%" }, bl = /* @__PURE__ */ z.memo(function({ showTopList: e = !1 }) {
|
|
5779
5778
|
const t = ke("listState"), n = $t("sizeRanges"), r = ke("useWindowScroll"), o = ke("customScrollParent"), s = $t("windowScrollContainerState"), i = $t("scrollContainerState"), a = o || r ? s : i, l = ke("itemContent"), u = ke("context"), d = ke("groupContent"), f = ke("trackItemSizes"), h = ke("itemSize"), m = ke("log"), b = $t("gap"), v = ke("horizontalDirection"), { callbackRef: g } = sx(
|
|
5780
5779
|
n,
|
|
5781
5780
|
h,
|
|
@@ -5787,10 +5786,10 @@ const zx = /* @__PURE__ */ Be(() => {
|
|
|
5787
5786
|
v,
|
|
5788
5787
|
ke("skipAnimationFrameInResizeObserver")
|
|
5789
5788
|
), [x, w] = z.useState(0);
|
|
5790
|
-
|
|
5789
|
+
Ji("deviation", (P) => {
|
|
5791
5790
|
x !== P && w(P);
|
|
5792
5791
|
});
|
|
5793
|
-
const y = ke("EmptyPlaceholder"), R = ke("ScrollSeekPlaceholder") || Hx, S = ke("ListComponent"), C = ke("ItemComponent"), k = ke("GroupComponent"), E = ke("computeItemKey"), N = ke("isSeeking"), _ = ke("groupIndices").length > 0, I = ke("alignToBottom"), $ = ke("initialItemFinalLocationReached"),
|
|
5792
|
+
const y = ke("EmptyPlaceholder"), R = ke("ScrollSeekPlaceholder") || Hx, S = ke("ListComponent"), C = ke("ItemComponent"), k = ke("GroupComponent"), E = ke("computeItemKey"), N = ke("isSeeking"), _ = ke("groupIndices").length > 0, I = ke("alignToBottom"), $ = ke("initialItemFinalLocationReached"), U = e ? {} : {
|
|
5794
5793
|
boxSizing: "border-box",
|
|
5795
5794
|
...v ? {
|
|
5796
5795
|
display: "inline-block",
|
|
@@ -5812,7 +5811,7 @@ const zx = /* @__PURE__ */ Be(() => {
|
|
|
5812
5811
|
...vt(S, u),
|
|
5813
5812
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
5814
5813
|
ref: g,
|
|
5815
|
-
style:
|
|
5814
|
+
style: U,
|
|
5816
5815
|
children: (e ? t.topItems : t.items).map((P) => {
|
|
5817
5816
|
const G = P.originalIndex, K = E(G + t.firstItemIndex, P.data, u);
|
|
5818
5817
|
return N ? /* @__PURE__ */ co(
|
|
@@ -5870,7 +5869,7 @@ const zx = /* @__PURE__ */ Be(() => {
|
|
|
5870
5869
|
width: "100%",
|
|
5871
5870
|
...e ? { display: "flex", flexDirection: "column" } : {}
|
|
5872
5871
|
}), qx = {
|
|
5873
|
-
position:
|
|
5872
|
+
position: Yi(),
|
|
5874
5873
|
top: 0,
|
|
5875
5874
|
width: "100%",
|
|
5876
5875
|
zIndex: 1
|
|
@@ -5991,7 +5990,7 @@ const Jx = ({ children: e }) => {
|
|
|
5991
5990
|
] });
|
|
5992
5991
|
}), {
|
|
5993
5992
|
Component: tv,
|
|
5994
|
-
useEmitter:
|
|
5993
|
+
useEmitter: Ji,
|
|
5995
5994
|
useEmitterValue: ke,
|
|
5996
5995
|
usePublisher: $t
|
|
5997
5996
|
} = /* @__PURE__ */ mu(
|
|
@@ -6053,14 +6052,14 @@ const Jx = ({ children: e }) => {
|
|
|
6053
6052
|
}
|
|
6054
6053
|
},
|
|
6055
6054
|
ev
|
|
6056
|
-
), nv = /* @__PURE__ */ yu({ useEmitter:
|
|
6055
|
+
), nv = /* @__PURE__ */ yu({ useEmitter: Ji, useEmitterValue: ke, usePublisher: $t }), rv = /* @__PURE__ */ Su({ useEmitter: Ji, useEmitterValue: ke, usePublisher: $t }), ov = tv, sv = /* @__PURE__ */ Be(() => {
|
|
6057
6056
|
const e = q((u) => /* @__PURE__ */ c.jsxs("td", { children: [
|
|
6058
6057
|
"Item $",
|
|
6059
6058
|
u
|
|
6060
6059
|
] })), t = q(null), n = q((u) => /* @__PURE__ */ c.jsxs("td", { colSpan: 1e3, children: [
|
|
6061
6060
|
"Group ",
|
|
6062
6061
|
u
|
|
6063
|
-
] })), r = q(null), o = q(null), s = q({}), i = q(
|
|
6062
|
+
] })), r = q(null), o = q(null), s = q({}), i = q(Xi), a = q(mr), l = (u, d = null) => wt(
|
|
6064
6063
|
F(
|
|
6065
6064
|
s,
|
|
6066
6065
|
oe((f) => f[u]),
|
|
@@ -6090,7 +6089,7 @@ const Jx = ({ children: e }) => {
|
|
|
6090
6089
|
};
|
|
6091
6090
|
});
|
|
6092
6091
|
Qe(pu, sv);
|
|
6093
|
-
|
|
6092
|
+
Yi();
|
|
6094
6093
|
const yl = {
|
|
6095
6094
|
bottom: 0,
|
|
6096
6095
|
itemHeight: 0,
|
|
@@ -6133,7 +6132,7 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6133
6132
|
{ customScrollParent: g, useWindowScroll: x, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: R },
|
|
6134
6133
|
S
|
|
6135
6134
|
]) => {
|
|
6136
|
-
const C = q(0), k = q(0), E = q(yl), N = q({ height: 0, width: 0 }), _ = q({ height: 0, width: 0 }), I = Le(), $ = Le(),
|
|
6135
|
+
const C = q(0), k = q(0), E = q(yl), N = q({ height: 0, width: 0 }), _ = q({ height: 0, width: 0 }), I = Le(), $ = Le(), U = q(0), P = q(null), G = q({ column: 0, row: 0 }), K = Le(), W = Le(), D = q(!1), M = q(0), se = q(!0), X = q(!1), te = q(!1);
|
|
6137
6136
|
We(
|
|
6138
6137
|
F(
|
|
6139
6138
|
b,
|
|
@@ -6146,10 +6145,10 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6146
6145
|
), We(
|
|
6147
6146
|
F(
|
|
6148
6147
|
lt(b, se, _, N, M, X),
|
|
6149
|
-
Se(([j, Y, Q,
|
|
6148
|
+
Se(([j, Y, Q, ce, , ne]) => j && !Y && Q.height !== 0 && ce.height !== 0 && !ne)
|
|
6150
6149
|
),
|
|
6151
6150
|
([, , , , j]) => {
|
|
6152
|
-
Ie(X, !0),
|
|
6151
|
+
Ie(X, !0), Vi(1, () => {
|
|
6153
6152
|
Ie(I, j);
|
|
6154
6153
|
}), Vt(F(u), () => {
|
|
6155
6154
|
Ie(t, [0, 0]), Ie(se, !0);
|
|
@@ -6157,7 +6156,7 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6157
6156
|
}
|
|
6158
6157
|
), pe(
|
|
6159
6158
|
F(
|
|
6160
|
-
|
|
6159
|
+
W,
|
|
6161
6160
|
Se((j) => j != null && j.scrollTop > 0),
|
|
6162
6161
|
tn(0)
|
|
6163
6162
|
),
|
|
@@ -6165,7 +6164,7 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6165
6164
|
), We(
|
|
6166
6165
|
F(
|
|
6167
6166
|
b,
|
|
6168
|
-
Ne(
|
|
6167
|
+
Ne(W),
|
|
6169
6168
|
Se(([, j]) => j != null)
|
|
6170
6169
|
),
|
|
6171
6170
|
([, j]) => {
|
|
@@ -6187,10 +6186,10 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6187
6186
|
ye(G, (j, Y) => j && j.column === Y.column && j.row === Y.row),
|
|
6188
6187
|
ye(u)
|
|
6189
6188
|
),
|
|
6190
|
-
oe(([j, Y, Q,
|
|
6189
|
+
oe(([j, Y, Q, ce]) => ({
|
|
6191
6190
|
gap: Q,
|
|
6192
6191
|
item: Y,
|
|
6193
|
-
scrollTop:
|
|
6192
|
+
scrollTop: ce,
|
|
6194
6193
|
viewport: j
|
|
6195
6194
|
}))
|
|
6196
6195
|
),
|
|
@@ -6214,7 +6213,7 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6214
6213
|
([
|
|
6215
6214
|
j,
|
|
6216
6215
|
[Y, Q],
|
|
6217
|
-
|
|
6216
|
+
ce,
|
|
6218
6217
|
ne,
|
|
6219
6218
|
je,
|
|
6220
6219
|
Ae,
|
|
@@ -6223,17 +6222,17 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6223
6222
|
_e,
|
|
6224
6223
|
ze
|
|
6225
6224
|
]) => {
|
|
6226
|
-
const { column: Ye, row: Ve } =
|
|
6227
|
-
if (Re === 0 && (j === 0 ||
|
|
6225
|
+
const { column: Ye, row: Ve } = ce, { height: ut, width: ft } = ne, { width: ue } = je;
|
|
6226
|
+
if (Re === 0 && (j === 0 || ue === 0))
|
|
6228
6227
|
return yl;
|
|
6229
6228
|
if (ft === 0) {
|
|
6230
|
-
const nt =
|
|
6229
|
+
const nt = Ki(ze, j), Jt = nt + Math.max(Re - 1, 0);
|
|
6231
6230
|
return av(Tl(nt, Jt, Ae));
|
|
6232
6231
|
}
|
|
6233
|
-
const he = Cu(
|
|
6232
|
+
const he = Cu(ue, ft, Ye);
|
|
6234
6233
|
let me, O;
|
|
6235
6234
|
_e ? Y === 0 && Q === 0 && Re > 0 ? (me = 0, O = Re - 1) : (me = he * Po((Y + Ve) / (ut + Ve)), O = he * Sl((Q + Ve) / (ut + Ve)) - 1, O = zs(j - 1, Ar(O, he - 1)), me = zs(O, Ar(0, me))) : (me = 0, O = -1);
|
|
6236
|
-
const V = Tl(me, O, Ae), { bottom: be, top: $e } = Rl(je,
|
|
6235
|
+
const V = Tl(me, O, Ae), { bottom: be, top: $e } = Rl(je, ce, ne, V), fe = Sl(j / he), Pe = fe * ut + (fe - 1) * Ve - be;
|
|
6237
6236
|
return { bottom: be, itemHeight: ut, items: V, itemWidth: ft, offsetBottom: Pe, offsetTop: $e, top: $e };
|
|
6238
6237
|
}
|
|
6239
6238
|
)
|
|
@@ -6250,8 +6249,8 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6250
6249
|
F(
|
|
6251
6250
|
lt(N, _, E, G),
|
|
6252
6251
|
Se(([j, Y, { items: Q }]) => Q.length > 0 && Y.height !== 0 && j.height !== 0),
|
|
6253
|
-
oe(([j, Y, { items: Q },
|
|
6254
|
-
const { bottom: ne, top: je } = Rl(j,
|
|
6252
|
+
oe(([j, Y, { items: Q }, ce]) => {
|
|
6253
|
+
const { bottom: ne, top: je } = Rl(j, ce, Y, Q);
|
|
6255
6254
|
return [je, ne];
|
|
6256
6255
|
}),
|
|
6257
6256
|
Ze(Or)
|
|
@@ -6273,8 +6272,8 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6273
6272
|
Se(([{ items: j }]) => j.length > 0),
|
|
6274
6273
|
Ne(L),
|
|
6275
6274
|
Se(([[j, Y], Q]) => {
|
|
6276
|
-
const
|
|
6277
|
-
return (Q || j.bottom > 0 && j.itemHeight > 0 && j.offsetBottom === 0 && j.items.length === Y) &&
|
|
6275
|
+
const ce = j.items[j.items.length - 1].index === Y - 1;
|
|
6276
|
+
return (Q || j.bottom > 0 && j.itemHeight > 0 && j.offsetBottom === 0 && j.items.length === Y) && ce;
|
|
6278
6277
|
}),
|
|
6279
6278
|
oe(([[, j]]) => j - 1),
|
|
6280
6279
|
Ze()
|
|
@@ -6303,11 +6302,11 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6303
6302
|
F(
|
|
6304
6303
|
I,
|
|
6305
6304
|
Ne(N, _, C, G),
|
|
6306
|
-
oe(([j, Y, Q,
|
|
6305
|
+
oe(([j, Y, Q, ce, ne]) => {
|
|
6307
6306
|
const je = iu(j), { align: Ae, behavior: Re, offset: _e } = je;
|
|
6308
6307
|
let ze = je.index;
|
|
6309
|
-
ze === "LAST" && (ze =
|
|
6310
|
-
let Ye =
|
|
6308
|
+
ze === "LAST" && (ze = ce - 1), ze = Ar(0, ze, zs(ce - 1, ze));
|
|
6309
|
+
let Ye = gi(Y, ne, Q, ze);
|
|
6311
6310
|
return Ae === "end" ? Ye = Cl(Ye - Y.height + Q.height) : Ae === "center" && (Ye = Cl(Ye - Y.height / 2 + Q.height / 2)), _e && (Ye += _e), { behavior: Re, top: Ye };
|
|
6312
6311
|
})
|
|
6313
6312
|
),
|
|
@@ -6330,7 +6329,7 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6330
6329
|
customScrollParent: g,
|
|
6331
6330
|
// input
|
|
6332
6331
|
data: P,
|
|
6333
|
-
deviation:
|
|
6332
|
+
deviation: U,
|
|
6334
6333
|
footerHeight: o,
|
|
6335
6334
|
gap: G,
|
|
6336
6335
|
headerHeight: s,
|
|
@@ -6338,7 +6337,7 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6338
6337
|
initialItemCount: k,
|
|
6339
6338
|
itemDimensions: _,
|
|
6340
6339
|
overscan: n,
|
|
6341
|
-
restoreStateFrom:
|
|
6340
|
+
restoreStateFrom: W,
|
|
6342
6341
|
scrollBy: i,
|
|
6343
6342
|
scrollContainerState: a,
|
|
6344
6343
|
scrollHeight: $,
|
|
@@ -6368,7 +6367,7 @@ const cv = /* @__PURE__ */ Be(
|
|
|
6368
6367
|
...S
|
|
6369
6368
|
};
|
|
6370
6369
|
},
|
|
6371
|
-
Qe(
|
|
6370
|
+
Qe(qi, yt, Gr, fu, En, Gi, kn)
|
|
6372
6371
|
);
|
|
6373
6372
|
function Cu(e, t, n) {
|
|
6374
6373
|
return Ar(1, Po((e + n) / (Po(t) + n)));
|
|
@@ -6377,15 +6376,15 @@ function Rl(e, t, n, r) {
|
|
|
6377
6376
|
const { height: o } = n;
|
|
6378
6377
|
if (o === void 0 || r.length === 0)
|
|
6379
6378
|
return { bottom: 0, top: 0 };
|
|
6380
|
-
const s =
|
|
6381
|
-
return { bottom:
|
|
6379
|
+
const s = gi(e, t, n, r[0].index);
|
|
6380
|
+
return { bottom: gi(e, t, n, r[r.length - 1].index) + o, top: s };
|
|
6382
6381
|
}
|
|
6383
|
-
function
|
|
6382
|
+
function gi(e, t, n, r) {
|
|
6384
6383
|
const o = Cu(e.width, n.width, t.column), s = Po(r / o), i = s * n.height + Ar(0, s - 1) * t.row;
|
|
6385
6384
|
return i > 0 ? i + t.row : i;
|
|
6386
6385
|
}
|
|
6387
6386
|
const uv = /* @__PURE__ */ Be(() => {
|
|
6388
|
-
const e = q((f) => `Item ${f}`), t = q({}), n = q(null), r = q("virtuoso-grid-item"), o = q("virtuoso-grid-list"), s = q(
|
|
6387
|
+
const e = q((f) => `Item ${f}`), t = q({}), n = q(null), r = q("virtuoso-grid-item"), o = q("virtuoso-grid-list"), s = q(Xi), i = q("div"), a = q(mr), l = (f, h = null) => wt(
|
|
6389
6388
|
F(
|
|
6390
6389
|
t,
|
|
6391
6390
|
oe((m) => m[f]),
|
|
@@ -6584,7 +6583,7 @@ const bv = qo(
|
|
|
6584
6583
|
}
|
|
6585
6584
|
}
|
|
6586
6585
|
);
|
|
6587
|
-
function
|
|
6586
|
+
function xi({ className: e, variant: t, ...n }) {
|
|
6588
6587
|
return /* @__PURE__ */ c.jsx("div", { className: J(bv({ variant: t }), e), ...n });
|
|
6589
6588
|
}
|
|
6590
6589
|
function ae(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
@@ -6712,7 +6711,7 @@ function El(e, t) {
|
|
|
6712
6711
|
return e(t);
|
|
6713
6712
|
e != null && (e.current = t);
|
|
6714
6713
|
}
|
|
6715
|
-
function
|
|
6714
|
+
function Zi(...e) {
|
|
6716
6715
|
return (t) => {
|
|
6717
6716
|
let n = !1;
|
|
6718
6717
|
const r = e.map((o) => {
|
|
@@ -6729,7 +6728,7 @@ function Qi(...e) {
|
|
|
6729
6728
|
};
|
|
6730
6729
|
}
|
|
6731
6730
|
function Me(...e) {
|
|
6732
|
-
return p.useCallback(
|
|
6731
|
+
return p.useCallback(Zi(...e), e);
|
|
6733
6732
|
}
|
|
6734
6733
|
var kv = [
|
|
6735
6734
|
"a",
|
|
@@ -6832,7 +6831,7 @@ function sn(e) {
|
|
|
6832
6831
|
n((r) => r ?? String(_v++));
|
|
6833
6832
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
6834
6833
|
}
|
|
6835
|
-
var ss = "Collapsible", [jv, vT] = un(ss), [Pv,
|
|
6834
|
+
var ss = "Collapsible", [jv, vT] = un(ss), [Pv, Qi] = jv(ss), ku = p.forwardRef(
|
|
6836
6835
|
(e, t) => {
|
|
6837
6836
|
const {
|
|
6838
6837
|
__scopeCollapsible: n,
|
|
@@ -6858,7 +6857,7 @@ var ss = "Collapsible", [jv, vT] = un(ss), [Pv, ea] = jv(ss), ku = p.forwardRef(
|
|
|
6858
6857
|
children: /* @__PURE__ */ c.jsx(
|
|
6859
6858
|
Te.div,
|
|
6860
6859
|
{
|
|
6861
|
-
"data-state":
|
|
6860
|
+
"data-state": ta(l),
|
|
6862
6861
|
"data-disabled": s ? "" : void 0,
|
|
6863
6862
|
...a,
|
|
6864
6863
|
ref: t
|
|
@@ -6871,14 +6870,14 @@ var ss = "Collapsible", [jv, vT] = un(ss), [Pv, ea] = jv(ss), ku = p.forwardRef(
|
|
|
6871
6870
|
ku.displayName = ss;
|
|
6872
6871
|
var Eu = "CollapsibleTrigger", Iu = p.forwardRef(
|
|
6873
6872
|
(e, t) => {
|
|
6874
|
-
const { __scopeCollapsible: n, ...r } = e, o =
|
|
6873
|
+
const { __scopeCollapsible: n, ...r } = e, o = Qi(Eu, n);
|
|
6875
6874
|
return /* @__PURE__ */ c.jsx(
|
|
6876
6875
|
Te.button,
|
|
6877
6876
|
{
|
|
6878
6877
|
type: "button",
|
|
6879
6878
|
"aria-controls": o.contentId,
|
|
6880
6879
|
"aria-expanded": o.open || !1,
|
|
6881
|
-
"data-state":
|
|
6880
|
+
"data-state": ta(o.open),
|
|
6882
6881
|
"data-disabled": o.disabled ? "" : void 0,
|
|
6883
6882
|
disabled: o.disabled,
|
|
6884
6883
|
...r,
|
|
@@ -6889,15 +6888,15 @@ var Eu = "CollapsibleTrigger", Iu = p.forwardRef(
|
|
|
6889
6888
|
}
|
|
6890
6889
|
);
|
|
6891
6890
|
Iu.displayName = Eu;
|
|
6892
|
-
var
|
|
6891
|
+
var ea = "CollapsibleContent", Ov = p.forwardRef(
|
|
6893
6892
|
(e, t) => {
|
|
6894
|
-
const { forceMount: n, ...r } = e, o = ea
|
|
6893
|
+
const { forceMount: n, ...r } = e, o = Qi(ea, e.__scopeCollapsible);
|
|
6895
6894
|
return /* @__PURE__ */ c.jsx(Pt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ c.jsx(Mv, { ...r, ref: t, present: s }) });
|
|
6896
6895
|
}
|
|
6897
6896
|
);
|
|
6898
|
-
Ov.displayName =
|
|
6897
|
+
Ov.displayName = ea;
|
|
6899
6898
|
var Mv = p.forwardRef((e, t) => {
|
|
6900
|
-
const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = ea
|
|
6899
|
+
const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = Qi(ea, n), [a, l] = p.useState(r), u = p.useRef(null), d = Me(t, u), f = p.useRef(0), h = f.current, m = p.useRef(0), b = m.current, v = i.open || a, g = p.useRef(v), x = p.useRef(void 0);
|
|
6901
6900
|
return p.useEffect(() => {
|
|
6902
6901
|
const w = requestAnimationFrame(() => g.current = !1);
|
|
6903
6902
|
return () => cancelAnimationFrame(w);
|
|
@@ -6914,7 +6913,7 @@ var Mv = p.forwardRef((e, t) => {
|
|
|
6914
6913
|
}, [i.open, r]), /* @__PURE__ */ c.jsx(
|
|
6915
6914
|
Te.div,
|
|
6916
6915
|
{
|
|
6917
|
-
"data-state":
|
|
6916
|
+
"data-state": ta(i.open),
|
|
6918
6917
|
"data-disabled": i.disabled ? "" : void 0,
|
|
6919
6918
|
id: i.contentId,
|
|
6920
6919
|
hidden: !v,
|
|
@@ -6929,7 +6928,7 @@ var Mv = p.forwardRef((e, t) => {
|
|
|
6929
6928
|
}
|
|
6930
6929
|
);
|
|
6931
6930
|
});
|
|
6932
|
-
function
|
|
6931
|
+
function ta(e) {
|
|
6933
6932
|
return e ? "open" : "closed";
|
|
6934
6933
|
}
|
|
6935
6934
|
var Dv = ku;
|
|
@@ -7111,7 +7110,7 @@ function Jv(e, t) {
|
|
|
7111
7110
|
}).join(`
|
|
7112
7111
|
`);
|
|
7113
7112
|
}
|
|
7114
|
-
class
|
|
7113
|
+
class na {
|
|
7115
7114
|
constructor(t) {
|
|
7116
7115
|
this.options = t || Yn;
|
|
7117
7116
|
}
|
|
@@ -7664,7 +7663,7 @@ function Ml(e) {
|
|
|
7664
7663
|
}
|
|
7665
7664
|
class yn {
|
|
7666
7665
|
constructor(t) {
|
|
7667
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Yn, this.options.tokenizer = this.options.tokenizer || new
|
|
7666
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Yn, this.options.tokenizer = this.options.tokenizer || new na(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
7668
7667
|
inLink: !1,
|
|
7669
7668
|
inRawBlock: !1,
|
|
7670
7669
|
top: !0
|
|
@@ -7882,7 +7881,7 @@ class yn {
|
|
|
7882
7881
|
return n;
|
|
7883
7882
|
}
|
|
7884
7883
|
}
|
|
7885
|
-
class
|
|
7884
|
+
class ra {
|
|
7886
7885
|
constructor(t) {
|
|
7887
7886
|
this.options = t || Yn;
|
|
7888
7887
|
}
|
|
@@ -8097,7 +8096,7 @@ class Ou {
|
|
|
8097
8096
|
}
|
|
8098
8097
|
class Sn {
|
|
8099
8098
|
constructor(t) {
|
|
8100
|
-
this.options = t || Yn, this.options.renderer = this.options.renderer || new
|
|
8099
|
+
this.options = t || Yn, this.options.renderer = this.options.renderer || new ra(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Pu(), this.slugger = new Ou();
|
|
8101
8100
|
}
|
|
8102
8101
|
/**
|
|
8103
8102
|
* Static Parse Method
|
|
@@ -8286,7 +8285,7 @@ class Mo {
|
|
|
8286
8285
|
return t;
|
|
8287
8286
|
}
|
|
8288
8287
|
}
|
|
8289
|
-
|
|
8288
|
+
Oa(Mo, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
8290
8289
|
"preprocess",
|
|
8291
8290
|
"postprocess"
|
|
8292
8291
|
]));
|
|
@@ -8395,7 +8394,7 @@ ve.use = function(...e) {
|
|
|
8395
8394
|
}
|
|
8396
8395
|
o.childTokens && (t.childTokens[o.name] = o.childTokens);
|
|
8397
8396
|
}), r.extensions = t), n.renderer) {
|
|
8398
|
-
const o = ve.defaults.renderer || new
|
|
8397
|
+
const o = ve.defaults.renderer || new ra();
|
|
8399
8398
|
for (const s in n.renderer) {
|
|
8400
8399
|
const i = o[s];
|
|
8401
8400
|
o[s] = (...a) => {
|
|
@@ -8406,7 +8405,7 @@ ve.use = function(...e) {
|
|
|
8406
8405
|
r.renderer = o;
|
|
8407
8406
|
}
|
|
8408
8407
|
if (n.tokenizer) {
|
|
8409
|
-
const o = ve.defaults.tokenizer || new
|
|
8408
|
+
const o = ve.defaults.tokenizer || new na();
|
|
8410
8409
|
for (const s in n.tokenizer) {
|
|
8411
8410
|
const i = o[s];
|
|
8412
8411
|
o[s] = (...a) => {
|
|
@@ -8468,11 +8467,11 @@ ve.walkTokens = function(e, t) {
|
|
|
8468
8467
|
ve.parseInline = Mu(yn.lexInline, Sn.parseInline);
|
|
8469
8468
|
ve.Parser = Sn;
|
|
8470
8469
|
ve.parser = Sn.parse;
|
|
8471
|
-
ve.Renderer =
|
|
8470
|
+
ve.Renderer = ra;
|
|
8472
8471
|
ve.TextRenderer = Pu;
|
|
8473
8472
|
ve.Lexer = yn;
|
|
8474
8473
|
ve.lexer = yn.lex;
|
|
8475
|
-
ve.Tokenizer =
|
|
8474
|
+
ve.Tokenizer = na;
|
|
8476
8475
|
ve.Slugger = Ou;
|
|
8477
8476
|
ve.Hooks = Mo;
|
|
8478
8477
|
ve.parse = ve;
|
|
@@ -8618,7 +8617,7 @@ function iw({ ...e }) {
|
|
|
8618
8617
|
update: n
|
|
8619
8618
|
};
|
|
8620
8619
|
}
|
|
8621
|
-
function
|
|
8620
|
+
function oa() {
|
|
8622
8621
|
const [e, t] = p.useState(vo);
|
|
8623
8622
|
return p.useEffect(() => (xo.push(t), () => {
|
|
8624
8623
|
const n = xo.indexOf(t);
|
|
@@ -8647,7 +8646,7 @@ function aw(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
8647
8646
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
8648
8647
|
}, [n, t]);
|
|
8649
8648
|
}
|
|
8650
|
-
var lw = "DismissableLayer",
|
|
8649
|
+
var lw = "DismissableLayer", vi = "dismissableLayer.update", cw = "dismissableLayer.pointerDownOutside", uw = "dismissableLayer.focusOutside", $l, Lu = p.createContext({
|
|
8651
8650
|
layers: /* @__PURE__ */ new Set(),
|
|
8652
8651
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
8653
8652
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -8679,7 +8678,7 @@ var lw = "DismissableLayer", wi = "dismissableLayer.update", cw = "dismissableLa
|
|
|
8679
8678
|
d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), Fl());
|
|
8680
8679
|
}, [d, u]), p.useEffect(() => {
|
|
8681
8680
|
const k = () => m({});
|
|
8682
|
-
return document.addEventListener(
|
|
8681
|
+
return document.addEventListener(vi, k), () => document.removeEventListener(vi, k);
|
|
8683
8682
|
}, []), /* @__PURE__ */ c.jsx(
|
|
8684
8683
|
Te.div,
|
|
8685
8684
|
{
|
|
@@ -8756,7 +8755,7 @@ function pw(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
8756
8755
|
};
|
|
8757
8756
|
}
|
|
8758
8757
|
function Fl() {
|
|
8759
|
-
const e = new CustomEvent(
|
|
8758
|
+
const e = new CustomEvent(vi);
|
|
8760
8759
|
document.dispatchEvent(e);
|
|
8761
8760
|
}
|
|
8762
8761
|
function $u(e, t, n, { discrete: r }) {
|
|
@@ -8901,7 +8900,7 @@ var Sw = "Portal", ls = p.forwardRef((e, t) => {
|
|
|
8901
8900
|
});
|
|
8902
8901
|
ls.displayName = Sw;
|
|
8903
8902
|
var Ks = 0;
|
|
8904
|
-
function
|
|
8903
|
+
function sa() {
|
|
8905
8904
|
p.useEffect(() => {
|
|
8906
8905
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
8907
8906
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Wl()), document.body.insertAdjacentElement("beforeend", e[1] ?? Wl()), Ks++, () => {
|
|
@@ -9204,19 +9203,19 @@ var Lw = function() {
|
|
|
9204
9203
|
return Bw(o);
|
|
9205
9204
|
}, [o]);
|
|
9206
9205
|
return p.createElement(Hw, { styles: Uw(s, !t, o, n ? "" : "!important") });
|
|
9207
|
-
},
|
|
9206
|
+
}, wi = !1;
|
|
9208
9207
|
if (typeof window < "u")
|
|
9209
9208
|
try {
|
|
9210
9209
|
var oo = Object.defineProperty({}, "passive", {
|
|
9211
9210
|
get: function() {
|
|
9212
|
-
return
|
|
9211
|
+
return wi = !0, !0;
|
|
9213
9212
|
}
|
|
9214
9213
|
});
|
|
9215
9214
|
window.addEventListener("test", oo, oo), window.removeEventListener("test", oo, oo);
|
|
9216
9215
|
} catch {
|
|
9217
|
-
|
|
9216
|
+
wi = !1;
|
|
9218
9217
|
}
|
|
9219
|
-
var Qn =
|
|
9218
|
+
var Qn = wi ? { passive: !1 } : !1, Kw = function(e) {
|
|
9220
9219
|
return e.tagName === "TEXTAREA";
|
|
9221
9220
|
}, Wu = function(e, t) {
|
|
9222
9221
|
if (!(e instanceof Element))
|
|
@@ -9427,7 +9426,7 @@ var sb = function(e) {
|
|
|
9427
9426
|
tr.set(f, h), s.set(f, m), h || (io.has(f) || f.removeAttribute(r), io.delete(f)), m || f.removeAttribute(n);
|
|
9428
9427
|
}), Xs--, Xs || (tr = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), io = /* @__PURE__ */ new WeakMap(), ao = {});
|
|
9429
9428
|
};
|
|
9430
|
-
},
|
|
9429
|
+
}, ia = function(e, t, n) {
|
|
9431
9430
|
n === void 0 && (n = "data-aria-hidden");
|
|
9432
9431
|
var r = Array.from(Array.isArray(e) ? e : [e]), o = sb(e);
|
|
9433
9432
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), ab(r, o, n, "aria-hidden")) : function() {
|
|
@@ -9475,7 +9474,7 @@ var Xu = "DialogTrigger", Ju = p.forwardRef(
|
|
|
9475
9474
|
"aria-haspopup": "dialog",
|
|
9476
9475
|
"aria-expanded": o.open,
|
|
9477
9476
|
"aria-controls": o.contentId,
|
|
9478
|
-
"data-state":
|
|
9477
|
+
"data-state": ca(o.open),
|
|
9479
9478
|
...r,
|
|
9480
9479
|
ref: s,
|
|
9481
9480
|
onClick: ae(e.onClick, o.onOpenToggle)
|
|
@@ -9484,13 +9483,13 @@ var Xu = "DialogTrigger", Ju = p.forwardRef(
|
|
|
9484
9483
|
}
|
|
9485
9484
|
);
|
|
9486
9485
|
Ju.displayName = Xu;
|
|
9487
|
-
var
|
|
9486
|
+
var aa = "DialogPortal", [cb, Zu] = Gu(aa, {
|
|
9488
9487
|
forceMount: void 0
|
|
9489
9488
|
}), Qu = (e) => {
|
|
9490
|
-
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Xt(
|
|
9489
|
+
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Xt(aa, t);
|
|
9491
9490
|
return /* @__PURE__ */ c.jsx(cb, { scope: t, forceMount: n, children: p.Children.map(r, (i) => /* @__PURE__ */ c.jsx(Pt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(ls, { asChild: !0, container: o, children: i }) })) });
|
|
9492
9491
|
};
|
|
9493
|
-
Qu.displayName =
|
|
9492
|
+
Qu.displayName = aa;
|
|
9494
9493
|
var Do = "DialogOverlay", ed = p.forwardRef(
|
|
9495
9494
|
(e, t) => {
|
|
9496
9495
|
const n = Zu(Do, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Xt(Do, e.__scopeDialog);
|
|
@@ -9507,7 +9506,7 @@ var ub = lr("DialogOverlay.RemoveScroll"), db = p.forwardRef(
|
|
|
9507
9506
|
/* @__PURE__ */ c.jsx(us, { as: ub, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ c.jsx(
|
|
9508
9507
|
Te.div,
|
|
9509
9508
|
{
|
|
9510
|
-
"data-state":
|
|
9509
|
+
"data-state": ca(o.open),
|
|
9511
9510
|
...r,
|
|
9512
9511
|
ref: t,
|
|
9513
9512
|
style: { pointerEvents: "auto", ...r.style }
|
|
@@ -9527,7 +9526,7 @@ var fb = p.forwardRef(
|
|
|
9527
9526
|
const n = Xt(Un, e.__scopeDialog), r = p.useRef(null), o = Me(t, n.contentRef, r);
|
|
9528
9527
|
return p.useEffect(() => {
|
|
9529
9528
|
const s = r.current;
|
|
9530
|
-
if (s) return
|
|
9529
|
+
if (s) return ia(s);
|
|
9531
9530
|
}, []), /* @__PURE__ */ c.jsx(
|
|
9532
9531
|
nd,
|
|
9533
9532
|
{
|
|
@@ -9576,7 +9575,7 @@ var fb = p.forwardRef(
|
|
|
9576
9575
|
), nd = p.forwardRef(
|
|
9577
9576
|
(e, t) => {
|
|
9578
9577
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Xt(Un, n), l = p.useRef(null), u = Me(t, l);
|
|
9579
|
-
return
|
|
9578
|
+
return sa(), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
9580
9579
|
/* @__PURE__ */ c.jsx(
|
|
9581
9580
|
as,
|
|
9582
9581
|
{
|
|
@@ -9592,7 +9591,7 @@ var fb = p.forwardRef(
|
|
|
9592
9591
|
id: a.contentId,
|
|
9593
9592
|
"aria-describedby": a.descriptionId,
|
|
9594
9593
|
"aria-labelledby": a.titleId,
|
|
9595
|
-
"data-state":
|
|
9594
|
+
"data-state": ca(a.open),
|
|
9596
9595
|
...i,
|
|
9597
9596
|
ref: u,
|
|
9598
9597
|
onDismiss: () => a.onOpenChange(!1)
|
|
@@ -9606,13 +9605,13 @@ var fb = p.forwardRef(
|
|
|
9606
9605
|
] })
|
|
9607
9606
|
] });
|
|
9608
9607
|
}
|
|
9609
|
-
),
|
|
9608
|
+
), la = "DialogTitle", rd = p.forwardRef(
|
|
9610
9609
|
(e, t) => {
|
|
9611
|
-
const { __scopeDialog: n, ...r } = e, o = Xt(
|
|
9610
|
+
const { __scopeDialog: n, ...r } = e, o = Xt(la, n);
|
|
9612
9611
|
return /* @__PURE__ */ c.jsx(Te.h2, { id: o.titleId, ...r, ref: t });
|
|
9613
9612
|
}
|
|
9614
9613
|
);
|
|
9615
|
-
rd.displayName =
|
|
9614
|
+
rd.displayName = la;
|
|
9616
9615
|
var od = "DialogDescription", sd = p.forwardRef(
|
|
9617
9616
|
(e, t) => {
|
|
9618
9617
|
const { __scopeDialog: n, ...r } = e, o = Xt(od, n);
|
|
@@ -9635,12 +9634,12 @@ var id = "DialogClose", ad = p.forwardRef(
|
|
|
9635
9634
|
}
|
|
9636
9635
|
);
|
|
9637
9636
|
ad.displayName = id;
|
|
9638
|
-
function
|
|
9637
|
+
function ca(e) {
|
|
9639
9638
|
return e ? "open" : "closed";
|
|
9640
9639
|
}
|
|
9641
9640
|
var ld = "DialogTitleWarning", [bT, cd] = yv(ld, {
|
|
9642
9641
|
contentName: Un,
|
|
9643
|
-
titleName:
|
|
9642
|
+
titleName: la,
|
|
9644
9643
|
docsSlug: "dialog"
|
|
9645
9644
|
}), pb = ({ titleId: e }) => {
|
|
9646
9645
|
const t = cd(ld), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
@@ -9747,7 +9746,7 @@ const bb = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
9747
9746
|
));
|
|
9748
9747
|
bb.displayName = ps.displayName;
|
|
9749
9748
|
function yb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
9750
|
-
const [s, i] = xe(!1), [a, l] = xe(null), [u, d] = xe(null), { toast: f } =
|
|
9749
|
+
const [s, i] = xe(!1), [a, l] = xe(null), [u, d] = xe(null), { toast: f } = oa(), h = z.useCallback(async () => {
|
|
9751
9750
|
if (n) {
|
|
9752
9751
|
i(!0), d(null), l(null);
|
|
9753
9752
|
try {
|
|
@@ -9800,7 +9799,7 @@ function yb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
9800
9799
|
title: r
|
|
9801
9800
|
}
|
|
9802
9801
|
) }) : o.startsWith("text/") || o.includes("json") || o.includes("xml") ? /* @__PURE__ */ c.jsx("div", { className: "bg-gray-50 dark:bg-gray-900 rounded-lg p-4 max-h-[70vh] overflow-auto", children: /* @__PURE__ */ c.jsx("pre", { className: "whitespace-pre-wrap font-mono text-sm", children: a }) }) : /* @__PURE__ */ c.jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [
|
|
9803
|
-
/* @__PURE__ */ c.jsx(
|
|
9802
|
+
/* @__PURE__ */ c.jsx(Ma, { className: "h-16 w-16 text-gray-400 mb-4" }),
|
|
9804
9803
|
/* @__PURE__ */ c.jsx("p", { className: "text-lg font-medium mb-2", children: r }),
|
|
9805
9804
|
/* @__PURE__ */ c.jsxs("p", { className: "text-sm text-muted-foreground mb-4", children: [
|
|
9806
9805
|
o,
|
|
@@ -9809,7 +9808,7 @@ function yb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
9809
9808
|
" bytes"
|
|
9810
9809
|
] }),
|
|
9811
9810
|
/* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "This file type cannot be previewed. Use download or external view." })
|
|
9812
|
-
] }) : /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ c.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), g = () => o.startsWith("image/") ? /* @__PURE__ */ c.jsx(Ip, { className: "h-5 w-5" }) : /* @__PURE__ */ c.jsx(
|
|
9811
|
+
] }) : /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ c.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), g = () => o.startsWith("image/") ? /* @__PURE__ */ c.jsx(Ip, { className: "h-5 w-5" }) : /* @__PURE__ */ c.jsx(Ma, { className: "h-5 w-5" });
|
|
9813
9812
|
return /* @__PURE__ */ c.jsx(vb, { open: e, onOpenChange: t, children: /* @__PURE__ */ c.jsxs(pd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
|
|
9814
9813
|
/* @__PURE__ */ c.jsx(md, { children: /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
9815
9814
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -9910,7 +9909,7 @@ function Lr(e) {
|
|
|
9910
9909
|
}
|
|
9911
9910
|
return e;
|
|
9912
9911
|
}
|
|
9913
|
-
function
|
|
9912
|
+
function bi(e) {
|
|
9914
9913
|
if (typeof e == "string") return e;
|
|
9915
9914
|
if (xd(e)) return "";
|
|
9916
9915
|
try {
|
|
@@ -10080,7 +10079,7 @@ const jb = z.memo(function({
|
|
|
10080
10079
|
onCancelEdit: x,
|
|
10081
10080
|
onCopy: w
|
|
10082
10081
|
}) {
|
|
10083
|
-
const [y, R] = xe(!1), [S, C] = xe("collapsed"), [k, E] = xe(!1), { currentThreadId: N } =
|
|
10082
|
+
const [y, R] = xe(!1), [S, C] = xe("collapsed"), [k, E] = xe(!1), { currentThreadId: N } = Fi(), { toast: _ } = oa(), [I, $] = xe({}), [U, P] = xe(!1), [G, K] = xe(null), W = u === "phone" || u === "half-screen", D = t.role, M = D === "tool", se = !(r && D !== "user"), X = z.useMemo(() => {
|
|
10084
10083
|
switch (D) {
|
|
10085
10084
|
case "user":
|
|
10086
10085
|
return "text-[hsl(var(--chat-bubble-user-text))]";
|
|
@@ -10094,16 +10093,16 @@ const jb = z.memo(function({
|
|
|
10094
10093
|
return "text-[hsl(var(--chat-bubble-ai-text))]";
|
|
10095
10094
|
}
|
|
10096
10095
|
}, [D]), te = Wt(() => Tb(t.content), [t.content]), L = Wt(() => Rb(t.content), [t.content]), Z = Wt(
|
|
10097
|
-
() => t.content.filter((
|
|
10096
|
+
() => t.content.filter((ue) => ue.type === "image_url"),
|
|
10098
10097
|
[t.content]
|
|
10099
10098
|
), le = Wt(
|
|
10100
|
-
() => t.content.filter((
|
|
10099
|
+
() => t.content.filter((ue) => ue.type === "file"),
|
|
10101
10100
|
[t.content]
|
|
10102
10101
|
), de = Wt(() => Eb(t.content), [t.content]);
|
|
10103
10102
|
Wt(() => Ib(t.content), [t.content]);
|
|
10104
10103
|
const B = Wt(() => de.length <= Pn ? de : `${de.slice(0, Pn)}
|
|
10105
|
-
… [truncated ${de.length - Pn} chars]`, [de]), j = Ab(te, r, o), Y = z.useCallback(async (
|
|
10106
|
-
const me =
|
|
10104
|
+
… [truncated ${de.length - Pn} chars]`, [de]), j = Ab(te, r, o), Y = z.useCallback(async (ue = "all") => {
|
|
10105
|
+
const me = ue === "visible" && M ? B : M ? de : te;
|
|
10107
10106
|
async function O(V) {
|
|
10108
10107
|
try {
|
|
10109
10108
|
await navigator.clipboard.writeText(V);
|
|
@@ -10123,29 +10122,29 @@ const jb = z.memo(function({
|
|
|
10123
10122
|
}
|
|
10124
10123
|
}, [M, de, te, B, w]), Q = z.useCallback(() => {
|
|
10125
10124
|
if (!v) return;
|
|
10126
|
-
const
|
|
10127
|
-
v(t.id,
|
|
10128
|
-
}, [v, t.id, M, de, te]),
|
|
10125
|
+
const ue = M ? de : te;
|
|
10126
|
+
v(t.id, ue);
|
|
10127
|
+
}, [v, t.id, M, de, te]), ce = z.useCallback(() => {
|
|
10129
10128
|
g == null || g(n);
|
|
10130
|
-
}, [g, n]), ne = z.useCallback(async (
|
|
10129
|
+
}, [g, n]), ne = z.useCallback(async (ue, he, me) => {
|
|
10131
10130
|
if (!se) {
|
|
10132
|
-
|
|
10131
|
+
ue.preventDefault();
|
|
10133
10132
|
return;
|
|
10134
10133
|
}
|
|
10135
10134
|
if (I[me]) {
|
|
10136
|
-
|
|
10135
|
+
ue.preventDefault();
|
|
10137
10136
|
return;
|
|
10138
10137
|
}
|
|
10139
10138
|
try {
|
|
10140
10139
|
const O = String(he.url ?? ""), V = O.match(/\/chat\/files\/([^/]+)(?:\/(view|download))?/);
|
|
10141
10140
|
if (V) {
|
|
10142
|
-
|
|
10141
|
+
ue.preventDefault();
|
|
10143
10142
|
const be = V[1], $e = he.name || `file_${be}`, fe = he.mimeType || "application/octet-stream";
|
|
10144
10143
|
K({ id: be, name: $e, mimeType: fe }), P(!0);
|
|
10145
10144
|
return;
|
|
10146
10145
|
}
|
|
10147
10146
|
if (O.startsWith("data:")) {
|
|
10148
|
-
|
|
10147
|
+
ue.preventDefault(), $((fe) => ({ ...fe, [me]: !0 }));
|
|
10149
10148
|
const be = `${he.name}_${he.size}_${Date.now()}`, $e = _({ title: "Fetching file...", description: "", open: !0 });
|
|
10150
10149
|
try {
|
|
10151
10150
|
const fe = await tw(N ?? void 0);
|
|
@@ -10177,66 +10176,66 @@ const jb = z.memo(function({
|
|
|
10177
10176
|
console.error("File click error:", O), $((V) => ({ ...V, [me]: !1 }));
|
|
10178
10177
|
}
|
|
10179
10178
|
}, [se, I, _, N]), je = z.useCallback(() => {
|
|
10180
|
-
const he = J(
|
|
10179
|
+
const he = J(W ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", X);
|
|
10181
10180
|
switch (D) {
|
|
10182
10181
|
case "user":
|
|
10183
10182
|
return /* @__PURE__ */ c.jsx(Ap, { className: he });
|
|
10184
10183
|
case "assistant":
|
|
10185
|
-
return /* @__PURE__ */ c.jsx(
|
|
10184
|
+
return /* @__PURE__ */ c.jsx(Da, { className: he });
|
|
10186
10185
|
case "tool":
|
|
10187
10186
|
return /* @__PURE__ */ c.jsx(Np, { className: he });
|
|
10188
10187
|
default:
|
|
10189
|
-
return /* @__PURE__ */ c.jsx(
|
|
10188
|
+
return /* @__PURE__ */ c.jsx(Da, { className: he });
|
|
10190
10189
|
}
|
|
10191
|
-
}, [
|
|
10192
|
-
const
|
|
10190
|
+
}, [W, X, D]), Ae = z.useCallback(() => {
|
|
10191
|
+
const ue = "group relative mb-4 flex w-full";
|
|
10193
10192
|
switch (D) {
|
|
10194
10193
|
case "user":
|
|
10195
|
-
return J(
|
|
10194
|
+
return J(ue, "justify-end");
|
|
10196
10195
|
case "assistant":
|
|
10197
10196
|
case "tool":
|
|
10198
10197
|
case "system":
|
|
10199
|
-
return J(
|
|
10198
|
+
return J(ue, "justify-start");
|
|
10200
10199
|
default:
|
|
10201
|
-
return
|
|
10200
|
+
return ue;
|
|
10202
10201
|
}
|
|
10203
10202
|
}, [D]), Re = z.useCallback(() => {
|
|
10204
|
-
const
|
|
10203
|
+
const ue = J(
|
|
10205
10204
|
"rounded-lg px-4 py-3 relative min-w-0 max-w-full break-words",
|
|
10206
|
-
|
|
10205
|
+
W && "px-3 py-2 text-sm"
|
|
10207
10206
|
);
|
|
10208
10207
|
switch (D) {
|
|
10209
10208
|
case "user":
|
|
10210
10209
|
return J(
|
|
10211
|
-
|
|
10210
|
+
ue,
|
|
10212
10211
|
"w-full md:max-w-[95%]",
|
|
10213
10212
|
"bg-[hsl(var(--chat-bubble-user))] text-[hsl(var(--chat-bubble-user-text))]",
|
|
10214
10213
|
"border border-transparent"
|
|
10215
10214
|
);
|
|
10216
10215
|
case "assistant":
|
|
10217
10216
|
return J(
|
|
10218
|
-
|
|
10217
|
+
ue,
|
|
10219
10218
|
"w-full md:max-w-[95%]",
|
|
10220
10219
|
"bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
|
|
10221
10220
|
"border border-border/60 dark:border-border/40"
|
|
10222
10221
|
);
|
|
10223
10222
|
case "tool":
|
|
10224
|
-
return J(
|
|
10223
|
+
return J(ue, "w-full md:max-w-[95%] bg-secondary/50 text-secondary-foreground border border-dashed");
|
|
10225
10224
|
case "system":
|
|
10226
|
-
return J(
|
|
10225
|
+
return J(ue, "w-full md:max-w-[85%] bg-accent/40 text-muted-foreground border");
|
|
10227
10226
|
default:
|
|
10228
10227
|
return J(
|
|
10229
|
-
|
|
10228
|
+
ue,
|
|
10230
10229
|
"w-full md:max-w-[95%]",
|
|
10231
10230
|
"bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
|
|
10232
10231
|
"border border-border/60 dark:border-border/40"
|
|
10233
10232
|
);
|
|
10234
10233
|
}
|
|
10235
|
-
}, [
|
|
10236
|
-
if (
|
|
10237
|
-
return /* @__PURE__ */ c.jsx(Bs, { content:
|
|
10238
|
-
if (
|
|
10239
|
-
const me =
|
|
10234
|
+
}, [W, D]), _e = z.useCallback(({ part: ue, i: he }) => {
|
|
10235
|
+
if (ue.type === "text")
|
|
10236
|
+
return /* @__PURE__ */ c.jsx(Bs, { content: ue.text, allowHtml: !1 }, he);
|
|
10237
|
+
if (ue.type === "image_url") {
|
|
10238
|
+
const me = ue;
|
|
10240
10239
|
return /* @__PURE__ */ c.jsx("div", { className: "my-2", children: /* @__PURE__ */ c.jsx(
|
|
10241
10240
|
"img",
|
|
10242
10241
|
{
|
|
@@ -10247,8 +10246,8 @@ const jb = z.memo(function({
|
|
|
10247
10246
|
}
|
|
10248
10247
|
) }, he);
|
|
10249
10248
|
}
|
|
10250
|
-
if (
|
|
10251
|
-
const me =
|
|
10249
|
+
if (ue.type === "file") {
|
|
10250
|
+
const me = ue, O = me.name || "file";
|
|
10252
10251
|
return /* @__PURE__ */ c.jsxs(
|
|
10253
10252
|
"a",
|
|
10254
10253
|
{
|
|
@@ -10285,19 +10284,19 @@ const jb = z.memo(function({
|
|
|
10285
10284
|
{
|
|
10286
10285
|
className: J(
|
|
10287
10286
|
"whitespace-pre-wrap break-words font-sans leading-relaxed transition-opacity duration-200",
|
|
10288
|
-
|
|
10287
|
+
W && "text-xs"
|
|
10289
10288
|
),
|
|
10290
10289
|
children: me
|
|
10291
10290
|
}
|
|
10292
10291
|
) });
|
|
10293
|
-
}, [D, j,
|
|
10294
|
-
const
|
|
10292
|
+
}, [D, j, W]), Ve = z.useCallback(() => {
|
|
10293
|
+
const ue = te.trim(), me = Xl(D, ue) ? Js(ue) : null;
|
|
10295
10294
|
if (me !== null) return /* @__PURE__ */ c.jsx(Zl, { data: me });
|
|
10296
10295
|
if (D === "user" && h) {
|
|
10297
|
-
const O =
|
|
10296
|
+
const O = ue;
|
|
10298
10297
|
if (O.length > m)
|
|
10299
10298
|
return /* @__PURE__ */ c.jsxs(Il, { open: k, onOpenChange: E, children: [
|
|
10300
|
-
/* @__PURE__ */ c.jsx("div", { className: J("text-sm text-[hsl(var(--chat-bubble-user-text))]",
|
|
10299
|
+
/* @__PURE__ */ c.jsx("div", { className: J("text-sm text-[hsl(var(--chat-bubble-user-text))]", W && "text-xs"), children: k ? /* @__PURE__ */ c.jsx(Bs, { content: O, allowHtml: !1 }) : /* @__PURE__ */ c.jsxs("pre", { className: J("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", W && "text-xs"), children: [
|
|
10301
10300
|
O.substring(0, m),
|
|
10302
10301
|
"..."
|
|
10303
10302
|
] }) }),
|
|
@@ -10321,7 +10320,7 @@ const jb = z.memo(function({
|
|
|
10321
10320
|
] });
|
|
10322
10321
|
}
|
|
10323
10322
|
return /* @__PURE__ */ c.jsx(Bs, { content: te.trim(), allowHtml: !1 });
|
|
10324
|
-
}, [te, D, h, m, k,
|
|
10323
|
+
}, [te, D, h, m, k, W]), ut = z.useCallback(() => {
|
|
10325
10324
|
if (!(te.trim().length > 0 || Z.length > 0 || le.length > 0) && !r)
|
|
10326
10325
|
return ze();
|
|
10327
10326
|
if (t.model === "reflection") {
|
|
@@ -10337,10 +10336,10 @@ const jb = z.memo(function({
|
|
|
10337
10336
|
const he = kb(t.content);
|
|
10338
10337
|
if (he.length > 0)
|
|
10339
10338
|
return /* @__PURE__ */ c.jsx("div", { className: "space-y-2", children: he.map((me, O) => {
|
|
10340
|
-
const V = typeof me.output == "string" ? me.output :
|
|
10339
|
+
const V = typeof me.output == "string" ? me.output : bi(me.output), be = V.length > Pn ? `${V.slice(0, Pn)}
|
|
10341
10340
|
… [truncated ${V.length - Pn} chars]` : V, $e = S === "expanded";
|
|
10342
10341
|
return /* @__PURE__ */ c.jsxs(Il, { open: $e, onOpenChange: (fe) => C(fe ? "expanded" : "preview"), children: [
|
|
10343
|
-
/* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-2 text-xs", children: /* @__PURE__ */ c.jsx(
|
|
10342
|
+
/* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-2 text-xs", children: /* @__PURE__ */ c.jsx(xi, { variant: "outline", children: (me.name ?? "tool") + (me.toolCallId ? ` • ${me.toolCallId.slice(0, 8)}` : "") }) }),
|
|
10344
10343
|
/* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm mt-1", children: /* @__PURE__ */ c.jsx("pre", { className: "whitespace-pre-wrap break-words", children: $e ? be : be.slice(0, f) + (be.length > f ? "..." : "") }) }),
|
|
10345
10344
|
/* @__PURE__ */ c.jsx(Nl, { asChild: !0, children: /* @__PURE__ */ c.jsx(He, { variant: "ghost", size: "sm", className: "h-6 text-xs", children: $e ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
10346
10345
|
" ",
|
|
@@ -10381,31 +10380,31 @@ const jb = z.memo(function({
|
|
|
10381
10380
|
{
|
|
10382
10381
|
className: J(
|
|
10383
10382
|
"flex items-center justify-between mb-2 pb-2 border-b border-current/10",
|
|
10384
|
-
|
|
10383
|
+
W && "mb-1 pb-1",
|
|
10385
10384
|
X,
|
|
10386
10385
|
b.header
|
|
10387
10386
|
),
|
|
10388
10387
|
children: [
|
|
10389
10388
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10390
10389
|
je(),
|
|
10391
|
-
l && ft && /* @__PURE__ */ c.jsx("span", { className: J("font-medium",
|
|
10390
|
+
l && ft && /* @__PURE__ */ c.jsx("span", { className: J("font-medium", W ? "text-xs" : "text-sm"), children: ft }),
|
|
10392
10391
|
M && L.name && /* @__PURE__ */ c.jsxs(
|
|
10393
|
-
|
|
10392
|
+
xi,
|
|
10394
10393
|
{
|
|
10395
10394
|
variant: "outline",
|
|
10396
10395
|
className: J(
|
|
10397
10396
|
"text-xs flex items-center gap-1 cursor-pointer",
|
|
10398
10397
|
X,
|
|
10399
10398
|
"border border-current/40",
|
|
10400
|
-
|
|
10399
|
+
W && "text-xs h-4"
|
|
10401
10400
|
),
|
|
10402
10401
|
role: "button",
|
|
10403
10402
|
tabIndex: 0,
|
|
10404
10403
|
"aria-expanded": S !== "collapsed",
|
|
10405
|
-
onKeyDown: (
|
|
10406
|
-
(
|
|
10404
|
+
onKeyDown: (ue) => {
|
|
10405
|
+
(ue.key === "Enter" || ue.key === " ") && (ue.preventDefault(), C((he) => he === "collapsed" ? "preview" : "collapsed"));
|
|
10407
10406
|
},
|
|
10408
|
-
onClick: () => C((
|
|
10407
|
+
onClick: () => C((ue) => ue === "collapsed" ? "preview" : "collapsed"),
|
|
10409
10408
|
children: [
|
|
10410
10409
|
/* @__PURE__ */ c.jsx("span", { children: L.name }),
|
|
10411
10410
|
/* @__PURE__ */ c.jsx("span", { className: "inline-flex items-center", children: S !== "collapsed" ? /* @__PURE__ */ c.jsx(kr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(nr, { className: "h-3 w-3" }) })
|
|
@@ -10418,7 +10417,7 @@ const jb = z.memo(function({
|
|
|
10418
10417
|
variant: "ghost",
|
|
10419
10418
|
size: "sm",
|
|
10420
10419
|
className: J("h-6 px-1", X, "hover:bg-foreground/10"),
|
|
10421
|
-
onClick: () => C((
|
|
10420
|
+
onClick: () => C((ue) => ue === "collapsed" ? "preview" : "collapsed"),
|
|
10422
10421
|
children: /* @__PURE__ */ c.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
|
|
10423
10422
|
"Tool Output ",
|
|
10424
10423
|
S !== "collapsed" ? /* @__PURE__ */ c.jsx(kr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(nr, { className: "h-3 w-3" })
|
|
@@ -10430,7 +10429,7 @@ const jb = z.memo(function({
|
|
|
10430
10429
|
a && t.createdAt && /* @__PURE__ */ c.jsx(
|
|
10431
10430
|
"time",
|
|
10432
10431
|
{
|
|
10433
|
-
className: J("text-xs opacity-60", X,
|
|
10432
|
+
className: J("text-xs opacity-60", X, W && "text-xs"),
|
|
10434
10433
|
dateTime: new Date(t.createdAt).toISOString(),
|
|
10435
10434
|
title: new Date(t.createdAt).toLocaleString(),
|
|
10436
10435
|
children: new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit" }).format(new Date(t.createdAt))
|
|
@@ -10452,10 +10451,10 @@ const jb = z.memo(function({
|
|
|
10452
10451
|
variant: "ghost",
|
|
10453
10452
|
size: "sm",
|
|
10454
10453
|
onClick: () => Y(M ? "visible" : "all"),
|
|
10455
|
-
className: J("h-6 w-6 p-0 hover:bg-foreground/10", X,
|
|
10454
|
+
className: J("h-6 w-6 p-0 hover:bg-foreground/10", X, W && "h-5 w-5"),
|
|
10456
10455
|
"aria-label": M ? "Copy visible" : "Copy message",
|
|
10457
10456
|
title: M ? "Copy visible portion" : "Copy message",
|
|
10458
|
-
children: /* @__PURE__ */ c.jsx(
|
|
10457
|
+
children: /* @__PURE__ */ c.jsx(La, { className: J(y ? "text-success" : X, W ? "h-3 w-3" : "h-4 w-4") })
|
|
10459
10458
|
}
|
|
10460
10459
|
),
|
|
10461
10460
|
M && /* @__PURE__ */ c.jsx(
|
|
@@ -10477,9 +10476,9 @@ const jb = z.memo(function({
|
|
|
10477
10476
|
variant: "ghost",
|
|
10478
10477
|
size: "sm",
|
|
10479
10478
|
onClick: Q,
|
|
10480
|
-
className: J("h-6 w-6 p-0 hover:bg-foreground/10", X,
|
|
10479
|
+
className: J("h-6 w-6 p-0 hover:bg-foreground/10", X, W && "h-5 w-5"),
|
|
10481
10480
|
"aria-label": "Edit message",
|
|
10482
|
-
children: /* @__PURE__ */ c.jsx(
|
|
10481
|
+
children: /* @__PURE__ */ c.jsx($a, { className: J(X, W ? "h-3 w-3" : "h-4 w-4") })
|
|
10483
10482
|
}
|
|
10484
10483
|
),
|
|
10485
10484
|
D === "assistant" && g && /* @__PURE__ */ c.jsx(
|
|
@@ -10487,10 +10486,10 @@ const jb = z.memo(function({
|
|
|
10487
10486
|
{
|
|
10488
10487
|
variant: "ghost",
|
|
10489
10488
|
size: "sm",
|
|
10490
|
-
onClick:
|
|
10491
|
-
className: J("h-6 w-6 p-0 hover:bg-foreground/10", X,
|
|
10489
|
+
onClick: ce,
|
|
10490
|
+
className: J("h-6 w-6 p-0 hover:bg-foreground/10", X, W && "h-5 w-5"),
|
|
10492
10491
|
"aria-label": "Regenerate response",
|
|
10493
|
-
children: /* @__PURE__ */ c.jsx(ri, { className: J(X,
|
|
10492
|
+
children: /* @__PURE__ */ c.jsx(ri, { className: J(X, W ? "h-3 w-3" : "h-4 w-4") })
|
|
10494
10493
|
}
|
|
10495
10494
|
)
|
|
10496
10495
|
]
|
|
@@ -10501,7 +10500,7 @@ const jb = z.memo(function({
|
|
|
10501
10500
|
}
|
|
10502
10501
|
),
|
|
10503
10502
|
/* @__PURE__ */ c.jsx("div", { className: "relative", children: ut() }),
|
|
10504
|
-
M && S === "expanded" && (L.toolCallId || L.name) && /* @__PURE__ */ c.jsxs("div", { className: J("mt-2 pt-2 border-t border-current/10 text-xs opacity-60",
|
|
10503
|
+
M && S === "expanded" && (L.toolCallId || L.name) && /* @__PURE__ */ c.jsxs("div", { className: J("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", W && "text-xs"), children: [
|
|
10505
10504
|
L.name && /* @__PURE__ */ c.jsxs("div", { children: [
|
|
10506
10505
|
"Function: ",
|
|
10507
10506
|
L.name
|
|
@@ -10526,8 +10525,8 @@ const jb = z.memo(function({
|
|
|
10526
10525
|
variant: "ghost",
|
|
10527
10526
|
size: "sm",
|
|
10528
10527
|
onClick: () => Y(),
|
|
10529
|
-
className: J("h-6 w-6 p-0 hover:bg-background/50 text-current",
|
|
10530
|
-
children: /* @__PURE__ */ c.jsx(
|
|
10528
|
+
className: J("h-6 w-6 p-0 hover:bg-background/50 text-current", W && "h-5 w-5"),
|
|
10529
|
+
children: /* @__PURE__ */ c.jsx(La, { className: J(y ? "text-success" : "text-current", W ? "h-3 w-3" : "h-4 w-4") })
|
|
10531
10530
|
}
|
|
10532
10531
|
),
|
|
10533
10532
|
D === "user" && v && /* @__PURE__ */ c.jsx(
|
|
@@ -10536,8 +10535,8 @@ const jb = z.memo(function({
|
|
|
10536
10535
|
variant: "ghost",
|
|
10537
10536
|
size: "sm",
|
|
10538
10537
|
onClick: Q,
|
|
10539
|
-
className: J("h-6 w-6 p-0 hover:bg-background/50 text-current",
|
|
10540
|
-
children: /* @__PURE__ */ c.jsx(
|
|
10538
|
+
className: J("h-6 w-6 p-0 hover:bg-background/50 text-current", W && "h-5 w-5"),
|
|
10539
|
+
children: /* @__PURE__ */ c.jsx($a, { className: J("text-current", W ? "h-3 w-3" : "h-4 w-4") })
|
|
10541
10540
|
}
|
|
10542
10541
|
),
|
|
10543
10542
|
D === "assistant" && g && /* @__PURE__ */ c.jsx(
|
|
@@ -10545,9 +10544,9 @@ const jb = z.memo(function({
|
|
|
10545
10544
|
{
|
|
10546
10545
|
variant: "ghost",
|
|
10547
10546
|
size: "sm",
|
|
10548
|
-
onClick:
|
|
10549
|
-
className: J("h-6 w-6 p-0 hover:bg-background/50 text-current",
|
|
10550
|
-
children: /* @__PURE__ */ c.jsx(ri, { className: J("text-current",
|
|
10547
|
+
onClick: ce,
|
|
10548
|
+
className: J("h-6 w-6 p-0 hover:bg-background/50 text-current", W && "h-5 w-5"),
|
|
10549
|
+
children: /* @__PURE__ */ c.jsx(ri, { className: J("text-current", W ? "h-3 w-3" : "h-4 w-4") })
|
|
10551
10550
|
}
|
|
10552
10551
|
)
|
|
10553
10552
|
]
|
|
@@ -10557,7 +10556,7 @@ const jb = z.memo(function({
|
|
|
10557
10556
|
G && /* @__PURE__ */ c.jsx(
|
|
10558
10557
|
yb,
|
|
10559
10558
|
{
|
|
10560
|
-
isOpen:
|
|
10559
|
+
isOpen: U,
|
|
10561
10560
|
onClose: () => {
|
|
10562
10561
|
P(!1), K(null);
|
|
10563
10562
|
},
|
|
@@ -10585,7 +10584,7 @@ const jb = z.memo(function({
|
|
|
10585
10584
|
});
|
|
10586
10585
|
function Zl({ data: e }) {
|
|
10587
10586
|
if (Array.isArray(e))
|
|
10588
|
-
return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ c.jsx("div", { className: yo, children: /* @__PURE__ */ c.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ c.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ c.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children:
|
|
10587
|
+
return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ c.jsx("div", { className: yo, children: /* @__PURE__ */ c.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ c.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ c.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: bi(e) });
|
|
10589
10588
|
if (e && typeof e == "object") {
|
|
10590
10589
|
const t = Array.isArray(e.distilled_facts) ? e.distilled_facts : null, n = Array.isArray(e.follow_up_queries) ? e.follow_up_queries : null, r = typeof e.is_sufficient == "boolean" ? e.is_sufficient : void 0;
|
|
10591
10590
|
if (t || n || typeof r == "boolean")
|
|
@@ -10613,7 +10612,7 @@ function Zl({ data: e }) {
|
|
|
10613
10612
|
/* @__PURE__ */ c.jsx("dd", { className: "inline", children: Pb(i) })
|
|
10614
10613
|
] }, s)) }) });
|
|
10615
10614
|
}
|
|
10616
|
-
return /* @__PURE__ */ c.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children:
|
|
10615
|
+
return /* @__PURE__ */ c.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: bi(e) });
|
|
10617
10616
|
}
|
|
10618
10617
|
function Pb(e) {
|
|
10619
10618
|
if (e == null) return String(e);
|
|
@@ -10727,12 +10726,12 @@ const Ql = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, wd = z.forwa
|
|
|
10727
10726
|
style: { height: "100%", overscrollBehavior: "contain" },
|
|
10728
10727
|
computeItemKey: (I, $) => Ql($, I),
|
|
10729
10728
|
itemContent: (I, $) => {
|
|
10730
|
-
const
|
|
10729
|
+
const U = Ql($, I);
|
|
10731
10730
|
return /* @__PURE__ */ c.jsx(
|
|
10732
10731
|
"div",
|
|
10733
10732
|
{
|
|
10734
10733
|
className: "mb-4 last:mb-0",
|
|
10735
|
-
"data-message-id":
|
|
10734
|
+
"data-message-id": U,
|
|
10736
10735
|
style: {
|
|
10737
10736
|
minHeight: "60px",
|
|
10738
10737
|
containIntrinsicSize: "auto 120px"
|
|
@@ -10802,7 +10801,7 @@ function $b(e) {
|
|
|
10802
10801
|
let t;
|
|
10803
10802
|
return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), Lb(t), Db(t);
|
|
10804
10803
|
}
|
|
10805
|
-
function
|
|
10804
|
+
function ua(e) {
|
|
10806
10805
|
const t = e + "CollectionProvider", [n, r] = un(t), [o, s] = n(
|
|
10807
10806
|
t,
|
|
10808
10807
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -10859,7 +10858,7 @@ const zb = ["top", "right", "bottom", "left"], Cn = Math.min, Nt = Math.max, Lo
|
|
|
10859
10858
|
start: "end",
|
|
10860
10859
|
end: "start"
|
|
10861
10860
|
};
|
|
10862
|
-
function
|
|
10861
|
+
function yi(e, t, n) {
|
|
10863
10862
|
return Nt(e, Cn(t, n));
|
|
10864
10863
|
}
|
|
10865
10864
|
function mn(e, t) {
|
|
@@ -10871,30 +10870,30 @@ function gn(e) {
|
|
|
10871
10870
|
function gr(e) {
|
|
10872
10871
|
return e.split("-")[1];
|
|
10873
10872
|
}
|
|
10874
|
-
function
|
|
10873
|
+
function da(e) {
|
|
10875
10874
|
return e === "x" ? "y" : "x";
|
|
10876
10875
|
}
|
|
10877
|
-
function
|
|
10876
|
+
function fa(e) {
|
|
10878
10877
|
return e === "y" ? "height" : "width";
|
|
10879
10878
|
}
|
|
10880
10879
|
const Ub = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
10881
10880
|
function on(e) {
|
|
10882
10881
|
return Ub.has(gn(e)) ? "y" : "x";
|
|
10883
10882
|
}
|
|
10884
|
-
function
|
|
10885
|
-
return
|
|
10883
|
+
function ha(e) {
|
|
10884
|
+
return da(on(e));
|
|
10886
10885
|
}
|
|
10887
10886
|
function Wb(e, t, n) {
|
|
10888
10887
|
n === void 0 && (n = !1);
|
|
10889
|
-
const r = gr(e), o =
|
|
10888
|
+
const r = gr(e), o = ha(e), s = fa(o);
|
|
10890
10889
|
let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
10891
10890
|
return t.reference[s] > t.floating[s] && (i = $o(i)), [i, $o(i)];
|
|
10892
10891
|
}
|
|
10893
10892
|
function Vb(e) {
|
|
10894
10893
|
const t = $o(e);
|
|
10895
|
-
return [
|
|
10894
|
+
return [Si(e), t, Si(t)];
|
|
10896
10895
|
}
|
|
10897
|
-
function
|
|
10896
|
+
function Si(e) {
|
|
10898
10897
|
return e.replace(/start|end/g, (t) => Hb[t]);
|
|
10899
10898
|
}
|
|
10900
10899
|
const ec = ["left", "right"], tc = ["right", "left"], Kb = ["top", "bottom"], qb = ["bottom", "top"];
|
|
@@ -10913,7 +10912,7 @@ function Gb(e, t, n) {
|
|
|
10913
10912
|
function Yb(e, t, n, r) {
|
|
10914
10913
|
const o = gr(e);
|
|
10915
10914
|
let s = Gb(gn(e), n === "start", r);
|
|
10916
|
-
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(
|
|
10915
|
+
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Si)))), s;
|
|
10917
10916
|
}
|
|
10918
10917
|
function $o(e) {
|
|
10919
10918
|
return e.replace(/left|right|bottom|top/g, (t) => Bb[t]);
|
|
@@ -10958,7 +10957,7 @@ function nc(e, t, n) {
|
|
|
10958
10957
|
reference: r,
|
|
10959
10958
|
floating: o
|
|
10960
10959
|
} = e;
|
|
10961
|
-
const s = on(t), i =
|
|
10960
|
+
const s = on(t), i = ha(t), a = fa(i), l = gn(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, h = r[a] / 2 - o[a] / 2;
|
|
10962
10961
|
let m;
|
|
10963
10962
|
switch (l) {
|
|
10964
10963
|
case "top":
|
|
@@ -11128,17 +11127,17 @@ const Zb = (e) => ({
|
|
|
11128
11127
|
const f = bd(d), h = {
|
|
11129
11128
|
x: n,
|
|
11130
11129
|
y: r
|
|
11131
|
-
}, m =
|
|
11130
|
+
}, m = ha(o), b = fa(m), v = await i.getDimensions(u), g = m === "y", x = g ? "top" : "left", w = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", R = s.reference[b] + s.reference[m] - h[m] - s.floating[b], S = h[m] - s.reference[m], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
11132
11131
|
let k = C ? C[y] : 0;
|
|
11133
11132
|
(!k || !await (i.isElement == null ? void 0 : i.isElement(C))) && (k = a.floating[y] || s.floating[b]);
|
|
11134
|
-
const E = R / 2 - S / 2, N = k / 2 - v[b] / 2 - 1, _ = Cn(f[x], N), I = Cn(f[w], N), $ = _,
|
|
11133
|
+
const E = R / 2 - S / 2, N = k / 2 - v[b] / 2 - 1, _ = Cn(f[x], N), I = Cn(f[w], N), $ = _, U = k - v[b] - I, P = k / 2 - v[b] / 2 + E, G = yi($, P, U), K = !l.arrow && gr(o) != null && P !== G && s.reference[b] / 2 - (P < $ ? _ : I) - v[b] / 2 < 0, W = K ? P < $ ? P - $ : P - U : 0;
|
|
11135
11134
|
return {
|
|
11136
|
-
[m]: h[m] +
|
|
11135
|
+
[m]: h[m] + W,
|
|
11137
11136
|
data: {
|
|
11138
11137
|
[m]: G,
|
|
11139
|
-
centerOffset: P - G -
|
|
11138
|
+
centerOffset: P - G - W,
|
|
11140
11139
|
...K && {
|
|
11141
|
-
alignmentOffset:
|
|
11140
|
+
alignmentOffset: W
|
|
11142
11141
|
}
|
|
11143
11142
|
},
|
|
11144
11143
|
reset: K
|
|
@@ -11194,12 +11193,12 @@ const Zb = (e) => ({
|
|
|
11194
11193
|
placement: G
|
|
11195
11194
|
}
|
|
11196
11195
|
};
|
|
11197
|
-
let K = ($ = _.filter((
|
|
11196
|
+
let K = ($ = _.filter((W) => W.overflows[0] <= 0).sort((W, D) => W.overflows[1] - D.overflows[1])[0]) == null ? void 0 : $.placement;
|
|
11198
11197
|
if (!K)
|
|
11199
11198
|
switch (m) {
|
|
11200
11199
|
case "bestFit": {
|
|
11201
|
-
var
|
|
11202
|
-
const
|
|
11200
|
+
var U;
|
|
11201
|
+
const W = (U = _.filter((D) => {
|
|
11203
11202
|
if (C) {
|
|
11204
11203
|
const M = on(D.placement);
|
|
11205
11204
|
return M === w || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -11207,8 +11206,8 @@ const Zb = (e) => ({
|
|
|
11207
11206
|
M === "y";
|
|
11208
11207
|
}
|
|
11209
11208
|
return !0;
|
|
11210
|
-
}).map((D) => [D.placement, D.overflows.filter((M) => M > 0).reduce((M, se) => M + se, 0)]).sort((D, M) => D[1] - M[1])[0]) == null ? void 0 :
|
|
11211
|
-
|
|
11209
|
+
}).map((D) => [D.placement, D.overflows.filter((M) => M > 0).reduce((M, se) => M + se, 0)]).sort((D, M) => D[1] - M[1])[0]) == null ? void 0 : U[0];
|
|
11210
|
+
W && (K = W);
|
|
11212
11211
|
break;
|
|
11213
11212
|
}
|
|
11214
11213
|
case "initialPlacement":
|
|
@@ -11356,15 +11355,15 @@ const ny = function(e) {
|
|
|
11356
11355
|
} = mn(e, t), u = {
|
|
11357
11356
|
x: n,
|
|
11358
11357
|
y: r
|
|
11359
|
-
}, d = await $r(t, l), f = on(gn(o)), h =
|
|
11358
|
+
}, d = await $r(t, l), f = on(gn(o)), h = da(f);
|
|
11360
11359
|
let m = u[h], b = u[f];
|
|
11361
11360
|
if (s) {
|
|
11362
11361
|
const g = h === "y" ? "top" : "left", x = h === "y" ? "bottom" : "right", w = m + d[g], y = m - d[x];
|
|
11363
|
-
m =
|
|
11362
|
+
m = yi(w, m, y);
|
|
11364
11363
|
}
|
|
11365
11364
|
if (i) {
|
|
11366
11365
|
const g = f === "y" ? "top" : "left", x = f === "y" ? "bottom" : "right", w = b + d[g], y = b - d[x];
|
|
11367
|
-
b =
|
|
11366
|
+
b = yi(w, b, y);
|
|
11368
11367
|
}
|
|
11369
11368
|
const v = a.fn({
|
|
11370
11369
|
...t,
|
|
@@ -11401,7 +11400,7 @@ const ny = function(e) {
|
|
|
11401
11400
|
} = mn(e, t), d = {
|
|
11402
11401
|
x: n,
|
|
11403
11402
|
y: r
|
|
11404
|
-
}, f = on(o), h =
|
|
11403
|
+
}, f = on(o), h = da(f);
|
|
11405
11404
|
let m = d[h], b = d[f];
|
|
11406
11405
|
const v = mn(a, t), g = typeof v == "number" ? {
|
|
11407
11406
|
mainAxis: v,
|
|
@@ -11450,8 +11449,8 @@ const ny = function(e) {
|
|
|
11450
11449
|
const w = v - d.top - d.bottom, y = b - d.left - d.right, R = Cn(v - d[g], w), S = Cn(b - d[x], y), C = !t.middlewareData.shift;
|
|
11451
11450
|
let k = R, E = S;
|
|
11452
11451
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = y), (r = t.middlewareData.shift) != null && r.enabled.y && (k = w), C && !h) {
|
|
11453
|
-
const _ = Nt(d.left, 0), I = Nt(d.right, 0), $ = Nt(d.top, 0),
|
|
11454
|
-
m ? E = b - 2 * (_ !== 0 || I !== 0 ? _ + I : Nt(d.left, d.right)) : k = v - 2 * ($ !== 0 ||
|
|
11452
|
+
const _ = Nt(d.left, 0), I = Nt(d.right, 0), $ = Nt(d.top, 0), U = Nt(d.bottom, 0);
|
|
11453
|
+
m ? E = b - 2 * (_ !== 0 || I !== 0 ? _ + I : Nt(d.left, d.right)) : k = v - 2 * ($ !== 0 || U !== 0 ? $ + U : Nt(d.top, d.bottom));
|
|
11455
11454
|
}
|
|
11456
11455
|
await l({
|
|
11457
11456
|
...t,
|
|
@@ -11518,14 +11517,14 @@ function xs(e) {
|
|
|
11518
11517
|
});
|
|
11519
11518
|
}
|
|
11520
11519
|
const uy = ["transform", "translate", "scale", "rotate", "perspective"], dy = ["transform", "translate", "scale", "rotate", "perspective", "filter"], fy = ["paint", "layout", "strict", "content"];
|
|
11521
|
-
function
|
|
11522
|
-
const t =
|
|
11520
|
+
function pa(e) {
|
|
11521
|
+
const t = ma(), n = qt(e) ? Gt(e) : e;
|
|
11523
11522
|
return uy.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || dy.some((r) => (n.willChange || "").includes(r)) || fy.some((r) => (n.contain || "").includes(r));
|
|
11524
11523
|
}
|
|
11525
11524
|
function hy(e) {
|
|
11526
11525
|
let t = Tn(e);
|
|
11527
11526
|
for (; ln(t) && !ur(t); ) {
|
|
11528
|
-
if (
|
|
11527
|
+
if (pa(t))
|
|
11529
11528
|
return t;
|
|
11530
11529
|
if (xs(t))
|
|
11531
11530
|
return null;
|
|
@@ -11533,7 +11532,7 @@ function hy(e) {
|
|
|
11533
11532
|
}
|
|
11534
11533
|
return null;
|
|
11535
11534
|
}
|
|
11536
|
-
function
|
|
11535
|
+
function ma() {
|
|
11537
11536
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
11538
11537
|
}
|
|
11539
11538
|
const py = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
@@ -11573,12 +11572,12 @@ function Fr(e, t, n) {
|
|
|
11573
11572
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
11574
11573
|
const o = Cd(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = jt(o);
|
|
11575
11574
|
if (s) {
|
|
11576
|
-
const a =
|
|
11575
|
+
const a = Ci(i);
|
|
11577
11576
|
return t.concat(i, i.visualViewport || [], Yr(o) ? o : [], a && n ? Fr(a) : []);
|
|
11578
11577
|
}
|
|
11579
11578
|
return t.concat(o, Fr(o, [], n));
|
|
11580
11579
|
}
|
|
11581
|
-
function
|
|
11580
|
+
function Ci(e) {
|
|
11582
11581
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
11583
11582
|
}
|
|
11584
11583
|
function Td(e) {
|
|
@@ -11591,11 +11590,11 @@ function Td(e) {
|
|
|
11591
11590
|
$: a
|
|
11592
11591
|
};
|
|
11593
11592
|
}
|
|
11594
|
-
function
|
|
11593
|
+
function ga(e) {
|
|
11595
11594
|
return qt(e) ? e : e.contextElement;
|
|
11596
11595
|
}
|
|
11597
11596
|
function ir(e) {
|
|
11598
|
-
const t =
|
|
11597
|
+
const t = ga(e);
|
|
11599
11598
|
if (!ln(t))
|
|
11600
11599
|
return an(1);
|
|
11601
11600
|
const n = t.getBoundingClientRect(), {
|
|
@@ -11612,7 +11611,7 @@ function ir(e) {
|
|
|
11612
11611
|
const my = /* @__PURE__ */ an(0);
|
|
11613
11612
|
function Rd(e) {
|
|
11614
11613
|
const t = jt(e);
|
|
11615
|
-
return !
|
|
11614
|
+
return !ma() || !t.visualViewport ? my : {
|
|
11616
11615
|
x: t.visualViewport.offsetLeft,
|
|
11617
11616
|
y: t.visualViewport.offsetTop
|
|
11618
11617
|
};
|
|
@@ -11622,17 +11621,17 @@ function gy(e, t, n) {
|
|
|
11622
11621
|
}
|
|
11623
11622
|
function Wn(e, t, n, r) {
|
|
11624
11623
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
11625
|
-
const o = e.getBoundingClientRect(), s =
|
|
11624
|
+
const o = e.getBoundingClientRect(), s = ga(e);
|
|
11626
11625
|
let i = an(1);
|
|
11627
11626
|
t && (r ? qt(r) && (i = ir(r)) : i = ir(e));
|
|
11628
11627
|
const a = gy(s, n, r) ? Rd(s) : an(0);
|
|
11629
11628
|
let l = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, f = o.height / i.y;
|
|
11630
11629
|
if (s) {
|
|
11631
11630
|
const h = jt(s), m = r && qt(r) ? jt(r) : r;
|
|
11632
|
-
let b = h, v =
|
|
11631
|
+
let b = h, v = Ci(b);
|
|
11633
11632
|
for (; v && r && m !== b; ) {
|
|
11634
11633
|
const g = ir(v), x = v.getBoundingClientRect(), w = Gt(v), y = x.left + (v.clientLeft + parseFloat(w.paddingLeft)) * g.x, R = x.top + (v.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
11635
|
-
l *= g.x, u *= g.y, d *= g.x, f *= g.y, l += y, u += R, b = jt(v), v =
|
|
11634
|
+
l *= g.x, u *= g.y, d *= g.x, f *= g.y, l += y, u += R, b = jt(v), v = Ci(b);
|
|
11636
11635
|
}
|
|
11637
11636
|
}
|
|
11638
11637
|
return Fo({
|
|
@@ -11642,7 +11641,7 @@ function Wn(e, t, n, r) {
|
|
|
11642
11641
|
y: u
|
|
11643
11642
|
});
|
|
11644
11643
|
}
|
|
11645
|
-
function
|
|
11644
|
+
function xa(e, t) {
|
|
11646
11645
|
const n = vs(e).scrollLeft;
|
|
11647
11646
|
return t ? t.left + n : Wn(dn(e)).left + n;
|
|
11648
11647
|
}
|
|
@@ -11650,7 +11649,7 @@ function kd(e, t, n) {
|
|
|
11650
11649
|
n === void 0 && (n = !1);
|
|
11651
11650
|
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
11652
11651
|
// RTL <body> scrollbar.
|
|
11653
|
-
|
|
11652
|
+
xa(e, r)
|
|
11654
11653
|
)), s = r.top + t.scrollTop;
|
|
11655
11654
|
return {
|
|
11656
11655
|
x: o,
|
|
@@ -11689,7 +11688,7 @@ function vy(e) {
|
|
|
11689
11688
|
}
|
|
11690
11689
|
function wy(e) {
|
|
11691
11690
|
const t = dn(e), n = vs(e), r = e.ownerDocument.body, o = Nt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = Nt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
11692
|
-
let i = -n.scrollLeft +
|
|
11691
|
+
let i = -n.scrollLeft + xa(e);
|
|
11693
11692
|
const a = -n.scrollTop;
|
|
11694
11693
|
return Gt(r).direction === "rtl" && (i += Nt(t.clientWidth, r.clientWidth) - o), {
|
|
11695
11694
|
width: o,
|
|
@@ -11703,7 +11702,7 @@ function by(e, t) {
|
|
|
11703
11702
|
let s = r.clientWidth, i = r.clientHeight, a = 0, l = 0;
|
|
11704
11703
|
if (o) {
|
|
11705
11704
|
s = o.width, i = o.height;
|
|
11706
|
-
const u =
|
|
11705
|
+
const u = ma();
|
|
11707
11706
|
(!u || u && t === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
|
|
11708
11707
|
}
|
|
11709
11708
|
return {
|
|
@@ -11754,7 +11753,7 @@ function Cy(e, t) {
|
|
|
11754
11753
|
const s = Gt(e).position === "fixed";
|
|
11755
11754
|
let i = s ? Tn(e) : e;
|
|
11756
11755
|
for (; qt(i) && !ur(i); ) {
|
|
11757
|
-
const a = Gt(i), l =
|
|
11756
|
+
const a = Gt(i), l = pa(i);
|
|
11758
11757
|
!l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && yy.has(o.position) || Yr(i) && !l && Ed(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = Tn(i);
|
|
11759
11758
|
}
|
|
11760
11759
|
return t.set(e, r), r;
|
|
@@ -11795,7 +11794,7 @@ function ky(e, t, n) {
|
|
|
11795
11794
|
};
|
|
11796
11795
|
const l = an(0);
|
|
11797
11796
|
function u() {
|
|
11798
|
-
l.x =
|
|
11797
|
+
l.x = xa(o);
|
|
11799
11798
|
}
|
|
11800
11799
|
if (r || !r && !s)
|
|
11801
11800
|
if ((xr(t) !== "body" || Yr(o)) && (a = vs(t)), r) {
|
|
@@ -11838,7 +11837,7 @@ function Id(e, t) {
|
|
|
11838
11837
|
let r = ac(e, t);
|
|
11839
11838
|
for (; r && ly(r) && Zs(r); )
|
|
11840
11839
|
r = ac(r, t);
|
|
11841
|
-
return r && ur(r) && Zs(r) && !
|
|
11840
|
+
return r && ur(r) && Zs(r) && !pa(r) ? n : r || hy(e) || n;
|
|
11842
11841
|
}
|
|
11843
11842
|
const Ey = async function(e) {
|
|
11844
11843
|
const t = this.getOffsetParent || Id, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -11924,7 +11923,7 @@ function _y(e, t, n, r) {
|
|
|
11924
11923
|
elementResize: i = typeof ResizeObserver == "function",
|
|
11925
11924
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
11926
11925
|
animationFrame: l = !1
|
|
11927
|
-
} = r, u =
|
|
11926
|
+
} = r, u = ga(e), d = o || s ? [...u ? Fr(u) : [], ...Fr(t)] : [];
|
|
11928
11927
|
d.forEach((x) => {
|
|
11929
11928
|
o && x.addEventListener("scroll", n, {
|
|
11930
11929
|
passive: !0
|
|
@@ -12037,7 +12036,7 @@ function By(e) {
|
|
|
12037
12036
|
D !== C.current && (C.current = D, v(D));
|
|
12038
12037
|
}, []), y = p.useCallback((D) => {
|
|
12039
12038
|
D !== k.current && (k.current = D, x(D));
|
|
12040
|
-
}, []), R = s || b, S = i || g, C = p.useRef(null), k = p.useRef(null), E = p.useRef(d), N = l != null, _ = Qs(l), I = Qs(o), $ = Qs(u),
|
|
12039
|
+
}, []), R = s || b, S = i || g, C = p.useRef(null), k = p.useRef(null), E = p.useRef(d), N = l != null, _ = Qs(l), I = Qs(o), $ = Qs(u), U = p.useCallback(() => {
|
|
12041
12040
|
if (!C.current || !k.current)
|
|
12042
12041
|
return;
|
|
12043
12042
|
const D = {
|
|
@@ -12071,10 +12070,10 @@ function By(e) {
|
|
|
12071
12070
|
}), []), Co(() => {
|
|
12072
12071
|
if (R && (C.current = R), S && (k.current = S), R && S) {
|
|
12073
12072
|
if (_.current)
|
|
12074
|
-
return _.current(R, S,
|
|
12075
|
-
|
|
12073
|
+
return _.current(R, S, U);
|
|
12074
|
+
U();
|
|
12076
12075
|
}
|
|
12077
|
-
}, [R, S,
|
|
12076
|
+
}, [R, S, U, _, N]);
|
|
12078
12077
|
const G = p.useMemo(() => ({
|
|
12079
12078
|
reference: C,
|
|
12080
12079
|
floating: k,
|
|
@@ -12083,7 +12082,7 @@ function By(e) {
|
|
|
12083
12082
|
}), [w, y]), K = p.useMemo(() => ({
|
|
12084
12083
|
reference: R,
|
|
12085
12084
|
floating: S
|
|
12086
|
-
}), [R, S]),
|
|
12085
|
+
}), [R, S]), W = p.useMemo(() => {
|
|
12087
12086
|
const D = {
|
|
12088
12087
|
position: n,
|
|
12089
12088
|
left: 0,
|
|
@@ -12106,11 +12105,11 @@ function By(e) {
|
|
|
12106
12105
|
}, [n, a, K.floating, d.x, d.y]);
|
|
12107
12106
|
return p.useMemo(() => ({
|
|
12108
12107
|
...d,
|
|
12109
|
-
update:
|
|
12108
|
+
update: U,
|
|
12110
12109
|
refs: G,
|
|
12111
12110
|
elements: K,
|
|
12112
|
-
floatingStyles:
|
|
12113
|
-
}), [d,
|
|
12111
|
+
floatingStyles: W
|
|
12112
|
+
}), [d, U, G, K, W]);
|
|
12114
12113
|
}
|
|
12115
12114
|
const Hy = (e) => {
|
|
12116
12115
|
function t(n) {
|
|
@@ -12194,11 +12193,11 @@ function jd(e) {
|
|
|
12194
12193
|
n(void 0);
|
|
12195
12194
|
}, [e]), t;
|
|
12196
12195
|
}
|
|
12197
|
-
var
|
|
12196
|
+
var va = "Popper", [Pd, ws] = un(va), [Zy, Od] = Pd(va), Md = (e) => {
|
|
12198
12197
|
const { __scopePopper: t, children: n } = e, [r, o] = p.useState(null);
|
|
12199
12198
|
return /* @__PURE__ */ c.jsx(Zy, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
12200
12199
|
};
|
|
12201
|
-
Md.displayName =
|
|
12200
|
+
Md.displayName = va;
|
|
12202
12201
|
var Dd = "PopperAnchor", Ld = p.forwardRef(
|
|
12203
12202
|
(e, t) => {
|
|
12204
12203
|
const { __scopePopper: n, virtualRef: r, ...o } = e, s = Od(Dd, n), i = p.useRef(null), a = Me(t, i), l = p.useRef(null);
|
|
@@ -12209,9 +12208,9 @@ var Dd = "PopperAnchor", Ld = p.forwardRef(
|
|
|
12209
12208
|
}
|
|
12210
12209
|
);
|
|
12211
12210
|
Ld.displayName = Dd;
|
|
12212
|
-
var
|
|
12211
|
+
var wa = "PopperContent", [Qy, e0] = Pd(wa), $d = p.forwardRef(
|
|
12213
12212
|
(e, t) => {
|
|
12214
|
-
var B, j, Y, Q,
|
|
12213
|
+
var B, j, Y, Q, ce, ne;
|
|
12215
12214
|
const {
|
|
12216
12215
|
__scopePopper: n,
|
|
12217
12216
|
side: r = "bottom",
|
|
@@ -12227,12 +12226,12 @@ var ba = "PopperContent", [Qy, e0] = Pd(ba), $d = p.forwardRef(
|
|
|
12227
12226
|
updatePositionStrategy: m = "optimized",
|
|
12228
12227
|
onPlaced: b,
|
|
12229
12228
|
...v
|
|
12230
|
-
} = e, g = Od(
|
|
12229
|
+
} = e, g = Od(wa, n), [x, w] = p.useState(null), y = Me(t, (je) => w(je)), [R, S] = p.useState(null), C = jd(R), k = (C == null ? void 0 : C.width) ?? 0, E = (C == null ? void 0 : C.height) ?? 0, N = r + (s !== "center" ? "-" + s : ""), _ = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, I = Array.isArray(u) ? u : [u], $ = I.length > 0, U = {
|
|
12231
12230
|
padding: _,
|
|
12232
12231
|
boundary: I.filter(n0),
|
|
12233
12232
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
12234
12233
|
altBoundary: $
|
|
12235
|
-
}, { refs: P, floatingStyles: G, placement: K, isPositioned:
|
|
12234
|
+
}, { refs: P, floatingStyles: G, placement: K, isPositioned: W, middlewareData: D } = By({
|
|
12236
12235
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
12237
12236
|
strategy: "fixed",
|
|
12238
12237
|
placement: N,
|
|
@@ -12248,11 +12247,11 @@ var ba = "PopperContent", [Qy, e0] = Pd(ba), $d = p.forwardRef(
|
|
|
12248
12247
|
mainAxis: !0,
|
|
12249
12248
|
crossAxis: !1,
|
|
12250
12249
|
limiter: f === "partial" ? Vy() : void 0,
|
|
12251
|
-
...
|
|
12250
|
+
...U
|
|
12252
12251
|
}),
|
|
12253
|
-
l && Ky({ ...
|
|
12252
|
+
l && Ky({ ...U }),
|
|
12254
12253
|
qy({
|
|
12255
|
-
...
|
|
12254
|
+
...U,
|
|
12256
12255
|
apply: ({ elements: je, rects: Ae, availableWidth: Re, availableHeight: _e }) => {
|
|
12257
12256
|
const { width: ze, height: Ye } = Ae.reference, Ve = je.floating.style;
|
|
12258
12257
|
Ve.setProperty("--radix-popper-available-width", `${Re}px`), Ve.setProperty("--radix-popper-available-height", `${_e}px`), Ve.setProperty("--radix-popper-anchor-width", `${ze}px`), Ve.setProperty("--radix-popper-anchor-height", `${Ye}px`);
|
|
@@ -12260,12 +12259,12 @@ var ba = "PopperContent", [Qy, e0] = Pd(ba), $d = p.forwardRef(
|
|
|
12260
12259
|
}),
|
|
12261
12260
|
R && Yy({ element: R, padding: a }),
|
|
12262
12261
|
r0({ arrowWidth: k, arrowHeight: E }),
|
|
12263
|
-
h && Gy({ strategy: "referenceHidden", ...
|
|
12262
|
+
h && Gy({ strategy: "referenceHidden", ...U })
|
|
12264
12263
|
]
|
|
12265
12264
|
}), [M, se] = Bd(K), X = pt(b);
|
|
12266
12265
|
dt(() => {
|
|
12267
|
-
|
|
12268
|
-
}, [
|
|
12266
|
+
W && (X == null || X());
|
|
12267
|
+
}, [W, X]);
|
|
12269
12268
|
const te = (B = D.arrow) == null ? void 0 : B.x, L = (j = D.arrow) == null ? void 0 : j.y, Z = ((Y = D.arrow) == null ? void 0 : Y.centerOffset) !== 0, [le, de] = p.useState();
|
|
12270
12269
|
return dt(() => {
|
|
12271
12270
|
x && de(window.getComputedStyle(x).zIndex);
|
|
@@ -12276,13 +12275,13 @@ var ba = "PopperContent", [Qy, e0] = Pd(ba), $d = p.forwardRef(
|
|
|
12276
12275
|
"data-radix-popper-content-wrapper": "",
|
|
12277
12276
|
style: {
|
|
12278
12277
|
...G,
|
|
12279
|
-
transform:
|
|
12278
|
+
transform: W ? G.transform : "translate(0, -200%)",
|
|
12280
12279
|
// keep off the page when measuring
|
|
12281
12280
|
minWidth: "max-content",
|
|
12282
12281
|
zIndex: le,
|
|
12283
12282
|
"--radix-popper-transform-origin": [
|
|
12284
12283
|
(Q = D.transformOrigin) == null ? void 0 : Q.x,
|
|
12285
|
-
(
|
|
12284
|
+
(ce = D.transformOrigin) == null ? void 0 : ce.y
|
|
12286
12285
|
].join(" "),
|
|
12287
12286
|
// hide the content if using the hide middleware and should be hidden
|
|
12288
12287
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
@@ -12313,7 +12312,7 @@ var ba = "PopperContent", [Qy, e0] = Pd(ba), $d = p.forwardRef(
|
|
|
12313
12312
|
...v.style,
|
|
12314
12313
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
12315
12314
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
12316
|
-
animation:
|
|
12315
|
+
animation: W ? void 0 : "none"
|
|
12317
12316
|
}
|
|
12318
12317
|
}
|
|
12319
12318
|
)
|
|
@@ -12323,7 +12322,7 @@ var ba = "PopperContent", [Qy, e0] = Pd(ba), $d = p.forwardRef(
|
|
|
12323
12322
|
);
|
|
12324
12323
|
}
|
|
12325
12324
|
);
|
|
12326
|
-
$d.displayName =
|
|
12325
|
+
$d.displayName = wa;
|
|
12327
12326
|
var Fd = "PopperArrow", t0 = {
|
|
12328
12327
|
top: "bottom",
|
|
12329
12328
|
right: "left",
|
|
@@ -12392,11 +12391,11 @@ function Bd(e) {
|
|
|
12392
12391
|
const [t, n = "center"] = e.split("-");
|
|
12393
12392
|
return [t, n];
|
|
12394
12393
|
}
|
|
12395
|
-
var Hd = Md, Ud = Ld, Wd = $d, Vd = zd, ei = "rovingFocusGroup.onEntryFocus", o0 = { bubbles: !1, cancelable: !0 }, Xr = "RovingFocusGroup", [
|
|
12394
|
+
var Hd = Md, Ud = Ld, Wd = $d, Vd = zd, ei = "rovingFocusGroup.onEntryFocus", o0 = { bubbles: !1, cancelable: !0 }, Xr = "RovingFocusGroup", [Ti, Kd, s0] = ua(Xr), [i0, qd] = un(
|
|
12396
12395
|
Xr,
|
|
12397
12396
|
[s0]
|
|
12398
12397
|
), [a0, l0] = i0(Xr), Gd = p.forwardRef(
|
|
12399
|
-
(e, t) => /* @__PURE__ */ c.jsx(
|
|
12398
|
+
(e, t) => /* @__PURE__ */ c.jsx(Ti.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(Ti.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(c0, { ...e, ref: t }) }) })
|
|
12400
12399
|
);
|
|
12401
12400
|
Gd.displayName = Xr;
|
|
12402
12401
|
var c0 = p.forwardRef((e, t) => {
|
|
@@ -12458,7 +12457,7 @@ var c0 = p.forwardRef((e, t) => {
|
|
|
12458
12457
|
if (E.target === E.currentTarget && N && !x) {
|
|
12459
12458
|
const _ = new CustomEvent(ei, o0);
|
|
12460
12459
|
if (E.currentTarget.dispatchEvent(_), !_.defaultPrevented) {
|
|
12461
|
-
const I = R().filter((K) => K.focusable), $ = I.find((K) => K.active),
|
|
12460
|
+
const I = R().filter((K) => K.focusable), $ = I.find((K) => K.active), U = I.find((K) => K.id === v), G = [$, U, ...I].filter(
|
|
12462
12461
|
Boolean
|
|
12463
12462
|
).map((K) => K.ref.current);
|
|
12464
12463
|
Jd(G, d);
|
|
@@ -12485,7 +12484,7 @@ var c0 = p.forwardRef((e, t) => {
|
|
|
12485
12484
|
if (r)
|
|
12486
12485
|
return m(), () => b();
|
|
12487
12486
|
}, [r, m, b]), /* @__PURE__ */ c.jsx(
|
|
12488
|
-
|
|
12487
|
+
Ti.ItemSlot,
|
|
12489
12488
|
{
|
|
12490
12489
|
scope: n,
|
|
12491
12490
|
id: u,
|
|
@@ -12556,13 +12555,13 @@ function Jd(e, t = !1) {
|
|
|
12556
12555
|
function h0(e, t) {
|
|
12557
12556
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
12558
12557
|
}
|
|
12559
|
-
var p0 = Gd, m0 = Xd,
|
|
12560
|
-
ltr: [...
|
|
12561
|
-
rtl: [...
|
|
12558
|
+
var p0 = Gd, m0 = Xd, Ri = ["Enter", " "], g0 = ["ArrowDown", "PageUp", "Home"], Zd = ["ArrowUp", "PageDown", "End"], x0 = [...g0, ...Zd], v0 = {
|
|
12559
|
+
ltr: [...Ri, "ArrowRight"],
|
|
12560
|
+
rtl: [...Ri, "ArrowLeft"]
|
|
12562
12561
|
}, w0 = {
|
|
12563
12562
|
ltr: ["ArrowLeft"],
|
|
12564
12563
|
rtl: ["ArrowRight"]
|
|
12565
|
-
}, Jr = "Menu", [zr, b0, y0] =
|
|
12564
|
+
}, Jr = "Menu", [zr, b0, y0] = ua(Jr), [Xn, Qd] = un(Jr, [
|
|
12566
12565
|
y0,
|
|
12567
12566
|
ws,
|
|
12568
12567
|
qd
|
|
@@ -12598,21 +12597,21 @@ var p0 = Gd, m0 = Xd, ki = ["Enter", " "], g0 = ["ArrowDown", "PageUp", "Home"],
|
|
|
12598
12597
|
) });
|
|
12599
12598
|
};
|
|
12600
12599
|
tf.displayName = Jr;
|
|
12601
|
-
var T0 = "MenuAnchor",
|
|
12600
|
+
var T0 = "MenuAnchor", ba = p.forwardRef(
|
|
12602
12601
|
(e, t) => {
|
|
12603
12602
|
const { __scopeMenu: n, ...r } = e, o = bs(n);
|
|
12604
12603
|
return /* @__PURE__ */ c.jsx(Ud, { ...o, ...r, ref: t });
|
|
12605
12604
|
}
|
|
12606
12605
|
);
|
|
12607
|
-
|
|
12608
|
-
var
|
|
12606
|
+
ba.displayName = T0;
|
|
12607
|
+
var ya = "MenuPortal", [R0, nf] = Xn(ya, {
|
|
12609
12608
|
forceMount: void 0
|
|
12610
12609
|
}), rf = (e) => {
|
|
12611
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Jn(
|
|
12610
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Jn(ya, t);
|
|
12612
12611
|
return /* @__PURE__ */ c.jsx(R0, { scope: t, forceMount: n, children: /* @__PURE__ */ c.jsx(Pt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(ls, { asChild: !0, container: o, children: r }) }) });
|
|
12613
12612
|
};
|
|
12614
|
-
rf.displayName =
|
|
12615
|
-
var zt = "MenuContent", [k0,
|
|
12613
|
+
rf.displayName = ya;
|
|
12614
|
+
var zt = "MenuContent", [k0, Sa] = Xn(zt), of = p.forwardRef(
|
|
12616
12615
|
(e, t) => {
|
|
12617
12616
|
const n = nf(zt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Jn(zt, e.__scopeMenu), i = Zr(zt, e.__scopeMenu);
|
|
12618
12617
|
return /* @__PURE__ */ c.jsx(zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(Pt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(zr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ c.jsx(E0, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(I0, { ...o, ref: t }) }) }) });
|
|
@@ -12622,9 +12621,9 @@ var zt = "MenuContent", [k0, Ca] = Xn(zt), of = p.forwardRef(
|
|
|
12622
12621
|
const n = Jn(zt, e.__scopeMenu), r = p.useRef(null), o = Me(t, r);
|
|
12623
12622
|
return p.useEffect(() => {
|
|
12624
12623
|
const s = r.current;
|
|
12625
|
-
if (s) return
|
|
12624
|
+
if (s) return ia(s);
|
|
12626
12625
|
}, []), /* @__PURE__ */ c.jsx(
|
|
12627
|
-
|
|
12626
|
+
Ca,
|
|
12628
12627
|
{
|
|
12629
12628
|
...e,
|
|
12630
12629
|
ref: o,
|
|
@@ -12643,7 +12642,7 @@ var zt = "MenuContent", [k0, Ca] = Xn(zt), of = p.forwardRef(
|
|
|
12643
12642
|
), I0 = p.forwardRef((e, t) => {
|
|
12644
12643
|
const n = Jn(zt, e.__scopeMenu);
|
|
12645
12644
|
return /* @__PURE__ */ c.jsx(
|
|
12646
|
-
|
|
12645
|
+
Ca,
|
|
12647
12646
|
{
|
|
12648
12647
|
...e,
|
|
12649
12648
|
ref: t,
|
|
@@ -12653,7 +12652,7 @@ var zt = "MenuContent", [k0, Ca] = Xn(zt), of = p.forwardRef(
|
|
|
12653
12652
|
onDismiss: () => n.onOpenChange(!1)
|
|
12654
12653
|
}
|
|
12655
12654
|
);
|
|
12656
|
-
}), N0 = lr("MenuContent.ScrollLock"),
|
|
12655
|
+
}), N0 = lr("MenuContent.ScrollLock"), Ca = p.forwardRef(
|
|
12657
12656
|
(e, t) => {
|
|
12658
12657
|
const {
|
|
12659
12658
|
__scopeMenu: n,
|
|
@@ -12670,17 +12669,17 @@ var zt = "MenuContent", [k0, Ca] = Xn(zt), of = p.forwardRef(
|
|
|
12670
12669
|
onDismiss: m,
|
|
12671
12670
|
disableOutsideScroll: b,
|
|
12672
12671
|
...v
|
|
12673
|
-
} = e, g = Jn(zt, n), x = Zr(zt, n), w = bs(n), y = ef(n), R = b0(n), [S, C] = p.useState(null), k = p.useRef(null), E = Me(t, k, g.onContentChange), N = p.useRef(0), _ = p.useRef(""), I = p.useRef(0), $ = p.useRef(null),
|
|
12672
|
+
} = e, g = Jn(zt, n), x = Zr(zt, n), w = bs(n), y = ef(n), R = b0(n), [S, C] = p.useState(null), k = p.useRef(null), E = Me(t, k, g.onContentChange), N = p.useRef(0), _ = p.useRef(""), I = p.useRef(0), $ = p.useRef(null), U = p.useRef("right"), P = p.useRef(0), G = b ? us : p.Fragment, K = b ? { as: N0, allowPinchZoom: !0 } : void 0, W = (M) => {
|
|
12674
12673
|
var B, j;
|
|
12675
12674
|
const se = _.current + M, X = R().filter((Y) => !Y.disabled), te = document.activeElement, L = (B = X.find((Y) => Y.ref.current === te)) == null ? void 0 : B.textValue, Z = X.map((Y) => Y.textValue), le = B0(Z, se, L), de = (j = X.find((Y) => Y.textValue === le)) == null ? void 0 : j.ref.current;
|
|
12676
12675
|
(function Y(Q) {
|
|
12677
12676
|
_.current = Q, window.clearTimeout(N.current), Q !== "" && (N.current = window.setTimeout(() => Y(""), 1e3));
|
|
12678
12677
|
})(se), de && setTimeout(() => de.focus());
|
|
12679
12678
|
};
|
|
12680
|
-
p.useEffect(() => () => window.clearTimeout(N.current), []),
|
|
12679
|
+
p.useEffect(() => () => window.clearTimeout(N.current), []), sa();
|
|
12681
12680
|
const D = p.useCallback((M) => {
|
|
12682
12681
|
var X, te;
|
|
12683
|
-
return
|
|
12682
|
+
return U.current === ((X = $.current) == null ? void 0 : X.side) && U0(M, (te = $.current) == null ? void 0 : te.area);
|
|
12684
12683
|
}, []);
|
|
12685
12684
|
return /* @__PURE__ */ c.jsx(
|
|
12686
12685
|
k0,
|
|
@@ -12758,7 +12757,7 @@ var zt = "MenuContent", [k0, Ca] = Xn(zt), of = p.forwardRef(
|
|
|
12758
12757
|
style: { outline: "none", ...v.style },
|
|
12759
12758
|
onKeyDown: ae(v.onKeyDown, (M) => {
|
|
12760
12759
|
const X = M.target.closest("[data-radix-menu-content]") === M.currentTarget, te = M.ctrlKey || M.altKey || M.metaKey, L = M.key.length === 1;
|
|
12761
|
-
X && (M.key === "Tab" && M.preventDefault(), !te && L &&
|
|
12760
|
+
X && (M.key === "Tab" && M.preventDefault(), !te && L && W(M.key));
|
|
12762
12761
|
const Z = k.current;
|
|
12763
12762
|
if (M.target !== Z || !x0.includes(M.key)) return;
|
|
12764
12763
|
M.preventDefault();
|
|
@@ -12774,7 +12773,7 @@ var zt = "MenuContent", [k0, Ca] = Xn(zt), of = p.forwardRef(
|
|
|
12774
12773
|
const se = M.target, X = P.current !== M.clientX;
|
|
12775
12774
|
if (M.currentTarget.contains(se) && X) {
|
|
12776
12775
|
const te = M.clientX > P.current ? "right" : "left";
|
|
12777
|
-
|
|
12776
|
+
U.current = te, P.current = M.clientX;
|
|
12778
12777
|
}
|
|
12779
12778
|
})
|
|
12780
12779
|
)
|
|
@@ -12791,13 +12790,13 @@ var zt = "MenuContent", [k0, Ca] = Xn(zt), of = p.forwardRef(
|
|
|
12791
12790
|
}
|
|
12792
12791
|
);
|
|
12793
12792
|
of.displayName = zt;
|
|
12794
|
-
var A0 = "MenuGroup",
|
|
12793
|
+
var A0 = "MenuGroup", Ta = p.forwardRef(
|
|
12795
12794
|
(e, t) => {
|
|
12796
12795
|
const { __scopeMenu: n, ...r } = e;
|
|
12797
12796
|
return /* @__PURE__ */ c.jsx(Te.div, { role: "group", ...r, ref: t });
|
|
12798
12797
|
}
|
|
12799
12798
|
);
|
|
12800
|
-
|
|
12799
|
+
Ta.displayName = A0;
|
|
12801
12800
|
var _0 = "MenuLabel", sf = p.forwardRef(
|
|
12802
12801
|
(e, t) => {
|
|
12803
12802
|
const { __scopeMenu: n, ...r } = e;
|
|
@@ -12807,7 +12806,7 @@ var _0 = "MenuLabel", sf = p.forwardRef(
|
|
|
12807
12806
|
sf.displayName = _0;
|
|
12808
12807
|
var Bo = "MenuItem", uc = "menu.itemSelect", ys = p.forwardRef(
|
|
12809
12808
|
(e, t) => {
|
|
12810
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, s = p.useRef(null), i = Zr(Bo, e.__scopeMenu), a =
|
|
12809
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = p.useRef(null), i = Zr(Bo, e.__scopeMenu), a = Sa(Bo, e.__scopeMenu), l = Me(t, s), u = p.useRef(!1), d = () => {
|
|
12811
12810
|
const f = s.current;
|
|
12812
12811
|
if (!n && f) {
|
|
12813
12812
|
const h = new CustomEvent(uc, { bubbles: !0, cancelable: !0 });
|
|
@@ -12831,7 +12830,7 @@ var Bo = "MenuItem", uc = "menu.itemSelect", ys = p.forwardRef(
|
|
|
12831
12830
|
}),
|
|
12832
12831
|
onKeyDown: ae(e.onKeyDown, (f) => {
|
|
12833
12832
|
const h = a.searchRef.current !== "";
|
|
12834
|
-
n || h && f.key === " " ||
|
|
12833
|
+
n || h && f.key === " " || Ri.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
|
|
12835
12834
|
})
|
|
12836
12835
|
}
|
|
12837
12836
|
);
|
|
@@ -12840,7 +12839,7 @@ var Bo = "MenuItem", uc = "menu.itemSelect", ys = p.forwardRef(
|
|
|
12840
12839
|
ys.displayName = Bo;
|
|
12841
12840
|
var af = p.forwardRef(
|
|
12842
12841
|
(e, t) => {
|
|
12843
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i =
|
|
12842
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Sa(Bo, n), a = ef(n), l = p.useRef(null), u = Me(t, l), [d, f] = p.useState(!1), [h, m] = p.useState("");
|
|
12844
12843
|
return p.useEffect(() => {
|
|
12845
12844
|
const b = l.current;
|
|
12846
12845
|
b && m((b.textContent ?? "").trim());
|
|
@@ -12886,7 +12885,7 @@ var af = p.forwardRef(
|
|
|
12886
12885
|
"aria-checked": Ho(n) ? "mixed" : n,
|
|
12887
12886
|
...o,
|
|
12888
12887
|
ref: t,
|
|
12889
|
-
"data-state":
|
|
12888
|
+
"data-state": ka(n),
|
|
12890
12889
|
onSelect: ae(
|
|
12891
12890
|
o.onSelect,
|
|
12892
12891
|
() => r == null ? void 0 : r(Ho(n) ? !0 : !n),
|
|
@@ -12904,7 +12903,7 @@ var cf = "MenuRadioGroup", [P0, O0] = Xn(
|
|
|
12904
12903
|
), uf = p.forwardRef(
|
|
12905
12904
|
(e, t) => {
|
|
12906
12905
|
const { value: n, onValueChange: r, ...o } = e, s = pt(r);
|
|
12907
|
-
return /* @__PURE__ */ c.jsx(P0, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c.jsx(
|
|
12906
|
+
return /* @__PURE__ */ c.jsx(P0, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c.jsx(Ta, { ...o, ref: t }) });
|
|
12908
12907
|
}
|
|
12909
12908
|
);
|
|
12910
12909
|
uf.displayName = cf;
|
|
@@ -12918,7 +12917,7 @@ var df = "MenuRadioItem", ff = p.forwardRef(
|
|
|
12918
12917
|
"aria-checked": s,
|
|
12919
12918
|
...r,
|
|
12920
12919
|
ref: t,
|
|
12921
|
-
"data-state":
|
|
12920
|
+
"data-state": ka(s),
|
|
12922
12921
|
onSelect: ae(
|
|
12923
12922
|
r.onSelect,
|
|
12924
12923
|
() => {
|
|
@@ -12932,12 +12931,12 @@ var df = "MenuRadioItem", ff = p.forwardRef(
|
|
|
12932
12931
|
}
|
|
12933
12932
|
);
|
|
12934
12933
|
ff.displayName = df;
|
|
12935
|
-
var
|
|
12936
|
-
|
|
12934
|
+
var Ra = "MenuItemIndicator", [hf, M0] = Xn(
|
|
12935
|
+
Ra,
|
|
12937
12936
|
{ checked: !1 }
|
|
12938
12937
|
), pf = p.forwardRef(
|
|
12939
12938
|
(e, t) => {
|
|
12940
|
-
const { __scopeMenu: n, forceMount: r, ...o } = e, s = M0(
|
|
12939
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, s = M0(Ra, n);
|
|
12941
12940
|
return /* @__PURE__ */ c.jsx(
|
|
12942
12941
|
Pt,
|
|
12943
12942
|
{
|
|
@@ -12947,14 +12946,14 @@ var ka = "MenuItemIndicator", [hf, M0] = Xn(
|
|
|
12947
12946
|
{
|
|
12948
12947
|
...o,
|
|
12949
12948
|
ref: t,
|
|
12950
|
-
"data-state":
|
|
12949
|
+
"data-state": ka(s.checked)
|
|
12951
12950
|
}
|
|
12952
12951
|
)
|
|
12953
12952
|
}
|
|
12954
12953
|
);
|
|
12955
12954
|
}
|
|
12956
12955
|
);
|
|
12957
|
-
pf.displayName =
|
|
12956
|
+
pf.displayName = Ra;
|
|
12958
12957
|
var D0 = "MenuSeparator", mf = p.forwardRef(
|
|
12959
12958
|
(e, t) => {
|
|
12960
12959
|
const { __scopeMenu: n, ...r } = e;
|
|
@@ -12979,7 +12978,7 @@ var L0 = "MenuArrow", gf = p.forwardRef(
|
|
|
12979
12978
|
gf.displayName = L0;
|
|
12980
12979
|
var $0 = "MenuSub", [yT, xf] = Xn($0), Er = "MenuSubTrigger", vf = p.forwardRef(
|
|
12981
12980
|
(e, t) => {
|
|
12982
|
-
const n = Jn(Er, e.__scopeMenu), r = Zr(Er, e.__scopeMenu), o = xf(Er, e.__scopeMenu), s =
|
|
12981
|
+
const n = Jn(Er, e.__scopeMenu), r = Zr(Er, e.__scopeMenu), o = xf(Er, e.__scopeMenu), s = Sa(Er, e.__scopeMenu), i = p.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, u = { __scopeMenu: e.__scopeMenu }, d = p.useCallback(() => {
|
|
12983
12982
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
12984
12983
|
}, []);
|
|
12985
12984
|
return p.useEffect(() => d, [d]), p.useEffect(() => {
|
|
@@ -12987,7 +12986,7 @@ var $0 = "MenuSub", [yT, xf] = Xn($0), Er = "MenuSubTrigger", vf = p.forwardRef(
|
|
|
12987
12986
|
return () => {
|
|
12988
12987
|
window.clearTimeout(f), l(null);
|
|
12989
12988
|
};
|
|
12990
|
-
}, [a, l]), /* @__PURE__ */ c.jsx(
|
|
12989
|
+
}, [a, l]), /* @__PURE__ */ c.jsx(ba, { asChild: !0, ...u, children: /* @__PURE__ */ c.jsx(
|
|
12991
12990
|
af,
|
|
12992
12991
|
{
|
|
12993
12992
|
id: o.triggerId,
|
|
@@ -12996,7 +12995,7 @@ var $0 = "MenuSub", [yT, xf] = Xn($0), Er = "MenuSubTrigger", vf = p.forwardRef(
|
|
|
12996
12995
|
"aria-controls": o.contentId,
|
|
12997
12996
|
"data-state": yf(n.open),
|
|
12998
12997
|
...e,
|
|
12999
|
-
ref:
|
|
12998
|
+
ref: Zi(t, o.onTriggerChange),
|
|
13000
12999
|
onClick: (f) => {
|
|
13001
13000
|
var h;
|
|
13002
13001
|
(h = e.onClick) == null || h.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
@@ -13052,7 +13051,7 @@ var wf = "MenuSubContent", bf = p.forwardRef(
|
|
|
13052
13051
|
(e, t) => {
|
|
13053
13052
|
const n = nf(zt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Jn(zt, e.__scopeMenu), i = Zr(zt, e.__scopeMenu), a = xf(wf, e.__scopeMenu), l = p.useRef(null), u = Me(t, l);
|
|
13054
13053
|
return /* @__PURE__ */ c.jsx(zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(Pt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(zr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(
|
|
13055
|
-
|
|
13054
|
+
Ca,
|
|
13056
13055
|
{
|
|
13057
13056
|
id: a.contentId,
|
|
13058
13057
|
"aria-labelledby": a.triggerId,
|
|
@@ -13090,7 +13089,7 @@ function yf(e) {
|
|
|
13090
13089
|
function Ho(e) {
|
|
13091
13090
|
return e === "indeterminate";
|
|
13092
13091
|
}
|
|
13093
|
-
function
|
|
13092
|
+
function ka(e) {
|
|
13094
13093
|
return Ho(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
13095
13094
|
}
|
|
13096
13095
|
function F0(e) {
|
|
@@ -13127,7 +13126,7 @@ function U0(e, t) {
|
|
|
13127
13126
|
function Br(e) {
|
|
13128
13127
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
13129
13128
|
}
|
|
13130
|
-
var W0 = tf, V0 =
|
|
13129
|
+
var W0 = tf, V0 = ba, K0 = rf, q0 = of, G0 = Ta, Y0 = sf, X0 = ys, J0 = lf, Z0 = uf, Q0 = ff, eS = pf, tS = mf, nS = gf, rS = vf, oS = bf, Ss = "DropdownMenu", [sS, ST] = un(
|
|
13131
13130
|
Ss,
|
|
13132
13131
|
[Qd]
|
|
13133
13132
|
), St = Qd(), [iS, Sf] = sS(Ss), Cf = (e) => {
|
|
@@ -13176,7 +13175,7 @@ var Tf = "DropdownMenuTrigger", Rf = p.forwardRef(
|
|
|
13176
13175
|
"data-disabled": r ? "" : void 0,
|
|
13177
13176
|
disabled: r,
|
|
13178
13177
|
...o,
|
|
13179
|
-
ref:
|
|
13178
|
+
ref: Zi(t, s.triggerRef),
|
|
13180
13179
|
onPointerDown: ae(e.onPointerDown, (a) => {
|
|
13181
13180
|
!r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
|
|
13182
13181
|
}),
|
|
@@ -13346,7 +13345,7 @@ const Kf = p.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
|
|
|
13346
13345
|
}
|
|
13347
13346
|
) }));
|
|
13348
13347
|
Kf.displayName = Lf.displayName;
|
|
13349
|
-
const
|
|
13348
|
+
const ki = p.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
|
|
13350
13349
|
Ff,
|
|
13351
13350
|
{
|
|
13352
13351
|
ref: r,
|
|
@@ -13358,7 +13357,7 @@ const Ei = p.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
13358
13357
|
...n
|
|
13359
13358
|
}
|
|
13360
13359
|
));
|
|
13361
|
-
|
|
13360
|
+
ki.displayName = Ff.displayName;
|
|
13362
13361
|
const NS = p.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
|
|
13363
13362
|
zf,
|
|
13364
13363
|
{
|
|
@@ -13370,7 +13369,7 @@ const NS = p.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
|
|
|
13370
13369
|
checked: n,
|
|
13371
13370
|
...r,
|
|
13372
13371
|
children: [
|
|
13373
|
-
/* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c.jsx(Hf, { children: /* @__PURE__ */ c.jsx(
|
|
13372
|
+
/* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c.jsx(Hf, { children: /* @__PURE__ */ c.jsx(Mi, { className: "h-4 w-4" }) }) }),
|
|
13374
13373
|
t
|
|
13375
13374
|
]
|
|
13376
13375
|
}
|
|
@@ -13446,8 +13445,8 @@ function ti({
|
|
|
13446
13445
|
hasMoreHistory: _,
|
|
13447
13446
|
isLoadingHistory: I,
|
|
13448
13447
|
loadOlderMessages: $,
|
|
13449
|
-
api:
|
|
13450
|
-
} =
|
|
13448
|
+
api: U
|
|
13449
|
+
} = Fi(), [P, G] = xe(null), [K, W] = xe(""), [D, M] = xe(null), [se, X] = xe([]), [te, L] = xe(!1), [Z, le] = xe(null), [de, B] = xe(null), [j, Y] = xe(!1), [Q, ce] = xe(null), [ne, je] = xe([]), [Ae, Re] = xe(null), [_e, ze] = xe(null), [Ye, Ve] = xe(!1), ut = tt(null), ft = tt(null), ue = tt(null), [he, me] = xe("desktop");
|
|
13451
13450
|
at(() => {
|
|
13452
13451
|
const ee = () => {
|
|
13453
13452
|
const ge = window.innerWidth;
|
|
@@ -13457,14 +13456,14 @@ function ti({
|
|
|
13457
13456
|
}, []), at(() => {
|
|
13458
13457
|
let ee = !1;
|
|
13459
13458
|
if (!b) {
|
|
13460
|
-
je([]), Re(null), ze(null),
|
|
13459
|
+
je([]), Re(null), ze(null), ue.current = null;
|
|
13461
13460
|
return;
|
|
13462
13461
|
}
|
|
13463
13462
|
const ge = {
|
|
13464
13463
|
threadId: b,
|
|
13465
13464
|
checkpointId: S ?? null,
|
|
13466
13465
|
checkpointNs: C ?? null
|
|
13467
|
-
}, De =
|
|
13466
|
+
}, De = ue.current;
|
|
13468
13467
|
if (!(De && De.threadId === ge.threadId && De.checkpointId === ge.checkpointId && De.checkpointNs === ge.checkpointNs))
|
|
13469
13468
|
return k(b).then((Xe) => {
|
|
13470
13469
|
var yr;
|
|
@@ -13477,9 +13476,9 @@ function ti({
|
|
|
13477
13476
|
const hn = Zt.find((Sr) => Sr.checkpointId === wr);
|
|
13478
13477
|
br = (hn == null ? void 0 : hn.checkpointNs) ?? null;
|
|
13479
13478
|
}
|
|
13480
|
-
Re(wr), ze(br),
|
|
13479
|
+
Re(wr), ze(br), ue.current = ge;
|
|
13481
13480
|
}).catch((Xe) => {
|
|
13482
|
-
console.error("ChatInterface - listCheckpoints error:", Xe), ee || (je([]),
|
|
13481
|
+
console.error("ChatInterface - listCheckpoints error:", Xe), ee || (je([]), ue.current = null);
|
|
13483
13482
|
}), () => {
|
|
13484
13483
|
ee = !0;
|
|
13485
13484
|
};
|
|
@@ -13496,14 +13495,18 @@ function ti({
|
|
|
13496
13495
|
}, [_, I, $]);
|
|
13497
13496
|
at(() => {
|
|
13498
13497
|
(async () => {
|
|
13498
|
+
if (!U.baseUrl) {
|
|
13499
|
+
ce(null);
|
|
13500
|
+
return;
|
|
13501
|
+
}
|
|
13499
13502
|
try {
|
|
13500
|
-
const ge = await
|
|
13501
|
-
|
|
13503
|
+
const ge = await U.getAgent("default");
|
|
13504
|
+
ce(ge.uiDefaultMessage || null);
|
|
13502
13505
|
} catch (ge) {
|
|
13503
|
-
console.warn("Failed to fetch default message:", ge),
|
|
13506
|
+
console.warn("Failed to fetch default message:", ge), ce(null);
|
|
13504
13507
|
}
|
|
13505
13508
|
})();
|
|
13506
|
-
}, [
|
|
13509
|
+
}, [U]), at(() => {
|
|
13507
13510
|
w && !j && (m == null || m(w));
|
|
13508
13511
|
}, [w, j, m]);
|
|
13509
13512
|
const V = (ee) => {
|
|
@@ -13530,16 +13533,16 @@ function ti({
|
|
|
13530
13533
|
checkpointNs: _e ?? C ?? void 0,
|
|
13531
13534
|
payloadExtras: P ? { edit: !0, originalMessageId: P } : void 0,
|
|
13532
13535
|
attachments: se
|
|
13533
|
-
}), f == null || f(ge), M(null), X([]), G(null),
|
|
13536
|
+
}), f == null || f(ge), M(null), X([]), G(null), W("");
|
|
13534
13537
|
} catch (De) {
|
|
13535
13538
|
const Xe = (De == null ? void 0 : De.message) || "Failed to send message";
|
|
13536
13539
|
M(Xe), m == null || m(Xe);
|
|
13537
13540
|
}
|
|
13538
13541
|
}
|
|
13539
13542
|
}, $e = z.useCallback((ee, ge) => {
|
|
13540
|
-
u && (G(ee),
|
|
13543
|
+
u && (G(ee), W(ge), M(null));
|
|
13541
13544
|
}, [u]), fe = z.useCallback(() => {
|
|
13542
|
-
G(null),
|
|
13545
|
+
G(null), W(""), M(null);
|
|
13543
13546
|
}, []), Pe = Je((ee, ge) => {
|
|
13544
13547
|
$e(ee, ge);
|
|
13545
13548
|
}, [$e]), nt = Je((ee) => {
|
|
@@ -13741,7 +13744,7 @@ function ti({
|
|
|
13741
13744
|
}
|
|
13742
13745
|
) }),
|
|
13743
13746
|
/* @__PURE__ */ c.jsxs(Kf, { align: "start", sideOffset: 6, className: "w-52", children: [
|
|
13744
|
-
a && /* @__PURE__ */ c.jsxs(
|
|
13747
|
+
a && /* @__PURE__ */ c.jsxs(ki, { onClick: () => {
|
|
13745
13748
|
var ee;
|
|
13746
13749
|
return (ee = ut.current) == null ? void 0 : ee.click();
|
|
13747
13750
|
}, className: "cursor-pointer", children: [
|
|
@@ -13749,7 +13752,7 @@ function ti({
|
|
|
13749
13752
|
" Attach files or images"
|
|
13750
13753
|
] }),
|
|
13751
13754
|
l && /* @__PURE__ */ c.jsxs(
|
|
13752
|
-
|
|
13755
|
+
ki,
|
|
13753
13756
|
{
|
|
13754
13757
|
onClick: () => {
|
|
13755
13758
|
var ee;
|
|
@@ -13799,13 +13802,13 @@ const Uo = p.forwardRef(
|
|
|
13799
13802
|
)
|
|
13800
13803
|
);
|
|
13801
13804
|
Uo.displayName = "Input";
|
|
13802
|
-
function
|
|
13805
|
+
function Ei(e, [t, n]) {
|
|
13803
13806
|
return Math.min(n, Math.max(t, e));
|
|
13804
13807
|
}
|
|
13805
13808
|
function PS(e, t) {
|
|
13806
13809
|
return p.useReducer((n, r) => t[n][r] ?? n, e);
|
|
13807
13810
|
}
|
|
13808
|
-
var
|
|
13811
|
+
var Ea = "ScrollArea", [qf, CT] = un(Ea), [OS, Ht] = qf(Ea), Gf = p.forwardRef(
|
|
13809
13812
|
(e, t) => {
|
|
13810
13813
|
const {
|
|
13811
13814
|
__scopeScrollArea: n,
|
|
@@ -13855,7 +13858,7 @@ var Ia = "ScrollArea", [qf, CT] = un(Ia), [OS, Ht] = qf(Ia), Gf = p.forwardRef(
|
|
|
13855
13858
|
);
|
|
13856
13859
|
}
|
|
13857
13860
|
);
|
|
13858
|
-
Gf.displayName =
|
|
13861
|
+
Gf.displayName = Ea;
|
|
13859
13862
|
var Yf = "ScrollAreaViewport", Xf = p.forwardRef(
|
|
13860
13863
|
(e, t) => {
|
|
13861
13864
|
const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = Ht(Yf, n), a = p.useRef(null), l = Me(t, a, i.onViewportChange);
|
|
@@ -13898,15 +13901,15 @@ var Yf = "ScrollAreaViewport", Xf = p.forwardRef(
|
|
|
13898
13901
|
}
|
|
13899
13902
|
);
|
|
13900
13903
|
Xf.displayName = Yf;
|
|
13901
|
-
var fn = "ScrollAreaScrollbar",
|
|
13904
|
+
var fn = "ScrollAreaScrollbar", Ia = p.forwardRef(
|
|
13902
13905
|
(e, t) => {
|
|
13903
13906
|
const { forceMount: n, ...r } = e, o = Ht(fn, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
|
|
13904
13907
|
return p.useEffect(() => (a ? s(!0) : i(!0), () => {
|
|
13905
13908
|
a ? s(!1) : i(!1);
|
|
13906
|
-
}), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ c.jsx(MS, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ c.jsx(DS, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ c.jsx(Jf, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ c.jsx(
|
|
13909
|
+
}), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ c.jsx(MS, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ c.jsx(DS, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ c.jsx(Jf, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ c.jsx(Na, { ...r, ref: t }) : null;
|
|
13907
13910
|
}
|
|
13908
13911
|
);
|
|
13909
|
-
|
|
13912
|
+
Ia.displayName = fn;
|
|
13910
13913
|
var MS = p.forwardRef((e, t) => {
|
|
13911
13914
|
const { forceMount: n, ...r } = e, o = Ht(fn, e.__scopeScrollArea), [s, i] = p.useState(!1);
|
|
13912
13915
|
return p.useEffect(() => {
|
|
@@ -13965,7 +13968,7 @@ var MS = p.forwardRef((e, t) => {
|
|
|
13965
13968
|
return u.addEventListener("scroll", h), () => u.removeEventListener("scroll", h);
|
|
13966
13969
|
}
|
|
13967
13970
|
}, [o.viewport, s, l, i]), /* @__PURE__ */ c.jsx(Pt, { present: n || a !== "hidden", children: /* @__PURE__ */ c.jsx(
|
|
13968
|
-
|
|
13971
|
+
Na,
|
|
13969
13972
|
{
|
|
13970
13973
|
"data-state": a === "hidden" ? "hidden" : "visible",
|
|
13971
13974
|
...r,
|
|
@@ -13982,14 +13985,14 @@ var MS = p.forwardRef((e, t) => {
|
|
|
13982
13985
|
}
|
|
13983
13986
|
}, 10);
|
|
13984
13987
|
return dr(n.viewport, l), dr(n.content, l), /* @__PURE__ */ c.jsx(Pt, { present: r || s, children: /* @__PURE__ */ c.jsx(
|
|
13985
|
-
|
|
13988
|
+
Na,
|
|
13986
13989
|
{
|
|
13987
13990
|
"data-state": s ? "visible" : "hidden",
|
|
13988
13991
|
...o,
|
|
13989
13992
|
ref: t
|
|
13990
13993
|
}
|
|
13991
13994
|
) });
|
|
13992
|
-
}),
|
|
13995
|
+
}), Na = p.forwardRef((e, t) => {
|
|
13993
13996
|
const { orientation: n = "vertical", ...r } = e, o = Ht(fn, e.__scopeScrollArea), s = p.useRef(null), i = p.useRef(0), [a, l] = p.useState({
|
|
13994
13997
|
content: 0,
|
|
13995
13998
|
viewport: 0,
|
|
@@ -14221,15 +14224,15 @@ var MS = p.forwardRef((e, t) => {
|
|
|
14221
14224
|
}
|
|
14222
14225
|
);
|
|
14223
14226
|
eh.displayName = Wo;
|
|
14224
|
-
var
|
|
14227
|
+
var Aa = "ScrollAreaCorner", th = p.forwardRef(
|
|
14225
14228
|
(e, t) => {
|
|
14226
|
-
const n = Ht(
|
|
14229
|
+
const n = Ht(Aa, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
14227
14230
|
return n.type !== "scroll" && r ? /* @__PURE__ */ c.jsx(BS, { ...e, ref: t }) : null;
|
|
14228
14231
|
}
|
|
14229
14232
|
);
|
|
14230
|
-
th.displayName =
|
|
14233
|
+
th.displayName = Aa;
|
|
14231
14234
|
var BS = p.forwardRef((e, t) => {
|
|
14232
|
-
const { __scopeScrollArea: n, ...r } = e, o = Ht(
|
|
14235
|
+
const { __scopeScrollArea: n, ...r } = e, o = Ht(Aa, n), [s, i] = p.useState(0), [a, l] = p.useState(0), u = !!(s && a);
|
|
14233
14236
|
return dr(o.scrollbarX, () => {
|
|
14234
14237
|
var f;
|
|
14235
14238
|
const d = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
|
|
@@ -14271,7 +14274,7 @@ function HS(e, t, n, r = "ltr") {
|
|
|
14271
14274
|
return rh([l, u], f)(e);
|
|
14272
14275
|
}
|
|
14273
14276
|
function dc(e, t, n = "ltr") {
|
|
14274
|
-
const r = Cs(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - o, i = t.content - t.viewport, a = s - r, l = n === "ltr" ? [0, i] : [i * -1, 0], u =
|
|
14277
|
+
const r = Cs(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - o, i = t.content - t.viewport, a = s - r, l = n === "ltr" ? [0, i] : [i * -1, 0], u = Ei(e, l);
|
|
14275
14278
|
return rh([0, i], [0, a])(u);
|
|
14276
14279
|
}
|
|
14277
14280
|
function rh(e, t) {
|
|
@@ -14328,7 +14331,7 @@ const ih = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
14328
14331
|
));
|
|
14329
14332
|
ih.displayName = sh.displayName;
|
|
14330
14333
|
const ah = p.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ c.jsx(
|
|
14331
|
-
|
|
14334
|
+
Ia,
|
|
14332
14335
|
{
|
|
14333
14336
|
ref: r,
|
|
14334
14337
|
orientation: t,
|
|
@@ -14342,7 +14345,7 @@ const ah = p.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r)
|
|
|
14342
14345
|
children: /* @__PURE__ */ c.jsx(eh, { className: "relative flex-1 rounded-full bg-border" })
|
|
14343
14346
|
}
|
|
14344
14347
|
));
|
|
14345
|
-
ah.displayName =
|
|
14348
|
+
ah.displayName = Ia.displayName;
|
|
14346
14349
|
function fc({
|
|
14347
14350
|
className: e = "",
|
|
14348
14351
|
showCreateButton: t = !0,
|
|
@@ -14364,7 +14367,7 @@ function fc({
|
|
|
14364
14367
|
createThread: v,
|
|
14365
14368
|
deleteThread: g,
|
|
14366
14369
|
renameThread: x
|
|
14367
|
-
} =
|
|
14370
|
+
} = Fi(), [w, y] = xe(h ?? []), [R, S] = xe(!1), [C, k] = xe(null), [E, N] = xe(null), [_, I] = xe(""), [$, U] = xe(!1);
|
|
14368
14371
|
at(() => {
|
|
14369
14372
|
y(h ?? []);
|
|
14370
14373
|
}, [h]);
|
|
@@ -14376,13 +14379,13 @@ function fc({
|
|
|
14376
14379
|
}
|
|
14377
14380
|
}, G = async () => {
|
|
14378
14381
|
try {
|
|
14379
|
-
|
|
14382
|
+
U(!0);
|
|
14380
14383
|
const L = await v();
|
|
14381
14384
|
u == null || u(L), a == null || a(L);
|
|
14382
14385
|
} catch (L) {
|
|
14383
14386
|
console.error("Failed to create thread:", L);
|
|
14384
14387
|
} finally {
|
|
14385
|
-
|
|
14388
|
+
U(!1);
|
|
14386
14389
|
}
|
|
14387
14390
|
}, K = async (L, Z) => {
|
|
14388
14391
|
if (Z.stopPropagation(), !!confirm("Delete this thread?"))
|
|
@@ -14391,7 +14394,7 @@ function fc({
|
|
|
14391
14394
|
} catch (le) {
|
|
14392
14395
|
console.error("Failed to delete thread:", le);
|
|
14393
14396
|
}
|
|
14394
|
-
},
|
|
14397
|
+
}, W = (L, Z) => {
|
|
14395
14398
|
Z.stopPropagation(), N(L.threadId), I(L.title || `Thread ${L.threadId.slice(0, 8)}`);
|
|
14396
14399
|
}, D = async (L) => {
|
|
14397
14400
|
if (_.trim())
|
|
@@ -14443,7 +14446,7 @@ function fc({
|
|
|
14443
14446
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
14444
14447
|
/* @__PURE__ */ c.jsx("div", { className: "flex-1 min-w-0", children: E === L.threadId ? /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", onClick: (Z) => Z.stopPropagation(), children: [
|
|
14445
14448
|
/* @__PURE__ */ c.jsx(Uo, { value: _, onChange: (Z) => I(Z.target.value), onKeyDown: (Z) => se(Z, L.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
14446
|
-
/* @__PURE__ */ c.jsx(He, { variant: "ghost", size: "sm", onClick: () => D(L.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(
|
|
14449
|
+
/* @__PURE__ */ c.jsx(He, { variant: "ghost", size: "sm", onClick: () => D(L.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(Mi, { size: 12 }) }),
|
|
14447
14450
|
/* @__PURE__ */ c.jsx(He, { variant: "ghost", size: "sm", onClick: M, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(rr, { size: 12 }) })
|
|
14448
14451
|
] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
14449
14452
|
/* @__PURE__ */ c.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: te(L) }),
|
|
@@ -14453,7 +14456,7 @@ function fc({
|
|
|
14453
14456
|
] })
|
|
14454
14457
|
] }) }),
|
|
14455
14458
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
|
|
14456
|
-
r && E !== L.threadId && /* @__PURE__ */ c.jsx(He, { variant: "ghost", size: "sm", onClick: (Z) =>
|
|
14459
|
+
r && E !== L.threadId && /* @__PURE__ */ c.jsx(He, { variant: "ghost", size: "sm", onClick: (Z) => W(L, Z), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c.jsx(xc, { size: 12 }) }),
|
|
14457
14460
|
n && /* @__PURE__ */ c.jsx(
|
|
14458
14461
|
He,
|
|
14459
14462
|
{
|
|
@@ -14747,7 +14750,7 @@ var bh = Object.freeze({
|
|
|
14747
14750
|
)
|
|
14748
14751
|
);
|
|
14749
14752
|
sC.displayName = oC;
|
|
14750
|
-
var iC = [" ", "Enter", "ArrowUp", "ArrowDown"], aC = [" ", "Enter"], Vn = "Select", [ks, Es, lC] =
|
|
14753
|
+
var iC = [" ", "Enter", "ArrowUp", "ArrowDown"], aC = [" ", "Enter"], Vn = "Select", [ks, Es, lC] = ua(Vn), [vr, ET] = un(Vn, [
|
|
14751
14754
|
lC,
|
|
14752
14755
|
ws
|
|
14753
14756
|
]), Is = ws(), [cC, In] = vr(Vn), [uC, dC] = vr(Vn), yh = (e) => {
|
|
@@ -14776,7 +14779,7 @@ var iC = [" ", "Enter", "ArrowUp", "ArrowDown"], aC = [" ", "Enter"], Vn = "Sele
|
|
|
14776
14779
|
defaultProp: a,
|
|
14777
14780
|
onChange: l,
|
|
14778
14781
|
caller: Vn
|
|
14779
|
-
}), I = p.useRef(null), $ = g ? b || !!g.closest("form") : !0, [
|
|
14782
|
+
}), I = p.useRef(null), $ = g ? b || !!g.closest("form") : !0, [U, P] = p.useState(/* @__PURE__ */ new Set()), G = Array.from(U).map((K) => K.props.value).join(";");
|
|
14780
14783
|
return /* @__PURE__ */ c.jsx(Hd, { ...v, children: /* @__PURE__ */ c.jsxs(
|
|
14781
14784
|
cC,
|
|
14782
14785
|
{
|
|
@@ -14802,11 +14805,11 @@ var iC = [" ", "Enter", "ArrowUp", "ArrowDown"], aC = [" ", "Enter"], Vn = "Sele
|
|
|
14802
14805
|
{
|
|
14803
14806
|
scope: e.__scopeSelect,
|
|
14804
14807
|
onNativeOptionAdd: p.useCallback((K) => {
|
|
14805
|
-
P((
|
|
14808
|
+
P((W) => new Set(W).add(K));
|
|
14806
14809
|
}, []),
|
|
14807
14810
|
onNativeOptionRemove: p.useCallback((K) => {
|
|
14808
|
-
P((
|
|
14809
|
-
const D = new Set(
|
|
14811
|
+
P((W) => {
|
|
14812
|
+
const D = new Set(W);
|
|
14810
14813
|
return D.delete(K), D;
|
|
14811
14814
|
});
|
|
14812
14815
|
}, []),
|
|
@@ -14827,7 +14830,7 @@ var iC = [" ", "Enter", "ArrowUp", "ArrowDown"], aC = [" ", "Enter"], Vn = "Sele
|
|
|
14827
14830
|
form: b,
|
|
14828
14831
|
children: [
|
|
14829
14832
|
N === void 0 ? /* @__PURE__ */ c.jsx("option", { value: "" }) : null,
|
|
14830
|
-
Array.from(
|
|
14833
|
+
Array.from(U)
|
|
14831
14834
|
]
|
|
14832
14835
|
},
|
|
14833
14836
|
G
|
|
@@ -14947,32 +14950,32 @@ var Ut = 10, [Nh, Nn] = vr(Kn), pC = "SelectContentImpl", mC = lr("SelectContent
|
|
|
14947
14950
|
...x
|
|
14948
14951
|
} = e, w = In(Kn, n), [y, R] = p.useState(null), [S, C] = p.useState(null), k = Me(t, (B) => R(B)), [E, N] = p.useState(null), [_, I] = p.useState(
|
|
14949
14952
|
null
|
|
14950
|
-
), $ = Es(n), [
|
|
14953
|
+
), $ = Es(n), [U, P] = p.useState(!1), G = p.useRef(!1);
|
|
14951
14954
|
p.useEffect(() => {
|
|
14952
|
-
if (y) return
|
|
14953
|
-
}, [y]),
|
|
14955
|
+
if (y) return ia(y);
|
|
14956
|
+
}, [y]), sa();
|
|
14954
14957
|
const K = p.useCallback(
|
|
14955
14958
|
(B) => {
|
|
14956
|
-
const [j, ...Y] = $().map((ne) => ne.ref.current), [Q] = Y.slice(-1),
|
|
14959
|
+
const [j, ...Y] = $().map((ne) => ne.ref.current), [Q] = Y.slice(-1), ce = document.activeElement;
|
|
14957
14960
|
for (const ne of B)
|
|
14958
|
-
if (ne ===
|
|
14961
|
+
if (ne === ce || (ne == null || ne.scrollIntoView({ block: "nearest" }), ne === j && S && (S.scrollTop = 0), ne === Q && S && (S.scrollTop = S.scrollHeight), ne == null || ne.focus(), document.activeElement !== ce)) return;
|
|
14959
14962
|
},
|
|
14960
14963
|
[$, S]
|
|
14961
|
-
),
|
|
14964
|
+
), W = p.useCallback(
|
|
14962
14965
|
() => K([E, y]),
|
|
14963
14966
|
[K, E, y]
|
|
14964
14967
|
);
|
|
14965
14968
|
p.useEffect(() => {
|
|
14966
|
-
|
|
14967
|
-
}, [
|
|
14969
|
+
U && W();
|
|
14970
|
+
}, [U, W]);
|
|
14968
14971
|
const { onOpenChange: D, triggerPointerDownPosRef: M } = w;
|
|
14969
14972
|
p.useEffect(() => {
|
|
14970
14973
|
if (y) {
|
|
14971
14974
|
let B = { x: 0, y: 0 };
|
|
14972
14975
|
const j = (Q) => {
|
|
14973
|
-
var
|
|
14976
|
+
var ce, ne;
|
|
14974
14977
|
B = {
|
|
14975
|
-
x: Math.abs(Math.round(Q.pageX) - (((
|
|
14978
|
+
x: Math.abs(Math.round(Q.pageX) - (((ce = M.current) == null ? void 0 : ce.x) ?? 0)),
|
|
14976
14979
|
y: Math.abs(Math.round(Q.pageY) - (((ne = M.current) == null ? void 0 : ne.y) ?? 0))
|
|
14977
14980
|
};
|
|
14978
14981
|
}, Y = (Q) => {
|
|
@@ -14989,7 +14992,7 @@ var Ut = 10, [Nh, Nn] = vr(Kn), pC = "SelectContentImpl", mC = lr("SelectContent
|
|
|
14989
14992
|
};
|
|
14990
14993
|
}, [D]);
|
|
14991
14994
|
const [se, X] = qh((B) => {
|
|
14992
|
-
const j = $().filter((
|
|
14995
|
+
const j = $().filter((ce) => !ce.disabled), Y = j.find((ce) => ce.ref.current === document.activeElement), Q = Gh(j, B, Y);
|
|
14993
14996
|
Q && setTimeout(() => Q.ref.current.focus());
|
|
14994
14997
|
}), te = p.useCallback(
|
|
14995
14998
|
(B, j, Y) => {
|
|
@@ -15003,7 +15006,7 @@ var Ut = 10, [Nh, Nn] = vr(Kn), pC = "SelectContentImpl", mC = lr("SelectContent
|
|
|
15003
15006
|
(w.value !== void 0 && w.value === j || Q) && I(B);
|
|
15004
15007
|
},
|
|
15005
15008
|
[w.value]
|
|
15006
|
-
), le = r === "popper" ?
|
|
15009
|
+
), le = r === "popper" ? Ii : _h, de = le === Ii ? {
|
|
15007
15010
|
side: a,
|
|
15008
15011
|
sideOffset: l,
|
|
15009
15012
|
align: u,
|
|
@@ -15026,10 +15029,10 @@ var Ut = 10, [Nh, Nn] = vr(Kn), pC = "SelectContentImpl", mC = lr("SelectContent
|
|
|
15026
15029
|
selectedItem: E,
|
|
15027
15030
|
onItemLeave: L,
|
|
15028
15031
|
itemTextRefCallback: Z,
|
|
15029
|
-
focusSelectedItem:
|
|
15032
|
+
focusSelectedItem: W,
|
|
15030
15033
|
selectedItemText: _,
|
|
15031
15034
|
position: r,
|
|
15032
|
-
isPositioned:
|
|
15035
|
+
isPositioned: U,
|
|
15033
15036
|
searchRef: se,
|
|
15034
15037
|
children: /* @__PURE__ */ c.jsx(us, { as: mC, allowPinchZoom: !0, children: /* @__PURE__ */ c.jsx(
|
|
15035
15038
|
as,
|
|
@@ -15075,9 +15078,9 @@ var Ut = 10, [Nh, Nn] = vr(Kn), pC = "SelectContentImpl", mC = lr("SelectContent
|
|
|
15075
15078
|
onKeyDown: ae(x.onKeyDown, (B) => {
|
|
15076
15079
|
const j = B.ctrlKey || B.altKey || B.metaKey;
|
|
15077
15080
|
if (B.key === "Tab" && B.preventDefault(), !j && B.key.length === 1 && X(B.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(B.key)) {
|
|
15078
|
-
let Q = $().filter((
|
|
15081
|
+
let Q = $().filter((ce) => !ce.disabled).map((ce) => ce.ref.current);
|
|
15079
15082
|
if (["ArrowUp", "End"].includes(B.key) && (Q = Q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(B.key)) {
|
|
15080
|
-
const
|
|
15083
|
+
const ce = B.target, ne = Q.indexOf(ce);
|
|
15081
15084
|
Q = Q.slice(ne + 1);
|
|
15082
15085
|
}
|
|
15083
15086
|
setTimeout(() => K(Q)), B.preventDefault();
|
|
@@ -15099,7 +15102,7 @@ var gC = "SelectItemAlignedPosition", _h = p.forwardRef((e, t) => {
|
|
|
15099
15102
|
if (s.trigger && s.valueNode && a && u && v && g && x) {
|
|
15100
15103
|
const k = s.trigger.getBoundingClientRect(), E = u.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), _ = x.getBoundingClientRect();
|
|
15101
15104
|
if (s.dir !== "rtl") {
|
|
15102
|
-
const
|
|
15105
|
+
const ce = _.left - E.left, ne = N.left - ce, je = k.left - ne, Ae = k.width + je, Re = Math.max(Ae, E.width), _e = window.innerWidth - Ut, ze = Ei(ne, [
|
|
15103
15106
|
Ut,
|
|
15104
15107
|
// Prevents the content from going off the starting edge of the
|
|
15105
15108
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -15110,29 +15113,29 @@ var gC = "SelectItemAlignedPosition", _h = p.forwardRef((e, t) => {
|
|
|
15110
15113
|
]);
|
|
15111
15114
|
a.style.minWidth = Ae + "px", a.style.left = ze + "px";
|
|
15112
15115
|
} else {
|
|
15113
|
-
const
|
|
15116
|
+
const ce = E.right - _.right, ne = window.innerWidth - N.right - ce, je = window.innerWidth - k.right - ne, Ae = k.width + je, Re = Math.max(Ae, E.width), _e = window.innerWidth - Ut, ze = Ei(ne, [
|
|
15114
15117
|
Ut,
|
|
15115
15118
|
Math.max(Ut, _e - Re)
|
|
15116
15119
|
]);
|
|
15117
15120
|
a.style.minWidth = Ae + "px", a.style.right = ze + "px";
|
|
15118
15121
|
}
|
|
15119
|
-
const I = h(), $ = window.innerHeight - Ut * 2,
|
|
15122
|
+
const I = h(), $ = window.innerHeight - Ut * 2, U = v.scrollHeight, P = window.getComputedStyle(u), G = parseInt(P.borderTopWidth, 10), K = parseInt(P.paddingTop, 10), W = parseInt(P.borderBottomWidth, 10), D = parseInt(P.paddingBottom, 10), M = G + K + U + D + W, se = Math.min(g.offsetHeight * 5, M), X = window.getComputedStyle(v), te = parseInt(X.paddingTop, 10), L = parseInt(X.paddingBottom, 10), Z = k.top + k.height / 2 - Ut, le = $ - Z, de = g.offsetHeight / 2, B = g.offsetTop + de, j = G + K + B, Y = M - j;
|
|
15120
15123
|
if (j <= Z) {
|
|
15121
|
-
const
|
|
15124
|
+
const ce = I.length > 0 && g === I[I.length - 1].ref.current;
|
|
15122
15125
|
a.style.bottom = "0px";
|
|
15123
15126
|
const ne = u.clientHeight - v.offsetTop - v.offsetHeight, je = Math.max(
|
|
15124
15127
|
le,
|
|
15125
15128
|
de + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
15126
|
-
(
|
|
15129
|
+
(ce ? L : 0) + ne + W
|
|
15127
15130
|
), Ae = j + je;
|
|
15128
15131
|
a.style.height = Ae + "px";
|
|
15129
15132
|
} else {
|
|
15130
|
-
const
|
|
15133
|
+
const ce = I.length > 0 && g === I[0].ref.current;
|
|
15131
15134
|
a.style.top = "0px";
|
|
15132
15135
|
const je = Math.max(
|
|
15133
15136
|
Z,
|
|
15134
15137
|
G + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
15135
|
-
(
|
|
15138
|
+
(ce ? te : 0) + de
|
|
15136
15139
|
) + Y;
|
|
15137
15140
|
a.style.height = je + "px", v.scrollTop = j - Z + v.offsetTop;
|
|
15138
15141
|
}
|
|
@@ -15199,7 +15202,7 @@ var gC = "SelectItemAlignedPosition", _h = p.forwardRef((e, t) => {
|
|
|
15199
15202
|
);
|
|
15200
15203
|
});
|
|
15201
15204
|
_h.displayName = gC;
|
|
15202
|
-
var xC = "SelectPopperPosition",
|
|
15205
|
+
var xC = "SelectPopperPosition", Ii = p.forwardRef((e, t) => {
|
|
15203
15206
|
const {
|
|
15204
15207
|
__scopeSelect: n,
|
|
15205
15208
|
align: r = "start",
|
|
@@ -15227,10 +15230,10 @@ var xC = "SelectPopperPosition", Ni = p.forwardRef((e, t) => {
|
|
|
15227
15230
|
}
|
|
15228
15231
|
);
|
|
15229
15232
|
});
|
|
15230
|
-
|
|
15231
|
-
var [vC,
|
|
15233
|
+
Ii.displayName = xC;
|
|
15234
|
+
var [vC, _a] = vr(Kn, {}), Ni = "SelectViewport", jh = p.forwardRef(
|
|
15232
15235
|
(e, t) => {
|
|
15233
|
-
const { __scopeSelect: n, nonce: r, ...o } = e, s = Nn(
|
|
15236
|
+
const { __scopeSelect: n, nonce: r, ...o } = e, s = Nn(Ni, n), i = _a(Ni, n), a = Me(t, s.onViewportChange), l = p.useRef(0);
|
|
15234
15237
|
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
15235
15238
|
/* @__PURE__ */ c.jsx(
|
|
15236
15239
|
"style",
|
|
@@ -15280,7 +15283,7 @@ var [vC, ja] = vr(Kn, {}), Ai = "SelectViewport", jh = p.forwardRef(
|
|
|
15280
15283
|
] });
|
|
15281
15284
|
}
|
|
15282
15285
|
);
|
|
15283
|
-
jh.displayName =
|
|
15286
|
+
jh.displayName = Ni;
|
|
15284
15287
|
var Ph = "SelectGroup", [wC, bC] = vr(Ph), yC = p.forwardRef(
|
|
15285
15288
|
(e, t) => {
|
|
15286
15289
|
const { __scopeSelect: n, ...r } = e, o = sn();
|
|
@@ -15407,8 +15410,8 @@ var Fh = "SelectItemIndicator", zh = p.forwardRef(
|
|
|
15407
15410
|
}
|
|
15408
15411
|
);
|
|
15409
15412
|
zh.displayName = Fh;
|
|
15410
|
-
var
|
|
15411
|
-
const n = Nn(
|
|
15413
|
+
var Ai = "SelectScrollUpButton", Bh = p.forwardRef((e, t) => {
|
|
15414
|
+
const n = Nn(Ai, e.__scopeSelect), r = _a(Ai, e.__scopeSelect), [o, s] = p.useState(!1), i = Me(t, r.onScrollButtonChange);
|
|
15412
15415
|
return dt(() => {
|
|
15413
15416
|
if (n.viewport && n.isPositioned) {
|
|
15414
15417
|
let a = function() {
|
|
@@ -15430,9 +15433,9 @@ var _i = "SelectScrollUpButton", Bh = p.forwardRef((e, t) => {
|
|
|
15430
15433
|
}
|
|
15431
15434
|
) : null;
|
|
15432
15435
|
});
|
|
15433
|
-
Bh.displayName =
|
|
15434
|
-
var
|
|
15435
|
-
const n = Nn(
|
|
15436
|
+
Bh.displayName = Ai;
|
|
15437
|
+
var _i = "SelectScrollDownButton", Hh = p.forwardRef((e, t) => {
|
|
15438
|
+
const n = Nn(_i, e.__scopeSelect), r = _a(_i, e.__scopeSelect), [o, s] = p.useState(!1), i = Me(t, r.onScrollButtonChange);
|
|
15436
15439
|
return dt(() => {
|
|
15437
15440
|
if (n.viewport && n.isPositioned) {
|
|
15438
15441
|
let a = function() {
|
|
@@ -15454,7 +15457,7 @@ var ji = "SelectScrollDownButton", Hh = p.forwardRef((e, t) => {
|
|
|
15454
15457
|
}
|
|
15455
15458
|
) : null;
|
|
15456
15459
|
});
|
|
15457
|
-
Hh.displayName =
|
|
15460
|
+
Hh.displayName = _i;
|
|
15458
15461
|
var Uh = p.forwardRef((e, t) => {
|
|
15459
15462
|
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = Nn("SelectScrollButton", n), i = p.useRef(null), a = Es(n), l = p.useCallback(() => {
|
|
15460
15463
|
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
@@ -15489,13 +15492,13 @@ var Uh = p.forwardRef((e, t) => {
|
|
|
15489
15492
|
}
|
|
15490
15493
|
);
|
|
15491
15494
|
Wh.displayName = CC;
|
|
15492
|
-
var
|
|
15495
|
+
var ji = "SelectArrow", TC = p.forwardRef(
|
|
15493
15496
|
(e, t) => {
|
|
15494
|
-
const { __scopeSelect: n, ...r } = e, o = Is(n), s = In(
|
|
15497
|
+
const { __scopeSelect: n, ...r } = e, o = Is(n), s = In(ji, n), i = Nn(ji, n);
|
|
15495
15498
|
return s.open && i.position === "popper" ? /* @__PURE__ */ c.jsx(Vd, { ...o, ...r, ref: t }) : null;
|
|
15496
15499
|
}
|
|
15497
15500
|
);
|
|
15498
|
-
TC.displayName =
|
|
15501
|
+
TC.displayName = ji;
|
|
15499
15502
|
var RC = "SelectBubbleInput", Vh = p.forwardRef(
|
|
15500
15503
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
15501
15504
|
const o = p.useRef(null), s = Me(r, o), i = hh(t);
|
|
@@ -15552,7 +15555,7 @@ function kC(e, t) {
|
|
|
15552
15555
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
15553
15556
|
}
|
|
15554
15557
|
var EC = yh, Yh = Ch, IC = Rh, NC = kh, AC = Eh, Xh = Ih, _C = jh, Jh = Mh, Zh = Lh, jC = $h, PC = zh, Qh = Bh, ep = Hh, tp = Wh;
|
|
15555
|
-
const hc = EC, pc = IC,
|
|
15558
|
+
const hc = EC, pc = IC, Pi = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
|
|
15556
15559
|
Yh,
|
|
15557
15560
|
{
|
|
15558
15561
|
ref: r,
|
|
@@ -15567,7 +15570,7 @@ const hc = EC, pc = IC, Oi = p.forwardRef(({ className: e, children: t, ...n },
|
|
|
15567
15570
|
]
|
|
15568
15571
|
}
|
|
15569
15572
|
));
|
|
15570
|
-
|
|
15573
|
+
Pi.displayName = Yh.displayName;
|
|
15571
15574
|
const np = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
15572
15575
|
Qh,
|
|
15573
15576
|
{
|
|
@@ -15594,7 +15597,7 @@ const rp = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15594
15597
|
}
|
|
15595
15598
|
));
|
|
15596
15599
|
rp.displayName = ep.displayName;
|
|
15597
|
-
const
|
|
15600
|
+
const Oi = p.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c.jsx(AC, { children: /* @__PURE__ */ c.jsxs(
|
|
15598
15601
|
Xh,
|
|
15599
15602
|
{
|
|
15600
15603
|
ref: o,
|
|
@@ -15621,7 +15624,7 @@ const Mi = p.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
15621
15624
|
]
|
|
15622
15625
|
}
|
|
15623
15626
|
) }));
|
|
15624
|
-
|
|
15627
|
+
Oi.displayName = Xh.displayName;
|
|
15625
15628
|
const OC = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
15626
15629
|
Jh,
|
|
15627
15630
|
{
|
|
@@ -15641,7 +15644,7 @@ const On = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
15641
15644
|
),
|
|
15642
15645
|
...n,
|
|
15643
15646
|
children: [
|
|
15644
|
-
/* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c.jsx(PC, { children: /* @__PURE__ */ c.jsx(
|
|
15647
|
+
/* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c.jsx(PC, { children: /* @__PURE__ */ c.jsx(Mi, { className: "h-4 w-4" }) }) }),
|
|
15645
15648
|
/* @__PURE__ */ c.jsx(jC, { children: t })
|
|
15646
15649
|
]
|
|
15647
15650
|
}
|
|
@@ -15841,7 +15844,7 @@ const VC = {
|
|
|
15841
15844
|
}
|
|
15842
15845
|
};
|
|
15843
15846
|
function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
15844
|
-
const [r, o] = xe(!1), [s, i] = xe(!1), [a, l] = xe(e), [u, d] = xe(!1), { toast: f } =
|
|
15847
|
+
const [r, o] = xe(!1), [s, i] = xe(!1), [a, l] = xe(e), [u, d] = xe(!1), { toast: f } = oa();
|
|
15845
15848
|
at(() => {
|
|
15846
15849
|
const g = JSON.stringify(a) !== JSON.stringify(e);
|
|
15847
15850
|
d(g);
|
|
@@ -15879,7 +15882,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15879
15882
|
/* @__PURE__ */ c.jsx(HC, { asChild: !0, children: /* @__PURE__ */ c.jsxs(He, { variant: "outline", size: "sm", className: n, children: [
|
|
15880
15883
|
/* @__PURE__ */ c.jsx(zp, { className: "h-4 w-4 mr-2" }),
|
|
15881
15884
|
"Settings",
|
|
15882
|
-
u && /* @__PURE__ */ c.jsx(
|
|
15885
|
+
u && /* @__PURE__ */ c.jsx(xi, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
|
|
15883
15886
|
] }) }),
|
|
15884
15887
|
/* @__PURE__ */ c.jsxs(lp, { className: "w-[500px] sm:w-[600px] overflow-y-auto", children: [
|
|
15885
15888
|
/* @__PURE__ */ c.jsxs(cp, { children: [
|
|
@@ -15971,8 +15974,8 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15971
15974
|
ui: { ...x.ui, layout: g }
|
|
15972
15975
|
})),
|
|
15973
15976
|
children: [
|
|
15974
|
-
/* @__PURE__ */ c.jsx(
|
|
15975
|
-
/* @__PURE__ */ c.jsxs(
|
|
15977
|
+
/* @__PURE__ */ c.jsx(Pi, { children: /* @__PURE__ */ c.jsx(pc, {}) }),
|
|
15978
|
+
/* @__PURE__ */ c.jsxs(Oi, { children: [
|
|
15976
15979
|
/* @__PURE__ */ c.jsx(On, { value: "sidebar", children: "Sidebar Layout" }),
|
|
15977
15980
|
/* @__PURE__ */ c.jsx(On, { value: "fullscreen", children: "Fullscreen" }),
|
|
15978
15981
|
/* @__PURE__ */ c.jsx(On, { value: "tabs", children: "Tabbed Interface" })
|
|
@@ -15992,8 +15995,8 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15992
15995
|
ui: { ...x.ui, theme: g }
|
|
15993
15996
|
})),
|
|
15994
15997
|
children: [
|
|
15995
|
-
/* @__PURE__ */ c.jsx(
|
|
15996
|
-
/* @__PURE__ */ c.jsxs(
|
|
15998
|
+
/* @__PURE__ */ c.jsx(Pi, { children: /* @__PURE__ */ c.jsx(pc, {}) }),
|
|
15999
|
+
/* @__PURE__ */ c.jsxs(Oi, { children: [
|
|
15997
16000
|
/* @__PURE__ */ c.jsx(On, { value: "light", children: "Light" }),
|
|
15998
16001
|
/* @__PURE__ */ c.jsx(On, { value: "dark", children: "Dark" }),
|
|
15999
16002
|
/* @__PURE__ */ c.jsx(On, { value: "system", children: "System" })
|
|
@@ -16221,7 +16224,7 @@ export {
|
|
|
16221
16224
|
Ig as post,
|
|
16222
16225
|
Ng as put,
|
|
16223
16226
|
sl as setChatToken,
|
|
16224
|
-
|
|
16227
|
+
Fi as useChat,
|
|
16225
16228
|
jg as useChatStream,
|
|
16226
16229
|
Lg as useMessagesReducer
|
|
16227
16230
|
};
|