@linktr.ee/messaging-react 3.4.1-rc-1782392885 → 3.4.2-rc-1782395074
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-CrTBu2I6.js → Card-BKalDyyu.js} +2 -2
- package/dist/{Card-CrTBu2I6.js.map → Card-BKalDyyu.js.map} +1 -1
- package/dist/{Card-XVTz8IYz.js → Card-CphU_jG-.js} +2 -2
- package/dist/{Card-XVTz8IYz.js.map → Card-CphU_jG-.js.map} +1 -1
- package/dist/{Card-CdaZxDEx.cjs → Card-DFy_ZvFH.cjs} +2 -2
- package/dist/{Card-CdaZxDEx.cjs.map → Card-DFy_ZvFH.cjs.map} +1 -1
- package/dist/{Card-DXWp0uwi.cjs → Card-DxroYNrS.cjs} +2 -2
- package/dist/{Card-DXWp0uwi.cjs.map → Card-DxroYNrS.cjs.map} +1 -1
- package/dist/{Card-DaalkoQW.cjs → Card-V-bNUxcw.cjs} +2 -2
- package/dist/{Card-DaalkoQW.cjs.map → Card-V-bNUxcw.cjs.map} +1 -1
- package/dist/{Card-BKd0E-B9.js → Card-mpVcQ8-W.js} +3 -3
- package/dist/{Card-BKd0E-B9.js.map → Card-mpVcQ8-W.js.map} +1 -1
- package/dist/{LockedThumbnail-D3Xwdb5_.cjs → LockedThumbnail-B3W7upHs.cjs} +2 -2
- package/dist/{LockedThumbnail-D3Xwdb5_.cjs.map → LockedThumbnail-B3W7upHs.cjs.map} +1 -1
- package/dist/{LockedThumbnail-D_44b-Uy.js → LockedThumbnail-BD7qtcso.js} +2 -2
- package/dist/{LockedThumbnail-D_44b-Uy.js.map → LockedThumbnail-BD7qtcso.js.map} +1 -1
- package/dist/{index-DPGZRLRM.js → index-CjwQ2Hj3.js} +1093 -1085
- package/dist/index-CjwQ2Hj3.js.map +1 -0
- package/dist/index-tI-4cxV1.cjs +2 -0
- package/dist/index-tI-4cxV1.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +14 -13
- package/package.json +2 -2
- package/src/components/ChannelView.tsx +5 -0
- package/src/components/CustomMessageInput/CustomMessageInput.test.tsx +34 -0
- package/src/components/CustomMessageInput/index.tsx +23 -1
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/index.ts +1 -0
- package/src/types.ts +18 -0
- package/dist/index-Cds2w5zi.cjs +0 -2
- package/dist/index-Cds2w5zi.cjs.map +0 -1
- package/dist/index-DPGZRLRM.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
-
import j, { createContext as
|
|
2
|
+
import j, { createContext as qe, useContext as we, useCallback as J, useState as F, useRef as G, useEffect as K, useId as Sn, useMemo as se, Suspense as We } from "react";
|
|
3
3
|
import { StreamChatService as In } from "@linktr.ee/messaging-core";
|
|
4
|
-
import { StreamChat as Tn, LinkPreviewsManager as
|
|
5
|
-
import { Chat as An, DateSeparator as Mn, useChannelStateContext as
|
|
6
|
-
import { StarIcon as
|
|
7
|
-
import
|
|
8
|
-
import { MessageActions as Os, DefaultDropdownActionButton as
|
|
9
|
-
const
|
|
4
|
+
import { StreamChat as Tn, LinkPreviewsManager as Rt } from "stream-chat";
|
|
5
|
+
import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as Xe, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as Gt, 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 Lt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as _e, 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 Oe, AIStates as Pe, 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 Ue, DotsThreeIcon as hs, SpinnerGapIcon as Se, SignOutIcon as fs, ProhibitInsetIcon as Dt, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as qt, 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 ve, PlayIcon as je, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as xe, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Re, ArrowUpIcon as Ms, SparkleIcon as Ve, ProhibitIcon as Rs, ArrowLeftIcon as Ot, CaretRightIcon as Ge, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
|
|
7
|
+
import y from "classnames";
|
|
8
|
+
import { MessageActions as Os, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
|
|
9
|
+
const Xt = qe({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const qt = Ye({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), Ke = () => we(Xt), Ni = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -24,204 +24,204 @@ const qt = Ye({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
var
|
|
28
|
-
const
|
|
29
|
-
(
|
|
30
|
-
i && console.log(`🔥 [MessagingProvider] ${
|
|
27
|
+
var O, N;
|
|
28
|
+
const l = J(
|
|
29
|
+
(k, ...S) => {
|
|
30
|
+
i && console.log(`🔥 [MessagingProvider] ${k}`, ...S);
|
|
31
31
|
},
|
|
32
32
|
[i]
|
|
33
33
|
);
|
|
34
|
-
|
|
34
|
+
l("🔄 RENDER START", {
|
|
35
35
|
userId: t == null ? void 0 : t.id,
|
|
36
36
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
37
37
|
serviceConfig: !!s,
|
|
38
38
|
capabilities: Object.keys(r)
|
|
39
39
|
});
|
|
40
|
-
const [
|
|
40
|
+
const [o, d] = F(null), [m, g] = F(null), [u, f] = F(!1), [c, b] = F(!1), [_, v] = F(null), p = G(!1), w = G(null), A = G(s);
|
|
41
41
|
A.current = s;
|
|
42
42
|
const M = G(i);
|
|
43
43
|
M.current = i;
|
|
44
|
-
const
|
|
44
|
+
const C = G({
|
|
45
45
|
userId: t == null ? void 0 : t.id,
|
|
46
46
|
apiKey: a,
|
|
47
47
|
serviceConfig: s,
|
|
48
48
|
capabilities: r
|
|
49
49
|
}), R = G(0);
|
|
50
|
-
R.current++,
|
|
50
|
+
R.current++, l("📊 RENDER INFO", {
|
|
51
51
|
renderCount: R.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: C.current.userId !== (t == null ? void 0 : t.id),
|
|
55
|
+
apiKeyChanged: C.current.apiKey !== a,
|
|
56
|
+
serviceConfigChanged: C.current.serviceConfig !== s,
|
|
57
|
+
capabilitiesChanged: C.current.capabilities !== r
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
59
|
+
}), C.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
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
if (!a || !
|
|
71
|
-
|
|
72
|
-
renderCount:
|
|
65
|
+
const P = G(null);
|
|
66
|
+
a && ((O = P.current) == null ? void 0 : O.apiKey) !== a && (P.current = { apiKey: a, client: new Tn(a) });
|
|
67
|
+
const D = a ? ((N = P.current) == null ? void 0 : N.client) ?? null : null;
|
|
68
|
+
K(() => {
|
|
69
|
+
const k = R.current, S = A.current;
|
|
70
|
+
if (!a || !D || !S) {
|
|
71
|
+
l("⚠️ SERVICE INIT SKIPPED", {
|
|
72
|
+
renderCount: k,
|
|
73
73
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
74
74
|
});
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
renderCount:
|
|
77
|
+
l("🚀 CREATING SERVICE", {
|
|
78
|
+
renderCount: k,
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
80
80
|
});
|
|
81
|
-
const
|
|
82
|
-
...
|
|
81
|
+
const $ = new In({
|
|
82
|
+
...S,
|
|
83
83
|
apiKey: a,
|
|
84
84
|
debug: M.current,
|
|
85
|
-
client:
|
|
85
|
+
client: D
|
|
86
86
|
});
|
|
87
|
-
|
|
88
|
-
renderCount:
|
|
89
|
-
serviceInstance:
|
|
87
|
+
w.current = $, d($), l("✅ SERVICE SET", {
|
|
88
|
+
renderCount: k,
|
|
89
|
+
serviceInstance: !!$
|
|
90
90
|
});
|
|
91
|
-
}, [a,
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
var
|
|
95
|
-
if (
|
|
96
|
-
hasService: !!
|
|
91
|
+
}, [a, D]);
|
|
92
|
+
const E = G(null);
|
|
93
|
+
K(() => {
|
|
94
|
+
var S, $;
|
|
95
|
+
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
96
|
+
hasService: !!o,
|
|
97
97
|
hasUser: !!t,
|
|
98
98
|
userId: t == null ? void 0 : t.id,
|
|
99
99
|
isConnecting: p.current,
|
|
100
100
|
isConnected: u,
|
|
101
|
-
dependencies: { service: !!
|
|
102
|
-
}), !
|
|
103
|
-
|
|
101
|
+
dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
|
|
102
|
+
}), !o || !t) {
|
|
103
|
+
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
if (p.current) {
|
|
107
|
-
|
|
107
|
+
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
if (((
|
|
111
|
-
|
|
110
|
+
if (((S = E.current) == null ? void 0 : S.serviceId) === o && (($ = E.current) == null ? void 0 : $.userId) === t.id) {
|
|
111
|
+
l(
|
|
112
112
|
"⚠️ USER CONNECTION SKIPPED",
|
|
113
113
|
"Already connected this user with this service"
|
|
114
114
|
);
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
(async () => {
|
|
118
|
-
|
|
118
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
|
|
119
119
|
try {
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
g(
|
|
120
|
+
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
121
|
+
const z = await o.connectUser(t);
|
|
122
|
+
g(z), f(!0), E.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
|
|
123
123
|
userId: t.id,
|
|
124
|
-
clientId:
|
|
124
|
+
clientId: z.userID
|
|
125
125
|
});
|
|
126
|
-
} catch (
|
|
127
|
-
const
|
|
128
|
-
v(
|
|
126
|
+
} catch (z) {
|
|
127
|
+
const H = z instanceof Error ? z.message : "Connection failed";
|
|
128
|
+
v(H), l("❌ USER CONNECTION ERROR", {
|
|
129
129
|
userId: t.id,
|
|
130
|
-
error:
|
|
130
|
+
error: H
|
|
131
131
|
});
|
|
132
132
|
} finally {
|
|
133
|
-
b(!1), p.current = !1,
|
|
133
|
+
b(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
134
134
|
userId: t.id,
|
|
135
135
|
isConnected: u
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
})();
|
|
139
|
-
}, [
|
|
140
|
-
const
|
|
139
|
+
}, [o, t, l, u]), K(() => {
|
|
140
|
+
const k = D;
|
|
141
141
|
return () => {
|
|
142
|
-
var
|
|
143
|
-
|
|
142
|
+
var S;
|
|
143
|
+
k && (E.current = null, (S = w.current) == null || S.disconnectUser().catch(console.error));
|
|
144
144
|
};
|
|
145
|
-
}, [
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
hasService: !!
|
|
145
|
+
}, [D]);
|
|
146
|
+
const L = J(async () => {
|
|
147
|
+
if (l("🔄 REFRESH CONNECTION CALLED", {
|
|
148
|
+
hasService: !!o,
|
|
149
149
|
hasUser: !!t
|
|
150
|
-
}), !
|
|
151
|
-
|
|
150
|
+
}), !o || !t) {
|
|
151
|
+
l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
|
|
155
155
|
try {
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
g(
|
|
159
|
-
} catch (
|
|
160
|
-
const
|
|
161
|
-
v(
|
|
156
|
+
l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
|
|
157
|
+
const k = await o.connectUser(t);
|
|
158
|
+
g(k), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
159
|
+
} catch (k) {
|
|
160
|
+
const S = k instanceof Error ? k.message : "Refresh failed";
|
|
161
|
+
v(S), l("❌ CONNECTION REFRESH ERROR", {
|
|
162
162
|
userId: t.id,
|
|
163
|
-
error:
|
|
163
|
+
error: S
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
|
-
b(!1),
|
|
166
|
+
b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
167
167
|
}
|
|
168
|
-
}, [
|
|
169
|
-
hasService: !!
|
|
168
|
+
}, [o, t, l]), I = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
169
|
+
hasService: !!o,
|
|
170
170
|
hasClient: !!m,
|
|
171
171
|
isConnected: u,
|
|
172
172
|
isLoading: c,
|
|
173
173
|
hasError: !!_,
|
|
174
174
|
capabilitiesKeys: Object.keys(r)
|
|
175
175
|
}), {
|
|
176
|
-
service:
|
|
176
|
+
service: o,
|
|
177
177
|
client: m,
|
|
178
178
|
isConnected: u,
|
|
179
179
|
isLoading: c,
|
|
180
180
|
error: _,
|
|
181
181
|
capabilities: r,
|
|
182
|
-
refreshConnection:
|
|
182
|
+
refreshConnection: L,
|
|
183
183
|
debug: i
|
|
184
184
|
}), [
|
|
185
|
-
|
|
185
|
+
o,
|
|
186
186
|
m,
|
|
187
187
|
u,
|
|
188
188
|
c,
|
|
189
189
|
_,
|
|
190
190
|
r,
|
|
191
|
-
|
|
191
|
+
L,
|
|
192
192
|
i,
|
|
193
|
-
|
|
193
|
+
l
|
|
194
194
|
]);
|
|
195
|
-
return
|
|
195
|
+
return l("🔄 RENDER END", {
|
|
196
196
|
renderCount: R.current,
|
|
197
|
-
willRenderChat: !!
|
|
198
|
-
contextValueReady: !!
|
|
199
|
-
}), /* @__PURE__ */ n(
|
|
197
|
+
willRenderChat: !!D,
|
|
198
|
+
contextValueReady: !!I
|
|
199
|
+
}), /* @__PURE__ */ n(Xt.Provider, { value: I, children: D ? /* @__PURE__ */ n(
|
|
200
200
|
An,
|
|
201
201
|
{
|
|
202
|
-
client:
|
|
202
|
+
client: D,
|
|
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
|
-
}, Ps = () =>
|
|
209
|
+
}, Ps = () => Ke(), Kt = (e) => {
|
|
210
210
|
var a, r;
|
|
211
|
-
const [t, s] =
|
|
211
|
+
const [t, s] = F(
|
|
212
212
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
213
213
|
);
|
|
214
|
-
return
|
|
215
|
-
var
|
|
214
|
+
return K(() => {
|
|
215
|
+
var l;
|
|
216
216
|
if (!e) {
|
|
217
217
|
s(!1);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
s(!!((
|
|
221
|
-
const i = (
|
|
220
|
+
s(!!((l = e.state.membership) != null && l.pinned_at));
|
|
221
|
+
const i = (o) => {
|
|
222
222
|
var d;
|
|
223
223
|
s(
|
|
224
|
-
|
|
224
|
+
o != null && o.member ? !!o.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
|
|
225
225
|
);
|
|
226
226
|
};
|
|
227
227
|
return e.on("member.updated", i), () => {
|
|
@@ -232,14 +232,14 @@ const qt = Ye({
|
|
|
232
232
|
function $s(e) {
|
|
233
233
|
return zs.test(e.trim());
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Pt(e, t) {
|
|
236
236
|
const s = e == null ? void 0 : e.trim();
|
|
237
237
|
return !s || t && s === t ? !1 : !$s(s);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
return
|
|
239
|
+
function Jt(e) {
|
|
240
|
+
return Pt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Pt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const zt = [
|
|
243
243
|
"🍎",
|
|
244
244
|
// Apple
|
|
245
245
|
"🍌",
|
|
@@ -276,19 +276,19 @@ function Fs(e) {
|
|
|
276
276
|
return Math.abs(t);
|
|
277
277
|
}
|
|
278
278
|
function Bs(e) {
|
|
279
|
-
const s = Fs(e) %
|
|
280
|
-
return
|
|
279
|
+
const s = Fs(e) % zt.length;
|
|
280
|
+
return zt[s];
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const oe = ({
|
|
283
283
|
id: e,
|
|
284
284
|
image: t,
|
|
285
285
|
size: s = 40,
|
|
286
286
|
className: a,
|
|
287
287
|
starred: r = !1,
|
|
288
288
|
shape: i = "squircle",
|
|
289
|
-
dmAgentEnabled:
|
|
289
|
+
dmAgentEnabled: l = !1
|
|
290
290
|
}) => {
|
|
291
|
-
const
|
|
291
|
+
const o = Bs(e), 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,17 +299,17 @@ const ie = ({
|
|
|
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
|
),
|
|
306
|
-
children:
|
|
306
|
+
children: o
|
|
307
307
|
}
|
|
308
308
|
) });
|
|
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
|
),
|
|
@@ -324,20 +324,20 @@ const ie = ({
|
|
|
324
324
|
{
|
|
325
325
|
"aria-hidden": "true",
|
|
326
326
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
327
|
-
children: /* @__PURE__ */ n(
|
|
327
|
+
children: /* @__PURE__ */ n(Ue, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
328
328
|
}
|
|
329
329
|
),
|
|
330
330
|
/* @__PURE__ */ n(
|
|
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
|
),
|
|
338
338
|
style: {
|
|
339
339
|
...u,
|
|
340
|
-
...
|
|
340
|
+
...l && {
|
|
341
341
|
borderWidth: `${g}px`,
|
|
342
342
|
borderStyle: "solid",
|
|
343
343
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
@@ -357,77 +357,77 @@ const ie = ({
|
|
|
357
357
|
enabled: a = !0,
|
|
358
358
|
onLeaveConversation: r,
|
|
359
359
|
onBlockParticipant: i,
|
|
360
|
-
onDeleteConversationClick:
|
|
361
|
-
onBlockParticipantClick:
|
|
360
|
+
onDeleteConversationClick: l,
|
|
361
|
+
onBlockParticipantClick: o,
|
|
362
362
|
onReportParticipantClick: d,
|
|
363
363
|
onActionComplete: m,
|
|
364
364
|
logLabel: g = "useChannelModerationActions"
|
|
365
365
|
}) => {
|
|
366
|
-
var
|
|
367
|
-
const { service: u, debug: f } =
|
|
368
|
-
return
|
|
366
|
+
var O;
|
|
367
|
+
const { service: u, debug: f } = Ke(), c = (O = t == null ? void 0 : t.user) == null ? void 0 : O.id, b = !!(a && s && u && c), [_, v] = F(!1), [p, w] = F(null), [A, M] = F(!1), [C, R] = F(!1), P = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
|
|
368
|
+
return K(() => {
|
|
369
369
|
if (!b || !u || !c) {
|
|
370
|
-
v(!1),
|
|
370
|
+
v(!1), w(null);
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
373
|
-
let
|
|
373
|
+
let N = !1;
|
|
374
374
|
return (async () => {
|
|
375
375
|
try {
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
376
|
+
const k = await u.getBlockedUsers();
|
|
377
|
+
if (N) return;
|
|
378
378
|
v(
|
|
379
|
-
|
|
380
|
-
(
|
|
379
|
+
k.some(
|
|
380
|
+
(S) => S.blocked_user_id === c
|
|
381
381
|
)
|
|
382
382
|
);
|
|
383
|
-
} catch (
|
|
384
|
-
|
|
383
|
+
} catch (k) {
|
|
384
|
+
N || console.error(`[${g}] Failed to check blocked status:`, k);
|
|
385
385
|
} finally {
|
|
386
|
-
|
|
386
|
+
N || w({ participantId: c, service: u });
|
|
387
387
|
}
|
|
388
388
|
})(), () => {
|
|
389
|
-
|
|
389
|
+
N = !0;
|
|
390
390
|
};
|
|
391
391
|
}, [b, u, c, g]), {
|
|
392
392
|
isParticipantBlocked: _,
|
|
393
|
-
isCheckingBlockedStatus:
|
|
393
|
+
isCheckingBlockedStatus: P,
|
|
394
394
|
isLeaving: A,
|
|
395
|
-
isUpdatingBlockStatus:
|
|
395
|
+
isUpdatingBlockStatus: C,
|
|
396
396
|
handleLeaveConversation: async () => {
|
|
397
|
-
var
|
|
397
|
+
var N;
|
|
398
398
|
if (!A) {
|
|
399
|
-
|
|
399
|
+
l == null || l(), 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 k = ((N = e._client) == null ? void 0 : N.userID) ?? null;
|
|
402
|
+
await e.hide(k, !1), r && await r(e), m == null || m();
|
|
403
|
+
} catch (k) {
|
|
404
|
+
console.error(`[${g}] Failed to leave conversation`, k);
|
|
405
405
|
} finally {
|
|
406
406
|
M(!1);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
handleBlockUser: async () => {
|
|
411
|
-
var
|
|
412
|
-
if (!(
|
|
413
|
-
|
|
411
|
+
var N, k, S;
|
|
412
|
+
if (!(C || !u)) {
|
|
413
|
+
o == null || o(), f && console.log(`[${g}] Block member`, (N = t == null ? void 0 : t.user) == null ? void 0 : N.id), R(!0);
|
|
414
414
|
try {
|
|
415
|
-
await u.blockUser((
|
|
416
|
-
} catch (
|
|
417
|
-
console.error(`[${g}] Failed to block member`,
|
|
415
|
+
await u.blockUser((k = t == null ? void 0 : t.user) == null ? void 0 : k.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
|
|
416
|
+
} catch ($) {
|
|
417
|
+
console.error(`[${g}] Failed to block member`, $);
|
|
418
418
|
} finally {
|
|
419
419
|
R(!1);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
handleUnblockUser: async () => {
|
|
424
|
-
var
|
|
425
|
-
if (!(
|
|
426
|
-
|
|
424
|
+
var N, k, S;
|
|
425
|
+
if (!(C || !u)) {
|
|
426
|
+
o == null || o(), f && console.log(`[${g}] Unblock member`, (N = t == null ? void 0 : t.user) == null ? void 0 : N.id), R(!0);
|
|
427
427
|
try {
|
|
428
|
-
await u.unBlockUser((
|
|
429
|
-
} catch (
|
|
430
|
-
console.error(`[${g}] Failed to unblock member`,
|
|
428
|
+
await u.unBlockUser((k = t == null ? void 0 : t.user) == null ? void 0 : k.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
|
|
429
|
+
} catch ($) {
|
|
430
|
+
console.error(`[${g}] Failed to unblock member`, $);
|
|
431
431
|
} finally {
|
|
432
432
|
R(!1);
|
|
433
433
|
}
|
|
@@ -437,7 +437,7 @@ const ie = ({
|
|
|
437
437
|
d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
|
|
438
438
|
}
|
|
439
439
|
};
|
|
440
|
-
},
|
|
440
|
+
}, be = ({
|
|
441
441
|
variant: e = "default",
|
|
442
442
|
className: t,
|
|
443
443
|
children: s,
|
|
@@ -446,7 +446,7 @@ const ie = ({
|
|
|
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,51 +454,51 @@ const ie = ({
|
|
|
454
454
|
...a,
|
|
455
455
|
children: s
|
|
456
456
|
}
|
|
457
|
-
),
|
|
457
|
+
), $t = ({
|
|
458
458
|
channel: e,
|
|
459
459
|
participant: t,
|
|
460
460
|
showDeleteConversation: s = !0,
|
|
461
461
|
showBlockParticipant: a = !0,
|
|
462
462
|
showReportParticipant: r = !0,
|
|
463
463
|
onLeaveConversation: i,
|
|
464
|
-
onBlockParticipant:
|
|
465
|
-
onDeleteConversationClick:
|
|
464
|
+
onBlockParticipant: l,
|
|
465
|
+
onDeleteConversationClick: o,
|
|
466
466
|
onBlockParticipantClick: d,
|
|
467
467
|
onReportParticipantClick: m,
|
|
468
468
|
customChannelActions: g,
|
|
469
469
|
triggerClassName: u
|
|
470
470
|
}) => {
|
|
471
|
-
const [f, c] =
|
|
471
|
+
const [f, c] = F(!1), b = G(null), _ = Sn(), v = J(() => c(!1), []), {
|
|
472
472
|
isParticipantBlocked: p,
|
|
473
|
-
isCheckingBlockedStatus:
|
|
473
|
+
isCheckingBlockedStatus: w,
|
|
474
474
|
isLeaving: A,
|
|
475
475
|
isUpdatingBlockStatus: M,
|
|
476
|
-
handleLeaveConversation:
|
|
476
|
+
handleLeaveConversation: C,
|
|
477
477
|
handleBlockUser: R,
|
|
478
|
-
handleUnblockUser:
|
|
479
|
-
handleReportUser:
|
|
478
|
+
handleUnblockUser: P,
|
|
479
|
+
handleReportUser: D
|
|
480
480
|
} = js({
|
|
481
481
|
channel: e,
|
|
482
482
|
participant: t,
|
|
483
483
|
showBlockParticipant: a,
|
|
484
484
|
enabled: f,
|
|
485
485
|
onLeaveConversation: i,
|
|
486
|
-
onBlockParticipant:
|
|
487
|
-
onDeleteConversationClick:
|
|
486
|
+
onBlockParticipant: l,
|
|
487
|
+
onDeleteConversationClick: o,
|
|
488
488
|
onBlockParticipantClick: d,
|
|
489
489
|
onReportParticipantClick: m,
|
|
490
490
|
onActionComplete: v,
|
|
491
491
|
logLabel: "ChannelActionsMenu"
|
|
492
492
|
});
|
|
493
|
-
return
|
|
493
|
+
return K(() => {
|
|
494
494
|
if (!f) return;
|
|
495
|
-
const
|
|
496
|
-
b.current && !b.current.contains(
|
|
497
|
-
},
|
|
498
|
-
|
|
495
|
+
const L = (O) => {
|
|
496
|
+
b.current && !b.current.contains(O.target) && c(!1);
|
|
497
|
+
}, I = (O) => {
|
|
498
|
+
O.key === "Escape" && c(!1);
|
|
499
499
|
};
|
|
500
|
-
return document.addEventListener("mousedown",
|
|
501
|
-
document.removeEventListener("mousedown",
|
|
500
|
+
return document.addEventListener("mousedown", L), document.addEventListener("keydown", I), () => {
|
|
501
|
+
document.removeEventListener("mousedown", L), document.removeEventListener("keydown", I);
|
|
502
502
|
};
|
|
503
503
|
}, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
|
|
504
504
|
/* @__PURE__ */ h(
|
|
@@ -509,7 +509,7 @@ const ie = ({
|
|
|
509
509
|
"aria-haspopup": "true",
|
|
510
510
|
"aria-expanded": f,
|
|
511
511
|
"aria-controls": f ? _ : void 0,
|
|
512
|
-
onClick: () => c((
|
|
512
|
+
onClick: () => c((L) => !L),
|
|
513
513
|
children: [
|
|
514
514
|
/* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
|
|
515
515
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
@@ -521,55 +521,55 @@ const ie = ({
|
|
|
521
521
|
{
|
|
522
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
|
),
|
|
528
528
|
children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
|
|
529
529
|
s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
|
|
530
|
-
|
|
530
|
+
be,
|
|
531
531
|
{
|
|
532
|
-
onClick:
|
|
532
|
+
onClick: C,
|
|
533
533
|
disabled: A,
|
|
534
534
|
"aria-busy": A,
|
|
535
535
|
children: [
|
|
536
|
-
A ? /* @__PURE__ */ n(
|
|
536
|
+
A ? /* @__PURE__ */ n(Se, { 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: w ? (
|
|
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
|
-
/* @__PURE__ */ h(
|
|
545
|
-
/* @__PURE__ */ n(
|
|
544
|
+
/* @__PURE__ */ h(be, { disabled: !0, "aria-busy": !0, children: [
|
|
545
|
+
/* @__PURE__ */ n(Se, { className: "h-5 w-5 animate-spin" }),
|
|
546
546
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
547
547
|
] })
|
|
548
548
|
) : p ? /* @__PURE__ */ h(
|
|
549
|
-
|
|
549
|
+
be,
|
|
550
550
|
{
|
|
551
|
-
onClick:
|
|
551
|
+
onClick: P,
|
|
552
552
|
disabled: M,
|
|
553
553
|
"aria-busy": M,
|
|
554
554
|
children: [
|
|
555
|
-
M ? /* @__PURE__ */ n(
|
|
555
|
+
M ? /* @__PURE__ */ n(Se, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
|
|
556
556
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
559
|
) : /* @__PURE__ */ h(
|
|
560
|
-
|
|
560
|
+
be,
|
|
561
561
|
{
|
|
562
562
|
onClick: R,
|
|
563
563
|
disabled: M,
|
|
564
564
|
"aria-busy": M,
|
|
565
565
|
children: [
|
|
566
|
-
M ? /* @__PURE__ */ n(
|
|
566
|
+
M ? /* @__PURE__ */ n(Se, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { 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(
|
|
572
|
-
/* @__PURE__ */ n(
|
|
571
|
+
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(be, { variant: "danger", onClick: D, children: [
|
|
572
|
+
/* @__PURE__ */ n(Ht, { className: "h-5 w-5" }),
|
|
573
573
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
574
574
|
] }) }),
|
|
575
575
|
g
|
|
@@ -577,30 +577,30 @@ const ie = ({
|
|
|
577
577
|
}
|
|
578
578
|
)
|
|
579
579
|
] });
|
|
580
|
-
}, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }),
|
|
580
|
+
}, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), He = "vote_up", Ye = "vote_down";
|
|
581
581
|
function Gs(e) {
|
|
582
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
582
|
+
return e != null && e.length ? e.some((t) => t.type === Ye) ? "down" : e.some((t) => t.type === He) ? "up" : null : null;
|
|
583
583
|
}
|
|
584
584
|
function Hs(e) {
|
|
585
|
-
const { channel: t } =
|
|
585
|
+
const { channel: t } = de(), { client: s } = Xe("useMessageVote"), a = se(
|
|
586
586
|
() => Gs(e.own_reactions),
|
|
587
587
|
[e.own_reactions]
|
|
588
|
-
), r =
|
|
588
|
+
), r = J(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, He) : await t.sendReaction(
|
|
592
592
|
e.id,
|
|
593
|
-
{ type:
|
|
593
|
+
{ type: He },
|
|
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 = J(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, Ye) : await t.sendReaction(
|
|
602
602
|
e.id,
|
|
603
|
-
{ type:
|
|
603
|
+
{ type: Ye },
|
|
604
604
|
{ enforce_unique: !0, skip_push: !0 }
|
|
605
605
|
);
|
|
606
606
|
} catch {
|
|
@@ -611,7 +611,7 @@ function Hs(e) {
|
|
|
611
611
|
function Ys(e) {
|
|
612
612
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function Zt({
|
|
615
615
|
message: e,
|
|
616
616
|
viewerLanguage: t
|
|
617
617
|
}) {
|
|
@@ -619,13 +619,13 @@ function Kt({
|
|
|
619
619
|
const s = e == null ? void 0 : e.text, a = Ys(t);
|
|
620
620
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
621
621
|
}
|
|
622
|
-
const qs = j.lazy(() => import("./Card-
|
|
622
|
+
const qs = j.lazy(() => import("./Card-CphU_jG-.js")), Ws = j.lazy(() => import("./Card-BKalDyyu.js")), Xs = j.lazy(() => import("./Card-mpVcQ8-W.js")), Je = () => /* @__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
|
-
), Ks = (e) => /* @__PURE__ */ n(
|
|
628
|
+
), Ks = (e) => /* @__PURE__ */ n(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Qt = (e) => /* @__PURE__ */ n(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), en = (e) => /* @__PURE__ */ n(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Qt, Zs = en, Ft = { Composer: Ks, Sent: Qt, Received: en, Creator: Js, Visitor: Zs }, Qs = [
|
|
629
629
|
[/pdf/, "pdf"],
|
|
630
630
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
631
631
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -638,17 +638,17 @@ const qs = j.lazy(() => import("./Card-XVTz8IYz.js")), Ws = j.lazy(() => import(
|
|
|
638
638
|
function re(e) {
|
|
639
639
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function tn(e) {
|
|
642
642
|
const t = Qs.find(
|
|
643
643
|
([s]) => s.test(e)
|
|
644
644
|
);
|
|
645
645
|
return t ? t[1] : "generic";
|
|
646
646
|
}
|
|
647
647
|
const ea = {
|
|
648
|
-
video:
|
|
648
|
+
video: qt,
|
|
649
649
|
audio: bs,
|
|
650
650
|
image: gs,
|
|
651
|
-
document:
|
|
651
|
+
document: Yt
|
|
652
652
|
}, ta = {
|
|
653
653
|
pdf: Cs,
|
|
654
654
|
doc: ys,
|
|
@@ -658,13 +658,13 @@ const ea = {
|
|
|
658
658
|
zip: xs,
|
|
659
659
|
text: vs,
|
|
660
660
|
markdown: ps,
|
|
661
|
-
generic:
|
|
661
|
+
generic: Yt
|
|
662
662
|
};
|
|
663
663
|
function na(e) {
|
|
664
664
|
const t = re(e);
|
|
665
|
-
return t !== "document" ? ea[t] : ta[
|
|
665
|
+
return t !== "document" ? ea[t] : ta[tn(e)];
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function ce(e, t) {
|
|
668
668
|
return j.createElement(na(e), t);
|
|
669
669
|
}
|
|
670
670
|
const sa = (e) => {
|
|
@@ -677,83 +677,83 @@ const sa = (e) => {
|
|
|
677
677
|
autoPlay: a = !1,
|
|
678
678
|
playing: r,
|
|
679
679
|
loop: i = !1,
|
|
680
|
-
controls:
|
|
681
|
-
showProgress:
|
|
680
|
+
controls: l = !0,
|
|
681
|
+
showProgress: o = !1,
|
|
682
682
|
muted: d = !1,
|
|
683
683
|
onContainerClick: m
|
|
684
684
|
}) => {
|
|
685
|
-
const g = re(t), u = G(null), f = G(null), c = G(null), b = G(r), [_, v] =
|
|
686
|
-
|
|
687
|
-
}, []),
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
690
|
-
const
|
|
685
|
+
const g = re(t), u = G(null), f = G(null), c = G(null), b = G(r), [_, v] = F(a), [p, w] = F(0), [A, M] = F(!1), [C, R] = F(!1), [P, D] = F(!1), [E, L] = F(!1), [I, O] = F(!0), [N, k] = F(null), S = J(() => {
|
|
686
|
+
D(!1), v(!0);
|
|
687
|
+
}, []), $ = J((x) => {
|
|
688
|
+
const T = f.current;
|
|
689
|
+
if (!T) return 0;
|
|
690
|
+
const U = T.getBoundingClientRect();
|
|
691
691
|
return Math.max(
|
|
692
692
|
0,
|
|
693
|
-
Math.min(1, (sa(
|
|
693
|
+
Math.min(1, (sa(x) - U.left) / U.width)
|
|
694
694
|
);
|
|
695
|
-
}, []),
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
}, []),
|
|
699
|
-
|
|
700
|
-
const
|
|
701
|
-
|
|
695
|
+
}, []), z = J((x) => {
|
|
696
|
+
const T = u.current;
|
|
697
|
+
T && T.duration && (T.currentTime = x * T.duration);
|
|
698
|
+
}, []), H = (x) => {
|
|
699
|
+
x.stopPropagation(), M(!0);
|
|
700
|
+
const T = $(x);
|
|
701
|
+
w(T), z(T);
|
|
702
702
|
};
|
|
703
|
-
|
|
703
|
+
K(() => {
|
|
704
704
|
r !== void 0 && r !== b.current && (b.current = r, v(r));
|
|
705
|
-
}, [r]),
|
|
705
|
+
}, [r]), K(() => {
|
|
706
706
|
if (!_) {
|
|
707
707
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
|
-
const
|
|
711
|
-
const
|
|
712
|
-
|
|
710
|
+
const x = () => {
|
|
711
|
+
const T = u.current;
|
|
712
|
+
T && T.duration && !A && w(T.currentTime / T.duration), c.current = requestAnimationFrame(x);
|
|
713
713
|
};
|
|
714
|
-
return c.current = requestAnimationFrame(
|
|
714
|
+
return c.current = requestAnimationFrame(x), () => {
|
|
715
715
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
716
716
|
};
|
|
717
|
-
}, [_, A]),
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
v(!1),
|
|
721
|
-
}) :
|
|
722
|
-
}, [_]),
|
|
717
|
+
}, [_, A]), K(() => {
|
|
718
|
+
const x = u.current;
|
|
719
|
+
x && (_ ? x.play().catch((T) => {
|
|
720
|
+
v(!1), D(!0);
|
|
721
|
+
}) : x.pause());
|
|
722
|
+
}, [_]), K(() => {
|
|
723
723
|
if (!A) return;
|
|
724
|
-
const
|
|
725
|
-
M(!1),
|
|
724
|
+
const x = (U) => w($(U)), T = (U) => {
|
|
725
|
+
M(!1), z($(U));
|
|
726
726
|
};
|
|
727
|
-
return window.addEventListener("mousemove",
|
|
728
|
-
window.removeEventListener("mousemove",
|
|
727
|
+
return window.addEventListener("mousemove", x), window.addEventListener("mouseup", T), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", T), () => {
|
|
728
|
+
window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", T), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", T);
|
|
729
729
|
};
|
|
730
|
-
}, [A,
|
|
731
|
-
const
|
|
730
|
+
}, [A, $, z]);
|
|
731
|
+
const ee = N ? { aspectRatio: String(N) } : void 0, Q = N ? "" : " aspect-video", Y = 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: ee,
|
|
739
|
+
onClick: (x) => {
|
|
740
740
|
if (m) {
|
|
741
|
-
m(
|
|
741
|
+
m(x);
|
|
742
742
|
return;
|
|
743
743
|
}
|
|
744
|
-
|
|
744
|
+
P || l && v((T) => !T);
|
|
745
745
|
},
|
|
746
|
-
onKeyDown: (
|
|
747
|
-
if (!(
|
|
748
|
-
if (
|
|
749
|
-
m(
|
|
746
|
+
onKeyDown: (x) => {
|
|
747
|
+
if (!(x.key !== "Enter" && x.key !== " ")) {
|
|
748
|
+
if (x.preventDefault(), m) {
|
|
749
|
+
m(x);
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
|
|
752
|
+
P || l && v((T) => !T);
|
|
753
753
|
}
|
|
754
754
|
},
|
|
755
755
|
children: [
|
|
756
|
-
s && (g === "audio" ||
|
|
756
|
+
s && (g === "audio" || I) && /* @__PURE__ */ n(
|
|
757
757
|
"img",
|
|
758
758
|
{
|
|
759
759
|
src: s,
|
|
@@ -761,7 +761,7 @@ const sa = (e) => {
|
|
|
761
761
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
762
762
|
}
|
|
763
763
|
),
|
|
764
|
-
!s && (g === "audio" ||
|
|
764
|
+
!s && (g === "audio" || I) && /* @__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 sa = (e) => {
|
|
|
773
773
|
loop: i,
|
|
774
774
|
muted: d,
|
|
775
775
|
style: { width: "100%", height: "100%" },
|
|
776
|
-
onLoadStart: () =>
|
|
776
|
+
onLoadStart: () => L(!0),
|
|
777
777
|
onCanPlay: () => {
|
|
778
|
-
|
|
778
|
+
L(!1), O(!1);
|
|
779
779
|
},
|
|
780
|
-
onWaiting: () =>
|
|
781
|
-
onPlay: () =>
|
|
780
|
+
onWaiting: () => L(!0),
|
|
781
|
+
onPlay: () => D(!1),
|
|
782
782
|
onEnded: () => {
|
|
783
|
-
i || (v(!1),
|
|
783
|
+
i || (v(!1), w(0));
|
|
784
784
|
},
|
|
785
785
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
786
786
|
}
|
|
@@ -793,82 +793,82 @@ const sa = (e) => {
|
|
|
793
793
|
muted: d,
|
|
794
794
|
playsInline: !0,
|
|
795
795
|
style: { width: "100%", height: "100%" },
|
|
796
|
-
onLoadStart: () =>
|
|
796
|
+
onLoadStart: () => L(!0),
|
|
797
797
|
onCanPlay: () => {
|
|
798
|
-
|
|
798
|
+
L(!1), O(!1);
|
|
799
799
|
},
|
|
800
|
-
onWaiting: () =>
|
|
801
|
-
onPlay: () =>
|
|
800
|
+
onWaiting: () => L(!0),
|
|
801
|
+
onPlay: () => D(!1),
|
|
802
802
|
onLoadedMetadata: () => {
|
|
803
|
-
const
|
|
804
|
-
|
|
803
|
+
const x = u.current;
|
|
804
|
+
x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && k(x.videoWidth / x.videoHeight);
|
|
805
805
|
},
|
|
806
806
|
onEnded: () => {
|
|
807
|
-
i || (v(!1),
|
|
807
|
+
i || (v(!1), w(0));
|
|
808
808
|
},
|
|
809
809
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
810
810
|
}
|
|
811
811
|
) }),
|
|
812
|
-
|
|
813
|
-
|
|
812
|
+
E && !P && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
813
|
+
ve,
|
|
814
814
|
{
|
|
815
815
|
className: "size-8 animate-spin text-white/80",
|
|
816
816
|
weight: "bold"
|
|
817
817
|
}
|
|
818
818
|
) }),
|
|
819
|
-
|
|
819
|
+
P && !l && /* @__PURE__ */ n(
|
|
820
820
|
"div",
|
|
821
821
|
{
|
|
822
822
|
className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
|
|
823
823
|
role: "button",
|
|
824
824
|
tabIndex: 0,
|
|
825
825
|
"aria-label": "Play preview",
|
|
826
|
-
onClick: (
|
|
827
|
-
|
|
826
|
+
onClick: (x) => {
|
|
827
|
+
x.stopPropagation(), S();
|
|
828
828
|
},
|
|
829
|
-
onKeyDown: (
|
|
830
|
-
|
|
829
|
+
onKeyDown: (x) => {
|
|
830
|
+
x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), S());
|
|
831
831
|
},
|
|
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(
|
|
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(je, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
|
-
|
|
835
|
+
o && !l && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
|
|
836
836
|
"div",
|
|
837
837
|
{
|
|
838
838
|
role: "slider",
|
|
839
839
|
"aria-label": "Playback position",
|
|
840
|
-
"aria-valuenow":
|
|
840
|
+
"aria-valuenow": Y,
|
|
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: H,
|
|
847
|
+
onTouchStart: H,
|
|
848
|
+
onClick: (x) => x.stopPropagation(),
|
|
849
|
+
onKeyDown: (x) => {
|
|
850
|
+
x.key === "ArrowRight" && z(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && z(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: `${Y}%` }
|
|
857
857
|
}
|
|
858
858
|
) })
|
|
859
859
|
}
|
|
860
860
|
) }),
|
|
861
|
-
|
|
861
|
+
l && /* @__PURE__ */ h("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
|
|
862
862
|
/* @__PURE__ */ n(
|
|
863
863
|
"button",
|
|
864
864
|
{
|
|
865
865
|
type: "button",
|
|
866
|
-
onClick: (
|
|
867
|
-
|
|
866
|
+
onClick: (x) => {
|
|
867
|
+
x.stopPropagation(), v((T) => !T);
|
|
868
868
|
},
|
|
869
869
|
className: "shrink-0 text-white",
|
|
870
870
|
"aria-label": _ ? "Pause" : "Play",
|
|
871
|
-
children: _ ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(
|
|
871
|
+
children: _ ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(je, { className: "size-5 translate-x-px", weight: "fill" })
|
|
872
872
|
}
|
|
873
873
|
),
|
|
874
874
|
/* @__PURE__ */ h(
|
|
@@ -876,30 +876,30 @@ const sa = (e) => {
|
|
|
876
876
|
{
|
|
877
877
|
role: "slider",
|
|
878
878
|
"aria-label": "Playback position",
|
|
879
|
-
"aria-valuenow":
|
|
879
|
+
"aria-valuenow": Y,
|
|
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: (
|
|
885
|
+
onMouseDown: H,
|
|
886
|
+
onTouchStart: H,
|
|
887
|
+
onClick: (x) => x.stopPropagation(),
|
|
888
888
|
onMouseEnter: () => R(!0),
|
|
889
889
|
onMouseLeave: () => R(!1),
|
|
890
|
-
onKeyDown: (
|
|
891
|
-
|
|
890
|
+
onKeyDown: (x) => {
|
|
891
|
+
x.key === "ArrowRight" && z(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && z(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 ${C || 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: `${Y}%` }
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
905
|
}
|
|
@@ -907,8 +907,8 @@ const sa = (e) => {
|
|
|
907
907
|
/* @__PURE__ */ n(
|
|
908
908
|
"div",
|
|
909
909
|
{
|
|
910
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
911
|
-
style: { left: `${
|
|
910
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${C || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
911
|
+
style: { left: `${Y}%` }
|
|
912
912
|
}
|
|
913
913
|
)
|
|
914
914
|
]
|
|
@@ -918,17 +918,17 @@ const sa = (e) => {
|
|
|
918
918
|
]
|
|
919
919
|
}
|
|
920
920
|
);
|
|
921
|
-
},
|
|
921
|
+
}, Bt = (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", nn = ({
|
|
922
922
|
mimeType: e,
|
|
923
923
|
sourceUrl: t,
|
|
924
924
|
thumbnailUrl: s,
|
|
925
925
|
title: a,
|
|
926
926
|
variant: r,
|
|
927
927
|
mediaPlayerProps: i,
|
|
928
|
-
containedImage:
|
|
928
|
+
containedImage: l = !1
|
|
929
929
|
}) => {
|
|
930
|
-
const
|
|
931
|
-
return t && (
|
|
930
|
+
const o = re(e), [d, m] = F(!1);
|
|
931
|
+
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
|
|
932
932
|
aa,
|
|
933
933
|
{
|
|
934
934
|
source: t,
|
|
@@ -937,7 +937,7 @@ const sa = (e) => {
|
|
|
937
937
|
controls: !0,
|
|
938
938
|
...i
|
|
939
939
|
}
|
|
940
|
-
) : t &&
|
|
940
|
+
) : t && o === "image" ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
|
|
941
941
|
"img",
|
|
942
942
|
{
|
|
943
943
|
src: t,
|
|
@@ -954,7 +954,7 @@ const sa = (e) => {
|
|
|
954
954
|
className: "block w-full",
|
|
955
955
|
draggable: !1
|
|
956
956
|
}
|
|
957
|
-
) : t &&
|
|
957
|
+
) : t && o === "document" ? s ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
|
|
958
958
|
"img",
|
|
959
959
|
{
|
|
960
960
|
src: s,
|
|
@@ -975,8 +975,8 @@ const sa = (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:
|
|
979
|
-
className:
|
|
978
|
+
children: ce(e, {
|
|
979
|
+
className: Bt(r),
|
|
980
980
|
weight: "regular"
|
|
981
981
|
})
|
|
982
982
|
}
|
|
@@ -992,21 +992,21 @@ const sa = (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:
|
|
996
|
-
className:
|
|
995
|
+
children: ce(e, {
|
|
996
|
+
className: Bt(r),
|
|
997
997
|
weight: "regular"
|
|
998
998
|
})
|
|
999
999
|
}
|
|
1000
1000
|
);
|
|
1001
|
-
},
|
|
1001
|
+
}, sn = ({
|
|
1002
1002
|
variant: e,
|
|
1003
1003
|
thumbnail: t,
|
|
1004
1004
|
title: s,
|
|
1005
1005
|
placeholderTitle: a = "Attachment title",
|
|
1006
1006
|
mimeType: r,
|
|
1007
1007
|
detail: i,
|
|
1008
|
-
statusBadge:
|
|
1009
|
-
action:
|
|
1008
|
+
statusBadge: l,
|
|
1009
|
+
action: o,
|
|
1010
1010
|
topLeft: d,
|
|
1011
1011
|
topRight: m,
|
|
1012
1012
|
rootRef: g,
|
|
@@ -1018,7 +1018,7 @@ const sa = (e) => {
|
|
|
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,7 +1030,7 @@ const sa = (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
1035
|
"text-white/30": f && b,
|
|
1036
1036
|
"text-white": f && !b
|
|
@@ -1039,8 +1039,8 @@ const sa = (e) => {
|
|
|
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,25 +1049,25 @@ const sa = (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
|
),
|
|
1056
1056
|
children: i
|
|
1057
1057
|
}
|
|
1058
1058
|
),
|
|
1059
|
-
|
|
1059
|
+
l
|
|
1060
1060
|
] }),
|
|
1061
|
-
|
|
1061
|
+
o
|
|
1062
1062
|
] })
|
|
1063
1063
|
]
|
|
1064
1064
|
}
|
|
1065
1065
|
);
|
|
1066
1066
|
};
|
|
1067
|
-
function
|
|
1067
|
+
function an(e) {
|
|
1068
1068
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function Ze(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
1073
|
function ia(e) {
|
|
@@ -1085,8 +1085,8 @@ function ca(e) {
|
|
|
1085
1085
|
function da(e) {
|
|
1086
1086
|
return e ? "text-white/20" : "text-black/20";
|
|
1087
1087
|
}
|
|
1088
|
-
const
|
|
1089
|
-
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link:
|
|
1088
|
+
const Qe = ({ attachment: e, isMyMessage: t }) => {
|
|
1089
|
+
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ h(j.Fragment, { children: [
|
|
1090
1090
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1091
1091
|
"img",
|
|
1092
1092
|
{
|
|
@@ -1109,12 +1109,12 @@ const Ze = ({ attachment: e, isMyMessage: t }) => {
|
|
|
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 });
|
|
1111
1111
|
};
|
|
1112
|
-
function
|
|
1112
|
+
function rn(e) {
|
|
1113
1113
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function et(e) {
|
|
1116
1116
|
var t;
|
|
1117
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1117
|
+
return (t = e.attachments) == null ? void 0 : t.find(rn);
|
|
1118
1118
|
}
|
|
1119
1119
|
async function ua(e, t) {
|
|
1120
1120
|
let s;
|
|
@@ -1125,37 +1125,37 @@ async function ua(e, t) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
const a = await fetch(e, { mode: "cors" });
|
|
1127
1127
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
1128
|
-
const r = await a.blob(), i = URL.createObjectURL(r),
|
|
1129
|
-
|
|
1128
|
+
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1129
|
+
l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1130
1130
|
}
|
|
1131
1131
|
const ma = ({
|
|
1132
1132
|
url: e,
|
|
1133
1133
|
filename: t
|
|
1134
1134
|
}) => {
|
|
1135
|
-
const [s, a] =
|
|
1135
|
+
const [s, a] = F(!1);
|
|
1136
1136
|
return /* @__PURE__ */ n(
|
|
1137
1137
|
"button",
|
|
1138
1138
|
{
|
|
1139
1139
|
type: "button",
|
|
1140
1140
|
onClick: (i) => {
|
|
1141
1141
|
i.stopPropagation();
|
|
1142
|
-
const
|
|
1142
|
+
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1143
1143
|
a(!0), ua(e, t).then(() => {
|
|
1144
|
-
|
|
1144
|
+
l == null || l.close();
|
|
1145
1145
|
}).catch(() => {
|
|
1146
|
-
|
|
1146
|
+
l && (l.location.href = e);
|
|
1147
1147
|
}).finally(() => a(!1));
|
|
1148
1148
|
},
|
|
1149
1149
|
disabled: s,
|
|
1150
1150
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1151
|
-
children: s ? /* @__PURE__ */ n(
|
|
1152
|
-
/* @__PURE__ */ n(
|
|
1151
|
+
children: s ? /* @__PURE__ */ n(ve, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
|
|
1152
|
+
/* @__PURE__ */ n(xe, { className: "size-4 text-white", weight: "bold" }),
|
|
1153
1153
|
"Download"
|
|
1154
1154
|
] })
|
|
1155
1155
|
}
|
|
1156
1156
|
);
|
|
1157
1157
|
};
|
|
1158
|
-
function
|
|
1158
|
+
function tt(e) {
|
|
1159
1159
|
var u, f, c, b;
|
|
1160
1160
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1161
1161
|
(_) => _.type === "video" && _.asset_url
|
|
@@ -1165,27 +1165,27 @@ function et(e) {
|
|
|
1165
1165
|
(_) => _.type === "audio" && _.asset_url
|
|
1166
1166
|
), r = (b = e.attachments) == null ? void 0 : b.find(
|
|
1167
1167
|
(_) => _.type === "file" && _.asset_url
|
|
1168
|
-
), i = t ?? s ?? a ?? r,
|
|
1169
|
-
if (!
|
|
1170
|
-
const
|
|
1168
|
+
), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1169
|
+
if (!l) return null;
|
|
1170
|
+
const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
|
|
1171
1171
|
return {
|
|
1172
|
-
resolvedUrl:
|
|
1173
|
-
resolvedType:
|
|
1172
|
+
resolvedUrl: l,
|
|
1173
|
+
resolvedType: o,
|
|
1174
1174
|
title: d,
|
|
1175
1175
|
fileSize: m,
|
|
1176
1176
|
thumbnailUrl: g
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
|
-
const
|
|
1179
|
+
const on = ({
|
|
1180
1180
|
resolvedUrl: e,
|
|
1181
1181
|
resolvedType: t,
|
|
1182
1182
|
title: s,
|
|
1183
1183
|
fileSize: a,
|
|
1184
1184
|
thumbnailUrl: r
|
|
1185
1185
|
}) => {
|
|
1186
|
-
const i = a !== void 0 ?
|
|
1186
|
+
const i = a !== void 0 ? an(a) : void 0;
|
|
1187
1187
|
return /* @__PURE__ */ n(
|
|
1188
|
-
|
|
1188
|
+
sn,
|
|
1189
1189
|
{
|
|
1190
1190
|
variant: "dark",
|
|
1191
1191
|
title: s,
|
|
@@ -1193,7 +1193,7 @@ const an = ({
|
|
|
1193
1193
|
mimeType: t,
|
|
1194
1194
|
detail: i,
|
|
1195
1195
|
thumbnail: /* @__PURE__ */ n(
|
|
1196
|
-
|
|
1196
|
+
nn,
|
|
1197
1197
|
{
|
|
1198
1198
|
mimeType: t,
|
|
1199
1199
|
sourceUrl: e,
|
|
@@ -1204,23 +1204,23 @@ const an = ({
|
|
|
1204
1204
|
)
|
|
1205
1205
|
}
|
|
1206
1206
|
);
|
|
1207
|
-
},
|
|
1207
|
+
}, ln = ({
|
|
1208
1208
|
resolvedUrl: e,
|
|
1209
1209
|
resolvedType: t,
|
|
1210
1210
|
title: s,
|
|
1211
1211
|
fileSize: a,
|
|
1212
1212
|
thumbnailUrl: r
|
|
1213
1213
|
}) => {
|
|
1214
|
-
const i = re(t),
|
|
1214
|
+
const i = re(t), l = a !== void 0 ? an(a) : void 0;
|
|
1215
1215
|
return /* @__PURE__ */ n(
|
|
1216
|
-
|
|
1216
|
+
sn,
|
|
1217
1217
|
{
|
|
1218
1218
|
variant: "light",
|
|
1219
1219
|
title: s,
|
|
1220
1220
|
mimeType: t,
|
|
1221
|
-
detail:
|
|
1221
|
+
detail: l,
|
|
1222
1222
|
thumbnail: /* @__PURE__ */ n(
|
|
1223
|
-
|
|
1223
|
+
nn,
|
|
1224
1224
|
{
|
|
1225
1225
|
mimeType: t,
|
|
1226
1226
|
sourceUrl: e,
|
|
@@ -1237,10 +1237,10 @@ const an = ({
|
|
|
1237
1237
|
message: e,
|
|
1238
1238
|
isMyMessage: t = !1
|
|
1239
1239
|
}) => {
|
|
1240
|
-
const s =
|
|
1240
|
+
const s = et(e), a = tt(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,
|
|
@@ -1258,7 +1258,7 @@ const an = ({
|
|
|
1258
1258
|
{
|
|
1259
1259
|
className: "str-chat__message-bubble",
|
|
1260
1260
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1261
|
-
children: s ? /* @__PURE__ */ n("div", { className:
|
|
1261
|
+
children: s ? /* @__PURE__ */ n("div", { className: Ze(t), children: /* @__PURE__ */ n(Qe, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(on, { ...a }) : /* @__PURE__ */ n(ln, { ...a })
|
|
1262
1262
|
}
|
|
1263
1263
|
) })
|
|
1264
1264
|
}
|
|
@@ -1267,19 +1267,19 @@ const an = ({
|
|
|
1267
1267
|
}, fa = ({
|
|
1268
1268
|
message: e
|
|
1269
1269
|
}) => {
|
|
1270
|
-
const t =
|
|
1270
|
+
const t = et(e);
|
|
1271
1271
|
if (t)
|
|
1272
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1273
|
-
const s =
|
|
1274
|
-
return s ? /* @__PURE__ */ n(
|
|
1272
|
+
return /* @__PURE__ */ n("div", { className: Ze(!0), children: /* @__PURE__ */ n(Qe, { attachment: t, isMyMessage: !0 }) });
|
|
1273
|
+
const s = tt(e);
|
|
1274
|
+
return s ? /* @__PURE__ */ n(on, { ...s }) : null;
|
|
1275
1275
|
}, ga = ({
|
|
1276
1276
|
message: e
|
|
1277
1277
|
}) => {
|
|
1278
|
-
const t =
|
|
1278
|
+
const t = et(e);
|
|
1279
1279
|
if (t)
|
|
1280
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1281
|
-
const s =
|
|
1282
|
-
return s ? /* @__PURE__ */ n(
|
|
1280
|
+
return /* @__PURE__ */ n("div", { className: Ze(!1), children: /* @__PURE__ */ n(Qe, { attachment: t, isMyMessage: !1 }) });
|
|
1281
|
+
const s = tt(e);
|
|
1282
|
+
return s ? /* @__PURE__ */ n(ln, { ...s }) : null;
|
|
1283
1283
|
}, yi = Object.assign(ha, {
|
|
1284
1284
|
Creator: fa,
|
|
1285
1285
|
Visitor: ga
|
|
@@ -1287,9 +1287,9 @@ const an = ({
|
|
|
1287
1287
|
isUnlocking: () => !1
|
|
1288
1288
|
}, pa = {
|
|
1289
1289
|
LockedAttachment: ba
|
|
1290
|
-
},
|
|
1290
|
+
}, cn = qe({}), Ci = cn.Provider;
|
|
1291
1291
|
function va(e) {
|
|
1292
|
-
return
|
|
1292
|
+
return we(cn)[e] ?? pa[e];
|
|
1293
1293
|
}
|
|
1294
1294
|
const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1295
1295
|
"svg",
|
|
@@ -1314,23 +1314,23 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1314
1314
|
}, _a = (e) => {
|
|
1315
1315
|
var t;
|
|
1316
1316
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
1317
|
-
},
|
|
1317
|
+
}, Ie = (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
|
-
},
|
|
1323
|
+
}, dn = (e) => wa(e) || _a(e), ya = (e) => {
|
|
1324
1324
|
var t;
|
|
1325
|
-
return
|
|
1326
|
-
},
|
|
1325
|
+
return dn(e) && !((t = e.text) != null && t.trim());
|
|
1326
|
+
}, ze = ({
|
|
1327
1327
|
message: e,
|
|
1328
1328
|
standalone: t = !1,
|
|
1329
1329
|
isMyMessage: s = !1,
|
|
1330
1330
|
hasAttachment: a = !1
|
|
1331
1331
|
}) => {
|
|
1332
1332
|
var u;
|
|
1333
|
-
const r =
|
|
1333
|
+
const r = dn(e), i = Ie(e);
|
|
1334
1334
|
if (!r && !i)
|
|
1335
1335
|
return null;
|
|
1336
1336
|
if (r) {
|
|
@@ -1342,12 +1342,12 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1342
1342
|
/* @__PURE__ */ n("span", { children: b })
|
|
1343
1343
|
] });
|
|
1344
1344
|
}
|
|
1345
|
-
const
|
|
1345
|
+
const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
|
|
1346
1346
|
"message-chatbot-indicator",
|
|
1347
1347
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1348
|
-
|
|
1349
|
-
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children:
|
|
1350
|
-
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !
|
|
1348
|
+
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1349
|
+
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: l ? 12 : 15 }) });
|
|
1350
|
+
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ h(ae, { children: [
|
|
1351
1351
|
m,
|
|
1352
1352
|
g
|
|
1353
1353
|
] }) : /* @__PURE__ */ h(ae, { children: [
|
|
@@ -1363,7 +1363,7 @@ const xa = ({ 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 xa = ({ 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,
|
|
@@ -1388,15 +1388,15 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1388
1388
|
}
|
|
1389
1389
|
)
|
|
1390
1390
|
] }), ka = (e) => {
|
|
1391
|
-
var
|
|
1391
|
+
var bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St, It, Tt;
|
|
1392
1392
|
const {
|
|
1393
1393
|
additionalMessageInputProps: t,
|
|
1394
1394
|
chatbotVotingEnabled: s,
|
|
1395
1395
|
editing: a,
|
|
1396
1396
|
endOfGroup: r,
|
|
1397
1397
|
firstOfGroup: i,
|
|
1398
|
-
groupedByUser:
|
|
1399
|
-
handleAction:
|
|
1398
|
+
groupedByUser: l,
|
|
1399
|
+
handleAction: o,
|
|
1400
1400
|
handleOpenThread: d,
|
|
1401
1401
|
handleRetry: m,
|
|
1402
1402
|
highlighted: g,
|
|
@@ -1406,82 +1406,82 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1406
1406
|
renderText: b,
|
|
1407
1407
|
threadList: _,
|
|
1408
1408
|
viewerLanguage: v
|
|
1409
|
-
} = e, { client: p } =
|
|
1410
|
-
Attachment:
|
|
1411
|
-
EditMessageModal:
|
|
1412
|
-
MessageActions:
|
|
1413
|
-
MessageBlocked:
|
|
1414
|
-
MessageBouncePrompt:
|
|
1415
|
-
MessageDeleted:
|
|
1416
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
1417
|
-
MessageRepliesCountButton:
|
|
1418
|
-
ReminderNotification:
|
|
1419
|
-
StreamedMessageText:
|
|
1420
|
-
PinIndicator:
|
|
1421
|
-
} =
|
|
1409
|
+
} = e, { client: p } = Xe("CustomMessage"), { channel: w } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: M, onFetchSource: C, onDownloadClick: R } = va("LockedAttachment"), [P, D] = F(!1), E = Ln(c.id), { selected: L, voteUp: I, voteDown: O } = Hs(c), {
|
|
1410
|
+
Attachment: N = Dn,
|
|
1411
|
+
EditMessageModal: k = On,
|
|
1412
|
+
MessageActions: S,
|
|
1413
|
+
MessageBlocked: $ = Pn,
|
|
1414
|
+
MessageBouncePrompt: z = zn,
|
|
1415
|
+
MessageDeleted: H = $n,
|
|
1416
|
+
MessageIsThreadReplyInChannelButtonIndicator: ee = Fn,
|
|
1417
|
+
MessageRepliesCountButton: Q = Bn,
|
|
1418
|
+
ReminderNotification: Y = Un,
|
|
1419
|
+
StreamedMessageText: x = jn,
|
|
1420
|
+
PinIndicator: T
|
|
1421
|
+
} = Gt("CustomMessage"), U = Vn(c), V = Gn(c), q = se(
|
|
1422
1422
|
() => u == null ? void 0 : u(c),
|
|
1423
1423
|
[u, c]
|
|
1424
|
-
),
|
|
1425
|
-
const
|
|
1426
|
-
if (!
|
|
1427
|
-
const
|
|
1428
|
-
return
|
|
1424
|
+
), B = se(() => {
|
|
1425
|
+
const ge = c.attachments ?? [], Ee = c.shared_location ? [c.shared_location, ...ge] : ge;
|
|
1426
|
+
if (!Ie(c)) return Ee;
|
|
1427
|
+
const At = Ee.filter((Mt) => !("type" in Mt) || !rn(Mt));
|
|
1428
|
+
return At.length === Ee.length ? Ee : At;
|
|
1429
1429
|
}, [c]), W = se(() => {
|
|
1430
|
-
const
|
|
1431
|
-
return
|
|
1430
|
+
const ge = Zt({ message: c, viewerLanguage: v });
|
|
1431
|
+
return ge === c.text ? c : { ...c, text: ge };
|
|
1432
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(H, { message: c });
|
|
1437
1437
|
if (Yn(c))
|
|
1438
|
-
return /* @__PURE__ */ n(
|
|
1439
|
-
const
|
|
1440
|
-
let
|
|
1441
|
-
me ?
|
|
1442
|
-
const
|
|
1438
|
+
return /* @__PURE__ */ n($, {});
|
|
1439
|
+
const X = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, he = qn(c);
|
|
1440
|
+
let Z;
|
|
1441
|
+
me ? Z = () => m(c) : he && (Z = () => D(!0));
|
|
1442
|
+
const te = f(), ie = y(
|
|
1443
1443
|
"str-chat__message str-chat__message-simple",
|
|
1444
1444
|
`str-chat__message--${c.type}`,
|
|
1445
1445
|
`str-chat__message--${c.status}`,
|
|
1446
|
-
|
|
1446
|
+
te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
1447
1447
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
1448
1448
|
{
|
|
1449
|
-
"str-chat__message--has-attachment":
|
|
1449
|
+
"str-chat__message--has-attachment": U,
|
|
1450
1450
|
"str-chat__message--highlighted": g,
|
|
1451
1451
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
1452
|
-
"str-chat__message--with-reactions":
|
|
1453
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
1454
|
-
"str-chat__message-with-thread-link":
|
|
1452
|
+
"str-chat__message--with-reactions": V,
|
|
1453
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((pt = c == null ? void 0 : c.error) == null ? void 0 : pt.status) !== 403,
|
|
1454
|
+
"str-chat__message-with-thread-link": X || ue,
|
|
1455
1455
|
"str-chat__virtual-message__wrapper--end": r,
|
|
1456
1456
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1457
|
-
"str-chat__virtual-message__wrapper--group":
|
|
1457
|
+
"str-chat__virtual-message__wrapper--group": l
|
|
1458
1458
|
}
|
|
1459
|
-
),
|
|
1459
|
+
), mt = c.poll_id && p.polls.fromState(c.poll_id), ht = ya(c), fe = Ie(c), ft = Na(c), De = !!(B != null && B.length && !c.quoted_message), gt = fe && te && De;
|
|
1460
1460
|
return /* @__PURE__ */ h(ae, { children: [
|
|
1461
1461
|
a && /* @__PURE__ */ n(
|
|
1462
|
-
|
|
1462
|
+
k,
|
|
1463
1463
|
{
|
|
1464
1464
|
additionalMessageInputProps: t
|
|
1465
1465
|
}
|
|
1466
1466
|
),
|
|
1467
|
-
|
|
1467
|
+
P && /* @__PURE__ */ n(
|
|
1468
1468
|
Wn,
|
|
1469
1469
|
{
|
|
1470
|
-
MessageBouncePrompt:
|
|
1471
|
-
onClose: () =>
|
|
1472
|
-
open:
|
|
1470
|
+
MessageBouncePrompt: z,
|
|
1471
|
+
onClose: () => D(!1),
|
|
1472
|
+
open: P
|
|
1473
1473
|
}
|
|
1474
1474
|
),
|
|
1475
1475
|
/* @__PURE__ */ h(
|
|
1476
1476
|
"div",
|
|
1477
1477
|
{
|
|
1478
|
-
className:
|
|
1478
|
+
className: ie,
|
|
1479
1479
|
"data-message-id": c.id,
|
|
1480
1480
|
children: [
|
|
1481
|
-
|
|
1482
|
-
!!
|
|
1481
|
+
T && /* @__PURE__ */ n(T, {}),
|
|
1482
|
+
!!E && /* @__PURE__ */ n(Y, { 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,
|
|
@@ -1489,95 +1489,95 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1489
1489
|
name: c.user.name || c.user.id,
|
|
1490
1490
|
size: 24,
|
|
1491
1491
|
shape: "circle",
|
|
1492
|
-
dmAgentEnabled:
|
|
1492
|
+
dmAgentEnabled: fe
|
|
1493
1493
|
}
|
|
1494
1494
|
),
|
|
1495
1495
|
/* @__PURE__ */ n(
|
|
1496
1496
|
"div",
|
|
1497
1497
|
{
|
|
1498
|
-
className:
|
|
1499
|
-
"str-chat__simple-message--error-failed": me ||
|
|
1498
|
+
className: y("str-chat__message-inner", {
|
|
1499
|
+
"str-chat__simple-message--error-failed": me || he
|
|
1500
1500
|
}),
|
|
1501
1501
|
"data-testid": "message-inner",
|
|
1502
|
-
onClick:
|
|
1503
|
-
onKeyDown:
|
|
1504
|
-
role:
|
|
1505
|
-
tabIndex:
|
|
1502
|
+
onClick: Z,
|
|
1503
|
+
onKeyDown: Z,
|
|
1504
|
+
role: Z ? "button" : void 0,
|
|
1505
|
+
tabIndex: Z ? 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
|
|
1509
1509
|
marginInlineEnd: 0,
|
|
1510
1510
|
marginInlineStart: 0
|
|
1511
1511
|
},
|
|
1512
|
-
children:
|
|
1513
|
-
|
|
1514
|
-
|
|
1512
|
+
children: ft ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1513
|
+
te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1514
|
+
S && /* @__PURE__ */ n(S, {}),
|
|
1515
1515
|
/* @__PURE__ */ n(
|
|
1516
|
-
|
|
1516
|
+
Ft.Sent,
|
|
1517
1517
|
{
|
|
1518
|
-
title: (
|
|
1519
|
-
mimeType: (
|
|
1520
|
-
thumbnailUrl: (
|
|
1521
|
-
amountText: (
|
|
1522
|
-
detail: (
|
|
1523
|
-
paymentStatus: (
|
|
1524
|
-
onPreviewClick: () => M == null ? void 0 : M(c,
|
|
1525
|
-
onFetchSource: async () => await (
|
|
1518
|
+
title: (vt = c.metadata) == null ? void 0 : vt.attachment_title,
|
|
1519
|
+
mimeType: (xt = c.metadata) == null ? void 0 : xt.attachment_mime_type,
|
|
1520
|
+
thumbnailUrl: (wt = c.metadata) == null ? void 0 : wt.attachment_thumbnail,
|
|
1521
|
+
amountText: (_t = c.metadata) == null ? void 0 : _t.amount_text,
|
|
1522
|
+
detail: (Nt = c.metadata) == null ? void 0 : Nt.attachment_detail,
|
|
1523
|
+
paymentStatus: (yt = c.metadata) == null ? void 0 : yt.payment_status,
|
|
1524
|
+
onPreviewClick: () => M == null ? void 0 : M(c, w),
|
|
1525
|
+
onFetchSource: async () => await (C == null ? void 0 : C(c, w))
|
|
1526
1526
|
}
|
|
1527
1527
|
)
|
|
1528
1528
|
] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1529
1529
|
/* @__PURE__ */ n(
|
|
1530
|
-
|
|
1530
|
+
Ft.Received,
|
|
1531
1531
|
{
|
|
1532
|
-
title: (
|
|
1533
|
-
mimeType: (
|
|
1534
|
-
thumbnailUrl: (
|
|
1535
|
-
amountText: (
|
|
1536
|
-
detail: (
|
|
1537
|
-
paymentStatus: (
|
|
1532
|
+
title: (Ct = c.metadata) == null ? void 0 : Ct.attachment_title,
|
|
1533
|
+
mimeType: (kt = c.metadata) == null ? void 0 : kt.attachment_mime_type,
|
|
1534
|
+
thumbnailUrl: (Et = c.metadata) == null ? void 0 : Et.attachment_thumbnail,
|
|
1535
|
+
amountText: (St = c.metadata) == null ? void 0 : St.amount_text,
|
|
1536
|
+
detail: (It = c.metadata) == null ? void 0 : It.attachment_detail,
|
|
1537
|
+
paymentStatus: (Tt = c.metadata) == null ? void 0 : Tt.payment_status,
|
|
1538
1538
|
isUnlocking: A(c.id),
|
|
1539
|
-
onUnlockClick: () => M == null ? void 0 : M(c,
|
|
1540
|
-
onFetchSource: async () => await (
|
|
1541
|
-
onDownloadClick: () => R == null ? void 0 : R(c,
|
|
1539
|
+
onUnlockClick: () => M == null ? void 0 : M(c, w),
|
|
1540
|
+
onFetchSource: async () => await (C == null ? void 0 : C(c, w)),
|
|
1541
|
+
onDownloadClick: () => R == null ? void 0 : R(c, w)
|
|
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
|
+
Lt,
|
|
1548
1548
|
{
|
|
1549
1549
|
message: W,
|
|
1550
1550
|
renderText: b
|
|
1551
1551
|
}
|
|
1552
1552
|
) })
|
|
1553
|
-
] }) :
|
|
1553
|
+
] }) : ht ? (
|
|
1554
1554
|
/* Tip-only messages render as a standalone bubble */
|
|
1555
|
-
/* @__PURE__ */ n(
|
|
1555
|
+
/* @__PURE__ */ n(ze, { 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
|
-
|
|
1558
|
-
|
|
1557
|
+
fe && !gt && /* @__PURE__ */ n(
|
|
1558
|
+
ze,
|
|
1559
1559
|
{
|
|
1560
1560
|
message: c,
|
|
1561
|
-
hasAttachment:
|
|
1562
|
-
isMyMessage:
|
|
1561
|
+
hasAttachment: De,
|
|
1562
|
+
isMyMessage: te
|
|
1563
1563
|
}
|
|
1564
1564
|
),
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1565
|
+
mt && /* @__PURE__ */ n(Xn, { poll: mt }),
|
|
1566
|
+
B != null && B.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1567
|
+
N,
|
|
1568
1568
|
{
|
|
1569
|
-
actionHandler:
|
|
1570
|
-
attachments:
|
|
1569
|
+
actionHandler: o,
|
|
1570
|
+
attachments: B
|
|
1571
1571
|
}
|
|
1572
1572
|
) : null,
|
|
1573
|
-
|
|
1574
|
-
|
|
1573
|
+
q ? /* @__PURE__ */ n(
|
|
1574
|
+
x,
|
|
1575
1575
|
{
|
|
1576
1576
|
message: W,
|
|
1577
1577
|
renderText: b
|
|
1578
1578
|
}
|
|
1579
1579
|
) : /* @__PURE__ */ n(
|
|
1580
|
-
|
|
1580
|
+
Lt,
|
|
1581
1581
|
{
|
|
1582
1582
|
message: W,
|
|
1583
1583
|
renderText: b
|
|
@@ -1587,32 +1587,32 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1587
1587
|
] }) })
|
|
1588
1588
|
}
|
|
1589
1589
|
),
|
|
1590
|
-
!
|
|
1591
|
-
(!
|
|
1592
|
-
|
|
1590
|
+
!ft && !ht && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
1591
|
+
(!fe || gt) && /* @__PURE__ */ n(
|
|
1592
|
+
ze,
|
|
1593
1593
|
{
|
|
1594
1594
|
message: c,
|
|
1595
|
-
hasAttachment:
|
|
1596
|
-
isMyMessage:
|
|
1595
|
+
hasAttachment: De,
|
|
1596
|
+
isMyMessage: te
|
|
1597
1597
|
}
|
|
1598
1598
|
),
|
|
1599
|
-
s &&
|
|
1599
|
+
s && fe && /* @__PURE__ */ n(
|
|
1600
1600
|
Ca,
|
|
1601
1601
|
{
|
|
1602
|
-
selected:
|
|
1603
|
-
onVoteUp:
|
|
1604
|
-
onVoteDown:
|
|
1602
|
+
selected: L,
|
|
1603
|
+
onVoteUp: I,
|
|
1604
|
+
onVoteDown: O
|
|
1605
1605
|
}
|
|
1606
1606
|
)
|
|
1607
1607
|
] }),
|
|
1608
|
-
|
|
1609
|
-
|
|
1608
|
+
X && /* @__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(ee, {})
|
|
1616
1616
|
]
|
|
1617
1617
|
},
|
|
1618
1618
|
c.id
|
|
@@ -1622,13 +1622,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1622
1622
|
ka,
|
|
1623
1623
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
|
|
1624
1624
|
), Sa = (e) => {
|
|
1625
|
-
const t =
|
|
1625
|
+
const t = _e("CustomMessage");
|
|
1626
1626
|
return /* @__PURE__ */ n(Ea, { ...t, ...e });
|
|
1627
1627
|
}, Ia = () => {
|
|
1628
1628
|
var s;
|
|
1629
|
-
const { handleDelete: e, message: t } =
|
|
1629
|
+
const { handleDelete: e, message: t } = _e("CustomMessageActions");
|
|
1630
1630
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
1631
|
-
|
|
1631
|
+
Wt,
|
|
1632
1632
|
{
|
|
1633
1633
|
onClick: e,
|
|
1634
1634
|
"aria-label": "Delete",
|
|
@@ -1638,20 +1638,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1638
1638
|
}
|
|
1639
1639
|
);
|
|
1640
1640
|
}, Ta = () => {
|
|
1641
|
-
const { handleFlag: e } =
|
|
1641
|
+
const { handleFlag: e } = _e("CustomMessageActions");
|
|
1642
1642
|
return /* @__PURE__ */ n(
|
|
1643
|
-
|
|
1643
|
+
Wt,
|
|
1644
1644
|
{
|
|
1645
1645
|
onClick: e,
|
|
1646
1646
|
"aria-label": "Report",
|
|
1647
1647
|
title: "Report",
|
|
1648
1648
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1649
|
-
children: /* @__PURE__ */ n(
|
|
1649
|
+
children: /* @__PURE__ */ n(Ht, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1650
1650
|
}
|
|
1651
1651
|
);
|
|
1652
1652
|
}, Aa = () => {
|
|
1653
1653
|
var t;
|
|
1654
|
-
const { message: e } =
|
|
1654
|
+
const { message: e } = _e("CustomMessageActions");
|
|
1655
1655
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
|
|
1656
1656
|
Os,
|
|
1657
1657
|
{
|
|
@@ -1686,12 +1686,12 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1686
1686
|
"button",
|
|
1687
1687
|
{
|
|
1688
1688
|
type: "button",
|
|
1689
|
-
onClick: (
|
|
1690
|
-
|
|
1689
|
+
onClick: (l) => {
|
|
1690
|
+
l.preventDefault(), t(s);
|
|
1691
1691
|
},
|
|
1692
1692
|
className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
|
|
1693
1693
|
"aria-label": "Close link preview",
|
|
1694
|
-
children: /* @__PURE__ */ n(
|
|
1694
|
+
children: /* @__PURE__ */ n(Re, { className: "size-4 text-black/90" })
|
|
1695
1695
|
}
|
|
1696
1696
|
),
|
|
1697
1697
|
/* @__PURE__ */ h("div", { className: "p-2", children: [
|
|
@@ -1703,7 +1703,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1703
1703
|
);
|
|
1704
1704
|
}, Ra = (e) => ({
|
|
1705
1705
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
1706
|
-
(t) =>
|
|
1706
|
+
(t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
|
|
1707
1707
|
)
|
|
1708
1708
|
}), La = () => {
|
|
1709
1709
|
const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
|
|
@@ -1720,7 +1720,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1720
1720
|
},
|
|
1721
1721
|
r.og_scrape_url
|
|
1722
1722
|
)) }) : null;
|
|
1723
|
-
},
|
|
1723
|
+
}, nt = j.createContext(!1), ki = () => we(nt), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1724
1724
|
"button",
|
|
1725
1725
|
{
|
|
1726
1726
|
...s,
|
|
@@ -1731,10 +1731,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1731
1731
|
children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
|
|
1732
1732
|
}
|
|
1733
1733
|
), Oa = () => {
|
|
1734
|
-
const e =
|
|
1734
|
+
const e = we(nt), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
|
|
1735
1735
|
SendButton: r = Da,
|
|
1736
1736
|
AttachmentPreviewList: i = ns
|
|
1737
|
-
} =
|
|
1737
|
+
} = Gt("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
1740
|
/* @__PURE__ */ n(La, {}),
|
|
@@ -1768,10 +1768,11 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1768
1768
|
renderActions: e,
|
|
1769
1769
|
renderFooter: t,
|
|
1770
1770
|
disabled: s = !1,
|
|
1771
|
-
disabledReason: a
|
|
1771
|
+
disabledReason: a,
|
|
1772
|
+
composerInput: r
|
|
1772
1773
|
}) => {
|
|
1773
1774
|
var o;
|
|
1774
|
-
const { channel:
|
|
1775
|
+
const { channel: i } = de(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
|
|
1775
1776
|
return s ? /* @__PURE__ */ h(ae, { children: [
|
|
1776
1777
|
/* @__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
1778
|
t == null ? void 0 : t()
|
|
@@ -1779,12 +1780,12 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1779
1780
|
/* @__PURE__ */ h(
|
|
1780
1781
|
"div",
|
|
1781
1782
|
{
|
|
1782
|
-
inert:
|
|
1783
|
-
"aria-disabled":
|
|
1783
|
+
inert: l ? "" : void 0,
|
|
1784
|
+
"aria-disabled": l || void 0,
|
|
1784
1785
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1785
1786
|
children: [
|
|
1786
1787
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1787
|
-
/* @__PURE__ */ n(
|
|
1788
|
+
/* @__PURE__ */ n(nt.Provider, { value: l, children: /* @__PURE__ */ n(Qn, { Input: r ?? Oa }) })
|
|
1788
1789
|
]
|
|
1789
1790
|
}
|
|
1790
1791
|
),
|
|
@@ -1800,10 +1801,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1800
1801
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1801
1802
|
], Ba = {
|
|
1802
1803
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1803
|
-
},
|
|
1804
|
+
}, $e = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", Ut = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
|
|
1804
1805
|
var a;
|
|
1805
1806
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
1806
|
-
if (
|
|
1807
|
+
if (Ut(t))
|
|
1807
1808
|
return {
|
|
1808
1809
|
kind: "dm-agent",
|
|
1809
1810
|
type: t
|
|
@@ -1814,16 +1815,16 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1814
1815
|
type: t
|
|
1815
1816
|
};
|
|
1816
1817
|
const s = e.dm_agent_system_type;
|
|
1817
|
-
if (
|
|
1818
|
+
if (Ut(s))
|
|
1818
1819
|
return {
|
|
1819
1820
|
kind: "dm-agent",
|
|
1820
1821
|
type: s
|
|
1821
1822
|
};
|
|
1822
1823
|
}, Ga = (e) => {
|
|
1823
|
-
const t = e.indexOf(
|
|
1824
|
+
const t = e.indexOf($e);
|
|
1824
1825
|
if (t === -1)
|
|
1825
1826
|
return e;
|
|
1826
|
-
const s = t +
|
|
1827
|
+
const s = t + $e.length;
|
|
1827
1828
|
return /* @__PURE__ */ h(ae, { children: [
|
|
1828
1829
|
e.slice(0, t),
|
|
1829
1830
|
/* @__PURE__ */ n(
|
|
@@ -1833,7 +1834,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1833
1834
|
target: "_blank",
|
|
1834
1835
|
rel: "noopener noreferrer",
|
|
1835
1836
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
1836
|
-
children:
|
|
1837
|
+
children: $e
|
|
1837
1838
|
}
|
|
1838
1839
|
),
|
|
1839
1840
|
e.slice(s)
|
|
@@ -1854,7 +1855,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1854
1855
|
"data-dm-agent-system-type": s.type,
|
|
1855
1856
|
children: [
|
|
1856
1857
|
/* @__PURE__ */ n(
|
|
1857
|
-
|
|
1858
|
+
Ve,
|
|
1858
1859
|
{
|
|
1859
1860
|
size: 16,
|
|
1860
1861
|
weight: "regular",
|
|
@@ -1866,7 +1867,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1866
1867
|
]
|
|
1867
1868
|
}
|
|
1868
1869
|
),
|
|
1869
|
-
!t && /* @__PURE__ */ n(
|
|
1870
|
+
!t && /* @__PURE__ */ n(Oe, { message: e.message })
|
|
1870
1871
|
] });
|
|
1871
1872
|
}
|
|
1872
1873
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
@@ -1893,7 +1894,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1893
1894
|
]
|
|
1894
1895
|
}
|
|
1895
1896
|
),
|
|
1896
|
-
!t && /* @__PURE__ */ n(
|
|
1897
|
+
!t && /* @__PURE__ */ n(Oe, { message: e.message })
|
|
1897
1898
|
] });
|
|
1898
1899
|
}
|
|
1899
1900
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -1902,9 +1903,9 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1902
1903
|
/* @__PURE__ */ n("p", { children: e.message.text }),
|
|
1903
1904
|
/* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
|
|
1904
1905
|
] }),
|
|
1905
|
-
!t && /* @__PURE__ */ n(
|
|
1906
|
+
!t && /* @__PURE__ */ n(Oe, { message: e.message })
|
|
1906
1907
|
] });
|
|
1907
|
-
},
|
|
1908
|
+
}, un = qe(!1), Fe = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
1908
1909
|
"animateTransform",
|
|
1909
1910
|
{
|
|
1910
1911
|
attributeName: "transform",
|
|
@@ -1915,16 +1916,16 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1915
1916
|
repeatCount: "indefinite"
|
|
1916
1917
|
}
|
|
1917
1918
|
) }), Ya = /* @__PURE__ */ new Set([
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1919
|
+
Pe.Thinking,
|
|
1920
|
+
Pe.Generating,
|
|
1921
|
+
Pe.ExternalSources
|
|
1921
1922
|
]), qa = ({ threadList: e }) => {
|
|
1922
1923
|
var b, _;
|
|
1923
|
-
const { channel: t, channelConfig: s, thread: a } =
|
|
1924
|
-
if (!e &&
|
|
1924
|
+
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Xe(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = we(un);
|
|
1925
|
+
if (!e && o && Ya.has(l)) {
|
|
1925
1926
|
const v = Wa(t, (b = r.user) == null ? void 0 : b.id);
|
|
1926
1927
|
return /* @__PURE__ */ n(
|
|
1927
|
-
|
|
1928
|
+
jt,
|
|
1928
1929
|
{
|
|
1929
1930
|
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
1930
1931
|
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
@@ -1937,20 +1938,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1937
1938
|
return null;
|
|
1938
1939
|
const m = e ? [] : Object.values(i).filter(
|
|
1939
1940
|
({ parent_id: v, user: p }) => {
|
|
1940
|
-
var
|
|
1941
|
-
return (p == null ? void 0 : p.id) !== ((
|
|
1941
|
+
var w;
|
|
1942
|
+
return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && !v;
|
|
1942
1943
|
}
|
|
1943
1944
|
), g = e ? Object.values(i).filter(
|
|
1944
1945
|
({ parent_id: v, user: p }) => {
|
|
1945
|
-
var
|
|
1946
|
-
return (p == null ? void 0 : p.id) !== ((
|
|
1946
|
+
var w;
|
|
1947
|
+
return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && v === (a == null ? void 0 : a.id);
|
|
1947
1948
|
}
|
|
1948
1949
|
) : [], u = e ? g : m;
|
|
1949
1950
|
if (!u.length)
|
|
1950
1951
|
return null;
|
|
1951
1952
|
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
1953
|
return /* @__PURE__ */ n(
|
|
1953
|
-
|
|
1954
|
+
jt,
|
|
1954
1955
|
{
|
|
1955
1956
|
avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
1956
1957
|
avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
|
|
@@ -1958,7 +1959,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1958
1959
|
testId: "typing-indicator"
|
|
1959
1960
|
}
|
|
1960
1961
|
);
|
|
1961
|
-
},
|
|
1962
|
+
}, jt = ({
|
|
1962
1963
|
avatarId: e,
|
|
1963
1964
|
avatarName: t,
|
|
1964
1965
|
avatarImage: s,
|
|
@@ -1973,7 +1974,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1973
1974
|
},
|
|
1974
1975
|
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
1976
|
/* @__PURE__ */ n(
|
|
1976
|
-
|
|
1977
|
+
oe,
|
|
1977
1978
|
{
|
|
1978
1979
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1979
1980
|
id: e,
|
|
@@ -1993,9 +1994,9 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1993
1994
|
height: "13",
|
|
1994
1995
|
overflow: "visible",
|
|
1995
1996
|
children: [
|
|
1996
|
-
/* @__PURE__ */ n(
|
|
1997
|
-
/* @__PURE__ */ n(
|
|
1998
|
-
/* @__PURE__ */ n(
|
|
1997
|
+
/* @__PURE__ */ n(Fe, { cx: "4", index: 0 }),
|
|
1998
|
+
/* @__PURE__ */ n(Fe, { cx: "16", index: 1 }),
|
|
1999
|
+
/* @__PURE__ */ n(Fe, { cx: "28", index: 2 })
|
|
1999
2000
|
]
|
|
2000
2001
|
}
|
|
2001
2002
|
) }) }) }) }) })
|
|
@@ -2014,7 +2015,7 @@ function Wa(e, t) {
|
|
|
2014
2015
|
const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2015
2016
|
"div",
|
|
2016
2017
|
{
|
|
2017
|
-
className:
|
|
2018
|
+
className: y("flex items-center justify-center h-full", e),
|
|
2018
2019
|
children: [
|
|
2019
2020
|
/* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
2020
2021
|
/* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
|
|
@@ -2054,20 +2055,20 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2054
2055
|
t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
|
|
2055
2056
|
]
|
|
2056
2057
|
}
|
|
2057
|
-
),
|
|
2058
|
+
), Te = j.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
2059
|
/* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
|
|
2059
2060
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2060
2061
|
] }) }));
|
|
2061
|
-
|
|
2062
|
-
const
|
|
2062
|
+
Te.displayName = "LoadingState";
|
|
2063
|
+
const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Vt = "Replies instantly with AI assistant", Ja = ({
|
|
2063
2064
|
onBack: e,
|
|
2064
2065
|
showBackButton: t,
|
|
2065
2066
|
showStarButton: s = !1,
|
|
2066
2067
|
dmAgentEnabled: a = !1,
|
|
2067
2068
|
onLeaveConversation: r,
|
|
2068
2069
|
onBlockParticipant: i,
|
|
2069
|
-
showDeleteConversation:
|
|
2070
|
-
showBlockParticipant:
|
|
2070
|
+
showDeleteConversation: l = !0,
|
|
2071
|
+
showBlockParticipant: o = !0,
|
|
2071
2072
|
showReportParticipant: d = !0,
|
|
2072
2073
|
onDeleteConversationClick: m,
|
|
2073
2074
|
onBlockParticipantClick: g,
|
|
@@ -2078,26 +2079,26 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2078
2079
|
onParticipantNameClick: _,
|
|
2079
2080
|
renderHeaderTitleBadges: v
|
|
2080
2081
|
}) => {
|
|
2081
|
-
var
|
|
2082
|
-
const { channel: p } =
|
|
2083
|
-
var
|
|
2084
|
-
const
|
|
2085
|
-
return
|
|
2086
|
-
(
|
|
2087
|
-
var
|
|
2088
|
-
return ((
|
|
2082
|
+
var D, E, L, I, O;
|
|
2083
|
+
const { channel: p } = de(), w = j.useMemo(() => {
|
|
2084
|
+
var S, $;
|
|
2085
|
+
const N = (S = p._client) == null ? void 0 : S.userID;
|
|
2086
|
+
return N ? Object.values((($ = p.state) == null ? void 0 : $.members) || {}).find(
|
|
2087
|
+
(z) => {
|
|
2088
|
+
var H;
|
|
2089
|
+
return ((H = z.user) == null ? void 0 : H.id) && z.user.id !== N;
|
|
2089
2090
|
}
|
|
2090
2091
|
) : void 0;
|
|
2091
|
-
}, [(
|
|
2092
|
+
}, [(D = p._client) == null ? void 0 : D.userID, (E = p.state) == null ? void 0 : E.members]), A = Jt(w == null ? void 0 : w.user), M = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, C = Kt(p), R = v == null ? void 0 : v({
|
|
2092
2093
|
channel: p,
|
|
2093
|
-
participant:
|
|
2094
|
-
}),
|
|
2094
|
+
participant: w
|
|
2095
|
+
}), P = async () => {
|
|
2095
2096
|
try {
|
|
2096
|
-
|
|
2097
|
-
} catch (
|
|
2097
|
+
C ? await p.unpin() : await p.pin();
|
|
2098
|
+
} catch (N) {
|
|
2098
2099
|
console.error(
|
|
2099
2100
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
2100
|
-
|
|
2101
|
+
N
|
|
2101
2102
|
);
|
|
2102
2103
|
}
|
|
2103
2104
|
};
|
|
@@ -2106,25 +2107,25 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2106
2107
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
|
|
2107
2108
|
"button",
|
|
2108
2109
|
{
|
|
2109
|
-
className:
|
|
2110
|
-
|
|
2110
|
+
className: y(
|
|
2111
|
+
le,
|
|
2111
2112
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
2112
2113
|
),
|
|
2113
2114
|
onClick: e || (() => {
|
|
2114
2115
|
}),
|
|
2115
2116
|
type: "button",
|
|
2116
2117
|
"aria-label": "Back to conversations",
|
|
2117
|
-
children: /* @__PURE__ */ n(
|
|
2118
|
+
children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
|
|
2118
2119
|
}
|
|
2119
2120
|
) }),
|
|
2120
2121
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
2121
2122
|
/* @__PURE__ */ n(
|
|
2122
|
-
|
|
2123
|
+
oe,
|
|
2123
2124
|
{
|
|
2124
|
-
id: ((
|
|
2125
|
+
id: ((I = w == null ? void 0 : w.user) == null ? void 0 : I.id) || p.id || "unknown",
|
|
2125
2126
|
name: A,
|
|
2126
2127
|
image: M,
|
|
2127
|
-
starred: s &&
|
|
2128
|
+
starred: s && C,
|
|
2128
2129
|
dmAgentEnabled: a,
|
|
2129
2130
|
size: 48
|
|
2130
2131
|
}
|
|
@@ -2139,7 +2140,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2139
2140
|
children: [
|
|
2140
2141
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2141
2142
|
R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
|
|
2142
|
-
/* @__PURE__ */ n(
|
|
2143
|
+
/* @__PURE__ */ n(Ge, { className: "size-3 shrink-0", weight: "bold" })
|
|
2143
2144
|
]
|
|
2144
2145
|
}
|
|
2145
2146
|
) : /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
|
|
@@ -2147,37 +2148,37 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2147
2148
|
R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
|
|
2148
2149
|
] }),
|
|
2149
2150
|
a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2150
|
-
/* @__PURE__ */ n(
|
|
2151
|
-
/* @__PURE__ */ n("span", { children:
|
|
2151
|
+
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0 text-black/55" }),
|
|
2152
|
+
/* @__PURE__ */ n("span", { children: Vt })
|
|
2152
2153
|
] })
|
|
2153
2154
|
] }),
|
|
2154
2155
|
/* @__PURE__ */ h("div", { className: "flex justify-end items-center gap-2", children: [
|
|
2155
2156
|
s && /* @__PURE__ */ n(
|
|
2156
2157
|
"button",
|
|
2157
2158
|
{
|
|
2158
|
-
className:
|
|
2159
|
-
onClick:
|
|
2159
|
+
className: le,
|
|
2160
|
+
onClick: P,
|
|
2160
2161
|
type: "button",
|
|
2161
|
-
"aria-label":
|
|
2162
|
+
"aria-label": C ? "Unstar conversation" : "Star conversation",
|
|
2162
2163
|
children: /* @__PURE__ */ n(
|
|
2163
|
-
|
|
2164
|
+
Ue,
|
|
2164
2165
|
{
|
|
2165
|
-
className:
|
|
2166
|
-
"text-yellow-600":
|
|
2167
|
-
"text-black/90": !
|
|
2166
|
+
className: y("size-5", {
|
|
2167
|
+
"text-yellow-600": C,
|
|
2168
|
+
"text-black/90": !C
|
|
2168
2169
|
}),
|
|
2169
|
-
weight:
|
|
2170
|
+
weight: C ? "duotone" : "regular"
|
|
2170
2171
|
}
|
|
2171
2172
|
)
|
|
2172
2173
|
}
|
|
2173
2174
|
),
|
|
2174
2175
|
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2175
|
-
|
|
2176
|
+
$t,
|
|
2176
2177
|
{
|
|
2177
2178
|
channel: p,
|
|
2178
|
-
participant:
|
|
2179
|
-
showDeleteConversation:
|
|
2180
|
-
showBlockParticipant:
|
|
2179
|
+
participant: w,
|
|
2180
|
+
showDeleteConversation: l,
|
|
2181
|
+
showBlockParticipant: o,
|
|
2181
2182
|
showReportParticipant: d,
|
|
2182
2183
|
onLeaveConversation: r,
|
|
2183
2184
|
onBlockParticipant: i,
|
|
@@ -2185,7 +2186,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2185
2186
|
onBlockParticipantClick: g,
|
|
2186
2187
|
onReportParticipantClick: u,
|
|
2187
2188
|
customChannelActions: f,
|
|
2188
|
-
triggerClassName:
|
|
2189
|
+
triggerClassName: y(le, "bg-[#F1F0EE]")
|
|
2189
2190
|
}
|
|
2190
2191
|
))
|
|
2191
2192
|
] })
|
|
@@ -2195,23 +2196,23 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2195
2196
|
t && e && /* @__PURE__ */ n(
|
|
2196
2197
|
"button",
|
|
2197
2198
|
{
|
|
2198
|
-
className:
|
|
2199
|
-
|
|
2199
|
+
className: y(
|
|
2200
|
+
le,
|
|
2200
2201
|
"messaging-channel-view-back-button-desktop"
|
|
2201
2202
|
),
|
|
2202
2203
|
type: "button",
|
|
2203
2204
|
onClick: e,
|
|
2204
2205
|
"aria-label": "Back to conversations",
|
|
2205
|
-
children: /* @__PURE__ */ n(
|
|
2206
|
+
children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
|
|
2206
2207
|
}
|
|
2207
2208
|
),
|
|
2208
2209
|
/* @__PURE__ */ n(
|
|
2209
|
-
|
|
2210
|
+
oe,
|
|
2210
2211
|
{
|
|
2211
|
-
id: ((
|
|
2212
|
+
id: ((O = w == null ? void 0 : w.user) == null ? void 0 : O.id) || p.id || "unknown",
|
|
2212
2213
|
name: A,
|
|
2213
2214
|
image: M,
|
|
2214
|
-
starred: s &&
|
|
2215
|
+
starred: s && C,
|
|
2215
2216
|
dmAgentEnabled: a,
|
|
2216
2217
|
size: 48
|
|
2217
2218
|
}
|
|
@@ -2227,7 +2228,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2227
2228
|
children: [
|
|
2228
2229
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2229
2230
|
R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
|
|
2230
|
-
/* @__PURE__ */ n(
|
|
2231
|
+
/* @__PURE__ */ n(Ge, { className: "size-4 shrink-0", weight: "bold" })
|
|
2231
2232
|
]
|
|
2232
2233
|
}
|
|
2233
2234
|
) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
@@ -2235,8 +2236,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2235
2236
|
R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
|
|
2236
2237
|
] }),
|
|
2237
2238
|
a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2238
|
-
/* @__PURE__ */ n(
|
|
2239
|
-
/* @__PURE__ */ n("span", { className: "truncate", children:
|
|
2239
|
+
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0 text-black/55" }),
|
|
2240
|
+
/* @__PURE__ */ n("span", { className: "truncate", children: Vt })
|
|
2240
2241
|
] })
|
|
2241
2242
|
] })
|
|
2242
2243
|
] }),
|
|
@@ -2244,29 +2245,29 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2244
2245
|
s && /* @__PURE__ */ n(
|
|
2245
2246
|
"button",
|
|
2246
2247
|
{
|
|
2247
|
-
className:
|
|
2248
|
-
onClick:
|
|
2248
|
+
className: le,
|
|
2249
|
+
onClick: P,
|
|
2249
2250
|
type: "button",
|
|
2250
|
-
"aria-label":
|
|
2251
|
+
"aria-label": C ? "Unstar conversation" : "Star conversation",
|
|
2251
2252
|
children: /* @__PURE__ */ n(
|
|
2252
|
-
|
|
2253
|
+
Ue,
|
|
2253
2254
|
{
|
|
2254
|
-
className:
|
|
2255
|
-
"text-yellow-600":
|
|
2256
|
-
"text-black/90": !
|
|
2255
|
+
className: y("size-6", {
|
|
2256
|
+
"text-yellow-600": C,
|
|
2257
|
+
"text-black/90": !C
|
|
2257
2258
|
}),
|
|
2258
|
-
weight:
|
|
2259
|
+
weight: C ? "duotone" : "regular"
|
|
2259
2260
|
}
|
|
2260
2261
|
)
|
|
2261
2262
|
}
|
|
2262
2263
|
),
|
|
2263
2264
|
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2264
|
-
|
|
2265
|
+
$t,
|
|
2265
2266
|
{
|
|
2266
2267
|
channel: p,
|
|
2267
|
-
participant:
|
|
2268
|
-
showDeleteConversation:
|
|
2269
|
-
showBlockParticipant:
|
|
2268
|
+
participant: w,
|
|
2269
|
+
showDeleteConversation: l,
|
|
2270
|
+
showBlockParticipant: o,
|
|
2270
2271
|
showReportParticipant: d,
|
|
2271
2272
|
onLeaveConversation: r,
|
|
2272
2273
|
onBlockParticipant: i,
|
|
@@ -2274,7 +2275,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2274
2275
|
onBlockParticipantClick: g,
|
|
2275
2276
|
onReportParticipantClick: u,
|
|
2276
2277
|
customChannelActions: f,
|
|
2277
|
-
triggerClassName:
|
|
2278
|
+
triggerClassName: le
|
|
2278
2279
|
}
|
|
2279
2280
|
))
|
|
2280
2281
|
] })
|
|
@@ -2287,8 +2288,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2287
2288
|
renderMessageInputFooter: a,
|
|
2288
2289
|
renderConversationFooter: r,
|
|
2289
2290
|
onLeaveConversation: i,
|
|
2290
|
-
onBlockParticipant:
|
|
2291
|
-
showDeleteConversation:
|
|
2291
|
+
onBlockParticipant: l,
|
|
2292
|
+
showDeleteConversation: o = !0,
|
|
2292
2293
|
onDeleteConversationClick: d,
|
|
2293
2294
|
onBlockParticipantClick: m,
|
|
2294
2295
|
onReportParticipantClick: g,
|
|
@@ -2299,51 +2300,52 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2299
2300
|
showStarButton: _ = !1,
|
|
2300
2301
|
chatbotVotingEnabled: v = !1,
|
|
2301
2302
|
renderChannelBanner: p,
|
|
2302
|
-
renderHeaderTitleBadges:
|
|
2303
|
+
renderHeaderTitleBadges: w,
|
|
2303
2304
|
customChannelActions: A,
|
|
2304
2305
|
renderChannelActions: M,
|
|
2305
|
-
renderMessage:
|
|
2306
|
+
renderMessage: C,
|
|
2306
2307
|
dmAgentEnabled: R = !1,
|
|
2307
|
-
viewerLanguage:
|
|
2308
|
-
showChannelInfo:
|
|
2309
|
-
onParticipantNameClick:
|
|
2308
|
+
viewerLanguage: P,
|
|
2309
|
+
showChannelInfo: D = !0,
|
|
2310
|
+
onParticipantNameClick: E,
|
|
2311
|
+
composerInput: L
|
|
2310
2312
|
}) => {
|
|
2311
|
-
var
|
|
2312
|
-
const { channel:
|
|
2313
|
-
var q,
|
|
2314
|
-
const
|
|
2315
|
-
return
|
|
2316
|
-
(
|
|
2317
|
-
var
|
|
2318
|
-
return ((
|
|
2313
|
+
var H, ee, Q, Y, x, T;
|
|
2314
|
+
const { channel: I } = de(), O = j.useMemo(() => {
|
|
2315
|
+
var q, B;
|
|
2316
|
+
const U = (q = I._client) == null ? void 0 : q.userID;
|
|
2317
|
+
return U ? Object.values(((B = I.state) == null ? void 0 : B.members) || {}).find(
|
|
2318
|
+
(W) => {
|
|
2319
|
+
var X;
|
|
2320
|
+
return ((X = W.user) == null ? void 0 : X.id) && W.user.id !== U;
|
|
2319
2321
|
}
|
|
2320
2322
|
) : void 0;
|
|
2321
|
-
}, [(
|
|
2322
|
-
var q,
|
|
2323
|
-
const
|
|
2324
|
-
return
|
|
2325
|
-
var
|
|
2326
|
-
return ((
|
|
2323
|
+
}, [(H = I._client) == null ? void 0 : H.userID, (ee = I.state) == null ? void 0 : ee.members]), N = j.useMemo(() => {
|
|
2324
|
+
var q, B;
|
|
2325
|
+
const U = (q = I._client) == null ? void 0 : q.userID;
|
|
2326
|
+
return U ? Object.values(((B = I.state) == null ? void 0 : B.members) || {}).find((W) => {
|
|
2327
|
+
var X;
|
|
2328
|
+
return ((X = W.user) == null ? void 0 : X.id) === U;
|
|
2327
2329
|
}) : void 0;
|
|
2328
|
-
}, [(
|
|
2329
|
-
(
|
|
2330
|
-
const { message:
|
|
2330
|
+
}, [(Q = I._client) == null ? void 0 : Q.userID, (Y = I.state) == null ? void 0 : Y.members]), k = ((x = N == null ? void 0 : N.user) == null ? void 0 : x.is_account) ?? (N == null ? void 0 : N.is_account), S = ((T = O == null ? void 0 : O.user) == null ? void 0 : T.is_account) ?? (O == null ? void 0 : O.is_account), $ = R && k === !1 && S === !0, z = J(
|
|
2331
|
+
(U) => {
|
|
2332
|
+
const { message: V } = _e("ChannelView"), q = /* @__PURE__ */ n(
|
|
2331
2333
|
Sa,
|
|
2332
2334
|
{
|
|
2333
|
-
...
|
|
2335
|
+
...U,
|
|
2334
2336
|
chatbotVotingEnabled: v,
|
|
2335
|
-
viewerLanguage:
|
|
2337
|
+
viewerLanguage: P
|
|
2336
2338
|
}
|
|
2337
2339
|
);
|
|
2338
|
-
return !
|
|
2340
|
+
return !C || !V ? q : C(q, V);
|
|
2339
2341
|
},
|
|
2340
|
-
[v,
|
|
2342
|
+
[v, C, P]
|
|
2341
2343
|
);
|
|
2342
2344
|
return /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(
|
|
2343
2345
|
ls,
|
|
2344
2346
|
{
|
|
2345
2347
|
overrides: {
|
|
2346
|
-
Message:
|
|
2348
|
+
Message: z,
|
|
2347
2349
|
MessageActions: Aa
|
|
2348
2350
|
},
|
|
2349
2351
|
children: /* @__PURE__ */ h(cs, { children: [
|
|
@@ -2352,12 +2354,12 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2352
2354
|
{
|
|
2353
2355
|
onBack: e,
|
|
2354
2356
|
showBackButton: t,
|
|
2355
|
-
showChannelInfo:
|
|
2357
|
+
showChannelInfo: D,
|
|
2356
2358
|
showStarButton: _,
|
|
2357
|
-
dmAgentEnabled:
|
|
2359
|
+
dmAgentEnabled: $,
|
|
2358
2360
|
onLeaveConversation: i,
|
|
2359
|
-
onBlockParticipant:
|
|
2360
|
-
showDeleteConversation:
|
|
2361
|
+
onBlockParticipant: l,
|
|
2362
|
+
showDeleteConversation: o,
|
|
2361
2363
|
showBlockParticipant: u,
|
|
2362
2364
|
showReportParticipant: f,
|
|
2363
2365
|
onDeleteConversationClick: d,
|
|
@@ -2365,8 +2367,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2365
2367
|
onReportParticipantClick: g,
|
|
2366
2368
|
customChannelActions: A,
|
|
2367
2369
|
renderChannelActions: M,
|
|
2368
|
-
onParticipantNameClick:
|
|
2369
|
-
renderHeaderTitleBadges:
|
|
2370
|
+
onParticipantNameClick: E,
|
|
2371
|
+
renderHeaderTitleBadges: w
|
|
2370
2372
|
}
|
|
2371
2373
|
) }, "lt-channel-header"),
|
|
2372
2374
|
p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null,
|
|
@@ -2378,23 +2380,24 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2378
2380
|
},
|
|
2379
2381
|
"lt-channel-message-list"
|
|
2380
2382
|
),
|
|
2381
|
-
r ? /* @__PURE__ */ n(j.Fragment, { children: r(
|
|
2383
|
+
r ? /* @__PURE__ */ n(j.Fragment, { children: r(I) }, "lt-channel-conversation-footer") : null,
|
|
2382
2384
|
/* @__PURE__ */ n(
|
|
2383
2385
|
Pa,
|
|
2384
2386
|
{
|
|
2385
2387
|
...s && {
|
|
2386
|
-
renderActions: () => s == null ? void 0 : s(
|
|
2388
|
+
renderActions: () => s == null ? void 0 : s(I)
|
|
2387
2389
|
},
|
|
2388
|
-
renderFooter: () => a == null ? void 0 : a(
|
|
2390
|
+
renderFooter: () => a == null ? void 0 : a(I),
|
|
2389
2391
|
disabled: c,
|
|
2390
|
-
disabledReason: b
|
|
2392
|
+
disabledReason: b,
|
|
2393
|
+
composerInput: L
|
|
2391
2394
|
},
|
|
2392
2395
|
"lt-channel-message-input"
|
|
2393
2396
|
)
|
|
2394
2397
|
] })
|
|
2395
2398
|
}
|
|
2396
2399
|
) });
|
|
2397
|
-
},
|
|
2400
|
+
}, mn = j.memo(
|
|
2398
2401
|
({
|
|
2399
2402
|
channel: e,
|
|
2400
2403
|
onBack: t,
|
|
@@ -2402,8 +2405,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2402
2405
|
renderMessageInputActions: a,
|
|
2403
2406
|
renderMessageInputFooter: r,
|
|
2404
2407
|
renderConversationFooter: i,
|
|
2405
|
-
onLeaveConversation:
|
|
2406
|
-
onBlockParticipant:
|
|
2408
|
+
onLeaveConversation: l,
|
|
2409
|
+
onBlockParticipant: o,
|
|
2407
2410
|
className: d,
|
|
2408
2411
|
CustomChannelEmptyState: m = Xa,
|
|
2409
2412
|
showDeleteConversation: g = !0,
|
|
@@ -2414,74 +2417,75 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2414
2417
|
showReportParticipant: _ = !0,
|
|
2415
2418
|
composerDisabled: v = !1,
|
|
2416
2419
|
composerDisabledReason: p,
|
|
2417
|
-
dmAgentEnabled:
|
|
2420
|
+
dmAgentEnabled: w,
|
|
2418
2421
|
messageMetadata: A,
|
|
2419
2422
|
onMessageSent: M,
|
|
2420
|
-
showStarButton:
|
|
2423
|
+
showStarButton: C = !1,
|
|
2421
2424
|
chatbotVotingEnabled: R = !1,
|
|
2422
|
-
renderChannelBanner:
|
|
2423
|
-
renderHeaderTitleBadges:
|
|
2424
|
-
customChannelActions:
|
|
2425
|
-
renderChannelActions:
|
|
2426
|
-
renderMessage:
|
|
2427
|
-
onMessageLinkClick:
|
|
2428
|
-
sendButton:
|
|
2429
|
-
attachmentPreviewList:
|
|
2430
|
-
viewerLanguage:
|
|
2431
|
-
showChannelInfo:
|
|
2432
|
-
onParticipantNameClick:
|
|
2425
|
+
renderChannelBanner: P,
|
|
2426
|
+
renderHeaderTitleBadges: D,
|
|
2427
|
+
customChannelActions: E,
|
|
2428
|
+
renderChannelActions: L,
|
|
2429
|
+
renderMessage: I,
|
|
2430
|
+
onMessageLinkClick: O,
|
|
2431
|
+
sendButton: N,
|
|
2432
|
+
attachmentPreviewList: k,
|
|
2433
|
+
viewerLanguage: S,
|
|
2434
|
+
showChannelInfo: $ = !0,
|
|
2435
|
+
onParticipantNameClick: z,
|
|
2436
|
+
composerInput: H
|
|
2433
2437
|
}) => {
|
|
2434
|
-
const
|
|
2435
|
-
async (
|
|
2436
|
-
var
|
|
2437
|
-
const
|
|
2438
|
-
...
|
|
2439
|
-
...
|
|
2438
|
+
const ee = J(
|
|
2439
|
+
async (Y, x, T) => {
|
|
2440
|
+
var X;
|
|
2441
|
+
const U = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, V = w && !U, q = {
|
|
2442
|
+
...x,
|
|
2443
|
+
...V && { silent: !0 },
|
|
2440
2444
|
...A && {
|
|
2441
2445
|
metadata: {
|
|
2442
|
-
...
|
|
2446
|
+
...x.metadata ?? {},
|
|
2443
2447
|
...A
|
|
2444
2448
|
}
|
|
2445
2449
|
}
|
|
2446
|
-
},
|
|
2447
|
-
...
|
|
2448
|
-
...
|
|
2449
|
-
},
|
|
2450
|
-
return M == null || M(
|
|
2450
|
+
}, B = {
|
|
2451
|
+
...T,
|
|
2452
|
+
...V && { skip_push: !0 }
|
|
2453
|
+
}, W = await e.sendMessage(q, B);
|
|
2454
|
+
return M == null || M(W), W;
|
|
2451
2455
|
},
|
|
2452
|
-
[e,
|
|
2453
|
-
),
|
|
2454
|
-
return
|
|
2455
|
-
if (!
|
|
2456
|
-
const
|
|
2457
|
-
if (!
|
|
2458
|
-
const
|
|
2459
|
-
const
|
|
2456
|
+
[e, w, A, M]
|
|
2457
|
+
), Q = G(null);
|
|
2458
|
+
return K(() => {
|
|
2459
|
+
if (!O) return;
|
|
2460
|
+
const Y = Q.current;
|
|
2461
|
+
if (!Y) return;
|
|
2462
|
+
const x = (T) => {
|
|
2463
|
+
const U = T.target, V = U == null ? void 0 : U.closest("a[href]"), q = V == null ? void 0 : V.getAttribute("href");
|
|
2460
2464
|
if (!q) return;
|
|
2461
|
-
const
|
|
2462
|
-
|
|
2465
|
+
const B = V == null ? void 0 : V.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), X = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
|
|
2466
|
+
O(q, X);
|
|
2463
2467
|
};
|
|
2464
|
-
return
|
|
2465
|
-
}, [
|
|
2468
|
+
return Y.addEventListener("click", x), () => Y.removeEventListener("click", x);
|
|
2469
|
+
}, [O, e]), /* @__PURE__ */ n(
|
|
2466
2470
|
"div",
|
|
2467
2471
|
{
|
|
2468
|
-
ref:
|
|
2469
|
-
className:
|
|
2472
|
+
ref: Q,
|
|
2473
|
+
className: y(
|
|
2470
2474
|
"messaging-channel-view h-full flex flex-col",
|
|
2471
2475
|
d
|
|
2472
2476
|
),
|
|
2473
|
-
children: /* @__PURE__ */ n(
|
|
2477
|
+
children: /* @__PURE__ */ n(un.Provider, { value: w ?? !1, children: /* @__PURE__ */ n(
|
|
2474
2478
|
os,
|
|
2475
2479
|
{
|
|
2476
2480
|
channel: e,
|
|
2477
2481
|
MessageSystem: Ha,
|
|
2478
2482
|
EmptyStateIndicator: m,
|
|
2479
|
-
LoadingIndicator:
|
|
2483
|
+
LoadingIndicator: Te,
|
|
2480
2484
|
DateSeparator: Vs,
|
|
2481
2485
|
TypingIndicator: qa,
|
|
2482
|
-
doSendMessageRequest:
|
|
2483
|
-
...
|
|
2484
|
-
...
|
|
2486
|
+
doSendMessageRequest: ee,
|
|
2487
|
+
...N ? { SendButton: N } : {},
|
|
2488
|
+
...k ? { AttachmentPreviewList: k } : {},
|
|
2485
2489
|
children: /* @__PURE__ */ n(
|
|
2486
2490
|
Za,
|
|
2487
2491
|
{
|
|
@@ -2490,8 +2494,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2490
2494
|
renderMessageInputActions: a,
|
|
2491
2495
|
renderMessageInputFooter: r,
|
|
2492
2496
|
renderConversationFooter: i,
|
|
2493
|
-
onLeaveConversation:
|
|
2494
|
-
onBlockParticipant:
|
|
2497
|
+
onLeaveConversation: l,
|
|
2498
|
+
onBlockParticipant: o,
|
|
2495
2499
|
CustomChannelEmptyState: m,
|
|
2496
2500
|
showDeleteConversation: g,
|
|
2497
2501
|
onDeleteConversationClick: u,
|
|
@@ -2501,17 +2505,18 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2501
2505
|
showReportParticipant: _,
|
|
2502
2506
|
composerDisabled: v,
|
|
2503
2507
|
composerDisabledReason: p,
|
|
2504
|
-
showStarButton:
|
|
2505
|
-
dmAgentEnabled:
|
|
2508
|
+
showStarButton: C,
|
|
2509
|
+
dmAgentEnabled: w,
|
|
2506
2510
|
chatbotVotingEnabled: R,
|
|
2507
|
-
renderChannelBanner:
|
|
2508
|
-
renderHeaderTitleBadges:
|
|
2509
|
-
customChannelActions:
|
|
2510
|
-
renderChannelActions:
|
|
2511
|
-
renderMessage:
|
|
2512
|
-
viewerLanguage:
|
|
2513
|
-
showChannelInfo:
|
|
2514
|
-
onParticipantNameClick:
|
|
2511
|
+
renderChannelBanner: P,
|
|
2512
|
+
renderHeaderTitleBadges: D,
|
|
2513
|
+
customChannelActions: E,
|
|
2514
|
+
renderChannelActions: L,
|
|
2515
|
+
renderMessage: I,
|
|
2516
|
+
viewerLanguage: S,
|
|
2517
|
+
showChannelInfo: $,
|
|
2518
|
+
onParticipantNameClick: z,
|
|
2519
|
+
composerInput: H
|
|
2515
2520
|
}
|
|
2516
2521
|
)
|
|
2517
2522
|
}
|
|
@@ -2520,8 +2525,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2520
2525
|
);
|
|
2521
2526
|
}
|
|
2522
2527
|
);
|
|
2523
|
-
|
|
2524
|
-
const
|
|
2528
|
+
mn.displayName = "ChannelView";
|
|
2529
|
+
const pe = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
2525
2530
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
2526
2531
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2527
2532
|
/* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -2535,16 +2540,16 @@ const be = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
2535
2540
|
}
|
|
2536
2541
|
)
|
|
2537
2542
|
] }) }));
|
|
2538
|
-
|
|
2539
|
-
const
|
|
2543
|
+
pe.displayName = "ErrorState";
|
|
2544
|
+
const Ei = ({
|
|
2540
2545
|
capabilities: e = {},
|
|
2541
2546
|
renderMessageInputActions: t,
|
|
2542
2547
|
renderConversationFooter: s,
|
|
2543
2548
|
onChannelSelect: a,
|
|
2544
2549
|
onExitConversation: r,
|
|
2545
2550
|
initialParticipantFilter: i,
|
|
2546
|
-
initialParticipantData:
|
|
2547
|
-
CustomChannelEmptyState:
|
|
2551
|
+
initialParticipantData: l,
|
|
2552
|
+
CustomChannelEmptyState: o,
|
|
2548
2553
|
onBlockParticipantClick: d,
|
|
2549
2554
|
onReportParticipantClick: m,
|
|
2550
2555
|
dmAgentEnabled: g,
|
|
@@ -2555,113 +2560,114 @@ const ki = ({
|
|
|
2555
2560
|
renderChannelBanner: _,
|
|
2556
2561
|
customChannelActions: v,
|
|
2557
2562
|
renderChannelActions: p,
|
|
2558
|
-
onParticipantNameClick:
|
|
2563
|
+
onParticipantNameClick: w,
|
|
2559
2564
|
renderMessage: A,
|
|
2560
2565
|
onMessageLinkClick: M,
|
|
2561
|
-
showChannelInfo:
|
|
2566
|
+
showChannelInfo: C,
|
|
2567
|
+
composerInput: R
|
|
2562
2568
|
}) => {
|
|
2563
2569
|
const {
|
|
2564
|
-
client:
|
|
2565
|
-
isConnected:
|
|
2566
|
-
isLoading:
|
|
2567
|
-
error:
|
|
2568
|
-
refreshConnection:
|
|
2569
|
-
service:
|
|
2570
|
-
debug:
|
|
2571
|
-
} = Ps(), [
|
|
2572
|
-
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2575
|
-
const
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
}, [
|
|
2579
|
-
if (!
|
|
2580
|
-
const
|
|
2581
|
-
if (!
|
|
2582
|
-
const
|
|
2583
|
-
if (
|
|
2584
|
-
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2570
|
+
client: P,
|
|
2571
|
+
isConnected: D,
|
|
2572
|
+
isLoading: E,
|
|
2573
|
+
error: L,
|
|
2574
|
+
refreshConnection: I,
|
|
2575
|
+
service: O,
|
|
2576
|
+
debug: N
|
|
2577
|
+
} = Ps(), [k, S] = F(null), [$, z] = F(null), [H, ee] = F(!1), { showDeleteConversation: Q = !0 } = e, Y = G(l);
|
|
2578
|
+
Y.current = l;
|
|
2579
|
+
const x = G(a);
|
|
2580
|
+
x.current = a;
|
|
2581
|
+
const T = G(null), U = G(null);
|
|
2582
|
+
K(() => {
|
|
2583
|
+
U.current = k;
|
|
2584
|
+
}, [k]), K(() => {
|
|
2585
|
+
if (!P || !D) return;
|
|
2586
|
+
const B = P.userID;
|
|
2587
|
+
if (!B) return;
|
|
2588
|
+
const W = `${B}::${i}`;
|
|
2589
|
+
if (T.current === W) return;
|
|
2590
|
+
T.current = W;
|
|
2591
|
+
const X = () => {
|
|
2592
|
+
T.current === W && (T.current = null);
|
|
2587
2593
|
};
|
|
2588
2594
|
(async () => {
|
|
2589
|
-
var
|
|
2595
|
+
var me, he;
|
|
2590
2596
|
try {
|
|
2591
|
-
|
|
2597
|
+
N && console.log(
|
|
2592
2598
|
"[MessagingShell] Loading initial conversation with:",
|
|
2593
2599
|
i
|
|
2594
2600
|
);
|
|
2595
|
-
const
|
|
2601
|
+
const Z = await P.queryChannels(
|
|
2596
2602
|
{
|
|
2597
2603
|
type: "messaging",
|
|
2598
|
-
members: { $eq: [
|
|
2604
|
+
members: { $eq: [B, i] }
|
|
2599
2605
|
},
|
|
2600
2606
|
{},
|
|
2601
2607
|
{ limit: 1 }
|
|
2602
2608
|
);
|
|
2603
|
-
if (
|
|
2604
|
-
|
|
2609
|
+
if (Z.length > 0) {
|
|
2610
|
+
S(Z[0]), z(null), (me = x.current) == null || me.call(x, Z[0]), N && console.log(
|
|
2605
2611
|
"[MessagingShell] Initial conversation loaded:",
|
|
2606
|
-
|
|
2612
|
+
Z[0].id
|
|
2607
2613
|
);
|
|
2608
2614
|
return;
|
|
2609
2615
|
}
|
|
2610
|
-
const
|
|
2611
|
-
if (!
|
|
2612
|
-
|
|
2616
|
+
const te = Y.current;
|
|
2617
|
+
if (!te || !O) {
|
|
2618
|
+
X(), z("No conversation found with this account"), N && console.log(
|
|
2613
2619
|
"[MessagingShell] No conversation found for:",
|
|
2614
2620
|
i
|
|
2615
2621
|
);
|
|
2616
2622
|
return;
|
|
2617
2623
|
}
|
|
2618
2624
|
try {
|
|
2619
|
-
const
|
|
2620
|
-
id:
|
|
2621
|
-
name:
|
|
2622
|
-
phone:
|
|
2625
|
+
const ie = await O.startChannelWithParticipant({
|
|
2626
|
+
id: te.id,
|
|
2627
|
+
name: te.name,
|
|
2628
|
+
phone: te.phone
|
|
2623
2629
|
});
|
|
2624
|
-
|
|
2630
|
+
S(ie), z(null), (he = x.current) == null || he.call(x, ie), N && console.log(
|
|
2625
2631
|
"[MessagingShell] Channel created and loaded:",
|
|
2626
|
-
|
|
2632
|
+
ie.id
|
|
2627
2633
|
);
|
|
2628
|
-
} catch (
|
|
2634
|
+
} catch (ie) {
|
|
2629
2635
|
console.error(
|
|
2630
2636
|
"[MessagingShell] Failed to create conversation:",
|
|
2631
|
-
|
|
2632
|
-
),
|
|
2637
|
+
ie
|
|
2638
|
+
), X(), z("Failed to create conversation");
|
|
2633
2639
|
}
|
|
2634
|
-
} catch (
|
|
2640
|
+
} catch (Z) {
|
|
2635
2641
|
console.error(
|
|
2636
2642
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2637
|
-
|
|
2638
|
-
),
|
|
2643
|
+
Z
|
|
2644
|
+
), X(), U.current || z("Failed to load conversation");
|
|
2639
2645
|
}
|
|
2640
2646
|
})();
|
|
2641
|
-
}, [i,
|
|
2642
|
-
const
|
|
2643
|
-
|
|
2644
|
-
const q =
|
|
2645
|
-
var
|
|
2646
|
-
|
|
2647
|
+
}, [i, P, D, O, N]);
|
|
2648
|
+
const V = G(r);
|
|
2649
|
+
V.current = r;
|
|
2650
|
+
const q = J(() => {
|
|
2651
|
+
var B;
|
|
2652
|
+
S(null), ee(!0), (B = V.current) == null || B.call(V);
|
|
2647
2653
|
}, []);
|
|
2648
|
-
return
|
|
2649
|
-
|
|
2654
|
+
return E ? /* @__PURE__ */ n(Te, {}) : L ? /* @__PURE__ */ n(pe, { message: L, onBack: I }) : !D || !P ? /* @__PURE__ */ n(
|
|
2655
|
+
pe,
|
|
2650
2656
|
{
|
|
2651
2657
|
message: "Not connected to messaging service",
|
|
2652
|
-
onBack:
|
|
2658
|
+
onBack: I
|
|
2653
2659
|
}
|
|
2654
|
-
) :
|
|
2655
|
-
|
|
2660
|
+
) : $ ? /* @__PURE__ */ n(pe, { message: $ }) : H && !k ? /* @__PURE__ */ n(pe, { message: "Conversation ended" }) : k ? /* @__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(
|
|
2661
|
+
mn,
|
|
2656
2662
|
{
|
|
2657
|
-
channel:
|
|
2663
|
+
channel: k,
|
|
2658
2664
|
renderMessageInputActions: t,
|
|
2659
2665
|
renderConversationFooter: s,
|
|
2660
2666
|
renderChannelBanner: _,
|
|
2661
2667
|
onLeaveConversation: q,
|
|
2662
2668
|
onBlockParticipant: q,
|
|
2663
|
-
CustomChannelEmptyState:
|
|
2664
|
-
showDeleteConversation:
|
|
2669
|
+
CustomChannelEmptyState: o,
|
|
2670
|
+
showDeleteConversation: Q,
|
|
2665
2671
|
onBlockParticipantClick: d,
|
|
2666
2672
|
onReportParticipantClick: m,
|
|
2667
2673
|
dmAgentEnabled: g,
|
|
@@ -2671,13 +2677,14 @@ const ki = ({
|
|
|
2671
2677
|
renderHeaderTitleBadges: b,
|
|
2672
2678
|
customChannelActions: v,
|
|
2673
2679
|
renderChannelActions: p,
|
|
2674
|
-
onParticipantNameClick:
|
|
2680
|
+
onParticipantNameClick: w,
|
|
2675
2681
|
renderMessage: A,
|
|
2676
2682
|
onMessageLinkClick: M,
|
|
2677
|
-
showChannelInfo:
|
|
2683
|
+
showChannelInfo: C,
|
|
2684
|
+
composerInput: R
|
|
2678
2685
|
},
|
|
2679
|
-
|
|
2680
|
-
) }) }) : /* @__PURE__ */ n(
|
|
2686
|
+
k.id
|
|
2687
|
+
) }) }) : /* @__PURE__ */ n(Te, {});
|
|
2681
2688
|
};
|
|
2682
2689
|
function Qa(e) {
|
|
2683
2690
|
const t = e.state.pending_messages;
|
|
@@ -2685,14 +2692,14 @@ function Qa(e) {
|
|
|
2685
2692
|
for (const s of t)
|
|
2686
2693
|
e.state.addMessageSorted(s.message);
|
|
2687
2694
|
}
|
|
2688
|
-
const
|
|
2695
|
+
const hn = j.createContext({
|
|
2689
2696
|
selectedChannel: void 0,
|
|
2690
2697
|
onChannelSelect: () => {
|
|
2691
2698
|
},
|
|
2692
2699
|
debug: !1,
|
|
2693
2700
|
renderMessagePreview: void 0,
|
|
2694
2701
|
viewerLanguage: void 0
|
|
2695
|
-
}), er =
|
|
2702
|
+
}), er = hn.Provider, tr = () => j.useContext(hn), nr = (e, t) => {
|
|
2696
2703
|
const s = new Date(
|
|
2697
2704
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2698
2705
|
), r = new Date(
|
|
@@ -2713,50 +2720,50 @@ const mn = j.createContext({
|
|
|
2713
2720
|
day: "numeric",
|
|
2714
2721
|
year: "2-digit"
|
|
2715
2722
|
});
|
|
2716
|
-
},
|
|
2723
|
+
}, fn = j.memo(
|
|
2717
2724
|
({ channel: e, unread: t }) => {
|
|
2718
|
-
var R,
|
|
2725
|
+
var R, P, D;
|
|
2719
2726
|
const {
|
|
2720
2727
|
selectedChannel: s,
|
|
2721
2728
|
onChannelSelect: a,
|
|
2722
2729
|
debug: r,
|
|
2723
2730
|
renderMessagePreview: i,
|
|
2724
|
-
viewerLanguage:
|
|
2725
|
-
} = tr(),
|
|
2731
|
+
viewerLanguage: l
|
|
2732
|
+
} = tr(), o = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2726
2733
|
e && a(e);
|
|
2727
|
-
}, m = (
|
|
2728
|
-
const
|
|
2729
|
-
!
|
|
2734
|
+
}, m = (E) => {
|
|
2735
|
+
const L = E.key === "Enter" || E.key === " ", I = E.repeat;
|
|
2736
|
+
!L || I || (E.preventDefault(), d());
|
|
2730
2737
|
}, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
|
|
2731
|
-
(
|
|
2732
|
-
var
|
|
2733
|
-
return ((
|
|
2738
|
+
(E) => {
|
|
2739
|
+
var L, I;
|
|
2740
|
+
return ((L = E.user) == null ? void 0 : L.id) && E.user.id !== ((I = e == null ? void 0 : e._client) == null ? void 0 : I.userID);
|
|
2734
2741
|
}
|
|
2735
|
-
), f =
|
|
2736
|
-
var
|
|
2737
|
-
const
|
|
2738
|
-
if (
|
|
2739
|
-
for (let
|
|
2740
|
-
if (
|
|
2742
|
+
), f = Jt(u == null ? void 0 : u.user), c = (P = u == null ? void 0 : u.user) == null ? void 0 : P.image, b = (() => {
|
|
2743
|
+
var L;
|
|
2744
|
+
const E = (L = e == null ? void 0 : e.state) == null ? void 0 : L.messages;
|
|
2745
|
+
if (E != null && E.length) {
|
|
2746
|
+
for (let I = E.length - 1; I >= 0; I--)
|
|
2747
|
+
if (E[I].type !== "system") return E[I];
|
|
2741
2748
|
}
|
|
2742
2749
|
})(), v = (() => {
|
|
2743
|
-
var
|
|
2744
|
-
const
|
|
2750
|
+
var k, S, $, z;
|
|
2751
|
+
const E = Zt({
|
|
2745
2752
|
message: b,
|
|
2746
|
-
viewerLanguage:
|
|
2753
|
+
viewerLanguage: l
|
|
2747
2754
|
});
|
|
2748
|
-
if (((
|
|
2749
|
-
if (((
|
|
2750
|
-
if (((
|
|
2751
|
-
if (
|
|
2752
|
-
const
|
|
2753
|
-
return
|
|
2754
|
-
})(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "",
|
|
2755
|
+
if (((k = b == null ? void 0 : b.metadata) == null ? void 0 : k.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
|
|
2756
|
+
if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
|
|
2757
|
+
if ((($ = b == null ? void 0 : b.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_ATTACHMENT") return E ? `📎 ${E}` : "📎 Sent an attachment";
|
|
2758
|
+
if (E) return E;
|
|
2759
|
+
const N = (z = b == null ? void 0 : b.attachments) == null ? void 0 : z[0];
|
|
2760
|
+
return N ? N.og_scrape_url ? N.og_scrape_url : N.type === "image" ? "📷 Sent an image" : N.type === "video" ? "🎥 Sent a video" : N.type === "audio" ? "🎵 Sent audio" : N.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2761
|
+
})(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", w = b ? Ie(b) : !1, A = i ? i(b, v) : `${w ? "✨ " : ""}${v}`, M = Kt(e), C = t ?? 0;
|
|
2755
2762
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2756
2763
|
channelId: e == null ? void 0 : e.id,
|
|
2757
|
-
isSelected:
|
|
2764
|
+
isSelected: o,
|
|
2758
2765
|
participantName: f,
|
|
2759
|
-
unreadCount:
|
|
2766
|
+
unreadCount: C,
|
|
2760
2767
|
hasTimestamp: !!p
|
|
2761
2768
|
}), /* @__PURE__ */ n(
|
|
2762
2769
|
"div",
|
|
@@ -2765,18 +2772,18 @@ const mn = j.createContext({
|
|
|
2765
2772
|
tabIndex: 0,
|
|
2766
2773
|
onClick: d,
|
|
2767
2774
|
onKeyDown: m,
|
|
2768
|
-
className:
|
|
2775
|
+
className: y(
|
|
2769
2776
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
2770
2777
|
{
|
|
2771
|
-
"bg-black/[0.04]":
|
|
2772
|
-
"hover:bg-black/[0.02]": !
|
|
2778
|
+
"bg-black/[0.04]": o,
|
|
2779
|
+
"hover:bg-black/[0.02]": !o
|
|
2773
2780
|
}
|
|
2774
2781
|
),
|
|
2775
2782
|
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
|
|
2776
2783
|
/* @__PURE__ */ n(
|
|
2777
|
-
|
|
2784
|
+
oe,
|
|
2778
2785
|
{
|
|
2779
|
-
id: ((
|
|
2786
|
+
id: ((D = u == null ? void 0 : u.user) == null ? void 0 : D.id) || e.id || "unknown",
|
|
2780
2787
|
name: f,
|
|
2781
2788
|
image: c,
|
|
2782
2789
|
size: 48,
|
|
@@ -2788,7 +2795,7 @@ const mn = j.createContext({
|
|
|
2788
2795
|
/* @__PURE__ */ h(
|
|
2789
2796
|
"h3",
|
|
2790
2797
|
{
|
|
2791
|
-
className:
|
|
2798
|
+
className: y(
|
|
2792
2799
|
"text-sm font-medium truncate text-[#191918]"
|
|
2793
2800
|
),
|
|
2794
2801
|
children: [
|
|
@@ -2801,7 +2808,7 @@ const mn = j.createContext({
|
|
|
2801
2808
|
] }),
|
|
2802
2809
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2803
2810
|
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
|
|
2804
|
-
|
|
2811
|
+
C > 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: C > 99 ? "99+" : C })
|
|
2805
2812
|
] })
|
|
2806
2813
|
] })
|
|
2807
2814
|
] })
|
|
@@ -2809,7 +2816,7 @@ const mn = j.createContext({
|
|
|
2809
2816
|
);
|
|
2810
2817
|
}
|
|
2811
2818
|
);
|
|
2812
|
-
|
|
2819
|
+
fn.displayName = "CustomChannelPreview";
|
|
2813
2820
|
const ar = { last_message_at: -1 }, rr = j.memo(
|
|
2814
2821
|
({
|
|
2815
2822
|
onChannelSelect: e,
|
|
@@ -2818,14 +2825,14 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2818
2825
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
2819
2826
|
channelRenderFilterFn: r,
|
|
2820
2827
|
sort: i = ar,
|
|
2821
|
-
className:
|
|
2822
|
-
customEmptyStateIndicator:
|
|
2828
|
+
className: l,
|
|
2829
|
+
customEmptyStateIndicator: o,
|
|
2823
2830
|
renderMessagePreview: d,
|
|
2824
2831
|
viewerLanguage: m
|
|
2825
2832
|
}) => {
|
|
2826
2833
|
const g = j.useRef(0);
|
|
2827
2834
|
g.current++;
|
|
2828
|
-
const { debug: u = !1 } =
|
|
2835
|
+
const { debug: u = !1 } = Ke(), f = j.useCallback(
|
|
2829
2836
|
(b) => {
|
|
2830
2837
|
for (const _ of b)
|
|
2831
2838
|
Qa(_);
|
|
@@ -2857,9 +2864,9 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2857
2864
|
return /* @__PURE__ */ n(
|
|
2858
2865
|
"div",
|
|
2859
2866
|
{
|
|
2860
|
-
className:
|
|
2867
|
+
className: y(
|
|
2861
2868
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2862
|
-
|
|
2869
|
+
l
|
|
2863
2870
|
),
|
|
2864
2871
|
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: c, children: /* @__PURE__ */ n(
|
|
2865
2872
|
us,
|
|
@@ -2870,8 +2877,8 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2870
2877
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
2871
2878
|
channelRenderFilterFn: f,
|
|
2872
2879
|
Paginator: ms,
|
|
2873
|
-
Preview:
|
|
2874
|
-
EmptyStateIndicator:
|
|
2880
|
+
Preview: fn,
|
|
2881
|
+
EmptyStateIndicator: o
|
|
2875
2882
|
},
|
|
2876
2883
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
2877
2884
|
) }) })
|
|
@@ -2881,7 +2888,7 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2881
2888
|
);
|
|
2882
2889
|
rr.displayName = "ChannelList";
|
|
2883
2890
|
const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2884
|
-
function
|
|
2891
|
+
function st(e) {
|
|
2885
2892
|
if (typeof e != "string") return;
|
|
2886
2893
|
const t = e.trim();
|
|
2887
2894
|
if (t === "") return;
|
|
@@ -2896,10 +2903,10 @@ const lr = {
|
|
|
2896
2903
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2897
2904
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2898
2905
|
}, cr = ({ variant: e, cta: t }) => {
|
|
2899
|
-
const s =
|
|
2906
|
+
const s = y(
|
|
2900
2907
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2901
2908
|
lr[e]
|
|
2902
|
-
), a =
|
|
2909
|
+
), a = st(t.href);
|
|
2903
2910
|
return a ? /* @__PURE__ */ n(
|
|
2904
2911
|
"a",
|
|
2905
2912
|
{
|
|
@@ -2931,22 +2938,22 @@ const lr = {
|
|
|
2931
2938
|
}, ur = "text-white/30", mr = {
|
|
2932
2939
|
dark: "text-white/55",
|
|
2933
2940
|
light: "text-black/55"
|
|
2934
|
-
},
|
|
2941
|
+
}, at = ({
|
|
2935
2942
|
variant: e,
|
|
2936
2943
|
title: t,
|
|
2937
2944
|
placeholderTitle: s,
|
|
2938
2945
|
description: a,
|
|
2939
2946
|
url: r,
|
|
2940
2947
|
appIcon: i,
|
|
2941
|
-
cta:
|
|
2942
|
-
trailingAction:
|
|
2948
|
+
cta: l,
|
|
2949
|
+
trailingAction: o
|
|
2943
2950
|
}) => {
|
|
2944
|
-
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 =
|
|
2951
|
+
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 = l != null;
|
|
2945
2952
|
if (!g && !u && !c && !b) return null;
|
|
2946
|
-
const v =
|
|
2953
|
+
const v = y(
|
|
2947
2954
|
"truncate text-base font-medium leading-6",
|
|
2948
2955
|
d && !t ? ur : dr[e]
|
|
2949
|
-
), p =
|
|
2956
|
+
), p = y(
|
|
2950
2957
|
"truncate text-xs leading-4",
|
|
2951
2958
|
mr[e]
|
|
2952
2959
|
);
|
|
@@ -2956,42 +2963,42 @@ const lr = {
|
|
|
2956
2963
|
/* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2957
2964
|
g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2958
2965
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
2959
|
-
/* @__PURE__ */ n("p", { className:
|
|
2966
|
+
/* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
|
|
2960
2967
|
] }),
|
|
2961
2968
|
u && /* @__PURE__ */ n("p", { className: p, children: a })
|
|
2962
2969
|
] }),
|
|
2963
2970
|
!b && c && /* @__PURE__ */ n("p", { className: p, children: f })
|
|
2964
2971
|
] }),
|
|
2965
|
-
|
|
2972
|
+
o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
|
|
2966
2973
|
] }),
|
|
2967
|
-
|
|
2974
|
+
l && /* @__PURE__ */ n(cr, { variant: e, cta: l })
|
|
2968
2975
|
] });
|
|
2969
|
-
}, hr =
|
|
2976
|
+
}, hr = y(
|
|
2970
2977
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2971
2978
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2972
2979
|
// the messaging design system's "small border around link attachments"
|
|
2973
2980
|
// treatment from the mobile spec. The drop shadow remains for depth.
|
|
2974
2981
|
"border border-black/[0.08]",
|
|
2975
2982
|
"shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
|
|
2976
|
-
),
|
|
2983
|
+
), Ae = ({
|
|
2977
2984
|
variant: e,
|
|
2978
2985
|
children: t,
|
|
2979
2986
|
href: s,
|
|
2980
2987
|
onClick: a,
|
|
2981
2988
|
ariaLabel: r,
|
|
2982
2989
|
rootRef: i,
|
|
2983
|
-
topRight:
|
|
2984
|
-
bgClassName:
|
|
2990
|
+
topRight: l,
|
|
2991
|
+
bgClassName: o,
|
|
2985
2992
|
"data-testid": d
|
|
2986
2993
|
}) => {
|
|
2987
|
-
const m = s != null || a != null, g =
|
|
2994
|
+
const m = s != null || a != null, g = y(
|
|
2988
2995
|
hr,
|
|
2989
|
-
|
|
2996
|
+
o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2990
2997
|
// `focus-ring` is a design-system utility from the component-library
|
|
2991
2998
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
2992
2999
|
// with offset, so keyboard users can see the focused card.
|
|
2993
3000
|
m ? "cursor-pointer no-underline focus-ring" : null
|
|
2994
|
-
), u =
|
|
3001
|
+
), u = l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
|
|
2995
3002
|
return s ? /* @__PURE__ */ h(
|
|
2996
3003
|
"a",
|
|
2997
3004
|
{
|
|
@@ -3015,7 +3022,7 @@ const lr = {
|
|
|
3015
3022
|
onClick: a,
|
|
3016
3023
|
"aria-label": r,
|
|
3017
3024
|
"data-testid": d,
|
|
3018
|
-
className:
|
|
3025
|
+
className: y(g, "text-left"),
|
|
3019
3026
|
children: [
|
|
3020
3027
|
t,
|
|
3021
3028
|
u
|
|
@@ -3039,21 +3046,21 @@ const lr = {
|
|
|
3039
3046
|
}, gr = {
|
|
3040
3047
|
dark: "size-16 text-white/25",
|
|
3041
3048
|
light: "size-16 text-black/25"
|
|
3042
|
-
},
|
|
3049
|
+
}, Le = (e, t) => !!t && !!e && re(e) === "audio", gn = (e, t) => {
|
|
3043
3050
|
if (!t || !e) return !1;
|
|
3044
3051
|
const s = re(e);
|
|
3045
3052
|
return s === "video" || s === "audio";
|
|
3046
|
-
},
|
|
3053
|
+
}, rt = "bg-[#F2F3F4]", Me = ({
|
|
3047
3054
|
variant: e,
|
|
3048
3055
|
thumbnailUrl: t,
|
|
3049
3056
|
sourceUrl: s,
|
|
3050
3057
|
title: a,
|
|
3051
3058
|
mimeType: r = "image/*",
|
|
3052
3059
|
topLeft: i,
|
|
3053
|
-
topRight:
|
|
3060
|
+
topRight: l
|
|
3054
3061
|
}) => {
|
|
3055
|
-
const
|
|
3056
|
-
return
|
|
3062
|
+
const o = re(r), d = !!s && o === "video";
|
|
3063
|
+
return Le(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3057
3064
|
"audio",
|
|
3058
3065
|
{
|
|
3059
3066
|
src: s,
|
|
@@ -3065,7 +3072,7 @@ const lr = {
|
|
|
3065
3072
|
) }) : /* @__PURE__ */ h(
|
|
3066
3073
|
"div",
|
|
3067
3074
|
{
|
|
3068
|
-
className:
|
|
3075
|
+
className: y(
|
|
3069
3076
|
"relative h-[180px] w-full overflow-hidden",
|
|
3070
3077
|
d && "bg-black"
|
|
3071
3078
|
),
|
|
@@ -3092,18 +3099,18 @@ const lr = {
|
|
|
3092
3099
|
) : /* @__PURE__ */ n(
|
|
3093
3100
|
"div",
|
|
3094
3101
|
{
|
|
3095
|
-
className:
|
|
3102
|
+
className: y(
|
|
3096
3103
|
"flex h-full w-full items-center justify-center",
|
|
3097
3104
|
fr[e]
|
|
3098
3105
|
),
|
|
3099
|
-
children:
|
|
3106
|
+
children: ce(r, {
|
|
3100
3107
|
className: gr[e],
|
|
3101
3108
|
weight: "regular"
|
|
3102
3109
|
})
|
|
3103
3110
|
}
|
|
3104
3111
|
),
|
|
3105
3112
|
i ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-10", children: i }) : null,
|
|
3106
|
-
|
|
3113
|
+
l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null
|
|
3107
3114
|
]
|
|
3108
3115
|
}
|
|
3109
3116
|
);
|
|
@@ -3114,21 +3121,21 @@ const lr = {
|
|
|
3114
3121
|
url: a,
|
|
3115
3122
|
mimeType: r,
|
|
3116
3123
|
thumbnailUrl: i,
|
|
3117
|
-
sourceUrl:
|
|
3118
|
-
layout:
|
|
3124
|
+
sourceUrl: l,
|
|
3125
|
+
layout: o = "featured",
|
|
3119
3126
|
appIcon: d,
|
|
3120
3127
|
cta: m,
|
|
3121
3128
|
onDismiss: g,
|
|
3122
3129
|
onEditClick: u
|
|
3123
3130
|
}) => {
|
|
3124
|
-
const f =
|
|
3131
|
+
const f = o === "classic", c = Le(r, l), b = g ? /* @__PURE__ */ n(
|
|
3125
3132
|
"button",
|
|
3126
3133
|
{
|
|
3127
3134
|
type: "button",
|
|
3128
3135
|
onClick: g,
|
|
3129
3136
|
"aria-label": "Dismiss attachment",
|
|
3130
3137
|
className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
|
|
3131
|
-
children: /* @__PURE__ */ n(
|
|
3138
|
+
children: /* @__PURE__ */ n(Re, { className: "size-3", weight: "bold" })
|
|
3132
3139
|
}
|
|
3133
3140
|
) : void 0, _ = u ? /* @__PURE__ */ n(
|
|
3134
3141
|
"button",
|
|
@@ -3140,36 +3147,36 @@ const lr = {
|
|
|
3140
3147
|
children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
|
|
3141
3148
|
}
|
|
3142
3149
|
) : void 0;
|
|
3143
|
-
return c ? /* @__PURE__ */ n(
|
|
3150
|
+
return c ? /* @__PURE__ */ n(Ae, { variant: "dark", bgClassName: rt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3144
3151
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
|
|
3145
|
-
|
|
3152
|
+
Me,
|
|
3146
3153
|
{
|
|
3147
3154
|
variant: "dark",
|
|
3148
|
-
sourceUrl:
|
|
3155
|
+
sourceUrl: l,
|
|
3149
3156
|
title: e,
|
|
3150
3157
|
mimeType: r
|
|
3151
3158
|
}
|
|
3152
3159
|
) }),
|
|
3153
3160
|
b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
|
|
3154
3161
|
] }) }) : /* @__PURE__ */ h(
|
|
3155
|
-
|
|
3162
|
+
Ae,
|
|
3156
3163
|
{
|
|
3157
3164
|
variant: "dark",
|
|
3158
3165
|
topRight: f ? b : void 0,
|
|
3159
3166
|
children: [
|
|
3160
3167
|
!f && /* @__PURE__ */ n(
|
|
3161
|
-
|
|
3168
|
+
Me,
|
|
3162
3169
|
{
|
|
3163
3170
|
variant: "dark",
|
|
3164
3171
|
thumbnailUrl: i,
|
|
3165
|
-
sourceUrl:
|
|
3172
|
+
sourceUrl: l,
|
|
3166
3173
|
title: e,
|
|
3167
3174
|
mimeType: r,
|
|
3168
3175
|
topRight: b
|
|
3169
3176
|
}
|
|
3170
3177
|
),
|
|
3171
3178
|
/* @__PURE__ */ n(
|
|
3172
|
-
|
|
3179
|
+
at,
|
|
3173
3180
|
{
|
|
3174
3181
|
variant: "dark",
|
|
3175
3182
|
title: e,
|
|
@@ -3191,12 +3198,12 @@ const lr = {
|
|
|
3191
3198
|
mimeType: a,
|
|
3192
3199
|
thumbnailUrl: r,
|
|
3193
3200
|
sourceUrl: i,
|
|
3194
|
-
layout:
|
|
3195
|
-
appIcon:
|
|
3201
|
+
layout: l = "featured",
|
|
3202
|
+
appIcon: o,
|
|
3196
3203
|
cta: d,
|
|
3197
3204
|
onClick: m
|
|
3198
3205
|
}) => {
|
|
3199
|
-
const g =
|
|
3206
|
+
const g = gn(a, i), u = st(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Le(a, i) ? rt : void 0, _ = d && m ? {
|
|
3200
3207
|
...d,
|
|
3201
3208
|
onClick: () => {
|
|
3202
3209
|
var v;
|
|
@@ -3204,7 +3211,7 @@ const lr = {
|
|
|
3204
3211
|
}
|
|
3205
3212
|
} : d;
|
|
3206
3213
|
return /* @__PURE__ */ h(
|
|
3207
|
-
|
|
3214
|
+
Ae,
|
|
3208
3215
|
{
|
|
3209
3216
|
variant: "light",
|
|
3210
3217
|
href: f,
|
|
@@ -3213,8 +3220,8 @@ const lr = {
|
|
|
3213
3220
|
bgClassName: b,
|
|
3214
3221
|
"data-testid": "link-attachment",
|
|
3215
3222
|
children: [
|
|
3216
|
-
|
|
3217
|
-
|
|
3223
|
+
l === "featured" && /* @__PURE__ */ n(
|
|
3224
|
+
Me,
|
|
3218
3225
|
{
|
|
3219
3226
|
variant: "light",
|
|
3220
3227
|
thumbnailUrl: r,
|
|
@@ -3224,13 +3231,13 @@ const lr = {
|
|
|
3224
3231
|
}
|
|
3225
3232
|
),
|
|
3226
3233
|
/* @__PURE__ */ n(
|
|
3227
|
-
|
|
3234
|
+
at,
|
|
3228
3235
|
{
|
|
3229
3236
|
variant: "light",
|
|
3230
3237
|
title: e,
|
|
3231
3238
|
description: t,
|
|
3232
3239
|
url: s,
|
|
3233
|
-
appIcon:
|
|
3240
|
+
appIcon: o,
|
|
3234
3241
|
cta: _
|
|
3235
3242
|
}
|
|
3236
3243
|
)
|
|
@@ -3244,33 +3251,33 @@ const lr = {
|
|
|
3244
3251
|
url: a,
|
|
3245
3252
|
mimeType: r,
|
|
3246
3253
|
thumbnailUrl: i,
|
|
3247
|
-
sourceUrl:
|
|
3248
|
-
layout:
|
|
3254
|
+
sourceUrl: l,
|
|
3255
|
+
layout: o = "featured",
|
|
3249
3256
|
appIcon: d,
|
|
3250
3257
|
cta: m,
|
|
3251
3258
|
onClick: g
|
|
3252
3259
|
}) => {
|
|
3253
|
-
const u =
|
|
3260
|
+
const u = gn(r, l), f = st(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
|
|
3254
3261
|
return /* @__PURE__ */ h(
|
|
3255
|
-
|
|
3262
|
+
Ae,
|
|
3256
3263
|
{
|
|
3257
3264
|
variant: "dark",
|
|
3258
3265
|
href: c,
|
|
3259
3266
|
onClick: b,
|
|
3260
|
-
bgClassName:
|
|
3267
|
+
bgClassName: Le(r, l) ? rt : void 0,
|
|
3261
3268
|
children: [
|
|
3262
|
-
|
|
3263
|
-
|
|
3269
|
+
o === "featured" && /* @__PURE__ */ n(
|
|
3270
|
+
Me,
|
|
3264
3271
|
{
|
|
3265
3272
|
variant: "dark",
|
|
3266
3273
|
thumbnailUrl: i,
|
|
3267
|
-
sourceUrl:
|
|
3274
|
+
sourceUrl: l,
|
|
3268
3275
|
title: e,
|
|
3269
3276
|
mimeType: r
|
|
3270
3277
|
}
|
|
3271
3278
|
),
|
|
3272
3279
|
/* @__PURE__ */ n(
|
|
3273
|
-
|
|
3280
|
+
at,
|
|
3274
3281
|
{
|
|
3275
3282
|
variant: "dark",
|
|
3276
3283
|
title: e,
|
|
@@ -3284,7 +3291,7 @@ const lr = {
|
|
|
3284
3291
|
]
|
|
3285
3292
|
}
|
|
3286
3293
|
);
|
|
3287
|
-
},
|
|
3294
|
+
}, Si = {
|
|
3288
3295
|
Composer: br,
|
|
3289
3296
|
Sent: vr,
|
|
3290
3297
|
Received: pr
|
|
@@ -3310,22 +3317,22 @@ const lr = {
|
|
|
3310
3317
|
middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
|
|
3311
3318
|
end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
|
|
3312
3319
|
}
|
|
3313
|
-
},
|
|
3320
|
+
}, Ne = ({
|
|
3314
3321
|
variant: e,
|
|
3315
3322
|
text: t,
|
|
3316
3323
|
bordered: s = !0,
|
|
3317
3324
|
groupPosition: a = "single",
|
|
3318
3325
|
className: r,
|
|
3319
3326
|
children: i,
|
|
3320
|
-
"data-testid":
|
|
3327
|
+
"data-testid": l
|
|
3321
3328
|
}) => {
|
|
3322
|
-
const
|
|
3329
|
+
const o = t != null && t !== "", d = yr[Nr(e)][a];
|
|
3323
3330
|
return /* @__PURE__ */ h(
|
|
3324
3331
|
"div",
|
|
3325
3332
|
{
|
|
3326
|
-
"data-testid":
|
|
3333
|
+
"data-testid": l,
|
|
3327
3334
|
"data-group-position": a,
|
|
3328
|
-
className:
|
|
3335
|
+
className: y(
|
|
3329
3336
|
// 280px-wide bubble — matches the mobile chat attachment width
|
|
3330
3337
|
// and keeps the document / image / audio bubbles visually
|
|
3331
3338
|
// consistent inside the conversation timeline. The 8px / 16px
|
|
@@ -3342,10 +3349,10 @@ const lr = {
|
|
|
3342
3349
|
),
|
|
3343
3350
|
children: [
|
|
3344
3351
|
i,
|
|
3345
|
-
|
|
3352
|
+
o ? /* @__PURE__ */ n(
|
|
3346
3353
|
"p",
|
|
3347
3354
|
{
|
|
3348
|
-
className:
|
|
3355
|
+
className: y(
|
|
3349
3356
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
3350
3357
|
// the same font family + size as `.str-chat__message-text`
|
|
3351
3358
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -3362,7 +3369,7 @@ const lr = {
|
|
|
3362
3369
|
]
|
|
3363
3370
|
}
|
|
3364
3371
|
);
|
|
3365
|
-
},
|
|
3372
|
+
}, ye = ({
|
|
3366
3373
|
onClick: e,
|
|
3367
3374
|
variant: t = "overlay",
|
|
3368
3375
|
ariaLabel: s = "Dismiss attachment"
|
|
@@ -3374,13 +3381,13 @@ const lr = {
|
|
|
3374
3381
|
a.stopPropagation(), e();
|
|
3375
3382
|
},
|
|
3376
3383
|
"aria-label": s,
|
|
3377
|
-
className:
|
|
3384
|
+
className: y(
|
|
3378
3385
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
3379
3386
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
3380
3387
|
),
|
|
3381
|
-
children: /* @__PURE__ */ n(
|
|
3388
|
+
children: /* @__PURE__ */ n(Re, { className: "size-3", weight: "bold" })
|
|
3382
3389
|
}
|
|
3383
|
-
),
|
|
3390
|
+
), Ce = (e) => e === "received" ? "light" : "dark", Ii = ({
|
|
3384
3391
|
firstOfGroup: e,
|
|
3385
3392
|
endOfGroup: t,
|
|
3386
3393
|
groupedByUser: s
|
|
@@ -3401,27 +3408,27 @@ const lr = {
|
|
|
3401
3408
|
}
|
|
3402
3409
|
),
|
|
3403
3410
|
s ?? null
|
|
3404
|
-
] }),
|
|
3411
|
+
] }), it = ({
|
|
3405
3412
|
state: e,
|
|
3406
3413
|
src: t,
|
|
3407
3414
|
mimeType: s,
|
|
3408
3415
|
filename: a,
|
|
3409
3416
|
items: r,
|
|
3410
3417
|
text: i,
|
|
3411
|
-
groupPosition:
|
|
3412
|
-
preload:
|
|
3418
|
+
groupPosition: l,
|
|
3419
|
+
preload: o,
|
|
3413
3420
|
onDismiss: d
|
|
3414
3421
|
}) => {
|
|
3415
|
-
const m =
|
|
3422
|
+
const m = Ce(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
|
|
3416
3423
|
if (u.length === 0)
|
|
3417
3424
|
return null;
|
|
3418
|
-
const f =
|
|
3425
|
+
const f = o ?? (u.length > 1 ? "none" : "metadata");
|
|
3419
3426
|
return /* @__PURE__ */ n(
|
|
3420
|
-
|
|
3427
|
+
Ne,
|
|
3421
3428
|
{
|
|
3422
3429
|
variant: m,
|
|
3423
3430
|
text: i,
|
|
3424
|
-
groupPosition:
|
|
3431
|
+
groupPosition: l,
|
|
3425
3432
|
"data-testid": "audio-attachment",
|
|
3426
3433
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ n(
|
|
3427
3434
|
kr,
|
|
@@ -3431,14 +3438,14 @@ const lr = {
|
|
|
3431
3438
|
trailingAction: (
|
|
3432
3439
|
// Composer only supports a single attachment, so the
|
|
3433
3440
|
// dismiss control sits on the only player.
|
|
3434
|
-
g && b === 0 ? /* @__PURE__ */ n(
|
|
3441
|
+
g && b === 0 ? /* @__PURE__ */ n(ye, { onClick: d, variant: "inline" }) : void 0
|
|
3435
3442
|
)
|
|
3436
3443
|
},
|
|
3437
3444
|
`${c.src}-${b}`
|
|
3438
3445
|
)) })
|
|
3439
3446
|
}
|
|
3440
3447
|
);
|
|
3441
|
-
}, Er = (e) => /* @__PURE__ */ n(
|
|
3448
|
+
}, Er = (e) => /* @__PURE__ */ n(it, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(it, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(it, { ...e, state: "received" }), Tr = {
|
|
3442
3449
|
Composer: Er,
|
|
3443
3450
|
Sent: Sr,
|
|
3444
3451
|
Received: Ir
|
|
@@ -3466,7 +3473,7 @@ function Rr(e, t) {
|
|
|
3466
3473
|
}
|
|
3467
3474
|
if (!e) return;
|
|
3468
3475
|
if (re(e) === "document") {
|
|
3469
|
-
const r =
|
|
3476
|
+
const r = tn(e), i = Mr[r];
|
|
3470
3477
|
if (i) return i;
|
|
3471
3478
|
if (e === "application/octet-stream") return;
|
|
3472
3479
|
}
|
|
@@ -3495,26 +3502,26 @@ const Dr = {
|
|
|
3495
3502
|
}, Pr = {
|
|
3496
3503
|
dark: "text-white/85",
|
|
3497
3504
|
light: "text-black/85"
|
|
3498
|
-
},
|
|
3505
|
+
}, bn = ({
|
|
3499
3506
|
variant: e,
|
|
3500
3507
|
filename: t,
|
|
3501
3508
|
title: s,
|
|
3502
3509
|
mimeType: a = "application/octet-stream",
|
|
3503
3510
|
fileSize: r,
|
|
3504
3511
|
onActivate: i,
|
|
3505
|
-
activateLabel:
|
|
3506
|
-
trailingAction:
|
|
3512
|
+
activateLabel: l,
|
|
3513
|
+
trailingAction: o
|
|
3507
3514
|
}) => {
|
|
3508
3515
|
const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
|
|
3509
3516
|
"div",
|
|
3510
3517
|
{
|
|
3511
|
-
className:
|
|
3518
|
+
className: y(
|
|
3512
3519
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3513
3520
|
Or[e]
|
|
3514
3521
|
),
|
|
3515
3522
|
"aria-hidden": !0,
|
|
3516
|
-
children:
|
|
3517
|
-
className:
|
|
3523
|
+
children: ce(a, {
|
|
3524
|
+
className: y("size-6", Pr[e]),
|
|
3518
3525
|
weight: "regular"
|
|
3519
3526
|
})
|
|
3520
3527
|
}
|
|
@@ -3523,7 +3530,7 @@ const Dr = {
|
|
|
3523
3530
|
m ? /* @__PURE__ */ n(
|
|
3524
3531
|
"p",
|
|
3525
3532
|
{
|
|
3526
|
-
className:
|
|
3533
|
+
className: y(
|
|
3527
3534
|
"truncate text-xs leading-4",
|
|
3528
3535
|
Dr[e]
|
|
3529
3536
|
),
|
|
@@ -3535,8 +3542,8 @@ const Dr = {
|
|
|
3535
3542
|
{
|
|
3536
3543
|
type: "button",
|
|
3537
3544
|
onClick: i,
|
|
3538
|
-
"aria-label":
|
|
3539
|
-
className:
|
|
3545
|
+
"aria-label": l,
|
|
3546
|
+
className: y(
|
|
3540
3547
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
3541
3548
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
3542
3549
|
),
|
|
@@ -3551,16 +3558,16 @@ const Dr = {
|
|
|
3551
3558
|
] });
|
|
3552
3559
|
return /* @__PURE__ */ h("div", { className: "flex items-center gap-3 px-3 py-2", children: [
|
|
3553
3560
|
f,
|
|
3554
|
-
|
|
3561
|
+
o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
|
|
3555
3562
|
] });
|
|
3556
3563
|
};
|
|
3557
|
-
async function
|
|
3564
|
+
async function pn(e, t) {
|
|
3558
3565
|
const s = t ?? ne(e);
|
|
3559
3566
|
try {
|
|
3560
3567
|
const a = await fetch(e, { mode: "cors" });
|
|
3561
3568
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
3562
|
-
const r = await a.blob(), i = URL.createObjectURL(r),
|
|
3563
|
-
|
|
3569
|
+
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
3570
|
+
l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
3564
3571
|
} catch {
|
|
3565
3572
|
if (!window.open(e, "_blank", "noopener,noreferrer")) {
|
|
3566
3573
|
const r = document.createElement("a");
|
|
@@ -3584,7 +3591,7 @@ const zr = ({
|
|
|
3584
3591
|
}) => {
|
|
3585
3592
|
const i = t.filename ?? ne(t.src);
|
|
3586
3593
|
return /* @__PURE__ */ n(
|
|
3587
|
-
|
|
3594
|
+
bn,
|
|
3588
3595
|
{
|
|
3589
3596
|
variant: e,
|
|
3590
3597
|
filename: i,
|
|
@@ -3596,51 +3603,51 @@ const zr = ({
|
|
|
3596
3603
|
trailingAction: r
|
|
3597
3604
|
}
|
|
3598
3605
|
);
|
|
3599
|
-
},
|
|
3606
|
+
}, ot = ({
|
|
3600
3607
|
state: e,
|
|
3601
3608
|
src: t,
|
|
3602
3609
|
filename: s,
|
|
3603
3610
|
fileSize: a,
|
|
3604
3611
|
mimeType: r,
|
|
3605
3612
|
title: i,
|
|
3606
|
-
items:
|
|
3607
|
-
text:
|
|
3613
|
+
items: l,
|
|
3614
|
+
text: o,
|
|
3608
3615
|
groupPosition: d,
|
|
3609
3616
|
onClick: m,
|
|
3610
3617
|
onDismiss: g
|
|
3611
3618
|
}) => {
|
|
3612
|
-
const u =
|
|
3619
|
+
const u = Ce(e), f = e === "composer" && !!g, c = zr({
|
|
3613
3620
|
src: t,
|
|
3614
3621
|
filename: s,
|
|
3615
3622
|
fileSize: a,
|
|
3616
3623
|
mimeType: r,
|
|
3617
3624
|
title: i,
|
|
3618
|
-
items:
|
|
3625
|
+
items: l
|
|
3619
3626
|
}), b = (v) => {
|
|
3620
3627
|
if ((m == null ? void 0 : m(v)) === !1) return;
|
|
3621
3628
|
const p = c[v];
|
|
3622
3629
|
if (!p) return;
|
|
3623
|
-
const
|
|
3624
|
-
|
|
3630
|
+
const w = p.filename ?? ne(p.src);
|
|
3631
|
+
pn(p.src, w);
|
|
3625
3632
|
};
|
|
3626
3633
|
if (c.length === 0)
|
|
3627
3634
|
return null;
|
|
3628
3635
|
const _ = /* @__PURE__ */ n(
|
|
3629
3636
|
"span",
|
|
3630
3637
|
{
|
|
3631
|
-
className:
|
|
3638
|
+
className: y(
|
|
3632
3639
|
"flex size-8 items-center justify-center rounded-full",
|
|
3633
3640
|
u === "dark" ? "text-white/70" : "text-black/70"
|
|
3634
3641
|
),
|
|
3635
3642
|
"aria-hidden": !0,
|
|
3636
|
-
children: /* @__PURE__ */ n(
|
|
3643
|
+
children: /* @__PURE__ */ n(xe, { className: "size-5", weight: "bold" })
|
|
3637
3644
|
}
|
|
3638
3645
|
);
|
|
3639
3646
|
return /* @__PURE__ */ n(
|
|
3640
|
-
|
|
3647
|
+
Ne,
|
|
3641
3648
|
{
|
|
3642
3649
|
variant: u,
|
|
3643
|
-
text:
|
|
3650
|
+
text: o,
|
|
3644
3651
|
groupPosition: d,
|
|
3645
3652
|
"data-testid": "file-attachment",
|
|
3646
3653
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, p) => /* @__PURE__ */ n(
|
|
@@ -3650,17 +3657,17 @@ const zr = ({
|
|
|
3650
3657
|
item: v,
|
|
3651
3658
|
index: p,
|
|
3652
3659
|
onActivate: b,
|
|
3653
|
-
trailingAction: f && p === 0 ? /* @__PURE__ */ n(
|
|
3660
|
+
trailingAction: f && p === 0 ? /* @__PURE__ */ n(ye, { onClick: g, variant: "inline" }) : _
|
|
3654
3661
|
},
|
|
3655
3662
|
`${v.src}-${p}`
|
|
3656
3663
|
)) })
|
|
3657
3664
|
}
|
|
3658
3665
|
);
|
|
3659
|
-
}, Fr = (e) => /* @__PURE__ */ n(
|
|
3666
|
+
}, Fr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), jr = {
|
|
3660
3667
|
Composer: Fr,
|
|
3661
3668
|
Sent: Br,
|
|
3662
3669
|
Received: Ur
|
|
3663
|
-
},
|
|
3670
|
+
}, lt = ({
|
|
3664
3671
|
onPrev: e,
|
|
3665
3672
|
onNext: t,
|
|
3666
3673
|
prevLabel: s = "Previous",
|
|
@@ -3683,27 +3690,27 @@ const zr = ({
|
|
|
3683
3690
|
onClick: t,
|
|
3684
3691
|
"aria-label": a,
|
|
3685
3692
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3686
|
-
children: /* @__PURE__ */ n(
|
|
3693
|
+
children: /* @__PURE__ */ n(Ge, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3687
3694
|
}
|
|
3688
3695
|
)
|
|
3689
|
-
] }),
|
|
3696
|
+
] }), vn = ({
|
|
3690
3697
|
url: e,
|
|
3691
3698
|
filename: t,
|
|
3692
3699
|
variant: s = "pill",
|
|
3693
3700
|
label: a = "Download",
|
|
3694
3701
|
iconOnly: r,
|
|
3695
3702
|
tone: i = "dark",
|
|
3696
|
-
onTriggered:
|
|
3703
|
+
onTriggered: l
|
|
3697
3704
|
}) => {
|
|
3698
|
-
const [
|
|
3705
|
+
const [o, d] = F(!1), m = J(
|
|
3699
3706
|
(c) => {
|
|
3700
|
-
c.stopPropagation(), !
|
|
3707
|
+
c.stopPropagation(), !o && (d(!0), pn(e, t).catch(() => {
|
|
3701
3708
|
}).finally(() => {
|
|
3702
|
-
d(!1),
|
|
3709
|
+
d(!1), l == null || l();
|
|
3703
3710
|
}));
|
|
3704
3711
|
},
|
|
3705
|
-
[
|
|
3706
|
-
), g = r ?? s !== "pill", f = { className:
|
|
3712
|
+
[o, e, t, l]
|
|
3713
|
+
), g = r ?? s !== "pill", f = { className: y(
|
|
3707
3714
|
s === "pill" ? "size-4" : "size-5",
|
|
3708
3715
|
"shrink-0"
|
|
3709
3716
|
), weight: "bold" };
|
|
@@ -3712,24 +3719,24 @@ const zr = ({
|
|
|
3712
3719
|
{
|
|
3713
3720
|
type: "button",
|
|
3714
3721
|
onClick: m,
|
|
3715
|
-
disabled:
|
|
3722
|
+
disabled: o,
|
|
3716
3723
|
"aria-label": a,
|
|
3717
|
-
className:
|
|
3724
|
+
className: y(
|
|
3718
3725
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
3719
3726
|
{
|
|
3720
3727
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
3721
3728
|
light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
|
|
3722
3729
|
}[i]
|
|
3723
3730
|
),
|
|
3724
|
-
children:
|
|
3725
|
-
|
|
3731
|
+
children: o ? /* @__PURE__ */ n(
|
|
3732
|
+
ve,
|
|
3726
3733
|
{
|
|
3727
3734
|
className: "size-4 animate-spin",
|
|
3728
3735
|
weight: "bold",
|
|
3729
3736
|
"aria-hidden": !0
|
|
3730
3737
|
}
|
|
3731
3738
|
) : /* @__PURE__ */ n(
|
|
3732
|
-
|
|
3739
|
+
xe,
|
|
3733
3740
|
{
|
|
3734
3741
|
className: "size-5 shrink-0",
|
|
3735
3742
|
weight: "bold",
|
|
@@ -3742,73 +3749,73 @@ const zr = ({
|
|
|
3742
3749
|
{
|
|
3743
3750
|
type: "button",
|
|
3744
3751
|
onClick: m,
|
|
3745
|
-
disabled:
|
|
3752
|
+
disabled: o,
|
|
3746
3753
|
"aria-label": a,
|
|
3747
3754
|
className: "mes-media-viewer__action",
|
|
3748
|
-
children:
|
|
3755
|
+
children: o ? /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(xe, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3749
3756
|
}
|
|
3750
3757
|
) : /* @__PURE__ */ h(
|
|
3751
3758
|
"button",
|
|
3752
3759
|
{
|
|
3753
3760
|
type: "button",
|
|
3754
3761
|
onClick: m,
|
|
3755
|
-
disabled:
|
|
3762
|
+
disabled: o,
|
|
3756
3763
|
"aria-label": g ? a : void 0,
|
|
3757
|
-
className:
|
|
3764
|
+
className: y(
|
|
3758
3765
|
"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",
|
|
3759
3766
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
3760
3767
|
),
|
|
3761
3768
|
children: [
|
|
3762
|
-
|
|
3763
|
-
|
|
3769
|
+
o ? /* @__PURE__ */ n(
|
|
3770
|
+
ve,
|
|
3764
3771
|
{
|
|
3765
3772
|
className: "size-4 animate-spin",
|
|
3766
3773
|
weight: "bold",
|
|
3767
3774
|
"aria-hidden": !0
|
|
3768
3775
|
}
|
|
3769
|
-
) : /* @__PURE__ */ n(
|
|
3776
|
+
) : /* @__PURE__ */ n(xe, { ...f, "aria-hidden": !0 }),
|
|
3770
3777
|
g ? null : a
|
|
3771
3778
|
]
|
|
3772
3779
|
}
|
|
3773
3780
|
);
|
|
3774
|
-
},
|
|
3781
|
+
}, Be = (e, t, s) => Math.min(Math.max(e, t), s), ct = ({
|
|
3775
3782
|
length: e,
|
|
3776
3783
|
initialIndex: t,
|
|
3777
3784
|
open: s
|
|
3778
3785
|
}) => {
|
|
3779
|
-
const a =
|
|
3780
|
-
|
|
3781
|
-
s && i(
|
|
3782
|
-
}, [s, t, e]),
|
|
3783
|
-
i((d) =>
|
|
3786
|
+
const a = Be(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
|
|
3787
|
+
K(() => {
|
|
3788
|
+
s && i(Be(t, 0, Math.max(e - 1, 0)));
|
|
3789
|
+
}, [s, t, e]), K(() => {
|
|
3790
|
+
i((d) => Be(d, 0, Math.max(e - 1, 0)));
|
|
3784
3791
|
}, [e]);
|
|
3785
|
-
const
|
|
3792
|
+
const l = J(() => {
|
|
3786
3793
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
3787
|
-
}, [e]),
|
|
3794
|
+
}, [e]), o = J(() => {
|
|
3788
3795
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
3789
3796
|
}, [e]);
|
|
3790
|
-
return
|
|
3797
|
+
return K(() => {
|
|
3791
3798
|
if (!s || e <= 1) return;
|
|
3792
3799
|
const d = (m) => {
|
|
3793
3800
|
if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
|
|
3794
3801
|
const g = document.activeElement;
|
|
3795
|
-
g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ?
|
|
3802
|
+
g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? l() : o());
|
|
3796
3803
|
};
|
|
3797
3804
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
3798
|
-
}, [s, e,
|
|
3799
|
-
},
|
|
3805
|
+
}, [s, e, l, o]), { index: r, prev: l, next: o };
|
|
3806
|
+
}, dt = ({
|
|
3800
3807
|
open: e,
|
|
3801
3808
|
onClose: t,
|
|
3802
3809
|
ariaLabel: s,
|
|
3803
3810
|
counter: a,
|
|
3804
3811
|
actions: r,
|
|
3805
3812
|
children: i,
|
|
3806
|
-
"data-testid":
|
|
3813
|
+
"data-testid": l
|
|
3807
3814
|
}) => {
|
|
3808
|
-
const
|
|
3809
|
-
return
|
|
3815
|
+
const o = G(null), d = G(null);
|
|
3816
|
+
return K(() => {
|
|
3810
3817
|
var f;
|
|
3811
|
-
const u =
|
|
3818
|
+
const u = o.current;
|
|
3812
3819
|
if (u) {
|
|
3813
3820
|
if (e) {
|
|
3814
3821
|
if (!u.open)
|
|
@@ -3854,15 +3861,15 @@ const zr = ({
|
|
|
3854
3861
|
/* @__PURE__ */ h(
|
|
3855
3862
|
"dialog",
|
|
3856
3863
|
{
|
|
3857
|
-
ref:
|
|
3864
|
+
ref: o,
|
|
3858
3865
|
className: "mes-media-viewer",
|
|
3859
3866
|
"aria-label": s ?? "Attachment viewer",
|
|
3860
|
-
"data-testid":
|
|
3867
|
+
"data-testid": l,
|
|
3861
3868
|
onClose: () => {
|
|
3862
3869
|
t();
|
|
3863
3870
|
},
|
|
3864
3871
|
onClick: (u) => {
|
|
3865
|
-
u.target ===
|
|
3872
|
+
u.target === o.current && t();
|
|
3866
3873
|
},
|
|
3867
3874
|
children: [
|
|
3868
3875
|
/* @__PURE__ */ h("div", { className: "mes-media-viewer__chrome", children: [
|
|
@@ -3877,7 +3884,7 @@ const zr = ({
|
|
|
3877
3884
|
onClick: t,
|
|
3878
3885
|
"aria-label": "Close viewer",
|
|
3879
3886
|
className: "mes-media-viewer__action",
|
|
3880
|
-
children: /* @__PURE__ */ n(
|
|
3887
|
+
children: /* @__PURE__ */ n(Re, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3881
3888
|
}
|
|
3882
3889
|
)
|
|
3883
3890
|
] })
|
|
@@ -3886,31 +3893,31 @@ const zr = ({
|
|
|
3886
3893
|
]
|
|
3887
3894
|
}
|
|
3888
3895
|
);
|
|
3889
|
-
},
|
|
3896
|
+
}, xn = ({
|
|
3890
3897
|
open: e,
|
|
3891
3898
|
items: t,
|
|
3892
3899
|
initialIndex: s = 0,
|
|
3893
3900
|
onClose: a
|
|
3894
3901
|
}) => {
|
|
3895
|
-
const { index: r, prev: i, next:
|
|
3902
|
+
const { index: r, prev: i, next: l } = ct({
|
|
3896
3903
|
length: t.length,
|
|
3897
3904
|
initialIndex: s,
|
|
3898
3905
|
open: e
|
|
3899
|
-
}),
|
|
3900
|
-
() => (
|
|
3901
|
-
[
|
|
3906
|
+
}), o = t[r], d = se(
|
|
3907
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "image"),
|
|
3908
|
+
[o]
|
|
3902
3909
|
);
|
|
3903
|
-
return
|
|
3904
|
-
|
|
3910
|
+
return o ? /* @__PURE__ */ h(
|
|
3911
|
+
dt,
|
|
3905
3912
|
{
|
|
3906
3913
|
open: e,
|
|
3907
3914
|
onClose: a,
|
|
3908
3915
|
ariaLabel: d,
|
|
3909
3916
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3910
3917
|
actions: /* @__PURE__ */ n(
|
|
3911
|
-
|
|
3918
|
+
vn,
|
|
3912
3919
|
{
|
|
3913
|
-
url:
|
|
3920
|
+
url: o.src,
|
|
3914
3921
|
filename: d,
|
|
3915
3922
|
variant: "viewer",
|
|
3916
3923
|
label: `Download ${d}`
|
|
@@ -3921,20 +3928,20 @@ const zr = ({
|
|
|
3921
3928
|
/* @__PURE__ */ n(
|
|
3922
3929
|
"img",
|
|
3923
3930
|
{
|
|
3924
|
-
src:
|
|
3925
|
-
alt:
|
|
3931
|
+
src: o.src,
|
|
3932
|
+
alt: o.alt ?? d,
|
|
3926
3933
|
draggable: !1,
|
|
3927
3934
|
loading: "eager",
|
|
3928
3935
|
decoding: "async",
|
|
3929
3936
|
className: "mes-media-viewer__image"
|
|
3930
3937
|
},
|
|
3931
|
-
`${r}:${
|
|
3938
|
+
`${r}:${o.src}`
|
|
3932
3939
|
),
|
|
3933
3940
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3934
|
-
|
|
3941
|
+
lt,
|
|
3935
3942
|
{
|
|
3936
3943
|
onPrev: i,
|
|
3937
|
-
onNext:
|
|
3944
|
+
onNext: l,
|
|
3938
3945
|
prevLabel: "Previous image",
|
|
3939
3946
|
nextLabel: "Next image"
|
|
3940
3947
|
}
|
|
@@ -3942,7 +3949,7 @@ const zr = ({
|
|
|
3942
3949
|
]
|
|
3943
3950
|
}
|
|
3944
3951
|
) : null;
|
|
3945
|
-
}, 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",
|
|
3952
|
+
}, 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", wn = ({
|
|
3946
3953
|
tiles: e,
|
|
3947
3954
|
onTileActivate: t,
|
|
3948
3955
|
maxVisible: s = 4,
|
|
@@ -3950,15 +3957,15 @@ const zr = ({
|
|
|
3950
3957
|
}) => {
|
|
3951
3958
|
const r = e.length;
|
|
3952
3959
|
if (r === 0) return null;
|
|
3953
|
-
const i = e.slice(0, Math.min(r, s)),
|
|
3954
|
-
const u =
|
|
3960
|
+
const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, m, g) => {
|
|
3961
|
+
const u = y(Vr, "h-full w-full");
|
|
3955
3962
|
return t ? /* @__PURE__ */ h(
|
|
3956
3963
|
"button",
|
|
3957
3964
|
{
|
|
3958
3965
|
type: "button",
|
|
3959
3966
|
onClick: () => t(m),
|
|
3960
3967
|
"aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
|
|
3961
|
-
className:
|
|
3968
|
+
className: y(u, "cursor-zoom-in"),
|
|
3962
3969
|
children: [
|
|
3963
3970
|
d.content,
|
|
3964
3971
|
g
|
|
@@ -3970,56 +3977,56 @@ const zr = ({
|
|
|
3970
3977
|
g
|
|
3971
3978
|
] }, m);
|
|
3972
3979
|
};
|
|
3973
|
-
return i.length === 1 ? /* @__PURE__ */ n("div", { className:
|
|
3980
|
+
return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
|
|
3974
3981
|
"div",
|
|
3975
3982
|
{
|
|
3976
|
-
className:
|
|
3983
|
+
className: y(
|
|
3977
3984
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
3978
3985
|
a
|
|
3979
3986
|
),
|
|
3980
|
-
children: i.map((d, m) =>
|
|
3987
|
+
children: i.map((d, m) => o(d, m))
|
|
3981
3988
|
}
|
|
3982
3989
|
) : i.length === 3 ? /* @__PURE__ */ h(
|
|
3983
3990
|
"div",
|
|
3984
3991
|
{
|
|
3985
|
-
className:
|
|
3992
|
+
className: y(
|
|
3986
3993
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3987
3994
|
a
|
|
3988
3995
|
),
|
|
3989
3996
|
children: [
|
|
3990
|
-
/* @__PURE__ */ n("div", { className: "row-span-2", children:
|
|
3991
|
-
|
|
3992
|
-
|
|
3997
|
+
/* @__PURE__ */ n("div", { className: "row-span-2", children: o(i[0], 0) }),
|
|
3998
|
+
o(i[1], 1),
|
|
3999
|
+
o(i[2], 2)
|
|
3993
4000
|
]
|
|
3994
4001
|
}
|
|
3995
4002
|
) : /* @__PURE__ */ n(
|
|
3996
4003
|
"div",
|
|
3997
4004
|
{
|
|
3998
|
-
className:
|
|
4005
|
+
className: y(
|
|
3999
4006
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
4000
4007
|
a
|
|
4001
4008
|
),
|
|
4002
4009
|
children: i.map((d, m) => {
|
|
4003
|
-
const g =
|
|
4004
|
-
return
|
|
4010
|
+
const g = l > 0 && m === i.length - 1;
|
|
4011
|
+
return o(
|
|
4005
4012
|
d,
|
|
4006
4013
|
m,
|
|
4007
4014
|
g ? /* @__PURE__ */ h("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
|
|
4008
4015
|
"+",
|
|
4009
|
-
|
|
4016
|
+
l
|
|
4010
4017
|
] }) : null
|
|
4011
4018
|
);
|
|
4012
4019
|
})
|
|
4013
4020
|
}
|
|
4014
4021
|
);
|
|
4015
|
-
},
|
|
4016
|
-
const [t, s] =
|
|
4017
|
-
(
|
|
4018
|
-
(e == null ? void 0 : e(
|
|
4022
|
+
}, ke = (e) => {
|
|
4023
|
+
const [t, s] = F(!1), [a, r] = F(0), i = J(
|
|
4024
|
+
(o) => {
|
|
4025
|
+
(e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
|
|
4019
4026
|
},
|
|
4020
4027
|
[e]
|
|
4021
|
-
),
|
|
4022
|
-
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer:
|
|
4028
|
+
), l = J(() => s(!1), []);
|
|
4029
|
+
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
4023
4030
|
}, Gr = (e, t, s, a) => ({
|
|
4024
4031
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
4025
4032
|
content: /* @__PURE__ */ n(
|
|
@@ -4039,12 +4046,12 @@ const zr = ({
|
|
|
4039
4046
|
src: e,
|
|
4040
4047
|
alt: t,
|
|
4041
4048
|
items: s
|
|
4042
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
4049
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], _n = (e, t) => e.map((s, a) => ({
|
|
4043
4050
|
src: s.src,
|
|
4044
4051
|
alt: s.alt,
|
|
4045
4052
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4046
4053
|
})), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4047
|
-
const { viewerOpen:
|
|
4054
|
+
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = ke(
|
|
4048
4055
|
r
|
|
4049
4056
|
);
|
|
4050
4057
|
return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
|
|
@@ -4068,50 +4075,50 @@ const zr = ({
|
|
|
4068
4075
|
)
|
|
4069
4076
|
}
|
|
4070
4077
|
),
|
|
4071
|
-
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(
|
|
4078
|
+
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(ye, { onClick: i }) }) : null,
|
|
4072
4079
|
/* @__PURE__ */ n(
|
|
4073
|
-
|
|
4080
|
+
xn,
|
|
4074
4081
|
{
|
|
4075
|
-
open:
|
|
4076
|
-
items:
|
|
4077
|
-
initialIndex:
|
|
4082
|
+
open: l,
|
|
4083
|
+
items: _n([{ src: e, alt: t }], s),
|
|
4084
|
+
initialIndex: o,
|
|
4078
4085
|
onClose: m
|
|
4079
4086
|
}
|
|
4080
4087
|
)
|
|
4081
4088
|
] });
|
|
4082
|
-
},
|
|
4089
|
+
}, Nn = ({
|
|
4083
4090
|
state: e,
|
|
4084
4091
|
src: t,
|
|
4085
4092
|
alt: s,
|
|
4086
4093
|
filename: a,
|
|
4087
4094
|
items: r,
|
|
4088
4095
|
text: i,
|
|
4089
|
-
groupPosition:
|
|
4090
|
-
loading:
|
|
4096
|
+
groupPosition: l,
|
|
4097
|
+
loading: o = "lazy",
|
|
4091
4098
|
onClick: d
|
|
4092
4099
|
}) => {
|
|
4093
|
-
const m = Hr({ src: t, alt: s, items: r }), g =
|
|
4100
|
+
const m = Hr({ src: t, alt: s, items: r }), g = Ce(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = ke(
|
|
4094
4101
|
d
|
|
4095
4102
|
);
|
|
4096
4103
|
if (m.length === 0)
|
|
4097
4104
|
return null;
|
|
4098
4105
|
const _ = m.map(
|
|
4099
|
-
(v, p) => Gr(v, p, m.length,
|
|
4106
|
+
(v, p) => Gr(v, p, m.length, o)
|
|
4100
4107
|
);
|
|
4101
4108
|
return /* @__PURE__ */ h(
|
|
4102
|
-
|
|
4109
|
+
Ne,
|
|
4103
4110
|
{
|
|
4104
4111
|
variant: g,
|
|
4105
4112
|
text: i,
|
|
4106
|
-
groupPosition:
|
|
4113
|
+
groupPosition: l,
|
|
4107
4114
|
"data-testid": "image-attachment",
|
|
4108
4115
|
children: [
|
|
4109
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4116
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: _, onTileActivate: c }) }),
|
|
4110
4117
|
/* @__PURE__ */ n(
|
|
4111
|
-
|
|
4118
|
+
xn,
|
|
4112
4119
|
{
|
|
4113
4120
|
open: u,
|
|
4114
|
-
items:
|
|
4121
|
+
items: _n(m, a),
|
|
4115
4122
|
initialIndex: f,
|
|
4116
4123
|
onClose: b
|
|
4117
4124
|
}
|
|
@@ -4119,7 +4126,7 @@ const zr = ({
|
|
|
4119
4126
|
]
|
|
4120
4127
|
}
|
|
4121
4128
|
);
|
|
4122
|
-
}, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(
|
|
4129
|
+
}, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "received" }), Kr = {
|
|
4123
4130
|
Composer: qr,
|
|
4124
4131
|
Sent: Wr,
|
|
4125
4132
|
Received: Xr
|
|
@@ -4129,19 +4136,19 @@ const zr = ({
|
|
|
4129
4136
|
initialIndex: s = 0,
|
|
4130
4137
|
onClose: a
|
|
4131
4138
|
}) => {
|
|
4132
|
-
const { index: r, prev: i, next:
|
|
4139
|
+
const { index: r, prev: i, next: l } = ct({
|
|
4133
4140
|
length: t.length,
|
|
4134
4141
|
initialIndex: s,
|
|
4135
4142
|
open: e
|
|
4136
|
-
}),
|
|
4137
|
-
() => (
|
|
4138
|
-
[
|
|
4143
|
+
}), o = t[r], d = se(
|
|
4144
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "document"),
|
|
4145
|
+
[o]
|
|
4139
4146
|
), m = se(
|
|
4140
|
-
() =>
|
|
4141
|
-
[
|
|
4147
|
+
() => o ? Zr(o.src) : void 0,
|
|
4148
|
+
[o]
|
|
4142
4149
|
);
|
|
4143
|
-
return !
|
|
4144
|
-
|
|
4150
|
+
return !o || !m ? null : /* @__PURE__ */ h(
|
|
4151
|
+
dt,
|
|
4145
4152
|
{
|
|
4146
4153
|
open: e,
|
|
4147
4154
|
onClose: a,
|
|
@@ -4157,13 +4164,13 @@ const zr = ({
|
|
|
4157
4164
|
className: "mes-media-viewer__iframe",
|
|
4158
4165
|
sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
|
|
4159
4166
|
},
|
|
4160
|
-
`${r}:${
|
|
4167
|
+
`${r}:${o.src}`
|
|
4161
4168
|
),
|
|
4162
4169
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4163
|
-
|
|
4170
|
+
lt,
|
|
4164
4171
|
{
|
|
4165
4172
|
onPrev: i,
|
|
4166
|
-
onNext:
|
|
4173
|
+
onNext: l,
|
|
4167
4174
|
prevLabel: "Previous document",
|
|
4168
4175
|
nextLabel: "Next document"
|
|
4169
4176
|
}
|
|
@@ -4189,7 +4196,7 @@ const zr = ({
|
|
|
4189
4196
|
}) => {
|
|
4190
4197
|
const i = t.filename ?? ne(t.src);
|
|
4191
4198
|
return /* @__PURE__ */ n(
|
|
4192
|
-
|
|
4199
|
+
bn,
|
|
4193
4200
|
{
|
|
4194
4201
|
variant: e,
|
|
4195
4202
|
filename: i,
|
|
@@ -4201,40 +4208,40 @@ const zr = ({
|
|
|
4201
4208
|
trailingAction: r
|
|
4202
4209
|
}
|
|
4203
4210
|
);
|
|
4204
|
-
},
|
|
4211
|
+
}, ut = ({
|
|
4205
4212
|
state: e,
|
|
4206
4213
|
src: t,
|
|
4207
4214
|
filename: s,
|
|
4208
4215
|
fileSize: a,
|
|
4209
4216
|
title: r,
|
|
4210
4217
|
items: i,
|
|
4211
|
-
text:
|
|
4212
|
-
groupPosition:
|
|
4218
|
+
text: l,
|
|
4219
|
+
groupPosition: o,
|
|
4213
4220
|
onClick: d,
|
|
4214
4221
|
onDismiss: m
|
|
4215
4222
|
}) => {
|
|
4216
|
-
const g =
|
|
4223
|
+
const g = Ce(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ke(
|
|
4217
4224
|
d
|
|
4218
4225
|
), v = e === "composer" && !!m;
|
|
4219
4226
|
if (u.length === 0)
|
|
4220
4227
|
return null;
|
|
4221
|
-
const p = u.map((
|
|
4222
|
-
src:
|
|
4223
|
-
filename:
|
|
4228
|
+
const p = u.map((w) => ({
|
|
4229
|
+
src: w.src,
|
|
4230
|
+
filename: w.filename ?? ne(w.src)
|
|
4224
4231
|
}));
|
|
4225
4232
|
return /* @__PURE__ */ h(
|
|
4226
|
-
|
|
4233
|
+
Ne,
|
|
4227
4234
|
{
|
|
4228
4235
|
variant: g,
|
|
4229
|
-
text:
|
|
4230
|
-
groupPosition:
|
|
4236
|
+
text: l,
|
|
4237
|
+
groupPosition: o,
|
|
4231
4238
|
"data-testid": "pdf-attachment",
|
|
4232
4239
|
children: [
|
|
4233
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((
|
|
4234
|
-
const M =
|
|
4235
|
-
|
|
4240
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, A) => {
|
|
4241
|
+
const M = w.filename ?? ne(w.src), C = v && A === 0 ? /* @__PURE__ */ n(ye, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4242
|
+
vn,
|
|
4236
4243
|
{
|
|
4237
|
-
url:
|
|
4244
|
+
url: w.src,
|
|
4238
4245
|
filename: M,
|
|
4239
4246
|
variant: "inline",
|
|
4240
4247
|
label: `Download ${M}`,
|
|
@@ -4245,12 +4252,12 @@ const zr = ({
|
|
|
4245
4252
|
ei,
|
|
4246
4253
|
{
|
|
4247
4254
|
variant: g,
|
|
4248
|
-
item:
|
|
4255
|
+
item: w,
|
|
4249
4256
|
index: A,
|
|
4250
4257
|
onActivate: b,
|
|
4251
|
-
trailingAction:
|
|
4258
|
+
trailingAction: C
|
|
4252
4259
|
},
|
|
4253
|
-
`${
|
|
4260
|
+
`${w.src}-${A}`
|
|
4254
4261
|
);
|
|
4255
4262
|
}) }),
|
|
4256
4263
|
/* @__PURE__ */ n(
|
|
@@ -4265,26 +4272,26 @@ const zr = ({
|
|
|
4265
4272
|
]
|
|
4266
4273
|
}
|
|
4267
4274
|
);
|
|
4268
|
-
}, ti = (e) => /* @__PURE__ */ n(
|
|
4275
|
+
}, ti = (e) => /* @__PURE__ */ n(ut, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ut, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ut, { ...e, state: "received" }), ai = {
|
|
4269
4276
|
Composer: ti,
|
|
4270
4277
|
Sent: ni,
|
|
4271
4278
|
Received: si
|
|
4272
|
-
},
|
|
4279
|
+
}, yn = ({
|
|
4273
4280
|
open: e,
|
|
4274
4281
|
items: t,
|
|
4275
4282
|
initialIndex: s = 0,
|
|
4276
4283
|
onClose: a
|
|
4277
4284
|
}) => {
|
|
4278
|
-
const { index: r, prev: i, next:
|
|
4285
|
+
const { index: r, prev: i, next: l } = ct({
|
|
4279
4286
|
length: t.length,
|
|
4280
4287
|
initialIndex: s,
|
|
4281
4288
|
open: e
|
|
4282
|
-
}),
|
|
4283
|
-
() => (
|
|
4284
|
-
[
|
|
4289
|
+
}), o = t[r], d = se(
|
|
4290
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "video"),
|
|
4291
|
+
[o]
|
|
4285
4292
|
);
|
|
4286
|
-
return
|
|
4287
|
-
|
|
4293
|
+
return o ? /* @__PURE__ */ h(
|
|
4294
|
+
dt,
|
|
4288
4295
|
{
|
|
4289
4296
|
open: e,
|
|
4290
4297
|
onClose: a,
|
|
@@ -4295,23 +4302,23 @@ const zr = ({
|
|
|
4295
4302
|
/* @__PURE__ */ n(
|
|
4296
4303
|
"video",
|
|
4297
4304
|
{
|
|
4298
|
-
src:
|
|
4299
|
-
poster:
|
|
4305
|
+
src: o.src,
|
|
4306
|
+
poster: o.poster,
|
|
4300
4307
|
controls: !0,
|
|
4301
4308
|
autoPlay: !0,
|
|
4302
4309
|
muted: !0,
|
|
4303
4310
|
playsInline: !0,
|
|
4304
|
-
preload:
|
|
4311
|
+
preload: o.preload ?? "metadata",
|
|
4305
4312
|
className: "mes-media-viewer__video",
|
|
4306
|
-
children:
|
|
4313
|
+
children: o.mimeType ? /* @__PURE__ */ n("source", { src: o.src, type: o.mimeType }) : null
|
|
4307
4314
|
},
|
|
4308
|
-
`${r}:${
|
|
4315
|
+
`${r}:${o.src}`
|
|
4309
4316
|
),
|
|
4310
4317
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4311
|
-
|
|
4318
|
+
lt,
|
|
4312
4319
|
{
|
|
4313
4320
|
onPrev: i,
|
|
4314
|
-
onNext:
|
|
4321
|
+
onNext: l,
|
|
4315
4322
|
prevLabel: "Previous video",
|
|
4316
4323
|
nextLabel: "Next video"
|
|
4317
4324
|
}
|
|
@@ -4319,7 +4326,7 @@ const zr = ({
|
|
|
4319
4326
|
]
|
|
4320
4327
|
}
|
|
4321
4328
|
) : null;
|
|
4322
|
-
}, 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(
|
|
4329
|
+
}, 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(je, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
|
|
4323
4330
|
item: e,
|
|
4324
4331
|
index: t
|
|
4325
4332
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4334,7 +4341,7 @@ const zr = ({
|
|
|
4334
4341
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
4335
4342
|
}
|
|
4336
4343
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
4337
|
-
|
|
4344
|
+
qt,
|
|
4338
4345
|
{
|
|
4339
4346
|
className: "size-16 rounded-md text-white/30",
|
|
4340
4347
|
weight: "regular",
|
|
@@ -4344,21 +4351,21 @@ const zr = ({
|
|
|
4344
4351
|
/* @__PURE__ */ n(ri, {})
|
|
4345
4352
|
] }), ii = (e, t, s) => ({
|
|
4346
4353
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4347
|
-
content: /* @__PURE__ */ n(
|
|
4354
|
+
content: /* @__PURE__ */ n(Cn, { item: e, index: t })
|
|
4348
4355
|
}), oi = ({
|
|
4349
4356
|
src: e,
|
|
4350
4357
|
poster: t,
|
|
4351
4358
|
mimeType: s,
|
|
4352
4359
|
preload: a,
|
|
4353
4360
|
items: r
|
|
4354
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
4361
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], kn = (e, t) => e.map((s, a) => ({
|
|
4355
4362
|
src: s.src,
|
|
4356
4363
|
poster: s.poster,
|
|
4357
4364
|
mimeType: s.mimeType,
|
|
4358
4365
|
preload: s.preload,
|
|
4359
4366
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4360
|
-
})), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss:
|
|
4361
|
-
const { viewerOpen:
|
|
4367
|
+
})), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
|
|
4368
|
+
const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: g } = ke(
|
|
4362
4369
|
i
|
|
4363
4370
|
);
|
|
4364
4371
|
return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
|
|
@@ -4369,15 +4376,15 @@ const zr = ({
|
|
|
4369
4376
|
onClick: () => m(0),
|
|
4370
4377
|
"aria-label": "Play video",
|
|
4371
4378
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
4372
|
-
children: /* @__PURE__ */ n(
|
|
4379
|
+
children: /* @__PURE__ */ n(Cn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
4373
4380
|
}
|
|
4374
4381
|
),
|
|
4375
|
-
|
|
4382
|
+
l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(ye, { onClick: l }) }) : null,
|
|
4376
4383
|
/* @__PURE__ */ n(
|
|
4377
|
-
|
|
4384
|
+
yn,
|
|
4378
4385
|
{
|
|
4379
|
-
open:
|
|
4380
|
-
items:
|
|
4386
|
+
open: o,
|
|
4387
|
+
items: kn(
|
|
4381
4388
|
[{ src: e, poster: t, mimeType: s, preload: r }],
|
|
4382
4389
|
a
|
|
4383
4390
|
),
|
|
@@ -4386,36 +4393,36 @@ const zr = ({
|
|
|
4386
4393
|
}
|
|
4387
4394
|
)
|
|
4388
4395
|
] });
|
|
4389
|
-
},
|
|
4396
|
+
}, En = ({
|
|
4390
4397
|
state: e,
|
|
4391
4398
|
src: t,
|
|
4392
4399
|
poster: s,
|
|
4393
4400
|
mimeType: a,
|
|
4394
4401
|
filename: r,
|
|
4395
4402
|
items: i,
|
|
4396
|
-
text:
|
|
4397
|
-
groupPosition:
|
|
4403
|
+
text: l,
|
|
4404
|
+
groupPosition: o,
|
|
4398
4405
|
preload: d,
|
|
4399
4406
|
onClick: m
|
|
4400
4407
|
}) => {
|
|
4401
|
-
const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u =
|
|
4408
|
+
const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ce(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ke(
|
|
4402
4409
|
m
|
|
4403
4410
|
);
|
|
4404
4411
|
if (g.length === 0)
|
|
4405
4412
|
return null;
|
|
4406
4413
|
const v = g.map(
|
|
4407
|
-
(p,
|
|
4414
|
+
(p, w) => ii(p, w, g.length)
|
|
4408
4415
|
);
|
|
4409
4416
|
return /* @__PURE__ */ h(
|
|
4410
|
-
|
|
4417
|
+
Ne,
|
|
4411
4418
|
{
|
|
4412
4419
|
variant: u,
|
|
4413
|
-
text:
|
|
4414
|
-
groupPosition:
|
|
4420
|
+
text: l,
|
|
4421
|
+
groupPosition: o,
|
|
4415
4422
|
"data-testid": "video-attachment",
|
|
4416
4423
|
children: [
|
|
4417
4424
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4418
|
-
|
|
4425
|
+
wn,
|
|
4419
4426
|
{
|
|
4420
4427
|
tiles: v,
|
|
4421
4428
|
onTileActivate: b,
|
|
@@ -4423,10 +4430,10 @@ const zr = ({
|
|
|
4423
4430
|
}
|
|
4424
4431
|
) }),
|
|
4425
4432
|
/* @__PURE__ */ n(
|
|
4426
|
-
|
|
4433
|
+
yn,
|
|
4427
4434
|
{
|
|
4428
4435
|
open: f,
|
|
4429
|
-
items:
|
|
4436
|
+
items: kn(g, r),
|
|
4430
4437
|
initialIndex: c,
|
|
4431
4438
|
onClose: _
|
|
4432
4439
|
}
|
|
@@ -4434,11 +4441,11 @@ const zr = ({
|
|
|
4434
4441
|
]
|
|
4435
4442
|
}
|
|
4436
4443
|
);
|
|
4437
|
-
}, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(
|
|
4444
|
+
}, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(En, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(En, { ...e, state: "received" }), mi = {
|
|
4438
4445
|
Composer: ci,
|
|
4439
4446
|
Sent: di,
|
|
4440
4447
|
Received: ui
|
|
4441
|
-
},
|
|
4448
|
+
}, Ti = {
|
|
4442
4449
|
Image: Kr,
|
|
4443
4450
|
Video: mi,
|
|
4444
4451
|
Audio: Tr,
|
|
@@ -4456,7 +4463,7 @@ const zr = ({
|
|
|
4456
4463
|
onClick: t,
|
|
4457
4464
|
disabled: s,
|
|
4458
4465
|
style: { backgroundColor: "#E6E5E3" },
|
|
4459
|
-
className:
|
|
4466
|
+
className: y(
|
|
4460
4467
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
4461
4468
|
{
|
|
4462
4469
|
"hover:brightness-95 active:brightness-90": !s,
|
|
@@ -4466,22 +4473,22 @@ const zr = ({
|
|
|
4466
4473
|
),
|
|
4467
4474
|
children: e
|
|
4468
4475
|
}
|
|
4469
|
-
),
|
|
4476
|
+
), Ai = ({
|
|
4470
4477
|
faqs: e,
|
|
4471
4478
|
onFaqClick: t,
|
|
4472
4479
|
loadingFaqId: s,
|
|
4473
4480
|
headerText: a,
|
|
4474
4481
|
className: r,
|
|
4475
4482
|
avatarImage: i,
|
|
4476
|
-
avatarName:
|
|
4483
|
+
avatarName: l
|
|
4477
4484
|
}) => {
|
|
4478
|
-
const
|
|
4479
|
-
return
|
|
4480
|
-
(i ||
|
|
4481
|
-
|
|
4485
|
+
const o = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
|
|
4486
|
+
return o.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
4487
|
+
(i || l) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
4488
|
+
oe,
|
|
4482
4489
|
{
|
|
4483
|
-
id:
|
|
4484
|
-
name:
|
|
4490
|
+
id: l || "account",
|
|
4491
|
+
name: l || "Account",
|
|
4485
4492
|
image: i,
|
|
4486
4493
|
size: 24,
|
|
4487
4494
|
shape: "circle"
|
|
@@ -4494,7 +4501,7 @@ const zr = ({
|
|
|
4494
4501
|
style: { backgroundColor: "#F1F0EE" },
|
|
4495
4502
|
children: [
|
|
4496
4503
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4497
|
-
|
|
4504
|
+
o.map((d) => /* @__PURE__ */ n(
|
|
4498
4505
|
hi,
|
|
4499
4506
|
{
|
|
4500
4507
|
question: d.question,
|
|
@@ -4509,38 +4516,39 @@ const zr = ({
|
|
|
4509
4516
|
] }) });
|
|
4510
4517
|
};
|
|
4511
4518
|
export {
|
|
4512
|
-
|
|
4513
|
-
|
|
4519
|
+
nn as A,
|
|
4520
|
+
va as B,
|
|
4514
4521
|
Xa as C,
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4522
|
+
Hs as D,
|
|
4523
|
+
Ps as E,
|
|
4524
|
+
Ai as F,
|
|
4525
|
+
Si as L,
|
|
4518
4526
|
yi as M,
|
|
4519
|
-
|
|
4520
|
-
|
|
4527
|
+
be as a,
|
|
4528
|
+
oe as b,
|
|
4521
4529
|
rr as c,
|
|
4522
|
-
|
|
4530
|
+
mn as d,
|
|
4523
4531
|
Ci as e,
|
|
4524
4532
|
hi as f,
|
|
4525
4533
|
re as g,
|
|
4526
|
-
|
|
4527
|
-
|
|
4534
|
+
Ft as h,
|
|
4535
|
+
Ti as i,
|
|
4528
4536
|
Ca as j,
|
|
4529
4537
|
Ni as k,
|
|
4530
|
-
|
|
4538
|
+
Ei as l,
|
|
4531
4539
|
Lr as m,
|
|
4532
4540
|
Ar as n,
|
|
4533
4541
|
sr as o,
|
|
4534
4542
|
Rr as p,
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4543
|
+
Zt as q,
|
|
4544
|
+
ce as r,
|
|
4545
|
+
rn as s,
|
|
4538
4546
|
$s as t,
|
|
4539
|
-
|
|
4547
|
+
Ii as u,
|
|
4540
4548
|
Ys as v,
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4549
|
+
et as w,
|
|
4550
|
+
tt as x,
|
|
4551
|
+
Jt as y,
|
|
4552
|
+
ki as z
|
|
4545
4553
|
};
|
|
4546
|
-
//# sourceMappingURL=index-
|
|
4554
|
+
//# sourceMappingURL=index-CjwQ2Hj3.js.map
|