@linktr.ee/messaging-react 3.4.0-rc-1782387968 → 3.4.0-rc-1782392192
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-utKbCGom.cjs → Card-6snF25TP.cjs} +2 -2
- package/dist/{Card-utKbCGom.cjs.map → Card-6snF25TP.cjs.map} +1 -1
- package/dist/{Card-UbPYWjnX.cjs → Card-BTbz8XCg.cjs} +2 -2
- package/dist/{Card-UbPYWjnX.cjs.map → Card-BTbz8XCg.cjs.map} +1 -1
- package/dist/{Card-beoX9cug.js → Card-CBi3z_Wt.js} +2 -2
- package/dist/{Card-beoX9cug.js.map → Card-CBi3z_Wt.js.map} +1 -1
- package/dist/{Card-BOD2Qo_b.js → Card-Cbw4GBkm.js} +3 -3
- package/dist/{Card-BOD2Qo_b.js.map → Card-Cbw4GBkm.js.map} +1 -1
- package/dist/{Card-DcEBssw0.js → Card-D3-jTRWp.js} +2 -2
- package/dist/{Card-DcEBssw0.js.map → Card-D3-jTRWp.js.map} +1 -1
- package/dist/{Card-DkNdLpVE.cjs → Card-DdK8Vv7y.cjs} +2 -2
- package/dist/{Card-DkNdLpVE.cjs.map → Card-DdK8Vv7y.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Bjdf-fTw.cjs → LockedThumbnail-Cih__olI.cjs} +2 -2
- package/dist/{LockedThumbnail-Bjdf-fTw.cjs.map → LockedThumbnail-Cih__olI.cjs.map} +1 -1
- package/dist/{LockedThumbnail-bOjjYYyV.js → LockedThumbnail-qPBaTZon.js} +2 -2
- package/dist/{LockedThumbnail-bOjjYYyV.js.map → LockedThumbnail-qPBaTZon.js.map} +1 -1
- package/dist/{index-DG5LOHey.js → index-BOsrtjME.js} +1031 -1008
- package/dist/index-BOsrtjME.js.map +1 -0
- package/dist/index-DQk6hOJg.cjs +2 -0
- package/dist/index-DQk6hOJg.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -18
- package/dist/index.js +19 -20
- package/package.json +2 -2
- package/src/components/ChannelList/CustomChannelPreview.test.tsx +0 -38
- package/src/components/ChannelList/CustomChannelPreview.tsx +6 -5
- package/src/components/ChannelView.stories.tsx +16 -0
- package/src/components/ChannelView.test.tsx +20 -35
- package/src/components/ChannelView.tsx +55 -17
- package/src/index.ts +0 -2
- package/src/stream-custom-data.ts +0 -8
- package/src/types.ts +11 -0
- package/dist/index-B3oQq9zK.cjs +0 -2
- package/dist/index-B3oQq9zK.cjs.map +0 -1
- package/dist/index-DG5LOHey.js.map +0 -1
- package/src/components/VerifiedBadge/index.tsx +0 -25
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as n, jsxs as h, Fragment as
|
|
2
|
-
import U, { createContext as Ye, useContext as Ae, useCallback as
|
|
1
|
+
import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import U, { createContext as Ye, useContext as Ae, useCallback as K, useState as z, useRef as H, useEffect as X, useId as Sn, useMemo as ne, Suspense as qe } from "react";
|
|
3
3
|
import { StreamChatService as In } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as Tn, LinkPreviewsManager as At } from "stream-chat";
|
|
5
|
-
import { Chat as An, DateSeparator as Mn, useChannelStateContext as
|
|
6
|
-
import { StarIcon as Be, DotsThreeIcon as hs, SpinnerGapIcon as ke, SignOutIcon as fs, ProhibitInsetIcon as Rt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Ht, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Me, ArrowUpIcon as Ms, SparkleIcon as je, ProhibitIcon as Rs,
|
|
7
|
-
import
|
|
8
|
-
import { MessageActions as
|
|
5
|
+
import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as On, MessageBlocked as Pn, MessageBouncePrompt as zn, 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 Mt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as xe, 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 De, AIStates as Oe, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Be, DotsThreeIcon as hs, SpinnerGapIcon as ke, SignOutIcon as fs, ProhibitInsetIcon as Rt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Ht, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Me, ArrowUpIcon as Ms, SparkleIcon as je, ProhibitIcon as Rs, ArrowLeftIcon as Lt, CaretRightIcon as Ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
|
|
7
|
+
import y from "classnames";
|
|
8
|
+
import { MessageActions as Os, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
|
|
9
9
|
const qt = Ye({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
@@ -16,7 +16,7 @@ const qt = Ye({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), Xe = () => Ae(qt),
|
|
19
|
+
}), Xe = () => Ae(qt), Ni = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -24,10 +24,10 @@ const qt = Ye({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
var
|
|
28
|
-
const o =
|
|
29
|
-
(
|
|
30
|
-
i && console.log(`🔥 [MessagingProvider] ${
|
|
27
|
+
var D, I;
|
|
28
|
+
const o = K(
|
|
29
|
+
(T, ...S) => {
|
|
30
|
+
i && console.log(`🔥 [MessagingProvider] ${T}`, ...S);
|
|
31
31
|
},
|
|
32
32
|
[i]
|
|
33
33
|
);
|
|
@@ -37,77 +37,77 @@ const qt = Ye({
|
|
|
37
37
|
serviceConfig: !!s,
|
|
38
38
|
capabilities: Object.keys(r)
|
|
39
39
|
});
|
|
40
|
-
const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c,
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
40
|
+
const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, b] = z(!1), [_, v] = z(null), p = H(!1), x = H(null), A = H(s);
|
|
41
|
+
A.current = s;
|
|
42
|
+
const M = H(i);
|
|
43
|
+
M.current = i;
|
|
44
|
+
const N = H({
|
|
45
45
|
userId: t == null ? void 0 : t.id,
|
|
46
46
|
apiKey: a,
|
|
47
47
|
serviceConfig: s,
|
|
48
48
|
capabilities: r
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
renderCount:
|
|
49
|
+
}), L = H(0);
|
|
50
|
+
L.current++, o("📊 RENDER INFO", {
|
|
51
|
+
renderCount: L.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: N.current.userId !== (t == null ? void 0 : t.id),
|
|
55
|
+
apiKeyChanged: N.current.apiKey !== a,
|
|
56
|
+
serviceConfigChanged: N.current.serviceConfig !== s,
|
|
57
|
+
capabilitiesChanged: N.current.capabilities !== r
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
59
|
+
}), N.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
|
|
65
|
+
const $ = H(null);
|
|
66
|
+
a && ((D = $.current) == null ? void 0 : D.apiKey) !== a && ($.current = { apiKey: a, client: new Tn(a) });
|
|
67
|
+
const O = a ? ((I = $.current) == null ? void 0 : I.client) ?? null : null;
|
|
68
68
|
X(() => {
|
|
69
|
-
const
|
|
70
|
-
if (!a || !
|
|
69
|
+
const T = L.current, S = A.current;
|
|
70
|
+
if (!a || !O || !S) {
|
|
71
71
|
o("⚠️ SERVICE INIT SKIPPED", {
|
|
72
|
-
renderCount:
|
|
72
|
+
renderCount: T,
|
|
73
73
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
74
74
|
});
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
o("🚀 CREATING SERVICE", {
|
|
78
|
-
renderCount:
|
|
78
|
+
renderCount: T,
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
80
80
|
});
|
|
81
|
-
const
|
|
82
|
-
...
|
|
81
|
+
const P = new In({
|
|
82
|
+
...S,
|
|
83
83
|
apiKey: a,
|
|
84
|
-
debug:
|
|
85
|
-
client:
|
|
84
|
+
debug: M.current,
|
|
85
|
+
client: O
|
|
86
86
|
});
|
|
87
|
-
|
|
88
|
-
renderCount:
|
|
89
|
-
serviceInstance: !!
|
|
87
|
+
x.current = P, d(P), o("✅ SERVICE SET", {
|
|
88
|
+
renderCount: T,
|
|
89
|
+
serviceInstance: !!P
|
|
90
90
|
});
|
|
91
|
-
}, [a,
|
|
92
|
-
const
|
|
91
|
+
}, [a, O]);
|
|
92
|
+
const E = H(null);
|
|
93
93
|
X(() => {
|
|
94
|
-
var
|
|
94
|
+
var S, P;
|
|
95
95
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
96
96
|
hasService: !!l,
|
|
97
97
|
hasUser: !!t,
|
|
98
98
|
userId: t == null ? void 0 : t.id,
|
|
99
|
-
isConnecting:
|
|
99
|
+
isConnecting: p.current,
|
|
100
100
|
isConnected: u,
|
|
101
101
|
dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
|
|
102
102
|
}), !l || !t) {
|
|
103
103
|
o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
106
|
+
if (p.current) {
|
|
107
107
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
if (((
|
|
110
|
+
if (((S = E.current) == null ? void 0 : S.serviceId) === l && ((P = E.current) == null ? void 0 : P.userId) === t.id) {
|
|
111
111
|
o(
|
|
112
112
|
"⚠️ USER CONNECTION SKIPPED",
|
|
113
113
|
"Already connected this user with this service"
|
|
@@ -115,35 +115,35 @@ const qt = Ye({
|
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
(async () => {
|
|
118
|
-
o("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
118
|
+
o("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
|
|
119
119
|
try {
|
|
120
120
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
121
121
|
const F = await l.connectUser(t);
|
|
122
|
-
g(F), f(!0),
|
|
122
|
+
g(F), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
123
123
|
userId: t.id,
|
|
124
124
|
clientId: F.userID
|
|
125
125
|
});
|
|
126
126
|
} catch (F) {
|
|
127
|
-
const
|
|
128
|
-
|
|
127
|
+
const Y = F instanceof Error ? F.message : "Connection failed";
|
|
128
|
+
v(Y), o("❌ USER CONNECTION ERROR", {
|
|
129
129
|
userId: t.id,
|
|
130
|
-
error:
|
|
130
|
+
error: Y
|
|
131
131
|
});
|
|
132
132
|
} finally {
|
|
133
|
-
|
|
133
|
+
b(!1), p.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
134
134
|
userId: t.id,
|
|
135
135
|
isConnected: u
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
})();
|
|
139
139
|
}, [l, t, o, u]), X(() => {
|
|
140
|
-
const
|
|
140
|
+
const T = O;
|
|
141
141
|
return () => {
|
|
142
|
-
var
|
|
143
|
-
|
|
142
|
+
var S;
|
|
143
|
+
T && (E.current = null, (S = x.current) == null || S.disconnectUser().catch(console.error));
|
|
144
144
|
};
|
|
145
|
-
}, [
|
|
146
|
-
const
|
|
145
|
+
}, [O]);
|
|
146
|
+
const k = K(async () => {
|
|
147
147
|
if (o("🔄 REFRESH CONNECTION CALLED", {
|
|
148
148
|
hasService: !!l,
|
|
149
149
|
hasUser: !!t
|
|
@@ -151,62 +151,62 @@ const qt = Ye({
|
|
|
151
151
|
o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
154
|
+
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
|
|
155
155
|
try {
|
|
156
156
|
o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
|
|
157
|
-
const
|
|
158
|
-
g(
|
|
159
|
-
} catch (
|
|
160
|
-
const
|
|
161
|
-
|
|
157
|
+
const T = await l.connectUser(t);
|
|
158
|
+
g(T), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
159
|
+
} catch (T) {
|
|
160
|
+
const S = T instanceof Error ? T.message : "Refresh failed";
|
|
161
|
+
v(S), o("❌ CONNECTION REFRESH ERROR", {
|
|
162
162
|
userId: t.id,
|
|
163
|
-
error:
|
|
163
|
+
error: S
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
|
-
|
|
166
|
+
b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
167
167
|
}
|
|
168
|
-
}, [l, t, o]),
|
|
168
|
+
}, [l, t, o]), R = U.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
169
169
|
hasService: !!l,
|
|
170
170
|
hasClient: !!m,
|
|
171
171
|
isConnected: u,
|
|
172
172
|
isLoading: c,
|
|
173
|
-
hasError: !!
|
|
173
|
+
hasError: !!_,
|
|
174
174
|
capabilitiesKeys: Object.keys(r)
|
|
175
175
|
}), {
|
|
176
176
|
service: l,
|
|
177
177
|
client: m,
|
|
178
178
|
isConnected: u,
|
|
179
179
|
isLoading: c,
|
|
180
|
-
error:
|
|
180
|
+
error: _,
|
|
181
181
|
capabilities: r,
|
|
182
|
-
refreshConnection:
|
|
182
|
+
refreshConnection: k,
|
|
183
183
|
debug: i
|
|
184
184
|
}), [
|
|
185
185
|
l,
|
|
186
186
|
m,
|
|
187
187
|
u,
|
|
188
188
|
c,
|
|
189
|
-
|
|
189
|
+
_,
|
|
190
190
|
r,
|
|
191
|
-
|
|
191
|
+
k,
|
|
192
192
|
i,
|
|
193
193
|
o
|
|
194
194
|
]);
|
|
195
195
|
return o("🔄 RENDER END", {
|
|
196
|
-
renderCount:
|
|
197
|
-
willRenderChat: !!
|
|
198
|
-
contextValueReady: !!
|
|
199
|
-
}), /* @__PURE__ */ n(qt.Provider, { value:
|
|
196
|
+
renderCount: L.current,
|
|
197
|
+
willRenderChat: !!O,
|
|
198
|
+
contextValueReady: !!R
|
|
199
|
+
}), /* @__PURE__ */ n(qt.Provider, { value: R, children: O ? /* @__PURE__ */ n(
|
|
200
200
|
An,
|
|
201
201
|
{
|
|
202
|
-
client:
|
|
202
|
+
client: O,
|
|
203
203
|
customClasses: {
|
|
204
204
|
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
|
|
205
205
|
},
|
|
206
206
|
children: e
|
|
207
207
|
}
|
|
208
208
|
) : e });
|
|
209
|
-
},
|
|
209
|
+
}, Ps = () => Xe(), Wt = (e) => {
|
|
210
210
|
var a, r;
|
|
211
211
|
const [t, s] = z(
|
|
212
212
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -228,18 +228,18 @@ const qt = Ye({
|
|
|
228
228
|
e.off("member.updated", i);
|
|
229
229
|
};
|
|
230
230
|
}, [e]), t;
|
|
231
|
-
},
|
|
232
|
-
function
|
|
233
|
-
return
|
|
231
|
+
}, zs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
232
|
+
function $s(e) {
|
|
233
|
+
return zs.test(e.trim());
|
|
234
234
|
}
|
|
235
235
|
function Dt(e, t) {
|
|
236
236
|
const s = e == null ? void 0 : e.trim();
|
|
237
|
-
return !s || t && s === t ? !1 :
|
|
237
|
+
return !s || t && s === t ? !1 : !$s(s);
|
|
238
238
|
}
|
|
239
239
|
function Xt(e) {
|
|
240
240
|
return Dt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Dt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const Ot = [
|
|
243
243
|
"🍎",
|
|
244
244
|
// Apple
|
|
245
245
|
"🍌",
|
|
@@ -267,7 +267,7 @@ const Pt = [
|
|
|
267
267
|
"🍈"
|
|
268
268
|
// Melon
|
|
269
269
|
];
|
|
270
|
-
function
|
|
270
|
+
function Fs(e) {
|
|
271
271
|
let t = 0;
|
|
272
272
|
for (let s = 0; s < e.length; s++) {
|
|
273
273
|
const a = e.charCodeAt(s);
|
|
@@ -275,11 +275,11 @@ function Us(e) {
|
|
|
275
275
|
}
|
|
276
276
|
return Math.abs(t);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
const s =
|
|
280
|
-
return
|
|
278
|
+
function Bs(e) {
|
|
279
|
+
const s = Fs(e) % Ot.length;
|
|
280
|
+
return Ot[s];
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const oe = ({
|
|
283
283
|
id: e,
|
|
284
284
|
image: t,
|
|
285
285
|
size: s = 40,
|
|
@@ -288,7 +288,7 @@ const re = ({
|
|
|
288
288
|
shape: i = "squircle",
|
|
289
289
|
dmAgentEnabled: o = !1
|
|
290
290
|
}) => {
|
|
291
|
-
const l =
|
|
291
|
+
const l = Bs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
292
292
|
"img",
|
|
293
293
|
{
|
|
294
294
|
src: t,
|
|
@@ -299,7 +299,7 @@ const re = ({
|
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
"aria-hidden": "true",
|
|
302
|
-
className:
|
|
302
|
+
className: y(
|
|
303
303
|
"avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
|
|
304
304
|
m
|
|
305
305
|
),
|
|
@@ -309,7 +309,7 @@ const re = ({
|
|
|
309
309
|
return /* @__PURE__ */ h(
|
|
310
310
|
"div",
|
|
311
311
|
{
|
|
312
|
-
className:
|
|
312
|
+
className: y(
|
|
313
313
|
"relative flex-shrink-0 !bg-transparent",
|
|
314
314
|
a
|
|
315
315
|
),
|
|
@@ -331,7 +331,7 @@ const re = ({
|
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
333
333
|
"data-testid": "avatar-ring",
|
|
334
|
-
className:
|
|
334
|
+
className: y(
|
|
335
335
|
"h-full w-full",
|
|
336
336
|
"bg-transparent"
|
|
337
337
|
),
|
|
@@ -350,7 +350,7 @@ const re = ({
|
|
|
350
350
|
]
|
|
351
351
|
}
|
|
352
352
|
);
|
|
353
|
-
},
|
|
353
|
+
}, Us = "https://linktr.ee/s/about/trust-center/report", js = ({
|
|
354
354
|
channel: e,
|
|
355
355
|
participant: t,
|
|
356
356
|
showBlockParticipant: s = !0,
|
|
@@ -363,78 +363,78 @@ const re = ({
|
|
|
363
363
|
onActionComplete: m,
|
|
364
364
|
logLabel: g = "useChannelModerationActions"
|
|
365
365
|
}) => {
|
|
366
|
-
var
|
|
367
|
-
const { service: u, debug: f } = Xe(), c = (
|
|
366
|
+
var D;
|
|
367
|
+
const { service: u, debug: f } = Xe(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, b = !!(a && s && u && c), [_, v] = z(!1), [p, x] = z(null), [A, M] = z(!1), [N, L] = z(!1), $ = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
|
|
368
368
|
return X(() => {
|
|
369
|
-
if (!
|
|
370
|
-
|
|
369
|
+
if (!b || !u || !c) {
|
|
370
|
+
v(!1), x(null);
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
373
|
-
let
|
|
373
|
+
let I = !1;
|
|
374
374
|
return (async () => {
|
|
375
375
|
try {
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
(
|
|
376
|
+
const T = await u.getBlockedUsers();
|
|
377
|
+
if (I) return;
|
|
378
|
+
v(
|
|
379
|
+
T.some(
|
|
380
|
+
(S) => S.blocked_user_id === c
|
|
381
381
|
)
|
|
382
382
|
);
|
|
383
|
-
} catch (
|
|
384
|
-
|
|
383
|
+
} catch (T) {
|
|
384
|
+
I || console.error(`[${g}] Failed to check blocked status:`, T);
|
|
385
385
|
} finally {
|
|
386
|
-
|
|
386
|
+
I || x({ participantId: c, service: u });
|
|
387
387
|
}
|
|
388
388
|
})(), () => {
|
|
389
|
-
|
|
389
|
+
I = !0;
|
|
390
390
|
};
|
|
391
|
-
}, [
|
|
392
|
-
isParticipantBlocked:
|
|
391
|
+
}, [b, u, c, g]), {
|
|
392
|
+
isParticipantBlocked: _,
|
|
393
393
|
isCheckingBlockedStatus: $,
|
|
394
|
-
isLeaving:
|
|
395
|
-
isUpdatingBlockStatus:
|
|
394
|
+
isLeaving: A,
|
|
395
|
+
isUpdatingBlockStatus: N,
|
|
396
396
|
handleLeaveConversation: async () => {
|
|
397
|
-
var
|
|
398
|
-
if (!
|
|
399
|
-
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid),
|
|
397
|
+
var I;
|
|
398
|
+
if (!A) {
|
|
399
|
+
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), M(!0);
|
|
400
400
|
try {
|
|
401
|
-
const
|
|
402
|
-
await e.hide(
|
|
403
|
-
} catch (
|
|
404
|
-
console.error(`[${g}] Failed to leave conversation`,
|
|
401
|
+
const T = ((I = e._client) == null ? void 0 : I.userID) ?? null;
|
|
402
|
+
await e.hide(T, !1), r && await r(e), m == null || m();
|
|
403
|
+
} catch (T) {
|
|
404
|
+
console.error(`[${g}] Failed to leave conversation`, T);
|
|
405
405
|
} finally {
|
|
406
|
-
|
|
406
|
+
M(!1);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
handleBlockUser: async () => {
|
|
411
|
-
var
|
|
412
|
-
if (!(
|
|
413
|
-
l == null || l(), f && console.log(`[${g}] Block member`, (
|
|
411
|
+
var I, T, S;
|
|
412
|
+
if (!(N || !u)) {
|
|
413
|
+
l == null || l(), f && console.log(`[${g}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), L(!0);
|
|
414
414
|
try {
|
|
415
|
-
await u.blockUser((
|
|
416
|
-
} catch (
|
|
417
|
-
console.error(`[${g}] Failed to block member`,
|
|
415
|
+
await u.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
|
|
416
|
+
} catch (P) {
|
|
417
|
+
console.error(`[${g}] Failed to block member`, P);
|
|
418
418
|
} finally {
|
|
419
|
-
|
|
419
|
+
L(!1);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
handleUnblockUser: async () => {
|
|
424
|
-
var
|
|
425
|
-
if (!(
|
|
426
|
-
l == null || l(), f && console.log(`[${g}] Unblock member`, (
|
|
424
|
+
var I, T, S;
|
|
425
|
+
if (!(N || !u)) {
|
|
426
|
+
l == null || l(), f && console.log(`[${g}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), L(!0);
|
|
427
427
|
try {
|
|
428
|
-
await u.unBlockUser((
|
|
429
|
-
} catch (
|
|
430
|
-
console.error(`[${g}] Failed to unblock member`,
|
|
428
|
+
await u.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
|
|
429
|
+
} catch (P) {
|
|
430
|
+
console.error(`[${g}] Failed to unblock member`, P);
|
|
431
431
|
} finally {
|
|
432
|
-
|
|
432
|
+
L(!1);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
},
|
|
436
436
|
handleReportUser: () => {
|
|
437
|
-
d == null || d(), m == null || m(), window.open(
|
|
437
|
+
d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
|
|
438
438
|
}
|
|
439
439
|
};
|
|
440
440
|
}, ge = ({
|
|
@@ -446,7 +446,7 @@ const re = ({
|
|
|
446
446
|
"button",
|
|
447
447
|
{
|
|
448
448
|
type: "button",
|
|
449
|
-
className:
|
|
449
|
+
className: y(
|
|
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
|
|
@@ -454,7 +454,7 @@ const re = ({
|
|
|
454
454
|
...a,
|
|
455
455
|
children: s
|
|
456
456
|
}
|
|
457
|
-
),
|
|
457
|
+
), Pt = ({
|
|
458
458
|
channel: e,
|
|
459
459
|
participant: t,
|
|
460
460
|
showDeleteConversation: s = !0,
|
|
@@ -468,16 +468,16 @@ const re = ({
|
|
|
468
468
|
customChannelActions: g,
|
|
469
469
|
triggerClassName: u
|
|
470
470
|
}) => {
|
|
471
|
-
const [f, c] = z(!1),
|
|
472
|
-
isParticipantBlocked:
|
|
473
|
-
isCheckingBlockedStatus:
|
|
474
|
-
isLeaving:
|
|
475
|
-
isUpdatingBlockStatus:
|
|
476
|
-
handleLeaveConversation:
|
|
477
|
-
handleBlockUser:
|
|
471
|
+
const [f, c] = z(!1), b = H(null), _ = Sn(), v = K(() => c(!1), []), {
|
|
472
|
+
isParticipantBlocked: p,
|
|
473
|
+
isCheckingBlockedStatus: x,
|
|
474
|
+
isLeaving: A,
|
|
475
|
+
isUpdatingBlockStatus: M,
|
|
476
|
+
handleLeaveConversation: N,
|
|
477
|
+
handleBlockUser: L,
|
|
478
478
|
handleUnblockUser: $,
|
|
479
|
-
handleReportUser:
|
|
480
|
-
} =
|
|
479
|
+
handleReportUser: O
|
|
480
|
+
} = js({
|
|
481
481
|
channel: e,
|
|
482
482
|
participant: t,
|
|
483
483
|
showBlockParticipant: a,
|
|
@@ -487,20 +487,20 @@ const re = ({
|
|
|
487
487
|
onDeleteConversationClick: l,
|
|
488
488
|
onBlockParticipantClick: d,
|
|
489
489
|
onReportParticipantClick: m,
|
|
490
|
-
onActionComplete:
|
|
490
|
+
onActionComplete: v,
|
|
491
491
|
logLabel: "ChannelActionsMenu"
|
|
492
492
|
});
|
|
493
493
|
return X(() => {
|
|
494
494
|
if (!f) return;
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
},
|
|
498
|
-
|
|
495
|
+
const k = (D) => {
|
|
496
|
+
b.current && !b.current.contains(D.target) && c(!1);
|
|
497
|
+
}, R = (D) => {
|
|
498
|
+
D.key === "Escape" && c(!1);
|
|
499
499
|
};
|
|
500
|
-
return document.addEventListener("mousedown",
|
|
501
|
-
document.removeEventListener("mousedown",
|
|
500
|
+
return document.addEventListener("mousedown", k), document.addEventListener("keydown", R), () => {
|
|
501
|
+
document.removeEventListener("mousedown", k), document.removeEventListener("keydown", R);
|
|
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
|
{
|
|
@@ -508,8 +508,8 @@ const re = ({
|
|
|
508
508
|
type: "button",
|
|
509
509
|
"aria-haspopup": "true",
|
|
510
510
|
"aria-expanded": f,
|
|
511
|
-
"aria-controls": f ?
|
|
512
|
-
onClick: () => c((
|
|
511
|
+
"aria-controls": f ? _ : void 0,
|
|
512
|
+
onClick: () => c((k) => !k),
|
|
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" })
|
|
@@ -519,9 +519,9 @@ const re = ({
|
|
|
519
519
|
f && /* @__PURE__ */ n(
|
|
520
520
|
"div",
|
|
521
521
|
{
|
|
522
|
-
id:
|
|
522
|
+
id: _,
|
|
523
523
|
"aria-label": "Conversation options",
|
|
524
|
-
className:
|
|
524
|
+
className: y(
|
|
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,46 +529,46 @@ const re = ({
|
|
|
529
529
|
s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
|
|
530
530
|
ge,
|
|
531
531
|
{
|
|
532
|
-
onClick:
|
|
533
|
-
disabled:
|
|
534
|
-
"aria-busy":
|
|
532
|
+
onClick: N,
|
|
533
|
+
disabled: A,
|
|
534
|
+
"aria-busy": A,
|
|
535
535
|
children: [
|
|
536
|
-
|
|
536
|
+
A ? /* @__PURE__ */ n(ke, { 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
|
}
|
|
540
540
|
) }),
|
|
541
|
-
a && /* @__PURE__ */ n("li", { children:
|
|
541
|
+
a && /* @__PURE__ */ n("li", { children: x ? (
|
|
542
542
|
// Block status not yet resolved — show a disabled placeholder
|
|
543
543
|
// so a premature click can't act on a stale block state.
|
|
544
544
|
/* @__PURE__ */ h(ge, { disabled: !0, "aria-busy": !0, children: [
|
|
545
545
|
/* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }),
|
|
546
546
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
547
547
|
] })
|
|
548
|
-
) :
|
|
548
|
+
) : p ? /* @__PURE__ */ h(
|
|
549
549
|
ge,
|
|
550
550
|
{
|
|
551
551
|
onClick: $,
|
|
552
|
-
disabled:
|
|
553
|
-
"aria-busy":
|
|
552
|
+
disabled: M,
|
|
553
|
+
"aria-busy": M,
|
|
554
554
|
children: [
|
|
555
|
-
|
|
555
|
+
M ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
|
|
556
556
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
559
|
) : /* @__PURE__ */ h(
|
|
560
560
|
ge,
|
|
561
561
|
{
|
|
562
|
-
onClick:
|
|
563
|
-
disabled:
|
|
564
|
-
"aria-busy":
|
|
562
|
+
onClick: L,
|
|
563
|
+
disabled: M,
|
|
564
|
+
"aria-busy": M,
|
|
565
565
|
children: [
|
|
566
|
-
|
|
566
|
+
M ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
|
|
567
567
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
568
568
|
]
|
|
569
569
|
}
|
|
570
570
|
) }),
|
|
571
|
-
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick:
|
|
571
|
+
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: O, children: [
|
|
572
572
|
/* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
|
|
573
573
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
574
574
|
] }) }),
|
|
@@ -577,30 +577,30 @@ const re = ({
|
|
|
577
577
|
}
|
|
578
578
|
)
|
|
579
579
|
] });
|
|
580
|
-
},
|
|
581
|
-
function
|
|
582
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
580
|
+
}, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ge = "vote_up", He = "vote_down";
|
|
581
|
+
function Gs(e) {
|
|
582
|
+
return e != null && e.length ? e.some((t) => t.type === He) ? "down" : e.some((t) => t.type === Ge) ? "up" : null : null;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
const { channel: t } =
|
|
586
|
-
() =>
|
|
584
|
+
function Hs(e) {
|
|
585
|
+
const { channel: t } = de(), { client: s } = We("useMessageVote"), a = ne(
|
|
586
|
+
() => Gs(e.own_reactions),
|
|
587
587
|
[e.own_reactions]
|
|
588
|
-
), r =
|
|
588
|
+
), r = K(async () => {
|
|
589
589
|
if (s != null && s.userID)
|
|
590
590
|
try {
|
|
591
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
591
|
+
a === "up" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
|
|
592
592
|
e.id,
|
|
593
|
-
{ type:
|
|
593
|
+
{ type: Ge },
|
|
594
594
|
{ enforce_unique: !0, skip_push: !0 }
|
|
595
595
|
);
|
|
596
596
|
} catch {
|
|
597
597
|
}
|
|
598
|
-
}, [t, s == null ? void 0 : s.userID, e.id, a]), i =
|
|
598
|
+
}, [t, s == null ? void 0 : s.userID, e.id, a]), i = K(async () => {
|
|
599
599
|
if (s != null && s.userID)
|
|
600
600
|
try {
|
|
601
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
601
|
+
a === "down" ? await t.deleteReaction(e.id, He) : await t.sendReaction(
|
|
602
602
|
e.id,
|
|
603
|
-
{ type:
|
|
603
|
+
{ type: He },
|
|
604
604
|
{ enforce_unique: !0, skip_push: !0 }
|
|
605
605
|
);
|
|
606
606
|
} catch {
|
|
@@ -608,7 +608,7 @@ function qs(e) {
|
|
|
608
608
|
}, [t, s == null ? void 0 : s.userID, e.id, a]);
|
|
609
609
|
return { selected: a, voteUp: r, voteDown: i };
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function Ys(e) {
|
|
612
612
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
613
613
|
}
|
|
614
614
|
function Kt({
|
|
@@ -616,16 +616,16 @@ function Kt({
|
|
|
616
616
|
viewerLanguage: t
|
|
617
617
|
}) {
|
|
618
618
|
var r;
|
|
619
|
-
const s = e == null ? void 0 : e.text, a =
|
|
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
|
|
622
|
+
const qs = U.lazy(() => import("./Card-CBi3z_Wt.js")), Ws = U.lazy(() => import("./Card-D3-jTRWp.js")), Xs = U.lazy(() => import("./Card-Cbw4GBkm.js")), Ke = () => /* @__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)]",
|
|
626
626
|
"aria-hidden": !0
|
|
627
627
|
}
|
|
628
|
-
),
|
|
628
|
+
), Ks = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Jt, Zs = Zt, zt = { Composer: Ks, Sent: Jt, Received: Zt, Creator: Js, Visitor: Zs }, Qs = [
|
|
629
629
|
[/pdf/, "pdf"],
|
|
630
630
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
631
631
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -635,21 +635,21 @@ const Xs = U.lazy(() => import("./Card-beoX9cug.js")), Ks = U.lazy(() => import(
|
|
|
635
635
|
[/plain|rtf/, "text"],
|
|
636
636
|
[/markdown/, "markdown"]
|
|
637
637
|
];
|
|
638
|
-
function
|
|
638
|
+
function ae(e) {
|
|
639
639
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
640
640
|
}
|
|
641
641
|
function Qt(e) {
|
|
642
|
-
const t =
|
|
642
|
+
const t = Qs.find(
|
|
643
643
|
([s]) => s.test(e)
|
|
644
644
|
);
|
|
645
645
|
return t ? t[1] : "generic";
|
|
646
646
|
}
|
|
647
|
-
const
|
|
647
|
+
const ea = {
|
|
648
648
|
video: Ht,
|
|
649
649
|
audio: bs,
|
|
650
650
|
image: gs,
|
|
651
651
|
document: Gt
|
|
652
|
-
},
|
|
652
|
+
}, ta = {
|
|
653
653
|
pdf: Cs,
|
|
654
654
|
doc: ys,
|
|
655
655
|
xls: Ns,
|
|
@@ -660,17 +660,17 @@ const na = {
|
|
|
660
660
|
markdown: ps,
|
|
661
661
|
generic: Gt
|
|
662
662
|
};
|
|
663
|
-
function
|
|
664
|
-
const t =
|
|
665
|
-
return t !== "document" ?
|
|
663
|
+
function na(e) {
|
|
664
|
+
const t = ae(e);
|
|
665
|
+
return t !== "document" ? ea[t] : ta[Qt(e)];
|
|
666
666
|
}
|
|
667
|
-
function
|
|
668
|
-
return U.createElement(
|
|
667
|
+
function ce(e, t) {
|
|
668
|
+
return U.createElement(na(e), t);
|
|
669
669
|
}
|
|
670
|
-
const
|
|
670
|
+
const sa = (e) => {
|
|
671
671
|
var t, s;
|
|
672
672
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
|
|
673
|
-
},
|
|
673
|
+
}, aa = ({
|
|
674
674
|
source: e,
|
|
675
675
|
mimeType: t,
|
|
676
676
|
poster: s,
|
|
@@ -682,78 +682,78 @@ const ra = (e) => {
|
|
|
682
682
|
muted: d = !1,
|
|
683
683
|
onContainerClick: m
|
|
684
684
|
}) => {
|
|
685
|
-
const g =
|
|
686
|
-
|
|
687
|
-
}, []),
|
|
685
|
+
const g = ae(t), u = H(null), f = H(null), c = H(null), b = H(r), [_, v] = z(a), [p, x] = z(0), [A, M] = z(!1), [N, L] = z(!1), [$, O] = z(!1), [E, k] = z(!1), [R, D] = z(!0), [I, T] = z(null), S = K(() => {
|
|
686
|
+
O(!1), v(!0);
|
|
687
|
+
}, []), P = K((w) => {
|
|
688
688
|
const C = f.current;
|
|
689
689
|
if (!C) return 0;
|
|
690
690
|
const B = C.getBoundingClientRect();
|
|
691
691
|
return Math.max(
|
|
692
692
|
0,
|
|
693
|
-
Math.min(1, (
|
|
693
|
+
Math.min(1, (sa(w) - B.left) / B.width)
|
|
694
694
|
);
|
|
695
|
-
}, []), F =
|
|
695
|
+
}, []), F = K((w) => {
|
|
696
696
|
const C = u.current;
|
|
697
|
-
C && C.duration && (C.currentTime =
|
|
698
|
-
}, []),
|
|
699
|
-
|
|
700
|
-
const C =
|
|
701
|
-
|
|
697
|
+
C && C.duration && (C.currentTime = w * C.duration);
|
|
698
|
+
}, []), Y = (w) => {
|
|
699
|
+
w.stopPropagation(), M(!0);
|
|
700
|
+
const C = P(w);
|
|
701
|
+
x(C), F(C);
|
|
702
702
|
};
|
|
703
703
|
X(() => {
|
|
704
|
-
r !== void 0 && r !==
|
|
704
|
+
r !== void 0 && r !== b.current && (b.current = r, v(r));
|
|
705
705
|
}, [r]), X(() => {
|
|
706
|
-
if (!
|
|
706
|
+
if (!_) {
|
|
707
707
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
|
-
const
|
|
710
|
+
const w = () => {
|
|
711
711
|
const C = u.current;
|
|
712
|
-
C && C.duration && !
|
|
712
|
+
C && C.duration && !A && x(C.currentTime / C.duration), c.current = requestAnimationFrame(w);
|
|
713
713
|
};
|
|
714
|
-
return c.current = requestAnimationFrame(
|
|
714
|
+
return c.current = requestAnimationFrame(w), () => {
|
|
715
715
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
716
716
|
};
|
|
717
|
-
}, [
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}) :
|
|
722
|
-
}, [
|
|
723
|
-
if (!
|
|
724
|
-
const
|
|
725
|
-
|
|
717
|
+
}, [_, A]), X(() => {
|
|
718
|
+
const w = u.current;
|
|
719
|
+
w && (_ ? w.play().catch((C) => {
|
|
720
|
+
v(!1), O(!0);
|
|
721
|
+
}) : w.pause());
|
|
722
|
+
}, [_]), X(() => {
|
|
723
|
+
if (!A) return;
|
|
724
|
+
const w = (B) => x(P(B)), C = (B) => {
|
|
725
|
+
M(!1), F(P(B));
|
|
726
726
|
};
|
|
727
|
-
return window.addEventListener("mousemove",
|
|
728
|
-
window.removeEventListener("mousemove",
|
|
727
|
+
return window.addEventListener("mousemove", w), window.addEventListener("mouseup", C), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", C), () => {
|
|
728
|
+
window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", C);
|
|
729
729
|
};
|
|
730
|
-
}, [
|
|
731
|
-
const
|
|
730
|
+
}, [A, P, F]);
|
|
731
|
+
const Z = I ? { aspectRatio: String(I) } : void 0, q = I ? "" : " 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:
|
|
739
|
-
onClick: (
|
|
737
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${q}`,
|
|
738
|
+
style: Z,
|
|
739
|
+
onClick: (w) => {
|
|
740
740
|
if (m) {
|
|
741
|
-
m(
|
|
741
|
+
m(w);
|
|
742
742
|
return;
|
|
743
743
|
}
|
|
744
|
-
$ || o &&
|
|
744
|
+
$ || o && v((C) => !C);
|
|
745
745
|
},
|
|
746
|
-
onKeyDown: (
|
|
747
|
-
if (!(
|
|
748
|
-
if (
|
|
749
|
-
m(
|
|
746
|
+
onKeyDown: (w) => {
|
|
747
|
+
if (!(w.key !== "Enter" && w.key !== " ")) {
|
|
748
|
+
if (w.preventDefault(), m) {
|
|
749
|
+
m(w);
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
$ || o &&
|
|
752
|
+
$ || o && v((C) => !C);
|
|
753
753
|
}
|
|
754
754
|
},
|
|
755
755
|
children: [
|
|
756
|
-
s && (g === "audio" ||
|
|
756
|
+
s && (g === "audio" || R) && /* @__PURE__ */ n(
|
|
757
757
|
"img",
|
|
758
758
|
{
|
|
759
759
|
src: s,
|
|
@@ -761,7 +761,7 @@ const ra = (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" || R) && /* @__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
|
}) }),
|
|
@@ -773,14 +773,14 @@ const ra = (e) => {
|
|
|
773
773
|
loop: i,
|
|
774
774
|
muted: d,
|
|
775
775
|
style: { width: "100%", height: "100%" },
|
|
776
|
-
onLoadStart: () =>
|
|
776
|
+
onLoadStart: () => k(!0),
|
|
777
777
|
onCanPlay: () => {
|
|
778
|
-
|
|
778
|
+
k(!1), D(!1);
|
|
779
779
|
},
|
|
780
|
-
onWaiting: () =>
|
|
781
|
-
onPlay: () =>
|
|
780
|
+
onWaiting: () => k(!0),
|
|
781
|
+
onPlay: () => O(!1),
|
|
782
782
|
onEnded: () => {
|
|
783
|
-
i || (
|
|
783
|
+
i || (v(!1), x(0));
|
|
784
784
|
},
|
|
785
785
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
786
786
|
}
|
|
@@ -793,23 +793,23 @@ const ra = (e) => {
|
|
|
793
793
|
muted: d,
|
|
794
794
|
playsInline: !0,
|
|
795
795
|
style: { width: "100%", height: "100%" },
|
|
796
|
-
onLoadStart: () =>
|
|
796
|
+
onLoadStart: () => k(!0),
|
|
797
797
|
onCanPlay: () => {
|
|
798
|
-
|
|
798
|
+
k(!1), D(!1);
|
|
799
799
|
},
|
|
800
|
-
onWaiting: () =>
|
|
801
|
-
onPlay: () =>
|
|
800
|
+
onWaiting: () => k(!0),
|
|
801
|
+
onPlay: () => O(!1),
|
|
802
802
|
onLoadedMetadata: () => {
|
|
803
|
-
const
|
|
804
|
-
|
|
803
|
+
const w = u.current;
|
|
804
|
+
w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && T(w.videoWidth / w.videoHeight);
|
|
805
805
|
},
|
|
806
806
|
onEnded: () => {
|
|
807
|
-
i || (
|
|
807
|
+
i || (v(!1), x(0));
|
|
808
808
|
},
|
|
809
809
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
810
810
|
}
|
|
811
811
|
) }),
|
|
812
|
-
|
|
812
|
+
E && !$ && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
813
813
|
pe,
|
|
814
814
|
{
|
|
815
815
|
className: "size-8 animate-spin text-white/80",
|
|
@@ -823,11 +823,11 @@ const ra = (e) => {
|
|
|
823
823
|
role: "button",
|
|
824
824
|
tabIndex: 0,
|
|
825
825
|
"aria-label": "Play preview",
|
|
826
|
-
onClick: (
|
|
827
|
-
|
|
826
|
+
onClick: (w) => {
|
|
827
|
+
w.stopPropagation(), S();
|
|
828
828
|
},
|
|
829
|
-
onKeyDown: (
|
|
830
|
-
|
|
829
|
+
onKeyDown: (w) => {
|
|
830
|
+
w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), S());
|
|
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(Ue, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
833
833
|
}
|
|
@@ -837,23 +837,23 @@ const ra = (e) => {
|
|
|
837
837
|
{
|
|
838
838
|
role: "slider",
|
|
839
839
|
"aria-label": "Playback position",
|
|
840
|
-
"aria-valuenow":
|
|
840
|
+
"aria-valuenow": G,
|
|
841
841
|
"aria-valuemin": 0,
|
|
842
842
|
"aria-valuemax": 100,
|
|
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:
|
|
848
|
-
onClick: (
|
|
849
|
-
onKeyDown: (
|
|
850
|
-
|
|
846
|
+
onMouseDown: Y,
|
|
847
|
+
onTouchStart: Y,
|
|
848
|
+
onClick: (w) => w.stopPropagation(),
|
|
849
|
+
onKeyDown: (w) => {
|
|
850
|
+
w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(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",
|
|
854
854
|
{
|
|
855
855
|
className: "h-full rounded-full bg-white",
|
|
856
|
-
style: { width: `${
|
|
856
|
+
style: { width: `${G}%` }
|
|
857
857
|
}
|
|
858
858
|
) })
|
|
859
859
|
}
|
|
@@ -863,12 +863,12 @@ const ra = (e) => {
|
|
|
863
863
|
"button",
|
|
864
864
|
{
|
|
865
865
|
type: "button",
|
|
866
|
-
onClick: (
|
|
867
|
-
|
|
866
|
+
onClick: (w) => {
|
|
867
|
+
w.stopPropagation(), v((C) => !C);
|
|
868
868
|
},
|
|
869
869
|
className: "shrink-0 text-white",
|
|
870
|
-
"aria-label":
|
|
871
|
-
children:
|
|
870
|
+
"aria-label": _ ? "Pause" : "Play",
|
|
871
|
+
children: _ ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { className: "size-5 translate-x-px", weight: "fill" })
|
|
872
872
|
}
|
|
873
873
|
),
|
|
874
874
|
/* @__PURE__ */ h(
|
|
@@ -876,30 +876,30 @@ const ra = (e) => {
|
|
|
876
876
|
{
|
|
877
877
|
role: "slider",
|
|
878
878
|
"aria-label": "Playback position",
|
|
879
|
-
"aria-valuenow":
|
|
879
|
+
"aria-valuenow": G,
|
|
880
880
|
"aria-valuemin": 0,
|
|
881
881
|
"aria-valuemax": 100,
|
|
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:
|
|
887
|
-
onClick: (
|
|
888
|
-
onMouseEnter: () =>
|
|
889
|
-
onMouseLeave: () =>
|
|
890
|
-
onKeyDown: (
|
|
891
|
-
|
|
885
|
+
onMouseDown: Y,
|
|
886
|
+
onTouchStart: Y,
|
|
887
|
+
onClick: (w) => w.stopPropagation(),
|
|
888
|
+
onMouseEnter: () => L(!0),
|
|
889
|
+
onMouseLeave: () => L(!1),
|
|
890
|
+
onKeyDown: (w) => {
|
|
891
|
+
w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(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 ${N || A ? "h-1.5" : "h-1"}`,
|
|
898
898
|
children: /* @__PURE__ */ n(
|
|
899
899
|
"div",
|
|
900
900
|
{
|
|
901
901
|
className: "h-full rounded-full bg-white",
|
|
902
|
-
style: { width: `${
|
|
902
|
+
style: { width: `${G}%` }
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
905
|
}
|
|
@@ -907,8 +907,8 @@ const ra = (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 ${
|
|
911
|
-
style: { left: `${
|
|
910
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${N || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
911
|
+
style: { left: `${G}%` }
|
|
912
912
|
}
|
|
913
913
|
)
|
|
914
914
|
]
|
|
@@ -918,7 +918,7 @@ const ra = (e) => {
|
|
|
918
918
|
]
|
|
919
919
|
}
|
|
920
920
|
);
|
|
921
|
-
}, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
921
|
+
}, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
|
|
922
922
|
mimeType: e,
|
|
923
923
|
sourceUrl: t,
|
|
924
924
|
thumbnailUrl: s,
|
|
@@ -927,9 +927,9 @@ const ra = (e) => {
|
|
|
927
927
|
mediaPlayerProps: i,
|
|
928
928
|
containedImage: o = !1
|
|
929
929
|
}) => {
|
|
930
|
-
const l =
|
|
930
|
+
const l = ae(e), [d, m] = z(!1);
|
|
931
931
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
932
|
-
|
|
932
|
+
aa,
|
|
933
933
|
{
|
|
934
934
|
source: t,
|
|
935
935
|
mimeType: e,
|
|
@@ -975,12 +975,12 @@ const ra = (e) => {
|
|
|
975
975
|
"div",
|
|
976
976
|
{
|
|
977
977
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
978
|
-
children:
|
|
978
|
+
children: ce(e, {
|
|
979
979
|
className: $t(r),
|
|
980
980
|
weight: "regular"
|
|
981
981
|
})
|
|
982
982
|
}
|
|
983
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
983
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${ra(r)}`, children: /* @__PURE__ */ n(
|
|
984
984
|
"img",
|
|
985
985
|
{
|
|
986
986
|
src: s,
|
|
@@ -992,7 +992,7 @@ const ra = (e) => {
|
|
|
992
992
|
"div",
|
|
993
993
|
{
|
|
994
994
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
995
|
-
children:
|
|
995
|
+
children: ce(e, {
|
|
996
996
|
className: $t(r),
|
|
997
997
|
weight: "regular"
|
|
998
998
|
})
|
|
@@ -1012,13 +1012,13 @@ const ra = (e) => {
|
|
|
1012
1012
|
rootRef: g,
|
|
1013
1013
|
"data-testid": u
|
|
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
1020
|
"data-testid": u,
|
|
1021
|
-
className:
|
|
1021
|
+
className: y(
|
|
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
|
),
|
|
@@ -1030,17 +1030,17 @@ const ra = (e) => {
|
|
|
1030
1030
|
c.trim() !== "" && /* @__PURE__ */ n(
|
|
1031
1031
|
"p",
|
|
1032
1032
|
{
|
|
1033
|
-
className:
|
|
1033
|
+
className: y("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
|
-
|
|
1043
|
-
className:
|
|
1042
|
+
ce(r, {
|
|
1043
|
+
className: y(
|
|
1044
1044
|
"size-5 shrink-0",
|
|
1045
1045
|
f ? "text-white/55" : "text-black/55"
|
|
1046
1046
|
),
|
|
@@ -1049,7 +1049,7 @@ const ra = (e) => {
|
|
|
1049
1049
|
i != null && i !== "" && /* @__PURE__ */ n(
|
|
1050
1050
|
"span",
|
|
1051
1051
|
{
|
|
1052
|
-
className:
|
|
1052
|
+
className: y(
|
|
1053
1053
|
"text-xs font-medium",
|
|
1054
1054
|
f ? "text-white/55" : "text-black/55"
|
|
1055
1055
|
),
|
|
@@ -1070,19 +1070,19 @@ function nn(e) {
|
|
|
1070
1070
|
function Je(e) {
|
|
1071
1071
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function ia(e) {
|
|
1074
1074
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1076
|
+
function oa(e) {
|
|
1077
1077
|
return e ? "text-white" : "text-black";
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function la(e) {
|
|
1080
1080
|
return e ? "text-white/55" : "text-black/55";
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function ca(e) {
|
|
1083
1083
|
return e ? "text-white/40" : "text-black/40";
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function da(e) {
|
|
1086
1086
|
return e ? "text-white/20" : "text-black/20";
|
|
1087
1087
|
}
|
|
1088
1088
|
const Ze = ({ attachment: e, isMyMessage: t }) => {
|
|
@@ -1097,14 +1097,14 @@ const Ze = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1097
1097
|
) : /* @__PURE__ */ n(
|
|
1098
1098
|
"div",
|
|
1099
1099
|
{
|
|
1100
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1101
|
-
children: /* @__PURE__ */ n(Es, { className: `size-12 ${
|
|
1100
|
+
className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
|
|
1101
|
+
children: /* @__PURE__ */ n(Es, { className: `size-12 ${da(t)}` })
|
|
1102
1102
|
}
|
|
1103
1103
|
) }),
|
|
1104
1104
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
1105
|
-
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1106
|
-
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${
|
|
1107
|
-
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1105
|
+
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${oa(t)}`, children: s }),
|
|
1106
|
+
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${la(t)}`, children: a }),
|
|
1107
|
+
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
|
|
1108
1108
|
] })
|
|
1109
1109
|
] });
|
|
1110
1110
|
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
|
|
@@ -1116,7 +1116,7 @@ function Qe(e) {
|
|
|
1116
1116
|
var t;
|
|
1117
1117
|
return (t = e.attachments) == null ? void 0 : t.find(sn);
|
|
1118
1118
|
}
|
|
1119
|
-
async function
|
|
1119
|
+
async function ua(e, t) {
|
|
1120
1120
|
let s;
|
|
1121
1121
|
try {
|
|
1122
1122
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1128,7 +1128,7 @@ async function ha(e, t) {
|
|
|
1128
1128
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1129
1129
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1131
|
+
const ma = ({
|
|
1132
1132
|
url: e,
|
|
1133
1133
|
filename: t
|
|
1134
1134
|
}) => {
|
|
@@ -1140,7 +1140,7 @@ const fa = ({
|
|
|
1140
1140
|
onClick: (i) => {
|
|
1141
1141
|
i.stopPropagation();
|
|
1142
1142
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1143
|
-
a(!0),
|
|
1143
|
+
a(!0), ua(e, t).then(() => {
|
|
1144
1144
|
o == null || o.close();
|
|
1145
1145
|
}).catch(() => {
|
|
1146
1146
|
o && (o.location.href = e);
|
|
@@ -1156,15 +1156,15 @@ const fa = ({
|
|
|
1156
1156
|
);
|
|
1157
1157
|
};
|
|
1158
1158
|
function et(e) {
|
|
1159
|
-
var u, f, c,
|
|
1159
|
+
var u, f, c, b;
|
|
1160
1160
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1161
|
-
(
|
|
1161
|
+
(_) => _.type === "video" && _.asset_url
|
|
1162
1162
|
), s = (f = e.attachments) == null ? void 0 : f.find(
|
|
1163
|
-
(
|
|
1163
|
+
(_) => _.type === "image" && _.image_url
|
|
1164
1164
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1165
|
-
(
|
|
1166
|
-
), r = (
|
|
1167
|
-
(
|
|
1165
|
+
(_) => _.type === "audio" && _.asset_url
|
|
1166
|
+
), r = (b = e.attachments) == null ? void 0 : b.find(
|
|
1167
|
+
(_) => _.type === "file" && _.asset_url
|
|
1168
1168
|
), i = t ?? s ?? a ?? r, o = (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
1169
|
if (!o) return null;
|
|
1170
1170
|
const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
|
|
@@ -1211,7 +1211,7 @@ const an = ({
|
|
|
1211
1211
|
fileSize: a,
|
|
1212
1212
|
thumbnailUrl: r
|
|
1213
1213
|
}) => {
|
|
1214
|
-
const i =
|
|
1214
|
+
const i = ae(t), o = a !== void 0 ? nn(a) : void 0;
|
|
1215
1215
|
return /* @__PURE__ */ n(
|
|
1216
1216
|
tn,
|
|
1217
1217
|
{
|
|
@@ -1230,17 +1230,17 @@ const an = ({
|
|
|
1230
1230
|
containedImage: i === "image" || i === "document"
|
|
1231
1231
|
}
|
|
1232
1232
|
),
|
|
1233
|
-
action: /* @__PURE__ */ n(
|
|
1233
|
+
action: /* @__PURE__ */ n(ma, { url: e, filename: s })
|
|
1234
1234
|
}
|
|
1235
1235
|
);
|
|
1236
|
-
},
|
|
1236
|
+
}, ha = ({
|
|
1237
1237
|
message: e,
|
|
1238
1238
|
isMyMessage: t = !1
|
|
1239
1239
|
}) => {
|
|
1240
1240
|
const s = Qe(e), a = et(e);
|
|
1241
1241
|
return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
|
|
1242
1242
|
!t && e.user && /* @__PURE__ */ n(
|
|
1243
|
-
|
|
1243
|
+
oe,
|
|
1244
1244
|
{
|
|
1245
1245
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1246
1246
|
id: e.user.id,
|
|
@@ -1264,7 +1264,7 @@ const an = ({
|
|
|
1264
1264
|
}
|
|
1265
1265
|
)
|
|
1266
1266
|
] });
|
|
1267
|
-
},
|
|
1267
|
+
}, fa = ({
|
|
1268
1268
|
message: e
|
|
1269
1269
|
}) => {
|
|
1270
1270
|
const t = Qe(e);
|
|
@@ -1272,7 +1272,7 @@ const an = ({
|
|
|
1272
1272
|
return /* @__PURE__ */ n("div", { className: Je(!0), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !0 }) });
|
|
1273
1273
|
const s = et(e);
|
|
1274
1274
|
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1275
|
-
},
|
|
1275
|
+
}, ga = ({
|
|
1276
1276
|
message: e
|
|
1277
1277
|
}) => {
|
|
1278
1278
|
const t = Qe(e);
|
|
@@ -1280,18 +1280,18 @@ const an = ({
|
|
|
1280
1280
|
return /* @__PURE__ */ n("div", { className: Je(!1), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !1 }) });
|
|
1281
1281
|
const s = et(e);
|
|
1282
1282
|
return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
|
|
1283
|
-
},
|
|
1284
|
-
Creator:
|
|
1285
|
-
Visitor:
|
|
1286
|
-
}),
|
|
1283
|
+
}, yi = Object.assign(ha, {
|
|
1284
|
+
Creator: fa,
|
|
1285
|
+
Visitor: ga
|
|
1286
|
+
}), ba = {
|
|
1287
1287
|
isUnlocking: () => !1
|
|
1288
|
-
},
|
|
1289
|
-
LockedAttachment:
|
|
1290
|
-
}, on = Ye({}),
|
|
1291
|
-
function
|
|
1292
|
-
return Ae(on)[e] ??
|
|
1288
|
+
}, pa = {
|
|
1289
|
+
LockedAttachment: ba
|
|
1290
|
+
}, on = Ye({}), Ci = on.Provider;
|
|
1291
|
+
function va(e) {
|
|
1292
|
+
return Ae(on)[e] ?? pa[e];
|
|
1293
1293
|
}
|
|
1294
|
-
const
|
|
1294
|
+
const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1295
1295
|
"svg",
|
|
1296
1296
|
{
|
|
1297
1297
|
width: e,
|
|
@@ -1308,22 +1308,22 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1308
1308
|
}
|
|
1309
1309
|
)
|
|
1310
1310
|
}
|
|
1311
|
-
),
|
|
1311
|
+
), wa = (e) => {
|
|
1312
1312
|
var t;
|
|
1313
1313
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
1314
|
-
},
|
|
1314
|
+
}, _a = (e) => {
|
|
1315
1315
|
var t;
|
|
1316
1316
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
1317
1317
|
}, Ee = (e) => {
|
|
1318
1318
|
var t;
|
|
1319
1319
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
1320
|
-
},
|
|
1320
|
+
}, Na = (e) => {
|
|
1321
1321
|
var t;
|
|
1322
1322
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1323
|
-
}, ln = (e) =>
|
|
1323
|
+
}, ln = (e) => wa(e) || _a(e), ya = (e) => {
|
|
1324
1324
|
var t;
|
|
1325
1325
|
return ln(e) && !((t = e.text) != null && t.trim());
|
|
1326
|
-
},
|
|
1326
|
+
}, Pe = ({
|
|
1327
1327
|
message: e,
|
|
1328
1328
|
standalone: t = !1,
|
|
1329
1329
|
isMyMessage: s = !1,
|
|
@@ -1336,25 +1336,25 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1336
1336
|
if (r) {
|
|
1337
1337
|
const f = (u = e.metadata) == null ? void 0 : u.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(Ss, { size: t ? 14 : 12 }),
|
|
1342
|
-
/* @__PURE__ */ n("span", { children:
|
|
1342
|
+
/* @__PURE__ */ n("span", { children: b })
|
|
1343
1343
|
] });
|
|
1344
1344
|
}
|
|
1345
1345
|
const o = s && a, l = o ? "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
1348
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1349
|
-
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(
|
|
1350
|
-
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(
|
|
1349
|
+
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
|
|
1350
|
+
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
|
|
1351
1351
|
m,
|
|
1352
1352
|
g
|
|
1353
|
-
] }) : /* @__PURE__ */ h(
|
|
1353
|
+
] }) : /* @__PURE__ */ h(se, { children: [
|
|
1354
1354
|
g,
|
|
1355
1355
|
m
|
|
1356
1356
|
] }) });
|
|
1357
|
-
},
|
|
1357
|
+
}, Ca = ({
|
|
1358
1358
|
selected: e,
|
|
1359
1359
|
onVoteUp: t,
|
|
1360
1360
|
onVoteDown: s
|
|
@@ -1363,7 +1363,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1363
1363
|
"button",
|
|
1364
1364
|
{
|
|
1365
1365
|
type: "button",
|
|
1366
|
-
className:
|
|
1366
|
+
className: y("message-vote-button focus-ring", {
|
|
1367
1367
|
"message-vote-button--selected": e === "up"
|
|
1368
1368
|
}),
|
|
1369
1369
|
onClick: t,
|
|
@@ -1377,7 +1377,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1377
1377
|
"button",
|
|
1378
1378
|
{
|
|
1379
1379
|
type: "button",
|
|
1380
|
-
className:
|
|
1380
|
+
className: y("message-vote-button focus-ring", {
|
|
1381
1381
|
"message-vote-button--selected": e === "down"
|
|
1382
1382
|
}),
|
|
1383
1383
|
onClick: s,
|
|
@@ -1387,7 +1387,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1387
1387
|
children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
1388
1388
|
}
|
|
1389
1389
|
)
|
|
1390
|
-
] }),
|
|
1390
|
+
] }), ka = (e) => {
|
|
1391
1391
|
var ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St;
|
|
1392
1392
|
const {
|
|
1393
1393
|
additionalMessageInputProps: t,
|
|
@@ -1403,43 +1403,43 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1403
1403
|
isMessageAIGenerated: u,
|
|
1404
1404
|
isMyMessage: f,
|
|
1405
1405
|
message: c,
|
|
1406
|
-
renderText:
|
|
1407
|
-
threadList:
|
|
1408
|
-
viewerLanguage:
|
|
1409
|
-
} = e, { client:
|
|
1410
|
-
Attachment:
|
|
1411
|
-
EditMessageModal:
|
|
1412
|
-
MessageActions:
|
|
1413
|
-
MessageBlocked:
|
|
1406
|
+
renderText: b,
|
|
1407
|
+
threadList: _,
|
|
1408
|
+
viewerLanguage: v
|
|
1409
|
+
} = e, { client: p } = We("CustomMessage"), { channel: x } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: M, onFetchSource: N, onDownloadClick: L } = va("LockedAttachment"), [$, O] = z(!1), E = Ln(c.id), { selected: k, voteUp: R, voteDown: D } = Hs(c), {
|
|
1410
|
+
Attachment: I = Dn,
|
|
1411
|
+
EditMessageModal: T = On,
|
|
1412
|
+
MessageActions: S,
|
|
1413
|
+
MessageBlocked: P = Pn,
|
|
1414
1414
|
MessageBouncePrompt: F = zn,
|
|
1415
|
-
MessageDeleted:
|
|
1416
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
1417
|
-
MessageRepliesCountButton:
|
|
1418
|
-
ReminderNotification:
|
|
1419
|
-
StreamedMessageText:
|
|
1415
|
+
MessageDeleted: Y = $n,
|
|
1416
|
+
MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
|
|
1417
|
+
MessageRepliesCountButton: q = Bn,
|
|
1418
|
+
ReminderNotification: G = Un,
|
|
1419
|
+
StreamedMessageText: w = jn,
|
|
1420
1420
|
PinIndicator: C
|
|
1421
|
-
} = jt("CustomMessage"), B = Vn(c),
|
|
1421
|
+
} = jt("CustomMessage"), B = Vn(c), j = Gn(c), W = ne(
|
|
1422
1422
|
() => u == null ? void 0 : u(c),
|
|
1423
1423
|
[u, c]
|
|
1424
|
-
), V =
|
|
1424
|
+
), V = ne(() => {
|
|
1425
1425
|
const fe = c.attachments ?? [], Ce = c.shared_location ? [c.shared_location, ...fe] : fe;
|
|
1426
1426
|
if (!Ee(c)) return Ce;
|
|
1427
1427
|
const It = Ce.filter((Tt) => !("type" in Tt) || !sn(Tt));
|
|
1428
1428
|
return It.length === Ce.length ? Ce : It;
|
|
1429
|
-
}, [c]),
|
|
1430
|
-
const fe = Kt({ message: c, viewerLanguage:
|
|
1429
|
+
}, [c]), J = ne(() => {
|
|
1430
|
+
const fe = Kt({ message: c, viewerLanguage: v });
|
|
1431
1431
|
return fe === c.text ? c : { ...c, text: fe };
|
|
1432
|
-
}, [c,
|
|
1432
|
+
}, [c, v]);
|
|
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(Y, { message: c });
|
|
1437
1437
|
if (Yn(c))
|
|
1438
|
-
return /* @__PURE__ */ n(
|
|
1439
|
-
const
|
|
1440
|
-
let
|
|
1441
|
-
|
|
1442
|
-
const me = f(), En =
|
|
1438
|
+
return /* @__PURE__ */ n(P, {});
|
|
1439
|
+
const re = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, ee = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ie = qn(c);
|
|
1440
|
+
let Q;
|
|
1441
|
+
ee ? Q = () => m(c) : ie && (Q = () => O(!0));
|
|
1442
|
+
const me = f(), En = y(
|
|
1443
1443
|
"str-chat__message str-chat__message-simple",
|
|
1444
1444
|
`str-chat__message--${c.type}`,
|
|
1445
1445
|
`str-chat__message--${c.status}`,
|
|
@@ -1449,17 +1449,17 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1449
1449
|
"str-chat__message--has-attachment": B,
|
|
1450
1450
|
"str-chat__message--highlighted": g,
|
|
1451
1451
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
1452
|
-
"str-chat__message--with-reactions":
|
|
1452
|
+
"str-chat__message--with-reactions": j,
|
|
1453
1453
|
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((gt = c == null ? void 0 : c.error) == null ? void 0 : gt.status) !== 403,
|
|
1454
|
-
"str-chat__message-with-thread-link":
|
|
1454
|
+
"str-chat__message-with-thread-link": re || ue,
|
|
1455
1455
|
"str-chat__virtual-message__wrapper--end": r,
|
|
1456
1456
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1457
1457
|
"str-chat__virtual-message__wrapper--group": o
|
|
1458
1458
|
}
|
|
1459
|
-
), dt = c.poll_id &&
|
|
1460
|
-
return /* @__PURE__ */ h(
|
|
1459
|
+
), dt = c.poll_id && p.polls.fromState(c.poll_id), ut = ya(c), he = Ee(c), mt = Na(c), Le = !!(V != null && V.length && !c.quoted_message), ht = he && me && Le;
|
|
1460
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1461
1461
|
a && /* @__PURE__ */ n(
|
|
1462
|
-
|
|
1462
|
+
T,
|
|
1463
1463
|
{
|
|
1464
1464
|
additionalMessageInputProps: t
|
|
1465
1465
|
}
|
|
@@ -1468,7 +1468,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1468
1468
|
Wn,
|
|
1469
1469
|
{
|
|
1470
1470
|
MessageBouncePrompt: F,
|
|
1471
|
-
onClose: () =>
|
|
1471
|
+
onClose: () => O(!1),
|
|
1472
1472
|
open: $
|
|
1473
1473
|
}
|
|
1474
1474
|
),
|
|
@@ -1479,9 +1479,9 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1479
1479
|
"data-message-id": c.id,
|
|
1480
1480
|
children: [
|
|
1481
1481
|
C && /* @__PURE__ */ n(C, {}),
|
|
1482
|
-
!!
|
|
1482
|
+
!!E && /* @__PURE__ */ n(G, { reminder: E }),
|
|
1483
1483
|
c.user && /* @__PURE__ */ n(
|
|
1484
|
-
|
|
1484
|
+
oe,
|
|
1485
1485
|
{
|
|
1486
1486
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1487
1487
|
id: c.user.id,
|
|
@@ -1495,14 +1495,14 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1495
1495
|
/* @__PURE__ */ n(
|
|
1496
1496
|
"div",
|
|
1497
1497
|
{
|
|
1498
|
-
className:
|
|
1499
|
-
"str-chat__simple-message--error-failed":
|
|
1498
|
+
className: y("str-chat__message-inner", {
|
|
1499
|
+
"str-chat__simple-message--error-failed": ee || ie
|
|
1500
1500
|
}),
|
|
1501
1501
|
"data-testid": "message-inner",
|
|
1502
|
-
onClick:
|
|
1503
|
-
onKeyDown:
|
|
1504
|
-
role:
|
|
1505
|
-
tabIndex:
|
|
1502
|
+
onClick: Q,
|
|
1503
|
+
onKeyDown: Q,
|
|
1504
|
+
role: Q ? "button" : void 0,
|
|
1505
|
+
tabIndex: Q ? 0 : void 0,
|
|
1506
1506
|
style: {
|
|
1507
1507
|
// Force margins to 0 to prevent hover layout shift
|
|
1508
1508
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
@@ -1511,7 +1511,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1511
1511
|
},
|
|
1512
1512
|
children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1513
1513
|
me ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1514
|
-
|
|
1514
|
+
S && /* @__PURE__ */ n(S, {}),
|
|
1515
1515
|
/* @__PURE__ */ n(
|
|
1516
1516
|
zt.Sent,
|
|
1517
1517
|
{
|
|
@@ -1521,8 +1521,8 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1521
1521
|
amountText: (xt = c.metadata) == null ? void 0 : xt.amount_text,
|
|
1522
1522
|
detail: (wt = c.metadata) == null ? void 0 : wt.attachment_detail,
|
|
1523
1523
|
paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
|
|
1524
|
-
onPreviewClick: () =>
|
|
1525
|
-
onFetchSource: async () => await (
|
|
1524
|
+
onPreviewClick: () => M == null ? void 0 : M(c, x),
|
|
1525
|
+
onFetchSource: async () => await (N == null ? void 0 : N(c, x))
|
|
1526
1526
|
}
|
|
1527
1527
|
)
|
|
1528
1528
|
] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1535,27 +1535,27 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1535
1535
|
amountText: (kt = c.metadata) == null ? void 0 : kt.amount_text,
|
|
1536
1536
|
detail: (Et = c.metadata) == null ? void 0 : Et.attachment_detail,
|
|
1537
1537
|
paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
|
|
1538
|
-
isUnlocking:
|
|
1539
|
-
onUnlockClick: () =>
|
|
1540
|
-
onFetchSource: async () => await (
|
|
1541
|
-
onDownloadClick: () =>
|
|
1538
|
+
isUnlocking: A(c.id),
|
|
1539
|
+
onUnlockClick: () => M == null ? void 0 : M(c, x),
|
|
1540
|
+
onFetchSource: async () => await (N == null ? void 0 : N(c, x)),
|
|
1541
|
+
onDownloadClick: () => L == null ? void 0 : L(c, x)
|
|
1542
1542
|
}
|
|
1543
1543
|
),
|
|
1544
|
-
|
|
1544
|
+
S && /* @__PURE__ */ n(S, {})
|
|
1545
1545
|
] }),
|
|
1546
1546
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1547
1547
|
Mt,
|
|
1548
1548
|
{
|
|
1549
|
-
message:
|
|
1550
|
-
renderText:
|
|
1549
|
+
message: J,
|
|
1550
|
+
renderText: b
|
|
1551
1551
|
}
|
|
1552
1552
|
) })
|
|
1553
1553
|
] }) : ut ? (
|
|
1554
1554
|
/* Tip-only messages render as a standalone bubble */
|
|
1555
|
-
/* @__PURE__ */ n(
|
|
1555
|
+
/* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
|
|
1556
1556
|
) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
1557
1557
|
he && !ht && /* @__PURE__ */ n(
|
|
1558
|
-
|
|
1558
|
+
Pe,
|
|
1559
1559
|
{
|
|
1560
1560
|
message: c,
|
|
1561
1561
|
hasAttachment: Le,
|
|
@@ -1564,23 +1564,23 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1564
1564
|
),
|
|
1565
1565
|
dt && /* @__PURE__ */ n(Xn, { poll: dt }),
|
|
1566
1566
|
V != null && V.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1567
|
-
|
|
1567
|
+
I,
|
|
1568
1568
|
{
|
|
1569
1569
|
actionHandler: l,
|
|
1570
1570
|
attachments: V
|
|
1571
1571
|
}
|
|
1572
1572
|
) : null,
|
|
1573
|
-
|
|
1574
|
-
|
|
1573
|
+
W ? /* @__PURE__ */ n(
|
|
1574
|
+
w,
|
|
1575
1575
|
{
|
|
1576
|
-
message:
|
|
1577
|
-
renderText:
|
|
1576
|
+
message: J,
|
|
1577
|
+
renderText: b
|
|
1578
1578
|
}
|
|
1579
1579
|
) : /* @__PURE__ */ n(
|
|
1580
1580
|
Mt,
|
|
1581
1581
|
{
|
|
1582
|
-
message:
|
|
1583
|
-
renderText:
|
|
1582
|
+
message: J,
|
|
1583
|
+
renderText: b
|
|
1584
1584
|
}
|
|
1585
1585
|
),
|
|
1586
1586
|
/* @__PURE__ */ n(Kn, {})
|
|
@@ -1589,7 +1589,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1589
1589
|
),
|
|
1590
1590
|
!mt && !ut && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
1591
1591
|
(!he || ht) && /* @__PURE__ */ n(
|
|
1592
|
-
|
|
1592
|
+
Pe,
|
|
1593
1593
|
{
|
|
1594
1594
|
message: c,
|
|
1595
1595
|
hasAttachment: Le,
|
|
@@ -1597,34 +1597,34 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1597
1597
|
}
|
|
1598
1598
|
),
|
|
1599
1599
|
s && he && /* @__PURE__ */ n(
|
|
1600
|
-
|
|
1600
|
+
Ca,
|
|
1601
1601
|
{
|
|
1602
|
-
selected:
|
|
1603
|
-
onVoteUp:
|
|
1604
|
-
onVoteDown:
|
|
1602
|
+
selected: k,
|
|
1603
|
+
onVoteUp: R,
|
|
1604
|
+
onVoteDown: D
|
|
1605
1605
|
}
|
|
1606
1606
|
)
|
|
1607
1607
|
] }),
|
|
1608
|
-
|
|
1609
|
-
|
|
1608
|
+
re && /* @__PURE__ */ n(
|
|
1609
|
+
q,
|
|
1610
1610
|
{
|
|
1611
1611
|
onClick: d,
|
|
1612
1612
|
reply_count: c.reply_count
|
|
1613
1613
|
}
|
|
1614
1614
|
),
|
|
1615
|
-
ue && /* @__PURE__ */ n(
|
|
1615
|
+
ue && /* @__PURE__ */ n(Z, {})
|
|
1616
1616
|
]
|
|
1617
1617
|
},
|
|
1618
1618
|
c.id
|
|
1619
1619
|
)
|
|
1620
1620
|
] });
|
|
1621
|
-
},
|
|
1622
|
-
|
|
1621
|
+
}, Ea = U.memo(
|
|
1622
|
+
ka,
|
|
1623
1623
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
|
|
1624
|
-
),
|
|
1624
|
+
), Sa = (e) => {
|
|
1625
1625
|
const t = xe("CustomMessage");
|
|
1626
|
-
return /* @__PURE__ */ n(
|
|
1627
|
-
},
|
|
1626
|
+
return /* @__PURE__ */ n(Ea, { ...t, ...e });
|
|
1627
|
+
}, Ia = () => {
|
|
1628
1628
|
var s;
|
|
1629
1629
|
const { handleDelete: e, message: t } = xe("CustomMessageActions");
|
|
1630
1630
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
@@ -1637,7 +1637,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1637
1637
|
children: /* @__PURE__ */ n(As, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1638
1638
|
}
|
|
1639
1639
|
);
|
|
1640
|
-
},
|
|
1640
|
+
}, Ta = () => {
|
|
1641
1641
|
const { handleFlag: e } = xe("CustomMessageActions");
|
|
1642
1642
|
return /* @__PURE__ */ n(
|
|
1643
1643
|
Yt,
|
|
@@ -1649,19 +1649,19 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1649
1649
|
children: /* @__PURE__ */ n(Vt, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1650
1650
|
}
|
|
1651
1651
|
);
|
|
1652
|
-
},
|
|
1652
|
+
}, Aa = () => {
|
|
1653
1653
|
var t;
|
|
1654
1654
|
const { message: e } = xe("CustomMessageActions");
|
|
1655
1655
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
|
|
1656
|
-
|
|
1656
|
+
Os,
|
|
1657
1657
|
{
|
|
1658
1658
|
messageActionSet: [
|
|
1659
|
-
{ Component:
|
|
1660
|
-
{ Component:
|
|
1659
|
+
{ Component: Ia, placement: "quick", type: "delete" },
|
|
1660
|
+
{ Component: Ta, placement: "quick", type: "flag" }
|
|
1661
1661
|
]
|
|
1662
1662
|
}
|
|
1663
1663
|
);
|
|
1664
|
-
},
|
|
1664
|
+
}, Ma = ({
|
|
1665
1665
|
link: e,
|
|
1666
1666
|
onDismiss: t
|
|
1667
1667
|
}) => {
|
|
@@ -1701,26 +1701,26 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1701
1701
|
]
|
|
1702
1702
|
}
|
|
1703
1703
|
);
|
|
1704
|
-
},
|
|
1704
|
+
}, Ra = (e) => ({
|
|
1705
1705
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
1706
1706
|
(t) => At.previewIsLoaded(t) || At.previewIsLoading(t)
|
|
1707
1707
|
)
|
|
1708
|
-
}),
|
|
1708
|
+
}), La = () => {
|
|
1709
1709
|
const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
|
|
1710
1710
|
e.state,
|
|
1711
|
-
|
|
1711
|
+
Ra
|
|
1712
1712
|
), s = (r) => {
|
|
1713
1713
|
e.dismissPreview(r);
|
|
1714
1714
|
};
|
|
1715
1715
|
return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-stretch w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
|
|
1716
|
-
|
|
1716
|
+
Ma,
|
|
1717
1717
|
{
|
|
1718
1718
|
link: r,
|
|
1719
1719
|
onDismiss: s
|
|
1720
1720
|
},
|
|
1721
1721
|
r.og_scrape_url
|
|
1722
1722
|
)) }) : null;
|
|
1723
|
-
}, cn = U.createContext(!1),
|
|
1723
|
+
}, cn = U.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1724
1724
|
"button",
|
|
1725
1725
|
{
|
|
1726
1726
|
...s,
|
|
@@ -1730,14 +1730,14 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1730
1730
|
onClick: e,
|
|
1731
1731
|
children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
|
|
1732
1732
|
}
|
|
1733
|
-
),
|
|
1733
|
+
), Oa = () => {
|
|
1734
1734
|
const e = Ae(cn), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
|
|
1735
|
-
SendButton: r =
|
|
1735
|
+
SendButton: r = Da,
|
|
1736
1736
|
AttachmentPreviewList: i = ns
|
|
1737
1737
|
} = jt("CustomMessageInput");
|
|
1738
1738
|
return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
|
|
1739
1739
|
/* @__PURE__ */ n(ss, {}),
|
|
1740
|
-
/* @__PURE__ */ n(
|
|
1740
|
+
/* @__PURE__ */ n(La, {}),
|
|
1741
1741
|
/* @__PURE__ */ n(i, {}),
|
|
1742
1742
|
/* @__PURE__ */ h("div", { className: "flex", children: [
|
|
1743
1743
|
/* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
|
|
@@ -1764,15 +1764,15 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1764
1764
|
)
|
|
1765
1765
|
] })
|
|
1766
1766
|
] });
|
|
1767
|
-
},
|
|
1767
|
+
}, Pa = ({
|
|
1768
1768
|
renderActions: e,
|
|
1769
1769
|
renderFooter: t,
|
|
1770
1770
|
disabled: s = !1,
|
|
1771
1771
|
disabledReason: a
|
|
1772
1772
|
}) => {
|
|
1773
1773
|
var o;
|
|
1774
|
-
const { channel: r } =
|
|
1775
|
-
return s ? /* @__PURE__ */ h(
|
|
1774
|
+
const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
|
|
1775
|
+
return s ? /* @__PURE__ */ h(se, { children: [
|
|
1776
1776
|
/* @__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 }),
|
|
1777
1777
|
t == null ? void 0 : t()
|
|
1778
1778
|
] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
|
|
@@ -1784,23 +1784,23 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1784
1784
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1785
1785
|
children: [
|
|
1786
1786
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1787
|
-
/* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input:
|
|
1787
|
+
/* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input: Oa }) })
|
|
1788
1788
|
]
|
|
1789
1789
|
}
|
|
1790
1790
|
),
|
|
1791
1791
|
t == null ? void 0 : t()
|
|
1792
1792
|
] });
|
|
1793
|
-
},
|
|
1793
|
+
}, za = [
|
|
1794
1794
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1795
1795
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1796
|
-
],
|
|
1796
|
+
], $a = {
|
|
1797
1797
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
1798
1798
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
1799
|
-
},
|
|
1799
|
+
}, Fa = [
|
|
1800
1800
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1801
|
-
],
|
|
1801
|
+
], Ba = {
|
|
1802
1802
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1803
|
-
}, ze = "age safety guidelines.",
|
|
1803
|
+
}, ze = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", Ft = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
|
|
1804
1804
|
var a;
|
|
1805
1805
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
1806
1806
|
if (Ft(t))
|
|
@@ -1808,7 +1808,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1808
1808
|
kind: "dm-agent",
|
|
1809
1809
|
type: t
|
|
1810
1810
|
};
|
|
1811
|
-
if (
|
|
1811
|
+
if (ja(t))
|
|
1812
1812
|
return {
|
|
1813
1813
|
kind: "age-safety",
|
|
1814
1814
|
type: t
|
|
@@ -1819,17 +1819,17 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1819
1819
|
kind: "dm-agent",
|
|
1820
1820
|
type: s
|
|
1821
1821
|
};
|
|
1822
|
-
},
|
|
1822
|
+
}, Ga = (e) => {
|
|
1823
1823
|
const t = e.indexOf(ze);
|
|
1824
1824
|
if (t === -1)
|
|
1825
1825
|
return e;
|
|
1826
1826
|
const s = t + ze.length;
|
|
1827
|
-
return /* @__PURE__ */ h(
|
|
1827
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1828
1828
|
e.slice(0, t),
|
|
1829
1829
|
/* @__PURE__ */ n(
|
|
1830
1830
|
"a",
|
|
1831
1831
|
{
|
|
1832
|
-
href:
|
|
1832
|
+
href: Ua,
|
|
1833
1833
|
target: "_blank",
|
|
1834
1834
|
rel: "noopener noreferrer",
|
|
1835
1835
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -1838,13 +1838,13 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1838
1838
|
),
|
|
1839
1839
|
e.slice(s)
|
|
1840
1840
|
] });
|
|
1841
|
-
},
|
|
1841
|
+
}, Ha = (e) => {
|
|
1842
1842
|
var a, r;
|
|
1843
|
-
const t = e.message.hide_date === !0, s =
|
|
1843
|
+
const t = e.message.hide_date === !0, s = Va(
|
|
1844
1844
|
e.message
|
|
1845
1845
|
);
|
|
1846
1846
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
1847
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
1847
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || $a[s.type];
|
|
1848
1848
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1849
1849
|
/* @__PURE__ */ h(
|
|
1850
1850
|
"div",
|
|
@@ -1870,7 +1870,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1870
1870
|
] });
|
|
1871
1871
|
}
|
|
1872
1872
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
1873
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
1873
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ba[s.type];
|
|
1874
1874
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1875
1875
|
/* @__PURE__ */ h(
|
|
1876
1876
|
"div",
|
|
@@ -1889,7 +1889,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1889
1889
|
"data-testid": "age-safety-system-message-icon"
|
|
1890
1890
|
}
|
|
1891
1891
|
),
|
|
1892
|
-
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
1892
|
+
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ga(i) }) })
|
|
1893
1893
|
]
|
|
1894
1894
|
}
|
|
1895
1895
|
),
|
|
@@ -1914,21 +1914,21 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1914
1914
|
begin: `${120 * t}ms`,
|
|
1915
1915
|
repeatCount: "indefinite"
|
|
1916
1916
|
}
|
|
1917
|
-
) }),
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
]),
|
|
1922
|
-
var
|
|
1923
|
-
const { channel: t, channelConfig: s, thread: a } =
|
|
1924
|
-
if (!e && l &&
|
|
1925
|
-
const
|
|
1917
|
+
) }), Ya = /* @__PURE__ */ new Set([
|
|
1918
|
+
Oe.Thinking,
|
|
1919
|
+
Oe.Generating,
|
|
1920
|
+
Oe.ExternalSources
|
|
1921
|
+
]), qa = ({ threadList: e }) => {
|
|
1922
|
+
var b, _;
|
|
1923
|
+
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
|
|
1924
|
+
if (!e && l && Ya.has(o)) {
|
|
1925
|
+
const v = Wa(t, (b = r.user) == null ? void 0 : b.id);
|
|
1926
1926
|
return /* @__PURE__ */ n(
|
|
1927
1927
|
Bt,
|
|
1928
1928
|
{
|
|
1929
|
-
avatarId: (
|
|
1930
|
-
avatarName: (
|
|
1931
|
-
avatarImage:
|
|
1929
|
+
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
1930
|
+
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
1931
|
+
avatarImage: v == null ? void 0 : v.image,
|
|
1932
1932
|
testId: "typing-indicator-ai"
|
|
1933
1933
|
}
|
|
1934
1934
|
);
|
|
@@ -1936,19 +1936,19 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1936
1936
|
if ((s == null ? void 0 : s.typing_events) === !1)
|
|
1937
1937
|
return null;
|
|
1938
1938
|
const m = e ? [] : Object.values(i).filter(
|
|
1939
|
-
({ parent_id:
|
|
1940
|
-
var
|
|
1941
|
-
return (
|
|
1939
|
+
({ parent_id: v, user: p }) => {
|
|
1940
|
+
var x;
|
|
1941
|
+
return (p == null ? void 0 : p.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
|
|
1942
1942
|
}
|
|
1943
1943
|
), g = e ? Object.values(i).filter(
|
|
1944
|
-
({ parent_id:
|
|
1945
|
-
var
|
|
1946
|
-
return (
|
|
1944
|
+
({ parent_id: v, user: p }) => {
|
|
1945
|
+
var x;
|
|
1946
|
+
return (p == null ? void 0 : p.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
|
|
1947
1947
|
}
|
|
1948
1948
|
) : [], u = e ? g : m;
|
|
1949
1949
|
if (!u.length)
|
|
1950
1950
|
return null;
|
|
1951
|
-
const f = (
|
|
1951
|
+
const f = (_ = u[0]) == null ? void 0 : _.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
1952
1952
|
return /* @__PURE__ */ n(
|
|
1953
1953
|
Bt,
|
|
1954
1954
|
{
|
|
@@ -1973,7 +1973,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1973
1973
|
},
|
|
1974
1974
|
children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
|
|
1975
1975
|
/* @__PURE__ */ n(
|
|
1976
|
-
|
|
1976
|
+
oe,
|
|
1977
1977
|
{
|
|
1978
1978
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1979
1979
|
id: e,
|
|
@@ -2002,7 +2002,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2002
2002
|
] })
|
|
2003
2003
|
}
|
|
2004
2004
|
);
|
|
2005
|
-
function
|
|
2005
|
+
function Wa(e, t) {
|
|
2006
2006
|
var a;
|
|
2007
2007
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
2008
2008
|
for (const r of Object.values(s)) {
|
|
@@ -2011,10 +2011,10 @@ function Ka(e, t) {
|
|
|
2011
2011
|
return i;
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
|
-
const
|
|
2014
|
+
const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2015
2015
|
"div",
|
|
2016
2016
|
{
|
|
2017
|
-
className:
|
|
2017
|
+
className: y("flex items-center justify-center h-full", e),
|
|
2018
2018
|
children: [
|
|
2019
2019
|
/* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
2020
2020
|
/* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
|
|
@@ -2055,23 +2055,11 @@ const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2055
2055
|
]
|
|
2056
2056
|
}
|
|
2057
2057
|
), Se = U.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
2058
|
-
/* @__PURE__ */ n(
|
|
2058
|
+
/* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
|
|
2059
2059
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2060
2060
|
] }) }));
|
|
2061
2061
|
Se.displayName = "LoadingState";
|
|
2062
|
-
const
|
|
2063
|
-
className: e,
|
|
2064
|
-
size: t = 16
|
|
2065
|
-
}) => /* @__PURE__ */ n(
|
|
2066
|
-
Ls,
|
|
2067
|
-
{
|
|
2068
|
-
weight: "fill",
|
|
2069
|
-
size: t,
|
|
2070
|
-
className: k("shrink-0 text-[#1D9BF0]", e),
|
|
2071
|
-
"aria-label": "Verified",
|
|
2072
|
-
role: "img"
|
|
2073
|
-
}
|
|
2074
|
-
), oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Qa = ({
|
|
2062
|
+
const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Ja = ({
|
|
2075
2063
|
onBack: e,
|
|
2076
2064
|
showBackButton: t,
|
|
2077
2065
|
showStarButton: s = !1,
|
|
@@ -2086,25 +2074,26 @@ const He = ({
|
|
|
2086
2074
|
onReportParticipantClick: u,
|
|
2087
2075
|
customChannelActions: f,
|
|
2088
2076
|
renderChannelActions: c,
|
|
2089
|
-
showChannelInfo:
|
|
2090
|
-
|
|
2077
|
+
showChannelInfo: b = !0,
|
|
2078
|
+
onParticipantNameClick: _,
|
|
2079
|
+
renderHeaderTitleBadges: v
|
|
2091
2080
|
}) => {
|
|
2092
|
-
var
|
|
2093
|
-
const { channel: p } =
|
|
2094
|
-
var
|
|
2095
|
-
const I = (
|
|
2096
|
-
return I ? Object.values(((
|
|
2097
|
-
(
|
|
2098
|
-
var
|
|
2099
|
-
return ((
|
|
2081
|
+
var O, E, k, R, D;
|
|
2082
|
+
const { channel: p } = de(), x = U.useMemo(() => {
|
|
2083
|
+
var S, P;
|
|
2084
|
+
const I = (S = p._client) == null ? void 0 : S.userID;
|
|
2085
|
+
return I ? Object.values(((P = p.state) == null ? void 0 : P.members) || {}).find(
|
|
2086
|
+
(F) => {
|
|
2087
|
+
var Y;
|
|
2088
|
+
return ((Y = F.user) == null ? void 0 : Y.id) && F.user.id !== I;
|
|
2100
2089
|
}
|
|
2101
2090
|
) : void 0;
|
|
2102
|
-
}, [(
|
|
2091
|
+
}, [(O = p._client) == null ? void 0 : O.userID, (E = p.state) == null ? void 0 : E.members]), A = Xt(x == null ? void 0 : x.user), M = (k = x == null ? void 0 : x.user) == null ? void 0 : k.image, N = Wt(p), L = v == null ? void 0 : v({
|
|
2103
2092
|
channel: p,
|
|
2104
|
-
participant:
|
|
2093
|
+
participant: x
|
|
2105
2094
|
}), $ = async () => {
|
|
2106
2095
|
try {
|
|
2107
|
-
|
|
2096
|
+
N ? await p.unpin() : await p.pin();
|
|
2108
2097
|
} catch (I) {
|
|
2109
2098
|
console.error(
|
|
2110
2099
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
@@ -2117,8 +2106,8 @@ const He = ({
|
|
|
2117
2106
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
|
|
2118
2107
|
"button",
|
|
2119
2108
|
{
|
|
2120
|
-
className:
|
|
2121
|
-
|
|
2109
|
+
className: y(
|
|
2110
|
+
le,
|
|
2122
2111
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
2123
2112
|
),
|
|
2124
2113
|
onClick: e || (() => {
|
|
@@ -2130,20 +2119,32 @@ const He = ({
|
|
|
2130
2119
|
) }),
|
|
2131
2120
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
2132
2121
|
/* @__PURE__ */ n(
|
|
2133
|
-
|
|
2122
|
+
oe,
|
|
2134
2123
|
{
|
|
2135
|
-
id: ((
|
|
2136
|
-
name:
|
|
2137
|
-
image:
|
|
2138
|
-
starred: s &&
|
|
2124
|
+
id: ((R = x == null ? void 0 : x.user) == null ? void 0 : R.id) || p.id || "unknown",
|
|
2125
|
+
name: A,
|
|
2126
|
+
image: M,
|
|
2127
|
+
starred: s && N,
|
|
2139
2128
|
dmAgentEnabled: a,
|
|
2140
2129
|
size: 48
|
|
2141
2130
|
}
|
|
2142
2131
|
),
|
|
2143
|
-
/* @__PURE__ */ h(
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2132
|
+
_ ? /* @__PURE__ */ h(
|
|
2133
|
+
"button",
|
|
2134
|
+
{
|
|
2135
|
+
type: "button",
|
|
2136
|
+
onClick: _,
|
|
2137
|
+
"aria-label": `View details for ${A}`,
|
|
2138
|
+
className: "flex max-w-full items-center gap-0.5 rounded text-center text-xs font-medium text-black/90 transition-opacity hover:opacity-70",
|
|
2139
|
+
children: [
|
|
2140
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2141
|
+
L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
|
|
2142
|
+
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0", weight: "bold" })
|
|
2143
|
+
]
|
|
2144
|
+
}
|
|
2145
|
+
) : /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
|
|
2146
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2147
|
+
L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
|
|
2147
2148
|
] }),
|
|
2148
2149
|
a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2149
2150
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
@@ -2154,27 +2155,27 @@ const He = ({
|
|
|
2154
2155
|
s && /* @__PURE__ */ n(
|
|
2155
2156
|
"button",
|
|
2156
2157
|
{
|
|
2157
|
-
className:
|
|
2158
|
+
className: le,
|
|
2158
2159
|
onClick: $,
|
|
2159
2160
|
type: "button",
|
|
2160
|
-
"aria-label":
|
|
2161
|
+
"aria-label": N ? "Unstar conversation" : "Star conversation",
|
|
2161
2162
|
children: /* @__PURE__ */ n(
|
|
2162
2163
|
Be,
|
|
2163
2164
|
{
|
|
2164
|
-
className:
|
|
2165
|
-
"text-yellow-600":
|
|
2166
|
-
"text-black/90": !
|
|
2165
|
+
className: y("size-5", {
|
|
2166
|
+
"text-yellow-600": N,
|
|
2167
|
+
"text-black/90": !N
|
|
2167
2168
|
}),
|
|
2168
|
-
weight:
|
|
2169
|
+
weight: N ? "duotone" : "regular"
|
|
2169
2170
|
}
|
|
2170
2171
|
)
|
|
2171
2172
|
}
|
|
2172
2173
|
),
|
|
2173
|
-
|
|
2174
|
-
|
|
2174
|
+
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2175
|
+
Pt,
|
|
2175
2176
|
{
|
|
2176
2177
|
channel: p,
|
|
2177
|
-
participant:
|
|
2178
|
+
participant: x,
|
|
2178
2179
|
showDeleteConversation: o,
|
|
2179
2180
|
showBlockParticipant: l,
|
|
2180
2181
|
showReportParticipant: d,
|
|
@@ -2184,7 +2185,7 @@ const He = ({
|
|
|
2184
2185
|
onBlockParticipantClick: g,
|
|
2185
2186
|
onReportParticipantClick: u,
|
|
2186
2187
|
customChannelActions: f,
|
|
2187
|
-
triggerClassName:
|
|
2188
|
+
triggerClassName: y(le, "bg-[#F1F0EE]")
|
|
2188
2189
|
}
|
|
2189
2190
|
))
|
|
2190
2191
|
] })
|
|
@@ -2194,8 +2195,8 @@ const He = ({
|
|
|
2194
2195
|
t && e && /* @__PURE__ */ n(
|
|
2195
2196
|
"button",
|
|
2196
2197
|
{
|
|
2197
|
-
className:
|
|
2198
|
-
|
|
2198
|
+
className: y(
|
|
2199
|
+
le,
|
|
2199
2200
|
"messaging-channel-view-back-button-desktop"
|
|
2200
2201
|
),
|
|
2201
2202
|
type: "button",
|
|
@@ -2205,21 +2206,33 @@ const He = ({
|
|
|
2205
2206
|
}
|
|
2206
2207
|
),
|
|
2207
2208
|
/* @__PURE__ */ n(
|
|
2208
|
-
|
|
2209
|
+
oe,
|
|
2209
2210
|
{
|
|
2210
|
-
id: ((
|
|
2211
|
-
name:
|
|
2212
|
-
image:
|
|
2213
|
-
starred: s &&
|
|
2211
|
+
id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || p.id || "unknown",
|
|
2212
|
+
name: A,
|
|
2213
|
+
image: M,
|
|
2214
|
+
starred: s && N,
|
|
2214
2215
|
dmAgentEnabled: a,
|
|
2215
2216
|
size: 48
|
|
2216
2217
|
}
|
|
2217
2218
|
),
|
|
2218
2219
|
/* @__PURE__ */ h("div", { className: "min-w-0", children: [
|
|
2219
|
-
/* @__PURE__ */ h(
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2220
|
+
_ ? /* @__PURE__ */ h(
|
|
2221
|
+
"button",
|
|
2222
|
+
{
|
|
2223
|
+
type: "button",
|
|
2224
|
+
onClick: _,
|
|
2225
|
+
"aria-label": `View details for ${A}`,
|
|
2226
|
+
className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
|
|
2227
|
+
children: [
|
|
2228
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2229
|
+
L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
|
|
2230
|
+
/* @__PURE__ */ n(Ve, { className: "size-4 shrink-0", weight: "bold" })
|
|
2231
|
+
]
|
|
2232
|
+
}
|
|
2233
|
+
) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
2234
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2235
|
+
L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
|
|
2223
2236
|
] }),
|
|
2224
2237
|
a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2225
2238
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
@@ -2231,27 +2244,27 @@ const He = ({
|
|
|
2231
2244
|
s && /* @__PURE__ */ n(
|
|
2232
2245
|
"button",
|
|
2233
2246
|
{
|
|
2234
|
-
className:
|
|
2247
|
+
className: le,
|
|
2235
2248
|
onClick: $,
|
|
2236
2249
|
type: "button",
|
|
2237
|
-
"aria-label":
|
|
2250
|
+
"aria-label": N ? "Unstar conversation" : "Star conversation",
|
|
2238
2251
|
children: /* @__PURE__ */ n(
|
|
2239
2252
|
Be,
|
|
2240
2253
|
{
|
|
2241
|
-
className:
|
|
2242
|
-
"text-yellow-600":
|
|
2243
|
-
"text-black/90": !
|
|
2254
|
+
className: y("size-6", {
|
|
2255
|
+
"text-yellow-600": N,
|
|
2256
|
+
"text-black/90": !N
|
|
2244
2257
|
}),
|
|
2245
|
-
weight:
|
|
2258
|
+
weight: N ? "duotone" : "regular"
|
|
2246
2259
|
}
|
|
2247
2260
|
)
|
|
2248
2261
|
}
|
|
2249
2262
|
),
|
|
2250
|
-
|
|
2251
|
-
|
|
2263
|
+
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2264
|
+
Pt,
|
|
2252
2265
|
{
|
|
2253
2266
|
channel: p,
|
|
2254
|
-
participant:
|
|
2267
|
+
participant: x,
|
|
2255
2268
|
showDeleteConversation: o,
|
|
2256
2269
|
showBlockParticipant: l,
|
|
2257
2270
|
showReportParticipant: d,
|
|
@@ -2261,13 +2274,13 @@ const He = ({
|
|
|
2261
2274
|
onBlockParticipantClick: g,
|
|
2262
2275
|
onReportParticipantClick: u,
|
|
2263
2276
|
customChannelActions: f,
|
|
2264
|
-
triggerClassName:
|
|
2277
|
+
triggerClassName: le
|
|
2265
2278
|
}
|
|
2266
2279
|
))
|
|
2267
2280
|
] })
|
|
2268
2281
|
] })
|
|
2269
2282
|
] });
|
|
2270
|
-
},
|
|
2283
|
+
}, Za = ({
|
|
2271
2284
|
onBack: e,
|
|
2272
2285
|
showBackButton: t,
|
|
2273
2286
|
renderMessageInputActions: s,
|
|
@@ -2282,65 +2295,66 @@ const He = ({
|
|
|
2282
2295
|
showBlockParticipant: u = !0,
|
|
2283
2296
|
showReportParticipant: f = !0,
|
|
2284
2297
|
composerDisabled: c = !1,
|
|
2285
|
-
composerDisabledReason:
|
|
2286
|
-
showStarButton:
|
|
2287
|
-
chatbotVotingEnabled:
|
|
2288
|
-
renderChannelBanner:
|
|
2289
|
-
renderHeaderTitleBadges:
|
|
2290
|
-
customChannelActions:
|
|
2291
|
-
renderChannelActions:
|
|
2292
|
-
renderMessage:
|
|
2293
|
-
dmAgentEnabled:
|
|
2298
|
+
composerDisabledReason: b,
|
|
2299
|
+
showStarButton: _ = !1,
|
|
2300
|
+
chatbotVotingEnabled: v = !1,
|
|
2301
|
+
renderChannelBanner: p,
|
|
2302
|
+
renderHeaderTitleBadges: x,
|
|
2303
|
+
customChannelActions: A,
|
|
2304
|
+
renderChannelActions: M,
|
|
2305
|
+
renderMessage: N,
|
|
2306
|
+
dmAgentEnabled: L = !1,
|
|
2294
2307
|
viewerLanguage: $,
|
|
2295
|
-
showChannelInfo:
|
|
2308
|
+
showChannelInfo: O = !0,
|
|
2309
|
+
onParticipantNameClick: E
|
|
2296
2310
|
}) => {
|
|
2297
|
-
var
|
|
2298
|
-
const { channel:
|
|
2299
|
-
var
|
|
2300
|
-
const
|
|
2301
|
-
return
|
|
2302
|
-
(
|
|
2303
|
-
var
|
|
2304
|
-
return ((
|
|
2311
|
+
var F, Y, Z, q, G, w;
|
|
2312
|
+
const { channel: k } = de(), R = U.useMemo(() => {
|
|
2313
|
+
var j, W;
|
|
2314
|
+
const C = (j = k._client) == null ? void 0 : j.userID;
|
|
2315
|
+
return C ? Object.values(((W = k.state) == null ? void 0 : W.members) || {}).find(
|
|
2316
|
+
(V) => {
|
|
2317
|
+
var J;
|
|
2318
|
+
return ((J = V.user) == null ? void 0 : J.id) && V.user.id !== C;
|
|
2305
2319
|
}
|
|
2306
2320
|
) : void 0;
|
|
2307
|
-
}, [(
|
|
2308
|
-
var
|
|
2309
|
-
const
|
|
2310
|
-
return
|
|
2311
|
-
var
|
|
2312
|
-
return ((
|
|
2321
|
+
}, [(F = k._client) == null ? void 0 : F.userID, (Y = k.state) == null ? void 0 : Y.members]), D = U.useMemo(() => {
|
|
2322
|
+
var j, W;
|
|
2323
|
+
const C = (j = k._client) == null ? void 0 : j.userID;
|
|
2324
|
+
return C ? Object.values(((W = k.state) == null ? void 0 : W.members) || {}).find((V) => {
|
|
2325
|
+
var J;
|
|
2326
|
+
return ((J = V.user) == null ? void 0 : J.id) === C;
|
|
2313
2327
|
}) : void 0;
|
|
2314
|
-
}, [(
|
|
2315
|
-
(
|
|
2316
|
-
const { message:
|
|
2317
|
-
|
|
2328
|
+
}, [(Z = k._client) == null ? void 0 : Z.userID, (q = k.state) == null ? void 0 : q.members]), I = ((G = D == null ? void 0 : D.user) == null ? void 0 : G.is_account) ?? (D == null ? void 0 : D.is_account), T = ((w = R == null ? void 0 : R.user) == null ? void 0 : w.is_account) ?? (R == null ? void 0 : R.is_account), S = L && I === !1 && T === !0, P = K(
|
|
2329
|
+
(C) => {
|
|
2330
|
+
const { message: B } = xe("ChannelView"), j = /* @__PURE__ */ n(
|
|
2331
|
+
Sa,
|
|
2318
2332
|
{
|
|
2319
|
-
...
|
|
2320
|
-
chatbotVotingEnabled:
|
|
2333
|
+
...C,
|
|
2334
|
+
chatbotVotingEnabled: v,
|
|
2321
2335
|
viewerLanguage: $
|
|
2322
2336
|
}
|
|
2323
2337
|
);
|
|
2324
|
-
return !
|
|
2338
|
+
return !N || !B ? j : N(j, B);
|
|
2325
2339
|
},
|
|
2326
|
-
[
|
|
2340
|
+
[v, N, $]
|
|
2327
2341
|
);
|
|
2328
|
-
return /* @__PURE__ */ n(
|
|
2342
|
+
return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
|
|
2329
2343
|
ls,
|
|
2330
2344
|
{
|
|
2331
2345
|
overrides: {
|
|
2332
|
-
Message:
|
|
2333
|
-
MessageActions:
|
|
2346
|
+
Message: P,
|
|
2347
|
+
MessageActions: Aa
|
|
2334
2348
|
},
|
|
2335
2349
|
children: /* @__PURE__ */ h(cs, { children: [
|
|
2336
2350
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
2337
|
-
|
|
2351
|
+
Ja,
|
|
2338
2352
|
{
|
|
2339
2353
|
onBack: e,
|
|
2340
2354
|
showBackButton: t,
|
|
2341
|
-
showChannelInfo:
|
|
2342
|
-
showStarButton:
|
|
2343
|
-
dmAgentEnabled:
|
|
2355
|
+
showChannelInfo: O,
|
|
2356
|
+
showStarButton: _,
|
|
2357
|
+
dmAgentEnabled: S,
|
|
2344
2358
|
onLeaveConversation: i,
|
|
2345
2359
|
onBlockParticipant: o,
|
|
2346
2360
|
showDeleteConversation: l,
|
|
@@ -2349,12 +2363,13 @@ const He = ({
|
|
|
2349
2363
|
onDeleteConversationClick: d,
|
|
2350
2364
|
onBlockParticipantClick: m,
|
|
2351
2365
|
onReportParticipantClick: g,
|
|
2352
|
-
customChannelActions:
|
|
2353
|
-
renderChannelActions:
|
|
2354
|
-
|
|
2366
|
+
customChannelActions: A,
|
|
2367
|
+
renderChannelActions: M,
|
|
2368
|
+
onParticipantNameClick: E,
|
|
2369
|
+
renderHeaderTitleBadges: x
|
|
2355
2370
|
}
|
|
2356
2371
|
) }, "lt-channel-header"),
|
|
2357
|
-
|
|
2372
|
+
p ? /* @__PURE__ */ n(U.Fragment, { children: p() }, "lt-channel-banner") : null,
|
|
2358
2373
|
/* @__PURE__ */ n(
|
|
2359
2374
|
"div",
|
|
2360
2375
|
{
|
|
@@ -2363,16 +2378,16 @@ const He = ({
|
|
|
2363
2378
|
},
|
|
2364
2379
|
"lt-channel-message-list"
|
|
2365
2380
|
),
|
|
2366
|
-
r ? /* @__PURE__ */ n(U.Fragment, { children: r(
|
|
2381
|
+
r ? /* @__PURE__ */ n(U.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
|
|
2367
2382
|
/* @__PURE__ */ n(
|
|
2368
|
-
|
|
2383
|
+
Pa,
|
|
2369
2384
|
{
|
|
2370
2385
|
...s && {
|
|
2371
|
-
renderActions: () => s == null ? void 0 : s(
|
|
2386
|
+
renderActions: () => s == null ? void 0 : s(k)
|
|
2372
2387
|
},
|
|
2373
|
-
renderFooter: () => a == null ? void 0 : a(
|
|
2388
|
+
renderFooter: () => a == null ? void 0 : a(k),
|
|
2374
2389
|
disabled: c,
|
|
2375
|
-
disabledReason:
|
|
2390
|
+
disabledReason: b
|
|
2376
2391
|
},
|
|
2377
2392
|
"lt-channel-message-input"
|
|
2378
2393
|
)
|
|
@@ -2390,84 +2405,85 @@ const He = ({
|
|
|
2390
2405
|
onLeaveConversation: o,
|
|
2391
2406
|
onBlockParticipant: l,
|
|
2392
2407
|
className: d,
|
|
2393
|
-
CustomChannelEmptyState: m =
|
|
2408
|
+
CustomChannelEmptyState: m = Xa,
|
|
2394
2409
|
showDeleteConversation: g = !0,
|
|
2395
2410
|
onDeleteConversationClick: u,
|
|
2396
2411
|
onBlockParticipantClick: f,
|
|
2397
2412
|
onReportParticipantClick: c,
|
|
2398
|
-
showBlockParticipant:
|
|
2399
|
-
showReportParticipant:
|
|
2400
|
-
composerDisabled:
|
|
2401
|
-
composerDisabledReason:
|
|
2402
|
-
dmAgentEnabled:
|
|
2403
|
-
messageMetadata:
|
|
2404
|
-
onMessageSent:
|
|
2405
|
-
showStarButton:
|
|
2406
|
-
chatbotVotingEnabled:
|
|
2413
|
+
showBlockParticipant: b = !0,
|
|
2414
|
+
showReportParticipant: _ = !0,
|
|
2415
|
+
composerDisabled: v = !1,
|
|
2416
|
+
composerDisabledReason: p,
|
|
2417
|
+
dmAgentEnabled: x,
|
|
2418
|
+
messageMetadata: A,
|
|
2419
|
+
onMessageSent: M,
|
|
2420
|
+
showStarButton: N = !1,
|
|
2421
|
+
chatbotVotingEnabled: L = !1,
|
|
2407
2422
|
renderChannelBanner: $,
|
|
2408
|
-
renderHeaderTitleBadges:
|
|
2409
|
-
customChannelActions:
|
|
2410
|
-
renderChannelActions:
|
|
2411
|
-
renderMessage:
|
|
2412
|
-
onMessageLinkClick:
|
|
2413
|
-
sendButton:
|
|
2414
|
-
attachmentPreviewList:
|
|
2415
|
-
viewerLanguage:
|
|
2416
|
-
showChannelInfo:
|
|
2423
|
+
renderHeaderTitleBadges: O,
|
|
2424
|
+
customChannelActions: E,
|
|
2425
|
+
renderChannelActions: k,
|
|
2426
|
+
renderMessage: R,
|
|
2427
|
+
onMessageLinkClick: D,
|
|
2428
|
+
sendButton: I,
|
|
2429
|
+
attachmentPreviewList: T,
|
|
2430
|
+
viewerLanguage: S,
|
|
2431
|
+
showChannelInfo: P = !0,
|
|
2432
|
+
onParticipantNameClick: F
|
|
2417
2433
|
}) => {
|
|
2418
|
-
const
|
|
2419
|
-
async (
|
|
2420
|
-
var
|
|
2421
|
-
const
|
|
2422
|
-
...
|
|
2423
|
-
...
|
|
2424
|
-
...
|
|
2434
|
+
const Y = K(
|
|
2435
|
+
async (q, G, w) => {
|
|
2436
|
+
var J;
|
|
2437
|
+
const C = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, B = x && !C, j = {
|
|
2438
|
+
...G,
|
|
2439
|
+
...B && { silent: !0 },
|
|
2440
|
+
...A && {
|
|
2425
2441
|
metadata: {
|
|
2426
|
-
...
|
|
2427
|
-
...
|
|
2442
|
+
...G.metadata ?? {},
|
|
2443
|
+
...A
|
|
2428
2444
|
}
|
|
2429
2445
|
}
|
|
2430
|
-
},
|
|
2431
|
-
...
|
|
2432
|
-
...
|
|
2433
|
-
},
|
|
2434
|
-
return
|
|
2446
|
+
}, W = {
|
|
2447
|
+
...w,
|
|
2448
|
+
...B && { skip_push: !0 }
|
|
2449
|
+
}, V = await e.sendMessage(j, W);
|
|
2450
|
+
return M == null || M(V), V;
|
|
2435
2451
|
},
|
|
2436
|
-
[e,
|
|
2437
|
-
),
|
|
2452
|
+
[e, x, A, M]
|
|
2453
|
+
), Z = H(null);
|
|
2438
2454
|
return X(() => {
|
|
2439
|
-
if (!
|
|
2440
|
-
const
|
|
2441
|
-
if (!
|
|
2442
|
-
const
|
|
2443
|
-
const
|
|
2444
|
-
if (!
|
|
2445
|
-
const
|
|
2446
|
-
|
|
2455
|
+
if (!D) return;
|
|
2456
|
+
const q = Z.current;
|
|
2457
|
+
if (!q) return;
|
|
2458
|
+
const G = (w) => {
|
|
2459
|
+
const C = w.target, B = C == null ? void 0 : C.closest("a[href]"), j = B == null ? void 0 : B.getAttribute("href");
|
|
2460
|
+
if (!j) return;
|
|
2461
|
+
const W = B == null ? void 0 : B.closest("[data-message-id]"), V = W == null ? void 0 : W.getAttribute("data-message-id"), J = V ? e.state.messages.find((re) => re.id === V) : void 0;
|
|
2462
|
+
D(j, J);
|
|
2447
2463
|
};
|
|
2448
|
-
return
|
|
2449
|
-
}, [
|
|
2464
|
+
return q.addEventListener("click", G), () => q.removeEventListener("click", G);
|
|
2465
|
+
}, [D, e]), /* @__PURE__ */ n(
|
|
2450
2466
|
"div",
|
|
2451
2467
|
{
|
|
2452
|
-
ref:
|
|
2453
|
-
className:
|
|
2468
|
+
ref: Z,
|
|
2469
|
+
className: y(
|
|
2454
2470
|
"messaging-channel-view h-full flex flex-col",
|
|
2455
2471
|
d
|
|
2456
2472
|
),
|
|
2457
|
-
children: /* @__PURE__ */ n(dn.Provider, { value:
|
|
2473
|
+
children: /* @__PURE__ */ n(dn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
|
|
2458
2474
|
os,
|
|
2459
2475
|
{
|
|
2460
2476
|
channel: e,
|
|
2461
|
-
MessageSystem:
|
|
2477
|
+
MessageSystem: Ha,
|
|
2462
2478
|
EmptyStateIndicator: m,
|
|
2463
2479
|
LoadingIndicator: Se,
|
|
2464
|
-
DateSeparator:
|
|
2465
|
-
TypingIndicator:
|
|
2466
|
-
doSendMessageRequest:
|
|
2467
|
-
...
|
|
2468
|
-
...
|
|
2480
|
+
DateSeparator: Vs,
|
|
2481
|
+
TypingIndicator: qa,
|
|
2482
|
+
doSendMessageRequest: Y,
|
|
2483
|
+
...I ? { SendButton: I } : {},
|
|
2484
|
+
...T ? { AttachmentPreviewList: T } : {},
|
|
2469
2485
|
children: /* @__PURE__ */ n(
|
|
2470
|
-
|
|
2486
|
+
Za,
|
|
2471
2487
|
{
|
|
2472
2488
|
onBack: t,
|
|
2473
2489
|
showBackButton: s,
|
|
@@ -2481,20 +2497,21 @@ const He = ({
|
|
|
2481
2497
|
onDeleteConversationClick: u,
|
|
2482
2498
|
onBlockParticipantClick: f,
|
|
2483
2499
|
onReportParticipantClick: c,
|
|
2484
|
-
showBlockParticipant:
|
|
2485
|
-
showReportParticipant:
|
|
2486
|
-
composerDisabled:
|
|
2487
|
-
composerDisabledReason:
|
|
2488
|
-
showStarButton:
|
|
2489
|
-
dmAgentEnabled:
|
|
2490
|
-
chatbotVotingEnabled:
|
|
2500
|
+
showBlockParticipant: b,
|
|
2501
|
+
showReportParticipant: _,
|
|
2502
|
+
composerDisabled: v,
|
|
2503
|
+
composerDisabledReason: p,
|
|
2504
|
+
showStarButton: N,
|
|
2505
|
+
dmAgentEnabled: x,
|
|
2506
|
+
chatbotVotingEnabled: L,
|
|
2491
2507
|
renderChannelBanner: $,
|
|
2492
|
-
renderHeaderTitleBadges:
|
|
2493
|
-
customChannelActions:
|
|
2494
|
-
renderChannelActions:
|
|
2495
|
-
renderMessage:
|
|
2496
|
-
viewerLanguage:
|
|
2497
|
-
showChannelInfo:
|
|
2508
|
+
renderHeaderTitleBadges: O,
|
|
2509
|
+
customChannelActions: E,
|
|
2510
|
+
renderChannelActions: k,
|
|
2511
|
+
renderMessage: R,
|
|
2512
|
+
viewerLanguage: S,
|
|
2513
|
+
showChannelInfo: P,
|
|
2514
|
+
onParticipantNameClick: F
|
|
2498
2515
|
}
|
|
2499
2516
|
)
|
|
2500
2517
|
}
|
|
@@ -2519,7 +2536,7 @@ const be = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
2519
2536
|
)
|
|
2520
2537
|
] }) }));
|
|
2521
2538
|
be.displayName = "ErrorState";
|
|
2522
|
-
const
|
|
2539
|
+
const ki = ({
|
|
2523
2540
|
capabilities: e = {},
|
|
2524
2541
|
renderMessageInputActions: t,
|
|
2525
2542
|
renderConversationFooter: s,
|
|
@@ -2534,133 +2551,133 @@ const Si = ({
|
|
|
2534
2551
|
onMessageSent: u,
|
|
2535
2552
|
chatbotVotingEnabled: f = !1,
|
|
2536
2553
|
viewerLanguage: c,
|
|
2537
|
-
renderHeaderTitleBadges:
|
|
2538
|
-
renderChannelBanner:
|
|
2539
|
-
customChannelActions:
|
|
2540
|
-
renderChannelActions:
|
|
2541
|
-
renderMessage:
|
|
2542
|
-
onMessageLinkClick:
|
|
2543
|
-
showChannelInfo:
|
|
2554
|
+
renderHeaderTitleBadges: b,
|
|
2555
|
+
renderChannelBanner: _,
|
|
2556
|
+
customChannelActions: v,
|
|
2557
|
+
renderChannelActions: p,
|
|
2558
|
+
renderMessage: x,
|
|
2559
|
+
onMessageLinkClick: A,
|
|
2560
|
+
showChannelInfo: M
|
|
2544
2561
|
}) => {
|
|
2545
2562
|
const {
|
|
2546
|
-
client:
|
|
2547
|
-
isConnected:
|
|
2563
|
+
client: N,
|
|
2564
|
+
isConnected: L,
|
|
2548
2565
|
isLoading: $,
|
|
2549
|
-
error:
|
|
2550
|
-
refreshConnection:
|
|
2551
|
-
service:
|
|
2552
|
-
debug:
|
|
2553
|
-
} =
|
|
2554
|
-
|
|
2555
|
-
const
|
|
2556
|
-
|
|
2557
|
-
const
|
|
2566
|
+
error: O,
|
|
2567
|
+
refreshConnection: E,
|
|
2568
|
+
service: k,
|
|
2569
|
+
debug: R
|
|
2570
|
+
} = Ps(), [D, I] = z(null), [T, S] = z(null), [P, F] = z(!1), { showDeleteConversation: Y = !0 } = e, Z = H(o);
|
|
2571
|
+
Z.current = o;
|
|
2572
|
+
const q = H(a);
|
|
2573
|
+
q.current = a;
|
|
2574
|
+
const G = H(null), w = H(null);
|
|
2558
2575
|
X(() => {
|
|
2559
|
-
|
|
2560
|
-
}, [
|
|
2561
|
-
if (!
|
|
2562
|
-
const
|
|
2563
|
-
if (!
|
|
2564
|
-
const
|
|
2565
|
-
if (
|
|
2566
|
-
|
|
2576
|
+
w.current = D;
|
|
2577
|
+
}, [D]), X(() => {
|
|
2578
|
+
if (!N || !L) return;
|
|
2579
|
+
const j = N.userID;
|
|
2580
|
+
if (!j) return;
|
|
2581
|
+
const W = `${j}::${i}`;
|
|
2582
|
+
if (G.current === W) return;
|
|
2583
|
+
G.current = W;
|
|
2567
2584
|
const V = () => {
|
|
2568
|
-
|
|
2585
|
+
G.current === W && (G.current = null);
|
|
2569
2586
|
};
|
|
2570
2587
|
(async () => {
|
|
2571
|
-
var
|
|
2588
|
+
var re, ue;
|
|
2572
2589
|
try {
|
|
2573
|
-
|
|
2590
|
+
R && console.log(
|
|
2574
2591
|
"[MessagingShell] Loading initial conversation with:",
|
|
2575
2592
|
i
|
|
2576
2593
|
);
|
|
2577
|
-
const
|
|
2594
|
+
const ee = await N.queryChannels(
|
|
2578
2595
|
{
|
|
2579
2596
|
type: "messaging",
|
|
2580
|
-
members: { $eq: [
|
|
2597
|
+
members: { $eq: [j, i] }
|
|
2581
2598
|
},
|
|
2582
2599
|
{},
|
|
2583
2600
|
{ limit: 1 }
|
|
2584
2601
|
);
|
|
2585
|
-
if (
|
|
2586
|
-
|
|
2602
|
+
if (ee.length > 0) {
|
|
2603
|
+
I(ee[0]), S(null), (re = q.current) == null || re.call(q, ee[0]), R && console.log(
|
|
2587
2604
|
"[MessagingShell] Initial conversation loaded:",
|
|
2588
|
-
|
|
2605
|
+
ee[0].id
|
|
2589
2606
|
);
|
|
2590
2607
|
return;
|
|
2591
2608
|
}
|
|
2592
|
-
const
|
|
2593
|
-
if (!
|
|
2594
|
-
V(),
|
|
2609
|
+
const ie = Z.current;
|
|
2610
|
+
if (!ie || !k) {
|
|
2611
|
+
V(), S("No conversation found with this account"), R && console.log(
|
|
2595
2612
|
"[MessagingShell] No conversation found for:",
|
|
2596
2613
|
i
|
|
2597
2614
|
);
|
|
2598
2615
|
return;
|
|
2599
2616
|
}
|
|
2600
2617
|
try {
|
|
2601
|
-
const
|
|
2602
|
-
id:
|
|
2603
|
-
name:
|
|
2604
|
-
phone:
|
|
2618
|
+
const Q = await k.startChannelWithParticipant({
|
|
2619
|
+
id: ie.id,
|
|
2620
|
+
name: ie.name,
|
|
2621
|
+
phone: ie.phone
|
|
2605
2622
|
});
|
|
2606
|
-
|
|
2623
|
+
I(Q), S(null), (ue = q.current) == null || ue.call(q, Q), R && console.log(
|
|
2607
2624
|
"[MessagingShell] Channel created and loaded:",
|
|
2608
|
-
|
|
2625
|
+
Q.id
|
|
2609
2626
|
);
|
|
2610
|
-
} catch (
|
|
2627
|
+
} catch (Q) {
|
|
2611
2628
|
console.error(
|
|
2612
2629
|
"[MessagingShell] Failed to create conversation:",
|
|
2613
|
-
|
|
2614
|
-
), V(),
|
|
2630
|
+
Q
|
|
2631
|
+
), V(), S("Failed to create conversation");
|
|
2615
2632
|
}
|
|
2616
|
-
} catch (
|
|
2633
|
+
} catch (ee) {
|
|
2617
2634
|
console.error(
|
|
2618
2635
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2619
|
-
|
|
2620
|
-
), V(),
|
|
2636
|
+
ee
|
|
2637
|
+
), V(), w.current || S("Failed to load conversation");
|
|
2621
2638
|
}
|
|
2622
2639
|
})();
|
|
2623
|
-
}, [i,
|
|
2624
|
-
const C =
|
|
2640
|
+
}, [i, N, L, k, R]);
|
|
2641
|
+
const C = H(r);
|
|
2625
2642
|
C.current = r;
|
|
2626
|
-
const B =
|
|
2627
|
-
var
|
|
2628
|
-
|
|
2643
|
+
const B = K(() => {
|
|
2644
|
+
var j;
|
|
2645
|
+
I(null), F(!0), (j = C.current) == null || j.call(C);
|
|
2629
2646
|
}, []);
|
|
2630
|
-
return $ ? /* @__PURE__ */ n(Se, {}) :
|
|
2647
|
+
return $ ? /* @__PURE__ */ n(Se, {}) : O ? /* @__PURE__ */ n(be, { message: O, onBack: E }) : !L || !N ? /* @__PURE__ */ n(
|
|
2631
2648
|
be,
|
|
2632
2649
|
{
|
|
2633
2650
|
message: "Not connected to messaging service",
|
|
2634
|
-
onBack:
|
|
2651
|
+
onBack: E
|
|
2635
2652
|
}
|
|
2636
|
-
) :
|
|
2653
|
+
) : T ? /* @__PURE__ */ n(be, { message: T }) : P && !D ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : D ? /* @__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(
|
|
2637
2654
|
un,
|
|
2638
2655
|
{
|
|
2639
|
-
channel:
|
|
2656
|
+
channel: D,
|
|
2640
2657
|
renderMessageInputActions: t,
|
|
2641
2658
|
renderConversationFooter: s,
|
|
2642
|
-
renderChannelBanner:
|
|
2659
|
+
renderChannelBanner: _,
|
|
2643
2660
|
onLeaveConversation: B,
|
|
2644
2661
|
onBlockParticipant: B,
|
|
2645
2662
|
CustomChannelEmptyState: l,
|
|
2646
|
-
showDeleteConversation:
|
|
2663
|
+
showDeleteConversation: Y,
|
|
2647
2664
|
onBlockParticipantClick: d,
|
|
2648
2665
|
onReportParticipantClick: m,
|
|
2649
2666
|
dmAgentEnabled: g,
|
|
2650
2667
|
onMessageSent: u,
|
|
2651
2668
|
chatbotVotingEnabled: f,
|
|
2652
2669
|
viewerLanguage: c,
|
|
2653
|
-
renderHeaderTitleBadges:
|
|
2654
|
-
customChannelActions:
|
|
2655
|
-
renderChannelActions:
|
|
2656
|
-
renderMessage:
|
|
2657
|
-
onMessageLinkClick:
|
|
2658
|
-
showChannelInfo:
|
|
2670
|
+
renderHeaderTitleBadges: b,
|
|
2671
|
+
customChannelActions: v,
|
|
2672
|
+
renderChannelActions: p,
|
|
2673
|
+
renderMessage: x,
|
|
2674
|
+
onMessageLinkClick: A,
|
|
2675
|
+
showChannelInfo: M
|
|
2659
2676
|
},
|
|
2660
|
-
|
|
2677
|
+
D.id
|
|
2661
2678
|
) }) }) : /* @__PURE__ */ n(Se, {});
|
|
2662
2679
|
};
|
|
2663
|
-
function
|
|
2680
|
+
function Qa(e) {
|
|
2664
2681
|
const t = e.state.pending_messages;
|
|
2665
2682
|
if (t != null && t.length)
|
|
2666
2683
|
for (const s of t)
|
|
@@ -2673,18 +2690,18 @@ const mn = U.createContext({
|
|
|
2673
2690
|
debug: !1,
|
|
2674
2691
|
renderMessagePreview: void 0,
|
|
2675
2692
|
viewerLanguage: void 0
|
|
2676
|
-
}),
|
|
2693
|
+
}), er = mn.Provider, tr = () => U.useContext(mn), nr = (e, t) => {
|
|
2677
2694
|
const s = new Date(
|
|
2678
2695
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2679
2696
|
), r = new Date(
|
|
2680
2697
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
2681
2698
|
).getTime() - s.getTime();
|
|
2682
2699
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
2683
|
-
},
|
|
2700
|
+
}, sr = (e) => {
|
|
2684
2701
|
const t = /* @__PURE__ */ new Date();
|
|
2685
2702
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
2686
2703
|
return "Just now";
|
|
2687
|
-
const a =
|
|
2704
|
+
const a = nr(e, t);
|
|
2688
2705
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
2689
2706
|
hour: "numeric",
|
|
2690
2707
|
minute: "2-digit",
|
|
@@ -2696,49 +2713,49 @@ const mn = U.createContext({
|
|
|
2696
2713
|
});
|
|
2697
2714
|
}, hn = U.memo(
|
|
2698
2715
|
({ channel: e, unread: t }) => {
|
|
2699
|
-
var
|
|
2716
|
+
var L, $, O;
|
|
2700
2717
|
const {
|
|
2701
2718
|
selectedChannel: s,
|
|
2702
2719
|
onChannelSelect: a,
|
|
2703
2720
|
debug: r,
|
|
2704
2721
|
renderMessagePreview: i,
|
|
2705
2722
|
viewerLanguage: o
|
|
2706
|
-
} =
|
|
2723
|
+
} = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2707
2724
|
e && a(e);
|
|
2708
|
-
}, m = (
|
|
2709
|
-
const
|
|
2710
|
-
!
|
|
2711
|
-
}, u = Object.values(((
|
|
2712
|
-
(
|
|
2713
|
-
var
|
|
2714
|
-
return ((
|
|
2725
|
+
}, m = (E) => {
|
|
2726
|
+
const k = E.key === "Enter" || E.key === " ", R = E.repeat;
|
|
2727
|
+
!k || R || (E.preventDefault(), d());
|
|
2728
|
+
}, u = Object.values(((L = e == null ? void 0 : e.state) == null ? void 0 : L.members) || {}).find(
|
|
2729
|
+
(E) => {
|
|
2730
|
+
var k, R;
|
|
2731
|
+
return ((k = E.user) == null ? void 0 : k.id) && E.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
|
|
2715
2732
|
}
|
|
2716
|
-
), f = Xt(u == null ? void 0 : u.user), c = (
|
|
2717
|
-
var
|
|
2718
|
-
const
|
|
2719
|
-
if (
|
|
2720
|
-
for (let
|
|
2721
|
-
if (
|
|
2733
|
+
), f = Xt(u == null ? void 0 : u.user), c = ($ = u == null ? void 0 : u.user) == null ? void 0 : $.image, b = (() => {
|
|
2734
|
+
var k;
|
|
2735
|
+
const E = (k = e == null ? void 0 : e.state) == null ? void 0 : k.messages;
|
|
2736
|
+
if (E != null && E.length) {
|
|
2737
|
+
for (let R = E.length - 1; R >= 0; R--)
|
|
2738
|
+
if (E[R].type !== "system") return E[R];
|
|
2722
2739
|
}
|
|
2723
2740
|
})(), v = (() => {
|
|
2724
|
-
var
|
|
2725
|
-
const
|
|
2741
|
+
var T, S, P, F;
|
|
2742
|
+
const E = Kt({
|
|
2726
2743
|
message: b,
|
|
2727
2744
|
viewerLanguage: o
|
|
2728
2745
|
});
|
|
2729
|
-
if (((
|
|
2730
|
-
if (((
|
|
2731
|
-
if (((
|
|
2732
|
-
if (
|
|
2733
|
-
const
|
|
2734
|
-
return
|
|
2735
|
-
})(),
|
|
2746
|
+
if (((T = b == null ? void 0 : b.metadata) == null ? void 0 : T.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
|
|
2747
|
+
if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
|
|
2748
|
+
if (((P = b == null ? void 0 : b.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_ATTACHMENT") return E ? `📎 ${E}` : "📎 Sent an attachment";
|
|
2749
|
+
if (E) return E;
|
|
2750
|
+
const I = (F = b == null ? void 0 : b.attachments) == null ? void 0 : F[0];
|
|
2751
|
+
return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2752
|
+
})(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", x = b ? Ee(b) : !1, A = i ? i(b, v) : `${x ? "✨ " : ""}${v}`, M = Wt(e), N = t ?? 0;
|
|
2736
2753
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2737
2754
|
channelId: e == null ? void 0 : e.id,
|
|
2738
2755
|
isSelected: l,
|
|
2739
2756
|
participantName: f,
|
|
2740
|
-
unreadCount:
|
|
2741
|
-
hasTimestamp: !!
|
|
2757
|
+
unreadCount: N,
|
|
2758
|
+
hasTimestamp: !!p
|
|
2742
2759
|
}), /* @__PURE__ */ n(
|
|
2743
2760
|
"div",
|
|
2744
2761
|
{
|
|
@@ -2746,7 +2763,7 @@ const mn = U.createContext({
|
|
|
2746
2763
|
tabIndex: 0,
|
|
2747
2764
|
onClick: d,
|
|
2748
2765
|
onKeyDown: m,
|
|
2749
|
-
className:
|
|
2766
|
+
className: y(
|
|
2750
2767
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
2751
2768
|
{
|
|
2752
2769
|
"bg-black/[0.04]": l,
|
|
@@ -2755,27 +2772,34 @@ const mn = U.createContext({
|
|
|
2755
2772
|
),
|
|
2756
2773
|
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
|
|
2757
2774
|
/* @__PURE__ */ n(
|
|
2758
|
-
|
|
2775
|
+
oe,
|
|
2759
2776
|
{
|
|
2760
|
-
id: ((
|
|
2777
|
+
id: ((O = u == null ? void 0 : u.user) == null ? void 0 : O.id) || e.id || "unknown",
|
|
2761
2778
|
name: f,
|
|
2762
2779
|
image: c,
|
|
2763
2780
|
size: 48,
|
|
2764
|
-
starred:
|
|
2781
|
+
starred: M
|
|
2765
2782
|
}
|
|
2766
2783
|
),
|
|
2767
2784
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
2768
2785
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2769
|
-
/* @__PURE__ */ h(
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2786
|
+
/* @__PURE__ */ h(
|
|
2787
|
+
"h3",
|
|
2788
|
+
{
|
|
2789
|
+
className: y(
|
|
2790
|
+
"text-sm font-medium truncate text-[#191918]"
|
|
2791
|
+
),
|
|
2792
|
+
children: [
|
|
2793
|
+
M && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
2794
|
+
f
|
|
2795
|
+
]
|
|
2796
|
+
}
|
|
2797
|
+
),
|
|
2798
|
+
p && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: p })
|
|
2775
2799
|
] }),
|
|
2776
2800
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2777
|
-
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
2778
|
-
|
|
2801
|
+
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
|
|
2802
|
+
N > 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: N > 99 ? "99+" : N })
|
|
2779
2803
|
] })
|
|
2780
2804
|
] })
|
|
2781
2805
|
] })
|
|
@@ -2784,14 +2808,14 @@ const mn = U.createContext({
|
|
|
2784
2808
|
}
|
|
2785
2809
|
);
|
|
2786
2810
|
hn.displayName = "CustomChannelPreview";
|
|
2787
|
-
const
|
|
2811
|
+
const ar = { last_message_at: -1 }, rr = U.memo(
|
|
2788
2812
|
({
|
|
2789
2813
|
onChannelSelect: e,
|
|
2790
2814
|
selectedChannel: t,
|
|
2791
2815
|
filters: s,
|
|
2792
2816
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
2793
2817
|
channelRenderFilterFn: r,
|
|
2794
|
-
sort: i =
|
|
2818
|
+
sort: i = ar,
|
|
2795
2819
|
className: o,
|
|
2796
2820
|
customEmptyStateIndicator: l,
|
|
2797
2821
|
renderMessagePreview: d,
|
|
@@ -2800,10 +2824,10 @@ const ir = { last_message_at: -1 }, or = U.memo(
|
|
|
2800
2824
|
const g = U.useRef(0);
|
|
2801
2825
|
g.current++;
|
|
2802
2826
|
const { debug: u = !1 } = Xe(), f = U.useCallback(
|
|
2803
|
-
(
|
|
2804
|
-
for (const
|
|
2805
|
-
|
|
2806
|
-
return r ? r(
|
|
2827
|
+
(b) => {
|
|
2828
|
+
for (const _ of b)
|
|
2829
|
+
Qa(_);
|
|
2830
|
+
return r ? r(b) : b;
|
|
2807
2831
|
},
|
|
2808
2832
|
[r]
|
|
2809
2833
|
);
|
|
@@ -2831,11 +2855,11 @@ const ir = { last_message_at: -1 }, or = U.memo(
|
|
|
2831
2855
|
return /* @__PURE__ */ n(
|
|
2832
2856
|
"div",
|
|
2833
2857
|
{
|
|
2834
|
-
className:
|
|
2858
|
+
className: y(
|
|
2835
2859
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2836
2860
|
o
|
|
2837
2861
|
),
|
|
2838
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
2862
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: c, children: /* @__PURE__ */ n(
|
|
2839
2863
|
us,
|
|
2840
2864
|
{
|
|
2841
2865
|
filters: s,
|
|
@@ -2853,26 +2877,26 @@ const ir = { last_message_at: -1 }, or = U.memo(
|
|
|
2853
2877
|
);
|
|
2854
2878
|
}
|
|
2855
2879
|
);
|
|
2856
|
-
|
|
2857
|
-
const
|
|
2880
|
+
rr.displayName = "ChannelList";
|
|
2881
|
+
const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2858
2882
|
function tt(e) {
|
|
2859
2883
|
if (typeof e != "string") return;
|
|
2860
2884
|
const t = e.trim();
|
|
2861
2885
|
if (t === "") return;
|
|
2862
|
-
const s =
|
|
2886
|
+
const s = ir.exec(t);
|
|
2863
2887
|
if (s) {
|
|
2864
2888
|
const a = s[1].toLowerCase();
|
|
2865
|
-
return
|
|
2889
|
+
return or.has(a) ? t : void 0;
|
|
2866
2890
|
}
|
|
2867
2891
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2868
2892
|
}
|
|
2869
|
-
const
|
|
2893
|
+
const lr = {
|
|
2870
2894
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2871
2895
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2872
|
-
},
|
|
2873
|
-
const s =
|
|
2896
|
+
}, cr = ({ variant: e, cta: t }) => {
|
|
2897
|
+
const s = y(
|
|
2874
2898
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2875
|
-
|
|
2899
|
+
lr[e]
|
|
2876
2900
|
), a = tt(t.href);
|
|
2877
2901
|
return a ? /* @__PURE__ */ n(
|
|
2878
2902
|
"a",
|
|
@@ -2899,10 +2923,10 @@ const dr = {
|
|
|
2899
2923
|
children: t.label
|
|
2900
2924
|
}
|
|
2901
2925
|
);
|
|
2902
|
-
},
|
|
2926
|
+
}, dr = {
|
|
2903
2927
|
dark: "text-white",
|
|
2904
2928
|
light: "text-black/90"
|
|
2905
|
-
},
|
|
2929
|
+
}, ur = "text-white/30", mr = {
|
|
2906
2930
|
dark: "text-white/55",
|
|
2907
2931
|
light: "text-black/55"
|
|
2908
2932
|
}, nt = ({
|
|
@@ -2915,14 +2939,14 @@ const dr = {
|
|
|
2915
2939
|
cta: o,
|
|
2916
2940
|
trailingAction: l
|
|
2917
2941
|
}) => {
|
|
2918
|
-
const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "",
|
|
2919
|
-
if (!g && !u && !c && !
|
|
2920
|
-
const
|
|
2942
|
+
const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
|
|
2943
|
+
if (!g && !u && !c && !b) return null;
|
|
2944
|
+
const v = y(
|
|
2921
2945
|
"truncate text-base font-medium leading-6",
|
|
2922
|
-
d && !t ?
|
|
2923
|
-
),
|
|
2946
|
+
d && !t ? ur : dr[e]
|
|
2947
|
+
), p = y(
|
|
2924
2948
|
"truncate text-xs leading-4",
|
|
2925
|
-
|
|
2949
|
+
mr[e]
|
|
2926
2950
|
);
|
|
2927
2951
|
return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
|
|
2928
2952
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2930,17 +2954,17 @@ const dr = {
|
|
|
2930
2954
|
/* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2931
2955
|
g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2932
2956
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
2933
|
-
/* @__PURE__ */ n("p", { className:
|
|
2957
|
+
/* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
|
|
2934
2958
|
] }),
|
|
2935
|
-
u && /* @__PURE__ */ n("p", { className:
|
|
2959
|
+
u && /* @__PURE__ */ n("p", { className: p, children: a })
|
|
2936
2960
|
] }),
|
|
2937
|
-
!
|
|
2961
|
+
!b && c && /* @__PURE__ */ n("p", { className: p, children: f })
|
|
2938
2962
|
] }),
|
|
2939
2963
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2940
2964
|
] }),
|
|
2941
|
-
o && /* @__PURE__ */ n(
|
|
2965
|
+
o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
|
|
2942
2966
|
] });
|
|
2943
|
-
},
|
|
2967
|
+
}, hr = y(
|
|
2944
2968
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2945
2969
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2946
2970
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2958,8 +2982,8 @@ const dr = {
|
|
|
2958
2982
|
bgClassName: l,
|
|
2959
2983
|
"data-testid": d
|
|
2960
2984
|
}) => {
|
|
2961
|
-
const m = s != null || a != null, g =
|
|
2962
|
-
|
|
2985
|
+
const m = s != null || a != null, g = y(
|
|
2986
|
+
hr,
|
|
2963
2987
|
l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2964
2988
|
// `focus-ring` is a design-system utility from the component-library
|
|
2965
2989
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2989,7 +3013,7 @@ const dr = {
|
|
|
2989
3013
|
onClick: a,
|
|
2990
3014
|
"aria-label": r,
|
|
2991
3015
|
"data-testid": d,
|
|
2992
|
-
className:
|
|
3016
|
+
className: y(g, "text-left"),
|
|
2993
3017
|
children: [
|
|
2994
3018
|
t,
|
|
2995
3019
|
u
|
|
@@ -3007,15 +3031,15 @@ const dr = {
|
|
|
3007
3031
|
]
|
|
3008
3032
|
}
|
|
3009
3033
|
);
|
|
3010
|
-
},
|
|
3034
|
+
}, fr = {
|
|
3011
3035
|
dark: "bg-white/10",
|
|
3012
3036
|
light: "bg-black/5"
|
|
3013
|
-
},
|
|
3037
|
+
}, gr = {
|
|
3014
3038
|
dark: "size-16 text-white/25",
|
|
3015
3039
|
light: "size-16 text-black/25"
|
|
3016
|
-
}, Re = (e, t) => !!t && !!e &&
|
|
3040
|
+
}, Re = (e, t) => !!t && !!e && ae(e) === "audio", fn = (e, t) => {
|
|
3017
3041
|
if (!t || !e) return !1;
|
|
3018
|
-
const s =
|
|
3042
|
+
const s = ae(e);
|
|
3019
3043
|
return s === "video" || s === "audio";
|
|
3020
3044
|
}, st = "bg-[#F2F3F4]", Te = ({
|
|
3021
3045
|
variant: e,
|
|
@@ -3026,7 +3050,7 @@ const dr = {
|
|
|
3026
3050
|
topLeft: i,
|
|
3027
3051
|
topRight: o
|
|
3028
3052
|
}) => {
|
|
3029
|
-
const l =
|
|
3053
|
+
const l = ae(r), d = !!s && l === "video";
|
|
3030
3054
|
return Re(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3031
3055
|
"audio",
|
|
3032
3056
|
{
|
|
@@ -3039,7 +3063,7 @@ const dr = {
|
|
|
3039
3063
|
) }) : /* @__PURE__ */ h(
|
|
3040
3064
|
"div",
|
|
3041
3065
|
{
|
|
3042
|
-
className:
|
|
3066
|
+
className: y(
|
|
3043
3067
|
"relative h-[180px] w-full overflow-hidden",
|
|
3044
3068
|
d && "bg-black"
|
|
3045
3069
|
),
|
|
@@ -3066,12 +3090,12 @@ const dr = {
|
|
|
3066
3090
|
) : /* @__PURE__ */ n(
|
|
3067
3091
|
"div",
|
|
3068
3092
|
{
|
|
3069
|
-
className:
|
|
3093
|
+
className: y(
|
|
3070
3094
|
"flex h-full w-full items-center justify-center",
|
|
3071
|
-
|
|
3095
|
+
fr[e]
|
|
3072
3096
|
),
|
|
3073
|
-
children:
|
|
3074
|
-
className:
|
|
3097
|
+
children: ce(r, {
|
|
3098
|
+
className: gr[e],
|
|
3075
3099
|
weight: "regular"
|
|
3076
3100
|
})
|
|
3077
3101
|
}
|
|
@@ -3081,7 +3105,7 @@ const dr = {
|
|
|
3081
3105
|
]
|
|
3082
3106
|
}
|
|
3083
3107
|
);
|
|
3084
|
-
},
|
|
3108
|
+
}, br = ({
|
|
3085
3109
|
title: e,
|
|
3086
3110
|
placeholderTitle: t,
|
|
3087
3111
|
description: s,
|
|
@@ -3095,7 +3119,7 @@ const dr = {
|
|
|
3095
3119
|
onDismiss: g,
|
|
3096
3120
|
onEditClick: u
|
|
3097
3121
|
}) => {
|
|
3098
|
-
const f = l === "classic", c = Re(r, o),
|
|
3122
|
+
const f = l === "classic", c = Re(r, o), b = g ? /* @__PURE__ */ n(
|
|
3099
3123
|
"button",
|
|
3100
3124
|
{
|
|
3101
3125
|
type: "button",
|
|
@@ -3104,14 +3128,14 @@ const dr = {
|
|
|
3104
3128
|
className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
|
|
3105
3129
|
children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
|
|
3106
3130
|
}
|
|
3107
|
-
) : void 0,
|
|
3131
|
+
) : void 0, _ = u ? /* @__PURE__ */ n(
|
|
3108
3132
|
"button",
|
|
3109
3133
|
{
|
|
3110
3134
|
type: "button",
|
|
3111
3135
|
onClick: u,
|
|
3112
3136
|
"aria-label": "Edit attachment",
|
|
3113
3137
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3114
|
-
children: /* @__PURE__ */ n(
|
|
3138
|
+
children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
|
|
3115
3139
|
}
|
|
3116
3140
|
) : void 0;
|
|
3117
3141
|
return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: st, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -3124,12 +3148,12 @@ const dr = {
|
|
|
3124
3148
|
mimeType: r
|
|
3125
3149
|
}
|
|
3126
3150
|
) }),
|
|
3127
|
-
|
|
3151
|
+
b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
|
|
3128
3152
|
] }) }) : /* @__PURE__ */ h(
|
|
3129
3153
|
Ie,
|
|
3130
3154
|
{
|
|
3131
3155
|
variant: "dark",
|
|
3132
|
-
topRight: f ?
|
|
3156
|
+
topRight: f ? b : void 0,
|
|
3133
3157
|
children: [
|
|
3134
3158
|
!f && /* @__PURE__ */ n(
|
|
3135
3159
|
Te,
|
|
@@ -3139,7 +3163,7 @@ const dr = {
|
|
|
3139
3163
|
sourceUrl: o,
|
|
3140
3164
|
title: e,
|
|
3141
3165
|
mimeType: r,
|
|
3142
|
-
topRight:
|
|
3166
|
+
topRight: b
|
|
3143
3167
|
}
|
|
3144
3168
|
),
|
|
3145
3169
|
/* @__PURE__ */ n(
|
|
@@ -3152,13 +3176,13 @@ const dr = {
|
|
|
3152
3176
|
url: a,
|
|
3153
3177
|
appIcon: d,
|
|
3154
3178
|
cta: m,
|
|
3155
|
-
trailingAction:
|
|
3179
|
+
trailingAction: _
|
|
3156
3180
|
}
|
|
3157
3181
|
)
|
|
3158
3182
|
]
|
|
3159
3183
|
}
|
|
3160
3184
|
);
|
|
3161
|
-
},
|
|
3185
|
+
}, pr = ({
|
|
3162
3186
|
title: e,
|
|
3163
3187
|
description: t,
|
|
3164
3188
|
url: s,
|
|
@@ -3170,11 +3194,11 @@ const dr = {
|
|
|
3170
3194
|
cta: d,
|
|
3171
3195
|
onClick: m
|
|
3172
3196
|
}) => {
|
|
3173
|
-
const g = fn(a, i), u = tt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0,
|
|
3197
|
+
const g = fn(a, i), u = tt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Re(a, i) ? st : void 0, _ = d && m ? {
|
|
3174
3198
|
...d,
|
|
3175
3199
|
onClick: () => {
|
|
3176
|
-
var
|
|
3177
|
-
m(), (
|
|
3200
|
+
var v;
|
|
3201
|
+
m(), (v = d.onClick) == null || v.call(d);
|
|
3178
3202
|
}
|
|
3179
3203
|
} : d;
|
|
3180
3204
|
return /* @__PURE__ */ h(
|
|
@@ -3184,7 +3208,7 @@ const dr = {
|
|
|
3184
3208
|
href: f,
|
|
3185
3209
|
onClick: c,
|
|
3186
3210
|
ariaLabel: e ?? "Open attachment preview",
|
|
3187
|
-
bgClassName:
|
|
3211
|
+
bgClassName: b,
|
|
3188
3212
|
"data-testid": "link-attachment",
|
|
3189
3213
|
children: [
|
|
3190
3214
|
o === "featured" && /* @__PURE__ */ n(
|
|
@@ -3205,13 +3229,13 @@ const dr = {
|
|
|
3205
3229
|
description: t,
|
|
3206
3230
|
url: s,
|
|
3207
3231
|
appIcon: l,
|
|
3208
|
-
cta:
|
|
3232
|
+
cta: _
|
|
3209
3233
|
}
|
|
3210
3234
|
)
|
|
3211
3235
|
]
|
|
3212
3236
|
}
|
|
3213
3237
|
);
|
|
3214
|
-
},
|
|
3238
|
+
}, vr = ({
|
|
3215
3239
|
title: e,
|
|
3216
3240
|
placeholderTitle: t,
|
|
3217
3241
|
description: s,
|
|
@@ -3224,13 +3248,13 @@ const dr = {
|
|
|
3224
3248
|
cta: m,
|
|
3225
3249
|
onClick: g
|
|
3226
3250
|
}) => {
|
|
3227
|
-
const u = fn(r, o), f = tt(a), c = m == null && f != null && !u ? f : void 0,
|
|
3251
|
+
const u = fn(r, o), f = tt(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
|
|
3228
3252
|
return /* @__PURE__ */ h(
|
|
3229
3253
|
Ie,
|
|
3230
3254
|
{
|
|
3231
3255
|
variant: "dark",
|
|
3232
3256
|
href: c,
|
|
3233
|
-
onClick:
|
|
3257
|
+
onClick: b,
|
|
3234
3258
|
bgClassName: Re(r, o) ? st : void 0,
|
|
3235
3259
|
children: [
|
|
3236
3260
|
l === "featured" && /* @__PURE__ */ n(
|
|
@@ -3258,20 +3282,20 @@ const dr = {
|
|
|
3258
3282
|
]
|
|
3259
3283
|
}
|
|
3260
3284
|
);
|
|
3261
|
-
},
|
|
3262
|
-
Composer:
|
|
3263
|
-
Sent:
|
|
3264
|
-
Received:
|
|
3265
|
-
},
|
|
3285
|
+
}, Ei = {
|
|
3286
|
+
Composer: br,
|
|
3287
|
+
Sent: vr,
|
|
3288
|
+
Received: pr
|
|
3289
|
+
}, xr = {
|
|
3266
3290
|
dark: "bg-[#121110]",
|
|
3267
3291
|
light: "bg-[#e9eaed]"
|
|
3268
|
-
},
|
|
3292
|
+
}, wr = {
|
|
3269
3293
|
dark: "text-white",
|
|
3270
3294
|
light: "text-[#080707]"
|
|
3271
|
-
},
|
|
3295
|
+
}, _r = {
|
|
3272
3296
|
dark: "border-white/[0.08]",
|
|
3273
3297
|
light: "border-black/[0.08]"
|
|
3274
|
-
},
|
|
3298
|
+
}, Nr = (e) => e === "dark" ? "sender" : "receiver", yr = {
|
|
3275
3299
|
sender: {
|
|
3276
3300
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
3277
3301
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -3293,13 +3317,13 @@ const dr = {
|
|
|
3293
3317
|
children: i,
|
|
3294
3318
|
"data-testid": o
|
|
3295
3319
|
}) => {
|
|
3296
|
-
const l = t != null && t !== "", d =
|
|
3320
|
+
const l = t != null && t !== "", d = yr[Nr(e)][a];
|
|
3297
3321
|
return /* @__PURE__ */ h(
|
|
3298
3322
|
"div",
|
|
3299
3323
|
{
|
|
3300
3324
|
"data-testid": o,
|
|
3301
3325
|
"data-group-position": a,
|
|
3302
|
-
className:
|
|
3326
|
+
className: y(
|
|
3303
3327
|
// 280px-wide bubble — matches the mobile chat attachment width
|
|
3304
3328
|
// and keeps the document / image / audio bubbles visually
|
|
3305
3329
|
// consistent inside the conversation timeline. The 8px / 16px
|
|
@@ -3308,10 +3332,10 @@ const dr = {
|
|
|
3308
3332
|
// as the surrounding `CustomMessage` text bubbles.
|
|
3309
3333
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
3310
3334
|
d,
|
|
3311
|
-
|
|
3312
|
-
|
|
3335
|
+
xr[e],
|
|
3336
|
+
wr[e],
|
|
3313
3337
|
s && "border",
|
|
3314
|
-
s &&
|
|
3338
|
+
s && _r[e],
|
|
3315
3339
|
r
|
|
3316
3340
|
),
|
|
3317
3341
|
children: [
|
|
@@ -3319,7 +3343,7 @@ const dr = {
|
|
|
3319
3343
|
l ? /* @__PURE__ */ n(
|
|
3320
3344
|
"p",
|
|
3321
3345
|
{
|
|
3322
|
-
className:
|
|
3346
|
+
className: y(
|
|
3323
3347
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
3324
3348
|
// the same font family + size as `.str-chat__message-text`
|
|
3325
3349
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -3348,22 +3372,22 @@ const dr = {
|
|
|
3348
3372
|
a.stopPropagation(), e();
|
|
3349
3373
|
},
|
|
3350
3374
|
"aria-label": s,
|
|
3351
|
-
className:
|
|
3375
|
+
className: y(
|
|
3352
3376
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
3353
3377
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
3354
3378
|
),
|
|
3355
3379
|
children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
|
|
3356
3380
|
}
|
|
3357
|
-
), Ne = (e) => e === "received" ? "light" : "dark",
|
|
3381
|
+
), Ne = (e) => e === "received" ? "light" : "dark", Si = ({
|
|
3358
3382
|
firstOfGroup: e,
|
|
3359
3383
|
endOfGroup: t,
|
|
3360
3384
|
groupedByUser: s
|
|
3361
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
3385
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Cr = ({
|
|
3362
3386
|
src: e,
|
|
3363
3387
|
mimeType: t,
|
|
3364
3388
|
filename: s,
|
|
3365
3389
|
items: a
|
|
3366
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
3390
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], kr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3367
3391
|
/* @__PURE__ */ n(
|
|
3368
3392
|
"audio",
|
|
3369
3393
|
{
|
|
@@ -3386,7 +3410,7 @@ const dr = {
|
|
|
3386
3410
|
preload: l,
|
|
3387
3411
|
onDismiss: d
|
|
3388
3412
|
}) => {
|
|
3389
|
-
const m = Ne(e), g = e === "composer" && !!d, u =
|
|
3413
|
+
const m = Ne(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
|
|
3390
3414
|
if (u.length === 0)
|
|
3391
3415
|
return null;
|
|
3392
3416
|
const f = l ?? (u.length > 1 ? "none" : "metadata");
|
|
@@ -3397,30 +3421,30 @@ const dr = {
|
|
|
3397
3421
|
text: i,
|
|
3398
3422
|
groupPosition: o,
|
|
3399
3423
|
"data-testid": "audio-attachment",
|
|
3400
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c,
|
|
3401
|
-
|
|
3424
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ n(
|
|
3425
|
+
kr,
|
|
3402
3426
|
{
|
|
3403
3427
|
item: c,
|
|
3404
3428
|
preload: f,
|
|
3405
3429
|
trailingAction: (
|
|
3406
3430
|
// Composer only supports a single attachment, so the
|
|
3407
3431
|
// dismiss control sits on the only player.
|
|
3408
|
-
g &&
|
|
3432
|
+
g && b === 0 ? /* @__PURE__ */ n(_e, { onClick: d, variant: "inline" }) : void 0
|
|
3409
3433
|
)
|
|
3410
3434
|
},
|
|
3411
|
-
`${c.src}-${
|
|
3435
|
+
`${c.src}-${b}`
|
|
3412
3436
|
)) })
|
|
3413
3437
|
}
|
|
3414
3438
|
);
|
|
3415
|
-
},
|
|
3416
|
-
Composer:
|
|
3417
|
-
Sent:
|
|
3418
|
-
Received:
|
|
3439
|
+
}, Er = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), Tr = {
|
|
3440
|
+
Composer: Er,
|
|
3441
|
+
Sent: Sr,
|
|
3442
|
+
Received: Ir
|
|
3419
3443
|
};
|
|
3420
|
-
function
|
|
3444
|
+
function Ar(e) {
|
|
3421
3445
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
3422
3446
|
}
|
|
3423
|
-
const
|
|
3447
|
+
const Mr = {
|
|
3424
3448
|
pdf: "PDF",
|
|
3425
3449
|
doc: "DOC",
|
|
3426
3450
|
xls: "XLS",
|
|
@@ -3430,7 +3454,7 @@ const Lr = {
|
|
|
3430
3454
|
text: "TXT",
|
|
3431
3455
|
markdown: "MD"
|
|
3432
3456
|
};
|
|
3433
|
-
function
|
|
3457
|
+
function Rr(e, t) {
|
|
3434
3458
|
if (t) {
|
|
3435
3459
|
const r = t.lastIndexOf(".");
|
|
3436
3460
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -3439,8 +3463,8 @@ function Dr(e, t) {
|
|
|
3439
3463
|
}
|
|
3440
3464
|
}
|
|
3441
3465
|
if (!e) return;
|
|
3442
|
-
if (
|
|
3443
|
-
const r = Qt(e), i =
|
|
3466
|
+
if (ae(e) === "document") {
|
|
3467
|
+
const r = Qt(e), i = Mr[r];
|
|
3444
3468
|
if (i) return i;
|
|
3445
3469
|
if (e === "application/octet-stream") return;
|
|
3446
3470
|
}
|
|
@@ -3448,11 +3472,11 @@ function Dr(e, t) {
|
|
|
3448
3472
|
if (!(!a || a === "*"))
|
|
3449
3473
|
return a.toUpperCase();
|
|
3450
3474
|
}
|
|
3451
|
-
function
|
|
3452
|
-
const a =
|
|
3475
|
+
function Lr(e, t, s) {
|
|
3476
|
+
const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
|
|
3453
3477
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3454
3478
|
}
|
|
3455
|
-
function
|
|
3479
|
+
function te(e) {
|
|
3456
3480
|
try {
|
|
3457
3481
|
const s = new URL(e).pathname.split("/").pop();
|
|
3458
3482
|
return s && s.length > 0 ? decodeURIComponent(s) : "download";
|
|
@@ -3460,13 +3484,13 @@ function ee(e) {
|
|
|
3460
3484
|
return "download";
|
|
3461
3485
|
}
|
|
3462
3486
|
}
|
|
3463
|
-
const
|
|
3487
|
+
const Dr = {
|
|
3464
3488
|
dark: "text-white/55",
|
|
3465
3489
|
light: "text-black/65"
|
|
3466
|
-
},
|
|
3490
|
+
}, Or = {
|
|
3467
3491
|
dark: "bg-white/10",
|
|
3468
3492
|
light: "bg-black/5"
|
|
3469
|
-
},
|
|
3493
|
+
}, Pr = {
|
|
3470
3494
|
dark: "text-white/85",
|
|
3471
3495
|
light: "text-black/85"
|
|
3472
3496
|
}, gn = ({
|
|
@@ -3479,16 +3503,16 @@ const Or = {
|
|
|
3479
3503
|
activateLabel: o,
|
|
3480
3504
|
trailingAction: l
|
|
3481
3505
|
}) => {
|
|
3482
|
-
const d = s ?? t ?? "File", m =
|
|
3506
|
+
const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
|
|
3483
3507
|
"div",
|
|
3484
3508
|
{
|
|
3485
|
-
className:
|
|
3509
|
+
className: y(
|
|
3486
3510
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3487
|
-
|
|
3511
|
+
Or[e]
|
|
3488
3512
|
),
|
|
3489
3513
|
"aria-hidden": !0,
|
|
3490
|
-
children:
|
|
3491
|
-
className:
|
|
3514
|
+
children: ce(a, {
|
|
3515
|
+
className: y("size-6", Pr[e]),
|
|
3492
3516
|
weight: "regular"
|
|
3493
3517
|
})
|
|
3494
3518
|
}
|
|
@@ -3497,9 +3521,9 @@ const Or = {
|
|
|
3497
3521
|
m ? /* @__PURE__ */ n(
|
|
3498
3522
|
"p",
|
|
3499
3523
|
{
|
|
3500
|
-
className:
|
|
3524
|
+
className: y(
|
|
3501
3525
|
"truncate text-xs leading-4",
|
|
3502
|
-
|
|
3526
|
+
Dr[e]
|
|
3503
3527
|
),
|
|
3504
3528
|
children: m
|
|
3505
3529
|
}
|
|
@@ -3510,7 +3534,7 @@ const Or = {
|
|
|
3510
3534
|
type: "button",
|
|
3511
3535
|
onClick: i,
|
|
3512
3536
|
"aria-label": o,
|
|
3513
|
-
className:
|
|
3537
|
+
className: y(
|
|
3514
3538
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
3515
3539
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
3516
3540
|
),
|
|
@@ -3519,7 +3543,7 @@ const Or = {
|
|
|
3519
3543
|
u
|
|
3520
3544
|
]
|
|
3521
3545
|
}
|
|
3522
|
-
) : /* @__PURE__ */ h(
|
|
3546
|
+
) : /* @__PURE__ */ h(se, { children: [
|
|
3523
3547
|
g,
|
|
3524
3548
|
u
|
|
3525
3549
|
] });
|
|
@@ -3529,7 +3553,7 @@ const Or = {
|
|
|
3529
3553
|
] });
|
|
3530
3554
|
};
|
|
3531
3555
|
async function bn(e, t) {
|
|
3532
|
-
const s = t ??
|
|
3556
|
+
const s = t ?? te(e);
|
|
3533
3557
|
try {
|
|
3534
3558
|
const a = await fetch(e, { mode: "cors" });
|
|
3535
3559
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
@@ -3542,21 +3566,21 @@ async function bn(e, t) {
|
|
|
3542
3566
|
}
|
|
3543
3567
|
}
|
|
3544
3568
|
}
|
|
3545
|
-
const
|
|
3569
|
+
const zr = ({
|
|
3546
3570
|
src: e,
|
|
3547
3571
|
filename: t,
|
|
3548
3572
|
fileSize: s,
|
|
3549
3573
|
mimeType: a,
|
|
3550
3574
|
title: r,
|
|
3551
3575
|
items: i
|
|
3552
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
3576
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], $r = ({
|
|
3553
3577
|
variant: e,
|
|
3554
3578
|
item: t,
|
|
3555
3579
|
index: s,
|
|
3556
3580
|
onActivate: a,
|
|
3557
3581
|
trailingAction: r
|
|
3558
3582
|
}) => {
|
|
3559
|
-
const i = t.filename ??
|
|
3583
|
+
const i = t.filename ?? te(t.src);
|
|
3560
3584
|
return /* @__PURE__ */ n(
|
|
3561
3585
|
gn,
|
|
3562
3586
|
{
|
|
@@ -3583,26 +3607,26 @@ const Fr = ({
|
|
|
3583
3607
|
onClick: m,
|
|
3584
3608
|
onDismiss: g
|
|
3585
3609
|
}) => {
|
|
3586
|
-
const u = Ne(e), f = e === "composer" && !!g, c =
|
|
3610
|
+
const u = Ne(e), f = e === "composer" && !!g, c = zr({
|
|
3587
3611
|
src: t,
|
|
3588
3612
|
filename: s,
|
|
3589
3613
|
fileSize: a,
|
|
3590
3614
|
mimeType: r,
|
|
3591
3615
|
title: i,
|
|
3592
3616
|
items: o
|
|
3593
|
-
}),
|
|
3594
|
-
if ((m == null ? void 0 : m(
|
|
3595
|
-
const
|
|
3596
|
-
if (!
|
|
3597
|
-
const
|
|
3598
|
-
bn(
|
|
3617
|
+
}), b = (v) => {
|
|
3618
|
+
if ((m == null ? void 0 : m(v)) === !1) return;
|
|
3619
|
+
const p = c[v];
|
|
3620
|
+
if (!p) return;
|
|
3621
|
+
const x = p.filename ?? te(p.src);
|
|
3622
|
+
bn(p.src, x);
|
|
3599
3623
|
};
|
|
3600
3624
|
if (c.length === 0)
|
|
3601
3625
|
return null;
|
|
3602
|
-
const
|
|
3626
|
+
const _ = /* @__PURE__ */ n(
|
|
3603
3627
|
"span",
|
|
3604
3628
|
{
|
|
3605
|
-
className:
|
|
3629
|
+
className: y(
|
|
3606
3630
|
"flex size-8 items-center justify-center rounded-full",
|
|
3607
3631
|
u === "dark" ? "text-white/70" : "text-black/70"
|
|
3608
3632
|
),
|
|
@@ -3617,29 +3641,29 @@ const Fr = ({
|
|
|
3617
3641
|
text: l,
|
|
3618
3642
|
groupPosition: d,
|
|
3619
3643
|
"data-testid": "file-attachment",
|
|
3620
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((
|
|
3621
|
-
|
|
3644
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, p) => /* @__PURE__ */ n(
|
|
3645
|
+
$r,
|
|
3622
3646
|
{
|
|
3623
3647
|
variant: u,
|
|
3624
|
-
item:
|
|
3625
|
-
index:
|
|
3626
|
-
onActivate:
|
|
3627
|
-
trailingAction: f &&
|
|
3648
|
+
item: v,
|
|
3649
|
+
index: p,
|
|
3650
|
+
onActivate: b,
|
|
3651
|
+
trailingAction: f && p === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : _
|
|
3628
3652
|
},
|
|
3629
|
-
`${
|
|
3653
|
+
`${v.src}-${p}`
|
|
3630
3654
|
)) })
|
|
3631
3655
|
}
|
|
3632
3656
|
);
|
|
3633
|
-
},
|
|
3634
|
-
Composer:
|
|
3635
|
-
Sent:
|
|
3636
|
-
Received:
|
|
3657
|
+
}, Fr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(rt, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(rt, { ...e, state: "received" }), jr = {
|
|
3658
|
+
Composer: Fr,
|
|
3659
|
+
Sent: Br,
|
|
3660
|
+
Received: Ur
|
|
3637
3661
|
}, it = ({
|
|
3638
3662
|
onPrev: e,
|
|
3639
3663
|
onNext: t,
|
|
3640
3664
|
prevLabel: s = "Previous",
|
|
3641
3665
|
nextLabel: a = "Next"
|
|
3642
|
-
}) => /* @__PURE__ */ h(
|
|
3666
|
+
}) => /* @__PURE__ */ h(se, { children: [
|
|
3643
3667
|
/* @__PURE__ */ n(
|
|
3644
3668
|
"button",
|
|
3645
3669
|
{
|
|
@@ -3647,7 +3671,7 @@ const Fr = ({
|
|
|
3647
3671
|
onClick: e,
|
|
3648
3672
|
"aria-label": s,
|
|
3649
3673
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3650
|
-
children: /* @__PURE__ */ n(
|
|
3674
|
+
children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3651
3675
|
}
|
|
3652
3676
|
),
|
|
3653
3677
|
/* @__PURE__ */ n(
|
|
@@ -3657,7 +3681,7 @@ const Fr = ({
|
|
|
3657
3681
|
onClick: t,
|
|
3658
3682
|
"aria-label": a,
|
|
3659
3683
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3660
|
-
children: /* @__PURE__ */ n(
|
|
3684
|
+
children: /* @__PURE__ */ n(Ve, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3661
3685
|
}
|
|
3662
3686
|
)
|
|
3663
3687
|
] }), pn = ({
|
|
@@ -3669,7 +3693,7 @@ const Fr = ({
|
|
|
3669
3693
|
tone: i = "dark",
|
|
3670
3694
|
onTriggered: o
|
|
3671
3695
|
}) => {
|
|
3672
|
-
const [l, d] = z(!1), m =
|
|
3696
|
+
const [l, d] = z(!1), m = K(
|
|
3673
3697
|
(c) => {
|
|
3674
3698
|
c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
|
|
3675
3699
|
}).finally(() => {
|
|
@@ -3677,7 +3701,7 @@ const Fr = ({
|
|
|
3677
3701
|
}));
|
|
3678
3702
|
},
|
|
3679
3703
|
[l, e, t, o]
|
|
3680
|
-
), g = r ?? s !== "pill", f = { className:
|
|
3704
|
+
), g = r ?? s !== "pill", f = { className: y(
|
|
3681
3705
|
s === "pill" ? "size-4" : "size-5",
|
|
3682
3706
|
"shrink-0"
|
|
3683
3707
|
), weight: "bold" };
|
|
@@ -3688,7 +3712,7 @@ const Fr = ({
|
|
|
3688
3712
|
onClick: m,
|
|
3689
3713
|
disabled: l,
|
|
3690
3714
|
"aria-label": a,
|
|
3691
|
-
className:
|
|
3715
|
+
className: y(
|
|
3692
3716
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
3693
3717
|
{
|
|
3694
3718
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
@@ -3728,7 +3752,7 @@ const Fr = ({
|
|
|
3728
3752
|
onClick: m,
|
|
3729
3753
|
disabled: l,
|
|
3730
3754
|
"aria-label": g ? a : void 0,
|
|
3731
|
-
className:
|
|
3755
|
+
className: y(
|
|
3732
3756
|
"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",
|
|
3733
3757
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
3734
3758
|
),
|
|
@@ -3756,9 +3780,9 @@ const Fr = ({
|
|
|
3756
3780
|
}, [s, t, e]), X(() => {
|
|
3757
3781
|
i((d) => Fe(d, 0, Math.max(e - 1, 0)));
|
|
3758
3782
|
}, [e]);
|
|
3759
|
-
const o =
|
|
3783
|
+
const o = K(() => {
|
|
3760
3784
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
3761
|
-
}, [e]), l =
|
|
3785
|
+
}, [e]), l = K(() => {
|
|
3762
3786
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
3763
3787
|
}, [e]);
|
|
3764
3788
|
return X(() => {
|
|
@@ -3779,7 +3803,7 @@ const Fr = ({
|
|
|
3779
3803
|
children: i,
|
|
3780
3804
|
"data-testid": o
|
|
3781
3805
|
}) => {
|
|
3782
|
-
const l =
|
|
3806
|
+
const l = H(null), d = H(null);
|
|
3783
3807
|
return X(() => {
|
|
3784
3808
|
var f;
|
|
3785
3809
|
const u = l.current;
|
|
@@ -3870,8 +3894,8 @@ const Fr = ({
|
|
|
3870
3894
|
length: t.length,
|
|
3871
3895
|
initialIndex: s,
|
|
3872
3896
|
open: e
|
|
3873
|
-
}), l = t[r], d =
|
|
3874
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
3897
|
+
}), l = t[r], d = ne(
|
|
3898
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "image"),
|
|
3875
3899
|
[l]
|
|
3876
3900
|
);
|
|
3877
3901
|
return l ? /* @__PURE__ */ h(
|
|
@@ -3916,7 +3940,7 @@ const Fr = ({
|
|
|
3916
3940
|
]
|
|
3917
3941
|
}
|
|
3918
3942
|
) : null;
|
|
3919
|
-
},
|
|
3943
|
+
}, Vr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", xn = ({
|
|
3920
3944
|
tiles: e,
|
|
3921
3945
|
onTileActivate: t,
|
|
3922
3946
|
maxVisible: s = 4,
|
|
@@ -3925,14 +3949,14 @@ const Fr = ({
|
|
|
3925
3949
|
const r = e.length;
|
|
3926
3950
|
if (r === 0) return null;
|
|
3927
3951
|
const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
|
|
3928
|
-
const u =
|
|
3952
|
+
const u = y(Vr, "h-full w-full");
|
|
3929
3953
|
return t ? /* @__PURE__ */ h(
|
|
3930
3954
|
"button",
|
|
3931
3955
|
{
|
|
3932
3956
|
type: "button",
|
|
3933
3957
|
onClick: () => t(m),
|
|
3934
3958
|
"aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
|
|
3935
|
-
className:
|
|
3959
|
+
className: y(u, "cursor-zoom-in"),
|
|
3936
3960
|
children: [
|
|
3937
3961
|
d.content,
|
|
3938
3962
|
g
|
|
@@ -3944,10 +3968,10 @@ const Fr = ({
|
|
|
3944
3968
|
g
|
|
3945
3969
|
] }, m);
|
|
3946
3970
|
};
|
|
3947
|
-
return i.length === 1 ? /* @__PURE__ */ n("div", { className:
|
|
3971
|
+
return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
|
|
3948
3972
|
"div",
|
|
3949
3973
|
{
|
|
3950
|
-
className:
|
|
3974
|
+
className: y(
|
|
3951
3975
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
3952
3976
|
a
|
|
3953
3977
|
),
|
|
@@ -3956,7 +3980,7 @@ const Fr = ({
|
|
|
3956
3980
|
) : i.length === 3 ? /* @__PURE__ */ h(
|
|
3957
3981
|
"div",
|
|
3958
3982
|
{
|
|
3959
|
-
className:
|
|
3983
|
+
className: y(
|
|
3960
3984
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3961
3985
|
a
|
|
3962
3986
|
),
|
|
@@ -3969,7 +3993,7 @@ const Fr = ({
|
|
|
3969
3993
|
) : /* @__PURE__ */ n(
|
|
3970
3994
|
"div",
|
|
3971
3995
|
{
|
|
3972
|
-
className:
|
|
3996
|
+
className: y(
|
|
3973
3997
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3974
3998
|
a
|
|
3975
3999
|
),
|
|
@@ -3987,14 +4011,14 @@ const Fr = ({
|
|
|
3987
4011
|
}
|
|
3988
4012
|
);
|
|
3989
4013
|
}, ye = (e) => {
|
|
3990
|
-
const [t, s] = z(!1), [a, r] = z(0), i =
|
|
4014
|
+
const [t, s] = z(!1), [a, r] = z(0), i = K(
|
|
3991
4015
|
(l) => {
|
|
3992
4016
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
|
|
3993
4017
|
},
|
|
3994
4018
|
[e]
|
|
3995
|
-
), o =
|
|
4019
|
+
), o = K(() => s(!1), []);
|
|
3996
4020
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3997
|
-
},
|
|
4021
|
+
}, Gr = (e, t, s, a) => ({
|
|
3998
4022
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
3999
4023
|
content: /* @__PURE__ */ n(
|
|
4000
4024
|
"img",
|
|
@@ -4009,7 +4033,7 @@ const Fr = ({
|
|
|
4009
4033
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
4010
4034
|
}
|
|
4011
4035
|
)
|
|
4012
|
-
}),
|
|
4036
|
+
}), Hr = ({
|
|
4013
4037
|
src: e,
|
|
4014
4038
|
alt: t,
|
|
4015
4039
|
items: s
|
|
@@ -4017,7 +4041,7 @@ const Fr = ({
|
|
|
4017
4041
|
src: s.src,
|
|
4018
4042
|
alt: s.alt,
|
|
4019
4043
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4020
|
-
})),
|
|
4044
|
+
})), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4021
4045
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = ye(
|
|
4022
4046
|
r
|
|
4023
4047
|
);
|
|
@@ -4064,13 +4088,13 @@ const Fr = ({
|
|
|
4064
4088
|
loading: l = "lazy",
|
|
4065
4089
|
onClick: d
|
|
4066
4090
|
}) => {
|
|
4067
|
-
const m =
|
|
4091
|
+
const m = Hr({ src: t, alt: s, items: r }), g = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = ye(
|
|
4068
4092
|
d
|
|
4069
4093
|
);
|
|
4070
4094
|
if (m.length === 0)
|
|
4071
4095
|
return null;
|
|
4072
|
-
const
|
|
4073
|
-
(
|
|
4096
|
+
const _ = m.map(
|
|
4097
|
+
(v, p) => Gr(v, p, m.length, l)
|
|
4074
4098
|
);
|
|
4075
4099
|
return /* @__PURE__ */ h(
|
|
4076
4100
|
we,
|
|
@@ -4080,24 +4104,24 @@ const Fr = ({
|
|
|
4080
4104
|
groupPosition: o,
|
|
4081
4105
|
"data-testid": "image-attachment",
|
|
4082
4106
|
children: [
|
|
4083
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles:
|
|
4107
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: _, onTileActivate: c }) }),
|
|
4084
4108
|
/* @__PURE__ */ n(
|
|
4085
4109
|
vn,
|
|
4086
4110
|
{
|
|
4087
4111
|
open: u,
|
|
4088
4112
|
items: wn(m, a),
|
|
4089
4113
|
initialIndex: f,
|
|
4090
|
-
onClose:
|
|
4114
|
+
onClose: b
|
|
4091
4115
|
}
|
|
4092
4116
|
)
|
|
4093
4117
|
]
|
|
4094
4118
|
}
|
|
4095
4119
|
);
|
|
4096
|
-
},
|
|
4097
|
-
Composer:
|
|
4098
|
-
Sent:
|
|
4099
|
-
Received:
|
|
4100
|
-
},
|
|
4120
|
+
}, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Kr = {
|
|
4121
|
+
Composer: qr,
|
|
4122
|
+
Sent: Wr,
|
|
4123
|
+
Received: Xr
|
|
4124
|
+
}, Jr = ({
|
|
4101
4125
|
open: e,
|
|
4102
4126
|
items: t,
|
|
4103
4127
|
initialIndex: s = 0,
|
|
@@ -4107,11 +4131,11 @@ const Fr = ({
|
|
|
4107
4131
|
length: t.length,
|
|
4108
4132
|
initialIndex: s,
|
|
4109
4133
|
open: e
|
|
4110
|
-
}), l = t[r], d =
|
|
4111
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4134
|
+
}), l = t[r], d = ne(
|
|
4135
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "document"),
|
|
4112
4136
|
[l]
|
|
4113
|
-
), m =
|
|
4114
|
-
() => l ?
|
|
4137
|
+
), m = ne(
|
|
4138
|
+
() => l ? Zr(l.src) : void 0,
|
|
4115
4139
|
[l]
|
|
4116
4140
|
);
|
|
4117
4141
|
return !l || !m ? null : /* @__PURE__ */ h(
|
|
@@ -4145,23 +4169,23 @@ const Fr = ({
|
|
|
4145
4169
|
]
|
|
4146
4170
|
}
|
|
4147
4171
|
);
|
|
4148
|
-
},
|
|
4172
|
+
}, Zr = (e) => {
|
|
4149
4173
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
4150
4174
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
4151
|
-
},
|
|
4175
|
+
}, Qr = ({
|
|
4152
4176
|
src: e,
|
|
4153
4177
|
filename: t,
|
|
4154
4178
|
fileSize: s,
|
|
4155
4179
|
title: a,
|
|
4156
4180
|
items: r
|
|
4157
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
4181
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ei = ({
|
|
4158
4182
|
variant: e,
|
|
4159
4183
|
item: t,
|
|
4160
4184
|
index: s,
|
|
4161
4185
|
onActivate: a,
|
|
4162
4186
|
trailingAction: r
|
|
4163
4187
|
}) => {
|
|
4164
|
-
const i = t.filename ??
|
|
4188
|
+
const i = t.filename ?? te(t.src);
|
|
4165
4189
|
return /* @__PURE__ */ n(
|
|
4166
4190
|
gn,
|
|
4167
4191
|
{
|
|
@@ -4187,14 +4211,14 @@ const Fr = ({
|
|
|
4187
4211
|
onClick: d,
|
|
4188
4212
|
onDismiss: m
|
|
4189
4213
|
}) => {
|
|
4190
|
-
const g = Ne(e), u =
|
|
4214
|
+
const g = Ne(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ye(
|
|
4191
4215
|
d
|
|
4192
|
-
),
|
|
4216
|
+
), v = e === "composer" && !!m;
|
|
4193
4217
|
if (u.length === 0)
|
|
4194
4218
|
return null;
|
|
4195
|
-
const
|
|
4196
|
-
src:
|
|
4197
|
-
filename:
|
|
4219
|
+
const p = u.map((x) => ({
|
|
4220
|
+
src: x.src,
|
|
4221
|
+
filename: x.filename ?? te(x.src)
|
|
4198
4222
|
}));
|
|
4199
4223
|
return /* @__PURE__ */ h(
|
|
4200
4224
|
we,
|
|
@@ -4204,45 +4228,45 @@ const Fr = ({
|
|
|
4204
4228
|
groupPosition: l,
|
|
4205
4229
|
"data-testid": "pdf-attachment",
|
|
4206
4230
|
children: [
|
|
4207
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((
|
|
4208
|
-
const
|
|
4231
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, A) => {
|
|
4232
|
+
const M = x.filename ?? te(x.src), N = v && A === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4209
4233
|
pn,
|
|
4210
4234
|
{
|
|
4211
|
-
url:
|
|
4212
|
-
filename:
|
|
4235
|
+
url: x.src,
|
|
4236
|
+
filename: M,
|
|
4213
4237
|
variant: "inline",
|
|
4214
|
-
label: `Download ${
|
|
4238
|
+
label: `Download ${M}`,
|
|
4215
4239
|
tone: g
|
|
4216
4240
|
}
|
|
4217
4241
|
);
|
|
4218
4242
|
return /* @__PURE__ */ n(
|
|
4219
|
-
|
|
4243
|
+
ei,
|
|
4220
4244
|
{
|
|
4221
4245
|
variant: g,
|
|
4222
|
-
item:
|
|
4223
|
-
index:
|
|
4224
|
-
onActivate:
|
|
4225
|
-
trailingAction:
|
|
4246
|
+
item: x,
|
|
4247
|
+
index: A,
|
|
4248
|
+
onActivate: b,
|
|
4249
|
+
trailingAction: N
|
|
4226
4250
|
},
|
|
4227
|
-
`${
|
|
4251
|
+
`${x.src}-${A}`
|
|
4228
4252
|
);
|
|
4229
4253
|
}) }),
|
|
4230
4254
|
/* @__PURE__ */ n(
|
|
4231
|
-
|
|
4255
|
+
Jr,
|
|
4232
4256
|
{
|
|
4233
4257
|
open: f,
|
|
4234
|
-
items:
|
|
4258
|
+
items: p,
|
|
4235
4259
|
initialIndex: c,
|
|
4236
|
-
onClose:
|
|
4260
|
+
onClose: _
|
|
4237
4261
|
}
|
|
4238
4262
|
)
|
|
4239
4263
|
]
|
|
4240
4264
|
}
|
|
4241
4265
|
);
|
|
4242
|
-
},
|
|
4243
|
-
Composer:
|
|
4244
|
-
Sent:
|
|
4245
|
-
Received:
|
|
4266
|
+
}, ti = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), ai = {
|
|
4267
|
+
Composer: ti,
|
|
4268
|
+
Sent: ni,
|
|
4269
|
+
Received: si
|
|
4246
4270
|
}, Nn = ({
|
|
4247
4271
|
open: e,
|
|
4248
4272
|
items: t,
|
|
@@ -4253,8 +4277,8 @@ const Fr = ({
|
|
|
4253
4277
|
length: t.length,
|
|
4254
4278
|
initialIndex: s,
|
|
4255
4279
|
open: e
|
|
4256
|
-
}), l = t[r], d =
|
|
4257
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4280
|
+
}), l = t[r], d = ne(
|
|
4281
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "video"),
|
|
4258
4282
|
[l]
|
|
4259
4283
|
);
|
|
4260
4284
|
return l ? /* @__PURE__ */ h(
|
|
@@ -4293,7 +4317,7 @@ const Fr = ({
|
|
|
4293
4317
|
]
|
|
4294
4318
|
}
|
|
4295
4319
|
) : null;
|
|
4296
|
-
},
|
|
4320
|
+
}, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Ue, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
|
|
4297
4321
|
item: e,
|
|
4298
4322
|
index: t
|
|
4299
4323
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4315,11 +4339,11 @@ const Fr = ({
|
|
|
4315
4339
|
"aria-hidden": !0
|
|
4316
4340
|
}
|
|
4317
4341
|
) }),
|
|
4318
|
-
/* @__PURE__ */ n(
|
|
4319
|
-
] }),
|
|
4342
|
+
/* @__PURE__ */ n(ri, {})
|
|
4343
|
+
] }), ii = (e, t, s) => ({
|
|
4320
4344
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4321
4345
|
content: /* @__PURE__ */ n(yn, { item: e, index: t })
|
|
4322
|
-
}),
|
|
4346
|
+
}), oi = ({
|
|
4323
4347
|
src: e,
|
|
4324
4348
|
poster: t,
|
|
4325
4349
|
mimeType: s,
|
|
@@ -4331,7 +4355,7 @@ const Fr = ({
|
|
|
4331
4355
|
mimeType: s.mimeType,
|
|
4332
4356
|
preload: s.preload,
|
|
4333
4357
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4334
|
-
})),
|
|
4358
|
+
})), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
4335
4359
|
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = ye(
|
|
4336
4360
|
i
|
|
4337
4361
|
);
|
|
@@ -4372,13 +4396,13 @@ const Fr = ({
|
|
|
4372
4396
|
preload: d,
|
|
4373
4397
|
onClick: m
|
|
4374
4398
|
}) => {
|
|
4375
|
-
const g =
|
|
4399
|
+
const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ye(
|
|
4376
4400
|
m
|
|
4377
4401
|
);
|
|
4378
4402
|
if (g.length === 0)
|
|
4379
4403
|
return null;
|
|
4380
|
-
const
|
|
4381
|
-
(
|
|
4404
|
+
const v = g.map(
|
|
4405
|
+
(p, x) => ii(p, x, g.length)
|
|
4382
4406
|
);
|
|
4383
4407
|
return /* @__PURE__ */ h(
|
|
4384
4408
|
we,
|
|
@@ -4391,8 +4415,8 @@ const Fr = ({
|
|
|
4391
4415
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4392
4416
|
xn,
|
|
4393
4417
|
{
|
|
4394
|
-
tiles:
|
|
4395
|
-
onTileActivate:
|
|
4418
|
+
tiles: v,
|
|
4419
|
+
onTileActivate: b,
|
|
4396
4420
|
className: "overflow-hidden rounded-md"
|
|
4397
4421
|
}
|
|
4398
4422
|
) }),
|
|
@@ -4402,23 +4426,23 @@ const Fr = ({
|
|
|
4402
4426
|
open: f,
|
|
4403
4427
|
items: Cn(g, r),
|
|
4404
4428
|
initialIndex: c,
|
|
4405
|
-
onClose:
|
|
4429
|
+
onClose: _
|
|
4406
4430
|
}
|
|
4407
4431
|
)
|
|
4408
4432
|
]
|
|
4409
4433
|
}
|
|
4410
4434
|
);
|
|
4411
|
-
},
|
|
4412
|
-
Composer:
|
|
4413
|
-
Sent:
|
|
4414
|
-
Received:
|
|
4415
|
-
},
|
|
4416
|
-
Image:
|
|
4417
|
-
Video:
|
|
4418
|
-
Audio:
|
|
4419
|
-
Pdf:
|
|
4420
|
-
File:
|
|
4421
|
-
},
|
|
4435
|
+
}, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), mi = {
|
|
4436
|
+
Composer: ci,
|
|
4437
|
+
Sent: di,
|
|
4438
|
+
Received: ui
|
|
4439
|
+
}, Ii = {
|
|
4440
|
+
Image: Kr,
|
|
4441
|
+
Video: mi,
|
|
4442
|
+
Audio: Tr,
|
|
4443
|
+
Pdf: ai,
|
|
4444
|
+
File: jr
|
|
4445
|
+
}, hi = ({
|
|
4422
4446
|
question: e,
|
|
4423
4447
|
onClick: t,
|
|
4424
4448
|
loading: s = !1,
|
|
@@ -4430,7 +4454,7 @@ const Fr = ({
|
|
|
4430
4454
|
onClick: t,
|
|
4431
4455
|
disabled: s,
|
|
4432
4456
|
style: { backgroundColor: "#E6E5E3" },
|
|
4433
|
-
className:
|
|
4457
|
+
className: y(
|
|
4434
4458
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
4435
4459
|
{
|
|
4436
4460
|
"hover:brightness-95 active:brightness-90": !s,
|
|
@@ -4440,7 +4464,7 @@ const Fr = ({
|
|
|
4440
4464
|
),
|
|
4441
4465
|
children: e
|
|
4442
4466
|
}
|
|
4443
|
-
),
|
|
4467
|
+
), Ti = ({
|
|
4444
4468
|
faqs: e,
|
|
4445
4469
|
onFaqClick: t,
|
|
4446
4470
|
loadingFaqId: s,
|
|
@@ -4452,7 +4476,7 @@ const Fr = ({
|
|
|
4452
4476
|
const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
|
|
4453
4477
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
4454
4478
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
4455
|
-
|
|
4479
|
+
oe,
|
|
4456
4480
|
{
|
|
4457
4481
|
id: o || "account",
|
|
4458
4482
|
name: o || "Account",
|
|
@@ -4469,7 +4493,7 @@ const Fr = ({
|
|
|
4469
4493
|
children: [
|
|
4470
4494
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4471
4495
|
l.map((d) => /* @__PURE__ */ n(
|
|
4472
|
-
|
|
4496
|
+
hi,
|
|
4473
4497
|
{
|
|
4474
4498
|
question: d.question,
|
|
4475
4499
|
onClick: () => t(d.id),
|
|
@@ -4484,38 +4508,37 @@ const Fr = ({
|
|
|
4484
4508
|
};
|
|
4485
4509
|
export {
|
|
4486
4510
|
en as A,
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
He as V,
|
|
4511
|
+
Hs as B,
|
|
4512
|
+
Xa as C,
|
|
4513
|
+
Ps as D,
|
|
4514
|
+
Ti as F,
|
|
4515
|
+
Ei as L,
|
|
4516
|
+
yi as M,
|
|
4494
4517
|
ge as a,
|
|
4495
|
-
|
|
4496
|
-
|
|
4518
|
+
oe as b,
|
|
4519
|
+
rr as c,
|
|
4497
4520
|
un as d,
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4521
|
+
Ci as e,
|
|
4522
|
+
hi as f,
|
|
4523
|
+
ae as g,
|
|
4501
4524
|
zt as h,
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4525
|
+
Ii as i,
|
|
4526
|
+
Ca as j,
|
|
4527
|
+
Ni as k,
|
|
4528
|
+
ki as l,
|
|
4529
|
+
Lr as m,
|
|
4530
|
+
Ar as n,
|
|
4531
|
+
sr as o,
|
|
4532
|
+
Rr as p,
|
|
4510
4533
|
Kt as q,
|
|
4511
|
-
|
|
4534
|
+
ce as r,
|
|
4512
4535
|
sn as s,
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4536
|
+
$s as t,
|
|
4537
|
+
Si as u,
|
|
4538
|
+
Ys as v,
|
|
4516
4539
|
Qe as w,
|
|
4517
4540
|
et as x,
|
|
4518
4541
|
Xt as y,
|
|
4519
|
-
|
|
4542
|
+
va as z
|
|
4520
4543
|
};
|
|
4521
|
-
//# sourceMappingURL=index-
|
|
4544
|
+
//# sourceMappingURL=index-BOsrtjME.js.map
|