@linktr.ee/messaging-react 1.22.0 → 1.22.2-rc-1772424036

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