@linktr.ee/messaging-react 1.26.1 → 1.28.0-rc-1776225927
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/Creator-D38dWn2X.js +318 -0
- package/dist/Creator-D38dWn2X.js.map +1 -0
- package/dist/MediaPlayer-DE9MC6k6.js +599 -0
- package/dist/MediaPlayer-DE9MC6k6.js.map +1 -0
- package/dist/Preview-DqAv16NS.js +87 -0
- package/dist/Preview-DqAv16NS.js.map +1 -0
- package/dist/Visitor-BG-9-3HU.js +199 -0
- package/dist/Visitor-BG-9-3HU.js.map +1 -0
- package/dist/dash.all.min-Duv4lvGS.js +18858 -0
- package/dist/dash.all.min-Duv4lvGS.js.map +1 -0
- package/dist/hls-Bogc7CBn.js +21710 -0
- package/dist/hls-Bogc7CBn.js.map +1 -0
- package/dist/index-Da-xN4Yq.js +16142 -0
- package/dist/index-Da-xN4Yq.js.map +1 -0
- package/dist/index-Dj9rqWcU.js +69 -0
- package/dist/index-Dj9rqWcU.js.map +1 -0
- package/dist/index.d.ts +74 -10
- package/dist/index.js +979 -934
- package/dist/index.js.map +1 -1
- package/dist/mixin-B6jYfIcp.js +808 -0
- package/dist/mixin-B6jYfIcp.js.map +1 -0
- package/dist/react-BxlQMOfz.js +419 -0
- package/dist/react-BxlQMOfz.js.map +1 -0
- package/dist/react-COAP-MIW.js +377 -0
- package/dist/react-COAP-MIW.js.map +1 -0
- package/dist/react-Cn4WlMcl.js +3108 -0
- package/dist/react-Cn4WlMcl.js.map +1 -0
- package/dist/react-CwTJArKY.js +459 -0
- package/dist/react-CwTJArKY.js.map +1 -0
- package/dist/react-DkfS_atT.js +373 -0
- package/dist/react-DkfS_atT.js.map +1 -0
- package/dist/react-Pea5fum1.js +286 -0
- package/dist/react-Pea5fum1.js.map +1 -0
- package/dist/react-RiBbsUDd.js +534 -0
- package/dist/react-RiBbsUDd.js.map +1 -0
- package/dist/react-dS1WBxxz.js +238 -0
- package/dist/react-dS1WBxxz.js.map +1 -0
- package/package.json +2 -1
- package/src/components/ChannelView.tsx +12 -2
- package/src/components/CustomMessage/CustomMessage.stories.tsx +173 -41
- package/src/components/CustomMessage/MessageTag.tsx +5 -0
- package/src/components/CustomMessage/index.tsx +43 -4
- package/src/components/LockedAttachment/LockedAttachment.stories.tsx +343 -0
- package/src/components/LockedAttachment/components/Creator.tsx +469 -0
- package/src/components/LockedAttachment/components/MediaPlayer.tsx +359 -0
- package/src/components/LockedAttachment/components/Visitor.tsx +356 -0
- package/src/components/LockedAttachment/index.tsx +39 -0
- package/src/components/LockedAttachment/types.ts +17 -0
- package/src/components/LockedAttachment/utils/icons.ts +53 -0
- package/src/components/LockedAttachment/utils/mimeType.test.ts +119 -0
- package/src/components/LockedAttachment/utils/mimeType.ts +37 -0
- package/src/components/ParticipantPicker/index.tsx +8 -1
- package/src/hooks/useParticipants.ts +3 -2
- package/src/index.ts +4 -0
- package/src/stories/decorators/storyUser.tsx +37 -0
- package/src/stream-custom-data.ts +9 -3
- package/src/types.ts +20 -1
- package/src/utils/isDevBuild.ts +10 -0
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { StreamChatService as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { StarIcon as
|
|
7
|
-
import { LinkPreviewsManager as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as he } from "react/jsx-runtime";
|
|
2
|
+
import L from "classnames";
|
|
3
|
+
import F, { createContext as ut, useContext as ht, useCallback as U, useState as T, useRef as K, useEffect as W, useMemo as Le, Suspense as $e } from "react";
|
|
4
|
+
import { StreamChatService as ft } from "@linktr.ee/messaging-core";
|
|
5
|
+
import { Chat as gt, ChannelList as xt, DateSeparator as bt, useChannelStateContext as Ie, useChatContext as Xe, areMessageUIPropsEqual as Ct, useMessageReminder as Nt, useComponentContext as pt, Attachment as yt, EditMessageModal as vt, MessageBlocked as wt, MessageBouncePrompt as _t, MessageDeleted as Et, MessageIsThreadReplyInChannelButtonIndicator as St, MessageRepliesCountButton as It, ReminderNotification as Mt, StreamedMessageText as kt, messageHasAttachments as Tt, messageHasReactions as Dt, isDateSeparatorMessage as Rt, isMessageBlocked as At, isMessageBounced as Lt, MessageBounceModal as Ut, MessageText as je, Poll as Pt, MessageErrorIcon as Ft, useMessageContext as Ke, useMessageComposer as Ot, useStateStore as Bt, MessageInput as Gt, useMessageInputContext as $t, useMessageComposerHasSendableData as jt, SimpleAttachmentSelector as zt, QuotedMessagePreview as Ht, AttachmentPreviewList as Vt, TextareaComposer as Yt, MessageTimestamp as De, Channel as Wt, WithComponents as qt, Window as Zt, MessageList as Jt } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ue, GiftIcon as Xt, XIcon as Oe, SpinnerGapIcon as _e, SignOutIcon as Kt, ProhibitInsetIcon as ze, FlagIcon as Qt, ArrowUpIcon as es, SparkleIcon as ts, ProhibitIcon as ss, ArrowLeftIcon as He, DotsThreeIcon as Ve, MagnifyingGlassIcon as ns, ChatCircleDotsIcon as Ye } from "@phosphor-icons/react";
|
|
7
|
+
import { LinkPreviewsManager as We } from "stream-chat";
|
|
8
|
+
const Qe = ut({
|
|
9
9
|
service: null,
|
|
10
10
|
client: null,
|
|
11
11
|
isConnected: !1,
|
|
@@ -15,199 +15,199 @@ const He = ct({
|
|
|
15
15
|
refreshConnection: async () => {
|
|
16
16
|
},
|
|
17
17
|
debug: !1
|
|
18
|
-
}),
|
|
18
|
+
}), Me = () => ht(Qe), rn = ({
|
|
19
19
|
children: t,
|
|
20
20
|
user: s,
|
|
21
21
|
serviceConfig: n,
|
|
22
|
-
apiKey:
|
|
22
|
+
apiKey: r,
|
|
23
23
|
capabilities: l = {},
|
|
24
24
|
debug: d = !1
|
|
25
25
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
(u, ...
|
|
28
|
-
d && console.log(`🔥 [MessagingProvider] ${u}`, ...
|
|
26
|
+
const a = U(
|
|
27
|
+
(u, ...f) => {
|
|
28
|
+
d && console.log(`🔥 [MessagingProvider] ${u}`, ...f);
|
|
29
29
|
},
|
|
30
30
|
[d]
|
|
31
31
|
);
|
|
32
|
-
|
|
32
|
+
a("🔄 RENDER START", {
|
|
33
33
|
userId: s == null ? void 0 : s.id,
|
|
34
|
-
apiKey: (
|
|
34
|
+
apiKey: (r == null ? void 0 : r.substring(0, 8)) + "...",
|
|
35
35
|
serviceConfig: !!n,
|
|
36
36
|
capabilities: Object.keys(l)
|
|
37
37
|
});
|
|
38
|
-
const [c,
|
|
38
|
+
const [c, g] = T(null), [h, b] = T(null), [N, S] = T(!1), [m, I] = T(!1), [o, v] = T(null), k = K(!1), y = K({
|
|
39
39
|
userId: s == null ? void 0 : s.id,
|
|
40
|
-
apiKey:
|
|
40
|
+
apiKey: r,
|
|
41
41
|
serviceConfig: n,
|
|
42
42
|
capabilities: l
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
renderCount:
|
|
46
|
-
currentProps: { userId: s == null ? void 0 : s.id, apiKey: (
|
|
43
|
+
}), w = K(0);
|
|
44
|
+
w.current++, a("📊 RENDER INFO", {
|
|
45
|
+
renderCount: w.current,
|
|
46
|
+
currentProps: { userId: s == null ? void 0 : s.id, apiKey: (r == null ? void 0 : r.substring(0, 8)) + "..." },
|
|
47
47
|
propChanges: {
|
|
48
|
-
userChanged:
|
|
49
|
-
apiKeyChanged:
|
|
50
|
-
serviceConfigChanged:
|
|
51
|
-
capabilitiesChanged:
|
|
48
|
+
userChanged: y.current.userId !== (s == null ? void 0 : s.id),
|
|
49
|
+
apiKeyChanged: y.current.apiKey !== r,
|
|
50
|
+
serviceConfigChanged: y.current.serviceConfig !== n,
|
|
51
|
+
capabilitiesChanged: y.current.capabilities !== l
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), y.current = {
|
|
54
54
|
userId: s == null ? void 0 : s.id,
|
|
55
|
-
apiKey:
|
|
55
|
+
apiKey: r,
|
|
56
56
|
serviceConfig: n,
|
|
57
57
|
capabilities: l
|
|
58
|
-
},
|
|
59
|
-
const u =
|
|
60
|
-
if (
|
|
58
|
+
}, W(() => {
|
|
59
|
+
const u = w.current;
|
|
60
|
+
if (a("🔧 SERVICE INIT EFFECT TRIGGERED", {
|
|
61
61
|
renderCount: u,
|
|
62
|
-
apiKey: !!
|
|
62
|
+
apiKey: !!r,
|
|
63
63
|
serviceConfig: !!n,
|
|
64
64
|
dependencies: {
|
|
65
|
-
apiKey: (
|
|
65
|
+
apiKey: (r == null ? void 0 : r.substring(0, 8)) + "...",
|
|
66
66
|
serviceConfigRef: n,
|
|
67
|
-
serviceConfigStable:
|
|
68
|
-
apiKeyStable:
|
|
67
|
+
serviceConfigStable: y.current.serviceConfig === n,
|
|
68
|
+
apiKeyStable: y.current.apiKey === r
|
|
69
69
|
}
|
|
70
|
-
}), !
|
|
71
|
-
|
|
70
|
+
}), !r || !n) {
|
|
71
|
+
a("⚠️ SERVICE INIT SKIPPED", {
|
|
72
72
|
renderCount: u,
|
|
73
73
|
reason: "Missing apiKey or serviceConfig"
|
|
74
74
|
});
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
a("🚀 CREATING NEW SERVICE", {
|
|
78
78
|
renderCount: u,
|
|
79
|
-
apiKey: (
|
|
80
|
-
serviceConfigChanged:
|
|
79
|
+
apiKey: (r == null ? void 0 : r.substring(0, 8)) + "...",
|
|
80
|
+
serviceConfigChanged: y.current.serviceConfig !== n
|
|
81
81
|
});
|
|
82
|
-
const
|
|
82
|
+
const f = new ft({
|
|
83
83
|
...n,
|
|
84
|
-
apiKey:
|
|
84
|
+
apiKey: r,
|
|
85
85
|
debug: d
|
|
86
86
|
});
|
|
87
|
-
return f
|
|
87
|
+
return g(f), a("✅ SERVICE SET", {
|
|
88
88
|
renderCount: u,
|
|
89
|
-
serviceInstance: !!
|
|
89
|
+
serviceInstance: !!f
|
|
90
90
|
}), () => {
|
|
91
|
-
|
|
91
|
+
a("🧹 SERVICE CLEANUP", {
|
|
92
92
|
renderCount: u,
|
|
93
93
|
reason: "Effect cleanup"
|
|
94
|
-
}),
|
|
94
|
+
}), f.disconnectUser().catch(console.error);
|
|
95
95
|
};
|
|
96
|
-
}, [
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
var
|
|
100
|
-
if (
|
|
96
|
+
}, [r, n, d, a]);
|
|
97
|
+
const _ = K(null);
|
|
98
|
+
W(() => {
|
|
99
|
+
var f, E;
|
|
100
|
+
if (a("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
101
101
|
hasService: !!c,
|
|
102
102
|
hasUser: !!s,
|
|
103
103
|
userId: s == null ? void 0 : s.id,
|
|
104
|
-
isConnecting:
|
|
105
|
-
isConnected:
|
|
104
|
+
isConnecting: k.current,
|
|
105
|
+
isConnected: N,
|
|
106
106
|
dependencies: { service: !!c, userId: s == null ? void 0 : s.id }
|
|
107
107
|
}), !c || !s) {
|
|
108
|
-
|
|
108
|
+
a("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
if (
|
|
112
|
-
|
|
111
|
+
if (k.current) {
|
|
112
|
+
a("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
if (((
|
|
116
|
-
|
|
115
|
+
if (((f = _.current) == null ? void 0 : f.serviceId) === c && ((E = _.current) == null ? void 0 : E.userId) === s.id) {
|
|
116
|
+
a(
|
|
117
117
|
"⚠️ USER CONNECTION SKIPPED",
|
|
118
118
|
"Already connected this user with this service"
|
|
119
119
|
);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
(async () => {
|
|
123
|
-
|
|
123
|
+
a("🚀 STARTING USER CONNECTION", { userId: s.id }), k.current = !0, I(!0), v(null);
|
|
124
124
|
try {
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
125
|
+
a("📞 CALLING SERVICE.CONNECTUSER", { userId: s.id });
|
|
126
|
+
const C = await c.connectUser(s);
|
|
127
|
+
b(C), S(!0), _.current = { serviceId: c, userId: s.id }, a("✅ USER CONNECTION SUCCESS", {
|
|
128
128
|
userId: s.id,
|
|
129
|
-
clientId:
|
|
129
|
+
clientId: C.userID
|
|
130
130
|
});
|
|
131
|
-
} catch (
|
|
132
|
-
const
|
|
133
|
-
|
|
131
|
+
} catch (C) {
|
|
132
|
+
const p = C instanceof Error ? C.message : "Connection failed";
|
|
133
|
+
v(p), a("❌ USER CONNECTION ERROR", {
|
|
134
134
|
userId: s.id,
|
|
135
|
-
error:
|
|
135
|
+
error: p
|
|
136
136
|
});
|
|
137
137
|
} finally {
|
|
138
|
-
|
|
138
|
+
I(!1), k.current = !1, a("🔄 USER CONNECTION FINISHED", {
|
|
139
139
|
userId: s.id,
|
|
140
|
-
isConnected:
|
|
140
|
+
isConnected: N
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
})();
|
|
144
|
-
}, [c, s,
|
|
144
|
+
}, [c, s, a, N]), W(() => (a("🔌 CLEANUP EFFECT REGISTERED", {
|
|
145
145
|
hasService: !!c,
|
|
146
|
-
isConnected:
|
|
146
|
+
isConnected: N
|
|
147
147
|
}), () => {
|
|
148
|
-
c &&
|
|
148
|
+
c && N ? (a(
|
|
149
149
|
"🧹 CLEANUP EFFECT TRIGGERED",
|
|
150
150
|
"Cleaning up connection on unmount"
|
|
151
|
-
),
|
|
151
|
+
), _.current = null, c.disconnectUser().catch(console.error)) : a("🔇 CLEANUP EFFECT SKIPPED", {
|
|
152
152
|
hasService: !!c,
|
|
153
|
-
isConnected:
|
|
153
|
+
isConnected: N
|
|
154
154
|
});
|
|
155
|
-
}), [c,
|
|
156
|
-
const R =
|
|
157
|
-
if (
|
|
155
|
+
}), [c, N, a]);
|
|
156
|
+
const R = U(async () => {
|
|
157
|
+
if (a("🔄 REFRESH CONNECTION CALLED", {
|
|
158
158
|
hasService: !!c,
|
|
159
159
|
hasUser: !!s
|
|
160
160
|
}), !c || !s) {
|
|
161
|
-
|
|
161
|
+
a("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
a("🚀 STARTING CONNECTION REFRESH", { userId: s.id }), I(!0);
|
|
165
165
|
try {
|
|
166
|
-
|
|
166
|
+
a("🔌 DISCONNECTING FOR REFRESH"), await c.disconnectUser(), a("📞 RECONNECTING FOR REFRESH");
|
|
167
167
|
const u = await c.connectUser(s);
|
|
168
|
-
|
|
168
|
+
b(u), S(!0), v(null), a("✅ CONNECTION REFRESH SUCCESS", { userId: s.id });
|
|
169
169
|
} catch (u) {
|
|
170
|
-
const
|
|
171
|
-
|
|
170
|
+
const f = u instanceof Error ? u.message : "Refresh failed";
|
|
171
|
+
v(f), a("❌ CONNECTION REFRESH ERROR", {
|
|
172
172
|
userId: s.id,
|
|
173
|
-
error:
|
|
173
|
+
error: f
|
|
174
174
|
});
|
|
175
175
|
} finally {
|
|
176
|
-
|
|
176
|
+
I(!1), a("🔄 CONNECTION REFRESH FINISHED", { userId: s.id });
|
|
177
177
|
}
|
|
178
|
-
}, [c, s,
|
|
178
|
+
}, [c, s, a]), x = F.useMemo(() => (a("💫 CONTEXT VALUE MEMOIZATION", {
|
|
179
179
|
hasService: !!c,
|
|
180
180
|
hasClient: !!h,
|
|
181
|
-
isConnected:
|
|
182
|
-
isLoading:
|
|
183
|
-
hasError: !!
|
|
181
|
+
isConnected: N,
|
|
182
|
+
isLoading: m,
|
|
183
|
+
hasError: !!o,
|
|
184
184
|
capabilitiesKeys: Object.keys(l)
|
|
185
185
|
}), {
|
|
186
186
|
service: c,
|
|
187
187
|
client: h,
|
|
188
|
-
isConnected:
|
|
189
|
-
isLoading:
|
|
190
|
-
error:
|
|
188
|
+
isConnected: N,
|
|
189
|
+
isLoading: m,
|
|
190
|
+
error: o,
|
|
191
191
|
capabilities: l,
|
|
192
192
|
refreshConnection: R,
|
|
193
193
|
debug: d
|
|
194
194
|
}), [
|
|
195
195
|
c,
|
|
196
196
|
h,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
N,
|
|
198
|
+
m,
|
|
199
|
+
o,
|
|
200
200
|
l,
|
|
201
201
|
R,
|
|
202
202
|
d,
|
|
203
|
-
|
|
203
|
+
a
|
|
204
204
|
]);
|
|
205
|
-
return
|
|
206
|
-
renderCount:
|
|
207
|
-
willRenderChat: !!(h &&
|
|
208
|
-
contextValueReady: !!
|
|
209
|
-
}), /* @__PURE__ */ e(
|
|
210
|
-
|
|
205
|
+
return a("🔄 RENDER END", {
|
|
206
|
+
renderCount: w.current,
|
|
207
|
+
willRenderChat: !!(h && N),
|
|
208
|
+
contextValueReady: !!x
|
|
209
|
+
}), /* @__PURE__ */ e(Qe.Provider, { value: x, children: h && N ? /* @__PURE__ */ e(
|
|
210
|
+
gt,
|
|
211
211
|
{
|
|
212
212
|
client: h,
|
|
213
213
|
customClasses: {
|
|
@@ -216,56 +216,56 @@ const He = ct({
|
|
|
216
216
|
children: t
|
|
217
217
|
}
|
|
218
218
|
) : t });
|
|
219
|
-
},
|
|
219
|
+
}, as = () => Me(), et = F.createContext({
|
|
220
220
|
selectedChannel: void 0,
|
|
221
221
|
onChannelSelect: () => {
|
|
222
222
|
},
|
|
223
223
|
debug: !1,
|
|
224
224
|
renderMessagePreview: void 0
|
|
225
|
-
}),
|
|
226
|
-
var
|
|
227
|
-
const [s, n] =
|
|
228
|
-
!!((l = (
|
|
225
|
+
}), rs = et.Provider, os = () => F.useContext(et), tt = (t) => {
|
|
226
|
+
var r, l;
|
|
227
|
+
const [s, n] = T(
|
|
228
|
+
!!((l = (r = t == null ? void 0 : t.state) == null ? void 0 : r.membership) != null && l.pinned_at)
|
|
229
229
|
);
|
|
230
|
-
return
|
|
231
|
-
var
|
|
230
|
+
return W(() => {
|
|
231
|
+
var a;
|
|
232
232
|
if (!t) {
|
|
233
233
|
n(!1);
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
|
-
n(!!((
|
|
236
|
+
n(!!((a = t.state.membership) != null && a.pinned_at));
|
|
237
237
|
const d = (c) => {
|
|
238
|
-
var
|
|
238
|
+
var g;
|
|
239
239
|
n(
|
|
240
|
-
c != null && c.member ? !!c.member.pinned_at : !!((
|
|
240
|
+
c != null && c.member ? !!c.member.pinned_at : !!((g = t.state.membership) != null && g.pinned_at)
|
|
241
241
|
);
|
|
242
242
|
};
|
|
243
243
|
return t.on("member.updated", d), () => {
|
|
244
244
|
t.off("member.updated", d);
|
|
245
245
|
};
|
|
246
246
|
}, [t]), s;
|
|
247
|
-
},
|
|
247
|
+
}, ls = (t, s) => {
|
|
248
248
|
const n = new Date(
|
|
249
249
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
250
250
|
), l = new Date(
|
|
251
251
|
Date.UTC(s.getUTCFullYear(), s.getUTCMonth(), s.getUTCDate())
|
|
252
252
|
).getTime() - n.getTime();
|
|
253
253
|
return Math.floor(l / (1e3 * 60 * 60 * 24));
|
|
254
|
-
},
|
|
254
|
+
}, is = (t) => {
|
|
255
255
|
const s = /* @__PURE__ */ new Date();
|
|
256
256
|
if (Math.floor((s.getTime() - t.getTime()) / 1e3) < 60)
|
|
257
257
|
return "Just now";
|
|
258
|
-
const
|
|
259
|
-
return
|
|
258
|
+
const r = ls(t, s);
|
|
259
|
+
return r === 0 ? t.toLocaleTimeString([], {
|
|
260
260
|
hour: "numeric",
|
|
261
261
|
minute: "2-digit",
|
|
262
262
|
hour12: !0
|
|
263
|
-
}) :
|
|
263
|
+
}) : r === 1 ? "Yesterday" : r < 7 ? `${r}d` : r < 28 ? `${Math.floor(r / 7)}w` : t.toLocaleDateString("en-US", {
|
|
264
264
|
month: "numeric",
|
|
265
265
|
day: "numeric",
|
|
266
266
|
year: "2-digit"
|
|
267
267
|
});
|
|
268
|
-
},
|
|
268
|
+
}, qe = [
|
|
269
269
|
"🍎",
|
|
270
270
|
// Apple
|
|
271
271
|
"🍌",
|
|
@@ -293,34 +293,34 @@ const He = ct({
|
|
|
293
293
|
"🍈"
|
|
294
294
|
// Melon
|
|
295
295
|
];
|
|
296
|
-
function
|
|
296
|
+
function cs(t) {
|
|
297
297
|
let s = 0;
|
|
298
298
|
for (let n = 0; n < t.length; n++) {
|
|
299
|
-
const
|
|
300
|
-
s = (s << 5) - s +
|
|
299
|
+
const r = t.charCodeAt(n);
|
|
300
|
+
s = (s << 5) - s + r, s = s & s;
|
|
301
301
|
}
|
|
302
302
|
return Math.abs(s);
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
const n =
|
|
306
|
-
return
|
|
304
|
+
function ds(t) {
|
|
305
|
+
const n = cs(t) % qe.length;
|
|
306
|
+
return qe[n];
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const oe = ({
|
|
309
309
|
id: t,
|
|
310
310
|
image: s,
|
|
311
311
|
size: n = 40,
|
|
312
|
-
className:
|
|
312
|
+
className: r,
|
|
313
313
|
starred: l = !1,
|
|
314
314
|
shape: d = "squircle"
|
|
315
315
|
}) => {
|
|
316
|
-
const
|
|
316
|
+
const a = ds(t), g = n < 32 ? "text-xs" : n < 56 ? "text-sm" : n < 120 ? "text-lg" : "text-4xl", h = d === "circle" ? { borderRadius: "50%" } : {
|
|
317
317
|
borderRadius: "33%",
|
|
318
318
|
"corner-shape": "superellipse(1.3)"
|
|
319
319
|
};
|
|
320
320
|
return /* @__PURE__ */ i(
|
|
321
321
|
"div",
|
|
322
322
|
{
|
|
323
|
-
className:
|
|
323
|
+
className: L("relative flex-shrink-0", r),
|
|
324
324
|
style: {
|
|
325
325
|
width: `${n}px`,
|
|
326
326
|
height: `${n}px`
|
|
@@ -331,7 +331,7 @@ const ae = ({
|
|
|
331
331
|
{
|
|
332
332
|
"aria-hidden": "true",
|
|
333
333
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
334
|
-
children: /* @__PURE__ */ e(
|
|
334
|
+
children: /* @__PURE__ */ e(Ue, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
335
335
|
}
|
|
336
336
|
),
|
|
337
337
|
/* @__PURE__ */ e("div", { className: "h-full w-full overflow-hidden", style: h, children: s ? /* @__PURE__ */ e(
|
|
@@ -345,17 +345,17 @@ const ae = ({
|
|
|
345
345
|
"div",
|
|
346
346
|
{
|
|
347
347
|
"aria-hidden": "true",
|
|
348
|
-
className:
|
|
348
|
+
className: L(
|
|
349
349
|
"avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
|
|
350
|
-
|
|
350
|
+
g
|
|
351
351
|
),
|
|
352
|
-
children:
|
|
352
|
+
children: a
|
|
353
353
|
}
|
|
354
354
|
) })
|
|
355
355
|
]
|
|
356
356
|
}
|
|
357
357
|
);
|
|
358
|
-
},
|
|
358
|
+
}, ms = ({ size: t = 15 }) => /* @__PURE__ */ e(
|
|
359
359
|
"svg",
|
|
360
360
|
{
|
|
361
361
|
width: t,
|
|
@@ -372,105 +372,108 @@ const ae = ({
|
|
|
372
372
|
}
|
|
373
373
|
)
|
|
374
374
|
}
|
|
375
|
-
),
|
|
375
|
+
), us = (t) => {
|
|
376
376
|
var s;
|
|
377
377
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_TIP";
|
|
378
|
-
},
|
|
378
|
+
}, hs = (t) => {
|
|
379
379
|
var s;
|
|
380
380
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_PAID";
|
|
381
|
-
},
|
|
381
|
+
}, Be = (t) => {
|
|
382
382
|
var s;
|
|
383
383
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_CHATBOT";
|
|
384
|
-
},
|
|
384
|
+
}, fs = (t) => {
|
|
385
385
|
var s;
|
|
386
|
-
return
|
|
387
|
-
},
|
|
386
|
+
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_ATTACHMENT";
|
|
387
|
+
}, st = (t) => us(t) || hs(t), gs = (t) => {
|
|
388
|
+
var s;
|
|
389
|
+
return st(t) && !((s = t.text) != null && s.trim());
|
|
390
|
+
}, Re = ({
|
|
388
391
|
message: t,
|
|
389
392
|
standalone: s = !1,
|
|
390
393
|
isMyMessage: n = !1,
|
|
391
|
-
hasAttachment:
|
|
394
|
+
hasAttachment: r = !1
|
|
392
395
|
}) => {
|
|
393
|
-
var
|
|
394
|
-
const l =
|
|
396
|
+
var N;
|
|
397
|
+
const l = st(t), d = Be(t);
|
|
395
398
|
if (!l && !d)
|
|
396
399
|
return null;
|
|
397
400
|
if (l) {
|
|
398
|
-
const
|
|
399
|
-
if (!
|
|
400
|
-
const
|
|
401
|
-
return /* @__PURE__ */ i("div", { className:
|
|
402
|
-
/* @__PURE__ */ e(
|
|
403
|
-
/* @__PURE__ */ e("span", { children:
|
|
401
|
+
const S = (N = t.metadata) == null ? void 0 : N.amount_text;
|
|
402
|
+
if (!S) return null;
|
|
403
|
+
const m = s ? "message-tip-standalone" : "message-tag message-tag--tip", I = s ? `${S} tip` : `Delivered with ${S} tip`;
|
|
404
|
+
return /* @__PURE__ */ i("div", { className: m, children: [
|
|
405
|
+
/* @__PURE__ */ e(Xt, { size: s ? 14 : 12 }),
|
|
406
|
+
/* @__PURE__ */ e("span", { children: I })
|
|
404
407
|
] });
|
|
405
408
|
}
|
|
406
|
-
const
|
|
409
|
+
const a = n && r, c = a ? "Sent with AI" : "Sent with DM Agent", g = [
|
|
407
410
|
"message-chatbot-indicator",
|
|
408
411
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
409
|
-
|
|
410
|
-
].join(" "), h = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: c }),
|
|
411
|
-
return /* @__PURE__ */ e("div", { className:
|
|
412
|
+
a ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
413
|
+
].join(" "), h = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: c }), b = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ e(ms, { size: a ? 12 : 15 }) });
|
|
414
|
+
return /* @__PURE__ */ e("div", { className: g, "data-testid": "message-chatbot-indicator", children: n && !a ? /* @__PURE__ */ i(he, { children: [
|
|
412
415
|
h,
|
|
413
|
-
|
|
414
|
-
] }) : /* @__PURE__ */ i(
|
|
415
|
-
|
|
416
|
+
b
|
|
417
|
+
] }) : /* @__PURE__ */ i(he, { children: [
|
|
418
|
+
b,
|
|
416
419
|
h
|
|
417
420
|
] }) });
|
|
418
|
-
},
|
|
421
|
+
}, nt = F.memo(
|
|
419
422
|
({ channel: t, unread: s }) => {
|
|
420
|
-
var R,
|
|
421
|
-
const { selectedChannel: n, onChannelSelect:
|
|
422
|
-
t &&
|
|
423
|
-
},
|
|
424
|
-
const
|
|
425
|
-
!
|
|
426
|
-
},
|
|
427
|
-
(
|
|
428
|
-
var
|
|
429
|
-
return ((
|
|
423
|
+
var R, x, u, f;
|
|
424
|
+
const { selectedChannel: n, onChannelSelect: r, debug: l, renderMessagePreview: d } = os(), a = (n == null ? void 0 : n.id) === (t == null ? void 0 : t.id), c = () => {
|
|
425
|
+
t && r(t);
|
|
426
|
+
}, g = (E) => {
|
|
427
|
+
const C = E.key === "Enter" || E.key === " ", p = E.repeat;
|
|
428
|
+
!C || p || (E.preventDefault(), c());
|
|
429
|
+
}, b = Object.values(((R = t == null ? void 0 : t.state) == null ? void 0 : R.members) || {}).find(
|
|
430
|
+
(E) => {
|
|
431
|
+
var C, p;
|
|
432
|
+
return ((C = E.user) == null ? void 0 : C.id) && E.user.id !== ((p = t == null ? void 0 : t._client) == null ? void 0 : p.userID);
|
|
430
433
|
}
|
|
431
|
-
),
|
|
432
|
-
var
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
435
|
-
for (let
|
|
436
|
-
if (
|
|
434
|
+
), N = ((x = b == null ? void 0 : b.user) == null ? void 0 : x.name) || "Conversation", S = (u = b == null ? void 0 : b.user) == null ? void 0 : u.image, m = (() => {
|
|
435
|
+
var C;
|
|
436
|
+
const E = (C = t == null ? void 0 : t.state) == null ? void 0 : C.messages;
|
|
437
|
+
if (E != null && E.length) {
|
|
438
|
+
for (let p = E.length - 1; p >= 0; p--)
|
|
439
|
+
if (E[p].type !== "system") return E[p];
|
|
437
440
|
}
|
|
438
|
-
})(),
|
|
439
|
-
var
|
|
440
|
-
if (
|
|
441
|
-
if (((
|
|
442
|
-
const
|
|
443
|
-
return
|
|
444
|
-
})(),
|
|
441
|
+
})(), o = (() => {
|
|
442
|
+
var p, O;
|
|
443
|
+
if (m != null && m.text) return m.text;
|
|
444
|
+
if (((p = m == null ? void 0 : m.metadata) == null ? void 0 : p.custom_type) === "MESSAGE_TIP") return "💵 Sent a tip";
|
|
445
|
+
const C = (O = m == null ? void 0 : m.attachments) == null ? void 0 : O[0];
|
|
446
|
+
return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
447
|
+
})(), v = m != null && m.created_at ? is(new Date(m.created_at)) : "", k = m ? Be(m) : !1, y = d ? d(m, o) : `${k ? "✨ " : ""}${o}`, w = tt(t), _ = s ?? 0;
|
|
445
448
|
return l && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
446
449
|
channelId: t == null ? void 0 : t.id,
|
|
447
|
-
isSelected:
|
|
448
|
-
participantName:
|
|
449
|
-
unreadCount:
|
|
450
|
-
hasTimestamp: !!
|
|
450
|
+
isSelected: a,
|
|
451
|
+
participantName: N,
|
|
452
|
+
unreadCount: _,
|
|
453
|
+
hasTimestamp: !!v
|
|
451
454
|
}), /* @__PURE__ */ e(
|
|
452
455
|
"div",
|
|
453
456
|
{
|
|
454
457
|
role: "button",
|
|
455
458
|
tabIndex: 0,
|
|
456
459
|
onClick: c,
|
|
457
|
-
onKeyDown:
|
|
458
|
-
className:
|
|
460
|
+
onKeyDown: g,
|
|
461
|
+
className: L(
|
|
459
462
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring",
|
|
460
463
|
{
|
|
461
|
-
"bg-primary-alt/10 border-l-4 border-l-primary":
|
|
462
|
-
"hover:bg-sand": !
|
|
464
|
+
"bg-primary-alt/10 border-l-4 border-l-primary": a,
|
|
465
|
+
"hover:bg-sand": !a
|
|
463
466
|
}
|
|
464
467
|
),
|
|
465
468
|
children: /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
|
|
466
469
|
/* @__PURE__ */ e(
|
|
467
|
-
|
|
470
|
+
oe,
|
|
468
471
|
{
|
|
469
|
-
id: ((
|
|
470
|
-
name:
|
|
471
|
-
image:
|
|
472
|
+
id: ((f = b == null ? void 0 : b.user) == null ? void 0 : f.id) || t.id || "unknown",
|
|
473
|
+
name: N,
|
|
474
|
+
image: S,
|
|
472
475
|
size: 44,
|
|
473
|
-
starred:
|
|
476
|
+
starred: w,
|
|
474
477
|
className: "[&_.avatar-fallback]:group-hover:bg-[#eeeeee]"
|
|
475
478
|
}
|
|
476
479
|
),
|
|
@@ -479,21 +482,21 @@ const ae = ({
|
|
|
479
482
|
/* @__PURE__ */ i(
|
|
480
483
|
"h3",
|
|
481
484
|
{
|
|
482
|
-
className:
|
|
485
|
+
className: L(
|
|
483
486
|
"text-sm font-medium truncate",
|
|
484
|
-
|
|
487
|
+
a ? "text-primary" : "text-charcoal"
|
|
485
488
|
),
|
|
486
489
|
children: [
|
|
487
|
-
|
|
488
|
-
|
|
490
|
+
w && /* @__PURE__ */ e("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
491
|
+
N
|
|
489
492
|
]
|
|
490
493
|
}
|
|
491
494
|
),
|
|
492
|
-
|
|
495
|
+
v && /* @__PURE__ */ e("span", { className: "text-xs text-stone flex-shrink-0", children: v })
|
|
493
496
|
] }),
|
|
494
497
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
495
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-stone flex-1 line-clamp-1", children:
|
|
496
|
-
|
|
498
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-stone flex-1 line-clamp-1", children: y }),
|
|
499
|
+
_ > 0 && /* @__PURE__ */ e("span", { className: "bg-[#7f22fe] text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: _ > 99 ? "99+" : _ })
|
|
497
500
|
] })
|
|
498
501
|
] })
|
|
499
502
|
] })
|
|
@@ -501,56 +504,56 @@ const ae = ({
|
|
|
501
504
|
);
|
|
502
505
|
}
|
|
503
506
|
);
|
|
504
|
-
|
|
505
|
-
const
|
|
507
|
+
nt.displayName = "CustomChannelPreview";
|
|
508
|
+
const xs = { last_message_at: -1 }, at = F.memo(
|
|
506
509
|
({
|
|
507
510
|
onChannelSelect: t,
|
|
508
511
|
selectedChannel: s,
|
|
509
512
|
filters: n,
|
|
510
|
-
allowNewMessagesFromUnfilteredChannels:
|
|
513
|
+
allowNewMessagesFromUnfilteredChannels: r = !1,
|
|
511
514
|
onMessageNew: l,
|
|
512
515
|
onAddedToChannel: d,
|
|
513
|
-
channelRenderFilterFn:
|
|
514
|
-
sort: c =
|
|
515
|
-
className:
|
|
516
|
+
channelRenderFilterFn: a,
|
|
517
|
+
sort: c = xs,
|
|
518
|
+
className: g,
|
|
516
519
|
customEmptyStateIndicator: h,
|
|
517
|
-
renderMessagePreview:
|
|
520
|
+
renderMessagePreview: b
|
|
518
521
|
}) => {
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
const { debug:
|
|
522
|
-
|
|
523
|
-
renderCount:
|
|
522
|
+
const N = F.useRef(0);
|
|
523
|
+
N.current++;
|
|
524
|
+
const { debug: S = !1 } = Me();
|
|
525
|
+
S && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
526
|
+
renderCount: N.current,
|
|
524
527
|
selectedChannelId: s == null ? void 0 : s.id,
|
|
525
528
|
filters: n
|
|
526
529
|
});
|
|
527
|
-
const
|
|
530
|
+
const m = F.useMemo(
|
|
528
531
|
() => ({
|
|
529
532
|
selectedChannel: s,
|
|
530
533
|
onChannelSelect: t,
|
|
531
|
-
debug:
|
|
532
|
-
renderMessagePreview:
|
|
534
|
+
debug: S,
|
|
535
|
+
renderMessagePreview: b
|
|
533
536
|
}),
|
|
534
|
-
[s, t,
|
|
537
|
+
[s, t, S, b]
|
|
535
538
|
);
|
|
536
539
|
return /* @__PURE__ */ e(
|
|
537
540
|
"div",
|
|
538
541
|
{
|
|
539
|
-
className:
|
|
542
|
+
className: L(
|
|
540
543
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
541
|
-
|
|
544
|
+
g
|
|
542
545
|
),
|
|
543
|
-
children: /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ e(
|
|
544
|
-
|
|
546
|
+
children: /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ e(rs, { value: m, children: /* @__PURE__ */ e(
|
|
547
|
+
xt,
|
|
545
548
|
{
|
|
546
549
|
filters: n,
|
|
547
550
|
sort: c,
|
|
548
551
|
options: { limit: 30 },
|
|
549
|
-
allowNewMessagesFromUnfilteredChannels:
|
|
552
|
+
allowNewMessagesFromUnfilteredChannels: r,
|
|
550
553
|
onMessageNew: l,
|
|
551
554
|
onAddedToChannel: d,
|
|
552
|
-
channelRenderFilterFn:
|
|
553
|
-
Preview:
|
|
555
|
+
channelRenderFilterFn: a,
|
|
556
|
+
Preview: nt,
|
|
554
557
|
EmptyStateIndicator: h
|
|
555
558
|
},
|
|
556
559
|
`${JSON.stringify(n)}:${JSON.stringify(c)}`
|
|
@@ -559,39 +562,39 @@ const hs = { last_message_at: -1 }, Ze = G.memo(
|
|
|
559
562
|
);
|
|
560
563
|
}
|
|
561
564
|
);
|
|
562
|
-
|
|
563
|
-
const
|
|
565
|
+
at.displayName = "ChannelList";
|
|
566
|
+
const we = ({
|
|
564
567
|
variant: t = "default",
|
|
565
568
|
className: s,
|
|
566
569
|
children: n,
|
|
567
|
-
...
|
|
570
|
+
...r
|
|
568
571
|
}) => /* @__PURE__ */ e(
|
|
569
572
|
"button",
|
|
570
573
|
{
|
|
571
574
|
type: "button",
|
|
572
|
-
className:
|
|
575
|
+
className: L(
|
|
573
576
|
"flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
|
|
574
577
|
t === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
575
578
|
s
|
|
576
579
|
),
|
|
577
|
-
...
|
|
580
|
+
...r,
|
|
578
581
|
children: n
|
|
579
582
|
}
|
|
580
583
|
);
|
|
581
|
-
function
|
|
584
|
+
function rt({ label: t, className: s, children: n, ...r }) {
|
|
582
585
|
return /* @__PURE__ */ i(
|
|
583
586
|
"button",
|
|
584
587
|
{
|
|
585
588
|
type: "button",
|
|
586
|
-
className:
|
|
589
|
+
className: L(
|
|
587
590
|
"rounded-full p-2 transition-colors focus-ring",
|
|
588
591
|
{
|
|
589
|
-
"cursor-not-allowed opacity-50":
|
|
590
|
-
"hover:bg-sand": !
|
|
592
|
+
"cursor-not-allowed opacity-50": r.disabled,
|
|
593
|
+
"hover:bg-sand": !r.disabled
|
|
591
594
|
},
|
|
592
595
|
s
|
|
593
596
|
),
|
|
594
|
-
...
|
|
597
|
+
...r,
|
|
595
598
|
children: [
|
|
596
599
|
/* @__PURE__ */ e("span", { className: "sr-only", children: t }),
|
|
597
600
|
n
|
|
@@ -599,92 +602,92 @@ function Je({ label: t, className: s, children: n, ...o }) {
|
|
|
599
602
|
}
|
|
600
603
|
);
|
|
601
604
|
}
|
|
602
|
-
function
|
|
603
|
-
return /* @__PURE__ */ e(
|
|
605
|
+
function ot({ onClick: t }) {
|
|
606
|
+
return /* @__PURE__ */ e(rt, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(Oe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
604
607
|
}
|
|
605
|
-
const
|
|
608
|
+
const bs = ({
|
|
606
609
|
dialogRef: t,
|
|
607
610
|
onClose: s,
|
|
608
611
|
participant: n,
|
|
609
|
-
channel:
|
|
612
|
+
channel: r,
|
|
610
613
|
followerStatusLabel: l,
|
|
611
614
|
onLeaveConversation: d,
|
|
612
|
-
onBlockParticipant:
|
|
615
|
+
onBlockParticipant: a,
|
|
613
616
|
showDeleteConversation: c = !0,
|
|
614
|
-
onDeleteConversationClick:
|
|
617
|
+
onDeleteConversationClick: g,
|
|
615
618
|
onBlockParticipantClick: h,
|
|
616
|
-
onReportParticipantClick:
|
|
617
|
-
customProfileContent:
|
|
618
|
-
customChannelActions:
|
|
619
|
+
onReportParticipantClick: b,
|
|
620
|
+
customProfileContent: N,
|
|
621
|
+
customChannelActions: S
|
|
619
622
|
}) => {
|
|
620
|
-
var
|
|
621
|
-
const { service:
|
|
622
|
-
var
|
|
623
|
-
if (!(!
|
|
623
|
+
var D, $, z, ee, le, ie, ce;
|
|
624
|
+
const { service: m, debug: I } = Me(), [o, v] = T(!1), [k, y] = T(!1), [w, _] = T(!1), R = U(async () => {
|
|
625
|
+
var A;
|
|
626
|
+
if (!(!m || !((A = n == null ? void 0 : n.user) != null && A.id)))
|
|
624
627
|
try {
|
|
625
|
-
const
|
|
626
|
-
(
|
|
627
|
-
var
|
|
628
|
-
return
|
|
628
|
+
const H = (await m.getBlockedUsers()).some(
|
|
629
|
+
(Y) => {
|
|
630
|
+
var te;
|
|
631
|
+
return Y.blocked_user_id === ((te = n == null ? void 0 : n.user) == null ? void 0 : te.id);
|
|
629
632
|
}
|
|
630
633
|
);
|
|
631
|
-
|
|
634
|
+
v(H);
|
|
632
635
|
} catch (P) {
|
|
633
636
|
console.error(
|
|
634
637
|
"[ChannelInfoDialog] Failed to check blocked status:",
|
|
635
638
|
P
|
|
636
639
|
);
|
|
637
640
|
}
|
|
638
|
-
}, [
|
|
639
|
-
|
|
641
|
+
}, [m, (D = n == null ? void 0 : n.user) == null ? void 0 : D.id]);
|
|
642
|
+
W(() => {
|
|
640
643
|
R();
|
|
641
644
|
}, [R]);
|
|
642
|
-
const
|
|
643
|
-
var
|
|
644
|
-
if (!
|
|
645
|
-
|
|
645
|
+
const x = async () => {
|
|
646
|
+
var A;
|
|
647
|
+
if (!k) {
|
|
648
|
+
g == null || g(), I && console.log("[ChannelInfoDialog] Leave conversation", r.cid), y(!0);
|
|
646
649
|
try {
|
|
647
|
-
const P = ((
|
|
648
|
-
await
|
|
650
|
+
const P = ((A = r._client) == null ? void 0 : A.userID) ?? null;
|
|
651
|
+
await r.hide(P, !1), d && await d(r), s();
|
|
649
652
|
} catch (P) {
|
|
650
653
|
console.error("[ChannelInfoDialog] Failed to leave conversation", P);
|
|
651
654
|
} finally {
|
|
652
|
-
|
|
655
|
+
y(!1);
|
|
653
656
|
}
|
|
654
657
|
}
|
|
655
658
|
}, u = async () => {
|
|
656
|
-
var
|
|
657
|
-
if (!(
|
|
658
|
-
h == null || h(),
|
|
659
|
+
var A, P, H;
|
|
660
|
+
if (!(w || !m)) {
|
|
661
|
+
h == null || h(), I && console.log("[ChannelInfoDialog] Block member", (A = n == null ? void 0 : n.user) == null ? void 0 : A.id), _(!0);
|
|
659
662
|
try {
|
|
660
|
-
await
|
|
661
|
-
} catch (
|
|
662
|
-
console.error("[ChannelInfoDialog] Failed to block member",
|
|
663
|
+
await m.blockUser((P = n == null ? void 0 : n.user) == null ? void 0 : P.id), a && await a((H = n == null ? void 0 : n.user) == null ? void 0 : H.id), s();
|
|
664
|
+
} catch (Y) {
|
|
665
|
+
console.error("[ChannelInfoDialog] Failed to block member", Y);
|
|
663
666
|
} finally {
|
|
664
|
-
|
|
667
|
+
_(!1);
|
|
665
668
|
}
|
|
666
669
|
}
|
|
667
|
-
},
|
|
668
|
-
var
|
|
669
|
-
if (!(
|
|
670
|
-
h == null || h(),
|
|
670
|
+
}, f = async () => {
|
|
671
|
+
var A, P, H;
|
|
672
|
+
if (!(w || !m)) {
|
|
673
|
+
h == null || h(), I && console.log("[ChannelInfoDialog] Unblock member", (A = n == null ? void 0 : n.user) == null ? void 0 : A.id), _(!0);
|
|
671
674
|
try {
|
|
672
|
-
await
|
|
673
|
-
} catch (
|
|
674
|
-
console.error("[ChannelInfoDialog] Failed to unblock member",
|
|
675
|
+
await m.unBlockUser((P = n == null ? void 0 : n.user) == null ? void 0 : P.id), a && await a((H = n == null ? void 0 : n.user) == null ? void 0 : H.id), s();
|
|
676
|
+
} catch (Y) {
|
|
677
|
+
console.error("[ChannelInfoDialog] Failed to unblock member", Y);
|
|
675
678
|
} finally {
|
|
676
|
-
|
|
679
|
+
_(!1);
|
|
677
680
|
}
|
|
678
681
|
}
|
|
679
|
-
},
|
|
680
|
-
|
|
682
|
+
}, E = () => {
|
|
683
|
+
b == null || b(), s(), window.open(
|
|
681
684
|
"https://linktr.ee/s/about/trust-center/report",
|
|
682
685
|
"_blank",
|
|
683
686
|
"noopener,noreferrer"
|
|
684
687
|
);
|
|
685
688
|
};
|
|
686
689
|
if (!n) return null;
|
|
687
|
-
const
|
|
690
|
+
const C = (($ = n.user) == null ? void 0 : $.name) || ((z = n.user) == null ? void 0 : z.id) || "Unknown member", p = (ee = n.user) == null ? void 0 : ee.image, O = (le = n.user) == null ? void 0 : le.email, q = (ie = n.user) == null ? void 0 : ie.username, Z = O || (q ? `linktr.ee/${q}` : void 0), Q = ((ce = n.user) == null ? void 0 : ce.id) || "unknown";
|
|
688
691
|
return (
|
|
689
692
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
690
693
|
/* @__PURE__ */ e(
|
|
@@ -693,13 +696,13 @@ const fs = ({
|
|
|
693
696
|
ref: t,
|
|
694
697
|
className: "mes-dialog group",
|
|
695
698
|
onClose: s,
|
|
696
|
-
onClick: (
|
|
697
|
-
|
|
699
|
+
onClick: (A) => {
|
|
700
|
+
A.target === t.current && s();
|
|
698
701
|
},
|
|
699
702
|
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: [
|
|
700
703
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
|
|
701
704
|
/* @__PURE__ */ e("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
|
|
702
|
-
/* @__PURE__ */ e(
|
|
705
|
+
/* @__PURE__ */ e(ot, { onClick: s })
|
|
703
706
|
] }),
|
|
704
707
|
/* @__PURE__ */ i("div", { className: "flex-1 px-2 overflow-y-auto w-full", children: [
|
|
705
708
|
/* @__PURE__ */ e(
|
|
@@ -709,19 +712,19 @@ const fs = ({
|
|
|
709
712
|
style: { backgroundColor: "#FBFAF9" },
|
|
710
713
|
children: /* @__PURE__ */ i("div", { className: "flex items-center gap-3 w-full", children: [
|
|
711
714
|
/* @__PURE__ */ e(
|
|
712
|
-
|
|
715
|
+
oe,
|
|
713
716
|
{
|
|
714
|
-
id:
|
|
715
|
-
name:
|
|
716
|
-
image:
|
|
717
|
+
id: Q,
|
|
718
|
+
name: C,
|
|
719
|
+
image: p,
|
|
717
720
|
size: 88,
|
|
718
721
|
shape: "circle"
|
|
719
722
|
}
|
|
720
723
|
),
|
|
721
724
|
/* @__PURE__ */ i("div", { className: "flex flex-col min-w-0 flex-1", children: [
|
|
722
|
-
/* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children:
|
|
723
|
-
|
|
724
|
-
l && !
|
|
725
|
+
/* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children: C }),
|
|
726
|
+
Z && /* @__PURE__ */ e("p", { className: "truncate text-sm text-[#00000055]", children: Z }),
|
|
727
|
+
l && !N && /* @__PURE__ */ e(
|
|
725
728
|
"span",
|
|
726
729
|
{
|
|
727
730
|
className: "mt-1 rounded-full text-xs font-normal w-fit",
|
|
@@ -735,90 +738,103 @@ const fs = ({
|
|
|
735
738
|
children: l
|
|
736
739
|
}
|
|
737
740
|
),
|
|
738
|
-
|
|
741
|
+
N
|
|
739
742
|
] })
|
|
740
743
|
] })
|
|
741
744
|
}
|
|
742
745
|
),
|
|
743
746
|
/* @__PURE__ */ i("ul", { className: "flex flex-col gap-2 mt-2", children: [
|
|
744
747
|
c && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
745
|
-
|
|
748
|
+
we,
|
|
746
749
|
{
|
|
747
|
-
onClick:
|
|
748
|
-
disabled:
|
|
749
|
-
"aria-busy":
|
|
750
|
+
onClick: x,
|
|
751
|
+
disabled: k,
|
|
752
|
+
"aria-busy": k,
|
|
750
753
|
children: [
|
|
751
|
-
|
|
754
|
+
k ? /* @__PURE__ */ e(_e, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Kt, { className: "h-5 w-5" }),
|
|
752
755
|
/* @__PURE__ */ e("span", { children: "Delete Conversation" })
|
|
753
756
|
]
|
|
754
757
|
}
|
|
755
758
|
) }),
|
|
756
|
-
/* @__PURE__ */ e("li", { children:
|
|
757
|
-
|
|
759
|
+
/* @__PURE__ */ e("li", { children: o ? /* @__PURE__ */ i(
|
|
760
|
+
we,
|
|
758
761
|
{
|
|
759
|
-
onClick:
|
|
760
|
-
disabled:
|
|
761
|
-
"aria-busy":
|
|
762
|
+
onClick: f,
|
|
763
|
+
disabled: w,
|
|
764
|
+
"aria-busy": w,
|
|
762
765
|
children: [
|
|
763
|
-
|
|
766
|
+
w ? /* @__PURE__ */ e(_e, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(ze, { className: "h-5 w-5" }),
|
|
764
767
|
/* @__PURE__ */ e("span", { children: "Unblock" })
|
|
765
768
|
]
|
|
766
769
|
}
|
|
767
770
|
) : /* @__PURE__ */ i(
|
|
768
|
-
|
|
771
|
+
we,
|
|
769
772
|
{
|
|
770
773
|
onClick: u,
|
|
771
|
-
disabled:
|
|
772
|
-
"aria-busy":
|
|
774
|
+
disabled: w,
|
|
775
|
+
"aria-busy": w,
|
|
773
776
|
children: [
|
|
774
|
-
|
|
777
|
+
w ? /* @__PURE__ */ e(_e, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(ze, { className: "h-5 w-5" }),
|
|
775
778
|
/* @__PURE__ */ e("span", { children: "Block" })
|
|
776
779
|
]
|
|
777
780
|
}
|
|
778
781
|
) }),
|
|
779
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
780
|
-
/* @__PURE__ */ e(
|
|
782
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(we, { variant: "danger", onClick: E, children: [
|
|
783
|
+
/* @__PURE__ */ e(Qt, { className: "h-5 w-5" }),
|
|
781
784
|
/* @__PURE__ */ e("span", { children: "Report" })
|
|
782
785
|
] }) }),
|
|
783
|
-
|
|
786
|
+
S
|
|
784
787
|
] })
|
|
785
788
|
] })
|
|
786
789
|
] })
|
|
787
790
|
}
|
|
788
791
|
)
|
|
789
792
|
);
|
|
790
|
-
},
|
|
791
|
-
function
|
|
792
|
-
return t != null && t.length ? t.some((s) => s.type ===
|
|
793
|
+
}, Cs = (t) => /* @__PURE__ */ e(bt, { ...t, position: "center" }), Pe = "vote_up", Fe = "vote_down";
|
|
794
|
+
function Ns(t) {
|
|
795
|
+
return t != null && t.length ? t.some((s) => s.type === Fe) ? "down" : t.some((s) => s.type === Pe) ? "up" : null : null;
|
|
793
796
|
}
|
|
794
|
-
function
|
|
795
|
-
const { channel: s } =
|
|
796
|
-
() =>
|
|
797
|
+
function ps(t) {
|
|
798
|
+
const { channel: s } = Ie(), { client: n } = Xe("useMessageVote"), r = Le(
|
|
799
|
+
() => Ns(t.own_reactions),
|
|
797
800
|
[t.own_reactions]
|
|
798
|
-
), l =
|
|
801
|
+
), l = U(async () => {
|
|
799
802
|
if (n != null && n.userID)
|
|
800
803
|
try {
|
|
801
|
-
|
|
804
|
+
r === "up" ? await s.deleteReaction(t.id, Pe) : await s.sendReaction(
|
|
802
805
|
t.id,
|
|
803
|
-
{ type:
|
|
806
|
+
{ type: Pe },
|
|
804
807
|
{ enforce_unique: !0, skip_push: !0 }
|
|
805
808
|
);
|
|
806
809
|
} catch {
|
|
807
810
|
}
|
|
808
|
-
}, [s, n == null ? void 0 : n.userID, t.id,
|
|
811
|
+
}, [s, n == null ? void 0 : n.userID, t.id, r]), d = U(async () => {
|
|
809
812
|
if (n != null && n.userID)
|
|
810
813
|
try {
|
|
811
|
-
|
|
814
|
+
r === "down" ? await s.deleteReaction(t.id, Fe) : await s.sendReaction(
|
|
812
815
|
t.id,
|
|
813
|
-
{ type:
|
|
816
|
+
{ type: Fe },
|
|
814
817
|
{ enforce_unique: !0, skip_push: !0 }
|
|
815
818
|
);
|
|
816
819
|
} catch {
|
|
817
820
|
}
|
|
818
|
-
}, [s, n == null ? void 0 : n.userID, t.id,
|
|
819
|
-
return { selected:
|
|
821
|
+
}, [s, n == null ? void 0 : n.userID, t.id, r]);
|
|
822
|
+
return { selected: r, voteUp: l, voteDown: d };
|
|
820
823
|
}
|
|
821
|
-
const
|
|
824
|
+
const ys = F.lazy(() => import("./Creator-D38dWn2X.js")), vs = F.lazy(() => import("./Visitor-BG-9-3HU.js")), Ze = () => /* @__PURE__ */ e(
|
|
825
|
+
"div",
|
|
826
|
+
{
|
|
827
|
+
className: "w-[280px] min-h-[200px] animate-pulse rounded-3xl bg-black/[0.06] shadow-[0px_0px_0px_1px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04)]",
|
|
828
|
+
"aria-hidden": !0
|
|
829
|
+
}
|
|
830
|
+
), ws = (t) => {
|
|
831
|
+
if (t.isCreator) {
|
|
832
|
+
const { isCreator: r, ...l } = t;
|
|
833
|
+
return /* @__PURE__ */ e($e, { fallback: /* @__PURE__ */ e(Ze, {}), children: /* @__PURE__ */ e(ys, { ...l }) });
|
|
834
|
+
}
|
|
835
|
+
const { isCreator: s, ...n } = t;
|
|
836
|
+
return /* @__PURE__ */ e($e, { fallback: /* @__PURE__ */ e(Ze, {}), children: /* @__PURE__ */ e(vs, { ...n }) });
|
|
837
|
+
}, _s = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
822
838
|
"path",
|
|
823
839
|
{
|
|
824
840
|
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",
|
|
@@ -828,7 +844,7 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
828
844
|
strokeLinejoin: "round",
|
|
829
845
|
fill: t ? "currentColor" : "none"
|
|
830
846
|
}
|
|
831
|
-
) }),
|
|
847
|
+
) }), Es = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
832
848
|
"path",
|
|
833
849
|
{
|
|
834
850
|
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",
|
|
@@ -838,7 +854,7 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
838
854
|
strokeLinejoin: "round",
|
|
839
855
|
fill: t ? "currentColor" : "none"
|
|
840
856
|
}
|
|
841
|
-
) }),
|
|
857
|
+
) }), Ss = ({
|
|
842
858
|
selected: t,
|
|
843
859
|
onVoteUp: s,
|
|
844
860
|
onVoteDown: n
|
|
@@ -851,7 +867,7 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
851
867
|
onClick: s,
|
|
852
868
|
"aria-label": "Helpful",
|
|
853
869
|
"aria-pressed": t === "up",
|
|
854
|
-
children: /* @__PURE__ */ e(
|
|
870
|
+
children: /* @__PURE__ */ e(_s, { filled: t === "up" })
|
|
855
871
|
}
|
|
856
872
|
),
|
|
857
873
|
/* @__PURE__ */ e(
|
|
@@ -862,190 +878,208 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
862
878
|
onClick: n,
|
|
863
879
|
"aria-label": "Not helpful",
|
|
864
880
|
"aria-pressed": t === "down",
|
|
865
|
-
children: /* @__PURE__ */ e(
|
|
881
|
+
children: /* @__PURE__ */ e(Es, { filled: t === "down" })
|
|
866
882
|
}
|
|
867
883
|
)
|
|
868
|
-
] }),
|
|
869
|
-
var
|
|
884
|
+
] }), Is = (t) => {
|
|
885
|
+
var be, ae, X, Ce, Ne, pe, re, ye;
|
|
870
886
|
const {
|
|
871
887
|
additionalMessageInputProps: s,
|
|
872
888
|
chatbotVotingEnabled: n,
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
889
|
+
onAttachmentUnlock: r,
|
|
890
|
+
onAttachmentDownload: l,
|
|
891
|
+
editing: d,
|
|
892
|
+
endOfGroup: a,
|
|
893
|
+
firstOfGroup: c,
|
|
894
|
+
groupedByUser: g,
|
|
895
|
+
handleAction: h,
|
|
896
|
+
handleOpenThread: b,
|
|
897
|
+
handleRetry: N,
|
|
898
|
+
highlighted: S,
|
|
899
|
+
isMessageAIGenerated: m,
|
|
900
|
+
isMyMessage: I,
|
|
901
|
+
message: o,
|
|
902
|
+
renderText: v,
|
|
903
|
+
threadList: k
|
|
904
|
+
} = t, { client: y } = Xe("CustomMessage"), { channel: w } = Ie("CustomMessage"), [_, R] = T(!1), x = Nt(o.id), { selected: u, voteUp: f, voteDown: E } = ps(o), {
|
|
905
|
+
Attachment: C = yt,
|
|
906
|
+
EditMessageModal: p = vt,
|
|
907
|
+
MessageBlocked: O = wt,
|
|
908
|
+
MessageBouncePrompt: q = _t,
|
|
909
|
+
MessageDeleted: Z = Et,
|
|
910
|
+
MessageIsThreadReplyInChannelButtonIndicator: Q = St,
|
|
911
|
+
MessageRepliesCountButton: D = It,
|
|
912
|
+
ReminderNotification: $ = Mt,
|
|
913
|
+
StreamedMessageText: z = kt,
|
|
914
|
+
PinIndicator: ee
|
|
915
|
+
} = pt("CustomMessage"), le = Tt(o), ie = Dt(o), ce = Le(
|
|
916
|
+
() => m == null ? void 0 : m(o),
|
|
917
|
+
[m, o]
|
|
918
|
+
), A = Le(
|
|
919
|
+
() => !o.shared_location && !o.attachments ? [] : o.shared_location ? [o.shared_location, ...o.attachments ?? []] : o.attachments,
|
|
920
|
+
[o]
|
|
903
921
|
);
|
|
904
|
-
if (
|
|
922
|
+
if (Rt(o))
|
|
905
923
|
return null;
|
|
906
|
-
if (
|
|
907
|
-
return /* @__PURE__ */ e(
|
|
908
|
-
if (
|
|
909
|
-
return /* @__PURE__ */ e(
|
|
910
|
-
const
|
|
911
|
-
let
|
|
912
|
-
|
|
913
|
-
const
|
|
924
|
+
if (o.deleted_at || o.type === "deleted")
|
|
925
|
+
return /* @__PURE__ */ e(Z, { message: o });
|
|
926
|
+
if (At(o))
|
|
927
|
+
return /* @__PURE__ */ e(O, {});
|
|
928
|
+
const P = !k && !!o.reply_count, H = !k && o.show_in_channel && o.parent_id, Y = o.status === "failed" && ((be = o.error) == null ? void 0 : be.status) !== 403, te = Lt(o);
|
|
929
|
+
let se;
|
|
930
|
+
Y ? se = () => N(o) : te && (se = () => R(!0));
|
|
931
|
+
const G = I(), de = L(
|
|
914
932
|
"str-chat__message str-chat__message-simple",
|
|
915
|
-
`str-chat__message--${
|
|
916
|
-
`str-chat__message--${
|
|
917
|
-
|
|
918
|
-
|
|
933
|
+
`str-chat__message--${o.type}`,
|
|
934
|
+
`str-chat__message--${o.status}`,
|
|
935
|
+
G ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
936
|
+
o.text ? "str-chat__message--has-text" : "has-no-text",
|
|
919
937
|
{
|
|
920
|
-
"str-chat__message--has-attachment":
|
|
921
|
-
"str-chat__message--highlighted":
|
|
922
|
-
"str-chat__message--pinned pinned-message":
|
|
923
|
-
"str-chat__message--with-reactions":
|
|
924
|
-
"str-chat__message-send-can-be-retried": (
|
|
925
|
-
"str-chat__message-with-thread-link":
|
|
926
|
-
"str-chat__virtual-message__wrapper--end":
|
|
927
|
-
"str-chat__virtual-message__wrapper--first":
|
|
928
|
-
"str-chat__virtual-message__wrapper--group":
|
|
938
|
+
"str-chat__message--has-attachment": le,
|
|
939
|
+
"str-chat__message--highlighted": S,
|
|
940
|
+
"str-chat__message--pinned pinned-message": o.pinned,
|
|
941
|
+
"str-chat__message--with-reactions": ie,
|
|
942
|
+
"str-chat__message-send-can-be-retried": (o == null ? void 0 : o.status) === "failed" && ((ae = o == null ? void 0 : o.error) == null ? void 0 : ae.status) !== 403,
|
|
943
|
+
"str-chat__message-with-thread-link": P || H,
|
|
944
|
+
"str-chat__virtual-message__wrapper--end": a,
|
|
945
|
+
"str-chat__virtual-message__wrapper--first": c,
|
|
946
|
+
"str-chat__virtual-message__wrapper--group": g
|
|
929
947
|
}
|
|
930
|
-
),
|
|
931
|
-
return /* @__PURE__ */ i(
|
|
932
|
-
|
|
933
|
-
|
|
948
|
+
), fe = o.poll_id && y.polls.fromState(o.poll_id), ne = gs(o), J = Be(o), ge = fs(o), me = !!(A != null && A.length && !o.quoted_message), xe = J && G && me;
|
|
949
|
+
return /* @__PURE__ */ i(he, { children: [
|
|
950
|
+
d && /* @__PURE__ */ e(
|
|
951
|
+
p,
|
|
934
952
|
{
|
|
935
953
|
additionalMessageInputProps: s
|
|
936
954
|
}
|
|
937
955
|
),
|
|
938
|
-
|
|
939
|
-
|
|
956
|
+
_ && /* @__PURE__ */ e(
|
|
957
|
+
Ut,
|
|
940
958
|
{
|
|
941
|
-
MessageBouncePrompt:
|
|
942
|
-
onClose: () =>
|
|
943
|
-
open:
|
|
959
|
+
MessageBouncePrompt: q,
|
|
960
|
+
onClose: () => R(!1),
|
|
961
|
+
open: _
|
|
944
962
|
}
|
|
945
963
|
),
|
|
946
|
-
/* @__PURE__ */ i("div", { className:
|
|
947
|
-
|
|
948
|
-
!!
|
|
949
|
-
|
|
950
|
-
|
|
964
|
+
/* @__PURE__ */ i("div", { className: de, children: [
|
|
965
|
+
ee && /* @__PURE__ */ e(ee, {}),
|
|
966
|
+
!!x && /* @__PURE__ */ e($, { reminder: x }),
|
|
967
|
+
o.user && /* @__PURE__ */ e(
|
|
968
|
+
oe,
|
|
951
969
|
{
|
|
952
970
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
953
|
-
id:
|
|
954
|
-
image:
|
|
955
|
-
name:
|
|
971
|
+
id: o.user.id,
|
|
972
|
+
image: o.user.image,
|
|
973
|
+
name: o.user.name || o.user.id
|
|
956
974
|
}
|
|
957
975
|
),
|
|
958
976
|
/* @__PURE__ */ e(
|
|
959
977
|
"div",
|
|
960
978
|
{
|
|
961
|
-
className:
|
|
962
|
-
"str-chat__simple-message--error-failed":
|
|
979
|
+
className: L("str-chat__message-inner", {
|
|
980
|
+
"str-chat__simple-message--error-failed": Y || te
|
|
963
981
|
}),
|
|
964
982
|
"data-testid": "message-inner",
|
|
965
|
-
onClick:
|
|
966
|
-
onKeyDown:
|
|
967
|
-
role:
|
|
968
|
-
tabIndex:
|
|
983
|
+
onClick: se,
|
|
984
|
+
onKeyDown: se,
|
|
985
|
+
role: se ? "button" : void 0,
|
|
986
|
+
tabIndex: se ? 0 : void 0,
|
|
969
987
|
style: {
|
|
970
988
|
// Force margins to 0 to prevent hover layout shift
|
|
971
989
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
972
990
|
marginInlineEnd: 0,
|
|
973
991
|
marginInlineStart: 0
|
|
974
992
|
},
|
|
975
|
-
children:
|
|
993
|
+
children: ge ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
|
|
994
|
+
/* @__PURE__ */ e(
|
|
995
|
+
ws,
|
|
996
|
+
{
|
|
997
|
+
isCreator: G,
|
|
998
|
+
title: (X = o.metadata) == null ? void 0 : X.attachment_title,
|
|
999
|
+
mimeType: (Ce = o.metadata) == null ? void 0 : Ce.attachment_mime_type,
|
|
1000
|
+
thumbnail: (Ne = o.metadata) == null ? void 0 : Ne.attachment_thumbnail,
|
|
1001
|
+
amountText: (pe = o.metadata) == null ? void 0 : pe.amount_text,
|
|
1002
|
+
detail: (re = o.metadata) == null ? void 0 : re.attachment_detail,
|
|
1003
|
+
paymentStatus: (ye = o.metadata) == null ? void 0 : ye.payment_status,
|
|
1004
|
+
onUnlock: r ? () => r(o, w) : void 0,
|
|
1005
|
+
onDownload: l ? () => l(o, w) : void 0
|
|
1006
|
+
}
|
|
1007
|
+
),
|
|
1008
|
+
o.text && /* @__PURE__ */ e("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ e("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ e(je, { message: o, renderText: v }) }) })
|
|
1009
|
+
] }) : ne ? (
|
|
976
1010
|
/* Tip-only messages render as a standalone bubble */
|
|
977
|
-
/* @__PURE__ */ e(
|
|
1011
|
+
/* @__PURE__ */ e(Re, { message: o, standalone: !0 })
|
|
978
1012
|
) : /* @__PURE__ */ i("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
979
1013
|
/* @__PURE__ */ i("div", { className: "str-chat__message-bubble", children: [
|
|
980
|
-
J && !
|
|
981
|
-
|
|
1014
|
+
J && !xe && /* @__PURE__ */ e(
|
|
1015
|
+
Re,
|
|
982
1016
|
{
|
|
983
|
-
message:
|
|
984
|
-
hasAttachment:
|
|
985
|
-
isMyMessage:
|
|
1017
|
+
message: o,
|
|
1018
|
+
hasAttachment: me,
|
|
1019
|
+
isMyMessage: G
|
|
986
1020
|
}
|
|
987
1021
|
),
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1022
|
+
fe && /* @__PURE__ */ e(Pt, { poll: fe }),
|
|
1023
|
+
A != null && A.length && !o.quoted_message ? /* @__PURE__ */ e(
|
|
1024
|
+
C,
|
|
991
1025
|
{
|
|
992
|
-
actionHandler:
|
|
993
|
-
attachments:
|
|
1026
|
+
actionHandler: h,
|
|
1027
|
+
attachments: A
|
|
994
1028
|
}
|
|
995
1029
|
) : null,
|
|
996
|
-
|
|
997
|
-
|
|
1030
|
+
ce ? /* @__PURE__ */ e(
|
|
1031
|
+
z,
|
|
998
1032
|
{
|
|
999
|
-
message:
|
|
1000
|
-
renderText:
|
|
1033
|
+
message: o,
|
|
1034
|
+
renderText: v
|
|
1001
1035
|
}
|
|
1002
|
-
) : /* @__PURE__ */ e(
|
|
1003
|
-
/* @__PURE__ */ e(
|
|
1036
|
+
) : /* @__PURE__ */ e(je, { message: o, renderText: v }),
|
|
1037
|
+
/* @__PURE__ */ e(Ft, {})
|
|
1004
1038
|
] }),
|
|
1005
|
-
(!J ||
|
|
1006
|
-
|
|
1039
|
+
(!J || xe) && /* @__PURE__ */ e(
|
|
1040
|
+
Re,
|
|
1007
1041
|
{
|
|
1008
|
-
message:
|
|
1009
|
-
hasAttachment:
|
|
1010
|
-
isMyMessage:
|
|
1042
|
+
message: o,
|
|
1043
|
+
hasAttachment: me,
|
|
1044
|
+
isMyMessage: G
|
|
1011
1045
|
}
|
|
1012
1046
|
),
|
|
1013
1047
|
n && J && /* @__PURE__ */ e(
|
|
1014
|
-
|
|
1048
|
+
Ss,
|
|
1015
1049
|
{
|
|
1016
|
-
selected:
|
|
1017
|
-
onVoteUp:
|
|
1018
|
-
onVoteDown:
|
|
1050
|
+
selected: u,
|
|
1051
|
+
onVoteUp: f,
|
|
1052
|
+
onVoteDown: E
|
|
1019
1053
|
}
|
|
1020
1054
|
)
|
|
1021
1055
|
] })
|
|
1022
1056
|
}
|
|
1023
1057
|
),
|
|
1024
|
-
|
|
1025
|
-
|
|
1058
|
+
P && /* @__PURE__ */ e(
|
|
1059
|
+
D,
|
|
1026
1060
|
{
|
|
1027
|
-
onClick:
|
|
1028
|
-
reply_count:
|
|
1061
|
+
onClick: b,
|
|
1062
|
+
reply_count: o.reply_count
|
|
1029
1063
|
}
|
|
1030
1064
|
),
|
|
1031
|
-
|
|
1032
|
-
] },
|
|
1065
|
+
H && /* @__PURE__ */ e(Q, {})
|
|
1066
|
+
] }, o.id)
|
|
1033
1067
|
] });
|
|
1034
|
-
},
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
),
|
|
1038
|
-
const s =
|
|
1039
|
-
return /* @__PURE__ */ e(
|
|
1040
|
-
},
|
|
1068
|
+
}, Ms = F.memo(
|
|
1069
|
+
Is,
|
|
1070
|
+
(t, s) => t.chatbotVotingEnabled !== s.chatbotVotingEnabled || t.onAttachmentUnlock !== s.onAttachmentUnlock || t.onAttachmentDownload !== s.onAttachmentDownload ? !1 : Ct(t, s)
|
|
1071
|
+
), ks = (t) => {
|
|
1072
|
+
const s = Ke("CustomMessage");
|
|
1073
|
+
return /* @__PURE__ */ e(Ms, { ...s, ...t });
|
|
1074
|
+
}, Ts = (t) => ({
|
|
1041
1075
|
linkPreviews: Array.from(t.previews.values()).filter(
|
|
1042
|
-
(s) =>
|
|
1076
|
+
(s) => We.previewIsLoaded(s) || We.previewIsLoading(s)
|
|
1043
1077
|
)
|
|
1044
|
-
}),
|
|
1078
|
+
}), Ds = ({
|
|
1045
1079
|
link: t,
|
|
1046
1080
|
onDismiss: s
|
|
1047
1081
|
}) => {
|
|
1048
|
-
const { og_scrape_url: n, title:
|
|
1082
|
+
const { og_scrape_url: n, title: r, image_url: l } = t;
|
|
1049
1083
|
return /* @__PURE__ */ i(
|
|
1050
1084
|
"a",
|
|
1051
1085
|
{
|
|
@@ -1058,7 +1092,7 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1058
1092
|
"img",
|
|
1059
1093
|
{
|
|
1060
1094
|
src: l,
|
|
1061
|
-
alt:
|
|
1095
|
+
alt: r || "",
|
|
1062
1096
|
className: "h-[148px] w-full rounded-[20px] object-cover"
|
|
1063
1097
|
}
|
|
1064
1098
|
),
|
|
@@ -1066,47 +1100,47 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1066
1100
|
"button",
|
|
1067
1101
|
{
|
|
1068
1102
|
type: "button",
|
|
1069
|
-
onClick: (
|
|
1070
|
-
|
|
1103
|
+
onClick: (a) => {
|
|
1104
|
+
a.preventDefault(), s(n);
|
|
1071
1105
|
},
|
|
1072
1106
|
className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
|
|
1073
1107
|
"aria-label": "Close link preview",
|
|
1074
|
-
children: /* @__PURE__ */ e(
|
|
1108
|
+
children: /* @__PURE__ */ e(Oe, { className: "size-4 text-black/90" })
|
|
1075
1109
|
}
|
|
1076
1110
|
),
|
|
1077
1111
|
/* @__PURE__ */ i("div", { className: "p-2", children: [
|
|
1078
|
-
|
|
1112
|
+
r && /* @__PURE__ */ e("div", { className: "text-[14px] font-medium leading-5 text-white", children: r }),
|
|
1079
1113
|
/* @__PURE__ */ e("div", { className: "text-[12px] leading-4 text-white/55", children: n })
|
|
1080
1114
|
] })
|
|
1081
1115
|
]
|
|
1082
1116
|
}
|
|
1083
1117
|
);
|
|
1084
|
-
},
|
|
1085
|
-
const { linkPreviewsManager: t } =
|
|
1118
|
+
}, Rs = () => {
|
|
1119
|
+
const { linkPreviewsManager: t } = Ot(), { linkPreviews: s } = Bt(
|
|
1086
1120
|
t.state,
|
|
1087
|
-
|
|
1121
|
+
Ts
|
|
1088
1122
|
), n = (l) => {
|
|
1089
1123
|
t.dismissPreview(l);
|
|
1090
1124
|
};
|
|
1091
1125
|
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(
|
|
1092
|
-
|
|
1126
|
+
Ds,
|
|
1093
1127
|
{
|
|
1094
1128
|
link: l,
|
|
1095
1129
|
onDismiss: n
|
|
1096
1130
|
},
|
|
1097
1131
|
l.og_scrape_url
|
|
1098
1132
|
)) }) : null;
|
|
1099
|
-
},
|
|
1100
|
-
const { handleSubmit: t } =
|
|
1101
|
-
return /* @__PURE__ */ i(
|
|
1102
|
-
/* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(
|
|
1133
|
+
}, As = () => {
|
|
1134
|
+
const { handleSubmit: t } = $t(), s = jt();
|
|
1135
|
+
return /* @__PURE__ */ i(he, { children: [
|
|
1136
|
+
/* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(zt, {}) }),
|
|
1103
1137
|
/* @__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: [
|
|
1104
|
-
/* @__PURE__ */ e(
|
|
1105
|
-
/* @__PURE__ */ e(
|
|
1106
|
-
/* @__PURE__ */ e(
|
|
1138
|
+
/* @__PURE__ */ e(Ht, {}),
|
|
1139
|
+
/* @__PURE__ */ e(Rs, {}),
|
|
1140
|
+
/* @__PURE__ */ e(Vt, {}),
|
|
1107
1141
|
/* @__PURE__ */ i("div", { className: "flex", children: [
|
|
1108
1142
|
/* @__PURE__ */ e("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ e(
|
|
1109
|
-
|
|
1143
|
+
Yt,
|
|
1110
1144
|
{
|
|
1111
1145
|
className: "w-full resize-none outline-none leading-6",
|
|
1112
1146
|
autoFocus: !0,
|
|
@@ -1122,72 +1156,72 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1122
1156
|
disabled: !s,
|
|
1123
1157
|
onClick: t,
|
|
1124
1158
|
type: "button",
|
|
1125
|
-
children: /* @__PURE__ */ e(
|
|
1159
|
+
children: /* @__PURE__ */ e(es, { className: "size-4" })
|
|
1126
1160
|
}
|
|
1127
1161
|
)
|
|
1128
1162
|
] })
|
|
1129
1163
|
] })
|
|
1130
1164
|
] });
|
|
1131
|
-
},
|
|
1165
|
+
}, Ls = ({
|
|
1132
1166
|
renderActions: t
|
|
1133
1167
|
}) => /* @__PURE__ */ i("div", { className: "message-input flex items-center gap-2 p-4", children: [
|
|
1134
1168
|
t && (t == null ? void 0 : t()),
|
|
1135
|
-
/* @__PURE__ */ e(
|
|
1136
|
-
] }),
|
|
1169
|
+
/* @__PURE__ */ e(Gt, { Input: As })
|
|
1170
|
+
] }), Us = [
|
|
1137
1171
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1138
1172
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1139
|
-
],
|
|
1173
|
+
], Ps = {
|
|
1140
1174
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
1141
1175
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
1142
|
-
},
|
|
1176
|
+
}, Fs = [
|
|
1143
1177
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1144
|
-
],
|
|
1178
|
+
], Os = {
|
|
1145
1179
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1146
|
-
},
|
|
1147
|
-
var
|
|
1148
|
-
const s = (
|
|
1149
|
-
if (
|
|
1180
|
+
}, Ae = "age safety guidelines.", Bs = "https://linktr.ee/s/about/contact", Je = (t) => Us.includes(t), Gs = (t) => Fs.includes(t), $s = (t) => {
|
|
1181
|
+
var r;
|
|
1182
|
+
const s = (r = t.metadata) == null ? void 0 : r.custom_type;
|
|
1183
|
+
if (Je(s))
|
|
1150
1184
|
return {
|
|
1151
1185
|
kind: "dm-agent",
|
|
1152
1186
|
type: s
|
|
1153
1187
|
};
|
|
1154
|
-
if (
|
|
1188
|
+
if (Gs(s))
|
|
1155
1189
|
return {
|
|
1156
1190
|
kind: "age-safety",
|
|
1157
1191
|
type: s
|
|
1158
1192
|
};
|
|
1159
1193
|
const n = t.dm_agent_system_type;
|
|
1160
|
-
if (
|
|
1194
|
+
if (Je(n))
|
|
1161
1195
|
return {
|
|
1162
1196
|
kind: "dm-agent",
|
|
1163
1197
|
type: n
|
|
1164
1198
|
};
|
|
1165
|
-
},
|
|
1166
|
-
const s = t.indexOf(
|
|
1199
|
+
}, js = (t) => {
|
|
1200
|
+
const s = t.indexOf(Ae);
|
|
1167
1201
|
if (s === -1)
|
|
1168
1202
|
return t;
|
|
1169
|
-
const n = s +
|
|
1170
|
-
return /* @__PURE__ */ i(
|
|
1203
|
+
const n = s + Ae.length;
|
|
1204
|
+
return /* @__PURE__ */ i(he, { children: [
|
|
1171
1205
|
t.slice(0, s),
|
|
1172
1206
|
/* @__PURE__ */ e(
|
|
1173
1207
|
"a",
|
|
1174
1208
|
{
|
|
1175
|
-
href:
|
|
1209
|
+
href: Bs,
|
|
1176
1210
|
target: "_blank",
|
|
1177
1211
|
rel: "noopener noreferrer",
|
|
1178
1212
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
1179
|
-
children:
|
|
1213
|
+
children: Ae
|
|
1180
1214
|
}
|
|
1181
1215
|
),
|
|
1182
1216
|
t.slice(n)
|
|
1183
1217
|
] });
|
|
1184
|
-
},
|
|
1185
|
-
var
|
|
1186
|
-
const s = t.message.hide_date === !0, n =
|
|
1218
|
+
}, zs = (t) => {
|
|
1219
|
+
var r, l;
|
|
1220
|
+
const s = t.message.hide_date === !0, n = $s(
|
|
1187
1221
|
t.message
|
|
1188
1222
|
);
|
|
1189
1223
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
1190
|
-
const d = ((
|
|
1224
|
+
const d = ((r = t.message.text) == null ? void 0 : r.trim()) || Ps[n.type];
|
|
1191
1225
|
return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1192
1226
|
/* @__PURE__ */ i(
|
|
1193
1227
|
"div",
|
|
@@ -1197,7 +1231,7 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1197
1231
|
"data-dm-agent-system-type": n.type,
|
|
1198
1232
|
children: [
|
|
1199
1233
|
/* @__PURE__ */ e(
|
|
1200
|
-
|
|
1234
|
+
ts,
|
|
1201
1235
|
{
|
|
1202
1236
|
size: 16,
|
|
1203
1237
|
weight: "regular",
|
|
@@ -1209,11 +1243,11 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1209
1243
|
]
|
|
1210
1244
|
}
|
|
1211
1245
|
),
|
|
1212
|
-
!s && /* @__PURE__ */ e(
|
|
1246
|
+
!s && /* @__PURE__ */ e(De, { message: t.message })
|
|
1213
1247
|
] });
|
|
1214
1248
|
}
|
|
1215
1249
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
1216
|
-
const d = ((l = t.message.text) == null ? void 0 : l.trim()) ||
|
|
1250
|
+
const d = ((l = t.message.text) == null ? void 0 : l.trim()) || Os[n.type];
|
|
1217
1251
|
return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1218
1252
|
/* @__PURE__ */ i(
|
|
1219
1253
|
"div",
|
|
@@ -1223,7 +1257,7 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1223
1257
|
"data-age-safety-system-type": n.type,
|
|
1224
1258
|
children: [
|
|
1225
1259
|
/* @__PURE__ */ e(
|
|
1226
|
-
|
|
1260
|
+
ss,
|
|
1227
1261
|
{
|
|
1228
1262
|
size: 24,
|
|
1229
1263
|
weight: "duotone",
|
|
@@ -1232,11 +1266,11 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1232
1266
|
"data-testid": "age-safety-system-message-icon"
|
|
1233
1267
|
}
|
|
1234
1268
|
),
|
|
1235
|
-
/* @__PURE__ */ e("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ e("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
1269
|
+
/* @__PURE__ */ e("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ e("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: js(d) }) })
|
|
1236
1270
|
]
|
|
1237
1271
|
}
|
|
1238
1272
|
),
|
|
1239
|
-
!s && /* @__PURE__ */ e(
|
|
1273
|
+
!s && /* @__PURE__ */ e(De, { message: t.message })
|
|
1240
1274
|
] });
|
|
1241
1275
|
}
|
|
1242
1276
|
return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -1245,12 +1279,12 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1245
1279
|
/* @__PURE__ */ e("p", { children: t.message.text }),
|
|
1246
1280
|
/* @__PURE__ */ e("div", { className: "str-chat__message--system__line" })
|
|
1247
1281
|
] }),
|
|
1248
|
-
!s && /* @__PURE__ */ e(
|
|
1282
|
+
!s && /* @__PURE__ */ e(De, { message: t.message })
|
|
1249
1283
|
] });
|
|
1250
|
-
},
|
|
1284
|
+
}, Hs = () => null, Vs = ({ className: t, message: s }) => /* @__PURE__ */ i(
|
|
1251
1285
|
"div",
|
|
1252
1286
|
{
|
|
1253
|
-
className:
|
|
1287
|
+
className: L("flex items-center justify-center h-full", t),
|
|
1254
1288
|
children: [
|
|
1255
1289
|
/* @__PURE__ */ i("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
1256
1290
|
/* @__PURE__ */ e("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ e(
|
|
@@ -1290,31 +1324,31 @@ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1290
1324
|
s && /* @__PURE__ */ e("span", { className: "text-stone", children: s })
|
|
1291
1325
|
]
|
|
1292
1326
|
}
|
|
1293
|
-
),
|
|
1294
|
-
/* @__PURE__ */ e(
|
|
1327
|
+
), Se = F.memo(() => /* @__PURE__ */ e("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
1328
|
+
/* @__PURE__ */ e(Vs, { className: "w-6 h-6" }),
|
|
1295
1329
|
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
1296
1330
|
] }) }));
|
|
1297
|
-
|
|
1298
|
-
const
|
|
1331
|
+
Se.displayName = "LoadingState";
|
|
1332
|
+
const ue = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ys = ({
|
|
1299
1333
|
onBack: t,
|
|
1300
1334
|
showBackButton: s,
|
|
1301
1335
|
onShowInfo: n,
|
|
1302
|
-
canShowInfo:
|
|
1336
|
+
canShowInfo: r,
|
|
1303
1337
|
showStarButton: l = !1
|
|
1304
1338
|
}) => {
|
|
1305
|
-
var
|
|
1306
|
-
const { channel: d } =
|
|
1307
|
-
(
|
|
1308
|
-
var
|
|
1309
|
-
return ((
|
|
1339
|
+
var N, S, m, I, o;
|
|
1340
|
+
const { channel: d } = Ie(), a = F.useMemo(() => Object.values(d.state.members || {}).find(
|
|
1341
|
+
(k) => {
|
|
1342
|
+
var y;
|
|
1343
|
+
return ((y = k.user) == null ? void 0 : y.id) && k.user.id !== d._client.userID;
|
|
1310
1344
|
}
|
|
1311
|
-
), [d._client.userID, d.state.members]), c = ((
|
|
1345
|
+
), [d._client.userID, d.state.members]), c = ((N = a == null ? void 0 : a.user) == null ? void 0 : N.name) || ((S = a == null ? void 0 : a.user) == null ? void 0 : S.id) || "Unknown member", g = (m = a == null ? void 0 : a.user) == null ? void 0 : m.image, h = tt(d), b = async () => {
|
|
1312
1346
|
try {
|
|
1313
1347
|
h ? await d.unpin() : await d.pin();
|
|
1314
|
-
} catch (
|
|
1348
|
+
} catch (v) {
|
|
1315
1349
|
console.error(
|
|
1316
1350
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
1317
|
-
|
|
1351
|
+
v
|
|
1318
1352
|
);
|
|
1319
1353
|
}
|
|
1320
1354
|
};
|
|
@@ -1323,21 +1357,21 @@ const ce = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1323
1357
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: s && /* @__PURE__ */ e(
|
|
1324
1358
|
"button",
|
|
1325
1359
|
{
|
|
1326
|
-
className:
|
|
1360
|
+
className: ue,
|
|
1327
1361
|
onClick: t || (() => {
|
|
1328
1362
|
}),
|
|
1329
1363
|
type: "button",
|
|
1330
1364
|
"aria-label": "Back to conversations",
|
|
1331
|
-
children: /* @__PURE__ */ e(
|
|
1365
|
+
children: /* @__PURE__ */ e(He, { className: "size-5 text-black/90" })
|
|
1332
1366
|
}
|
|
1333
1367
|
) }),
|
|
1334
1368
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
1335
1369
|
/* @__PURE__ */ e(
|
|
1336
|
-
|
|
1370
|
+
oe,
|
|
1337
1371
|
{
|
|
1338
|
-
id: ((
|
|
1372
|
+
id: ((I = a == null ? void 0 : a.user) == null ? void 0 : I.id) || d.id || "unknown",
|
|
1339
1373
|
name: c,
|
|
1340
|
-
image:
|
|
1374
|
+
image: g,
|
|
1341
1375
|
starred: l && h,
|
|
1342
1376
|
size: 40
|
|
1343
1377
|
}
|
|
@@ -1348,14 +1382,14 @@ const ce = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1348
1382
|
l && /* @__PURE__ */ e(
|
|
1349
1383
|
"button",
|
|
1350
1384
|
{
|
|
1351
|
-
className:
|
|
1352
|
-
onClick:
|
|
1385
|
+
className: ue,
|
|
1386
|
+
onClick: b,
|
|
1353
1387
|
type: "button",
|
|
1354
1388
|
"aria-label": h ? "Unstar conversation" : "Star conversation",
|
|
1355
1389
|
children: /* @__PURE__ */ e(
|
|
1356
|
-
|
|
1390
|
+
Ue,
|
|
1357
1391
|
{
|
|
1358
|
-
className:
|
|
1392
|
+
className: L("size-5", {
|
|
1359
1393
|
"text-yellow-600": h,
|
|
1360
1394
|
"text-black/90": !h
|
|
1361
1395
|
}),
|
|
@@ -1367,11 +1401,11 @@ const ce = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1367
1401
|
/* @__PURE__ */ e(
|
|
1368
1402
|
"button",
|
|
1369
1403
|
{
|
|
1370
|
-
className:
|
|
1404
|
+
className: ue,
|
|
1371
1405
|
onClick: n,
|
|
1372
1406
|
type: "button",
|
|
1373
1407
|
"aria-label": "Show info",
|
|
1374
|
-
children: /* @__PURE__ */ e(
|
|
1408
|
+
children: /* @__PURE__ */ e(Ve, { className: "size-5 text-black/90" })
|
|
1375
1409
|
}
|
|
1376
1410
|
)
|
|
1377
1411
|
] })
|
|
@@ -1383,17 +1417,17 @@ const ce = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1383
1417
|
{
|
|
1384
1418
|
type: "button",
|
|
1385
1419
|
onClick: t,
|
|
1386
|
-
className:
|
|
1420
|
+
className: ue,
|
|
1387
1421
|
"aria-label": "Back to conversations",
|
|
1388
|
-
children: /* @__PURE__ */ e(
|
|
1422
|
+
children: /* @__PURE__ */ e(He, { className: "size-5 text-black/90" })
|
|
1389
1423
|
}
|
|
1390
1424
|
),
|
|
1391
1425
|
/* @__PURE__ */ e(
|
|
1392
|
-
|
|
1426
|
+
oe,
|
|
1393
1427
|
{
|
|
1394
|
-
id: ((
|
|
1428
|
+
id: ((o = a == null ? void 0 : a.user) == null ? void 0 : o.id) || d.id || "unknown",
|
|
1395
1429
|
name: c,
|
|
1396
|
-
image:
|
|
1430
|
+
image: g,
|
|
1397
1431
|
starred: l && h,
|
|
1398
1432
|
size: 40
|
|
1399
1433
|
}
|
|
@@ -1404,14 +1438,14 @@ const ce = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1404
1438
|
l && /* @__PURE__ */ e(
|
|
1405
1439
|
"button",
|
|
1406
1440
|
{
|
|
1407
|
-
className:
|
|
1408
|
-
onClick:
|
|
1441
|
+
className: ue,
|
|
1442
|
+
onClick: b,
|
|
1409
1443
|
type: "button",
|
|
1410
1444
|
"aria-label": h ? "Unstar conversation" : "Star conversation",
|
|
1411
1445
|
children: /* @__PURE__ */ e(
|
|
1412
|
-
|
|
1446
|
+
Ue,
|
|
1413
1447
|
{
|
|
1414
|
-
className:
|
|
1448
|
+
className: L("size-5", {
|
|
1415
1449
|
"text-yellow-600": h,
|
|
1416
1450
|
"text-black/90": !h
|
|
1417
1451
|
}),
|
|
@@ -1420,201 +1454,209 @@ const ce = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1420
1454
|
)
|
|
1421
1455
|
}
|
|
1422
1456
|
),
|
|
1423
|
-
|
|
1457
|
+
r && n && /* @__PURE__ */ e(
|
|
1424
1458
|
"button",
|
|
1425
1459
|
{
|
|
1426
|
-
className:
|
|
1460
|
+
className: ue,
|
|
1427
1461
|
onClick: n,
|
|
1428
1462
|
type: "button",
|
|
1429
1463
|
"aria-label": "Show info",
|
|
1430
|
-
children: /* @__PURE__ */ e(
|
|
1464
|
+
children: /* @__PURE__ */ e(Ve, { className: "size-5 text-black/90" })
|
|
1431
1465
|
}
|
|
1432
1466
|
)
|
|
1433
1467
|
] })
|
|
1434
1468
|
] })
|
|
1435
1469
|
] });
|
|
1436
|
-
},
|
|
1470
|
+
}, Ws = ({
|
|
1437
1471
|
onBack: t,
|
|
1438
1472
|
showBackButton: s,
|
|
1439
1473
|
renderMessageInputActions: n,
|
|
1440
|
-
renderConversationFooter:
|
|
1474
|
+
renderConversationFooter: r,
|
|
1441
1475
|
onLeaveConversation: l,
|
|
1442
1476
|
onBlockParticipant: d,
|
|
1443
|
-
showDeleteConversation:
|
|
1477
|
+
showDeleteConversation: a = !0,
|
|
1444
1478
|
onDeleteConversationClick: c,
|
|
1445
|
-
onBlockParticipantClick:
|
|
1479
|
+
onBlockParticipantClick: g,
|
|
1446
1480
|
onReportParticipantClick: h,
|
|
1447
|
-
showStarButton:
|
|
1448
|
-
chatbotVotingEnabled:
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1481
|
+
showStarButton: b = !1,
|
|
1482
|
+
chatbotVotingEnabled: N = !1,
|
|
1483
|
+
onAttachmentUnlock: S,
|
|
1484
|
+
onAttachmentDownload: m,
|
|
1485
|
+
renderChannelBanner: I,
|
|
1486
|
+
customProfileContent: o,
|
|
1487
|
+
customChannelActions: v,
|
|
1488
|
+
renderMessage: k
|
|
1453
1489
|
}) => {
|
|
1454
|
-
const { channel:
|
|
1455
|
-
(
|
|
1490
|
+
const { channel: y } = Ie(), w = K(null), _ = F.useMemo(() => Object.values(y.state.members || {}).find(
|
|
1491
|
+
(E) => {
|
|
1456
1492
|
var C;
|
|
1457
|
-
return ((C =
|
|
1493
|
+
return ((C = E.user) == null ? void 0 : C.id) && E.user.id !== y._client.userID;
|
|
1458
1494
|
}
|
|
1459
|
-
), [
|
|
1460
|
-
const
|
|
1461
|
-
if (
|
|
1462
|
-
return String(
|
|
1463
|
-
if (
|
|
1464
|
-
return
|
|
1465
|
-
}, [
|
|
1466
|
-
var
|
|
1467
|
-
(
|
|
1468
|
-
}, []),
|
|
1469
|
-
var
|
|
1470
|
-
(
|
|
1495
|
+
), [y._client.userID, y.state.members]), R = F.useMemo(() => {
|
|
1496
|
+
const f = y.data ?? {};
|
|
1497
|
+
if (f.followerStatus)
|
|
1498
|
+
return String(f.followerStatus);
|
|
1499
|
+
if (f.isFollower !== void 0)
|
|
1500
|
+
return f.isFollower ? "Subscribed to you" : "Not subscribed";
|
|
1501
|
+
}, [y.data]), x = U(() => {
|
|
1502
|
+
var f;
|
|
1503
|
+
(f = w.current) == null || f.showModal();
|
|
1504
|
+
}, []), u = U(() => {
|
|
1505
|
+
var f;
|
|
1506
|
+
(f = w.current) == null || f.close();
|
|
1471
1507
|
}, []);
|
|
1472
|
-
return /* @__PURE__ */ i(
|
|
1508
|
+
return /* @__PURE__ */ i(he, { children: [
|
|
1473
1509
|
/* @__PURE__ */ e(
|
|
1474
|
-
|
|
1510
|
+
qt,
|
|
1475
1511
|
{
|
|
1476
1512
|
overrides: {
|
|
1477
|
-
Message: (
|
|
1478
|
-
const { message:
|
|
1479
|
-
|
|
1513
|
+
Message: (f) => {
|
|
1514
|
+
const { message: E } = Ke("ChannelView"), C = /* @__PURE__ */ e(
|
|
1515
|
+
ks,
|
|
1480
1516
|
{
|
|
1481
|
-
...
|
|
1482
|
-
chatbotVotingEnabled:
|
|
1517
|
+
...f,
|
|
1518
|
+
chatbotVotingEnabled: N,
|
|
1519
|
+
onAttachmentUnlock: S,
|
|
1520
|
+
onAttachmentDownload: m
|
|
1483
1521
|
}
|
|
1484
1522
|
);
|
|
1485
|
-
return !
|
|
1523
|
+
return !k || !E ? C : k(C, E);
|
|
1486
1524
|
}
|
|
1487
1525
|
},
|
|
1488
|
-
children: /* @__PURE__ */ i(
|
|
1526
|
+
children: /* @__PURE__ */ i(Zt, { children: [
|
|
1489
1527
|
/* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(
|
|
1490
|
-
|
|
1528
|
+
Ys,
|
|
1491
1529
|
{
|
|
1492
1530
|
onBack: t,
|
|
1493
1531
|
showBackButton: s,
|
|
1494
|
-
onShowInfo:
|
|
1495
|
-
canShowInfo: !!
|
|
1496
|
-
showStarButton:
|
|
1532
|
+
onShowInfo: x,
|
|
1533
|
+
canShowInfo: !!_,
|
|
1534
|
+
showStarButton: b
|
|
1497
1535
|
}
|
|
1498
1536
|
) }),
|
|
1499
|
-
|
|
1537
|
+
I == null ? void 0 : I(),
|
|
1500
1538
|
/* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden relative", children: /* @__PURE__ */ e(
|
|
1501
|
-
|
|
1539
|
+
Jt,
|
|
1502
1540
|
{
|
|
1503
1541
|
hideDeletedMessages: !0,
|
|
1504
1542
|
hideNewMessageSeparator: !1,
|
|
1505
1543
|
messageActions: void 0
|
|
1506
1544
|
}
|
|
1507
1545
|
) }),
|
|
1508
|
-
|
|
1546
|
+
r == null ? void 0 : r(y),
|
|
1509
1547
|
/* @__PURE__ */ e(
|
|
1510
|
-
|
|
1548
|
+
Ls,
|
|
1511
1549
|
{
|
|
1512
|
-
renderActions: () => n == null ? void 0 : n(
|
|
1550
|
+
renderActions: () => n == null ? void 0 : n(y)
|
|
1513
1551
|
}
|
|
1514
1552
|
)
|
|
1515
1553
|
] })
|
|
1516
1554
|
}
|
|
1517
1555
|
),
|
|
1518
1556
|
/* @__PURE__ */ e(
|
|
1519
|
-
|
|
1557
|
+
bs,
|
|
1520
1558
|
{
|
|
1521
|
-
dialogRef:
|
|
1522
|
-
onClose:
|
|
1523
|
-
participant:
|
|
1524
|
-
channel:
|
|
1525
|
-
followerStatusLabel:
|
|
1559
|
+
dialogRef: w,
|
|
1560
|
+
onClose: u,
|
|
1561
|
+
participant: _,
|
|
1562
|
+
channel: y,
|
|
1563
|
+
followerStatusLabel: R,
|
|
1526
1564
|
onLeaveConversation: l,
|
|
1527
1565
|
onBlockParticipant: d,
|
|
1528
|
-
showDeleteConversation:
|
|
1566
|
+
showDeleteConversation: a,
|
|
1529
1567
|
onDeleteConversationClick: c,
|
|
1530
|
-
onBlockParticipantClick:
|
|
1568
|
+
onBlockParticipantClick: g,
|
|
1531
1569
|
onReportParticipantClick: h,
|
|
1532
|
-
customProfileContent:
|
|
1533
|
-
customChannelActions:
|
|
1570
|
+
customProfileContent: o,
|
|
1571
|
+
customChannelActions: v
|
|
1534
1572
|
}
|
|
1535
1573
|
)
|
|
1536
1574
|
] });
|
|
1537
|
-
},
|
|
1575
|
+
}, lt = F.memo(
|
|
1538
1576
|
({
|
|
1539
1577
|
channel: t,
|
|
1540
1578
|
onBack: s,
|
|
1541
1579
|
showBackButton: n = !1,
|
|
1542
|
-
renderMessageInputActions:
|
|
1580
|
+
renderMessageInputActions: r,
|
|
1543
1581
|
renderConversationFooter: l,
|
|
1544
1582
|
onLeaveConversation: d,
|
|
1545
|
-
onBlockParticipant:
|
|
1583
|
+
onBlockParticipant: a,
|
|
1546
1584
|
className: c,
|
|
1547
|
-
CustomChannelEmptyState:
|
|
1585
|
+
CustomChannelEmptyState: g = Hs,
|
|
1548
1586
|
showDeleteConversation: h = !0,
|
|
1549
|
-
onDeleteConversationClick:
|
|
1550
|
-
onBlockParticipantClick:
|
|
1551
|
-
onReportParticipantClick:
|
|
1552
|
-
dmAgentEnabled:
|
|
1553
|
-
messageMetadata:
|
|
1554
|
-
onMessageSent:
|
|
1555
|
-
showStarButton:
|
|
1556
|
-
chatbotVotingEnabled:
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1587
|
+
onDeleteConversationClick: b,
|
|
1588
|
+
onBlockParticipantClick: N,
|
|
1589
|
+
onReportParticipantClick: S,
|
|
1590
|
+
dmAgentEnabled: m,
|
|
1591
|
+
messageMetadata: I,
|
|
1592
|
+
onMessageSent: o,
|
|
1593
|
+
showStarButton: v = !1,
|
|
1594
|
+
chatbotVotingEnabled: k = !1,
|
|
1595
|
+
onAttachmentUnlock: y,
|
|
1596
|
+
onAttachmentDownload: w,
|
|
1597
|
+
renderChannelBanner: _,
|
|
1598
|
+
customProfileContent: R,
|
|
1599
|
+
customChannelActions: x,
|
|
1600
|
+
renderMessage: u
|
|
1561
1601
|
}) => {
|
|
1562
|
-
const
|
|
1563
|
-
async (
|
|
1564
|
-
var
|
|
1565
|
-
const
|
|
1602
|
+
const f = U(
|
|
1603
|
+
async (E, C, p) => {
|
|
1604
|
+
var $;
|
|
1605
|
+
const O = (($ = t.data) == null ? void 0 : $.chatbot_paused) === !0, q = m && !O, Z = {
|
|
1566
1606
|
...C,
|
|
1567
|
-
...
|
|
1568
|
-
...
|
|
1607
|
+
...q && { silent: !0 },
|
|
1608
|
+
...I && {
|
|
1569
1609
|
metadata: {
|
|
1570
1610
|
...C.metadata ?? {},
|
|
1571
|
-
...
|
|
1611
|
+
...I
|
|
1572
1612
|
}
|
|
1573
1613
|
}
|
|
1574
1614
|
}, Q = {
|
|
1575
|
-
...
|
|
1576
|
-
...
|
|
1577
|
-
},
|
|
1578
|
-
return
|
|
1615
|
+
...p,
|
|
1616
|
+
...q && { skip_push: !0 }
|
|
1617
|
+
}, D = await t.sendMessage(Z, Q);
|
|
1618
|
+
return o == null || o(D), D;
|
|
1579
1619
|
},
|
|
1580
|
-
[t,
|
|
1620
|
+
[t, m, I, o]
|
|
1581
1621
|
);
|
|
1582
1622
|
return /* @__PURE__ */ e(
|
|
1583
1623
|
"div",
|
|
1584
1624
|
{
|
|
1585
|
-
className:
|
|
1625
|
+
className: L(
|
|
1586
1626
|
"messaging-channel-view h-full flex flex-col",
|
|
1587
1627
|
c
|
|
1588
1628
|
),
|
|
1589
1629
|
children: /* @__PURE__ */ e(
|
|
1590
|
-
|
|
1630
|
+
Wt,
|
|
1591
1631
|
{
|
|
1592
1632
|
channel: t,
|
|
1593
|
-
MessageSystem:
|
|
1594
|
-
EmptyStateIndicator:
|
|
1595
|
-
LoadingIndicator:
|
|
1596
|
-
DateSeparator:
|
|
1597
|
-
doSendMessageRequest:
|
|
1633
|
+
MessageSystem: zs,
|
|
1634
|
+
EmptyStateIndicator: g,
|
|
1635
|
+
LoadingIndicator: Se,
|
|
1636
|
+
DateSeparator: Cs,
|
|
1637
|
+
doSendMessageRequest: f,
|
|
1598
1638
|
children: /* @__PURE__ */ e(
|
|
1599
|
-
|
|
1639
|
+
Ws,
|
|
1600
1640
|
{
|
|
1601
1641
|
onBack: s,
|
|
1602
1642
|
showBackButton: n,
|
|
1603
|
-
renderMessageInputActions:
|
|
1643
|
+
renderMessageInputActions: r,
|
|
1604
1644
|
renderConversationFooter: l,
|
|
1605
1645
|
onLeaveConversation: d,
|
|
1606
|
-
onBlockParticipant:
|
|
1607
|
-
CustomChannelEmptyState:
|
|
1646
|
+
onBlockParticipant: a,
|
|
1647
|
+
CustomChannelEmptyState: g,
|
|
1608
1648
|
showDeleteConversation: h,
|
|
1609
|
-
onDeleteConversationClick:
|
|
1610
|
-
onBlockParticipantClick:
|
|
1611
|
-
onReportParticipantClick:
|
|
1612
|
-
showStarButton:
|
|
1613
|
-
chatbotVotingEnabled:
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1649
|
+
onDeleteConversationClick: b,
|
|
1650
|
+
onBlockParticipantClick: N,
|
|
1651
|
+
onReportParticipantClick: S,
|
|
1652
|
+
showStarButton: v,
|
|
1653
|
+
chatbotVotingEnabled: k,
|
|
1654
|
+
onAttachmentUnlock: y,
|
|
1655
|
+
onAttachmentDownload: w,
|
|
1656
|
+
renderChannelBanner: _,
|
|
1657
|
+
customProfileContent: R,
|
|
1658
|
+
customChannelActions: x,
|
|
1659
|
+
renderMessage: u
|
|
1618
1660
|
}
|
|
1619
1661
|
)
|
|
1620
1662
|
}
|
|
@@ -1623,16 +1665,16 @@ const ce = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1623
1665
|
);
|
|
1624
1666
|
}
|
|
1625
1667
|
);
|
|
1626
|
-
|
|
1627
|
-
function
|
|
1668
|
+
lt.displayName = "ChannelView";
|
|
1669
|
+
function qs({
|
|
1628
1670
|
searchQuery: t,
|
|
1629
1671
|
setSearchQuery: s,
|
|
1630
1672
|
placeholder: n
|
|
1631
1673
|
}) {
|
|
1632
|
-
const
|
|
1674
|
+
const r = K(null);
|
|
1633
1675
|
return /* @__PURE__ */ i("div", { className: "relative", children: [
|
|
1634
1676
|
/* @__PURE__ */ e(
|
|
1635
|
-
|
|
1677
|
+
ns,
|
|
1636
1678
|
{
|
|
1637
1679
|
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-stone",
|
|
1638
1680
|
weight: "bold"
|
|
@@ -1641,7 +1683,7 @@ function js({
|
|
|
1641
1683
|
/* @__PURE__ */ e(
|
|
1642
1684
|
"input",
|
|
1643
1685
|
{
|
|
1644
|
-
ref:
|
|
1686
|
+
ref: r,
|
|
1645
1687
|
type: "text",
|
|
1646
1688
|
placeholder: n,
|
|
1647
1689
|
value: t,
|
|
@@ -1650,157 +1692,159 @@ function js({
|
|
|
1650
1692
|
}
|
|
1651
1693
|
),
|
|
1652
1694
|
t && /* @__PURE__ */ e(
|
|
1653
|
-
|
|
1695
|
+
rt,
|
|
1654
1696
|
{
|
|
1655
1697
|
label: "Clear search",
|
|
1656
1698
|
onClick: () => {
|
|
1657
1699
|
var l;
|
|
1658
|
-
s(""), (l =
|
|
1700
|
+
s(""), (l = r.current) == null || l.focus();
|
|
1659
1701
|
},
|
|
1660
1702
|
className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 text-stone hover:text-charcoal",
|
|
1661
|
-
children: /* @__PURE__ */ e(
|
|
1703
|
+
children: /* @__PURE__ */ e(Oe, { className: "h-4 w-4", weight: "bold" })
|
|
1662
1704
|
}
|
|
1663
1705
|
)
|
|
1664
1706
|
] });
|
|
1665
1707
|
}
|
|
1666
|
-
const
|
|
1708
|
+
const Zs = ({
|
|
1667
1709
|
participantSource: t,
|
|
1668
1710
|
onSelectParticipant: s,
|
|
1669
1711
|
onClose: n,
|
|
1670
|
-
existingParticipantIds:
|
|
1712
|
+
existingParticipantIds: r = /* @__PURE__ */ new Set(),
|
|
1671
1713
|
participantLabel: l = "participants",
|
|
1672
1714
|
searchPlaceholder: d = "Search participants...",
|
|
1673
|
-
className:
|
|
1715
|
+
className: a
|
|
1674
1716
|
}) => {
|
|
1675
|
-
const { debug: c } =
|
|
1717
|
+
const { debug: c } = Me(), [g, h] = T(""), [b, N] = T([]), [S, m] = T(!1), [I, o] = T(null), [v, k] = T(
|
|
1676
1718
|
null
|
|
1677
|
-
),
|
|
1678
|
-
|
|
1719
|
+
), y = K(!1);
|
|
1720
|
+
W(() => {
|
|
1721
|
+
y.current = !1;
|
|
1722
|
+
}, [t]), W(() => {
|
|
1679
1723
|
if (t.loading) {
|
|
1680
1724
|
c && console.log(
|
|
1681
1725
|
"[ParticipantPicker] Waiting for participant source to finish loading..."
|
|
1682
1726
|
);
|
|
1683
1727
|
return;
|
|
1684
1728
|
}
|
|
1685
|
-
if (
|
|
1729
|
+
if (y.current) return;
|
|
1686
1730
|
(async () => {
|
|
1687
|
-
c && console.log("[ParticipantPicker] Loading initial participants..."),
|
|
1731
|
+
c && console.log("[ParticipantPicker] Loading initial participants..."), m(!0), o(null);
|
|
1688
1732
|
try {
|
|
1689
1733
|
const u = await t.loadParticipants({
|
|
1690
1734
|
search: "",
|
|
1691
1735
|
// Load all participants initially
|
|
1692
1736
|
limit: 100
|
|
1693
1737
|
});
|
|
1694
|
-
|
|
1738
|
+
N(u.participants), y.current = !0, c && console.log(
|
|
1695
1739
|
"[ParticipantPicker] Participants loaded successfully:",
|
|
1696
1740
|
u.participants.length
|
|
1697
1741
|
);
|
|
1698
1742
|
} catch (u) {
|
|
1699
|
-
const
|
|
1700
|
-
|
|
1743
|
+
const f = u instanceof Error ? u.message : "Failed to load participants";
|
|
1744
|
+
o(f), console.error("[ParticipantPicker] Failed to load participants:", u);
|
|
1701
1745
|
} finally {
|
|
1702
|
-
|
|
1746
|
+
m(!1);
|
|
1703
1747
|
}
|
|
1704
1748
|
})();
|
|
1705
|
-
}, [t
|
|
1706
|
-
const
|
|
1707
|
-
var
|
|
1708
|
-
if (!
|
|
1709
|
-
const u =
|
|
1710
|
-
return
|
|
1711
|
-
}),
|
|
1712
|
-
async (
|
|
1713
|
-
if (!
|
|
1714
|
-
|
|
1749
|
+
}, [t, c]);
|
|
1750
|
+
const w = b.filter((x) => !r.has(x.id)).filter((x) => {
|
|
1751
|
+
var f;
|
|
1752
|
+
if (!g) return !0;
|
|
1753
|
+
const u = g.toLowerCase();
|
|
1754
|
+
return x.name.toLowerCase().includes(u) || ((f = x.email) == null ? void 0 : f.toLowerCase().includes(u)) || !1;
|
|
1755
|
+
}), _ = U(
|
|
1756
|
+
async (x) => {
|
|
1757
|
+
if (!v) {
|
|
1758
|
+
k(x.id);
|
|
1715
1759
|
try {
|
|
1716
|
-
await s(
|
|
1760
|
+
await s(x);
|
|
1717
1761
|
} catch (u) {
|
|
1718
|
-
console.error("[ParticipantPicker] Failed to start chat:", u),
|
|
1762
|
+
console.error("[ParticipantPicker] Failed to start chat:", u), k(null);
|
|
1719
1763
|
}
|
|
1720
1764
|
}
|
|
1721
1765
|
},
|
|
1722
|
-
[s,
|
|
1723
|
-
), R = (
|
|
1724
|
-
(
|
|
1766
|
+
[s, v]
|
|
1767
|
+
), R = (x, u) => {
|
|
1768
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), _(u));
|
|
1725
1769
|
};
|
|
1726
|
-
return /* @__PURE__ */ i("div", { className:
|
|
1770
|
+
return /* @__PURE__ */ i("div", { className: L("flex flex-col h-full", a), children: [
|
|
1727
1771
|
/* @__PURE__ */ i("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: [
|
|
1728
1772
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
|
|
1729
1773
|
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-charcoal", children: "Start a new Conversation" }),
|
|
1730
|
-
/* @__PURE__ */ e(
|
|
1774
|
+
/* @__PURE__ */ e(ot, { onClick: n })
|
|
1731
1775
|
] }),
|
|
1732
1776
|
/* @__PURE__ */ i("p", { className: "text-xs text-stone mb-3", children: [
|
|
1733
1777
|
"Select a ",
|
|
1734
1778
|
l.slice(0, -1),
|
|
1735
1779
|
" to start messaging (",
|
|
1736
|
-
|
|
1780
|
+
w.length,
|
|
1737
1781
|
" available)",
|
|
1738
1782
|
t.totalCount !== void 0 && ` • ${t.totalCount} ${l} total`
|
|
1739
1783
|
] }),
|
|
1740
1784
|
/* @__PURE__ */ e(
|
|
1741
|
-
|
|
1785
|
+
qs,
|
|
1742
1786
|
{
|
|
1743
|
-
searchQuery:
|
|
1787
|
+
searchQuery: g,
|
|
1744
1788
|
setSearchQuery: h,
|
|
1745
1789
|
placeholder: d
|
|
1746
1790
|
}
|
|
1747
1791
|
)
|
|
1748
1792
|
] }),
|
|
1749
|
-
|
|
1793
|
+
I && /* @__PURE__ */ i("div", { className: "p-4 text-sm text-danger bg-danger-alt", children: [
|
|
1750
1794
|
"Error loading ",
|
|
1751
1795
|
l,
|
|
1752
1796
|
": ",
|
|
1753
|
-
|
|
1797
|
+
I
|
|
1754
1798
|
] }),
|
|
1755
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children:
|
|
1799
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children: S && w.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: [
|
|
1756
1800
|
/* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
1757
1801
|
/* @__PURE__ */ i("span", { className: "text-sm text-stone", children: [
|
|
1758
1802
|
"Loading ",
|
|
1759
1803
|
l,
|
|
1760
1804
|
"..."
|
|
1761
1805
|
] })
|
|
1762
|
-
] }) }) :
|
|
1763
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(
|
|
1764
|
-
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children:
|
|
1765
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-stone", children:
|
|
1806
|
+
] }) }) : w.length === 0 ? /* @__PURE__ */ i("div", { className: "p-6 text-center", children: [
|
|
1807
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(Ye, { className: "h-8 w-8 text-charcoal" }) }),
|
|
1808
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: g ? `No ${l} found` : b.length > 0 ? `Already chatting with all ${l}` : `No ${l} yet` }),
|
|
1809
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-stone", children: g ? "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` })
|
|
1766
1810
|
] }) : /* @__PURE__ */ i("ul", { className: "space-y-0", children: [
|
|
1767
|
-
|
|
1768
|
-
const u =
|
|
1811
|
+
w.map((x) => {
|
|
1812
|
+
const u = x.name || x.email || x.id, f = x.email && x.name ? x.email : x.phone;
|
|
1769
1813
|
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
1770
1814
|
"button",
|
|
1771
1815
|
{
|
|
1772
1816
|
type: "button",
|
|
1773
|
-
onClick: () =>
|
|
1774
|
-
onKeyDown: (
|
|
1817
|
+
onClick: () => _(x),
|
|
1818
|
+
onKeyDown: (E) => R(E, x),
|
|
1775
1819
|
className: "w-full px-4 py-3 hover:bg-sand transition-colors border-b border-sand text-left focus-ring",
|
|
1776
1820
|
children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
1777
1821
|
/* @__PURE__ */ i("div", { className: "flex items-center space-x-3 flex-1 min-w-0", children: [
|
|
1778
1822
|
/* @__PURE__ */ e(
|
|
1779
|
-
|
|
1823
|
+
oe,
|
|
1780
1824
|
{
|
|
1781
|
-
id:
|
|
1825
|
+
id: x.id,
|
|
1782
1826
|
name: u,
|
|
1783
|
-
image:
|
|
1827
|
+
image: x.image,
|
|
1784
1828
|
size: 40
|
|
1785
1829
|
}
|
|
1786
1830
|
),
|
|
1787
1831
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
|
|
1788
1832
|
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-charcoal truncate", children: u }),
|
|
1789
|
-
|
|
1833
|
+
f && /* @__PURE__ */ e("p", { className: "text-xs text-stone truncate", children: f })
|
|
1790
1834
|
] })
|
|
1791
1835
|
] }),
|
|
1792
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children:
|
|
1836
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: v === x.id ? /* @__PURE__ */ e(_e, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ e(Ye, { className: "h-5 w-5 text-stone" }) })
|
|
1793
1837
|
] })
|
|
1794
1838
|
}
|
|
1795
|
-
) },
|
|
1839
|
+
) }, x.id);
|
|
1796
1840
|
}),
|
|
1797
|
-
|
|
1841
|
+
S && /* @__PURE__ */ e("li", { className: "p-4 flex justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
|
|
1798
1842
|
/* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
1799
1843
|
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading more..." })
|
|
1800
1844
|
] }) })
|
|
1801
1845
|
] }) })
|
|
1802
1846
|
] });
|
|
1803
|
-
},
|
|
1847
|
+
}, Js = ({ className: t }) => /* @__PURE__ */ i(
|
|
1804
1848
|
"svg",
|
|
1805
1849
|
{
|
|
1806
1850
|
width: "140",
|
|
@@ -1934,17 +1978,17 @@ const zs = ({
|
|
|
1934
1978
|
] })
|
|
1935
1979
|
]
|
|
1936
1980
|
}
|
|
1937
|
-
),
|
|
1981
|
+
), it = F.memo(
|
|
1938
1982
|
({ 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: [
|
|
1939
|
-
/* @__PURE__ */ e(
|
|
1983
|
+
/* @__PURE__ */ e(Js, {}),
|
|
1940
1984
|
s && !t && /* @__PURE__ */ i("div", { className: "mt-8", children: [
|
|
1941
1985
|
/* @__PURE__ */ e("h2", { className: "font-medium text-black text-[18px] mb-2", children: "Your inbox is empty" }),
|
|
1942
1986
|
/* @__PURE__ */ e("p", { className: "text-[#676B5F] text-sm mb-6", children: "Share with your followers to start receiving messages" })
|
|
1943
1987
|
] })
|
|
1944
1988
|
] }) })
|
|
1945
1989
|
);
|
|
1946
|
-
|
|
1947
|
-
const
|
|
1990
|
+
it.displayName = "EmptyState";
|
|
1991
|
+
const Ee = F.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: [
|
|
1948
1992
|
/* @__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: "⚠️" }) }),
|
|
1949
1993
|
/* @__PURE__ */ e("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
1950
1994
|
/* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t }),
|
|
@@ -1958,223 +2002,223 @@ const be = G.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { clas
|
|
|
1958
2002
|
}
|
|
1959
2003
|
)
|
|
1960
2004
|
] }) }));
|
|
1961
|
-
|
|
1962
|
-
const
|
|
2005
|
+
Ee.displayName = "ErrorState";
|
|
2006
|
+
const on = ({
|
|
1963
2007
|
capabilities: t = {},
|
|
1964
2008
|
className: s,
|
|
1965
2009
|
renderMessageInputActions: n,
|
|
1966
|
-
renderConversationFooter:
|
|
2010
|
+
renderConversationFooter: r,
|
|
1967
2011
|
onChannelSelect: l,
|
|
1968
2012
|
onParticipantSelect: d,
|
|
1969
|
-
initialParticipantFilter:
|
|
2013
|
+
initialParticipantFilter: a,
|
|
1970
2014
|
initialParticipantData: c,
|
|
1971
|
-
CustomChannelEmptyState:
|
|
2015
|
+
CustomChannelEmptyState: g,
|
|
1972
2016
|
showChannelList: h = !0,
|
|
1973
|
-
filters:
|
|
1974
|
-
channelRenderFilterFn:
|
|
1975
|
-
channelListCustomEmptyStateIndicator:
|
|
1976
|
-
onDeleteConversationClick:
|
|
1977
|
-
onBlockParticipantClick:
|
|
1978
|
-
onReportParticipantClick:
|
|
1979
|
-
dmAgentEnabled:
|
|
1980
|
-
messageMetadata:
|
|
1981
|
-
onMessageSent:
|
|
1982
|
-
showStarButton:
|
|
1983
|
-
chatbotVotingEnabled:
|
|
2017
|
+
filters: b,
|
|
2018
|
+
channelRenderFilterFn: N,
|
|
2019
|
+
channelListCustomEmptyStateIndicator: S,
|
|
2020
|
+
onDeleteConversationClick: m,
|
|
2021
|
+
onBlockParticipantClick: I,
|
|
2022
|
+
onReportParticipantClick: o,
|
|
2023
|
+
dmAgentEnabled: v,
|
|
2024
|
+
messageMetadata: k,
|
|
2025
|
+
onMessageSent: y,
|
|
2026
|
+
showStarButton: w = !1,
|
|
2027
|
+
chatbotVotingEnabled: _ = !1,
|
|
1984
2028
|
renderMessagePreview: R,
|
|
1985
|
-
renderChannelBanner:
|
|
2029
|
+
renderChannelBanner: x,
|
|
1986
2030
|
customProfileContent: u,
|
|
1987
|
-
customChannelActions:
|
|
1988
|
-
renderMessage:
|
|
2031
|
+
customChannelActions: f,
|
|
2032
|
+
renderMessage: E
|
|
1989
2033
|
}) => {
|
|
1990
2034
|
const {
|
|
1991
|
-
service:
|
|
1992
|
-
client:
|
|
1993
|
-
isConnected:
|
|
1994
|
-
isLoading:
|
|
1995
|
-
error:
|
|
1996
|
-
refreshConnection:
|
|
1997
|
-
debug:
|
|
1998
|
-
} =
|
|
1999
|
-
participantSource:
|
|
2000
|
-
participantLabel:
|
|
2001
|
-
showDeleteConversation:
|
|
2002
|
-
} = t,
|
|
2003
|
-
const
|
|
2035
|
+
service: C,
|
|
2036
|
+
client: p,
|
|
2037
|
+
isConnected: O,
|
|
2038
|
+
isLoading: q,
|
|
2039
|
+
error: Z,
|
|
2040
|
+
refreshConnection: Q,
|
|
2041
|
+
debug: D
|
|
2042
|
+
} = as(), [$, z] = T(null), [ee, le] = T(!1), [ie, ce] = T(!1), [A, P] = T(!1), [H, Y] = T(/* @__PURE__ */ new Set()), [te, se] = T(0), [G, de] = T(!1), [fe, ne] = T(null), J = K(null), {
|
|
2043
|
+
participantSource: ge,
|
|
2044
|
+
participantLabel: me = "participants",
|
|
2045
|
+
showDeleteConversation: xe = !0
|
|
2046
|
+
} = t, be = F.useMemo(() => {
|
|
2047
|
+
const M = p == null ? void 0 : p.userID;
|
|
2004
2048
|
return {
|
|
2005
2049
|
...{
|
|
2006
2050
|
type: "messaging",
|
|
2007
2051
|
last_message_at: { $exists: !0 },
|
|
2008
|
-
...
|
|
2009
|
-
members: { $in: [
|
|
2052
|
+
...M && {
|
|
2053
|
+
members: { $in: [M] },
|
|
2010
2054
|
hidden: !1
|
|
2011
2055
|
}
|
|
2012
2056
|
},
|
|
2013
|
-
...
|
|
2057
|
+
...b
|
|
2014
2058
|
};
|
|
2015
|
-
}, [
|
|
2016
|
-
if (!
|
|
2017
|
-
const
|
|
2018
|
-
if (
|
|
2059
|
+
}, [b, p == null ? void 0 : p.userID]), ae = K(null), X = U(async () => {
|
|
2060
|
+
if (!p || !O) return;
|
|
2061
|
+
const M = p.userID;
|
|
2062
|
+
if (M)
|
|
2019
2063
|
try {
|
|
2020
|
-
|
|
2021
|
-
const V = await
|
|
2064
|
+
D && console.log("[MessagingShell] Syncing channels for user:", M);
|
|
2065
|
+
const V = await p.queryChannels(
|
|
2022
2066
|
{
|
|
2023
2067
|
type: "messaging",
|
|
2024
|
-
members: { $in: [
|
|
2068
|
+
members: { $in: [M] }
|
|
2025
2069
|
},
|
|
2026
2070
|
{},
|
|
2027
2071
|
{ limit: 100 }
|
|
2028
|
-
),
|
|
2029
|
-
V.forEach((
|
|
2030
|
-
const
|
|
2031
|
-
Object.values(
|
|
2032
|
-
var
|
|
2033
|
-
const
|
|
2034
|
-
|
|
2072
|
+
), B = /* @__PURE__ */ new Set();
|
|
2073
|
+
V.forEach((j) => {
|
|
2074
|
+
const ke = j.state.members;
|
|
2075
|
+
Object.values(ke).forEach((mt) => {
|
|
2076
|
+
var Ge;
|
|
2077
|
+
const Te = (Ge = mt.user) == null ? void 0 : Ge.id;
|
|
2078
|
+
Te && Te !== M && B.add(Te);
|
|
2035
2079
|
});
|
|
2036
|
-
}),
|
|
2080
|
+
}), Y((j) => j.size === B.size && [...j].every((ke) => B.has(ke)) ? j : B), le(V.length > 0), ce(!0), ae.current = M, D && console.log("[MessagingShell] Channels synced successfully:", {
|
|
2037
2081
|
channelCount: V.length,
|
|
2038
|
-
memberCount:
|
|
2082
|
+
memberCount: B.size
|
|
2039
2083
|
});
|
|
2040
2084
|
} catch (V) {
|
|
2041
2085
|
console.error("[MessagingShell] Failed to sync channels:", V);
|
|
2042
2086
|
}
|
|
2043
|
-
}, [
|
|
2044
|
-
|
|
2045
|
-
if (!
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2048
|
-
}, [
|
|
2049
|
-
if (!
|
|
2087
|
+
}, [p, O, D]);
|
|
2088
|
+
W(() => {
|
|
2089
|
+
if (!p || !O) return;
|
|
2090
|
+
const M = p.userID;
|
|
2091
|
+
M && ae.current !== M && X();
|
|
2092
|
+
}, [p, O, X]), W(() => {
|
|
2093
|
+
if (!a || !p || !O) return;
|
|
2050
2094
|
(async () => {
|
|
2051
|
-
const V =
|
|
2095
|
+
const V = p.userID;
|
|
2052
2096
|
if (V)
|
|
2053
2097
|
try {
|
|
2054
|
-
|
|
2098
|
+
D && console.log(
|
|
2055
2099
|
"[MessagingShell] Loading initial conversation with:",
|
|
2056
|
-
|
|
2100
|
+
a
|
|
2057
2101
|
);
|
|
2058
|
-
const
|
|
2102
|
+
const B = await p.queryChannels(
|
|
2059
2103
|
{
|
|
2060
2104
|
type: "messaging",
|
|
2061
|
-
members: { $eq: [V,
|
|
2105
|
+
members: { $eq: [V, a] }
|
|
2062
2106
|
},
|
|
2063
2107
|
{},
|
|
2064
2108
|
{ limit: 1 }
|
|
2065
2109
|
);
|
|
2066
|
-
if (
|
|
2067
|
-
|
|
2110
|
+
if (B.length > 0)
|
|
2111
|
+
z(B[0]), de(!0), ne(null), l && l(B[0]), D && console.log(
|
|
2068
2112
|
"[MessagingShell] Initial conversation loaded:",
|
|
2069
|
-
|
|
2113
|
+
B[0].id
|
|
2070
2114
|
);
|
|
2071
|
-
else if (c &&
|
|
2072
|
-
|
|
2115
|
+
else if (c && C) {
|
|
2116
|
+
D && console.log(
|
|
2073
2117
|
"[MessagingShell] No conversation found, creating one for:",
|
|
2074
2118
|
c
|
|
2075
2119
|
);
|
|
2076
2120
|
try {
|
|
2077
|
-
const
|
|
2121
|
+
const j = await C.startChannelWithParticipant({
|
|
2078
2122
|
id: c.id,
|
|
2079
2123
|
name: c.name,
|
|
2080
2124
|
email: c.email,
|
|
2081
2125
|
phone: c.phone
|
|
2082
2126
|
});
|
|
2083
|
-
j
|
|
2127
|
+
z(j), de(!0), ne(null), l && l(j), D && console.log(
|
|
2084
2128
|
"[MessagingShell] Channel created and loaded:",
|
|
2085
|
-
|
|
2129
|
+
j.id
|
|
2086
2130
|
);
|
|
2087
|
-
} catch (
|
|
2131
|
+
} catch (j) {
|
|
2088
2132
|
console.error(
|
|
2089
2133
|
"[MessagingShell] Failed to create conversation:",
|
|
2090
|
-
|
|
2091
|
-
),
|
|
2134
|
+
j
|
|
2135
|
+
), ne("Failed to create conversation");
|
|
2092
2136
|
}
|
|
2093
2137
|
} else
|
|
2094
|
-
|
|
2138
|
+
ne(
|
|
2095
2139
|
"No conversation found with this account"
|
|
2096
|
-
),
|
|
2140
|
+
), D && console.log(
|
|
2097
2141
|
"[MessagingShell] No conversation found for:",
|
|
2098
|
-
|
|
2142
|
+
a
|
|
2099
2143
|
);
|
|
2100
|
-
} catch (
|
|
2144
|
+
} catch (B) {
|
|
2101
2145
|
console.error(
|
|
2102
2146
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2103
|
-
|
|
2104
|
-
),
|
|
2147
|
+
B
|
|
2148
|
+
), ne("Failed to load conversation");
|
|
2105
2149
|
}
|
|
2106
2150
|
})();
|
|
2107
2151
|
}, [
|
|
2108
|
-
|
|
2152
|
+
a,
|
|
2109
2153
|
c,
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2154
|
+
p,
|
|
2155
|
+
O,
|
|
2156
|
+
C,
|
|
2157
|
+
D,
|
|
2114
2158
|
l
|
|
2115
2159
|
]);
|
|
2116
|
-
const
|
|
2117
|
-
(
|
|
2118
|
-
|
|
2160
|
+
const Ce = U(
|
|
2161
|
+
(M) => {
|
|
2162
|
+
z(M), l == null || l(M);
|
|
2119
2163
|
},
|
|
2120
2164
|
[l]
|
|
2121
|
-
),
|
|
2122
|
-
|
|
2123
|
-
}, [
|
|
2124
|
-
async (
|
|
2165
|
+
), Ne = U(() => {
|
|
2166
|
+
G || z(null);
|
|
2167
|
+
}, [G]), pe = U(
|
|
2168
|
+
async (M) => {
|
|
2125
2169
|
var V;
|
|
2126
|
-
if (
|
|
2170
|
+
if (C)
|
|
2127
2171
|
try {
|
|
2128
|
-
|
|
2172
|
+
D && console.log(
|
|
2129
2173
|
"[MessagingShell] Starting conversation with:",
|
|
2130
|
-
|
|
2174
|
+
M.id
|
|
2131
2175
|
);
|
|
2132
|
-
const
|
|
2133
|
-
id:
|
|
2134
|
-
name:
|
|
2135
|
-
email:
|
|
2136
|
-
phone:
|
|
2176
|
+
const B = await C.startChannelWithParticipant({
|
|
2177
|
+
id: M.id,
|
|
2178
|
+
name: M.name,
|
|
2179
|
+
email: M.email,
|
|
2180
|
+
phone: M.phone
|
|
2137
2181
|
});
|
|
2138
2182
|
try {
|
|
2139
|
-
await
|
|
2140
|
-
} catch (
|
|
2141
|
-
console.warn("[MessagingShell] Failed to unhide channel:",
|
|
2183
|
+
await B.show();
|
|
2184
|
+
} catch (j) {
|
|
2185
|
+
console.warn("[MessagingShell] Failed to unhide channel:", j);
|
|
2142
2186
|
}
|
|
2143
|
-
|
|
2144
|
-
} catch (
|
|
2145
|
-
console.error("[MessagingShell] Failed to start conversation:",
|
|
2187
|
+
z(B), P(!1), (V = J.current) == null || V.close(), d == null || d(M);
|
|
2188
|
+
} catch (B) {
|
|
2189
|
+
console.error("[MessagingShell] Failed to start conversation:", B);
|
|
2146
2190
|
}
|
|
2147
2191
|
},
|
|
2148
|
-
[
|
|
2149
|
-
),
|
|
2150
|
-
var
|
|
2151
|
-
P(!1), (
|
|
2152
|
-
}, []),
|
|
2153
|
-
(
|
|
2154
|
-
|
|
2192
|
+
[C, d, D]
|
|
2193
|
+
), re = U(() => {
|
|
2194
|
+
var M;
|
|
2195
|
+
P(!1), (M = J.current) == null || M.close();
|
|
2196
|
+
}, []), ye = U(
|
|
2197
|
+
(M) => {
|
|
2198
|
+
M.target === J.current && re();
|
|
2155
2199
|
},
|
|
2156
|
-
[
|
|
2157
|
-
),
|
|
2158
|
-
async (
|
|
2159
|
-
|
|
2200
|
+
[re]
|
|
2201
|
+
), ct = U(
|
|
2202
|
+
async (M) => {
|
|
2203
|
+
D && console.log("[MessagingShell] Leaving conversation:", M.id), z(null), de(!1), ae.current = null, await X();
|
|
2160
2204
|
},
|
|
2161
|
-
[
|
|
2162
|
-
),
|
|
2163
|
-
async (
|
|
2164
|
-
|
|
2205
|
+
[X, D]
|
|
2206
|
+
), dt = U(
|
|
2207
|
+
async (M) => {
|
|
2208
|
+
D && console.log("[MessagingShell] Blocking participant:", M), z(null), de(!1), ae.current = null, await X();
|
|
2165
2209
|
},
|
|
2166
|
-
[
|
|
2167
|
-
),
|
|
2168
|
-
return
|
|
2169
|
-
|
|
2210
|
+
[X, D]
|
|
2211
|
+
), ve = !!$;
|
|
2212
|
+
return q ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(Se, {}) }) : Z ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(Ee, { message: Z, onBack: Q }) }) : !O || !p ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(
|
|
2213
|
+
Ee,
|
|
2170
2214
|
{
|
|
2171
2215
|
message: "Not connected to messaging service",
|
|
2172
|
-
onBack:
|
|
2216
|
+
onBack: Q
|
|
2173
2217
|
}
|
|
2174
|
-
) }) :
|
|
2218
|
+
) }) : fe ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(Ee, { message: fe }) }) : /* @__PURE__ */ i(
|
|
2175
2219
|
"div",
|
|
2176
2220
|
{
|
|
2177
|
-
className:
|
|
2221
|
+
className: L(
|
|
2178
2222
|
"messaging-shell h-full bg-background-primary overflow-hidden",
|
|
2179
2223
|
s
|
|
2180
2224
|
),
|
|
@@ -2183,24 +2227,24 @@ const en = ({
|
|
|
2183
2227
|
/* @__PURE__ */ e(
|
|
2184
2228
|
"div",
|
|
2185
2229
|
{
|
|
2186
|
-
className:
|
|
2230
|
+
className: L(
|
|
2187
2231
|
"messaging-channel-list-sidebar min-h-0 min-w-0 lg:flex lg:flex-col",
|
|
2188
2232
|
{
|
|
2189
|
-
"!hidden": h === !1 ||
|
|
2233
|
+
"!hidden": h === !1 || G,
|
|
2190
2234
|
// Hide on mobile when channel selected, show on desktop with consistent wide width
|
|
2191
|
-
"hidden lg:flex lg:flex-1 lg:max-w-2xl": h !== !1 && !
|
|
2235
|
+
"hidden lg:flex lg:flex-1 lg:max-w-2xl": h !== !1 && !G && ve,
|
|
2192
2236
|
// Show on mobile when no channel selected, use same wide width on desktop
|
|
2193
|
-
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": h !== !1 && !
|
|
2237
|
+
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": h !== !1 && !G && !ve
|
|
2194
2238
|
}
|
|
2195
2239
|
),
|
|
2196
2240
|
children: /* @__PURE__ */ e(
|
|
2197
|
-
|
|
2241
|
+
at,
|
|
2198
2242
|
{
|
|
2199
|
-
onChannelSelect:
|
|
2200
|
-
selectedChannel:
|
|
2201
|
-
filters:
|
|
2202
|
-
channelRenderFilterFn:
|
|
2203
|
-
customEmptyStateIndicator:
|
|
2243
|
+
onChannelSelect: Ce,
|
|
2244
|
+
selectedChannel: $ || void 0,
|
|
2245
|
+
filters: be,
|
|
2246
|
+
channelRenderFilterFn: N,
|
|
2247
|
+
customEmptyStateIndicator: S,
|
|
2204
2248
|
renderMessagePreview: R
|
|
2205
2249
|
}
|
|
2206
2250
|
)
|
|
@@ -2209,84 +2253,84 @@ const en = ({
|
|
|
2209
2253
|
/* @__PURE__ */ e(
|
|
2210
2254
|
"div",
|
|
2211
2255
|
{
|
|
2212
|
-
className:
|
|
2256
|
+
className: L(
|
|
2213
2257
|
"messaging-conversation-view flex-1 flex-col min-w-0 min-h-0",
|
|
2214
2258
|
{
|
|
2215
2259
|
// In direct conversation mode (or waiting for it), always show (full width)
|
|
2216
|
-
flex:
|
|
2260
|
+
flex: G || ve || a,
|
|
2217
2261
|
// Normal mode: hide on mobile when no channel selected
|
|
2218
|
-
"hidden lg:flex": !
|
|
2262
|
+
"hidden lg:flex": !G && !ve && !a
|
|
2219
2263
|
}
|
|
2220
2264
|
),
|
|
2221
|
-
children:
|
|
2222
|
-
|
|
2265
|
+
children: $ ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ e(
|
|
2266
|
+
lt,
|
|
2223
2267
|
{
|
|
2224
|
-
channel:
|
|
2225
|
-
onBack:
|
|
2226
|
-
showBackButton: !
|
|
2268
|
+
channel: $,
|
|
2269
|
+
onBack: Ne,
|
|
2270
|
+
showBackButton: !G,
|
|
2227
2271
|
renderMessageInputActions: n,
|
|
2228
|
-
renderConversationFooter:
|
|
2229
|
-
renderChannelBanner:
|
|
2230
|
-
onLeaveConversation:
|
|
2231
|
-
onBlockParticipant:
|
|
2232
|
-
CustomChannelEmptyState:
|
|
2233
|
-
showDeleteConversation:
|
|
2234
|
-
onDeleteConversationClick:
|
|
2235
|
-
onBlockParticipantClick:
|
|
2236
|
-
onReportParticipantClick:
|
|
2237
|
-
dmAgentEnabled:
|
|
2238
|
-
messageMetadata:
|
|
2239
|
-
onMessageSent:
|
|
2240
|
-
showStarButton:
|
|
2241
|
-
chatbotVotingEnabled:
|
|
2272
|
+
renderConversationFooter: r,
|
|
2273
|
+
renderChannelBanner: x,
|
|
2274
|
+
onLeaveConversation: ct,
|
|
2275
|
+
onBlockParticipant: dt,
|
|
2276
|
+
CustomChannelEmptyState: g,
|
|
2277
|
+
showDeleteConversation: xe,
|
|
2278
|
+
onDeleteConversationClick: m,
|
|
2279
|
+
onBlockParticipantClick: I,
|
|
2280
|
+
onReportParticipantClick: o,
|
|
2281
|
+
dmAgentEnabled: v,
|
|
2282
|
+
messageMetadata: k,
|
|
2283
|
+
onMessageSent: y,
|
|
2284
|
+
showStarButton: w,
|
|
2285
|
+
chatbotVotingEnabled: _,
|
|
2242
2286
|
customProfileContent: u,
|
|
2243
|
-
customChannelActions:
|
|
2244
|
-
renderMessage:
|
|
2287
|
+
customChannelActions: f,
|
|
2288
|
+
renderMessage: E
|
|
2245
2289
|
},
|
|
2246
|
-
|
|
2247
|
-
) }) :
|
|
2290
|
+
$.id
|
|
2291
|
+
) }) : a ? (
|
|
2248
2292
|
// Show loading while creating/loading direct conversation channel
|
|
2249
|
-
/* @__PURE__ */ e(
|
|
2293
|
+
/* @__PURE__ */ e(Se, {})
|
|
2250
2294
|
) : /* @__PURE__ */ e(
|
|
2251
|
-
|
|
2295
|
+
it,
|
|
2252
2296
|
{
|
|
2253
|
-
hasChannels:
|
|
2254
|
-
channelsLoaded:
|
|
2297
|
+
hasChannels: ee,
|
|
2298
|
+
channelsLoaded: ie
|
|
2255
2299
|
}
|
|
2256
2300
|
)
|
|
2257
2301
|
}
|
|
2258
2302
|
)
|
|
2259
2303
|
] }),
|
|
2260
|
-
|
|
2304
|
+
ge && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
2261
2305
|
/* @__PURE__ */ e(
|
|
2262
2306
|
"dialog",
|
|
2263
2307
|
{
|
|
2264
|
-
ref:
|
|
2308
|
+
ref: J,
|
|
2265
2309
|
className: "mes-dialog",
|
|
2266
|
-
onClick:
|
|
2267
|
-
onClose:
|
|
2310
|
+
onClick: ye,
|
|
2311
|
+
onClose: re,
|
|
2268
2312
|
children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
|
|
2269
|
-
|
|
2313
|
+
Zs,
|
|
2270
2314
|
{
|
|
2271
|
-
participantSource:
|
|
2272
|
-
onSelectParticipant:
|
|
2273
|
-
onClose:
|
|
2274
|
-
existingParticipantIds:
|
|
2275
|
-
participantLabel:
|
|
2276
|
-
searchPlaceholder: `Search ${
|
|
2315
|
+
participantSource: ge,
|
|
2316
|
+
onSelectParticipant: pe,
|
|
2317
|
+
onClose: re,
|
|
2318
|
+
existingParticipantIds: H,
|
|
2319
|
+
participantLabel: me,
|
|
2320
|
+
searchPlaceholder: `Search ${me}...`
|
|
2277
2321
|
},
|
|
2278
|
-
|
|
2322
|
+
te
|
|
2279
2323
|
) })
|
|
2280
2324
|
}
|
|
2281
2325
|
)
|
|
2282
2326
|
]
|
|
2283
2327
|
}
|
|
2284
2328
|
);
|
|
2285
|
-
},
|
|
2329
|
+
}, Xs = ({
|
|
2286
2330
|
question: t,
|
|
2287
2331
|
onClick: s,
|
|
2288
2332
|
loading: n = !1,
|
|
2289
|
-
className:
|
|
2333
|
+
className: r
|
|
2290
2334
|
}) => /* @__PURE__ */ e(
|
|
2291
2335
|
"button",
|
|
2292
2336
|
{
|
|
@@ -2294,32 +2338,32 @@ const en = ({
|
|
|
2294
2338
|
onClick: s,
|
|
2295
2339
|
disabled: n,
|
|
2296
2340
|
style: { backgroundColor: "#E6E5E3" },
|
|
2297
|
-
className:
|
|
2341
|
+
className: L(
|
|
2298
2342
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
2299
2343
|
{
|
|
2300
2344
|
"hover:brightness-95 active:brightness-90": !n,
|
|
2301
2345
|
"opacity-50 cursor-not-allowed": n
|
|
2302
2346
|
},
|
|
2303
|
-
|
|
2347
|
+
r
|
|
2304
2348
|
),
|
|
2305
2349
|
children: t
|
|
2306
2350
|
}
|
|
2307
|
-
),
|
|
2351
|
+
), ln = ({
|
|
2308
2352
|
faqs: t,
|
|
2309
2353
|
onFaqClick: s,
|
|
2310
2354
|
loadingFaqId: n,
|
|
2311
|
-
headerText:
|
|
2355
|
+
headerText: r,
|
|
2312
2356
|
className: l,
|
|
2313
2357
|
avatarImage: d,
|
|
2314
|
-
avatarName:
|
|
2358
|
+
avatarName: a
|
|
2315
2359
|
}) => {
|
|
2316
|
-
const c = t.filter((
|
|
2360
|
+
const c = t.filter((g) => g.enabled).sort((g, h) => (g.order ?? 0) - (h.order ?? 0));
|
|
2317
2361
|
return c.length === 0 ? null : /* @__PURE__ */ e("div", { className: l, children: /* @__PURE__ */ i("div", { className: "flex gap-3 items-end", children: [
|
|
2318
|
-
(d ||
|
|
2319
|
-
|
|
2362
|
+
(d || a) && /* @__PURE__ */ e("div", { className: "flex-none", children: /* @__PURE__ */ e(
|
|
2363
|
+
oe,
|
|
2320
2364
|
{
|
|
2321
|
-
id:
|
|
2322
|
-
name:
|
|
2365
|
+
id: a || "account",
|
|
2366
|
+
name: a || "Account",
|
|
2323
2367
|
image: d,
|
|
2324
2368
|
size: 24,
|
|
2325
2369
|
shape: "circle"
|
|
@@ -2331,76 +2375,77 @@ const en = ({
|
|
|
2331
2375
|
className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
|
|
2332
2376
|
style: { backgroundColor: "#F1F0EE" },
|
|
2333
2377
|
children: [
|
|
2334
|
-
|
|
2335
|
-
c.map((
|
|
2336
|
-
|
|
2378
|
+
r && /* @__PURE__ */ e("p", { className: "text-md text-charcoal mb-4", children: r }),
|
|
2379
|
+
c.map((g) => /* @__PURE__ */ e(
|
|
2380
|
+
Xs,
|
|
2337
2381
|
{
|
|
2338
|
-
question:
|
|
2339
|
-
onClick: () => s(
|
|
2340
|
-
loading: n ===
|
|
2382
|
+
question: g.question,
|
|
2383
|
+
onClick: () => s(g.id),
|
|
2384
|
+
loading: n === g.id
|
|
2341
2385
|
},
|
|
2342
|
-
|
|
2386
|
+
g.id
|
|
2343
2387
|
))
|
|
2344
2388
|
]
|
|
2345
2389
|
}
|
|
2346
2390
|
)
|
|
2347
2391
|
] }) });
|
|
2348
|
-
},
|
|
2349
|
-
const { initialSearch: n = "", pageSize:
|
|
2350
|
-
if (
|
|
2351
|
-
const
|
|
2392
|
+
}, cn = (t, s = {}) => {
|
|
2393
|
+
const { initialSearch: n = "", pageSize: r = 20 } = s, [l, d] = T([]), [a, c] = T(!1), [g, h] = T(null), [b, N] = T(n), [S, m] = T(!0), [I, o] = T(), v = U(async (_ = !1, R) => {
|
|
2394
|
+
if (a) return;
|
|
2395
|
+
const x = R !== void 0 ? R : b;
|
|
2352
2396
|
c(!0), h(null);
|
|
2353
2397
|
try {
|
|
2354
2398
|
const u = await t.loadParticipants({
|
|
2355
|
-
search:
|
|
2356
|
-
limit:
|
|
2357
|
-
cursor:
|
|
2399
|
+
search: x || void 0,
|
|
2400
|
+
limit: r,
|
|
2401
|
+
cursor: _ ? void 0 : I
|
|
2358
2402
|
});
|
|
2359
2403
|
d(
|
|
2360
|
-
(
|
|
2361
|
-
),
|
|
2404
|
+
(f) => _ ? u.participants : [...f, ...u.participants]
|
|
2405
|
+
), m(u.hasMore), o(u.nextCursor);
|
|
2362
2406
|
} catch (u) {
|
|
2363
|
-
const
|
|
2364
|
-
h(
|
|
2407
|
+
const f = u instanceof Error ? u.message : "Failed to load participants";
|
|
2408
|
+
h(f), console.error("[useParticipants] Load error:", u);
|
|
2365
2409
|
} finally {
|
|
2366
2410
|
c(!1);
|
|
2367
2411
|
}
|
|
2368
|
-
}, [t,
|
|
2369
|
-
|
|
2370
|
-
}, [
|
|
2371
|
-
|
|
2372
|
-
}, [
|
|
2373
|
-
|
|
2374
|
-
}, [
|
|
2375
|
-
return
|
|
2376
|
-
|
|
2412
|
+
}, [t, b, I, r, a]), k = U(() => {
|
|
2413
|
+
S && !a && v(!1);
|
|
2414
|
+
}, [S, a, v]), y = U((_) => {
|
|
2415
|
+
N(_), o(void 0), v(!0, _);
|
|
2416
|
+
}, [v]), w = U(() => {
|
|
2417
|
+
o(void 0), v(!0);
|
|
2418
|
+
}, [v]);
|
|
2419
|
+
return W(() => {
|
|
2420
|
+
v(!0);
|
|
2377
2421
|
}, [t.loadParticipants]), {
|
|
2378
2422
|
participants: l,
|
|
2379
|
-
loading:
|
|
2380
|
-
error:
|
|
2381
|
-
searchQuery:
|
|
2382
|
-
hasMore:
|
|
2423
|
+
loading: a,
|
|
2424
|
+
error: g,
|
|
2425
|
+
searchQuery: b,
|
|
2426
|
+
hasMore: S,
|
|
2383
2427
|
totalCount: t.totalCount,
|
|
2384
|
-
loadMore:
|
|
2385
|
-
search:
|
|
2386
|
-
refresh:
|
|
2428
|
+
loadMore: k,
|
|
2429
|
+
search: y,
|
|
2430
|
+
refresh: w
|
|
2387
2431
|
};
|
|
2388
2432
|
};
|
|
2389
2433
|
export {
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2434
|
+
we as ActionButton,
|
|
2435
|
+
oe as Avatar,
|
|
2436
|
+
Hs as ChannelEmptyState,
|
|
2437
|
+
at as ChannelList,
|
|
2438
|
+
lt as ChannelView,
|
|
2439
|
+
ln as FaqList,
|
|
2440
|
+
Xs as FaqListItem,
|
|
2441
|
+
ws as LockedAttachment,
|
|
2442
|
+
Ss as MessageVoteButtons,
|
|
2443
|
+
rn as MessagingProvider,
|
|
2444
|
+
on as MessagingShell,
|
|
2445
|
+
Zs as ParticipantPicker,
|
|
2446
|
+
is as formatRelativeTime,
|
|
2447
|
+
ps as useMessageVote,
|
|
2448
|
+
as as useMessaging,
|
|
2449
|
+
cn as useParticipants
|
|
2405
2450
|
};
|
|
2406
2451
|
//# sourceMappingURL=index.js.map
|