@linktr.ee/messaging-react 3.3.5 → 3.3.6-rc-1780987607
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/{Card-C-FCwjGa.cjs → Card-BlviN8Fb.cjs} +2 -2
- package/dist/{Card-C-FCwjGa.cjs.map → Card-BlviN8Fb.cjs.map} +1 -1
- package/dist/{Card-DzjYyrie.js → Card-C4ncqjxJ.js} +2 -2
- package/dist/{Card-DzjYyrie.js.map → Card-C4ncqjxJ.js.map} +1 -1
- package/dist/{Card-BRRlz4kq.cjs → Card-Cn7Zxc6U.cjs} +2 -2
- package/dist/{Card-BRRlz4kq.cjs.map → Card-Cn7Zxc6U.cjs.map} +1 -1
- package/dist/{Card-CVZzYmYW.js → Card-DE5bfj0l.js} +2 -2
- package/dist/{Card-CVZzYmYW.js.map → Card-DE5bfj0l.js.map} +1 -1
- package/dist/{Card-B9QrjooN.js → Card-IjOI7UXs.js} +3 -3
- package/dist/{Card-B9QrjooN.js.map → Card-IjOI7UXs.js.map} +1 -1
- package/dist/{Card-D_oLlfPw.cjs → Card-KgQxeR-B.cjs} +2 -2
- package/dist/{Card-D_oLlfPw.cjs.map → Card-KgQxeR-B.cjs.map} +1 -1
- package/dist/{LockedThumbnail-CJfXY_Ut.js → LockedThumbnail-4-54cyJG.js} +2 -2
- package/dist/{LockedThumbnail-CJfXY_Ut.js.map → LockedThumbnail-4-54cyJG.js.map} +1 -1
- package/dist/{LockedThumbnail-Cth1yWnH.cjs → LockedThumbnail-DL5NZzWJ.cjs} +2 -2
- package/dist/{LockedThumbnail-Cth1yWnH.cjs.map → LockedThumbnail-DL5NZzWJ.cjs.map} +1 -1
- package/dist/{index-D7eRkXoG.js → index-C2wfgpUU.js} +585 -551
- package/dist/index-C2wfgpUU.js.map +1 -0
- package/dist/index-nanry0Io.cjs +2 -0
- package/dist/index-nanry0Io.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -2
- package/src/components/ActionButton/ActionButton.test.tsx +0 -25
- package/src/components/AttachmentCard/AttachmentCard.stories.tsx +122 -0
- package/src/components/Avatar/Avatar.stories.tsx +20 -0
- package/src/components/ChannelList/ChannelList.stories.tsx +5 -0
- package/src/components/ChannelList/CustomChannelPreview.stories.tsx +22 -0
- package/src/components/ChannelView.test.tsx +12 -1
- package/src/components/ChannelView.tsx +34 -17
- package/src/components/CustomMessage/CustomMessage.stories.tsx +0 -16
- package/src/components/CustomMessage/MessageAttachmentConversations.stories.tsx +13 -0
- package/src/components/CustomMessage/MessageTag.stories.tsx +18 -0
- package/src/components/CustomMessage/MessageVoteButtons.stories.tsx +9 -0
- package/src/components/CustomMessageInput/index.tsx +14 -4
- package/src/components/CustomSystemMessage/CustomSystemMessage.stories.tsx +54 -0
- package/src/components/CustomTypingIndicator/CustomTypingIndicator.stories.tsx +7 -0
- package/src/components/LinkAttachment/LinkAttachment.stories.tsx +11 -1
- package/src/components/LockedAttachment/LockedAttachment.stories.tsx +4 -0
- package/src/components/MediaMessage/MediaMessage.test.tsx +0 -38
- package/src/components/MessageAttachment/MessageAttachment.test.tsx +25 -84
- package/src/components/SearchInput/SearchInput.test.tsx +0 -8
- package/src/utils/formatRelativeTime.test.ts +1 -32
- package/dist/index-CBtOPvxW.cjs +0 -2
- package/dist/index-CBtOPvxW.cjs.map +0 -1
- package/dist/index-D7eRkXoG.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { Chat as
|
|
5
|
-
import { StarIcon as Fe, DotsThreeIcon as
|
|
2
|
+
import j, { createContext as Ge, useContext as Te, useCallback as W, useState as O, useRef as H, useEffect as Y, useId as En, useMemo as ee, Suspense as He } from "react";
|
|
3
|
+
import { StreamChatService as In } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { Chat as Sn, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Dn, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as $n, ReminderNotification as Fn, StreamedMessageText as Bn, messageHasAttachments as Un, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Tt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as pe, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as Le, AIStates as De, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, defaultRenderMessages as cs, ChannelList as ds } from "stream-chat-react";
|
|
5
|
+
import { StarIcon as Fe, DotsThreeIcon as us, SpinnerGapIcon as Ce, SignOutIcon as ms, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as hs, SpeakerHighIcon as fs, VideoCameraIcon as Gt, FileMdIcon as gs, FileTextIcon as bs, FileZipIcon as ps, FilePptIcon as vs, FileCsvIcon as xs, FileXlsIcon as ws, FileDocIcon as Ns, FilePdfIcon as _s, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as ys, LinkIcon as Cs, DownloadSimpleIcon as be, GiftIcon as ks, ThumbsUpIcon as Es, ThumbsDownIcon as Is, TrashSimpleIcon as Ss, XIcon as Ae, ArrowUpIcon as Ts, SparkleIcon as Ue, ProhibitIcon as As, ArrowLeftIcon as Mt, PencilSimpleIcon as Ms, CaretLeftIcon as Rs, CaretRightIcon as Ls } from "@phosphor-icons/react";
|
|
6
6
|
import y from "classnames";
|
|
7
|
-
import { MessageActions as
|
|
7
|
+
import { MessageActions as Ds, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
|
|
8
8
|
import { LinkPreviewsManager as Rt } from "stream-chat";
|
|
9
9
|
const Yt = Ge({
|
|
10
10
|
service: null,
|
|
@@ -16,7 +16,7 @@ const Yt = Ge({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), qe = () => Te(Yt),
|
|
19
|
+
}), qe = () => Te(Yt), Ni = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -36,14 +36,14 @@ const Yt = Ge({
|
|
|
36
36
|
serviceConfig: !!s,
|
|
37
37
|
capabilities: Object.keys(r)
|
|
38
38
|
});
|
|
39
|
-
const [l, d] =
|
|
39
|
+
const [l, d] = O(null), [m, b] = O(null), [u, f] = O(!1), [c, g] = O(!1), [p, v] = O(null), N = H(!1), x = H({
|
|
40
40
|
userId: t == null ? void 0 : t.id,
|
|
41
41
|
apiKey: a,
|
|
42
42
|
serviceConfig: s,
|
|
43
43
|
capabilities: r
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
renderCount:
|
|
44
|
+
}), I = H(0);
|
|
45
|
+
I.current++, o("📊 RENDER INFO", {
|
|
46
|
+
renderCount: I.current,
|
|
47
47
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
48
48
|
propChanges: {
|
|
49
49
|
userChanged: x.current.userId !== (t == null ? void 0 : t.id),
|
|
@@ -57,7 +57,7 @@ const Yt = Ge({
|
|
|
57
57
|
serviceConfig: s,
|
|
58
58
|
capabilities: r
|
|
59
59
|
}, Y(() => {
|
|
60
|
-
const k =
|
|
60
|
+
const k = I.current;
|
|
61
61
|
if (o("🔧 SERVICE INIT EFFECT TRIGGERED", {
|
|
62
62
|
renderCount: k,
|
|
63
63
|
apiKey: !!a,
|
|
@@ -80,7 +80,7 @@ const Yt = Ge({
|
|
|
80
80
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
81
81
|
serviceConfigChanged: x.current.serviceConfig !== s
|
|
82
82
|
});
|
|
83
|
-
const T = new
|
|
83
|
+
const T = new In({
|
|
84
84
|
...s,
|
|
85
85
|
apiKey: a,
|
|
86
86
|
debug: i
|
|
@@ -124,13 +124,13 @@ const Yt = Ge({
|
|
|
124
124
|
o("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, g(!0), v(null);
|
|
125
125
|
try {
|
|
126
126
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
127
|
-
const
|
|
128
|
-
b(
|
|
127
|
+
const S = await l.connectUser(t);
|
|
128
|
+
b(S), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
129
129
|
userId: t.id,
|
|
130
|
-
clientId:
|
|
130
|
+
clientId: S.userID
|
|
131
131
|
});
|
|
132
|
-
} catch (
|
|
133
|
-
const R =
|
|
132
|
+
} catch (S) {
|
|
133
|
+
const R = S instanceof Error ? S.message : "Connection failed";
|
|
134
134
|
v(R), o("❌ USER CONNECTION ERROR", {
|
|
135
135
|
userId: t.id,
|
|
136
136
|
error: R
|
|
@@ -176,7 +176,7 @@ const Yt = Ge({
|
|
|
176
176
|
} finally {
|
|
177
177
|
g(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
178
178
|
}
|
|
179
|
-
}, [l, t, o]),
|
|
179
|
+
}, [l, t, o]), P = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
180
180
|
hasService: !!l,
|
|
181
181
|
hasClient: !!m,
|
|
182
182
|
isConnected: u,
|
|
@@ -204,11 +204,11 @@ const Yt = Ge({
|
|
|
204
204
|
o
|
|
205
205
|
]);
|
|
206
206
|
return o("🔄 RENDER END", {
|
|
207
|
-
renderCount:
|
|
207
|
+
renderCount: I.current,
|
|
208
208
|
willRenderChat: !!(m && u),
|
|
209
|
-
contextValueReady: !!
|
|
210
|
-
}), /* @__PURE__ */ n(Yt.Provider, { value:
|
|
211
|
-
|
|
209
|
+
contextValueReady: !!P
|
|
210
|
+
}), /* @__PURE__ */ n(Yt.Provider, { value: P, children: m && u ? /* @__PURE__ */ n(
|
|
211
|
+
Sn,
|
|
212
212
|
{
|
|
213
213
|
client: m,
|
|
214
214
|
customClasses: {
|
|
@@ -217,9 +217,9 @@ const Yt = Ge({
|
|
|
217
217
|
children: e
|
|
218
218
|
}
|
|
219
219
|
) : e });
|
|
220
|
-
},
|
|
220
|
+
}, Ps = () => qe(), qt = (e) => {
|
|
221
221
|
var a, r;
|
|
222
|
-
const [t, s] =
|
|
222
|
+
const [t, s] = O(
|
|
223
223
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
224
224
|
);
|
|
225
225
|
return Y(() => {
|
|
@@ -239,13 +239,13 @@ const Yt = Ge({
|
|
|
239
239
|
e.off("member.updated", i);
|
|
240
240
|
};
|
|
241
241
|
}, [e]), t;
|
|
242
|
-
},
|
|
243
|
-
function
|
|
244
|
-
return
|
|
242
|
+
}, Os = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
243
|
+
function zs(e) {
|
|
244
|
+
return Os.test(e.trim());
|
|
245
245
|
}
|
|
246
246
|
function Lt(e, t) {
|
|
247
247
|
const s = e == null ? void 0 : e.trim();
|
|
248
|
-
return !s || t && s === t ? !1 : !
|
|
248
|
+
return !s || t && s === t ? !1 : !zs(s);
|
|
249
249
|
}
|
|
250
250
|
function Wt(e) {
|
|
251
251
|
return Lt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Lt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
@@ -278,7 +278,7 @@ const Dt = [
|
|
|
278
278
|
"🍈"
|
|
279
279
|
// Melon
|
|
280
280
|
];
|
|
281
|
-
function
|
|
281
|
+
function $s(e) {
|
|
282
282
|
let t = 0;
|
|
283
283
|
for (let s = 0; s < e.length; s++) {
|
|
284
284
|
const a = e.charCodeAt(s);
|
|
@@ -286,8 +286,8 @@ function zs(e) {
|
|
|
286
286
|
}
|
|
287
287
|
return Math.abs(t);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
const s =
|
|
289
|
+
function Fs(e) {
|
|
290
|
+
const s = $s(e) % Dt.length;
|
|
291
291
|
return Dt[s];
|
|
292
292
|
}
|
|
293
293
|
const ae = ({
|
|
@@ -299,7 +299,7 @@ const ae = ({
|
|
|
299
299
|
shape: i = "squircle",
|
|
300
300
|
dmAgentEnabled: o = !1
|
|
301
301
|
}) => {
|
|
302
|
-
const l =
|
|
302
|
+
const l = Fs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", b = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
303
303
|
"img",
|
|
304
304
|
{
|
|
305
305
|
src: t,
|
|
@@ -361,7 +361,7 @@ const ae = ({
|
|
|
361
361
|
]
|
|
362
362
|
}
|
|
363
363
|
);
|
|
364
|
-
},
|
|
364
|
+
}, Bs = "https://linktr.ee/s/about/trust-center/report", Us = ({
|
|
365
365
|
channel: e,
|
|
366
366
|
participant: t,
|
|
367
367
|
showBlockParticipant: s = !0,
|
|
@@ -374,8 +374,8 @@ const ae = ({
|
|
|
374
374
|
onActionComplete: m,
|
|
375
375
|
logLabel: b = "useChannelModerationActions"
|
|
376
376
|
}) => {
|
|
377
|
-
var
|
|
378
|
-
const { service: u, debug: f } = qe(), c = (
|
|
377
|
+
var $;
|
|
378
|
+
const { service: u, debug: f } = qe(), c = ($ = t == null ? void 0 : t.user) == null ? void 0 : $.id, g = !!(a && s && u && c), [p, v] = O(!1), [N, x] = O(null), [I, E] = O(!1), [M, P] = O(!1), k = g && ((N == null ? void 0 : N.participantId) !== c || (N == null ? void 0 : N.service) !== u);
|
|
379
379
|
return Y(() => {
|
|
380
380
|
if (!g || !u || !c) {
|
|
381
381
|
v(!1), x(null);
|
|
@@ -384,15 +384,15 @@ const ae = ({
|
|
|
384
384
|
let A = !1;
|
|
385
385
|
return (async () => {
|
|
386
386
|
try {
|
|
387
|
-
const
|
|
387
|
+
const D = await u.getBlockedUsers();
|
|
388
388
|
if (A) return;
|
|
389
389
|
v(
|
|
390
|
-
|
|
390
|
+
D.some(
|
|
391
391
|
(z) => z.blocked_user_id === c
|
|
392
392
|
)
|
|
393
393
|
);
|
|
394
|
-
} catch (
|
|
395
|
-
A || console.error(`[${b}] Failed to check blocked status:`,
|
|
394
|
+
} catch (D) {
|
|
395
|
+
A || console.error(`[${b}] Failed to check blocked status:`, D);
|
|
396
396
|
} finally {
|
|
397
397
|
A || x({ participantId: c, service: u });
|
|
398
398
|
}
|
|
@@ -402,50 +402,50 @@ const ae = ({
|
|
|
402
402
|
}, [g, u, c, b]), {
|
|
403
403
|
isParticipantBlocked: p,
|
|
404
404
|
isCheckingBlockedStatus: k,
|
|
405
|
-
isLeaving:
|
|
405
|
+
isLeaving: I,
|
|
406
406
|
isUpdatingBlockStatus: M,
|
|
407
407
|
handleLeaveConversation: async () => {
|
|
408
408
|
var A;
|
|
409
|
-
if (!
|
|
409
|
+
if (!I) {
|
|
410
410
|
o == null || o(), f && console.log(`[${b}] Leave conversation`, e.cid), E(!0);
|
|
411
411
|
try {
|
|
412
|
-
const
|
|
413
|
-
await e.hide(
|
|
414
|
-
} catch (
|
|
415
|
-
console.error(`[${b}] Failed to leave conversation`,
|
|
412
|
+
const D = ((A = e._client) == null ? void 0 : A.userID) ?? null;
|
|
413
|
+
await e.hide(D, !1), r && await r(e), m == null || m();
|
|
414
|
+
} catch (D) {
|
|
415
|
+
console.error(`[${b}] Failed to leave conversation`, D);
|
|
416
416
|
} finally {
|
|
417
417
|
E(!1);
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
},
|
|
421
421
|
handleBlockUser: async () => {
|
|
422
|
-
var A,
|
|
422
|
+
var A, D, z;
|
|
423
423
|
if (!(M || !u)) {
|
|
424
|
-
l == null || l(), f && console.log(`[${b}] Block member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id),
|
|
424
|
+
l == null || l(), f && console.log(`[${b}] Block member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), P(!0);
|
|
425
425
|
try {
|
|
426
|
-
await u.blockUser((
|
|
427
|
-
} catch (
|
|
428
|
-
console.error(`[${b}] Failed to block member`,
|
|
426
|
+
await u.blockUser((D = t == null ? void 0 : t.user) == null ? void 0 : D.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
|
|
427
|
+
} catch (G) {
|
|
428
|
+
console.error(`[${b}] Failed to block member`, G);
|
|
429
429
|
} finally {
|
|
430
|
-
|
|
430
|
+
P(!1);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
},
|
|
434
434
|
handleUnblockUser: async () => {
|
|
435
|
-
var A,
|
|
435
|
+
var A, D, z;
|
|
436
436
|
if (!(M || !u)) {
|
|
437
|
-
l == null || l(), f && console.log(`[${b}] Unblock member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id),
|
|
437
|
+
l == null || l(), f && console.log(`[${b}] Unblock member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), P(!0);
|
|
438
438
|
try {
|
|
439
|
-
await u.unBlockUser((
|
|
440
|
-
} catch (
|
|
441
|
-
console.error(`[${b}] Failed to unblock member`,
|
|
439
|
+
await u.unBlockUser((D = t == null ? void 0 : t.user) == null ? void 0 : D.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
|
|
440
|
+
} catch (G) {
|
|
441
|
+
console.error(`[${b}] Failed to unblock member`, G);
|
|
442
442
|
} finally {
|
|
443
|
-
|
|
443
|
+
P(!1);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
handleReportUser: () => {
|
|
448
|
-
d == null || d(), m == null || m(), window.open(
|
|
448
|
+
d == null || d(), m == null || m(), window.open(Bs, "_blank", "noopener,noreferrer");
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
451
|
}, he = ({
|
|
@@ -479,16 +479,16 @@ const ae = ({
|
|
|
479
479
|
customChannelActions: b,
|
|
480
480
|
triggerClassName: u
|
|
481
481
|
}) => {
|
|
482
|
-
const [f, c] =
|
|
482
|
+
const [f, c] = O(!1), g = H(null), p = En(), v = W(() => c(!1), []), {
|
|
483
483
|
isParticipantBlocked: N,
|
|
484
484
|
isCheckingBlockedStatus: x,
|
|
485
|
-
isLeaving:
|
|
485
|
+
isLeaving: I,
|
|
486
486
|
isUpdatingBlockStatus: E,
|
|
487
487
|
handleLeaveConversation: M,
|
|
488
|
-
handleBlockUser:
|
|
488
|
+
handleBlockUser: P,
|
|
489
489
|
handleUnblockUser: k,
|
|
490
490
|
handleReportUser: T
|
|
491
|
-
} =
|
|
491
|
+
} = Us({
|
|
492
492
|
channel: e,
|
|
493
493
|
participant: t,
|
|
494
494
|
showBlockParticipant: a,
|
|
@@ -503,13 +503,13 @@ const ae = ({
|
|
|
503
503
|
});
|
|
504
504
|
return Y(() => {
|
|
505
505
|
if (!f) return;
|
|
506
|
-
const
|
|
507
|
-
g.current && !g.current.contains(
|
|
508
|
-
}, R = (
|
|
509
|
-
|
|
506
|
+
const S = ($) => {
|
|
507
|
+
g.current && !g.current.contains($.target) && c(!1);
|
|
508
|
+
}, R = ($) => {
|
|
509
|
+
$.key === "Escape" && c(!1);
|
|
510
510
|
};
|
|
511
|
-
return document.addEventListener("mousedown",
|
|
512
|
-
document.removeEventListener("mousedown",
|
|
511
|
+
return document.addEventListener("mousedown", S), document.addEventListener("keydown", R), () => {
|
|
512
|
+
document.removeEventListener("mousedown", S), document.removeEventListener("keydown", R);
|
|
513
513
|
};
|
|
514
514
|
}, [f]), !t || !(s || a || r || !!b) ? null : /* @__PURE__ */ h("div", { ref: g, className: "relative", children: [
|
|
515
515
|
/* @__PURE__ */ h(
|
|
@@ -520,9 +520,9 @@ const ae = ({
|
|
|
520
520
|
"aria-haspopup": "true",
|
|
521
521
|
"aria-expanded": f,
|
|
522
522
|
"aria-controls": f ? p : void 0,
|
|
523
|
-
onClick: () => c((
|
|
523
|
+
onClick: () => c((S) => !S),
|
|
524
524
|
children: [
|
|
525
|
-
/* @__PURE__ */ n(
|
|
525
|
+
/* @__PURE__ */ n(us, { className: "size-5 text-black/90" }),
|
|
526
526
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
527
527
|
]
|
|
528
528
|
}
|
|
@@ -541,10 +541,10 @@ const ae = ({
|
|
|
541
541
|
he,
|
|
542
542
|
{
|
|
543
543
|
onClick: M,
|
|
544
|
-
disabled:
|
|
545
|
-
"aria-busy":
|
|
544
|
+
disabled: I,
|
|
545
|
+
"aria-busy": I,
|
|
546
546
|
children: [
|
|
547
|
-
|
|
547
|
+
I ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ms, { className: "h-5 w-5" }),
|
|
548
548
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
549
549
|
]
|
|
550
550
|
}
|
|
@@ -570,7 +570,7 @@ const ae = ({
|
|
|
570
570
|
) : /* @__PURE__ */ h(
|
|
571
571
|
he,
|
|
572
572
|
{
|
|
573
|
-
onClick:
|
|
573
|
+
onClick: P,
|
|
574
574
|
disabled: E,
|
|
575
575
|
"aria-busy": E,
|
|
576
576
|
children: [
|
|
@@ -588,13 +588,13 @@ const ae = ({
|
|
|
588
588
|
}
|
|
589
589
|
)
|
|
590
590
|
] });
|
|
591
|
-
},
|
|
592
|
-
function
|
|
591
|
+
}, js = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
|
|
592
|
+
function Vs(e) {
|
|
593
593
|
return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === je) ? "up" : null : null;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Gs(e) {
|
|
596
596
|
const { channel: t } = ce(), { client: s } = Ye("useMessageVote"), a = ee(
|
|
597
|
-
() =>
|
|
597
|
+
() => Vs(e.own_reactions),
|
|
598
598
|
[e.own_reactions]
|
|
599
599
|
), r = W(async () => {
|
|
600
600
|
if (s != null && s.userID)
|
|
@@ -619,7 +619,7 @@ function Vs(e) {
|
|
|
619
619
|
}, [t, s == null ? void 0 : s.userID, e.id, a]);
|
|
620
620
|
return { selected: a, voteUp: r, voteDown: i };
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Hs(e) {
|
|
623
623
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
624
624
|
}
|
|
625
625
|
function Xt({
|
|
@@ -627,16 +627,16 @@ function Xt({
|
|
|
627
627
|
viewerLanguage: t
|
|
628
628
|
}) {
|
|
629
629
|
var r;
|
|
630
|
-
const s = e == null ? void 0 : e.text, a =
|
|
630
|
+
const s = e == null ? void 0 : e.text, a = Hs(t);
|
|
631
631
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
632
632
|
}
|
|
633
|
-
const
|
|
633
|
+
const Ys = j.lazy(() => import("./Card-DE5bfj0l.js")), qs = j.lazy(() => import("./Card-C4ncqjxJ.js")), Ws = j.lazy(() => import("./Card-IjOI7UXs.js")), We = () => /* @__PURE__ */ n(
|
|
634
634
|
"div",
|
|
635
635
|
{
|
|
636
636
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
|
|
637
637
|
"aria-hidden": !0
|
|
638
638
|
}
|
|
639
|
-
),
|
|
639
|
+
), Xs = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Ks = Kt, Js = Jt, Ot = { Composer: Xs, Sent: Kt, Received: Jt, Creator: Ks, Visitor: Js }, Zs = [
|
|
640
640
|
[/pdf/, "pdf"],
|
|
641
641
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
642
642
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -650,38 +650,38 @@ function ne(e) {
|
|
|
650
650
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
651
651
|
}
|
|
652
652
|
function Zt(e) {
|
|
653
|
-
const t =
|
|
653
|
+
const t = Zs.find(
|
|
654
654
|
([s]) => s.test(e)
|
|
655
655
|
);
|
|
656
656
|
return t ? t[1] : "generic";
|
|
657
657
|
}
|
|
658
|
-
const
|
|
658
|
+
const Qs = {
|
|
659
659
|
video: Gt,
|
|
660
|
-
audio:
|
|
661
|
-
image:
|
|
660
|
+
audio: fs,
|
|
661
|
+
image: hs,
|
|
662
662
|
document: Vt
|
|
663
|
-
},
|
|
664
|
-
pdf:
|
|
665
|
-
doc:
|
|
666
|
-
xls:
|
|
667
|
-
csv:
|
|
668
|
-
ppt:
|
|
669
|
-
zip:
|
|
670
|
-
text:
|
|
671
|
-
markdown:
|
|
663
|
+
}, ea = {
|
|
664
|
+
pdf: _s,
|
|
665
|
+
doc: Ns,
|
|
666
|
+
xls: ws,
|
|
667
|
+
csv: xs,
|
|
668
|
+
ppt: vs,
|
|
669
|
+
zip: ps,
|
|
670
|
+
text: bs,
|
|
671
|
+
markdown: gs,
|
|
672
672
|
generic: Vt
|
|
673
673
|
};
|
|
674
|
-
function
|
|
674
|
+
function ta(e) {
|
|
675
675
|
const t = ne(e);
|
|
676
|
-
return t !== "document" ?
|
|
676
|
+
return t !== "document" ? Qs[t] : ea[Zt(e)];
|
|
677
677
|
}
|
|
678
678
|
function le(e, t) {
|
|
679
|
-
return
|
|
679
|
+
return j.createElement(ta(e), t);
|
|
680
680
|
}
|
|
681
|
-
const
|
|
681
|
+
const na = (e) => {
|
|
682
682
|
var t, s;
|
|
683
683
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
|
|
684
|
-
},
|
|
684
|
+
}, sa = ({
|
|
685
685
|
source: e,
|
|
686
686
|
mimeType: t,
|
|
687
687
|
poster: s,
|
|
@@ -693,23 +693,23 @@ const ta = (e) => {
|
|
|
693
693
|
muted: d = !1,
|
|
694
694
|
onContainerClick: m
|
|
695
695
|
}) => {
|
|
696
|
-
const b = ne(t), u = H(null), f = H(null), c = H(null), g = H(r), [p, v] =
|
|
696
|
+
const b = ne(t), u = H(null), f = H(null), c = H(null), g = H(r), [p, v] = O(a), [N, x] = O(0), [I, E] = O(!1), [M, P] = O(!1), [k, T] = O(!1), [_, S] = O(!1), [R, $] = O(!0), [A, D] = O(null), z = W(() => {
|
|
697
697
|
T(!1), v(!0);
|
|
698
|
-
}, []),
|
|
698
|
+
}, []), G = W((w) => {
|
|
699
699
|
const C = f.current;
|
|
700
700
|
if (!C) return 0;
|
|
701
|
-
const
|
|
701
|
+
const U = C.getBoundingClientRect();
|
|
702
702
|
return Math.max(
|
|
703
703
|
0,
|
|
704
|
-
Math.min(1, (
|
|
704
|
+
Math.min(1, (na(w) - U.left) / U.width)
|
|
705
705
|
);
|
|
706
|
-
}, []),
|
|
706
|
+
}, []), F = W((w) => {
|
|
707
707
|
const C = u.current;
|
|
708
708
|
C && C.duration && (C.currentTime = w * C.duration);
|
|
709
|
-
}, []),
|
|
709
|
+
}, []), B = (w) => {
|
|
710
710
|
w.stopPropagation(), E(!0);
|
|
711
|
-
const C =
|
|
712
|
-
x(C),
|
|
711
|
+
const C = G(w);
|
|
712
|
+
x(C), F(C);
|
|
713
713
|
};
|
|
714
714
|
Y(() => {
|
|
715
715
|
r !== void 0 && r !== g.current && (g.current = r, v(r));
|
|
@@ -720,32 +720,32 @@ const ta = (e) => {
|
|
|
720
720
|
}
|
|
721
721
|
const w = () => {
|
|
722
722
|
const C = u.current;
|
|
723
|
-
C && C.duration && !
|
|
723
|
+
C && C.duration && !I && x(C.currentTime / C.duration), c.current = requestAnimationFrame(w);
|
|
724
724
|
};
|
|
725
725
|
return c.current = requestAnimationFrame(w), () => {
|
|
726
726
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
727
727
|
};
|
|
728
|
-
}, [p,
|
|
728
|
+
}, [p, I]), Y(() => {
|
|
729
729
|
const w = u.current;
|
|
730
730
|
w && (p ? w.play().catch((C) => {
|
|
731
731
|
v(!1), T(!0);
|
|
732
732
|
}) : w.pause());
|
|
733
733
|
}, [p]), Y(() => {
|
|
734
|
-
if (!
|
|
735
|
-
const w = (
|
|
736
|
-
E(!1),
|
|
734
|
+
if (!I) return;
|
|
735
|
+
const w = (U) => x(G(U)), C = (U) => {
|
|
736
|
+
E(!1), F(G(U));
|
|
737
737
|
};
|
|
738
738
|
return window.addEventListener("mousemove", w), window.addEventListener("mouseup", C), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", C), () => {
|
|
739
739
|
window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", C);
|
|
740
740
|
};
|
|
741
|
-
}, [
|
|
742
|
-
const X = A ? { aspectRatio: String(A) } : void 0,
|
|
741
|
+
}, [I, G, F]);
|
|
742
|
+
const X = A ? { aspectRatio: String(A) } : void 0, V = A ? "" : " aspect-video", L = Math.round(N * 100);
|
|
743
743
|
return /* @__PURE__ */ h(
|
|
744
744
|
"div",
|
|
745
745
|
{
|
|
746
746
|
role: "button",
|
|
747
747
|
tabIndex: 0,
|
|
748
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
748
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${V}`,
|
|
749
749
|
style: X,
|
|
750
750
|
onClick: (w) => {
|
|
751
751
|
if (m) {
|
|
@@ -784,11 +784,11 @@ const ta = (e) => {
|
|
|
784
784
|
loop: i,
|
|
785
785
|
muted: d,
|
|
786
786
|
style: { width: "100%", height: "100%" },
|
|
787
|
-
onLoadStart: () =>
|
|
787
|
+
onLoadStart: () => S(!0),
|
|
788
788
|
onCanPlay: () => {
|
|
789
|
-
|
|
789
|
+
S(!1), $(!1);
|
|
790
790
|
},
|
|
791
|
-
onWaiting: () =>
|
|
791
|
+
onWaiting: () => S(!0),
|
|
792
792
|
onPlay: () => T(!1),
|
|
793
793
|
onEnded: () => {
|
|
794
794
|
i || (v(!1), x(0));
|
|
@@ -804,15 +804,15 @@ const ta = (e) => {
|
|
|
804
804
|
muted: d,
|
|
805
805
|
playsInline: !0,
|
|
806
806
|
style: { width: "100%", height: "100%" },
|
|
807
|
-
onLoadStart: () =>
|
|
807
|
+
onLoadStart: () => S(!0),
|
|
808
808
|
onCanPlay: () => {
|
|
809
|
-
|
|
809
|
+
S(!1), $(!1);
|
|
810
810
|
},
|
|
811
|
-
onWaiting: () =>
|
|
811
|
+
onWaiting: () => S(!0),
|
|
812
812
|
onPlay: () => T(!1),
|
|
813
813
|
onLoadedMetadata: () => {
|
|
814
814
|
const w = u.current;
|
|
815
|
-
w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight &&
|
|
815
|
+
w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && D(w.videoWidth / w.videoHeight);
|
|
816
816
|
},
|
|
817
817
|
onEnded: () => {
|
|
818
818
|
i || (v(!1), x(0));
|
|
@@ -848,23 +848,23 @@ const ta = (e) => {
|
|
|
848
848
|
{
|
|
849
849
|
role: "slider",
|
|
850
850
|
"aria-label": "Playback position",
|
|
851
|
-
"aria-valuenow":
|
|
851
|
+
"aria-valuenow": L,
|
|
852
852
|
"aria-valuemin": 0,
|
|
853
853
|
"aria-valuemax": 100,
|
|
854
854
|
tabIndex: 0,
|
|
855
855
|
ref: f,
|
|
856
856
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
857
|
-
onMouseDown:
|
|
858
|
-
onTouchStart:
|
|
857
|
+
onMouseDown: B,
|
|
858
|
+
onTouchStart: B,
|
|
859
859
|
onClick: (w) => w.stopPropagation(),
|
|
860
860
|
onKeyDown: (w) => {
|
|
861
|
-
w.key === "ArrowRight" &&
|
|
861
|
+
w.key === "ArrowRight" && F(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, N - 0.05));
|
|
862
862
|
},
|
|
863
863
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
864
864
|
"div",
|
|
865
865
|
{
|
|
866
866
|
className: "h-full rounded-full bg-white",
|
|
867
|
-
style: { width: `${
|
|
867
|
+
style: { width: `${L}%` }
|
|
868
868
|
}
|
|
869
869
|
) })
|
|
870
870
|
}
|
|
@@ -879,7 +879,7 @@ const ta = (e) => {
|
|
|
879
879
|
},
|
|
880
880
|
className: "shrink-0 text-white",
|
|
881
881
|
"aria-label": p ? "Pause" : "Play",
|
|
882
|
-
children: p ? /* @__PURE__ */ n(
|
|
882
|
+
children: p ? /* @__PURE__ */ n(ys, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
|
|
883
883
|
}
|
|
884
884
|
),
|
|
885
885
|
/* @__PURE__ */ h(
|
|
@@ -887,30 +887,30 @@ const ta = (e) => {
|
|
|
887
887
|
{
|
|
888
888
|
role: "slider",
|
|
889
889
|
"aria-label": "Playback position",
|
|
890
|
-
"aria-valuenow":
|
|
890
|
+
"aria-valuenow": L,
|
|
891
891
|
"aria-valuemin": 0,
|
|
892
892
|
"aria-valuemax": 100,
|
|
893
893
|
tabIndex: 0,
|
|
894
894
|
ref: f,
|
|
895
895
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
896
|
-
onMouseDown:
|
|
897
|
-
onTouchStart:
|
|
896
|
+
onMouseDown: B,
|
|
897
|
+
onTouchStart: B,
|
|
898
898
|
onClick: (w) => w.stopPropagation(),
|
|
899
|
-
onMouseEnter: () =>
|
|
900
|
-
onMouseLeave: () =>
|
|
899
|
+
onMouseEnter: () => P(!0),
|
|
900
|
+
onMouseLeave: () => P(!1),
|
|
901
901
|
onKeyDown: (w) => {
|
|
902
|
-
w.key === "ArrowRight" &&
|
|
902
|
+
w.key === "ArrowRight" && F(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, N - 0.05));
|
|
903
903
|
},
|
|
904
904
|
children: [
|
|
905
905
|
/* @__PURE__ */ n(
|
|
906
906
|
"div",
|
|
907
907
|
{
|
|
908
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${M ||
|
|
908
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${M || I ? "h-1.5" : "h-1"}`,
|
|
909
909
|
children: /* @__PURE__ */ n(
|
|
910
910
|
"div",
|
|
911
911
|
{
|
|
912
912
|
className: "h-full rounded-full bg-white",
|
|
913
|
-
style: { width: `${
|
|
913
|
+
style: { width: `${L}%` }
|
|
914
914
|
}
|
|
915
915
|
)
|
|
916
916
|
}
|
|
@@ -918,8 +918,8 @@ const ta = (e) => {
|
|
|
918
918
|
/* @__PURE__ */ n(
|
|
919
919
|
"div",
|
|
920
920
|
{
|
|
921
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${M ||
|
|
922
|
-
style: { left: `${
|
|
921
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${M || I ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
922
|
+
style: { left: `${L}%` }
|
|
923
923
|
}
|
|
924
924
|
)
|
|
925
925
|
]
|
|
@@ -929,7 +929,7 @@ const ta = (e) => {
|
|
|
929
929
|
]
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
|
-
}, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
932
|
+
}, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", aa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
|
|
933
933
|
mimeType: e,
|
|
934
934
|
sourceUrl: t,
|
|
935
935
|
thumbnailUrl: s,
|
|
@@ -938,9 +938,9 @@ const ta = (e) => {
|
|
|
938
938
|
mediaPlayerProps: i,
|
|
939
939
|
containedImage: o = !1
|
|
940
940
|
}) => {
|
|
941
|
-
const l = ne(e), [d, m] =
|
|
941
|
+
const l = ne(e), [d, m] = O(!1);
|
|
942
942
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
943
|
-
|
|
943
|
+
sa,
|
|
944
944
|
{
|
|
945
945
|
source: t,
|
|
946
946
|
mimeType: e,
|
|
@@ -991,7 +991,7 @@ const ta = (e) => {
|
|
|
991
991
|
weight: "regular"
|
|
992
992
|
})
|
|
993
993
|
}
|
|
994
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
994
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${aa(r)}`, children: /* @__PURE__ */ n(
|
|
995
995
|
"img",
|
|
996
996
|
{
|
|
997
997
|
src: s,
|
|
@@ -1081,23 +1081,23 @@ function tn(e) {
|
|
|
1081
1081
|
function Xe(e) {
|
|
1082
1082
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function ra(e) {
|
|
1085
1085
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function ia(e) {
|
|
1088
1088
|
return e ? "text-white" : "text-black";
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function oa(e) {
|
|
1091
1091
|
return e ? "text-white/55" : "text-black/55";
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function la(e) {
|
|
1094
1094
|
return e ? "text-white/40" : "text-black/40";
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function ca(e) {
|
|
1097
1097
|
return e ? "text-white/20" : "text-black/20";
|
|
1098
1098
|
}
|
|
1099
1099
|
const Ke = ({ attachment: e, isMyMessage: t }) => {
|
|
1100
|
-
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(
|
|
1100
|
+
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(j.Fragment, { children: [
|
|
1101
1101
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1102
1102
|
"img",
|
|
1103
1103
|
{
|
|
@@ -1108,14 +1108,14 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1108
1108
|
) : /* @__PURE__ */ n(
|
|
1109
1109
|
"div",
|
|
1110
1110
|
{
|
|
1111
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1112
|
-
children: /* @__PURE__ */ n(
|
|
1111
|
+
className: `aspect-video w-full rounded-[20px] ${ra(t)} flex items-center justify-center`,
|
|
1112
|
+
children: /* @__PURE__ */ n(Cs, { className: `size-12 ${ca(t)}` })
|
|
1113
1113
|
}
|
|
1114
1114
|
) }),
|
|
1115
1115
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
1116
|
-
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1117
|
-
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${
|
|
1118
|
-
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1116
|
+
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ia(t)}`, children: s }),
|
|
1117
|
+
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${oa(t)}`, children: a }),
|
|
1118
|
+
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${la(t)}`, children: d })
|
|
1119
1119
|
] })
|
|
1120
1120
|
] });
|
|
1121
1121
|
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
|
|
@@ -1127,7 +1127,7 @@ function Je(e) {
|
|
|
1127
1127
|
var t;
|
|
1128
1128
|
return (t = e.attachments) == null ? void 0 : t.find(nn);
|
|
1129
1129
|
}
|
|
1130
|
-
async function
|
|
1130
|
+
async function da(e, t) {
|
|
1131
1131
|
let s;
|
|
1132
1132
|
try {
|
|
1133
1133
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1139,11 +1139,11 @@ async function ca(e, t) {
|
|
|
1139
1139
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1140
1140
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1141
1141
|
}
|
|
1142
|
-
const
|
|
1142
|
+
const ua = ({
|
|
1143
1143
|
url: e,
|
|
1144
1144
|
filename: t
|
|
1145
1145
|
}) => {
|
|
1146
|
-
const [s, a] =
|
|
1146
|
+
const [s, a] = O(!1);
|
|
1147
1147
|
return /* @__PURE__ */ n(
|
|
1148
1148
|
"button",
|
|
1149
1149
|
{
|
|
@@ -1151,7 +1151,7 @@ const da = ({
|
|
|
1151
1151
|
onClick: (i) => {
|
|
1152
1152
|
i.stopPropagation();
|
|
1153
1153
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1154
|
-
a(!0),
|
|
1154
|
+
a(!0), da(e, t).then(() => {
|
|
1155
1155
|
o == null || o.close();
|
|
1156
1156
|
}).catch(() => {
|
|
1157
1157
|
o && (o.location.href = e);
|
|
@@ -1159,7 +1159,7 @@ const da = ({
|
|
|
1159
1159
|
},
|
|
1160
1160
|
disabled: s,
|
|
1161
1161
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1162
|
-
children: s ? /* @__PURE__ */ n(ge, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(
|
|
1162
|
+
children: s ? /* @__PURE__ */ n(ge, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
|
|
1163
1163
|
/* @__PURE__ */ n(be, { className: "size-4 text-white", weight: "bold" }),
|
|
1164
1164
|
"Download"
|
|
1165
1165
|
] })
|
|
@@ -1241,10 +1241,10 @@ const sn = ({
|
|
|
1241
1241
|
containedImage: i === "image" || i === "document"
|
|
1242
1242
|
}
|
|
1243
1243
|
),
|
|
1244
|
-
action: /* @__PURE__ */ n(
|
|
1244
|
+
action: /* @__PURE__ */ n(ua, { url: e, filename: s })
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
|
-
},
|
|
1247
|
+
}, ma = ({
|
|
1248
1248
|
message: e,
|
|
1249
1249
|
isMyMessage: t = !1
|
|
1250
1250
|
}) => {
|
|
@@ -1275,7 +1275,7 @@ const sn = ({
|
|
|
1275
1275
|
}
|
|
1276
1276
|
)
|
|
1277
1277
|
] });
|
|
1278
|
-
},
|
|
1278
|
+
}, ha = ({
|
|
1279
1279
|
message: e
|
|
1280
1280
|
}) => {
|
|
1281
1281
|
const t = Je(e);
|
|
@@ -1283,7 +1283,7 @@ const sn = ({
|
|
|
1283
1283
|
return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
|
|
1284
1284
|
const s = Ze(e);
|
|
1285
1285
|
return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
|
|
1286
|
-
},
|
|
1286
|
+
}, fa = ({
|
|
1287
1287
|
message: e
|
|
1288
1288
|
}) => {
|
|
1289
1289
|
const t = Je(e);
|
|
@@ -1291,18 +1291,18 @@ const sn = ({
|
|
|
1291
1291
|
return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
|
|
1292
1292
|
const s = Ze(e);
|
|
1293
1293
|
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1294
|
-
},
|
|
1295
|
-
Creator:
|
|
1296
|
-
Visitor:
|
|
1297
|
-
}),
|
|
1294
|
+
}, _i = Object.assign(ma, {
|
|
1295
|
+
Creator: ha,
|
|
1296
|
+
Visitor: fa
|
|
1297
|
+
}), ga = {
|
|
1298
1298
|
isUnlocking: () => !1
|
|
1299
|
-
},
|
|
1300
|
-
LockedAttachment:
|
|
1301
|
-
}, rn = Ge({}),
|
|
1302
|
-
function
|
|
1303
|
-
return Te(rn)[e] ??
|
|
1299
|
+
}, ba = {
|
|
1300
|
+
LockedAttachment: ga
|
|
1301
|
+
}, rn = Ge({}), yi = rn.Provider;
|
|
1302
|
+
function pa(e) {
|
|
1303
|
+
return Te(rn)[e] ?? ba[e];
|
|
1304
1304
|
}
|
|
1305
|
-
const
|
|
1305
|
+
const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1306
1306
|
"svg",
|
|
1307
1307
|
{
|
|
1308
1308
|
width: e,
|
|
@@ -1319,19 +1319,19 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1319
1319
|
}
|
|
1320
1320
|
)
|
|
1321
1321
|
}
|
|
1322
|
-
),
|
|
1322
|
+
), xa = (e) => {
|
|
1323
1323
|
var t;
|
|
1324
1324
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
1325
|
-
},
|
|
1325
|
+
}, wa = (e) => {
|
|
1326
1326
|
var t;
|
|
1327
1327
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
1328
1328
|
}, ke = (e) => {
|
|
1329
1329
|
var t;
|
|
1330
1330
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
1331
|
-
},
|
|
1331
|
+
}, Na = (e) => {
|
|
1332
1332
|
var t;
|
|
1333
1333
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1334
|
-
}, on = (e) =>
|
|
1334
|
+
}, on = (e) => xa(e) || wa(e), _a = (e) => {
|
|
1335
1335
|
var t;
|
|
1336
1336
|
return on(e) && !((t = e.text) != null && t.trim());
|
|
1337
1337
|
}, Pe = ({
|
|
@@ -1349,7 +1349,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1349
1349
|
if (!f) return null;
|
|
1350
1350
|
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", g = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1351
1351
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1352
|
-
/* @__PURE__ */ n(
|
|
1352
|
+
/* @__PURE__ */ n(ks, { size: t ? 14 : 12 }),
|
|
1353
1353
|
/* @__PURE__ */ n("span", { children: g })
|
|
1354
1354
|
] });
|
|
1355
1355
|
}
|
|
@@ -1357,7 +1357,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1357
1357
|
"message-chatbot-indicator",
|
|
1358
1358
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1359
1359
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1360
|
-
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(
|
|
1360
|
+
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(va, { size: o ? 12 : 15 }) });
|
|
1361
1361
|
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(te, { children: [
|
|
1362
1362
|
m,
|
|
1363
1363
|
b
|
|
@@ -1365,7 +1365,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1365
1365
|
b,
|
|
1366
1366
|
m
|
|
1367
1367
|
] }) });
|
|
1368
|
-
},
|
|
1368
|
+
}, ya = ({
|
|
1369
1369
|
selected: e,
|
|
1370
1370
|
onVoteUp: t,
|
|
1371
1371
|
onVoteDown: s
|
|
@@ -1381,7 +1381,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1381
1381
|
"aria-label": "Good response",
|
|
1382
1382
|
"aria-pressed": e === "up",
|
|
1383
1383
|
"data-tooltip": "Good response",
|
|
1384
|
-
children: /* @__PURE__ */ n(
|
|
1384
|
+
children: /* @__PURE__ */ n(Es, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
1385
1385
|
}
|
|
1386
1386
|
),
|
|
1387
1387
|
/* @__PURE__ */ n(
|
|
@@ -1395,10 +1395,10 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1395
1395
|
"aria-label": "Bad response",
|
|
1396
1396
|
"aria-pressed": e === "down",
|
|
1397
1397
|
"data-tooltip": "Bad response",
|
|
1398
|
-
children: /* @__PURE__ */ n(
|
|
1398
|
+
children: /* @__PURE__ */ n(Is, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
1399
1399
|
}
|
|
1400
1400
|
)
|
|
1401
|
-
] }),
|
|
1401
|
+
] }), Ca = (e) => {
|
|
1402
1402
|
var ht, ft, gt, bt, pt, vt, xt, wt, Nt, _t, yt, Ct, kt, Et;
|
|
1403
1403
|
const {
|
|
1404
1404
|
additionalMessageInputProps: t,
|
|
@@ -1417,26 +1417,26 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1417
1417
|
renderText: g,
|
|
1418
1418
|
threadList: p,
|
|
1419
1419
|
viewerLanguage: v
|
|
1420
|
-
} = e, { client: N } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking:
|
|
1420
|
+
} = e, { client: N } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: I, onUnlockClick: E, onFetchSource: M, onDownloadClick: P } = pa("LockedAttachment"), [k, T] = O(!1), _ = Mn(c.id), { selected: S, voteUp: R, voteDown: $ } = Gs(c), {
|
|
1421
1421
|
Attachment: A = Rn,
|
|
1422
|
-
EditMessageModal:
|
|
1422
|
+
EditMessageModal: D = Ln,
|
|
1423
1423
|
MessageActions: z,
|
|
1424
|
-
MessageBlocked:
|
|
1425
|
-
MessageBouncePrompt:
|
|
1426
|
-
MessageDeleted:
|
|
1424
|
+
MessageBlocked: G = Dn,
|
|
1425
|
+
MessageBouncePrompt: F = Pn,
|
|
1426
|
+
MessageDeleted: B = On,
|
|
1427
1427
|
MessageIsThreadReplyInChannelButtonIndicator: X = zn,
|
|
1428
|
-
MessageRepliesCountButton:
|
|
1429
|
-
ReminderNotification:
|
|
1428
|
+
MessageRepliesCountButton: V = $n,
|
|
1429
|
+
ReminderNotification: L = Fn,
|
|
1430
1430
|
StreamedMessageText: w = Bn,
|
|
1431
1431
|
PinIndicator: C
|
|
1432
|
-
} = Ut("CustomMessage"),
|
|
1432
|
+
} = Ut("CustomMessage"), U = Un(c), q = jn(c), _e = ee(
|
|
1433
1433
|
() => u == null ? void 0 : u(c),
|
|
1434
1434
|
[u, c]
|
|
1435
1435
|
), K = ee(() => {
|
|
1436
1436
|
const me = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...me] : me;
|
|
1437
1437
|
if (!ke(c)) return ye;
|
|
1438
|
-
const
|
|
1439
|
-
return
|
|
1438
|
+
const It = ye.filter((St) => !("type" in St) || !nn(St));
|
|
1439
|
+
return It.length === ye.length ? ye : It;
|
|
1440
1440
|
}, [c]), re = ee(() => {
|
|
1441
1441
|
const me = Xt({ message: c, viewerLanguage: v });
|
|
1442
1442
|
return me === c.text ? c : { ...c, text: me };
|
|
@@ -1444,9 +1444,9 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1444
1444
|
if (Vn(c))
|
|
1445
1445
|
return null;
|
|
1446
1446
|
if (c.deleted_at || c.type === "deleted")
|
|
1447
|
-
return /* @__PURE__ */ n(
|
|
1447
|
+
return /* @__PURE__ */ n(B, { message: c });
|
|
1448
1448
|
if (Gn(c))
|
|
1449
|
-
return /* @__PURE__ */ n(
|
|
1449
|
+
return /* @__PURE__ */ n(G, {});
|
|
1450
1450
|
const J = !p && !!c.reply_count, se = !p && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Hn(c);
|
|
1451
1451
|
let ie;
|
|
1452
1452
|
Q ? ie = () => m(c) : lt && (ie = () => T(!0));
|
|
@@ -1457,7 +1457,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1457
1457
|
de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
1458
1458
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
1459
1459
|
{
|
|
1460
|
-
"str-chat__message--has-attachment":
|
|
1460
|
+
"str-chat__message--has-attachment": U,
|
|
1461
1461
|
"str-chat__message--highlighted": b,
|
|
1462
1462
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
1463
1463
|
"str-chat__message--with-reactions": q,
|
|
@@ -1467,10 +1467,10 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1467
1467
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1468
1468
|
"str-chat__virtual-message__wrapper--group": o
|
|
1469
1469
|
}
|
|
1470
|
-
), ct = c.poll_id && N.polls.fromState(c.poll_id), dt =
|
|
1470
|
+
), ct = c.poll_id && N.polls.fromState(c.poll_id), dt = _a(c), ue = ke(c), ut = Na(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
|
|
1471
1471
|
return /* @__PURE__ */ h(te, { children: [
|
|
1472
1472
|
a && /* @__PURE__ */ n(
|
|
1473
|
-
|
|
1473
|
+
D,
|
|
1474
1474
|
{
|
|
1475
1475
|
additionalMessageInputProps: t
|
|
1476
1476
|
}
|
|
@@ -1478,7 +1478,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1478
1478
|
k && /* @__PURE__ */ n(
|
|
1479
1479
|
Yn,
|
|
1480
1480
|
{
|
|
1481
|
-
MessageBouncePrompt:
|
|
1481
|
+
MessageBouncePrompt: F,
|
|
1482
1482
|
onClose: () => T(!1),
|
|
1483
1483
|
open: k
|
|
1484
1484
|
}
|
|
@@ -1490,7 +1490,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1490
1490
|
"data-message-id": c.id,
|
|
1491
1491
|
children: [
|
|
1492
1492
|
C && /* @__PURE__ */ n(C, {}),
|
|
1493
|
-
!!_ && /* @__PURE__ */ n(
|
|
1493
|
+
!!_ && /* @__PURE__ */ n(L, { reminder: _ }),
|
|
1494
1494
|
c.user && /* @__PURE__ */ n(
|
|
1495
1495
|
ae,
|
|
1496
1496
|
{
|
|
@@ -1546,10 +1546,10 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1546
1546
|
amountText: (Ct = c.metadata) == null ? void 0 : Ct.amount_text,
|
|
1547
1547
|
detail: (kt = c.metadata) == null ? void 0 : kt.attachment_detail,
|
|
1548
1548
|
paymentStatus: (Et = c.metadata) == null ? void 0 : Et.payment_status,
|
|
1549
|
-
isUnlocking:
|
|
1549
|
+
isUnlocking: I(c.id),
|
|
1550
1550
|
onUnlockClick: () => E == null ? void 0 : E(c, x),
|
|
1551
1551
|
onFetchSource: async () => await (M == null ? void 0 : M(c, x)),
|
|
1552
|
-
onDownloadClick: () =>
|
|
1552
|
+
onDownloadClick: () => P == null ? void 0 : P(c, x)
|
|
1553
1553
|
}
|
|
1554
1554
|
),
|
|
1555
1555
|
z && /* @__PURE__ */ n(z, {})
|
|
@@ -1608,16 +1608,16 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1608
1608
|
}
|
|
1609
1609
|
),
|
|
1610
1610
|
s && ue && /* @__PURE__ */ n(
|
|
1611
|
-
|
|
1611
|
+
ya,
|
|
1612
1612
|
{
|
|
1613
|
-
selected:
|
|
1613
|
+
selected: S,
|
|
1614
1614
|
onVoteUp: R,
|
|
1615
|
-
onVoteDown:
|
|
1615
|
+
onVoteDown: $
|
|
1616
1616
|
}
|
|
1617
1617
|
)
|
|
1618
1618
|
] }),
|
|
1619
1619
|
J && /* @__PURE__ */ n(
|
|
1620
|
-
|
|
1620
|
+
V,
|
|
1621
1621
|
{
|
|
1622
1622
|
onClick: d,
|
|
1623
1623
|
reply_count: c.reply_count
|
|
@@ -1629,13 +1629,13 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1629
1629
|
c.id
|
|
1630
1630
|
)
|
|
1631
1631
|
] });
|
|
1632
|
-
},
|
|
1633
|
-
|
|
1632
|
+
}, ka = j.memo(
|
|
1633
|
+
Ca,
|
|
1634
1634
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
|
|
1635
|
-
),
|
|
1635
|
+
), Ea = (e) => {
|
|
1636
1636
|
const t = pe("CustomMessage");
|
|
1637
|
-
return /* @__PURE__ */ n(
|
|
1638
|
-
},
|
|
1637
|
+
return /* @__PURE__ */ n(ka, { ...t, ...e });
|
|
1638
|
+
}, Ia = () => {
|
|
1639
1639
|
var s;
|
|
1640
1640
|
const { handleDelete: e, message: t } = pe("CustomMessageActions");
|
|
1641
1641
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
@@ -1660,19 +1660,19 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1660
1660
|
children: /* @__PURE__ */ n(jt, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1661
1661
|
}
|
|
1662
1662
|
);
|
|
1663
|
-
},
|
|
1663
|
+
}, Ta = () => {
|
|
1664
1664
|
var t;
|
|
1665
1665
|
const { message: e } = pe("CustomMessageActions");
|
|
1666
1666
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
|
|
1667
|
-
|
|
1667
|
+
Ds,
|
|
1668
1668
|
{
|
|
1669
1669
|
messageActionSet: [
|
|
1670
|
-
{ Component:
|
|
1670
|
+
{ Component: Ia, placement: "quick", type: "delete" },
|
|
1671
1671
|
{ Component: Sa, placement: "quick", type: "flag" }
|
|
1672
1672
|
]
|
|
1673
1673
|
}
|
|
1674
1674
|
);
|
|
1675
|
-
},
|
|
1675
|
+
}, Aa = ({
|
|
1676
1676
|
link: e,
|
|
1677
1677
|
onDismiss: t
|
|
1678
1678
|
}) => {
|
|
@@ -1712,26 +1712,26 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1712
1712
|
]
|
|
1713
1713
|
}
|
|
1714
1714
|
);
|
|
1715
|
-
},
|
|
1715
|
+
}, Ma = (e) => ({
|
|
1716
1716
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
1717
1717
|
(t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
|
|
1718
1718
|
)
|
|
1719
|
-
}),
|
|
1719
|
+
}), Ra = () => {
|
|
1720
1720
|
const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
|
|
1721
1721
|
e.state,
|
|
1722
|
-
|
|
1722
|
+
Ma
|
|
1723
1723
|
), s = (r) => {
|
|
1724
1724
|
e.dismissPreview(r);
|
|
1725
1725
|
};
|
|
1726
1726
|
return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
|
|
1727
|
-
|
|
1727
|
+
Aa,
|
|
1728
1728
|
{
|
|
1729
1729
|
link: r,
|
|
1730
1730
|
onDismiss: s
|
|
1731
1731
|
},
|
|
1732
1732
|
r.og_scrape_url
|
|
1733
1733
|
)) }) : null;
|
|
1734
|
-
}, ln =
|
|
1734
|
+
}, ln = j.createContext(!1), La = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1735
1735
|
"button",
|
|
1736
1736
|
{
|
|
1737
1737
|
...s,
|
|
@@ -1739,16 +1739,16 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1739
1739
|
"aria-label": "Send",
|
|
1740
1740
|
disabled: t,
|
|
1741
1741
|
onClick: e,
|
|
1742
|
-
children: /* @__PURE__ */ n(
|
|
1742
|
+
children: /* @__PURE__ */ n(Ts, { weight: "bold", className: "size-4" })
|
|
1743
1743
|
}
|
|
1744
|
-
),
|
|
1744
|
+
), Da = () => {
|
|
1745
1745
|
const e = Te(ln), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
|
|
1746
|
-
SendButton: r =
|
|
1746
|
+
SendButton: r = La,
|
|
1747
1747
|
AttachmentPreviewList: i = es
|
|
1748
1748
|
} = Ut("CustomMessageInput");
|
|
1749
1749
|
return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
|
|
1750
1750
|
/* @__PURE__ */ n(ts, {}),
|
|
1751
|
-
/* @__PURE__ */ n(
|
|
1751
|
+
/* @__PURE__ */ n(Ra, {}),
|
|
1752
1752
|
/* @__PURE__ */ n(i, {}),
|
|
1753
1753
|
/* @__PURE__ */ h("div", { className: "flex", children: [
|
|
1754
1754
|
/* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
|
|
@@ -1775,43 +1775,56 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1775
1775
|
)
|
|
1776
1776
|
] })
|
|
1777
1777
|
] });
|
|
1778
|
-
},
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1778
|
+
}, Pa = ({
|
|
1779
|
+
className: e,
|
|
1780
|
+
renderActions: t,
|
|
1781
|
+
renderFooter: s,
|
|
1782
|
+
disabled: a = !1,
|
|
1783
|
+
disabledReason: r
|
|
1783
1784
|
}) => {
|
|
1784
|
-
var
|
|
1785
|
-
const { channel:
|
|
1786
|
-
|
|
1787
|
-
/* @__PURE__ */
|
|
1788
|
-
|
|
1789
|
-
|
|
1785
|
+
var d;
|
|
1786
|
+
const { channel: i } = ce(), o = ((d = i == null ? void 0 : i.data) == null ? void 0 : d.frozen) === !0;
|
|
1787
|
+
if (a)
|
|
1788
|
+
return /* @__PURE__ */ h(te, { children: [
|
|
1789
|
+
/* @__PURE__ */ n(
|
|
1790
|
+
"div",
|
|
1791
|
+
{
|
|
1792
|
+
className: y(
|
|
1793
|
+
"messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3",
|
|
1794
|
+
e
|
|
1795
|
+
),
|
|
1796
|
+
children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null
|
|
1797
|
+
}
|
|
1798
|
+
),
|
|
1799
|
+
s == null ? void 0 : s()
|
|
1800
|
+
] });
|
|
1801
|
+
const l = t == null ? void 0 : t();
|
|
1802
|
+
return /* @__PURE__ */ h("div", { className: y("flex flex-col gap-4", e), children: [
|
|
1790
1803
|
/* @__PURE__ */ h(
|
|
1791
1804
|
"div",
|
|
1792
1805
|
{
|
|
1793
|
-
inert:
|
|
1794
|
-
"aria-disabled":
|
|
1806
|
+
inert: o ? "" : void 0,
|
|
1807
|
+
"aria-disabled": o || void 0,
|
|
1795
1808
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1796
1809
|
children: [
|
|
1797
|
-
|
|
1798
|
-
/* @__PURE__ */ n(ln.Provider, { value:
|
|
1810
|
+
l && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: l }),
|
|
1811
|
+
/* @__PURE__ */ n(ln.Provider, { value: o, children: /* @__PURE__ */ n(Jn, { Input: Da }) })
|
|
1799
1812
|
]
|
|
1800
1813
|
}
|
|
1801
1814
|
),
|
|
1802
|
-
|
|
1815
|
+
s == null ? void 0 : s()
|
|
1803
1816
|
] });
|
|
1804
|
-
},
|
|
1817
|
+
}, Oa = [
|
|
1805
1818
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1806
1819
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1807
|
-
],
|
|
1820
|
+
], za = {
|
|
1808
1821
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
1809
1822
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
1810
|
-
},
|
|
1823
|
+
}, $a = [
|
|
1811
1824
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1812
|
-
],
|
|
1825
|
+
], Fa = {
|
|
1813
1826
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1814
|
-
}, Oe = "age safety guidelines.",
|
|
1827
|
+
}, Oe = "age safety guidelines.", Ba = "https://linktr.ee/s/about/contact", $t = (e) => Oa.includes(e), Ua = (e) => $a.includes(e), ja = (e) => {
|
|
1815
1828
|
var a;
|
|
1816
1829
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
1817
1830
|
if ($t(t))
|
|
@@ -1819,7 +1832,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1819
1832
|
kind: "dm-agent",
|
|
1820
1833
|
type: t
|
|
1821
1834
|
};
|
|
1822
|
-
if (
|
|
1835
|
+
if (Ua(t))
|
|
1823
1836
|
return {
|
|
1824
1837
|
kind: "age-safety",
|
|
1825
1838
|
type: t
|
|
@@ -1830,7 +1843,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1830
1843
|
kind: "dm-agent",
|
|
1831
1844
|
type: s
|
|
1832
1845
|
};
|
|
1833
|
-
},
|
|
1846
|
+
}, Va = (e) => {
|
|
1834
1847
|
const t = e.indexOf(Oe);
|
|
1835
1848
|
if (t === -1)
|
|
1836
1849
|
return e;
|
|
@@ -1840,7 +1853,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1840
1853
|
/* @__PURE__ */ n(
|
|
1841
1854
|
"a",
|
|
1842
1855
|
{
|
|
1843
|
-
href:
|
|
1856
|
+
href: Ba,
|
|
1844
1857
|
target: "_blank",
|
|
1845
1858
|
rel: "noopener noreferrer",
|
|
1846
1859
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -1849,13 +1862,13 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1849
1862
|
),
|
|
1850
1863
|
e.slice(s)
|
|
1851
1864
|
] });
|
|
1852
|
-
},
|
|
1865
|
+
}, Ga = (e) => {
|
|
1853
1866
|
var a, r;
|
|
1854
|
-
const t = e.message.hide_date === !0, s =
|
|
1867
|
+
const t = e.message.hide_date === !0, s = ja(
|
|
1855
1868
|
e.message
|
|
1856
1869
|
);
|
|
1857
1870
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
1858
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
1871
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || za[s.type];
|
|
1859
1872
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1860
1873
|
/* @__PURE__ */ h(
|
|
1861
1874
|
"div",
|
|
@@ -1881,7 +1894,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1881
1894
|
] });
|
|
1882
1895
|
}
|
|
1883
1896
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
1884
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
1897
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Fa[s.type];
|
|
1885
1898
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1886
1899
|
/* @__PURE__ */ h(
|
|
1887
1900
|
"div",
|
|
@@ -1891,7 +1904,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1891
1904
|
"data-age-safety-system-type": s.type,
|
|
1892
1905
|
children: [
|
|
1893
1906
|
/* @__PURE__ */ n(
|
|
1894
|
-
|
|
1907
|
+
As,
|
|
1895
1908
|
{
|
|
1896
1909
|
size: 24,
|
|
1897
1910
|
weight: "duotone",
|
|
@@ -1900,7 +1913,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1900
1913
|
"data-testid": "age-safety-system-message-icon"
|
|
1901
1914
|
}
|
|
1902
1915
|
),
|
|
1903
|
-
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
1916
|
+
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Va(i) }) })
|
|
1904
1917
|
]
|
|
1905
1918
|
}
|
|
1906
1919
|
),
|
|
@@ -1925,15 +1938,15 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1925
1938
|
begin: `${120 * t}ms`,
|
|
1926
1939
|
repeatCount: "indefinite"
|
|
1927
1940
|
}
|
|
1928
|
-
) }),
|
|
1941
|
+
) }), Ha = /* @__PURE__ */ new Set([
|
|
1929
1942
|
De.Thinking,
|
|
1930
1943
|
De.Generating,
|
|
1931
1944
|
De.ExternalSources
|
|
1932
|
-
]),
|
|
1945
|
+
]), Ya = ({ threadList: e }) => {
|
|
1933
1946
|
var g, p;
|
|
1934
1947
|
const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Te(cn);
|
|
1935
|
-
if (!e && l &&
|
|
1936
|
-
const v =
|
|
1948
|
+
if (!e && l && Ha.has(o)) {
|
|
1949
|
+
const v = qa(t, (g = r.user) == null ? void 0 : g.id);
|
|
1937
1950
|
return /* @__PURE__ */ n(
|
|
1938
1951
|
Ft,
|
|
1939
1952
|
{
|
|
@@ -2010,7 +2023,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2010
2023
|
]
|
|
2011
2024
|
}
|
|
2012
2025
|
);
|
|
2013
|
-
function
|
|
2026
|
+
function qa(e, t) {
|
|
2014
2027
|
var a;
|
|
2015
2028
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
2016
2029
|
for (const r of Object.values(s)) {
|
|
@@ -2019,7 +2032,7 @@ function Ya(e, t) {
|
|
|
2019
2032
|
return i;
|
|
2020
2033
|
}
|
|
2021
2034
|
}
|
|
2022
|
-
const
|
|
2035
|
+
const Wa = () => null, Xa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2023
2036
|
"div",
|
|
2024
2037
|
{
|
|
2025
2038
|
className: y("flex items-center justify-center h-full", e),
|
|
@@ -2062,12 +2075,12 @@ const qa = () => null, Wa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2062
2075
|
t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
|
|
2063
2076
|
]
|
|
2064
2077
|
}
|
|
2065
|
-
), Ee =
|
|
2066
|
-
/* @__PURE__ */ n(
|
|
2078
|
+
), Ee = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
2079
|
+
/* @__PURE__ */ n(Xa, { className: "w-6 h-6" }),
|
|
2067
2080
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2068
2081
|
] }) }));
|
|
2069
2082
|
Ee.displayName = "LoadingState";
|
|
2070
|
-
const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant",
|
|
2083
|
+
const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Ka = ({
|
|
2071
2084
|
onBack: e,
|
|
2072
2085
|
showBackButton: t,
|
|
2073
2086
|
showStarButton: s = !1,
|
|
@@ -2083,17 +2096,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2083
2096
|
customChannelActions: f,
|
|
2084
2097
|
showActionsMenu: c = !0
|
|
2085
2098
|
}) => {
|
|
2086
|
-
var E, M,
|
|
2087
|
-
const { channel: g } = ce(), p =
|
|
2088
|
-
var R,
|
|
2099
|
+
var E, M, P, k, T;
|
|
2100
|
+
const { channel: g } = ce(), p = j.useMemo(() => {
|
|
2101
|
+
var R, $;
|
|
2089
2102
|
const _ = (R = g._client) == null ? void 0 : R.userID;
|
|
2090
|
-
return _ ? Object.values(((
|
|
2103
|
+
return _ ? Object.values((($ = g.state) == null ? void 0 : $.members) || {}).find(
|
|
2091
2104
|
(A) => {
|
|
2092
|
-
var
|
|
2093
|
-
return ((
|
|
2105
|
+
var D;
|
|
2106
|
+
return ((D = A.user) == null ? void 0 : D.id) && A.user.id !== _;
|
|
2094
2107
|
}
|
|
2095
2108
|
) : void 0;
|
|
2096
|
-
}, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), N = (
|
|
2109
|
+
}, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), N = (P = p == null ? void 0 : p.user) == null ? void 0 : P.image, x = qt(g), I = async () => {
|
|
2097
2110
|
try {
|
|
2098
2111
|
x ? await g.unpin() : await g.pin();
|
|
2099
2112
|
} catch (_) {
|
|
@@ -2142,7 +2155,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2142
2155
|
"button",
|
|
2143
2156
|
{
|
|
2144
2157
|
className: oe,
|
|
2145
|
-
onClick:
|
|
2158
|
+
onClick: I,
|
|
2146
2159
|
type: "button",
|
|
2147
2160
|
"aria-label": x ? "Unstar conversation" : "Star conversation",
|
|
2148
2161
|
children: /* @__PURE__ */ n(
|
|
@@ -2215,7 +2228,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2215
2228
|
"button",
|
|
2216
2229
|
{
|
|
2217
2230
|
className: oe,
|
|
2218
|
-
onClick:
|
|
2231
|
+
onClick: I,
|
|
2219
2232
|
type: "button",
|
|
2220
2233
|
"aria-label": x ? "Unstar conversation" : "Star conversation",
|
|
2221
2234
|
children: /* @__PURE__ */ n(
|
|
@@ -2250,7 +2263,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2250
2263
|
] })
|
|
2251
2264
|
] })
|
|
2252
2265
|
] });
|
|
2253
|
-
},
|
|
2266
|
+
}, Ja = ({
|
|
2254
2267
|
onBack: e,
|
|
2255
2268
|
showBackButton: t,
|
|
2256
2269
|
renderMessageInputActions: s,
|
|
@@ -2270,58 +2283,58 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2270
2283
|
chatbotVotingEnabled: v = !1,
|
|
2271
2284
|
renderChannelBanner: N,
|
|
2272
2285
|
customChannelActions: x,
|
|
2273
|
-
renderMessage:
|
|
2286
|
+
renderMessage: I,
|
|
2274
2287
|
dmAgentEnabled: E = !1,
|
|
2275
2288
|
viewerLanguage: M,
|
|
2276
|
-
showChannelInfo:
|
|
2289
|
+
showChannelInfo: P = !0
|
|
2277
2290
|
}) => {
|
|
2278
|
-
var
|
|
2279
|
-
const { channel: k } = ce(), T =
|
|
2291
|
+
var D, z, G, F, B, X;
|
|
2292
|
+
const { channel: k } = ce(), T = j.useMemo(() => {
|
|
2280
2293
|
var w, C;
|
|
2281
|
-
const
|
|
2282
|
-
return
|
|
2283
|
-
(
|
|
2294
|
+
const V = (w = k._client) == null ? void 0 : w.userID;
|
|
2295
|
+
return V ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find(
|
|
2296
|
+
(U) => {
|
|
2284
2297
|
var q;
|
|
2285
|
-
return ((q =
|
|
2298
|
+
return ((q = U.user) == null ? void 0 : q.id) && U.user.id !== V;
|
|
2286
2299
|
}
|
|
2287
2300
|
) : void 0;
|
|
2288
|
-
}, [(
|
|
2301
|
+
}, [(D = k._client) == null ? void 0 : D.userID, (z = k.state) == null ? void 0 : z.members]), _ = j.useMemo(() => {
|
|
2289
2302
|
var w, C;
|
|
2290
|
-
const
|
|
2291
|
-
return
|
|
2303
|
+
const V = (w = k._client) == null ? void 0 : w.userID;
|
|
2304
|
+
return V ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find((U) => {
|
|
2292
2305
|
var q;
|
|
2293
|
-
return ((q =
|
|
2306
|
+
return ((q = U.user) == null ? void 0 : q.id) === V;
|
|
2294
2307
|
}) : void 0;
|
|
2295
|
-
}, [(
|
|
2296
|
-
(
|
|
2297
|
-
const { message:
|
|
2298
|
-
|
|
2308
|
+
}, [(G = k._client) == null ? void 0 : G.userID, (F = k.state) == null ? void 0 : F.members]), S = ((B = _ == null ? void 0 : _.user) == null ? void 0 : B.is_account) ?? (_ == null ? void 0 : _.is_account), R = ((X = T == null ? void 0 : T.user) == null ? void 0 : X.is_account) ?? (T == null ? void 0 : T.is_account), $ = E && S === !1 && R === !0, A = W(
|
|
2309
|
+
(V) => {
|
|
2310
|
+
const { message: L } = pe("ChannelView"), w = /* @__PURE__ */ n(
|
|
2311
|
+
Ea,
|
|
2299
2312
|
{
|
|
2300
|
-
...
|
|
2313
|
+
...V,
|
|
2301
2314
|
chatbotVotingEnabled: v,
|
|
2302
2315
|
viewerLanguage: M
|
|
2303
2316
|
}
|
|
2304
2317
|
);
|
|
2305
|
-
return !
|
|
2318
|
+
return !I || !L ? w : I(w, L);
|
|
2306
2319
|
},
|
|
2307
|
-
[v,
|
|
2320
|
+
[v, I, M]
|
|
2308
2321
|
);
|
|
2309
2322
|
return /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(
|
|
2310
2323
|
is,
|
|
2311
2324
|
{
|
|
2312
2325
|
overrides: {
|
|
2313
2326
|
Message: A,
|
|
2314
|
-
MessageActions:
|
|
2327
|
+
MessageActions: Ta
|
|
2315
2328
|
},
|
|
2316
2329
|
children: /* @__PURE__ */ h(os, { children: [
|
|
2317
2330
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
2318
|
-
|
|
2331
|
+
Ka,
|
|
2319
2332
|
{
|
|
2320
2333
|
onBack: e,
|
|
2321
2334
|
showBackButton: t,
|
|
2322
|
-
showActionsMenu:
|
|
2335
|
+
showActionsMenu: P,
|
|
2323
2336
|
showStarButton: p,
|
|
2324
|
-
dmAgentEnabled:
|
|
2337
|
+
dmAgentEnabled: $,
|
|
2325
2338
|
onLeaveConversation: i,
|
|
2326
2339
|
onBlockParticipant: o,
|
|
2327
2340
|
showDeleteConversation: l,
|
|
@@ -2333,32 +2346,53 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2333
2346
|
customChannelActions: x
|
|
2334
2347
|
}
|
|
2335
2348
|
) }, "lt-channel-header"),
|
|
2336
|
-
N ? /* @__PURE__ */ n(
|
|
2349
|
+
N ? /* @__PURE__ */ n(j.Fragment, { children: N() }, "lt-channel-banner") : null,
|
|
2337
2350
|
/* @__PURE__ */ n(
|
|
2338
2351
|
"div",
|
|
2339
2352
|
{
|
|
2340
2353
|
className: "flex-1 overflow-hidden relative",
|
|
2341
|
-
children: /* @__PURE__ */ n(
|
|
2354
|
+
children: /* @__PURE__ */ n(
|
|
2355
|
+
ls,
|
|
2356
|
+
{
|
|
2357
|
+
hideDeletedMessages: !0,
|
|
2358
|
+
hideNewMessageSeparator: !1,
|
|
2359
|
+
renderMessages: (V) => {
|
|
2360
|
+
const L = cs(V);
|
|
2361
|
+
return r && L.push(
|
|
2362
|
+
/* @__PURE__ */ n("li", { children: r(k) }, "lt-channel-conversation-footer")
|
|
2363
|
+
), L.push(
|
|
2364
|
+
// Message Input
|
|
2365
|
+
/* @__PURE__ */ h(
|
|
2366
|
+
"li",
|
|
2367
|
+
{
|
|
2368
|
+
className: "flex sticky bottom-0 p-4 pt-1 inset-x-0 mx-[calc(-1*var(--str-chat\\_\\_spacing-2))] md:mx-[calc(-1*min(var(--str-chat\\_\\_spacing-10),4%))]",
|
|
2369
|
+
children: [
|
|
2370
|
+
/* @__PURE__ */ n("div", { className: "absolute bottom-0 inset-x-0 w-full h-4/5 backdrop-blur-[16px] [mask-image:linear-gradient(to_top,black_0%,transparent_100%)] [-webkit-mask-image:linear-gradient(to_top,black_0%,transparent_100%)]" }),
|
|
2371
|
+
/* @__PURE__ */ n(
|
|
2372
|
+
Pa,
|
|
2373
|
+
{
|
|
2374
|
+
className: "isolate w-full",
|
|
2375
|
+
renderActions: () => s == null ? void 0 : s(k),
|
|
2376
|
+
renderFooter: () => a == null ? void 0 : a(k),
|
|
2377
|
+
disabled: c,
|
|
2378
|
+
disabledReason: g
|
|
2379
|
+
}
|
|
2380
|
+
)
|
|
2381
|
+
]
|
|
2382
|
+
},
|
|
2383
|
+
"lt-channel-message-input"
|
|
2384
|
+
)
|
|
2385
|
+
), L;
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
)
|
|
2342
2389
|
},
|
|
2343
2390
|
"lt-channel-message-list"
|
|
2344
|
-
),
|
|
2345
|
-
r ? /* @__PURE__ */ n($.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
|
|
2346
|
-
/* @__PURE__ */ n(
|
|
2347
|
-
Da,
|
|
2348
|
-
{
|
|
2349
|
-
...s && {
|
|
2350
|
-
renderActions: () => s == null ? void 0 : s(k)
|
|
2351
|
-
},
|
|
2352
|
-
renderFooter: () => a == null ? void 0 : a(k),
|
|
2353
|
-
disabled: c,
|
|
2354
|
-
disabledReason: g
|
|
2355
|
-
},
|
|
2356
|
-
"lt-channel-message-input"
|
|
2357
2391
|
)
|
|
2358
2392
|
] })
|
|
2359
2393
|
}
|
|
2360
2394
|
) });
|
|
2361
|
-
}, dn =
|
|
2395
|
+
}, dn = j.memo(
|
|
2362
2396
|
({
|
|
2363
2397
|
channel: e,
|
|
2364
2398
|
onBack: t,
|
|
@@ -2369,7 +2403,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2369
2403
|
onLeaveConversation: o,
|
|
2370
2404
|
onBlockParticipant: l,
|
|
2371
2405
|
className: d,
|
|
2372
|
-
CustomChannelEmptyState: m =
|
|
2406
|
+
CustomChannelEmptyState: m = Wa,
|
|
2373
2407
|
showDeleteConversation: b = !0,
|
|
2374
2408
|
onDeleteConversationClick: u,
|
|
2375
2409
|
onBlockParticipantClick: f,
|
|
@@ -2379,54 +2413,54 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2379
2413
|
composerDisabled: v = !1,
|
|
2380
2414
|
composerDisabledReason: N,
|
|
2381
2415
|
dmAgentEnabled: x,
|
|
2382
|
-
messageMetadata:
|
|
2416
|
+
messageMetadata: I,
|
|
2383
2417
|
onMessageSent: E,
|
|
2384
2418
|
showStarButton: M = !1,
|
|
2385
|
-
chatbotVotingEnabled:
|
|
2419
|
+
chatbotVotingEnabled: P = !1,
|
|
2386
2420
|
renderChannelBanner: k,
|
|
2387
2421
|
customChannelActions: T,
|
|
2388
2422
|
renderMessage: _,
|
|
2389
|
-
onMessageLinkClick:
|
|
2423
|
+
onMessageLinkClick: S,
|
|
2390
2424
|
sendButton: R,
|
|
2391
|
-
attachmentPreviewList:
|
|
2425
|
+
attachmentPreviewList: $,
|
|
2392
2426
|
viewerLanguage: A,
|
|
2393
|
-
showChannelInfo:
|
|
2427
|
+
showChannelInfo: D = !0
|
|
2394
2428
|
}) => {
|
|
2395
2429
|
const z = W(
|
|
2396
|
-
async (
|
|
2430
|
+
async (F, B, X) => {
|
|
2397
2431
|
var q;
|
|
2398
|
-
const
|
|
2399
|
-
...
|
|
2400
|
-
...
|
|
2401
|
-
...
|
|
2432
|
+
const V = ((q = e.data) == null ? void 0 : q.chatbot_paused) === !0, L = x && !V, w = {
|
|
2433
|
+
...B,
|
|
2434
|
+
...L && { silent: !0 },
|
|
2435
|
+
...I && {
|
|
2402
2436
|
metadata: {
|
|
2403
|
-
...
|
|
2404
|
-
...
|
|
2437
|
+
...B.metadata ?? {},
|
|
2438
|
+
...I
|
|
2405
2439
|
}
|
|
2406
2440
|
}
|
|
2407
2441
|
}, C = {
|
|
2408
2442
|
...X,
|
|
2409
|
-
...
|
|
2410
|
-
},
|
|
2411
|
-
return E == null || E(
|
|
2443
|
+
...L && { skip_push: !0 }
|
|
2444
|
+
}, U = await e.sendMessage(w, C);
|
|
2445
|
+
return E == null || E(U), U;
|
|
2412
2446
|
},
|
|
2413
|
-
[e, x,
|
|
2414
|
-
),
|
|
2447
|
+
[e, x, I, E]
|
|
2448
|
+
), G = H(null);
|
|
2415
2449
|
return Y(() => {
|
|
2416
|
-
if (!
|
|
2417
|
-
const
|
|
2418
|
-
if (!
|
|
2419
|
-
const
|
|
2420
|
-
const
|
|
2450
|
+
if (!S) return;
|
|
2451
|
+
const F = G.current;
|
|
2452
|
+
if (!F) return;
|
|
2453
|
+
const B = (X) => {
|
|
2454
|
+
const V = X.target, L = V == null ? void 0 : V.closest("a[href]"), w = L == null ? void 0 : L.getAttribute("href");
|
|
2421
2455
|
if (!w) return;
|
|
2422
|
-
const C =
|
|
2423
|
-
|
|
2456
|
+
const C = L == null ? void 0 : L.closest("[data-message-id]"), U = C == null ? void 0 : C.getAttribute("data-message-id"), q = U ? e.state.messages.find((_e) => _e.id === U) : void 0;
|
|
2457
|
+
S(w, q);
|
|
2424
2458
|
};
|
|
2425
|
-
return
|
|
2426
|
-
}, [
|
|
2459
|
+
return F.addEventListener("click", B), () => F.removeEventListener("click", B);
|
|
2460
|
+
}, [S, e]), /* @__PURE__ */ n(
|
|
2427
2461
|
"div",
|
|
2428
2462
|
{
|
|
2429
|
-
ref:
|
|
2463
|
+
ref: G,
|
|
2430
2464
|
className: y(
|
|
2431
2465
|
"messaging-channel-view h-full flex flex-col",
|
|
2432
2466
|
d
|
|
@@ -2435,16 +2469,16 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2435
2469
|
rs,
|
|
2436
2470
|
{
|
|
2437
2471
|
channel: e,
|
|
2438
|
-
MessageSystem:
|
|
2472
|
+
MessageSystem: Ga,
|
|
2439
2473
|
EmptyStateIndicator: m,
|
|
2440
2474
|
LoadingIndicator: Ee,
|
|
2441
|
-
DateSeparator:
|
|
2442
|
-
TypingIndicator:
|
|
2475
|
+
DateSeparator: js,
|
|
2476
|
+
TypingIndicator: Ya,
|
|
2443
2477
|
doSendMessageRequest: z,
|
|
2444
2478
|
...R ? { SendButton: R } : {},
|
|
2445
|
-
|
|
2479
|
+
...$ ? { AttachmentPreviewList: $ } : {},
|
|
2446
2480
|
children: /* @__PURE__ */ n(
|
|
2447
|
-
|
|
2481
|
+
Ja,
|
|
2448
2482
|
{
|
|
2449
2483
|
onBack: t,
|
|
2450
2484
|
showBackButton: s,
|
|
@@ -2464,12 +2498,12 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2464
2498
|
composerDisabledReason: N,
|
|
2465
2499
|
showStarButton: M,
|
|
2466
2500
|
dmAgentEnabled: x,
|
|
2467
|
-
chatbotVotingEnabled:
|
|
2501
|
+
chatbotVotingEnabled: P,
|
|
2468
2502
|
renderChannelBanner: k,
|
|
2469
2503
|
customChannelActions: T,
|
|
2470
2504
|
renderMessage: _,
|
|
2471
2505
|
viewerLanguage: A,
|
|
2472
|
-
showChannelInfo:
|
|
2506
|
+
showChannelInfo: D
|
|
2473
2507
|
}
|
|
2474
2508
|
)
|
|
2475
2509
|
}
|
|
@@ -2479,7 +2513,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2479
2513
|
}
|
|
2480
2514
|
);
|
|
2481
2515
|
dn.displayName = "ChannelView";
|
|
2482
|
-
const fe =
|
|
2516
|
+
const fe = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
2483
2517
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
2484
2518
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2485
2519
|
/* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -2494,7 +2528,7 @@ const fe = $.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
2494
2528
|
)
|
|
2495
2529
|
] }) }));
|
|
2496
2530
|
fe.displayName = "ErrorState";
|
|
2497
|
-
const
|
|
2531
|
+
const Ci = ({
|
|
2498
2532
|
capabilities: e = {},
|
|
2499
2533
|
renderMessageInputActions: t,
|
|
2500
2534
|
renderConversationFooter: s,
|
|
@@ -2516,29 +2550,29 @@ const yi = ({
|
|
|
2516
2550
|
showChannelInfo: x
|
|
2517
2551
|
}) => {
|
|
2518
2552
|
const {
|
|
2519
|
-
client:
|
|
2553
|
+
client: I,
|
|
2520
2554
|
isConnected: E,
|
|
2521
2555
|
isLoading: M,
|
|
2522
|
-
error:
|
|
2556
|
+
error: P,
|
|
2523
2557
|
refreshConnection: k,
|
|
2524
2558
|
service: T,
|
|
2525
2559
|
debug: _
|
|
2526
|
-
} =
|
|
2527
|
-
|
|
2528
|
-
const
|
|
2529
|
-
|
|
2530
|
-
const X = H(null),
|
|
2560
|
+
} = Ps(), [S, R] = O(null), [$, A] = O(null), [D, z] = O(!1), { showDeleteConversation: G = !0 } = e, F = H(o);
|
|
2561
|
+
F.current = o;
|
|
2562
|
+
const B = H(a);
|
|
2563
|
+
B.current = a;
|
|
2564
|
+
const X = H(null), V = H(null);
|
|
2531
2565
|
Y(() => {
|
|
2532
|
-
|
|
2533
|
-
}, [
|
|
2534
|
-
if (!
|
|
2535
|
-
const C =
|
|
2566
|
+
V.current = S;
|
|
2567
|
+
}, [S]), Y(() => {
|
|
2568
|
+
if (!I || !E) return;
|
|
2569
|
+
const C = I.userID;
|
|
2536
2570
|
if (!C) return;
|
|
2537
|
-
const
|
|
2538
|
-
if (X.current ===
|
|
2539
|
-
X.current =
|
|
2571
|
+
const U = `${C}::${i}`;
|
|
2572
|
+
if (X.current === U) return;
|
|
2573
|
+
X.current = U;
|
|
2540
2574
|
const q = () => {
|
|
2541
|
-
X.current ===
|
|
2575
|
+
X.current === U && (X.current = null);
|
|
2542
2576
|
};
|
|
2543
2577
|
(async () => {
|
|
2544
2578
|
var K, re;
|
|
@@ -2547,7 +2581,7 @@ const yi = ({
|
|
|
2547
2581
|
"[MessagingShell] Loading initial conversation with:",
|
|
2548
2582
|
i
|
|
2549
2583
|
);
|
|
2550
|
-
const J = await
|
|
2584
|
+
const J = await I.queryChannels(
|
|
2551
2585
|
{
|
|
2552
2586
|
type: "messaging",
|
|
2553
2587
|
members: { $eq: [C, i] }
|
|
@@ -2556,13 +2590,13 @@ const yi = ({
|
|
|
2556
2590
|
{ limit: 1 }
|
|
2557
2591
|
);
|
|
2558
2592
|
if (J.length > 0) {
|
|
2559
|
-
R(J[0]), A(null), (K =
|
|
2593
|
+
R(J[0]), A(null), (K = B.current) == null || K.call(B, J[0]), _ && console.log(
|
|
2560
2594
|
"[MessagingShell] Initial conversation loaded:",
|
|
2561
2595
|
J[0].id
|
|
2562
2596
|
);
|
|
2563
2597
|
return;
|
|
2564
2598
|
}
|
|
2565
|
-
const se =
|
|
2599
|
+
const se = F.current;
|
|
2566
2600
|
if (!se || !T) {
|
|
2567
2601
|
q(), A("No conversation found with this account"), _ && console.log(
|
|
2568
2602
|
"[MessagingShell] No conversation found for:",
|
|
@@ -2576,7 +2610,7 @@ const yi = ({
|
|
|
2576
2610
|
name: se.name,
|
|
2577
2611
|
phone: se.phone
|
|
2578
2612
|
});
|
|
2579
|
-
R(Q), A(null), (re =
|
|
2613
|
+
R(Q), A(null), (re = B.current) == null || re.call(B, Q), _ && console.log(
|
|
2580
2614
|
"[MessagingShell] Channel created and loaded:",
|
|
2581
2615
|
Q.id
|
|
2582
2616
|
);
|
|
@@ -2590,33 +2624,33 @@ const yi = ({
|
|
|
2590
2624
|
console.error(
|
|
2591
2625
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2592
2626
|
J
|
|
2593
|
-
), q(),
|
|
2627
|
+
), q(), V.current || A("Failed to load conversation");
|
|
2594
2628
|
}
|
|
2595
2629
|
})();
|
|
2596
|
-
}, [i,
|
|
2597
|
-
const
|
|
2598
|
-
|
|
2630
|
+
}, [i, I, E, T, _]);
|
|
2631
|
+
const L = H(r);
|
|
2632
|
+
L.current = r;
|
|
2599
2633
|
const w = W(() => {
|
|
2600
2634
|
var C;
|
|
2601
|
-
R(null), z(!0), (C =
|
|
2635
|
+
R(null), z(!0), (C = L.current) == null || C.call(L);
|
|
2602
2636
|
}, []);
|
|
2603
|
-
return M ? /* @__PURE__ */ n(Ee, {}) :
|
|
2637
|
+
return M ? /* @__PURE__ */ n(Ee, {}) : P ? /* @__PURE__ */ n(fe, { message: P, onBack: k }) : !E || !I ? /* @__PURE__ */ n(
|
|
2604
2638
|
fe,
|
|
2605
2639
|
{
|
|
2606
2640
|
message: "Not connected to messaging service",
|
|
2607
2641
|
onBack: k
|
|
2608
2642
|
}
|
|
2609
|
-
) :
|
|
2643
|
+
) : $ ? /* @__PURE__ */ n(fe, { message: $ }) : D && !S ? /* @__PURE__ */ n(fe, { message: "Conversation ended" }) : S ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
2610
2644
|
dn,
|
|
2611
2645
|
{
|
|
2612
|
-
channel:
|
|
2646
|
+
channel: S,
|
|
2613
2647
|
renderMessageInputActions: t,
|
|
2614
2648
|
renderConversationFooter: s,
|
|
2615
2649
|
renderChannelBanner: g,
|
|
2616
2650
|
onLeaveConversation: w,
|
|
2617
2651
|
onBlockParticipant: w,
|
|
2618
2652
|
CustomChannelEmptyState: l,
|
|
2619
|
-
showDeleteConversation:
|
|
2653
|
+
showDeleteConversation: G,
|
|
2620
2654
|
onBlockParticipantClick: d,
|
|
2621
2655
|
onReportParticipantClick: m,
|
|
2622
2656
|
dmAgentEnabled: b,
|
|
@@ -2628,34 +2662,34 @@ const yi = ({
|
|
|
2628
2662
|
onMessageLinkClick: N,
|
|
2629
2663
|
showChannelInfo: x
|
|
2630
2664
|
},
|
|
2631
|
-
|
|
2665
|
+
S.id
|
|
2632
2666
|
) }) }) : /* @__PURE__ */ n(Ee, {});
|
|
2633
2667
|
};
|
|
2634
|
-
function
|
|
2668
|
+
function Za(e) {
|
|
2635
2669
|
const t = e.state.pending_messages;
|
|
2636
2670
|
if (t != null && t.length)
|
|
2637
2671
|
for (const s of t)
|
|
2638
2672
|
e.state.addMessageSorted(s.message);
|
|
2639
2673
|
}
|
|
2640
|
-
const un =
|
|
2674
|
+
const un = j.createContext({
|
|
2641
2675
|
selectedChannel: void 0,
|
|
2642
2676
|
onChannelSelect: () => {
|
|
2643
2677
|
},
|
|
2644
2678
|
debug: !1,
|
|
2645
2679
|
renderMessagePreview: void 0,
|
|
2646
2680
|
viewerLanguage: void 0
|
|
2647
|
-
}),
|
|
2681
|
+
}), Qa = un.Provider, er = () => j.useContext(un), tr = (e, t) => {
|
|
2648
2682
|
const s = new Date(
|
|
2649
2683
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2650
2684
|
), r = new Date(
|
|
2651
2685
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
2652
2686
|
).getTime() - s.getTime();
|
|
2653
2687
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
2654
|
-
},
|
|
2688
|
+
}, nr = (e) => {
|
|
2655
2689
|
const t = /* @__PURE__ */ new Date();
|
|
2656
2690
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
2657
2691
|
return "Just now";
|
|
2658
|
-
const a =
|
|
2692
|
+
const a = tr(e, t);
|
|
2659
2693
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
2660
2694
|
hour: "numeric",
|
|
2661
2695
|
minute: "2-digit",
|
|
@@ -2665,45 +2699,45 @@ const un = $.createContext({
|
|
|
2665
2699
|
day: "numeric",
|
|
2666
2700
|
year: "2-digit"
|
|
2667
2701
|
});
|
|
2668
|
-
}, mn =
|
|
2702
|
+
}, mn = j.memo(
|
|
2669
2703
|
({ channel: e, unread: t }) => {
|
|
2670
|
-
var
|
|
2704
|
+
var P, k, T;
|
|
2671
2705
|
const {
|
|
2672
2706
|
selectedChannel: s,
|
|
2673
2707
|
onChannelSelect: a,
|
|
2674
2708
|
debug: r,
|
|
2675
2709
|
renderMessagePreview: i,
|
|
2676
2710
|
viewerLanguage: o
|
|
2677
|
-
} =
|
|
2711
|
+
} = er(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2678
2712
|
e && a(e);
|
|
2679
2713
|
}, m = (_) => {
|
|
2680
|
-
const
|
|
2681
|
-
!
|
|
2682
|
-
}, u = Object.values(((
|
|
2714
|
+
const S = _.key === "Enter" || _.key === " ", R = _.repeat;
|
|
2715
|
+
!S || R || (_.preventDefault(), d());
|
|
2716
|
+
}, u = Object.values(((P = e == null ? void 0 : e.state) == null ? void 0 : P.members) || {}).find(
|
|
2683
2717
|
(_) => {
|
|
2684
|
-
var
|
|
2685
|
-
return ((
|
|
2718
|
+
var S, R;
|
|
2719
|
+
return ((S = _.user) == null ? void 0 : S.id) && _.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
|
|
2686
2720
|
}
|
|
2687
2721
|
), f = Wt(u == null ? void 0 : u.user), c = (k = u == null ? void 0 : u.user) == null ? void 0 : k.image, g = (() => {
|
|
2688
|
-
var
|
|
2689
|
-
const _ = (
|
|
2722
|
+
var S;
|
|
2723
|
+
const _ = (S = e == null ? void 0 : e.state) == null ? void 0 : S.messages;
|
|
2690
2724
|
if (_ != null && _.length) {
|
|
2691
2725
|
for (let R = _.length - 1; R >= 0; R--)
|
|
2692
2726
|
if (_[R].type !== "system") return _[R];
|
|
2693
2727
|
}
|
|
2694
2728
|
})(), v = (() => {
|
|
2695
|
-
var
|
|
2729
|
+
var D, z, G, F;
|
|
2696
2730
|
const _ = Xt({
|
|
2697
2731
|
message: g,
|
|
2698
2732
|
viewerLanguage: o
|
|
2699
2733
|
});
|
|
2700
|
-
if (((
|
|
2734
|
+
if (((D = g == null ? void 0 : g.metadata) == null ? void 0 : D.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
|
|
2701
2735
|
if (((z = g == null ? void 0 : g.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
|
|
2702
|
-
if (((
|
|
2736
|
+
if (((G = g == null ? void 0 : g.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return _ ? `📎 ${_}` : "📎 Sent an attachment";
|
|
2703
2737
|
if (_) return _;
|
|
2704
|
-
const A = (
|
|
2738
|
+
const A = (F = g == null ? void 0 : g.attachments) == null ? void 0 : F[0];
|
|
2705
2739
|
return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2706
|
-
})(), N = g != null && g.created_at ?
|
|
2740
|
+
})(), N = g != null && g.created_at ? nr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, I = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
|
|
2707
2741
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2708
2742
|
channelId: e == null ? void 0 : e.id,
|
|
2709
2743
|
isSelected: l,
|
|
@@ -2752,7 +2786,7 @@ const un = $.createContext({
|
|
|
2752
2786
|
N && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: N })
|
|
2753
2787
|
] }),
|
|
2754
2788
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2755
|
-
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
2789
|
+
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
|
|
2756
2790
|
M > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: M > 99 ? "99+" : M })
|
|
2757
2791
|
] })
|
|
2758
2792
|
] })
|
|
@@ -2762,25 +2796,25 @@ const un = $.createContext({
|
|
|
2762
2796
|
}
|
|
2763
2797
|
);
|
|
2764
2798
|
mn.displayName = "CustomChannelPreview";
|
|
2765
|
-
const
|
|
2799
|
+
const sr = { last_message_at: -1 }, ar = j.memo(
|
|
2766
2800
|
({
|
|
2767
2801
|
onChannelSelect: e,
|
|
2768
2802
|
selectedChannel: t,
|
|
2769
2803
|
filters: s,
|
|
2770
2804
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
2771
2805
|
channelRenderFilterFn: r,
|
|
2772
|
-
sort: i =
|
|
2806
|
+
sort: i = sr,
|
|
2773
2807
|
className: o,
|
|
2774
2808
|
customEmptyStateIndicator: l,
|
|
2775
2809
|
renderMessagePreview: d,
|
|
2776
2810
|
viewerLanguage: m
|
|
2777
2811
|
}) => {
|
|
2778
|
-
const b =
|
|
2812
|
+
const b = j.useRef(0);
|
|
2779
2813
|
b.current++;
|
|
2780
|
-
const { debug: u = !1 } = qe(), f =
|
|
2814
|
+
const { debug: u = !1 } = qe(), f = j.useCallback(
|
|
2781
2815
|
(g) => {
|
|
2782
2816
|
for (const p of g)
|
|
2783
|
-
|
|
2817
|
+
Za(p);
|
|
2784
2818
|
return r ? r(g) : g;
|
|
2785
2819
|
},
|
|
2786
2820
|
[r]
|
|
@@ -2790,7 +2824,7 @@ const nr = { last_message_at: -1 }, sr = $.memo(
|
|
|
2790
2824
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
2791
2825
|
filters: s
|
|
2792
2826
|
});
|
|
2793
|
-
const c =
|
|
2827
|
+
const c = j.useMemo(
|
|
2794
2828
|
() => ({
|
|
2795
2829
|
selectedChannel: t,
|
|
2796
2830
|
onChannelSelect: e,
|
|
@@ -2813,8 +2847,8 @@ const nr = { last_message_at: -1 }, sr = $.memo(
|
|
|
2813
2847
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2814
2848
|
o
|
|
2815
2849
|
),
|
|
2816
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
2817
|
-
|
|
2850
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Qa, { value: c, children: /* @__PURE__ */ n(
|
|
2851
|
+
ds,
|
|
2818
2852
|
{
|
|
2819
2853
|
filters: s,
|
|
2820
2854
|
sort: i,
|
|
@@ -2830,26 +2864,26 @@ const nr = { last_message_at: -1 }, sr = $.memo(
|
|
|
2830
2864
|
);
|
|
2831
2865
|
}
|
|
2832
2866
|
);
|
|
2833
|
-
|
|
2834
|
-
const
|
|
2867
|
+
ar.displayName = "ChannelList";
|
|
2868
|
+
const rr = /^([a-z][a-z0-9+.-]*):/i, ir = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2835
2869
|
function Qe(e) {
|
|
2836
2870
|
if (typeof e != "string") return;
|
|
2837
2871
|
const t = e.trim();
|
|
2838
2872
|
if (t === "") return;
|
|
2839
|
-
const s =
|
|
2873
|
+
const s = rr.exec(t);
|
|
2840
2874
|
if (s) {
|
|
2841
2875
|
const a = s[1].toLowerCase();
|
|
2842
|
-
return
|
|
2876
|
+
return ir.has(a) ? t : void 0;
|
|
2843
2877
|
}
|
|
2844
2878
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2845
2879
|
}
|
|
2846
|
-
const
|
|
2880
|
+
const or = {
|
|
2847
2881
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2848
2882
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2849
|
-
},
|
|
2883
|
+
}, lr = ({ variant: e, cta: t }) => {
|
|
2850
2884
|
const s = y(
|
|
2851
2885
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2852
|
-
|
|
2886
|
+
or[e]
|
|
2853
2887
|
), a = Qe(t.href);
|
|
2854
2888
|
return a ? /* @__PURE__ */ n(
|
|
2855
2889
|
"a",
|
|
@@ -2876,10 +2910,10 @@ const ir = {
|
|
|
2876
2910
|
children: t.label
|
|
2877
2911
|
}
|
|
2878
2912
|
);
|
|
2879
|
-
},
|
|
2913
|
+
}, cr = {
|
|
2880
2914
|
dark: "text-white",
|
|
2881
2915
|
light: "text-black/90"
|
|
2882
|
-
},
|
|
2916
|
+
}, dr = "text-white/30", ur = {
|
|
2883
2917
|
dark: "text-white/55",
|
|
2884
2918
|
light: "text-black/55"
|
|
2885
2919
|
}, et = ({
|
|
@@ -2896,10 +2930,10 @@ const ir = {
|
|
|
2896
2930
|
if (!b && !u && !c && !g) return null;
|
|
2897
2931
|
const v = y(
|
|
2898
2932
|
"truncate text-base font-medium leading-6",
|
|
2899
|
-
d && !t ?
|
|
2933
|
+
d && !t ? dr : cr[e]
|
|
2900
2934
|
), N = y(
|
|
2901
2935
|
"truncate text-xs leading-4",
|
|
2902
|
-
|
|
2936
|
+
ur[e]
|
|
2903
2937
|
);
|
|
2904
2938
|
return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
|
|
2905
2939
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2915,16 +2949,16 @@ const ir = {
|
|
|
2915
2949
|
] }),
|
|
2916
2950
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2917
2951
|
] }),
|
|
2918
|
-
o && /* @__PURE__ */ n(
|
|
2952
|
+
o && /* @__PURE__ */ n(lr, { variant: e, cta: o })
|
|
2919
2953
|
] });
|
|
2920
|
-
},
|
|
2954
|
+
}, mr = y(
|
|
2921
2955
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2922
2956
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2923
2957
|
// the messaging design system's "small border around link attachments"
|
|
2924
2958
|
// treatment from the mobile spec. The drop shadow remains for depth.
|
|
2925
2959
|
"border border-black/[0.08]",
|
|
2926
2960
|
"shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
|
|
2927
|
-
),
|
|
2961
|
+
), Ie = ({
|
|
2928
2962
|
variant: e,
|
|
2929
2963
|
children: t,
|
|
2930
2964
|
href: s,
|
|
@@ -2936,7 +2970,7 @@ const ir = {
|
|
|
2936
2970
|
"data-testid": d
|
|
2937
2971
|
}) => {
|
|
2938
2972
|
const m = s != null || a != null, b = y(
|
|
2939
|
-
|
|
2973
|
+
mr,
|
|
2940
2974
|
l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2941
2975
|
// `focus-ring` is a design-system utility from the component-library
|
|
2942
2976
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2984,17 +3018,17 @@ const ir = {
|
|
|
2984
3018
|
]
|
|
2985
3019
|
}
|
|
2986
3020
|
);
|
|
2987
|
-
},
|
|
3021
|
+
}, hr = {
|
|
2988
3022
|
dark: "bg-white/10",
|
|
2989
3023
|
light: "bg-black/5"
|
|
2990
|
-
},
|
|
3024
|
+
}, fr = {
|
|
2991
3025
|
dark: "size-16 text-white/25",
|
|
2992
3026
|
light: "size-16 text-black/25"
|
|
2993
3027
|
}, Me = (e, t) => !!t && !!e && ne(e) === "audio", hn = (e, t) => {
|
|
2994
3028
|
if (!t || !e) return !1;
|
|
2995
3029
|
const s = ne(e);
|
|
2996
3030
|
return s === "video" || s === "audio";
|
|
2997
|
-
}, tt = "bg-[#F2F3F4]",
|
|
3031
|
+
}, tt = "bg-[#F2F3F4]", Se = ({
|
|
2998
3032
|
variant: e,
|
|
2999
3033
|
thumbnailUrl: t,
|
|
3000
3034
|
sourceUrl: s,
|
|
@@ -3045,10 +3079,10 @@ const ir = {
|
|
|
3045
3079
|
{
|
|
3046
3080
|
className: y(
|
|
3047
3081
|
"flex h-full w-full items-center justify-center",
|
|
3048
|
-
|
|
3082
|
+
hr[e]
|
|
3049
3083
|
),
|
|
3050
3084
|
children: le(r, {
|
|
3051
|
-
className:
|
|
3085
|
+
className: fr[e],
|
|
3052
3086
|
weight: "regular"
|
|
3053
3087
|
})
|
|
3054
3088
|
}
|
|
@@ -3058,7 +3092,7 @@ const ir = {
|
|
|
3058
3092
|
]
|
|
3059
3093
|
}
|
|
3060
3094
|
);
|
|
3061
|
-
},
|
|
3095
|
+
}, gr = ({
|
|
3062
3096
|
title: e,
|
|
3063
3097
|
placeholderTitle: t,
|
|
3064
3098
|
description: s,
|
|
@@ -3088,12 +3122,12 @@ const ir = {
|
|
|
3088
3122
|
onClick: u,
|
|
3089
3123
|
"aria-label": "Edit attachment",
|
|
3090
3124
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3091
|
-
children: /* @__PURE__ */ n(
|
|
3125
|
+
children: /* @__PURE__ */ n(Ms, { className: "size-5", weight: "regular" })
|
|
3092
3126
|
}
|
|
3093
3127
|
) : void 0;
|
|
3094
|
-
return c ? /* @__PURE__ */ n(
|
|
3128
|
+
return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3095
3129
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
|
|
3096
|
-
|
|
3130
|
+
Se,
|
|
3097
3131
|
{
|
|
3098
3132
|
variant: "dark",
|
|
3099
3133
|
sourceUrl: o,
|
|
@@ -3103,13 +3137,13 @@ const ir = {
|
|
|
3103
3137
|
) }),
|
|
3104
3138
|
g && /* @__PURE__ */ n("div", { className: "shrink-0", children: g })
|
|
3105
3139
|
] }) }) : /* @__PURE__ */ h(
|
|
3106
|
-
|
|
3140
|
+
Ie,
|
|
3107
3141
|
{
|
|
3108
3142
|
variant: "dark",
|
|
3109
3143
|
topRight: f ? g : void 0,
|
|
3110
3144
|
children: [
|
|
3111
3145
|
!f && /* @__PURE__ */ n(
|
|
3112
|
-
|
|
3146
|
+
Se,
|
|
3113
3147
|
{
|
|
3114
3148
|
variant: "dark",
|
|
3115
3149
|
thumbnailUrl: i,
|
|
@@ -3135,7 +3169,7 @@ const ir = {
|
|
|
3135
3169
|
]
|
|
3136
3170
|
}
|
|
3137
3171
|
);
|
|
3138
|
-
},
|
|
3172
|
+
}, br = ({
|
|
3139
3173
|
title: e,
|
|
3140
3174
|
description: t,
|
|
3141
3175
|
url: s,
|
|
@@ -3155,7 +3189,7 @@ const ir = {
|
|
|
3155
3189
|
}
|
|
3156
3190
|
} : d;
|
|
3157
3191
|
return /* @__PURE__ */ h(
|
|
3158
|
-
|
|
3192
|
+
Ie,
|
|
3159
3193
|
{
|
|
3160
3194
|
variant: "light",
|
|
3161
3195
|
href: f,
|
|
@@ -3165,7 +3199,7 @@ const ir = {
|
|
|
3165
3199
|
"data-testid": "link-attachment",
|
|
3166
3200
|
children: [
|
|
3167
3201
|
o === "featured" && /* @__PURE__ */ n(
|
|
3168
|
-
|
|
3202
|
+
Se,
|
|
3169
3203
|
{
|
|
3170
3204
|
variant: "light",
|
|
3171
3205
|
thumbnailUrl: r,
|
|
@@ -3188,7 +3222,7 @@ const ir = {
|
|
|
3188
3222
|
]
|
|
3189
3223
|
}
|
|
3190
3224
|
);
|
|
3191
|
-
},
|
|
3225
|
+
}, pr = ({
|
|
3192
3226
|
title: e,
|
|
3193
3227
|
placeholderTitle: t,
|
|
3194
3228
|
description: s,
|
|
@@ -3203,7 +3237,7 @@ const ir = {
|
|
|
3203
3237
|
}) => {
|
|
3204
3238
|
const u = hn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, g = m == null && !u && c != null ? b : void 0;
|
|
3205
3239
|
return /* @__PURE__ */ h(
|
|
3206
|
-
|
|
3240
|
+
Ie,
|
|
3207
3241
|
{
|
|
3208
3242
|
variant: "dark",
|
|
3209
3243
|
href: c,
|
|
@@ -3211,7 +3245,7 @@ const ir = {
|
|
|
3211
3245
|
bgClassName: Me(r, o) ? tt : void 0,
|
|
3212
3246
|
children: [
|
|
3213
3247
|
l === "featured" && /* @__PURE__ */ n(
|
|
3214
|
-
|
|
3248
|
+
Se,
|
|
3215
3249
|
{
|
|
3216
3250
|
variant: "dark",
|
|
3217
3251
|
thumbnailUrl: i,
|
|
@@ -3235,20 +3269,20 @@ const ir = {
|
|
|
3235
3269
|
]
|
|
3236
3270
|
}
|
|
3237
3271
|
);
|
|
3238
|
-
},
|
|
3239
|
-
Composer:
|
|
3240
|
-
Sent:
|
|
3241
|
-
Received:
|
|
3242
|
-
},
|
|
3272
|
+
}, ki = {
|
|
3273
|
+
Composer: gr,
|
|
3274
|
+
Sent: pr,
|
|
3275
|
+
Received: br
|
|
3276
|
+
}, vr = {
|
|
3243
3277
|
dark: "bg-[#121110]",
|
|
3244
3278
|
light: "bg-[#e9eaed]"
|
|
3245
|
-
},
|
|
3279
|
+
}, xr = {
|
|
3246
3280
|
dark: "text-white",
|
|
3247
3281
|
light: "text-[#080707]"
|
|
3248
|
-
},
|
|
3282
|
+
}, wr = {
|
|
3249
3283
|
dark: "border-white/[0.08]",
|
|
3250
3284
|
light: "border-black/[0.08]"
|
|
3251
|
-
},
|
|
3285
|
+
}, Nr = (e) => e === "dark" ? "sender" : "receiver", _r = {
|
|
3252
3286
|
sender: {
|
|
3253
3287
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
3254
3288
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -3270,7 +3304,7 @@ const ir = {
|
|
|
3270
3304
|
children: i,
|
|
3271
3305
|
"data-testid": o
|
|
3272
3306
|
}) => {
|
|
3273
|
-
const l = t != null && t !== "", d = Nr
|
|
3307
|
+
const l = t != null && t !== "", d = _r[Nr(e)][a];
|
|
3274
3308
|
return /* @__PURE__ */ h(
|
|
3275
3309
|
"div",
|
|
3276
3310
|
{
|
|
@@ -3285,10 +3319,10 @@ const ir = {
|
|
|
3285
3319
|
// as the surrounding `CustomMessage` text bubbles.
|
|
3286
3320
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
3287
3321
|
d,
|
|
3288
|
-
pr[e],
|
|
3289
3322
|
vr[e],
|
|
3323
|
+
xr[e],
|
|
3290
3324
|
s && "border",
|
|
3291
|
-
s &&
|
|
3325
|
+
s && wr[e],
|
|
3292
3326
|
r
|
|
3293
3327
|
),
|
|
3294
3328
|
children: [
|
|
@@ -3331,16 +3365,16 @@ const ir = {
|
|
|
3331
3365
|
),
|
|
3332
3366
|
children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
|
|
3333
3367
|
}
|
|
3334
|
-
), we = (e) => e === "received" ? "light" : "dark",
|
|
3368
|
+
), we = (e) => e === "received" ? "light" : "dark", Ei = ({
|
|
3335
3369
|
firstOfGroup: e,
|
|
3336
3370
|
endOfGroup: t,
|
|
3337
3371
|
groupedByUser: s
|
|
3338
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
3372
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", yr = ({
|
|
3339
3373
|
src: e,
|
|
3340
3374
|
mimeType: t,
|
|
3341
3375
|
filename: s,
|
|
3342
3376
|
items: a
|
|
3343
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
3377
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Cr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3344
3378
|
/* @__PURE__ */ n(
|
|
3345
3379
|
"audio",
|
|
3346
3380
|
{
|
|
@@ -3363,7 +3397,7 @@ const ir = {
|
|
|
3363
3397
|
preload: l,
|
|
3364
3398
|
onDismiss: d
|
|
3365
3399
|
}) => {
|
|
3366
|
-
const m = we(e), b = e === "composer" && !!d, u =
|
|
3400
|
+
const m = we(e), b = e === "composer" && !!d, u = yr({ src: t, mimeType: s, filename: a, items: r });
|
|
3367
3401
|
if (u.length === 0)
|
|
3368
3402
|
return null;
|
|
3369
3403
|
const f = l ?? (u.length > 1 ? "none" : "metadata");
|
|
@@ -3375,7 +3409,7 @@ const ir = {
|
|
|
3375
3409
|
groupPosition: o,
|
|
3376
3410
|
"data-testid": "audio-attachment",
|
|
3377
3411
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, g) => /* @__PURE__ */ n(
|
|
3378
|
-
|
|
3412
|
+
Cr,
|
|
3379
3413
|
{
|
|
3380
3414
|
item: c,
|
|
3381
3415
|
preload: f,
|
|
@@ -3389,15 +3423,15 @@ const ir = {
|
|
|
3389
3423
|
)) })
|
|
3390
3424
|
}
|
|
3391
3425
|
);
|
|
3392
|
-
},
|
|
3393
|
-
Composer:
|
|
3394
|
-
Sent:
|
|
3395
|
-
Received:
|
|
3426
|
+
}, kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Sr = {
|
|
3427
|
+
Composer: kr,
|
|
3428
|
+
Sent: Er,
|
|
3429
|
+
Received: Ir
|
|
3396
3430
|
};
|
|
3397
|
-
function
|
|
3431
|
+
function Tr(e) {
|
|
3398
3432
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
3399
3433
|
}
|
|
3400
|
-
const
|
|
3434
|
+
const Ar = {
|
|
3401
3435
|
pdf: "PDF",
|
|
3402
3436
|
doc: "DOC",
|
|
3403
3437
|
xls: "XLS",
|
|
@@ -3407,7 +3441,7 @@ const Tr = {
|
|
|
3407
3441
|
text: "TXT",
|
|
3408
3442
|
markdown: "MD"
|
|
3409
3443
|
};
|
|
3410
|
-
function
|
|
3444
|
+
function Mr(e, t) {
|
|
3411
3445
|
if (t) {
|
|
3412
3446
|
const r = t.lastIndexOf(".");
|
|
3413
3447
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -3417,7 +3451,7 @@ function Ar(e, t) {
|
|
|
3417
3451
|
}
|
|
3418
3452
|
if (!e) return;
|
|
3419
3453
|
if (ne(e) === "document") {
|
|
3420
|
-
const r = Zt(e), i =
|
|
3454
|
+
const r = Zt(e), i = Ar[r];
|
|
3421
3455
|
if (i) return i;
|
|
3422
3456
|
if (e === "application/octet-stream") return;
|
|
3423
3457
|
}
|
|
@@ -3425,8 +3459,8 @@ function Ar(e, t) {
|
|
|
3425
3459
|
if (!(!a || a === "*"))
|
|
3426
3460
|
return a.toUpperCase();
|
|
3427
3461
|
}
|
|
3428
|
-
function
|
|
3429
|
-
const a =
|
|
3462
|
+
function Rr(e, t, s) {
|
|
3463
|
+
const a = Mr(e, t), r = typeof s == "number" && s > 0 ? Tr(s) : void 0;
|
|
3430
3464
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3431
3465
|
}
|
|
3432
3466
|
function Z(e) {
|
|
@@ -3437,13 +3471,13 @@ function Z(e) {
|
|
|
3437
3471
|
return "download";
|
|
3438
3472
|
}
|
|
3439
3473
|
}
|
|
3440
|
-
const
|
|
3474
|
+
const Lr = {
|
|
3441
3475
|
dark: "text-white/55",
|
|
3442
3476
|
light: "text-black/65"
|
|
3443
|
-
},
|
|
3477
|
+
}, Dr = {
|
|
3444
3478
|
dark: "bg-white/10",
|
|
3445
3479
|
light: "bg-black/5"
|
|
3446
|
-
},
|
|
3480
|
+
}, Pr = {
|
|
3447
3481
|
dark: "text-white/85",
|
|
3448
3482
|
light: "text-black/85"
|
|
3449
3483
|
}, fn = ({
|
|
@@ -3456,16 +3490,16 @@ const Rr = {
|
|
|
3456
3490
|
activateLabel: o,
|
|
3457
3491
|
trailingAction: l
|
|
3458
3492
|
}) => {
|
|
3459
|
-
const d = s ?? t ?? "File", m =
|
|
3493
|
+
const d = s ?? t ?? "File", m = Rr(a, t, r), b = /* @__PURE__ */ n(
|
|
3460
3494
|
"div",
|
|
3461
3495
|
{
|
|
3462
3496
|
className: y(
|
|
3463
3497
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3464
|
-
|
|
3498
|
+
Dr[e]
|
|
3465
3499
|
),
|
|
3466
3500
|
"aria-hidden": !0,
|
|
3467
3501
|
children: le(a, {
|
|
3468
|
-
className: y("size-6",
|
|
3502
|
+
className: y("size-6", Pr[e]),
|
|
3469
3503
|
weight: "regular"
|
|
3470
3504
|
})
|
|
3471
3505
|
}
|
|
@@ -3476,7 +3510,7 @@ const Rr = {
|
|
|
3476
3510
|
{
|
|
3477
3511
|
className: y(
|
|
3478
3512
|
"truncate text-xs leading-4",
|
|
3479
|
-
|
|
3513
|
+
Lr[e]
|
|
3480
3514
|
),
|
|
3481
3515
|
children: m
|
|
3482
3516
|
}
|
|
@@ -3519,14 +3553,14 @@ async function gn(e, t) {
|
|
|
3519
3553
|
}
|
|
3520
3554
|
}
|
|
3521
3555
|
}
|
|
3522
|
-
const
|
|
3556
|
+
const Or = ({
|
|
3523
3557
|
src: e,
|
|
3524
3558
|
filename: t,
|
|
3525
3559
|
fileSize: s,
|
|
3526
3560
|
mimeType: a,
|
|
3527
3561
|
title: r,
|
|
3528
3562
|
items: i
|
|
3529
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
3563
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], zr = ({
|
|
3530
3564
|
variant: e,
|
|
3531
3565
|
item: t,
|
|
3532
3566
|
index: s,
|
|
@@ -3560,7 +3594,7 @@ const Pr = ({
|
|
|
3560
3594
|
onClick: m,
|
|
3561
3595
|
onDismiss: b
|
|
3562
3596
|
}) => {
|
|
3563
|
-
const u = we(e), f = e === "composer" && !!b, c =
|
|
3597
|
+
const u = we(e), f = e === "composer" && !!b, c = Or({
|
|
3564
3598
|
src: t,
|
|
3565
3599
|
filename: s,
|
|
3566
3600
|
fileSize: a,
|
|
@@ -3595,7 +3629,7 @@ const Pr = ({
|
|
|
3595
3629
|
groupPosition: d,
|
|
3596
3630
|
"data-testid": "file-attachment",
|
|
3597
3631
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, N) => /* @__PURE__ */ n(
|
|
3598
|
-
|
|
3632
|
+
zr,
|
|
3599
3633
|
{
|
|
3600
3634
|
variant: u,
|
|
3601
3635
|
item: v,
|
|
@@ -3607,10 +3641,10 @@ const Pr = ({
|
|
|
3607
3641
|
)) })
|
|
3608
3642
|
}
|
|
3609
3643
|
);
|
|
3610
|
-
},
|
|
3611
|
-
Composer:
|
|
3612
|
-
Sent:
|
|
3613
|
-
Received:
|
|
3644
|
+
}, $r = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Br = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Ur = {
|
|
3645
|
+
Composer: $r,
|
|
3646
|
+
Sent: Fr,
|
|
3647
|
+
Received: Br
|
|
3614
3648
|
}, at = ({
|
|
3615
3649
|
onPrev: e,
|
|
3616
3650
|
onNext: t,
|
|
@@ -3624,7 +3658,7 @@ const Pr = ({
|
|
|
3624
3658
|
onClick: e,
|
|
3625
3659
|
"aria-label": s,
|
|
3626
3660
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3627
|
-
children: /* @__PURE__ */ n(
|
|
3661
|
+
children: /* @__PURE__ */ n(Rs, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3628
3662
|
}
|
|
3629
3663
|
),
|
|
3630
3664
|
/* @__PURE__ */ n(
|
|
@@ -3634,7 +3668,7 @@ const Pr = ({
|
|
|
3634
3668
|
onClick: t,
|
|
3635
3669
|
"aria-label": a,
|
|
3636
3670
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3637
|
-
children: /* @__PURE__ */ n(
|
|
3671
|
+
children: /* @__PURE__ */ n(Ls, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3638
3672
|
}
|
|
3639
3673
|
)
|
|
3640
3674
|
] }), bn = ({
|
|
@@ -3646,7 +3680,7 @@ const Pr = ({
|
|
|
3646
3680
|
tone: i = "dark",
|
|
3647
3681
|
onTriggered: o
|
|
3648
3682
|
}) => {
|
|
3649
|
-
const [l, d] =
|
|
3683
|
+
const [l, d] = O(!1), m = W(
|
|
3650
3684
|
(c) => {
|
|
3651
3685
|
c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
|
|
3652
3686
|
}).finally(() => {
|
|
@@ -3727,7 +3761,7 @@ const Pr = ({
|
|
|
3727
3761
|
initialIndex: t,
|
|
3728
3762
|
open: s
|
|
3729
3763
|
}) => {
|
|
3730
|
-
const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] =
|
|
3764
|
+
const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
|
|
3731
3765
|
Y(() => {
|
|
3732
3766
|
s && i($e(t, 0, Math.max(e - 1, 0)));
|
|
3733
3767
|
}, [s, t, e]), Y(() => {
|
|
@@ -3893,7 +3927,7 @@ const Pr = ({
|
|
|
3893
3927
|
]
|
|
3894
3928
|
}
|
|
3895
3929
|
) : null;
|
|
3896
|
-
},
|
|
3930
|
+
}, jr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", vn = ({
|
|
3897
3931
|
tiles: e,
|
|
3898
3932
|
onTileActivate: t,
|
|
3899
3933
|
maxVisible: s = 4,
|
|
@@ -3902,7 +3936,7 @@ const Pr = ({
|
|
|
3902
3936
|
const r = e.length;
|
|
3903
3937
|
if (r === 0) return null;
|
|
3904
3938
|
const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, b) => {
|
|
3905
|
-
const u = y(
|
|
3939
|
+
const u = y(jr, "h-full w-full");
|
|
3906
3940
|
return t ? /* @__PURE__ */ h(
|
|
3907
3941
|
"button",
|
|
3908
3942
|
{
|
|
@@ -3964,14 +3998,14 @@ const Pr = ({
|
|
|
3964
3998
|
}
|
|
3965
3999
|
);
|
|
3966
4000
|
}, Ne = (e) => {
|
|
3967
|
-
const [t, s] =
|
|
4001
|
+
const [t, s] = O(!1), [a, r] = O(0), i = W(
|
|
3968
4002
|
(l) => {
|
|
3969
4003
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
|
|
3970
4004
|
},
|
|
3971
4005
|
[e]
|
|
3972
4006
|
), o = W(() => s(!1), []);
|
|
3973
4007
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3974
|
-
},
|
|
4008
|
+
}, Vr = (e, t, s, a) => ({
|
|
3975
4009
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
3976
4010
|
content: /* @__PURE__ */ n(
|
|
3977
4011
|
"img",
|
|
@@ -3986,7 +4020,7 @@ const Pr = ({
|
|
|
3986
4020
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
3987
4021
|
}
|
|
3988
4022
|
)
|
|
3989
|
-
}),
|
|
4023
|
+
}), Gr = ({
|
|
3990
4024
|
src: e,
|
|
3991
4025
|
alt: t,
|
|
3992
4026
|
items: s
|
|
@@ -3994,7 +4028,7 @@ const Pr = ({
|
|
|
3994
4028
|
src: s.src,
|
|
3995
4029
|
alt: s.alt,
|
|
3996
4030
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3997
|
-
})),
|
|
4031
|
+
})), Hr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
3998
4032
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
|
|
3999
4033
|
r
|
|
4000
4034
|
);
|
|
@@ -4041,13 +4075,13 @@ const Pr = ({
|
|
|
4041
4075
|
loading: l = "lazy",
|
|
4042
4076
|
onClick: d
|
|
4043
4077
|
}) => {
|
|
4044
|
-
const m =
|
|
4078
|
+
const m = Gr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = Ne(
|
|
4045
4079
|
d
|
|
4046
4080
|
);
|
|
4047
4081
|
if (m.length === 0)
|
|
4048
4082
|
return null;
|
|
4049
4083
|
const p = m.map(
|
|
4050
|
-
(v, N) =>
|
|
4084
|
+
(v, N) => Vr(v, N, m.length, l)
|
|
4051
4085
|
);
|
|
4052
4086
|
return /* @__PURE__ */ h(
|
|
4053
4087
|
ve,
|
|
@@ -4070,11 +4104,11 @@ const Pr = ({
|
|
|
4070
4104
|
]
|
|
4071
4105
|
}
|
|
4072
4106
|
);
|
|
4073
|
-
},
|
|
4074
|
-
Composer:
|
|
4075
|
-
Sent:
|
|
4076
|
-
Received:
|
|
4077
|
-
},
|
|
4107
|
+
}, Yr = (e) => /* @__PURE__ */ n(Hr, { ...e }), qr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Wr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Xr = {
|
|
4108
|
+
Composer: Yr,
|
|
4109
|
+
Sent: qr,
|
|
4110
|
+
Received: Wr
|
|
4111
|
+
}, Kr = ({
|
|
4078
4112
|
open: e,
|
|
4079
4113
|
items: t,
|
|
4080
4114
|
initialIndex: s = 0,
|
|
@@ -4088,7 +4122,7 @@ const Pr = ({
|
|
|
4088
4122
|
() => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "document"),
|
|
4089
4123
|
[l]
|
|
4090
4124
|
), m = ee(
|
|
4091
|
-
() => l ?
|
|
4125
|
+
() => l ? Jr(l.src) : void 0,
|
|
4092
4126
|
[l]
|
|
4093
4127
|
);
|
|
4094
4128
|
return !l || !m ? null : /* @__PURE__ */ h(
|
|
@@ -4122,16 +4156,16 @@ const Pr = ({
|
|
|
4122
4156
|
]
|
|
4123
4157
|
}
|
|
4124
4158
|
);
|
|
4125
|
-
},
|
|
4159
|
+
}, Jr = (e) => {
|
|
4126
4160
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
4127
4161
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
4128
|
-
},
|
|
4162
|
+
}, Zr = ({
|
|
4129
4163
|
src: e,
|
|
4130
4164
|
filename: t,
|
|
4131
4165
|
fileSize: s,
|
|
4132
4166
|
title: a,
|
|
4133
4167
|
items: r
|
|
4134
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
4168
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Qr = ({
|
|
4135
4169
|
variant: e,
|
|
4136
4170
|
item: t,
|
|
4137
4171
|
index: s,
|
|
@@ -4164,7 +4198,7 @@ const Pr = ({
|
|
|
4164
4198
|
onClick: d,
|
|
4165
4199
|
onDismiss: m
|
|
4166
4200
|
}) => {
|
|
4167
|
-
const b = we(e), u =
|
|
4201
|
+
const b = we(e), u = Zr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = Ne(
|
|
4168
4202
|
d
|
|
4169
4203
|
), v = e === "composer" && !!m;
|
|
4170
4204
|
if (u.length === 0)
|
|
@@ -4181,8 +4215,8 @@ const Pr = ({
|
|
|
4181
4215
|
groupPosition: l,
|
|
4182
4216
|
"data-testid": "pdf-attachment",
|
|
4183
4217
|
children: [
|
|
4184
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x,
|
|
4185
|
-
const E = x.filename ?? Z(x.src), M = v &&
|
|
4218
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, I) => {
|
|
4219
|
+
const E = x.filename ?? Z(x.src), M = v && I === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4186
4220
|
bn,
|
|
4187
4221
|
{
|
|
4188
4222
|
url: x.src,
|
|
@@ -4193,19 +4227,19 @@ const Pr = ({
|
|
|
4193
4227
|
}
|
|
4194
4228
|
);
|
|
4195
4229
|
return /* @__PURE__ */ n(
|
|
4196
|
-
|
|
4230
|
+
Qr,
|
|
4197
4231
|
{
|
|
4198
4232
|
variant: b,
|
|
4199
4233
|
item: x,
|
|
4200
|
-
index:
|
|
4234
|
+
index: I,
|
|
4201
4235
|
onActivate: g,
|
|
4202
4236
|
trailingAction: M
|
|
4203
4237
|
},
|
|
4204
|
-
`${x.src}-${
|
|
4238
|
+
`${x.src}-${I}`
|
|
4205
4239
|
);
|
|
4206
4240
|
}) }),
|
|
4207
4241
|
/* @__PURE__ */ n(
|
|
4208
|
-
|
|
4242
|
+
Kr,
|
|
4209
4243
|
{
|
|
4210
4244
|
open: f,
|
|
4211
4245
|
items: N,
|
|
@@ -4216,10 +4250,10 @@ const Pr = ({
|
|
|
4216
4250
|
]
|
|
4217
4251
|
}
|
|
4218
4252
|
);
|
|
4219
|
-
},
|
|
4220
|
-
Composer:
|
|
4221
|
-
Sent:
|
|
4222
|
-
Received:
|
|
4253
|
+
}, ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ni = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), si = {
|
|
4254
|
+
Composer: ei,
|
|
4255
|
+
Sent: ti,
|
|
4256
|
+
Received: ni
|
|
4223
4257
|
}, Nn = ({
|
|
4224
4258
|
open: e,
|
|
4225
4259
|
items: t,
|
|
@@ -4270,7 +4304,7 @@ const Pr = ({
|
|
|
4270
4304
|
]
|
|
4271
4305
|
}
|
|
4272
4306
|
) : null;
|
|
4273
|
-
},
|
|
4307
|
+
}, ai = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), _n = ({
|
|
4274
4308
|
item: e,
|
|
4275
4309
|
index: t
|
|
4276
4310
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4292,11 +4326,11 @@ const Pr = ({
|
|
|
4292
4326
|
"aria-hidden": !0
|
|
4293
4327
|
}
|
|
4294
4328
|
) }),
|
|
4295
|
-
/* @__PURE__ */ n(
|
|
4296
|
-
] }),
|
|
4329
|
+
/* @__PURE__ */ n(ai, {})
|
|
4330
|
+
] }), ri = (e, t, s) => ({
|
|
4297
4331
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4298
4332
|
content: /* @__PURE__ */ n(_n, { item: e, index: t })
|
|
4299
|
-
}),
|
|
4333
|
+
}), ii = ({
|
|
4300
4334
|
src: e,
|
|
4301
4335
|
poster: t,
|
|
4302
4336
|
mimeType: s,
|
|
@@ -4308,7 +4342,7 @@ const Pr = ({
|
|
|
4308
4342
|
mimeType: s.mimeType,
|
|
4309
4343
|
preload: s.preload,
|
|
4310
4344
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4311
|
-
})),
|
|
4345
|
+
})), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
4312
4346
|
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = Ne(
|
|
4313
4347
|
i
|
|
4314
4348
|
);
|
|
@@ -4349,13 +4383,13 @@ const Pr = ({
|
|
|
4349
4383
|
preload: d,
|
|
4350
4384
|
onClick: m
|
|
4351
4385
|
}) => {
|
|
4352
|
-
const b =
|
|
4386
|
+
const b = ii({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = Ne(
|
|
4353
4387
|
m
|
|
4354
4388
|
);
|
|
4355
4389
|
if (b.length === 0)
|
|
4356
4390
|
return null;
|
|
4357
4391
|
const v = b.map(
|
|
4358
|
-
(N, x) =>
|
|
4392
|
+
(N, x) => ri(N, x, b.length)
|
|
4359
4393
|
);
|
|
4360
4394
|
return /* @__PURE__ */ h(
|
|
4361
4395
|
ve,
|
|
@@ -4385,17 +4419,17 @@ const Pr = ({
|
|
|
4385
4419
|
]
|
|
4386
4420
|
}
|
|
4387
4421
|
);
|
|
4388
|
-
},
|
|
4389
|
-
Composer:
|
|
4390
|
-
Sent:
|
|
4391
|
-
Received:
|
|
4392
|
-
},
|
|
4393
|
-
Image:
|
|
4394
|
-
Video:
|
|
4422
|
+
}, li = (e) => /* @__PURE__ */ n(oi, { ...e }), ci = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), di = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), ui = {
|
|
4423
|
+
Composer: li,
|
|
4424
|
+
Sent: ci,
|
|
4425
|
+
Received: di
|
|
4426
|
+
}, Ii = {
|
|
4427
|
+
Image: Xr,
|
|
4428
|
+
Video: ui,
|
|
4395
4429
|
Audio: Sr,
|
|
4396
|
-
Pdf:
|
|
4397
|
-
File:
|
|
4398
|
-
},
|
|
4430
|
+
Pdf: si,
|
|
4431
|
+
File: Ur
|
|
4432
|
+
}, mi = ({
|
|
4399
4433
|
question: e,
|
|
4400
4434
|
onClick: t,
|
|
4401
4435
|
loading: s = !1,
|
|
@@ -4446,7 +4480,7 @@ const Pr = ({
|
|
|
4446
4480
|
children: [
|
|
4447
4481
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4448
4482
|
l.map((d) => /* @__PURE__ */ n(
|
|
4449
|
-
|
|
4483
|
+
mi,
|
|
4450
4484
|
{
|
|
4451
4485
|
question: d.question,
|
|
4452
4486
|
onClick: () => t(d.id),
|
|
@@ -4461,37 +4495,37 @@ const Pr = ({
|
|
|
4461
4495
|
};
|
|
4462
4496
|
export {
|
|
4463
4497
|
Qt as A,
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4498
|
+
Gs as B,
|
|
4499
|
+
Wa as C,
|
|
4500
|
+
Ps as D,
|
|
4467
4501
|
Si as F,
|
|
4468
|
-
|
|
4469
|
-
|
|
4502
|
+
ki as L,
|
|
4503
|
+
_i as M,
|
|
4470
4504
|
he as a,
|
|
4471
4505
|
ae as b,
|
|
4472
|
-
|
|
4506
|
+
ar as c,
|
|
4473
4507
|
dn as d,
|
|
4474
|
-
|
|
4475
|
-
|
|
4508
|
+
yi as e,
|
|
4509
|
+
mi as f,
|
|
4476
4510
|
ne as g,
|
|
4477
4511
|
Ot as h,
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4512
|
+
Ii as i,
|
|
4513
|
+
ya as j,
|
|
4514
|
+
Ni as k,
|
|
4515
|
+
Ci as l,
|
|
4516
|
+
Rr as m,
|
|
4517
|
+
Tr as n,
|
|
4518
|
+
nr as o,
|
|
4519
|
+
Mr as p,
|
|
4486
4520
|
Xt as q,
|
|
4487
4521
|
le as r,
|
|
4488
4522
|
nn as s,
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4523
|
+
zs as t,
|
|
4524
|
+
Ei as u,
|
|
4525
|
+
Hs as v,
|
|
4492
4526
|
Je as w,
|
|
4493
4527
|
Ze as x,
|
|
4494
4528
|
Wt as y,
|
|
4495
|
-
|
|
4529
|
+
pa as z
|
|
4496
4530
|
};
|
|
4497
|
-
//# sourceMappingURL=index-
|
|
4531
|
+
//# sourceMappingURL=index-C2wfgpUU.js.map
|