@nivaro/react 0.3.135 → 0.3.137

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.
@@ -1,6 +1,6 @@
1
1
  import { jsxs as a, jsx as e, Fragment as we } from "react/jsx-runtime";
2
2
  import { useQuery as Ue, useQueryClient as Bt, useMutation as Fe } from "@tanstack/react-query";
3
- import { Search as Yn, Plus as Ka, Hash as Ot, Lock as Ja, ChevronLeft as ft, X as bt, PinOff as Ya, Pin as Lt, Headphones as Za, PlayCircle as Va, MessageCircle as Zn, Users as Pt, AtSign as Xa, AlarmClock as es, Sparkles as ts, BellOff as Rn, PencilLine as ns, Star as as, ArchiveRestore as ss, Archive as rs, Bell as ls, LogOut as os, Info as is, MapPin as On, Check as Wt, ArrowUpDown as cs, MessageSquareReply as ds, Quote as us, ClipboardPlus as ms, NotebookPen as ps, Bookmark as hs, Pencil as fs, Trash2 as xs, AlertTriangle as bs, Paperclip as gs, Bot as vs, CheckCheck as ys, Plane as ks, FilePlus2 as ws } from "lucide-react";
3
+ import { Search as Yn, Plus as Ka, Hash as Rt, Lock as Ja, ChevronLeft as ft, X as bt, PinOff as Ya, Pin as Lt, Headphones as Za, PlayCircle as Va, MessageCircle as Zn, Users as Pt, AtSign as Xa, AlarmClock as es, Sparkles as ts, BellOff as On, PencilLine as ns, Star as as, ArchiveRestore as ss, Archive as rs, Bell as ls, LogOut as os, Info as is, MapPin as Rn, Check as Wt, ArrowUpDown as cs, MessageSquareReply as ds, Quote as us, ClipboardPlus as ms, NotebookPen as ps, Bookmark as hs, Pencil as fs, Trash2 as xs, AlertTriangle as bs, Paperclip as gs, Bot as vs, CheckCheck as ys, Plane as ks, FilePlus2 as ws } from "lucide-react";
4
4
  import { useState as S, useEffect as le, useMemo as ye, useRef as me, useContext as Ns } from "react";
5
5
  import { toast as ve } from "sonner";
6
6
  import { useItemEditAuth as gt, useNavigation as Cs, useNivaroClient as tt } from "../../context.js";
@@ -15,9 +15,9 @@ import { userCardQuery as Ds } from "../../lib/user-cards.js";
15
15
  import { cn as v, toLocalDateString as $s, getDisplayTimezone as Ft, formatRelative as ta } from "../../lib/utils.js";
16
16
  import { CustomStatusEditor as Ms } from "../CustomStatusEditor.js";
17
17
  import { DoNotDisturbRow as As } from "../DoNotDisturb.js";
18
- import { useFileDownload as Rs } from "../item-edit/file-download.js";
18
+ import { useFileDownload as Os } from "../item-edit/file-download.js";
19
19
  import { UserChip as Ht } from "../item-edit/UserChip.js";
20
- import { StaleBuildChip as Os } from "../StaleBuildChip.js";
20
+ import { StaleBuildChip as Rs } from "../StaleBuildChip.js";
21
21
  import { UserAvatar as Ls } from "../UserAvatar.js";
22
22
  import { Popover as nt, PopoverTrigger as at, PopoverContent as st } from "../ui/popover.js";
23
23
  import { SimpleSelect as zt } from "../ui/SimpleSelect.js";
@@ -42,7 +42,7 @@ import { HuddleStage as $r } from "./huddle/HuddleStage.js";
42
42
  import { useHuddleLive as Mr } from "./huddle/huddle-live.js";
43
43
  import { stripHuddleRef as qn, huddleRefOf as En } from "./huddle/huddle-schedule.js";
44
44
  import { useHuddle as Ar } from "./huddle/useHuddle.js";
45
- import { MemberSearchBox as Rr, MemberOnlineDot as Or, MemberLoadMore as Lr } from "./MemberPaging.js";
45
+ import { MemberSearchBox as Or, MemberOnlineDot as Rr, MemberLoadMore as Lr } from "./MemberPaging.js";
46
46
  import { useMessageActions as Pr, MessageActionsMenu as Ir, actionsForMessage as jr } from "./MessageActions.js";
47
47
  import { FormattedMessage as qr, LinkPreviews as Er } from "./MessageFormat.js";
48
48
  import { PollCard as Br } from "./PollCard.js";
