@linktr.ee/messaging-react 4.4.6 → 4.4.7-rc-1788242278

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,28 +4,28 @@ import { StreamChatService as g } from "@linktr.ee/messaging-core";
4
4
  import { LinkPreviewsManager as _, StreamChat as v } from "stream-chat";
5
5
  import { AIStates as y, Attachment as b, AttachmentPreviewList as x, Channel as S, ChannelList as C, Chat as w, DateSeparator as T, EditMessageModal as E, InfiniteScroll as D, MessageBlocked as O, MessageBounceModal as k, MessageBouncePrompt as A, MessageDeleted as j, MessageErrorIcon as M, MessageInput as N, MessageIsThreadReplyInChannelButtonIndicator as P, MessageList as F, MessageRepliesCountButton as I, MessageStatus as L, MessageText as R, MessageTimestamp as z, Poll as ee, QuotedMessagePreview as te, ReminderNotification as ne, StreamedMessageText as re, TextareaComposer as ie, Window as B, WithComponents as ae, areMessageUIPropsEqual as oe, isDateSeparatorMessage as se, isMessageBlocked as ce, isMessageBounced as le, messageHasAttachments as ue, messageHasReactions as de, useAIState as fe, useActiveAudioPlayer as pe, useChannelStateContext as me, useChatContext as he, useComponentContext as ge, useMessageComposer as _e, useMessageComposerHasSendableData as ve, useMessageContext as V, useMessageInputContext as ye, useMessageReminder as be, useStateStore as xe, useTypingContext as Se } from "stream-chat-react";
6
6
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
7
- import { MESSAGE_CUSTOM_TYPE as G, OFFICIAL_SENDER_USER_ID as K, isAgeSafetySystemType as Ce, isDmAgentSystemType as q, isOfficialChannel as we, resolveRichCardImagePresentation as Te, selectEnabledFaqs as Ee } from "@linktr.ee/messaging-taxonomy";
7
+ import { MESSAGE_CUSTOM_TYPE as G, OFFICIAL_SENDER_USER_ID as K, isAgeSafetySystemType as Ce, isDmAgentSystemType as we, isOfficialChannel as q, resolveRichCardImagePresentation as Te, selectEnabledFaqs as Ee } from "@linktr.ee/messaging-taxonomy";
8
8
  import J from "classnames";
9
- import { ArrowLeftIcon as De, ArrowUpIcon as Oe, CaretLeftIcon as ke, CaretRightIcon as Ae, ChecksIcon as je, CircleNotchIcon as Me, CurrencyDollarIcon as Y, DotsThreeIcon as X, DownloadSimpleIcon as Ne, FlagIcon as Pe, GiftIcon as Fe, MegaphoneIcon as Ie, PencilSimpleIcon as Le, PlayIcon as Re, ProhibitIcon as ze, ProhibitInsetIcon as Be, SignOutIcon as Ve, SparkleIcon as He, SpinnerGapIcon as Ue, StarIcon as We, TrashSimpleIcon as Ge, VideoCameraIcon as Ke, WarningCircleIcon as qe, XIcon as Je } from "@phosphor-icons/react";
10
- import { DefaultDropdownActionButton as Ye, MessageActions as Xe } from "stream-chat-react/experimental";
9
+ import { ArrowLeftIcon as Y, ArrowUpIcon as De, CaretLeftIcon as Oe, CaretRightIcon as ke, ChecksIcon as Ae, CircleNotchIcon as je, CurrencyDollarIcon as Me, DotsThreeIcon as X, DownloadSimpleIcon as Z, FlagIcon as Ne, GiftIcon as Pe, MegaphoneIcon as Fe, PencilSimpleIcon as Ie, PlayIcon as Le, ProhibitIcon as Re, ProhibitInsetIcon as ze, SignOutIcon as Be, SparkleIcon as Ve, SpinnerGapIcon as He, StarIcon as Ue, TrashSimpleIcon as We, VideoCameraIcon as Ge, WarningCircleIcon as Ke, XIcon as qe } from "@phosphor-icons/react";
10
+ import { DefaultDropdownActionButton as Je, MessageActions as Ye } from "stream-chat-react/experimental";
11
11
  //#region src/logging/index.tsx
