@ethora/chat-component 26.10.4 → 26.10.5
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/{ChatProfileModal-Cke_6sXC.js → ChatProfileModal-Dw7pPDv8.js} +580 -561
- package/dist/{FilePreviewModal-CHEI7FWU.js → FilePreviewModal-CEcb5HZ2.js} +40 -40
- package/dist/{ManageDataModal-9W1ZSLli.js → ManageDataModal-Qma0dQja.js} +8 -8
- package/dist/{MarkdownBody-DFuD11jv.js → MarkdownBody-DiVdEIJH.js} +1 -1
- package/dist/{MessageSearchModal-FlVO7fz6.js → MessageSearchModal-DVJTW9WM.js} +10 -10
- package/dist/{PublicChatsModal-BWDXSdBx.js → PublicChatsModal-CX1qZbEc.js} +9 -9
- package/dist/{SideDrawer-BQ413Bso.js → SideDrawer-BzfNGNbq.js} +27 -27
- package/dist/{UserProfileModal-9aSW48jh.js → UserProfileModal-DdW_nEsM.js} +3 -3
- package/dist/{UserSettingsModal--sdi-ypb.js → UserSettingsModal-DdbURRR3.js} +2 -2
- package/dist/{VideoCallOverlay-DXJ_3E0D.js → VideoCallOverlay-D1lGzbw3.js} +1 -1
- package/dist/{VisibilityModal-DLi1r_OQ.js → VisibilityModal-yGZ0eOJx.js} +3 -3
- package/dist/assets/icons.d.ts +1 -0
- package/dist/{handleCopyClick-Cja-CefH.js → handleCopyClick-C-w304_U.js} +1 -1
- package/dist/{main-DbepSYi_.js → main-Cdwk7Rjj.js} +7993 -7916
- package/dist/main.js +1 -1
- package/dist/networking/api-requests/rooms.api.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { b3 as et, b4 as tt, E as f, b5 as yt, x as Pe, b as Et, b6 as kt, b7 as nt, b8 as rt, b9 as ot, ba as Le, bb as Te, bc as Ce, aK as $e, K as Ae, bd as Ue, be as Pt, G as ke, bf as St, bg as it, a as Rt, a$ as Lt, u as le, aa as _e, bh as Tt, bi as Ct, bj as Se, bk as Mt, ax as ue, bl as Be, bm as It, bn as $t, bo as At, bp as Dt, bq as Ot, aJ as Ne, D as zt, br as Ut } from "./main-Cdwk7Rjj.js";
|
|
3
3
|
import Me, { useState as F, useRef as U, useEffect as M, useMemo as te, useCallback as B, useLayoutEffect as _t } from "react";
|
|
4
4
|
const at = (t, o, i) => {
|
|
5
5
|
const g = document.createElement("a");
|
|
@@ -83,7 +83,7 @@ function st(t) {
|
|
|
83
83
|
const { overflow: i, overflowX: g, overflowY: E } = window.getComputedStyle(t);
|
|
84
84
|
return [i, g, E].some((l) => l === "auto" || l === "scroll") && o.push(t), [...o, ...st(t.parentElement)];
|
|
85
85
|
}
|
|
86
|
-
const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt = (t, o) => Ht.every((i) => t[i] === o[i]), Xe = 0.5, Fe = 3, xe = 1.25, Vt = 2e-3, Ye = 12, He = 16, je = 16, Gt = 72, Ve = 320,
|
|
86
|
+
const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt = (t, o) => Ht.every((i) => t[i] === o[i]), Xe = 0.5, Fe = 3, xe = 1.25, Vt = 2e-3, Ye = 12, He = 16, je = 16, Gt = 72, Ve = 320, Kt = 150, Ge = 4, Zt = 7, qt = "800px 0px", Jt = 2, Qt = 0.9, Ke = { width: 612, height: 792 }, en = f.div`
|
|
87
87
|
display: flex;
|
|
88
88
|
flex-direction: column;
|
|
89
89
|
align-items: center;
|
|
@@ -201,7 +201,7 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
201
201
|
`, un = (t, o, i) => Math.min(i, Math.max(o, t)), fn = (t) => {
|
|
202
202
|
const o = t;
|
|
203
203
|
return !o || !o.tagName ? !1 : o.isContentEditable ? !0 : ["INPUT", "TEXTAREA", "SELECT"].includes(o.tagName);
|
|
204
|
-
},
|
|
204
|
+
}, Ze = (t, o, i, g) => {
|
|
205
205
|
const E = t + o;
|
|
206
206
|
let l = 0, w = -1;
|
|
207
207
|
for (let c = 0; c < i.length; c += 1) {
|
|
@@ -213,7 +213,7 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
213
213
|
}
|
|
214
214
|
return l + 1;
|
|
215
215
|
}, qe = (t, o) => new Set(
|
|
216
|
-
[...t].sort((i, g) => Math.abs(i - o) - Math.abs(g - o) || i - g).slice(0,
|
|
216
|
+
[...t].sort((i, g) => Math.abs(i - o) - Math.abs(g - o) || i - g).slice(0, Zt)
|
|
217
217
|
), hn = Me.memo(function({
|
|
218
218
|
pdfDocument: o,
|
|
219
219
|
pageNumber: i,
|
|
@@ -289,7 +289,7 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
289
289
|
T("error");
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
|
-
S(Array.from({ length: s.numPages }, () =>
|
|
292
|
+
S(Array.from({ length: s.numPages }, () => Ke)), v(s), T("ready");
|
|
293
293
|
} catch (s) {
|
|
294
294
|
d || (console.warn("[Ethora] PDF open failed:", s), T("error"));
|
|
295
295
|
}
|
|
@@ -335,7 +335,7 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
335
335
|
};
|
|
336
336
|
}, [m]);
|
|
337
337
|
const L = te(() => {
|
|
338
|
-
const d = N.length > 0 ? N : [
|
|
338
|
+
const d = N.length > 0 ? N : [Ke], n = Math.max(1, $ - He * 2) * x, e = Math.max($, n + He * 2), a = [], s = [];
|
|
339
339
|
let u = je;
|
|
340
340
|
d.forEach((z) => {
|
|
341
341
|
const X = n * z.height / (z.width || 1);
|
|
@@ -356,7 +356,7 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
356
356
|
if (!d) return;
|
|
357
357
|
const n = R.current;
|
|
358
358
|
n && (R.current = null, d.scrollLeft = n.fx * d.scrollWidth - n.cx, d.scrollTop = n.fy * d.scrollHeight - n.cy);
|
|
359
|
-
const e =
|
|
359
|
+
const e = Ze(
|
|
360
360
|
d.scrollTop,
|
|
361
361
|
d.clientHeight,
|
|
362
362
|
L.tops,
|
|
@@ -364,7 +364,7 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
364
364
|
);
|
|
365
365
|
e !== I.current && (I.current = e, V(e));
|
|
366
366
|
}, [L]);
|
|
367
|
-
const
|
|
367
|
+
const Z = B((d, n) => {
|
|
368
368
|
const e = l.current;
|
|
369
369
|
if (!e || !e.scrollHeight || !e.scrollWidth) return;
|
|
370
370
|
if (e.scrollTop <= 0 && e.scrollLeft <= 0) {
|
|
@@ -381,9 +381,9 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
381
381
|
}, []), _ = B(
|
|
382
382
|
(d, n, e) => {
|
|
383
383
|
const a = un(d, Xe, Fe);
|
|
384
|
-
a !== A.current && (
|
|
384
|
+
a !== A.current && (Z(n, e), A.current = a, O(a));
|
|
385
385
|
},
|
|
386
|
-
[
|
|
386
|
+
[Z]
|
|
387
387
|
), ee = Math.max(Ve, Math.floor(E.width || 0));
|
|
388
388
|
M(() => {
|
|
389
389
|
if (H === 0) {
|
|
@@ -392,10 +392,10 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
392
392
|
}
|
|
393
393
|
if (ee === H) return;
|
|
394
394
|
const d = window.setTimeout(() => {
|
|
395
|
-
|
|
396
|
-
},
|
|
395
|
+
Z(), k(ee);
|
|
396
|
+
}, Kt);
|
|
397
397
|
return () => window.clearTimeout(d);
|
|
398
|
-
}, [ee, H,
|
|
398
|
+
}, [ee, H, Z]);
|
|
399
399
|
const ne = typeof IntersectionObserver < "u";
|
|
400
400
|
M(() => {
|
|
401
401
|
!m || ne || j(
|
|
@@ -422,7 +422,7 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
422
422
|
const de = B(() => {
|
|
423
423
|
const d = l.current, n = P.current;
|
|
424
424
|
if (!d || !n) return;
|
|
425
|
-
const e =
|
|
425
|
+
const e = Ze(
|
|
426
426
|
d.scrollTop,
|
|
427
427
|
d.clientHeight,
|
|
428
428
|
n.tops,
|
|
@@ -712,7 +712,7 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
712
712
|
[$]
|
|
713
713
|
), L = B(() => {
|
|
714
714
|
$(G, { x: 0, y: 0 }, !0);
|
|
715
|
-
}, [$]),
|
|
715
|
+
}, [$]), Z = B(
|
|
716
716
|
(n) => {
|
|
717
717
|
Y(D.current.scale * n, 0, 0, !0);
|
|
718
718
|
},
|
|
@@ -721,11 +721,11 @@ const Ht = ["x", "y", "top", "bottom", "left", "right", "width", "height"], jt =
|
|
|
721
721
|
Me.useImperativeHandle(
|
|
722
722
|
T,
|
|
723
723
|
() => ({
|
|
724
|
-
zoomIn: () =>
|
|
725
|
-
zoomOut: () =>
|
|
724
|
+
zoomIn: () => Z(1.5),
|
|
725
|
+
zoomOut: () => Z(1 / 1.5),
|
|
726
726
|
reset: L
|
|
727
727
|
}),
|
|
728
|
-
[
|
|
728
|
+
[Z, L]
|
|
729
729
|
), M(() => {
|
|
730
730
|
W(!1), O(G), H({ x: 0, y: 0 });
|
|
731
731
|
}, [t]), M(() => {
|
|
@@ -980,7 +980,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
980
980
|
if (!t) return { name: "" };
|
|
981
981
|
const E = [t.username, t.id].map((v) => Ue(ie(v))).filter(Boolean), l = E.map((v) => o?.[v]).find((v) => v && (ye(v) || v.profileImage)), w = Ue(ie(i?.xmppUsername)), c = !!w && E.includes(w), T = ye(t) || Ee(t.name) || ye(l) || (c ? ye(i) || Ee(i?.name) : "") || E.map(Ee).find(Boolean) || Ee(g) || "", m = ie(t.photo) || ie(l?.profileImage) || (c ? ie(i?.profileImage) : "") || void 0;
|
|
982
982
|
return { name: T, photo: m };
|
|
983
|
-
},
|
|
983
|
+
}, K = "#f5f7fa", ut = "rgba(245, 247, 250, 0.68)", fe = "rgba(255, 255, 255, 0.08)", ft = "rgba(255, 255, 255, 0.18)", ht = "var(--ethora-color-primary, #0052cd)", Sn = Ae`
|
|
984
984
|
from { opacity: 0; transform: scale(0.98); }
|
|
985
985
|
to { opacity: 1; transform: scale(1); }
|
|
986
986
|
`, Rn = Ae`
|
|
@@ -996,7 +996,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
996
996
|
display: flex;
|
|
997
997
|
flex-direction: column;
|
|
998
998
|
box-sizing: border-box;
|
|
999
|
-
color: ${
|
|
999
|
+
color: ${K};
|
|
1000
1000
|
background-color: rgba(10, 12, 18, 0.92);
|
|
1001
1001
|
-webkit-backdrop-filter: blur(8px);
|
|
1002
1002
|
backdrop-filter: blur(8px);
|
|
@@ -1030,7 +1030,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1030
1030
|
`, In = f.span`
|
|
1031
1031
|
font-size: 15px;
|
|
1032
1032
|
font-weight: 600;
|
|
1033
|
-
color: ${
|
|
1033
|
+
color: ${K};
|
|
1034
1034
|
overflow: hidden;
|
|
1035
1035
|
text-overflow: ellipsis;
|
|
1036
1036
|
white-space: nowrap;
|
|
@@ -1057,7 +1057,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1057
1057
|
border: 0;
|
|
1058
1058
|
border-radius: 50%;
|
|
1059
1059
|
background-color: ${fe};
|
|
1060
|
-
color: ${
|
|
1060
|
+
color: ${K};
|
|
1061
1061
|
cursor: pointer;
|
|
1062
1062
|
transition: background-color 150ms ease;
|
|
1063
1063
|
|
|
@@ -1066,7 +1066,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
1068
1068
|
&:focus-visible {
|
|
1069
|
-
outline: 2px solid ${
|
|
1069
|
+
outline: 2px solid ${K};
|
|
1070
1070
|
outline-offset: 2px;
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
@@ -1114,7 +1114,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1114
1114
|
border: 0;
|
|
1115
1115
|
border-radius: 50%;
|
|
1116
1116
|
background-color: rgba(10, 12, 18, 0.55);
|
|
1117
|
-
color: ${
|
|
1117
|
+
color: ${K};
|
|
1118
1118
|
cursor: pointer;
|
|
1119
1119
|
transition: background-color 150ms ease, opacity 150ms ease;
|
|
1120
1120
|
|
|
@@ -1123,7 +1123,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
1125
|
&:focus-visible {
|
|
1126
|
-
outline: 2px solid ${
|
|
1126
|
+
outline: 2px solid ${K};
|
|
1127
1127
|
outline-offset: 2px;
|
|
1128
1128
|
}
|
|
1129
1129
|
|
|
@@ -1176,7 +1176,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
1178
|
&:focus-visible {
|
|
1179
|
-
outline: 2px solid ${
|
|
1179
|
+
outline: 2px solid ${K};
|
|
1180
1180
|
outline-offset: 2px;
|
|
1181
1181
|
}
|
|
1182
1182
|
`, Bn = f.img`
|
|
@@ -1222,7 +1222,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1222
1222
|
padding: 6px 14px;
|
|
1223
1223
|
border-radius: 999px;
|
|
1224
1224
|
background-color: ${fe};
|
|
1225
|
-
color: ${
|
|
1225
|
+
color: ${K};
|
|
1226
1226
|
font-size: 13px;
|
|
1227
1227
|
font-variant-numeric: tabular-nums;
|
|
1228
1228
|
white-space: nowrap;
|
|
@@ -1243,13 +1243,13 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1243
1243
|
text-align: center;
|
|
1244
1244
|
border-radius: 16px;
|
|
1245
1245
|
background-color: rgba(255, 255, 255, 0.05);
|
|
1246
|
-
color: ${
|
|
1246
|
+
color: ${K};
|
|
1247
1247
|
`, Oe = f.h2`
|
|
1248
1248
|
margin: 0;
|
|
1249
1249
|
font-size: 18px;
|
|
1250
1250
|
font-weight: 600;
|
|
1251
1251
|
line-height: 1.3;
|
|
1252
|
-
color: ${
|
|
1252
|
+
color: ${K};
|
|
1253
1253
|
`, Hn = f.p`
|
|
1254
1254
|
margin: 0;
|
|
1255
1255
|
font-size: 14px;
|
|
@@ -1277,7 +1277,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1277
1277
|
transition: background-color 150ms ease;
|
|
1278
1278
|
|
|
1279
1279
|
&:focus-visible {
|
|
1280
|
-
outline: 2px solid ${
|
|
1280
|
+
outline: 2px solid ${K};
|
|
1281
1281
|
outline-offset: 2px;
|
|
1282
1282
|
}
|
|
1283
1283
|
`, gt = f(pt)`
|
|
@@ -1291,7 +1291,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1291
1291
|
`, Vn = f(pt)`
|
|
1292
1292
|
border: 1px solid rgba(255, 255, 255, 0.28);
|
|
1293
1293
|
background-color: transparent;
|
|
1294
|
-
color: ${
|
|
1294
|
+
color: ${K};
|
|
1295
1295
|
|
|
1296
1296
|
&:hover {
|
|
1297
1297
|
background-color: ${fe};
|
|
@@ -1304,7 +1304,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1304
1304
|
> span {
|
|
1305
1305
|
color: #9cc0ff;
|
|
1306
1306
|
}
|
|
1307
|
-
`,
|
|
1307
|
+
`, Kn = ({
|
|
1308
1308
|
onRetry: t,
|
|
1309
1309
|
onDownload: o
|
|
1310
1310
|
}) => {
|
|
@@ -1323,7 +1323,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1323
1323
|
] })
|
|
1324
1324
|
] })
|
|
1325
1325
|
] });
|
|
1326
|
-
},
|
|
1326
|
+
}, Zn = ({
|
|
1327
1327
|
fileName: t,
|
|
1328
1328
|
unsupportedText: o,
|
|
1329
1329
|
onDownload: i
|
|
@@ -1362,7 +1362,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1362
1362
|
height: 116px;
|
|
1363
1363
|
border-radius: 12px;
|
|
1364
1364
|
background-color: ${fe};
|
|
1365
|
-
color: ${
|
|
1365
|
+
color: ${K};
|
|
1366
1366
|
`, Jn = f.span`
|
|
1367
1367
|
position: absolute;
|
|
1368
1368
|
bottom: 14px;
|
|
@@ -1444,7 +1444,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1444
1444
|
}, [D, j, l]), P = te(
|
|
1445
1445
|
() => I === "image" || I === "video" ? Se(R, l) : -1,
|
|
1446
1446
|
[R, l, I]
|
|
1447
|
-
), C = P >= 0 && R.length > 1, $ = C && P > 0, Y = C && P < R.length - 1, L = P >= 0 ? R[P] : void 0,
|
|
1447
|
+
), C = P >= 0 && R.length > 1, $ = C && P > 0, Y = C && P < R.length - 1, L = P >= 0 ? R[P] : void 0, Z = L?.fileName || l.fileName, _ = L?.sender ?? l.sender, ee = te(
|
|
1448
1448
|
() => Pn({
|
|
1449
1449
|
sender: _,
|
|
1450
1450
|
usersSet: T,
|
|
@@ -1543,7 +1543,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1543
1543
|
}, pe = l.fileName || i("modal.filePreview.imageAlt"), wt = i("modal.filePreview.unsupported"), ge = ue(l.fileURL, w);
|
|
1544
1544
|
let ae, me = "media";
|
|
1545
1545
|
if (oe)
|
|
1546
|
-
me = "content", ae = /* @__PURE__ */ r(
|
|
1546
|
+
me = "content", ae = /* @__PURE__ */ r(Kn, { onRetry: Q, onDownload: u });
|
|
1547
1547
|
else
|
|
1548
1548
|
switch (I) {
|
|
1549
1549
|
case "image":
|
|
@@ -1574,16 +1574,16 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1574
1574
|
);
|
|
1575
1575
|
break;
|
|
1576
1576
|
case "audio":
|
|
1577
|
-
me = "content", ae = /* @__PURE__ */ r(qn, { fileName:
|
|
1577
|
+
me = "content", ae = /* @__PURE__ */ r(qn, { fileName: Z, src: ge });
|
|
1578
1578
|
break;
|
|
1579
1579
|
case "pdf":
|
|
1580
1580
|
ae = /* @__PURE__ */ r(pn, { pdfUrl: ge });
|
|
1581
1581
|
break;
|
|
1582
1582
|
default:
|
|
1583
1583
|
me = "content", ae = /* @__PURE__ */ r(
|
|
1584
|
-
|
|
1584
|
+
Zn,
|
|
1585
1585
|
{
|
|
1586
|
-
fileName:
|
|
1586
|
+
fileName: Z,
|
|
1587
1587
|
unsupportedText: wt,
|
|
1588
1588
|
onDownload: u
|
|
1589
1589
|
}
|
|
@@ -1612,7 +1612,7 @@ const ie = (t) => String(t ?? "").trim(), ye = (t) => [ie(t?.firstName), ie(t?.l
|
|
|
1612
1612
|
),
|
|
1613
1613
|
/* @__PURE__ */ b(Mn, { children: [
|
|
1614
1614
|
ne && /* @__PURE__ */ r(In, { children: ne }),
|
|
1615
|
-
/* @__PURE__ */ r($n, { children: [de,
|
|
1615
|
+
/* @__PURE__ */ r($n, { children: [de, Z].filter(Boolean).join(" · ") || i("modal.filePreview.title") })
|
|
1616
1616
|
] })
|
|
1617
1617
|
] }),
|
|
1618
1618
|
/* @__PURE__ */ b(An, { children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as M, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m, useCallback as T } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { S as Q, D as f, a as u, b as D, e as v, f as b } from "./SideDrawer-
|
|
3
|
+
import { aK as I, E as t, aL as j, aM as w, B, u as E, x as R, Q as z, aN as F, S as U, D as x, aO as O, aP as $, aQ as A, aR as P } from "./main-Cdwk7Rjj.js";
|
|
4
|
+
import { S as Q, D as f, a as u, b as D, e as v, f as b } from "./SideDrawer-BzfNGNbq.js";
|
|
5
5
|
t(j)`
|
|
6
6
|
display: flex;
|
|
7
7
|
box-sizing: border-box;
|
|
@@ -73,16 +73,16 @@ const y = t(B)`
|
|
|
73
73
|
padding: var(--ethora-space-4, 16px);
|
|
74
74
|
border-radius: var(--ethora-radius-md, 12px);
|
|
75
75
|
gap: var(--ethora-space-2, 8px);
|
|
76
|
-
`,
|
|
76
|
+
`, K = t.div`
|
|
77
77
|
font-size: var(--ethora-font-size-xs, 12px);
|
|
78
78
|
line-height: var(--ethora-line-height-normal, 1.5);
|
|
79
79
|
color: var(--ethora-color-text, #141414);
|
|
80
80
|
display: flex;
|
|
81
81
|
text-align: start;
|
|
82
|
-
`,
|
|
82
|
+
`, J = ({
|
|
83
83
|
handleCloseModal: r
|
|
84
84
|
}) => {
|
|
85
|
-
const { config: l } = E((s) => s.chatSettingStore), e =
|
|
85
|
+
const { config: l } = E((s) => s.chatSettingStore), e = R(), { showToast: d } = z(), [C, c] = m(!1), [i, g] = m(!1), S = async () => {
|
|
86
86
|
const p = (await P()).data;
|
|
87
87
|
x.log(p);
|
|
88
88
|
const L = new Blob([p], { type: "text/plain" }), h = URL.createObjectURL(L), n = document.createElement("a");
|
|
@@ -91,7 +91,7 @@ const y = t(B)`
|
|
|
91
91
|
if (!i) {
|
|
92
92
|
g(!0);
|
|
93
93
|
try {
|
|
94
|
-
await
|
|
94
|
+
await F(), c(!1), await U.performLogout();
|
|
95
95
|
} catch (s) {
|
|
96
96
|
x.error("Failed to delete account", s), d({
|
|
97
97
|
id: Date.now().toString(),
|
|
@@ -137,7 +137,7 @@ const y = t(B)`
|
|
|
137
137
|
style: { marginTop: "var(--ethora-space-2, 8px)" },
|
|
138
138
|
children: [
|
|
139
139
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(O, { color: $(l) }) }),
|
|
140
|
-
/* @__PURE__ */ a(
|
|
140
|
+
/* @__PURE__ */ a(K, { children: e("settings.manageData.deleteDisclosure") })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
),
|
|
@@ -174,5 +174,5 @@ const y = t(B)`
|
|
|
174
174
|
] });
|
|
175
175
|
};
|
|
176
176
|
export {
|
|
177
|
-
|
|
177
|
+
J as default
|
|
178
178
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as fs, jsx as ie, Fragment as hs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { w as ei } from "./main-
|
|
3
|
+
import { w as ei } from "./main-Cdwk7Rjj.js";
|
|
4
4
|
function zr(e) {
|
|
5
5
|
const t = [], n = String(e || "");
|
|
6
6
|
let r = n.indexOf(","), u = 0, i = !1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as i, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as J, useState as h, useMemo as I, useEffect as V } from "react";
|
|
3
|
-
import { x as Y, a as W,
|
|
4
|
-
import { S as ce, i as le, j as de, f as S } from "./SideDrawer-
|
|
3
|
+
import { x as Y, a as W, aU as X, u as z, at as Z, as as K, au as ee, aV as re, aW as te, aB as ae, aX as oe, aY as se, aZ as ne, E as c, y as ie } from "./main-Cdwk7Rjj.js";
|
|
4
|
+
import { S as ce, i as le, j as de, f as S } from "./SideDrawer-BzfNGNbq.js";
|
|
5
5
|
function he(t) {
|
|
6
6
|
const e = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t || "");
|
|
7
7
|
if (!e) return;
|
|
@@ -183,7 +183,7 @@ const ge = c.div`
|
|
|
183
183
|
);
|
|
184
184
|
const [d, b] = h(""), [s, O] = h(
|
|
185
185
|
n ? "chat" : "all"
|
|
186
|
-
), F = n ? n.split("@")[0] : void 0, [C, H] = h(!1), [m,
|
|
186
|
+
), F = n ? n.split("@")[0] : void 0, [C, H] = h(!1), [m, B] = h(""), [f, L] = h(""), [g, M] = h(
|
|
187
187
|
null
|
|
188
188
|
), [v, N] = h(""), y = pe(m, f), j = I(
|
|
189
189
|
() => ({
|
|
@@ -193,11 +193,11 @@ const ge = c.div`
|
|
|
193
193
|
}),
|
|
194
194
|
[g?.id, m, f, y]
|
|
195
195
|
), w = (g ? 1 : 0) + (m ? 1 : 0) + (f ? 1 : 0), Q = () => {
|
|
196
|
-
M(null), N(""),
|
|
197
|
-
}, P = n ? p[n] : void 0, { members: D } =
|
|
196
|
+
M(null), N(""), B(""), L("");
|
|
197
|
+
}, P = n ? p[n] : void 0, { members: D } = Z(
|
|
198
198
|
n || void 0,
|
|
199
|
-
s === "chat" &&
|
|
200
|
-
),
|
|
199
|
+
s === "chat" && K(P) && (C || v.trim() !== "")
|
|
200
|
+
), T = I(() => {
|
|
201
201
|
if (!v.trim()) return [];
|
|
202
202
|
let r;
|
|
203
203
|
if (s === "chat") {
|
|
@@ -302,7 +302,7 @@ const ge = c.div`
|
|
|
302
302
|
}
|
|
303
303
|
)
|
|
304
304
|
] }),
|
|
305
|
-
!g &&
|
|
305
|
+
!g && T.length > 0 && /* @__PURE__ */ a(Se, { role: "listbox", children: T.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
|
|
306
306
|
"button",
|
|
307
307
|
{
|
|
308
308
|
type: "button",
|
|
@@ -323,7 +323,7 @@ const ge = c.div`
|
|
|
323
323
|
type: "date",
|
|
324
324
|
value: m,
|
|
325
325
|
max: f || void 0,
|
|
326
|
-
onChange: (r) =>
|
|
326
|
+
onChange: (r) => B(r.target.value)
|
|
327
327
|
}
|
|
328
328
|
)
|
|
329
329
|
] }),
|
|
@@ -335,7 +335,7 @@ const ge = c.div`
|
|
|
335
335
|
type: "date",
|
|
336
336
|
value: f,
|
|
337
337
|
min: m || void 0,
|
|
338
|
-
onChange: (r) =>
|
|
338
|
+
onChange: (r) => L(r.target.value)
|
|
339
339
|
}
|
|
340
340
|
)
|
|
341
341
|
] })
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useState as p, useRef as
|
|
3
|
-
import { l as
|
|
4
|
-
import { S as
|
|
2
|
+
import { useState as p, useRef as E, useCallback as N, useEffect as P, useMemo as z } from "react";
|
|
3
|
+
import { l as T, a_ as U, x as _, a as F, aU as H, u as A, aB as J, E as c, a7 as q, y as G } from "./main-Cdwk7Rjj.js";
|
|
4
|
+
import { S as V, i as Z, j as K, f as S } from "./SideDrawer-BzfNGNbq.js";
|
|
5
5
|
const I = 50;
|
|
6
6
|
async function Q({
|
|
7
7
|
offset: r = 0,
|
|
8
8
|
limit: t = I,
|
|
9
9
|
signal: u
|
|
10
10
|
} = {}) {
|
|
11
|
-
const x =
|
|
11
|
+
const x = T.getState().chatSettingStore.user?.token || "", s = (await U.get("/v1/chats/public", {
|
|
12
12
|
params: { limit: Math.min(t, I), offset: r },
|
|
13
13
|
headers: { Authorization: x },
|
|
14
14
|
signal: u
|
|
@@ -105,7 +105,7 @@ const W = c.ul`
|
|
|
105
105
|
}) => {
|
|
106
106
|
const t = _(), u = F(), x = H(767), b = A((e) => e.rooms.rooms), s = A(
|
|
107
107
|
(e) => e.chatSettingStore.config?.xmppSettings?.conference
|
|
108
|
-
), [l, i] = p([]), [j, $] = p(0), [v, D] = p(0), [n, w] = p("loading"), [h, L] = p(""), m =
|
|
108
|
+
), [l, i] = p([]), [j, $] = p(0), [v, D] = p(0), [n, w] = p("loading"), [h, L] = p(""), m = E(0), f = N(async (e) => {
|
|
109
109
|
const o = ++m.current;
|
|
110
110
|
w(e ? "loadingMore" : "loading");
|
|
111
111
|
try {
|
|
@@ -119,7 +119,7 @@ const W = c.ul`
|
|
|
119
119
|
o === m.current && w("error");
|
|
120
120
|
}
|
|
121
121
|
}, []);
|
|
122
|
-
|
|
122
|
+
P(() => (f(0), () => {
|
|
123
123
|
m.current += 1;
|
|
124
124
|
}), [f]);
|
|
125
125
|
const O = z(
|
|
@@ -132,16 +132,16 @@ const W = c.ul`
|
|
|
132
132
|
) : l;
|
|
133
133
|
}, [l, h]), B = (e) => {
|
|
134
134
|
const o = (s || "").trim();
|
|
135
|
-
o && (u(
|
|
135
|
+
o && (u(q({ roomJID: `${e.name}@${o}` })), x && u(G(void 0)));
|
|
136
136
|
}, M = v < j;
|
|
137
137
|
return /* @__PURE__ */ d(
|
|
138
|
-
|
|
138
|
+
V,
|
|
139
139
|
{
|
|
140
140
|
title: t("publicChats.title"),
|
|
141
141
|
onClose: r,
|
|
142
142
|
backLabel: t("action.close"),
|
|
143
143
|
children: [
|
|
144
|
-
/* @__PURE__ */ d(
|
|
144
|
+
/* @__PURE__ */ d(Z, { children: [
|
|
145
145
|
/* @__PURE__ */ a(J, {}),
|
|
146
146
|
/* @__PURE__ */ a(
|
|
147
147
|
K,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useId as f, useRef as v } from "react";
|
|
3
|
-
import { x as g, F as u,
|
|
3
|
+
import { x as g, F as u, aU as m, a$ as w, B as b, b0 as y, E as e, b1 as D, b2 as k } from "./main-Cdwk7Rjj.js";
|
|
4
4
|
const c = 767, R = `${c}px`, z = e.div`
|
|
5
5
|
position: relative;
|
|
6
6
|
pointer-events: auto;
|
|
@@ -43,7 +43,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
43
43
|
align-items: center;
|
|
44
44
|
gap: var(--ethora-space-1, 4px);
|
|
45
45
|
flex: 0 0 auto;
|
|
46
|
-
`,
|
|
46
|
+
`, A = e.div`
|
|
47
47
|
flex: 1 1 auto;
|
|
48
48
|
min-height: 0;
|
|
49
49
|
overflow-y: auto;
|
|
@@ -62,7 +62,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
gap: var(--ethora-space-2, 8px);
|
|
65
|
-
`,
|
|
65
|
+
`, O = e.h3`
|
|
66
66
|
margin: 0;
|
|
67
67
|
padding: 0 var(--ethora-space-1, 4px);
|
|
68
68
|
font-size: var(--ethora-font-size-xs, 12px);
|
|
@@ -70,7 +70,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
70
70
|
letter-spacing: 0.06em;
|
|
71
71
|
text-transform: uppercase;
|
|
72
72
|
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
73
|
-
`,
|
|
73
|
+
`, W = e.div`
|
|
74
74
|
display: flex;
|
|
75
75
|
flex-direction: column;
|
|
76
76
|
box-sizing: border-box;
|
|
@@ -79,7 +79,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
79
79
|
border-radius: var(--ethora-radius-md, 12px);
|
|
80
80
|
background-color: var(--ethora-color-bg, #fff);
|
|
81
81
|
overflow: hidden;
|
|
82
|
-
`,
|
|
82
|
+
`, _ = e.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
flex-direction: column;
|
|
85
85
|
gap: var(--ethora-space-1, 4px);
|
|
@@ -109,11 +109,11 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
109
109
|
outline-offset: 2px;
|
|
110
110
|
border-radius: var(--ethora-radius-sm, 8px);
|
|
111
111
|
}
|
|
112
|
-
`,
|
|
112
|
+
`, U = e.div`
|
|
113
113
|
height: 1px;
|
|
114
114
|
margin: 0 var(--ethora-space-4, 16px);
|
|
115
115
|
background-color: var(--ethora-color-border, #e6e8ec);
|
|
116
|
-
`,
|
|
116
|
+
`, V = e.div`
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
119
119
|
gap: var(--ethora-space-2, 8px);
|
|
@@ -135,7 +135,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
135
135
|
& > svg {
|
|
136
136
|
flex: 0 0 auto;
|
|
137
137
|
}
|
|
138
|
-
`,
|
|
138
|
+
`, X = e.input`
|
|
139
139
|
flex: 1 1 auto;
|
|
140
140
|
min-width: 0;
|
|
141
141
|
border: none;
|
|
@@ -148,16 +148,16 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
148
148
|
&::placeholder {
|
|
149
149
|
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
150
150
|
}
|
|
151
|
-
`,
|
|
151
|
+
`, q = e.div`
|
|
152
152
|
display: flex;
|
|
153
153
|
flex-direction: column;
|
|
154
154
|
width: 100%;
|
|
155
|
-
`,
|
|
155
|
+
`, E = e.div`
|
|
156
156
|
font-size: var(--ethora-font-size-sm, 14px);
|
|
157
157
|
font-weight: var(--ethora-font-weight-medium, 500);
|
|
158
158
|
color: var(--ethora-color-text, #141414);
|
|
159
159
|
text-align: start;
|
|
160
|
-
`,
|
|
160
|
+
`, T = e.div`
|
|
161
161
|
font-size: var(--ethora-font-size-xs, 12px);
|
|
162
162
|
font-weight: var(--ethora-font-weight-regular, 400);
|
|
163
163
|
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
@@ -205,17 +205,17 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
205
205
|
strokeLinecap: "round",
|
|
206
206
|
strokeLinejoin: "round"
|
|
207
207
|
}
|
|
208
|
-
) }),
|
|
208
|
+
) }), G = ({
|
|
209
209
|
label: r,
|
|
210
210
|
hint: a,
|
|
211
211
|
onClick: t
|
|
212
212
|
}) => /* @__PURE__ */ i(C, { type: "button", onClick: t, children: [
|
|
213
213
|
/* @__PURE__ */ i(L, { children: [
|
|
214
|
-
/* @__PURE__ */ o(
|
|
215
|
-
a && /* @__PURE__ */ o(
|
|
214
|
+
/* @__PURE__ */ o(E, { children: r }),
|
|
215
|
+
a && /* @__PURE__ */ o(T, { children: a })
|
|
216
216
|
] }),
|
|
217
217
|
/* @__PURE__ */ o(j, { "aria-hidden": "true", children: /* @__PURE__ */ o(M, {}) })
|
|
218
|
-
] }),
|
|
218
|
+
] }), J = ({
|
|
219
219
|
title: r,
|
|
220
220
|
onClose: a,
|
|
221
221
|
headerActions: t,
|
|
@@ -247,24 +247,24 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
247
247
|
/* @__PURE__ */ o(I, { id: n, children: r }),
|
|
248
248
|
t && /* @__PURE__ */ o(S, { children: t })
|
|
249
249
|
] }),
|
|
250
|
-
/* @__PURE__ */ o(
|
|
250
|
+
/* @__PURE__ */ o(A, { children: d })
|
|
251
251
|
]
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
255
|
export {
|
|
256
256
|
H as D,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
257
|
+
J as S,
|
|
258
|
+
O as a,
|
|
259
|
+
W as b,
|
|
260
|
+
U as c,
|
|
261
|
+
G as d,
|
|
262
|
+
_ as e,
|
|
263
|
+
T as f,
|
|
264
|
+
E as g,
|
|
265
265
|
F as h,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
V as i,
|
|
267
|
+
X as j,
|
|
268
|
+
q as k,
|
|
269
269
|
K as l
|
|
270
270
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as u, Fragment as $, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as ge, useState as I, useCallback as y, useImperativeHandle as ve, useRef as ae, useMemo as M } from "react";
|
|
3
|
-
import { a as be, x as J, z as ye, C as xe, D as we, P as re, I as H, E as D, F as Ce, G as Se, J as Ie, K as te, L as De, N as Ne, O as ke, Q as Ue, u as Q, R as Fe, S as Pe, T as Ae, U as Re, W as Y, y as Z, X as ze, Y as je, Z as Be, h as $e, B as X, _ as Ee, $ as Oe, a0 as Te, a1 as ee, a2 as R, a3 as Le, a4 as Me, V as He, A as Xe, a5 as We, a6 as Je, a7 as Ke, a8 as Ve } from "./main-
|
|
4
|
-
import { D as E, a as W, b as Ge, e as _e, f as qe, S as Qe } from "./SideDrawer-
|
|
5
|
-
import { P as ne, a as Ye, D as Ze, b as eo, h as oo } from "./handleCopyClick-
|
|
3
|
+
import { a as be, x as J, z as ye, C as xe, D as we, P as re, I as H, E as D, F as Ce, G as Se, J as Ie, K as te, L as De, N as Ne, O as ke, Q as Ue, u as Q, R as Fe, S as Pe, T as Ae, U as Re, W as Y, y as Z, X as ze, Y as je, Z as Be, h as $e, B as X, _ as Ee, $ as Oe, a0 as Te, a1 as ee, a2 as R, a3 as Le, a4 as Me, V as He, A as Xe, a5 as We, a6 as Je, a7 as Ke, a8 as Ve } from "./main-Cdwk7Rjj.js";
|
|
4
|
+
import { D as E, a as W, b as Ge, e as _e, f as qe, S as Qe } from "./SideDrawer-BzfNGNbq.js";
|
|
5
|
+
import { P as ne, a as Ye, D as Ze, b as eo, h as oo } from "./handleCopyClick-C-w304_U.js";
|
|
6
6
|
const ao = (c, i) => {
|
|
7
7
|
const l = atob(c.split(",")[1]), g = new ArrayBuffer(l.length), e = new Uint8Array(g);
|
|
8
8
|
for (let r = 0; r < l.length; r++)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import m, { useCallback as D, useMemo as h } from "react";
|
|
3
|
-
import { x as g, a as p, y as w, M as l } from "./main-
|
|
4
|
-
import { S as b, D as u, a as y, b as k, c as S, d as f } from "./SideDrawer-
|
|
3
|
+
import { x as g, a as p, y as w, M as l } from "./main-Cdwk7Rjj.js";
|
|
4
|
+
import { S as b, D as u, a as y, b as k, c as S, d as f } from "./SideDrawer-BzfNGNbq.js";
|
|
5
5
|
const T = ({
|
|
6
6
|
handleCloseModal: n
|
|
7
7
|
}) => {
|