@@ -78,7 +78,7 @@ function _o({
78
78
  sessionUrl: i,
79
79
  realtime: b,
80
80
  subscribeRooms: k,
81
- setTypingRoom: R,
81
+ setTypingRoom: O,
82
82
  navigate: T,
83
83
  sound: _ = !0,
84
84
  theme: U
@@ -97,7 +97,7 @@ function _o({
97
97
  subscribeRooms: k,
98
98
  me: r,
99
99
  onlineUsers: l,
100
- setTypingRoom: R,
100
+ setTypingRoom: O,
101
101
  navigate: T,
102
102
  sound: _
103
103
  }),
@@ -110,7 +110,7 @@ function _o({
110
110
  c,
111
111
  p,
112
112
  b,
113
- R,
113
+ O,
114
114
  _
115
115
  ]
116
116
  );
@@ -260,7 +260,7 @@ function Hn({ token: t, url: r, mine: l }) {
260
260
  const s = Le(), o = pe(), c = tt(), { data: p } = Ue(ha(c)), { data: d } = Ue({
261
261
  queryKey: ["nvr-chat-entity-card", t],
262
262
  queryFn: async () => {
263
- var i, b, k, R;
263
+ var i, b, k, O;
264
264
  for (const T of p ?? [])
265
265
  try {
266
266
  const U = (b = (i = (await c.request(
@@ -271,9 +271,9 @@ function Hn({ token: t, url: r, mine: l }) {
271
271
  })
272
272
  )).data) == null ? void 0 : i[0]) == null ? void 0 : b.id;
273
273
  if (U == null) continue;
274
- const D = (R = (k = (await c.request(
274
+ const D = (O = (k = (await c.request(
275
275
  ke(`/pipelines/instance/${T.collection}/${U}`)
276
- )).data) == null ? void 0 : k.instance) == null ? void 0 : R.current_state_obj;
276
+ )).data) == null ? void 0 : k.instance) == null ? void 0 : O.current_state_obj;
277
277
  return {
278
278
  collection: T.collection,
279
279
  id: U,
@@ -301,9 +301,9 @@ function Hn({ token: t, url: r, mine: l }) {
301
301
  onClick: () => {
302
302
  var i, b;
303
303
  if (d) {
304
- const R = (s.recordUrl ?? ((T, _) => `/collections/${T}/${_}`))(d.collection, d.id);
305
- if (R) {
306
- (i = s.navigate) == null || i.call(s, R);
304
+ const O = (s.recordUrl ?? ((T, _) => `/collections/${T}/${_}`))(d.collection, d.id);
305
+ if (O) {
306
+ (i = s.navigate) == null || i.call(s, O);
307
307
  return;
308
308
  }
309
309
  }
@@ -439,7 +439,7 @@ function sl({ room: t }) {
439
439
  );
440
440
  const b = Ss(!!((X = i == null ? void 0 : i.sla) != null && X.due_at));
441
441
  if (!d || !h) return null;
442
- const R = (r.recordUrl ?? ((L, M) => `/collections/${L}/${M}`))(h.collection, h.id), T = (i == null ? void 0 : i.sla) ?? null, _ = ((K = i == null ? void 0 : i.state) == null ? void 0 : K.label) ?? h.state, U = i != null && i.state ? i.state.color : h.color, B = Jr(T, b), D = Yr(T, b) ?? (T == null ? void 0 : T.status), g = i != null && i.label && i.label.toLowerCase() !== String(p ?? "").toLowerCase() ? i.label : null, H = D === "breached" ? "bg-red-50 text-red-700 dark:bg-red-500/15 dark:text-red-300" : D === "warning" ? "bg-amber-50 text-amber-800 dark:bg-amber-500/15 dark:text-amber-300" : "bg-emerald-50 text-emerald-800 dark:bg-emerald-500/15 dark:text-emerald-300";
442
+ const O = (r.recordUrl ?? ((L, M) => `/collections/${L}/${M}`))(h.collection, h.id), T = (i == null ? void 0 : i.sla) ?? null, _ = ((K = i == null ? void 0 : i.state) == null ? void 0 : K.label) ?? h.state, U = i != null && i.state ? i.state.color : h.color, B = Jr(T, b), D = Yr(T, b) ?? (T == null ? void 0 : T.status), g = i != null && i.label && i.label.toLowerCase() !== String(p ?? "").toLowerCase() ? i.label : null, H = D === "breached" ? "bg-red-50 text-red-700 dark:bg-red-500/15 dark:text-red-300" : D === "warning" ? "bg-amber-50 text-amber-800 dark:bg-amber-500/15 dark:text-amber-300" : "bg-emerald-50 text-emerald-800 dark:bg-emerald-500/15 dark:text-emerald-300";
443
443
  return (
444
444
  // Two lines: what the record is and where it stands, then its clock (left) and who owns
445
445
  // it + Open (right) — the step always keeps its whole name, even in a narrow chat dock.
@@ -483,7 +483,7 @@ function sl({ room: t }) {
483
483
  _
484
484
  )
485
485
  ] }),
486
- (T || i && i.owners.length > 0 || R) && /* @__PURE__ */ a("div", { className: "flex min-w-0 items-center gap-2", children: [
486
+ (T || i && i.owners.length > 0 || O) && /* @__PURE__ */ a("div", { className: "flex min-w-0 items-center gap-2", children: [
487
487
  T && /* @__PURE__ */ e(
488
488
  "span",
489
489
  {
@@ -515,13 +515,13 @@ function sl({ room: t }) {
515
515
  ]
516
516
  }
517
517
  ),
518
- R && /* @__PURE__ */ e(
518
+ O && /* @__PURE__ */ e(
519
519
  "button",
520
520
  {
521
521
  type: "button",
522
522
  onClick: () => {
523
523
  var L;
524
- return (L = r.navigate) == null ? void 0 : L.call(r, R);
524
+ return (L = r.navigate) == null ? void 0 : L.call(r, O);
525
525
  },
526
526
  className: "shrink-0 text-[11px] font-semibold text-[#007a99] underline-offset-2 hover:underline dark:text-nvr-cyan",
527
527
  children: "Open"
@@ -614,11 +614,11 @@ function zn({
614
614
  openThread: d = null
615
615
  }) {
616
616
  var yn, kn, wn, Nn, Cn, _n, Sn, Tn, Un, Dn;
617
- const x = Le(), h = pe(), i = tt(), b = x.me, k = Ar(t), R = b ? Te(t, b.id) : null, T = !r.trim() || r.toLowerCase() === t.toLowerCase() || /^dm:/i.test(r), { data: _ } = Ue({
618
- ...Ds(i, R),
619
- enabled: !!R && T,
617
+ const x = Le(), h = pe(), i = tt(), b = x.me, k = Ar(t), O = b ? Te(t, b.id) : null, T = !r.trim() || r.toLowerCase() === t.toLowerCase() || /^dm:/i.test(r), { data: _ } = Ue({
618
+ ...Ds(i, O),
619
+ enabled: !!O && T,
620
620
  staleTime: 12e4
621
- }), U = T && R ? [_ == null ? void 0 : _.first_name, _ == null ? void 0 : _.last_name].filter(Boolean).join(" ") || (_ == null ? void 0 : _.email) || "Direct message" : r, [B, D] = S(p);
621
+ }), U = T && O ? [_ == null ? void 0 : _.first_name, _ == null ? void 0 : _.last_name].filter(Boolean).join(" ") || (_ == null ? void 0 : _.email) || "Direct message" : r, [B, D] = S(p);
622
622
  le(() => D(p), [p]);
623
623
  const { messages: g, loading: H, hasOlder: X, hasNewer: K, loadOlder: L, loadingOlder: M } = Vs(
624
624
  t,
@@ -693,18 +693,18 @@ function zn({
693
693
  }), z = Fe({
694
694
  mutationFn: (n) => i.request(_s(`/chat/messages/${n}`, { no_preview: !0 })),
695
695
  onSuccess: () => void _e.invalidateQueries({ queryKey: ["nvr-chat", t] })
696
- }), De = or(t), C = ir(t), { isAdmin: j } = gt(), { setMuted: E, setNotifyMode: de, setArchived: ae, setStarred: re, dismissWelcome: Y, leave: oe } = Gt(), { rooms: xe, loading: Sa } = ua(), Vt = xe.find((n) => n.room === t) ?? null, { rooms: Ta } = ma(!Sa && !Vt), w = Vt ?? Ta.find((n) => n.room === t) ?? null, Ua = Na(w), Xt = w != null && w.muted ? "muted" : (w == null ? void 0 : w.notify_mode) === "mentions" ? "mentions" : "all", fe = cr(), [rt, Da] = S(!1), [lt, en] = S(""), [$a, vt] = S(null), [tn, nn] = S(""), [Ma, yt] = S(null), Aa = Pr(t), [Ra, an] = S(null), Oa = Rs(), [sn, je] = S(null), rn = dr(d ? t : null, d), ln = !!rn.root && !rn.root.deleted_at;
696
+ }), De = or(t), C = ir(t), { isAdmin: j } = gt(), { setMuted: E, setNotifyMode: de, setArchived: ae, setStarred: re, dismissWelcome: Y, leave: oe } = Gt(), { rooms: xe, loading: Sa } = ua(), Vt = xe.find((n) => n.room === t) ?? null, { rooms: Ta } = ma(!Sa && !Vt), w = Vt ?? Ta.find((n) => n.room === t) ?? null, Ua = Na(w), Xt = w != null && w.muted ? "muted" : (w == null ? void 0 : w.notify_mode) === "mentions" ? "mentions" : "all", fe = cr(), [rt, Da] = S(!1), [lt, en] = S(""), [$a, vt] = S(null), [tn, nn] = S(""), [Ma, yt] = S(null), Aa = Pr(t), [Oa, an] = S(null), Ra = Os(), [sn, je] = S(null), rn = dr(d ? t : null, d), ln = !!rn.root && !rn.root.deleted_at;
697
697
  le(() => {
698
698
  d && ln && je(d);
699
699
  }, [d, ln]);
700
700
  const [La, on] = S(null), [Pa, cn] = S(null), [kt, Ke] = S(!1), [Ia, wt] = S(!1), [ue, Je] = S(null), [Ye, ot] = S(
701
701
  p && "around" in p ? p.around : null
702
- ), [it, Nt] = S(null), Ze = Ps(t, (b == null ? void 0 : b.id) ?? null), dn = me(null), Ct = me(null), _t = me(Math.max(0, c ?? 0)), $e = me(!1), Re = me(null), un = me(null), ie = me(!p), Ve = me(0), Xe = me(null), St = me(0), ct = () => {
703
- const n = Re.current;
702
+ ), [it, Nt] = S(null), Ze = Ps(t, (b == null ? void 0 : b.id) ?? null), dn = me(null), Ct = me(null), _t = me(Math.max(0, c ?? 0)), $e = me(!1), Oe = me(null), un = me(null), ie = me(!p), Ve = me(0), Xe = me(null), St = me(0), ct = () => {
703
+ const n = Oe.current;
704
704
  n && (n.scrollTop = n.scrollHeight);
705
705
  }, Tt = (n) => {
706
706
  var N;
707
- const f = (N = Re.current) == null ? void 0 : N.querySelector(`[data-chat-msg="${n}"]`);
707
+ const f = (N = Oe.current) == null ? void 0 : N.querySelector(`[data-chat-msg="${n}"]`);
708
708
  return f ? (f.scrollIntoView({ block: "center" }), ie.current = !1, ot(n), !0) : Ne.reveal(n) ? (ie.current = !1, ot(n), !0) : !1;
709
709
  }, mn = (n) => {
710
710
  Ke(!1), Tt(n) || ($e.current = !1, ie.current = !1, ot(n), D({ around: n }));
@@ -716,8 +716,8 @@ function zn({
716
716
  }, [Ye]), le(() => {
717
717
  $e.current = !1, Ve.current = 0, Je(null);
718
718
  }, [t, B]), le(() => {
719
- var Oe, Be;
720
- const n = Re.current, f = ((Oe = g[0]) == null ? void 0 : Oe.id) ?? null;
719
+ var Re, Be;
720
+ const n = Oe.current, f = ((Re = g[0]) == null ? void 0 : Re.id) ?? null;
721
721
  if (!$e.current && g.length > 0) {
722
722
  if ($e.current = !0, Ve.current = g.length, Xe.current = f, Ye != null && Tt(Ye)) return;
723
723
  Ct.current && !B ? (Ct.current.scrollIntoView({ block: "center" }), ie.current = !1) : B || (ct(), ie.current = !0);
@@ -742,7 +742,7 @@ function zn({
742
742
  if (!n || typeof ResizeObserver > "u") return;
743
743
  const f = new ResizeObserver(() => {
744
744
  var N;
745
- ie.current && ct(), St.current = ((N = Re.current) == null ? void 0 : N.scrollHeight) ?? 0;
745
+ ie.current && ct(), St.current = ((N = Oe.current) == null ? void 0 : N.scrollHeight) ?? 0;
746
746
  });
747
747
  return f.observe(n), () => f.disconnect();
748
748
  }, []), le(() => {
@@ -801,7 +801,7 @@ function zn({
801
801
  if (((n = Se[f].sender) == null ? void 0 : n.toLowerCase()) === qe) return f;
802
802
  return -1;
803
803
  }, [Se, qe, be]), pn = F ? new Date(F).getTime() : 0, Ee = Qt().chat_density === "compact" ? "compact" : "comfortable", hn = me(null), Ea = ye(() => Se.map((n) => n.id), [Se]), Ne = _r({
804
- scrollerRef: Re,
804
+ scrollerRef: Oe,
805
805
  listRef: hn,
806
806
  ids: Ea,
807
807
  estimate: Ee === "compact" ? 40 : 72,
@@ -830,10 +830,10 @@ function zn({
830
830
  ] })
831
831
  }
832
832
  );
833
- const Q = f.isLastMine && pn > 0 && new Date(n.date_created).getTime() <= pn, G = !!n.deleted_at, Oe = N && !G && Date.now() - new Date(n.date_created).getTime() < 15 * 6e4, Be = !G && (N || j), Me = $a === n.id, ge = /* @__PURE__ */ new Map();
833
+ const Q = f.isLastMine && pn > 0 && new Date(n.date_created).getTime() <= pn, G = !!n.deleted_at, Re = N && !G && Date.now() - new Date(n.date_created).getTime() < 15 * 6e4, Be = !G && (N || j), Me = $a === n.id, ge = /* @__PURE__ */ new Map();
834
834
  for (const $ of n.reactions ?? []) {
835
- const O = ge.get($.emoji) ?? { count: 0, mine: !1, names: [] };
836
- O.count++, ((Mn = $.user) == null ? void 0 : Mn.toLowerCase()) === qe && (O.mine = !0), $.user_name && O.names.push($.user_name), ge.set($.emoji, O);
835
+ const R = ge.get($.emoji) ?? { count: 0, mine: !1, names: [] };
836
+ R.count++, ((Mn = $.user) == null ? void 0 : Mn.toLowerCase()) === qe && (R.mine = !0), $.user_name && R.names.push($.user_name), ge.set($.emoji, R);
837
837
  }
838
838
  const We = "rounded-full p-0.5 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200";
839
839
  return /* @__PURE__ */ a(
@@ -877,7 +877,7 @@ function zn({
877
877
  {
878
878
  className: v(
879
879
  "absolute -top-3 z-10 hidden items-center gap-0.5 rounded-full border px-1 py-0.5 shadow-sm group-hover/msg:flex",
880
- Ra === n.id && "flex",
880
+ Oa === n.id && "flex",
881
881
  h.surface,
882
882
  "border-slate-200 dark:border-border",
883
883
  N ? "right-0" : "left-0"
@@ -977,7 +977,7 @@ function zn({
977
977
  children: /* @__PURE__ */ e(hs, { className: "h-3 w-3" })
978
978
  }
979
979
  ),
980
- Oe && /* @__PURE__ */ e(
980
+ Re && /* @__PURE__ */ e(
981
981
  "button",
982
982
  {
983
983
  type: "button",
@@ -1042,8 +1042,8 @@ function zn({
1042
1042
  className: "flex items-center gap-1",
1043
1043
  onSubmit: ($) => {
1044
1044
  $.preventDefault();
1045
- const O = tn.trim();
1046
- O && O !== n.message && De.mutate({ messageId: n.id, text: O }), vt(null);
1045
+ const R = tn.trim();
1046
+ R && R !== n.message && De.mutate({ messageId: n.id, text: R }), vt(null);
1047
1047
  },
1048
1048
  children: [
1049
1049
  /* @__PURE__ */ e(
@@ -1114,12 +1114,12 @@ function zn({
1114
1114
  {
1115
1115
  id: En(n.message),
1116
1116
  mine: N,
1117
- renderAvatar: ($, O) => /* @__PURE__ */ e(Z, { id: $, name: O, size: 18, presence: !1 })
1117
+ renderAvatar: ($, R) => /* @__PURE__ */ e(Z, { id: $, name: R, size: 18, presence: !1 })
1118
1118
  }
1119
1119
  ),
1120
1120
  n.poll && /* @__PURE__ */ e(Br, { poll: n.poll, room: n.room, mine: N }),
1121
1121
  (n.attachments ?? []).length > 0 && /* @__PURE__ */ e("div", { className: v("flex flex-wrap gap-1.5", n.message && "mt-1.5"), children: (n.attachments ?? []).map(($) => {
1122
- const O = Ut == null ? void 0 : Ut.get($), ut = (O == null ? void 0 : O.title) || (O == null ? void 0 : O.filename_download) || "Attachment", Dt = i.fileUrl($), Qa = ((O == null ? void 0 : O.type) ?? "").startsWith("image/"), mt = Zr(O == null ? void 0 : O.tags, O == null ? void 0 : O.type), $t = `${Dt}?download=1`, Mt = (O == null ? void 0 : O.filename_download) || ut, An = Oa($t, Mt), pt = m && I.length > 0 ? /* @__PURE__ */ e(
1122
+ const R = Ut == null ? void 0 : Ut.get($), ut = (R == null ? void 0 : R.title) || (R == null ? void 0 : R.filename_download) || "Attachment", Dt = i.fileUrl($), Qa = ((R == null ? void 0 : R.type) ?? "").startsWith("image/"), mt = Zr(R == null ? void 0 : R.tags, R == null ? void 0 : R.type), $t = `${Dt}?download=1`, Mt = (R == null ? void 0 : R.filename_download) || ut, An = Ra($t, Mt), pt = m && I.length > 0 ? /* @__PURE__ */ e(
1123
1123
  il,
1124
1124
  {
1125
1125
  targets: I,
@@ -1195,19 +1195,19 @@ function zn({
1195
1195
  {
1196
1196
  className: v("mt-0.5 flex flex-wrap gap-1", N && "justify-end"),
1197
1197
  "data-chat-reactions": !0,
1198
- children: [...ge.entries()].map(([$, O]) => /* @__PURE__ */ a(
1198
+ children: [...ge.entries()].map(([$, R]) => /* @__PURE__ */ a(
1199
1199
  "button",
1200
1200
  {
1201
1201
  type: "button",
1202
- title: O.names.join(", "),
1202
+ title: R.names.join(", "),
1203
1203
  onClick: () => ee.mutate({ messageId: n.id, emoji: $ }),
1204
1204
  className: v(
1205
1205
  "inline-flex items-center gap-0.5 rounded-full border px-1.5 py-px text-[10.5px] leading-tight transition-colors",
1206
- O.mine ? v("font-semibold", h.accentSoft, "border-transparent") : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-slate-300 dark:hover:bg-muted"
1206
+ R.mine ? v("font-semibold", h.accentSoft, "border-transparent") : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-slate-300 dark:hover:bg-muted"
1207
1207
  ),
1208
1208
  children: [
1209
1209
  /* @__PURE__ */ e(wr, { value: $ }),
1210
- /* @__PURE__ */ e("span", { className: "tabular-nums", children: O.count })
1210
+ /* @__PURE__ */ e("span", { className: "tabular-nums", children: R.count })
1211
1211
  ]
1212
1212
  },
1213
1213
  $
@@ -1260,13 +1260,13 @@ function zn({
1260
1260
  minute: "2-digit"
1261
1261
  }),
1262
1262
  N && Ce && !G && (() => {
1263
- var O;
1263
+ var R;
1264
1264
  const $ = Pe(n);
1265
1265
  return $.length === 0 ? null : /* @__PURE__ */ e(
1266
1266
  ul,
1267
1267
  {
1268
1268
  seen: $,
1269
- channelId: ((O = w == null ? void 0 : w.channel) == null ? void 0 : O.id) ?? null,
1269
+ channelId: ((R = w == null ? void 0 : w.channel) == null ? void 0 : R.id) ?? null,
1270
1270
  senderId: String(n.sender ?? "")
1271
1271
  }
1272
1272
  );
@@ -1546,7 +1546,7 @@ function zn({
1546
1546
  /* @__PURE__ */ e(
1547
1547
  "div",
1548
1548
  {
1549
- ref: Re,
1549
+ ref: Oe,
1550
1550
  onScroll: (n) => {
1551
1551
  const f = n.currentTarget;
1552
1552
  ie.current = f.scrollHeight - f.scrollTop - f.clientHeight < 48, St.current = f.scrollHeight, ie.current && ue && Je(null), Ne.onScroll(), f.scrollTop < 200 && X && !M && !be && $e.current && L();
@@ -1561,7 +1561,7 @@ function zn({
1561
1561
  disabled: M,
1562
1562
  onClick: () => {
1563
1563
  var n;
1564
- St.current = ((n = Re.current) == null ? void 0 : n.scrollHeight) ?? 0, L();
1564
+ St.current = ((n = Oe.current) == null ? void 0 : n.scrollHeight) ?? 0, L();
1565
1565
  },
1566
1566
  className: "rounded-full border border-slate-200 px-2.5 py-0.5 text-[11px] font-medium text-slate-600 hover:bg-muted disabled:opacity-50 dark:border-border dark:text-slate-300",
1567
1567
  "data-chat-load-older": !0,
@@ -1583,7 +1583,7 @@ function zn({
1583
1583
  "data-chat-rows": Ne.windowed ? "windowed" : "all",
1584
1584
  children: Se.slice(Ne.start, Ne.end).map((n, f) => {
1585
1585
  var Me;
1586
- const N = Ne.start + f, Q = Se[N - 1], G = N === 0 || Q && new Date(Q.date_created).toDateString() !== new Date(n.date_created).toDateString(), Oe = !be && !B && _t.current > 0 && N === Math.max(0, Se.length - _t.current), Be = Ee === "compact" && !G && !!Q && Q.sender === n.sender && !Q.is_system && new Date(n.date_created).getTime() - new Date(Q.date_created).getTime() < 5 * 6e4;
1586
+ const N = Ne.start + f, Q = Se[N - 1], G = N === 0 || Q && new Date(Q.date_created).toDateString() !== new Date(n.date_created).toDateString(), Re = !be && !B && _t.current > 0 && N === Math.max(0, Se.length - _t.current), Be = Ee === "compact" && !G && !!Q && Q.sender === n.sender && !Q.is_system && new Date(n.date_created).getTime() - new Date(Q.date_created).getTime() < 5 * 6e4;
1587
1587
  return /* @__PURE__ */ a(
1588
1588
  "div",
1589
1589
  {
@@ -1596,7 +1596,7 @@ function zn({
1596
1596
  /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-slate-500 dark:text-slate-400", children: nl(n.date_created) }),
1597
1597
  /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-slate-100 dark:bg-border" })
1598
1598
  ] }),
1599
- Oe && /* @__PURE__ */ a(
1599
+ Re && /* @__PURE__ */ a(
1600
1600
  "div",
1601
1601
  {
1602
1602
  ref: Ct,
@@ -1619,7 +1619,7 @@ function zn({
1619
1619
  ]
1620
1620
  }
1621
1621
  ),
1622
- Oe && Qe && /* @__PURE__ */ e("div", { className: "my-1 rounded-md border border-nvr-cyan/25 bg-nvr-cyan/5 px-2.5 py-1.5 text-[11.5px] leading-snug text-slate-600 dark:text-slate-300", children: Qe }),
1622
+ Re && Qe && /* @__PURE__ */ e("div", { className: "my-1 rounded-md border border-nvr-cyan/25 bg-nvr-cyan/5 px-2.5 py-1.5 text-[11.5px] leading-snug text-slate-600 dark:text-slate-300", children: Qe }),
1623
1623
  gn(n, {
1624
1624
  isLastMine: ((Me = n.sender) == null ? void 0 : Me.toLowerCase()) === qe && N === qa,
1625
1625
  showSender: !Be
@@ -1858,7 +1858,7 @@ function ml({ channel: t, onLeft: r }) {
1858
1858
  `/chat/channels/${t.id}/members`,
1859
1859
  h,
1860
1860
  c
1861
- ), b = i.members, k = i.loading, { addMember: R, removeMember: T } = ca(t.id), [_, U] = S(""), B = xt(_, 250), D = ((L = s.me) == null ? void 0 : L.id.toUpperCase()) ?? "", g = o || !!D && String(t.created_by ?? "").toUpperCase() === D, { users: H } = Kt(B, c && g && !!_.trim()), X = new Set(b.map((M) => M.id.toUpperCase())), K = b;
1861
+ ), b = i.members, k = i.loading, { addMember: O, removeMember: T } = ca(t.id), [_, U] = S(""), B = xt(_, 250), D = ((L = s.me) == null ? void 0 : L.id.toUpperCase()) ?? "", g = o || !!D && String(t.created_by ?? "").toUpperCase() === D, { users: H } = Kt(B, c && g && !!_.trim()), X = new Set(b.map((M) => M.id.toUpperCase())), K = b;
1862
1862
  return /* @__PURE__ */ a(nt, { open: c, onOpenChange: p, children: [
1863
1863
  /* @__PURE__ */ e(at, { asChild: !0, children: /* @__PURE__ */ a(
1864
1864
  "button",
@@ -1890,7 +1890,7 @@ function ml({ channel: t, onLeft: r }) {
1890
1890
  "In this conversation ",
1891
1891
  i.total > 0 && `· ${i.total.toLocaleString("en-US")}`
1892
1892
  ] }),
1893
- (i.total > 10 || d) && /* @__PURE__ */ e(Rr, { value: d, onChange: x, className: "mt-1.5" })
1893
+ (i.total > 10 || d) && /* @__PURE__ */ e(Or, { value: d, onChange: x, className: "mt-1.5" })
1894
1894
  ] }),
1895
1895
  /* @__PURE__ */ a("div", { className: "max-h-[280px] overflow-y-auto py-1", children: [
1896
1896
  k && /* @__PURE__ */ e("p", { className: "px-3 py-2 text-[12px] text-slate-400", children: "Loading…" }),
@@ -1911,7 +1911,7 @@ function ml({ channel: t, onLeft: r }) {
1911
1911
  ] }),
1912
1912
  F && /* @__PURE__ */ e("span", { className: "block text-[10.5px] text-slate-400", children: "Started the group" })
1913
1913
  ] }),
1914
- /* @__PURE__ */ e(Or, { online: M.online }),
1914
+ /* @__PURE__ */ e(Rr, { online: M.online }),
1915
1915
  g && !V && /* @__PURE__ */ e(
1916
1916
  "button",
1917
1917
  {
@@ -1955,7 +1955,7 @@ function ml({ channel: t, onLeft: r }) {
1955
1955
  {
1956
1956
  type: "button",
1957
1957
  onClick: () => {
1958
- R.mutate(M.id), U("");
1958
+ O.mutate(M.id), U("");
1959
1959
  },
1960
1960
  className: "flex w-full items-center gap-2 rounded px-1 py-1 text-left hover:bg-muted",
1961
1961
  children: [
@@ -1993,7 +1993,7 @@ function pl({
1993
1993
  label: r,
1994
1994
  onBack: l
1995
1995
  }) {
1996
- const s = pe(), o = Le(), { isAdmin: c } = gt(), p = oa(), { members: d, loading: x } = ia(t.id), { update: h, addMember: i, removeMember: b } = ca(t.id), [k, R] = S(r), [T, _] = S(t.topic ?? ""), [U, B] = S(t.visibility), [D, g] = S(t.role ?? ""), [H, X] = S({
1996
+ const s = pe(), o = Le(), { isAdmin: c } = gt(), p = oa(), { members: d, loading: x } = ia(t.id), { update: h, addMember: i, removeMember: b } = ca(t.id), [k, O] = S(r), [T, _] = S(t.topic ?? ""), [U, B] = S(t.visibility), [D, g] = S(t.role ?? ""), [H, X] = S({
1997
1997
  icon: t.icon ?? null,
1998
1998
  color: t.color ?? null
1999
1999
  }), [K, L] = S(""), M = xt(K, 250), { users: te } = Kt(M, U === "private"), [J, V] = S(!1), F = t.id === da, ne = c || !F && !!o.me && String(t.created_by ?? "") === String(o.me.id), ee = new Set(d.map((u) => String(u.user).toUpperCase())), se = k !== r || T !== (t.topic ?? "") || U !== t.visibility || H.icon !== (t.icon ?? null) || H.color !== (t.color ?? null) || U === "role" && D !== (t.role ?? "");
@@ -2022,7 +2022,7 @@ function pl({
2022
2022
  "input",
2023
2023
  {
2024
2024
  value: k,
2025
- onChange: (u) => R(u.target.value),
2025
+ onChange: (u) => O(u.target.value),
2026
2026
  className: v("h-8 w-full rounded-md px-2 text-[12.5px] outline-none", s.input)
2027
2027
  }
2028
2028
  )
@@ -2304,7 +2304,7 @@ function Jn({
2304
2304
  loading: o = !1,
2305
2305
  onView: c
2306
2306
  }) {
2307
- const p = pe(), d = Le(), { setMuted: x, leave: h, setArchived: i, setStarred: b } = Gt(), k = Fs(), R = ye(
2307
+ const p = pe(), d = Le(), { setMuted: x, leave: h, setArchived: i, setStarred: b } = Gt(), k = Fs(), O = ye(
2308
2308
  () => new Map(
2309
2309
  d.onlineUsers.map((u) => [
2310
2310
  String(u.user_id).toUpperCase(),
@@ -2533,7 +2533,7 @@ function Jn({
2533
2533
  (() => {
2534
2534
  const ce = m.kind === "dm" && d.me ? Te(m.room, d.me.id) : null;
2535
2535
  if (!ce) return null;
2536
- const ze = R.get(ce.toUpperCase()) ?? "offline";
2536
+ const ze = O.get(ce.toUpperCase()) ?? "offline";
2537
2537
  return /* @__PURE__ */ e("span", { className: "relative shrink-0", "data-chat-room-avatar": ze, children: /* @__PURE__ */ e(Z, { id: ce, name: m.label, size: 32 }) });
2538
2538
  })(),
2539
2539
  m.kind === "channel" && !((I = m.channel) != null && I.is_direct) || m.kind === "global" && ((Ce = m.channel) != null && Ce.icon || (he = m.channel) != null && he.color) ? /* @__PURE__ */ e(et, { icon: (Pe = m.channel) == null ? void 0 : Pe.icon, color: (_e = m.channel) == null ? void 0 : _e.color, size: 32 }) : /* @__PURE__ */ e(
@@ -2543,13 +2543,13 @@ function Jn({
2543
2543
  "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-slate-100 text-slate-500 dark:bg-muted dark:text-slate-400",
2544
2544
  m.kind === "dm" && d.me && Te(m.room, d.me.id) && "hidden"
2545
2545
  ),
2546
- children: m.kind === "dm" ? /* @__PURE__ */ e(Zn, { className: "h-4 w-4", strokeWidth: 1.8 }) : (Ae = m.channel) != null && Ae.is_direct ? /* @__PURE__ */ e(Pt, { className: "h-4 w-4", strokeWidth: 1.8 }) : /* @__PURE__ */ e(Ot, { className: "h-4 w-4", strokeWidth: 1.8 })
2546
+ children: m.kind === "dm" ? /* @__PURE__ */ e(Zn, { className: "h-4 w-4", strokeWidth: 1.8 }) : (Ae = m.channel) != null && Ae.is_direct ? /* @__PURE__ */ e(Pt, { className: "h-4 w-4", strokeWidth: 1.8 }) : /* @__PURE__ */ e(Rt, { className: "h-4 w-4", strokeWidth: 1.8 })
2547
2547
  }
2548
2548
  ),
2549
2549
  /* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: [
2550
2550
  /* @__PURE__ */ a("span", { className: "flex items-center gap-1.5", children: [
2551
2551
  /* @__PURE__ */ e("span", { className: "truncate text-[13px] font-medium text-slate-800 dark:text-slate-100", children: m.label }),
2552
- m.muted && /* @__PURE__ */ e(Rn, { className: "h-3 w-3 shrink-0 text-slate-300", strokeWidth: 2 }),
2552
+ m.muted && /* @__PURE__ */ e(On, { className: "h-3 w-3 shrink-0 text-slate-300", strokeWidth: 2 }),
2553
2553
  /* @__PURE__ */ e(Tr, { count: _.countFor(m.room), label: m.label }),
2554
2554
  te.has(m.room) && /* @__PURE__ */ e(
2555
2555
  ns,
@@ -2628,7 +2628,7 @@ function Jn({
2628
2628
  title: m.muted ? "Unmute" : "Mute",
2629
2629
  onClick: () => x.mutate({ room: m.room, muted: !m.muted }),
2630
2630
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-200 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100",
2631
- children: m.muted ? /* @__PURE__ */ e(ls, { className: "h-3 w-3" }) : /* @__PURE__ */ e(Rn, { className: "h-3 w-3" })
2631
+ children: m.muted ? /* @__PURE__ */ e(ls, { className: "h-3 w-3" }) : /* @__PURE__ */ e(On, { className: "h-3 w-3" })
2632
2632
  }
2633
2633
  ),
2634
2634
  (m.kind === "channel" || m.kind === "global" || m.kind === "entity") && m.joined && /* @__PURE__ */ e(
@@ -2672,7 +2672,7 @@ function So({
2672
2672
  function xl({
2673
2673
  onOpen: t
2674
2674
  }) {
2675
- const r = pe(), [l, s] = S(""), [o, c] = S(!1), [p, d] = S(""), [x, h] = S("open"), [i, b] = S(""), [k, R] = S({
2675
+ const r = pe(), [l, s] = S(""), [o, c] = S(!1), [p, d] = S(""), [x, h] = S("open"), [i, b] = S(""), [k, O] = S({
2676
2676
  icon: null,
2677
2677
  color: null
2678
2678
  }), T = oa(), { channels: _, loading: U } = Ks(l), { join: B } = Gt(), D = Js();
@@ -2721,7 +2721,7 @@ function xl({
2721
2721
  },
2722
2722
  {
2723
2723
  onSuccess: () => {
2724
- d(""), R({ icon: null, color: null }), c(!1);
2724
+ d(""), O({ icon: null, color: null }), c(!1);
2725
2725
  }
2726
2726
  }
2727
2727
  ));
@@ -2742,7 +2742,7 @@ function xl({
2742
2742
  }
2743
2743
  )
2744
2744
  ] }),
2745
- /* @__PURE__ */ e(na, { icon: k.icon, color: k.color, onChange: R }),
2745
+ /* @__PURE__ */ e(na, { icon: k.icon, color: k.color, onChange: O }),
2746
2746
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
2747
2747
  [
2748
2748
  ["open", "Anyone"],
@@ -2790,7 +2790,7 @@ function xl({
2790
2790
  /* @__PURE__ */ a("div", { className: "min-h-0 flex-1 overflow-y-auto p-2", children: [
2791
2791
  U && /* @__PURE__ */ e("p", { className: "px-2 py-6 text-center text-[12px] text-slate-400", children: "Loading…" }),
2792
2792
  !U && _.length === 0 && /* @__PURE__ */ a("div", { className: "px-3 py-8 text-center", children: [
2793
- /* @__PURE__ */ e(Ot, { className: "mx-auto h-5 w-5 text-slate-300" }),
2793
+ /* @__PURE__ */ e(Rt, { className: "mx-auto h-5 w-5 text-slate-300" }),
2794
2794
  /* @__PURE__ */ e("p", { className: "mt-2 text-[12.5px] font-medium text-slate-600 dark:text-slate-300", children: l ? `No channel matches “${l}”` : "No channels yet" }),
2795
2795
  /* @__PURE__ */ e("p", { className: "mt-1 text-[11.5px] leading-relaxed text-slate-400", children: "Channels and General are shared rooms you join to follow. Record conversations appear on their own once someone posts on a record." })
2796
2796
  ] }),
@@ -2805,7 +2805,7 @@ function xl({
2805
2805
  icon: g.icon,
2806
2806
  color: g.color,
2807
2807
  size: 32,
2808
- fallback: g.visibility === "private" ? Ja : Ot
2808
+ fallback: g.visibility === "private" ? Ja : Rt
2809
2809
  }
2810
2810
  ),
2811
2811
  /* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: [
@@ -3013,7 +3013,7 @@ function kl({
3013
3013
  ),
3014
3014
  /* @__PURE__ */ e("p", { className: "text-[13px] font-semibold text-slate-800 dark:text-slate-100", children: "New group conversation" })
3015
3015
  ] }),
3016
- d.size > 0 && /* @__PURE__ */ e("div", { className: "mb-2 flex flex-wrap gap-1", children: [...d.entries()].map(([k, R]) => /* @__PURE__ */ a(
3016
+ d.size > 0 && /* @__PURE__ */ e("div", { className: "mb-2 flex flex-wrap gap-1", children: [...d.entries()].map(([k, O]) => /* @__PURE__ */ a(
3017
3017
  "span",
3018
3018
  {
3019
3019
  className: v(
@@ -3021,7 +3021,7 @@ function kl({
3021
3021
  l.accentSoft
3022
3022
  ),
3023
3023
  children: [
3024
- R,
3024
+ O,
3025
3025
  /* @__PURE__ */ e(
3026
3026
  "button",
3027
3027
  {
@@ -3030,7 +3030,7 @@ function kl({
3030
3030
  const _ = new Map(T);
3031
3031
  return _.delete(k), _;
3032
3032
  }),
3033
- "aria-label": `Remove ${R}`,
3033
+ "aria-label": `Remove ${O}`,
3034
3034
  children: /* @__PURE__ */ e(bt, { className: "h-3 w-3" })
3035
3035
  }
3036
3036
  )
@@ -3050,23 +3050,23 @@ function kl({
3050
3050
  }
3051
3051
  ),
3052
3052
  /* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-y-auto", children: h.map((k) => {
3053
- const R = d.has(k.id);
3053
+ const O = d.has(k.id);
3054
3054
  return /* @__PURE__ */ a(
3055
3055
  "button",
3056
3056
  {
3057
3057
  type: "button",
3058
3058
  onClick: () => x((T) => {
3059
3059
  const _ = new Map(T);
3060
- return R ? _.delete(k.id) : _.set(k.id, b(k)), _;
3060
+ return O ? _.delete(k.id) : _.set(k.id, b(k)), _;
3061
3061
  }),
3062
3062
  className: v(
3063
3063
  "flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-[12.5px] transition-colors",
3064
- R ? l.accentSoft : "hover:bg-slate-50 dark:hover:bg-muted/50"
3064
+ O ? l.accentSoft : "hover:bg-slate-50 dark:hover:bg-muted/50"
3065
3065
  ),
3066
3066
  children: [
3067
3067
  /* @__PURE__ */ e(Z, { id: k.id, name: b(k), size: 22 }),
3068
3068
  /* @__PURE__ */ e("span", { className: "truncate", children: b(k) }),
3069
- R && /* @__PURE__ */ e(Wt, { className: "ml-auto h-3.5 w-3.5 shrink-0" })
3069
+ O && /* @__PURE__ */ e(Wt, { className: "ml-auto h-3.5 w-3.5 shrink-0" })
3070
3070
  ]
3071
3071
  },
3072
3072
  k.id
@@ -3103,7 +3103,7 @@ function kl({
3103
3103
  )
3104
3104
  ] });
3105
3105
  }
3106
- const Et = "nvr-chat-pinned", Rt = 400;
3106
+ const Et = "nvr-chat-pinned", Ot = 400;
3107
3107
  function wl() {
3108
3108
  try {
3109
3109
  return typeof window < "u" && window.localStorage.getItem(Et) === "1";
@@ -3145,17 +3145,17 @@ function To({
3145
3145
  le(() => {
3146
3146
  if (!t || !b) return;
3147
3147
  const y = document.body, A = y.style.paddingRight;
3148
- y.style.paddingRight = `${Rt}px`, y.dataset.nvrChatPinned = "1";
3148
+ y.style.paddingRight = `${Ot}px`, y.dataset.nvrChatPinned = "1";
3149
3149
  const P = document.createElement("style");
3150
3150
  return P.dataset.nvrChatPinnedStyle = "", P.textContent = `body[data-nvr-chat-pinned] [data-sonner-toaster][data-x-position="right"],
3151
- body[data-nvr-chat-pinned] [data-nvr-dock-aware] { margin-right: ${Rt}px; }`, document.head.appendChild(P), () => {
3151
+ body[data-nvr-chat-pinned] [data-nvr-dock-aware] { margin-right: ${Ot}px; }`, document.head.appendChild(P), () => {
3152
3152
  y.style.paddingRight = A, delete y.dataset.nvrChatPinned, P.remove();
3153
3153
  };
3154
3154
  }, [t, b]);
3155
- const [R, T] = S("online"), [_, U] = S(null), [B, D] = S(null), g = (y, A, P) => {
3155
+ const [O, T] = S("online"), [_, U] = S(null), [B, D] = S(null), g = (y, A, P) => {
3156
3156
  const z = J.find((De) => De.room === y);
3157
3157
  L(!1), U({ room: y, label: (z == null ? void 0 : z.label) ?? A, channel: z == null ? void 0 : z.channel, anchor: P });
3158
- }, [H, X] = S(!1), [K, L] = S(!1), [M, te] = S(null), { rooms: J, totalUnread: V } = ua(), F = ma(R === "archived"), ne = (y, A, P) => {
3158
+ }, [H, X] = S(!1), [K, L] = S(!1), [M, te] = S(null), { rooms: J, totalUnread: V } = ua(), F = ma(O === "archived"), ne = (y, A, P) => {
3159
3159
  var De, C;
3160
3160
  if (!A) return [{ key: "all", label: null, users: y }];
3161
3161
  const z = /* @__PURE__ */ new Map();
@@ -3206,7 +3206,7 @@ body[data-nvr-chat-pinned] [data-nvr-dock-aware] { margin-right: ${Rt}px; }`, do
3206
3206
  // No backdrop: the rest of the page stays usable.
3207
3207
  "pointer-events-none fixed inset-y-0 right-0 z-40"
3208
3208
  ) : "fixed inset-0 z-40 bg-black/40 animate-in fade-in duration-150",
3209
- style: b ? { width: Rt } : void 0,
3209
+ style: b ? { width: Ot } : void 0,
3210
3210
  onClick: b ? void 0 : r,
3211
3211
  "data-chat-panel": !0,
3212
3212
  "data-nvr-recording-hide": !0,
@@ -3234,7 +3234,7 @@ body[data-nvr-chat-pinned] [data-nvr-dock-aware] { margin-right: ${Rt}px; }`, do
3234
3234
  "data-tip": y === "archived" ? "Conversations you archived for yourself. Everyone else still sees them." : void 0,
3235
3235
  className: v(
3236
3236
  "flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[12px] font-medium transition-colors",
3237
- R === y ? p.accentSoft : "text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"
3237
+ O === y ? p.accentSoft : "text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"
3238
3238
  ),
3239
3239
  children: [
3240
3240
  y === "online" ? `Online · ${he.length}` : y === "chat" ? "Chat" : y === "browse" ? "Browse" : "Archived",
@@ -3280,7 +3280,7 @@ body[data-nvr-chat-pinned] [data-nvr-dock-aware] { margin-right: ${Rt}px; }`, do
3280
3280
  }
3281
3281
  )
3282
3282
  ] }),
3283
- R === "online" ? /* @__PURE__ */ a(
3283
+ O === "online" ? /* @__PURE__ */ a(
3284
3284
  "div",
3285
3285
  {
3286
3286
  className: "min-h-0 flex-1 overflow-y-auto px-2 pb-2 [&>:first-child]:mt-2",
@@ -3381,7 +3381,7 @@ body[data-nvr-chat-pinned] [data-nvr-dock-aware] { margin-right: ${Rt}px; }`, do
3381
3381
  {
3382
3382
  type: "button",
3383
3383
  onClick: () => ze(A),
3384
- title: "Send a direct message",
3384
+ "aria-description": "Opens a direct message",
3385
3385
  className: "flex min-w-0 flex-1 items-center gap-3 py-2 pl-3 pr-2.5 text-left",
3386
3386
  children: [
3387
3387
  /* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: [
@@ -3447,7 +3447,7 @@ ${In(E)}` : ""}`, ae = Pn(
3447
3447
  }
3448
3448
  ) : null;
3449
3449
  })(),
3450
- _e && /* @__PURE__ */ e(Os, { builds: P == null ? void 0 : P.stale_build })
3450
+ _e && /* @__PURE__ */ e(Rs, { builds: P == null ? void 0 : P.stale_build })
3451
3451
  ] }),
3452
3452
  (() => {
3453
3453
  const C = I.byUser.get(String(A.user_id).toUpperCase()), j = C == null ? void 0 : C.custom_status;
@@ -3498,7 +3498,7 @@ ${In(E)}` : ""}`, ae = Pn(
3498
3498
  "data-chat-online-page": "background",
3499
3499
  "data-tip": "Their app is open in a tab that is not in front, so where they are is not known until they look at it.",
3500
3500
  children: [
3501
- /* @__PURE__ */ e(On, { className: "mt-[2px] h-3 w-3 shrink-0 opacity-60" }),
3501
+ /* @__PURE__ */ e(Rn, { className: "mt-[2px] h-3 w-3 shrink-0 opacity-60" }),
3502
3502
  /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: "Tab in background" })
3503
3503
  ]
3504
3504
  }
@@ -3522,7 +3522,7 @@ ${In(E)}` : ""}`, ae = Pn(
3522
3522
  c.recordUrl,
3523
3523
  typeof window > "u" ? null : window.location.origin
3524
3524
  ), oe = /* @__PURE__ */ a(we, { children: [
3525
- /* @__PURE__ */ e(On, { className: "mt-[2px] h-3 w-3 shrink-0 text-slate-400" }),
3525
+ /* @__PURE__ */ e(Rn, { className: "mt-[2px] h-3 w-3 shrink-0 text-slate-400" }),
3526
3526
  /* @__PURE__ */ e("span", { className: "line-clamp-2 min-w-0 break-words", children: E })
3527
3527
  ] });
3528
3528
  return Y ? (
@@ -3599,7 +3599,7 @@ ${In(E)}` : ""}`, ae = Pn(
3599
3599
  ] }, y.key))
3600
3600
  ]
3601
3601
  }
3602
- ) : R === "archived" ? M ? /* @__PURE__ */ e(
3602
+ ) : O === "archived" ? M ? /* @__PURE__ */ e(
3603
3603
  zn,
3604
3604
  {
3605
3605
  room: M.room,
@@ -3616,7 +3616,7 @@ ${In(E)}` : ""}`, ae = Pn(
3616
3616
  archivedView: !0,
3617
3617
  onOpen: (y) => te({ room: y.room, label: y.label })
3618
3618
  }
3619
- ) : R === "browse" ? (
3619
+ ) : O === "browse" ? (
3620
3620
  // The tab is checked BEFORE the open room: leaving it last meant
3621
3621
  // switching to Browse with a conversation open kept showing that
3622
3622
  // conversation (or its settings) under the Browse tab.