@linktr.ee/messaging-react 3.6.2-rc-1783311731 → 3.6.2-rc-1783317817

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.
Files changed (34) hide show
  1. package/dist/{Card-4UyBK3XO.cjs → Card-BYdqLBN3.cjs} +2 -2
  2. package/dist/{Card-4UyBK3XO.cjs.map → Card-BYdqLBN3.cjs.map} +1 -1
  3. package/dist/{Card-RZ6C_IkE.js → Card-CZDLISxS.js} +3 -3
  4. package/dist/{Card-RZ6C_IkE.js.map → Card-CZDLISxS.js.map} +1 -1
  5. package/dist/{Card-0wf8lj5n.js → Card-Ca5OtJh6.js} +2 -2
  6. package/dist/{Card-0wf8lj5n.js.map → Card-Ca5OtJh6.js.map} +1 -1
  7. package/dist/{Card-DsQhJjj0.cjs → Card-DuSTf-S8.cjs} +2 -2
  8. package/dist/{Card-DsQhJjj0.cjs.map → Card-DuSTf-S8.cjs.map} +1 -1
  9. package/dist/{Card-iGNcxybY.js → Card-gjy-ib_1.js} +2 -2
  10. package/dist/{Card-iGNcxybY.js.map → Card-gjy-ib_1.js.map} +1 -1
  11. package/dist/{Card-6b4Ws9rn.cjs → Card-iHrzL32q.cjs} +2 -2
  12. package/dist/{Card-6b4Ws9rn.cjs.map → Card-iHrzL32q.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-Do9udNMm.js → LockedThumbnail-COK5XPQ9.js} +2 -2
  14. package/dist/{LockedThumbnail-Do9udNMm.js.map → LockedThumbnail-COK5XPQ9.js.map} +1 -1
  15. package/dist/{LockedThumbnail-N0pNOO3D.cjs → LockedThumbnail-DrWiitE6.cjs} +2 -2
  16. package/dist/{LockedThumbnail-N0pNOO3D.cjs.map → LockedThumbnail-DrWiitE6.cjs.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{index-wFe1UO9t.js → index-CnR5N9Co.js} +1097 -1104
  19. package/dist/index-CnR5N9Co.js.map +1 -0
  20. package/dist/index-pODWIZCi.cjs +2 -0
  21. package/dist/index-pODWIZCi.cjs.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/CustomMessage/CustomMessage.stories.tsx +18 -11
  26. package/src/components/CustomMessage/MessageDeliveryStatus.test.tsx +66 -0
  27. package/src/components/CustomMessage/MessageDeliveryStatus.tsx +53 -0
  28. package/src/components/CustomMessage/index.tsx +3 -2
  29. package/src/styles.css +16 -25
  30. package/dist/index-B3ZJaqJY.cjs +0 -2
  31. package/dist/index-B3ZJaqJY.cjs.map +0 -1
  32. package/dist/index-wFe1UO9t.js.map +0 -1
  33. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +0 -107
  34. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +0 -86
@@ -1,12 +1,12 @@
1
- import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
- import U, { createContext as rt, useContext as Ie, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Gs, useMemo as se, Suspense as it } from "react";
1
+ import { jsx as s, jsxs as m, Fragment as te } from "react/jsx-runtime";
2
+ import U, { createContext as at, useContext as Se, useCallback as J, useState as B, useRef as H, useEffect as K, useId as Gs, useMemo as ae, Suspense as rt } from "react";
3
3
  import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
- import { Chat as qs, useChannelStateContext as le, useChatContext as oe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, MessageText as qt, MessageErrorIcon as Wt, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
6
- import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as et, CurrencyDollarIcon as Dn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as jn, FileXlsIcon as Bn, FileDocIcon as Un, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Be, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
5
+ import { Chat as qs, useChannelStateContext as ue, useChatContext as me, DateSeparator as Ws, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as is, Attachment as Js, EditMessageModal as Zs, MessageBlocked as Qs, MessageBouncePrompt as en, MessageDeleted as tn, MessageIsThreadReplyInChannelButtonIndicator as sn, MessageRepliesCountButton as nn, ReminderNotification as an, StreamedMessageText as rn, messageHasAttachments as ln, messageHasReactions as on, isDateSeparatorMessage as cn, isMessageBlocked as dn, isMessageBounced as un, MessageBounceModal as mn, MessageText as qt, MessageErrorIcon as Wt, Poll as hn, useMessageContext as Ie, useMessageComposer as fn, useStateStore as gn, MessageInput as pn, useMessageInputContext as bn, useMessageComposerHasSendableData as vn, AttachmentPreviewList as xn, QuotedMessagePreview as wn, TextareaComposer as _n, MessageTimestamp as Ye, AIStates as qe, useTypingContext as Nn, useAIState as yn, Channel as kn, WithComponents as Cn, Window as En, MessageList as Sn, ChannelList as In, InfiniteScroll as Tn } from "stream-chat-react";
6
+ import { StarIcon as Ee, DotsThreeIcon as An, SpinnerGapIcon as ze, SignOutIcon as Mn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as Qe, CurrencyDollarIcon as Rn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as cs, FileMdIcon as zn, FileTextIcon as Pn, FileZipIcon as Fn, FilePptIcon as On, FileCsvIcon as $n, FileXlsIcon as jn, FileDocIcon as Bn, FilePdfIcon as Un, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Hn, ChecksIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Jn, ArrowUpIcon as Zn, ProhibitIcon as Qn } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
- import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
- const us = rt({
8
+ import { MessageActions as ea, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
+ const us = at({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const us = rt({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), lt = () => Ie(us), dl = ({
19
+ }), it = () => Se(us), cl = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -24,10 +24,10 @@ const us = rt({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var A, E;
27
+ var M, E;
28
28
  const l = J(
29
- (C, ...I) => {
30
- i && console.log(`🔥 [MessagingProvider] ${C}`, ...I);
29
+ (C, ...T) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${C}`, ...T);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,37 +37,37 @@ const us = rt({
37
37
  serviceConfig: !!n,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = B(null), [u, p] = B(null), [h, g] = B(!1), [c, v] = B(!1), [w, b] = B(null), f = G(!1), x = G(null), N = G(n);
41
- N.current = n;
42
- const S = G(i);
43
- S.current = i;
44
- const T = G({
40
+ const [o, d] = B(null), [u, p] = B(null), [h, f] = B(!1), [b, c] = B(!1), [w, v] = B(null), g = H(!1), x = H(null), _ = H(n);
41
+ _.current = n;
42
+ const A = H(i);
43
+ A.current = i;
44
+ const S = H({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: n,
48
48
  capabilities: r
49
- }), M = G(0);
50
- M.current++, l("📊 RENDER INFO", {
51
- renderCount: M.current,
49
+ }), I = H(0);
50
+ I.current++, l("📊 RENDER INFO", {
51
+ renderCount: I.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
- userChanged: T.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: T.current.apiKey !== a,
56
- serviceConfigChanged: T.current.serviceConfig !== n,
57
- capabilitiesChanged: T.current.capabilities !== r
54
+ userChanged: S.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: S.current.apiKey !== a,
56
+ serviceConfigChanged: S.current.serviceConfig !== n,
57
+ capabilitiesChanged: S.current.capabilities !== r
58
58
  }
59
- }), T.current = {
59
+ }), S.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: n,
63
63
  capabilities: r
64
64
  };
65
- const L = G(null);
66
- a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new Ys(a) });
65
+ const L = H(null);
66
+ a && ((M = L.current) == null ? void 0 : M.apiKey) !== a && (L.current = { apiKey: a, client: new Ys(a) });
67
67
  const D = a ? ((E = L.current) == null ? void 0 : E.client) ?? null : null;
68
68
  K(() => {
69
- const C = M.current, I = N.current;
70
- if (!a || !D || !I) {
69
+ const C = I.current, T = _.current;
70
+ if (!a || !D || !T) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
72
  renderCount: C,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
@@ -78,36 +78,36 @@ const us = rt({
78
78
  renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const $ = new Hs({
82
- ...I,
81
+ const F = new Hs({
82
+ ...T,
83
83
  apiKey: a,
84
- debug: S.current,
84
+ debug: A.current,
85
85
  client: D
86
86
  });
87
- x.current = $, d($), l("✅ SERVICE SET", {
87
+ x.current = F, d(F), l("✅ SERVICE SET", {
88
88
  renderCount: C,
89
- serviceInstance: !!$
89
+ serviceInstance: !!F
90
90
  });
91
91
  }, [a, D]);
92
- const O = G(null);
92
+ const $ = H(null);
93
93
  K(() => {
94
- var I, $;
94
+ var T, F;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
- isConnecting: f.current,
99
+ isConnecting: g.current,
100
100
  isConnected: h,
101
101
  dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
102
  }), !o || !t) {
103
103
  l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
- if (f.current) {
106
+ if (g.current) {
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((I = O.current) == null ? void 0 : I.serviceId) === o && (($ = O.current) == null ? void 0 : $.userId) === t.id) {
110
+ if (((T = $.current) == null ? void 0 : T.serviceId) === o && ((F = $.current) == null ? void 0 : F.userId) === t.id) {
111
111
  l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,22 +115,22 @@ const us = rt({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), f.current = !0, v(!0), b(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), g.current = !0, c(!0), v(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const F = await o.connectUser(t);
122
- p(F), g(!0), O.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
121
+ const O = await o.connectUser(t);
122
+ p(O), f(!0), $.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: F.userID
124
+ clientId: O.userID
125
125
  });
126
- } catch (F) {
127
- const V = F instanceof Error ? F.message : "Connection failed";
128
- b(V), l("❌ USER CONNECTION ERROR", {
126
+ } catch (O) {
127
+ const V = O instanceof Error ? O.message : "Connection failed";
128
+ v(V), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: V
131
131
  });
132
132
  } finally {
133
- v(!1), f.current = !1, l("🔄 USER CONNECTION FINISHED", {
133
+ c(!1), g.current = !1, l("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: h
136
136
  });
@@ -139,8 +139,8 @@ const us = rt({
139
139
  }, [o, t, l, h]), K(() => {
140
140
  const C = D;
141
141
  return () => {
142
- var I;
143
- C && (O.current = null, (I = x.current) == null || I.disconnectUser().catch(console.error));
142
+ var T;
143
+ C && ($.current = null, (T = x.current) == null || T.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [D]);
146
146
  const z = J(async () => {
@@ -151,32 +151,32 @@ const us = rt({
151
151
  l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), v(!0);
154
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), c(!0);
155
155
  try {
156
156
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
157
  const C = await o.connectUser(t);
158
- p(C), g(!0), b(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
158
+ p(C), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
159
  } catch (C) {
160
- const I = C instanceof Error ? C.message : "Refresh failed";
161
- b(I), l("❌ CONNECTION REFRESH ERROR", {
160
+ const T = C instanceof Error ? C.message : "Refresh failed";
161
+ v(T), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: I
163
+ error: T
164
164
  });
165
165
  } finally {
166
- v(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ c(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
168
  }, [o, t, l]), y = U.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!o,
170
170
  hasClient: !!u,
171
171
  isConnected: h,
172
- isLoading: c,
172
+ isLoading: b,
173
173
  hasError: !!w,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
176
  service: o,
177
177
  client: u,
178
178
  isConnected: h,
179
- isLoading: c,
179
+ isLoading: b,
180
180
  error: w,
181
181
  capabilities: r,
182
182
  refreshConnection: z,
@@ -185,7 +185,7 @@ const us = rt({
185
185
  o,
186
186
  u,
187
187
  h,
188
- c,
188
+ b,
189
189
  w,
190
190
  r,
191
191
  z,
@@ -193,7 +193,7 @@ const us = rt({
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: M.current,
196
+ renderCount: I.current,
197
197
  willRenderChat: !!D,
198
198
  contextValueReady: !!y
199
199
  }), /* @__PURE__ */ s(us.Provider, { value: y, children: D ? /* @__PURE__ */ s(
@@ -206,7 +206,7 @@ const us = rt({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, sa = () => lt(), ot = (e) => {
209
+ }, ta = () => it(), lt = (e) => {
210
210
  var a, r;
211
211
  const [t, n] = B(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -228,14 +228,14 @@ const us = rt({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, na = "linktree-official", aa = "linktree-official-sender";
231
+ }, sa = "linktree-official", na = "linktree-official-sender";
232
232
  function Ue(e, t, n) {
233
233
  const a = Object.values(e || {});
234
- if (n === na) {
234
+ if (n === sa) {
235
235
  const r = a.find(
236
236
  (i) => {
237
237
  var l;
238
- return ((l = i.user) == null ? void 0 : l.id) === aa;
238
+ return ((l = i.user) == null ? void 0 : l.id) === na;
239
239
  }
240
240
  );
241
241
  if (r) return r;
@@ -247,15 +247,15 @@ function Ue(e, t, n) {
247
247
  }
248
248
  );
249
249
  }
250
- const ra = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
251
- function ia(e) {
252
- return ra.test(e.trim());
250
+ const aa = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
251
+ function ra(e) {
252
+ return aa.test(e.trim());
253
253
  }
254
254
  function Kt(e, t) {
255
255
  const n = e == null ? void 0 : e.trim();
256
- return !n || t && n === t ? !1 : !ia(n);
256
+ return !n || t && n === t ? !1 : !ra(n);
257
257
  }
258
- function ct(e) {
258
+ function ot(e) {
259
259
  return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
260
260
  }
261
261
  const Jt = [
@@ -286,7 +286,7 @@ const Jt = [
286
286
  { emoji: "🍈", bgColor: "#D9F7E1" }
287
287
  // Melon
288
288
  ];
289
- function la(e) {
289
+ function ia(e) {
290
290
  let t = 0;
291
291
  for (let n = 0; n < e.length; n++) {
292
292
  const a = e.charCodeAt(n);
@@ -295,12 +295,12 @@ function la(e) {
295
295
  return Math.abs(t);
296
296
  }
297
297
  function ms(e) {
298
- return Jt[la(e) % Jt.length];
298
+ return Jt[ia(e) % Jt.length];
299
299
  }
300
- function oa(e) {
300
+ function la(e) {
301
301
  return ms(e).emoji;
302
302
  }
303
- function ca(e) {
303
+ function oa(e) {
304
304
  return ms(e).bgColor;
305
305
  }
306
306
  const ne = ({
@@ -312,7 +312,7 @@ const ne = ({
312
312
  shape: i = "squircle",
313
313
  dmAgentEnabled: l = !1
314
314
  }) => {
315
- const o = oa(e), d = ca(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
315
+ const o = la(e), d = oa(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, b = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, c = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: b, children: t ? /* @__PURE__ */ s(
316
316
  "img",
317
317
  {
318
318
  src: t,
@@ -342,7 +342,7 @@ const ne = ({
342
342
  width: `${n}px`,
343
343
  height: `${n}px`,
344
344
  backgroundColor: t ? void 0 : d,
345
- ...c
345
+ ...b
346
346
  },
347
347
  children: [
348
348
  r && /* @__PURE__ */ s(
@@ -362,21 +362,21 @@ const ne = ({
362
362
  "bg-transparent"
363
363
  ),
364
364
  style: {
365
- ...c,
365
+ ...b,
366
366
  ...l && {
367
- borderWidth: `${g}px`,
367
+ borderWidth: `${f}px`,
368
368
  borderStyle: "solid",
369
369
  borderColor: "var(--AI-Gradient, #7F22FE)",
370
370
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
371
371
  }
372
372
  },
373
- children: v
373
+ children: c
374
374
  }
375
375
  )
376
376
  ]
377
377
  }
378
378
  );
379
- }, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
379
+ }, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
380
380
  channel: e,
381
381
  participant: t,
382
382
  showBlockParticipant: n = !0,
@@ -389,11 +389,11 @@ const ne = ({
389
389
  onActionComplete: u,
390
390
  logLabel: p = "useChannelModerationActions"
391
391
  }) => {
392
- var A;
393
- const { service: h, debug: g } = lt(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, S] = B(!1), [T, M] = B(!1), L = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
392
+ var M;
393
+ const { service: h, debug: f } = it(), b = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, c = !!(a && n && h && b), [w, v] = B(!1), [g, x] = B(null), [_, A] = B(!1), [S, I] = B(!1), L = c && ((g == null ? void 0 : g.participantId) !== b || (g == null ? void 0 : g.service) !== h);
394
394
  return K(() => {
395
- if (!v || !h || !c) {
396
- b(!1), x(null);
395
+ if (!c || !h || !b) {
396
+ v(!1), x(null);
397
397
  return;
398
398
  }
399
399
  let E = !1;
@@ -401,69 +401,69 @@ const ne = ({
401
401
  try {
402
402
  const C = await h.getBlockedUsers();
403
403
  if (E) return;
404
- b(
404
+ v(
405
405
  C.some(
406
- (I) => I.blocked_user_id === c
406
+ (T) => T.blocked_user_id === b
407
407
  )
408
408
  );
409
409
  } catch (C) {
410
410
  E || console.error(`[${p}] Failed to check blocked status:`, C);
411
411
  } finally {
412
- E || x({ participantId: c, service: h });
412
+ E || x({ participantId: b, service: h });
413
413
  }
414
414
  })(), () => {
415
415
  E = !0;
416
416
  };
417
- }, [v, h, c, p]), {
417
+ }, [c, h, b, p]), {
418
418
  isParticipantBlocked: w,
419
419
  isCheckingBlockedStatus: L,
420
- isLeaving: N,
421
- isUpdatingBlockStatus: T,
420
+ isLeaving: _,
421
+ isUpdatingBlockStatus: S,
422
422
  handleLeaveConversation: async () => {
423
423
  var E;
424
- if (!N) {
425
- l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), S(!0);
424
+ if (!_) {
425
+ l == null || l(), f && console.log(`[${p}] Leave conversation`, e.cid), A(!0);
426
426
  try {
427
427
  const C = ((E = e._client) == null ? void 0 : E.userID) ?? null;
428
428
  await e.hide(C, !1), r && await r(e), u == null || u();
429
429
  } catch (C) {
430
430
  console.error(`[${p}] Failed to leave conversation`, C);
431
431
  } finally {
432
- S(!1);
432
+ A(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleBlockUser: async () => {
437
- var E, C, I;
438
- if (!(T || !h)) {
439
- o == null || o(), g && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
437
+ var E, C, T;
438
+ if (!(S || !h)) {
439
+ o == null || o(), f && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
440
440
  try {
441
- await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
442
- } catch ($) {
443
- console.error(`[${p}] Failed to block member`, $);
441
+ await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
442
+ } catch (F) {
443
+ console.error(`[${p}] Failed to block member`, F);
444
444
  } finally {
445
- M(!1);
445
+ I(!1);
446
446
  }
447
447
  }
448
448
  },
449
449
  handleUnblockUser: async () => {
450
- var E, C, I;
451
- if (!(T || !h)) {
452
- o == null || o(), g && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
450
+ var E, C, T;
451
+ if (!(S || !h)) {
452
+ o == null || o(), f && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
453
453
  try {
454
- await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
455
- } catch ($) {
456
- console.error(`[${p}] Failed to unblock member`, $);
454
+ await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
455
+ } catch (F) {
456
+ console.error(`[${p}] Failed to unblock member`, F);
457
457
  } finally {
458
- M(!1);
458
+ I(!1);
459
459
  }
460
460
  }
461
461
  },
462
462
  handleReportUser: () => {
463
- d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
463
+ d == null || d(), u == null || u(), window.open(ca, "_blank", "noopener,noreferrer");
464
464
  }
465
465
  };
466
- }, Ne = ({
466
+ }, _e = ({
467
467
  variant: e = "default",
468
468
  className: t,
469
469
  children: n,
@@ -480,7 +480,7 @@ const ne = ({
480
480
  ...a,
481
481
  children: n
482
482
  }
483
- ), st = ({
483
+ ), tt = ({
484
484
  channel: e,
485
485
  participant: t,
486
486
  showDeleteConversation: n = !0,
@@ -494,55 +494,55 @@ const ne = ({
494
494
  customChannelActions: p,
495
495
  triggerClassName: h
496
496
  }) => {
497
- const [g, c] = B(!1), v = G(null), w = Gs(), b = J(() => c(!1), []), {
498
- isParticipantBlocked: f,
497
+ const [f, b] = B(!1), c = H(null), w = Gs(), v = J(() => b(!1), []), {
498
+ isParticipantBlocked: g,
499
499
  isCheckingBlockedStatus: x,
500
- isLeaving: N,
501
- isUpdatingBlockStatus: S,
502
- handleLeaveConversation: T,
503
- handleBlockUser: M,
500
+ isLeaving: _,
501
+ isUpdatingBlockStatus: A,
502
+ handleLeaveConversation: S,
503
+ handleBlockUser: I,
504
504
  handleUnblockUser: L,
505
505
  handleReportUser: D
506
- } = ua({
506
+ } = da({
507
507
  channel: e,
508
508
  participant: t,
509
509
  showBlockParticipant: a,
510
- enabled: g,
510
+ enabled: f,
511
511
  onLeaveConversation: i,
512
512
  onBlockParticipant: l,
513
513
  onDeleteConversationClick: o,
514
514
  onBlockParticipantClick: d,
515
515
  onReportParticipantClick: u,
516
- onActionComplete: b,
516
+ onActionComplete: v,
517
517
  logLabel: "ChannelActionsMenu"
518
518
  });
519
519
  return K(() => {
520
- if (!g) return;
521
- const z = (A) => {
522
- v.current && !v.current.contains(A.target) && c(!1);
523
- }, y = (A) => {
524
- A.key === "Escape" && c(!1);
520
+ if (!f) return;
521
+ const z = (M) => {
522
+ c.current && !c.current.contains(M.target) && b(!1);
523
+ }, y = (M) => {
524
+ M.key === "Escape" && b(!1);
525
525
  };
526
526
  return document.addEventListener("mousedown", z), document.addEventListener("keydown", y), () => {
527
527
  document.removeEventListener("mousedown", z), document.removeEventListener("keydown", y);
528
528
  };
529
- }, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
529
+ }, [f]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: c, className: "relative", children: [
530
530
  /* @__PURE__ */ m(
531
531
  "button",
532
532
  {
533
533
  className: h,
534
534
  type: "button",
535
535
  "aria-haspopup": "true",
536
- "aria-expanded": g,
537
- "aria-controls": g ? w : void 0,
538
- onClick: () => c((z) => !z),
536
+ "aria-expanded": f,
537
+ "aria-controls": f ? w : void 0,
538
+ onClick: () => b((z) => !z),
539
539
  children: [
540
- /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
540
+ /* @__PURE__ */ s(An, { className: "size-5 text-black/90" }),
541
541
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
542
542
  ]
543
543
  }
544
544
  ),
545
- g && /* @__PURE__ */ s(
545
+ f && /* @__PURE__ */ s(
546
546
  "div",
547
547
  {
548
548
  id: w,
@@ -553,13 +553,13 @@ const ne = ({
553
553
  ),
554
554
  children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
555
555
  n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
556
- Ne,
556
+ _e,
557
557
  {
558
- onClick: T,
559
- disabled: N,
560
- "aria-busy": N,
558
+ onClick: S,
559
+ disabled: _,
560
+ "aria-busy": _,
561
561
  children: [
562
- N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
562
+ _ ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Mn, { className: "h-5 w-5" }),
563
563
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
564
564
  ]
565
565
  }
@@ -567,34 +567,34 @@ const ne = ({
567
567
  a && /* @__PURE__ */ s("li", { children: x ? (
568
568
  // Block status not yet resolved — show a disabled placeholder
569
569
  // so a premature click can't act on a stale block state.
570
- /* @__PURE__ */ m(Ne, { disabled: !0, "aria-busy": !0, children: [
570
+ /* @__PURE__ */ m(_e, { disabled: !0, "aria-busy": !0, children: [
571
571
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
572
572
  /* @__PURE__ */ s("span", { children: "Block" })
573
573
  ] })
574
- ) : f ? /* @__PURE__ */ m(
575
- Ne,
574
+ ) : g ? /* @__PURE__ */ m(
575
+ _e,
576
576
  {
577
577
  onClick: L,
578
- disabled: S,
579
- "aria-busy": S,
578
+ disabled: A,
579
+ "aria-busy": A,
580
580
  children: [
581
- S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
581
+ A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Unblock" })
583
583
  ]
584
584
  }
585
585
  ) : /* @__PURE__ */ m(
586
- Ne,
586
+ _e,
587
587
  {
588
- onClick: M,
589
- disabled: S,
590
- "aria-busy": S,
588
+ onClick: I,
589
+ disabled: A,
590
+ "aria-busy": A,
591
591
  children: [
592
- S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
592
+ A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
593
593
  /* @__PURE__ */ s("span", { children: "Block" })
594
594
  ]
595
595
  }
596
596
  ) }),
597
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: D, children: [
597
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(_e, { variant: "danger", onClick: D, children: [
598
598
  /* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ s("span", { children: "Report" })
600
600
  ] }) }),
@@ -603,10 +603,10 @@ const ne = ({
603
603
  }
604
604
  )
605
605
  ] });
606
- }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = (e) => {
606
+ }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ua = "CUSTOMER_PAID", ma = "Replies instantly with AI assistant", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ua, fa = (e) => {
607
607
  const t = e;
608
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
609
- }, pa = ({
608
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
609
+ }, ga = ({
610
610
  onBack: e,
611
611
  showBackButton: t,
612
612
  showStarButton: n = !1,
@@ -619,25 +619,25 @@ const ne = ({
619
619
  onDeleteConversationClick: u,
620
620
  onBlockParticipantClick: p,
621
621
  onReportParticipantClick: h,
622
- customChannelActions: g,
623
- renderChannelActions: c,
624
- showChannelInfo: v = !0,
622
+ customChannelActions: f,
623
+ renderChannelActions: b,
624
+ showChannelInfo: c = !0,
625
625
  onParticipantNameClick: w
626
626
  }) => {
627
- var D, O, z;
628
- const { channel: b } = le(), { client: f } = oe(), x = U.useMemo(
627
+ var D, $, z;
628
+ const { channel: v } = ue(), { client: g } = me(), x = U.useMemo(
629
629
  () => {
630
630
  var y;
631
631
  return Ue(
632
- (y = b.state) == null ? void 0 : y.members,
633
- f == null ? void 0 : f.userID,
634
- b.type
632
+ (y = v.state) == null ? void 0 : y.members,
633
+ g == null ? void 0 : g.userID,
634
+ v.type
635
635
  );
636
636
  },
637
- [(D = b.state) == null ? void 0 : D.members, f == null ? void 0 : f.userID, b.type]
638
- ), N = ct(x == null ? void 0 : x.user), S = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = ot(b), M = ga(x), L = async () => {
637
+ [(D = v.state) == null ? void 0 : D.members, g == null ? void 0 : g.userID, v.type]
638
+ ), _ = ot(x == null ? void 0 : x.user), A = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, S = lt(v), I = fa(x), L = async () => {
639
639
  try {
640
- T ? await b.unpin() : await b.pin();
640
+ S ? await v.unpin() : await v.pin();
641
641
  } catch (y) {
642
642
  console.error(
643
643
  "[ChannelHeaderRedesign] Failed to update pinned status:",
@@ -657,7 +657,7 @@ const ne = ({
657
657
  }),
658
658
  type: "button",
659
659
  "aria-label": "Back to conversations",
660
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
660
+ children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
661
661
  }
662
662
  ) }),
663
663
  /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
@@ -665,15 +665,15 @@ const ne = ({
665
665
  {
666
666
  type: "button",
667
667
  onClick: w,
668
- "aria-label": `View details for ${N}`,
668
+ "aria-label": `View details for ${_}`,
669
669
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
670
670
  children: [
671
671
  /* @__PURE__ */ s(
672
672
  ne,
673
673
  {
674
- id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
675
- name: N,
676
- image: S,
674
+ id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || v.id || "unknown",
675
+ name: _,
676
+ image: A,
677
677
  dmAgentEnabled: a,
678
678
  shape: "circle",
679
679
  size: 48,
@@ -682,17 +682,17 @@ const ne = ({
682
682
  ),
683
683
  /* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
684
684
  /* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
685
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
685
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: _ }),
686
686
  /* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
687
- M && /* @__PURE__ */ s(
687
+ I && /* @__PURE__ */ s(
688
688
  "span",
689
689
  {
690
690
  "aria-label": "Paid customer",
691
691
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
692
- children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
692
+ children: /* @__PURE__ */ s(Rn, { className: "size-2.5", weight: "bold" })
693
693
  }
694
694
  ),
695
- n && T && /* @__PURE__ */ s(
695
+ n && S && /* @__PURE__ */ s(
696
696
  "span",
697
697
  {
698
698
  "aria-label": "Starred conversation",
@@ -712,7 +712,7 @@ const ne = ({
712
712
  ] }),
713
713
  a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
714
714
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
715
- /* @__PURE__ */ s("span", { children: ha })
715
+ /* @__PURE__ */ s("span", { children: ma })
716
716
  ] })
717
717
  ] })
718
718
  ]
@@ -725,24 +725,24 @@ const ne = ({
725
725
  className: We,
726
726
  onClick: L,
727
727
  type: "button",
728
- "aria-pressed": T,
729
- "aria-label": T ? "Unstar conversation" : "Star conversation",
728
+ "aria-pressed": S,
729
+ "aria-label": S ? "Unstar conversation" : "Star conversation",
730
730
  children: /* @__PURE__ */ s(
731
731
  Ee,
732
732
  {
733
733
  className: k("size-5", {
734
- "text-[#FFD60A]": T,
735
- "text-black/90": !T
734
+ "text-[#FFD60A]": S,
735
+ "text-black/90": !S
736
736
  }),
737
- weight: T ? "fill" : "regular"
737
+ weight: S ? "fill" : "regular"
738
738
  }
739
739
  )
740
740
  }
741
741
  ),
742
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
743
- st,
742
+ c && (b !== void 0 ? b : /* @__PURE__ */ s(
743
+ tt,
744
744
  {
745
- channel: b,
745
+ channel: v,
746
746
  participant: x,
747
747
  showDeleteConversation: l,
748
748
  showBlockParticipant: o,
@@ -752,26 +752,26 @@ const ne = ({
752
752
  onDeleteConversationClick: u,
753
753
  onBlockParticipantClick: p,
754
754
  onReportParticipantClick: h,
755
- customChannelActions: g,
755
+ customChannelActions: f,
756
756
  triggerClassName: We
757
757
  }
758
758
  ))
759
759
  ] })
760
760
  ] }) });
761
- }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
762
- function va(e) {
763
- return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
761
+ }, pa = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
762
+ function ba(e) {
763
+ return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
764
764
  }
765
- function xa(e) {
766
- const { channel: t } = le(), { client: n } = oe("useMessageVote"), a = se(
767
- () => va(e.own_reactions),
765
+ function va(e) {
766
+ const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
767
+ () => ba(e.own_reactions),
768
768
  [e.own_reactions]
769
769
  ), r = J(async () => {
770
770
  if (n != null && n.userID)
771
771
  try {
772
- a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
772
+ a === "up" ? await t.deleteReaction(e.id, st) : await t.sendReaction(
773
773
  e.id,
774
- { type: nt },
774
+ { type: st },
775
775
  { enforce_unique: !0, skip_push: !0 }
776
776
  );
777
777
  } catch {
@@ -779,9 +779,9 @@ function xa(e) {
779
779
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
780
780
  if (n != null && n.userID)
781
781
  try {
782
- a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
782
+ a === "down" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
783
783
  e.id,
784
- { type: at },
784
+ { type: nt },
785
785
  { enforce_unique: !0, skip_push: !0 }
786
786
  );
787
787
  } catch {
@@ -789,7 +789,7 @@ function xa(e) {
789
789
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
790
790
  return { selected: a, voteUp: r, voteDown: i };
791
791
  }
792
- function wa(e) {
792
+ function xa(e) {
793
793
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
794
794
  }
795
795
  function hs({
@@ -797,16 +797,16 @@ function hs({
797
797
  viewerLanguage: t
798
798
  }) {
799
799
  var r;
800
- const n = e == null ? void 0 : e.text, a = wa(t);
800
+ const n = e == null ? void 0 : e.text, a = xa(t);
801
801
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
802
802
  }
803
- const _a = U.lazy(() => import("./Card-iGNcxybY.js")), Na = U.lazy(() => import("./Card-0wf8lj5n.js")), ya = U.lazy(() => import("./Card-RZ6C_IkE.js")), dt = () => /* @__PURE__ */ s(
803
+ const wa = U.lazy(() => import("./Card-gjy-ib_1.js")), _a = U.lazy(() => import("./Card-Ca5OtJh6.js")), Na = U.lazy(() => import("./Card-CZDLISxS.js")), ct = () => /* @__PURE__ */ s(
804
804
  "div",
805
805
  {
806
806
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
807
807
  "aria-hidden": !0
808
808
  }
809
- ), ka = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
809
+ ), ya = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), gs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), ka = fs, Ca = gs, Zt = { Composer: ya, Sent: fs, Received: gs, Creator: ka, Visitor: Ca }, Ea = [
810
810
  [/pdf/, "pdf"],
811
811
  [/wordprocessingml|msword|\.doc/, "doc"],
812
812
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -816,7 +816,7 @@ const _a = U.lazy(() => import("./Card-iGNcxybY.js")), Na = U.lazy(() => import(
816
816
  [/plain|rtf/, "text"],
817
817
  [/markdown/, "markdown"]
818
818
  ];
819
- function ce(e) {
819
+ function oe(e) {
820
820
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
821
821
  }
822
822
  function ps(e) {
@@ -825,33 +825,33 @@ function ps(e) {
825
825
  );
826
826
  return t ? t[1] : "generic";
827
827
  }
828
- const Ia = {
828
+ const Sa = {
829
829
  video: cs,
830
- audio: zn,
830
+ audio: Dn,
831
831
  image: Ln,
832
832
  document: os
833
- }, Ta = {
834
- pdf: Vn,
835
- doc: Un,
836
- xls: Bn,
837
- csv: jn,
838
- ppt: $n,
839
- zip: On,
840
- text: Fn,
841
- markdown: Pn,
833
+ }, Ia = {
834
+ pdf: Un,
835
+ doc: Bn,
836
+ xls: jn,
837
+ csv: $n,
838
+ ppt: On,
839
+ zip: Fn,
840
+ text: Pn,
841
+ markdown: zn,
842
842
  generic: os
843
843
  };
844
- function Aa(e) {
845
- const t = ce(e);
846
- return t !== "document" ? Ia[t] : Ta[ps(e)];
844
+ function Ta(e) {
845
+ const t = oe(e);
846
+ return t !== "document" ? Sa[t] : Ia[ps(e)];
847
847
  }
848
848
  function we(e, t) {
849
- return U.createElement(Aa(e), t);
849
+ return U.createElement(Ta(e), t);
850
850
  }
851
- const Ma = (e) => {
851
+ const Aa = (e) => {
852
852
  var t, n;
853
853
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
854
- }, Ra = ({
854
+ }, Ma = ({
855
855
  source: e,
856
856
  mimeType: t,
857
857
  poster: n,
@@ -863,74 +863,74 @@ const Ma = (e) => {
863
863
  muted: d = !1,
864
864
  onContainerClick: u
865
865
  }) => {
866
- const p = ce(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, S] = B(!1), [T, M] = B(!1), [L, D] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [E, C] = B(null), I = J(() => {
867
- D(!1), b(!0);
868
- }, []), $ = J((_) => {
869
- const R = g.current;
866
+ const p = oe(t), h = H(null), f = H(null), b = H(null), c = H(r), [w, v] = B(a), [g, x] = B(0), [_, A] = B(!1), [S, I] = B(!1), [L, D] = B(!1), [$, z] = B(!1), [y, M] = B(!0), [E, C] = B(null), T = J(() => {
867
+ D(!1), v(!0);
868
+ }, []), F = J((N) => {
869
+ const R = f.current;
870
870
  if (!R) return 0;
871
- const H = R.getBoundingClientRect();
871
+ const G = R.getBoundingClientRect();
872
872
  return Math.max(
873
873
  0,
874
- Math.min(1, (Ma(_) - H.left) / H.width)
874
+ Math.min(1, (Aa(N) - G.left) / G.width)
875
875
  );
876
- }, []), F = J((_) => {
876
+ }, []), O = J((N) => {
877
877
  const R = h.current;
878
- R && R.duration && (R.currentTime = _ * R.duration);
879
- }, []), V = (_) => {
880
- _.stopPropagation(), S(!0);
881
- const R = $(_);
882
- x(R), F(R);
878
+ R && R.duration && (R.currentTime = N * R.duration);
879
+ }, []), V = (N) => {
880
+ N.stopPropagation(), A(!0);
881
+ const R = F(N);
882
+ x(R), O(R);
883
883
  };
884
884
  K(() => {
885
- r !== void 0 && r !== v.current && (v.current = r, b(r));
885
+ r !== void 0 && r !== c.current && (c.current = r, v(r));
886
886
  }, [r]), K(() => {
887
887
  if (!w) {
888
- c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
888
+ b.current !== null && (cancelAnimationFrame(b.current), b.current = null);
889
889
  return;
890
890
  }
891
- const _ = () => {
891
+ const N = () => {
892
892
  const R = h.current;
893
- R && R.duration && !N && x(R.currentTime / R.duration), c.current = requestAnimationFrame(_);
893
+ R && R.duration && !_ && x(R.currentTime / R.duration), b.current = requestAnimationFrame(N);
894
894
  };
895
- return c.current = requestAnimationFrame(_), () => {
896
- c.current !== null && cancelAnimationFrame(c.current);
895
+ return b.current = requestAnimationFrame(N), () => {
896
+ b.current !== null && cancelAnimationFrame(b.current);
897
897
  };
898
- }, [w, N]), K(() => {
899
- const _ = h.current;
900
- _ && (w ? _.play().catch((R) => {
901
- b(!1), D(!0);
902
- }) : _.pause());
898
+ }, [w, _]), K(() => {
899
+ const N = h.current;
900
+ N && (w ? N.play().catch((R) => {
901
+ v(!1), D(!0);
902
+ }) : N.pause());
903
903
  }, [w]), K(() => {
904
- if (!N) return;
905
- const _ = (H) => x($(H)), R = (H) => {
906
- S(!1), F($(H));
904
+ if (!_) return;
905
+ const N = (G) => x(F(G)), R = (G) => {
906
+ A(!1), O(F(G));
907
907
  };
908
- return window.addEventListener("mousemove", _), window.addEventListener("mouseup", R), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", R), () => {
909
- window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", R);
908
+ return window.addEventListener("mousemove", N), window.addEventListener("mouseup", R), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", R), () => {
909
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", R);
910
910
  };
911
- }, [N, $, F]);
912
- const Q = E ? { aspectRatio: String(E) } : void 0, te = E ? "" : " aspect-video", X = Math.round(f * 100);
911
+ }, [_, F, O]);
912
+ const Z = E ? { aspectRatio: String(E) } : void 0, ee = E ? "" : " aspect-video", X = Math.round(g * 100);
913
913
  return /* @__PURE__ */ m(
914
914
  "div",
915
915
  {
916
916
  role: "button",
917
917
  tabIndex: 0,
918
- className: `relative cursor-pointer overflow-hidden bg-black ${te}`,
919
- style: Q,
920
- onClick: (_) => {
918
+ className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
919
+ style: Z,
920
+ onClick: (N) => {
921
921
  if (u) {
922
- u(_);
922
+ u(N);
923
923
  return;
924
924
  }
925
- L || l && b((R) => !R);
925
+ L || l && v((R) => !R);
926
926
  },
927
- onKeyDown: (_) => {
928
- if (!(_.key !== "Enter" && _.key !== " ")) {
929
- if (_.preventDefault(), u) {
930
- u(_);
927
+ onKeyDown: (N) => {
928
+ if (!(N.key !== "Enter" && N.key !== " ")) {
929
+ if (N.preventDefault(), u) {
930
+ u(N);
931
931
  return;
932
932
  }
933
- L || l && b((R) => !R);
933
+ L || l && v((R) => !R);
934
934
  }
935
935
  },
936
936
  children: [
@@ -956,12 +956,12 @@ const Ma = (e) => {
956
956
  style: { width: "100%", height: "100%" },
957
957
  onLoadStart: () => z(!0),
958
958
  onCanPlay: () => {
959
- z(!1), A(!1);
959
+ z(!1), M(!1);
960
960
  },
961
961
  onWaiting: () => z(!0),
962
962
  onPlay: () => D(!1),
963
963
  onEnded: () => {
964
- i || (b(!1), x(0));
964
+ i || (v(!1), x(0));
965
965
  },
966
966
  children: /* @__PURE__ */ s("track", { kind: "captions" })
967
967
  }
@@ -976,22 +976,22 @@ const Ma = (e) => {
976
976
  style: { width: "100%", height: "100%" },
977
977
  onLoadStart: () => z(!0),
978
978
  onCanPlay: () => {
979
- z(!1), A(!1);
979
+ z(!1), M(!1);
980
980
  },
981
981
  onWaiting: () => z(!0),
982
982
  onPlay: () => D(!1),
983
983
  onLoadedMetadata: () => {
984
- const _ = h.current;
985
- _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && C(_.videoWidth / _.videoHeight);
984
+ const N = h.current;
985
+ N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && C(N.videoWidth / N.videoHeight);
986
986
  },
987
987
  onEnded: () => {
988
- i || (b(!1), x(0));
988
+ i || (v(!1), x(0));
989
989
  },
990
990
  children: /* @__PURE__ */ s("track", { kind: "captions" })
991
991
  }
992
992
  ) }),
993
- O && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
- Ce,
993
+ $ && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
+ ke,
995
995
  {
996
996
  className: "size-8 animate-spin text-white/80",
997
997
  weight: "bold"
@@ -1004,13 +1004,13 @@ const Ma = (e) => {
1004
1004
  role: "button",
1005
1005
  tabIndex: 0,
1006
1006
  "aria-label": "Play preview",
1007
- onClick: (_) => {
1008
- _.stopPropagation(), I();
1007
+ onClick: (N) => {
1008
+ N.stopPropagation(), T();
1009
1009
  },
1010
- onKeyDown: (_) => {
1011
- _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), I());
1010
+ onKeyDown: (N) => {
1011
+ N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), T());
1012
1012
  },
1013
- children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(tt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1013
+ children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(et, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1014
1014
  }
1015
1015
  ),
1016
1016
  o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
@@ -1022,13 +1022,13 @@ const Ma = (e) => {
1022
1022
  "aria-valuemin": 0,
1023
1023
  "aria-valuemax": 100,
1024
1024
  tabIndex: 0,
1025
- ref: g,
1025
+ ref: f,
1026
1026
  className: "relative flex h-4 w-full cursor-pointer items-center",
1027
1027
  onMouseDown: V,
1028
1028
  onTouchStart: V,
1029
- onClick: (_) => _.stopPropagation(),
1030
- onKeyDown: (_) => {
1031
- _.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1029
+ onClick: (N) => N.stopPropagation(),
1030
+ onKeyDown: (N) => {
1031
+ N.key === "ArrowRight" && O(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1032
1032
  },
1033
1033
  children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
1034
1034
  "div",
@@ -1044,12 +1044,12 @@ const Ma = (e) => {
1044
1044
  "button",
1045
1045
  {
1046
1046
  type: "button",
1047
- onClick: (_) => {
1048
- _.stopPropagation(), b((R) => !R);
1047
+ onClick: (N) => {
1048
+ N.stopPropagation(), v((R) => !R);
1049
1049
  },
1050
1050
  className: "shrink-0 text-white",
1051
1051
  "aria-label": w ? "Pause" : "Play",
1052
- children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
1052
+ children: w ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
1053
1053
  }
1054
1054
  ),
1055
1055
  /* @__PURE__ */ m(
@@ -1061,21 +1061,21 @@ const Ma = (e) => {
1061
1061
  "aria-valuemin": 0,
1062
1062
  "aria-valuemax": 100,
1063
1063
  tabIndex: 0,
1064
- ref: g,
1064
+ ref: f,
1065
1065
  className: "relative flex h-4 w-full cursor-pointer items-center",
1066
1066
  onMouseDown: V,
1067
1067
  onTouchStart: V,
1068
- onClick: (_) => _.stopPropagation(),
1069
- onMouseEnter: () => M(!0),
1070
- onMouseLeave: () => M(!1),
1071
- onKeyDown: (_) => {
1072
- _.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1068
+ onClick: (N) => N.stopPropagation(),
1069
+ onMouseEnter: () => I(!0),
1070
+ onMouseLeave: () => I(!1),
1071
+ onKeyDown: (N) => {
1072
+ N.key === "ArrowRight" && O(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1073
1073
  },
1074
1074
  children: [
1075
1075
  /* @__PURE__ */ s(
1076
1076
  "div",
1077
1077
  {
1078
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || N ? "h-1.5" : "h-1"}`,
1078
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || _ ? "h-1.5" : "h-1"}`,
1079
1079
  children: /* @__PURE__ */ s(
1080
1080
  "div",
1081
1081
  {
@@ -1088,7 +1088,7 @@ const Ma = (e) => {
1088
1088
  /* @__PURE__ */ s(
1089
1089
  "div",
1090
1090
  {
1091
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || N ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1091
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1092
1092
  style: { left: `${X}%` }
1093
1093
  }
1094
1094
  )
@@ -1099,7 +1099,7 @@ const Ma = (e) => {
1099
1099
  ]
1100
1100
  }
1101
1101
  );
1102
- }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1102
+ }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1103
1103
  mimeType: e,
1104
1104
  sourceUrl: t,
1105
1105
  thumbnailUrl: n,
@@ -1108,9 +1108,9 @@ const Ma = (e) => {
1108
1108
  mediaPlayerProps: i,
1109
1109
  containedImage: l = !1
1110
1110
  }) => {
1111
- const o = ce(e), [d, u] = B(!1);
1111
+ const o = oe(e), [d, u] = B(!1);
1112
1112
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1113
- Ra,
1113
+ Ma,
1114
1114
  {
1115
1115
  source: t,
1116
1116
  mimeType: e,
@@ -1161,7 +1161,7 @@ const Ma = (e) => {
1161
1161
  weight: "regular"
1162
1162
  })
1163
1163
  }
1164
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Da(r)}`, children: /* @__PURE__ */ s(
1164
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ra(r)}`, children: /* @__PURE__ */ s(
1165
1165
  "img",
1166
1166
  {
1167
1167
  src: n,
@@ -1193,7 +1193,7 @@ const Ma = (e) => {
1193
1193
  rootRef: p,
1194
1194
  "data-testid": h
1195
1195
  }) => {
1196
- const g = e === "dark", c = g ? n ?? a : n ?? "", v = g && !n;
1196
+ const f = e === "dark", b = f ? n ?? a : n ?? "", c = f && !n;
1197
1197
  return /* @__PURE__ */ m(
1198
1198
  "div",
1199
1199
  {
@@ -1201,29 +1201,29 @@ const Ma = (e) => {
1201
1201
  "data-testid": h,
1202
1202
  className: k(
1203
1203
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1204
- g ? "bg-[#121110]" : "bg-white"
1204
+ f ? "bg-[#121110]" : "bg-white"
1205
1205
  ),
1206
1206
  children: [
1207
1207
  d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1208
1208
  u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
1209
1209
  t,
1210
1210
  /* @__PURE__ */ m("div", { className: "px-4 pb-3 pt-3", children: [
1211
- c.trim() !== "" && /* @__PURE__ */ s(
1211
+ b.trim() !== "" && /* @__PURE__ */ s(
1212
1212
  "p",
1213
1213
  {
1214
1214
  className: k("mb-0.5 truncate text-base font-medium", {
1215
- "text-black": !g,
1216
- "text-white/30": g && v,
1217
- "text-white": g && !v
1215
+ "text-black": !f,
1216
+ "text-white/30": f && c,
1217
+ "text-white": f && !c
1218
1218
  }),
1219
- children: c
1219
+ children: b
1220
1220
  }
1221
1221
  ),
1222
1222
  /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
1223
1223
  we(r, {
1224
1224
  className: k(
1225
1225
  "size-5 shrink-0",
1226
- g ? "text-white/55" : "text-black/55"
1226
+ f ? "text-white/55" : "text-black/55"
1227
1227
  ),
1228
1228
  weight: "regular"
1229
1229
  }),
@@ -1232,7 +1232,7 @@ const Ma = (e) => {
1232
1232
  {
1233
1233
  className: k(
1234
1234
  "text-xs font-medium",
1235
- g ? "text-white/55" : "text-black/55"
1235
+ f ? "text-white/55" : "text-black/55"
1236
1236
  ),
1237
1237
  children: i
1238
1238
  }
@@ -1248,25 +1248,25 @@ const Ma = (e) => {
1248
1248
  function xs(e) {
1249
1249
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1250
1250
  }
1251
- function ut(e) {
1251
+ function dt(e) {
1252
1252
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1253
1253
  }
1254
1254
  function La(e) {
1255
1255
  return e ? "bg-white/10" : "bg-black/5";
1256
1256
  }
1257
- function za(e) {
1257
+ function Da(e) {
1258
1258
  return e ? "text-white" : "text-black";
1259
1259
  }
1260
- function Pa(e) {
1260
+ function za(e) {
1261
1261
  return e ? "text-white/55" : "text-black/55";
1262
1262
  }
1263
- function Fa(e) {
1263
+ function Pa(e) {
1264
1264
  return e ? "text-white/40" : "text-black/40";
1265
1265
  }
1266
- function Oa(e) {
1266
+ function Fa(e) {
1267
1267
  return e ? "text-white/20" : "text-black/20";
1268
1268
  }
1269
- const mt = ({ attachment: e, isMyMessage: t }) => {
1269
+ const ut = ({ attachment: e, isMyMessage: t }) => {
1270
1270
  const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ m(U.Fragment, { children: [
1271
1271
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1272
1272
  "img",
@@ -1279,13 +1279,13 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
1279
1279
  "div",
1280
1280
  {
1281
1281
  className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1282
- children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
1282
+ children: /* @__PURE__ */ s(Gn, { className: `size-12 ${Fa(t)}` })
1283
1283
  }
1284
1284
  ) }),
1285
1285
  /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1286
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
1287
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
1288
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(t)}`, children: d })
1286
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Da(t)}`, children: n }),
1287
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${za(t)}`, children: a }),
1288
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Pa(t)}`, children: d })
1289
1289
  ] })
1290
1290
  ] });
1291
1291
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
@@ -1293,11 +1293,11 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
1293
1293
  function ws(e) {
1294
1294
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1295
1295
  }
1296
- function ht(e) {
1296
+ function mt(e) {
1297
1297
  var t;
1298
1298
  return (t = e.attachments) == null ? void 0 : t.find(ws);
1299
1299
  }
1300
- async function $a(e, t) {
1300
+ async function Oa(e, t) {
1301
1301
  let n;
1302
1302
  try {
1303
1303
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1309,7 +1309,7 @@ async function $a(e, t) {
1309
1309
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1310
1310
  l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1311
1311
  }
1312
- const ja = ({
1312
+ const $a = ({
1313
1313
  url: e,
1314
1314
  filename: t
1315
1315
  }) => {
@@ -1321,7 +1321,7 @@ const ja = ({
1321
1321
  onClick: (i) => {
1322
1322
  i.stopPropagation();
1323
1323
  const l = window.open("", "_blank", "noopener,noreferrer");
1324
- a(!0), $a(e, t).then(() => {
1324
+ a(!0), Oa(e, t).then(() => {
1325
1325
  l == null || l.close();
1326
1326
  }).catch(() => {
1327
1327
  l && (l.location.href = e);
@@ -1329,22 +1329,22 @@ const ja = ({
1329
1329
  },
1330
1330
  disabled: n,
1331
1331
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1332
- children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
- /* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
1332
+ children: n ? /* @__PURE__ */ s(ke, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
+ /* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
1334
1334
  "Download"
1335
1335
  ] })
1336
1336
  }
1337
1337
  );
1338
1338
  };
1339
- function ft(e) {
1340
- var h, g, c, v;
1339
+ function ht(e) {
1340
+ var h, f, b, c;
1341
1341
  const t = (h = e.attachments) == null ? void 0 : h.find(
1342
1342
  (w) => w.type === "video" && w.asset_url
1343
- ), n = (g = e.attachments) == null ? void 0 : g.find(
1343
+ ), n = (f = e.attachments) == null ? void 0 : f.find(
1344
1344
  (w) => w.type === "image" && w.image_url
1345
- ), a = (c = e.attachments) == null ? void 0 : c.find(
1345
+ ), a = (b = e.attachments) == null ? void 0 : b.find(
1346
1346
  (w) => w.type === "audio" && w.asset_url
1347
- ), r = (v = e.attachments) == null ? void 0 : v.find(
1347
+ ), r = (c = e.attachments) == null ? void 0 : c.find(
1348
1348
  (w) => w.type === "file" && w.asset_url
1349
1349
  ), i = t ?? n ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1350
1350
  if (!l) return null;
@@ -1392,7 +1392,7 @@ const _s = ({
1392
1392
  fileSize: a,
1393
1393
  thumbnailUrl: r
1394
1394
  }) => {
1395
- const i = ce(t), l = a !== void 0 ? xs(a) : void 0;
1395
+ const i = oe(t), l = a !== void 0 ? xs(a) : void 0;
1396
1396
  return /* @__PURE__ */ s(
1397
1397
  vs,
1398
1398
  {
@@ -1411,14 +1411,14 @@ const _s = ({
1411
1411
  containedImage: i === "image" || i === "document"
1412
1412
  }
1413
1413
  ),
1414
- action: /* @__PURE__ */ s(ja, { url: e, filename: n })
1414
+ action: /* @__PURE__ */ s($a, { url: e, filename: n })
1415
1415
  }
1416
1416
  );
1417
- }, Ba = ({
1417
+ }, ja = ({
1418
1418
  message: e,
1419
1419
  isMyMessage: t = !1
1420
1420
  }) => {
1421
- const n = ht(e), a = ft(e);
1421
+ const n = mt(e), a = ht(e);
1422
1422
  return !n && !a ? null : /* @__PURE__ */ m("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1423
1423
  !t && e.user && /* @__PURE__ */ s(
1424
1424
  ne,
@@ -1439,41 +1439,41 @@ const _s = ({
1439
1439
  {
1440
1440
  className: "str-chat__message-bubble",
1441
1441
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1442
- children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1442
+ children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1443
1443
  }
1444
1444
  ) })
1445
1445
  }
1446
1446
  )
1447
1447
  ] });
1448
- }, Ua = ({
1448
+ }, Ba = ({
1449
1449
  message: e
1450
1450
  }) => {
1451
- const t = ht(e);
1451
+ const t = mt(e);
1452
1452
  if (t)
1453
- return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1454
- const n = ft(e);
1453
+ return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
1454
+ const n = ht(e);
1455
1455
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1456
- }, Va = ({
1456
+ }, Ua = ({
1457
1457
  message: e
1458
1458
  }) => {
1459
- const t = ht(e);
1459
+ const t = mt(e);
1460
1460
  if (t)
1461
- return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1462
- const n = ft(e);
1461
+ return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
1462
+ const n = ht(e);
1463
1463
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
1464
- }, ul = Object.assign(Ba, {
1465
- Creator: Ua,
1466
- Visitor: Va
1467
- }), Ga = {
1464
+ }, dl = Object.assign(ja, {
1465
+ Creator: Ba,
1466
+ Visitor: Ua
1467
+ }), Va = {
1468
1468
  dark: "bg-[#121110]",
1469
1469
  light: "bg-[#e9eaed]"
1470
- }, Ha = {
1470
+ }, Ga = {
1471
1471
  dark: "text-white",
1472
1472
  light: "text-[#080707]"
1473
- }, Ya = {
1473
+ }, Ha = {
1474
1474
  dark: "border-white/[0.08]",
1475
1475
  light: "border-black/[0.08]"
1476
- }, qa = (e) => e === "dark" ? "sender" : "receiver", Wa = {
1476
+ }, Ya = (e) => e === "dark" ? "sender" : "receiver", qa = {
1477
1477
  sender: {
1478
1478
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1479
1479
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1495,7 +1495,7 @@ const _s = ({
1495
1495
  children: i,
1496
1496
  "data-testid": l
1497
1497
  }) => {
1498
- const o = t != null && t !== "", d = Wa[qa(e)][a];
1498
+ const o = t != null && t !== "", d = qa[Ya(e)][a];
1499
1499
  return /* @__PURE__ */ m(
1500
1500
  "div",
1501
1501
  {
@@ -1510,10 +1510,10 @@ const _s = ({
1510
1510
  // as the surrounding `CustomMessage` text bubbles.
1511
1511
  "relative w-[280px] overflow-hidden px-2 py-2",
1512
1512
  d,
1513
+ Va[e],
1513
1514
  Ga[e],
1514
- Ha[e],
1515
1515
  n && "border",
1516
- n && Ya[e],
1516
+ n && Ha[e],
1517
1517
  r
1518
1518
  ),
1519
1519
  children: [
@@ -1556,16 +1556,16 @@ const _s = ({
1556
1556
  ),
1557
1557
  children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
1558
1558
  }
1559
- ), Me = (e) => e === "received" ? "light" : "dark", Xa = ({
1559
+ ), Me = (e) => e === "received" ? "light" : "dark", Wa = ({
1560
1560
  firstOfGroup: e,
1561
1561
  endOfGroup: t,
1562
1562
  groupedByUser: n
1563
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ka = ({
1563
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Xa = ({
1564
1564
  src: e,
1565
1565
  mimeType: t,
1566
1566
  filename: n,
1567
1567
  items: a
1568
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1568
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ka = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1569
1569
  /* @__PURE__ */ s(
1570
1570
  "audio",
1571
1571
  {
@@ -1577,7 +1577,7 @@ const _s = ({
1577
1577
  }
1578
1578
  ),
1579
1579
  n ?? null
1580
- ] }), gt = ({
1580
+ ] }), ft = ({
1581
1581
  state: e,
1582
1582
  src: t,
1583
1583
  mimeType: n,
@@ -1588,10 +1588,10 @@ const _s = ({
1588
1588
  preload: o,
1589
1589
  onDismiss: d
1590
1590
  }) => {
1591
- const u = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1591
+ const u = Me(e), p = e === "composer" && !!d, h = Xa({ src: t, mimeType: n, filename: a, items: r });
1592
1592
  if (h.length === 0)
1593
1593
  return null;
1594
- const g = o ?? (h.length > 1 ? "none" : "metadata");
1594
+ const f = o ?? (h.length > 1 ? "none" : "metadata");
1595
1595
  return /* @__PURE__ */ s(
1596
1596
  Te,
1597
1597
  {
@@ -1599,30 +1599,30 @@ const _s = ({
1599
1599
  text: i,
1600
1600
  groupPosition: l,
1601
1601
  "data-testid": "audio-attachment",
1602
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
1603
- Ja,
1602
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((b, c) => /* @__PURE__ */ s(
1603
+ Ka,
1604
1604
  {
1605
- item: c,
1606
- preload: g,
1605
+ item: b,
1606
+ preload: f,
1607
1607
  trailingAction: (
1608
1608
  // Composer only supports a single attachment, so the
1609
1609
  // dismiss control sits on the only player.
1610
- p && v === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1610
+ p && c === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1611
1611
  )
1612
1612
  },
1613
- `${c.src}-${v}`
1613
+ `${b.src}-${c}`
1614
1614
  )) })
1615
1615
  }
1616
1616
  );
1617
- }, Za = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), tr = {
1618
- Composer: Za,
1619
- Sent: Qa,
1620
- Received: er
1617
+ }, Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Qa = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), er = {
1618
+ Composer: Ja,
1619
+ Sent: Za,
1620
+ Received: Qa
1621
1621
  };
1622
- function sr(e) {
1622
+ function tr(e) {
1623
1623
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
1624
1624
  }
1625
- const nr = {
1625
+ const sr = {
1626
1626
  pdf: "PDF",
1627
1627
  doc: "DOC",
1628
1628
  xls: "XLS",
@@ -1632,7 +1632,7 @@ const nr = {
1632
1632
  text: "TXT",
1633
1633
  markdown: "MD"
1634
1634
  };
1635
- function ar(e, t) {
1635
+ function nr(e, t) {
1636
1636
  if (t) {
1637
1637
  const r = t.lastIndexOf(".");
1638
1638
  if (r > 0 && r < t.length - 1) {
@@ -1641,8 +1641,8 @@ function ar(e, t) {
1641
1641
  }
1642
1642
  }
1643
1643
  if (!e) return;
1644
- if (ce(e) === "document") {
1645
- const r = ps(e), i = nr[r];
1644
+ if (oe(e) === "document") {
1645
+ const r = ps(e), i = sr[r];
1646
1646
  if (i) return i;
1647
1647
  if (e === "application/octet-stream") return;
1648
1648
  }
@@ -1650,8 +1650,8 @@ function ar(e, t) {
1650
1650
  if (!(!a || a === "*"))
1651
1651
  return a.toUpperCase();
1652
1652
  }
1653
- function rr(e, t, n) {
1654
- const a = ar(e, t), r = typeof n == "number" && n > 0 ? sr(n) : void 0;
1653
+ function ar(e, t, n) {
1654
+ const a = nr(e, t), r = typeof n == "number" && n > 0 ? tr(n) : void 0;
1655
1655
  return [a, r].filter(Boolean).join(" · ") || void 0;
1656
1656
  }
1657
1657
  function re(e) {
@@ -1662,13 +1662,13 @@ function re(e) {
1662
1662
  return "download";
1663
1663
  }
1664
1664
  }
1665
- const ir = {
1665
+ const rr = {
1666
1666
  dark: "text-white/55",
1667
1667
  light: "text-black/65"
1668
- }, lr = {
1668
+ }, ir = {
1669
1669
  dark: "bg-white/10",
1670
1670
  light: "bg-black/5"
1671
- }, or = {
1671
+ }, lr = {
1672
1672
  dark: "text-white/85",
1673
1673
  light: "text-black/85"
1674
1674
  }, ys = ({
@@ -1681,16 +1681,16 @@ const ir = {
1681
1681
  activateLabel: l,
1682
1682
  trailingAction: o
1683
1683
  }) => {
1684
- const d = n ?? t ?? "File", u = rr(a, t, r), p = /* @__PURE__ */ s(
1684
+ const d = n ?? t ?? "File", u = ar(a, t, r), p = /* @__PURE__ */ s(
1685
1685
  "div",
1686
1686
  {
1687
1687
  className: k(
1688
1688
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1689
- lr[e]
1689
+ ir[e]
1690
1690
  ),
1691
1691
  "aria-hidden": !0,
1692
1692
  children: we(a, {
1693
- className: k("size-6", or[e]),
1693
+ className: k("size-6", lr[e]),
1694
1694
  weight: "regular"
1695
1695
  })
1696
1696
  }
@@ -1701,12 +1701,12 @@ const ir = {
1701
1701
  {
1702
1702
  className: k(
1703
1703
  "truncate text-xs leading-4",
1704
- ir[e]
1704
+ rr[e]
1705
1705
  ),
1706
1706
  children: u
1707
1707
  }
1708
1708
  ) : null
1709
- ] }), g = i ? /* @__PURE__ */ m(
1709
+ ] }), f = i ? /* @__PURE__ */ m(
1710
1710
  "button",
1711
1711
  {
1712
1712
  type: "button",
@@ -1721,12 +1721,12 @@ const ir = {
1721
1721
  h
1722
1722
  ]
1723
1723
  }
1724
- ) : /* @__PURE__ */ m(ee, { children: [
1724
+ ) : /* @__PURE__ */ m(te, { children: [
1725
1725
  p,
1726
1726
  h
1727
1727
  ] });
1728
1728
  return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1729
- g,
1729
+ f,
1730
1730
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1731
1731
  ] });
1732
1732
  };
@@ -1744,14 +1744,14 @@ async function ks(e, t) {
1744
1744
  }
1745
1745
  }
1746
1746
  }
1747
- const cr = ({
1747
+ const or = ({
1748
1748
  src: e,
1749
1749
  filename: t,
1750
1750
  fileSize: n,
1751
1751
  mimeType: a,
1752
1752
  title: r,
1753
1753
  items: i
1754
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], dr = ({
1754
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], cr = ({
1755
1755
  variant: e,
1756
1756
  item: t,
1757
1757
  index: n,
@@ -1772,7 +1772,7 @@ const cr = ({
1772
1772
  trailingAction: r
1773
1773
  }
1774
1774
  );
1775
- }, pt = ({
1775
+ }, gt = ({
1776
1776
  state: e,
1777
1777
  src: t,
1778
1778
  filename: n,
@@ -1785,21 +1785,21 @@ const cr = ({
1785
1785
  onClick: u,
1786
1786
  onDismiss: p
1787
1787
  }) => {
1788
- const h = Me(e), g = e === "composer" && !!p, c = cr({
1788
+ const h = Me(e), f = e === "composer" && !!p, b = or({
1789
1789
  src: t,
1790
1790
  filename: n,
1791
1791
  fileSize: a,
1792
1792
  mimeType: r,
1793
1793
  title: i,
1794
1794
  items: l
1795
- }), v = (b) => {
1796
- if ((u == null ? void 0 : u(b)) === !1) return;
1797
- const f = c[b];
1798
- if (!f) return;
1799
- const x = f.filename ?? re(f.src);
1800
- ks(f.src, x);
1795
+ }), c = (v) => {
1796
+ if ((u == null ? void 0 : u(v)) === !1) return;
1797
+ const g = b[v];
1798
+ if (!g) return;
1799
+ const x = g.filename ?? re(g.src);
1800
+ ks(g.src, x);
1801
1801
  };
1802
- if (c.length === 0)
1802
+ if (b.length === 0)
1803
1803
  return null;
1804
1804
  const w = /* @__PURE__ */ s(
1805
1805
  "span",
@@ -1809,7 +1809,7 @@ const cr = ({
1809
1809
  h === "dark" ? "text-white/70" : "text-black/70"
1810
1810
  ),
1811
1811
  "aria-hidden": !0,
1812
- children: /* @__PURE__ */ s(Se, { className: "size-5", weight: "bold" })
1812
+ children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
1813
1813
  }
1814
1814
  );
1815
1815
  return /* @__PURE__ */ s(
@@ -1819,29 +1819,29 @@ const cr = ({
1819
1819
  text: o,
1820
1820
  groupPosition: d,
1821
1821
  "data-testid": "file-attachment",
1822
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, f) => /* @__PURE__ */ s(
1823
- dr,
1822
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: b.map((v, g) => /* @__PURE__ */ s(
1823
+ cr,
1824
1824
  {
1825
1825
  variant: h,
1826
- item: b,
1827
- index: f,
1828
- onActivate: v,
1829
- trailingAction: g && f === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1826
+ item: v,
1827
+ index: g,
1828
+ onActivate: c,
1829
+ trailingAction: f && g === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1830
1830
  },
1831
- `${b.src}-${f}`
1831
+ `${v.src}-${g}`
1832
1832
  )) })
1833
1833
  }
1834
1834
  );
1835
- }, ur = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), fr = {
1836
- Composer: ur,
1837
- Sent: mr,
1838
- Received: hr
1839
- }, bt = ({
1835
+ }, dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), mr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), hr = {
1836
+ Composer: dr,
1837
+ Sent: ur,
1838
+ Received: mr
1839
+ }, pt = ({
1840
1840
  onPrev: e,
1841
1841
  onNext: t,
1842
1842
  prevLabel: n = "Previous",
1843
1843
  nextLabel: a = "Next"
1844
- }) => /* @__PURE__ */ m(ee, { children: [
1844
+ }) => /* @__PURE__ */ m(te, { children: [
1845
1845
  /* @__PURE__ */ s(
1846
1846
  "button",
1847
1847
  {
@@ -1849,7 +1849,7 @@ const cr = ({
1849
1849
  onClick: e,
1850
1850
  "aria-label": n,
1851
1851
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1852
- children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
1852
+ children: /* @__PURE__ */ s(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
1853
1853
  }
1854
1854
  ),
1855
1855
  /* @__PURE__ */ s(
@@ -1872,14 +1872,14 @@ const cr = ({
1872
1872
  onTriggered: l
1873
1873
  }) => {
1874
1874
  const [o, d] = B(!1), u = J(
1875
- (c) => {
1876
- c.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1875
+ (b) => {
1876
+ b.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1877
1877
  }).finally(() => {
1878
1878
  d(!1), l == null || l();
1879
1879
  }));
1880
1880
  },
1881
1881
  [o, e, t, l]
1882
- ), p = r ?? n !== "pill", g = { className: k(
1882
+ ), p = r ?? n !== "pill", f = { className: k(
1883
1883
  n === "pill" ? "size-4" : "size-5",
1884
1884
  "shrink-0"
1885
1885
  ), weight: "bold" };
@@ -1898,14 +1898,14 @@ const cr = ({
1898
1898
  }[i]
1899
1899
  ),
1900
1900
  children: o ? /* @__PURE__ */ s(
1901
- Ce,
1901
+ ke,
1902
1902
  {
1903
1903
  className: "size-4 animate-spin",
1904
1904
  weight: "bold",
1905
1905
  "aria-hidden": !0
1906
1906
  }
1907
1907
  ) : /* @__PURE__ */ s(
1908
- Se,
1908
+ Ce,
1909
1909
  {
1910
1910
  className: "size-5 shrink-0",
1911
1911
  weight: "bold",
@@ -1921,7 +1921,7 @@ const cr = ({
1921
1921
  disabled: o,
1922
1922
  "aria-label": a,
1923
1923
  className: "mes-media-viewer__action",
1924
- children: o ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1924
+ children: o ? /* @__PURE__ */ s(ke, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
1925
  }
1926
1926
  ) : /* @__PURE__ */ m(
1927
1927
  "button",
@@ -1936,18 +1936,18 @@ const cr = ({
1936
1936
  ),
1937
1937
  children: [
1938
1938
  o ? /* @__PURE__ */ s(
1939
- Ce,
1939
+ ke,
1940
1940
  {
1941
1941
  className: "size-4 animate-spin",
1942
1942
  weight: "bold",
1943
1943
  "aria-hidden": !0
1944
1944
  }
1945
- ) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
1945
+ ) : /* @__PURE__ */ s(Ce, { ...f, "aria-hidden": !0 }),
1946
1946
  p ? null : a
1947
1947
  ]
1948
1948
  }
1949
1949
  );
1950
- }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
1950
+ }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
1951
1951
  length: e,
1952
1952
  initialIndex: t,
1953
1953
  open: n
@@ -1972,7 +1972,7 @@ const cr = ({
1972
1972
  };
1973
1973
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
1974
1974
  }, [n, e, l, o]), { index: r, prev: l, next: o };
1975
- }, xt = ({
1975
+ }, vt = ({
1976
1976
  open: e,
1977
1977
  onClose: t,
1978
1978
  ariaLabel: n,
@@ -1981,9 +1981,9 @@ const cr = ({
1981
1981
  children: i,
1982
1982
  "data-testid": l
1983
1983
  }) => {
1984
- const o = G(null), d = G(null);
1984
+ const o = H(null), d = H(null);
1985
1985
  return K(() => {
1986
- var g;
1986
+ var f;
1987
1987
  const h = o.current;
1988
1988
  if (h) {
1989
1989
  if (e) {
@@ -1996,8 +1996,8 @@ const cr = ({
1996
1996
  }
1997
1997
  else
1998
1998
  h.setAttribute("open", "");
1999
- const c = typeof document < "u" ? document.activeElement : null;
2000
- return (g = d.current) == null || g.focus(), () => {
1999
+ const b = typeof document < "u" ? document.activeElement : null;
2000
+ return (f = d.current) == null || f.focus(), () => {
2001
2001
  if (h.open)
2002
2002
  if (typeof h.close == "function")
2003
2003
  try {
@@ -2007,7 +2007,7 @@ const cr = ({
2007
2007
  }
2008
2008
  else
2009
2009
  h.removeAttribute("open");
2010
- c && document.body.contains(c) && c.focus();
2010
+ b && document.body.contains(b) && b.focus();
2011
2011
  };
2012
2012
  }
2013
2013
  if (h.open)
@@ -2062,22 +2062,22 @@ const cr = ({
2062
2062
  ]
2063
2063
  }
2064
2064
  );
2065
- }, Ss = ({
2065
+ }, Es = ({
2066
2066
  open: e,
2067
2067
  items: t,
2068
2068
  initialIndex: n = 0,
2069
2069
  onClose: a
2070
2070
  }) => {
2071
- const { index: r, prev: i, next: l } = vt({
2071
+ const { index: r, prev: i, next: l } = bt({
2072
2072
  length: t.length,
2073
2073
  initialIndex: n,
2074
2074
  open: e
2075
- }), o = t[r], d = se(
2075
+ }), o = t[r], d = ae(
2076
2076
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "image"),
2077
2077
  [o]
2078
2078
  );
2079
2079
  return o ? /* @__PURE__ */ m(
2080
- xt,
2080
+ vt,
2081
2081
  {
2082
2082
  open: e,
2083
2083
  onClose: a,
@@ -2107,7 +2107,7 @@ const cr = ({
2107
2107
  `${r}:${o.src}`
2108
2108
  ),
2109
2109
  t.length > 1 ? /* @__PURE__ */ s(
2110
- bt,
2110
+ pt,
2111
2111
  {
2112
2112
  onPrev: i,
2113
2113
  onNext: l,
@@ -2118,7 +2118,7 @@ const cr = ({
2118
2118
  ]
2119
2119
  }
2120
2120
  ) : null;
2121
- }, gr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Es = ({
2121
+ }, fr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Ss = ({
2122
2122
  tiles: e,
2123
2123
  onTileActivate: t,
2124
2124
  maxVisible: n = 4,
@@ -2127,7 +2127,7 @@ const cr = ({
2127
2127
  const r = e.length;
2128
2128
  if (r === 0) return null;
2129
2129
  const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, p) => {
2130
- const h = k(gr, "h-full w-full");
2130
+ const h = k(fr, "h-full w-full");
2131
2131
  return t ? /* @__PURE__ */ m(
2132
2132
  "button",
2133
2133
  {
@@ -2196,7 +2196,7 @@ const cr = ({
2196
2196
  [e]
2197
2197
  ), l = J(() => n(!1), []);
2198
2198
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2199
- }, pr = (e, t, n, a) => ({
2199
+ }, gr = (e, t, n, a) => ({
2200
2200
  ariaLabel: `Open image ${t + 1} of ${n}`,
2201
2201
  content: /* @__PURE__ */ s(
2202
2202
  "img",
@@ -2211,7 +2211,7 @@ const cr = ({
2211
2211
  className: "absolute inset-0 size-full rounded-md object-cover"
2212
2212
  }
2213
2213
  )
2214
- }), br = ({
2214
+ }), pr = ({
2215
2215
  src: e,
2216
2216
  alt: t,
2217
2217
  items: n
@@ -2219,7 +2219,7 @@ const cr = ({
2219
2219
  src: n.src,
2220
2220
  alt: n.alt,
2221
2221
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2222
- })), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2222
+ })), br = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2223
2223
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Re(
2224
2224
  r
2225
2225
  );
@@ -2246,7 +2246,7 @@ const cr = ({
2246
2246
  ),
2247
2247
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
2248
2248
  /* @__PURE__ */ s(
2249
- Ss,
2249
+ Es,
2250
2250
  {
2251
2251
  open: l,
2252
2252
  items: Is([{ src: e, alt: t }], n),
@@ -2266,13 +2266,13 @@ const cr = ({
2266
2266
  loading: o = "lazy",
2267
2267
  onClick: d
2268
2268
  }) => {
2269
- const u = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2269
+ const u = pr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: f, handleActivate: b, closeViewer: c } = Re(
2270
2270
  d
2271
2271
  );
2272
2272
  if (u.length === 0)
2273
2273
  return null;
2274
2274
  const w = u.map(
2275
- (b, f) => pr(b, f, u.length, o)
2275
+ (v, g) => gr(v, g, u.length, o)
2276
2276
  );
2277
2277
  return /* @__PURE__ */ m(
2278
2278
  Te,
@@ -2282,42 +2282,42 @@ const cr = ({
2282
2282
  groupPosition: l,
2283
2283
  "data-testid": "image-attachment",
2284
2284
  children: [
2285
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2285
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ss, { tiles: w, onTileActivate: b }) }),
2286
2286
  /* @__PURE__ */ s(
2287
- Ss,
2287
+ Es,
2288
2288
  {
2289
2289
  open: h,
2290
2290
  items: Is(u, a),
2291
- initialIndex: g,
2292
- onClose: v
2291
+ initialIndex: f,
2292
+ onClose: c
2293
2293
  }
2294
2294
  )
2295
2295
  ]
2296
2296
  }
2297
2297
  );
2298
- }, xr = (e) => /* @__PURE__ */ s(vr, { ...e }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), _r = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), Nr = {
2299
- Composer: xr,
2300
- Sent: wr,
2301
- Received: _r
2302
- }, yr = ({
2298
+ }, vr = (e) => /* @__PURE__ */ s(br, { ...e }), xr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), _r = {
2299
+ Composer: vr,
2300
+ Sent: xr,
2301
+ Received: wr
2302
+ }, Nr = ({
2303
2303
  open: e,
2304
2304
  items: t,
2305
2305
  initialIndex: n = 0,
2306
2306
  onClose: a
2307
2307
  }) => {
2308
- const { index: r, prev: i, next: l } = vt({
2308
+ const { index: r, prev: i, next: l } = bt({
2309
2309
  length: t.length,
2310
2310
  initialIndex: n,
2311
2311
  open: e
2312
- }), o = t[r], d = se(
2312
+ }), o = t[r], d = ae(
2313
2313
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
2314
2314
  [o]
2315
- ), u = se(
2316
- () => o ? kr(o.src) : void 0,
2315
+ ), u = ae(
2316
+ () => o ? yr(o.src) : void 0,
2317
2317
  [o]
2318
2318
  );
2319
2319
  return !o || !u ? null : /* @__PURE__ */ m(
2320
- xt,
2320
+ vt,
2321
2321
  {
2322
2322
  open: e,
2323
2323
  onClose: a,
@@ -2336,7 +2336,7 @@ const cr = ({
2336
2336
  `${r}:${o.src}`
2337
2337
  ),
2338
2338
  t.length > 1 ? /* @__PURE__ */ s(
2339
- bt,
2339
+ pt,
2340
2340
  {
2341
2341
  onPrev: i,
2342
2342
  onNext: l,
@@ -2347,16 +2347,16 @@ const cr = ({
2347
2347
  ]
2348
2348
  }
2349
2349
  );
2350
- }, kr = (e) => {
2350
+ }, yr = (e) => {
2351
2351
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2352
2352
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2353
- }, Cr = ({
2353
+ }, kr = ({
2354
2354
  src: e,
2355
2355
  filename: t,
2356
2356
  fileSize: n,
2357
2357
  title: a,
2358
2358
  items: r
2359
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Sr = ({
2359
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Cr = ({
2360
2360
  variant: e,
2361
2361
  item: t,
2362
2362
  index: n,
@@ -2377,7 +2377,7 @@ const cr = ({
2377
2377
  trailingAction: r
2378
2378
  }
2379
2379
  );
2380
- }, wt = ({
2380
+ }, xt = ({
2381
2381
  state: e,
2382
2382
  src: t,
2383
2383
  filename: n,
@@ -2389,12 +2389,12 @@ const cr = ({
2389
2389
  onClick: d,
2390
2390
  onDismiss: u
2391
2391
  }) => {
2392
- const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2392
+ const p = Me(e), h = kr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
2393
2393
  d
2394
- ), b = e === "composer" && !!u;
2394
+ ), v = e === "composer" && !!u;
2395
2395
  if (h.length === 0)
2396
2396
  return null;
2397
- const f = h.map((x) => ({
2397
+ const g = h.map((x) => ({
2398
2398
  src: x.src,
2399
2399
  filename: x.filename ?? re(x.src)
2400
2400
  }));
@@ -2406,61 +2406,61 @@ const cr = ({
2406
2406
  groupPosition: o,
2407
2407
  "data-testid": "pdf-attachment",
2408
2408
  children: [
2409
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2410
- const S = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2409
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, _) => {
2410
+ const A = x.filename ?? re(x.src), S = v && _ === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2411
2411
  Cs,
2412
2412
  {
2413
2413
  url: x.src,
2414
- filename: S,
2414
+ filename: A,
2415
2415
  variant: "inline",
2416
- label: `Download ${S}`,
2416
+ label: `Download ${A}`,
2417
2417
  tone: p
2418
2418
  }
2419
2419
  );
2420
2420
  return /* @__PURE__ */ s(
2421
- Sr,
2421
+ Cr,
2422
2422
  {
2423
2423
  variant: p,
2424
2424
  item: x,
2425
- index: N,
2426
- onActivate: v,
2427
- trailingAction: T
2425
+ index: _,
2426
+ onActivate: c,
2427
+ trailingAction: S
2428
2428
  },
2429
- `${x.src}-${N}`
2429
+ `${x.src}-${_}`
2430
2430
  );
2431
2431
  }) }),
2432
2432
  /* @__PURE__ */ s(
2433
- yr,
2433
+ Nr,
2434
2434
  {
2435
- open: g,
2436
- items: f,
2437
- initialIndex: c,
2435
+ open: f,
2436
+ items: g,
2437
+ initialIndex: b,
2438
2438
  onClose: w
2439
2439
  }
2440
2440
  )
2441
2441
  ]
2442
2442
  }
2443
2443
  );
2444
- }, Er = (e) => /* @__PURE__ */ s(wt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(wt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(wt, { ...e, state: "received" }), Ar = {
2444
+ }, Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Tr = {
2445
2445
  Composer: Er,
2446
- Sent: Ir,
2447
- Received: Tr
2446
+ Sent: Sr,
2447
+ Received: Ir
2448
2448
  }, As = ({
2449
2449
  open: e,
2450
2450
  items: t,
2451
2451
  initialIndex: n = 0,
2452
2452
  onClose: a
2453
2453
  }) => {
2454
- const { index: r, prev: i, next: l } = vt({
2454
+ const { index: r, prev: i, next: l } = bt({
2455
2455
  length: t.length,
2456
2456
  initialIndex: n,
2457
2457
  open: e
2458
- }), o = t[r], d = se(
2458
+ }), o = t[r], d = ae(
2459
2459
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "video"),
2460
2460
  [o]
2461
2461
  );
2462
2462
  return o ? /* @__PURE__ */ m(
2463
- xt,
2463
+ vt,
2464
2464
  {
2465
2465
  open: e,
2466
2466
  onClose: a,
@@ -2484,7 +2484,7 @@ const cr = ({
2484
2484
  `${r}:${o.src}`
2485
2485
  ),
2486
2486
  t.length > 1 ? /* @__PURE__ */ s(
2487
- bt,
2487
+ pt,
2488
2488
  {
2489
2489
  onPrev: i,
2490
2490
  onNext: l,
@@ -2495,7 +2495,7 @@ const cr = ({
2495
2495
  ]
2496
2496
  }
2497
2497
  ) : null;
2498
- }, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(tt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2498
+ }, Ar = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(et, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2499
2499
  item: e,
2500
2500
  index: t
2501
2501
  }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2517,11 +2517,11 @@ const cr = ({
2517
2517
  "aria-hidden": !0
2518
2518
  }
2519
2519
  ) }),
2520
- /* @__PURE__ */ s(Mr, {})
2521
- ] }), Rr = (e, t, n) => ({
2520
+ /* @__PURE__ */ s(Ar, {})
2521
+ ] }), Mr = (e, t, n) => ({
2522
2522
  ariaLabel: `Play video ${t + 1} of ${n}`,
2523
2523
  content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2524
- }), Dr = ({
2524
+ }), Rr = ({
2525
2525
  src: e,
2526
2526
  poster: t,
2527
2527
  mimeType: n,
@@ -2562,7 +2562,7 @@ const cr = ({
2562
2562
  }
2563
2563
  )
2564
2564
  ] });
2565
- }, Ds = ({
2565
+ }, Ls = ({
2566
2566
  state: e,
2567
2567
  src: t,
2568
2568
  poster: n,
@@ -2574,13 +2574,13 @@ const cr = ({
2574
2574
  preload: d,
2575
2575
  onClick: u
2576
2576
  }) => {
2577
- const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2577
+ const p = Rr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: f, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
2578
2578
  u
2579
2579
  );
2580
2580
  if (p.length === 0)
2581
2581
  return null;
2582
- const b = p.map(
2583
- (f, x) => Rr(f, x, p.length)
2582
+ const v = p.map(
2583
+ (g, x) => Mr(g, x, p.length)
2584
2584
  );
2585
2585
  return /* @__PURE__ */ m(
2586
2586
  Te,
@@ -2591,44 +2591,57 @@ const cr = ({
2591
2591
  "data-testid": "video-attachment",
2592
2592
  children: [
2593
2593
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2594
- Es,
2594
+ Ss,
2595
2595
  {
2596
- tiles: b,
2597
- onTileActivate: v,
2596
+ tiles: v,
2597
+ onTileActivate: c,
2598
2598
  className: "overflow-hidden rounded-md"
2599
2599
  }
2600
2600
  ) }),
2601
2601
  /* @__PURE__ */ s(
2602
2602
  As,
2603
2603
  {
2604
- open: g,
2604
+ open: f,
2605
2605
  items: Rs(p, r),
2606
- initialIndex: c,
2606
+ initialIndex: b,
2607
2607
  onClose: w
2608
2608
  }
2609
2609
  )
2610
2610
  ]
2611
2611
  }
2612
2612
  );
2613
- }, zr = (e) => /* @__PURE__ */ s(Lr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "received" }), Or = {
2614
- Composer: zr,
2615
- Sent: Pr,
2616
- Received: Fr
2617
- }, ye = {
2618
- Image: Nr,
2619
- Video: Or,
2620
- Audio: tr,
2621
- Pdf: Ar,
2622
- File: fr
2623
- }, $r = {
2613
+ }, Dr = (e) => /* @__PURE__ */ s(Lr, { ...e }), zr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Fr = {
2614
+ Composer: Dr,
2615
+ Sent: zr,
2616
+ Received: Pr
2617
+ }, Ne = {
2618
+ Image: _r,
2619
+ Video: Fr,
2620
+ Audio: er,
2621
+ Pdf: Tr,
2622
+ File: hr
2623
+ }, Or = {
2624
2624
  isUnlocking: () => !1
2625
- }, jr = {
2626
- LockedAttachment: $r
2627
- }, Ls = rt({}), ml = Ls.Provider;
2628
- function Br(e) {
2629
- return Ie(Ls)[e] ?? jr[e];
2625
+ }, $r = {
2626
+ LockedAttachment: Or
2627
+ }, Ds = at({}), ul = Ds.Provider;
2628
+ function jr(e) {
2629
+ return Se(Ds)[e] ?? $r[e];
2630
2630
  }
2631
- const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2631
+ const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
2632
+ message: e,
2633
+ groupStyles: t
2634
+ }) => !Br(t) || e.type === "error" || e.status !== "received" ? null : /* @__PURE__ */ m(
2635
+ "div",
2636
+ {
2637
+ className: "str-chat__message-delivery-status",
2638
+ "data-testid": "message-delivery-status",
2639
+ children: [
2640
+ /* @__PURE__ */ s(Yn, { size: 14, weight: "bold", "aria-hidden": "true" }),
2641
+ /* @__PURE__ */ s("span", { children: "Delivered" })
2642
+ ]
2643
+ }
2644
+ ), Vr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2632
2645
  "svg",
2633
2646
  {
2634
2647
  width: e,
@@ -2645,19 +2658,19 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2645
2658
  }
2646
2659
  )
2647
2660
  }
2648
- ), Vr = (e) => {
2661
+ ), Gr = (e) => {
2649
2662
  var t;
2650
2663
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2651
- }, Gr = (e) => {
2664
+ }, Hr = (e) => {
2652
2665
  var t;
2653
2666
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2654
2667
  }, Fe = (e) => {
2655
2668
  var t;
2656
2669
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
2657
- }, Hr = (e) => {
2670
+ }, Yr = (e) => {
2658
2671
  var t;
2659
2672
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2660
- }, zs = (e) => Vr(e) || Gr(e), Yr = (e) => {
2673
+ }, zs = (e) => Gr(e) || Hr(e), qr = (e) => {
2661
2674
  var t;
2662
2675
  return zs(e) && !((t = e.text) != null && t.trim());
2663
2676
  }, Ke = ({
@@ -2671,27 +2684,27 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2671
2684
  if (!r && !i)
2672
2685
  return null;
2673
2686
  if (r) {
2674
- const g = (h = e.metadata) == null ? void 0 : h.amount_text;
2675
- if (!g) return null;
2676
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
2677
- return /* @__PURE__ */ m("div", { className: c, children: [
2687
+ const f = (h = e.metadata) == null ? void 0 : h.amount_text;
2688
+ if (!f) return null;
2689
+ const b = t ? "message-tip-standalone" : "message-tag message-tag--tip", c = t ? `${f} tip` : `Delivered with ${f} tip`;
2690
+ return /* @__PURE__ */ m("div", { className: b, children: [
2678
2691
  /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2679
- /* @__PURE__ */ s("span", { children: v })
2692
+ /* @__PURE__ */ s("span", { children: c })
2680
2693
  ] });
2681
2694
  }
2682
2695
  const l = n && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
2683
2696
  "message-chatbot-indicator",
2684
2697
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2685
2698
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2686
- ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Ur, { size: l ? 12 : 15 }) });
2687
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(ee, { children: [
2699
+ ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Vr, { size: l ? 12 : 15 }) });
2700
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(te, { children: [
2688
2701
  u,
2689
2702
  p
2690
- ] }) : /* @__PURE__ */ m(ee, { children: [
2703
+ ] }) : /* @__PURE__ */ m(te, { children: [
2691
2704
  p,
2692
2705
  u
2693
2706
  ] }) });
2694
- }, qr = ({
2707
+ }, Wr = ({
2695
2708
  selected: e,
2696
2709
  onVoteUp: t,
2697
2710
  onVoteDown: n
@@ -2724,47 +2737,26 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2724
2737
  children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2725
2738
  }
2726
2739
  )
2727
- ] }), Je = () => {
2728
- var i;
2729
- const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), { client: n } = oe("SentMessageDeliveryStatus"), a = (i = n.user) == null ? void 0 : i.id, r = se(() => {
2730
- var l;
2731
- if (!(!a || !t)) {
2732
- for (let o = t.length - 1; o >= 0; o -= 1)
2733
- if (((l = t[o].user) == null ? void 0 : l.id) === a) return t[o].id;
2734
- }
2735
- }, [t, a]);
2736
- return e.id !== r ? null : /* @__PURE__ */ m(ee, { children: [
2737
- /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2738
- /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2739
- ] });
2740
- }, Wr = () => null, Xr = () => /* @__PURE__ */ s(
2741
- Xs,
2742
- {
2743
- MessageSentStatus: Je,
2744
- MessageDeliveredStatus: Je,
2745
- MessageReadStatus: Je,
2746
- MessageSendingStatus: Wr
2747
- }
2748
- ), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2749
- function _t(e) {
2740
+ ] }), Xr = /^([a-z][a-z0-9+.-]*):/i, Kr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2741
+ function wt(e) {
2750
2742
  if (typeof e != "string") return;
2751
2743
  const t = e.trim();
2752
2744
  if (t === "") return;
2753
- const n = Kr.exec(t);
2745
+ const n = Xr.exec(t);
2754
2746
  if (n) {
2755
2747
  const a = n[1].toLowerCase();
2756
- return Jr.has(a) ? t : void 0;
2748
+ return Kr.has(a) ? t : void 0;
2757
2749
  }
2758
2750
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2759
2751
  }
2760
- const Zr = {
2752
+ const Jr = {
2761
2753
  dark: "bg-white text-[#121110] hover:bg-white/90",
2762
2754
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2763
- }, Qr = ({ variant: e, cta: t }) => {
2755
+ }, Zr = ({ variant: e, cta: t }) => {
2764
2756
  const n = k(
2765
2757
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2766
- Zr[e]
2767
- ), a = _t(t.href);
2758
+ Jr[e]
2759
+ ), a = wt(t.href);
2768
2760
  return a ? /* @__PURE__ */ s(
2769
2761
  "a",
2770
2762
  {
@@ -2790,13 +2782,13 @@ const Zr = {
2790
2782
  children: t.label
2791
2783
  }
2792
2784
  );
2793
- }, ei = {
2785
+ }, Qr = {
2794
2786
  dark: "text-white",
2795
2787
  light: "text-black/90"
2796
- }, ti = "text-white/30", si = {
2788
+ }, ei = "text-white/30", ti = {
2797
2789
  dark: "text-white/55",
2798
2790
  light: "text-black/55"
2799
- }, Nt = ({
2791
+ }, _t = ({
2800
2792
  variant: e,
2801
2793
  title: t,
2802
2794
  placeholderTitle: n,
@@ -2806,14 +2798,14 @@ const Zr = {
2806
2798
  cta: l,
2807
2799
  trailingAction: o
2808
2800
  }) => {
2809
- const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", v = l != null;
2810
- if (!p && !h && !c && !v) return null;
2811
- const b = k(
2801
+ const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", b = f !== "", c = l != null;
2802
+ if (!p && !h && !b && !c) return null;
2803
+ const v = k(
2812
2804
  "truncate text-base font-medium leading-6",
2813
- d && !t ? ti : ei[e]
2814
- ), f = k(
2805
+ d && !t ? ei : Qr[e]
2806
+ ), g = k(
2815
2807
  "truncate text-xs leading-4",
2816
- si[e]
2808
+ ti[e]
2817
2809
  );
2818
2810
  return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
2819
2811
  /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
@@ -2821,17 +2813,17 @@ const Zr = {
2821
2813
  /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
2822
2814
  p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
2823
2815
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2824
- /* @__PURE__ */ s("p", { className: k("min-w-0", b), children: u })
2816
+ /* @__PURE__ */ s("p", { className: k("min-w-0", v), children: u })
2825
2817
  ] }),
2826
- h && /* @__PURE__ */ s("p", { className: f, children: a })
2818
+ h && /* @__PURE__ */ s("p", { className: g, children: a })
2827
2819
  ] }),
2828
- !v && c && /* @__PURE__ */ s("p", { className: f, children: g })
2820
+ !c && b && /* @__PURE__ */ s("p", { className: g, children: f })
2829
2821
  ] }),
2830
2822
  o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
2831
2823
  ] }),
2832
- l && /* @__PURE__ */ s(Qr, { variant: e, cta: l })
2824
+ l && /* @__PURE__ */ s(Zr, { variant: e, cta: l })
2833
2825
  ] });
2834
- }, ni = k(
2826
+ }, si = k(
2835
2827
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2836
2828
  // 1px hairline border that sits flush with the card chrome — matches
2837
2829
  // the messaging design system's "small border around link attachments"
@@ -2850,7 +2842,7 @@ const Zr = {
2850
2842
  "data-testid": d
2851
2843
  }) => {
2852
2844
  const u = n != null || a != null, p = k(
2853
- ni,
2845
+ si,
2854
2846
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2855
2847
  // `focus-ring` is a design-system utility from the component-library
2856
2848
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2898,17 +2890,17 @@ const Zr = {
2898
2890
  ]
2899
2891
  }
2900
2892
  );
2901
- }, ai = {
2893
+ }, ni = {
2902
2894
  dark: "bg-white/10",
2903
2895
  light: "bg-black/5"
2904
- }, ri = {
2896
+ }, ai = {
2905
2897
  dark: "size-16 text-white/25",
2906
2898
  light: "size-16 text-black/25"
2907
- }, Ve = (e, t) => !!t && !!e && ce(e) === "audio", yt = (e, t) => {
2899
+ }, Ve = (e, t) => !!t && !!e && oe(e) === "audio", Nt = (e, t) => {
2908
2900
  if (!t || !e) return !1;
2909
- const n = ce(e);
2901
+ const n = oe(e);
2910
2902
  return n === "video" || n === "audio";
2911
- }, kt = "bg-[#F2F3F4]", $e = ({
2903
+ }, yt = "bg-[#F2F3F4]", $e = ({
2912
2904
  variant: e,
2913
2905
  thumbnailUrl: t,
2914
2906
  sourceUrl: n,
@@ -2917,7 +2909,7 @@ const Zr = {
2917
2909
  topLeft: i,
2918
2910
  topRight: l
2919
2911
  }) => {
2920
- const o = ce(r), d = !!n && o === "video";
2912
+ const o = oe(r), d = !!n && o === "video";
2921
2913
  return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2922
2914
  "audio",
2923
2915
  {
@@ -2959,10 +2951,10 @@ const Zr = {
2959
2951
  {
2960
2952
  className: k(
2961
2953
  "flex h-full w-full items-center justify-center",
2962
- ai[e]
2954
+ ni[e]
2963
2955
  ),
2964
2956
  children: we(r, {
2965
- className: ri[e],
2957
+ className: ai[e],
2966
2958
  weight: "regular"
2967
2959
  })
2968
2960
  }
@@ -2972,7 +2964,7 @@ const Zr = {
2972
2964
  ]
2973
2965
  }
2974
2966
  );
2975
- }, ii = ({
2967
+ }, ri = ({
2976
2968
  title: e,
2977
2969
  placeholderTitle: t,
2978
2970
  description: n,
@@ -2986,7 +2978,7 @@ const Zr = {
2986
2978
  onDismiss: p,
2987
2979
  onEditClick: h
2988
2980
  }) => {
2989
- const g = o === "classic", c = Ve(r, l), v = p ? /* @__PURE__ */ s(
2981
+ const f = o === "classic", b = Ve(r, l), c = p ? /* @__PURE__ */ s(
2990
2982
  "button",
2991
2983
  {
2992
2984
  type: "button",
@@ -3002,10 +2994,10 @@ const Zr = {
3002
2994
  onClick: h,
3003
2995
  "aria-label": "Edit attachment",
3004
2996
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3005
- children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
2997
+ children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
3006
2998
  }
3007
2999
  ) : void 0;
3008
- return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3000
+ return b ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3009
3001
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3010
3002
  $e,
3011
3003
  {
@@ -3015,14 +3007,14 @@ const Zr = {
3015
3007
  mimeType: r
3016
3008
  }
3017
3009
  ) }),
3018
- v && /* @__PURE__ */ s("div", { className: "shrink-0", children: v })
3010
+ c && /* @__PURE__ */ s("div", { className: "shrink-0", children: c })
3019
3011
  ] }) }) : /* @__PURE__ */ m(
3020
3012
  Oe,
3021
3013
  {
3022
3014
  variant: "dark",
3023
- topRight: g ? v : void 0,
3015
+ topRight: f ? c : void 0,
3024
3016
  children: [
3025
- !g && /* @__PURE__ */ s(
3017
+ !f && /* @__PURE__ */ s(
3026
3018
  $e,
3027
3019
  {
3028
3020
  variant: "dark",
@@ -3030,11 +3022,11 @@ const Zr = {
3030
3022
  sourceUrl: l,
3031
3023
  title: e,
3032
3024
  mimeType: r,
3033
- topRight: v
3025
+ topRight: c
3034
3026
  }
3035
3027
  ),
3036
3028
  /* @__PURE__ */ s(
3037
- Nt,
3029
+ _t,
3038
3030
  {
3039
3031
  variant: "dark",
3040
3032
  title: e,
@@ -3049,7 +3041,7 @@ const Zr = {
3049
3041
  ]
3050
3042
  }
3051
3043
  );
3052
- }, li = ({
3044
+ }, ii = ({
3053
3045
  title: e,
3054
3046
  description: t,
3055
3047
  url: n,
@@ -3061,21 +3053,21 @@ const Zr = {
3061
3053
  cta: d,
3062
3054
  onClick: u
3063
3055
  }) => {
3064
- const p = yt(a, i), h = _t(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? kt : void 0, w = d && u ? {
3056
+ const p = Nt(a, i), h = wt(n), f = d == null && h != null && !p ? h : void 0, b = d == null && !p ? u : void 0, c = Ve(a, i) ? yt : void 0, w = d && u ? {
3065
3057
  ...d,
3066
3058
  onClick: () => {
3067
- var b;
3068
- u(), (b = d.onClick) == null || b.call(d);
3059
+ var v;
3060
+ u(), (v = d.onClick) == null || v.call(d);
3069
3061
  }
3070
3062
  } : d;
3071
3063
  return /* @__PURE__ */ m(
3072
3064
  Oe,
3073
3065
  {
3074
3066
  variant: "light",
3075
- href: g,
3076
- onClick: c,
3067
+ href: f,
3068
+ onClick: b,
3077
3069
  ariaLabel: e ?? "Open attachment preview",
3078
- bgClassName: v,
3070
+ bgClassName: c,
3079
3071
  "data-testid": "link-attachment",
3080
3072
  children: [
3081
3073
  l === "featured" && /* @__PURE__ */ s(
@@ -3089,7 +3081,7 @@ const Zr = {
3089
3081
  }
3090
3082
  ),
3091
3083
  /* @__PURE__ */ s(
3092
- Nt,
3084
+ _t,
3093
3085
  {
3094
3086
  variant: "light",
3095
3087
  title: e,
@@ -3102,7 +3094,7 @@ const Zr = {
3102
3094
  ]
3103
3095
  }
3104
3096
  );
3105
- }, oi = ({
3097
+ }, li = ({
3106
3098
  title: e,
3107
3099
  placeholderTitle: t,
3108
3100
  description: n,
@@ -3115,14 +3107,14 @@ const Zr = {
3115
3107
  cta: u,
3116
3108
  onClick: p
3117
3109
  }) => {
3118
- const h = yt(r, l), g = _t(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
3110
+ const h = Nt(r, l), f = wt(a), b = u == null && f != null && !h ? f : void 0, c = u == null && !h && b != null ? p : void 0;
3119
3111
  return /* @__PURE__ */ m(
3120
3112
  Oe,
3121
3113
  {
3122
3114
  variant: "dark",
3123
- href: c,
3124
- onClick: v,
3125
- bgClassName: Ve(r, l) ? kt : void 0,
3115
+ href: b,
3116
+ onClick: c,
3117
+ bgClassName: Ve(r, l) ? yt : void 0,
3126
3118
  children: [
3127
3119
  o === "featured" && /* @__PURE__ */ s(
3128
3120
  $e,
@@ -3135,7 +3127,7 @@ const Zr = {
3135
3127
  }
3136
3128
  ),
3137
3129
  /* @__PURE__ */ s(
3138
- Nt,
3130
+ _t,
3139
3131
  {
3140
3132
  variant: "dark",
3141
3133
  title: e,
@@ -3150,10 +3142,10 @@ const Zr = {
3150
3142
  }
3151
3143
  );
3152
3144
  }, es = {
3153
- Composer: ii,
3154
- Sent: oi,
3155
- Received: li
3156
- }, ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", di = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3145
+ Composer: ri,
3146
+ Sent: li,
3147
+ Received: ii
3148
+ }, oi = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3157
3149
  function P(e) {
3158
3150
  const t = e == null ? void 0 : e.trim();
3159
3151
  return t || void 0;
@@ -3161,7 +3153,7 @@ function P(e) {
3161
3153
  function ts(e) {
3162
3154
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3163
3155
  }
3164
- function ui(e, t) {
3156
+ function di(e, t) {
3165
3157
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3166
3158
  return !1;
3167
3159
  const n = ts(e), a = ts(t);
@@ -3182,11 +3174,11 @@ function ss(e) {
3182
3174
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3183
3175
  // native video/audio player in the hero instead of a static thumbnail.
3184
3176
  sourceUrl: a,
3185
- layout: n || yt(r, a) ? "featured" : "classic",
3177
+ layout: n || Nt(r, a) ? "featured" : "classic",
3186
3178
  mimeType: r
3187
3179
  };
3188
3180
  }
3189
- function mi(e) {
3181
+ function ui(e) {
3190
3182
  var t;
3191
3183
  return Ps(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3192
3184
  }
@@ -3216,41 +3208,41 @@ function Fs(e) {
3216
3208
  a(r);
3217
3209
  continue;
3218
3210
  }
3219
- const i = mi(r);
3211
+ const i = ui(r);
3220
3212
  i && n(i, r);
3221
3213
  }
3222
3214
  return t;
3223
3215
  }
3224
- function hi(e) {
3216
+ function mi(e) {
3225
3217
  let t = 0;
3226
3218
  for (const n of e)
3227
3219
  t += n.type === "link" ? n.attachments.length : 1;
3228
3220
  return t;
3229
3221
  }
3230
- function fi(e) {
3222
+ function hi(e) {
3231
3223
  return e.filter((t) => t.type === "media").length;
3232
3224
  }
3233
- function gi(e, t, n) {
3225
+ function fi(e, t, n) {
3234
3226
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3235
3227
  }
3236
3228
  function ns(e) {
3237
3229
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3238
3230
  }
3239
- function pi(e) {
3231
+ function gi(e) {
3240
3232
  switch (e) {
3241
3233
  case "image":
3242
- return ye.Image;
3234
+ return Ne.Image;
3243
3235
  case "video":
3244
- return ye.Video;
3236
+ return Ne.Video;
3245
3237
  case "audio":
3246
- return ye.Audio;
3238
+ return Ne.Audio;
3247
3239
  case "pdf":
3248
- return ye.Pdf;
3240
+ return Ne.Pdf;
3249
3241
  default:
3250
- return ye.File;
3242
+ return Ne.File;
3251
3243
  }
3252
3244
  }
3253
- function bi(e, t) {
3245
+ function pi(e, t) {
3254
3246
  if (t.length > 1)
3255
3247
  switch (e) {
3256
3248
  case "image":
@@ -3337,20 +3329,20 @@ function bi(e, t) {
3337
3329
  };
3338
3330
  }
3339
3331
  }
3340
- function vi({
3332
+ function bi({
3341
3333
  groupPosition: e,
3342
3334
  isMyMessage: t,
3343
3335
  segment: n,
3344
3336
  text: a
3345
3337
  }) {
3346
- const r = pi(n.kind), i = {
3347
- ...bi(n.kind, n.attachments),
3338
+ const r = gi(n.kind), i = {
3339
+ ...pi(n.kind, n.attachments),
3348
3340
  groupPosition: e,
3349
3341
  ...a ? { text: a } : {}
3350
3342
  };
3351
3343
  return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
3352
3344
  }
3353
- const xi = ({
3345
+ const vi = ({
3354
3346
  groupPosition: e,
3355
3347
  isMyMessage: t,
3356
3348
  message: n
@@ -3358,48 +3350,48 @@ const xi = ({
3358
3350
  var w;
3359
3351
  const a = Fs(n.attachments);
3360
3352
  if (a.length === 0) return null;
3361
- const r = hi(a), i = fi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
3353
+ const r = mi(a), i = hi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((v) => v.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && di(l, d) ? void 0 : l;
3362
3354
  let p = 0, h = 0;
3363
- const g = [], c = (b, f) => {
3355
+ const f = [], b = (v, g) => {
3364
3356
  const x = p === r - 1;
3365
3357
  p += 1;
3366
- const N = t ? es.Sent : es.Received;
3367
- g.push(
3358
+ const _ = t ? es.Sent : es.Received;
3359
+ f.push(
3368
3360
  /* @__PURE__ */ m(U.Fragment, { children: [
3369
- /* @__PURE__ */ s(N, { ...ss(b) }),
3370
- x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
3371
- ] }, f)
3361
+ /* @__PURE__ */ s(_, { ...ss(v) }),
3362
+ x && u ? /* @__PURE__ */ s("div", { className: t ? oi : ci, children: u }) : null
3363
+ ] }, g)
3372
3364
  );
3373
- }, v = (b, f) => {
3374
- const x = p === r - 1, N = gi(
3365
+ }, c = (v, g) => {
3366
+ const x = p === r - 1, _ = fi(
3375
3367
  h,
3376
3368
  i,
3377
3369
  e
3378
3370
  );
3379
- p += 1, h += 1, g.push(
3371
+ p += 1, h += 1, f.push(
3380
3372
  /* @__PURE__ */ s(
3381
- vi,
3373
+ bi,
3382
3374
  {
3383
- groupPosition: N,
3375
+ groupPosition: _,
3384
3376
  isMyMessage: t,
3385
- segment: b,
3377
+ segment: v,
3386
3378
  text: x ? u : void 0
3387
3379
  },
3388
- f
3380
+ g
3389
3381
  )
3390
3382
  );
3391
3383
  };
3392
- return a.forEach((b, f) => {
3393
- if (b.type === "link") {
3394
- b.attachments.forEach((x, N) => {
3395
- c(x, `link-${f}-${N}`);
3384
+ return a.forEach((v, g) => {
3385
+ if (v.type === "link") {
3386
+ v.attachments.forEach((x, _) => {
3387
+ b(x, `link-${g}-${_}`);
3396
3388
  });
3397
3389
  return;
3398
3390
  }
3399
- v(b, `media-${f}`);
3400
- }), /* @__PURE__ */ s(ee, { children: g });
3401
- }, wi = (e) => {
3402
- var At, Mt, Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3391
+ c(v, `media-${g}`);
3392
+ }), /* @__PURE__ */ s(te, { children: f });
3393
+ }, xi = (e) => {
3394
+ var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3403
3395
  const {
3404
3396
  additionalMessageInputProps: t,
3405
3397
  chatbotVotingEnabled: n,
@@ -3407,92 +3399,93 @@ const xi = ({
3407
3399
  endOfGroup: r,
3408
3400
  firstOfGroup: i,
3409
3401
  groupedByUser: l,
3410
- handleAction: o,
3411
- handleOpenThread: d,
3412
- handleRetry: u,
3413
- highlighted: p,
3414
- isMessageAIGenerated: h,
3415
- isMyMessage: g,
3402
+ groupStyles: o,
3403
+ handleAction: d,
3404
+ handleOpenThread: u,
3405
+ handleRetry: p,
3406
+ highlighted: h,
3407
+ isMessageAIGenerated: f,
3408
+ isMyMessage: b,
3416
3409
  message: c,
3417
- renderText: v,
3418
- threadList: w,
3419
- viewerLanguage: b
3420
- } = e, { client: f } = oe("CustomMessage"), { channel: x } = le("CustomMessage"), { isUnlocking: N, onUnlockClick: S, onFetchSource: T, onDownloadClick: M } = Br("LockedAttachment"), [L, D] = B(!1), O = Js(c.id), { selected: z, voteUp: y, voteDown: A } = xa(c), {
3421
- Attachment: E = Zs,
3422
- EditMessageModal: C = Qs,
3423
- MessageActions: I,
3424
- MessageBlocked: $ = en,
3425
- MessageBouncePrompt: F = tn,
3426
- MessageDeleted: V = sn,
3427
- MessageIsThreadReplyInChannelButtonIndicator: Q = nn,
3428
- MessageRepliesCountButton: te = an,
3429
- ReminderNotification: X = rn,
3430
- StreamedMessageText: _ = ln,
3431
- PinIndicator: R
3432
- } = is("CustomMessage"), H = on(c), q = cn(c), Y = se(
3433
- () => h == null ? void 0 : h(c),
3434
- [h, c]
3435
- ), j = se(() => {
3436
- const me = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...me] : me;
3410
+ renderText: w,
3411
+ threadList: v,
3412
+ viewerLanguage: g
3413
+ } = e, { client: x } = me("CustomMessage"), { channel: _ } = ue("CustomMessage"), { isUnlocking: A, onUnlockClick: S, onFetchSource: I, onDownloadClick: L } = jr("LockedAttachment"), [D, $] = B(!1), z = Ks(c.id), { selected: y, voteUp: M, voteDown: E } = va(c), {
3414
+ Attachment: C = Js,
3415
+ EditMessageModal: T = Zs,
3416
+ MessageActions: F,
3417
+ MessageBlocked: O = Qs,
3418
+ MessageBouncePrompt: V = en,
3419
+ MessageDeleted: Z = tn,
3420
+ MessageIsThreadReplyInChannelButtonIndicator: ee = sn,
3421
+ MessageRepliesCountButton: X = nn,
3422
+ ReminderNotification: N = an,
3423
+ StreamedMessageText: R = rn,
3424
+ PinIndicator: G
3425
+ } = is("CustomMessage"), Y = ln(c), q = on(c), W = ae(
3426
+ () => f == null ? void 0 : f(c),
3427
+ [f, c]
3428
+ ), j = ae(() => {
3429
+ const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
3437
3430
  if (!Fe(c)) return pe;
3438
3431
  const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3439
3432
  return Gt.length === pe.length ? pe : Gt;
3440
- }, [c]), W = se(
3433
+ }, [c]), Q = ae(
3441
3434
  () => Fs(j),
3442
3435
  [j]
3443
- ), Z = se(() => {
3444
- const me = hs({ message: c, viewerLanguage: b });
3445
- return me === c.text ? c : { ...c, text: me };
3446
- }, [c, b]), de = W.length > 0, De = W.reduce(
3447
- (me, pe) => me + pe.attachments.length,
3436
+ ), se = ae(() => {
3437
+ const de = hs({ message: c, viewerLanguage: g });
3438
+ return de === c.text ? c : { ...c, text: de };
3439
+ }, [c, g]), Le = Q.length > 0, De = Q.reduce(
3440
+ (de, pe) => de + pe.attachments.length,
3448
3441
  0
3449
- ) === ((j == null ? void 0 : j.length) ?? 0), Le = Xa(
3442
+ ) === ((j == null ? void 0 : j.length) ?? 0), ie = Wa(
3450
3443
  {
3451
3444
  endOfGroup: r,
3452
3445
  firstOfGroup: i,
3453
3446
  groupedByUser: l
3454
3447
  }
3455
3448
  );
3456
- if (dn(c))
3449
+ if (cn(c))
3457
3450
  return null;
3458
3451
  if (c.deleted_at || c.type === "deleted")
3459
- return /* @__PURE__ */ s(V, { message: c });
3460
- if (un(c))
3461
- return /* @__PURE__ */ s($, {});
3462
- const ae = !w && !!c.reply_count, ue = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3452
+ return /* @__PURE__ */ s(Z, { message: c });
3453
+ if (dn(c))
3454
+ return /* @__PURE__ */ s(O, {});
3455
+ const ce = !v && !!c.reply_count, le = !v && c.show_in_channel && c.parent_id, Ct = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, Et = un(c);
3463
3456
  let he;
3464
- ie ? he = () => u(c) : St && (he = () => D(!0));
3465
- const fe = g(), Us = k(
3457
+ Ct ? he = () => p(c) : Et && (he = () => $(!0));
3458
+ const fe = b(), Us = k(
3466
3459
  "str-chat__message str-chat__message-simple",
3467
3460
  `str-chat__message--${c.type}`,
3468
3461
  `str-chat__message--${c.status}`,
3469
3462
  fe ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3470
3463
  c.text ? "str-chat__message--has-text" : "has-no-text",
3471
3464
  {
3472
- "str-chat__message--has-attachment": H,
3473
- "str-chat__message--highlighted": p,
3465
+ "str-chat__message--has-attachment": Y,
3466
+ "str-chat__message--highlighted": h,
3474
3467
  "str-chat__message--pinned pinned-message": c.pinned,
3475
3468
  "str-chat__message--with-reactions": q,
3476
3469
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
3477
- "str-chat__message-with-thread-link": ae || ue,
3470
+ "str-chat__message-with-thread-link": ce || le,
3478
3471
  "str-chat__virtual-message__wrapper--end": r,
3479
3472
  "str-chat__virtual-message__wrapper--first": i,
3480
3473
  "str-chat__virtual-message__wrapper--group": l
3481
3474
  }
3482
- ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = de && De && !c.quoted_message && !Ge && !Y && !ge;
3483
- return /* @__PURE__ */ m(ee, { children: [
3475
+ ), Ge = c.poll_id && x.polls.fromState(c.poll_id), St = qr(c), ge = Fe(c), It = Yr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = Le && De && !c.quoted_message && !Ge && !W && !ge;
3476
+ return /* @__PURE__ */ m(te, { children: [
3484
3477
  a && /* @__PURE__ */ s(
3485
- C,
3478
+ T,
3486
3479
  {
3487
3480
  additionalMessageInputProps: t
3488
3481
  }
3489
3482
  ),
3490
- L && /* @__PURE__ */ s(
3491
- hn,
3483
+ D && /* @__PURE__ */ s(
3484
+ mn,
3492
3485
  {
3493
- MessageBouncePrompt: F,
3494
- onClose: () => D(!1),
3495
- open: L
3486
+ MessageBouncePrompt: V,
3487
+ onClose: () => $(!1),
3488
+ open: D
3496
3489
  }
3497
3490
  ),
3498
3491
  /* @__PURE__ */ m(
@@ -3502,8 +3495,8 @@ const xi = ({
3502
3495
  "data-message-id": c.id,
3503
3496
  "data-dd-privacy": "mask",
3504
3497
  children: [
3505
- R && /* @__PURE__ */ s(R, {}),
3506
- !!O && /* @__PURE__ */ s(X, { reminder: O }),
3498
+ G && /* @__PURE__ */ s(G, {}),
3499
+ !!z && /* @__PURE__ */ s(N, { reminder: z }),
3507
3500
  c.user && /* @__PURE__ */ s(
3508
3501
  ne,
3509
3502
  {
@@ -3520,7 +3513,7 @@ const xi = ({
3520
3513
  "div",
3521
3514
  {
3522
3515
  className: k("str-chat__message-inner", {
3523
- "str-chat__simple-message--error-failed": ie || St
3516
+ "str-chat__simple-message--error-failed": Ct || Et
3524
3517
  }),
3525
3518
  "data-testid": "message-inner",
3526
3519
  onClick: he,
@@ -3535,18 +3528,18 @@ const xi = ({
3535
3528
  },
3536
3529
  children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3537
3530
  fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3538
- I && /* @__PURE__ */ s(I, {}),
3531
+ F && /* @__PURE__ */ s(F, {}),
3539
3532
  /* @__PURE__ */ s(
3540
3533
  Zt.Sent,
3541
3534
  {
3542
3535
  title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
3543
- mimeType: (Dt = c.metadata) == null ? void 0 : Dt.attachment_mime_type,
3544
- thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
3536
+ mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
3537
+ thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
3545
3538
  amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3546
3539
  detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3547
3540
  paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
3548
- onPreviewClick: () => S == null ? void 0 : S(c, x),
3549
- onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3541
+ onPreviewClick: () => S == null ? void 0 : S(c, _),
3542
+ onFetchSource: async () => await (I == null ? void 0 : I(c, _))
3550
3543
  }
3551
3544
  )
3552
3545
  ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
@@ -3559,22 +3552,22 @@ const xi = ({
3559
3552
  amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
3560
3553
  detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
3561
3554
  paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3562
- isUnlocking: N(c.id),
3563
- onUnlockClick: () => S == null ? void 0 : S(c, x),
3564
- onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
3565
- onDownloadClick: () => M == null ? void 0 : M(c, x)
3555
+ isUnlocking: A(c.id),
3556
+ onUnlockClick: () => S == null ? void 0 : S(c, _),
3557
+ onFetchSource: async () => await (I == null ? void 0 : I(c, _)),
3558
+ onDownloadClick: () => L == null ? void 0 : L(c, _)
3566
3559
  }
3567
3560
  ),
3568
- I && /* @__PURE__ */ s(I, {})
3561
+ F && /* @__PURE__ */ s(F, {})
3569
3562
  ] }),
3570
3563
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3571
3564
  qt,
3572
3565
  {
3573
- message: Z,
3574
- renderText: v
3566
+ message: se,
3567
+ renderText: w
3575
3568
  }
3576
3569
  ) })
3577
- ] }) : Et ? (
3570
+ ] }) : St ? (
3578
3571
  /* Tip-only messages render as a standalone bubble */
3579
3572
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3580
3573
  ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
@@ -3589,13 +3582,13 @@ const xi = ({
3589
3582
  },
3590
3583
  children: [
3591
3584
  /* @__PURE__ */ s(
3592
- xi,
3585
+ vi,
3593
3586
  {
3594
- groupPosition: Le,
3587
+ groupPosition: ie,
3595
3588
  isMyMessage: fe,
3596
3589
  message: {
3597
3590
  attachments: j,
3598
- text: Z.text
3591
+ text: se.text
3599
3592
  }
3600
3593
  }
3601
3594
  ),
@@ -3611,32 +3604,32 @@ const xi = ({
3611
3604
  isMyMessage: fe
3612
3605
  }
3613
3606
  ),
3614
- Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
3607
+ Ge && /* @__PURE__ */ s(hn, { poll: Ge }),
3615
3608
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
3616
- E,
3609
+ C,
3617
3610
  {
3618
- actionHandler: o,
3611
+ actionHandler: d,
3619
3612
  attachments: j
3620
3613
  }
3621
3614
  ) : null,
3622
- Y ? /* @__PURE__ */ s(
3623
- _,
3615
+ W ? /* @__PURE__ */ s(
3616
+ R,
3624
3617
  {
3625
- message: Z,
3626
- renderText: v
3618
+ message: se,
3619
+ renderText: w
3627
3620
  }
3628
3621
  ) : /* @__PURE__ */ s(
3629
3622
  qt,
3630
3623
  {
3631
- message: Z,
3632
- renderText: v
3624
+ message: se,
3625
+ renderText: w
3633
3626
  }
3634
3627
  ),
3635
3628
  /* @__PURE__ */ s(Wt, {})
3636
3629
  ] }) })
3637
3630
  }
3638
3631
  ),
3639
- !It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3632
+ !It && !St && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3640
3633
  (!ge || Tt) && /* @__PURE__ */ s(
3641
3634
  Ke,
3642
3635
  {
@@ -3646,37 +3639,37 @@ const xi = ({
3646
3639
  }
3647
3640
  ),
3648
3641
  n && ge && /* @__PURE__ */ s(
3649
- qr,
3642
+ Wr,
3650
3643
  {
3651
- selected: z,
3652
- onVoteUp: y,
3653
- onVoteDown: A
3644
+ selected: y,
3645
+ onVoteUp: M,
3646
+ onVoteDown: E
3654
3647
  }
3655
3648
  )
3656
3649
  ] }),
3657
- /* @__PURE__ */ s(Xr, {}),
3658
- ae && /* @__PURE__ */ s(
3659
- te,
3650
+ /* @__PURE__ */ s(Ur, { message: c, groupStyles: o }),
3651
+ ce && /* @__PURE__ */ s(
3652
+ X,
3660
3653
  {
3661
- onClick: d,
3654
+ onClick: u,
3662
3655
  reply_count: c.reply_count
3663
3656
  }
3664
3657
  ),
3665
- ue && /* @__PURE__ */ s(Q, {})
3658
+ le && /* @__PURE__ */ s(ee, {})
3666
3659
  ]
3667
3660
  },
3668
3661
  c.id
3669
3662
  )
3670
3663
  ] });
3671
- }, _i = U.memo(
3672
- wi,
3673
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3674
- ), Ni = (e) => {
3675
- const t = _e("CustomMessage");
3676
- return /* @__PURE__ */ s(_i, { ...t, ...e });
3677
- }, yi = () => {
3664
+ }, wi = U.memo(
3665
+ xi,
3666
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Xs(e, t)
3667
+ ), _i = (e) => {
3668
+ const t = Ie("CustomMessage");
3669
+ return /* @__PURE__ */ s(wi, { ...t, ...e });
3670
+ }, Ni = () => {
3678
3671
  var n;
3679
- const { handleDelete: e, message: t } = _e("CustomMessageActions");
3672
+ const { handleDelete: e, message: t } = Ie("CustomMessageActions");
3680
3673
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
3681
3674
  ds,
3682
3675
  {
@@ -3684,11 +3677,11 @@ const xi = ({
3684
3677
  "aria-label": "Delete",
3685
3678
  title: "Delete",
3686
3679
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3687
- children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3680
+ children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
3688
3681
  }
3689
3682
  );
3690
- }, ki = () => {
3691
- const { handleFlag: e } = _e("CustomMessageActions");
3683
+ }, yi = () => {
3684
+ const { handleFlag: e } = Ie("CustomMessageActions");
3692
3685
  return /* @__PURE__ */ s(
3693
3686
  ds,
3694
3687
  {
@@ -3699,19 +3692,19 @@ const xi = ({
3699
3692
  children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3700
3693
  }
3701
3694
  );
3702
- }, Ci = () => {
3695
+ }, ki = () => {
3703
3696
  var t;
3704
- const { message: e } = _e("CustomMessageActions");
3697
+ const { message: e } = Ie("CustomMessageActions");
3705
3698
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3706
- ta,
3699
+ ea,
3707
3700
  {
3708
3701
  messageActionSet: [
3709
- { Component: yi, placement: "quick", type: "delete" },
3710
- { Component: ki, placement: "quick", type: "flag" }
3702
+ { Component: Ni, placement: "quick", type: "delete" },
3703
+ { Component: yi, placement: "quick", type: "flag" }
3711
3704
  ]
3712
3705
  }
3713
3706
  );
3714
- }, Si = ({
3707
+ }, Ci = ({
3715
3708
  link: e,
3716
3709
  onDismiss: t
3717
3710
  }) => {
@@ -3755,8 +3748,8 @@ const xi = ({
3755
3748
  linkPreviews: Array.from(e.previews.values()).filter(
3756
3749
  (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3757
3750
  )
3758
- }), Ii = () => {
3759
- const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3751
+ }), Si = () => {
3752
+ const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
3760
3753
  e.state,
3761
3754
  Ei
3762
3755
  ), n = (r) => {
@@ -3771,9 +3764,9 @@ const xi = ({
3771
3764
  // block so it keeps its intrinsic height and the container scrolls — a
3772
3765
  // bare flex-column child would be shrunk on the column axis and its
3773
3766
  // fixed-height hero would spill out of the collapsed card box.
3774
- /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Si, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3767
+ /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Ci, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3775
3768
  ) : null;
3776
- }, Ct = U.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3769
+ }, kt = U.createContext(!1), ml = () => Se(kt), Ii = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3777
3770
  "button",
3778
3771
  {
3779
3772
  ...n,
@@ -3781,12 +3774,12 @@ const xi = ({
3781
3774
  "aria-label": "Send",
3782
3775
  disabled: t,
3783
3776
  onClick: e,
3784
- children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3777
+ children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
3785
3778
  }
3786
- ), Ai = () => {
3787
- const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3788
- SendButton: r = Ti,
3789
- AttachmentPreviewList: i = wn
3779
+ ), Ti = () => {
3780
+ const e = Se(kt), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
3781
+ SendButton: r = Ii,
3782
+ AttachmentPreviewList: i = xn
3790
3783
  } = is("CustomMessageInput");
3791
3784
  return (
3792
3785
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
@@ -3803,12 +3796,12 @@ const xi = ({
3803
3796
  className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch 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)]",
3804
3797
  "data-dd-privacy": "mask",
3805
3798
  children: [
3806
- /* @__PURE__ */ s(_n, {}),
3807
- /* @__PURE__ */ s(Ii, {}),
3799
+ /* @__PURE__ */ s(wn, {}),
3800
+ /* @__PURE__ */ s(Si, {}),
3808
3801
  /* @__PURE__ */ s(i, {}),
3809
3802
  /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3810
3803
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3811
- Nn,
3804
+ _n,
3812
3805
  {
3813
3806
  "aria-disabled": e || void 0,
3814
3807
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -3834,7 +3827,7 @@ const xi = ({
3834
3827
  }
3835
3828
  )
3836
3829
  );
3837
- }, Mi = ({
3830
+ }, Ai = ({
3838
3831
  renderActions: e,
3839
3832
  renderFooter: t,
3840
3833
  disabled: n = !1,
@@ -3842,8 +3835,8 @@ const xi = ({
3842
3835
  composerInput: r
3843
3836
  }) => {
3844
3837
  var o;
3845
- const { channel: i } = le(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3846
- return n ? /* @__PURE__ */ m(ee, { children: [
3838
+ const { channel: i } = ue(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3839
+ return n ? /* @__PURE__ */ m(te, { children: [
3847
3840
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3848
3841
  t == null ? void 0 : t()
3849
3842
  ] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
@@ -3855,23 +3848,23 @@ const xi = ({
3855
3848
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3856
3849
  children: [
3857
3850
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3858
- /* @__PURE__ */ s(Ct.Provider, { value: l, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
3851
+ /* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(pn, { Input: r ?? Ti }) })
3859
3852
  ]
3860
3853
  }
3861
3854
  ),
3862
3855
  t == null ? void 0 : t()
3863
3856
  ] });
3864
- }, Ri = [
3857
+ }, Mi = [
3865
3858
  "SYSTEM_DM_AGENT_PAUSED",
3866
3859
  "SYSTEM_DM_AGENT_RESUMED"
3867
- ], Di = {
3860
+ ], Ri = {
3868
3861
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3869
3862
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3870
3863
  }, Li = [
3871
3864
  "SYSTEM_AGE_SAFETY_BLOCKED"
3872
- ], zi = {
3865
+ ], Di = {
3873
3866
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3874
- }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Li.includes(e), Oi = (e) => {
3867
+ }, Je = "age safety guidelines.", zi = "https://linktr.ee/s/about/contact", as = (e) => Mi.includes(e), Pi = (e) => Li.includes(e), Fi = (e) => {
3875
3868
  var a;
3876
3869
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3877
3870
  if (as(t))
@@ -3879,7 +3872,7 @@ const xi = ({
3879
3872
  kind: "dm-agent",
3880
3873
  type: t
3881
3874
  };
3882
- if (Fi(t))
3875
+ if (Pi(t))
3883
3876
  return {
3884
3877
  kind: "age-safety",
3885
3878
  type: t
@@ -3890,32 +3883,32 @@ const xi = ({
3890
3883
  kind: "dm-agent",
3891
3884
  type: n
3892
3885
  };
3893
- }, $i = (e) => {
3894
- const t = e.indexOf(Ze);
3886
+ }, Oi = (e) => {
3887
+ const t = e.indexOf(Je);
3895
3888
  if (t === -1)
3896
3889
  return e;
3897
- const n = t + Ze.length;
3898
- return /* @__PURE__ */ m(ee, { children: [
3890
+ const n = t + Je.length;
3891
+ return /* @__PURE__ */ m(te, { children: [
3899
3892
  e.slice(0, t),
3900
3893
  /* @__PURE__ */ s(
3901
3894
  "a",
3902
3895
  {
3903
- href: Pi,
3896
+ href: zi,
3904
3897
  target: "_blank",
3905
3898
  rel: "noopener noreferrer",
3906
3899
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
3907
- children: Ze
3900
+ children: Je
3908
3901
  }
3909
3902
  ),
3910
3903
  e.slice(n)
3911
3904
  ] });
3912
- }, ji = (e) => {
3905
+ }, $i = (e) => {
3913
3906
  var a, r;
3914
- const t = e.message.hide_date === !0, n = Oi(
3907
+ const t = e.message.hide_date === !0, n = Fi(
3915
3908
  e.message
3916
3909
  );
3917
3910
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3918
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Di[n.type];
3911
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ri[n.type];
3919
3912
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3920
3913
  /* @__PURE__ */ m(
3921
3914
  "div",
@@ -3941,7 +3934,7 @@ const xi = ({
3941
3934
  ] });
3942
3935
  }
3943
3936
  if ((n == null ? void 0 : n.kind) === "age-safety") {
3944
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || zi[n.type];
3937
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Di[n.type];
3945
3938
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3946
3939
  /* @__PURE__ */ m(
3947
3940
  "div",
@@ -3951,7 +3944,7 @@ const xi = ({
3951
3944
  "data-age-safety-system-type": n.type,
3952
3945
  children: [
3953
3946
  /* @__PURE__ */ s(
3954
- ea,
3947
+ Qn,
3955
3948
  {
3956
3949
  size: 24,
3957
3950
  weight: "duotone",
@@ -3960,7 +3953,7 @@ const xi = ({
3960
3953
  "data-testid": "age-safety-system-message-icon"
3961
3954
  }
3962
3955
  ),
3963
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: $i(i) }) })
3956
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Oi(i) }) })
3964
3957
  ]
3965
3958
  }
3966
3959
  ),
@@ -3975,7 +3968,7 @@ const xi = ({
3975
3968
  ] }),
3976
3969
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3977
3970
  ] });
3978
- }, Os = rt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3971
+ }, Os = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3979
3972
  "animateTransform",
3980
3973
  {
3981
3974
  attributeName: "transform",
@@ -3985,21 +3978,21 @@ const xi = ({
3985
3978
  begin: `${120 * t}ms`,
3986
3979
  repeatCount: "indefinite"
3987
3980
  }
3988
- ) }), Bi = /* @__PURE__ */ new Set([
3981
+ ) }), ji = /* @__PURE__ */ new Set([
3989
3982
  qe.Thinking,
3990
3983
  qe.Generating,
3991
3984
  qe.ExternalSources
3992
- ]), Ui = ({ threadList: e }) => {
3993
- var v, w;
3994
- const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = oe(), { typing: i = {} } = yn(), { aiState: l } = kn(t), o = Ie(Os);
3995
- if (!e && o && Bi.has(l)) {
3996
- const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
3985
+ ]), Bi = ({ threadList: e }) => {
3986
+ var c, w;
3987
+ const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = Nn(), { aiState: l } = yn(t), o = Se(Os);
3988
+ if (!e && o && ji.has(l)) {
3989
+ const v = Ui(t, (c = r.user) == null ? void 0 : c.id);
3997
3990
  return /* @__PURE__ */ s(
3998
3991
  rs,
3999
3992
  {
4000
- avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
4001
- avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
4002
- avatarImage: b == null ? void 0 : b.image,
3993
+ avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
3994
+ avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
3995
+ avatarImage: v == null ? void 0 : v.image,
4003
3996
  testId: "typing-indicator-ai"
4004
3997
  }
4005
3998
  );
@@ -4007,25 +4000,25 @@ const xi = ({
4007
4000
  if ((n == null ? void 0 : n.typing_events) === !1)
4008
4001
  return null;
4009
4002
  const u = e ? [] : Object.values(i).filter(
4010
- ({ parent_id: b, user: f }) => {
4003
+ ({ parent_id: v, user: g }) => {
4011
4004
  var x;
4012
- return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && !b;
4005
+ return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
4013
4006
  }
4014
4007
  ), p = e ? Object.values(i).filter(
4015
- ({ parent_id: b, user: f }) => {
4008
+ ({ parent_id: v, user: g }) => {
4016
4009
  var x;
4017
- return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && b === (a == null ? void 0 : a.id);
4010
+ return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
4018
4011
  }
4019
4012
  ) : [], h = e ? p : u;
4020
4013
  if (!h.length)
4021
4014
  return null;
4022
- const g = (w = h[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4015
+ const f = (w = h[0]) == null ? void 0 : w.user, b = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
4023
4016
  return /* @__PURE__ */ s(
4024
4017
  rs,
4025
4018
  {
4026
- avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4027
- avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
4028
- avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
4019
+ avatarId: (f == null ? void 0 : f.id) ?? (b == null ? void 0 : b.id) ?? "typing-user",
4020
+ avatarName: (f == null ? void 0 : f.name) ?? (b == null ? void 0 : b.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
4021
+ avatarImage: (f == null ? void 0 : f.image) ?? (b == null ? void 0 : b.image),
4029
4022
  testId: "typing-indicator"
4030
4023
  }
4031
4024
  );
@@ -4064,16 +4057,16 @@ const xi = ({
4064
4057
  height: "13",
4065
4058
  overflow: "visible",
4066
4059
  children: [
4067
- /* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
4068
- /* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
4069
- /* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
4060
+ /* @__PURE__ */ s(Ze, { cx: "4", index: 0 }),
4061
+ /* @__PURE__ */ s(Ze, { cx: "16", index: 1 }),
4062
+ /* @__PURE__ */ s(Ze, { cx: "28", index: 2 })
4070
4063
  ]
4071
4064
  }
4072
4065
  ) }) }) }) }) })
4073
4066
  ] })
4074
4067
  }
4075
4068
  );
4076
- function Vi(e, t) {
4069
+ function Ui(e, t) {
4077
4070
  var a;
4078
4071
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4079
4072
  for (const r of Object.values(n)) {
@@ -4082,7 +4075,7 @@ function Vi(e, t) {
4082
4075
  return i;
4083
4076
  }
4084
4077
  }
4085
- const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4078
+ const Vi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4086
4079
  "div",
4087
4080
  {
4088
4081
  className: k("flex items-center justify-center h-full", e),
@@ -4126,11 +4119,11 @@ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4126
4119
  ]
4127
4120
  }
4128
4121
  ), je = U.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
4129
- /* @__PURE__ */ s(Hi, { className: "w-6 h-6" }),
4122
+ /* @__PURE__ */ s(Gi, { className: "w-6 h-6" }),
4130
4123
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4131
4124
  ] }) }));
4132
4125
  je.displayName = "LoadingState";
4133
- const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Yi = ({
4126
+ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Hi = ({
4134
4127
  onBack: e,
4135
4128
  showBackButton: t,
4136
4129
  showStarButton: n = !1,
@@ -4143,32 +4136,32 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4143
4136
  onDeleteConversationClick: u,
4144
4137
  onBlockParticipantClick: p,
4145
4138
  onReportParticipantClick: h,
4146
- customChannelActions: g,
4147
- renderChannelActions: c,
4148
- showChannelInfo: v = !0,
4139
+ customChannelActions: f,
4140
+ renderChannelActions: b,
4141
+ showChannelInfo: c = !0,
4149
4142
  onParticipantNameClick: w,
4150
- renderHeaderTitleBadges: b
4143
+ renderHeaderTitleBadges: v
4151
4144
  }) => {
4152
- var A, E, C, I, $, F;
4153
- const { channel: f } = le(), { client: x } = oe(), N = U.useMemo(
4145
+ var M, E, C, T, F, O;
4146
+ const { channel: g } = ue(), { client: x } = me(), _ = U.useMemo(
4154
4147
  () => {
4155
4148
  var V;
4156
4149
  return Ue(
4157
- (V = f.state) == null ? void 0 : V.members,
4150
+ (V = g.state) == null ? void 0 : V.members,
4158
4151
  x == null ? void 0 : x.userID,
4159
- f.type
4152
+ g.type
4160
4153
  );
4161
4154
  },
4162
- [(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
4163
- ), S = ct(N == null ? void 0 : N.user), T = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = ot(f), L = b == null ? void 0 : b({
4164
- channel: f,
4165
- participant: N
4166
- }), D = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(ee, { children: [
4167
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: S }),
4155
+ [(M = g.state) == null ? void 0 : M.members, x == null ? void 0 : x.userID, g.type]
4156
+ ), A = ot(_ == null ? void 0 : _.user), S = (E = _ == null ? void 0 : _.user) == null ? void 0 : E.image, I = lt(g), L = v == null ? void 0 : v({
4157
+ channel: g,
4158
+ participant: _
4159
+ }), D = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", $ = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(te, { children: [
4160
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: A }),
4168
4161
  L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
4169
4162
  ] }), y = async () => {
4170
4163
  try {
4171
- M ? await f.unpin() : await f.pin();
4164
+ I ? await g.unpin() : await g.pin();
4172
4165
  } catch (V) {
4173
4166
  console.error(
4174
4167
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -4189,7 +4182,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4189
4182
  }),
4190
4183
  type: "button",
4191
4184
  "aria-label": "Back to conversations",
4192
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4185
+ children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4193
4186
  }
4194
4187
  ) }),
4195
4188
  /* @__PURE__ */ s(
@@ -4202,7 +4195,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4202
4195
  {
4203
4196
  type: "button",
4204
4197
  onClick: w,
4205
- "aria-label": `View details for ${S}`,
4198
+ "aria-label": `View details for ${A}`,
4206
4199
  className: k(
4207
4200
  D,
4208
4201
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
@@ -4211,10 +4204,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4211
4204
  /* @__PURE__ */ s(
4212
4205
  ne,
4213
4206
  {
4214
- id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || f.id || "unknown",
4215
- name: S,
4216
- image: T,
4217
- starred: n && M,
4207
+ id: ((C = _ == null ? void 0 : _.user) == null ? void 0 : C.id) || g.id || "unknown",
4208
+ name: A,
4209
+ image: S,
4210
+ starred: n && I,
4218
4211
  dmAgentEnabled: a,
4219
4212
  size: 48
4220
4213
  }
@@ -4233,10 +4226,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4233
4226
  /* @__PURE__ */ s(
4234
4227
  ne,
4235
4228
  {
4236
- id: ((I = N == null ? void 0 : N.user) == null ? void 0 : I.id) || f.id || "unknown",
4237
- name: S,
4238
- image: T,
4239
- starred: n && M,
4229
+ id: ((T = _ == null ? void 0 : _.user) == null ? void 0 : T.id) || g.id || "unknown",
4230
+ name: A,
4231
+ image: S,
4232
+ starred: n && I,
4240
4233
  dmAgentEnabled: a,
4241
4234
  size: 48
4242
4235
  }
@@ -4265,24 +4258,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4265
4258
  className: be,
4266
4259
  onClick: y,
4267
4260
  type: "button",
4268
- "aria-label": M ? "Unstar conversation" : "Star conversation",
4261
+ "aria-label": I ? "Unstar conversation" : "Star conversation",
4269
4262
  children: /* @__PURE__ */ s(
4270
4263
  Ee,
4271
4264
  {
4272
4265
  className: k("size-5", {
4273
- "text-yellow-600": M,
4274
- "text-black/90": !M
4266
+ "text-yellow-600": I,
4267
+ "text-black/90": !I
4275
4268
  }),
4276
- weight: M ? "duotone" : "regular"
4269
+ weight: I ? "duotone" : "regular"
4277
4270
  }
4278
4271
  )
4279
4272
  }
4280
4273
  ),
4281
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
4282
- st,
4274
+ c && (b !== void 0 ? b : /* @__PURE__ */ s(
4275
+ tt,
4283
4276
  {
4284
- channel: f,
4285
- participant: N,
4277
+ channel: g,
4278
+ participant: _,
4286
4279
  showDeleteConversation: l,
4287
4280
  showBlockParticipant: o,
4288
4281
  showReportParticipant: d,
@@ -4291,7 +4284,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4291
4284
  onDeleteConversationClick: u,
4292
4285
  onBlockParticipantClick: p,
4293
4286
  onReportParticipantClick: h,
4294
- customChannelActions: g,
4287
+ customChannelActions: f,
4295
4288
  triggerClassName: k(be, "bg-[#F1F0EE]")
4296
4289
  }
4297
4290
  ))
@@ -4309,7 +4302,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4309
4302
  type: "button",
4310
4303
  onClick: e,
4311
4304
  "aria-label": "Back to conversations",
4312
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4305
+ children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4313
4306
  }
4314
4307
  ),
4315
4308
  w ? /* @__PURE__ */ m(
@@ -4317,19 +4310,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4317
4310
  {
4318
4311
  type: "button",
4319
4312
  onClick: w,
4320
- "aria-label": `View details for ${S}`,
4313
+ "aria-label": `View details for ${A}`,
4321
4314
  className: k(
4322
- O,
4315
+ $,
4323
4316
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4324
4317
  ),
4325
4318
  children: [
4326
4319
  /* @__PURE__ */ s(
4327
4320
  ne,
4328
4321
  {
4329
- id: (($ = N == null ? void 0 : N.user) == null ? void 0 : $.id) || f.id || "unknown",
4330
- name: S,
4331
- image: T,
4332
- starred: n && M,
4322
+ id: ((F = _ == null ? void 0 : _.user) == null ? void 0 : F.id) || g.id || "unknown",
4323
+ name: A,
4324
+ image: S,
4325
+ starred: n && I,
4333
4326
  dmAgentEnabled: a,
4334
4327
  size: 48
4335
4328
  }
@@ -4346,14 +4339,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4346
4339
  ] })
4347
4340
  ]
4348
4341
  }
4349
- ) : /* @__PURE__ */ m("div", { className: O, children: [
4342
+ ) : /* @__PURE__ */ m("div", { className: $, children: [
4350
4343
  /* @__PURE__ */ s(
4351
4344
  ne,
4352
4345
  {
4353
- id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || f.id || "unknown",
4354
- name: S,
4355
- image: T,
4356
- starred: n && M,
4346
+ id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || g.id || "unknown",
4347
+ name: A,
4348
+ image: S,
4349
+ starred: n && I,
4357
4350
  dmAgentEnabled: a,
4358
4351
  size: 48
4359
4352
  }
@@ -4383,24 +4376,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4383
4376
  className: be,
4384
4377
  onClick: y,
4385
4378
  type: "button",
4386
- "aria-label": M ? "Unstar conversation" : "Star conversation",
4379
+ "aria-label": I ? "Unstar conversation" : "Star conversation",
4387
4380
  children: /* @__PURE__ */ s(
4388
4381
  Ee,
4389
4382
  {
4390
4383
  className: k("size-6", {
4391
- "text-yellow-600": M,
4392
- "text-black/90": !M
4384
+ "text-yellow-600": I,
4385
+ "text-black/90": !I
4393
4386
  }),
4394
- weight: M ? "duotone" : "regular"
4387
+ weight: I ? "duotone" : "regular"
4395
4388
  }
4396
4389
  )
4397
4390
  }
4398
4391
  ),
4399
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
4400
- st,
4392
+ c && (b !== void 0 ? b : /* @__PURE__ */ s(
4393
+ tt,
4401
4394
  {
4402
- channel: f,
4403
- participant: N,
4395
+ channel: g,
4396
+ participant: _,
4404
4397
  showDeleteConversation: l,
4405
4398
  showBlockParticipant: o,
4406
4399
  showReportParticipant: d,
@@ -4409,14 +4402,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4409
4402
  onDeleteConversationClick: u,
4410
4403
  onBlockParticipantClick: p,
4411
4404
  onReportParticipantClick: h,
4412
- customChannelActions: g,
4405
+ customChannelActions: f,
4413
4406
  triggerClassName: be
4414
4407
  }
4415
4408
  ))
4416
4409
  ] })
4417
4410
  ] })
4418
4411
  ] });
4419
- }, qi = ({
4412
+ }, Yi = ({
4420
4413
  onBack: e,
4421
4414
  showBackButton: t,
4422
4415
  renderMessageInputActions: n,
@@ -4429,122 +4422,122 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4429
4422
  onBlockParticipantClick: u,
4430
4423
  onReportParticipantClick: p,
4431
4424
  showBlockParticipant: h = !0,
4432
- showReportParticipant: g = !0,
4433
- composerDisabled: c = !1,
4434
- composerDisabledReason: v,
4425
+ showReportParticipant: f = !0,
4426
+ composerDisabled: b = !1,
4427
+ composerDisabledReason: c,
4435
4428
  showStarButton: w = !1,
4436
- chatbotVotingEnabled: b = !1,
4437
- renderChannelBanner: f,
4429
+ chatbotVotingEnabled: v = !1,
4430
+ renderChannelBanner: g,
4438
4431
  renderHeaderTitleBadges: x,
4439
- customChannelActions: N,
4440
- renderChannelActions: S,
4441
- renderMessage: T,
4442
- dmAgentEnabled: M = !1,
4432
+ customChannelActions: _,
4433
+ renderChannelActions: A,
4434
+ renderMessage: S,
4435
+ dmAgentEnabled: I = !1,
4443
4436
  viewerLanguage: L,
4444
4437
  showChannelInfo: D = !0,
4445
- onParticipantNameClick: O,
4438
+ onParticipantNameClick: $,
4446
4439
  composerInput: z
4447
4440
  }) => {
4448
- var _, R, H, q;
4449
- const { channel: y } = le(), { client: A } = oe(), E = U.useMemo(
4441
+ var N, R, G, Y;
4442
+ const { channel: y } = ue(), { client: M } = me(), E = U.useMemo(
4450
4443
  () => {
4451
- var Y;
4444
+ var q;
4452
4445
  return Ue(
4453
- (Y = y.state) == null ? void 0 : Y.members,
4454
- A == null ? void 0 : A.userID,
4446
+ (q = y.state) == null ? void 0 : q.members,
4447
+ M == null ? void 0 : M.userID,
4455
4448
  y.type
4456
4449
  );
4457
4450
  },
4458
- [(_ = y.state) == null ? void 0 : _.members, A == null ? void 0 : A.userID, y.type]
4451
+ [(N = y.state) == null ? void 0 : N.members, M == null ? void 0 : M.userID, y.type]
4459
4452
  ), C = U.useMemo(() => {
4460
- var W;
4461
- const Y = A == null ? void 0 : A.userID;
4462
- return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Z) => {
4463
- var de;
4464
- return ((de = Z.user) == null ? void 0 : de.id) === Y;
4453
+ var j;
4454
+ const q = M == null ? void 0 : M.userID;
4455
+ return q ? Object.values(((j = y.state) == null ? void 0 : j.members) || {}).find((Q) => {
4456
+ var se;
4457
+ return ((se = Q.user) == null ? void 0 : se.id) === q;
4465
4458
  }) : void 0;
4466
- }, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q = E == null ? void 0 : E.user) == null ? void 0 : q.is_account) ?? (E == null ? void 0 : E.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
4467
- (Y) => Y.type !== "deleted"
4468
- ), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, te = O ? /* @__PURE__ */ s(
4469
- pa,
4459
+ }, [M == null ? void 0 : M.userID, (R = y.state) == null ? void 0 : R.members]), T = ((G = C == null ? void 0 : C.user) == null ? void 0 : G.is_account) ?? (C == null ? void 0 : C.is_account), F = ((Y = E == null ? void 0 : E.user) == null ? void 0 : Y.is_account) ?? (E == null ? void 0 : E.is_account), O = I && T === !1 && F === !0, V = y.state.messages.some(
4460
+ (q) => q.type !== "deleted"
4461
+ ), Z = g ? /* @__PURE__ */ s(U.Fragment, { children: g() }, "lt-channel-banner") : null, ee = $ ? /* @__PURE__ */ s(
4462
+ ga,
4470
4463
  {
4471
4464
  onBack: e,
4472
4465
  showBackButton: t,
4473
4466
  showChannelInfo: D,
4474
4467
  showStarButton: w,
4475
- dmAgentEnabled: F,
4468
+ dmAgentEnabled: O,
4476
4469
  onLeaveConversation: i,
4477
4470
  onBlockParticipant: l,
4478
4471
  showDeleteConversation: o,
4479
4472
  showBlockParticipant: h,
4480
- showReportParticipant: g,
4473
+ showReportParticipant: f,
4481
4474
  onDeleteConversationClick: d,
4482
4475
  onBlockParticipantClick: u,
4483
4476
  onReportParticipantClick: p,
4484
- customChannelActions: N,
4485
- renderChannelActions: S,
4486
- onParticipantNameClick: O
4477
+ customChannelActions: _,
4478
+ renderChannelActions: A,
4479
+ onParticipantNameClick: $
4487
4480
  }
4488
4481
  ) : null, X = J(
4489
- (Y) => {
4490
- const { message: j } = _e("ChannelView"), W = /* @__PURE__ */ s(
4491
- Ni,
4482
+ (q) => {
4483
+ const { message: W } = Ie("ChannelView"), j = /* @__PURE__ */ s(
4484
+ _i,
4492
4485
  {
4493
- ...Y,
4494
- chatbotVotingEnabled: b,
4486
+ ...q,
4487
+ chatbotVotingEnabled: v,
4495
4488
  viewerLanguage: L
4496
4489
  }
4497
4490
  );
4498
- return !T || !j ? W : T(W, j);
4491
+ return !S || !W ? j : S(j, W);
4499
4492
  },
4500
- [b, T, L]
4493
+ [v, S, L]
4501
4494
  );
4502
- return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4503
- Sn,
4495
+ return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
4496
+ Cn,
4504
4497
  {
4505
4498
  overrides: {
4506
4499
  Message: X,
4507
- MessageActions: Ci
4500
+ MessageActions: ki
4508
4501
  },
4509
4502
  children: /* @__PURE__ */ m(En, { children: [
4510
- !O && /* @__PURE__ */ m(ee, { children: [
4503
+ !$ && /* @__PURE__ */ m(te, { children: [
4511
4504
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4512
- Yi,
4505
+ Hi,
4513
4506
  {
4514
4507
  onBack: e,
4515
4508
  showBackButton: t,
4516
4509
  showChannelInfo: D,
4517
4510
  showStarButton: w,
4518
- dmAgentEnabled: F,
4511
+ dmAgentEnabled: O,
4519
4512
  onLeaveConversation: i,
4520
4513
  onBlockParticipant: l,
4521
4514
  showDeleteConversation: o,
4522
4515
  showBlockParticipant: h,
4523
- showReportParticipant: g,
4516
+ showReportParticipant: f,
4524
4517
  onDeleteConversationClick: d,
4525
4518
  onBlockParticipantClick: u,
4526
4519
  onReportParticipantClick: p,
4527
- customChannelActions: N,
4528
- renderChannelActions: S,
4520
+ customChannelActions: _,
4521
+ renderChannelActions: A,
4529
4522
  renderHeaderTitleBadges: x
4530
4523
  }
4531
4524
  ) }, "lt-channel-header"),
4532
- Q
4525
+ Z
4533
4526
  ] }),
4534
- O && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4535
- te,
4536
- Q
4527
+ $ && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4528
+ ee,
4529
+ Z
4537
4530
  ] }),
4538
4531
  /* @__PURE__ */ s(
4539
4532
  "div",
4540
4533
  {
4541
4534
  className: "flex-1 overflow-hidden relative",
4542
4535
  children: /* @__PURE__ */ s(
4543
- In,
4536
+ Sn,
4544
4537
  {
4545
- head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4546
- te,
4547
- Q
4538
+ head: $ && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4539
+ ee,
4540
+ Z
4548
4541
  ] }) : void 0,
4549
4542
  hideDeletedMessages: !0,
4550
4543
  hideNewMessageSeparator: !1
@@ -4555,14 +4548,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4555
4548
  ),
4556
4549
  r ? /* @__PURE__ */ s(U.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
4557
4550
  /* @__PURE__ */ s(
4558
- Mi,
4551
+ Ai,
4559
4552
  {
4560
4553
  ...n && {
4561
4554
  renderActions: () => n == null ? void 0 : n(y)
4562
4555
  },
4563
4556
  renderFooter: () => a == null ? void 0 : a(y),
4564
- disabled: c,
4565
- disabledReason: v,
4557
+ disabled: b,
4558
+ disabledReason: c,
4566
4559
  composerInput: z
4567
4560
  },
4568
4561
  "lt-channel-message-input"
@@ -4581,86 +4574,86 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4581
4574
  onLeaveConversation: l,
4582
4575
  onBlockParticipant: o,
4583
4576
  className: d,
4584
- CustomChannelEmptyState: u = Gi,
4577
+ CustomChannelEmptyState: u = Vi,
4585
4578
  showDeleteConversation: p = !0,
4586
4579
  onDeleteConversationClick: h,
4587
- onBlockParticipantClick: g,
4588
- onReportParticipantClick: c,
4589
- showBlockParticipant: v = !0,
4580
+ onBlockParticipantClick: f,
4581
+ onReportParticipantClick: b,
4582
+ showBlockParticipant: c = !0,
4590
4583
  showReportParticipant: w = !0,
4591
- composerDisabled: b = !1,
4592
- composerDisabledReason: f,
4584
+ composerDisabled: v = !1,
4585
+ composerDisabledReason: g,
4593
4586
  dmAgentEnabled: x,
4594
- messageMetadata: N,
4595
- onMessageSent: S,
4596
- showStarButton: T = !1,
4597
- chatbotVotingEnabled: M = !1,
4587
+ messageMetadata: _,
4588
+ onMessageSent: A,
4589
+ showStarButton: S = !1,
4590
+ chatbotVotingEnabled: I = !1,
4598
4591
  renderChannelBanner: L,
4599
4592
  renderHeaderTitleBadges: D,
4600
- customChannelActions: O,
4593
+ customChannelActions: $,
4601
4594
  renderChannelActions: z,
4602
4595
  renderMessage: y,
4603
- onMessageLinkClick: A,
4596
+ onMessageLinkClick: M,
4604
4597
  sendButton: E,
4605
4598
  attachmentPreviewList: C,
4606
- viewerLanguage: I,
4607
- showChannelInfo: $ = !0,
4608
- onParticipantNameClick: F,
4599
+ viewerLanguage: T,
4600
+ showChannelInfo: F = !0,
4601
+ onParticipantNameClick: O,
4609
4602
  composerInput: V
4610
4603
  }) => {
4611
- const Q = J(
4612
- async (X, _, R) => {
4613
- var Z;
4614
- const H = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, q = x && !H, Y = {
4615
- ..._,
4616
- ...q && { silent: !0 },
4617
- ...N && {
4604
+ const Z = J(
4605
+ async (X, N, R) => {
4606
+ var Q;
4607
+ const G = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, Y = x && !G, q = {
4608
+ ...N,
4609
+ ...Y && { silent: !0 },
4610
+ ..._ && {
4618
4611
  metadata: {
4619
- ..._.metadata ?? {},
4620
- ...N
4612
+ ...N.metadata ?? {},
4613
+ ..._
4621
4614
  }
4622
4615
  }
4623
- }, j = {
4616
+ }, W = {
4624
4617
  ...R,
4625
- ...q && { skip_push: !0 }
4626
- }, W = await e.sendMessage(Y, j);
4627
- return S == null || S(W), W;
4618
+ ...Y && { skip_push: !0 }
4619
+ }, j = await e.sendMessage(q, W);
4620
+ return A == null || A(j), j;
4628
4621
  },
4629
- [e, x, N, S]
4630
- ), te = G(null);
4622
+ [e, x, _, A]
4623
+ ), ee = H(null);
4631
4624
  return K(() => {
4632
- if (!A) return;
4633
- const X = te.current;
4625
+ if (!M) return;
4626
+ const X = ee.current;
4634
4627
  if (!X) return;
4635
- const _ = (R) => {
4636
- const H = R.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4637
- if (!Y) return;
4638
- const j = q == null ? void 0 : q.closest("[data-message-id]"), W = j == null ? void 0 : j.getAttribute("data-message-id"), Z = W ? e.state.messages.find((de) => de.id === W) : void 0;
4639
- A(Y, Z);
4628
+ const N = (R) => {
4629
+ const G = R.target, Y = G == null ? void 0 : G.closest("a[href]"), q = Y == null ? void 0 : Y.getAttribute("href");
4630
+ if (!q) return;
4631
+ const W = Y == null ? void 0 : Y.closest("[data-message-id]"), j = W == null ? void 0 : W.getAttribute("data-message-id"), Q = j ? e.state.messages.find((se) => se.id === j) : void 0;
4632
+ M(q, Q);
4640
4633
  };
4641
- return X.addEventListener("click", _), () => X.removeEventListener("click", _);
4642
- }, [A, e]), /* @__PURE__ */ s(
4634
+ return X.addEventListener("click", N), () => X.removeEventListener("click", N);
4635
+ }, [M, e]), /* @__PURE__ */ s(
4643
4636
  "div",
4644
4637
  {
4645
- ref: te,
4638
+ ref: ee,
4646
4639
  className: k(
4647
4640
  "messaging-channel-view h-full flex flex-col",
4648
4641
  d
4649
4642
  ),
4650
4643
  children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4651
- Cn,
4644
+ kn,
4652
4645
  {
4653
4646
  channel: e,
4654
- MessageSystem: ji,
4647
+ MessageSystem: $i,
4655
4648
  EmptyStateIndicator: u,
4656
4649
  LoadingIndicator: je,
4657
- DateSeparator: ba,
4658
- TypingIndicator: Ui,
4659
- doSendMessageRequest: Q,
4650
+ DateSeparator: pa,
4651
+ TypingIndicator: Bi,
4652
+ doSendMessageRequest: Z,
4660
4653
  ...E ? { SendButton: E } : {},
4661
4654
  ...C ? { AttachmentPreviewList: C } : {},
4662
4655
  children: /* @__PURE__ */ s(
4663
- qi,
4656
+ Yi,
4664
4657
  {
4665
4658
  onBack: t,
4666
4659
  showBackButton: n,
@@ -4672,23 +4665,23 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4672
4665
  CustomChannelEmptyState: u,
4673
4666
  showDeleteConversation: p,
4674
4667
  onDeleteConversationClick: h,
4675
- onBlockParticipantClick: g,
4676
- onReportParticipantClick: c,
4677
- showBlockParticipant: v,
4668
+ onBlockParticipantClick: f,
4669
+ onReportParticipantClick: b,
4670
+ showBlockParticipant: c,
4678
4671
  showReportParticipant: w,
4679
- composerDisabled: b,
4680
- composerDisabledReason: f,
4681
- showStarButton: T,
4672
+ composerDisabled: v,
4673
+ composerDisabledReason: g,
4674
+ showStarButton: S,
4682
4675
  dmAgentEnabled: x,
4683
- chatbotVotingEnabled: M,
4676
+ chatbotVotingEnabled: I,
4684
4677
  renderChannelBanner: L,
4685
4678
  renderHeaderTitleBadges: D,
4686
- customChannelActions: O,
4679
+ customChannelActions: $,
4687
4680
  renderChannelActions: z,
4688
4681
  renderMessage: y,
4689
- viewerLanguage: I,
4690
- showChannelInfo: $,
4691
- onParticipantNameClick: F,
4682
+ viewerLanguage: T,
4683
+ showChannelInfo: F,
4684
+ onParticipantNameClick: O,
4692
4685
  composerInput: V
4693
4686
  }
4694
4687
  )
@@ -4699,7 +4692,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4699
4692
  }
4700
4693
  );
4701
4694
  $s.displayName = "ChannelView";
4702
- const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4695
+ const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4703
4696
  /* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
4704
4697
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4705
4698
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4713,8 +4706,8 @@ const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4713
4706
  }
4714
4707
  )
4715
4708
  ] }) }));
4716
- ke.displayName = "ErrorState";
4717
- const fl = ({
4709
+ ye.displayName = "ErrorState";
4710
+ const hl = ({
4718
4711
  capabilities: e = {},
4719
4712
  renderMessageInputActions: t,
4720
4713
  renderConversationFooter: n,
@@ -4727,139 +4720,139 @@ const fl = ({
4727
4720
  onReportParticipantClick: u,
4728
4721
  dmAgentEnabled: p,
4729
4722
  onMessageSent: h,
4730
- chatbotVotingEnabled: g = !1,
4731
- viewerLanguage: c,
4732
- renderHeaderTitleBadges: v,
4723
+ chatbotVotingEnabled: f = !1,
4724
+ viewerLanguage: b,
4725
+ renderHeaderTitleBadges: c,
4733
4726
  renderChannelBanner: w,
4734
- customChannelActions: b,
4735
- renderChannelActions: f,
4727
+ customChannelActions: v,
4728
+ renderChannelActions: g,
4736
4729
  onParticipantNameClick: x,
4737
- renderMessage: N,
4738
- onMessageLinkClick: S,
4739
- showChannelInfo: T,
4740
- composerInput: M
4730
+ renderMessage: _,
4731
+ onMessageLinkClick: A,
4732
+ showChannelInfo: S,
4733
+ composerInput: I
4741
4734
  }) => {
4742
4735
  const {
4743
4736
  client: L,
4744
4737
  isConnected: D,
4745
- isLoading: O,
4738
+ isLoading: $,
4746
4739
  error: z,
4747
4740
  refreshConnection: y,
4748
- service: A,
4741
+ service: M,
4749
4742
  debug: E
4750
- } = sa(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
4743
+ } = ta(), [C, T] = B(null), [F, O] = B(null), [V, Z] = B(!1), { showDeleteConversation: ee = !0 } = e, X = H(l);
4751
4744
  X.current = l;
4752
- const _ = G(a);
4753
- _.current = a;
4754
- const R = G(null), H = G(null);
4745
+ const N = H(a);
4746
+ N.current = a;
4747
+ const R = H(null), G = H(null);
4755
4748
  K(() => {
4756
- H.current = C;
4749
+ G.current = C;
4757
4750
  }, [C]), K(() => {
4758
4751
  if (!L || !D) return;
4759
- const j = L.userID;
4760
- if (!j) return;
4761
- const W = `${j}::${i}`;
4762
- if (R.current === W) return;
4763
- R.current = W;
4764
- const Z = () => {
4765
- R.current === W && (R.current = null);
4752
+ const W = L.userID;
4753
+ if (!W) return;
4754
+ const j = `${W}::${i}`;
4755
+ if (R.current === j) return;
4756
+ R.current = j;
4757
+ const Q = () => {
4758
+ R.current === j && (R.current = null);
4766
4759
  };
4767
4760
  (async () => {
4768
- var De, Le;
4761
+ var Le, De;
4769
4762
  try {
4770
4763
  E && console.log(
4771
4764
  "[MessagingShell] Loading initial conversation with:",
4772
4765
  i
4773
4766
  );
4774
- const ae = await L.queryChannels(
4767
+ const ie = await L.queryChannels(
4775
4768
  {
4776
4769
  type: "messaging",
4777
- members: { $eq: [j, i] }
4770
+ members: { $eq: [W, i] }
4778
4771
  },
4779
4772
  {},
4780
4773
  { limit: 1 }
4781
4774
  );
4782
- if (ae.length > 0) {
4783
- I(ae[0]), F(null), (De = _.current) == null || De.call(_, ae[0]), E && console.log(
4775
+ if (ie.length > 0) {
4776
+ T(ie[0]), O(null), (Le = N.current) == null || Le.call(N, ie[0]), E && console.log(
4784
4777
  "[MessagingShell] Initial conversation loaded:",
4785
- ae[0].id
4778
+ ie[0].id
4786
4779
  );
4787
4780
  return;
4788
4781
  }
4789
- const ue = X.current;
4790
- if (!ue || !A) {
4791
- Z(), F("No conversation found with this account"), E && console.log(
4782
+ const ce = X.current;
4783
+ if (!ce || !M) {
4784
+ Q(), O("No conversation found with this account"), E && console.log(
4792
4785
  "[MessagingShell] No conversation found for:",
4793
4786
  i
4794
4787
  );
4795
4788
  return;
4796
4789
  }
4797
4790
  try {
4798
- const ie = await A.startChannelWithParticipant({
4799
- id: ue.id,
4800
- name: ue.name,
4801
- phone: ue.phone
4791
+ const le = await M.startChannelWithParticipant({
4792
+ id: ce.id,
4793
+ name: ce.name,
4794
+ phone: ce.phone
4802
4795
  });
4803
- I(ie), F(null), (Le = _.current) == null || Le.call(_, ie), E && console.log(
4796
+ T(le), O(null), (De = N.current) == null || De.call(N, le), E && console.log(
4804
4797
  "[MessagingShell] Channel created and loaded:",
4805
- ie.id
4798
+ le.id
4806
4799
  );
4807
- } catch (ie) {
4800
+ } catch (le) {
4808
4801
  console.error(
4809
4802
  "[MessagingShell] Failed to create conversation:",
4810
- ie
4811
- ), Z(), F("Failed to create conversation");
4803
+ le
4804
+ ), Q(), O("Failed to create conversation");
4812
4805
  }
4813
- } catch (ae) {
4806
+ } catch (ie) {
4814
4807
  console.error(
4815
4808
  "[MessagingShell] Failed to load initial conversation:",
4816
- ae
4817
- ), Z(), H.current || F("Failed to load conversation");
4809
+ ie
4810
+ ), Q(), G.current || O("Failed to load conversation");
4818
4811
  }
4819
4812
  })();
4820
- }, [i, L, D, A, E]);
4821
- const q = G(r);
4822
- q.current = r;
4823
- const Y = J(() => {
4824
- var j;
4825
- I(null), Q(!0), (j = q.current) == null || j.call(q);
4813
+ }, [i, L, D, M, E]);
4814
+ const Y = H(r);
4815
+ Y.current = r;
4816
+ const q = J(() => {
4817
+ var W;
4818
+ T(null), Z(!0), (W = Y.current) == null || W.call(Y);
4826
4819
  }, []);
4827
- return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ke, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
4828
- ke,
4820
+ return $ ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
4821
+ ye,
4829
4822
  {
4830
4823
  message: "Not connected to messaging service",
4831
4824
  onBack: y
4832
4825
  }
4833
- ) : $ ? /* @__PURE__ */ s(ke, { message: $ }) : V && !C ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4826
+ ) : F ? /* @__PURE__ */ s(ye, { message: F }) : V && !C ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4834
4827
  $s,
4835
4828
  {
4836
4829
  channel: C,
4837
4830
  renderMessageInputActions: t,
4838
4831
  renderConversationFooter: n,
4839
4832
  renderChannelBanner: w,
4840
- onLeaveConversation: Y,
4841
- onBlockParticipant: Y,
4833
+ onLeaveConversation: q,
4834
+ onBlockParticipant: q,
4842
4835
  CustomChannelEmptyState: o,
4843
- showDeleteConversation: te,
4836
+ showDeleteConversation: ee,
4844
4837
  onBlockParticipantClick: d,
4845
4838
  onReportParticipantClick: u,
4846
4839
  dmAgentEnabled: p,
4847
4840
  onMessageSent: h,
4848
- chatbotVotingEnabled: g,
4849
- viewerLanguage: c,
4850
- renderHeaderTitleBadges: v,
4851
- customChannelActions: b,
4852
- renderChannelActions: f,
4841
+ chatbotVotingEnabled: f,
4842
+ viewerLanguage: b,
4843
+ renderHeaderTitleBadges: c,
4844
+ customChannelActions: v,
4845
+ renderChannelActions: g,
4853
4846
  onParticipantNameClick: x,
4854
- renderMessage: N,
4855
- onMessageLinkClick: S,
4856
- showChannelInfo: T,
4857
- composerInput: M
4847
+ renderMessage: _,
4848
+ onMessageLinkClick: A,
4849
+ showChannelInfo: S,
4850
+ composerInput: I
4858
4851
  },
4859
4852
  C.id
4860
4853
  ) }) }) : /* @__PURE__ */ s(je, {});
4861
4854
  };
4862
- function Wi(e) {
4855
+ function qi(e) {
4863
4856
  const t = e.state.pending_messages;
4864
4857
  if (t != null && t.length)
4865
4858
  for (const n of t)
@@ -4873,18 +4866,18 @@ const js = U.createContext({
4873
4866
  renderMessagePreview: void 0,
4874
4867
  channelPreview: void 0,
4875
4868
  viewerLanguage: void 0
4876
- }), Xi = js.Provider, Ki = () => U.useContext(js), Ji = (e, t) => {
4869
+ }), Wi = js.Provider, Xi = () => U.useContext(js), Ki = (e, t) => {
4877
4870
  const n = new Date(
4878
4871
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4879
4872
  ), r = new Date(
4880
4873
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4881
4874
  ).getTime() - n.getTime();
4882
4875
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4883
- }, Zi = (e) => {
4876
+ }, Ji = (e) => {
4884
4877
  const t = /* @__PURE__ */ new Date();
4885
4878
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4886
4879
  return "Just now";
4887
- const a = Ji(e, t);
4880
+ const a = Ki(e, t);
4888
4881
  return a === 0 ? e.toLocaleTimeString([], {
4889
4882
  hour: "numeric",
4890
4883
  minute: "2-digit",
@@ -4896,7 +4889,7 @@ const js = U.createContext({
4896
4889
  });
4897
4890
  }, Bs = U.memo(
4898
4891
  (e) => {
4899
- var D, O, z;
4892
+ var D, $, z;
4900
4893
  const { channel: t, unread: n } = e, {
4901
4894
  selectedChannel: a,
4902
4895
  onChannelSelect: r,
@@ -4904,7 +4897,7 @@ const js = U.createContext({
4904
4897
  channelPreview: l,
4905
4898
  renderMessagePreview: o,
4906
4899
  viewerLanguage: d
4907
- } = Ki(), { client: u } = oe(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4900
+ } = Xi(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
4908
4901
  if (l)
4909
4902
  return /* @__PURE__ */ s(
4910
4903
  l,
@@ -4916,49 +4909,49 @@ const js = U.createContext({
4916
4909
  viewerLanguage: d
4917
4910
  }
4918
4911
  );
4919
- const g = () => {
4912
+ const f = () => {
4920
4913
  t && r(t);
4921
- }, c = (y) => {
4922
- const A = y.key === "Enter" || y.key === " ", E = y.repeat;
4923
- !A || E || (y.preventDefault(), g());
4924
- }, v = Ue(
4914
+ }, b = (y) => {
4915
+ const M = y.key === "Enter" || y.key === " ", E = y.repeat;
4916
+ !M || E || (y.preventDefault(), f());
4917
+ }, c = Ue(
4925
4918
  (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
4926
4919
  u == null ? void 0 : u.userID,
4927
4920
  t == null ? void 0 : t.type
4928
- ), w = ct(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4929
- var A;
4930
- const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
4921
+ ), w = ot(c == null ? void 0 : c.user), v = ($ = c == null ? void 0 : c.user) == null ? void 0 : $.image, g = (() => {
4922
+ var M;
4923
+ const y = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
4931
4924
  if (y != null && y.length) {
4932
4925
  for (let E = y.length - 1; E >= 0; E--)
4933
4926
  if (y[E].type !== "system") return y[E];
4934
4927
  }
4935
- })(), N = (() => {
4936
- var $, F, V, Q;
4928
+ })(), _ = (() => {
4929
+ var F, O, V, Z;
4937
4930
  const y = hs({
4938
- message: f,
4931
+ message: g,
4939
4932
  viewerLanguage: d
4940
4933
  });
4941
- if ((($ = f == null ? void 0 : f.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4942
- if (((F = f == null ? void 0 : f.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4943
- if (((V = f == null ? void 0 : f.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
4934
+ if (((F = g == null ? void 0 : g.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4935
+ if (((O = g == null ? void 0 : g.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4936
+ if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
4944
4937
  return y ? `📎 ${y}` : "📎 Sent an attachment";
4945
4938
  if (y) return y;
4946
- const I = (Q = f == null ? void 0 : f.attachments) == null ? void 0 : Q[0];
4947
- return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4948
- })(), S = f != null && f.created_at ? Zi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, L = n ?? 0;
4939
+ const T = (Z = g == null ? void 0 : g.attachments) == null ? void 0 : Z[0];
4940
+ return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4941
+ })(), A = g != null && g.created_at ? Ji(new Date(g.created_at)) : "", S = g ? Fe(g) : !1, I = o ? o(g, _) : `${S ? "✨ " : ""}${_}`, L = n ?? 0;
4949
4942
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4950
4943
  channelId: t == null ? void 0 : t.id,
4951
4944
  isSelected: p,
4952
4945
  participantName: w,
4953
4946
  unreadCount: L,
4954
- hasTimestamp: !!S
4947
+ hasTimestamp: !!A
4955
4948
  }), /* @__PURE__ */ s(
4956
4949
  "div",
4957
4950
  {
4958
4951
  role: "button",
4959
4952
  tabIndex: 0,
4960
- onClick: g,
4961
- onKeyDown: c,
4953
+ onClick: f,
4954
+ onKeyDown: b,
4962
4955
  className: k(
4963
4956
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
4964
4957
  {
@@ -4971,9 +4964,9 @@ const js = U.createContext({
4971
4964
  /* @__PURE__ */ s(
4972
4965
  ne,
4973
4966
  {
4974
- id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || t.id || "unknown",
4967
+ id: ((z = c == null ? void 0 : c.user) == null ? void 0 : z.id) || t.id || "unknown",
4975
4968
  name: w,
4976
- image: b,
4969
+ image: v,
4977
4970
  size: 48,
4978
4971
  starred: h
4979
4972
  }
@@ -4992,10 +4985,10 @@ const js = U.createContext({
4992
4985
  ]
4993
4986
  }
4994
4987
  ),
4995
- S && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: S })
4988
+ A && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: A })
4996
4989
  ] }),
4997
4990
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
4998
- /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
4991
+ /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
4999
4992
  L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
5000
4993
  ] })
5001
4994
  ] })
@@ -5005,33 +4998,33 @@ const js = U.createContext({
5005
4998
  }
5006
4999
  );
5007
5000
  Bs.displayName = "CustomChannelPreview";
5008
- const Qi = { last_message_at: -1 }, el = U.memo(
5001
+ const Zi = { last_message_at: -1 }, Qi = U.memo(
5009
5002
  ({
5010
5003
  onChannelSelect: e,
5011
5004
  selectedChannel: t,
5012
5005
  filters: n,
5013
5006
  allowNewMessagesFromUnfilteredChannels: a = !1,
5014
5007
  channelRenderFilterFn: r,
5015
- sort: i = Qi,
5008
+ sort: i = Zi,
5016
5009
  className: l,
5017
5010
  customEmptyStateIndicator: o,
5018
- channelListPaginator: d = An,
5011
+ channelListPaginator: d = Tn,
5019
5012
  channelPreview: u,
5020
5013
  renderMessagePreview: p,
5021
5014
  viewerLanguage: h
5022
5015
  }) => {
5023
- const g = U.useRef(0);
5024
- g.current++;
5025
- const { debug: c = !1 } = lt(), v = U.useCallback(
5026
- (b) => {
5027
- for (const f of b)
5028
- Wi(f);
5029
- return r ? r(b) : b;
5016
+ const f = U.useRef(0);
5017
+ f.current++;
5018
+ const { debug: b = !1 } = it(), c = U.useCallback(
5019
+ (v) => {
5020
+ for (const g of v)
5021
+ qi(g);
5022
+ return r ? r(v) : v;
5030
5023
  },
5031
5024
  [r]
5032
5025
  );
5033
- c && console.log("📺 [ChannelList] 🔄 RENDER START", {
5034
- renderCount: g.current,
5026
+ b && console.log("📺 [ChannelList] 🔄 RENDER START", {
5027
+ renderCount: f.current,
5035
5028
  selectedChannelId: t == null ? void 0 : t.id,
5036
5029
  filters: n
5037
5030
  });
@@ -5039,7 +5032,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5039
5032
  () => ({
5040
5033
  selectedChannel: t,
5041
5034
  onChannelSelect: e,
5042
- debug: c,
5035
+ debug: b,
5043
5036
  channelPreview: u,
5044
5037
  renderMessagePreview: p,
5045
5038
  viewerLanguage: h
@@ -5047,7 +5040,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5047
5040
  [
5048
5041
  t,
5049
5042
  e,
5050
- c,
5043
+ b,
5051
5044
  u,
5052
5045
  p,
5053
5046
  h
@@ -5060,14 +5053,14 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5060
5053
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5061
5054
  l
5062
5055
  ),
5063
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
5064
- Tn,
5056
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Wi, { value: w, children: /* @__PURE__ */ s(
5057
+ In,
5065
5058
  {
5066
5059
  filters: n,
5067
5060
  sort: i,
5068
5061
  options: { limit: 30 },
5069
5062
  allowNewMessagesFromUnfilteredChannels: a,
5070
- channelRenderFilterFn: v,
5063
+ channelRenderFilterFn: c,
5071
5064
  Paginator: d,
5072
5065
  Preview: Bs,
5073
5066
  EmptyStateIndicator: o
@@ -5078,8 +5071,8 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5078
5071
  );
5079
5072
  }
5080
5073
  );
5081
- el.displayName = "ChannelList";
5082
- const tl = ({
5074
+ Qi.displayName = "ChannelList";
5075
+ const el = ({
5083
5076
  question: e,
5084
5077
  onClick: t,
5085
5078
  loading: n = !1,
@@ -5101,7 +5094,7 @@ const tl = ({
5101
5094
  ),
5102
5095
  children: e
5103
5096
  }
5104
- ), gl = ({
5097
+ ), fl = ({
5105
5098
  faqs: e,
5106
5099
  onFaqClick: t,
5107
5100
  loadingFaqId: n,
@@ -5130,7 +5123,7 @@ const tl = ({
5130
5123
  children: [
5131
5124
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5132
5125
  o.map((d) => /* @__PURE__ */ s(
5133
- tl,
5126
+ el,
5134
5127
  {
5135
5128
  question: d.question,
5136
5129
  onClick: () => t(d.id),
@@ -5145,39 +5138,39 @@ const tl = ({
5145
5138
  };
5146
5139
  export {
5147
5140
  bs as A,
5148
- hl as B,
5149
- Gi as C,
5150
- Br as D,
5151
- xa as E,
5152
- gl as F,
5153
- sa as G,
5141
+ ml as B,
5142
+ Vi as C,
5143
+ jr as D,
5144
+ va as E,
5145
+ fl as F,
5146
+ ta as G,
5154
5147
  es as L,
5155
- ul as M,
5156
- Ne as a,
5148
+ dl as M,
5149
+ _e as a,
5157
5150
  ne as b,
5158
- el as c,
5151
+ Qi as c,
5159
5152
  $s as d,
5160
- ml as e,
5161
- tl as f,
5162
- ce as g,
5153
+ ul as e,
5154
+ el as f,
5155
+ oe as g,
5163
5156
  Zt as h,
5164
- ye as i,
5165
- qr as j,
5166
- dl as k,
5167
- fl as l,
5168
- rr as m,
5169
- sr as n,
5170
- Zi as o,
5171
- ar as p,
5157
+ Ne as i,
5158
+ Wr as j,
5159
+ cl as k,
5160
+ hl as l,
5161
+ ar as m,
5162
+ tr as n,
5163
+ Ji as o,
5164
+ nr as p,
5172
5165
  hs as q,
5173
5166
  we as r,
5174
5167
  ws as s,
5175
- ia as t,
5176
- Xa as u,
5177
- wa as v,
5168
+ ra as t,
5169
+ Wa as u,
5170
+ xa as v,
5178
5171
  Ue as w,
5179
- ht as x,
5180
- ft as y,
5181
- ct as z
5172
+ mt as x,
5173
+ ht as y,
5174
+ ot as z
5182
5175
  };
5183
- //# sourceMappingURL=index-wFe1UO9t.js.map
5176
+ //# sourceMappingURL=index-CnR5N9Co.js.map