@nivaro/react 0.2.56 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/components/slots/TasksSlot.js +31 -29
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +73 -1
  5. package/dist/index.js +515 -505
  6. package/dist/shared/components/ItemEditForm.js +666 -658
  7. package/dist/shared/components/MyWorkView.js +47 -37
  8. package/dist/shared/components/ProfileView.js +163 -144
  9. package/dist/shared/components/ai/AiPlanCard.js +427 -0
  10. package/dist/shared/components/ai/AiPlanChanges.js +117 -0
  11. package/dist/shared/components/ai/TaskDo.js +1022 -0
  12. package/dist/shared/components/chat/ChatAnalyticsView.js +19 -17
  13. package/dist/shared/components/chat/ChatPanel.js +1356 -1317
  14. package/dist/shared/components/chat/HuddleAnalyticsTab.js +198 -0
  15. package/dist/shared/components/chat/RoomHeaderMenu.js +78 -65
  16. package/dist/shared/components/chat/chat-core.js +273 -264
  17. package/dist/shared/components/chat/huddle/HuddleAudioUi.js +397 -0
  18. package/dist/shared/components/chat/huddle/HuddleCallBar.js +296 -0
  19. package/dist/shared/components/chat/huddle/HuddleCallLayer.js +180 -0
  20. package/dist/shared/components/chat/huddle/HuddleCamera.js +124 -0
  21. package/dist/shared/components/chat/huddle/HuddleCollab.js +320 -0
  22. package/dist/shared/components/chat/huddle/HuddleControls.js +82 -121
  23. package/dist/shared/components/chat/huddle/HuddleDraw.js +231 -0
  24. package/dist/shared/components/chat/huddle/HuddleLiveBadge.js +52 -0
  25. package/dist/shared/components/chat/huddle/HuddlePeoplePicker.js +143 -0
  26. package/dist/shared/components/chat/huddle/HuddleScheduleCard.js +190 -0
  27. package/dist/shared/components/chat/huddle/HuddleScheduleForm.js +188 -0
  28. package/dist/shared/components/chat/huddle/HuddleStage.js +184 -89
  29. package/dist/shared/components/chat/huddle/HuddleStageTools.js +197 -0
  30. package/dist/shared/components/chat/huddle/huddle-audio-logic.js +156 -0
  31. package/dist/shared/components/chat/huddle/huddle-audio.js +69 -0
  32. package/dist/shared/components/chat/huddle/huddle-calls.js +129 -0
  33. package/dist/shared/components/chat/huddle/huddle-camera.js +143 -0
  34. package/dist/shared/components/chat/huddle/huddle-collab-store.js +391 -0
  35. package/dist/shared/components/chat/huddle/huddle-device-prefs.js +55 -0
  36. package/dist/shared/components/chat/huddle/huddle-devices.js +99 -0
  37. package/dist/shared/components/chat/huddle/huddle-draw.js +226 -0
  38. package/dist/shared/components/chat/huddle/huddle-follow-bus.js +96 -0
  39. package/dist/shared/components/chat/huddle/huddle-hold.js +62 -0
  40. package/dist/shared/components/chat/huddle/huddle-link-quality.js +159 -0
  41. package/dist/shared/components/chat/huddle/huddle-live.js +82 -0
  42. package/dist/shared/components/chat/huddle/huddle-pip.js +343 -0
  43. package/dist/shared/components/chat/huddle/huddle-quality.js +22 -0
  44. package/dist/shared/components/chat/huddle/huddle-reactions.js +71 -0
  45. package/dist/shared/components/chat/huddle/huddle-ring-refused.js +34 -0
  46. package/dist/shared/components/chat/huddle/huddle-schedule.js +102 -0
  47. package/dist/shared/components/chat/huddle/huddle-sfu.js +176 -0
  48. package/dist/shared/components/chat/huddle/huddle-shortcuts.js +91 -0
  49. package/dist/shared/components/chat/huddle/huddle-speaking.js +100 -0
  50. package/dist/shared/components/chat/huddle/huddle-store.js +431 -157
  51. package/dist/shared/components/chat/huddle/useHuddle.js +46 -38
  52. package/dist/shared/components/chat/huddle/useHuddleAudio.js +35 -0
  53. package/dist/shared/components/item-edit/GroupSection.js +1 -0
  54. package/dist/shared/components/item-edit/RecordChatActions.js +68 -59
  55. package/dist/shared/components/item-edit/UserChip.js +145 -142
  56. package/dist/shared/components/panels/TaskPanel.js +51 -49
  57. package/dist/shared/components/support/TicketDetailSheet.js +57 -42
  58. package/dist/shared/lib/notification-sound.js +25 -16
  59. package/package.json +2 -1
@@ -1,27 +1,28 @@
1
1
  import { readItems as J } from "@nivaro/sdk";
2
2
  import { useQueryClient as v, useMutation as h, useQuery as y } from "@tanstack/react-query";
3
- import { useContext as Z, useState as k, useEffect as $, useMemo as M, useCallback as O, useRef as Q, createContext as X } from "react";
3
+ import { useContext as Z, useState as L, useEffect as $, useMemo as k, useCallback as M, useRef as U, createContext as X } from "react";
4
4
  import { toast as ee } from "sonner";
5
5
  import { useNivaroClient as m } from "../../context.js";
6
- import { get as g, patch as C, post as K, del as x } from "../../lib/commands.js";
6
+ import { get as g, patch as C, post as K, del as A } from "../../lib/commands.js";
7
7
  import { isDndActive as te } from "../../lib/dnd.js";
