@linktr.ee/messaging-react 4.1.6-rc-1787118265 → 4.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Card-BMmtsI__.js → Card-BBbR3g0y.js} +2 -2
- package/dist/{Card-BMmtsI__.js.map → Card-BBbR3g0y.js.map} +1 -1
- package/dist/{Card-CHR6qXhP.cjs → Card-D1nuu8UR.cjs} +2 -2
- package/dist/{Card-CHR6qXhP.cjs.map → Card-D1nuu8UR.cjs.map} +1 -1
- package/dist/{index-iaHRPEFz.cjs → index-BE8tWSEx.cjs} +3 -3
- package/dist/{index-iaHRPEFz.cjs.map → index-BE8tWSEx.cjs.map} +1 -1
- package/dist/{index-Ca3WKKZr.js → index-xcIpBghu.js} +565 -565
- package/dist/{index-Ca3WKKZr.js.map → index-xcIpBghu.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/CustomMessage/CustomMessage.test.tsx +51 -1
- package/src/components/CustomMessage/index.tsx +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as n, jsxs as f, Fragment as q } from "react/jsx-runtime";
|
|
2
|
-
import P, { createContext as Ve, useContext as we, useCallback as X, useState as B, useRef as V, useEffect as K, useId as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { isOfficialChannel as
|
|
2
|
+
import P, { createContext as Ve, useContext as we, useCallback as X, useState as B, useRef as V, useEffect as K, useId as ls, Suspense as os, useMemo as oe } from "react";
|
|
3
|
+
import { StreamChatService as cs } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as ds, LinkPreviewsManager as nt } from "stream-chat";
|
|
5
|
+
import { Chat as us, useChannelStateContext as _e, useChatContext as Ge, DateSeparator as ms, useMessageContext as ge, MessageStatus as hs, MessageErrorIcon as st, MessageText as Be, areMessageUIPropsEqual as fs, useMessageReminder as gs, useComponentContext as fn, Attachment as ps, EditMessageModal as bs, MessageBlocked as vs, MessageBouncePrompt as xs, MessageDeleted as ws, MessageIsThreadReplyInChannelButtonIndicator as _s, MessageRepliesCountButton as ys, ReminderNotification as Ns, StreamedMessageText as ks, messageHasAttachments as Cs, messageHasReactions as Ss, isDateSeparatorMessage as Es, isMessageBlocked as Is, isMessageBounced as Ts, MessageBounceModal as As, Poll as Rs, useMessageComposer as Ls, useStateStore as Ms, MessageInput as Gt, useMessageInputContext as Ds, useMessageComposerHasSendableData as Os, AttachmentPreviewList as Ps, QuotedMessagePreview as Fs, TextareaComposer as zs, MessageTimestamp as qe, AIStates as Ze, useTypingContext as Bs, useAIState as $s, Channel as Us, WithComponents as js, Window as Hs, MessageList as Yt, ChannelList as Vs, InfiniteScroll as Gs } from "stream-chat-react";
|
|
6
|
+
import { isOfficialChannel as gn, OFFICIAL_SENDER_USER_ID as Ys, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as Wt, isAgeSafetySystemType as Ws, resolveRichCardImagePresentation as Ks, selectEnabledFaqs as Xs } from "@linktr.ee/messaging-taxonomy";
|
|
7
7
|
import k from "classnames";
|
|
8
|
-
import { StarIcon as at, DotsThreeIcon as
|
|
9
|
-
import { MessageActions as
|
|
10
|
-
const
|
|
8
|
+
import { StarIcon as at, DotsThreeIcon as qs, SpinnerGapIcon as Pe, SignOutIcon as Zs, ProhibitInsetIcon as Kt, FlagIcon as pn, CurrencyDollarIcon as Js, CaretRightIcon as bn, ArrowLeftIcon as Qs, FileIcon as vn, ImageIcon as ea, SpeakerHighIcon as ta, VideoCameraIcon as xn, FileMdIcon as na, FileTextIcon as sa, FileZipIcon as aa, FilePptIcon as ra, FileCsvIcon as ia, FileXlsIcon as la, FileDocIcon as oa, FilePdfIcon as ca, CircleNotchIcon as ve, PlayIcon as rt, PauseIcon as da, LinkIcon as ua, DownloadSimpleIcon as Ee, GiftIcon as ma, WarningCircleIcon as ha, MegaphoneIcon as fa, ChecksIcon as ga, XIcon as lt, PencilSimpleIcon as pa, CaretLeftIcon as ba, TrashSimpleIcon as va, ArrowUpIcon as xa, SparkleIcon as wa, ProhibitIcon as _a } from "@phosphor-icons/react";
|
|
9
|
+
import { MessageActions as ya, DefaultDropdownActionButton as wn } from "stream-chat-react/experimental";
|
|
10
|
+
const _n = Ve({
|
|
11
11
|
service: null,
|
|
12
12
|
client: null,
|
|
13
13
|
isConnected: !1,
|
|
@@ -17,7 +17,7 @@ const wn = Ve({
|
|
|
17
17
|
refreshConnection: async () => {
|
|
18
18
|
},
|
|
19
19
|
debug: !1
|
|
20
|
-
}), ot = () => we(
|
|
20
|
+
}), ot = () => we(_n), so = ({
|
|
21
21
|
children: e,
|
|
22
22
|
user: t,
|
|
23
23
|
serviceConfig: s,
|
|
@@ -65,7 +65,7 @@ const wn = Ve({
|
|
|
65
65
|
capabilities: r
|
|
66
66
|
};
|
|
67
67
|
const z = V(null);
|
|
68
|
-
!o && a && ((I = z.current) == null ? void 0 : I.apiKey) !== a && (z.current = { apiKey: a, client: new
|
|
68
|
+
!o && a && ((I = z.current) == null ? void 0 : I.apiKey) !== a && (z.current = { apiKey: a, client: new ds(a) });
|
|
69
69
|
const F = o || (a ? ((C = z.current) == null ? void 0 : C.client) ?? null : null);
|
|
70
70
|
K(() => {
|
|
71
71
|
const S = R.current, O = _.current;
|
|
@@ -84,7 +84,7 @@ const wn = Ve({
|
|
|
84
84
|
renderCount: S,
|
|
85
85
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
86
86
|
});
|
|
87
|
-
const U = new
|
|
87
|
+
const U = new cs({
|
|
88
88
|
...O,
|
|
89
89
|
apiKey: a,
|
|
90
90
|
debug: T.current,
|
|
@@ -215,8 +215,8 @@ const wn = Ve({
|
|
|
215
215
|
renderCount: R.current,
|
|
216
216
|
willRenderChat: !!F,
|
|
217
217
|
contextValueReady: !!D
|
|
218
|
-
}), /* @__PURE__ */ n(
|
|
219
|
-
|
|
218
|
+
}), /* @__PURE__ */ n(_n.Provider, { value: D, children: F ? /* @__PURE__ */ n(
|
|
219
|
+
us,
|
|
220
220
|
{
|
|
221
221
|
client: F,
|
|
222
222
|
customClasses: {
|
|
@@ -225,7 +225,7 @@ const wn = Ve({
|
|
|
225
225
|
children: e
|
|
226
226
|
}
|
|
227
227
|
) : e });
|
|
228
|
-
},
|
|
228
|
+
}, Na = () => ot(), yn = (e) => {
|
|
229
229
|
var a, r;
|
|
230
230
|
const [t, s] = B(
|
|
231
231
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -248,13 +248,13 @@ const wn = Ve({
|
|
|
248
248
|
};
|
|
249
249
|
}, [e]), t;
|
|
250
250
|
};
|
|
251
|
-
function
|
|
251
|
+
function Nn(e, t, s) {
|
|
252
252
|
const a = Object.values(e || {});
|
|
253
|
-
if (
|
|
253
|
+
if (gn(s)) {
|
|
254
254
|
const r = a.find(
|
|
255
255
|
(i) => {
|
|
256
256
|
var o;
|
|
257
|
-
return ((o = i.user) == null ? void 0 : o.id) ===
|
|
257
|
+
return ((o = i.user) == null ? void 0 : o.id) === Ys;
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
260
|
if (r) return r;
|
|
@@ -266,18 +266,18 @@ function yn(e, t, s) {
|
|
|
266
266
|
}
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
|
-
const
|
|
270
|
-
function
|
|
271
|
-
return
|
|
269
|
+
const ka = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
270
|
+
function Ca(e) {
|
|
271
|
+
return ka.test(e.trim());
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Xt(e, t) {
|
|
274
274
|
const s = e == null ? void 0 : e.trim();
|
|
275
|
-
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !
|
|
275
|
+
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !Ca(s);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
277
|
+
function kn(e) {
|
|
278
|
+
return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const qt = [
|
|
281
281
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
282
282
|
// Apple
|
|
283
283
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -305,7 +305,7 @@ const Xt = [
|
|
|
305
305
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
306
306
|
// Melon
|
|
307
307
|
];
|
|
308
|
-
function
|
|
308
|
+
function Sa(e) {
|
|
309
309
|
let t = 0;
|
|
310
310
|
for (let s = 0; s < e.length; s++) {
|
|
311
311
|
const a = e.charCodeAt(s);
|
|
@@ -313,14 +313,14 @@ function Ca(e) {
|
|
|
313
313
|
}
|
|
314
314
|
return Math.abs(t);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
return
|
|
318
|
-
}
|
|
319
|
-
function Sa(e) {
|
|
320
|
-
return kn(e).emoji;
|
|
316
|
+
function Cn(e) {
|
|
317
|
+
return qt[Sa(e) % qt.length];
|
|
321
318
|
}
|
|
322
319
|
function Ea(e) {
|
|
323
|
-
return
|
|
320
|
+
return Cn(e).emoji;
|
|
321
|
+
}
|
|
322
|
+
function Ia(e) {
|
|
323
|
+
return Cn(e).bgColor;
|
|
324
324
|
}
|
|
325
325
|
const ye = ({
|
|
326
326
|
id: e,
|
|
@@ -331,7 +331,7 @@ const ye = ({
|
|
|
331
331
|
shape: i = "squircle",
|
|
332
332
|
dmAgentEnabled: o = !1
|
|
333
333
|
}) => {
|
|
334
|
-
const l =
|
|
334
|
+
const l = Ea(e), d = Ia(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
|
|
335
335
|
"div",
|
|
336
336
|
{
|
|
337
337
|
"aria-hidden": "true",
|
|
@@ -382,7 +382,7 @@ const ye = ({
|
|
|
382
382
|
]
|
|
383
383
|
}
|
|
384
384
|
);
|
|
385
|
-
},
|
|
385
|
+
}, Ta = "https://linktr.ee/s/about/trust-center/report", Aa = ({
|
|
386
386
|
channel: e,
|
|
387
387
|
participant: t,
|
|
388
388
|
showBlockParticipant: s = !0,
|
|
@@ -466,7 +466,7 @@ const ye = ({
|
|
|
466
466
|
}
|
|
467
467
|
},
|
|
468
468
|
handleReportUser: () => {
|
|
469
|
-
d == null || d(), u == null || u(), window.open(
|
|
469
|
+
d == null || d(), u == null || u(), window.open(Ta, "_blank", "noopener,noreferrer");
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
}, ke = ({
|
|
@@ -486,7 +486,7 @@ const ye = ({
|
|
|
486
486
|
...a,
|
|
487
487
|
children: s
|
|
488
488
|
}
|
|
489
|
-
),
|
|
489
|
+
), Ra = ({
|
|
490
490
|
channel: e,
|
|
491
491
|
participant: t,
|
|
492
492
|
showDeleteConversation: s = !0,
|
|
@@ -500,7 +500,7 @@ const ye = ({
|
|
|
500
500
|
customChannelActions: h,
|
|
501
501
|
triggerClassName: m
|
|
502
502
|
}) => {
|
|
503
|
-
const [g, c] = B(!1), b = V(null), w =
|
|
503
|
+
const [g, c] = B(!1), b = V(null), w = ls(), v = X(() => c(!1), []), {
|
|
504
504
|
isParticipantBlocked: x,
|
|
505
505
|
isCheckingBlockedStatus: p,
|
|
506
506
|
isLeaving: y,
|
|
@@ -509,7 +509,7 @@ const ye = ({
|
|
|
509
509
|
handleBlockUser: A,
|
|
510
510
|
handleUnblockUser: R,
|
|
511
511
|
handleReportUser: z
|
|
512
|
-
} =
|
|
512
|
+
} = Aa({
|
|
513
513
|
channel: e,
|
|
514
514
|
participant: t,
|
|
515
515
|
showBlockParticipant: a,
|
|
@@ -543,7 +543,7 @@ const ye = ({
|
|
|
543
543
|
"aria-controls": g ? w : void 0,
|
|
544
544
|
onClick: () => c((L) => !L),
|
|
545
545
|
children: [
|
|
546
|
-
/* @__PURE__ */ n(
|
|
546
|
+
/* @__PURE__ */ n(qs, { className: "size-5 text-black/90" }),
|
|
547
547
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
548
548
|
]
|
|
549
549
|
}
|
|
@@ -565,7 +565,7 @@ const ye = ({
|
|
|
565
565
|
disabled: y,
|
|
566
566
|
"aria-busy": y,
|
|
567
567
|
children: [
|
|
568
|
-
y ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
568
|
+
y ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Zs, { className: "h-5 w-5" }),
|
|
569
569
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
570
570
|
]
|
|
571
571
|
}
|
|
@@ -584,7 +584,7 @@ const ye = ({
|
|
|
584
584
|
disabled: _,
|
|
585
585
|
"aria-busy": _,
|
|
586
586
|
children: [
|
|
587
|
-
_ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
587
|
+
_ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Kt, { className: "h-5 w-5" }),
|
|
588
588
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
589
589
|
]
|
|
590
590
|
}
|
|
@@ -595,13 +595,13 @@ const ye = ({
|
|
|
595
595
|
disabled: _,
|
|
596
596
|
"aria-busy": _,
|
|
597
597
|
children: [
|
|
598
|
-
_ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
598
|
+
_ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Kt, { className: "h-5 w-5" }),
|
|
599
599
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
600
600
|
]
|
|
601
601
|
}
|
|
602
602
|
) }),
|
|
603
603
|
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(ke, { variant: "danger", onClick: z, children: [
|
|
604
|
-
/* @__PURE__ */ n(
|
|
604
|
+
/* @__PURE__ */ n(pn, { className: "h-5 w-5" }),
|
|
605
605
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
606
606
|
] }) }),
|
|
607
607
|
h
|
|
@@ -609,7 +609,7 @@ const ye = ({
|
|
|
609
609
|
}
|
|
610
610
|
)
|
|
611
611
|
] });
|
|
612
|
-
}, Je = "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",
|
|
612
|
+
}, Je = "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", La = "CUSTOMER_PAID", Ma = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === La, Da = ({
|
|
613
613
|
className: e,
|
|
614
614
|
onBack: t,
|
|
615
615
|
showBackButton: s,
|
|
@@ -631,14 +631,14 @@ const ye = ({
|
|
|
631
631
|
const { channel: v } = _e(), { client: x } = Ge(), p = P.useMemo(
|
|
632
632
|
() => {
|
|
633
633
|
var S;
|
|
634
|
-
return
|
|
634
|
+
return Nn(
|
|
635
635
|
(S = v.state) == null ? void 0 : S.members,
|
|
636
636
|
x == null ? void 0 : x.userID,
|
|
637
637
|
v.type
|
|
638
638
|
);
|
|
639
639
|
},
|
|
640
640
|
[(E = v.state) == null ? void 0 : E.members, x == null ? void 0 : x.userID, v.type]
|
|
641
|
-
), y =
|
|
641
|
+
), y = kn(p == null ? void 0 : p.user), _ = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, T = yn(v), A = Ma((I = v.data) == null ? void 0 : I.customer_tag) && (p == null ? void 0 : p.is_follower) === !0, R = a && T, z = A || R || !!w, F = async () => {
|
|
642
642
|
try {
|
|
643
643
|
T ? await v.unpin() : await v.pin();
|
|
644
644
|
} catch (S) {
|
|
@@ -674,7 +674,7 @@ const ye = ({
|
|
|
674
674
|
{
|
|
675
675
|
"aria-label": "Paid customer",
|
|
676
676
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
677
|
-
children: /* @__PURE__ */ n(
|
|
677
|
+
children: /* @__PURE__ */ n(Js, { className: "size-2.5", weight: "bold" })
|
|
678
678
|
}
|
|
679
679
|
),
|
|
680
680
|
R && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
|
|
@@ -686,7 +686,7 @@ const ye = ({
|
|
|
686
686
|
}
|
|
687
687
|
) }),
|
|
688
688
|
w && /* @__PURE__ */ n(
|
|
689
|
-
|
|
689
|
+
bn,
|
|
690
690
|
{
|
|
691
691
|
"aria-hidden": "true",
|
|
692
692
|
className: "size-4 shrink-0 text-black/65",
|
|
@@ -717,7 +717,7 @@ const ye = ({
|
|
|
717
717
|
}),
|
|
718
718
|
type: "button",
|
|
719
719
|
"aria-label": "Back to conversations",
|
|
720
|
-
children: /* @__PURE__ */ n(
|
|
720
|
+
children: /* @__PURE__ */ n(Qs, { className: "size-5 text-black/90" })
|
|
721
721
|
}
|
|
722
722
|
) }),
|
|
723
723
|
/* @__PURE__ */ n("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ n(
|
|
@@ -752,7 +752,7 @@ const ye = ({
|
|
|
752
752
|
}
|
|
753
753
|
),
|
|
754
754
|
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
755
|
-
|
|
755
|
+
Ra,
|
|
756
756
|
{
|
|
757
757
|
channel: v,
|
|
758
758
|
participant: p,
|
|
@@ -772,40 +772,40 @@ const ye = ({
|
|
|
772
772
|
] })
|
|
773
773
|
}
|
|
774
774
|
);
|
|
775
|
-
},
|
|
776
|
-
function
|
|
775
|
+
}, Oa = (e) => /* @__PURE__ */ n(ms, { ...e, position: "center" });
|
|
776
|
+
function Pa(e) {
|
|
777
777
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function Sn({
|
|
780
780
|
message: e,
|
|
781
781
|
viewerLanguage: t
|
|
782
782
|
}) {
|
|
783
783
|
var r;
|
|
784
|
-
const s = e == null ? void 0 : e.text, a =
|
|
784
|
+
const s = e == null ? void 0 : e.text, a = Pa(t);
|
|
785
785
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
786
786
|
}
|
|
787
|
-
const
|
|
788
|
-
function
|
|
787
|
+
const Fa = ["linktr.ee"], Zt = "messaging-attachment-v1_0";
|
|
788
|
+
function za(e) {
|
|
789
789
|
try {
|
|
790
790
|
return new URL(e).hostname.toLowerCase();
|
|
791
791
|
} catch {
|
|
792
792
|
return null;
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
return
|
|
795
|
+
function Ba(e) {
|
|
796
|
+
return Fa.some(
|
|
797
797
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
800
|
function de(e) {
|
|
801
801
|
const t = e == null ? void 0 : e.trim();
|
|
802
802
|
if (!t) return;
|
|
803
|
-
const s =
|
|
804
|
-
if (!s || !
|
|
803
|
+
const s = za(t);
|
|
804
|
+
if (!s || !Ba(s)) return t;
|
|
805
805
|
const a = new URL(t);
|
|
806
|
-
return a.searchParams.get("io") === "true" && a.searchParams.get("size") ===
|
|
806
|
+
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Zt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Zt), a.toString());
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const $a = [
|
|
809
809
|
[/pdf/, "pdf"],
|
|
810
810
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
811
811
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -818,39 +818,39 @@ const Ba = [
|
|
|
818
818
|
function ue(e) {
|
|
819
819
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
const t =
|
|
821
|
+
function En(e) {
|
|
822
|
+
const t = $a.find(
|
|
823
823
|
([s]) => s.test(e)
|
|
824
824
|
);
|
|
825
825
|
return t ? t[1] : "generic";
|
|
826
826
|
}
|
|
827
|
-
const
|
|
828
|
-
video:
|
|
829
|
-
audio:
|
|
830
|
-
image:
|
|
831
|
-
document:
|
|
832
|
-
},
|
|
833
|
-
pdf:
|
|
834
|
-
doc:
|
|
835
|
-
xls:
|
|
836
|
-
csv:
|
|
837
|
-
ppt:
|
|
838
|
-
zip:
|
|
839
|
-
text:
|
|
840
|
-
markdown:
|
|
841
|
-
generic:
|
|
827
|
+
const Ua = {
|
|
828
|
+
video: xn,
|
|
829
|
+
audio: ta,
|
|
830
|
+
image: ea,
|
|
831
|
+
document: vn
|
|
832
|
+
}, ja = {
|
|
833
|
+
pdf: ca,
|
|
834
|
+
doc: oa,
|
|
835
|
+
xls: la,
|
|
836
|
+
csv: ia,
|
|
837
|
+
ppt: ra,
|
|
838
|
+
zip: aa,
|
|
839
|
+
text: sa,
|
|
840
|
+
markdown: na,
|
|
841
|
+
generic: vn
|
|
842
842
|
};
|
|
843
|
-
function
|
|
843
|
+
function Ha(e) {
|
|
844
844
|
const t = ue(e);
|
|
845
|
-
return t !== "document" ?
|
|
845
|
+
return t !== "document" ? Ua[t] : ja[En(e)];
|
|
846
846
|
}
|
|
847
847
|
function xe(e, t) {
|
|
848
|
-
return P.createElement(
|
|
848
|
+
return P.createElement(Ha(e), t);
|
|
849
849
|
}
|
|
850
|
-
const
|
|
850
|
+
const Va = (e) => {
|
|
851
851
|
var t, s;
|
|
852
852
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
|
|
853
|
-
},
|
|
853
|
+
}, Ga = ({
|
|
854
854
|
source: e,
|
|
855
855
|
mimeType: t,
|
|
856
856
|
poster: s,
|
|
@@ -870,7 +870,7 @@ const Ha = (e) => {
|
|
|
870
870
|
const Y = M.getBoundingClientRect();
|
|
871
871
|
return Math.max(
|
|
872
872
|
0,
|
|
873
|
-
Math.min(1, (
|
|
873
|
+
Math.min(1, (Va(N) - Y.left) / Y.width)
|
|
874
874
|
);
|
|
875
875
|
}, []), U = X((N) => {
|
|
876
876
|
const M = m.current;
|
|
@@ -1051,7 +1051,7 @@ const Ha = (e) => {
|
|
|
1051
1051
|
},
|
|
1052
1052
|
className: "shrink-0 text-white",
|
|
1053
1053
|
"aria-label": w ? "Pause" : "Play",
|
|
1054
|
-
children: w ? /* @__PURE__ */ n(
|
|
1054
|
+
children: w ? /* @__PURE__ */ n(da, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(rt, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1055
1055
|
}
|
|
1056
1056
|
),
|
|
1057
1057
|
/* @__PURE__ */ f(
|
|
@@ -1099,7 +1099,7 @@ const Ha = (e) => {
|
|
|
1099
1099
|
]
|
|
1100
1100
|
}
|
|
1101
1101
|
);
|
|
1102
|
-
},
|
|
1102
|
+
}, Jt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ya = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", In = ({
|
|
1103
1103
|
mimeType: e,
|
|
1104
1104
|
sourceUrl: t,
|
|
1105
1105
|
thumbnailUrl: s,
|
|
@@ -1110,7 +1110,7 @@ const Ha = (e) => {
|
|
|
1110
1110
|
}) => {
|
|
1111
1111
|
const l = ue(e), [d, u] = B(!1), h = de(t), m = de(s);
|
|
1112
1112
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
1113
|
-
|
|
1113
|
+
Ga,
|
|
1114
1114
|
{
|
|
1115
1115
|
source: t,
|
|
1116
1116
|
mimeType: e,
|
|
@@ -1157,11 +1157,11 @@ const Ha = (e) => {
|
|
|
1157
1157
|
{
|
|
1158
1158
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1159
1159
|
children: xe(e, {
|
|
1160
|
-
className:
|
|
1160
|
+
className: Jt(r),
|
|
1161
1161
|
weight: "regular"
|
|
1162
1162
|
})
|
|
1163
1163
|
}
|
|
1164
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
1164
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${Ya(r)}`, children: /* @__PURE__ */ n(
|
|
1165
1165
|
"img",
|
|
1166
1166
|
{
|
|
1167
1167
|
src: m ?? s,
|
|
@@ -1174,12 +1174,12 @@ const Ha = (e) => {
|
|
|
1174
1174
|
{
|
|
1175
1175
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1176
1176
|
children: xe(e, {
|
|
1177
|
-
className:
|
|
1177
|
+
className: Jt(r),
|
|
1178
1178
|
weight: "regular"
|
|
1179
1179
|
})
|
|
1180
1180
|
}
|
|
1181
1181
|
);
|
|
1182
|
-
},
|
|
1182
|
+
}, Tn = ({
|
|
1183
1183
|
variant: e,
|
|
1184
1184
|
thumbnail: t,
|
|
1185
1185
|
title: s,
|
|
@@ -1245,25 +1245,25 @@ const Ha = (e) => {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
1247
|
};
|
|
1248
|
-
function
|
|
1248
|
+
function An(e) {
|
|
1249
1249
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1250
1250
|
}
|
|
1251
1251
|
function ct(e) {
|
|
1252
1252
|
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)]`;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function Wa(e) {
|
|
1255
1255
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function Ka(e) {
|
|
1258
1258
|
return e ? "text-white" : "text-black";
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function Xa(e) {
|
|
1261
1261
|
return e ? "text-white/55" : "text-black/55";
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function qa(e) {
|
|
1264
1264
|
return e ? "text-white/40" : "text-black/40";
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function Za(e) {
|
|
1267
1267
|
return e ? "text-white/20" : "text-black/20";
|
|
1268
1268
|
}
|
|
1269
1269
|
const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
@@ -1278,29 +1278,29 @@ const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1278
1278
|
) : /* @__PURE__ */ n(
|
|
1279
1279
|
"div",
|
|
1280
1280
|
{
|
|
1281
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1282
|
-
children: /* @__PURE__ */ n(
|
|
1281
|
+
className: `aspect-video w-full rounded-[20px] ${Wa(t)} flex items-center justify-center`,
|
|
1282
|
+
children: /* @__PURE__ */ n(ua, { className: `size-12 ${Za(t)}` })
|
|
1283
1283
|
}
|
|
1284
1284
|
) }),
|
|
1285
1285
|
/* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
|
|
1286
1286
|
s && /* @__PURE__ */ n(
|
|
1287
1287
|
"p",
|
|
1288
1288
|
{
|
|
1289
|
-
className: `truncate text-[14px] font-medium leading-5 ${
|
|
1289
|
+
className: `truncate text-[14px] font-medium leading-5 ${Ka(t)}`,
|
|
1290
1290
|
children: s
|
|
1291
1291
|
}
|
|
1292
1292
|
),
|
|
1293
1293
|
a && /* @__PURE__ */ n(
|
|
1294
1294
|
"p",
|
|
1295
1295
|
{
|
|
1296
|
-
className: `truncate text-[12px] leading-4 ${
|
|
1296
|
+
className: `truncate text-[12px] leading-4 ${Xa(t)}`,
|
|
1297
1297
|
children: a
|
|
1298
1298
|
}
|
|
1299
1299
|
),
|
|
1300
1300
|
d && /* @__PURE__ */ n(
|
|
1301
1301
|
"p",
|
|
1302
1302
|
{
|
|
1303
|
-
className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1303
|
+
className: `mt-1 truncate text-[12px] leading-4 ${qa(t)}`,
|
|
1304
1304
|
children: d
|
|
1305
1305
|
}
|
|
1306
1306
|
)
|
|
@@ -1325,7 +1325,7 @@ function ut(e) {
|
|
|
1325
1325
|
var t;
|
|
1326
1326
|
return (t = e.attachments) == null ? void 0 : t.find(Ye);
|
|
1327
1327
|
}
|
|
1328
|
-
async function
|
|
1328
|
+
async function Ja(e, t) {
|
|
1329
1329
|
let s;
|
|
1330
1330
|
try {
|
|
1331
1331
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1337,7 +1337,7 @@ async function Za(e, t) {
|
|
|
1337
1337
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1338
1338
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1339
1339
|
}
|
|
1340
|
-
const
|
|
1340
|
+
const Qa = ({
|
|
1341
1341
|
url: e,
|
|
1342
1342
|
filename: t
|
|
1343
1343
|
}) => {
|
|
@@ -1349,7 +1349,7 @@ const Ja = ({
|
|
|
1349
1349
|
onClick: (i) => {
|
|
1350
1350
|
i.stopPropagation();
|
|
1351
1351
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1352
|
-
a(!0),
|
|
1352
|
+
a(!0), Ja(e, t).then(() => {
|
|
1353
1353
|
o == null || o.close();
|
|
1354
1354
|
}).catch(() => {
|
|
1355
1355
|
o && (o.location.href = e);
|
|
@@ -1391,16 +1391,16 @@ function mt(e) {
|
|
|
1391
1391
|
thumbnailUrl: h
|
|
1392
1392
|
};
|
|
1393
1393
|
}
|
|
1394
|
-
const
|
|
1394
|
+
const Rn = ({
|
|
1395
1395
|
resolvedUrl: e,
|
|
1396
1396
|
resolvedType: t,
|
|
1397
1397
|
title: s,
|
|
1398
1398
|
fileSize: a,
|
|
1399
1399
|
thumbnailUrl: r
|
|
1400
1400
|
}) => {
|
|
1401
|
-
const i = a !== void 0 ?
|
|
1401
|
+
const i = a !== void 0 ? An(a) : void 0;
|
|
1402
1402
|
return /* @__PURE__ */ n(
|
|
1403
|
-
|
|
1403
|
+
Tn,
|
|
1404
1404
|
{
|
|
1405
1405
|
variant: "dark",
|
|
1406
1406
|
title: s,
|
|
@@ -1408,7 +1408,7 @@ const An = ({
|
|
|
1408
1408
|
mimeType: t,
|
|
1409
1409
|
detail: i,
|
|
1410
1410
|
thumbnail: /* @__PURE__ */ n(
|
|
1411
|
-
|
|
1411
|
+
In,
|
|
1412
1412
|
{
|
|
1413
1413
|
mimeType: t,
|
|
1414
1414
|
sourceUrl: e,
|
|
@@ -1419,23 +1419,23 @@ const An = ({
|
|
|
1419
1419
|
)
|
|
1420
1420
|
}
|
|
1421
1421
|
);
|
|
1422
|
-
},
|
|
1422
|
+
}, Ln = ({
|
|
1423
1423
|
resolvedUrl: e,
|
|
1424
1424
|
resolvedType: t,
|
|
1425
1425
|
title: s,
|
|
1426
1426
|
fileSize: a,
|
|
1427
1427
|
thumbnailUrl: r
|
|
1428
1428
|
}) => {
|
|
1429
|
-
const i = ue(t), o = a !== void 0 ?
|
|
1429
|
+
const i = ue(t), o = a !== void 0 ? An(a) : void 0;
|
|
1430
1430
|
return /* @__PURE__ */ n(
|
|
1431
|
-
|
|
1431
|
+
Tn,
|
|
1432
1432
|
{
|
|
1433
1433
|
variant: "light",
|
|
1434
1434
|
title: s,
|
|
1435
1435
|
mimeType: t,
|
|
1436
1436
|
detail: o,
|
|
1437
1437
|
thumbnail: /* @__PURE__ */ n(
|
|
1438
|
-
|
|
1438
|
+
In,
|
|
1439
1439
|
{
|
|
1440
1440
|
mimeType: t,
|
|
1441
1441
|
sourceUrl: e,
|
|
@@ -1445,10 +1445,10 @@ const An = ({
|
|
|
1445
1445
|
containedImage: i === "image" || i === "document"
|
|
1446
1446
|
}
|
|
1447
1447
|
),
|
|
1448
|
-
action: /* @__PURE__ */ n(
|
|
1448
|
+
action: /* @__PURE__ */ n(Qa, { url: e, filename: s })
|
|
1449
1449
|
}
|
|
1450
1450
|
);
|
|
1451
|
-
},
|
|
1451
|
+
}, er = ({
|
|
1452
1452
|
message: e,
|
|
1453
1453
|
isMyMessage: t = !1
|
|
1454
1454
|
}) => {
|
|
@@ -1485,46 +1485,46 @@ const An = ({
|
|
|
1485
1485
|
attachment: s,
|
|
1486
1486
|
isMyMessage: t
|
|
1487
1487
|
}
|
|
1488
|
-
) }) : t ? /* @__PURE__ */ n(
|
|
1488
|
+
) }) : t ? /* @__PURE__ */ n(Rn, { ...a }) : /* @__PURE__ */ n(Ln, { ...a })
|
|
1489
1489
|
}
|
|
1490
1490
|
) })
|
|
1491
1491
|
}
|
|
1492
1492
|
)
|
|
1493
1493
|
] });
|
|
1494
|
-
},
|
|
1494
|
+
}, tr = ({
|
|
1495
1495
|
message: e
|
|
1496
1496
|
}) => {
|
|
1497
1497
|
const t = ut(e);
|
|
1498
1498
|
if (t)
|
|
1499
1499
|
return /* @__PURE__ */ n("div", { className: ct(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !0 }) });
|
|
1500
1500
|
const s = mt(e);
|
|
1501
|
-
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(
|
|
1502
|
-
},
|
|
1501
|
+
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Rn, { ...s }) }) : null;
|
|
1502
|
+
}, nr = ({
|
|
1503
1503
|
message: e
|
|
1504
1504
|
}) => {
|
|
1505
1505
|
const t = ut(e);
|
|
1506
1506
|
if (t)
|
|
1507
1507
|
return /* @__PURE__ */ n("div", { className: ct(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !1 }) });
|
|
1508
1508
|
const s = mt(e);
|
|
1509
|
-
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(
|
|
1510
|
-
},
|
|
1511
|
-
Creator:
|
|
1512
|
-
Visitor:
|
|
1513
|
-
}),
|
|
1509
|
+
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Ln, { ...s }) }) : null;
|
|
1510
|
+
}, ao = Object.assign(er, {
|
|
1511
|
+
Creator: tr,
|
|
1512
|
+
Visitor: nr
|
|
1513
|
+
}), sr = {
|
|
1514
1514
|
isUnlocking: () => !1
|
|
1515
|
-
},
|
|
1516
|
-
LockedAttachment:
|
|
1517
|
-
},
|
|
1518
|
-
function
|
|
1519
|
-
return we(
|
|
1515
|
+
}, ar = {
|
|
1516
|
+
LockedAttachment: sr
|
|
1517
|
+
}, Mn = Ve({}), ro = Mn.Provider;
|
|
1518
|
+
function rr(e) {
|
|
1519
|
+
return we(Mn)[e] ?? ar[e];
|
|
1520
1520
|
}
|
|
1521
|
-
const
|
|
1521
|
+
const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import("./Card-BBbR3g0y.js")), or = () => /* @__PURE__ */ n(
|
|
1522
1522
|
"div",
|
|
1523
1523
|
{
|
|
1524
1524
|
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)]",
|
|
1525
1525
|
"aria-hidden": !0
|
|
1526
1526
|
}
|
|
1527
|
-
), Fe = (e) => /* @__PURE__ */ n(
|
|
1527
|
+
), Fe = (e) => /* @__PURE__ */ n(os, { fallback: /* @__PURE__ */ n(or, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ir, { ...e }) : /* @__PURE__ */ n(lr, { ...e }) }), cr = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1528
1528
|
"svg",
|
|
1529
1529
|
{
|
|
1530
1530
|
width: e,
|
|
@@ -1541,7 +1541,7 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1541
1541
|
}
|
|
1542
1542
|
)
|
|
1543
1543
|
}
|
|
1544
|
-
),
|
|
1544
|
+
), Dn = (e) => {
|
|
1545
1545
|
var t;
|
|
1546
1546
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.PAID;
|
|
1547
1547
|
}, $e = (e) => {
|
|
@@ -1550,28 +1550,28 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1550
1550
|
}, ht = (e) => {
|
|
1551
1551
|
var t;
|
|
1552
1552
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.ATTACHMENT;
|
|
1553
|
-
},
|
|
1553
|
+
}, dr = (e) => {
|
|
1554
1554
|
var t;
|
|
1555
1555
|
return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
1556
|
-
},
|
|
1556
|
+
}, ur = (e) => {
|
|
1557
1557
|
var t;
|
|
1558
1558
|
return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
1559
|
-
},
|
|
1559
|
+
}, mr = (e) => {
|
|
1560
1560
|
var t;
|
|
1561
|
-
return
|
|
1562
|
-
},
|
|
1561
|
+
return Dn(e) && !!((t = e.metadata) != null && t.amount_text);
|
|
1562
|
+
}, Qt = ({
|
|
1563
1563
|
message: e,
|
|
1564
1564
|
isMyMessage: t = !1,
|
|
1565
1565
|
hasAttachment: s = !1
|
|
1566
1566
|
}) => {
|
|
1567
1567
|
var m;
|
|
1568
|
-
const a =
|
|
1568
|
+
const a = Dn(e), r = $e(e);
|
|
1569
1569
|
if (!a && !r)
|
|
1570
1570
|
return null;
|
|
1571
1571
|
if (a) {
|
|
1572
1572
|
const g = (m = e.metadata) == null ? void 0 : m.amount_text;
|
|
1573
1573
|
return g ? /* @__PURE__ */ f("div", { className: "message-tag--paid inline-flex items-center gap-1 text-[12px] font-medium leading-[2] text-[#016630]", children: [
|
|
1574
|
-
/* @__PURE__ */ n(
|
|
1574
|
+
/* @__PURE__ */ n(ma, { size: 12 }),
|
|
1575
1575
|
/* @__PURE__ */ f("span", { children: [
|
|
1576
1576
|
"Delivered with ",
|
|
1577
1577
|
g,
|
|
@@ -1579,7 +1579,7 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1579
1579
|
] })
|
|
1580
1580
|
] }) : null;
|
|
1581
1581
|
}
|
|
1582
|
-
const i = t && s, o = i ? "Sent with AI" : "Sent by AI Assistant", l = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", d = i ? "justify-end gap-2 text-black/30" : t ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", u = /* @__PURE__ */ n("span", { className: "text-left", children: o }), h = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(
|
|
1582
|
+
const i = t && s, o = i ? "Sent with AI" : "Sent by AI Assistant", l = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", d = i ? "justify-end gap-2 text-black/30" : t ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", u = /* @__PURE__ */ n("span", { className: "text-left", children: o }), h = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(cr, { size: i ? 12 : 15 }) });
|
|
1583
1583
|
return /* @__PURE__ */ n(
|
|
1584
1584
|
"div",
|
|
1585
1585
|
{
|
|
@@ -1594,7 +1594,7 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1594
1594
|
] })
|
|
1595
1595
|
}
|
|
1596
1596
|
);
|
|
1597
|
-
},
|
|
1597
|
+
}, en = `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%`, hr = {
|
|
1598
1598
|
me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
1599
1599
|
other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
1600
1600
|
}, Ue = ({ side: e }) => /* @__PURE__ */ n(
|
|
@@ -1607,24 +1607,24 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1607
1607
|
insetInlineStart: e === "other" ? "calc(-1 * 0.3125rem)" : void 0,
|
|
1608
1608
|
transform: e === "other" ? "scaleX(-1)" : void 0,
|
|
1609
1609
|
transformOrigin: "center",
|
|
1610
|
-
backgroundColor:
|
|
1611
|
-
WebkitMask:
|
|
1612
|
-
mask:
|
|
1610
|
+
backgroundColor: hr[e],
|
|
1611
|
+
WebkitMask: en,
|
|
1612
|
+
mask: en
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
|
-
),
|
|
1615
|
+
), On = Ve(
|
|
1616
1616
|
void 0
|
|
1617
|
-
),
|
|
1617
|
+
), fr = (e) => {
|
|
1618
1618
|
var s;
|
|
1619
1619
|
const t = (s = e.metadata) == null ? void 0 : s.outbound_id;
|
|
1620
1620
|
return typeof t == "string" ? t : void 0;
|
|
1621
|
-
},
|
|
1621
|
+
}, gr = (e, t) => {
|
|
1622
1622
|
if (!t || !(e != null && e.length))
|
|
1623
1623
|
return;
|
|
1624
1624
|
const s = /* @__PURE__ */ new Set();
|
|
1625
1625
|
let a;
|
|
1626
1626
|
for (const r of e) {
|
|
1627
|
-
const i =
|
|
1627
|
+
const i = fr(r);
|
|
1628
1628
|
if (!i || s.has(i))
|
|
1629
1629
|
continue;
|
|
1630
1630
|
s.add(i);
|
|
@@ -1635,7 +1635,7 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1635
1635
|
});
|
|
1636
1636
|
}
|
|
1637
1637
|
return a;
|
|
1638
|
-
},
|
|
1638
|
+
}, pr = (e, t) => {
|
|
1639
1639
|
if (e === t)
|
|
1640
1640
|
return !0;
|
|
1641
1641
|
if (!e || !t)
|
|
@@ -1647,13 +1647,13 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1647
1647
|
return e[r].id === ((i = t[r]) == null ? void 0 : i.id) && e[r].name === ((o = t[r]) == null ? void 0 : o.name);
|
|
1648
1648
|
}
|
|
1649
1649
|
);
|
|
1650
|
-
},
|
|
1651
|
-
const s =
|
|
1652
|
-
return
|
|
1653
|
-
},
|
|
1650
|
+
}, br = (e, t) => {
|
|
1651
|
+
const s = gr(e, t), [a, r] = B(s);
|
|
1652
|
+
return pr(a, s) ? a : (r(s), s);
|
|
1653
|
+
}, Pn = (e) => {
|
|
1654
1654
|
var t;
|
|
1655
1655
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.TIP;
|
|
1656
|
-
},
|
|
1656
|
+
}, vr = ({ message: e }) => {
|
|
1657
1657
|
var s;
|
|
1658
1658
|
const t = (s = e.metadata) == null ? void 0 : s.amount_text;
|
|
1659
1659
|
return t ? /* @__PURE__ */ f("div", { className: "message-tip-pill inline-flex items-end gap-0.5 max-w-[520px] rounded-[1.5rem] bg-[#43e660] px-4 py-3 text-white", children: [
|
|
@@ -1681,9 +1681,9 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1681
1681
|
})();
|
|
1682
1682
|
return e.id === s;
|
|
1683
1683
|
}, ze = () => ft() ? /* @__PURE__ */ f(q, { children: [
|
|
1684
|
-
/* @__PURE__ */ n(
|
|
1684
|
+
/* @__PURE__ */ n(ga, { weight: "bold", "aria-hidden": "true" }),
|
|
1685
1685
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
1686
|
-
] }) : null,
|
|
1686
|
+
] }) : null, xr = () => ft() ? /* @__PURE__ */ f(q, { children: [
|
|
1687
1687
|
/* @__PURE__ */ n(
|
|
1688
1688
|
ve,
|
|
1689
1689
|
{
|
|
@@ -1693,12 +1693,12 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1693
1693
|
}
|
|
1694
1694
|
),
|
|
1695
1695
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
|
|
1696
|
-
] }) : null,
|
|
1696
|
+
] }) : null, wr = ({
|
|
1697
1697
|
outbound: e,
|
|
1698
1698
|
onOutboundClick: t
|
|
1699
1699
|
}) => {
|
|
1700
1700
|
const s = e.name || "Broadcast", r = /* @__PURE__ */ f(q, { children: [
|
|
1701
|
-
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
1701
|
+
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(fa, { weight: "fill" }) }),
|
|
1702
1702
|
/* @__PURE__ */ n(
|
|
1703
1703
|
"span",
|
|
1704
1704
|
{
|
|
@@ -1720,10 +1720,10 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1720
1720
|
children: r
|
|
1721
1721
|
}
|
|
1722
1722
|
) : r;
|
|
1723
|
-
},
|
|
1724
|
-
/* @__PURE__ */ n(
|
|
1723
|
+
}, _r = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
|
|
1724
|
+
/* @__PURE__ */ n(ha, { weight: "bold", "aria-hidden": "true" }),
|
|
1725
1725
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
|
|
1726
|
-
] }),
|
|
1726
|
+
] }), yr = ({
|
|
1727
1727
|
onOutboundClick: e,
|
|
1728
1728
|
resolvedOutbound: t
|
|
1729
1729
|
}) => {
|
|
@@ -1734,22 +1734,22 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1734
1734
|
if (r)
|
|
1735
1735
|
return null;
|
|
1736
1736
|
if (a.status === "failed" && i && a.type !== "error")
|
|
1737
|
-
return /* @__PURE__ */ n(
|
|
1737
|
+
return /* @__PURE__ */ n(_r, {});
|
|
1738
1738
|
if (!i)
|
|
1739
1739
|
return null;
|
|
1740
1740
|
const l = (h = a.metadata) == null ? void 0 : h.outbound_id, d = a.status !== "sending" && a.status !== "failed" && l && t ? /* @__PURE__ */ n(
|
|
1741
|
-
|
|
1741
|
+
wr,
|
|
1742
1742
|
{
|
|
1743
1743
|
outbound: t,
|
|
1744
1744
|
onOutboundClick: e
|
|
1745
1745
|
}
|
|
1746
|
-
) : null, u =
|
|
1747
|
-
|
|
1746
|
+
) : null, u = mr(a) ? null : /* @__PURE__ */ n(
|
|
1747
|
+
hs,
|
|
1748
1748
|
{
|
|
1749
1749
|
MessageSentStatus: ze,
|
|
1750
1750
|
MessageDeliveredStatus: ze,
|
|
1751
1751
|
MessageReadStatus: ze,
|
|
1752
|
-
MessageSendingStatus:
|
|
1752
|
+
MessageSendingStatus: Pn(a) ? ze : xr
|
|
1753
1753
|
}
|
|
1754
1754
|
);
|
|
1755
1755
|
return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
|
|
@@ -1757,19 +1757,19 @@ const rr = P.lazy(() => import("./Card-BzvDr-pU.js")), ir = P.lazy(() => import(
|
|
|
1757
1757
|
u && o && /* @__PURE__ */ n("span", { className: "sent-message-outbound-separator", "aria-hidden": "true", children: "•" }),
|
|
1758
1758
|
d
|
|
1759
1759
|
] }) : u;
|
|
1760
|
-
},
|
|
1760
|
+
}, Nr = /^([a-z][a-z0-9+.-]*):/i, kr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
1761
1761
|
function gt(e) {
|
|
1762
1762
|
if (typeof e != "string") return;
|
|
1763
1763
|
const t = e.trim();
|
|
1764
1764
|
if (t === "") return;
|
|
1765
|
-
const s =
|
|
1765
|
+
const s = Nr.exec(t);
|
|
1766
1766
|
if (s) {
|
|
1767
1767
|
const a = s[1].toLowerCase();
|
|
1768
|
-
return
|
|
1768
|
+
return kr.has(a) ? t : void 0;
|
|
1769
1769
|
}
|
|
1770
1770
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
1771
1771
|
}
|
|
1772
|
-
const
|
|
1772
|
+
const Cr = {
|
|
1773
1773
|
dark: {
|
|
1774
1774
|
primary: "bg-white text-[#121110] hover:bg-white/90",
|
|
1775
1775
|
secondary: "bg-white/15 text-white hover:bg-white/25"
|
|
@@ -1778,7 +1778,7 @@ const kr = {
|
|
|
1778
1778
|
primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
|
|
1779
1779
|
secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
|
|
1780
1780
|
}
|
|
1781
|
-
},
|
|
1781
|
+
}, Fn = ({
|
|
1782
1782
|
variant: e,
|
|
1783
1783
|
cta: t,
|
|
1784
1784
|
fullWidth: s = !0,
|
|
@@ -1788,7 +1788,7 @@ const kr = {
|
|
|
1788
1788
|
"inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
1789
1789
|
s ? "w-full" : "min-w-0",
|
|
1790
1790
|
!a && "mt-2",
|
|
1791
|
-
|
|
1791
|
+
Cr[e][r]
|
|
1792
1792
|
), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = gt(t.href);
|
|
1793
1793
|
return l ? /* @__PURE__ */ n(
|
|
1794
1794
|
"a",
|
|
@@ -1815,13 +1815,13 @@ const kr = {
|
|
|
1815
1815
|
children: o
|
|
1816
1816
|
}
|
|
1817
1817
|
);
|
|
1818
|
-
},
|
|
1818
|
+
}, Sr = {
|
|
1819
1819
|
dark: "text-white",
|
|
1820
1820
|
light: "text-black/90"
|
|
1821
|
-
},
|
|
1821
|
+
}, Er = "text-white/30", tn = {
|
|
1822
1822
|
dark: "text-white/55",
|
|
1823
1823
|
light: "text-black/55"
|
|
1824
|
-
},
|
|
1824
|
+
}, Ir = {
|
|
1825
1825
|
dark: "bg-white/25",
|
|
1826
1826
|
light: "bg-black/15"
|
|
1827
1827
|
}, pt = ({
|
|
@@ -1843,19 +1843,19 @@ const kr = {
|
|
|
1843
1843
|
return null;
|
|
1844
1844
|
const y = g && !a, _ = k(
|
|
1845
1845
|
"line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
|
|
1846
|
-
s == null && (y ?
|
|
1846
|
+
s == null && (y ? Er : Sr[e])
|
|
1847
1847
|
), T = k(
|
|
1848
1848
|
"truncate text-[12px] leading-4 tracking-[0.24px]",
|
|
1849
|
-
s == null &&
|
|
1849
|
+
s == null && tn[e]
|
|
1850
1850
|
), A = k(
|
|
1851
1851
|
"text-[12px] leading-4 tracking-[0.24px]",
|
|
1852
1852
|
o <= 1 && "truncate",
|
|
1853
|
-
s == null &&
|
|
1853
|
+
s == null && tn[e]
|
|
1854
1854
|
);
|
|
1855
1855
|
if (m) {
|
|
1856
1856
|
const F = k(
|
|
1857
1857
|
"animate-pulse rounded",
|
|
1858
|
-
|
|
1858
|
+
Ir[e]
|
|
1859
1859
|
);
|
|
1860
1860
|
return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
1861
1861
|
/* @__PURE__ */ n("div", { className: k("h-5 w-3/4", F), "aria-hidden": !0 }),
|
|
@@ -1896,9 +1896,9 @@ const kr = {
|
|
|
1896
1896
|
] }),
|
|
1897
1897
|
h && /* @__PURE__ */ n("div", { className: "shrink-0", children: h })
|
|
1898
1898
|
] }),
|
|
1899
|
-
u && /* @__PURE__ */ n(
|
|
1899
|
+
u && /* @__PURE__ */ n(Fn, { variant: t ?? e, cta: u })
|
|
1900
1900
|
] });
|
|
1901
|
-
},
|
|
1901
|
+
}, Tr = "Loading link preview", Ar = k(
|
|
1902
1902
|
// Width is a channel-scoped token: default 290px, but a read-only surface with no
|
|
1903
1903
|
// composer (the official channel) sets `--lt-msg-card-width` on its root to widen the
|
|
1904
1904
|
// content column (see ChannelView). Consumers that don't set the var keep 290px.
|
|
@@ -1908,7 +1908,7 @@ const kr = {
|
|
|
1908
1908
|
// 20px corners — no token exists for it in the component-library preset,
|
|
1909
1909
|
// whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
|
|
1910
1910
|
"rounded-[20px]"
|
|
1911
|
-
),
|
|
1911
|
+
), Rr = "flex h-[250px] flex-col", Ie = ({
|
|
1912
1912
|
variant: e,
|
|
1913
1913
|
children: t,
|
|
1914
1914
|
href: s,
|
|
@@ -1924,8 +1924,8 @@ const kr = {
|
|
|
1924
1924
|
}) => {
|
|
1925
1925
|
const g = s != null || a != null, c = k(
|
|
1926
1926
|
"messaging-link-card",
|
|
1927
|
-
|
|
1928
|
-
u ?
|
|
1927
|
+
Ar,
|
|
1928
|
+
u ? Rr : "block",
|
|
1929
1929
|
// The plain fallback fill, kept underneath the `--accent` derivation: the
|
|
1930
1930
|
// `.messaging-link-card[style*='--accent']` rule in `styles.css` outranks
|
|
1931
1931
|
// this single class, so a published accent paints over it and an unset one
|
|
@@ -1947,7 +1947,7 @@ const kr = {
|
|
|
1947
1947
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
1948
1948
|
// with offset, so keyboard users can see the focused card.
|
|
1949
1949
|
g ? "cursor-pointer no-underline focus-ring" : null
|
|
1950
|
-
), b = h ? { role: "status", "aria-busy": !0, "aria-label":
|
|
1950
|
+
), b = h ? { role: "status", "aria-busy": !0, "aria-label": Tr } : void 0, w = d ? { "--accent": d } : void 0, v = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
|
|
1951
1951
|
return s ? /* @__PURE__ */ f(
|
|
1952
1952
|
"a",
|
|
1953
1953
|
{
|
|
@@ -1998,10 +1998,10 @@ const kr = {
|
|
|
1998
1998
|
]
|
|
1999
1999
|
}
|
|
2000
2000
|
);
|
|
2001
|
-
},
|
|
2001
|
+
}, nn = {
|
|
2002
2002
|
dark: "bg-white/10",
|
|
2003
2003
|
light: "bg-black/5"
|
|
2004
|
-
},
|
|
2004
|
+
}, Lr = {
|
|
2005
2005
|
dark: "size-16 text-white/25",
|
|
2006
2006
|
light: "size-16 text-black/25"
|
|
2007
2007
|
}, Ae = (e, t) => !!t && !!e && ue(e) === "audio", bt = (e, t) => {
|
|
@@ -2051,7 +2051,7 @@ const kr = {
|
|
|
2051
2051
|
{
|
|
2052
2052
|
className: k(
|
|
2053
2053
|
"h-full w-full animate-pulse",
|
|
2054
|
-
|
|
2054
|
+
nn[e]
|
|
2055
2055
|
),
|
|
2056
2056
|
"aria-hidden": !0
|
|
2057
2057
|
}
|
|
@@ -2095,10 +2095,10 @@ const kr = {
|
|
|
2095
2095
|
{
|
|
2096
2096
|
className: k(
|
|
2097
2097
|
"flex h-full w-full items-center justify-center",
|
|
2098
|
-
|
|
2098
|
+
nn[e]
|
|
2099
2099
|
),
|
|
2100
2100
|
children: xe(r, {
|
|
2101
|
-
className:
|
|
2101
|
+
className: Lr[e],
|
|
2102
2102
|
weight: "regular"
|
|
2103
2103
|
})
|
|
2104
2104
|
}
|
|
@@ -2108,14 +2108,14 @@ const kr = {
|
|
|
2108
2108
|
]
|
|
2109
2109
|
}
|
|
2110
2110
|
);
|
|
2111
|
-
},
|
|
2112
|
-
function
|
|
2111
|
+
}, Mr = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
2112
|
+
function Dr(e) {
|
|
2113
2113
|
const t = e.trim();
|
|
2114
2114
|
return t.startsWith("#") ? t : `#${t}`;
|
|
2115
2115
|
}
|
|
2116
|
-
const
|
|
2117
|
-
dark:
|
|
2118
|
-
light:
|
|
2116
|
+
const Or = "#FFFFFF", zn = "#040403", Pr = {
|
|
2117
|
+
dark: Or,
|
|
2118
|
+
light: zn
|
|
2119
2119
|
};
|
|
2120
2120
|
function We({
|
|
2121
2121
|
variant: e,
|
|
@@ -2132,7 +2132,7 @@ function We({
|
|
|
2132
2132
|
}, [r]);
|
|
2133
2133
|
const u = P.useCallback(() => {
|
|
2134
2134
|
d(!0);
|
|
2135
|
-
}, []), h = Ae(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null &&
|
|
2135
|
+
}, []), h = Ae(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Mr.test(t.trim()) ? Dr(t) : void 0, b = h ? zn : Pr[e];
|
|
2136
2136
|
return {
|
|
2137
2137
|
thumbnailUrl: l ? void 0 : r,
|
|
2138
2138
|
accentHex: c,
|
|
@@ -2142,7 +2142,7 @@ function We({
|
|
|
2142
2142
|
onImageError: u
|
|
2143
2143
|
};
|
|
2144
2144
|
}
|
|
2145
|
-
const
|
|
2145
|
+
const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", zr = "relative before:absolute before:-inset-[10px] before:content-['']", Br = ({
|
|
2146
2146
|
title: e,
|
|
2147
2147
|
placeholderTitle: t,
|
|
2148
2148
|
description: s,
|
|
@@ -2175,8 +2175,8 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2175
2175
|
onClick: c,
|
|
2176
2176
|
"aria-label": w,
|
|
2177
2177
|
className: k(
|
|
2178
|
-
|
|
2179
|
-
!x &&
|
|
2178
|
+
Fr,
|
|
2179
|
+
!x && zr
|
|
2180
2180
|
),
|
|
2181
2181
|
children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
|
|
2182
2182
|
}
|
|
@@ -2187,7 +2187,7 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2187
2187
|
onClick: b,
|
|
2188
2188
|
"aria-label": "Edit attachment",
|
|
2189
2189
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
2190
|
-
children: /* @__PURE__ */ n(
|
|
2190
|
+
children: /* @__PURE__ */ n(pa, { className: "size-5", weight: "regular" })
|
|
2191
2191
|
}
|
|
2192
2192
|
) : void 0;
|
|
2193
2193
|
return x && !p.isLoading ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -2268,7 +2268,7 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2268
2268
|
}
|
|
2269
2269
|
)
|
|
2270
2270
|
] })
|
|
2271
|
-
) : /* @__PURE__ */ n(q, { children: a }),
|
|
2271
|
+
) : /* @__PURE__ */ n(q, { children: a }), $r = ({
|
|
2272
2272
|
title: e,
|
|
2273
2273
|
description: t,
|
|
2274
2274
|
descriptionLines: s,
|
|
@@ -2350,7 +2350,7 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2350
2350
|
)
|
|
2351
2351
|
}
|
|
2352
2352
|
);
|
|
2353
|
-
},
|
|
2353
|
+
}, Ur = ({
|
|
2354
2354
|
title: e,
|
|
2355
2355
|
placeholderTitle: t,
|
|
2356
2356
|
description: s,
|
|
@@ -2427,19 +2427,19 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2427
2427
|
}
|
|
2428
2428
|
);
|
|
2429
2429
|
}, it = {
|
|
2430
|
-
Composer:
|
|
2431
|
-
Sent:
|
|
2432
|
-
Received:
|
|
2433
|
-
},
|
|
2430
|
+
Composer: Br,
|
|
2431
|
+
Sent: Ur,
|
|
2432
|
+
Received: $r
|
|
2433
|
+
}, jr = {
|
|
2434
2434
|
dark: "bg-[#1e2330]",
|
|
2435
2435
|
light: "bg-[#f2f1ef]"
|
|
2436
|
-
},
|
|
2436
|
+
}, Hr = {
|
|
2437
2437
|
dark: "text-white",
|
|
2438
2438
|
light: "text-[#000000]"
|
|
2439
|
-
},
|
|
2439
|
+
}, Vr = {
|
|
2440
2440
|
dark: "border-white/[0.08]",
|
|
2441
2441
|
light: "border-black/[0.08]"
|
|
2442
|
-
},
|
|
2442
|
+
}, Gr = (e) => e === "dark" ? "sender" : "receiver", Yr = {
|
|
2443
2443
|
sender: {
|
|
2444
2444
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
2445
2445
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -2464,7 +2464,7 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2464
2464
|
children: d,
|
|
2465
2465
|
"data-testid": u
|
|
2466
2466
|
}) => {
|
|
2467
|
-
const h = t != null && t !== "", m = o ?? Gr
|
|
2467
|
+
const h = t != null && t !== "", m = o ?? Yr[Gr(e)][a];
|
|
2468
2468
|
return /* @__PURE__ */ f(
|
|
2469
2469
|
"div",
|
|
2470
2470
|
{
|
|
@@ -2493,10 +2493,10 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2493
2493
|
// there is no ambiguity to resolve.
|
|
2494
2494
|
h && "pb-0",
|
|
2495
2495
|
m,
|
|
2496
|
-
Ur[e],
|
|
2497
2496
|
jr[e],
|
|
2497
|
+
Hr[e],
|
|
2498
2498
|
s && "border",
|
|
2499
|
-
s &&
|
|
2499
|
+
s && Vr[e],
|
|
2500
2500
|
l
|
|
2501
2501
|
),
|
|
2502
2502
|
children: [
|
|
@@ -2542,16 +2542,16 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2542
2542
|
),
|
|
2543
2543
|
children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
|
|
2544
2544
|
}
|
|
2545
|
-
), Me = (e) => e === "received" ? "light" : "dark",
|
|
2545
|
+
), Me = (e) => e === "received" ? "light" : "dark", io = ({
|
|
2546
2546
|
firstOfGroup: e,
|
|
2547
2547
|
endOfGroup: t,
|
|
2548
2548
|
groupedByUser: s
|
|
2549
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
2549
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Wr = ({
|
|
2550
2550
|
src: e,
|
|
2551
2551
|
mimeType: t,
|
|
2552
2552
|
filename: s,
|
|
2553
2553
|
items: a
|
|
2554
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
2554
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Kr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
2555
2555
|
/* @__PURE__ */ n(
|
|
2556
2556
|
"audio",
|
|
2557
2557
|
{
|
|
@@ -2574,7 +2574,7 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2574
2574
|
preload: l,
|
|
2575
2575
|
onDismiss: d
|
|
2576
2576
|
}) => {
|
|
2577
|
-
const u = Me(e), h = e === "composer" && !!d, m =
|
|
2577
|
+
const u = Me(e), h = e === "composer" && !!d, m = Wr({ src: t, mimeType: s, filename: a, items: r });
|
|
2578
2578
|
if (m.length === 0)
|
|
2579
2579
|
return null;
|
|
2580
2580
|
const g = l ?? (m.length > 1 ? "none" : "metadata");
|
|
@@ -2586,7 +2586,7 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2586
2586
|
groupPosition: o,
|
|
2587
2587
|
"data-testid": "audio-attachment",
|
|
2588
2588
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, b) => /* @__PURE__ */ n(
|
|
2589
|
-
|
|
2589
|
+
Kr,
|
|
2590
2590
|
{
|
|
2591
2591
|
item: c,
|
|
2592
2592
|
preload: g,
|
|
@@ -2600,15 +2600,15 @@ const Pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2600
2600
|
)) })
|
|
2601
2601
|
}
|
|
2602
2602
|
);
|
|
2603
|
-
},
|
|
2604
|
-
Composer:
|
|
2605
|
-
Sent:
|
|
2606
|
-
Received:
|
|
2603
|
+
}, Xr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), qr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), Zr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), Jr = {
|
|
2604
|
+
Composer: Xr,
|
|
2605
|
+
Sent: qr,
|
|
2606
|
+
Received: Zr
|
|
2607
2607
|
};
|
|
2608
|
-
function
|
|
2608
|
+
function Qr(e) {
|
|
2609
2609
|
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`;
|
|
2610
2610
|
}
|
|
2611
|
-
const
|
|
2611
|
+
const ei = {
|
|
2612
2612
|
pdf: "PDF",
|
|
2613
2613
|
doc: "DOC",
|
|
2614
2614
|
xls: "XLS",
|
|
@@ -2618,7 +2618,7 @@ const Qr = {
|
|
|
2618
2618
|
text: "TXT",
|
|
2619
2619
|
markdown: "MD"
|
|
2620
2620
|
};
|
|
2621
|
-
function
|
|
2621
|
+
function ti(e, t) {
|
|
2622
2622
|
if (t) {
|
|
2623
2623
|
const r = t.lastIndexOf(".");
|
|
2624
2624
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -2628,7 +2628,7 @@ function ei(e, t) {
|
|
|
2628
2628
|
}
|
|
2629
2629
|
if (!e) return;
|
|
2630
2630
|
if (ue(e) === "document") {
|
|
2631
|
-
const r =
|
|
2631
|
+
const r = En(e), i = ei[r];
|
|
2632
2632
|
if (i) return i;
|
|
2633
2633
|
if (e === "application/octet-stream") return;
|
|
2634
2634
|
}
|
|
@@ -2636,8 +2636,8 @@ function ei(e, t) {
|
|
|
2636
2636
|
if (!(!a || a === "*"))
|
|
2637
2637
|
return a.toUpperCase();
|
|
2638
2638
|
}
|
|
2639
|
-
function
|
|
2640
|
-
const a =
|
|
2639
|
+
function ni(e, t, s) {
|
|
2640
|
+
const a = ti(e, t), r = typeof s == "number" && s > 0 ? Qr(s) : void 0;
|
|
2641
2641
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
2642
2642
|
}
|
|
2643
2643
|
function re(e) {
|
|
@@ -2648,16 +2648,16 @@ function re(e) {
|
|
|
2648
2648
|
return "download";
|
|
2649
2649
|
}
|
|
2650
2650
|
}
|
|
2651
|
-
const
|
|
2651
|
+
const si = {
|
|
2652
2652
|
dark: "text-white/55",
|
|
2653
2653
|
light: "text-black/65"
|
|
2654
|
-
},
|
|
2654
|
+
}, ai = {
|
|
2655
2655
|
dark: "bg-white/10",
|
|
2656
2656
|
light: "bg-black/5"
|
|
2657
|
-
},
|
|
2657
|
+
}, ri = {
|
|
2658
2658
|
dark: "text-white/85",
|
|
2659
2659
|
light: "text-black/85"
|
|
2660
|
-
},
|
|
2660
|
+
}, Bn = ({
|
|
2661
2661
|
variant: e,
|
|
2662
2662
|
filename: t,
|
|
2663
2663
|
title: s,
|
|
@@ -2667,16 +2667,16 @@ const ni = {
|
|
|
2667
2667
|
activateLabel: o,
|
|
2668
2668
|
trailingAction: l
|
|
2669
2669
|
}) => {
|
|
2670
|
-
const d = s ?? t ?? "File", u =
|
|
2670
|
+
const d = s ?? t ?? "File", u = ni(a, t, r), h = /* @__PURE__ */ n(
|
|
2671
2671
|
"div",
|
|
2672
2672
|
{
|
|
2673
2673
|
className: k(
|
|
2674
2674
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
2675
|
-
|
|
2675
|
+
ai[e]
|
|
2676
2676
|
),
|
|
2677
2677
|
"aria-hidden": !0,
|
|
2678
2678
|
children: xe(a, {
|
|
2679
|
-
className: k("size-6",
|
|
2679
|
+
className: k("size-6", ri[e]),
|
|
2680
2680
|
weight: "regular"
|
|
2681
2681
|
})
|
|
2682
2682
|
}
|
|
@@ -2687,7 +2687,7 @@ const ni = {
|
|
|
2687
2687
|
{
|
|
2688
2688
|
className: k(
|
|
2689
2689
|
"truncate text-xs leading-4",
|
|
2690
|
-
|
|
2690
|
+
si[e]
|
|
2691
2691
|
),
|
|
2692
2692
|
children: u
|
|
2693
2693
|
}
|
|
@@ -2716,7 +2716,7 @@ const ni = {
|
|
|
2716
2716
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
2717
2717
|
] });
|
|
2718
2718
|
};
|
|
2719
|
-
async function
|
|
2719
|
+
async function $n(e, t) {
|
|
2720
2720
|
const s = t ?? re(e);
|
|
2721
2721
|
try {
|
|
2722
2722
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -2730,14 +2730,14 @@ async function Bn(e, t) {
|
|
|
2730
2730
|
}
|
|
2731
2731
|
}
|
|
2732
2732
|
}
|
|
2733
|
-
const
|
|
2733
|
+
const ii = ({
|
|
2734
2734
|
src: e,
|
|
2735
2735
|
filename: t,
|
|
2736
2736
|
fileSize: s,
|
|
2737
2737
|
mimeType: a,
|
|
2738
2738
|
title: r,
|
|
2739
2739
|
items: i
|
|
2740
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
2740
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], li = ({
|
|
2741
2741
|
variant: e,
|
|
2742
2742
|
item: t,
|
|
2743
2743
|
index: s,
|
|
@@ -2746,7 +2746,7 @@ const ri = ({
|
|
|
2746
2746
|
}) => {
|
|
2747
2747
|
const i = t.filename ?? re(t.src);
|
|
2748
2748
|
return /* @__PURE__ */ n(
|
|
2749
|
-
|
|
2749
|
+
Bn,
|
|
2750
2750
|
{
|
|
2751
2751
|
variant: e,
|
|
2752
2752
|
filename: i,
|
|
@@ -2771,7 +2771,7 @@ const ri = ({
|
|
|
2771
2771
|
onClick: u,
|
|
2772
2772
|
onDismiss: h
|
|
2773
2773
|
}) => {
|
|
2774
|
-
const m = Me(e), g = e === "composer" && !!h, c =
|
|
2774
|
+
const m = Me(e), g = e === "composer" && !!h, c = ii({
|
|
2775
2775
|
src: t,
|
|
2776
2776
|
filename: s,
|
|
2777
2777
|
fileSize: a,
|
|
@@ -2783,7 +2783,7 @@ const ri = ({
|
|
|
2783
2783
|
const x = c[v];
|
|
2784
2784
|
if (!x) return;
|
|
2785
2785
|
const p = x.filename ?? re(x.src);
|
|
2786
|
-
|
|
2786
|
+
$n(x.src, p);
|
|
2787
2787
|
};
|
|
2788
2788
|
if (c.length === 0)
|
|
2789
2789
|
return null;
|
|
@@ -2806,7 +2806,7 @@ const ri = ({
|
|
|
2806
2806
|
groupPosition: d,
|
|
2807
2807
|
"data-testid": "file-attachment",
|
|
2808
2808
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
|
|
2809
|
-
|
|
2809
|
+
li,
|
|
2810
2810
|
{
|
|
2811
2811
|
variant: m,
|
|
2812
2812
|
item: v,
|
|
@@ -2818,11 +2818,11 @@ const ri = ({
|
|
|
2818
2818
|
)) })
|
|
2819
2819
|
}
|
|
2820
2820
|
);
|
|
2821
|
-
},
|
|
2822
|
-
Composer:
|
|
2823
|
-
Sent:
|
|
2824
|
-
Received:
|
|
2825
|
-
},
|
|
2821
|
+
}, oi = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), ci = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), di = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), ui = {
|
|
2822
|
+
Composer: oi,
|
|
2823
|
+
Sent: ci,
|
|
2824
|
+
Received: di
|
|
2825
|
+
}, Un = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", sn = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", yt = ({
|
|
2826
2826
|
onPrev: e,
|
|
2827
2827
|
onNext: t,
|
|
2828
2828
|
prevLabel: s = "Previous",
|
|
@@ -2834,8 +2834,8 @@ const ri = ({
|
|
|
2834
2834
|
type: "button",
|
|
2835
2835
|
onClick: e,
|
|
2836
2836
|
"aria-label": s,
|
|
2837
|
-
className: `${
|
|
2838
|
-
children: /* @__PURE__ */ n(
|
|
2837
|
+
className: `${sn} left-4`,
|
|
2838
|
+
children: /* @__PURE__ */ n(ba, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2839
2839
|
}
|
|
2840
2840
|
),
|
|
2841
2841
|
/* @__PURE__ */ n(
|
|
@@ -2844,11 +2844,11 @@ const ri = ({
|
|
|
2844
2844
|
type: "button",
|
|
2845
2845
|
onClick: t,
|
|
2846
2846
|
"aria-label": a,
|
|
2847
|
-
className: `${
|
|
2848
|
-
children: /* @__PURE__ */ n(
|
|
2847
|
+
className: `${sn} right-4`,
|
|
2848
|
+
children: /* @__PURE__ */ n(bn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2849
2849
|
}
|
|
2850
2850
|
)
|
|
2851
|
-
] }),
|
|
2851
|
+
] }), jn = ({
|
|
2852
2852
|
url: e,
|
|
2853
2853
|
filename: t,
|
|
2854
2854
|
variant: s = "pill",
|
|
@@ -2859,7 +2859,7 @@ const ri = ({
|
|
|
2859
2859
|
}) => {
|
|
2860
2860
|
const [l, d] = B(!1), u = X(
|
|
2861
2861
|
(c) => {
|
|
2862
|
-
c.stopPropagation(), !l && (d(!0),
|
|
2862
|
+
c.stopPropagation(), !l && (d(!0), $n(e, t).catch(() => {
|
|
2863
2863
|
}).finally(() => {
|
|
2864
2864
|
d(!1), o == null || o();
|
|
2865
2865
|
}));
|
|
@@ -2906,7 +2906,7 @@ const ri = ({
|
|
|
2906
2906
|
onClick: u,
|
|
2907
2907
|
disabled: l,
|
|
2908
2908
|
"aria-label": a,
|
|
2909
|
-
className:
|
|
2909
|
+
className: Un,
|
|
2910
2910
|
children: l ? /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ee, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2911
2911
|
}
|
|
2912
2912
|
) : /* @__PURE__ */ f(
|
|
@@ -3038,7 +3038,7 @@ const ri = ({
|
|
|
3038
3038
|
type: "button",
|
|
3039
3039
|
onClick: t,
|
|
3040
3040
|
"aria-label": "Close viewer",
|
|
3041
|
-
className:
|
|
3041
|
+
className: Un,
|
|
3042
3042
|
children: /* @__PURE__ */ n(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3043
3043
|
}
|
|
3044
3044
|
)
|
|
@@ -3048,7 +3048,7 @@ const ri = ({
|
|
|
3048
3048
|
]
|
|
3049
3049
|
}
|
|
3050
3050
|
);
|
|
3051
|
-
},
|
|
3051
|
+
}, Hn = ({
|
|
3052
3052
|
open: e,
|
|
3053
3053
|
items: t,
|
|
3054
3054
|
initialIndex: s = 0,
|
|
@@ -3070,7 +3070,7 @@ const ri = ({
|
|
|
3070
3070
|
ariaLabel: d,
|
|
3071
3071
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3072
3072
|
actions: /* @__PURE__ */ n(
|
|
3073
|
-
|
|
3073
|
+
jn,
|
|
3074
3074
|
{
|
|
3075
3075
|
url: l.src,
|
|
3076
3076
|
filename: d,
|
|
@@ -3103,7 +3103,7 @@ const ri = ({
|
|
|
3103
3103
|
]
|
|
3104
3104
|
}
|
|
3105
3105
|
) : null;
|
|
3106
|
-
},
|
|
3106
|
+
}, mi = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", hi = {
|
|
3107
3107
|
1: ["rounded-[18px]"],
|
|
3108
3108
|
2: ["rounded-l-[18px]", "rounded-r-[18px]"],
|
|
3109
3109
|
3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
|
|
@@ -3113,7 +3113,7 @@ const ri = ({
|
|
|
3113
3113
|
"rounded-bl-[18px]",
|
|
3114
3114
|
"rounded-br-[18px]"
|
|
3115
3115
|
]
|
|
3116
|
-
},
|
|
3116
|
+
}, fi = "--mes-single-width-cap", gi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", pi = 436, Vn = ({
|
|
3117
3117
|
tiles: e,
|
|
3118
3118
|
onTileActivate: t,
|
|
3119
3119
|
maxVisible: s = 4,
|
|
@@ -3125,9 +3125,9 @@ const ri = ({
|
|
|
3125
3125
|
const o = e.slice(0, Math.min(i, s)), l = i - o.length, d = (h, m, g) => {
|
|
3126
3126
|
var b;
|
|
3127
3127
|
const c = k(
|
|
3128
|
-
|
|
3128
|
+
mi,
|
|
3129
3129
|
"h-full w-full",
|
|
3130
|
-
(b =
|
|
3130
|
+
(b = hi[o.length]) == null ? void 0 : b[m]
|
|
3131
3131
|
);
|
|
3132
3132
|
return t ? /* @__PURE__ */ f(
|
|
3133
3133
|
"button",
|
|
@@ -3152,14 +3152,14 @@ const ri = ({
|
|
|
3152
3152
|
aspectRatio: a,
|
|
3153
3153
|
// Hundredths keep the emitted declaration readable in devtools;
|
|
3154
3154
|
// the rounding error is well under a device pixel.
|
|
3155
|
-
width: `min(var(${
|
|
3155
|
+
width: `min(var(${fi}), ${Math.round(pi * a * 100) / 100}px)`,
|
|
3156
3156
|
// Only bites in a container narrower than the width cap.
|
|
3157
3157
|
maxWidth: "100%"
|
|
3158
3158
|
}), o.length === 1 ? /* @__PURE__ */ n(
|
|
3159
3159
|
"div",
|
|
3160
3160
|
{
|
|
3161
3161
|
className: k(
|
|
3162
|
-
a ?
|
|
3162
|
+
a ? gi : "aspect-square w-full",
|
|
3163
3163
|
r
|
|
3164
3164
|
),
|
|
3165
3165
|
style: u,
|
|
@@ -3222,7 +3222,7 @@ const ri = ({
|
|
|
3222
3222
|
[e]
|
|
3223
3223
|
), o = X(() => s(!1), []);
|
|
3224
3224
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3225
|
-
},
|
|
3225
|
+
}, bi = ({
|
|
3226
3226
|
item: e,
|
|
3227
3227
|
index: t,
|
|
3228
3228
|
totalCount: s,
|
|
@@ -3250,15 +3250,15 @@ const ri = ({
|
|
|
3250
3250
|
}
|
|
3251
3251
|
)
|
|
3252
3252
|
)
|
|
3253
|
-
}),
|
|
3253
|
+
}), vi = ({
|
|
3254
3254
|
src: e,
|
|
3255
3255
|
alt: t,
|
|
3256
3256
|
items: s
|
|
3257
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
3257
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Gn = (e, t) => e.map((s, a) => ({
|
|
3258
3258
|
src: s.src,
|
|
3259
3259
|
alt: s.alt,
|
|
3260
3260
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3261
|
-
})),
|
|
3261
|
+
})), xi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
3262
3262
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = De(r);
|
|
3263
3263
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
3264
3264
|
/* @__PURE__ */ n(
|
|
@@ -3283,16 +3283,16 @@ const ri = ({
|
|
|
3283
3283
|
),
|
|
3284
3284
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Le, { onClick: i }) }) : null,
|
|
3285
3285
|
/* @__PURE__ */ n(
|
|
3286
|
-
|
|
3286
|
+
Hn,
|
|
3287
3287
|
{
|
|
3288
3288
|
open: o,
|
|
3289
|
-
items:
|
|
3289
|
+
items: Gn([{ src: e, alt: t }], s),
|
|
3290
3290
|
initialIndex: l,
|
|
3291
3291
|
onClose: u
|
|
3292
3292
|
}
|
|
3293
3293
|
)
|
|
3294
3294
|
] });
|
|
3295
|
-
},
|
|
3295
|
+
}, wi = 326 / 246, _i = (e) => {
|
|
3296
3296
|
const t = e == null ? void 0 : e.src, [s, a] = P.useState(), r = P.useCallback(
|
|
3297
3297
|
(d) => {
|
|
3298
3298
|
if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
|
|
@@ -3307,11 +3307,11 @@ const ri = ({
|
|
|
3307
3307
|
[r]
|
|
3308
3308
|
), o = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, l = s && s.src === t ? s.ratio : void 0;
|
|
3309
3309
|
return {
|
|
3310
|
-
ratio: o ?? l ??
|
|
3310
|
+
ratio: o ?? l ?? wi,
|
|
3311
3311
|
imgRef: r,
|
|
3312
3312
|
onLoad: i
|
|
3313
3313
|
};
|
|
3314
|
-
},
|
|
3314
|
+
}, Yn = ({
|
|
3315
3315
|
state: e,
|
|
3316
3316
|
src: t,
|
|
3317
3317
|
alt: s,
|
|
@@ -3322,11 +3322,11 @@ const ri = ({
|
|
|
3322
3322
|
loading: l = "lazy",
|
|
3323
3323
|
onClick: d
|
|
3324
3324
|
}) => {
|
|
3325
|
-
const u =
|
|
3325
|
+
const u = vi({ src: t, alt: s, items: r }), h = Me(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: b } = De(d), w = u.length === 1, v = _i(w ? u[0] : void 0);
|
|
3326
3326
|
if (u.length === 0)
|
|
3327
3327
|
return null;
|
|
3328
3328
|
const x = u.map(
|
|
3329
|
-
(p, y) =>
|
|
3329
|
+
(p, y) => bi({
|
|
3330
3330
|
item: p,
|
|
3331
3331
|
index: y,
|
|
3332
3332
|
totalCount: u.length,
|
|
@@ -3348,7 +3348,7 @@ const ri = ({
|
|
|
3348
3348
|
"data-testid": "image-attachment",
|
|
3349
3349
|
children: [
|
|
3350
3350
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
3351
|
-
|
|
3351
|
+
Vn,
|
|
3352
3352
|
{
|
|
3353
3353
|
tiles: x,
|
|
3354
3354
|
onTileActivate: c,
|
|
@@ -3356,10 +3356,10 @@ const ri = ({
|
|
|
3356
3356
|
}
|
|
3357
3357
|
) }),
|
|
3358
3358
|
/* @__PURE__ */ n(
|
|
3359
|
-
|
|
3359
|
+
Hn,
|
|
3360
3360
|
{
|
|
3361
3361
|
open: m,
|
|
3362
|
-
items:
|
|
3362
|
+
items: Gn(u, a),
|
|
3363
3363
|
initialIndex: g,
|
|
3364
3364
|
onClose: b
|
|
3365
3365
|
}
|
|
@@ -3367,11 +3367,11 @@ const ri = ({
|
|
|
3367
3367
|
]
|
|
3368
3368
|
}
|
|
3369
3369
|
);
|
|
3370
|
-
},
|
|
3371
|
-
Composer:
|
|
3372
|
-
Sent:
|
|
3373
|
-
Received:
|
|
3374
|
-
},
|
|
3370
|
+
}, yi = (e) => /* @__PURE__ */ n(xi, { ...e }), Ni = (e) => /* @__PURE__ */ n(Yn, { ...e, state: "sent" }), ki = (e) => /* @__PURE__ */ n(Yn, { ...e, state: "received" }), Ci = {
|
|
3371
|
+
Composer: yi,
|
|
3372
|
+
Sent: Ni,
|
|
3373
|
+
Received: ki
|
|
3374
|
+
}, Si = ({
|
|
3375
3375
|
open: e,
|
|
3376
3376
|
items: t,
|
|
3377
3377
|
initialIndex: s = 0,
|
|
@@ -3385,7 +3385,7 @@ const ri = ({
|
|
|
3385
3385
|
() => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
|
|
3386
3386
|
[l]
|
|
3387
3387
|
), u = oe(
|
|
3388
|
-
() => l ?
|
|
3388
|
+
() => l ? Ei(l.src) : void 0,
|
|
3389
3389
|
[l]
|
|
3390
3390
|
);
|
|
3391
3391
|
return !l || !u ? null : /* @__PURE__ */ f(
|
|
@@ -3419,16 +3419,16 @@ const ri = ({
|
|
|
3419
3419
|
]
|
|
3420
3420
|
}
|
|
3421
3421
|
);
|
|
3422
|
-
},
|
|
3422
|
+
}, Ei = (e) => {
|
|
3423
3423
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
3424
3424
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
3425
|
-
},
|
|
3425
|
+
}, Ii = ({
|
|
3426
3426
|
src: e,
|
|
3427
3427
|
filename: t,
|
|
3428
3428
|
fileSize: s,
|
|
3429
3429
|
title: a,
|
|
3430
3430
|
items: r
|
|
3431
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
3431
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Ti = ({
|
|
3432
3432
|
variant: e,
|
|
3433
3433
|
item: t,
|
|
3434
3434
|
index: s,
|
|
@@ -3437,7 +3437,7 @@ const ri = ({
|
|
|
3437
3437
|
}) => {
|
|
3438
3438
|
const i = t.filename ?? re(t.src);
|
|
3439
3439
|
return /* @__PURE__ */ n(
|
|
3440
|
-
|
|
3440
|
+
Bn,
|
|
3441
3441
|
{
|
|
3442
3442
|
variant: e,
|
|
3443
3443
|
filename: i,
|
|
@@ -3461,7 +3461,7 @@ const ri = ({
|
|
|
3461
3461
|
onClick: d,
|
|
3462
3462
|
onDismiss: u
|
|
3463
3463
|
}) => {
|
|
3464
|
-
const h = Me(e), m =
|
|
3464
|
+
const h = Me(e), m = Ii({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: w } = De(d), v = e === "composer" && !!u;
|
|
3465
3465
|
if (m.length === 0)
|
|
3466
3466
|
return null;
|
|
3467
3467
|
const x = m.map((p) => ({
|
|
@@ -3478,7 +3478,7 @@ const ri = ({
|
|
|
3478
3478
|
children: [
|
|
3479
3479
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((p, y) => {
|
|
3480
3480
|
const _ = p.filename ?? re(p.src), T = v && y === 0 ? /* @__PURE__ */ n(Le, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
3481
|
-
|
|
3481
|
+
jn,
|
|
3482
3482
|
{
|
|
3483
3483
|
url: p.src,
|
|
3484
3484
|
filename: _,
|
|
@@ -3488,7 +3488,7 @@ const ri = ({
|
|
|
3488
3488
|
}
|
|
3489
3489
|
);
|
|
3490
3490
|
return /* @__PURE__ */ n(
|
|
3491
|
-
|
|
3491
|
+
Ti,
|
|
3492
3492
|
{
|
|
3493
3493
|
variant: h,
|
|
3494
3494
|
item: p,
|
|
@@ -3500,7 +3500,7 @@ const ri = ({
|
|
|
3500
3500
|
);
|
|
3501
3501
|
}) }),
|
|
3502
3502
|
/* @__PURE__ */ n(
|
|
3503
|
-
|
|
3503
|
+
Si,
|
|
3504
3504
|
{
|
|
3505
3505
|
open: g,
|
|
3506
3506
|
items: x,
|
|
@@ -3511,11 +3511,11 @@ const ri = ({
|
|
|
3511
3511
|
]
|
|
3512
3512
|
}
|
|
3513
3513
|
);
|
|
3514
|
-
},
|
|
3515
|
-
Composer:
|
|
3516
|
-
Sent:
|
|
3517
|
-
Received:
|
|
3518
|
-
},
|
|
3514
|
+
}, Ai = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "composer" }), Ri = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "sent" }), Li = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "received" }), Mi = {
|
|
3515
|
+
Composer: Ai,
|
|
3516
|
+
Sent: Ri,
|
|
3517
|
+
Received: Li
|
|
3518
|
+
}, Wn = ({
|
|
3519
3519
|
open: e,
|
|
3520
3520
|
items: t,
|
|
3521
3521
|
initialIndex: s = 0,
|
|
@@ -3565,7 +3565,7 @@ const ri = ({
|
|
|
3565
3565
|
]
|
|
3566
3566
|
}
|
|
3567
3567
|
) : null;
|
|
3568
|
-
},
|
|
3568
|
+
}, Di = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Kn = ({
|
|
3569
3569
|
item: e,
|
|
3570
3570
|
index: t
|
|
3571
3571
|
}) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -3580,30 +3580,30 @@ const ri = ({
|
|
|
3580
3580
|
className: "absolute inset-0 size-full object-cover"
|
|
3581
3581
|
}
|
|
3582
3582
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
3583
|
-
|
|
3583
|
+
xn,
|
|
3584
3584
|
{
|
|
3585
3585
|
className: "size-16 text-white/30",
|
|
3586
3586
|
weight: "regular",
|
|
3587
3587
|
"aria-hidden": !0
|
|
3588
3588
|
}
|
|
3589
3589
|
) }),
|
|
3590
|
-
/* @__PURE__ */ n(
|
|
3591
|
-
] }),
|
|
3590
|
+
/* @__PURE__ */ n(Di, {})
|
|
3591
|
+
] }), Oi = (e, t, s) => ({
|
|
3592
3592
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
3593
|
-
content: /* @__PURE__ */ n(
|
|
3594
|
-
}),
|
|
3593
|
+
content: /* @__PURE__ */ n(Kn, { item: e, index: t })
|
|
3594
|
+
}), Pi = ({
|
|
3595
3595
|
src: e,
|
|
3596
3596
|
poster: t,
|
|
3597
3597
|
mimeType: s,
|
|
3598
3598
|
preload: a,
|
|
3599
3599
|
items: r
|
|
3600
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
3600
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Xn = (e, t) => e.map((s, a) => ({
|
|
3601
3601
|
src: s.src,
|
|
3602
3602
|
poster: s.poster,
|
|
3603
3603
|
mimeType: s.mimeType,
|
|
3604
3604
|
preload: s.preload,
|
|
3605
3605
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3606
|
-
})),
|
|
3606
|
+
})), Fi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
3607
3607
|
const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = De(i);
|
|
3608
3608
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
3609
3609
|
/* @__PURE__ */ n(
|
|
@@ -3613,21 +3613,21 @@ const ri = ({
|
|
|
3613
3613
|
onClick: () => u(0),
|
|
3614
3614
|
"aria-label": "Play video",
|
|
3615
3615
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
3616
|
-
children: /* @__PURE__ */ n(
|
|
3616
|
+
children: /* @__PURE__ */ n(Kn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
3617
3617
|
}
|
|
3618
3618
|
),
|
|
3619
3619
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Le, { onClick: o }) }) : null,
|
|
3620
3620
|
/* @__PURE__ */ n(
|
|
3621
|
-
|
|
3621
|
+
Wn,
|
|
3622
3622
|
{
|
|
3623
3623
|
open: l,
|
|
3624
|
-
items:
|
|
3624
|
+
items: Xn([{ src: e, poster: t, mimeType: s, preload: r }], a),
|
|
3625
3625
|
initialIndex: d,
|
|
3626
3626
|
onClose: h
|
|
3627
3627
|
}
|
|
3628
3628
|
)
|
|
3629
3629
|
] });
|
|
3630
|
-
},
|
|
3630
|
+
}, qn = ({
|
|
3631
3631
|
state: e,
|
|
3632
3632
|
src: t,
|
|
3633
3633
|
poster: s,
|
|
@@ -3639,11 +3639,11 @@ const ri = ({
|
|
|
3639
3639
|
preload: d,
|
|
3640
3640
|
onClick: u
|
|
3641
3641
|
}) => {
|
|
3642
|
-
const h =
|
|
3642
|
+
const h = Pi({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: w } = De(u);
|
|
3643
3643
|
if (h.length === 0)
|
|
3644
3644
|
return null;
|
|
3645
3645
|
const v = h.map(
|
|
3646
|
-
(x, p) =>
|
|
3646
|
+
(x, p) => Oi(x, p, h.length)
|
|
3647
3647
|
);
|
|
3648
3648
|
return /* @__PURE__ */ f(
|
|
3649
3649
|
Re,
|
|
@@ -3653,12 +3653,12 @@ const ri = ({
|
|
|
3653
3653
|
groupPosition: l,
|
|
3654
3654
|
"data-testid": "video-attachment",
|
|
3655
3655
|
children: [
|
|
3656
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
3656
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Vn, { tiles: v, onTileActivate: b }) }),
|
|
3657
3657
|
/* @__PURE__ */ n(
|
|
3658
|
-
|
|
3658
|
+
Wn,
|
|
3659
3659
|
{
|
|
3660
3660
|
open: g,
|
|
3661
|
-
items:
|
|
3661
|
+
items: Xn(h, r),
|
|
3662
3662
|
initialIndex: c,
|
|
3663
3663
|
onClose: w
|
|
3664
3664
|
}
|
|
@@ -3666,28 +3666,28 @@ const ri = ({
|
|
|
3666
3666
|
]
|
|
3667
3667
|
}
|
|
3668
3668
|
);
|
|
3669
|
-
},
|
|
3670
|
-
Composer:
|
|
3671
|
-
Sent:
|
|
3672
|
-
Received:
|
|
3669
|
+
}, zi = (e) => /* @__PURE__ */ n(Fi, { ...e }), Bi = (e) => /* @__PURE__ */ n(qn, { ...e, state: "sent" }), $i = (e) => /* @__PURE__ */ n(qn, { ...e, state: "received" }), Ui = {
|
|
3670
|
+
Composer: zi,
|
|
3671
|
+
Sent: Bi,
|
|
3672
|
+
Received: $i
|
|
3673
3673
|
}, Ce = {
|
|
3674
|
-
Image:
|
|
3675
|
-
Video:
|
|
3676
|
-
Audio:
|
|
3677
|
-
Pdf:
|
|
3678
|
-
File:
|
|
3674
|
+
Image: Ci,
|
|
3675
|
+
Video: Ui,
|
|
3676
|
+
Audio: Jr,
|
|
3677
|
+
Pdf: Mi,
|
|
3678
|
+
File: ui
|
|
3679
3679
|
};
|
|
3680
3680
|
function H(e) {
|
|
3681
3681
|
const t = e == null ? void 0 : e.trim();
|
|
3682
3682
|
return t || void 0;
|
|
3683
3683
|
}
|
|
3684
|
-
function
|
|
3684
|
+
function an(e) {
|
|
3685
3685
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3686
3686
|
}
|
|
3687
|
-
function
|
|
3687
|
+
function ji(e, t) {
|
|
3688
3688
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3689
3689
|
return !1;
|
|
3690
|
-
const s =
|
|
3690
|
+
const s = an(e), a = an(t);
|
|
3691
3691
|
if (s === a)
|
|
3692
3692
|
return !0;
|
|
3693
3693
|
if (!s.includes(a))
|
|
@@ -3695,7 +3695,7 @@ function Ui(e, t) {
|
|
|
3695
3695
|
const r = s.split(a).join("");
|
|
3696
3696
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3697
3697
|
}
|
|
3698
|
-
function
|
|
3698
|
+
function rn(e) {
|
|
3699
3699
|
const t = H(e.og_scrape_url) ?? H(e.title_link), s = H(e.image_url) ?? H(e.thumb_url), a = H(e.asset_url), r = H(e.mime_type);
|
|
3700
3700
|
return {
|
|
3701
3701
|
title: H(e.title),
|
|
@@ -3717,11 +3717,11 @@ function an(e) {
|
|
|
3717
3717
|
status: "ready"
|
|
3718
3718
|
};
|
|
3719
3719
|
}
|
|
3720
|
-
function
|
|
3720
|
+
function Hi(e) {
|
|
3721
3721
|
var t;
|
|
3722
3722
|
return Ye(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;
|
|
3723
3723
|
}
|
|
3724
|
-
function
|
|
3724
|
+
function Zn(e) {
|
|
3725
3725
|
if (!(e != null && e.length)) return [];
|
|
3726
3726
|
const t = [], s = (r, i) => {
|
|
3727
3727
|
const o = t[t.length - 1];
|
|
@@ -3743,21 +3743,21 @@ function qn(e) {
|
|
|
3743
3743
|
a(r);
|
|
3744
3744
|
continue;
|
|
3745
3745
|
}
|
|
3746
|
-
const i =
|
|
3746
|
+
const i = Hi(r);
|
|
3747
3747
|
i && s(i, r);
|
|
3748
3748
|
}
|
|
3749
3749
|
return t;
|
|
3750
3750
|
}
|
|
3751
|
-
function
|
|
3751
|
+
function Vi(e) {
|
|
3752
3752
|
return e.filter((t) => t.type === "media").length;
|
|
3753
3753
|
}
|
|
3754
|
-
function
|
|
3754
|
+
function Gi(e, t, s) {
|
|
3755
3755
|
return t <= 1 ? s : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3756
3756
|
}
|
|
3757
|
-
function
|
|
3757
|
+
function Yi(e) {
|
|
3758
3758
|
return H(e.image_url) ?? H(e.asset_url) ?? "";
|
|
3759
3759
|
}
|
|
3760
|
-
function
|
|
3760
|
+
function Wi(e) {
|
|
3761
3761
|
switch (e) {
|
|
3762
3762
|
case "image":
|
|
3763
3763
|
return Ce.Image;
|
|
@@ -3771,11 +3771,11 @@ function Yi(e) {
|
|
|
3771
3771
|
return Ce.File;
|
|
3772
3772
|
}
|
|
3773
3773
|
}
|
|
3774
|
-
function
|
|
3774
|
+
function ln(e, t) {
|
|
3775
3775
|
switch (e) {
|
|
3776
3776
|
case "image":
|
|
3777
3777
|
return {
|
|
3778
|
-
src:
|
|
3778
|
+
src: Yi(t),
|
|
3779
3779
|
alt: H(t.title)
|
|
3780
3780
|
};
|
|
3781
3781
|
case "video":
|
|
@@ -3807,35 +3807,35 @@ function rn(e, t) {
|
|
|
3807
3807
|
};
|
|
3808
3808
|
}
|
|
3809
3809
|
}
|
|
3810
|
-
function
|
|
3810
|
+
function Ki(e, t) {
|
|
3811
3811
|
if (t.length > 1)
|
|
3812
3812
|
return {
|
|
3813
|
-
items: t.map((a) =>
|
|
3813
|
+
items: t.map((a) => ln(e, a))
|
|
3814
3814
|
};
|
|
3815
3815
|
const s = t[0];
|
|
3816
|
-
return s ?
|
|
3816
|
+
return s ? ln(e, s) : {};
|
|
3817
3817
|
}
|
|
3818
|
-
function
|
|
3818
|
+
function Xi({
|
|
3819
3819
|
groupPosition: e,
|
|
3820
3820
|
isMyMessage: t,
|
|
3821
3821
|
segment: s
|
|
3822
3822
|
}) {
|
|
3823
|
-
const a =
|
|
3824
|
-
...
|
|
3823
|
+
const a = Wi(s.kind), r = {
|
|
3824
|
+
...Ki(s.kind, s.attachments),
|
|
3825
3825
|
groupPosition: e
|
|
3826
3826
|
};
|
|
3827
3827
|
return t ? /* @__PURE__ */ n(a.Sent, { ...r }) : /* @__PURE__ */ n(a.Received, { ...r });
|
|
3828
3828
|
}
|
|
3829
|
-
const
|
|
3829
|
+
const qi = ({
|
|
3830
3830
|
groupPosition: e,
|
|
3831
3831
|
isMyMessage: t,
|
|
3832
3832
|
message: s,
|
|
3833
3833
|
renderText: a
|
|
3834
3834
|
}) => {
|
|
3835
3835
|
var v;
|
|
3836
|
-
const r =
|
|
3836
|
+
const r = Zn(s.attachments);
|
|
3837
3837
|
if (r.length === 0) return null;
|
|
3838
|
-
const i =
|
|
3838
|
+
const i = Vi(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? rn(l.attachments[0] ?? {}).url : void 0, u = o && ji(o, d) ? void 0 : o;
|
|
3839
3839
|
let h = 0;
|
|
3840
3840
|
const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", b = (x, p, y) => {
|
|
3841
3841
|
const _ = t ? it.Sent : it.Received;
|
|
@@ -3843,21 +3843,21 @@ const Xi = ({
|
|
|
3843
3843
|
/* @__PURE__ */ n(
|
|
3844
3844
|
_,
|
|
3845
3845
|
{
|
|
3846
|
-
...
|
|
3846
|
+
...rn(x),
|
|
3847
3847
|
groupPosition: y ? g : "middle"
|
|
3848
3848
|
},
|
|
3849
3849
|
p
|
|
3850
3850
|
)
|
|
3851
3851
|
);
|
|
3852
3852
|
}, w = (x, p) => {
|
|
3853
|
-
const y =
|
|
3853
|
+
const y = Gi(
|
|
3854
3854
|
h,
|
|
3855
3855
|
i,
|
|
3856
3856
|
e
|
|
3857
3857
|
);
|
|
3858
3858
|
h += 1, m.push(
|
|
3859
3859
|
/* @__PURE__ */ n(
|
|
3860
|
-
|
|
3860
|
+
Xi,
|
|
3861
3861
|
{
|
|
3862
3862
|
groupPosition: y,
|
|
3863
3863
|
isMyMessage: t,
|
|
@@ -3912,8 +3912,8 @@ const Xi = ({
|
|
|
3912
3912
|
}
|
|
3913
3913
|
) : null
|
|
3914
3914
|
] });
|
|
3915
|
-
},
|
|
3916
|
-
var Lt, Mt, Dt, Ot, Pt, Ft, zt, Bt, $t, Ut;
|
|
3915
|
+
}, Zi = (e) => {
|
|
3916
|
+
var Lt, Mt, Dt, Ot, Pt, Ft, zt, Bt, $t, Ut, jt;
|
|
3917
3917
|
const {
|
|
3918
3918
|
additionalMessageInputProps: t,
|
|
3919
3919
|
editing: s,
|
|
@@ -3933,46 +3933,46 @@ const Xi = ({
|
|
|
3933
3933
|
viewerLanguage: v,
|
|
3934
3934
|
onOutboundClick: x,
|
|
3935
3935
|
resolvedOutbound: p
|
|
3936
|
-
} = e, { client: y } = Ge("CustomMessage"), { channel: _ } = _e("CustomMessage"), { isUnlocking: T, onUnlockClick: A, onFetchSource: R, onDownloadClick: z } =
|
|
3937
|
-
Attachment: D =
|
|
3938
|
-
EditMessageModal: I =
|
|
3936
|
+
} = e, { client: y } = Ge("CustomMessage"), { channel: _ } = _e("CustomMessage"), { isUnlocking: T, onUnlockClick: A, onFetchSource: R, onDownloadClick: z } = rr("LockedAttachment"), [F, L] = B(!1), E = gs(c.id), {
|
|
3937
|
+
Attachment: D = ps,
|
|
3938
|
+
EditMessageModal: I = bs,
|
|
3939
3939
|
MessageActions: C,
|
|
3940
|
-
MessageBlocked: S =
|
|
3941
|
-
MessageBouncePrompt: O =
|
|
3942
|
-
MessageDeleted: U =
|
|
3943
|
-
MessageIsThreadReplyInChannelButtonIndicator: j =
|
|
3944
|
-
MessageRepliesCountButton: J =
|
|
3945
|
-
ReminderNotification: Z =
|
|
3946
|
-
StreamedMessageText: Q =
|
|
3940
|
+
MessageBlocked: S = vs,
|
|
3941
|
+
MessageBouncePrompt: O = xs,
|
|
3942
|
+
MessageDeleted: U = ws,
|
|
3943
|
+
MessageIsThreadReplyInChannelButtonIndicator: j = _s,
|
|
3944
|
+
MessageRepliesCountButton: J = ys,
|
|
3945
|
+
ReminderNotification: Z = Ns,
|
|
3946
|
+
StreamedMessageText: Q = ks,
|
|
3947
3947
|
PinIndicator: G
|
|
3948
|
-
} =
|
|
3948
|
+
} = fn("CustomMessage"), N = Cs(c), M = Ss(c), Y = oe(
|
|
3949
3949
|
() => m == null ? void 0 : m(c),
|
|
3950
3950
|
[m, c]
|
|
3951
3951
|
), $ = oe(() => {
|
|
3952
3952
|
const fe = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...fe] : fe;
|
|
3953
3953
|
if (!$e(c)) return be;
|
|
3954
|
-
const
|
|
3955
|
-
return
|
|
3954
|
+
const Ht = be.filter((Vt) => !("type" in Vt) || !Ye(Vt));
|
|
3955
|
+
return Ht.length === be.length ? be : Ht;
|
|
3956
3956
|
}, [c]), ne = oe(
|
|
3957
|
-
() =>
|
|
3957
|
+
() => Zn($),
|
|
3958
3958
|
[$]
|
|
3959
3959
|
), W = oe(() => {
|
|
3960
|
-
const fe =
|
|
3960
|
+
const fe = Sn({ message: c, viewerLanguage: v });
|
|
3961
3961
|
return fe === c.text ? c : { ...c, text: fe };
|
|
3962
3962
|
}, [c, v]), te = ne.length > 0, se = ne.reduce(
|
|
3963
3963
|
(fe, be) => fe + be.attachments.length,
|
|
3964
3964
|
0
|
|
3965
3965
|
) === (($ == null ? void 0 : $.length) ?? 0), ie = (i == null ? void 0 : i[0]) ?? "", Oe = ie === "top" ? "first" : ie === "middle" ? "middle" : ie === "bottom" ? "end" : "single", me = ie === "single" || ie === "bottom";
|
|
3966
|
-
if (
|
|
3966
|
+
if (Es(c))
|
|
3967
3967
|
return null;
|
|
3968
3968
|
if (c.deleted_at || c.type === "deleted")
|
|
3969
3969
|
return /* @__PURE__ */ n(U, { message: c });
|
|
3970
|
-
if (
|
|
3970
|
+
if (Is(c))
|
|
3971
3971
|
return /* @__PURE__ */ n(S, {});
|
|
3972
|
-
const ae = !w && !!c.reply_count, he = !w && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, St =
|
|
3972
|
+
const ae = !w && !!c.reply_count, he = !w && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, St = Ts(c);
|
|
3973
3973
|
let pe;
|
|
3974
3974
|
le ? pe = () => u(c) : St && (pe = () => L(!0));
|
|
3975
|
-
const ee = g(),
|
|
3975
|
+
const ee = g(), as = k(
|
|
3976
3976
|
"str-chat__message str-chat__message-simple",
|
|
3977
3977
|
`str-chat__message--${c.type}`,
|
|
3978
3978
|
`str-chat__message--${c.status}`,
|
|
@@ -3989,7 +3989,7 @@ const Xi = ({
|
|
|
3989
3989
|
"str-chat__virtual-message__wrapper--first": r,
|
|
3990
3990
|
"str-chat__virtual-message__wrapper--group": o
|
|
3991
3991
|
}
|
|
3992
|
-
), Ke = c.poll_id && y.polls.fromState(c.poll_id), Et =
|
|
3992
|
+
), Ke = c.poll_id && y.polls.fromState(c.poll_id), Et = Pn(c), Ne = $e(c), rs = ht(c), Xe = !!($ != null && $.length && !c.quoted_message), It = Ne && ee && Xe, is = te && se && !c.quoted_message && !Ke && !Y && !Ne, Tt = {
|
|
3993
3993
|
contentType: "text",
|
|
3994
3994
|
amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
|
|
3995
3995
|
paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
|
|
@@ -4023,7 +4023,7 @@ const Xi = ({
|
|
|
4023
4023
|
}
|
|
4024
4024
|
),
|
|
4025
4025
|
F && /* @__PURE__ */ n(
|
|
4026
|
-
|
|
4026
|
+
As,
|
|
4027
4027
|
{
|
|
4028
4028
|
MessageBouncePrompt: O,
|
|
4029
4029
|
onClose: () => L(!1),
|
|
@@ -4033,7 +4033,7 @@ const Xi = ({
|
|
|
4033
4033
|
/* @__PURE__ */ f(
|
|
4034
4034
|
"div",
|
|
4035
4035
|
{
|
|
4036
|
-
className:
|
|
4036
|
+
className: as,
|
|
4037
4037
|
"data-message-id": c.id,
|
|
4038
4038
|
"data-dd-privacy": "mask",
|
|
4039
4039
|
children: [
|
|
@@ -4069,9 +4069,9 @@ const Xi = ({
|
|
|
4069
4069
|
marginInlineStart: 0
|
|
4070
4070
|
},
|
|
4071
4071
|
children: Et ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper message-tip-wrapper", children: [
|
|
4072
|
-
/* @__PURE__ */ n(
|
|
4073
|
-
c.text && Rt
|
|
4074
|
-
] }) :
|
|
4072
|
+
/* @__PURE__ */ n(vr, { message: c }),
|
|
4073
|
+
((jt = c.text) == null ? void 0 : jt.trim()) && Rt
|
|
4074
|
+
] }) : dr(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4075
4075
|
ee && C && /* @__PURE__ */ n(C, {}),
|
|
4076
4076
|
ee ? /* @__PURE__ */ n(Fe, { ...Tt, isMine: !0 }) : /* @__PURE__ */ n(
|
|
4077
4077
|
Fe,
|
|
@@ -4083,7 +4083,7 @@ const Xi = ({
|
|
|
4083
4083
|
}
|
|
4084
4084
|
),
|
|
4085
4085
|
!ee && C && /* @__PURE__ */ n(C, {})
|
|
4086
|
-
] }) }) :
|
|
4086
|
+
] }) }) : ur(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper message-locked-attachment-wrapper", children: [
|
|
4087
4087
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4088
4088
|
ee && C && /* @__PURE__ */ n(C, {}),
|
|
4089
4089
|
ee ? /* @__PURE__ */ n(
|
|
@@ -4106,8 +4106,8 @@ const Xi = ({
|
|
|
4106
4106
|
!ee && C && /* @__PURE__ */ n(C, {})
|
|
4107
4107
|
] }),
|
|
4108
4108
|
c.text && Rt
|
|
4109
|
-
] }) :
|
|
4110
|
-
|
|
4109
|
+
] }) : is ? /* @__PURE__ */ n(
|
|
4110
|
+
qi,
|
|
4111
4111
|
{
|
|
4112
4112
|
groupPosition: Oe,
|
|
4113
4113
|
isMyMessage: ee,
|
|
@@ -4129,14 +4129,14 @@ const Xi = ({
|
|
|
4129
4129
|
}),
|
|
4130
4130
|
children: [
|
|
4131
4131
|
Ne && !It && /* @__PURE__ */ n(
|
|
4132
|
-
|
|
4132
|
+
Qt,
|
|
4133
4133
|
{
|
|
4134
4134
|
message: c,
|
|
4135
4135
|
hasAttachment: Xe,
|
|
4136
4136
|
isMyMessage: ee
|
|
4137
4137
|
}
|
|
4138
4138
|
),
|
|
4139
|
-
Ke && /* @__PURE__ */ n(
|
|
4139
|
+
Ke && /* @__PURE__ */ n(Rs, { poll: Ke }),
|
|
4140
4140
|
$ != null && $.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
4141
4141
|
D,
|
|
4142
4142
|
{
|
|
@@ -4164,8 +4164,8 @@ const Xi = ({
|
|
|
4164
4164
|
) })
|
|
4165
4165
|
}
|
|
4166
4166
|
),
|
|
4167
|
-
!
|
|
4168
|
-
|
|
4167
|
+
!rs && !Et && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!Ne || It) && /* @__PURE__ */ n(
|
|
4168
|
+
Qt,
|
|
4169
4169
|
{
|
|
4170
4170
|
message: c,
|
|
4171
4171
|
hasAttachment: Xe,
|
|
@@ -4173,7 +4173,7 @@ const Xi = ({
|
|
|
4173
4173
|
}
|
|
4174
4174
|
) }),
|
|
4175
4175
|
/* @__PURE__ */ n(
|
|
4176
|
-
|
|
4176
|
+
yr,
|
|
4177
4177
|
{
|
|
4178
4178
|
onOutboundClick: x,
|
|
4179
4179
|
resolvedOutbound: p
|
|
@@ -4192,68 +4192,68 @@ const Xi = ({
|
|
|
4192
4192
|
c.id
|
|
4193
4193
|
)
|
|
4194
4194
|
] });
|
|
4195
|
-
},
|
|
4196
|
-
|
|
4195
|
+
}, Ji = P.memo(
|
|
4196
|
+
Zi,
|
|
4197
4197
|
(e, t) => {
|
|
4198
4198
|
var s, a, r, i;
|
|
4199
|
-
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 :
|
|
4199
|
+
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : fs(e, t);
|
|
4200
4200
|
}
|
|
4201
|
-
),
|
|
4201
|
+
), Qi = (e) => {
|
|
4202
4202
|
var i;
|
|
4203
|
-
const t = ge("CustomMessage"), s = we(
|
|
4203
|
+
const t = ge("CustomMessage"), s = we(On), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
|
|
4204
4204
|
return /* @__PURE__ */ n(
|
|
4205
|
-
|
|
4205
|
+
Ji,
|
|
4206
4206
|
{
|
|
4207
4207
|
...t,
|
|
4208
4208
|
...e,
|
|
4209
4209
|
resolvedOutbound: r
|
|
4210
4210
|
}
|
|
4211
4211
|
);
|
|
4212
|
-
},
|
|
4212
|
+
}, el = () => {
|
|
4213
4213
|
var s;
|
|
4214
4214
|
const { handleDelete: e, message: t } = ge("CustomMessageActions");
|
|
4215
4215
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
4216
|
-
|
|
4216
|
+
wn,
|
|
4217
4217
|
{
|
|
4218
4218
|
onClick: e,
|
|
4219
4219
|
"aria-label": "Delete",
|
|
4220
4220
|
title: "Delete",
|
|
4221
4221
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4222
|
-
children: /* @__PURE__ */ n(
|
|
4222
|
+
children: /* @__PURE__ */ n(va, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4223
4223
|
}
|
|
4224
4224
|
);
|
|
4225
|
-
},
|
|
4225
|
+
}, tl = () => {
|
|
4226
4226
|
const { handleFlag: e } = ge("CustomMessageActions");
|
|
4227
4227
|
return /* @__PURE__ */ n(
|
|
4228
|
-
|
|
4228
|
+
wn,
|
|
4229
4229
|
{
|
|
4230
4230
|
onClick: e,
|
|
4231
4231
|
"aria-label": "Report",
|
|
4232
4232
|
title: "Report",
|
|
4233
4233
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4234
|
-
children: /* @__PURE__ */ n(
|
|
4234
|
+
children: /* @__PURE__ */ n(pn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4235
4235
|
}
|
|
4236
4236
|
);
|
|
4237
|
-
},
|
|
4237
|
+
}, nl = () => {
|
|
4238
4238
|
var t;
|
|
4239
4239
|
const { message: e } = ge("CustomMessageActions");
|
|
4240
4240
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== ce.ATTACHMENT ? null : /* @__PURE__ */ n(
|
|
4241
|
-
|
|
4241
|
+
ya,
|
|
4242
4242
|
{
|
|
4243
4243
|
messageActionSet: [
|
|
4244
|
-
{ Component:
|
|
4245
|
-
{ Component:
|
|
4244
|
+
{ Component: el, placement: "quick", type: "delete" },
|
|
4245
|
+
{ Component: tl, placement: "quick", type: "flag" }
|
|
4246
4246
|
]
|
|
4247
4247
|
}
|
|
4248
4248
|
);
|
|
4249
|
-
},
|
|
4249
|
+
}, sl = (e) => ({
|
|
4250
4250
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
4251
4251
|
(t) => nt.previewIsLoaded(t) || nt.previewIsLoading(t)
|
|
4252
4252
|
)
|
|
4253
|
-
}),
|
|
4254
|
-
const { linkPreviewsManager: e } =
|
|
4253
|
+
}), al = () => {
|
|
4254
|
+
const { linkPreviewsManager: e } = Ls(), { linkPreviews: t } = Ms(
|
|
4255
4255
|
e.state,
|
|
4256
|
-
|
|
4256
|
+
sl
|
|
4257
4257
|
), s = (r) => {
|
|
4258
4258
|
e.dismissPreview(r);
|
|
4259
4259
|
};
|
|
@@ -4317,7 +4317,7 @@ const Xi = ({
|
|
|
4317
4317
|
);
|
|
4318
4318
|
}) })
|
|
4319
4319
|
) : null;
|
|
4320
|
-
}, je = P.createContext(!1),
|
|
4320
|
+
}, je = P.createContext(!1), rl = 200, lo = () => we(je), il = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
4321
4321
|
"button",
|
|
4322
4322
|
{
|
|
4323
4323
|
...s,
|
|
@@ -4326,13 +4326,13 @@ const Xi = ({
|
|
|
4326
4326
|
disabled: t,
|
|
4327
4327
|
onPointerDown: (a) => a.preventDefault(),
|
|
4328
4328
|
onClick: e,
|
|
4329
|
-
children: /* @__PURE__ */ n(
|
|
4329
|
+
children: /* @__PURE__ */ n(xa, { weight: "bold", className: "size-4" })
|
|
4330
4330
|
}
|
|
4331
|
-
),
|
|
4332
|
-
const e = we(je), { handleSubmit: t } =
|
|
4333
|
-
SendButton: r =
|
|
4334
|
-
AttachmentPreviewList: i =
|
|
4335
|
-
} =
|
|
4331
|
+
), on = () => {
|
|
4332
|
+
const e = we(je), { handleSubmit: t } = Ds(), s = Os(), a = e || !s, {
|
|
4333
|
+
SendButton: r = il,
|
|
4334
|
+
AttachmentPreviewList: i = Ps
|
|
4335
|
+
} = fn("CustomMessageInput"), o = P.useRef(null);
|
|
4336
4336
|
return P.useEffect(() => {
|
|
4337
4337
|
const l = o.current;
|
|
4338
4338
|
if (!l || typeof ResizeObserver > "u")
|
|
@@ -4395,13 +4395,13 @@ const Xi = ({
|
|
|
4395
4395
|
"data-dd-privacy": "mask",
|
|
4396
4396
|
children: [
|
|
4397
4397
|
/* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
|
|
4398
|
-
/* @__PURE__ */ n(
|
|
4399
|
-
/* @__PURE__ */ n(
|
|
4398
|
+
/* @__PURE__ */ n(Fs, {}),
|
|
4399
|
+
/* @__PURE__ */ n(al, {}),
|
|
4400
4400
|
/* @__PURE__ */ n(i, {})
|
|
4401
4401
|
] }),
|
|
4402
4402
|
/* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
|
|
4403
4403
|
/* @__PURE__ */ n(
|
|
4404
|
-
|
|
4404
|
+
zs,
|
|
4405
4405
|
{
|
|
4406
4406
|
"aria-disabled": e || void 0,
|
|
4407
4407
|
containerClassName: "min-w-0 flex-1 leading-[0]",
|
|
@@ -4428,14 +4428,14 @@ const Xi = ({
|
|
|
4428
4428
|
]
|
|
4429
4429
|
}
|
|
4430
4430
|
);
|
|
4431
|
-
},
|
|
4431
|
+
}, cn = () => /* @__PURE__ */ f("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
|
|
4432
4432
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4433
4433
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4434
4434
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4435
4435
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4436
4436
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4437
4437
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-gradient" })
|
|
4438
|
-
] }),
|
|
4438
|
+
] }), dn = ({
|
|
4439
4439
|
renderActions: e,
|
|
4440
4440
|
renderHeader: t,
|
|
4441
4441
|
renderFooter: s,
|
|
@@ -4457,7 +4457,7 @@ const Xi = ({
|
|
|
4457
4457
|
c = v;
|
|
4458
4458
|
const p = Array.from(
|
|
4459
4459
|
g.querySelectorAll(".str-chat__list")
|
|
4460
|
-
).find((_) => _.scrollHeight > _.clientHeight) ?? null, y = p ? p.scrollHeight - p.scrollTop - p.clientHeight <
|
|
4460
|
+
).find((_) => _.scrollHeight > _.clientHeight) ?? null, y = p ? p.scrollHeight - p.scrollTop - p.clientHeight < rl : !1;
|
|
4461
4461
|
g.style.setProperty(
|
|
4462
4462
|
"--messaging-composer-height",
|
|
4463
4463
|
`${v}px`
|
|
@@ -4475,7 +4475,7 @@ const Xi = ({
|
|
|
4475
4475
|
ref: u,
|
|
4476
4476
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4477
4477
|
children: [
|
|
4478
|
-
/* @__PURE__ */ n(
|
|
4478
|
+
/* @__PURE__ */ n(cn, {}),
|
|
4479
4479
|
/* @__PURE__ */ f("div", { className: "relative z-10 flex flex-col", children: [
|
|
4480
4480
|
t == null ? void 0 : t(),
|
|
4481
4481
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
|
|
@@ -4493,7 +4493,7 @@ const Xi = ({
|
|
|
4493
4493
|
ref: u,
|
|
4494
4494
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4495
4495
|
children: [
|
|
4496
|
-
/* @__PURE__ */ n(
|
|
4496
|
+
/* @__PURE__ */ n(cn, {}),
|
|
4497
4497
|
/* @__PURE__ */ f("div", { className: "relative z-10 flex min-h-0 flex-col", children: [
|
|
4498
4498
|
t == null ? void 0 : t(),
|
|
4499
4499
|
/* @__PURE__ */ f("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
@@ -4505,7 +4505,7 @@ const Xi = ({
|
|
|
4505
4505
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4506
4506
|
children: [
|
|
4507
4507
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4508
|
-
/* @__PURE__ */ n(je.Provider, { value: l, children: /* @__PURE__ */ n(
|
|
4508
|
+
/* @__PURE__ */ n(je.Provider, { value: l, children: /* @__PURE__ */ n(Gt, { Input: i ?? on }) })
|
|
4509
4509
|
]
|
|
4510
4510
|
}
|
|
4511
4511
|
),
|
|
@@ -4524,42 +4524,42 @@ const Xi = ({
|
|
|
4524
4524
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4525
4525
|
children: [
|
|
4526
4526
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4527
|
-
/* @__PURE__ */ n(je.Provider, { value: l, children: /* @__PURE__ */ n(
|
|
4527
|
+
/* @__PURE__ */ n(je.Provider, { value: l, children: /* @__PURE__ */ n(Gt, { Input: on }) })
|
|
4528
4528
|
]
|
|
4529
4529
|
}
|
|
4530
4530
|
),
|
|
4531
4531
|
s == null ? void 0 : s()
|
|
4532
4532
|
] });
|
|
4533
|
-
},
|
|
4533
|
+
}, ll = {
|
|
4534
4534
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4535
4535
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4536
|
-
},
|
|
4536
|
+
}, ol = ["SYSTEM_AGE_SAFETY_BLOCKED"], cl = {
|
|
4537
4537
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4538
|
-
}, et = "age safety guidelines.",
|
|
4538
|
+
}, et = "age safety guidelines.", dl = "https://linktr.ee/s/about/contact", ul = (e) => ol.includes(
|
|
4539
4539
|
e
|
|
4540
|
-
),
|
|
4540
|
+
), ml = (e) => {
|
|
4541
4541
|
var t;
|
|
4542
|
-
return
|
|
4543
|
-
},
|
|
4542
|
+
return ul((t = e.metadata) == null ? void 0 : t.custom_type);
|
|
4543
|
+
}, hl = (e) => {
|
|
4544
4544
|
var a;
|
|
4545
4545
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4546
|
-
if (
|
|
4546
|
+
if (Wt(t))
|
|
4547
4547
|
return {
|
|
4548
4548
|
kind: "dm-agent",
|
|
4549
4549
|
type: t
|
|
4550
4550
|
};
|
|
4551
|
-
if (
|
|
4551
|
+
if (Ws(t))
|
|
4552
4552
|
return {
|
|
4553
4553
|
kind: "age-safety",
|
|
4554
4554
|
type: t
|
|
4555
4555
|
};
|
|
4556
4556
|
const s = e.dm_agent_system_type;
|
|
4557
|
-
if (
|
|
4557
|
+
if (Wt(s))
|
|
4558
4558
|
return {
|
|
4559
4559
|
kind: "dm-agent",
|
|
4560
4560
|
type: s
|
|
4561
4561
|
};
|
|
4562
|
-
},
|
|
4562
|
+
}, fl = (e) => {
|
|
4563
4563
|
const t = e.indexOf(et);
|
|
4564
4564
|
if (t === -1)
|
|
4565
4565
|
return e;
|
|
@@ -4569,7 +4569,7 @@ const Xi = ({
|
|
|
4569
4569
|
/* @__PURE__ */ n(
|
|
4570
4570
|
"a",
|
|
4571
4571
|
{
|
|
4572
|
-
href:
|
|
4572
|
+
href: dl,
|
|
4573
4573
|
target: "_blank",
|
|
4574
4574
|
rel: "noopener noreferrer",
|
|
4575
4575
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -4578,13 +4578,13 @@ const Xi = ({
|
|
|
4578
4578
|
),
|
|
4579
4579
|
e.slice(s)
|
|
4580
4580
|
] });
|
|
4581
|
-
},
|
|
4581
|
+
}, gl = (e) => {
|
|
4582
4582
|
var a, r;
|
|
4583
|
-
const t = !
|
|
4583
|
+
const t = !ml(e.message), s = hl(
|
|
4584
4584
|
e.message
|
|
4585
4585
|
);
|
|
4586
4586
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
4587
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4587
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || ll[s.type];
|
|
4588
4588
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4589
4589
|
/* @__PURE__ */ f(
|
|
4590
4590
|
"div",
|
|
@@ -4594,7 +4594,7 @@ const Xi = ({
|
|
|
4594
4594
|
"data-dm-agent-system-type": s.type,
|
|
4595
4595
|
children: [
|
|
4596
4596
|
/* @__PURE__ */ n(
|
|
4597
|
-
|
|
4597
|
+
wa,
|
|
4598
4598
|
{
|
|
4599
4599
|
size: 16,
|
|
4600
4600
|
weight: "regular",
|
|
@@ -4610,7 +4610,7 @@ const Xi = ({
|
|
|
4610
4610
|
] });
|
|
4611
4611
|
}
|
|
4612
4612
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
4613
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4613
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || cl[s.type];
|
|
4614
4614
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4615
4615
|
/* @__PURE__ */ f(
|
|
4616
4616
|
"div",
|
|
@@ -4620,7 +4620,7 @@ const Xi = ({
|
|
|
4620
4620
|
"data-age-safety-system-type": s.type,
|
|
4621
4621
|
children: [
|
|
4622
4622
|
/* @__PURE__ */ n(
|
|
4623
|
-
|
|
4623
|
+
_a,
|
|
4624
4624
|
{
|
|
4625
4625
|
size: 24,
|
|
4626
4626
|
weight: "duotone",
|
|
@@ -4629,7 +4629,7 @@ const Xi = ({
|
|
|
4629
4629
|
"data-testid": "age-safety-system-message-icon"
|
|
4630
4630
|
}
|
|
4631
4631
|
),
|
|
4632
|
-
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
4632
|
+
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: fl(i) }) })
|
|
4633
4633
|
]
|
|
4634
4634
|
}
|
|
4635
4635
|
),
|
|
@@ -4644,7 +4644,7 @@ const Xi = ({
|
|
|
4644
4644
|
] }),
|
|
4645
4645
|
!t && /* @__PURE__ */ n(qe, { message: e.message })
|
|
4646
4646
|
] });
|
|
4647
|
-
},
|
|
4647
|
+
}, Jn = Ve(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
4648
4648
|
"animateTransform",
|
|
4649
4649
|
{
|
|
4650
4650
|
attributeName: "transform",
|
|
@@ -4654,17 +4654,17 @@ const Xi = ({
|
|
|
4654
4654
|
begin: `${120 * t}ms`,
|
|
4655
4655
|
repeatCount: "indefinite"
|
|
4656
4656
|
}
|
|
4657
|
-
) }),
|
|
4657
|
+
) }), pl = /* @__PURE__ */ new Set([
|
|
4658
4658
|
Ze.Thinking,
|
|
4659
4659
|
Ze.Generating,
|
|
4660
4660
|
Ze.ExternalSources
|
|
4661
|
-
]),
|
|
4661
|
+
]), bl = ({ threadList: e }) => {
|
|
4662
4662
|
var b, w;
|
|
4663
|
-
const { channel: t, channelConfig: s, thread: a } = _e(), { client: r } = Ge(), { typing: i = {} } =
|
|
4664
|
-
if (!e && l &&
|
|
4665
|
-
const v =
|
|
4663
|
+
const { channel: t, channelConfig: s, thread: a } = _e(), { client: r } = Ge(), { typing: i = {} } = Bs(), { aiState: o } = $s(t), l = we(Jn);
|
|
4664
|
+
if (!e && l && pl.has(o)) {
|
|
4665
|
+
const v = vl(t, (b = r.user) == null ? void 0 : b.id);
|
|
4666
4666
|
return /* @__PURE__ */ n(
|
|
4667
|
-
|
|
4667
|
+
un,
|
|
4668
4668
|
{
|
|
4669
4669
|
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
4670
4670
|
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
@@ -4690,7 +4690,7 @@ const Xi = ({
|
|
|
4690
4690
|
return null;
|
|
4691
4691
|
const g = (w = m[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4692
4692
|
return /* @__PURE__ */ n(
|
|
4693
|
-
|
|
4693
|
+
un,
|
|
4694
4694
|
{
|
|
4695
4695
|
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4696
4696
|
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
@@ -4698,7 +4698,7 @@ const Xi = ({
|
|
|
4698
4698
|
testId: "typing-indicator"
|
|
4699
4699
|
}
|
|
4700
4700
|
);
|
|
4701
|
-
},
|
|
4701
|
+
}, un = ({
|
|
4702
4702
|
avatarId: e,
|
|
4703
4703
|
avatarName: t,
|
|
4704
4704
|
avatarImage: s,
|
|
@@ -4745,7 +4745,7 @@ const Xi = ({
|
|
|
4745
4745
|
] })
|
|
4746
4746
|
}
|
|
4747
4747
|
);
|
|
4748
|
-
function
|
|
4748
|
+
function vl(e, t) {
|
|
4749
4749
|
var a;
|
|
4750
4750
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4751
4751
|
for (const r of Object.values(s)) {
|
|
@@ -4754,7 +4754,7 @@ function bl(e, t) {
|
|
|
4754
4754
|
return i;
|
|
4755
4755
|
}
|
|
4756
4756
|
}
|
|
4757
|
-
const
|
|
4757
|
+
const xl = () => null, wl = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
4758
4758
|
"div",
|
|
4759
4759
|
{
|
|
4760
4760
|
className: k("flex items-center justify-center h-full", e),
|
|
@@ -4798,11 +4798,11 @@ const vl = () => null, xl = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
|
4798
4798
|
]
|
|
4799
4799
|
}
|
|
4800
4800
|
), He = P.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
|
|
4801
|
-
/* @__PURE__ */ n(
|
|
4801
|
+
/* @__PURE__ */ n(wl, { className: "w-6 h-6" }),
|
|
4802
4802
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4803
4803
|
] }) }));
|
|
4804
4804
|
He.displayName = "LoadingState";
|
|
4805
|
-
const
|
|
4805
|
+
const _l = ({
|
|
4806
4806
|
onBack: e,
|
|
4807
4807
|
showBackButton: t,
|
|
4808
4808
|
renderMessageInputActions: s,
|
|
@@ -4837,10 +4837,10 @@ const wl = ({
|
|
|
4837
4837
|
const I = X((Z) => {
|
|
4838
4838
|
var Q;
|
|
4839
4839
|
(Q = D.current) == null || Q.call(D, Z);
|
|
4840
|
-
}, []), C = R ? I : void 0, S =
|
|
4840
|
+
}, []), C = R ? I : void 0, S = br(E, z), O = L.state.messages.some(
|
|
4841
4841
|
(Z) => Z.type !== "deleted"
|
|
4842
4842
|
), U = v ? /* @__PURE__ */ n(P.Fragment, { children: v() }, "lt-channel-banner") : null, j = /* @__PURE__ */ n(
|
|
4843
|
-
|
|
4843
|
+
Da,
|
|
4844
4844
|
{
|
|
4845
4845
|
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%)]",
|
|
4846
4846
|
onBack: e,
|
|
@@ -4862,7 +4862,7 @@ const wl = ({
|
|
|
4862
4862
|
), J = X(
|
|
4863
4863
|
(Z) => {
|
|
4864
4864
|
const { message: Q } = ge("ChannelView"), G = /* @__PURE__ */ n(
|
|
4865
|
-
|
|
4865
|
+
Qi,
|
|
4866
4866
|
{
|
|
4867
4867
|
...Z,
|
|
4868
4868
|
viewerLanguage: _,
|
|
@@ -4873,16 +4873,16 @@ const wl = ({
|
|
|
4873
4873
|
},
|
|
4874
4874
|
[C, y, _]
|
|
4875
4875
|
);
|
|
4876
|
-
return /* @__PURE__ */ n(
|
|
4877
|
-
|
|
4876
|
+
return /* @__PURE__ */ n(On.Provider, { value: S, children: /* @__PURE__ */ n(
|
|
4877
|
+
js,
|
|
4878
4878
|
{
|
|
4879
4879
|
overrides: {
|
|
4880
4880
|
Message: J,
|
|
4881
|
-
MessageActions:
|
|
4881
|
+
MessageActions: nl,
|
|
4882
4882
|
UnreadMessagesNotification: () => null,
|
|
4883
4883
|
UnreadMessagesSeparator: () => null
|
|
4884
4884
|
},
|
|
4885
|
-
children: /* @__PURE__ */ n(
|
|
4885
|
+
children: /* @__PURE__ */ n(Hs, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4886
4886
|
/* @__PURE__ */ f(
|
|
4887
4887
|
"div",
|
|
4888
4888
|
{
|
|
@@ -4893,7 +4893,7 @@ const wl = ({
|
|
|
4893
4893
|
U
|
|
4894
4894
|
] }) }),
|
|
4895
4895
|
/* @__PURE__ */ n(
|
|
4896
|
-
|
|
4896
|
+
Yt,
|
|
4897
4897
|
{
|
|
4898
4898
|
head: O ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4899
4899
|
j,
|
|
@@ -4908,7 +4908,7 @@ const wl = ({
|
|
|
4908
4908
|
"lt-channel-message-list"
|
|
4909
4909
|
),
|
|
4910
4910
|
/* @__PURE__ */ n(
|
|
4911
|
-
|
|
4911
|
+
dn,
|
|
4912
4912
|
{
|
|
4913
4913
|
...s && {
|
|
4914
4914
|
renderActions: () => s == null ? void 0 : s(L)
|
|
@@ -4934,7 +4934,7 @@ const wl = ({
|
|
|
4934
4934
|
U
|
|
4935
4935
|
] }) }),
|
|
4936
4936
|
/* @__PURE__ */ n(
|
|
4937
|
-
|
|
4937
|
+
Yt,
|
|
4938
4938
|
{
|
|
4939
4939
|
head: O ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4940
4940
|
j,
|
|
@@ -4950,7 +4950,7 @@ const wl = ({
|
|
|
4950
4950
|
),
|
|
4951
4951
|
r ? /* @__PURE__ */ n(P.Fragment, { children: r(L) }, "lt-channel-conversation-footer") : null,
|
|
4952
4952
|
/* @__PURE__ */ n(
|
|
4953
|
-
|
|
4953
|
+
dn,
|
|
4954
4954
|
{
|
|
4955
4955
|
...s && {
|
|
4956
4956
|
renderActions: () => s == null ? void 0 : s(L)
|
|
@@ -4965,7 +4965,7 @@ const wl = ({
|
|
|
4965
4965
|
] }) })
|
|
4966
4966
|
}
|
|
4967
4967
|
) });
|
|
4968
|
-
},
|
|
4968
|
+
}, Qn = P.memo(
|
|
4969
4969
|
({
|
|
4970
4970
|
channel: e,
|
|
4971
4971
|
onBack: t,
|
|
@@ -4976,7 +4976,7 @@ const wl = ({
|
|
|
4976
4976
|
onLeaveConversation: o,
|
|
4977
4977
|
onBlockParticipant: l,
|
|
4978
4978
|
className: d,
|
|
4979
|
-
CustomChannelEmptyState: u =
|
|
4979
|
+
CustomChannelEmptyState: u = xl,
|
|
4980
4980
|
showDeleteConversation: h = !0,
|
|
4981
4981
|
onDeleteConversationClick: m,
|
|
4982
4982
|
onBlockParticipantClick: g,
|
|
@@ -5035,7 +5035,7 @@ const wl = ({
|
|
|
5035
5035
|
};
|
|
5036
5036
|
return G.addEventListener("click", N), () => G.removeEventListener("click", N);
|
|
5037
5037
|
}, [L, e]);
|
|
5038
|
-
const Q =
|
|
5038
|
+
const Q = gn(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
|
|
5039
5039
|
return /* @__PURE__ */ n(
|
|
5040
5040
|
"div",
|
|
5041
5041
|
{
|
|
@@ -5045,20 +5045,20 @@ const wl = ({
|
|
|
5045
5045
|
d
|
|
5046
5046
|
),
|
|
5047
5047
|
style: Q,
|
|
5048
|
-
children: /* @__PURE__ */ n(
|
|
5049
|
-
|
|
5048
|
+
children: /* @__PURE__ */ n(Jn.Provider, { value: p ?? !1, children: /* @__PURE__ */ n(
|
|
5049
|
+
Us,
|
|
5050
5050
|
{
|
|
5051
5051
|
channel: e,
|
|
5052
|
-
MessageSystem:
|
|
5052
|
+
MessageSystem: gl,
|
|
5053
5053
|
EmptyStateIndicator: u,
|
|
5054
5054
|
LoadingIndicator: He,
|
|
5055
|
-
DateSeparator:
|
|
5056
|
-
TypingIndicator:
|
|
5055
|
+
DateSeparator: Oa,
|
|
5056
|
+
TypingIndicator: bl,
|
|
5057
5057
|
doSendMessageRequest: J,
|
|
5058
5058
|
...E ? { SendButton: E } : {},
|
|
5059
5059
|
...D ? { AttachmentPreviewList: D } : {},
|
|
5060
5060
|
children: /* @__PURE__ */ n(
|
|
5061
|
-
|
|
5061
|
+
_l,
|
|
5062
5062
|
{
|
|
5063
5063
|
onBack: t,
|
|
5064
5064
|
showBackButton: s,
|
|
@@ -5095,7 +5095,7 @@ const wl = ({
|
|
|
5095
5095
|
);
|
|
5096
5096
|
}
|
|
5097
5097
|
);
|
|
5098
|
-
|
|
5098
|
+
Qn.displayName = "ChannelView";
|
|
5099
5099
|
const Se = P.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
|
|
5100
5100
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
5101
5101
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -5111,7 +5111,7 @@ const Se = P.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
5111
5111
|
)
|
|
5112
5112
|
] }) }));
|
|
5113
5113
|
Se.displayName = "ErrorState";
|
|
5114
|
-
const
|
|
5114
|
+
const oo = ({
|
|
5115
5115
|
capabilities: e = {},
|
|
5116
5116
|
renderMessageInputActions: t,
|
|
5117
5117
|
renderConversationFooter: s,
|
|
@@ -5145,7 +5145,7 @@ const lo = ({
|
|
|
5145
5145
|
refreshConnection: D,
|
|
5146
5146
|
service: I,
|
|
5147
5147
|
debug: C
|
|
5148
|
-
} =
|
|
5148
|
+
} = Na(), [S, O] = B(null), [U, j] = B(null), [J, Z] = B(!1), { showDeleteConversation: Q = !0 } = e, G = V(o);
|
|
5149
5149
|
G.current = o;
|
|
5150
5150
|
const N = V(a);
|
|
5151
5151
|
N.current = a;
|
|
@@ -5229,7 +5229,7 @@ const lo = ({
|
|
|
5229
5229
|
onBack: D
|
|
5230
5230
|
}
|
|
5231
5231
|
) : U ? /* @__PURE__ */ n(Se, { message: U }) : J && !S ? /* @__PURE__ */ n(Se, { message: "Conversation ended" }) : S ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
5232
|
-
|
|
5232
|
+
Qn,
|
|
5233
5233
|
{
|
|
5234
5234
|
channel: S,
|
|
5235
5235
|
renderMessageInputActions: t,
|
|
@@ -5258,13 +5258,13 @@ const lo = ({
|
|
|
5258
5258
|
S.id
|
|
5259
5259
|
) }) }) : /* @__PURE__ */ n(He, {});
|
|
5260
5260
|
};
|
|
5261
|
-
function
|
|
5261
|
+
function yl(e) {
|
|
5262
5262
|
const t = e.state.pending_messages;
|
|
5263
5263
|
if (t != null && t.length)
|
|
5264
5264
|
for (const s of t)
|
|
5265
5265
|
e.state.addMessageSorted(s.message);
|
|
5266
5266
|
}
|
|
5267
|
-
const
|
|
5267
|
+
const es = P.createContext({
|
|
5268
5268
|
selectedChannel: void 0,
|
|
5269
5269
|
onChannelSelect: () => {
|
|
5270
5270
|
},
|
|
@@ -5272,14 +5272,14 @@ const Qn = P.createContext({
|
|
|
5272
5272
|
renderMessagePreview: void 0,
|
|
5273
5273
|
channelPreview: void 0,
|
|
5274
5274
|
viewerLanguage: void 0
|
|
5275
|
-
}),
|
|
5275
|
+
}), Nl = es.Provider, kl = () => P.useContext(es), Cl = (e, t) => {
|
|
5276
5276
|
const s = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
5277
5277
|
return Math.floor((a - s) / (1e3 * 60 * 60 * 24));
|
|
5278
|
-
},
|
|
5278
|
+
}, Sl = (e) => {
|
|
5279
5279
|
const t = /* @__PURE__ */ new Date();
|
|
5280
5280
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
5281
5281
|
return "Just now";
|
|
5282
|
-
const a =
|
|
5282
|
+
const a = Cl(e, t);
|
|
5283
5283
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
5284
5284
|
hour: "numeric",
|
|
5285
5285
|
minute: "2-digit",
|
|
@@ -5292,7 +5292,7 @@ const Qn = P.createContext({
|
|
|
5292
5292
|
day: "numeric",
|
|
5293
5293
|
year: "numeric"
|
|
5294
5294
|
});
|
|
5295
|
-
},
|
|
5295
|
+
}, ts = P.memo(
|
|
5296
5296
|
(e) => {
|
|
5297
5297
|
var z, F, L;
|
|
5298
5298
|
const { channel: t, unread: s } = e, {
|
|
@@ -5302,7 +5302,7 @@ const Qn = P.createContext({
|
|
|
5302
5302
|
channelPreview: o,
|
|
5303
5303
|
renderMessagePreview: l,
|
|
5304
5304
|
viewerLanguage: d
|
|
5305
|
-
} =
|
|
5305
|
+
} = kl(), { client: u } = Ge(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = yn(t);
|
|
5306
5306
|
if (o)
|
|
5307
5307
|
return /* @__PURE__ */ n(
|
|
5308
5308
|
o,
|
|
@@ -5319,11 +5319,11 @@ const Qn = P.createContext({
|
|
|
5319
5319
|
}, c = (E) => {
|
|
5320
5320
|
const D = E.key === "Enter" || E.key === " ", I = E.repeat;
|
|
5321
5321
|
!D || I || (E.preventDefault(), g());
|
|
5322
|
-
}, b =
|
|
5322
|
+
}, b = Nn(
|
|
5323
5323
|
(z = t == null ? void 0 : t.state) == null ? void 0 : z.members,
|
|
5324
5324
|
u == null ? void 0 : u.userID,
|
|
5325
5325
|
t == null ? void 0 : t.type
|
|
5326
|
-
), w =
|
|
5326
|
+
), w = kn(b == null ? void 0 : b.user), v = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, x = (() => {
|
|
5327
5327
|
var D;
|
|
5328
5328
|
const E = (D = t == null ? void 0 : t.state) == null ? void 0 : D.messages;
|
|
5329
5329
|
if (E != null && E.length) {
|
|
@@ -5332,7 +5332,7 @@ const Qn = P.createContext({
|
|
|
5332
5332
|
}
|
|
5333
5333
|
})(), y = (() => {
|
|
5334
5334
|
var S;
|
|
5335
|
-
const E =
|
|
5335
|
+
const E = Sn({
|
|
5336
5336
|
message: x,
|
|
5337
5337
|
viewerLanguage: d
|
|
5338
5338
|
}), { custom_type: D, attachment_content_type: I } = (x == null ? void 0 : x.metadata) || {};
|
|
@@ -5349,7 +5349,7 @@ const Qn = P.createContext({
|
|
|
5349
5349
|
if (E) return E;
|
|
5350
5350
|
const C = (S = x == null ? void 0 : x.attachments) == null ? void 0 : S[0];
|
|
5351
5351
|
return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5352
|
-
})(), _ = x != null && x.created_at ?
|
|
5352
|
+
})(), _ = x != null && x.created_at ? Sl(new Date(x.created_at)) : "", T = x ? $e(x) : !1, A = l ? l(x, y) : `${T ? "✨ " : ""}${y}`, R = s ?? 0;
|
|
5353
5353
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5354
5354
|
channelId: t == null ? void 0 : t.id,
|
|
5355
5355
|
isSelected: h,
|
|
@@ -5408,18 +5408,18 @@ const Qn = P.createContext({
|
|
|
5408
5408
|
);
|
|
5409
5409
|
}
|
|
5410
5410
|
);
|
|
5411
|
-
|
|
5412
|
-
const
|
|
5411
|
+
ts.displayName = "CustomChannelPreview";
|
|
5412
|
+
const El = { last_message_at: -1 }, Il = P.memo(
|
|
5413
5413
|
({
|
|
5414
5414
|
onChannelSelect: e,
|
|
5415
5415
|
selectedChannel: t,
|
|
5416
5416
|
filters: s,
|
|
5417
5417
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5418
5418
|
channelRenderFilterFn: r,
|
|
5419
|
-
sort: i =
|
|
5419
|
+
sort: i = El,
|
|
5420
5420
|
className: o,
|
|
5421
5421
|
customEmptyStateIndicator: l,
|
|
5422
|
-
channelListPaginator: d =
|
|
5422
|
+
channelListPaginator: d = Gs,
|
|
5423
5423
|
channelPreview: u,
|
|
5424
5424
|
renderMessagePreview: h,
|
|
5425
5425
|
viewerLanguage: m,
|
|
@@ -5435,7 +5435,7 @@ const Sl = { last_message_at: -1 }, El = P.memo(
|
|
|
5435
5435
|
const { debug: y = !1 } = ot(), _ = P.useCallback(
|
|
5436
5436
|
(A) => {
|
|
5437
5437
|
for (const R of A)
|
|
5438
|
-
|
|
5438
|
+
yl(R);
|
|
5439
5439
|
return r ? r(A) : A;
|
|
5440
5440
|
},
|
|
5441
5441
|
[r]
|
|
@@ -5470,8 +5470,8 @@ const Sl = { last_message_at: -1 }, El = P.memo(
|
|
|
5470
5470
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5471
5471
|
o
|
|
5472
5472
|
),
|
|
5473
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
5474
|
-
|
|
5473
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Nl, { value: T, children: /* @__PURE__ */ n(
|
|
5474
|
+
Vs,
|
|
5475
5475
|
{
|
|
5476
5476
|
filters: s,
|
|
5477
5477
|
sort: i,
|
|
@@ -5485,7 +5485,7 @@ const Sl = { last_message_at: -1 }, El = P.memo(
|
|
|
5485
5485
|
onAddedToChannel: v,
|
|
5486
5486
|
onChannelUpdated: x,
|
|
5487
5487
|
Paginator: d,
|
|
5488
|
-
Preview:
|
|
5488
|
+
Preview: ts,
|
|
5489
5489
|
EmptyStateIndicator: l
|
|
5490
5490
|
},
|
|
5491
5491
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
@@ -5494,8 +5494,8 @@ const Sl = { last_message_at: -1 }, El = P.memo(
|
|
|
5494
5494
|
);
|
|
5495
5495
|
}
|
|
5496
5496
|
);
|
|
5497
|
-
|
|
5498
|
-
const
|
|
5497
|
+
Il.displayName = "ChannelList";
|
|
5498
|
+
const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", Al = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", mn = ({ surface: e, actions: t, layout: s }) => {
|
|
5499
5499
|
if (t == null || t.length === 0) return null;
|
|
5500
5500
|
const a = s === "stacked";
|
|
5501
5501
|
return /* @__PURE__ */ n(
|
|
@@ -5510,7 +5510,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5510
5510
|
a ? "mt-3 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"
|
|
5511
5511
|
),
|
|
5512
5512
|
children: t.map((r, i) => /* @__PURE__ */ n(
|
|
5513
|
-
|
|
5513
|
+
Fn,
|
|
5514
5514
|
{
|
|
5515
5515
|
variant: e,
|
|
5516
5516
|
cta: r,
|
|
@@ -5521,7 +5521,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5521
5521
|
))
|
|
5522
5522
|
}
|
|
5523
5523
|
);
|
|
5524
|
-
},
|
|
5524
|
+
}, Rl = ({
|
|
5525
5525
|
ctaSurface: e,
|
|
5526
5526
|
chinTextColor: t,
|
|
5527
5527
|
title: s,
|
|
@@ -5545,7 +5545,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5545
5545
|
/* @__PURE__ */ n(
|
|
5546
5546
|
"p",
|
|
5547
5547
|
{
|
|
5548
|
-
className: k("min-w-0",
|
|
5548
|
+
className: k("min-w-0", Tl),
|
|
5549
5549
|
style: h,
|
|
5550
5550
|
children: s
|
|
5551
5551
|
}
|
|
@@ -5555,7 +5555,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5555
5555
|
"p",
|
|
5556
5556
|
{
|
|
5557
5557
|
className: k(
|
|
5558
|
-
|
|
5558
|
+
Al,
|
|
5559
5559
|
r > 1 && "whitespace-pre-line",
|
|
5560
5560
|
r <= 1 && "truncate"
|
|
5561
5561
|
),
|
|
@@ -5566,11 +5566,11 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5566
5566
|
] });
|
|
5567
5567
|
return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: g ? /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5568
5568
|
c,
|
|
5569
|
-
/* @__PURE__ */ n(
|
|
5569
|
+
/* @__PURE__ */ n(mn, { surface: e, actions: o, layout: "row" })
|
|
5570
5570
|
] }) : /* @__PURE__ */ f(q, { children: [
|
|
5571
5571
|
c,
|
|
5572
5572
|
/* @__PURE__ */ n(
|
|
5573
|
-
|
|
5573
|
+
mn,
|
|
5574
5574
|
{
|
|
5575
5575
|
surface: e,
|
|
5576
5576
|
actions: o,
|
|
@@ -5578,36 +5578,36 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5578
5578
|
}
|
|
5579
5579
|
)
|
|
5580
5580
|
] }) });
|
|
5581
|
-
},
|
|
5581
|
+
}, Ll = {
|
|
5582
5582
|
dark: "bg-white/[0.06]",
|
|
5583
5583
|
light: "bg-black/[0.04]"
|
|
5584
|
-
},
|
|
5584
|
+
}, Ml = {
|
|
5585
5585
|
1: [0],
|
|
5586
5586
|
2: [-10, 10],
|
|
5587
5587
|
3: [-13, 0, 13]
|
|
5588
|
-
},
|
|
5588
|
+
}, Dl = {
|
|
5589
5589
|
1: [0],
|
|
5590
5590
|
2: [-26, 26],
|
|
5591
5591
|
3: [-40, 0, 40]
|
|
5592
|
-
},
|
|
5592
|
+
}, Ol = {
|
|
5593
5593
|
1: [0],
|
|
5594
5594
|
2: [0, 1],
|
|
5595
5595
|
3: [1, 3, 2]
|
|
5596
|
-
},
|
|
5596
|
+
}, Pl = {
|
|
5597
5597
|
1: [1],
|
|
5598
5598
|
2: [1, 1],
|
|
5599
5599
|
3: [1, 1.08, 1]
|
|
5600
|
-
},
|
|
5600
|
+
}, Fl = ({ variant: e, images: t }) => {
|
|
5601
5601
|
const [s, a] = P.useState({}), r = t.join(`
|
|
5602
5602
|
`), [i, o] = P.useState(r);
|
|
5603
5603
|
r !== i && (o(r), a({}));
|
|
5604
|
-
const l = t.slice(0, 3).map((c, b) => ({ src: c, index: b })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u =
|
|
5604
|
+
const l = t.slice(0, 3).map((c, b) => ({ src: c, index: b })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u = Ml[d], h = Dl[d], m = Ol[d], g = Pl[d];
|
|
5605
5605
|
return /* @__PURE__ */ n(
|
|
5606
5606
|
"div",
|
|
5607
5607
|
{
|
|
5608
5608
|
className: k(
|
|
5609
5609
|
"relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
|
|
5610
|
-
|
|
5610
|
+
Ll[e]
|
|
5611
5611
|
),
|
|
5612
5612
|
children: l.map(({ src: c, index: b }, w) => /* @__PURE__ */ n(
|
|
5613
5613
|
"img",
|
|
@@ -5628,14 +5628,14 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5628
5628
|
))
|
|
5629
5629
|
}
|
|
5630
5630
|
);
|
|
5631
|
-
},
|
|
5631
|
+
}, zl = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Bl = ({
|
|
5632
5632
|
variant: e,
|
|
5633
5633
|
presentation: t,
|
|
5634
5634
|
images: s,
|
|
5635
5635
|
title: a,
|
|
5636
5636
|
heroUrl: r,
|
|
5637
5637
|
onHeroError: i
|
|
5638
|
-
}) => /* @__PURE__ */ n("div", { className:
|
|
5638
|
+
}) => /* @__PURE__ */ n("div", { className: zl, children: t === "fan" ? /* @__PURE__ */ n(Fl, { variant: e, images: s }) : (
|
|
5639
5639
|
// `heroUrl` is the palette-tracked source: it becomes `undefined` when the
|
|
5640
5640
|
// hero image errors, so `CardThumbnail` falls through to its placeholder.
|
|
5641
5641
|
// Do NOT `?? images[0]` here — that would re-instate the failed URL.
|
|
@@ -5649,7 +5649,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5649
5649
|
onImageError: i
|
|
5650
5650
|
}
|
|
5651
5651
|
)
|
|
5652
|
-
) }),
|
|
5652
|
+
) }), ns = ({
|
|
5653
5653
|
variant: e,
|
|
5654
5654
|
title: t,
|
|
5655
5655
|
subtitle: s,
|
|
@@ -5661,7 +5661,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5661
5661
|
accentColor: d,
|
|
5662
5662
|
groupPosition: u = "single"
|
|
5663
5663
|
}) => {
|
|
5664
|
-
const h =
|
|
5664
|
+
const h = Ks({
|
|
5665
5665
|
imagePresentation: i,
|
|
5666
5666
|
images: r
|
|
5667
5667
|
}), m = r.length > 0, g = m && h === "hero", c = We({
|
|
@@ -5684,7 +5684,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5684
5684
|
"data-testid": "rich-card",
|
|
5685
5685
|
children: [
|
|
5686
5686
|
m && /* @__PURE__ */ n(
|
|
5687
|
-
|
|
5687
|
+
Bl,
|
|
5688
5688
|
{
|
|
5689
5689
|
variant: e,
|
|
5690
5690
|
presentation: h,
|
|
@@ -5695,7 +5695,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5695
5695
|
}
|
|
5696
5696
|
),
|
|
5697
5697
|
/* @__PURE__ */ n(
|
|
5698
|
-
|
|
5698
|
+
Rl,
|
|
5699
5699
|
{
|
|
5700
5700
|
ctaSurface: c.surface,
|
|
5701
5701
|
chinTextColor: c.chinTextColor,
|
|
@@ -5711,13 +5711,13 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5711
5711
|
)
|
|
5712
5712
|
}
|
|
5713
5713
|
);
|
|
5714
|
-
},
|
|
5715
|
-
Sent:
|
|
5716
|
-
Received:
|
|
5717
|
-
},
|
|
5714
|
+
}, $l = (e) => /* @__PURE__ */ n(ns, { ...e, variant: "dark" }), Ul = (e) => /* @__PURE__ */ n(ns, { ...e, variant: "light" }), co = {
|
|
5715
|
+
Sent: $l,
|
|
5716
|
+
Received: Ul
|
|
5717
|
+
}, hn = `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%`, jl = {
|
|
5718
5718
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5719
5719
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5720
|
-
},
|
|
5720
|
+
}, Hl = ({ variant: e }) => /* @__PURE__ */ n(
|
|
5721
5721
|
"span",
|
|
5722
5722
|
{
|
|
5723
5723
|
"aria-hidden": "true",
|
|
@@ -5727,12 +5727,12 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5727
5727
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5728
5728
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5729
5729
|
transformOrigin: "center",
|
|
5730
|
-
backgroundColor:
|
|
5731
|
-
WebkitMask:
|
|
5732
|
-
mask:
|
|
5730
|
+
backgroundColor: jl[e],
|
|
5731
|
+
WebkitMask: hn,
|
|
5732
|
+
mask: hn
|
|
5733
5733
|
}
|
|
5734
5734
|
}
|
|
5735
|
-
),
|
|
5735
|
+
), Vl = {
|
|
5736
5736
|
sent: {
|
|
5737
5737
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5738
5738
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5741,7 +5741,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5741
5741
|
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5742
5742
|
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5743
5743
|
}
|
|
5744
|
-
},
|
|
5744
|
+
}, ss = ({
|
|
5745
5745
|
variant: e,
|
|
5746
5746
|
text: t,
|
|
5747
5747
|
tail: s = !0,
|
|
@@ -5757,23 +5757,23 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5757
5757
|
r
|
|
5758
5758
|
),
|
|
5759
5759
|
style: {
|
|
5760
|
-
...
|
|
5760
|
+
...Vl[e],
|
|
5761
5761
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5762
5762
|
isolation: "isolate"
|
|
5763
5763
|
},
|
|
5764
5764
|
children: [
|
|
5765
5765
|
a != null && /* @__PURE__ */ n("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5766
5766
|
/* @__PURE__ */ n("p", { className: "m-0 whitespace-pre-wrap break-words hyphens-manual", children: t }),
|
|
5767
|
-
s && /* @__PURE__ */ n(
|
|
5767
|
+
s && /* @__PURE__ */ n(Hl, { variant: e })
|
|
5768
5768
|
]
|
|
5769
5769
|
}
|
|
5770
|
-
),
|
|
5770
|
+
), Gl = ({
|
|
5771
5771
|
text: e,
|
|
5772
5772
|
tail: t,
|
|
5773
5773
|
header: s,
|
|
5774
5774
|
className: a
|
|
5775
5775
|
}) => /* @__PURE__ */ n(
|
|
5776
|
-
|
|
5776
|
+
ss,
|
|
5777
5777
|
{
|
|
5778
5778
|
variant: "received",
|
|
5779
5779
|
text: e,
|
|
@@ -5781,10 +5781,10 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5781
5781
|
header: s,
|
|
5782
5782
|
className: a
|
|
5783
5783
|
}
|
|
5784
|
-
),
|
|
5785
|
-
Sent:
|
|
5786
|
-
Received:
|
|
5787
|
-
},
|
|
5784
|
+
), Yl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(ss, { variant: "sent", text: e, tail: t, className: s }), uo = {
|
|
5785
|
+
Sent: Yl,
|
|
5786
|
+
Received: Gl
|
|
5787
|
+
}, Wl = ({
|
|
5788
5788
|
question: e,
|
|
5789
5789
|
onClick: t,
|
|
5790
5790
|
loading: s = !1,
|
|
@@ -5806,7 +5806,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5806
5806
|
),
|
|
5807
5807
|
children: e
|
|
5808
5808
|
}
|
|
5809
|
-
),
|
|
5809
|
+
), mo = ({
|
|
5810
5810
|
faqs: e,
|
|
5811
5811
|
onFaqClick: t,
|
|
5812
5812
|
loadingFaqId: s,
|
|
@@ -5815,7 +5815,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5815
5815
|
avatarImage: i,
|
|
5816
5816
|
avatarName: o
|
|
5817
5817
|
}) => {
|
|
5818
|
-
const l =
|
|
5818
|
+
const l = Xs(e);
|
|
5819
5819
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
|
|
5820
5820
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
5821
5821
|
ye,
|
|
@@ -5835,7 +5835,7 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5835
5835
|
children: [
|
|
5836
5836
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5837
5837
|
l.map((d) => /* @__PURE__ */ n(
|
|
5838
|
-
|
|
5838
|
+
Wl,
|
|
5839
5839
|
{
|
|
5840
5840
|
question: d.question,
|
|
5841
5841
|
onClick: () => t(d.id),
|
|
@@ -5849,43 +5849,43 @@ const Il = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5849
5849
|
] }) });
|
|
5850
5850
|
};
|
|
5851
5851
|
export {
|
|
5852
|
-
|
|
5852
|
+
In as A,
|
|
5853
5853
|
mt as B,
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5854
|
+
xl as C,
|
|
5855
|
+
kn as D,
|
|
5856
|
+
lo as E,
|
|
5857
|
+
mo as F,
|
|
5858
|
+
rr as G,
|
|
5859
|
+
Na as H,
|
|
5860
5860
|
it as L,
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5861
|
+
ao as M,
|
|
5862
|
+
co as R,
|
|
5863
|
+
vr as T,
|
|
5864
5864
|
ke as a,
|
|
5865
5865
|
ye as b,
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5866
|
+
Il as c,
|
|
5867
|
+
Qn as d,
|
|
5868
|
+
ro as e,
|
|
5869
|
+
Wl as f,
|
|
5870
5870
|
ue as g,
|
|
5871
5871
|
Fe as h,
|
|
5872
5872
|
Ce as i,
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5873
|
+
uo as j,
|
|
5874
|
+
so as k,
|
|
5875
|
+
oo as l,
|
|
5876
|
+
ni as m,
|
|
5877
|
+
Qr as n,
|
|
5878
5878
|
de as o,
|
|
5879
|
-
|
|
5880
|
-
|
|
5879
|
+
Sl as p,
|
|
5880
|
+
ti as q,
|
|
5881
5881
|
xe as r,
|
|
5882
|
-
|
|
5882
|
+
Sn as s,
|
|
5883
5883
|
Ye as t,
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5884
|
+
Pn as u,
|
|
5885
|
+
Ca as v,
|
|
5886
|
+
io as w,
|
|
5887
|
+
Pa as x,
|
|
5888
|
+
Nn as y,
|
|
5889
5889
|
ut as z
|
|
5890
5890
|
};
|
|
5891
|
-
//# sourceMappingURL=index-
|
|
5891
|
+
//# sourceMappingURL=index-xcIpBghu.js.map
|