@linktr.ee/messaging-react 1.22.0-rc-1771906339 โ 1.22.0-rc-1771993226
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/assets/index.css +1 -1
- package/dist/index.js +796 -690
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CustomMessage/MessageTag.tsx +4 -3
- package/src/components/MessagingShell/index.tsx +102 -66
- package/src/components/MessagingShell/queryChannelsManager.test.ts +244 -0
- package/src/components/MessagingShell/queryChannelsManager.ts +174 -0
- package/src/styles.css +1 -2
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as me } from "react/jsx-runtime";
|
|
2
2
|
import D from "classnames";
|
|
3
|
-
import B, { createContext as
|
|
4
|
-
import { StreamChatService as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { GiftIcon as
|
|
7
|
-
import { LinkPreviewsManager as
|
|
8
|
-
const
|
|
3
|
+
import B, { createContext as dt, useContext as ut, useCallback as L, useState as M, useRef as H, useEffect as X, useMemo as Me } from "react";
|
|
4
|
+
import { StreamChatService as mt } from "@linktr.ee/messaging-core";
|
|
5
|
+
import { Chat as ht, ChannelList as ft, DateSeparator as gt, useChannelStateContext as Te, useChatContext as Ve, areMessageUIPropsEqual as xt, useMessageReminder as bt, useComponentContext as Ct, Attachment as Nt, EditMessageModal as yt, MessageBlocked as vt, MessageBouncePrompt as wt, MessageDeleted as pt, MessageIsThreadReplyInChannelButtonIndicator as Et, MessageRepliesCountButton as _t, ReminderNotification as It, StreamedMessageText as St, messageHasAttachments as Mt, messageHasReactions as kt, isDateSeparatorMessage as Dt, isMessageBlocked as Tt, isMessageBounced as Rt, MessageBounceModal as Ft, Poll as Lt, MessageText as At, MessageErrorIcon as Ut, useMessageContext as Pt, useMessageComposer as Ot, useStateStore as Bt, MessageInput as jt, useMessageInputContext as $t, useMessageComposerHasSendableData as zt, SimpleAttachmentSelector as Gt, QuotedMessagePreview as Ht, AttachmentPreviewList as Vt, TextareaComposer as qt, MessageTimestamp as Ae, Channel as Wt, WithComponents as Yt, Window as Zt, MessageList as Xt } from "stream-chat-react";
|
|
6
|
+
import { GiftIcon as Qt, XIcon as Re, ArrowUpIcon as Jt, SparkleIcon as Kt, ArrowLeftIcon as Ue, StarIcon as Pe, DotsThreeIcon as Oe, SpinnerGapIcon as Ne, SignOutIcon as es, ProhibitInsetIcon as Be, FlagIcon as ts, MagnifyingGlassIcon as ss, ChatCircleDotsIcon as je } from "@phosphor-icons/react";
|
|
7
|
+
import { LinkPreviewsManager as $e } from "stream-chat";
|
|
8
|
+
const qe = dt({
|
|
9
9
|
service: null,
|
|
10
10
|
client: null,
|
|
11
11
|
isConnected: !1,
|
|
@@ -15,19 +15,19 @@ const Be = et({
|
|
|
15
15
|
refreshConnection: async () => {
|
|
16
16
|
},
|
|
17
17
|
debug: !1
|
|
18
|
-
}),
|
|
18
|
+
}), pe = () => ut(qe), Js = ({
|
|
19
19
|
children: t,
|
|
20
20
|
user: s,
|
|
21
21
|
serviceConfig: n,
|
|
22
22
|
apiKey: a,
|
|
23
23
|
capabilities: l = {},
|
|
24
|
-
debug:
|
|
24
|
+
debug: c = !1
|
|
25
25
|
}) => {
|
|
26
26
|
const o = L(
|
|
27
|
-
(
|
|
28
|
-
|
|
27
|
+
(d, ...C) => {
|
|
28
|
+
c && console.log(`๐ฅ [MessagingProvider] ${d}`, ...C);
|
|
29
29
|
},
|
|
30
|
-
[
|
|
30
|
+
[c]
|
|
31
31
|
);
|
|
32
32
|
o("๐ RENDER START", {
|
|
33
33
|
userId: s == null ? void 0 : s.id,
|
|
@@ -35,12 +35,12 @@ const Be = et({
|
|
|
35
35
|
serviceConfig: !!n,
|
|
36
36
|
capabilities: Object.keys(l)
|
|
37
37
|
});
|
|
38
|
-
const [u,
|
|
38
|
+
const [u, f] = M(null), [h, b] = M(null), [x, y] = M(!1), [r, v] = M(!1), [E, w] = M(null), k = H(!1), N = H({
|
|
39
39
|
userId: s == null ? void 0 : s.id,
|
|
40
40
|
apiKey: a,
|
|
41
41
|
serviceConfig: n,
|
|
42
42
|
capabilities: l
|
|
43
|
-
}), m =
|
|
43
|
+
}), m = H(0);
|
|
44
44
|
m.current++, o("๐ RENDER INFO", {
|
|
45
45
|
renderCount: m.current,
|
|
46
46
|
currentProps: { userId: s == null ? void 0 : s.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
@@ -55,10 +55,10 @@ const Be = et({
|
|
|
55
55
|
apiKey: a,
|
|
56
56
|
serviceConfig: n,
|
|
57
57
|
capabilities: l
|
|
58
|
-
},
|
|
59
|
-
const
|
|
58
|
+
}, X(() => {
|
|
59
|
+
const d = m.current;
|
|
60
60
|
if (o("๐ง SERVICE INIT EFFECT TRIGGERED", {
|
|
61
|
-
renderCount:
|
|
61
|
+
renderCount: d,
|
|
62
62
|
apiKey: !!a,
|
|
63
63
|
serviceConfig: !!n,
|
|
64
64
|
dependencies: {
|
|
@@ -69,34 +69,34 @@ const Be = et({
|
|
|
69
69
|
}
|
|
70
70
|
}), !a || !n) {
|
|
71
71
|
o("โ ๏ธ SERVICE INIT SKIPPED", {
|
|
72
|
-
renderCount:
|
|
72
|
+
renderCount: d,
|
|
73
73
|
reason: "Missing apiKey or serviceConfig"
|
|
74
74
|
});
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
o("๐ CREATING NEW SERVICE", {
|
|
78
|
-
renderCount:
|
|
78
|
+
renderCount: d,
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
80
80
|
serviceConfigChanged: N.current.serviceConfig !== n
|
|
81
81
|
});
|
|
82
|
-
const
|
|
82
|
+
const C = new mt({
|
|
83
83
|
...n,
|
|
84
84
|
apiKey: a,
|
|
85
|
-
debug:
|
|
85
|
+
debug: c
|
|
86
86
|
});
|
|
87
|
-
return
|
|
88
|
-
renderCount:
|
|
89
|
-
serviceInstance: !!
|
|
87
|
+
return f(C), o("โ
SERVICE SET", {
|
|
88
|
+
renderCount: d,
|
|
89
|
+
serviceInstance: !!C
|
|
90
90
|
}), () => {
|
|
91
91
|
o("๐งน SERVICE CLEANUP", {
|
|
92
|
-
renderCount:
|
|
92
|
+
renderCount: d,
|
|
93
93
|
reason: "Effect cleanup"
|
|
94
|
-
}),
|
|
94
|
+
}), C.disconnectUser().catch(console.error);
|
|
95
95
|
};
|
|
96
|
-
}, [a, n,
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
var
|
|
96
|
+
}, [a, n, c, o]);
|
|
97
|
+
const p = H(null);
|
|
98
|
+
X(() => {
|
|
99
|
+
var C, O;
|
|
100
100
|
if (o("๐ USER CONNECTION EFFECT TRIGGERED", {
|
|
101
101
|
hasService: !!u,
|
|
102
102
|
hasUser: !!s,
|
|
@@ -112,7 +112,7 @@ const Be = et({
|
|
|
112
112
|
o("โ ๏ธ USER CONNECTION SKIPPED", "Already connecting");
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
if (((
|
|
115
|
+
if (((C = p.current) == null ? void 0 : C.serviceId) === u && ((O = p.current) == null ? void 0 : O.userId) === s.id) {
|
|
116
116
|
o(
|
|
117
117
|
"โ ๏ธ USER CONNECTION SKIPPED",
|
|
118
118
|
"Already connected this user with this service"
|
|
@@ -120,35 +120,35 @@ const Be = et({
|
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
(async () => {
|
|
123
|
-
o("๐ STARTING USER CONNECTION", { userId: s.id }), k.current = !0,
|
|
123
|
+
o("๐ STARTING USER CONNECTION", { userId: s.id }), k.current = !0, v(!0), w(null);
|
|
124
124
|
try {
|
|
125
125
|
o("๐ CALLING SERVICE.CONNECTUSER", { userId: s.id });
|
|
126
126
|
const _ = await u.connectUser(s);
|
|
127
|
-
|
|
127
|
+
b(_), y(!0), p.current = { serviceId: u, userId: s.id }, o("โ
USER CONNECTION SUCCESS", {
|
|
128
128
|
userId: s.id,
|
|
129
129
|
clientId: _.userID
|
|
130
130
|
});
|
|
131
131
|
} catch (_) {
|
|
132
132
|
const R = _ instanceof Error ? _.message : "Connection failed";
|
|
133
|
-
|
|
133
|
+
w(R), o("โ USER CONNECTION ERROR", {
|
|
134
134
|
userId: s.id,
|
|
135
135
|
error: R
|
|
136
136
|
});
|
|
137
137
|
} finally {
|
|
138
|
-
|
|
138
|
+
v(!1), k.current = !1, o("๐ USER CONNECTION FINISHED", {
|
|
139
139
|
userId: s.id,
|
|
140
140
|
isConnected: x
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
})();
|
|
144
|
-
}, [u, s, o, x]),
|
|
144
|
+
}, [u, s, o, x]), X(() => (o("๐ CLEANUP EFFECT REGISTERED", {
|
|
145
145
|
hasService: !!u,
|
|
146
146
|
isConnected: x
|
|
147
147
|
}), () => {
|
|
148
148
|
u && x ? (o(
|
|
149
149
|
"๐งน CLEANUP EFFECT TRIGGERED",
|
|
150
150
|
"Cleaning up connection on unmount"
|
|
151
|
-
),
|
|
151
|
+
), p.current = null, u.disconnectUser().catch(console.error)) : o("๐ CLEANUP EFFECT SKIPPED", {
|
|
152
152
|
hasService: !!u,
|
|
153
153
|
isConnected: x
|
|
154
154
|
});
|
|
@@ -161,73 +161,73 @@ const Be = et({
|
|
|
161
161
|
o("โ ๏ธ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
o("๐ STARTING CONNECTION REFRESH", { userId: s.id }),
|
|
164
|
+
o("๐ STARTING CONNECTION REFRESH", { userId: s.id }), v(!0);
|
|
165
165
|
try {
|
|
166
166
|
o("๐ DISCONNECTING FOR REFRESH"), await u.disconnectUser(), o("๐ RECONNECTING FOR REFRESH");
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
} catch (
|
|
170
|
-
const
|
|
171
|
-
|
|
167
|
+
const d = await u.connectUser(s);
|
|
168
|
+
b(d), y(!0), w(null), o("โ
CONNECTION REFRESH SUCCESS", { userId: s.id });
|
|
169
|
+
} catch (d) {
|
|
170
|
+
const C = d instanceof Error ? d.message : "Refresh failed";
|
|
171
|
+
w(C), o("โ CONNECTION REFRESH ERROR", {
|
|
172
172
|
userId: s.id,
|
|
173
|
-
error:
|
|
173
|
+
error: C
|
|
174
174
|
});
|
|
175
175
|
} finally {
|
|
176
|
-
|
|
176
|
+
v(!1), o("๐ CONNECTION REFRESH FINISHED", { userId: s.id });
|
|
177
177
|
}
|
|
178
|
-
}, [u, s, o]),
|
|
178
|
+
}, [u, s, o]), g = B.useMemo(() => (o("๐ซ CONTEXT VALUE MEMOIZATION", {
|
|
179
179
|
hasService: !!u,
|
|
180
|
-
hasClient: !!
|
|
180
|
+
hasClient: !!h,
|
|
181
181
|
isConnected: x,
|
|
182
182
|
isLoading: r,
|
|
183
|
-
hasError: !!
|
|
183
|
+
hasError: !!E,
|
|
184
184
|
capabilitiesKeys: Object.keys(l)
|
|
185
185
|
}), {
|
|
186
186
|
service: u,
|
|
187
|
-
client:
|
|
187
|
+
client: h,
|
|
188
188
|
isConnected: x,
|
|
189
189
|
isLoading: r,
|
|
190
|
-
error:
|
|
190
|
+
error: E,
|
|
191
191
|
capabilities: l,
|
|
192
192
|
refreshConnection: T,
|
|
193
|
-
debug:
|
|
193
|
+
debug: c
|
|
194
194
|
}), [
|
|
195
195
|
u,
|
|
196
|
-
|
|
196
|
+
h,
|
|
197
197
|
x,
|
|
198
198
|
r,
|
|
199
|
-
|
|
199
|
+
E,
|
|
200
200
|
l,
|
|
201
201
|
T,
|
|
202
|
-
|
|
202
|
+
c,
|
|
203
203
|
o
|
|
204
204
|
]);
|
|
205
205
|
return o("๐ RENDER END", {
|
|
206
206
|
renderCount: m.current,
|
|
207
|
-
willRenderChat: !!(
|
|
208
|
-
contextValueReady: !!
|
|
209
|
-
}), /* @__PURE__ */ e(
|
|
210
|
-
|
|
207
|
+
willRenderChat: !!(h && x),
|
|
208
|
+
contextValueReady: !!g
|
|
209
|
+
}), /* @__PURE__ */ e(qe.Provider, { value: g, children: h && x ? /* @__PURE__ */ e(
|
|
210
|
+
ht,
|
|
211
211
|
{
|
|
212
|
-
client:
|
|
212
|
+
client: h,
|
|
213
213
|
customClasses: {
|
|
214
214
|
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
|
|
215
215
|
},
|
|
216
216
|
children: t
|
|
217
217
|
}
|
|
218
218
|
) : t });
|
|
219
|
-
},
|
|
219
|
+
}, ns = () => pe(), rs = (t, s) => {
|
|
220
220
|
const n = new Date(
|
|
221
221
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
222
222
|
), l = new Date(
|
|
223
223
|
Date.UTC(s.getUTCFullYear(), s.getUTCMonth(), s.getUTCDate())
|
|
224
224
|
).getTime() - n.getTime();
|
|
225
225
|
return Math.floor(l / (1e3 * 60 * 60 * 24));
|
|
226
|
-
},
|
|
226
|
+
}, as = (t) => {
|
|
227
227
|
const s = /* @__PURE__ */ new Date();
|
|
228
228
|
if (Math.floor((s.getTime() - t.getTime()) / 1e3) < 60)
|
|
229
229
|
return "Just now";
|
|
230
|
-
const a =
|
|
230
|
+
const a = rs(t, s);
|
|
231
231
|
return a === 0 ? t.toLocaleTimeString([], {
|
|
232
232
|
hour: "numeric",
|
|
233
233
|
minute: "2-digit",
|
|
@@ -237,7 +237,7 @@ const Be = et({
|
|
|
237
237
|
day: "numeric",
|
|
238
238
|
year: "2-digit"
|
|
239
239
|
});
|
|
240
|
-
},
|
|
240
|
+
}, ze = [
|
|
241
241
|
"๐",
|
|
242
242
|
// Apple
|
|
243
243
|
"๐",
|
|
@@ -265,7 +265,7 @@ const Be = et({
|
|
|
265
265
|
"๐"
|
|
266
266
|
// Melon
|
|
267
267
|
];
|
|
268
|
-
function
|
|
268
|
+
function os(t) {
|
|
269
269
|
let s = 0;
|
|
270
270
|
for (let n = 0; n < t.length; n++) {
|
|
271
271
|
const a = t.charCodeAt(n);
|
|
@@ -273,18 +273,18 @@ function Jt(t) {
|
|
|
273
273
|
}
|
|
274
274
|
return Math.abs(s);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
const n =
|
|
278
|
-
return
|
|
276
|
+
function ls(t) {
|
|
277
|
+
const n = os(t) % ze.length;
|
|
278
|
+
return ze[n];
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const ne = ({
|
|
281
281
|
id: t,
|
|
282
282
|
image: s,
|
|
283
283
|
size: n = 40,
|
|
284
284
|
className: a,
|
|
285
285
|
shape: l = "squircle"
|
|
286
286
|
}) => {
|
|
287
|
-
const
|
|
287
|
+
const c = ls(t), u = n < 32 ? "text-xs" : n < 56 ? "text-sm" : n < 120 ? "text-lg" : "text-4xl", f = l === "circle" ? { borderRadius: "50%" } : {
|
|
288
288
|
borderRadius: "33%",
|
|
289
289
|
"corner-shape": "superellipse(1.3)"
|
|
290
290
|
};
|
|
@@ -295,7 +295,7 @@ const ee = ({
|
|
|
295
295
|
style: {
|
|
296
296
|
width: `${n}px`,
|
|
297
297
|
height: `${n}px`,
|
|
298
|
-
...
|
|
298
|
+
...f
|
|
299
299
|
},
|
|
300
300
|
children: s ? /* @__PURE__ */ e(
|
|
301
301
|
"img",
|
|
@@ -312,109 +312,110 @@ const ee = ({
|
|
|
312
312
|
"avatar-fallback flex h-full w-full items-center justify-center font-semibold bg-[#E6E5E3] select-none transition-colors",
|
|
313
313
|
u
|
|
314
314
|
),
|
|
315
|
-
children:
|
|
315
|
+
children: c
|
|
316
316
|
}
|
|
317
317
|
)
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
|
-
},
|
|
320
|
+
}, is = ({ size: t = 15 }) => /* @__PURE__ */ e(
|
|
321
321
|
"svg",
|
|
322
322
|
{
|
|
323
323
|
width: t,
|
|
324
324
|
height: t,
|
|
325
|
-
viewBox: "0 0
|
|
325
|
+
viewBox: "0 0 15 15",
|
|
326
326
|
fill: "none",
|
|
327
327
|
"aria-hidden": "true",
|
|
328
328
|
children: /* @__PURE__ */ e(
|
|
329
329
|
"path",
|
|
330
330
|
{
|
|
331
|
-
d: "
|
|
332
|
-
fill: "currentColor"
|
|
331
|
+
d: "M12.003 9a.985.985 0 0 1-.652.934l-3.223 1.191-1.188 3.226a.995.995 0 0 1-1.867 0l-1.195-3.226L.65 9.937a.995.995 0 0 1 0-1.867l3.227-1.195 1.187-3.226a.995.995 0 0 1 1.868 0l1.195 3.226 3.226 1.187a.99.99 0 0 1 .649.938m3-5.83a.52.52 0 0 1-.344.492l-1.702.63-.627 1.703a.525.525 0 0 1-.986 0l-.63-1.704-1.704-.627a.525.525 0 0 1 0-.986l1.703-.63.627-1.704a.526.526 0 0 1 .986 0l.631 1.703 1.704.627a.52.52 0 0 1 .342.495",
|
|
332
|
+
fill: "currentColor",
|
|
333
|
+
fillOpacity: 0.55
|
|
333
334
|
}
|
|
334
335
|
)
|
|
335
336
|
}
|
|
336
|
-
),
|
|
337
|
+
), cs = (t) => {
|
|
337
338
|
var s;
|
|
338
339
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_TIP";
|
|
339
|
-
},
|
|
340
|
+
}, ds = (t) => {
|
|
340
341
|
var s;
|
|
341
342
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_PAID";
|
|
342
|
-
},
|
|
343
|
+
}, Fe = (t) => {
|
|
343
344
|
var s;
|
|
344
345
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_CHATBOT";
|
|
345
|
-
},
|
|
346
|
+
}, We = (t) => cs(t) || ds(t), us = (t) => {
|
|
346
347
|
var s;
|
|
347
|
-
return
|
|
348
|
-
},
|
|
348
|
+
return We(t) && !((s = t.text) != null && s.trim());
|
|
349
|
+
}, Ie = ({
|
|
349
350
|
message: t,
|
|
350
351
|
standalone: s = !1,
|
|
351
352
|
isMyMessage: n = !1,
|
|
352
353
|
hasAttachment: a = !1
|
|
353
354
|
}) => {
|
|
354
355
|
var x;
|
|
355
|
-
const l =
|
|
356
|
-
if (!l && !
|
|
356
|
+
const l = We(t), c = Fe(t);
|
|
357
|
+
if (!l && !c)
|
|
357
358
|
return null;
|
|
358
359
|
if (l) {
|
|
359
|
-
const
|
|
360
|
-
if (!
|
|
361
|
-
const r = s ? "message-tip-standalone" : "message-tag message-tag--tip",
|
|
360
|
+
const y = (x = t.metadata) == null ? void 0 : x.amount_text;
|
|
361
|
+
if (!y) return null;
|
|
362
|
+
const r = s ? "message-tip-standalone" : "message-tag message-tag--tip", v = s ? `${y} tip` : `Delivered with ${y} tip`;
|
|
362
363
|
return /* @__PURE__ */ i("div", { className: r, children: [
|
|
363
|
-
/* @__PURE__ */ e(
|
|
364
|
-
/* @__PURE__ */ e("span", { children:
|
|
364
|
+
/* @__PURE__ */ e(Qt, { size: s ? 14 : 12 }),
|
|
365
|
+
/* @__PURE__ */ e("span", { children: v })
|
|
365
366
|
] });
|
|
366
367
|
}
|
|
367
|
-
const o = n && a, u = o ? "Sent with AI" : "Sent with DM Agent",
|
|
368
|
+
const o = n && a, u = o ? "Sent with AI" : "Sent with DM Agent", f = [
|
|
368
369
|
"message-chatbot-indicator",
|
|
369
370
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
370
371
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
371
|
-
].join(" "),
|
|
372
|
-
return /* @__PURE__ */ e("div", { className:
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
] }) : /* @__PURE__ */ i(
|
|
376
|
-
|
|
377
|
-
|
|
372
|
+
].join(" "), h = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: u }), b = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ e(is, { size: o ? 12 : 15 }) });
|
|
373
|
+
return /* @__PURE__ */ e("div", { className: f, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ i(me, { children: [
|
|
374
|
+
h,
|
|
375
|
+
b
|
|
376
|
+
] }) : /* @__PURE__ */ i(me, { children: [
|
|
377
|
+
b,
|
|
378
|
+
h
|
|
378
379
|
] }) });
|
|
379
|
-
},
|
|
380
|
+
}, Ye = B.memo(
|
|
380
381
|
({
|
|
381
382
|
channel: t,
|
|
382
383
|
selectedChannel: s,
|
|
383
384
|
onChannelSelect: n,
|
|
384
385
|
debug: a = !1,
|
|
385
386
|
unread: l,
|
|
386
|
-
renderMessagePreview:
|
|
387
|
+
renderMessagePreview: c
|
|
387
388
|
}) => {
|
|
388
|
-
var
|
|
389
|
+
var p, T, g, d, C, O;
|
|
389
390
|
const o = (s == null ? void 0 : s.id) === (t == null ? void 0 : t.id), u = () => {
|
|
390
391
|
t && n(t);
|
|
391
|
-
},
|
|
392
|
-
const R = _.key === "Enter" || _.key === " ",
|
|
393
|
-
!R ||
|
|
394
|
-
},
|
|
392
|
+
}, f = (_) => {
|
|
393
|
+
const R = _.key === "Enter" || _.key === " ", I = _.repeat;
|
|
394
|
+
!R || I || (_.preventDefault(), u());
|
|
395
|
+
}, b = Object.values(((p = t == null ? void 0 : t.state) == null ? void 0 : p.members) || {}).find(
|
|
395
396
|
(_) => {
|
|
396
|
-
var R,
|
|
397
|
-
return ((R = _.user) == null ? void 0 : R.id) && _.user.id !== ((
|
|
397
|
+
var R, I;
|
|
398
|
+
return ((R = _.user) == null ? void 0 : R.id) && _.user.id !== ((I = t == null ? void 0 : t._client) == null ? void 0 : I.userID);
|
|
398
399
|
}
|
|
399
|
-
), x = ((T =
|
|
400
|
+
), x = ((T = b == null ? void 0 : b.user) == null ? void 0 : T.name) || "Conversation", y = (g = b == null ? void 0 : b.user) == null ? void 0 : g.image, r = (C = (d = t == null ? void 0 : t.state) == null ? void 0 : d.messages) == null ? void 0 : C[t.state.messages.length - 1], E = (() => {
|
|
400
401
|
var R;
|
|
401
402
|
if (r != null && r.text) return r.text;
|
|
402
403
|
const _ = (R = r == null ? void 0 : r.attachments) == null ? void 0 : R[0];
|
|
403
404
|
return _ ? _.og_scrape_url ? _.og_scrape_url : _.type === "image" ? "๐ท Sent an image" : _.type === "video" ? "๐ฅ Sent a video" : _.type === "audio" ? "๐ต Sent audio" : _.type === "file" ? "๐ Sent a file" : "๐ Sent an attachment" : "No messages yet";
|
|
404
|
-
})(),
|
|
405
|
+
})(), w = r != null && r.created_at ? as(new Date(r.created_at)) : "", k = r ? Fe(r) : !1, N = c ? c(r, E) : `${k ? "โจ " : ""}${E}`, m = l ?? 0;
|
|
405
406
|
return a && console.log("๐บ [ChannelList] ๐ CHANNEL PREVIEW RENDER", {
|
|
406
407
|
channelId: t == null ? void 0 : t.id,
|
|
407
408
|
isSelected: o,
|
|
408
409
|
participantName: x,
|
|
409
410
|
unreadCount: m,
|
|
410
|
-
hasTimestamp: !!
|
|
411
|
+
hasTimestamp: !!w
|
|
411
412
|
}), /* @__PURE__ */ e(
|
|
412
413
|
"div",
|
|
413
414
|
{
|
|
414
415
|
role: "button",
|
|
415
416
|
tabIndex: 0,
|
|
416
417
|
onClick: u,
|
|
417
|
-
onKeyDown:
|
|
418
|
+
onKeyDown: f,
|
|
418
419
|
className: D(
|
|
419
420
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring",
|
|
420
421
|
{
|
|
@@ -424,11 +425,11 @@ const ee = ({
|
|
|
424
425
|
),
|
|
425
426
|
children: /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
|
|
426
427
|
/* @__PURE__ */ e(
|
|
427
|
-
|
|
428
|
+
ne,
|
|
428
429
|
{
|
|
429
|
-
id: ((
|
|
430
|
+
id: ((O = b == null ? void 0 : b.user) == null ? void 0 : O.id) || t.id || "unknown",
|
|
430
431
|
name: x,
|
|
431
|
-
image:
|
|
432
|
+
image: y,
|
|
432
433
|
size: 44,
|
|
433
434
|
className: "[&_.avatar-fallback]:group-hover:bg-[#eeeeee]"
|
|
434
435
|
}
|
|
@@ -445,7 +446,7 @@ const ee = ({
|
|
|
445
446
|
children: x
|
|
446
447
|
}
|
|
447
448
|
),
|
|
448
|
-
|
|
449
|
+
w && /* @__PURE__ */ e("span", { className: "text-xs text-stone flex-shrink-0", children: w })
|
|
449
450
|
] }),
|
|
450
451
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
451
452
|
/* @__PURE__ */ e("p", { className: "text-xs text-stone flex-1 line-clamp-1", children: N }),
|
|
@@ -457,34 +458,34 @@ const ee = ({
|
|
|
457
458
|
);
|
|
458
459
|
}
|
|
459
460
|
);
|
|
460
|
-
|
|
461
|
-
const
|
|
461
|
+
Ye.displayName = "CustomChannelPreview";
|
|
462
|
+
const Ze = B.memo(
|
|
462
463
|
({
|
|
463
464
|
onChannelSelect: t,
|
|
464
465
|
selectedChannel: s,
|
|
465
466
|
filters: n,
|
|
466
467
|
className: a,
|
|
467
468
|
customEmptyStateIndicator: l,
|
|
468
|
-
renderMessagePreview:
|
|
469
|
+
renderMessagePreview: c
|
|
469
470
|
}) => {
|
|
470
471
|
const o = B.useRef(0);
|
|
471
472
|
o.current++;
|
|
472
|
-
const { debug: u = !1 } =
|
|
473
|
+
const { debug: u = !1 } = pe();
|
|
473
474
|
u && console.log("๐บ [ChannelList] ๐ RENDER START", {
|
|
474
475
|
renderCount: o.current,
|
|
475
476
|
selectedChannelId: s == null ? void 0 : s.id,
|
|
476
477
|
filters: n
|
|
477
478
|
});
|
|
478
|
-
const
|
|
479
|
-
|
|
479
|
+
const f = B.useMemo(() => (b) => /* @__PURE__ */ e(
|
|
480
|
+
Ye,
|
|
480
481
|
{
|
|
481
|
-
...
|
|
482
|
+
...b,
|
|
482
483
|
selectedChannel: s,
|
|
483
484
|
onChannelSelect: t,
|
|
484
485
|
debug: u,
|
|
485
|
-
renderMessagePreview:
|
|
486
|
+
renderMessagePreview: c
|
|
486
487
|
}
|
|
487
|
-
), [s, t, u,
|
|
488
|
+
), [s, t, u, c]);
|
|
488
489
|
return /* @__PURE__ */ e(
|
|
489
490
|
"div",
|
|
490
491
|
{
|
|
@@ -493,12 +494,12 @@ const Ge = B.memo(
|
|
|
493
494
|
a
|
|
494
495
|
),
|
|
495
496
|
children: /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ e(
|
|
496
|
-
|
|
497
|
+
ft,
|
|
497
498
|
{
|
|
498
499
|
filters: n,
|
|
499
500
|
sort: { last_message_at: -1 },
|
|
500
501
|
options: { limit: 30 },
|
|
501
|
-
Preview:
|
|
502
|
+
Preview: f,
|
|
502
503
|
EmptyStateIndicator: l
|
|
503
504
|
},
|
|
504
505
|
JSON.stringify(n)
|
|
@@ -507,8 +508,8 @@ const Ge = B.memo(
|
|
|
507
508
|
);
|
|
508
509
|
}
|
|
509
510
|
);
|
|
510
|
-
|
|
511
|
-
const
|
|
511
|
+
Ze.displayName = "ChannelList";
|
|
512
|
+
const Ce = ({
|
|
512
513
|
variant: t = "default",
|
|
513
514
|
className: s,
|
|
514
515
|
children: n,
|
|
@@ -526,7 +527,7 @@ const fe = ({
|
|
|
526
527
|
children: n
|
|
527
528
|
}
|
|
528
529
|
);
|
|
529
|
-
function
|
|
530
|
+
function Xe({ label: t, className: s, children: n, ...a }) {
|
|
530
531
|
return /* @__PURE__ */ i(
|
|
531
532
|
"button",
|
|
532
533
|
{
|
|
@@ -547,41 +548,41 @@ function ze({ label: t, className: s, children: n, ...a }) {
|
|
|
547
548
|
}
|
|
548
549
|
);
|
|
549
550
|
}
|
|
550
|
-
function
|
|
551
|
-
return /* @__PURE__ */ e(
|
|
551
|
+
function Qe({ onClick: t }) {
|
|
552
|
+
return /* @__PURE__ */ e(Xe, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(Re, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
552
553
|
}
|
|
553
|
-
const
|
|
554
|
-
function
|
|
555
|
-
return t != null && t.length ? t.some((s) => s.type ===
|
|
554
|
+
const ms = (t) => /* @__PURE__ */ e(gt, { ...t, position: "center" }), ke = "vote_up", De = "vote_down";
|
|
555
|
+
function hs(t) {
|
|
556
|
+
return t != null && t.length ? t.some((s) => s.type === De) ? "down" : t.some((s) => s.type === ke) ? "up" : null : null;
|
|
556
557
|
}
|
|
557
|
-
function
|
|
558
|
-
const { channel: s } =
|
|
559
|
-
() =>
|
|
558
|
+
function fs(t) {
|
|
559
|
+
const { channel: s } = Te(), { client: n } = Ve("useMessageVote"), a = Me(
|
|
560
|
+
() => hs(t.own_reactions),
|
|
560
561
|
[t.own_reactions]
|
|
561
562
|
), l = L(async () => {
|
|
562
563
|
if (n != null && n.userID)
|
|
563
564
|
try {
|
|
564
|
-
a === "up" ? await s.deleteReaction(t.id,
|
|
565
|
+
a === "up" ? await s.deleteReaction(t.id, ke) : await s.sendReaction(
|
|
565
566
|
t.id,
|
|
566
|
-
{ type:
|
|
567
|
+
{ type: ke },
|
|
567
568
|
{ enforce_unique: !0, skip_push: !0 }
|
|
568
569
|
);
|
|
569
570
|
} catch {
|
|
570
571
|
}
|
|
571
|
-
}, [s, n == null ? void 0 : n.userID, t.id, a]),
|
|
572
|
+
}, [s, n == null ? void 0 : n.userID, t.id, a]), c = L(async () => {
|
|
572
573
|
if (n != null && n.userID)
|
|
573
574
|
try {
|
|
574
|
-
a === "down" ? await s.deleteReaction(t.id,
|
|
575
|
+
a === "down" ? await s.deleteReaction(t.id, De) : await s.sendReaction(
|
|
575
576
|
t.id,
|
|
576
|
-
{ type:
|
|
577
|
+
{ type: De },
|
|
577
578
|
{ enforce_unique: !0, skip_push: !0 }
|
|
578
579
|
);
|
|
579
580
|
} catch {
|
|
580
581
|
}
|
|
581
582
|
}, [s, n == null ? void 0 : n.userID, t.id, a]);
|
|
582
|
-
return { selected: a, voteUp: l, voteDown:
|
|
583
|
+
return { selected: a, voteUp: l, voteDown: c };
|
|
583
584
|
}
|
|
584
|
-
const
|
|
585
|
+
const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
585
586
|
"path",
|
|
586
587
|
{
|
|
587
588
|
d: "M4.667 7.333l2.666-6A1.333 1.333 0 018.667 2v2.667a.667.667 0 00.666.666h3.764a1.334 1.334 0 011.192 1.93l-2.333 4.666a1.333 1.333 0 01-1.193.738H4.667m0-5.334v5.334m0-5.334H2.667a1.333 1.333 0 00-1.334 1.334v2.666a1.333 1.333 0 001.334 1.334h2",
|
|
@@ -591,7 +592,7 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
591
592
|
strokeLinejoin: "round",
|
|
592
593
|
fill: t ? "currentColor" : "none"
|
|
593
594
|
}
|
|
594
|
-
) }),
|
|
595
|
+
) }), xs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
595
596
|
"path",
|
|
596
597
|
{
|
|
597
598
|
d: "M11.333 8.667l-2.666 6A1.333 1.333 0 017.333 14v-2.667a.667.667 0 00-.666-.666H2.903a1.334 1.334 0 01-1.192-1.93l2.333-4.666a1.333 1.333 0 011.193-.738h6.096m0 5.334V3.333m0 5.334h2a1.333 1.333 0 001.334-1.334V4.667a1.333 1.333 0 00-1.334-1.334h-2",
|
|
@@ -601,7 +602,7 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
601
602
|
strokeLinejoin: "round",
|
|
602
603
|
fill: t ? "currentColor" : "none"
|
|
603
604
|
}
|
|
604
|
-
) }),
|
|
605
|
+
) }), bs = ({
|
|
605
606
|
selected: t,
|
|
606
607
|
onVoteUp: s,
|
|
607
608
|
onVoteDown: n
|
|
@@ -614,7 +615,7 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
614
615
|
onClick: s,
|
|
615
616
|
"aria-label": "Helpful",
|
|
616
617
|
"aria-pressed": t === "up",
|
|
617
|
-
children: /* @__PURE__ */ e(
|
|
618
|
+
children: /* @__PURE__ */ e(gs, { filled: t === "up" })
|
|
618
619
|
}
|
|
619
620
|
),
|
|
620
621
|
/* @__PURE__ */ e(
|
|
@@ -625,92 +626,92 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
625
626
|
onClick: n,
|
|
626
627
|
"aria-label": "Not helpful",
|
|
627
628
|
"aria-pressed": t === "down",
|
|
628
|
-
children: /* @__PURE__ */ e(
|
|
629
|
+
children: /* @__PURE__ */ e(xs, { filled: t === "down" })
|
|
629
630
|
}
|
|
630
631
|
)
|
|
631
|
-
] }),
|
|
632
|
-
var
|
|
632
|
+
] }), Cs = (t) => {
|
|
633
|
+
var ge, te;
|
|
633
634
|
const {
|
|
634
635
|
additionalMessageInputProps: s,
|
|
635
636
|
chatbotVotingEnabled: n,
|
|
636
637
|
editing: a,
|
|
637
638
|
endOfGroup: l,
|
|
638
|
-
firstOfGroup:
|
|
639
|
+
firstOfGroup: c,
|
|
639
640
|
groupedByUser: o,
|
|
640
641
|
handleAction: u,
|
|
641
|
-
handleOpenThread:
|
|
642
|
-
handleRetry:
|
|
643
|
-
highlighted:
|
|
642
|
+
handleOpenThread: f,
|
|
643
|
+
handleRetry: h,
|
|
644
|
+
highlighted: b,
|
|
644
645
|
isMessageAIGenerated: x,
|
|
645
|
-
isMyMessage:
|
|
646
|
+
isMyMessage: y,
|
|
646
647
|
message: r,
|
|
647
|
-
renderText:
|
|
648
|
-
threadList:
|
|
649
|
-
} = t, { client:
|
|
650
|
-
Attachment:
|
|
651
|
-
EditMessageModal:
|
|
652
|
-
MessageBlocked:
|
|
653
|
-
MessageBouncePrompt: _ =
|
|
654
|
-
MessageDeleted: R =
|
|
655
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
656
|
-
MessageRepliesCountButton:
|
|
657
|
-
ReminderNotification:
|
|
658
|
-
StreamedMessageText:
|
|
648
|
+
renderText: v,
|
|
649
|
+
threadList: E
|
|
650
|
+
} = t, { client: w } = Ve("CustomMessage"), [k, N] = M(!1), m = bt(r.id), { selected: p, voteUp: T, voteDown: g } = fs(r), {
|
|
651
|
+
Attachment: d = Nt,
|
|
652
|
+
EditMessageModal: C = yt,
|
|
653
|
+
MessageBlocked: O = vt,
|
|
654
|
+
MessageBouncePrompt: _ = wt,
|
|
655
|
+
MessageDeleted: R = pt,
|
|
656
|
+
MessageIsThreadReplyInChannelButtonIndicator: I = Et,
|
|
657
|
+
MessageRepliesCountButton: Y = _t,
|
|
658
|
+
ReminderNotification: V = It,
|
|
659
|
+
StreamedMessageText: re = St,
|
|
659
660
|
PinIndicator: J
|
|
660
|
-
} =
|
|
661
|
+
} = Ct("CustomMessage"), ae = Mt(r), oe = kt(r), ue = Me(
|
|
661
662
|
() => x == null ? void 0 : x(r),
|
|
662
663
|
[x, r]
|
|
663
|
-
), j =
|
|
664
|
+
), j = Me(
|
|
664
665
|
() => !r.shared_location && !r.attachments ? [] : r.shared_location ? [r.shared_location, ...r.attachments ?? []] : r.attachments,
|
|
665
666
|
[r]
|
|
666
667
|
);
|
|
667
|
-
if (
|
|
668
|
+
if (Dt(r))
|
|
668
669
|
return null;
|
|
669
670
|
if (r.deleted_at || r.type === "deleted")
|
|
670
671
|
return /* @__PURE__ */ e(R, { message: r });
|
|
671
|
-
if (
|
|
672
|
-
return /* @__PURE__ */ e(
|
|
673
|
-
const
|
|
672
|
+
if (Tt(r))
|
|
673
|
+
return /* @__PURE__ */ e(O, {});
|
|
674
|
+
const K = !E && !!r.reply_count, A = !E && r.show_in_channel && r.parent_id, U = r.status === "failed" && ((ge = r.error) == null ? void 0 : ge.status) !== 403, q = Rt(r);
|
|
674
675
|
let F;
|
|
675
|
-
U ? F = () =>
|
|
676
|
-
const
|
|
676
|
+
U ? F = () => h(r) : q && (F = () => N(!0));
|
|
677
|
+
const z = y(), he = D(
|
|
677
678
|
"str-chat__message str-chat__message-simple",
|
|
678
679
|
`str-chat__message--${r.type}`,
|
|
679
680
|
`str-chat__message--${r.status}`,
|
|
680
|
-
|
|
681
|
+
z ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
681
682
|
r.text ? "str-chat__message--has-text" : "has-no-text",
|
|
682
683
|
{
|
|
683
|
-
"str-chat__message--has-attachment":
|
|
684
|
-
"str-chat__message--highlighted":
|
|
684
|
+
"str-chat__message--has-attachment": ae,
|
|
685
|
+
"str-chat__message--highlighted": b,
|
|
685
686
|
"str-chat__message--pinned pinned-message": r.pinned,
|
|
686
|
-
"str-chat__message--with-reactions":
|
|
687
|
-
"str-chat__message-send-can-be-retried": (r == null ? void 0 : r.status) === "failed" && ((
|
|
688
|
-
"str-chat__message-with-thread-link":
|
|
687
|
+
"str-chat__message--with-reactions": oe,
|
|
688
|
+
"str-chat__message-send-can-be-retried": (r == null ? void 0 : r.status) === "failed" && ((te = r == null ? void 0 : r.error) == null ? void 0 : te.status) !== 403,
|
|
689
|
+
"str-chat__message-with-thread-link": K || A,
|
|
689
690
|
"str-chat__virtual-message__wrapper--end": l,
|
|
690
|
-
"str-chat__virtual-message__wrapper--first":
|
|
691
|
+
"str-chat__virtual-message__wrapper--first": c,
|
|
691
692
|
"str-chat__virtual-message__wrapper--group": o
|
|
692
693
|
}
|
|
693
|
-
),
|
|
694
|
-
return /* @__PURE__ */ i(
|
|
694
|
+
), Q = r.poll_id && w.polls.fromState(r.poll_id), le = us(r), ee = Fe(r), ie = !!(j != null && j.length && !r.quoted_message), fe = ee && z && ie;
|
|
695
|
+
return /* @__PURE__ */ i(me, { children: [
|
|
695
696
|
a && /* @__PURE__ */ e(
|
|
696
|
-
|
|
697
|
+
C,
|
|
697
698
|
{
|
|
698
699
|
additionalMessageInputProps: s
|
|
699
700
|
}
|
|
700
701
|
),
|
|
701
702
|
k && /* @__PURE__ */ e(
|
|
702
|
-
|
|
703
|
+
Ft,
|
|
703
704
|
{
|
|
704
705
|
MessageBouncePrompt: _,
|
|
705
706
|
onClose: () => N(!1),
|
|
706
707
|
open: k
|
|
707
708
|
}
|
|
708
709
|
),
|
|
709
|
-
/* @__PURE__ */ i("div", { className:
|
|
710
|
+
/* @__PURE__ */ i("div", { className: he, children: [
|
|
710
711
|
J && /* @__PURE__ */ e(J, {}),
|
|
711
|
-
!!m && /* @__PURE__ */ e(
|
|
712
|
+
!!m && /* @__PURE__ */ e(V, { reminder: m }),
|
|
712
713
|
r.user && /* @__PURE__ */ e(
|
|
713
|
-
|
|
714
|
+
ne,
|
|
714
715
|
{
|
|
715
716
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
716
717
|
id: r.user.id,
|
|
@@ -722,7 +723,7 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
722
723
|
"div",
|
|
723
724
|
{
|
|
724
725
|
className: D("str-chat__message-inner", {
|
|
725
|
-
"str-chat__simple-message--error-failed": U ||
|
|
726
|
+
"str-chat__simple-message--error-failed": U || q
|
|
726
727
|
}),
|
|
727
728
|
"data-testid": "message-inner",
|
|
728
729
|
onClick: F,
|
|
@@ -735,76 +736,76 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
735
736
|
marginInlineEnd: 0,
|
|
736
737
|
marginInlineStart: 0
|
|
737
738
|
},
|
|
738
|
-
children:
|
|
739
|
+
children: le ? (
|
|
739
740
|
/* Tip-only messages render as a standalone bubble */
|
|
740
|
-
/* @__PURE__ */ e(
|
|
741
|
+
/* @__PURE__ */ e(Ie, { message: r, standalone: !0 })
|
|
741
742
|
) : /* @__PURE__ */ i("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
742
743
|
/* @__PURE__ */ i("div", { className: "str-chat__message-bubble", children: [
|
|
743
|
-
|
|
744
|
-
|
|
744
|
+
ee && !fe && /* @__PURE__ */ e(
|
|
745
|
+
Ie,
|
|
745
746
|
{
|
|
746
747
|
message: r,
|
|
747
|
-
hasAttachment:
|
|
748
|
-
isMyMessage:
|
|
748
|
+
hasAttachment: ie,
|
|
749
|
+
isMyMessage: z
|
|
749
750
|
}
|
|
750
751
|
),
|
|
751
|
-
|
|
752
|
+
Q && /* @__PURE__ */ e(Lt, { poll: Q }),
|
|
752
753
|
j != null && j.length && !r.quoted_message ? /* @__PURE__ */ e(
|
|
753
|
-
|
|
754
|
+
d,
|
|
754
755
|
{
|
|
755
756
|
actionHandler: u,
|
|
756
757
|
attachments: j
|
|
757
758
|
}
|
|
758
759
|
) : null,
|
|
759
|
-
|
|
760
|
-
|
|
760
|
+
ue ? /* @__PURE__ */ e(
|
|
761
|
+
re,
|
|
761
762
|
{
|
|
762
763
|
message: r,
|
|
763
|
-
renderText:
|
|
764
|
+
renderText: v
|
|
764
765
|
}
|
|
765
|
-
) : /* @__PURE__ */ e(
|
|
766
|
-
/* @__PURE__ */ e(
|
|
766
|
+
) : /* @__PURE__ */ e(At, { message: r, renderText: v }),
|
|
767
|
+
/* @__PURE__ */ e(Ut, {})
|
|
767
768
|
] }),
|
|
768
|
-
(!
|
|
769
|
-
|
|
769
|
+
(!ee || fe) && /* @__PURE__ */ e(
|
|
770
|
+
Ie,
|
|
770
771
|
{
|
|
771
772
|
message: r,
|
|
772
|
-
hasAttachment:
|
|
773
|
-
isMyMessage:
|
|
773
|
+
hasAttachment: ie,
|
|
774
|
+
isMyMessage: z
|
|
774
775
|
}
|
|
775
776
|
),
|
|
776
|
-
n &&
|
|
777
|
-
|
|
777
|
+
n && ee && /* @__PURE__ */ e(
|
|
778
|
+
bs,
|
|
778
779
|
{
|
|
779
|
-
selected:
|
|
780
|
+
selected: p,
|
|
780
781
|
onVoteUp: T,
|
|
781
|
-
onVoteDown:
|
|
782
|
+
onVoteDown: g
|
|
782
783
|
}
|
|
783
784
|
)
|
|
784
785
|
] })
|
|
785
786
|
}
|
|
786
787
|
),
|
|
787
|
-
|
|
788
|
-
|
|
788
|
+
K && /* @__PURE__ */ e(
|
|
789
|
+
Y,
|
|
789
790
|
{
|
|
790
|
-
onClick:
|
|
791
|
+
onClick: f,
|
|
791
792
|
reply_count: r.reply_count
|
|
792
793
|
}
|
|
793
794
|
),
|
|
794
|
-
|
|
795
|
+
A && /* @__PURE__ */ e(I, {})
|
|
795
796
|
] }, r.id)
|
|
796
797
|
] });
|
|
797
|
-
},
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
),
|
|
801
|
-
const s =
|
|
802
|
-
return /* @__PURE__ */ e(
|
|
803
|
-
},
|
|
798
|
+
}, Ns = B.memo(
|
|
799
|
+
Cs,
|
|
800
|
+
xt
|
|
801
|
+
), ys = (t) => {
|
|
802
|
+
const s = Pt("CustomMessage");
|
|
803
|
+
return /* @__PURE__ */ e(Ns, { ...s, ...t });
|
|
804
|
+
}, vs = (t) => ({
|
|
804
805
|
linkPreviews: Array.from(t.previews.values()).filter(
|
|
805
|
-
(s) =>
|
|
806
|
+
(s) => $e.previewIsLoaded(s) || $e.previewIsLoading(s)
|
|
806
807
|
)
|
|
807
|
-
}),
|
|
808
|
+
}), ws = ({
|
|
808
809
|
link: t,
|
|
809
810
|
onDismiss: s
|
|
810
811
|
}) => {
|
|
@@ -834,7 +835,7 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
834
835
|
},
|
|
835
836
|
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",
|
|
836
837
|
"aria-label": "Close link preview",
|
|
837
|
-
children: /* @__PURE__ */ e(
|
|
838
|
+
children: /* @__PURE__ */ e(Re, { className: "size-4 text-black/90" })
|
|
838
839
|
}
|
|
839
840
|
),
|
|
840
841
|
/* @__PURE__ */ i("div", { className: "p-2", children: [
|
|
@@ -844,32 +845,32 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
844
845
|
]
|
|
845
846
|
}
|
|
846
847
|
);
|
|
847
|
-
},
|
|
848
|
-
const { linkPreviewsManager: t } =
|
|
848
|
+
}, ps = () => {
|
|
849
|
+
const { linkPreviewsManager: t } = Ot(), { linkPreviews: s } = Bt(
|
|
849
850
|
t.state,
|
|
850
|
-
|
|
851
|
+
vs
|
|
851
852
|
), n = (l) => {
|
|
852
853
|
t.dismissPreview(l);
|
|
853
854
|
};
|
|
854
855
|
return s.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: s.map((l) => /* @__PURE__ */ e(
|
|
855
|
-
|
|
856
|
+
ws,
|
|
856
857
|
{
|
|
857
858
|
link: l,
|
|
858
859
|
onDismiss: n
|
|
859
860
|
},
|
|
860
861
|
l.og_scrape_url
|
|
861
862
|
)) }) : null;
|
|
862
|
-
},
|
|
863
|
-
const { handleSubmit: t } =
|
|
864
|
-
return /* @__PURE__ */ i(
|
|
865
|
-
/* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(
|
|
863
|
+
}, Es = () => {
|
|
864
|
+
const { handleSubmit: t } = $t(), s = zt();
|
|
865
|
+
return /* @__PURE__ */ i(me, { children: [
|
|
866
|
+
/* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(Gt, {}) }),
|
|
866
867
|
/* @__PURE__ */ i("div", { className: "central-container 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: [
|
|
867
|
-
/* @__PURE__ */ e(
|
|
868
|
-
/* @__PURE__ */ e(
|
|
869
|
-
/* @__PURE__ */ e(
|
|
868
|
+
/* @__PURE__ */ e(Ht, {}),
|
|
869
|
+
/* @__PURE__ */ e(ps, {}),
|
|
870
|
+
/* @__PURE__ */ e(Vt, {}),
|
|
870
871
|
/* @__PURE__ */ i("div", { className: "flex", children: [
|
|
871
872
|
/* @__PURE__ */ e("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ e(
|
|
872
|
-
|
|
873
|
+
qt,
|
|
873
874
|
{
|
|
874
875
|
className: "w-full resize-none outline-none leading-6",
|
|
875
876
|
autoFocus: !0,
|
|
@@ -885,36 +886,36 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
885
886
|
disabled: !s,
|
|
886
887
|
onClick: t,
|
|
887
888
|
type: "button",
|
|
888
|
-
children: /* @__PURE__ */ e(
|
|
889
|
+
children: /* @__PURE__ */ e(Jt, { className: "size-4" })
|
|
889
890
|
}
|
|
890
891
|
)
|
|
891
892
|
] })
|
|
892
893
|
] })
|
|
893
894
|
] });
|
|
894
|
-
},
|
|
895
|
+
}, _s = ({
|
|
895
896
|
renderActions: t
|
|
896
897
|
}) => /* @__PURE__ */ i("div", { className: "message-input flex items-center gap-2 p-4", children: [
|
|
897
898
|
t && (t == null ? void 0 : t()),
|
|
898
|
-
/* @__PURE__ */ e(
|
|
899
|
-
] }),
|
|
899
|
+
/* @__PURE__ */ e(jt, { Input: Es })
|
|
900
|
+
] }), Is = [
|
|
900
901
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
901
902
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
902
|
-
],
|
|
903
|
+
], Ss = {
|
|
903
904
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
904
905
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
905
|
-
},
|
|
906
|
+
}, Ge = (t) => Is.includes(t), Ms = (t) => {
|
|
906
907
|
var a;
|
|
907
908
|
const s = (a = t.metadata) == null ? void 0 : a.custom_type;
|
|
908
|
-
if (
|
|
909
|
+
if (Ge(s))
|
|
909
910
|
return s;
|
|
910
911
|
const n = t.dm_agent_system_type;
|
|
911
|
-
if (
|
|
912
|
+
if (Ge(n))
|
|
912
913
|
return n;
|
|
913
|
-
},
|
|
914
|
+
}, ks = (t) => {
|
|
914
915
|
var a;
|
|
915
|
-
const s = t.message.hide_date === !0, n =
|
|
916
|
+
const s = t.message.hide_date === !0, n = Ms(t.message);
|
|
916
917
|
if (n) {
|
|
917
|
-
const l = ((a = t.message.text) == null ? void 0 : a.trim()) ||
|
|
918
|
+
const l = ((a = t.message.text) == null ? void 0 : a.trim()) || Ss[n];
|
|
918
919
|
return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
919
920
|
/* @__PURE__ */ i(
|
|
920
921
|
"div",
|
|
@@ -924,7 +925,7 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
924
925
|
"data-dm-agent-system-type": n,
|
|
925
926
|
children: [
|
|
926
927
|
/* @__PURE__ */ e(
|
|
927
|
-
|
|
928
|
+
Kt,
|
|
928
929
|
{
|
|
929
930
|
size: 16,
|
|
930
931
|
weight: "regular",
|
|
@@ -936,7 +937,7 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
936
937
|
]
|
|
937
938
|
}
|
|
938
939
|
),
|
|
939
|
-
!s && /* @__PURE__ */ e(
|
|
940
|
+
!s && /* @__PURE__ */ e(Ae, { message: t.message })
|
|
940
941
|
] });
|
|
941
942
|
}
|
|
942
943
|
return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -945,9 +946,9 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
945
946
|
/* @__PURE__ */ e("p", { children: t.message.text }),
|
|
946
947
|
/* @__PURE__ */ e("div", { className: "str-chat__message--system__line" })
|
|
947
948
|
] }),
|
|
948
|
-
!s && /* @__PURE__ */ e(
|
|
949
|
+
!s && /* @__PURE__ */ e(Ae, { message: t.message })
|
|
949
950
|
] });
|
|
950
|
-
},
|
|
951
|
+
}, Ds = () => null, Ts = ({ className: t, message: s }) => /* @__PURE__ */ i(
|
|
951
952
|
"div",
|
|
952
953
|
{
|
|
953
954
|
className: D("flex items-center justify-center h-full", t),
|
|
@@ -990,41 +991,41 @@ const as = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
990
991
|
s && /* @__PURE__ */ e("span", { className: "text-stone", children: s })
|
|
991
992
|
]
|
|
992
993
|
}
|
|
993
|
-
),
|
|
994
|
-
/* @__PURE__ */ e(
|
|
994
|
+
), ve = B.memo(() => /* @__PURE__ */ e("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
995
|
+
/* @__PURE__ */ e(Ts, { className: "w-6 h-6" }),
|
|
995
996
|
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
996
997
|
] }) }));
|
|
997
|
-
|
|
998
|
-
const
|
|
998
|
+
ve.displayName = "LoadingState";
|
|
999
|
+
const Rs = ({
|
|
999
1000
|
onBack: t,
|
|
1000
1001
|
showBackButton: s,
|
|
1001
1002
|
onShowInfo: n,
|
|
1002
1003
|
canShowInfo: a,
|
|
1003
1004
|
showStarButton: l = !1
|
|
1004
1005
|
}) => {
|
|
1005
|
-
var
|
|
1006
|
-
const { channel:
|
|
1006
|
+
var y, r, v, E, w, k;
|
|
1007
|
+
const { channel: c } = Te(), o = B.useMemo(() => Object.values(c.state.members || {}).find(
|
|
1007
1008
|
(m) => {
|
|
1008
|
-
var
|
|
1009
|
-
return ((
|
|
1009
|
+
var p;
|
|
1010
|
+
return ((p = m.user) == null ? void 0 : p.id) && m.user.id !== c._client.userID;
|
|
1010
1011
|
}
|
|
1011
|
-
), [
|
|
1012
|
-
!!((
|
|
1012
|
+
), [c._client.userID, c.state.members]), u = ((y = o == null ? void 0 : o.user) == null ? void 0 : y.name) || ((r = o == null ? void 0 : o.user) == null ? void 0 : r.id) || "Unknown member", f = (v = o == null ? void 0 : o.user) == null ? void 0 : v.image, [h, b] = M(
|
|
1013
|
+
!!((E = c.state.membership) != null && E.pinned_at)
|
|
1013
1014
|
);
|
|
1014
|
-
|
|
1015
|
+
X(() => {
|
|
1015
1016
|
const N = (m) => {
|
|
1016
|
-
var
|
|
1017
|
-
|
|
1018
|
-
m != null && m.member ? !!m.member.pinned_at : !!((
|
|
1017
|
+
var p;
|
|
1018
|
+
b(
|
|
1019
|
+
m != null && m.member ? !!m.member.pinned_at : !!((p = c.state.membership) != null && p.pinned_at)
|
|
1019
1020
|
);
|
|
1020
1021
|
};
|
|
1021
|
-
return
|
|
1022
|
-
|
|
1022
|
+
return c.on("member.updated", N), () => {
|
|
1023
|
+
c.off("member.updated", N);
|
|
1023
1024
|
};
|
|
1024
|
-
}, [
|
|
1025
|
+
}, [c]);
|
|
1025
1026
|
const x = async () => {
|
|
1026
1027
|
try {
|
|
1027
|
-
|
|
1028
|
+
h ? await c.unpin() : await c.pin();
|
|
1028
1029
|
} catch (N) {
|
|
1029
1030
|
console.error(
|
|
1030
1031
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
@@ -1044,16 +1045,16 @@ const ys = ({
|
|
|
1044
1045
|
}),
|
|
1045
1046
|
type: "button",
|
|
1046
1047
|
"aria-label": "Back to conversations",
|
|
1047
|
-
children: /* @__PURE__ */ e(
|
|
1048
|
+
children: /* @__PURE__ */ e(Ue, { className: "size-5 text-black/90" })
|
|
1048
1049
|
}
|
|
1049
1050
|
) }),
|
|
1050
1051
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
1051
1052
|
/* @__PURE__ */ e(
|
|
1052
|
-
|
|
1053
|
+
ne,
|
|
1053
1054
|
{
|
|
1054
|
-
id: ((
|
|
1055
|
+
id: ((w = o == null ? void 0 : o.user) == null ? void 0 : w.id) || c.id || "unknown",
|
|
1055
1056
|
name: u,
|
|
1056
|
-
image:
|
|
1057
|
+
image: f,
|
|
1057
1058
|
size: 40
|
|
1058
1059
|
}
|
|
1059
1060
|
),
|
|
@@ -1066,15 +1067,15 @@ const ys = ({
|
|
|
1066
1067
|
className: "size-10 rounded-full bg-[#F1F0EE] flex items-center justify-center",
|
|
1067
1068
|
onClick: x,
|
|
1068
1069
|
type: "button",
|
|
1069
|
-
"aria-label":
|
|
1070
|
+
"aria-label": h ? "Unstar conversation" : "Star conversation",
|
|
1070
1071
|
children: /* @__PURE__ */ e(
|
|
1071
|
-
|
|
1072
|
+
Pe,
|
|
1072
1073
|
{
|
|
1073
1074
|
className: D("size-5", {
|
|
1074
|
-
"text-yellow-600":
|
|
1075
|
-
"text-black/90": !
|
|
1075
|
+
"text-yellow-600": h,
|
|
1076
|
+
"text-black/90": !h
|
|
1076
1077
|
}),
|
|
1077
|
-
weight:
|
|
1078
|
+
weight: h ? "duotone" : "regular"
|
|
1078
1079
|
}
|
|
1079
1080
|
)
|
|
1080
1081
|
}
|
|
@@ -1086,7 +1087,7 @@ const ys = ({
|
|
|
1086
1087
|
onClick: n,
|
|
1087
1088
|
type: "button",
|
|
1088
1089
|
"aria-label": "Show info",
|
|
1089
|
-
children: /* @__PURE__ */ e(
|
|
1090
|
+
children: /* @__PURE__ */ e(Oe, { className: "size-5 text-black/90" })
|
|
1090
1091
|
}
|
|
1091
1092
|
)
|
|
1092
1093
|
] })
|
|
@@ -1100,15 +1101,15 @@ const ys = ({
|
|
|
1100
1101
|
onClick: t,
|
|
1101
1102
|
className: "size-10 rounded-full bg-[#F1F0EE] flex items-center justify-center",
|
|
1102
1103
|
"aria-label": "Back to conversations",
|
|
1103
|
-
children: /* @__PURE__ */ e(
|
|
1104
|
+
children: /* @__PURE__ */ e(Ue, { className: "size-5 text-black/90" })
|
|
1104
1105
|
}
|
|
1105
1106
|
),
|
|
1106
1107
|
/* @__PURE__ */ e(
|
|
1107
|
-
|
|
1108
|
+
ne,
|
|
1108
1109
|
{
|
|
1109
|
-
id: ((k = o == null ? void 0 : o.user) == null ? void 0 : k.id) ||
|
|
1110
|
+
id: ((k = o == null ? void 0 : o.user) == null ? void 0 : k.id) || c.id || "unknown",
|
|
1110
1111
|
name: u,
|
|
1111
|
-
image:
|
|
1112
|
+
image: f,
|
|
1112
1113
|
size: 40
|
|
1113
1114
|
}
|
|
1114
1115
|
),
|
|
@@ -1121,15 +1122,15 @@ const ys = ({
|
|
|
1121
1122
|
className: "size-10 rounded-full bg-[#F1F0EE] flex items-center justify-center",
|
|
1122
1123
|
onClick: x,
|
|
1123
1124
|
type: "button",
|
|
1124
|
-
"aria-label":
|
|
1125
|
+
"aria-label": h ? "Unstar conversation" : "Star conversation",
|
|
1125
1126
|
children: /* @__PURE__ */ e(
|
|
1126
|
-
|
|
1127
|
+
Pe,
|
|
1127
1128
|
{
|
|
1128
1129
|
className: D("size-5", {
|
|
1129
|
-
"text-yellow-600":
|
|
1130
|
-
"text-black/90": !
|
|
1130
|
+
"text-yellow-600": h,
|
|
1131
|
+
"text-black/90": !h
|
|
1131
1132
|
}),
|
|
1132
|
-
weight:
|
|
1133
|
+
weight: h ? "duotone" : "regular"
|
|
1133
1134
|
}
|
|
1134
1135
|
)
|
|
1135
1136
|
}
|
|
@@ -1141,94 +1142,94 @@ const ys = ({
|
|
|
1141
1142
|
onClick: n,
|
|
1142
1143
|
type: "button",
|
|
1143
1144
|
"aria-label": "Show info",
|
|
1144
|
-
children: /* @__PURE__ */ e(
|
|
1145
|
+
children: /* @__PURE__ */ e(Oe, { className: "size-5 text-black/90" })
|
|
1145
1146
|
}
|
|
1146
1147
|
)
|
|
1147
1148
|
] })
|
|
1148
1149
|
] })
|
|
1149
1150
|
] });
|
|
1150
|
-
},
|
|
1151
|
+
}, Fs = ({
|
|
1151
1152
|
dialogRef: t,
|
|
1152
1153
|
onClose: s,
|
|
1153
1154
|
participant: n,
|
|
1154
1155
|
channel: a,
|
|
1155
1156
|
followerStatusLabel: l,
|
|
1156
|
-
onLeaveConversation:
|
|
1157
|
+
onLeaveConversation: c,
|
|
1157
1158
|
onBlockParticipant: o,
|
|
1158
1159
|
showDeleteConversation: u = !0,
|
|
1159
|
-
onDeleteConversationClick:
|
|
1160
|
-
onBlockParticipantClick:
|
|
1161
|
-
onReportParticipantClick:
|
|
1160
|
+
onDeleteConversationClick: f,
|
|
1161
|
+
onBlockParticipantClick: h,
|
|
1162
|
+
onReportParticipantClick: b,
|
|
1162
1163
|
customChannelActions: x
|
|
1163
1164
|
}) => {
|
|
1164
|
-
var
|
|
1165
|
-
const { service:
|
|
1166
|
-
var
|
|
1167
|
-
if (!(!
|
|
1165
|
+
var re, J, ae, oe, ue, j, K;
|
|
1166
|
+
const { service: y, debug: r } = pe(), [v, E] = M(!1), [w, k] = M(!1), [N, m] = M(!1), p = L(async () => {
|
|
1167
|
+
var A;
|
|
1168
|
+
if (!(!y || !((A = n == null ? void 0 : n.user) != null && A.id)))
|
|
1168
1169
|
try {
|
|
1169
|
-
const
|
|
1170
|
+
const q = (await y.getBlockedUsers()).some(
|
|
1170
1171
|
(F) => {
|
|
1171
|
-
var
|
|
1172
|
-
return F.blocked_user_id === ((
|
|
1172
|
+
var z;
|
|
1173
|
+
return F.blocked_user_id === ((z = n == null ? void 0 : n.user) == null ? void 0 : z.id);
|
|
1173
1174
|
}
|
|
1174
1175
|
);
|
|
1175
|
-
|
|
1176
|
+
E(q);
|
|
1176
1177
|
} catch (U) {
|
|
1177
1178
|
console.error(
|
|
1178
1179
|
"[ChannelInfoDialog] Failed to check blocked status:",
|
|
1179
1180
|
U
|
|
1180
1181
|
);
|
|
1181
1182
|
}
|
|
1182
|
-
}, [
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
}, [
|
|
1183
|
+
}, [y, (re = n == null ? void 0 : n.user) == null ? void 0 : re.id]);
|
|
1184
|
+
X(() => {
|
|
1185
|
+
p();
|
|
1186
|
+
}, [p]);
|
|
1186
1187
|
const T = async () => {
|
|
1187
|
-
var
|
|
1188
|
-
if (!
|
|
1189
|
-
|
|
1188
|
+
var A;
|
|
1189
|
+
if (!w) {
|
|
1190
|
+
f == null || f(), r && console.log("[ChannelInfoDialog] Leave conversation", a.cid), k(!0);
|
|
1190
1191
|
try {
|
|
1191
|
-
const U = ((
|
|
1192
|
-
await a.hide(U, !1),
|
|
1192
|
+
const U = ((A = a._client) == null ? void 0 : A.userID) ?? null;
|
|
1193
|
+
await a.hide(U, !1), c && await c(a), s();
|
|
1193
1194
|
} catch (U) {
|
|
1194
1195
|
console.error("[ChannelInfoDialog] Failed to leave conversation", U);
|
|
1195
1196
|
} finally {
|
|
1196
1197
|
k(!1);
|
|
1197
1198
|
}
|
|
1198
1199
|
}
|
|
1199
|
-
},
|
|
1200
|
-
var
|
|
1201
|
-
if (!(N || !
|
|
1202
|
-
|
|
1200
|
+
}, g = async () => {
|
|
1201
|
+
var A, U, q;
|
|
1202
|
+
if (!(N || !y)) {
|
|
1203
|
+
h == null || h(), r && console.log("[ChannelInfoDialog] Block member", (A = n == null ? void 0 : n.user) == null ? void 0 : A.id), m(!0);
|
|
1203
1204
|
try {
|
|
1204
|
-
await
|
|
1205
|
+
await y.blockUser((U = n == null ? void 0 : n.user) == null ? void 0 : U.id), o && await o((q = n == null ? void 0 : n.user) == null ? void 0 : q.id), s();
|
|
1205
1206
|
} catch (F) {
|
|
1206
1207
|
console.error("[ChannelInfoDialog] Failed to block member", F);
|
|
1207
1208
|
} finally {
|
|
1208
1209
|
m(!1);
|
|
1209
1210
|
}
|
|
1210
1211
|
}
|
|
1211
|
-
},
|
|
1212
|
-
var
|
|
1213
|
-
if (!(N || !
|
|
1214
|
-
|
|
1212
|
+
}, d = async () => {
|
|
1213
|
+
var A, U, q;
|
|
1214
|
+
if (!(N || !y)) {
|
|
1215
|
+
h == null || h(), r && console.log("[ChannelInfoDialog] Unblock member", (A = n == null ? void 0 : n.user) == null ? void 0 : A.id), m(!0);
|
|
1215
1216
|
try {
|
|
1216
|
-
await
|
|
1217
|
+
await y.unBlockUser((U = n == null ? void 0 : n.user) == null ? void 0 : U.id), o && await o((q = n == null ? void 0 : n.user) == null ? void 0 : q.id), s();
|
|
1217
1218
|
} catch (F) {
|
|
1218
1219
|
console.error("[ChannelInfoDialog] Failed to unblock member", F);
|
|
1219
1220
|
} finally {
|
|
1220
1221
|
m(!1);
|
|
1221
1222
|
}
|
|
1222
1223
|
}
|
|
1223
|
-
},
|
|
1224
|
-
|
|
1224
|
+
}, C = () => {
|
|
1225
|
+
b == null || b(), s(), window.open(
|
|
1225
1226
|
"https://linktr.ee/s/about/trust-center/report",
|
|
1226
1227
|
"_blank",
|
|
1227
1228
|
"noopener,noreferrer"
|
|
1228
1229
|
);
|
|
1229
1230
|
};
|
|
1230
1231
|
if (!n) return null;
|
|
1231
|
-
const
|
|
1232
|
+
const O = ((J = n.user) == null ? void 0 : J.name) || ((ae = n.user) == null ? void 0 : ae.id) || "Unknown member", _ = (oe = n.user) == null ? void 0 : oe.image, R = (ue = n.user) == null ? void 0 : ue.email, I = (j = n.user) == null ? void 0 : j.username, Y = R || (I ? `linktr.ee/${I}` : void 0), V = ((K = n.user) == null ? void 0 : K.id) || "unknown";
|
|
1232
1233
|
return (
|
|
1233
1234
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
1234
1235
|
/* @__PURE__ */ e(
|
|
@@ -1237,13 +1238,13 @@ const ys = ({
|
|
|
1237
1238
|
ref: t,
|
|
1238
1239
|
className: "mes-dialog group",
|
|
1239
1240
|
onClose: s,
|
|
1240
|
-
onClick: (
|
|
1241
|
-
|
|
1241
|
+
onClick: (A) => {
|
|
1242
|
+
A.target === t.current && s();
|
|
1242
1243
|
},
|
|
1243
1244
|
children: /* @__PURE__ */ i("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-none transition-shadow duration-200 group-open:shadow-max-elevation-light", children: [
|
|
1244
1245
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
|
|
1245
1246
|
/* @__PURE__ */ e("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
|
|
1246
|
-
/* @__PURE__ */ e(
|
|
1247
|
+
/* @__PURE__ */ e(Qe, { onClick: s })
|
|
1247
1248
|
] }),
|
|
1248
1249
|
/* @__PURE__ */ i("div", { className: "flex-1 px-2 overflow-y-auto w-full", children: [
|
|
1249
1250
|
/* @__PURE__ */ e(
|
|
@@ -1253,18 +1254,18 @@ const ys = ({
|
|
|
1253
1254
|
style: { backgroundColor: "#FBFAF9" },
|
|
1254
1255
|
children: /* @__PURE__ */ i("div", { className: "flex items-center gap-3 w-full", children: [
|
|
1255
1256
|
/* @__PURE__ */ e(
|
|
1256
|
-
|
|
1257
|
+
ne,
|
|
1257
1258
|
{
|
|
1258
|
-
id:
|
|
1259
|
-
name:
|
|
1259
|
+
id: V,
|
|
1260
|
+
name: O,
|
|
1260
1261
|
image: _,
|
|
1261
1262
|
size: 88,
|
|
1262
1263
|
shape: "circle"
|
|
1263
1264
|
}
|
|
1264
1265
|
),
|
|
1265
1266
|
/* @__PURE__ */ i("div", { className: "flex flex-col min-w-0 flex-1", children: [
|
|
1266
|
-
/* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children:
|
|
1267
|
-
|
|
1267
|
+
/* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children: O }),
|
|
1268
|
+
Y && /* @__PURE__ */ e("p", { className: "truncate text-sm text-[#00000055]", children: Y }),
|
|
1268
1269
|
l && /* @__PURE__ */ e(
|
|
1269
1270
|
"span",
|
|
1270
1271
|
{
|
|
@@ -1285,42 +1286,42 @@ const ys = ({
|
|
|
1285
1286
|
),
|
|
1286
1287
|
/* @__PURE__ */ i("ul", { className: "flex flex-col gap-2 mt-2", children: [
|
|
1287
1288
|
u && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
1288
|
-
|
|
1289
|
+
Ce,
|
|
1289
1290
|
{
|
|
1290
1291
|
onClick: T,
|
|
1291
|
-
disabled:
|
|
1292
|
-
"aria-busy":
|
|
1292
|
+
disabled: w,
|
|
1293
|
+
"aria-busy": w,
|
|
1293
1294
|
children: [
|
|
1294
|
-
|
|
1295
|
+
w ? /* @__PURE__ */ e(Ne, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(es, { className: "h-5 w-5" }),
|
|
1295
1296
|
/* @__PURE__ */ e("span", { children: "Delete Conversation" })
|
|
1296
1297
|
]
|
|
1297
1298
|
}
|
|
1298
1299
|
) }),
|
|
1299
|
-
/* @__PURE__ */ e("li", { children:
|
|
1300
|
-
|
|
1300
|
+
/* @__PURE__ */ e("li", { children: v ? /* @__PURE__ */ i(
|
|
1301
|
+
Ce,
|
|
1301
1302
|
{
|
|
1302
|
-
onClick:
|
|
1303
|
+
onClick: d,
|
|
1303
1304
|
disabled: N,
|
|
1304
1305
|
"aria-busy": N,
|
|
1305
1306
|
children: [
|
|
1306
|
-
N ? /* @__PURE__ */ e(
|
|
1307
|
+
N ? /* @__PURE__ */ e(Ne, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Be, { className: "h-5 w-5" }),
|
|
1307
1308
|
/* @__PURE__ */ e("span", { children: "Unblock" })
|
|
1308
1309
|
]
|
|
1309
1310
|
}
|
|
1310
1311
|
) : /* @__PURE__ */ i(
|
|
1311
|
-
|
|
1312
|
+
Ce,
|
|
1312
1313
|
{
|
|
1313
|
-
onClick:
|
|
1314
|
+
onClick: g,
|
|
1314
1315
|
disabled: N,
|
|
1315
1316
|
"aria-busy": N,
|
|
1316
1317
|
children: [
|
|
1317
|
-
N ? /* @__PURE__ */ e(
|
|
1318
|
+
N ? /* @__PURE__ */ e(Ne, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Be, { className: "h-5 w-5" }),
|
|
1318
1319
|
/* @__PURE__ */ e("span", { children: "Block" })
|
|
1319
1320
|
]
|
|
1320
1321
|
}
|
|
1321
1322
|
) }),
|
|
1322
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
1323
|
-
/* @__PURE__ */ e(
|
|
1323
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(Ce, { variant: "danger", onClick: C, children: [
|
|
1324
|
+
/* @__PURE__ */ e(ts, { className: "h-5 w-5" }),
|
|
1324
1325
|
/* @__PURE__ */ e("span", { children: "Report" })
|
|
1325
1326
|
] }) }),
|
|
1326
1327
|
x
|
|
@@ -1330,27 +1331,27 @@ const ys = ({
|
|
|
1330
1331
|
}
|
|
1331
1332
|
)
|
|
1332
1333
|
);
|
|
1333
|
-
},
|
|
1334
|
+
}, Ls = ({
|
|
1334
1335
|
onBack: t,
|
|
1335
1336
|
showBackButton: s,
|
|
1336
1337
|
renderMessageInputActions: n,
|
|
1337
1338
|
onLeaveConversation: a,
|
|
1338
1339
|
onBlockParticipant: l,
|
|
1339
|
-
showDeleteConversation:
|
|
1340
|
+
showDeleteConversation: c = !0,
|
|
1340
1341
|
onDeleteConversationClick: o,
|
|
1341
1342
|
onBlockParticipantClick: u,
|
|
1342
|
-
onReportParticipantClick:
|
|
1343
|
-
showStarButton:
|
|
1344
|
-
chatbotVotingEnabled:
|
|
1343
|
+
onReportParticipantClick: f,
|
|
1344
|
+
showStarButton: h = !1,
|
|
1345
|
+
chatbotVotingEnabled: b = !1,
|
|
1345
1346
|
renderChannelBanner: x,
|
|
1346
|
-
customChannelActions:
|
|
1347
|
+
customChannelActions: y
|
|
1347
1348
|
}) => {
|
|
1348
|
-
const { channel: r } =
|
|
1349
|
-
(
|
|
1349
|
+
const { channel: r } = Te(), v = H(null), E = B.useMemo(() => Object.values(r.state.members || {}).find(
|
|
1350
|
+
(p) => {
|
|
1350
1351
|
var T;
|
|
1351
|
-
return ((T =
|
|
1352
|
+
return ((T = p.user) == null ? void 0 : T.id) && p.user.id !== r._client.userID;
|
|
1352
1353
|
}
|
|
1353
|
-
), [r._client.userID, r.state.members]),
|
|
1354
|
+
), [r._client.userID, r.state.members]), w = B.useMemo(() => {
|
|
1354
1355
|
const m = r.data ?? {};
|
|
1355
1356
|
if (m.followerStatus)
|
|
1356
1357
|
return String(m.followerStatus);
|
|
@@ -1358,32 +1359,32 @@ const ys = ({
|
|
|
1358
1359
|
return m.isFollower ? "Subscribed to you" : "Not subscribed";
|
|
1359
1360
|
}, [r.data]), k = L(() => {
|
|
1360
1361
|
var m;
|
|
1361
|
-
(m =
|
|
1362
|
+
(m = v.current) == null || m.showModal();
|
|
1362
1363
|
}, []), N = L(() => {
|
|
1363
1364
|
var m;
|
|
1364
|
-
(m =
|
|
1365
|
+
(m = v.current) == null || m.close();
|
|
1365
1366
|
}, []);
|
|
1366
|
-
return /* @__PURE__ */ i(
|
|
1367
|
+
return /* @__PURE__ */ i(me, { children: [
|
|
1367
1368
|
/* @__PURE__ */ e(
|
|
1368
|
-
|
|
1369
|
+
Yt,
|
|
1369
1370
|
{
|
|
1370
1371
|
overrides: {
|
|
1371
|
-
Message: (m) => /* @__PURE__ */ e(
|
|
1372
|
+
Message: (m) => /* @__PURE__ */ e(ys, { ...m, chatbotVotingEnabled: b })
|
|
1372
1373
|
},
|
|
1373
|
-
children: /* @__PURE__ */ i(
|
|
1374
|
+
children: /* @__PURE__ */ i(Zt, { children: [
|
|
1374
1375
|
/* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(
|
|
1375
|
-
|
|
1376
|
+
Rs,
|
|
1376
1377
|
{
|
|
1377
1378
|
onBack: t,
|
|
1378
1379
|
showBackButton: s,
|
|
1379
1380
|
onShowInfo: k,
|
|
1380
|
-
canShowInfo: !!
|
|
1381
|
-
showStarButton:
|
|
1381
|
+
canShowInfo: !!E,
|
|
1382
|
+
showStarButton: h
|
|
1382
1383
|
}
|
|
1383
1384
|
) }),
|
|
1384
1385
|
x == null ? void 0 : x(),
|
|
1385
1386
|
/* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden relative", children: /* @__PURE__ */ e(
|
|
1386
|
-
|
|
1387
|
+
Xt,
|
|
1387
1388
|
{
|
|
1388
1389
|
hideDeletedMessages: !0,
|
|
1389
1390
|
hideNewMessageSeparator: !1,
|
|
@@ -1391,7 +1392,7 @@ const ys = ({
|
|
|
1391
1392
|
}
|
|
1392
1393
|
) }),
|
|
1393
1394
|
/* @__PURE__ */ e(
|
|
1394
|
-
|
|
1395
|
+
_s,
|
|
1395
1396
|
{
|
|
1396
1397
|
renderActions: () => n == null ? void 0 : n(r)
|
|
1397
1398
|
}
|
|
@@ -1400,51 +1401,51 @@ const ys = ({
|
|
|
1400
1401
|
}
|
|
1401
1402
|
),
|
|
1402
1403
|
/* @__PURE__ */ e(
|
|
1403
|
-
|
|
1404
|
+
Fs,
|
|
1404
1405
|
{
|
|
1405
|
-
dialogRef:
|
|
1406
|
+
dialogRef: v,
|
|
1406
1407
|
onClose: N,
|
|
1407
|
-
participant:
|
|
1408
|
+
participant: E,
|
|
1408
1409
|
channel: r,
|
|
1409
|
-
followerStatusLabel:
|
|
1410
|
+
followerStatusLabel: w,
|
|
1410
1411
|
onLeaveConversation: a,
|
|
1411
1412
|
onBlockParticipant: l,
|
|
1412
|
-
showDeleteConversation:
|
|
1413
|
+
showDeleteConversation: c,
|
|
1413
1414
|
onDeleteConversationClick: o,
|
|
1414
1415
|
onBlockParticipantClick: u,
|
|
1415
|
-
onReportParticipantClick:
|
|
1416
|
-
customChannelActions:
|
|
1416
|
+
onReportParticipantClick: f,
|
|
1417
|
+
customChannelActions: y
|
|
1417
1418
|
}
|
|
1418
1419
|
)
|
|
1419
1420
|
] });
|
|
1420
|
-
},
|
|
1421
|
+
}, Je = B.memo(
|
|
1421
1422
|
({
|
|
1422
1423
|
channel: t,
|
|
1423
1424
|
onBack: s,
|
|
1424
1425
|
showBackButton: n = !1,
|
|
1425
1426
|
renderMessageInputActions: a,
|
|
1426
1427
|
onLeaveConversation: l,
|
|
1427
|
-
onBlockParticipant:
|
|
1428
|
+
onBlockParticipant: c,
|
|
1428
1429
|
className: o,
|
|
1429
|
-
CustomChannelEmptyState: u =
|
|
1430
|
-
showDeleteConversation:
|
|
1431
|
-
onDeleteConversationClick:
|
|
1432
|
-
onBlockParticipantClick:
|
|
1430
|
+
CustomChannelEmptyState: u = Ds,
|
|
1431
|
+
showDeleteConversation: f = !0,
|
|
1432
|
+
onDeleteConversationClick: h,
|
|
1433
|
+
onBlockParticipantClick: b,
|
|
1433
1434
|
onReportParticipantClick: x,
|
|
1434
|
-
dmAgentEnabled:
|
|
1435
|
+
dmAgentEnabled: y,
|
|
1435
1436
|
messageMetadata: r,
|
|
1436
|
-
onMessageSent:
|
|
1437
|
-
showStarButton:
|
|
1438
|
-
chatbotVotingEnabled:
|
|
1437
|
+
onMessageSent: v,
|
|
1438
|
+
showStarButton: E = !1,
|
|
1439
|
+
chatbotVotingEnabled: w = !1,
|
|
1439
1440
|
renderChannelBanner: k,
|
|
1440
1441
|
customChannelActions: N
|
|
1441
1442
|
}) => {
|
|
1442
1443
|
const m = L(
|
|
1443
|
-
async (
|
|
1444
|
-
var
|
|
1445
|
-
const
|
|
1444
|
+
async (p, T, g) => {
|
|
1445
|
+
var I;
|
|
1446
|
+
const d = ((I = t.data) == null ? void 0 : I.chatbot_paused) === !0, C = y && !d, O = {
|
|
1446
1447
|
...T,
|
|
1447
|
-
...
|
|
1448
|
+
...C && { silent: !0 },
|
|
1448
1449
|
...r && {
|
|
1449
1450
|
metadata: {
|
|
1450
1451
|
...T.metadata ?? {},
|
|
@@ -1452,12 +1453,12 @@ const ys = ({
|
|
|
1452
1453
|
}
|
|
1453
1454
|
}
|
|
1454
1455
|
}, _ = {
|
|
1455
|
-
...
|
|
1456
|
-
...
|
|
1457
|
-
}, R = await t.sendMessage(
|
|
1458
|
-
return
|
|
1456
|
+
...g,
|
|
1457
|
+
...C && { skip_push: !0 }
|
|
1458
|
+
}, R = await t.sendMessage(O, _);
|
|
1459
|
+
return v == null || v(R), R;
|
|
1459
1460
|
},
|
|
1460
|
-
[t,
|
|
1461
|
+
[t, y, r, v]
|
|
1461
1462
|
);
|
|
1462
1463
|
return /* @__PURE__ */ e(
|
|
1463
1464
|
"div",
|
|
@@ -1467,29 +1468,29 @@ const ys = ({
|
|
|
1467
1468
|
o
|
|
1468
1469
|
),
|
|
1469
1470
|
children: /* @__PURE__ */ e(
|
|
1470
|
-
|
|
1471
|
+
Wt,
|
|
1471
1472
|
{
|
|
1472
1473
|
channel: t,
|
|
1473
|
-
MessageSystem:
|
|
1474
|
+
MessageSystem: ks,
|
|
1474
1475
|
EmptyStateIndicator: u,
|
|
1475
|
-
LoadingIndicator:
|
|
1476
|
-
DateSeparator:
|
|
1476
|
+
LoadingIndicator: ve,
|
|
1477
|
+
DateSeparator: ms,
|
|
1477
1478
|
doSendMessageRequest: m,
|
|
1478
1479
|
children: /* @__PURE__ */ e(
|
|
1479
|
-
|
|
1480
|
+
Ls,
|
|
1480
1481
|
{
|
|
1481
1482
|
onBack: s,
|
|
1482
1483
|
showBackButton: n,
|
|
1483
1484
|
renderMessageInputActions: a,
|
|
1484
1485
|
onLeaveConversation: l,
|
|
1485
|
-
onBlockParticipant:
|
|
1486
|
+
onBlockParticipant: c,
|
|
1486
1487
|
CustomChannelEmptyState: u,
|
|
1487
|
-
showDeleteConversation:
|
|
1488
|
-
onDeleteConversationClick:
|
|
1489
|
-
onBlockParticipantClick:
|
|
1488
|
+
showDeleteConversation: f,
|
|
1489
|
+
onDeleteConversationClick: h,
|
|
1490
|
+
onBlockParticipantClick: b,
|
|
1490
1491
|
onReportParticipantClick: x,
|
|
1491
|
-
showStarButton:
|
|
1492
|
-
chatbotVotingEnabled:
|
|
1492
|
+
showStarButton: E,
|
|
1493
|
+
chatbotVotingEnabled: w,
|
|
1493
1494
|
renderChannelBanner: k,
|
|
1494
1495
|
customChannelActions: N
|
|
1495
1496
|
}
|
|
@@ -1500,16 +1501,16 @@ const ys = ({
|
|
|
1500
1501
|
);
|
|
1501
1502
|
}
|
|
1502
1503
|
);
|
|
1503
|
-
|
|
1504
|
-
function
|
|
1504
|
+
Je.displayName = "ChannelView";
|
|
1505
|
+
function As({
|
|
1505
1506
|
searchQuery: t,
|
|
1506
1507
|
setSearchQuery: s,
|
|
1507
1508
|
placeholder: n
|
|
1508
1509
|
}) {
|
|
1509
|
-
const a =
|
|
1510
|
+
const a = H(null);
|
|
1510
1511
|
return /* @__PURE__ */ i("div", { className: "relative", children: [
|
|
1511
1512
|
/* @__PURE__ */ e(
|
|
1512
|
-
|
|
1513
|
+
ss,
|
|
1513
1514
|
{
|
|
1514
1515
|
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-stone",
|
|
1515
1516
|
weight: "bold"
|
|
@@ -1527,7 +1528,7 @@ function _s({
|
|
|
1527
1528
|
}
|
|
1528
1529
|
),
|
|
1529
1530
|
t && /* @__PURE__ */ e(
|
|
1530
|
-
|
|
1531
|
+
Xe,
|
|
1531
1532
|
{
|
|
1532
1533
|
label: "Clear search",
|
|
1533
1534
|
onClick: () => {
|
|
@@ -1535,24 +1536,24 @@ function _s({
|
|
|
1535
1536
|
s(""), (l = a.current) == null || l.focus();
|
|
1536
1537
|
},
|
|
1537
1538
|
className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 text-stone hover:text-charcoal",
|
|
1538
|
-
children: /* @__PURE__ */ e(
|
|
1539
|
+
children: /* @__PURE__ */ e(Re, { className: "h-4 w-4", weight: "bold" })
|
|
1539
1540
|
}
|
|
1540
1541
|
)
|
|
1541
1542
|
] });
|
|
1542
1543
|
}
|
|
1543
|
-
const
|
|
1544
|
+
const Us = ({
|
|
1544
1545
|
participantSource: t,
|
|
1545
1546
|
onSelectParticipant: s,
|
|
1546
1547
|
onClose: n,
|
|
1547
1548
|
existingParticipantIds: a = /* @__PURE__ */ new Set(),
|
|
1548
1549
|
participantLabel: l = "participants",
|
|
1549
|
-
searchPlaceholder:
|
|
1550
|
+
searchPlaceholder: c = "Search participants...",
|
|
1550
1551
|
className: o
|
|
1551
1552
|
}) => {
|
|
1552
|
-
const { debug: u } =
|
|
1553
|
+
const { debug: u } = pe(), [f, h] = M(""), [b, x] = M([]), [y, r] = M(!1), [v, E] = M(null), [w, k] = M(
|
|
1553
1554
|
null
|
|
1554
|
-
), N =
|
|
1555
|
-
|
|
1555
|
+
), N = H(!1);
|
|
1556
|
+
X(() => {
|
|
1556
1557
|
if (t.loading) {
|
|
1557
1558
|
u && console.log(
|
|
1558
1559
|
"[ParticipantPicker] Waiting for participant source to finish loading..."
|
|
@@ -1561,50 +1562,50 @@ const Is = ({
|
|
|
1561
1562
|
}
|
|
1562
1563
|
if (N.current) return;
|
|
1563
1564
|
(async () => {
|
|
1564
|
-
u && console.log("[ParticipantPicker] Loading initial participants..."), r(!0),
|
|
1565
|
+
u && console.log("[ParticipantPicker] Loading initial participants..."), r(!0), E(null);
|
|
1565
1566
|
try {
|
|
1566
|
-
const
|
|
1567
|
+
const d = await t.loadParticipants({
|
|
1567
1568
|
search: "",
|
|
1568
1569
|
// Load all participants initially
|
|
1569
1570
|
limit: 100
|
|
1570
1571
|
});
|
|
1571
|
-
x(
|
|
1572
|
+
x(d.participants), N.current = !0, u && console.log(
|
|
1572
1573
|
"[ParticipantPicker] Participants loaded successfully:",
|
|
1573
|
-
|
|
1574
|
+
d.participants.length
|
|
1574
1575
|
);
|
|
1575
|
-
} catch (
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1576
|
+
} catch (d) {
|
|
1577
|
+
const C = d instanceof Error ? d.message : "Failed to load participants";
|
|
1578
|
+
E(C), console.error("[ParticipantPicker] Failed to load participants:", d);
|
|
1578
1579
|
} finally {
|
|
1579
1580
|
r(!1);
|
|
1580
1581
|
}
|
|
1581
1582
|
})();
|
|
1582
1583
|
}, [t.loading, u]);
|
|
1583
|
-
const m =
|
|
1584
|
-
var
|
|
1585
|
-
if (!
|
|
1586
|
-
const
|
|
1587
|
-
return
|
|
1588
|
-
}),
|
|
1589
|
-
async (
|
|
1590
|
-
if (!
|
|
1591
|
-
k(
|
|
1584
|
+
const m = b.filter((g) => !a.has(g.id)).filter((g) => {
|
|
1585
|
+
var C;
|
|
1586
|
+
if (!f) return !0;
|
|
1587
|
+
const d = f.toLowerCase();
|
|
1588
|
+
return g.name.toLowerCase().includes(d) || ((C = g.email) == null ? void 0 : C.toLowerCase().includes(d)) || !1;
|
|
1589
|
+
}), p = L(
|
|
1590
|
+
async (g) => {
|
|
1591
|
+
if (!w) {
|
|
1592
|
+
k(g.id);
|
|
1592
1593
|
try {
|
|
1593
|
-
await s(
|
|
1594
|
-
} catch (
|
|
1595
|
-
console.error("[ParticipantPicker] Failed to start chat:",
|
|
1594
|
+
await s(g);
|
|
1595
|
+
} catch (d) {
|
|
1596
|
+
console.error("[ParticipantPicker] Failed to start chat:", d), k(null);
|
|
1596
1597
|
}
|
|
1597
1598
|
}
|
|
1598
1599
|
},
|
|
1599
|
-
[s,
|
|
1600
|
-
), T = (
|
|
1601
|
-
(
|
|
1600
|
+
[s, w]
|
|
1601
|
+
), T = (g, d) => {
|
|
1602
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), p(d));
|
|
1602
1603
|
};
|
|
1603
1604
|
return /* @__PURE__ */ i("div", { className: D("flex flex-col h-full", o), children: [
|
|
1604
1605
|
/* @__PURE__ */ i("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: [
|
|
1605
1606
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
|
|
1606
1607
|
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-charcoal", children: "Start a new Conversation" }),
|
|
1607
|
-
/* @__PURE__ */ e(
|
|
1608
|
+
/* @__PURE__ */ e(Qe, { onClick: n })
|
|
1608
1609
|
] }),
|
|
1609
1610
|
/* @__PURE__ */ i("p", { className: "text-xs text-stone mb-3", children: [
|
|
1610
1611
|
"Select a ",
|
|
@@ -1615,21 +1616,21 @@ const Is = ({
|
|
|
1615
1616
|
t.totalCount !== void 0 && ` โข ${t.totalCount} ${l} total`
|
|
1616
1617
|
] }),
|
|
1617
1618
|
/* @__PURE__ */ e(
|
|
1618
|
-
|
|
1619
|
+
As,
|
|
1619
1620
|
{
|
|
1620
|
-
searchQuery:
|
|
1621
|
-
setSearchQuery:
|
|
1622
|
-
placeholder:
|
|
1621
|
+
searchQuery: f,
|
|
1622
|
+
setSearchQuery: h,
|
|
1623
|
+
placeholder: c
|
|
1623
1624
|
}
|
|
1624
1625
|
)
|
|
1625
1626
|
] }),
|
|
1626
|
-
|
|
1627
|
+
v && /* @__PURE__ */ i("div", { className: "p-4 text-sm text-danger bg-danger-alt", children: [
|
|
1627
1628
|
"Error loading ",
|
|
1628
1629
|
l,
|
|
1629
1630
|
": ",
|
|
1630
|
-
|
|
1631
|
+
v
|
|
1631
1632
|
] }),
|
|
1632
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children:
|
|
1633
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children: y && m.length === 0 ? /* @__PURE__ */ e("div", { className: "h-32 flex items-center justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
|
|
1633
1634
|
/* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
1634
1635
|
/* @__PURE__ */ i("span", { className: "text-sm text-stone", children: [
|
|
1635
1636
|
"Loading ",
|
|
@@ -1637,47 +1638,47 @@ const Is = ({
|
|
|
1637
1638
|
"..."
|
|
1638
1639
|
] })
|
|
1639
1640
|
] }) }) : m.length === 0 ? /* @__PURE__ */ i("div", { className: "p-6 text-center", children: [
|
|
1640
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(
|
|
1641
|
-
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children:
|
|
1642
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-stone", children:
|
|
1641
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(je, { className: "h-8 w-8 text-charcoal" }) }),
|
|
1642
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: f ? `No ${l} found` : b.length > 0 ? `Already chatting with all ${l}` : `No ${l} yet` }),
|
|
1643
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-stone", children: f ? "Try a different search term" : b.length > 0 ? `You have existing conversations with all your ${l}` : `${l.charAt(0).toUpperCase() + l.slice(1)} will appear here` })
|
|
1643
1644
|
] }) : /* @__PURE__ */ i("ul", { className: "space-y-0", children: [
|
|
1644
|
-
m.map((
|
|
1645
|
-
const
|
|
1645
|
+
m.map((g) => {
|
|
1646
|
+
const d = g.name || g.email || g.id, C = g.email && g.name ? g.email : g.phone;
|
|
1646
1647
|
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
1647
1648
|
"button",
|
|
1648
1649
|
{
|
|
1649
1650
|
type: "button",
|
|
1650
|
-
onClick: () =>
|
|
1651
|
-
onKeyDown: (
|
|
1651
|
+
onClick: () => p(g),
|
|
1652
|
+
onKeyDown: (O) => T(O, g),
|
|
1652
1653
|
className: "w-full px-4 py-3 hover:bg-sand transition-colors border-b border-sand text-left focus:outline-none focus:ring-2 focus:ring-black",
|
|
1653
1654
|
children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
1654
1655
|
/* @__PURE__ */ i("div", { className: "flex items-center space-x-3 flex-1 min-w-0", children: [
|
|
1655
1656
|
/* @__PURE__ */ e(
|
|
1656
|
-
|
|
1657
|
+
ne,
|
|
1657
1658
|
{
|
|
1658
|
-
id:
|
|
1659
|
-
name:
|
|
1660
|
-
image:
|
|
1659
|
+
id: g.id,
|
|
1660
|
+
name: d,
|
|
1661
|
+
image: g.image,
|
|
1661
1662
|
size: 40
|
|
1662
1663
|
}
|
|
1663
1664
|
),
|
|
1664
1665
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
|
|
1665
|
-
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-charcoal truncate", children:
|
|
1666
|
-
|
|
1666
|
+
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-charcoal truncate", children: d }),
|
|
1667
|
+
C && /* @__PURE__ */ e("p", { className: "text-xs text-stone truncate", children: C })
|
|
1667
1668
|
] })
|
|
1668
1669
|
] }),
|
|
1669
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children:
|
|
1670
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: w === g.id ? /* @__PURE__ */ e(Ne, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ e(je, { className: "h-5 w-5 text-stone" }) })
|
|
1670
1671
|
] })
|
|
1671
1672
|
}
|
|
1672
|
-
) },
|
|
1673
|
+
) }, g.id);
|
|
1673
1674
|
}),
|
|
1674
|
-
|
|
1675
|
+
y && /* @__PURE__ */ e("li", { className: "p-4 flex justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
|
|
1675
1676
|
/* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
1676
1677
|
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading more..." })
|
|
1677
1678
|
] }) })
|
|
1678
1679
|
] }) })
|
|
1679
1680
|
] });
|
|
1680
|
-
},
|
|
1681
|
+
}, Ps = ({ className: t }) => /* @__PURE__ */ i(
|
|
1681
1682
|
"svg",
|
|
1682
1683
|
{
|
|
1683
1684
|
width: "140",
|
|
@@ -1811,17 +1812,17 @@ const Is = ({
|
|
|
1811
1812
|
] })
|
|
1812
1813
|
]
|
|
1813
1814
|
}
|
|
1814
|
-
),
|
|
1815
|
+
), Ke = B.memo(
|
|
1815
1816
|
({ hasChannels: t, channelsLoaded: s }) => /* @__PURE__ */ e("div", { className: "messaging-empty-state flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center max-w-sm text-center", children: [
|
|
1816
|
-
/* @__PURE__ */ e(
|
|
1817
|
+
/* @__PURE__ */ e(Ps, {}),
|
|
1817
1818
|
s && !t && /* @__PURE__ */ i("div", { className: "mt-8", children: [
|
|
1818
1819
|
/* @__PURE__ */ e("h2", { className: "font-medium text-black text-[18px] mb-2", children: "Your inbox is empty" }),
|
|
1819
1820
|
/* @__PURE__ */ e("p", { className: "text-[#676B5F] text-sm mb-6", children: "Share with your followers to start receiving messages" })
|
|
1820
1821
|
] })
|
|
1821
1822
|
] }) })
|
|
1822
1823
|
);
|
|
1823
|
-
|
|
1824
|
-
const
|
|
1824
|
+
Ke.displayName = "EmptyState";
|
|
1825
|
+
const ye = B.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ i("div", { className: "text-center max-w-sm", children: [
|
|
1825
1826
|
/* @__PURE__ */ e("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ e("span", { className: "text-4xl", children: "โ ๏ธ" }) }),
|
|
1826
1827
|
/* @__PURE__ */ e("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
1827
1828
|
/* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t }),
|
|
@@ -1835,216 +1836,321 @@ const xe = B.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { clas
|
|
|
1835
1836
|
}
|
|
1836
1837
|
)
|
|
1837
1838
|
] }) }));
|
|
1838
|
-
|
|
1839
|
-
const Os = ({
|
|
1839
|
+
ye.displayName = "ErrorState";
|
|
1840
|
+
const Os = 2, Bs = 300, Se = 1e4, js = async (t) => await new Promise((s) => setTimeout(s, t)), He = (t, s) => {
|
|
1841
|
+
if (!t) return;
|
|
1842
|
+
const n = Object.entries(t).find(
|
|
1843
|
+
([a]) => a.toLowerCase() === s.toLowerCase()
|
|
1844
|
+
);
|
|
1845
|
+
return n ? n[1] : void 0;
|
|
1846
|
+
}, we = (t) => {
|
|
1847
|
+
const s = Number(t);
|
|
1848
|
+
return Number.isFinite(s) ? s : null;
|
|
1849
|
+
}, et = (t) => {
|
|
1850
|
+
if (!t || typeof t != "object") return null;
|
|
1851
|
+
const s = t.response;
|
|
1852
|
+
return !s || typeof s != "object" ? null : s;
|
|
1853
|
+
}, $s = (t) => {
|
|
1854
|
+
const s = et(t);
|
|
1855
|
+
if ((s == null ? void 0 : s.status) === 429) return !0;
|
|
1856
|
+
if (t && typeof t == "object") {
|
|
1857
|
+
if (we(t.code) === 9 || we(t.status) === 429) return !0;
|
|
1858
|
+
const l = t.message;
|
|
1859
|
+
if (typeof l == "string") {
|
|
1860
|
+
const c = l.toLowerCase();
|
|
1861
|
+
if (c.includes("too many requests") || c.includes("rate limit"))
|
|
1862
|
+
return !0;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
return !1;
|
|
1866
|
+
}, zs = (t, s, n = Date.now()) => {
|
|
1867
|
+
var h;
|
|
1868
|
+
const a = (h = et(t)) == null ? void 0 : h.headers, l = He(a, "retry-after"), c = we(
|
|
1869
|
+
Array.isArray(l) ? l[0] : l
|
|
1870
|
+
);
|
|
1871
|
+
if (c !== null && c >= 0)
|
|
1872
|
+
return Math.min(Math.round(c * 1e3), Se);
|
|
1873
|
+
const o = He(a, "x-ratelimit-reset"), u = we(
|
|
1874
|
+
Array.isArray(o) ? o[0] : o
|
|
1875
|
+
);
|
|
1876
|
+
if (u !== null && u > 0) {
|
|
1877
|
+
const b = Math.round(u * 1e3 - n);
|
|
1878
|
+
return Math.min(Math.max(b, 0), Se);
|
|
1879
|
+
}
|
|
1880
|
+
const f = Bs * 2 ** s;
|
|
1881
|
+
return Math.min(f, Se);
|
|
1882
|
+
}, Gs = ({
|
|
1883
|
+
client: t,
|
|
1884
|
+
maxRetries: s = Os,
|
|
1885
|
+
wait: n = js,
|
|
1886
|
+
now: a = Date.now,
|
|
1887
|
+
onRetry: l
|
|
1888
|
+
}) => {
|
|
1889
|
+
const c = /* @__PURE__ */ new Map();
|
|
1890
|
+
return { query: async ({
|
|
1891
|
+
requestKey: u,
|
|
1892
|
+
filters: f,
|
|
1893
|
+
sort: h = {},
|
|
1894
|
+
options: b = {}
|
|
1895
|
+
}) => {
|
|
1896
|
+
const x = c.get(u);
|
|
1897
|
+
if (x)
|
|
1898
|
+
return await x;
|
|
1899
|
+
const y = (async () => {
|
|
1900
|
+
for (let r = 0; ; r += 1)
|
|
1901
|
+
try {
|
|
1902
|
+
return await t.queryChannels(f, h, b);
|
|
1903
|
+
} catch (v) {
|
|
1904
|
+
if (!$s(v) || r >= s)
|
|
1905
|
+
throw v;
|
|
1906
|
+
const E = zs(
|
|
1907
|
+
v,
|
|
1908
|
+
r,
|
|
1909
|
+
a()
|
|
1910
|
+
);
|
|
1911
|
+
l == null || l({
|
|
1912
|
+
requestKey: u,
|
|
1913
|
+
attempt: r + 1,
|
|
1914
|
+
delayMs: E,
|
|
1915
|
+
error: v
|
|
1916
|
+
}), await n(E);
|
|
1917
|
+
}
|
|
1918
|
+
})();
|
|
1919
|
+
c.set(u, y);
|
|
1920
|
+
try {
|
|
1921
|
+
return await y;
|
|
1922
|
+
} finally {
|
|
1923
|
+
c.delete(u);
|
|
1924
|
+
}
|
|
1925
|
+
} };
|
|
1926
|
+
}, Ks = ({
|
|
1840
1927
|
capabilities: t = {},
|
|
1841
1928
|
className: s,
|
|
1842
1929
|
renderMessageInputActions: n,
|
|
1843
1930
|
onChannelSelect: a,
|
|
1844
1931
|
onParticipantSelect: l,
|
|
1845
|
-
initialParticipantFilter:
|
|
1932
|
+
initialParticipantFilter: c,
|
|
1846
1933
|
initialParticipantData: o,
|
|
1847
1934
|
CustomChannelEmptyState: u,
|
|
1848
|
-
showChannelList:
|
|
1849
|
-
filters:
|
|
1850
|
-
channelListCustomEmptyStateIndicator:
|
|
1935
|
+
showChannelList: f = !0,
|
|
1936
|
+
filters: h,
|
|
1937
|
+
channelListCustomEmptyStateIndicator: b,
|
|
1851
1938
|
onDeleteConversationClick: x,
|
|
1852
|
-
onBlockParticipantClick:
|
|
1939
|
+
onBlockParticipantClick: y,
|
|
1853
1940
|
onReportParticipantClick: r,
|
|
1854
|
-
dmAgentEnabled:
|
|
1855
|
-
messageMetadata:
|
|
1856
|
-
onMessageSent:
|
|
1941
|
+
dmAgentEnabled: v,
|
|
1942
|
+
messageMetadata: E,
|
|
1943
|
+
onMessageSent: w,
|
|
1857
1944
|
showStarButton: k = !1,
|
|
1858
1945
|
chatbotVotingEnabled: N = !1,
|
|
1859
1946
|
renderMessagePreview: m,
|
|
1860
|
-
renderChannelBanner:
|
|
1947
|
+
renderChannelBanner: p,
|
|
1861
1948
|
customChannelActions: T
|
|
1862
1949
|
}) => {
|
|
1863
1950
|
const {
|
|
1864
|
-
service:
|
|
1865
|
-
client:
|
|
1866
|
-
isConnected:
|
|
1867
|
-
isLoading:
|
|
1951
|
+
service: g,
|
|
1952
|
+
client: d,
|
|
1953
|
+
isConnected: C,
|
|
1954
|
+
isLoading: O,
|
|
1868
1955
|
error: _,
|
|
1869
1956
|
refreshConnection: R,
|
|
1870
|
-
debug:
|
|
1871
|
-
} =
|
|
1872
|
-
participantSource:
|
|
1873
|
-
participantLabel:
|
|
1874
|
-
showDeleteConversation:
|
|
1875
|
-
} = t,
|
|
1876
|
-
const
|
|
1957
|
+
debug: I
|
|
1958
|
+
} = ns(), [Y, V] = M(null), [re, J] = M(!1), [ae, oe] = M(!1), [ue, j] = M(!1), [K, A] = M(/* @__PURE__ */ new Set()), [U, q] = M(0), [F, z] = M(!1), [he, Q] = M(null), le = H(null), {
|
|
1959
|
+
participantSource: ee,
|
|
1960
|
+
participantLabel: ie = "participants",
|
|
1961
|
+
showDeleteConversation: fe = !0
|
|
1962
|
+
} = t, ge = B.useMemo(() => {
|
|
1963
|
+
const S = d == null ? void 0 : d.userID;
|
|
1877
1964
|
return {
|
|
1878
1965
|
...{
|
|
1879
1966
|
type: "messaging",
|
|
1880
1967
|
last_message_at: { $exists: !0 },
|
|
1881
|
-
...
|
|
1882
|
-
members: { $in: [
|
|
1968
|
+
...S && {
|
|
1969
|
+
members: { $in: [S] },
|
|
1883
1970
|
hidden: !1
|
|
1884
1971
|
}
|
|
1885
1972
|
},
|
|
1886
|
-
...
|
|
1973
|
+
...h
|
|
1887
1974
|
};
|
|
1888
|
-
}, [
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1975
|
+
}, [h, d == null ? void 0 : d.userID]), te = H(null), tt = H(0), se = H(a), st = H(I);
|
|
1976
|
+
X(() => {
|
|
1977
|
+
se.current = a;
|
|
1978
|
+
}, [a]);
|
|
1979
|
+
const ce = B.useMemo(() => d ? Gs({
|
|
1980
|
+
client: d,
|
|
1981
|
+
onRetry: ({ requestKey: S, attempt: P, delayMs: $, error: Z }) => {
|
|
1982
|
+
st.current && console.warn("[MessagingShell] queryChannels rate limited; retrying", {
|
|
1983
|
+
requestKey: S,
|
|
1984
|
+
attempt: P,
|
|
1985
|
+
delayMs: $,
|
|
1986
|
+
error: Z
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
}) : null, [d]), de = L(
|
|
1990
|
+
async ({ forceFresh: S = !1 } = {}) => {
|
|
1991
|
+
if (!d || !C || !ce) return;
|
|
1992
|
+
const P = d.userID;
|
|
1993
|
+
if (P)
|
|
1994
|
+
try {
|
|
1995
|
+
I && console.log("[MessagingShell] Syncing channels for user:", P);
|
|
1996
|
+
const $ = S ? `sync:${P}:refresh:${tt.current++}` : `sync:${P}`, Z = await ce.query({
|
|
1997
|
+
requestKey: $,
|
|
1998
|
+
filters: {
|
|
1999
|
+
type: "messaging",
|
|
2000
|
+
members: { $in: [P] }
|
|
2001
|
+
},
|
|
2002
|
+
options: { limit: 100 }
|
|
2003
|
+
}), G = /* @__PURE__ */ new Set();
|
|
2004
|
+
Z.forEach((W) => {
|
|
2005
|
+
const Ee = W.state.members;
|
|
2006
|
+
Object.values(Ee).forEach((ct) => {
|
|
2007
|
+
var Le;
|
|
2008
|
+
const _e = (Le = ct.user) == null ? void 0 : Le.id;
|
|
2009
|
+
_e && _e !== P && G.add(_e);
|
|
2010
|
+
});
|
|
2011
|
+
}), A((W) => W.size === G.size && [...W].every((Ee) => G.has(Ee)) ? W : G), J(Z.length > 0), oe(!0), te.current = P, I && console.log("[MessagingShell] Channels synced successfully:", {
|
|
2012
|
+
channelCount: Z.length,
|
|
2013
|
+
memberCount: G.size
|
|
1908
2014
|
});
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
if (!d || !c || !b) return;
|
|
2015
|
+
} catch ($) {
|
|
2016
|
+
console.error("[MessagingShell] Failed to sync channels:", $);
|
|
2017
|
+
}
|
|
2018
|
+
},
|
|
2019
|
+
[d, C, I, ce]
|
|
2020
|
+
);
|
|
2021
|
+
X(() => {
|
|
2022
|
+
if (!d || !C) return;
|
|
2023
|
+
const S = d.userID;
|
|
2024
|
+
S && te.current !== S && de();
|
|
2025
|
+
}, [d, C, de]), X(() => {
|
|
2026
|
+
if (!c || !d || !C || !ce)
|
|
2027
|
+
return;
|
|
1923
2028
|
(async () => {
|
|
1924
|
-
|
|
1925
|
-
|
|
2029
|
+
var $, Z;
|
|
2030
|
+
const P = d.userID;
|
|
2031
|
+
if (P)
|
|
1926
2032
|
try {
|
|
1927
|
-
|
|
2033
|
+
I && console.log(
|
|
1928
2034
|
"[MessagingShell] Loading initial conversation with:",
|
|
1929
|
-
|
|
2035
|
+
c
|
|
1930
2036
|
);
|
|
1931
|
-
const
|
|
1932
|
-
{
|
|
2037
|
+
const G = await ce.query({
|
|
2038
|
+
requestKey: `direct:${P}:${c}`,
|
|
2039
|
+
filters: {
|
|
1933
2040
|
type: "messaging",
|
|
1934
|
-
members: { $eq: [
|
|
2041
|
+
members: { $eq: [P, c] }
|
|
1935
2042
|
},
|
|
1936
|
-
{}
|
|
1937
|
-
|
|
1938
|
-
)
|
|
1939
|
-
|
|
1940
|
-
H(O[0]), G(!0), Z(null), a && a(O[0]), M && console.log(
|
|
2043
|
+
options: { limit: 1 }
|
|
2044
|
+
});
|
|
2045
|
+
if (G.length > 0)
|
|
2046
|
+
V(G[0]), z(!0), Q(null), ($ = se.current) == null || $.call(se, G[0]), I && console.log(
|
|
1941
2047
|
"[MessagingShell] Initial conversation loaded:",
|
|
1942
|
-
|
|
2048
|
+
G[0].id
|
|
1943
2049
|
);
|
|
1944
|
-
else if (o &&
|
|
1945
|
-
|
|
2050
|
+
else if (o && g) {
|
|
2051
|
+
I && console.log(
|
|
1946
2052
|
"[MessagingShell] No conversation found, creating one for:",
|
|
1947
2053
|
o
|
|
1948
2054
|
);
|
|
1949
2055
|
try {
|
|
1950
|
-
const
|
|
2056
|
+
const W = await g.startChannelWithParticipant({
|
|
1951
2057
|
id: o.id,
|
|
1952
2058
|
name: o.name,
|
|
1953
2059
|
email: o.email,
|
|
1954
2060
|
phone: o.phone
|
|
1955
2061
|
});
|
|
1956
|
-
|
|
2062
|
+
V(W), z(!0), Q(null), (Z = se.current) == null || Z.call(se, W), I && console.log(
|
|
1957
2063
|
"[MessagingShell] Channel created and loaded:",
|
|
1958
|
-
|
|
2064
|
+
W.id
|
|
1959
2065
|
);
|
|
1960
|
-
} catch (
|
|
2066
|
+
} catch (W) {
|
|
1961
2067
|
console.error(
|
|
1962
2068
|
"[MessagingShell] Failed to create conversation:",
|
|
1963
|
-
|
|
1964
|
-
),
|
|
2069
|
+
W
|
|
2070
|
+
), Q("Failed to create conversation");
|
|
1965
2071
|
}
|
|
1966
2072
|
} else
|
|
1967
|
-
|
|
2073
|
+
Q(
|
|
1968
2074
|
"No conversation found with this account"
|
|
1969
|
-
),
|
|
2075
|
+
), I && console.log(
|
|
1970
2076
|
"[MessagingShell] No conversation found for:",
|
|
1971
|
-
|
|
2077
|
+
c
|
|
1972
2078
|
);
|
|
1973
|
-
} catch (
|
|
2079
|
+
} catch (G) {
|
|
1974
2080
|
console.error(
|
|
1975
2081
|
"[MessagingShell] Failed to load initial conversation:",
|
|
1976
|
-
|
|
1977
|
-
),
|
|
2082
|
+
G
|
|
2083
|
+
), Q("Failed to load conversation");
|
|
1978
2084
|
}
|
|
1979
2085
|
})();
|
|
1980
2086
|
}, [
|
|
1981
|
-
d,
|
|
1982
|
-
o,
|
|
1983
2087
|
c,
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
2088
|
+
o,
|
|
2089
|
+
d,
|
|
2090
|
+
C,
|
|
2091
|
+
g,
|
|
2092
|
+
I,
|
|
2093
|
+
ce
|
|
1988
2094
|
]);
|
|
1989
|
-
const
|
|
1990
|
-
(
|
|
1991
|
-
|
|
2095
|
+
const nt = L(
|
|
2096
|
+
(S) => {
|
|
2097
|
+
V(S), a == null || a(S);
|
|
1992
2098
|
},
|
|
1993
2099
|
[a]
|
|
1994
|
-
),
|
|
1995
|
-
F ||
|
|
1996
|
-
}, [F]),
|
|
1997
|
-
async (
|
|
1998
|
-
var
|
|
1999
|
-
if (
|
|
2100
|
+
), rt = L(() => {
|
|
2101
|
+
F || V(null);
|
|
2102
|
+
}, [F]), at = L(
|
|
2103
|
+
async (S) => {
|
|
2104
|
+
var P;
|
|
2105
|
+
if (g)
|
|
2000
2106
|
try {
|
|
2001
|
-
|
|
2107
|
+
I && console.log(
|
|
2002
2108
|
"[MessagingShell] Starting conversation with:",
|
|
2003
|
-
|
|
2109
|
+
S.id
|
|
2004
2110
|
);
|
|
2005
|
-
const
|
|
2006
|
-
id:
|
|
2007
|
-
name:
|
|
2008
|
-
email:
|
|
2009
|
-
phone:
|
|
2111
|
+
const $ = await g.startChannelWithParticipant({
|
|
2112
|
+
id: S.id,
|
|
2113
|
+
name: S.name,
|
|
2114
|
+
email: S.email,
|
|
2115
|
+
phone: S.phone
|
|
2010
2116
|
});
|
|
2011
2117
|
try {
|
|
2012
|
-
await
|
|
2013
|
-
} catch (
|
|
2014
|
-
console.warn("[MessagingShell] Failed to unhide channel:",
|
|
2118
|
+
await $.show();
|
|
2119
|
+
} catch (Z) {
|
|
2120
|
+
console.warn("[MessagingShell] Failed to unhide channel:", Z);
|
|
2015
2121
|
}
|
|
2016
|
-
|
|
2017
|
-
} catch (
|
|
2018
|
-
console.error("[MessagingShell] Failed to start conversation:",
|
|
2122
|
+
V($), j(!1), (P = le.current) == null || P.close(), l == null || l(S);
|
|
2123
|
+
} catch ($) {
|
|
2124
|
+
console.error("[MessagingShell] Failed to start conversation:", $);
|
|
2019
2125
|
}
|
|
2020
2126
|
},
|
|
2021
|
-
[
|
|
2022
|
-
),
|
|
2023
|
-
var
|
|
2024
|
-
j(!1), (
|
|
2025
|
-
}, []),
|
|
2026
|
-
(
|
|
2027
|
-
|
|
2127
|
+
[g, l, I]
|
|
2128
|
+
), xe = L(() => {
|
|
2129
|
+
var S;
|
|
2130
|
+
j(!1), (S = le.current) == null || S.close();
|
|
2131
|
+
}, []), ot = L(
|
|
2132
|
+
(S) => {
|
|
2133
|
+
S.target === le.current && xe();
|
|
2028
2134
|
},
|
|
2029
|
-
[
|
|
2030
|
-
),
|
|
2031
|
-
async (
|
|
2032
|
-
|
|
2135
|
+
[xe]
|
|
2136
|
+
), lt = L(
|
|
2137
|
+
async (S) => {
|
|
2138
|
+
I && console.log("[MessagingShell] Leaving conversation:", S.id), V(null), z(!1), te.current = null, await de({ forceFresh: !0 });
|
|
2033
2139
|
},
|
|
2034
|
-
[
|
|
2035
|
-
),
|
|
2036
|
-
async (
|
|
2037
|
-
|
|
2140
|
+
[de, I]
|
|
2141
|
+
), it = L(
|
|
2142
|
+
async (S) => {
|
|
2143
|
+
I && console.log("[MessagingShell] Blocking participant:", S), V(null), z(!1), te.current = null, await de({ forceFresh: !0 });
|
|
2038
2144
|
},
|
|
2039
|
-
[
|
|
2040
|
-
),
|
|
2041
|
-
return
|
|
2042
|
-
|
|
2145
|
+
[de, I]
|
|
2146
|
+
), be = !!Y;
|
|
2147
|
+
return O ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(ve, {}) }) : _ ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(ye, { message: _, onBack: R }) }) : !C || !d ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(
|
|
2148
|
+
ye,
|
|
2043
2149
|
{
|
|
2044
2150
|
message: "Not connected to messaging service",
|
|
2045
2151
|
onBack: R
|
|
2046
2152
|
}
|
|
2047
|
-
) }) :
|
|
2153
|
+
) }) : he ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(ye, { message: he }) }) : /* @__PURE__ */ i(
|
|
2048
2154
|
"div",
|
|
2049
2155
|
{
|
|
2050
2156
|
className: D(
|
|
@@ -2059,20 +2165,20 @@ const Os = ({
|
|
|
2059
2165
|
className: D(
|
|
2060
2166
|
"messaging-channel-list-sidebar min-h-0 min-w-0 lg:flex lg:flex-col",
|
|
2061
2167
|
{
|
|
2062
|
-
"!hidden":
|
|
2168
|
+
"!hidden": f === !1 || F,
|
|
2063
2169
|
// Hide on mobile when channel selected, show on desktop with consistent wide width
|
|
2064
|
-
"hidden lg:flex lg:flex-1 lg:max-w-2xl":
|
|
2170
|
+
"hidden lg:flex lg:flex-1 lg:max-w-2xl": f !== !1 && !F && be,
|
|
2065
2171
|
// Show on mobile when no channel selected, use same wide width on desktop
|
|
2066
|
-
"flex flex-col w-full lg:flex-1 lg:max-w-2xl":
|
|
2172
|
+
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": f !== !1 && !F && !be
|
|
2067
2173
|
}
|
|
2068
2174
|
),
|
|
2069
2175
|
children: /* @__PURE__ */ e(
|
|
2070
|
-
|
|
2176
|
+
Ze,
|
|
2071
2177
|
{
|
|
2072
|
-
onChannelSelect:
|
|
2073
|
-
selectedChannel:
|
|
2074
|
-
filters:
|
|
2075
|
-
customEmptyStateIndicator:
|
|
2178
|
+
onChannelSelect: nt,
|
|
2179
|
+
selectedChannel: Y || void 0,
|
|
2180
|
+
filters: ge,
|
|
2181
|
+
customEmptyStateIndicator: b,
|
|
2076
2182
|
renderMessagePreview: m
|
|
2077
2183
|
}
|
|
2078
2184
|
)
|
|
@@ -2085,64 +2191,64 @@ const Os = ({
|
|
|
2085
2191
|
"messaging-conversation-view flex-1 flex-col min-w-0 min-h-0",
|
|
2086
2192
|
{
|
|
2087
2193
|
// In direct conversation mode (or waiting for it), always show (full width)
|
|
2088
|
-
flex: F ||
|
|
2194
|
+
flex: F || be || c,
|
|
2089
2195
|
// Normal mode: hide on mobile when no channel selected
|
|
2090
|
-
"hidden lg:flex": !F && !
|
|
2196
|
+
"hidden lg:flex": !F && !be && !c
|
|
2091
2197
|
}
|
|
2092
2198
|
),
|
|
2093
|
-
children:
|
|
2094
|
-
|
|
2199
|
+
children: Y ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ e(
|
|
2200
|
+
Je,
|
|
2095
2201
|
{
|
|
2096
|
-
channel:
|
|
2097
|
-
onBack:
|
|
2202
|
+
channel: Y,
|
|
2203
|
+
onBack: rt,
|
|
2098
2204
|
showBackButton: !F,
|
|
2099
2205
|
renderMessageInputActions: n,
|
|
2100
|
-
renderChannelBanner:
|
|
2101
|
-
onLeaveConversation:
|
|
2102
|
-
onBlockParticipant:
|
|
2206
|
+
renderChannelBanner: p,
|
|
2207
|
+
onLeaveConversation: lt,
|
|
2208
|
+
onBlockParticipant: it,
|
|
2103
2209
|
CustomChannelEmptyState: u,
|
|
2104
|
-
showDeleteConversation:
|
|
2210
|
+
showDeleteConversation: fe,
|
|
2105
2211
|
onDeleteConversationClick: x,
|
|
2106
|
-
onBlockParticipantClick:
|
|
2212
|
+
onBlockParticipantClick: y,
|
|
2107
2213
|
onReportParticipantClick: r,
|
|
2108
|
-
dmAgentEnabled:
|
|
2109
|
-
messageMetadata:
|
|
2110
|
-
onMessageSent:
|
|
2214
|
+
dmAgentEnabled: v,
|
|
2215
|
+
messageMetadata: E,
|
|
2216
|
+
onMessageSent: w,
|
|
2111
2217
|
showStarButton: k,
|
|
2112
2218
|
chatbotVotingEnabled: N,
|
|
2113
2219
|
customChannelActions: T
|
|
2114
2220
|
},
|
|
2115
|
-
|
|
2116
|
-
) }) :
|
|
2221
|
+
Y.id
|
|
2222
|
+
) }) : c ? (
|
|
2117
2223
|
// Show loading while creating/loading direct conversation channel
|
|
2118
|
-
/* @__PURE__ */ e(
|
|
2224
|
+
/* @__PURE__ */ e(ve, {})
|
|
2119
2225
|
) : /* @__PURE__ */ e(
|
|
2120
|
-
|
|
2226
|
+
Ke,
|
|
2121
2227
|
{
|
|
2122
|
-
hasChannels:
|
|
2123
|
-
channelsLoaded:
|
|
2228
|
+
hasChannels: re,
|
|
2229
|
+
channelsLoaded: ae
|
|
2124
2230
|
}
|
|
2125
2231
|
)
|
|
2126
2232
|
}
|
|
2127
2233
|
)
|
|
2128
2234
|
] }),
|
|
2129
|
-
|
|
2235
|
+
ee && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
2130
2236
|
/* @__PURE__ */ e(
|
|
2131
2237
|
"dialog",
|
|
2132
2238
|
{
|
|
2133
|
-
ref:
|
|
2239
|
+
ref: le,
|
|
2134
2240
|
className: "mes-dialog",
|
|
2135
|
-
onClick:
|
|
2136
|
-
onClose:
|
|
2241
|
+
onClick: ot,
|
|
2242
|
+
onClose: xe,
|
|
2137
2243
|
children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
|
|
2138
|
-
|
|
2244
|
+
Us,
|
|
2139
2245
|
{
|
|
2140
|
-
participantSource:
|
|
2141
|
-
onSelectParticipant:
|
|
2142
|
-
onClose:
|
|
2143
|
-
existingParticipantIds:
|
|
2144
|
-
participantLabel:
|
|
2145
|
-
searchPlaceholder: `Search ${
|
|
2246
|
+
participantSource: ee,
|
|
2247
|
+
onSelectParticipant: at,
|
|
2248
|
+
onClose: xe,
|
|
2249
|
+
existingParticipantIds: K,
|
|
2250
|
+
participantLabel: ie,
|
|
2251
|
+
searchPlaceholder: `Search ${ie}...`
|
|
2146
2252
|
},
|
|
2147
2253
|
U
|
|
2148
2254
|
) })
|
|
@@ -2151,7 +2257,7 @@ const Os = ({
|
|
|
2151
2257
|
]
|
|
2152
2258
|
}
|
|
2153
2259
|
);
|
|
2154
|
-
},
|
|
2260
|
+
}, Hs = ({
|
|
2155
2261
|
question: t,
|
|
2156
2262
|
onClick: s,
|
|
2157
2263
|
loading: n = !1,
|
|
@@ -2173,23 +2279,23 @@ const Os = ({
|
|
|
2173
2279
|
),
|
|
2174
2280
|
children: t
|
|
2175
2281
|
}
|
|
2176
|
-
),
|
|
2282
|
+
), en = ({
|
|
2177
2283
|
faqs: t,
|
|
2178
2284
|
onFaqClick: s,
|
|
2179
2285
|
loadingFaqId: n,
|
|
2180
2286
|
headerText: a,
|
|
2181
2287
|
className: l,
|
|
2182
|
-
avatarImage:
|
|
2288
|
+
avatarImage: c,
|
|
2183
2289
|
avatarName: o
|
|
2184
2290
|
}) => {
|
|
2185
|
-
const u = t.filter((
|
|
2291
|
+
const u = t.filter((f) => f.enabled).sort((f, h) => (f.order ?? 0) - (h.order ?? 0));
|
|
2186
2292
|
return u.length === 0 ? null : /* @__PURE__ */ e("div", { className: l, children: /* @__PURE__ */ i("div", { className: "flex gap-3 items-end", children: [
|
|
2187
|
-
(
|
|
2188
|
-
|
|
2293
|
+
(c || o) && /* @__PURE__ */ e("div", { className: "flex-none", children: /* @__PURE__ */ e(
|
|
2294
|
+
ne,
|
|
2189
2295
|
{
|
|
2190
2296
|
id: o || "account",
|
|
2191
2297
|
name: o || "Account",
|
|
2192
|
-
image:
|
|
2298
|
+
image: c,
|
|
2193
2299
|
size: 24,
|
|
2194
2300
|
shape: "circle"
|
|
2195
2301
|
}
|
|
@@ -2201,54 +2307,54 @@ const Os = ({
|
|
|
2201
2307
|
style: { backgroundColor: "#F1F0EE" },
|
|
2202
2308
|
children: [
|
|
2203
2309
|
a && /* @__PURE__ */ e("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
2204
|
-
u.map((
|
|
2205
|
-
|
|
2310
|
+
u.map((f) => /* @__PURE__ */ e(
|
|
2311
|
+
Hs,
|
|
2206
2312
|
{
|
|
2207
|
-
question:
|
|
2208
|
-
onClick: () => s(
|
|
2209
|
-
loading: n ===
|
|
2313
|
+
question: f.question,
|
|
2314
|
+
onClick: () => s(f.id),
|
|
2315
|
+
loading: n === f.id
|
|
2210
2316
|
},
|
|
2211
|
-
|
|
2317
|
+
f.id
|
|
2212
2318
|
))
|
|
2213
2319
|
]
|
|
2214
2320
|
}
|
|
2215
2321
|
)
|
|
2216
2322
|
] }) });
|
|
2217
|
-
},
|
|
2218
|
-
const { initialSearch: n = "", pageSize: a = 20 } = s, [l,
|
|
2323
|
+
}, tn = (t, s = {}) => {
|
|
2324
|
+
const { initialSearch: n = "", pageSize: a = 20 } = s, [l, c] = M([]), [o, u] = M(!1), [f, h] = M(null), [b, x] = M(n), [y, r] = M(!0), [v, E] = M(), w = L(async (p = !1, T) => {
|
|
2219
2325
|
if (o) return;
|
|
2220
|
-
const
|
|
2221
|
-
u(!0),
|
|
2326
|
+
const g = T !== void 0 ? T : b;
|
|
2327
|
+
u(!0), h(null);
|
|
2222
2328
|
try {
|
|
2223
|
-
const
|
|
2224
|
-
search:
|
|
2329
|
+
const d = await t.loadParticipants({
|
|
2330
|
+
search: g || void 0,
|
|
2225
2331
|
limit: a,
|
|
2226
|
-
cursor:
|
|
2332
|
+
cursor: p ? void 0 : v
|
|
2227
2333
|
});
|
|
2228
|
-
|
|
2229
|
-
(
|
|
2230
|
-
), r(
|
|
2231
|
-
} catch (
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2334
|
+
c(
|
|
2335
|
+
(C) => p ? d.participants : [...C, ...d.participants]
|
|
2336
|
+
), r(d.hasMore), E(d.nextCursor);
|
|
2337
|
+
} catch (d) {
|
|
2338
|
+
const C = d instanceof Error ? d.message : "Failed to load participants";
|
|
2339
|
+
h(C), console.error("[useParticipants] Load error:", d);
|
|
2234
2340
|
} finally {
|
|
2235
2341
|
u(!1);
|
|
2236
2342
|
}
|
|
2237
|
-
}, [t,
|
|
2238
|
-
|
|
2239
|
-
}, [
|
|
2240
|
-
x(
|
|
2241
|
-
}, [
|
|
2242
|
-
|
|
2243
|
-
}, [
|
|
2244
|
-
return
|
|
2245
|
-
|
|
2343
|
+
}, [t, b, v, a, o]), k = L(() => {
|
|
2344
|
+
y && !o && w(!1);
|
|
2345
|
+
}, [y, o, w]), N = L((p) => {
|
|
2346
|
+
x(p), E(void 0), w(!0, p);
|
|
2347
|
+
}, [w]), m = L(() => {
|
|
2348
|
+
E(void 0), w(!0);
|
|
2349
|
+
}, [w]);
|
|
2350
|
+
return X(() => {
|
|
2351
|
+
w(!0);
|
|
2246
2352
|
}, [t.loadParticipants]), {
|
|
2247
2353
|
participants: l,
|
|
2248
2354
|
loading: o,
|
|
2249
|
-
error:
|
|
2250
|
-
searchQuery:
|
|
2251
|
-
hasMore:
|
|
2355
|
+
error: f,
|
|
2356
|
+
searchQuery: b,
|
|
2357
|
+
hasMore: y,
|
|
2252
2358
|
totalCount: t.totalCount,
|
|
2253
2359
|
loadMore: k,
|
|
2254
2360
|
search: N,
|
|
@@ -2256,20 +2362,20 @@ const Os = ({
|
|
|
2256
2362
|
};
|
|
2257
2363
|
};
|
|
2258
2364
|
export {
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2365
|
+
Ce as ActionButton,
|
|
2366
|
+
ne as Avatar,
|
|
2367
|
+
Ds as ChannelEmptyState,
|
|
2368
|
+
Ze as ChannelList,
|
|
2369
|
+
Je as ChannelView,
|
|
2370
|
+
en as FaqList,
|
|
2371
|
+
Hs as FaqListItem,
|
|
2372
|
+
bs as MessageVoteButtons,
|
|
2373
|
+
Js as MessagingProvider,
|
|
2374
|
+
Ks as MessagingShell,
|
|
2375
|
+
Us as ParticipantPicker,
|
|
2376
|
+
as as formatRelativeTime,
|
|
2377
|
+
fs as useMessageVote,
|
|
2378
|
+
ns as useMessaging,
|
|
2379
|
+
tn as useParticipants
|
|
2274
2380
|
};
|
|
2275
2381
|
//# sourceMappingURL=index.js.map
|