@linktr.ee/messaging-react 3.5.0-rc-1782793221 → 3.5.0-rc-1782802201
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-49AvU29H.js → Card-B4Pl1YDS.js} +2 -2
- package/dist/{Card-49AvU29H.js.map → Card-B4Pl1YDS.js.map} +1 -1
- package/dist/{Card-Cse19FAO.cjs → Card-BN8zZir8.cjs} +2 -2
- package/dist/{Card-Cse19FAO.cjs.map → Card-BN8zZir8.cjs.map} +1 -1
- package/dist/{Card-q0zqEbga.js → Card-BP5tTT6R.js} +3 -3
- package/dist/{Card-q0zqEbga.js.map → Card-BP5tTT6R.js.map} +1 -1
- package/dist/{Card-DS8zNUkL.js → Card-BS-w4E4s.js} +2 -2
- package/dist/{Card-DS8zNUkL.js.map → Card-BS-w4E4s.js.map} +1 -1
- package/dist/{Card-DBIVUdM5.cjs → Card-Dc-vSe7n.cjs} +2 -2
- package/dist/{Card-DBIVUdM5.cjs.map → Card-Dc-vSe7n.cjs.map} +1 -1
- package/dist/{Card-DgPx-6aq.cjs → Card-UOf2uGf-.cjs} +2 -2
- package/dist/{Card-DgPx-6aq.cjs.map → Card-UOf2uGf-.cjs.map} +1 -1
- package/dist/{LockedThumbnail-BFgw9F0g.cjs → LockedThumbnail-CUC76ycd.cjs} +2 -2
- package/dist/{LockedThumbnail-BFgw9F0g.cjs.map → LockedThumbnail-CUC76ycd.cjs.map} +1 -1
- package/dist/{LockedThumbnail-CRBDhB49.js → LockedThumbnail-nUEb_HRw.js} +2 -2
- package/dist/{LockedThumbnail-CRBDhB49.js.map → LockedThumbnail-nUEb_HRw.js.map} +1 -1
- package/dist/{index-DxzkXLSW.js → index-CghCKfXq.js} +945 -930
- package/dist/{index-DxzkXLSW.js.map → index-CghCKfXq.js.map} +1 -1
- package/dist/index-DPP8cBmP.cjs +2 -0
- package/dist/{index-BcmwckcI.cjs.map → index-DPP8cBmP.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/ChannelList/ChannelList.stories.tsx +13 -9
- package/src/components/ChannelList/ChannelListContext.tsx +4 -0
- package/src/components/ChannelList/CustomChannelPreview.test.tsx +46 -1
- package/src/components/ChannelList/CustomChannelPreview.tsx +17 -2
- package/src/components/ChannelList/index.test.tsx +20 -3
- package/src/components/ChannelList/index.tsx +3 -1
- package/src/index.ts +1 -0
- package/src/types.ts +9 -2
- package/dist/index-BcmwckcI.cjs +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import V, { createContext as We, useContext as _e, useCallback as J, useState as $, useRef as Y, useEffect as K, useId as In, useMemo as re, Suspense as Xe } from "react";
|
|
3
3
|
import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as Tn, LinkPreviewsManager as Lt } from "stream-chat";
|
|
5
5
|
import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as Ke, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as Gt, Attachment as Dn, EditMessageModal as Pn, MessageBlocked as zn, MessageBouncePrompt as On, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Dt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as ye, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as $e, AIStates as Fe, useTypingContext as rs, useAIState as is, Channel as ls, WithComponents as os, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
|
|
6
6
|
import { StarIcon as Ge, DotsThreeIcon as hs, SpinnerGapIcon as Te, SignOutIcon as fs, ProhibitInsetIcon as Pt, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as ps, VideoCameraIcon as qt, FileMdIcon as bs, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as Ns, FileXlsIcon as _s, FileDocIcon as ys, FilePdfIcon as ks, CircleNotchIcon as we, PlayIcon as He, PauseIcon as Cs, LinkIcon as Es, DownloadSimpleIcon as Ne, GiftIcon as Is, ThumbsUpIcon as Ss, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Pe, ArrowUpIcon as Ms, SparkleIcon as be, ProhibitIcon as Rs, ArrowLeftIcon as zt, CaretRightIcon as ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
|
|
7
|
-
import
|
|
7
|
+
import k from "classnames";
|
|
8
8
|
import { MessageActions as Ps, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
|
|
9
9
|
const Xt = We({
|
|
10
10
|
service: null,
|
|
@@ -24,179 +24,179 @@ const Xt = We({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
var
|
|
28
|
-
const
|
|
29
|
-
(
|
|
30
|
-
i && console.log(`🔥 [MessagingProvider] ${
|
|
27
|
+
var M, y;
|
|
28
|
+
const l = J(
|
|
29
|
+
(I, ...C) => {
|
|
30
|
+
i && console.log(`🔥 [MessagingProvider] ${I}`, ...C);
|
|
31
31
|
},
|
|
32
32
|
[i]
|
|
33
33
|
);
|
|
34
|
-
|
|
34
|
+
l("🔄 RENDER START", {
|
|
35
35
|
userId: t == null ? void 0 : t.id,
|
|
36
36
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
37
37
|
serviceConfig: !!s,
|
|
38
38
|
capabilities: Object.keys(r)
|
|
39
39
|
});
|
|
40
|
-
const [
|
|
41
|
-
|
|
40
|
+
const [o, d] = $(null), [u, g] = $(null), [m, f] = $(!1), [c, b] = $(!1), [N, w] = $(null), p = Y(!1), v = Y(null), A = Y(s);
|
|
41
|
+
A.current = s;
|
|
42
42
|
const T = Y(i);
|
|
43
43
|
T.current = i;
|
|
44
|
-
const
|
|
44
|
+
const E = Y({
|
|
45
45
|
userId: t == null ? void 0 : t.id,
|
|
46
46
|
apiKey: a,
|
|
47
47
|
serviceConfig: s,
|
|
48
48
|
capabilities: r
|
|
49
49
|
}), O = Y(0);
|
|
50
|
-
O.current++,
|
|
50
|
+
O.current++, l("📊 RENDER INFO", {
|
|
51
51
|
renderCount: O.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: E.current.userId !== (t == null ? void 0 : t.id),
|
|
55
|
+
apiKeyChanged: E.current.apiKey !== a,
|
|
56
|
+
serviceConfigChanged: E.current.serviceConfig !== s,
|
|
57
|
+
capabilitiesChanged: E.current.capabilities !== r
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
59
|
+
}), E.current = {
|
|
60
60
|
userId: t == null ? void 0 : t.id,
|
|
61
61
|
apiKey: a,
|
|
62
62
|
serviceConfig: s,
|
|
63
63
|
capabilities: r
|
|
64
64
|
};
|
|
65
|
-
const
|
|
66
|
-
a && ((
|
|
67
|
-
const L = a ? ((
|
|
65
|
+
const R = Y(null);
|
|
66
|
+
a && ((M = R.current) == null ? void 0 : M.apiKey) !== a && (R.current = { apiKey: a, client: new Tn(a) });
|
|
67
|
+
const L = a ? ((y = R.current) == null ? void 0 : y.client) ?? null : null;
|
|
68
68
|
K(() => {
|
|
69
|
-
const
|
|
70
|
-
if (!a || !L || !
|
|
71
|
-
|
|
72
|
-
renderCount:
|
|
69
|
+
const I = O.current, C = A.current;
|
|
70
|
+
if (!a || !L || !C) {
|
|
71
|
+
l("⚠️ SERVICE INIT SKIPPED", {
|
|
72
|
+
renderCount: I,
|
|
73
73
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
74
74
|
});
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
renderCount:
|
|
77
|
+
l("🚀 CREATING SERVICE", {
|
|
78
|
+
renderCount: I,
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
80
80
|
});
|
|
81
|
-
const
|
|
82
|
-
...
|
|
81
|
+
const z = new Sn({
|
|
82
|
+
...C,
|
|
83
83
|
apiKey: a,
|
|
84
84
|
debug: T.current,
|
|
85
85
|
client: L
|
|
86
86
|
});
|
|
87
|
-
v.current =
|
|
88
|
-
renderCount:
|
|
89
|
-
serviceInstance:
|
|
87
|
+
v.current = z, d(z), l("✅ SERVICE SET", {
|
|
88
|
+
renderCount: I,
|
|
89
|
+
serviceInstance: !!z
|
|
90
90
|
});
|
|
91
91
|
}, [a, L]);
|
|
92
|
-
const
|
|
92
|
+
const B = Y(null);
|
|
93
93
|
K(() => {
|
|
94
|
-
var
|
|
95
|
-
if (
|
|
96
|
-
hasService: !!
|
|
94
|
+
var C, z;
|
|
95
|
+
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
96
|
+
hasService: !!o,
|
|
97
97
|
hasUser: !!t,
|
|
98
98
|
userId: t == null ? void 0 : t.id,
|
|
99
|
-
isConnecting:
|
|
100
|
-
isConnected:
|
|
101
|
-
dependencies: { service: !!
|
|
102
|
-
}), !
|
|
103
|
-
|
|
99
|
+
isConnecting: p.current,
|
|
100
|
+
isConnected: m,
|
|
101
|
+
dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
|
|
102
|
+
}), !o || !t) {
|
|
103
|
+
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
107
|
-
|
|
106
|
+
if (p.current) {
|
|
107
|
+
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
if (((
|
|
111
|
-
|
|
110
|
+
if (((C = B.current) == null ? void 0 : C.serviceId) === o && ((z = B.current) == null ? void 0 : z.userId) === t.id) {
|
|
111
|
+
l(
|
|
112
112
|
"⚠️ USER CONNECTION SKIPPED",
|
|
113
113
|
"Already connected this user with this service"
|
|
114
114
|
);
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
(async () => {
|
|
118
|
-
|
|
118
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), w(null);
|
|
119
119
|
try {
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
g(
|
|
120
|
+
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
121
|
+
const D = await o.connectUser(t);
|
|
122
|
+
g(D), f(!0), B.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
|
|
123
123
|
userId: t.id,
|
|
124
|
-
clientId:
|
|
124
|
+
clientId: D.userID
|
|
125
125
|
});
|
|
126
|
-
} catch (
|
|
127
|
-
const
|
|
128
|
-
w(
|
|
126
|
+
} catch (D) {
|
|
127
|
+
const j = D instanceof Error ? D.message : "Connection failed";
|
|
128
|
+
w(j), l("❌ USER CONNECTION ERROR", {
|
|
129
129
|
userId: t.id,
|
|
130
|
-
error:
|
|
130
|
+
error: j
|
|
131
131
|
});
|
|
132
132
|
} finally {
|
|
133
|
-
|
|
133
|
+
b(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
134
134
|
userId: t.id,
|
|
135
|
-
isConnected:
|
|
135
|
+
isConnected: m
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
})();
|
|
139
|
-
}, [
|
|
140
|
-
const
|
|
139
|
+
}, [o, t, l, m]), K(() => {
|
|
140
|
+
const I = L;
|
|
141
141
|
return () => {
|
|
142
|
-
var
|
|
143
|
-
|
|
142
|
+
var C;
|
|
143
|
+
I && (B.current = null, (C = v.current) == null || C.disconnectUser().catch(console.error));
|
|
144
144
|
};
|
|
145
145
|
}, [L]);
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
hasService: !!
|
|
146
|
+
const P = J(async () => {
|
|
147
|
+
if (l("🔄 REFRESH CONNECTION CALLED", {
|
|
148
|
+
hasService: !!o,
|
|
149
149
|
hasUser: !!t
|
|
150
|
-
}), !
|
|
151
|
-
|
|
150
|
+
}), !o || !t) {
|
|
151
|
+
l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
|
|
155
155
|
try {
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
g(
|
|
159
|
-
} catch (
|
|
160
|
-
const
|
|
161
|
-
w(
|
|
156
|
+
l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
|
|
157
|
+
const I = await o.connectUser(t);
|
|
158
|
+
g(I), f(!0), w(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
159
|
+
} catch (I) {
|
|
160
|
+
const C = I instanceof Error ? I.message : "Refresh failed";
|
|
161
|
+
w(C), l("❌ CONNECTION REFRESH ERROR", {
|
|
162
162
|
userId: t.id,
|
|
163
|
-
error:
|
|
163
|
+
error: C
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
|
-
|
|
166
|
+
b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
167
167
|
}
|
|
168
|
-
}, [
|
|
169
|
-
hasService: !!
|
|
170
|
-
hasClient: !!
|
|
171
|
-
isConnected:
|
|
168
|
+
}, [o, t, l]), _ = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
169
|
+
hasService: !!o,
|
|
170
|
+
hasClient: !!u,
|
|
171
|
+
isConnected: m,
|
|
172
172
|
isLoading: c,
|
|
173
173
|
hasError: !!N,
|
|
174
174
|
capabilitiesKeys: Object.keys(r)
|
|
175
175
|
}), {
|
|
176
|
-
service:
|
|
177
|
-
client:
|
|
178
|
-
isConnected:
|
|
176
|
+
service: o,
|
|
177
|
+
client: u,
|
|
178
|
+
isConnected: m,
|
|
179
179
|
isLoading: c,
|
|
180
180
|
error: N,
|
|
181
181
|
capabilities: r,
|
|
182
|
-
refreshConnection:
|
|
182
|
+
refreshConnection: P,
|
|
183
183
|
debug: i
|
|
184
184
|
}), [
|
|
185
|
-
|
|
186
|
-
m,
|
|
185
|
+
o,
|
|
187
186
|
u,
|
|
187
|
+
m,
|
|
188
188
|
c,
|
|
189
189
|
N,
|
|
190
190
|
r,
|
|
191
|
-
|
|
191
|
+
P,
|
|
192
192
|
i,
|
|
193
|
-
|
|
193
|
+
l
|
|
194
194
|
]);
|
|
195
|
-
return
|
|
195
|
+
return l("🔄 RENDER END", {
|
|
196
196
|
renderCount: O.current,
|
|
197
197
|
willRenderChat: !!L,
|
|
198
|
-
contextValueReady: !!
|
|
199
|
-
}), /* @__PURE__ */ n(Xt.Provider, { value:
|
|
198
|
+
contextValueReady: !!_
|
|
199
|
+
}), /* @__PURE__ */ n(Xt.Provider, { value: _, children: L ? /* @__PURE__ */ n(
|
|
200
200
|
An,
|
|
201
201
|
{
|
|
202
202
|
client: L,
|
|
@@ -208,20 +208,20 @@ const Xt = We({
|
|
|
208
208
|
) : e });
|
|
209
209
|
}, zs = () => Je(), Kt = (e) => {
|
|
210
210
|
var a, r;
|
|
211
|
-
const [t, s] =
|
|
211
|
+
const [t, s] = $(
|
|
212
212
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
213
213
|
);
|
|
214
214
|
return K(() => {
|
|
215
|
-
var
|
|
215
|
+
var l;
|
|
216
216
|
if (!e) {
|
|
217
217
|
s(!1);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
s(!!((
|
|
221
|
-
const i = (
|
|
220
|
+
s(!!((l = e.state.membership) != null && l.pinned_at));
|
|
221
|
+
const i = (o) => {
|
|
222
222
|
var d;
|
|
223
223
|
s(
|
|
224
|
-
|
|
224
|
+
o != null && o.member ? !!o.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
|
|
225
225
|
);
|
|
226
226
|
};
|
|
227
227
|
return e.on("member.updated", i), () => {
|
|
@@ -286,9 +286,9 @@ const ne = ({
|
|
|
286
286
|
className: a,
|
|
287
287
|
starred: r = !1,
|
|
288
288
|
shape: i = "squircle",
|
|
289
|
-
dmAgentEnabled:
|
|
289
|
+
dmAgentEnabled: l = !1
|
|
290
290
|
}) => {
|
|
291
|
-
const
|
|
291
|
+
const o = Bs(e), u = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, m = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: m, children: t ? /* @__PURE__ */ n(
|
|
292
292
|
"img",
|
|
293
293
|
{
|
|
294
294
|
src: t,
|
|
@@ -299,17 +299,17 @@ const ne = ({
|
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
"aria-hidden": "true",
|
|
302
|
-
className:
|
|
302
|
+
className: k(
|
|
303
303
|
"avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
|
|
304
|
-
|
|
304
|
+
u
|
|
305
305
|
),
|
|
306
|
-
children:
|
|
306
|
+
children: o
|
|
307
307
|
}
|
|
308
308
|
) });
|
|
309
309
|
return /* @__PURE__ */ h(
|
|
310
310
|
"div",
|
|
311
311
|
{
|
|
312
|
-
className:
|
|
312
|
+
className: k(
|
|
313
313
|
"relative flex-shrink-0 !bg-transparent",
|
|
314
314
|
a
|
|
315
315
|
),
|
|
@@ -331,13 +331,13 @@ const ne = ({
|
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
333
333
|
"data-testid": "avatar-ring",
|
|
334
|
-
className:
|
|
334
|
+
className: k(
|
|
335
335
|
"h-full w-full",
|
|
336
336
|
"bg-transparent"
|
|
337
337
|
),
|
|
338
338
|
style: {
|
|
339
|
-
...
|
|
340
|
-
...
|
|
339
|
+
...m,
|
|
340
|
+
...l && {
|
|
341
341
|
borderWidth: `${g}px`,
|
|
342
342
|
borderStyle: "solid",
|
|
343
343
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
@@ -357,84 +357,84 @@ const ne = ({
|
|
|
357
357
|
enabled: a = !0,
|
|
358
358
|
onLeaveConversation: r,
|
|
359
359
|
onBlockParticipant: i,
|
|
360
|
-
onDeleteConversationClick:
|
|
361
|
-
onBlockParticipantClick:
|
|
360
|
+
onDeleteConversationClick: l,
|
|
361
|
+
onBlockParticipantClick: o,
|
|
362
362
|
onReportParticipantClick: d,
|
|
363
|
-
onActionComplete:
|
|
363
|
+
onActionComplete: u,
|
|
364
364
|
logLabel: g = "useChannelModerationActions"
|
|
365
365
|
}) => {
|
|
366
|
-
var
|
|
367
|
-
const { service:
|
|
366
|
+
var M;
|
|
367
|
+
const { service: m, debug: f } = Je(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, b = !!(a && s && m && c), [N, w] = $(!1), [p, v] = $(null), [A, T] = $(!1), [E, O] = $(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== m);
|
|
368
368
|
return K(() => {
|
|
369
|
-
if (!
|
|
369
|
+
if (!b || !m || !c) {
|
|
370
370
|
w(!1), v(null);
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
373
|
-
let
|
|
373
|
+
let y = !1;
|
|
374
374
|
return (async () => {
|
|
375
375
|
try {
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
376
|
+
const I = await m.getBlockedUsers();
|
|
377
|
+
if (y) return;
|
|
378
378
|
w(
|
|
379
|
-
|
|
380
|
-
(
|
|
379
|
+
I.some(
|
|
380
|
+
(C) => C.blocked_user_id === c
|
|
381
381
|
)
|
|
382
382
|
);
|
|
383
|
-
} catch (
|
|
384
|
-
|
|
383
|
+
} catch (I) {
|
|
384
|
+
y || console.error(`[${g}] Failed to check blocked status:`, I);
|
|
385
385
|
} finally {
|
|
386
|
-
|
|
386
|
+
y || v({ participantId: c, service: m });
|
|
387
387
|
}
|
|
388
388
|
})(), () => {
|
|
389
|
-
|
|
389
|
+
y = !0;
|
|
390
390
|
};
|
|
391
|
-
}, [
|
|
391
|
+
}, [b, m, c, g]), {
|
|
392
392
|
isParticipantBlocked: N,
|
|
393
|
-
isCheckingBlockedStatus:
|
|
394
|
-
isLeaving:
|
|
395
|
-
isUpdatingBlockStatus:
|
|
393
|
+
isCheckingBlockedStatus: R,
|
|
394
|
+
isLeaving: A,
|
|
395
|
+
isUpdatingBlockStatus: E,
|
|
396
396
|
handleLeaveConversation: async () => {
|
|
397
|
-
var
|
|
398
|
-
if (!
|
|
399
|
-
|
|
397
|
+
var y;
|
|
398
|
+
if (!A) {
|
|
399
|
+
l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
|
|
400
400
|
try {
|
|
401
|
-
const
|
|
402
|
-
await e.hide(
|
|
403
|
-
} catch (
|
|
404
|
-
console.error(`[${g}] Failed to leave conversation`,
|
|
401
|
+
const I = ((y = e._client) == null ? void 0 : y.userID) ?? null;
|
|
402
|
+
await e.hide(I, !1), r && await r(e), u == null || u();
|
|
403
|
+
} catch (I) {
|
|
404
|
+
console.error(`[${g}] Failed to leave conversation`, I);
|
|
405
405
|
} finally {
|
|
406
406
|
T(!1);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
handleBlockUser: async () => {
|
|
411
|
-
var
|
|
412
|
-
if (!(
|
|
413
|
-
|
|
411
|
+
var y, I, C;
|
|
412
|
+
if (!(E || !m)) {
|
|
413
|
+
o == null || o(), f && console.log(`[${g}] Block member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), O(!0);
|
|
414
414
|
try {
|
|
415
|
-
await
|
|
416
|
-
} catch (
|
|
417
|
-
console.error(`[${g}] Failed to block member`,
|
|
415
|
+
await m.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), u == null || u();
|
|
416
|
+
} catch (z) {
|
|
417
|
+
console.error(`[${g}] Failed to block member`, z);
|
|
418
418
|
} finally {
|
|
419
419
|
O(!1);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
handleUnblockUser: async () => {
|
|
424
|
-
var
|
|
425
|
-
if (!(
|
|
426
|
-
|
|
424
|
+
var y, I, C;
|
|
425
|
+
if (!(E || !m)) {
|
|
426
|
+
o == null || o(), f && console.log(`[${g}] Unblock member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), O(!0);
|
|
427
427
|
try {
|
|
428
|
-
await
|
|
429
|
-
} catch (
|
|
430
|
-
console.error(`[${g}] Failed to unblock member`,
|
|
428
|
+
await m.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), u == null || u();
|
|
429
|
+
} catch (z) {
|
|
430
|
+
console.error(`[${g}] Failed to unblock member`, z);
|
|
431
431
|
} finally {
|
|
432
432
|
O(!1);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
},
|
|
436
436
|
handleReportUser: () => {
|
|
437
|
-
d == null || d(),
|
|
437
|
+
d == null || d(), u == null || u(), window.open(Us, "_blank", "noopener,noreferrer");
|
|
438
438
|
}
|
|
439
439
|
};
|
|
440
440
|
}, pe = ({
|
|
@@ -446,7 +446,7 @@ const ne = ({
|
|
|
446
446
|
"button",
|
|
447
447
|
{
|
|
448
448
|
type: "button",
|
|
449
|
-
className:
|
|
449
|
+
className: k(
|
|
450
450
|
"flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
|
|
451
451
|
e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
452
452
|
t
|
|
@@ -461,21 +461,21 @@ const ne = ({
|
|
|
461
461
|
showBlockParticipant: a = !0,
|
|
462
462
|
showReportParticipant: r = !0,
|
|
463
463
|
onLeaveConversation: i,
|
|
464
|
-
onBlockParticipant:
|
|
465
|
-
onDeleteConversationClick:
|
|
464
|
+
onBlockParticipant: l,
|
|
465
|
+
onDeleteConversationClick: o,
|
|
466
466
|
onBlockParticipantClick: d,
|
|
467
|
-
onReportParticipantClick:
|
|
467
|
+
onReportParticipantClick: u,
|
|
468
468
|
customChannelActions: g,
|
|
469
|
-
triggerClassName:
|
|
469
|
+
triggerClassName: m
|
|
470
470
|
}) => {
|
|
471
|
-
const [f, c] =
|
|
472
|
-
isParticipantBlocked:
|
|
471
|
+
const [f, c] = $(!1), b = Y(null), N = In(), w = J(() => c(!1), []), {
|
|
472
|
+
isParticipantBlocked: p,
|
|
473
473
|
isCheckingBlockedStatus: v,
|
|
474
|
-
isLeaving:
|
|
474
|
+
isLeaving: A,
|
|
475
475
|
isUpdatingBlockStatus: T,
|
|
476
|
-
handleLeaveConversation:
|
|
476
|
+
handleLeaveConversation: E,
|
|
477
477
|
handleBlockUser: O,
|
|
478
|
-
handleUnblockUser:
|
|
478
|
+
handleUnblockUser: R,
|
|
479
479
|
handleReportUser: L
|
|
480
480
|
} = js({
|
|
481
481
|
channel: e,
|
|
@@ -483,33 +483,33 @@ const ne = ({
|
|
|
483
483
|
showBlockParticipant: a,
|
|
484
484
|
enabled: f,
|
|
485
485
|
onLeaveConversation: i,
|
|
486
|
-
onBlockParticipant:
|
|
487
|
-
onDeleteConversationClick:
|
|
486
|
+
onBlockParticipant: l,
|
|
487
|
+
onDeleteConversationClick: o,
|
|
488
488
|
onBlockParticipantClick: d,
|
|
489
|
-
onReportParticipantClick:
|
|
489
|
+
onReportParticipantClick: u,
|
|
490
490
|
onActionComplete: w,
|
|
491
491
|
logLabel: "ChannelActionsMenu"
|
|
492
492
|
});
|
|
493
493
|
return K(() => {
|
|
494
494
|
if (!f) return;
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
},
|
|
498
|
-
|
|
495
|
+
const P = (M) => {
|
|
496
|
+
b.current && !b.current.contains(M.target) && c(!1);
|
|
497
|
+
}, _ = (M) => {
|
|
498
|
+
M.key === "Escape" && c(!1);
|
|
499
499
|
};
|
|
500
|
-
return document.addEventListener("mousedown",
|
|
501
|
-
document.removeEventListener("mousedown",
|
|
500
|
+
return document.addEventListener("mousedown", P), document.addEventListener("keydown", _), () => {
|
|
501
|
+
document.removeEventListener("mousedown", P), document.removeEventListener("keydown", _);
|
|
502
502
|
};
|
|
503
|
-
}, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref:
|
|
503
|
+
}, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
|
|
504
504
|
/* @__PURE__ */ h(
|
|
505
505
|
"button",
|
|
506
506
|
{
|
|
507
|
-
className:
|
|
507
|
+
className: m,
|
|
508
508
|
type: "button",
|
|
509
509
|
"aria-haspopup": "true",
|
|
510
510
|
"aria-expanded": f,
|
|
511
511
|
"aria-controls": f ? N : void 0,
|
|
512
|
-
onClick: () => c((
|
|
512
|
+
onClick: () => c((P) => !P),
|
|
513
513
|
children: [
|
|
514
514
|
/* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
|
|
515
515
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
@@ -521,7 +521,7 @@ const ne = ({
|
|
|
521
521
|
{
|
|
522
522
|
id: N,
|
|
523
523
|
"aria-label": "Conversation options",
|
|
524
|
-
className:
|
|
524
|
+
className: k(
|
|
525
525
|
"absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
|
|
526
526
|
"rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
|
|
527
527
|
),
|
|
@@ -529,11 +529,11 @@ const ne = ({
|
|
|
529
529
|
s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
|
|
530
530
|
pe,
|
|
531
531
|
{
|
|
532
|
-
onClick:
|
|
533
|
-
disabled:
|
|
534
|
-
"aria-busy":
|
|
532
|
+
onClick: E,
|
|
533
|
+
disabled: A,
|
|
534
|
+
"aria-busy": A,
|
|
535
535
|
children: [
|
|
536
|
-
|
|
536
|
+
A ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
|
|
537
537
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
538
538
|
]
|
|
539
539
|
}
|
|
@@ -545,10 +545,10 @@ const ne = ({
|
|
|
545
545
|
/* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }),
|
|
546
546
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
547
547
|
] })
|
|
548
|
-
) :
|
|
548
|
+
) : p ? /* @__PURE__ */ h(
|
|
549
549
|
pe,
|
|
550
550
|
{
|
|
551
|
-
onClick:
|
|
551
|
+
onClick: R,
|
|
552
552
|
disabled: T,
|
|
553
553
|
"aria-busy": T,
|
|
554
554
|
children: [
|
|
@@ -619,7 +619,7 @@ function Zt({
|
|
|
619
619
|
const s = e == null ? void 0 : e.text, a = Ys(t);
|
|
620
620
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
621
621
|
}
|
|
622
|
-
const qs =
|
|
622
|
+
const qs = V.lazy(() => import("./Card-BS-w4E4s.js")), Ws = V.lazy(() => import("./Card-B4Pl1YDS.js")), Xs = V.lazy(() => import("./Card-BP5tTT6R.js")), Ze = () => /* @__PURE__ */ n(
|
|
623
623
|
"div",
|
|
624
624
|
{
|
|
625
625
|
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)]",
|
|
@@ -665,7 +665,7 @@ function na(e) {
|
|
|
665
665
|
return t !== "document" ? ea[t] : ta[tn(e)];
|
|
666
666
|
}
|
|
667
667
|
function ce(e, t) {
|
|
668
|
-
return
|
|
668
|
+
return V.createElement(na(e), t);
|
|
669
669
|
}
|
|
670
670
|
const sa = (e) => {
|
|
671
671
|
var t, s;
|
|
@@ -677,83 +677,83 @@ const sa = (e) => {
|
|
|
677
677
|
autoPlay: a = !1,
|
|
678
678
|
playing: r,
|
|
679
679
|
loop: i = !1,
|
|
680
|
-
controls:
|
|
681
|
-
showProgress:
|
|
680
|
+
controls: l = !0,
|
|
681
|
+
showProgress: o = !1,
|
|
682
682
|
muted: d = !1,
|
|
683
|
-
onContainerClick:
|
|
683
|
+
onContainerClick: u
|
|
684
684
|
}) => {
|
|
685
|
-
const g = ie(t),
|
|
685
|
+
const g = ie(t), m = Y(null), f = Y(null), c = Y(null), b = Y(r), [N, w] = $(a), [p, v] = $(0), [A, T] = $(!1), [E, O] = $(!1), [R, L] = $(!1), [B, P] = $(!1), [_, M] = $(!0), [y, I] = $(null), C = J(() => {
|
|
686
686
|
L(!1), w(!0);
|
|
687
|
-
}, []),
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
690
|
-
const U =
|
|
687
|
+
}, []), z = J((x) => {
|
|
688
|
+
const S = f.current;
|
|
689
|
+
if (!S) return 0;
|
|
690
|
+
const U = S.getBoundingClientRect();
|
|
691
691
|
return Math.max(
|
|
692
692
|
0,
|
|
693
693
|
Math.min(1, (sa(x) - U.left) / U.width)
|
|
694
694
|
);
|
|
695
|
-
}, []),
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
}, []),
|
|
695
|
+
}, []), D = J((x) => {
|
|
696
|
+
const S = m.current;
|
|
697
|
+
S && S.duration && (S.currentTime = x * S.duration);
|
|
698
|
+
}, []), j = (x) => {
|
|
699
699
|
x.stopPropagation(), T(!0);
|
|
700
|
-
const
|
|
701
|
-
v(
|
|
700
|
+
const S = z(x);
|
|
701
|
+
v(S), D(S);
|
|
702
702
|
};
|
|
703
703
|
K(() => {
|
|
704
|
-
r !== void 0 && r !==
|
|
704
|
+
r !== void 0 && r !== b.current && (b.current = r, w(r));
|
|
705
705
|
}, [r]), K(() => {
|
|
706
706
|
if (!N) {
|
|
707
707
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
710
|
const x = () => {
|
|
711
|
-
const
|
|
712
|
-
|
|
711
|
+
const S = m.current;
|
|
712
|
+
S && S.duration && !A && v(S.currentTime / S.duration), c.current = requestAnimationFrame(x);
|
|
713
713
|
};
|
|
714
714
|
return c.current = requestAnimationFrame(x), () => {
|
|
715
715
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
716
716
|
};
|
|
717
|
-
}, [N,
|
|
718
|
-
const x =
|
|
719
|
-
x && (N ? x.play().catch((
|
|
717
|
+
}, [N, A]), K(() => {
|
|
718
|
+
const x = m.current;
|
|
719
|
+
x && (N ? x.play().catch((S) => {
|
|
720
720
|
w(!1), L(!0);
|
|
721
721
|
}) : x.pause());
|
|
722
722
|
}, [N]), K(() => {
|
|
723
|
-
if (!
|
|
724
|
-
const x = (U) => v(
|
|
725
|
-
T(!1), z(
|
|
723
|
+
if (!A) return;
|
|
724
|
+
const x = (U) => v(z(U)), S = (U) => {
|
|
725
|
+
T(!1), D(z(U));
|
|
726
726
|
};
|
|
727
|
-
return window.addEventListener("mousemove", x), window.addEventListener("mouseup",
|
|
728
|
-
window.removeEventListener("mousemove", x), window.removeEventListener("mouseup",
|
|
727
|
+
return window.addEventListener("mousemove", x), window.addEventListener("mouseup", S), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", S), () => {
|
|
728
|
+
window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", S), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", S);
|
|
729
729
|
};
|
|
730
|
-
}, [
|
|
731
|
-
const
|
|
730
|
+
}, [A, z, D]);
|
|
731
|
+
const Z = y ? { aspectRatio: String(y) } : void 0, Q = y ? "" : " aspect-video", G = Math.round(p * 100);
|
|
732
732
|
return /* @__PURE__ */ h(
|
|
733
733
|
"div",
|
|
734
734
|
{
|
|
735
735
|
role: "button",
|
|
736
736
|
tabIndex: 0,
|
|
737
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
738
|
-
style:
|
|
737
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
|
|
738
|
+
style: Z,
|
|
739
739
|
onClick: (x) => {
|
|
740
|
-
if (
|
|
741
|
-
|
|
740
|
+
if (u) {
|
|
741
|
+
u(x);
|
|
742
742
|
return;
|
|
743
743
|
}
|
|
744
|
-
|
|
744
|
+
R || l && w((S) => !S);
|
|
745
745
|
},
|
|
746
746
|
onKeyDown: (x) => {
|
|
747
747
|
if (!(x.key !== "Enter" && x.key !== " ")) {
|
|
748
|
-
if (x.preventDefault(),
|
|
749
|
-
|
|
748
|
+
if (x.preventDefault(), u) {
|
|
749
|
+
u(x);
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
|
|
752
|
+
R || l && w((S) => !S);
|
|
753
753
|
}
|
|
754
754
|
},
|
|
755
755
|
children: [
|
|
756
|
-
s && (g === "audio" ||
|
|
756
|
+
s && (g === "audio" || _) && /* @__PURE__ */ n(
|
|
757
757
|
"img",
|
|
758
758
|
{
|
|
759
759
|
src: s,
|
|
@@ -761,23 +761,23 @@ const sa = (e) => {
|
|
|
761
761
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
762
762
|
}
|
|
763
763
|
),
|
|
764
|
-
!s && (g === "audio" ||
|
|
764
|
+
!s && (g === "audio" || _) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
|
|
765
765
|
className: "size-12 text-black/20",
|
|
766
766
|
weight: "regular"
|
|
767
767
|
}) }),
|
|
768
768
|
/* @__PURE__ */ n("div", { className: "absolute inset-0", children: g === "audio" ? /* @__PURE__ */ n(
|
|
769
769
|
"audio",
|
|
770
770
|
{
|
|
771
|
-
ref:
|
|
771
|
+
ref: m,
|
|
772
772
|
src: e,
|
|
773
773
|
loop: i,
|
|
774
774
|
muted: d,
|
|
775
775
|
style: { width: "100%", height: "100%" },
|
|
776
|
-
onLoadStart: () =>
|
|
776
|
+
onLoadStart: () => P(!0),
|
|
777
777
|
onCanPlay: () => {
|
|
778
|
-
|
|
778
|
+
P(!1), M(!1);
|
|
779
779
|
},
|
|
780
|
-
onWaiting: () =>
|
|
780
|
+
onWaiting: () => P(!0),
|
|
781
781
|
onPlay: () => L(!1),
|
|
782
782
|
onEnded: () => {
|
|
783
783
|
i || (w(!1), v(0));
|
|
@@ -787,21 +787,21 @@ const sa = (e) => {
|
|
|
787
787
|
) : /* @__PURE__ */ n(
|
|
788
788
|
"video",
|
|
789
789
|
{
|
|
790
|
-
ref:
|
|
790
|
+
ref: m,
|
|
791
791
|
src: e,
|
|
792
792
|
loop: i,
|
|
793
793
|
muted: d,
|
|
794
794
|
playsInline: !0,
|
|
795
795
|
style: { width: "100%", height: "100%" },
|
|
796
|
-
onLoadStart: () =>
|
|
796
|
+
onLoadStart: () => P(!0),
|
|
797
797
|
onCanPlay: () => {
|
|
798
|
-
|
|
798
|
+
P(!1), M(!1);
|
|
799
799
|
},
|
|
800
|
-
onWaiting: () =>
|
|
800
|
+
onWaiting: () => P(!0),
|
|
801
801
|
onPlay: () => L(!1),
|
|
802
802
|
onLoadedMetadata: () => {
|
|
803
|
-
const x =
|
|
804
|
-
x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight &&
|
|
803
|
+
const x = m.current;
|
|
804
|
+
x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && I(x.videoWidth / x.videoHeight);
|
|
805
805
|
},
|
|
806
806
|
onEnded: () => {
|
|
807
807
|
i || (w(!1), v(0));
|
|
@@ -809,14 +809,14 @@ const sa = (e) => {
|
|
|
809
809
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
810
810
|
}
|
|
811
811
|
) }),
|
|
812
|
-
|
|
812
|
+
B && !R && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
813
813
|
we,
|
|
814
814
|
{
|
|
815
815
|
className: "size-8 animate-spin text-white/80",
|
|
816
816
|
weight: "bold"
|
|
817
817
|
}
|
|
818
818
|
) }),
|
|
819
|
-
|
|
819
|
+
R && !l && /* @__PURE__ */ n(
|
|
820
820
|
"div",
|
|
821
821
|
{
|
|
822
822
|
className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
|
|
@@ -824,15 +824,15 @@ const sa = (e) => {
|
|
|
824
824
|
tabIndex: 0,
|
|
825
825
|
"aria-label": "Play preview",
|
|
826
826
|
onClick: (x) => {
|
|
827
|
-
x.stopPropagation(),
|
|
827
|
+
x.stopPropagation(), C();
|
|
828
828
|
},
|
|
829
829
|
onKeyDown: (x) => {
|
|
830
|
-
x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(),
|
|
830
|
+
x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), C());
|
|
831
831
|
},
|
|
832
832
|
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(He, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
|
-
|
|
835
|
+
o && !l && /* @__PURE__ */ n("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__ */ n(
|
|
836
836
|
"div",
|
|
837
837
|
{
|
|
838
838
|
role: "slider",
|
|
@@ -843,11 +843,11 @@ const sa = (e) => {
|
|
|
843
843
|
tabIndex: 0,
|
|
844
844
|
ref: f,
|
|
845
845
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
846
|
-
onMouseDown:
|
|
847
|
-
onTouchStart:
|
|
846
|
+
onMouseDown: j,
|
|
847
|
+
onTouchStart: j,
|
|
848
848
|
onClick: (x) => x.stopPropagation(),
|
|
849
849
|
onKeyDown: (x) => {
|
|
850
|
-
x.key === "ArrowRight" &&
|
|
850
|
+
x.key === "ArrowRight" && D(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && D(Math.max(0, p - 0.05));
|
|
851
851
|
},
|
|
852
852
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
853
853
|
"div",
|
|
@@ -858,13 +858,13 @@ const sa = (e) => {
|
|
|
858
858
|
) })
|
|
859
859
|
}
|
|
860
860
|
) }),
|
|
861
|
-
|
|
861
|
+
l && /* @__PURE__ */ h("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
|
|
862
862
|
/* @__PURE__ */ n(
|
|
863
863
|
"button",
|
|
864
864
|
{
|
|
865
865
|
type: "button",
|
|
866
866
|
onClick: (x) => {
|
|
867
|
-
x.stopPropagation(), w((
|
|
867
|
+
x.stopPropagation(), w((S) => !S);
|
|
868
868
|
},
|
|
869
869
|
className: "shrink-0 text-white",
|
|
870
870
|
"aria-label": N ? "Pause" : "Play",
|
|
@@ -882,19 +882,19 @@ const sa = (e) => {
|
|
|
882
882
|
tabIndex: 0,
|
|
883
883
|
ref: f,
|
|
884
884
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
885
|
-
onMouseDown:
|
|
886
|
-
onTouchStart:
|
|
885
|
+
onMouseDown: j,
|
|
886
|
+
onTouchStart: j,
|
|
887
887
|
onClick: (x) => x.stopPropagation(),
|
|
888
888
|
onMouseEnter: () => O(!0),
|
|
889
889
|
onMouseLeave: () => O(!1),
|
|
890
890
|
onKeyDown: (x) => {
|
|
891
|
-
x.key === "ArrowRight" &&
|
|
891
|
+
x.key === "ArrowRight" && D(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && D(Math.max(0, p - 0.05));
|
|
892
892
|
},
|
|
893
893
|
children: [
|
|
894
894
|
/* @__PURE__ */ n(
|
|
895
895
|
"div",
|
|
896
896
|
{
|
|
897
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
897
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${E || A ? "h-1.5" : "h-1"}`,
|
|
898
898
|
children: /* @__PURE__ */ n(
|
|
899
899
|
"div",
|
|
900
900
|
{
|
|
@@ -907,7 +907,7 @@ const sa = (e) => {
|
|
|
907
907
|
/* @__PURE__ */ n(
|
|
908
908
|
"div",
|
|
909
909
|
{
|
|
910
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
910
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${E || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
911
911
|
style: { left: `${G}%` }
|
|
912
912
|
}
|
|
913
913
|
)
|
|
@@ -925,10 +925,10 @@ const sa = (e) => {
|
|
|
925
925
|
title: a,
|
|
926
926
|
variant: r,
|
|
927
927
|
mediaPlayerProps: i,
|
|
928
|
-
containedImage:
|
|
928
|
+
containedImage: l = !1
|
|
929
929
|
}) => {
|
|
930
|
-
const
|
|
931
|
-
return t && (
|
|
930
|
+
const o = ie(e), [d, u] = $(!1);
|
|
931
|
+
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
|
|
932
932
|
aa,
|
|
933
933
|
{
|
|
934
934
|
source: t,
|
|
@@ -937,14 +937,14 @@ const sa = (e) => {
|
|
|
937
937
|
controls: !0,
|
|
938
938
|
...i
|
|
939
939
|
}
|
|
940
|
-
) : t &&
|
|
940
|
+
) : t && o === "image" ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
|
|
941
941
|
"img",
|
|
942
942
|
{
|
|
943
943
|
src: t,
|
|
944
944
|
alt: a ?? "",
|
|
945
945
|
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
|
|
946
946
|
draggable: !1,
|
|
947
|
-
onLoad: () =>
|
|
947
|
+
onLoad: () => u(!0)
|
|
948
948
|
}
|
|
949
949
|
) }) : /* @__PURE__ */ n(
|
|
950
950
|
"img",
|
|
@@ -954,14 +954,14 @@ const sa = (e) => {
|
|
|
954
954
|
className: "block w-full",
|
|
955
955
|
draggable: !1
|
|
956
956
|
}
|
|
957
|
-
) : t &&
|
|
957
|
+
) : t && o === "document" ? s ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
|
|
958
958
|
"img",
|
|
959
959
|
{
|
|
960
960
|
src: s,
|
|
961
961
|
alt: a ?? "",
|
|
962
962
|
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
|
|
963
963
|
draggable: !1,
|
|
964
|
-
onLoad: () =>
|
|
964
|
+
onLoad: () => u(!0)
|
|
965
965
|
}
|
|
966
966
|
) }) : /* @__PURE__ */ n(
|
|
967
967
|
"img",
|
|
@@ -1005,42 +1005,42 @@ const sa = (e) => {
|
|
|
1005
1005
|
placeholderTitle: a = "Attachment title",
|
|
1006
1006
|
mimeType: r,
|
|
1007
1007
|
detail: i,
|
|
1008
|
-
statusBadge:
|
|
1009
|
-
action:
|
|
1008
|
+
statusBadge: l,
|
|
1009
|
+
action: o,
|
|
1010
1010
|
topLeft: d,
|
|
1011
|
-
topRight:
|
|
1011
|
+
topRight: u,
|
|
1012
1012
|
rootRef: g,
|
|
1013
|
-
"data-testid":
|
|
1013
|
+
"data-testid": m
|
|
1014
1014
|
}) => {
|
|
1015
|
-
const f = e === "dark", c = f ? s ?? a : s ?? "",
|
|
1015
|
+
const f = e === "dark", c = f ? s ?? a : s ?? "", b = f && !s;
|
|
1016
1016
|
return /* @__PURE__ */ h(
|
|
1017
1017
|
"div",
|
|
1018
1018
|
{
|
|
1019
1019
|
ref: g,
|
|
1020
|
-
"data-testid":
|
|
1021
|
-
className:
|
|
1020
|
+
"data-testid": m,
|
|
1021
|
+
className: k(
|
|
1022
1022
|
"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)]",
|
|
1023
1023
|
f ? "bg-[#121110]" : "bg-white"
|
|
1024
1024
|
),
|
|
1025
1025
|
children: [
|
|
1026
1026
|
d ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
|
|
1027
|
-
|
|
1027
|
+
u ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
|
|
1028
1028
|
t,
|
|
1029
1029
|
/* @__PURE__ */ h("div", { className: "px-4 pb-3 pt-3", children: [
|
|
1030
1030
|
c.trim() !== "" && /* @__PURE__ */ n(
|
|
1031
1031
|
"p",
|
|
1032
1032
|
{
|
|
1033
|
-
className:
|
|
1033
|
+
className: k("mb-0.5 truncate text-base font-medium", {
|
|
1034
1034
|
"text-black": !f,
|
|
1035
|
-
"text-white/30": f &&
|
|
1036
|
-
"text-white": f && !
|
|
1035
|
+
"text-white/30": f && b,
|
|
1036
|
+
"text-white": f && !b
|
|
1037
1037
|
}),
|
|
1038
1038
|
children: c
|
|
1039
1039
|
}
|
|
1040
1040
|
),
|
|
1041
1041
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1042
1042
|
ce(r, {
|
|
1043
|
-
className:
|
|
1043
|
+
className: k(
|
|
1044
1044
|
"size-5 shrink-0",
|
|
1045
1045
|
f ? "text-white/55" : "text-black/55"
|
|
1046
1046
|
),
|
|
@@ -1049,16 +1049,16 @@ const sa = (e) => {
|
|
|
1049
1049
|
i != null && i !== "" && /* @__PURE__ */ n(
|
|
1050
1050
|
"span",
|
|
1051
1051
|
{
|
|
1052
|
-
className:
|
|
1052
|
+
className: k(
|
|
1053
1053
|
"text-xs font-medium",
|
|
1054
1054
|
f ? "text-white/55" : "text-black/55"
|
|
1055
1055
|
),
|
|
1056
1056
|
children: i
|
|
1057
1057
|
}
|
|
1058
1058
|
),
|
|
1059
|
-
|
|
1059
|
+
l
|
|
1060
1060
|
] }),
|
|
1061
|
-
|
|
1061
|
+
o
|
|
1062
1062
|
] })
|
|
1063
1063
|
]
|
|
1064
1064
|
}
|
|
@@ -1086,7 +1086,7 @@ function da(e) {
|
|
|
1086
1086
|
return e ? "text-white/20" : "text-black/20";
|
|
1087
1087
|
}
|
|
1088
1088
|
const et = ({ attachment: e, isMyMessage: t }) => {
|
|
1089
|
-
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link:
|
|
1089
|
+
const { title: s, 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__ */ h(V.Fragment, { children: [
|
|
1090
1090
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1091
1091
|
"img",
|
|
1092
1092
|
{
|
|
@@ -1107,7 +1107,7 @@ const et = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1107
1107
|
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
|
|
1108
1108
|
] })
|
|
1109
1109
|
] });
|
|
1110
|
-
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children:
|
|
1110
|
+
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ n("div", { className: "block", children: u });
|
|
1111
1111
|
};
|
|
1112
1112
|
function rn(e) {
|
|
1113
1113
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
@@ -1125,30 +1125,30 @@ async function ua(e, t) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
const a = await fetch(e, { mode: "cors" });
|
|
1127
1127
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
1128
|
-
const r = await a.blob(), i = URL.createObjectURL(r),
|
|
1129
|
-
|
|
1128
|
+
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1129
|
+
l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1130
1130
|
}
|
|
1131
1131
|
const ma = ({
|
|
1132
1132
|
url: e,
|
|
1133
1133
|
filename: t
|
|
1134
1134
|
}) => {
|
|
1135
|
-
const [s, a] =
|
|
1135
|
+
const [s, a] = $(!1);
|
|
1136
1136
|
return /* @__PURE__ */ n(
|
|
1137
1137
|
"button",
|
|
1138
1138
|
{
|
|
1139
1139
|
type: "button",
|
|
1140
1140
|
onClick: (i) => {
|
|
1141
1141
|
i.stopPropagation();
|
|
1142
|
-
const
|
|
1142
|
+
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1143
1143
|
a(!0), ua(e, t).then(() => {
|
|
1144
|
-
|
|
1144
|
+
l == null || l.close();
|
|
1145
1145
|
}).catch(() => {
|
|
1146
|
-
|
|
1146
|
+
l && (l.location.href = e);
|
|
1147
1147
|
}).finally(() => a(!1));
|
|
1148
1148
|
},
|
|
1149
1149
|
disabled: s,
|
|
1150
1150
|
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",
|
|
1151
|
-
children: s ? /* @__PURE__ */ n(we, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(
|
|
1151
|
+
children: s ? /* @__PURE__ */ n(we, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(V.Fragment, { children: [
|
|
1152
1152
|
/* @__PURE__ */ n(Ne, { className: "size-4 text-white", weight: "bold" }),
|
|
1153
1153
|
"Download"
|
|
1154
1154
|
] })
|
|
@@ -1156,23 +1156,23 @@ const ma = ({
|
|
|
1156
1156
|
);
|
|
1157
1157
|
};
|
|
1158
1158
|
function nt(e) {
|
|
1159
|
-
var
|
|
1160
|
-
const t = (
|
|
1159
|
+
var m, f, c, b;
|
|
1160
|
+
const t = (m = e.attachments) == null ? void 0 : m.find(
|
|
1161
1161
|
(N) => N.type === "video" && N.asset_url
|
|
1162
1162
|
), s = (f = e.attachments) == null ? void 0 : f.find(
|
|
1163
1163
|
(N) => N.type === "image" && N.image_url
|
|
1164
1164
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1165
1165
|
(N) => N.type === "audio" && N.asset_url
|
|
1166
|
-
), r = (
|
|
1166
|
+
), r = (b = e.attachments) == null ? void 0 : b.find(
|
|
1167
1167
|
(N) => N.type === "file" && N.asset_url
|
|
1168
|
-
), i = t ?? s ?? a ?? r,
|
|
1169
|
-
if (!
|
|
1170
|
-
const
|
|
1168
|
+
), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1169
|
+
if (!l) return null;
|
|
1170
|
+
const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
|
|
1171
1171
|
return {
|
|
1172
|
-
resolvedUrl:
|
|
1173
|
-
resolvedType:
|
|
1172
|
+
resolvedUrl: l,
|
|
1173
|
+
resolvedType: o,
|
|
1174
1174
|
title: d,
|
|
1175
|
-
fileSize:
|
|
1175
|
+
fileSize: u,
|
|
1176
1176
|
thumbnailUrl: g
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
@@ -1211,14 +1211,14 @@ const ln = ({
|
|
|
1211
1211
|
fileSize: a,
|
|
1212
1212
|
thumbnailUrl: r
|
|
1213
1213
|
}) => {
|
|
1214
|
-
const i = ie(t),
|
|
1214
|
+
const i = ie(t), l = a !== void 0 ? an(a) : void 0;
|
|
1215
1215
|
return /* @__PURE__ */ n(
|
|
1216
1216
|
sn,
|
|
1217
1217
|
{
|
|
1218
1218
|
variant: "light",
|
|
1219
1219
|
title: s,
|
|
1220
1220
|
mimeType: t,
|
|
1221
|
-
detail:
|
|
1221
|
+
detail: l,
|
|
1222
1222
|
thumbnail: /* @__PURE__ */ n(
|
|
1223
1223
|
nn,
|
|
1224
1224
|
{
|
|
@@ -1329,30 +1329,30 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1329
1329
|
isMyMessage: s = !1,
|
|
1330
1330
|
hasAttachment: a = !1
|
|
1331
1331
|
}) => {
|
|
1332
|
-
var
|
|
1332
|
+
var m;
|
|
1333
1333
|
const r = dn(e), i = Me(e);
|
|
1334
1334
|
if (!r && !i)
|
|
1335
1335
|
return null;
|
|
1336
1336
|
if (r) {
|
|
1337
|
-
const f = (
|
|
1337
|
+
const f = (m = e.metadata) == null ? void 0 : m.amount_text;
|
|
1338
1338
|
if (!f) return null;
|
|
1339
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip",
|
|
1339
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1340
1340
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1341
1341
|
/* @__PURE__ */ n(Is, { size: t ? 14 : 12 }),
|
|
1342
|
-
/* @__PURE__ */ n("span", { children:
|
|
1342
|
+
/* @__PURE__ */ n("span", { children: b })
|
|
1343
1343
|
] });
|
|
1344
1344
|
}
|
|
1345
|
-
const
|
|
1345
|
+
const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
|
|
1346
1346
|
"message-chatbot-indicator",
|
|
1347
1347
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1348
|
-
|
|
1349
|
-
].join(" "),
|
|
1350
|
-
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !
|
|
1351
|
-
|
|
1348
|
+
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1349
|
+
].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: l ? 12 : 15 }) });
|
|
1350
|
+
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ h(se, { children: [
|
|
1351
|
+
u,
|
|
1352
1352
|
g
|
|
1353
1353
|
] }) : /* @__PURE__ */ h(se, { children: [
|
|
1354
1354
|
g,
|
|
1355
|
-
|
|
1355
|
+
u
|
|
1356
1356
|
] }) });
|
|
1357
1357
|
}, ka = ({
|
|
1358
1358
|
selected: e,
|
|
@@ -1363,7 +1363,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1363
1363
|
"button",
|
|
1364
1364
|
{
|
|
1365
1365
|
type: "button",
|
|
1366
|
-
className:
|
|
1366
|
+
className: k("message-vote-button focus-ring", {
|
|
1367
1367
|
"message-vote-button--selected": e === "up"
|
|
1368
1368
|
}),
|
|
1369
1369
|
onClick: t,
|
|
@@ -1377,7 +1377,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1377
1377
|
"button",
|
|
1378
1378
|
{
|
|
1379
1379
|
type: "button",
|
|
1380
|
-
className:
|
|
1380
|
+
className: k("message-vote-button focus-ring", {
|
|
1381
1381
|
"message-vote-button--selected": e === "down"
|
|
1382
1382
|
}),
|
|
1383
1383
|
onClick: s,
|
|
@@ -1395,33 +1395,33 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1395
1395
|
editing: a,
|
|
1396
1396
|
endOfGroup: r,
|
|
1397
1397
|
firstOfGroup: i,
|
|
1398
|
-
groupedByUser:
|
|
1399
|
-
handleAction:
|
|
1398
|
+
groupedByUser: l,
|
|
1399
|
+
handleAction: o,
|
|
1400
1400
|
handleOpenThread: d,
|
|
1401
|
-
handleRetry:
|
|
1401
|
+
handleRetry: u,
|
|
1402
1402
|
highlighted: g,
|
|
1403
|
-
isMessageAIGenerated:
|
|
1403
|
+
isMessageAIGenerated: m,
|
|
1404
1404
|
isMyMessage: f,
|
|
1405
1405
|
message: c,
|
|
1406
|
-
renderText:
|
|
1406
|
+
renderText: b,
|
|
1407
1407
|
threadList: N,
|
|
1408
1408
|
viewerLanguage: w
|
|
1409
|
-
} = e, { client:
|
|
1410
|
-
Attachment:
|
|
1411
|
-
EditMessageModal:
|
|
1412
|
-
MessageActions:
|
|
1413
|
-
MessageBlocked:
|
|
1414
|
-
MessageBouncePrompt:
|
|
1415
|
-
MessageDeleted:
|
|
1416
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
1417
|
-
MessageRepliesCountButton:
|
|
1409
|
+
} = e, { client: p } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: T, onFetchSource: E, onDownloadClick: O } = va("LockedAttachment"), [R, L] = $(!1), B = Ln(c.id), { selected: P, voteUp: _, voteDown: M } = Hs(c), {
|
|
1410
|
+
Attachment: y = Dn,
|
|
1411
|
+
EditMessageModal: I = Pn,
|
|
1412
|
+
MessageActions: C,
|
|
1413
|
+
MessageBlocked: z = zn,
|
|
1414
|
+
MessageBouncePrompt: D = On,
|
|
1415
|
+
MessageDeleted: j = $n,
|
|
1416
|
+
MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
|
|
1417
|
+
MessageRepliesCountButton: Q = Bn,
|
|
1418
1418
|
ReminderNotification: G = Un,
|
|
1419
1419
|
StreamedMessageText: x = jn,
|
|
1420
|
-
PinIndicator:
|
|
1420
|
+
PinIndicator: S
|
|
1421
1421
|
} = Gt("CustomMessage"), U = Vn(c), H = Gn(c), q = re(
|
|
1422
|
-
() =>
|
|
1423
|
-
[
|
|
1424
|
-
),
|
|
1422
|
+
() => m == null ? void 0 : m(c),
|
|
1423
|
+
[m, c]
|
|
1424
|
+
), F = re(() => {
|
|
1425
1425
|
const ge = c.attachments ?? [], Se = c.shared_location ? [c.shared_location, ...ge] : ge;
|
|
1426
1426
|
if (!Me(c)) return Se;
|
|
1427
1427
|
const Mt = Se.filter((Rt) => !("type" in Rt) || !rn(Rt));
|
|
@@ -1433,13 +1433,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1433
1433
|
if (Hn(c))
|
|
1434
1434
|
return null;
|
|
1435
1435
|
if (c.deleted_at || c.type === "deleted")
|
|
1436
|
-
return /* @__PURE__ */ n(
|
|
1436
|
+
return /* @__PURE__ */ n(j, { message: c });
|
|
1437
1437
|
if (Yn(c))
|
|
1438
|
-
return /* @__PURE__ */ n(
|
|
1438
|
+
return /* @__PURE__ */ n(z, {});
|
|
1439
1439
|
const X = !N && !!c.reply_count, ue = !N && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, he = qn(c);
|
|
1440
|
-
let
|
|
1441
|
-
me ?
|
|
1442
|
-
const te = f(), le =
|
|
1440
|
+
let ee;
|
|
1441
|
+
me ? ee = () => u(c) : he && (ee = () => L(!0));
|
|
1442
|
+
const te = f(), le = k(
|
|
1443
1443
|
"str-chat__message str-chat__message-simple",
|
|
1444
1444
|
`str-chat__message--${c.type}`,
|
|
1445
1445
|
`str-chat__message--${c.status}`,
|
|
@@ -1454,22 +1454,22 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1454
1454
|
"str-chat__message-with-thread-link": X || ue,
|
|
1455
1455
|
"str-chat__virtual-message__wrapper--end": r,
|
|
1456
1456
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1457
|
-
"str-chat__virtual-message__wrapper--group":
|
|
1457
|
+
"str-chat__virtual-message__wrapper--group": l
|
|
1458
1458
|
}
|
|
1459
|
-
), ht = c.poll_id &&
|
|
1459
|
+
), ht = c.poll_id && p.polls.fromState(c.poll_id), ft = ya(c), fe = Me(c), gt = _a(c), Oe = !!(F != null && F.length && !c.quoted_message), pt = fe && te && Oe;
|
|
1460
1460
|
return /* @__PURE__ */ h(se, { children: [
|
|
1461
1461
|
a && /* @__PURE__ */ n(
|
|
1462
|
-
|
|
1462
|
+
I,
|
|
1463
1463
|
{
|
|
1464
1464
|
additionalMessageInputProps: t
|
|
1465
1465
|
}
|
|
1466
1466
|
),
|
|
1467
|
-
|
|
1467
|
+
R && /* @__PURE__ */ n(
|
|
1468
1468
|
Wn,
|
|
1469
1469
|
{
|
|
1470
|
-
MessageBouncePrompt:
|
|
1470
|
+
MessageBouncePrompt: D,
|
|
1471
1471
|
onClose: () => L(!1),
|
|
1472
|
-
open:
|
|
1472
|
+
open: R
|
|
1473
1473
|
}
|
|
1474
1474
|
),
|
|
1475
1475
|
/* @__PURE__ */ h(
|
|
@@ -1479,8 +1479,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1479
1479
|
"data-message-id": c.id,
|
|
1480
1480
|
"data-dd-privacy": "mask",
|
|
1481
1481
|
children: [
|
|
1482
|
-
|
|
1483
|
-
!!
|
|
1482
|
+
S && /* @__PURE__ */ n(S, {}),
|
|
1483
|
+
!!B && /* @__PURE__ */ n(G, { reminder: B }),
|
|
1484
1484
|
c.user && /* @__PURE__ */ n(
|
|
1485
1485
|
ne,
|
|
1486
1486
|
{
|
|
@@ -1496,14 +1496,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1496
1496
|
/* @__PURE__ */ n(
|
|
1497
1497
|
"div",
|
|
1498
1498
|
{
|
|
1499
|
-
className:
|
|
1499
|
+
className: k("str-chat__message-inner", {
|
|
1500
1500
|
"str-chat__simple-message--error-failed": me || he
|
|
1501
1501
|
}),
|
|
1502
1502
|
"data-testid": "message-inner",
|
|
1503
|
-
onClick:
|
|
1504
|
-
onKeyDown:
|
|
1505
|
-
role:
|
|
1506
|
-
tabIndex:
|
|
1503
|
+
onClick: ee,
|
|
1504
|
+
onKeyDown: ee,
|
|
1505
|
+
role: ee ? "button" : void 0,
|
|
1506
|
+
tabIndex: ee ? 0 : void 0,
|
|
1507
1507
|
style: {
|
|
1508
1508
|
// Force margins to 0 to prevent hover layout shift
|
|
1509
1509
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
@@ -1512,7 +1512,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1512
1512
|
},
|
|
1513
1513
|
children: gt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1514
1514
|
te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1515
|
-
|
|
1515
|
+
C && /* @__PURE__ */ n(C, {}),
|
|
1516
1516
|
/* @__PURE__ */ n(
|
|
1517
1517
|
Bt.Sent,
|
|
1518
1518
|
{
|
|
@@ -1523,7 +1523,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1523
1523
|
detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
|
|
1524
1524
|
paymentStatus: (kt = c.metadata) == null ? void 0 : kt.payment_status,
|
|
1525
1525
|
onPreviewClick: () => T == null ? void 0 : T(c, v),
|
|
1526
|
-
onFetchSource: async () => await (
|
|
1526
|
+
onFetchSource: async () => await (E == null ? void 0 : E(c, v))
|
|
1527
1527
|
}
|
|
1528
1528
|
)
|
|
1529
1529
|
] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1536,19 +1536,19 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1536
1536
|
amountText: (St = c.metadata) == null ? void 0 : St.amount_text,
|
|
1537
1537
|
detail: (Tt = c.metadata) == null ? void 0 : Tt.attachment_detail,
|
|
1538
1538
|
paymentStatus: (At = c.metadata) == null ? void 0 : At.payment_status,
|
|
1539
|
-
isUnlocking:
|
|
1539
|
+
isUnlocking: A(c.id),
|
|
1540
1540
|
onUnlockClick: () => T == null ? void 0 : T(c, v),
|
|
1541
|
-
onFetchSource: async () => await (
|
|
1541
|
+
onFetchSource: async () => await (E == null ? void 0 : E(c, v)),
|
|
1542
1542
|
onDownloadClick: () => O == null ? void 0 : O(c, v)
|
|
1543
1543
|
}
|
|
1544
1544
|
),
|
|
1545
|
-
|
|
1545
|
+
C && /* @__PURE__ */ n(C, {})
|
|
1546
1546
|
] }),
|
|
1547
1547
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1548
1548
|
Dt,
|
|
1549
1549
|
{
|
|
1550
1550
|
message: W,
|
|
1551
|
-
renderText:
|
|
1551
|
+
renderText: b
|
|
1552
1552
|
}
|
|
1553
1553
|
) })
|
|
1554
1554
|
] }) : ft ? (
|
|
@@ -1564,24 +1564,24 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1564
1564
|
}
|
|
1565
1565
|
),
|
|
1566
1566
|
ht && /* @__PURE__ */ n(Xn, { poll: ht }),
|
|
1567
|
-
|
|
1568
|
-
|
|
1567
|
+
F != null && F.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1568
|
+
y,
|
|
1569
1569
|
{
|
|
1570
|
-
actionHandler:
|
|
1571
|
-
attachments:
|
|
1570
|
+
actionHandler: o,
|
|
1571
|
+
attachments: F
|
|
1572
1572
|
}
|
|
1573
1573
|
) : null,
|
|
1574
1574
|
q ? /* @__PURE__ */ n(
|
|
1575
1575
|
x,
|
|
1576
1576
|
{
|
|
1577
1577
|
message: W,
|
|
1578
|
-
renderText:
|
|
1578
|
+
renderText: b
|
|
1579
1579
|
}
|
|
1580
1580
|
) : /* @__PURE__ */ n(
|
|
1581
1581
|
Dt,
|
|
1582
1582
|
{
|
|
1583
1583
|
message: W,
|
|
1584
|
-
renderText:
|
|
1584
|
+
renderText: b
|
|
1585
1585
|
}
|
|
1586
1586
|
),
|
|
1587
1587
|
/* @__PURE__ */ n(Kn, {})
|
|
@@ -1600,26 +1600,26 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1600
1600
|
s && fe && /* @__PURE__ */ n(
|
|
1601
1601
|
ka,
|
|
1602
1602
|
{
|
|
1603
|
-
selected:
|
|
1604
|
-
onVoteUp:
|
|
1605
|
-
onVoteDown:
|
|
1603
|
+
selected: P,
|
|
1604
|
+
onVoteUp: _,
|
|
1605
|
+
onVoteDown: M
|
|
1606
1606
|
}
|
|
1607
1607
|
)
|
|
1608
1608
|
] }),
|
|
1609
1609
|
X && /* @__PURE__ */ n(
|
|
1610
|
-
|
|
1610
|
+
Q,
|
|
1611
1611
|
{
|
|
1612
1612
|
onClick: d,
|
|
1613
1613
|
reply_count: c.reply_count
|
|
1614
1614
|
}
|
|
1615
1615
|
),
|
|
1616
|
-
ue && /* @__PURE__ */ n(
|
|
1616
|
+
ue && /* @__PURE__ */ n(Z, {})
|
|
1617
1617
|
]
|
|
1618
1618
|
},
|
|
1619
1619
|
c.id
|
|
1620
1620
|
)
|
|
1621
1621
|
] });
|
|
1622
|
-
}, Ea =
|
|
1622
|
+
}, Ea = V.memo(
|
|
1623
1623
|
Ca,
|
|
1624
1624
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
|
|
1625
1625
|
), Ia = (e) => {
|
|
@@ -1687,8 +1687,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1687
1687
|
"button",
|
|
1688
1688
|
{
|
|
1689
1689
|
type: "button",
|
|
1690
|
-
onClick: (
|
|
1691
|
-
|
|
1690
|
+
onClick: (l) => {
|
|
1691
|
+
l.preventDefault(), t(s);
|
|
1692
1692
|
},
|
|
1693
1693
|
className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
|
|
1694
1694
|
"aria-label": "Close link preview",
|
|
@@ -1721,7 +1721,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1721
1721
|
},
|
|
1722
1722
|
r.og_scrape_url
|
|
1723
1723
|
)) }) : null;
|
|
1724
|
-
}, st =
|
|
1724
|
+
}, st = V.createContext(!1), Ci = () => _e(st), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1725
1725
|
"button",
|
|
1726
1726
|
{
|
|
1727
1727
|
...s,
|
|
@@ -1779,8 +1779,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1779
1779
|
disabledReason: a,
|
|
1780
1780
|
composerInput: r
|
|
1781
1781
|
}) => {
|
|
1782
|
-
var
|
|
1783
|
-
const { channel: i } = de(),
|
|
1782
|
+
var o;
|
|
1783
|
+
const { channel: i } = de(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
|
|
1784
1784
|
return s ? /* @__PURE__ */ h(se, { children: [
|
|
1785
1785
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
1786
1786
|
t == null ? void 0 : t()
|
|
@@ -1788,12 +1788,12 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1788
1788
|
/* @__PURE__ */ h(
|
|
1789
1789
|
"div",
|
|
1790
1790
|
{
|
|
1791
|
-
inert:
|
|
1792
|
-
"aria-disabled":
|
|
1791
|
+
inert: l ? "" : void 0,
|
|
1792
|
+
"aria-disabled": l || void 0,
|
|
1793
1793
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1794
1794
|
children: [
|
|
1795
1795
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1796
|
-
/* @__PURE__ */ n(st.Provider, { value:
|
|
1796
|
+
/* @__PURE__ */ n(st.Provider, { value: l, children: /* @__PURE__ */ n(Qn, { Input: r ?? Pa }) })
|
|
1797
1797
|
]
|
|
1798
1798
|
}
|
|
1799
1799
|
),
|
|
@@ -1928,10 +1928,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1928
1928
|
Fe.Generating,
|
|
1929
1929
|
Fe.ExternalSources
|
|
1930
1930
|
]), qa = ({ threadList: e }) => {
|
|
1931
|
-
var
|
|
1932
|
-
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState:
|
|
1933
|
-
if (!e &&
|
|
1934
|
-
const w = Wa(t, (
|
|
1931
|
+
var b, N;
|
|
1932
|
+
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = _e(un);
|
|
1933
|
+
if (!e && o && Ya.has(l)) {
|
|
1934
|
+
const w = Wa(t, (b = r.user) == null ? void 0 : b.id);
|
|
1935
1935
|
return /* @__PURE__ */ n(
|
|
1936
1936
|
Vt,
|
|
1937
1937
|
{
|
|
@@ -1944,20 +1944,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1944
1944
|
}
|
|
1945
1945
|
if ((s == null ? void 0 : s.typing_events) === !1)
|
|
1946
1946
|
return null;
|
|
1947
|
-
const
|
|
1948
|
-
({ parent_id: w, user:
|
|
1947
|
+
const u = e ? [] : Object.values(i).filter(
|
|
1948
|
+
({ parent_id: w, user: p }) => {
|
|
1949
1949
|
var v;
|
|
1950
|
-
return (
|
|
1950
|
+
return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && !w;
|
|
1951
1951
|
}
|
|
1952
1952
|
), g = e ? Object.values(i).filter(
|
|
1953
|
-
({ parent_id: w, user:
|
|
1953
|
+
({ parent_id: w, user: p }) => {
|
|
1954
1954
|
var v;
|
|
1955
|
-
return (
|
|
1955
|
+
return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && w === (a == null ? void 0 : a.id);
|
|
1956
1956
|
}
|
|
1957
|
-
) : [],
|
|
1958
|
-
if (!
|
|
1957
|
+
) : [], m = e ? g : u;
|
|
1958
|
+
if (!m.length)
|
|
1959
1959
|
return null;
|
|
1960
|
-
const f = (N =
|
|
1960
|
+
const f = (N = m[0]) == null ? void 0 : N.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
1961
1961
|
return /* @__PURE__ */ n(
|
|
1962
1962
|
Vt,
|
|
1963
1963
|
{
|
|
@@ -2023,7 +2023,7 @@ function Wa(e, t) {
|
|
|
2023
2023
|
const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2024
2024
|
"div",
|
|
2025
2025
|
{
|
|
2026
|
-
className:
|
|
2026
|
+
className: k("flex items-center justify-center h-full", e),
|
|
2027
2027
|
children: [
|
|
2028
2028
|
/* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
2029
2029
|
/* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
|
|
@@ -2063,7 +2063,7 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2063
2063
|
t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
|
|
2064
2064
|
]
|
|
2065
2065
|
}
|
|
2066
|
-
), Re =
|
|
2066
|
+
), Re = V.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
2067
2067
|
/* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
|
|
2068
2068
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2069
2069
|
] }) }));
|
|
@@ -2075,41 +2075,41 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2075
2075
|
dmAgentEnabled: a = !1,
|
|
2076
2076
|
onLeaveConversation: r,
|
|
2077
2077
|
onBlockParticipant: i,
|
|
2078
|
-
showDeleteConversation:
|
|
2079
|
-
showBlockParticipant:
|
|
2078
|
+
showDeleteConversation: l = !0,
|
|
2079
|
+
showBlockParticipant: o = !0,
|
|
2080
2080
|
showReportParticipant: d = !0,
|
|
2081
|
-
onDeleteConversationClick:
|
|
2081
|
+
onDeleteConversationClick: u,
|
|
2082
2082
|
onBlockParticipantClick: g,
|
|
2083
|
-
onReportParticipantClick:
|
|
2083
|
+
onReportParticipantClick: m,
|
|
2084
2084
|
customChannelActions: f,
|
|
2085
2085
|
renderChannelActions: c,
|
|
2086
|
-
showChannelInfo:
|
|
2086
|
+
showChannelInfo: b = !0,
|
|
2087
2087
|
onParticipantNameClick: N,
|
|
2088
2088
|
renderHeaderTitleBadges: w
|
|
2089
2089
|
}) => {
|
|
2090
|
-
var
|
|
2091
|
-
const { channel:
|
|
2092
|
-
var
|
|
2093
|
-
const
|
|
2094
|
-
return
|
|
2090
|
+
var _, M, y, I, C, z, D;
|
|
2091
|
+
const { channel: p } = de(), v = V.useMemo(() => {
|
|
2092
|
+
var Q, G;
|
|
2093
|
+
const j = (Q = p._client) == null ? void 0 : Q.userID;
|
|
2094
|
+
return j ? Object.values(((G = p.state) == null ? void 0 : G.members) || {}).find(
|
|
2095
2095
|
(x) => {
|
|
2096
|
-
var
|
|
2097
|
-
return ((
|
|
2096
|
+
var S;
|
|
2097
|
+
return ((S = x.user) == null ? void 0 : S.id) && x.user.id !== j;
|
|
2098
2098
|
}
|
|
2099
2099
|
) : void 0;
|
|
2100
|
-
}, [(
|
|
2101
|
-
channel:
|
|
2100
|
+
}, [(_ = p._client) == null ? void 0 : _.userID, (M = p.state) == null ? void 0 : M.members]), A = Jt(v == null ? void 0 : v.user), T = (y = v == null ? void 0 : v.user) == null ? void 0 : y.image, E = Kt(p), O = w == null ? void 0 : w({
|
|
2101
|
+
channel: p,
|
|
2102
2102
|
participant: v
|
|
2103
|
-
}),
|
|
2104
|
-
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children:
|
|
2103
|
+
}), R = "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", L = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", B = /* @__PURE__ */ h(se, { children: [
|
|
2104
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2105
2105
|
O && /* @__PURE__ */ n("span", { className: "shrink-0", children: O })
|
|
2106
|
-
] }),
|
|
2106
|
+
] }), P = async () => {
|
|
2107
2107
|
try {
|
|
2108
|
-
|
|
2109
|
-
} catch (
|
|
2108
|
+
E ? await p.unpin() : await p.pin();
|
|
2109
|
+
} catch (j) {
|
|
2110
2110
|
console.error(
|
|
2111
2111
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
2112
|
-
|
|
2112
|
+
j
|
|
2113
2113
|
);
|
|
2114
2114
|
}
|
|
2115
2115
|
};
|
|
@@ -2118,7 +2118,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2118
2118
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
|
|
2119
2119
|
"button",
|
|
2120
2120
|
{
|
|
2121
|
-
className:
|
|
2121
|
+
className: k(
|
|
2122
2122
|
oe,
|
|
2123
2123
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
2124
2124
|
),
|
|
@@ -2139,25 +2139,25 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2139
2139
|
{
|
|
2140
2140
|
type: "button",
|
|
2141
2141
|
onClick: N,
|
|
2142
|
-
"aria-label": `View details for ${
|
|
2143
|
-
className:
|
|
2144
|
-
|
|
2142
|
+
"aria-label": `View details for ${A}`,
|
|
2143
|
+
className: k(
|
|
2144
|
+
R,
|
|
2145
2145
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
2146
2146
|
),
|
|
2147
2147
|
children: [
|
|
2148
2148
|
/* @__PURE__ */ n(
|
|
2149
2149
|
ne,
|
|
2150
2150
|
{
|
|
2151
|
-
id: ((
|
|
2152
|
-
name:
|
|
2151
|
+
id: ((I = v == null ? void 0 : v.user) == null ? void 0 : I.id) || p.id || "unknown",
|
|
2152
|
+
name: A,
|
|
2153
2153
|
image: T,
|
|
2154
|
-
starred: s &&
|
|
2154
|
+
starred: s && E,
|
|
2155
2155
|
dmAgentEnabled: a,
|
|
2156
2156
|
size: 48
|
|
2157
2157
|
}
|
|
2158
2158
|
),
|
|
2159
2159
|
/* @__PURE__ */ h("span", { className: "flex max-w-full items-center gap-0.5", children: [
|
|
2160
|
-
|
|
2160
|
+
B,
|
|
2161
2161
|
/* @__PURE__ */ n(ve, { className: "size-3 shrink-0", weight: "bold" })
|
|
2162
2162
|
] }),
|
|
2163
2163
|
a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
@@ -2166,20 +2166,20 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2166
2166
|
] })
|
|
2167
2167
|
]
|
|
2168
2168
|
}
|
|
2169
|
-
) : /* @__PURE__ */ h("div", { className:
|
|
2169
|
+
) : /* @__PURE__ */ h("div", { className: R, children: [
|
|
2170
2170
|
/* @__PURE__ */ n(
|
|
2171
2171
|
ne,
|
|
2172
2172
|
{
|
|
2173
|
-
id: ((
|
|
2174
|
-
name:
|
|
2173
|
+
id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) || p.id || "unknown",
|
|
2174
|
+
name: A,
|
|
2175
2175
|
image: T,
|
|
2176
|
-
starred: s &&
|
|
2176
|
+
starred: s && E,
|
|
2177
2177
|
dmAgentEnabled: a,
|
|
2178
2178
|
size: 48
|
|
2179
2179
|
}
|
|
2180
2180
|
),
|
|
2181
2181
|
/* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
|
|
2182
|
-
|
|
2182
|
+
B,
|
|
2183
2183
|
/* @__PURE__ */ n(
|
|
2184
2184
|
ve,
|
|
2185
2185
|
{
|
|
@@ -2200,36 +2200,36 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2200
2200
|
"button",
|
|
2201
2201
|
{
|
|
2202
2202
|
className: oe,
|
|
2203
|
-
onClick:
|
|
2203
|
+
onClick: P,
|
|
2204
2204
|
type: "button",
|
|
2205
|
-
"aria-label":
|
|
2205
|
+
"aria-label": E ? "Unstar conversation" : "Star conversation",
|
|
2206
2206
|
children: /* @__PURE__ */ n(
|
|
2207
2207
|
Ge,
|
|
2208
2208
|
{
|
|
2209
|
-
className:
|
|
2210
|
-
"text-yellow-600":
|
|
2211
|
-
"text-black/90": !
|
|
2209
|
+
className: k("size-5", {
|
|
2210
|
+
"text-yellow-600": E,
|
|
2211
|
+
"text-black/90": !E
|
|
2212
2212
|
}),
|
|
2213
|
-
weight:
|
|
2213
|
+
weight: E ? "duotone" : "regular"
|
|
2214
2214
|
}
|
|
2215
2215
|
)
|
|
2216
2216
|
}
|
|
2217
2217
|
),
|
|
2218
|
-
|
|
2218
|
+
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2219
2219
|
Ft,
|
|
2220
2220
|
{
|
|
2221
|
-
channel:
|
|
2221
|
+
channel: p,
|
|
2222
2222
|
participant: v,
|
|
2223
|
-
showDeleteConversation:
|
|
2224
|
-
showBlockParticipant:
|
|
2223
|
+
showDeleteConversation: l,
|
|
2224
|
+
showBlockParticipant: o,
|
|
2225
2225
|
showReportParticipant: d,
|
|
2226
2226
|
onLeaveConversation: r,
|
|
2227
2227
|
onBlockParticipant: i,
|
|
2228
|
-
onDeleteConversationClick:
|
|
2228
|
+
onDeleteConversationClick: u,
|
|
2229
2229
|
onBlockParticipantClick: g,
|
|
2230
|
-
onReportParticipantClick:
|
|
2230
|
+
onReportParticipantClick: m,
|
|
2231
2231
|
customChannelActions: f,
|
|
2232
|
-
triggerClassName:
|
|
2232
|
+
triggerClassName: k(oe, "bg-[#F1F0EE]")
|
|
2233
2233
|
}
|
|
2234
2234
|
))
|
|
2235
2235
|
] })
|
|
@@ -2239,7 +2239,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2239
2239
|
t && e && /* @__PURE__ */ n(
|
|
2240
2240
|
"button",
|
|
2241
2241
|
{
|
|
2242
|
-
className:
|
|
2242
|
+
className: k(
|
|
2243
2243
|
oe,
|
|
2244
2244
|
"messaging-channel-view-back-button-desktop"
|
|
2245
2245
|
),
|
|
@@ -2254,8 +2254,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2254
2254
|
{
|
|
2255
2255
|
type: "button",
|
|
2256
2256
|
onClick: N,
|
|
2257
|
-
"aria-label": `View details for ${
|
|
2258
|
-
className:
|
|
2257
|
+
"aria-label": `View details for ${A}`,
|
|
2258
|
+
className: k(
|
|
2259
2259
|
L,
|
|
2260
2260
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
2261
2261
|
),
|
|
@@ -2263,17 +2263,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2263
2263
|
/* @__PURE__ */ n(
|
|
2264
2264
|
ne,
|
|
2265
2265
|
{
|
|
2266
|
-
id: ((
|
|
2267
|
-
name:
|
|
2266
|
+
id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || p.id || "unknown",
|
|
2267
|
+
name: A,
|
|
2268
2268
|
image: T,
|
|
2269
|
-
starred: s &&
|
|
2269
|
+
starred: s && E,
|
|
2270
2270
|
dmAgentEnabled: a,
|
|
2271
2271
|
size: 48
|
|
2272
2272
|
}
|
|
2273
2273
|
),
|
|
2274
2274
|
/* @__PURE__ */ h("div", { className: "min-w-0", children: [
|
|
2275
2275
|
/* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
2276
|
-
|
|
2276
|
+
B,
|
|
2277
2277
|
/* @__PURE__ */ n(ve, { className: "size-4 shrink-0", weight: "bold" })
|
|
2278
2278
|
] }),
|
|
2279
2279
|
a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
@@ -2287,17 +2287,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2287
2287
|
/* @__PURE__ */ n(
|
|
2288
2288
|
ne,
|
|
2289
2289
|
{
|
|
2290
|
-
id: ((
|
|
2291
|
-
name:
|
|
2290
|
+
id: ((D = v == null ? void 0 : v.user) == null ? void 0 : D.id) || p.id || "unknown",
|
|
2291
|
+
name: A,
|
|
2292
2292
|
image: T,
|
|
2293
|
-
starred: s &&
|
|
2293
|
+
starred: s && E,
|
|
2294
2294
|
dmAgentEnabled: a,
|
|
2295
2295
|
size: 48
|
|
2296
2296
|
}
|
|
2297
2297
|
),
|
|
2298
2298
|
/* @__PURE__ */ h("div", { className: "min-w-0", children: [
|
|
2299
2299
|
/* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
2300
|
-
|
|
2300
|
+
B,
|
|
2301
2301
|
/* @__PURE__ */ n(
|
|
2302
2302
|
ve,
|
|
2303
2303
|
{
|
|
@@ -2318,34 +2318,34 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2318
2318
|
"button",
|
|
2319
2319
|
{
|
|
2320
2320
|
className: oe,
|
|
2321
|
-
onClick:
|
|
2321
|
+
onClick: P,
|
|
2322
2322
|
type: "button",
|
|
2323
|
-
"aria-label":
|
|
2323
|
+
"aria-label": E ? "Unstar conversation" : "Star conversation",
|
|
2324
2324
|
children: /* @__PURE__ */ n(
|
|
2325
2325
|
Ge,
|
|
2326
2326
|
{
|
|
2327
|
-
className:
|
|
2328
|
-
"text-yellow-600":
|
|
2329
|
-
"text-black/90": !
|
|
2327
|
+
className: k("size-6", {
|
|
2328
|
+
"text-yellow-600": E,
|
|
2329
|
+
"text-black/90": !E
|
|
2330
2330
|
}),
|
|
2331
|
-
weight:
|
|
2331
|
+
weight: E ? "duotone" : "regular"
|
|
2332
2332
|
}
|
|
2333
2333
|
)
|
|
2334
2334
|
}
|
|
2335
2335
|
),
|
|
2336
|
-
|
|
2336
|
+
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2337
2337
|
Ft,
|
|
2338
2338
|
{
|
|
2339
|
-
channel:
|
|
2339
|
+
channel: p,
|
|
2340
2340
|
participant: v,
|
|
2341
|
-
showDeleteConversation:
|
|
2342
|
-
showBlockParticipant:
|
|
2341
|
+
showDeleteConversation: l,
|
|
2342
|
+
showBlockParticipant: o,
|
|
2343
2343
|
showReportParticipant: d,
|
|
2344
2344
|
onLeaveConversation: r,
|
|
2345
2345
|
onBlockParticipant: i,
|
|
2346
|
-
onDeleteConversationClick:
|
|
2346
|
+
onDeleteConversationClick: u,
|
|
2347
2347
|
onBlockParticipantClick: g,
|
|
2348
|
-
onReportParticipantClick:
|
|
2348
|
+
onReportParticipantClick: m,
|
|
2349
2349
|
customChannelActions: f,
|
|
2350
2350
|
triggerClassName: oe
|
|
2351
2351
|
}
|
|
@@ -2360,64 +2360,64 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2360
2360
|
renderMessageInputFooter: a,
|
|
2361
2361
|
renderConversationFooter: r,
|
|
2362
2362
|
onLeaveConversation: i,
|
|
2363
|
-
onBlockParticipant:
|
|
2364
|
-
showDeleteConversation:
|
|
2363
|
+
onBlockParticipant: l,
|
|
2364
|
+
showDeleteConversation: o = !0,
|
|
2365
2365
|
onDeleteConversationClick: d,
|
|
2366
|
-
onBlockParticipantClick:
|
|
2366
|
+
onBlockParticipantClick: u,
|
|
2367
2367
|
onReportParticipantClick: g,
|
|
2368
|
-
showBlockParticipant:
|
|
2368
|
+
showBlockParticipant: m = !0,
|
|
2369
2369
|
showReportParticipant: f = !0,
|
|
2370
2370
|
composerDisabled: c = !1,
|
|
2371
|
-
composerDisabledReason:
|
|
2371
|
+
composerDisabledReason: b,
|
|
2372
2372
|
showStarButton: N = !1,
|
|
2373
2373
|
chatbotVotingEnabled: w = !1,
|
|
2374
|
-
renderChannelBanner:
|
|
2374
|
+
renderChannelBanner: p,
|
|
2375
2375
|
renderHeaderTitleBadges: v,
|
|
2376
|
-
customChannelActions:
|
|
2376
|
+
customChannelActions: A,
|
|
2377
2377
|
renderChannelActions: T,
|
|
2378
|
-
renderMessage:
|
|
2378
|
+
renderMessage: E,
|
|
2379
2379
|
dmAgentEnabled: O = !1,
|
|
2380
|
-
viewerLanguage:
|
|
2380
|
+
viewerLanguage: R,
|
|
2381
2381
|
showChannelInfo: L = !0,
|
|
2382
|
-
onParticipantNameClick:
|
|
2383
|
-
composerInput:
|
|
2382
|
+
onParticipantNameClick: B,
|
|
2383
|
+
composerInput: P
|
|
2384
2384
|
}) => {
|
|
2385
|
-
var
|
|
2386
|
-
const { channel:
|
|
2387
|
-
var q,
|
|
2388
|
-
const U = (q =
|
|
2389
|
-
return U ? Object.values(((
|
|
2385
|
+
var j, Z, Q, G, x, S;
|
|
2386
|
+
const { channel: _ } = de(), M = V.useMemo(() => {
|
|
2387
|
+
var q, F;
|
|
2388
|
+
const U = (q = _._client) == null ? void 0 : q.userID;
|
|
2389
|
+
return U ? Object.values(((F = _.state) == null ? void 0 : F.members) || {}).find(
|
|
2390
2390
|
(W) => {
|
|
2391
2391
|
var X;
|
|
2392
2392
|
return ((X = W.user) == null ? void 0 : X.id) && W.user.id !== U;
|
|
2393
2393
|
}
|
|
2394
2394
|
) : void 0;
|
|
2395
|
-
}, [(
|
|
2396
|
-
var q,
|
|
2397
|
-
const U = (q =
|
|
2398
|
-
return U ? Object.values(((
|
|
2395
|
+
}, [(j = _._client) == null ? void 0 : j.userID, (Z = _.state) == null ? void 0 : Z.members]), y = V.useMemo(() => {
|
|
2396
|
+
var q, F;
|
|
2397
|
+
const U = (q = _._client) == null ? void 0 : q.userID;
|
|
2398
|
+
return U ? Object.values(((F = _.state) == null ? void 0 : F.members) || {}).find((W) => {
|
|
2399
2399
|
var X;
|
|
2400
2400
|
return ((X = W.user) == null ? void 0 : X.id) === U;
|
|
2401
2401
|
}) : void 0;
|
|
2402
|
-
}, [(
|
|
2402
|
+
}, [(Q = _._client) == null ? void 0 : Q.userID, (G = _.state) == null ? void 0 : G.members]), I = ((x = y == null ? void 0 : y.user) == null ? void 0 : x.is_account) ?? (y == null ? void 0 : y.is_account), C = ((S = M == null ? void 0 : M.user) == null ? void 0 : S.is_account) ?? (M == null ? void 0 : M.is_account), z = O && I === !1 && C === !0, D = J(
|
|
2403
2403
|
(U) => {
|
|
2404
2404
|
const { message: H } = ye("ChannelView"), q = /* @__PURE__ */ n(
|
|
2405
2405
|
Ia,
|
|
2406
2406
|
{
|
|
2407
2407
|
...U,
|
|
2408
2408
|
chatbotVotingEnabled: w,
|
|
2409
|
-
viewerLanguage:
|
|
2409
|
+
viewerLanguage: R
|
|
2410
2410
|
}
|
|
2411
2411
|
);
|
|
2412
|
-
return !
|
|
2412
|
+
return !E || !H ? q : E(q, H);
|
|
2413
2413
|
},
|
|
2414
|
-
[w,
|
|
2414
|
+
[w, E, R]
|
|
2415
2415
|
);
|
|
2416
2416
|
return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
|
|
2417
2417
|
os,
|
|
2418
2418
|
{
|
|
2419
2419
|
overrides: {
|
|
2420
|
-
Message:
|
|
2420
|
+
Message: D,
|
|
2421
2421
|
MessageActions: Aa
|
|
2422
2422
|
},
|
|
2423
2423
|
children: /* @__PURE__ */ h(cs, { children: [
|
|
@@ -2428,22 +2428,22 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2428
2428
|
showBackButton: t,
|
|
2429
2429
|
showChannelInfo: L,
|
|
2430
2430
|
showStarButton: N,
|
|
2431
|
-
dmAgentEnabled:
|
|
2431
|
+
dmAgentEnabled: z,
|
|
2432
2432
|
onLeaveConversation: i,
|
|
2433
|
-
onBlockParticipant:
|
|
2434
|
-
showDeleteConversation:
|
|
2435
|
-
showBlockParticipant:
|
|
2433
|
+
onBlockParticipant: l,
|
|
2434
|
+
showDeleteConversation: o,
|
|
2435
|
+
showBlockParticipant: m,
|
|
2436
2436
|
showReportParticipant: f,
|
|
2437
2437
|
onDeleteConversationClick: d,
|
|
2438
|
-
onBlockParticipantClick:
|
|
2438
|
+
onBlockParticipantClick: u,
|
|
2439
2439
|
onReportParticipantClick: g,
|
|
2440
|
-
customChannelActions:
|
|
2440
|
+
customChannelActions: A,
|
|
2441
2441
|
renderChannelActions: T,
|
|
2442
|
-
onParticipantNameClick:
|
|
2442
|
+
onParticipantNameClick: B,
|
|
2443
2443
|
renderHeaderTitleBadges: v
|
|
2444
2444
|
}
|
|
2445
2445
|
) }, "lt-channel-header"),
|
|
2446
|
-
|
|
2446
|
+
p ? /* @__PURE__ */ n(V.Fragment, { children: p() }, "lt-channel-banner") : null,
|
|
2447
2447
|
/* @__PURE__ */ n(
|
|
2448
2448
|
"div",
|
|
2449
2449
|
{
|
|
@@ -2452,24 +2452,24 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2452
2452
|
},
|
|
2453
2453
|
"lt-channel-message-list"
|
|
2454
2454
|
),
|
|
2455
|
-
r ? /* @__PURE__ */ n(
|
|
2455
|
+
r ? /* @__PURE__ */ n(V.Fragment, { children: r(_) }, "lt-channel-conversation-footer") : null,
|
|
2456
2456
|
/* @__PURE__ */ n(
|
|
2457
2457
|
za,
|
|
2458
2458
|
{
|
|
2459
2459
|
...s && {
|
|
2460
|
-
renderActions: () => s == null ? void 0 : s(
|
|
2460
|
+
renderActions: () => s == null ? void 0 : s(_)
|
|
2461
2461
|
},
|
|
2462
|
-
renderFooter: () => a == null ? void 0 : a(
|
|
2462
|
+
renderFooter: () => a == null ? void 0 : a(_),
|
|
2463
2463
|
disabled: c,
|
|
2464
|
-
disabledReason:
|
|
2465
|
-
composerInput:
|
|
2464
|
+
disabledReason: b,
|
|
2465
|
+
composerInput: P
|
|
2466
2466
|
},
|
|
2467
2467
|
"lt-channel-message-input"
|
|
2468
2468
|
)
|
|
2469
2469
|
] })
|
|
2470
2470
|
}
|
|
2471
2471
|
) });
|
|
2472
|
-
}, mn =
|
|
2472
|
+
}, mn = V.memo(
|
|
2473
2473
|
({
|
|
2474
2474
|
channel: e,
|
|
2475
2475
|
onBack: t,
|
|
@@ -2477,72 +2477,72 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2477
2477
|
renderMessageInputActions: a,
|
|
2478
2478
|
renderMessageInputFooter: r,
|
|
2479
2479
|
renderConversationFooter: i,
|
|
2480
|
-
onLeaveConversation:
|
|
2481
|
-
onBlockParticipant:
|
|
2480
|
+
onLeaveConversation: l,
|
|
2481
|
+
onBlockParticipant: o,
|
|
2482
2482
|
className: d,
|
|
2483
|
-
CustomChannelEmptyState:
|
|
2483
|
+
CustomChannelEmptyState: u = Xa,
|
|
2484
2484
|
showDeleteConversation: g = !0,
|
|
2485
|
-
onDeleteConversationClick:
|
|
2485
|
+
onDeleteConversationClick: m,
|
|
2486
2486
|
onBlockParticipantClick: f,
|
|
2487
2487
|
onReportParticipantClick: c,
|
|
2488
|
-
showBlockParticipant:
|
|
2488
|
+
showBlockParticipant: b = !0,
|
|
2489
2489
|
showReportParticipant: N = !0,
|
|
2490
2490
|
composerDisabled: w = !1,
|
|
2491
|
-
composerDisabledReason:
|
|
2491
|
+
composerDisabledReason: p,
|
|
2492
2492
|
dmAgentEnabled: v,
|
|
2493
|
-
messageMetadata:
|
|
2493
|
+
messageMetadata: A,
|
|
2494
2494
|
onMessageSent: T,
|
|
2495
|
-
showStarButton:
|
|
2495
|
+
showStarButton: E = !1,
|
|
2496
2496
|
chatbotVotingEnabled: O = !1,
|
|
2497
|
-
renderChannelBanner:
|
|
2497
|
+
renderChannelBanner: R,
|
|
2498
2498
|
renderHeaderTitleBadges: L,
|
|
2499
|
-
customChannelActions:
|
|
2500
|
-
renderChannelActions:
|
|
2501
|
-
renderMessage:
|
|
2502
|
-
onMessageLinkClick:
|
|
2503
|
-
sendButton:
|
|
2504
|
-
attachmentPreviewList:
|
|
2505
|
-
viewerLanguage:
|
|
2506
|
-
showChannelInfo:
|
|
2507
|
-
onParticipantNameClick:
|
|
2508
|
-
composerInput:
|
|
2499
|
+
customChannelActions: B,
|
|
2500
|
+
renderChannelActions: P,
|
|
2501
|
+
renderMessage: _,
|
|
2502
|
+
onMessageLinkClick: M,
|
|
2503
|
+
sendButton: y,
|
|
2504
|
+
attachmentPreviewList: I,
|
|
2505
|
+
viewerLanguage: C,
|
|
2506
|
+
showChannelInfo: z = !0,
|
|
2507
|
+
onParticipantNameClick: D,
|
|
2508
|
+
composerInput: j
|
|
2509
2509
|
}) => {
|
|
2510
|
-
const
|
|
2511
|
-
async (G, x,
|
|
2510
|
+
const Z = J(
|
|
2511
|
+
async (G, x, S) => {
|
|
2512
2512
|
var X;
|
|
2513
2513
|
const U = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, H = v && !U, q = {
|
|
2514
2514
|
...x,
|
|
2515
2515
|
...H && { silent: !0 },
|
|
2516
|
-
...
|
|
2516
|
+
...A && {
|
|
2517
2517
|
metadata: {
|
|
2518
2518
|
...x.metadata ?? {},
|
|
2519
|
-
...
|
|
2519
|
+
...A
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
-
},
|
|
2523
|
-
...
|
|
2522
|
+
}, F = {
|
|
2523
|
+
...S,
|
|
2524
2524
|
...H && { skip_push: !0 }
|
|
2525
|
-
}, W = await e.sendMessage(q,
|
|
2525
|
+
}, W = await e.sendMessage(q, F);
|
|
2526
2526
|
return T == null || T(W), W;
|
|
2527
2527
|
},
|
|
2528
|
-
[e, v,
|
|
2529
|
-
),
|
|
2528
|
+
[e, v, A, T]
|
|
2529
|
+
), Q = Y(null);
|
|
2530
2530
|
return K(() => {
|
|
2531
|
-
if (!
|
|
2532
|
-
const G =
|
|
2531
|
+
if (!M) return;
|
|
2532
|
+
const G = Q.current;
|
|
2533
2533
|
if (!G) return;
|
|
2534
|
-
const x = (
|
|
2535
|
-
const U =
|
|
2534
|
+
const x = (S) => {
|
|
2535
|
+
const U = S.target, H = U == null ? void 0 : U.closest("a[href]"), q = H == null ? void 0 : H.getAttribute("href");
|
|
2536
2536
|
if (!q) return;
|
|
2537
|
-
const
|
|
2538
|
-
|
|
2537
|
+
const F = H == null ? void 0 : H.closest("[data-message-id]"), W = F == null ? void 0 : F.getAttribute("data-message-id"), X = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
|
|
2538
|
+
M(q, X);
|
|
2539
2539
|
};
|
|
2540
2540
|
return G.addEventListener("click", x), () => G.removeEventListener("click", x);
|
|
2541
|
-
}, [
|
|
2541
|
+
}, [M, e]), /* @__PURE__ */ n(
|
|
2542
2542
|
"div",
|
|
2543
2543
|
{
|
|
2544
|
-
ref:
|
|
2545
|
-
className:
|
|
2544
|
+
ref: Q,
|
|
2545
|
+
className: k(
|
|
2546
2546
|
"messaging-channel-view h-full flex flex-col",
|
|
2547
2547
|
d
|
|
2548
2548
|
),
|
|
@@ -2551,13 +2551,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2551
2551
|
{
|
|
2552
2552
|
channel: e,
|
|
2553
2553
|
MessageSystem: Ha,
|
|
2554
|
-
EmptyStateIndicator:
|
|
2554
|
+
EmptyStateIndicator: u,
|
|
2555
2555
|
LoadingIndicator: Re,
|
|
2556
2556
|
DateSeparator: Vs,
|
|
2557
2557
|
TypingIndicator: qa,
|
|
2558
|
-
doSendMessageRequest:
|
|
2559
|
-
...
|
|
2560
|
-
...
|
|
2558
|
+
doSendMessageRequest: Z,
|
|
2559
|
+
...y ? { SendButton: y } : {},
|
|
2560
|
+
...I ? { AttachmentPreviewList: I } : {},
|
|
2561
2561
|
children: /* @__PURE__ */ n(
|
|
2562
2562
|
Za,
|
|
2563
2563
|
{
|
|
@@ -2566,29 +2566,29 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2566
2566
|
renderMessageInputActions: a,
|
|
2567
2567
|
renderMessageInputFooter: r,
|
|
2568
2568
|
renderConversationFooter: i,
|
|
2569
|
-
onLeaveConversation:
|
|
2570
|
-
onBlockParticipant:
|
|
2571
|
-
CustomChannelEmptyState:
|
|
2569
|
+
onLeaveConversation: l,
|
|
2570
|
+
onBlockParticipant: o,
|
|
2571
|
+
CustomChannelEmptyState: u,
|
|
2572
2572
|
showDeleteConversation: g,
|
|
2573
|
-
onDeleteConversationClick:
|
|
2573
|
+
onDeleteConversationClick: m,
|
|
2574
2574
|
onBlockParticipantClick: f,
|
|
2575
2575
|
onReportParticipantClick: c,
|
|
2576
|
-
showBlockParticipant:
|
|
2576
|
+
showBlockParticipant: b,
|
|
2577
2577
|
showReportParticipant: N,
|
|
2578
2578
|
composerDisabled: w,
|
|
2579
|
-
composerDisabledReason:
|
|
2580
|
-
showStarButton:
|
|
2579
|
+
composerDisabledReason: p,
|
|
2580
|
+
showStarButton: E,
|
|
2581
2581
|
dmAgentEnabled: v,
|
|
2582
2582
|
chatbotVotingEnabled: O,
|
|
2583
|
-
renderChannelBanner:
|
|
2583
|
+
renderChannelBanner: R,
|
|
2584
2584
|
renderHeaderTitleBadges: L,
|
|
2585
|
-
customChannelActions:
|
|
2586
|
-
renderChannelActions:
|
|
2587
|
-
renderMessage:
|
|
2588
|
-
viewerLanguage:
|
|
2589
|
-
showChannelInfo:
|
|
2590
|
-
onParticipantNameClick:
|
|
2591
|
-
composerInput:
|
|
2585
|
+
customChannelActions: B,
|
|
2586
|
+
renderChannelActions: P,
|
|
2587
|
+
renderMessage: _,
|
|
2588
|
+
viewerLanguage: C,
|
|
2589
|
+
showChannelInfo: z,
|
|
2590
|
+
onParticipantNameClick: D,
|
|
2591
|
+
composerInput: j
|
|
2592
2592
|
}
|
|
2593
2593
|
)
|
|
2594
2594
|
}
|
|
@@ -2598,7 +2598,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2598
2598
|
}
|
|
2599
2599
|
);
|
|
2600
2600
|
mn.displayName = "ChannelView";
|
|
2601
|
-
const xe =
|
|
2601
|
+
const xe = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
2602
2602
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
2603
2603
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2604
2604
|
/* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -2620,86 +2620,86 @@ const Ei = ({
|
|
|
2620
2620
|
onChannelSelect: a,
|
|
2621
2621
|
onExitConversation: r,
|
|
2622
2622
|
initialParticipantFilter: i,
|
|
2623
|
-
initialParticipantData:
|
|
2624
|
-
CustomChannelEmptyState:
|
|
2623
|
+
initialParticipantData: l,
|
|
2624
|
+
CustomChannelEmptyState: o,
|
|
2625
2625
|
onBlockParticipantClick: d,
|
|
2626
|
-
onReportParticipantClick:
|
|
2626
|
+
onReportParticipantClick: u,
|
|
2627
2627
|
dmAgentEnabled: g,
|
|
2628
|
-
onMessageSent:
|
|
2628
|
+
onMessageSent: m,
|
|
2629
2629
|
chatbotVotingEnabled: f = !1,
|
|
2630
2630
|
viewerLanguage: c,
|
|
2631
|
-
renderHeaderTitleBadges:
|
|
2631
|
+
renderHeaderTitleBadges: b,
|
|
2632
2632
|
renderChannelBanner: N,
|
|
2633
2633
|
customChannelActions: w,
|
|
2634
|
-
renderChannelActions:
|
|
2634
|
+
renderChannelActions: p,
|
|
2635
2635
|
onParticipantNameClick: v,
|
|
2636
|
-
renderMessage:
|
|
2636
|
+
renderMessage: A,
|
|
2637
2637
|
onMessageLinkClick: T,
|
|
2638
|
-
showChannelInfo:
|
|
2638
|
+
showChannelInfo: E,
|
|
2639
2639
|
composerInput: O
|
|
2640
2640
|
}) => {
|
|
2641
2641
|
const {
|
|
2642
|
-
client:
|
|
2642
|
+
client: R,
|
|
2643
2643
|
isConnected: L,
|
|
2644
|
-
isLoading:
|
|
2645
|
-
error:
|
|
2646
|
-
refreshConnection:
|
|
2647
|
-
service:
|
|
2648
|
-
debug:
|
|
2649
|
-
} = zs(), [
|
|
2650
|
-
G.current =
|
|
2644
|
+
isLoading: B,
|
|
2645
|
+
error: P,
|
|
2646
|
+
refreshConnection: _,
|
|
2647
|
+
service: M,
|
|
2648
|
+
debug: y
|
|
2649
|
+
} = zs(), [I, C] = $(null), [z, D] = $(null), [j, Z] = $(!1), { showDeleteConversation: Q = !0 } = e, G = Y(l);
|
|
2650
|
+
G.current = l;
|
|
2651
2651
|
const x = Y(a);
|
|
2652
2652
|
x.current = a;
|
|
2653
|
-
const
|
|
2653
|
+
const S = Y(null), U = Y(null);
|
|
2654
2654
|
K(() => {
|
|
2655
|
-
U.current =
|
|
2656
|
-
}, [
|
|
2657
|
-
if (!
|
|
2658
|
-
const
|
|
2659
|
-
if (!
|
|
2660
|
-
const W = `${
|
|
2661
|
-
if (
|
|
2662
|
-
|
|
2655
|
+
U.current = I;
|
|
2656
|
+
}, [I]), K(() => {
|
|
2657
|
+
if (!R || !L) return;
|
|
2658
|
+
const F = R.userID;
|
|
2659
|
+
if (!F) return;
|
|
2660
|
+
const W = `${F}::${i}`;
|
|
2661
|
+
if (S.current === W) return;
|
|
2662
|
+
S.current = W;
|
|
2663
2663
|
const X = () => {
|
|
2664
|
-
|
|
2664
|
+
S.current === W && (S.current = null);
|
|
2665
2665
|
};
|
|
2666
2666
|
(async () => {
|
|
2667
2667
|
var me, he;
|
|
2668
2668
|
try {
|
|
2669
|
-
|
|
2669
|
+
y && console.log(
|
|
2670
2670
|
"[MessagingShell] Loading initial conversation with:",
|
|
2671
2671
|
i
|
|
2672
2672
|
);
|
|
2673
|
-
const
|
|
2673
|
+
const ee = await R.queryChannels(
|
|
2674
2674
|
{
|
|
2675
2675
|
type: "messaging",
|
|
2676
|
-
members: { $eq: [
|
|
2676
|
+
members: { $eq: [F, i] }
|
|
2677
2677
|
},
|
|
2678
2678
|
{},
|
|
2679
2679
|
{ limit: 1 }
|
|
2680
2680
|
);
|
|
2681
|
-
if (
|
|
2682
|
-
|
|
2681
|
+
if (ee.length > 0) {
|
|
2682
|
+
C(ee[0]), D(null), (me = x.current) == null || me.call(x, ee[0]), y && console.log(
|
|
2683
2683
|
"[MessagingShell] Initial conversation loaded:",
|
|
2684
|
-
|
|
2684
|
+
ee[0].id
|
|
2685
2685
|
);
|
|
2686
2686
|
return;
|
|
2687
2687
|
}
|
|
2688
2688
|
const te = G.current;
|
|
2689
|
-
if (!te || !
|
|
2690
|
-
X(),
|
|
2689
|
+
if (!te || !M) {
|
|
2690
|
+
X(), D("No conversation found with this account"), y && console.log(
|
|
2691
2691
|
"[MessagingShell] No conversation found for:",
|
|
2692
2692
|
i
|
|
2693
2693
|
);
|
|
2694
2694
|
return;
|
|
2695
2695
|
}
|
|
2696
2696
|
try {
|
|
2697
|
-
const le = await
|
|
2697
|
+
const le = await M.startChannelWithParticipant({
|
|
2698
2698
|
id: te.id,
|
|
2699
2699
|
name: te.name,
|
|
2700
2700
|
phone: te.phone
|
|
2701
2701
|
});
|
|
2702
|
-
|
|
2702
|
+
C(le), D(null), (he = x.current) == null || he.call(x, le), y && console.log(
|
|
2703
2703
|
"[MessagingShell] Channel created and loaded:",
|
|
2704
2704
|
le.id
|
|
2705
2705
|
);
|
|
@@ -2707,55 +2707,55 @@ const Ei = ({
|
|
|
2707
2707
|
console.error(
|
|
2708
2708
|
"[MessagingShell] Failed to create conversation:",
|
|
2709
2709
|
le
|
|
2710
|
-
), X(),
|
|
2710
|
+
), X(), D("Failed to create conversation");
|
|
2711
2711
|
}
|
|
2712
|
-
} catch (
|
|
2712
|
+
} catch (ee) {
|
|
2713
2713
|
console.error(
|
|
2714
2714
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2715
|
-
|
|
2716
|
-
), X(), U.current ||
|
|
2715
|
+
ee
|
|
2716
|
+
), X(), U.current || D("Failed to load conversation");
|
|
2717
2717
|
}
|
|
2718
2718
|
})();
|
|
2719
|
-
}, [i,
|
|
2719
|
+
}, [i, R, L, M, y]);
|
|
2720
2720
|
const H = Y(r);
|
|
2721
2721
|
H.current = r;
|
|
2722
2722
|
const q = J(() => {
|
|
2723
|
-
var
|
|
2724
|
-
|
|
2723
|
+
var F;
|
|
2724
|
+
C(null), Z(!0), (F = H.current) == null || F.call(H);
|
|
2725
2725
|
}, []);
|
|
2726
|
-
return
|
|
2726
|
+
return B ? /* @__PURE__ */ n(Re, {}) : P ? /* @__PURE__ */ n(xe, { message: P, onBack: _ }) : !L || !R ? /* @__PURE__ */ n(
|
|
2727
2727
|
xe,
|
|
2728
2728
|
{
|
|
2729
2729
|
message: "Not connected to messaging service",
|
|
2730
|
-
onBack:
|
|
2730
|
+
onBack: _
|
|
2731
2731
|
}
|
|
2732
|
-
) :
|
|
2732
|
+
) : z ? /* @__PURE__ */ n(xe, { message: z }) : j && !I ? /* @__PURE__ */ n(xe, { message: "Conversation ended" }) : I ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
2733
2733
|
mn,
|
|
2734
2734
|
{
|
|
2735
|
-
channel:
|
|
2735
|
+
channel: I,
|
|
2736
2736
|
renderMessageInputActions: t,
|
|
2737
2737
|
renderConversationFooter: s,
|
|
2738
2738
|
renderChannelBanner: N,
|
|
2739
2739
|
onLeaveConversation: q,
|
|
2740
2740
|
onBlockParticipant: q,
|
|
2741
|
-
CustomChannelEmptyState:
|
|
2742
|
-
showDeleteConversation:
|
|
2741
|
+
CustomChannelEmptyState: o,
|
|
2742
|
+
showDeleteConversation: Q,
|
|
2743
2743
|
onBlockParticipantClick: d,
|
|
2744
|
-
onReportParticipantClick:
|
|
2744
|
+
onReportParticipantClick: u,
|
|
2745
2745
|
dmAgentEnabled: g,
|
|
2746
|
-
onMessageSent:
|
|
2746
|
+
onMessageSent: m,
|
|
2747
2747
|
chatbotVotingEnabled: f,
|
|
2748
2748
|
viewerLanguage: c,
|
|
2749
|
-
renderHeaderTitleBadges:
|
|
2749
|
+
renderHeaderTitleBadges: b,
|
|
2750
2750
|
customChannelActions: w,
|
|
2751
|
-
renderChannelActions:
|
|
2751
|
+
renderChannelActions: p,
|
|
2752
2752
|
onParticipantNameClick: v,
|
|
2753
|
-
renderMessage:
|
|
2753
|
+
renderMessage: A,
|
|
2754
2754
|
onMessageLinkClick: T,
|
|
2755
|
-
showChannelInfo:
|
|
2755
|
+
showChannelInfo: E,
|
|
2756
2756
|
composerInput: O
|
|
2757
2757
|
},
|
|
2758
|
-
|
|
2758
|
+
I.id
|
|
2759
2759
|
) }) }) : /* @__PURE__ */ n(Re, {});
|
|
2760
2760
|
};
|
|
2761
2761
|
function Qa(e) {
|
|
@@ -2764,14 +2764,15 @@ function Qa(e) {
|
|
|
2764
2764
|
for (const s of t)
|
|
2765
2765
|
e.state.addMessageSorted(s.message);
|
|
2766
2766
|
}
|
|
2767
|
-
const hn =
|
|
2767
|
+
const hn = V.createContext({
|
|
2768
2768
|
selectedChannel: void 0,
|
|
2769
2769
|
onChannelSelect: () => {
|
|
2770
2770
|
},
|
|
2771
2771
|
debug: !1,
|
|
2772
2772
|
renderMessagePreview: void 0,
|
|
2773
|
+
channelPreview: void 0,
|
|
2773
2774
|
viewerLanguage: void 0
|
|
2774
|
-
}), er = hn.Provider, tr = () =>
|
|
2775
|
+
}), er = hn.Provider, tr = () => V.useContext(hn), nr = (e, t) => {
|
|
2775
2776
|
const s = new Date(
|
|
2776
2777
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2777
2778
|
), r = new Date(
|
|
@@ -2792,64 +2793,76 @@ const hn = j.createContext({
|
|
|
2792
2793
|
day: "numeric",
|
|
2793
2794
|
year: "2-digit"
|
|
2794
2795
|
});
|
|
2795
|
-
}, fn =
|
|
2796
|
-
(
|
|
2797
|
-
var
|
|
2798
|
-
const {
|
|
2799
|
-
selectedChannel:
|
|
2800
|
-
onChannelSelect:
|
|
2801
|
-
debug:
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2796
|
+
}, fn = V.memo(
|
|
2797
|
+
(e) => {
|
|
2798
|
+
var L, B, P;
|
|
2799
|
+
const { channel: t, unread: s } = e, {
|
|
2800
|
+
selectedChannel: a,
|
|
2801
|
+
onChannelSelect: r,
|
|
2802
|
+
debug: i,
|
|
2803
|
+
channelPreview: l,
|
|
2804
|
+
renderMessagePreview: o,
|
|
2805
|
+
viewerLanguage: d
|
|
2806
|
+
} = tr(), u = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), g = Kt(t);
|
|
2807
|
+
if (l)
|
|
2808
|
+
return /* @__PURE__ */ n(
|
|
2809
|
+
l,
|
|
2810
|
+
{
|
|
2811
|
+
...e,
|
|
2812
|
+
isSelected: u,
|
|
2813
|
+
selectedChannel: a,
|
|
2814
|
+
onChannelSelect: r
|
|
2815
|
+
}
|
|
2816
|
+
);
|
|
2817
|
+
const m = () => {
|
|
2818
|
+
t && r(t);
|
|
2819
|
+
}, f = (_) => {
|
|
2820
|
+
const M = _.key === "Enter" || _.key === " ", y = _.repeat;
|
|
2821
|
+
!M || y || (_.preventDefault(), m());
|
|
2822
|
+
}, b = Object.values(((L = t == null ? void 0 : t.state) == null ? void 0 : L.members) || {}).find(
|
|
2823
|
+
(_) => {
|
|
2824
|
+
var M, y;
|
|
2825
|
+
return ((M = _.user) == null ? void 0 : M.id) && _.user.id !== ((y = t == null ? void 0 : t._client) == null ? void 0 : y.userID);
|
|
2813
2826
|
}
|
|
2814
|
-
),
|
|
2815
|
-
var
|
|
2816
|
-
const
|
|
2817
|
-
if (
|
|
2818
|
-
for (let
|
|
2819
|
-
if (
|
|
2827
|
+
), N = Jt(b == null ? void 0 : b.user), w = (B = b == null ? void 0 : b.user) == null ? void 0 : B.image, p = (() => {
|
|
2828
|
+
var M;
|
|
2829
|
+
const _ = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
|
|
2830
|
+
if (_ != null && _.length) {
|
|
2831
|
+
for (let y = _.length - 1; y >= 0; y--)
|
|
2832
|
+
if (_[y].type !== "system") return _[y];
|
|
2820
2833
|
}
|
|
2821
|
-
})(),
|
|
2822
|
-
var
|
|
2823
|
-
const
|
|
2834
|
+
})(), A = (() => {
|
|
2835
|
+
var z, D, j, Z;
|
|
2836
|
+
const _ = Zt({
|
|
2824
2837
|
message: p,
|
|
2825
|
-
viewerLanguage:
|
|
2838
|
+
viewerLanguage: d
|
|
2826
2839
|
});
|
|
2827
|
-
if (((
|
|
2828
|
-
if (((
|
|
2829
|
-
if (((
|
|
2830
|
-
return
|
|
2831
|
-
if (
|
|
2832
|
-
const
|
|
2833
|
-
return
|
|
2834
|
-
})(),
|
|
2835
|
-
return
|
|
2836
|
-
channelId:
|
|
2837
|
-
isSelected:
|
|
2838
|
-
participantName:
|
|
2839
|
-
unreadCount:
|
|
2840
|
-
hasTimestamp: !!
|
|
2840
|
+
if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
|
|
2841
|
+
if (((D = p == null ? void 0 : p.metadata) == null ? void 0 : D.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
|
|
2842
|
+
if (((j = p == null ? void 0 : p.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
|
|
2843
|
+
return _ ? `📎 ${_}` : "📎 Sent an attachment";
|
|
2844
|
+
if (_) return _;
|
|
2845
|
+
const C = (Z = p == null ? void 0 : p.attachments) == null ? void 0 : Z[0];
|
|
2846
|
+
return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2847
|
+
})(), T = p != null && p.created_at ? sr(new Date(p.created_at)) : "", E = p ? Me(p) : !1, O = o ? o(p, A) : `${E ? "✨ " : ""}${A}`, R = s ?? 0;
|
|
2848
|
+
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2849
|
+
channelId: t == null ? void 0 : t.id,
|
|
2850
|
+
isSelected: u,
|
|
2851
|
+
participantName: N,
|
|
2852
|
+
unreadCount: R,
|
|
2853
|
+
hasTimestamp: !!T
|
|
2841
2854
|
}), /* @__PURE__ */ n(
|
|
2842
2855
|
"div",
|
|
2843
2856
|
{
|
|
2844
2857
|
role: "button",
|
|
2845
2858
|
tabIndex: 0,
|
|
2846
|
-
onClick:
|
|
2847
|
-
onKeyDown:
|
|
2848
|
-
className:
|
|
2859
|
+
onClick: m,
|
|
2860
|
+
onKeyDown: f,
|
|
2861
|
+
className: k(
|
|
2849
2862
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
2850
2863
|
{
|
|
2851
|
-
"bg-black/[0.04]":
|
|
2852
|
-
"hover:bg-black/[0.02]": !
|
|
2864
|
+
"bg-black/[0.04]": u,
|
|
2865
|
+
"hover:bg-black/[0.02]": !u
|
|
2853
2866
|
}
|
|
2854
2867
|
),
|
|
2855
2868
|
"data-dd-privacy": "mask",
|
|
@@ -2857,11 +2870,11 @@ const hn = j.createContext({
|
|
|
2857
2870
|
/* @__PURE__ */ n(
|
|
2858
2871
|
ne,
|
|
2859
2872
|
{
|
|
2860
|
-
id: ((
|
|
2861
|
-
name:
|
|
2862
|
-
image:
|
|
2873
|
+
id: ((P = b == null ? void 0 : b.user) == null ? void 0 : P.id) || t.id || "unknown",
|
|
2874
|
+
name: N,
|
|
2875
|
+
image: w,
|
|
2863
2876
|
size: 48,
|
|
2864
|
-
starred:
|
|
2877
|
+
starred: g
|
|
2865
2878
|
}
|
|
2866
2879
|
),
|
|
2867
2880
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
@@ -2869,20 +2882,20 @@ const hn = j.createContext({
|
|
|
2869
2882
|
/* @__PURE__ */ h(
|
|
2870
2883
|
"h3",
|
|
2871
2884
|
{
|
|
2872
|
-
className:
|
|
2885
|
+
className: k(
|
|
2873
2886
|
"text-sm font-medium truncate text-[#191918]"
|
|
2874
2887
|
),
|
|
2875
2888
|
children: [
|
|
2876
|
-
|
|
2877
|
-
|
|
2889
|
+
g && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
2890
|
+
N
|
|
2878
2891
|
]
|
|
2879
2892
|
}
|
|
2880
2893
|
),
|
|
2881
|
-
|
|
2894
|
+
T && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: T })
|
|
2882
2895
|
] }),
|
|
2883
2896
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2884
|
-
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
2885
|
-
|
|
2897
|
+
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: O }),
|
|
2898
|
+
R > 0 && /* @__PURE__ */ n("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: R > 99 ? "99+" : R })
|
|
2886
2899
|
] })
|
|
2887
2900
|
] })
|
|
2888
2901
|
] })
|
|
@@ -2891,7 +2904,7 @@ const hn = j.createContext({
|
|
|
2891
2904
|
}
|
|
2892
2905
|
);
|
|
2893
2906
|
fn.displayName = "CustomChannelPreview";
|
|
2894
|
-
const ar = { last_message_at: -1 }, rr =
|
|
2907
|
+
const ar = { last_message_at: -1 }, rr = V.memo(
|
|
2895
2908
|
({
|
|
2896
2909
|
onChannelSelect: e,
|
|
2897
2910
|
selectedChannel: t,
|
|
@@ -2899,15 +2912,15 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2899
2912
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
2900
2913
|
channelRenderFilterFn: r,
|
|
2901
2914
|
sort: i = ar,
|
|
2902
|
-
className:
|
|
2903
|
-
customEmptyStateIndicator:
|
|
2915
|
+
className: l,
|
|
2916
|
+
customEmptyStateIndicator: o,
|
|
2904
2917
|
channelPreview: d,
|
|
2905
|
-
renderMessagePreview:
|
|
2918
|
+
renderMessagePreview: u,
|
|
2906
2919
|
viewerLanguage: g
|
|
2907
2920
|
}) => {
|
|
2908
|
-
const
|
|
2909
|
-
|
|
2910
|
-
const { debug: f = !1 } = Je(), c =
|
|
2921
|
+
const m = V.useRef(0);
|
|
2922
|
+
m.current++;
|
|
2923
|
+
const { debug: f = !1 } = Je(), c = V.useCallback(
|
|
2911
2924
|
(N) => {
|
|
2912
2925
|
for (const w of N)
|
|
2913
2926
|
Qa(w);
|
|
@@ -2916,34 +2929,36 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2916
2929
|
[r]
|
|
2917
2930
|
);
|
|
2918
2931
|
f && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
2919
|
-
renderCount:
|
|
2932
|
+
renderCount: m.current,
|
|
2920
2933
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
2921
2934
|
filters: s
|
|
2922
2935
|
});
|
|
2923
|
-
const
|
|
2936
|
+
const b = V.useMemo(
|
|
2924
2937
|
() => ({
|
|
2925
2938
|
selectedChannel: t,
|
|
2926
2939
|
onChannelSelect: e,
|
|
2927
2940
|
debug: f,
|
|
2928
|
-
|
|
2941
|
+
channelPreview: d,
|
|
2942
|
+
renderMessagePreview: u,
|
|
2929
2943
|
viewerLanguage: g
|
|
2930
2944
|
}),
|
|
2931
2945
|
[
|
|
2932
2946
|
t,
|
|
2933
2947
|
e,
|
|
2934
2948
|
f,
|
|
2935
|
-
|
|
2949
|
+
d,
|
|
2950
|
+
u,
|
|
2936
2951
|
g
|
|
2937
2952
|
]
|
|
2938
2953
|
);
|
|
2939
2954
|
return /* @__PURE__ */ n(
|
|
2940
2955
|
"div",
|
|
2941
2956
|
{
|
|
2942
|
-
className:
|
|
2957
|
+
className: k(
|
|
2943
2958
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2944
|
-
|
|
2959
|
+
l
|
|
2945
2960
|
),
|
|
2946
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value:
|
|
2961
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: b, children: /* @__PURE__ */ n(
|
|
2947
2962
|
us,
|
|
2948
2963
|
{
|
|
2949
2964
|
filters: s,
|
|
@@ -2952,8 +2967,8 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2952
2967
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
2953
2968
|
channelRenderFilterFn: c,
|
|
2954
2969
|
Paginator: ms,
|
|
2955
|
-
Preview:
|
|
2956
|
-
EmptyStateIndicator:
|
|
2970
|
+
Preview: fn,
|
|
2971
|
+
EmptyStateIndicator: o
|
|
2957
2972
|
},
|
|
2958
2973
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
2959
2974
|
) }) })
|
|
@@ -2978,7 +2993,7 @@ const or = {
|
|
|
2978
2993
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2979
2994
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2980
2995
|
}, cr = ({ variant: e, cta: t }) => {
|
|
2981
|
-
const s =
|
|
2996
|
+
const s = k(
|
|
2982
2997
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2983
2998
|
or[e]
|
|
2984
2999
|
), a = at(t.href);
|
|
@@ -3020,15 +3035,15 @@ const or = {
|
|
|
3020
3035
|
description: a,
|
|
3021
3036
|
url: r,
|
|
3022
3037
|
appIcon: i,
|
|
3023
|
-
cta:
|
|
3024
|
-
trailingAction:
|
|
3038
|
+
cta: l,
|
|
3039
|
+
trailingAction: o
|
|
3025
3040
|
}) => {
|
|
3026
|
-
const d = e === "dark",
|
|
3027
|
-
if (!g && !
|
|
3028
|
-
const w =
|
|
3041
|
+
const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", m = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = l != null;
|
|
3042
|
+
if (!g && !m && !c && !b) return null;
|
|
3043
|
+
const w = k(
|
|
3029
3044
|
"truncate text-base font-medium leading-6",
|
|
3030
3045
|
d && !t ? ur : dr[e]
|
|
3031
|
-
),
|
|
3046
|
+
), p = k(
|
|
3032
3047
|
"truncate text-xs leading-4",
|
|
3033
3048
|
mr[e]
|
|
3034
3049
|
);
|
|
@@ -3038,17 +3053,17 @@ const or = {
|
|
|
3038
3053
|
/* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
3039
3054
|
g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
3040
3055
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
3041
|
-
/* @__PURE__ */ n("p", { className:
|
|
3056
|
+
/* @__PURE__ */ n("p", { className: k("min-w-0", w), children: u })
|
|
3042
3057
|
] }),
|
|
3043
|
-
|
|
3058
|
+
m && /* @__PURE__ */ n("p", { className: p, children: a })
|
|
3044
3059
|
] }),
|
|
3045
|
-
!
|
|
3060
|
+
!b && c && /* @__PURE__ */ n("p", { className: p, children: f })
|
|
3046
3061
|
] }),
|
|
3047
|
-
|
|
3062
|
+
o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
|
|
3048
3063
|
] }),
|
|
3049
|
-
|
|
3064
|
+
l && /* @__PURE__ */ n(cr, { variant: e, cta: l })
|
|
3050
3065
|
] });
|
|
3051
|
-
}, hr =
|
|
3066
|
+
}, hr = k(
|
|
3052
3067
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
3053
3068
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
3054
3069
|
// the messaging design system's "small border around link attachments"
|
|
@@ -3062,18 +3077,18 @@ const or = {
|
|
|
3062
3077
|
onClick: a,
|
|
3063
3078
|
ariaLabel: r,
|
|
3064
3079
|
rootRef: i,
|
|
3065
|
-
topRight:
|
|
3066
|
-
bgClassName:
|
|
3080
|
+
topRight: l,
|
|
3081
|
+
bgClassName: o,
|
|
3067
3082
|
"data-testid": d
|
|
3068
3083
|
}) => {
|
|
3069
|
-
const
|
|
3084
|
+
const u = s != null || a != null, g = k(
|
|
3070
3085
|
hr,
|
|
3071
|
-
|
|
3086
|
+
o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
3072
3087
|
// `focus-ring` is a design-system utility from the component-library
|
|
3073
3088
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
3074
3089
|
// with offset, so keyboard users can see the focused card.
|
|
3075
|
-
|
|
3076
|
-
),
|
|
3090
|
+
u ? "cursor-pointer no-underline focus-ring" : null
|
|
3091
|
+
), m = l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
|
|
3077
3092
|
return s ? /* @__PURE__ */ h(
|
|
3078
3093
|
"a",
|
|
3079
3094
|
{
|
|
@@ -3086,7 +3101,7 @@ const or = {
|
|
|
3086
3101
|
className: g,
|
|
3087
3102
|
children: [
|
|
3088
3103
|
t,
|
|
3089
|
-
|
|
3104
|
+
m
|
|
3090
3105
|
]
|
|
3091
3106
|
}
|
|
3092
3107
|
) : a ? /* @__PURE__ */ h(
|
|
@@ -3097,10 +3112,10 @@ const or = {
|
|
|
3097
3112
|
onClick: a,
|
|
3098
3113
|
"aria-label": r,
|
|
3099
3114
|
"data-testid": d,
|
|
3100
|
-
className:
|
|
3115
|
+
className: k(g, "text-left"),
|
|
3101
3116
|
children: [
|
|
3102
3117
|
t,
|
|
3103
|
-
|
|
3118
|
+
m
|
|
3104
3119
|
]
|
|
3105
3120
|
}
|
|
3106
3121
|
) : /* @__PURE__ */ h(
|
|
@@ -3111,7 +3126,7 @@ const or = {
|
|
|
3111
3126
|
className: g,
|
|
3112
3127
|
children: [
|
|
3113
3128
|
t,
|
|
3114
|
-
|
|
3129
|
+
m
|
|
3115
3130
|
]
|
|
3116
3131
|
}
|
|
3117
3132
|
);
|
|
@@ -3132,9 +3147,9 @@ const or = {
|
|
|
3132
3147
|
title: a,
|
|
3133
3148
|
mimeType: r = "image/*",
|
|
3134
3149
|
topLeft: i,
|
|
3135
|
-
topRight:
|
|
3150
|
+
topRight: l
|
|
3136
3151
|
}) => {
|
|
3137
|
-
const
|
|
3152
|
+
const o = ie(r), d = !!s && o === "video";
|
|
3138
3153
|
return ze(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3139
3154
|
"audio",
|
|
3140
3155
|
{
|
|
@@ -3147,7 +3162,7 @@ const or = {
|
|
|
3147
3162
|
) }) : /* @__PURE__ */ h(
|
|
3148
3163
|
"div",
|
|
3149
3164
|
{
|
|
3150
|
-
className:
|
|
3165
|
+
className: k(
|
|
3151
3166
|
"relative h-[180px] w-full overflow-hidden",
|
|
3152
3167
|
d && "bg-black"
|
|
3153
3168
|
),
|
|
@@ -3174,7 +3189,7 @@ const or = {
|
|
|
3174
3189
|
) : /* @__PURE__ */ n(
|
|
3175
3190
|
"div",
|
|
3176
3191
|
{
|
|
3177
|
-
className:
|
|
3192
|
+
className: k(
|
|
3178
3193
|
"flex h-full w-full items-center justify-center",
|
|
3179
3194
|
fr[e]
|
|
3180
3195
|
),
|
|
@@ -3185,7 +3200,7 @@ const or = {
|
|
|
3185
3200
|
}
|
|
3186
3201
|
),
|
|
3187
3202
|
i ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-10", children: i }) : null,
|
|
3188
|
-
|
|
3203
|
+
l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null
|
|
3189
3204
|
]
|
|
3190
3205
|
}
|
|
3191
3206
|
);
|
|
@@ -3196,14 +3211,14 @@ const or = {
|
|
|
3196
3211
|
url: a,
|
|
3197
3212
|
mimeType: r,
|
|
3198
3213
|
thumbnailUrl: i,
|
|
3199
|
-
sourceUrl:
|
|
3200
|
-
layout:
|
|
3214
|
+
sourceUrl: l,
|
|
3215
|
+
layout: o = "featured",
|
|
3201
3216
|
appIcon: d,
|
|
3202
|
-
cta:
|
|
3217
|
+
cta: u,
|
|
3203
3218
|
onDismiss: g,
|
|
3204
|
-
onEditClick:
|
|
3219
|
+
onEditClick: m
|
|
3205
3220
|
}) => {
|
|
3206
|
-
const f =
|
|
3221
|
+
const f = o === "classic", c = ze(r, l), b = g ? /* @__PURE__ */ n(
|
|
3207
3222
|
"button",
|
|
3208
3223
|
{
|
|
3209
3224
|
type: "button",
|
|
@@ -3212,11 +3227,11 @@ const or = {
|
|
|
3212
3227
|
className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
|
|
3213
3228
|
children: /* @__PURE__ */ n(Pe, { className: "size-3", weight: "bold" })
|
|
3214
3229
|
}
|
|
3215
|
-
) : void 0, N =
|
|
3230
|
+
) : void 0, N = m ? /* @__PURE__ */ n(
|
|
3216
3231
|
"button",
|
|
3217
3232
|
{
|
|
3218
3233
|
type: "button",
|
|
3219
|
-
onClick:
|
|
3234
|
+
onClick: m,
|
|
3220
3235
|
"aria-label": "Edit attachment",
|
|
3221
3236
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3222
3237
|
children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
|
|
@@ -3227,27 +3242,27 @@ const or = {
|
|
|
3227
3242
|
De,
|
|
3228
3243
|
{
|
|
3229
3244
|
variant: "dark",
|
|
3230
|
-
sourceUrl:
|
|
3245
|
+
sourceUrl: l,
|
|
3231
3246
|
title: e,
|
|
3232
3247
|
mimeType: r
|
|
3233
3248
|
}
|
|
3234
3249
|
) }),
|
|
3235
|
-
|
|
3250
|
+
b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
|
|
3236
3251
|
] }) }) : /* @__PURE__ */ h(
|
|
3237
3252
|
Le,
|
|
3238
3253
|
{
|
|
3239
3254
|
variant: "dark",
|
|
3240
|
-
topRight: f ?
|
|
3255
|
+
topRight: f ? b : void 0,
|
|
3241
3256
|
children: [
|
|
3242
3257
|
!f && /* @__PURE__ */ n(
|
|
3243
3258
|
De,
|
|
3244
3259
|
{
|
|
3245
3260
|
variant: "dark",
|
|
3246
3261
|
thumbnailUrl: i,
|
|
3247
|
-
sourceUrl:
|
|
3262
|
+
sourceUrl: l,
|
|
3248
3263
|
title: e,
|
|
3249
3264
|
mimeType: r,
|
|
3250
|
-
topRight:
|
|
3265
|
+
topRight: b
|
|
3251
3266
|
}
|
|
3252
3267
|
),
|
|
3253
3268
|
/* @__PURE__ */ n(
|
|
@@ -3259,7 +3274,7 @@ const or = {
|
|
|
3259
3274
|
description: s,
|
|
3260
3275
|
url: a,
|
|
3261
3276
|
appIcon: d,
|
|
3262
|
-
cta:
|
|
3277
|
+
cta: u,
|
|
3263
3278
|
trailingAction: N
|
|
3264
3279
|
}
|
|
3265
3280
|
)
|
|
@@ -3273,16 +3288,16 @@ const or = {
|
|
|
3273
3288
|
mimeType: a,
|
|
3274
3289
|
thumbnailUrl: r,
|
|
3275
3290
|
sourceUrl: i,
|
|
3276
|
-
layout:
|
|
3277
|
-
appIcon:
|
|
3291
|
+
layout: l = "featured",
|
|
3292
|
+
appIcon: o,
|
|
3278
3293
|
cta: d,
|
|
3279
|
-
onClick:
|
|
3294
|
+
onClick: u
|
|
3280
3295
|
}) => {
|
|
3281
|
-
const g = gn(a, i),
|
|
3296
|
+
const g = gn(a, i), m = at(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = ze(a, i) ? it : void 0, N = d && u ? {
|
|
3282
3297
|
...d,
|
|
3283
3298
|
onClick: () => {
|
|
3284
3299
|
var w;
|
|
3285
|
-
|
|
3300
|
+
u(), (w = d.onClick) == null || w.call(d);
|
|
3286
3301
|
}
|
|
3287
3302
|
} : d;
|
|
3288
3303
|
return /* @__PURE__ */ h(
|
|
@@ -3292,10 +3307,10 @@ const or = {
|
|
|
3292
3307
|
href: f,
|
|
3293
3308
|
onClick: c,
|
|
3294
3309
|
ariaLabel: e ?? "Open attachment preview",
|
|
3295
|
-
bgClassName:
|
|
3310
|
+
bgClassName: b,
|
|
3296
3311
|
"data-testid": "link-attachment",
|
|
3297
3312
|
children: [
|
|
3298
|
-
|
|
3313
|
+
l === "featured" && /* @__PURE__ */ n(
|
|
3299
3314
|
De,
|
|
3300
3315
|
{
|
|
3301
3316
|
variant: "light",
|
|
@@ -3312,7 +3327,7 @@ const or = {
|
|
|
3312
3327
|
title: e,
|
|
3313
3328
|
description: t,
|
|
3314
3329
|
url: s,
|
|
3315
|
-
appIcon:
|
|
3330
|
+
appIcon: o,
|
|
3316
3331
|
cta: N
|
|
3317
3332
|
}
|
|
3318
3333
|
)
|
|
@@ -3326,27 +3341,27 @@ const or = {
|
|
|
3326
3341
|
url: a,
|
|
3327
3342
|
mimeType: r,
|
|
3328
3343
|
thumbnailUrl: i,
|
|
3329
|
-
sourceUrl:
|
|
3330
|
-
layout:
|
|
3344
|
+
sourceUrl: l,
|
|
3345
|
+
layout: o = "featured",
|
|
3331
3346
|
appIcon: d,
|
|
3332
|
-
cta:
|
|
3347
|
+
cta: u,
|
|
3333
3348
|
onClick: g
|
|
3334
3349
|
}) => {
|
|
3335
|
-
const
|
|
3350
|
+
const m = gn(r, l), f = at(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
|
|
3336
3351
|
return /* @__PURE__ */ h(
|
|
3337
3352
|
Le,
|
|
3338
3353
|
{
|
|
3339
3354
|
variant: "dark",
|
|
3340
3355
|
href: c,
|
|
3341
|
-
onClick:
|
|
3342
|
-
bgClassName: ze(r,
|
|
3356
|
+
onClick: b,
|
|
3357
|
+
bgClassName: ze(r, l) ? it : void 0,
|
|
3343
3358
|
children: [
|
|
3344
|
-
|
|
3359
|
+
o === "featured" && /* @__PURE__ */ n(
|
|
3345
3360
|
De,
|
|
3346
3361
|
{
|
|
3347
3362
|
variant: "dark",
|
|
3348
3363
|
thumbnailUrl: i,
|
|
3349
|
-
sourceUrl:
|
|
3364
|
+
sourceUrl: l,
|
|
3350
3365
|
title: e,
|
|
3351
3366
|
mimeType: r
|
|
3352
3367
|
}
|
|
@@ -3360,7 +3375,7 @@ const or = {
|
|
|
3360
3375
|
description: s,
|
|
3361
3376
|
url: a,
|
|
3362
3377
|
appIcon: d,
|
|
3363
|
-
cta:
|
|
3378
|
+
cta: u
|
|
3364
3379
|
}
|
|
3365
3380
|
)
|
|
3366
3381
|
]
|
|
@@ -3399,15 +3414,15 @@ const or = {
|
|
|
3399
3414
|
groupPosition: a = "single",
|
|
3400
3415
|
className: r,
|
|
3401
3416
|
children: i,
|
|
3402
|
-
"data-testid":
|
|
3417
|
+
"data-testid": l
|
|
3403
3418
|
}) => {
|
|
3404
|
-
const
|
|
3419
|
+
const o = t != null && t !== "", d = yr[_r(e)][a];
|
|
3405
3420
|
return /* @__PURE__ */ h(
|
|
3406
3421
|
"div",
|
|
3407
3422
|
{
|
|
3408
|
-
"data-testid":
|
|
3423
|
+
"data-testid": l,
|
|
3409
3424
|
"data-group-position": a,
|
|
3410
|
-
className:
|
|
3425
|
+
className: k(
|
|
3411
3426
|
// 280px-wide bubble — matches the mobile chat attachment width
|
|
3412
3427
|
// and keeps the document / image / audio bubbles visually
|
|
3413
3428
|
// consistent inside the conversation timeline. The 8px / 16px
|
|
@@ -3424,10 +3439,10 @@ const or = {
|
|
|
3424
3439
|
),
|
|
3425
3440
|
children: [
|
|
3426
3441
|
i,
|
|
3427
|
-
|
|
3442
|
+
o ? /* @__PURE__ */ n(
|
|
3428
3443
|
"p",
|
|
3429
3444
|
{
|
|
3430
|
-
className:
|
|
3445
|
+
className: k(
|
|
3431
3446
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
3432
3447
|
// the same font family + size as `.str-chat__message-text`
|
|
3433
3448
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -3456,7 +3471,7 @@ const or = {
|
|
|
3456
3471
|
a.stopPropagation(), e();
|
|
3457
3472
|
},
|
|
3458
3473
|
"aria-label": s,
|
|
3459
|
-
className:
|
|
3474
|
+
className: k(
|
|
3460
3475
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
3461
3476
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
3462
3477
|
),
|
|
@@ -3490,22 +3505,22 @@ const or = {
|
|
|
3490
3505
|
filename: a,
|
|
3491
3506
|
items: r,
|
|
3492
3507
|
text: i,
|
|
3493
|
-
groupPosition:
|
|
3494
|
-
preload:
|
|
3508
|
+
groupPosition: l,
|
|
3509
|
+
preload: o,
|
|
3495
3510
|
onDismiss: d
|
|
3496
3511
|
}) => {
|
|
3497
|
-
const
|
|
3498
|
-
if (
|
|
3512
|
+
const u = Ee(e), g = e === "composer" && !!d, m = kr({ src: t, mimeType: s, filename: a, items: r });
|
|
3513
|
+
if (m.length === 0)
|
|
3499
3514
|
return null;
|
|
3500
|
-
const f =
|
|
3515
|
+
const f = o ?? (m.length > 1 ? "none" : "metadata");
|
|
3501
3516
|
return /* @__PURE__ */ n(
|
|
3502
3517
|
ke,
|
|
3503
3518
|
{
|
|
3504
|
-
variant:
|
|
3519
|
+
variant: u,
|
|
3505
3520
|
text: i,
|
|
3506
|
-
groupPosition:
|
|
3521
|
+
groupPosition: l,
|
|
3507
3522
|
"data-testid": "audio-attachment",
|
|
3508
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children:
|
|
3523
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, b) => /* @__PURE__ */ n(
|
|
3509
3524
|
Cr,
|
|
3510
3525
|
{
|
|
3511
3526
|
item: c,
|
|
@@ -3513,10 +3528,10 @@ const or = {
|
|
|
3513
3528
|
trailingAction: (
|
|
3514
3529
|
// Composer only supports a single attachment, so the
|
|
3515
3530
|
// dismiss control sits on the only player.
|
|
3516
|
-
g &&
|
|
3531
|
+
g && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
|
|
3517
3532
|
)
|
|
3518
3533
|
},
|
|
3519
|
-
`${c.src}-${
|
|
3534
|
+
`${c.src}-${b}`
|
|
3520
3535
|
)) })
|
|
3521
3536
|
}
|
|
3522
3537
|
);
|
|
@@ -3584,32 +3599,32 @@ const Dr = {
|
|
|
3584
3599
|
mimeType: a = "application/octet-stream",
|
|
3585
3600
|
fileSize: r,
|
|
3586
3601
|
onActivate: i,
|
|
3587
|
-
activateLabel:
|
|
3588
|
-
trailingAction:
|
|
3602
|
+
activateLabel: l,
|
|
3603
|
+
trailingAction: o
|
|
3589
3604
|
}) => {
|
|
3590
|
-
const d = s ?? t ?? "File",
|
|
3605
|
+
const d = s ?? t ?? "File", u = Lr(a, t, r), g = /* @__PURE__ */ n(
|
|
3591
3606
|
"div",
|
|
3592
3607
|
{
|
|
3593
|
-
className:
|
|
3608
|
+
className: k(
|
|
3594
3609
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3595
3610
|
Pr[e]
|
|
3596
3611
|
),
|
|
3597
3612
|
"aria-hidden": !0,
|
|
3598
3613
|
children: ce(a, {
|
|
3599
|
-
className:
|
|
3614
|
+
className: k("size-6", zr[e]),
|
|
3600
3615
|
weight: "regular"
|
|
3601
3616
|
})
|
|
3602
3617
|
}
|
|
3603
|
-
),
|
|
3618
|
+
), m = /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
|
|
3604
3619
|
/* @__PURE__ */ n("p", { className: "truncate font-medium leading-snug", children: d }),
|
|
3605
|
-
|
|
3620
|
+
u ? /* @__PURE__ */ n(
|
|
3606
3621
|
"p",
|
|
3607
3622
|
{
|
|
3608
|
-
className:
|
|
3623
|
+
className: k(
|
|
3609
3624
|
"truncate text-xs leading-4",
|
|
3610
3625
|
Dr[e]
|
|
3611
3626
|
),
|
|
3612
|
-
children:
|
|
3627
|
+
children: u
|
|
3613
3628
|
}
|
|
3614
3629
|
) : null
|
|
3615
3630
|
] }), f = i ? /* @__PURE__ */ h(
|
|
@@ -3617,23 +3632,23 @@ const Dr = {
|
|
|
3617
3632
|
{
|
|
3618
3633
|
type: "button",
|
|
3619
3634
|
onClick: i,
|
|
3620
|
-
"aria-label":
|
|
3621
|
-
className:
|
|
3635
|
+
"aria-label": l,
|
|
3636
|
+
className: k(
|
|
3622
3637
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
3623
3638
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
3624
3639
|
),
|
|
3625
3640
|
children: [
|
|
3626
3641
|
g,
|
|
3627
|
-
|
|
3642
|
+
m
|
|
3628
3643
|
]
|
|
3629
3644
|
}
|
|
3630
3645
|
) : /* @__PURE__ */ h(se, { children: [
|
|
3631
3646
|
g,
|
|
3632
|
-
|
|
3647
|
+
m
|
|
3633
3648
|
] });
|
|
3634
3649
|
return /* @__PURE__ */ h("div", { className: "flex items-center gap-3 px-3 py-2", children: [
|
|
3635
3650
|
f,
|
|
3636
|
-
|
|
3651
|
+
o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
|
|
3637
3652
|
] });
|
|
3638
3653
|
};
|
|
3639
3654
|
async function bn(e, t) {
|
|
@@ -3641,8 +3656,8 @@ async function bn(e, t) {
|
|
|
3641
3656
|
try {
|
|
3642
3657
|
const a = await fetch(e, { mode: "cors" });
|
|
3643
3658
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
3644
|
-
const r = await a.blob(), i = URL.createObjectURL(r),
|
|
3645
|
-
|
|
3659
|
+
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
3660
|
+
l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
3646
3661
|
} catch {
|
|
3647
3662
|
if (!window.open(e, "_blank", "noopener,noreferrer")) {
|
|
3648
3663
|
const r = document.createElement("a");
|
|
@@ -3685,34 +3700,34 @@ const Or = ({
|
|
|
3685
3700
|
fileSize: a,
|
|
3686
3701
|
mimeType: r,
|
|
3687
3702
|
title: i,
|
|
3688
|
-
items:
|
|
3689
|
-
text:
|
|
3703
|
+
items: l,
|
|
3704
|
+
text: o,
|
|
3690
3705
|
groupPosition: d,
|
|
3691
|
-
onClick:
|
|
3706
|
+
onClick: u,
|
|
3692
3707
|
onDismiss: g
|
|
3693
3708
|
}) => {
|
|
3694
|
-
const
|
|
3709
|
+
const m = Ee(e), f = e === "composer" && !!g, c = Or({
|
|
3695
3710
|
src: t,
|
|
3696
3711
|
filename: s,
|
|
3697
3712
|
fileSize: a,
|
|
3698
3713
|
mimeType: r,
|
|
3699
3714
|
title: i,
|
|
3700
|
-
items:
|
|
3701
|
-
}),
|
|
3702
|
-
if ((
|
|
3703
|
-
const
|
|
3704
|
-
if (!
|
|
3705
|
-
const v =
|
|
3706
|
-
bn(
|
|
3715
|
+
items: l
|
|
3716
|
+
}), b = (w) => {
|
|
3717
|
+
if ((u == null ? void 0 : u(w)) === !1) return;
|
|
3718
|
+
const p = c[w];
|
|
3719
|
+
if (!p) return;
|
|
3720
|
+
const v = p.filename ?? ae(p.src);
|
|
3721
|
+
bn(p.src, v);
|
|
3707
3722
|
};
|
|
3708
3723
|
if (c.length === 0)
|
|
3709
3724
|
return null;
|
|
3710
3725
|
const N = /* @__PURE__ */ n(
|
|
3711
3726
|
"span",
|
|
3712
3727
|
{
|
|
3713
|
-
className:
|
|
3728
|
+
className: k(
|
|
3714
3729
|
"flex size-8 items-center justify-center rounded-full",
|
|
3715
|
-
|
|
3730
|
+
m === "dark" ? "text-white/70" : "text-black/70"
|
|
3716
3731
|
),
|
|
3717
3732
|
"aria-hidden": !0,
|
|
3718
3733
|
children: /* @__PURE__ */ n(Ne, { className: "size-5", weight: "bold" })
|
|
@@ -3721,20 +3736,20 @@ const Or = ({
|
|
|
3721
3736
|
return /* @__PURE__ */ n(
|
|
3722
3737
|
ke,
|
|
3723
3738
|
{
|
|
3724
|
-
variant:
|
|
3725
|
-
text:
|
|
3739
|
+
variant: m,
|
|
3740
|
+
text: o,
|
|
3726
3741
|
groupPosition: d,
|
|
3727
3742
|
"data-testid": "file-attachment",
|
|
3728
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w,
|
|
3743
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w, p) => /* @__PURE__ */ n(
|
|
3729
3744
|
$r,
|
|
3730
3745
|
{
|
|
3731
|
-
variant:
|
|
3746
|
+
variant: m,
|
|
3732
3747
|
item: w,
|
|
3733
|
-
index:
|
|
3734
|
-
onActivate:
|
|
3735
|
-
trailingAction: f &&
|
|
3748
|
+
index: p,
|
|
3749
|
+
onActivate: b,
|
|
3750
|
+
trailingAction: f && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : N
|
|
3736
3751
|
},
|
|
3737
|
-
`${w.src}-${
|
|
3752
|
+
`${w.src}-${p}`
|
|
3738
3753
|
)) })
|
|
3739
3754
|
}
|
|
3740
3755
|
);
|
|
@@ -3775,17 +3790,17 @@ const Or = ({
|
|
|
3775
3790
|
label: a = "Download",
|
|
3776
3791
|
iconOnly: r,
|
|
3777
3792
|
tone: i = "dark",
|
|
3778
|
-
onTriggered:
|
|
3793
|
+
onTriggered: l
|
|
3779
3794
|
}) => {
|
|
3780
|
-
const [
|
|
3795
|
+
const [o, d] = $(!1), u = J(
|
|
3781
3796
|
(c) => {
|
|
3782
|
-
c.stopPropagation(), !
|
|
3797
|
+
c.stopPropagation(), !o && (d(!0), bn(e, t).catch(() => {
|
|
3783
3798
|
}).finally(() => {
|
|
3784
|
-
d(!1),
|
|
3799
|
+
d(!1), l == null || l();
|
|
3785
3800
|
}));
|
|
3786
3801
|
},
|
|
3787
|
-
[
|
|
3788
|
-
), g = r ?? s !== "pill", f = { className:
|
|
3802
|
+
[o, e, t, l]
|
|
3803
|
+
), g = r ?? s !== "pill", f = { className: k(
|
|
3789
3804
|
s === "pill" ? "size-4" : "size-5",
|
|
3790
3805
|
"shrink-0"
|
|
3791
3806
|
), weight: "bold" };
|
|
@@ -3793,17 +3808,17 @@ const Or = ({
|
|
|
3793
3808
|
"button",
|
|
3794
3809
|
{
|
|
3795
3810
|
type: "button",
|
|
3796
|
-
onClick:
|
|
3797
|
-
disabled:
|
|
3811
|
+
onClick: u,
|
|
3812
|
+
disabled: o,
|
|
3798
3813
|
"aria-label": a,
|
|
3799
|
-
className:
|
|
3814
|
+
className: k(
|
|
3800
3815
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
3801
3816
|
{
|
|
3802
3817
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
3803
3818
|
light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
|
|
3804
3819
|
}[i]
|
|
3805
3820
|
),
|
|
3806
|
-
children:
|
|
3821
|
+
children: o ? /* @__PURE__ */ n(
|
|
3807
3822
|
we,
|
|
3808
3823
|
{
|
|
3809
3824
|
className: "size-4 animate-spin",
|
|
@@ -3823,25 +3838,25 @@ const Or = ({
|
|
|
3823
3838
|
"button",
|
|
3824
3839
|
{
|
|
3825
3840
|
type: "button",
|
|
3826
|
-
onClick:
|
|
3827
|
-
disabled:
|
|
3841
|
+
onClick: u,
|
|
3842
|
+
disabled: o,
|
|
3828
3843
|
"aria-label": a,
|
|
3829
3844
|
className: "mes-media-viewer__action",
|
|
3830
|
-
children:
|
|
3845
|
+
children: o ? /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3831
3846
|
}
|
|
3832
3847
|
) : /* @__PURE__ */ h(
|
|
3833
3848
|
"button",
|
|
3834
3849
|
{
|
|
3835
3850
|
type: "button",
|
|
3836
|
-
onClick:
|
|
3837
|
-
disabled:
|
|
3851
|
+
onClick: u,
|
|
3852
|
+
disabled: o,
|
|
3838
3853
|
"aria-label": g ? a : void 0,
|
|
3839
|
-
className:
|
|
3854
|
+
className: k(
|
|
3840
3855
|
"mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
|
|
3841
3856
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
3842
3857
|
),
|
|
3843
3858
|
children: [
|
|
3844
|
-
|
|
3859
|
+
o ? /* @__PURE__ */ n(
|
|
3845
3860
|
we,
|
|
3846
3861
|
{
|
|
3847
3862
|
className: "size-4 animate-spin",
|
|
@@ -3858,26 +3873,26 @@ const Or = ({
|
|
|
3858
3873
|
initialIndex: t,
|
|
3859
3874
|
open: s
|
|
3860
3875
|
}) => {
|
|
3861
|
-
const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] =
|
|
3876
|
+
const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
|
|
3862
3877
|
K(() => {
|
|
3863
3878
|
s && i(Ve(t, 0, Math.max(e - 1, 0)));
|
|
3864
3879
|
}, [s, t, e]), K(() => {
|
|
3865
3880
|
i((d) => Ve(d, 0, Math.max(e - 1, 0)));
|
|
3866
3881
|
}, [e]);
|
|
3867
|
-
const
|
|
3882
|
+
const l = J(() => {
|
|
3868
3883
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
3869
|
-
}, [e]),
|
|
3884
|
+
}, [e]), o = J(() => {
|
|
3870
3885
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
3871
3886
|
}, [e]);
|
|
3872
3887
|
return K(() => {
|
|
3873
3888
|
if (!s || e <= 1) return;
|
|
3874
|
-
const d = (
|
|
3875
|
-
if (
|
|
3889
|
+
const d = (u) => {
|
|
3890
|
+
if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
|
|
3876
3891
|
const g = document.activeElement;
|
|
3877
|
-
g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (
|
|
3892
|
+
g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? l() : o());
|
|
3878
3893
|
};
|
|
3879
3894
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
3880
|
-
}, [s, e,
|
|
3895
|
+
}, [s, e, l, o]), { index: r, prev: l, next: o };
|
|
3881
3896
|
}, ut = ({
|
|
3882
3897
|
open: e,
|
|
3883
3898
|
onClose: t,
|
|
@@ -3885,46 +3900,46 @@ const Or = ({
|
|
|
3885
3900
|
counter: a,
|
|
3886
3901
|
actions: r,
|
|
3887
3902
|
children: i,
|
|
3888
|
-
"data-testid":
|
|
3903
|
+
"data-testid": l
|
|
3889
3904
|
}) => {
|
|
3890
|
-
const
|
|
3905
|
+
const o = Y(null), d = Y(null);
|
|
3891
3906
|
return K(() => {
|
|
3892
3907
|
var f;
|
|
3893
|
-
const
|
|
3894
|
-
if (
|
|
3908
|
+
const m = o.current;
|
|
3909
|
+
if (m) {
|
|
3895
3910
|
if (e) {
|
|
3896
|
-
if (!
|
|
3897
|
-
if (typeof
|
|
3911
|
+
if (!m.open)
|
|
3912
|
+
if (typeof m.showModal == "function")
|
|
3898
3913
|
try {
|
|
3899
|
-
|
|
3914
|
+
m.showModal();
|
|
3900
3915
|
} catch {
|
|
3901
|
-
|
|
3916
|
+
m.setAttribute("open", "");
|
|
3902
3917
|
}
|
|
3903
3918
|
else
|
|
3904
|
-
|
|
3919
|
+
m.setAttribute("open", "");
|
|
3905
3920
|
const c = typeof document < "u" ? document.activeElement : null;
|
|
3906
3921
|
return (f = d.current) == null || f.focus(), () => {
|
|
3907
|
-
if (
|
|
3908
|
-
if (typeof
|
|
3922
|
+
if (m.open)
|
|
3923
|
+
if (typeof m.close == "function")
|
|
3909
3924
|
try {
|
|
3910
|
-
|
|
3925
|
+
m.close();
|
|
3911
3926
|
} catch {
|
|
3912
|
-
|
|
3927
|
+
m.removeAttribute("open");
|
|
3913
3928
|
}
|
|
3914
3929
|
else
|
|
3915
|
-
|
|
3930
|
+
m.removeAttribute("open");
|
|
3916
3931
|
c && document.body.contains(c) && c.focus();
|
|
3917
3932
|
};
|
|
3918
3933
|
}
|
|
3919
|
-
if (
|
|
3920
|
-
if (typeof
|
|
3934
|
+
if (m.open)
|
|
3935
|
+
if (typeof m.close == "function")
|
|
3921
3936
|
try {
|
|
3922
|
-
|
|
3937
|
+
m.close();
|
|
3923
3938
|
} catch {
|
|
3924
|
-
|
|
3939
|
+
m.removeAttribute("open");
|
|
3925
3940
|
}
|
|
3926
3941
|
else
|
|
3927
|
-
|
|
3942
|
+
m.removeAttribute("open");
|
|
3928
3943
|
}
|
|
3929
3944
|
}, [e]), // The native `<dialog>` element ships its own keyboard dismissal
|
|
3930
3945
|
// (Escape, handled by the platform and surfaced through `onClose`),
|
|
@@ -3936,15 +3951,15 @@ const Or = ({
|
|
|
3936
3951
|
/* @__PURE__ */ h(
|
|
3937
3952
|
"dialog",
|
|
3938
3953
|
{
|
|
3939
|
-
ref:
|
|
3954
|
+
ref: o,
|
|
3940
3955
|
className: "mes-media-viewer",
|
|
3941
3956
|
"aria-label": s ?? "Attachment viewer",
|
|
3942
|
-
"data-testid":
|
|
3957
|
+
"data-testid": l,
|
|
3943
3958
|
onClose: () => {
|
|
3944
3959
|
t();
|
|
3945
3960
|
},
|
|
3946
|
-
onClick: (
|
|
3947
|
-
|
|
3961
|
+
onClick: (m) => {
|
|
3962
|
+
m.target === o.current && t();
|
|
3948
3963
|
},
|
|
3949
3964
|
children: [
|
|
3950
3965
|
/* @__PURE__ */ h("div", { className: "mes-media-viewer__chrome", children: [
|
|
@@ -3974,15 +3989,15 @@ const Or = ({
|
|
|
3974
3989
|
initialIndex: s = 0,
|
|
3975
3990
|
onClose: a
|
|
3976
3991
|
}) => {
|
|
3977
|
-
const { index: r, prev: i, next:
|
|
3992
|
+
const { index: r, prev: i, next: l } = dt({
|
|
3978
3993
|
length: t.length,
|
|
3979
3994
|
initialIndex: s,
|
|
3980
3995
|
open: e
|
|
3981
|
-
}),
|
|
3982
|
-
() => (
|
|
3983
|
-
[
|
|
3996
|
+
}), o = t[r], d = re(
|
|
3997
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "image"),
|
|
3998
|
+
[o]
|
|
3984
3999
|
);
|
|
3985
|
-
return
|
|
4000
|
+
return o ? /* @__PURE__ */ h(
|
|
3986
4001
|
ut,
|
|
3987
4002
|
{
|
|
3988
4003
|
open: e,
|
|
@@ -3992,7 +4007,7 @@ const Or = ({
|
|
|
3992
4007
|
actions: /* @__PURE__ */ n(
|
|
3993
4008
|
vn,
|
|
3994
4009
|
{
|
|
3995
|
-
url:
|
|
4010
|
+
url: o.src,
|
|
3996
4011
|
filename: d,
|
|
3997
4012
|
variant: "viewer",
|
|
3998
4013
|
label: `Download ${d}`
|
|
@@ -4003,20 +4018,20 @@ const Or = ({
|
|
|
4003
4018
|
/* @__PURE__ */ n(
|
|
4004
4019
|
"img",
|
|
4005
4020
|
{
|
|
4006
|
-
src:
|
|
4007
|
-
alt:
|
|
4021
|
+
src: o.src,
|
|
4022
|
+
alt: o.alt ?? d,
|
|
4008
4023
|
draggable: !1,
|
|
4009
4024
|
loading: "eager",
|
|
4010
4025
|
decoding: "async",
|
|
4011
4026
|
className: "mes-media-viewer__image"
|
|
4012
4027
|
},
|
|
4013
|
-
`${r}:${
|
|
4028
|
+
`${r}:${o.src}`
|
|
4014
4029
|
),
|
|
4015
4030
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4016
4031
|
ct,
|
|
4017
4032
|
{
|
|
4018
4033
|
onPrev: i,
|
|
4019
|
-
onNext:
|
|
4034
|
+
onNext: l,
|
|
4020
4035
|
prevLabel: "Previous image",
|
|
4021
4036
|
nextLabel: "Next image"
|
|
4022
4037
|
}
|
|
@@ -4032,76 +4047,76 @@ const Or = ({
|
|
|
4032
4047
|
}) => {
|
|
4033
4048
|
const r = e.length;
|
|
4034
4049
|
if (r === 0) return null;
|
|
4035
|
-
const i = e.slice(0, Math.min(r, s)),
|
|
4036
|
-
const
|
|
4050
|
+
const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, u, g) => {
|
|
4051
|
+
const m = k(Vr, "h-full w-full");
|
|
4037
4052
|
return t ? /* @__PURE__ */ h(
|
|
4038
4053
|
"button",
|
|
4039
4054
|
{
|
|
4040
4055
|
type: "button",
|
|
4041
|
-
onClick: () => t(
|
|
4042
|
-
"aria-label": d.ariaLabel ?? `Open media ${
|
|
4043
|
-
className:
|
|
4056
|
+
onClick: () => t(u),
|
|
4057
|
+
"aria-label": d.ariaLabel ?? `Open media ${u + 1}`,
|
|
4058
|
+
className: k(m, "cursor-zoom-in"),
|
|
4044
4059
|
children: [
|
|
4045
4060
|
d.content,
|
|
4046
4061
|
g
|
|
4047
4062
|
]
|
|
4048
4063
|
},
|
|
4049
|
-
|
|
4050
|
-
) : /* @__PURE__ */ h("div", { className:
|
|
4064
|
+
u
|
|
4065
|
+
) : /* @__PURE__ */ h("div", { className: m, children: [
|
|
4051
4066
|
d.content,
|
|
4052
4067
|
g
|
|
4053
|
-
] },
|
|
4068
|
+
] }, u);
|
|
4054
4069
|
};
|
|
4055
|
-
return i.length === 1 ? /* @__PURE__ */ n("div", { className:
|
|
4070
|
+
return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
|
|
4056
4071
|
"div",
|
|
4057
4072
|
{
|
|
4058
|
-
className:
|
|
4073
|
+
className: k(
|
|
4059
4074
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
4060
4075
|
a
|
|
4061
4076
|
),
|
|
4062
|
-
children: i.map((d,
|
|
4077
|
+
children: i.map((d, u) => o(d, u))
|
|
4063
4078
|
}
|
|
4064
4079
|
) : i.length === 3 ? /* @__PURE__ */ h(
|
|
4065
4080
|
"div",
|
|
4066
4081
|
{
|
|
4067
|
-
className:
|
|
4082
|
+
className: k(
|
|
4068
4083
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
4069
4084
|
a
|
|
4070
4085
|
),
|
|
4071
4086
|
children: [
|
|
4072
|
-
/* @__PURE__ */ n("div", { className: "row-span-2", children:
|
|
4073
|
-
|
|
4074
|
-
|
|
4087
|
+
/* @__PURE__ */ n("div", { className: "row-span-2", children: o(i[0], 0) }),
|
|
4088
|
+
o(i[1], 1),
|
|
4089
|
+
o(i[2], 2)
|
|
4075
4090
|
]
|
|
4076
4091
|
}
|
|
4077
4092
|
) : /* @__PURE__ */ n(
|
|
4078
4093
|
"div",
|
|
4079
4094
|
{
|
|
4080
|
-
className:
|
|
4095
|
+
className: k(
|
|
4081
4096
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
4082
4097
|
a
|
|
4083
4098
|
),
|
|
4084
|
-
children: i.map((d,
|
|
4085
|
-
const g =
|
|
4086
|
-
return
|
|
4099
|
+
children: i.map((d, u) => {
|
|
4100
|
+
const g = l > 0 && u === i.length - 1;
|
|
4101
|
+
return o(
|
|
4087
4102
|
d,
|
|
4088
|
-
|
|
4103
|
+
u,
|
|
4089
4104
|
g ? /* @__PURE__ */ h("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
|
|
4090
4105
|
"+",
|
|
4091
|
-
|
|
4106
|
+
l
|
|
4092
4107
|
] }) : null
|
|
4093
4108
|
);
|
|
4094
4109
|
})
|
|
4095
4110
|
}
|
|
4096
4111
|
);
|
|
4097
4112
|
}, Ie = (e) => {
|
|
4098
|
-
const [t, s] =
|
|
4099
|
-
(
|
|
4100
|
-
(e == null ? void 0 : e(
|
|
4113
|
+
const [t, s] = $(!1), [a, r] = $(0), i = J(
|
|
4114
|
+
(o) => {
|
|
4115
|
+
(e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
|
|
4101
4116
|
},
|
|
4102
4117
|
[e]
|
|
4103
|
-
),
|
|
4104
|
-
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer:
|
|
4118
|
+
), l = J(() => s(!1), []);
|
|
4119
|
+
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
4105
4120
|
}, Gr = (e, t, s, a) => ({
|
|
4106
4121
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
4107
4122
|
content: /* @__PURE__ */ n(
|
|
@@ -4126,7 +4141,7 @@ const Or = ({
|
|
|
4126
4141
|
alt: s.alt,
|
|
4127
4142
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4128
4143
|
})), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4129
|
-
const { viewerOpen:
|
|
4144
|
+
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Ie(
|
|
4130
4145
|
r
|
|
4131
4146
|
);
|
|
4132
4147
|
return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
|
|
@@ -4154,10 +4169,10 @@ const Or = ({
|
|
|
4154
4169
|
/* @__PURE__ */ n(
|
|
4155
4170
|
xn,
|
|
4156
4171
|
{
|
|
4157
|
-
open:
|
|
4172
|
+
open: l,
|
|
4158
4173
|
items: Nn([{ src: e, alt: t }], s),
|
|
4159
|
-
initialIndex:
|
|
4160
|
-
onClose:
|
|
4174
|
+
initialIndex: o,
|
|
4175
|
+
onClose: u
|
|
4161
4176
|
}
|
|
4162
4177
|
)
|
|
4163
4178
|
] });
|
|
@@ -4168,34 +4183,34 @@ const Or = ({
|
|
|
4168
4183
|
filename: a,
|
|
4169
4184
|
items: r,
|
|
4170
4185
|
text: i,
|
|
4171
|
-
groupPosition:
|
|
4172
|
-
loading:
|
|
4186
|
+
groupPosition: l,
|
|
4187
|
+
loading: o = "lazy",
|
|
4173
4188
|
onClick: d
|
|
4174
4189
|
}) => {
|
|
4175
|
-
const
|
|
4190
|
+
const u = Hr({ src: t, alt: s, items: r }), g = Ee(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: b } = Ie(
|
|
4176
4191
|
d
|
|
4177
4192
|
);
|
|
4178
|
-
if (
|
|
4193
|
+
if (u.length === 0)
|
|
4179
4194
|
return null;
|
|
4180
|
-
const N =
|
|
4181
|
-
(w,
|
|
4195
|
+
const N = u.map(
|
|
4196
|
+
(w, p) => Gr(w, p, u.length, o)
|
|
4182
4197
|
);
|
|
4183
4198
|
return /* @__PURE__ */ h(
|
|
4184
4199
|
ke,
|
|
4185
4200
|
{
|
|
4186
4201
|
variant: g,
|
|
4187
4202
|
text: i,
|
|
4188
|
-
groupPosition:
|
|
4203
|
+
groupPosition: l,
|
|
4189
4204
|
"data-testid": "image-attachment",
|
|
4190
4205
|
children: [
|
|
4191
4206
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: N, onTileActivate: c }) }),
|
|
4192
4207
|
/* @__PURE__ */ n(
|
|
4193
4208
|
xn,
|
|
4194
4209
|
{
|
|
4195
|
-
open:
|
|
4196
|
-
items: Nn(
|
|
4210
|
+
open: m,
|
|
4211
|
+
items: Nn(u, a),
|
|
4197
4212
|
initialIndex: f,
|
|
4198
|
-
onClose:
|
|
4213
|
+
onClose: b
|
|
4199
4214
|
}
|
|
4200
4215
|
)
|
|
4201
4216
|
]
|
|
@@ -4211,18 +4226,18 @@ const Or = ({
|
|
|
4211
4226
|
initialIndex: s = 0,
|
|
4212
4227
|
onClose: a
|
|
4213
4228
|
}) => {
|
|
4214
|
-
const { index: r, prev: i, next:
|
|
4229
|
+
const { index: r, prev: i, next: l } = dt({
|
|
4215
4230
|
length: t.length,
|
|
4216
4231
|
initialIndex: s,
|
|
4217
4232
|
open: e
|
|
4218
|
-
}),
|
|
4219
|
-
() => (
|
|
4220
|
-
[
|
|
4221
|
-
),
|
|
4222
|
-
() =>
|
|
4223
|
-
[
|
|
4233
|
+
}), o = t[r], d = re(
|
|
4234
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
|
|
4235
|
+
[o]
|
|
4236
|
+
), u = re(
|
|
4237
|
+
() => o ? Zr(o.src) : void 0,
|
|
4238
|
+
[o]
|
|
4224
4239
|
);
|
|
4225
|
-
return !
|
|
4240
|
+
return !o || !u ? null : /* @__PURE__ */ h(
|
|
4226
4241
|
ut,
|
|
4227
4242
|
{
|
|
4228
4243
|
open: e,
|
|
@@ -4234,18 +4249,18 @@ const Or = ({
|
|
|
4234
4249
|
/* @__PURE__ */ n(
|
|
4235
4250
|
"iframe",
|
|
4236
4251
|
{
|
|
4237
|
-
src:
|
|
4252
|
+
src: u,
|
|
4238
4253
|
title: d,
|
|
4239
4254
|
className: "mes-media-viewer__iframe",
|
|
4240
4255
|
sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
|
|
4241
4256
|
},
|
|
4242
|
-
`${r}:${
|
|
4257
|
+
`${r}:${o.src}`
|
|
4243
4258
|
),
|
|
4244
4259
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4245
4260
|
ct,
|
|
4246
4261
|
{
|
|
4247
4262
|
onPrev: i,
|
|
4248
|
-
onNext:
|
|
4263
|
+
onNext: l,
|
|
4249
4264
|
prevLabel: "Previous document",
|
|
4250
4265
|
nextLabel: "Next document"
|
|
4251
4266
|
}
|
|
@@ -4290,17 +4305,17 @@ const Or = ({
|
|
|
4290
4305
|
fileSize: a,
|
|
4291
4306
|
title: r,
|
|
4292
4307
|
items: i,
|
|
4293
|
-
text:
|
|
4294
|
-
groupPosition:
|
|
4308
|
+
text: l,
|
|
4309
|
+
groupPosition: o,
|
|
4295
4310
|
onClick: d,
|
|
4296
|
-
onDismiss:
|
|
4311
|
+
onDismiss: u
|
|
4297
4312
|
}) => {
|
|
4298
|
-
const g = Ee(e),
|
|
4313
|
+
const g = Ee(e), m = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
|
|
4299
4314
|
d
|
|
4300
|
-
), w = e === "composer" && !!
|
|
4301
|
-
if (
|
|
4315
|
+
), w = e === "composer" && !!u;
|
|
4316
|
+
if (m.length === 0)
|
|
4302
4317
|
return null;
|
|
4303
|
-
const
|
|
4318
|
+
const p = m.map((v) => ({
|
|
4304
4319
|
src: v.src,
|
|
4305
4320
|
filename: v.filename ?? ae(v.src)
|
|
4306
4321
|
}));
|
|
@@ -4308,12 +4323,12 @@ const Or = ({
|
|
|
4308
4323
|
ke,
|
|
4309
4324
|
{
|
|
4310
4325
|
variant: g,
|
|
4311
|
-
text:
|
|
4312
|
-
groupPosition:
|
|
4326
|
+
text: l,
|
|
4327
|
+
groupPosition: o,
|
|
4313
4328
|
"data-testid": "pdf-attachment",
|
|
4314
4329
|
children: [
|
|
4315
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children:
|
|
4316
|
-
const T = v.filename ?? ae(v.src),
|
|
4330
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((v, A) => {
|
|
4331
|
+
const T = v.filename ?? ae(v.src), E = w && A === 0 ? /* @__PURE__ */ n(Ce, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4317
4332
|
vn,
|
|
4318
4333
|
{
|
|
4319
4334
|
url: v.src,
|
|
@@ -4328,18 +4343,18 @@ const Or = ({
|
|
|
4328
4343
|
{
|
|
4329
4344
|
variant: g,
|
|
4330
4345
|
item: v,
|
|
4331
|
-
index:
|
|
4332
|
-
onActivate:
|
|
4333
|
-
trailingAction:
|
|
4346
|
+
index: A,
|
|
4347
|
+
onActivate: b,
|
|
4348
|
+
trailingAction: E
|
|
4334
4349
|
},
|
|
4335
|
-
`${v.src}-${
|
|
4350
|
+
`${v.src}-${A}`
|
|
4336
4351
|
);
|
|
4337
4352
|
}) }),
|
|
4338
4353
|
/* @__PURE__ */ n(
|
|
4339
4354
|
Jr,
|
|
4340
4355
|
{
|
|
4341
4356
|
open: f,
|
|
4342
|
-
items:
|
|
4357
|
+
items: p,
|
|
4343
4358
|
initialIndex: c,
|
|
4344
4359
|
onClose: N
|
|
4345
4360
|
}
|
|
@@ -4357,15 +4372,15 @@ const Or = ({
|
|
|
4357
4372
|
initialIndex: s = 0,
|
|
4358
4373
|
onClose: a
|
|
4359
4374
|
}) => {
|
|
4360
|
-
const { index: r, prev: i, next:
|
|
4375
|
+
const { index: r, prev: i, next: l } = dt({
|
|
4361
4376
|
length: t.length,
|
|
4362
4377
|
initialIndex: s,
|
|
4363
4378
|
open: e
|
|
4364
|
-
}),
|
|
4365
|
-
() => (
|
|
4366
|
-
[
|
|
4379
|
+
}), o = t[r], d = re(
|
|
4380
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "video"),
|
|
4381
|
+
[o]
|
|
4367
4382
|
);
|
|
4368
|
-
return
|
|
4383
|
+
return o ? /* @__PURE__ */ h(
|
|
4369
4384
|
ut,
|
|
4370
4385
|
{
|
|
4371
4386
|
open: e,
|
|
@@ -4377,23 +4392,23 @@ const Or = ({
|
|
|
4377
4392
|
/* @__PURE__ */ n(
|
|
4378
4393
|
"video",
|
|
4379
4394
|
{
|
|
4380
|
-
src:
|
|
4381
|
-
poster:
|
|
4395
|
+
src: o.src,
|
|
4396
|
+
poster: o.poster,
|
|
4382
4397
|
controls: !0,
|
|
4383
4398
|
autoPlay: !0,
|
|
4384
4399
|
muted: !0,
|
|
4385
4400
|
playsInline: !0,
|
|
4386
|
-
preload:
|
|
4401
|
+
preload: o.preload ?? "metadata",
|
|
4387
4402
|
className: "mes-media-viewer__video",
|
|
4388
|
-
children:
|
|
4403
|
+
children: o.mimeType ? /* @__PURE__ */ n("source", { src: o.src, type: o.mimeType }) : null
|
|
4389
4404
|
},
|
|
4390
|
-
`${r}:${
|
|
4405
|
+
`${r}:${o.src}`
|
|
4391
4406
|
),
|
|
4392
4407
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4393
4408
|
ct,
|
|
4394
4409
|
{
|
|
4395
4410
|
onPrev: i,
|
|
4396
|
-
onNext:
|
|
4411
|
+
onNext: l,
|
|
4397
4412
|
prevLabel: "Previous video",
|
|
4398
4413
|
nextLabel: "Next video"
|
|
4399
4414
|
}
|
|
@@ -4439,8 +4454,8 @@ const Or = ({
|
|
|
4439
4454
|
mimeType: s.mimeType,
|
|
4440
4455
|
preload: s.preload,
|
|
4441
4456
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4442
|
-
})), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss:
|
|
4443
|
-
const { viewerOpen:
|
|
4457
|
+
})), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
|
|
4458
|
+
const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: g } = Ie(
|
|
4444
4459
|
i
|
|
4445
4460
|
);
|
|
4446
4461
|
return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
|
|
@@ -4448,17 +4463,17 @@ const Or = ({
|
|
|
4448
4463
|
"button",
|
|
4449
4464
|
{
|
|
4450
4465
|
type: "button",
|
|
4451
|
-
onClick: () =>
|
|
4466
|
+
onClick: () => u(0),
|
|
4452
4467
|
"aria-label": "Play video",
|
|
4453
4468
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
4454
4469
|
children: /* @__PURE__ */ n(kn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
4455
4470
|
}
|
|
4456
4471
|
),
|
|
4457
|
-
|
|
4472
|
+
l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: l }) }) : null,
|
|
4458
4473
|
/* @__PURE__ */ n(
|
|
4459
4474
|
yn,
|
|
4460
4475
|
{
|
|
4461
|
-
open:
|
|
4476
|
+
open: o,
|
|
4462
4477
|
items: Cn(
|
|
4463
4478
|
[{ src: e, poster: t, mimeType: s, preload: r }],
|
|
4464
4479
|
a
|
|
@@ -4475,32 +4490,32 @@ const Or = ({
|
|
|
4475
4490
|
mimeType: a,
|
|
4476
4491
|
filename: r,
|
|
4477
4492
|
items: i,
|
|
4478
|
-
text:
|
|
4479
|
-
groupPosition:
|
|
4493
|
+
text: l,
|
|
4494
|
+
groupPosition: o,
|
|
4480
4495
|
preload: d,
|
|
4481
|
-
onClick:
|
|
4496
|
+
onClick: u
|
|
4482
4497
|
}) => {
|
|
4483
|
-
const g = li({ src: t, poster: s, mimeType: a, preload: d, items: i }),
|
|
4484
|
-
|
|
4498
|
+
const g = li({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
|
|
4499
|
+
u
|
|
4485
4500
|
);
|
|
4486
4501
|
if (g.length === 0)
|
|
4487
4502
|
return null;
|
|
4488
4503
|
const w = g.map(
|
|
4489
|
-
(
|
|
4504
|
+
(p, v) => ii(p, v, g.length)
|
|
4490
4505
|
);
|
|
4491
4506
|
return /* @__PURE__ */ h(
|
|
4492
4507
|
ke,
|
|
4493
4508
|
{
|
|
4494
|
-
variant:
|
|
4495
|
-
text:
|
|
4496
|
-
groupPosition:
|
|
4509
|
+
variant: m,
|
|
4510
|
+
text: l,
|
|
4511
|
+
groupPosition: o,
|
|
4497
4512
|
"data-testid": "video-attachment",
|
|
4498
4513
|
children: [
|
|
4499
4514
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4500
4515
|
wn,
|
|
4501
4516
|
{
|
|
4502
4517
|
tiles: w,
|
|
4503
|
-
onTileActivate:
|
|
4518
|
+
onTileActivate: b,
|
|
4504
4519
|
className: "overflow-hidden rounded-md"
|
|
4505
4520
|
}
|
|
4506
4521
|
) }),
|
|
@@ -4538,7 +4553,7 @@ const Or = ({
|
|
|
4538
4553
|
onClick: t,
|
|
4539
4554
|
disabled: s,
|
|
4540
4555
|
style: { backgroundColor: "#E6E5E3" },
|
|
4541
|
-
className:
|
|
4556
|
+
className: k(
|
|
4542
4557
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
4543
4558
|
{
|
|
4544
4559
|
"hover:brightness-95 active:brightness-90": !s,
|
|
@@ -4555,15 +4570,15 @@ const Or = ({
|
|
|
4555
4570
|
headerText: a,
|
|
4556
4571
|
className: r,
|
|
4557
4572
|
avatarImage: i,
|
|
4558
|
-
avatarName:
|
|
4573
|
+
avatarName: l
|
|
4559
4574
|
}) => {
|
|
4560
|
-
const
|
|
4561
|
-
return
|
|
4562
|
-
(i ||
|
|
4575
|
+
const o = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
|
|
4576
|
+
return o.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
4577
|
+
(i || l) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
4563
4578
|
ne,
|
|
4564
4579
|
{
|
|
4565
|
-
id:
|
|
4566
|
-
name:
|
|
4580
|
+
id: l || "account",
|
|
4581
|
+
name: l || "Account",
|
|
4567
4582
|
image: i,
|
|
4568
4583
|
size: 24,
|
|
4569
4584
|
shape: "circle"
|
|
@@ -4576,7 +4591,7 @@ const Or = ({
|
|
|
4576
4591
|
style: { backgroundColor: "#F1F0EE" },
|
|
4577
4592
|
children: [
|
|
4578
4593
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4579
|
-
|
|
4594
|
+
o.map((d) => /* @__PURE__ */ n(
|
|
4580
4595
|
hi,
|
|
4581
4596
|
{
|
|
4582
4597
|
question: d.question,
|
|
@@ -4626,4 +4641,4 @@ export {
|
|
|
4626
4641
|
Jt as y,
|
|
4627
4642
|
Ci as z
|
|
4628
4643
|
};
|
|
4629
|
-
//# sourceMappingURL=index-
|
|
4644
|
+
//# sourceMappingURL=index-CghCKfXq.js.map
|