@linktr.ee/messaging-react 3.6.2-rc-1783311170 → 3.6.2-rc-1783314663
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-DnEyeR_d.js → Card-Byosl29s.js} +3 -3
- package/dist/{Card-DnEyeR_d.js.map → Card-Byosl29s.js.map} +1 -1
- package/dist/{Card-CK1jw1VU.cjs → Card-CLfoYI1R.cjs} +2 -2
- package/dist/{Card-CK1jw1VU.cjs.map → Card-CLfoYI1R.cjs.map} +1 -1
- package/dist/{Card-CSwQT3wz.cjs → Card-CSkWY9mH.cjs} +2 -2
- package/dist/{Card-CSwQT3wz.cjs.map → Card-CSkWY9mH.cjs.map} +1 -1
- package/dist/{Card-CJh6R76n.js → Card-CqEKHw9S.js} +2 -2
- package/dist/{Card-CJh6R76n.js.map → Card-CqEKHw9S.js.map} +1 -1
- package/dist/{Card-DUoHKAuh.js → Card-ILtY9lfF.js} +2 -2
- package/dist/{Card-DUoHKAuh.js.map → Card-ILtY9lfF.js.map} +1 -1
- package/dist/{Card-DQtg7wWP.cjs → Card-UN0QRlxk.cjs} +2 -2
- package/dist/{Card-DQtg7wWP.cjs.map → Card-UN0QRlxk.cjs.map} +1 -1
- package/dist/{LockedThumbnail-C_F2Sw-9.js → LockedThumbnail-BKI_6JUF.js} +2 -2
- package/dist/{LockedThumbnail-C_F2Sw-9.js.map → LockedThumbnail-BKI_6JUF.js.map} +1 -1
- package/dist/{LockedThumbnail-BZLpmTpY.cjs → LockedThumbnail-DZ6C2xsr.cjs} +2 -2
- package/dist/{LockedThumbnail-BZLpmTpY.cjs.map → LockedThumbnail-DZ6C2xsr.cjs.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{index-DcEVHNS3.js → index-DPwo1avm.js} +682 -688
- package/dist/index-DPwo1avm.js.map +1 -0
- package/dist/index-Q0FmgUJF.cjs +2 -0
- package/dist/index-Q0FmgUJF.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/CustomMessage/CustomMessage.stories.tsx +18 -11
- package/src/components/CustomMessage/MessageDeliveryStatus.test.tsx +60 -0
- package/src/components/CustomMessage/MessageDeliveryStatus.tsx +43 -0
- package/src/components/CustomMessage/index.tsx +2 -9
- package/src/styles.css +16 -25
- package/dist/index-DcEVHNS3.js.map +0 -1
- package/dist/index-LP0PQJxl.cjs +0 -2
- package/dist/index-LP0PQJxl.cjs.map +0 -1
- package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +0 -83
- package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +0 -67
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as s, jsxs as m, Fragment as
|
|
2
|
-
import U, { createContext as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { StarIcon as Ee, DotsThreeIcon as
|
|
1
|
+
import { jsx as s, jsxs as m, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import U, { createContext as at, useContext as Se, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Vs, useMemo as ae, Suspense as rt } from "react";
|
|
3
|
+
import { StreamChatService as Gs } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as Hs, LinkPreviewsManager as Ht } from "stream-chat";
|
|
5
|
+
import { Chat as Ys, useChannelStateContext as ue, useChatContext as me, DateSeparator as qs, areMessageUIPropsEqual as Ws, useMessageReminder as Xs, useComponentContext as rs, Attachment as Ks, EditMessageModal as Js, MessageBlocked as Zs, MessageBouncePrompt as Qs, MessageDeleted as en, MessageIsThreadReplyInChannelButtonIndicator as tn, MessageRepliesCountButton as sn, ReminderNotification as nn, StreamedMessageText as an, messageHasAttachments as rn, messageHasReactions as ln, isDateSeparatorMessage as on, isMessageBlocked as cn, isMessageBounced as dn, MessageBounceModal as un, MessageText as Yt, MessageErrorIcon as qt, Poll as mn, useMessageContext as Ie, useMessageComposer as hn, useStateStore as fn, MessageInput as gn, useMessageInputContext as pn, useMessageComposerHasSendableData as bn, AttachmentPreviewList as vn, QuotedMessagePreview as xn, TextareaComposer as wn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as _n, useAIState as Nn, Channel as yn, WithComponents as kn, Window as Cn, MessageList as En, ChannelList as Sn, InfiniteScroll as In } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ee, DotsThreeIcon as Tn, SpinnerGapIcon as ze, SignOutIcon as An, ProhibitInsetIcon as Wt, FlagIcon as is, ArrowLeftIcon as Qe, CurrencyDollarIcon as Mn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as ls, ImageIcon as Rn, SpeakerHighIcon as Ln, VideoCameraIcon as os, FileMdIcon as Dn, FileTextIcon as zn, FileZipIcon as Pn, FilePptIcon as Fn, FileCsvIcon as On, FileXlsIcon as $n, FileDocIcon as jn, FilePdfIcon as Bn, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Un, LinkIcon as Vn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Gn, ChecksIcon as Hn, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, PencilSimpleIcon as Xn, TrashSimpleIcon as Kn, ArrowUpIcon as Jn, ProhibitIcon as Zn } from "@phosphor-icons/react";
|
|
7
7
|
import k from "classnames";
|
|
8
|
-
import { MessageActions as
|
|
9
|
-
const
|
|
8
|
+
import { MessageActions as Qn, DefaultDropdownActionButton as cs } from "stream-chat-react/experimental";
|
|
9
|
+
const ds = at({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const us = rt({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), it = () => Se(ds), ll = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -24,7 +24,7 @@ const us = rt({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
var A,
|
|
27
|
+
var A, S;
|
|
28
28
|
const l = J(
|
|
29
29
|
(C, ...I) => {
|
|
30
30
|
i && console.log(`🔥 [MessagingProvider] ${C}`, ...I);
|
|
@@ -39,8 +39,8 @@ const us = rt({
|
|
|
39
39
|
});
|
|
40
40
|
const [o, d] = B(null), [u, p] = B(null), [h, g] = B(!1), [c, v] = B(!1), [w, b] = B(null), f = G(!1), x = G(null), N = G(n);
|
|
41
41
|
N.current = n;
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const E = G(i);
|
|
43
|
+
E.current = i;
|
|
44
44
|
const T = G({
|
|
45
45
|
userId: t == null ? void 0 : t.id,
|
|
46
46
|
apiKey: a,
|
|
@@ -63,8 +63,8 @@ const us = rt({
|
|
|
63
63
|
capabilities: r
|
|
64
64
|
};
|
|
65
65
|
const D = G(null);
|
|
66
|
-
a && ((A = D.current) == null ? void 0 : A.apiKey) !== a && (D.current = { apiKey: a, client: new
|
|
67
|
-
const L = a ? ((
|
|
66
|
+
a && ((A = D.current) == null ? void 0 : A.apiKey) !== a && (D.current = { apiKey: a, client: new Hs(a) });
|
|
67
|
+
const L = a ? ((S = D.current) == null ? void 0 : S.client) ?? null : null;
|
|
68
68
|
K(() => {
|
|
69
69
|
const C = M.current, I = N.current;
|
|
70
70
|
if (!a || !L || !I) {
|
|
@@ -78,10 +78,10 @@ const us = rt({
|
|
|
78
78
|
renderCount: C,
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
80
80
|
});
|
|
81
|
-
const $ = new
|
|
81
|
+
const $ = new Gs({
|
|
82
82
|
...I,
|
|
83
83
|
apiKey: a,
|
|
84
|
-
debug:
|
|
84
|
+
debug: E.current,
|
|
85
85
|
client: L
|
|
86
86
|
});
|
|
87
87
|
x.current = $, d($), l("✅ SERVICE SET", {
|
|
@@ -196,8 +196,8 @@ const us = rt({
|
|
|
196
196
|
renderCount: M.current,
|
|
197
197
|
willRenderChat: !!L,
|
|
198
198
|
contextValueReady: !!y
|
|
199
|
-
}), /* @__PURE__ */ s(
|
|
200
|
-
|
|
199
|
+
}), /* @__PURE__ */ s(ds.Provider, { value: y, children: L ? /* @__PURE__ */ s(
|
|
200
|
+
Ys,
|
|
201
201
|
{
|
|
202
202
|
client: L,
|
|
203
203
|
customClasses: {
|
|
@@ -206,7 +206,7 @@ const us = rt({
|
|
|
206
206
|
children: e
|
|
207
207
|
}
|
|
208
208
|
) : e });
|
|
209
|
-
},
|
|
209
|
+
}, ea = () => it(), lt = (e) => {
|
|
210
210
|
var a, r;
|
|
211
211
|
const [t, n] = B(
|
|
212
212
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -228,14 +228,14 @@ const us = rt({
|
|
|
228
228
|
e.off("member.updated", i);
|
|
229
229
|
};
|
|
230
230
|
}, [e]), t;
|
|
231
|
-
},
|
|
231
|
+
}, ta = "linktree-official", sa = "linktree-official-sender";
|
|
232
232
|
function Ue(e, t, n) {
|
|
233
233
|
const a = Object.values(e || {});
|
|
234
|
-
if (n ===
|
|
234
|
+
if (n === ta) {
|
|
235
235
|
const r = a.find(
|
|
236
236
|
(i) => {
|
|
237
237
|
var l;
|
|
238
|
-
return ((l = i.user) == null ? void 0 : l.id) ===
|
|
238
|
+
return ((l = i.user) == null ? void 0 : l.id) === sa;
|
|
239
239
|
}
|
|
240
240
|
);
|
|
241
241
|
if (r) return r;
|
|
@@ -247,18 +247,18 @@ function Ue(e, t, n) {
|
|
|
247
247
|
}
|
|
248
248
|
);
|
|
249
249
|
}
|
|
250
|
-
const
|
|
251
|
-
function
|
|
252
|
-
return
|
|
250
|
+
const na = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
251
|
+
function aa(e) {
|
|
252
|
+
return na.test(e.trim());
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Xt(e, t) {
|
|
255
255
|
const n = e == null ? void 0 : e.trim();
|
|
256
|
-
return !n || t && n === t ? !1 : !
|
|
256
|
+
return !n || t && n === t ? !1 : !aa(n);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
return
|
|
258
|
+
function ot(e) {
|
|
259
|
+
return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const Kt = [
|
|
262
262
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
263
263
|
// Apple
|
|
264
264
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -286,7 +286,7 @@ const Jt = [
|
|
|
286
286
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
287
287
|
// Melon
|
|
288
288
|
];
|
|
289
|
-
function
|
|
289
|
+
function ra(e) {
|
|
290
290
|
let t = 0;
|
|
291
291
|
for (let n = 0; n < e.length; n++) {
|
|
292
292
|
const a = e.charCodeAt(n);
|
|
@@ -294,14 +294,14 @@ function la(e) {
|
|
|
294
294
|
}
|
|
295
295
|
return Math.abs(t);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
return
|
|
297
|
+
function us(e) {
|
|
298
|
+
return Kt[ra(e) % Kt.length];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
return
|
|
300
|
+
function ia(e) {
|
|
301
|
+
return us(e).emoji;
|
|
302
302
|
}
|
|
303
|
-
function
|
|
304
|
-
return
|
|
303
|
+
function la(e) {
|
|
304
|
+
return us(e).bgColor;
|
|
305
305
|
}
|
|
306
306
|
const se = ({
|
|
307
307
|
id: e,
|
|
@@ -312,7 +312,7 @@ const se = ({
|
|
|
312
312
|
shape: i = "squircle",
|
|
313
313
|
dmAgentEnabled: l = !1
|
|
314
314
|
}) => {
|
|
315
|
-
const o =
|
|
315
|
+
const o = ia(e), d = la(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
316
316
|
"img",
|
|
317
317
|
{
|
|
318
318
|
src: t,
|
|
@@ -376,7 +376,7 @@ const se = ({
|
|
|
376
376
|
]
|
|
377
377
|
}
|
|
378
378
|
);
|
|
379
|
-
},
|
|
379
|
+
}, oa = "https://linktr.ee/s/about/trust-center/report", ca = ({
|
|
380
380
|
channel: e,
|
|
381
381
|
participant: t,
|
|
382
382
|
showBlockParticipant: n = !0,
|
|
@@ -390,29 +390,29 @@ const se = ({
|
|
|
390
390
|
logLabel: p = "useChannelModerationActions"
|
|
391
391
|
}) => {
|
|
392
392
|
var A;
|
|
393
|
-
const { service: h, debug: g } =
|
|
393
|
+
const { service: h, debug: g } = it(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, E] = B(!1), [T, M] = B(!1), D = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
|
|
394
394
|
return K(() => {
|
|
395
395
|
if (!v || !h || !c) {
|
|
396
396
|
b(!1), x(null);
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
|
-
let
|
|
399
|
+
let S = !1;
|
|
400
400
|
return (async () => {
|
|
401
401
|
try {
|
|
402
402
|
const C = await h.getBlockedUsers();
|
|
403
|
-
if (
|
|
403
|
+
if (S) return;
|
|
404
404
|
b(
|
|
405
405
|
C.some(
|
|
406
406
|
(I) => I.blocked_user_id === c
|
|
407
407
|
)
|
|
408
408
|
);
|
|
409
409
|
} catch (C) {
|
|
410
|
-
|
|
410
|
+
S || console.error(`[${p}] Failed to check blocked status:`, C);
|
|
411
411
|
} finally {
|
|
412
|
-
|
|
412
|
+
S || x({ participantId: c, service: h });
|
|
413
413
|
}
|
|
414
414
|
})(), () => {
|
|
415
|
-
|
|
415
|
+
S = !0;
|
|
416
416
|
};
|
|
417
417
|
}, [v, h, c, p]), {
|
|
418
418
|
isParticipantBlocked: w,
|
|
@@ -420,23 +420,23 @@ const se = ({
|
|
|
420
420
|
isLeaving: N,
|
|
421
421
|
isUpdatingBlockStatus: T,
|
|
422
422
|
handleLeaveConversation: async () => {
|
|
423
|
-
var
|
|
423
|
+
var S;
|
|
424
424
|
if (!N) {
|
|
425
|
-
l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid),
|
|
425
|
+
l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), E(!0);
|
|
426
426
|
try {
|
|
427
|
-
const C = ((
|
|
427
|
+
const C = ((S = e._client) == null ? void 0 : S.userID) ?? null;
|
|
428
428
|
await e.hide(C, !1), r && await r(e), u == null || u();
|
|
429
429
|
} catch (C) {
|
|
430
430
|
console.error(`[${p}] Failed to leave conversation`, C);
|
|
431
431
|
} finally {
|
|
432
|
-
|
|
432
|
+
E(!1);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
},
|
|
436
436
|
handleBlockUser: async () => {
|
|
437
|
-
var
|
|
437
|
+
var S, C, I;
|
|
438
438
|
if (!(T || !h)) {
|
|
439
|
-
o == null || o(), g && console.log(`[${p}] Block member`, (
|
|
439
|
+
o == null || o(), g && console.log(`[${p}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
|
|
440
440
|
try {
|
|
441
441
|
await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
|
|
442
442
|
} catch ($) {
|
|
@@ -447,9 +447,9 @@ const se = ({
|
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
handleUnblockUser: async () => {
|
|
450
|
-
var
|
|
450
|
+
var S, C, I;
|
|
451
451
|
if (!(T || !h)) {
|
|
452
|
-
o == null || o(), g && console.log(`[${p}] Unblock member`, (
|
|
452
|
+
o == null || o(), g && console.log(`[${p}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
|
|
453
453
|
try {
|
|
454
454
|
await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
|
|
455
455
|
} catch ($) {
|
|
@@ -460,10 +460,10 @@ const se = ({
|
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
handleReportUser: () => {
|
|
463
|
-
d == null || d(), u == null || u(), window.open(
|
|
463
|
+
d == null || d(), u == null || u(), window.open(oa, "_blank", "noopener,noreferrer");
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
|
-
},
|
|
466
|
+
}, _e = ({
|
|
467
467
|
variant: e = "default",
|
|
468
468
|
className: t,
|
|
469
469
|
children: n,
|
|
@@ -480,7 +480,7 @@ const se = ({
|
|
|
480
480
|
...a,
|
|
481
481
|
children: n
|
|
482
482
|
}
|
|
483
|
-
),
|
|
483
|
+
), tt = ({
|
|
484
484
|
channel: e,
|
|
485
485
|
participant: t,
|
|
486
486
|
showDeleteConversation: n = !0,
|
|
@@ -494,16 +494,16 @@ const se = ({
|
|
|
494
494
|
customChannelActions: p,
|
|
495
495
|
triggerClassName: h
|
|
496
496
|
}) => {
|
|
497
|
-
const [g, c] = B(!1), v = G(null), w =
|
|
497
|
+
const [g, c] = B(!1), v = G(null), w = Vs(), b = J(() => c(!1), []), {
|
|
498
498
|
isParticipantBlocked: f,
|
|
499
499
|
isCheckingBlockedStatus: x,
|
|
500
500
|
isLeaving: N,
|
|
501
|
-
isUpdatingBlockStatus:
|
|
501
|
+
isUpdatingBlockStatus: E,
|
|
502
502
|
handleLeaveConversation: T,
|
|
503
503
|
handleBlockUser: M,
|
|
504
504
|
handleUnblockUser: D,
|
|
505
505
|
handleReportUser: L
|
|
506
|
-
} =
|
|
506
|
+
} = ca({
|
|
507
507
|
channel: e,
|
|
508
508
|
participant: t,
|
|
509
509
|
showBlockParticipant: a,
|
|
@@ -537,7 +537,7 @@ const se = ({
|
|
|
537
537
|
"aria-controls": g ? w : void 0,
|
|
538
538
|
onClick: () => c((z) => !z),
|
|
539
539
|
children: [
|
|
540
|
-
/* @__PURE__ */ s(
|
|
540
|
+
/* @__PURE__ */ s(Tn, { className: "size-5 text-black/90" }),
|
|
541
541
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
542
542
|
]
|
|
543
543
|
}
|
|
@@ -553,13 +553,13 @@ const se = ({
|
|
|
553
553
|
),
|
|
554
554
|
children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
|
|
555
555
|
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
|
|
556
|
-
|
|
556
|
+
_e,
|
|
557
557
|
{
|
|
558
558
|
onClick: T,
|
|
559
559
|
disabled: N,
|
|
560
560
|
"aria-busy": N,
|
|
561
561
|
children: [
|
|
562
|
-
N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(
|
|
562
|
+
N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(An, { className: "h-5 w-5" }),
|
|
563
563
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
564
564
|
]
|
|
565
565
|
}
|
|
@@ -567,35 +567,35 @@ const se = ({
|
|
|
567
567
|
a && /* @__PURE__ */ s("li", { children: x ? (
|
|
568
568
|
// Block status not yet resolved — show a disabled placeholder
|
|
569
569
|
// so a premature click can't act on a stale block state.
|
|
570
|
-
/* @__PURE__ */ m(
|
|
570
|
+
/* @__PURE__ */ m(_e, { disabled: !0, "aria-busy": !0, children: [
|
|
571
571
|
/* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
|
|
572
572
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
573
573
|
] })
|
|
574
574
|
) : f ? /* @__PURE__ */ m(
|
|
575
|
-
|
|
575
|
+
_e,
|
|
576
576
|
{
|
|
577
577
|
onClick: D,
|
|
578
|
-
disabled:
|
|
579
|
-
"aria-busy":
|
|
578
|
+
disabled: E,
|
|
579
|
+
"aria-busy": E,
|
|
580
580
|
children: [
|
|
581
|
-
|
|
581
|
+
E ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
|
|
582
582
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
583
583
|
]
|
|
584
584
|
}
|
|
585
585
|
) : /* @__PURE__ */ m(
|
|
586
|
-
|
|
586
|
+
_e,
|
|
587
587
|
{
|
|
588
588
|
onClick: M,
|
|
589
|
-
disabled:
|
|
590
|
-
"aria-busy":
|
|
589
|
+
disabled: E,
|
|
590
|
+
"aria-busy": E,
|
|
591
591
|
children: [
|
|
592
|
-
|
|
592
|
+
E ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
|
|
593
593
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
594
594
|
]
|
|
595
595
|
}
|
|
596
596
|
) }),
|
|
597
|
-
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
|
|
598
|
-
/* @__PURE__ */ s(
|
|
597
|
+
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(_e, { variant: "danger", onClick: L, children: [
|
|
598
|
+
/* @__PURE__ */ s(is, { className: "h-5 w-5" }),
|
|
599
599
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
600
600
|
] }) }),
|
|
601
601
|
p
|
|
@@ -603,10 +603,10 @@ const se = ({
|
|
|
603
603
|
}
|
|
604
604
|
)
|
|
605
605
|
] });
|
|
606
|
-
}, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring",
|
|
606
|
+
}, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", da = "CUSTOMER_PAID", ua = "Replies instantly with AI assistant", ma = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === da, ha = (e) => {
|
|
607
607
|
const t = e;
|
|
608
|
-
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(
|
|
609
|
-
},
|
|
608
|
+
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ma);
|
|
609
|
+
}, fa = ({
|
|
610
610
|
onBack: e,
|
|
611
611
|
showBackButton: t,
|
|
612
612
|
showStarButton: n = !1,
|
|
@@ -635,7 +635,7 @@ const se = ({
|
|
|
635
635
|
);
|
|
636
636
|
},
|
|
637
637
|
[(L = b.state) == null ? void 0 : L.members, f == null ? void 0 : f.userID, b.type]
|
|
638
|
-
), N =
|
|
638
|
+
), N = ot(x == null ? void 0 : x.user), E = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = lt(b), M = ha(x), D = async () => {
|
|
639
639
|
try {
|
|
640
640
|
T ? await b.unpin() : await b.pin();
|
|
641
641
|
} catch (y) {
|
|
@@ -657,7 +657,7 @@ const se = ({
|
|
|
657
657
|
}),
|
|
658
658
|
type: "button",
|
|
659
659
|
"aria-label": "Back to conversations",
|
|
660
|
-
children: /* @__PURE__ */ s(
|
|
660
|
+
children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
|
|
661
661
|
}
|
|
662
662
|
) }),
|
|
663
663
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
|
|
@@ -673,7 +673,7 @@ const se = ({
|
|
|
673
673
|
{
|
|
674
674
|
id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
|
|
675
675
|
name: N,
|
|
676
|
-
image:
|
|
676
|
+
image: E,
|
|
677
677
|
dmAgentEnabled: a,
|
|
678
678
|
shape: "circle",
|
|
679
679
|
size: 48,
|
|
@@ -689,7 +689,7 @@ const se = ({
|
|
|
689
689
|
{
|
|
690
690
|
"aria-label": "Paid customer",
|
|
691
691
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
692
|
-
children: /* @__PURE__ */ s(
|
|
692
|
+
children: /* @__PURE__ */ s(Mn, { className: "size-2.5", weight: "bold" })
|
|
693
693
|
}
|
|
694
694
|
),
|
|
695
695
|
n && T && /* @__PURE__ */ s(
|
|
@@ -712,7 +712,7 @@ const se = ({
|
|
|
712
712
|
] }),
|
|
713
713
|
a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
714
714
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
715
|
-
/* @__PURE__ */ s("span", { children:
|
|
715
|
+
/* @__PURE__ */ s("span", { children: ua })
|
|
716
716
|
] })
|
|
717
717
|
] })
|
|
718
718
|
]
|
|
@@ -740,7 +740,7 @@ const se = ({
|
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
742
|
v && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
743
|
-
|
|
743
|
+
tt,
|
|
744
744
|
{
|
|
745
745
|
channel: b,
|
|
746
746
|
participant: x,
|
|
@@ -758,20 +758,20 @@ const se = ({
|
|
|
758
758
|
))
|
|
759
759
|
] })
|
|
760
760
|
] }) });
|
|
761
|
-
},
|
|
762
|
-
function
|
|
763
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
761
|
+
}, ga = (e) => /* @__PURE__ */ s(qs, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
|
|
762
|
+
function pa(e) {
|
|
763
|
+
return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function ba(e) {
|
|
766
766
|
const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
|
|
767
|
-
() =>
|
|
767
|
+
() => pa(e.own_reactions),
|
|
768
768
|
[e.own_reactions]
|
|
769
769
|
), r = J(async () => {
|
|
770
770
|
if (n != null && n.userID)
|
|
771
771
|
try {
|
|
772
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
772
|
+
a === "up" ? await t.deleteReaction(e.id, st) : await t.sendReaction(
|
|
773
773
|
e.id,
|
|
774
|
-
{ type:
|
|
774
|
+
{ type: st },
|
|
775
775
|
{ enforce_unique: !0, skip_push: !0 }
|
|
776
776
|
);
|
|
777
777
|
} catch {
|
|
@@ -779,9 +779,9 @@ function xa(e) {
|
|
|
779
779
|
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
|
|
780
780
|
if (n != null && n.userID)
|
|
781
781
|
try {
|
|
782
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
782
|
+
a === "down" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
|
|
783
783
|
e.id,
|
|
784
|
-
{ type:
|
|
784
|
+
{ type: nt },
|
|
785
785
|
{ enforce_unique: !0, skip_push: !0 }
|
|
786
786
|
);
|
|
787
787
|
} catch {
|
|
@@ -789,24 +789,24 @@ function xa(e) {
|
|
|
789
789
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
790
790
|
return { selected: a, voteUp: r, voteDown: i };
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function va(e) {
|
|
793
793
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function ms({
|
|
796
796
|
message: e,
|
|
797
797
|
viewerLanguage: t
|
|
798
798
|
}) {
|
|
799
799
|
var r;
|
|
800
|
-
const n = e == null ? void 0 : e.text, a =
|
|
800
|
+
const n = e == null ? void 0 : e.text, a = va(t);
|
|
801
801
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
802
802
|
}
|
|
803
|
-
const
|
|
803
|
+
const xa = U.lazy(() => import("./Card-CqEKHw9S.js")), wa = U.lazy(() => import("./Card-ILtY9lfF.js")), _a = U.lazy(() => import("./Card-Byosl29s.js")), ct = () => /* @__PURE__ */ s(
|
|
804
804
|
"div",
|
|
805
805
|
{
|
|
806
806
|
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)]",
|
|
807
807
|
"aria-hidden": !0
|
|
808
808
|
}
|
|
809
|
-
),
|
|
809
|
+
), Na = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(xa, { ...e }) }), hs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), ya = hs, ka = fs, Jt = { Composer: Na, Sent: hs, Received: fs, Creator: ya, Visitor: ka }, Ca = [
|
|
810
810
|
[/pdf/, "pdf"],
|
|
811
811
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
812
812
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -819,39 +819,39 @@ const _a = U.lazy(() => import("./Card-CJh6R76n.js")), Na = U.lazy(() => import(
|
|
|
819
819
|
function le(e) {
|
|
820
820
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
821
821
|
}
|
|
822
|
-
function
|
|
823
|
-
const t =
|
|
822
|
+
function gs(e) {
|
|
823
|
+
const t = Ca.find(
|
|
824
824
|
([n]) => n.test(e)
|
|
825
825
|
);
|
|
826
826
|
return t ? t[1] : "generic";
|
|
827
827
|
}
|
|
828
|
-
const
|
|
829
|
-
video:
|
|
830
|
-
audio:
|
|
831
|
-
image:
|
|
832
|
-
document:
|
|
833
|
-
},
|
|
834
|
-
pdf:
|
|
835
|
-
doc:
|
|
836
|
-
xls:
|
|
837
|
-
csv:
|
|
838
|
-
ppt:
|
|
839
|
-
zip:
|
|
840
|
-
text:
|
|
841
|
-
markdown:
|
|
842
|
-
generic:
|
|
828
|
+
const Ea = {
|
|
829
|
+
video: os,
|
|
830
|
+
audio: Ln,
|
|
831
|
+
image: Rn,
|
|
832
|
+
document: ls
|
|
833
|
+
}, Sa = {
|
|
834
|
+
pdf: Bn,
|
|
835
|
+
doc: jn,
|
|
836
|
+
xls: $n,
|
|
837
|
+
csv: On,
|
|
838
|
+
ppt: Fn,
|
|
839
|
+
zip: Pn,
|
|
840
|
+
text: zn,
|
|
841
|
+
markdown: Dn,
|
|
842
|
+
generic: ls
|
|
843
843
|
};
|
|
844
|
-
function
|
|
844
|
+
function Ia(e) {
|
|
845
845
|
const t = le(e);
|
|
846
|
-
return t !== "document" ?
|
|
846
|
+
return t !== "document" ? Ea[t] : Sa[gs(e)];
|
|
847
847
|
}
|
|
848
848
|
function we(e, t) {
|
|
849
|
-
return U.createElement(
|
|
849
|
+
return U.createElement(Ia(e), t);
|
|
850
850
|
}
|
|
851
|
-
const
|
|
851
|
+
const Ta = (e) => {
|
|
852
852
|
var t, n;
|
|
853
853
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
|
|
854
|
-
},
|
|
854
|
+
}, Aa = ({
|
|
855
855
|
source: e,
|
|
856
856
|
mimeType: t,
|
|
857
857
|
poster: n,
|
|
@@ -863,7 +863,7 @@ const Ma = (e) => {
|
|
|
863
863
|
muted: d = !1,
|
|
864
864
|
onContainerClick: u
|
|
865
865
|
}) => {
|
|
866
|
-
const p = le(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N,
|
|
866
|
+
const p = le(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, E] = B(!1), [T, M] = B(!1), [D, L] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [S, C] = B(null), I = J(() => {
|
|
867
867
|
L(!1), b(!0);
|
|
868
868
|
}, []), $ = J((_) => {
|
|
869
869
|
const R = g.current;
|
|
@@ -871,13 +871,13 @@ const Ma = (e) => {
|
|
|
871
871
|
const H = R.getBoundingClientRect();
|
|
872
872
|
return Math.max(
|
|
873
873
|
0,
|
|
874
|
-
Math.min(1, (
|
|
874
|
+
Math.min(1, (Ta(_) - H.left) / H.width)
|
|
875
875
|
);
|
|
876
876
|
}, []), F = J((_) => {
|
|
877
877
|
const R = h.current;
|
|
878
878
|
R && R.duration && (R.currentTime = _ * R.duration);
|
|
879
879
|
}, []), V = (_) => {
|
|
880
|
-
_.stopPropagation(),
|
|
880
|
+
_.stopPropagation(), E(!0);
|
|
881
881
|
const R = $(_);
|
|
882
882
|
x(R), F(R);
|
|
883
883
|
};
|
|
@@ -903,19 +903,19 @@ const Ma = (e) => {
|
|
|
903
903
|
}, [w]), K(() => {
|
|
904
904
|
if (!N) return;
|
|
905
905
|
const _ = (H) => x($(H)), R = (H) => {
|
|
906
|
-
|
|
906
|
+
E(!1), F($(H));
|
|
907
907
|
};
|
|
908
908
|
return window.addEventListener("mousemove", _), window.addEventListener("mouseup", R), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", R), () => {
|
|
909
909
|
window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", R);
|
|
910
910
|
};
|
|
911
911
|
}, [N, $, F]);
|
|
912
|
-
const Q =
|
|
912
|
+
const Q = S ? { aspectRatio: String(S) } : void 0, ee = S ? "" : " aspect-video", X = Math.round(f * 100);
|
|
913
913
|
return /* @__PURE__ */ m(
|
|
914
914
|
"div",
|
|
915
915
|
{
|
|
916
916
|
role: "button",
|
|
917
917
|
tabIndex: 0,
|
|
918
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
918
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
|
|
919
919
|
style: Q,
|
|
920
920
|
onClick: (_) => {
|
|
921
921
|
if (u) {
|
|
@@ -991,7 +991,7 @@ const Ma = (e) => {
|
|
|
991
991
|
}
|
|
992
992
|
) }),
|
|
993
993
|
O && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
994
|
-
|
|
994
|
+
ke,
|
|
995
995
|
{
|
|
996
996
|
className: "size-8 animate-spin text-white/80",
|
|
997
997
|
weight: "bold"
|
|
@@ -1010,7 +1010,7 @@ const Ma = (e) => {
|
|
|
1010
1010
|
onKeyDown: (_) => {
|
|
1011
1011
|
_.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), I());
|
|
1012
1012
|
},
|
|
1013
|
-
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(
|
|
1013
|
+
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(et, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1014
1014
|
}
|
|
1015
1015
|
),
|
|
1016
1016
|
o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
|
|
@@ -1049,7 +1049,7 @@ const Ma = (e) => {
|
|
|
1049
1049
|
},
|
|
1050
1050
|
className: "shrink-0 text-white",
|
|
1051
1051
|
"aria-label": w ? "Pause" : "Play",
|
|
1052
|
-
children: w ? /* @__PURE__ */ s(
|
|
1052
|
+
children: w ? /* @__PURE__ */ s(Un, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1053
1053
|
}
|
|
1054
1054
|
),
|
|
1055
1055
|
/* @__PURE__ */ m(
|
|
@@ -1099,7 +1099,7 @@ const Ma = (e) => {
|
|
|
1099
1099
|
]
|
|
1100
1100
|
}
|
|
1101
1101
|
);
|
|
1102
|
-
},
|
|
1102
|
+
}, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ma = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ps = ({
|
|
1103
1103
|
mimeType: e,
|
|
1104
1104
|
sourceUrl: t,
|
|
1105
1105
|
thumbnailUrl: n,
|
|
@@ -1110,7 +1110,7 @@ const Ma = (e) => {
|
|
|
1110
1110
|
}) => {
|
|
1111
1111
|
const o = le(e), [d, u] = B(!1);
|
|
1112
1112
|
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
|
|
1113
|
-
|
|
1113
|
+
Aa,
|
|
1114
1114
|
{
|
|
1115
1115
|
source: t,
|
|
1116
1116
|
mimeType: e,
|
|
@@ -1157,11 +1157,11 @@ const Ma = (e) => {
|
|
|
1157
1157
|
{
|
|
1158
1158
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1159
1159
|
children: we(e, {
|
|
1160
|
-
className:
|
|
1160
|
+
className: Zt(r),
|
|
1161
1161
|
weight: "regular"
|
|
1162
1162
|
})
|
|
1163
1163
|
}
|
|
1164
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1164
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ma(r)}`, children: /* @__PURE__ */ s(
|
|
1165
1165
|
"img",
|
|
1166
1166
|
{
|
|
1167
1167
|
src: n,
|
|
@@ -1174,12 +1174,12 @@ const Ma = (e) => {
|
|
|
1174
1174
|
{
|
|
1175
1175
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1176
1176
|
children: we(e, {
|
|
1177
|
-
className:
|
|
1177
|
+
className: Zt(r),
|
|
1178
1178
|
weight: "regular"
|
|
1179
1179
|
})
|
|
1180
1180
|
}
|
|
1181
1181
|
);
|
|
1182
|
-
},
|
|
1182
|
+
}, bs = ({
|
|
1183
1183
|
variant: e,
|
|
1184
1184
|
thumbnail: t,
|
|
1185
1185
|
title: n,
|
|
@@ -1245,28 +1245,28 @@ const Ma = (e) => {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
1247
|
};
|
|
1248
|
-
function
|
|
1248
|
+
function vs(e) {
|
|
1249
1249
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function dt(e) {
|
|
1252
1252
|
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)]`;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function Ra(e) {
|
|
1255
1255
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function La(e) {
|
|
1258
1258
|
return e ? "text-white" : "text-black";
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function Da(e) {
|
|
1261
1261
|
return e ? "text-white/55" : "text-black/55";
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function za(e) {
|
|
1264
1264
|
return e ? "text-white/40" : "text-black/40";
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function Pa(e) {
|
|
1267
1267
|
return e ? "text-white/20" : "text-black/20";
|
|
1268
1268
|
}
|
|
1269
|
-
const
|
|
1269
|
+
const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
1270
1270
|
const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ m(U.Fragment, { children: [
|
|
1271
1271
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1272
1272
|
"img",
|
|
@@ -1278,26 +1278,26 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1278
1278
|
) : /* @__PURE__ */ s(
|
|
1279
1279
|
"div",
|
|
1280
1280
|
{
|
|
1281
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1282
|
-
children: /* @__PURE__ */ s(
|
|
1281
|
+
className: `aspect-video w-full rounded-[20px] ${Ra(t)} flex items-center justify-center`,
|
|
1282
|
+
children: /* @__PURE__ */ s(Vn, { className: `size-12 ${Pa(t)}` })
|
|
1283
1283
|
}
|
|
1284
1284
|
) }),
|
|
1285
1285
|
/* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
|
|
1286
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1287
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1288
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1286
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${La(t)}`, children: n }),
|
|
1287
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Da(t)}`, children: a }),
|
|
1288
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${za(t)}`, children: d })
|
|
1289
1289
|
] })
|
|
1290
1290
|
] });
|
|
1291
1291
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
|
|
1292
1292
|
};
|
|
1293
|
-
function
|
|
1293
|
+
function xs(e) {
|
|
1294
1294
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function mt(e) {
|
|
1297
1297
|
var t;
|
|
1298
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1298
|
+
return (t = e.attachments) == null ? void 0 : t.find(xs);
|
|
1299
1299
|
}
|
|
1300
|
-
async function
|
|
1300
|
+
async function Fa(e, t) {
|
|
1301
1301
|
let n;
|
|
1302
1302
|
try {
|
|
1303
1303
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1309,7 +1309,7 @@ async function $a(e, t) {
|
|
|
1309
1309
|
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1310
1310
|
l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1311
1311
|
}
|
|
1312
|
-
const
|
|
1312
|
+
const Oa = ({
|
|
1313
1313
|
url: e,
|
|
1314
1314
|
filename: t
|
|
1315
1315
|
}) => {
|
|
@@ -1321,7 +1321,7 @@ const ja = ({
|
|
|
1321
1321
|
onClick: (i) => {
|
|
1322
1322
|
i.stopPropagation();
|
|
1323
1323
|
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1324
|
-
a(!0),
|
|
1324
|
+
a(!0), Fa(e, t).then(() => {
|
|
1325
1325
|
l == null || l.close();
|
|
1326
1326
|
}).catch(() => {
|
|
1327
1327
|
l && (l.location.href = e);
|
|
@@ -1329,14 +1329,14 @@ const ja = ({
|
|
|
1329
1329
|
},
|
|
1330
1330
|
disabled: n,
|
|
1331
1331
|
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",
|
|
1332
|
-
children: n ? /* @__PURE__ */ s(
|
|
1333
|
-
/* @__PURE__ */ s(
|
|
1332
|
+
children: n ? /* @__PURE__ */ s(ke, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
|
|
1333
|
+
/* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
|
|
1334
1334
|
"Download"
|
|
1335
1335
|
] })
|
|
1336
1336
|
}
|
|
1337
1337
|
);
|
|
1338
1338
|
};
|
|
1339
|
-
function
|
|
1339
|
+
function ht(e) {
|
|
1340
1340
|
var h, g, c, v;
|
|
1341
1341
|
const t = (h = e.attachments) == null ? void 0 : h.find(
|
|
1342
1342
|
(w) => w.type === "video" && w.asset_url
|
|
@@ -1357,16 +1357,16 @@ function ft(e) {
|
|
|
1357
1357
|
thumbnailUrl: p
|
|
1358
1358
|
};
|
|
1359
1359
|
}
|
|
1360
|
-
const
|
|
1360
|
+
const ws = ({
|
|
1361
1361
|
resolvedUrl: e,
|
|
1362
1362
|
resolvedType: t,
|
|
1363
1363
|
title: n,
|
|
1364
1364
|
fileSize: a,
|
|
1365
1365
|
thumbnailUrl: r
|
|
1366
1366
|
}) => {
|
|
1367
|
-
const i = a !== void 0 ?
|
|
1367
|
+
const i = a !== void 0 ? vs(a) : void 0;
|
|
1368
1368
|
return /* @__PURE__ */ s(
|
|
1369
|
-
|
|
1369
|
+
bs,
|
|
1370
1370
|
{
|
|
1371
1371
|
variant: "dark",
|
|
1372
1372
|
title: n,
|
|
@@ -1374,7 +1374,7 @@ const _s = ({
|
|
|
1374
1374
|
mimeType: t,
|
|
1375
1375
|
detail: i,
|
|
1376
1376
|
thumbnail: /* @__PURE__ */ s(
|
|
1377
|
-
|
|
1377
|
+
ps,
|
|
1378
1378
|
{
|
|
1379
1379
|
mimeType: t,
|
|
1380
1380
|
sourceUrl: e,
|
|
@@ -1385,23 +1385,23 @@ const _s = ({
|
|
|
1385
1385
|
)
|
|
1386
1386
|
}
|
|
1387
1387
|
);
|
|
1388
|
-
},
|
|
1388
|
+
}, _s = ({
|
|
1389
1389
|
resolvedUrl: e,
|
|
1390
1390
|
resolvedType: t,
|
|
1391
1391
|
title: n,
|
|
1392
1392
|
fileSize: a,
|
|
1393
1393
|
thumbnailUrl: r
|
|
1394
1394
|
}) => {
|
|
1395
|
-
const i = le(t), l = a !== void 0 ?
|
|
1395
|
+
const i = le(t), l = a !== void 0 ? vs(a) : void 0;
|
|
1396
1396
|
return /* @__PURE__ */ s(
|
|
1397
|
-
|
|
1397
|
+
bs,
|
|
1398
1398
|
{
|
|
1399
1399
|
variant: "light",
|
|
1400
1400
|
title: n,
|
|
1401
1401
|
mimeType: t,
|
|
1402
1402
|
detail: l,
|
|
1403
1403
|
thumbnail: /* @__PURE__ */ s(
|
|
1404
|
-
|
|
1404
|
+
ps,
|
|
1405
1405
|
{
|
|
1406
1406
|
mimeType: t,
|
|
1407
1407
|
sourceUrl: e,
|
|
@@ -1411,14 +1411,14 @@ const _s = ({
|
|
|
1411
1411
|
containedImage: i === "image" || i === "document"
|
|
1412
1412
|
}
|
|
1413
1413
|
),
|
|
1414
|
-
action: /* @__PURE__ */ s(
|
|
1414
|
+
action: /* @__PURE__ */ s(Oa, { url: e, filename: n })
|
|
1415
1415
|
}
|
|
1416
1416
|
);
|
|
1417
|
-
},
|
|
1417
|
+
}, $a = ({
|
|
1418
1418
|
message: e,
|
|
1419
1419
|
isMyMessage: t = !1
|
|
1420
1420
|
}) => {
|
|
1421
|
-
const n =
|
|
1421
|
+
const n = mt(e), a = ht(e);
|
|
1422
1422
|
return !n && !a ? null : /* @__PURE__ */ m("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
|
|
1423
1423
|
!t && e.user && /* @__PURE__ */ s(
|
|
1424
1424
|
se,
|
|
@@ -1439,41 +1439,41 @@ const _s = ({
|
|
|
1439
1439
|
{
|
|
1440
1440
|
className: "str-chat__message-bubble",
|
|
1441
1441
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1442
|
-
children: n ? /* @__PURE__ */ s("div", { className:
|
|
1442
|
+
children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(ws, { ...a }) : /* @__PURE__ */ s(_s, { ...a })
|
|
1443
1443
|
}
|
|
1444
1444
|
) })
|
|
1445
1445
|
}
|
|
1446
1446
|
)
|
|
1447
1447
|
] });
|
|
1448
|
-
},
|
|
1448
|
+
}, ja = ({
|
|
1449
1449
|
message: e
|
|
1450
1450
|
}) => {
|
|
1451
|
-
const t =
|
|
1451
|
+
const t = mt(e);
|
|
1452
1452
|
if (t)
|
|
1453
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1454
|
-
const n =
|
|
1455
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1456
|
-
},
|
|
1453
|
+
return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
|
|
1454
|
+
const n = ht(e);
|
|
1455
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ws, { ...n }) }) : null;
|
|
1456
|
+
}, Ba = ({
|
|
1457
1457
|
message: e
|
|
1458
1458
|
}) => {
|
|
1459
|
-
const t =
|
|
1459
|
+
const t = mt(e);
|
|
1460
1460
|
if (t)
|
|
1461
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1462
|
-
const n =
|
|
1463
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1464
|
-
},
|
|
1465
|
-
Creator:
|
|
1466
|
-
Visitor:
|
|
1467
|
-
}),
|
|
1461
|
+
return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
|
|
1462
|
+
const n = ht(e);
|
|
1463
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
|
|
1464
|
+
}, ol = Object.assign($a, {
|
|
1465
|
+
Creator: ja,
|
|
1466
|
+
Visitor: Ba
|
|
1467
|
+
}), Ua = {
|
|
1468
1468
|
dark: "bg-[#121110]",
|
|
1469
1469
|
light: "bg-[#e9eaed]"
|
|
1470
|
-
},
|
|
1470
|
+
}, Va = {
|
|
1471
1471
|
dark: "text-white",
|
|
1472
1472
|
light: "text-[#080707]"
|
|
1473
|
-
},
|
|
1473
|
+
}, Ga = {
|
|
1474
1474
|
dark: "border-white/[0.08]",
|
|
1475
1475
|
light: "border-black/[0.08]"
|
|
1476
|
-
},
|
|
1476
|
+
}, Ha = (e) => e === "dark" ? "sender" : "receiver", Ya = {
|
|
1477
1477
|
sender: {
|
|
1478
1478
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1479
1479
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1495,7 +1495,7 @@ const _s = ({
|
|
|
1495
1495
|
children: i,
|
|
1496
1496
|
"data-testid": l
|
|
1497
1497
|
}) => {
|
|
1498
|
-
const o = t != null && t !== "", d =
|
|
1498
|
+
const o = t != null && t !== "", d = Ya[Ha(e)][a];
|
|
1499
1499
|
return /* @__PURE__ */ m(
|
|
1500
1500
|
"div",
|
|
1501
1501
|
{
|
|
@@ -1510,10 +1510,10 @@ const _s = ({
|
|
|
1510
1510
|
// as the surrounding `CustomMessage` text bubbles.
|
|
1511
1511
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
1512
1512
|
d,
|
|
1513
|
-
|
|
1514
|
-
|
|
1513
|
+
Ua[e],
|
|
1514
|
+
Va[e],
|
|
1515
1515
|
n && "border",
|
|
1516
|
-
n &&
|
|
1516
|
+
n && Ga[e],
|
|
1517
1517
|
r
|
|
1518
1518
|
),
|
|
1519
1519
|
children: [
|
|
@@ -1556,16 +1556,16 @@ const _s = ({
|
|
|
1556
1556
|
),
|
|
1557
1557
|
children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
|
|
1558
1558
|
}
|
|
1559
|
-
), Me = (e) => e === "received" ? "light" : "dark",
|
|
1559
|
+
), Me = (e) => e === "received" ? "light" : "dark", qa = ({
|
|
1560
1560
|
firstOfGroup: e,
|
|
1561
1561
|
endOfGroup: t,
|
|
1562
1562
|
groupedByUser: n
|
|
1563
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1563
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Wa = ({
|
|
1564
1564
|
src: e,
|
|
1565
1565
|
mimeType: t,
|
|
1566
1566
|
filename: n,
|
|
1567
1567
|
items: a
|
|
1568
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1568
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Xa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
1569
1569
|
/* @__PURE__ */ s(
|
|
1570
1570
|
"audio",
|
|
1571
1571
|
{
|
|
@@ -1577,7 +1577,7 @@ const _s = ({
|
|
|
1577
1577
|
}
|
|
1578
1578
|
),
|
|
1579
1579
|
n ?? null
|
|
1580
|
-
] }),
|
|
1580
|
+
] }), ft = ({
|
|
1581
1581
|
state: e,
|
|
1582
1582
|
src: t,
|
|
1583
1583
|
mimeType: n,
|
|
@@ -1588,7 +1588,7 @@ const _s = ({
|
|
|
1588
1588
|
preload: o,
|
|
1589
1589
|
onDismiss: d
|
|
1590
1590
|
}) => {
|
|
1591
|
-
const u = Me(e), p = e === "composer" && !!d, h =
|
|
1591
|
+
const u = Me(e), p = e === "composer" && !!d, h = Wa({ src: t, mimeType: n, filename: a, items: r });
|
|
1592
1592
|
if (h.length === 0)
|
|
1593
1593
|
return null;
|
|
1594
1594
|
const g = o ?? (h.length > 1 ? "none" : "metadata");
|
|
@@ -1600,7 +1600,7 @@ const _s = ({
|
|
|
1600
1600
|
groupPosition: l,
|
|
1601
1601
|
"data-testid": "audio-attachment",
|
|
1602
1602
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
|
|
1603
|
-
|
|
1603
|
+
Xa,
|
|
1604
1604
|
{
|
|
1605
1605
|
item: c,
|
|
1606
1606
|
preload: g,
|
|
@@ -1614,15 +1614,15 @@ const _s = ({
|
|
|
1614
1614
|
)) })
|
|
1615
1615
|
}
|
|
1616
1616
|
);
|
|
1617
|
-
},
|
|
1618
|
-
Composer:
|
|
1619
|
-
Sent:
|
|
1620
|
-
Received:
|
|
1617
|
+
}, Ka = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), Qa = {
|
|
1618
|
+
Composer: Ka,
|
|
1619
|
+
Sent: Ja,
|
|
1620
|
+
Received: Za
|
|
1621
1621
|
};
|
|
1622
|
-
function
|
|
1622
|
+
function er(e) {
|
|
1623
1623
|
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`;
|
|
1624
1624
|
}
|
|
1625
|
-
const
|
|
1625
|
+
const tr = {
|
|
1626
1626
|
pdf: "PDF",
|
|
1627
1627
|
doc: "DOC",
|
|
1628
1628
|
xls: "XLS",
|
|
@@ -1632,7 +1632,7 @@ const nr = {
|
|
|
1632
1632
|
text: "TXT",
|
|
1633
1633
|
markdown: "MD"
|
|
1634
1634
|
};
|
|
1635
|
-
function
|
|
1635
|
+
function sr(e, t) {
|
|
1636
1636
|
if (t) {
|
|
1637
1637
|
const r = t.lastIndexOf(".");
|
|
1638
1638
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1642,7 +1642,7 @@ function ar(e, t) {
|
|
|
1642
1642
|
}
|
|
1643
1643
|
if (!e) return;
|
|
1644
1644
|
if (le(e) === "document") {
|
|
1645
|
-
const r =
|
|
1645
|
+
const r = gs(e), i = tr[r];
|
|
1646
1646
|
if (i) return i;
|
|
1647
1647
|
if (e === "application/octet-stream") return;
|
|
1648
1648
|
}
|
|
@@ -1650,8 +1650,8 @@ function ar(e, t) {
|
|
|
1650
1650
|
if (!(!a || a === "*"))
|
|
1651
1651
|
return a.toUpperCase();
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
const a =
|
|
1653
|
+
function nr(e, t, n) {
|
|
1654
|
+
const a = sr(e, t), r = typeof n == "number" && n > 0 ? er(n) : void 0;
|
|
1655
1655
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1656
1656
|
}
|
|
1657
1657
|
function re(e) {
|
|
@@ -1662,16 +1662,16 @@ function re(e) {
|
|
|
1662
1662
|
return "download";
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
const
|
|
1665
|
+
const ar = {
|
|
1666
1666
|
dark: "text-white/55",
|
|
1667
1667
|
light: "text-black/65"
|
|
1668
|
-
},
|
|
1668
|
+
}, rr = {
|
|
1669
1669
|
dark: "bg-white/10",
|
|
1670
1670
|
light: "bg-black/5"
|
|
1671
|
-
},
|
|
1671
|
+
}, ir = {
|
|
1672
1672
|
dark: "text-white/85",
|
|
1673
1673
|
light: "text-black/85"
|
|
1674
|
-
},
|
|
1674
|
+
}, Ns = ({
|
|
1675
1675
|
variant: e,
|
|
1676
1676
|
filename: t,
|
|
1677
1677
|
title: n,
|
|
@@ -1681,16 +1681,16 @@ const ir = {
|
|
|
1681
1681
|
activateLabel: l,
|
|
1682
1682
|
trailingAction: o
|
|
1683
1683
|
}) => {
|
|
1684
|
-
const d = n ?? t ?? "File", u =
|
|
1684
|
+
const d = n ?? t ?? "File", u = nr(a, t, r), p = /* @__PURE__ */ s(
|
|
1685
1685
|
"div",
|
|
1686
1686
|
{
|
|
1687
1687
|
className: k(
|
|
1688
1688
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1689
|
-
|
|
1689
|
+
rr[e]
|
|
1690
1690
|
),
|
|
1691
1691
|
"aria-hidden": !0,
|
|
1692
1692
|
children: we(a, {
|
|
1693
|
-
className: k("size-6",
|
|
1693
|
+
className: k("size-6", ir[e]),
|
|
1694
1694
|
weight: "regular"
|
|
1695
1695
|
})
|
|
1696
1696
|
}
|
|
@@ -1701,7 +1701,7 @@ const ir = {
|
|
|
1701
1701
|
{
|
|
1702
1702
|
className: k(
|
|
1703
1703
|
"truncate text-xs leading-4",
|
|
1704
|
-
|
|
1704
|
+
ar[e]
|
|
1705
1705
|
),
|
|
1706
1706
|
children: u
|
|
1707
1707
|
}
|
|
@@ -1721,7 +1721,7 @@ const ir = {
|
|
|
1721
1721
|
h
|
|
1722
1722
|
]
|
|
1723
1723
|
}
|
|
1724
|
-
) : /* @__PURE__ */ m(
|
|
1724
|
+
) : /* @__PURE__ */ m(te, { children: [
|
|
1725
1725
|
p,
|
|
1726
1726
|
h
|
|
1727
1727
|
] });
|
|
@@ -1730,7 +1730,7 @@ const ir = {
|
|
|
1730
1730
|
o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
|
|
1731
1731
|
] });
|
|
1732
1732
|
};
|
|
1733
|
-
async function
|
|
1733
|
+
async function ys(e, t) {
|
|
1734
1734
|
const n = t ?? re(e);
|
|
1735
1735
|
try {
|
|
1736
1736
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -1744,14 +1744,14 @@ async function ks(e, t) {
|
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
|
-
const
|
|
1747
|
+
const lr = ({
|
|
1748
1748
|
src: e,
|
|
1749
1749
|
filename: t,
|
|
1750
1750
|
fileSize: n,
|
|
1751
1751
|
mimeType: a,
|
|
1752
1752
|
title: r,
|
|
1753
1753
|
items: i
|
|
1754
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1754
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], or = ({
|
|
1755
1755
|
variant: e,
|
|
1756
1756
|
item: t,
|
|
1757
1757
|
index: n,
|
|
@@ -1760,7 +1760,7 @@ const cr = ({
|
|
|
1760
1760
|
}) => {
|
|
1761
1761
|
const i = t.filename ?? re(t.src);
|
|
1762
1762
|
return /* @__PURE__ */ s(
|
|
1763
|
-
|
|
1763
|
+
Ns,
|
|
1764
1764
|
{
|
|
1765
1765
|
variant: e,
|
|
1766
1766
|
filename: i,
|
|
@@ -1772,7 +1772,7 @@ const cr = ({
|
|
|
1772
1772
|
trailingAction: r
|
|
1773
1773
|
}
|
|
1774
1774
|
);
|
|
1775
|
-
},
|
|
1775
|
+
}, gt = ({
|
|
1776
1776
|
state: e,
|
|
1777
1777
|
src: t,
|
|
1778
1778
|
filename: n,
|
|
@@ -1785,7 +1785,7 @@ const cr = ({
|
|
|
1785
1785
|
onClick: u,
|
|
1786
1786
|
onDismiss: p
|
|
1787
1787
|
}) => {
|
|
1788
|
-
const h = Me(e), g = e === "composer" && !!p, c =
|
|
1788
|
+
const h = Me(e), g = e === "composer" && !!p, c = lr({
|
|
1789
1789
|
src: t,
|
|
1790
1790
|
filename: n,
|
|
1791
1791
|
fileSize: a,
|
|
@@ -1797,7 +1797,7 @@ const cr = ({
|
|
|
1797
1797
|
const f = c[b];
|
|
1798
1798
|
if (!f) return;
|
|
1799
1799
|
const x = f.filename ?? re(f.src);
|
|
1800
|
-
|
|
1800
|
+
ys(f.src, x);
|
|
1801
1801
|
};
|
|
1802
1802
|
if (c.length === 0)
|
|
1803
1803
|
return null;
|
|
@@ -1809,7 +1809,7 @@ const cr = ({
|
|
|
1809
1809
|
h === "dark" ? "text-white/70" : "text-black/70"
|
|
1810
1810
|
),
|
|
1811
1811
|
"aria-hidden": !0,
|
|
1812
|
-
children: /* @__PURE__ */ s(
|
|
1812
|
+
children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
|
|
1813
1813
|
}
|
|
1814
1814
|
);
|
|
1815
1815
|
return /* @__PURE__ */ s(
|
|
@@ -1820,7 +1820,7 @@ const cr = ({
|
|
|
1820
1820
|
groupPosition: d,
|
|
1821
1821
|
"data-testid": "file-attachment",
|
|
1822
1822
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, f) => /* @__PURE__ */ s(
|
|
1823
|
-
|
|
1823
|
+
or,
|
|
1824
1824
|
{
|
|
1825
1825
|
variant: h,
|
|
1826
1826
|
item: b,
|
|
@@ -1832,16 +1832,16 @@ const cr = ({
|
|
|
1832
1832
|
)) })
|
|
1833
1833
|
}
|
|
1834
1834
|
);
|
|
1835
|
-
},
|
|
1836
|
-
Composer:
|
|
1837
|
-
Sent:
|
|
1838
|
-
Received:
|
|
1839
|
-
},
|
|
1835
|
+
}, cr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), mr = {
|
|
1836
|
+
Composer: cr,
|
|
1837
|
+
Sent: dr,
|
|
1838
|
+
Received: ur
|
|
1839
|
+
}, pt = ({
|
|
1840
1840
|
onPrev: e,
|
|
1841
1841
|
onNext: t,
|
|
1842
1842
|
prevLabel: n = "Previous",
|
|
1843
1843
|
nextLabel: a = "Next"
|
|
1844
|
-
}) => /* @__PURE__ */ m(
|
|
1844
|
+
}) => /* @__PURE__ */ m(te, { children: [
|
|
1845
1845
|
/* @__PURE__ */ s(
|
|
1846
1846
|
"button",
|
|
1847
1847
|
{
|
|
@@ -1849,7 +1849,7 @@ const cr = ({
|
|
|
1849
1849
|
onClick: e,
|
|
1850
1850
|
"aria-label": n,
|
|
1851
1851
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1852
|
-
children: /* @__PURE__ */ s(
|
|
1852
|
+
children: /* @__PURE__ */ s(Gn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1853
1853
|
}
|
|
1854
1854
|
),
|
|
1855
1855
|
/* @__PURE__ */ s(
|
|
@@ -1862,7 +1862,7 @@ const cr = ({
|
|
|
1862
1862
|
children: /* @__PURE__ */ s(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1863
1863
|
}
|
|
1864
1864
|
)
|
|
1865
|
-
] }),
|
|
1865
|
+
] }), ks = ({
|
|
1866
1866
|
url: e,
|
|
1867
1867
|
filename: t,
|
|
1868
1868
|
variant: n = "pill",
|
|
@@ -1873,7 +1873,7 @@ const cr = ({
|
|
|
1873
1873
|
}) => {
|
|
1874
1874
|
const [o, d] = B(!1), u = J(
|
|
1875
1875
|
(c) => {
|
|
1876
|
-
c.stopPropagation(), !o && (d(!0),
|
|
1876
|
+
c.stopPropagation(), !o && (d(!0), ys(e, t).catch(() => {
|
|
1877
1877
|
}).finally(() => {
|
|
1878
1878
|
d(!1), l == null || l();
|
|
1879
1879
|
}));
|
|
@@ -1898,14 +1898,14 @@ const cr = ({
|
|
|
1898
1898
|
}[i]
|
|
1899
1899
|
),
|
|
1900
1900
|
children: o ? /* @__PURE__ */ s(
|
|
1901
|
-
|
|
1901
|
+
ke,
|
|
1902
1902
|
{
|
|
1903
1903
|
className: "size-4 animate-spin",
|
|
1904
1904
|
weight: "bold",
|
|
1905
1905
|
"aria-hidden": !0
|
|
1906
1906
|
}
|
|
1907
1907
|
) : /* @__PURE__ */ s(
|
|
1908
|
-
|
|
1908
|
+
Ce,
|
|
1909
1909
|
{
|
|
1910
1910
|
className: "size-5 shrink-0",
|
|
1911
1911
|
weight: "bold",
|
|
@@ -1921,7 +1921,7 @@ const cr = ({
|
|
|
1921
1921
|
disabled: o,
|
|
1922
1922
|
"aria-label": a,
|
|
1923
1923
|
className: "mes-media-viewer__action",
|
|
1924
|
-
children: o ? /* @__PURE__ */ s(
|
|
1924
|
+
children: o ? /* @__PURE__ */ s(ke, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1925
1925
|
}
|
|
1926
1926
|
) : /* @__PURE__ */ m(
|
|
1927
1927
|
"button",
|
|
@@ -1936,18 +1936,18 @@ const cr = ({
|
|
|
1936
1936
|
),
|
|
1937
1937
|
children: [
|
|
1938
1938
|
o ? /* @__PURE__ */ s(
|
|
1939
|
-
|
|
1939
|
+
ke,
|
|
1940
1940
|
{
|
|
1941
1941
|
className: "size-4 animate-spin",
|
|
1942
1942
|
weight: "bold",
|
|
1943
1943
|
"aria-hidden": !0
|
|
1944
1944
|
}
|
|
1945
|
-
) : /* @__PURE__ */ s(
|
|
1945
|
+
) : /* @__PURE__ */ s(Ce, { ...g, "aria-hidden": !0 }),
|
|
1946
1946
|
p ? null : a
|
|
1947
1947
|
]
|
|
1948
1948
|
}
|
|
1949
1949
|
);
|
|
1950
|
-
}, Xe = (e, t, n) => Math.min(Math.max(e, t), n),
|
|
1950
|
+
}, Xe = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
|
|
1951
1951
|
length: e,
|
|
1952
1952
|
initialIndex: t,
|
|
1953
1953
|
open: n
|
|
@@ -1972,7 +1972,7 @@ const cr = ({
|
|
|
1972
1972
|
};
|
|
1973
1973
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1974
1974
|
}, [n, e, l, o]), { index: r, prev: l, next: o };
|
|
1975
|
-
},
|
|
1975
|
+
}, vt = ({
|
|
1976
1976
|
open: e,
|
|
1977
1977
|
onClose: t,
|
|
1978
1978
|
ariaLabel: n,
|
|
@@ -2062,13 +2062,13 @@ const cr = ({
|
|
|
2062
2062
|
]
|
|
2063
2063
|
}
|
|
2064
2064
|
);
|
|
2065
|
-
},
|
|
2065
|
+
}, Cs = ({
|
|
2066
2066
|
open: e,
|
|
2067
2067
|
items: t,
|
|
2068
2068
|
initialIndex: n = 0,
|
|
2069
2069
|
onClose: a
|
|
2070
2070
|
}) => {
|
|
2071
|
-
const { index: r, prev: i, next: l } =
|
|
2071
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2072
2072
|
length: t.length,
|
|
2073
2073
|
initialIndex: n,
|
|
2074
2074
|
open: e
|
|
@@ -2077,14 +2077,14 @@ const cr = ({
|
|
|
2077
2077
|
[o]
|
|
2078
2078
|
);
|
|
2079
2079
|
return o ? /* @__PURE__ */ m(
|
|
2080
|
-
|
|
2080
|
+
vt,
|
|
2081
2081
|
{
|
|
2082
2082
|
open: e,
|
|
2083
2083
|
onClose: a,
|
|
2084
2084
|
ariaLabel: d,
|
|
2085
2085
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
2086
2086
|
actions: /* @__PURE__ */ s(
|
|
2087
|
-
|
|
2087
|
+
ks,
|
|
2088
2088
|
{
|
|
2089
2089
|
url: o.src,
|
|
2090
2090
|
filename: d,
|
|
@@ -2107,7 +2107,7 @@ const cr = ({
|
|
|
2107
2107
|
`${r}:${o.src}`
|
|
2108
2108
|
),
|
|
2109
2109
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2110
|
-
|
|
2110
|
+
pt,
|
|
2111
2111
|
{
|
|
2112
2112
|
onPrev: i,
|
|
2113
2113
|
onNext: l,
|
|
@@ -2118,7 +2118,7 @@ const cr = ({
|
|
|
2118
2118
|
]
|
|
2119
2119
|
}
|
|
2120
2120
|
) : null;
|
|
2121
|
-
},
|
|
2121
|
+
}, hr = "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", Es = ({
|
|
2122
2122
|
tiles: e,
|
|
2123
2123
|
onTileActivate: t,
|
|
2124
2124
|
maxVisible: n = 4,
|
|
@@ -2127,7 +2127,7 @@ const cr = ({
|
|
|
2127
2127
|
const r = e.length;
|
|
2128
2128
|
if (r === 0) return null;
|
|
2129
2129
|
const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, p) => {
|
|
2130
|
-
const h = k(
|
|
2130
|
+
const h = k(hr, "h-full w-full");
|
|
2131
2131
|
return t ? /* @__PURE__ */ m(
|
|
2132
2132
|
"button",
|
|
2133
2133
|
{
|
|
@@ -2196,7 +2196,7 @@ const cr = ({
|
|
|
2196
2196
|
[e]
|
|
2197
2197
|
), l = J(() => n(!1), []);
|
|
2198
2198
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
2199
|
-
},
|
|
2199
|
+
}, fr = (e, t, n, a) => ({
|
|
2200
2200
|
ariaLabel: `Open image ${t + 1} of ${n}`,
|
|
2201
2201
|
content: /* @__PURE__ */ s(
|
|
2202
2202
|
"img",
|
|
@@ -2211,15 +2211,15 @@ const cr = ({
|
|
|
2211
2211
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2212
2212
|
}
|
|
2213
2213
|
)
|
|
2214
|
-
}),
|
|
2214
|
+
}), gr = ({
|
|
2215
2215
|
src: e,
|
|
2216
2216
|
alt: t,
|
|
2217
2217
|
items: n
|
|
2218
|
-
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [],
|
|
2218
|
+
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ss = (e, t) => e.map((n, a) => ({
|
|
2219
2219
|
src: n.src,
|
|
2220
2220
|
alt: n.alt,
|
|
2221
2221
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2222
|
-
})),
|
|
2222
|
+
})), pr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2223
2223
|
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Re(
|
|
2224
2224
|
r
|
|
2225
2225
|
);
|
|
@@ -2246,16 +2246,16 @@ const cr = ({
|
|
|
2246
2246
|
),
|
|
2247
2247
|
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
|
|
2248
2248
|
/* @__PURE__ */ s(
|
|
2249
|
-
|
|
2249
|
+
Cs,
|
|
2250
2250
|
{
|
|
2251
2251
|
open: l,
|
|
2252
|
-
items:
|
|
2252
|
+
items: Ss([{ src: e, alt: t }], n),
|
|
2253
2253
|
initialIndex: o,
|
|
2254
2254
|
onClose: u
|
|
2255
2255
|
}
|
|
2256
2256
|
)
|
|
2257
2257
|
] });
|
|
2258
|
-
},
|
|
2258
|
+
}, Is = ({
|
|
2259
2259
|
state: e,
|
|
2260
2260
|
src: t,
|
|
2261
2261
|
alt: n,
|
|
@@ -2266,13 +2266,13 @@ const cr = ({
|
|
|
2266
2266
|
loading: o = "lazy",
|
|
2267
2267
|
onClick: d
|
|
2268
2268
|
}) => {
|
|
2269
|
-
const u =
|
|
2269
|
+
const u = gr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
|
|
2270
2270
|
d
|
|
2271
2271
|
);
|
|
2272
2272
|
if (u.length === 0)
|
|
2273
2273
|
return null;
|
|
2274
2274
|
const w = u.map(
|
|
2275
|
-
(b, f) =>
|
|
2275
|
+
(b, f) => fr(b, f, u.length, o)
|
|
2276
2276
|
);
|
|
2277
2277
|
return /* @__PURE__ */ m(
|
|
2278
2278
|
Te,
|
|
@@ -2284,10 +2284,10 @@ const cr = ({
|
|
|
2284
2284
|
children: [
|
|
2285
2285
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
|
|
2286
2286
|
/* @__PURE__ */ s(
|
|
2287
|
-
|
|
2287
|
+
Cs,
|
|
2288
2288
|
{
|
|
2289
2289
|
open: h,
|
|
2290
|
-
items:
|
|
2290
|
+
items: Ss(u, a),
|
|
2291
2291
|
initialIndex: g,
|
|
2292
2292
|
onClose: v
|
|
2293
2293
|
}
|
|
@@ -2295,17 +2295,17 @@ const cr = ({
|
|
|
2295
2295
|
]
|
|
2296
2296
|
}
|
|
2297
2297
|
);
|
|
2298
|
-
},
|
|
2299
|
-
Composer:
|
|
2300
|
-
Sent:
|
|
2301
|
-
Received:
|
|
2302
|
-
},
|
|
2298
|
+
}, br = (e) => /* @__PURE__ */ s(pr, { ...e }), vr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "sent" }), xr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "received" }), wr = {
|
|
2299
|
+
Composer: br,
|
|
2300
|
+
Sent: vr,
|
|
2301
|
+
Received: xr
|
|
2302
|
+
}, _r = ({
|
|
2303
2303
|
open: e,
|
|
2304
2304
|
items: t,
|
|
2305
2305
|
initialIndex: n = 0,
|
|
2306
2306
|
onClose: a
|
|
2307
2307
|
}) => {
|
|
2308
|
-
const { index: r, prev: i, next: l } =
|
|
2308
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2309
2309
|
length: t.length,
|
|
2310
2310
|
initialIndex: n,
|
|
2311
2311
|
open: e
|
|
@@ -2313,11 +2313,11 @@ const cr = ({
|
|
|
2313
2313
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
|
|
2314
2314
|
[o]
|
|
2315
2315
|
), u = ae(
|
|
2316
|
-
() => o ?
|
|
2316
|
+
() => o ? Nr(o.src) : void 0,
|
|
2317
2317
|
[o]
|
|
2318
2318
|
);
|
|
2319
2319
|
return !o || !u ? null : /* @__PURE__ */ m(
|
|
2320
|
-
|
|
2320
|
+
vt,
|
|
2321
2321
|
{
|
|
2322
2322
|
open: e,
|
|
2323
2323
|
onClose: a,
|
|
@@ -2336,7 +2336,7 @@ const cr = ({
|
|
|
2336
2336
|
`${r}:${o.src}`
|
|
2337
2337
|
),
|
|
2338
2338
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2339
|
-
|
|
2339
|
+
pt,
|
|
2340
2340
|
{
|
|
2341
2341
|
onPrev: i,
|
|
2342
2342
|
onNext: l,
|
|
@@ -2347,16 +2347,16 @@ const cr = ({
|
|
|
2347
2347
|
]
|
|
2348
2348
|
}
|
|
2349
2349
|
);
|
|
2350
|
-
},
|
|
2350
|
+
}, Nr = (e) => {
|
|
2351
2351
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2352
2352
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2353
|
-
},
|
|
2353
|
+
}, yr = ({
|
|
2354
2354
|
src: e,
|
|
2355
2355
|
filename: t,
|
|
2356
2356
|
fileSize: n,
|
|
2357
2357
|
title: a,
|
|
2358
2358
|
items: r
|
|
2359
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2359
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], kr = ({
|
|
2360
2360
|
variant: e,
|
|
2361
2361
|
item: t,
|
|
2362
2362
|
index: n,
|
|
@@ -2365,7 +2365,7 @@ const cr = ({
|
|
|
2365
2365
|
}) => {
|
|
2366
2366
|
const i = t.filename ?? re(t.src);
|
|
2367
2367
|
return /* @__PURE__ */ s(
|
|
2368
|
-
|
|
2368
|
+
Ns,
|
|
2369
2369
|
{
|
|
2370
2370
|
variant: e,
|
|
2371
2371
|
filename: i,
|
|
@@ -2377,7 +2377,7 @@ const cr = ({
|
|
|
2377
2377
|
trailingAction: r
|
|
2378
2378
|
}
|
|
2379
2379
|
);
|
|
2380
|
-
},
|
|
2380
|
+
}, xt = ({
|
|
2381
2381
|
state: e,
|
|
2382
2382
|
src: t,
|
|
2383
2383
|
filename: n,
|
|
@@ -2389,7 +2389,7 @@ const cr = ({
|
|
|
2389
2389
|
onClick: d,
|
|
2390
2390
|
onDismiss: u
|
|
2391
2391
|
}) => {
|
|
2392
|
-
const p = Me(e), h =
|
|
2392
|
+
const p = Me(e), h = yr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
|
|
2393
2393
|
d
|
|
2394
2394
|
), b = e === "composer" && !!u;
|
|
2395
2395
|
if (h.length === 0)
|
|
@@ -2407,18 +2407,18 @@ const cr = ({
|
|
|
2407
2407
|
"data-testid": "pdf-attachment",
|
|
2408
2408
|
children: [
|
|
2409
2409
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
|
|
2410
|
-
const
|
|
2411
|
-
|
|
2410
|
+
const E = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2411
|
+
ks,
|
|
2412
2412
|
{
|
|
2413
2413
|
url: x.src,
|
|
2414
|
-
filename:
|
|
2414
|
+
filename: E,
|
|
2415
2415
|
variant: "inline",
|
|
2416
|
-
label: `Download ${
|
|
2416
|
+
label: `Download ${E}`,
|
|
2417
2417
|
tone: p
|
|
2418
2418
|
}
|
|
2419
2419
|
);
|
|
2420
2420
|
return /* @__PURE__ */ s(
|
|
2421
|
-
|
|
2421
|
+
kr,
|
|
2422
2422
|
{
|
|
2423
2423
|
variant: p,
|
|
2424
2424
|
item: x,
|
|
@@ -2430,7 +2430,7 @@ const cr = ({
|
|
|
2430
2430
|
);
|
|
2431
2431
|
}) }),
|
|
2432
2432
|
/* @__PURE__ */ s(
|
|
2433
|
-
|
|
2433
|
+
_r,
|
|
2434
2434
|
{
|
|
2435
2435
|
open: g,
|
|
2436
2436
|
items: f,
|
|
@@ -2441,17 +2441,17 @@ const cr = ({
|
|
|
2441
2441
|
]
|
|
2442
2442
|
}
|
|
2443
2443
|
);
|
|
2444
|
-
},
|
|
2445
|
-
Composer:
|
|
2446
|
-
Sent:
|
|
2447
|
-
Received:
|
|
2448
|
-
},
|
|
2444
|
+
}, Cr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Ir = {
|
|
2445
|
+
Composer: Cr,
|
|
2446
|
+
Sent: Er,
|
|
2447
|
+
Received: Sr
|
|
2448
|
+
}, Ts = ({
|
|
2449
2449
|
open: e,
|
|
2450
2450
|
items: t,
|
|
2451
2451
|
initialIndex: n = 0,
|
|
2452
2452
|
onClose: a
|
|
2453
2453
|
}) => {
|
|
2454
|
-
const { index: r, prev: i, next: l } =
|
|
2454
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2455
2455
|
length: t.length,
|
|
2456
2456
|
initialIndex: n,
|
|
2457
2457
|
open: e
|
|
@@ -2460,7 +2460,7 @@ const cr = ({
|
|
|
2460
2460
|
[o]
|
|
2461
2461
|
);
|
|
2462
2462
|
return o ? /* @__PURE__ */ m(
|
|
2463
|
-
|
|
2463
|
+
vt,
|
|
2464
2464
|
{
|
|
2465
2465
|
open: e,
|
|
2466
2466
|
onClose: a,
|
|
@@ -2484,7 +2484,7 @@ const cr = ({
|
|
|
2484
2484
|
`${r}:${o.src}`
|
|
2485
2485
|
),
|
|
2486
2486
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2487
|
-
|
|
2487
|
+
pt,
|
|
2488
2488
|
{
|
|
2489
2489
|
onPrev: i,
|
|
2490
2490
|
onNext: l,
|
|
@@ -2495,7 +2495,7 @@ const cr = ({
|
|
|
2495
2495
|
]
|
|
2496
2496
|
}
|
|
2497
2497
|
) : null;
|
|
2498
|
-
},
|
|
2498
|
+
}, Tr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(et, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), As = ({
|
|
2499
2499
|
item: e,
|
|
2500
2500
|
index: t
|
|
2501
2501
|
}) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2510,30 +2510,30 @@ const cr = ({
|
|
|
2510
2510
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2511
2511
|
}
|
|
2512
2512
|
) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
2513
|
-
|
|
2513
|
+
os,
|
|
2514
2514
|
{
|
|
2515
2515
|
className: "size-16 rounded-md text-white/30",
|
|
2516
2516
|
weight: "regular",
|
|
2517
2517
|
"aria-hidden": !0
|
|
2518
2518
|
}
|
|
2519
2519
|
) }),
|
|
2520
|
-
/* @__PURE__ */ s(
|
|
2521
|
-
] }),
|
|
2520
|
+
/* @__PURE__ */ s(Tr, {})
|
|
2521
|
+
] }), Ar = (e, t, n) => ({
|
|
2522
2522
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2523
|
-
content: /* @__PURE__ */ s(
|
|
2524
|
-
}),
|
|
2523
|
+
content: /* @__PURE__ */ s(As, { item: e, index: t })
|
|
2524
|
+
}), Mr = ({
|
|
2525
2525
|
src: e,
|
|
2526
2526
|
poster: t,
|
|
2527
2527
|
mimeType: n,
|
|
2528
2528
|
preload: a,
|
|
2529
2529
|
items: r
|
|
2530
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [],
|
|
2530
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Ms = (e, t) => e.map((n, a) => ({
|
|
2531
2531
|
src: n.src,
|
|
2532
2532
|
poster: n.poster,
|
|
2533
2533
|
mimeType: n.mimeType,
|
|
2534
2534
|
preload: n.preload,
|
|
2535
2535
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2536
|
-
})),
|
|
2536
|
+
})), Rr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
|
|
2537
2537
|
const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: p } = Re(
|
|
2538
2538
|
i
|
|
2539
2539
|
);
|
|
@@ -2545,15 +2545,15 @@ const cr = ({
|
|
|
2545
2545
|
onClick: () => u(0),
|
|
2546
2546
|
"aria-label": "Play video",
|
|
2547
2547
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
2548
|
-
children: /* @__PURE__ */ s(
|
|
2548
|
+
children: /* @__PURE__ */ s(As, { item: { src: e, poster: t, mimeType: n }, index: 0 })
|
|
2549
2549
|
}
|
|
2550
2550
|
),
|
|
2551
2551
|
l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: l }) }) : null,
|
|
2552
2552
|
/* @__PURE__ */ s(
|
|
2553
|
-
|
|
2553
|
+
Ts,
|
|
2554
2554
|
{
|
|
2555
2555
|
open: o,
|
|
2556
|
-
items:
|
|
2556
|
+
items: Ms(
|
|
2557
2557
|
[{ src: e, poster: t, mimeType: n, preload: r }],
|
|
2558
2558
|
a
|
|
2559
2559
|
),
|
|
@@ -2562,7 +2562,7 @@ const cr = ({
|
|
|
2562
2562
|
}
|
|
2563
2563
|
)
|
|
2564
2564
|
] });
|
|
2565
|
-
},
|
|
2565
|
+
}, Rs = ({
|
|
2566
2566
|
state: e,
|
|
2567
2567
|
src: t,
|
|
2568
2568
|
poster: n,
|
|
@@ -2574,13 +2574,13 @@ const cr = ({
|
|
|
2574
2574
|
preload: d,
|
|
2575
2575
|
onClick: u
|
|
2576
2576
|
}) => {
|
|
2577
|
-
const p =
|
|
2577
|
+
const p = Mr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
|
|
2578
2578
|
u
|
|
2579
2579
|
);
|
|
2580
2580
|
if (p.length === 0)
|
|
2581
2581
|
return null;
|
|
2582
2582
|
const b = p.map(
|
|
2583
|
-
(f, x) =>
|
|
2583
|
+
(f, x) => Ar(f, x, p.length)
|
|
2584
2584
|
);
|
|
2585
2585
|
return /* @__PURE__ */ m(
|
|
2586
2586
|
Te,
|
|
@@ -2599,10 +2599,10 @@ const cr = ({
|
|
|
2599
2599
|
}
|
|
2600
2600
|
) }),
|
|
2601
2601
|
/* @__PURE__ */ s(
|
|
2602
|
-
|
|
2602
|
+
Ts,
|
|
2603
2603
|
{
|
|
2604
2604
|
open: g,
|
|
2605
|
-
items:
|
|
2605
|
+
items: Ms(p, r),
|
|
2606
2606
|
initialIndex: c,
|
|
2607
2607
|
onClose: w
|
|
2608
2608
|
}
|
|
@@ -2610,25 +2610,38 @@ const cr = ({
|
|
|
2610
2610
|
]
|
|
2611
2611
|
}
|
|
2612
2612
|
);
|
|
2613
|
-
},
|
|
2614
|
-
Composer:
|
|
2615
|
-
Sent:
|
|
2616
|
-
Received:
|
|
2617
|
-
},
|
|
2618
|
-
Image:
|
|
2619
|
-
Video:
|
|
2620
|
-
Audio:
|
|
2621
|
-
Pdf:
|
|
2622
|
-
File:
|
|
2623
|
-
},
|
|
2613
|
+
}, Lr = (e) => /* @__PURE__ */ s(Rr, { ...e }), Dr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "sent" }), zr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "received" }), Pr = {
|
|
2614
|
+
Composer: Lr,
|
|
2615
|
+
Sent: Dr,
|
|
2616
|
+
Received: zr
|
|
2617
|
+
}, Ne = {
|
|
2618
|
+
Image: wr,
|
|
2619
|
+
Video: Pr,
|
|
2620
|
+
Audio: Qa,
|
|
2621
|
+
Pdf: Ir,
|
|
2622
|
+
File: mr
|
|
2623
|
+
}, Fr = {
|
|
2624
2624
|
isUnlocking: () => !1
|
|
2625
|
-
},
|
|
2626
|
-
LockedAttachment:
|
|
2627
|
-
},
|
|
2628
|
-
function
|
|
2629
|
-
return
|
|
2625
|
+
}, Or = {
|
|
2626
|
+
LockedAttachment: Fr
|
|
2627
|
+
}, Ls = at({}), cl = Ls.Provider;
|
|
2628
|
+
function $r(e) {
|
|
2629
|
+
return Se(Ls)[e] ?? Or[e];
|
|
2630
2630
|
}
|
|
2631
|
-
const
|
|
2631
|
+
const jr = ({
|
|
2632
|
+
message: e,
|
|
2633
|
+
endOfGroup: t
|
|
2634
|
+
}) => !t || e.type === "error" || e.status !== "received" ? null : /* @__PURE__ */ m(
|
|
2635
|
+
"div",
|
|
2636
|
+
{
|
|
2637
|
+
className: "str-chat__message-delivery-status",
|
|
2638
|
+
"data-testid": "message-delivery-status",
|
|
2639
|
+
children: [
|
|
2640
|
+
/* @__PURE__ */ s(Hn, { size: 14, weight: "bold", "aria-hidden": "true" }),
|
|
2641
|
+
/* @__PURE__ */ s("span", { children: "Delivered" })
|
|
2642
|
+
]
|
|
2643
|
+
}
|
|
2644
|
+
), Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2632
2645
|
"svg",
|
|
2633
2646
|
{
|
|
2634
2647
|
width: e,
|
|
@@ -2645,21 +2658,21 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2645
2658
|
}
|
|
2646
2659
|
)
|
|
2647
2660
|
}
|
|
2648
|
-
),
|
|
2661
|
+
), Ur = (e) => {
|
|
2649
2662
|
var t;
|
|
2650
2663
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
2651
|
-
},
|
|
2664
|
+
}, Vr = (e) => {
|
|
2652
2665
|
var t;
|
|
2653
2666
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
2654
2667
|
}, Fe = (e) => {
|
|
2655
2668
|
var t;
|
|
2656
2669
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
2657
|
-
},
|
|
2670
|
+
}, Gr = (e) => {
|
|
2658
2671
|
var t;
|
|
2659
2672
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
2660
|
-
},
|
|
2673
|
+
}, Ds = (e) => Ur(e) || Vr(e), Hr = (e) => {
|
|
2661
2674
|
var t;
|
|
2662
|
-
return
|
|
2675
|
+
return Ds(e) && !((t = e.text) != null && t.trim());
|
|
2663
2676
|
}, Ke = ({
|
|
2664
2677
|
message: e,
|
|
2665
2678
|
standalone: t = !1,
|
|
@@ -2667,7 +2680,7 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2667
2680
|
hasAttachment: a = !1
|
|
2668
2681
|
}) => {
|
|
2669
2682
|
var h;
|
|
2670
|
-
const r =
|
|
2683
|
+
const r = Ds(e), i = Fe(e);
|
|
2671
2684
|
if (!r && !i)
|
|
2672
2685
|
return null;
|
|
2673
2686
|
if (r) {
|
|
@@ -2675,7 +2688,7 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2675
2688
|
if (!g) return null;
|
|
2676
2689
|
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
|
|
2677
2690
|
return /* @__PURE__ */ m("div", { className: c, children: [
|
|
2678
|
-
/* @__PURE__ */ s(
|
|
2691
|
+
/* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
|
|
2679
2692
|
/* @__PURE__ */ s("span", { children: v })
|
|
2680
2693
|
] });
|
|
2681
2694
|
}
|
|
@@ -2683,15 +2696,15 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2683
2696
|
"message-chatbot-indicator",
|
|
2684
2697
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2685
2698
|
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2686
|
-
].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(
|
|
2687
|
-
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(
|
|
2699
|
+
].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Br, { size: l ? 12 : 15 }) });
|
|
2700
|
+
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(te, { children: [
|
|
2688
2701
|
u,
|
|
2689
2702
|
p
|
|
2690
|
-
] }) : /* @__PURE__ */ m(
|
|
2703
|
+
] }) : /* @__PURE__ */ m(te, { children: [
|
|
2691
2704
|
p,
|
|
2692
2705
|
u
|
|
2693
2706
|
] }) });
|
|
2694
|
-
},
|
|
2707
|
+
}, Yr = ({
|
|
2695
2708
|
selected: e,
|
|
2696
2709
|
onVoteUp: t,
|
|
2697
2710
|
onVoteDown: n
|
|
@@ -2707,7 +2720,7 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2707
2720
|
"aria-label": "Good response",
|
|
2708
2721
|
"aria-pressed": e === "up",
|
|
2709
2722
|
"data-tooltip": "Good response",
|
|
2710
|
-
children: /* @__PURE__ */ s(
|
|
2723
|
+
children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
2711
2724
|
}
|
|
2712
2725
|
),
|
|
2713
2726
|
/* @__PURE__ */ s(
|
|
@@ -2721,45 +2734,29 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2721
2734
|
"aria-label": "Bad response",
|
|
2722
2735
|
"aria-pressed": e === "down",
|
|
2723
2736
|
"data-tooltip": "Bad response",
|
|
2724
|
-
children: /* @__PURE__ */ s(
|
|
2737
|
+
children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2725
2738
|
}
|
|
2726
2739
|
)
|
|
2727
|
-
] }),
|
|
2728
|
-
|
|
2729
|
-
"SentMessageDeliveryStatus"
|
|
2730
|
-
);
|
|
2731
|
-
return (e == null ? void 0 : e.id) !== t.id ? null : /* @__PURE__ */ m(ee, { children: [
|
|
2732
|
-
/* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
|
|
2733
|
-
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2734
|
-
] });
|
|
2735
|
-
}, Wr = () => null, Xr = () => /* @__PURE__ */ s(
|
|
2736
|
-
Xs,
|
|
2737
|
-
{
|
|
2738
|
-
MessageSentStatus: Je,
|
|
2739
|
-
MessageDeliveredStatus: Je,
|
|
2740
|
-
MessageReadStatus: Je,
|
|
2741
|
-
MessageSendingStatus: Wr
|
|
2742
|
-
}
|
|
2743
|
-
), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2744
|
-
function _t(e) {
|
|
2740
|
+
] }), qr = /^([a-z][a-z0-9+.-]*):/i, Wr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2741
|
+
function wt(e) {
|
|
2745
2742
|
if (typeof e != "string") return;
|
|
2746
2743
|
const t = e.trim();
|
|
2747
2744
|
if (t === "") return;
|
|
2748
|
-
const n =
|
|
2745
|
+
const n = qr.exec(t);
|
|
2749
2746
|
if (n) {
|
|
2750
2747
|
const a = n[1].toLowerCase();
|
|
2751
|
-
return
|
|
2748
|
+
return Wr.has(a) ? t : void 0;
|
|
2752
2749
|
}
|
|
2753
2750
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2754
2751
|
}
|
|
2755
|
-
const
|
|
2752
|
+
const Xr = {
|
|
2756
2753
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2757
2754
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2758
|
-
},
|
|
2755
|
+
}, Kr = ({ variant: e, cta: t }) => {
|
|
2759
2756
|
const n = k(
|
|
2760
2757
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2761
|
-
|
|
2762
|
-
), a =
|
|
2758
|
+
Xr[e]
|
|
2759
|
+
), a = wt(t.href);
|
|
2763
2760
|
return a ? /* @__PURE__ */ s(
|
|
2764
2761
|
"a",
|
|
2765
2762
|
{
|
|
@@ -2785,13 +2782,13 @@ const Zr = {
|
|
|
2785
2782
|
children: t.label
|
|
2786
2783
|
}
|
|
2787
2784
|
);
|
|
2788
|
-
},
|
|
2785
|
+
}, Jr = {
|
|
2789
2786
|
dark: "text-white",
|
|
2790
2787
|
light: "text-black/90"
|
|
2791
|
-
},
|
|
2788
|
+
}, Zr = "text-white/30", Qr = {
|
|
2792
2789
|
dark: "text-white/55",
|
|
2793
2790
|
light: "text-black/55"
|
|
2794
|
-
},
|
|
2791
|
+
}, _t = ({
|
|
2795
2792
|
variant: e,
|
|
2796
2793
|
title: t,
|
|
2797
2794
|
placeholderTitle: n,
|
|
@@ -2805,10 +2802,10 @@ const Zr = {
|
|
|
2805
2802
|
if (!p && !h && !c && !v) return null;
|
|
2806
2803
|
const b = k(
|
|
2807
2804
|
"truncate text-base font-medium leading-6",
|
|
2808
|
-
d && !t ?
|
|
2805
|
+
d && !t ? Zr : Jr[e]
|
|
2809
2806
|
), f = k(
|
|
2810
2807
|
"truncate text-xs leading-4",
|
|
2811
|
-
|
|
2808
|
+
Qr[e]
|
|
2812
2809
|
);
|
|
2813
2810
|
return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
|
|
2814
2811
|
/* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2824,9 +2821,9 @@ const Zr = {
|
|
|
2824
2821
|
] }),
|
|
2825
2822
|
o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
|
|
2826
2823
|
] }),
|
|
2827
|
-
l && /* @__PURE__ */ s(
|
|
2824
|
+
l && /* @__PURE__ */ s(Kr, { variant: e, cta: l })
|
|
2828
2825
|
] });
|
|
2829
|
-
},
|
|
2826
|
+
}, ei = k(
|
|
2830
2827
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2831
2828
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2832
2829
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2845,7 +2842,7 @@ const Zr = {
|
|
|
2845
2842
|
"data-testid": d
|
|
2846
2843
|
}) => {
|
|
2847
2844
|
const u = n != null || a != null, p = k(
|
|
2848
|
-
|
|
2845
|
+
ei,
|
|
2849
2846
|
o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2850
2847
|
// `focus-ring` is a design-system utility from the component-library
|
|
2851
2848
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2893,17 +2890,17 @@ const Zr = {
|
|
|
2893
2890
|
]
|
|
2894
2891
|
}
|
|
2895
2892
|
);
|
|
2896
|
-
},
|
|
2893
|
+
}, ti = {
|
|
2897
2894
|
dark: "bg-white/10",
|
|
2898
2895
|
light: "bg-black/5"
|
|
2899
|
-
},
|
|
2896
|
+
}, si = {
|
|
2900
2897
|
dark: "size-16 text-white/25",
|
|
2901
2898
|
light: "size-16 text-black/25"
|
|
2902
|
-
}, Ve = (e, t) => !!t && !!e && le(e) === "audio",
|
|
2899
|
+
}, Ve = (e, t) => !!t && !!e && le(e) === "audio", Nt = (e, t) => {
|
|
2903
2900
|
if (!t || !e) return !1;
|
|
2904
2901
|
const n = le(e);
|
|
2905
2902
|
return n === "video" || n === "audio";
|
|
2906
|
-
},
|
|
2903
|
+
}, yt = "bg-[#F2F3F4]", $e = ({
|
|
2907
2904
|
variant: e,
|
|
2908
2905
|
thumbnailUrl: t,
|
|
2909
2906
|
sourceUrl: n,
|
|
@@ -2954,10 +2951,10 @@ const Zr = {
|
|
|
2954
2951
|
{
|
|
2955
2952
|
className: k(
|
|
2956
2953
|
"flex h-full w-full items-center justify-center",
|
|
2957
|
-
|
|
2954
|
+
ti[e]
|
|
2958
2955
|
),
|
|
2959
2956
|
children: we(r, {
|
|
2960
|
-
className:
|
|
2957
|
+
className: si[e],
|
|
2961
2958
|
weight: "regular"
|
|
2962
2959
|
})
|
|
2963
2960
|
}
|
|
@@ -2967,7 +2964,7 @@ const Zr = {
|
|
|
2967
2964
|
]
|
|
2968
2965
|
}
|
|
2969
2966
|
);
|
|
2970
|
-
},
|
|
2967
|
+
}, ni = ({
|
|
2971
2968
|
title: e,
|
|
2972
2969
|
placeholderTitle: t,
|
|
2973
2970
|
description: n,
|
|
@@ -2997,10 +2994,10 @@ const Zr = {
|
|
|
2997
2994
|
onClick: h,
|
|
2998
2995
|
"aria-label": "Edit attachment",
|
|
2999
2996
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3000
|
-
children: /* @__PURE__ */ s(
|
|
2997
|
+
children: /* @__PURE__ */ s(Xn, { className: "size-5", weight: "regular" })
|
|
3001
2998
|
}
|
|
3002
2999
|
) : void 0;
|
|
3003
|
-
return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName:
|
|
3000
|
+
return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3004
3001
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3005
3002
|
$e,
|
|
3006
3003
|
{
|
|
@@ -3029,7 +3026,7 @@ const Zr = {
|
|
|
3029
3026
|
}
|
|
3030
3027
|
),
|
|
3031
3028
|
/* @__PURE__ */ s(
|
|
3032
|
-
|
|
3029
|
+
_t,
|
|
3033
3030
|
{
|
|
3034
3031
|
variant: "dark",
|
|
3035
3032
|
title: e,
|
|
@@ -3044,7 +3041,7 @@ const Zr = {
|
|
|
3044
3041
|
]
|
|
3045
3042
|
}
|
|
3046
3043
|
);
|
|
3047
|
-
},
|
|
3044
|
+
}, ai = ({
|
|
3048
3045
|
title: e,
|
|
3049
3046
|
description: t,
|
|
3050
3047
|
url: n,
|
|
@@ -3056,7 +3053,7 @@ const Zr = {
|
|
|
3056
3053
|
cta: d,
|
|
3057
3054
|
onClick: u
|
|
3058
3055
|
}) => {
|
|
3059
|
-
const p =
|
|
3056
|
+
const p = Nt(a, i), h = wt(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? yt : void 0, w = d && u ? {
|
|
3060
3057
|
...d,
|
|
3061
3058
|
onClick: () => {
|
|
3062
3059
|
var b;
|
|
@@ -3084,7 +3081,7 @@ const Zr = {
|
|
|
3084
3081
|
}
|
|
3085
3082
|
),
|
|
3086
3083
|
/* @__PURE__ */ s(
|
|
3087
|
-
|
|
3084
|
+
_t,
|
|
3088
3085
|
{
|
|
3089
3086
|
variant: "light",
|
|
3090
3087
|
title: e,
|
|
@@ -3097,7 +3094,7 @@ const Zr = {
|
|
|
3097
3094
|
]
|
|
3098
3095
|
}
|
|
3099
3096
|
);
|
|
3100
|
-
},
|
|
3097
|
+
}, ri = ({
|
|
3101
3098
|
title: e,
|
|
3102
3099
|
placeholderTitle: t,
|
|
3103
3100
|
description: n,
|
|
@@ -3110,14 +3107,14 @@ const Zr = {
|
|
|
3110
3107
|
cta: u,
|
|
3111
3108
|
onClick: p
|
|
3112
3109
|
}) => {
|
|
3113
|
-
const h =
|
|
3110
|
+
const h = Nt(r, l), g = wt(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
|
|
3114
3111
|
return /* @__PURE__ */ m(
|
|
3115
3112
|
Oe,
|
|
3116
3113
|
{
|
|
3117
3114
|
variant: "dark",
|
|
3118
3115
|
href: c,
|
|
3119
3116
|
onClick: v,
|
|
3120
|
-
bgClassName: Ve(r, l) ?
|
|
3117
|
+
bgClassName: Ve(r, l) ? yt : void 0,
|
|
3121
3118
|
children: [
|
|
3122
3119
|
o === "featured" && /* @__PURE__ */ s(
|
|
3123
3120
|
$e,
|
|
@@ -3130,7 +3127,7 @@ const Zr = {
|
|
|
3130
3127
|
}
|
|
3131
3128
|
),
|
|
3132
3129
|
/* @__PURE__ */ s(
|
|
3133
|
-
|
|
3130
|
+
_t,
|
|
3134
3131
|
{
|
|
3135
3132
|
variant: "dark",
|
|
3136
3133
|
title: e,
|
|
@@ -3144,22 +3141,22 @@ const Zr = {
|
|
|
3144
3141
|
]
|
|
3145
3142
|
}
|
|
3146
3143
|
);
|
|
3147
|
-
},
|
|
3148
|
-
Composer:
|
|
3149
|
-
Sent:
|
|
3150
|
-
Received:
|
|
3151
|
-
},
|
|
3144
|
+
}, Qt = {
|
|
3145
|
+
Composer: ni,
|
|
3146
|
+
Sent: ri,
|
|
3147
|
+
Received: ai
|
|
3148
|
+
}, ii = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", li = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
|
|
3152
3149
|
function P(e) {
|
|
3153
3150
|
const t = e == null ? void 0 : e.trim();
|
|
3154
3151
|
return t || void 0;
|
|
3155
3152
|
}
|
|
3156
|
-
function
|
|
3153
|
+
function es(e) {
|
|
3157
3154
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3158
3155
|
}
|
|
3159
|
-
function
|
|
3156
|
+
function oi(e, t) {
|
|
3160
3157
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3161
3158
|
return !1;
|
|
3162
|
-
const n =
|
|
3159
|
+
const n = es(e), a = es(t);
|
|
3163
3160
|
if (n === a)
|
|
3164
3161
|
return !0;
|
|
3165
3162
|
if (!n.includes(a))
|
|
@@ -3167,7 +3164,7 @@ function ui(e, t) {
|
|
|
3167
3164
|
const r = n.split(a).join("");
|
|
3168
3165
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3169
3166
|
}
|
|
3170
|
-
function
|
|
3167
|
+
function ts(e) {
|
|
3171
3168
|
const t = P(e.og_scrape_url) ?? P(e.title_link), n = P(e.image_url) ?? P(e.thumb_url), a = P(e.asset_url), r = P(e.mime_type);
|
|
3172
3169
|
return {
|
|
3173
3170
|
title: P(e.title),
|
|
@@ -3177,19 +3174,19 @@ function ss(e) {
|
|
|
3177
3174
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3178
3175
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3179
3176
|
sourceUrl: a,
|
|
3180
|
-
layout: n ||
|
|
3177
|
+
layout: n || Nt(r, a) ? "featured" : "classic",
|
|
3181
3178
|
mimeType: r
|
|
3182
3179
|
};
|
|
3183
3180
|
}
|
|
3184
|
-
function
|
|
3181
|
+
function ci(e) {
|
|
3185
3182
|
var t;
|
|
3186
|
-
return
|
|
3183
|
+
return zs(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
|
|
3187
3184
|
}
|
|
3188
|
-
function
|
|
3185
|
+
function zs(e) {
|
|
3189
3186
|
const t = P(e.og_scrape_url);
|
|
3190
3187
|
return e.type === "link" || !!t && !e.asset_url;
|
|
3191
3188
|
}
|
|
3192
|
-
function
|
|
3189
|
+
function Ps(e) {
|
|
3193
3190
|
if (!(e != null && e.length)) return [];
|
|
3194
3191
|
const t = [], n = (r, i) => {
|
|
3195
3192
|
const l = t[t.length - 1];
|
|
@@ -3207,51 +3204,51 @@ function Fs(e) {
|
|
|
3207
3204
|
t.push({ type: "link", attachments: [r] });
|
|
3208
3205
|
};
|
|
3209
3206
|
for (const r of e) {
|
|
3210
|
-
if (
|
|
3207
|
+
if (zs(r)) {
|
|
3211
3208
|
a(r);
|
|
3212
3209
|
continue;
|
|
3213
3210
|
}
|
|
3214
|
-
const i =
|
|
3211
|
+
const i = ci(r);
|
|
3215
3212
|
i && n(i, r);
|
|
3216
3213
|
}
|
|
3217
3214
|
return t;
|
|
3218
3215
|
}
|
|
3219
|
-
function
|
|
3216
|
+
function di(e) {
|
|
3220
3217
|
let t = 0;
|
|
3221
3218
|
for (const n of e)
|
|
3222
3219
|
t += n.type === "link" ? n.attachments.length : 1;
|
|
3223
3220
|
return t;
|
|
3224
3221
|
}
|
|
3225
|
-
function
|
|
3222
|
+
function ui(e) {
|
|
3226
3223
|
return e.filter((t) => t.type === "media").length;
|
|
3227
3224
|
}
|
|
3228
|
-
function
|
|
3225
|
+
function mi(e, t, n) {
|
|
3229
3226
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3230
3227
|
}
|
|
3231
|
-
function
|
|
3228
|
+
function ss(e) {
|
|
3232
3229
|
return P(e.image_url) ?? P(e.asset_url) ?? "";
|
|
3233
3230
|
}
|
|
3234
|
-
function
|
|
3231
|
+
function hi(e) {
|
|
3235
3232
|
switch (e) {
|
|
3236
3233
|
case "image":
|
|
3237
|
-
return
|
|
3234
|
+
return Ne.Image;
|
|
3238
3235
|
case "video":
|
|
3239
|
-
return
|
|
3236
|
+
return Ne.Video;
|
|
3240
3237
|
case "audio":
|
|
3241
|
-
return
|
|
3238
|
+
return Ne.Audio;
|
|
3242
3239
|
case "pdf":
|
|
3243
|
-
return
|
|
3240
|
+
return Ne.Pdf;
|
|
3244
3241
|
default:
|
|
3245
|
-
return
|
|
3242
|
+
return Ne.File;
|
|
3246
3243
|
}
|
|
3247
3244
|
}
|
|
3248
|
-
function
|
|
3245
|
+
function fi(e, t) {
|
|
3249
3246
|
if (t.length > 1)
|
|
3250
3247
|
switch (e) {
|
|
3251
3248
|
case "image":
|
|
3252
3249
|
return {
|
|
3253
3250
|
items: t.map((a) => ({
|
|
3254
|
-
src:
|
|
3251
|
+
src: ss(a),
|
|
3255
3252
|
alt: P(a.title)
|
|
3256
3253
|
}))
|
|
3257
3254
|
};
|
|
@@ -3302,7 +3299,7 @@ function bi(e, t) {
|
|
|
3302
3299
|
switch (e) {
|
|
3303
3300
|
case "image":
|
|
3304
3301
|
return {
|
|
3305
|
-
src:
|
|
3302
|
+
src: ss(n),
|
|
3306
3303
|
alt: P(n.title)
|
|
3307
3304
|
};
|
|
3308
3305
|
case "video":
|
|
@@ -3332,48 +3329,48 @@ function bi(e, t) {
|
|
|
3332
3329
|
};
|
|
3333
3330
|
}
|
|
3334
3331
|
}
|
|
3335
|
-
function
|
|
3332
|
+
function gi({
|
|
3336
3333
|
groupPosition: e,
|
|
3337
3334
|
isMyMessage: t,
|
|
3338
3335
|
segment: n,
|
|
3339
3336
|
text: a
|
|
3340
3337
|
}) {
|
|
3341
|
-
const r =
|
|
3342
|
-
...
|
|
3338
|
+
const r = hi(n.kind), i = {
|
|
3339
|
+
...fi(n.kind, n.attachments),
|
|
3343
3340
|
groupPosition: e,
|
|
3344
3341
|
...a ? { text: a } : {}
|
|
3345
3342
|
};
|
|
3346
3343
|
return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
|
|
3347
3344
|
}
|
|
3348
|
-
const
|
|
3345
|
+
const pi = ({
|
|
3349
3346
|
groupPosition: e,
|
|
3350
3347
|
isMyMessage: t,
|
|
3351
3348
|
message: n
|
|
3352
3349
|
}) => {
|
|
3353
3350
|
var w;
|
|
3354
|
-
const a =
|
|
3351
|
+
const a = Ps(n.attachments);
|
|
3355
3352
|
if (a.length === 0) return null;
|
|
3356
|
-
const r =
|
|
3353
|
+
const r = di(a), i = ui(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ts(o.attachments[0] ?? {}).url : void 0, u = l && oi(l, d) ? void 0 : l;
|
|
3357
3354
|
let p = 0, h = 0;
|
|
3358
3355
|
const g = [], c = (b, f) => {
|
|
3359
3356
|
const x = p === r - 1;
|
|
3360
3357
|
p += 1;
|
|
3361
|
-
const N = t ?
|
|
3358
|
+
const N = t ? Qt.Sent : Qt.Received;
|
|
3362
3359
|
g.push(
|
|
3363
3360
|
/* @__PURE__ */ m(U.Fragment, { children: [
|
|
3364
|
-
/* @__PURE__ */ s(N, { ...
|
|
3365
|
-
x && u ? /* @__PURE__ */ s("div", { className: t ?
|
|
3361
|
+
/* @__PURE__ */ s(N, { ...ts(b) }),
|
|
3362
|
+
x && u ? /* @__PURE__ */ s("div", { className: t ? ii : li, children: u }) : null
|
|
3366
3363
|
] }, f)
|
|
3367
3364
|
);
|
|
3368
3365
|
}, v = (b, f) => {
|
|
3369
|
-
const x = p === r - 1, N =
|
|
3366
|
+
const x = p === r - 1, N = mi(
|
|
3370
3367
|
h,
|
|
3371
3368
|
i,
|
|
3372
3369
|
e
|
|
3373
3370
|
);
|
|
3374
3371
|
p += 1, h += 1, g.push(
|
|
3375
3372
|
/* @__PURE__ */ s(
|
|
3376
|
-
|
|
3373
|
+
gi,
|
|
3377
3374
|
{
|
|
3378
3375
|
groupPosition: N,
|
|
3379
3376
|
isMyMessage: t,
|
|
@@ -3392,9 +3389,9 @@ const xi = ({
|
|
|
3392
3389
|
return;
|
|
3393
3390
|
}
|
|
3394
3391
|
v(b, `media-${f}`);
|
|
3395
|
-
}), /* @__PURE__ */ s(
|
|
3396
|
-
},
|
|
3397
|
-
var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut
|
|
3392
|
+
}), /* @__PURE__ */ s(te, { children: g });
|
|
3393
|
+
}, bi = (e) => {
|
|
3394
|
+
var Tt, At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut;
|
|
3398
3395
|
const {
|
|
3399
3396
|
additionalMessageInputProps: t,
|
|
3400
3397
|
chatbotVotingEnabled: n,
|
|
@@ -3412,52 +3409,52 @@ const xi = ({
|
|
|
3412
3409
|
renderText: v,
|
|
3413
3410
|
threadList: w,
|
|
3414
3411
|
viewerLanguage: b
|
|
3415
|
-
} = e, { client: f } = me("CustomMessage"), { channel: x } = ue("CustomMessage"), { isUnlocking: N, onUnlockClick:
|
|
3416
|
-
Attachment:
|
|
3417
|
-
EditMessageModal: C =
|
|
3412
|
+
} = e, { client: f } = me("CustomMessage"), { channel: x } = ue("CustomMessage"), { isUnlocking: N, onUnlockClick: E, onFetchSource: T, onDownloadClick: M } = $r("LockedAttachment"), [D, L] = B(!1), O = Xs(c.id), { selected: z, voteUp: y, voteDown: A } = ba(c), {
|
|
3413
|
+
Attachment: S = Ks,
|
|
3414
|
+
EditMessageModal: C = Js,
|
|
3418
3415
|
MessageActions: I,
|
|
3419
|
-
MessageBlocked: $ =
|
|
3420
|
-
MessageBouncePrompt: F =
|
|
3421
|
-
MessageDeleted: V =
|
|
3422
|
-
MessageIsThreadReplyInChannelButtonIndicator: Q =
|
|
3423
|
-
MessageRepliesCountButton:
|
|
3424
|
-
ReminderNotification: X =
|
|
3425
|
-
StreamedMessageText: _ =
|
|
3416
|
+
MessageBlocked: $ = Zs,
|
|
3417
|
+
MessageBouncePrompt: F = Qs,
|
|
3418
|
+
MessageDeleted: V = en,
|
|
3419
|
+
MessageIsThreadReplyInChannelButtonIndicator: Q = tn,
|
|
3420
|
+
MessageRepliesCountButton: ee = sn,
|
|
3421
|
+
ReminderNotification: X = nn,
|
|
3422
|
+
StreamedMessageText: _ = an,
|
|
3426
3423
|
PinIndicator: R
|
|
3427
|
-
} =
|
|
3424
|
+
} = rs("CustomMessage"), H = rn(c), q = ln(c), Y = ae(
|
|
3428
3425
|
() => h == null ? void 0 : h(c),
|
|
3429
3426
|
[h, c]
|
|
3430
3427
|
), j = ae(() => {
|
|
3431
3428
|
const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
|
|
3432
3429
|
if (!Fe(c)) return pe;
|
|
3433
|
-
const
|
|
3434
|
-
return
|
|
3430
|
+
const Vt = pe.filter((Gt) => !("type" in Gt) || !xs(Gt));
|
|
3431
|
+
return Vt.length === pe.length ? pe : Vt;
|
|
3435
3432
|
}, [c]), W = ae(
|
|
3436
|
-
() =>
|
|
3433
|
+
() => Ps(j),
|
|
3437
3434
|
[j]
|
|
3438
3435
|
), Z = ae(() => {
|
|
3439
|
-
const de =
|
|
3436
|
+
const de = ms({ message: c, viewerLanguage: b });
|
|
3440
3437
|
return de === c.text ? c : { ...c, text: de };
|
|
3441
3438
|
}, [c, b]), oe = W.length > 0, Le = W.reduce(
|
|
3442
3439
|
(de, pe) => de + pe.attachments.length,
|
|
3443
3440
|
0
|
|
3444
|
-
) === ((j == null ? void 0 : j.length) ?? 0), De =
|
|
3441
|
+
) === ((j == null ? void 0 : j.length) ?? 0), De = qa(
|
|
3445
3442
|
{
|
|
3446
3443
|
endOfGroup: r,
|
|
3447
3444
|
firstOfGroup: i,
|
|
3448
3445
|
groupedByUser: l
|
|
3449
3446
|
}
|
|
3450
3447
|
);
|
|
3451
|
-
if (
|
|
3448
|
+
if (on(c))
|
|
3452
3449
|
return null;
|
|
3453
3450
|
if (c.deleted_at || c.type === "deleted")
|
|
3454
3451
|
return /* @__PURE__ */ s(V, { message: c });
|
|
3455
|
-
if (
|
|
3452
|
+
if (cn(c))
|
|
3456
3453
|
return /* @__PURE__ */ s($, {});
|
|
3457
|
-
const ne = !w && !!c.reply_count, ce = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((
|
|
3454
|
+
const ne = !w && !!c.reply_count, ce = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Tt = c.error) == null ? void 0 : Tt.status) !== 403, Ct = dn(c);
|
|
3458
3455
|
let he;
|
|
3459
|
-
ie ? he = () => u(c) :
|
|
3460
|
-
const fe = g(),
|
|
3456
|
+
ie ? he = () => u(c) : Ct && (he = () => L(!0));
|
|
3457
|
+
const fe = g(), Bs = k(
|
|
3461
3458
|
"str-chat__message str-chat__message-simple",
|
|
3462
3459
|
`str-chat__message--${c.type}`,
|
|
3463
3460
|
`str-chat__message--${c.status}`,
|
|
@@ -3468,14 +3465,14 @@ const xi = ({
|
|
|
3468
3465
|
"str-chat__message--highlighted": p,
|
|
3469
3466
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3470
3467
|
"str-chat__message--with-reactions": q,
|
|
3471
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
3468
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((At = c == null ? void 0 : c.error) == null ? void 0 : At.status) !== 403,
|
|
3472
3469
|
"str-chat__message-with-thread-link": ne || ce,
|
|
3473
3470
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3474
3471
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3475
3472
|
"str-chat__virtual-message__wrapper--group": l
|
|
3476
3473
|
}
|
|
3477
|
-
), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et =
|
|
3478
|
-
return /* @__PURE__ */ m(
|
|
3474
|
+
), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Hr(c), ge = Fe(c), St = Gr(c), He = !!(j != null && j.length && !c.quoted_message), It = ge && fe && He, Us = oe && Le && !c.quoted_message && !Ge && !Y && !ge;
|
|
3475
|
+
return /* @__PURE__ */ m(te, { children: [
|
|
3479
3476
|
a && /* @__PURE__ */ s(
|
|
3480
3477
|
C,
|
|
3481
3478
|
{
|
|
@@ -3483,7 +3480,7 @@ const xi = ({
|
|
|
3483
3480
|
}
|
|
3484
3481
|
),
|
|
3485
3482
|
D && /* @__PURE__ */ s(
|
|
3486
|
-
|
|
3483
|
+
un,
|
|
3487
3484
|
{
|
|
3488
3485
|
MessageBouncePrompt: F,
|
|
3489
3486
|
onClose: () => L(!1),
|
|
@@ -3493,7 +3490,7 @@ const xi = ({
|
|
|
3493
3490
|
/* @__PURE__ */ m(
|
|
3494
3491
|
"div",
|
|
3495
3492
|
{
|
|
3496
|
-
className:
|
|
3493
|
+
className: Bs,
|
|
3497
3494
|
"data-message-id": c.id,
|
|
3498
3495
|
"data-dd-privacy": "mask",
|
|
3499
3496
|
children: [
|
|
@@ -3515,7 +3512,7 @@ const xi = ({
|
|
|
3515
3512
|
"div",
|
|
3516
3513
|
{
|
|
3517
3514
|
className: k("str-chat__message-inner", {
|
|
3518
|
-
"str-chat__simple-message--error-failed": ie ||
|
|
3515
|
+
"str-chat__simple-message--error-failed": ie || Ct
|
|
3519
3516
|
}),
|
|
3520
3517
|
"data-testid": "message-inner",
|
|
3521
3518
|
onClick: he,
|
|
@@ -3528,34 +3525,34 @@ const xi = ({
|
|
|
3528
3525
|
marginInlineEnd: 0,
|
|
3529
3526
|
marginInlineStart: 0
|
|
3530
3527
|
},
|
|
3531
|
-
children:
|
|
3528
|
+
children: St ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3532
3529
|
fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
3533
3530
|
I && /* @__PURE__ */ s(I, {}),
|
|
3534
3531
|
/* @__PURE__ */ s(
|
|
3535
|
-
|
|
3532
|
+
Jt.Sent,
|
|
3536
3533
|
{
|
|
3537
|
-
title: (
|
|
3538
|
-
mimeType: (
|
|
3539
|
-
thumbnailUrl: (
|
|
3540
|
-
amountText: (
|
|
3541
|
-
detail: (
|
|
3542
|
-
paymentStatus: (
|
|
3543
|
-
onPreviewClick: () =>
|
|
3534
|
+
title: (Mt = c.metadata) == null ? void 0 : Mt.attachment_title,
|
|
3535
|
+
mimeType: (Rt = c.metadata) == null ? void 0 : Rt.attachment_mime_type,
|
|
3536
|
+
thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
|
|
3537
|
+
amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
|
|
3538
|
+
detail: (zt = c.metadata) == null ? void 0 : zt.attachment_detail,
|
|
3539
|
+
paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
|
|
3540
|
+
onPreviewClick: () => E == null ? void 0 : E(c, x),
|
|
3544
3541
|
onFetchSource: async () => await (T == null ? void 0 : T(c, x))
|
|
3545
3542
|
}
|
|
3546
3543
|
)
|
|
3547
3544
|
] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
3548
3545
|
/* @__PURE__ */ s(
|
|
3549
|
-
|
|
3546
|
+
Jt.Received,
|
|
3550
3547
|
{
|
|
3551
|
-
title: (
|
|
3552
|
-
mimeType: (
|
|
3553
|
-
thumbnailUrl: (
|
|
3554
|
-
amountText: (
|
|
3555
|
-
detail: (
|
|
3556
|
-
paymentStatus: (
|
|
3548
|
+
title: (Ft = c.metadata) == null ? void 0 : Ft.attachment_title,
|
|
3549
|
+
mimeType: (Ot = c.metadata) == null ? void 0 : Ot.attachment_mime_type,
|
|
3550
|
+
thumbnailUrl: ($t = c.metadata) == null ? void 0 : $t.attachment_thumbnail,
|
|
3551
|
+
amountText: (jt = c.metadata) == null ? void 0 : jt.amount_text,
|
|
3552
|
+
detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
|
|
3553
|
+
paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
|
|
3557
3554
|
isUnlocking: N(c.id),
|
|
3558
|
-
onUnlockClick: () =>
|
|
3555
|
+
onUnlockClick: () => E == null ? void 0 : E(c, x),
|
|
3559
3556
|
onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
|
|
3560
3557
|
onDownloadClick: () => M == null ? void 0 : M(c, x)
|
|
3561
3558
|
}
|
|
@@ -3563,7 +3560,7 @@ const xi = ({
|
|
|
3563
3560
|
I && /* @__PURE__ */ s(I, {})
|
|
3564
3561
|
] }),
|
|
3565
3562
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
3566
|
-
|
|
3563
|
+
Yt,
|
|
3567
3564
|
{
|
|
3568
3565
|
message: Z,
|
|
3569
3566
|
renderText: v
|
|
@@ -3572,7 +3569,7 @@ const xi = ({
|
|
|
3572
3569
|
] }) : Et ? (
|
|
3573
3570
|
/* Tip-only messages render as a standalone bubble */
|
|
3574
3571
|
/* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
|
|
3575
|
-
) :
|
|
3572
|
+
) : Us ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
|
|
3576
3573
|
"div",
|
|
3577
3574
|
{
|
|
3578
3575
|
className: "str-chat__message-bubble",
|
|
@@ -3584,7 +3581,7 @@ const xi = ({
|
|
|
3584
3581
|
},
|
|
3585
3582
|
children: [
|
|
3586
3583
|
/* @__PURE__ */ s(
|
|
3587
|
-
|
|
3584
|
+
pi,
|
|
3588
3585
|
{
|
|
3589
3586
|
groupPosition: De,
|
|
3590
3587
|
isMyMessage: fe,
|
|
@@ -3594,11 +3591,11 @@ const xi = ({
|
|
|
3594
3591
|
}
|
|
3595
3592
|
}
|
|
3596
3593
|
),
|
|
3597
|
-
/* @__PURE__ */ s(
|
|
3594
|
+
/* @__PURE__ */ s(qt, {})
|
|
3598
3595
|
]
|
|
3599
3596
|
}
|
|
3600
3597
|
) }) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
|
|
3601
|
-
ge && !
|
|
3598
|
+
ge && !It && /* @__PURE__ */ s(
|
|
3602
3599
|
Ke,
|
|
3603
3600
|
{
|
|
3604
3601
|
message: c,
|
|
@@ -3606,9 +3603,9 @@ const xi = ({
|
|
|
3606
3603
|
isMyMessage: fe
|
|
3607
3604
|
}
|
|
3608
3605
|
),
|
|
3609
|
-
Ge && /* @__PURE__ */ s(
|
|
3606
|
+
Ge && /* @__PURE__ */ s(mn, { poll: Ge }),
|
|
3610
3607
|
j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3611
|
-
|
|
3608
|
+
S,
|
|
3612
3609
|
{
|
|
3613
3610
|
actionHandler: o,
|
|
3614
3611
|
attachments: j
|
|
@@ -3621,18 +3618,18 @@ const xi = ({
|
|
|
3621
3618
|
renderText: v
|
|
3622
3619
|
}
|
|
3623
3620
|
) : /* @__PURE__ */ s(
|
|
3624
|
-
|
|
3621
|
+
Yt,
|
|
3625
3622
|
{
|
|
3626
3623
|
message: Z,
|
|
3627
3624
|
renderText: v
|
|
3628
3625
|
}
|
|
3629
3626
|
),
|
|
3630
|
-
/* @__PURE__ */ s(
|
|
3627
|
+
/* @__PURE__ */ s(qt, {})
|
|
3631
3628
|
] }) })
|
|
3632
3629
|
}
|
|
3633
3630
|
),
|
|
3634
|
-
!
|
|
3635
|
-
(!ge ||
|
|
3631
|
+
!St && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
|
|
3632
|
+
(!ge || It) && /* @__PURE__ */ s(
|
|
3636
3633
|
Ke,
|
|
3637
3634
|
{
|
|
3638
3635
|
message: c,
|
|
@@ -3641,7 +3638,7 @@ const xi = ({
|
|
|
3641
3638
|
}
|
|
3642
3639
|
),
|
|
3643
3640
|
n && ge && /* @__PURE__ */ s(
|
|
3644
|
-
|
|
3641
|
+
Yr,
|
|
3645
3642
|
{
|
|
3646
3643
|
selected: z,
|
|
3647
3644
|
onVoteUp: y,
|
|
@@ -3649,9 +3646,9 @@ const xi = ({
|
|
|
3649
3646
|
}
|
|
3650
3647
|
)
|
|
3651
3648
|
] }),
|
|
3652
|
-
/* @__PURE__ */ s(
|
|
3649
|
+
/* @__PURE__ */ s(jr, { message: c, endOfGroup: r }),
|
|
3653
3650
|
ne && /* @__PURE__ */ s(
|
|
3654
|
-
|
|
3651
|
+
ee,
|
|
3655
3652
|
{
|
|
3656
3653
|
onClick: d,
|
|
3657
3654
|
reply_count: c.reply_count
|
|
@@ -3663,53 +3660,50 @@ const xi = ({
|
|
|
3663
3660
|
c.id
|
|
3664
3661
|
)
|
|
3665
3662
|
] });
|
|
3666
|
-
},
|
|
3667
|
-
|
|
3668
|
-
(e, t) =>
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
}
|
|
3672
|
-
|
|
3673
|
-
const t = _e("CustomMessage");
|
|
3674
|
-
return /* @__PURE__ */ s(_i, { ...t, ...e });
|
|
3675
|
-
}, yi = () => {
|
|
3663
|
+
}, vi = U.memo(
|
|
3664
|
+
bi,
|
|
3665
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ws(e, t)
|
|
3666
|
+
), xi = (e) => {
|
|
3667
|
+
const t = Ie("CustomMessage");
|
|
3668
|
+
return /* @__PURE__ */ s(vi, { ...t, ...e });
|
|
3669
|
+
}, wi = () => {
|
|
3676
3670
|
var n;
|
|
3677
|
-
const { handleDelete: e, message: t } =
|
|
3671
|
+
const { handleDelete: e, message: t } = Ie("CustomMessageActions");
|
|
3678
3672
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
3679
|
-
|
|
3673
|
+
cs,
|
|
3680
3674
|
{
|
|
3681
3675
|
onClick: e,
|
|
3682
3676
|
"aria-label": "Delete",
|
|
3683
3677
|
title: "Delete",
|
|
3684
3678
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3685
|
-
children: /* @__PURE__ */ s(
|
|
3679
|
+
children: /* @__PURE__ */ s(Kn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3686
3680
|
}
|
|
3687
3681
|
);
|
|
3688
|
-
},
|
|
3689
|
-
const { handleFlag: e } =
|
|
3682
|
+
}, _i = () => {
|
|
3683
|
+
const { handleFlag: e } = Ie("CustomMessageActions");
|
|
3690
3684
|
return /* @__PURE__ */ s(
|
|
3691
|
-
|
|
3685
|
+
cs,
|
|
3692
3686
|
{
|
|
3693
3687
|
onClick: e,
|
|
3694
3688
|
"aria-label": "Report",
|
|
3695
3689
|
title: "Report",
|
|
3696
3690
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3697
|
-
children: /* @__PURE__ */ s(
|
|
3691
|
+
children: /* @__PURE__ */ s(is, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3698
3692
|
}
|
|
3699
3693
|
);
|
|
3700
|
-
},
|
|
3694
|
+
}, Ni = () => {
|
|
3701
3695
|
var t;
|
|
3702
|
-
const { message: e } =
|
|
3696
|
+
const { message: e } = Ie("CustomMessageActions");
|
|
3703
3697
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
|
|
3704
|
-
|
|
3698
|
+
Qn,
|
|
3705
3699
|
{
|
|
3706
3700
|
messageActionSet: [
|
|
3707
|
-
{ Component:
|
|
3708
|
-
{ Component:
|
|
3701
|
+
{ Component: wi, placement: "quick", type: "delete" },
|
|
3702
|
+
{ Component: _i, placement: "quick", type: "flag" }
|
|
3709
3703
|
]
|
|
3710
3704
|
}
|
|
3711
3705
|
);
|
|
3712
|
-
},
|
|
3706
|
+
}, yi = ({
|
|
3713
3707
|
link: e,
|
|
3714
3708
|
onDismiss: t
|
|
3715
3709
|
}) => {
|
|
@@ -3749,14 +3743,14 @@ const xi = ({
|
|
|
3749
3743
|
]
|
|
3750
3744
|
}
|
|
3751
3745
|
);
|
|
3752
|
-
},
|
|
3746
|
+
}, ki = (e) => ({
|
|
3753
3747
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3754
|
-
(t) =>
|
|
3748
|
+
(t) => Ht.previewIsLoaded(t) || Ht.previewIsLoading(t)
|
|
3755
3749
|
)
|
|
3756
|
-
}),
|
|
3757
|
-
const { linkPreviewsManager: e } =
|
|
3750
|
+
}), Ci = () => {
|
|
3751
|
+
const { linkPreviewsManager: e } = hn(), { linkPreviews: t } = fn(
|
|
3758
3752
|
e.state,
|
|
3759
|
-
|
|
3753
|
+
ki
|
|
3760
3754
|
), n = (r) => {
|
|
3761
3755
|
e.dismissPreview(r);
|
|
3762
3756
|
};
|
|
@@ -3769,9 +3763,9 @@ const xi = ({
|
|
|
3769
3763
|
// block so it keeps its intrinsic height and the container scrolls — a
|
|
3770
3764
|
// bare flex-column child would be shrunk on the column axis and its
|
|
3771
3765
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3772
|
-
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(
|
|
3766
|
+
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(yi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3773
3767
|
) : null;
|
|
3774
|
-
},
|
|
3768
|
+
}, kt = U.createContext(!1), dl = () => Se(kt), Ei = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3775
3769
|
"button",
|
|
3776
3770
|
{
|
|
3777
3771
|
...n,
|
|
@@ -3779,13 +3773,13 @@ const xi = ({
|
|
|
3779
3773
|
"aria-label": "Send",
|
|
3780
3774
|
disabled: t,
|
|
3781
3775
|
onClick: e,
|
|
3782
|
-
children: /* @__PURE__ */ s(
|
|
3776
|
+
children: /* @__PURE__ */ s(Jn, { weight: "bold", className: "size-4" })
|
|
3783
3777
|
}
|
|
3784
|
-
),
|
|
3785
|
-
const e =
|
|
3786
|
-
SendButton: r =
|
|
3787
|
-
AttachmentPreviewList: i =
|
|
3788
|
-
} =
|
|
3778
|
+
), Si = () => {
|
|
3779
|
+
const e = Se(kt), { handleSubmit: t } = pn(), n = bn(), a = e || !n, {
|
|
3780
|
+
SendButton: r = Ei,
|
|
3781
|
+
AttachmentPreviewList: i = vn
|
|
3782
|
+
} = rs("CustomMessageInput");
|
|
3789
3783
|
return (
|
|
3790
3784
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
3791
3785
|
// preview list inside is the scrollable region); the textarea + send row
|
|
@@ -3801,12 +3795,12 @@ const xi = ({
|
|
|
3801
3795
|
className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch 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)]",
|
|
3802
3796
|
"data-dd-privacy": "mask",
|
|
3803
3797
|
children: [
|
|
3804
|
-
/* @__PURE__ */ s(
|
|
3805
|
-
/* @__PURE__ */ s(
|
|
3798
|
+
/* @__PURE__ */ s(xn, {}),
|
|
3799
|
+
/* @__PURE__ */ s(Ci, {}),
|
|
3806
3800
|
/* @__PURE__ */ s(i, {}),
|
|
3807
3801
|
/* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
|
|
3808
3802
|
/* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
|
|
3809
|
-
|
|
3803
|
+
wn,
|
|
3810
3804
|
{
|
|
3811
3805
|
"aria-disabled": e || void 0,
|
|
3812
3806
|
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
@@ -3832,7 +3826,7 @@ const xi = ({
|
|
|
3832
3826
|
}
|
|
3833
3827
|
)
|
|
3834
3828
|
);
|
|
3835
|
-
},
|
|
3829
|
+
}, Ii = ({
|
|
3836
3830
|
renderActions: e,
|
|
3837
3831
|
renderFooter: t,
|
|
3838
3832
|
disabled: n = !1,
|
|
@@ -3841,7 +3835,7 @@ const xi = ({
|
|
|
3841
3835
|
}) => {
|
|
3842
3836
|
var o;
|
|
3843
3837
|
const { channel: i } = ue(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
|
|
3844
|
-
return n ? /* @__PURE__ */ m(
|
|
3838
|
+
return n ? /* @__PURE__ */ m(te, { children: [
|
|
3845
3839
|
/* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
3846
3840
|
t == null ? void 0 : t()
|
|
3847
3841
|
] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
@@ -3853,67 +3847,67 @@ const xi = ({
|
|
|
3853
3847
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3854
3848
|
children: [
|
|
3855
3849
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3856
|
-
/* @__PURE__ */ s(
|
|
3850
|
+
/* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(gn, { Input: r ?? Si }) })
|
|
3857
3851
|
]
|
|
3858
3852
|
}
|
|
3859
3853
|
),
|
|
3860
3854
|
t == null ? void 0 : t()
|
|
3861
3855
|
] });
|
|
3862
|
-
},
|
|
3856
|
+
}, Ti = [
|
|
3863
3857
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
3864
3858
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
3865
|
-
],
|
|
3859
|
+
], Ai = {
|
|
3866
3860
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
3867
3861
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
3868
|
-
},
|
|
3862
|
+
}, Mi = [
|
|
3869
3863
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
3870
|
-
],
|
|
3864
|
+
], Ri = {
|
|
3871
3865
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
3872
|
-
},
|
|
3866
|
+
}, Je = "age safety guidelines.", Li = "https://linktr.ee/s/about/contact", ns = (e) => Ti.includes(e), Di = (e) => Mi.includes(e), zi = (e) => {
|
|
3873
3867
|
var a;
|
|
3874
3868
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
3875
|
-
if (
|
|
3869
|
+
if (ns(t))
|
|
3876
3870
|
return {
|
|
3877
3871
|
kind: "dm-agent",
|
|
3878
3872
|
type: t
|
|
3879
3873
|
};
|
|
3880
|
-
if (
|
|
3874
|
+
if (Di(t))
|
|
3881
3875
|
return {
|
|
3882
3876
|
kind: "age-safety",
|
|
3883
3877
|
type: t
|
|
3884
3878
|
};
|
|
3885
3879
|
const n = e.dm_agent_system_type;
|
|
3886
|
-
if (
|
|
3880
|
+
if (ns(n))
|
|
3887
3881
|
return {
|
|
3888
3882
|
kind: "dm-agent",
|
|
3889
3883
|
type: n
|
|
3890
3884
|
};
|
|
3891
|
-
},
|
|
3892
|
-
const t = e.indexOf(
|
|
3885
|
+
}, Pi = (e) => {
|
|
3886
|
+
const t = e.indexOf(Je);
|
|
3893
3887
|
if (t === -1)
|
|
3894
3888
|
return e;
|
|
3895
|
-
const n = t +
|
|
3896
|
-
return /* @__PURE__ */ m(
|
|
3889
|
+
const n = t + Je.length;
|
|
3890
|
+
return /* @__PURE__ */ m(te, { children: [
|
|
3897
3891
|
e.slice(0, t),
|
|
3898
3892
|
/* @__PURE__ */ s(
|
|
3899
3893
|
"a",
|
|
3900
3894
|
{
|
|
3901
|
-
href:
|
|
3895
|
+
href: Li,
|
|
3902
3896
|
target: "_blank",
|
|
3903
3897
|
rel: "noopener noreferrer",
|
|
3904
3898
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
3905
|
-
children:
|
|
3899
|
+
children: Je
|
|
3906
3900
|
}
|
|
3907
3901
|
),
|
|
3908
3902
|
e.slice(n)
|
|
3909
3903
|
] });
|
|
3910
|
-
},
|
|
3904
|
+
}, Fi = (e) => {
|
|
3911
3905
|
var a, r;
|
|
3912
|
-
const t = e.message.hide_date === !0, n =
|
|
3906
|
+
const t = e.message.hide_date === !0, n = zi(
|
|
3913
3907
|
e.message
|
|
3914
3908
|
);
|
|
3915
3909
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
3916
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
3910
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
|
|
3917
3911
|
return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3918
3912
|
/* @__PURE__ */ m(
|
|
3919
3913
|
"div",
|
|
@@ -3939,7 +3933,7 @@ const xi = ({
|
|
|
3939
3933
|
] });
|
|
3940
3934
|
}
|
|
3941
3935
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
3942
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
3936
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ri[n.type];
|
|
3943
3937
|
return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3944
3938
|
/* @__PURE__ */ m(
|
|
3945
3939
|
"div",
|
|
@@ -3949,7 +3943,7 @@ const xi = ({
|
|
|
3949
3943
|
"data-age-safety-system-type": n.type,
|
|
3950
3944
|
children: [
|
|
3951
3945
|
/* @__PURE__ */ s(
|
|
3952
|
-
|
|
3946
|
+
Zn,
|
|
3953
3947
|
{
|
|
3954
3948
|
size: 24,
|
|
3955
3949
|
weight: "duotone",
|
|
@@ -3958,7 +3952,7 @@ const xi = ({
|
|
|
3958
3952
|
"data-testid": "age-safety-system-message-icon"
|
|
3959
3953
|
}
|
|
3960
3954
|
),
|
|
3961
|
-
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("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:
|
|
3955
|
+
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("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: Pi(i) }) })
|
|
3962
3956
|
]
|
|
3963
3957
|
}
|
|
3964
3958
|
),
|
|
@@ -3973,7 +3967,7 @@ const xi = ({
|
|
|
3973
3967
|
] }),
|
|
3974
3968
|
!t && /* @__PURE__ */ s(Ye, { message: e.message })
|
|
3975
3969
|
] });
|
|
3976
|
-
},
|
|
3970
|
+
}, Fs = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
3977
3971
|
"animateTransform",
|
|
3978
3972
|
{
|
|
3979
3973
|
attributeName: "transform",
|
|
@@ -3983,17 +3977,17 @@ const xi = ({
|
|
|
3983
3977
|
begin: `${120 * t}ms`,
|
|
3984
3978
|
repeatCount: "indefinite"
|
|
3985
3979
|
}
|
|
3986
|
-
) }),
|
|
3980
|
+
) }), Oi = /* @__PURE__ */ new Set([
|
|
3987
3981
|
qe.Thinking,
|
|
3988
3982
|
qe.Generating,
|
|
3989
3983
|
qe.ExternalSources
|
|
3990
|
-
]),
|
|
3984
|
+
]), $i = ({ threadList: e }) => {
|
|
3991
3985
|
var v, w;
|
|
3992
|
-
const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } =
|
|
3993
|
-
if (!e && o &&
|
|
3994
|
-
const b =
|
|
3986
|
+
const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = _n(), { aiState: l } = Nn(t), o = Se(Fs);
|
|
3987
|
+
if (!e && o && Oi.has(l)) {
|
|
3988
|
+
const b = ji(t, (v = r.user) == null ? void 0 : v.id);
|
|
3995
3989
|
return /* @__PURE__ */ s(
|
|
3996
|
-
|
|
3990
|
+
as,
|
|
3997
3991
|
{
|
|
3998
3992
|
avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
|
|
3999
3993
|
avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
|
|
@@ -4019,7 +4013,7 @@ const xi = ({
|
|
|
4019
4013
|
return null;
|
|
4020
4014
|
const g = (w = h[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4021
4015
|
return /* @__PURE__ */ s(
|
|
4022
|
-
|
|
4016
|
+
as,
|
|
4023
4017
|
{
|
|
4024
4018
|
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4025
4019
|
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
@@ -4027,7 +4021,7 @@ const xi = ({
|
|
|
4027
4021
|
testId: "typing-indicator"
|
|
4028
4022
|
}
|
|
4029
4023
|
);
|
|
4030
|
-
},
|
|
4024
|
+
}, as = ({
|
|
4031
4025
|
avatarId: e,
|
|
4032
4026
|
avatarName: t,
|
|
4033
4027
|
avatarImage: n,
|
|
@@ -4062,16 +4056,16 @@ const xi = ({
|
|
|
4062
4056
|
height: "13",
|
|
4063
4057
|
overflow: "visible",
|
|
4064
4058
|
children: [
|
|
4065
|
-
/* @__PURE__ */ s(
|
|
4066
|
-
/* @__PURE__ */ s(
|
|
4067
|
-
/* @__PURE__ */ s(
|
|
4059
|
+
/* @__PURE__ */ s(Ze, { cx: "4", index: 0 }),
|
|
4060
|
+
/* @__PURE__ */ s(Ze, { cx: "16", index: 1 }),
|
|
4061
|
+
/* @__PURE__ */ s(Ze, { cx: "28", index: 2 })
|
|
4068
4062
|
]
|
|
4069
4063
|
}
|
|
4070
4064
|
) }) }) }) }) })
|
|
4071
4065
|
] })
|
|
4072
4066
|
}
|
|
4073
4067
|
);
|
|
4074
|
-
function
|
|
4068
|
+
function ji(e, t) {
|
|
4075
4069
|
var a;
|
|
4076
4070
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4077
4071
|
for (const r of Object.values(n)) {
|
|
@@ -4080,7 +4074,7 @@ function Vi(e, t) {
|
|
|
4080
4074
|
return i;
|
|
4081
4075
|
}
|
|
4082
4076
|
}
|
|
4083
|
-
const
|
|
4077
|
+
const Bi = () => null, Ui = ({ className: e, message: t }) => /* @__PURE__ */ m(
|
|
4084
4078
|
"div",
|
|
4085
4079
|
{
|
|
4086
4080
|
className: k("flex items-center justify-center h-full", e),
|
|
@@ -4124,11 +4118,11 @@ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
|
|
|
4124
4118
|
]
|
|
4125
4119
|
}
|
|
4126
4120
|
), je = U.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
|
|
4127
|
-
/* @__PURE__ */ s(
|
|
4121
|
+
/* @__PURE__ */ s(Ui, { className: "w-6 h-6" }),
|
|
4128
4122
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4129
4123
|
] }) }));
|
|
4130
4124
|
je.displayName = "LoadingState";
|
|
4131
|
-
const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant",
|
|
4125
|
+
const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Vi = ({
|
|
4132
4126
|
onBack: e,
|
|
4133
4127
|
showBackButton: t,
|
|
4134
4128
|
showStarButton: n = !1,
|
|
@@ -4147,7 +4141,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4147
4141
|
onParticipantNameClick: w,
|
|
4148
4142
|
renderHeaderTitleBadges: b
|
|
4149
4143
|
}) => {
|
|
4150
|
-
var A,
|
|
4144
|
+
var A, S, C, I, $, F;
|
|
4151
4145
|
const { channel: f } = ue(), { client: x } = me(), N = U.useMemo(
|
|
4152
4146
|
() => {
|
|
4153
4147
|
var V;
|
|
@@ -4158,11 +4152,11 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4158
4152
|
);
|
|
4159
4153
|
},
|
|
4160
4154
|
[(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
|
|
4161
|
-
),
|
|
4155
|
+
), E = ot(N == null ? void 0 : N.user), T = (S = N == null ? void 0 : N.user) == null ? void 0 : S.image, M = lt(f), D = b == null ? void 0 : b({
|
|
4162
4156
|
channel: f,
|
|
4163
4157
|
participant: N
|
|
4164
|
-
}), L = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(
|
|
4165
|
-
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children:
|
|
4158
|
+
}), L = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(te, { children: [
|
|
4159
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: E }),
|
|
4166
4160
|
D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
|
|
4167
4161
|
] }), y = async () => {
|
|
4168
4162
|
try {
|
|
@@ -4187,7 +4181,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4187
4181
|
}),
|
|
4188
4182
|
type: "button",
|
|
4189
4183
|
"aria-label": "Back to conversations",
|
|
4190
|
-
children: /* @__PURE__ */ s(
|
|
4184
|
+
children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
|
|
4191
4185
|
}
|
|
4192
4186
|
) }),
|
|
4193
4187
|
/* @__PURE__ */ s(
|
|
@@ -4200,7 +4194,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4200
4194
|
{
|
|
4201
4195
|
type: "button",
|
|
4202
4196
|
onClick: w,
|
|
4203
|
-
"aria-label": `View details for ${
|
|
4197
|
+
"aria-label": `View details for ${E}`,
|
|
4204
4198
|
className: k(
|
|
4205
4199
|
L,
|
|
4206
4200
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
@@ -4210,7 +4204,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4210
4204
|
se,
|
|
4211
4205
|
{
|
|
4212
4206
|
id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || f.id || "unknown",
|
|
4213
|
-
name:
|
|
4207
|
+
name: E,
|
|
4214
4208
|
image: T,
|
|
4215
4209
|
starred: n && M,
|
|
4216
4210
|
dmAgentEnabled: a,
|
|
@@ -4232,7 +4226,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4232
4226
|
se,
|
|
4233
4227
|
{
|
|
4234
4228
|
id: ((I = N == null ? void 0 : N.user) == null ? void 0 : I.id) || f.id || "unknown",
|
|
4235
|
-
name:
|
|
4229
|
+
name: E,
|
|
4236
4230
|
image: T,
|
|
4237
4231
|
starred: n && M,
|
|
4238
4232
|
dmAgentEnabled: a,
|
|
@@ -4277,7 +4271,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4277
4271
|
}
|
|
4278
4272
|
),
|
|
4279
4273
|
v && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
4280
|
-
|
|
4274
|
+
tt,
|
|
4281
4275
|
{
|
|
4282
4276
|
channel: f,
|
|
4283
4277
|
participant: N,
|
|
@@ -4307,7 +4301,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4307
4301
|
type: "button",
|
|
4308
4302
|
onClick: e,
|
|
4309
4303
|
"aria-label": "Back to conversations",
|
|
4310
|
-
children: /* @__PURE__ */ s(
|
|
4304
|
+
children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
|
|
4311
4305
|
}
|
|
4312
4306
|
),
|
|
4313
4307
|
w ? /* @__PURE__ */ m(
|
|
@@ -4315,7 +4309,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4315
4309
|
{
|
|
4316
4310
|
type: "button",
|
|
4317
4311
|
onClick: w,
|
|
4318
|
-
"aria-label": `View details for ${
|
|
4312
|
+
"aria-label": `View details for ${E}`,
|
|
4319
4313
|
className: k(
|
|
4320
4314
|
O,
|
|
4321
4315
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
@@ -4325,7 +4319,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4325
4319
|
se,
|
|
4326
4320
|
{
|
|
4327
4321
|
id: (($ = N == null ? void 0 : N.user) == null ? void 0 : $.id) || f.id || "unknown",
|
|
4328
|
-
name:
|
|
4322
|
+
name: E,
|
|
4329
4323
|
image: T,
|
|
4330
4324
|
starred: n && M,
|
|
4331
4325
|
dmAgentEnabled: a,
|
|
@@ -4349,7 +4343,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4349
4343
|
se,
|
|
4350
4344
|
{
|
|
4351
4345
|
id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || f.id || "unknown",
|
|
4352
|
-
name:
|
|
4346
|
+
name: E,
|
|
4353
4347
|
image: T,
|
|
4354
4348
|
starred: n && M,
|
|
4355
4349
|
dmAgentEnabled: a,
|
|
@@ -4395,7 +4389,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4395
4389
|
}
|
|
4396
4390
|
),
|
|
4397
4391
|
v && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
4398
|
-
|
|
4392
|
+
tt,
|
|
4399
4393
|
{
|
|
4400
4394
|
channel: f,
|
|
4401
4395
|
participant: N,
|
|
@@ -4414,7 +4408,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4414
4408
|
] })
|
|
4415
4409
|
] })
|
|
4416
4410
|
] });
|
|
4417
|
-
},
|
|
4411
|
+
}, Gi = ({
|
|
4418
4412
|
onBack: e,
|
|
4419
4413
|
showBackButton: t,
|
|
4420
4414
|
renderMessageInputActions: n,
|
|
@@ -4435,7 +4429,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4435
4429
|
renderChannelBanner: f,
|
|
4436
4430
|
renderHeaderTitleBadges: x,
|
|
4437
4431
|
customChannelActions: N,
|
|
4438
|
-
renderChannelActions:
|
|
4432
|
+
renderChannelActions: E,
|
|
4439
4433
|
renderMessage: T,
|
|
4440
4434
|
dmAgentEnabled: M = !1,
|
|
4441
4435
|
viewerLanguage: D,
|
|
@@ -4444,7 +4438,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4444
4438
|
composerInput: z
|
|
4445
4439
|
}) => {
|
|
4446
4440
|
var _, R, H, q;
|
|
4447
|
-
const { channel: y } = ue(), { client: A } = me(),
|
|
4441
|
+
const { channel: y } = ue(), { client: A } = me(), S = U.useMemo(
|
|
4448
4442
|
() => {
|
|
4449
4443
|
var Y;
|
|
4450
4444
|
return Ue(
|
|
@@ -4461,10 +4455,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4461
4455
|
var oe;
|
|
4462
4456
|
return ((oe = Z.user) == null ? void 0 : oe.id) === Y;
|
|
4463
4457
|
}) : void 0;
|
|
4464
|
-
}, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q =
|
|
4458
|
+
}, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q = S == null ? void 0 : S.user) == null ? void 0 : q.is_account) ?? (S == null ? void 0 : S.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
|
|
4465
4459
|
(Y) => Y.type !== "deleted"
|
|
4466
|
-
), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null,
|
|
4467
|
-
|
|
4460
|
+
), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, ee = O ? /* @__PURE__ */ s(
|
|
4461
|
+
fa,
|
|
4468
4462
|
{
|
|
4469
4463
|
onBack: e,
|
|
4470
4464
|
showBackButton: t,
|
|
@@ -4480,13 +4474,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4480
4474
|
onBlockParticipantClick: u,
|
|
4481
4475
|
onReportParticipantClick: p,
|
|
4482
4476
|
customChannelActions: N,
|
|
4483
|
-
renderChannelActions:
|
|
4477
|
+
renderChannelActions: E,
|
|
4484
4478
|
onParticipantNameClick: O
|
|
4485
4479
|
}
|
|
4486
4480
|
) : null, X = J(
|
|
4487
4481
|
(Y) => {
|
|
4488
|
-
const { message: j } =
|
|
4489
|
-
|
|
4482
|
+
const { message: j } = Ie("ChannelView"), W = /* @__PURE__ */ s(
|
|
4483
|
+
xi,
|
|
4490
4484
|
{
|
|
4491
4485
|
...Y,
|
|
4492
4486
|
chatbotVotingEnabled: b,
|
|
@@ -4497,17 +4491,17 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4497
4491
|
},
|
|
4498
4492
|
[b, T, D]
|
|
4499
4493
|
);
|
|
4500
|
-
return /* @__PURE__ */ s(
|
|
4501
|
-
|
|
4494
|
+
return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
|
|
4495
|
+
kn,
|
|
4502
4496
|
{
|
|
4503
4497
|
overrides: {
|
|
4504
4498
|
Message: X,
|
|
4505
|
-
MessageActions:
|
|
4499
|
+
MessageActions: Ni
|
|
4506
4500
|
},
|
|
4507
|
-
children: /* @__PURE__ */ m(
|
|
4508
|
-
!O && /* @__PURE__ */ m(
|
|
4501
|
+
children: /* @__PURE__ */ m(Cn, { children: [
|
|
4502
|
+
!O && /* @__PURE__ */ m(te, { children: [
|
|
4509
4503
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4510
|
-
|
|
4504
|
+
Vi,
|
|
4511
4505
|
{
|
|
4512
4506
|
onBack: e,
|
|
4513
4507
|
showBackButton: t,
|
|
@@ -4523,14 +4517,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4523
4517
|
onBlockParticipantClick: u,
|
|
4524
4518
|
onReportParticipantClick: p,
|
|
4525
4519
|
customChannelActions: N,
|
|
4526
|
-
renderChannelActions:
|
|
4520
|
+
renderChannelActions: E,
|
|
4527
4521
|
renderHeaderTitleBadges: x
|
|
4528
4522
|
}
|
|
4529
4523
|
) }, "lt-channel-header"),
|
|
4530
4524
|
Q
|
|
4531
4525
|
] }),
|
|
4532
4526
|
O && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
|
|
4533
|
-
|
|
4527
|
+
ee,
|
|
4534
4528
|
Q
|
|
4535
4529
|
] }),
|
|
4536
4530
|
/* @__PURE__ */ s(
|
|
@@ -4538,10 +4532,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4538
4532
|
{
|
|
4539
4533
|
className: "flex-1 overflow-hidden relative",
|
|
4540
4534
|
children: /* @__PURE__ */ s(
|
|
4541
|
-
|
|
4535
|
+
En,
|
|
4542
4536
|
{
|
|
4543
4537
|
head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
|
|
4544
|
-
|
|
4538
|
+
ee,
|
|
4545
4539
|
Q
|
|
4546
4540
|
] }) : void 0,
|
|
4547
4541
|
hideDeletedMessages: !0,
|
|
@@ -4553,7 +4547,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4553
4547
|
),
|
|
4554
4548
|
r ? /* @__PURE__ */ s(U.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
|
|
4555
4549
|
/* @__PURE__ */ s(
|
|
4556
|
-
|
|
4550
|
+
Ii,
|
|
4557
4551
|
{
|
|
4558
4552
|
...n && {
|
|
4559
4553
|
renderActions: () => n == null ? void 0 : n(y)
|
|
@@ -4568,7 +4562,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4568
4562
|
] })
|
|
4569
4563
|
}
|
|
4570
4564
|
) });
|
|
4571
|
-
},
|
|
4565
|
+
}, Os = U.memo(
|
|
4572
4566
|
({
|
|
4573
4567
|
channel: e,
|
|
4574
4568
|
onBack: t,
|
|
@@ -4579,7 +4573,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4579
4573
|
onLeaveConversation: l,
|
|
4580
4574
|
onBlockParticipant: o,
|
|
4581
4575
|
className: d,
|
|
4582
|
-
CustomChannelEmptyState: u =
|
|
4576
|
+
CustomChannelEmptyState: u = Bi,
|
|
4583
4577
|
showDeleteConversation: p = !0,
|
|
4584
4578
|
onDeleteConversationClick: h,
|
|
4585
4579
|
onBlockParticipantClick: g,
|
|
@@ -4590,7 +4584,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4590
4584
|
composerDisabledReason: f,
|
|
4591
4585
|
dmAgentEnabled: x,
|
|
4592
4586
|
messageMetadata: N,
|
|
4593
|
-
onMessageSent:
|
|
4587
|
+
onMessageSent: E,
|
|
4594
4588
|
showStarButton: T = !1,
|
|
4595
4589
|
chatbotVotingEnabled: M = !1,
|
|
4596
4590
|
renderChannelBanner: D,
|
|
@@ -4599,7 +4593,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4599
4593
|
renderChannelActions: z,
|
|
4600
4594
|
renderMessage: y,
|
|
4601
4595
|
onMessageLinkClick: A,
|
|
4602
|
-
sendButton:
|
|
4596
|
+
sendButton: S,
|
|
4603
4597
|
attachmentPreviewList: C,
|
|
4604
4598
|
viewerLanguage: I,
|
|
4605
4599
|
showChannelInfo: $ = !0,
|
|
@@ -4622,13 +4616,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4622
4616
|
...R,
|
|
4623
4617
|
...q && { skip_push: !0 }
|
|
4624
4618
|
}, W = await e.sendMessage(Y, j);
|
|
4625
|
-
return
|
|
4619
|
+
return E == null || E(W), W;
|
|
4626
4620
|
},
|
|
4627
|
-
[e, x, N,
|
|
4628
|
-
),
|
|
4621
|
+
[e, x, N, E]
|
|
4622
|
+
), ee = G(null);
|
|
4629
4623
|
return K(() => {
|
|
4630
4624
|
if (!A) return;
|
|
4631
|
-
const X =
|
|
4625
|
+
const X = ee.current;
|
|
4632
4626
|
if (!X) return;
|
|
4633
4627
|
const _ = (R) => {
|
|
4634
4628
|
const H = R.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
|
|
@@ -4640,25 +4634,25 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4640
4634
|
}, [A, e]), /* @__PURE__ */ s(
|
|
4641
4635
|
"div",
|
|
4642
4636
|
{
|
|
4643
|
-
ref:
|
|
4637
|
+
ref: ee,
|
|
4644
4638
|
className: k(
|
|
4645
4639
|
"messaging-channel-view h-full flex flex-col",
|
|
4646
4640
|
d
|
|
4647
4641
|
),
|
|
4648
|
-
children: /* @__PURE__ */ s(
|
|
4649
|
-
|
|
4642
|
+
children: /* @__PURE__ */ s(Fs.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
|
|
4643
|
+
yn,
|
|
4650
4644
|
{
|
|
4651
4645
|
channel: e,
|
|
4652
|
-
MessageSystem:
|
|
4646
|
+
MessageSystem: Fi,
|
|
4653
4647
|
EmptyStateIndicator: u,
|
|
4654
4648
|
LoadingIndicator: je,
|
|
4655
|
-
DateSeparator:
|
|
4656
|
-
TypingIndicator:
|
|
4649
|
+
DateSeparator: ga,
|
|
4650
|
+
TypingIndicator: $i,
|
|
4657
4651
|
doSendMessageRequest: Q,
|
|
4658
|
-
...
|
|
4652
|
+
...S ? { SendButton: S } : {},
|
|
4659
4653
|
...C ? { AttachmentPreviewList: C } : {},
|
|
4660
4654
|
children: /* @__PURE__ */ s(
|
|
4661
|
-
|
|
4655
|
+
Gi,
|
|
4662
4656
|
{
|
|
4663
4657
|
onBack: t,
|
|
4664
4658
|
showBackButton: n,
|
|
@@ -4696,8 +4690,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4696
4690
|
);
|
|
4697
4691
|
}
|
|
4698
4692
|
);
|
|
4699
|
-
|
|
4700
|
-
const
|
|
4693
|
+
Os.displayName = "ChannelView";
|
|
4694
|
+
const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
|
|
4701
4695
|
/* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
4702
4696
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
4703
4697
|
/* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -4711,8 +4705,8 @@ const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4711
4705
|
}
|
|
4712
4706
|
)
|
|
4713
4707
|
] }) }));
|
|
4714
|
-
|
|
4715
|
-
const
|
|
4708
|
+
ye.displayName = "ErrorState";
|
|
4709
|
+
const ul = ({
|
|
4716
4710
|
capabilities: e = {},
|
|
4717
4711
|
renderMessageInputActions: t,
|
|
4718
4712
|
renderConversationFooter: n,
|
|
@@ -4733,7 +4727,7 @@ const fl = ({
|
|
|
4733
4727
|
renderChannelActions: f,
|
|
4734
4728
|
onParticipantNameClick: x,
|
|
4735
4729
|
renderMessage: N,
|
|
4736
|
-
onMessageLinkClick:
|
|
4730
|
+
onMessageLinkClick: E,
|
|
4737
4731
|
showChannelInfo: T,
|
|
4738
4732
|
composerInput: M
|
|
4739
4733
|
}) => {
|
|
@@ -4744,8 +4738,8 @@ const fl = ({
|
|
|
4744
4738
|
error: z,
|
|
4745
4739
|
refreshConnection: y,
|
|
4746
4740
|
service: A,
|
|
4747
|
-
debug:
|
|
4748
|
-
} =
|
|
4741
|
+
debug: S
|
|
4742
|
+
} = ea(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(l);
|
|
4749
4743
|
X.current = l;
|
|
4750
4744
|
const _ = G(a);
|
|
4751
4745
|
_.current = a;
|
|
@@ -4765,7 +4759,7 @@ const fl = ({
|
|
|
4765
4759
|
(async () => {
|
|
4766
4760
|
var Le, De;
|
|
4767
4761
|
try {
|
|
4768
|
-
|
|
4762
|
+
S && console.log(
|
|
4769
4763
|
"[MessagingShell] Loading initial conversation with:",
|
|
4770
4764
|
i
|
|
4771
4765
|
);
|
|
@@ -4778,7 +4772,7 @@ const fl = ({
|
|
|
4778
4772
|
{ limit: 1 }
|
|
4779
4773
|
);
|
|
4780
4774
|
if (ne.length > 0) {
|
|
4781
|
-
I(ne[0]), F(null), (Le = _.current) == null || Le.call(_, ne[0]),
|
|
4775
|
+
I(ne[0]), F(null), (Le = _.current) == null || Le.call(_, ne[0]), S && console.log(
|
|
4782
4776
|
"[MessagingShell] Initial conversation loaded:",
|
|
4783
4777
|
ne[0].id
|
|
4784
4778
|
);
|
|
@@ -4786,7 +4780,7 @@ const fl = ({
|
|
|
4786
4780
|
}
|
|
4787
4781
|
const ce = X.current;
|
|
4788
4782
|
if (!ce || !A) {
|
|
4789
|
-
Z(), F("No conversation found with this account"),
|
|
4783
|
+
Z(), F("No conversation found with this account"), S && console.log(
|
|
4790
4784
|
"[MessagingShell] No conversation found for:",
|
|
4791
4785
|
i
|
|
4792
4786
|
);
|
|
@@ -4798,7 +4792,7 @@ const fl = ({
|
|
|
4798
4792
|
name: ce.name,
|
|
4799
4793
|
phone: ce.phone
|
|
4800
4794
|
});
|
|
4801
|
-
I(ie), F(null), (De = _.current) == null || De.call(_, ie),
|
|
4795
|
+
I(ie), F(null), (De = _.current) == null || De.call(_, ie), S && console.log(
|
|
4802
4796
|
"[MessagingShell] Channel created and loaded:",
|
|
4803
4797
|
ie.id
|
|
4804
4798
|
);
|
|
@@ -4815,21 +4809,21 @@ const fl = ({
|
|
|
4815
4809
|
), Z(), H.current || F("Failed to load conversation");
|
|
4816
4810
|
}
|
|
4817
4811
|
})();
|
|
4818
|
-
}, [i, D, L, A,
|
|
4812
|
+
}, [i, D, L, A, S]);
|
|
4819
4813
|
const q = G(r);
|
|
4820
4814
|
q.current = r;
|
|
4821
4815
|
const Y = J(() => {
|
|
4822
4816
|
var j;
|
|
4823
4817
|
I(null), Q(!0), (j = q.current) == null || j.call(q);
|
|
4824
4818
|
}, []);
|
|
4825
|
-
return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(
|
|
4826
|
-
|
|
4819
|
+
return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !L || !D ? /* @__PURE__ */ s(
|
|
4820
|
+
ye,
|
|
4827
4821
|
{
|
|
4828
4822
|
message: "Not connected to messaging service",
|
|
4829
4823
|
onBack: y
|
|
4830
4824
|
}
|
|
4831
|
-
) : $ ? /* @__PURE__ */ s(
|
|
4832
|
-
|
|
4825
|
+
) : $ ? /* @__PURE__ */ s(ye, { message: $ }) : V && !C ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
4826
|
+
Os,
|
|
4833
4827
|
{
|
|
4834
4828
|
channel: C,
|
|
4835
4829
|
renderMessageInputActions: t,
|
|
@@ -4838,7 +4832,7 @@ const fl = ({
|
|
|
4838
4832
|
onLeaveConversation: Y,
|
|
4839
4833
|
onBlockParticipant: Y,
|
|
4840
4834
|
CustomChannelEmptyState: o,
|
|
4841
|
-
showDeleteConversation:
|
|
4835
|
+
showDeleteConversation: ee,
|
|
4842
4836
|
onBlockParticipantClick: d,
|
|
4843
4837
|
onReportParticipantClick: u,
|
|
4844
4838
|
dmAgentEnabled: p,
|
|
@@ -4850,20 +4844,20 @@ const fl = ({
|
|
|
4850
4844
|
renderChannelActions: f,
|
|
4851
4845
|
onParticipantNameClick: x,
|
|
4852
4846
|
renderMessage: N,
|
|
4853
|
-
onMessageLinkClick:
|
|
4847
|
+
onMessageLinkClick: E,
|
|
4854
4848
|
showChannelInfo: T,
|
|
4855
4849
|
composerInput: M
|
|
4856
4850
|
},
|
|
4857
4851
|
C.id
|
|
4858
4852
|
) }) }) : /* @__PURE__ */ s(je, {});
|
|
4859
4853
|
};
|
|
4860
|
-
function
|
|
4854
|
+
function Hi(e) {
|
|
4861
4855
|
const t = e.state.pending_messages;
|
|
4862
4856
|
if (t != null && t.length)
|
|
4863
4857
|
for (const n of t)
|
|
4864
4858
|
e.state.addMessageSorted(n.message);
|
|
4865
4859
|
}
|
|
4866
|
-
const
|
|
4860
|
+
const $s = U.createContext({
|
|
4867
4861
|
selectedChannel: void 0,
|
|
4868
4862
|
onChannelSelect: () => {
|
|
4869
4863
|
},
|
|
@@ -4871,18 +4865,18 @@ const js = U.createContext({
|
|
|
4871
4865
|
renderMessagePreview: void 0,
|
|
4872
4866
|
channelPreview: void 0,
|
|
4873
4867
|
viewerLanguage: void 0
|
|
4874
|
-
}),
|
|
4868
|
+
}), Yi = $s.Provider, qi = () => U.useContext($s), Wi = (e, t) => {
|
|
4875
4869
|
const n = new Date(
|
|
4876
4870
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
4877
4871
|
), r = new Date(
|
|
4878
4872
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
4879
4873
|
).getTime() - n.getTime();
|
|
4880
4874
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
4881
|
-
},
|
|
4875
|
+
}, Xi = (e) => {
|
|
4882
4876
|
const t = /* @__PURE__ */ new Date();
|
|
4883
4877
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
4884
4878
|
return "Just now";
|
|
4885
|
-
const a =
|
|
4879
|
+
const a = Wi(e, t);
|
|
4886
4880
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
4887
4881
|
hour: "numeric",
|
|
4888
4882
|
minute: "2-digit",
|
|
@@ -4892,7 +4886,7 @@ const js = U.createContext({
|
|
|
4892
4886
|
day: "numeric",
|
|
4893
4887
|
year: "2-digit"
|
|
4894
4888
|
});
|
|
4895
|
-
},
|
|
4889
|
+
}, js = U.memo(
|
|
4896
4890
|
(e) => {
|
|
4897
4891
|
var L, O, z;
|
|
4898
4892
|
const { channel: t, unread: n } = e, {
|
|
@@ -4902,7 +4896,7 @@ const js = U.createContext({
|
|
|
4902
4896
|
channelPreview: l,
|
|
4903
4897
|
renderMessagePreview: o,
|
|
4904
4898
|
viewerLanguage: d
|
|
4905
|
-
} =
|
|
4899
|
+
} = qi(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
|
|
4906
4900
|
if (l)
|
|
4907
4901
|
return /* @__PURE__ */ s(
|
|
4908
4902
|
l,
|
|
@@ -4917,22 +4911,22 @@ const js = U.createContext({
|
|
|
4917
4911
|
const g = () => {
|
|
4918
4912
|
t && r(t);
|
|
4919
4913
|
}, c = (y) => {
|
|
4920
|
-
const A = y.key === "Enter" || y.key === " ",
|
|
4921
|
-
!A ||
|
|
4914
|
+
const A = y.key === "Enter" || y.key === " ", S = y.repeat;
|
|
4915
|
+
!A || S || (y.preventDefault(), g());
|
|
4922
4916
|
}, v = Ue(
|
|
4923
4917
|
(L = t == null ? void 0 : t.state) == null ? void 0 : L.members,
|
|
4924
4918
|
u == null ? void 0 : u.userID,
|
|
4925
4919
|
t == null ? void 0 : t.type
|
|
4926
|
-
), w =
|
|
4920
|
+
), w = ot(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
|
|
4927
4921
|
var A;
|
|
4928
4922
|
const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
|
|
4929
4923
|
if (y != null && y.length) {
|
|
4930
|
-
for (let
|
|
4931
|
-
if (y[
|
|
4924
|
+
for (let S = y.length - 1; S >= 0; S--)
|
|
4925
|
+
if (y[S].type !== "system") return y[S];
|
|
4932
4926
|
}
|
|
4933
4927
|
})(), N = (() => {
|
|
4934
4928
|
var $, F, V, Q;
|
|
4935
|
-
const y =
|
|
4929
|
+
const y = ms({
|
|
4936
4930
|
message: f,
|
|
4937
4931
|
viewerLanguage: d
|
|
4938
4932
|
});
|
|
@@ -4943,13 +4937,13 @@ const js = U.createContext({
|
|
|
4943
4937
|
if (y) return y;
|
|
4944
4938
|
const I = (Q = f == null ? void 0 : f.attachments) == null ? void 0 : Q[0];
|
|
4945
4939
|
return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
4946
|
-
})(),
|
|
4940
|
+
})(), E = f != null && f.created_at ? Xi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, D = n ?? 0;
|
|
4947
4941
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
4948
4942
|
channelId: t == null ? void 0 : t.id,
|
|
4949
4943
|
isSelected: p,
|
|
4950
4944
|
participantName: w,
|
|
4951
4945
|
unreadCount: D,
|
|
4952
|
-
hasTimestamp: !!
|
|
4946
|
+
hasTimestamp: !!E
|
|
4953
4947
|
}), /* @__PURE__ */ s(
|
|
4954
4948
|
"div",
|
|
4955
4949
|
{
|
|
@@ -4990,7 +4984,7 @@ const js = U.createContext({
|
|
|
4990
4984
|
]
|
|
4991
4985
|
}
|
|
4992
4986
|
),
|
|
4993
|
-
|
|
4987
|
+
E && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: E })
|
|
4994
4988
|
] }),
|
|
4995
4989
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
4996
4990
|
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
|
|
@@ -5002,28 +4996,28 @@ const js = U.createContext({
|
|
|
5002
4996
|
);
|
|
5003
4997
|
}
|
|
5004
4998
|
);
|
|
5005
|
-
|
|
5006
|
-
const
|
|
4999
|
+
js.displayName = "CustomChannelPreview";
|
|
5000
|
+
const Ki = { last_message_at: -1 }, Ji = U.memo(
|
|
5007
5001
|
({
|
|
5008
5002
|
onChannelSelect: e,
|
|
5009
5003
|
selectedChannel: t,
|
|
5010
5004
|
filters: n,
|
|
5011
5005
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5012
5006
|
channelRenderFilterFn: r,
|
|
5013
|
-
sort: i =
|
|
5007
|
+
sort: i = Ki,
|
|
5014
5008
|
className: l,
|
|
5015
5009
|
customEmptyStateIndicator: o,
|
|
5016
|
-
channelListPaginator: d =
|
|
5010
|
+
channelListPaginator: d = In,
|
|
5017
5011
|
channelPreview: u,
|
|
5018
5012
|
renderMessagePreview: p,
|
|
5019
5013
|
viewerLanguage: h
|
|
5020
5014
|
}) => {
|
|
5021
5015
|
const g = U.useRef(0);
|
|
5022
5016
|
g.current++;
|
|
5023
|
-
const { debug: c = !1 } =
|
|
5017
|
+
const { debug: c = !1 } = it(), v = U.useCallback(
|
|
5024
5018
|
(b) => {
|
|
5025
5019
|
for (const f of b)
|
|
5026
|
-
|
|
5020
|
+
Hi(f);
|
|
5027
5021
|
return r ? r(b) : b;
|
|
5028
5022
|
},
|
|
5029
5023
|
[r]
|
|
@@ -5058,8 +5052,8 @@ const Qi = { last_message_at: -1 }, el = U.memo(
|
|
|
5058
5052
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5059
5053
|
l
|
|
5060
5054
|
),
|
|
5061
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5062
|
-
|
|
5055
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Yi, { value: w, children: /* @__PURE__ */ s(
|
|
5056
|
+
Sn,
|
|
5063
5057
|
{
|
|
5064
5058
|
filters: n,
|
|
5065
5059
|
sort: i,
|
|
@@ -5067,7 +5061,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
|
|
|
5067
5061
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5068
5062
|
channelRenderFilterFn: v,
|
|
5069
5063
|
Paginator: d,
|
|
5070
|
-
Preview:
|
|
5064
|
+
Preview: js,
|
|
5071
5065
|
EmptyStateIndicator: o
|
|
5072
5066
|
},
|
|
5073
5067
|
`${JSON.stringify(n)}:${JSON.stringify(i)}`
|
|
@@ -5076,8 +5070,8 @@ const Qi = { last_message_at: -1 }, el = U.memo(
|
|
|
5076
5070
|
);
|
|
5077
5071
|
}
|
|
5078
5072
|
);
|
|
5079
|
-
|
|
5080
|
-
const
|
|
5073
|
+
Ji.displayName = "ChannelList";
|
|
5074
|
+
const Zi = ({
|
|
5081
5075
|
question: e,
|
|
5082
5076
|
onClick: t,
|
|
5083
5077
|
loading: n = !1,
|
|
@@ -5099,7 +5093,7 @@ const tl = ({
|
|
|
5099
5093
|
),
|
|
5100
5094
|
children: e
|
|
5101
5095
|
}
|
|
5102
|
-
),
|
|
5096
|
+
), ml = ({
|
|
5103
5097
|
faqs: e,
|
|
5104
5098
|
onFaqClick: t,
|
|
5105
5099
|
loadingFaqId: n,
|
|
@@ -5128,7 +5122,7 @@ const tl = ({
|
|
|
5128
5122
|
children: [
|
|
5129
5123
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5130
5124
|
o.map((d) => /* @__PURE__ */ s(
|
|
5131
|
-
|
|
5125
|
+
Zi,
|
|
5132
5126
|
{
|
|
5133
5127
|
question: d.question,
|
|
5134
5128
|
onClick: () => t(d.id),
|
|
@@ -5142,40 +5136,40 @@ const tl = ({
|
|
|
5142
5136
|
] }) });
|
|
5143
5137
|
};
|
|
5144
5138
|
export {
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5139
|
+
ps as A,
|
|
5140
|
+
dl as B,
|
|
5141
|
+
Bi as C,
|
|
5142
|
+
$r as D,
|
|
5143
|
+
ba as E,
|
|
5144
|
+
ml as F,
|
|
5145
|
+
ea as G,
|
|
5146
|
+
Qt as L,
|
|
5147
|
+
ol as M,
|
|
5148
|
+
_e as a,
|
|
5155
5149
|
se as b,
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5150
|
+
Ji as c,
|
|
5151
|
+
Os as d,
|
|
5152
|
+
cl as e,
|
|
5153
|
+
Zi as f,
|
|
5160
5154
|
le as g,
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5155
|
+
Jt as h,
|
|
5156
|
+
Ne as i,
|
|
5157
|
+
Yr as j,
|
|
5158
|
+
ll as k,
|
|
5159
|
+
ul as l,
|
|
5160
|
+
nr as m,
|
|
5161
|
+
er as n,
|
|
5162
|
+
Xi as o,
|
|
5163
|
+
sr as p,
|
|
5164
|
+
ms as q,
|
|
5171
5165
|
we as r,
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5166
|
+
xs as s,
|
|
5167
|
+
aa as t,
|
|
5168
|
+
qa as u,
|
|
5169
|
+
va as v,
|
|
5176
5170
|
Ue as w,
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5171
|
+
mt as x,
|
|
5172
|
+
ht as y,
|
|
5173
|
+
ot as z
|
|
5180
5174
|
};
|
|
5181
|
-
//# sourceMappingURL=index-
|
|
5175
|
+
//# sourceMappingURL=index-DPwo1avm.js.map
|