12
- var Ze = {
12
+ var Xe = {
13
13
  debug: (e, ...t) => console.log(e, ...t),
14
14
  info: (e, ...t) => console.log(e, ...t),
15
15
  warn: (e, ...t) => console.warn(e, ...t),
16
16
  error: (e, ...t) => console.error(e, ...t)
17
- }, Qe = (e) => ({
18
- debug: e?.debug ?? Ze.debug,
19
- info: e?.info ?? Ze.info,
20
- warn: e?.warn ?? Ze.warn,
21
- error: e?.error ?? Ze.error
22
- }), $e = c(Ze), et = ({ logger: e, children: t }) => {
23
- let n = p(() => Qe(e), [e]);
24
- return /* @__PURE__ */ U($e.Provider, {
17
+ }, Ze = (e) => ({
18
+ debug: e?.debug ?? Xe.debug,
19
+ info: e?.info ?? Xe.info,
20
+ warn: e?.warn ?? Xe.warn,
21
+ error: e?.error ?? Xe.error
22
+ }), Qe = c(Xe), $e = ({ logger: e, children: t }) => {
23
+ let n = p(() => Ze(e), [e]);
24
+ return /* @__PURE__ */ U(Qe.Provider, {
25
25
  value: n,
26
26
  children: t
27
27
  });
28
- }, tt = () => u($e), nt = c({
28
+ }, et = () => u(Qe), tt = c({
29
29
  service: null,
30
30
  client: null,
31
31
  isConnected: !1,
@@ -34,7 +34,7 @@ var Ze = {
34
34
  capabilities: {},
35
35
  refreshConnection: async () => {},
36
36
  debug: !1
37
- }), rt = () => u(nt), it = ({ children: e, user: t, serviceConfig: n, apiKey: r, capabilities: i = {}, debug: a = !1, client: s, logger: c }) => {
37
+ }), nt = () => u(tt), rt = ({ children: e, user: t, serviceConfig: n, apiKey: r, capabilities: i = {}, debug: a = !1, client: s, logger: c }) => {
38
38
  let u = l((e, ...t) => {
39
39
  a && console.log(`🔥 [MessagingProvider] ${e}`, ...t);
40
40
  }, [a]);
@@ -102,7 +102,7 @@ var Ze = {
102
102
  apiKey: r,
103
103
  debug: A.current,
104
104
  client: F,
105
- ...t.logger || !j.current ? {} : { logger: Qe(j.current) }
105
+ ...t.logger || !j.current ? {} : { logger: Ze(j.current) }
106
106
  });
107
107
  O.current = n, p(n), u("✅ SERVICE SET", {
108
108
  renderCount: e,
@@ -237,9 +237,9 @@ var Ze = {
237
237
  renderCount: N.current,
238
238
  willRenderChat: !!F,
239
239
  contextValueReady: !!R
240
- }), /* @__PURE__ */ U(et, {
240
+ }), /* @__PURE__ */ U($e, {
241
241
  logger: c,
242
- children: /* @__PURE__ */ U(nt.Provider, {
242
+ children: /* @__PURE__ */ U(tt.Provider, {
243
243
  value: R,
244
244
  children: F ? /* @__PURE__ */ U(w, {
245
245
  client: F,
@@ -248,7 +248,7 @@ var Ze = {
248
248
  }) : e
249
249
  })
250
250
  });
251
- }, at = () => rt(), ot = (e) => {
251
+ }, it = () => nt(), at = (e) => {
252
252
  let [t, n] = h(!!e?.state?.membership?.pinned_at);
253
253
  return d(() => {
254
254
  if (!e) {
@@ -266,9 +266,9 @@ var Ze = {
266
266
  };
267
267
  //#endregion
268
268
  //#region src/utils/resolveConversationParticipant.ts
269
- function st(e, t, n) {
269
+ function ot(e, t, n) {
270
270
  let r = Object.values(e || {});
271
- if (we(n)) {
271
+ if (q(n)) {
272
272
  let e = r.find((e) => e.user?.id === K);
273
273
  if (e) return e;
274
274
  }
@@ -276,20 +276,20 @@ function st(e, t, n) {
276
276
  }
277
277
  //#endregion
278
278
  //#region src/utils/resolveParticipantDisplayName.ts
279
- var ct = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
280
- function lt(e) {
281
- return ct.test(e.trim());
279
+ var st = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
280
+ function ct(e) {
281
+ return st.test(e.trim());
282
282
  }
283
- function ut(e, t) {
283
+ function lt(e, t) {
284
284
  let n = e?.trim();
285
- return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !lt(n);
285
+ return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !ct(n);
286
286
  }
287
- function dt(e) {
288
- return ut(e?.name, e?.id) ? e.name.trim() : ut(e?.username, e?.id) ? e.username.trim() : "Unknown member";
287
+ function ut(e) {
288
+ return lt(e?.name, e?.id) ? e.name.trim() : lt(e?.username, e?.id) ? e.username.trim() : "Unknown member";
289
289
  }
290
290
  //#endregion
291
291
  //#region src/components/Avatar/getAvatarEmoji.ts
292
- var ft = [
292
+ var dt = [
293
293
  {
294
294
  emoji: "🍎",
295
295
  bgColor: "#FFD1DD"
@@ -343,7 +343,7 @@ var ft = [
343
343
  bgColor: "#D9F7E1"
344
344
  }
345
345
  ];
346
- function pt(e) {
346
+ function ft(e) {
347
347
  let t = 0;
348
348
  for (let n = 0; n < e.length; n++) {
349
349
  let r = e.charCodeAt(n);
@@ -351,19 +351,19 @@ function pt(e) {
351
351
  }
352
352
  return Math.abs(t);
353
353
  }
354
+ function pt(e) {
355
+ return dt[ft(e) % dt.length];
356
+ }
354
357
  function mt(e) {
355
- return ft[pt(e) % ft.length];
358
+ return pt(e).emoji;
356
359
  }
357
360
  function ht(e) {
358
- return mt(e).emoji;
359
- }
360
- function gt(e) {
361
- return mt(e).bgColor;
361
+ return pt(e).bgColor;
362
362
  }
363
363
  //#endregion
364
364
  //#region src/components/Avatar/index.tsx
365
- var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape: a = "squircle", dmAgentEnabled: o = !1 }) => {
366
- let s = ht(e), c = gt(e), l = n < 32 ? Math.round(n * .45) : n < 56 ? 14 : n < 120 ? 18 : 36, u = n >= 40 ? 2 : 1, d = a === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ U("div", {
365
+ var gt = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape: a = "squircle", dmAgentEnabled: o = !1 }) => {
366
+ let s = mt(e), c = ht(e), l = n < 32 ? Math.round(n * .45) : n < 56 ? 14 : n < 120 ? 18 : 36, u = n >= 40 ? 2 : 1, d = a === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ U("div", {
367
367
  "data-testid": "avatar-inner",
368
368
  className: "h-full w-full overflow-hidden",
369
369
  style: d,
@@ -396,7 +396,7 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
396
396
  "aria-hidden": "true",
397
397
  "data-testid": "avatar-star",
398
398
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
399
- children: /* @__PURE__ */ U(We, {
399
+ children: /* @__PURE__ */ U(Ue, {
400
400
  className: "size-3 text-yellow-600",
401
401
  weight: "duotone"
402
402
  })
@@ -415,8 +415,8 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
415
415
  children: f
416
416
  })]
417
417
  });
418
- }, vt = "https://linktr.ee/s/about/trust-center/report", yt = ({ channel: e, participant: t, showBlockParticipant: n = !0, enabled: r = !0, onLeaveConversation: i, onBlockParticipant: a, onDeleteConversationClick: o, onBlockParticipantClick: s, onReportParticipantClick: c, onActionComplete: l, logLabel: u = "useChannelModerationActions" }) => {
419
- let { service: f, debug: p } = rt(), m = t?.user?.id, g = !!(r && n && f && m), [_, v] = h(!1), [y, b] = h(null), [x, S] = h(!1), [C, w] = h(!1), T = g && (y?.participantId !== m || y?.service !== f);
418
+ }, _t = "https://linktr.ee/s/about/trust-center/report", vt = ({ channel: e, participant: t, showBlockParticipant: n = !0, enabled: r = !0, onLeaveConversation: i, onBlockParticipant: a, onDeleteConversationClick: o, onBlockParticipantClick: s, onReportParticipantClick: c, onActionComplete: l, logLabel: u = "useChannelModerationActions" }) => {
419
+ let { service: f, debug: p } = nt(), m = t?.user?.id, g = !!(r && n && f && m), [_, v] = h(!1), [y, b] = h(null), [x, S] = h(!1), [C, w] = h(!1), T = g && (y?.participantId !== m || y?.service !== f);
420
420
  return d(() => {
421
421
  if (!g || !f || !m) {
422
422
  v(!1), b(null);
@@ -487,16 +487,16 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
487
487
  }
488
488
  },
489
489
  handleReportUser: () => {
490
- c?.(), l?.(), window.open(vt, "_blank", "noopener,noreferrer");
490
+ c?.(), l?.(), window.open(_t, "_blank", "noopener,noreferrer");
491
491
  }
492
492
  };
493
- }, bt = ({ variant: e = "default", className: t, children: n, ...r }) => /* @__PURE__ */ U("button", {
493
+ }, yt = ({ variant: e = "default", className: t, children: n, ...r }) => /* @__PURE__ */ U("button", {
494
494
  type: "button",
495
495
  className: J("flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60", e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand", t),
496
496
  ...r,
497
497
  children: n
498
- }), xt = ({ channel: e, participant: t, showDeleteConversation: n = !0, showBlockParticipant: r = !0, showReportParticipant: i = !0, onLeaveConversation: a, onBlockParticipant: o, onDeleteConversationClick: s, onBlockParticipantClick: c, onReportParticipantClick: u, customChannelActions: p, triggerClassName: g }) => {
499
- let [_, v] = h(!1), y = m(null), b = f(), { isParticipantBlocked: x, isCheckingBlockedStatus: S, isLeaving: C, isUpdatingBlockStatus: w, handleLeaveConversation: T, handleBlockUser: E, handleUnblockUser: D, handleReportUser: O } = yt({
498
+ }), bt = ({ channel: e, participant: t, showDeleteConversation: n = !0, showBlockParticipant: r = !0, showReportParticipant: i = !0, onLeaveConversation: a, onBlockParticipant: o, onDeleteConversationClick: s, onBlockParticipantClick: c, onReportParticipantClick: u, customChannelActions: p, triggerClassName: g }) => {
499
+ let [_, v] = h(!1), y = m(null), b = f(), { isParticipantBlocked: x, isCheckingBlockedStatus: S, isLeaving: C, isUpdatingBlockStatus: w, handleLeaveConversation: T, handleBlockUser: E, handleUnblockUser: D, handleReportUser: O } = vt({
500
500
  channel: e,
501
501
  participant: t,
502
502
  showBlockParticipant: r,
@@ -540,49 +540,49 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
540
540
  children: /* @__PURE__ */ W("ul", {
541
541
  className: "flex flex-col gap-1",
542
542
  children: [
543
- n && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W(bt, {
543
+ n && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W(yt, {
544
544
  onClick: T,
545
545
  disabled: C,
546
546
  "aria-busy": C,
547
- children: [C ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Ve, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Delete Conversation" })]
547
+ children: [C ? /* @__PURE__ */ U(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Be, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Delete Conversation" })]
548
548
  }) }),
549
- r && /* @__PURE__ */ U("li", { children: S ? /* @__PURE__ */ W(bt, {
549
+ r && /* @__PURE__ */ U("li", { children: S ? /* @__PURE__ */ W(yt, {
550
550
  disabled: !0,
551
551
  "aria-busy": !0,
552
- children: [/* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ U("span", { children: "Block" })]
553
- }) : x ? /* @__PURE__ */ W(bt, {
552
+ children: [/* @__PURE__ */ U(He, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ U("span", { children: "Block" })]
553
+ }) : x ? /* @__PURE__ */ W(yt, {
554
554
  onClick: D,
555
555
  disabled: w,
556
556
  "aria-busy": w,
557
- children: [w ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Be, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Unblock" })]
558
- }) : /* @__PURE__ */ W(bt, {
557
+ children: [w ? /* @__PURE__ */ U(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(ze, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Unblock" })]
558
+ }) : /* @__PURE__ */ W(yt, {
559
559
  onClick: E,
560
560
  disabled: w,
561
561
  "aria-busy": w,
562
- children: [w ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Be, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Block" })]
562
+ children: [w ? /* @__PURE__ */ U(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(ze, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Block" })]
563
563
  }) }),
564
- i && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W(bt, {
564
+ i && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W(yt, {
565
565
  variant: "danger",
566
566
  onClick: O,
567
- children: [/* @__PURE__ */ U(Pe, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Report" })]
567
+ children: [/* @__PURE__ */ U(Ne, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Report" })]
568
568
  }) }),
569
569
  p
570
570
  ]
571
571
  })
572
572
  })]
573
573
  });
574
- }, St = "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", Ct = "CUSTOMER_PAID", wt = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ct, Tt = ({ className: e, onBack: t, showBackButton: n, showStarButton: r = !1, onLeaveConversation: i, onBlockParticipant: a, showDeleteConversation: s = !0, showBlockParticipant: c = !0, showReportParticipant: l = !0, onDeleteConversationClick: u, onBlockParticipantClick: d, onReportParticipantClick: f, customChannelActions: p, renderChannelActions: m, showChannelInfo: h = !0, onParticipantNameClick: g }) => {
575
- let { channel: _ } = me(), { client: v } = he(), y = o.useMemo(() => st(_.state?.members, v?.userID, _.type), [
574
+ }, xt = "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", St = "CUSTOMER_PAID", Ct = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === St, wt = ({ className: e, onBack: t, showBackButton: n, showStarButton: r = !1, onLeaveConversation: i, onBlockParticipant: a, showDeleteConversation: s = !0, showBlockParticipant: c = !0, showReportParticipant: l = !0, onDeleteConversationClick: u, onBlockParticipantClick: d, onReportParticipantClick: f, customChannelActions: p, renderChannelActions: m, showChannelInfo: h = !0, onParticipantNameClick: g }) => {
575
+ let { channel: _ } = me(), { client: v } = he(), y = o.useMemo(() => ot(_.state?.members, v?.userID, _.type), [
576
576
  _.state?.members,
577
577
  v?.userID,
578
578
  _.type
579
- ]), b = dt(y?.user), x = y?.user?.image, S = ot(_), C = wt(_.data?.customer_tag) && y?.is_follower === !0, w = r && S, T = C || w || !!g, E = async () => {
579
+ ]), b = ut(y?.user), x = y?.user?.image, S = at(_), C = Ct(_.data?.customer_tag) && y?.is_follower === !0, w = r && S, T = C || w || !!g, E = async () => {
580
580
  try {
581
581
  S ? await _.unpin() : await _.pin();
582
582
  } catch (e) {
583
583
  console.error("[ChannelHeaderRedesign] Failed to update pinned status:", e);
584
584
  }
585
- }, D = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(_t, {
585
+ }, D = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(gt, {
586
586
  id: y?.user?.id || _.id || "unknown",
587
587
  name: b,
588
588
  image: x,
@@ -602,7 +602,7 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
602
602
  C && /* @__PURE__ */ U("span", {
603
603
  "aria-label": "Paid customer",
604
604
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
605
- children: /* @__PURE__ */ U(Y, {
605
+ children: /* @__PURE__ */ U(Me, {
606
606
  className: "size-2.5",
607
607
  weight: "bold"
608
608
  })
@@ -612,13 +612,13 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
612
612
  children: /* @__PURE__ */ U("span", {
613
613
  "aria-label": "Starred conversation",
614
614
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
615
- children: /* @__PURE__ */ U(We, {
615
+ children: /* @__PURE__ */ U(Ue, {
616
616
  className: "size-2.5",
617
617
  weight: "fill"
618
618
  })
619
619
  })
620
620
  }),
621
- g && /* @__PURE__ */ U(Ae, {
621
+ g && /* @__PURE__ */ U(ke, {
622
622
  "aria-hidden": "true",
623
623
  className: "size-4 shrink-0 text-black/65",
624
624
  weight: "bold"
@@ -635,11 +635,11 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
635
635
  /* @__PURE__ */ U("div", {
636
636
  className: "flex items-start",
637
637
  children: n && /* @__PURE__ */ U("button", {
638
- className: J(St, "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"),
638
+ className: J(xt, "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"),
639
639
  onClick: t || (() => {}),
640
640
  type: "button",
641
641
  "aria-label": "Back to conversations",
642
- children: /* @__PURE__ */ U(De, { className: "size-5 text-black/90" })
642
+ children: /* @__PURE__ */ U(Y, { className: "size-5 text-black/90" })
643
643
  })
644
644
  }),
645
645
  /* @__PURE__ */ U("div", {
@@ -659,19 +659,19 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
659
659
  /* @__PURE__ */ W("div", {
660
660
  className: "flex items-start justify-end gap-2",
661
661
  children: [r && /* @__PURE__ */ U("button", {
662
- className: St,
662
+ className: xt,
663
663
  onClick: E,
664
664
  type: "button",
665
665
  "aria-pressed": S,
666
666
  "aria-label": S ? "Unstar conversation" : "Star conversation",
667
- children: /* @__PURE__ */ U(We, {
667
+ children: /* @__PURE__ */ U(Ue, {
668
668
  className: J("size-5", {
669
669
  "text-[#FFD60A]": S,
670
670
  "text-black/90": !S
671
671
  }),
672
672
  weight: S ? "fill" : "regular"
673
673
  })
674
- }), h && (m === void 0 ? /* @__PURE__ */ U(xt, {
674
+ }), h && (m === void 0 ? /* @__PURE__ */ U(bt, {
675
675
  channel: _,
676
676
  participant: y,
677
677
  showDeleteConversation: s,
@@ -683,228 +683,48 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
683
683
  onBlockParticipantClick: d,
684
684
  onReportParticipantClick: f,
685
685
  customChannelActions: p,
686
- triggerClassName: St
686
+ triggerClassName: xt
687
687
  }) : m)]
688
688
  })
689
689
  ]
690
690
  })
691
691
  });
692
- }, Et = (e) => /* @__PURE__ */ U(T, {
692
+ }, Tt = (e) => /* @__PURE__ */ U(T, {
693
693
  ...e,
694
694
  position: "center"
695
695
  });
696
696
  //#endregion
697
697
  //#region src/utils/getMessageDisplayText.ts
698
- function Dt(e) {
698
+ function Et(e) {
699
699
  return e?.trim().toLowerCase().split(/[-_]/)[0] || void 0;
700
700
  }
701
- function Ot({ message: e, viewerLanguage: t }) {
702
- let n = e?.text, r = Dt(t);
701
+ function Dt({ message: e, viewerLanguage: t }) {
702
+ let n = e?.text, r = Et(t);
703
703
  return r ? e?.i18n?.[`${r}_text`] ?? n : n;
704
704
  }
705
705
  //#endregion
706
- //#region src/components/MediaMessage/index.tsx
707
- function kt(e) {
708
- return e.type === "link" || !!e.og_scrape_url?.trim();
709
- }
710
- //#endregion
711
- //#region src/components/CustomMessage/context.tsx
712
- var At = { LockedAttachment: { isUnlocking: () => !1 } }, jt = c({}), Mt = jt.Provider;
713
- function Nt(e) {
714
- return u(jt)[e] ?? At[e];
715
- }
716
- //#endregion
717
- //#region src/components/CustomMessage/LockedAttachment/index.tsx
718
- var Pt = o.lazy(() => import("./Card-C7uLQbYz.js")), Ft = o.lazy(() => import("./Card-BhwBkgxI.js")), It = () => /* @__PURE__ */ U("div", {
719
- 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)]",
720
- "aria-hidden": !0
721
- }), Lt = (e) => /* @__PURE__ */ U(s, {
722
- fallback: /* @__PURE__ */ U(It, {}),
723
- children: e.contentType === "text" ? /* @__PURE__ */ U(Pt, { ...e }) : /* @__PURE__ */ U(Ft, { ...e })
724
- }), Rt = ({ size: e = 15 }) => /* @__PURE__ */ U("svg", {
725
- width: e,
726
- height: e,
727
- viewBox: "0 0 15 15",
728
- fill: "none",
729
- "aria-hidden": "true",
730
- children: /* @__PURE__ */ U("path", {
731
- d: "M12.003 9a.985.985 0 0 1-.652.934l-3.223 1.191-1.188 3.226a.995.995 0 0 1-1.867 0l-1.195-3.226L.65 9.937a.995.995 0 0 1 0-1.867l3.227-1.195 1.187-3.226a.995.995 0 0 1 1.868 0l1.195 3.226 3.226 1.187a.99.99 0 0 1 .649.938m3-5.83a.52.52 0 0 1-.344.492l-1.702.63-.627 1.703a.525.525 0 0 1-.986 0l-.63-1.704-1.704-.627a.525.525 0 0 1 0-.986l1.703-.63.627-1.704a.526.526 0 0 1 .986 0l.631 1.703 1.704.627a.52.52 0 0 1 .342.495",
732
- fill: "currentColor",
733
- fillOpacity: .55
734
- })
735
- }), zt = (e) => e.metadata?.custom_type === G.PAID, Bt = (e) => e.metadata?.custom_type === G.CHATBOT, Vt = (e) => e.metadata?.custom_type === G.ATTACHMENT, Ht = (e) => Vt(e) && e.metadata?.attachment_content_type === "text", Ut = (e) => Vt(e) && e.metadata?.attachment_content_type !== "text", Wt = (e) => zt(e) && !!e.metadata?.amount_text, Gt = ({ message: e, isMyMessage: t = !1, hasAttachment: n = !1 }) => {
736
- let r = zt(e), i = Bt(e);
737
- if (!r && !i) return null;
738
- if (r) {
739
- let t = e.metadata?.amount_text;
740
- return t ? /* @__PURE__ */ W("div", {
741
- className: "message-tag--paid inline-flex items-center gap-1 text-[12px] font-medium leading-[2] text-[#016630]",
742
- children: [/* @__PURE__ */ U(Fe, { size: 12 }), /* @__PURE__ */ W("span", { children: [
743
- "Delivered with ",
744
- t,
745
- " message"
746
- ] })]
747
- }) : null;
748
- }
749
- let a = t && n, o = a ? "Sent with AI" : "Sent by AI Assistant", s = a ? "justify-end gap-2 text-black/30" : t ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", c = /* @__PURE__ */ U("span", {
750
- className: "text-left",
751
- children: o
752
- }), l = /* @__PURE__ */ U("span", {
753
- className: "inline-flex items-center leading-none",
754
- children: /* @__PURE__ */ U(Rt, { size: a ? 12 : 15 })
755
- });
756
- return /* @__PURE__ */ U("div", {
757
- className: `inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px] ${s}`,
758
- "data-testid": "message-chatbot-indicator",
759
- children: t && !a ? /* @__PURE__ */ W(H, { children: [c, l] }) : /* @__PURE__ */ W(H, { children: [l, c] })
760
- });
761
- }, Kt = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E\") no-repeat center / 100% 100%", qt = {
762
- me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
763
- other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
764
- }, Jt = ({ side: e }) => /* @__PURE__ */ U("span", {
765
- "aria-hidden": "true",
766
- className: "pointer-events-none absolute bottom-0 z-[-1] h-[1.4375rem] w-5",
767
- style: {
768
- insetInlineEnd: e === "me" ? "calc(-1 * 0.3125rem)" : void 0,
769
- insetInlineStart: e === "other" ? "calc(-1 * 0.3125rem)" : void 0,
770
- transform: e === "other" ? "scaleX(-1)" : void 0,
771
- transformOrigin: "center",
772
- backgroundColor: qt[e],
773
- WebkitMask: Kt,
774
- mask: Kt
775
- }
776
- }), Yt = c(void 0), Xt = (e) => {
777
- let t = e.metadata?.outbound_id;
778
- return typeof t == "string" ? t : void 0;
779
- }, Zt = (e, t) => {
780
- if (!t || !e?.length) return;
781
- let n = /* @__PURE__ */ new Set(), r;
782
- for (let i of e) {
783
- let e = Xt(i);
784
- if (!e || n.has(e)) continue;
785
- n.add(e);
786
- let a = t(e);
787
- a && (r ??= {}, r[e] = {
788
- id: a.id,
789
- ...a.name === void 0 ? {} : { name: a.name }
790
- });
791
- }
792
- return r;
793
- }, Qt = (e, t) => {
794
- if (e === t) return !0;
795
- if (!e || !t) return !1;
796
- let n = Object.keys(e), r = Object.keys(t);
797
- return n.length === r.length && n.every((n) => e[n].id === t[n]?.id && e[n].name === t[n]?.name);
798
- }, $t = (e, t) => {
799
- let n = Zt(e, t), [r, i] = h(n);
800
- return Qt(r, n) ? r : (i(n), n);
801
- }, en = (e) => e.metadata?.custom_type === G.TIP, tn = ({ message: e }) => {
802
- let t = e.metadata?.amount_text;
803
- return t ? /* @__PURE__ */ W("div", {
804
- className: "message-tip-pill inline-flex items-end gap-0.5 max-w-[520px] rounded-[1.5rem] bg-[#43e660] px-4 py-3 text-white",
805
- children: [/* @__PURE__ */ U("span", {
806
- className: "flex h-5 items-center text-[20px] leading-none",
807
- "aria-hidden": "true",
808
- children: "🎁"
809
- }), /* @__PURE__ */ W("span", {
810
- className: "text-[14px] font-bold leading-[1.43] tracking-[0.28px] text-[rgba(4,4,3,0.9)]",
811
- children: [t, " tip!"]
812
- })]
813
- }) : null;
814
- }, nn = () => {
815
- let { message: e } = V("SentMessageDeliveryStatus"), { messages: t } = me("SentMessageDeliveryStatus"), n = (() => {
816
- if (t) for (let e = t.length - 1; e >= 0; --e) {
817
- let n = t[e];
818
- if (n.type !== "system" && n.type !== "ephemeral" && n.type !== "deleted") return n.id;
819
- }
820
- })();
821
- return e.id === n;
822
- }, rn = () => nn() ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(je, {
823
- weight: "bold",
824
- "aria-hidden": "true"
825
- }), /* @__PURE__ */ U("span", {
826
- "data-testid": "sent-message-delivery-status",
827
- children: "Delivered"
828
- })] }) : null, an = () => nn() ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Me, {
829
- className: "sent-message-status__spinner animate-spin",
830
- weight: "bold",
831
- "aria-hidden": "true"
832
- }), /* @__PURE__ */ U("span", {
833
- "data-testid": "sent-message-sending-status",
834
- children: "Sending"
835
- })] }) : null, on = ({ outbound: e, onOutboundClick: t }) => {
836
- let n = e.name || "Broadcast", r = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("span", {
837
- className: "sent-message-outbound-badge",
838
- "aria-hidden": "true",
839
- children: /* @__PURE__ */ U(Ie, { weight: "fill" })
840
- }), /* @__PURE__ */ U("span", {
841
- className: J("sent-message-outbound-name", { "underline [text-decoration-skip-ink:auto]": !!t }),
842
- "data-testid": "sent-message-outbound-status",
843
- children: n
844
- })] });
845
- return t ? /* @__PURE__ */ U("button", {
846
- type: "button",
847
- className: "inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-inherit [font:inherit]",
848
- "aria-label": `View broadcast ${n}`,
849
- onClick: () => t(e),
850
- children: r
851
- }) : r;
852
- }, sn = () => /* @__PURE__ */ W("span", {
853
- className: "str-chat__message-status sent-message-status--failed",
854
- children: [/* @__PURE__ */ U(qe, {
855
- weight: "bold",
856
- "aria-hidden": "true"
857
- }), /* @__PURE__ */ U("span", {
858
- "data-testid": "sent-message-failed-status",
859
- children: "Failed to send"
860
- })]
861
- }), cn = ({ onOutboundClick: e, resolvedOutbound: t }) => {
862
- let { isMyMessage: n, message: r, threadList: i } = V("SentMessageDeliveryStatus"), a = n(), o = nn();
863
- if (i) return null;
864
- if (r.status === "failed" && a && r.type !== "error") return /* @__PURE__ */ U(sn, {});
865
- if (!a) return null;
866
- let s = r.metadata?.outbound_id, c = r.status !== "sending" && r.status !== "failed" && s && t ? /* @__PURE__ */ U(on, {
867
- outbound: t,
868
- onOutboundClick: e
869
- }) : null, l = Wt(r) ? null : /* @__PURE__ */ U(L, {
870
- MessageSentStatus: rn,
871
- MessageDeliveredStatus: rn,
872
- MessageReadStatus: rn,
873
- MessageSendingStatus: en(r) ? rn : an
874
- });
875
- return c ? /* @__PURE__ */ W("span", {
876
- className: "sent-message-status-row",
877
- children: [
878
- l,
879
- l && o && /* @__PURE__ */ U("span", {
880
- className: "sent-message-outbound-separator",
881
- "aria-hidden": "true",
882
- children: "•"
883
- }),
884
- c
885
- ]
886
- }) : l;
887
- }, ln = /^([a-z][a-z0-9+.-]*):/i, un = /* @__PURE__ */ new Set([
706
+ //#region src/components/LinkAttachment/components/_shared/normalizeExternalHref.ts
707
+ var Ot = /^([a-z][a-z0-9+.-]*):/i, kt = /* @__PURE__ */ new Set([
888
708
  "http",
889
709
  "https",
890
710
  "mailto",
891
711
  "tel",
892
712
  "sms"
893
713
  ]);
894
- function dn(e) {
714
+ function At(e) {
895
715
  if (typeof e != "string") return;
896
716
  let t = e.trim();
897
717
  if (t === "") return;
898
- let n = ln.exec(t);
718
+ let n = Ot.exec(t);
899
719
  if (n) {
900
720
  let e = n[1].toLowerCase();
901
- return un.has(e) ? t : void 0;
721
+ return kt.has(e) ? t : void 0;
902
722
  }
903
723
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
904
724
  }
905
725
  //#endregion
906
726
  //#region src/components/LinkAttachment/components/_shared/CardCta.tsx
907
- var fn = {
727
+ var jt = {
908
728
  dark: {
909
729
  primary: "bg-white text-[#121110] hover:bg-white/90",
910
730
  secondary: "bg-white/15 text-white hover:bg-white/25"
@@ -913,11 +733,11 @@ var fn = {
913
733
  primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
914
734
  secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
915
735
  }
916
- }, pn = ({ variant: e, cta: t, fullWidth: n = !0, standalone: r = !1 }) => {
917
- let i = t.variant ?? "primary", a = J("inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors", n ? "w-full" : "min-w-0", !r && "mt-2", fn[e][i]), o = n ? t.label : /* @__PURE__ */ U("span", {
736
+ }, Mt = ({ variant: e, cta: t, fullWidth: n = !0, standalone: r = !1 }) => {
737
+ let i = t.variant ?? "primary", a = J("inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors", n ? "w-full" : "min-w-0", !r && "mt-2", jt[e][i]), o = n ? t.label : /* @__PURE__ */ U("span", {
918
738
  className: "min-w-0 truncate",
919
739
  children: t.label
920
- }), s = dn(t.href);
740
+ }), s = At(t.href);
921
741
  return s ? /* @__PURE__ */ U("a", {
922
742
  href: s,
923
743
  target: "_blank",
@@ -935,21 +755,21 @@ var fn = {
935
755
  className: a,
936
756
  children: o
937
757
  });
938
- }, mn = {
758
+ }, Nt = {
939
759
  dark: "text-white",
940
760
  light: "text-black/90"
941
- }, hn = "text-white/30", gn = {
761
+ }, Pt = "text-white/30", Ft = {
942
762
  dark: "text-white/55",
943
763
  light: "text-black/55"
944
- }, _n = {
764
+ }, It = {
945
765
  dark: "bg-white/25",
946
766
  light: "bg-black/15"
947
- }, vn = ({ variant: e, ctaSurface: t, chinTextColor: n, title: r, placeholderTitle: i, description: a, descriptionLines: o = 1, url: s, appIcon: c, cta: l, trailingAction: u, isLoading: d = !1 }) => {
767
+ }, Lt = ({ variant: e, ctaSurface: t, chinTextColor: n, title: r, placeholderTitle: i, description: a, descriptionLines: o = 1, url: s, appIcon: c, cta: l, trailingAction: u, isLoading: d = !1 }) => {
948
768
  let f = e === "dark", p = r ?? (f ? i : void 0) ?? "", m = p.trim() !== "", h = a != null && a.trim() !== "", g = typeof s == "string" ? s.trim() : "", _ = g !== "", v = l != null;
949
769
  if (!d && !m && !h && !_ && !v) return null;
950
- let y = J("line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", n == null && (f && !r ? hn : mn[e])), b = J("truncate text-[12px] leading-4 tracking-[0.24px]", n == null && gn[e]), x = J("text-[12px] leading-4 tracking-[0.24px]", o <= 1 && "truncate", n == null && gn[e]);
770
+ let y = J("line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", n == null && (f && !r ? Pt : Nt[e])), b = J("truncate text-[12px] leading-4 tracking-[0.24px]", n == null && Ft[e]), x = J("text-[12px] leading-4 tracking-[0.24px]", o <= 1 && "truncate", n == null && Ft[e]);
951
771
  if (d) {
952
- let t = J("animate-pulse rounded", _n[e]);
772
+ let t = J("animate-pulse rounded", It[e]);
953
773
  return /* @__PURE__ */ U("div", {
954
774
  className: "shrink-0 px-4 py-3",
955
775
  children: /* @__PURE__ */ W("div", {
@@ -1007,16 +827,16 @@ var fn = {
1007
827
  className: "shrink-0",
1008
828
  children: u
1009
829
  })]
1010
- }), l && /* @__PURE__ */ U(pn, {
830
+ }), l && /* @__PURE__ */ U(Mt, {
1011
831
  variant: t ?? e,
1012
832
  cta: l
1013
833
  })]
1014
834
  });
1015
- }, yn = "Loading link preview", bn = J("relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden", "rounded-[20px]"), xn = "flex h-[250px] flex-col", Sn = ({ variant: e, children: t, href: n, onClick: r, ariaLabel: i, rootRef: a, topRight: o, bgClassName: s, accentHex: c, fixedHeight: l = !1, busy: u = !1, "data-testid": d = "link-card" }) => {
1016
- let f = J("messaging-link-card", bn, l ? xn : "block", s ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"), n != null || r != null ? "cursor-pointer no-underline focus-ring" : null), p = u ? {
835
+ }, Rt = "Loading link preview", zt = J("relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden", "rounded-[20px]"), Bt = "flex h-[250px] flex-col", Vt = ({ variant: e, children: t, href: n, onClick: r, ariaLabel: i, rootRef: a, topRight: o, bgClassName: s, accentHex: c, fixedHeight: l = !1, busy: u = !1, "data-testid": d = "link-card" }) => {
836
+ let f = J("messaging-link-card", zt, l ? Bt : "block", s ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"), n != null || r != null ? "cursor-pointer no-underline focus-ring" : null), p = u ? {
1017
837
  role: "status",
1018
838
  "aria-busy": !0,
1019
- "aria-label": yn
839
+ "aria-label": Rt
1020
840
  } : void 0, m = c ? { "--accent": c } : void 0, h = o ? /* @__PURE__ */ U("div", {
1021
841
  "data-testid": "card-shell-top-right",
1022
842
  className: "pointer-events-auto absolute right-3 top-3 z-10",
@@ -1054,19 +874,19 @@ var fn = {
1054
874
  ...p,
1055
875
  children: [t, h]
1056
876
  });
1057
- }, Cn = {
877
+ }, Ht = {
1058
878
  dark: "bg-white/10",
1059
879
  light: "bg-black/5"
1060
- }, wn = {
880
+ }, Ut = {
1061
881
  dark: "size-16 text-white/25",
1062
882
  light: "size-16 text-black/25"
1063
- }, Tn = (e, n) => !!n && !!e && t(e) === "audio", En = (e, n) => {
883
+ }, Wt = (e, n) => !!n && !!e && t(e) === "audio", Gt = (e, n) => {
1064
884
  if (!n || !e) return !1;
1065
885
  let r = t(e);
1066
886
  return r === "video" || r === "audio";
1067
- }, Dn = "bg-[#F2F3F4]", On = ({ variant: r, thumbnailUrl: i, sourceUrl: o, title: s, mimeType: c = "image/*", topLeft: l, topRight: u, isLoading: d = !1, onImageError: f }) => {
887
+ }, Kt = "bg-[#F2F3F4]", qt = ({ variant: r, thumbnailUrl: i, sourceUrl: o, title: s, mimeType: c = "image/*", topLeft: l, topRight: u, isLoading: d = !1, onImageError: f }) => {
1068
888
  let p = t(c), m = !!o && p === "video", h = a(i);
1069
- return !d && Tn(c, o) ? /* @__PURE__ */ U("div", {
889
+ return !d && Wt(c, o) ? /* @__PURE__ */ U("div", {
1070
890
  className: "p-3",
1071
891
  children: /* @__PURE__ */ U("audio", {
1072
892
  ...e,
@@ -1083,7 +903,7 @@ var fn = {
1083
903
  children: [
1084
904
  d ? /* @__PURE__ */ U("div", {
1085
905
  "data-testid": "card-thumbnail-skeleton",
1086
- className: J("h-full w-full animate-pulse", Cn[r]),
906
+ className: J("h-full w-full animate-pulse", Ht[r]),
1087
907
  "aria-hidden": !0
1088
908
  }) : m ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("video", {
1089
909
  "data-testid": "card-thumbnail-video",
@@ -1110,9 +930,9 @@ var fn = {
1110
930
  className: "absolute inset-0 h-full w-full object-cover"
1111
931
  }) : /* @__PURE__ */ U("div", {
1112
932
  "data-testid": "card-thumbnail-placeholder",
1113
- className: J("flex h-full w-full items-center justify-center", Cn[r]),
933
+ className: J("flex h-full w-full items-center justify-center", Ht[r]),
1114
934
  children: n(c, {
1115
- className: wn[r],
935
+ className: Ut[r],
1116
936
  weight: "regular"
1117
937
  })
1118
938
  }),
@@ -1128,25 +948,25 @@ var fn = {
1128
948
  }) : null
1129
949
  ]
1130
950
  });
1131
- }, kn = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
1132
- function An(e) {
951
+ }, Jt = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
952
+ function Yt(e) {
1133
953
  let t = e.trim();
1134
954
  return t.startsWith("#") ? t : `#${t}`;
1135
955
  }
1136
956
  //#endregion
1137
957
  //#region src/components/LinkAttachment/components/_shared/useChinPalette.ts
1138
- var jn = "#FFFFFF", Mn = "#040403", Nn = {
1139
- dark: jn,
1140
- light: Mn
958
+ var Xt = "#FFFFFF", Zt = "#040403", Qt = {
959
+ dark: Xt,
960
+ light: Zt
1141
961
  };
1142
- function Pn({ variant: e, accentColor: t, status: n = "ready", layout: r = "featured", thumbnailUrl: i, mimeType: a, sourceUrl: s }) {
962
+ function $t({ variant: e, accentColor: t, status: n = "ready", layout: r = "featured", thumbnailUrl: i, mimeType: a, sourceUrl: s }) {
1143
963
  let [c, l] = o.useState(!1);
1144
964
  o.useEffect(() => {
1145
965
  l(!1);
1146
966
  }, [i]);
1147
967
  let u = o.useCallback(() => {
1148
968
  l(!0);
1149
- }, []), d = Tn(a, s), f = r === "featured" && i && !d && !c && n === "ready" && t != null && kn.test(t.trim()) ? An(t) : void 0, p = d ? Mn : Nn[e];
969
+ }, []), d = Wt(a, s), f = r === "featured" && i && !d && !c && n === "ready" && t != null && Jt.test(t.trim()) ? Yt(t) : void 0, p = d ? Zt : Qt[e];
1150
970
  return {
1151
971
  thumbnailUrl: c ? void 0 : i,
1152
972
  accentHex: f,
@@ -1158,8 +978,8 @@ function Pn({ variant: e, accentColor: t, status: n = "ready", layout: r = "feat
1158
978
  }
1159
979
  //#endregion
1160
980
  //#region src/components/LinkAttachment/components/Composer/Card.tsx
1161
- var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white transition-colors duration-150 hover:bg-[#2a2928] focus-ring", In = "relative before:absolute before:-inset-[10px] before:content-['']", Ln = ({ title: e, placeholderTitle: t, description: n, descriptionLines: r, url: i, mimeType: a, thumbnailUrl: o, sourceUrl: s, layout: c = "featured", appIcon: l, cta: u, accentColor: d, status: f = "ready", onDismiss: p, onEditClick: m, dismissLabel: h = "Dismiss attachment" }) => {
1162
- let g = c === "classic", _ = Tn(a, s), v = Pn({
981
+ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white transition-colors duration-150 hover:bg-[#2a2928] focus-ring", tn = "relative before:absolute before:-inset-[10px] before:content-['']", nn = ({ title: e, placeholderTitle: t, description: n, descriptionLines: r, url: i, mimeType: a, thumbnailUrl: o, sourceUrl: s, layout: c = "featured", appIcon: l, cta: u, accentColor: d, status: f = "ready", onDismiss: p, onEditClick: m, dismissLabel: h = "Dismiss attachment" }) => {
982
+ let g = c === "classic", _ = Wt(a, s), v = $t({
1163
983
  variant: "dark",
1164
984
  accentColor: d,
1165
985
  status: f,
@@ -1171,8 +991,8 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1171
991
  type: "button",
1172
992
  onClick: p,
1173
993
  "aria-label": h,
1174
- className: J(Fn, !_ && In),
1175
- children: /* @__PURE__ */ U(Je, {
994
+ className: J(en, !_ && tn),
995
+ children: /* @__PURE__ */ U(qe, {
1176
996
  className: "size-3",
1177
997
  weight: "bold"
1178
998
  })
@@ -1181,19 +1001,19 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1181
1001
  onClick: m,
1182
1002
  "aria-label": "Edit attachment",
1183
1003
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
1184
- children: /* @__PURE__ */ U(Le, {
1004
+ children: /* @__PURE__ */ U(Ie, {
1185
1005
  className: "size-5",
1186
1006
  weight: "regular"
1187
1007
  })
1188
1008
  }) : void 0;
1189
- return _ && !v.isLoading ? /* @__PURE__ */ U(Sn, {
1009
+ return _ && !v.isLoading ? /* @__PURE__ */ U(Vt, {
1190
1010
  variant: "dark",
1191
- bgClassName: Dn,
1011
+ bgClassName: Kt,
1192
1012
  children: /* @__PURE__ */ W("div", {
1193
1013
  className: "flex items-center gap-2 pr-3",
1194
1014
  children: [/* @__PURE__ */ U("div", {
1195
1015
  className: "min-w-0 flex-1",
1196
- children: /* @__PURE__ */ U(On, {
1016
+ children: /* @__PURE__ */ U(qt, {
1197
1017
  variant: "dark",
1198
1018
  sourceUrl: s,
1199
1019
  title: e,
@@ -1204,13 +1024,13 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1204
1024
  children: y
1205
1025
  })]
1206
1026
  })
1207
- }) : /* @__PURE__ */ W(Sn, {
1027
+ }) : /* @__PURE__ */ W(Vt, {
1208
1028
  variant: "dark",
1209
1029
  fixedHeight: !g,
1210
1030
  accentHex: v.accentHex,
1211
1031
  busy: v.isLoading,
1212
1032
  topRight: g ? y : void 0,
1213
- children: [!g && /* @__PURE__ */ U(On, {
1033
+ children: [!g && /* @__PURE__ */ U(qt, {
1214
1034
  variant: "dark",
1215
1035
  thumbnailUrl: v.thumbnailUrl,
1216
1036
  sourceUrl: s,
@@ -1219,7 +1039,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1219
1039
  topRight: y,
1220
1040
  isLoading: v.isLoading,
1221
1041
  onImageError: v.onImageError
1222
- }), /* @__PURE__ */ U(vn, {
1042
+ }), /* @__PURE__ */ U(Lt, {
1223
1043
  chinTextColor: v.chinTextColor,
1224
1044
  variant: "dark",
1225
1045
  ctaSurface: v.surface,
@@ -1234,7 +1054,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1234
1054
  isLoading: v.isLoading
1235
1055
  })]
1236
1056
  });
1237
- }, Rn = ({ accentHex: e, side: t, visible: n, children: r }) => n ? /* @__PURE__ */ W("div", {
1057
+ }, rn = ({ accentHex: e, side: t, visible: n, children: r }) => n ? /* @__PURE__ */ W("div", {
1238
1058
  className: "relative isolate w-fit",
1239
1059
  children: [r, /* @__PURE__ */ U("span", {
1240
1060
  "aria-hidden": !0,
@@ -1243,10 +1063,10 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1243
1063
  style: e ? { "--accent": e } : void 0,
1244
1064
  className: J("messaging-link-card-tail", t === "receiver" && "messaging-link-card-tail--received")
1245
1065
  })]
1246
- }) : /* @__PURE__ */ U(H, { children: r }), zn = {
1247
- Composer: Ln,
1066
+ }) : /* @__PURE__ */ U(H, { children: r }), an = {
1067
+ Composer: nn,
1248
1068
  Sent: ({ title: e, placeholderTitle: t, description: n, descriptionLines: r, url: i, mimeType: a, thumbnailUrl: o, sourceUrl: s, layout: c = "featured", appIcon: l, cta: u, accentColor: d, status: f = "ready", onClick: p, groupPosition: m = "single" }) => {
1249
- let h = En(a, s), g = dn(i), _ = u == null && g != null && !h ? g : void 0, v = u == null && !h && _ != null ? p : void 0, y = f !== "loading" && Tn(a, s), b = Pn({
1069
+ let h = Gt(a, s), g = At(i), _ = u == null && g != null && !h ? g : void 0, v = u == null && !h && _ != null ? p : void 0, y = f !== "loading" && Wt(a, s), b = $t({
1250
1070
  variant: "dark",
1251
1071
  accentColor: d,
1252
1072
  status: f,
@@ -1255,19 +1075,19 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1255
1075
  mimeType: a,
1256
1076
  sourceUrl: s
1257
1077
  });
1258
- return /* @__PURE__ */ U(Rn, {
1078
+ return /* @__PURE__ */ U(rn, {
1259
1079
  accentHex: b.accentHex,
1260
1080
  side: "sender",
1261
1081
  visible: !y && (m === "single" || m === "end"),
1262
- children: /* @__PURE__ */ W(Sn, {
1082
+ children: /* @__PURE__ */ W(Vt, {
1263
1083
  variant: "dark",
1264
1084
  href: _,
1265
1085
  onClick: v,
1266
1086
  fixedHeight: c === "featured" && !y,
1267
1087
  accentHex: b.accentHex,
1268
1088
  busy: b.isLoading,
1269
- bgClassName: y ? Dn : void 0,
1270
- children: [c === "featured" && /* @__PURE__ */ U(On, {
1089
+ bgClassName: y ? Kt : void 0,
1090
+ children: [c === "featured" && /* @__PURE__ */ U(qt, {
1271
1091
  variant: "dark",
1272
1092
  thumbnailUrl: b.thumbnailUrl,
1273
1093
  sourceUrl: s,
@@ -1275,7 +1095,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1275
1095
  mimeType: a,
1276
1096
  isLoading: b.isLoading,
1277
1097
  onImageError: b.onImageError
1278
- }), /* @__PURE__ */ U(vn, {
1098
+ }), /* @__PURE__ */ U(Lt, {
1279
1099
  chinTextColor: b.chinTextColor,
1280
1100
  variant: "dark",
1281
1101
  ctaSurface: b.surface,
@@ -1292,12 +1112,12 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1292
1112
  });
1293
1113
  },
1294
1114
  Received: ({ title: e, description: t, descriptionLines: n, url: r, mimeType: i, thumbnailUrl: a, sourceUrl: o, layout: s = "featured", appIcon: c, cta: l, accentColor: u, status: d = "ready", onClick: f, groupPosition: p = "single" }) => {
1295
- let m = En(i, o), h = dn(r), g = l == null && h != null && !m ? h : void 0, _ = l == null && !m ? f : void 0, v = d !== "loading" && Tn(i, o) ? Dn : void 0, y = l && f ? {
1115
+ let m = Gt(i, o), h = At(r), g = l == null && h != null && !m ? h : void 0, _ = l == null && !m ? f : void 0, v = d !== "loading" && Wt(i, o) ? Kt : void 0, y = l && f ? {
1296
1116
  ...l,
1297
1117
  onClick: () => {
1298
1118
  f(), l.onClick?.();
1299
1119
  }
1300
- } : l, b = Pn({
1120
+ } : l, b = $t({
1301
1121
  variant: "light",
1302
1122
  accentColor: u,
1303
1123
  status: d,
@@ -1306,11 +1126,11 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1306
1126
  mimeType: i,
1307
1127
  sourceUrl: o
1308
1128
  });
1309
- return /* @__PURE__ */ U(Rn, {
1129
+ return /* @__PURE__ */ U(rn, {
1310
1130
  accentHex: b.accentHex,
1311
1131
  side: "receiver",
1312
1132
  visible: v == null && (p === "single" || p === "end"),
1313
- children: /* @__PURE__ */ W(Sn, {
1133
+ children: /* @__PURE__ */ W(Vt, {
1314
1134
  variant: "light",
1315
1135
  href: g,
1316
1136
  onClick: _,
@@ -1320,7 +1140,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1320
1140
  busy: b.isLoading,
1321
1141
  bgClassName: v,
1322
1142
  "data-testid": "link-attachment",
1323
- children: [s === "featured" && /* @__PURE__ */ U(On, {
1143
+ children: [s === "featured" && /* @__PURE__ */ U(qt, {
1324
1144
  variant: "light",
1325
1145
  thumbnailUrl: b.thumbnailUrl,
1326
1146
  sourceUrl: o,
@@ -1328,7 +1148,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1328
1148
  mimeType: i,
1329
1149
  isLoading: b.isLoading,
1330
1150
  onImageError: b.onImageError
1331
- }), /* @__PURE__ */ U(vn, {
1151
+ }), /* @__PURE__ */ U(Lt, {
1332
1152
  chinTextColor: b.chinTextColor,
1333
1153
  variant: "light",
1334
1154
  ctaSurface: b.surface,
@@ -1343,16 +1163,199 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1343
1163
  })
1344
1164
  });
1345
1165
  }
1346
- }, Bn = {
1166
+ };
1167
+ //#endregion
1168
+ //#region src/components/MediaMessage/index.tsx
1169
+ function on(e) {
1170
+ return e.type === "link" || !!e.og_scrape_url?.trim();
1171
+ }
1172
+ //#endregion
1173
+ //#region src/components/CustomMessage/context.tsx
1174
+ var sn = { LockedAttachment: { isUnlocking: () => !1 } }, cn = c({}), ln = cn.Provider;
1175
+ function un(e) {
1176
+ return u(cn)[e] ?? sn[e];
1177
+ }
1178
+ //#endregion
1179
+ //#region src/components/CustomMessage/LockedAttachment/index.tsx
1180
+ var dn = o.lazy(() => import("./Card-C7uLQbYz.js")), fn = o.lazy(() => import("./Card-BhwBkgxI.js")), pn = () => /* @__PURE__ */ U("div", {
1181
+ 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)]",
1182
+ "aria-hidden": !0
1183
+ }), mn = (e) => /* @__PURE__ */ U(s, {
1184
+ fallback: /* @__PURE__ */ U(pn, {}),
1185
+ children: e.contentType === "text" ? /* @__PURE__ */ U(dn, { ...e }) : /* @__PURE__ */ U(fn, { ...e })
1186
+ }), hn = ({ size: e = 15 }) => /* @__PURE__ */ U("svg", {
1187
+ width: e,
1188
+ height: e,
1189
+ viewBox: "0 0 15 15",
1190
+ fill: "none",
1191
+ "aria-hidden": "true",
1192
+ children: /* @__PURE__ */ U("path", {
1193
+ d: "M12.003 9a.985.985 0 0 1-.652.934l-3.223 1.191-1.188 3.226a.995.995 0 0 1-1.867 0l-1.195-3.226L.65 9.937a.995.995 0 0 1 0-1.867l3.227-1.195 1.187-3.226a.995.995 0 0 1 1.868 0l1.195 3.226 3.226 1.187a.99.99 0 0 1 .649.938m3-5.83a.52.52 0 0 1-.344.492l-1.702.63-.627 1.703a.525.525 0 0 1-.986 0l-.63-1.704-1.704-.627a.525.525 0 0 1 0-.986l1.703-.63.627-1.704a.526.526 0 0 1 .986 0l.631 1.703 1.704.627a.52.52 0 0 1 .342.495",
1194
+ fill: "currentColor",
1195
+ fillOpacity: .55
1196
+ })
1197
+ }), gn = (e) => e.metadata?.custom_type === G.PAID, _n = (e) => e.metadata?.custom_type === G.CHATBOT, vn = (e) => e.metadata?.custom_type === G.ATTACHMENT, yn = (e) => vn(e) && e.metadata?.attachment_content_type === "text", bn = (e) => vn(e) && e.metadata?.attachment_content_type !== "text", xn = (e) => gn(e) && !!e.metadata?.amount_text, Sn = ({ message: e, isMyMessage: t = !1, hasAttachment: n = !1 }) => {
1198
+ let r = gn(e), i = _n(e);
1199
+ if (!r && !i) return null;
1200
+ if (r) {
1201
+ let t = e.metadata?.amount_text;
1202
+ return t ? /* @__PURE__ */ W("div", {
1203
+ className: "message-tag--paid inline-flex items-center gap-1 text-[12px] font-medium leading-[2] text-[#016630]",
1204
+ children: [/* @__PURE__ */ U(Pe, { size: 12 }), /* @__PURE__ */ W("span", { children: [
1205
+ "Delivered with ",
1206
+ t,
1207
+ " message"
1208
+ ] })]
1209
+ }) : null;
1210
+ }
1211
+ let a = t && n, o = a ? "Sent with AI" : "Sent by AI Assistant", s = a ? "justify-end gap-2 text-black/30" : t ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", c = /* @__PURE__ */ U("span", {
1212
+ className: "text-left",
1213
+ children: o
1214
+ }), l = /* @__PURE__ */ U("span", {
1215
+ className: "inline-flex items-center leading-none",
1216
+ children: /* @__PURE__ */ U(hn, { size: a ? 12 : 15 })
1217
+ });
1218
+ return /* @__PURE__ */ U("div", {
1219
+ className: `inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px] ${s}`,
1220
+ "data-testid": "message-chatbot-indicator",
1221
+ children: t && !a ? /* @__PURE__ */ W(H, { children: [c, l] }) : /* @__PURE__ */ W(H, { children: [l, c] })
1222
+ });
1223
+ }, Cn = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E\") no-repeat center / 100% 100%", wn = {
1224
+ me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
1225
+ other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
1226
+ }, Tn = ({ side: e }) => /* @__PURE__ */ U("span", {
1227
+ "aria-hidden": "true",
1228
+ className: "pointer-events-none absolute bottom-0 z-[-1] h-[1.4375rem] w-5",
1229
+ style: {
1230
+ insetInlineEnd: e === "me" ? "calc(-1 * 0.3125rem)" : void 0,
1231
+ insetInlineStart: e === "other" ? "calc(-1 * 0.3125rem)" : void 0,
1232
+ transform: e === "other" ? "scaleX(-1)" : void 0,
1233
+ transformOrigin: "center",
1234
+ backgroundColor: wn[e],
1235
+ WebkitMask: Cn,
1236
+ mask: Cn
1237
+ }
1238
+ }), En = c(void 0), Dn = (e) => {
1239
+ let t = e.metadata?.outbound_id;
1240
+ return typeof t == "string" ? t : void 0;
1241
+ }, On = (e, t) => {
1242
+ if (!t || !e?.length) return;
1243
+ let n = /* @__PURE__ */ new Set(), r;
1244
+ for (let i of e) {
1245
+ let e = Dn(i);
1246
+ if (!e || n.has(e)) continue;
1247
+ n.add(e);
1248
+ let a = t(e);
1249
+ a && (r ??= {}, r[e] = {
1250
+ id: a.id,
1251
+ ...a.name === void 0 ? {} : { name: a.name }
1252
+ });
1253
+ }
1254
+ return r;
1255
+ }, kn = (e, t) => {
1256
+ if (e === t) return !0;
1257
+ if (!e || !t) return !1;
1258
+ let n = Object.keys(e), r = Object.keys(t);
1259
+ return n.length === r.length && n.every((n) => e[n].id === t[n]?.id && e[n].name === t[n]?.name);
1260
+ }, An = (e, t) => {
1261
+ let n = On(e, t), [r, i] = h(n);
1262
+ return kn(r, n) ? r : (i(n), n);
1263
+ }, jn = (e) => e.metadata?.custom_type === G.TIP, Mn = ({ message: e }) => {
1264
+ let t = e.metadata?.amount_text;
1265
+ return t ? /* @__PURE__ */ W("div", {
1266
+ className: "message-tip-pill inline-flex items-end gap-0.5 max-w-[520px] rounded-[1.5rem] bg-[#43e660] px-4 py-3 text-white",
1267
+ children: [/* @__PURE__ */ U("span", {
1268
+ className: "flex h-5 items-center text-[20px] leading-none",
1269
+ "aria-hidden": "true",
1270
+ children: "🎁"
1271
+ }), /* @__PURE__ */ W("span", {
1272
+ className: "text-[14px] font-bold leading-[1.43] tracking-[0.28px] text-[rgba(4,4,3,0.9)]",
1273
+ children: [t, " tip!"]
1274
+ })]
1275
+ }) : null;
1276
+ }, Nn = () => {
1277
+ let { message: e } = V("SentMessageDeliveryStatus"), { messages: t } = me("SentMessageDeliveryStatus"), n = (() => {
1278
+ if (t) for (let e = t.length - 1; e >= 0; --e) {
1279
+ let n = t[e];
1280
+ if (n.type !== "system" && n.type !== "ephemeral" && n.type !== "deleted") return n.id;
1281
+ }
1282
+ })();
1283
+ return e.id === n;
1284
+ }, Pn = () => Nn() ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Ae, {
1285
+ weight: "bold",
1286
+ "aria-hidden": "true"
1287
+ }), /* @__PURE__ */ U("span", {
1288
+ "data-testid": "sent-message-delivery-status",
1289
+ children: "Delivered"
1290
+ })] }) : null, Fn = () => Nn() ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(je, {
1291
+ className: "sent-message-status__spinner animate-spin",
1292
+ weight: "bold",
1293
+ "aria-hidden": "true"
1294
+ }), /* @__PURE__ */ U("span", {
1295
+ "data-testid": "sent-message-sending-status",
1296
+ children: "Sending"
1297
+ })] }) : null, In = ({ outbound: e, onOutboundClick: t }) => {
1298
+ let n = e.name || "Broadcast", r = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("span", {
1299
+ className: "sent-message-outbound-badge",
1300
+ "aria-hidden": "true",
1301
+ children: /* @__PURE__ */ U(Fe, { weight: "fill" })
1302
+ }), /* @__PURE__ */ U("span", {
1303
+ className: J("sent-message-outbound-name", { "underline [text-decoration-skip-ink:auto]": !!t }),
1304
+ "data-testid": "sent-message-outbound-status",
1305
+ children: n
1306
+ })] });
1307
+ return t ? /* @__PURE__ */ U("button", {
1308
+ type: "button",
1309
+ className: "inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-inherit [font:inherit]",
1310
+ "aria-label": `View broadcast ${n}`,
1311
+ onClick: () => t(e),
1312
+ children: r
1313
+ }) : r;
1314
+ }, Ln = () => /* @__PURE__ */ W("span", {
1315
+ className: "str-chat__message-status sent-message-status--failed",
1316
+ children: [/* @__PURE__ */ U(Ke, {
1317
+ weight: "bold",
1318
+ "aria-hidden": "true"
1319
+ }), /* @__PURE__ */ U("span", {
1320
+ "data-testid": "sent-message-failed-status",
1321
+ children: "Failed to send"
1322
+ })]
1323
+ }), Rn = ({ onOutboundClick: e, resolvedOutbound: t }) => {
1324
+ let { isMyMessage: n, message: r, threadList: i } = V("SentMessageDeliveryStatus"), a = n(), o = Nn();
1325
+ if (i) return null;
1326
+ if (r.status === "failed" && a && r.type !== "error") return /* @__PURE__ */ U(Ln, {});
1327
+ if (!a) return null;
1328
+ let s = r.metadata?.outbound_id, c = r.status !== "sending" && r.status !== "failed" && s && t ? /* @__PURE__ */ U(In, {
1329
+ outbound: t,
1330
+ onOutboundClick: e
1331
+ }) : null, l = xn(r) ? null : /* @__PURE__ */ U(L, {
1332
+ MessageSentStatus: Pn,
1333
+ MessageDeliveredStatus: Pn,
1334
+ MessageReadStatus: Pn,
1335
+ MessageSendingStatus: jn(r) ? Pn : Fn
1336
+ });
1337
+ return c ? /* @__PURE__ */ W("span", {
1338
+ className: "sent-message-status-row",
1339
+ children: [
1340
+ l,
1341
+ l && o && /* @__PURE__ */ U("span", {
1342
+ className: "sent-message-outbound-separator",
1343
+ "aria-hidden": "true",
1344
+ children: "•"
1345
+ }),
1346
+ c
1347
+ ]
1348
+ }) : l;
1349
+ }, zn = {
1347
1350
  dark: "bg-[#1e2330]",
1348
1351
  light: "bg-[#f2f1ef]"
1349
- }, Vn = {
1352
+ }, Bn = {
1350
1353
  dark: "text-white",
1351
1354
  light: "text-[#000000]"
1352
- }, Hn = {
1355
+ }, Vn = {
1353
1356
  dark: "border-white/[0.08]",
1354
1357
  light: "border-black/[0.08]"
1355
- }, Un = (e) => e === "dark" ? "sender" : "receiver", Wn = {
1358
+ }, Hn = (e) => e === "dark" ? "sender" : "receiver", Un = {
1356
1359
  sender: {
1357
1360
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1358
1361
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1365,33 +1368,33 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1365
1368
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
1366
1369
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
1367
1370
  }
1368
- }, Gn = ({ variant: e, text: t, bordered: n = !0, groupPosition: r = "single", widthClassName: i = "w-[280px]", paddingClassName: a = "px-2 py-2", radiusClassName: o, className: s, children: c, "data-testid": l }) => {
1369
- let u = t != null && t !== "", d = o ?? Wn[Un(e)][r];
1371
+ }, Wn = ({ variant: e, text: t, bordered: n = !0, groupPosition: r = "single", widthClassName: i = "w-[280px]", paddingClassName: a = "px-2 py-2", radiusClassName: o, className: s, children: c, "data-testid": l }) => {
1372
+ let u = t != null && t !== "", d = o ?? Un[Hn(e)][r];
1370
1373
  return /* @__PURE__ */ W("div", {
1371
1374
  "data-testid": l,
1372
1375
  "data-group-position": r,
1373
- className: J("relative", i, "overflow-hidden", a, u && "pb-0", d, Bn[e], Vn[e], n && "border", n && Hn[e], s),
1376
+ className: J("relative", i, "overflow-hidden", a, u && "pb-0", d, zn[e], Bn[e], n && "border", n && Vn[e], s),
1374
1377
  children: [c, u ? /* @__PURE__ */ U("p", {
1375
1378
  className: J("whitespace-pre-wrap break-words leading-snug hyphens-manual", "pb-2 pt-2", "px-2"),
1376
1379
  children: t
1377
1380
  }) : null]
1378
1381
  });
1379
- }, Kn = ({ onClick: e, variant: t = "overlay", ariaLabel: n = "Dismiss attachment" }) => /* @__PURE__ */ U("button", {
1382
+ }, Gn = ({ onClick: e, variant: t = "overlay", ariaLabel: n = "Dismiss attachment" }) => /* @__PURE__ */ U("button", {
1380
1383
  type: "button",
1381
1384
  onClick: (t) => {
1382
1385
  t.stopPropagation(), e();
1383
1386
  },
1384
1387
  "aria-label": n,
1385
1388
  className: J("flex size-6 items-center justify-center rounded-full text-white", t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"),
1386
- children: /* @__PURE__ */ U(Je, {
1389
+ children: /* @__PURE__ */ U(qe, {
1387
1390
  className: "size-3",
1388
1391
  weight: "bold"
1389
1392
  })
1390
- }), qn = (e) => e === "received" ? "light" : "dark", Jn = ({ firstOfGroup: e, endOfGroup: t, groupedByUser: n }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Yn = ({ src: e, mimeType: t, filename: n, items: r }) => r && r.length > 0 ? r : e ? [{
1393
+ }), Kn = (e) => e === "received" ? "light" : "dark", qn = ({ firstOfGroup: e, endOfGroup: t, groupedByUser: n }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Jn = ({ src: e, mimeType: t, filename: n, items: r }) => r && r.length > 0 ? r : e ? [{
1391
1394
  src: e,
1392
1395
  mimeType: t,
1393
1396
  filename: n
1394
- }] : [], Xn = ({ item: t, preload: n, trailingAction: r }) => /* @__PURE__ */ W("div", {
1397
+ }] : [], Yn = ({ item: t, preload: n, trailingAction: r }) => /* @__PURE__ */ W("div", {
1395
1398
  className: "flex items-center gap-2",
1396
1399
  children: [/* @__PURE__ */ U("audio", {
1397
1400
  ...e,
@@ -1404,8 +1407,8 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1404
1407
  type: t.mimeType
1405
1408
  }) : null
1406
1409
  }), r ?? null]
1407
- }), Zn = ({ state: e, src: t, mimeType: n, filename: r, items: i, text: a, groupPosition: o, preload: s, onDismiss: c }) => {
1408
- let l = qn(e), u = e === "composer" && !!c, d = Yn({
1410
+ }), Xn = ({ state: e, src: t, mimeType: n, filename: r, items: i, text: a, groupPosition: o, preload: s, onDismiss: c }) => {
1411
+ let l = Kn(e), u = e === "composer" && !!c, d = Jn({
1409
1412
  src: t,
1410
1413
  mimeType: n,
1411
1414
  filename: r,
@@ -1413,43 +1416,43 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1413
1416
  });
1414
1417
  if (d.length === 0) return null;
1415
1418
  let f = s ?? (d.length > 1 ? "none" : "metadata");
1416
- return /* @__PURE__ */ U(Gn, {
1419
+ return /* @__PURE__ */ U(Wn, {
1417
1420
  variant: l,
1418
1421
  text: a,
1419
1422
  groupPosition: o,
1420
1423
  "data-testid": "audio-attachment",
1421
1424
  children: /* @__PURE__ */ U("div", {
1422
1425
  className: "flex flex-col gap-2",
1423
- children: d.map((e, t) => /* @__PURE__ */ U(Xn, {
1426
+ children: d.map((e, t) => /* @__PURE__ */ U(Yn, {
1424
1427
  item: e,
1425
1428
  preload: f,
1426
- trailingAction: u && t === 0 ? /* @__PURE__ */ U(Kn, {
1429
+ trailingAction: u && t === 0 ? /* @__PURE__ */ U(Gn, {
1427
1430
  onClick: c,
1428
1431
  variant: "inline"
1429
1432
  }) : void 0
1430
1433
  }, `${e.src}-${t}`))
1431
1434
  })
1432
1435
  });
1433
- }, Qn = {
1434
- Composer: (e) => /* @__PURE__ */ U(Zn, {
1436
+ }, Zn = {
1437
+ Composer: (e) => /* @__PURE__ */ U(Xn, {
1435
1438
  ...e,
1436
1439
  state: "composer"
1437
1440
  }),
1438
- Sent: (e) => /* @__PURE__ */ U(Zn, {
1441
+ Sent: (e) => /* @__PURE__ */ U(Xn, {
1439
1442
  ...e,
1440
1443
  state: "sent"
1441
1444
  }),
1442
- Received: (e) => /* @__PURE__ */ U(Zn, {
1445
+ Received: (e) => /* @__PURE__ */ U(Xn, {
1443
1446
  ...e,
1444
1447
  state: "received"
1445
1448
  })
1446
1449
  };
1447
1450
  //#endregion
1448
1451
  //#region src/components/MessageAttachment/_shared/fileMeta.ts
1449
- function $n(e) {
1452
+ function Qn(e) {
1450
1453
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : e < 1073741824 ? `${(e / 1048576).toFixed(2)} MB` : `${(e / 1073741824).toFixed(2)} GB`;
1451
1454
  }
1452
- var er = {
1455
+ var $n = {
1453
1456
  pdf: "PDF",
1454
1457
  doc: "DOC",
1455
1458
  xls: "XLS",
@@ -1459,7 +1462,7 @@ var er = {
1459
1462
  text: "TXT",
1460
1463
  markdown: "MD"
1461
1464
  };
1462
- function tr(e, n) {
1465
+ function er(e, n) {
1463
1466
  if (n) {
1464
1467
  let e = n.lastIndexOf(".");
1465
1468
  if (e > 0 && e < n.length - 1) {
@@ -1469,17 +1472,17 @@ function tr(e, n) {
1469
1472
  }
1470
1473
  if (!e) return;
1471
1474
  if (t(e) === "document") {
1472
- let t = er[i(e)];
1475
+ let t = $n[i(e)];
1473
1476
  if (t) return t;
1474
1477
  if (e === "application/octet-stream") return;
1475
1478
  }
1476
1479
  let r = e.split("/")[1];
1477
1480
  if (!(!r || r === "*")) return r.toUpperCase();
1478
1481
  }
1479
- function nr(e, t, n) {
1480
- return [tr(e, t), typeof n == "number" && n > 0 ? $n(n) : void 0].filter(Boolean).join(" · ") || void 0;
1482
+ function tr(e, t, n) {
1483
+ return [er(e, t), typeof n == "number" && n > 0 ? Qn(n) : void 0].filter(Boolean).join(" · ") || void 0;
1481
1484
  }
1482
- function Z(e) {
1485
+ function Q(e) {
1483
1486
  try {
1484
1487
  let t = new URL(e).pathname.split("/").pop();
1485
1488
  return t && t.length > 0 ? decodeURIComponent(t) : "download";
@@ -1489,21 +1492,21 @@ function Z(e) {
1489
1492
  }
1490
1493
  //#endregion
1491
1494
  //#region src/components/MessageAttachment/_shared/CompactDocumentRow.tsx
1492
- var rr = {
1495
+ var nr = {
1493
1496
  dark: "text-white/55",
1494
1497
  light: "text-black/65"
1495
- }, ir = {
1498
+ }, rr = {
1496
1499
  dark: "bg-white/10",
1497
1500
  light: "bg-black/5"
1498
- }, ar = {
1501
+ }, ir = {
1499
1502
  dark: "text-white/85",
1500
1503
  light: "text-black/85"
1501
- }, or = ({ variant: e, filename: t, title: r, mimeType: i = "application/octet-stream", fileSize: a, onActivate: o, activateLabel: s, trailingAction: c }) => {
1502
- let l = r ?? t ?? "File", u = nr(i, t, a), d = /* @__PURE__ */ U("div", {
1503
- className: J("flex size-10 shrink-0 items-center justify-center rounded-sm", ir[e]),
1504
+ }, ar = ({ variant: e, filename: t, title: r, mimeType: i = "application/octet-stream", fileSize: a, onActivate: o, activateLabel: s, trailingAction: c }) => {
1505
+ let l = r ?? t ?? "File", u = tr(i, t, a), d = /* @__PURE__ */ U("div", {
1506
+ className: J("flex size-10 shrink-0 items-center justify-center rounded-sm", rr[e]),
1504
1507
  "aria-hidden": !0,
1505
1508
  children: n(i, {
1506
- className: J("size-6", ar[e]),
1509
+ className: J("size-6", ir[e]),
1507
1510
  weight: "regular"
1508
1511
  })
1509
1512
  }), f = /* @__PURE__ */ W("div", {
@@ -1512,7 +1515,7 @@ var rr = {
1512
1515
  className: "truncate font-medium leading-snug",
1513
1516
  children: l
1514
1517
  }), u ? /* @__PURE__ */ U("p", {
1515
- className: J("truncate text-xs leading-4", rr[e]),
1518
+ className: J("truncate text-xs leading-4", nr[e]),
1516
1519
  children: u
1517
1520
  }) : null]
1518
1521
  }), p = o ? /* @__PURE__ */ W("button", {
@@ -1532,8 +1535,8 @@ var rr = {
1532
1535
  };
1533
1536
  //#endregion
1534
1537
  //#region src/components/MessageAttachment/_shared/triggerDownload.ts
1535
- async function sr(e, t) {
1536
- let n = t ?? Z(e);
1538
+ async function or(e, t) {
1539
+ let n = t ?? Q(e);
1537
1540
  try {
1538
1541
  let t = await fetch(e, { mode: "cors" });
1539
1542
  if (!t.ok) throw Error(`HTTP ${t.status}`);
@@ -1548,15 +1551,15 @@ async function sr(e, t) {
1548
1551
  }
1549
1552
  //#endregion
1550
1553
  //#region src/components/MessageAttachment/File/index.tsx
1551
- var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a }) => a && a.length > 0 ? a : e ? [{
1554
+ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a }) => a && a.length > 0 ? a : e ? [{
1552
1555
  src: e,
1553
1556
  filename: t,
1554
1557
  fileSize: n,
1555
1558
  mimeType: r,
1556
1559
  title: i
1557
- }] : [], lr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
1558
- let a = t.filename ?? Z(t.src);
1559
- return /* @__PURE__ */ U(or, {
1560
+ }] : [], cr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
1561
+ let a = t.filename ?? Q(t.src);
1562
+ return /* @__PURE__ */ U(ar, {
1560
1563
  variant: e,
1561
1564
  filename: a,
1562
1565
  title: t.title,
@@ -1566,8 +1569,8 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1566
1569
  activateLabel: `Download ${a}`,
1567
1570
  trailingAction: i
1568
1571
  });
1569
- }, ur = ({ state: e, src: t, filename: n, fileSize: r, mimeType: i, title: a, items: o, text: s, groupPosition: c, onClick: l, onDismiss: u }) => {
1570
- let d = qn(e), f = e === "composer" && !!u, p = cr({
1572
+ }, lr = ({ state: e, src: t, filename: n, fileSize: r, mimeType: i, title: a, items: o, text: s, groupPosition: c, onClick: l, onDismiss: u }) => {
1573
+ let d = Kn(e), f = e === "composer" && !!u, p = sr({
1571
1574
  src: t,
1572
1575
  filename: n,
1573
1576
  fileSize: r,
@@ -1578,56 +1581,56 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1578
1581
  if (l?.(e) === !1) return;
1579
1582
  let t = p[e];
1580
1583
  if (!t) return;
1581
- let n = t.filename ?? Z(t.src);
1582
- sr(t.src, n);
1584
+ let n = t.filename ?? Q(t.src);
1585
+ or(t.src, n);
1583
1586
  };
1584
1587
  if (p.length === 0) return null;
1585
1588
  let h = /* @__PURE__ */ U("span", {
1586
1589
  className: J("flex size-8 items-center justify-center rounded-full", d === "dark" ? "text-white/70" : "text-black/70"),
1587
1590
  "aria-hidden": !0,
1588
- children: /* @__PURE__ */ U(Ne, {
1591
+ children: /* @__PURE__ */ U(Z, {
1589
1592
  className: "size-5",
1590
1593
  weight: "bold"
1591
1594
  })
1592
1595
  });
1593
- return /* @__PURE__ */ U(Gn, {
1596
+ return /* @__PURE__ */ U(Wn, {
1594
1597
  variant: d,
1595
1598
  text: s,
1596
1599
  groupPosition: c,
1597
1600
  "data-testid": "file-attachment",
1598
1601
  children: /* @__PURE__ */ U("div", {
1599
1602
  className: "flex flex-col gap-2",
1600
- children: p.map((e, t) => /* @__PURE__ */ U(lr, {
1603
+ children: p.map((e, t) => /* @__PURE__ */ U(cr, {
1601
1604
  variant: d,
1602
1605
  item: e,
1603
1606
  index: t,
1604
1607
  onActivate: m,
1605
- trailingAction: f && t === 0 ? /* @__PURE__ */ U(Kn, {
1608
+ trailingAction: f && t === 0 ? /* @__PURE__ */ U(Gn, {
1606
1609
  onClick: u,
1607
1610
  variant: "inline"
1608
1611
  }) : h
1609
1612
  }, `${e.src}-${t}`))
1610
1613
  })
1611
1614
  });
1612
- }, dr = {
1613
- Composer: (e) => /* @__PURE__ */ U(ur, {
1615
+ }, ur = {
1616
+ Composer: (e) => /* @__PURE__ */ U(lr, {
1614
1617
  ...e,
1615
1618
  state: "composer"
1616
1619
  }),
1617
- Sent: (e) => /* @__PURE__ */ U(ur, {
1620
+ Sent: (e) => /* @__PURE__ */ U(lr, {
1618
1621
  ...e,
1619
1622
  state: "sent"
1620
1623
  }),
1621
- Received: (e) => /* @__PURE__ */ U(ur, {
1624
+ Received: (e) => /* @__PURE__ */ U(lr, {
1622
1625
  ...e,
1623
1626
  state: "received"
1624
1627
  })
1625
- }, fr = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", pr = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", mr = ({ onPrev: e, onNext: t, prevLabel: n = "Previous", nextLabel: r = "Next" }) => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("button", {
1628
+ }, dr = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", fr = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", pr = ({ onPrev: e, onNext: t, prevLabel: n = "Previous", nextLabel: r = "Next" }) => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("button", {
1626
1629
  type: "button",
1627
1630
  onClick: e,
1628
1631
  "aria-label": n,
1629
- className: `${pr} left-4`,
1630
- children: /* @__PURE__ */ U(ke, {
1632
+ className: `${fr} left-4`,
1633
+ children: /* @__PURE__ */ U(Oe, {
1631
1634
  size: 20,
1632
1635
  weight: "bold",
1633
1636
  "aria-hidden": !0
@@ -1636,15 +1639,15 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1636
1639
  type: "button",
1637
1640
  onClick: t,
1638
1641
  "aria-label": r,
1639
- className: `${pr} right-4`,
1640
- children: /* @__PURE__ */ U(Ae, {
1642
+ className: `${fr} right-4`,
1643
+ children: /* @__PURE__ */ U(ke, {
1641
1644
  size: 20,
1642
1645
  weight: "bold",
1643
1646
  "aria-hidden": !0
1644
1647
  })
1645
- })] }), hr = ({ url: e, filename: t, variant: n = "pill", label: r = "Download", iconOnly: i, tone: a = "dark", onTriggered: o }) => {
1648
+ })] }), mr = ({ url: e, filename: t, variant: n = "pill", label: r = "Download", iconOnly: i, tone: a = "dark", onTriggered: o }) => {
1646
1649
  let [s, c] = h(!1), u = l((n) => {
1647
- n.stopPropagation(), !s && (c(!0), sr(e, t).catch(() => {}).finally(() => {
1650
+ n.stopPropagation(), !s && (c(!0), or(e, t).catch(() => {}).finally(() => {
1648
1651
  c(!1), o?.();
1649
1652
  }));
1650
1653
  }, [
@@ -1665,11 +1668,11 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1665
1668
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
1666
1669
  light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
1667
1670
  }[a]),
1668
- children: s ? /* @__PURE__ */ U(Me, {
1671
+ children: s ? /* @__PURE__ */ U(je, {
1669
1672
  className: "size-4 animate-spin",
1670
1673
  weight: "bold",
1671
1674
  "aria-hidden": !0
1672
- }) : /* @__PURE__ */ U(Ne, {
1675
+ }) : /* @__PURE__ */ U(Z, {
1673
1676
  className: "size-5 shrink-0",
1674
1677
  weight: "bold",
1675
1678
  "aria-hidden": !0
@@ -1679,8 +1682,8 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1679
1682
  onClick: u,
1680
1683
  disabled: s,
1681
1684
  "aria-label": r,
1682
- className: fr,
1683
- children: U(s ? Me : Ne, {
1685
+ className: dr,
1686
+ children: U(s ? je : Z, {
1684
1687
  size: 20,
1685
1688
  weight: "bold",
1686
1689
  "aria-hidden": !0
@@ -1691,25 +1694,25 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1691
1694
  disabled: s,
1692
1695
  "aria-label": d ? r : void 0,
1693
1696
  className: J("mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70", a === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"),
1694
- children: [s ? /* @__PURE__ */ U(Me, {
1697
+ children: [s ? /* @__PURE__ */ U(je, {
1695
1698
  className: "size-4 animate-spin",
1696
1699
  weight: "bold",
1697
1700
  "aria-hidden": !0
1698
- }) : /* @__PURE__ */ U(Ne, {
1701
+ }) : /* @__PURE__ */ U(Z, {
1699
1702
  ...f,
1700
1703
  "aria-hidden": !0
1701
1704
  }), d ? null : r]
1702
1705
  });
1703
- }, gr = (e, t, n) => Math.min(Math.max(e, t), n), _r = ({ length: e, initialIndex: t, open: n }) => {
1704
- let r = gr(t, 0, Math.max(e - 1, 0)), [i, a] = h(r);
1706
+ }, hr = (e, t, n) => Math.min(Math.max(e, t), n), gr = ({ length: e, initialIndex: t, open: n }) => {
1707
+ let r = hr(t, 0, Math.max(e - 1, 0)), [i, a] = h(r);
1705
1708
  d(() => {
1706
- n && a(gr(t, 0, Math.max(e - 1, 0)));
1709
+ n && a(hr(t, 0, Math.max(e - 1, 0)));
1707
1710
  }, [
1708
1711
  n,
1709
1712
  t,
1710
1713
  e
1711
1714
  ]), d(() => {
1712
- a((t) => gr(t, 0, Math.max(e - 1, 0)));
1715
+ a((t) => hr(t, 0, Math.max(e - 1, 0)));
1713
1716
  }, [e]);
1714
1717
  let o = l(() => {
1715
1718
  e <= 1 || a((t) => t <= 0 ? e - 1 : t - 1);
@@ -1734,7 +1737,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1734
1737
  prev: o,
1735
1738
  next: s
1736
1739
  };
1737
- }, vr = ({ open: e, onClose: t, ariaLabel: n, counter: r, actions: i, children: a, "data-testid": o }) => {
1740
+ }, _r = ({ open: e, onClose: t, ariaLabel: n, counter: r, actions: i, children: a, "data-testid": o }) => {
1738
1741
  let s = m(null), c = m(null);
1739
1742
  return d(() => {
1740
1743
  let t = s.current;
@@ -1793,8 +1796,8 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1793
1796
  type: "button",
1794
1797
  onClick: t,
1795
1798
  "aria-label": "Close viewer",
1796
- className: fr,
1797
- children: /* @__PURE__ */ U(Je, {
1799
+ className: dr,
1800
+ children: /* @__PURE__ */ U(qe, {
1798
1801
  size: 20,
1799
1802
  weight: "bold",
1800
1803
  "aria-hidden": !0
@@ -1806,18 +1809,18 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1806
1809
  children: a
1807
1810
  })]
1808
1811
  });
1809
- }, yr = ({ open: e, items: t, initialIndex: n = 0, onClose: r }) => {
1810
- let { index: i, prev: a, next: o } = _r({
1812
+ }, vr = ({ open: e, items: t, initialIndex: n = 0, onClose: r }) => {
1813
+ let { index: i, prev: a, next: o } = gr({
1811
1814
  length: t.length,
1812
1815
  initialIndex: n,
1813
1816
  open: e
1814
- }), s = t[i], c = p(() => s?.filename ?? (s ? Z(s.src) : "image"), [s]);
1815
- return s ? /* @__PURE__ */ W(vr, {
1817
+ }), s = t[i], c = p(() => s?.filename ?? (s ? Q(s.src) : "image"), [s]);
1818
+ return s ? /* @__PURE__ */ W(_r, {
1816
1819
  open: e,
1817
1820
  onClose: r,
1818
1821
  ariaLabel: c,
1819
1822
  counter: t.length > 1 ? `${i + 1} / ${t.length}` : void 0,
1820
- actions: /* @__PURE__ */ U(hr, {
1823
+ actions: /* @__PURE__ */ U(mr, {
1821
1824
  url: s.src,
1822
1825
  filename: c,
1823
1826
  variant: "viewer",
@@ -1830,14 +1833,14 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1830
1833
  draggable: !1,
1831
1834
  decoding: "async",
1832
1835
  className: "block h-auto max-h-[calc(100dvh-128px)] w-auto max-w-[min(96vw,1400px)] select-none object-contain"
1833
- }, `${i}:${s.src}`) : null, t.length > 1 ? /* @__PURE__ */ U(mr, {
1836
+ }, `${i}:${s.src}`) : null, t.length > 1 ? /* @__PURE__ */ U(pr, {
1834
1837
  onPrev: a,
1835
1838
  onNext: o,
1836
1839
  prevLabel: "Previous image",
1837
1840
  nextLabel: "Next image"
1838
1841
  }) : null]
1839
1842
  }) : null;
1840
- }, br = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", xr = {
1843
+ }, yr = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", br = {
1841
1844
  1: ["rounded-[18px]"],
1842
1845
  2: ["rounded-l-[18px]", "rounded-r-[18px]"],
1843
1846
  3: [
@@ -1851,7 +1854,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1851
1854
  "rounded-bl-[18px]",
1852
1855
  "rounded-br-[18px]"
1853
1856
  ]
1854
- }, Sr = "--mes-single-width-cap", Cr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", wr = 436, Tr = ({ tiles: e, onTileActivate: t, maxVisible: n = 4, singleAspectRatio: r, className: i }) => {
1857
+ }, xr = "--mes-single-width-cap", Sr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Cr = 436, wr = ({ tiles: e, onTileActivate: t, maxVisible: n = 4, singleAspectRatio: r, className: i }) => {
1855
1858
  let a = e.length;
1856
1859
  if (a === 0) return null;
1857
1860
  let o = e.slice(0, Math.min(a, n)), s = a - o.length, c = s > 0 ? /* @__PURE__ */ W("div", {
@@ -1859,7 +1862,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1859
1862
  className: "absolute inset-0 flex items-center justify-center bg-[#040403]/50 text-2xl font-bold leading-[28px] tracking-[-0.24px] text-white",
1860
1863
  children: ["+", s]
1861
1864
  }) : null, l = (e, n, r) => {
1862
- let i = J(br, "h-full w-full", xr[o.length]?.[n]);
1865
+ let i = J(yr, "h-full w-full", br[o.length]?.[n]);
1863
1866
  return t ? /* @__PURE__ */ W("button", {
1864
1867
  type: "button",
1865
1868
  onClick: () => t(n),
@@ -1873,10 +1876,10 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1873
1876
  }, u;
1874
1877
  return r && (u = {
1875
1878
  aspectRatio: r,
1876
- width: `min(var(${Sr}), ${Math.round(wr * r * 100) / 100}px)`,
1879
+ width: `min(var(${xr}), ${Math.round(Cr * r * 100) / 100}px)`,
1877
1880
  maxWidth: "100%"
1878
1881
  }), o.length === 1 ? /* @__PURE__ */ U("div", {
1879
- className: J(r ? Cr : "aspect-square w-full", i),
1882
+ className: J(r ? Sr : "aspect-square w-full", i),
1880
1883
  style: u,
1881
1884
  children: l(o[0], 0, c)
1882
1885
  }) : o.length === 2 ? /* @__PURE__ */ U("div", {
@@ -1899,7 +1902,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1899
1902
  return l(e, t, n ? c : null);
1900
1903
  })
1901
1904
  });
1902
- }, Er = ({ src: e, suppliedRatio: t, fallbackRatio: n }) => {
1905
+ }, Tr = ({ src: e, suppliedRatio: t, fallbackRatio: n }) => {
1903
1906
  let [r, i] = o.useState(), a = o.useCallback((t) => {
1904
1907
  if (!t || t.naturalWidth <= 0 || t.naturalHeight <= 0 || e === void 0) return;
1905
1908
  let n = t.naturalWidth / t.naturalHeight;
@@ -1913,7 +1916,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1913
1916
  imgRef: a,
1914
1917
  onLoad: s
1915
1918
  };
1916
- }, Dr = (e) => {
1919
+ }, Er = (e) => {
1917
1920
  let [t, n] = h(!1), [r, i] = h(0);
1918
1921
  return {
1919
1922
  viewerOpen: t,
@@ -1923,7 +1926,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1923
1926
  }, [e]),
1924
1927
  closeViewer: l(() => n(!1), [])
1925
1928
  };
1926
- }, Or = ({ item: e, index: t, totalCount: n, fallbackLoading: r, imgRef: i, onLoad: o }) => ({
1929
+ }, Dr = ({ item: e, index: t, totalCount: n, fallbackLoading: r, imgRef: i, onLoad: o }) => ({
1927
1930
  ariaLabel: `Open image ${t + 1} of ${n}`,
1928
1931
  content: /* @__PURE__ */ U("img", {
1929
1932
  ref: i,
@@ -1937,15 +1940,15 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1937
1940
  onLoad: o,
1938
1941
  className: "absolute inset-0 size-full object-cover"
1939
1942
  })
1940
- }), kr = ({ src: e, alt: t, items: n }) => n && n.length > 0 ? n : e ? [{
1943
+ }), Or = ({ src: e, alt: t, items: n }) => n && n.length > 0 ? n : e ? [{
1941
1944
  src: e,
1942
1945
  alt: t
1943
- }] : [], Ar = (e, t) => e.map((n, r) => ({
1946
+ }] : [], kr = (e, t) => e.map((n, r) => ({
1944
1947
  src: n.src,
1945
1948
  alt: n.alt,
1946
1949
  filename: t && e.length === 1 ? t : t ? `${t} (${r + 1})` : void 0
1947
- })), jr = ({ src: e, alt: t, filename: n, loading: r = "lazy", onClick: i, onDismiss: o }) => {
1948
- let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Dr(i);
1950
+ })), Ar = ({ src: e, alt: t, filename: n, loading: r = "lazy", onClick: i, onDismiss: o }) => {
1951
+ let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Er(i);
1949
1952
  return /* @__PURE__ */ W("div", {
1950
1953
  className: "relative w-fit",
1951
1954
  children: [
@@ -1965,11 +1968,11 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1965
1968
  }),
1966
1969
  o ? /* @__PURE__ */ U("div", {
1967
1970
  className: "absolute right-2 top-2 z-10",
1968
- children: /* @__PURE__ */ U(Kn, { onClick: o })
1971
+ children: /* @__PURE__ */ U(Gn, { onClick: o })
1969
1972
  }) : null,
1970
- /* @__PURE__ */ U(yr, {
1973
+ /* @__PURE__ */ U(vr, {
1971
1974
  open: s,
1972
- items: Ar([{
1975
+ items: kr([{
1973
1976
  src: e,
1974
1977
  alt: t
1975
1978
  }], n),
@@ -1978,18 +1981,18 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1978
1981
  })
1979
1982
  ]
1980
1983
  });
1981
- }, Mr = 326 / 246, Nr = ({ state: e, src: t, alt: n, filename: r, items: i, text: a, groupPosition: o, loading: s = "lazy", onClick: c }) => {
1982
- let l = kr({
1984
+ }, jr = 326 / 246, Mr = ({ state: e, src: t, alt: n, filename: r, items: i, text: a, groupPosition: o, loading: s = "lazy", onClick: c }) => {
1985
+ let l = Or({
1983
1986
  src: t,
1984
1987
  alt: n,
1985
1988
  items: i
1986
- }), u = qn(e), { viewerOpen: d, viewerIndex: f, handleActivate: p, closeViewer: m } = Dr(c), h = l.length === 1, g = h ? l[0] : void 0, _ = Er({
1989
+ }), u = Kn(e), { viewerOpen: d, viewerIndex: f, handleActivate: p, closeViewer: m } = Er(c), h = l.length === 1, g = h ? l[0] : void 0, _ = Tr({
1987
1990
  src: g?.src,
1988
1991
  suppliedRatio: g?.width && g?.height ? g.width / g.height : void 0,
1989
- fallbackRatio: Mr
1992
+ fallbackRatio: jr
1990
1993
  });
1991
1994
  if (l.length === 0) return null;
1992
- let v = l.map((e, t) => Or({
1995
+ let v = l.map((e, t) => Dr({
1993
1996
  item: e,
1994
1997
  index: t,
1995
1998
  totalCount: l.length,
@@ -1997,7 +2000,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1997
2000
  imgRef: h ? _.imgRef : void 0,
1998
2001
  onLoad: h ? _.onLoad : void 0
1999
2002
  }));
2000
- return /* @__PURE__ */ W(Gn, {
2003
+ return /* @__PURE__ */ W(Wn, {
2001
2004
  variant: u,
2002
2005
  text: a,
2003
2006
  groupPosition: o,
@@ -2008,35 +2011,35 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2008
2011
  "data-testid": "image-attachment",
2009
2012
  children: [/* @__PURE__ */ U("div", {
2010
2013
  className: "relative",
2011
- children: /* @__PURE__ */ U(Tr, {
2014
+ children: /* @__PURE__ */ U(wr, {
2012
2015
  tiles: v,
2013
2016
  onTileActivate: p,
2014
2017
  singleAspectRatio: h ? _.ratio : void 0
2015
2018
  })
2016
- }), /* @__PURE__ */ U(yr, {
2019
+ }), /* @__PURE__ */ U(vr, {
2017
2020
  open: d,
2018
- items: Ar(l, r),
2021
+ items: kr(l, r),
2019
2022
  initialIndex: f,
2020
2023
  onClose: m
2021
2024
  })]
2022
2025
  });
2023
- }, Pr = {
2024
- Composer: (e) => /* @__PURE__ */ U(jr, { ...e }),
2025
- Sent: (e) => /* @__PURE__ */ U(Nr, {
2026
+ }, Nr = {
2027
+ Composer: (e) => /* @__PURE__ */ U(Ar, { ...e }),
2028
+ Sent: (e) => /* @__PURE__ */ U(Mr, {
2026
2029
  ...e,
2027
2030
  state: "sent"
2028
2031
  }),
2029
- Received: (e) => /* @__PURE__ */ U(Nr, {
2032
+ Received: (e) => /* @__PURE__ */ U(Mr, {
2030
2033
  ...e,
2031
2034
  state: "received"
2032
2035
  })
2033
- }, Fr = ({ open: e, items: t, initialIndex: n = 0, onClose: r }) => {
2034
- let { index: i, prev: a, next: o } = _r({
2036
+ }, Pr = ({ open: e, items: t, initialIndex: n = 0, onClose: r }) => {
2037
+ let { index: i, prev: a, next: o } = gr({
2035
2038
  length: t.length,
2036
2039
  initialIndex: n,
2037
2040
  open: e
2038
- }), s = t[i], c = p(() => s?.filename ?? (s ? Z(s.src) : "document"), [s]), l = p(() => s ? Ir(s.src) : void 0, [s]);
2039
- return !s || !l ? null : /* @__PURE__ */ W(vr, {
2041
+ }), s = t[i], c = p(() => s?.filename ?? (s ? Q(s.src) : "document"), [s]), l = p(() => s ? Fr(s.src) : void 0, [s]);
2042
+ return !s || !l ? null : /* @__PURE__ */ W(_r, {
2040
2043
  open: e,
2041
2044
  onClose: r,
2042
2045
  ariaLabel: c,
@@ -2047,24 +2050,24 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2047
2050
  title: c,
2048
2051
  className: "block h-[calc(100dvh-128px)] w-[min(96vw,1400px)] border-0 bg-white",
2049
2052
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
2050
- }, `${i}:${s.src}`), t.length > 1 ? /* @__PURE__ */ U(mr, {
2053
+ }, `${i}:${s.src}`), t.length > 1 ? /* @__PURE__ */ U(pr, {
2051
2054
  onPrev: a,
2052
2055
  onNext: o,
2053
2056
  prevLabel: "Previous document",
2054
2057
  nextLabel: "Next document"
2055
2058
  }) : null]
2056
2059
  });
2057
- }, Ir = (e) => {
2060
+ }, Fr = (e) => {
2058
2061
  let t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), r = t === -1 ? "" : e.slice(t + 1), i = new URLSearchParams(r);
2059
2062
  return i.has("toolbar") || i.set("toolbar", "0"), i.has("navpanes") || i.set("navpanes", "0"), `${n}#${i.toString()}`;
2060
- }, Lr = ({ src: e, filename: t, fileSize: n, title: r, items: i }) => i && i.length > 0 ? i : e ? [{
2063
+ }, Ir = ({ src: e, filename: t, fileSize: n, title: r, items: i }) => i && i.length > 0 ? i : e ? [{
2061
2064
  src: e,
2062
2065
  filename: t,
2063
2066
  fileSize: n,
2064
2067
  title: r
2065
- }] : [], Rr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
2066
- let a = t.filename ?? Z(t.src);
2067
- return /* @__PURE__ */ U(or, {
2068
+ }] : [], Lr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
2069
+ let a = t.filename ?? Q(t.src);
2070
+ return /* @__PURE__ */ U(ar, {
2068
2071
  variant: e,
2069
2072
  filename: a,
2070
2073
  title: t.title,
@@ -2074,20 +2077,20 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2074
2077
  activateLabel: `Open ${a}`,
2075
2078
  trailingAction: i
2076
2079
  });
2077
- }, zr = ({ state: e, src: t, filename: n, fileSize: r, title: i, items: a, text: o, groupPosition: s, onClick: c, onDismiss: l }) => {
2078
- let u = qn(e), d = Lr({
2080
+ }, Rr = ({ state: e, src: t, filename: n, fileSize: r, title: i, items: a, text: o, groupPosition: s, onClick: c, onDismiss: l }) => {
2081
+ let u = Kn(e), d = Ir({
2079
2082
  src: t,
2080
2083
  filename: n,
2081
2084
  fileSize: r,
2082
2085
  title: i,
2083
2086
  items: a
2084
- }), { viewerOpen: f, viewerIndex: p, handleActivate: m, closeViewer: h } = Dr(c), g = e === "composer" && !!l;
2087
+ }), { viewerOpen: f, viewerIndex: p, handleActivate: m, closeViewer: h } = Er(c), g = e === "composer" && !!l;
2085
2088
  if (d.length === 0) return null;
2086
2089
  let _ = d.map((e) => ({
2087
2090
  src: e.src,
2088
- filename: e.filename ?? Z(e.src)
2091
+ filename: e.filename ?? Q(e.src)
2089
2092
  }));
2090
- return /* @__PURE__ */ W(Gn, {
2093
+ return /* @__PURE__ */ W(Wn, {
2091
2094
  variant: u,
2092
2095
  text: o,
2093
2096
  groupPosition: s,
@@ -2095,17 +2098,17 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2095
2098
  children: [/* @__PURE__ */ U("div", {
2096
2099
  className: "flex flex-col gap-2",
2097
2100
  children: d.map((t, n) => {
2098
- let r = t.filename ?? Z(t.src), i = g && n === 0 ? /* @__PURE__ */ U(Kn, {
2101
+ let r = t.filename ?? Q(t.src), i = g && n === 0 ? /* @__PURE__ */ U(Gn, {
2099
2102
  onClick: l,
2100
2103
  variant: "inline"
2101
- }) : e === "composer" ? void 0 : /* @__PURE__ */ U(hr, {
2104
+ }) : e === "composer" ? void 0 : /* @__PURE__ */ U(mr, {
2102
2105
  url: t.src,
2103
2106
  filename: r,
2104
2107
  variant: "inline",
2105
2108
  label: `Download ${r}`,
2106
2109
  tone: u
2107
2110
  });
2108
- return /* @__PURE__ */ U(Rr, {
2111
+ return /* @__PURE__ */ U(Lr, {
2109
2112
  variant: u,
2110
2113
  item: t,
2111
2114
  index: n,
@@ -2113,28 +2116,28 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2113
2116
  trailingAction: i
2114
2117
  }, `${t.src}-${n}`);
2115
2118
  })
2116
- }), /* @__PURE__ */ U(Fr, {
2119
+ }), /* @__PURE__ */ U(Pr, {
2117
2120
  open: f,
2118
2121
  items: _,
2119
2122
  initialIndex: p,
2120
2123
  onClose: h
2121
2124
  })]
2122
2125
  });
2123
- }, Br = {
2124
- Composer: (e) => /* @__PURE__ */ U(zr, {
2126
+ }, zr = {
2127
+ Composer: (e) => /* @__PURE__ */ U(Rr, {
2125
2128
  ...e,
2126
2129
  state: "composer"
2127
2130
  }),
2128
- Sent: (e) => /* @__PURE__ */ U(zr, {
2131
+ Sent: (e) => /* @__PURE__ */ U(Rr, {
2129
2132
  ...e,
2130
2133
  state: "sent"
2131
2134
  }),
2132
- Received: (e) => /* @__PURE__ */ U(zr, {
2135
+ Received: (e) => /* @__PURE__ */ U(Rr, {
2133
2136
  ...e,
2134
2137
  state: "received"
2135
2138
  })
2136
- }, Vr = 150, Hr = ({ open: e, items: t, initialIndex: n = 0, onClose: i }) => {
2137
- let { index: a, prev: o, next: s } = _r({
2139
+ }, Br = 150, Vr = ({ open: e, items: t, initialIndex: n = 0, onClose: i }) => {
2140
+ let { index: a, prev: o, next: s } = gr({
2138
2141
  length: t.length,
2139
2142
  initialIndex: n,
2140
2143
  open: e
@@ -2146,11 +2149,11 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2146
2149
  e && !u && f(!0), d(() => {
2147
2150
  if (e || !u) return;
2148
2151
  c.current?.pause();
2149
- let t = window.setTimeout(() => f(!1), Vr);
2152
+ let t = window.setTimeout(() => f(!1), Br);
2150
2153
  return () => window.clearTimeout(t);
2151
2154
  }, [e, u]);
2152
- let g = t[a], _ = p(() => g?.filename ?? (g ? Z(g.src) : "video"), [g]);
2153
- return g ? /* @__PURE__ */ W(vr, {
2155
+ let g = t[a], _ = p(() => g?.filename ?? (g ? Q(g.src) : "video"), [g]);
2156
+ return g ? /* @__PURE__ */ W(_r, {
2154
2157
  open: e,
2155
2158
  onClose: i,
2156
2159
  ariaLabel: _,
@@ -2171,24 +2174,29 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2171
2174
  src: g.src,
2172
2175
  type: g.mimeType
2173
2176
  }) : null
2174
- }, `${a}:${g.src}`) : null, t.length > 1 ? /* @__PURE__ */ U(mr, {
2177
+ }, `${a}:${g.src}`) : null, t.length > 1 ? /* @__PURE__ */ U(pr, {
2175
2178
  onPrev: o,
2176
2179
  onNext: s,
2177
2180
  prevLabel: "Previous video",
2178
2181
  nextLabel: "Next video"
2179
2182
  }) : null]
2180
2183
  }) : null;
2181
- }, Ur = 1, Wr = 4 / 5, Gr = 16 / 9, Kr = () => /* @__PURE__ */ U("div", {
2184
+ }, Hr = 1, Ur = 4 / 5, Wr = 16 / 9, Gr = () => /* @__PURE__ */ U("div", {
2182
2185
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
2183
2186
  children: /* @__PURE__ */ U("span", {
2184
2187
  className: "flex size-12 items-center justify-center rounded-full bg-black/25 text-white backdrop-blur-[20px]",
2185
- children: /* @__PURE__ */ U(Re, {
2188
+ children: /* @__PURE__ */ U(Le, {
2186
2189
  className: "size-6",
2187
2190
  weight: "fill",
2188
2191
  "aria-hidden": !0
2189
2192
  })
2190
2193
  })
2191
- }), qr = ({ item: e, index: t, showPlayBadge: n = !0, imgRef: r, onLoad: i }) => /* @__PURE__ */ W("div", {
2194
+ }), Kr = (e) => {
2195
+ let t = e.indexOf("#");
2196
+ if (t === -1) return `${e}#t=0.001`;
2197
+ let n = e.slice(t + 1);
2198
+ return /(^|&)t=/.test(n) ? e : `${e}&t=0.001`;
2199
+ }, qr = ({ item: e, index: t, showPlayBadge: n = !0, imgRef: r, onLoad: i }) => /* @__PURE__ */ W("div", {
2192
2200
  className: "absolute inset-0 size-full bg-[#0d0d0d]",
2193
2201
  children: [e.poster ? /* @__PURE__ */ U("img", {
2194
2202
  ref: r,
@@ -2199,14 +2207,21 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2199
2207
  decoding: "async",
2200
2208
  onLoad: i,
2201
2209
  className: "absolute inset-0 size-full object-cover"
2210
+ }) : e.src && e.preload !== "none" ? /* @__PURE__ */ U("video", {
2211
+ src: Kr(e.src),
2212
+ muted: !0,
2213
+ playsInline: !0,
2214
+ preload: "metadata",
2215
+ "aria-label": `Video ${t + 1} thumbnail`,
2216
+ className: "absolute inset-0 size-full object-cover"
2202
2217
  }) : /* @__PURE__ */ U("div", {
2203
2218
  className: "absolute inset-0 flex items-center justify-center",
2204
- children: /* @__PURE__ */ U(Ke, {
2219
+ children: /* @__PURE__ */ U(Ge, {
2205
2220
  className: "size-16 text-white/30",
2206
2221
  weight: "regular",
2207
2222
  "aria-hidden": !0
2208
2223
  })
2209
- }), n ? /* @__PURE__ */ U(Kr, {}) : null]
2224
+ }), n ? /* @__PURE__ */ U(Gr, {}) : null]
2210
2225
  }), Jr = ({ item: e, index: t, totalCount: n, isOverflowTile: r, imgRef: i, onLoad: a }) => ({
2211
2226
  ariaLabel: `Play video ${t + 1} of ${n}`,
2212
2227
  cursorClassName: "cursor-pointer",
@@ -2233,7 +2248,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2233
2248
  preload: n.preload,
2234
2249
  filename: t && e.length === 1 ? t : t ? `${t} (${r + 1})` : void 0
2235
2250
  })), Zr = ({ src: e, poster: t, mimeType: n, filename: r, preload: i, onClick: a, onDismiss: o }) => {
2236
- let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Dr(a);
2251
+ let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Er(a);
2237
2252
  return /* @__PURE__ */ W("div", {
2238
2253
  className: "relative w-fit",
2239
2254
  children: [
@@ -2246,16 +2261,17 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2246
2261
  item: {
2247
2262
  src: e,
2248
2263
  poster: t,
2249
- mimeType: n
2264
+ mimeType: n,
2265
+ preload: i
2250
2266
  },
2251
2267
  index: 0
2252
2268
  })
2253
2269
  }),
2254
2270
  o ? /* @__PURE__ */ U("div", {
2255
2271
  className: "absolute right-2 top-2 z-10",
2256
- children: /* @__PURE__ */ U(Kn, { onClick: o })
2272
+ children: /* @__PURE__ */ U(Gn, { onClick: o })
2257
2273
  }) : null,
2258
- /* @__PURE__ */ U(Hr, {
2274
+ /* @__PURE__ */ U(Vr, {
2259
2275
  open: s,
2260
2276
  items: Xr([{
2261
2277
  src: e,
@@ -2276,10 +2292,10 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2276
2292
  preload: c,
2277
2293
  naturalAspectRatio: l,
2278
2294
  items: a
2279
- }), f = qn(e), { viewerOpen: p, viewerIndex: m, handleActivate: h, closeViewer: g } = Dr(u), _ = d.length === 1, v = _ ? d[0] : void 0, y = Er({
2295
+ }), f = Kn(e), { viewerOpen: p, viewerIndex: m, handleActivate: h, closeViewer: g } = Er(u), _ = d.length === 1, v = _ ? d[0] : void 0, y = Tr({
2280
2296
  src: v?.poster,
2281
2297
  suppliedRatio: v?.naturalAspectRatio,
2282
- fallbackRatio: Ur
2298
+ fallbackRatio: Hr
2283
2299
  });
2284
2300
  if (d.length === 0) return null;
2285
2301
  let b = d.length > 4 ? 3 : -1, x = d.map((e, t) => Jr({
@@ -2289,8 +2305,8 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2289
2305
  isOverflowTile: t === b,
2290
2306
  imgRef: _ ? y.imgRef : void 0,
2291
2307
  onLoad: _ ? y.onLoad : void 0
2292
- })), S = Math.min(Math.max(y.ratio, Wr), Gr);
2293
- return /* @__PURE__ */ W(Gn, {
2308
+ })), S = Math.min(Math.max(y.ratio, Ur), Wr);
2309
+ return /* @__PURE__ */ W(Wn, {
2294
2310
  variant: f,
2295
2311
  text: o,
2296
2312
  groupPosition: s,
@@ -2301,20 +2317,20 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2301
2317
  "data-testid": "video-attachment",
2302
2318
  children: [/* @__PURE__ */ U("div", {
2303
2319
  className: "relative",
2304
- children: /* @__PURE__ */ U(Tr, {
2320
+ children: /* @__PURE__ */ U(wr, {
2305
2321
  tiles: x,
2306
2322
  onTileActivate: h,
2307
2323
  singleAspectRatio: _ ? S : void 0
2308
2324
  })
2309
- }), /* @__PURE__ */ U(Hr, {
2325
+ }), /* @__PURE__ */ U(Vr, {
2310
2326
  open: p,
2311
2327
  items: Xr(d, i),
2312
2328
  initialIndex: m,
2313
2329
  onClose: g
2314
2330
  })]
2315
2331
  });
2316
- }, Q = {
2317
- Image: Pr,
2332
+ }, $r = {
2333
+ Image: Nr,
2318
2334
  Video: {
2319
2335
  Composer: (e) => /* @__PURE__ */ U(Zr, { ...e }),
2320
2336
  Sent: (e) => /* @__PURE__ */ U(Qr, {
@@ -2326,48 +2342,48 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2326
2342
  state: "received"
2327
2343
  })
2328
2344
  },
2329
- Audio: Qn,
2330
- Pdf: Br,
2331
- File: dr
2345
+ Audio: Zn,
2346
+ Pdf: zr,
2347
+ File: ur
2332
2348
  };
2333
2349
  //#endregion
2334
2350
  //#region src/components/CustomMessage/StreamAttachmentMessage.tsx
2335
2351
  function $(e) {
2336
2352
  return e?.trim() || void 0;
2337
2353
  }
2338
- function $r(e) {
2354
+ function ei(e) {
2339
2355
  let { original_width: t, original_height: n } = e;
2340
2356
  if (typeof t == "number" && typeof n == "number" && !(!Number.isFinite(t) || !Number.isFinite(n)) && !(t <= 0 || n <= 0)) return t / n;
2341
2357
  }
2342
- function ei(e) {
2358
+ function ti(e) {
2343
2359
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
2344
2360
  }
2345
- function ti(e, t) {
2361
+ function ni(e, t) {
2346
2362
  if (!e?.trim() || !t?.trim()) return !1;
2347
- let n = ei(e), r = ei(t);
2363
+ let n = ti(e), r = ti(t);
2348
2364
  if (n === r) return !0;
2349
2365
  if (!n.includes(r)) return !1;
2350
2366
  let i = n.split(r).join("");
2351
2367
  return !/[^\p{P}\p{Z}\p{C}]/u.test(i);
2352
2368
  }
2353
- function ni(e) {
2354
- let t = $(e.og_scrape_url) ?? $(e.title_link), n = $(e.image_url) ?? $(e.thumb_url), r = $(e.mime_type), i = $(e.asset_url), o = n && Tn(r, i) ? void 0 : i;
2369
+ function ri(e) {
2370
+ let t = $(e.og_scrape_url) ?? $(e.title_link), n = $(e.image_url) ?? $(e.thumb_url), r = $(e.mime_type), i = $(e.asset_url), o = n && Wt(r, i) ? void 0 : i;
2355
2371
  return {
2356
2372
  title: $(e.title),
2357
2373
  description: $(e.text),
2358
2374
  url: t,
2359
2375
  thumbnailUrl: a(n),
2360
2376
  sourceUrl: o,
2361
- layout: n || En(r, o) ? "featured" : "classic",
2377
+ layout: n || Gt(r, o) ? "featured" : "classic",
2362
2378
  mimeType: r,
2363
2379
  accentColor: $(e.accent_color),
2364
2380
  status: "ready"
2365
2381
  };
2366
2382
  }
2367
- function ri(e) {
2368
- return kt(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" : e.mime_type?.startsWith("audio/") ? "audio" : "file" : null;
2369
- }
2370
2383
  function ii(e) {
2384
+ return on(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" : e.mime_type?.startsWith("audio/") ? "audio" : "file" : null;
2385
+ }
2386
+ function ai(e) {
2371
2387
  if (!e?.length) return [];
2372
2388
  let t = [], n = (e, n) => {
2373
2389
  let r = t[t.length - 1];
@@ -2392,44 +2408,44 @@ function ii(e) {
2392
2408
  });
2393
2409
  };
2394
2410
  for (let t of e) {
2395
- if (kt(t)) {
2411
+ if (on(t)) {
2396
2412
  r(t);
2397
2413
  continue;
2398
2414
  }
2399
- let e = ri(t);
2415
+ let e = ii(t);
2400
2416
  e && n(e, t);
2401
2417
  }
2402
2418
  return t;
2403
2419
  }
2404
- function ai(e) {
2420
+ function oi(e) {
2405
2421
  return e.filter((e) => e.type === "media").length;
2406
2422
  }
2407
- function oi(e, t, n) {
2423
+ function si(e, t, n) {
2408
2424
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
2409
2425
  }
2410
- function si(e) {
2426
+ function ci(e) {
2411
2427
  return $(e.image_url) ?? $(e.asset_url) ?? "";
2412
2428
  }
2413
- function ci(e) {
2429
+ function li(e) {
2414
2430
  switch (e) {
2415
- case "image": return Q.Image;
2416
- case "video": return Q.Video;
2417
- case "audio": return Q.Audio;
2418
- case "pdf": return Q.Pdf;
2419
- default: return Q.File;
2431
+ case "image": return $r.Image;
2432
+ case "video": return $r.Video;
2433
+ case "audio": return $r.Audio;
2434
+ case "pdf": return $r.Pdf;
2435
+ default: return $r.File;
2420
2436
  }
2421
2437
  }
2422
- function li(e, t) {
2438
+ function ui(e, t) {
2423
2439
  switch (e) {
2424
2440
  case "image": return {
2425
- src: si(t),
2441
+ src: ci(t),
2426
2442
  alt: $(t.title)
2427
2443
  };
2428
2444
  case "video": return {
2429
2445
  src: $(t.asset_url) ?? "",
2430
2446
  poster: a(t.thumb_url),
2431
2447
  mimeType: $(t.mime_type),
2432
- naturalAspectRatio: $r(t)
2448
+ naturalAspectRatio: ei(t)
2433
2449
  };
2434
2450
  case "audio": return {
2435
2451
  src: $(t.asset_url) ?? "",
@@ -2449,30 +2465,30 @@ function li(e, t) {
2449
2465
  };
2450
2466
  }
2451
2467
  }
2452
- function ui(e, t) {
2453
- if (t.length > 1) return { items: t.map((t) => li(e, t)) };
2468
+ function di(e, t) {
2469
+ if (t.length > 1) return { items: t.map((t) => ui(e, t)) };
2454
2470
  let n = t[0];
2455
- return n ? li(e, n) : {};
2471
+ return n ? ui(e, n) : {};
2456
2472
  }
2457
- function di({ groupPosition: e, isMyMessage: t, segment: n }) {
2458
- let r = ci(n.kind), i = {
2459
- ...ui(n.kind, n.attachments),
2473
+ function fi({ groupPosition: e, isMyMessage: t, segment: n }) {
2474
+ let r = li(n.kind), i = {
2475
+ ...di(n.kind, n.attachments),
2460
2476
  groupPosition: e
2461
2477
  };
2462
2478
  return U(t ? r.Sent : r.Received, { ...i });
2463
2479
  }
2464
- var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2465
- let i = ii(n.attachments);
2480
+ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2481
+ let i = ai(n.attachments);
2466
2482
  if (i.length === 0) return null;
2467
- let a = ai(i), o = n.text?.trim(), s = i.find((e) => e.type === "link"), c = s?.type === "link" ? ni(s.attachments[0] ?? {}).url : void 0, l = o && ti(o, c) ? void 0 : o, u = 0, d = [], f = l ? "middle" : e, p = e === "single" || e === "end", m = (e, n, r) => {
2468
- let i = t ? zn.Sent : zn.Received;
2483
+ let a = oi(i), o = n.text?.trim(), s = i.find((e) => e.type === "link"), c = s?.type === "link" ? ri(s.attachments[0] ?? {}).url : void 0, l = o && ni(o, c) ? void 0 : o, u = 0, d = [], f = l ? "middle" : e, p = e === "single" || e === "end", m = (e, n, r) => {
2484
+ let i = t ? an.Sent : an.Received;
2469
2485
  d.push(/* @__PURE__ */ U(i, {
2470
- ...ni(e),
2486
+ ...ri(e),
2471
2487
  groupPosition: r ? f : "middle"
2472
2488
  }, n));
2473
2489
  }, h = (n, r) => {
2474
- let i = oi(u, a, e);
2475
- u += 1, d.push(/* @__PURE__ */ U(di, {
2490
+ let i = si(u, a, e);
2491
+ u += 1, d.push(/* @__PURE__ */ U(fi, {
2476
2492
  groupPosition: i,
2477
2493
  isMyMessage: t,
2478
2494
  segment: n
@@ -2513,18 +2529,18 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2513
2529
  renderText: r
2514
2530
  }),
2515
2531
  /* @__PURE__ */ U(M, {}),
2516
- p && /* @__PURE__ */ U(Jt, { side: t ? "me" : "other" })
2532
+ p && /* @__PURE__ */ U(Tn, { side: t ? "me" : "other" })
2517
2533
  ]
2518
2534
  }) : null]
2519
2535
  });
2520
- }, pi = o.memo((e) => {
2521
- let { additionalMessageInputProps: t, editing: n, endOfGroup: r, firstOfGroup: i, groupStyles: a, groupedByUser: o, handleAction: s, handleOpenThread: c, handleRetry: l, highlighted: u, isMessageAIGenerated: d, isMyMessage: f, message: m, renderText: g, threadList: _, viewerLanguage: v, onOutboundClick: y, resolvedOutbound: x } = e, { client: S } = he("CustomMessage"), { channel: C } = me("CustomMessage"), { isUnlocking: w, onUnlockClick: T, onFetchSource: D, onDownloadClick: N } = Nt("LockedAttachment"), [F, L] = h(!1), z = be(m.id), { Attachment: te = b, EditMessageModal: ie = E, MessageActions: B, MessageBlocked: ae = O, MessageBouncePrompt: oe = A, MessageDeleted: fe = j, MessageIsThreadReplyInChannelButtonIndicator: pe = P, MessageRepliesCountButton: _e = I, ReminderNotification: ve = ne, StreamedMessageText: V = re, PinIndicator: ye } = ge("CustomMessage"), xe = ue(m), Se = de(m), G = p(() => d?.(m), [d, m]), K = p(() => {
2536
+ }, mi = o.memo((e) => {
2537
+ let { additionalMessageInputProps: t, editing: n, endOfGroup: r, firstOfGroup: i, groupStyles: a, groupedByUser: o, handleAction: s, handleOpenThread: c, handleRetry: l, highlighted: u, isMessageAIGenerated: d, isMyMessage: f, message: m, renderText: g, threadList: _, viewerLanguage: v, onOutboundClick: y, resolvedOutbound: x } = e, { client: S } = he("CustomMessage"), { channel: C } = me("CustomMessage"), { isUnlocking: w, onUnlockClick: T, onFetchSource: D, onDownloadClick: N } = un("LockedAttachment"), [F, L] = h(!1), z = be(m.id), { Attachment: te = b, EditMessageModal: ie = E, MessageActions: B, MessageBlocked: ae = O, MessageBouncePrompt: oe = A, MessageDeleted: fe = j, MessageIsThreadReplyInChannelButtonIndicator: pe = P, MessageRepliesCountButton: _e = I, ReminderNotification: ve = ne, StreamedMessageText: V = re, PinIndicator: ye } = ge("CustomMessage"), xe = ue(m), Se = de(m), G = p(() => d?.(m), [d, m]), K = p(() => {
2522
2538
  let e = m.attachments ?? [], t = m.shared_location ? [m.shared_location, ...e] : e;
2523
- if (!Bt(m)) return t;
2524
- let n = t.filter((e) => !("type" in e) || !kt(e));
2539
+ if (!_n(m)) return t;
2540
+ let n = t.filter((e) => !("type" in e) || !on(e));
2525
2541
  return n.length === t.length ? t : n;
2526
- }, [m]), Ce = p(() => ii(K), [K]), q = p(() => {
2527
- let e = Ot({
2542
+ }, [m]), Ce = p(() => (m.attachments ?? []).filter(on), [m]), we = p(() => ai(K), [K]), q = p(() => {
2543
+ let e = Dt({
2528
2544
  message: m,
2529
2545
  viewerLanguage: v
2530
2546
  });
@@ -2532,13 +2548,13 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2532
2548
  ...m,
2533
2549
  text: e
2534
2550
  };
2535
- }, [m, v]), we = Ce.length > 0, Te = Ce.reduce((e, t) => e + t.attachments.length, 0) === (K?.length ?? 0), Ee = a?.[0] ?? "", De = Ee === "top" ? "first" : Ee === "middle" ? "middle" : Ee === "bottom" ? "end" : "single", Oe = Ee === "single" || Ee === "bottom";
2551
+ }, [m, v]), Te = we.length > 0, Ee = we.reduce((e, t) => e + t.attachments.length, 0) === (K?.length ?? 0), Y = a?.[0] ?? "", De = Y === "top" ? "first" : Y === "middle" ? "middle" : Y === "bottom" ? "end" : "single", Oe = Y === "single" || Y === "bottom";
2536
2552
  if (se(m)) return null;
2537
2553
  if (m.deleted_at || m.type === "deleted") return /* @__PURE__ */ U(fe, { message: m });
2538
2554
  if (ce(m)) return /* @__PURE__ */ U(ae, {});
2539
- let ke = !_ && !!m.reply_count, Ae = !_ && m.show_in_channel && m.parent_id, je = m.status === "failed" && m.error?.status !== 403, Me = le(m), Y;
2540
- je ? Y = () => l(m) : Me && (Y = () => L(!0));
2541
- let X = f(), Ne = J("str-chat__message str-chat__message-simple", `str-chat__message--${m.type}`, `str-chat__message--${m.status}`, X ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other", m.text ? "str-chat__message--has-text" : "has-no-text", {
2555
+ let ke = !_ && !!m.reply_count, Ae = !_ && m.show_in_channel && m.parent_id, je = m.status === "failed" && m.error?.status !== 403, Me = le(m), X;
2556
+ je ? X = () => l(m) : Me && (X = () => L(!0));
2557
+ let Z = f(), Ne = J("str-chat__message str-chat__message-simple", `str-chat__message--${m.type}`, `str-chat__message--${m.status}`, Z ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other", m.text ? "str-chat__message--has-text" : "has-no-text", {
2542
2558
  "str-chat__message--has-attachment": xe,
2543
2559
  "str-chat__message--highlighted": u,
2544
2560
  "str-chat__message--pinned pinned-message": m.pinned,
@@ -2548,7 +2564,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2548
2564
  "str-chat__virtual-message__wrapper--end": r,
2549
2565
  "str-chat__virtual-message__wrapper--first": i,
2550
2566
  "str-chat__virtual-message__wrapper--group": o
2551
- }), Pe = m.poll_id && S.polls.fromState(m.poll_id), Fe = en(m), Ie = Bt(m), Le = Vt(m), Re = !!(K?.length && !m.quoted_message), ze = Ie && X && Re, Be = we && Te && !m.quoted_message && !Pe && !G && !Ie, Ve = {
2567
+ }), Pe = m.poll_id && S.polls.fromState(m.poll_id), Fe = jn(m), Ie = _n(m), Le = vn(m), Re = !!(K?.length && !m.quoted_message), ze = Ie && Z && Re, Be = Te && Ee && !m.quoted_message && !Pe && !G && !Ie, Ve = {
2552
2568
  contentType: "text",
2553
2569
  amountText: m.metadata?.amount_text,
2554
2570
  paymentStatus: m.metadata?.payment_status,
@@ -2570,7 +2586,16 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2570
2586
  children: [/* @__PURE__ */ U(R, {
2571
2587
  message: q,
2572
2588
  renderText: g
2573
- }), Oe && /* @__PURE__ */ U(Jt, { side: X ? "me" : "other" })]
2589
+ }), Oe && /* @__PURE__ */ U(Tn, { side: Z ? "me" : "other" })]
2590
+ }), We = Ce.length > 0 && /* @__PURE__ */ U("div", {
2591
+ className: J("flex flex-col gap-[4px]", Z ? "items-end" : "items-start"),
2592
+ children: Ce.map((e, t) => {
2593
+ let n = Z ? an.Sent : an.Received, r = t === Ce.length - 1 && !m.text;
2594
+ return /* @__PURE__ */ U(n, {
2595
+ ...ri(e),
2596
+ groupPosition: r ? De : "middle"
2597
+ }, `locked-link-${t}`);
2598
+ })
2574
2599
  });
2575
2600
  return /* @__PURE__ */ W(H, { children: [
2576
2601
  n && /* @__PURE__ */ U(ie, { additionalMessageInputProps: t }),
@@ -2586,7 +2611,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2586
2611
  children: [
2587
2612
  ye && /* @__PURE__ */ U(ye, {}),
2588
2613
  !!z && /* @__PURE__ */ U(ve, { reminder: z }),
2589
- m.user && /* @__PURE__ */ U(_t, {
2614
+ m.user && /* @__PURE__ */ U(gt, {
2590
2615
  className: "str-chat__avatar str-chat__message-sender-avatar",
2591
2616
  id: m.user.id,
2592
2617
  image: m.user.image,
@@ -2598,58 +2623,62 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2598
2623
  /* @__PURE__ */ U("div", {
2599
2624
  className: J("str-chat__message-inner", { "str-chat__simple-message--error-failed": je || Me }),
2600
2625
  "data-testid": "message-inner",
2601
- onClick: Y,
2602
- onKeyDown: Y,
2603
- role: Y ? "button" : void 0,
2604
- tabIndex: Y ? 0 : void 0,
2626
+ onClick: X,
2627
+ onKeyDown: X,
2628
+ role: X ? "button" : void 0,
2629
+ tabIndex: X ? 0 : void 0,
2605
2630
  style: {
2606
2631
  marginInlineEnd: 0,
2607
2632
  marginInlineStart: 0
2608
2633
  },
2609
2634
  children: Fe ? /* @__PURE__ */ W("div", {
2610
2635
  className: "str-chat__message-bubble-wrapper message-tip-wrapper",
2611
- children: [/* @__PURE__ */ U(tn, { message: m }), m.text?.trim() && Ue]
2612
- }) : Ht(m) ? /* @__PURE__ */ U("div", {
2636
+ children: [/* @__PURE__ */ U(Mn, { message: m }), m.text?.trim() && Ue]
2637
+ }) : yn(m) ? /* @__PURE__ */ W("div", {
2613
2638
  className: "str-chat__message-bubble-wrapper",
2614
- children: /* @__PURE__ */ W("div", {
2639
+ children: [/* @__PURE__ */ W("div", {
2615
2640
  className: "flex items-center gap-2",
2616
2641
  children: [
2617
- X && B && /* @__PURE__ */ U(B, {}),
2618
- X ? /* @__PURE__ */ U(Lt, {
2642
+ Z && B && /* @__PURE__ */ U(B, {}),
2643
+ Z ? /* @__PURE__ */ U(mn, {
2619
2644
  ...Ve,
2620
2645
  isMine: !0
2621
- }) : /* @__PURE__ */ U(Lt, {
2646
+ }) : /* @__PURE__ */ U(mn, {
2622
2647
  ...Ve,
2623
2648
  isMine: !1,
2624
2649
  isUnlocking: w(m.id),
2625
2650
  onUnlockClick: () => T?.(m, C)
2626
2651
  }),
2627
- !X && B && /* @__PURE__ */ U(B, {})
2652
+ !Z && B && /* @__PURE__ */ U(B, {})
2628
2653
  ]
2629
- })
2630
- }) : Ut(m) ? /* @__PURE__ */ W("div", {
2654
+ }), We]
2655
+ }) : bn(m) ? /* @__PURE__ */ W("div", {
2631
2656
  className: "str-chat__message-bubble-wrapper message-locked-attachment-wrapper",
2632
- children: [/* @__PURE__ */ W("div", {
2633
- className: "flex items-center gap-2",
2634
- children: [
2635
- X && B && /* @__PURE__ */ U(B, {}),
2636
- X ? /* @__PURE__ */ U(Lt, {
2637
- ...He,
2638
- isMine: !0,
2639
- onPreviewClick: () => T ? T(m, C) : void 0
2640
- }) : /* @__PURE__ */ U(Lt, {
2641
- ...He,
2642
- isMine: !1,
2643
- isUnlocking: w(m.id),
2644
- onUnlockClick: () => T ? T(m, C) : void 0,
2645
- onDownloadClick: () => N ? N(m, C) : void 0
2646
- }),
2647
- !X && B && /* @__PURE__ */ U(B, {})
2648
- ]
2649
- }), m.text && Ue]
2650
- }) : Be ? /* @__PURE__ */ U(fi, {
2657
+ children: [
2658
+ /* @__PURE__ */ W("div", {
2659
+ className: "flex items-center gap-2",
2660
+ children: [
2661
+ Z && B && /* @__PURE__ */ U(B, {}),
2662
+ Z ? /* @__PURE__ */ U(mn, {
2663
+ ...He,
2664
+ isMine: !0,
2665
+ onPreviewClick: () => T ? T(m, C) : void 0
2666
+ }) : /* @__PURE__ */ U(mn, {
2667
+ ...He,
2668
+ isMine: !1,
2669
+ isUnlocking: w(m.id),
2670
+ onUnlockClick: () => T ? T(m, C) : void 0,
2671
+ onDownloadClick: () => N ? N(m, C) : void 0
2672
+ }),
2673
+ !Z && B && /* @__PURE__ */ U(B, {})
2674
+ ]
2675
+ }),
2676
+ We,
2677
+ m.text && Ue
2678
+ ]
2679
+ }) : Be ? /* @__PURE__ */ U(pi, {
2651
2680
  groupPosition: De,
2652
- isMyMessage: X,
2681
+ isMyMessage: Z,
2653
2682
  message: {
2654
2683
  ...q,
2655
2684
  attachments: K,
@@ -2661,10 +2690,10 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2661
2690
  children: /* @__PURE__ */ W("div", {
2662
2691
  className: J("str-chat__message-bubble", { "relative isolate": Oe }),
2663
2692
  children: [
2664
- Ie && !ze && /* @__PURE__ */ U(Gt, {
2693
+ Ie && !ze && /* @__PURE__ */ U(Sn, {
2665
2694
  message: m,
2666
2695
  hasAttachment: Re,
2667
- isMyMessage: X
2696
+ isMyMessage: Z
2668
2697
  }),
2669
2698
  Pe && /* @__PURE__ */ U(ee, { poll: Pe }),
2670
2699
  K?.length && !m.quoted_message ? /* @__PURE__ */ U(te, {
@@ -2676,20 +2705,20 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2676
2705
  renderText: g
2677
2706
  }),
2678
2707
  /* @__PURE__ */ U(M, {}),
2679
- Oe && /* @__PURE__ */ U(Jt, { side: X ? "me" : "other" })
2708
+ Oe && /* @__PURE__ */ U(Tn, { side: Z ? "me" : "other" })
2680
2709
  ]
2681
2710
  })
2682
2711
  })
2683
2712
  }),
2684
2713
  !Le && !Fe && /* @__PURE__ */ U("div", {
2685
2714
  className: "str-chat__message-footer",
2686
- children: (!Ie || ze) && /* @__PURE__ */ U(Gt, {
2715
+ children: (!Ie || ze) && /* @__PURE__ */ U(Sn, {
2687
2716
  message: m,
2688
2717
  hasAttachment: Re,
2689
- isMyMessage: X
2718
+ isMyMessage: Z
2690
2719
  })
2691
2720
  }),
2692
- /* @__PURE__ */ U(cn, {
2721
+ /* @__PURE__ */ U(Rn, {
2693
2722
  onOutboundClick: y,
2694
2723
  resolvedOutbound: x
2695
2724
  }),
@@ -2701,52 +2730,52 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2701
2730
  ]
2702
2731
  }, m.id)
2703
2732
  ] });
2704
- }, (e, t) => e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || e.resolvedOutbound?.id !== t.resolvedOutbound?.id || e.resolvedOutbound?.name !== t.resolvedOutbound?.name ? !1 : oe(e, t)), mi = (e) => {
2705
- let t = V("CustomMessage"), n = u(Yt), r = t.message.metadata?.outbound_id, i = typeof r == "string" ? n?.[r] : void 0;
2706
- return /* @__PURE__ */ U(pi, {
2733
+ }, (e, t) => e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || e.resolvedOutbound?.id !== t.resolvedOutbound?.id || e.resolvedOutbound?.name !== t.resolvedOutbound?.name ? !1 : oe(e, t)), hi = (e) => {
2734
+ let t = V("CustomMessage"), n = u(En), r = t.message.metadata?.outbound_id, i = typeof r == "string" ? n?.[r] : void 0;
2735
+ return /* @__PURE__ */ U(mi, {
2707
2736
  ...t,
2708
2737
  ...e,
2709
2738
  resolvedOutbound: i
2710
2739
  });
2711
- }, hi = () => {
2740
+ }, gi = () => {
2712
2741
  let { handleDelete: e, message: t } = V("CustomMessageActions");
2713
- return t.metadata?.payment_status === "paid" ? null : /* @__PURE__ */ U(Ye, {
2742
+ return t.metadata?.payment_status === "paid" ? null : /* @__PURE__ */ U(Je, {
2714
2743
  onClick: e,
2715
2744
  "aria-label": "Delete",
2716
2745
  title: "Delete",
2717
2746
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
2718
- children: /* @__PURE__ */ U(Ge, {
2747
+ children: /* @__PURE__ */ U(We, {
2719
2748
  size: 16,
2720
2749
  weight: "light",
2721
2750
  "aria-hidden": !0
2722
2751
  })
2723
2752
  });
2724
- }, gi = () => {
2753
+ }, _i = () => {
2725
2754
  let { handleFlag: e } = V("CustomMessageActions");
2726
- return /* @__PURE__ */ U(Ye, {
2755
+ return /* @__PURE__ */ U(Je, {
2727
2756
  onClick: e,
2728
2757
  "aria-label": "Report",
2729
2758
  title: "Report",
2730
2759
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
2731
- children: /* @__PURE__ */ U(Pe, {
2760
+ children: /* @__PURE__ */ U(Ne, {
2732
2761
  size: 16,
2733
2762
  weight: "light",
2734
2763
  "aria-hidden": !0
2735
2764
  })
2736
2765
  });
2737
- }, _i = () => {
2766
+ }, vi = () => {
2738
2767
  let { message: e } = V("CustomMessageActions");
2739
- return e.metadata?.custom_type === G.ATTACHMENT ? /* @__PURE__ */ U(Xe, { messageActionSet: [{
2740
- Component: hi,
2768
+ return e.metadata?.custom_type === G.ATTACHMENT ? /* @__PURE__ */ U(Ye, { messageActionSet: [{
2769
+ Component: gi,
2741
2770
  placement: "quick",
2742
2771
  type: "delete"
2743
2772
  }, {
2744
- Component: gi,
2773
+ Component: _i,
2745
2774
  placement: "quick",
2746
2775
  type: "flag"
2747
2776
  }] }) : null;
2748
- }, vi = (e) => ({ linkPreviews: Array.from(e.previews.values()).filter((e) => _.previewIsLoaded(e) || _.previewIsLoading(e)) }), yi = () => {
2749
- let { linkPreviewsManager: e } = _e(), { linkPreviews: t } = xe(e.state, vi), n = (t) => {
2777
+ }, yi = (e) => ({ linkPreviews: Array.from(e.previews.values()).filter((e) => _.previewIsLoaded(e) || _.previewIsLoading(e)) }), bi = () => {
2778
+ let { linkPreviewsManager: e } = _e(), { linkPreviews: t } = xe(e.state, yi), n = (t) => {
2750
2779
  e.dismissPreview(t);
2751
2780
  };
2752
2781
  return t.length > 0 ? /* @__PURE__ */ U("div", {
@@ -2754,7 +2783,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2754
2783
  className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2",
2755
2784
  children: t.map((e) => {
2756
2785
  let t = _.previewIsLoading(e);
2757
- return /* @__PURE__ */ U(zn.Composer, {
2786
+ return /* @__PURE__ */ U(an.Composer, {
2758
2787
  title: e.title,
2759
2788
  url: e.og_scrape_url,
2760
2789
  thumbnailUrl: e.image_url,
@@ -2764,19 +2793,19 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2764
2793
  }, e.og_scrape_url);
2765
2794
  })
2766
2795
  }) : null;
2767
- }, bi = o.createContext(!1), xi = 200, Si = () => u(bi), Ci = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ U("button", {
2796
+ }, xi = o.createContext(!1), Si = 200, Ci = () => u(xi), wi = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ U("button", {
2768
2797
  ...n,
2769
2798
  type: "button",
2770
2799
  "aria-label": "Send",
2771
2800
  disabled: t,
2772
2801
  onPointerDown: (e) => e.preventDefault(),
2773
2802
  onClick: e,
2774
- children: /* @__PURE__ */ U(Oe, {
2803
+ children: /* @__PURE__ */ U(De, {
2775
2804
  weight: "bold",
2776
2805
  className: "size-4"
2777
2806
  })
2778
- }), wi = () => {
2779
- let e = u(bi), { handleSubmit: t } = ye(), n = ve(), r = e || !n, { SendButton: i = Ci, AttachmentPreviewList: a = x } = ge("CustomMessageInput"), s = o.useRef(null);
2807
+ }), Ti = () => {
2808
+ let e = u(xi), { handleSubmit: t } = ye(), n = ve(), r = e || !n, { SendButton: i = wi, AttachmentPreviewList: a = x } = ge("CustomMessageInput"), s = o.useRef(null);
2780
2809
  return o.useEffect(() => {
2781
2810
  let e = s.current;
2782
2811
  if (!e || typeof ResizeObserver > "u") return;
@@ -2801,7 +2830,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2801
2830
  className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2",
2802
2831
  children: [
2803
2832
  /* @__PURE__ */ U(te, {}),
2804
- /* @__PURE__ */ U(yi, {}),
2833
+ /* @__PURE__ */ U(bi, {}),
2805
2834
  /* @__PURE__ */ U(a, {})
2806
2835
  ]
2807
2836
  }), /* @__PURE__ */ W("div", {
@@ -2830,7 +2859,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2830
2859
  })]
2831
2860
  })]
2832
2861
  });
2833
- }, Ti = () => /* @__PURE__ */ W("div", {
2862
+ }, Ei = () => /* @__PURE__ */ W("div", {
2834
2863
  className: "messaging-composer-backdrop",
2835
2864
  "aria-hidden": "true",
2836
2865
  children: [
@@ -2841,7 +2870,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2841
2870
  /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2842
2871
  /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-gradient" })
2843
2872
  ]
2844
- }), Ei = ({ renderActions: e, renderHeader: t, renderFooter: n, disabled: r = !1, disabledReason: i, composerInput: a }) => {
2873
+ }), Di = ({ renderActions: e, renderHeader: t, renderFooter: n, disabled: r = !1, disabledReason: i, composerInput: a }) => {
2845
2874
  let { channel: s } = me(), c = s?.data?.frozen === !0, l = !!a, u = o.useRef(null);
2846
2875
  return o.useEffect(() => {
2847
2876
  if (!l) return;
@@ -2850,7 +2879,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2850
2879
  let n = e.offsetHeight, r = () => {
2851
2880
  let r = e.offsetHeight, i = r > n;
2852
2881
  n = r;
2853
- let a = Array.from(t.querySelectorAll(".str-chat__list")).find((e) => e.scrollHeight > e.clientHeight) ?? null, o = a ? a.scrollHeight - a.scrollTop - a.clientHeight < xi : !1;
2882
+ let a = Array.from(t.querySelectorAll(".str-chat__list")).find((e) => e.scrollHeight > e.clientHeight) ?? null, o = a ? a.scrollHeight - a.scrollTop - a.clientHeight < Si : !1;
2854
2883
  t.style.setProperty("--messaging-composer-height", `${r}px`), i && o && a && (a.scrollTop = a.scrollHeight);
2855
2884
  };
2856
2885
  if (r(), typeof ResizeObserver > "u") return;
@@ -2862,7 +2891,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2862
2891
  ref: u,
2863
2892
  "data-testid": "composer-chrome",
2864
2893
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
2865
- children: [/* @__PURE__ */ U(Ti, {}), /* @__PURE__ */ W("div", {
2894
+ children: [/* @__PURE__ */ U(Ei, {}), /* @__PURE__ */ W("div", {
2866
2895
  className: "relative z-10 flex flex-col",
2867
2896
  children: [
2868
2897
  t?.(),
@@ -2892,7 +2921,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2892
2921
  ref: u,
2893
2922
  "data-testid": "composer-chrome",
2894
2923
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
2895
- children: [/* @__PURE__ */ U(Ti, {}), /* @__PURE__ */ W("div", {
2924
+ children: [/* @__PURE__ */ U(Ei, {}), /* @__PURE__ */ W("div", {
2896
2925
  className: "relative z-10 flex min-h-0 flex-col",
2897
2926
  children: [t?.(), /* @__PURE__ */ W("div", {
2898
2927
  className: "flex min-h-0 flex-col gap-4 p-3 pb-5 md:p-5",
@@ -2904,9 +2933,9 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2904
2933
  children: [e && /* @__PURE__ */ U("div", {
2905
2934
  className: "flex h-12 shrink-0 items-center justify-center",
2906
2935
  children: e()
2907
- }), /* @__PURE__ */ U(bi.Provider, {
2936
+ }), /* @__PURE__ */ U(xi.Provider, {
2908
2937
  value: c,
2909
- children: /* @__PURE__ */ U(N, { Input: a ?? wi })
2938
+ children: /* @__PURE__ */ U(N, { Input: a ?? Ti })
2910
2939
  })]
2911
2940
  }), n?.()]
2912
2941
  })]
@@ -2923,20 +2952,20 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2923
2952
  children: [e && /* @__PURE__ */ U("div", {
2924
2953
  className: "flex h-12 shrink-0 items-center justify-center",
2925
2954
  children: e()
2926
- }), /* @__PURE__ */ U(bi.Provider, {
2955
+ }), /* @__PURE__ */ U(xi.Provider, {
2927
2956
  value: c,
2928
- children: /* @__PURE__ */ U(N, { Input: wi })
2957
+ children: /* @__PURE__ */ U(N, { Input: Ti })
2929
2958
  })]
2930
2959
  }),
2931
2960
  n?.()
2932
2961
  ]
2933
2962
  });
2934
- }, Di = {
2963
+ }, Oi = {
2935
2964
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
2936
2965
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
2937
- }, Oi = ["SYSTEM_AGE_SAFETY_BLOCKED"], ki = { SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines." }, Ai = "age safety guidelines.", ji = "https://linktr.ee/s/about/contact", Mi = (e) => Oi.includes(e), Ni = (e) => Mi(e.metadata?.custom_type), Pi = (e) => {
2966
+ }, ki = ["SYSTEM_AGE_SAFETY_BLOCKED"], Ai = { SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines." }, ji = "age safety guidelines.", Mi = "https://linktr.ee/s/about/contact", Ni = (e) => ki.includes(e), Pi = (e) => Ni(e.metadata?.custom_type), Fi = (e) => {
2938
2967
  let t = e.metadata?.custom_type;
2939
- if (q(t)) return {
2968
+ if (we(t)) return {
2940
2969
  kind: "dm-agent",
2941
2970
  type: t
2942
2971
  };
@@ -2945,29 +2974,29 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2945
2974
  type: t
2946
2975
  };
2947
2976
  let n = e.dm_agent_system_type;
2948
- if (q(n)) return {
2977
+ if (we(n)) return {
2949
2978
  kind: "dm-agent",
2950
2979
  type: n
2951
2980
  };
2952
- }, Fi = (e) => {
2953
- let t = e.indexOf(Ai);
2981
+ }, Ii = (e) => {
2982
+ let t = e.indexOf(ji);
2954
2983
  if (t === -1) return e;
2955
2984
  let n = t + 22;
2956
2985
  return /* @__PURE__ */ W(H, { children: [
2957
2986
  e.slice(0, t),
2958
2987
  /* @__PURE__ */ U("a", {
2959
- href: ji,
2988
+ href: Mi,
2960
2989
  target: "_blank",
2961
2990
  rel: "noopener noreferrer",
2962
2991
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
2963
- children: Ai
2992
+ children: ji
2964
2993
  }),
2965
2994
  e.slice(n)
2966
2995
  ] });
2967
- }, Ii = (e) => {
2968
- let t = !Ni(e.message), n = Pi(e.message);
2996
+ }, Li = (e) => {
2997
+ let t = !Pi(e.message), n = Fi(e.message);
2969
2998
  if (n?.kind === "dm-agent") {
2970
- let r = e.message.text?.trim() || Di[n.type];
2999
+ let r = e.message.text?.trim() || Oi[n.type];
2971
3000
  return /* @__PURE__ */ W("div", {
2972
3001
  className: "str-chat__message--system",
2973
3002
  "data-testid": "message-system",
@@ -2975,7 +3004,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2975
3004
  className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
2976
3005
  "data-testid": "dm-agent-system-message",
2977
3006
  "data-dm-agent-system-type": n.type,
2978
- children: [/* @__PURE__ */ U(He, {
3007
+ children: [/* @__PURE__ */ U(Ve, {
2979
3008
  size: 16,
2980
3009
  weight: "regular",
2981
3010
  "aria-hidden": !0,
@@ -2988,7 +3017,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2988
3017
  });
2989
3018
  }
2990
3019
  if (n?.kind === "age-safety") {
2991
- let r = e.message.text?.trim() || ki[n.type];
3020
+ let r = e.message.text?.trim() || Ai[n.type];
2992
3021
  return /* @__PURE__ */ W("div", {
2993
3022
  className: "str-chat__message--system",
2994
3023
  "data-testid": "message-system",
@@ -2996,7 +3025,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2996
3025
  className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
2997
3026
  "data-testid": "age-safety-system-message",
2998
3027
  "data-age-safety-system-type": n.type,
2999
- children: [/* @__PURE__ */ U(ze, {
3028
+ children: [/* @__PURE__ */ U(Re, {
3000
3029
  size: 24,
3001
3030
  weight: "duotone",
3002
3031
  "aria-hidden": !0,
@@ -3006,7 +3035,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3006
3035
  className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]",
3007
3036
  children: /* @__PURE__ */ U("p", {
3008
3037
  className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]",
3009
- children: Fi(r)
3038
+ children: Ii(r)
3010
3039
  })
3011
3040
  })]
3012
3041
  }), !t && /* @__PURE__ */ U(z, { message: e.message })]
@@ -3024,7 +3053,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3024
3053
  ]
3025
3054
  }), !t && /* @__PURE__ */ U(z, { message: e.message })]
3026
3055
  });
3027
- }, Li = c(!1), Ri = ({ cx: e, index: t }) => /* @__PURE__ */ U("circle", {
3056
+ }, Ri = c(!1), zi = ({ cx: e, index: t }) => /* @__PURE__ */ U("circle", {
3028
3057
  cx: e,
3029
3058
  cy: "6.15",
3030
3059
  r: "3.9",
@@ -3037,15 +3066,15 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3037
3066
  begin: `${120 * t}ms`,
3038
3067
  repeatCount: "indefinite"
3039
3068
  })
3040
- }), zi = /* @__PURE__ */ new Set([
3069
+ }), Bi = /* @__PURE__ */ new Set([
3041
3070
  y.Thinking,
3042
3071
  y.Generating,
3043
3072
  y.ExternalSources
3044
- ]), Bi = ({ threadList: e }) => {
3045
- let { channel: t, channelConfig: n, thread: r } = me(), { client: i } = he(), { typing: a = {} } = Se(), { aiState: o } = fe(t), s = u(Li);
3046
- if (!e && s && zi.has(o)) {
3047
- let e = Hi(t, i.user?.id);
3048
- return /* @__PURE__ */ U(Vi, {
3073
+ ]), Vi = ({ threadList: e }) => {
3074
+ let { channel: t, channelConfig: n, thread: r } = me(), { client: i } = he(), { typing: a = {} } = Se(), { aiState: o } = fe(t), s = u(Ri);
3075
+ if (!e && s && Bi.has(o)) {
3076
+ let e = Ui(t, i.user?.id);
3077
+ return /* @__PURE__ */ U(Hi, {
3049
3078
  avatarId: e?.id ?? "ai-agent",
3050
3079
  avatarName: e?.name ?? e?.id ?? "Agent",
3051
3080
  avatarImage: e?.image,
@@ -3056,19 +3085,19 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3056
3085
  let c = e ? [] : Object.values(a).filter(({ parent_id: e, user: t }) => t?.id !== i.user?.id && !e), l = e ? Object.values(a).filter(({ parent_id: e, user: t }) => t?.id !== i.user?.id && e === r?.id) : [], d = e ? l : c;
3057
3086
  if (!d.length) return null;
3058
3087
  let f = d[0]?.user, p = f?.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
3059
- return /* @__PURE__ */ U(Vi, {
3088
+ return /* @__PURE__ */ U(Hi, {
3060
3089
  avatarId: f?.id ?? p?.id ?? "typing-user",
3061
3090
  avatarName: f?.name ?? p?.name ?? f?.id ?? "Typing user",
3062
3091
  avatarImage: f?.image ?? p?.image,
3063
3092
  testId: "typing-indicator"
3064
3093
  });
3065
- }, Vi = ({ avatarId: e, avatarName: t, avatarImage: n, testId: r }) => /* @__PURE__ */ U("div", {
3094
+ }, Hi = ({ avatarId: e, avatarName: t, avatarImage: n, testId: r }) => /* @__PURE__ */ U("div", {
3066
3095
  className: "str-chat__li str-chat__li--single str-chat__typing-indicator !static",
3067
3096
  "data-testid": r,
3068
3097
  style: { marginBottom: "var(--messaging-channel-input-spacer-height, 80px)" },
3069
3098
  children: /* @__PURE__ */ W("div", {
3070
3099
  className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text",
3071
- children: [/* @__PURE__ */ U(_t, {
3100
+ children: [/* @__PURE__ */ U(gt, {
3072
3101
  className: "str-chat__avatar str-chat__message-sender-avatar",
3073
3102
  id: e,
3074
3103
  name: t,
@@ -3093,28 +3122,28 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3093
3122
  height: "13",
3094
3123
  overflow: "visible",
3095
3124
  children: [
3096
- /* @__PURE__ */ U(Ri, {
3125
+ /* @__PURE__ */ U(zi, {
3097
3126
  cx: "4",
3098
3127
  index: 0
3099
3128
  }),
3100
- /* @__PURE__ */ U(Ri, {
3129
+ /* @__PURE__ */ U(zi, {
3101
3130
  cx: "16",
3102
3131
  index: 1
3103
3132
  }),
3104
- /* @__PURE__ */ U(Ri, {
3133
+ /* @__PURE__ */ U(zi, {
3105
3134
  cx: "28",
3106
3135
  index: 2
3107
3136
  })
3108
3137
  ]
3109
3138
  })
3110
3139
  })
3111
- }), /* @__PURE__ */ U(Jt, { side: "other" })]
3140
+ }), /* @__PURE__ */ U(Tn, { side: "other" })]
3112
3141
  })
3113
3142
  })
3114
3143
  })]
3115
3144
  })
3116
3145
  });
3117
- function Hi(e, t) {
3146
+ function Ui(e, t) {
3118
3147
  let n = e?.state?.members ?? {};
3119
3148
  for (let e of Object.values(n)) {
3120
3149
  let n = e?.user;
@@ -3123,7 +3152,7 @@ function Hi(e, t) {
3123
3152
  }
3124
3153
  //#endregion
3125
3154
  //#region src/components/MessagingShell/ChannelEmptyState.tsx
3126
- var Ui = () => null, Wi = ({ className: e, message: t }) => /* @__PURE__ */ W("div", {
3155
+ var Wi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ W("div", {
3127
3156
  className: J("flex items-center justify-center h-full", e),
3128
3157
  children: [/* @__PURE__ */ W("svg", {
3129
3158
  viewBox: "0 0 100 100",
@@ -3174,27 +3203,27 @@ var Ui = () => null, Wi = ({ className: e, message: t }) => /* @__PURE__ */ W("d
3174
3203
  className: "text-stone",
3175
3204
  children: t
3176
3205
  })]
3177
- }), Gi = o.memo(() => /* @__PURE__ */ U("div", {
3206
+ }), Ki = o.memo(() => /* @__PURE__ */ U("div", {
3178
3207
  className: "messaging-loading-state flex items-center justify-center h-full",
3179
3208
  children: /* @__PURE__ */ W("div", {
3180
3209
  className: "flex items-center",
3181
- children: [/* @__PURE__ */ U(Wi, { className: "w-6 h-6" }), /* @__PURE__ */ U("span", {
3210
+ children: [/* @__PURE__ */ U(Gi, { className: "w-6 h-6" }), /* @__PURE__ */ U("span", {
3182
3211
  className: "text-sm text-stone",
3183
3212
  children: "Loading messages"
3184
3213
  })]
3185
3214
  })
3186
3215
  }));
3187
- Gi.displayName = "LoadingState";
3216
+ Ki.displayName = "LoadingState";
3188
3217
  //#endregion
3189
3218
  //#region src/components/ChannelView.tsx
3190
- var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMessageInputFooter: r, renderConversationFooter: i, onLeaveConversation: a, onBlockParticipant: s, showDeleteConversation: c = !0, onDeleteConversationClick: u, onBlockParticipantClick: f, onReportParticipantClick: p, showBlockParticipant: h = !0, showReportParticipant: g = !0, composerDisabled: _ = !1, composerDisabledReason: v, showStarButton: y = !1, renderChannelBanner: b, customChannelActions: x, renderChannelActions: S, renderMessage: C, viewerLanguage: w, showChannelInfo: T = !0, onParticipantNameClick: E, onOutboundClick: D, resolveOutbound: O, composerInput: k }) => {
3219
+ var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMessageInputFooter: r, renderConversationFooter: i, onLeaveConversation: a, onBlockParticipant: s, showDeleteConversation: c = !0, onDeleteConversationClick: u, onBlockParticipantClick: f, onReportParticipantClick: p, showBlockParticipant: h = !0, showReportParticipant: g = !0, composerDisabled: _ = !1, composerDisabledReason: v, showStarButton: y = !1, renderChannelBanner: b, customChannelActions: x, renderChannelActions: S, renderMessage: C, viewerLanguage: w, showChannelInfo: T = !0, onParticipantNameClick: E, onOutboundClick: D, resolveOutbound: O, composerInput: k }) => {
3191
3220
  let { channel: A, messages: j } = me(), M = m(D);
3192
3221
  d(() => {
3193
3222
  M.current = D;
3194
3223
  }, [D]);
3195
3224
  let N = l((e) => {
3196
3225
  M.current?.(e);
3197
- }, []), P = D ? N : void 0, I = $t(j, O), L = A.state.messages.some((e) => e.type !== "deleted"), R = b ? /* @__PURE__ */ U(o.Fragment, { children: b() }, "lt-channel-banner") : null, z = /* @__PURE__ */ U(Tt, {
3226
+ }, []), P = D ? N : void 0, I = An(j, O), L = A.state.messages.some((e) => e.type !== "deleted"), R = b ? /* @__PURE__ */ U(o.Fragment, { children: b() }, "lt-channel-banner") : null, z = /* @__PURE__ */ U(wt, {
3198
3227
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
3199
3228
  onBack: e,
3200
3229
  showBackButton: t,
@@ -3212,7 +3241,7 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3212
3241
  renderChannelActions: S,
3213
3242
  onParticipantNameClick: E
3214
3243
  }), ee = l((e) => {
3215
- let { message: t } = V("ChannelView"), n = /* @__PURE__ */ U(mi, {
3244
+ let { message: t } = V("ChannelView"), n = /* @__PURE__ */ U(hi, {
3216
3245
  ...e,
3217
3246
  viewerLanguage: w,
3218
3247
  onOutboundClick: P
@@ -3223,12 +3252,12 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3223
3252
  C,
3224
3253
  w
3225
3254
  ]);
3226
- return /* @__PURE__ */ U(Yt.Provider, {
3255
+ return /* @__PURE__ */ U(En.Provider, {
3227
3256
  value: I,
3228
3257
  children: /* @__PURE__ */ U(ae, {
3229
3258
  overrides: {
3230
3259
  Message: ee,
3231
- MessageActions: _i,
3260
+ MessageActions: vi,
3232
3261
  UnreadMessagesNotification: () => null,
3233
3262
  UnreadMessagesSeparator: () => null
3234
3263
  },
@@ -3250,7 +3279,7 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3250
3279
  hideDeletedMessages: !0,
3251
3280
  hideNewMessageSeparator: !1
3252
3281
  })]
3253
- }, "lt-channel-message-list"), /* @__PURE__ */ U(Ei, {
3282
+ }, "lt-channel-message-list"), /* @__PURE__ */ U(Di, {
3254
3283
  ...n && { renderActions: () => n?.(A) },
3255
3284
  ...i && { renderHeader: () => i(A) },
3256
3285
  renderFooter: () => r?.(A),
@@ -3277,7 +3306,7 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3277
3306
  })]
3278
3307
  }, "lt-channel-message-list"),
3279
3308
  i ? /* @__PURE__ */ U(o.Fragment, { children: i(A) }, "lt-channel-conversation-footer") : null,
3280
- /* @__PURE__ */ U(Ei, {
3309
+ /* @__PURE__ */ U(Di, {
3281
3310
  ...n && { renderActions: () => n?.(A) },
3282
3311
  renderFooter: () => r?.(A),
3283
3312
  disabled: _,
@@ -3287,7 +3316,7 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3287
3316
  ] }) })
3288
3317
  })
3289
3318
  });
3290
- }, qi = o.memo(({ channel: e, onBack: t, showBackButton: n = !1, renderMessageInputActions: r, renderMessageInputFooter: i, renderConversationFooter: a, onLeaveConversation: o, onBlockParticipant: s, className: c, CustomChannelEmptyState: u = Ui, showDeleteConversation: f = !0, onDeleteConversationClick: p, onBlockParticipantClick: h, onReportParticipantClick: g, showBlockParticipant: _ = !0, showReportParticipant: v = !0, composerDisabled: y = !1, composerDisabledReason: b, dmAgentEnabled: x, messageMetadata: C, onMessageSent: w, showStarButton: T = !1, renderChannelBanner: E, customChannelActions: D, renderChannelActions: O, renderMessage: k, onMessageLinkClick: A, sendButton: j, attachmentPreviewList: M, viewerLanguage: N, showChannelInfo: P = !0, onParticipantNameClick: F, onOutboundClick: I, resolveOutbound: L, composerInput: R }) => {
3319
+ }, Ji = o.memo(({ channel: e, onBack: t, showBackButton: n = !1, renderMessageInputActions: r, renderMessageInputFooter: i, renderConversationFooter: a, onLeaveConversation: o, onBlockParticipant: s, className: c, CustomChannelEmptyState: u = Wi, showDeleteConversation: f = !0, onDeleteConversationClick: p, onBlockParticipantClick: h, onReportParticipantClick: g, showBlockParticipant: _ = !0, showReportParticipant: v = !0, composerDisabled: y = !1, composerDisabledReason: b, dmAgentEnabled: x, messageMetadata: C, onMessageSent: w, showStarButton: T = !1, renderChannelBanner: E, customChannelActions: D, renderChannelActions: O, renderMessage: k, onMessageLinkClick: A, sendButton: j, attachmentPreviewList: M, viewerLanguage: N, showChannelInfo: P = !0, onParticipantNameClick: F, onOutboundClick: I, resolveOutbound: L, composerInput: R }) => {
3291
3320
  let z = l(async (t, n, r) => {
3292
3321
  let i = e.data?.chatbot_paused === !0, a = x && !i, o = {
3293
3322
  ...n,
@@ -3319,25 +3348,25 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3319
3348
  };
3320
3349
  return t.addEventListener("click", n), () => t.removeEventListener("click", n);
3321
3350
  }, [A, e]);
3322
- let te = we(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
3351
+ let te = q(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
3323
3352
  return /* @__PURE__ */ U("div", {
3324
3353
  ref: ee,
3325
3354
  "data-testid": "channel-view",
3326
3355
  className: J("messaging-channel-view h-full flex flex-col", c),
3327
3356
  style: te,
3328
- children: /* @__PURE__ */ U(Li.Provider, {
3357
+ children: /* @__PURE__ */ U(Ri.Provider, {
3329
3358
  value: x ?? !1,
3330
3359
  children: /* @__PURE__ */ U(S, {
3331
3360
  channel: e,
3332
- MessageSystem: Ii,
3361
+ MessageSystem: Li,
3333
3362
  EmptyStateIndicator: u,
3334
- LoadingIndicator: Gi,
3335
- DateSeparator: Et,
3336
- TypingIndicator: Bi,
3363
+ LoadingIndicator: Ki,
3364
+ DateSeparator: Tt,
3365
+ TypingIndicator: Vi,
3337
3366
  doSendMessageRequest: z,
3338
3367
  ...j ? { SendButton: j } : {},
3339
3368
  ...M ? { AttachmentPreviewList: M } : {},
3340
- children: /* @__PURE__ */ U(Ki, {
3369
+ children: /* @__PURE__ */ U(qi, {
3341
3370
  onBack: t,
3342
3371
  showBackButton: n,
3343
3372
  renderMessageInputActions: r,
@@ -3370,10 +3399,10 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3370
3399
  })
3371
3400
  });
3372
3401
  });
3373
- qi.displayName = "ChannelView";
3402
+ Ji.displayName = "ChannelView";
3374
3403
  //#endregion
3375
3404
  //#region src/components/MessagingShell/ErrorState.tsx
3376
- var Ji = o.memo(({ message: e, onBack: t }) => /* @__PURE__ */ U("div", {
3405
+ var Yi = o.memo(({ message: e, onBack: t }) => /* @__PURE__ */ U("div", {
3377
3406
  className: "messaging-error-state flex items-center justify-center h-full p-8",
3378
3407
  children: /* @__PURE__ */ W("div", {
3379
3408
  className: "text-center max-w-sm",
@@ -3402,11 +3431,11 @@ var Ji = o.memo(({ message: e, onBack: t }) => /* @__PURE__ */ U("div", {
3402
3431
  ]
3403
3432
  })
3404
3433
  }));
3405
- Ji.displayName = "ErrorState";
3434
+ Yi.displayName = "ErrorState";
3406
3435
  //#endregion
3407
3436
  //#region src/components/MessagingShell/index.tsx
3408
- var Yi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversationFooter: n, onChannelSelect: r, onExitConversation: i, initialParticipantFilter: a, initialParticipantData: o, CustomChannelEmptyState: s, onBlockParticipantClick: c, onReportParticipantClick: u, dmAgentEnabled: f, onMessageSent: p, viewerLanguage: g, renderChannelBanner: _, customChannelActions: v, renderChannelActions: y, onParticipantNameClick: b, onOutboundClick: x, resolveOutbound: S, renderMessage: C, onMessageLinkClick: w, showChannelInfo: T, composerInput: E, attachmentPreviewList: D }) => {
3409
- let { client: O, isConnected: k, isLoading: A, error: j, refreshConnection: M, service: N, debug: P } = at(), [F, I] = h(null), [L, R] = h(null), [z, ee] = h(!1), { showDeleteConversation: te = !0 } = e, ne = m(o);
3437
+ var Xi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversationFooter: n, onChannelSelect: r, onExitConversation: i, initialParticipantFilter: a, initialParticipantData: o, CustomChannelEmptyState: s, onBlockParticipantClick: c, onReportParticipantClick: u, dmAgentEnabled: f, onMessageSent: p, viewerLanguage: g, renderChannelBanner: _, customChannelActions: v, renderChannelActions: y, onParticipantNameClick: b, onOutboundClick: x, resolveOutbound: S, renderMessage: C, onMessageLinkClick: w, showChannelInfo: T, composerInput: E, attachmentPreviewList: D }) => {
3438
+ let { client: O, isConnected: k, isLoading: A, error: j, refreshConnection: M, service: N, debug: P } = it(), [F, I] = h(null), [L, R] = h(null), [z, ee] = h(!1), { showDeleteConversation: te = !0 } = e, ne = m(o);
3410
3439
  ne.current = o;
3411
3440
  let re = m(r);
3412
3441
  re.current = r;
@@ -3465,17 +3494,17 @@ var Yi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversati
3465
3494
  let oe = l(() => {
3466
3495
  I(null), ee(!0), ae.current?.();
3467
3496
  }, []);
3468
- return A ? /* @__PURE__ */ U(Gi, {}) : j ? /* @__PURE__ */ U(Ji, {
3497
+ return A ? /* @__PURE__ */ U(Ki, {}) : j ? /* @__PURE__ */ U(Yi, {
3469
3498
  message: j,
3470
3499
  onBack: M
3471
- }) : !k || !O ? /* @__PURE__ */ U(Ji, {
3500
+ }) : !k || !O ? /* @__PURE__ */ U(Yi, {
3472
3501
  message: "Not connected to messaging service",
3473
3502
  onBack: M
3474
- }) : L ? /* @__PURE__ */ U(Ji, { message: L }) : z && !F ? /* @__PURE__ */ U(Ji, { message: "Conversation ended" }) : F ? /* @__PURE__ */ U("div", {
3503
+ }) : L ? /* @__PURE__ */ U(Yi, { message: L }) : z && !F ? /* @__PURE__ */ U(Yi, { message: "Conversation ended" }) : F ? /* @__PURE__ */ U("div", {
3475
3504
  className: "messaging-shell h-full bg-background-primary overflow-hidden",
3476
3505
  children: /* @__PURE__ */ U("div", {
3477
3506
  className: "flex h-full min-h-0 flex-col",
3478
- children: /* @__PURE__ */ U(qi, {
3507
+ children: /* @__PURE__ */ U(Ji, {
3479
3508
  channel: F,
3480
3509
  renderMessageInputActions: t,
3481
3510
  renderConversationFooter: n,
@@ -3501,30 +3530,30 @@ var Yi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversati
3501
3530
  attachmentPreviewList: D
3502
3531
  }, F.id)
3503
3532
  })
3504
- }) : /* @__PURE__ */ U(Gi, {});
3533
+ }) : /* @__PURE__ */ U(Ki, {});
3505
3534
  };
3506
3535
  //#endregion
3507
3536
  //#region src/hooks/useRestorePendingMessages.ts
3508
- function Xi(e) {
3537
+ function Zi(e) {
3509
3538
  let t = e.state.pending_messages;
3510
3539
  if (t?.length) for (let n of t) e.state.addMessageSorted(n.message);
3511
3540
  }
3512
3541
  //#endregion
3513
3542
  //#region src/components/ChannelList/ChannelListContext.tsx
3514
- var Zi = o.createContext({
3543
+ var Qi = o.createContext({
3515
3544
  selectedChannel: void 0,
3516
3545
  onChannelSelect: () => {},
3517
3546
  debug: !1,
3518
3547
  renderMessagePreview: void 0,
3519
3548
  channelPreview: void 0,
3520
3549
  viewerLanguage: void 0
3521
- }), Qi = Zi.Provider, $i = () => o.useContext(Zi), ea = (e, t) => {
3550
+ }), $i = Qi.Provider, ea = () => o.useContext(Qi), ta = (e, t) => {
3522
3551
  let n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), r = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
3523
3552
  return Math.floor((r - n) / 864e5);
3524
- }, ta = (e) => {
3553
+ }, na = (e) => {
3525
3554
  let t = /* @__PURE__ */ new Date();
3526
3555
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60) return "Just now";
3527
- let n = ea(e, t);
3556
+ let n = ta(e, t);
3528
3557
  return n === 0 ? e.toLocaleTimeString([], {
3529
3558
  hour: "numeric",
3530
3559
  minute: "2-digit",
@@ -3537,8 +3566,8 @@ var Zi = o.createContext({
3537
3566
  day: "numeric",
3538
3567
  year: "numeric"
3539
3568
  });
3540
- }, na = o.memo((e) => {
3541
- let { channel: t, unread: n } = e, { selectedChannel: r, onChannelSelect: i, debug: a, channelPreview: o, renderMessagePreview: s, viewerLanguage: c } = $i(), { client: l } = he(), u = r?.id === t?.id, d = ot(t);
3569
+ }, ra = o.memo((e) => {
3570
+ let { channel: t, unread: n } = e, { selectedChannel: r, onChannelSelect: i, debug: a, channelPreview: o, renderMessagePreview: s, viewerLanguage: c } = ea(), { client: l } = he(), u = r?.id === t?.id, d = at(t);
3542
3571
  if (o) return /* @__PURE__ */ U(o, {
3543
3572
  ...e,
3544
3573
  active: u,
@@ -3551,13 +3580,13 @@ var Zi = o.createContext({
3551
3580
  }, p = (e) => {
3552
3581
  let t = e.key === "Enter" || e.key === " ", n = e.repeat;
3553
3582
  !t || n || (e.preventDefault(), f());
3554
- }, m = st(t?.state?.members, l?.userID, t?.type), h = dt(m?.user), g = m?.user?.image, _ = (() => {
3583
+ }, m = ot(t?.state?.members, l?.userID, t?.type), h = ut(m?.user), g = m?.user?.image, _ = (() => {
3555
3584
  let e = t?.state?.messages;
3556
3585
  if (e?.length) {
3557
3586
  for (let t = e.length - 1; t >= 0; t--) if (e[t].type !== "system") return e[t];
3558
3587
  }
3559
3588
  })(), v = (() => {
3560
- let e = Ot({
3589
+ let e = Dt({
3561
3590
  message: _,
3562
3591
  viewerLanguage: c
3563
3592
  }), { custom_type: t, attachment_content_type: n } = _?.metadata || {};
@@ -3570,7 +3599,7 @@ var Zi = o.createContext({
3570
3599
  if (e) return e;
3571
3600
  let r = _?.attachments?.[0];
3572
3601
  return r ? r.og_scrape_url ? r.og_scrape_url : r.type === "image" ? "📷 Sent an image" : r.type === "video" ? "🎥 Sent a video" : r.type === "audio" ? "🎵 Sent audio" : r.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
3573
- })(), y = _?.created_at ? ta(new Date(_.created_at)) : "", b = _ ? Bt(_) : !1, x = s ? s(_, v) : `${b ? "✨ " : ""}${v}`, S = n ?? 0;
3602
+ })(), y = _?.created_at ? na(new Date(_.created_at)) : "", b = _ ? _n(_) : !1, x = s ? s(_, v) : `${b ? "✨ " : ""}${v}`, S = n ?? 0;
3574
3603
  return a && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
3575
3604
  channelId: t?.id,
3576
3605
  isSelected: u,
@@ -3589,7 +3618,7 @@ var Zi = o.createContext({
3589
3618
  "data-dd-privacy": "mask",
3590
3619
  children: /* @__PURE__ */ W("div", {
3591
3620
  className: "flex items-start gap-4",
3592
- children: [/* @__PURE__ */ U(_t, {
3621
+ children: [/* @__PURE__ */ U(gt, {
3593
3622
  id: m?.user?.id || t.id || "unknown",
3594
3623
  name: h,
3595
3624
  image: g,
@@ -3625,14 +3654,14 @@ var Zi = o.createContext({
3625
3654
  })
3626
3655
  });
3627
3656
  });
3628
- na.displayName = "CustomChannelPreview";
3657
+ ra.displayName = "CustomChannelPreview";
3629
3658
  //#endregion
3630
3659
  //#region src/components/ChannelList/index.tsx
3631
- var ra = { last_message_at: -1 }, ia = o.memo(({ onChannelSelect: e, selectedChannel: t, filters: n, allowNewMessagesFromUnfilteredChannels: r = !1, channelRenderFilterFn: i, sort: a = ra, className: s, customEmptyStateIndicator: c, channelListPaginator: l = D, channelPreview: u, renderMessagePreview: d, viewerLanguage: f, lockChannelOrder: p, onMessageNewHandler: m, onMessageNew: h, onChannelVisible: g, onAddedToChannel: _, onChannelUpdated: v }) => {
3660
+ var ia = { last_message_at: -1 }, aa = o.memo(({ onChannelSelect: e, selectedChannel: t, filters: n, allowNewMessagesFromUnfilteredChannels: r = !1, channelRenderFilterFn: i, sort: a = ia, className: s, customEmptyStateIndicator: c, channelListPaginator: l = D, channelPreview: u, renderMessagePreview: d, viewerLanguage: f, lockChannelOrder: p, onMessageNewHandler: m, onMessageNew: h, onChannelVisible: g, onAddedToChannel: _, onChannelUpdated: v }) => {
3632
3661
  let y = o.useRef(0);
3633
3662
  y.current++;
3634
- let { debug: b = !1 } = rt(), x = o.useCallback((e) => {
3635
- for (let t of e) Xi(t);
3663
+ let { debug: b = !1 } = nt(), x = o.useCallback((e) => {
3664
+ for (let t of e) Zi(t);
3636
3665
  return i ? i(e) : e;
3637
3666
  }, [i]);
3638
3667
  b && console.log("📺 [ChannelList] 🔄 RENDER START", {
@@ -3659,7 +3688,7 @@ var ra = { last_message_at: -1 }, ia = o.memo(({ onChannelSelect: e, selectedCha
3659
3688
  className: J("messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden", s),
3660
3689
  children: /* @__PURE__ */ U("div", {
3661
3690
  className: "flex-1 overflow-hidden min-w-0",
3662
- children: /* @__PURE__ */ U(Qi, {
3691
+ children: /* @__PURE__ */ U($i, {
3663
3692
  value: S,
3664
3693
  children: /* @__PURE__ */ U(C, {
3665
3694
  filters: n,
@@ -3674,32 +3703,32 @@ var ra = { last_message_at: -1 }, ia = o.memo(({ onChannelSelect: e, selectedCha
3674
3703
  onAddedToChannel: _,
3675
3704
  onChannelUpdated: v,
3676
3705
  Paginator: l,
3677
- Preview: na,
3706
+ Preview: ra,
3678
3707
  EmptyStateIndicator: c
3679
3708
  }, `${JSON.stringify(n)}:${JSON.stringify(a)}`)
3680
3709
  })
3681
3710
  })
3682
3711
  });
3683
3712
  });
3684
- ia.displayName = "ChannelList";
3713
+ aa.displayName = "ChannelList";
3685
3714
  //#endregion
3686
3715
  //#region src/components/RichCard/RichCardBody.tsx
3687
- var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa = "text-[14px] leading-5 tracking-[0.02em]", sa = () => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("br", {}), /* @__PURE__ */ U("span", {
3716
+ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa = "text-[14px] leading-5 tracking-[0.02em]", ca = () => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("br", {}), /* @__PURE__ */ U("span", {
3688
3717
  "aria-hidden": !0,
3689
3718
  className: "block h-1.5"
3690
- })] }), ca = (e) => e.split(/\r?\n/).map((e, t, n) => /* @__PURE__ */ W(o.Fragment, { children: [e, t < n.length - 1 ? /* @__PURE__ */ U(sa, {}) : null] }, t)), la = ({ surface: e, actions: t, layout: n }) => {
3719
+ })] }), la = (e) => e.split(/\r?\n/).map((e, t, n) => /* @__PURE__ */ W(o.Fragment, { children: [e, t < n.length - 1 ? /* @__PURE__ */ U(ca, {}) : null] }, t)), ua = ({ surface: e, actions: t, layout: n }) => {
3691
3720
  if (t == null || t.length === 0) return null;
3692
3721
  let r = n === "stacked";
3693
3722
  return /* @__PURE__ */ U("div", {
3694
3723
  className: J("flex gap-2", r ? "mt-4 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"),
3695
- children: t.map((t, n) => /* @__PURE__ */ U(pn, {
3724
+ children: t.map((t, n) => /* @__PURE__ */ U(Mt, {
3696
3725
  variant: e,
3697
3726
  cta: t,
3698
3727
  fullWidth: r,
3699
3728
  standalone: !0
3700
3729
  }, `${t.label}-${n}`))
3701
3730
  });
3702
- }, ua = ({ ctaSurface: e, chinTextColor: t, title: n, subtitle: r, subtitleLines: i = 3, appIcon: a, actions: o }) => {
3731
+ }, da = ({ ctaSurface: e, chinTextColor: t, title: n, subtitle: r, subtitleLines: i = 3, appIcon: a, actions: o }) => {
3703
3732
  let s = n != null && n.trim() !== "", c = r != null && r.trim() !== "", l = o != null && o.length > 0;
3704
3733
  if (!s && !c && !l) return null;
3705
3734
  let u = { color: t }, d = i > 1 ? {
@@ -3716,14 +3745,14 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3716
3745
  className: "shrink-0",
3717
3746
  children: a
3718
3747
  }) : null, /* @__PURE__ */ U("p", {
3719
- className: J("min-w-0", aa),
3748
+ className: J("min-w-0", oa),
3720
3749
  style: u,
3721
3750
  children: n
3722
3751
  })]
3723
3752
  }), c && /* @__PURE__ */ U("p", {
3724
- className: J(oa, i <= 1 && "truncate"),
3753
+ className: J(sa, i <= 1 && "truncate"),
3725
3754
  style: d,
3726
- children: i > 1 ? ca(r ?? "") : r
3755
+ children: i > 1 ? la(r ?? "") : r
3727
3756
  })]
3728
3757
  });
3729
3758
  return /* @__PURE__ */ U("div", {
@@ -3731,21 +3760,21 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3731
3760
  children: f ? /* @__PURE__ */ W("div", {
3732
3761
  "data-testid": "rich-card-chin-row",
3733
3762
  className: "flex items-center justify-between gap-3",
3734
- children: [p, /* @__PURE__ */ U(la, {
3763
+ children: [p, /* @__PURE__ */ U(ua, {
3735
3764
  surface: e,
3736
3765
  actions: o,
3737
3766
  layout: "row"
3738
3767
  })]
3739
- }) : /* @__PURE__ */ W(H, { children: [p, /* @__PURE__ */ U(la, {
3768
+ }) : /* @__PURE__ */ W(H, { children: [p, /* @__PURE__ */ U(ua, {
3740
3769
  surface: e,
3741
3770
  actions: o,
3742
3771
  layout: "stacked"
3743
3772
  })] })
3744
3773
  });
3745
- }, da = {
3774
+ }, fa = {
3746
3775
  dark: "bg-white/[0.06]",
3747
3776
  light: "bg-black/[0.04]"
3748
- }, fa = {
3777
+ }, pa = {
3749
3778
  1: [0],
3750
3779
  2: [-10, 10],
3751
3780
  3: [
@@ -3753,7 +3782,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3753
3782
  0,
3754
3783
  13
3755
3784
  ]
3756
- }, pa = {
3785
+ }, ma = {
3757
3786
  1: [0],
3758
3787
  2: [-26, 26],
3759
3788
  3: [
@@ -3761,7 +3790,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3761
3790
  0,
3762
3791
  40
3763
3792
  ]
3764
- }, ma = {
3793
+ }, ha = {
3765
3794
  1: [0],
3766
3795
  2: [0, 1],
3767
3796
  3: [
@@ -3769,7 +3798,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3769
3798
  3,
3770
3799
  2
3771
3800
  ]
3772
- }, ha = {
3801
+ }, ga = {
3773
3802
  1: [1],
3774
3803
  2: [1, 1],
3775
3804
  3: [
@@ -3777,15 +3806,15 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3777
3806
  1.08,
3778
3807
  1
3779
3808
  ]
3780
- }, ga = ({ variant: e, images: t }) => {
3809
+ }, _a = ({ variant: e, images: t }) => {
3781
3810
  let [n, r] = o.useState({}), i = t.join("\n"), [s, c] = o.useState(i);
3782
3811
  i !== s && (c(i), r({}));
3783
3812
  let l = t.slice(0, 3).map((e, t) => ({
3784
3813
  src: e,
3785
3814
  index: t
3786
- })).filter(({ index: e }) => !n[e]), u = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, d = fa[u], f = pa[u], p = ma[u], m = ha[u];
3815
+ })).filter(({ index: e }) => !n[e]), u = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, d = pa[u], f = ma[u], p = ha[u], m = ga[u];
3787
3816
  return /* @__PURE__ */ U("div", {
3788
- className: J("relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden", da[e]),
3817
+ className: J("relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden", fa[e]),
3789
3818
  children: l.map(({ src: e, index: t }, n) => /* @__PURE__ */ U("img", {
3790
3819
  src: a(e) ?? e,
3791
3820
  alt: "",
@@ -3803,44 +3832,44 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3803
3832
  }
3804
3833
  }, `${e}-${t}`))
3805
3834
  });
3806
- }, _a = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", va = ({ variant: e, presentation: t, images: n, title: r, heroUrl: i, onHeroError: a }) => /* @__PURE__ */ U("div", {
3807
- className: _a,
3808
- children: t === "fan" ? /* @__PURE__ */ U(ga, {
3835
+ }, va = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", ya = ({ variant: e, presentation: t, images: n, title: r, heroUrl: i, onHeroError: a }) => /* @__PURE__ */ U("div", {
3836
+ className: va,
3837
+ children: t === "fan" ? /* @__PURE__ */ U(_a, {
3809
3838
  variant: e,
3810
3839
  images: n
3811
- }) : /* @__PURE__ */ U(On, {
3840
+ }) : /* @__PURE__ */ U(qt, {
3812
3841
  variant: e,
3813
3842
  thumbnailUrl: i,
3814
3843
  title: r,
3815
3844
  mimeType: "image/*",
3816
3845
  onImageError: a
3817
3846
  })
3818
- }), ya = ({ variant: e, title: t, subtitle: n, subtitleLines: r, images: i = [], imagePresentation: a, actions: o, appIcon: s, accentColor: c, groupPosition: l = "single" }) => {
3847
+ }), ba = ({ variant: e, title: t, subtitle: n, subtitleLines: r, images: i = [], imagePresentation: a, actions: o, appIcon: s, accentColor: c, groupPosition: l = "single" }) => {
3819
3848
  let u = Te({
3820
3849
  imagePresentation: a,
3821
3850
  images: i
3822
- }), d = i.length > 0, f = d && u === "hero", p = Pn({
3851
+ }), d = i.length > 0, f = d && u === "hero", p = $t({
3823
3852
  variant: e,
3824
3853
  accentColor: c,
3825
3854
  layout: "featured",
3826
3855
  thumbnailUrl: f ? i[0] : void 0
3827
3856
  }), m = l === "single" || l === "end";
3828
- return /* @__PURE__ */ U(Rn, {
3857
+ return /* @__PURE__ */ U(rn, {
3829
3858
  accentHex: p.accentHex,
3830
3859
  side: e === "dark" ? "sender" : "receiver",
3831
3860
  visible: m,
3832
- children: /* @__PURE__ */ W(Sn, {
3861
+ children: /* @__PURE__ */ W(Vt, {
3833
3862
  variant: e,
3834
3863
  accentHex: p.accentHex,
3835
3864
  "data-testid": "rich-card",
3836
- children: [d && /* @__PURE__ */ U(va, {
3865
+ children: [d && /* @__PURE__ */ U(ya, {
3837
3866
  variant: e,
3838
3867
  presentation: u,
3839
3868
  images: i,
3840
3869
  title: t,
3841
3870
  heroUrl: f ? p.thumbnailUrl : void 0,
3842
3871
  onHeroError: p.onImageError
3843
- }), /* @__PURE__ */ U(ua, {
3872
+ }), /* @__PURE__ */ U(da, {
3844
3873
  ctaSurface: p.surface,
3845
3874
  chinTextColor: p.chinTextColor,
3846
3875
  title: t,
@@ -3851,19 +3880,19 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3851
3880
  })]
3852
3881
  })
3853
3882
  });
3854
- }, ba = {
3855
- Sent: (e) => /* @__PURE__ */ U(ya, {
3883
+ }, xa = {
3884
+ Sent: (e) => /* @__PURE__ */ U(ba, {
3856
3885
  ...e,
3857
3886
  variant: "dark"
3858
3887
  }),
3859
- Received: (e) => /* @__PURE__ */ U(ya, {
3888
+ Received: (e) => /* @__PURE__ */ U(ba, {
3860
3889
  ...e,
3861
3890
  variant: "light"
3862
3891
  })
3863
- }, xa = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E\") no-repeat center / 100% 100%", Sa = {
3892
+ }, Sa = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E\") no-repeat center / 100% 100%", Ca = {
3864
3893
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
3865
3894
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
3866
- }, Ca = ({ variant: e }) => /* @__PURE__ */ U("span", {
3895
+ }, wa = ({ variant: e }) => /* @__PURE__ */ U("span", {
3867
3896
  "aria-hidden": "true",
3868
3897
  className: "pointer-events-none absolute bottom-0 z-[-1] h-[1.4375rem] w-5",
3869
3898
  style: {
@@ -3871,11 +3900,11 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3871
3900
  insetInlineStart: e === "received" ? "calc(-1 * 0.3125rem)" : void 0,
3872
3901
  transform: e === "received" ? "scaleX(-1)" : void 0,
3873
3902
  transformOrigin: "center",
3874
- backgroundColor: Sa[e],
3875
- WebkitMask: xa,
3876
- mask: xa
3903
+ backgroundColor: Ca[e],
3904
+ WebkitMask: Sa,
3905
+ mask: Sa
3877
3906
  }
3878
- }), wa = {
3907
+ }), Ta = {
3879
3908
  sent: {
3880
3909
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
3881
3910
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -3884,11 +3913,11 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3884
3913
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
3885
3914
  color: "var(--str-chat__message-bubble-color, #000000)"
3886
3915
  }
3887
- }, Ta = ({ variant: e, text: t, tail: n = !0, header: r, className: i }) => /* @__PURE__ */ W("div", {
3916
+ }, Ea = ({ variant: e, text: t, tail: n = !0, header: r, className: i }) => /* @__PURE__ */ W("div", {
3888
3917
  "data-dd-privacy": "mask",
3889
3918
  className: J("relative px-4 py-3", "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]", i),
3890
3919
  style: {
3891
- ...wa[e],
3920
+ ...Ta[e],
3892
3921
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
3893
3922
  isolation: "isolate"
3894
3923
  },
@@ -3902,23 +3931,23 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3902
3931
  className: "m-0 whitespace-pre-wrap break-words hyphens-manual",
3903
3932
  children: t
3904
3933
  }),
3905
- n && /* @__PURE__ */ U(Ca, { variant: e })
3934
+ n && /* @__PURE__ */ U(wa, { variant: e })
3906
3935
  ]
3907
- }), Ea = {
3908
- Sent: ({ text: e, tail: t, className: n }) => /* @__PURE__ */ U(Ta, {
3936
+ }), Da = {
3937
+ Sent: ({ text: e, tail: t, className: n }) => /* @__PURE__ */ U(Ea, {
3909
3938
  variant: "sent",
3910
3939
  text: e,
3911
3940
  tail: t,
3912
3941
  className: n
3913
3942
  }),
3914
- Received: ({ text: e, tail: t, header: n, className: r }) => /* @__PURE__ */ U(Ta, {
3943
+ Received: ({ text: e, tail: t, header: n, className: r }) => /* @__PURE__ */ U(Ea, {
3915
3944
  variant: "received",
3916
3945
  text: e,
3917
3946
  tail: t,
3918
3947
  header: n,
3919
3948
  className: r
3920
3949
  })
3921
- }, Da = ({ question: e, onClick: t, loading: n = !1, className: r }) => /* @__PURE__ */ U("button", {
3950
+ }, Oa = ({ question: e, onClick: t, loading: n = !1, className: r }) => /* @__PURE__ */ U("button", {
3922
3951
  type: "button",
3923
3952
  onClick: t,
3924
3953
  disabled: n,
@@ -3928,7 +3957,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3928
3957
  "opacity-50 cursor-not-allowed": n
3929
3958
  }, r),
3930
3959
  children: e
3931
- }), Oa = ({ faqs: e, onFaqClick: t, loadingFaqId: n, headerText: r, className: i, avatarImage: a, avatarName: o }) => {
3960
+ }), ka = ({ faqs: e, onFaqClick: t, loadingFaqId: n, headerText: r, className: i, avatarImage: a, avatarName: o }) => {
3932
3961
  let s = Ee(e);
3933
3962
  return s.length === 0 ? null : /* @__PURE__ */ U("div", {
3934
3963
  className: i,
@@ -3936,7 +3965,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3936
3965
  className: "flex gap-3 items-end",
3937
3966
  children: [(a || o) && /* @__PURE__ */ U("div", {
3938
3967
  className: "flex-none",
3939
- children: /* @__PURE__ */ U(_t, {
3968
+ children: /* @__PURE__ */ U(gt, {
3940
3969
  id: o || "account",
3941
3970
  name: o || "Account",
3942
3971
  image: a,
@@ -3950,7 +3979,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3950
3979
  "data-testid": "faq-list-header",
3951
3980
  className: "text-md text-charcoal mb-4",
3952
3981
  children: r
3953
- }), s.map((e) => /* @__PURE__ */ U(Da, {
3982
+ }), s.map((e) => /* @__PURE__ */ U(Oa, {
3954
3983
  question: e.question,
3955
3984
  onClick: () => t(e.id),
3956
3985
  loading: n === e.id
@@ -3960,6 +3989,6 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3960
3989
  });
3961
3990
  };
3962
3991
  //#endregion
3963
- export { bt as ActionButton, _t as Avatar, Ui as ChannelEmptyState, ia as ChannelList, qi as ChannelView, Mt as CustomMessageProvider, Oa as FaqList, Da as FaqListItem, zn as LinkAttachment, Lt as LockedAttachment, Q as MessageAttachment, Ea as MessageBubble, et as MessagingLoggerProvider, it as MessagingProvider, Yi as MessagingShell, ba as RichCard, tn as TipMessage, nr as buildCompactMetaLabel, $n as formatFileSize, ta as formatRelativeTime, tr as getFileExtensionLabel, Ot as getMessageDisplayText, kt as isLinkAttachment, en as isTipMessage, lt as isUuidLike, Jn as messageAttachmentGroupPositionFromStream, Dt as normalizeLanguageCode, a as optimizeMessagingAttachmentUrl, st as resolveConversationParticipant, dt as resolveParticipantDisplayName, Si as useComposerLocked, Nt as useCustomMessage, at as useMessaging, tt as useMessagingLogger };
3992
+ export { yt as ActionButton, gt as Avatar, Wi as ChannelEmptyState, aa as ChannelList, Ji as ChannelView, ln as CustomMessageProvider, ka as FaqList, Oa as FaqListItem, an as LinkAttachment, mn as LockedAttachment, $r as MessageAttachment, Da as MessageBubble, $e as MessagingLoggerProvider, rt as MessagingProvider, Xi as MessagingShell, xa as RichCard, Mn as TipMessage, tr as buildCompactMetaLabel, Qn as formatFileSize, na as formatRelativeTime, er as getFileExtensionLabel, Dt as getMessageDisplayText, on as isLinkAttachment, jn as isTipMessage, ct as isUuidLike, qn as messageAttachmentGroupPositionFromStream, Et as normalizeLanguageCode, a as optimizeMessagingAttachmentUrl, ot as resolveConversationParticipant, ut as resolveParticipantDisplayName, Ci as useComposerLocked, un as useCustomMessage, it as useMessaging, et as useMessagingLogger };
3964
3993
 
3965
3994
  //# sourceMappingURL=index.js.map