8
- import { playNotificationSound as ne } from "../../lib/notification-sound.js";
9
- import { announceLocalPrefs as se } from "../../lib/user-sync.js";
10
- import { bindChatOutbox as re, enqueueChatOutbox as oe } from "./chat-outbox.js";
11
- import { discardOutbox as gt, editOutbox as pt, holdOutbox as vt, nudgeChatOutbox as qt, retryOutbox as bt, useOutbox as _t } from "./chat-outbox.js";
12
- const $e = ["👍", "✅", "👀", "🎉", "❤️", "😂"], ae = X(null);
13
- function q() {
14
- const e = Z(ae);
8
+ import { huddleHolds as ne, holdNotification as se } from "./huddle/huddle-hold.js";
9
+ import { playNotificationSound as re } from "../../lib/notification-sound.js";
10
+ import { announceLocalPrefs as oe } from "../../lib/user-sync.js";
11
+ import { bindChatOutbox as ae, enqueueChatOutbox as ie } from "./chat-outbox.js";
12
+ import { discardOutbox as _t, editOutbox as Ct, holdOutbox as Rt, nudgeChatOutbox as wt, retryOutbox as Tt, useOutbox as St } from "./chat-outbox.js";
13
+ const Me = ["👍", "✅", "👀", "🎉", "❤️", "😂"], ce = X(null);
14
+ function b() {
15
+ const e = Z(ce);
15
16
  if (!e) throw new Error("Chat components must be wrapped in <ChatProvider>");
16
17
  return e;
17
18
  }
18
- const Ke = 0, Fe = {
19
+ const Ie = 0, ke = {
19
20
  collections: { messages: "chat_messages", reads: "chat_last_read", presence: "user_presence" },
20
21
  globalRoom: "global",
21
22
  globalLabel: "General",
22
23
  entityPattern: String.raw`\b([A-Za-z]{2,4}\d{2}(?:INV)?-\d+)\b`
23
24
  };
24
- function Oe(e, t) {
25
+ function xe(e, t) {
25
26
  return `dm:${[e.toUpperCase(), t.toUpperCase()].sort().join(":")}`;
26
27
  }
27
28
  function B(e, t) {
@@ -29,8 +30,8 @@ function B(e, t) {
29
30
  const s = e.slice(3);
30
31
  return [s.slice(0, 36), s.slice(37)].find((o) => o.toLowerCase() !== t.toLowerCase()) ?? null;
31
32
  }
32
- function F(e, t) {
33
- const s = q(), n = v(), o = (t ?? []).join("|");
33
+ function O(e, t) {
34
+ const s = b(), n = v(), o = (t ?? []).join("|");
34
35
  $(() => {
35
36
  const r = () => {
36
37
  for (const a of e) n.invalidateQueries({ queryKey: a });
@@ -39,8 +40,8 @@ function F(e, t) {
39
40
  if (s.realtime) return s.realtime(s.collections.messages, r);
40
41
  }, [s.subscribeRooms, s.realtime, o, n]);
41
42
  }
42
- function ie(e, t) {
43
- const s = q(), n = v();
43
+ function ue(e, t) {
44
+ const s = b(), n = v();
44
45
  $(() => {
45
46
  if (s.realtime)
46
47
  return s.realtime(e, () => {
@@ -48,9 +49,9 @@ function ie(e, t) {
48
49
  });
49
50
  }, [s.realtime, e, n]);
50
51
  }
51
- function Me(e, t = null) {
52
- var U, D, A;
53
- const s = q(), n = m(), o = t ? "around" in t ? `around:${t.around}` : `date:${t.date}` : "latest", { data: r, isLoading: a } = y({
52
+ function Le(e, t = null) {
53
+ var D, N, E;
54
+ const s = b(), n = m(), o = t ? "around" in t ? `around:${t.around}` : `date:${t.date}` : "latest", { data: r, isLoading: a } = y({
54
55
  queryKey: ["nvr-chat", e, o],
55
56
  queryFn: async () => {
56
57
  const _ = { room: e, limit: 80 };
@@ -62,43 +63,43 @@ function Me(e, t = null) {
62
63
  staleTime: 5e3,
63
64
  refetchInterval: s.realtime || s.subscribeRooms ? void 0 : 1e4
64
65
  });
65
- F([["nvr-chat"], ["nvr-chat-rooms"], ["nvr-chat-thread"]], e ? [e] : []);
66
- const [c, u] = k([]), [d, l] = k(null), [i, p] = k(!1);
66
+ O([["nvr-chat"], ["nvr-chat-rooms"], ["nvr-chat-thread"]], e ? [e] : []);
67
+ const [i, c] = L([]), [f, u] = L(null), [l, d] = L(!1);
67
68
  $(() => {
68
- u([]), l(null);
69
+ c([]), u(null);
69
70
  }, [e, o]);
70
- const f = (r == null ? void 0 : r.data) ?? [], b = M(() => {
71
- if (c.length === 0) return f;
72
- const _ = new Set(f.map((R) => R.id));
73
- return [...c.filter((R) => !_.has(R.id)), ...f];
74
- }, [c, f]), W = O(async () => {
71
+ const q = (r == null ? void 0 : r.data) ?? [], p = k(() => {
72
+ if (i.length === 0) return q;
73
+ const _ = new Set(q.map((R) => R.id));
74
+ return [...i.filter((R) => !_.has(R.id)), ...q];
75
+ }, [i, q]), F = M(async () => {
75
76
  var R;
76
- if (!e || i) return;
77
- const _ = b[0];
77
+ if (!e || l) return;
78
+ const _ = p[0];
78
79
  if (_) {
79
- p(!0);
80
+ d(!0);
80
81
  try {
81
- const E = await n.request(
82
+ const P = await n.request(
82
83
  g("/chat/messages", { room: e, limit: 60, before: _.id })
83
84
  );
84
- u((Y) => [...E.data ?? [], ...Y]), l(!!((R = E.meta) != null && R.has_older));
85
+ c((Y) => [...P.data ?? [], ...Y]), u(!!((R = P.meta) != null && R.has_older));
85
86
  } finally {
86
- p(!1);
87
+ d(!1);
87
88
  }
88
89
  }
89
- }, [e, b, n, i]);
90
+ }, [e, p, n, l]);
90
91
  return {
91
- messages: b,
92
+ messages: p,
92
93
  loading: a,
93
- hasOlder: d ?? !!((U = r == null ? void 0 : r.meta) != null && U.has_older),
94
- hasNewer: !!((D = r == null ? void 0 : r.meta) != null && D.has_newer),
95
- anchorId: ((A = r == null ? void 0 : r.meta) == null ? void 0 : A.anchor) ?? null,
96
- loadOlder: W,
97
- loadingOlder: i
94
+ hasOlder: f ?? !!((D = r == null ? void 0 : r.meta) != null && D.has_older),
95
+ hasNewer: !!((N = r == null ? void 0 : r.meta) != null && N.has_newer),
96
+ anchorId: ((E = r == null ? void 0 : r.meta) == null ? void 0 : E.anchor) ?? null,
97
+ loadOlder: F,
98
+ loadingOlder: l
98
99
  };
99
100
  }
100
- function Ie(e, t) {
101
- const s = q(), n = m(), { data: o, isLoading: r } = y({
101
+ function Qe(e, t) {
102
+ const s = b(), n = m(), { data: o, isLoading: r } = y({
102
103
  queryKey: ["nvr-chat-thread", e, t],
103
104
  queryFn: async () => (await n.request(
104
105
  g("/chat/messages", { room: e, thread: t, limit: 300 })
@@ -107,39 +108,39 @@ function Ie(e, t) {
107
108
  staleTime: 5e3,
108
109
  refetchInterval: s.realtime || s.subscribeRooms ? void 0 : 1e4
109
110
  });
110
- F([["nvr-chat-thread"]], e ? [e] : []);
111
+ O([["nvr-chat-thread"]], e ? [e] : []);
111
112
  const a = o ?? [];
112
113
  return {
113
- root: a.find((c) => c.id === t) ?? null,
114
- replies: a.filter((c) => c.id !== t),
114
+ root: a.find((i) => i.id === t) ?? null,
115
+ replies: a.filter((i) => i.id !== t),
115
116
  loading: r
116
117
  };
117
118
  }
118
- function ke(e) {
119
- var r, a, c;
120
- const t = m(), s = v(), n = q();
121
- return re(t, s, ((r = n.me) == null ? void 0 : r.id) ?? null), { mutate: O(
122
- (u) => {
123
- var l, i;
124
- const d = typeof u == "string" ? { text: u } : u;
125
- oe({
126
- client_id: ce(),
119
+ function Ue(e) {
120
+ var r, a, i;
121
+ const t = m(), s = v(), n = b();
122
+ return ae(t, s, ((r = n.me) == null ? void 0 : r.id) ?? null), { mutate: M(
123
+ (c) => {
124
+ var u, l;
125
+ const f = typeof c == "string" ? { text: c } : c;
126
+ ie({
127
+ client_id: le(),
127
128
  room: e,
128
- text: d.text,
129
- mentions: d.mentions ?? [],
130
- attachments: d.attachments ?? [],
131
- parent_id: d.parentId ?? null,
132
- quote_id: d.quoteId ?? null,
133
- urgent: !!d.urgent,
129
+ text: f.text,
130
+ mentions: f.mentions ?? [],
131
+ attachments: f.attachments ?? [],
132
+ parent_id: f.parentId ?? null,
133
+ quote_id: f.quoteId ?? null,
134
+ urgent: !!f.urgent,
134
135
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
135
- sender: ((l = n.me) == null ? void 0 : l.id) ?? "",
136
- sender_name: ((i = n.me) == null ? void 0 : i.name) ?? null
136
+ sender: ((u = n.me) == null ? void 0 : u.id) ?? "",
137
+ sender_name: ((l = n.me) == null ? void 0 : l.name) ?? null
137
138
  });
138
139
  },
139
- [e, (a = n.me) == null ? void 0 : a.id, (c = n.me) == null ? void 0 : c.name]
140
+ [e, (a = n.me) == null ? void 0 : a.id, (i = n.me) == null ? void 0 : i.name]
140
141
  ), isPending: !1 };
141
142
  }
142
- function ce() {
143
+ function le() {
143
144
  var t;
144
145
  const e = globalThis.crypto;
145
146
  return ((t = e == null ? void 0 : e.randomUUID) == null ? void 0 : t.call(e)) ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
@@ -147,18 +148,18 @@ function ce() {
147
148
  function G(e, t, s) {
148
149
  const n = (t == null ? void 0 : t.toLowerCase()) ?? "";
149
150
  return e.map((r) => {
150
- var u, d, l, i, p;
151
- const a = r.kind === "unknown" ? "entity" : r.kind, c = a === "global" ? (
151
+ var c, f, u, l, d;
152
+ const a = r.kind === "unknown" ? "entity" : r.kind, i = a === "global" ? (
152
153
  // The server names General only when an admin renamed it.
153
154
  r.label ?? s.globalLabel
154
155
  ) : a === "dm" ? (
155
156
  // The server resolves the peer's name from the user table; the
156
157
  // message sender is only a fallback for hosts that don't send one.
157
- r.label ?? (((d = (u = r.last_message) == null ? void 0 : u.sender) == null ? void 0 : d.toLowerCase()) !== n ? ((l = r.last_message) == null ? void 0 : l.sender_name) ?? null : null) ?? `User ${((i = B(r.room, n)) == null ? void 0 : i.slice(0, 8)) ?? ""}`
158
- ) : r.label ?? ((p = s.roomLabel) == null ? void 0 : p.call(s, r.room)) ?? r.room.toUpperCase();
158
+ r.label ?? (((f = (c = r.last_message) == null ? void 0 : c.sender) == null ? void 0 : f.toLowerCase()) !== n ? ((u = r.last_message) == null ? void 0 : u.sender_name) ?? null : null) ?? `User ${((l = B(r.room, n)) == null ? void 0 : l.slice(0, 8)) ?? ""}`
159
+ ) : r.label ?? ((d = s.roomLabel) == null ? void 0 : d.call(s, r.room)) ?? r.room.toUpperCase();
159
160
  return {
160
161
  room: r.room,
161
- label: c,
162
+ label: i,
162
163
  kind: a,
163
164
  lastMessage: r.last_message,
164
165
  unread: r.unread,
@@ -174,35 +175,35 @@ function G(e, t, s) {
174
175
  }).sort((r, a) => {
175
176
  if (r.kind === "global") return -1;
176
177
  if (a.kind === "global") return 1;
177
- const c = r.lastMessage ? new Date(r.lastMessage.date_created).getTime() : 0;
178
- return (a.lastMessage ? new Date(a.lastMessage.date_created).getTime() : 0) - c;
178
+ const i = r.lastMessage ? new Date(r.lastMessage.date_created).getTime() : 0;
179
+ return (a.lastMessage ? new Date(a.lastMessage.date_created).getTime() : 0) - i;
179
180
  });
180
181
  }
181
- function Le() {
182
- const e = q(), t = m(), s = e.me, n = y({
182
+ function Ae() {
183
+ const e = b(), t = m(), s = e.me, n = y({
183
184
  queryKey: ["nvr-chat-rooms", s == null ? void 0 : s.id],
184
185
  queryFn: async () => (await t.request(g("/chat/rooms"))).data ?? [],
185
186
  enabled: !!s,
186
187
  refetchInterval: 45e3,
187
188
  staleTime: 1e4
188
189
  });
189
- F([["nvr-chat-rooms"]]);
190
- const o = M(
190
+ O([["nvr-chat-rooms"]]);
191
+ const o = k(
191
192
  () => G(n.data ?? [], s == null ? void 0 : s.id, e),
192
193
  [n.data, s == null ? void 0 : s.id, e]
193
- ), r = I().chat_badge_mode, a = o.reduce((c, u) => {
194
- var d;
195
- if (u.muted) return c;
194
+ ), r = x().chat_badge_mode, a = o.reduce((i, c) => {
195
+ var f;
196
+ if (c.muted) return i;
196
197
  if (r === "conversations") {
197
- const l = u.kind === "dm" || u.kind === "channel" && !!((d = u.channel) != null && d.is_direct);
198
- return c + (l ? u.unread : u.mentions ?? 0);
198
+ const u = c.kind === "dm" || c.kind === "channel" && !!((f = c.channel) != null && f.is_direct);
199
+ return i + (u ? c.unread : c.mentions ?? 0);
199
200
  }
200
- return c + u.unread;
201
+ return i + c.unread;
201
202
  }, 0);
202
203
  return { rooms: o, totalUnread: a, loading: n.isLoading };
203
204
  }
204
- function Qe(e) {
205
- const t = q(), s = m(), n = t.me, o = y({
205
+ function De(e) {
206
+ const t = b(), s = m(), n = t.me, o = y({
206
207
  queryKey: ["nvr-chat-rooms", n == null ? void 0 : n.id, "archived"],
207
208
  queryFn: async () => (await s.request(
208
209
  g("/chat/rooms", { archived: "1" })
@@ -210,9 +211,9 @@ function Qe(e) {
210
211
  enabled: !!n && e,
211
212
  staleTime: 1e4
212
213
  });
213
- return { rooms: M(() => G(o.data ?? [], n == null ? void 0 : n.id, t), [o.data, n == null ? void 0 : n.id, t]), loading: o.isLoading };
214
+ return { rooms: k(() => G(o.data ?? [], n == null ? void 0 : n.id, t), [o.data, n == null ? void 0 : n.id, t]), loading: o.isLoading };
214
215
  }
215
- function xe(e) {
216
+ function Ne(e) {
216
217
  const t = m(), { data: s, isLoading: n } = y({
217
218
  queryKey: ["nvr-chat-directory", e],
218
219
  queryFn: async () => (await t.request(
@@ -222,38 +223,38 @@ function xe(e) {
222
223
  });
223
224
  return { channels: s ?? [], loading: n };
224
225
  }
225
- function Ue() {
226
+ function Ee() {
226
227
  const e = m(), t = v(), s = () => {
227
228
  t.invalidateQueries({ queryKey: ["nvr-chat-rooms"] }), t.invalidateQueries({ queryKey: ["nvr-chat-directory"] });
228
229
  }, n = h({
229
- mutationFn: (l) => e.request(K(`/chat/rooms/${encodeURIComponent(l)}/join`)),
230
+ mutationFn: (u) => e.request(K(`/chat/rooms/${encodeURIComponent(u)}/join`)),
230
231
  onSuccess: s
231
232
  }), o = h({
232
- mutationFn: (l) => e.request(x(`/chat/rooms/${encodeURIComponent(l)}/join`)),
233
+ mutationFn: (u) => e.request(A(`/chat/rooms/${encodeURIComponent(u)}/join`)),
233
234
  onSuccess: s
234
235
  }), r = h({
235
- mutationFn: ({ room: l, muted: i }) => e.request(C(`/chat/rooms/${encodeURIComponent(l)}`, { muted: i })),
236
+ mutationFn: ({ room: u, muted: l }) => e.request(C(`/chat/rooms/${encodeURIComponent(u)}`, { muted: l })),
236
237
  onSuccess: s
237
238
  }), a = h({
238
- mutationFn: ({ room: l, mode: i }) => e.request(
239
- C(`/chat/rooms/${encodeURIComponent(l)}`, {
240
- notify_mode: i === "mentions" ? "mentions" : null
239
+ mutationFn: ({ room: u, mode: l }) => e.request(
240
+ C(`/chat/rooms/${encodeURIComponent(u)}`, {
241
+ notify_mode: l === "mentions" ? "mentions" : null
241
242
  })
242
243
  ),
243
244
  onSuccess: s
244
- }), c = h({
245
- mutationFn: ({ room: l, archived: i }) => e.request(C(`/chat/rooms/${encodeURIComponent(l)}`, { archived: i })),
245
+ }), i = h({
246
+ mutationFn: ({ room: u, archived: l }) => e.request(C(`/chat/rooms/${encodeURIComponent(u)}`, { archived: l })),
246
247
  onSuccess: s
247
- }), u = h({
248
- mutationFn: ({ room: l, starred: i }) => e.request(C(`/chat/rooms/${encodeURIComponent(l)}`, { starred: i })),
248
+ }), c = h({
249
+ mutationFn: ({ room: u, starred: l }) => e.request(C(`/chat/rooms/${encodeURIComponent(u)}`, { starred: l })),
249
250
  onSuccess: s
250
- }), d = h({
251
- mutationFn: (l) => e.request(C(`/chat/rooms/${encodeURIComponent(l)}`, { welcome_seen: !0 })),
251
+ }), f = h({
252
+ mutationFn: (u) => e.request(C(`/chat/rooms/${encodeURIComponent(u)}`, { welcome_seen: !0 })),
252
253
  onSuccess: s
253
254
  });
254
- return { join: n, leave: o, setMuted: r, setNotifyMode: a, setArchived: c, setStarred: u, dismissWelcome: d };
255
+ return { join: n, leave: o, setMuted: r, setNotifyMode: a, setArchived: i, setStarred: c, dismissWelcome: f };
255
256
  }
256
- function De(e) {
257
+ function Pe(e) {
257
258
  const t = m(), { data: s, isLoading: n } = y({
258
259
  queryKey: ["nvr-chat-members", e],
259
260
  queryFn: async () => (await t.request(
@@ -264,22 +265,22 @@ function De(e) {
264
265
  });
265
266
  return { members: s ?? [], loading: n };
266
267
  }
267
- function Ae(e) {
268
+ function je(e) {
268
269
  const t = m(), s = v(), n = () => {
269
270
  s.invalidateQueries({ queryKey: ["nvr-chat-members", e] }), s.invalidateQueries({ queryKey: ["nvr-chat-rooms"] }), s.invalidateQueries({ queryKey: ["nvr-chat-directory"] });
270
271
  }, o = h({
271
- mutationFn: (c) => t.request(C(`/chat/channels/${e}`, c)),
272
+ mutationFn: (i) => t.request(C(`/chat/channels/${e}`, i)),
272
273
  onSuccess: n
273
274
  }), r = h({
274
- mutationFn: (c) => t.request(K(`/chat/channels/${e}/members`, { user_id: c })),
275
+ mutationFn: (i) => t.request(K(`/chat/channels/${e}/members`, { user_id: i })),
275
276
  onSuccess: n
276
277
  }), a = h({
277
- mutationFn: (c) => t.request(x(`/chat/channels/${e}/members/${c}`)),
278
+ mutationFn: (i) => t.request(A(`/chat/channels/${e}/members/${i}`)),
278
279
  onSuccess: n
279
280
  });
280
281
  return { update: o, addMember: r, removeMember: a };
281
282
  }
282
- function Ee() {
283
+ function ze() {
283
284
  const e = m(), { data: t } = y({
284
285
  queryKey: ["nvr-chat-roles"],
285
286
  queryFn: async () => (await e.request(
@@ -289,7 +290,7 @@ function Ee() {
289
290
  });
290
291
  return t ?? [];
291
292
  }
292
- function Ne(e, t) {
293
+ function He(e, t) {
293
294
  const s = m(), { data: n, isLoading: o } = y({
294
295
  queryKey: ["nvr-chat-user-search", e],
295
296
  queryFn: async () => (await s.request(
@@ -300,7 +301,7 @@ function Ne(e, t) {
300
301
  });
301
302
  return { users: n ?? [], loading: o };
302
303
  }
303
- function Pe() {
304
+ function Be() {
304
305
  const e = m(), t = v();
305
306
  return h({
306
307
  mutationFn: (s) => e.request(K("/chat/channels", s)),
@@ -309,14 +310,14 @@ function Pe() {
309
310
  }
310
311
  });
311
312
  }
312
- let N = 0;
313
- const L = /* @__PURE__ */ new Map();
314
- function P(e) {
313
+ let j = 0;
314
+ const Q = /* @__PURE__ */ new Map();
315
+ function z(e) {
315
316
  var t;
316
317
  return e.kind === "dm" || e.kind === "channel" && !!((t = e.channel) != null && t.is_direct);
317
318
  }
318
319
  const w = /* @__PURE__ */ new Map();
319
- function je(e) {
320
+ function Ge(e) {
320
321
  $(() => {
321
322
  if (e)
322
323
  return w.set(e, (w.get(e) ?? 0) + 1), () => {
@@ -325,17 +326,17 @@ function je(e) {
325
326
  };
326
327
  }, [e]);
327
328
  }
328
- function ue() {
329
+ function de() {
329
330
  return typeof document > "u" || document.visibilityState === "visible";
330
331
  }
331
- function j(e) {
332
- return w.has(e) && ue();
332
+ function H(e) {
333
+ return w.has(e) && de();
333
334
  }
334
- function le() {
335
- const e = I().notification_sound;
335
+ function me() {
336
+ const e = x().notification_sound;
336
337
  return typeof e == "string" ? e : "off";
337
338
  }
338
- function I() {
339
+ function x() {
339
340
  const e = m(), { data: t } = y({
340
341
  queryKey: ["nvr-profile-prefs"],
341
342
  queryFn: () => e.request(g("/users/me")).then((s) => {
@@ -346,7 +347,7 @@ function I() {
346
347
  });
347
348
  return t ?? {};
348
349
  }
349
- function de() {
350
+ function fe() {
350
351
  const e = m(), t = v();
351
352
  return h({
352
353
  mutationFn: (s) => e.request(C("/users/me/preferences", s)),
@@ -357,14 +358,14 @@ function de() {
357
358
  onError: (s, n, o) => {
358
359
  o != null && o.prev && t.setQueryData(["nvr-profile-prefs"], o.prev);
359
360
  },
360
- onSuccess: (s, n) => se(Object.keys(n)),
361
+ onSuccess: (s, n) => oe(Object.keys(n)),
361
362
  onSettled: () => {
362
363
  t.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }), t.invalidateQueries({ queryKey: ["presence-online"] });
363
364
  }
364
365
  });
365
366
  }
366
- function ze() {
367
- const e = I(), t = de(), s = Object.keys(e).length > 0;
367
+ function Ve() {
368
+ const e = x(), t = fe(), s = Object.keys(e).length > 0;
368
369
  $(() => {
369
370
  if (!s) return;
370
371
  let n = "";
@@ -383,53 +384,53 @@ function ze() {
383
384
  }
384
385
  }, [s, e.browser_timezone]);
385
386
  }
386
- function Be(e, t) {
387
- const s = q(), n = le(), o = I(), r = Q(o);
387
+ function We(e, t) {
388
+ const s = b(), n = me(), o = x(), r = U(o);
388
389
  r.current = o, $(() => {
389
- const a = t ? t.filter((d) => P(d) && !j(d.room)).reduce((d, l) => d + l.unread, 0) : e, c = a > N, u = te(r.current);
390
- if (s.sound && c && !u && ne(n), t) {
391
- const d = L.size > 0, l = w.size > 0;
392
- for (const i of t) {
393
- const p = L.get(i.room) ?? 0;
394
- if (d && !u && !i.muted && P(i) && i.unread > p && !j(i.room)) {
395
- const f = i.lastMessage, b = f != null && f.sender_name ? String(f.sender_name).trim() : null;
390
+ const a = t ? t.filter((u) => z(u) && !H(u.room)).reduce((u, l) => u + l.unread, 0) : e, i = a > j, c = ne(r.current), f = te(r.current) || c;
391
+ if (s.sound && i && !f && re(n), s.sound && i && c && se({ kind: "chat", title: "New message" }), t) {
392
+ const u = Q.size > 0, l = w.size > 0;
393
+ for (const d of t) {
394
+ const q = Q.get(d.room) ?? 0;
395
+ if (u && !f && !d.muted && z(d) && d.unread > q && !H(d.room)) {
396
+ const p = d.lastMessage, F = p != null && p.sender_name ? String(p.sender_name).trim() : null;
396
397
  ee(
397
- i.kind === "dm" ? `New message from ${b || i.label}` : `New message in ${i.label}${b ? ` — ${b}` : ""}`,
398
+ d.kind === "dm" ? `New message from ${F || d.label}` : `New message in ${d.label}${F ? ` — ${F}` : ""}`,
398
399
  {
399
- description: f != null && f.message ? String(f.message).replace(/<[^>]*>/g, "").slice(0, 90) : void 0,
400
+ description: p != null && p.message ? String(p.message).replace(/<[^>]*>/g, "").slice(0, 90) : void 0,
400
401
  duration: 4e3,
401
402
  ...l ? { position: "top-center" } : {},
402
403
  // Reading the message is the whole reason the toast exists, so
403
404
  // it opens the conversation — only when a host has somewhere to
404
405
  // open it, otherwise the click would do nothing.
405
- ...ge() ? {
406
+ ...qe() ? {
406
407
  className: "cursor-pointer",
407
408
  onDismiss: void 0,
408
409
  action: {
409
410
  label: "Open",
410
- onClick: () => V(i.room, i.label)
411
+ onClick: () => W(d.room, d.label)
411
412
  }
412
413
  } : {}
413
414
  }
414
415
  );
415
416
  }
416
- L.set(i.room, i.unread);
417
+ Q.set(d.room, d.unread);
417
418
  }
418
419
  }
419
- N = a;
420
+ j = a;
420
421
  }, [e, s.sound, t, n]);
421
422
  }
422
- function Ge() {
423
+ function Ye() {
423
424
  const e = m(), t = v();
424
425
  return h({
425
426
  mutationFn: (s) => e.request(K(`/chat/rooms/${encodeURIComponent(s)}/read`)),
426
427
  onSuccess: () => void t.invalidateQueries({ queryKey: ["nvr-chat-rooms"] })
427
428
  });
428
429
  }
429
- const me = ["nvr-chat-room-types"];
430
- function H(e) {
430
+ const he = ["nvr-chat-room-types"];
431
+ function V(e) {
431
432
  return {
432
- queryKey: me,
433
+ queryKey: he,
433
434
  queryFn: async () => {
434
435
  const t = await e.request(g("/chat/room-types"));
435
436
  return ((t == null ? void 0 : t.data) ?? []).filter((s) => s.is_active);
@@ -437,69 +438,69 @@ function H(e) {
437
438
  staleTime: 5 * 6e4
438
439
  };
439
440
  }
440
- function He(e) {
441
- const t = q(), s = m(), n = (e == null ? void 0 : e.indexOf(":")) ?? -1, o = e && n > 0 ? e.slice(0, n) : null, r = e && n > 0 ? e.slice(n + 1) : null, a = !!e && !!o && !!r && e !== t.globalRoom && o !== "dm" && o !== "ch", { data: c } = y({ ...H(s), enabled: a }), u = a ? c == null ? void 0 : c.find((i) => i.is_active && i.prefix === o) : void 0, { data: d } = y({
442
- queryKey: ["nvr-chat-entity-record", u == null ? void 0 : u.collection, u == null ? void 0 : u.match_field, r],
441
+ function Je(e) {
442
+ const t = b(), s = m(), n = (e == null ? void 0 : e.indexOf(":")) ?? -1, o = e && n > 0 ? e.slice(0, n) : null, r = e && n > 0 ? e.slice(n + 1) : null, a = !!e && !!o && !!r && e !== t.globalRoom && o !== "dm" && o !== "ch", { data: i } = y({ ...V(s), enabled: a }), c = a ? i == null ? void 0 : i.find((l) => l.is_active && l.prefix === o) : void 0, { data: f } = y({
443
+ queryKey: ["nvr-chat-entity-record", c == null ? void 0 : c.collection, c == null ? void 0 : c.match_field, r],
443
444
  queryFn: async () => {
444
- var p, f;
445
- return u.match_field === "id" ? r : ((f = (p = (await s.request(
446
- g(`/items/${u.collection}`, {
445
+ var d, q;
446
+ return c.match_field === "id" ? r : ((q = (d = (await s.request(
447
+ g(`/items/${c.collection}`, {
447
448
  limit: 1,
448
449
  fields: "id",
449
- filter: JSON.stringify({ [u.match_field]: { _eq: r } })
450
+ filter: JSON.stringify({ [c.match_field]: { _eq: r } })
450
451
  })
451
- )).data) == null ? void 0 : p[0]) == null ? void 0 : f.id) ?? null;
452
+ )).data) == null ? void 0 : d[0]) == null ? void 0 : q.id) ?? null;
452
453
  },
453
- enabled: !!u && !!r,
454
+ enabled: !!c && !!r,
454
455
  staleTime: 5 * 6e4
455
456
  });
456
- return !u || d == null ? null : (t.recordUrl ?? ((i, p) => `/collections/${i}/${p}`))(u.collection, d);
457
+ return !c || f == null ? null : (t.recordUrl ?? ((l, d) => `/collections/${l}/${d}`))(c.collection, f);
457
458
  }
458
- const fe = /@\[([^\]]+)\](?:\([^)]*\))?/g;
459
- function Ve(e, t) {
459
+ const ye = /@\[([^\]]+)\](?:\([^)]*\))?/g;
460
+ function Ze(e, t) {
460
461
  const s = new RegExp(t, "gi"), n = [];
461
- for (const a of e.matchAll(fe))
462
+ for (const a of e.matchAll(ye))
462
463
  n.push({
463
464
  start: a.index,
464
465
  end: a.index + a[0].length,
465
466
  token: { text: `@${a[1]}`, mention: a[1] }
466
467
  });
467
468
  for (const a of e.matchAll(s))
468
- n.some((c) => a.index >= c.start && a.index < c.end) || n.push({
469
+ n.some((i) => a.index >= i.start && a.index < i.end) || n.push({
469
470
  start: a.index,
470
471
  end: a.index + a[0].length,
471
472
  token: { text: a[0], entity: a[0].toUpperCase() }
472
473
  });
473
- n.sort((a, c) => a.start - c.start);
474
+ n.sort((a, i) => a.start - i.start);
474
475
  const o = [];
475
476
  let r = 0;
476
477
  for (const a of n)
477
478
  a.start > r && o.push({ text: e.slice(r, a.start) }), o.push(a.token), r = a.end;
478
479
  return r < e.length && o.push({ text: e.slice(r) }), o;
479
480
  }
480
- function We(e, t) {
481
+ function Xe(e, t) {
481
482
  const n = e.slice(0, t).match(/@([^@\n\r]*)$/);
482
483
  return n ? n[1] : null;
483
484
  }
484
- const he = 3e3;
485
- function Ye(e) {
486
- const t = q(), s = m();
485
+ const ge = 3e3;
486
+ function et(e) {
487
+ const t = b(), s = m();
487
488
  v();
488
- const n = Q(!1), o = Q(null), r = t.me, a = O(() => {
489
+ const n = U(!1), o = U(null), r = t.me, a = M(() => {
489
490
  o.current && clearTimeout(o.current), o.current = null, n.current && r && t.setTypingRoom && (n.current = !1, t.setTypingRoom(r.id, null));
490
- }, [r, t]), c = O(() => {
491
- !r || !e || !t.setTypingRoom || (n.current || (n.current = !0, t.setTypingRoom(r.id, e)), o.current && clearTimeout(o.current), o.current = setTimeout(a, he));
491
+ }, [r, t]), i = M(() => {
492
+ !r || !e || !t.setTypingRoom || (n.current || (n.current = !0, t.setTypingRoom(r.id, e)), o.current && clearTimeout(o.current), o.current = setTimeout(a, ge));
492
493
  }, [r, e, t, a]);
493
494
  $(() => a, [a]);
494
- const { data: u } = y({
495
+ const { data: c } = y({
495
496
  queryKey: ["nvr-chat-typing", e],
496
497
  queryFn: async () => {
497
- const l = new Date(Date.now() - 6e4).toISOString();
498
+ const u = new Date(Date.now() - 6e4).toISOString();
498
499
  return (await s.request(
499
500
  J(t.collections.presence, {
500
501
  limit: 10,
501
502
  fields: ["user_id", "display_name", "typing_room", "last_seen"],
502
- filter: { typing_room: { _eq: e }, last_seen: { _gte: l } }
503
+ filter: { typing_room: { _eq: e }, last_seen: { _gte: u } }
503
504
  })
504
505
  )).data ?? [];
505
506
  },
@@ -507,58 +508,58 @@ function Ye(e) {
507
508
  refetchInterval: 6e3,
508
509
  staleTime: 2e3
509
510
  });
510
- ie(t.collections.presence, [["nvr-chat-typing"]]);
511
- const d = M(() => {
512
- var p;
513
- const l = (p = r == null ? void 0 : r.id) == null ? void 0 : p.toLowerCase(), i = (u ?? []).filter((f) => {
514
- var b;
515
- return ((b = f.user_id) == null ? void 0 : b.toLowerCase()) !== l;
516
- }).map((f) => f.display_name ?? "Someone");
517
- return i.length === 0 ? null : i.length === 1 ? `${i[0]} is typing…` : i.length === 2 ? `${i[0]} and ${i[1]} are typing…` : `${i.length} people are typing…`;
518
- }, [u, r == null ? void 0 : r.id]);
519
- return { onType: c, clearTyping: a, typingText: d };
520
- }
521
- function Je(e) {
522
- const t = q(), s = m(), n = t.me, o = e && n ? B(e, n.id) : null, { data: r } = y({
511
+ ue(t.collections.presence, [["nvr-chat-typing"]]);
512
+ const f = k(() => {
513
+ var d;
514
+ const u = (d = r == null ? void 0 : r.id) == null ? void 0 : d.toLowerCase(), l = (c ?? []).filter((q) => {
515
+ var p;
516
+ return ((p = q.user_id) == null ? void 0 : p.toLowerCase()) !== u;
517
+ }).map((q) => q.display_name ?? "Someone");
518
+ return l.length === 0 ? null : l.length === 1 ? `${l[0]} is typing…` : l.length === 2 ? `${l[0]} and ${l[1]} are typing…` : `${l.length} people are typing…`;
519
+ }, [c, r == null ? void 0 : r.id]);
520
+ return { onType: i, clearTyping: a, typingText: f };
521
+ }
522
+ function tt(e) {
523
+ const t = b(), s = m(), n = t.me, o = e && n ? B(e, n.id) : null, { data: r } = y({
523
524
  queryKey: ["nvr-chat-peer-read", e],
524
525
  queryFn: async () => {
525
- var c;
526
- return ((c = (await s.request(
526
+ var i;
527
+ return ((i = (await s.request(
527
528
  g(
528
529
  `/chat/rooms/${encodeURIComponent(e)}/peer-read`
529
530
  )
530
- )).data) == null ? void 0 : c.last_read_at) ?? null;
531
+ )).data) == null ? void 0 : i.last_read_at) ?? null;
531
532
  },
532
533
  enabled: !!o && !!e,
533
534
  refetchInterval: 3e4,
534
535
  staleTime: 5e3
535
536
  });
536
- return F([["nvr-chat-peer-read"]], e ? [e] : []), r ?? null;
537
+ return O([["nvr-chat-peer-read"]], e ? [e] : []), r ?? null;
537
538
  }
538
- function Ze(e) {
539
+ function nt(e) {
539
540
  const t = m(), s = v();
540
541
  return h({
541
542
  mutationFn: ({ messageId: n, emoji: o }) => t.request(K(`/chat/messages/${n}/reactions`, { emoji: o })),
542
543
  onSuccess: () => void s.invalidateQueries({ queryKey: ["nvr-chat", e] })
543
544
  });
544
545
  }
545
- function Xe(e) {
546
+ function st(e) {
546
547
  const t = m(), s = v();
547
548
  return h({
548
549
  mutationFn: ({ messageId: n, text: o }) => t.request(C(`/chat/messages/${n}`, { message: o })),
549
550
  onSuccess: () => void s.invalidateQueries({ queryKey: ["nvr-chat", e] })
550
551
  });
551
552
  }
552
- function et(e) {
553
+ function rt(e) {
553
554
  const t = m(), s = v();
554
555
  return h({
555
- mutationFn: (n) => t.request(x(`/chat/messages/${n}`)),
556
+ mutationFn: (n) => t.request(A(`/chat/messages/${n}`)),
556
557
  onSuccess: () => {
557
558
  s.invalidateQueries({ queryKey: ["nvr-chat", e] }), s.invalidateQueries({ queryKey: ["nvr-chat-rooms"] });
558
559
  }
559
560
  });
560
561
  }
561
- function tt(e, t = {}) {
562
+ function ot(e, t = {}) {
562
563
  const s = m(), n = { q: e };
563
564
  t.sender && (n.sender = t.sender), t.room && (n.room = t.room), t.from && (n.from = t.from), t.to && (n.to = t.to), t.has_attachment && (n.has_attachment = "1"), t.mentions_me && (n.mentions_me = "1");
564
565
  const o = Object.keys(n).length > 1, { data: r, isLoading: a } = y({
@@ -571,14 +572,14 @@ function tt(e, t = {}) {
571
572
  });
572
573
  return { hits: r ?? [], loading: a };
573
574
  }
574
- function nt() {
575
+ function at() {
575
576
  const e = m(), t = v();
576
577
  return h({
577
578
  mutationFn: async (s) => (await e.request(K("/chat/group-dm", s))).data,
578
579
  onSuccess: () => void t.invalidateQueries({ queryKey: ["nvr-chat-rooms"] })
579
580
  });
580
581
  }
581
- function ye() {
582
+ function pe() {
582
583
  const e = m(), { data: t } = y({
583
584
  queryKey: ["nvr-chat-config"],
584
585
  queryFn: async () => (await e.request(g("/chat/config"))).data ?? { bot_name: null, bot_user_id: null },
@@ -586,10 +587,10 @@ function ye() {
586
587
  });
587
588
  return t ?? { bot_name: null, bot_user_id: null };
588
589
  }
589
- function st() {
590
- return ye().bot_name;
590
+ function it() {
591
+ return pe().bot_name;
591
592
  }
592
- function rt(e) {
593
+ function ct(e) {
593
594
  const t = m(), { data: s } = y({
594
595
  queryKey: ["nvr-chat-pins", e],
595
596
  queryFn: async () => (await t.request(
@@ -598,16 +599,16 @@ function rt(e) {
598
599
  enabled: !!e,
599
600
  staleTime: 15e3
600
601
  });
601
- return F([["nvr-chat-pins"]], e ? [e] : []), s ?? [];
602
+ return O([["nvr-chat-pins"]], e ? [e] : []), s ?? [];
602
603
  }
603
- function ot(e) {
604
+ function ut(e) {
604
605
  const t = m(), s = v();
605
606
  return h({
606
607
  mutationFn: (n) => t.request(K(`/chat/messages/${n}/pin`)),
607
608
  onSuccess: () => void s.invalidateQueries({ queryKey: ["nvr-chat-pins", e] })
608
609
  });
609
610
  }
610
- const z = [
611
+ const I = [
611
612
  "#7dd3fc",
612
613
  "#86efac",
613
614
  "#fcd34d",
@@ -617,111 +618,119 @@ const z = [
617
618
  "#99f6e4",
618
619
  "#00ceff"
619
620
  ];
620
- function at(e) {
621
+ function lt(e) {
622
+ return I[ve(e)];
623
+ }
624
+ function ve(e) {
621
625
  let t = 0;
622
626
  for (const s of e) t = t * 31 + s.charCodeAt(0) | 0;
623
- return z[Math.abs(t) % z.length];
627
+ return Math.abs(t) % I.length;
624
628
  }
625
- function it(e) {
629
+ function dt(e) {
630
+ return Number.isInteger(e) && e >= 0 && e < I.length ? I[e] : null;
631
+ }
632
+ function mt(e) {
626
633
  var s, n;
627
634
  if (!e) return "?";
628
635
  const t = e.trim().split(/\s+/);
629
636
  return ((((s = t[0]) == null ? void 0 : s[0]) ?? "") + (((n = t[1]) == null ? void 0 : n[0]) ?? "")).toUpperCase() || "?";
630
637
  }
631
638
  let T = null;
632
- function ct(e) {
639
+ function ft(e) {
633
640
  return T = e, () => {
634
641
  T === e && (T = null);
635
642
  };
636
643
  }
637
- function ut() {
644
+ function ht() {
638
645
  return T !== null;
639
646
  }
640
- function lt(e, t) {
647
+ function yt(e, t) {
641
648
  T == null || T(e, t);
642
649
  }
643
650
  let S = null;
644
- function dt(e) {
651
+ function gt(e) {
645
652
  return S = e, () => {
646
653
  S === e && (S = null);
647
654
  };
648
655
  }
649
- function ge() {
656
+ function qe() {
650
657
  return S !== null;
651
658
  }
652
- function V(e, t) {
659
+ function W(e, t) {
653
660
  S == null || S(e, t);
654
661
  }
655
- function mt(e = !0) {
656
- const t = m(), { data: s } = y({ ...H(t), enabled: e });
662
+ function pt(e = !0) {
663
+ const t = m(), { data: s } = y({ ...V(t), enabled: e });
657
664
  return s;
658
665
  }
659
- async function ft(e, t, s) {
666
+ async function vt(e, t, s) {
660
667
  var r;
661
668
  const n = await e.request(
662
669
  g("/chat/record-room", { collection: t, item: s })
663
670
  );
664
671
  if (!((r = n.data) != null && r.room)) return !1;
665
672
  const o = n.data.room.slice(n.data.room.indexOf(":") + 1);
666
- return V(n.data.room, o), !0;
673
+ return W(n.data.room, o), !0;
667
674
  }
668
675
  export {
669
- Fe as CHAT_DEFAULTS,
670
- me as CHAT_ROOM_TYPES_KEY,
671
- ae as ChatConfigContext,
672
- Ke as GENERAL_CHANNEL_ID,
673
- $e as REACTION_EMOJI,
674
- ge as canOpenChatRoom,
675
- ut as canOpenDm,
676
- at as chatAvatarColor,
677
- it as chatInitials,
678
- H as chatRoomTypesQuery,
679
- gt as discardOutbox,
680
- ft as discussRecord,
676
+ ke as CHAT_DEFAULTS,
677
+ he as CHAT_ROOM_TYPES_KEY,
678
+ ce as ChatConfigContext,
679
+ Ie as GENERAL_CHANNEL_ID,
680
+ Me as REACTION_EMOJI,
681
+ qe as canOpenChatRoom,
682
+ ht as canOpenDm,
683
+ lt as chatAvatarColor,
684
+ dt as chatAvatarColorAt,
685
+ ve as chatAvatarColorIndex,
686
+ mt as chatInitials,
687
+ V as chatRoomTypesQuery,
688
+ _t as discardOutbox,
689
+ vt as discussRecord,
681
690
  B as dmPeer,
682
- Oe as dmRoom,
683
- pt as editOutbox,
684
- We as getMentionQuery,
685
- vt as holdOutbox,
686
- qt as nudgeChatOutbox,
687
- V as openChatRoom,
688
- lt as openDmWith,
689
- ct as registerDmOpener,
690
- dt as registerRoomOpener,
691
- bt as retryOutbox,
692
- Ve as splitMessageTokens,
693
- Qe as useArchivedRooms,
694
- Ae as useChannelAdmin,
695
- xe as useChannelDirectory,
696
- De as useChannelMembers,
697
- ye as useChatBotInfo,
698
- st as useChatBotName,
699
- q as useChatConfig,
700
- Me as useChatMessages,
701
- Ee as useChatRoles,
702
- Le as useChatRooms,
703
- tt as useChatSearch,
704
- Ie as useChatThread,
705
- Pe as useCreateChannel,
706
- nt as useCreateGroupDm,
707
- et as useDeleteMessage,
708
- Xe as useEditMessage,
709
- He as useEntityRoomLink,
710
- Ge as useMarkRoomRead,
711
- I as useMyPreferences,
712
- le as useNotificationSoundPreference,
713
- je as useOpenRoomRegistration,
714
- _t as useOutbox,
715
- Je as usePeerReadAt,
716
- ze as useRecordBrowserTimezone,
717
- mt as useRecordRoomTypes,
718
- Ue as useRoomMembership,
719
- rt as useRoomPins,
720
- ke as useSendChatMessage,
721
- de as useSetMyPreferences,
722
- ot as useTogglePin,
723
- Ze as useToggleReaction,
724
- Ye as useTypingIndicator,
725
- Be as useUnreadChirp,
726
- Ne as useUserSearch
691
+ xe as dmRoom,
692
+ Ct as editOutbox,
693
+ Xe as getMentionQuery,
694
+ Rt as holdOutbox,
695
+ wt as nudgeChatOutbox,
696
+ W as openChatRoom,
697
+ yt as openDmWith,
698
+ ft as registerDmOpener,
699
+ gt as registerRoomOpener,
700
+ Tt as retryOutbox,
701
+ Ze as splitMessageTokens,
702
+ De as useArchivedRooms,
703
+ je as useChannelAdmin,
704
+ Ne as useChannelDirectory,
705
+ Pe as useChannelMembers,
706
+ pe as useChatBotInfo,
707
+ it as useChatBotName,
708
+ b as useChatConfig,
709
+ Le as useChatMessages,
710
+ ze as useChatRoles,
711
+ Ae as useChatRooms,
712
+ ot as useChatSearch,
713
+ Qe as useChatThread,
714
+ Be as useCreateChannel,
715
+ at as useCreateGroupDm,
716
+ rt as useDeleteMessage,
717
+ st as useEditMessage,
718
+ Je as useEntityRoomLink,
719
+ Ye as useMarkRoomRead,
720
+ x as useMyPreferences,
721
+ me as useNotificationSoundPreference,
722
+ Ge as useOpenRoomRegistration,
723
+ St as useOutbox,
724
+ tt as usePeerReadAt,
725
+ Ve as useRecordBrowserTimezone,
726
+ pt as useRecordRoomTypes,
727
+ Ee as useRoomMembership,
728
+ ct as useRoomPins,
729
+ Ue as useSendChatMessage,
730
+ fe as useSetMyPreferences,
731
+ ut as useTogglePin,
732
+ nt as useToggleReaction,
733
+ et as useTypingIndicator,
734
+ We as useUnreadChirp,
735
+ He as useUserSearch
727
736
  };