@college-africa/chat-ui 1.2.5 → 1.2.6
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.js +2 -2
- package/dist/index.mjs +702 -671
- package/dist/summaries-COWjz8PE.cjs +11 -0
- package/dist/{summaries-BKYNtoGV.js → summaries-D8HQzaBl.js} +1801 -1796
- package/dist/utils/sdk.d.ts +4 -5
- package/package.json +1 -1
- package/dist/summaries-BQNGfAwW.cjs +0 -11
package/dist/index.mjs
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, s as p, t as m, u as h } from "./summaries-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, s as p, t as m, u as h } from "./summaries-D8HQzaBl.js";
|
|
2
2
|
import * as g from "react";
|
|
3
3
|
import _, { Children as v, Component as y, createContext as b, createElement as x, forwardRef as S, useCallback as C, useContext as ee, useEffect as w, useLayoutEffect as te, useMemo as ne, useRef as T, useState as E } from "react";
|
|
4
|
-
import { Alert as D, AlertTitle as re, AppBar as O, Autocomplete as k, Avatar as A, Badge as ie, Box as j, Button as M, Chip as ae, CircularProgress as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import
|
|
4
|
+
import { Alert as D, AlertTitle as re, AppBar as O, Autocomplete as k, Avatar as A, Badge as ie, Box as j, Button as M, Chip as ae, CircularProgress as N, Dialog as oe, DialogActions as se, DialogContent as ce, DialogTitle as le, Divider as ue, Drawer as de, FormControlLabel as fe, IconButton as P, InputAdornment as pe, List as me, ListItem as he, ListItemAvatar as ge, ListItemButton as _e, ListItemText as ve, Menu as ye, MenuItem as F, Paper as be, Select as xe, Skeleton as Se, Snackbar as Ce, Switch as we, TextField as Te, Toolbar as Ee, Tooltip as De, Typography as I } from "@mui/material";
|
|
5
|
+
import { Fragment as Oe, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
6
|
+
import ke from "@emotion/styled";
|
|
7
7
|
import "@emotion/react";
|
|
8
8
|
//#region src/utils/misc.ts
|
|
9
|
-
var
|
|
9
|
+
var Ae = (e, t) => e instanceof Error ? e : Error(t), je = () => /* @__PURE__ */ L(j, {
|
|
10
10
|
display: "flex",
|
|
11
11
|
justifyContent: "center",
|
|
12
12
|
alignItems: "center",
|
|
13
13
|
height: "100vh",
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
-
}),
|
|
14
|
+
children: /* @__PURE__ */ L(N, {})
|
|
15
|
+
}), Me = ({ error: e, retry: t }) => /* @__PURE__ */ L(j, {
|
|
16
16
|
display: "flex",
|
|
17
17
|
justifyContent: "center",
|
|
18
18
|
alignItems: "center",
|
|
19
19
|
height: "100vh",
|
|
20
20
|
p: 2,
|
|
21
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ R(D, {
|
|
22
22
|
severity: "error",
|
|
23
|
-
action: /* @__PURE__ */
|
|
23
|
+
action: /* @__PURE__ */ L(M, {
|
|
24
24
|
onClick: t,
|
|
25
25
|
children: " Retry"
|
|
26
26
|
}),
|
|
27
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ L(re, { children: "Failed to initialize chat" }), e.message]
|
|
28
28
|
})
|
|
29
|
-
}),
|
|
29
|
+
}), Ne = ({ config: e, children: t, LoadingComponent: n = je, ErrorComponent: r = Me }) => {
|
|
30
30
|
let [i, a] = E(!1), [o, c] = E(null), l = C(async () => {
|
|
31
31
|
a(!1), c(null);
|
|
32
32
|
try {
|
|
33
33
|
if (p()) return;
|
|
34
34
|
await d(e), a(!0);
|
|
35
35
|
} catch (e) {
|
|
36
|
-
c(
|
|
36
|
+
c(Ae(e, "Unknown error initializing SDK"));
|
|
37
37
|
}
|
|
38
38
|
}, [e]);
|
|
39
39
|
return w(() => (l(), () => {
|
|
40
40
|
s();
|
|
41
|
-
}), [l]), !i && !o ? /* @__PURE__ */
|
|
41
|
+
}), [l]), !i && !o ? /* @__PURE__ */ L(n, {}) : o ? /* @__PURE__ */ L(r, {
|
|
42
42
|
error: o,
|
|
43
43
|
retry: l
|
|
44
|
-
}) : /* @__PURE__ */
|
|
45
|
-
},
|
|
46
|
-
let e =
|
|
44
|
+
}) : /* @__PURE__ */ L(Oe, { children: t });
|
|
45
|
+
}, Pe = (e) => e, Fe = (() => {
|
|
46
|
+
let e = Pe;
|
|
47
47
|
return {
|
|
48
48
|
configure(t) {
|
|
49
49
|
e = t;
|
|
@@ -52,25 +52,25 @@ var je = (e, t) => e instanceof Error ? e : Error(t), Me = () => /* @__PURE__ */
|
|
|
52
52
|
return e(t);
|
|
53
53
|
},
|
|
54
54
|
reset() {
|
|
55
|
-
e =
|
|
55
|
+
e = Pe;
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
})();
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js
|
|
61
|
-
function
|
|
61
|
+
function Ie(e, ...t) {
|
|
62
62
|
let n = new URL(`https://mui.com/production-error/?code=${e}`);
|
|
63
63
|
return t.forEach((e) => n.searchParams.append("args[]", e)), `Minified MUI error #${e}; visit ${n} for the full message.`;
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region node_modules/@mui/utils/esm/capitalize/capitalize.js
|
|
67
|
-
function
|
|
68
|
-
if (typeof e != "string") throw Error(process.env.NODE_ENV === "production" ?
|
|
67
|
+
function Le(e) {
|
|
68
|
+
if (typeof e != "string") throw Error(process.env.NODE_ENV === "production" ? Ie(7) : "MUI: `capitalize(string)` expects a string argument.");
|
|
69
69
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region node_modules/@mui/material/esm/utils/capitalize.js
|
|
73
|
-
var
|
|
73
|
+
var Re = Le, ze = /* @__PURE__ */ a(((e) => {
|
|
74
74
|
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
75
75
|
function b(e) {
|
|
76
76
|
if (typeof e == "object" && e) {
|
|
@@ -126,7 +126,7 @@ var ze = Re, Be = /* @__PURE__ */ a(((e) => {
|
|
|
126
126
|
}, e.isValidElementType = function(e) {
|
|
127
127
|
return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
|
|
128
128
|
}, e.typeOf = b;
|
|
129
|
-
})),
|
|
129
|
+
})), Be = /* @__PURE__ */ a(((e) => {
|
|
130
130
|
process.env.NODE_ENV !== "production" && (function() {
|
|
131
131
|
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
132
132
|
function b(e) {
|
|
@@ -170,41 +170,41 @@ var ze = Re, Be = /* @__PURE__ */ a(((e) => {
|
|
|
170
170
|
function ae(e) {
|
|
171
171
|
return x(e) === c;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function N(e) {
|
|
174
174
|
return x(e) === s;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function oe(e) {
|
|
177
177
|
return typeof e == "object" && !!e && e.$$typeof === n;
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function se(e) {
|
|
180
180
|
return x(e) === d;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function ce(e) {
|
|
183
183
|
return x(e) === i;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function le(e) {
|
|
186
186
|
return x(e) === h;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function ue(e) {
|
|
189
189
|
return x(e) === m;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function de(e) {
|
|
192
192
|
return x(e) === r;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function fe(e) {
|
|
195
195
|
return x(e) === o;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function P(e) {
|
|
198
198
|
return x(e) === a;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function pe(e) {
|
|
201
201
|
return x(e) === f;
|
|
202
202
|
}
|
|
203
|
-
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = ee, e.ContextProvider = w, e.Element = te, e.ForwardRef = ne, e.Fragment = T, e.Lazy = E, e.Memo = D, e.Portal = re, e.Profiler = O, e.StrictMode = k, e.Suspense = A, e.isAsyncMode = j, e.isConcurrentMode = M, e.isContextConsumer = ae, e.isContextProvider =
|
|
203
|
+
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = ee, e.ContextProvider = w, e.Element = te, e.ForwardRef = ne, e.Fragment = T, e.Lazy = E, e.Memo = D, e.Portal = re, e.Profiler = O, e.StrictMode = k, e.Suspense = A, e.isAsyncMode = j, e.isConcurrentMode = M, e.isContextConsumer = ae, e.isContextProvider = N, e.isElement = oe, e.isForwardRef = se, e.isFragment = ce, e.isLazy = le, e.isMemo = ue, e.isPortal = de, e.isProfiler = fe, e.isStrictMode = P, e.isSuspense = pe, e.isValidElementType = b, e.typeOf = x;
|
|
204
204
|
})();
|
|
205
|
+
})), Ve = /* @__PURE__ */ a(((e, t) => {
|
|
206
|
+
process.env.NODE_ENV === "production" ? t.exports = ze() : t.exports = Be();
|
|
205
207
|
})), He = /* @__PURE__ */ a(((e, t) => {
|
|
206
|
-
process.env.NODE_ENV === "production" ? t.exports = Be() : t.exports = Ve();
|
|
207
|
-
})), Ue = /* @__PURE__ */ a(((e, t) => {
|
|
208
208
|
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
209
209
|
function a(e) {
|
|
210
210
|
if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
|
|
@@ -237,14 +237,14 @@ var ze = Re, Be = /* @__PURE__ */ a(((e) => {
|
|
|
237
237
|
}
|
|
238
238
|
return s;
|
|
239
239
|
};
|
|
240
|
-
})),
|
|
240
|
+
})), Ue = /* @__PURE__ */ a(((e, t) => {
|
|
241
241
|
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
242
|
-
})),
|
|
242
|
+
})), We = /* @__PURE__ */ a(((e, t) => {
|
|
243
243
|
t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
244
|
-
})),
|
|
244
|
+
})), Ge = /* @__PURE__ */ a(((e, t) => {
|
|
245
245
|
var n = function() {};
|
|
246
246
|
if (process.env.NODE_ENV !== "production") {
|
|
247
|
-
var r =
|
|
247
|
+
var r = Ue(), i = {}, a = We();
|
|
248
248
|
n = function(e) {
|
|
249
249
|
var t = "Warning: " + e;
|
|
250
250
|
typeof console < "u" && console.error(t);
|
|
@@ -277,8 +277,8 @@ var ze = Re, Be = /* @__PURE__ */ a(((e) => {
|
|
|
277
277
|
o.resetWarningCache = function() {
|
|
278
278
|
process.env.NODE_ENV !== "production" && (i = {});
|
|
279
279
|
}, t.exports = o;
|
|
280
|
-
})),
|
|
281
|
-
var n =
|
|
280
|
+
})), Ke = /* @__PURE__ */ a(((e, t) => {
|
|
281
|
+
var n = Ve(), r = He(), i = Ue(), a = We(), o = Ge(), s = function() {};
|
|
282
282
|
process.env.NODE_ENV !== "production" && (s = function(e) {
|
|
283
283
|
var t = "Warning: " + e;
|
|
284
284
|
typeof console < "u" && console.error(t);
|
|
@@ -536,8 +536,8 @@ var ze = Re, Be = /* @__PURE__ */ a(((e) => {
|
|
|
536
536
|
}
|
|
537
537
|
return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
|
|
538
538
|
};
|
|
539
|
-
})),
|
|
540
|
-
var n =
|
|
539
|
+
})), qe = /* @__PURE__ */ a(((e, t) => {
|
|
540
|
+
var n = Ue();
|
|
541
541
|
function r() {}
|
|
542
542
|
function i() {}
|
|
543
543
|
i.resetWarningCache = r, t.exports = function() {
|
|
@@ -576,30 +576,30 @@ var ze = Re, Be = /* @__PURE__ */ a(((e) => {
|
|
|
576
576
|
};
|
|
577
577
|
return a.PropTypes = a, a;
|
|
578
578
|
};
|
|
579
|
-
})),
|
|
579
|
+
})), Je = /* @__PURE__ */ a(((e, t) => {
|
|
580
580
|
if (process.env.NODE_ENV !== "production") {
|
|
581
|
-
var n =
|
|
582
|
-
t.exports =
|
|
583
|
-
} else t.exports =
|
|
581
|
+
var n = Ve();
|
|
582
|
+
t.exports = Ke()(n.isElement, !0);
|
|
583
|
+
} else t.exports = qe()();
|
|
584
584
|
}));
|
|
585
585
|
//#endregion
|
|
586
586
|
//#region ../../node_modules/clsx/dist/clsx.mjs
|
|
587
|
-
function
|
|
587
|
+
function Ye(e) {
|
|
588
588
|
var t, n, r = "";
|
|
589
589
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
590
590
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
591
591
|
var i = e.length;
|
|
592
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
592
|
+
for (t = 0; t < i; t++) e[t] && (n = Ye(e[t])) && (r && (r += " "), r += n);
|
|
593
593
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
594
594
|
return r;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
596
|
+
function Xe() {
|
|
597
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Ye(e)) && (r && (r += " "), r += t);
|
|
598
598
|
return r;
|
|
599
599
|
}
|
|
600
600
|
//#endregion
|
|
601
601
|
//#region node_modules/@mui/utils/esm/composeClasses/composeClasses.js
|
|
602
|
-
function
|
|
602
|
+
function Ze(e, t, n = void 0) {
|
|
603
603
|
let r = {};
|
|
604
604
|
for (let i in e) {
|
|
605
605
|
let a = e[i], o = "", s = !0;
|
|
@@ -613,7 +613,7 @@ function Qe(e, t, n = void 0) {
|
|
|
613
613
|
}
|
|
614
614
|
//#endregion
|
|
615
615
|
//#region node_modules/react-is/cjs/react-is.production.js
|
|
616
|
-
var
|
|
616
|
+
var Qe = /* @__PURE__ */ a(((e) => {
|
|
617
617
|
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.consumer"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), p = Symbol.for("react.view_transition"), m = Symbol.for("react.client.reference");
|
|
618
618
|
function h(e) {
|
|
619
619
|
if (typeof e == "object" && e) {
|
|
@@ -666,7 +666,7 @@ var $e = /* @__PURE__ */ a(((e) => {
|
|
|
666
666
|
}, e.isValidElementType = function(e) {
|
|
667
667
|
return !!(typeof e == "string" || typeof e == "function" || e === r || e === a || e === i || e === l || e === u || typeof e == "object" && e && (e.$$typeof === f || e.$$typeof === d || e.$$typeof === s || e.$$typeof === o || e.$$typeof === c || e.$$typeof === m || e.getModuleId !== void 0));
|
|
668
668
|
}, e.typeOf = h;
|
|
669
|
-
})),
|
|
669
|
+
})), $e = /* @__PURE__ */ a(((e) => {
|
|
670
670
|
process.env.NODE_ENV !== "production" && (function() {
|
|
671
671
|
function t(e) {
|
|
672
672
|
if (typeof e == "object" && e) {
|
|
@@ -721,43 +721,43 @@ var $e = /* @__PURE__ */ a(((e) => {
|
|
|
721
721
|
return !!(typeof e == "string" || typeof e == "function" || e === i || e === o || e === a || e === u || e === d || typeof e == "object" && e && (e.$$typeof === p || e.$$typeof === f || e.$$typeof === c || e.$$typeof === s || e.$$typeof === l || e.$$typeof === h || e.getModuleId !== void 0));
|
|
722
722
|
}, e.typeOf = t;
|
|
723
723
|
})();
|
|
724
|
-
})),
|
|
725
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
724
|
+
})), et = (/* @__PURE__ */ a(((e, t) => {
|
|
725
|
+
process.env.NODE_ENV === "production" ? t.exports = Qe() : t.exports = $e();
|
|
726
726
|
})))();
|
|
727
|
-
function
|
|
727
|
+
function tt(e) {
|
|
728
728
|
if (typeof e != "object" || !e) return !1;
|
|
729
729
|
let t = Object.getPrototypeOf(e);
|
|
730
730
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
731
731
|
}
|
|
732
|
-
function
|
|
733
|
-
if (/* @__PURE__ */ g.isValidElement(e) || (0,
|
|
732
|
+
function nt(e) {
|
|
733
|
+
if (/* @__PURE__ */ g.isValidElement(e) || (0, et.isValidElementType)(e) || !tt(e)) return e;
|
|
734
734
|
let t = {};
|
|
735
735
|
return Object.keys(e).forEach((n) => {
|
|
736
|
-
t[n] =
|
|
736
|
+
t[n] = nt(e[n]);
|
|
737
737
|
}), t;
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function z(e, t, n = { clone: !0 }) {
|
|
740
740
|
let r = n.clone ? { ...e } : e;
|
|
741
|
-
return
|
|
742
|
-
/* @__PURE__ */ g.isValidElement(t[i]) || (0,
|
|
741
|
+
return tt(e) && tt(t) && Object.keys(t).forEach((i) => {
|
|
742
|
+
/* @__PURE__ */ g.isValidElement(t[i]) || (0, et.isValidElementType)(t[i]) ? r[i] = t[i] : tt(t[i]) && Object.prototype.hasOwnProperty.call(e, i) && tt(e[i]) ? r[i] = z(e[i], t[i], n) : n.clone ? r[i] = tt(t[i]) ? nt(t[i]) : t[i] : r[i] = t[i];
|
|
743
743
|
}), r;
|
|
744
744
|
}
|
|
745
745
|
//#endregion
|
|
746
746
|
//#region node_modules/@mui/system/esm/merge/merge.js
|
|
747
|
-
function
|
|
748
|
-
return t ?
|
|
747
|
+
function rt(e, t) {
|
|
748
|
+
return t ? z(e, t, { clone: !1 }) : e;
|
|
749
749
|
}
|
|
750
750
|
//#endregion
|
|
751
751
|
//#region node_modules/@mui/system/esm/responsivePropType/responsivePropType.js
|
|
752
|
-
var
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
752
|
+
var B = /* @__PURE__ */ e(Je()), it = process.env.NODE_ENV === "production" ? {} : B.default.oneOfType([
|
|
753
|
+
B.default.number,
|
|
754
|
+
B.default.string,
|
|
755
|
+
B.default.object,
|
|
756
|
+
B.default.array
|
|
757
757
|
]);
|
|
758
758
|
//#endregion
|
|
759
759
|
//#region node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js
|
|
760
|
-
function
|
|
760
|
+
function at(e, t) {
|
|
761
761
|
if (!e.containerQueries) return t;
|
|
762
762
|
let n = Object.keys(t).filter((e) => e.startsWith("@container")).sort((e, t) => {
|
|
763
763
|
let n = /min-width:\s*([0-9.]+)/;
|
|
@@ -768,10 +768,10 @@ function ot(e, t) {
|
|
|
768
768
|
return delete e[n], e[n] = r, e;
|
|
769
769
|
}, { ...t }) : t;
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function ot(e, t) {
|
|
772
772
|
return t === "@" || t.startsWith("@") && (e.some((e) => t.startsWith(`@${e}`)) || !!t.match(/^@\d/));
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function st(e, t) {
|
|
775
775
|
let n = t.match(/^@([^/]+)?\/?(.+)?$/);
|
|
776
776
|
if (!n) {
|
|
777
777
|
if (process.env.NODE_ENV !== "production") throw Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);
|
|
@@ -780,7 +780,7 @@ function ct(e, t) {
|
|
|
780
780
|
let [, r, i] = n, a = Number.isNaN(+r) ? r || 0 : +r;
|
|
781
781
|
return e.containerQueries(i).up(a);
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function ct(e) {
|
|
784
784
|
let t = (e, t) => e.replace("@media", t ? `@container ${t}` : "@container");
|
|
785
785
|
function n(n, r) {
|
|
786
786
|
n.up = (...n) => t(e.breakpoints.up(...n), r), n.down = (...n) => t(e.breakpoints.down(...n), r), n.between = (...n) => t(e.breakpoints.between(...n), r), n.only = (...n) => t(e.breakpoints.only(...n), r), n.not = (...n) => {
|
|
@@ -796,13 +796,13 @@ function lt(e) {
|
|
|
796
796
|
}
|
|
797
797
|
//#endregion
|
|
798
798
|
//#region node_modules/@mui/system/esm/breakpoints/breakpoints.js
|
|
799
|
-
var
|
|
799
|
+
var lt = {
|
|
800
800
|
xs: 0,
|
|
801
801
|
sm: 600,
|
|
802
802
|
md: 900,
|
|
803
803
|
lg: 1200,
|
|
804
804
|
xl: 1536
|
|
805
|
-
},
|
|
805
|
+
}, ut = {
|
|
806
806
|
keys: [
|
|
807
807
|
"xs",
|
|
808
808
|
"sm",
|
|
@@ -810,24 +810,24 @@ var ut = {
|
|
|
810
810
|
"lg",
|
|
811
811
|
"xl"
|
|
812
812
|
],
|
|
813
|
-
up: (e) => `@media (min-width:${
|
|
814
|
-
},
|
|
815
|
-
let n = typeof t == "number" ? t :
|
|
813
|
+
up: (e) => `@media (min-width:${lt[e]}px)`
|
|
814
|
+
}, dt = { containerQueries: (e) => ({ up: (t) => {
|
|
815
|
+
let n = typeof t == "number" ? t : lt[t] || t;
|
|
816
816
|
return typeof n == "number" && (n = `${n}px`), e ? `@container ${e} (min-width:${n})` : `@container (min-width:${n})`;
|
|
817
817
|
} }) };
|
|
818
|
-
function
|
|
818
|
+
function ft(e, t, n) {
|
|
819
819
|
let r = e.theme || {};
|
|
820
820
|
if (Array.isArray(t)) {
|
|
821
|
-
let e = r.breakpoints ||
|
|
821
|
+
let e = r.breakpoints || ut;
|
|
822
822
|
return t.reduce((r, i, a) => (r[e.up(e.keys[a])] = n(t[a]), r), {});
|
|
823
823
|
}
|
|
824
824
|
if (typeof t == "object") {
|
|
825
|
-
let e = r.breakpoints ||
|
|
825
|
+
let e = r.breakpoints || ut;
|
|
826
826
|
return Object.keys(t).reduce((i, a) => {
|
|
827
|
-
if (
|
|
828
|
-
let e =
|
|
827
|
+
if (ot(e.keys, a)) {
|
|
828
|
+
let e = st(r.containerQueries ? r : dt, a);
|
|
829
829
|
e && (i[e] = n(t[a], a));
|
|
830
|
-
} else if (Object.keys(e.values ||
|
|
830
|
+
} else if (Object.keys(e.values || lt).includes(a)) {
|
|
831
831
|
let r = e.up(a);
|
|
832
832
|
i[r] = n(t[a], a);
|
|
833
833
|
} else {
|
|
@@ -839,13 +839,13 @@ function pt(e, t, n) {
|
|
|
839
839
|
}
|
|
840
840
|
return n(t);
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function pt(e = {}) {
|
|
843
843
|
return e.keys?.reduce((t, n) => {
|
|
844
844
|
let r = e.up(n);
|
|
845
845
|
return t[r] = {}, t;
|
|
846
846
|
}, {}) || {};
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function mt(e, t) {
|
|
849
849
|
return e.reduce((e, t) => {
|
|
850
850
|
let n = e[t];
|
|
851
851
|
return (!n || Object.keys(n).length === 0) && delete e[t], e;
|
|
@@ -853,7 +853,7 @@ function ht(e, t) {
|
|
|
853
853
|
}
|
|
854
854
|
//#endregion
|
|
855
855
|
//#region node_modules/@mui/system/esm/style/style.js
|
|
856
|
-
function
|
|
856
|
+
function ht(e, t, n = !0) {
|
|
857
857
|
if (!t || typeof t != "string") return null;
|
|
858
858
|
if (e && e.vars && n) {
|
|
859
859
|
let n = `vars.${t}`.split(".").reduce((e, t) => e && e[t] ? e[t] : null, e);
|
|
@@ -861,50 +861,50 @@ function gt(e, t, n = !0) {
|
|
|
861
861
|
}
|
|
862
862
|
return t.split(".").reduce((e, t) => e && e[t] != null ? e[t] : null, e);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function gt(e, t, n, r = n) {
|
|
865
865
|
let i;
|
|
866
|
-
return i = typeof e == "function" ? e(n) : Array.isArray(e) ? e[n] || r :
|
|
866
|
+
return i = typeof e == "function" ? e(n) : Array.isArray(e) ? e[n] || r : ht(e, n) || r, t && (i = t(i, r, e)), i;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function V(e) {
|
|
869
869
|
let { prop: t, cssProperty: n = e.prop, themeKey: r, transform: i } = e, a = (e) => {
|
|
870
870
|
if (e[t] == null) return null;
|
|
871
|
-
let a = e[t], o = e.theme, s =
|
|
872
|
-
return
|
|
873
|
-
let r =
|
|
874
|
-
return e === r && typeof e == "string" && (r =
|
|
871
|
+
let a = e[t], o = e.theme, s = ht(o, r) || {};
|
|
872
|
+
return ft(e, a, (e) => {
|
|
873
|
+
let r = gt(s, i, e);
|
|
874
|
+
return e === r && typeof e == "string" && (r = gt(s, i, `${t}${e === "default" ? "" : Le(e)}`, e)), n === !1 ? r : { [n]: r };
|
|
875
875
|
});
|
|
876
876
|
};
|
|
877
|
-
return a.propTypes = process.env.NODE_ENV === "production" ? {} : { [t]:
|
|
877
|
+
return a.propTypes = process.env.NODE_ENV === "production" ? {} : { [t]: it }, a.filterProps = [t], a;
|
|
878
878
|
}
|
|
879
879
|
//#endregion
|
|
880
880
|
//#region node_modules/@mui/system/esm/memoize/memoize.js
|
|
881
|
-
function
|
|
881
|
+
function _t(e) {
|
|
882
882
|
let t = {};
|
|
883
883
|
return (n) => (t[n] === void 0 && (t[n] = e(n)), t[n]);
|
|
884
884
|
}
|
|
885
885
|
//#endregion
|
|
886
886
|
//#region node_modules/@mui/system/esm/spacing/spacing.js
|
|
887
|
-
var
|
|
887
|
+
var vt = {
|
|
888
888
|
m: "margin",
|
|
889
889
|
p: "padding"
|
|
890
|
-
},
|
|
890
|
+
}, yt = {
|
|
891
891
|
t: "Top",
|
|
892
892
|
r: "Right",
|
|
893
893
|
b: "Bottom",
|
|
894
894
|
l: "Left",
|
|
895
895
|
x: ["Left", "Right"],
|
|
896
896
|
y: ["Top", "Bottom"]
|
|
897
|
-
},
|
|
897
|
+
}, bt = {
|
|
898
898
|
marginX: "mx",
|
|
899
899
|
marginY: "my",
|
|
900
900
|
paddingX: "px",
|
|
901
901
|
paddingY: "py"
|
|
902
|
-
},
|
|
903
|
-
if (e.length > 2) if (
|
|
902
|
+
}, xt = _t((e) => {
|
|
903
|
+
if (e.length > 2) if (bt[e]) e = bt[e];
|
|
904
904
|
else return [e];
|
|
905
|
-
let [t, n] = e.split(""), r =
|
|
905
|
+
let [t, n] = e.split(""), r = vt[t], i = yt[n] || "";
|
|
906
906
|
return Array.isArray(i) ? i.map((e) => r + e) : [r + i];
|
|
907
|
-
}),
|
|
907
|
+
}), St = [
|
|
908
908
|
"m",
|
|
909
909
|
"mt",
|
|
910
910
|
"mr",
|
|
@@ -925,7 +925,7 @@ var yt = {
|
|
|
925
925
|
"marginBlock",
|
|
926
926
|
"marginBlockStart",
|
|
927
927
|
"marginBlockEnd"
|
|
928
|
-
],
|
|
928
|
+
], Ct = [
|
|
929
929
|
"p",
|
|
930
930
|
"pt",
|
|
931
931
|
"pr",
|
|
@@ -946,9 +946,9 @@ var yt = {
|
|
|
946
946
|
"paddingBlock",
|
|
947
947
|
"paddingBlockStart",
|
|
948
948
|
"paddingBlockEnd"
|
|
949
|
-
],
|
|
950
|
-
function
|
|
951
|
-
let i =
|
|
949
|
+
], wt = [...St, ...Ct];
|
|
950
|
+
function Tt(e, t, n, r) {
|
|
951
|
+
let i = ht(e, t, !0) ?? n;
|
|
952
952
|
return typeof i == "number" || typeof i == "string" ? (e) => typeof e == "string" ? e : (process.env.NODE_ENV !== "production" && typeof e != "number" && console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`), typeof i == "string" ? i.startsWith("var(") && e === 0 ? 0 : i.startsWith("var(") && e === 1 ? i : `calc(${e} * ${i})` : i * e) : Array.isArray(i) ? (e) => {
|
|
953
953
|
if (typeof e == "string") return e;
|
|
954
954
|
let n = Math.abs(e);
|
|
@@ -961,166 +961,166 @@ function Et(e, t, n, r) {
|
|
|
961
961
|
return e >= 0 ? r : typeof r == "number" ? -r : typeof r == "string" && r.startsWith("var(") ? `calc(-1 * ${r})` : `-${r}`;
|
|
962
962
|
} : typeof i == "function" ? i : (process.env.NODE_ENV !== "production" && console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`, "It should be a number, an array or a function."].join("\n")), () => void 0);
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
return
|
|
964
|
+
function Et(e) {
|
|
965
|
+
return Tt(e, "spacing", 8, "spacing");
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function Dt(e, t) {
|
|
968
968
|
return typeof t == "string" || t == null ? t : e(t);
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
return (n) => e.reduce((e, r) => (e[r] =
|
|
970
|
+
function Ot(e, t) {
|
|
971
|
+
return (n) => e.reduce((e, r) => (e[r] = Dt(t, n), e), {});
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function kt(e, t, n, r) {
|
|
974
974
|
if (!t.includes(n)) return null;
|
|
975
|
-
let i =
|
|
976
|
-
return
|
|
975
|
+
let i = Ot(xt(n), r), a = e[n];
|
|
976
|
+
return ft(e, a, i);
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
let n =
|
|
980
|
-
return Object.keys(e).map((r) =>
|
|
981
|
-
}
|
|
982
|
-
function V(e) {
|
|
983
|
-
return jt(e, Ct);
|
|
978
|
+
function At(e, t) {
|
|
979
|
+
let n = Et(e.theme);
|
|
980
|
+
return Object.keys(e).map((r) => kt(e, t, r, n)).reduce(rt, {});
|
|
984
981
|
}
|
|
985
|
-
V.propTypes = process.env.NODE_ENV === "production" ? {} : Ct.reduce((e, t) => (e[t] = at, e), {}), V.filterProps = Ct;
|
|
986
982
|
function H(e) {
|
|
987
|
-
return
|
|
983
|
+
return At(e, St);
|
|
988
984
|
}
|
|
989
|
-
H.propTypes = process.env.NODE_ENV === "production" ? {} :
|
|
990
|
-
function
|
|
991
|
-
return
|
|
985
|
+
H.propTypes = process.env.NODE_ENV === "production" ? {} : St.reduce((e, t) => (e[t] = it, e), {}), H.filterProps = St;
|
|
986
|
+
function U(e) {
|
|
987
|
+
return At(e, Ct);
|
|
988
|
+
}
|
|
989
|
+
U.propTypes = process.env.NODE_ENV === "production" ? {} : Ct.reduce((e, t) => (e[t] = it, e), {}), U.filterProps = Ct;
|
|
990
|
+
function jt(e) {
|
|
991
|
+
return At(e, wt);
|
|
992
992
|
}
|
|
993
|
-
|
|
993
|
+
jt.propTypes = process.env.NODE_ENV === "production" ? {} : wt.reduce((e, t) => (e[t] = it, e), {}), jt.filterProps = wt;
|
|
994
994
|
//#endregion
|
|
995
995
|
//#region node_modules/@mui/system/esm/compose/compose.js
|
|
996
|
-
function
|
|
996
|
+
function Mt(...e) {
|
|
997
997
|
let t = e.reduce((e, t) => (t.filterProps.forEach((n) => {
|
|
998
998
|
e[n] = t;
|
|
999
|
-
}), e), {}), n = (e) => Object.keys(e).reduce((n, r) => t[r] ?
|
|
999
|
+
}), e), {}), n = (e) => Object.keys(e).reduce((n, r) => t[r] ? rt(n, t[r](e)) : n, {});
|
|
1000
1000
|
return n.propTypes = process.env.NODE_ENV === "production" ? {} : e.reduce((e, t) => Object.assign(e, t.propTypes), {}), n.filterProps = e.reduce((e, t) => e.concat(t.filterProps), []), n;
|
|
1001
1001
|
}
|
|
1002
1002
|
//#endregion
|
|
1003
1003
|
//#region node_modules/@mui/system/esm/borders/borders.js
|
|
1004
|
-
function
|
|
1004
|
+
function Nt(e) {
|
|
1005
1005
|
return typeof e == "number" ? `${e}px solid` : e;
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1008
|
-
return
|
|
1007
|
+
function Pt(e, t) {
|
|
1008
|
+
return V({
|
|
1009
1009
|
prop: e,
|
|
1010
1010
|
themeKey: "borders",
|
|
1011
1011
|
transform: t
|
|
1012
1012
|
});
|
|
1013
1013
|
}
|
|
1014
|
-
var
|
|
1014
|
+
var Ft = Pt("border", Nt), It = Pt("borderTop", Nt), Lt = Pt("borderRight", Nt), Rt = Pt("borderBottom", Nt), zt = Pt("borderLeft", Nt), Bt = Pt("borderColor"), Vt = Pt("borderTopColor"), Ht = Pt("borderRightColor"), Ut = Pt("borderBottomColor"), Wt = Pt("borderLeftColor"), Gt = Pt("outline", Nt), Kt = Pt("outlineColor"), qt = (e) => {
|
|
1015
1015
|
if (e.borderRadius !== void 0 && e.borderRadius !== null) {
|
|
1016
|
-
let t =
|
|
1017
|
-
return
|
|
1016
|
+
let t = Tt(e.theme, "shape.borderRadius", 4, "borderRadius");
|
|
1017
|
+
return ft(e, e.borderRadius, (e) => ({ borderRadius: Dt(t, e) }));
|
|
1018
1018
|
}
|
|
1019
1019
|
return null;
|
|
1020
1020
|
};
|
|
1021
|
-
|
|
1021
|
+
qt.propTypes = process.env.NODE_ENV === "production" ? {} : { borderRadius: it }, qt.filterProps = ["borderRadius"], Mt(Ft, It, Lt, Rt, zt, Bt, Vt, Ht, Ut, Wt, qt, Gt, Kt);
|
|
1022
1022
|
//#endregion
|
|
1023
1023
|
//#region node_modules/@mui/system/esm/cssGrid/cssGrid.js
|
|
1024
|
-
var
|
|
1024
|
+
var Jt = (e) => {
|
|
1025
1025
|
if (e.gap !== void 0 && e.gap !== null) {
|
|
1026
|
-
let t =
|
|
1027
|
-
return
|
|
1026
|
+
let t = Tt(e.theme, "spacing", 8, "gap");
|
|
1027
|
+
return ft(e, e.gap, (e) => ({ gap: Dt(t, e) }));
|
|
1028
1028
|
}
|
|
1029
1029
|
return null;
|
|
1030
1030
|
};
|
|
1031
|
-
|
|
1032
|
-
var
|
|
1031
|
+
Jt.propTypes = process.env.NODE_ENV === "production" ? {} : { gap: it }, Jt.filterProps = ["gap"];
|
|
1032
|
+
var Yt = (e) => {
|
|
1033
1033
|
if (e.columnGap !== void 0 && e.columnGap !== null) {
|
|
1034
|
-
let t =
|
|
1035
|
-
return
|
|
1034
|
+
let t = Tt(e.theme, "spacing", 8, "columnGap");
|
|
1035
|
+
return ft(e, e.columnGap, (e) => ({ columnGap: Dt(t, e) }));
|
|
1036
1036
|
}
|
|
1037
1037
|
return null;
|
|
1038
1038
|
};
|
|
1039
|
-
|
|
1040
|
-
var
|
|
1039
|
+
Yt.propTypes = process.env.NODE_ENV === "production" ? {} : { columnGap: it }, Yt.filterProps = ["columnGap"];
|
|
1040
|
+
var Xt = (e) => {
|
|
1041
1041
|
if (e.rowGap !== void 0 && e.rowGap !== null) {
|
|
1042
|
-
let t =
|
|
1043
|
-
return
|
|
1042
|
+
let t = Tt(e.theme, "spacing", 8, "rowGap");
|
|
1043
|
+
return ft(e, e.rowGap, (e) => ({ rowGap: Dt(t, e) }));
|
|
1044
1044
|
}
|
|
1045
1045
|
return null;
|
|
1046
1046
|
};
|
|
1047
|
-
|
|
1047
|
+
Xt.propTypes = process.env.NODE_ENV === "production" ? {} : { rowGap: it }, Xt.filterProps = ["rowGap"], Mt(Jt, Yt, Xt, V({ prop: "gridColumn" }), V({ prop: "gridRow" }), V({ prop: "gridAutoFlow" }), V({ prop: "gridAutoColumns" }), V({ prop: "gridAutoRows" }), V({ prop: "gridTemplateColumns" }), V({ prop: "gridTemplateRows" }), V({ prop: "gridTemplateAreas" }), V({ prop: "gridArea" }));
|
|
1048
1048
|
//#endregion
|
|
1049
1049
|
//#region node_modules/@mui/system/esm/palette/palette.js
|
|
1050
|
-
function
|
|
1050
|
+
function Zt(e, t) {
|
|
1051
1051
|
return t === "grey" ? t : e;
|
|
1052
1052
|
}
|
|
1053
|
-
|
|
1053
|
+
Mt(V({
|
|
1054
1054
|
prop: "color",
|
|
1055
1055
|
themeKey: "palette",
|
|
1056
|
-
transform:
|
|
1057
|
-
}),
|
|
1056
|
+
transform: Zt
|
|
1057
|
+
}), V({
|
|
1058
1058
|
prop: "bgcolor",
|
|
1059
1059
|
cssProperty: "backgroundColor",
|
|
1060
1060
|
themeKey: "palette",
|
|
1061
|
-
transform:
|
|
1062
|
-
}),
|
|
1061
|
+
transform: Zt
|
|
1062
|
+
}), V({
|
|
1063
1063
|
prop: "backgroundColor",
|
|
1064
1064
|
themeKey: "palette",
|
|
1065
|
-
transform:
|
|
1065
|
+
transform: Zt
|
|
1066
1066
|
}));
|
|
1067
1067
|
//#endregion
|
|
1068
1068
|
//#region node_modules/@mui/system/esm/sizing/sizing.js
|
|
1069
|
-
function
|
|
1069
|
+
function Qt(e) {
|
|
1070
1070
|
return e <= 1 && e !== 0 ? `${e * 100}%` : e;
|
|
1071
1071
|
}
|
|
1072
|
-
var $t =
|
|
1072
|
+
var $t = V({
|
|
1073
1073
|
prop: "width",
|
|
1074
|
-
transform:
|
|
1075
|
-
}), en = (e) => e.maxWidth !== void 0 && e.maxWidth !== null ?
|
|
1076
|
-
let n = e.theme?.breakpoints?.values?.[t] ||
|
|
1077
|
-
return n ? e.theme?.breakpoints?.unit === "px" ? { maxWidth: n } : { maxWidth: `${n}${e.theme.breakpoints.unit}` } : { maxWidth:
|
|
1074
|
+
transform: Qt
|
|
1075
|
+
}), en = (e) => e.maxWidth !== void 0 && e.maxWidth !== null ? ft(e, e.maxWidth, (t) => {
|
|
1076
|
+
let n = e.theme?.breakpoints?.values?.[t] || lt[t];
|
|
1077
|
+
return n ? e.theme?.breakpoints?.unit === "px" ? { maxWidth: n } : { maxWidth: `${n}${e.theme.breakpoints.unit}` } : { maxWidth: Qt(t) };
|
|
1078
1078
|
}) : null;
|
|
1079
1079
|
en.filterProps = ["maxWidth"];
|
|
1080
|
-
var tn =
|
|
1080
|
+
var tn = V({
|
|
1081
1081
|
prop: "minWidth",
|
|
1082
|
-
transform:
|
|
1083
|
-
}), nn =
|
|
1082
|
+
transform: Qt
|
|
1083
|
+
}), nn = V({
|
|
1084
1084
|
prop: "height",
|
|
1085
|
-
transform:
|
|
1086
|
-
}), rn =
|
|
1085
|
+
transform: Qt
|
|
1086
|
+
}), rn = V({
|
|
1087
1087
|
prop: "maxHeight",
|
|
1088
|
-
transform:
|
|
1089
|
-
}), an =
|
|
1088
|
+
transform: Qt
|
|
1089
|
+
}), an = V({
|
|
1090
1090
|
prop: "minHeight",
|
|
1091
|
-
transform:
|
|
1091
|
+
transform: Qt
|
|
1092
1092
|
});
|
|
1093
|
-
|
|
1093
|
+
V({
|
|
1094
1094
|
prop: "size",
|
|
1095
1095
|
cssProperty: "width",
|
|
1096
|
-
transform:
|
|
1097
|
-
}),
|
|
1096
|
+
transform: Qt
|
|
1097
|
+
}), V({
|
|
1098
1098
|
prop: "size",
|
|
1099
1099
|
cssProperty: "height",
|
|
1100
|
-
transform:
|
|
1101
|
-
}),
|
|
1100
|
+
transform: Qt
|
|
1101
|
+
}), Mt($t, en, tn, nn, rn, an, V({ prop: "boxSizing" }));
|
|
1102
1102
|
//#endregion
|
|
1103
1103
|
//#region node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js
|
|
1104
1104
|
var on = {
|
|
1105
1105
|
border: {
|
|
1106
1106
|
themeKey: "borders",
|
|
1107
|
-
transform:
|
|
1107
|
+
transform: Nt
|
|
1108
1108
|
},
|
|
1109
1109
|
borderTop: {
|
|
1110
1110
|
themeKey: "borders",
|
|
1111
|
-
transform:
|
|
1111
|
+
transform: Nt
|
|
1112
1112
|
},
|
|
1113
1113
|
borderRight: {
|
|
1114
1114
|
themeKey: "borders",
|
|
1115
|
-
transform:
|
|
1115
|
+
transform: Nt
|
|
1116
1116
|
},
|
|
1117
1117
|
borderBottom: {
|
|
1118
1118
|
themeKey: "borders",
|
|
1119
|
-
transform:
|
|
1119
|
+
transform: Nt
|
|
1120
1120
|
},
|
|
1121
1121
|
borderLeft: {
|
|
1122
1122
|
themeKey: "borders",
|
|
1123
|
-
transform:
|
|
1123
|
+
transform: Nt
|
|
1124
1124
|
},
|
|
1125
1125
|
borderColor: { themeKey: "palette" },
|
|
1126
1126
|
borderTopColor: { themeKey: "palette" },
|
|
@@ -1129,66 +1129,66 @@ var on = {
|
|
|
1129
1129
|
borderLeftColor: { themeKey: "palette" },
|
|
1130
1130
|
outline: {
|
|
1131
1131
|
themeKey: "borders",
|
|
1132
|
-
transform:
|
|
1132
|
+
transform: Nt
|
|
1133
1133
|
},
|
|
1134
1134
|
outlineColor: { themeKey: "palette" },
|
|
1135
1135
|
borderRadius: {
|
|
1136
1136
|
themeKey: "shape.borderRadius",
|
|
1137
|
-
style:
|
|
1137
|
+
style: qt
|
|
1138
1138
|
},
|
|
1139
1139
|
color: {
|
|
1140
1140
|
themeKey: "palette",
|
|
1141
|
-
transform:
|
|
1141
|
+
transform: Zt
|
|
1142
1142
|
},
|
|
1143
1143
|
bgcolor: {
|
|
1144
1144
|
themeKey: "palette",
|
|
1145
1145
|
cssProperty: "backgroundColor",
|
|
1146
|
-
transform:
|
|
1146
|
+
transform: Zt
|
|
1147
1147
|
},
|
|
1148
1148
|
backgroundColor: {
|
|
1149
1149
|
themeKey: "palette",
|
|
1150
|
-
transform:
|
|
1150
|
+
transform: Zt
|
|
1151
1151
|
},
|
|
1152
|
-
p: { style:
|
|
1153
|
-
pt: { style:
|
|
1154
|
-
pr: { style:
|
|
1155
|
-
pb: { style:
|
|
1156
|
-
pl: { style:
|
|
1157
|
-
px: { style:
|
|
1158
|
-
py: { style:
|
|
1159
|
-
padding: { style:
|
|
1160
|
-
paddingTop: { style:
|
|
1161
|
-
paddingRight: { style:
|
|
1162
|
-
paddingBottom: { style:
|
|
1163
|
-
paddingLeft: { style:
|
|
1164
|
-
paddingX: { style:
|
|
1165
|
-
paddingY: { style:
|
|
1166
|
-
paddingInline: { style:
|
|
1167
|
-
paddingInlineStart: { style:
|
|
1168
|
-
paddingInlineEnd: { style:
|
|
1169
|
-
paddingBlock: { style:
|
|
1170
|
-
paddingBlockStart: { style:
|
|
1171
|
-
paddingBlockEnd: { style:
|
|
1172
|
-
m: { style:
|
|
1173
|
-
mt: { style:
|
|
1174
|
-
mr: { style:
|
|
1175
|
-
mb: { style:
|
|
1176
|
-
ml: { style:
|
|
1177
|
-
mx: { style:
|
|
1178
|
-
my: { style:
|
|
1179
|
-
margin: { style:
|
|
1180
|
-
marginTop: { style:
|
|
1181
|
-
marginRight: { style:
|
|
1182
|
-
marginBottom: { style:
|
|
1183
|
-
marginLeft: { style:
|
|
1184
|
-
marginX: { style:
|
|
1185
|
-
marginY: { style:
|
|
1186
|
-
marginInline: { style:
|
|
1187
|
-
marginInlineStart: { style:
|
|
1188
|
-
marginInlineEnd: { style:
|
|
1189
|
-
marginBlock: { style:
|
|
1190
|
-
marginBlockStart: { style:
|
|
1191
|
-
marginBlockEnd: { style:
|
|
1152
|
+
p: { style: U },
|
|
1153
|
+
pt: { style: U },
|
|
1154
|
+
pr: { style: U },
|
|
1155
|
+
pb: { style: U },
|
|
1156
|
+
pl: { style: U },
|
|
1157
|
+
px: { style: U },
|
|
1158
|
+
py: { style: U },
|
|
1159
|
+
padding: { style: U },
|
|
1160
|
+
paddingTop: { style: U },
|
|
1161
|
+
paddingRight: { style: U },
|
|
1162
|
+
paddingBottom: { style: U },
|
|
1163
|
+
paddingLeft: { style: U },
|
|
1164
|
+
paddingX: { style: U },
|
|
1165
|
+
paddingY: { style: U },
|
|
1166
|
+
paddingInline: { style: U },
|
|
1167
|
+
paddingInlineStart: { style: U },
|
|
1168
|
+
paddingInlineEnd: { style: U },
|
|
1169
|
+
paddingBlock: { style: U },
|
|
1170
|
+
paddingBlockStart: { style: U },
|
|
1171
|
+
paddingBlockEnd: { style: U },
|
|
1172
|
+
m: { style: H },
|
|
1173
|
+
mt: { style: H },
|
|
1174
|
+
mr: { style: H },
|
|
1175
|
+
mb: { style: H },
|
|
1176
|
+
ml: { style: H },
|
|
1177
|
+
mx: { style: H },
|
|
1178
|
+
my: { style: H },
|
|
1179
|
+
margin: { style: H },
|
|
1180
|
+
marginTop: { style: H },
|
|
1181
|
+
marginRight: { style: H },
|
|
1182
|
+
marginBottom: { style: H },
|
|
1183
|
+
marginLeft: { style: H },
|
|
1184
|
+
marginX: { style: H },
|
|
1185
|
+
marginY: { style: H },
|
|
1186
|
+
marginInline: { style: H },
|
|
1187
|
+
marginInlineStart: { style: H },
|
|
1188
|
+
marginInlineEnd: { style: H },
|
|
1189
|
+
marginBlock: { style: H },
|
|
1190
|
+
marginBlockStart: { style: H },
|
|
1191
|
+
marginBlockEnd: { style: H },
|
|
1192
1192
|
displayPrint: {
|
|
1193
1193
|
cssProperty: !1,
|
|
1194
1194
|
transform: (e) => ({ "@media print": { display: e } })
|
|
@@ -1211,9 +1211,9 @@ var on = {
|
|
|
1211
1211
|
alignSelf: {},
|
|
1212
1212
|
justifyItems: {},
|
|
1213
1213
|
justifySelf: {},
|
|
1214
|
-
gap: { style:
|
|
1215
|
-
rowGap: { style:
|
|
1216
|
-
columnGap: { style:
|
|
1214
|
+
gap: { style: Jt },
|
|
1215
|
+
rowGap: { style: Xt },
|
|
1216
|
+
columnGap: { style: Yt },
|
|
1217
1217
|
gridColumn: {},
|
|
1218
1218
|
gridRow: {},
|
|
1219
1219
|
gridAutoFlow: {},
|
|
@@ -1230,12 +1230,12 @@ var on = {
|
|
|
1230
1230
|
bottom: {},
|
|
1231
1231
|
left: {},
|
|
1232
1232
|
boxShadow: { themeKey: "shadows" },
|
|
1233
|
-
width: { transform:
|
|
1233
|
+
width: { transform: Qt },
|
|
1234
1234
|
maxWidth: { style: en },
|
|
1235
|
-
minWidth: { transform:
|
|
1236
|
-
height: { transform:
|
|
1237
|
-
maxHeight: { transform:
|
|
1238
|
-
minHeight: { transform:
|
|
1235
|
+
minWidth: { transform: Qt },
|
|
1236
|
+
height: { transform: Qt },
|
|
1237
|
+
maxHeight: { transform: Qt },
|
|
1238
|
+
minHeight: { transform: Qt },
|
|
1239
1239
|
boxSizing: {},
|
|
1240
1240
|
font: { themeKey: "font" },
|
|
1241
1241
|
fontFamily: { themeKey: "typography" },
|
|
@@ -1270,10 +1270,10 @@ function ln() {
|
|
|
1270
1270
|
let { cssProperty: o = e, themeKey: s, transform: c, style: l } = a;
|
|
1271
1271
|
if (t == null) return null;
|
|
1272
1272
|
if (s === "typography" && t === "inherit") return { [e]: t };
|
|
1273
|
-
let u =
|
|
1274
|
-
return l ? l(i) :
|
|
1275
|
-
let n =
|
|
1276
|
-
return t === n && typeof t == "string" && (n =
|
|
1273
|
+
let u = ht(n, s) || {};
|
|
1274
|
+
return l ? l(i) : ft(i, t, (t) => {
|
|
1275
|
+
let n = gt(u, c, t);
|
|
1276
|
+
return t === n && typeof t == "string" && (n = gt(u, c, `${e}${t === "default" ? "" : Le(t)}`, t)), o === !1 ? n : { [o]: n };
|
|
1277
1277
|
});
|
|
1278
1278
|
}
|
|
1279
1279
|
function t(n) {
|
|
@@ -1285,20 +1285,20 @@ function ln() {
|
|
|
1285
1285
|
if (typeof n == "function") r = n(i);
|
|
1286
1286
|
else if (typeof n != "object") return n;
|
|
1287
1287
|
if (!r) return null;
|
|
1288
|
-
let s =
|
|
1288
|
+
let s = pt(i.breakpoints), c = Object.keys(s), l = s;
|
|
1289
1289
|
return Object.keys(r).forEach((n) => {
|
|
1290
1290
|
let a = cn(r[n], i);
|
|
1291
|
-
if (a != null) if (typeof a == "object") if (o[n]) l =
|
|
1291
|
+
if (a != null) if (typeof a == "object") if (o[n]) l = rt(l, e(n, a, i, o));
|
|
1292
1292
|
else {
|
|
1293
|
-
let e =
|
|
1293
|
+
let e = ft({ theme: i }, a, (e) => ({ [n]: e }));
|
|
1294
1294
|
sn(e, a) ? l[n] = t({
|
|
1295
1295
|
sx: a,
|
|
1296
1296
|
theme: i,
|
|
1297
1297
|
nested: !0
|
|
1298
|
-
}) : l =
|
|
1298
|
+
}) : l = rt(l, e);
|
|
1299
1299
|
}
|
|
1300
|
-
else l =
|
|
1301
|
-
}), !a && i.modularCssLayers ? { "@layer sx":
|
|
1300
|
+
else l = rt(l, e(n, a, i, o));
|
|
1301
|
+
}), !a && i.modularCssLayers ? { "@layer sx": at(i, mt(c, l)) } : at(i, mt(c, l));
|
|
1302
1302
|
}
|
|
1303
1303
|
return Array.isArray(r) ? r.map(s) : s(r);
|
|
1304
1304
|
}
|
|
@@ -1477,7 +1477,7 @@ function En(e, t, n) {
|
|
|
1477
1477
|
//#endregion
|
|
1478
1478
|
//#region node_modules/@mui/styled-engine/esm/index.js
|
|
1479
1479
|
function Dn(e, t) {
|
|
1480
|
-
let n =
|
|
1480
|
+
let n = ke(e, t);
|
|
1481
1481
|
return process.env.NODE_ENV === "production" ? n : (...t) => {
|
|
1482
1482
|
let r = typeof e == "string" ? `"${e}"` : "component";
|
|
1483
1483
|
return t.length === 0 ? console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`, "You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`."].join("\n")) : t.some((e) => e === void 0) && console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`), n(...t);
|
|
@@ -1544,7 +1544,7 @@ function Mn(e) {
|
|
|
1544
1544
|
var Nn = { borderRadius: 4 };
|
|
1545
1545
|
//#endregion
|
|
1546
1546
|
//#region node_modules/@mui/system/esm/createTheme/createSpacing.js
|
|
1547
|
-
function Pn(e = 8, t =
|
|
1547
|
+
function Pn(e = 8, t = Et({ spacing: e })) {
|
|
1548
1548
|
if (e.mui) return e;
|
|
1549
1549
|
let n = (...e) => (process.env.NODE_ENV !== "production" && (e.length <= 4 || console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)), (e.length === 0 ? [1] : e).map((e) => {
|
|
1550
1550
|
let n = t(e);
|
|
@@ -1566,7 +1566,7 @@ function Fn(e, t) {
|
|
|
1566
1566
|
//#endregion
|
|
1567
1567
|
//#region node_modules/@mui/system/esm/createTheme/createTheme.js
|
|
1568
1568
|
function In(e = {}, ...t) {
|
|
1569
|
-
let { breakpoints: n = {}, palette: r = {}, spacing: i, shape: a = {}, ...o } = e, s = Mn(n), c = Pn(i), l =
|
|
1569
|
+
let { breakpoints: n = {}, palette: r = {}, spacing: i, shape: a = {}, ...o } = e, s = Mn(n), c = Pn(i), l = z({
|
|
1570
1570
|
breakpoints: s,
|
|
1571
1571
|
direction: "ltr",
|
|
1572
1572
|
components: {},
|
|
@@ -1580,7 +1580,7 @@ function In(e = {}, ...t) {
|
|
|
1580
1580
|
...a
|
|
1581
1581
|
}
|
|
1582
1582
|
}, o);
|
|
1583
|
-
return l =
|
|
1583
|
+
return l = ct(l), l.applyStyles = Fn, l = t.reduce((e, t) => z(e, t), l), l.unstable_sxConfig = {
|
|
1584
1584
|
...on,
|
|
1585
1585
|
...o?.unstable_sxConfig
|
|
1586
1586
|
}, l.unstable_sx = function(e) {
|
|
@@ -1608,7 +1608,7 @@ var Ln = {
|
|
|
1608
1608
|
};
|
|
1609
1609
|
function Rn(e, t, n = "Mui") {
|
|
1610
1610
|
let r = Ln[t];
|
|
1611
|
-
return r ? `${n}-${r}` : `${
|
|
1611
|
+
return r ? `${n}-${r}` : `${Fe.generate(e)}-${t}`;
|
|
1612
1612
|
}
|
|
1613
1613
|
//#endregion
|
|
1614
1614
|
//#region node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js
|
|
@@ -1632,8 +1632,8 @@ function Hn(e) {
|
|
|
1632
1632
|
if (typeof e == "string") return e;
|
|
1633
1633
|
if (typeof e == "function") return Bn(e, "Component");
|
|
1634
1634
|
if (typeof e == "object") switch (e.$$typeof) {
|
|
1635
|
-
case
|
|
1636
|
-
case
|
|
1635
|
+
case et.ForwardRef: return Vn(e, e.render, "ForwardRef");
|
|
1636
|
+
case et.Memo: return Vn(e, e.type, "memo");
|
|
1637
1637
|
default: return;
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
@@ -1716,7 +1716,7 @@ function Zn(e = {}) {
|
|
|
1716
1716
|
if (typeof e == "function") return function(t) {
|
|
1717
1717
|
return Yn(t, e, t.theme.modularCssLayers ? d : void 0);
|
|
1718
1718
|
};
|
|
1719
|
-
if (
|
|
1719
|
+
if (tt(e)) {
|
|
1720
1720
|
let t = Un(e);
|
|
1721
1721
|
return function(e) {
|
|
1722
1722
|
return t.variants ? Yn(e, t, e.theme.modularCssLayers ? d : void 0) : e.theme.modularCssLayers ? Kn(t.style, d) : t.style;
|
|
@@ -1753,7 +1753,7 @@ function Zn(e = {}) {
|
|
|
1753
1753
|
};
|
|
1754
1754
|
}
|
|
1755
1755
|
function Qn(e, t, n) {
|
|
1756
|
-
return e ? `${e}${
|
|
1756
|
+
return e ? `${e}${Le(t || "")}` : `Styled(${Hn(n)})`;
|
|
1757
1757
|
}
|
|
1758
1758
|
function $n(e, t) {
|
|
1759
1759
|
let n;
|
|
@@ -1790,7 +1790,7 @@ function rr(e, t, n = !1) {
|
|
|
1790
1790
|
r[a][t] = rr(i[t], o[t], n);
|
|
1791
1791
|
}
|
|
1792
1792
|
}
|
|
1793
|
-
} else a === "className" && n && t.className ? r.className =
|
|
1793
|
+
} else a === "className" && n && t.className ? r.className = Xe(e?.className, t?.className) : a === "style" && n && t.style ? r.style = {
|
|
1794
1794
|
...e?.style,
|
|
1795
1795
|
...t?.style
|
|
1796
1796
|
} : r[a] === void 0 && (r[a] = e[a]);
|
|
@@ -1822,7 +1822,7 @@ function sr(e) {
|
|
|
1822
1822
|
"hsl",
|
|
1823
1823
|
"hsla",
|
|
1824
1824
|
"color"
|
|
1825
|
-
].includes(n)) throw Error(process.env.NODE_ENV === "production" ?
|
|
1825
|
+
].includes(n)) throw Error(process.env.NODE_ENV === "production" ? Ie(9, e) : `MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`);
|
|
1826
1826
|
let r = e.substring(t + 1, e.length - 1), i;
|
|
1827
1827
|
if (n === "color") {
|
|
1828
1828
|
if (r = r.split(" "), i = r.shift(), r.length === 4 && r[3].charAt(0) === "/" && (r[3] = r[3].slice(1)), ![
|
|
@@ -1831,7 +1831,7 @@ function sr(e) {
|
|
|
1831
1831
|
"a98-rgb",
|
|
1832
1832
|
"prophoto-rgb",
|
|
1833
1833
|
"rec-2020"
|
|
1834
|
-
].includes(i)) throw Error(process.env.NODE_ENV === "production" ?
|
|
1834
|
+
].includes(i)) throw Error(process.env.NODE_ENV === "production" ? Ie(10, i) : `MUI: unsupported \`${i}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`);
|
|
1835
1835
|
} else r = r.split(",");
|
|
1836
1836
|
return r = r.map((e) => parseFloat(e)), {
|
|
1837
1837
|
type: n,
|
|
@@ -1923,14 +1923,14 @@ function yr(e, t, n) {
|
|
|
1923
1923
|
//#region node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js
|
|
1924
1924
|
var br = /* @__PURE__ */ g.createContext(void 0);
|
|
1925
1925
|
function xr({ value: e, children: t }) {
|
|
1926
|
-
return /* @__PURE__ */
|
|
1926
|
+
return /* @__PURE__ */ L(br.Provider, {
|
|
1927
1927
|
value: e,
|
|
1928
1928
|
children: t
|
|
1929
1929
|
});
|
|
1930
1930
|
}
|
|
1931
1931
|
process.env.NODE_ENV !== "production" && (xr.propTypes = {
|
|
1932
|
-
children:
|
|
1933
|
-
value:
|
|
1932
|
+
children: B.default.node,
|
|
1933
|
+
value: B.default.object
|
|
1934
1934
|
});
|
|
1935
1935
|
function Sr(e) {
|
|
1936
1936
|
let { theme: t, name: n, props: r } = e;
|
|
@@ -2004,13 +2004,13 @@ function jr(e, t = {}) {
|
|
|
2004
2004
|
let { getSelector: n = _, disableCssColorScheme: r, colorSchemeSelector: i, enableContrastVars: a } = t, { colorSchemes: o = {}, components: s, defaultColorScheme: c = "light", ...l } = e, { vars: u, css: d, varsWithDefaults: f } = Ar(l, t), p = f, m = {}, { [c]: h, ...g } = o;
|
|
2005
2005
|
if (Object.entries(g || {}).forEach(([e, n]) => {
|
|
2006
2006
|
let { vars: r, css: i, varsWithDefaults: a } = Ar(n, t);
|
|
2007
|
-
p =
|
|
2007
|
+
p = z(p, a), m[e] = {
|
|
2008
2008
|
css: i,
|
|
2009
2009
|
vars: r
|
|
2010
2010
|
};
|
|
2011
2011
|
}), h) {
|
|
2012
2012
|
let { css: e, vars: n, varsWithDefaults: r } = Ar(h, t);
|
|
2013
|
-
p =
|
|
2013
|
+
p = z(p, r), m[c] = {
|
|
2014
2014
|
css: e,
|
|
2015
2015
|
vars: n
|
|
2016
2016
|
};
|
|
@@ -2028,7 +2028,7 @@ function jr(e, t = {}) {
|
|
|
2028
2028
|
generateThemeVars: () => {
|
|
2029
2029
|
let e = { ...u };
|
|
2030
2030
|
return Object.entries(m).forEach(([, { vars: t }]) => {
|
|
2031
|
-
e =
|
|
2031
|
+
e = z(e, t);
|
|
2032
2032
|
}), e;
|
|
2033
2033
|
},
|
|
2034
2034
|
generateStyleSheets: () => {
|
|
@@ -2329,8 +2329,8 @@ function ei(e) {
|
|
|
2329
2329
|
return t;
|
|
2330
2330
|
}
|
|
2331
2331
|
let p = ({ color: e, name: t, mainShade: n = 500, lightShade: a = 300, darkShade: o = 700 }) => {
|
|
2332
|
-
if (e = { ...e }, !e.main && e[n] && (e.main = e[n]), !e.hasOwnProperty("main")) throw Error(process.env.NODE_ENV === "production" ?
|
|
2333
|
-
if (typeof e.main != "string") throw Error(process.env.NODE_ENV === "production" ?
|
|
2332
|
+
if (e = { ...e }, !e.main && e[n] && (e.main = e[n]), !e.hasOwnProperty("main")) throw Error(process.env.NODE_ENV === "production" ? Ie(11, t ? ` (${t})` : "", n) : `MUI: The color${t ? ` (${t})` : ""} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`);
|
|
2333
|
+
if (typeof e.main != "string") throw Error(process.env.NODE_ENV === "production" ? Ie(12, t ? ` (${t})` : "", JSON.stringify(e.main)) : `MUI: The color${t ? ` (${t})` : ""} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n
|
|
2334
2334
|
Did you intend to use one of the following approaches?
|
|
2335
2335
|
|
|
2336
2336
|
import { green } from "@mui/material/colors";
|
|
@@ -2344,7 +2344,7 @@ const theme2 = createTheme({ palette: {
|
|
|
2344
2344
|
} });`);
|
|
2345
2345
|
return i ? (Kr(i, e, "light", a, r), Kr(i, e, "dark", o, r)) : (Gr(e, "light", a, r), Gr(e, "dark", o, r)), e.contrastText ||= f(e.main), e;
|
|
2346
2346
|
}, m;
|
|
2347
|
-
return t === "light" ? m = Vr() : t === "dark" && (m = Ur()), process.env.NODE_ENV !== "production" && (m || console.error(`MUI: The palette mode \`${t}\` is not supported.`)),
|
|
2347
|
+
return t === "light" ? m = Vr() : t === "dark" && (m = Ur()), process.env.NODE_ENV !== "production" && (m || console.error(`MUI: The palette mode \`${t}\` is not supported.`)), z({
|
|
2348
2348
|
common: { ...Nr },
|
|
2349
2349
|
mode: t,
|
|
2350
2350
|
primary: p({
|
|
@@ -2421,7 +2421,7 @@ function oi(e, t) {
|
|
|
2421
2421
|
...a,
|
|
2422
2422
|
...l
|
|
2423
2423
|
});
|
|
2424
|
-
return
|
|
2424
|
+
return z({
|
|
2425
2425
|
htmlFontSize: c,
|
|
2426
2426
|
pxToRem: p,
|
|
2427
2427
|
fontFamily: n,
|
|
@@ -2548,7 +2548,7 @@ var gi = {
|
|
|
2548
2548
|
//#endregion
|
|
2549
2549
|
//#region node_modules/@mui/material/esm/styles/stringifyTheme.js
|
|
2550
2550
|
function _i(e) {
|
|
2551
|
-
return
|
|
2551
|
+
return tt(e) || e === void 0 || typeof e == "string" || typeof e == "boolean" || typeof e == "number" || Array.isArray(e);
|
|
2552
2552
|
}
|
|
2553
2553
|
function vi(e = {}) {
|
|
2554
2554
|
let t = { ...e };
|
|
@@ -2556,7 +2556,7 @@ function vi(e = {}) {
|
|
|
2556
2556
|
let t = Object.entries(e);
|
|
2557
2557
|
for (let r = 0; r < t.length; r++) {
|
|
2558
2558
|
let [i, a] = t[r];
|
|
2559
|
-
!_i(a) || i.startsWith("unstable_") ? delete e[i] :
|
|
2559
|
+
!_i(a) || i.startsWith("unstable_") ? delete e[i] : tt(a) && (e[i] = { ...a }, n(e[i]));
|
|
2560
2560
|
}
|
|
2561
2561
|
}
|
|
2562
2562
|
return n(t), `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
@@ -2599,11 +2599,11 @@ function xi(e) {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
function Si(e = {}, ...t) {
|
|
2601
2601
|
let { breakpoints: n, mixins: r = {}, spacing: i, palette: a = {}, transitions: o = {}, typography: s = {}, shape: c, colorSpace: l, ...u } = e;
|
|
2602
|
-
if (e.vars && e.generateThemeVars === void 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
2602
|
+
if (e.vars && e.generateThemeVars === void 0) throw Error(process.env.NODE_ENV === "production" ? Ie(20) : "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://v7.mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.");
|
|
2603
2603
|
let d = ei({
|
|
2604
2604
|
...a,
|
|
2605
2605
|
colorSpace: l
|
|
2606
|
-
}), f = In(e), p =
|
|
2606
|
+
}), f = In(e), p = z(f, {
|
|
2607
2607
|
mixins: ni(f.breakpoints, r),
|
|
2608
2608
|
palette: d,
|
|
2609
2609
|
shadows: ui.slice(),
|
|
@@ -2611,7 +2611,7 @@ function Si(e = {}, ...t) {
|
|
|
2611
2611
|
transitions: hi(o),
|
|
2612
2612
|
zIndex: { ...gi }
|
|
2613
2613
|
});
|
|
2614
|
-
if (p =
|
|
2614
|
+
if (p = z(p, u), p = t.reduce((e, t) => z(e, t), p), process.env.NODE_ENV !== "production") {
|
|
2615
2615
|
let e = [
|
|
2616
2616
|
"active",
|
|
2617
2617
|
"checked",
|
|
@@ -2795,7 +2795,7 @@ function Li(e, t, n, r, i) {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
function Ri(e = {}, ...t) {
|
|
2797
2797
|
let { colorSchemes: n = { light: !0 }, defaultColorScheme: r, disableCssColorScheme: i = !1, cssVarPrefix: a = "mui", nativeColor: o = !1, shouldSkipGeneratingVar: s = Oi, colorSchemeSelector: c = n.light && n.dark ? "media" : void 0, rootSelector: l = ":root", ...u } = e, d = Object.keys(n)[0], f = r || (n.light && d !== "light" ? "light" : d), p = Ii(a), { [f]: m, light: h, dark: g, ..._ } = n, v = { ..._ }, y = m;
|
|
2798
|
-
if ((f === "dark" && !("dark" in n) || f === "light" && !("light" in n)) && (y = !0), !y) throw Error(process.env.NODE_ENV === "production" ?
|
|
2798
|
+
if ((f === "dark" && !("dark" in n) || f === "light" && !("light" in n)) && (y = !0), !y) throw Error(process.env.NODE_ENV === "production" ? Ie(21, f) : `MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`);
|
|
2799
2799
|
let b;
|
|
2800
2800
|
o && (b = "oklch");
|
|
2801
2801
|
let x = Li(b, v, y, u, f);
|
|
@@ -2858,7 +2858,7 @@ function Ri(e = {}, ...t) {
|
|
|
2858
2858
|
let n = t[e];
|
|
2859
2859
|
e !== "tonalOffset" && !o && n && typeof n == "object" && (n.main && q(t[e], "mainChannel", lr(Mi(n.main))), n.light && q(t[e], "lightChannel", lr(Mi(n.light))), n.dark && q(t[e], "darkChannel", lr(Mi(n.dark))), n.contrastText && q(t[e], "contrastTextChannel", lr(Mi(n.contrastText))), e === "text" && (Ni(t[e], "primary"), Ni(t[e], "secondary")), e === "action" && (n.active && Ni(t[e], "active"), n.selected && Ni(t[e], "selected")));
|
|
2860
2860
|
});
|
|
2861
|
-
}), S = t.reduce((e, t) =>
|
|
2861
|
+
}), S = t.reduce((e, t) => z(e, t), S);
|
|
2862
2862
|
let C = {
|
|
2863
2863
|
prefix: a,
|
|
2864
2864
|
disableCssColorScheme: i,
|
|
@@ -2869,7 +2869,7 @@ function Ri(e = {}, ...t) {
|
|
|
2869
2869
|
return S.vars = ee, Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([e, t]) => {
|
|
2870
2870
|
S[e] = t;
|
|
2871
2871
|
}), S.generateThemeVars = w, S.generateStyleSheets = te, S.generateSpacing = function() {
|
|
2872
|
-
return Pn(u.spacing,
|
|
2872
|
+
return Pn(u.spacing, Et(this));
|
|
2873
2873
|
}, S.getColorSchemeSelector = Mr(c), S.spacing = S.generateSpacing(), S.shouldSkipGeneratingVar = s, S.unstable_sxConfig = {
|
|
2874
2874
|
...on,
|
|
2875
2875
|
...u?.unstable_sxConfig
|
|
@@ -2940,11 +2940,11 @@ var Wi = Zn({
|
|
|
2940
2940
|
//#endregion
|
|
2941
2941
|
//#region node_modules/@mui/material/esm/DefaultPropsProvider/DefaultPropsProvider.js
|
|
2942
2942
|
function Ki(e) {
|
|
2943
|
-
return /* @__PURE__ */
|
|
2943
|
+
return /* @__PURE__ */ L(xr, { ...e });
|
|
2944
2944
|
}
|
|
2945
2945
|
process.env.NODE_ENV !== "production" && (Ki.propTypes = {
|
|
2946
|
-
children:
|
|
2947
|
-
value:
|
|
2946
|
+
children: B.default.node,
|
|
2947
|
+
value: B.default.object.isRequired
|
|
2948
2948
|
});
|
|
2949
2949
|
function qi(e) {
|
|
2950
2950
|
return Cr(e);
|
|
@@ -2970,10 +2970,10 @@ zn("MuiSvgIcon", [
|
|
|
2970
2970
|
//#region node_modules/@mui/material/esm/SvgIcon/SvgIcon.js
|
|
2971
2971
|
var Yi = (e) => {
|
|
2972
2972
|
let { color: t, fontSize: n, classes: r } = e;
|
|
2973
|
-
return
|
|
2973
|
+
return Ze({ root: [
|
|
2974
2974
|
"root",
|
|
2975
|
-
t !== "inherit" && `color${
|
|
2976
|
-
`fontSize${
|
|
2975
|
+
t !== "inherit" && `color${Re(t)}`,
|
|
2976
|
+
`fontSize${Re(n)}`
|
|
2977
2977
|
] }, Ji, r);
|
|
2978
2978
|
}, Xi = Wi("svg", {
|
|
2979
2979
|
name: "MuiSvgIcon",
|
|
@@ -2982,8 +2982,8 @@ var Yi = (e) => {
|
|
|
2982
2982
|
let { ownerState: n } = e;
|
|
2983
2983
|
return [
|
|
2984
2984
|
t.root,
|
|
2985
|
-
n.color !== "inherit" && t[`color${
|
|
2986
|
-
t[`fontSize${
|
|
2985
|
+
n.color !== "inherit" && t[`color${Re(n.color)}`],
|
|
2986
|
+
t[`fontSize${Re(n.fontSize)}`]
|
|
2987
2987
|
];
|
|
2988
2988
|
}
|
|
2989
2989
|
})(Gi(({ theme: e }) => ({
|
|
@@ -3045,9 +3045,9 @@ var Yi = (e) => {
|
|
|
3045
3045
|
viewBox: d,
|
|
3046
3046
|
hasSvgAsChild: p
|
|
3047
3047
|
}, h = {};
|
|
3048
|
-
return l || (h.viewBox = d), /* @__PURE__ */
|
|
3048
|
+
return l || (h.viewBox = d), /* @__PURE__ */ R(Xi, {
|
|
3049
3049
|
as: o,
|
|
3050
|
-
className:
|
|
3050
|
+
className: Xe(Yi(m).root, i),
|
|
3051
3051
|
focusable: "false",
|
|
3052
3052
|
color: c,
|
|
3053
3053
|
"aria-hidden": u ? void 0 : !0,
|
|
@@ -3057,14 +3057,14 @@ var Yi = (e) => {
|
|
|
3057
3057
|
...f,
|
|
3058
3058
|
...p && r.props,
|
|
3059
3059
|
ownerState: m,
|
|
3060
|
-
children: [p ? r.props.children : r, u ? /* @__PURE__ */
|
|
3060
|
+
children: [p ? r.props.children : r, u ? /* @__PURE__ */ L("title", { children: u }) : null]
|
|
3061
3061
|
});
|
|
3062
3062
|
});
|
|
3063
3063
|
process.env.NODE_ENV !== "production" && (Zi.propTypes = {
|
|
3064
|
-
children:
|
|
3065
|
-
classes:
|
|
3066
|
-
className:
|
|
3067
|
-
color:
|
|
3064
|
+
children: B.default.node,
|
|
3065
|
+
classes: B.default.object,
|
|
3066
|
+
className: B.default.string,
|
|
3067
|
+
color: B.default.oneOfType([B.default.oneOf([
|
|
3068
3068
|
"inherit",
|
|
3069
3069
|
"action",
|
|
3070
3070
|
"disabled",
|
|
@@ -3074,34 +3074,34 @@ process.env.NODE_ENV !== "production" && (Zi.propTypes = {
|
|
|
3074
3074
|
"info",
|
|
3075
3075
|
"success",
|
|
3076
3076
|
"warning"
|
|
3077
|
-
]),
|
|
3078
|
-
component:
|
|
3079
|
-
fontSize:
|
|
3077
|
+
]), B.default.string]),
|
|
3078
|
+
component: B.default.elementType,
|
|
3079
|
+
fontSize: B.default.oneOfType([B.default.oneOf([
|
|
3080
3080
|
"inherit",
|
|
3081
3081
|
"large",
|
|
3082
3082
|
"medium",
|
|
3083
3083
|
"small"
|
|
3084
|
-
]),
|
|
3085
|
-
htmlColor:
|
|
3086
|
-
inheritViewBox:
|
|
3087
|
-
shapeRendering:
|
|
3088
|
-
sx:
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3084
|
+
]), B.default.string]),
|
|
3085
|
+
htmlColor: B.default.string,
|
|
3086
|
+
inheritViewBox: B.default.bool,
|
|
3087
|
+
shapeRendering: B.default.string,
|
|
3088
|
+
sx: B.default.oneOfType([
|
|
3089
|
+
B.default.arrayOf(B.default.oneOfType([
|
|
3090
|
+
B.default.func,
|
|
3091
|
+
B.default.object,
|
|
3092
|
+
B.default.bool
|
|
3093
3093
|
])),
|
|
3094
|
-
|
|
3095
|
-
|
|
3094
|
+
B.default.func,
|
|
3095
|
+
B.default.object
|
|
3096
3096
|
]),
|
|
3097
|
-
titleAccess:
|
|
3098
|
-
viewBox:
|
|
3097
|
+
titleAccess: B.default.string,
|
|
3098
|
+
viewBox: B.default.string
|
|
3099
3099
|
}), Zi.muiName = "SvgIcon";
|
|
3100
3100
|
//#endregion
|
|
3101
3101
|
//#region node_modules/@mui/material/esm/utils/createSvgIcon.js
|
|
3102
3102
|
function J(e, t) {
|
|
3103
3103
|
function n(n, r) {
|
|
3104
|
-
return /* @__PURE__ */
|
|
3104
|
+
return /* @__PURE__ */ L(Zi, {
|
|
3105
3105
|
"data-testid": process.env.NODE_ENV === "production" ? void 0 : `${t}Icon`,
|
|
3106
3106
|
ref: r,
|
|
3107
3107
|
...n,
|
|
@@ -3112,22 +3112,22 @@ function J(e, t) {
|
|
|
3112
3112
|
}
|
|
3113
3113
|
//#endregion
|
|
3114
3114
|
//#region node_modules/@mui/icons-material/esm/Add.js
|
|
3115
|
-
var Qi = J(/* @__PURE__ */
|
|
3116
|
-
/* @__PURE__ */
|
|
3115
|
+
var Qi = J(/* @__PURE__ */ L("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" }), "Add"), $i = J(/* @__PURE__ */ L("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z" }), "ArrowBack"), ea = J(/* @__PURE__ */ L("path", { d: "m7 10 5 5 5-5z" }), "ArrowDropDown"), ta = J(/* @__PURE__ */ L("path", { d: "M7.5 5.6 10 7 8.6 4.5 10 2 7.5 3.4 5 2l1.4 2.5L5 7zm12 9.8L17 14l1.4 2.5L17 19l2.5-1.4L22 19l-1.4-2.5L22 14zM22 2l-2.5 1.4L17 2l1.4 2.5L17 7l2.5-1.4L22 7l-1.4-2.5zm-7.63 5.29a.996.996 0 0 0-1.41 0L1.29 18.96c-.39.39-.39 1.02 0 1.41l2.34 2.34c.39.39 1.02.39 1.41 0L16.7 11.05c.39-.39.39-1.02 0-1.41zm-1.03 5.49-2.12-2.12 2.44-2.44 2.12 2.12z" }), "AutoFixHigh"), na = J(/* @__PURE__ */ L("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"), ra = J(/* @__PURE__ */ L("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z" }), "Delete"), ia = J(/* @__PURE__ */ L("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z" }), "DeleteOutline"), aa = J(/* @__PURE__ */ L("path", { d: "M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z" }), "Done"), oa = J(/* @__PURE__ */ L("path", { d: "M18.41 5.8 17.2 4.59c-.78-.78-2.05-.78-2.83 0l-2.68 2.68L3 15.96V20h4.04l8.74-8.74 2.63-2.63c.79-.78.79-2.05 0-2.83M6.21 18H5v-1.21l8.66-8.66 1.21 1.21zM11 20l4-4h6v4z" }), "DriveFileRenameOutline"), sa = J(/* @__PURE__ */ L("path", { d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8" }), "ErrorOutline"), ca = J(/* @__PURE__ */ L("path", { d: "M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5" }), "Group"), la = J(/* @__PURE__ */ L("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"), ua = J([
|
|
3116
|
+
/* @__PURE__ */ L("path", {
|
|
3117
3117
|
fillRule: "evenodd",
|
|
3118
3118
|
d: "M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87"
|
|
3119
3119
|
}, "0"),
|
|
3120
|
-
/* @__PURE__ */
|
|
3120
|
+
/* @__PURE__ */ L("circle", {
|
|
3121
3121
|
cx: "9",
|
|
3122
3122
|
cy: "8",
|
|
3123
3123
|
r: "4",
|
|
3124
3124
|
fillRule: "evenodd"
|
|
3125
3125
|
}, "1"),
|
|
3126
|
-
/* @__PURE__ */
|
|
3126
|
+
/* @__PURE__ */ L("path", {
|
|
3127
3127
|
fillRule: "evenodd",
|
|
3128
3128
|
d: "M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24m-6 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"
|
|
3129
3129
|
}, "2")
|
|
3130
|
-
], "PeopleAlt"), da = J(/* @__PURE__ */
|
|
3130
|
+
], "PeopleAlt"), da = J(/* @__PURE__ */ L("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4" }), "Person"), fa = J(/* @__PURE__ */ L("path", { d: "M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4" }), "PersonAdd"), pa = J(/* @__PURE__ */ L("path", { d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z" }), "Refresh"), ma = J([/* @__PURE__ */ L("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8" }, "0"), /* @__PURE__ */ L("path", { d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z" }, "1")], "Schedule"), ha = J(/* @__PURE__ */ L("path", { d: "M2.01 21 23 12 2.01 3 2 10l15 2-15 2z" }), "Send"), ga = J(/* @__PURE__ */ L("path", { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3" }), "Visibility"), _a = J(/* @__PURE__ */ L("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"), va = J(/* @__PURE__ */ L("path", { d: "M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0" }), "WifiOff");
|
|
3131
3131
|
//#endregion
|
|
3132
3132
|
//#region src/components/ConversationItem.tsx
|
|
3133
3133
|
function ya(e) {
|
|
@@ -3139,30 +3139,30 @@ function ya(e) {
|
|
|
3139
3139
|
}
|
|
3140
3140
|
var ba = _.memo(({ conversation: e, displayName: t, selected: n, onClick: r, currentUser: i }) => {
|
|
3141
3141
|
let a = !!e.group, o = e.unread_count, s = i?.role === "admin";
|
|
3142
|
-
return /* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ L(he, {
|
|
3143
3143
|
disablePadding: !0,
|
|
3144
|
-
children: /* @__PURE__ */
|
|
3144
|
+
children: /* @__PURE__ */ R(_e, {
|
|
3145
3145
|
selected: n,
|
|
3146
3146
|
onClick: r,
|
|
3147
3147
|
sx: { "&.Mui-selected": {
|
|
3148
3148
|
backgroundColor: "action.selected",
|
|
3149
3149
|
"&:hover": { backgroundColor: "action.selected" }
|
|
3150
3150
|
} },
|
|
3151
|
-
children: [/* @__PURE__ */
|
|
3151
|
+
children: [/* @__PURE__ */ L(ge, { children: /* @__PURE__ */ L(ie, {
|
|
3152
3152
|
badgeContent: o,
|
|
3153
3153
|
color: "primary",
|
|
3154
3154
|
overlap: "circular",
|
|
3155
3155
|
invisible: o === 0,
|
|
3156
|
-
children: /* @__PURE__ */
|
|
3156
|
+
children: /* @__PURE__ */ L(A, {
|
|
3157
3157
|
sx: { bgcolor: a ? "primary.main" : "secondary.main" },
|
|
3158
|
-
children:
|
|
3158
|
+
children: L(a ? ca : da, {})
|
|
3159
3159
|
})
|
|
3160
|
-
}) }), /* @__PURE__ */
|
|
3161
|
-
primary: /* @__PURE__ */
|
|
3160
|
+
}) }), /* @__PURE__ */ L(ve, {
|
|
3161
|
+
primary: /* @__PURE__ */ R(j, {
|
|
3162
3162
|
display: "flex",
|
|
3163
3163
|
justifyContent: "space-between",
|
|
3164
3164
|
alignItems: "center",
|
|
3165
|
-
children: [/* @__PURE__ */ I
|
|
3165
|
+
children: [/* @__PURE__ */ L(I, {
|
|
3166
3166
|
variant: "subtitle2",
|
|
3167
3167
|
noWrap: !0,
|
|
3168
3168
|
sx: {
|
|
@@ -3170,7 +3170,7 @@ var ba = _.memo(({ conversation: e, displayName: t, selected: n, onClick: r, cur
|
|
|
3170
3170
|
flex: 1
|
|
3171
3171
|
},
|
|
3172
3172
|
children: t
|
|
3173
|
-
}), /* @__PURE__ */ I
|
|
3173
|
+
}), /* @__PURE__ */ L(I, {
|
|
3174
3174
|
variant: "caption",
|
|
3175
3175
|
color: "text.secondary",
|
|
3176
3176
|
sx: {
|
|
@@ -3180,7 +3180,7 @@ var ba = _.memo(({ conversation: e, displayName: t, selected: n, onClick: r, cur
|
|
|
3180
3180
|
children: ya(e.last_message_at)
|
|
3181
3181
|
})]
|
|
3182
3182
|
}),
|
|
3183
|
-
secondary: /* @__PURE__ */ I
|
|
3183
|
+
secondary: /* @__PURE__ */ L(I, {
|
|
3184
3184
|
variant: "body2",
|
|
3185
3185
|
color: "text.secondary",
|
|
3186
3186
|
noWrap: !0,
|
|
@@ -3190,23 +3190,23 @@ var ba = _.memo(({ conversation: e, displayName: t, selected: n, onClick: r, cur
|
|
|
3190
3190
|
})]
|
|
3191
3191
|
})
|
|
3192
3192
|
});
|
|
3193
|
-
}), xa = () => /* @__PURE__ */
|
|
3193
|
+
}), xa = () => /* @__PURE__ */ R(he, { children: [/* @__PURE__ */ L(ge, { children: /* @__PURE__ */ L(Se, {
|
|
3194
3194
|
variant: "circular",
|
|
3195
3195
|
width: 40,
|
|
3196
3196
|
height: 40
|
|
3197
|
-
}) }), /* @__PURE__ */
|
|
3198
|
-
primary: /* @__PURE__ */
|
|
3197
|
+
}) }), /* @__PURE__ */ L(ve, {
|
|
3198
|
+
primary: /* @__PURE__ */ R(j, {
|
|
3199
3199
|
display: "flex",
|
|
3200
3200
|
justifyContent: "space-between",
|
|
3201
|
-
children: [/* @__PURE__ */
|
|
3201
|
+
children: [/* @__PURE__ */ L(Se, {
|
|
3202
3202
|
variant: "text",
|
|
3203
3203
|
width: "60%"
|
|
3204
|
-
}), /* @__PURE__ */
|
|
3204
|
+
}), /* @__PURE__ */ L(Se, {
|
|
3205
3205
|
variant: "text",
|
|
3206
3206
|
width: "15%"
|
|
3207
3207
|
})]
|
|
3208
3208
|
}),
|
|
3209
|
-
secondary: /* @__PURE__ */
|
|
3209
|
+
secondary: /* @__PURE__ */ L(Se, {
|
|
3210
3210
|
variant: "text",
|
|
3211
3211
|
width: "80%"
|
|
3212
3212
|
})
|
|
@@ -4155,37 +4155,37 @@ var Xu = /* @__PURE__ */ a(((e) => {
|
|
|
4155
4155
|
function ae(e) {
|
|
4156
4156
|
return x(e) === c;
|
|
4157
4157
|
}
|
|
4158
|
-
function
|
|
4158
|
+
function N(e) {
|
|
4159
4159
|
return x(e) === s;
|
|
4160
4160
|
}
|
|
4161
|
-
function
|
|
4161
|
+
function oe(e) {
|
|
4162
4162
|
return typeof e == "object" && !!e && e.$$typeof === n;
|
|
4163
4163
|
}
|
|
4164
|
-
function
|
|
4164
|
+
function se(e) {
|
|
4165
4165
|
return x(e) === d;
|
|
4166
4166
|
}
|
|
4167
|
-
function
|
|
4167
|
+
function ce(e) {
|
|
4168
4168
|
return x(e) === i;
|
|
4169
4169
|
}
|
|
4170
|
-
function
|
|
4170
|
+
function le(e) {
|
|
4171
4171
|
return x(e) === h;
|
|
4172
4172
|
}
|
|
4173
|
-
function
|
|
4173
|
+
function ue(e) {
|
|
4174
4174
|
return x(e) === m;
|
|
4175
4175
|
}
|
|
4176
|
-
function
|
|
4176
|
+
function de(e) {
|
|
4177
4177
|
return x(e) === r;
|
|
4178
4178
|
}
|
|
4179
|
-
function
|
|
4179
|
+
function fe(e) {
|
|
4180
4180
|
return x(e) === o;
|
|
4181
4181
|
}
|
|
4182
|
-
function
|
|
4182
|
+
function P(e) {
|
|
4183
4183
|
return x(e) === a;
|
|
4184
4184
|
}
|
|
4185
|
-
function
|
|
4185
|
+
function pe(e) {
|
|
4186
4186
|
return x(e) === f;
|
|
4187
4187
|
}
|
|
4188
|
-
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = ee, e.ContextProvider = w, e.Element = te, e.ForwardRef = ne, e.Fragment = T, e.Lazy = E, e.Memo = D, e.Portal = re, e.Profiler = O, e.StrictMode = k, e.Suspense = A, e.isAsyncMode = j, e.isConcurrentMode = M, e.isContextConsumer = ae, e.isContextProvider =
|
|
4188
|
+
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = ee, e.ContextProvider = w, e.Element = te, e.ForwardRef = ne, e.Fragment = T, e.Lazy = E, e.Memo = D, e.Portal = re, e.Profiler = O, e.StrictMode = k, e.Suspense = A, e.isAsyncMode = j, e.isConcurrentMode = M, e.isContextConsumer = ae, e.isContextProvider = N, e.isElement = oe, e.isForwardRef = se, e.isFragment = ce, e.isLazy = le, e.isMemo = ue, e.isPortal = de, e.isProfiler = fe, e.isStrictMode = P, e.isSuspense = pe, e.isValidElementType = b, e.typeOf = x;
|
|
4189
4189
|
})();
|
|
4190
4190
|
})), Qu = /* @__PURE__ */ a(((e, t) => {
|
|
4191
4191
|
process.env.NODE_ENV === "production" ? t.exports = Xu() : t.exports = Zu();
|
|
@@ -4472,7 +4472,7 @@ function gd(e) {
|
|
|
4472
4472
|
});
|
|
4473
4473
|
};
|
|
4474
4474
|
if (f.onReset) {
|
|
4475
|
-
var o = f.onReset(x.values,
|
|
4475
|
+
var o = f.onReset(x.values, ve);
|
|
4476
4476
|
ld(o) ? o.then(a) : a();
|
|
4477
4477
|
} else a();
|
|
4478
4478
|
}, [
|
|
@@ -4563,18 +4563,18 @@ function gd(e) {
|
|
|
4563
4563
|
type: "SET_TOUCHED",
|
|
4564
4564
|
payload: e
|
|
4565
4565
|
}), (t === void 0 ? i : t) ? k(x.values) : Promise.resolve();
|
|
4566
|
-
}),
|
|
4566
|
+
}), N = C(function(e) {
|
|
4567
4567
|
S({
|
|
4568
4568
|
type: "SET_ERRORS",
|
|
4569
4569
|
payload: e
|
|
4570
4570
|
});
|
|
4571
|
-
}, []),
|
|
4571
|
+
}, []), oe = Td(function(e, t) {
|
|
4572
4572
|
var r = Q(e) ? e(x.values) : e;
|
|
4573
4573
|
return S({
|
|
4574
4574
|
type: "SET_VALUES",
|
|
4575
4575
|
payload: r
|
|
4576
4576
|
}), (t === void 0 ? n : t) ? k(r) : Promise.resolve();
|
|
4577
|
-
}),
|
|
4577
|
+
}), se = C(function(e, t) {
|
|
4578
4578
|
S({
|
|
4579
4579
|
type: "SET_FIELD_ERROR",
|
|
4580
4580
|
payload: {
|
|
@@ -4582,7 +4582,7 @@ function gd(e) {
|
|
|
4582
4582
|
value: t
|
|
4583
4583
|
}
|
|
4584
4584
|
});
|
|
4585
|
-
}, []),
|
|
4585
|
+
}, []), ce = Td(function(e, t, r) {
|
|
4586
4586
|
var i = Q(t) ? t($(x.values, e)) : t;
|
|
4587
4587
|
return S({
|
|
4588
4588
|
type: "SET_FIELD_VALUE",
|
|
@@ -4591,7 +4591,7 @@ function gd(e) {
|
|
|
4591
4591
|
value: i
|
|
4592
4592
|
}
|
|
4593
4593
|
}), (r === void 0 ? n : r) ? k(dd(x.values, e, i)) : Promise.resolve();
|
|
4594
|
-
}),
|
|
4594
|
+
}), le = C(function(e, t) {
|
|
4595
4595
|
var n = t, r = e, i;
|
|
4596
4596
|
if (!sd(e)) {
|
|
4597
4597
|
e.persist && e.persist();
|
|
@@ -4602,13 +4602,13 @@ function gd(e) {
|
|
|
4602
4602
|
handlerName: "handleChange"
|
|
4603
4603
|
}), r = /number|range/.test(o) ? (i = parseFloat(l), isNaN(i) ? "" : i) : /checkbox/.test(o) ? Cd($(x.values, n), u, l) : f && p ? Sd(f) : l;
|
|
4604
4604
|
}
|
|
4605
|
-
n &&
|
|
4606
|
-
}, [
|
|
4605
|
+
n && ce(n, r);
|
|
4606
|
+
}, [ce, x.values]), ue = Td(function(e) {
|
|
4607
4607
|
if (sd(e)) return function(t) {
|
|
4608
|
-
return
|
|
4608
|
+
return le(t, e);
|
|
4609
4609
|
};
|
|
4610
|
-
|
|
4611
|
-
}),
|
|
4610
|
+
le(e);
|
|
4611
|
+
}), de = Td(function(e, t, n) {
|
|
4612
4612
|
return t === void 0 && (t = !0), S({
|
|
4613
4613
|
type: "SET_FIELD_TOUCHED",
|
|
4614
4614
|
payload: {
|
|
@@ -4616,20 +4616,20 @@ function gd(e) {
|
|
|
4616
4616
|
value: t
|
|
4617
4617
|
}
|
|
4618
4618
|
}), (n === void 0 ? i : n) ? k(x.values) : Promise.resolve();
|
|
4619
|
-
}),
|
|
4619
|
+
}), fe = C(function(e, t) {
|
|
4620
4620
|
e.persist && e.persist();
|
|
4621
4621
|
var n = e.target, r = n.name, i = n.id, a = n.outerHTML, o = t || r || i;
|
|
4622
4622
|
!o && process.env.NODE_ENV !== "production" && _d({
|
|
4623
4623
|
htmlContent: a,
|
|
4624
4624
|
documentationAnchorLink: "handleblur-e-any--void",
|
|
4625
4625
|
handlerName: "handleBlur"
|
|
4626
|
-
}),
|
|
4627
|
-
}, [
|
|
4626
|
+
}), de(o, !0);
|
|
4627
|
+
}, [de]), P = Td(function(e) {
|
|
4628
4628
|
if (sd(e)) return function(t) {
|
|
4629
|
-
return
|
|
4629
|
+
return fe(t, e);
|
|
4630
4630
|
};
|
|
4631
|
-
|
|
4632
|
-
}),
|
|
4631
|
+
fe(e);
|
|
4632
|
+
}), pe = C(function(e) {
|
|
4633
4633
|
Q(e) ? S({
|
|
4634
4634
|
type: "SET_FORMIK_STATE",
|
|
4635
4635
|
payload: e
|
|
@@ -4639,23 +4639,23 @@ function gd(e) {
|
|
|
4639
4639
|
return e;
|
|
4640
4640
|
}
|
|
4641
4641
|
});
|
|
4642
|
-
}, []),
|
|
4642
|
+
}, []), me = C(function(e) {
|
|
4643
4643
|
S({
|
|
4644
4644
|
type: "SET_STATUS",
|
|
4645
4645
|
payload: e
|
|
4646
4646
|
});
|
|
4647
|
-
}, []),
|
|
4647
|
+
}, []), he = C(function(e) {
|
|
4648
4648
|
S({
|
|
4649
4649
|
type: "SET_ISSUBMITTING",
|
|
4650
4650
|
payload: e
|
|
4651
4651
|
});
|
|
4652
|
-
}, []),
|
|
4652
|
+
}, []), ge = Td(function() {
|
|
4653
4653
|
return S({ type: "SUBMIT_ATTEMPT" }), k().then(function(e) {
|
|
4654
4654
|
var t = e instanceof Error;
|
|
4655
4655
|
if (!t && Object.keys(e).length === 0) {
|
|
4656
4656
|
var n;
|
|
4657
4657
|
try {
|
|
4658
|
-
if (n =
|
|
4658
|
+
if (n = ye(), n === void 0) return;
|
|
4659
4659
|
} catch (e) {
|
|
4660
4660
|
throw e;
|
|
4661
4661
|
}
|
|
@@ -4666,33 +4666,33 @@ function gd(e) {
|
|
|
4666
4666
|
});
|
|
4667
4667
|
} else if (_.current && (S({ type: "SUBMIT_FAILURE" }), t)) throw e;
|
|
4668
4668
|
});
|
|
4669
|
-
}),
|
|
4669
|
+
}), _e = Td(function(e) {
|
|
4670
4670
|
if (e && e.preventDefault && Q(e.preventDefault) && e.preventDefault(), e && e.stopPropagation && Q(e.stopPropagation) && e.stopPropagation(), process.env.NODE_ENV !== "production" && typeof document < "u") {
|
|
4671
4671
|
var t = ud();
|
|
4672
4672
|
t !== null && t instanceof HTMLButtonElement && !(t.attributes && t.attributes.getNamedItem("type")) && (process.env.NODE_ENV === "production" ? ku(!1) : ku(!1, "You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type=\"submit\"`. If this is not a submit button, please add `type=\"button\"`."));
|
|
4673
4673
|
}
|
|
4674
|
-
|
|
4674
|
+
ge().catch(function(e) {
|
|
4675
4675
|
console.warn("Warning: An unhandled error was caught from submitForm()", e);
|
|
4676
4676
|
});
|
|
4677
|
-
}),
|
|
4677
|
+
}), ve = {
|
|
4678
4678
|
resetForm: A,
|
|
4679
4679
|
validateForm: k,
|
|
4680
4680
|
validateField: ie,
|
|
4681
|
-
setErrors:
|
|
4682
|
-
setFieldError:
|
|
4683
|
-
setFieldTouched:
|
|
4684
|
-
setFieldValue:
|
|
4685
|
-
setStatus:
|
|
4686
|
-
setSubmitting:
|
|
4681
|
+
setErrors: N,
|
|
4682
|
+
setFieldError: se,
|
|
4683
|
+
setFieldTouched: de,
|
|
4684
|
+
setFieldValue: ce,
|
|
4685
|
+
setStatus: me,
|
|
4686
|
+
setSubmitting: he,
|
|
4687
4687
|
setTouched: ae,
|
|
4688
|
-
setValues:
|
|
4689
|
-
setFormikState:
|
|
4690
|
-
submitForm:
|
|
4691
|
-
},
|
|
4692
|
-
return u(x.values,
|
|
4693
|
-
}),
|
|
4688
|
+
setValues: oe,
|
|
4689
|
+
setFormikState: pe,
|
|
4690
|
+
submitForm: ge
|
|
4691
|
+
}, ye = Td(function() {
|
|
4692
|
+
return u(x.values, ve);
|
|
4693
|
+
}), F = Td(function(e) {
|
|
4694
4694
|
e && e.preventDefault && Q(e.preventDefault) && e.preventDefault(), e && e.stopPropagation && Q(e.stopPropagation) && e.stopPropagation(), A();
|
|
4695
|
-
}),
|
|
4695
|
+
}), be = C(function(e) {
|
|
4696
4696
|
return {
|
|
4697
4697
|
value: $(x.values, e),
|
|
4698
4698
|
error: $(x.errors, e),
|
|
@@ -4705,28 +4705,28 @@ function gd(e) {
|
|
|
4705
4705
|
x.errors,
|
|
4706
4706
|
x.touched,
|
|
4707
4707
|
x.values
|
|
4708
|
-
]),
|
|
4708
|
+
]), xe = C(function(e) {
|
|
4709
4709
|
return {
|
|
4710
4710
|
setValue: function(t, n) {
|
|
4711
|
-
return
|
|
4711
|
+
return ce(e, t, n);
|
|
4712
4712
|
},
|
|
4713
4713
|
setTouched: function(t, n) {
|
|
4714
|
-
return
|
|
4714
|
+
return de(e, t, n);
|
|
4715
4715
|
},
|
|
4716
4716
|
setError: function(t) {
|
|
4717
|
-
return
|
|
4717
|
+
return se(e, t);
|
|
4718
4718
|
}
|
|
4719
4719
|
};
|
|
4720
4720
|
}, [
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
]),
|
|
4721
|
+
ce,
|
|
4722
|
+
de,
|
|
4723
|
+
se
|
|
4724
|
+
]), Se = C(function(e) {
|
|
4725
4725
|
var t = ad(e), n = t ? e.name : e, r = $(x.values, n), i = {
|
|
4726
4726
|
name: n,
|
|
4727
4727
|
value: r,
|
|
4728
|
-
onChange:
|
|
4729
|
-
onBlur:
|
|
4728
|
+
onChange: ue,
|
|
4729
|
+
onBlur: P
|
|
4730
4730
|
};
|
|
4731
4731
|
if (t) {
|
|
4732
4732
|
var a = e.type, o = e.value, s = e.as, c = e.multiple;
|
|
@@ -4734,16 +4734,16 @@ function gd(e) {
|
|
|
4734
4734
|
}
|
|
4735
4735
|
return i;
|
|
4736
4736
|
}, [
|
|
4737
|
-
|
|
4738
|
-
|
|
4737
|
+
P,
|
|
4738
|
+
ue,
|
|
4739
4739
|
x.values
|
|
4740
|
-
]),
|
|
4740
|
+
]), Ce = ne(function() {
|
|
4741
4741
|
return !(0, Du.default)(p.current, x.values);
|
|
4742
|
-
}, [p.current, x.values]),
|
|
4743
|
-
return s === void 0 ||
|
|
4742
|
+
}, [p.current, x.values]), we = ne(function() {
|
|
4743
|
+
return s === void 0 || Ce ? x.errors && Object.keys(x.errors).length === 0 : s !== !1 && Q(s) ? s(f) : s;
|
|
4744
4744
|
}, [
|
|
4745
4745
|
s,
|
|
4746
|
-
|
|
4746
|
+
Ce,
|
|
4747
4747
|
x.errors,
|
|
4748
4748
|
f
|
|
4749
4749
|
]);
|
|
@@ -4752,30 +4752,30 @@ function gd(e) {
|
|
|
4752
4752
|
initialErrors: m.current,
|
|
4753
4753
|
initialTouched: h.current,
|
|
4754
4754
|
initialStatus: g.current,
|
|
4755
|
-
handleBlur:
|
|
4756
|
-
handleChange:
|
|
4757
|
-
handleReset:
|
|
4758
|
-
handleSubmit:
|
|
4755
|
+
handleBlur: P,
|
|
4756
|
+
handleChange: ue,
|
|
4757
|
+
handleReset: F,
|
|
4758
|
+
handleSubmit: _e,
|
|
4759
4759
|
resetForm: A,
|
|
4760
|
-
setErrors:
|
|
4761
|
-
setFormikState:
|
|
4762
|
-
setFieldTouched:
|
|
4763
|
-
setFieldValue:
|
|
4764
|
-
setFieldError:
|
|
4765
|
-
setStatus:
|
|
4766
|
-
setSubmitting:
|
|
4760
|
+
setErrors: N,
|
|
4761
|
+
setFormikState: pe,
|
|
4762
|
+
setFieldTouched: de,
|
|
4763
|
+
setFieldValue: ce,
|
|
4764
|
+
setFieldError: se,
|
|
4765
|
+
setStatus: me,
|
|
4766
|
+
setSubmitting: he,
|
|
4767
4767
|
setTouched: ae,
|
|
4768
|
-
setValues:
|
|
4769
|
-
submitForm:
|
|
4768
|
+
setValues: oe,
|
|
4769
|
+
submitForm: ge,
|
|
4770
4770
|
validateForm: k,
|
|
4771
4771
|
validateField: ie,
|
|
4772
|
-
isValid:
|
|
4773
|
-
dirty:
|
|
4772
|
+
isValid: we,
|
|
4773
|
+
dirty: Ce,
|
|
4774
4774
|
unregisterField: M,
|
|
4775
4775
|
registerField: j,
|
|
4776
|
-
getFieldProps:
|
|
4777
|
-
getFieldMeta:
|
|
4778
|
-
getFieldHelpers:
|
|
4776
|
+
getFieldProps: Se,
|
|
4777
|
+
getFieldMeta: be,
|
|
4778
|
+
getFieldHelpers: xe,
|
|
4779
4779
|
validateOnBlur: i,
|
|
4780
4780
|
validateOnChange: n,
|
|
4781
4781
|
validateOnMount: o
|
|
@@ -5387,27 +5387,27 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5387
5387
|
i[e] = i[t], i[t] = n;
|
|
5388
5388
|
}
|
|
5389
5389
|
return i.join("");
|
|
5390
|
-
}, Pf = ({ showPassword: e, onToggleVisibility: t, onGenerate: n }) => /* @__PURE__ */
|
|
5390
|
+
}, Pf = ({ showPassword: e, onToggleVisibility: t, onGenerate: n }) => /* @__PURE__ */ R(pe, {
|
|
5391
5391
|
position: "end",
|
|
5392
|
-
children: [n && /* @__PURE__ */
|
|
5392
|
+
children: [n && /* @__PURE__ */ L(De, {
|
|
5393
5393
|
title: "Generate Password",
|
|
5394
|
-
children: /* @__PURE__ */
|
|
5394
|
+
children: /* @__PURE__ */ L(P, {
|
|
5395
5395
|
onClick: n,
|
|
5396
5396
|
edge: "end",
|
|
5397
5397
|
size: "small",
|
|
5398
5398
|
sx: { opacity: .7 },
|
|
5399
5399
|
"aria-label": "generate password",
|
|
5400
|
-
children: /* @__PURE__ */
|
|
5400
|
+
children: /* @__PURE__ */ L(ta, {})
|
|
5401
5401
|
})
|
|
5402
|
-
}), /* @__PURE__ */
|
|
5402
|
+
}), /* @__PURE__ */ L(De, {
|
|
5403
5403
|
title: e ? "Hide password" : "Show password",
|
|
5404
|
-
children: /* @__PURE__ */
|
|
5404
|
+
children: /* @__PURE__ */ L(P, {
|
|
5405
5405
|
onClick: t,
|
|
5406
5406
|
edge: "end",
|
|
5407
5407
|
size: "small",
|
|
5408
5408
|
sx: { opacity: .7 },
|
|
5409
5409
|
"aria-label": e ? "hide password" : "show password",
|
|
5410
|
-
children:
|
|
5410
|
+
children: L(e ? _a : ga, {})
|
|
5411
5411
|
})
|
|
5412
5412
|
})]
|
|
5413
5413
|
}), Ff = ({ type: e, autoGenerate: t = !1, formik: n, name: r }) => {
|
|
@@ -5459,7 +5459,7 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5459
5459
|
}
|
|
5460
5460
|
};
|
|
5461
5461
|
}
|
|
5462
|
-
return /* @__PURE__ */
|
|
5462
|
+
return /* @__PURE__ */ L(Te, {
|
|
5463
5463
|
variant: "standard",
|
|
5464
5464
|
onChange: a,
|
|
5465
5465
|
...l,
|
|
@@ -5482,7 +5482,9 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5482
5482
|
}
|
|
5483
5483
|
h(!0);
|
|
5484
5484
|
try {
|
|
5485
|
-
|
|
5485
|
+
let n = t();
|
|
5486
|
+
if (!n) return;
|
|
5487
|
+
p(await n.searchUsers({ name: e }));
|
|
5486
5488
|
} catch (e) {
|
|
5487
5489
|
console.error("Failed to search users:", e), p([]);
|
|
5488
5490
|
} finally {
|
|
@@ -5498,7 +5500,7 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5498
5500
|
if (o) return " ";
|
|
5499
5501
|
if (n && r && n.touched[r] && n.errors[r]) return n.errors[r];
|
|
5500
5502
|
};
|
|
5501
|
-
return /* @__PURE__ */
|
|
5503
|
+
return /* @__PURE__ */ L(k, {
|
|
5502
5504
|
open: u,
|
|
5503
5505
|
onOpen: () => d(!0),
|
|
5504
5506
|
onClose: () => d(!1),
|
|
@@ -5516,15 +5518,15 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5516
5518
|
component: "li",
|
|
5517
5519
|
...e,
|
|
5518
5520
|
key: t.id
|
|
5519
|
-
}, /* @__PURE__ */
|
|
5521
|
+
}, /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(I, {
|
|
5520
5522
|
variant: "body1",
|
|
5521
5523
|
children: t.name
|
|
5522
|
-
}), /* @__PURE__ */ I
|
|
5524
|
+
}), /* @__PURE__ */ L(I, {
|
|
5523
5525
|
variant: "body2",
|
|
5524
5526
|
color: "text.secondary",
|
|
5525
5527
|
children: t.email
|
|
5526
5528
|
})] })),
|
|
5527
|
-
renderInput: (e) => /* @__PURE__ */
|
|
5529
|
+
renderInput: (e) => /* @__PURE__ */ L(Te, {
|
|
5528
5530
|
...e,
|
|
5529
5531
|
label: i,
|
|
5530
5532
|
disabled: a,
|
|
@@ -5533,7 +5535,7 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5533
5535
|
helperText: w() || s,
|
|
5534
5536
|
InputProps: {
|
|
5535
5537
|
...e.InputProps,
|
|
5536
|
-
endAdornment: /* @__PURE__ */
|
|
5538
|
+
endAdornment: /* @__PURE__ */ R(Oe, { children: [m ? /* @__PURE__ */ L(N, { size: 20 }) : null, e.InputProps.endAdornment] })
|
|
5537
5539
|
}
|
|
5538
5540
|
})
|
|
5539
5541
|
});
|
|
@@ -5548,7 +5550,9 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5548
5550
|
onSubmit: async (e, { setSubmitting: a, resetForm: s }) => {
|
|
5549
5551
|
o(null);
|
|
5550
5552
|
try {
|
|
5551
|
-
let a = t()
|
|
5553
|
+
let a = t();
|
|
5554
|
+
if (!a) return;
|
|
5555
|
+
let o = await a.createGroup(i, {
|
|
5552
5556
|
name: e.name.trim(),
|
|
5553
5557
|
read_only: e.read_only
|
|
5554
5558
|
});
|
|
@@ -5557,7 +5561,7 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5557
5561
|
role: e.role
|
|
5558
5562
|
}))), s(), r?.(), n();
|
|
5559
5563
|
} catch (e) {
|
|
5560
|
-
o(
|
|
5564
|
+
o(Ae(e, "Failed to create group"));
|
|
5561
5565
|
}
|
|
5562
5566
|
a(!1);
|
|
5563
5567
|
}
|
|
@@ -5580,7 +5584,7 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5580
5584
|
}, d = () => {
|
|
5581
5585
|
s.resetForm(), n();
|
|
5582
5586
|
};
|
|
5583
|
-
return /* @__PURE__ */
|
|
5587
|
+
return /* @__PURE__ */ R(oe, {
|
|
5584
5588
|
open: e,
|
|
5585
5589
|
onClose: d,
|
|
5586
5590
|
maxWidth: "sm",
|
|
@@ -5590,8 +5594,8 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5590
5594
|
onSubmit: s.handleSubmit
|
|
5591
5595
|
},
|
|
5592
5596
|
children: [
|
|
5593
|
-
/* @__PURE__ */
|
|
5594
|
-
/* @__PURE__ */
|
|
5597
|
+
/* @__PURE__ */ L(le, { children: "Create New Group" }),
|
|
5598
|
+
/* @__PURE__ */ L(ce, { children: /* @__PURE__ */ R(j, {
|
|
5595
5599
|
sx: {
|
|
5596
5600
|
display: "flex",
|
|
5597
5601
|
flexDirection: "column",
|
|
@@ -5599,12 +5603,12 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5599
5603
|
pt: 1
|
|
5600
5604
|
},
|
|
5601
5605
|
children: [
|
|
5602
|
-
a && /* @__PURE__ */
|
|
5606
|
+
a && /* @__PURE__ */ L(D, {
|
|
5603
5607
|
severity: "error",
|
|
5604
5608
|
onClose: () => o(null),
|
|
5605
5609
|
children: a.message
|
|
5606
5610
|
}),
|
|
5607
|
-
/* @__PURE__ */
|
|
5611
|
+
/* @__PURE__ */ L(If, {
|
|
5608
5612
|
label: "Group Name",
|
|
5609
5613
|
name: "name",
|
|
5610
5614
|
formik: s,
|
|
@@ -5612,8 +5616,8 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5612
5616
|
disabled: s.isSubmitting,
|
|
5613
5617
|
placeholder: "e.g., Computer Science 101"
|
|
5614
5618
|
}),
|
|
5615
|
-
/* @__PURE__ */
|
|
5616
|
-
control: /* @__PURE__ */
|
|
5619
|
+
/* @__PURE__ */ L(fe, {
|
|
5620
|
+
control: /* @__PURE__ */ L(we, {
|
|
5617
5621
|
name: "read_only",
|
|
5618
5622
|
checked: s.values.read_only,
|
|
5619
5623
|
onChange: s.handleChange,
|
|
@@ -5621,23 +5625,23 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5621
5625
|
}),
|
|
5622
5626
|
label: "Read-only group (only moderators can post)"
|
|
5623
5627
|
}),
|
|
5624
|
-
/* @__PURE__ */
|
|
5625
|
-
/* @__PURE__ */
|
|
5628
|
+
/* @__PURE__ */ L(ue, { sx: { my: 2 } }),
|
|
5629
|
+
/* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(I, {
|
|
5626
5630
|
variant: "subtitle2",
|
|
5627
5631
|
gutterBottom: !0,
|
|
5628
5632
|
children: "Add Members"
|
|
5629
|
-
}), /* @__PURE__ */
|
|
5633
|
+
}), /* @__PURE__ */ L(Rf, {
|
|
5630
5634
|
multiple: !0,
|
|
5631
5635
|
label: "Search users to add",
|
|
5632
5636
|
value: s.values.members.map((e) => e.user),
|
|
5633
5637
|
onChange: c,
|
|
5634
5638
|
disabled: s.isSubmitting
|
|
5635
5639
|
})] }),
|
|
5636
|
-
s.values.members.length > 0 && /* @__PURE__ */
|
|
5640
|
+
s.values.members.length > 0 && /* @__PURE__ */ R(Oe, { children: [/* @__PURE__ */ L(I, {
|
|
5637
5641
|
variant: "subtitle2",
|
|
5638
5642
|
gutterBottom: !0,
|
|
5639
5643
|
children: "Selected Members"
|
|
5640
|
-
}), s.values.members.map((e) => /* @__PURE__ */
|
|
5644
|
+
}), s.values.members.map((e) => /* @__PURE__ */ R(j, {
|
|
5641
5645
|
sx: {
|
|
5642
5646
|
display: "flex",
|
|
5643
5647
|
alignItems: "center",
|
|
@@ -5645,59 +5649,65 @@ var Pd = /* @__PURE__ */ a(((e, t) => {
|
|
|
5645
5649
|
borderRadius: 1
|
|
5646
5650
|
},
|
|
5647
5651
|
children: [
|
|
5648
|
-
/* @__PURE__ */
|
|
5652
|
+
/* @__PURE__ */ L(j, {
|
|
5649
5653
|
sx: { flex: 1 },
|
|
5650
5654
|
children: e.user.name
|
|
5651
5655
|
}),
|
|
5652
|
-
/* @__PURE__ */
|
|
5656
|
+
/* @__PURE__ */ R(xe, {
|
|
5653
5657
|
value: e.role,
|
|
5654
5658
|
onChange: (t) => l(e.userId, t.target.value),
|
|
5655
5659
|
size: "small",
|
|
5656
5660
|
disabled: s.isSubmitting,
|
|
5657
5661
|
sx: { mr: 2 },
|
|
5658
|
-
children: [/* @__PURE__ */
|
|
5662
|
+
children: [/* @__PURE__ */ L(F, {
|
|
5659
5663
|
value: "member",
|
|
5660
5664
|
children: "Member"
|
|
5661
|
-
}), /* @__PURE__ */
|
|
5665
|
+
}), /* @__PURE__ */ L(F, {
|
|
5662
5666
|
value: "moderator",
|
|
5663
5667
|
children: "Moderator"
|
|
5664
5668
|
})]
|
|
5665
5669
|
}),
|
|
5666
|
-
/* @__PURE__ */
|
|
5670
|
+
/* @__PURE__ */ L(P, {
|
|
5667
5671
|
size: "small",
|
|
5668
5672
|
onClick: () => u(e.userId),
|
|
5669
5673
|
disabled: s.isSubmitting,
|
|
5670
5674
|
color: "error",
|
|
5671
|
-
children: /* @__PURE__ */
|
|
5675
|
+
children: /* @__PURE__ */ L(na, {})
|
|
5672
5676
|
})
|
|
5673
5677
|
]
|
|
5674
5678
|
}, e.userId))] })
|
|
5675
5679
|
]
|
|
5676
5680
|
}) }),
|
|
5677
|
-
/* @__PURE__ */
|
|
5681
|
+
/* @__PURE__ */ R(se, {
|
|
5678
5682
|
sx: { p: 3 },
|
|
5679
|
-
children: [/* @__PURE__ */
|
|
5683
|
+
children: [/* @__PURE__ */ L(M, {
|
|
5680
5684
|
onClick: d,
|
|
5681
5685
|
disabled: s.isSubmitting,
|
|
5682
5686
|
children: "Cancel"
|
|
5683
|
-
}), /* @__PURE__ */
|
|
5687
|
+
}), /* @__PURE__ */ L(M, {
|
|
5684
5688
|
type: "submit",
|
|
5685
5689
|
variant: "contained",
|
|
5686
5690
|
disabled: s.isSubmitting || !s.isValid,
|
|
5687
|
-
startIcon: s.isSubmitting && /* @__PURE__ */
|
|
5691
|
+
startIcon: s.isSubmitting && /* @__PURE__ */ L(N, { size: 16 }),
|
|
5688
5692
|
children: "Create Group"
|
|
5689
5693
|
})]
|
|
5690
5694
|
})
|
|
5691
5695
|
]
|
|
5692
5696
|
});
|
|
5693
5697
|
}, Vf = async (e) => {
|
|
5694
|
-
let n =
|
|
5695
|
-
|
|
5698
|
+
let n = t();
|
|
5699
|
+
if (!n) throw Error("SDK not initialized");
|
|
5700
|
+
let i = await n.getGroups(e);
|
|
5701
|
+
return await r.groups.clear(), await r.groups.bulkPut(i), i;
|
|
5696
5702
|
}, Hf = async (e, n, i) => {
|
|
5697
|
-
let a =
|
|
5698
|
-
|
|
5703
|
+
let a = t();
|
|
5704
|
+
if (!a) throw Error("SDK not initialized");
|
|
5705
|
+
let o = await a.updateGroup(e, n, { name: i });
|
|
5706
|
+
return await r.groups.update(n, { name: o.name }), o;
|
|
5699
5707
|
}, Uf = async (e, n) => {
|
|
5700
|
-
|
|
5708
|
+
let i = t();
|
|
5709
|
+
if (!i) throw Error("SDK not initialized");
|
|
5710
|
+
await i.deleteGroup(e, n), await r.groups.delete(n), await r.summaries.filter((e) => e.group === n).delete();
|
|
5701
5711
|
};
|
|
5702
5712
|
//#endregion
|
|
5703
5713
|
//#region node_modules/dexie-react-hooks/dist/dexie-react-hooks.mjs
|
|
@@ -5754,7 +5764,9 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
5754
5764
|
w(() => {
|
|
5755
5765
|
d.length > 0 && n?.org && (async () => {
|
|
5756
5766
|
if (!n?.org) return;
|
|
5757
|
-
let e = t()
|
|
5767
|
+
let e = t();
|
|
5768
|
+
if (!e) return;
|
|
5769
|
+
let r = {};
|
|
5758
5770
|
for (let t of d) try {
|
|
5759
5771
|
if (t.user !== void 0 && !g[t.user]) {
|
|
5760
5772
|
let n = await e.getUser(t.user);
|
|
@@ -5780,35 +5792,35 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
5780
5792
|
name: v(e)
|
|
5781
5793
|
});
|
|
5782
5794
|
};
|
|
5783
|
-
return /* @__PURE__ */
|
|
5795
|
+
return /* @__PURE__ */ R(j, {
|
|
5784
5796
|
display: "flex",
|
|
5785
5797
|
flexDirection: "column",
|
|
5786
5798
|
height: "100%",
|
|
5787
5799
|
children: [
|
|
5788
|
-
/* @__PURE__ */
|
|
5800
|
+
/* @__PURE__ */ L(O, {
|
|
5789
5801
|
position: "static",
|
|
5790
5802
|
elevation: 0,
|
|
5791
5803
|
sx: {
|
|
5792
5804
|
backgroundColor: "background.default",
|
|
5793
5805
|
color: "text.primary"
|
|
5794
5806
|
},
|
|
5795
|
-
children: /* @__PURE__ */
|
|
5807
|
+
children: /* @__PURE__ */ R(Ee, { children: [/* @__PURE__ */ L(I, {
|
|
5796
5808
|
variant: "h6",
|
|
5797
5809
|
component: "div",
|
|
5798
5810
|
sx: { flexGrow: 1 },
|
|
5799
5811
|
children: "Messages"
|
|
5800
|
-
}), p && /* @__PURE__ */
|
|
5812
|
+
}), p && /* @__PURE__ */ L(De, {
|
|
5801
5813
|
title: "Create Group",
|
|
5802
|
-
children: /* @__PURE__ */
|
|
5814
|
+
children: /* @__PURE__ */ L(P, {
|
|
5803
5815
|
color: "primary",
|
|
5804
5816
|
onClick: () => u(!0),
|
|
5805
5817
|
size: "small",
|
|
5806
5818
|
sx: { mr: -2 },
|
|
5807
|
-
children: /* @__PURE__ */
|
|
5819
|
+
children: /* @__PURE__ */ L(Qi, {})
|
|
5808
5820
|
})
|
|
5809
5821
|
})] })
|
|
5810
5822
|
}),
|
|
5811
|
-
p && n?.org && /* @__PURE__ */
|
|
5823
|
+
p && n?.org && /* @__PURE__ */ L(Bf, {
|
|
5812
5824
|
open: l,
|
|
5813
5825
|
onClose: () => u(!1),
|
|
5814
5826
|
onSuccess: async () => {
|
|
@@ -5816,10 +5828,10 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
5816
5828
|
},
|
|
5817
5829
|
orgId: n.org
|
|
5818
5830
|
}),
|
|
5819
|
-
/* @__PURE__ */
|
|
5831
|
+
/* @__PURE__ */ L(j, {
|
|
5820
5832
|
flex: 1,
|
|
5821
5833
|
overflow: "auto",
|
|
5822
|
-
children: a && !d.length ? /* @__PURE__ */
|
|
5834
|
+
children: a && !d.length ? /* @__PURE__ */ L(me, {
|
|
5823
5835
|
disablePadding: !0,
|
|
5824
5836
|
children: [
|
|
5825
5837
|
1,
|
|
@@ -5827,25 +5839,25 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
5827
5839
|
3,
|
|
5828
5840
|
4,
|
|
5829
5841
|
5
|
|
5830
|
-
].map((e) => /* @__PURE__ */
|
|
5831
|
-
}) : s ? /* @__PURE__ */
|
|
5842
|
+
].map((e) => /* @__PURE__ */ L(xa, {}, e))
|
|
5843
|
+
}) : s ? /* @__PURE__ */ L(j, {
|
|
5832
5844
|
p: 2,
|
|
5833
|
-
children: /* @__PURE__ */
|
|
5845
|
+
children: /* @__PURE__ */ R(D, {
|
|
5834
5846
|
severity: "error",
|
|
5835
5847
|
children: ["Failed to load conversations: ", s.message]
|
|
5836
5848
|
})
|
|
5837
|
-
}) : d.length === 0 && f.length === 0 ? /* @__PURE__ */
|
|
5849
|
+
}) : d.length === 0 && f.length === 0 ? /* @__PURE__ */ L(j, {
|
|
5838
5850
|
display: "flex",
|
|
5839
5851
|
justifyContent: "center",
|
|
5840
5852
|
alignItems: "center",
|
|
5841
5853
|
height: "100%",
|
|
5842
5854
|
p: 2,
|
|
5843
|
-
children: /* @__PURE__ */ I
|
|
5855
|
+
children: /* @__PURE__ */ L(I, {
|
|
5844
5856
|
color: "text.secondary",
|
|
5845
5857
|
align: "center",
|
|
5846
5858
|
children: "No conversations yet"
|
|
5847
5859
|
})
|
|
5848
|
-
}) : /* @__PURE__ */
|
|
5860
|
+
}) : /* @__PURE__ */ L(me, {
|
|
5849
5861
|
disablePadding: !0,
|
|
5850
5862
|
children: (() => {
|
|
5851
5863
|
let e = new Set(d.filter((e) => e.group !== void 0).map((e) => e.group)), t = f.filter((t) => !e.has(t.id)).map((e) => ({
|
|
@@ -5854,7 +5866,7 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
5854
5866
|
message_count: 0,
|
|
5855
5867
|
unread_count: 0
|
|
5856
5868
|
}));
|
|
5857
|
-
return [...[...d].sort((e, t) => new Date(t.last_message_at).getTime() - new Date(e.last_message_at).getTime()), ...t].map((e) => /* @__PURE__ */
|
|
5869
|
+
return [...[...d].sort((e, t) => new Date(t.last_message_at).getTime() - new Date(e.last_message_at).getTime()), ...t].map((e) => /* @__PURE__ */ L(ba, {
|
|
5858
5870
|
conversation: e,
|
|
5859
5871
|
displayName: v(e),
|
|
5860
5872
|
selected: y(e),
|
|
@@ -5874,15 +5886,15 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
5874
5886
|
}, x = (e) => {
|
|
5875
5887
|
o(e), b();
|
|
5876
5888
|
};
|
|
5877
|
-
return /* @__PURE__ */
|
|
5889
|
+
return /* @__PURE__ */ L(O, {
|
|
5878
5890
|
position: "static",
|
|
5879
5891
|
elevation: 0,
|
|
5880
5892
|
sx: {
|
|
5881
5893
|
backgroundColor: "background.default",
|
|
5882
5894
|
color: "text.primary"
|
|
5883
5895
|
},
|
|
5884
|
-
children: /* @__PURE__ */
|
|
5885
|
-
i && /* @__PURE__ */
|
|
5896
|
+
children: /* @__PURE__ */ R(Ee, { children: [
|
|
5897
|
+
i && /* @__PURE__ */ L(P, {
|
|
5886
5898
|
edge: "start",
|
|
5887
5899
|
color: "inherit",
|
|
5888
5900
|
onClick: i,
|
|
@@ -5894,94 +5906,94 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
5894
5906
|
md: "none"
|
|
5895
5907
|
}
|
|
5896
5908
|
},
|
|
5897
|
-
children: /* @__PURE__ */
|
|
5909
|
+
children: /* @__PURE__ */ L($i, {})
|
|
5898
5910
|
}),
|
|
5899
|
-
/* @__PURE__ */
|
|
5911
|
+
/* @__PURE__ */ L(A, {
|
|
5900
5912
|
sx: {
|
|
5901
5913
|
bgcolor: m ? "primary.main" : "secondary.main",
|
|
5902
5914
|
mr: 2
|
|
5903
5915
|
},
|
|
5904
|
-
children:
|
|
5916
|
+
children: L(m ? ca : da, {})
|
|
5905
5917
|
}),
|
|
5906
|
-
/* @__PURE__ */
|
|
5918
|
+
/* @__PURE__ */ R(j, {
|
|
5907
5919
|
flex: 1,
|
|
5908
|
-
children: [/* @__PURE__ */ I
|
|
5920
|
+
children: [/* @__PURE__ */ L(I, {
|
|
5909
5921
|
variant: "h6",
|
|
5910
5922
|
component: "div",
|
|
5911
5923
|
noWrap: !0,
|
|
5912
5924
|
children: e
|
|
5913
|
-
}), n && /* @__PURE__ */ I
|
|
5925
|
+
}), n && /* @__PURE__ */ L(I, {
|
|
5914
5926
|
variant: "caption",
|
|
5915
5927
|
color: "inherit",
|
|
5916
5928
|
sx: { opacity: .7 },
|
|
5917
5929
|
children: n
|
|
5918
5930
|
})]
|
|
5919
5931
|
}),
|
|
5920
|
-
c && m && /* @__PURE__ */
|
|
5932
|
+
c && m && /* @__PURE__ */ L(P, {
|
|
5921
5933
|
color: "inherit",
|
|
5922
5934
|
onClick: l,
|
|
5923
5935
|
title: "Members",
|
|
5924
5936
|
sx: { mr: .5 },
|
|
5925
|
-
children: /* @__PURE__ */
|
|
5937
|
+
children: /* @__PURE__ */ L(ua, {})
|
|
5926
5938
|
}),
|
|
5927
|
-
u && m && /* @__PURE__ */
|
|
5939
|
+
u && m && /* @__PURE__ */ R(Oe, { children: [/* @__PURE__ */ L(P, {
|
|
5928
5940
|
color: "inherit",
|
|
5929
5941
|
onClick: (e) => v(e.currentTarget),
|
|
5930
5942
|
disabled: p,
|
|
5931
5943
|
title: "Manage group",
|
|
5932
|
-
children: /* @__PURE__ */
|
|
5933
|
-
}), /* @__PURE__ */
|
|
5944
|
+
children: /* @__PURE__ */ L(la, {})
|
|
5945
|
+
}), /* @__PURE__ */ R(ye, {
|
|
5934
5946
|
anchorEl: _,
|
|
5935
5947
|
open: !!_,
|
|
5936
5948
|
onClose: () => v(null),
|
|
5937
|
-
children: [/* @__PURE__ */
|
|
5949
|
+
children: [/* @__PURE__ */ R(F, {
|
|
5938
5950
|
onClick: () => {
|
|
5939
5951
|
v(null), d?.();
|
|
5940
5952
|
},
|
|
5941
|
-
children: [/* @__PURE__ */
|
|
5953
|
+
children: [/* @__PURE__ */ L(oa, {
|
|
5942
5954
|
fontSize: "small",
|
|
5943
5955
|
sx: { mr: 1 }
|
|
5944
5956
|
}), "Rename Group"]
|
|
5945
|
-
}), /* @__PURE__ */
|
|
5957
|
+
}), /* @__PURE__ */ R(F, {
|
|
5946
5958
|
onClick: () => {
|
|
5947
5959
|
v(null), f?.();
|
|
5948
5960
|
},
|
|
5949
5961
|
sx: { color: "error.main" },
|
|
5950
|
-
children: [/* @__PURE__ */
|
|
5962
|
+
children: [/* @__PURE__ */ L(ia, {
|
|
5951
5963
|
fontSize: "small",
|
|
5952
5964
|
sx: { mr: 1 }
|
|
5953
5965
|
}), "Delete Group"]
|
|
5954
5966
|
})]
|
|
5955
5967
|
})] }),
|
|
5956
|
-
a && m && /* @__PURE__ */
|
|
5968
|
+
a && m && /* @__PURE__ */ R(j, {
|
|
5957
5969
|
sx: {
|
|
5958
5970
|
display: "flex",
|
|
5959
5971
|
alignItems: "center",
|
|
5960
5972
|
mr: 1
|
|
5961
5973
|
},
|
|
5962
|
-
children: [/* @__PURE__ */
|
|
5974
|
+
children: [/* @__PURE__ */ L(M, {
|
|
5963
5975
|
variant: "contained",
|
|
5964
5976
|
color: "primary",
|
|
5965
|
-
startIcon: /* @__PURE__ */
|
|
5966
|
-
endIcon: /* @__PURE__ */
|
|
5977
|
+
startIcon: /* @__PURE__ */ L(fa, {}),
|
|
5978
|
+
endIcon: /* @__PURE__ */ L(ea, {}),
|
|
5967
5979
|
onClick: y,
|
|
5968
5980
|
disabled: s,
|
|
5969
5981
|
children: s ? "Joining..." : "Join"
|
|
5970
|
-
}), /* @__PURE__ */
|
|
5982
|
+
}), /* @__PURE__ */ R(ye, {
|
|
5971
5983
|
anchorEl: h,
|
|
5972
5984
|
open: !!h,
|
|
5973
5985
|
onClose: b,
|
|
5974
|
-
children: [/* @__PURE__ */
|
|
5986
|
+
children: [/* @__PURE__ */ L(F, {
|
|
5975
5987
|
onClick: () => x("member"),
|
|
5976
5988
|
children: "Member"
|
|
5977
|
-
}), /* @__PURE__ */
|
|
5989
|
+
}), /* @__PURE__ */ L(F, {
|
|
5978
5990
|
onClick: () => x("moderator"),
|
|
5979
5991
|
children: "Moderator"
|
|
5980
5992
|
})]
|
|
5981
5993
|
})]
|
|
5982
5994
|
}),
|
|
5983
|
-
!r && /* @__PURE__ */
|
|
5984
|
-
icon: /* @__PURE__ */
|
|
5995
|
+
!r && /* @__PURE__ */ L(ae, {
|
|
5996
|
+
icon: /* @__PURE__ */ L(va, {}),
|
|
5985
5997
|
label: "Disconnected",
|
|
5986
5998
|
size: "small",
|
|
5987
5999
|
color: "warning",
|
|
@@ -5989,14 +6001,14 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
5989
6001
|
})
|
|
5990
6002
|
] })
|
|
5991
6003
|
});
|
|
5992
|
-
}, Jf = ({ member: e, currentUserId: t, canManage: n, removing: r, updating: i, onRemove: a, onRoleChange: o }) => /* @__PURE__ */
|
|
5993
|
-
secondaryAction: n ? /* @__PURE__ */
|
|
6004
|
+
}, Jf = ({ member: e, currentUserId: t, canManage: n, removing: r, updating: i, onRemove: a, onRoleChange: o }) => /* @__PURE__ */ R(he, {
|
|
6005
|
+
secondaryAction: n ? /* @__PURE__ */ R(j, {
|
|
5994
6006
|
sx: {
|
|
5995
6007
|
display: "flex",
|
|
5996
6008
|
alignItems: "center",
|
|
5997
6009
|
gap: .5
|
|
5998
6010
|
},
|
|
5999
|
-
children: [/* @__PURE__ */
|
|
6011
|
+
children: [/* @__PURE__ */ R(xe, {
|
|
6000
6012
|
value: e.role,
|
|
6001
6013
|
onChange: (t) => o(e.id, t.target.value),
|
|
6002
6014
|
size: "small",
|
|
@@ -6004,40 +6016,40 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6004
6016
|
variant: "standard",
|
|
6005
6017
|
disableUnderline: !0,
|
|
6006
6018
|
sx: { fontSize: 12 },
|
|
6007
|
-
children: [/* @__PURE__ */
|
|
6019
|
+
children: [/* @__PURE__ */ L(F, {
|
|
6008
6020
|
value: "member",
|
|
6009
6021
|
children: "Member"
|
|
6010
|
-
}), /* @__PURE__ */
|
|
6022
|
+
}), /* @__PURE__ */ L(F, {
|
|
6011
6023
|
value: "moderator",
|
|
6012
6024
|
children: "Moderator"
|
|
6013
6025
|
})]
|
|
6014
|
-
}), /* @__PURE__ */
|
|
6026
|
+
}), /* @__PURE__ */ L(P, {
|
|
6015
6027
|
size: "small",
|
|
6016
6028
|
color: "error",
|
|
6017
6029
|
onClick: () => a(e.id),
|
|
6018
6030
|
disabled: r || i,
|
|
6019
|
-
children: r ? /* @__PURE__ */
|
|
6031
|
+
children: r ? /* @__PURE__ */ L(N, { size: 16 }) : /* @__PURE__ */ L(ra, { fontSize: "small" })
|
|
6020
6032
|
})]
|
|
6021
6033
|
}) : void 0,
|
|
6022
|
-
children: [/* @__PURE__ */
|
|
6034
|
+
children: [/* @__PURE__ */ L(A, {
|
|
6023
6035
|
sx: {
|
|
6024
6036
|
mr: 1.5,
|
|
6025
6037
|
width: 32,
|
|
6026
6038
|
height: 32,
|
|
6027
6039
|
bgcolor: "primary.main"
|
|
6028
6040
|
},
|
|
6029
|
-
children: /* @__PURE__ */
|
|
6030
|
-
}), /* @__PURE__ */
|
|
6041
|
+
children: /* @__PURE__ */ L(da, { fontSize: "small" })
|
|
6042
|
+
}), /* @__PURE__ */ L(ve, { primary: /* @__PURE__ */ R(j, {
|
|
6031
6043
|
sx: {
|
|
6032
6044
|
display: "flex",
|
|
6033
6045
|
alignItems: "center",
|
|
6034
6046
|
gap: 1
|
|
6035
6047
|
},
|
|
6036
|
-
children: [/* @__PURE__ */ I
|
|
6048
|
+
children: [/* @__PURE__ */ L(I, {
|
|
6037
6049
|
variant: "body1",
|
|
6038
6050
|
noWrap: !0,
|
|
6039
6051
|
children: e.name
|
|
6040
|
-
}), e.id === t && /* @__PURE__ */ I
|
|
6052
|
+
}), e.id === t && /* @__PURE__ */ L(I, {
|
|
6041
6053
|
variant: "caption",
|
|
6042
6054
|
color: "text.secondary",
|
|
6043
6055
|
children: "(you)"
|
|
@@ -6060,14 +6072,14 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6060
6072
|
}, g = (e) => {
|
|
6061
6073
|
c((t) => t.filter((t) => t.id !== e));
|
|
6062
6074
|
};
|
|
6063
|
-
return /* @__PURE__ */
|
|
6075
|
+
return /* @__PURE__ */ R(oe, {
|
|
6064
6076
|
open: e,
|
|
6065
6077
|
onClose: p,
|
|
6066
6078
|
maxWidth: "xs",
|
|
6067
6079
|
fullWidth: !0,
|
|
6068
6080
|
children: [
|
|
6069
|
-
/* @__PURE__ */
|
|
6070
|
-
/* @__PURE__ */
|
|
6081
|
+
/* @__PURE__ */ L(le, { children: "Add Members" }),
|
|
6082
|
+
/* @__PURE__ */ L(ce, { children: /* @__PURE__ */ R(j, {
|
|
6071
6083
|
sx: {
|
|
6072
6084
|
display: "flex",
|
|
6073
6085
|
flexDirection: "column",
|
|
@@ -6075,26 +6087,26 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6075
6087
|
pt: 1
|
|
6076
6088
|
},
|
|
6077
6089
|
children: [
|
|
6078
|
-
d && /* @__PURE__ */
|
|
6090
|
+
d && /* @__PURE__ */ L(D, {
|
|
6079
6091
|
severity: "error",
|
|
6080
6092
|
onClose: () => f(null),
|
|
6081
6093
|
children: d.message
|
|
6082
6094
|
}),
|
|
6083
|
-
/* @__PURE__ */
|
|
6095
|
+
/* @__PURE__ */ L(Rf, {
|
|
6084
6096
|
multiple: !0,
|
|
6085
6097
|
label: "Search users to add",
|
|
6086
6098
|
value: s.map((e) => e.user),
|
|
6087
6099
|
onChange: m,
|
|
6088
6100
|
disabled: l
|
|
6089
6101
|
}),
|
|
6090
|
-
s.map((e) => /* @__PURE__ */
|
|
6102
|
+
s.map((e) => /* @__PURE__ */ R(j, {
|
|
6091
6103
|
sx: {
|
|
6092
6104
|
display: "flex",
|
|
6093
6105
|
alignItems: "center",
|
|
6094
6106
|
justifyContent: "space-between"
|
|
6095
6107
|
},
|
|
6096
6108
|
children: [
|
|
6097
|
-
/* @__PURE__ */ I
|
|
6109
|
+
/* @__PURE__ */ L(I, {
|
|
6098
6110
|
variant: "body2",
|
|
6099
6111
|
noWrap: !0,
|
|
6100
6112
|
sx: {
|
|
@@ -6103,56 +6115,56 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6103
6115
|
},
|
|
6104
6116
|
children: e.user.name
|
|
6105
6117
|
}),
|
|
6106
|
-
/* @__PURE__ */
|
|
6118
|
+
/* @__PURE__ */ R(xe, {
|
|
6107
6119
|
value: e.role,
|
|
6108
6120
|
onChange: (t) => h(e.id, t.target.value),
|
|
6109
6121
|
size: "small",
|
|
6110
6122
|
disabled: l,
|
|
6111
6123
|
sx: { mr: 1 },
|
|
6112
|
-
children: [/* @__PURE__ */
|
|
6124
|
+
children: [/* @__PURE__ */ L(F, {
|
|
6113
6125
|
value: "member",
|
|
6114
6126
|
children: "Member"
|
|
6115
|
-
}), /* @__PURE__ */
|
|
6127
|
+
}), /* @__PURE__ */ L(F, {
|
|
6116
6128
|
value: "moderator",
|
|
6117
6129
|
children: "Moderator"
|
|
6118
6130
|
})]
|
|
6119
6131
|
}),
|
|
6120
|
-
/* @__PURE__ */
|
|
6132
|
+
/* @__PURE__ */ L(P, {
|
|
6121
6133
|
size: "small",
|
|
6122
6134
|
color: "error",
|
|
6123
6135
|
onClick: () => g(e.id),
|
|
6124
6136
|
disabled: l,
|
|
6125
|
-
children: /* @__PURE__ */
|
|
6137
|
+
children: /* @__PURE__ */ L(na, { fontSize: "small" })
|
|
6126
6138
|
})
|
|
6127
6139
|
]
|
|
6128
6140
|
}, e.id))
|
|
6129
6141
|
]
|
|
6130
6142
|
}) }),
|
|
6131
|
-
/* @__PURE__ */
|
|
6143
|
+
/* @__PURE__ */ R(se, {
|
|
6132
6144
|
sx: { p: 2 },
|
|
6133
|
-
children: [/* @__PURE__ */
|
|
6145
|
+
children: [/* @__PURE__ */ L(M, {
|
|
6134
6146
|
onClick: p,
|
|
6135
6147
|
disabled: l,
|
|
6136
6148
|
children: "Cancel"
|
|
6137
|
-
}), /* @__PURE__ */
|
|
6149
|
+
}), /* @__PURE__ */ L(M, {
|
|
6138
6150
|
variant: "contained",
|
|
6139
6151
|
onClick: async () => {
|
|
6140
6152
|
if (s.length !== 0) {
|
|
6141
6153
|
u(!0), f(null);
|
|
6142
6154
|
try {
|
|
6143
|
-
await t()
|
|
6155
|
+
await t()?.addGroupMembers(r, i, s.map((e) => ({
|
|
6144
6156
|
user: e.id,
|
|
6145
6157
|
role: e.role
|
|
6146
6158
|
}))), p(), o();
|
|
6147
6159
|
} catch (e) {
|
|
6148
|
-
f(
|
|
6160
|
+
f(Ae(e, "Failed to add members"));
|
|
6149
6161
|
} finally {
|
|
6150
6162
|
u(!1);
|
|
6151
6163
|
}
|
|
6152
6164
|
}
|
|
6153
6165
|
},
|
|
6154
6166
|
disabled: l || s.length === 0,
|
|
6155
|
-
startIcon: l && /* @__PURE__ */
|
|
6167
|
+
startIcon: l && /* @__PURE__ */ L(N, { size: 16 }),
|
|
6156
6168
|
children: l ? "Adding..." : `Add${s.length > 0 ? ` ${s.length}` : ""}`
|
|
6157
6169
|
})]
|
|
6158
6170
|
})
|
|
@@ -6162,9 +6174,11 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6162
6174
|
let [s, c] = E([]), [l, u] = E(!1), [d, f] = E(null), [p, m] = E(null), [h, g] = E(null), [_, v] = E(!1), y = C(async () => {
|
|
6163
6175
|
u(!0), f(null);
|
|
6164
6176
|
try {
|
|
6165
|
-
|
|
6177
|
+
let e = t();
|
|
6178
|
+
if (!e) return;
|
|
6179
|
+
c(await e.getGroupMembers(r, i));
|
|
6166
6180
|
} catch (e) {
|
|
6167
|
-
f(
|
|
6181
|
+
f(Ae(e, "Failed to load members"));
|
|
6168
6182
|
} finally {
|
|
6169
6183
|
u(!1);
|
|
6170
6184
|
}
|
|
@@ -6175,16 +6189,20 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6175
6189
|
let b = async (e) => {
|
|
6176
6190
|
m(e);
|
|
6177
6191
|
try {
|
|
6178
|
-
|
|
6192
|
+
let n = t();
|
|
6193
|
+
if (!n) return;
|
|
6194
|
+
await n.removeGroupMember(r, i, e), c((t) => t.filter((t) => t.id !== e));
|
|
6179
6195
|
} catch (e) {
|
|
6180
|
-
f(
|
|
6196
|
+
f(Ae(e, "Failed to remove member"));
|
|
6181
6197
|
} finally {
|
|
6182
6198
|
m(null);
|
|
6183
6199
|
}
|
|
6184
6200
|
}, x = async (e, n) => {
|
|
6185
6201
|
g(e);
|
|
6186
6202
|
try {
|
|
6187
|
-
|
|
6203
|
+
let a = t();
|
|
6204
|
+
if (!a) return;
|
|
6205
|
+
await a.addGroupMembers(r, i, [{
|
|
6188
6206
|
user: e,
|
|
6189
6207
|
role: n
|
|
6190
6208
|
}]), c((t) => t.map((t) => t.id === e ? {
|
|
@@ -6192,12 +6210,12 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6192
6210
|
role: n
|
|
6193
6211
|
} : t));
|
|
6194
6212
|
} catch (e) {
|
|
6195
|
-
f(
|
|
6213
|
+
f(Ae(e, "Failed to update role"));
|
|
6196
6214
|
} finally {
|
|
6197
6215
|
g(null);
|
|
6198
6216
|
}
|
|
6199
6217
|
};
|
|
6200
|
-
return /* @__PURE__ */
|
|
6218
|
+
return /* @__PURE__ */ R(Oe, { children: [/* @__PURE__ */ R(de, {
|
|
6201
6219
|
anchor: "right",
|
|
6202
6220
|
open: e,
|
|
6203
6221
|
onClose: n,
|
|
@@ -6205,7 +6223,7 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6205
6223
|
width: 360,
|
|
6206
6224
|
maxWidth: "100vw"
|
|
6207
6225
|
} } },
|
|
6208
|
-
children: [/* @__PURE__ */
|
|
6226
|
+
children: [/* @__PURE__ */ R(j, {
|
|
6209
6227
|
sx: {
|
|
6210
6228
|
display: "flex",
|
|
6211
6229
|
alignItems: "center",
|
|
@@ -6213,15 +6231,15 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6213
6231
|
px: 2,
|
|
6214
6232
|
py: 1.5
|
|
6215
6233
|
},
|
|
6216
|
-
children: [/* @__PURE__ */ I
|
|
6234
|
+
children: [/* @__PURE__ */ L(I, {
|
|
6217
6235
|
variant: "h6",
|
|
6218
6236
|
children: "Members"
|
|
6219
|
-
}), /* @__PURE__ */
|
|
6237
|
+
}), /* @__PURE__ */ L(P, {
|
|
6220
6238
|
size: "small",
|
|
6221
6239
|
onClick: n,
|
|
6222
|
-
children: /* @__PURE__ */
|
|
6240
|
+
children: /* @__PURE__ */ L(na, {})
|
|
6223
6241
|
})]
|
|
6224
|
-
}), /* @__PURE__ */
|
|
6242
|
+
}), /* @__PURE__ */ R(j, {
|
|
6225
6243
|
sx: {
|
|
6226
6244
|
display: "flex",
|
|
6227
6245
|
flexDirection: "column",
|
|
@@ -6229,27 +6247,27 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6229
6247
|
flex: 1
|
|
6230
6248
|
},
|
|
6231
6249
|
children: [
|
|
6232
|
-
d && /* @__PURE__ */
|
|
6250
|
+
d && /* @__PURE__ */ L(D, {
|
|
6233
6251
|
severity: "error",
|
|
6234
6252
|
onClose: () => f(null),
|
|
6235
6253
|
sx: { m: 2 },
|
|
6236
6254
|
children: d.message
|
|
6237
6255
|
}),
|
|
6238
|
-
/* @__PURE__ */
|
|
6256
|
+
/* @__PURE__ */ L(j, {
|
|
6239
6257
|
sx: {
|
|
6240
6258
|
overflow: "auto",
|
|
6241
6259
|
flex: 1
|
|
6242
6260
|
},
|
|
6243
|
-
children: l ? /* @__PURE__ */
|
|
6261
|
+
children: l ? /* @__PURE__ */ L(j, {
|
|
6244
6262
|
sx: {
|
|
6245
6263
|
display: "flex",
|
|
6246
6264
|
justifyContent: "center",
|
|
6247
6265
|
mt: 4
|
|
6248
6266
|
},
|
|
6249
|
-
children: /* @__PURE__ */
|
|
6250
|
-
}) : /* @__PURE__ */
|
|
6267
|
+
children: /* @__PURE__ */ L(N, { size: 32 })
|
|
6268
|
+
}) : /* @__PURE__ */ R(me, {
|
|
6251
6269
|
disablePadding: !0,
|
|
6252
|
-
children: [s.map((e) => /* @__PURE__ */
|
|
6270
|
+
children: [s.map((e) => /* @__PURE__ */ L(Jf, {
|
|
6253
6271
|
member: e,
|
|
6254
6272
|
currentUserId: a,
|
|
6255
6273
|
canManage: o,
|
|
@@ -6257,12 +6275,12 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6257
6275
|
updating: h === e.id,
|
|
6258
6276
|
onRemove: b,
|
|
6259
6277
|
onRoleChange: x
|
|
6260
|
-
}, e.id)), s.length === 0 && /* @__PURE__ */
|
|
6278
|
+
}, e.id)), s.length === 0 && /* @__PURE__ */ L(j, {
|
|
6261
6279
|
sx: {
|
|
6262
6280
|
p: 3,
|
|
6263
6281
|
textAlign: "center"
|
|
6264
6282
|
},
|
|
6265
|
-
children: /* @__PURE__ */ I
|
|
6283
|
+
children: /* @__PURE__ */ L(I, {
|
|
6266
6284
|
variant: "body2",
|
|
6267
6285
|
color: "text.secondary",
|
|
6268
6286
|
children: "No members yet"
|
|
@@ -6270,13 +6288,13 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6270
6288
|
})]
|
|
6271
6289
|
})
|
|
6272
6290
|
}),
|
|
6273
|
-
o && /* @__PURE__ */
|
|
6291
|
+
o && /* @__PURE__ */ L(j, {
|
|
6274
6292
|
sx: {
|
|
6275
6293
|
p: 2,
|
|
6276
6294
|
borderTop: 1,
|
|
6277
6295
|
borderColor: "divider"
|
|
6278
6296
|
},
|
|
6279
|
-
children: /* @__PURE__ */
|
|
6297
|
+
children: /* @__PURE__ */ L(M, {
|
|
6280
6298
|
variant: "outlined",
|
|
6281
6299
|
color: "secondary",
|
|
6282
6300
|
fullWidth: !0,
|
|
@@ -6286,7 +6304,7 @@ var Kf = ({ selectedConversation: e, currentUser: n, onConversationSelect: i })
|
|
|
6286
6304
|
})
|
|
6287
6305
|
]
|
|
6288
6306
|
})]
|
|
6289
|
-
}), /* @__PURE__ */
|
|
6307
|
+
}), /* @__PURE__ */ L(Yf, {
|
|
6290
6308
|
open: _,
|
|
6291
6309
|
onClose: () => v(!1),
|
|
6292
6310
|
orgId: r,
|
|
@@ -6315,11 +6333,11 @@ var Qf = _.memo(({ message: e, isOwnMessage: t, senderName: n, showSenderName: r
|
|
|
6315
6333
|
opacity: .7,
|
|
6316
6334
|
verticalAlign: "middle"
|
|
6317
6335
|
};
|
|
6318
|
-
return o === "failed" ? /* @__PURE__ */
|
|
6336
|
+
return o === "failed" ? /* @__PURE__ */ L(sa, { sx: {
|
|
6319
6337
|
...e,
|
|
6320
6338
|
color: "error.main"
|
|
6321
|
-
} }) :
|
|
6322
|
-
}, u = /* @__PURE__ */
|
|
6339
|
+
} }) : L(o === "sending" || s ? ma : aa, { sx: e });
|
|
6340
|
+
}, u = /* @__PURE__ */ L(A, {
|
|
6323
6341
|
sx: {
|
|
6324
6342
|
width: 32,
|
|
6325
6343
|
height: 32,
|
|
@@ -6330,7 +6348,7 @@ var Qf = _.memo(({ message: e, isOwnMessage: t, senderName: n, showSenderName: r
|
|
|
6330
6348
|
},
|
|
6331
6349
|
children: c(n)
|
|
6332
6350
|
});
|
|
6333
|
-
return /* @__PURE__ */
|
|
6351
|
+
return /* @__PURE__ */ R(j, {
|
|
6334
6352
|
display: "flex",
|
|
6335
6353
|
justifyContent: t ? "flex-end" : "flex-start",
|
|
6336
6354
|
alignItems: "flex-end",
|
|
@@ -6338,7 +6356,7 @@ var Qf = _.memo(({ message: e, isOwnMessage: t, senderName: n, showSenderName: r
|
|
|
6338
6356
|
gap: 1,
|
|
6339
6357
|
children: [
|
|
6340
6358
|
!t && u,
|
|
6341
|
-
/* @__PURE__ */
|
|
6359
|
+
/* @__PURE__ */ R(be, {
|
|
6342
6360
|
elevation: 1,
|
|
6343
6361
|
sx: {
|
|
6344
6362
|
maxWidth: "80%",
|
|
@@ -6351,46 +6369,46 @@ var Qf = _.memo(({ message: e, isOwnMessage: t, senderName: n, showSenderName: r
|
|
|
6351
6369
|
borderBottomRightRadius: !t || !a ? void 0 : 4
|
|
6352
6370
|
},
|
|
6353
6371
|
children: [
|
|
6354
|
-
!t && r && i && /* @__PURE__ */ I
|
|
6372
|
+
!t && r && i && /* @__PURE__ */ L(I, {
|
|
6355
6373
|
variant: "caption",
|
|
6356
6374
|
fontWeight: "bold",
|
|
6357
6375
|
display: "block",
|
|
6358
6376
|
mb: .5,
|
|
6359
6377
|
children: n || `User ${e.sender}`
|
|
6360
6378
|
}),
|
|
6361
|
-
/* @__PURE__ */ I
|
|
6379
|
+
/* @__PURE__ */ L(I, {
|
|
6362
6380
|
variant: "body1",
|
|
6363
6381
|
sx: { whiteSpace: "pre-wrap" },
|
|
6364
6382
|
children: e.content
|
|
6365
6383
|
}),
|
|
6366
|
-
a && /* @__PURE__ */
|
|
6384
|
+
a && /* @__PURE__ */ R(j, {
|
|
6367
6385
|
display: "flex",
|
|
6368
6386
|
justifyContent: "flex-end",
|
|
6369
6387
|
alignItems: "center",
|
|
6370
6388
|
mt: .5,
|
|
6371
|
-
children: [/* @__PURE__ */ I
|
|
6389
|
+
children: [/* @__PURE__ */ L(I, {
|
|
6372
6390
|
variant: "caption",
|
|
6373
6391
|
color: t ? "inherit" : "text.secondary",
|
|
6374
6392
|
sx: { opacity: .7 },
|
|
6375
6393
|
children: Zf(new Date(e.created_at))
|
|
6376
|
-
}), /* @__PURE__ */
|
|
6394
|
+
}), /* @__PURE__ */ L(l, {})]
|
|
6377
6395
|
})
|
|
6378
6396
|
]
|
|
6379
6397
|
}),
|
|
6380
6398
|
t && u
|
|
6381
6399
|
]
|
|
6382
6400
|
});
|
|
6383
|
-
}), $f = ({ isOwnMessage: e = !1 }) => /* @__PURE__ */
|
|
6401
|
+
}), $f = ({ isOwnMessage: e = !1 }) => /* @__PURE__ */ L(j, {
|
|
6384
6402
|
display: "flex",
|
|
6385
6403
|
justifyContent: e ? "flex-end" : "flex-start",
|
|
6386
6404
|
mb: 1,
|
|
6387
|
-
children: /* @__PURE__ */
|
|
6405
|
+
children: /* @__PURE__ */ R(j, {
|
|
6388
6406
|
maxWidth: "70%",
|
|
6389
|
-
children: [!e && /* @__PURE__ */
|
|
6407
|
+
children: [!e && /* @__PURE__ */ L(Se, {
|
|
6390
6408
|
variant: "text",
|
|
6391
6409
|
width: 80,
|
|
6392
6410
|
sx: { mb: .5 }
|
|
6393
|
-
}), /* @__PURE__ */
|
|
6411
|
+
}), /* @__PURE__ */ L(Se, {
|
|
6394
6412
|
variant: "rounded",
|
|
6395
6413
|
width: Math.random() * 200 + 150,
|
|
6396
6414
|
height: 60,
|
|
@@ -6420,13 +6438,13 @@ var Qf = _.memo(({ message: e, isOwnMessage: t, senderName: n, showSenderName: r
|
|
|
6420
6438
|
n,
|
|
6421
6439
|
r,
|
|
6422
6440
|
i
|
|
6423
|
-
]), e ? /* @__PURE__ */
|
|
6441
|
+
]), e ? /* @__PURE__ */ L(j, {
|
|
6424
6442
|
ref: a,
|
|
6425
6443
|
display: "flex",
|
|
6426
6444
|
justifyContent: "center",
|
|
6427
6445
|
alignItems: "center",
|
|
6428
6446
|
py: 2,
|
|
6429
|
-
children: t ? /* @__PURE__ */
|
|
6447
|
+
children: t ? /* @__PURE__ */ L(N, { size: 24 }) : /* @__PURE__ */ L(I, {
|
|
6430
6448
|
variant: "caption",
|
|
6431
6449
|
color: "text.secondary",
|
|
6432
6450
|
children: "Scroll to load more"
|
|
@@ -6444,27 +6462,29 @@ function np(e) {
|
|
|
6444
6462
|
return new Set(t);
|
|
6445
6463
|
}
|
|
6446
6464
|
function rp(e) {
|
|
6447
|
-
let n
|
|
6448
|
-
if (!e.length) return
|
|
6465
|
+
let [n, i] = E(() => /* @__PURE__ */ new Map()), a = C(async () => {
|
|
6466
|
+
if (!e.length) return n;
|
|
6449
6467
|
try {
|
|
6450
|
-
let
|
|
6451
|
-
if (console.log("[names] size:",
|
|
6468
|
+
let i = np(e), a = Array.from(i);
|
|
6469
|
+
if (console.log("[names] size:", i.size), !i.size) return n;
|
|
6452
6470
|
let o = (await r.users.bulkGet(a)).filter((e) => !!e), s = /* @__PURE__ */ new Map();
|
|
6453
6471
|
if (o.forEach((e) => {
|
|
6454
6472
|
s.set(e.id, e.name);
|
|
6455
|
-
}),
|
|
6456
|
-
let c = a.filter((e) => !s.has(e)), l =
|
|
6457
|
-
|
|
6458
|
-
let u =
|
|
6459
|
-
|
|
6473
|
+
}), i.size === o.length) return s;
|
|
6474
|
+
let c = a.filter((e) => !s.has(e)), l = t();
|
|
6475
|
+
if (!l) return n;
|
|
6476
|
+
let u = await l.getUsers(c, { fields: ["id", "name"] });
|
|
6477
|
+
await r.users.bulkPut(u);
|
|
6478
|
+
let d = s;
|
|
6479
|
+
return u.forEach((e) => d.set(e.id, e.name)), d;
|
|
6460
6480
|
} catch (e) {
|
|
6461
6481
|
console.error("[useSenderNames] Failed to fetch users:", e);
|
|
6462
6482
|
}
|
|
6463
|
-
return
|
|
6464
|
-
}, [e,
|
|
6483
|
+
return n;
|
|
6484
|
+
}, [e, n]);
|
|
6465
6485
|
return tp(async () => {
|
|
6466
|
-
|
|
6467
|
-
}, [e]),
|
|
6486
|
+
i(await a());
|
|
6487
|
+
}, [e]), n;
|
|
6468
6488
|
}
|
|
6469
6489
|
//#endregion
|
|
6470
6490
|
//#region src/components/MessageList.tsx
|
|
@@ -6486,7 +6506,7 @@ var ip = ({ messages: e, currentUserId: t, loading: n = !1, error: r = null, aut
|
|
|
6486
6506
|
l.current.scrollTop = l.current.scrollTop + e, u.current = 0, p(!0);
|
|
6487
6507
|
}
|
|
6488
6508
|
}
|
|
6489
|
-
}, [e.length, i]), n && !e.length ? /* @__PURE__ */
|
|
6509
|
+
}, [e.length, i]), n && !e.length ? /* @__PURE__ */ L(j, {
|
|
6490
6510
|
flex: 1,
|
|
6491
6511
|
overflow: "auto",
|
|
6492
6512
|
p: 2,
|
|
@@ -6496,32 +6516,32 @@ var ip = ({ messages: e, currentUserId: t, loading: n = !1, error: r = null, aut
|
|
|
6496
6516
|
3,
|
|
6497
6517
|
4,
|
|
6498
6518
|
5
|
|
6499
|
-
].map((e) => /* @__PURE__ */
|
|
6500
|
-
}) : r && !e.length ? /* @__PURE__ */
|
|
6519
|
+
].map((e) => /* @__PURE__ */ L($f, { isOwnMessage: e % 3 == 0 }, e))
|
|
6520
|
+
}) : r && !e.length ? /* @__PURE__ */ L(j, {
|
|
6501
6521
|
display: "flex",
|
|
6502
6522
|
justifyContent: "center",
|
|
6503
6523
|
alignItems: "center",
|
|
6504
6524
|
flex: 1,
|
|
6505
6525
|
p: 2,
|
|
6506
|
-
children: /* @__PURE__ */
|
|
6526
|
+
children: /* @__PURE__ */ R(D, {
|
|
6507
6527
|
severity: "error",
|
|
6508
6528
|
children: [
|
|
6509
|
-
/* @__PURE__ */
|
|
6510
|
-
/* @__PURE__ */
|
|
6529
|
+
/* @__PURE__ */ L("strong", { children: "Failed to load messages" }),
|
|
6530
|
+
/* @__PURE__ */ L("br", {}),
|
|
6511
6531
|
r.message
|
|
6512
6532
|
]
|
|
6513
6533
|
})
|
|
6514
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
6534
|
+
}) : e.length === 0 ? /* @__PURE__ */ L(j, {
|
|
6515
6535
|
display: "flex",
|
|
6516
6536
|
justifyContent: "center",
|
|
6517
6537
|
alignItems: "center",
|
|
6518
6538
|
flex: 1,
|
|
6519
|
-
children: /* @__PURE__ */ I
|
|
6539
|
+
children: /* @__PURE__ */ L(I, {
|
|
6520
6540
|
variant: "body2",
|
|
6521
6541
|
color: "text.secondary",
|
|
6522
6542
|
children: "No messages yet. Start the conversation!"
|
|
6523
6543
|
})
|
|
6524
|
-
}) : /* @__PURE__ */
|
|
6544
|
+
}) : /* @__PURE__ */ R(j, {
|
|
6525
6545
|
ref: l,
|
|
6526
6546
|
flex: 1,
|
|
6527
6547
|
overflow: "auto",
|
|
@@ -6532,14 +6552,14 @@ var ip = ({ messages: e, currentUserId: t, loading: n = !1, error: r = null, aut
|
|
|
6532
6552
|
d.current = g();
|
|
6533
6553
|
},
|
|
6534
6554
|
children: [
|
|
6535
|
-
a && s && /* @__PURE__ */
|
|
6555
|
+
a && s && /* @__PURE__ */ L(ep, {
|
|
6536
6556
|
hasMore: a,
|
|
6537
6557
|
loading: o,
|
|
6538
6558
|
onLoadMore: s
|
|
6539
6559
|
}),
|
|
6540
6560
|
e.map((n, r) => {
|
|
6541
6561
|
let i = n.sender, a = n.sender === t, o = m.get(i), s = r > 0 ? e[r - 1] : null, c = r < e.length - 1 ? e[r + 1] : null, l = !s || !h(s, n);
|
|
6542
|
-
return /* @__PURE__ */
|
|
6562
|
+
return /* @__PURE__ */ L(Qf, {
|
|
6543
6563
|
message: n,
|
|
6544
6564
|
isOwnMessage: a,
|
|
6545
6565
|
senderName: o,
|
|
@@ -6548,7 +6568,7 @@ var ip = ({ messages: e, currentUserId: t, loading: n = !1, error: r = null, aut
|
|
|
6548
6568
|
isLastInGroup: !c || !h(n, c)
|
|
6549
6569
|
}, n.id);
|
|
6550
6570
|
}),
|
|
6551
|
-
/* @__PURE__ */
|
|
6571
|
+
/* @__PURE__ */ L("div", { ref: c })
|
|
6552
6572
|
]
|
|
6553
6573
|
});
|
|
6554
6574
|
}, ap = ({ onSend: e, sending: t = !1, placeholder: n = "Type a message...", disabled: r = !1, disableReason: i }) => {
|
|
@@ -6558,13 +6578,13 @@ var ip = ({ messages: e, currentUserId: t, loading: n = !1, error: r = null, aut
|
|
|
6558
6578
|
s.current?.querySelector("textarea")?.focus();
|
|
6559
6579
|
}, 300));
|
|
6560
6580
|
};
|
|
6561
|
-
return /* @__PURE__ */
|
|
6581
|
+
return /* @__PURE__ */ R(j, {
|
|
6562
6582
|
display: "flex",
|
|
6563
6583
|
gap: 1,
|
|
6564
6584
|
p: 2,
|
|
6565
6585
|
borderTop: 1,
|
|
6566
6586
|
borderColor: "divider",
|
|
6567
|
-
children: [/* @__PURE__ */
|
|
6587
|
+
children: [/* @__PURE__ */ L(Te, {
|
|
6568
6588
|
ref: s,
|
|
6569
6589
|
fullWidth: !0,
|
|
6570
6590
|
multiline: !0,
|
|
@@ -6578,12 +6598,12 @@ var ip = ({ messages: e, currentUserId: t, loading: n = !1, error: r = null, aut
|
|
|
6578
6598
|
disabled: r || t,
|
|
6579
6599
|
variant: "outlined",
|
|
6580
6600
|
size: "small"
|
|
6581
|
-
}), /* @__PURE__ */
|
|
6601
|
+
}), /* @__PURE__ */ L(P, {
|
|
6582
6602
|
color: "primary",
|
|
6583
6603
|
onClick: c,
|
|
6584
6604
|
disabled: !a.trim() || t || r,
|
|
6585
6605
|
size: "large",
|
|
6586
|
-
children: t ? /* @__PURE__ */
|
|
6606
|
+
children: t ? /* @__PURE__ */ L(N, { size: 24 }) : /* @__PURE__ */ L(ha, {})
|
|
6587
6607
|
})]
|
|
6588
6608
|
});
|
|
6589
6609
|
};
|
|
@@ -6624,58 +6644,60 @@ function op({ conversation: e, limit: t = 50 }) {
|
|
|
6624
6644
|
//#endregion
|
|
6625
6645
|
//#region src/components/ChatWindow.tsx
|
|
6626
6646
|
var sp = ({ conversation: e, user: n, isConnected: i, onBack: a }) => {
|
|
6627
|
-
let o = t()
|
|
6647
|
+
let o = t();
|
|
6648
|
+
if (!o) return null;
|
|
6649
|
+
let { messages: s, cursor: c, loading: l, error: u, loadMore: d, loadingMore: p } = op({ conversation: e }), h = Gf(async () => e.type === "group" ? await r.groups.get(e.id) : null, [e.id, e.type]), g = n?.role === "admin", _ = n?.role === "moderator", v = h?.is_member ?? !0, y = h?.system ?? !1, b = g && e.type === "group" && !v, x = e.type === "group" && !v, S = e.type === "group" && (g || v), C = e.type === "group" && !y && (g || _ && v), ee = g && e.type === "group" && !y, [w, te] = E(!1), [ne, T] = E(!1), [re, O] = E(""), [k, A] = E(!1), [ie, ae] = E(null), N = () => {
|
|
6628
6650
|
O(e.name || ""), ae(null), T(!0);
|
|
6629
|
-
},
|
|
6651
|
+
}, ue = async () => {
|
|
6630
6652
|
if (re.trim()) {
|
|
6631
6653
|
A(!0), ae(null);
|
|
6632
6654
|
try {
|
|
6633
6655
|
await Hf(n.org, e.id, re.trim()), T(!1);
|
|
6634
6656
|
} catch (e) {
|
|
6635
|
-
ae(
|
|
6657
|
+
ae(Ae(e, "Failed to rename group"));
|
|
6636
6658
|
} finally {
|
|
6637
6659
|
A(!1);
|
|
6638
6660
|
}
|
|
6639
6661
|
}
|
|
6640
|
-
}, [
|
|
6641
|
-
|
|
6662
|
+
}, [de, fe] = E(!1), [P, pe] = E(!1), [me, he] = E(null), ge = async () => {
|
|
6663
|
+
fe(!1), pe(!0), he(null);
|
|
6642
6664
|
try {
|
|
6643
6665
|
await Uf(n.org, e.id);
|
|
6644
6666
|
} catch (e) {
|
|
6645
|
-
|
|
6667
|
+
he(Ae(e, "Failed to delete group")), pe(!1);
|
|
6646
6668
|
}
|
|
6647
|
-
}, [
|
|
6669
|
+
}, [_e, ve] = E(!1), [ye, F] = E(!1), be = async (t) => {
|
|
6648
6670
|
if (e.type === "group") {
|
|
6649
|
-
|
|
6671
|
+
ve(!0);
|
|
6650
6672
|
try {
|
|
6651
|
-
await o.joinGroup(n.org, e.id, t),
|
|
6673
|
+
await o.joinGroup(n.org, e.id, t), F(!0), await Vf(n.org), await m({}), setTimeout(() => F(!1), 3e3);
|
|
6652
6674
|
} catch (e) {
|
|
6653
|
-
|
|
6675
|
+
Ee(Ae(e, "Failed to join group"));
|
|
6654
6676
|
}
|
|
6655
|
-
|
|
6677
|
+
ve(!1);
|
|
6656
6678
|
}
|
|
6657
|
-
}, [
|
|
6658
|
-
return /* @__PURE__ */
|
|
6679
|
+
}, [xe, Se] = E(!1), [we, Ee] = E(null), [De, I] = E(!1);
|
|
6680
|
+
return /* @__PURE__ */ R(j, {
|
|
6659
6681
|
display: "flex",
|
|
6660
6682
|
flexDirection: "column",
|
|
6661
6683
|
height: "100%",
|
|
6662
6684
|
children: [
|
|
6663
|
-
/* @__PURE__ */
|
|
6685
|
+
/* @__PURE__ */ L(qf, {
|
|
6664
6686
|
displayName: e.name || "Chat",
|
|
6665
6687
|
type: e.type,
|
|
6666
6688
|
isConnected: i,
|
|
6667
6689
|
onBack: a,
|
|
6668
6690
|
showJoinButton: b,
|
|
6669
|
-
onJoin:
|
|
6670
|
-
joining:
|
|
6691
|
+
onJoin: be,
|
|
6692
|
+
joining: _e,
|
|
6671
6693
|
showMembersButton: S,
|
|
6672
6694
|
onManageMembers: () => te(!0),
|
|
6673
6695
|
canManageGroup: ee,
|
|
6674
|
-
onRenameGroup:
|
|
6675
|
-
onDeleteGroup: () =>
|
|
6676
|
-
deletingGroup:
|
|
6696
|
+
onRenameGroup: N,
|
|
6697
|
+
onDeleteGroup: () => fe(!0),
|
|
6698
|
+
deletingGroup: P
|
|
6677
6699
|
}),
|
|
6678
|
-
S && /* @__PURE__ */
|
|
6700
|
+
S && /* @__PURE__ */ L(Xf, {
|
|
6679
6701
|
open: w,
|
|
6680
6702
|
onClose: () => te(!1),
|
|
6681
6703
|
orgId: n.org,
|
|
@@ -6683,72 +6705,72 @@ var sp = ({ conversation: e, user: n, isConnected: i, onBack: a }) => {
|
|
|
6683
6705
|
currentUserId: n.id,
|
|
6684
6706
|
canManage: C
|
|
6685
6707
|
}),
|
|
6686
|
-
/* @__PURE__ */
|
|
6708
|
+
/* @__PURE__ */ R(oe, {
|
|
6687
6709
|
open: ne,
|
|
6688
6710
|
onClose: () => T(!1),
|
|
6689
6711
|
fullWidth: !0,
|
|
6690
6712
|
maxWidth: "xs",
|
|
6691
6713
|
children: [
|
|
6692
|
-
/* @__PURE__ */
|
|
6693
|
-
/* @__PURE__ */
|
|
6714
|
+
/* @__PURE__ */ L(le, { children: "Rename Group" }),
|
|
6715
|
+
/* @__PURE__ */ L(ce, { children: /* @__PURE__ */ L(Te, {
|
|
6694
6716
|
autoFocus: !0,
|
|
6695
6717
|
fullWidth: !0,
|
|
6696
6718
|
label: "Group name",
|
|
6697
6719
|
value: re,
|
|
6698
6720
|
onChange: (e) => O(e.target.value),
|
|
6699
|
-
onKeyDown: (e) => e.key === "Enter" &&
|
|
6721
|
+
onKeyDown: (e) => e.key === "Enter" && ue(),
|
|
6700
6722
|
error: !!ie,
|
|
6701
6723
|
helperText: ie?.message,
|
|
6702
6724
|
sx: { mt: 1 }
|
|
6703
6725
|
}) }),
|
|
6704
|
-
/* @__PURE__ */
|
|
6726
|
+
/* @__PURE__ */ R(se, { children: [/* @__PURE__ */ L(M, {
|
|
6705
6727
|
onClick: () => T(!1),
|
|
6706
6728
|
children: "Cancel"
|
|
6707
|
-
}), /* @__PURE__ */
|
|
6708
|
-
onClick:
|
|
6729
|
+
}), /* @__PURE__ */ L(M, {
|
|
6730
|
+
onClick: ue,
|
|
6709
6731
|
disabled: k || !re.trim(),
|
|
6710
6732
|
variant: "contained",
|
|
6711
6733
|
children: k ? "Renaming..." : "Rename"
|
|
6712
6734
|
})] })
|
|
6713
6735
|
]
|
|
6714
6736
|
}),
|
|
6715
|
-
/* @__PURE__ */
|
|
6716
|
-
open:
|
|
6717
|
-
onClose: () =>
|
|
6737
|
+
/* @__PURE__ */ R(oe, {
|
|
6738
|
+
open: de,
|
|
6739
|
+
onClose: () => fe(!1),
|
|
6718
6740
|
maxWidth: "xs",
|
|
6719
6741
|
fullWidth: !0,
|
|
6720
6742
|
children: [
|
|
6721
|
-
/* @__PURE__ */
|
|
6722
|
-
/* @__PURE__ */
|
|
6723
|
-
/* @__PURE__ */
|
|
6724
|
-
onClick: () =>
|
|
6743
|
+
/* @__PURE__ */ L(le, { children: "Delete Group" }),
|
|
6744
|
+
/* @__PURE__ */ L(ce, { children: "Are you sure you want to delete this group? This action cannot be undone." }),
|
|
6745
|
+
/* @__PURE__ */ R(se, { children: [/* @__PURE__ */ L(M, {
|
|
6746
|
+
onClick: () => fe(!1),
|
|
6725
6747
|
children: "Cancel"
|
|
6726
|
-
}), /* @__PURE__ */
|
|
6727
|
-
onClick:
|
|
6728
|
-
disabled:
|
|
6748
|
+
}), /* @__PURE__ */ L(M, {
|
|
6749
|
+
onClick: ge,
|
|
6750
|
+
disabled: P,
|
|
6729
6751
|
color: "error",
|
|
6730
6752
|
variant: "contained",
|
|
6731
|
-
children:
|
|
6753
|
+
children: P ? "Deleting..." : "Delete"
|
|
6732
6754
|
})] })
|
|
6733
6755
|
]
|
|
6734
6756
|
}),
|
|
6735
|
-
|
|
6757
|
+
me && /* @__PURE__ */ L(D, {
|
|
6736
6758
|
severity: "error",
|
|
6737
|
-
onClose: () =>
|
|
6738
|
-
children:
|
|
6759
|
+
onClose: () => he(null),
|
|
6760
|
+
children: me.message
|
|
6739
6761
|
}),
|
|
6740
|
-
/* @__PURE__ */
|
|
6741
|
-
open:
|
|
6762
|
+
/* @__PURE__ */ L(Ce, {
|
|
6763
|
+
open: ye,
|
|
6742
6764
|
autoHideDuration: 3e3,
|
|
6743
|
-
onClose: () =>
|
|
6765
|
+
onClose: () => F(!1),
|
|
6744
6766
|
message: "Successfully joined group"
|
|
6745
6767
|
}),
|
|
6746
|
-
|
|
6768
|
+
we && /* @__PURE__ */ L(D, {
|
|
6747
6769
|
severity: "error",
|
|
6748
|
-
onClose: () =>
|
|
6749
|
-
children:
|
|
6770
|
+
onClose: () => Ee(null),
|
|
6771
|
+
children: we.message
|
|
6750
6772
|
}),
|
|
6751
|
-
/* @__PURE__ */
|
|
6773
|
+
/* @__PURE__ */ L(ip, {
|
|
6752
6774
|
messages: s,
|
|
6753
6775
|
currentUserId: n?.id || 0,
|
|
6754
6776
|
loading: l,
|
|
@@ -6757,16 +6779,16 @@ var sp = ({ conversation: e, user: n, isConnected: i, onBack: a }) => {
|
|
|
6757
6779
|
hasMore: !!c?.datetime,
|
|
6758
6780
|
loadingMore: p,
|
|
6759
6781
|
onLoadMore: d,
|
|
6760
|
-
forceScrollToBottom:
|
|
6782
|
+
forceScrollToBottom: De
|
|
6761
6783
|
}),
|
|
6762
|
-
x ? /* @__PURE__ */
|
|
6784
|
+
x ? /* @__PURE__ */ L(D, {
|
|
6763
6785
|
severity: "warning",
|
|
6764
6786
|
sx: { m: 2 },
|
|
6765
6787
|
children: "You must be a group member to send messages"
|
|
6766
|
-
}) : /* @__PURE__ */
|
|
6788
|
+
}) : /* @__PURE__ */ L(ap, {
|
|
6767
6789
|
onSend: async (t) => {
|
|
6768
6790
|
if (!t.trim()) return;
|
|
6769
|
-
|
|
6791
|
+
Se(!0), Ee(null), I(!0);
|
|
6770
6792
|
let i = `temp-${Date.now()}-${Math.random()}`, a = {
|
|
6771
6793
|
id: i,
|
|
6772
6794
|
sender: n?.id,
|
|
@@ -6779,11 +6801,11 @@ var sp = ({ conversation: e, user: n, isConnected: i, onBack: a }) => {
|
|
|
6779
6801
|
try {
|
|
6780
6802
|
await r.messages.put(a), await (e.type === "group" ? o.sendGroupMessage : o.sendDM).bind(o)(e.id, t), await r.messages.delete(i);
|
|
6781
6803
|
} catch (e) {
|
|
6782
|
-
|
|
6804
|
+
Ee(Ae(e, "Failed to send message"));
|
|
6783
6805
|
}
|
|
6784
|
-
|
|
6806
|
+
Se(!1), setTimeout(() => I(!1), 100);
|
|
6785
6807
|
},
|
|
6786
|
-
sending:
|
|
6808
|
+
sending: xe,
|
|
6787
6809
|
disabled: !i,
|
|
6788
6810
|
disableReason: i ? void 0 : "You're offline. You need to be online to send messages"
|
|
6789
6811
|
})
|
|
@@ -6812,31 +6834,31 @@ var sp = ({ conversation: e, user: n, isConnected: i, onBack: a }) => {
|
|
|
6812
6834
|
});
|
|
6813
6835
|
};
|
|
6814
6836
|
render() {
|
|
6815
|
-
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */
|
|
6837
|
+
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ R(j, {
|
|
6816
6838
|
display: "flex",
|
|
6817
6839
|
flexDirection: "column",
|
|
6818
6840
|
justifyContent: "center",
|
|
6819
6841
|
alignItems: "center",
|
|
6820
6842
|
height: "100%",
|
|
6821
6843
|
p: 3,
|
|
6822
|
-
children: [/* @__PURE__ */
|
|
6844
|
+
children: [/* @__PURE__ */ R(D, {
|
|
6823
6845
|
severity: "error",
|
|
6824
6846
|
sx: {
|
|
6825
6847
|
mb: 2,
|
|
6826
6848
|
maxWidth: 500
|
|
6827
6849
|
},
|
|
6828
|
-
children: [/* @__PURE__ */ I
|
|
6850
|
+
children: [/* @__PURE__ */ L(I, {
|
|
6829
6851
|
variant: "h6",
|
|
6830
6852
|
gutterBottom: !0,
|
|
6831
6853
|
children: "Something went wrong"
|
|
6832
|
-
}), /* @__PURE__ */ I
|
|
6854
|
+
}), /* @__PURE__ */ L(I, {
|
|
6833
6855
|
variant: "body2",
|
|
6834
6856
|
color: "text.secondary",
|
|
6835
6857
|
children: this.state.error?.message || "An unexpected error occurred"
|
|
6836
6858
|
})]
|
|
6837
|
-
}), /* @__PURE__ */
|
|
6859
|
+
}), /* @__PURE__ */ L(M, {
|
|
6838
6860
|
variant: "contained",
|
|
6839
|
-
startIcon: /* @__PURE__ */
|
|
6861
|
+
startIcon: /* @__PURE__ */ L(pa, {}),
|
|
6840
6862
|
onClick: this.handleReset,
|
|
6841
6863
|
children: "Try Again"
|
|
6842
6864
|
})]
|
|
@@ -6858,9 +6880,9 @@ function lp({ onMessage: e, onConnect: n, onDisconnect: r, onError: i } = {}) {
|
|
|
6858
6880
|
return w(() => {
|
|
6859
6881
|
if (p()) try {
|
|
6860
6882
|
let e = t();
|
|
6861
|
-
return o(e.isConnected()), e.on("message", s), e.on("open", c), e.on("close", l), e.on("error", u), () => {
|
|
6883
|
+
return e ? (o(e.isConnected()), e.on("message", s), e.on("open", c), e.on("close", l), e.on("error", u), () => {
|
|
6862
6884
|
e.off("message", s), e.off("open", c), e.off("close", l), e.off("error", u);
|
|
6863
|
-
};
|
|
6885
|
+
}) : void 0;
|
|
6864
6886
|
} catch (e) {
|
|
6865
6887
|
console.error("Failed to setup WebSocket listeners:", e);
|
|
6866
6888
|
}
|
|
@@ -6874,19 +6896,22 @@ function lp({ onMessage: e, onConnect: n, onDisconnect: r, onError: i } = {}) {
|
|
|
6874
6896
|
//#endregion
|
|
6875
6897
|
//#region src/components/ChatContainer.tsx
|
|
6876
6898
|
var up = ({ initialConversation: e }) => {
|
|
6877
|
-
let [n, i] = E(e ?? null), [a, o] = E(), [s, c] = E(!0), l = C((e) => () => c(e), [])
|
|
6878
|
-
return
|
|
6879
|
-
|
|
6899
|
+
let [n, i] = E(e ?? null), [a, o] = E(), [s, c] = E(!0), [l, d] = E(() => t()), p = C((e) => () => c(e), []);
|
|
6900
|
+
return w(() => {
|
|
6901
|
+
l || t(d);
|
|
6902
|
+
}, [l]), tp(async () => {
|
|
6903
|
+
if (!l) return;
|
|
6904
|
+
let e = await l.getMe();
|
|
6880
6905
|
o(e), r.users.put(e);
|
|
6881
|
-
}, []), lp({
|
|
6882
|
-
onError:
|
|
6883
|
-
onConnect:
|
|
6884
|
-
onDisconnect:
|
|
6885
|
-
}), /* @__PURE__ */
|
|
6906
|
+
}, [l]), lp({
|
|
6907
|
+
onError: p(!1),
|
|
6908
|
+
onConnect: p(!0),
|
|
6909
|
+
onDisconnect: p(!1)
|
|
6910
|
+
}), l ? /* @__PURE__ */ R(j, {
|
|
6886
6911
|
display: "flex",
|
|
6887
6912
|
height: "100%",
|
|
6888
6913
|
overflow: "hidden",
|
|
6889
|
-
children: [/* @__PURE__ */
|
|
6914
|
+
children: [/* @__PURE__ */ L(j, {
|
|
6890
6915
|
sx: {
|
|
6891
6916
|
width: {
|
|
6892
6917
|
xs: "100%",
|
|
@@ -6908,14 +6933,14 @@ var up = ({ initialConversation: e }) => {
|
|
|
6908
6933
|
},
|
|
6909
6934
|
flexDirection: "column"
|
|
6910
6935
|
},
|
|
6911
|
-
children: /* @__PURE__ */
|
|
6936
|
+
children: /* @__PURE__ */ L(cp, { children: /* @__PURE__ */ L(Kf, {
|
|
6912
6937
|
currentUser: a,
|
|
6913
6938
|
selectedConversation: n,
|
|
6914
6939
|
onConversationSelect: (e) => {
|
|
6915
6940
|
i(e), u(f(e));
|
|
6916
6941
|
}
|
|
6917
6942
|
}) })
|
|
6918
|
-
}), /* @__PURE__ */
|
|
6943
|
+
}), /* @__PURE__ */ L(j, {
|
|
6919
6944
|
sx: {
|
|
6920
6945
|
flex: 1,
|
|
6921
6946
|
overflow: "hidden",
|
|
@@ -6926,14 +6951,14 @@ var up = ({ initialConversation: e }) => {
|
|
|
6926
6951
|
},
|
|
6927
6952
|
flexDirection: "column"
|
|
6928
6953
|
},
|
|
6929
|
-
children: n ? /* @__PURE__ */
|
|
6954
|
+
children: n ? /* @__PURE__ */ L(cp, { children: /* @__PURE__ */ L(sp, {
|
|
6930
6955
|
conversation: n,
|
|
6931
6956
|
user: a,
|
|
6932
6957
|
isConnected: s,
|
|
6933
6958
|
onBack: () => {
|
|
6934
6959
|
i(null), u(null);
|
|
6935
6960
|
}
|
|
6936
|
-
}) }) : /* @__PURE__ */
|
|
6961
|
+
}) }) : /* @__PURE__ */ L(j, {
|
|
6937
6962
|
display: "flex",
|
|
6938
6963
|
justifyContent: "center",
|
|
6939
6964
|
alignItems: "center",
|
|
@@ -6942,8 +6967,14 @@ var up = ({ initialConversation: e }) => {
|
|
|
6942
6967
|
children: "Select a conversation to start chatting"
|
|
6943
6968
|
})
|
|
6944
6969
|
})]
|
|
6970
|
+
}) : /* @__PURE__ */ L(j, {
|
|
6971
|
+
display: "flex",
|
|
6972
|
+
justifyContent: "center",
|
|
6973
|
+
alignItems: "center",
|
|
6974
|
+
height: "100%",
|
|
6975
|
+
children: /* @__PURE__ */ L(N, {})
|
|
6945
6976
|
});
|
|
6946
|
-
}, dp = ({ count: e, children: t, max: n = 99 }) => /* @__PURE__ */
|
|
6977
|
+
}, dp = ({ count: e, children: t, max: n = 99 }) => /* @__PURE__ */ L(ie, {
|
|
6947
6978
|
badgeContent: e,
|
|
6948
6979
|
color: "error",
|
|
6949
6980
|
max: n,
|
|
@@ -7111,4 +7142,4 @@ var pp = {
|
|
|
7111
7142
|
});
|
|
7112
7143
|
}, vp = _p();
|
|
7113
7144
|
//#endregion
|
|
7114
|
-
export { pp as CACHE_TTL,
|
|
7145
|
+
export { pp as CACHE_TTL, Ne as ChatApp, up as ChatContainer, qf as ChatHeader, sp as ChatWindow, ba as ConversationItem, xa as ConversationItemSkeleton, Kf as ConversationList, Bf as CreateGroupDialog, cp as ErrorBoundary, ep as LoadMoreTrigger, Qf as MessageBubble, ap as MessageInput, ip as MessageList, $f as MessageSkeleton, dp as UnreadBadge, r as db, s as disconnectSDK, m as fetchSummaries, t as getSDK, _p as getTheme, d as initSDK, p as isSDKInitialized, vp as theme, op as useMessages, rp as useSenderNames, fp as useUnreadCount, lp as useWebSocket };
|