@linktr.ee/messaging-react 3.12.2 → 3.12.3-rc-1784032997
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-Za6WfwFP.js → Card-Bme-pBSF.js} +123 -119
- package/dist/Card-Bme-pBSF.js.map +1 -0
- package/dist/Card-D-SQP6VG.cjs +2 -0
- package/dist/Card-D-SQP6VG.cjs.map +1 -0
- package/dist/index-B8niA4Dg.cjs +2 -0
- package/dist/index-B8niA4Dg.cjs.map +1 -0
- package/dist/{index-KfZ2Wx3D.js → index-D9_M5IWl.js} +1000 -977
- package/dist/index-D9_M5IWl.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/AttachmentCard/Thumbnail.tsx +10 -6
- package/src/components/CustomMessage/LockedAttachment/components/_shared/GalleryThumbnail.tsx +5 -1
- package/src/components/CustomMessage/LockedAttachment/components/_shared/SingleThumbnail.tsx +5 -1
- package/src/components/CustomMessage/StreamAttachmentMessage.test.tsx +33 -0
- package/src/components/CustomMessage/StreamAttachmentMessage.tsx +6 -3
- package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +4 -2
- package/src/components/MediaMessage/index.tsx +2 -1
- package/src/components/MessageAttachment/Image/index.tsx +3 -2
- package/src/components/MessageAttachment/MessageAttachment.test.tsx +20 -0
- package/src/utils/cdnImageUrl.ts +32 -0
- package/dist/Card-Bs3dV_7R.cjs +0 -2
- package/dist/Card-Bs3dV_7R.cjs.map +0 -1
- package/dist/Card-Za6WfwFP.js.map +0 -1
- package/dist/index-KfZ2Wx3D.js.map +0 -1
- package/dist/index-gl5pV2zJ.cjs +0 -2
- package/dist/index-gl5pV2zJ.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as s, jsxs as u, Fragment as se } from "react/jsx-runtime";
|
|
2
|
-
import V, { createContext as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { StarIcon as
|
|
2
|
+
import V, { createContext as ct, useContext as Te, useCallback as J, useState as B, useRef as G, useEffect as K, useId as js, useMemo as re, Suspense as Vs } from "react";
|
|
3
|
+
import { StreamChatService as Gs } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as Hs, LinkPreviewsManager as Yt } from "stream-chat";
|
|
5
|
+
import { Chat as Ys, useChannelStateContext as ce, useChatContext as fe, DateSeparator as qs, MessageStatus as Ws, useMessageContext as Ne, MessageErrorIcon as nt, MessageText as $e, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as as, Attachment as Zs, EditMessageModal as Js, MessageBlocked as Qs, MessageBouncePrompt as en, MessageDeleted as tn, MessageIsThreadReplyInChannelButtonIndicator as sn, MessageRepliesCountButton as nn, ReminderNotification as an, StreamedMessageText as rn, messageHasAttachments as ln, messageHasReactions as on, isDateSeparatorMessage as cn, isMessageBlocked as dn, isMessageBounced as un, MessageBounceModal as mn, Poll as hn, useMessageComposer as fn, useStateStore as gn, MessageInput as pn, useMessageInputContext as bn, useMessageComposerHasSendableData as vn, AttachmentPreviewList as xn, QuotedMessagePreview as wn, TextareaComposer as _n, MessageTimestamp as Xe, AIStates as Ke, useTypingContext as Nn, useAIState as yn, Channel as kn, WithComponents as Cn, Window as Sn, MessageList as En, ChannelList as In, InfiniteScroll as Tn } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ie, DotsThreeIcon as Mn, SpinnerGapIcon as Fe, SignOutIcon as An, ProhibitInsetIcon as qt, FlagIcon as rs, ArrowLeftIcon as at, CurrencyDollarIcon as Rn, CaretRightIcon as xe, SparkleIcon as we, FileIcon as is, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as ls, FileMdIcon as zn, FileTextIcon as Fn, FileZipIcon as Pn, FilePptIcon as On, FileCsvIcon as $n, FileXlsIcon as Un, FileDocIcon as Bn, FilePdfIcon as jn, CircleNotchIcon as Se, PlayIcon as rt, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ee, XIcon as Ge, CaretLeftIcon as Hn, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, ChecksIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Zn, ArrowUpIcon as Jn, ProhibitIcon as Qn } from "@phosphor-icons/react";
|
|
7
7
|
import y from "classnames";
|
|
8
|
-
import { MessageActions as
|
|
9
|
-
const
|
|
8
|
+
import { MessageActions as ea, DefaultDropdownActionButton as os } from "stream-chat-react/experimental";
|
|
9
|
+
const cs = ct({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const os = ot({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), dt = () => Te(cs), hl = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -38,10 +38,10 @@ const os = ot({
|
|
|
38
38
|
serviceConfig: !!n,
|
|
39
39
|
capabilities: Object.keys(r)
|
|
40
40
|
});
|
|
41
|
-
const [d, m] =
|
|
41
|
+
const [d, m] = B(null), [f, h] = B(null), [g, c] = B(!1), [b, v] = B(!1), [x, p] = B(null), _ = G(!1), w = G(null), k = G(n);
|
|
42
42
|
k.current = n;
|
|
43
|
-
const
|
|
44
|
-
|
|
43
|
+
const D = G(i);
|
|
44
|
+
D.current = i;
|
|
45
45
|
const S = G({
|
|
46
46
|
userId: t == null ? void 0 : t.id,
|
|
47
47
|
apiKey: a,
|
|
@@ -64,7 +64,7 @@ const os = ot({
|
|
|
64
64
|
capabilities: r
|
|
65
65
|
};
|
|
66
66
|
const O = G(null);
|
|
67
|
-
!o && a && ((I = O.current) == null ? void 0 : I.apiKey) !== a && (O.current = { apiKey: a, client: new
|
|
67
|
+
!o && a && ((I = O.current) == null ? void 0 : I.apiKey) !== a && (O.current = { apiKey: a, client: new Hs(a) });
|
|
68
68
|
const F = o || (a ? ((T = O.current) == null ? void 0 : T.client) ?? null : null);
|
|
69
69
|
K(() => {
|
|
70
70
|
const M = R.current, P = k.current;
|
|
@@ -83,10 +83,10 @@ const os = ot({
|
|
|
83
83
|
renderCount: M,
|
|
84
84
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
85
85
|
});
|
|
86
|
-
const $ = new
|
|
86
|
+
const $ = new Gs({
|
|
87
87
|
...P,
|
|
88
88
|
apiKey: a,
|
|
89
|
-
debug:
|
|
89
|
+
debug: D.current,
|
|
90
90
|
client: F
|
|
91
91
|
});
|
|
92
92
|
w.current = $, m($), l("✅ SERVICE SET", {
|
|
@@ -94,7 +94,7 @@ const os = ot({
|
|
|
94
94
|
serviceInstance: !!$
|
|
95
95
|
});
|
|
96
96
|
}, [a, F, o]);
|
|
97
|
-
const
|
|
97
|
+
const L = G(null);
|
|
98
98
|
K(() => {
|
|
99
99
|
var P, $;
|
|
100
100
|
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
@@ -102,7 +102,7 @@ const os = ot({
|
|
|
102
102
|
hasUser: !!t,
|
|
103
103
|
userId: t == null ? void 0 : t.id,
|
|
104
104
|
isConnecting: _.current,
|
|
105
|
-
isConnected:
|
|
105
|
+
isConnected: g,
|
|
106
106
|
dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
|
|
107
107
|
}), o)
|
|
108
108
|
return;
|
|
@@ -114,7 +114,7 @@ const os = ot({
|
|
|
114
114
|
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
-
if (((P =
|
|
117
|
+
if (((P = L.current) == null ? void 0 : P.serviceId) === d && (($ = L.current) == null ? void 0 : $.userId) === t.id) {
|
|
118
118
|
l(
|
|
119
119
|
"⚠️ USER CONNECTION SKIPPED",
|
|
120
120
|
"Already connected this user with this service"
|
|
@@ -126,7 +126,7 @@ const os = ot({
|
|
|
126
126
|
try {
|
|
127
127
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
128
128
|
const j = await d.connectUser(t);
|
|
129
|
-
h(j), c(!0),
|
|
129
|
+
h(j), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
|
|
130
130
|
userId: t.id,
|
|
131
131
|
clientId: j.userID
|
|
132
132
|
});
|
|
@@ -139,15 +139,15 @@ const os = ot({
|
|
|
139
139
|
} finally {
|
|
140
140
|
v(!1), _.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
141
141
|
userId: t.id,
|
|
142
|
-
isConnected:
|
|
142
|
+
isConnected: g
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
})();
|
|
146
|
-
}, [d, t, l,
|
|
146
|
+
}, [d, t, l, g, o]), K(() => {
|
|
147
147
|
const M = F;
|
|
148
148
|
return () => {
|
|
149
149
|
var P;
|
|
150
|
-
M && (
|
|
150
|
+
M && (L.current = null, (P = w.current) == null || P.disconnectUser().catch(console.error));
|
|
151
151
|
};
|
|
152
152
|
}, [F]);
|
|
153
153
|
const C = J(async () => {
|
|
@@ -176,8 +176,8 @@ const os = ot({
|
|
|
176
176
|
}
|
|
177
177
|
}, [d, t, l, o]), E = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
178
178
|
hasService: !!d,
|
|
179
|
-
hasClient: !!
|
|
180
|
-
isConnected:
|
|
179
|
+
hasClient: !!f,
|
|
180
|
+
isConnected: g,
|
|
181
181
|
isLoading: b,
|
|
182
182
|
hasError: !!x,
|
|
183
183
|
capabilitiesKeys: Object.keys(r)
|
|
@@ -191,8 +191,8 @@ const os = ot({
|
|
|
191
191
|
// surface it directly and report a clean connected state — the apiKey
|
|
192
192
|
// path's `client`/`isLoading`/`error` (from connectUser) must not leak
|
|
193
193
|
// through if the same provider previously attempted an apiKey connect.
|
|
194
|
-
client: o ??
|
|
195
|
-
isConnected: o ? !0 :
|
|
194
|
+
client: o ?? f,
|
|
195
|
+
isConnected: o ? !0 : g,
|
|
196
196
|
isLoading: o ? !1 : b,
|
|
197
197
|
error: o ? null : x,
|
|
198
198
|
capabilities: r,
|
|
@@ -200,9 +200,9 @@ const os = ot({
|
|
|
200
200
|
debug: i
|
|
201
201
|
}), [
|
|
202
202
|
d,
|
|
203
|
-
g,
|
|
204
|
-
o,
|
|
205
203
|
f,
|
|
204
|
+
o,
|
|
205
|
+
g,
|
|
206
206
|
b,
|
|
207
207
|
x,
|
|
208
208
|
r,
|
|
@@ -214,8 +214,8 @@ const os = ot({
|
|
|
214
214
|
renderCount: R.current,
|
|
215
215
|
willRenderChat: !!F,
|
|
216
216
|
contextValueReady: !!E
|
|
217
|
-
}), /* @__PURE__ */ s(
|
|
218
|
-
|
|
217
|
+
}), /* @__PURE__ */ s(cs.Provider, { value: E, children: F ? /* @__PURE__ */ s(
|
|
218
|
+
Ys,
|
|
219
219
|
{
|
|
220
220
|
client: F,
|
|
221
221
|
customClasses: {
|
|
@@ -224,9 +224,9 @@ const os = ot({
|
|
|
224
224
|
children: e
|
|
225
225
|
}
|
|
226
226
|
) : e });
|
|
227
|
-
},
|
|
227
|
+
}, ta = () => dt(), ut = (e) => {
|
|
228
228
|
var a, r;
|
|
229
|
-
const [t, n] =
|
|
229
|
+
const [t, n] = B(
|
|
230
230
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
231
231
|
);
|
|
232
232
|
return K(() => {
|
|
@@ -246,14 +246,14 @@ const os = ot({
|
|
|
246
246
|
e.off("member.updated", i);
|
|
247
247
|
};
|
|
248
248
|
}, [e]), t;
|
|
249
|
-
},
|
|
250
|
-
function
|
|
249
|
+
}, sa = "linktree-official", na = "linktree-official-sender";
|
|
250
|
+
function He(e, t, n) {
|
|
251
251
|
const a = Object.values(e || {});
|
|
252
|
-
if (n ===
|
|
252
|
+
if (n === sa) {
|
|
253
253
|
const r = a.find(
|
|
254
254
|
(i) => {
|
|
255
255
|
var o;
|
|
256
|
-
return ((o = i.user) == null ? void 0 : o.id) ===
|
|
256
|
+
return ((o = i.user) == null ? void 0 : o.id) === na;
|
|
257
257
|
}
|
|
258
258
|
);
|
|
259
259
|
if (r) return r;
|
|
@@ -265,18 +265,18 @@ function Ge(e, t, n) {
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
const
|
|
269
|
-
function
|
|
270
|
-
return
|
|
268
|
+
const aa = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
269
|
+
function ra(e) {
|
|
270
|
+
return aa.test(e.trim());
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Wt(e, t) {
|
|
273
273
|
const n = e == null ? void 0 : e.trim();
|
|
274
|
-
return !n || t && n === t ? !1 : !
|
|
274
|
+
return !n || t && n === t ? !1 : !ra(n);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
return
|
|
276
|
+
function mt(e) {
|
|
277
|
+
return Wt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Wt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
278
278
|
}
|
|
279
|
-
const
|
|
279
|
+
const Xt = [
|
|
280
280
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
281
281
|
// Apple
|
|
282
282
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -304,7 +304,7 @@ const Wt = [
|
|
|
304
304
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
305
305
|
// Melon
|
|
306
306
|
];
|
|
307
|
-
function
|
|
307
|
+
function ia(e) {
|
|
308
308
|
let t = 0;
|
|
309
309
|
for (let n = 0; n < e.length; n++) {
|
|
310
310
|
const a = e.charCodeAt(n);
|
|
@@ -312,14 +312,14 @@ function ra(e) {
|
|
|
312
312
|
}
|
|
313
313
|
return Math.abs(t);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
return
|
|
317
|
-
}
|
|
318
|
-
function ia(e) {
|
|
319
|
-
return cs(e).emoji;
|
|
315
|
+
function ds(e) {
|
|
316
|
+
return Xt[ia(e) % Xt.length];
|
|
320
317
|
}
|
|
321
318
|
function la(e) {
|
|
322
|
-
return
|
|
319
|
+
return ds(e).emoji;
|
|
320
|
+
}
|
|
321
|
+
function oa(e) {
|
|
322
|
+
return ds(e).bgColor;
|
|
323
323
|
}
|
|
324
324
|
const ne = ({
|
|
325
325
|
id: e,
|
|
@@ -330,7 +330,7 @@ const ne = ({
|
|
|
330
330
|
shape: i = "squircle",
|
|
331
331
|
dmAgentEnabled: o = !1
|
|
332
332
|
}) => {
|
|
333
|
-
const l =
|
|
333
|
+
const l = la(e), d = oa(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
334
334
|
"img",
|
|
335
335
|
{
|
|
336
336
|
src: t,
|
|
@@ -368,7 +368,7 @@ const ne = ({
|
|
|
368
368
|
{
|
|
369
369
|
"aria-hidden": "true",
|
|
370
370
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
371
|
-
children: /* @__PURE__ */ s(
|
|
371
|
+
children: /* @__PURE__ */ s(Ie, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
372
372
|
}
|
|
373
373
|
),
|
|
374
374
|
/* @__PURE__ */ s(
|
|
@@ -382,7 +382,7 @@ const ne = ({
|
|
|
382
382
|
style: {
|
|
383
383
|
...c,
|
|
384
384
|
...o && {
|
|
385
|
-
borderWidth: `${
|
|
385
|
+
borderWidth: `${g}px`,
|
|
386
386
|
borderStyle: "solid",
|
|
387
387
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
388
388
|
boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
|
|
@@ -394,7 +394,7 @@ const ne = ({
|
|
|
394
394
|
]
|
|
395
395
|
}
|
|
396
396
|
);
|
|
397
|
-
},
|
|
397
|
+
}, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
|
|
398
398
|
channel: e,
|
|
399
399
|
participant: t,
|
|
400
400
|
showBlockParticipant: n = !0,
|
|
@@ -405,10 +405,10 @@ const ne = ({
|
|
|
405
405
|
onBlockParticipantClick: l,
|
|
406
406
|
onReportParticipantClick: d,
|
|
407
407
|
onActionComplete: m,
|
|
408
|
-
logLabel:
|
|
408
|
+
logLabel: f = "useChannelModerationActions"
|
|
409
409
|
}) => {
|
|
410
410
|
var E;
|
|
411
|
-
const { service: h, debug:
|
|
411
|
+
const { service: h, debug: g } = dt(), c = (E = t == null ? void 0 : t.user) == null ? void 0 : E.id, b = !!(a && n && h && c), [v, x] = B(!1), [p, _] = B(null), [w, k] = B(!1), [D, S] = B(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
|
|
412
412
|
return K(() => {
|
|
413
413
|
if (!b || !h || !c) {
|
|
414
414
|
x(!1), _(null);
|
|
@@ -425,27 +425,27 @@ const ne = ({
|
|
|
425
425
|
)
|
|
426
426
|
);
|
|
427
427
|
} catch (T) {
|
|
428
|
-
I || console.error(`[${
|
|
428
|
+
I || console.error(`[${f}] Failed to check blocked status:`, T);
|
|
429
429
|
} finally {
|
|
430
430
|
I || _({ participantId: c, service: h });
|
|
431
431
|
}
|
|
432
432
|
})(), () => {
|
|
433
433
|
I = !0;
|
|
434
434
|
};
|
|
435
|
-
}, [b, h, c,
|
|
435
|
+
}, [b, h, c, f]), {
|
|
436
436
|
isParticipantBlocked: v,
|
|
437
437
|
isCheckingBlockedStatus: R,
|
|
438
438
|
isLeaving: w,
|
|
439
|
-
isUpdatingBlockStatus:
|
|
439
|
+
isUpdatingBlockStatus: D,
|
|
440
440
|
handleLeaveConversation: async () => {
|
|
441
441
|
var I;
|
|
442
442
|
if (!w) {
|
|
443
|
-
o == null || o(),
|
|
443
|
+
o == null || o(), g && console.log(`[${f}] Leave conversation`, e.cid), k(!0);
|
|
444
444
|
try {
|
|
445
445
|
const T = ((I = e._client) == null ? void 0 : I.userID) ?? null;
|
|
446
446
|
await e.hide(T, !1), r && await r(e), m == null || m();
|
|
447
447
|
} catch (T) {
|
|
448
|
-
console.error(`[${
|
|
448
|
+
console.error(`[${f}] Failed to leave conversation`, T);
|
|
449
449
|
} finally {
|
|
450
450
|
k(!1);
|
|
451
451
|
}
|
|
@@ -453,12 +453,12 @@ const ne = ({
|
|
|
453
453
|
},
|
|
454
454
|
handleBlockUser: async () => {
|
|
455
455
|
var I, T, M;
|
|
456
|
-
if (!(
|
|
457
|
-
l == null || l(),
|
|
456
|
+
if (!(D || !h)) {
|
|
457
|
+
l == null || l(), g && console.log(`[${f}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
|
|
458
458
|
try {
|
|
459
459
|
await h.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
|
|
460
460
|
} catch (P) {
|
|
461
|
-
console.error(`[${
|
|
461
|
+
console.error(`[${f}] Failed to block member`, P);
|
|
462
462
|
} finally {
|
|
463
463
|
S(!1);
|
|
464
464
|
}
|
|
@@ -466,22 +466,22 @@ const ne = ({
|
|
|
466
466
|
},
|
|
467
467
|
handleUnblockUser: async () => {
|
|
468
468
|
var I, T, M;
|
|
469
|
-
if (!(
|
|
470
|
-
l == null || l(),
|
|
469
|
+
if (!(D || !h)) {
|
|
470
|
+
l == null || l(), g && console.log(`[${f}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
|
|
471
471
|
try {
|
|
472
472
|
await h.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
|
|
473
473
|
} catch (P) {
|
|
474
|
-
console.error(`[${
|
|
474
|
+
console.error(`[${f}] Failed to unblock member`, P);
|
|
475
475
|
} finally {
|
|
476
476
|
S(!1);
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
handleReportUser: () => {
|
|
481
|
-
d == null || d(), m == null || m(), window.open(
|
|
481
|
+
d == null || d(), m == null || m(), window.open(ca, "_blank", "noopener,noreferrer");
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
|
-
},
|
|
484
|
+
}, ye = ({
|
|
485
485
|
variant: e = "default",
|
|
486
486
|
className: t,
|
|
487
487
|
children: n,
|
|
@@ -498,7 +498,7 @@ const ne = ({
|
|
|
498
498
|
...a,
|
|
499
499
|
children: n
|
|
500
500
|
}
|
|
501
|
-
),
|
|
501
|
+
), it = ({
|
|
502
502
|
channel: e,
|
|
503
503
|
participant: t,
|
|
504
504
|
showDeleteConversation: n = !0,
|
|
@@ -509,23 +509,23 @@ const ne = ({
|
|
|
509
509
|
onDeleteConversationClick: l,
|
|
510
510
|
onBlockParticipantClick: d,
|
|
511
511
|
onReportParticipantClick: m,
|
|
512
|
-
customChannelActions:
|
|
512
|
+
customChannelActions: f,
|
|
513
513
|
triggerClassName: h
|
|
514
514
|
}) => {
|
|
515
|
-
const [
|
|
515
|
+
const [g, c] = B(!1), b = G(null), v = js(), x = J(() => c(!1), []), {
|
|
516
516
|
isParticipantBlocked: p,
|
|
517
517
|
isCheckingBlockedStatus: _,
|
|
518
518
|
isLeaving: w,
|
|
519
519
|
isUpdatingBlockStatus: k,
|
|
520
|
-
handleLeaveConversation:
|
|
520
|
+
handleLeaveConversation: D,
|
|
521
521
|
handleBlockUser: S,
|
|
522
522
|
handleUnblockUser: R,
|
|
523
523
|
handleReportUser: O
|
|
524
|
-
} =
|
|
524
|
+
} = da({
|
|
525
525
|
channel: e,
|
|
526
526
|
participant: t,
|
|
527
527
|
showBlockParticipant: a,
|
|
528
|
-
enabled:
|
|
528
|
+
enabled: g,
|
|
529
529
|
onLeaveConversation: i,
|
|
530
530
|
onBlockParticipant: o,
|
|
531
531
|
onDeleteConversationClick: l,
|
|
@@ -535,32 +535,32 @@ const ne = ({
|
|
|
535
535
|
logLabel: "ChannelActionsMenu"
|
|
536
536
|
});
|
|
537
537
|
return K(() => {
|
|
538
|
-
if (!
|
|
539
|
-
const
|
|
538
|
+
if (!g) return;
|
|
539
|
+
const L = (E) => {
|
|
540
540
|
b.current && !b.current.contains(E.target) && c(!1);
|
|
541
541
|
}, C = (E) => {
|
|
542
542
|
E.key === "Escape" && c(!1);
|
|
543
543
|
};
|
|
544
|
-
return document.addEventListener("mousedown",
|
|
545
|
-
document.removeEventListener("mousedown",
|
|
544
|
+
return document.addEventListener("mousedown", L), document.addEventListener("keydown", C), () => {
|
|
545
|
+
document.removeEventListener("mousedown", L), document.removeEventListener("keydown", C);
|
|
546
546
|
};
|
|
547
|
-
}, [
|
|
547
|
+
}, [g]), !t || !(n || a || r || !!f) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
|
|
548
548
|
/* @__PURE__ */ u(
|
|
549
549
|
"button",
|
|
550
550
|
{
|
|
551
551
|
className: h,
|
|
552
552
|
type: "button",
|
|
553
553
|
"aria-haspopup": "true",
|
|
554
|
-
"aria-expanded":
|
|
555
|
-
"aria-controls":
|
|
556
|
-
onClick: () => c((
|
|
554
|
+
"aria-expanded": g,
|
|
555
|
+
"aria-controls": g ? v : void 0,
|
|
556
|
+
onClick: () => c((L) => !L),
|
|
557
557
|
children: [
|
|
558
|
-
/* @__PURE__ */ s(
|
|
558
|
+
/* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
|
|
559
559
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
560
560
|
]
|
|
561
561
|
}
|
|
562
562
|
),
|
|
563
|
-
|
|
563
|
+
g && /* @__PURE__ */ s(
|
|
564
564
|
"div",
|
|
565
565
|
{
|
|
566
566
|
id: v,
|
|
@@ -571,13 +571,13 @@ const ne = ({
|
|
|
571
571
|
),
|
|
572
572
|
children: /* @__PURE__ */ u("ul", { className: "flex flex-col gap-1", children: [
|
|
573
573
|
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(
|
|
574
|
-
|
|
574
|
+
ye,
|
|
575
575
|
{
|
|
576
|
-
onClick:
|
|
576
|
+
onClick: D,
|
|
577
577
|
disabled: w,
|
|
578
578
|
"aria-busy": w,
|
|
579
579
|
children: [
|
|
580
|
-
w ? /* @__PURE__ */ s(
|
|
580
|
+
w ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(An, { className: "h-5 w-5" }),
|
|
581
581
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
582
582
|
]
|
|
583
583
|
}
|
|
@@ -585,46 +585,46 @@ const ne = ({
|
|
|
585
585
|
a && /* @__PURE__ */ s("li", { children: _ ? (
|
|
586
586
|
// Block status not yet resolved — show a disabled placeholder
|
|
587
587
|
// so a premature click can't act on a stale block state.
|
|
588
|
-
/* @__PURE__ */ u(
|
|
589
|
-
/* @__PURE__ */ s(
|
|
588
|
+
/* @__PURE__ */ u(ye, { disabled: !0, "aria-busy": !0, children: [
|
|
589
|
+
/* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }),
|
|
590
590
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
591
591
|
] })
|
|
592
592
|
) : p ? /* @__PURE__ */ u(
|
|
593
|
-
|
|
593
|
+
ye,
|
|
594
594
|
{
|
|
595
595
|
onClick: R,
|
|
596
596
|
disabled: k,
|
|
597
597
|
"aria-busy": k,
|
|
598
598
|
children: [
|
|
599
|
-
k ? /* @__PURE__ */ s(
|
|
599
|
+
k ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
|
|
600
600
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
601
601
|
]
|
|
602
602
|
}
|
|
603
603
|
) : /* @__PURE__ */ u(
|
|
604
|
-
|
|
604
|
+
ye,
|
|
605
605
|
{
|
|
606
606
|
onClick: S,
|
|
607
607
|
disabled: k,
|
|
608
608
|
"aria-busy": k,
|
|
609
609
|
children: [
|
|
610
|
-
k ? /* @__PURE__ */ s(
|
|
610
|
+
k ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
|
|
611
611
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
612
612
|
]
|
|
613
613
|
}
|
|
614
614
|
) }),
|
|
615
|
-
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(
|
|
616
|
-
/* @__PURE__ */ s(
|
|
615
|
+
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(ye, { variant: "danger", onClick: O, children: [
|
|
616
|
+
/* @__PURE__ */ s(rs, { className: "h-5 w-5" }),
|
|
617
617
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
618
618
|
] }) }),
|
|
619
|
-
|
|
619
|
+
f
|
|
620
620
|
] })
|
|
621
621
|
}
|
|
622
622
|
)
|
|
623
623
|
] });
|
|
624
|
-
},
|
|
624
|
+
}, Ze = "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", ua = "CUSTOMER_PAID", ma = "Replies instantly with AI assistant", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ua, fa = (e) => {
|
|
625
625
|
const t = e;
|
|
626
|
-
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(
|
|
627
|
-
},
|
|
626
|
+
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
|
|
627
|
+
}, ga = ({
|
|
628
628
|
className: e,
|
|
629
629
|
onBack: t,
|
|
630
630
|
showBackButton: n,
|
|
@@ -635,26 +635,26 @@ const ne = ({
|
|
|
635
635
|
showDeleteConversation: l = !0,
|
|
636
636
|
showBlockParticipant: d = !0,
|
|
637
637
|
showReportParticipant: m = !0,
|
|
638
|
-
onDeleteConversationClick:
|
|
638
|
+
onDeleteConversationClick: f,
|
|
639
639
|
onBlockParticipantClick: h,
|
|
640
|
-
onReportParticipantClick:
|
|
640
|
+
onReportParticipantClick: g,
|
|
641
641
|
customChannelActions: c,
|
|
642
642
|
renderChannelActions: b,
|
|
643
643
|
showChannelInfo: v = !0,
|
|
644
644
|
onParticipantNameClick: x
|
|
645
645
|
}) => {
|
|
646
|
-
var F,
|
|
647
|
-
const { channel: p } =
|
|
646
|
+
var F, L, C;
|
|
647
|
+
const { channel: p } = ce(), { client: _ } = fe(), w = V.useMemo(
|
|
648
648
|
() => {
|
|
649
649
|
var E;
|
|
650
|
-
return
|
|
650
|
+
return He(
|
|
651
651
|
(E = p.state) == null ? void 0 : E.members,
|
|
652
652
|
_ == null ? void 0 : _.userID,
|
|
653
653
|
p.type
|
|
654
654
|
);
|
|
655
655
|
},
|
|
656
656
|
[(F = p.state) == null ? void 0 : F.members, _ == null ? void 0 : _.userID, p.type]
|
|
657
|
-
), k =
|
|
657
|
+
), k = mt(w == null ? void 0 : w.user), D = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = ut(p), R = fa(w), O = async () => {
|
|
658
658
|
try {
|
|
659
659
|
S ? await p.unpin() : await p.pin();
|
|
660
660
|
} catch (E) {
|
|
@@ -676,14 +676,14 @@ const ne = ({
|
|
|
676
676
|
"button",
|
|
677
677
|
{
|
|
678
678
|
className: y(
|
|
679
|
-
|
|
679
|
+
Ze,
|
|
680
680
|
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
681
681
|
),
|
|
682
682
|
onClick: t || (() => {
|
|
683
683
|
}),
|
|
684
684
|
type: "button",
|
|
685
685
|
"aria-label": "Back to conversations",
|
|
686
|
-
children: /* @__PURE__ */ s(
|
|
686
|
+
children: /* @__PURE__ */ s(at, { className: "size-5 text-black/90" })
|
|
687
687
|
}
|
|
688
688
|
) }),
|
|
689
689
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ u(
|
|
@@ -699,7 +699,7 @@ const ne = ({
|
|
|
699
699
|
{
|
|
700
700
|
id: ((C = w == null ? void 0 : w.user) == null ? void 0 : C.id) || p.id || "unknown",
|
|
701
701
|
name: k,
|
|
702
|
-
image:
|
|
702
|
+
image: D,
|
|
703
703
|
dmAgentEnabled: r,
|
|
704
704
|
shape: "circle",
|
|
705
705
|
size: 48,
|
|
@@ -715,7 +715,7 @@ const ne = ({
|
|
|
715
715
|
{
|
|
716
716
|
"aria-label": "Paid customer",
|
|
717
717
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
718
|
-
children: /* @__PURE__ */ s(
|
|
718
|
+
children: /* @__PURE__ */ s(Rn, { className: "size-2.5", weight: "bold" })
|
|
719
719
|
}
|
|
720
720
|
),
|
|
721
721
|
a && S && /* @__PURE__ */ s(
|
|
@@ -723,11 +723,11 @@ const ne = ({
|
|
|
723
723
|
{
|
|
724
724
|
"aria-label": "Starred conversation",
|
|
725
725
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
|
|
726
|
-
children: /* @__PURE__ */ s(
|
|
726
|
+
children: /* @__PURE__ */ s(Ie, { className: "size-2.5", weight: "fill" })
|
|
727
727
|
}
|
|
728
728
|
),
|
|
729
729
|
/* @__PURE__ */ s(
|
|
730
|
-
|
|
730
|
+
xe,
|
|
731
731
|
{
|
|
732
732
|
"aria-hidden": "true",
|
|
733
733
|
className: "size-4 shrink-0 text-black/65",
|
|
@@ -737,8 +737,8 @@ const ne = ({
|
|
|
737
737
|
] })
|
|
738
738
|
] }),
|
|
739
739
|
r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
740
|
-
/* @__PURE__ */ s(
|
|
741
|
-
/* @__PURE__ */ s("span", { children:
|
|
740
|
+
/* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
|
|
741
|
+
/* @__PURE__ */ s("span", { children: ma })
|
|
742
742
|
] })
|
|
743
743
|
] })
|
|
744
744
|
]
|
|
@@ -748,13 +748,13 @@ const ne = ({
|
|
|
748
748
|
a && /* @__PURE__ */ s(
|
|
749
749
|
"button",
|
|
750
750
|
{
|
|
751
|
-
className:
|
|
751
|
+
className: Ze,
|
|
752
752
|
onClick: O,
|
|
753
753
|
type: "button",
|
|
754
754
|
"aria-pressed": S,
|
|
755
755
|
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
756
756
|
children: /* @__PURE__ */ s(
|
|
757
|
-
|
|
757
|
+
Ie,
|
|
758
758
|
{
|
|
759
759
|
className: y("size-5", {
|
|
760
760
|
"text-[#FFD60A]": S,
|
|
@@ -766,7 +766,7 @@ const ne = ({
|
|
|
766
766
|
}
|
|
767
767
|
),
|
|
768
768
|
v && (b !== void 0 ? b : /* @__PURE__ */ s(
|
|
769
|
-
|
|
769
|
+
it,
|
|
770
770
|
{
|
|
771
771
|
channel: p,
|
|
772
772
|
participant: w,
|
|
@@ -775,31 +775,31 @@ const ne = ({
|
|
|
775
775
|
showReportParticipant: m,
|
|
776
776
|
onLeaveConversation: i,
|
|
777
777
|
onBlockParticipant: o,
|
|
778
|
-
onDeleteConversationClick:
|
|
778
|
+
onDeleteConversationClick: f,
|
|
779
779
|
onBlockParticipantClick: h,
|
|
780
|
-
onReportParticipantClick:
|
|
780
|
+
onReportParticipantClick: g,
|
|
781
781
|
customChannelActions: c,
|
|
782
|
-
triggerClassName:
|
|
782
|
+
triggerClassName: Ze
|
|
783
783
|
}
|
|
784
784
|
))
|
|
785
785
|
] })
|
|
786
786
|
] })
|
|
787
787
|
}
|
|
788
788
|
);
|
|
789
|
-
},
|
|
790
|
-
function pa(e) {
|
|
791
|
-
return e != null && e.length ? e.some((t) => t.type === lt) ? "down" : e.some((t) => t.type === it) ? "up" : null : null;
|
|
792
|
-
}
|
|
789
|
+
}, pa = (e) => /* @__PURE__ */ s(qs, { ...e, position: "center" }), lt = "vote_up", ot = "vote_down";
|
|
793
790
|
function ba(e) {
|
|
794
|
-
|
|
795
|
-
|
|
791
|
+
return e != null && e.length ? e.some((t) => t.type === ot) ? "down" : e.some((t) => t.type === lt) ? "up" : null : null;
|
|
792
|
+
}
|
|
793
|
+
function va(e) {
|
|
794
|
+
const { channel: t } = ce(), { client: n } = fe("useMessageVote"), a = re(
|
|
795
|
+
() => ba(e.own_reactions),
|
|
796
796
|
[e.own_reactions]
|
|
797
797
|
), r = J(async () => {
|
|
798
798
|
if (n != null && n.userID)
|
|
799
799
|
try {
|
|
800
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
800
|
+
a === "up" ? await t.deleteReaction(e.id, lt) : await t.sendReaction(
|
|
801
801
|
e.id,
|
|
802
|
-
{ type:
|
|
802
|
+
{ type: lt },
|
|
803
803
|
{ enforce_unique: !0, skip_push: !0 }
|
|
804
804
|
);
|
|
805
805
|
} catch {
|
|
@@ -807,9 +807,9 @@ function ba(e) {
|
|
|
807
807
|
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
|
|
808
808
|
if (n != null && n.userID)
|
|
809
809
|
try {
|
|
810
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
810
|
+
a === "down" ? await t.deleteReaction(e.id, ot) : await t.sendReaction(
|
|
811
811
|
e.id,
|
|
812
|
-
{ type:
|
|
812
|
+
{ type: ot },
|
|
813
813
|
{ enforce_unique: !0, skip_push: !0 }
|
|
814
814
|
);
|
|
815
815
|
} catch {
|
|
@@ -817,18 +817,38 @@ function ba(e) {
|
|
|
817
817
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
818
818
|
return { selected: a, voteUp: r, voteDown: i };
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function xa(e) {
|
|
821
821
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function us({
|
|
824
824
|
message: e,
|
|
825
825
|
viewerLanguage: t
|
|
826
826
|
}) {
|
|
827
827
|
var r;
|
|
828
|
-
const n = e == null ? void 0 : e.text, a =
|
|
828
|
+
const n = e == null ? void 0 : e.text, a = xa(t);
|
|
829
829
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
830
830
|
}
|
|
831
|
-
const
|
|
831
|
+
const wa = ["linktr.ee", "cloudfront.net", "cloudinary"], _a = "messaging-attachment-v1_0";
|
|
832
|
+
function Na(e) {
|
|
833
|
+
try {
|
|
834
|
+
return new URL(e).hostname.toLowerCase();
|
|
835
|
+
} catch {
|
|
836
|
+
return null;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
function ya(e) {
|
|
840
|
+
return wa.some((t) => e.includes(t));
|
|
841
|
+
}
|
|
842
|
+
function ie(e) {
|
|
843
|
+
const t = e == null ? void 0 : e.trim();
|
|
844
|
+
if (!t) return;
|
|
845
|
+
const n = Na(t);
|
|
846
|
+
if (!n || !ya(n) || /[?&]io=true(?:&|$)/.test(t) && /[?&]size=/.test(t))
|
|
847
|
+
return t;
|
|
848
|
+
const a = t.includes("?") ? "&" : "?";
|
|
849
|
+
return `${t}${a}io=true&size=${_a}`;
|
|
850
|
+
}
|
|
851
|
+
const ka = [
|
|
832
852
|
[/pdf/, "pdf"],
|
|
833
853
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
834
854
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -838,42 +858,42 @@ const xa = [
|
|
|
838
858
|
[/plain|rtf/, "text"],
|
|
839
859
|
[/markdown/, "markdown"]
|
|
840
860
|
];
|
|
841
|
-
function
|
|
861
|
+
function de(e) {
|
|
842
862
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
843
863
|
}
|
|
844
|
-
function
|
|
845
|
-
const t =
|
|
864
|
+
function ms(e) {
|
|
865
|
+
const t = ka.find(
|
|
846
866
|
([n]) => n.test(e)
|
|
847
867
|
);
|
|
848
868
|
return t ? t[1] : "generic";
|
|
849
869
|
}
|
|
850
|
-
const
|
|
851
|
-
video:
|
|
870
|
+
const Ca = {
|
|
871
|
+
video: ls,
|
|
852
872
|
audio: Dn,
|
|
853
|
-
image:
|
|
854
|
-
document:
|
|
855
|
-
},
|
|
856
|
-
pdf:
|
|
873
|
+
image: Ln,
|
|
874
|
+
document: is
|
|
875
|
+
}, Sa = {
|
|
876
|
+
pdf: jn,
|
|
857
877
|
doc: Bn,
|
|
858
|
-
xls:
|
|
859
|
-
csv:
|
|
860
|
-
ppt:
|
|
861
|
-
zip:
|
|
862
|
-
text:
|
|
863
|
-
markdown:
|
|
864
|
-
generic:
|
|
878
|
+
xls: Un,
|
|
879
|
+
csv: $n,
|
|
880
|
+
ppt: On,
|
|
881
|
+
zip: Pn,
|
|
882
|
+
text: Fn,
|
|
883
|
+
markdown: zn,
|
|
884
|
+
generic: is
|
|
865
885
|
};
|
|
866
|
-
function
|
|
867
|
-
const t =
|
|
868
|
-
return t !== "document" ?
|
|
886
|
+
function Ea(e) {
|
|
887
|
+
const t = de(e);
|
|
888
|
+
return t !== "document" ? Ca[t] : Sa[ms(e)];
|
|
869
889
|
}
|
|
870
|
-
function
|
|
871
|
-
return V.createElement(
|
|
890
|
+
function _e(e, t) {
|
|
891
|
+
return V.createElement(Ea(e), t);
|
|
872
892
|
}
|
|
873
|
-
const
|
|
893
|
+
const Ia = (e) => {
|
|
874
894
|
var t, n;
|
|
875
895
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
|
|
876
|
-
},
|
|
896
|
+
}, Ta = ({
|
|
877
897
|
source: e,
|
|
878
898
|
mimeType: t,
|
|
879
899
|
poster: n,
|
|
@@ -885,15 +905,15 @@ const ya = (e) => {
|
|
|
885
905
|
muted: d = !1,
|
|
886
906
|
onContainerClick: m
|
|
887
907
|
}) => {
|
|
888
|
-
const
|
|
908
|
+
const f = de(t), h = G(null), g = G(null), c = G(null), b = G(r), [v, x] = B(a), [p, _] = B(0), [w, k] = B(!1), [D, S] = B(!1), [R, O] = B(!1), [F, L] = B(!1), [C, E] = B(!0), [I, T] = B(null), M = J(() => {
|
|
889
909
|
O(!1), x(!0);
|
|
890
910
|
}, []), P = J((N) => {
|
|
891
|
-
const A =
|
|
911
|
+
const A = g.current;
|
|
892
912
|
if (!A) return 0;
|
|
893
913
|
const H = A.getBoundingClientRect();
|
|
894
914
|
return Math.max(
|
|
895
915
|
0,
|
|
896
|
-
Math.min(1, (
|
|
916
|
+
Math.min(1, (Ia(N) - H.left) / H.width)
|
|
897
917
|
);
|
|
898
918
|
}, []), $ = J((N) => {
|
|
899
919
|
const A = h.current;
|
|
@@ -956,7 +976,7 @@ const ya = (e) => {
|
|
|
956
976
|
}
|
|
957
977
|
},
|
|
958
978
|
children: [
|
|
959
|
-
n && (
|
|
979
|
+
n && (f === "audio" || C) && /* @__PURE__ */ s(
|
|
960
980
|
"img",
|
|
961
981
|
{
|
|
962
982
|
src: n,
|
|
@@ -964,11 +984,11 @@ const ya = (e) => {
|
|
|
964
984
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
965
985
|
}
|
|
966
986
|
),
|
|
967
|
-
!n && (
|
|
987
|
+
!n && (f === "audio" || C) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: _e(t, {
|
|
968
988
|
className: "size-12 text-black/20",
|
|
969
989
|
weight: "regular"
|
|
970
990
|
}) }),
|
|
971
|
-
/* @__PURE__ */ s("div", { className: "absolute inset-0", children:
|
|
991
|
+
/* @__PURE__ */ s("div", { className: "absolute inset-0", children: f === "audio" ? /* @__PURE__ */ s(
|
|
972
992
|
"audio",
|
|
973
993
|
{
|
|
974
994
|
ref: h,
|
|
@@ -976,11 +996,11 @@ const ya = (e) => {
|
|
|
976
996
|
loop: i,
|
|
977
997
|
muted: d,
|
|
978
998
|
style: { width: "100%", height: "100%" },
|
|
979
|
-
onLoadStart: () =>
|
|
999
|
+
onLoadStart: () => L(!0),
|
|
980
1000
|
onCanPlay: () => {
|
|
981
|
-
|
|
1001
|
+
L(!1), E(!1);
|
|
982
1002
|
},
|
|
983
|
-
onWaiting: () =>
|
|
1003
|
+
onWaiting: () => L(!0),
|
|
984
1004
|
onPlay: () => O(!1),
|
|
985
1005
|
onEnded: () => {
|
|
986
1006
|
i || (x(!1), _(0));
|
|
@@ -996,11 +1016,11 @@ const ya = (e) => {
|
|
|
996
1016
|
muted: d,
|
|
997
1017
|
playsInline: !0,
|
|
998
1018
|
style: { width: "100%", height: "100%" },
|
|
999
|
-
onLoadStart: () =>
|
|
1019
|
+
onLoadStart: () => L(!0),
|
|
1000
1020
|
onCanPlay: () => {
|
|
1001
|
-
|
|
1021
|
+
L(!1), E(!1);
|
|
1002
1022
|
},
|
|
1003
|
-
onWaiting: () =>
|
|
1023
|
+
onWaiting: () => L(!0),
|
|
1004
1024
|
onPlay: () => O(!1),
|
|
1005
1025
|
onLoadedMetadata: () => {
|
|
1006
1026
|
const N = h.current;
|
|
@@ -1013,7 +1033,7 @@ const ya = (e) => {
|
|
|
1013
1033
|
}
|
|
1014
1034
|
) }),
|
|
1015
1035
|
F && !R && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
1016
|
-
|
|
1036
|
+
Se,
|
|
1017
1037
|
{
|
|
1018
1038
|
className: "size-8 animate-spin text-white/80",
|
|
1019
1039
|
weight: "bold"
|
|
@@ -1032,7 +1052,7 @@ const ya = (e) => {
|
|
|
1032
1052
|
onKeyDown: (N) => {
|
|
1033
1053
|
N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), M());
|
|
1034
1054
|
},
|
|
1035
|
-
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(
|
|
1055
|
+
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1036
1056
|
}
|
|
1037
1057
|
),
|
|
1038
1058
|
l && !o && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
|
|
@@ -1044,7 +1064,7 @@ const ya = (e) => {
|
|
|
1044
1064
|
"aria-valuemin": 0,
|
|
1045
1065
|
"aria-valuemax": 100,
|
|
1046
1066
|
tabIndex: 0,
|
|
1047
|
-
ref:
|
|
1067
|
+
ref: g,
|
|
1048
1068
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1049
1069
|
onMouseDown: j,
|
|
1050
1070
|
onTouchStart: j,
|
|
@@ -1071,7 +1091,7 @@ const ya = (e) => {
|
|
|
1071
1091
|
},
|
|
1072
1092
|
className: "shrink-0 text-white",
|
|
1073
1093
|
"aria-label": v ? "Pause" : "Play",
|
|
1074
|
-
children: v ? /* @__PURE__ */ s(
|
|
1094
|
+
children: v ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(rt, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1075
1095
|
}
|
|
1076
1096
|
),
|
|
1077
1097
|
/* @__PURE__ */ u(
|
|
@@ -1083,7 +1103,7 @@ const ya = (e) => {
|
|
|
1083
1103
|
"aria-valuemin": 0,
|
|
1084
1104
|
"aria-valuemax": 100,
|
|
1085
1105
|
tabIndex: 0,
|
|
1086
|
-
ref:
|
|
1106
|
+
ref: g,
|
|
1087
1107
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1088
1108
|
onMouseDown: j,
|
|
1089
1109
|
onTouchStart: j,
|
|
@@ -1097,7 +1117,7 @@ const ya = (e) => {
|
|
|
1097
1117
|
/* @__PURE__ */ s(
|
|
1098
1118
|
"div",
|
|
1099
1119
|
{
|
|
1100
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
1120
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${D || w ? "h-1.5" : "h-1"}`,
|
|
1101
1121
|
children: /* @__PURE__ */ s(
|
|
1102
1122
|
"div",
|
|
1103
1123
|
{
|
|
@@ -1110,7 +1130,7 @@ const ya = (e) => {
|
|
|
1110
1130
|
/* @__PURE__ */ s(
|
|
1111
1131
|
"div",
|
|
1112
1132
|
{
|
|
1113
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
1133
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${D || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1114
1134
|
style: { left: `${X}%` }
|
|
1115
1135
|
}
|
|
1116
1136
|
)
|
|
@@ -1121,7 +1141,7 @@ const ya = (e) => {
|
|
|
1121
1141
|
]
|
|
1122
1142
|
}
|
|
1123
1143
|
);
|
|
1124
|
-
},
|
|
1144
|
+
}, Kt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ma = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", hs = ({
|
|
1125
1145
|
mimeType: e,
|
|
1126
1146
|
sourceUrl: t,
|
|
1127
1147
|
thumbnailUrl: n,
|
|
@@ -1130,20 +1150,20 @@ const ya = (e) => {
|
|
|
1130
1150
|
mediaPlayerProps: i,
|
|
1131
1151
|
containedImage: o = !1
|
|
1132
1152
|
}) => {
|
|
1133
|
-
const l =
|
|
1153
|
+
const l = de(e), [d, m] = B(!1), f = ie(t), h = ie(n);
|
|
1134
1154
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
|
|
1135
|
-
|
|
1155
|
+
Ta,
|
|
1136
1156
|
{
|
|
1137
1157
|
source: t,
|
|
1138
1158
|
mimeType: e,
|
|
1139
|
-
poster:
|
|
1159
|
+
poster: h,
|
|
1140
1160
|
controls: !0,
|
|
1141
1161
|
...i
|
|
1142
1162
|
}
|
|
1143
1163
|
) : t && l === "image" ? o ? /* @__PURE__ */ s("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ s(
|
|
1144
1164
|
"img",
|
|
1145
1165
|
{
|
|
1146
|
-
src: t,
|
|
1166
|
+
src: f ?? t,
|
|
1147
1167
|
alt: a ?? "",
|
|
1148
1168
|
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
|
|
1149
1169
|
draggable: !1,
|
|
@@ -1152,7 +1172,7 @@ const ya = (e) => {
|
|
|
1152
1172
|
) }) : /* @__PURE__ */ s(
|
|
1153
1173
|
"img",
|
|
1154
1174
|
{
|
|
1155
|
-
src: t,
|
|
1175
|
+
src: f ?? t,
|
|
1156
1176
|
alt: a ?? "",
|
|
1157
1177
|
className: "block w-full",
|
|
1158
1178
|
draggable: !1
|
|
@@ -1160,7 +1180,7 @@ const ya = (e) => {
|
|
|
1160
1180
|
) : t && l === "document" ? n ? o ? /* @__PURE__ */ s("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ s(
|
|
1161
1181
|
"img",
|
|
1162
1182
|
{
|
|
1163
|
-
src: n,
|
|
1183
|
+
src: h ?? n,
|
|
1164
1184
|
alt: a ?? "",
|
|
1165
1185
|
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
|
|
1166
1186
|
draggable: !1,
|
|
@@ -1169,7 +1189,7 @@ const ya = (e) => {
|
|
|
1169
1189
|
) }) : /* @__PURE__ */ s(
|
|
1170
1190
|
"img",
|
|
1171
1191
|
{
|
|
1172
|
-
src: n,
|
|
1192
|
+
src: h ?? n,
|
|
1173
1193
|
alt: "",
|
|
1174
1194
|
className: "block w-full",
|
|
1175
1195
|
draggable: !1
|
|
@@ -1178,15 +1198,15 @@ const ya = (e) => {
|
|
|
1178
1198
|
"div",
|
|
1179
1199
|
{
|
|
1180
1200
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1181
|
-
children:
|
|
1182
|
-
className:
|
|
1201
|
+
children: _e(e, {
|
|
1202
|
+
className: Kt(r),
|
|
1183
1203
|
weight: "regular"
|
|
1184
1204
|
})
|
|
1185
1205
|
}
|
|
1186
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1206
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ma(r)}`, children: /* @__PURE__ */ s(
|
|
1187
1207
|
"img",
|
|
1188
1208
|
{
|
|
1189
|
-
src: n,
|
|
1209
|
+
src: h ?? n,
|
|
1190
1210
|
alt: a ?? "",
|
|
1191
1211
|
draggable: !1,
|
|
1192
1212
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
@@ -1195,13 +1215,13 @@ const ya = (e) => {
|
|
|
1195
1215
|
"div",
|
|
1196
1216
|
{
|
|
1197
1217
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1198
|
-
children:
|
|
1199
|
-
className:
|
|
1218
|
+
children: _e(e, {
|
|
1219
|
+
className: Kt(r),
|
|
1200
1220
|
weight: "regular"
|
|
1201
1221
|
})
|
|
1202
1222
|
}
|
|
1203
1223
|
);
|
|
1204
|
-
},
|
|
1224
|
+
}, fs = ({
|
|
1205
1225
|
variant: e,
|
|
1206
1226
|
thumbnail: t,
|
|
1207
1227
|
title: n,
|
|
@@ -1212,18 +1232,18 @@ const ya = (e) => {
|
|
|
1212
1232
|
action: l,
|
|
1213
1233
|
topLeft: d,
|
|
1214
1234
|
topRight: m,
|
|
1215
|
-
rootRef:
|
|
1235
|
+
rootRef: f,
|
|
1216
1236
|
"data-testid": h
|
|
1217
1237
|
}) => {
|
|
1218
|
-
const
|
|
1238
|
+
const g = e === "dark", c = g ? n ?? a : n ?? "", b = g && !n;
|
|
1219
1239
|
return /* @__PURE__ */ u(
|
|
1220
1240
|
"div",
|
|
1221
1241
|
{
|
|
1222
|
-
ref:
|
|
1242
|
+
ref: f,
|
|
1223
1243
|
"data-testid": h,
|
|
1224
1244
|
className: y(
|
|
1225
1245
|
"relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
1226
|
-
|
|
1246
|
+
g ? "bg-[#1e2330]" : "bg-white"
|
|
1227
1247
|
),
|
|
1228
1248
|
children: [
|
|
1229
1249
|
d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
|
|
@@ -1234,18 +1254,18 @@ const ya = (e) => {
|
|
|
1234
1254
|
"p",
|
|
1235
1255
|
{
|
|
1236
1256
|
className: y("mb-0.5 truncate text-base font-medium", {
|
|
1237
|
-
"text-black": !
|
|
1238
|
-
"text-white/30":
|
|
1239
|
-
"text-white":
|
|
1257
|
+
"text-black": !g,
|
|
1258
|
+
"text-white/30": g && b,
|
|
1259
|
+
"text-white": g && !b
|
|
1240
1260
|
}),
|
|
1241
1261
|
children: c
|
|
1242
1262
|
}
|
|
1243
1263
|
),
|
|
1244
1264
|
/* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1245
|
-
|
|
1265
|
+
_e(r, {
|
|
1246
1266
|
className: y(
|
|
1247
1267
|
"size-5 shrink-0",
|
|
1248
|
-
|
|
1268
|
+
g ? "text-white/55" : "text-black/55"
|
|
1249
1269
|
),
|
|
1250
1270
|
weight: "regular"
|
|
1251
1271
|
}),
|
|
@@ -1254,7 +1274,7 @@ const ya = (e) => {
|
|
|
1254
1274
|
{
|
|
1255
1275
|
className: y(
|
|
1256
1276
|
"text-xs font-medium",
|
|
1257
|
-
|
|
1277
|
+
g ? "text-white/55" : "text-black/55"
|
|
1258
1278
|
),
|
|
1259
1279
|
children: i
|
|
1260
1280
|
}
|
|
@@ -1267,59 +1287,59 @@ const ya = (e) => {
|
|
|
1267
1287
|
}
|
|
1268
1288
|
);
|
|
1269
1289
|
};
|
|
1270
|
-
function
|
|
1290
|
+
function gs(e) {
|
|
1271
1291
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1272
1292
|
}
|
|
1273
|
-
function
|
|
1293
|
+
function ht(e) {
|
|
1274
1294
|
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)]`;
|
|
1275
1295
|
}
|
|
1276
|
-
function
|
|
1296
|
+
function Aa(e) {
|
|
1277
1297
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1278
1298
|
}
|
|
1279
|
-
function
|
|
1299
|
+
function Ra(e) {
|
|
1280
1300
|
return e ? "text-white" : "text-black";
|
|
1281
1301
|
}
|
|
1282
|
-
function
|
|
1302
|
+
function La(e) {
|
|
1283
1303
|
return e ? "text-white/55" : "text-black/55";
|
|
1284
1304
|
}
|
|
1285
|
-
function
|
|
1305
|
+
function Da(e) {
|
|
1286
1306
|
return e ? "text-white/40" : "text-black/40";
|
|
1287
1307
|
}
|
|
1288
|
-
function
|
|
1308
|
+
function za(e) {
|
|
1289
1309
|
return e ? "text-white/20" : "text-black/20";
|
|
1290
1310
|
}
|
|
1291
|
-
const
|
|
1311
|
+
const ft = ({ attachment: e, isMyMessage: t }) => {
|
|
1292
1312
|
const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ u(V.Fragment, { children: [
|
|
1293
1313
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1294
1314
|
"img",
|
|
1295
1315
|
{
|
|
1296
|
-
src: r,
|
|
1316
|
+
src: ie(r) ?? r,
|
|
1297
1317
|
alt: n ?? "",
|
|
1298
1318
|
className: "aspect-video w-full rounded-[20px] object-cover"
|
|
1299
1319
|
}
|
|
1300
1320
|
) : /* @__PURE__ */ s(
|
|
1301
1321
|
"div",
|
|
1302
1322
|
{
|
|
1303
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1304
|
-
children: /* @__PURE__ */ s(
|
|
1323
|
+
className: `aspect-video w-full rounded-[20px] ${Aa(t)} flex items-center justify-center`,
|
|
1324
|
+
children: /* @__PURE__ */ s(Gn, { className: `size-12 ${za(t)}` })
|
|
1305
1325
|
}
|
|
1306
1326
|
) }),
|
|
1307
1327
|
/* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
|
|
1308
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1309
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1310
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1328
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Ra(t)}`, children: n }),
|
|
1329
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${La(t)}`, children: a }),
|
|
1330
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Da(t)}`, children: d })
|
|
1311
1331
|
] })
|
|
1312
1332
|
] });
|
|
1313
1333
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
|
|
1314
1334
|
};
|
|
1315
|
-
function
|
|
1335
|
+
function ps(e) {
|
|
1316
1336
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1317
1337
|
}
|
|
1318
|
-
function
|
|
1338
|
+
function gt(e) {
|
|
1319
1339
|
var t;
|
|
1320
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1340
|
+
return (t = e.attachments) == null ? void 0 : t.find(ps);
|
|
1321
1341
|
}
|
|
1322
|
-
async function
|
|
1342
|
+
async function Fa(e, t) {
|
|
1323
1343
|
let n;
|
|
1324
1344
|
try {
|
|
1325
1345
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1331,11 +1351,11 @@ async function Aa(e, t) {
|
|
|
1331
1351
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1332
1352
|
o.href = i, o.download = n, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1333
1353
|
}
|
|
1334
|
-
const
|
|
1354
|
+
const Pa = ({
|
|
1335
1355
|
url: e,
|
|
1336
1356
|
filename: t
|
|
1337
1357
|
}) => {
|
|
1338
|
-
const [n, a] =
|
|
1358
|
+
const [n, a] = B(!1);
|
|
1339
1359
|
return /* @__PURE__ */ s(
|
|
1340
1360
|
"button",
|
|
1341
1361
|
{
|
|
@@ -1343,7 +1363,7 @@ const Ra = ({
|
|
|
1343
1363
|
onClick: (i) => {
|
|
1344
1364
|
i.stopPropagation();
|
|
1345
1365
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1346
|
-
a(!0),
|
|
1366
|
+
a(!0), Fa(e, t).then(() => {
|
|
1347
1367
|
o == null || o.close();
|
|
1348
1368
|
}).catch(() => {
|
|
1349
1369
|
o && (o.location.href = e);
|
|
@@ -1351,18 +1371,18 @@ const Ra = ({
|
|
|
1351
1371
|
},
|
|
1352
1372
|
disabled: n,
|
|
1353
1373
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1354
|
-
children: n ? /* @__PURE__ */ s(
|
|
1355
|
-
/* @__PURE__ */ s(
|
|
1374
|
+
children: n ? /* @__PURE__ */ s(Se, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ u(V.Fragment, { children: [
|
|
1375
|
+
/* @__PURE__ */ s(Ee, { className: "size-4 text-white", weight: "bold" }),
|
|
1356
1376
|
"Download"
|
|
1357
1377
|
] })
|
|
1358
1378
|
}
|
|
1359
1379
|
);
|
|
1360
1380
|
};
|
|
1361
|
-
function
|
|
1362
|
-
var h,
|
|
1381
|
+
function pt(e) {
|
|
1382
|
+
var h, g, c, b;
|
|
1363
1383
|
const t = (h = e.attachments) == null ? void 0 : h.find(
|
|
1364
1384
|
(v) => v.type === "video" && v.asset_url
|
|
1365
|
-
), n = (
|
|
1385
|
+
), n = (g = e.attachments) == null ? void 0 : g.find(
|
|
1366
1386
|
(v) => v.type === "image" && v.image_url
|
|
1367
1387
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1368
1388
|
(v) => v.type === "audio" && v.asset_url
|
|
@@ -1370,25 +1390,25 @@ function gt(e) {
|
|
|
1370
1390
|
(v) => v.type === "file" && v.asset_url
|
|
1371
1391
|
), i = t ?? n ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1372
1392
|
if (!o) return null;
|
|
1373
|
-
const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size,
|
|
1393
|
+
const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, f = t == null ? void 0 : t.thumb_url;
|
|
1374
1394
|
return {
|
|
1375
1395
|
resolvedUrl: o,
|
|
1376
1396
|
resolvedType: l,
|
|
1377
1397
|
title: d,
|
|
1378
1398
|
fileSize: m,
|
|
1379
|
-
thumbnailUrl:
|
|
1399
|
+
thumbnailUrl: f
|
|
1380
1400
|
};
|
|
1381
1401
|
}
|
|
1382
|
-
const
|
|
1402
|
+
const bs = ({
|
|
1383
1403
|
resolvedUrl: e,
|
|
1384
1404
|
resolvedType: t,
|
|
1385
1405
|
title: n,
|
|
1386
1406
|
fileSize: a,
|
|
1387
1407
|
thumbnailUrl: r
|
|
1388
1408
|
}) => {
|
|
1389
|
-
const i = a !== void 0 ?
|
|
1409
|
+
const i = a !== void 0 ? gs(a) : void 0;
|
|
1390
1410
|
return /* @__PURE__ */ s(
|
|
1391
|
-
|
|
1411
|
+
fs,
|
|
1392
1412
|
{
|
|
1393
1413
|
variant: "dark",
|
|
1394
1414
|
title: n,
|
|
@@ -1396,7 +1416,7 @@ const ps = ({
|
|
|
1396
1416
|
mimeType: t,
|
|
1397
1417
|
detail: i,
|
|
1398
1418
|
thumbnail: /* @__PURE__ */ s(
|
|
1399
|
-
|
|
1419
|
+
hs,
|
|
1400
1420
|
{
|
|
1401
1421
|
mimeType: t,
|
|
1402
1422
|
sourceUrl: e,
|
|
@@ -1407,23 +1427,23 @@ const ps = ({
|
|
|
1407
1427
|
)
|
|
1408
1428
|
}
|
|
1409
1429
|
);
|
|
1410
|
-
},
|
|
1430
|
+
}, vs = ({
|
|
1411
1431
|
resolvedUrl: e,
|
|
1412
1432
|
resolvedType: t,
|
|
1413
1433
|
title: n,
|
|
1414
1434
|
fileSize: a,
|
|
1415
1435
|
thumbnailUrl: r
|
|
1416
1436
|
}) => {
|
|
1417
|
-
const i =
|
|
1437
|
+
const i = de(t), o = a !== void 0 ? gs(a) : void 0;
|
|
1418
1438
|
return /* @__PURE__ */ s(
|
|
1419
|
-
|
|
1439
|
+
fs,
|
|
1420
1440
|
{
|
|
1421
1441
|
variant: "light",
|
|
1422
1442
|
title: n,
|
|
1423
1443
|
mimeType: t,
|
|
1424
1444
|
detail: o,
|
|
1425
1445
|
thumbnail: /* @__PURE__ */ s(
|
|
1426
|
-
|
|
1446
|
+
hs,
|
|
1427
1447
|
{
|
|
1428
1448
|
mimeType: t,
|
|
1429
1449
|
sourceUrl: e,
|
|
@@ -1433,14 +1453,14 @@ const ps = ({
|
|
|
1433
1453
|
containedImage: i === "image" || i === "document"
|
|
1434
1454
|
}
|
|
1435
1455
|
),
|
|
1436
|
-
action: /* @__PURE__ */ s(
|
|
1456
|
+
action: /* @__PURE__ */ s(Pa, { url: e, filename: n })
|
|
1437
1457
|
}
|
|
1438
1458
|
);
|
|
1439
|
-
},
|
|
1459
|
+
}, Oa = ({
|
|
1440
1460
|
message: e,
|
|
1441
1461
|
isMyMessage: t = !1
|
|
1442
1462
|
}) => {
|
|
1443
|
-
const n =
|
|
1463
|
+
const n = gt(e), a = pt(e);
|
|
1444
1464
|
return !n && !a ? null : /* @__PURE__ */ u("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
|
|
1445
1465
|
!t && e.user && /* @__PURE__ */ s(
|
|
1446
1466
|
ne,
|
|
@@ -1462,41 +1482,41 @@ const ps = ({
|
|
|
1462
1482
|
className: "str-chat__message-bubble",
|
|
1463
1483
|
"data-attachment-bubble": "true",
|
|
1464
1484
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1465
|
-
children: n ? /* @__PURE__ */ s("div", { className:
|
|
1485
|
+
children: n ? /* @__PURE__ */ s("div", { className: ht(t), children: /* @__PURE__ */ s(ft, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(bs, { ...a }) : /* @__PURE__ */ s(vs, { ...a })
|
|
1466
1486
|
}
|
|
1467
1487
|
) })
|
|
1468
1488
|
}
|
|
1469
1489
|
)
|
|
1470
1490
|
] });
|
|
1471
|
-
},
|
|
1491
|
+
}, $a = ({
|
|
1472
1492
|
message: e
|
|
1473
1493
|
}) => {
|
|
1474
|
-
const t =
|
|
1494
|
+
const t = gt(e);
|
|
1475
1495
|
if (t)
|
|
1476
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1477
|
-
const n =
|
|
1478
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1479
|
-
},
|
|
1496
|
+
return /* @__PURE__ */ s("div", { className: ht(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !0 }) });
|
|
1497
|
+
const n = pt(e);
|
|
1498
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(bs, { ...n }) }) : null;
|
|
1499
|
+
}, Ua = ({
|
|
1480
1500
|
message: e
|
|
1481
1501
|
}) => {
|
|
1482
|
-
const t =
|
|
1502
|
+
const t = gt(e);
|
|
1483
1503
|
if (t)
|
|
1484
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1485
|
-
const n =
|
|
1486
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1487
|
-
},
|
|
1488
|
-
Creator:
|
|
1489
|
-
Visitor:
|
|
1490
|
-
}),
|
|
1504
|
+
return /* @__PURE__ */ s("div", { className: ht(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !1 }) });
|
|
1505
|
+
const n = pt(e);
|
|
1506
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(vs, { ...n }) }) : null;
|
|
1507
|
+
}, fl = Object.assign(Oa, {
|
|
1508
|
+
Creator: $a,
|
|
1509
|
+
Visitor: Ua
|
|
1510
|
+
}), Ba = {
|
|
1491
1511
|
dark: "bg-[#1e2330]",
|
|
1492
1512
|
light: "bg-[#f2f1ef]"
|
|
1493
|
-
},
|
|
1513
|
+
}, ja = {
|
|
1494
1514
|
dark: "text-white",
|
|
1495
1515
|
light: "text-[#000000]"
|
|
1496
|
-
},
|
|
1516
|
+
}, Va = {
|
|
1497
1517
|
dark: "border-white/[0.08]",
|
|
1498
1518
|
light: "border-black/[0.08]"
|
|
1499
|
-
},
|
|
1519
|
+
}, Ga = (e) => e === "dark" ? "sender" : "receiver", Ha = {
|
|
1500
1520
|
sender: {
|
|
1501
1521
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1502
1522
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1509,7 +1529,7 @@ const ps = ({
|
|
|
1509
1529
|
middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
|
|
1510
1530
|
end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
|
|
1511
1531
|
}
|
|
1512
|
-
},
|
|
1532
|
+
}, Me = ({
|
|
1513
1533
|
variant: e,
|
|
1514
1534
|
text: t,
|
|
1515
1535
|
bordered: n = !0,
|
|
@@ -1518,7 +1538,7 @@ const ps = ({
|
|
|
1518
1538
|
children: i,
|
|
1519
1539
|
"data-testid": o
|
|
1520
1540
|
}) => {
|
|
1521
|
-
const l = t != null && t !== "", d =
|
|
1541
|
+
const l = t != null && t !== "", d = Ha[Ga(e)][a];
|
|
1522
1542
|
return /* @__PURE__ */ u(
|
|
1523
1543
|
"div",
|
|
1524
1544
|
{
|
|
@@ -1533,10 +1553,10 @@ const ps = ({
|
|
|
1533
1553
|
// as the surrounding `CustomMessage` text bubbles.
|
|
1534
1554
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
1535
1555
|
d,
|
|
1536
|
-
|
|
1537
|
-
|
|
1556
|
+
Ba[e],
|
|
1557
|
+
ja[e],
|
|
1538
1558
|
n && "border",
|
|
1539
|
-
n &&
|
|
1559
|
+
n && Va[e],
|
|
1540
1560
|
r
|
|
1541
1561
|
),
|
|
1542
1562
|
children: [
|
|
@@ -1561,7 +1581,7 @@ const ps = ({
|
|
|
1561
1581
|
]
|
|
1562
1582
|
}
|
|
1563
1583
|
);
|
|
1564
|
-
},
|
|
1584
|
+
}, Ae = ({
|
|
1565
1585
|
onClick: e,
|
|
1566
1586
|
variant: t = "overlay",
|
|
1567
1587
|
ariaLabel: n = "Dismiss attachment"
|
|
@@ -1577,18 +1597,18 @@ const ps = ({
|
|
|
1577
1597
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
1578
1598
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
1579
1599
|
),
|
|
1580
|
-
children: /* @__PURE__ */ s(
|
|
1600
|
+
children: /* @__PURE__ */ s(Ge, { className: "size-3", weight: "bold" })
|
|
1581
1601
|
}
|
|
1582
|
-
),
|
|
1602
|
+
), Re = (e) => e === "received" ? "light" : "dark", Ya = ({
|
|
1583
1603
|
firstOfGroup: e,
|
|
1584
1604
|
endOfGroup: t,
|
|
1585
1605
|
groupedByUser: n
|
|
1586
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1606
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", qa = ({
|
|
1587
1607
|
src: e,
|
|
1588
1608
|
mimeType: t,
|
|
1589
1609
|
filename: n,
|
|
1590
1610
|
items: a
|
|
1591
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1611
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Wa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
1592
1612
|
/* @__PURE__ */ s(
|
|
1593
1613
|
"audio",
|
|
1594
1614
|
{
|
|
@@ -1600,7 +1620,7 @@ const ps = ({
|
|
|
1600
1620
|
}
|
|
1601
1621
|
),
|
|
1602
1622
|
n ?? null
|
|
1603
|
-
] }),
|
|
1623
|
+
] }), bt = ({
|
|
1604
1624
|
state: e,
|
|
1605
1625
|
src: t,
|
|
1606
1626
|
mimeType: n,
|
|
@@ -1611,41 +1631,41 @@ const ps = ({
|
|
|
1611
1631
|
preload: l,
|
|
1612
1632
|
onDismiss: d
|
|
1613
1633
|
}) => {
|
|
1614
|
-
const m =
|
|
1634
|
+
const m = Re(e), f = e === "composer" && !!d, h = qa({ src: t, mimeType: n, filename: a, items: r });
|
|
1615
1635
|
if (h.length === 0)
|
|
1616
1636
|
return null;
|
|
1617
|
-
const
|
|
1637
|
+
const g = l ?? (h.length > 1 ? "none" : "metadata");
|
|
1618
1638
|
return /* @__PURE__ */ s(
|
|
1619
|
-
|
|
1639
|
+
Me,
|
|
1620
1640
|
{
|
|
1621
1641
|
variant: m,
|
|
1622
1642
|
text: i,
|
|
1623
1643
|
groupPosition: o,
|
|
1624
1644
|
"data-testid": "audio-attachment",
|
|
1625
1645
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ s(
|
|
1626
|
-
|
|
1646
|
+
Wa,
|
|
1627
1647
|
{
|
|
1628
1648
|
item: c,
|
|
1629
|
-
preload:
|
|
1649
|
+
preload: g,
|
|
1630
1650
|
trailingAction: (
|
|
1631
1651
|
// Composer only supports a single attachment, so the
|
|
1632
1652
|
// dismiss control sits on the only player.
|
|
1633
|
-
|
|
1653
|
+
f && b === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
|
|
1634
1654
|
)
|
|
1635
1655
|
},
|
|
1636
1656
|
`${c.src}-${b}`
|
|
1637
1657
|
)) })
|
|
1638
1658
|
}
|
|
1639
1659
|
);
|
|
1640
|
-
},
|
|
1641
|
-
Composer:
|
|
1642
|
-
Sent:
|
|
1643
|
-
Received:
|
|
1660
|
+
}, Xa = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), Ka = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), Za = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), Ja = {
|
|
1661
|
+
Composer: Xa,
|
|
1662
|
+
Sent: Ka,
|
|
1663
|
+
Received: Za
|
|
1644
1664
|
};
|
|
1645
|
-
function
|
|
1665
|
+
function Qa(e) {
|
|
1646
1666
|
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`;
|
|
1647
1667
|
}
|
|
1648
|
-
const
|
|
1668
|
+
const er = {
|
|
1649
1669
|
pdf: "PDF",
|
|
1650
1670
|
doc: "DOC",
|
|
1651
1671
|
xls: "XLS",
|
|
@@ -1655,7 +1675,7 @@ const Xa = {
|
|
|
1655
1675
|
text: "TXT",
|
|
1656
1676
|
markdown: "MD"
|
|
1657
1677
|
};
|
|
1658
|
-
function
|
|
1678
|
+
function tr(e, t) {
|
|
1659
1679
|
if (t) {
|
|
1660
1680
|
const r = t.lastIndexOf(".");
|
|
1661
1681
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1664,8 +1684,8 @@ function Ka(e, t) {
|
|
|
1664
1684
|
}
|
|
1665
1685
|
}
|
|
1666
1686
|
if (!e) return;
|
|
1667
|
-
if (
|
|
1668
|
-
const r =
|
|
1687
|
+
if (de(e) === "document") {
|
|
1688
|
+
const r = ms(e), i = er[r];
|
|
1669
1689
|
if (i) return i;
|
|
1670
1690
|
if (e === "application/octet-stream") return;
|
|
1671
1691
|
}
|
|
@@ -1673,11 +1693,11 @@ function Ka(e, t) {
|
|
|
1673
1693
|
if (!(!a || a === "*"))
|
|
1674
1694
|
return a.toUpperCase();
|
|
1675
1695
|
}
|
|
1676
|
-
function
|
|
1677
|
-
const a =
|
|
1696
|
+
function sr(e, t, n) {
|
|
1697
|
+
const a = tr(e, t), r = typeof n == "number" && n > 0 ? Qa(n) : void 0;
|
|
1678
1698
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1679
1699
|
}
|
|
1680
|
-
function
|
|
1700
|
+
function le(e) {
|
|
1681
1701
|
try {
|
|
1682
1702
|
const n = new URL(e).pathname.split("/").pop();
|
|
1683
1703
|
return n && n.length > 0 ? decodeURIComponent(n) : "download";
|
|
@@ -1685,16 +1705,16 @@ function ie(e) {
|
|
|
1685
1705
|
return "download";
|
|
1686
1706
|
}
|
|
1687
1707
|
}
|
|
1688
|
-
const
|
|
1708
|
+
const nr = {
|
|
1689
1709
|
dark: "text-white/55",
|
|
1690
1710
|
light: "text-black/65"
|
|
1691
|
-
},
|
|
1711
|
+
}, ar = {
|
|
1692
1712
|
dark: "bg-white/10",
|
|
1693
1713
|
light: "bg-black/5"
|
|
1694
|
-
},
|
|
1714
|
+
}, rr = {
|
|
1695
1715
|
dark: "text-white/85",
|
|
1696
1716
|
light: "text-black/85"
|
|
1697
|
-
},
|
|
1717
|
+
}, xs = ({
|
|
1698
1718
|
variant: e,
|
|
1699
1719
|
filename: t,
|
|
1700
1720
|
title: n,
|
|
@@ -1704,16 +1724,16 @@ const Ja = {
|
|
|
1704
1724
|
activateLabel: o,
|
|
1705
1725
|
trailingAction: l
|
|
1706
1726
|
}) => {
|
|
1707
|
-
const d = n ?? t ?? "File", m =
|
|
1727
|
+
const d = n ?? t ?? "File", m = sr(a, t, r), f = /* @__PURE__ */ s(
|
|
1708
1728
|
"div",
|
|
1709
1729
|
{
|
|
1710
1730
|
className: y(
|
|
1711
1731
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1712
|
-
|
|
1732
|
+
ar[e]
|
|
1713
1733
|
),
|
|
1714
1734
|
"aria-hidden": !0,
|
|
1715
|
-
children:
|
|
1716
|
-
className: y("size-6",
|
|
1735
|
+
children: _e(a, {
|
|
1736
|
+
className: y("size-6", rr[e]),
|
|
1717
1737
|
weight: "regular"
|
|
1718
1738
|
})
|
|
1719
1739
|
}
|
|
@@ -1724,12 +1744,12 @@ const Ja = {
|
|
|
1724
1744
|
{
|
|
1725
1745
|
className: y(
|
|
1726
1746
|
"truncate text-xs leading-4",
|
|
1727
|
-
|
|
1747
|
+
nr[e]
|
|
1728
1748
|
),
|
|
1729
1749
|
children: m
|
|
1730
1750
|
}
|
|
1731
1751
|
) : null
|
|
1732
|
-
] }),
|
|
1752
|
+
] }), g = i ? /* @__PURE__ */ u(
|
|
1733
1753
|
"button",
|
|
1734
1754
|
{
|
|
1735
1755
|
type: "button",
|
|
@@ -1740,21 +1760,21 @@ const Ja = {
|
|
|
1740
1760
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
1741
1761
|
),
|
|
1742
1762
|
children: [
|
|
1743
|
-
|
|
1763
|
+
f,
|
|
1744
1764
|
h
|
|
1745
1765
|
]
|
|
1746
1766
|
}
|
|
1747
1767
|
) : /* @__PURE__ */ u(se, { children: [
|
|
1748
|
-
|
|
1768
|
+
f,
|
|
1749
1769
|
h
|
|
1750
1770
|
] });
|
|
1751
1771
|
return /* @__PURE__ */ u("div", { className: "flex items-center gap-3 px-3 py-2", children: [
|
|
1752
|
-
|
|
1772
|
+
g,
|
|
1753
1773
|
l ? /* @__PURE__ */ s("div", { className: "shrink-0", children: l }) : null
|
|
1754
1774
|
] });
|
|
1755
1775
|
};
|
|
1756
|
-
async function
|
|
1757
|
-
const n = t ??
|
|
1776
|
+
async function ws(e, t) {
|
|
1777
|
+
const n = t ?? le(e);
|
|
1758
1778
|
try {
|
|
1759
1779
|
const a = await fetch(e, { mode: "cors" });
|
|
1760
1780
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
@@ -1767,23 +1787,23 @@ async function xs(e, t) {
|
|
|
1767
1787
|
}
|
|
1768
1788
|
}
|
|
1769
1789
|
}
|
|
1770
|
-
const
|
|
1790
|
+
const ir = ({
|
|
1771
1791
|
src: e,
|
|
1772
1792
|
filename: t,
|
|
1773
1793
|
fileSize: n,
|
|
1774
1794
|
mimeType: a,
|
|
1775
1795
|
title: r,
|
|
1776
1796
|
items: i
|
|
1777
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1797
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], lr = ({
|
|
1778
1798
|
variant: e,
|
|
1779
1799
|
item: t,
|
|
1780
1800
|
index: n,
|
|
1781
1801
|
onActivate: a,
|
|
1782
1802
|
trailingAction: r
|
|
1783
1803
|
}) => {
|
|
1784
|
-
const i = t.filename ??
|
|
1804
|
+
const i = t.filename ?? le(t.src);
|
|
1785
1805
|
return /* @__PURE__ */ s(
|
|
1786
|
-
|
|
1806
|
+
xs,
|
|
1787
1807
|
{
|
|
1788
1808
|
variant: e,
|
|
1789
1809
|
filename: i,
|
|
@@ -1795,7 +1815,7 @@ const tr = ({
|
|
|
1795
1815
|
trailingAction: r
|
|
1796
1816
|
}
|
|
1797
1817
|
);
|
|
1798
|
-
},
|
|
1818
|
+
}, vt = ({
|
|
1799
1819
|
state: e,
|
|
1800
1820
|
src: t,
|
|
1801
1821
|
filename: n,
|
|
@@ -1806,9 +1826,9 @@ const tr = ({
|
|
|
1806
1826
|
text: l,
|
|
1807
1827
|
groupPosition: d,
|
|
1808
1828
|
onClick: m,
|
|
1809
|
-
onDismiss:
|
|
1829
|
+
onDismiss: f
|
|
1810
1830
|
}) => {
|
|
1811
|
-
const h =
|
|
1831
|
+
const h = Re(e), g = e === "composer" && !!f, c = ir({
|
|
1812
1832
|
src: t,
|
|
1813
1833
|
filename: n,
|
|
1814
1834
|
fileSize: a,
|
|
@@ -1819,8 +1839,8 @@ const tr = ({
|
|
|
1819
1839
|
if ((m == null ? void 0 : m(x)) === !1) return;
|
|
1820
1840
|
const p = c[x];
|
|
1821
1841
|
if (!p) return;
|
|
1822
|
-
const _ = p.filename ??
|
|
1823
|
-
|
|
1842
|
+
const _ = p.filename ?? le(p.src);
|
|
1843
|
+
ws(p.src, _);
|
|
1824
1844
|
};
|
|
1825
1845
|
if (c.length === 0)
|
|
1826
1846
|
return null;
|
|
@@ -1832,34 +1852,34 @@ const tr = ({
|
|
|
1832
1852
|
h === "dark" ? "text-white/70" : "text-black/70"
|
|
1833
1853
|
),
|
|
1834
1854
|
"aria-hidden": !0,
|
|
1835
|
-
children: /* @__PURE__ */ s(
|
|
1855
|
+
children: /* @__PURE__ */ s(Ee, { className: "size-5", weight: "bold" })
|
|
1836
1856
|
}
|
|
1837
1857
|
);
|
|
1838
1858
|
return /* @__PURE__ */ s(
|
|
1839
|
-
|
|
1859
|
+
Me,
|
|
1840
1860
|
{
|
|
1841
1861
|
variant: h,
|
|
1842
1862
|
text: l,
|
|
1843
1863
|
groupPosition: d,
|
|
1844
1864
|
"data-testid": "file-attachment",
|
|
1845
1865
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((x, p) => /* @__PURE__ */ s(
|
|
1846
|
-
|
|
1866
|
+
lr,
|
|
1847
1867
|
{
|
|
1848
1868
|
variant: h,
|
|
1849
1869
|
item: x,
|
|
1850
1870
|
index: p,
|
|
1851
1871
|
onActivate: b,
|
|
1852
|
-
trailingAction:
|
|
1872
|
+
trailingAction: g && p === 0 ? /* @__PURE__ */ s(Ae, { onClick: f, variant: "inline" }) : v
|
|
1853
1873
|
},
|
|
1854
1874
|
`${x.src}-${p}`
|
|
1855
1875
|
)) })
|
|
1856
1876
|
}
|
|
1857
1877
|
);
|
|
1858
|
-
},
|
|
1859
|
-
Composer:
|
|
1860
|
-
Sent:
|
|
1861
|
-
Received:
|
|
1862
|
-
},
|
|
1878
|
+
}, or = (e) => /* @__PURE__ */ s(vt, { ...e, state: "composer" }), cr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "sent" }), dr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "received" }), ur = {
|
|
1879
|
+
Composer: or,
|
|
1880
|
+
Sent: cr,
|
|
1881
|
+
Received: dr
|
|
1882
|
+
}, xt = ({
|
|
1863
1883
|
onPrev: e,
|
|
1864
1884
|
onNext: t,
|
|
1865
1885
|
prevLabel: n = "Previous",
|
|
@@ -1872,7 +1892,7 @@ const tr = ({
|
|
|
1872
1892
|
onClick: e,
|
|
1873
1893
|
"aria-label": n,
|
|
1874
1894
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1875
|
-
children: /* @__PURE__ */ s(
|
|
1895
|
+
children: /* @__PURE__ */ s(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1876
1896
|
}
|
|
1877
1897
|
),
|
|
1878
1898
|
/* @__PURE__ */ s(
|
|
@@ -1882,10 +1902,10 @@ const tr = ({
|
|
|
1882
1902
|
onClick: t,
|
|
1883
1903
|
"aria-label": a,
|
|
1884
1904
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
1885
|
-
children: /* @__PURE__ */ s(
|
|
1905
|
+
children: /* @__PURE__ */ s(xe, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1886
1906
|
}
|
|
1887
1907
|
)
|
|
1888
|
-
] }),
|
|
1908
|
+
] }), _s = ({
|
|
1889
1909
|
url: e,
|
|
1890
1910
|
filename: t,
|
|
1891
1911
|
variant: n = "pill",
|
|
@@ -1894,15 +1914,15 @@ const tr = ({
|
|
|
1894
1914
|
tone: i = "dark",
|
|
1895
1915
|
onTriggered: o
|
|
1896
1916
|
}) => {
|
|
1897
|
-
const [l, d] =
|
|
1917
|
+
const [l, d] = B(!1), m = J(
|
|
1898
1918
|
(c) => {
|
|
1899
|
-
c.stopPropagation(), !l && (d(!0),
|
|
1919
|
+
c.stopPropagation(), !l && (d(!0), ws(e, t).catch(() => {
|
|
1900
1920
|
}).finally(() => {
|
|
1901
1921
|
d(!1), o == null || o();
|
|
1902
1922
|
}));
|
|
1903
1923
|
},
|
|
1904
1924
|
[l, e, t, o]
|
|
1905
|
-
),
|
|
1925
|
+
), f = r ?? n !== "pill", g = { className: y(
|
|
1906
1926
|
n === "pill" ? "size-4" : "size-5",
|
|
1907
1927
|
"shrink-0"
|
|
1908
1928
|
), weight: "bold" };
|
|
@@ -1921,14 +1941,14 @@ const tr = ({
|
|
|
1921
1941
|
}[i]
|
|
1922
1942
|
),
|
|
1923
1943
|
children: l ? /* @__PURE__ */ s(
|
|
1924
|
-
|
|
1944
|
+
Se,
|
|
1925
1945
|
{
|
|
1926
1946
|
className: "size-4 animate-spin",
|
|
1927
1947
|
weight: "bold",
|
|
1928
1948
|
"aria-hidden": !0
|
|
1929
1949
|
}
|
|
1930
1950
|
) : /* @__PURE__ */ s(
|
|
1931
|
-
|
|
1951
|
+
Ee,
|
|
1932
1952
|
{
|
|
1933
1953
|
className: "size-5 shrink-0",
|
|
1934
1954
|
weight: "bold",
|
|
@@ -1944,7 +1964,7 @@ const tr = ({
|
|
|
1944
1964
|
disabled: l,
|
|
1945
1965
|
"aria-label": a,
|
|
1946
1966
|
className: "mes-media-viewer__action",
|
|
1947
|
-
children: l ? /* @__PURE__ */ s(
|
|
1967
|
+
children: l ? /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ee, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1948
1968
|
}
|
|
1949
1969
|
) : /* @__PURE__ */ u(
|
|
1950
1970
|
"button",
|
|
@@ -1952,34 +1972,34 @@ const tr = ({
|
|
|
1952
1972
|
type: "button",
|
|
1953
1973
|
onClick: m,
|
|
1954
1974
|
disabled: l,
|
|
1955
|
-
"aria-label":
|
|
1975
|
+
"aria-label": f ? a : void 0,
|
|
1956
1976
|
className: y(
|
|
1957
1977
|
"mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
|
|
1958
1978
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
1959
1979
|
),
|
|
1960
1980
|
children: [
|
|
1961
1981
|
l ? /* @__PURE__ */ s(
|
|
1962
|
-
|
|
1982
|
+
Se,
|
|
1963
1983
|
{
|
|
1964
1984
|
className: "size-4 animate-spin",
|
|
1965
1985
|
weight: "bold",
|
|
1966
1986
|
"aria-hidden": !0
|
|
1967
1987
|
}
|
|
1968
|
-
) : /* @__PURE__ */ s(
|
|
1969
|
-
|
|
1988
|
+
) : /* @__PURE__ */ s(Ee, { ...g, "aria-hidden": !0 }),
|
|
1989
|
+
f ? null : a
|
|
1970
1990
|
]
|
|
1971
1991
|
}
|
|
1972
1992
|
);
|
|
1973
|
-
},
|
|
1993
|
+
}, Je = (e, t, n) => Math.min(Math.max(e, t), n), wt = ({
|
|
1974
1994
|
length: e,
|
|
1975
1995
|
initialIndex: t,
|
|
1976
1996
|
open: n
|
|
1977
1997
|
}) => {
|
|
1978
|
-
const a =
|
|
1998
|
+
const a = Je(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
|
|
1979
1999
|
K(() => {
|
|
1980
|
-
n && i(
|
|
2000
|
+
n && i(Je(t, 0, Math.max(e - 1, 0)));
|
|
1981
2001
|
}, [n, t, e]), K(() => {
|
|
1982
|
-
i((d) =>
|
|
2002
|
+
i((d) => Je(d, 0, Math.max(e - 1, 0)));
|
|
1983
2003
|
}, [e]);
|
|
1984
2004
|
const o = J(() => {
|
|
1985
2005
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
@@ -1990,12 +2010,12 @@ const tr = ({
|
|
|
1990
2010
|
if (!n || e <= 1) return;
|
|
1991
2011
|
const d = (m) => {
|
|
1992
2012
|
if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
|
|
1993
|
-
const
|
|
1994
|
-
|
|
2013
|
+
const f = document.activeElement;
|
|
2014
|
+
f && (f.tagName === "VIDEO" || f.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
|
|
1995
2015
|
};
|
|
1996
2016
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1997
2017
|
}, [n, e, o, l]), { index: r, prev: o, next: l };
|
|
1998
|
-
},
|
|
2018
|
+
}, _t = ({
|
|
1999
2019
|
open: e,
|
|
2000
2020
|
onClose: t,
|
|
2001
2021
|
ariaLabel: n,
|
|
@@ -2006,7 +2026,7 @@ const tr = ({
|
|
|
2006
2026
|
}) => {
|
|
2007
2027
|
const l = G(null), d = G(null);
|
|
2008
2028
|
return K(() => {
|
|
2009
|
-
var
|
|
2029
|
+
var g;
|
|
2010
2030
|
const h = l.current;
|
|
2011
2031
|
if (h) {
|
|
2012
2032
|
if (e) {
|
|
@@ -2020,7 +2040,7 @@ const tr = ({
|
|
|
2020
2040
|
else
|
|
2021
2041
|
h.setAttribute("open", "");
|
|
2022
2042
|
const c = typeof document < "u" ? document.activeElement : null;
|
|
2023
|
-
return (
|
|
2043
|
+
return (g = d.current) == null || g.focus(), () => {
|
|
2024
2044
|
if (h.open)
|
|
2025
2045
|
if (typeof h.close == "function")
|
|
2026
2046
|
try {
|
|
@@ -2076,7 +2096,7 @@ const tr = ({
|
|
|
2076
2096
|
onClick: t,
|
|
2077
2097
|
"aria-label": "Close viewer",
|
|
2078
2098
|
className: "mes-media-viewer__action",
|
|
2079
|
-
children: /* @__PURE__ */ s(
|
|
2099
|
+
children: /* @__PURE__ */ s(Ge, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2080
2100
|
}
|
|
2081
2101
|
)
|
|
2082
2102
|
] })
|
|
@@ -2085,29 +2105,29 @@ const tr = ({
|
|
|
2085
2105
|
]
|
|
2086
2106
|
}
|
|
2087
2107
|
);
|
|
2088
|
-
},
|
|
2108
|
+
}, Ns = ({
|
|
2089
2109
|
open: e,
|
|
2090
2110
|
items: t,
|
|
2091
2111
|
initialIndex: n = 0,
|
|
2092
2112
|
onClose: a
|
|
2093
2113
|
}) => {
|
|
2094
|
-
const { index: r, prev: i, next: o } =
|
|
2114
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2095
2115
|
length: t.length,
|
|
2096
2116
|
initialIndex: n,
|
|
2097
2117
|
open: e
|
|
2098
2118
|
}), l = t[r], d = re(
|
|
2099
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
2119
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? le(l.src) : "image"),
|
|
2100
2120
|
[l]
|
|
2101
2121
|
);
|
|
2102
2122
|
return l ? /* @__PURE__ */ u(
|
|
2103
|
-
|
|
2123
|
+
_t,
|
|
2104
2124
|
{
|
|
2105
2125
|
open: e,
|
|
2106
2126
|
onClose: a,
|
|
2107
2127
|
ariaLabel: d,
|
|
2108
2128
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
2109
2129
|
actions: /* @__PURE__ */ s(
|
|
2110
|
-
|
|
2130
|
+
_s,
|
|
2111
2131
|
{
|
|
2112
2132
|
url: l.src,
|
|
2113
2133
|
filename: d,
|
|
@@ -2130,7 +2150,7 @@ const tr = ({
|
|
|
2130
2150
|
`${r}:${l.src}`
|
|
2131
2151
|
),
|
|
2132
2152
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2133
|
-
|
|
2153
|
+
xt,
|
|
2134
2154
|
{
|
|
2135
2155
|
onPrev: i,
|
|
2136
2156
|
onNext: o,
|
|
@@ -2141,7 +2161,7 @@ const tr = ({
|
|
|
2141
2161
|
]
|
|
2142
2162
|
}
|
|
2143
2163
|
) : null;
|
|
2144
|
-
},
|
|
2164
|
+
}, mr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", ys = ({
|
|
2145
2165
|
tiles: e,
|
|
2146
2166
|
onTileActivate: t,
|
|
2147
2167
|
maxVisible: n = 4,
|
|
@@ -2149,8 +2169,8 @@ const tr = ({
|
|
|
2149
2169
|
}) => {
|
|
2150
2170
|
const r = e.length;
|
|
2151
2171
|
if (r === 0) return null;
|
|
2152
|
-
const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m,
|
|
2153
|
-
const h = y(
|
|
2172
|
+
const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, f) => {
|
|
2173
|
+
const h = y(mr, "h-full w-full");
|
|
2154
2174
|
return t ? /* @__PURE__ */ u(
|
|
2155
2175
|
"button",
|
|
2156
2176
|
{
|
|
@@ -2160,13 +2180,13 @@ const tr = ({
|
|
|
2160
2180
|
className: y(h, "cursor-zoom-in"),
|
|
2161
2181
|
children: [
|
|
2162
2182
|
d.content,
|
|
2163
|
-
|
|
2183
|
+
f
|
|
2164
2184
|
]
|
|
2165
2185
|
},
|
|
2166
2186
|
m
|
|
2167
2187
|
) : /* @__PURE__ */ u("div", { className: h, children: [
|
|
2168
2188
|
d.content,
|
|
2169
|
-
|
|
2189
|
+
f
|
|
2170
2190
|
] }, m);
|
|
2171
2191
|
};
|
|
2172
2192
|
return i.length === 1 ? /* @__PURE__ */ s("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
|
|
@@ -2199,11 +2219,11 @@ const tr = ({
|
|
|
2199
2219
|
a
|
|
2200
2220
|
),
|
|
2201
2221
|
children: i.map((d, m) => {
|
|
2202
|
-
const
|
|
2222
|
+
const f = o > 0 && m === i.length - 1;
|
|
2203
2223
|
return l(
|
|
2204
2224
|
d,
|
|
2205
2225
|
m,
|
|
2206
|
-
|
|
2226
|
+
f ? /* @__PURE__ */ u("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
|
|
2207
2227
|
"+",
|
|
2208
2228
|
o
|
|
2209
2229
|
] }) : null
|
|
@@ -2211,20 +2231,20 @@ const tr = ({
|
|
|
2211
2231
|
})
|
|
2212
2232
|
}
|
|
2213
2233
|
);
|
|
2214
|
-
},
|
|
2215
|
-
const [t, n] =
|
|
2234
|
+
}, Le = (e) => {
|
|
2235
|
+
const [t, n] = B(!1), [a, r] = B(0), i = J(
|
|
2216
2236
|
(l) => {
|
|
2217
2237
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), n(!0));
|
|
2218
2238
|
},
|
|
2219
2239
|
[e]
|
|
2220
2240
|
), o = J(() => n(!1), []);
|
|
2221
2241
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
2222
|
-
},
|
|
2242
|
+
}, hr = (e, t, n, a) => ({
|
|
2223
2243
|
ariaLabel: `Open image ${t + 1} of ${n}`,
|
|
2224
2244
|
content: /* @__PURE__ */ s(
|
|
2225
2245
|
"img",
|
|
2226
2246
|
{
|
|
2227
|
-
src: e.src,
|
|
2247
|
+
src: ie(e.src) ?? e.src,
|
|
2228
2248
|
alt: e.alt ?? "",
|
|
2229
2249
|
width: e.width,
|
|
2230
2250
|
height: e.height,
|
|
@@ -2234,16 +2254,16 @@ const tr = ({
|
|
|
2234
2254
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2235
2255
|
}
|
|
2236
2256
|
)
|
|
2237
|
-
}),
|
|
2257
|
+
}), fr = ({
|
|
2238
2258
|
src: e,
|
|
2239
2259
|
alt: t,
|
|
2240
2260
|
items: n
|
|
2241
|
-
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [],
|
|
2261
|
+
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], ks = (e, t) => e.map((n, a) => ({
|
|
2242
2262
|
src: n.src,
|
|
2243
2263
|
alt: n.alt,
|
|
2244
2264
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2245
|
-
})),
|
|
2246
|
-
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } =
|
|
2265
|
+
})), gr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2266
|
+
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Le(
|
|
2247
2267
|
r
|
|
2248
2268
|
);
|
|
2249
2269
|
return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
|
|
@@ -2257,7 +2277,7 @@ const tr = ({
|
|
|
2257
2277
|
children: /* @__PURE__ */ s(
|
|
2258
2278
|
"img",
|
|
2259
2279
|
{
|
|
2260
|
-
src: e,
|
|
2280
|
+
src: ie(e) ?? e,
|
|
2261
2281
|
alt: t ?? "",
|
|
2262
2282
|
draggable: !1,
|
|
2263
2283
|
loading: a,
|
|
@@ -2267,18 +2287,18 @@ const tr = ({
|
|
|
2267
2287
|
)
|
|
2268
2288
|
}
|
|
2269
2289
|
),
|
|
2270
|
-
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(
|
|
2290
|
+
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
|
|
2271
2291
|
/* @__PURE__ */ s(
|
|
2272
|
-
|
|
2292
|
+
Ns,
|
|
2273
2293
|
{
|
|
2274
2294
|
open: o,
|
|
2275
|
-
items:
|
|
2295
|
+
items: ks([{ src: e, alt: t }], n),
|
|
2276
2296
|
initialIndex: l,
|
|
2277
2297
|
onClose: m
|
|
2278
2298
|
}
|
|
2279
2299
|
)
|
|
2280
2300
|
] });
|
|
2281
|
-
},
|
|
2301
|
+
}, Cs = ({
|
|
2282
2302
|
state: e,
|
|
2283
2303
|
src: t,
|
|
2284
2304
|
alt: n,
|
|
@@ -2289,58 +2309,58 @@ const tr = ({
|
|
|
2289
2309
|
loading: l = "lazy",
|
|
2290
2310
|
onClick: d
|
|
2291
2311
|
}) => {
|
|
2292
|
-
const m =
|
|
2312
|
+
const m = fr({ src: t, alt: n, items: r }), f = Re(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Le(
|
|
2293
2313
|
d
|
|
2294
2314
|
);
|
|
2295
2315
|
if (m.length === 0)
|
|
2296
2316
|
return null;
|
|
2297
2317
|
const v = m.map(
|
|
2298
|
-
(x, p) =>
|
|
2318
|
+
(x, p) => hr(x, p, m.length, l)
|
|
2299
2319
|
);
|
|
2300
2320
|
return /* @__PURE__ */ u(
|
|
2301
|
-
|
|
2321
|
+
Me,
|
|
2302
2322
|
{
|
|
2303
|
-
variant:
|
|
2323
|
+
variant: f,
|
|
2304
2324
|
text: i,
|
|
2305
2325
|
groupPosition: o,
|
|
2306
2326
|
"data-testid": "image-attachment",
|
|
2307
2327
|
children: [
|
|
2308
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2328
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(ys, { tiles: v, onTileActivate: c }) }),
|
|
2309
2329
|
/* @__PURE__ */ s(
|
|
2310
|
-
|
|
2330
|
+
Ns,
|
|
2311
2331
|
{
|
|
2312
2332
|
open: h,
|
|
2313
|
-
items:
|
|
2314
|
-
initialIndex:
|
|
2333
|
+
items: ks(m, a),
|
|
2334
|
+
initialIndex: g,
|
|
2315
2335
|
onClose: b
|
|
2316
2336
|
}
|
|
2317
2337
|
)
|
|
2318
2338
|
]
|
|
2319
2339
|
}
|
|
2320
2340
|
);
|
|
2321
|
-
},
|
|
2322
|
-
Composer:
|
|
2323
|
-
Sent:
|
|
2324
|
-
Received:
|
|
2325
|
-
},
|
|
2341
|
+
}, pr = (e) => /* @__PURE__ */ s(gr, { ...e }), br = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "sent" }), vr = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "received" }), xr = {
|
|
2342
|
+
Composer: pr,
|
|
2343
|
+
Sent: br,
|
|
2344
|
+
Received: vr
|
|
2345
|
+
}, wr = ({
|
|
2326
2346
|
open: e,
|
|
2327
2347
|
items: t,
|
|
2328
2348
|
initialIndex: n = 0,
|
|
2329
2349
|
onClose: a
|
|
2330
2350
|
}) => {
|
|
2331
|
-
const { index: r, prev: i, next: o } =
|
|
2351
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2332
2352
|
length: t.length,
|
|
2333
2353
|
initialIndex: n,
|
|
2334
2354
|
open: e
|
|
2335
2355
|
}), l = t[r], d = re(
|
|
2336
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
2356
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? le(l.src) : "document"),
|
|
2337
2357
|
[l]
|
|
2338
2358
|
), m = re(
|
|
2339
|
-
() => l ?
|
|
2359
|
+
() => l ? _r(l.src) : void 0,
|
|
2340
2360
|
[l]
|
|
2341
2361
|
);
|
|
2342
2362
|
return !l || !m ? null : /* @__PURE__ */ u(
|
|
2343
|
-
|
|
2363
|
+
_t,
|
|
2344
2364
|
{
|
|
2345
2365
|
open: e,
|
|
2346
2366
|
onClose: a,
|
|
@@ -2359,7 +2379,7 @@ const tr = ({
|
|
|
2359
2379
|
`${r}:${l.src}`
|
|
2360
2380
|
),
|
|
2361
2381
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2362
|
-
|
|
2382
|
+
xt,
|
|
2363
2383
|
{
|
|
2364
2384
|
onPrev: i,
|
|
2365
2385
|
onNext: o,
|
|
@@ -2370,25 +2390,25 @@ const tr = ({
|
|
|
2370
2390
|
]
|
|
2371
2391
|
}
|
|
2372
2392
|
);
|
|
2373
|
-
},
|
|
2393
|
+
}, _r = (e) => {
|
|
2374
2394
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2375
2395
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2376
|
-
},
|
|
2396
|
+
}, Nr = ({
|
|
2377
2397
|
src: e,
|
|
2378
2398
|
filename: t,
|
|
2379
2399
|
fileSize: n,
|
|
2380
2400
|
title: a,
|
|
2381
2401
|
items: r
|
|
2382
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2402
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], yr = ({
|
|
2383
2403
|
variant: e,
|
|
2384
2404
|
item: t,
|
|
2385
2405
|
index: n,
|
|
2386
2406
|
onActivate: a,
|
|
2387
2407
|
trailingAction: r
|
|
2388
2408
|
}) => {
|
|
2389
|
-
const i = t.filename ??
|
|
2409
|
+
const i = t.filename ?? le(t.src);
|
|
2390
2410
|
return /* @__PURE__ */ s(
|
|
2391
|
-
|
|
2411
|
+
xs,
|
|
2392
2412
|
{
|
|
2393
2413
|
variant: e,
|
|
2394
2414
|
filename: i,
|
|
@@ -2400,7 +2420,7 @@ const tr = ({
|
|
|
2400
2420
|
trailingAction: r
|
|
2401
2421
|
}
|
|
2402
2422
|
);
|
|
2403
|
-
},
|
|
2423
|
+
}, Nt = ({
|
|
2404
2424
|
state: e,
|
|
2405
2425
|
src: t,
|
|
2406
2426
|
filename: n,
|
|
@@ -2412,50 +2432,50 @@ const tr = ({
|
|
|
2412
2432
|
onClick: d,
|
|
2413
2433
|
onDismiss: m
|
|
2414
2434
|
}) => {
|
|
2415
|
-
const
|
|
2435
|
+
const f = Re(e), h = Nr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: v } = Le(
|
|
2416
2436
|
d
|
|
2417
2437
|
), x = e === "composer" && !!m;
|
|
2418
2438
|
if (h.length === 0)
|
|
2419
2439
|
return null;
|
|
2420
2440
|
const p = h.map((_) => ({
|
|
2421
2441
|
src: _.src,
|
|
2422
|
-
filename: _.filename ??
|
|
2442
|
+
filename: _.filename ?? le(_.src)
|
|
2423
2443
|
}));
|
|
2424
2444
|
return /* @__PURE__ */ u(
|
|
2425
|
-
|
|
2445
|
+
Me,
|
|
2426
2446
|
{
|
|
2427
|
-
variant:
|
|
2447
|
+
variant: f,
|
|
2428
2448
|
text: o,
|
|
2429
2449
|
groupPosition: l,
|
|
2430
2450
|
"data-testid": "pdf-attachment",
|
|
2431
2451
|
children: [
|
|
2432
2452
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((_, w) => {
|
|
2433
|
-
const k = _.filename ??
|
|
2434
|
-
|
|
2453
|
+
const k = _.filename ?? le(_.src), D = x && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2454
|
+
_s,
|
|
2435
2455
|
{
|
|
2436
2456
|
url: _.src,
|
|
2437
2457
|
filename: k,
|
|
2438
2458
|
variant: "inline",
|
|
2439
2459
|
label: `Download ${k}`,
|
|
2440
|
-
tone:
|
|
2460
|
+
tone: f
|
|
2441
2461
|
}
|
|
2442
2462
|
);
|
|
2443
2463
|
return /* @__PURE__ */ s(
|
|
2444
|
-
|
|
2464
|
+
yr,
|
|
2445
2465
|
{
|
|
2446
|
-
variant:
|
|
2466
|
+
variant: f,
|
|
2447
2467
|
item: _,
|
|
2448
2468
|
index: w,
|
|
2449
2469
|
onActivate: b,
|
|
2450
|
-
trailingAction:
|
|
2470
|
+
trailingAction: D
|
|
2451
2471
|
},
|
|
2452
2472
|
`${_.src}-${w}`
|
|
2453
2473
|
);
|
|
2454
2474
|
}) }),
|
|
2455
2475
|
/* @__PURE__ */ s(
|
|
2456
|
-
|
|
2476
|
+
wr,
|
|
2457
2477
|
{
|
|
2458
|
-
open:
|
|
2478
|
+
open: g,
|
|
2459
2479
|
items: p,
|
|
2460
2480
|
initialIndex: c,
|
|
2461
2481
|
onClose: v
|
|
@@ -2464,26 +2484,26 @@ const tr = ({
|
|
|
2464
2484
|
]
|
|
2465
2485
|
}
|
|
2466
2486
|
);
|
|
2467
|
-
},
|
|
2468
|
-
Composer:
|
|
2469
|
-
Sent:
|
|
2470
|
-
Received:
|
|
2471
|
-
},
|
|
2487
|
+
}, kr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "received" }), Er = {
|
|
2488
|
+
Composer: kr,
|
|
2489
|
+
Sent: Cr,
|
|
2490
|
+
Received: Sr
|
|
2491
|
+
}, Ss = ({
|
|
2472
2492
|
open: e,
|
|
2473
2493
|
items: t,
|
|
2474
2494
|
initialIndex: n = 0,
|
|
2475
2495
|
onClose: a
|
|
2476
2496
|
}) => {
|
|
2477
|
-
const { index: r, prev: i, next: o } =
|
|
2497
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2478
2498
|
length: t.length,
|
|
2479
2499
|
initialIndex: n,
|
|
2480
2500
|
open: e
|
|
2481
2501
|
}), l = t[r], d = re(
|
|
2482
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
2502
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? le(l.src) : "video"),
|
|
2483
2503
|
[l]
|
|
2484
2504
|
);
|
|
2485
2505
|
return l ? /* @__PURE__ */ u(
|
|
2486
|
-
|
|
2506
|
+
_t,
|
|
2487
2507
|
{
|
|
2488
2508
|
open: e,
|
|
2489
2509
|
onClose: a,
|
|
@@ -2507,7 +2527,7 @@ const tr = ({
|
|
|
2507
2527
|
`${r}:${l.src}`
|
|
2508
2528
|
),
|
|
2509
2529
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2510
|
-
|
|
2530
|
+
xt,
|
|
2511
2531
|
{
|
|
2512
2532
|
onPrev: i,
|
|
2513
2533
|
onNext: o,
|
|
@@ -2518,7 +2538,7 @@ const tr = ({
|
|
|
2518
2538
|
]
|
|
2519
2539
|
}
|
|
2520
2540
|
) : null;
|
|
2521
|
-
},
|
|
2541
|
+
}, Ir = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Es = ({
|
|
2522
2542
|
item: e,
|
|
2523
2543
|
index: t
|
|
2524
2544
|
}) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2533,31 +2553,31 @@ const tr = ({
|
|
|
2533
2553
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2534
2554
|
}
|
|
2535
2555
|
) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
2536
|
-
|
|
2556
|
+
ls,
|
|
2537
2557
|
{
|
|
2538
2558
|
className: "size-16 rounded-md text-white/30",
|
|
2539
2559
|
weight: "regular",
|
|
2540
2560
|
"aria-hidden": !0
|
|
2541
2561
|
}
|
|
2542
2562
|
) }),
|
|
2543
|
-
/* @__PURE__ */ s(
|
|
2544
|
-
] }),
|
|
2563
|
+
/* @__PURE__ */ s(Ir, {})
|
|
2564
|
+
] }), Tr = (e, t, n) => ({
|
|
2545
2565
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2546
|
-
content: /* @__PURE__ */ s(
|
|
2547
|
-
}),
|
|
2566
|
+
content: /* @__PURE__ */ s(Es, { item: e, index: t })
|
|
2567
|
+
}), Mr = ({
|
|
2548
2568
|
src: e,
|
|
2549
2569
|
poster: t,
|
|
2550
2570
|
mimeType: n,
|
|
2551
2571
|
preload: a,
|
|
2552
2572
|
items: r
|
|
2553
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [],
|
|
2573
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Is = (e, t) => e.map((n, a) => ({
|
|
2554
2574
|
src: n.src,
|
|
2555
2575
|
poster: n.poster,
|
|
2556
2576
|
mimeType: n.mimeType,
|
|
2557
2577
|
preload: n.preload,
|
|
2558
2578
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2559
|
-
})),
|
|
2560
|
-
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer:
|
|
2579
|
+
})), Ar = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
2580
|
+
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: f } = Le(
|
|
2561
2581
|
i
|
|
2562
2582
|
);
|
|
2563
2583
|
return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
|
|
@@ -2568,24 +2588,24 @@ const tr = ({
|
|
|
2568
2588
|
onClick: () => m(0),
|
|
2569
2589
|
"aria-label": "Play video",
|
|
2570
2590
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
2571
|
-
children: /* @__PURE__ */ s(
|
|
2591
|
+
children: /* @__PURE__ */ s(Es, { item: { src: e, poster: t, mimeType: n }, index: 0 })
|
|
2572
2592
|
}
|
|
2573
2593
|
),
|
|
2574
|
-
o ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(
|
|
2594
|
+
o ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: o }) }) : null,
|
|
2575
2595
|
/* @__PURE__ */ s(
|
|
2576
|
-
|
|
2596
|
+
Ss,
|
|
2577
2597
|
{
|
|
2578
2598
|
open: l,
|
|
2579
|
-
items:
|
|
2599
|
+
items: Is(
|
|
2580
2600
|
[{ src: e, poster: t, mimeType: n, preload: r }],
|
|
2581
2601
|
a
|
|
2582
2602
|
),
|
|
2583
2603
|
initialIndex: d,
|
|
2584
|
-
onClose:
|
|
2604
|
+
onClose: f
|
|
2585
2605
|
}
|
|
2586
2606
|
)
|
|
2587
2607
|
] });
|
|
2588
|
-
},
|
|
2608
|
+
}, Ts = ({
|
|
2589
2609
|
state: e,
|
|
2590
2610
|
src: t,
|
|
2591
2611
|
poster: n,
|
|
@@ -2597,16 +2617,16 @@ const tr = ({
|
|
|
2597
2617
|
preload: d,
|
|
2598
2618
|
onClick: m
|
|
2599
2619
|
}) => {
|
|
2600
|
-
const
|
|
2620
|
+
const f = Mr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Re(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: v } = Le(
|
|
2601
2621
|
m
|
|
2602
2622
|
);
|
|
2603
|
-
if (
|
|
2623
|
+
if (f.length === 0)
|
|
2604
2624
|
return null;
|
|
2605
|
-
const x =
|
|
2606
|
-
(p, _) =>
|
|
2625
|
+
const x = f.map(
|
|
2626
|
+
(p, _) => Tr(p, _, f.length)
|
|
2607
2627
|
);
|
|
2608
2628
|
return /* @__PURE__ */ u(
|
|
2609
|
-
|
|
2629
|
+
Me,
|
|
2610
2630
|
{
|
|
2611
2631
|
variant: h,
|
|
2612
2632
|
text: o,
|
|
@@ -2614,7 +2634,7 @@ const tr = ({
|
|
|
2614
2634
|
"data-testid": "video-attachment",
|
|
2615
2635
|
children: [
|
|
2616
2636
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2617
|
-
|
|
2637
|
+
ys,
|
|
2618
2638
|
{
|
|
2619
2639
|
tiles: x,
|
|
2620
2640
|
onTileActivate: b,
|
|
@@ -2622,10 +2642,10 @@ const tr = ({
|
|
|
2622
2642
|
}
|
|
2623
2643
|
) }),
|
|
2624
2644
|
/* @__PURE__ */ s(
|
|
2625
|
-
|
|
2645
|
+
Ss,
|
|
2626
2646
|
{
|
|
2627
|
-
open:
|
|
2628
|
-
items:
|
|
2647
|
+
open: g,
|
|
2648
|
+
items: Is(f, r),
|
|
2629
2649
|
initialIndex: c,
|
|
2630
2650
|
onClose: v
|
|
2631
2651
|
}
|
|
@@ -2633,31 +2653,31 @@ const tr = ({
|
|
|
2633
2653
|
]
|
|
2634
2654
|
}
|
|
2635
2655
|
);
|
|
2636
|
-
},
|
|
2637
|
-
Composer:
|
|
2638
|
-
Sent:
|
|
2639
|
-
Received:
|
|
2640
|
-
},
|
|
2641
|
-
Image:
|
|
2642
|
-
Video:
|
|
2643
|
-
Audio:
|
|
2644
|
-
Pdf:
|
|
2645
|
-
File:
|
|
2646
|
-
},
|
|
2656
|
+
}, Rr = (e) => /* @__PURE__ */ s(Ar, { ...e }), Lr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), Dr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), zr = {
|
|
2657
|
+
Composer: Rr,
|
|
2658
|
+
Sent: Lr,
|
|
2659
|
+
Received: Dr
|
|
2660
|
+
}, ke = {
|
|
2661
|
+
Image: xr,
|
|
2662
|
+
Video: zr,
|
|
2663
|
+
Audio: Ja,
|
|
2664
|
+
Pdf: Er,
|
|
2665
|
+
File: ur
|
|
2666
|
+
}, Fr = {
|
|
2647
2667
|
isUnlocking: () => !1
|
|
2648
|
-
},
|
|
2649
|
-
LockedAttachment:
|
|
2650
|
-
},
|
|
2651
|
-
function
|
|
2652
|
-
return
|
|
2668
|
+
}, Pr = {
|
|
2669
|
+
LockedAttachment: Fr
|
|
2670
|
+
}, Ms = ct({}), gl = Ms.Provider;
|
|
2671
|
+
function Or(e) {
|
|
2672
|
+
return Te(Ms)[e] ?? Pr[e];
|
|
2653
2673
|
}
|
|
2654
|
-
const
|
|
2674
|
+
const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import("./Card-Bme-pBSF.js")), Br = () => /* @__PURE__ */ s(
|
|
2655
2675
|
"div",
|
|
2656
2676
|
{
|
|
2657
2677
|
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)]",
|
|
2658
2678
|
"aria-hidden": !0
|
|
2659
2679
|
}
|
|
2660
|
-
),
|
|
2680
|
+
), Pe = (e) => /* @__PURE__ */ s(Vs, { fallback: /* @__PURE__ */ s(Br, {}), children: e.contentType === "text" ? /* @__PURE__ */ s($r, { ...e }) : /* @__PURE__ */ s(Ur, { ...e }) }), jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2661
2681
|
"svg",
|
|
2662
2682
|
{
|
|
2663
2683
|
width: e,
|
|
@@ -2674,43 +2694,43 @@ const Lr = V.lazy(() => import("./Card-qS17qnN0.js")), zr = V.lazy(() => import(
|
|
|
2674
2694
|
}
|
|
2675
2695
|
)
|
|
2676
2696
|
}
|
|
2677
|
-
),
|
|
2697
|
+
), Vr = (e) => {
|
|
2678
2698
|
var t;
|
|
2679
2699
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
2680
|
-
},
|
|
2700
|
+
}, Gr = (e) => {
|
|
2681
2701
|
var t;
|
|
2682
2702
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
2683
|
-
},
|
|
2703
|
+
}, Ue = (e) => {
|
|
2684
2704
|
var t;
|
|
2685
2705
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
2686
|
-
},
|
|
2706
|
+
}, yt = (e) => {
|
|
2687
2707
|
var t;
|
|
2688
2708
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
2689
|
-
},
|
|
2709
|
+
}, Hr = (e) => {
|
|
2690
2710
|
var t;
|
|
2691
|
-
return
|
|
2692
|
-
},
|
|
2711
|
+
return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
2712
|
+
}, Yr = (e) => {
|
|
2693
2713
|
var t;
|
|
2694
|
-
return
|
|
2695
|
-
},
|
|
2714
|
+
return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
2715
|
+
}, As = (e) => Vr(e) || Gr(e), qr = (e) => {
|
|
2696
2716
|
var t;
|
|
2697
|
-
return
|
|
2698
|
-
},
|
|
2717
|
+
return As(e) && !((t = e.text) != null && t.trim());
|
|
2718
|
+
}, Qe = ({
|
|
2699
2719
|
message: e,
|
|
2700
2720
|
standalone: t = !1,
|
|
2701
2721
|
isMyMessage: n = !1,
|
|
2702
2722
|
hasAttachment: a = !1
|
|
2703
2723
|
}) => {
|
|
2704
2724
|
var h;
|
|
2705
|
-
const r =
|
|
2725
|
+
const r = As(e), i = Ue(e);
|
|
2706
2726
|
if (!r && !i)
|
|
2707
2727
|
return null;
|
|
2708
2728
|
if (r) {
|
|
2709
|
-
const
|
|
2710
|
-
if (!
|
|
2711
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${
|
|
2729
|
+
const g = (h = e.metadata) == null ? void 0 : h.amount_text;
|
|
2730
|
+
if (!g) return null;
|
|
2731
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${g} tip` : `Delivered with ${g} tip`;
|
|
2712
2732
|
return /* @__PURE__ */ u("div", { className: c, children: [
|
|
2713
|
-
/* @__PURE__ */ s(
|
|
2733
|
+
/* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
|
|
2714
2734
|
/* @__PURE__ */ s("span", { children: b })
|
|
2715
2735
|
] });
|
|
2716
2736
|
}
|
|
@@ -2718,15 +2738,15 @@ const Lr = V.lazy(() => import("./Card-qS17qnN0.js")), zr = V.lazy(() => import(
|
|
|
2718
2738
|
"message-chatbot-indicator",
|
|
2719
2739
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2720
2740
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2721
|
-
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }),
|
|
2741
|
+
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(jr, { size: o ? 12 : 15 }) });
|
|
2722
2742
|
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(se, { children: [
|
|
2723
2743
|
m,
|
|
2724
|
-
|
|
2744
|
+
f
|
|
2725
2745
|
] }) : /* @__PURE__ */ u(se, { children: [
|
|
2726
|
-
|
|
2746
|
+
f,
|
|
2727
2747
|
m
|
|
2728
2748
|
] }) });
|
|
2729
|
-
},
|
|
2749
|
+
}, Wr = ({
|
|
2730
2750
|
selected: e,
|
|
2731
2751
|
onVoteUp: t,
|
|
2732
2752
|
onVoteDown: n
|
|
@@ -2742,7 +2762,7 @@ const Lr = V.lazy(() => import("./Card-qS17qnN0.js")), zr = V.lazy(() => import(
|
|
|
2742
2762
|
"aria-label": "Good response",
|
|
2743
2763
|
"aria-pressed": e === "up",
|
|
2744
2764
|
"data-tooltip": "Good response",
|
|
2745
|
-
children: /* @__PURE__ */ s(
|
|
2765
|
+
children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
2746
2766
|
}
|
|
2747
2767
|
),
|
|
2748
2768
|
/* @__PURE__ */ s(
|
|
@@ -2756,11 +2776,11 @@ const Lr = V.lazy(() => import("./Card-qS17qnN0.js")), zr = V.lazy(() => import(
|
|
|
2756
2776
|
"aria-label": "Bad response",
|
|
2757
2777
|
"aria-pressed": e === "down",
|
|
2758
2778
|
"data-tooltip": "Bad response",
|
|
2759
|
-
children: /* @__PURE__ */ s(
|
|
2779
|
+
children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2760
2780
|
}
|
|
2761
2781
|
)
|
|
2762
|
-
] }),
|
|
2763
|
-
const { message: e } =
|
|
2782
|
+
] }), et = () => {
|
|
2783
|
+
const { message: e } = Ne("SentMessageDeliveryStatus"), { messages: t } = ce("SentMessageDeliveryStatus"), n = (() => {
|
|
2764
2784
|
if (t)
|
|
2765
2785
|
for (let a = t.length - 1; a >= 0; a -= 1) {
|
|
2766
2786
|
const r = t[a];
|
|
@@ -2769,37 +2789,37 @@ const Lr = V.lazy(() => import("./Card-qS17qnN0.js")), zr = V.lazy(() => import(
|
|
|
2769
2789
|
}
|
|
2770
2790
|
})();
|
|
2771
2791
|
return e.id !== n ? null : /* @__PURE__ */ u(se, { children: [
|
|
2772
|
-
/* @__PURE__ */ s(
|
|
2792
|
+
/* @__PURE__ */ s(Xn, { weight: "bold", "aria-hidden": "true" }),
|
|
2773
2793
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2774
2794
|
] });
|
|
2775
|
-
},
|
|
2776
|
-
|
|
2795
|
+
}, Xr = () => null, Kr = () => /* @__PURE__ */ s(
|
|
2796
|
+
Ws,
|
|
2777
2797
|
{
|
|
2778
|
-
MessageSentStatus:
|
|
2779
|
-
MessageDeliveredStatus:
|
|
2780
|
-
MessageReadStatus:
|
|
2781
|
-
MessageSendingStatus:
|
|
2798
|
+
MessageSentStatus: et,
|
|
2799
|
+
MessageDeliveredStatus: et,
|
|
2800
|
+
MessageReadStatus: et,
|
|
2801
|
+
MessageSendingStatus: Xr
|
|
2782
2802
|
}
|
|
2783
|
-
),
|
|
2784
|
-
function
|
|
2803
|
+
), Zr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2804
|
+
function kt(e) {
|
|
2785
2805
|
if (typeof e != "string") return;
|
|
2786
2806
|
const t = e.trim();
|
|
2787
2807
|
if (t === "") return;
|
|
2788
|
-
const n =
|
|
2808
|
+
const n = Zr.exec(t);
|
|
2789
2809
|
if (n) {
|
|
2790
2810
|
const a = n[1].toLowerCase();
|
|
2791
|
-
return
|
|
2811
|
+
return Jr.has(a) ? t : void 0;
|
|
2792
2812
|
}
|
|
2793
2813
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2794
2814
|
}
|
|
2795
|
-
const
|
|
2815
|
+
const Qr = {
|
|
2796
2816
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2797
2817
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2798
|
-
},
|
|
2818
|
+
}, ei = ({ variant: e, cta: t }) => {
|
|
2799
2819
|
const n = y(
|
|
2800
2820
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2801
|
-
|
|
2802
|
-
), a =
|
|
2821
|
+
Qr[e]
|
|
2822
|
+
), a = kt(t.href);
|
|
2803
2823
|
return a ? /* @__PURE__ */ s(
|
|
2804
2824
|
"a",
|
|
2805
2825
|
{
|
|
@@ -2825,13 +2845,13 @@ const Wr = {
|
|
|
2825
2845
|
children: t.label
|
|
2826
2846
|
}
|
|
2827
2847
|
);
|
|
2828
|
-
},
|
|
2848
|
+
}, ti = {
|
|
2829
2849
|
dark: "text-white",
|
|
2830
2850
|
light: "text-black/90"
|
|
2831
|
-
},
|
|
2851
|
+
}, si = "text-white/30", ni = {
|
|
2832
2852
|
dark: "text-white/55",
|
|
2833
2853
|
light: "text-black/55"
|
|
2834
|
-
},
|
|
2854
|
+
}, Ct = ({
|
|
2835
2855
|
variant: e,
|
|
2836
2856
|
title: t,
|
|
2837
2857
|
placeholderTitle: n,
|
|
@@ -2841,32 +2861,32 @@ const Wr = {
|
|
|
2841
2861
|
cta: o,
|
|
2842
2862
|
trailingAction: l
|
|
2843
2863
|
}) => {
|
|
2844
|
-
const d = e === "dark", m = t ?? (d ? n : void 0) ?? "",
|
|
2845
|
-
if (!
|
|
2864
|
+
const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", f = m.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", b = o != null;
|
|
2865
|
+
if (!f && !h && !c && !b) return null;
|
|
2846
2866
|
const x = y(
|
|
2847
2867
|
"truncate text-base font-medium leading-6",
|
|
2848
|
-
d && !t ?
|
|
2868
|
+
d && !t ? si : ti[e]
|
|
2849
2869
|
), p = y(
|
|
2850
2870
|
"truncate text-xs leading-4",
|
|
2851
|
-
|
|
2871
|
+
ni[e]
|
|
2852
2872
|
);
|
|
2853
2873
|
return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
|
|
2854
2874
|
/* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
|
|
2855
2875
|
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
2856
2876
|
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2857
|
-
|
|
2877
|
+
f && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2858
2878
|
i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
|
|
2859
2879
|
/* @__PURE__ */ s("p", { className: y("min-w-0", x), children: m })
|
|
2860
2880
|
] }),
|
|
2861
2881
|
h && /* @__PURE__ */ s("p", { className: p, children: a })
|
|
2862
2882
|
] }),
|
|
2863
|
-
!b && c && /* @__PURE__ */ s("p", { className: p, children:
|
|
2883
|
+
!b && c && /* @__PURE__ */ s("p", { className: p, children: g })
|
|
2864
2884
|
] }),
|
|
2865
2885
|
l && /* @__PURE__ */ s("div", { className: "shrink-0", children: l })
|
|
2866
2886
|
] }),
|
|
2867
|
-
o && /* @__PURE__ */ s(
|
|
2887
|
+
o && /* @__PURE__ */ s(ei, { variant: e, cta: o })
|
|
2868
2888
|
] });
|
|
2869
|
-
},
|
|
2889
|
+
}, ai = y(
|
|
2870
2890
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2871
2891
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2872
2892
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2884,8 +2904,8 @@ const Wr = {
|
|
|
2884
2904
|
bgClassName: l,
|
|
2885
2905
|
"data-testid": d
|
|
2886
2906
|
}) => {
|
|
2887
|
-
const m = n != null || a != null,
|
|
2888
|
-
|
|
2907
|
+
const m = n != null || a != null, f = y(
|
|
2908
|
+
ai,
|
|
2889
2909
|
l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
|
|
2890
2910
|
// `focus-ring` is a design-system utility from the component-library
|
|
2891
2911
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2901,7 +2921,7 @@ const Wr = {
|
|
|
2901
2921
|
rel: "noopener noreferrer",
|
|
2902
2922
|
onClick: a,
|
|
2903
2923
|
"data-testid": d,
|
|
2904
|
-
className:
|
|
2924
|
+
className: f,
|
|
2905
2925
|
children: [
|
|
2906
2926
|
t,
|
|
2907
2927
|
h
|
|
@@ -2915,7 +2935,7 @@ const Wr = {
|
|
|
2915
2935
|
onClick: a,
|
|
2916
2936
|
"aria-label": r,
|
|
2917
2937
|
"data-testid": d,
|
|
2918
|
-
className: y(
|
|
2938
|
+
className: y(f, "text-left"),
|
|
2919
2939
|
children: [
|
|
2920
2940
|
t,
|
|
2921
2941
|
h
|
|
@@ -2926,24 +2946,24 @@ const Wr = {
|
|
|
2926
2946
|
{
|
|
2927
2947
|
ref: i,
|
|
2928
2948
|
"data-testid": d,
|
|
2929
|
-
className:
|
|
2949
|
+
className: f,
|
|
2930
2950
|
children: [
|
|
2931
2951
|
t,
|
|
2932
2952
|
h
|
|
2933
2953
|
]
|
|
2934
2954
|
}
|
|
2935
2955
|
);
|
|
2936
|
-
},
|
|
2956
|
+
}, ri = {
|
|
2937
2957
|
dark: "bg-white/10",
|
|
2938
2958
|
light: "bg-black/5"
|
|
2939
|
-
},
|
|
2959
|
+
}, ii = {
|
|
2940
2960
|
dark: "size-16 text-white/25",
|
|
2941
2961
|
light: "size-16 text-black/25"
|
|
2942
|
-
},
|
|
2962
|
+
}, Ye = (e, t) => !!t && !!e && de(e) === "audio", St = (e, t) => {
|
|
2943
2963
|
if (!t || !e) return !1;
|
|
2944
|
-
const n =
|
|
2964
|
+
const n = de(e);
|
|
2945
2965
|
return n === "video" || n === "audio";
|
|
2946
|
-
},
|
|
2966
|
+
}, Et = "bg-[#F2F3F4]", je = ({
|
|
2947
2967
|
variant: e,
|
|
2948
2968
|
thumbnailUrl: t,
|
|
2949
2969
|
sourceUrl: n,
|
|
@@ -2952,8 +2972,8 @@ const Wr = {
|
|
|
2952
2972
|
topLeft: i,
|
|
2953
2973
|
topRight: o
|
|
2954
2974
|
}) => {
|
|
2955
|
-
const l =
|
|
2956
|
-
return
|
|
2975
|
+
const l = de(r), d = !!n && l === "video", m = ie(t);
|
|
2976
|
+
return Ye(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
|
|
2957
2977
|
"audio",
|
|
2958
2978
|
{
|
|
2959
2979
|
src: n,
|
|
@@ -2974,7 +2994,7 @@ const Wr = {
|
|
|
2974
2994
|
"video",
|
|
2975
2995
|
{
|
|
2976
2996
|
src: n,
|
|
2977
|
-
poster:
|
|
2997
|
+
poster: m,
|
|
2978
2998
|
controls: !0,
|
|
2979
2999
|
playsInline: !0,
|
|
2980
3000
|
preload: "metadata",
|
|
@@ -2984,7 +3004,7 @@ const Wr = {
|
|
|
2984
3004
|
) : t ? /* @__PURE__ */ s(
|
|
2985
3005
|
"img",
|
|
2986
3006
|
{
|
|
2987
|
-
src: t,
|
|
3007
|
+
src: m ?? t,
|
|
2988
3008
|
alt: a ?? "",
|
|
2989
3009
|
draggable: !1,
|
|
2990
3010
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
@@ -2994,10 +3014,10 @@ const Wr = {
|
|
|
2994
3014
|
{
|
|
2995
3015
|
className: y(
|
|
2996
3016
|
"flex h-full w-full items-center justify-center",
|
|
2997
|
-
|
|
3017
|
+
ri[e]
|
|
2998
3018
|
),
|
|
2999
|
-
children:
|
|
3000
|
-
className:
|
|
3019
|
+
children: _e(r, {
|
|
3020
|
+
className: ii[e],
|
|
3001
3021
|
weight: "regular"
|
|
3002
3022
|
})
|
|
3003
3023
|
}
|
|
@@ -3007,7 +3027,7 @@ const Wr = {
|
|
|
3007
3027
|
]
|
|
3008
3028
|
}
|
|
3009
3029
|
);
|
|
3010
|
-
},
|
|
3030
|
+
}, li = ({
|
|
3011
3031
|
title: e,
|
|
3012
3032
|
placeholderTitle: t,
|
|
3013
3033
|
description: n,
|
|
@@ -3018,17 +3038,17 @@ const Wr = {
|
|
|
3018
3038
|
layout: l = "featured",
|
|
3019
3039
|
appIcon: d,
|
|
3020
3040
|
cta: m,
|
|
3021
|
-
onDismiss:
|
|
3041
|
+
onDismiss: f,
|
|
3022
3042
|
onEditClick: h
|
|
3023
3043
|
}) => {
|
|
3024
|
-
const
|
|
3044
|
+
const g = l === "classic", c = Ye(r, o), b = f ? /* @__PURE__ */ s(
|
|
3025
3045
|
"button",
|
|
3026
3046
|
{
|
|
3027
3047
|
type: "button",
|
|
3028
|
-
onClick:
|
|
3048
|
+
onClick: f,
|
|
3029
3049
|
"aria-label": "Dismiss attachment",
|
|
3030
3050
|
className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
|
|
3031
|
-
children: /* @__PURE__ */ s(
|
|
3051
|
+
children: /* @__PURE__ */ s(Ge, { className: "size-3", weight: "bold" })
|
|
3032
3052
|
}
|
|
3033
3053
|
) : void 0, v = h ? /* @__PURE__ */ s(
|
|
3034
3054
|
"button",
|
|
@@ -3037,12 +3057,12 @@ const Wr = {
|
|
|
3037
3057
|
onClick: h,
|
|
3038
3058
|
"aria-label": "Edit attachment",
|
|
3039
3059
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3040
|
-
children: /* @__PURE__ */ s(
|
|
3060
|
+
children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
|
|
3041
3061
|
}
|
|
3042
3062
|
) : void 0;
|
|
3043
|
-
return c ? /* @__PURE__ */ s(Be, { variant: "dark", bgClassName:
|
|
3063
|
+
return c ? /* @__PURE__ */ s(Be, { variant: "dark", bgClassName: Et, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3044
3064
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3045
|
-
|
|
3065
|
+
je,
|
|
3046
3066
|
{
|
|
3047
3067
|
variant: "dark",
|
|
3048
3068
|
sourceUrl: o,
|
|
@@ -3055,10 +3075,10 @@ const Wr = {
|
|
|
3055
3075
|
Be,
|
|
3056
3076
|
{
|
|
3057
3077
|
variant: "dark",
|
|
3058
|
-
topRight:
|
|
3078
|
+
topRight: g ? b : void 0,
|
|
3059
3079
|
children: [
|
|
3060
|
-
!
|
|
3061
|
-
|
|
3080
|
+
!g && /* @__PURE__ */ s(
|
|
3081
|
+
je,
|
|
3062
3082
|
{
|
|
3063
3083
|
variant: "dark",
|
|
3064
3084
|
thumbnailUrl: i,
|
|
@@ -3069,7 +3089,7 @@ const Wr = {
|
|
|
3069
3089
|
}
|
|
3070
3090
|
),
|
|
3071
3091
|
/* @__PURE__ */ s(
|
|
3072
|
-
|
|
3092
|
+
Ct,
|
|
3073
3093
|
{
|
|
3074
3094
|
variant: "dark",
|
|
3075
3095
|
title: e,
|
|
@@ -3084,7 +3104,7 @@ const Wr = {
|
|
|
3084
3104
|
]
|
|
3085
3105
|
}
|
|
3086
3106
|
);
|
|
3087
|
-
},
|
|
3107
|
+
}, oi = ({
|
|
3088
3108
|
title: e,
|
|
3089
3109
|
description: t,
|
|
3090
3110
|
url: n,
|
|
@@ -3096,7 +3116,7 @@ const Wr = {
|
|
|
3096
3116
|
cta: d,
|
|
3097
3117
|
onClick: m
|
|
3098
3118
|
}) => {
|
|
3099
|
-
const
|
|
3119
|
+
const f = St(a, i), h = kt(n), g = d == null && h != null && !f ? h : void 0, c = d == null && !f ? m : void 0, b = Ye(a, i) ? Et : void 0, v = d && m ? {
|
|
3100
3120
|
...d,
|
|
3101
3121
|
onClick: () => {
|
|
3102
3122
|
var x;
|
|
@@ -3107,14 +3127,14 @@ const Wr = {
|
|
|
3107
3127
|
Be,
|
|
3108
3128
|
{
|
|
3109
3129
|
variant: "light",
|
|
3110
|
-
href:
|
|
3130
|
+
href: g,
|
|
3111
3131
|
onClick: c,
|
|
3112
3132
|
ariaLabel: e ?? "Open attachment preview",
|
|
3113
3133
|
bgClassName: b,
|
|
3114
3134
|
"data-testid": "link-attachment",
|
|
3115
3135
|
children: [
|
|
3116
3136
|
o === "featured" && /* @__PURE__ */ s(
|
|
3117
|
-
|
|
3137
|
+
je,
|
|
3118
3138
|
{
|
|
3119
3139
|
variant: "light",
|
|
3120
3140
|
thumbnailUrl: r,
|
|
@@ -3124,7 +3144,7 @@ const Wr = {
|
|
|
3124
3144
|
}
|
|
3125
3145
|
),
|
|
3126
3146
|
/* @__PURE__ */ s(
|
|
3127
|
-
|
|
3147
|
+
Ct,
|
|
3128
3148
|
{
|
|
3129
3149
|
variant: "light",
|
|
3130
3150
|
title: e,
|
|
@@ -3137,7 +3157,7 @@ const Wr = {
|
|
|
3137
3157
|
]
|
|
3138
3158
|
}
|
|
3139
3159
|
);
|
|
3140
|
-
},
|
|
3160
|
+
}, ci = ({
|
|
3141
3161
|
title: e,
|
|
3142
3162
|
placeholderTitle: t,
|
|
3143
3163
|
description: n,
|
|
@@ -3148,19 +3168,19 @@ const Wr = {
|
|
|
3148
3168
|
layout: l = "featured",
|
|
3149
3169
|
appIcon: d,
|
|
3150
3170
|
cta: m,
|
|
3151
|
-
onClick:
|
|
3171
|
+
onClick: f
|
|
3152
3172
|
}) => {
|
|
3153
|
-
const h =
|
|
3173
|
+
const h = St(r, o), g = kt(a), c = m == null && g != null && !h ? g : void 0, b = m == null && !h && c != null ? f : void 0;
|
|
3154
3174
|
return /* @__PURE__ */ u(
|
|
3155
3175
|
Be,
|
|
3156
3176
|
{
|
|
3157
3177
|
variant: "dark",
|
|
3158
3178
|
href: c,
|
|
3159
3179
|
onClick: b,
|
|
3160
|
-
bgClassName:
|
|
3180
|
+
bgClassName: Ye(r, o) ? Et : void 0,
|
|
3161
3181
|
children: [
|
|
3162
3182
|
l === "featured" && /* @__PURE__ */ s(
|
|
3163
|
-
|
|
3183
|
+
je,
|
|
3164
3184
|
{
|
|
3165
3185
|
variant: "dark",
|
|
3166
3186
|
thumbnailUrl: i,
|
|
@@ -3170,7 +3190,7 @@ const Wr = {
|
|
|
3170
3190
|
}
|
|
3171
3191
|
),
|
|
3172
3192
|
/* @__PURE__ */ s(
|
|
3173
|
-
|
|
3193
|
+
Ct,
|
|
3174
3194
|
{
|
|
3175
3195
|
variant: "dark",
|
|
3176
3196
|
title: e,
|
|
@@ -3184,22 +3204,22 @@ const Wr = {
|
|
|
3184
3204
|
]
|
|
3185
3205
|
}
|
|
3186
3206
|
);
|
|
3187
|
-
},
|
|
3188
|
-
Composer:
|
|
3189
|
-
Sent:
|
|
3190
|
-
Received:
|
|
3207
|
+
}, Zt = {
|
|
3208
|
+
Composer: li,
|
|
3209
|
+
Sent: ci,
|
|
3210
|
+
Received: oi
|
|
3191
3211
|
};
|
|
3192
3212
|
function z(e) {
|
|
3193
3213
|
const t = e == null ? void 0 : e.trim();
|
|
3194
3214
|
return t || void 0;
|
|
3195
3215
|
}
|
|
3196
|
-
function
|
|
3216
|
+
function Jt(e) {
|
|
3197
3217
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3198
3218
|
}
|
|
3199
|
-
function
|
|
3219
|
+
function di(e, t) {
|
|
3200
3220
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3201
3221
|
return !1;
|
|
3202
|
-
const n =
|
|
3222
|
+
const n = Jt(e), a = Jt(t);
|
|
3203
3223
|
if (n === a)
|
|
3204
3224
|
return !0;
|
|
3205
3225
|
if (!n.includes(a))
|
|
@@ -3207,29 +3227,29 @@ function ri(e, t) {
|
|
|
3207
3227
|
const r = n.split(a).join("");
|
|
3208
3228
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3209
3229
|
}
|
|
3210
|
-
function
|
|
3230
|
+
function Qt(e) {
|
|
3211
3231
|
const t = z(e.og_scrape_url) ?? z(e.title_link), n = z(e.image_url) ?? z(e.thumb_url), a = z(e.asset_url), r = z(e.mime_type);
|
|
3212
3232
|
return {
|
|
3213
3233
|
title: z(e.title),
|
|
3214
3234
|
description: z(e.text),
|
|
3215
3235
|
url: t,
|
|
3216
|
-
thumbnailUrl: n,
|
|
3236
|
+
thumbnailUrl: ie(n),
|
|
3217
3237
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3218
3238
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3219
3239
|
sourceUrl: a,
|
|
3220
|
-
layout: n ||
|
|
3240
|
+
layout: n || St(r, a) ? "featured" : "classic",
|
|
3221
3241
|
mimeType: r
|
|
3222
3242
|
};
|
|
3223
3243
|
}
|
|
3224
|
-
function
|
|
3244
|
+
function ui(e) {
|
|
3225
3245
|
var t;
|
|
3226
|
-
return
|
|
3246
|
+
return Rs(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;
|
|
3227
3247
|
}
|
|
3228
|
-
function
|
|
3248
|
+
function Rs(e) {
|
|
3229
3249
|
const t = z(e.og_scrape_url);
|
|
3230
3250
|
return e.type === "link" || !!t && !e.asset_url;
|
|
3231
3251
|
}
|
|
3232
|
-
function
|
|
3252
|
+
function Ls(e) {
|
|
3233
3253
|
if (!(e != null && e.length)) return [];
|
|
3234
3254
|
const t = [], n = (r, i) => {
|
|
3235
3255
|
const o = t[t.length - 1];
|
|
@@ -3247,45 +3267,47 @@ function Rs(e) {
|
|
|
3247
3267
|
t.push({ type: "link", attachments: [r] });
|
|
3248
3268
|
};
|
|
3249
3269
|
for (const r of e) {
|
|
3250
|
-
if (
|
|
3270
|
+
if (Rs(r)) {
|
|
3251
3271
|
a(r);
|
|
3252
3272
|
continue;
|
|
3253
3273
|
}
|
|
3254
|
-
const i =
|
|
3274
|
+
const i = ui(r);
|
|
3255
3275
|
i && n(i, r);
|
|
3256
3276
|
}
|
|
3257
3277
|
return t;
|
|
3258
3278
|
}
|
|
3259
|
-
function
|
|
3279
|
+
function mi(e) {
|
|
3260
3280
|
return e.filter((t) => t.type === "media").length;
|
|
3261
3281
|
}
|
|
3262
|
-
function
|
|
3282
|
+
function hi(e, t, n) {
|
|
3263
3283
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3264
3284
|
}
|
|
3265
|
-
function
|
|
3266
|
-
return
|
|
3285
|
+
function es(e) {
|
|
3286
|
+
return ie(
|
|
3287
|
+
z(e.image_url)
|
|
3288
|
+
) ?? ie(z(e.asset_url)) ?? "";
|
|
3267
3289
|
}
|
|
3268
|
-
function
|
|
3290
|
+
function fi(e) {
|
|
3269
3291
|
switch (e) {
|
|
3270
3292
|
case "image":
|
|
3271
|
-
return
|
|
3293
|
+
return ke.Image;
|
|
3272
3294
|
case "video":
|
|
3273
|
-
return
|
|
3295
|
+
return ke.Video;
|
|
3274
3296
|
case "audio":
|
|
3275
|
-
return
|
|
3297
|
+
return ke.Audio;
|
|
3276
3298
|
case "pdf":
|
|
3277
|
-
return
|
|
3299
|
+
return ke.Pdf;
|
|
3278
3300
|
default:
|
|
3279
|
-
return
|
|
3301
|
+
return ke.File;
|
|
3280
3302
|
}
|
|
3281
3303
|
}
|
|
3282
|
-
function
|
|
3304
|
+
function gi(e, t) {
|
|
3283
3305
|
if (t.length > 1)
|
|
3284
3306
|
switch (e) {
|
|
3285
3307
|
case "image":
|
|
3286
3308
|
return {
|
|
3287
3309
|
items: t.map((a) => ({
|
|
3288
|
-
src:
|
|
3310
|
+
src: es(a),
|
|
3289
3311
|
alt: z(a.title)
|
|
3290
3312
|
}))
|
|
3291
3313
|
};
|
|
@@ -3336,7 +3358,7 @@ function di(e, t) {
|
|
|
3336
3358
|
switch (e) {
|
|
3337
3359
|
case "image":
|
|
3338
3360
|
return {
|
|
3339
|
-
src:
|
|
3361
|
+
src: es(n),
|
|
3340
3362
|
alt: z(n.title)
|
|
3341
3363
|
};
|
|
3342
3364
|
case "video":
|
|
@@ -3366,42 +3388,42 @@ function di(e, t) {
|
|
|
3366
3388
|
};
|
|
3367
3389
|
}
|
|
3368
3390
|
}
|
|
3369
|
-
function
|
|
3391
|
+
function pi({
|
|
3370
3392
|
groupPosition: e,
|
|
3371
3393
|
isMyMessage: t,
|
|
3372
3394
|
segment: n
|
|
3373
3395
|
}) {
|
|
3374
|
-
const a =
|
|
3375
|
-
...
|
|
3396
|
+
const a = fi(n.kind), r = {
|
|
3397
|
+
...gi(n.kind, n.attachments),
|
|
3376
3398
|
groupPosition: e
|
|
3377
3399
|
};
|
|
3378
3400
|
return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
|
|
3379
3401
|
}
|
|
3380
|
-
const
|
|
3402
|
+
const bi = ({
|
|
3381
3403
|
groupPosition: e,
|
|
3382
3404
|
isMyMessage: t,
|
|
3383
3405
|
message: n,
|
|
3384
3406
|
renderText: a
|
|
3385
3407
|
}) => {
|
|
3386
3408
|
var b;
|
|
3387
|
-
const r =
|
|
3409
|
+
const r = Ls(n.attachments);
|
|
3388
3410
|
if (r.length === 0) return null;
|
|
3389
|
-
const i =
|
|
3390
|
-
let
|
|
3391
|
-
const h = [],
|
|
3392
|
-
const p = t ?
|
|
3411
|
+
const i = mi(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? Qt(l.attachments[0] ?? {}).url : void 0, m = o && di(o, d) ? void 0 : o;
|
|
3412
|
+
let f = 0;
|
|
3413
|
+
const h = [], g = (v, x) => {
|
|
3414
|
+
const p = t ? Zt.Sent : Zt.Received;
|
|
3393
3415
|
h.push(
|
|
3394
|
-
/* @__PURE__ */ s(p, { ...
|
|
3416
|
+
/* @__PURE__ */ s(p, { ...Qt(v) }, x)
|
|
3395
3417
|
);
|
|
3396
3418
|
}, c = (v, x) => {
|
|
3397
|
-
const p =
|
|
3398
|
-
|
|
3419
|
+
const p = hi(
|
|
3420
|
+
f,
|
|
3399
3421
|
i,
|
|
3400
3422
|
e
|
|
3401
3423
|
);
|
|
3402
|
-
|
|
3424
|
+
f += 1, h.push(
|
|
3403
3425
|
/* @__PURE__ */ s(
|
|
3404
|
-
|
|
3426
|
+
pi,
|
|
3405
3427
|
{
|
|
3406
3428
|
groupPosition: p,
|
|
3407
3429
|
isMyMessage: t,
|
|
@@ -3414,7 +3436,7 @@ const mi = ({
|
|
|
3414
3436
|
return r.forEach((v, x) => {
|
|
3415
3437
|
if (v.type === "link") {
|
|
3416
3438
|
v.attachments.forEach((p, _) => {
|
|
3417
|
-
|
|
3439
|
+
g(p, `link-${x}-${_}`);
|
|
3418
3440
|
});
|
|
3419
3441
|
return;
|
|
3420
3442
|
}
|
|
@@ -3433,23 +3455,23 @@ const mi = ({
|
|
|
3433
3455
|
},
|
|
3434
3456
|
children: [
|
|
3435
3457
|
h,
|
|
3436
|
-
!m && /* @__PURE__ */ s(
|
|
3458
|
+
!m && /* @__PURE__ */ s(nt, {})
|
|
3437
3459
|
]
|
|
3438
3460
|
}
|
|
3439
3461
|
),
|
|
3440
3462
|
m ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
|
|
3441
3463
|
/* @__PURE__ */ s(
|
|
3442
|
-
|
|
3464
|
+
$e,
|
|
3443
3465
|
{
|
|
3444
3466
|
message: n,
|
|
3445
3467
|
renderText: a
|
|
3446
3468
|
}
|
|
3447
3469
|
),
|
|
3448
|
-
/* @__PURE__ */ s(
|
|
3470
|
+
/* @__PURE__ */ s(nt, {})
|
|
3449
3471
|
] }) : null
|
|
3450
3472
|
] });
|
|
3451
|
-
},
|
|
3452
|
-
var Dt,
|
|
3473
|
+
}, vi = (e) => {
|
|
3474
|
+
var Dt, zt, Ft, Pt, Ot, $t, Ut, Bt, jt, Vt;
|
|
3453
3475
|
const {
|
|
3454
3476
|
additionalMessageInputProps: t,
|
|
3455
3477
|
chatbotVotingEnabled: n,
|
|
@@ -3460,57 +3482,57 @@ const mi = ({
|
|
|
3460
3482
|
handleAction: l,
|
|
3461
3483
|
handleOpenThread: d,
|
|
3462
3484
|
handleRetry: m,
|
|
3463
|
-
highlighted:
|
|
3485
|
+
highlighted: f,
|
|
3464
3486
|
isMessageAIGenerated: h,
|
|
3465
|
-
isMyMessage:
|
|
3487
|
+
isMyMessage: g,
|
|
3466
3488
|
message: c,
|
|
3467
3489
|
renderText: b,
|
|
3468
3490
|
threadList: v,
|
|
3469
3491
|
viewerLanguage: x
|
|
3470
|
-
} = e, { client: p } =
|
|
3471
|
-
Attachment: I =
|
|
3472
|
-
EditMessageModal: T =
|
|
3492
|
+
} = e, { client: p } = fe("CustomMessage"), { channel: _ } = ce("CustomMessage"), { isUnlocking: w, onUnlockClick: k, onFetchSource: D, onDownloadClick: S } = Or("LockedAttachment"), [R, O] = B(!1), F = Ks(c.id), { selected: L, voteUp: C, voteDown: E } = va(c), {
|
|
3493
|
+
Attachment: I = Zs,
|
|
3494
|
+
EditMessageModal: T = Js,
|
|
3473
3495
|
MessageActions: M,
|
|
3474
|
-
MessageBlocked: P =
|
|
3475
|
-
MessageBouncePrompt: $ =
|
|
3476
|
-
MessageDeleted: j =
|
|
3477
|
-
MessageIsThreadReplyInChannelButtonIndicator: Q =
|
|
3478
|
-
MessageRepliesCountButton: ee =
|
|
3479
|
-
ReminderNotification: X =
|
|
3480
|
-
StreamedMessageText: N =
|
|
3496
|
+
MessageBlocked: P = Qs,
|
|
3497
|
+
MessageBouncePrompt: $ = en,
|
|
3498
|
+
MessageDeleted: j = tn,
|
|
3499
|
+
MessageIsThreadReplyInChannelButtonIndicator: Q = sn,
|
|
3500
|
+
MessageRepliesCountButton: ee = nn,
|
|
3501
|
+
ReminderNotification: X = an,
|
|
3502
|
+
StreamedMessageText: N = rn,
|
|
3481
3503
|
PinIndicator: A
|
|
3482
|
-
} =
|
|
3504
|
+
} = as("CustomMessage"), H = ln(c), q = on(c), Y = re(
|
|
3483
3505
|
() => h == null ? void 0 : h(c),
|
|
3484
3506
|
[h, c]
|
|
3485
|
-
),
|
|
3486
|
-
const
|
|
3487
|
-
if (
|
|
3488
|
-
const
|
|
3489
|
-
return
|
|
3507
|
+
), U = re(() => {
|
|
3508
|
+
const he = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...he] : he;
|
|
3509
|
+
if (!Ue(c)) return be;
|
|
3510
|
+
const Gt = be.filter((Ht) => !("type" in Ht) || !ps(Ht));
|
|
3511
|
+
return Gt.length === be.length ? be : Gt;
|
|
3490
3512
|
}, [c]), W = re(
|
|
3491
|
-
() =>
|
|
3492
|
-
[
|
|
3513
|
+
() => Ls(U),
|
|
3514
|
+
[U]
|
|
3493
3515
|
), Z = re(() => {
|
|
3494
|
-
const
|
|
3495
|
-
return
|
|
3496
|
-
}, [c, x]),
|
|
3497
|
-
(
|
|
3516
|
+
const he = us({ message: c, viewerLanguage: x });
|
|
3517
|
+
return he === c.text ? c : { ...c, text: he };
|
|
3518
|
+
}, [c, x]), ue = W.length > 0, De = W.reduce(
|
|
3519
|
+
(he, be) => he + be.attachments.length,
|
|
3498
3520
|
0
|
|
3499
|
-
) === ((
|
|
3521
|
+
) === ((U == null ? void 0 : U.length) ?? 0), ze = Ya({
|
|
3500
3522
|
endOfGroup: r,
|
|
3501
3523
|
firstOfGroup: i,
|
|
3502
3524
|
groupedByUser: o
|
|
3503
3525
|
});
|
|
3504
|
-
if (
|
|
3526
|
+
if (cn(c))
|
|
3505
3527
|
return null;
|
|
3506
3528
|
if (c.deleted_at || c.type === "deleted")
|
|
3507
3529
|
return /* @__PURE__ */ s(j, { message: c });
|
|
3508
|
-
if (
|
|
3530
|
+
if (dn(c))
|
|
3509
3531
|
return /* @__PURE__ */ s(P, {});
|
|
3510
|
-
const ae = !v && !!c.reply_count,
|
|
3511
|
-
let
|
|
3512
|
-
|
|
3513
|
-
const te =
|
|
3532
|
+
const ae = !v && !!c.reply_count, me = !v && c.show_in_channel && c.parent_id, oe = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, Tt = un(c);
|
|
3533
|
+
let ge;
|
|
3534
|
+
oe ? ge = () => m(c) : Tt && (ge = () => O(!0));
|
|
3535
|
+
const te = g(), $s = y(
|
|
3514
3536
|
"str-chat__message str-chat__message-simple",
|
|
3515
3537
|
`str-chat__message--${c.type}`,
|
|
3516
3538
|
`str-chat__message--${c.status}`,
|
|
@@ -3518,29 +3540,29 @@ const mi = ({
|
|
|
3518
3540
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
3519
3541
|
{
|
|
3520
3542
|
"str-chat__message--has-attachment": H,
|
|
3521
|
-
"str-chat__message--highlighted":
|
|
3543
|
+
"str-chat__message--highlighted": f,
|
|
3522
3544
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3523
3545
|
"str-chat__message--with-reactions": q,
|
|
3524
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
3525
|
-
"str-chat__message-with-thread-link": ae ||
|
|
3546
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((zt = c == null ? void 0 : c.error) == null ? void 0 : zt.status) !== 403,
|
|
3547
|
+
"str-chat__message-with-thread-link": ae || me,
|
|
3526
3548
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3527
3549
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3528
3550
|
"str-chat__virtual-message__wrapper--group": o
|
|
3529
3551
|
}
|
|
3530
|
-
),
|
|
3552
|
+
), qe = c.poll_id && p.polls.fromState(c.poll_id), Mt = qr(c), pe = Ue(c), Us = yt(c), We = !!(U != null && U.length && !c.quoted_message), At = pe && te && We, Bs = ue && De && !c.quoted_message && !qe && !Y && !pe, Rt = {
|
|
3531
3553
|
contentType: "text",
|
|
3532
|
-
amountText: (
|
|
3533
|
-
paymentStatus: (
|
|
3534
|
-
renderedText: c.text && /* @__PURE__ */ s(
|
|
3535
|
-
},
|
|
3554
|
+
amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
|
|
3555
|
+
paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
|
|
3556
|
+
renderedText: c.text && /* @__PURE__ */ s($e, { message: Z, renderText: b })
|
|
3557
|
+
}, Lt = {
|
|
3536
3558
|
contentType: "media",
|
|
3537
|
-
title: (
|
|
3538
|
-
mimeType: (
|
|
3539
|
-
thumbnailUrl: (
|
|
3559
|
+
title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
|
|
3560
|
+
mimeType: ($t = c.metadata) == null ? void 0 : $t.attachment_mime_type,
|
|
3561
|
+
thumbnailUrl: (Ut = c.metadata) == null ? void 0 : Ut.attachment_thumbnail,
|
|
3540
3562
|
amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
|
|
3541
|
-
detail: (
|
|
3542
|
-
paymentStatus: (
|
|
3543
|
-
onFetchSource:
|
|
3563
|
+
detail: (jt = c.metadata) == null ? void 0 : jt.attachment_detail,
|
|
3564
|
+
paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
|
|
3565
|
+
onFetchSource: D ? () => D(c, _) : void 0
|
|
3544
3566
|
};
|
|
3545
3567
|
return /* @__PURE__ */ u(se, { children: [
|
|
3546
3568
|
a && /* @__PURE__ */ s(
|
|
@@ -3550,7 +3572,7 @@ const mi = ({
|
|
|
3550
3572
|
}
|
|
3551
3573
|
),
|
|
3552
3574
|
R && /* @__PURE__ */ s(
|
|
3553
|
-
|
|
3575
|
+
mn,
|
|
3554
3576
|
{
|
|
3555
3577
|
MessageBouncePrompt: $,
|
|
3556
3578
|
onClose: () => O(!1),
|
|
@@ -3560,7 +3582,7 @@ const mi = ({
|
|
|
3560
3582
|
/* @__PURE__ */ u(
|
|
3561
3583
|
"div",
|
|
3562
3584
|
{
|
|
3563
|
-
className:
|
|
3585
|
+
className: $s,
|
|
3564
3586
|
"data-message-id": c.id,
|
|
3565
3587
|
"data-dd-privacy": "mask",
|
|
3566
3588
|
children: [
|
|
@@ -3575,58 +3597,58 @@ const mi = ({
|
|
|
3575
3597
|
name: c.user.name || c.user.id,
|
|
3576
3598
|
size: 24,
|
|
3577
3599
|
shape: "circle",
|
|
3578
|
-
dmAgentEnabled:
|
|
3600
|
+
dmAgentEnabled: pe
|
|
3579
3601
|
}
|
|
3580
3602
|
),
|
|
3581
3603
|
/* @__PURE__ */ s(
|
|
3582
3604
|
"div",
|
|
3583
3605
|
{
|
|
3584
3606
|
className: y("str-chat__message-inner", {
|
|
3585
|
-
"str-chat__simple-message--error-failed":
|
|
3607
|
+
"str-chat__simple-message--error-failed": oe || Tt
|
|
3586
3608
|
}),
|
|
3587
3609
|
"data-testid": "message-inner",
|
|
3588
|
-
onClick:
|
|
3589
|
-
onKeyDown:
|
|
3590
|
-
role:
|
|
3591
|
-
tabIndex:
|
|
3610
|
+
onClick: ge,
|
|
3611
|
+
onKeyDown: ge,
|
|
3612
|
+
role: ge ? "button" : void 0,
|
|
3613
|
+
tabIndex: ge ? 0 : void 0,
|
|
3592
3614
|
style: {
|
|
3593
3615
|
// Force margins to 0 to prevent hover layout shift
|
|
3594
3616
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
3595
3617
|
marginInlineEnd: 0,
|
|
3596
3618
|
marginInlineStart: 0
|
|
3597
3619
|
},
|
|
3598
|
-
children:
|
|
3620
|
+
children: Mt ? /* @__PURE__ */ s(Qe, { message: c, standalone: !0 }) : Hr(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3599
3621
|
te && M && /* @__PURE__ */ s(M, {}),
|
|
3600
3622
|
te ? /* @__PURE__ */ s(
|
|
3601
|
-
|
|
3623
|
+
Pe,
|
|
3602
3624
|
{
|
|
3603
|
-
...
|
|
3625
|
+
...Rt,
|
|
3604
3626
|
isMine: !0
|
|
3605
3627
|
}
|
|
3606
3628
|
) : /* @__PURE__ */ s(
|
|
3607
|
-
|
|
3629
|
+
Pe,
|
|
3608
3630
|
{
|
|
3609
|
-
...
|
|
3631
|
+
...Rt,
|
|
3610
3632
|
isMine: !1,
|
|
3611
3633
|
isUnlocking: w(c.id),
|
|
3612
3634
|
onUnlockClick: () => k == null ? void 0 : k(c, _)
|
|
3613
3635
|
}
|
|
3614
3636
|
),
|
|
3615
3637
|
!te && M && /* @__PURE__ */ s(M, {})
|
|
3616
|
-
] }) }) :
|
|
3638
|
+
] }) }) : Yr(c) ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3617
3639
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3618
3640
|
te && M && /* @__PURE__ */ s(M, {}),
|
|
3619
3641
|
te ? /* @__PURE__ */ s(
|
|
3620
|
-
|
|
3642
|
+
Pe,
|
|
3621
3643
|
{
|
|
3622
|
-
...
|
|
3644
|
+
...Lt,
|
|
3623
3645
|
isMine: !0,
|
|
3624
3646
|
onPreviewClick: () => k ? k(c, _) : void 0
|
|
3625
3647
|
}
|
|
3626
3648
|
) : /* @__PURE__ */ s(
|
|
3627
|
-
|
|
3649
|
+
Pe,
|
|
3628
3650
|
{
|
|
3629
|
-
...
|
|
3651
|
+
...Lt,
|
|
3630
3652
|
isMine: !1,
|
|
3631
3653
|
isUnlocking: w(c.id),
|
|
3632
3654
|
onUnlockClick: () => k ? k(c, _) : void 0,
|
|
@@ -3636,20 +3658,20 @@ const mi = ({
|
|
|
3636
3658
|
!te && M && /* @__PURE__ */ s(M, {})
|
|
3637
3659
|
] }),
|
|
3638
3660
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
3639
|
-
|
|
3661
|
+
$e,
|
|
3640
3662
|
{
|
|
3641
3663
|
message: Z,
|
|
3642
3664
|
renderText: b
|
|
3643
3665
|
}
|
|
3644
3666
|
) })
|
|
3645
3667
|
] }) : Bs ? /* @__PURE__ */ s(
|
|
3646
|
-
|
|
3668
|
+
bi,
|
|
3647
3669
|
{
|
|
3648
|
-
groupPosition:
|
|
3670
|
+
groupPosition: ze,
|
|
3649
3671
|
isMyMessage: te,
|
|
3650
3672
|
message: {
|
|
3651
3673
|
...Z,
|
|
3652
|
-
attachments:
|
|
3674
|
+
attachments: U,
|
|
3653
3675
|
// MessageText prefers message.i18n[userLanguage_text] from
|
|
3654
3676
|
// Stream's TranslationContext over message.text. Drop i18n so
|
|
3655
3677
|
// the caption uses displayMessage.text from viewerLanguage.
|
|
@@ -3658,20 +3680,20 @@ const mi = ({
|
|
|
3658
3680
|
renderText: b
|
|
3659
3681
|
}
|
|
3660
3682
|
) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
|
|
3661
|
-
|
|
3662
|
-
|
|
3683
|
+
pe && !At && /* @__PURE__ */ s(
|
|
3684
|
+
Qe,
|
|
3663
3685
|
{
|
|
3664
3686
|
message: c,
|
|
3665
|
-
hasAttachment:
|
|
3687
|
+
hasAttachment: We,
|
|
3666
3688
|
isMyMessage: te
|
|
3667
3689
|
}
|
|
3668
3690
|
),
|
|
3669
|
-
|
|
3670
|
-
|
|
3691
|
+
qe && /* @__PURE__ */ s(hn, { poll: qe }),
|
|
3692
|
+
U != null && U.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3671
3693
|
I,
|
|
3672
3694
|
{
|
|
3673
3695
|
actionHandler: l,
|
|
3674
|
-
attachments:
|
|
3696
|
+
attachments: U
|
|
3675
3697
|
}
|
|
3676
3698
|
) : null,
|
|
3677
3699
|
Y ? /* @__PURE__ */ s(
|
|
@@ -3681,35 +3703,35 @@ const mi = ({
|
|
|
3681
3703
|
renderText: b
|
|
3682
3704
|
}
|
|
3683
3705
|
) : /* @__PURE__ */ s(
|
|
3684
|
-
|
|
3706
|
+
$e,
|
|
3685
3707
|
{
|
|
3686
3708
|
message: Z,
|
|
3687
3709
|
renderText: b
|
|
3688
3710
|
}
|
|
3689
3711
|
),
|
|
3690
|
-
/* @__PURE__ */ s(
|
|
3712
|
+
/* @__PURE__ */ s(nt, {})
|
|
3691
3713
|
] }) })
|
|
3692
3714
|
}
|
|
3693
3715
|
),
|
|
3694
|
-
|
|
3695
|
-
(!
|
|
3696
|
-
|
|
3716
|
+
!Us && !Mt && /* @__PURE__ */ u("div", { className: "str-chat__message-footer", children: [
|
|
3717
|
+
(!pe || At) && /* @__PURE__ */ s(
|
|
3718
|
+
Qe,
|
|
3697
3719
|
{
|
|
3698
3720
|
message: c,
|
|
3699
|
-
hasAttachment:
|
|
3721
|
+
hasAttachment: We,
|
|
3700
3722
|
isMyMessage: te
|
|
3701
3723
|
}
|
|
3702
3724
|
),
|
|
3703
|
-
n &&
|
|
3704
|
-
|
|
3725
|
+
n && pe && /* @__PURE__ */ s(
|
|
3726
|
+
Wr,
|
|
3705
3727
|
{
|
|
3706
|
-
selected:
|
|
3728
|
+
selected: L,
|
|
3707
3729
|
onVoteUp: C,
|
|
3708
3730
|
onVoteDown: E
|
|
3709
3731
|
}
|
|
3710
3732
|
)
|
|
3711
3733
|
] }),
|
|
3712
|
-
/* @__PURE__ */ s(
|
|
3734
|
+
/* @__PURE__ */ s(Kr, {}),
|
|
3713
3735
|
ae && /* @__PURE__ */ s(
|
|
3714
3736
|
ee,
|
|
3715
3737
|
{
|
|
@@ -3717,56 +3739,56 @@ const mi = ({
|
|
|
3717
3739
|
reply_count: c.reply_count
|
|
3718
3740
|
}
|
|
3719
3741
|
),
|
|
3720
|
-
|
|
3742
|
+
me && /* @__PURE__ */ s(Q, {})
|
|
3721
3743
|
]
|
|
3722
3744
|
},
|
|
3723
3745
|
c.id
|
|
3724
3746
|
)
|
|
3725
3747
|
] });
|
|
3726
|
-
},
|
|
3727
|
-
|
|
3728
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
3729
|
-
),
|
|
3730
|
-
const t =
|
|
3731
|
-
return /* @__PURE__ */ s(
|
|
3732
|
-
},
|
|
3748
|
+
}, xi = V.memo(
|
|
3749
|
+
vi,
|
|
3750
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Xs(e, t)
|
|
3751
|
+
), wi = (e) => {
|
|
3752
|
+
const t = Ne("CustomMessage");
|
|
3753
|
+
return /* @__PURE__ */ s(xi, { ...t, ...e });
|
|
3754
|
+
}, _i = () => {
|
|
3733
3755
|
var n;
|
|
3734
|
-
const { handleDelete: e, message: t } =
|
|
3756
|
+
const { handleDelete: e, message: t } = Ne("CustomMessageActions");
|
|
3735
3757
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
3736
|
-
|
|
3758
|
+
os,
|
|
3737
3759
|
{
|
|
3738
3760
|
onClick: e,
|
|
3739
3761
|
"aria-label": "Delete",
|
|
3740
3762
|
title: "Delete",
|
|
3741
3763
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3742
|
-
children: /* @__PURE__ */ s(
|
|
3764
|
+
children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3743
3765
|
}
|
|
3744
3766
|
);
|
|
3745
|
-
},
|
|
3746
|
-
const { handleFlag: e } =
|
|
3767
|
+
}, Ni = () => {
|
|
3768
|
+
const { handleFlag: e } = Ne("CustomMessageActions");
|
|
3747
3769
|
return /* @__PURE__ */ s(
|
|
3748
|
-
|
|
3770
|
+
os,
|
|
3749
3771
|
{
|
|
3750
3772
|
onClick: e,
|
|
3751
3773
|
"aria-label": "Report",
|
|
3752
3774
|
title: "Report",
|
|
3753
3775
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3754
|
-
children: /* @__PURE__ */ s(
|
|
3776
|
+
children: /* @__PURE__ */ s(rs, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3755
3777
|
}
|
|
3756
3778
|
);
|
|
3757
|
-
},
|
|
3779
|
+
}, yi = () => {
|
|
3758
3780
|
var t;
|
|
3759
|
-
const { message: e } =
|
|
3781
|
+
const { message: e } = Ne("CustomMessageActions");
|
|
3760
3782
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
|
|
3761
|
-
|
|
3783
|
+
ea,
|
|
3762
3784
|
{
|
|
3763
3785
|
messageActionSet: [
|
|
3764
|
-
{ Component:
|
|
3765
|
-
{ Component:
|
|
3786
|
+
{ Component: _i, placement: "quick", type: "delete" },
|
|
3787
|
+
{ Component: Ni, placement: "quick", type: "flag" }
|
|
3766
3788
|
]
|
|
3767
3789
|
}
|
|
3768
3790
|
);
|
|
3769
|
-
},
|
|
3791
|
+
}, ki = ({
|
|
3770
3792
|
link: e,
|
|
3771
3793
|
onDismiss: t
|
|
3772
3794
|
}) => {
|
|
@@ -3796,7 +3818,7 @@ const mi = ({
|
|
|
3796
3818
|
},
|
|
3797
3819
|
className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
|
|
3798
3820
|
"aria-label": "Close link preview",
|
|
3799
|
-
children: /* @__PURE__ */ s(
|
|
3821
|
+
children: /* @__PURE__ */ s(Ge, { className: "size-4 text-black/90" })
|
|
3800
3822
|
}
|
|
3801
3823
|
),
|
|
3802
3824
|
/* @__PURE__ */ u("div", { className: "p-2", children: [
|
|
@@ -3806,14 +3828,14 @@ const mi = ({
|
|
|
3806
3828
|
]
|
|
3807
3829
|
}
|
|
3808
3830
|
);
|
|
3809
|
-
},
|
|
3831
|
+
}, Ci = (e) => ({
|
|
3810
3832
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3811
|
-
(t) =>
|
|
3833
|
+
(t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
|
|
3812
3834
|
)
|
|
3813
|
-
}),
|
|
3814
|
-
const { linkPreviewsManager: e } =
|
|
3835
|
+
}), Si = () => {
|
|
3836
|
+
const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
|
|
3815
3837
|
e.state,
|
|
3816
|
-
|
|
3838
|
+
Ci
|
|
3817
3839
|
), n = (r) => {
|
|
3818
3840
|
e.dismissPreview(r);
|
|
3819
3841
|
};
|
|
@@ -3826,9 +3848,9 @@ const mi = ({
|
|
|
3826
3848
|
// block so it keeps its intrinsic height and the container scrolls — a
|
|
3827
3849
|
// bare flex-column child would be shrunk on the column axis and its
|
|
3828
3850
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3829
|
-
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(
|
|
3851
|
+
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(ki, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3830
3852
|
) : null;
|
|
3831
|
-
},
|
|
3853
|
+
}, It = V.createContext(!1), pl = () => Te(It), Ei = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3832
3854
|
"button",
|
|
3833
3855
|
{
|
|
3834
3856
|
...n,
|
|
@@ -3836,13 +3858,13 @@ const mi = ({
|
|
|
3836
3858
|
"aria-label": "Send",
|
|
3837
3859
|
disabled: t,
|
|
3838
3860
|
onClick: e,
|
|
3839
|
-
children: /* @__PURE__ */ s(
|
|
3861
|
+
children: /* @__PURE__ */ s(Jn, { weight: "bold", className: "size-4" })
|
|
3840
3862
|
}
|
|
3841
|
-
),
|
|
3842
|
-
const e =
|
|
3843
|
-
SendButton: r =
|
|
3844
|
-
AttachmentPreviewList: i =
|
|
3845
|
-
} =
|
|
3863
|
+
), Ii = () => {
|
|
3864
|
+
const e = Te(It), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
|
|
3865
|
+
SendButton: r = Ei,
|
|
3866
|
+
AttachmentPreviewList: i = xn
|
|
3867
|
+
} = as("CustomMessageInput");
|
|
3846
3868
|
return (
|
|
3847
3869
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
3848
3870
|
// preview list inside is the scrollable region); the textarea + send row
|
|
@@ -3858,12 +3880,12 @@ const mi = ({
|
|
|
3858
3880
|
className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
|
|
3859
3881
|
"data-dd-privacy": "mask",
|
|
3860
3882
|
children: [
|
|
3861
|
-
/* @__PURE__ */ s(
|
|
3862
|
-
/* @__PURE__ */ s(
|
|
3883
|
+
/* @__PURE__ */ s(wn, {}),
|
|
3884
|
+
/* @__PURE__ */ s(Si, {}),
|
|
3863
3885
|
/* @__PURE__ */ s(i, {}),
|
|
3864
3886
|
/* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
|
|
3865
3887
|
/* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
|
|
3866
|
-
|
|
3888
|
+
_n,
|
|
3867
3889
|
{
|
|
3868
3890
|
"aria-disabled": e || void 0,
|
|
3869
3891
|
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
@@ -3890,7 +3912,7 @@ const mi = ({
|
|
|
3890
3912
|
}
|
|
3891
3913
|
)
|
|
3892
3914
|
);
|
|
3893
|
-
},
|
|
3915
|
+
}, Ti = ({
|
|
3894
3916
|
renderActions: e,
|
|
3895
3917
|
renderFooter: t,
|
|
3896
3918
|
disabled: n = !1,
|
|
@@ -3898,7 +3920,7 @@ const mi = ({
|
|
|
3898
3920
|
composerInput: r
|
|
3899
3921
|
}) => {
|
|
3900
3922
|
var l;
|
|
3901
|
-
const { channel: i } =
|
|
3923
|
+
const { channel: i } = ce(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
|
|
3902
3924
|
return n ? /* @__PURE__ */ u(se, { children: [
|
|
3903
3925
|
/* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
3904
3926
|
t == null ? void 0 : t()
|
|
@@ -3911,67 +3933,67 @@ const mi = ({
|
|
|
3911
3933
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3912
3934
|
children: [
|
|
3913
3935
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3914
|
-
/* @__PURE__ */ s(
|
|
3936
|
+
/* @__PURE__ */ s(It.Provider, { value: o, children: /* @__PURE__ */ s(pn, { Input: r ?? Ii }) })
|
|
3915
3937
|
]
|
|
3916
3938
|
}
|
|
3917
3939
|
),
|
|
3918
3940
|
t == null ? void 0 : t()
|
|
3919
3941
|
] });
|
|
3920
|
-
},
|
|
3942
|
+
}, Mi = [
|
|
3921
3943
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
3922
3944
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
3923
|
-
],
|
|
3945
|
+
], Ai = {
|
|
3924
3946
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
3925
3947
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
3926
|
-
},
|
|
3948
|
+
}, Ri = [
|
|
3927
3949
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
3928
|
-
],
|
|
3950
|
+
], Li = {
|
|
3929
3951
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
3930
|
-
},
|
|
3952
|
+
}, tt = "age safety guidelines.", Di = "https://linktr.ee/s/about/contact", ts = (e) => Mi.includes(e), zi = (e) => Ri.includes(e), Fi = (e) => {
|
|
3931
3953
|
var a;
|
|
3932
3954
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
3933
|
-
if (
|
|
3955
|
+
if (ts(t))
|
|
3934
3956
|
return {
|
|
3935
3957
|
kind: "dm-agent",
|
|
3936
3958
|
type: t
|
|
3937
3959
|
};
|
|
3938
|
-
if (
|
|
3960
|
+
if (zi(t))
|
|
3939
3961
|
return {
|
|
3940
3962
|
kind: "age-safety",
|
|
3941
3963
|
type: t
|
|
3942
3964
|
};
|
|
3943
3965
|
const n = e.dm_agent_system_type;
|
|
3944
|
-
if (
|
|
3966
|
+
if (ts(n))
|
|
3945
3967
|
return {
|
|
3946
3968
|
kind: "dm-agent",
|
|
3947
3969
|
type: n
|
|
3948
3970
|
};
|
|
3949
|
-
},
|
|
3950
|
-
const t = e.indexOf(
|
|
3971
|
+
}, Pi = (e) => {
|
|
3972
|
+
const t = e.indexOf(tt);
|
|
3951
3973
|
if (t === -1)
|
|
3952
3974
|
return e;
|
|
3953
|
-
const n = t +
|
|
3975
|
+
const n = t + tt.length;
|
|
3954
3976
|
return /* @__PURE__ */ u(se, { children: [
|
|
3955
3977
|
e.slice(0, t),
|
|
3956
3978
|
/* @__PURE__ */ s(
|
|
3957
3979
|
"a",
|
|
3958
3980
|
{
|
|
3959
|
-
href:
|
|
3981
|
+
href: Di,
|
|
3960
3982
|
target: "_blank",
|
|
3961
3983
|
rel: "noopener noreferrer",
|
|
3962
3984
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
3963
|
-
children:
|
|
3985
|
+
children: tt
|
|
3964
3986
|
}
|
|
3965
3987
|
),
|
|
3966
3988
|
e.slice(n)
|
|
3967
3989
|
] });
|
|
3968
|
-
},
|
|
3990
|
+
}, Oi = (e) => {
|
|
3969
3991
|
var a, r;
|
|
3970
|
-
const t = e.message.hide_date === !0, n =
|
|
3992
|
+
const t = e.message.hide_date === !0, n = Fi(
|
|
3971
3993
|
e.message
|
|
3972
3994
|
);
|
|
3973
3995
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
3974
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
3996
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
|
|
3975
3997
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3976
3998
|
/* @__PURE__ */ u(
|
|
3977
3999
|
"div",
|
|
@@ -3981,7 +4003,7 @@ const mi = ({
|
|
|
3981
4003
|
"data-dm-agent-system-type": n.type,
|
|
3982
4004
|
children: [
|
|
3983
4005
|
/* @__PURE__ */ s(
|
|
3984
|
-
|
|
4006
|
+
we,
|
|
3985
4007
|
{
|
|
3986
4008
|
size: 16,
|
|
3987
4009
|
weight: "regular",
|
|
@@ -3993,11 +4015,11 @@ const mi = ({
|
|
|
3993
4015
|
]
|
|
3994
4016
|
}
|
|
3995
4017
|
),
|
|
3996
|
-
!t && /* @__PURE__ */ s(
|
|
4018
|
+
!t && /* @__PURE__ */ s(Xe, { message: e.message })
|
|
3997
4019
|
] });
|
|
3998
4020
|
}
|
|
3999
4021
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
4000
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4022
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Li[n.type];
|
|
4001
4023
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4002
4024
|
/* @__PURE__ */ u(
|
|
4003
4025
|
"div",
|
|
@@ -4007,7 +4029,7 @@ const mi = ({
|
|
|
4007
4029
|
"data-age-safety-system-type": n.type,
|
|
4008
4030
|
children: [
|
|
4009
4031
|
/* @__PURE__ */ s(
|
|
4010
|
-
|
|
4032
|
+
Qn,
|
|
4011
4033
|
{
|
|
4012
4034
|
size: 24,
|
|
4013
4035
|
weight: "duotone",
|
|
@@ -4016,11 +4038,11 @@ const mi = ({
|
|
|
4016
4038
|
"data-testid": "age-safety-system-message-icon"
|
|
4017
4039
|
}
|
|
4018
4040
|
),
|
|
4019
|
-
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
4041
|
+
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Pi(i) }) })
|
|
4020
4042
|
]
|
|
4021
4043
|
}
|
|
4022
4044
|
),
|
|
4023
|
-
!t && /* @__PURE__ */ s(
|
|
4045
|
+
!t && /* @__PURE__ */ s(Xe, { message: e.message })
|
|
4024
4046
|
] });
|
|
4025
4047
|
}
|
|
4026
4048
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -4029,9 +4051,9 @@ const mi = ({
|
|
|
4029
4051
|
/* @__PURE__ */ s("p", { children: e.message.text }),
|
|
4030
4052
|
/* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
|
|
4031
4053
|
] }),
|
|
4032
|
-
!t && /* @__PURE__ */ s(
|
|
4054
|
+
!t && /* @__PURE__ */ s(Xe, { message: e.message })
|
|
4033
4055
|
] });
|
|
4034
|
-
}, Ds =
|
|
4056
|
+
}, Ds = ct(!1), st = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
4035
4057
|
"animateTransform",
|
|
4036
4058
|
{
|
|
4037
4059
|
attributeName: "transform",
|
|
@@ -4041,17 +4063,17 @@ const mi = ({
|
|
|
4041
4063
|
begin: `${120 * t}ms`,
|
|
4042
4064
|
repeatCount: "indefinite"
|
|
4043
4065
|
}
|
|
4044
|
-
) }),
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
]),
|
|
4066
|
+
) }), $i = /* @__PURE__ */ new Set([
|
|
4067
|
+
Ke.Thinking,
|
|
4068
|
+
Ke.Generating,
|
|
4069
|
+
Ke.ExternalSources
|
|
4070
|
+
]), Ui = ({ threadList: e }) => {
|
|
4049
4071
|
var b, v;
|
|
4050
|
-
const { channel: t, channelConfig: n, thread: a } =
|
|
4051
|
-
if (!e && l &&
|
|
4052
|
-
const x =
|
|
4072
|
+
const { channel: t, channelConfig: n, thread: a } = ce(), { client: r } = fe(), { typing: i = {} } = Nn(), { aiState: o } = yn(t), l = Te(Ds);
|
|
4073
|
+
if (!e && l && $i.has(o)) {
|
|
4074
|
+
const x = Bi(t, (b = r.user) == null ? void 0 : b.id);
|
|
4053
4075
|
return /* @__PURE__ */ s(
|
|
4054
|
-
|
|
4076
|
+
ss,
|
|
4055
4077
|
{
|
|
4056
4078
|
avatarId: (x == null ? void 0 : x.id) ?? "ai-agent",
|
|
4057
4079
|
avatarName: (x == null ? void 0 : x.name) ?? (x == null ? void 0 : x.id) ?? "Agent",
|
|
@@ -4067,25 +4089,25 @@ const mi = ({
|
|
|
4067
4089
|
var _;
|
|
4068
4090
|
return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && !x;
|
|
4069
4091
|
}
|
|
4070
|
-
),
|
|
4092
|
+
), f = e ? Object.values(i).filter(
|
|
4071
4093
|
({ parent_id: x, user: p }) => {
|
|
4072
4094
|
var _;
|
|
4073
4095
|
return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && x === (a == null ? void 0 : a.id);
|
|
4074
4096
|
}
|
|
4075
|
-
) : [], h = e ?
|
|
4097
|
+
) : [], h = e ? f : m;
|
|
4076
4098
|
if (!h.length)
|
|
4077
4099
|
return null;
|
|
4078
|
-
const
|
|
4100
|
+
const g = (v = h[0]) == null ? void 0 : v.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4079
4101
|
return /* @__PURE__ */ s(
|
|
4080
|
-
|
|
4102
|
+
ss,
|
|
4081
4103
|
{
|
|
4082
|
-
avatarId: (
|
|
4083
|
-
avatarName: (
|
|
4084
|
-
avatarImage: (
|
|
4104
|
+
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4105
|
+
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
4106
|
+
avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
|
|
4085
4107
|
testId: "typing-indicator"
|
|
4086
4108
|
}
|
|
4087
4109
|
);
|
|
4088
|
-
},
|
|
4110
|
+
}, ss = ({
|
|
4089
4111
|
avatarId: e,
|
|
4090
4112
|
avatarName: t,
|
|
4091
4113
|
avatarImage: n,
|
|
@@ -4120,16 +4142,16 @@ const mi = ({
|
|
|
4120
4142
|
height: "13",
|
|
4121
4143
|
overflow: "visible",
|
|
4122
4144
|
children: [
|
|
4123
|
-
/* @__PURE__ */ s(
|
|
4124
|
-
/* @__PURE__ */ s(
|
|
4125
|
-
/* @__PURE__ */ s(
|
|
4145
|
+
/* @__PURE__ */ s(st, { cx: "4", index: 0 }),
|
|
4146
|
+
/* @__PURE__ */ s(st, { cx: "16", index: 1 }),
|
|
4147
|
+
/* @__PURE__ */ s(st, { cx: "28", index: 2 })
|
|
4126
4148
|
]
|
|
4127
4149
|
}
|
|
4128
4150
|
) }) }) }) }) })
|
|
4129
4151
|
] })
|
|
4130
4152
|
}
|
|
4131
4153
|
);
|
|
4132
|
-
function
|
|
4154
|
+
function Bi(e, t) {
|
|
4133
4155
|
var a;
|
|
4134
4156
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4135
4157
|
for (const r of Object.values(n)) {
|
|
@@ -4138,7 +4160,7 @@ function Fi(e, t) {
|
|
|
4138
4160
|
return i;
|
|
4139
4161
|
}
|
|
4140
4162
|
}
|
|
4141
|
-
const
|
|
4163
|
+
const ji = () => null, Vi = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
4142
4164
|
"div",
|
|
4143
4165
|
{
|
|
4144
4166
|
className: y("flex items-center justify-center h-full", e),
|
|
@@ -4181,12 +4203,12 @@ const Pi = () => null, Oi = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
|
4181
4203
|
t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
|
|
4182
4204
|
]
|
|
4183
4205
|
}
|
|
4184
|
-
),
|
|
4185
|
-
/* @__PURE__ */ s(
|
|
4206
|
+
), Ve = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
|
|
4207
|
+
/* @__PURE__ */ s(Vi, { className: "w-6 h-6" }),
|
|
4186
4208
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4187
4209
|
] }) }));
|
|
4188
|
-
|
|
4189
|
-
const
|
|
4210
|
+
Ve.displayName = "LoadingState";
|
|
4211
|
+
const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Oe = "Replies instantly with AI assistant", Gi = ({
|
|
4190
4212
|
onBack: e,
|
|
4191
4213
|
showBackButton: t,
|
|
4192
4214
|
showStarButton: n = !1,
|
|
@@ -4197,29 +4219,29 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4197
4219
|
showBlockParticipant: l = !0,
|
|
4198
4220
|
showReportParticipant: d = !0,
|
|
4199
4221
|
onDeleteConversationClick: m,
|
|
4200
|
-
onBlockParticipantClick:
|
|
4222
|
+
onBlockParticipantClick: f,
|
|
4201
4223
|
onReportParticipantClick: h,
|
|
4202
|
-
customChannelActions:
|
|
4224
|
+
customChannelActions: g,
|
|
4203
4225
|
renderChannelActions: c,
|
|
4204
4226
|
showChannelInfo: b = !0,
|
|
4205
4227
|
onParticipantNameClick: v,
|
|
4206
4228
|
renderHeaderTitleBadges: x
|
|
4207
4229
|
}) => {
|
|
4208
4230
|
var E, I, T, M, P, $;
|
|
4209
|
-
const { channel: p } =
|
|
4231
|
+
const { channel: p } = ce(), { client: _ } = fe(), w = V.useMemo(
|
|
4210
4232
|
() => {
|
|
4211
4233
|
var j;
|
|
4212
|
-
return
|
|
4234
|
+
return He(
|
|
4213
4235
|
(j = p.state) == null ? void 0 : j.members,
|
|
4214
4236
|
_ == null ? void 0 : _.userID,
|
|
4215
4237
|
p.type
|
|
4216
4238
|
);
|
|
4217
4239
|
},
|
|
4218
4240
|
[(E = p.state) == null ? void 0 : E.members, _ == null ? void 0 : _.userID, p.type]
|
|
4219
|
-
), k =
|
|
4241
|
+
), k = mt(w == null ? void 0 : w.user), D = (I = w == null ? void 0 : w.user) == null ? void 0 : I.image, S = ut(p), R = x == null ? void 0 : x({
|
|
4220
4242
|
channel: p,
|
|
4221
4243
|
participant: w
|
|
4222
|
-
}), O = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90",
|
|
4244
|
+
}), O = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */ u(se, { children: [
|
|
4223
4245
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: k }),
|
|
4224
4246
|
R && /* @__PURE__ */ s("span", { className: "shrink-0", children: R })
|
|
4225
4247
|
] }), C = async () => {
|
|
@@ -4238,14 +4260,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4238
4260
|
"button",
|
|
4239
4261
|
{
|
|
4240
4262
|
className: y(
|
|
4241
|
-
|
|
4263
|
+
ve,
|
|
4242
4264
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
4243
4265
|
),
|
|
4244
4266
|
onClick: e || (() => {
|
|
4245
4267
|
}),
|
|
4246
4268
|
type: "button",
|
|
4247
4269
|
"aria-label": "Back to conversations",
|
|
4248
|
-
children: /* @__PURE__ */ s(
|
|
4270
|
+
children: /* @__PURE__ */ s(at, { className: "size-5 text-black/90" })
|
|
4249
4271
|
}
|
|
4250
4272
|
) }),
|
|
4251
4273
|
/* @__PURE__ */ s(
|
|
@@ -4269,19 +4291,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4269
4291
|
{
|
|
4270
4292
|
id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || p.id || "unknown",
|
|
4271
4293
|
name: k,
|
|
4272
|
-
image:
|
|
4294
|
+
image: D,
|
|
4273
4295
|
starred: n && S,
|
|
4274
4296
|
dmAgentEnabled: a,
|
|
4275
4297
|
size: 48
|
|
4276
4298
|
}
|
|
4277
4299
|
),
|
|
4278
4300
|
/* @__PURE__ */ u("span", { className: "flex max-w-full items-center gap-0.5", children: [
|
|
4279
|
-
|
|
4280
|
-
/* @__PURE__ */ s(
|
|
4301
|
+
L,
|
|
4302
|
+
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0", weight: "bold" })
|
|
4281
4303
|
] }),
|
|
4282
4304
|
a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4283
|
-
/* @__PURE__ */ s(
|
|
4284
|
-
/* @__PURE__ */ s("span", { children:
|
|
4305
|
+
/* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
|
|
4306
|
+
/* @__PURE__ */ s("span", { children: Oe })
|
|
4285
4307
|
] })
|
|
4286
4308
|
]
|
|
4287
4309
|
}
|
|
@@ -4291,16 +4313,16 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4291
4313
|
{
|
|
4292
4314
|
id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || p.id || "unknown",
|
|
4293
4315
|
name: k,
|
|
4294
|
-
image:
|
|
4316
|
+
image: D,
|
|
4295
4317
|
starred: n && S,
|
|
4296
4318
|
dmAgentEnabled: a,
|
|
4297
4319
|
size: 48
|
|
4298
4320
|
}
|
|
4299
4321
|
),
|
|
4300
4322
|
/* @__PURE__ */ u("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
|
|
4301
|
-
|
|
4323
|
+
L,
|
|
4302
4324
|
/* @__PURE__ */ s(
|
|
4303
|
-
|
|
4325
|
+
xe,
|
|
4304
4326
|
{
|
|
4305
4327
|
className: "invisible size-3 shrink-0",
|
|
4306
4328
|
weight: "bold"
|
|
@@ -4308,8 +4330,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4308
4330
|
)
|
|
4309
4331
|
] }),
|
|
4310
4332
|
a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4311
|
-
/* @__PURE__ */ s(
|
|
4312
|
-
/* @__PURE__ */ s("span", { children:
|
|
4333
|
+
/* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
|
|
4334
|
+
/* @__PURE__ */ s("span", { children: Oe })
|
|
4313
4335
|
] })
|
|
4314
4336
|
] })
|
|
4315
4337
|
}
|
|
@@ -4318,12 +4340,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4318
4340
|
n && /* @__PURE__ */ s(
|
|
4319
4341
|
"button",
|
|
4320
4342
|
{
|
|
4321
|
-
className:
|
|
4343
|
+
className: ve,
|
|
4322
4344
|
onClick: C,
|
|
4323
4345
|
type: "button",
|
|
4324
4346
|
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
4325
4347
|
children: /* @__PURE__ */ s(
|
|
4326
|
-
|
|
4348
|
+
Ie,
|
|
4327
4349
|
{
|
|
4328
4350
|
className: y("size-5", {
|
|
4329
4351
|
"text-yellow-600": S,
|
|
@@ -4335,7 +4357,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4335
4357
|
}
|
|
4336
4358
|
),
|
|
4337
4359
|
b && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
4338
|
-
|
|
4360
|
+
it,
|
|
4339
4361
|
{
|
|
4340
4362
|
channel: p,
|
|
4341
4363
|
participant: w,
|
|
@@ -4345,10 +4367,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4345
4367
|
onLeaveConversation: r,
|
|
4346
4368
|
onBlockParticipant: i,
|
|
4347
4369
|
onDeleteConversationClick: m,
|
|
4348
|
-
onBlockParticipantClick:
|
|
4370
|
+
onBlockParticipantClick: f,
|
|
4349
4371
|
onReportParticipantClick: h,
|
|
4350
|
-
customChannelActions:
|
|
4351
|
-
triggerClassName: y(
|
|
4372
|
+
customChannelActions: g,
|
|
4373
|
+
triggerClassName: y(ve, "bg-[#F1F0EE]")
|
|
4352
4374
|
}
|
|
4353
4375
|
))
|
|
4354
4376
|
] })
|
|
@@ -4359,13 +4381,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4359
4381
|
"button",
|
|
4360
4382
|
{
|
|
4361
4383
|
className: y(
|
|
4362
|
-
|
|
4384
|
+
ve,
|
|
4363
4385
|
"messaging-channel-view-back-button-desktop"
|
|
4364
4386
|
),
|
|
4365
4387
|
type: "button",
|
|
4366
4388
|
onClick: e,
|
|
4367
4389
|
"aria-label": "Back to conversations",
|
|
4368
|
-
children: /* @__PURE__ */ s(
|
|
4390
|
+
children: /* @__PURE__ */ s(at, { className: "size-5 text-black/90" })
|
|
4369
4391
|
}
|
|
4370
4392
|
),
|
|
4371
4393
|
v ? /* @__PURE__ */ u(
|
|
@@ -4384,7 +4406,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4384
4406
|
{
|
|
4385
4407
|
id: ((P = w == null ? void 0 : w.user) == null ? void 0 : P.id) || p.id || "unknown",
|
|
4386
4408
|
name: k,
|
|
4387
|
-
image:
|
|
4409
|
+
image: D,
|
|
4388
4410
|
starred: n && S,
|
|
4389
4411
|
dmAgentEnabled: a,
|
|
4390
4412
|
size: 48
|
|
@@ -4392,12 +4414,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4392
4414
|
),
|
|
4393
4415
|
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
4394
4416
|
/* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
4395
|
-
|
|
4396
|
-
/* @__PURE__ */ s(
|
|
4417
|
+
L,
|
|
4418
|
+
/* @__PURE__ */ s(xe, { className: "size-4 shrink-0", weight: "bold" })
|
|
4397
4419
|
] }),
|
|
4398
4420
|
a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4399
|
-
/* @__PURE__ */ s(
|
|
4400
|
-
/* @__PURE__ */ s("span", { className: "truncate", children:
|
|
4421
|
+
/* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
|
|
4422
|
+
/* @__PURE__ */ s("span", { className: "truncate", children: Oe })
|
|
4401
4423
|
] })
|
|
4402
4424
|
] })
|
|
4403
4425
|
]
|
|
@@ -4408,7 +4430,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4408
4430
|
{
|
|
4409
4431
|
id: (($ = w == null ? void 0 : w.user) == null ? void 0 : $.id) || p.id || "unknown",
|
|
4410
4432
|
name: k,
|
|
4411
|
-
image:
|
|
4433
|
+
image: D,
|
|
4412
4434
|
starred: n && S,
|
|
4413
4435
|
dmAgentEnabled: a,
|
|
4414
4436
|
size: 48
|
|
@@ -4416,9 +4438,9 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4416
4438
|
),
|
|
4417
4439
|
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
4418
4440
|
/* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
4419
|
-
|
|
4441
|
+
L,
|
|
4420
4442
|
/* @__PURE__ */ s(
|
|
4421
|
-
|
|
4443
|
+
xe,
|
|
4422
4444
|
{
|
|
4423
4445
|
className: "invisible size-4 shrink-0",
|
|
4424
4446
|
weight: "bold"
|
|
@@ -4426,8 +4448,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4426
4448
|
)
|
|
4427
4449
|
] }),
|
|
4428
4450
|
a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4429
|
-
/* @__PURE__ */ s(
|
|
4430
|
-
/* @__PURE__ */ s("span", { className: "truncate", children:
|
|
4451
|
+
/* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
|
|
4452
|
+
/* @__PURE__ */ s("span", { className: "truncate", children: Oe })
|
|
4431
4453
|
] })
|
|
4432
4454
|
] })
|
|
4433
4455
|
] })
|
|
@@ -4436,12 +4458,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4436
4458
|
n && /* @__PURE__ */ s(
|
|
4437
4459
|
"button",
|
|
4438
4460
|
{
|
|
4439
|
-
className:
|
|
4461
|
+
className: ve,
|
|
4440
4462
|
onClick: C,
|
|
4441
4463
|
type: "button",
|
|
4442
4464
|
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
4443
4465
|
children: /* @__PURE__ */ s(
|
|
4444
|
-
|
|
4466
|
+
Ie,
|
|
4445
4467
|
{
|
|
4446
4468
|
className: y("size-6", {
|
|
4447
4469
|
"text-yellow-600": S,
|
|
@@ -4453,7 +4475,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4453
4475
|
}
|
|
4454
4476
|
),
|
|
4455
4477
|
b && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
4456
|
-
|
|
4478
|
+
it,
|
|
4457
4479
|
{
|
|
4458
4480
|
channel: p,
|
|
4459
4481
|
participant: w,
|
|
@@ -4463,16 +4485,16 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4463
4485
|
onLeaveConversation: r,
|
|
4464
4486
|
onBlockParticipant: i,
|
|
4465
4487
|
onDeleteConversationClick: m,
|
|
4466
|
-
onBlockParticipantClick:
|
|
4488
|
+
onBlockParticipantClick: f,
|
|
4467
4489
|
onReportParticipantClick: h,
|
|
4468
|
-
customChannelActions:
|
|
4469
|
-
triggerClassName:
|
|
4490
|
+
customChannelActions: g,
|
|
4491
|
+
triggerClassName: ve
|
|
4470
4492
|
}
|
|
4471
4493
|
))
|
|
4472
4494
|
] })
|
|
4473
4495
|
] })
|
|
4474
4496
|
] });
|
|
4475
|
-
},
|
|
4497
|
+
}, Hi = ({
|
|
4476
4498
|
onBack: e,
|
|
4477
4499
|
showBackButton: t,
|
|
4478
4500
|
renderMessageInputActions: n,
|
|
@@ -4483,9 +4505,9 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4483
4505
|
showDeleteConversation: l = !0,
|
|
4484
4506
|
onDeleteConversationClick: d,
|
|
4485
4507
|
onBlockParticipantClick: m,
|
|
4486
|
-
onReportParticipantClick:
|
|
4508
|
+
onReportParticipantClick: f,
|
|
4487
4509
|
showBlockParticipant: h = !0,
|
|
4488
|
-
showReportParticipant:
|
|
4510
|
+
showReportParticipant: g = !0,
|
|
4489
4511
|
composerDisabled: c = !1,
|
|
4490
4512
|
composerDisabledReason: b,
|
|
4491
4513
|
showStarButton: v = !1,
|
|
@@ -4494,18 +4516,18 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4494
4516
|
renderHeaderTitleBadges: _,
|
|
4495
4517
|
customChannelActions: w,
|
|
4496
4518
|
renderChannelActions: k,
|
|
4497
|
-
renderMessage:
|
|
4519
|
+
renderMessage: D,
|
|
4498
4520
|
dmAgentEnabled: S = !1,
|
|
4499
4521
|
viewerLanguage: R,
|
|
4500
4522
|
showChannelInfo: O = !0,
|
|
4501
4523
|
onParticipantNameClick: F,
|
|
4502
|
-
composerInput:
|
|
4524
|
+
composerInput: L
|
|
4503
4525
|
}) => {
|
|
4504
4526
|
var N, A, H, q;
|
|
4505
|
-
const { channel: C } =
|
|
4527
|
+
const { channel: C } = ce(), { client: E } = fe(), I = V.useMemo(
|
|
4506
4528
|
() => {
|
|
4507
4529
|
var Y;
|
|
4508
|
-
return
|
|
4530
|
+
return He(
|
|
4509
4531
|
(Y = C.state) == null ? void 0 : Y.members,
|
|
4510
4532
|
E == null ? void 0 : E.userID,
|
|
4511
4533
|
C.type
|
|
@@ -4516,13 +4538,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4516
4538
|
var W;
|
|
4517
4539
|
const Y = E == null ? void 0 : E.userID;
|
|
4518
4540
|
return Y ? Object.values(((W = C.state) == null ? void 0 : W.members) || {}).find((Z) => {
|
|
4519
|
-
var
|
|
4520
|
-
return ((
|
|
4541
|
+
var ue;
|
|
4542
|
+
return ((ue = Z.user) == null ? void 0 : ue.id) === Y;
|
|
4521
4543
|
}) : void 0;
|
|
4522
4544
|
}, [E == null ? void 0 : E.userID, (A = C.state) == null ? void 0 : A.members]), M = ((H = T == null ? void 0 : T.user) == null ? void 0 : H.is_account) ?? (T == null ? void 0 : T.is_account), P = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), $ = S && M === !1 && P === !0, j = C.state.messages.some(
|
|
4523
4545
|
(Y) => Y.type !== "deleted"
|
|
4524
4546
|
), Q = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
|
|
4525
|
-
|
|
4547
|
+
ga,
|
|
4526
4548
|
{
|
|
4527
4549
|
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%)]",
|
|
4528
4550
|
onBack: e,
|
|
@@ -4534,41 +4556,41 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4534
4556
|
onBlockParticipant: o,
|
|
4535
4557
|
showDeleteConversation: l,
|
|
4536
4558
|
showBlockParticipant: h,
|
|
4537
|
-
showReportParticipant:
|
|
4559
|
+
showReportParticipant: g,
|
|
4538
4560
|
onDeleteConversationClick: d,
|
|
4539
4561
|
onBlockParticipantClick: m,
|
|
4540
|
-
onReportParticipantClick:
|
|
4562
|
+
onReportParticipantClick: f,
|
|
4541
4563
|
customChannelActions: w,
|
|
4542
4564
|
renderChannelActions: k,
|
|
4543
4565
|
onParticipantNameClick: F
|
|
4544
4566
|
}
|
|
4545
4567
|
) : null, X = J(
|
|
4546
4568
|
(Y) => {
|
|
4547
|
-
const { message:
|
|
4548
|
-
|
|
4569
|
+
const { message: U } = Ne("ChannelView"), W = /* @__PURE__ */ s(
|
|
4570
|
+
wi,
|
|
4549
4571
|
{
|
|
4550
4572
|
...Y,
|
|
4551
4573
|
chatbotVotingEnabled: x,
|
|
4552
4574
|
viewerLanguage: R
|
|
4553
4575
|
}
|
|
4554
4576
|
);
|
|
4555
|
-
return !
|
|
4577
|
+
return !D || !U ? W : D(W, U);
|
|
4556
4578
|
},
|
|
4557
|
-
[x,
|
|
4579
|
+
[x, D, R]
|
|
4558
4580
|
);
|
|
4559
4581
|
return /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
|
|
4560
|
-
|
|
4582
|
+
Cn,
|
|
4561
4583
|
{
|
|
4562
4584
|
overrides: {
|
|
4563
4585
|
Message: X,
|
|
4564
|
-
MessageActions:
|
|
4586
|
+
MessageActions: yi,
|
|
4565
4587
|
UnreadMessagesNotification: () => null,
|
|
4566
4588
|
UnreadMessagesSeparator: () => null
|
|
4567
4589
|
},
|
|
4568
|
-
children: /* @__PURE__ */ u(
|
|
4590
|
+
children: /* @__PURE__ */ u(Sn, { children: [
|
|
4569
4591
|
!F && /* @__PURE__ */ u(se, { children: [
|
|
4570
4592
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4571
|
-
|
|
4593
|
+
Gi,
|
|
4572
4594
|
{
|
|
4573
4595
|
onBack: e,
|
|
4574
4596
|
showBackButton: t,
|
|
@@ -4579,10 +4601,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4579
4601
|
onBlockParticipant: o,
|
|
4580
4602
|
showDeleteConversation: l,
|
|
4581
4603
|
showBlockParticipant: h,
|
|
4582
|
-
showReportParticipant:
|
|
4604
|
+
showReportParticipant: g,
|
|
4583
4605
|
onDeleteConversationClick: d,
|
|
4584
4606
|
onBlockParticipantClick: m,
|
|
4585
|
-
onReportParticipantClick:
|
|
4607
|
+
onReportParticipantClick: f,
|
|
4586
4608
|
customChannelActions: w,
|
|
4587
4609
|
renderChannelActions: k,
|
|
4588
4610
|
renderHeaderTitleBadges: _
|
|
@@ -4600,7 +4622,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4600
4622
|
Q
|
|
4601
4623
|
] }) }),
|
|
4602
4624
|
/* @__PURE__ */ s(
|
|
4603
|
-
|
|
4625
|
+
En,
|
|
4604
4626
|
{
|
|
4605
4627
|
head: F && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
|
|
4606
4628
|
ee,
|
|
@@ -4616,7 +4638,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4616
4638
|
),
|
|
4617
4639
|
r ? /* @__PURE__ */ s(V.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
|
|
4618
4640
|
/* @__PURE__ */ s(
|
|
4619
|
-
|
|
4641
|
+
Ti,
|
|
4620
4642
|
{
|
|
4621
4643
|
...n && {
|
|
4622
4644
|
renderActions: () => n == null ? void 0 : n(C)
|
|
@@ -4624,14 +4646,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4624
4646
|
renderFooter: () => a == null ? void 0 : a(C),
|
|
4625
4647
|
disabled: c,
|
|
4626
4648
|
disabledReason: b,
|
|
4627
|
-
composerInput:
|
|
4649
|
+
composerInput: L
|
|
4628
4650
|
},
|
|
4629
4651
|
"lt-channel-message-input"
|
|
4630
4652
|
)
|
|
4631
4653
|
] })
|
|
4632
4654
|
}
|
|
4633
4655
|
) });
|
|
4634
|
-
},
|
|
4656
|
+
}, zs = V.memo(
|
|
4635
4657
|
({
|
|
4636
4658
|
channel: e,
|
|
4637
4659
|
onBack: t,
|
|
@@ -4642,10 +4664,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4642
4664
|
onLeaveConversation: o,
|
|
4643
4665
|
onBlockParticipant: l,
|
|
4644
4666
|
className: d,
|
|
4645
|
-
CustomChannelEmptyState: m =
|
|
4646
|
-
showDeleteConversation:
|
|
4667
|
+
CustomChannelEmptyState: m = ji,
|
|
4668
|
+
showDeleteConversation: f = !0,
|
|
4647
4669
|
onDeleteConversationClick: h,
|
|
4648
|
-
onBlockParticipantClick:
|
|
4670
|
+
onBlockParticipantClick: g,
|
|
4649
4671
|
onReportParticipantClick: c,
|
|
4650
4672
|
showBlockParticipant: b = !0,
|
|
4651
4673
|
showReportParticipant: v = !0,
|
|
@@ -4654,12 +4676,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4654
4676
|
dmAgentEnabled: _,
|
|
4655
4677
|
messageMetadata: w,
|
|
4656
4678
|
onMessageSent: k,
|
|
4657
|
-
showStarButton:
|
|
4679
|
+
showStarButton: D = !1,
|
|
4658
4680
|
chatbotVotingEnabled: S = !1,
|
|
4659
4681
|
renderChannelBanner: R,
|
|
4660
4682
|
renderHeaderTitleBadges: O,
|
|
4661
4683
|
customChannelActions: F,
|
|
4662
|
-
renderChannelActions:
|
|
4684
|
+
renderChannelActions: L,
|
|
4663
4685
|
renderMessage: C,
|
|
4664
4686
|
onMessageLinkClick: E,
|
|
4665
4687
|
sendButton: I,
|
|
@@ -4681,10 +4703,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4681
4703
|
...w
|
|
4682
4704
|
}
|
|
4683
4705
|
}
|
|
4684
|
-
},
|
|
4706
|
+
}, U = {
|
|
4685
4707
|
...A,
|
|
4686
4708
|
...q && { skip_push: !0 }
|
|
4687
|
-
}, W = await e.sendMessage(Y,
|
|
4709
|
+
}, W = await e.sendMessage(Y, U);
|
|
4688
4710
|
return k == null || k(W), W;
|
|
4689
4711
|
},
|
|
4690
4712
|
[e, _, w, k]
|
|
@@ -4696,7 +4718,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4696
4718
|
const N = (A) => {
|
|
4697
4719
|
const H = A.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
|
|
4698
4720
|
if (!Y) return;
|
|
4699
|
-
const
|
|
4721
|
+
const U = q == null ? void 0 : q.closest("[data-message-id]"), W = U == null ? void 0 : U.getAttribute("data-message-id"), Z = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
|
|
4700
4722
|
E(Y, Z);
|
|
4701
4723
|
};
|
|
4702
4724
|
return X.addEventListener("click", N), () => X.removeEventListener("click", N);
|
|
@@ -4709,19 +4731,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4709
4731
|
d
|
|
4710
4732
|
),
|
|
4711
4733
|
children: /* @__PURE__ */ s(Ds.Provider, { value: _ ?? !1, children: /* @__PURE__ */ s(
|
|
4712
|
-
|
|
4734
|
+
kn,
|
|
4713
4735
|
{
|
|
4714
4736
|
channel: e,
|
|
4715
|
-
MessageSystem:
|
|
4737
|
+
MessageSystem: Oi,
|
|
4716
4738
|
EmptyStateIndicator: m,
|
|
4717
|
-
LoadingIndicator:
|
|
4718
|
-
DateSeparator:
|
|
4719
|
-
TypingIndicator:
|
|
4739
|
+
LoadingIndicator: Ve,
|
|
4740
|
+
DateSeparator: pa,
|
|
4741
|
+
TypingIndicator: Ui,
|
|
4720
4742
|
doSendMessageRequest: Q,
|
|
4721
4743
|
...I ? { SendButton: I } : {},
|
|
4722
4744
|
...T ? { AttachmentPreviewList: T } : {},
|
|
4723
4745
|
children: /* @__PURE__ */ s(
|
|
4724
|
-
|
|
4746
|
+
Hi,
|
|
4725
4747
|
{
|
|
4726
4748
|
onBack: t,
|
|
4727
4749
|
showBackButton: n,
|
|
@@ -4731,21 +4753,21 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4731
4753
|
onLeaveConversation: o,
|
|
4732
4754
|
onBlockParticipant: l,
|
|
4733
4755
|
CustomChannelEmptyState: m,
|
|
4734
|
-
showDeleteConversation:
|
|
4756
|
+
showDeleteConversation: f,
|
|
4735
4757
|
onDeleteConversationClick: h,
|
|
4736
|
-
onBlockParticipantClick:
|
|
4758
|
+
onBlockParticipantClick: g,
|
|
4737
4759
|
onReportParticipantClick: c,
|
|
4738
4760
|
showBlockParticipant: b,
|
|
4739
4761
|
showReportParticipant: v,
|
|
4740
4762
|
composerDisabled: x,
|
|
4741
4763
|
composerDisabledReason: p,
|
|
4742
|
-
showStarButton:
|
|
4764
|
+
showStarButton: D,
|
|
4743
4765
|
dmAgentEnabled: _,
|
|
4744
4766
|
chatbotVotingEnabled: S,
|
|
4745
4767
|
renderChannelBanner: R,
|
|
4746
4768
|
renderHeaderTitleBadges: O,
|
|
4747
4769
|
customChannelActions: F,
|
|
4748
|
-
renderChannelActions:
|
|
4770
|
+
renderChannelActions: L,
|
|
4749
4771
|
renderMessage: C,
|
|
4750
4772
|
viewerLanguage: M,
|
|
4751
4773
|
showChannelInfo: P,
|
|
@@ -4759,8 +4781,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4759
4781
|
);
|
|
4760
4782
|
}
|
|
4761
4783
|
);
|
|
4762
|
-
|
|
4763
|
-
const
|
|
4784
|
+
zs.displayName = "ChannelView";
|
|
4785
|
+
const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
|
|
4764
4786
|
/* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
4765
4787
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
4766
4788
|
/* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -4774,8 +4796,8 @@ const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4774
4796
|
}
|
|
4775
4797
|
)
|
|
4776
4798
|
] }) }));
|
|
4777
|
-
|
|
4778
|
-
const
|
|
4799
|
+
Ce.displayName = "ErrorState";
|
|
4800
|
+
const bl = ({
|
|
4779
4801
|
capabilities: e = {},
|
|
4780
4802
|
renderMessageInputActions: t,
|
|
4781
4803
|
renderConversationFooter: n,
|
|
@@ -4786,9 +4808,9 @@ const ml = ({
|
|
|
4786
4808
|
CustomChannelEmptyState: l,
|
|
4787
4809
|
onBlockParticipantClick: d,
|
|
4788
4810
|
onReportParticipantClick: m,
|
|
4789
|
-
dmAgentEnabled:
|
|
4811
|
+
dmAgentEnabled: f,
|
|
4790
4812
|
onMessageSent: h,
|
|
4791
|
-
chatbotVotingEnabled:
|
|
4813
|
+
chatbotVotingEnabled: g = !1,
|
|
4792
4814
|
viewerLanguage: c,
|
|
4793
4815
|
renderHeaderTitleBadges: b,
|
|
4794
4816
|
renderChannelBanner: v,
|
|
@@ -4797,18 +4819,18 @@ const ml = ({
|
|
|
4797
4819
|
onParticipantNameClick: _,
|
|
4798
4820
|
renderMessage: w,
|
|
4799
4821
|
onMessageLinkClick: k,
|
|
4800
|
-
showChannelInfo:
|
|
4822
|
+
showChannelInfo: D,
|
|
4801
4823
|
composerInput: S
|
|
4802
4824
|
}) => {
|
|
4803
4825
|
const {
|
|
4804
4826
|
client: R,
|
|
4805
4827
|
isConnected: O,
|
|
4806
4828
|
isLoading: F,
|
|
4807
|
-
error:
|
|
4829
|
+
error: L,
|
|
4808
4830
|
refreshConnection: C,
|
|
4809
4831
|
service: E,
|
|
4810
4832
|
debug: I
|
|
4811
|
-
} =
|
|
4833
|
+
} = ta(), [T, M] = B(null), [P, $] = B(null), [j, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
|
|
4812
4834
|
X.current = o;
|
|
4813
4835
|
const N = G(a);
|
|
4814
4836
|
N.current = a;
|
|
@@ -4817,16 +4839,16 @@ const ml = ({
|
|
|
4817
4839
|
H.current = T;
|
|
4818
4840
|
}, [T]), K(() => {
|
|
4819
4841
|
if (!R || !O) return;
|
|
4820
|
-
const
|
|
4821
|
-
if (!
|
|
4822
|
-
const W = `${
|
|
4842
|
+
const U = R.userID;
|
|
4843
|
+
if (!U) return;
|
|
4844
|
+
const W = `${U}::${i}`;
|
|
4823
4845
|
if (A.current === W) return;
|
|
4824
4846
|
A.current = W;
|
|
4825
4847
|
const Z = () => {
|
|
4826
4848
|
A.current === W && (A.current = null);
|
|
4827
4849
|
};
|
|
4828
4850
|
(async () => {
|
|
4829
|
-
var De,
|
|
4851
|
+
var De, ze;
|
|
4830
4852
|
try {
|
|
4831
4853
|
I && console.log(
|
|
4832
4854
|
"[MessagingShell] Loading initial conversation with:",
|
|
@@ -4835,7 +4857,7 @@ const ml = ({
|
|
|
4835
4857
|
const ae = await R.queryChannels(
|
|
4836
4858
|
{
|
|
4837
4859
|
type: "messaging",
|
|
4838
|
-
members: { $eq: [
|
|
4860
|
+
members: { $eq: [U, i] }
|
|
4839
4861
|
},
|
|
4840
4862
|
{},
|
|
4841
4863
|
{ limit: 1 }
|
|
@@ -4847,8 +4869,8 @@ const ml = ({
|
|
|
4847
4869
|
);
|
|
4848
4870
|
return;
|
|
4849
4871
|
}
|
|
4850
|
-
const
|
|
4851
|
-
if (!
|
|
4872
|
+
const me = X.current;
|
|
4873
|
+
if (!me || !E) {
|
|
4852
4874
|
Z(), $("No conversation found with this account"), I && console.log(
|
|
4853
4875
|
"[MessagingShell] No conversation found for:",
|
|
4854
4876
|
i
|
|
@@ -4856,19 +4878,19 @@ const ml = ({
|
|
|
4856
4878
|
return;
|
|
4857
4879
|
}
|
|
4858
4880
|
try {
|
|
4859
|
-
const
|
|
4860
|
-
id:
|
|
4861
|
-
name:
|
|
4862
|
-
phone:
|
|
4881
|
+
const oe = await E.startChannelWithParticipant({
|
|
4882
|
+
id: me.id,
|
|
4883
|
+
name: me.name,
|
|
4884
|
+
phone: me.phone
|
|
4863
4885
|
});
|
|
4864
|
-
M(
|
|
4886
|
+
M(oe), $(null), (ze = N.current) == null || ze.call(N, oe), I && console.log(
|
|
4865
4887
|
"[MessagingShell] Channel created and loaded:",
|
|
4866
|
-
|
|
4888
|
+
oe.id
|
|
4867
4889
|
);
|
|
4868
|
-
} catch (
|
|
4890
|
+
} catch (oe) {
|
|
4869
4891
|
console.error(
|
|
4870
4892
|
"[MessagingShell] Failed to create conversation:",
|
|
4871
|
-
|
|
4893
|
+
oe
|
|
4872
4894
|
), Z(), $("Failed to create conversation");
|
|
4873
4895
|
}
|
|
4874
4896
|
} catch (ae) {
|
|
@@ -4882,17 +4904,17 @@ const ml = ({
|
|
|
4882
4904
|
const q = G(r);
|
|
4883
4905
|
q.current = r;
|
|
4884
4906
|
const Y = J(() => {
|
|
4885
|
-
var
|
|
4886
|
-
M(null), Q(!0), (
|
|
4907
|
+
var U;
|
|
4908
|
+
M(null), Q(!0), (U = q.current) == null || U.call(q);
|
|
4887
4909
|
}, []);
|
|
4888
|
-
return F ? /* @__PURE__ */ s(
|
|
4889
|
-
|
|
4910
|
+
return F ? /* @__PURE__ */ s(Ve, {}) : L ? /* @__PURE__ */ s(Ce, { message: L, onBack: C }) : !O || !R ? /* @__PURE__ */ s(
|
|
4911
|
+
Ce,
|
|
4890
4912
|
{
|
|
4891
4913
|
message: "Not connected to messaging service",
|
|
4892
4914
|
onBack: C
|
|
4893
4915
|
}
|
|
4894
|
-
) : P ? /* @__PURE__ */ s(
|
|
4895
|
-
|
|
4916
|
+
) : P ? /* @__PURE__ */ s(Ce, { message: P }) : j && !T ? /* @__PURE__ */ s(Ce, { message: "Conversation ended" }) : T ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
4917
|
+
zs,
|
|
4896
4918
|
{
|
|
4897
4919
|
channel: T,
|
|
4898
4920
|
renderMessageInputActions: t,
|
|
@@ -4904,9 +4926,9 @@ const ml = ({
|
|
|
4904
4926
|
showDeleteConversation: ee,
|
|
4905
4927
|
onBlockParticipantClick: d,
|
|
4906
4928
|
onReportParticipantClick: m,
|
|
4907
|
-
dmAgentEnabled:
|
|
4929
|
+
dmAgentEnabled: f,
|
|
4908
4930
|
onMessageSent: h,
|
|
4909
|
-
chatbotVotingEnabled:
|
|
4931
|
+
chatbotVotingEnabled: g,
|
|
4910
4932
|
viewerLanguage: c,
|
|
4911
4933
|
renderHeaderTitleBadges: b,
|
|
4912
4934
|
customChannelActions: x,
|
|
@@ -4914,19 +4936,19 @@ const ml = ({
|
|
|
4914
4936
|
onParticipantNameClick: _,
|
|
4915
4937
|
renderMessage: w,
|
|
4916
4938
|
onMessageLinkClick: k,
|
|
4917
|
-
showChannelInfo:
|
|
4939
|
+
showChannelInfo: D,
|
|
4918
4940
|
composerInput: S
|
|
4919
4941
|
},
|
|
4920
4942
|
T.id
|
|
4921
|
-
) }) }) : /* @__PURE__ */ s(
|
|
4943
|
+
) }) }) : /* @__PURE__ */ s(Ve, {});
|
|
4922
4944
|
};
|
|
4923
|
-
function
|
|
4945
|
+
function Yi(e) {
|
|
4924
4946
|
const t = e.state.pending_messages;
|
|
4925
4947
|
if (t != null && t.length)
|
|
4926
4948
|
for (const n of t)
|
|
4927
4949
|
e.state.addMessageSorted(n.message);
|
|
4928
4950
|
}
|
|
4929
|
-
const
|
|
4951
|
+
const Fs = V.createContext({
|
|
4930
4952
|
selectedChannel: void 0,
|
|
4931
4953
|
onChannelSelect: () => {
|
|
4932
4954
|
},
|
|
@@ -4934,18 +4956,18 @@ const zs = V.createContext({
|
|
|
4934
4956
|
renderMessagePreview: void 0,
|
|
4935
4957
|
channelPreview: void 0,
|
|
4936
4958
|
viewerLanguage: void 0
|
|
4937
|
-
}),
|
|
4959
|
+
}), qi = Fs.Provider, Wi = () => V.useContext(Fs), Xi = (e, t) => {
|
|
4938
4960
|
const n = new Date(
|
|
4939
4961
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
4940
4962
|
), r = new Date(
|
|
4941
4963
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
4942
4964
|
).getTime() - n.getTime();
|
|
4943
4965
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
4944
|
-
},
|
|
4966
|
+
}, Ki = (e) => {
|
|
4945
4967
|
const t = /* @__PURE__ */ new Date();
|
|
4946
4968
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
4947
4969
|
return "Just now";
|
|
4948
|
-
const a =
|
|
4970
|
+
const a = Xi(e, t);
|
|
4949
4971
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
4950
4972
|
hour: "numeric",
|
|
4951
4973
|
minute: "2-digit",
|
|
@@ -4955,9 +4977,9 @@ const zs = V.createContext({
|
|
|
4955
4977
|
day: "numeric",
|
|
4956
4978
|
year: "2-digit"
|
|
4957
4979
|
});
|
|
4958
|
-
},
|
|
4980
|
+
}, Ps = V.memo(
|
|
4959
4981
|
(e) => {
|
|
4960
|
-
var O, F,
|
|
4982
|
+
var O, F, L;
|
|
4961
4983
|
const { channel: t, unread: n } = e, {
|
|
4962
4984
|
selectedChannel: a,
|
|
4963
4985
|
onChannelSelect: r,
|
|
@@ -4965,28 +4987,28 @@ const zs = V.createContext({
|
|
|
4965
4987
|
channelPreview: o,
|
|
4966
4988
|
renderMessagePreview: l,
|
|
4967
4989
|
viewerLanguage: d
|
|
4968
|
-
} =
|
|
4990
|
+
} = Wi(), { client: m } = fe(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ut(t);
|
|
4969
4991
|
if (o)
|
|
4970
4992
|
return /* @__PURE__ */ s(
|
|
4971
4993
|
o,
|
|
4972
4994
|
{
|
|
4973
4995
|
...e,
|
|
4974
|
-
active:
|
|
4996
|
+
active: f,
|
|
4975
4997
|
selectedChannel: a,
|
|
4976
4998
|
onChannelSelect: r,
|
|
4977
4999
|
viewerLanguage: d
|
|
4978
5000
|
}
|
|
4979
5001
|
);
|
|
4980
|
-
const
|
|
5002
|
+
const g = () => {
|
|
4981
5003
|
t && r(t);
|
|
4982
5004
|
}, c = (C) => {
|
|
4983
5005
|
const E = C.key === "Enter" || C.key === " ", I = C.repeat;
|
|
4984
|
-
!E || I || (C.preventDefault(),
|
|
4985
|
-
}, b =
|
|
5006
|
+
!E || I || (C.preventDefault(), g());
|
|
5007
|
+
}, b = He(
|
|
4986
5008
|
(O = t == null ? void 0 : t.state) == null ? void 0 : O.members,
|
|
4987
5009
|
m == null ? void 0 : m.userID,
|
|
4988
5010
|
t == null ? void 0 : t.type
|
|
4989
|
-
), v =
|
|
5011
|
+
), v = mt(b == null ? void 0 : b.user), x = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, p = (() => {
|
|
4990
5012
|
var E;
|
|
4991
5013
|
const C = (E = t == null ? void 0 : t.state) == null ? void 0 : E.messages;
|
|
4992
5014
|
if (C != null && C.length) {
|
|
@@ -4995,7 +5017,7 @@ const zs = V.createContext({
|
|
|
4995
5017
|
}
|
|
4996
5018
|
})(), w = (() => {
|
|
4997
5019
|
var M;
|
|
4998
|
-
const C =
|
|
5020
|
+
const C = us({
|
|
4999
5021
|
message: p,
|
|
5000
5022
|
viewerLanguage: d
|
|
5001
5023
|
}), { custom_type: E, attachment_content_type: I } = (p == null ? void 0 : p.metadata) || {};
|
|
@@ -5012,10 +5034,10 @@ const zs = V.createContext({
|
|
|
5012
5034
|
if (C) return C;
|
|
5013
5035
|
const T = (M = p == null ? void 0 : p.attachments) == null ? void 0 : M[0];
|
|
5014
5036
|
return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5015
|
-
})(), k = p != null && p.created_at ?
|
|
5037
|
+
})(), k = p != null && p.created_at ? Ki(new Date(p.created_at)) : "", D = p ? Ue(p) : !1, S = l ? l(p, w) : `${D ? "✨ " : ""}${w}`, R = n ?? 0;
|
|
5016
5038
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5017
5039
|
channelId: t == null ? void 0 : t.id,
|
|
5018
|
-
isSelected:
|
|
5040
|
+
isSelected: f,
|
|
5019
5041
|
participantName: v,
|
|
5020
5042
|
unreadCount: R,
|
|
5021
5043
|
hasTimestamp: !!k
|
|
@@ -5024,13 +5046,13 @@ const zs = V.createContext({
|
|
|
5024
5046
|
{
|
|
5025
5047
|
role: "button",
|
|
5026
5048
|
tabIndex: 0,
|
|
5027
|
-
onClick:
|
|
5049
|
+
onClick: g,
|
|
5028
5050
|
onKeyDown: c,
|
|
5029
5051
|
className: y(
|
|
5030
5052
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
5031
5053
|
{
|
|
5032
|
-
"bg-black/[0.04]":
|
|
5033
|
-
"hover:bg-black/[0.02]": !
|
|
5054
|
+
"bg-black/[0.04]": f,
|
|
5055
|
+
"hover:bg-black/[0.02]": !f
|
|
5034
5056
|
}
|
|
5035
5057
|
),
|
|
5036
5058
|
"data-dd-privacy": "mask",
|
|
@@ -5038,7 +5060,7 @@ const zs = V.createContext({
|
|
|
5038
5060
|
/* @__PURE__ */ s(
|
|
5039
5061
|
ne,
|
|
5040
5062
|
{
|
|
5041
|
-
id: ((
|
|
5063
|
+
id: ((L = b == null ? void 0 : b.user) == null ? void 0 : L.id) || t.id || "unknown",
|
|
5042
5064
|
name: v,
|
|
5043
5065
|
image: x,
|
|
5044
5066
|
size: 48,
|
|
@@ -5071,22 +5093,22 @@ const zs = V.createContext({
|
|
|
5071
5093
|
);
|
|
5072
5094
|
}
|
|
5073
5095
|
);
|
|
5074
|
-
|
|
5075
|
-
const
|
|
5096
|
+
Ps.displayName = "CustomChannelPreview";
|
|
5097
|
+
const Zi = { last_message_at: -1 }, Ji = V.memo(
|
|
5076
5098
|
({
|
|
5077
5099
|
onChannelSelect: e,
|
|
5078
5100
|
selectedChannel: t,
|
|
5079
5101
|
filters: n,
|
|
5080
5102
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5081
5103
|
channelRenderFilterFn: r,
|
|
5082
|
-
sort: i =
|
|
5104
|
+
sort: i = Zi,
|
|
5083
5105
|
className: o,
|
|
5084
5106
|
customEmptyStateIndicator: l,
|
|
5085
|
-
channelListPaginator: d =
|
|
5107
|
+
channelListPaginator: d = Tn,
|
|
5086
5108
|
channelPreview: m,
|
|
5087
|
-
renderMessagePreview:
|
|
5109
|
+
renderMessagePreview: f,
|
|
5088
5110
|
viewerLanguage: h,
|
|
5089
|
-
lockChannelOrder:
|
|
5111
|
+
lockChannelOrder: g,
|
|
5090
5112
|
onMessageNewHandler: c,
|
|
5091
5113
|
onMessageNew: b,
|
|
5092
5114
|
onChannelVisible: v,
|
|
@@ -5095,10 +5117,10 @@ const Yi = { last_message_at: -1 }, qi = V.memo(
|
|
|
5095
5117
|
}) => {
|
|
5096
5118
|
const _ = V.useRef(0);
|
|
5097
5119
|
_.current++;
|
|
5098
|
-
const { debug: w = !1 } =
|
|
5120
|
+
const { debug: w = !1 } = dt(), k = V.useCallback(
|
|
5099
5121
|
(S) => {
|
|
5100
5122
|
for (const R of S)
|
|
5101
|
-
|
|
5123
|
+
Yi(R);
|
|
5102
5124
|
return r ? r(S) : S;
|
|
5103
5125
|
},
|
|
5104
5126
|
[r]
|
|
@@ -5108,13 +5130,13 @@ const Yi = { last_message_at: -1 }, qi = V.memo(
|
|
|
5108
5130
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5109
5131
|
filters: n
|
|
5110
5132
|
});
|
|
5111
|
-
const
|
|
5133
|
+
const D = V.useMemo(
|
|
5112
5134
|
() => ({
|
|
5113
5135
|
selectedChannel: t,
|
|
5114
5136
|
onChannelSelect: e,
|
|
5115
5137
|
debug: w,
|
|
5116
5138
|
channelPreview: m,
|
|
5117
|
-
renderMessagePreview:
|
|
5139
|
+
renderMessagePreview: f,
|
|
5118
5140
|
viewerLanguage: h
|
|
5119
5141
|
}),
|
|
5120
5142
|
[
|
|
@@ -5122,7 +5144,7 @@ const Yi = { last_message_at: -1 }, qi = V.memo(
|
|
|
5122
5144
|
e,
|
|
5123
5145
|
w,
|
|
5124
5146
|
m,
|
|
5125
|
-
|
|
5147
|
+
f,
|
|
5126
5148
|
h
|
|
5127
5149
|
]
|
|
5128
5150
|
);
|
|
@@ -5133,22 +5155,22 @@ const Yi = { last_message_at: -1 }, qi = V.memo(
|
|
|
5133
5155
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5134
5156
|
o
|
|
5135
5157
|
),
|
|
5136
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5137
|
-
|
|
5158
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(qi, { value: D, children: /* @__PURE__ */ s(
|
|
5159
|
+
In,
|
|
5138
5160
|
{
|
|
5139
5161
|
filters: n,
|
|
5140
5162
|
sort: i,
|
|
5141
5163
|
options: { limit: 30 },
|
|
5142
5164
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5143
5165
|
channelRenderFilterFn: k,
|
|
5144
|
-
lockChannelOrder:
|
|
5166
|
+
lockChannelOrder: g,
|
|
5145
5167
|
onMessageNewHandler: c,
|
|
5146
5168
|
onMessageNew: b,
|
|
5147
5169
|
onChannelVisible: v,
|
|
5148
5170
|
onAddedToChannel: x,
|
|
5149
5171
|
onChannelUpdated: p,
|
|
5150
5172
|
Paginator: d,
|
|
5151
|
-
Preview:
|
|
5173
|
+
Preview: Ps,
|
|
5152
5174
|
EmptyStateIndicator: l
|
|
5153
5175
|
},
|
|
5154
5176
|
`${JSON.stringify(n)}:${JSON.stringify(i)}`
|
|
@@ -5157,11 +5179,11 @@ const Yi = { last_message_at: -1 }, qi = V.memo(
|
|
|
5157
5179
|
);
|
|
5158
5180
|
}
|
|
5159
5181
|
);
|
|
5160
|
-
|
|
5161
|
-
const
|
|
5182
|
+
Ji.displayName = "ChannelList";
|
|
5183
|
+
const ns = `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%`, Qi = {
|
|
5162
5184
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5163
5185
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5164
|
-
},
|
|
5186
|
+
}, el = ({ variant: e }) => /* @__PURE__ */ s(
|
|
5165
5187
|
"span",
|
|
5166
5188
|
{
|
|
5167
5189
|
"aria-hidden": "true",
|
|
@@ -5171,12 +5193,12 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5171
5193
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5172
5194
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5173
5195
|
transformOrigin: "center",
|
|
5174
|
-
backgroundColor:
|
|
5175
|
-
WebkitMask:
|
|
5176
|
-
mask:
|
|
5196
|
+
backgroundColor: Qi[e],
|
|
5197
|
+
WebkitMask: ns,
|
|
5198
|
+
mask: ns
|
|
5177
5199
|
}
|
|
5178
5200
|
}
|
|
5179
|
-
),
|
|
5201
|
+
), tl = {
|
|
5180
5202
|
sent: {
|
|
5181
5203
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5182
5204
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5185,7 +5207,7 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5185
5207
|
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5186
5208
|
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5187
5209
|
}
|
|
5188
|
-
},
|
|
5210
|
+
}, Os = ({
|
|
5189
5211
|
variant: e,
|
|
5190
5212
|
text: t,
|
|
5191
5213
|
tail: n = !0,
|
|
@@ -5201,23 +5223,23 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5201
5223
|
r
|
|
5202
5224
|
),
|
|
5203
5225
|
style: {
|
|
5204
|
-
...
|
|
5226
|
+
...tl[e],
|
|
5205
5227
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5206
5228
|
isolation: "isolate"
|
|
5207
5229
|
},
|
|
5208
5230
|
children: [
|
|
5209
5231
|
a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5210
5232
|
/* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
|
|
5211
|
-
n && /* @__PURE__ */ s(
|
|
5233
|
+
n && /* @__PURE__ */ s(el, { variant: e })
|
|
5212
5234
|
]
|
|
5213
5235
|
}
|
|
5214
|
-
),
|
|
5236
|
+
), sl = ({
|
|
5215
5237
|
text: e,
|
|
5216
5238
|
tail: t,
|
|
5217
5239
|
header: n,
|
|
5218
5240
|
className: a
|
|
5219
5241
|
}) => /* @__PURE__ */ s(
|
|
5220
|
-
|
|
5242
|
+
Os,
|
|
5221
5243
|
{
|
|
5222
5244
|
variant: "received",
|
|
5223
5245
|
text: e,
|
|
@@ -5225,10 +5247,10 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5225
5247
|
header: n,
|
|
5226
5248
|
className: a
|
|
5227
5249
|
}
|
|
5228
|
-
),
|
|
5229
|
-
Sent:
|
|
5230
|
-
Received:
|
|
5231
|
-
},
|
|
5250
|
+
), nl = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Os, { variant: "sent", text: e, tail: t, className: n }), vl = {
|
|
5251
|
+
Sent: nl,
|
|
5252
|
+
Received: sl
|
|
5253
|
+
}, al = ({
|
|
5232
5254
|
question: e,
|
|
5233
5255
|
onClick: t,
|
|
5234
5256
|
loading: n = !1,
|
|
@@ -5250,7 +5272,7 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5250
5272
|
),
|
|
5251
5273
|
children: e
|
|
5252
5274
|
}
|
|
5253
|
-
),
|
|
5275
|
+
), xl = ({
|
|
5254
5276
|
faqs: e,
|
|
5255
5277
|
onFaqClick: t,
|
|
5256
5278
|
loadingFaqId: n,
|
|
@@ -5279,7 +5301,7 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5279
5301
|
children: [
|
|
5280
5302
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5281
5303
|
l.map((d) => /* @__PURE__ */ s(
|
|
5282
|
-
|
|
5304
|
+
al,
|
|
5283
5305
|
{
|
|
5284
5306
|
question: d.question,
|
|
5285
5307
|
onClick: () => t(d.id),
|
|
@@ -5293,41 +5315,42 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5293
5315
|
] }) });
|
|
5294
5316
|
};
|
|
5295
5317
|
export {
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5318
|
+
hs as A,
|
|
5319
|
+
pt as B,
|
|
5320
|
+
ji as C,
|
|
5321
|
+
mt as D,
|
|
5322
|
+
pl as E,
|
|
5323
|
+
xl as F,
|
|
5324
|
+
Or as G,
|
|
5325
|
+
va as H,
|
|
5326
|
+
ta as I,
|
|
5327
|
+
Zt as L,
|
|
5328
|
+
fl as M,
|
|
5329
|
+
ye as a,
|
|
5307
5330
|
ne as b,
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
+
Ji as c,
|
|
5332
|
+
zs as d,
|
|
5333
|
+
gl as e,
|
|
5334
|
+
al as f,
|
|
5335
|
+
de as g,
|
|
5336
|
+
Pe as h,
|
|
5337
|
+
ke as i,
|
|
5338
|
+
vl as j,
|
|
5339
|
+
Wr as k,
|
|
5340
|
+
hl as l,
|
|
5341
|
+
bl as m,
|
|
5342
|
+
sr as n,
|
|
5343
|
+
ie as o,
|
|
5344
|
+
Qa as p,
|
|
5345
|
+
Ki as q,
|
|
5346
|
+
_e as r,
|
|
5347
|
+
tr as s,
|
|
5348
|
+
us as t,
|
|
5349
|
+
ps as u,
|
|
5350
|
+
ra as v,
|
|
5351
|
+
Ya as w,
|
|
5352
|
+
xa as x,
|
|
5353
|
+
He as y,
|
|
5331
5354
|
gt as z
|
|
5332
5355
|
};
|
|
5333
|
-
//# sourceMappingURL=index-
|
|
5356
|
+
//# sourceMappingURL=index-D9_M5IWl.js.map
|