@linktr.ee/messaging-react 3.9.2 → 3.10.0-rc-1783605409
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-CVxFApFQ.cjs → Card-B8tKJ_Ax.cjs} +2 -2
- package/dist/{Card-CVxFApFQ.cjs.map → Card-B8tKJ_Ax.cjs.map} +1 -1
- package/dist/{Card-ckN-pJAf.js → Card-C_HNnA8B.js} +2 -2
- package/dist/{Card-ckN-pJAf.js.map → Card-C_HNnA8B.js.map} +1 -1
- package/dist/{Card-B83PIVO4.js → Card-CiuPUMBG.js} +2 -2
- package/dist/{Card-B83PIVO4.js.map → Card-CiuPUMBG.js.map} +1 -1
- package/dist/{Card-Cblg_OP2.js → Card-CpH1yJmm.js} +3 -3
- package/dist/{Card-Cblg_OP2.js.map → Card-CpH1yJmm.js.map} +1 -1
- package/dist/{Card-DyFTYx54.cjs → Card-DhXNjcpF.cjs} +2 -2
- package/dist/{Card-DyFTYx54.cjs.map → Card-DhXNjcpF.cjs.map} +1 -1
- package/dist/{Card-BcTjQXjg.cjs → Card-U-sU4Zv-.cjs} +2 -2
- package/dist/{Card-BcTjQXjg.cjs.map → Card-U-sU4Zv-.cjs.map} +1 -1
- package/dist/{LockedThumbnail-CZ8hj3VY.js → LockedThumbnail-BwSdYQrE.js} +2 -2
- package/dist/{LockedThumbnail-CZ8hj3VY.js.map → LockedThumbnail-BwSdYQrE.js.map} +1 -1
- package/dist/{LockedThumbnail-C-MNksZm.cjs → LockedThumbnail-CijnuXw_.cjs} +2 -2
- package/dist/{LockedThumbnail-C-MNksZm.cjs.map → LockedThumbnail-CijnuXw_.cjs.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{index-CPbf44kW.js → index-DSY7bIL-.js} +650 -572
- package/dist/index-DSY7bIL-.js.map +1 -0
- package/dist/{index-C2hIrXzf.cjs → index-Du7nTLh4.cjs} +2 -2
- package/dist/index-Du7nTLh4.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +55 -0
- package/dist/index.js +20 -19
- package/package.json +2 -2
- package/src/components/MessageBubble/MessageBubble.stories.tsx +98 -0
- package/src/components/MessageBubble/MessageBubble.test.tsx +71 -0
- package/src/components/MessageBubble/components/Received/Card.tsx +27 -0
- package/src/components/MessageBubble/components/Received/index.ts +1 -0
- package/src/components/MessageBubble/components/Sent/Card.tsx +23 -0
- package/src/components/MessageBubble/components/Sent/index.ts +1 -0
- package/src/components/MessageBubble/components/_shared/BubbleShell.tsx +77 -0
- package/src/components/MessageBubble/components/_shared/bubbleTail.tsx +48 -0
- package/src/components/MessageBubble/index.tsx +31 -0
- package/src/components/MessageBubble/types.ts +34 -0
- package/src/index.ts +7 -0
- package/src/styles.css +1 -1
- package/dist/index-C2hIrXzf.cjs.map +0 -1
- package/dist/index-CPbf44kW.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as s, jsxs as u, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import V, { createContext as lt, useContext as Ie, useCallback as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { StarIcon as Ee, DotsThreeIcon as
|
|
7
|
-
import
|
|
8
|
-
import { MessageActions as
|
|
9
|
-
const
|
|
2
|
+
import V, { createContext as lt, useContext as Ie, useCallback as J, useState as U, useRef as G, useEffect as Z, useId as Ys, useMemo as ae, Suspense as ot } from "react";
|
|
3
|
+
import { StreamChatService as qs } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as Ws, LinkPreviewsManager as Wt } from "stream-chat";
|
|
5
|
+
import { Chat as Xs, useChannelStateContext as le, useChatContext as me, DateSeparator as Ks, MessageStatus as Zs, useMessageContext as _e, MessageErrorIcon as et, MessageText as tt, areMessageUIPropsEqual as Js, useMessageReminder as Qs, useComponentContext as ls, Attachment as en, EditMessageModal as tn, MessageBlocked as sn, MessageBouncePrompt as nn, MessageDeleted as an, MessageIsThreadReplyInChannelButtonIndicator as rn, MessageRepliesCountButton as ln, ReminderNotification as on, StreamedMessageText as cn, messageHasAttachments as dn, messageHasReactions as un, isDateSeparatorMessage as mn, isMessageBlocked as hn, isMessageBounced as fn, MessageBounceModal as gn, Poll as pn, useMessageComposer as bn, useStateStore as vn, MessageInput as xn, useMessageInputContext as wn, useMessageComposerHasSendableData as _n, AttachmentPreviewList as Nn, QuotedMessagePreview as yn, TextareaComposer as kn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as Cn, useAIState as Sn, Channel as En, WithComponents as In, Window as Tn, MessageList as An, ChannelList as Mn, InfiniteScroll as Rn } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ee, DotsThreeIcon as Dn, SpinnerGapIcon as ze, SignOutIcon as Ln, ProhibitInsetIcon as Xt, FlagIcon as os, ArrowLeftIcon as st, CurrencyDollarIcon as zn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as cs, ImageIcon as Pn, SpeakerHighIcon as Fn, VideoCameraIcon as ds, FileMdIcon as On, FileTextIcon as $n, FileZipIcon as Bn, FilePptIcon as Un, FileCsvIcon as jn, FileXlsIcon as Vn, FileDocIcon as Gn, FilePdfIcon as Hn, CircleNotchIcon as Ce, PlayIcon as nt, PauseIcon as Yn, LinkIcon as qn, DownloadSimpleIcon as Se, XIcon as Ue, CaretLeftIcon as Wn, GiftIcon as Xn, ThumbsUpIcon as Kn, ThumbsDownIcon as Zn, ChecksIcon as Jn, PencilSimpleIcon as Qn, TrashSimpleIcon as ea, ArrowUpIcon as ta, ProhibitIcon as sa } from "@phosphor-icons/react";
|
|
7
|
+
import y from "classnames";
|
|
8
|
+
import { MessageActions as na, DefaultDropdownActionButton as us } from "stream-chat-react/experimental";
|
|
9
|
+
const ms = lt({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const us = lt({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), ct = () => Ie(
|
|
19
|
+
}), ct = () => Ie(ms), fl = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -26,7 +26,7 @@ const us = lt({
|
|
|
26
26
|
client: o
|
|
27
27
|
}) => {
|
|
28
28
|
var I, M;
|
|
29
|
-
const l =
|
|
29
|
+
const l = J(
|
|
30
30
|
(T, ...z) => {
|
|
31
31
|
i && console.log(`🔥 [MessagingProvider] ${T}`, ...z);
|
|
32
32
|
},
|
|
@@ -64,9 +64,9 @@ const us = lt({
|
|
|
64
64
|
capabilities: r
|
|
65
65
|
};
|
|
66
66
|
const $ = G(null);
|
|
67
|
-
!o && a && ((I = $.current) == null ? void 0 : I.apiKey) !== a && ($.current = { apiKey: a, client: new
|
|
67
|
+
!o && a && ((I = $.current) == null ? void 0 : I.apiKey) !== a && ($.current = { apiKey: a, client: new Ws(a) });
|
|
68
68
|
const F = o || (a ? ((M = $.current) == null ? void 0 : M.client) ?? null : null);
|
|
69
|
-
|
|
69
|
+
Z(() => {
|
|
70
70
|
const T = D.current, z = C.current;
|
|
71
71
|
if (o) {
|
|
72
72
|
w.current = null, m(null), h(null), c(!1), f(null), x(!1);
|
|
@@ -83,7 +83,7 @@ const us = lt({
|
|
|
83
83
|
renderCount: T,
|
|
84
84
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
85
85
|
});
|
|
86
|
-
const O = new
|
|
86
|
+
const O = new qs({
|
|
87
87
|
...z,
|
|
88
88
|
apiKey: a,
|
|
89
89
|
debug: R.current,
|
|
@@ -95,7 +95,7 @@ const us = lt({
|
|
|
95
95
|
});
|
|
96
96
|
}, [a, F, o]);
|
|
97
97
|
const L = G(null);
|
|
98
|
-
|
|
98
|
+
Z(() => {
|
|
99
99
|
var z, O;
|
|
100
100
|
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
101
101
|
hasService: !!d,
|
|
@@ -143,14 +143,14 @@ const us = lt({
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
})();
|
|
146
|
-
}, [d, t, l, g, o]),
|
|
146
|
+
}, [d, t, l, g, o]), Z(() => {
|
|
147
147
|
const T = F;
|
|
148
148
|
return () => {
|
|
149
149
|
var z;
|
|
150
150
|
T && (L.current = null, (z = w.current) == null || z.disconnectUser().catch(console.error));
|
|
151
151
|
};
|
|
152
152
|
}, [F]);
|
|
153
|
-
const
|
|
153
|
+
const k = J(async () => {
|
|
154
154
|
if (l("🔄 REFRESH CONNECTION CALLED", {
|
|
155
155
|
hasService: !!d,
|
|
156
156
|
hasUser: !!t
|
|
@@ -196,7 +196,7 @@ const us = lt({
|
|
|
196
196
|
isLoading: o ? !1 : b,
|
|
197
197
|
error: o ? null : v,
|
|
198
198
|
capabilities: r,
|
|
199
|
-
refreshConnection:
|
|
199
|
+
refreshConnection: k,
|
|
200
200
|
debug: i
|
|
201
201
|
}), [
|
|
202
202
|
d,
|
|
@@ -206,7 +206,7 @@ const us = lt({
|
|
|
206
206
|
b,
|
|
207
207
|
v,
|
|
208
208
|
r,
|
|
209
|
-
|
|
209
|
+
k,
|
|
210
210
|
i,
|
|
211
211
|
l
|
|
212
212
|
]);
|
|
@@ -214,8 +214,8 @@ const us = lt({
|
|
|
214
214
|
renderCount: D.current,
|
|
215
215
|
willRenderChat: !!F,
|
|
216
216
|
contextValueReady: !!E
|
|
217
|
-
}), /* @__PURE__ */ s(
|
|
218
|
-
|
|
217
|
+
}), /* @__PURE__ */ s(ms.Provider, { value: E, children: F ? /* @__PURE__ */ s(
|
|
218
|
+
Xs,
|
|
219
219
|
{
|
|
220
220
|
client: F,
|
|
221
221
|
customClasses: {
|
|
@@ -224,12 +224,12 @@ const us = lt({
|
|
|
224
224
|
children: e
|
|
225
225
|
}
|
|
226
226
|
) : e });
|
|
227
|
-
},
|
|
227
|
+
}, aa = () => ct(), dt = (e) => {
|
|
228
228
|
var a, r;
|
|
229
229
|
const [t, n] = U(
|
|
230
230
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
231
231
|
);
|
|
232
|
-
return
|
|
232
|
+
return Z(() => {
|
|
233
233
|
var o;
|
|
234
234
|
if (!e) {
|
|
235
235
|
n(!1);
|
|
@@ -246,14 +246,14 @@ const us = lt({
|
|
|
246
246
|
e.off("member.updated", i);
|
|
247
247
|
};
|
|
248
248
|
}, [e]), t;
|
|
249
|
-
},
|
|
249
|
+
}, ra = "linktree-official", ia = "linktree-official-sender";
|
|
250
250
|
function je(e, t, n) {
|
|
251
251
|
const a = Object.values(e || {});
|
|
252
|
-
if (n ===
|
|
252
|
+
if (n === ra) {
|
|
253
253
|
const r = a.find(
|
|
254
254
|
(i) => {
|
|
255
255
|
var o;
|
|
256
|
-
return ((o = i.user) == null ? void 0 : o.id) ===
|
|
256
|
+
return ((o = i.user) == null ? void 0 : o.id) === ia;
|
|
257
257
|
}
|
|
258
258
|
);
|
|
259
259
|
if (r) return r;
|
|
@@ -265,18 +265,18 @@ function je(e, t, n) {
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
const
|
|
269
|
-
function
|
|
270
|
-
return
|
|
268
|
+
const la = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
269
|
+
function oa(e) {
|
|
270
|
+
return la.test(e.trim());
|
|
271
271
|
}
|
|
272
272
|
function Kt(e, t) {
|
|
273
273
|
const n = e == null ? void 0 : e.trim();
|
|
274
|
-
return !n || t && n === t ? !1 : !
|
|
274
|
+
return !n || t && n === t ? !1 : !oa(n);
|
|
275
275
|
}
|
|
276
276
|
function ut(e) {
|
|
277
277
|
return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
278
278
|
}
|
|
279
|
-
const
|
|
279
|
+
const Zt = [
|
|
280
280
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
281
281
|
// Apple
|
|
282
282
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -304,7 +304,7 @@ const Jt = [
|
|
|
304
304
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
305
305
|
// Melon
|
|
306
306
|
];
|
|
307
|
-
function
|
|
307
|
+
function ca(e) {
|
|
308
308
|
let t = 0;
|
|
309
309
|
for (let n = 0; n < e.length; n++) {
|
|
310
310
|
const a = e.charCodeAt(n);
|
|
@@ -312,14 +312,14 @@ function la(e) {
|
|
|
312
312
|
}
|
|
313
313
|
return Math.abs(t);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
return
|
|
315
|
+
function hs(e) {
|
|
316
|
+
return Zt[ca(e) % Zt.length];
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
return
|
|
318
|
+
function da(e) {
|
|
319
|
+
return hs(e).emoji;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
return
|
|
321
|
+
function ua(e) {
|
|
322
|
+
return hs(e).bgColor;
|
|
323
323
|
}
|
|
324
324
|
const se = ({
|
|
325
325
|
id: e,
|
|
@@ -330,7 +330,7 @@ const se = ({
|
|
|
330
330
|
shape: i = "squircle",
|
|
331
331
|
dmAgentEnabled: o = !1
|
|
332
332
|
}) => {
|
|
333
|
-
const l =
|
|
333
|
+
const l = da(e), d = ua(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
334
334
|
"img",
|
|
335
335
|
{
|
|
336
336
|
src: t,
|
|
@@ -341,7 +341,7 @@ const se = ({
|
|
|
341
341
|
"div",
|
|
342
342
|
{
|
|
343
343
|
"aria-hidden": "true",
|
|
344
|
-
className:
|
|
344
|
+
className: y(
|
|
345
345
|
"avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
|
|
346
346
|
),
|
|
347
347
|
style: { fontSize: h, lineHeight: 1 },
|
|
@@ -351,7 +351,7 @@ const se = ({
|
|
|
351
351
|
return /* @__PURE__ */ u(
|
|
352
352
|
"div",
|
|
353
353
|
{
|
|
354
|
-
className:
|
|
354
|
+
className: y(
|
|
355
355
|
"relative flex-shrink-0",
|
|
356
356
|
a
|
|
357
357
|
),
|
|
@@ -375,7 +375,7 @@ const se = ({
|
|
|
375
375
|
"div",
|
|
376
376
|
{
|
|
377
377
|
"data-testid": "avatar-ring",
|
|
378
|
-
className:
|
|
378
|
+
className: y(
|
|
379
379
|
"h-full w-full",
|
|
380
380
|
"bg-transparent"
|
|
381
381
|
),
|
|
@@ -394,7 +394,7 @@ const se = ({
|
|
|
394
394
|
]
|
|
395
395
|
}
|
|
396
396
|
);
|
|
397
|
-
},
|
|
397
|
+
}, ma = "https://linktr.ee/s/about/trust-center/report", ha = ({
|
|
398
398
|
channel: e,
|
|
399
399
|
participant: t,
|
|
400
400
|
showBlockParticipant: n = !0,
|
|
@@ -409,7 +409,7 @@ const se = ({
|
|
|
409
409
|
}) => {
|
|
410
410
|
var E;
|
|
411
411
|
const { service: h, debug: g } = ct(), c = (E = t == null ? void 0 : t.user) == null ? void 0 : E.id, b = !!(a && n && h && c), [x, v] = U(!1), [f, N] = U(null), [w, C] = U(!1), [R, S] = U(!1), D = b && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
|
|
412
|
-
return
|
|
412
|
+
return Z(() => {
|
|
413
413
|
if (!b || !h || !c) {
|
|
414
414
|
v(!1), N(null);
|
|
415
415
|
return;
|
|
@@ -478,7 +478,7 @@ const se = ({
|
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
handleReportUser: () => {
|
|
481
|
-
d == null || d(), m == null || m(), window.open(
|
|
481
|
+
d == null || d(), m == null || m(), window.open(ma, "_blank", "noopener,noreferrer");
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
484
|
}, Ne = ({
|
|
@@ -490,7 +490,7 @@ const se = ({
|
|
|
490
490
|
"button",
|
|
491
491
|
{
|
|
492
492
|
type: "button",
|
|
493
|
-
className:
|
|
493
|
+
className: y(
|
|
494
494
|
"flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
|
|
495
495
|
e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
496
496
|
t
|
|
@@ -512,7 +512,7 @@ const se = ({
|
|
|
512
512
|
customChannelActions: p,
|
|
513
513
|
triggerClassName: h
|
|
514
514
|
}) => {
|
|
515
|
-
const [g, c] = U(!1), b = G(null), x =
|
|
515
|
+
const [g, c] = U(!1), b = G(null), x = Ys(), v = J(() => c(!1), []), {
|
|
516
516
|
isParticipantBlocked: f,
|
|
517
517
|
isCheckingBlockedStatus: N,
|
|
518
518
|
isLeaving: w,
|
|
@@ -521,7 +521,7 @@ const se = ({
|
|
|
521
521
|
handleBlockUser: S,
|
|
522
522
|
handleUnblockUser: D,
|
|
523
523
|
handleReportUser: $
|
|
524
|
-
} =
|
|
524
|
+
} = ha({
|
|
525
525
|
channel: e,
|
|
526
526
|
participant: t,
|
|
527
527
|
showBlockParticipant: a,
|
|
@@ -534,15 +534,15 @@ const se = ({
|
|
|
534
534
|
onActionComplete: v,
|
|
535
535
|
logLabel: "ChannelActionsMenu"
|
|
536
536
|
});
|
|
537
|
-
return
|
|
537
|
+
return Z(() => {
|
|
538
538
|
if (!g) return;
|
|
539
539
|
const L = (E) => {
|
|
540
540
|
b.current && !b.current.contains(E.target) && c(!1);
|
|
541
|
-
},
|
|
541
|
+
}, k = (E) => {
|
|
542
542
|
E.key === "Escape" && c(!1);
|
|
543
543
|
};
|
|
544
|
-
return document.addEventListener("mousedown", L), document.addEventListener("keydown",
|
|
545
|
-
document.removeEventListener("mousedown", L), document.removeEventListener("keydown",
|
|
544
|
+
return document.addEventListener("mousedown", L), document.addEventListener("keydown", k), () => {
|
|
545
|
+
document.removeEventListener("mousedown", L), document.removeEventListener("keydown", k);
|
|
546
546
|
};
|
|
547
547
|
}, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
|
|
548
548
|
/* @__PURE__ */ u(
|
|
@@ -555,7 +555,7 @@ const se = ({
|
|
|
555
555
|
"aria-controls": g ? x : void 0,
|
|
556
556
|
onClick: () => c((L) => !L),
|
|
557
557
|
children: [
|
|
558
|
-
/* @__PURE__ */ s(
|
|
558
|
+
/* @__PURE__ */ s(Dn, { className: "size-5 text-black/90" }),
|
|
559
559
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
560
560
|
]
|
|
561
561
|
}
|
|
@@ -565,7 +565,7 @@ const se = ({
|
|
|
565
565
|
{
|
|
566
566
|
id: x,
|
|
567
567
|
"aria-label": "Conversation options",
|
|
568
|
-
className:
|
|
568
|
+
className: y(
|
|
569
569
|
"absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
|
|
570
570
|
"rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
|
|
571
571
|
),
|
|
@@ -577,7 +577,7 @@ const se = ({
|
|
|
577
577
|
disabled: w,
|
|
578
578
|
"aria-busy": w,
|
|
579
579
|
children: [
|
|
580
|
-
w ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(
|
|
580
|
+
w ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Ln, { className: "h-5 w-5" }),
|
|
581
581
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
582
582
|
]
|
|
583
583
|
}
|
|
@@ -613,7 +613,7 @@ const se = ({
|
|
|
613
613
|
}
|
|
614
614
|
) }),
|
|
615
615
|
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(Ne, { variant: "danger", onClick: $, children: [
|
|
616
|
-
/* @__PURE__ */ s(
|
|
616
|
+
/* @__PURE__ */ s(os, { className: "h-5 w-5" }),
|
|
617
617
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
618
618
|
] }) }),
|
|
619
619
|
p
|
|
@@ -621,10 +621,10 @@ const se = ({
|
|
|
621
621
|
}
|
|
622
622
|
)
|
|
623
623
|
] });
|
|
624
|
-
}, 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",
|
|
624
|
+
}, 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", fa = "CUSTOMER_PAID", ga = "Replies instantly with AI assistant", pa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === fa, ba = (e) => {
|
|
625
625
|
const t = e;
|
|
626
|
-
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(
|
|
627
|
-
},
|
|
626
|
+
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(pa);
|
|
627
|
+
}, va = ({
|
|
628
628
|
className: e,
|
|
629
629
|
onBack: t,
|
|
630
630
|
showBackButton: n,
|
|
@@ -643,7 +643,7 @@ const se = ({
|
|
|
643
643
|
showChannelInfo: x = !0,
|
|
644
644
|
onParticipantNameClick: v
|
|
645
645
|
}) => {
|
|
646
|
-
var F, L,
|
|
646
|
+
var F, L, k;
|
|
647
647
|
const { channel: f } = le(), { client: N } = me(), w = V.useMemo(
|
|
648
648
|
() => {
|
|
649
649
|
var E;
|
|
@@ -654,7 +654,7 @@ const se = ({
|
|
|
654
654
|
);
|
|
655
655
|
},
|
|
656
656
|
[(F = f.state) == null ? void 0 : F.members, N == null ? void 0 : N.userID, f.type]
|
|
657
|
-
), C = ut(w == null ? void 0 : w.user), R = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = dt(f), D =
|
|
657
|
+
), C = ut(w == null ? void 0 : w.user), R = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = dt(f), D = ba(w), $ = async () => {
|
|
658
658
|
try {
|
|
659
659
|
S ? await f.unpin() : await f.pin();
|
|
660
660
|
} catch (E) {
|
|
@@ -667,7 +667,7 @@ const se = ({
|
|
|
667
667
|
return /* @__PURE__ */ s(
|
|
668
668
|
"div",
|
|
669
669
|
{
|
|
670
|
-
className:
|
|
670
|
+
className: y(
|
|
671
671
|
"@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
|
|
672
672
|
e
|
|
673
673
|
),
|
|
@@ -675,7 +675,7 @@ const se = ({
|
|
|
675
675
|
/* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
|
|
676
676
|
"button",
|
|
677
677
|
{
|
|
678
|
-
className:
|
|
678
|
+
className: y(
|
|
679
679
|
We,
|
|
680
680
|
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
681
681
|
),
|
|
@@ -697,7 +697,7 @@ const se = ({
|
|
|
697
697
|
/* @__PURE__ */ s(
|
|
698
698
|
se,
|
|
699
699
|
{
|
|
700
|
-
id: ((
|
|
700
|
+
id: ((k = w == null ? void 0 : w.user) == null ? void 0 : k.id) || f.id || "unknown",
|
|
701
701
|
name: C,
|
|
702
702
|
image: R,
|
|
703
703
|
dmAgentEnabled: r,
|
|
@@ -715,7 +715,7 @@ const se = ({
|
|
|
715
715
|
{
|
|
716
716
|
"aria-label": "Paid customer",
|
|
717
717
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
718
|
-
children: /* @__PURE__ */ s(
|
|
718
|
+
children: /* @__PURE__ */ s(zn, { className: "size-2.5", weight: "bold" })
|
|
719
719
|
}
|
|
720
720
|
),
|
|
721
721
|
a && S && /* @__PURE__ */ s(
|
|
@@ -738,7 +738,7 @@ const se = ({
|
|
|
738
738
|
] }),
|
|
739
739
|
r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
740
740
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
741
|
-
/* @__PURE__ */ s("span", { children:
|
|
741
|
+
/* @__PURE__ */ s("span", { children: ga })
|
|
742
742
|
] })
|
|
743
743
|
] })
|
|
744
744
|
]
|
|
@@ -756,7 +756,7 @@ const se = ({
|
|
|
756
756
|
children: /* @__PURE__ */ s(
|
|
757
757
|
Ee,
|
|
758
758
|
{
|
|
759
|
-
className:
|
|
759
|
+
className: y("size-5", {
|
|
760
760
|
"text-[#FFD60A]": S,
|
|
761
761
|
"text-black/90": !S
|
|
762
762
|
}),
|
|
@@ -786,15 +786,15 @@ const se = ({
|
|
|
786
786
|
] })
|
|
787
787
|
}
|
|
788
788
|
);
|
|
789
|
-
},
|
|
790
|
-
function
|
|
789
|
+
}, xa = (e) => /* @__PURE__ */ s(Ks, { ...e, position: "center" }), rt = "vote_up", it = "vote_down";
|
|
790
|
+
function wa(e) {
|
|
791
791
|
return e != null && e.length ? e.some((t) => t.type === it) ? "down" : e.some((t) => t.type === rt) ? "up" : null : null;
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function _a(e) {
|
|
794
794
|
const { channel: t } = le(), { client: n } = me("useMessageVote"), a = ae(
|
|
795
|
-
() =>
|
|
795
|
+
() => wa(e.own_reactions),
|
|
796
796
|
[e.own_reactions]
|
|
797
|
-
), r =
|
|
797
|
+
), r = J(async () => {
|
|
798
798
|
if (n != null && n.userID)
|
|
799
799
|
try {
|
|
800
800
|
a === "up" ? await t.deleteReaction(e.id, rt) : await t.sendReaction(
|
|
@@ -804,7 +804,7 @@ function xa(e) {
|
|
|
804
804
|
);
|
|
805
805
|
} catch {
|
|
806
806
|
}
|
|
807
|
-
}, [t, n == null ? void 0 : n.userID, e.id, a]), i =
|
|
807
|
+
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
|
|
808
808
|
if (n != null && n.userID)
|
|
809
809
|
try {
|
|
810
810
|
a === "down" ? await t.deleteReaction(e.id, it) : await t.sendReaction(
|
|
@@ -817,24 +817,24 @@ function xa(e) {
|
|
|
817
817
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
818
818
|
return { selected: a, voteUp: r, voteDown: i };
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Na(e) {
|
|
821
821
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function fs({
|
|
824
824
|
message: e,
|
|
825
825
|
viewerLanguage: t
|
|
826
826
|
}) {
|
|
827
827
|
var r;
|
|
828
|
-
const n = e == null ? void 0 : e.text, a =
|
|
828
|
+
const n = e == null ? void 0 : e.text, a = Na(t);
|
|
829
829
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
830
830
|
}
|
|
831
|
-
const
|
|
831
|
+
const ya = V.lazy(() => import("./Card-CiuPUMBG.js")), ka = V.lazy(() => import("./Card-C_HNnA8B.js")), Ca = V.lazy(() => import("./Card-CpH1yJmm.js")), mt = () => /* @__PURE__ */ s(
|
|
832
832
|
"div",
|
|
833
833
|
{
|
|
834
834
|
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)]",
|
|
835
835
|
"aria-hidden": !0
|
|
836
836
|
}
|
|
837
|
-
),
|
|
837
|
+
), Sa = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), gs = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(ka, { ...e }) }), ps = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(Ca, { ...e }) }), Ea = gs, Ia = ps, Jt = { Composer: Sa, Sent: gs, Received: ps, Creator: Ea, Visitor: Ia }, Ta = [
|
|
838
838
|
[/pdf/, "pdf"],
|
|
839
839
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
840
840
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -847,39 +847,39 @@ const _a = V.lazy(() => import("./Card-B83PIVO4.js")), Na = V.lazy(() => import(
|
|
|
847
847
|
function oe(e) {
|
|
848
848
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
849
849
|
}
|
|
850
|
-
function
|
|
851
|
-
const t =
|
|
850
|
+
function bs(e) {
|
|
851
|
+
const t = Ta.find(
|
|
852
852
|
([n]) => n.test(e)
|
|
853
853
|
);
|
|
854
854
|
return t ? t[1] : "generic";
|
|
855
855
|
}
|
|
856
|
-
const
|
|
857
|
-
video:
|
|
858
|
-
audio:
|
|
859
|
-
image:
|
|
860
|
-
document:
|
|
861
|
-
},
|
|
862
|
-
pdf:
|
|
863
|
-
doc:
|
|
864
|
-
xls:
|
|
865
|
-
csv:
|
|
866
|
-
ppt:
|
|
867
|
-
zip:
|
|
868
|
-
text:
|
|
869
|
-
markdown:
|
|
870
|
-
generic:
|
|
856
|
+
const Aa = {
|
|
857
|
+
video: ds,
|
|
858
|
+
audio: Fn,
|
|
859
|
+
image: Pn,
|
|
860
|
+
document: cs
|
|
861
|
+
}, Ma = {
|
|
862
|
+
pdf: Hn,
|
|
863
|
+
doc: Gn,
|
|
864
|
+
xls: Vn,
|
|
865
|
+
csv: jn,
|
|
866
|
+
ppt: Un,
|
|
867
|
+
zip: Bn,
|
|
868
|
+
text: $n,
|
|
869
|
+
markdown: On,
|
|
870
|
+
generic: cs
|
|
871
871
|
};
|
|
872
|
-
function
|
|
872
|
+
function Ra(e) {
|
|
873
873
|
const t = oe(e);
|
|
874
|
-
return t !== "document" ?
|
|
874
|
+
return t !== "document" ? Aa[t] : Ma[bs(e)];
|
|
875
875
|
}
|
|
876
876
|
function we(e, t) {
|
|
877
|
-
return V.createElement(
|
|
877
|
+
return V.createElement(Ra(e), t);
|
|
878
878
|
}
|
|
879
|
-
const
|
|
879
|
+
const Da = (e) => {
|
|
880
880
|
var t, n;
|
|
881
881
|
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;
|
|
882
|
-
},
|
|
882
|
+
}, La = ({
|
|
883
883
|
source: e,
|
|
884
884
|
mimeType: t,
|
|
885
885
|
poster: n,
|
|
@@ -891,17 +891,17 @@ const Ma = (e) => {
|
|
|
891
891
|
muted: d = !1,
|
|
892
892
|
onContainerClick: m
|
|
893
893
|
}) => {
|
|
894
|
-
const p = oe(t), h = G(null), g = G(null), c = G(null), b = G(r), [x, v] = U(a), [f, N] = U(0), [w, C] = U(!1), [R, S] = U(!1), [D, $] = U(!1), [F, L] = U(!1), [
|
|
894
|
+
const p = oe(t), h = G(null), g = G(null), c = G(null), b = G(r), [x, v] = U(a), [f, N] = U(0), [w, C] = U(!1), [R, S] = U(!1), [D, $] = U(!1), [F, L] = U(!1), [k, E] = U(!0), [I, M] = U(null), T = J(() => {
|
|
895
895
|
$(!1), v(!0);
|
|
896
|
-
}, []), z =
|
|
896
|
+
}, []), z = J((_) => {
|
|
897
897
|
const A = g.current;
|
|
898
898
|
if (!A) return 0;
|
|
899
899
|
const H = A.getBoundingClientRect();
|
|
900
900
|
return Math.max(
|
|
901
901
|
0,
|
|
902
|
-
Math.min(1, (
|
|
902
|
+
Math.min(1, (Da(_) - H.left) / H.width)
|
|
903
903
|
);
|
|
904
|
-
}, []), O =
|
|
904
|
+
}, []), O = J((_) => {
|
|
905
905
|
const A = h.current;
|
|
906
906
|
A && A.duration && (A.currentTime = _ * A.duration);
|
|
907
907
|
}, []), j = (_) => {
|
|
@@ -909,9 +909,9 @@ const Ma = (e) => {
|
|
|
909
909
|
const A = z(_);
|
|
910
910
|
N(A), O(A);
|
|
911
911
|
};
|
|
912
|
-
|
|
912
|
+
Z(() => {
|
|
913
913
|
r !== void 0 && r !== b.current && (b.current = r, v(r));
|
|
914
|
-
}, [r]),
|
|
914
|
+
}, [r]), Z(() => {
|
|
915
915
|
if (!x) {
|
|
916
916
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
917
917
|
return;
|
|
@@ -923,12 +923,12 @@ const Ma = (e) => {
|
|
|
923
923
|
return c.current = requestAnimationFrame(_), () => {
|
|
924
924
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
925
925
|
};
|
|
926
|
-
}, [x, w]),
|
|
926
|
+
}, [x, w]), Z(() => {
|
|
927
927
|
const _ = h.current;
|
|
928
928
|
_ && (x ? _.play().catch((A) => {
|
|
929
929
|
v(!1), $(!0);
|
|
930
930
|
}) : _.pause());
|
|
931
|
-
}, [x]),
|
|
931
|
+
}, [x]), Z(() => {
|
|
932
932
|
if (!w) return;
|
|
933
933
|
const _ = (H) => N(z(H)), A = (H) => {
|
|
934
934
|
C(!1), O(z(H));
|
|
@@ -962,7 +962,7 @@ const Ma = (e) => {
|
|
|
962
962
|
}
|
|
963
963
|
},
|
|
964
964
|
children: [
|
|
965
|
-
n && (p === "audio" ||
|
|
965
|
+
n && (p === "audio" || k) && /* @__PURE__ */ s(
|
|
966
966
|
"img",
|
|
967
967
|
{
|
|
968
968
|
src: n,
|
|
@@ -970,7 +970,7 @@ const Ma = (e) => {
|
|
|
970
970
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
971
971
|
}
|
|
972
972
|
),
|
|
973
|
-
!n && (p === "audio" ||
|
|
973
|
+
!n && (p === "audio" || k) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: we(t, {
|
|
974
974
|
className: "size-12 text-black/20",
|
|
975
975
|
weight: "regular"
|
|
976
976
|
}) }),
|
|
@@ -1077,7 +1077,7 @@ const Ma = (e) => {
|
|
|
1077
1077
|
},
|
|
1078
1078
|
className: "shrink-0 text-white",
|
|
1079
1079
|
"aria-label": x ? "Pause" : "Play",
|
|
1080
|
-
children: x ? /* @__PURE__ */ s(
|
|
1080
|
+
children: x ? /* @__PURE__ */ s(Yn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(nt, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1081
1081
|
}
|
|
1082
1082
|
),
|
|
1083
1083
|
/* @__PURE__ */ u(
|
|
@@ -1127,7 +1127,7 @@ const Ma = (e) => {
|
|
|
1127
1127
|
]
|
|
1128
1128
|
}
|
|
1129
1129
|
);
|
|
1130
|
-
}, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
1130
|
+
}, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", za = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", vs = ({
|
|
1131
1131
|
mimeType: e,
|
|
1132
1132
|
sourceUrl: t,
|
|
1133
1133
|
thumbnailUrl: n,
|
|
@@ -1138,7 +1138,7 @@ const Ma = (e) => {
|
|
|
1138
1138
|
}) => {
|
|
1139
1139
|
const l = oe(e), [d, m] = U(!1);
|
|
1140
1140
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
|
|
1141
|
-
|
|
1141
|
+
La,
|
|
1142
1142
|
{
|
|
1143
1143
|
source: t,
|
|
1144
1144
|
mimeType: e,
|
|
@@ -1189,7 +1189,7 @@ const Ma = (e) => {
|
|
|
1189
1189
|
weight: "regular"
|
|
1190
1190
|
})
|
|
1191
1191
|
}
|
|
1192
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1192
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${za(r)}`, children: /* @__PURE__ */ s(
|
|
1193
1193
|
"img",
|
|
1194
1194
|
{
|
|
1195
1195
|
src: n,
|
|
@@ -1207,7 +1207,7 @@ const Ma = (e) => {
|
|
|
1207
1207
|
})
|
|
1208
1208
|
}
|
|
1209
1209
|
);
|
|
1210
|
-
},
|
|
1210
|
+
}, xs = ({
|
|
1211
1211
|
variant: e,
|
|
1212
1212
|
thumbnail: t,
|
|
1213
1213
|
title: n,
|
|
@@ -1227,7 +1227,7 @@ const Ma = (e) => {
|
|
|
1227
1227
|
{
|
|
1228
1228
|
ref: p,
|
|
1229
1229
|
"data-testid": h,
|
|
1230
|
-
className:
|
|
1230
|
+
className: y(
|
|
1231
1231
|
"relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
1232
1232
|
g ? "bg-[#1e2330]" : "bg-white"
|
|
1233
1233
|
),
|
|
@@ -1239,7 +1239,7 @@ const Ma = (e) => {
|
|
|
1239
1239
|
c.trim() !== "" && /* @__PURE__ */ s(
|
|
1240
1240
|
"p",
|
|
1241
1241
|
{
|
|
1242
|
-
className:
|
|
1242
|
+
className: y("mb-0.5 truncate text-base font-medium", {
|
|
1243
1243
|
"text-black": !g,
|
|
1244
1244
|
"text-white/30": g && b,
|
|
1245
1245
|
"text-white": g && !b
|
|
@@ -1249,7 +1249,7 @@ const Ma = (e) => {
|
|
|
1249
1249
|
),
|
|
1250
1250
|
/* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1251
1251
|
we(r, {
|
|
1252
|
-
className:
|
|
1252
|
+
className: y(
|
|
1253
1253
|
"size-5 shrink-0",
|
|
1254
1254
|
g ? "text-white/55" : "text-black/55"
|
|
1255
1255
|
),
|
|
@@ -1258,7 +1258,7 @@ const Ma = (e) => {
|
|
|
1258
1258
|
i != null && i !== "" && /* @__PURE__ */ s(
|
|
1259
1259
|
"span",
|
|
1260
1260
|
{
|
|
1261
|
-
className:
|
|
1261
|
+
className: y(
|
|
1262
1262
|
"text-xs font-medium",
|
|
1263
1263
|
g ? "text-white/55" : "text-black/55"
|
|
1264
1264
|
),
|
|
@@ -1273,25 +1273,25 @@ const Ma = (e) => {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
);
|
|
1275
1275
|
};
|
|
1276
|
-
function
|
|
1276
|
+
function ws(e) {
|
|
1277
1277
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1278
1278
|
}
|
|
1279
1279
|
function ht(e) {
|
|
1280
1280
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function Pa(e) {
|
|
1283
1283
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function Fa(e) {
|
|
1286
1286
|
return e ? "text-white" : "text-black";
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function Oa(e) {
|
|
1289
1289
|
return e ? "text-white/55" : "text-black/55";
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function $a(e) {
|
|
1292
1292
|
return e ? "text-white/40" : "text-black/40";
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function Ba(e) {
|
|
1295
1295
|
return e ? "text-white/20" : "text-black/20";
|
|
1296
1296
|
}
|
|
1297
1297
|
const ft = ({ attachment: e, isMyMessage: t }) => {
|
|
@@ -1306,26 +1306,26 @@ const ft = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1306
1306
|
) : /* @__PURE__ */ s(
|
|
1307
1307
|
"div",
|
|
1308
1308
|
{
|
|
1309
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1310
|
-
children: /* @__PURE__ */ s(
|
|
1309
|
+
className: `aspect-video w-full rounded-[20px] ${Pa(t)} flex items-center justify-center`,
|
|
1310
|
+
children: /* @__PURE__ */ s(qn, { className: `size-12 ${Ba(t)}` })
|
|
1311
1311
|
}
|
|
1312
1312
|
) }),
|
|
1313
1313
|
/* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
|
|
1314
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1315
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1316
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1314
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Fa(t)}`, children: n }),
|
|
1315
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Oa(t)}`, children: a }),
|
|
1316
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${$a(t)}`, children: d })
|
|
1317
1317
|
] })
|
|
1318
1318
|
] });
|
|
1319
1319
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
|
|
1320
1320
|
};
|
|
1321
|
-
function
|
|
1321
|
+
function _s(e) {
|
|
1322
1322
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1323
1323
|
}
|
|
1324
1324
|
function gt(e) {
|
|
1325
1325
|
var t;
|
|
1326
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1326
|
+
return (t = e.attachments) == null ? void 0 : t.find(_s);
|
|
1327
1327
|
}
|
|
1328
|
-
async function
|
|
1328
|
+
async function Ua(e, t) {
|
|
1329
1329
|
let n;
|
|
1330
1330
|
try {
|
|
1331
1331
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1337,7 +1337,7 @@ async function $a(e, t) {
|
|
|
1337
1337
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1338
1338
|
o.href = i, o.download = n, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1339
1339
|
}
|
|
1340
|
-
const
|
|
1340
|
+
const ja = ({
|
|
1341
1341
|
url: e,
|
|
1342
1342
|
filename: t
|
|
1343
1343
|
}) => {
|
|
@@ -1349,7 +1349,7 @@ const Ba = ({
|
|
|
1349
1349
|
onClick: (i) => {
|
|
1350
1350
|
i.stopPropagation();
|
|
1351
1351
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1352
|
-
a(!0),
|
|
1352
|
+
a(!0), Ua(e, t).then(() => {
|
|
1353
1353
|
o == null || o.close();
|
|
1354
1354
|
}).catch(() => {
|
|
1355
1355
|
o && (o.location.href = e);
|
|
@@ -1385,16 +1385,16 @@ function pt(e) {
|
|
|
1385
1385
|
thumbnailUrl: p
|
|
1386
1386
|
};
|
|
1387
1387
|
}
|
|
1388
|
-
const
|
|
1388
|
+
const Ns = ({
|
|
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 = a !== void 0 ?
|
|
1395
|
+
const i = a !== void 0 ? ws(a) : void 0;
|
|
1396
1396
|
return /* @__PURE__ */ s(
|
|
1397
|
-
|
|
1397
|
+
xs,
|
|
1398
1398
|
{
|
|
1399
1399
|
variant: "dark",
|
|
1400
1400
|
title: n,
|
|
@@ -1402,7 +1402,7 @@ const _s = ({
|
|
|
1402
1402
|
mimeType: t,
|
|
1403
1403
|
detail: i,
|
|
1404
1404
|
thumbnail: /* @__PURE__ */ s(
|
|
1405
|
-
|
|
1405
|
+
vs,
|
|
1406
1406
|
{
|
|
1407
1407
|
mimeType: t,
|
|
1408
1408
|
sourceUrl: e,
|
|
@@ -1413,23 +1413,23 @@ const _s = ({
|
|
|
1413
1413
|
)
|
|
1414
1414
|
}
|
|
1415
1415
|
);
|
|
1416
|
-
},
|
|
1416
|
+
}, ys = ({
|
|
1417
1417
|
resolvedUrl: e,
|
|
1418
1418
|
resolvedType: t,
|
|
1419
1419
|
title: n,
|
|
1420
1420
|
fileSize: a,
|
|
1421
1421
|
thumbnailUrl: r
|
|
1422
1422
|
}) => {
|
|
1423
|
-
const i = oe(t), o = a !== void 0 ?
|
|
1423
|
+
const i = oe(t), o = a !== void 0 ? ws(a) : void 0;
|
|
1424
1424
|
return /* @__PURE__ */ s(
|
|
1425
|
-
|
|
1425
|
+
xs,
|
|
1426
1426
|
{
|
|
1427
1427
|
variant: "light",
|
|
1428
1428
|
title: n,
|
|
1429
1429
|
mimeType: t,
|
|
1430
1430
|
detail: o,
|
|
1431
1431
|
thumbnail: /* @__PURE__ */ s(
|
|
1432
|
-
|
|
1432
|
+
vs,
|
|
1433
1433
|
{
|
|
1434
1434
|
mimeType: t,
|
|
1435
1435
|
sourceUrl: e,
|
|
@@ -1439,10 +1439,10 @@ const _s = ({
|
|
|
1439
1439
|
containedImage: i === "image" || i === "document"
|
|
1440
1440
|
}
|
|
1441
1441
|
),
|
|
1442
|
-
action: /* @__PURE__ */ s(
|
|
1442
|
+
action: /* @__PURE__ */ s(ja, { url: e, filename: n })
|
|
1443
1443
|
}
|
|
1444
1444
|
);
|
|
1445
|
-
},
|
|
1445
|
+
}, Va = ({
|
|
1446
1446
|
message: e,
|
|
1447
1447
|
isMyMessage: t = !1
|
|
1448
1448
|
}) => {
|
|
@@ -1468,41 +1468,41 @@ const _s = ({
|
|
|
1468
1468
|
className: "str-chat__message-bubble",
|
|
1469
1469
|
"data-attachment-bubble": "true",
|
|
1470
1470
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1471
|
-
children: n ? /* @__PURE__ */ s("div", { className: ht(t), children: /* @__PURE__ */ s(ft, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(
|
|
1471
|
+
children: n ? /* @__PURE__ */ s("div", { className: ht(t), children: /* @__PURE__ */ s(ft, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(Ns, { ...a }) : /* @__PURE__ */ s(ys, { ...a })
|
|
1472
1472
|
}
|
|
1473
1473
|
) })
|
|
1474
1474
|
}
|
|
1475
1475
|
)
|
|
1476
1476
|
] });
|
|
1477
|
-
},
|
|
1477
|
+
}, Ga = ({
|
|
1478
1478
|
message: e
|
|
1479
1479
|
}) => {
|
|
1480
1480
|
const t = gt(e);
|
|
1481
1481
|
if (t)
|
|
1482
1482
|
return /* @__PURE__ */ s("div", { className: ht(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !0 }) });
|
|
1483
1483
|
const n = pt(e);
|
|
1484
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1485
|
-
},
|
|
1484
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
|
|
1485
|
+
}, Ha = ({
|
|
1486
1486
|
message: e
|
|
1487
1487
|
}) => {
|
|
1488
1488
|
const t = gt(e);
|
|
1489
1489
|
if (t)
|
|
1490
1490
|
return /* @__PURE__ */ s("div", { className: ht(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !1 }) });
|
|
1491
1491
|
const n = pt(e);
|
|
1492
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1493
|
-
},
|
|
1494
|
-
Creator:
|
|
1495
|
-
Visitor:
|
|
1496
|
-
}),
|
|
1492
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ys, { ...n }) }) : null;
|
|
1493
|
+
}, gl = Object.assign(Va, {
|
|
1494
|
+
Creator: Ga,
|
|
1495
|
+
Visitor: Ha
|
|
1496
|
+
}), Ya = {
|
|
1497
1497
|
dark: "bg-[#1e2330]",
|
|
1498
1498
|
light: "bg-[#f2f1ef]"
|
|
1499
|
-
},
|
|
1499
|
+
}, qa = {
|
|
1500
1500
|
dark: "text-white",
|
|
1501
1501
|
light: "text-[#000000]"
|
|
1502
|
-
},
|
|
1502
|
+
}, Wa = {
|
|
1503
1503
|
dark: "border-white/[0.08]",
|
|
1504
1504
|
light: "border-black/[0.08]"
|
|
1505
|
-
},
|
|
1505
|
+
}, Xa = (e) => e === "dark" ? "sender" : "receiver", Ka = {
|
|
1506
1506
|
sender: {
|
|
1507
1507
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1508
1508
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1524,13 +1524,13 @@ const _s = ({
|
|
|
1524
1524
|
children: i,
|
|
1525
1525
|
"data-testid": o
|
|
1526
1526
|
}) => {
|
|
1527
|
-
const l = t != null && t !== "", d =
|
|
1527
|
+
const l = t != null && t !== "", d = Ka[Xa(e)][a];
|
|
1528
1528
|
return /* @__PURE__ */ u(
|
|
1529
1529
|
"div",
|
|
1530
1530
|
{
|
|
1531
1531
|
"data-testid": o,
|
|
1532
1532
|
"data-group-position": a,
|
|
1533
|
-
className:
|
|
1533
|
+
className: y(
|
|
1534
1534
|
// 280px-wide bubble — matches the mobile chat attachment width
|
|
1535
1535
|
// and keeps the document / image / audio bubbles visually
|
|
1536
1536
|
// consistent inside the conversation timeline. The 8px / 16px
|
|
@@ -1539,10 +1539,10 @@ const _s = ({
|
|
|
1539
1539
|
// as the surrounding `CustomMessage` text bubbles.
|
|
1540
1540
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
1541
1541
|
d,
|
|
1542
|
-
|
|
1543
|
-
|
|
1542
|
+
Ya[e],
|
|
1543
|
+
qa[e],
|
|
1544
1544
|
n && "border",
|
|
1545
|
-
n &&
|
|
1545
|
+
n && Wa[e],
|
|
1546
1546
|
r
|
|
1547
1547
|
),
|
|
1548
1548
|
children: [
|
|
@@ -1550,7 +1550,7 @@ const _s = ({
|
|
|
1550
1550
|
l ? /* @__PURE__ */ s(
|
|
1551
1551
|
"p",
|
|
1552
1552
|
{
|
|
1553
|
-
className:
|
|
1553
|
+
className: y(
|
|
1554
1554
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
1555
1555
|
// the same font family + size as `.str-chat__message-text`
|
|
1556
1556
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -1579,22 +1579,22 @@ const _s = ({
|
|
|
1579
1579
|
a.stopPropagation(), e();
|
|
1580
1580
|
},
|
|
1581
1581
|
"aria-label": n,
|
|
1582
|
-
className:
|
|
1582
|
+
className: y(
|
|
1583
1583
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
1584
1584
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
1585
1585
|
),
|
|
1586
1586
|
children: /* @__PURE__ */ s(Ue, { className: "size-3", weight: "bold" })
|
|
1587
1587
|
}
|
|
1588
|
-
), Me = (e) => e === "received" ? "light" : "dark",
|
|
1588
|
+
), Me = (e) => e === "received" ? "light" : "dark", Za = ({
|
|
1589
1589
|
firstOfGroup: e,
|
|
1590
1590
|
endOfGroup: t,
|
|
1591
1591
|
groupedByUser: n
|
|
1592
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1592
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ja = ({
|
|
1593
1593
|
src: e,
|
|
1594
1594
|
mimeType: t,
|
|
1595
1595
|
filename: n,
|
|
1596
1596
|
items: a
|
|
1597
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1597
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Qa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
1598
1598
|
/* @__PURE__ */ s(
|
|
1599
1599
|
"audio",
|
|
1600
1600
|
{
|
|
@@ -1617,7 +1617,7 @@ const _s = ({
|
|
|
1617
1617
|
preload: l,
|
|
1618
1618
|
onDismiss: d
|
|
1619
1619
|
}) => {
|
|
1620
|
-
const m = Me(e), p = e === "composer" && !!d, h =
|
|
1620
|
+
const m = Me(e), p = e === "composer" && !!d, h = Ja({ src: t, mimeType: n, filename: a, items: r });
|
|
1621
1621
|
if (h.length === 0)
|
|
1622
1622
|
return null;
|
|
1623
1623
|
const g = l ?? (h.length > 1 ? "none" : "metadata");
|
|
@@ -1629,7 +1629,7 @@ const _s = ({
|
|
|
1629
1629
|
groupPosition: o,
|
|
1630
1630
|
"data-testid": "audio-attachment",
|
|
1631
1631
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ s(
|
|
1632
|
-
|
|
1632
|
+
Qa,
|
|
1633
1633
|
{
|
|
1634
1634
|
item: c,
|
|
1635
1635
|
preload: g,
|
|
@@ -1643,15 +1643,15 @@ const _s = ({
|
|
|
1643
1643
|
)) })
|
|
1644
1644
|
}
|
|
1645
1645
|
);
|
|
1646
|
-
},
|
|
1647
|
-
Composer:
|
|
1648
|
-
Sent:
|
|
1649
|
-
Received:
|
|
1646
|
+
}, er = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), tr = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), sr = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), nr = {
|
|
1647
|
+
Composer: er,
|
|
1648
|
+
Sent: tr,
|
|
1649
|
+
Received: sr
|
|
1650
1650
|
};
|
|
1651
|
-
function
|
|
1651
|
+
function ar(e) {
|
|
1652
1652
|
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`;
|
|
1653
1653
|
}
|
|
1654
|
-
const
|
|
1654
|
+
const rr = {
|
|
1655
1655
|
pdf: "PDF",
|
|
1656
1656
|
doc: "DOC",
|
|
1657
1657
|
xls: "XLS",
|
|
@@ -1661,7 +1661,7 @@ const nr = {
|
|
|
1661
1661
|
text: "TXT",
|
|
1662
1662
|
markdown: "MD"
|
|
1663
1663
|
};
|
|
1664
|
-
function
|
|
1664
|
+
function ir(e, t) {
|
|
1665
1665
|
if (t) {
|
|
1666
1666
|
const r = t.lastIndexOf(".");
|
|
1667
1667
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1671,7 +1671,7 @@ function ar(e, t) {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
if (!e) return;
|
|
1673
1673
|
if (oe(e) === "document") {
|
|
1674
|
-
const r =
|
|
1674
|
+
const r = bs(e), i = rr[r];
|
|
1675
1675
|
if (i) return i;
|
|
1676
1676
|
if (e === "application/octet-stream") return;
|
|
1677
1677
|
}
|
|
@@ -1679,8 +1679,8 @@ function ar(e, t) {
|
|
|
1679
1679
|
if (!(!a || a === "*"))
|
|
1680
1680
|
return a.toUpperCase();
|
|
1681
1681
|
}
|
|
1682
|
-
function
|
|
1683
|
-
const a =
|
|
1682
|
+
function lr(e, t, n) {
|
|
1683
|
+
const a = ir(e, t), r = typeof n == "number" && n > 0 ? ar(n) : void 0;
|
|
1684
1684
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1685
1685
|
}
|
|
1686
1686
|
function re(e) {
|
|
@@ -1691,16 +1691,16 @@ function re(e) {
|
|
|
1691
1691
|
return "download";
|
|
1692
1692
|
}
|
|
1693
1693
|
}
|
|
1694
|
-
const
|
|
1694
|
+
const or = {
|
|
1695
1695
|
dark: "text-white/55",
|
|
1696
1696
|
light: "text-black/65"
|
|
1697
|
-
},
|
|
1697
|
+
}, cr = {
|
|
1698
1698
|
dark: "bg-white/10",
|
|
1699
1699
|
light: "bg-black/5"
|
|
1700
|
-
},
|
|
1700
|
+
}, dr = {
|
|
1701
1701
|
dark: "text-white/85",
|
|
1702
1702
|
light: "text-black/85"
|
|
1703
|
-
},
|
|
1703
|
+
}, ks = ({
|
|
1704
1704
|
variant: e,
|
|
1705
1705
|
filename: t,
|
|
1706
1706
|
title: n,
|
|
@@ -1710,16 +1710,16 @@ const ir = {
|
|
|
1710
1710
|
activateLabel: o,
|
|
1711
1711
|
trailingAction: l
|
|
1712
1712
|
}) => {
|
|
1713
|
-
const d = n ?? t ?? "File", m =
|
|
1713
|
+
const d = n ?? t ?? "File", m = lr(a, t, r), p = /* @__PURE__ */ s(
|
|
1714
1714
|
"div",
|
|
1715
1715
|
{
|
|
1716
|
-
className:
|
|
1716
|
+
className: y(
|
|
1717
1717
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1718
|
-
|
|
1718
|
+
cr[e]
|
|
1719
1719
|
),
|
|
1720
1720
|
"aria-hidden": !0,
|
|
1721
1721
|
children: we(a, {
|
|
1722
|
-
className:
|
|
1722
|
+
className: y("size-6", dr[e]),
|
|
1723
1723
|
weight: "regular"
|
|
1724
1724
|
})
|
|
1725
1725
|
}
|
|
@@ -1728,9 +1728,9 @@ const ir = {
|
|
|
1728
1728
|
m ? /* @__PURE__ */ s(
|
|
1729
1729
|
"p",
|
|
1730
1730
|
{
|
|
1731
|
-
className:
|
|
1731
|
+
className: y(
|
|
1732
1732
|
"truncate text-xs leading-4",
|
|
1733
|
-
|
|
1733
|
+
or[e]
|
|
1734
1734
|
),
|
|
1735
1735
|
children: m
|
|
1736
1736
|
}
|
|
@@ -1741,7 +1741,7 @@ const ir = {
|
|
|
1741
1741
|
type: "button",
|
|
1742
1742
|
onClick: i,
|
|
1743
1743
|
"aria-label": o,
|
|
1744
|
-
className:
|
|
1744
|
+
className: y(
|
|
1745
1745
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
1746
1746
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
1747
1747
|
),
|
|
@@ -1759,7 +1759,7 @@ const ir = {
|
|
|
1759
1759
|
l ? /* @__PURE__ */ s("div", { className: "shrink-0", children: l }) : null
|
|
1760
1760
|
] });
|
|
1761
1761
|
};
|
|
1762
|
-
async function
|
|
1762
|
+
async function Cs(e, t) {
|
|
1763
1763
|
const n = t ?? re(e);
|
|
1764
1764
|
try {
|
|
1765
1765
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -1773,14 +1773,14 @@ async function ks(e, t) {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
|
-
const
|
|
1776
|
+
const ur = ({
|
|
1777
1777
|
src: e,
|
|
1778
1778
|
filename: t,
|
|
1779
1779
|
fileSize: n,
|
|
1780
1780
|
mimeType: a,
|
|
1781
1781
|
title: r,
|
|
1782
1782
|
items: i
|
|
1783
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1783
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], mr = ({
|
|
1784
1784
|
variant: e,
|
|
1785
1785
|
item: t,
|
|
1786
1786
|
index: n,
|
|
@@ -1789,7 +1789,7 @@ const cr = ({
|
|
|
1789
1789
|
}) => {
|
|
1790
1790
|
const i = t.filename ?? re(t.src);
|
|
1791
1791
|
return /* @__PURE__ */ s(
|
|
1792
|
-
|
|
1792
|
+
ks,
|
|
1793
1793
|
{
|
|
1794
1794
|
variant: e,
|
|
1795
1795
|
filename: i,
|
|
@@ -1814,7 +1814,7 @@ const cr = ({
|
|
|
1814
1814
|
onClick: m,
|
|
1815
1815
|
onDismiss: p
|
|
1816
1816
|
}) => {
|
|
1817
|
-
const h = Me(e), g = e === "composer" && !!p, c =
|
|
1817
|
+
const h = Me(e), g = e === "composer" && !!p, c = ur({
|
|
1818
1818
|
src: t,
|
|
1819
1819
|
filename: n,
|
|
1820
1820
|
fileSize: a,
|
|
@@ -1826,14 +1826,14 @@ const cr = ({
|
|
|
1826
1826
|
const f = c[v];
|
|
1827
1827
|
if (!f) return;
|
|
1828
1828
|
const N = f.filename ?? re(f.src);
|
|
1829
|
-
|
|
1829
|
+
Cs(f.src, N);
|
|
1830
1830
|
};
|
|
1831
1831
|
if (c.length === 0)
|
|
1832
1832
|
return null;
|
|
1833
1833
|
const x = /* @__PURE__ */ s(
|
|
1834
1834
|
"span",
|
|
1835
1835
|
{
|
|
1836
|
-
className:
|
|
1836
|
+
className: y(
|
|
1837
1837
|
"flex size-8 items-center justify-center rounded-full",
|
|
1838
1838
|
h === "dark" ? "text-white/70" : "text-black/70"
|
|
1839
1839
|
),
|
|
@@ -1849,7 +1849,7 @@ const cr = ({
|
|
|
1849
1849
|
groupPosition: d,
|
|
1850
1850
|
"data-testid": "file-attachment",
|
|
1851
1851
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((v, f) => /* @__PURE__ */ s(
|
|
1852
|
-
|
|
1852
|
+
mr,
|
|
1853
1853
|
{
|
|
1854
1854
|
variant: h,
|
|
1855
1855
|
item: v,
|
|
@@ -1861,10 +1861,10 @@ const cr = ({
|
|
|
1861
1861
|
)) })
|
|
1862
1862
|
}
|
|
1863
1863
|
);
|
|
1864
|
-
},
|
|
1865
|
-
Composer:
|
|
1866
|
-
Sent:
|
|
1867
|
-
Received:
|
|
1864
|
+
}, hr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "composer" }), fr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "sent" }), gr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "received" }), pr = {
|
|
1865
|
+
Composer: hr,
|
|
1866
|
+
Sent: fr,
|
|
1867
|
+
Received: gr
|
|
1868
1868
|
}, xt = ({
|
|
1869
1869
|
onPrev: e,
|
|
1870
1870
|
onNext: t,
|
|
@@ -1878,7 +1878,7 @@ const cr = ({
|
|
|
1878
1878
|
onClick: e,
|
|
1879
1879
|
"aria-label": n,
|
|
1880
1880
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1881
|
-
children: /* @__PURE__ */ s(
|
|
1881
|
+
children: /* @__PURE__ */ s(Wn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1882
1882
|
}
|
|
1883
1883
|
),
|
|
1884
1884
|
/* @__PURE__ */ s(
|
|
@@ -1891,7 +1891,7 @@ const cr = ({
|
|
|
1891
1891
|
children: /* @__PURE__ */ s(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1892
1892
|
}
|
|
1893
1893
|
)
|
|
1894
|
-
] }),
|
|
1894
|
+
] }), Ss = ({
|
|
1895
1895
|
url: e,
|
|
1896
1896
|
filename: t,
|
|
1897
1897
|
variant: n = "pill",
|
|
@@ -1900,15 +1900,15 @@ const cr = ({
|
|
|
1900
1900
|
tone: i = "dark",
|
|
1901
1901
|
onTriggered: o
|
|
1902
1902
|
}) => {
|
|
1903
|
-
const [l, d] = U(!1), m =
|
|
1903
|
+
const [l, d] = U(!1), m = J(
|
|
1904
1904
|
(c) => {
|
|
1905
|
-
c.stopPropagation(), !l && (d(!0),
|
|
1905
|
+
c.stopPropagation(), !l && (d(!0), Cs(e, t).catch(() => {
|
|
1906
1906
|
}).finally(() => {
|
|
1907
1907
|
d(!1), o == null || o();
|
|
1908
1908
|
}));
|
|
1909
1909
|
},
|
|
1910
1910
|
[l, e, t, o]
|
|
1911
|
-
), p = r ?? n !== "pill", g = { className:
|
|
1911
|
+
), p = r ?? n !== "pill", g = { className: y(
|
|
1912
1912
|
n === "pill" ? "size-4" : "size-5",
|
|
1913
1913
|
"shrink-0"
|
|
1914
1914
|
), weight: "bold" };
|
|
@@ -1919,7 +1919,7 @@ const cr = ({
|
|
|
1919
1919
|
onClick: m,
|
|
1920
1920
|
disabled: l,
|
|
1921
1921
|
"aria-label": a,
|
|
1922
|
-
className:
|
|
1922
|
+
className: y(
|
|
1923
1923
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
1924
1924
|
{
|
|
1925
1925
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
@@ -1959,7 +1959,7 @@ const cr = ({
|
|
|
1959
1959
|
onClick: m,
|
|
1960
1960
|
disabled: l,
|
|
1961
1961
|
"aria-label": p ? a : void 0,
|
|
1962
|
-
className:
|
|
1962
|
+
className: y(
|
|
1963
1963
|
"mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
|
|
1964
1964
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
1965
1965
|
),
|
|
@@ -1982,17 +1982,17 @@ const cr = ({
|
|
|
1982
1982
|
open: n
|
|
1983
1983
|
}) => {
|
|
1984
1984
|
const a = Xe(t, 0, Math.max(e - 1, 0)), [r, i] = U(a);
|
|
1985
|
-
|
|
1985
|
+
Z(() => {
|
|
1986
1986
|
n && i(Xe(t, 0, Math.max(e - 1, 0)));
|
|
1987
|
-
}, [n, t, e]),
|
|
1987
|
+
}, [n, t, e]), Z(() => {
|
|
1988
1988
|
i((d) => Xe(d, 0, Math.max(e - 1, 0)));
|
|
1989
1989
|
}, [e]);
|
|
1990
|
-
const o =
|
|
1990
|
+
const o = J(() => {
|
|
1991
1991
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
1992
|
-
}, [e]), l =
|
|
1992
|
+
}, [e]), l = J(() => {
|
|
1993
1993
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
1994
1994
|
}, [e]);
|
|
1995
|
-
return
|
|
1995
|
+
return Z(() => {
|
|
1996
1996
|
if (!n || e <= 1) return;
|
|
1997
1997
|
const d = (m) => {
|
|
1998
1998
|
if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
|
|
@@ -2011,7 +2011,7 @@ const cr = ({
|
|
|
2011
2011
|
"data-testid": o
|
|
2012
2012
|
}) => {
|
|
2013
2013
|
const l = G(null), d = G(null);
|
|
2014
|
-
return
|
|
2014
|
+
return Z(() => {
|
|
2015
2015
|
var g;
|
|
2016
2016
|
const h = l.current;
|
|
2017
2017
|
if (h) {
|
|
@@ -2091,7 +2091,7 @@ const cr = ({
|
|
|
2091
2091
|
]
|
|
2092
2092
|
}
|
|
2093
2093
|
);
|
|
2094
|
-
},
|
|
2094
|
+
}, Es = ({
|
|
2095
2095
|
open: e,
|
|
2096
2096
|
items: t,
|
|
2097
2097
|
initialIndex: n = 0,
|
|
@@ -2113,7 +2113,7 @@ const cr = ({
|
|
|
2113
2113
|
ariaLabel: d,
|
|
2114
2114
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
2115
2115
|
actions: /* @__PURE__ */ s(
|
|
2116
|
-
|
|
2116
|
+
Ss,
|
|
2117
2117
|
{
|
|
2118
2118
|
url: l.src,
|
|
2119
2119
|
filename: d,
|
|
@@ -2147,7 +2147,7 @@ const cr = ({
|
|
|
2147
2147
|
]
|
|
2148
2148
|
}
|
|
2149
2149
|
) : null;
|
|
2150
|
-
},
|
|
2150
|
+
}, br = "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", Is = ({
|
|
2151
2151
|
tiles: e,
|
|
2152
2152
|
onTileActivate: t,
|
|
2153
2153
|
maxVisible: n = 4,
|
|
@@ -2156,14 +2156,14 @@ const cr = ({
|
|
|
2156
2156
|
const r = e.length;
|
|
2157
2157
|
if (r === 0) return null;
|
|
2158
2158
|
const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, p) => {
|
|
2159
|
-
const h =
|
|
2159
|
+
const h = y(br, "h-full w-full");
|
|
2160
2160
|
return t ? /* @__PURE__ */ u(
|
|
2161
2161
|
"button",
|
|
2162
2162
|
{
|
|
2163
2163
|
type: "button",
|
|
2164
2164
|
onClick: () => t(m),
|
|
2165
2165
|
"aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
|
|
2166
|
-
className:
|
|
2166
|
+
className: y(h, "cursor-zoom-in"),
|
|
2167
2167
|
children: [
|
|
2168
2168
|
d.content,
|
|
2169
2169
|
p
|
|
@@ -2175,10 +2175,10 @@ const cr = ({
|
|
|
2175
2175
|
p
|
|
2176
2176
|
] }, m);
|
|
2177
2177
|
};
|
|
2178
|
-
return i.length === 1 ? /* @__PURE__ */ s("div", { className:
|
|
2178
|
+
return i.length === 1 ? /* @__PURE__ */ s("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
|
|
2179
2179
|
"div",
|
|
2180
2180
|
{
|
|
2181
|
-
className:
|
|
2181
|
+
className: y(
|
|
2182
2182
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
2183
2183
|
a
|
|
2184
2184
|
),
|
|
@@ -2187,7 +2187,7 @@ const cr = ({
|
|
|
2187
2187
|
) : i.length === 3 ? /* @__PURE__ */ u(
|
|
2188
2188
|
"div",
|
|
2189
2189
|
{
|
|
2190
|
-
className:
|
|
2190
|
+
className: y(
|
|
2191
2191
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
2192
2192
|
a
|
|
2193
2193
|
),
|
|
@@ -2200,7 +2200,7 @@ const cr = ({
|
|
|
2200
2200
|
) : /* @__PURE__ */ s(
|
|
2201
2201
|
"div",
|
|
2202
2202
|
{
|
|
2203
|
-
className:
|
|
2203
|
+
className: y(
|
|
2204
2204
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
2205
2205
|
a
|
|
2206
2206
|
),
|
|
@@ -2218,14 +2218,14 @@ const cr = ({
|
|
|
2218
2218
|
}
|
|
2219
2219
|
);
|
|
2220
2220
|
}, Re = (e) => {
|
|
2221
|
-
const [t, n] = U(!1), [a, r] = U(0), i =
|
|
2221
|
+
const [t, n] = U(!1), [a, r] = U(0), i = J(
|
|
2222
2222
|
(l) => {
|
|
2223
2223
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), n(!0));
|
|
2224
2224
|
},
|
|
2225
2225
|
[e]
|
|
2226
|
-
), o =
|
|
2226
|
+
), o = J(() => n(!1), []);
|
|
2227
2227
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
2228
|
-
},
|
|
2228
|
+
}, vr = (e, t, n, a) => ({
|
|
2229
2229
|
ariaLabel: `Open image ${t + 1} of ${n}`,
|
|
2230
2230
|
content: /* @__PURE__ */ s(
|
|
2231
2231
|
"img",
|
|
@@ -2240,15 +2240,15 @@ const cr = ({
|
|
|
2240
2240
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2241
2241
|
}
|
|
2242
2242
|
)
|
|
2243
|
-
}),
|
|
2243
|
+
}), xr = ({
|
|
2244
2244
|
src: e,
|
|
2245
2245
|
alt: t,
|
|
2246
2246
|
items: n
|
|
2247
|
-
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [],
|
|
2247
|
+
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ts = (e, t) => e.map((n, a) => ({
|
|
2248
2248
|
src: n.src,
|
|
2249
2249
|
alt: n.alt,
|
|
2250
2250
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2251
|
-
})),
|
|
2251
|
+
})), wr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2252
2252
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Re(
|
|
2253
2253
|
r
|
|
2254
2254
|
);
|
|
@@ -2275,16 +2275,16 @@ const cr = ({
|
|
|
2275
2275
|
),
|
|
2276
2276
|
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
|
|
2277
2277
|
/* @__PURE__ */ s(
|
|
2278
|
-
|
|
2278
|
+
Es,
|
|
2279
2279
|
{
|
|
2280
2280
|
open: o,
|
|
2281
|
-
items:
|
|
2281
|
+
items: Ts([{ src: e, alt: t }], n),
|
|
2282
2282
|
initialIndex: l,
|
|
2283
2283
|
onClose: m
|
|
2284
2284
|
}
|
|
2285
2285
|
)
|
|
2286
2286
|
] });
|
|
2287
|
-
},
|
|
2287
|
+
}, As = ({
|
|
2288
2288
|
state: e,
|
|
2289
2289
|
src: t,
|
|
2290
2290
|
alt: n,
|
|
@@ -2295,13 +2295,13 @@ const cr = ({
|
|
|
2295
2295
|
loading: l = "lazy",
|
|
2296
2296
|
onClick: d
|
|
2297
2297
|
}) => {
|
|
2298
|
-
const m =
|
|
2298
|
+
const m = xr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Re(
|
|
2299
2299
|
d
|
|
2300
2300
|
);
|
|
2301
2301
|
if (m.length === 0)
|
|
2302
2302
|
return null;
|
|
2303
2303
|
const x = m.map(
|
|
2304
|
-
(v, f) =>
|
|
2304
|
+
(v, f) => vr(v, f, m.length, l)
|
|
2305
2305
|
);
|
|
2306
2306
|
return /* @__PURE__ */ u(
|
|
2307
2307
|
Te,
|
|
@@ -2311,12 +2311,12 @@ const cr = ({
|
|
|
2311
2311
|
groupPosition: o,
|
|
2312
2312
|
"data-testid": "image-attachment",
|
|
2313
2313
|
children: [
|
|
2314
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2314
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Is, { tiles: x, onTileActivate: c }) }),
|
|
2315
2315
|
/* @__PURE__ */ s(
|
|
2316
|
-
|
|
2316
|
+
Es,
|
|
2317
2317
|
{
|
|
2318
2318
|
open: h,
|
|
2319
|
-
items:
|
|
2319
|
+
items: Ts(m, a),
|
|
2320
2320
|
initialIndex: g,
|
|
2321
2321
|
onClose: b
|
|
2322
2322
|
}
|
|
@@ -2324,11 +2324,11 @@ const cr = ({
|
|
|
2324
2324
|
]
|
|
2325
2325
|
}
|
|
2326
2326
|
);
|
|
2327
|
-
},
|
|
2328
|
-
Composer:
|
|
2329
|
-
Sent:
|
|
2330
|
-
Received:
|
|
2331
|
-
},
|
|
2327
|
+
}, _r = (e) => /* @__PURE__ */ s(wr, { ...e }), Nr = (e) => /* @__PURE__ */ s(As, { ...e, state: "sent" }), yr = (e) => /* @__PURE__ */ s(As, { ...e, state: "received" }), kr = {
|
|
2328
|
+
Composer: _r,
|
|
2329
|
+
Sent: Nr,
|
|
2330
|
+
Received: yr
|
|
2331
|
+
}, Cr = ({
|
|
2332
2332
|
open: e,
|
|
2333
2333
|
items: t,
|
|
2334
2334
|
initialIndex: n = 0,
|
|
@@ -2342,7 +2342,7 @@ const cr = ({
|
|
|
2342
2342
|
() => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
|
|
2343
2343
|
[l]
|
|
2344
2344
|
), m = ae(
|
|
2345
|
-
() => l ?
|
|
2345
|
+
() => l ? Sr(l.src) : void 0,
|
|
2346
2346
|
[l]
|
|
2347
2347
|
);
|
|
2348
2348
|
return !l || !m ? null : /* @__PURE__ */ u(
|
|
@@ -2376,16 +2376,16 @@ const cr = ({
|
|
|
2376
2376
|
]
|
|
2377
2377
|
}
|
|
2378
2378
|
);
|
|
2379
|
-
},
|
|
2379
|
+
}, Sr = (e) => {
|
|
2380
2380
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2381
2381
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2382
|
-
},
|
|
2382
|
+
}, Er = ({
|
|
2383
2383
|
src: e,
|
|
2384
2384
|
filename: t,
|
|
2385
2385
|
fileSize: n,
|
|
2386
2386
|
title: a,
|
|
2387
2387
|
items: r
|
|
2388
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2388
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Ir = ({
|
|
2389
2389
|
variant: e,
|
|
2390
2390
|
item: t,
|
|
2391
2391
|
index: n,
|
|
@@ -2394,7 +2394,7 @@ const cr = ({
|
|
|
2394
2394
|
}) => {
|
|
2395
2395
|
const i = t.filename ?? re(t.src);
|
|
2396
2396
|
return /* @__PURE__ */ s(
|
|
2397
|
-
|
|
2397
|
+
ks,
|
|
2398
2398
|
{
|
|
2399
2399
|
variant: e,
|
|
2400
2400
|
filename: i,
|
|
@@ -2418,7 +2418,7 @@ const cr = ({
|
|
|
2418
2418
|
onClick: d,
|
|
2419
2419
|
onDismiss: m
|
|
2420
2420
|
}) => {
|
|
2421
|
-
const p = Me(e), h =
|
|
2421
|
+
const p = Me(e), h = Er({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: x } = Re(
|
|
2422
2422
|
d
|
|
2423
2423
|
), v = e === "composer" && !!m;
|
|
2424
2424
|
if (h.length === 0)
|
|
@@ -2437,7 +2437,7 @@ const cr = ({
|
|
|
2437
2437
|
children: [
|
|
2438
2438
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((N, w) => {
|
|
2439
2439
|
const C = N.filename ?? re(N.src), R = v && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2440
|
-
|
|
2440
|
+
Ss,
|
|
2441
2441
|
{
|
|
2442
2442
|
url: N.src,
|
|
2443
2443
|
filename: C,
|
|
@@ -2447,7 +2447,7 @@ const cr = ({
|
|
|
2447
2447
|
}
|
|
2448
2448
|
);
|
|
2449
2449
|
return /* @__PURE__ */ s(
|
|
2450
|
-
|
|
2450
|
+
Ir,
|
|
2451
2451
|
{
|
|
2452
2452
|
variant: p,
|
|
2453
2453
|
item: N,
|
|
@@ -2459,7 +2459,7 @@ const cr = ({
|
|
|
2459
2459
|
);
|
|
2460
2460
|
}) }),
|
|
2461
2461
|
/* @__PURE__ */ s(
|
|
2462
|
-
|
|
2462
|
+
Cr,
|
|
2463
2463
|
{
|
|
2464
2464
|
open: g,
|
|
2465
2465
|
items: f,
|
|
@@ -2470,11 +2470,11 @@ const cr = ({
|
|
|
2470
2470
|
]
|
|
2471
2471
|
}
|
|
2472
2472
|
);
|
|
2473
|
-
},
|
|
2474
|
-
Composer:
|
|
2475
|
-
Sent:
|
|
2476
|
-
Received:
|
|
2477
|
-
},
|
|
2473
|
+
}, Tr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "composer" }), Ar = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "sent" }), Mr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "received" }), Rr = {
|
|
2474
|
+
Composer: Tr,
|
|
2475
|
+
Sent: Ar,
|
|
2476
|
+
Received: Mr
|
|
2477
|
+
}, Ms = ({
|
|
2478
2478
|
open: e,
|
|
2479
2479
|
items: t,
|
|
2480
2480
|
initialIndex: n = 0,
|
|
@@ -2524,7 +2524,7 @@ const cr = ({
|
|
|
2524
2524
|
]
|
|
2525
2525
|
}
|
|
2526
2526
|
) : null;
|
|
2527
|
-
},
|
|
2527
|
+
}, Dr = () => /* @__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(nt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Rs = ({
|
|
2528
2528
|
item: e,
|
|
2529
2529
|
index: t
|
|
2530
2530
|
}) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2539,30 +2539,30 @@ const cr = ({
|
|
|
2539
2539
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2540
2540
|
}
|
|
2541
2541
|
) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
2542
|
-
|
|
2542
|
+
ds,
|
|
2543
2543
|
{
|
|
2544
2544
|
className: "size-16 rounded-md text-white/30",
|
|
2545
2545
|
weight: "regular",
|
|
2546
2546
|
"aria-hidden": !0
|
|
2547
2547
|
}
|
|
2548
2548
|
) }),
|
|
2549
|
-
/* @__PURE__ */ s(
|
|
2550
|
-
] }),
|
|
2549
|
+
/* @__PURE__ */ s(Dr, {})
|
|
2550
|
+
] }), Lr = (e, t, n) => ({
|
|
2551
2551
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2552
|
-
content: /* @__PURE__ */ s(
|
|
2553
|
-
}),
|
|
2552
|
+
content: /* @__PURE__ */ s(Rs, { item: e, index: t })
|
|
2553
|
+
}), zr = ({
|
|
2554
2554
|
src: e,
|
|
2555
2555
|
poster: t,
|
|
2556
2556
|
mimeType: n,
|
|
2557
2557
|
preload: a,
|
|
2558
2558
|
items: r
|
|
2559
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [],
|
|
2559
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Ds = (e, t) => e.map((n, a) => ({
|
|
2560
2560
|
src: n.src,
|
|
2561
2561
|
poster: n.poster,
|
|
2562
2562
|
mimeType: n.mimeType,
|
|
2563
2563
|
preload: n.preload,
|
|
2564
2564
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2565
|
-
})),
|
|
2565
|
+
})), Pr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
2566
2566
|
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: p } = Re(
|
|
2567
2567
|
i
|
|
2568
2568
|
);
|
|
@@ -2574,15 +2574,15 @@ const cr = ({
|
|
|
2574
2574
|
onClick: () => m(0),
|
|
2575
2575
|
"aria-label": "Play video",
|
|
2576
2576
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
2577
|
-
children: /* @__PURE__ */ s(
|
|
2577
|
+
children: /* @__PURE__ */ s(Rs, { item: { src: e, poster: t, mimeType: n }, index: 0 })
|
|
2578
2578
|
}
|
|
2579
2579
|
),
|
|
2580
2580
|
o ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: o }) }) : null,
|
|
2581
2581
|
/* @__PURE__ */ s(
|
|
2582
|
-
|
|
2582
|
+
Ms,
|
|
2583
2583
|
{
|
|
2584
2584
|
open: l,
|
|
2585
|
-
items:
|
|
2585
|
+
items: Ds(
|
|
2586
2586
|
[{ src: e, poster: t, mimeType: n, preload: r }],
|
|
2587
2587
|
a
|
|
2588
2588
|
),
|
|
@@ -2591,7 +2591,7 @@ const cr = ({
|
|
|
2591
2591
|
}
|
|
2592
2592
|
)
|
|
2593
2593
|
] });
|
|
2594
|
-
},
|
|
2594
|
+
}, Ls = ({
|
|
2595
2595
|
state: e,
|
|
2596
2596
|
src: t,
|
|
2597
2597
|
poster: n,
|
|
@@ -2603,13 +2603,13 @@ const cr = ({
|
|
|
2603
2603
|
preload: d,
|
|
2604
2604
|
onClick: m
|
|
2605
2605
|
}) => {
|
|
2606
|
-
const p =
|
|
2606
|
+
const p = zr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: x } = Re(
|
|
2607
2607
|
m
|
|
2608
2608
|
);
|
|
2609
2609
|
if (p.length === 0)
|
|
2610
2610
|
return null;
|
|
2611
2611
|
const v = p.map(
|
|
2612
|
-
(f, N) =>
|
|
2612
|
+
(f, N) => Lr(f, N, p.length)
|
|
2613
2613
|
);
|
|
2614
2614
|
return /* @__PURE__ */ u(
|
|
2615
2615
|
Te,
|
|
@@ -2620,7 +2620,7 @@ const cr = ({
|
|
|
2620
2620
|
"data-testid": "video-attachment",
|
|
2621
2621
|
children: [
|
|
2622
2622
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2623
|
-
|
|
2623
|
+
Is,
|
|
2624
2624
|
{
|
|
2625
2625
|
tiles: v,
|
|
2626
2626
|
onTileActivate: b,
|
|
@@ -2628,10 +2628,10 @@ const cr = ({
|
|
|
2628
2628
|
}
|
|
2629
2629
|
) }),
|
|
2630
2630
|
/* @__PURE__ */ s(
|
|
2631
|
-
|
|
2631
|
+
Ms,
|
|
2632
2632
|
{
|
|
2633
2633
|
open: g,
|
|
2634
|
-
items:
|
|
2634
|
+
items: Ds(p, r),
|
|
2635
2635
|
initialIndex: c,
|
|
2636
2636
|
onClose: x
|
|
2637
2637
|
}
|
|
@@ -2639,25 +2639,25 @@ const cr = ({
|
|
|
2639
2639
|
]
|
|
2640
2640
|
}
|
|
2641
2641
|
);
|
|
2642
|
-
},
|
|
2643
|
-
Composer:
|
|
2644
|
-
Sent:
|
|
2645
|
-
Received:
|
|
2642
|
+
}, Fr = (e) => /* @__PURE__ */ s(Pr, { ...e }), Or = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), $r = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Br = {
|
|
2643
|
+
Composer: Fr,
|
|
2644
|
+
Sent: Or,
|
|
2645
|
+
Received: $r
|
|
2646
2646
|
}, ye = {
|
|
2647
|
-
Image:
|
|
2648
|
-
Video:
|
|
2649
|
-
Audio:
|
|
2650
|
-
Pdf:
|
|
2651
|
-
File:
|
|
2652
|
-
},
|
|
2647
|
+
Image: kr,
|
|
2648
|
+
Video: Br,
|
|
2649
|
+
Audio: nr,
|
|
2650
|
+
Pdf: Rr,
|
|
2651
|
+
File: pr
|
|
2652
|
+
}, Ur = {
|
|
2653
2653
|
isUnlocking: () => !1
|
|
2654
|
-
},
|
|
2655
|
-
LockedAttachment:
|
|
2656
|
-
},
|
|
2657
|
-
function
|
|
2658
|
-
return Ie(
|
|
2654
|
+
}, jr = {
|
|
2655
|
+
LockedAttachment: Ur
|
|
2656
|
+
}, zs = lt({}), pl = zs.Provider;
|
|
2657
|
+
function Vr(e) {
|
|
2658
|
+
return Ie(zs)[e] ?? jr[e];
|
|
2659
2659
|
}
|
|
2660
|
-
const
|
|
2660
|
+
const Gr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2661
2661
|
"svg",
|
|
2662
2662
|
{
|
|
2663
2663
|
width: e,
|
|
@@ -2674,21 +2674,21 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2674
2674
|
}
|
|
2675
2675
|
)
|
|
2676
2676
|
}
|
|
2677
|
-
),
|
|
2677
|
+
), Hr = (e) => {
|
|
2678
2678
|
var t;
|
|
2679
2679
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
2680
|
-
},
|
|
2680
|
+
}, Yr = (e) => {
|
|
2681
2681
|
var t;
|
|
2682
2682
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
2683
2683
|
}, Fe = (e) => {
|
|
2684
2684
|
var t;
|
|
2685
2685
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
2686
|
-
},
|
|
2686
|
+
}, qr = (e) => {
|
|
2687
2687
|
var t;
|
|
2688
2688
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
2689
|
-
},
|
|
2689
|
+
}, Ps = (e) => Hr(e) || Yr(e), Wr = (e) => {
|
|
2690
2690
|
var t;
|
|
2691
|
-
return
|
|
2691
|
+
return Ps(e) && !((t = e.text) != null && t.trim());
|
|
2692
2692
|
}, Ke = ({
|
|
2693
2693
|
message: e,
|
|
2694
2694
|
standalone: t = !1,
|
|
@@ -2696,7 +2696,7 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2696
2696
|
hasAttachment: a = !1
|
|
2697
2697
|
}) => {
|
|
2698
2698
|
var h;
|
|
2699
|
-
const r =
|
|
2699
|
+
const r = Ps(e), i = Fe(e);
|
|
2700
2700
|
if (!r && !i)
|
|
2701
2701
|
return null;
|
|
2702
2702
|
if (r) {
|
|
@@ -2704,7 +2704,7 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2704
2704
|
if (!g) return null;
|
|
2705
2705
|
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${g} tip` : `Delivered with ${g} tip`;
|
|
2706
2706
|
return /* @__PURE__ */ u("div", { className: c, children: [
|
|
2707
|
-
/* @__PURE__ */ s(
|
|
2707
|
+
/* @__PURE__ */ s(Xn, { size: t ? 14 : 12 }),
|
|
2708
2708
|
/* @__PURE__ */ s("span", { children: b })
|
|
2709
2709
|
] });
|
|
2710
2710
|
}
|
|
@@ -2712,7 +2712,7 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2712
2712
|
"message-chatbot-indicator",
|
|
2713
2713
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2714
2714
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2715
|
-
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(
|
|
2715
|
+
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Gr, { size: o ? 12 : 15 }) });
|
|
2716
2716
|
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(te, { children: [
|
|
2717
2717
|
m,
|
|
2718
2718
|
p
|
|
@@ -2720,7 +2720,7 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2720
2720
|
p,
|
|
2721
2721
|
m
|
|
2722
2722
|
] }) });
|
|
2723
|
-
},
|
|
2723
|
+
}, Xr = ({
|
|
2724
2724
|
selected: e,
|
|
2725
2725
|
onVoteUp: t,
|
|
2726
2726
|
onVoteDown: n
|
|
@@ -2729,31 +2729,31 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2729
2729
|
"button",
|
|
2730
2730
|
{
|
|
2731
2731
|
type: "button",
|
|
2732
|
-
className:
|
|
2732
|
+
className: y("message-vote-button focus-ring", {
|
|
2733
2733
|
"message-vote-button--selected": e === "up"
|
|
2734
2734
|
}),
|
|
2735
2735
|
onClick: t,
|
|
2736
2736
|
"aria-label": "Good response",
|
|
2737
2737
|
"aria-pressed": e === "up",
|
|
2738
2738
|
"data-tooltip": "Good response",
|
|
2739
|
-
children: /* @__PURE__ */ s(
|
|
2739
|
+
children: /* @__PURE__ */ s(Kn, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
2740
2740
|
}
|
|
2741
2741
|
),
|
|
2742
2742
|
/* @__PURE__ */ s(
|
|
2743
2743
|
"button",
|
|
2744
2744
|
{
|
|
2745
2745
|
type: "button",
|
|
2746
|
-
className:
|
|
2746
|
+
className: y("message-vote-button focus-ring", {
|
|
2747
2747
|
"message-vote-button--selected": e === "down"
|
|
2748
2748
|
}),
|
|
2749
2749
|
onClick: n,
|
|
2750
2750
|
"aria-label": "Bad response",
|
|
2751
2751
|
"aria-pressed": e === "down",
|
|
2752
2752
|
"data-tooltip": "Bad response",
|
|
2753
|
-
children: /* @__PURE__ */ s(
|
|
2753
|
+
children: /* @__PURE__ */ s(Zn, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2754
2754
|
}
|
|
2755
2755
|
)
|
|
2756
|
-
] }),
|
|
2756
|
+
] }), Ze = () => {
|
|
2757
2757
|
const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), n = (() => {
|
|
2758
2758
|
if (t)
|
|
2759
2759
|
for (let a = t.length - 1; a >= 0; a -= 1) {
|
|
@@ -2763,36 +2763,36 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2763
2763
|
}
|
|
2764
2764
|
})();
|
|
2765
2765
|
return e.id !== n ? null : /* @__PURE__ */ u(te, { children: [
|
|
2766
|
-
/* @__PURE__ */ s(
|
|
2766
|
+
/* @__PURE__ */ s(Jn, { weight: "bold", "aria-hidden": "true" }),
|
|
2767
2767
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2768
2768
|
] });
|
|
2769
|
-
},
|
|
2770
|
-
|
|
2769
|
+
}, Kr = () => null, Zr = () => /* @__PURE__ */ s(
|
|
2770
|
+
Zs,
|
|
2771
2771
|
{
|
|
2772
|
-
MessageSentStatus:
|
|
2773
|
-
MessageDeliveredStatus:
|
|
2774
|
-
MessageReadStatus:
|
|
2775
|
-
MessageSendingStatus:
|
|
2772
|
+
MessageSentStatus: Ze,
|
|
2773
|
+
MessageDeliveredStatus: Ze,
|
|
2774
|
+
MessageReadStatus: Ze,
|
|
2775
|
+
MessageSendingStatus: Kr
|
|
2776
2776
|
}
|
|
2777
|
-
),
|
|
2777
|
+
), Jr = /^([a-z][a-z0-9+.-]*):/i, Qr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2778
2778
|
function yt(e) {
|
|
2779
2779
|
if (typeof e != "string") return;
|
|
2780
2780
|
const t = e.trim();
|
|
2781
2781
|
if (t === "") return;
|
|
2782
|
-
const n =
|
|
2782
|
+
const n = Jr.exec(t);
|
|
2783
2783
|
if (n) {
|
|
2784
2784
|
const a = n[1].toLowerCase();
|
|
2785
|
-
return
|
|
2785
|
+
return Qr.has(a) ? t : void 0;
|
|
2786
2786
|
}
|
|
2787
2787
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2788
2788
|
}
|
|
2789
|
-
const
|
|
2789
|
+
const ei = {
|
|
2790
2790
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2791
2791
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2792
|
-
},
|
|
2793
|
-
const n =
|
|
2792
|
+
}, ti = ({ variant: e, cta: t }) => {
|
|
2793
|
+
const n = y(
|
|
2794
2794
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2795
|
-
|
|
2795
|
+
ei[e]
|
|
2796
2796
|
), a = yt(t.href);
|
|
2797
2797
|
return a ? /* @__PURE__ */ s(
|
|
2798
2798
|
"a",
|
|
@@ -2819,10 +2819,10 @@ const Zr = {
|
|
|
2819
2819
|
children: t.label
|
|
2820
2820
|
}
|
|
2821
2821
|
);
|
|
2822
|
-
},
|
|
2822
|
+
}, si = {
|
|
2823
2823
|
dark: "text-white",
|
|
2824
2824
|
light: "text-black/90"
|
|
2825
|
-
},
|
|
2825
|
+
}, ni = "text-white/30", ai = {
|
|
2826
2826
|
dark: "text-white/55",
|
|
2827
2827
|
light: "text-black/55"
|
|
2828
2828
|
}, kt = ({
|
|
@@ -2837,12 +2837,12 @@ const Zr = {
|
|
|
2837
2837
|
}) => {
|
|
2838
2838
|
const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", p = m.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", b = o != null;
|
|
2839
2839
|
if (!p && !h && !c && !b) return null;
|
|
2840
|
-
const v =
|
|
2840
|
+
const v = y(
|
|
2841
2841
|
"truncate text-base font-medium leading-6",
|
|
2842
|
-
d && !t ?
|
|
2843
|
-
), f =
|
|
2842
|
+
d && !t ? ni : si[e]
|
|
2843
|
+
), f = y(
|
|
2844
2844
|
"truncate text-xs leading-4",
|
|
2845
|
-
|
|
2845
|
+
ai[e]
|
|
2846
2846
|
);
|
|
2847
2847
|
return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
|
|
2848
2848
|
/* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2850,7 +2850,7 @@ const Zr = {
|
|
|
2850
2850
|
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2851
2851
|
p && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2852
2852
|
i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
|
|
2853
|
-
/* @__PURE__ */ s("p", { className:
|
|
2853
|
+
/* @__PURE__ */ s("p", { className: y("min-w-0", v), children: m })
|
|
2854
2854
|
] }),
|
|
2855
2855
|
h && /* @__PURE__ */ s("p", { className: f, children: a })
|
|
2856
2856
|
] }),
|
|
@@ -2858,9 +2858,9 @@ const Zr = {
|
|
|
2858
2858
|
] }),
|
|
2859
2859
|
l && /* @__PURE__ */ s("div", { className: "shrink-0", children: l })
|
|
2860
2860
|
] }),
|
|
2861
|
-
o && /* @__PURE__ */ s(
|
|
2861
|
+
o && /* @__PURE__ */ s(ti, { variant: e, cta: o })
|
|
2862
2862
|
] });
|
|
2863
|
-
},
|
|
2863
|
+
}, ri = y(
|
|
2864
2864
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2865
2865
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2866
2866
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2878,8 +2878,8 @@ const Zr = {
|
|
|
2878
2878
|
bgClassName: l,
|
|
2879
2879
|
"data-testid": d
|
|
2880
2880
|
}) => {
|
|
2881
|
-
const m = n != null || a != null, p =
|
|
2882
|
-
|
|
2881
|
+
const m = n != null || a != null, p = y(
|
|
2882
|
+
ri,
|
|
2883
2883
|
l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
|
|
2884
2884
|
// `focus-ring` is a design-system utility from the component-library
|
|
2885
2885
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2909,7 +2909,7 @@ const Zr = {
|
|
|
2909
2909
|
onClick: a,
|
|
2910
2910
|
"aria-label": r,
|
|
2911
2911
|
"data-testid": d,
|
|
2912
|
-
className:
|
|
2912
|
+
className: y(p, "text-left"),
|
|
2913
2913
|
children: [
|
|
2914
2914
|
t,
|
|
2915
2915
|
h
|
|
@@ -2927,10 +2927,10 @@ const Zr = {
|
|
|
2927
2927
|
]
|
|
2928
2928
|
}
|
|
2929
2929
|
);
|
|
2930
|
-
},
|
|
2930
|
+
}, ii = {
|
|
2931
2931
|
dark: "bg-white/10",
|
|
2932
2932
|
light: "bg-black/5"
|
|
2933
|
-
},
|
|
2933
|
+
}, li = {
|
|
2934
2934
|
dark: "size-16 text-white/25",
|
|
2935
2935
|
light: "size-16 text-black/25"
|
|
2936
2936
|
}, Ve = (e, t) => !!t && !!e && oe(e) === "audio", Ct = (e, t) => {
|
|
@@ -2959,7 +2959,7 @@ const Zr = {
|
|
|
2959
2959
|
) }) : /* @__PURE__ */ u(
|
|
2960
2960
|
"div",
|
|
2961
2961
|
{
|
|
2962
|
-
className:
|
|
2962
|
+
className: y(
|
|
2963
2963
|
"relative h-[180px] w-full overflow-hidden",
|
|
2964
2964
|
d && "bg-black"
|
|
2965
2965
|
),
|
|
@@ -2986,12 +2986,12 @@ const Zr = {
|
|
|
2986
2986
|
) : /* @__PURE__ */ s(
|
|
2987
2987
|
"div",
|
|
2988
2988
|
{
|
|
2989
|
-
className:
|
|
2989
|
+
className: y(
|
|
2990
2990
|
"flex h-full w-full items-center justify-center",
|
|
2991
|
-
|
|
2991
|
+
ii[e]
|
|
2992
2992
|
),
|
|
2993
2993
|
children: we(r, {
|
|
2994
|
-
className:
|
|
2994
|
+
className: li[e],
|
|
2995
2995
|
weight: "regular"
|
|
2996
2996
|
})
|
|
2997
2997
|
}
|
|
@@ -3001,7 +3001,7 @@ const Zr = {
|
|
|
3001
3001
|
]
|
|
3002
3002
|
}
|
|
3003
3003
|
);
|
|
3004
|
-
},
|
|
3004
|
+
}, oi = ({
|
|
3005
3005
|
title: e,
|
|
3006
3006
|
placeholderTitle: t,
|
|
3007
3007
|
description: n,
|
|
@@ -3031,7 +3031,7 @@ const Zr = {
|
|
|
3031
3031
|
onClick: h,
|
|
3032
3032
|
"aria-label": "Edit attachment",
|
|
3033
3033
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3034
|
-
children: /* @__PURE__ */ s(
|
|
3034
|
+
children: /* @__PURE__ */ s(Qn, { className: "size-5", weight: "regular" })
|
|
3035
3035
|
}
|
|
3036
3036
|
) : void 0;
|
|
3037
3037
|
return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: St, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -3078,7 +3078,7 @@ const Zr = {
|
|
|
3078
3078
|
]
|
|
3079
3079
|
}
|
|
3080
3080
|
);
|
|
3081
|
-
},
|
|
3081
|
+
}, ci = ({
|
|
3082
3082
|
title: e,
|
|
3083
3083
|
description: t,
|
|
3084
3084
|
url: n,
|
|
@@ -3131,7 +3131,7 @@ const Zr = {
|
|
|
3131
3131
|
]
|
|
3132
3132
|
}
|
|
3133
3133
|
);
|
|
3134
|
-
},
|
|
3134
|
+
}, di = ({
|
|
3135
3135
|
title: e,
|
|
3136
3136
|
placeholderTitle: t,
|
|
3137
3137
|
description: n,
|
|
@@ -3179,9 +3179,9 @@ const Zr = {
|
|
|
3179
3179
|
}
|
|
3180
3180
|
);
|
|
3181
3181
|
}, es = {
|
|
3182
|
-
Composer:
|
|
3183
|
-
Sent:
|
|
3184
|
-
Received:
|
|
3182
|
+
Composer: oi,
|
|
3183
|
+
Sent: di,
|
|
3184
|
+
Received: ci
|
|
3185
3185
|
};
|
|
3186
3186
|
function P(e) {
|
|
3187
3187
|
const t = e == null ? void 0 : e.trim();
|
|
@@ -3190,7 +3190,7 @@ function P(e) {
|
|
|
3190
3190
|
function ts(e) {
|
|
3191
3191
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3192
3192
|
}
|
|
3193
|
-
function
|
|
3193
|
+
function ui(e, t) {
|
|
3194
3194
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3195
3195
|
return !1;
|
|
3196
3196
|
const n = ts(e), a = ts(t);
|
|
@@ -3215,15 +3215,15 @@ function ss(e) {
|
|
|
3215
3215
|
mimeType: r
|
|
3216
3216
|
};
|
|
3217
3217
|
}
|
|
3218
|
-
function
|
|
3218
|
+
function mi(e) {
|
|
3219
3219
|
var t;
|
|
3220
|
-
return
|
|
3220
|
+
return Fs(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;
|
|
3221
3221
|
}
|
|
3222
|
-
function
|
|
3222
|
+
function Fs(e) {
|
|
3223
3223
|
const t = P(e.og_scrape_url);
|
|
3224
3224
|
return e.type === "link" || !!t && !e.asset_url;
|
|
3225
3225
|
}
|
|
3226
|
-
function
|
|
3226
|
+
function Os(e) {
|
|
3227
3227
|
if (!(e != null && e.length)) return [];
|
|
3228
3228
|
const t = [], n = (r, i) => {
|
|
3229
3229
|
const o = t[t.length - 1];
|
|
@@ -3241,25 +3241,25 @@ function Fs(e) {
|
|
|
3241
3241
|
t.push({ type: "link", attachments: [r] });
|
|
3242
3242
|
};
|
|
3243
3243
|
for (const r of e) {
|
|
3244
|
-
if (
|
|
3244
|
+
if (Fs(r)) {
|
|
3245
3245
|
a(r);
|
|
3246
3246
|
continue;
|
|
3247
3247
|
}
|
|
3248
|
-
const i =
|
|
3248
|
+
const i = mi(r);
|
|
3249
3249
|
i && n(i, r);
|
|
3250
3250
|
}
|
|
3251
3251
|
return t;
|
|
3252
3252
|
}
|
|
3253
|
-
function
|
|
3253
|
+
function hi(e) {
|
|
3254
3254
|
return e.filter((t) => t.type === "media").length;
|
|
3255
3255
|
}
|
|
3256
|
-
function
|
|
3256
|
+
function fi(e, t, n) {
|
|
3257
3257
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3258
3258
|
}
|
|
3259
3259
|
function ns(e) {
|
|
3260
3260
|
return P(e.image_url) ?? P(e.asset_url) ?? "";
|
|
3261
3261
|
}
|
|
3262
|
-
function
|
|
3262
|
+
function gi(e) {
|
|
3263
3263
|
switch (e) {
|
|
3264
3264
|
case "image":
|
|
3265
3265
|
return ye.Image;
|
|
@@ -3273,7 +3273,7 @@ function hi(e) {
|
|
|
3273
3273
|
return ye.File;
|
|
3274
3274
|
}
|
|
3275
3275
|
}
|
|
3276
|
-
function
|
|
3276
|
+
function pi(e, t) {
|
|
3277
3277
|
if (t.length > 1)
|
|
3278
3278
|
switch (e) {
|
|
3279
3279
|
case "image":
|
|
@@ -3360,27 +3360,27 @@ function fi(e, t) {
|
|
|
3360
3360
|
};
|
|
3361
3361
|
}
|
|
3362
3362
|
}
|
|
3363
|
-
function
|
|
3363
|
+
function bi({
|
|
3364
3364
|
groupPosition: e,
|
|
3365
3365
|
isMyMessage: t,
|
|
3366
3366
|
segment: n
|
|
3367
3367
|
}) {
|
|
3368
|
-
const a =
|
|
3369
|
-
...
|
|
3368
|
+
const a = gi(n.kind), r = {
|
|
3369
|
+
...pi(n.kind, n.attachments),
|
|
3370
3370
|
groupPosition: e
|
|
3371
3371
|
};
|
|
3372
3372
|
return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
|
|
3373
3373
|
}
|
|
3374
|
-
const
|
|
3374
|
+
const vi = ({
|
|
3375
3375
|
groupPosition: e,
|
|
3376
3376
|
isMyMessage: t,
|
|
3377
3377
|
message: n,
|
|
3378
3378
|
renderText: a
|
|
3379
3379
|
}) => {
|
|
3380
3380
|
var b;
|
|
3381
|
-
const r =
|
|
3381
|
+
const r = Os(n.attachments);
|
|
3382
3382
|
if (r.length === 0) return null;
|
|
3383
|
-
const i =
|
|
3383
|
+
const i = hi(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ss(l.attachments[0] ?? {}).url : void 0, m = o && ui(o, d) ? void 0 : o;
|
|
3384
3384
|
let p = 0;
|
|
3385
3385
|
const h = [], g = (x, v) => {
|
|
3386
3386
|
const f = t ? es.Sent : es.Received;
|
|
@@ -3388,14 +3388,14 @@ const pi = ({
|
|
|
3388
3388
|
/* @__PURE__ */ s(f, { ...ss(x) }, v)
|
|
3389
3389
|
);
|
|
3390
3390
|
}, c = (x, v) => {
|
|
3391
|
-
const f =
|
|
3391
|
+
const f = fi(
|
|
3392
3392
|
p,
|
|
3393
3393
|
i,
|
|
3394
3394
|
e
|
|
3395
3395
|
);
|
|
3396
3396
|
p += 1, h.push(
|
|
3397
3397
|
/* @__PURE__ */ s(
|
|
3398
|
-
|
|
3398
|
+
bi,
|
|
3399
3399
|
{
|
|
3400
3400
|
groupPosition: f,
|
|
3401
3401
|
isMyMessage: t,
|
|
@@ -3442,7 +3442,7 @@ const pi = ({
|
|
|
3442
3442
|
/* @__PURE__ */ s(et, {})
|
|
3443
3443
|
] }) : null
|
|
3444
3444
|
] });
|
|
3445
|
-
},
|
|
3445
|
+
}, xi = (e) => {
|
|
3446
3446
|
var Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, Bt, Ut, jt, Vt, Gt, Ht;
|
|
3447
3447
|
const {
|
|
3448
3448
|
additionalMessageInputProps: t,
|
|
@@ -3461,52 +3461,52 @@ const pi = ({
|
|
|
3461
3461
|
renderText: b,
|
|
3462
3462
|
threadList: x,
|
|
3463
3463
|
viewerLanguage: v
|
|
3464
|
-
} = e, { client: f } = me("CustomMessage"), { channel: N } = le("CustomMessage"), { isUnlocking: w, onUnlockClick: C, onFetchSource: R, onDownloadClick: S } =
|
|
3465
|
-
Attachment: I =
|
|
3466
|
-
EditMessageModal: M =
|
|
3464
|
+
} = e, { client: f } = me("CustomMessage"), { channel: N } = le("CustomMessage"), { isUnlocking: w, onUnlockClick: C, onFetchSource: R, onDownloadClick: S } = Vr("LockedAttachment"), [D, $] = U(!1), F = Qs(c.id), { selected: L, voteUp: k, voteDown: E } = _a(c), {
|
|
3465
|
+
Attachment: I = en,
|
|
3466
|
+
EditMessageModal: M = tn,
|
|
3467
3467
|
MessageActions: T,
|
|
3468
|
-
MessageBlocked: z =
|
|
3469
|
-
MessageBouncePrompt: O =
|
|
3470
|
-
MessageDeleted: j =
|
|
3471
|
-
MessageIsThreadReplyInChannelButtonIndicator: X =
|
|
3472
|
-
MessageRepliesCountButton: ee =
|
|
3473
|
-
ReminderNotification: K =
|
|
3474
|
-
StreamedMessageText: _ =
|
|
3468
|
+
MessageBlocked: z = sn,
|
|
3469
|
+
MessageBouncePrompt: O = nn,
|
|
3470
|
+
MessageDeleted: j = an,
|
|
3471
|
+
MessageIsThreadReplyInChannelButtonIndicator: X = rn,
|
|
3472
|
+
MessageRepliesCountButton: ee = ln,
|
|
3473
|
+
ReminderNotification: K = on,
|
|
3474
|
+
StreamedMessageText: _ = cn,
|
|
3475
3475
|
PinIndicator: A
|
|
3476
|
-
} =
|
|
3476
|
+
} = ls("CustomMessage"), H = dn(c), q = un(c), Y = ae(
|
|
3477
3477
|
() => h == null ? void 0 : h(c),
|
|
3478
3478
|
[h, c]
|
|
3479
3479
|
), B = ae(() => {
|
|
3480
3480
|
const ue = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...ue] : ue;
|
|
3481
3481
|
if (!Fe(c)) return pe;
|
|
3482
|
-
const Yt = pe.filter((qt) => !("type" in qt) || !
|
|
3482
|
+
const Yt = pe.filter((qt) => !("type" in qt) || !_s(qt));
|
|
3483
3483
|
return Yt.length === pe.length ? pe : Yt;
|
|
3484
3484
|
}, [c]), W = ae(
|
|
3485
|
-
() =>
|
|
3485
|
+
() => Os(B),
|
|
3486
3486
|
[B]
|
|
3487
3487
|
), Q = ae(() => {
|
|
3488
|
-
const ue =
|
|
3488
|
+
const ue = fs({ message: c, viewerLanguage: v });
|
|
3489
3489
|
return ue === c.text ? c : { ...c, text: ue };
|
|
3490
3490
|
}, [c, v]), ce = W.length > 0, De = W.reduce(
|
|
3491
3491
|
(ue, pe) => ue + pe.attachments.length,
|
|
3492
3492
|
0
|
|
3493
|
-
) === ((B == null ? void 0 : B.length) ?? 0), Le =
|
|
3493
|
+
) === ((B == null ? void 0 : B.length) ?? 0), Le = Za(
|
|
3494
3494
|
{
|
|
3495
3495
|
endOfGroup: r,
|
|
3496
3496
|
firstOfGroup: i,
|
|
3497
3497
|
groupedByUser: o
|
|
3498
3498
|
}
|
|
3499
3499
|
);
|
|
3500
|
-
if (
|
|
3500
|
+
if (mn(c))
|
|
3501
3501
|
return null;
|
|
3502
3502
|
if (c.deleted_at || c.type === "deleted")
|
|
3503
3503
|
return /* @__PURE__ */ s(j, { message: c });
|
|
3504
|
-
if (
|
|
3504
|
+
if (hn(c))
|
|
3505
3505
|
return /* @__PURE__ */ s(z, {});
|
|
3506
|
-
const ne = !x && !!c.reply_count, de = !x && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Rt = c.error) == null ? void 0 : Rt.status) !== 403, It =
|
|
3506
|
+
const ne = !x && !!c.reply_count, de = !x && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Rt = c.error) == null ? void 0 : Rt.status) !== 403, It = fn(c);
|
|
3507
3507
|
let he;
|
|
3508
3508
|
ie ? he = () => m(c) : It && (he = () => $(!0));
|
|
3509
|
-
const fe = g(),
|
|
3509
|
+
const fe = g(), Gs = y(
|
|
3510
3510
|
"str-chat__message str-chat__message-simple",
|
|
3511
3511
|
`str-chat__message--${c.type}`,
|
|
3512
3512
|
`str-chat__message--${c.status}`,
|
|
@@ -3523,7 +3523,7 @@ const pi = ({
|
|
|
3523
3523
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3524
3524
|
"str-chat__virtual-message__wrapper--group": o
|
|
3525
3525
|
}
|
|
3526
|
-
), Ge = c.poll_id && f.polls.fromState(c.poll_id), Tt =
|
|
3526
|
+
), Ge = c.poll_id && f.polls.fromState(c.poll_id), Tt = Wr(c), ge = Fe(c), At = qr(c), He = !!(B != null && B.length && !c.quoted_message), Mt = ge && fe && He, Hs = ce && De && !c.quoted_message && !Ge && !Y && !ge;
|
|
3527
3527
|
return /* @__PURE__ */ u(te, { children: [
|
|
3528
3528
|
a && /* @__PURE__ */ s(
|
|
3529
3529
|
M,
|
|
@@ -3532,7 +3532,7 @@ const pi = ({
|
|
|
3532
3532
|
}
|
|
3533
3533
|
),
|
|
3534
3534
|
D && /* @__PURE__ */ s(
|
|
3535
|
-
|
|
3535
|
+
gn,
|
|
3536
3536
|
{
|
|
3537
3537
|
MessageBouncePrompt: O,
|
|
3538
3538
|
onClose: () => $(!1),
|
|
@@ -3542,7 +3542,7 @@ const pi = ({
|
|
|
3542
3542
|
/* @__PURE__ */ u(
|
|
3543
3543
|
"div",
|
|
3544
3544
|
{
|
|
3545
|
-
className:
|
|
3545
|
+
className: Gs,
|
|
3546
3546
|
"data-message-id": c.id,
|
|
3547
3547
|
"data-dd-privacy": "mask",
|
|
3548
3548
|
children: [
|
|
@@ -3563,7 +3563,7 @@ const pi = ({
|
|
|
3563
3563
|
/* @__PURE__ */ s(
|
|
3564
3564
|
"div",
|
|
3565
3565
|
{
|
|
3566
|
-
className:
|
|
3566
|
+
className: y("str-chat__message-inner", {
|
|
3567
3567
|
"str-chat__simple-message--error-failed": ie || It
|
|
3568
3568
|
}),
|
|
3569
3569
|
"data-testid": "message-inner",
|
|
@@ -3581,7 +3581,7 @@ const pi = ({
|
|
|
3581
3581
|
fe ? /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3582
3582
|
T && /* @__PURE__ */ s(T, {}),
|
|
3583
3583
|
/* @__PURE__ */ s(
|
|
3584
|
-
|
|
3584
|
+
Jt.Sent,
|
|
3585
3585
|
{
|
|
3586
3586
|
title: (Lt = c.metadata) == null ? void 0 : Lt.attachment_title,
|
|
3587
3587
|
mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
|
|
@@ -3595,7 +3595,7 @@ const pi = ({
|
|
|
3595
3595
|
)
|
|
3596
3596
|
] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3597
3597
|
/* @__PURE__ */ s(
|
|
3598
|
-
|
|
3598
|
+
Jt.Received,
|
|
3599
3599
|
{
|
|
3600
3600
|
title: (Bt = c.metadata) == null ? void 0 : Bt.attachment_title,
|
|
3601
3601
|
mimeType: (Ut = c.metadata) == null ? void 0 : Ut.attachment_mime_type,
|
|
@@ -3621,8 +3621,8 @@ const pi = ({
|
|
|
3621
3621
|
] }) : Tt ? (
|
|
3622
3622
|
/* Tip-only messages render as a standalone bubble */
|
|
3623
3623
|
/* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
|
|
3624
|
-
) :
|
|
3625
|
-
|
|
3624
|
+
) : Hs ? /* @__PURE__ */ s(
|
|
3625
|
+
vi,
|
|
3626
3626
|
{
|
|
3627
3627
|
groupPosition: Le,
|
|
3628
3628
|
isMyMessage: fe,
|
|
@@ -3645,7 +3645,7 @@ const pi = ({
|
|
|
3645
3645
|
isMyMessage: fe
|
|
3646
3646
|
}
|
|
3647
3647
|
),
|
|
3648
|
-
Ge && /* @__PURE__ */ s(
|
|
3648
|
+
Ge && /* @__PURE__ */ s(pn, { poll: Ge }),
|
|
3649
3649
|
B != null && B.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3650
3650
|
I,
|
|
3651
3651
|
{
|
|
@@ -3680,15 +3680,15 @@ const pi = ({
|
|
|
3680
3680
|
}
|
|
3681
3681
|
),
|
|
3682
3682
|
n && ge && /* @__PURE__ */ s(
|
|
3683
|
-
|
|
3683
|
+
Xr,
|
|
3684
3684
|
{
|
|
3685
3685
|
selected: L,
|
|
3686
|
-
onVoteUp:
|
|
3686
|
+
onVoteUp: k,
|
|
3687
3687
|
onVoteDown: E
|
|
3688
3688
|
}
|
|
3689
3689
|
)
|
|
3690
3690
|
] }),
|
|
3691
|
-
/* @__PURE__ */ s(
|
|
3691
|
+
/* @__PURE__ */ s(Zr, {}),
|
|
3692
3692
|
ne && /* @__PURE__ */ s(
|
|
3693
3693
|
ee,
|
|
3694
3694
|
{
|
|
@@ -3702,50 +3702,50 @@ const pi = ({
|
|
|
3702
3702
|
c.id
|
|
3703
3703
|
)
|
|
3704
3704
|
] });
|
|
3705
|
-
},
|
|
3706
|
-
|
|
3707
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
3708
|
-
),
|
|
3705
|
+
}, wi = V.memo(
|
|
3706
|
+
xi,
|
|
3707
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Js(e, t)
|
|
3708
|
+
), _i = (e) => {
|
|
3709
3709
|
const t = _e("CustomMessage");
|
|
3710
|
-
return /* @__PURE__ */ s(
|
|
3711
|
-
},
|
|
3710
|
+
return /* @__PURE__ */ s(wi, { ...t, ...e });
|
|
3711
|
+
}, Ni = () => {
|
|
3712
3712
|
var n;
|
|
3713
3713
|
const { handleDelete: e, message: t } = _e("CustomMessageActions");
|
|
3714
3714
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
3715
|
-
|
|
3715
|
+
us,
|
|
3716
3716
|
{
|
|
3717
3717
|
onClick: e,
|
|
3718
3718
|
"aria-label": "Delete",
|
|
3719
3719
|
title: "Delete",
|
|
3720
3720
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3721
|
-
children: /* @__PURE__ */ s(
|
|
3721
|
+
children: /* @__PURE__ */ s(ea, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3722
3722
|
}
|
|
3723
3723
|
);
|
|
3724
|
-
},
|
|
3724
|
+
}, yi = () => {
|
|
3725
3725
|
const { handleFlag: e } = _e("CustomMessageActions");
|
|
3726
3726
|
return /* @__PURE__ */ s(
|
|
3727
|
-
|
|
3727
|
+
us,
|
|
3728
3728
|
{
|
|
3729
3729
|
onClick: e,
|
|
3730
3730
|
"aria-label": "Report",
|
|
3731
3731
|
title: "Report",
|
|
3732
3732
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3733
|
-
children: /* @__PURE__ */ s(
|
|
3733
|
+
children: /* @__PURE__ */ s(os, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3734
3734
|
}
|
|
3735
3735
|
);
|
|
3736
|
-
},
|
|
3736
|
+
}, ki = () => {
|
|
3737
3737
|
var t;
|
|
3738
3738
|
const { message: e } = _e("CustomMessageActions");
|
|
3739
3739
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
|
|
3740
|
-
|
|
3740
|
+
na,
|
|
3741
3741
|
{
|
|
3742
3742
|
messageActionSet: [
|
|
3743
|
-
{ Component:
|
|
3744
|
-
{ Component:
|
|
3743
|
+
{ Component: Ni, placement: "quick", type: "delete" },
|
|
3744
|
+
{ Component: yi, placement: "quick", type: "flag" }
|
|
3745
3745
|
]
|
|
3746
3746
|
}
|
|
3747
3747
|
);
|
|
3748
|
-
},
|
|
3748
|
+
}, Ci = ({
|
|
3749
3749
|
link: e,
|
|
3750
3750
|
onDismiss: t
|
|
3751
3751
|
}) => {
|
|
@@ -3785,14 +3785,14 @@ const pi = ({
|
|
|
3785
3785
|
]
|
|
3786
3786
|
}
|
|
3787
3787
|
);
|
|
3788
|
-
},
|
|
3788
|
+
}, Si = (e) => ({
|
|
3789
3789
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3790
3790
|
(t) => Wt.previewIsLoaded(t) || Wt.previewIsLoading(t)
|
|
3791
3791
|
)
|
|
3792
|
-
}),
|
|
3793
|
-
const { linkPreviewsManager: e } =
|
|
3792
|
+
}), Ei = () => {
|
|
3793
|
+
const { linkPreviewsManager: e } = bn(), { linkPreviews: t } = vn(
|
|
3794
3794
|
e.state,
|
|
3795
|
-
|
|
3795
|
+
Si
|
|
3796
3796
|
), n = (r) => {
|
|
3797
3797
|
e.dismissPreview(r);
|
|
3798
3798
|
};
|
|
@@ -3805,9 +3805,9 @@ const pi = ({
|
|
|
3805
3805
|
// block so it keeps its intrinsic height and the container scrolls — a
|
|
3806
3806
|
// bare flex-column child would be shrunk on the column axis and its
|
|
3807
3807
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3808
|
-
/* @__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(
|
|
3808
|
+
/* @__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(Ci, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3809
3809
|
) : null;
|
|
3810
|
-
}, Et = V.createContext(!1),
|
|
3810
|
+
}, Et = V.createContext(!1), bl = () => Ie(Et), Ii = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3811
3811
|
"button",
|
|
3812
3812
|
{
|
|
3813
3813
|
...n,
|
|
@@ -3815,13 +3815,13 @@ const pi = ({
|
|
|
3815
3815
|
"aria-label": "Send",
|
|
3816
3816
|
disabled: t,
|
|
3817
3817
|
onClick: e,
|
|
3818
|
-
children: /* @__PURE__ */ s(
|
|
3818
|
+
children: /* @__PURE__ */ s(ta, { weight: "bold", className: "size-4" })
|
|
3819
3819
|
}
|
|
3820
|
-
),
|
|
3821
|
-
const e = Ie(Et), { handleSubmit: t } =
|
|
3822
|
-
SendButton: r =
|
|
3823
|
-
AttachmentPreviewList: i =
|
|
3824
|
-
} =
|
|
3820
|
+
), Ti = () => {
|
|
3821
|
+
const e = Ie(Et), { handleSubmit: t } = wn(), n = _n(), a = e || !n, {
|
|
3822
|
+
SendButton: r = Ii,
|
|
3823
|
+
AttachmentPreviewList: i = Nn
|
|
3824
|
+
} = ls("CustomMessageInput");
|
|
3825
3825
|
return (
|
|
3826
3826
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
3827
3827
|
// preview list inside is the scrollable region); the textarea + send row
|
|
@@ -3837,12 +3837,12 @@ const pi = ({
|
|
|
3837
3837
|
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)]",
|
|
3838
3838
|
"data-dd-privacy": "mask",
|
|
3839
3839
|
children: [
|
|
3840
|
-
/* @__PURE__ */ s(
|
|
3841
|
-
/* @__PURE__ */ s(
|
|
3840
|
+
/* @__PURE__ */ s(yn, {}),
|
|
3841
|
+
/* @__PURE__ */ s(Ei, {}),
|
|
3842
3842
|
/* @__PURE__ */ s(i, {}),
|
|
3843
3843
|
/* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
|
|
3844
3844
|
/* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
|
|
3845
|
-
|
|
3845
|
+
kn,
|
|
3846
3846
|
{
|
|
3847
3847
|
"aria-disabled": e || void 0,
|
|
3848
3848
|
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
@@ -3869,7 +3869,7 @@ const pi = ({
|
|
|
3869
3869
|
}
|
|
3870
3870
|
)
|
|
3871
3871
|
);
|
|
3872
|
-
},
|
|
3872
|
+
}, Ai = ({
|
|
3873
3873
|
renderActions: e,
|
|
3874
3874
|
renderFooter: t,
|
|
3875
3875
|
disabled: n = !1,
|
|
@@ -3890,23 +3890,23 @@ const pi = ({
|
|
|
3890
3890
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3891
3891
|
children: [
|
|
3892
3892
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3893
|
-
/* @__PURE__ */ s(Et.Provider, { value: o, children: /* @__PURE__ */ s(
|
|
3893
|
+
/* @__PURE__ */ s(Et.Provider, { value: o, children: /* @__PURE__ */ s(xn, { Input: r ?? Ti }) })
|
|
3894
3894
|
]
|
|
3895
3895
|
}
|
|
3896
3896
|
),
|
|
3897
3897
|
t == null ? void 0 : t()
|
|
3898
3898
|
] });
|
|
3899
|
-
},
|
|
3899
|
+
}, Mi = [
|
|
3900
3900
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
3901
3901
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
3902
|
-
],
|
|
3902
|
+
], Ri = {
|
|
3903
3903
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
3904
3904
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
3905
|
-
},
|
|
3905
|
+
}, Di = [
|
|
3906
3906
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
3907
|
-
],
|
|
3907
|
+
], Li = {
|
|
3908
3908
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
3909
|
-
},
|
|
3909
|
+
}, Je = "age safety guidelines.", zi = "https://linktr.ee/s/about/contact", as = (e) => Mi.includes(e), Pi = (e) => Di.includes(e), Fi = (e) => {
|
|
3910
3910
|
var a;
|
|
3911
3911
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
3912
3912
|
if (as(t))
|
|
@@ -3914,7 +3914,7 @@ const pi = ({
|
|
|
3914
3914
|
kind: "dm-agent",
|
|
3915
3915
|
type: t
|
|
3916
3916
|
};
|
|
3917
|
-
if (
|
|
3917
|
+
if (Pi(t))
|
|
3918
3918
|
return {
|
|
3919
3919
|
kind: "age-safety",
|
|
3920
3920
|
type: t
|
|
@@ -3925,32 +3925,32 @@ const pi = ({
|
|
|
3925
3925
|
kind: "dm-agent",
|
|
3926
3926
|
type: n
|
|
3927
3927
|
};
|
|
3928
|
-
},
|
|
3929
|
-
const t = e.indexOf(
|
|
3928
|
+
}, Oi = (e) => {
|
|
3929
|
+
const t = e.indexOf(Je);
|
|
3930
3930
|
if (t === -1)
|
|
3931
3931
|
return e;
|
|
3932
|
-
const n = t +
|
|
3932
|
+
const n = t + Je.length;
|
|
3933
3933
|
return /* @__PURE__ */ u(te, { children: [
|
|
3934
3934
|
e.slice(0, t),
|
|
3935
3935
|
/* @__PURE__ */ s(
|
|
3936
3936
|
"a",
|
|
3937
3937
|
{
|
|
3938
|
-
href:
|
|
3938
|
+
href: zi,
|
|
3939
3939
|
target: "_blank",
|
|
3940
3940
|
rel: "noopener noreferrer",
|
|
3941
3941
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
3942
|
-
children:
|
|
3942
|
+
children: Je
|
|
3943
3943
|
}
|
|
3944
3944
|
),
|
|
3945
3945
|
e.slice(n)
|
|
3946
3946
|
] });
|
|
3947
|
-
},
|
|
3947
|
+
}, $i = (e) => {
|
|
3948
3948
|
var a, r;
|
|
3949
|
-
const t = e.message.hide_date === !0, n =
|
|
3949
|
+
const t = e.message.hide_date === !0, n = Fi(
|
|
3950
3950
|
e.message
|
|
3951
3951
|
);
|
|
3952
3952
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
3953
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
3953
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ri[n.type];
|
|
3954
3954
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3955
3955
|
/* @__PURE__ */ u(
|
|
3956
3956
|
"div",
|
|
@@ -3976,7 +3976,7 @@ const pi = ({
|
|
|
3976
3976
|
] });
|
|
3977
3977
|
}
|
|
3978
3978
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
3979
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
3979
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Li[n.type];
|
|
3980
3980
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3981
3981
|
/* @__PURE__ */ u(
|
|
3982
3982
|
"div",
|
|
@@ -3986,7 +3986,7 @@ const pi = ({
|
|
|
3986
3986
|
"data-age-safety-system-type": n.type,
|
|
3987
3987
|
children: [
|
|
3988
3988
|
/* @__PURE__ */ s(
|
|
3989
|
-
|
|
3989
|
+
sa,
|
|
3990
3990
|
{
|
|
3991
3991
|
size: 24,
|
|
3992
3992
|
weight: "duotone",
|
|
@@ -3995,7 +3995,7 @@ const pi = ({
|
|
|
3995
3995
|
"data-testid": "age-safety-system-message-icon"
|
|
3996
3996
|
}
|
|
3997
3997
|
),
|
|
3998
|
-
/* @__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:
|
|
3998
|
+
/* @__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: Oi(i) }) })
|
|
3999
3999
|
]
|
|
4000
4000
|
}
|
|
4001
4001
|
),
|
|
@@ -4010,7 +4010,7 @@ const pi = ({
|
|
|
4010
4010
|
] }),
|
|
4011
4011
|
!t && /* @__PURE__ */ s(Ye, { message: e.message })
|
|
4012
4012
|
] });
|
|
4013
|
-
},
|
|
4013
|
+
}, $s = lt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
4014
4014
|
"animateTransform",
|
|
4015
4015
|
{
|
|
4016
4016
|
attributeName: "transform",
|
|
@@ -4020,15 +4020,15 @@ const pi = ({
|
|
|
4020
4020
|
begin: `${120 * t}ms`,
|
|
4021
4021
|
repeatCount: "indefinite"
|
|
4022
4022
|
}
|
|
4023
|
-
) }),
|
|
4023
|
+
) }), Bi = /* @__PURE__ */ new Set([
|
|
4024
4024
|
qe.Thinking,
|
|
4025
4025
|
qe.Generating,
|
|
4026
4026
|
qe.ExternalSources
|
|
4027
|
-
]),
|
|
4027
|
+
]), Ui = ({ threadList: e }) => {
|
|
4028
4028
|
var b, x;
|
|
4029
|
-
const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = me(), { typing: i = {} } =
|
|
4030
|
-
if (!e && l &&
|
|
4031
|
-
const v =
|
|
4029
|
+
const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = me(), { typing: i = {} } = Cn(), { aiState: o } = Sn(t), l = Ie($s);
|
|
4030
|
+
if (!e && l && Bi.has(o)) {
|
|
4031
|
+
const v = ji(t, (b = r.user) == null ? void 0 : b.id);
|
|
4032
4032
|
return /* @__PURE__ */ s(
|
|
4033
4033
|
rs,
|
|
4034
4034
|
{
|
|
@@ -4108,7 +4108,7 @@ const pi = ({
|
|
|
4108
4108
|
] })
|
|
4109
4109
|
}
|
|
4110
4110
|
);
|
|
4111
|
-
function
|
|
4111
|
+
function ji(e, t) {
|
|
4112
4112
|
var a;
|
|
4113
4113
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4114
4114
|
for (const r of Object.values(n)) {
|
|
@@ -4117,10 +4117,10 @@ function Bi(e, t) {
|
|
|
4117
4117
|
return i;
|
|
4118
4118
|
}
|
|
4119
4119
|
}
|
|
4120
|
-
const
|
|
4120
|
+
const Vi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
4121
4121
|
"div",
|
|
4122
4122
|
{
|
|
4123
|
-
className:
|
|
4123
|
+
className: y("flex items-center justify-center h-full", e),
|
|
4124
4124
|
children: [
|
|
4125
4125
|
/* @__PURE__ */ u("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
4126
4126
|
/* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
|
|
@@ -4161,11 +4161,11 @@ const Ui = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
|
4161
4161
|
]
|
|
4162
4162
|
}
|
|
4163
4163
|
), Be = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
|
|
4164
|
-
/* @__PURE__ */ s(
|
|
4164
|
+
/* @__PURE__ */ s(Gi, { className: "w-6 h-6" }),
|
|
4165
4165
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4166
4166
|
] }) }));
|
|
4167
4167
|
Be.displayName = "LoadingState";
|
|
4168
|
-
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",
|
|
4168
|
+
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", Hi = ({
|
|
4169
4169
|
onBack: e,
|
|
4170
4170
|
showBackButton: t,
|
|
4171
4171
|
showStarButton: n = !1,
|
|
@@ -4201,7 +4201,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4201
4201
|
}), $ = "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", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */ u(te, { children: [
|
|
4202
4202
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: C }),
|
|
4203
4203
|
D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
|
|
4204
|
-
] }),
|
|
4204
|
+
] }), k = async () => {
|
|
4205
4205
|
try {
|
|
4206
4206
|
S ? await f.unpin() : await f.pin();
|
|
4207
4207
|
} catch (j) {
|
|
@@ -4216,7 +4216,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4216
4216
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ s(
|
|
4217
4217
|
"button",
|
|
4218
4218
|
{
|
|
4219
|
-
className:
|
|
4219
|
+
className: y(
|
|
4220
4220
|
be,
|
|
4221
4221
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
4222
4222
|
),
|
|
@@ -4238,7 +4238,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4238
4238
|
type: "button",
|
|
4239
4239
|
onClick: x,
|
|
4240
4240
|
"aria-label": `View details for ${C}`,
|
|
4241
|
-
className:
|
|
4241
|
+
className: y(
|
|
4242
4242
|
$,
|
|
4243
4243
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
4244
4244
|
),
|
|
@@ -4298,13 +4298,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4298
4298
|
"button",
|
|
4299
4299
|
{
|
|
4300
4300
|
className: be,
|
|
4301
|
-
onClick:
|
|
4301
|
+
onClick: k,
|
|
4302
4302
|
type: "button",
|
|
4303
4303
|
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
4304
4304
|
children: /* @__PURE__ */ s(
|
|
4305
4305
|
Ee,
|
|
4306
4306
|
{
|
|
4307
|
-
className:
|
|
4307
|
+
className: y("size-5", {
|
|
4308
4308
|
"text-yellow-600": S,
|
|
4309
4309
|
"text-black/90": !S
|
|
4310
4310
|
}),
|
|
@@ -4327,7 +4327,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4327
4327
|
onBlockParticipantClick: p,
|
|
4328
4328
|
onReportParticipantClick: h,
|
|
4329
4329
|
customChannelActions: g,
|
|
4330
|
-
triggerClassName:
|
|
4330
|
+
triggerClassName: y(be, "bg-[#F1F0EE]")
|
|
4331
4331
|
}
|
|
4332
4332
|
))
|
|
4333
4333
|
] })
|
|
@@ -4337,7 +4337,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4337
4337
|
t && e && /* @__PURE__ */ s(
|
|
4338
4338
|
"button",
|
|
4339
4339
|
{
|
|
4340
|
-
className:
|
|
4340
|
+
className: y(
|
|
4341
4341
|
be,
|
|
4342
4342
|
"messaging-channel-view-back-button-desktop"
|
|
4343
4343
|
),
|
|
@@ -4353,7 +4353,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4353
4353
|
type: "button",
|
|
4354
4354
|
onClick: x,
|
|
4355
4355
|
"aria-label": `View details for ${C}`,
|
|
4356
|
-
className:
|
|
4356
|
+
className: y(
|
|
4357
4357
|
F,
|
|
4358
4358
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
4359
4359
|
),
|
|
@@ -4416,13 +4416,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4416
4416
|
"button",
|
|
4417
4417
|
{
|
|
4418
4418
|
className: be,
|
|
4419
|
-
onClick:
|
|
4419
|
+
onClick: k,
|
|
4420
4420
|
type: "button",
|
|
4421
4421
|
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
4422
4422
|
children: /* @__PURE__ */ s(
|
|
4423
4423
|
Ee,
|
|
4424
4424
|
{
|
|
4425
|
-
className:
|
|
4425
|
+
className: y("size-6", {
|
|
4426
4426
|
"text-yellow-600": S,
|
|
4427
4427
|
"text-black/90": !S
|
|
4428
4428
|
}),
|
|
@@ -4451,7 +4451,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4451
4451
|
] })
|
|
4452
4452
|
] })
|
|
4453
4453
|
] });
|
|
4454
|
-
},
|
|
4454
|
+
}, Yi = ({
|
|
4455
4455
|
onBack: e,
|
|
4456
4456
|
showBackButton: t,
|
|
4457
4457
|
renderMessageInputActions: n,
|
|
@@ -4481,27 +4481,27 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4481
4481
|
composerInput: L
|
|
4482
4482
|
}) => {
|
|
4483
4483
|
var _, A, H, q;
|
|
4484
|
-
const { channel:
|
|
4484
|
+
const { channel: k } = le(), { client: E } = me(), I = V.useMemo(
|
|
4485
4485
|
() => {
|
|
4486
4486
|
var Y;
|
|
4487
4487
|
return je(
|
|
4488
|
-
(Y =
|
|
4488
|
+
(Y = k.state) == null ? void 0 : Y.members,
|
|
4489
4489
|
E == null ? void 0 : E.userID,
|
|
4490
|
-
|
|
4490
|
+
k.type
|
|
4491
4491
|
);
|
|
4492
4492
|
},
|
|
4493
|
-
[(_ =
|
|
4493
|
+
[(_ = k.state) == null ? void 0 : _.members, E == null ? void 0 : E.userID, k.type]
|
|
4494
4494
|
), M = V.useMemo(() => {
|
|
4495
4495
|
var W;
|
|
4496
4496
|
const Y = E == null ? void 0 : E.userID;
|
|
4497
|
-
return Y ? Object.values(((W =
|
|
4497
|
+
return Y ? Object.values(((W = k.state) == null ? void 0 : W.members) || {}).find((Q) => {
|
|
4498
4498
|
var ce;
|
|
4499
4499
|
return ((ce = Q.user) == null ? void 0 : ce.id) === Y;
|
|
4500
4500
|
}) : void 0;
|
|
4501
|
-
}, [E == null ? void 0 : E.userID, (A =
|
|
4501
|
+
}, [E == null ? void 0 : E.userID, (A = k.state) == null ? void 0 : A.members]), T = ((H = M == null ? void 0 : M.user) == null ? void 0 : H.is_account) ?? (M == null ? void 0 : M.is_account), z = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), O = S && T === !1 && z === !0, j = k.state.messages.some(
|
|
4502
4502
|
(Y) => Y.type !== "deleted"
|
|
4503
4503
|
), X = f ? /* @__PURE__ */ s(V.Fragment, { children: f() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
|
|
4504
|
-
|
|
4504
|
+
va,
|
|
4505
4505
|
{
|
|
4506
4506
|
className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
|
|
4507
4507
|
onBack: e,
|
|
@@ -4521,10 +4521,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4521
4521
|
renderChannelActions: C,
|
|
4522
4522
|
onParticipantNameClick: F
|
|
4523
4523
|
}
|
|
4524
|
-
) : null, K =
|
|
4524
|
+
) : null, K = J(
|
|
4525
4525
|
(Y) => {
|
|
4526
4526
|
const { message: B } = _e("ChannelView"), W = /* @__PURE__ */ s(
|
|
4527
|
-
|
|
4527
|
+
_i,
|
|
4528
4528
|
{
|
|
4529
4529
|
...Y,
|
|
4530
4530
|
chatbotVotingEnabled: v,
|
|
@@ -4536,16 +4536,16 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4536
4536
|
[v, R, D]
|
|
4537
4537
|
);
|
|
4538
4538
|
return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
|
|
4539
|
-
|
|
4539
|
+
In,
|
|
4540
4540
|
{
|
|
4541
4541
|
overrides: {
|
|
4542
4542
|
Message: K,
|
|
4543
|
-
MessageActions:
|
|
4543
|
+
MessageActions: ki
|
|
4544
4544
|
},
|
|
4545
|
-
children: /* @__PURE__ */ u(
|
|
4545
|
+
children: /* @__PURE__ */ u(Tn, { children: [
|
|
4546
4546
|
!F && /* @__PURE__ */ u(te, { children: [
|
|
4547
4547
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4548
|
-
|
|
4548
|
+
Hi,
|
|
4549
4549
|
{
|
|
4550
4550
|
onBack: e,
|
|
4551
4551
|
showBackButton: t,
|
|
@@ -4577,7 +4577,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4577
4577
|
X
|
|
4578
4578
|
] }) }),
|
|
4579
4579
|
/* @__PURE__ */ s(
|
|
4580
|
-
|
|
4580
|
+
An,
|
|
4581
4581
|
{
|
|
4582
4582
|
head: F && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
|
|
4583
4583
|
ee,
|
|
@@ -4591,14 +4591,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4591
4591
|
},
|
|
4592
4592
|
"lt-channel-message-list"
|
|
4593
4593
|
),
|
|
4594
|
-
r ? /* @__PURE__ */ s(V.Fragment, { children: r(
|
|
4594
|
+
r ? /* @__PURE__ */ s(V.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
|
|
4595
4595
|
/* @__PURE__ */ s(
|
|
4596
|
-
|
|
4596
|
+
Ai,
|
|
4597
4597
|
{
|
|
4598
4598
|
...n && {
|
|
4599
|
-
renderActions: () => n == null ? void 0 : n(
|
|
4599
|
+
renderActions: () => n == null ? void 0 : n(k)
|
|
4600
4600
|
},
|
|
4601
|
-
renderFooter: () => a == null ? void 0 : a(
|
|
4601
|
+
renderFooter: () => a == null ? void 0 : a(k),
|
|
4602
4602
|
disabled: c,
|
|
4603
4603
|
disabledReason: b,
|
|
4604
4604
|
composerInput: L
|
|
@@ -4608,7 +4608,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4608
4608
|
] })
|
|
4609
4609
|
}
|
|
4610
4610
|
) });
|
|
4611
|
-
},
|
|
4611
|
+
}, Bs = V.memo(
|
|
4612
4612
|
({
|
|
4613
4613
|
channel: e,
|
|
4614
4614
|
onBack: t,
|
|
@@ -4619,7 +4619,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4619
4619
|
onLeaveConversation: o,
|
|
4620
4620
|
onBlockParticipant: l,
|
|
4621
4621
|
className: d,
|
|
4622
|
-
CustomChannelEmptyState: m =
|
|
4622
|
+
CustomChannelEmptyState: m = Vi,
|
|
4623
4623
|
showDeleteConversation: p = !0,
|
|
4624
4624
|
onDeleteConversationClick: h,
|
|
4625
4625
|
onBlockParticipantClick: g,
|
|
@@ -4637,7 +4637,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4637
4637
|
renderHeaderTitleBadges: $,
|
|
4638
4638
|
customChannelActions: F,
|
|
4639
4639
|
renderChannelActions: L,
|
|
4640
|
-
renderMessage:
|
|
4640
|
+
renderMessage: k,
|
|
4641
4641
|
onMessageLinkClick: E,
|
|
4642
4642
|
sendButton: I,
|
|
4643
4643
|
attachmentPreviewList: M,
|
|
@@ -4646,7 +4646,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4646
4646
|
onParticipantNameClick: O,
|
|
4647
4647
|
composerInput: j
|
|
4648
4648
|
}) => {
|
|
4649
|
-
const X =
|
|
4649
|
+
const X = J(
|
|
4650
4650
|
async (K, _, A) => {
|
|
4651
4651
|
var Q;
|
|
4652
4652
|
const H = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, q = N && !H, Y = {
|
|
@@ -4666,7 +4666,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4666
4666
|
},
|
|
4667
4667
|
[e, N, w, C]
|
|
4668
4668
|
), ee = G(null);
|
|
4669
|
-
return
|
|
4669
|
+
return Z(() => {
|
|
4670
4670
|
if (!E) return;
|
|
4671
4671
|
const K = ee.current;
|
|
4672
4672
|
if (!K) return;
|
|
@@ -4681,24 +4681,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4681
4681
|
"div",
|
|
4682
4682
|
{
|
|
4683
4683
|
ref: ee,
|
|
4684
|
-
className:
|
|
4684
|
+
className: y(
|
|
4685
4685
|
"messaging-channel-view h-full flex flex-col",
|
|
4686
4686
|
d
|
|
4687
4687
|
),
|
|
4688
|
-
children: /* @__PURE__ */ s(
|
|
4689
|
-
|
|
4688
|
+
children: /* @__PURE__ */ s($s.Provider, { value: N ?? !1, children: /* @__PURE__ */ s(
|
|
4689
|
+
En,
|
|
4690
4690
|
{
|
|
4691
4691
|
channel: e,
|
|
4692
|
-
MessageSystem:
|
|
4692
|
+
MessageSystem: $i,
|
|
4693
4693
|
EmptyStateIndicator: m,
|
|
4694
4694
|
LoadingIndicator: Be,
|
|
4695
|
-
DateSeparator:
|
|
4696
|
-
TypingIndicator:
|
|
4695
|
+
DateSeparator: xa,
|
|
4696
|
+
TypingIndicator: Ui,
|
|
4697
4697
|
doSendMessageRequest: X,
|
|
4698
4698
|
...I ? { SendButton: I } : {},
|
|
4699
4699
|
...M ? { AttachmentPreviewList: M } : {},
|
|
4700
4700
|
children: /* @__PURE__ */ s(
|
|
4701
|
-
|
|
4701
|
+
Yi,
|
|
4702
4702
|
{
|
|
4703
4703
|
onBack: t,
|
|
4704
4704
|
showBackButton: n,
|
|
@@ -4723,7 +4723,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4723
4723
|
renderHeaderTitleBadges: $,
|
|
4724
4724
|
customChannelActions: F,
|
|
4725
4725
|
renderChannelActions: L,
|
|
4726
|
-
renderMessage:
|
|
4726
|
+
renderMessage: k,
|
|
4727
4727
|
viewerLanguage: T,
|
|
4728
4728
|
showChannelInfo: z,
|
|
4729
4729
|
onParticipantNameClick: O,
|
|
@@ -4736,7 +4736,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4736
4736
|
);
|
|
4737
4737
|
}
|
|
4738
4738
|
);
|
|
4739
|
-
|
|
4739
|
+
Bs.displayName = "ChannelView";
|
|
4740
4740
|
const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
|
|
4741
4741
|
/* @__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: "⚠️" }) }),
|
|
4742
4742
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -4752,7 +4752,7 @@ const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4752
4752
|
)
|
|
4753
4753
|
] }) }));
|
|
4754
4754
|
ke.displayName = "ErrorState";
|
|
4755
|
-
const
|
|
4755
|
+
const vl = ({
|
|
4756
4756
|
capabilities: e = {},
|
|
4757
4757
|
renderMessageInputActions: t,
|
|
4758
4758
|
renderConversationFooter: n,
|
|
@@ -4782,17 +4782,17 @@ const ul = ({
|
|
|
4782
4782
|
isConnected: $,
|
|
4783
4783
|
isLoading: F,
|
|
4784
4784
|
error: L,
|
|
4785
|
-
refreshConnection:
|
|
4785
|
+
refreshConnection: k,
|
|
4786
4786
|
service: E,
|
|
4787
4787
|
debug: I
|
|
4788
|
-
} =
|
|
4788
|
+
} = aa(), [M, T] = U(null), [z, O] = U(null), [j, X] = U(!1), { showDeleteConversation: ee = !0 } = e, K = G(o);
|
|
4789
4789
|
K.current = o;
|
|
4790
4790
|
const _ = G(a);
|
|
4791
4791
|
_.current = a;
|
|
4792
4792
|
const A = G(null), H = G(null);
|
|
4793
|
-
|
|
4793
|
+
Z(() => {
|
|
4794
4794
|
H.current = M;
|
|
4795
|
-
}, [M]),
|
|
4795
|
+
}, [M]), Z(() => {
|
|
4796
4796
|
if (!D || !$) return;
|
|
4797
4797
|
const B = D.userID;
|
|
4798
4798
|
if (!B) return;
|
|
@@ -4858,18 +4858,18 @@ const ul = ({
|
|
|
4858
4858
|
}, [i, D, $, E, I]);
|
|
4859
4859
|
const q = G(r);
|
|
4860
4860
|
q.current = r;
|
|
4861
|
-
const Y =
|
|
4861
|
+
const Y = J(() => {
|
|
4862
4862
|
var B;
|
|
4863
4863
|
T(null), X(!0), (B = q.current) == null || B.call(q);
|
|
4864
4864
|
}, []);
|
|
4865
|
-
return F ? /* @__PURE__ */ s(Be, {}) : L ? /* @__PURE__ */ s(ke, { message: L, onBack:
|
|
4865
|
+
return F ? /* @__PURE__ */ s(Be, {}) : L ? /* @__PURE__ */ s(ke, { message: L, onBack: k }) : !$ || !D ? /* @__PURE__ */ s(
|
|
4866
4866
|
ke,
|
|
4867
4867
|
{
|
|
4868
4868
|
message: "Not connected to messaging service",
|
|
4869
|
-
onBack:
|
|
4869
|
+
onBack: k
|
|
4870
4870
|
}
|
|
4871
4871
|
) : z ? /* @__PURE__ */ s(ke, { message: z }) : j && !M ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : M ? /* @__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(
|
|
4872
|
-
|
|
4872
|
+
Bs,
|
|
4873
4873
|
{
|
|
4874
4874
|
channel: M,
|
|
4875
4875
|
renderMessageInputActions: t,
|
|
@@ -4897,13 +4897,13 @@ const ul = ({
|
|
|
4897
4897
|
M.id
|
|
4898
4898
|
) }) }) : /* @__PURE__ */ s(Be, {});
|
|
4899
4899
|
};
|
|
4900
|
-
function
|
|
4900
|
+
function qi(e) {
|
|
4901
4901
|
const t = e.state.pending_messages;
|
|
4902
4902
|
if (t != null && t.length)
|
|
4903
4903
|
for (const n of t)
|
|
4904
4904
|
e.state.addMessageSorted(n.message);
|
|
4905
4905
|
}
|
|
4906
|
-
const
|
|
4906
|
+
const Us = V.createContext({
|
|
4907
4907
|
selectedChannel: void 0,
|
|
4908
4908
|
onChannelSelect: () => {
|
|
4909
4909
|
},
|
|
@@ -4911,18 +4911,18 @@ const Bs = V.createContext({
|
|
|
4911
4911
|
renderMessagePreview: void 0,
|
|
4912
4912
|
channelPreview: void 0,
|
|
4913
4913
|
viewerLanguage: void 0
|
|
4914
|
-
}),
|
|
4914
|
+
}), Wi = Us.Provider, Xi = () => V.useContext(Us), Ki = (e, t) => {
|
|
4915
4915
|
const n = new Date(
|
|
4916
4916
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
4917
4917
|
), r = new Date(
|
|
4918
4918
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
4919
4919
|
).getTime() - n.getTime();
|
|
4920
4920
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
4921
|
-
},
|
|
4921
|
+
}, Zi = (e) => {
|
|
4922
4922
|
const t = /* @__PURE__ */ new Date();
|
|
4923
4923
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
4924
4924
|
return "Just now";
|
|
4925
|
-
const a =
|
|
4925
|
+
const a = Ki(e, t);
|
|
4926
4926
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
4927
4927
|
hour: "numeric",
|
|
4928
4928
|
minute: "2-digit",
|
|
@@ -4932,7 +4932,7 @@ const Bs = V.createContext({
|
|
|
4932
4932
|
day: "numeric",
|
|
4933
4933
|
year: "2-digit"
|
|
4934
4934
|
});
|
|
4935
|
-
},
|
|
4935
|
+
}, js = V.memo(
|
|
4936
4936
|
(e) => {
|
|
4937
4937
|
var $, F, L;
|
|
4938
4938
|
const { channel: t, unread: n } = e, {
|
|
@@ -4942,7 +4942,7 @@ const Bs = V.createContext({
|
|
|
4942
4942
|
channelPreview: o,
|
|
4943
4943
|
renderMessagePreview: l,
|
|
4944
4944
|
viewerLanguage: d
|
|
4945
|
-
} =
|
|
4945
|
+
} = Xi(), { client: m } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = dt(t);
|
|
4946
4946
|
if (o)
|
|
4947
4947
|
return /* @__PURE__ */ s(
|
|
4948
4948
|
o,
|
|
@@ -4956,34 +4956,34 @@ const Bs = V.createContext({
|
|
|
4956
4956
|
);
|
|
4957
4957
|
const g = () => {
|
|
4958
4958
|
t && r(t);
|
|
4959
|
-
}, c = (
|
|
4960
|
-
const E =
|
|
4961
|
-
!E || I || (
|
|
4959
|
+
}, c = (k) => {
|
|
4960
|
+
const E = k.key === "Enter" || k.key === " ", I = k.repeat;
|
|
4961
|
+
!E || I || (k.preventDefault(), g());
|
|
4962
4962
|
}, b = je(
|
|
4963
4963
|
($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
|
|
4964
4964
|
m == null ? void 0 : m.userID,
|
|
4965
4965
|
t == null ? void 0 : t.type
|
|
4966
4966
|
), x = ut(b == null ? void 0 : b.user), v = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, f = (() => {
|
|
4967
4967
|
var E;
|
|
4968
|
-
const
|
|
4969
|
-
if (
|
|
4970
|
-
for (let I =
|
|
4971
|
-
if (
|
|
4968
|
+
const k = (E = t == null ? void 0 : t.state) == null ? void 0 : E.messages;
|
|
4969
|
+
if (k != null && k.length) {
|
|
4970
|
+
for (let I = k.length - 1; I >= 0; I--)
|
|
4971
|
+
if (k[I].type !== "system") return k[I];
|
|
4972
4972
|
}
|
|
4973
4973
|
})(), w = (() => {
|
|
4974
4974
|
var z, O, j, X;
|
|
4975
|
-
const
|
|
4975
|
+
const k = fs({
|
|
4976
4976
|
message: f,
|
|
4977
4977
|
viewerLanguage: d
|
|
4978
4978
|
});
|
|
4979
|
-
if (((z = f == null ? void 0 : f.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return
|
|
4980
|
-
if (((O = f == null ? void 0 : f.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return
|
|
4979
|
+
if (((z = f == null ? void 0 : f.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return k ? `💵 ${k}` : "💵 Sent a tip";
|
|
4980
|
+
if (((O = f == null ? void 0 : f.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return k ? `💰 ${k}` : "💰 Sent a message";
|
|
4981
4981
|
if (((j = f == null ? void 0 : f.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
|
|
4982
|
-
return
|
|
4983
|
-
if (
|
|
4982
|
+
return k ? `📎 ${k}` : "📎 Sent an attachment";
|
|
4983
|
+
if (k) return k;
|
|
4984
4984
|
const T = (X = f == null ? void 0 : f.attachments) == null ? void 0 : X[0];
|
|
4985
4985
|
return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
4986
|
-
})(), C = f != null && f.created_at ?
|
|
4986
|
+
})(), C = f != null && f.created_at ? Zi(new Date(f.created_at)) : "", R = f ? Fe(f) : !1, S = l ? l(f, w) : `${R ? "✨ " : ""}${w}`, D = n ?? 0;
|
|
4987
4987
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
4988
4988
|
channelId: t == null ? void 0 : t.id,
|
|
4989
4989
|
isSelected: p,
|
|
@@ -4997,7 +4997,7 @@ const Bs = V.createContext({
|
|
|
4997
4997
|
tabIndex: 0,
|
|
4998
4998
|
onClick: g,
|
|
4999
4999
|
onKeyDown: c,
|
|
5000
|
-
className:
|
|
5000
|
+
className: y(
|
|
5001
5001
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
5002
5002
|
{
|
|
5003
5003
|
"bg-black/[0.04]": p,
|
|
@@ -5021,7 +5021,7 @@ const Bs = V.createContext({
|
|
|
5021
5021
|
/* @__PURE__ */ u(
|
|
5022
5022
|
"h3",
|
|
5023
5023
|
{
|
|
5024
|
-
className:
|
|
5024
|
+
className: y(
|
|
5025
5025
|
"text-sm font-medium truncate text-[#191918]"
|
|
5026
5026
|
),
|
|
5027
5027
|
children: [
|
|
@@ -5042,18 +5042,18 @@ const Bs = V.createContext({
|
|
|
5042
5042
|
);
|
|
5043
5043
|
}
|
|
5044
5044
|
);
|
|
5045
|
-
|
|
5046
|
-
const
|
|
5045
|
+
js.displayName = "CustomChannelPreview";
|
|
5046
|
+
const Ji = { last_message_at: -1 }, Qi = V.memo(
|
|
5047
5047
|
({
|
|
5048
5048
|
onChannelSelect: e,
|
|
5049
5049
|
selectedChannel: t,
|
|
5050
5050
|
filters: n,
|
|
5051
5051
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5052
5052
|
channelRenderFilterFn: r,
|
|
5053
|
-
sort: i =
|
|
5053
|
+
sort: i = Ji,
|
|
5054
5054
|
className: o,
|
|
5055
5055
|
customEmptyStateIndicator: l,
|
|
5056
|
-
channelListPaginator: d =
|
|
5056
|
+
channelListPaginator: d = Rn,
|
|
5057
5057
|
channelPreview: m,
|
|
5058
5058
|
renderMessagePreview: p,
|
|
5059
5059
|
viewerLanguage: h
|
|
@@ -5063,7 +5063,7 @@ const Ki = { last_message_at: -1 }, Ji = V.memo(
|
|
|
5063
5063
|
const { debug: c = !1 } = ct(), b = V.useCallback(
|
|
5064
5064
|
(v) => {
|
|
5065
5065
|
for (const f of v)
|
|
5066
|
-
|
|
5066
|
+
qi(f);
|
|
5067
5067
|
return r ? r(v) : v;
|
|
5068
5068
|
},
|
|
5069
5069
|
[r]
|
|
@@ -5094,12 +5094,12 @@ const Ki = { last_message_at: -1 }, Ji = V.memo(
|
|
|
5094
5094
|
return /* @__PURE__ */ s(
|
|
5095
5095
|
"div",
|
|
5096
5096
|
{
|
|
5097
|
-
className:
|
|
5097
|
+
className: y(
|
|
5098
5098
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5099
5099
|
o
|
|
5100
5100
|
),
|
|
5101
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5102
|
-
|
|
5101
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Wi, { value: x, children: /* @__PURE__ */ s(
|
|
5102
|
+
Mn,
|
|
5103
5103
|
{
|
|
5104
5104
|
filters: n,
|
|
5105
5105
|
sort: i,
|
|
@@ -5107,7 +5107,7 @@ const Ki = { last_message_at: -1 }, Ji = V.memo(
|
|
|
5107
5107
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5108
5108
|
channelRenderFilterFn: b,
|
|
5109
5109
|
Paginator: d,
|
|
5110
|
-
Preview:
|
|
5110
|
+
Preview: js,
|
|
5111
5111
|
EmptyStateIndicator: l
|
|
5112
5112
|
},
|
|
5113
5113
|
`${JSON.stringify(n)}:${JSON.stringify(i)}`
|
|
@@ -5116,8 +5116,85 @@ const Ki = { last_message_at: -1 }, Ji = V.memo(
|
|
|
5116
5116
|
);
|
|
5117
5117
|
}
|
|
5118
5118
|
);
|
|
5119
|
-
|
|
5120
|
-
const
|
|
5119
|
+
Qi.displayName = "ChannelList";
|
|
5120
|
+
const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, el = {
|
|
5121
|
+
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5122
|
+
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5123
|
+
}, tl = ({ variant: e }) => /* @__PURE__ */ s(
|
|
5124
|
+
"span",
|
|
5125
|
+
{
|
|
5126
|
+
"aria-hidden": "true",
|
|
5127
|
+
className: "pointer-events-none absolute bottom-0 z-[-1] h-[1.4375rem] w-5",
|
|
5128
|
+
style: {
|
|
5129
|
+
insetInlineEnd: e === "sent" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5130
|
+
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5131
|
+
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5132
|
+
transformOrigin: "center",
|
|
5133
|
+
backgroundColor: el[e],
|
|
5134
|
+
WebkitMask: is,
|
|
5135
|
+
mask: is
|
|
5136
|
+
}
|
|
5137
|
+
}
|
|
5138
|
+
), sl = {
|
|
5139
|
+
sent: {
|
|
5140
|
+
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5141
|
+
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
5142
|
+
},
|
|
5143
|
+
received: {
|
|
5144
|
+
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5145
|
+
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5146
|
+
}
|
|
5147
|
+
}, Vs = ({
|
|
5148
|
+
variant: e,
|
|
5149
|
+
text: t,
|
|
5150
|
+
tail: n = !0,
|
|
5151
|
+
header: a,
|
|
5152
|
+
className: r
|
|
5153
|
+
}) => /* @__PURE__ */ u(
|
|
5154
|
+
"div",
|
|
5155
|
+
{
|
|
5156
|
+
className: y(
|
|
5157
|
+
"relative w-fit max-w-full px-4 py-3",
|
|
5158
|
+
"text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]",
|
|
5159
|
+
r
|
|
5160
|
+
),
|
|
5161
|
+
style: {
|
|
5162
|
+
...sl[e],
|
|
5163
|
+
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5164
|
+
isolation: "isolate"
|
|
5165
|
+
},
|
|
5166
|
+
children: [
|
|
5167
|
+
a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5168
|
+
/* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
|
|
5169
|
+
n && /* @__PURE__ */ s(tl, { variant: e })
|
|
5170
|
+
]
|
|
5171
|
+
}
|
|
5172
|
+
), nl = ({
|
|
5173
|
+
text: e,
|
|
5174
|
+
tail: t,
|
|
5175
|
+
header: n,
|
|
5176
|
+
className: a
|
|
5177
|
+
}) => /* @__PURE__ */ s(
|
|
5178
|
+
Vs,
|
|
5179
|
+
{
|
|
5180
|
+
variant: "received",
|
|
5181
|
+
text: e,
|
|
5182
|
+
tail: t,
|
|
5183
|
+
header: n,
|
|
5184
|
+
className: a
|
|
5185
|
+
}
|
|
5186
|
+
), al = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(
|
|
5187
|
+
Vs,
|
|
5188
|
+
{
|
|
5189
|
+
variant: "sent",
|
|
5190
|
+
text: e,
|
|
5191
|
+
tail: t,
|
|
5192
|
+
className: n
|
|
5193
|
+
}
|
|
5194
|
+
), xl = {
|
|
5195
|
+
Sent: al,
|
|
5196
|
+
Received: nl
|
|
5197
|
+
}, rl = ({
|
|
5121
5198
|
question: e,
|
|
5122
5199
|
onClick: t,
|
|
5123
5200
|
loading: n = !1,
|
|
@@ -5129,7 +5206,7 @@ const Zi = ({
|
|
|
5129
5206
|
onClick: t,
|
|
5130
5207
|
disabled: n,
|
|
5131
5208
|
style: { backgroundColor: "#E6E5E3" },
|
|
5132
|
-
className:
|
|
5209
|
+
className: y(
|
|
5133
5210
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
5134
5211
|
{
|
|
5135
5212
|
"hover:brightness-95 active:brightness-90": !n,
|
|
@@ -5139,7 +5216,7 @@ const Zi = ({
|
|
|
5139
5216
|
),
|
|
5140
5217
|
children: e
|
|
5141
5218
|
}
|
|
5142
|
-
),
|
|
5219
|
+
), wl = ({
|
|
5143
5220
|
faqs: e,
|
|
5144
5221
|
onFaqClick: t,
|
|
5145
5222
|
loadingFaqId: n,
|
|
@@ -5168,7 +5245,7 @@ const Zi = ({
|
|
|
5168
5245
|
children: [
|
|
5169
5246
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5170
5247
|
l.map((d) => /* @__PURE__ */ s(
|
|
5171
|
-
|
|
5248
|
+
rl,
|
|
5172
5249
|
{
|
|
5173
5250
|
question: d.question,
|
|
5174
5251
|
onClick: () => t(d.id),
|
|
@@ -5182,40 +5259,41 @@ const Zi = ({
|
|
|
5182
5259
|
] }) });
|
|
5183
5260
|
};
|
|
5184
5261
|
export {
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5262
|
+
vs as A,
|
|
5263
|
+
ut as B,
|
|
5264
|
+
Vi as C,
|
|
5265
|
+
bl as D,
|
|
5266
|
+
Vr as E,
|
|
5267
|
+
wl as F,
|
|
5268
|
+
_a as G,
|
|
5269
|
+
aa as H,
|
|
5192
5270
|
es as L,
|
|
5193
|
-
|
|
5271
|
+
gl as M,
|
|
5194
5272
|
Ne as a,
|
|
5195
5273
|
se as b,
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5274
|
+
Qi as c,
|
|
5275
|
+
Bs as d,
|
|
5276
|
+
pl as e,
|
|
5277
|
+
rl as f,
|
|
5200
5278
|
oe as g,
|
|
5201
|
-
|
|
5279
|
+
Jt as h,
|
|
5202
5280
|
ye as i,
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5281
|
+
xl as j,
|
|
5282
|
+
Xr as k,
|
|
5283
|
+
fl as l,
|
|
5284
|
+
vl as m,
|
|
5285
|
+
lr as n,
|
|
5286
|
+
ar as o,
|
|
5287
|
+
Zi as p,
|
|
5288
|
+
ir as q,
|
|
5211
5289
|
we as r,
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5290
|
+
fs as s,
|
|
5291
|
+
_s as t,
|
|
5292
|
+
oa as u,
|
|
5293
|
+
Za as v,
|
|
5294
|
+
Na as w,
|
|
5295
|
+
je as x,
|
|
5296
|
+
gt as y,
|
|
5297
|
+
pt as z
|
|
5220
5298
|
};
|
|
5221
|
-
//# sourceMappingURL=index-
|
|
5299
|
+
//# sourceMappingURL=index-DSY7bIL-.js.map
|