@linktr.ee/messaging-react 3.6.2-rc-1783317817 → 3.6.2-rc-1783332217
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-Ca5OtJh6.js → Card-0wf8lj5n.js} +2 -2
- package/dist/{Card-Ca5OtJh6.js.map → Card-0wf8lj5n.js.map} +1 -1
- package/dist/{Card-BYdqLBN3.cjs → Card-4UyBK3XO.cjs} +2 -2
- package/dist/{Card-BYdqLBN3.cjs.map → Card-4UyBK3XO.cjs.map} +1 -1
- package/dist/{Card-iHrzL32q.cjs → Card-6b4Ws9rn.cjs} +2 -2
- package/dist/{Card-iHrzL32q.cjs.map → Card-6b4Ws9rn.cjs.map} +1 -1
- package/dist/{Card-DuSTf-S8.cjs → Card-DsQhJjj0.cjs} +2 -2
- package/dist/{Card-DuSTf-S8.cjs.map → Card-DsQhJjj0.cjs.map} +1 -1
- package/dist/{Card-CZDLISxS.js → Card-RZ6C_IkE.js} +3 -3
- package/dist/{Card-CZDLISxS.js.map → Card-RZ6C_IkE.js.map} +1 -1
- package/dist/{Card-gjy-ib_1.js → Card-iGNcxybY.js} +2 -2
- package/dist/{Card-gjy-ib_1.js.map → Card-iGNcxybY.js.map} +1 -1
- package/dist/{LockedThumbnail-COK5XPQ9.js → LockedThumbnail-Do9udNMm.js} +2 -2
- package/dist/{LockedThumbnail-COK5XPQ9.js.map → LockedThumbnail-Do9udNMm.js.map} +1 -1
- package/dist/{LockedThumbnail-DrWiitE6.cjs → LockedThumbnail-N0pNOO3D.cjs} +2 -2
- package/dist/{LockedThumbnail-DrWiitE6.cjs.map → LockedThumbnail-N0pNOO3D.cjs.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/index-B3ZJaqJY.cjs +2 -0
- package/dist/index-B3ZJaqJY.cjs.map +1 -0
- package/dist/{index-CnR5N9Co.js → index-wFe1UO9t.js} +1104 -1097
- package/dist/index-wFe1UO9t.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/CustomMessage/CustomMessage.stories.tsx +11 -18
- package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +107 -0
- package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +86 -0
- package/src/components/CustomMessage/index.tsx +2 -3
- package/src/styles.css +25 -16
- package/dist/index-CnR5N9Co.js.map +0 -1
- package/dist/index-pODWIZCi.cjs +0 -2
- package/dist/index-pODWIZCi.cjs.map +0 -1
- package/src/components/CustomMessage/MessageDeliveryStatus.test.tsx +0 -66
- package/src/components/CustomMessage/MessageDeliveryStatus.tsx +0 -53
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as s, jsxs as m, Fragment as
|
|
2
|
-
import U, { createContext as
|
|
1
|
+
import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
|
|
2
|
+
import U, { createContext as rt, useContext as Ie, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Gs, useMemo as se, Suspense as it } from "react";
|
|
3
3
|
import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
|
|
5
|
-
import { Chat as qs, useChannelStateContext as
|
|
6
|
-
import { StarIcon as Ee, DotsThreeIcon as
|
|
5
|
+
import { Chat as qs, useChannelStateContext as le, useChatContext as oe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, MessageText as qt, MessageErrorIcon as Wt, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as et, CurrencyDollarIcon as Dn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as jn, FileXlsIcon as Bn, FileDocIcon as Un, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Be, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
|
|
7
7
|
import k from "classnames";
|
|
8
|
-
import { MessageActions as
|
|
9
|
-
const us =
|
|
8
|
+
import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
|
|
9
|
+
const us = rt({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const us = at({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), lt = () => Ie(us), dl = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -24,10 +24,10 @@ const us = at({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
var
|
|
27
|
+
var A, E;
|
|
28
28
|
const l = J(
|
|
29
|
-
(C, ...
|
|
30
|
-
i && console.log(`🔥 [MessagingProvider] ${C}`, ...
|
|
29
|
+
(C, ...I) => {
|
|
30
|
+
i && console.log(`🔥 [MessagingProvider] ${C}`, ...I);
|
|
31
31
|
},
|
|
32
32
|
[i]
|
|
33
33
|
);
|
|
@@ -37,37 +37,37 @@ const us = at({
|
|
|
37
37
|
serviceConfig: !!n,
|
|
38
38
|
capabilities: Object.keys(r)
|
|
39
39
|
});
|
|
40
|
-
const [o, d] = B(null), [u, p] = B(null), [h,
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
40
|
+
const [o, d] = B(null), [u, p] = B(null), [h, g] = B(!1), [c, v] = B(!1), [w, b] = B(null), f = G(!1), x = G(null), N = G(n);
|
|
41
|
+
N.current = n;
|
|
42
|
+
const S = G(i);
|
|
43
|
+
S.current = i;
|
|
44
|
+
const T = G({
|
|
45
45
|
userId: t == null ? void 0 : t.id,
|
|
46
46
|
apiKey: a,
|
|
47
47
|
serviceConfig: n,
|
|
48
48
|
capabilities: r
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
renderCount:
|
|
49
|
+
}), M = G(0);
|
|
50
|
+
M.current++, l("📊 RENDER INFO", {
|
|
51
|
+
renderCount: M.current,
|
|
52
52
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
53
53
|
propChanges: {
|
|
54
|
-
userChanged:
|
|
55
|
-
apiKeyChanged:
|
|
56
|
-
serviceConfigChanged:
|
|
57
|
-
capabilitiesChanged:
|
|
54
|
+
userChanged: T.current.userId !== (t == null ? void 0 : t.id),
|
|
55
|
+
apiKeyChanged: T.current.apiKey !== a,
|
|
56
|
+
serviceConfigChanged: T.current.serviceConfig !== n,
|
|
57
|
+
capabilitiesChanged: T.current.capabilities !== r
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
59
|
+
}), T.current = {
|
|
60
60
|
userId: t == null ? void 0 : t.id,
|
|
61
61
|
apiKey: a,
|
|
62
62
|
serviceConfig: n,
|
|
63
63
|
capabilities: r
|
|
64
64
|
};
|
|
65
|
-
const L =
|
|
66
|
-
a && ((
|
|
65
|
+
const L = G(null);
|
|
66
|
+
a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new Ys(a) });
|
|
67
67
|
const D = a ? ((E = L.current) == null ? void 0 : E.client) ?? null : null;
|
|
68
68
|
K(() => {
|
|
69
|
-
const C =
|
|
70
|
-
if (!a || !D || !
|
|
69
|
+
const C = M.current, I = N.current;
|
|
70
|
+
if (!a || !D || !I) {
|
|
71
71
|
l("⚠️ SERVICE INIT SKIPPED", {
|
|
72
72
|
renderCount: C,
|
|
73
73
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
@@ -78,36 +78,36 @@ const us = at({
|
|
|
78
78
|
renderCount: C,
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
80
80
|
});
|
|
81
|
-
const
|
|
82
|
-
...
|
|
81
|
+
const $ = new Hs({
|
|
82
|
+
...I,
|
|
83
83
|
apiKey: a,
|
|
84
|
-
debug:
|
|
84
|
+
debug: S.current,
|
|
85
85
|
client: D
|
|
86
86
|
});
|
|
87
|
-
x.current =
|
|
87
|
+
x.current = $, d($), l("✅ SERVICE SET", {
|
|
88
88
|
renderCount: C,
|
|
89
|
-
serviceInstance:
|
|
89
|
+
serviceInstance: !!$
|
|
90
90
|
});
|
|
91
91
|
}, [a, D]);
|
|
92
|
-
const
|
|
92
|
+
const O = G(null);
|
|
93
93
|
K(() => {
|
|
94
|
-
var
|
|
94
|
+
var I, $;
|
|
95
95
|
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
96
96
|
hasService: !!o,
|
|
97
97
|
hasUser: !!t,
|
|
98
98
|
userId: t == null ? void 0 : t.id,
|
|
99
|
-
isConnecting:
|
|
99
|
+
isConnecting: f.current,
|
|
100
100
|
isConnected: h,
|
|
101
101
|
dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
|
|
102
102
|
}), !o || !t) {
|
|
103
103
|
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
106
|
+
if (f.current) {
|
|
107
107
|
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
if (((
|
|
110
|
+
if (((I = O.current) == null ? void 0 : I.serviceId) === o && (($ = O.current) == null ? void 0 : $.userId) === t.id) {
|
|
111
111
|
l(
|
|
112
112
|
"⚠️ USER CONNECTION SKIPPED",
|
|
113
113
|
"Already connected this user with this service"
|
|
@@ -115,22 +115,22 @@ const us = at({
|
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
(async () => {
|
|
118
|
-
l("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
118
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), f.current = !0, v(!0), b(null);
|
|
119
119
|
try {
|
|
120
120
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
121
|
-
const
|
|
122
|
-
p(
|
|
121
|
+
const F = await o.connectUser(t);
|
|
122
|
+
p(F), g(!0), O.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
|
|
123
123
|
userId: t.id,
|
|
124
|
-
clientId:
|
|
124
|
+
clientId: F.userID
|
|
125
125
|
});
|
|
126
|
-
} catch (
|
|
127
|
-
const V =
|
|
128
|
-
|
|
126
|
+
} catch (F) {
|
|
127
|
+
const V = F instanceof Error ? F.message : "Connection failed";
|
|
128
|
+
b(V), l("❌ USER CONNECTION ERROR", {
|
|
129
129
|
userId: t.id,
|
|
130
130
|
error: V
|
|
131
131
|
});
|
|
132
132
|
} finally {
|
|
133
|
-
|
|
133
|
+
v(!1), f.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
134
134
|
userId: t.id,
|
|
135
135
|
isConnected: h
|
|
136
136
|
});
|
|
@@ -139,8 +139,8 @@ const us = at({
|
|
|
139
139
|
}, [o, t, l, h]), K(() => {
|
|
140
140
|
const C = D;
|
|
141
141
|
return () => {
|
|
142
|
-
var
|
|
143
|
-
C && (
|
|
142
|
+
var I;
|
|
143
|
+
C && (O.current = null, (I = x.current) == null || I.disconnectUser().catch(console.error));
|
|
144
144
|
};
|
|
145
145
|
}, [D]);
|
|
146
146
|
const z = J(async () => {
|
|
@@ -151,32 +151,32 @@ const us = at({
|
|
|
151
151
|
l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
154
|
+
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), v(!0);
|
|
155
155
|
try {
|
|
156
156
|
l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
|
|
157
157
|
const C = await o.connectUser(t);
|
|
158
|
-
p(C),
|
|
158
|
+
p(C), g(!0), b(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
159
159
|
} catch (C) {
|
|
160
|
-
const
|
|
161
|
-
|
|
160
|
+
const I = C instanceof Error ? C.message : "Refresh failed";
|
|
161
|
+
b(I), l("❌ CONNECTION REFRESH ERROR", {
|
|
162
162
|
userId: t.id,
|
|
163
|
-
error:
|
|
163
|
+
error: I
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
|
-
|
|
166
|
+
v(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
167
167
|
}
|
|
168
168
|
}, [o, t, l]), y = U.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
169
169
|
hasService: !!o,
|
|
170
170
|
hasClient: !!u,
|
|
171
171
|
isConnected: h,
|
|
172
|
-
isLoading:
|
|
172
|
+
isLoading: c,
|
|
173
173
|
hasError: !!w,
|
|
174
174
|
capabilitiesKeys: Object.keys(r)
|
|
175
175
|
}), {
|
|
176
176
|
service: o,
|
|
177
177
|
client: u,
|
|
178
178
|
isConnected: h,
|
|
179
|
-
isLoading:
|
|
179
|
+
isLoading: c,
|
|
180
180
|
error: w,
|
|
181
181
|
capabilities: r,
|
|
182
182
|
refreshConnection: z,
|
|
@@ -185,7 +185,7 @@ const us = at({
|
|
|
185
185
|
o,
|
|
186
186
|
u,
|
|
187
187
|
h,
|
|
188
|
-
|
|
188
|
+
c,
|
|
189
189
|
w,
|
|
190
190
|
r,
|
|
191
191
|
z,
|
|
@@ -193,7 +193,7 @@ const us = at({
|
|
|
193
193
|
l
|
|
194
194
|
]);
|
|
195
195
|
return l("🔄 RENDER END", {
|
|
196
|
-
renderCount:
|
|
196
|
+
renderCount: M.current,
|
|
197
197
|
willRenderChat: !!D,
|
|
198
198
|
contextValueReady: !!y
|
|
199
199
|
}), /* @__PURE__ */ s(us.Provider, { value: y, children: D ? /* @__PURE__ */ s(
|
|
@@ -206,7 +206,7 @@ const us = at({
|
|
|
206
206
|
children: e
|
|
207
207
|
}
|
|
208
208
|
) : e });
|
|
209
|
-
},
|
|
209
|
+
}, sa = () => lt(), ot = (e) => {
|
|
210
210
|
var a, r;
|
|
211
211
|
const [t, n] = B(
|
|
212
212
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -228,14 +228,14 @@ const us = at({
|
|
|
228
228
|
e.off("member.updated", i);
|
|
229
229
|
};
|
|
230
230
|
}, [e]), t;
|
|
231
|
-
},
|
|
231
|
+
}, na = "linktree-official", aa = "linktree-official-sender";
|
|
232
232
|
function Ue(e, t, n) {
|
|
233
233
|
const a = Object.values(e || {});
|
|
234
|
-
if (n ===
|
|
234
|
+
if (n === na) {
|
|
235
235
|
const r = a.find(
|
|
236
236
|
(i) => {
|
|
237
237
|
var l;
|
|
238
|
-
return ((l = i.user) == null ? void 0 : l.id) ===
|
|
238
|
+
return ((l = i.user) == null ? void 0 : l.id) === aa;
|
|
239
239
|
}
|
|
240
240
|
);
|
|
241
241
|
if (r) return r;
|
|
@@ -247,15 +247,15 @@ function Ue(e, t, n) {
|
|
|
247
247
|
}
|
|
248
248
|
);
|
|
249
249
|
}
|
|
250
|
-
const
|
|
251
|
-
function
|
|
252
|
-
return
|
|
250
|
+
const ra = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
251
|
+
function ia(e) {
|
|
252
|
+
return ra.test(e.trim());
|
|
253
253
|
}
|
|
254
254
|
function Kt(e, t) {
|
|
255
255
|
const n = e == null ? void 0 : e.trim();
|
|
256
|
-
return !n || t && n === t ? !1 : !
|
|
256
|
+
return !n || t && n === t ? !1 : !ia(n);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function ct(e) {
|
|
259
259
|
return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
260
260
|
}
|
|
261
261
|
const Jt = [
|
|
@@ -286,7 +286,7 @@ const Jt = [
|
|
|
286
286
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
287
287
|
// Melon
|
|
288
288
|
];
|
|
289
|
-
function
|
|
289
|
+
function la(e) {
|
|
290
290
|
let t = 0;
|
|
291
291
|
for (let n = 0; n < e.length; n++) {
|
|
292
292
|
const a = e.charCodeAt(n);
|
|
@@ -295,12 +295,12 @@ function ia(e) {
|
|
|
295
295
|
return Math.abs(t);
|
|
296
296
|
}
|
|
297
297
|
function ms(e) {
|
|
298
|
-
return Jt[
|
|
298
|
+
return Jt[la(e) % Jt.length];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function oa(e) {
|
|
301
301
|
return ms(e).emoji;
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function ca(e) {
|
|
304
304
|
return ms(e).bgColor;
|
|
305
305
|
}
|
|
306
306
|
const ne = ({
|
|
@@ -312,7 +312,7 @@ const ne = ({
|
|
|
312
312
|
shape: i = "squircle",
|
|
313
313
|
dmAgentEnabled: l = !1
|
|
314
314
|
}) => {
|
|
315
|
-
const o =
|
|
315
|
+
const o = oa(e), d = ca(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
316
316
|
"img",
|
|
317
317
|
{
|
|
318
318
|
src: t,
|
|
@@ -342,7 +342,7 @@ const ne = ({
|
|
|
342
342
|
width: `${n}px`,
|
|
343
343
|
height: `${n}px`,
|
|
344
344
|
backgroundColor: t ? void 0 : d,
|
|
345
|
-
...
|
|
345
|
+
...c
|
|
346
346
|
},
|
|
347
347
|
children: [
|
|
348
348
|
r && /* @__PURE__ */ s(
|
|
@@ -362,21 +362,21 @@ const ne = ({
|
|
|
362
362
|
"bg-transparent"
|
|
363
363
|
),
|
|
364
364
|
style: {
|
|
365
|
-
...
|
|
365
|
+
...c,
|
|
366
366
|
...l && {
|
|
367
|
-
borderWidth: `${
|
|
367
|
+
borderWidth: `${g}px`,
|
|
368
368
|
borderStyle: "solid",
|
|
369
369
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
370
370
|
boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
|
-
children:
|
|
373
|
+
children: v
|
|
374
374
|
}
|
|
375
375
|
)
|
|
376
376
|
]
|
|
377
377
|
}
|
|
378
378
|
);
|
|
379
|
-
},
|
|
379
|
+
}, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
|
|
380
380
|
channel: e,
|
|
381
381
|
participant: t,
|
|
382
382
|
showBlockParticipant: n = !0,
|
|
@@ -389,11 +389,11 @@ const ne = ({
|
|
|
389
389
|
onActionComplete: u,
|
|
390
390
|
logLabel: p = "useChannelModerationActions"
|
|
391
391
|
}) => {
|
|
392
|
-
var
|
|
393
|
-
const { service: h, debug:
|
|
392
|
+
var A;
|
|
393
|
+
const { service: h, debug: g } = lt(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, S] = B(!1), [T, M] = B(!1), L = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
|
|
394
394
|
return K(() => {
|
|
395
|
-
if (!
|
|
396
|
-
|
|
395
|
+
if (!v || !h || !c) {
|
|
396
|
+
b(!1), x(null);
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
let E = !1;
|
|
@@ -401,69 +401,69 @@ const ne = ({
|
|
|
401
401
|
try {
|
|
402
402
|
const C = await h.getBlockedUsers();
|
|
403
403
|
if (E) return;
|
|
404
|
-
|
|
404
|
+
b(
|
|
405
405
|
C.some(
|
|
406
|
-
(
|
|
406
|
+
(I) => I.blocked_user_id === c
|
|
407
407
|
)
|
|
408
408
|
);
|
|
409
409
|
} catch (C) {
|
|
410
410
|
E || console.error(`[${p}] Failed to check blocked status:`, C);
|
|
411
411
|
} finally {
|
|
412
|
-
E || x({ participantId:
|
|
412
|
+
E || x({ participantId: c, service: h });
|
|
413
413
|
}
|
|
414
414
|
})(), () => {
|
|
415
415
|
E = !0;
|
|
416
416
|
};
|
|
417
|
-
}, [
|
|
417
|
+
}, [v, h, c, p]), {
|
|
418
418
|
isParticipantBlocked: w,
|
|
419
419
|
isCheckingBlockedStatus: L,
|
|
420
|
-
isLeaving:
|
|
421
|
-
isUpdatingBlockStatus:
|
|
420
|
+
isLeaving: N,
|
|
421
|
+
isUpdatingBlockStatus: T,
|
|
422
422
|
handleLeaveConversation: async () => {
|
|
423
423
|
var E;
|
|
424
|
-
if (!
|
|
425
|
-
l == null || l(),
|
|
424
|
+
if (!N) {
|
|
425
|
+
l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), S(!0);
|
|
426
426
|
try {
|
|
427
427
|
const C = ((E = e._client) == null ? void 0 : E.userID) ?? null;
|
|
428
428
|
await e.hide(C, !1), r && await r(e), u == null || u();
|
|
429
429
|
} catch (C) {
|
|
430
430
|
console.error(`[${p}] Failed to leave conversation`, C);
|
|
431
431
|
} finally {
|
|
432
|
-
|
|
432
|
+
S(!1);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
},
|
|
436
436
|
handleBlockUser: async () => {
|
|
437
|
-
var E, C,
|
|
438
|
-
if (!(
|
|
439
|
-
o == null || o(),
|
|
437
|
+
var E, C, I;
|
|
438
|
+
if (!(T || !h)) {
|
|
439
|
+
o == null || o(), g && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
|
|
440
440
|
try {
|
|
441
|
-
await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((
|
|
442
|
-
} catch (
|
|
443
|
-
console.error(`[${p}] Failed to block member`,
|
|
441
|
+
await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
|
|
442
|
+
} catch ($) {
|
|
443
|
+
console.error(`[${p}] Failed to block member`, $);
|
|
444
444
|
} finally {
|
|
445
|
-
|
|
445
|
+
M(!1);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
handleUnblockUser: async () => {
|
|
450
|
-
var E, C,
|
|
451
|
-
if (!(
|
|
452
|
-
o == null || o(),
|
|
450
|
+
var E, C, I;
|
|
451
|
+
if (!(T || !h)) {
|
|
452
|
+
o == null || o(), g && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
|
|
453
453
|
try {
|
|
454
|
-
await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((
|
|
455
|
-
} catch (
|
|
456
|
-
console.error(`[${p}] Failed to unblock member`,
|
|
454
|
+
await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
|
|
455
|
+
} catch ($) {
|
|
456
|
+
console.error(`[${p}] Failed to unblock member`, $);
|
|
457
457
|
} finally {
|
|
458
|
-
|
|
458
|
+
M(!1);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
handleReportUser: () => {
|
|
463
|
-
d == null || d(), u == null || u(), window.open(
|
|
463
|
+
d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
|
-
},
|
|
466
|
+
}, Ne = ({
|
|
467
467
|
variant: e = "default",
|
|
468
468
|
className: t,
|
|
469
469
|
children: n,
|
|
@@ -480,7 +480,7 @@ const ne = ({
|
|
|
480
480
|
...a,
|
|
481
481
|
children: n
|
|
482
482
|
}
|
|
483
|
-
),
|
|
483
|
+
), st = ({
|
|
484
484
|
channel: e,
|
|
485
485
|
participant: t,
|
|
486
486
|
showDeleteConversation: n = !0,
|
|
@@ -494,55 +494,55 @@ const ne = ({
|
|
|
494
494
|
customChannelActions: p,
|
|
495
495
|
triggerClassName: h
|
|
496
496
|
}) => {
|
|
497
|
-
const [
|
|
498
|
-
isParticipantBlocked:
|
|
497
|
+
const [g, c] = B(!1), v = G(null), w = Gs(), b = J(() => c(!1), []), {
|
|
498
|
+
isParticipantBlocked: f,
|
|
499
499
|
isCheckingBlockedStatus: x,
|
|
500
|
-
isLeaving:
|
|
501
|
-
isUpdatingBlockStatus:
|
|
502
|
-
handleLeaveConversation:
|
|
503
|
-
handleBlockUser:
|
|
500
|
+
isLeaving: N,
|
|
501
|
+
isUpdatingBlockStatus: S,
|
|
502
|
+
handleLeaveConversation: T,
|
|
503
|
+
handleBlockUser: M,
|
|
504
504
|
handleUnblockUser: L,
|
|
505
505
|
handleReportUser: D
|
|
506
|
-
} =
|
|
506
|
+
} = ua({
|
|
507
507
|
channel: e,
|
|
508
508
|
participant: t,
|
|
509
509
|
showBlockParticipant: a,
|
|
510
|
-
enabled:
|
|
510
|
+
enabled: g,
|
|
511
511
|
onLeaveConversation: i,
|
|
512
512
|
onBlockParticipant: l,
|
|
513
513
|
onDeleteConversationClick: o,
|
|
514
514
|
onBlockParticipantClick: d,
|
|
515
515
|
onReportParticipantClick: u,
|
|
516
|
-
onActionComplete:
|
|
516
|
+
onActionComplete: b,
|
|
517
517
|
logLabel: "ChannelActionsMenu"
|
|
518
518
|
});
|
|
519
519
|
return K(() => {
|
|
520
|
-
if (!
|
|
521
|
-
const z = (
|
|
522
|
-
|
|
523
|
-
}, y = (
|
|
524
|
-
|
|
520
|
+
if (!g) return;
|
|
521
|
+
const z = (A) => {
|
|
522
|
+
v.current && !v.current.contains(A.target) && c(!1);
|
|
523
|
+
}, y = (A) => {
|
|
524
|
+
A.key === "Escape" && c(!1);
|
|
525
525
|
};
|
|
526
526
|
return document.addEventListener("mousedown", z), document.addEventListener("keydown", y), () => {
|
|
527
527
|
document.removeEventListener("mousedown", z), document.removeEventListener("keydown", y);
|
|
528
528
|
};
|
|
529
|
-
}, [
|
|
529
|
+
}, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
|
|
530
530
|
/* @__PURE__ */ m(
|
|
531
531
|
"button",
|
|
532
532
|
{
|
|
533
533
|
className: h,
|
|
534
534
|
type: "button",
|
|
535
535
|
"aria-haspopup": "true",
|
|
536
|
-
"aria-expanded":
|
|
537
|
-
"aria-controls":
|
|
538
|
-
onClick: () =>
|
|
536
|
+
"aria-expanded": g,
|
|
537
|
+
"aria-controls": g ? w : void 0,
|
|
538
|
+
onClick: () => c((z) => !z),
|
|
539
539
|
children: [
|
|
540
|
-
/* @__PURE__ */ s(
|
|
540
|
+
/* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
|
|
541
541
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
542
542
|
]
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
|
-
|
|
545
|
+
g && /* @__PURE__ */ s(
|
|
546
546
|
"div",
|
|
547
547
|
{
|
|
548
548
|
id: w,
|
|
@@ -553,13 +553,13 @@ const ne = ({
|
|
|
553
553
|
),
|
|
554
554
|
children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
|
|
555
555
|
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
|
|
556
|
-
|
|
556
|
+
Ne,
|
|
557
557
|
{
|
|
558
|
-
onClick:
|
|
559
|
-
disabled:
|
|
560
|
-
"aria-busy":
|
|
558
|
+
onClick: T,
|
|
559
|
+
disabled: N,
|
|
560
|
+
"aria-busy": N,
|
|
561
561
|
children: [
|
|
562
|
-
|
|
562
|
+
N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
|
|
563
563
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
564
564
|
]
|
|
565
565
|
}
|
|
@@ -567,34 +567,34 @@ const ne = ({
|
|
|
567
567
|
a && /* @__PURE__ */ s("li", { children: x ? (
|
|
568
568
|
// Block status not yet resolved — show a disabled placeholder
|
|
569
569
|
// so a premature click can't act on a stale block state.
|
|
570
|
-
/* @__PURE__ */ m(
|
|
570
|
+
/* @__PURE__ */ m(Ne, { disabled: !0, "aria-busy": !0, children: [
|
|
571
571
|
/* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
|
|
572
572
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
573
573
|
] })
|
|
574
|
-
) :
|
|
575
|
-
|
|
574
|
+
) : f ? /* @__PURE__ */ m(
|
|
575
|
+
Ne,
|
|
576
576
|
{
|
|
577
577
|
onClick: L,
|
|
578
|
-
disabled:
|
|
579
|
-
"aria-busy":
|
|
578
|
+
disabled: S,
|
|
579
|
+
"aria-busy": S,
|
|
580
580
|
children: [
|
|
581
|
-
|
|
581
|
+
S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
|
|
582
582
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
583
583
|
]
|
|
584
584
|
}
|
|
585
585
|
) : /* @__PURE__ */ m(
|
|
586
|
-
|
|
586
|
+
Ne,
|
|
587
587
|
{
|
|
588
|
-
onClick:
|
|
589
|
-
disabled:
|
|
590
|
-
"aria-busy":
|
|
588
|
+
onClick: M,
|
|
589
|
+
disabled: S,
|
|
590
|
+
"aria-busy": S,
|
|
591
591
|
children: [
|
|
592
|
-
|
|
592
|
+
S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
|
|
593
593
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
594
594
|
]
|
|
595
595
|
}
|
|
596
596
|
) }),
|
|
597
|
-
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
|
|
597
|
+
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: D, children: [
|
|
598
598
|
/* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
|
|
599
599
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
600
600
|
] }) }),
|
|
@@ -603,10 +603,10 @@ const ne = ({
|
|
|
603
603
|
}
|
|
604
604
|
)
|
|
605
605
|
] });
|
|
606
|
-
}, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring",
|
|
606
|
+
}, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = (e) => {
|
|
607
607
|
const t = e;
|
|
608
|
-
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(
|
|
609
|
-
},
|
|
608
|
+
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
|
|
609
|
+
}, pa = ({
|
|
610
610
|
onBack: e,
|
|
611
611
|
showBackButton: t,
|
|
612
612
|
showStarButton: n = !1,
|
|
@@ -619,25 +619,25 @@ const ne = ({
|
|
|
619
619
|
onDeleteConversationClick: u,
|
|
620
620
|
onBlockParticipantClick: p,
|
|
621
621
|
onReportParticipantClick: h,
|
|
622
|
-
customChannelActions:
|
|
623
|
-
renderChannelActions:
|
|
624
|
-
showChannelInfo:
|
|
622
|
+
customChannelActions: g,
|
|
623
|
+
renderChannelActions: c,
|
|
624
|
+
showChannelInfo: v = !0,
|
|
625
625
|
onParticipantNameClick: w
|
|
626
626
|
}) => {
|
|
627
|
-
var D,
|
|
628
|
-
const { channel:
|
|
627
|
+
var D, O, z;
|
|
628
|
+
const { channel: b } = le(), { client: f } = oe(), x = U.useMemo(
|
|
629
629
|
() => {
|
|
630
630
|
var y;
|
|
631
631
|
return Ue(
|
|
632
|
-
(y =
|
|
633
|
-
|
|
634
|
-
|
|
632
|
+
(y = b.state) == null ? void 0 : y.members,
|
|
633
|
+
f == null ? void 0 : f.userID,
|
|
634
|
+
b.type
|
|
635
635
|
);
|
|
636
636
|
},
|
|
637
|
-
[(D =
|
|
638
|
-
),
|
|
637
|
+
[(D = b.state) == null ? void 0 : D.members, f == null ? void 0 : f.userID, b.type]
|
|
638
|
+
), N = ct(x == null ? void 0 : x.user), S = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = ot(b), M = ga(x), L = async () => {
|
|
639
639
|
try {
|
|
640
|
-
|
|
640
|
+
T ? await b.unpin() : await b.pin();
|
|
641
641
|
} catch (y) {
|
|
642
642
|
console.error(
|
|
643
643
|
"[ChannelHeaderRedesign] Failed to update pinned status:",
|
|
@@ -657,7 +657,7 @@ const ne = ({
|
|
|
657
657
|
}),
|
|
658
658
|
type: "button",
|
|
659
659
|
"aria-label": "Back to conversations",
|
|
660
|
-
children: /* @__PURE__ */ s(
|
|
660
|
+
children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
|
|
661
661
|
}
|
|
662
662
|
) }),
|
|
663
663
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
|
|
@@ -665,15 +665,15 @@ const ne = ({
|
|
|
665
665
|
{
|
|
666
666
|
type: "button",
|
|
667
667
|
onClick: w,
|
|
668
|
-
"aria-label": `View details for ${
|
|
668
|
+
"aria-label": `View details for ${N}`,
|
|
669
669
|
className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
|
|
670
670
|
children: [
|
|
671
671
|
/* @__PURE__ */ s(
|
|
672
672
|
ne,
|
|
673
673
|
{
|
|
674
|
-
id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) ||
|
|
675
|
-
name:
|
|
676
|
-
image:
|
|
674
|
+
id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
|
|
675
|
+
name: N,
|
|
676
|
+
image: S,
|
|
677
677
|
dmAgentEnabled: a,
|
|
678
678
|
shape: "circle",
|
|
679
679
|
size: 48,
|
|
@@ -682,17 +682,17 @@ const ne = ({
|
|
|
682
682
|
),
|
|
683
683
|
/* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
|
|
684
684
|
/* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
685
|
-
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children:
|
|
685
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
|
|
686
686
|
/* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
|
|
687
|
-
|
|
687
|
+
M && /* @__PURE__ */ s(
|
|
688
688
|
"span",
|
|
689
689
|
{
|
|
690
690
|
"aria-label": "Paid customer",
|
|
691
691
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
692
|
-
children: /* @__PURE__ */ s(
|
|
692
|
+
children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
|
|
693
693
|
}
|
|
694
694
|
),
|
|
695
|
-
n &&
|
|
695
|
+
n && T && /* @__PURE__ */ s(
|
|
696
696
|
"span",
|
|
697
697
|
{
|
|
698
698
|
"aria-label": "Starred conversation",
|
|
@@ -712,7 +712,7 @@ const ne = ({
|
|
|
712
712
|
] }),
|
|
713
713
|
a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
714
714
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
715
|
-
/* @__PURE__ */ s("span", { children:
|
|
715
|
+
/* @__PURE__ */ s("span", { children: ha })
|
|
716
716
|
] })
|
|
717
717
|
] })
|
|
718
718
|
]
|
|
@@ -725,24 +725,24 @@ const ne = ({
|
|
|
725
725
|
className: We,
|
|
726
726
|
onClick: L,
|
|
727
727
|
type: "button",
|
|
728
|
-
"aria-pressed":
|
|
729
|
-
"aria-label":
|
|
728
|
+
"aria-pressed": T,
|
|
729
|
+
"aria-label": T ? "Unstar conversation" : "Star conversation",
|
|
730
730
|
children: /* @__PURE__ */ s(
|
|
731
731
|
Ee,
|
|
732
732
|
{
|
|
733
733
|
className: k("size-5", {
|
|
734
|
-
"text-[#FFD60A]":
|
|
735
|
-
"text-black/90": !
|
|
734
|
+
"text-[#FFD60A]": T,
|
|
735
|
+
"text-black/90": !T
|
|
736
736
|
}),
|
|
737
|
-
weight:
|
|
737
|
+
weight: T ? "fill" : "regular"
|
|
738
738
|
}
|
|
739
739
|
)
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
|
-
|
|
743
|
-
|
|
742
|
+
v && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
743
|
+
st,
|
|
744
744
|
{
|
|
745
|
-
channel:
|
|
745
|
+
channel: b,
|
|
746
746
|
participant: x,
|
|
747
747
|
showDeleteConversation: l,
|
|
748
748
|
showBlockParticipant: o,
|
|
@@ -752,26 +752,26 @@ const ne = ({
|
|
|
752
752
|
onDeleteConversationClick: u,
|
|
753
753
|
onBlockParticipantClick: p,
|
|
754
754
|
onReportParticipantClick: h,
|
|
755
|
-
customChannelActions:
|
|
755
|
+
customChannelActions: g,
|
|
756
756
|
triggerClassName: We
|
|
757
757
|
}
|
|
758
758
|
))
|
|
759
759
|
] })
|
|
760
760
|
] }) });
|
|
761
|
-
},
|
|
762
|
-
function ba(e) {
|
|
763
|
-
return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
|
|
764
|
-
}
|
|
761
|
+
}, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
|
|
765
762
|
function va(e) {
|
|
766
|
-
|
|
767
|
-
|
|
763
|
+
return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
|
|
764
|
+
}
|
|
765
|
+
function xa(e) {
|
|
766
|
+
const { channel: t } = le(), { client: n } = oe("useMessageVote"), a = se(
|
|
767
|
+
() => va(e.own_reactions),
|
|
768
768
|
[e.own_reactions]
|
|
769
769
|
), r = J(async () => {
|
|
770
770
|
if (n != null && n.userID)
|
|
771
771
|
try {
|
|
772
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
772
|
+
a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
|
|
773
773
|
e.id,
|
|
774
|
-
{ type:
|
|
774
|
+
{ type: nt },
|
|
775
775
|
{ enforce_unique: !0, skip_push: !0 }
|
|
776
776
|
);
|
|
777
777
|
} catch {
|
|
@@ -779,9 +779,9 @@ function va(e) {
|
|
|
779
779
|
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
|
|
780
780
|
if (n != null && n.userID)
|
|
781
781
|
try {
|
|
782
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
782
|
+
a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
|
|
783
783
|
e.id,
|
|
784
|
-
{ type:
|
|
784
|
+
{ type: at },
|
|
785
785
|
{ enforce_unique: !0, skip_push: !0 }
|
|
786
786
|
);
|
|
787
787
|
} catch {
|
|
@@ -789,7 +789,7 @@ function va(e) {
|
|
|
789
789
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
790
790
|
return { selected: a, voteUp: r, voteDown: i };
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function wa(e) {
|
|
793
793
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
794
794
|
}
|
|
795
795
|
function hs({
|
|
@@ -797,16 +797,16 @@ function hs({
|
|
|
797
797
|
viewerLanguage: t
|
|
798
798
|
}) {
|
|
799
799
|
var r;
|
|
800
|
-
const n = e == null ? void 0 : e.text, a =
|
|
800
|
+
const n = e == null ? void 0 : e.text, a = wa(t);
|
|
801
801
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
802
802
|
}
|
|
803
|
-
const
|
|
803
|
+
const _a = U.lazy(() => import("./Card-iGNcxybY.js")), Na = U.lazy(() => import("./Card-0wf8lj5n.js")), ya = U.lazy(() => import("./Card-RZ6C_IkE.js")), dt = () => /* @__PURE__ */ s(
|
|
804
804
|
"div",
|
|
805
805
|
{
|
|
806
806
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
|
|
807
807
|
"aria-hidden": !0
|
|
808
808
|
}
|
|
809
|
-
),
|
|
809
|
+
), ka = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
|
|
810
810
|
[/pdf/, "pdf"],
|
|
811
811
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
812
812
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -816,7 +816,7 @@ const wa = U.lazy(() => import("./Card-gjy-ib_1.js")), _a = U.lazy(() => import(
|
|
|
816
816
|
[/plain|rtf/, "text"],
|
|
817
817
|
[/markdown/, "markdown"]
|
|
818
818
|
];
|
|
819
|
-
function
|
|
819
|
+
function ce(e) {
|
|
820
820
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
821
821
|
}
|
|
822
822
|
function ps(e) {
|
|
@@ -825,33 +825,33 @@ function ps(e) {
|
|
|
825
825
|
);
|
|
826
826
|
return t ? t[1] : "generic";
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Ia = {
|
|
829
829
|
video: cs,
|
|
830
|
-
audio:
|
|
830
|
+
audio: zn,
|
|
831
831
|
image: Ln,
|
|
832
832
|
document: os
|
|
833
|
-
},
|
|
834
|
-
pdf:
|
|
835
|
-
doc:
|
|
836
|
-
xls:
|
|
837
|
-
csv:
|
|
838
|
-
ppt:
|
|
839
|
-
zip:
|
|
840
|
-
text:
|
|
841
|
-
markdown:
|
|
833
|
+
}, Ta = {
|
|
834
|
+
pdf: Vn,
|
|
835
|
+
doc: Un,
|
|
836
|
+
xls: Bn,
|
|
837
|
+
csv: jn,
|
|
838
|
+
ppt: $n,
|
|
839
|
+
zip: On,
|
|
840
|
+
text: Fn,
|
|
841
|
+
markdown: Pn,
|
|
842
842
|
generic: os
|
|
843
843
|
};
|
|
844
|
-
function
|
|
845
|
-
const t =
|
|
846
|
-
return t !== "document" ?
|
|
844
|
+
function Aa(e) {
|
|
845
|
+
const t = ce(e);
|
|
846
|
+
return t !== "document" ? Ia[t] : Ta[ps(e)];
|
|
847
847
|
}
|
|
848
848
|
function we(e, t) {
|
|
849
|
-
return U.createElement(
|
|
849
|
+
return U.createElement(Aa(e), t);
|
|
850
850
|
}
|
|
851
|
-
const
|
|
851
|
+
const Ma = (e) => {
|
|
852
852
|
var t, n;
|
|
853
853
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
|
|
854
|
-
},
|
|
854
|
+
}, Ra = ({
|
|
855
855
|
source: e,
|
|
856
856
|
mimeType: t,
|
|
857
857
|
poster: n,
|
|
@@ -863,74 +863,74 @@ const Aa = (e) => {
|
|
|
863
863
|
muted: d = !1,
|
|
864
864
|
onContainerClick: u
|
|
865
865
|
}) => {
|
|
866
|
-
const p =
|
|
867
|
-
D(!1),
|
|
868
|
-
}, []),
|
|
869
|
-
const R =
|
|
866
|
+
const p = ce(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, S] = B(!1), [T, M] = B(!1), [L, D] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [E, C] = B(null), I = J(() => {
|
|
867
|
+
D(!1), b(!0);
|
|
868
|
+
}, []), $ = J((_) => {
|
|
869
|
+
const R = g.current;
|
|
870
870
|
if (!R) return 0;
|
|
871
|
-
const
|
|
871
|
+
const H = R.getBoundingClientRect();
|
|
872
872
|
return Math.max(
|
|
873
873
|
0,
|
|
874
|
-
Math.min(1, (
|
|
874
|
+
Math.min(1, (Ma(_) - H.left) / H.width)
|
|
875
875
|
);
|
|
876
|
-
}, []),
|
|
876
|
+
}, []), F = J((_) => {
|
|
877
877
|
const R = h.current;
|
|
878
|
-
R && R.duration && (R.currentTime =
|
|
879
|
-
}, []), V = (
|
|
880
|
-
|
|
881
|
-
const R =
|
|
882
|
-
x(R),
|
|
878
|
+
R && R.duration && (R.currentTime = _ * R.duration);
|
|
879
|
+
}, []), V = (_) => {
|
|
880
|
+
_.stopPropagation(), S(!0);
|
|
881
|
+
const R = $(_);
|
|
882
|
+
x(R), F(R);
|
|
883
883
|
};
|
|
884
884
|
K(() => {
|
|
885
|
-
r !== void 0 && r !==
|
|
885
|
+
r !== void 0 && r !== v.current && (v.current = r, b(r));
|
|
886
886
|
}, [r]), K(() => {
|
|
887
887
|
if (!w) {
|
|
888
|
-
|
|
888
|
+
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
889
889
|
return;
|
|
890
890
|
}
|
|
891
|
-
const
|
|
891
|
+
const _ = () => {
|
|
892
892
|
const R = h.current;
|
|
893
|
-
R && R.duration && !
|
|
893
|
+
R && R.duration && !N && x(R.currentTime / R.duration), c.current = requestAnimationFrame(_);
|
|
894
894
|
};
|
|
895
|
-
return
|
|
896
|
-
|
|
895
|
+
return c.current = requestAnimationFrame(_), () => {
|
|
896
|
+
c.current !== null && cancelAnimationFrame(c.current);
|
|
897
897
|
};
|
|
898
|
-
}, [w,
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
}) :
|
|
898
|
+
}, [w, N]), K(() => {
|
|
899
|
+
const _ = h.current;
|
|
900
|
+
_ && (w ? _.play().catch((R) => {
|
|
901
|
+
b(!1), D(!0);
|
|
902
|
+
}) : _.pause());
|
|
903
903
|
}, [w]), K(() => {
|
|
904
|
-
if (!
|
|
905
|
-
const
|
|
906
|
-
|
|
904
|
+
if (!N) return;
|
|
905
|
+
const _ = (H) => x($(H)), R = (H) => {
|
|
906
|
+
S(!1), F($(H));
|
|
907
907
|
};
|
|
908
|
-
return window.addEventListener("mousemove",
|
|
909
|
-
window.removeEventListener("mousemove",
|
|
908
|
+
return window.addEventListener("mousemove", _), window.addEventListener("mouseup", R), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", R), () => {
|
|
909
|
+
window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", R);
|
|
910
910
|
};
|
|
911
|
-
}, [
|
|
912
|
-
const
|
|
911
|
+
}, [N, $, F]);
|
|
912
|
+
const Q = E ? { aspectRatio: String(E) } : void 0, te = E ? "" : " aspect-video", X = Math.round(f * 100);
|
|
913
913
|
return /* @__PURE__ */ m(
|
|
914
914
|
"div",
|
|
915
915
|
{
|
|
916
916
|
role: "button",
|
|
917
917
|
tabIndex: 0,
|
|
918
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
919
|
-
style:
|
|
920
|
-
onClick: (
|
|
918
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${te}`,
|
|
919
|
+
style: Q,
|
|
920
|
+
onClick: (_) => {
|
|
921
921
|
if (u) {
|
|
922
|
-
u(
|
|
922
|
+
u(_);
|
|
923
923
|
return;
|
|
924
924
|
}
|
|
925
|
-
L || l &&
|
|
925
|
+
L || l && b((R) => !R);
|
|
926
926
|
},
|
|
927
|
-
onKeyDown: (
|
|
928
|
-
if (!(
|
|
929
|
-
if (
|
|
930
|
-
u(
|
|
927
|
+
onKeyDown: (_) => {
|
|
928
|
+
if (!(_.key !== "Enter" && _.key !== " ")) {
|
|
929
|
+
if (_.preventDefault(), u) {
|
|
930
|
+
u(_);
|
|
931
931
|
return;
|
|
932
932
|
}
|
|
933
|
-
L || l &&
|
|
933
|
+
L || l && b((R) => !R);
|
|
934
934
|
}
|
|
935
935
|
},
|
|
936
936
|
children: [
|
|
@@ -956,12 +956,12 @@ const Aa = (e) => {
|
|
|
956
956
|
style: { width: "100%", height: "100%" },
|
|
957
957
|
onLoadStart: () => z(!0),
|
|
958
958
|
onCanPlay: () => {
|
|
959
|
-
z(!1),
|
|
959
|
+
z(!1), A(!1);
|
|
960
960
|
},
|
|
961
961
|
onWaiting: () => z(!0),
|
|
962
962
|
onPlay: () => D(!1),
|
|
963
963
|
onEnded: () => {
|
|
964
|
-
i || (
|
|
964
|
+
i || (b(!1), x(0));
|
|
965
965
|
},
|
|
966
966
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
967
967
|
}
|
|
@@ -976,22 +976,22 @@ const Aa = (e) => {
|
|
|
976
976
|
style: { width: "100%", height: "100%" },
|
|
977
977
|
onLoadStart: () => z(!0),
|
|
978
978
|
onCanPlay: () => {
|
|
979
|
-
z(!1),
|
|
979
|
+
z(!1), A(!1);
|
|
980
980
|
},
|
|
981
981
|
onWaiting: () => z(!0),
|
|
982
982
|
onPlay: () => D(!1),
|
|
983
983
|
onLoadedMetadata: () => {
|
|
984
|
-
const
|
|
985
|
-
|
|
984
|
+
const _ = h.current;
|
|
985
|
+
_ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && C(_.videoWidth / _.videoHeight);
|
|
986
986
|
},
|
|
987
987
|
onEnded: () => {
|
|
988
|
-
i || (
|
|
988
|
+
i || (b(!1), x(0));
|
|
989
989
|
},
|
|
990
990
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
991
991
|
}
|
|
992
992
|
) }),
|
|
993
|
-
|
|
994
|
-
|
|
993
|
+
O && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
994
|
+
Ce,
|
|
995
995
|
{
|
|
996
996
|
className: "size-8 animate-spin text-white/80",
|
|
997
997
|
weight: "bold"
|
|
@@ -1004,13 +1004,13 @@ const Aa = (e) => {
|
|
|
1004
1004
|
role: "button",
|
|
1005
1005
|
tabIndex: 0,
|
|
1006
1006
|
"aria-label": "Play preview",
|
|
1007
|
-
onClick: (
|
|
1008
|
-
|
|
1007
|
+
onClick: (_) => {
|
|
1008
|
+
_.stopPropagation(), I();
|
|
1009
1009
|
},
|
|
1010
|
-
onKeyDown: (
|
|
1011
|
-
|
|
1010
|
+
onKeyDown: (_) => {
|
|
1011
|
+
_.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), I());
|
|
1012
1012
|
},
|
|
1013
|
-
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(
|
|
1013
|
+
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(tt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1014
1014
|
}
|
|
1015
1015
|
),
|
|
1016
1016
|
o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
|
|
@@ -1022,13 +1022,13 @@ const Aa = (e) => {
|
|
|
1022
1022
|
"aria-valuemin": 0,
|
|
1023
1023
|
"aria-valuemax": 100,
|
|
1024
1024
|
tabIndex: 0,
|
|
1025
|
-
ref:
|
|
1025
|
+
ref: g,
|
|
1026
1026
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1027
1027
|
onMouseDown: V,
|
|
1028
1028
|
onTouchStart: V,
|
|
1029
|
-
onClick: (
|
|
1030
|
-
onKeyDown: (
|
|
1031
|
-
|
|
1029
|
+
onClick: (_) => _.stopPropagation(),
|
|
1030
|
+
onKeyDown: (_) => {
|
|
1031
|
+
_.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
|
|
1032
1032
|
},
|
|
1033
1033
|
children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
|
|
1034
1034
|
"div",
|
|
@@ -1044,12 +1044,12 @@ const Aa = (e) => {
|
|
|
1044
1044
|
"button",
|
|
1045
1045
|
{
|
|
1046
1046
|
type: "button",
|
|
1047
|
-
onClick: (
|
|
1048
|
-
|
|
1047
|
+
onClick: (_) => {
|
|
1048
|
+
_.stopPropagation(), b((R) => !R);
|
|
1049
1049
|
},
|
|
1050
1050
|
className: "shrink-0 text-white",
|
|
1051
1051
|
"aria-label": w ? "Pause" : "Play",
|
|
1052
|
-
children: w ? /* @__PURE__ */ s(
|
|
1052
|
+
children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1053
1053
|
}
|
|
1054
1054
|
),
|
|
1055
1055
|
/* @__PURE__ */ m(
|
|
@@ -1061,21 +1061,21 @@ const Aa = (e) => {
|
|
|
1061
1061
|
"aria-valuemin": 0,
|
|
1062
1062
|
"aria-valuemax": 100,
|
|
1063
1063
|
tabIndex: 0,
|
|
1064
|
-
ref:
|
|
1064
|
+
ref: g,
|
|
1065
1065
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1066
1066
|
onMouseDown: V,
|
|
1067
1067
|
onTouchStart: V,
|
|
1068
|
-
onClick: (
|
|
1069
|
-
onMouseEnter: () =>
|
|
1070
|
-
onMouseLeave: () =>
|
|
1071
|
-
onKeyDown: (
|
|
1072
|
-
|
|
1068
|
+
onClick: (_) => _.stopPropagation(),
|
|
1069
|
+
onMouseEnter: () => M(!0),
|
|
1070
|
+
onMouseLeave: () => M(!1),
|
|
1071
|
+
onKeyDown: (_) => {
|
|
1072
|
+
_.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
|
|
1073
1073
|
},
|
|
1074
1074
|
children: [
|
|
1075
1075
|
/* @__PURE__ */ s(
|
|
1076
1076
|
"div",
|
|
1077
1077
|
{
|
|
1078
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
1078
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || N ? "h-1.5" : "h-1"}`,
|
|
1079
1079
|
children: /* @__PURE__ */ s(
|
|
1080
1080
|
"div",
|
|
1081
1081
|
{
|
|
@@ -1088,7 +1088,7 @@ const Aa = (e) => {
|
|
|
1088
1088
|
/* @__PURE__ */ s(
|
|
1089
1089
|
"div",
|
|
1090
1090
|
{
|
|
1091
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
1091
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || N ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1092
1092
|
style: { left: `${X}%` }
|
|
1093
1093
|
}
|
|
1094
1094
|
)
|
|
@@ -1099,7 +1099,7 @@ const Aa = (e) => {
|
|
|
1099
1099
|
]
|
|
1100
1100
|
}
|
|
1101
1101
|
);
|
|
1102
|
-
}, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
1102
|
+
}, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
|
|
1103
1103
|
mimeType: e,
|
|
1104
1104
|
sourceUrl: t,
|
|
1105
1105
|
thumbnailUrl: n,
|
|
@@ -1108,9 +1108,9 @@ const Aa = (e) => {
|
|
|
1108
1108
|
mediaPlayerProps: i,
|
|
1109
1109
|
containedImage: l = !1
|
|
1110
1110
|
}) => {
|
|
1111
|
-
const o =
|
|
1111
|
+
const o = ce(e), [d, u] = B(!1);
|
|
1112
1112
|
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
|
|
1113
|
-
|
|
1113
|
+
Ra,
|
|
1114
1114
|
{
|
|
1115
1115
|
source: t,
|
|
1116
1116
|
mimeType: e,
|
|
@@ -1161,7 +1161,7 @@ const Aa = (e) => {
|
|
|
1161
1161
|
weight: "regular"
|
|
1162
1162
|
})
|
|
1163
1163
|
}
|
|
1164
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1164
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${Da(r)}`, children: /* @__PURE__ */ s(
|
|
1165
1165
|
"img",
|
|
1166
1166
|
{
|
|
1167
1167
|
src: n,
|
|
@@ -1193,7 +1193,7 @@ const Aa = (e) => {
|
|
|
1193
1193
|
rootRef: p,
|
|
1194
1194
|
"data-testid": h
|
|
1195
1195
|
}) => {
|
|
1196
|
-
const
|
|
1196
|
+
const g = e === "dark", c = g ? n ?? a : n ?? "", v = g && !n;
|
|
1197
1197
|
return /* @__PURE__ */ m(
|
|
1198
1198
|
"div",
|
|
1199
1199
|
{
|
|
@@ -1201,29 +1201,29 @@ const Aa = (e) => {
|
|
|
1201
1201
|
"data-testid": h,
|
|
1202
1202
|
className: k(
|
|
1203
1203
|
"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)]",
|
|
1204
|
-
|
|
1204
|
+
g ? "bg-[#121110]" : "bg-white"
|
|
1205
1205
|
),
|
|
1206
1206
|
children: [
|
|
1207
1207
|
d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
|
|
1208
1208
|
u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
|
|
1209
1209
|
t,
|
|
1210
1210
|
/* @__PURE__ */ m("div", { className: "px-4 pb-3 pt-3", children: [
|
|
1211
|
-
|
|
1211
|
+
c.trim() !== "" && /* @__PURE__ */ s(
|
|
1212
1212
|
"p",
|
|
1213
1213
|
{
|
|
1214
1214
|
className: k("mb-0.5 truncate text-base font-medium", {
|
|
1215
|
-
"text-black": !
|
|
1216
|
-
"text-white/30":
|
|
1217
|
-
"text-white":
|
|
1215
|
+
"text-black": !g,
|
|
1216
|
+
"text-white/30": g && v,
|
|
1217
|
+
"text-white": g && !v
|
|
1218
1218
|
}),
|
|
1219
|
-
children:
|
|
1219
|
+
children: c
|
|
1220
1220
|
}
|
|
1221
1221
|
),
|
|
1222
1222
|
/* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1223
1223
|
we(r, {
|
|
1224
1224
|
className: k(
|
|
1225
1225
|
"size-5 shrink-0",
|
|
1226
|
-
|
|
1226
|
+
g ? "text-white/55" : "text-black/55"
|
|
1227
1227
|
),
|
|
1228
1228
|
weight: "regular"
|
|
1229
1229
|
}),
|
|
@@ -1232,7 +1232,7 @@ const Aa = (e) => {
|
|
|
1232
1232
|
{
|
|
1233
1233
|
className: k(
|
|
1234
1234
|
"text-xs font-medium",
|
|
1235
|
-
|
|
1235
|
+
g ? "text-white/55" : "text-black/55"
|
|
1236
1236
|
),
|
|
1237
1237
|
children: i
|
|
1238
1238
|
}
|
|
@@ -1248,25 +1248,25 @@ const Aa = (e) => {
|
|
|
1248
1248
|
function xs(e) {
|
|
1249
1249
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function ut(e) {
|
|
1252
1252
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1253
1253
|
}
|
|
1254
1254
|
function La(e) {
|
|
1255
1255
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function za(e) {
|
|
1258
1258
|
return e ? "text-white" : "text-black";
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function Pa(e) {
|
|
1261
1261
|
return e ? "text-white/55" : "text-black/55";
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function Fa(e) {
|
|
1264
1264
|
return e ? "text-white/40" : "text-black/40";
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function Oa(e) {
|
|
1267
1267
|
return e ? "text-white/20" : "text-black/20";
|
|
1268
1268
|
}
|
|
1269
|
-
const
|
|
1269
|
+
const mt = ({ attachment: e, isMyMessage: t }) => {
|
|
1270
1270
|
const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ m(U.Fragment, { children: [
|
|
1271
1271
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1272
1272
|
"img",
|
|
@@ -1279,13 +1279,13 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1279
1279
|
"div",
|
|
1280
1280
|
{
|
|
1281
1281
|
className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
|
|
1282
|
-
children: /* @__PURE__ */ s(
|
|
1282
|
+
children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
|
|
1283
1283
|
}
|
|
1284
1284
|
) }),
|
|
1285
1285
|
/* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
|
|
1286
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1287
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1288
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1286
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
|
|
1287
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
|
|
1288
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(t)}`, children: d })
|
|
1289
1289
|
] })
|
|
1290
1290
|
] });
|
|
1291
1291
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
|
|
@@ -1293,11 +1293,11 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1293
1293
|
function ws(e) {
|
|
1294
1294
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function ht(e) {
|
|
1297
1297
|
var t;
|
|
1298
1298
|
return (t = e.attachments) == null ? void 0 : t.find(ws);
|
|
1299
1299
|
}
|
|
1300
|
-
async function
|
|
1300
|
+
async function $a(e, t) {
|
|
1301
1301
|
let n;
|
|
1302
1302
|
try {
|
|
1303
1303
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1309,7 +1309,7 @@ async function Oa(e, t) {
|
|
|
1309
1309
|
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1310
1310
|
l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1311
1311
|
}
|
|
1312
|
-
const
|
|
1312
|
+
const ja = ({
|
|
1313
1313
|
url: e,
|
|
1314
1314
|
filename: t
|
|
1315
1315
|
}) => {
|
|
@@ -1321,7 +1321,7 @@ const $a = ({
|
|
|
1321
1321
|
onClick: (i) => {
|
|
1322
1322
|
i.stopPropagation();
|
|
1323
1323
|
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1324
|
-
a(!0),
|
|
1324
|
+
a(!0), $a(e, t).then(() => {
|
|
1325
1325
|
l == null || l.close();
|
|
1326
1326
|
}).catch(() => {
|
|
1327
1327
|
l && (l.location.href = e);
|
|
@@ -1329,22 +1329,22 @@ const $a = ({
|
|
|
1329
1329
|
},
|
|
1330
1330
|
disabled: n,
|
|
1331
1331
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1332
|
-
children: n ? /* @__PURE__ */ s(
|
|
1333
|
-
/* @__PURE__ */ s(
|
|
1332
|
+
children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
|
|
1333
|
+
/* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
|
|
1334
1334
|
"Download"
|
|
1335
1335
|
] })
|
|
1336
1336
|
}
|
|
1337
1337
|
);
|
|
1338
1338
|
};
|
|
1339
|
-
function
|
|
1340
|
-
var h,
|
|
1339
|
+
function ft(e) {
|
|
1340
|
+
var h, g, c, v;
|
|
1341
1341
|
const t = (h = e.attachments) == null ? void 0 : h.find(
|
|
1342
1342
|
(w) => w.type === "video" && w.asset_url
|
|
1343
|
-
), n = (
|
|
1343
|
+
), n = (g = e.attachments) == null ? void 0 : g.find(
|
|
1344
1344
|
(w) => w.type === "image" && w.image_url
|
|
1345
|
-
), a = (
|
|
1345
|
+
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1346
1346
|
(w) => w.type === "audio" && w.asset_url
|
|
1347
|
-
), r = (
|
|
1347
|
+
), r = (v = e.attachments) == null ? void 0 : v.find(
|
|
1348
1348
|
(w) => w.type === "file" && w.asset_url
|
|
1349
1349
|
), i = t ?? n ?? a ?? r, l = (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);
|
|
1350
1350
|
if (!l) return null;
|
|
@@ -1392,7 +1392,7 @@ const _s = ({
|
|
|
1392
1392
|
fileSize: a,
|
|
1393
1393
|
thumbnailUrl: r
|
|
1394
1394
|
}) => {
|
|
1395
|
-
const i =
|
|
1395
|
+
const i = ce(t), l = a !== void 0 ? xs(a) : void 0;
|
|
1396
1396
|
return /* @__PURE__ */ s(
|
|
1397
1397
|
vs,
|
|
1398
1398
|
{
|
|
@@ -1411,14 +1411,14 @@ const _s = ({
|
|
|
1411
1411
|
containedImage: i === "image" || i === "document"
|
|
1412
1412
|
}
|
|
1413
1413
|
),
|
|
1414
|
-
action: /* @__PURE__ */ s(
|
|
1414
|
+
action: /* @__PURE__ */ s(ja, { url: e, filename: n })
|
|
1415
1415
|
}
|
|
1416
1416
|
);
|
|
1417
|
-
},
|
|
1417
|
+
}, Ba = ({
|
|
1418
1418
|
message: e,
|
|
1419
1419
|
isMyMessage: t = !1
|
|
1420
1420
|
}) => {
|
|
1421
|
-
const n =
|
|
1421
|
+
const n = ht(e), a = ft(e);
|
|
1422
1422
|
return !n && !a ? null : /* @__PURE__ */ m("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
|
|
1423
1423
|
!t && e.user && /* @__PURE__ */ s(
|
|
1424
1424
|
ne,
|
|
@@ -1439,41 +1439,41 @@ const _s = ({
|
|
|
1439
1439
|
{
|
|
1440
1440
|
className: "str-chat__message-bubble",
|
|
1441
1441
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1442
|
-
children: n ? /* @__PURE__ */ s("div", { className:
|
|
1442
|
+
children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
|
|
1443
1443
|
}
|
|
1444
1444
|
) })
|
|
1445
1445
|
}
|
|
1446
1446
|
)
|
|
1447
1447
|
] });
|
|
1448
|
-
},
|
|
1448
|
+
}, Ua = ({
|
|
1449
1449
|
message: e
|
|
1450
1450
|
}) => {
|
|
1451
|
-
const t =
|
|
1451
|
+
const t = ht(e);
|
|
1452
1452
|
if (t)
|
|
1453
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1454
|
-
const n =
|
|
1453
|
+
return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
|
|
1454
|
+
const n = ft(e);
|
|
1455
1455
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
|
|
1456
|
-
},
|
|
1456
|
+
}, Va = ({
|
|
1457
1457
|
message: e
|
|
1458
1458
|
}) => {
|
|
1459
|
-
const t =
|
|
1459
|
+
const t = ht(e);
|
|
1460
1460
|
if (t)
|
|
1461
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1462
|
-
const n =
|
|
1461
|
+
return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
|
|
1462
|
+
const n = ft(e);
|
|
1463
1463
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
|
|
1464
|
-
},
|
|
1465
|
-
Creator:
|
|
1466
|
-
Visitor:
|
|
1467
|
-
}),
|
|
1464
|
+
}, ul = Object.assign(Ba, {
|
|
1465
|
+
Creator: Ua,
|
|
1466
|
+
Visitor: Va
|
|
1467
|
+
}), Ga = {
|
|
1468
1468
|
dark: "bg-[#121110]",
|
|
1469
1469
|
light: "bg-[#e9eaed]"
|
|
1470
|
-
},
|
|
1470
|
+
}, Ha = {
|
|
1471
1471
|
dark: "text-white",
|
|
1472
1472
|
light: "text-[#080707]"
|
|
1473
|
-
},
|
|
1473
|
+
}, Ya = {
|
|
1474
1474
|
dark: "border-white/[0.08]",
|
|
1475
1475
|
light: "border-black/[0.08]"
|
|
1476
|
-
},
|
|
1476
|
+
}, qa = (e) => e === "dark" ? "sender" : "receiver", Wa = {
|
|
1477
1477
|
sender: {
|
|
1478
1478
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1479
1479
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1495,7 +1495,7 @@ const _s = ({
|
|
|
1495
1495
|
children: i,
|
|
1496
1496
|
"data-testid": l
|
|
1497
1497
|
}) => {
|
|
1498
|
-
const o = t != null && t !== "", d = qa
|
|
1498
|
+
const o = t != null && t !== "", d = Wa[qa(e)][a];
|
|
1499
1499
|
return /* @__PURE__ */ m(
|
|
1500
1500
|
"div",
|
|
1501
1501
|
{
|
|
@@ -1510,10 +1510,10 @@ const _s = ({
|
|
|
1510
1510
|
// as the surrounding `CustomMessage` text bubbles.
|
|
1511
1511
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
1512
1512
|
d,
|
|
1513
|
-
Va[e],
|
|
1514
1513
|
Ga[e],
|
|
1514
|
+
Ha[e],
|
|
1515
1515
|
n && "border",
|
|
1516
|
-
n &&
|
|
1516
|
+
n && Ya[e],
|
|
1517
1517
|
r
|
|
1518
1518
|
),
|
|
1519
1519
|
children: [
|
|
@@ -1556,16 +1556,16 @@ const _s = ({
|
|
|
1556
1556
|
),
|
|
1557
1557
|
children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
|
|
1558
1558
|
}
|
|
1559
|
-
), Me = (e) => e === "received" ? "light" : "dark",
|
|
1559
|
+
), Me = (e) => e === "received" ? "light" : "dark", Xa = ({
|
|
1560
1560
|
firstOfGroup: e,
|
|
1561
1561
|
endOfGroup: t,
|
|
1562
1562
|
groupedByUser: n
|
|
1563
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1563
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ka = ({
|
|
1564
1564
|
src: e,
|
|
1565
1565
|
mimeType: t,
|
|
1566
1566
|
filename: n,
|
|
1567
1567
|
items: a
|
|
1568
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1568
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
1569
1569
|
/* @__PURE__ */ s(
|
|
1570
1570
|
"audio",
|
|
1571
1571
|
{
|
|
@@ -1577,7 +1577,7 @@ const _s = ({
|
|
|
1577
1577
|
}
|
|
1578
1578
|
),
|
|
1579
1579
|
n ?? null
|
|
1580
|
-
] }),
|
|
1580
|
+
] }), gt = ({
|
|
1581
1581
|
state: e,
|
|
1582
1582
|
src: t,
|
|
1583
1583
|
mimeType: n,
|
|
@@ -1588,10 +1588,10 @@ const _s = ({
|
|
|
1588
1588
|
preload: o,
|
|
1589
1589
|
onDismiss: d
|
|
1590
1590
|
}) => {
|
|
1591
|
-
const u = Me(e), p = e === "composer" && !!d, h =
|
|
1591
|
+
const u = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
|
|
1592
1592
|
if (h.length === 0)
|
|
1593
1593
|
return null;
|
|
1594
|
-
const
|
|
1594
|
+
const g = o ?? (h.length > 1 ? "none" : "metadata");
|
|
1595
1595
|
return /* @__PURE__ */ s(
|
|
1596
1596
|
Te,
|
|
1597
1597
|
{
|
|
@@ -1599,30 +1599,30 @@ const _s = ({
|
|
|
1599
1599
|
text: i,
|
|
1600
1600
|
groupPosition: l,
|
|
1601
1601
|
"data-testid": "audio-attachment",
|
|
1602
|
-
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((
|
|
1603
|
-
|
|
1602
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
|
|
1603
|
+
Ja,
|
|
1604
1604
|
{
|
|
1605
|
-
item:
|
|
1606
|
-
preload:
|
|
1605
|
+
item: c,
|
|
1606
|
+
preload: g,
|
|
1607
1607
|
trailingAction: (
|
|
1608
1608
|
// Composer only supports a single attachment, so the
|
|
1609
1609
|
// dismiss control sits on the only player.
|
|
1610
|
-
p &&
|
|
1610
|
+
p && v === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
|
|
1611
1611
|
)
|
|
1612
1612
|
},
|
|
1613
|
-
`${
|
|
1613
|
+
`${c.src}-${v}`
|
|
1614
1614
|
)) })
|
|
1615
1615
|
}
|
|
1616
1616
|
);
|
|
1617
|
-
},
|
|
1618
|
-
Composer:
|
|
1619
|
-
Sent:
|
|
1620
|
-
Received:
|
|
1617
|
+
}, Za = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), tr = {
|
|
1618
|
+
Composer: Za,
|
|
1619
|
+
Sent: Qa,
|
|
1620
|
+
Received: er
|
|
1621
1621
|
};
|
|
1622
|
-
function
|
|
1622
|
+
function sr(e) {
|
|
1623
1623
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
1624
1624
|
}
|
|
1625
|
-
const
|
|
1625
|
+
const nr = {
|
|
1626
1626
|
pdf: "PDF",
|
|
1627
1627
|
doc: "DOC",
|
|
1628
1628
|
xls: "XLS",
|
|
@@ -1632,7 +1632,7 @@ const sr = {
|
|
|
1632
1632
|
text: "TXT",
|
|
1633
1633
|
markdown: "MD"
|
|
1634
1634
|
};
|
|
1635
|
-
function
|
|
1635
|
+
function ar(e, t) {
|
|
1636
1636
|
if (t) {
|
|
1637
1637
|
const r = t.lastIndexOf(".");
|
|
1638
1638
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1641,8 +1641,8 @@ function nr(e, t) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
}
|
|
1643
1643
|
if (!e) return;
|
|
1644
|
-
if (
|
|
1645
|
-
const r = ps(e), i =
|
|
1644
|
+
if (ce(e) === "document") {
|
|
1645
|
+
const r = ps(e), i = nr[r];
|
|
1646
1646
|
if (i) return i;
|
|
1647
1647
|
if (e === "application/octet-stream") return;
|
|
1648
1648
|
}
|
|
@@ -1650,8 +1650,8 @@ function nr(e, t) {
|
|
|
1650
1650
|
if (!(!a || a === "*"))
|
|
1651
1651
|
return a.toUpperCase();
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
const a =
|
|
1653
|
+
function rr(e, t, n) {
|
|
1654
|
+
const a = ar(e, t), r = typeof n == "number" && n > 0 ? sr(n) : void 0;
|
|
1655
1655
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1656
1656
|
}
|
|
1657
1657
|
function re(e) {
|
|
@@ -1662,13 +1662,13 @@ function re(e) {
|
|
|
1662
1662
|
return "download";
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
const
|
|
1665
|
+
const ir = {
|
|
1666
1666
|
dark: "text-white/55",
|
|
1667
1667
|
light: "text-black/65"
|
|
1668
|
-
},
|
|
1668
|
+
}, lr = {
|
|
1669
1669
|
dark: "bg-white/10",
|
|
1670
1670
|
light: "bg-black/5"
|
|
1671
|
-
},
|
|
1671
|
+
}, or = {
|
|
1672
1672
|
dark: "text-white/85",
|
|
1673
1673
|
light: "text-black/85"
|
|
1674
1674
|
}, ys = ({
|
|
@@ -1681,16 +1681,16 @@ const rr = {
|
|
|
1681
1681
|
activateLabel: l,
|
|
1682
1682
|
trailingAction: o
|
|
1683
1683
|
}) => {
|
|
1684
|
-
const d = n ?? t ?? "File", u =
|
|
1684
|
+
const d = n ?? t ?? "File", u = rr(a, t, r), p = /* @__PURE__ */ s(
|
|
1685
1685
|
"div",
|
|
1686
1686
|
{
|
|
1687
1687
|
className: k(
|
|
1688
1688
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1689
|
-
|
|
1689
|
+
lr[e]
|
|
1690
1690
|
),
|
|
1691
1691
|
"aria-hidden": !0,
|
|
1692
1692
|
children: we(a, {
|
|
1693
|
-
className: k("size-6",
|
|
1693
|
+
className: k("size-6", or[e]),
|
|
1694
1694
|
weight: "regular"
|
|
1695
1695
|
})
|
|
1696
1696
|
}
|
|
@@ -1701,12 +1701,12 @@ const rr = {
|
|
|
1701
1701
|
{
|
|
1702
1702
|
className: k(
|
|
1703
1703
|
"truncate text-xs leading-4",
|
|
1704
|
-
|
|
1704
|
+
ir[e]
|
|
1705
1705
|
),
|
|
1706
1706
|
children: u
|
|
1707
1707
|
}
|
|
1708
1708
|
) : null
|
|
1709
|
-
] }),
|
|
1709
|
+
] }), g = i ? /* @__PURE__ */ m(
|
|
1710
1710
|
"button",
|
|
1711
1711
|
{
|
|
1712
1712
|
type: "button",
|
|
@@ -1721,12 +1721,12 @@ const rr = {
|
|
|
1721
1721
|
h
|
|
1722
1722
|
]
|
|
1723
1723
|
}
|
|
1724
|
-
) : /* @__PURE__ */ m(
|
|
1724
|
+
) : /* @__PURE__ */ m(ee, { children: [
|
|
1725
1725
|
p,
|
|
1726
1726
|
h
|
|
1727
1727
|
] });
|
|
1728
1728
|
return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
|
|
1729
|
-
|
|
1729
|
+
g,
|
|
1730
1730
|
o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
|
|
1731
1731
|
] });
|
|
1732
1732
|
};
|
|
@@ -1744,14 +1744,14 @@ async function ks(e, t) {
|
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
|
-
const
|
|
1747
|
+
const cr = ({
|
|
1748
1748
|
src: e,
|
|
1749
1749
|
filename: t,
|
|
1750
1750
|
fileSize: n,
|
|
1751
1751
|
mimeType: a,
|
|
1752
1752
|
title: r,
|
|
1753
1753
|
items: i
|
|
1754
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1754
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], dr = ({
|
|
1755
1755
|
variant: e,
|
|
1756
1756
|
item: t,
|
|
1757
1757
|
index: n,
|
|
@@ -1772,7 +1772,7 @@ const or = ({
|
|
|
1772
1772
|
trailingAction: r
|
|
1773
1773
|
}
|
|
1774
1774
|
);
|
|
1775
|
-
},
|
|
1775
|
+
}, pt = ({
|
|
1776
1776
|
state: e,
|
|
1777
1777
|
src: t,
|
|
1778
1778
|
filename: n,
|
|
@@ -1785,21 +1785,21 @@ const or = ({
|
|
|
1785
1785
|
onClick: u,
|
|
1786
1786
|
onDismiss: p
|
|
1787
1787
|
}) => {
|
|
1788
|
-
const h = Me(e),
|
|
1788
|
+
const h = Me(e), g = e === "composer" && !!p, c = cr({
|
|
1789
1789
|
src: t,
|
|
1790
1790
|
filename: n,
|
|
1791
1791
|
fileSize: a,
|
|
1792
1792
|
mimeType: r,
|
|
1793
1793
|
title: i,
|
|
1794
1794
|
items: l
|
|
1795
|
-
}),
|
|
1796
|
-
if ((u == null ? void 0 : u(
|
|
1797
|
-
const
|
|
1798
|
-
if (!
|
|
1799
|
-
const x =
|
|
1800
|
-
ks(
|
|
1795
|
+
}), v = (b) => {
|
|
1796
|
+
if ((u == null ? void 0 : u(b)) === !1) return;
|
|
1797
|
+
const f = c[b];
|
|
1798
|
+
if (!f) return;
|
|
1799
|
+
const x = f.filename ?? re(f.src);
|
|
1800
|
+
ks(f.src, x);
|
|
1801
1801
|
};
|
|
1802
|
-
if (
|
|
1802
|
+
if (c.length === 0)
|
|
1803
1803
|
return null;
|
|
1804
1804
|
const w = /* @__PURE__ */ s(
|
|
1805
1805
|
"span",
|
|
@@ -1809,7 +1809,7 @@ const or = ({
|
|
|
1809
1809
|
h === "dark" ? "text-white/70" : "text-black/70"
|
|
1810
1810
|
),
|
|
1811
1811
|
"aria-hidden": !0,
|
|
1812
|
-
children: /* @__PURE__ */ s(
|
|
1812
|
+
children: /* @__PURE__ */ s(Se, { className: "size-5", weight: "bold" })
|
|
1813
1813
|
}
|
|
1814
1814
|
);
|
|
1815
1815
|
return /* @__PURE__ */ s(
|
|
@@ -1819,29 +1819,29 @@ const or = ({
|
|
|
1819
1819
|
text: o,
|
|
1820
1820
|
groupPosition: d,
|
|
1821
1821
|
"data-testid": "file-attachment",
|
|
1822
|
-
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children:
|
|
1823
|
-
|
|
1822
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, f) => /* @__PURE__ */ s(
|
|
1823
|
+
dr,
|
|
1824
1824
|
{
|
|
1825
1825
|
variant: h,
|
|
1826
|
-
item:
|
|
1827
|
-
index:
|
|
1828
|
-
onActivate:
|
|
1829
|
-
trailingAction:
|
|
1826
|
+
item: b,
|
|
1827
|
+
index: f,
|
|
1828
|
+
onActivate: v,
|
|
1829
|
+
trailingAction: g && f === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
|
|
1830
1830
|
},
|
|
1831
|
-
`${
|
|
1831
|
+
`${b.src}-${f}`
|
|
1832
1832
|
)) })
|
|
1833
1833
|
}
|
|
1834
1834
|
);
|
|
1835
|
-
},
|
|
1836
|
-
Composer:
|
|
1837
|
-
Sent:
|
|
1838
|
-
Received:
|
|
1839
|
-
},
|
|
1835
|
+
}, ur = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), fr = {
|
|
1836
|
+
Composer: ur,
|
|
1837
|
+
Sent: mr,
|
|
1838
|
+
Received: hr
|
|
1839
|
+
}, bt = ({
|
|
1840
1840
|
onPrev: e,
|
|
1841
1841
|
onNext: t,
|
|
1842
1842
|
prevLabel: n = "Previous",
|
|
1843
1843
|
nextLabel: a = "Next"
|
|
1844
|
-
}) => /* @__PURE__ */ m(
|
|
1844
|
+
}) => /* @__PURE__ */ m(ee, { children: [
|
|
1845
1845
|
/* @__PURE__ */ s(
|
|
1846
1846
|
"button",
|
|
1847
1847
|
{
|
|
@@ -1849,7 +1849,7 @@ const or = ({
|
|
|
1849
1849
|
onClick: e,
|
|
1850
1850
|
"aria-label": n,
|
|
1851
1851
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1852
|
-
children: /* @__PURE__ */ s(
|
|
1852
|
+
children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1853
1853
|
}
|
|
1854
1854
|
),
|
|
1855
1855
|
/* @__PURE__ */ s(
|
|
@@ -1872,14 +1872,14 @@ const or = ({
|
|
|
1872
1872
|
onTriggered: l
|
|
1873
1873
|
}) => {
|
|
1874
1874
|
const [o, d] = B(!1), u = J(
|
|
1875
|
-
(
|
|
1876
|
-
|
|
1875
|
+
(c) => {
|
|
1876
|
+
c.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
|
|
1877
1877
|
}).finally(() => {
|
|
1878
1878
|
d(!1), l == null || l();
|
|
1879
1879
|
}));
|
|
1880
1880
|
},
|
|
1881
1881
|
[o, e, t, l]
|
|
1882
|
-
), p = r ?? n !== "pill",
|
|
1882
|
+
), p = r ?? n !== "pill", g = { className: k(
|
|
1883
1883
|
n === "pill" ? "size-4" : "size-5",
|
|
1884
1884
|
"shrink-0"
|
|
1885
1885
|
), weight: "bold" };
|
|
@@ -1898,14 +1898,14 @@ const or = ({
|
|
|
1898
1898
|
}[i]
|
|
1899
1899
|
),
|
|
1900
1900
|
children: o ? /* @__PURE__ */ s(
|
|
1901
|
-
|
|
1901
|
+
Ce,
|
|
1902
1902
|
{
|
|
1903
1903
|
className: "size-4 animate-spin",
|
|
1904
1904
|
weight: "bold",
|
|
1905
1905
|
"aria-hidden": !0
|
|
1906
1906
|
}
|
|
1907
1907
|
) : /* @__PURE__ */ s(
|
|
1908
|
-
|
|
1908
|
+
Se,
|
|
1909
1909
|
{
|
|
1910
1910
|
className: "size-5 shrink-0",
|
|
1911
1911
|
weight: "bold",
|
|
@@ -1921,7 +1921,7 @@ const or = ({
|
|
|
1921
1921
|
disabled: o,
|
|
1922
1922
|
"aria-label": a,
|
|
1923
1923
|
className: "mes-media-viewer__action",
|
|
1924
|
-
children: o ? /* @__PURE__ */ s(
|
|
1924
|
+
children: o ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1925
1925
|
}
|
|
1926
1926
|
) : /* @__PURE__ */ m(
|
|
1927
1927
|
"button",
|
|
@@ -1936,18 +1936,18 @@ const or = ({
|
|
|
1936
1936
|
),
|
|
1937
1937
|
children: [
|
|
1938
1938
|
o ? /* @__PURE__ */ s(
|
|
1939
|
-
|
|
1939
|
+
Ce,
|
|
1940
1940
|
{
|
|
1941
1941
|
className: "size-4 animate-spin",
|
|
1942
1942
|
weight: "bold",
|
|
1943
1943
|
"aria-hidden": !0
|
|
1944
1944
|
}
|
|
1945
|
-
) : /* @__PURE__ */ s(
|
|
1945
|
+
) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
|
|
1946
1946
|
p ? null : a
|
|
1947
1947
|
]
|
|
1948
1948
|
}
|
|
1949
1949
|
);
|
|
1950
|
-
}, Xe = (e, t, n) => Math.min(Math.max(e, t), n),
|
|
1950
|
+
}, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
|
|
1951
1951
|
length: e,
|
|
1952
1952
|
initialIndex: t,
|
|
1953
1953
|
open: n
|
|
@@ -1972,7 +1972,7 @@ const or = ({
|
|
|
1972
1972
|
};
|
|
1973
1973
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1974
1974
|
}, [n, e, l, o]), { index: r, prev: l, next: o };
|
|
1975
|
-
},
|
|
1975
|
+
}, xt = ({
|
|
1976
1976
|
open: e,
|
|
1977
1977
|
onClose: t,
|
|
1978
1978
|
ariaLabel: n,
|
|
@@ -1981,9 +1981,9 @@ const or = ({
|
|
|
1981
1981
|
children: i,
|
|
1982
1982
|
"data-testid": l
|
|
1983
1983
|
}) => {
|
|
1984
|
-
const o =
|
|
1984
|
+
const o = G(null), d = G(null);
|
|
1985
1985
|
return K(() => {
|
|
1986
|
-
var
|
|
1986
|
+
var g;
|
|
1987
1987
|
const h = o.current;
|
|
1988
1988
|
if (h) {
|
|
1989
1989
|
if (e) {
|
|
@@ -1996,8 +1996,8 @@ const or = ({
|
|
|
1996
1996
|
}
|
|
1997
1997
|
else
|
|
1998
1998
|
h.setAttribute("open", "");
|
|
1999
|
-
const
|
|
2000
|
-
return (
|
|
1999
|
+
const c = typeof document < "u" ? document.activeElement : null;
|
|
2000
|
+
return (g = d.current) == null || g.focus(), () => {
|
|
2001
2001
|
if (h.open)
|
|
2002
2002
|
if (typeof h.close == "function")
|
|
2003
2003
|
try {
|
|
@@ -2007,7 +2007,7 @@ const or = ({
|
|
|
2007
2007
|
}
|
|
2008
2008
|
else
|
|
2009
2009
|
h.removeAttribute("open");
|
|
2010
|
-
|
|
2010
|
+
c && document.body.contains(c) && c.focus();
|
|
2011
2011
|
};
|
|
2012
2012
|
}
|
|
2013
2013
|
if (h.open)
|
|
@@ -2062,22 +2062,22 @@ const or = ({
|
|
|
2062
2062
|
]
|
|
2063
2063
|
}
|
|
2064
2064
|
);
|
|
2065
|
-
},
|
|
2065
|
+
}, Ss = ({
|
|
2066
2066
|
open: e,
|
|
2067
2067
|
items: t,
|
|
2068
2068
|
initialIndex: n = 0,
|
|
2069
2069
|
onClose: a
|
|
2070
2070
|
}) => {
|
|
2071
|
-
const { index: r, prev: i, next: l } =
|
|
2071
|
+
const { index: r, prev: i, next: l } = vt({
|
|
2072
2072
|
length: t.length,
|
|
2073
2073
|
initialIndex: n,
|
|
2074
2074
|
open: e
|
|
2075
|
-
}), o = t[r], d =
|
|
2075
|
+
}), o = t[r], d = se(
|
|
2076
2076
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "image"),
|
|
2077
2077
|
[o]
|
|
2078
2078
|
);
|
|
2079
2079
|
return o ? /* @__PURE__ */ m(
|
|
2080
|
-
|
|
2080
|
+
xt,
|
|
2081
2081
|
{
|
|
2082
2082
|
open: e,
|
|
2083
2083
|
onClose: a,
|
|
@@ -2107,7 +2107,7 @@ const or = ({
|
|
|
2107
2107
|
`${r}:${o.src}`
|
|
2108
2108
|
),
|
|
2109
2109
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2110
|
-
|
|
2110
|
+
bt,
|
|
2111
2111
|
{
|
|
2112
2112
|
onPrev: i,
|
|
2113
2113
|
onNext: l,
|
|
@@ -2118,7 +2118,7 @@ const or = ({
|
|
|
2118
2118
|
]
|
|
2119
2119
|
}
|
|
2120
2120
|
) : null;
|
|
2121
|
-
},
|
|
2121
|
+
}, gr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Es = ({
|
|
2122
2122
|
tiles: e,
|
|
2123
2123
|
onTileActivate: t,
|
|
2124
2124
|
maxVisible: n = 4,
|
|
@@ -2127,7 +2127,7 @@ const or = ({
|
|
|
2127
2127
|
const r = e.length;
|
|
2128
2128
|
if (r === 0) return null;
|
|
2129
2129
|
const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, p) => {
|
|
2130
|
-
const h = k(
|
|
2130
|
+
const h = k(gr, "h-full w-full");
|
|
2131
2131
|
return t ? /* @__PURE__ */ m(
|
|
2132
2132
|
"button",
|
|
2133
2133
|
{
|
|
@@ -2196,7 +2196,7 @@ const or = ({
|
|
|
2196
2196
|
[e]
|
|
2197
2197
|
), l = J(() => n(!1), []);
|
|
2198
2198
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
2199
|
-
},
|
|
2199
|
+
}, pr = (e, t, n, a) => ({
|
|
2200
2200
|
ariaLabel: `Open image ${t + 1} of ${n}`,
|
|
2201
2201
|
content: /* @__PURE__ */ s(
|
|
2202
2202
|
"img",
|
|
@@ -2211,7 +2211,7 @@ const or = ({
|
|
|
2211
2211
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2212
2212
|
}
|
|
2213
2213
|
)
|
|
2214
|
-
}),
|
|
2214
|
+
}), br = ({
|
|
2215
2215
|
src: e,
|
|
2216
2216
|
alt: t,
|
|
2217
2217
|
items: n
|
|
@@ -2219,7 +2219,7 @@ const or = ({
|
|
|
2219
2219
|
src: n.src,
|
|
2220
2220
|
alt: n.alt,
|
|
2221
2221
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2222
|
-
})),
|
|
2222
|
+
})), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2223
2223
|
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Re(
|
|
2224
2224
|
r
|
|
2225
2225
|
);
|
|
@@ -2246,7 +2246,7 @@ const or = ({
|
|
|
2246
2246
|
),
|
|
2247
2247
|
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
|
|
2248
2248
|
/* @__PURE__ */ s(
|
|
2249
|
-
|
|
2249
|
+
Ss,
|
|
2250
2250
|
{
|
|
2251
2251
|
open: l,
|
|
2252
2252
|
items: Is([{ src: e, alt: t }], n),
|
|
@@ -2266,13 +2266,13 @@ const or = ({
|
|
|
2266
2266
|
loading: o = "lazy",
|
|
2267
2267
|
onClick: d
|
|
2268
2268
|
}) => {
|
|
2269
|
-
const u =
|
|
2269
|
+
const u = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
|
|
2270
2270
|
d
|
|
2271
2271
|
);
|
|
2272
2272
|
if (u.length === 0)
|
|
2273
2273
|
return null;
|
|
2274
2274
|
const w = u.map(
|
|
2275
|
-
(
|
|
2275
|
+
(b, f) => pr(b, f, u.length, o)
|
|
2276
2276
|
);
|
|
2277
2277
|
return /* @__PURE__ */ m(
|
|
2278
2278
|
Te,
|
|
@@ -2282,42 +2282,42 @@ const or = ({
|
|
|
2282
2282
|
groupPosition: l,
|
|
2283
2283
|
"data-testid": "image-attachment",
|
|
2284
2284
|
children: [
|
|
2285
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2285
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
|
|
2286
2286
|
/* @__PURE__ */ s(
|
|
2287
|
-
|
|
2287
|
+
Ss,
|
|
2288
2288
|
{
|
|
2289
2289
|
open: h,
|
|
2290
2290
|
items: Is(u, a),
|
|
2291
|
-
initialIndex:
|
|
2292
|
-
onClose:
|
|
2291
|
+
initialIndex: g,
|
|
2292
|
+
onClose: v
|
|
2293
2293
|
}
|
|
2294
2294
|
)
|
|
2295
2295
|
]
|
|
2296
2296
|
}
|
|
2297
2297
|
);
|
|
2298
|
-
},
|
|
2299
|
-
Composer:
|
|
2300
|
-
Sent:
|
|
2301
|
-
Received:
|
|
2302
|
-
},
|
|
2298
|
+
}, xr = (e) => /* @__PURE__ */ s(vr, { ...e }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), _r = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), Nr = {
|
|
2299
|
+
Composer: xr,
|
|
2300
|
+
Sent: wr,
|
|
2301
|
+
Received: _r
|
|
2302
|
+
}, yr = ({
|
|
2303
2303
|
open: e,
|
|
2304
2304
|
items: t,
|
|
2305
2305
|
initialIndex: n = 0,
|
|
2306
2306
|
onClose: a
|
|
2307
2307
|
}) => {
|
|
2308
|
-
const { index: r, prev: i, next: l } =
|
|
2308
|
+
const { index: r, prev: i, next: l } = vt({
|
|
2309
2309
|
length: t.length,
|
|
2310
2310
|
initialIndex: n,
|
|
2311
2311
|
open: e
|
|
2312
|
-
}), o = t[r], d =
|
|
2312
|
+
}), o = t[r], d = se(
|
|
2313
2313
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
|
|
2314
2314
|
[o]
|
|
2315
|
-
), u =
|
|
2316
|
-
() => o ?
|
|
2315
|
+
), u = se(
|
|
2316
|
+
() => o ? kr(o.src) : void 0,
|
|
2317
2317
|
[o]
|
|
2318
2318
|
);
|
|
2319
2319
|
return !o || !u ? null : /* @__PURE__ */ m(
|
|
2320
|
-
|
|
2320
|
+
xt,
|
|
2321
2321
|
{
|
|
2322
2322
|
open: e,
|
|
2323
2323
|
onClose: a,
|
|
@@ -2336,7 +2336,7 @@ const or = ({
|
|
|
2336
2336
|
`${r}:${o.src}`
|
|
2337
2337
|
),
|
|
2338
2338
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2339
|
-
|
|
2339
|
+
bt,
|
|
2340
2340
|
{
|
|
2341
2341
|
onPrev: i,
|
|
2342
2342
|
onNext: l,
|
|
@@ -2347,16 +2347,16 @@ const or = ({
|
|
|
2347
2347
|
]
|
|
2348
2348
|
}
|
|
2349
2349
|
);
|
|
2350
|
-
},
|
|
2350
|
+
}, kr = (e) => {
|
|
2351
2351
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2352
2352
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2353
|
-
},
|
|
2353
|
+
}, Cr = ({
|
|
2354
2354
|
src: e,
|
|
2355
2355
|
filename: t,
|
|
2356
2356
|
fileSize: n,
|
|
2357
2357
|
title: a,
|
|
2358
2358
|
items: r
|
|
2359
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2359
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Sr = ({
|
|
2360
2360
|
variant: e,
|
|
2361
2361
|
item: t,
|
|
2362
2362
|
index: n,
|
|
@@ -2377,7 +2377,7 @@ const or = ({
|
|
|
2377
2377
|
trailingAction: r
|
|
2378
2378
|
}
|
|
2379
2379
|
);
|
|
2380
|
-
},
|
|
2380
|
+
}, wt = ({
|
|
2381
2381
|
state: e,
|
|
2382
2382
|
src: t,
|
|
2383
2383
|
filename: n,
|
|
@@ -2389,12 +2389,12 @@ const or = ({
|
|
|
2389
2389
|
onClick: d,
|
|
2390
2390
|
onDismiss: u
|
|
2391
2391
|
}) => {
|
|
2392
|
-
const p = Me(e), h =
|
|
2392
|
+
const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
|
|
2393
2393
|
d
|
|
2394
|
-
),
|
|
2394
|
+
), b = e === "composer" && !!u;
|
|
2395
2395
|
if (h.length === 0)
|
|
2396
2396
|
return null;
|
|
2397
|
-
const
|
|
2397
|
+
const f = h.map((x) => ({
|
|
2398
2398
|
src: x.src,
|
|
2399
2399
|
filename: x.filename ?? re(x.src)
|
|
2400
2400
|
}));
|
|
@@ -2406,61 +2406,61 @@ const or = ({
|
|
|
2406
2406
|
groupPosition: o,
|
|
2407
2407
|
"data-testid": "pdf-attachment",
|
|
2408
2408
|
children: [
|
|
2409
|
-
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x,
|
|
2410
|
-
const
|
|
2409
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
|
|
2410
|
+
const S = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2411
2411
|
Cs,
|
|
2412
2412
|
{
|
|
2413
2413
|
url: x.src,
|
|
2414
|
-
filename:
|
|
2414
|
+
filename: S,
|
|
2415
2415
|
variant: "inline",
|
|
2416
|
-
label: `Download ${
|
|
2416
|
+
label: `Download ${S}`,
|
|
2417
2417
|
tone: p
|
|
2418
2418
|
}
|
|
2419
2419
|
);
|
|
2420
2420
|
return /* @__PURE__ */ s(
|
|
2421
|
-
|
|
2421
|
+
Sr,
|
|
2422
2422
|
{
|
|
2423
2423
|
variant: p,
|
|
2424
2424
|
item: x,
|
|
2425
|
-
index:
|
|
2426
|
-
onActivate:
|
|
2427
|
-
trailingAction:
|
|
2425
|
+
index: N,
|
|
2426
|
+
onActivate: v,
|
|
2427
|
+
trailingAction: T
|
|
2428
2428
|
},
|
|
2429
|
-
`${x.src}-${
|
|
2429
|
+
`${x.src}-${N}`
|
|
2430
2430
|
);
|
|
2431
2431
|
}) }),
|
|
2432
2432
|
/* @__PURE__ */ s(
|
|
2433
|
-
|
|
2433
|
+
yr,
|
|
2434
2434
|
{
|
|
2435
|
-
open:
|
|
2436
|
-
items:
|
|
2437
|
-
initialIndex:
|
|
2435
|
+
open: g,
|
|
2436
|
+
items: f,
|
|
2437
|
+
initialIndex: c,
|
|
2438
2438
|
onClose: w
|
|
2439
2439
|
}
|
|
2440
2440
|
)
|
|
2441
2441
|
]
|
|
2442
2442
|
}
|
|
2443
2443
|
);
|
|
2444
|
-
}, Er = (e) => /* @__PURE__ */ s(
|
|
2444
|
+
}, Er = (e) => /* @__PURE__ */ s(wt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(wt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(wt, { ...e, state: "received" }), Ar = {
|
|
2445
2445
|
Composer: Er,
|
|
2446
|
-
Sent:
|
|
2447
|
-
Received:
|
|
2446
|
+
Sent: Ir,
|
|
2447
|
+
Received: Tr
|
|
2448
2448
|
}, As = ({
|
|
2449
2449
|
open: e,
|
|
2450
2450
|
items: t,
|
|
2451
2451
|
initialIndex: n = 0,
|
|
2452
2452
|
onClose: a
|
|
2453
2453
|
}) => {
|
|
2454
|
-
const { index: r, prev: i, next: l } =
|
|
2454
|
+
const { index: r, prev: i, next: l } = vt({
|
|
2455
2455
|
length: t.length,
|
|
2456
2456
|
initialIndex: n,
|
|
2457
2457
|
open: e
|
|
2458
|
-
}), o = t[r], d =
|
|
2458
|
+
}), o = t[r], d = se(
|
|
2459
2459
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "video"),
|
|
2460
2460
|
[o]
|
|
2461
2461
|
);
|
|
2462
2462
|
return o ? /* @__PURE__ */ m(
|
|
2463
|
-
|
|
2463
|
+
xt,
|
|
2464
2464
|
{
|
|
2465
2465
|
open: e,
|
|
2466
2466
|
onClose: a,
|
|
@@ -2484,7 +2484,7 @@ const or = ({
|
|
|
2484
2484
|
`${r}:${o.src}`
|
|
2485
2485
|
),
|
|
2486
2486
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2487
|
-
|
|
2487
|
+
bt,
|
|
2488
2488
|
{
|
|
2489
2489
|
onPrev: i,
|
|
2490
2490
|
onNext: l,
|
|
@@ -2495,7 +2495,7 @@ const or = ({
|
|
|
2495
2495
|
]
|
|
2496
2496
|
}
|
|
2497
2497
|
) : null;
|
|
2498
|
-
},
|
|
2498
|
+
}, Mr = () => /* @__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(tt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
|
|
2499
2499
|
item: e,
|
|
2500
2500
|
index: t
|
|
2501
2501
|
}) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2517,11 +2517,11 @@ const or = ({
|
|
|
2517
2517
|
"aria-hidden": !0
|
|
2518
2518
|
}
|
|
2519
2519
|
) }),
|
|
2520
|
-
/* @__PURE__ */ s(
|
|
2521
|
-
] }),
|
|
2520
|
+
/* @__PURE__ */ s(Mr, {})
|
|
2521
|
+
] }), Rr = (e, t, n) => ({
|
|
2522
2522
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2523
2523
|
content: /* @__PURE__ */ s(Ms, { item: e, index: t })
|
|
2524
|
-
}),
|
|
2524
|
+
}), Dr = ({
|
|
2525
2525
|
src: e,
|
|
2526
2526
|
poster: t,
|
|
2527
2527
|
mimeType: n,
|
|
@@ -2562,7 +2562,7 @@ const or = ({
|
|
|
2562
2562
|
}
|
|
2563
2563
|
)
|
|
2564
2564
|
] });
|
|
2565
|
-
},
|
|
2565
|
+
}, Ds = ({
|
|
2566
2566
|
state: e,
|
|
2567
2567
|
src: t,
|
|
2568
2568
|
poster: n,
|
|
@@ -2574,13 +2574,13 @@ const or = ({
|
|
|
2574
2574
|
preload: d,
|
|
2575
2575
|
onClick: u
|
|
2576
2576
|
}) => {
|
|
2577
|
-
const p =
|
|
2577
|
+
const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
|
|
2578
2578
|
u
|
|
2579
2579
|
);
|
|
2580
2580
|
if (p.length === 0)
|
|
2581
2581
|
return null;
|
|
2582
|
-
const
|
|
2583
|
-
(
|
|
2582
|
+
const b = p.map(
|
|
2583
|
+
(f, x) => Rr(f, x, p.length)
|
|
2584
2584
|
);
|
|
2585
2585
|
return /* @__PURE__ */ m(
|
|
2586
2586
|
Te,
|
|
@@ -2591,57 +2591,44 @@ const or = ({
|
|
|
2591
2591
|
"data-testid": "video-attachment",
|
|
2592
2592
|
children: [
|
|
2593
2593
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2594
|
-
|
|
2594
|
+
Es,
|
|
2595
2595
|
{
|
|
2596
|
-
tiles:
|
|
2597
|
-
onTileActivate:
|
|
2596
|
+
tiles: b,
|
|
2597
|
+
onTileActivate: v,
|
|
2598
2598
|
className: "overflow-hidden rounded-md"
|
|
2599
2599
|
}
|
|
2600
2600
|
) }),
|
|
2601
2601
|
/* @__PURE__ */ s(
|
|
2602
2602
|
As,
|
|
2603
2603
|
{
|
|
2604
|
-
open:
|
|
2604
|
+
open: g,
|
|
2605
2605
|
items: Rs(p, r),
|
|
2606
|
-
initialIndex:
|
|
2606
|
+
initialIndex: c,
|
|
2607
2607
|
onClose: w
|
|
2608
2608
|
}
|
|
2609
2609
|
)
|
|
2610
2610
|
]
|
|
2611
2611
|
}
|
|
2612
2612
|
);
|
|
2613
|
-
},
|
|
2614
|
-
Composer:
|
|
2615
|
-
Sent:
|
|
2616
|
-
Received:
|
|
2617
|
-
},
|
|
2618
|
-
Image:
|
|
2619
|
-
Video:
|
|
2620
|
-
Audio:
|
|
2621
|
-
Pdf:
|
|
2622
|
-
File:
|
|
2623
|
-
}, Or = {
|
|
2624
|
-
isUnlocking: () => !1
|
|
2613
|
+
}, zr = (e) => /* @__PURE__ */ s(Lr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "received" }), Or = {
|
|
2614
|
+
Composer: zr,
|
|
2615
|
+
Sent: Pr,
|
|
2616
|
+
Received: Fr
|
|
2617
|
+
}, ye = {
|
|
2618
|
+
Image: Nr,
|
|
2619
|
+
Video: Or,
|
|
2620
|
+
Audio: tr,
|
|
2621
|
+
Pdf: Ar,
|
|
2622
|
+
File: fr
|
|
2625
2623
|
}, $r = {
|
|
2626
|
-
|
|
2627
|
-
},
|
|
2628
|
-
|
|
2629
|
-
|
|
2624
|
+
isUnlocking: () => !1
|
|
2625
|
+
}, jr = {
|
|
2626
|
+
LockedAttachment: $r
|
|
2627
|
+
}, Ls = rt({}), ml = Ls.Provider;
|
|
2628
|
+
function Br(e) {
|
|
2629
|
+
return Ie(Ls)[e] ?? jr[e];
|
|
2630
2630
|
}
|
|
2631
|
-
const
|
|
2632
|
-
message: e,
|
|
2633
|
-
groupStyles: t
|
|
2634
|
-
}) => !Br(t) || e.type === "error" || e.status !== "received" ? null : /* @__PURE__ */ m(
|
|
2635
|
-
"div",
|
|
2636
|
-
{
|
|
2637
|
-
className: "str-chat__message-delivery-status",
|
|
2638
|
-
"data-testid": "message-delivery-status",
|
|
2639
|
-
children: [
|
|
2640
|
-
/* @__PURE__ */ s(Yn, { size: 14, weight: "bold", "aria-hidden": "true" }),
|
|
2641
|
-
/* @__PURE__ */ s("span", { children: "Delivered" })
|
|
2642
|
-
]
|
|
2643
|
-
}
|
|
2644
|
-
), Vr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2631
|
+
const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2645
2632
|
"svg",
|
|
2646
2633
|
{
|
|
2647
2634
|
width: e,
|
|
@@ -2658,19 +2645,19 @@ const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
|
|
|
2658
2645
|
}
|
|
2659
2646
|
)
|
|
2660
2647
|
}
|
|
2661
|
-
),
|
|
2648
|
+
), Vr = (e) => {
|
|
2662
2649
|
var t;
|
|
2663
2650
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
2664
|
-
},
|
|
2651
|
+
}, Gr = (e) => {
|
|
2665
2652
|
var t;
|
|
2666
2653
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
2667
2654
|
}, Fe = (e) => {
|
|
2668
2655
|
var t;
|
|
2669
2656
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
2670
|
-
},
|
|
2657
|
+
}, Hr = (e) => {
|
|
2671
2658
|
var t;
|
|
2672
2659
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
2673
|
-
}, zs = (e) =>
|
|
2660
|
+
}, zs = (e) => Vr(e) || Gr(e), Yr = (e) => {
|
|
2674
2661
|
var t;
|
|
2675
2662
|
return zs(e) && !((t = e.text) != null && t.trim());
|
|
2676
2663
|
}, Ke = ({
|
|
@@ -2684,27 +2671,27 @@ const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
|
|
|
2684
2671
|
if (!r && !i)
|
|
2685
2672
|
return null;
|
|
2686
2673
|
if (r) {
|
|
2687
|
-
const
|
|
2688
|
-
if (!
|
|
2689
|
-
const
|
|
2690
|
-
return /* @__PURE__ */ m("div", { className:
|
|
2674
|
+
const g = (h = e.metadata) == null ? void 0 : h.amount_text;
|
|
2675
|
+
if (!g) return null;
|
|
2676
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
|
|
2677
|
+
return /* @__PURE__ */ m("div", { className: c, children: [
|
|
2691
2678
|
/* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
|
|
2692
|
-
/* @__PURE__ */ s("span", { children:
|
|
2679
|
+
/* @__PURE__ */ s("span", { children: v })
|
|
2693
2680
|
] });
|
|
2694
2681
|
}
|
|
2695
2682
|
const l = n && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
|
|
2696
2683
|
"message-chatbot-indicator",
|
|
2697
2684
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2698
2685
|
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2699
|
-
].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(
|
|
2700
|
-
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(
|
|
2686
|
+
].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Ur, { size: l ? 12 : 15 }) });
|
|
2687
|
+
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(ee, { children: [
|
|
2701
2688
|
u,
|
|
2702
2689
|
p
|
|
2703
|
-
] }) : /* @__PURE__ */ m(
|
|
2690
|
+
] }) : /* @__PURE__ */ m(ee, { children: [
|
|
2704
2691
|
p,
|
|
2705
2692
|
u
|
|
2706
2693
|
] }) });
|
|
2707
|
-
},
|
|
2694
|
+
}, qr = ({
|
|
2708
2695
|
selected: e,
|
|
2709
2696
|
onVoteUp: t,
|
|
2710
2697
|
onVoteDown: n
|
|
@@ -2737,26 +2724,47 @@ const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
|
|
|
2737
2724
|
children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2738
2725
|
}
|
|
2739
2726
|
)
|
|
2740
|
-
] }),
|
|
2741
|
-
|
|
2727
|
+
] }), Je = () => {
|
|
2728
|
+
var i;
|
|
2729
|
+
const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), { client: n } = oe("SentMessageDeliveryStatus"), a = (i = n.user) == null ? void 0 : i.id, r = se(() => {
|
|
2730
|
+
var l;
|
|
2731
|
+
if (!(!a || !t)) {
|
|
2732
|
+
for (let o = t.length - 1; o >= 0; o -= 1)
|
|
2733
|
+
if (((l = t[o].user) == null ? void 0 : l.id) === a) return t[o].id;
|
|
2734
|
+
}
|
|
2735
|
+
}, [t, a]);
|
|
2736
|
+
return e.id !== r ? null : /* @__PURE__ */ m(ee, { children: [
|
|
2737
|
+
/* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
|
|
2738
|
+
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2739
|
+
] });
|
|
2740
|
+
}, Wr = () => null, Xr = () => /* @__PURE__ */ s(
|
|
2741
|
+
Xs,
|
|
2742
|
+
{
|
|
2743
|
+
MessageSentStatus: Je,
|
|
2744
|
+
MessageDeliveredStatus: Je,
|
|
2745
|
+
MessageReadStatus: Je,
|
|
2746
|
+
MessageSendingStatus: Wr
|
|
2747
|
+
}
|
|
2748
|
+
), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2749
|
+
function _t(e) {
|
|
2742
2750
|
if (typeof e != "string") return;
|
|
2743
2751
|
const t = e.trim();
|
|
2744
2752
|
if (t === "") return;
|
|
2745
|
-
const n =
|
|
2753
|
+
const n = Kr.exec(t);
|
|
2746
2754
|
if (n) {
|
|
2747
2755
|
const a = n[1].toLowerCase();
|
|
2748
|
-
return
|
|
2756
|
+
return Jr.has(a) ? t : void 0;
|
|
2749
2757
|
}
|
|
2750
2758
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2751
2759
|
}
|
|
2752
|
-
const
|
|
2760
|
+
const Zr = {
|
|
2753
2761
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2754
2762
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2755
|
-
},
|
|
2763
|
+
}, Qr = ({ variant: e, cta: t }) => {
|
|
2756
2764
|
const n = k(
|
|
2757
2765
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2758
|
-
|
|
2759
|
-
), a =
|
|
2766
|
+
Zr[e]
|
|
2767
|
+
), a = _t(t.href);
|
|
2760
2768
|
return a ? /* @__PURE__ */ s(
|
|
2761
2769
|
"a",
|
|
2762
2770
|
{
|
|
@@ -2782,13 +2790,13 @@ const Jr = {
|
|
|
2782
2790
|
children: t.label
|
|
2783
2791
|
}
|
|
2784
2792
|
);
|
|
2785
|
-
},
|
|
2793
|
+
}, ei = {
|
|
2786
2794
|
dark: "text-white",
|
|
2787
2795
|
light: "text-black/90"
|
|
2788
|
-
},
|
|
2796
|
+
}, ti = "text-white/30", si = {
|
|
2789
2797
|
dark: "text-white/55",
|
|
2790
2798
|
light: "text-black/55"
|
|
2791
|
-
},
|
|
2799
|
+
}, Nt = ({
|
|
2792
2800
|
variant: e,
|
|
2793
2801
|
title: t,
|
|
2794
2802
|
placeholderTitle: n,
|
|
@@ -2798,14 +2806,14 @@ const Jr = {
|
|
|
2798
2806
|
cta: l,
|
|
2799
2807
|
trailingAction: o
|
|
2800
2808
|
}) => {
|
|
2801
|
-
const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "",
|
|
2802
|
-
if (!p && !h && !
|
|
2803
|
-
const
|
|
2809
|
+
const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", v = l != null;
|
|
2810
|
+
if (!p && !h && !c && !v) return null;
|
|
2811
|
+
const b = k(
|
|
2804
2812
|
"truncate text-base font-medium leading-6",
|
|
2805
|
-
d && !t ?
|
|
2806
|
-
),
|
|
2813
|
+
d && !t ? ti : ei[e]
|
|
2814
|
+
), f = k(
|
|
2807
2815
|
"truncate text-xs leading-4",
|
|
2808
|
-
|
|
2816
|
+
si[e]
|
|
2809
2817
|
);
|
|
2810
2818
|
return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
|
|
2811
2819
|
/* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2813,17 +2821,17 @@ const Jr = {
|
|
|
2813
2821
|
/* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2814
2822
|
p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2815
2823
|
i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
|
|
2816
|
-
/* @__PURE__ */ s("p", { className: k("min-w-0",
|
|
2824
|
+
/* @__PURE__ */ s("p", { className: k("min-w-0", b), children: u })
|
|
2817
2825
|
] }),
|
|
2818
|
-
h && /* @__PURE__ */ s("p", { className:
|
|
2826
|
+
h && /* @__PURE__ */ s("p", { className: f, children: a })
|
|
2819
2827
|
] }),
|
|
2820
|
-
!
|
|
2828
|
+
!v && c && /* @__PURE__ */ s("p", { className: f, children: g })
|
|
2821
2829
|
] }),
|
|
2822
2830
|
o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
|
|
2823
2831
|
] }),
|
|
2824
|
-
l && /* @__PURE__ */ s(
|
|
2832
|
+
l && /* @__PURE__ */ s(Qr, { variant: e, cta: l })
|
|
2825
2833
|
] });
|
|
2826
|
-
},
|
|
2834
|
+
}, ni = k(
|
|
2827
2835
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2828
2836
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2829
2837
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2842,7 +2850,7 @@ const Jr = {
|
|
|
2842
2850
|
"data-testid": d
|
|
2843
2851
|
}) => {
|
|
2844
2852
|
const u = n != null || a != null, p = k(
|
|
2845
|
-
|
|
2853
|
+
ni,
|
|
2846
2854
|
o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2847
2855
|
// `focus-ring` is a design-system utility from the component-library
|
|
2848
2856
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2890,17 +2898,17 @@ const Jr = {
|
|
|
2890
2898
|
]
|
|
2891
2899
|
}
|
|
2892
2900
|
);
|
|
2893
|
-
},
|
|
2901
|
+
}, ai = {
|
|
2894
2902
|
dark: "bg-white/10",
|
|
2895
2903
|
light: "bg-black/5"
|
|
2896
|
-
},
|
|
2904
|
+
}, ri = {
|
|
2897
2905
|
dark: "size-16 text-white/25",
|
|
2898
2906
|
light: "size-16 text-black/25"
|
|
2899
|
-
}, Ve = (e, t) => !!t && !!e &&
|
|
2907
|
+
}, Ve = (e, t) => !!t && !!e && ce(e) === "audio", yt = (e, t) => {
|
|
2900
2908
|
if (!t || !e) return !1;
|
|
2901
|
-
const n =
|
|
2909
|
+
const n = ce(e);
|
|
2902
2910
|
return n === "video" || n === "audio";
|
|
2903
|
-
},
|
|
2911
|
+
}, kt = "bg-[#F2F3F4]", $e = ({
|
|
2904
2912
|
variant: e,
|
|
2905
2913
|
thumbnailUrl: t,
|
|
2906
2914
|
sourceUrl: n,
|
|
@@ -2909,7 +2917,7 @@ const Jr = {
|
|
|
2909
2917
|
topLeft: i,
|
|
2910
2918
|
topRight: l
|
|
2911
2919
|
}) => {
|
|
2912
|
-
const o =
|
|
2920
|
+
const o = ce(r), d = !!n && o === "video";
|
|
2913
2921
|
return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
|
|
2914
2922
|
"audio",
|
|
2915
2923
|
{
|
|
@@ -2951,10 +2959,10 @@ const Jr = {
|
|
|
2951
2959
|
{
|
|
2952
2960
|
className: k(
|
|
2953
2961
|
"flex h-full w-full items-center justify-center",
|
|
2954
|
-
|
|
2962
|
+
ai[e]
|
|
2955
2963
|
),
|
|
2956
2964
|
children: we(r, {
|
|
2957
|
-
className:
|
|
2965
|
+
className: ri[e],
|
|
2958
2966
|
weight: "regular"
|
|
2959
2967
|
})
|
|
2960
2968
|
}
|
|
@@ -2964,7 +2972,7 @@ const Jr = {
|
|
|
2964
2972
|
]
|
|
2965
2973
|
}
|
|
2966
2974
|
);
|
|
2967
|
-
},
|
|
2975
|
+
}, ii = ({
|
|
2968
2976
|
title: e,
|
|
2969
2977
|
placeholderTitle: t,
|
|
2970
2978
|
description: n,
|
|
@@ -2978,7 +2986,7 @@ const Jr = {
|
|
|
2978
2986
|
onDismiss: p,
|
|
2979
2987
|
onEditClick: h
|
|
2980
2988
|
}) => {
|
|
2981
|
-
const
|
|
2989
|
+
const g = o === "classic", c = Ve(r, l), v = p ? /* @__PURE__ */ s(
|
|
2982
2990
|
"button",
|
|
2983
2991
|
{
|
|
2984
2992
|
type: "button",
|
|
@@ -2994,10 +3002,10 @@ const Jr = {
|
|
|
2994
3002
|
onClick: h,
|
|
2995
3003
|
"aria-label": "Edit attachment",
|
|
2996
3004
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
2997
|
-
children: /* @__PURE__ */ s(
|
|
3005
|
+
children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
|
|
2998
3006
|
}
|
|
2999
3007
|
) : void 0;
|
|
3000
|
-
return
|
|
3008
|
+
return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3001
3009
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3002
3010
|
$e,
|
|
3003
3011
|
{
|
|
@@ -3007,14 +3015,14 @@ const Jr = {
|
|
|
3007
3015
|
mimeType: r
|
|
3008
3016
|
}
|
|
3009
3017
|
) }),
|
|
3010
|
-
|
|
3018
|
+
v && /* @__PURE__ */ s("div", { className: "shrink-0", children: v })
|
|
3011
3019
|
] }) }) : /* @__PURE__ */ m(
|
|
3012
3020
|
Oe,
|
|
3013
3021
|
{
|
|
3014
3022
|
variant: "dark",
|
|
3015
|
-
topRight:
|
|
3023
|
+
topRight: g ? v : void 0,
|
|
3016
3024
|
children: [
|
|
3017
|
-
!
|
|
3025
|
+
!g && /* @__PURE__ */ s(
|
|
3018
3026
|
$e,
|
|
3019
3027
|
{
|
|
3020
3028
|
variant: "dark",
|
|
@@ -3022,11 +3030,11 @@ const Jr = {
|
|
|
3022
3030
|
sourceUrl: l,
|
|
3023
3031
|
title: e,
|
|
3024
3032
|
mimeType: r,
|
|
3025
|
-
topRight:
|
|
3033
|
+
topRight: v
|
|
3026
3034
|
}
|
|
3027
3035
|
),
|
|
3028
3036
|
/* @__PURE__ */ s(
|
|
3029
|
-
|
|
3037
|
+
Nt,
|
|
3030
3038
|
{
|
|
3031
3039
|
variant: "dark",
|
|
3032
3040
|
title: e,
|
|
@@ -3041,7 +3049,7 @@ const Jr = {
|
|
|
3041
3049
|
]
|
|
3042
3050
|
}
|
|
3043
3051
|
);
|
|
3044
|
-
},
|
|
3052
|
+
}, li = ({
|
|
3045
3053
|
title: e,
|
|
3046
3054
|
description: t,
|
|
3047
3055
|
url: n,
|
|
@@ -3053,21 +3061,21 @@ const Jr = {
|
|
|
3053
3061
|
cta: d,
|
|
3054
3062
|
onClick: u
|
|
3055
3063
|
}) => {
|
|
3056
|
-
const p =
|
|
3064
|
+
const p = yt(a, i), h = _t(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? kt : void 0, w = d && u ? {
|
|
3057
3065
|
...d,
|
|
3058
3066
|
onClick: () => {
|
|
3059
|
-
var
|
|
3060
|
-
u(), (
|
|
3067
|
+
var b;
|
|
3068
|
+
u(), (b = d.onClick) == null || b.call(d);
|
|
3061
3069
|
}
|
|
3062
3070
|
} : d;
|
|
3063
3071
|
return /* @__PURE__ */ m(
|
|
3064
3072
|
Oe,
|
|
3065
3073
|
{
|
|
3066
3074
|
variant: "light",
|
|
3067
|
-
href:
|
|
3068
|
-
onClick:
|
|
3075
|
+
href: g,
|
|
3076
|
+
onClick: c,
|
|
3069
3077
|
ariaLabel: e ?? "Open attachment preview",
|
|
3070
|
-
bgClassName:
|
|
3078
|
+
bgClassName: v,
|
|
3071
3079
|
"data-testid": "link-attachment",
|
|
3072
3080
|
children: [
|
|
3073
3081
|
l === "featured" && /* @__PURE__ */ s(
|
|
@@ -3081,7 +3089,7 @@ const Jr = {
|
|
|
3081
3089
|
}
|
|
3082
3090
|
),
|
|
3083
3091
|
/* @__PURE__ */ s(
|
|
3084
|
-
|
|
3092
|
+
Nt,
|
|
3085
3093
|
{
|
|
3086
3094
|
variant: "light",
|
|
3087
3095
|
title: e,
|
|
@@ -3094,7 +3102,7 @@ const Jr = {
|
|
|
3094
3102
|
]
|
|
3095
3103
|
}
|
|
3096
3104
|
);
|
|
3097
|
-
},
|
|
3105
|
+
}, oi = ({
|
|
3098
3106
|
title: e,
|
|
3099
3107
|
placeholderTitle: t,
|
|
3100
3108
|
description: n,
|
|
@@ -3107,14 +3115,14 @@ const Jr = {
|
|
|
3107
3115
|
cta: u,
|
|
3108
3116
|
onClick: p
|
|
3109
3117
|
}) => {
|
|
3110
|
-
const h =
|
|
3118
|
+
const h = yt(r, l), g = _t(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
|
|
3111
3119
|
return /* @__PURE__ */ m(
|
|
3112
3120
|
Oe,
|
|
3113
3121
|
{
|
|
3114
3122
|
variant: "dark",
|
|
3115
|
-
href:
|
|
3116
|
-
onClick:
|
|
3117
|
-
bgClassName: Ve(r, l) ?
|
|
3123
|
+
href: c,
|
|
3124
|
+
onClick: v,
|
|
3125
|
+
bgClassName: Ve(r, l) ? kt : void 0,
|
|
3118
3126
|
children: [
|
|
3119
3127
|
o === "featured" && /* @__PURE__ */ s(
|
|
3120
3128
|
$e,
|
|
@@ -3127,7 +3135,7 @@ const Jr = {
|
|
|
3127
3135
|
}
|
|
3128
3136
|
),
|
|
3129
3137
|
/* @__PURE__ */ s(
|
|
3130
|
-
|
|
3138
|
+
Nt,
|
|
3131
3139
|
{
|
|
3132
3140
|
variant: "dark",
|
|
3133
3141
|
title: e,
|
|
@@ -3142,10 +3150,10 @@ const Jr = {
|
|
|
3142
3150
|
}
|
|
3143
3151
|
);
|
|
3144
3152
|
}, es = {
|
|
3145
|
-
Composer:
|
|
3146
|
-
Sent:
|
|
3147
|
-
Received:
|
|
3148
|
-
},
|
|
3153
|
+
Composer: ii,
|
|
3154
|
+
Sent: oi,
|
|
3155
|
+
Received: li
|
|
3156
|
+
}, ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", di = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
|
|
3149
3157
|
function P(e) {
|
|
3150
3158
|
const t = e == null ? void 0 : e.trim();
|
|
3151
3159
|
return t || void 0;
|
|
@@ -3153,7 +3161,7 @@ function P(e) {
|
|
|
3153
3161
|
function ts(e) {
|
|
3154
3162
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3155
3163
|
}
|
|
3156
|
-
function
|
|
3164
|
+
function ui(e, t) {
|
|
3157
3165
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3158
3166
|
return !1;
|
|
3159
3167
|
const n = ts(e), a = ts(t);
|
|
@@ -3174,11 +3182,11 @@ function ss(e) {
|
|
|
3174
3182
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3175
3183
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3176
3184
|
sourceUrl: a,
|
|
3177
|
-
layout: n ||
|
|
3185
|
+
layout: n || yt(r, a) ? "featured" : "classic",
|
|
3178
3186
|
mimeType: r
|
|
3179
3187
|
};
|
|
3180
3188
|
}
|
|
3181
|
-
function
|
|
3189
|
+
function mi(e) {
|
|
3182
3190
|
var t;
|
|
3183
3191
|
return Ps(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;
|
|
3184
3192
|
}
|
|
@@ -3208,41 +3216,41 @@ function Fs(e) {
|
|
|
3208
3216
|
a(r);
|
|
3209
3217
|
continue;
|
|
3210
3218
|
}
|
|
3211
|
-
const i =
|
|
3219
|
+
const i = mi(r);
|
|
3212
3220
|
i && n(i, r);
|
|
3213
3221
|
}
|
|
3214
3222
|
return t;
|
|
3215
3223
|
}
|
|
3216
|
-
function
|
|
3224
|
+
function hi(e) {
|
|
3217
3225
|
let t = 0;
|
|
3218
3226
|
for (const n of e)
|
|
3219
3227
|
t += n.type === "link" ? n.attachments.length : 1;
|
|
3220
3228
|
return t;
|
|
3221
3229
|
}
|
|
3222
|
-
function
|
|
3230
|
+
function fi(e) {
|
|
3223
3231
|
return e.filter((t) => t.type === "media").length;
|
|
3224
3232
|
}
|
|
3225
|
-
function
|
|
3233
|
+
function gi(e, t, n) {
|
|
3226
3234
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3227
3235
|
}
|
|
3228
3236
|
function ns(e) {
|
|
3229
3237
|
return P(e.image_url) ?? P(e.asset_url) ?? "";
|
|
3230
3238
|
}
|
|
3231
|
-
function
|
|
3239
|
+
function pi(e) {
|
|
3232
3240
|
switch (e) {
|
|
3233
3241
|
case "image":
|
|
3234
|
-
return
|
|
3242
|
+
return ye.Image;
|
|
3235
3243
|
case "video":
|
|
3236
|
-
return
|
|
3244
|
+
return ye.Video;
|
|
3237
3245
|
case "audio":
|
|
3238
|
-
return
|
|
3246
|
+
return ye.Audio;
|
|
3239
3247
|
case "pdf":
|
|
3240
|
-
return
|
|
3248
|
+
return ye.Pdf;
|
|
3241
3249
|
default:
|
|
3242
|
-
return
|
|
3250
|
+
return ye.File;
|
|
3243
3251
|
}
|
|
3244
3252
|
}
|
|
3245
|
-
function
|
|
3253
|
+
function bi(e, t) {
|
|
3246
3254
|
if (t.length > 1)
|
|
3247
3255
|
switch (e) {
|
|
3248
3256
|
case "image":
|
|
@@ -3329,20 +3337,20 @@ function pi(e, t) {
|
|
|
3329
3337
|
};
|
|
3330
3338
|
}
|
|
3331
3339
|
}
|
|
3332
|
-
function
|
|
3340
|
+
function vi({
|
|
3333
3341
|
groupPosition: e,
|
|
3334
3342
|
isMyMessage: t,
|
|
3335
3343
|
segment: n,
|
|
3336
3344
|
text: a
|
|
3337
3345
|
}) {
|
|
3338
|
-
const r =
|
|
3339
|
-
...
|
|
3346
|
+
const r = pi(n.kind), i = {
|
|
3347
|
+
...bi(n.kind, n.attachments),
|
|
3340
3348
|
groupPosition: e,
|
|
3341
3349
|
...a ? { text: a } : {}
|
|
3342
3350
|
};
|
|
3343
3351
|
return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
|
|
3344
3352
|
}
|
|
3345
|
-
const
|
|
3353
|
+
const xi = ({
|
|
3346
3354
|
groupPosition: e,
|
|
3347
3355
|
isMyMessage: t,
|
|
3348
3356
|
message: n
|
|
@@ -3350,48 +3358,48 @@ const vi = ({
|
|
|
3350
3358
|
var w;
|
|
3351
3359
|
const a = Fs(n.attachments);
|
|
3352
3360
|
if (a.length === 0) return null;
|
|
3353
|
-
const r =
|
|
3361
|
+
const r = hi(a), i = fi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
|
|
3354
3362
|
let p = 0, h = 0;
|
|
3355
|
-
const
|
|
3363
|
+
const g = [], c = (b, f) => {
|
|
3356
3364
|
const x = p === r - 1;
|
|
3357
3365
|
p += 1;
|
|
3358
|
-
const
|
|
3359
|
-
|
|
3366
|
+
const N = t ? es.Sent : es.Received;
|
|
3367
|
+
g.push(
|
|
3360
3368
|
/* @__PURE__ */ m(U.Fragment, { children: [
|
|
3361
|
-
/* @__PURE__ */ s(
|
|
3362
|
-
x && u ? /* @__PURE__ */ s("div", { className: t ?
|
|
3363
|
-
] },
|
|
3369
|
+
/* @__PURE__ */ s(N, { ...ss(b) }),
|
|
3370
|
+
x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
|
|
3371
|
+
] }, f)
|
|
3364
3372
|
);
|
|
3365
|
-
},
|
|
3366
|
-
const x = p === r - 1,
|
|
3373
|
+
}, v = (b, f) => {
|
|
3374
|
+
const x = p === r - 1, N = gi(
|
|
3367
3375
|
h,
|
|
3368
3376
|
i,
|
|
3369
3377
|
e
|
|
3370
3378
|
);
|
|
3371
|
-
p += 1, h += 1,
|
|
3379
|
+
p += 1, h += 1, g.push(
|
|
3372
3380
|
/* @__PURE__ */ s(
|
|
3373
|
-
|
|
3381
|
+
vi,
|
|
3374
3382
|
{
|
|
3375
|
-
groupPosition:
|
|
3383
|
+
groupPosition: N,
|
|
3376
3384
|
isMyMessage: t,
|
|
3377
|
-
segment:
|
|
3385
|
+
segment: b,
|
|
3378
3386
|
text: x ? u : void 0
|
|
3379
3387
|
},
|
|
3380
|
-
|
|
3388
|
+
f
|
|
3381
3389
|
)
|
|
3382
3390
|
);
|
|
3383
3391
|
};
|
|
3384
|
-
return a.forEach((
|
|
3385
|
-
if (
|
|
3386
|
-
|
|
3387
|
-
|
|
3392
|
+
return a.forEach((b, f) => {
|
|
3393
|
+
if (b.type === "link") {
|
|
3394
|
+
b.attachments.forEach((x, N) => {
|
|
3395
|
+
c(x, `link-${f}-${N}`);
|
|
3388
3396
|
});
|
|
3389
3397
|
return;
|
|
3390
3398
|
}
|
|
3391
|
-
|
|
3392
|
-
}), /* @__PURE__ */ s(
|
|
3393
|
-
},
|
|
3394
|
-
var At, Mt, Rt,
|
|
3399
|
+
v(b, `media-${f}`);
|
|
3400
|
+
}), /* @__PURE__ */ s(ee, { children: g });
|
|
3401
|
+
}, wi = (e) => {
|
|
3402
|
+
var At, Mt, Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
|
|
3395
3403
|
const {
|
|
3396
3404
|
additionalMessageInputProps: t,
|
|
3397
3405
|
chatbotVotingEnabled: n,
|
|
@@ -3399,93 +3407,92 @@ const vi = ({
|
|
|
3399
3407
|
endOfGroup: r,
|
|
3400
3408
|
firstOfGroup: i,
|
|
3401
3409
|
groupedByUser: l,
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
isMyMessage: b,
|
|
3410
|
+
handleAction: o,
|
|
3411
|
+
handleOpenThread: d,
|
|
3412
|
+
handleRetry: u,
|
|
3413
|
+
highlighted: p,
|
|
3414
|
+
isMessageAIGenerated: h,
|
|
3415
|
+
isMyMessage: g,
|
|
3409
3416
|
message: c,
|
|
3410
|
-
renderText:
|
|
3411
|
-
threadList:
|
|
3412
|
-
viewerLanguage:
|
|
3413
|
-
} = e, { client:
|
|
3414
|
-
Attachment:
|
|
3415
|
-
EditMessageModal:
|
|
3416
|
-
MessageActions:
|
|
3417
|
-
MessageBlocked:
|
|
3418
|
-
MessageBouncePrompt:
|
|
3419
|
-
MessageDeleted:
|
|
3420
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
3421
|
-
MessageRepliesCountButton:
|
|
3422
|
-
ReminderNotification:
|
|
3423
|
-
StreamedMessageText:
|
|
3424
|
-
PinIndicator:
|
|
3425
|
-
} = is("CustomMessage"),
|
|
3426
|
-
() =>
|
|
3427
|
-
[
|
|
3428
|
-
), j =
|
|
3429
|
-
const
|
|
3417
|
+
renderText: v,
|
|
3418
|
+
threadList: w,
|
|
3419
|
+
viewerLanguage: b
|
|
3420
|
+
} = e, { client: f } = oe("CustomMessage"), { channel: x } = le("CustomMessage"), { isUnlocking: N, onUnlockClick: S, onFetchSource: T, onDownloadClick: M } = Br("LockedAttachment"), [L, D] = B(!1), O = Js(c.id), { selected: z, voteUp: y, voteDown: A } = xa(c), {
|
|
3421
|
+
Attachment: E = Zs,
|
|
3422
|
+
EditMessageModal: C = Qs,
|
|
3423
|
+
MessageActions: I,
|
|
3424
|
+
MessageBlocked: $ = en,
|
|
3425
|
+
MessageBouncePrompt: F = tn,
|
|
3426
|
+
MessageDeleted: V = sn,
|
|
3427
|
+
MessageIsThreadReplyInChannelButtonIndicator: Q = nn,
|
|
3428
|
+
MessageRepliesCountButton: te = an,
|
|
3429
|
+
ReminderNotification: X = rn,
|
|
3430
|
+
StreamedMessageText: _ = ln,
|
|
3431
|
+
PinIndicator: R
|
|
3432
|
+
} = is("CustomMessage"), H = on(c), q = cn(c), Y = se(
|
|
3433
|
+
() => h == null ? void 0 : h(c),
|
|
3434
|
+
[h, c]
|
|
3435
|
+
), j = se(() => {
|
|
3436
|
+
const me = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...me] : me;
|
|
3430
3437
|
if (!Fe(c)) return pe;
|
|
3431
3438
|
const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
|
|
3432
3439
|
return Gt.length === pe.length ? pe : Gt;
|
|
3433
|
-
}, [c]),
|
|
3440
|
+
}, [c]), W = se(
|
|
3434
3441
|
() => Fs(j),
|
|
3435
3442
|
[j]
|
|
3436
|
-
),
|
|
3437
|
-
const
|
|
3438
|
-
return
|
|
3439
|
-
}, [c,
|
|
3440
|
-
(
|
|
3443
|
+
), Z = se(() => {
|
|
3444
|
+
const me = hs({ message: c, viewerLanguage: b });
|
|
3445
|
+
return me === c.text ? c : { ...c, text: me };
|
|
3446
|
+
}, [c, b]), de = W.length > 0, De = W.reduce(
|
|
3447
|
+
(me, pe) => me + pe.attachments.length,
|
|
3441
3448
|
0
|
|
3442
|
-
) === ((j == null ? void 0 : j.length) ?? 0),
|
|
3449
|
+
) === ((j == null ? void 0 : j.length) ?? 0), Le = Xa(
|
|
3443
3450
|
{
|
|
3444
3451
|
endOfGroup: r,
|
|
3445
3452
|
firstOfGroup: i,
|
|
3446
3453
|
groupedByUser: l
|
|
3447
3454
|
}
|
|
3448
3455
|
);
|
|
3449
|
-
if (
|
|
3456
|
+
if (dn(c))
|
|
3450
3457
|
return null;
|
|
3451
3458
|
if (c.deleted_at || c.type === "deleted")
|
|
3452
|
-
return /* @__PURE__ */ s(
|
|
3453
|
-
if (
|
|
3454
|
-
return /* @__PURE__ */ s(
|
|
3455
|
-
const
|
|
3459
|
+
return /* @__PURE__ */ s(V, { message: c });
|
|
3460
|
+
if (un(c))
|
|
3461
|
+
return /* @__PURE__ */ s($, {});
|
|
3462
|
+
const ae = !w && !!c.reply_count, ue = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
|
|
3456
3463
|
let he;
|
|
3457
|
-
|
|
3458
|
-
const fe =
|
|
3464
|
+
ie ? he = () => u(c) : St && (he = () => D(!0));
|
|
3465
|
+
const fe = g(), Us = k(
|
|
3459
3466
|
"str-chat__message str-chat__message-simple",
|
|
3460
3467
|
`str-chat__message--${c.type}`,
|
|
3461
3468
|
`str-chat__message--${c.status}`,
|
|
3462
3469
|
fe ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
3463
3470
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
3464
3471
|
{
|
|
3465
|
-
"str-chat__message--has-attachment":
|
|
3466
|
-
"str-chat__message--highlighted":
|
|
3472
|
+
"str-chat__message--has-attachment": H,
|
|
3473
|
+
"str-chat__message--highlighted": p,
|
|
3467
3474
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3468
3475
|
"str-chat__message--with-reactions": q,
|
|
3469
3476
|
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
|
|
3470
|
-
"str-chat__message-with-thread-link":
|
|
3477
|
+
"str-chat__message-with-thread-link": ae || ue,
|
|
3471
3478
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3472
3479
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3473
3480
|
"str-chat__virtual-message__wrapper--group": l
|
|
3474
3481
|
}
|
|
3475
|
-
), Ge = c.poll_id &&
|
|
3476
|
-
return /* @__PURE__ */ m(
|
|
3482
|
+
), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = de && De && !c.quoted_message && !Ge && !Y && !ge;
|
|
3483
|
+
return /* @__PURE__ */ m(ee, { children: [
|
|
3477
3484
|
a && /* @__PURE__ */ s(
|
|
3478
|
-
|
|
3485
|
+
C,
|
|
3479
3486
|
{
|
|
3480
3487
|
additionalMessageInputProps: t
|
|
3481
3488
|
}
|
|
3482
3489
|
),
|
|
3483
|
-
|
|
3484
|
-
|
|
3490
|
+
L && /* @__PURE__ */ s(
|
|
3491
|
+
hn,
|
|
3485
3492
|
{
|
|
3486
|
-
MessageBouncePrompt:
|
|
3487
|
-
onClose: () =>
|
|
3488
|
-
open:
|
|
3493
|
+
MessageBouncePrompt: F,
|
|
3494
|
+
onClose: () => D(!1),
|
|
3495
|
+
open: L
|
|
3489
3496
|
}
|
|
3490
3497
|
),
|
|
3491
3498
|
/* @__PURE__ */ m(
|
|
@@ -3495,8 +3502,8 @@ const vi = ({
|
|
|
3495
3502
|
"data-message-id": c.id,
|
|
3496
3503
|
"data-dd-privacy": "mask",
|
|
3497
3504
|
children: [
|
|
3498
|
-
|
|
3499
|
-
!!
|
|
3505
|
+
R && /* @__PURE__ */ s(R, {}),
|
|
3506
|
+
!!O && /* @__PURE__ */ s(X, { reminder: O }),
|
|
3500
3507
|
c.user && /* @__PURE__ */ s(
|
|
3501
3508
|
ne,
|
|
3502
3509
|
{
|
|
@@ -3513,7 +3520,7 @@ const vi = ({
|
|
|
3513
3520
|
"div",
|
|
3514
3521
|
{
|
|
3515
3522
|
className: k("str-chat__message-inner", {
|
|
3516
|
-
"str-chat__simple-message--error-failed":
|
|
3523
|
+
"str-chat__simple-message--error-failed": ie || St
|
|
3517
3524
|
}),
|
|
3518
3525
|
"data-testid": "message-inner",
|
|
3519
3526
|
onClick: he,
|
|
@@ -3528,18 +3535,18 @@ const vi = ({
|
|
|
3528
3535
|
},
|
|
3529
3536
|
children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3530
3537
|
fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
3531
|
-
|
|
3538
|
+
I && /* @__PURE__ */ s(I, {}),
|
|
3532
3539
|
/* @__PURE__ */ s(
|
|
3533
3540
|
Zt.Sent,
|
|
3534
3541
|
{
|
|
3535
3542
|
title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
|
|
3536
|
-
mimeType: (
|
|
3537
|
-
thumbnailUrl: (
|
|
3543
|
+
mimeType: (Dt = c.metadata) == null ? void 0 : Dt.attachment_mime_type,
|
|
3544
|
+
thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
|
|
3538
3545
|
amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
|
|
3539
3546
|
detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
|
|
3540
3547
|
paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
|
|
3541
|
-
onPreviewClick: () => S == null ? void 0 : S(c,
|
|
3542
|
-
onFetchSource: async () => await (
|
|
3548
|
+
onPreviewClick: () => S == null ? void 0 : S(c, x),
|
|
3549
|
+
onFetchSource: async () => await (T == null ? void 0 : T(c, x))
|
|
3543
3550
|
}
|
|
3544
3551
|
)
|
|
3545
3552
|
] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
@@ -3552,22 +3559,22 @@ const vi = ({
|
|
|
3552
3559
|
amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
|
|
3553
3560
|
detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
|
|
3554
3561
|
paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
|
|
3555
|
-
isUnlocking:
|
|
3556
|
-
onUnlockClick: () => S == null ? void 0 : S(c,
|
|
3557
|
-
onFetchSource: async () => await (
|
|
3558
|
-
onDownloadClick: () =>
|
|
3562
|
+
isUnlocking: N(c.id),
|
|
3563
|
+
onUnlockClick: () => S == null ? void 0 : S(c, x),
|
|
3564
|
+
onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
|
|
3565
|
+
onDownloadClick: () => M == null ? void 0 : M(c, x)
|
|
3559
3566
|
}
|
|
3560
3567
|
),
|
|
3561
|
-
|
|
3568
|
+
I && /* @__PURE__ */ s(I, {})
|
|
3562
3569
|
] }),
|
|
3563
3570
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
3564
3571
|
qt,
|
|
3565
3572
|
{
|
|
3566
|
-
message:
|
|
3567
|
-
renderText:
|
|
3573
|
+
message: Z,
|
|
3574
|
+
renderText: v
|
|
3568
3575
|
}
|
|
3569
3576
|
) })
|
|
3570
|
-
] }) :
|
|
3577
|
+
] }) : Et ? (
|
|
3571
3578
|
/* Tip-only messages render as a standalone bubble */
|
|
3572
3579
|
/* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
|
|
3573
3580
|
) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
|
|
@@ -3582,13 +3589,13 @@ const vi = ({
|
|
|
3582
3589
|
},
|
|
3583
3590
|
children: [
|
|
3584
3591
|
/* @__PURE__ */ s(
|
|
3585
|
-
|
|
3592
|
+
xi,
|
|
3586
3593
|
{
|
|
3587
|
-
groupPosition:
|
|
3594
|
+
groupPosition: Le,
|
|
3588
3595
|
isMyMessage: fe,
|
|
3589
3596
|
message: {
|
|
3590
3597
|
attachments: j,
|
|
3591
|
-
text:
|
|
3598
|
+
text: Z.text
|
|
3592
3599
|
}
|
|
3593
3600
|
}
|
|
3594
3601
|
),
|
|
@@ -3604,32 +3611,32 @@ const vi = ({
|
|
|
3604
3611
|
isMyMessage: fe
|
|
3605
3612
|
}
|
|
3606
3613
|
),
|
|
3607
|
-
Ge && /* @__PURE__ */ s(
|
|
3614
|
+
Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
|
|
3608
3615
|
j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3609
|
-
|
|
3616
|
+
E,
|
|
3610
3617
|
{
|
|
3611
|
-
actionHandler:
|
|
3618
|
+
actionHandler: o,
|
|
3612
3619
|
attachments: j
|
|
3613
3620
|
}
|
|
3614
3621
|
) : null,
|
|
3615
|
-
|
|
3616
|
-
|
|
3622
|
+
Y ? /* @__PURE__ */ s(
|
|
3623
|
+
_,
|
|
3617
3624
|
{
|
|
3618
|
-
message:
|
|
3619
|
-
renderText:
|
|
3625
|
+
message: Z,
|
|
3626
|
+
renderText: v
|
|
3620
3627
|
}
|
|
3621
3628
|
) : /* @__PURE__ */ s(
|
|
3622
3629
|
qt,
|
|
3623
3630
|
{
|
|
3624
|
-
message:
|
|
3625
|
-
renderText:
|
|
3631
|
+
message: Z,
|
|
3632
|
+
renderText: v
|
|
3626
3633
|
}
|
|
3627
3634
|
),
|
|
3628
3635
|
/* @__PURE__ */ s(Wt, {})
|
|
3629
3636
|
] }) })
|
|
3630
3637
|
}
|
|
3631
3638
|
),
|
|
3632
|
-
!It && !
|
|
3639
|
+
!It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
|
|
3633
3640
|
(!ge || Tt) && /* @__PURE__ */ s(
|
|
3634
3641
|
Ke,
|
|
3635
3642
|
{
|
|
@@ -3639,37 +3646,37 @@ const vi = ({
|
|
|
3639
3646
|
}
|
|
3640
3647
|
),
|
|
3641
3648
|
n && ge && /* @__PURE__ */ s(
|
|
3642
|
-
|
|
3649
|
+
qr,
|
|
3643
3650
|
{
|
|
3644
|
-
selected:
|
|
3645
|
-
onVoteUp:
|
|
3646
|
-
onVoteDown:
|
|
3651
|
+
selected: z,
|
|
3652
|
+
onVoteUp: y,
|
|
3653
|
+
onVoteDown: A
|
|
3647
3654
|
}
|
|
3648
3655
|
)
|
|
3649
3656
|
] }),
|
|
3650
|
-
/* @__PURE__ */ s(
|
|
3651
|
-
|
|
3652
|
-
|
|
3657
|
+
/* @__PURE__ */ s(Xr, {}),
|
|
3658
|
+
ae && /* @__PURE__ */ s(
|
|
3659
|
+
te,
|
|
3653
3660
|
{
|
|
3654
|
-
onClick:
|
|
3661
|
+
onClick: d,
|
|
3655
3662
|
reply_count: c.reply_count
|
|
3656
3663
|
}
|
|
3657
3664
|
),
|
|
3658
|
-
|
|
3665
|
+
ue && /* @__PURE__ */ s(Q, {})
|
|
3659
3666
|
]
|
|
3660
3667
|
},
|
|
3661
3668
|
c.id
|
|
3662
3669
|
)
|
|
3663
3670
|
] });
|
|
3664
|
-
},
|
|
3665
|
-
|
|
3666
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
3667
|
-
),
|
|
3668
|
-
const t =
|
|
3669
|
-
return /* @__PURE__ */ s(
|
|
3670
|
-
},
|
|
3671
|
+
}, _i = U.memo(
|
|
3672
|
+
wi,
|
|
3673
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
|
|
3674
|
+
), Ni = (e) => {
|
|
3675
|
+
const t = _e("CustomMessage");
|
|
3676
|
+
return /* @__PURE__ */ s(_i, { ...t, ...e });
|
|
3677
|
+
}, yi = () => {
|
|
3671
3678
|
var n;
|
|
3672
|
-
const { handleDelete: e, message: t } =
|
|
3679
|
+
const { handleDelete: e, message: t } = _e("CustomMessageActions");
|
|
3673
3680
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
3674
3681
|
ds,
|
|
3675
3682
|
{
|
|
@@ -3677,11 +3684,11 @@ const vi = ({
|
|
|
3677
3684
|
"aria-label": "Delete",
|
|
3678
3685
|
title: "Delete",
|
|
3679
3686
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3680
|
-
children: /* @__PURE__ */ s(
|
|
3687
|
+
children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3681
3688
|
}
|
|
3682
3689
|
);
|
|
3683
|
-
},
|
|
3684
|
-
const { handleFlag: e } =
|
|
3690
|
+
}, ki = () => {
|
|
3691
|
+
const { handleFlag: e } = _e("CustomMessageActions");
|
|
3685
3692
|
return /* @__PURE__ */ s(
|
|
3686
3693
|
ds,
|
|
3687
3694
|
{
|
|
@@ -3692,19 +3699,19 @@ const vi = ({
|
|
|
3692
3699
|
children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3693
3700
|
}
|
|
3694
3701
|
);
|
|
3695
|
-
},
|
|
3702
|
+
}, Ci = () => {
|
|
3696
3703
|
var t;
|
|
3697
|
-
const { message: e } =
|
|
3704
|
+
const { message: e } = _e("CustomMessageActions");
|
|
3698
3705
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
|
|
3699
|
-
|
|
3706
|
+
ta,
|
|
3700
3707
|
{
|
|
3701
3708
|
messageActionSet: [
|
|
3702
|
-
{ Component:
|
|
3703
|
-
{ Component:
|
|
3709
|
+
{ Component: yi, placement: "quick", type: "delete" },
|
|
3710
|
+
{ Component: ki, placement: "quick", type: "flag" }
|
|
3704
3711
|
]
|
|
3705
3712
|
}
|
|
3706
3713
|
);
|
|
3707
|
-
},
|
|
3714
|
+
}, Si = ({
|
|
3708
3715
|
link: e,
|
|
3709
3716
|
onDismiss: t
|
|
3710
3717
|
}) => {
|
|
@@ -3748,8 +3755,8 @@ const vi = ({
|
|
|
3748
3755
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3749
3756
|
(t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
|
|
3750
3757
|
)
|
|
3751
|
-
}),
|
|
3752
|
-
const { linkPreviewsManager: e } =
|
|
3758
|
+
}), Ii = () => {
|
|
3759
|
+
const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
|
|
3753
3760
|
e.state,
|
|
3754
3761
|
Ei
|
|
3755
3762
|
), n = (r) => {
|
|
@@ -3764,9 +3771,9 @@ const vi = ({
|
|
|
3764
3771
|
// block so it keeps its intrinsic height and the container scrolls — a
|
|
3765
3772
|
// bare flex-column child would be shrunk on the column axis and its
|
|
3766
3773
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3767
|
-
/* @__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(
|
|
3774
|
+
/* @__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(Si, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3768
3775
|
) : null;
|
|
3769
|
-
},
|
|
3776
|
+
}, Ct = U.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3770
3777
|
"button",
|
|
3771
3778
|
{
|
|
3772
3779
|
...n,
|
|
@@ -3774,12 +3781,12 @@ const vi = ({
|
|
|
3774
3781
|
"aria-label": "Send",
|
|
3775
3782
|
disabled: t,
|
|
3776
3783
|
onClick: e,
|
|
3777
|
-
children: /* @__PURE__ */ s(
|
|
3784
|
+
children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
|
|
3778
3785
|
}
|
|
3779
|
-
),
|
|
3780
|
-
const e =
|
|
3781
|
-
SendButton: r =
|
|
3782
|
-
AttachmentPreviewList: i =
|
|
3786
|
+
), Ai = () => {
|
|
3787
|
+
const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
|
|
3788
|
+
SendButton: r = Ti,
|
|
3789
|
+
AttachmentPreviewList: i = wn
|
|
3783
3790
|
} = is("CustomMessageInput");
|
|
3784
3791
|
return (
|
|
3785
3792
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
@@ -3796,12 +3803,12 @@ const vi = ({
|
|
|
3796
3803
|
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)]",
|
|
3797
3804
|
"data-dd-privacy": "mask",
|
|
3798
3805
|
children: [
|
|
3799
|
-
/* @__PURE__ */ s(
|
|
3800
|
-
/* @__PURE__ */ s(
|
|
3806
|
+
/* @__PURE__ */ s(_n, {}),
|
|
3807
|
+
/* @__PURE__ */ s(Ii, {}),
|
|
3801
3808
|
/* @__PURE__ */ s(i, {}),
|
|
3802
3809
|
/* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
|
|
3803
3810
|
/* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
|
|
3804
|
-
|
|
3811
|
+
Nn,
|
|
3805
3812
|
{
|
|
3806
3813
|
"aria-disabled": e || void 0,
|
|
3807
3814
|
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
@@ -3827,7 +3834,7 @@ const vi = ({
|
|
|
3827
3834
|
}
|
|
3828
3835
|
)
|
|
3829
3836
|
);
|
|
3830
|
-
},
|
|
3837
|
+
}, Mi = ({
|
|
3831
3838
|
renderActions: e,
|
|
3832
3839
|
renderFooter: t,
|
|
3833
3840
|
disabled: n = !1,
|
|
@@ -3835,8 +3842,8 @@ const vi = ({
|
|
|
3835
3842
|
composerInput: r
|
|
3836
3843
|
}) => {
|
|
3837
3844
|
var o;
|
|
3838
|
-
const { channel: i } =
|
|
3839
|
-
return n ? /* @__PURE__ */ m(
|
|
3845
|
+
const { channel: i } = le(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
|
|
3846
|
+
return n ? /* @__PURE__ */ m(ee, { children: [
|
|
3840
3847
|
/* @__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 }),
|
|
3841
3848
|
t == null ? void 0 : t()
|
|
3842
3849
|
] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
@@ -3848,23 +3855,23 @@ const vi = ({
|
|
|
3848
3855
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3849
3856
|
children: [
|
|
3850
3857
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3851
|
-
/* @__PURE__ */ s(
|
|
3858
|
+
/* @__PURE__ */ s(Ct.Provider, { value: l, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
|
|
3852
3859
|
]
|
|
3853
3860
|
}
|
|
3854
3861
|
),
|
|
3855
3862
|
t == null ? void 0 : t()
|
|
3856
3863
|
] });
|
|
3857
|
-
},
|
|
3864
|
+
}, Ri = [
|
|
3858
3865
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
3859
3866
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
3860
|
-
],
|
|
3867
|
+
], Di = {
|
|
3861
3868
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
3862
3869
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
3863
3870
|
}, Li = [
|
|
3864
3871
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
3865
|
-
],
|
|
3872
|
+
], zi = {
|
|
3866
3873
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
3867
|
-
},
|
|
3874
|
+
}, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Li.includes(e), Oi = (e) => {
|
|
3868
3875
|
var a;
|
|
3869
3876
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
3870
3877
|
if (as(t))
|
|
@@ -3872,7 +3879,7 @@ const vi = ({
|
|
|
3872
3879
|
kind: "dm-agent",
|
|
3873
3880
|
type: t
|
|
3874
3881
|
};
|
|
3875
|
-
if (
|
|
3882
|
+
if (Fi(t))
|
|
3876
3883
|
return {
|
|
3877
3884
|
kind: "age-safety",
|
|
3878
3885
|
type: t
|
|
@@ -3883,32 +3890,32 @@ const vi = ({
|
|
|
3883
3890
|
kind: "dm-agent",
|
|
3884
3891
|
type: n
|
|
3885
3892
|
};
|
|
3886
|
-
},
|
|
3887
|
-
const t = e.indexOf(
|
|
3893
|
+
}, $i = (e) => {
|
|
3894
|
+
const t = e.indexOf(Ze);
|
|
3888
3895
|
if (t === -1)
|
|
3889
3896
|
return e;
|
|
3890
|
-
const n = t +
|
|
3891
|
-
return /* @__PURE__ */ m(
|
|
3897
|
+
const n = t + Ze.length;
|
|
3898
|
+
return /* @__PURE__ */ m(ee, { children: [
|
|
3892
3899
|
e.slice(0, t),
|
|
3893
3900
|
/* @__PURE__ */ s(
|
|
3894
3901
|
"a",
|
|
3895
3902
|
{
|
|
3896
|
-
href:
|
|
3903
|
+
href: Pi,
|
|
3897
3904
|
target: "_blank",
|
|
3898
3905
|
rel: "noopener noreferrer",
|
|
3899
3906
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
3900
|
-
children:
|
|
3907
|
+
children: Ze
|
|
3901
3908
|
}
|
|
3902
3909
|
),
|
|
3903
3910
|
e.slice(n)
|
|
3904
3911
|
] });
|
|
3905
|
-
},
|
|
3912
|
+
}, ji = (e) => {
|
|
3906
3913
|
var a, r;
|
|
3907
|
-
const t = e.message.hide_date === !0, n =
|
|
3914
|
+
const t = e.message.hide_date === !0, n = Oi(
|
|
3908
3915
|
e.message
|
|
3909
3916
|
);
|
|
3910
3917
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
3911
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
3918
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Di[n.type];
|
|
3912
3919
|
return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3913
3920
|
/* @__PURE__ */ m(
|
|
3914
3921
|
"div",
|
|
@@ -3934,7 +3941,7 @@ const vi = ({
|
|
|
3934
3941
|
] });
|
|
3935
3942
|
}
|
|
3936
3943
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
3937
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
3944
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || zi[n.type];
|
|
3938
3945
|
return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3939
3946
|
/* @__PURE__ */ m(
|
|
3940
3947
|
"div",
|
|
@@ -3944,7 +3951,7 @@ const vi = ({
|
|
|
3944
3951
|
"data-age-safety-system-type": n.type,
|
|
3945
3952
|
children: [
|
|
3946
3953
|
/* @__PURE__ */ s(
|
|
3947
|
-
|
|
3954
|
+
ea,
|
|
3948
3955
|
{
|
|
3949
3956
|
size: 24,
|
|
3950
3957
|
weight: "duotone",
|
|
@@ -3953,7 +3960,7 @@ const vi = ({
|
|
|
3953
3960
|
"data-testid": "age-safety-system-message-icon"
|
|
3954
3961
|
}
|
|
3955
3962
|
),
|
|
3956
|
-
/* @__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:
|
|
3963
|
+
/* @__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: $i(i) }) })
|
|
3957
3964
|
]
|
|
3958
3965
|
}
|
|
3959
3966
|
),
|
|
@@ -3968,7 +3975,7 @@ const vi = ({
|
|
|
3968
3975
|
] }),
|
|
3969
3976
|
!t && /* @__PURE__ */ s(Ye, { message: e.message })
|
|
3970
3977
|
] });
|
|
3971
|
-
}, Os =
|
|
3978
|
+
}, Os = rt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
3972
3979
|
"animateTransform",
|
|
3973
3980
|
{
|
|
3974
3981
|
attributeName: "transform",
|
|
@@ -3978,21 +3985,21 @@ const vi = ({
|
|
|
3978
3985
|
begin: `${120 * t}ms`,
|
|
3979
3986
|
repeatCount: "indefinite"
|
|
3980
3987
|
}
|
|
3981
|
-
) }),
|
|
3988
|
+
) }), Bi = /* @__PURE__ */ new Set([
|
|
3982
3989
|
qe.Thinking,
|
|
3983
3990
|
qe.Generating,
|
|
3984
3991
|
qe.ExternalSources
|
|
3985
|
-
]),
|
|
3986
|
-
var
|
|
3987
|
-
const { channel: t, channelConfig: n, thread: a } =
|
|
3988
|
-
if (!e && o &&
|
|
3989
|
-
const
|
|
3992
|
+
]), Ui = ({ threadList: e }) => {
|
|
3993
|
+
var v, w;
|
|
3994
|
+
const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = oe(), { typing: i = {} } = yn(), { aiState: l } = kn(t), o = Ie(Os);
|
|
3995
|
+
if (!e && o && Bi.has(l)) {
|
|
3996
|
+
const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
|
|
3990
3997
|
return /* @__PURE__ */ s(
|
|
3991
3998
|
rs,
|
|
3992
3999
|
{
|
|
3993
|
-
avatarId: (
|
|
3994
|
-
avatarName: (
|
|
3995
|
-
avatarImage:
|
|
4000
|
+
avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
|
|
4001
|
+
avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
|
|
4002
|
+
avatarImage: b == null ? void 0 : b.image,
|
|
3996
4003
|
testId: "typing-indicator-ai"
|
|
3997
4004
|
}
|
|
3998
4005
|
);
|
|
@@ -4000,25 +4007,25 @@ const vi = ({
|
|
|
4000
4007
|
if ((n == null ? void 0 : n.typing_events) === !1)
|
|
4001
4008
|
return null;
|
|
4002
4009
|
const u = e ? [] : Object.values(i).filter(
|
|
4003
|
-
({ parent_id:
|
|
4010
|
+
({ parent_id: b, user: f }) => {
|
|
4004
4011
|
var x;
|
|
4005
|
-
return (
|
|
4012
|
+
return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && !b;
|
|
4006
4013
|
}
|
|
4007
4014
|
), p = e ? Object.values(i).filter(
|
|
4008
|
-
({ parent_id:
|
|
4015
|
+
({ parent_id: b, user: f }) => {
|
|
4009
4016
|
var x;
|
|
4010
|
-
return (
|
|
4017
|
+
return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && b === (a == null ? void 0 : a.id);
|
|
4011
4018
|
}
|
|
4012
4019
|
) : [], h = e ? p : u;
|
|
4013
4020
|
if (!h.length)
|
|
4014
4021
|
return null;
|
|
4015
|
-
const
|
|
4022
|
+
const g = (w = h[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4016
4023
|
return /* @__PURE__ */ s(
|
|
4017
4024
|
rs,
|
|
4018
4025
|
{
|
|
4019
|
-
avatarId: (
|
|
4020
|
-
avatarName: (
|
|
4021
|
-
avatarImage: (
|
|
4026
|
+
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4027
|
+
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
4028
|
+
avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
|
|
4022
4029
|
testId: "typing-indicator"
|
|
4023
4030
|
}
|
|
4024
4031
|
);
|
|
@@ -4057,16 +4064,16 @@ const vi = ({
|
|
|
4057
4064
|
height: "13",
|
|
4058
4065
|
overflow: "visible",
|
|
4059
4066
|
children: [
|
|
4060
|
-
/* @__PURE__ */ s(
|
|
4061
|
-
/* @__PURE__ */ s(
|
|
4062
|
-
/* @__PURE__ */ s(
|
|
4067
|
+
/* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
|
|
4068
|
+
/* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
|
|
4069
|
+
/* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
|
|
4063
4070
|
]
|
|
4064
4071
|
}
|
|
4065
4072
|
) }) }) }) }) })
|
|
4066
4073
|
] })
|
|
4067
4074
|
}
|
|
4068
4075
|
);
|
|
4069
|
-
function
|
|
4076
|
+
function Vi(e, t) {
|
|
4070
4077
|
var a;
|
|
4071
4078
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4072
4079
|
for (const r of Object.values(n)) {
|
|
@@ -4075,7 +4082,7 @@ function Ui(e, t) {
|
|
|
4075
4082
|
return i;
|
|
4076
4083
|
}
|
|
4077
4084
|
}
|
|
4078
|
-
const
|
|
4085
|
+
const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
|
|
4079
4086
|
"div",
|
|
4080
4087
|
{
|
|
4081
4088
|
className: k("flex items-center justify-center h-full", e),
|
|
@@ -4119,11 +4126,11 @@ const Vi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ m(
|
|
|
4119
4126
|
]
|
|
4120
4127
|
}
|
|
4121
4128
|
), je = U.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
|
|
4122
|
-
/* @__PURE__ */ s(
|
|
4129
|
+
/* @__PURE__ */ s(Hi, { className: "w-6 h-6" }),
|
|
4123
4130
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4124
4131
|
] }) }));
|
|
4125
4132
|
je.displayName = "LoadingState";
|
|
4126
|
-
const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant",
|
|
4133
|
+
const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Yi = ({
|
|
4127
4134
|
onBack: e,
|
|
4128
4135
|
showBackButton: t,
|
|
4129
4136
|
showStarButton: n = !1,
|
|
@@ -4136,32 +4143,32 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4136
4143
|
onDeleteConversationClick: u,
|
|
4137
4144
|
onBlockParticipantClick: p,
|
|
4138
4145
|
onReportParticipantClick: h,
|
|
4139
|
-
customChannelActions:
|
|
4140
|
-
renderChannelActions:
|
|
4141
|
-
showChannelInfo:
|
|
4146
|
+
customChannelActions: g,
|
|
4147
|
+
renderChannelActions: c,
|
|
4148
|
+
showChannelInfo: v = !0,
|
|
4142
4149
|
onParticipantNameClick: w,
|
|
4143
|
-
renderHeaderTitleBadges:
|
|
4150
|
+
renderHeaderTitleBadges: b
|
|
4144
4151
|
}) => {
|
|
4145
|
-
var
|
|
4146
|
-
const { channel:
|
|
4152
|
+
var A, E, C, I, $, F;
|
|
4153
|
+
const { channel: f } = le(), { client: x } = oe(), N = U.useMemo(
|
|
4147
4154
|
() => {
|
|
4148
4155
|
var V;
|
|
4149
4156
|
return Ue(
|
|
4150
|
-
(V =
|
|
4157
|
+
(V = f.state) == null ? void 0 : V.members,
|
|
4151
4158
|
x == null ? void 0 : x.userID,
|
|
4152
|
-
|
|
4159
|
+
f.type
|
|
4153
4160
|
);
|
|
4154
4161
|
},
|
|
4155
|
-
[(
|
|
4156
|
-
),
|
|
4157
|
-
channel:
|
|
4158
|
-
participant:
|
|
4159
|
-
}), D = "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",
|
|
4160
|
-
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children:
|
|
4162
|
+
[(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
|
|
4163
|
+
), S = ct(N == null ? void 0 : N.user), T = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = ot(f), L = b == null ? void 0 : b({
|
|
4164
|
+
channel: f,
|
|
4165
|
+
participant: N
|
|
4166
|
+
}), D = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(ee, { children: [
|
|
4167
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: S }),
|
|
4161
4168
|
L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
|
|
4162
4169
|
] }), y = async () => {
|
|
4163
4170
|
try {
|
|
4164
|
-
|
|
4171
|
+
M ? await f.unpin() : await f.pin();
|
|
4165
4172
|
} catch (V) {
|
|
4166
4173
|
console.error(
|
|
4167
4174
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
@@ -4182,7 +4189,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4182
4189
|
}),
|
|
4183
4190
|
type: "button",
|
|
4184
4191
|
"aria-label": "Back to conversations",
|
|
4185
|
-
children: /* @__PURE__ */ s(
|
|
4192
|
+
children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
|
|
4186
4193
|
}
|
|
4187
4194
|
) }),
|
|
4188
4195
|
/* @__PURE__ */ s(
|
|
@@ -4195,7 +4202,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4195
4202
|
{
|
|
4196
4203
|
type: "button",
|
|
4197
4204
|
onClick: w,
|
|
4198
|
-
"aria-label": `View details for ${
|
|
4205
|
+
"aria-label": `View details for ${S}`,
|
|
4199
4206
|
className: k(
|
|
4200
4207
|
D,
|
|
4201
4208
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
@@ -4204,10 +4211,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4204
4211
|
/* @__PURE__ */ s(
|
|
4205
4212
|
ne,
|
|
4206
4213
|
{
|
|
4207
|
-
id: ((C =
|
|
4208
|
-
name:
|
|
4209
|
-
image:
|
|
4210
|
-
starred: n &&
|
|
4214
|
+
id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || f.id || "unknown",
|
|
4215
|
+
name: S,
|
|
4216
|
+
image: T,
|
|
4217
|
+
starred: n && M,
|
|
4211
4218
|
dmAgentEnabled: a,
|
|
4212
4219
|
size: 48
|
|
4213
4220
|
}
|
|
@@ -4226,10 +4233,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4226
4233
|
/* @__PURE__ */ s(
|
|
4227
4234
|
ne,
|
|
4228
4235
|
{
|
|
4229
|
-
id: ((
|
|
4230
|
-
name:
|
|
4231
|
-
image:
|
|
4232
|
-
starred: n &&
|
|
4236
|
+
id: ((I = N == null ? void 0 : N.user) == null ? void 0 : I.id) || f.id || "unknown",
|
|
4237
|
+
name: S,
|
|
4238
|
+
image: T,
|
|
4239
|
+
starred: n && M,
|
|
4233
4240
|
dmAgentEnabled: a,
|
|
4234
4241
|
size: 48
|
|
4235
4242
|
}
|
|
@@ -4258,24 +4265,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4258
4265
|
className: be,
|
|
4259
4266
|
onClick: y,
|
|
4260
4267
|
type: "button",
|
|
4261
|
-
"aria-label":
|
|
4268
|
+
"aria-label": M ? "Unstar conversation" : "Star conversation",
|
|
4262
4269
|
children: /* @__PURE__ */ s(
|
|
4263
4270
|
Ee,
|
|
4264
4271
|
{
|
|
4265
4272
|
className: k("size-5", {
|
|
4266
|
-
"text-yellow-600":
|
|
4267
|
-
"text-black/90": !
|
|
4273
|
+
"text-yellow-600": M,
|
|
4274
|
+
"text-black/90": !M
|
|
4268
4275
|
}),
|
|
4269
|
-
weight:
|
|
4276
|
+
weight: M ? "duotone" : "regular"
|
|
4270
4277
|
}
|
|
4271
4278
|
)
|
|
4272
4279
|
}
|
|
4273
4280
|
),
|
|
4274
|
-
|
|
4275
|
-
|
|
4281
|
+
v && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
4282
|
+
st,
|
|
4276
4283
|
{
|
|
4277
|
-
channel:
|
|
4278
|
-
participant:
|
|
4284
|
+
channel: f,
|
|
4285
|
+
participant: N,
|
|
4279
4286
|
showDeleteConversation: l,
|
|
4280
4287
|
showBlockParticipant: o,
|
|
4281
4288
|
showReportParticipant: d,
|
|
@@ -4284,7 +4291,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4284
4291
|
onDeleteConversationClick: u,
|
|
4285
4292
|
onBlockParticipantClick: p,
|
|
4286
4293
|
onReportParticipantClick: h,
|
|
4287
|
-
customChannelActions:
|
|
4294
|
+
customChannelActions: g,
|
|
4288
4295
|
triggerClassName: k(be, "bg-[#F1F0EE]")
|
|
4289
4296
|
}
|
|
4290
4297
|
))
|
|
@@ -4302,7 +4309,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4302
4309
|
type: "button",
|
|
4303
4310
|
onClick: e,
|
|
4304
4311
|
"aria-label": "Back to conversations",
|
|
4305
|
-
children: /* @__PURE__ */ s(
|
|
4312
|
+
children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
|
|
4306
4313
|
}
|
|
4307
4314
|
),
|
|
4308
4315
|
w ? /* @__PURE__ */ m(
|
|
@@ -4310,19 +4317,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4310
4317
|
{
|
|
4311
4318
|
type: "button",
|
|
4312
4319
|
onClick: w,
|
|
4313
|
-
"aria-label": `View details for ${
|
|
4320
|
+
"aria-label": `View details for ${S}`,
|
|
4314
4321
|
className: k(
|
|
4315
|
-
|
|
4322
|
+
O,
|
|
4316
4323
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
4317
4324
|
),
|
|
4318
4325
|
children: [
|
|
4319
4326
|
/* @__PURE__ */ s(
|
|
4320
4327
|
ne,
|
|
4321
4328
|
{
|
|
4322
|
-
id: ((
|
|
4323
|
-
name:
|
|
4324
|
-
image:
|
|
4325
|
-
starred: n &&
|
|
4329
|
+
id: (($ = N == null ? void 0 : N.user) == null ? void 0 : $.id) || f.id || "unknown",
|
|
4330
|
+
name: S,
|
|
4331
|
+
image: T,
|
|
4332
|
+
starred: n && M,
|
|
4326
4333
|
dmAgentEnabled: a,
|
|
4327
4334
|
size: 48
|
|
4328
4335
|
}
|
|
@@ -4339,14 +4346,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4339
4346
|
] })
|
|
4340
4347
|
]
|
|
4341
4348
|
}
|
|
4342
|
-
) : /* @__PURE__ */ m("div", { className:
|
|
4349
|
+
) : /* @__PURE__ */ m("div", { className: O, children: [
|
|
4343
4350
|
/* @__PURE__ */ s(
|
|
4344
4351
|
ne,
|
|
4345
4352
|
{
|
|
4346
|
-
id: ((
|
|
4347
|
-
name:
|
|
4348
|
-
image:
|
|
4349
|
-
starred: n &&
|
|
4353
|
+
id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || f.id || "unknown",
|
|
4354
|
+
name: S,
|
|
4355
|
+
image: T,
|
|
4356
|
+
starred: n && M,
|
|
4350
4357
|
dmAgentEnabled: a,
|
|
4351
4358
|
size: 48
|
|
4352
4359
|
}
|
|
@@ -4376,24 +4383,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4376
4383
|
className: be,
|
|
4377
4384
|
onClick: y,
|
|
4378
4385
|
type: "button",
|
|
4379
|
-
"aria-label":
|
|
4386
|
+
"aria-label": M ? "Unstar conversation" : "Star conversation",
|
|
4380
4387
|
children: /* @__PURE__ */ s(
|
|
4381
4388
|
Ee,
|
|
4382
4389
|
{
|
|
4383
4390
|
className: k("size-6", {
|
|
4384
|
-
"text-yellow-600":
|
|
4385
|
-
"text-black/90": !
|
|
4391
|
+
"text-yellow-600": M,
|
|
4392
|
+
"text-black/90": !M
|
|
4386
4393
|
}),
|
|
4387
|
-
weight:
|
|
4394
|
+
weight: M ? "duotone" : "regular"
|
|
4388
4395
|
}
|
|
4389
4396
|
)
|
|
4390
4397
|
}
|
|
4391
4398
|
),
|
|
4392
|
-
|
|
4393
|
-
|
|
4399
|
+
v && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
4400
|
+
st,
|
|
4394
4401
|
{
|
|
4395
|
-
channel:
|
|
4396
|
-
participant:
|
|
4402
|
+
channel: f,
|
|
4403
|
+
participant: N,
|
|
4397
4404
|
showDeleteConversation: l,
|
|
4398
4405
|
showBlockParticipant: o,
|
|
4399
4406
|
showReportParticipant: d,
|
|
@@ -4402,14 +4409,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4402
4409
|
onDeleteConversationClick: u,
|
|
4403
4410
|
onBlockParticipantClick: p,
|
|
4404
4411
|
onReportParticipantClick: h,
|
|
4405
|
-
customChannelActions:
|
|
4412
|
+
customChannelActions: g,
|
|
4406
4413
|
triggerClassName: be
|
|
4407
4414
|
}
|
|
4408
4415
|
))
|
|
4409
4416
|
] })
|
|
4410
4417
|
] })
|
|
4411
4418
|
] });
|
|
4412
|
-
},
|
|
4419
|
+
}, qi = ({
|
|
4413
4420
|
onBack: e,
|
|
4414
4421
|
showBackButton: t,
|
|
4415
4422
|
renderMessageInputActions: n,
|
|
@@ -4422,122 +4429,122 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4422
4429
|
onBlockParticipantClick: u,
|
|
4423
4430
|
onReportParticipantClick: p,
|
|
4424
4431
|
showBlockParticipant: h = !0,
|
|
4425
|
-
showReportParticipant:
|
|
4426
|
-
composerDisabled:
|
|
4427
|
-
composerDisabledReason:
|
|
4432
|
+
showReportParticipant: g = !0,
|
|
4433
|
+
composerDisabled: c = !1,
|
|
4434
|
+
composerDisabledReason: v,
|
|
4428
4435
|
showStarButton: w = !1,
|
|
4429
|
-
chatbotVotingEnabled:
|
|
4430
|
-
renderChannelBanner:
|
|
4436
|
+
chatbotVotingEnabled: b = !1,
|
|
4437
|
+
renderChannelBanner: f,
|
|
4431
4438
|
renderHeaderTitleBadges: x,
|
|
4432
|
-
customChannelActions:
|
|
4433
|
-
renderChannelActions:
|
|
4434
|
-
renderMessage:
|
|
4435
|
-
dmAgentEnabled:
|
|
4439
|
+
customChannelActions: N,
|
|
4440
|
+
renderChannelActions: S,
|
|
4441
|
+
renderMessage: T,
|
|
4442
|
+
dmAgentEnabled: M = !1,
|
|
4436
4443
|
viewerLanguage: L,
|
|
4437
4444
|
showChannelInfo: D = !0,
|
|
4438
|
-
onParticipantNameClick:
|
|
4445
|
+
onParticipantNameClick: O,
|
|
4439
4446
|
composerInput: z
|
|
4440
4447
|
}) => {
|
|
4441
|
-
var
|
|
4442
|
-
const { channel: y } =
|
|
4448
|
+
var _, R, H, q;
|
|
4449
|
+
const { channel: y } = le(), { client: A } = oe(), E = U.useMemo(
|
|
4443
4450
|
() => {
|
|
4444
|
-
var
|
|
4451
|
+
var Y;
|
|
4445
4452
|
return Ue(
|
|
4446
|
-
(
|
|
4447
|
-
|
|
4453
|
+
(Y = y.state) == null ? void 0 : Y.members,
|
|
4454
|
+
A == null ? void 0 : A.userID,
|
|
4448
4455
|
y.type
|
|
4449
4456
|
);
|
|
4450
4457
|
},
|
|
4451
|
-
[(
|
|
4458
|
+
[(_ = y.state) == null ? void 0 : _.members, A == null ? void 0 : A.userID, y.type]
|
|
4452
4459
|
), C = U.useMemo(() => {
|
|
4453
|
-
var
|
|
4454
|
-
const
|
|
4455
|
-
return
|
|
4456
|
-
var
|
|
4457
|
-
return ((
|
|
4460
|
+
var W;
|
|
4461
|
+
const Y = A == null ? void 0 : A.userID;
|
|
4462
|
+
return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Z) => {
|
|
4463
|
+
var de;
|
|
4464
|
+
return ((de = Z.user) == null ? void 0 : de.id) === Y;
|
|
4458
4465
|
}) : void 0;
|
|
4459
|
-
}, [
|
|
4460
|
-
(
|
|
4461
|
-
),
|
|
4462
|
-
|
|
4466
|
+
}, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q = E == null ? void 0 : E.user) == null ? void 0 : q.is_account) ?? (E == null ? void 0 : E.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
|
|
4467
|
+
(Y) => Y.type !== "deleted"
|
|
4468
|
+
), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, te = O ? /* @__PURE__ */ s(
|
|
4469
|
+
pa,
|
|
4463
4470
|
{
|
|
4464
4471
|
onBack: e,
|
|
4465
4472
|
showBackButton: t,
|
|
4466
4473
|
showChannelInfo: D,
|
|
4467
4474
|
showStarButton: w,
|
|
4468
|
-
dmAgentEnabled:
|
|
4475
|
+
dmAgentEnabled: F,
|
|
4469
4476
|
onLeaveConversation: i,
|
|
4470
4477
|
onBlockParticipant: l,
|
|
4471
4478
|
showDeleteConversation: o,
|
|
4472
4479
|
showBlockParticipant: h,
|
|
4473
|
-
showReportParticipant:
|
|
4480
|
+
showReportParticipant: g,
|
|
4474
4481
|
onDeleteConversationClick: d,
|
|
4475
4482
|
onBlockParticipantClick: u,
|
|
4476
4483
|
onReportParticipantClick: p,
|
|
4477
|
-
customChannelActions:
|
|
4478
|
-
renderChannelActions:
|
|
4479
|
-
onParticipantNameClick:
|
|
4484
|
+
customChannelActions: N,
|
|
4485
|
+
renderChannelActions: S,
|
|
4486
|
+
onParticipantNameClick: O
|
|
4480
4487
|
}
|
|
4481
4488
|
) : null, X = J(
|
|
4482
|
-
(
|
|
4483
|
-
const { message:
|
|
4484
|
-
|
|
4489
|
+
(Y) => {
|
|
4490
|
+
const { message: j } = _e("ChannelView"), W = /* @__PURE__ */ s(
|
|
4491
|
+
Ni,
|
|
4485
4492
|
{
|
|
4486
|
-
...
|
|
4487
|
-
chatbotVotingEnabled:
|
|
4493
|
+
...Y,
|
|
4494
|
+
chatbotVotingEnabled: b,
|
|
4488
4495
|
viewerLanguage: L
|
|
4489
4496
|
}
|
|
4490
4497
|
);
|
|
4491
|
-
return !
|
|
4498
|
+
return !T || !j ? W : T(W, j);
|
|
4492
4499
|
},
|
|
4493
|
-
[
|
|
4500
|
+
[b, T, L]
|
|
4494
4501
|
);
|
|
4495
|
-
return /* @__PURE__ */ s(
|
|
4496
|
-
|
|
4502
|
+
return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
|
|
4503
|
+
Sn,
|
|
4497
4504
|
{
|
|
4498
4505
|
overrides: {
|
|
4499
4506
|
Message: X,
|
|
4500
|
-
MessageActions:
|
|
4507
|
+
MessageActions: Ci
|
|
4501
4508
|
},
|
|
4502
4509
|
children: /* @__PURE__ */ m(En, { children: [
|
|
4503
|
-
|
|
4510
|
+
!O && /* @__PURE__ */ m(ee, { children: [
|
|
4504
4511
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4505
|
-
|
|
4512
|
+
Yi,
|
|
4506
4513
|
{
|
|
4507
4514
|
onBack: e,
|
|
4508
4515
|
showBackButton: t,
|
|
4509
4516
|
showChannelInfo: D,
|
|
4510
4517
|
showStarButton: w,
|
|
4511
|
-
dmAgentEnabled:
|
|
4518
|
+
dmAgentEnabled: F,
|
|
4512
4519
|
onLeaveConversation: i,
|
|
4513
4520
|
onBlockParticipant: l,
|
|
4514
4521
|
showDeleteConversation: o,
|
|
4515
4522
|
showBlockParticipant: h,
|
|
4516
|
-
showReportParticipant:
|
|
4523
|
+
showReportParticipant: g,
|
|
4517
4524
|
onDeleteConversationClick: d,
|
|
4518
4525
|
onBlockParticipantClick: u,
|
|
4519
4526
|
onReportParticipantClick: p,
|
|
4520
|
-
customChannelActions:
|
|
4521
|
-
renderChannelActions:
|
|
4527
|
+
customChannelActions: N,
|
|
4528
|
+
renderChannelActions: S,
|
|
4522
4529
|
renderHeaderTitleBadges: x
|
|
4523
4530
|
}
|
|
4524
4531
|
) }, "lt-channel-header"),
|
|
4525
|
-
|
|
4532
|
+
Q
|
|
4526
4533
|
] }),
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4534
|
+
O && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
|
|
4535
|
+
te,
|
|
4536
|
+
Q
|
|
4530
4537
|
] }),
|
|
4531
4538
|
/* @__PURE__ */ s(
|
|
4532
4539
|
"div",
|
|
4533
4540
|
{
|
|
4534
4541
|
className: "flex-1 overflow-hidden relative",
|
|
4535
4542
|
children: /* @__PURE__ */ s(
|
|
4536
|
-
|
|
4543
|
+
In,
|
|
4537
4544
|
{
|
|
4538
|
-
head:
|
|
4539
|
-
|
|
4540
|
-
|
|
4545
|
+
head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
|
|
4546
|
+
te,
|
|
4547
|
+
Q
|
|
4541
4548
|
] }) : void 0,
|
|
4542
4549
|
hideDeletedMessages: !0,
|
|
4543
4550
|
hideNewMessageSeparator: !1
|
|
@@ -4548,14 +4555,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4548
4555
|
),
|
|
4549
4556
|
r ? /* @__PURE__ */ s(U.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
|
|
4550
4557
|
/* @__PURE__ */ s(
|
|
4551
|
-
|
|
4558
|
+
Mi,
|
|
4552
4559
|
{
|
|
4553
4560
|
...n && {
|
|
4554
4561
|
renderActions: () => n == null ? void 0 : n(y)
|
|
4555
4562
|
},
|
|
4556
4563
|
renderFooter: () => a == null ? void 0 : a(y),
|
|
4557
|
-
disabled:
|
|
4558
|
-
disabledReason:
|
|
4564
|
+
disabled: c,
|
|
4565
|
+
disabledReason: v,
|
|
4559
4566
|
composerInput: z
|
|
4560
4567
|
},
|
|
4561
4568
|
"lt-channel-message-input"
|
|
@@ -4574,86 +4581,86 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4574
4581
|
onLeaveConversation: l,
|
|
4575
4582
|
onBlockParticipant: o,
|
|
4576
4583
|
className: d,
|
|
4577
|
-
CustomChannelEmptyState: u =
|
|
4584
|
+
CustomChannelEmptyState: u = Gi,
|
|
4578
4585
|
showDeleteConversation: p = !0,
|
|
4579
4586
|
onDeleteConversationClick: h,
|
|
4580
|
-
onBlockParticipantClick:
|
|
4581
|
-
onReportParticipantClick:
|
|
4582
|
-
showBlockParticipant:
|
|
4587
|
+
onBlockParticipantClick: g,
|
|
4588
|
+
onReportParticipantClick: c,
|
|
4589
|
+
showBlockParticipant: v = !0,
|
|
4583
4590
|
showReportParticipant: w = !0,
|
|
4584
|
-
composerDisabled:
|
|
4585
|
-
composerDisabledReason:
|
|
4591
|
+
composerDisabled: b = !1,
|
|
4592
|
+
composerDisabledReason: f,
|
|
4586
4593
|
dmAgentEnabled: x,
|
|
4587
|
-
messageMetadata:
|
|
4588
|
-
onMessageSent:
|
|
4589
|
-
showStarButton:
|
|
4590
|
-
chatbotVotingEnabled:
|
|
4594
|
+
messageMetadata: N,
|
|
4595
|
+
onMessageSent: S,
|
|
4596
|
+
showStarButton: T = !1,
|
|
4597
|
+
chatbotVotingEnabled: M = !1,
|
|
4591
4598
|
renderChannelBanner: L,
|
|
4592
4599
|
renderHeaderTitleBadges: D,
|
|
4593
|
-
customChannelActions:
|
|
4600
|
+
customChannelActions: O,
|
|
4594
4601
|
renderChannelActions: z,
|
|
4595
4602
|
renderMessage: y,
|
|
4596
|
-
onMessageLinkClick:
|
|
4603
|
+
onMessageLinkClick: A,
|
|
4597
4604
|
sendButton: E,
|
|
4598
4605
|
attachmentPreviewList: C,
|
|
4599
|
-
viewerLanguage:
|
|
4600
|
-
showChannelInfo:
|
|
4601
|
-
onParticipantNameClick:
|
|
4606
|
+
viewerLanguage: I,
|
|
4607
|
+
showChannelInfo: $ = !0,
|
|
4608
|
+
onParticipantNameClick: F,
|
|
4602
4609
|
composerInput: V
|
|
4603
4610
|
}) => {
|
|
4604
|
-
const
|
|
4605
|
-
async (X,
|
|
4606
|
-
var
|
|
4607
|
-
const
|
|
4608
|
-
...
|
|
4609
|
-
...
|
|
4610
|
-
...
|
|
4611
|
+
const Q = J(
|
|
4612
|
+
async (X, _, R) => {
|
|
4613
|
+
var Z;
|
|
4614
|
+
const H = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, q = x && !H, Y = {
|
|
4615
|
+
..._,
|
|
4616
|
+
...q && { silent: !0 },
|
|
4617
|
+
...N && {
|
|
4611
4618
|
metadata: {
|
|
4612
|
-
...
|
|
4613
|
-
...
|
|
4619
|
+
..._.metadata ?? {},
|
|
4620
|
+
...N
|
|
4614
4621
|
}
|
|
4615
4622
|
}
|
|
4616
|
-
},
|
|
4623
|
+
}, j = {
|
|
4617
4624
|
...R,
|
|
4618
|
-
...
|
|
4619
|
-
},
|
|
4620
|
-
return
|
|
4625
|
+
...q && { skip_push: !0 }
|
|
4626
|
+
}, W = await e.sendMessage(Y, j);
|
|
4627
|
+
return S == null || S(W), W;
|
|
4621
4628
|
},
|
|
4622
|
-
[e, x,
|
|
4623
|
-
),
|
|
4629
|
+
[e, x, N, S]
|
|
4630
|
+
), te = G(null);
|
|
4624
4631
|
return K(() => {
|
|
4625
|
-
if (!
|
|
4626
|
-
const X =
|
|
4632
|
+
if (!A) return;
|
|
4633
|
+
const X = te.current;
|
|
4627
4634
|
if (!X) return;
|
|
4628
|
-
const
|
|
4629
|
-
const
|
|
4630
|
-
if (!
|
|
4631
|
-
const
|
|
4632
|
-
|
|
4635
|
+
const _ = (R) => {
|
|
4636
|
+
const H = R.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
|
|
4637
|
+
if (!Y) return;
|
|
4638
|
+
const j = q == null ? void 0 : q.closest("[data-message-id]"), W = j == null ? void 0 : j.getAttribute("data-message-id"), Z = W ? e.state.messages.find((de) => de.id === W) : void 0;
|
|
4639
|
+
A(Y, Z);
|
|
4633
4640
|
};
|
|
4634
|
-
return X.addEventListener("click",
|
|
4635
|
-
}, [
|
|
4641
|
+
return X.addEventListener("click", _), () => X.removeEventListener("click", _);
|
|
4642
|
+
}, [A, e]), /* @__PURE__ */ s(
|
|
4636
4643
|
"div",
|
|
4637
4644
|
{
|
|
4638
|
-
ref:
|
|
4645
|
+
ref: te,
|
|
4639
4646
|
className: k(
|
|
4640
4647
|
"messaging-channel-view h-full flex flex-col",
|
|
4641
4648
|
d
|
|
4642
4649
|
),
|
|
4643
4650
|
children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
|
|
4644
|
-
|
|
4651
|
+
Cn,
|
|
4645
4652
|
{
|
|
4646
4653
|
channel: e,
|
|
4647
|
-
MessageSystem:
|
|
4654
|
+
MessageSystem: ji,
|
|
4648
4655
|
EmptyStateIndicator: u,
|
|
4649
4656
|
LoadingIndicator: je,
|
|
4650
|
-
DateSeparator:
|
|
4651
|
-
TypingIndicator:
|
|
4652
|
-
doSendMessageRequest:
|
|
4657
|
+
DateSeparator: ba,
|
|
4658
|
+
TypingIndicator: Ui,
|
|
4659
|
+
doSendMessageRequest: Q,
|
|
4653
4660
|
...E ? { SendButton: E } : {},
|
|
4654
4661
|
...C ? { AttachmentPreviewList: C } : {},
|
|
4655
4662
|
children: /* @__PURE__ */ s(
|
|
4656
|
-
|
|
4663
|
+
qi,
|
|
4657
4664
|
{
|
|
4658
4665
|
onBack: t,
|
|
4659
4666
|
showBackButton: n,
|
|
@@ -4665,23 +4672,23 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4665
4672
|
CustomChannelEmptyState: u,
|
|
4666
4673
|
showDeleteConversation: p,
|
|
4667
4674
|
onDeleteConversationClick: h,
|
|
4668
|
-
onBlockParticipantClick:
|
|
4669
|
-
onReportParticipantClick:
|
|
4670
|
-
showBlockParticipant:
|
|
4675
|
+
onBlockParticipantClick: g,
|
|
4676
|
+
onReportParticipantClick: c,
|
|
4677
|
+
showBlockParticipant: v,
|
|
4671
4678
|
showReportParticipant: w,
|
|
4672
|
-
composerDisabled:
|
|
4673
|
-
composerDisabledReason:
|
|
4674
|
-
showStarButton:
|
|
4679
|
+
composerDisabled: b,
|
|
4680
|
+
composerDisabledReason: f,
|
|
4681
|
+
showStarButton: T,
|
|
4675
4682
|
dmAgentEnabled: x,
|
|
4676
|
-
chatbotVotingEnabled:
|
|
4683
|
+
chatbotVotingEnabled: M,
|
|
4677
4684
|
renderChannelBanner: L,
|
|
4678
4685
|
renderHeaderTitleBadges: D,
|
|
4679
|
-
customChannelActions:
|
|
4686
|
+
customChannelActions: O,
|
|
4680
4687
|
renderChannelActions: z,
|
|
4681
4688
|
renderMessage: y,
|
|
4682
|
-
viewerLanguage:
|
|
4683
|
-
showChannelInfo:
|
|
4684
|
-
onParticipantNameClick:
|
|
4689
|
+
viewerLanguage: I,
|
|
4690
|
+
showChannelInfo: $,
|
|
4691
|
+
onParticipantNameClick: F,
|
|
4685
4692
|
composerInput: V
|
|
4686
4693
|
}
|
|
4687
4694
|
)
|
|
@@ -4692,7 +4699,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4692
4699
|
}
|
|
4693
4700
|
);
|
|
4694
4701
|
$s.displayName = "ChannelView";
|
|
4695
|
-
const
|
|
4702
|
+
const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
|
|
4696
4703
|
/* @__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: "⚠️" }) }),
|
|
4697
4704
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
4698
4705
|
/* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -4706,8 +4713,8 @@ const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4706
4713
|
}
|
|
4707
4714
|
)
|
|
4708
4715
|
] }) }));
|
|
4709
|
-
|
|
4710
|
-
const
|
|
4716
|
+
ke.displayName = "ErrorState";
|
|
4717
|
+
const fl = ({
|
|
4711
4718
|
capabilities: e = {},
|
|
4712
4719
|
renderMessageInputActions: t,
|
|
4713
4720
|
renderConversationFooter: n,
|
|
@@ -4720,139 +4727,139 @@ const hl = ({
|
|
|
4720
4727
|
onReportParticipantClick: u,
|
|
4721
4728
|
dmAgentEnabled: p,
|
|
4722
4729
|
onMessageSent: h,
|
|
4723
|
-
chatbotVotingEnabled:
|
|
4724
|
-
viewerLanguage:
|
|
4725
|
-
renderHeaderTitleBadges:
|
|
4730
|
+
chatbotVotingEnabled: g = !1,
|
|
4731
|
+
viewerLanguage: c,
|
|
4732
|
+
renderHeaderTitleBadges: v,
|
|
4726
4733
|
renderChannelBanner: w,
|
|
4727
|
-
customChannelActions:
|
|
4728
|
-
renderChannelActions:
|
|
4734
|
+
customChannelActions: b,
|
|
4735
|
+
renderChannelActions: f,
|
|
4729
4736
|
onParticipantNameClick: x,
|
|
4730
|
-
renderMessage:
|
|
4731
|
-
onMessageLinkClick:
|
|
4732
|
-
showChannelInfo:
|
|
4733
|
-
composerInput:
|
|
4737
|
+
renderMessage: N,
|
|
4738
|
+
onMessageLinkClick: S,
|
|
4739
|
+
showChannelInfo: T,
|
|
4740
|
+
composerInput: M
|
|
4734
4741
|
}) => {
|
|
4735
4742
|
const {
|
|
4736
4743
|
client: L,
|
|
4737
4744
|
isConnected: D,
|
|
4738
|
-
isLoading:
|
|
4745
|
+
isLoading: O,
|
|
4739
4746
|
error: z,
|
|
4740
4747
|
refreshConnection: y,
|
|
4741
|
-
service:
|
|
4748
|
+
service: A,
|
|
4742
4749
|
debug: E
|
|
4743
|
-
} =
|
|
4750
|
+
} = sa(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
|
|
4744
4751
|
X.current = l;
|
|
4745
|
-
const
|
|
4746
|
-
|
|
4747
|
-
const R =
|
|
4752
|
+
const _ = G(a);
|
|
4753
|
+
_.current = a;
|
|
4754
|
+
const R = G(null), H = G(null);
|
|
4748
4755
|
K(() => {
|
|
4749
|
-
|
|
4756
|
+
H.current = C;
|
|
4750
4757
|
}, [C]), K(() => {
|
|
4751
4758
|
if (!L || !D) return;
|
|
4752
|
-
const
|
|
4753
|
-
if (!
|
|
4754
|
-
const
|
|
4755
|
-
if (R.current ===
|
|
4756
|
-
R.current =
|
|
4757
|
-
const
|
|
4758
|
-
R.current ===
|
|
4759
|
+
const j = L.userID;
|
|
4760
|
+
if (!j) return;
|
|
4761
|
+
const W = `${j}::${i}`;
|
|
4762
|
+
if (R.current === W) return;
|
|
4763
|
+
R.current = W;
|
|
4764
|
+
const Z = () => {
|
|
4765
|
+
R.current === W && (R.current = null);
|
|
4759
4766
|
};
|
|
4760
4767
|
(async () => {
|
|
4761
|
-
var
|
|
4768
|
+
var De, Le;
|
|
4762
4769
|
try {
|
|
4763
4770
|
E && console.log(
|
|
4764
4771
|
"[MessagingShell] Loading initial conversation with:",
|
|
4765
4772
|
i
|
|
4766
4773
|
);
|
|
4767
|
-
const
|
|
4774
|
+
const ae = await L.queryChannels(
|
|
4768
4775
|
{
|
|
4769
4776
|
type: "messaging",
|
|
4770
|
-
members: { $eq: [
|
|
4777
|
+
members: { $eq: [j, i] }
|
|
4771
4778
|
},
|
|
4772
4779
|
{},
|
|
4773
4780
|
{ limit: 1 }
|
|
4774
4781
|
);
|
|
4775
|
-
if (
|
|
4776
|
-
|
|
4782
|
+
if (ae.length > 0) {
|
|
4783
|
+
I(ae[0]), F(null), (De = _.current) == null || De.call(_, ae[0]), E && console.log(
|
|
4777
4784
|
"[MessagingShell] Initial conversation loaded:",
|
|
4778
|
-
|
|
4785
|
+
ae[0].id
|
|
4779
4786
|
);
|
|
4780
4787
|
return;
|
|
4781
4788
|
}
|
|
4782
|
-
const
|
|
4783
|
-
if (!
|
|
4784
|
-
|
|
4789
|
+
const ue = X.current;
|
|
4790
|
+
if (!ue || !A) {
|
|
4791
|
+
Z(), F("No conversation found with this account"), E && console.log(
|
|
4785
4792
|
"[MessagingShell] No conversation found for:",
|
|
4786
4793
|
i
|
|
4787
4794
|
);
|
|
4788
4795
|
return;
|
|
4789
4796
|
}
|
|
4790
4797
|
try {
|
|
4791
|
-
const
|
|
4792
|
-
id:
|
|
4793
|
-
name:
|
|
4794
|
-
phone:
|
|
4798
|
+
const ie = await A.startChannelWithParticipant({
|
|
4799
|
+
id: ue.id,
|
|
4800
|
+
name: ue.name,
|
|
4801
|
+
phone: ue.phone
|
|
4795
4802
|
});
|
|
4796
|
-
|
|
4803
|
+
I(ie), F(null), (Le = _.current) == null || Le.call(_, ie), E && console.log(
|
|
4797
4804
|
"[MessagingShell] Channel created and loaded:",
|
|
4798
|
-
|
|
4805
|
+
ie.id
|
|
4799
4806
|
);
|
|
4800
|
-
} catch (
|
|
4807
|
+
} catch (ie) {
|
|
4801
4808
|
console.error(
|
|
4802
4809
|
"[MessagingShell] Failed to create conversation:",
|
|
4803
|
-
|
|
4804
|
-
),
|
|
4810
|
+
ie
|
|
4811
|
+
), Z(), F("Failed to create conversation");
|
|
4805
4812
|
}
|
|
4806
|
-
} catch (
|
|
4813
|
+
} catch (ae) {
|
|
4807
4814
|
console.error(
|
|
4808
4815
|
"[MessagingShell] Failed to load initial conversation:",
|
|
4809
|
-
|
|
4810
|
-
),
|
|
4816
|
+
ae
|
|
4817
|
+
), Z(), H.current || F("Failed to load conversation");
|
|
4811
4818
|
}
|
|
4812
4819
|
})();
|
|
4813
|
-
}, [i, L, D,
|
|
4814
|
-
const
|
|
4815
|
-
|
|
4816
|
-
const
|
|
4817
|
-
var
|
|
4818
|
-
|
|
4820
|
+
}, [i, L, D, A, E]);
|
|
4821
|
+
const q = G(r);
|
|
4822
|
+
q.current = r;
|
|
4823
|
+
const Y = J(() => {
|
|
4824
|
+
var j;
|
|
4825
|
+
I(null), Q(!0), (j = q.current) == null || j.call(q);
|
|
4819
4826
|
}, []);
|
|
4820
|
-
return
|
|
4821
|
-
|
|
4827
|
+
return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ke, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
|
|
4828
|
+
ke,
|
|
4822
4829
|
{
|
|
4823
4830
|
message: "Not connected to messaging service",
|
|
4824
4831
|
onBack: y
|
|
4825
4832
|
}
|
|
4826
|
-
) :
|
|
4833
|
+
) : $ ? /* @__PURE__ */ s(ke, { message: $ }) : V && !C ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
4827
4834
|
$s,
|
|
4828
4835
|
{
|
|
4829
4836
|
channel: C,
|
|
4830
4837
|
renderMessageInputActions: t,
|
|
4831
4838
|
renderConversationFooter: n,
|
|
4832
4839
|
renderChannelBanner: w,
|
|
4833
|
-
onLeaveConversation:
|
|
4834
|
-
onBlockParticipant:
|
|
4840
|
+
onLeaveConversation: Y,
|
|
4841
|
+
onBlockParticipant: Y,
|
|
4835
4842
|
CustomChannelEmptyState: o,
|
|
4836
|
-
showDeleteConversation:
|
|
4843
|
+
showDeleteConversation: te,
|
|
4837
4844
|
onBlockParticipantClick: d,
|
|
4838
4845
|
onReportParticipantClick: u,
|
|
4839
4846
|
dmAgentEnabled: p,
|
|
4840
4847
|
onMessageSent: h,
|
|
4841
|
-
chatbotVotingEnabled:
|
|
4842
|
-
viewerLanguage:
|
|
4843
|
-
renderHeaderTitleBadges:
|
|
4844
|
-
customChannelActions:
|
|
4845
|
-
renderChannelActions:
|
|
4848
|
+
chatbotVotingEnabled: g,
|
|
4849
|
+
viewerLanguage: c,
|
|
4850
|
+
renderHeaderTitleBadges: v,
|
|
4851
|
+
customChannelActions: b,
|
|
4852
|
+
renderChannelActions: f,
|
|
4846
4853
|
onParticipantNameClick: x,
|
|
4847
|
-
renderMessage:
|
|
4848
|
-
onMessageLinkClick:
|
|
4849
|
-
showChannelInfo:
|
|
4850
|
-
composerInput:
|
|
4854
|
+
renderMessage: N,
|
|
4855
|
+
onMessageLinkClick: S,
|
|
4856
|
+
showChannelInfo: T,
|
|
4857
|
+
composerInput: M
|
|
4851
4858
|
},
|
|
4852
4859
|
C.id
|
|
4853
4860
|
) }) }) : /* @__PURE__ */ s(je, {});
|
|
4854
4861
|
};
|
|
4855
|
-
function
|
|
4862
|
+
function Wi(e) {
|
|
4856
4863
|
const t = e.state.pending_messages;
|
|
4857
4864
|
if (t != null && t.length)
|
|
4858
4865
|
for (const n of t)
|
|
@@ -4866,18 +4873,18 @@ const js = U.createContext({
|
|
|
4866
4873
|
renderMessagePreview: void 0,
|
|
4867
4874
|
channelPreview: void 0,
|
|
4868
4875
|
viewerLanguage: void 0
|
|
4869
|
-
}),
|
|
4876
|
+
}), Xi = js.Provider, Ki = () => U.useContext(js), Ji = (e, t) => {
|
|
4870
4877
|
const n = new Date(
|
|
4871
4878
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
4872
4879
|
), r = new Date(
|
|
4873
4880
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
4874
4881
|
).getTime() - n.getTime();
|
|
4875
4882
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
4876
|
-
},
|
|
4883
|
+
}, Zi = (e) => {
|
|
4877
4884
|
const t = /* @__PURE__ */ new Date();
|
|
4878
4885
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
4879
4886
|
return "Just now";
|
|
4880
|
-
const a =
|
|
4887
|
+
const a = Ji(e, t);
|
|
4881
4888
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
4882
4889
|
hour: "numeric",
|
|
4883
4890
|
minute: "2-digit",
|
|
@@ -4889,7 +4896,7 @@ const js = U.createContext({
|
|
|
4889
4896
|
});
|
|
4890
4897
|
}, Bs = U.memo(
|
|
4891
4898
|
(e) => {
|
|
4892
|
-
var D,
|
|
4899
|
+
var D, O, z;
|
|
4893
4900
|
const { channel: t, unread: n } = e, {
|
|
4894
4901
|
selectedChannel: a,
|
|
4895
4902
|
onChannelSelect: r,
|
|
@@ -4897,7 +4904,7 @@ const js = U.createContext({
|
|
|
4897
4904
|
channelPreview: l,
|
|
4898
4905
|
renderMessagePreview: o,
|
|
4899
4906
|
viewerLanguage: d
|
|
4900
|
-
} =
|
|
4907
|
+
} = Ki(), { client: u } = oe(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
|
|
4901
4908
|
if (l)
|
|
4902
4909
|
return /* @__PURE__ */ s(
|
|
4903
4910
|
l,
|
|
@@ -4909,49 +4916,49 @@ const js = U.createContext({
|
|
|
4909
4916
|
viewerLanguage: d
|
|
4910
4917
|
}
|
|
4911
4918
|
);
|
|
4912
|
-
const
|
|
4919
|
+
const g = () => {
|
|
4913
4920
|
t && r(t);
|
|
4914
|
-
},
|
|
4915
|
-
const
|
|
4916
|
-
!
|
|
4917
|
-
},
|
|
4921
|
+
}, c = (y) => {
|
|
4922
|
+
const A = y.key === "Enter" || y.key === " ", E = y.repeat;
|
|
4923
|
+
!A || E || (y.preventDefault(), g());
|
|
4924
|
+
}, v = Ue(
|
|
4918
4925
|
(D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
|
|
4919
4926
|
u == null ? void 0 : u.userID,
|
|
4920
4927
|
t == null ? void 0 : t.type
|
|
4921
|
-
), w =
|
|
4922
|
-
var
|
|
4923
|
-
const y = (
|
|
4928
|
+
), w = ct(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
|
|
4929
|
+
var A;
|
|
4930
|
+
const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
|
|
4924
4931
|
if (y != null && y.length) {
|
|
4925
4932
|
for (let E = y.length - 1; E >= 0; E--)
|
|
4926
4933
|
if (y[E].type !== "system") return y[E];
|
|
4927
4934
|
}
|
|
4928
|
-
})(),
|
|
4929
|
-
var F,
|
|
4935
|
+
})(), N = (() => {
|
|
4936
|
+
var $, F, V, Q;
|
|
4930
4937
|
const y = hs({
|
|
4931
|
-
message:
|
|
4938
|
+
message: f,
|
|
4932
4939
|
viewerLanguage: d
|
|
4933
4940
|
});
|
|
4934
|
-
if (((
|
|
4935
|
-
if (((
|
|
4936
|
-
if (((V =
|
|
4941
|
+
if ((($ = f == null ? void 0 : f.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
|
|
4942
|
+
if (((F = f == null ? void 0 : f.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
|
|
4943
|
+
if (((V = f == null ? void 0 : f.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
|
|
4937
4944
|
return y ? `📎 ${y}` : "📎 Sent an attachment";
|
|
4938
4945
|
if (y) return y;
|
|
4939
|
-
const
|
|
4940
|
-
return
|
|
4941
|
-
})(),
|
|
4946
|
+
const I = (Q = f == null ? void 0 : f.attachments) == null ? void 0 : Q[0];
|
|
4947
|
+
return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
4948
|
+
})(), S = f != null && f.created_at ? Zi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, L = n ?? 0;
|
|
4942
4949
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
4943
4950
|
channelId: t == null ? void 0 : t.id,
|
|
4944
4951
|
isSelected: p,
|
|
4945
4952
|
participantName: w,
|
|
4946
4953
|
unreadCount: L,
|
|
4947
|
-
hasTimestamp: !!
|
|
4954
|
+
hasTimestamp: !!S
|
|
4948
4955
|
}), /* @__PURE__ */ s(
|
|
4949
4956
|
"div",
|
|
4950
4957
|
{
|
|
4951
4958
|
role: "button",
|
|
4952
4959
|
tabIndex: 0,
|
|
4953
|
-
onClick:
|
|
4954
|
-
onKeyDown:
|
|
4960
|
+
onClick: g,
|
|
4961
|
+
onKeyDown: c,
|
|
4955
4962
|
className: k(
|
|
4956
4963
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
4957
4964
|
{
|
|
@@ -4964,9 +4971,9 @@ const js = U.createContext({
|
|
|
4964
4971
|
/* @__PURE__ */ s(
|
|
4965
4972
|
ne,
|
|
4966
4973
|
{
|
|
4967
|
-
id: ((z =
|
|
4974
|
+
id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || t.id || "unknown",
|
|
4968
4975
|
name: w,
|
|
4969
|
-
image:
|
|
4976
|
+
image: b,
|
|
4970
4977
|
size: 48,
|
|
4971
4978
|
starred: h
|
|
4972
4979
|
}
|
|
@@ -4985,10 +4992,10 @@ const js = U.createContext({
|
|
|
4985
4992
|
]
|
|
4986
4993
|
}
|
|
4987
4994
|
),
|
|
4988
|
-
|
|
4995
|
+
S && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: S })
|
|
4989
4996
|
] }),
|
|
4990
4997
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
4991
|
-
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
4998
|
+
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
|
|
4992
4999
|
L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
|
|
4993
5000
|
] })
|
|
4994
5001
|
] })
|
|
@@ -4998,33 +5005,33 @@ const js = U.createContext({
|
|
|
4998
5005
|
}
|
|
4999
5006
|
);
|
|
5000
5007
|
Bs.displayName = "CustomChannelPreview";
|
|
5001
|
-
const
|
|
5008
|
+
const Qi = { last_message_at: -1 }, el = U.memo(
|
|
5002
5009
|
({
|
|
5003
5010
|
onChannelSelect: e,
|
|
5004
5011
|
selectedChannel: t,
|
|
5005
5012
|
filters: n,
|
|
5006
5013
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5007
5014
|
channelRenderFilterFn: r,
|
|
5008
|
-
sort: i =
|
|
5015
|
+
sort: i = Qi,
|
|
5009
5016
|
className: l,
|
|
5010
5017
|
customEmptyStateIndicator: o,
|
|
5011
|
-
channelListPaginator: d =
|
|
5018
|
+
channelListPaginator: d = An,
|
|
5012
5019
|
channelPreview: u,
|
|
5013
5020
|
renderMessagePreview: p,
|
|
5014
5021
|
viewerLanguage: h
|
|
5015
5022
|
}) => {
|
|
5016
|
-
const
|
|
5017
|
-
|
|
5018
|
-
const { debug:
|
|
5019
|
-
(
|
|
5020
|
-
for (const
|
|
5021
|
-
|
|
5022
|
-
return r ? r(
|
|
5023
|
+
const g = U.useRef(0);
|
|
5024
|
+
g.current++;
|
|
5025
|
+
const { debug: c = !1 } = lt(), v = U.useCallback(
|
|
5026
|
+
(b) => {
|
|
5027
|
+
for (const f of b)
|
|
5028
|
+
Wi(f);
|
|
5029
|
+
return r ? r(b) : b;
|
|
5023
5030
|
},
|
|
5024
5031
|
[r]
|
|
5025
5032
|
);
|
|
5026
|
-
|
|
5027
|
-
renderCount:
|
|
5033
|
+
c && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
5034
|
+
renderCount: g.current,
|
|
5028
5035
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5029
5036
|
filters: n
|
|
5030
5037
|
});
|
|
@@ -5032,7 +5039,7 @@ const Zi = { last_message_at: -1 }, Qi = U.memo(
|
|
|
5032
5039
|
() => ({
|
|
5033
5040
|
selectedChannel: t,
|
|
5034
5041
|
onChannelSelect: e,
|
|
5035
|
-
debug:
|
|
5042
|
+
debug: c,
|
|
5036
5043
|
channelPreview: u,
|
|
5037
5044
|
renderMessagePreview: p,
|
|
5038
5045
|
viewerLanguage: h
|
|
@@ -5040,7 +5047,7 @@ const Zi = { last_message_at: -1 }, Qi = U.memo(
|
|
|
5040
5047
|
[
|
|
5041
5048
|
t,
|
|
5042
5049
|
e,
|
|
5043
|
-
|
|
5050
|
+
c,
|
|
5044
5051
|
u,
|
|
5045
5052
|
p,
|
|
5046
5053
|
h
|
|
@@ -5053,14 +5060,14 @@ const Zi = { last_message_at: -1 }, Qi = U.memo(
|
|
|
5053
5060
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5054
5061
|
l
|
|
5055
5062
|
),
|
|
5056
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5057
|
-
|
|
5063
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
|
|
5064
|
+
Tn,
|
|
5058
5065
|
{
|
|
5059
5066
|
filters: n,
|
|
5060
5067
|
sort: i,
|
|
5061
5068
|
options: { limit: 30 },
|
|
5062
5069
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5063
|
-
channelRenderFilterFn:
|
|
5070
|
+
channelRenderFilterFn: v,
|
|
5064
5071
|
Paginator: d,
|
|
5065
5072
|
Preview: Bs,
|
|
5066
5073
|
EmptyStateIndicator: o
|
|
@@ -5071,8 +5078,8 @@ const Zi = { last_message_at: -1 }, Qi = U.memo(
|
|
|
5071
5078
|
);
|
|
5072
5079
|
}
|
|
5073
5080
|
);
|
|
5074
|
-
|
|
5075
|
-
const
|
|
5081
|
+
el.displayName = "ChannelList";
|
|
5082
|
+
const tl = ({
|
|
5076
5083
|
question: e,
|
|
5077
5084
|
onClick: t,
|
|
5078
5085
|
loading: n = !1,
|
|
@@ -5094,7 +5101,7 @@ const el = ({
|
|
|
5094
5101
|
),
|
|
5095
5102
|
children: e
|
|
5096
5103
|
}
|
|
5097
|
-
),
|
|
5104
|
+
), gl = ({
|
|
5098
5105
|
faqs: e,
|
|
5099
5106
|
onFaqClick: t,
|
|
5100
5107
|
loadingFaqId: n,
|
|
@@ -5123,7 +5130,7 @@ const el = ({
|
|
|
5123
5130
|
children: [
|
|
5124
5131
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5125
5132
|
o.map((d) => /* @__PURE__ */ s(
|
|
5126
|
-
|
|
5133
|
+
tl,
|
|
5127
5134
|
{
|
|
5128
5135
|
question: d.question,
|
|
5129
5136
|
onClick: () => t(d.id),
|
|
@@ -5138,39 +5145,39 @@ const el = ({
|
|
|
5138
5145
|
};
|
|
5139
5146
|
export {
|
|
5140
5147
|
bs as A,
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5148
|
+
hl as B,
|
|
5149
|
+
Gi as C,
|
|
5150
|
+
Br as D,
|
|
5151
|
+
xa as E,
|
|
5152
|
+
gl as F,
|
|
5153
|
+
sa as G,
|
|
5147
5154
|
es as L,
|
|
5148
|
-
|
|
5149
|
-
|
|
5155
|
+
ul as M,
|
|
5156
|
+
Ne as a,
|
|
5150
5157
|
ne as b,
|
|
5151
|
-
|
|
5158
|
+
el as c,
|
|
5152
5159
|
$s as d,
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5160
|
+
ml as e,
|
|
5161
|
+
tl as f,
|
|
5162
|
+
ce as g,
|
|
5156
5163
|
Zt as h,
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5164
|
+
ye as i,
|
|
5165
|
+
qr as j,
|
|
5166
|
+
dl as k,
|
|
5167
|
+
fl as l,
|
|
5168
|
+
rr as m,
|
|
5169
|
+
sr as n,
|
|
5170
|
+
Zi as o,
|
|
5171
|
+
ar as p,
|
|
5165
5172
|
hs as q,
|
|
5166
5173
|
we as r,
|
|
5167
5174
|
ws as s,
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5175
|
+
ia as t,
|
|
5176
|
+
Xa as u,
|
|
5177
|
+
wa as v,
|
|
5171
5178
|
Ue as w,
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5179
|
+
ht as x,
|
|
5180
|
+
ft as y,
|
|
5181
|
+
ct as z
|
|
5175
5182
|
};
|
|
5176
|
-
//# sourceMappingURL=index-
|
|
5183
|
+
//# sourceMappingURL=index-wFe1UO9t.js.map
|