@nivaro/react 0.3.110 → 0.3.112

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 (77) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +170 -2
  4. package/dist/index.js +745 -728
  5. package/dist/shared/components/CollectionBrowserView.js +3097 -2972
  6. package/dist/shared/components/CollectionImportBanner.js +135 -0
  7. package/dist/shared/components/ItemEditForm.js +2235 -2218
  8. package/dist/shared/components/JobsTray.js +54 -47
  9. package/dist/shared/components/TipLayer.js +61 -54
  10. package/dist/shared/components/ViewAsPersonButton.js +109 -0
  11. package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
  12. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
  13. package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
  14. package/dist/shared/components/bulk/bulk-field-options.js +20 -19
  15. package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
  16. package/dist/shared/components/cbv/ColumnHeaderMenu.js +113 -0
  17. package/dist/shared/components/cbv/column-totals.js +66 -0
  18. package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
  19. package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
  20. package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
  21. package/dist/shared/components/collections-directory/directory-data.js +70 -58
  22. package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
  23. package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
  24. package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
  25. package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
  26. package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
  27. package/dist/shared/components/item-edit/FieldRow.js +248 -246
  28. package/dist/shared/components/item-edit/InlineGridField.js +34 -33
  29. package/dist/shared/components/item-edit/InlineTableField.js +3064 -2882
  30. package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
  31. package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
  32. package/dist/shared/components/item-edit/PlanGrid.js +2 -1
  33. package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
  34. package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
  35. package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
  36. package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
  37. package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
  38. package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
  39. package/dist/shared/components/item-edit/grid-search.js +345 -0
  40. package/dist/shared/components/item-edit/render-stability.js +61 -54
  41. package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
  42. package/dist/shared/components/ops-report/DigestSections.js +163 -144
  43. package/dist/shared/components/ops-report/drill.js +97 -97
  44. package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
  45. package/dist/shared/components/panels/AddendumPanel.js +92 -91
  46. package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
  47. package/dist/shared/components/panels/BlockedMove.js +73 -0
  48. package/dist/shared/components/panels/CommentPanel.js +265 -252
  49. package/dist/shared/components/panels/OwnersSlot.js +47 -35
  50. package/dist/shared/components/panels/PipelineInsight.js +186 -0
  51. package/dist/shared/components/panels/PipelinePanel.js +1573 -1475
  52. package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
  53. package/dist/shared/components/panels/RevisionsPanel.js +261 -260
  54. package/dist/shared/components/pipeline/FieldPicker.js +41 -40
  55. package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
  56. package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
  57. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
  58. package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
  59. package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
  60. package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
  61. package/dist/shared/components/profile/PersonHeader.js +29 -29
  62. package/dist/shared/components/profile/PersonProfile.js +30 -28
  63. package/dist/shared/components/profile/SlowScreensCard.js +286 -0
  64. package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
  65. package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
  66. package/dist/shared/components/support/TicketDetailSheet.js +25 -16
  67. package/dist/shared/components/support/TicketSlowScreens.js +32 -0
  68. package/dist/shared/lib/activity-sentence.js +224 -178
  69. package/dist/shared/lib/collection-import-banner.js +27 -0
  70. package/dist/shared/lib/crash-report.js +112 -0
  71. package/dist/shared/lib/export-runs.js +99 -0
  72. package/dist/shared/lib/jobs-tray.js +89 -67
  73. package/dist/shared/lib/list-link.js +76 -69
  74. package/dist/shared/lib/nav-trail.js +180 -76
  75. package/dist/shared/lib/query-keys.js +26 -0
  76. package/dist/shared/lib/view-as.js +16 -11
  77. package/package.json +1 -1
@@ -1,56 +1,56 @@
1
- import { jsxs as s, jsx as e, Fragment as V } from "react/jsx-runtime";
2
- import { useQueryClient as ke, useQuery as z, useMutation as j } from "@tanstack/react-query";
3
- import { MessageSquare as De, ChevronDown as Te, ClipboardPlus as Pe, Pencil as Fe, Trash2 as Re, Check as Me, X as Ie, SmilePlus as Ne } from "lucide-react";
1
+ import { jsxs as s, jsx as t, Fragment as V } from "react/jsx-runtime";
2
+ import { useQueryClient as Ne, useQuery as z, useMutation as j } from "@tanstack/react-query";
3
+ import { MessageSquare as Pe, ChevronDown as Fe, ClipboardPlus as Re, Pencil as Me, Trash2 as Ie, Check as Oe, X as je, SmilePlus as we } from "lucide-react";
4
4
  import { useState as _, useRef as Y, useEffect as Z, useMemo as X } from "react";
5
- import { createPortal as Oe } from "react-dom";
5
+ import { createPortal as Ae } from "react-dom";
6
6
  import { toast as I } from "sonner";
7
- import { useNivaroClient as oe, useItemEditAuth as je, useDrilldown as Ae } from "../../context.js";
8
- import { useDebounced as Le } from "../../hooks/useDebounced.js";
9
- import { get as U, post as B, patch as Ke, del as Be } from "../../lib/commands.js";
10
- import { usePresenceOnlinePoll as Qe } from "../../lib/presence-live.js";
11
- import { useRecordSignalPeers as ze, useRecordSignalSender as Ue, signalSentence as We } from "../../lib/presence-signals.js";
12
- import { invalidateRecordTasks as Ge } from "../../lib/record-tasks.js";
13
- import { useStartsOpen as He } from "../../lib/use-starts-open.js";
14
- import { formatRelative as le, formatDateTime as ie, titleCase as Xe } from "../../lib/utils.js";
15
- import { AgentBadge as Je } from "../AgentBadge.js";
16
- import { AutolinkedText as se } from "../AutolinkedText.js";
17
- import { InboundRequestPopover as Ve } from "../integrations/InboundRequest.js";
18
- import { useFieldComments as Ze } from "../item-edit/field-comments-context.js";
19
- import { UserAvatar as Ye } from "../UserAvatar.js";
20
- import { Avatar as et, AvatarFallback as tt } from "../ui/avatar.js";
7
+ import { useNivaroClient as se, useItemEditAuth as Le, useDrilldown as Ke } from "../../context.js";
8
+ import { useDebounced as Be } from "../../hooks/useDebounced.js";
9
+ import { get as U, post as B, patch as Qe, del as ze } from "../../lib/commands.js";
10
+ import { usePresenceOnlinePoll as Ue } from "../../lib/presence-live.js";
11
+ import { useRecordSignalPeers as We, useRecordSignalSender as Ge, signalSentence as He } from "../../lib/presence-signals.js";
12
+ import { invalidateRecordTasks as Xe } from "../../lib/record-tasks.js";
13
+ import { useStartsOpen as Je } from "../../lib/use-starts-open.js";
14
+ import { formatRelative as oe, formatDateTime as le, titleCase as Ve } from "../../lib/utils.js";
15
+ import { AgentBadge as Ze } from "../AgentBadge.js";
16
+ import { AutolinkedText as re } from "../AutolinkedText.js";
17
+ import { InboundRequestPopover as Ye } from "../integrations/InboundRequest.js";
18
+ import { useFieldComments as et } from "../item-edit/field-comments-context.js";
19
+ import { UserAvatar as tt } from "../UserAvatar.js";
20
+ import { Avatar as at, AvatarFallback as nt } from "../ui/avatar.js";
21
21
  import { Button as J } from "../ui/button.js";
22
22
  import { Separator as ge } from "../ui/separator.js";
23
- import { Textarea as at } from "../ui/textarea.js";
24
- import { RecordEventPathSheet as nt } from "./IntegrationActivitySection.js";
25
- const we = ["👍", "✅", "👀", "🎉", "❤️", "😂"];
26
- function rt(t) {
23
+ import { Textarea as rt } from "../ui/textarea.js";
24
+ import { RecordEventPathSheet as st } from "./IntegrationActivitySection.js";
25
+ const _e = ["👍", "✅", "👀", "🎉", "❤️", "😂"];
26
+ function ot(e) {
27
27
  var d, u, b, m;
28
- return [(d = t.first_name) == null ? void 0 : d[0], (u = t.last_name) == null ? void 0 : u[0]].filter(Boolean).join("").toUpperCase() || ((m = (b = t.email) == null ? void 0 : b[0]) == null ? void 0 : m.toUpperCase()) || "?";
28
+ return [(d = e.first_name) == null ? void 0 : d[0], (u = e.last_name) == null ? void 0 : u[0]].filter(Boolean).join("").toUpperCase() || ((m = (b = e.email) == null ? void 0 : b[0]) == null ? void 0 : m.toUpperCase()) || "?";
29
29
  }
30
- function st({ comment: t }) {
31
- const i = (t.mentions ?? []).filter(
30
+ function lt({ comment: e }) {
31
+ const l = (e.mentions ?? []).filter(
32
32
  (d) => {
33
33
  var u;
34
- return d.id && String(d.id).toUpperCase() !== String(((u = t.user) == null ? void 0 : u.id) ?? "").toUpperCase();
34
+ return d.id && String(d.id).toUpperCase() !== String(((u = e.user) == null ? void 0 : u.id) ?? "").toUpperCase();
35
35
  }
36
36
  );
37
- return i.length === 0 ? null : /* @__PURE__ */ e(
37
+ return l.length === 0 ? null : /* @__PURE__ */ t(
38
38
  "p",
39
39
  {
40
40
  className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-0.5 text-[11px]",
41
41
  "data-mention-receipts": !0,
42
- children: i.map((d) => {
42
+ children: l.map((d) => {
43
43
  const u = [d.first_name, d.last_name].filter(Boolean).join(" ") || d.email || "Someone";
44
44
  return /* @__PURE__ */ s(
45
45
  "span",
46
46
  {
47
47
  "data-mention-seen": d.seen_at ? "seen" : "unseen",
48
- title: d.seen_at ? `Seen ${ie(d.seen_at)}` : "Not seen yet",
48
+ title: d.seen_at ? `Seen ${le(d.seen_at)}` : "Not seen yet",
49
49
  className: d.seen_at ? "text-emerald-600 dark:text-emerald-400" : "text-slate-400",
50
50
  children: [
51
51
  d.seen_at ? "✓ " : "",
52
52
  u,
53
- d.seen_at ? ` saw this ${le(d.seen_at)}` : " has not seen this yet"
53
+ d.seen_at ? ` saw this ${oe(d.seen_at)}` : " has not seen this yet"
54
54
  ]
55
55
  },
56
56
  d.id
@@ -59,52 +59,57 @@ function st({ comment: t }) {
59
59
  }
60
60
  );
61
61
  }
62
- function ne(t) {
63
- return [t.first_name, t.last_name].filter(Boolean).join(" ") || t.email;
62
+ function Ce(e) {
63
+ return [e.first_name, e.last_name].filter(Boolean).join(" ") || e.email;
64
64
  }
65
- function ot({
66
- field: t,
67
- label: i,
65
+ function ye(e) {
66
+ var d;
67
+ const l = Ce(e.user);
68
+ return (d = e.acting_admin) != null && d.name ? `${e.acting_admin.name} as ${l}` : l;
69
+ }
70
+ function it({
71
+ field: e,
72
+ label: l,
68
73
  resolved: d,
69
74
  onJump: u
70
75
  }) {
71
76
  const b = /* @__PURE__ */ s(V, { children: [
72
77
  "on ",
73
- /* @__PURE__ */ e("span", { className: "font-medium", children: i }),
74
- d && /* @__PURE__ */ e("span", { className: "text-slate-400 dark:text-slate-500", children: " · resolved" })
78
+ /* @__PURE__ */ t("span", { className: "font-medium", children: l }),
79
+ d && /* @__PURE__ */ t("span", { className: "text-slate-400 dark:text-slate-500", children: " · resolved" })
75
80
  ] }), m = "inline-flex min-w-0 max-w-[220px] items-center gap-1 truncate rounded-full border border-slate-200 bg-slate-50 px-1.5 py-px text-[10.5px] text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300";
76
- return u ? /* @__PURE__ */ e(
81
+ return u ? /* @__PURE__ */ t(
77
82
  "button",
78
83
  {
79
84
  type: "button",
80
- "data-comment-field": t,
85
+ "data-comment-field": e,
81
86
  onClick: u,
82
- "data-tip": `Go to ${i}`,
87
+ "data-tip": `Go to ${l}`,
83
88
  className: `${m} transition-colors hover:border-nvr-cyan/50 hover:text-[#0e7490] dark:hover:text-nvr-cyan`,
84
89
  children: b
85
90
  }
86
- ) : /* @__PURE__ */ e("span", { "data-comment-field": t, className: m, children: b });
91
+ ) : /* @__PURE__ */ t("span", { "data-comment-field": e, className: m, children: b });
87
92
  }
88
- function lt(t, i) {
89
- const u = t.slice(0, i).match(/(^|\s)@([a-zA-Z0-9._-]{2,})$/);
90
- return u ? { start: i - u[2].length - 1, query: u[2] } : null;
93
+ function dt(e, l) {
94
+ const u = e.slice(0, l).match(/(^|\s)@([a-zA-Z0-9._-]{2,})$/);
95
+ return u ? { start: l - u[2].length - 1, query: u[2] } : null;
91
96
  }
92
- function ye(t) {
93
- return t.email.split("@")[0];
97
+ function ve(e) {
98
+ return e.email.split("@")[0];
94
99
  }
95
- function re({
96
- value: t,
97
- onChange: i,
100
+ function ne({
101
+ value: e,
102
+ onChange: l,
98
103
  ...d
99
104
  }) {
100
- const u = oe(), b = Y(null), [m, C] = _(null), [g, k] = _(0), v = Le((m == null ? void 0 : m.query) ?? "", 200), { data: S = [] } = z({
105
+ const u = se(), b = Y(null), [m, C] = _(null), [g, k] = _(0), v = Be((m == null ? void 0 : m.query) ?? "", 200), { data: S = [] } = z({
101
106
  queryKey: ["users", "mention-search", v],
102
107
  queryFn: () => u.request(
103
108
  U("/users", { limit: 8, sort: "first_name", search: v })
104
109
  ).then((a) => a.data),
105
110
  enabled: !!m && v.length >= 2,
106
111
  staleTime: 3e4
107
- }), q = Qe(15e3, !!m), { data: D } = z({
112
+ }), q = Ue(15e3, !!m), { data: D } = z({
108
113
  queryKey: ["presence-online"],
109
114
  queryFn: () => u.request(
110
115
  U("/presence/online")
@@ -114,9 +119,9 @@ function re({
114
119
  staleTime: 5e3
115
120
  }), c = (a) => {
116
121
  var p;
117
- const l = (p = D == null ? void 0 : D.data) == null ? void 0 : p.find((f) => String(f.user_id).toUpperCase() === a.toUpperCase());
118
- return l ? l.is_idle || l.away ? 1 : 0 : 2;
119
- }, y = [...S].sort((a, l) => c(a.id) - c(l.id)), { data: T = [] } = z({
122
+ const i = (p = D == null ? void 0 : D.data) == null ? void 0 : p.find((f) => String(f.user_id).toUpperCase() === a.toUpperCase());
123
+ return i ? i.is_idle || i.away ? 1 : 0 : 2;
124
+ }, y = [...S].sort((a, i) => c(a.id) - c(i.id)), { data: T = [] } = z({
120
125
  queryKey: ["mention-roles"],
121
126
  queryFn: () => u.request(U("/chat/roles")).then((a) => a.data).catch(() => []),
122
127
  enabled: !!m,
@@ -131,22 +136,22 @@ function re({
131
136
  }
132
137
  const a = b.current.getBoundingClientRect();
133
138
  E({ top: a.bottom + 4, left: a.left, width: Math.min(a.width, 360) });
134
- const l = (f) => {
139
+ const i = (f) => {
135
140
  var w;
136
141
  (w = W.current) != null && w.contains(f.target) || C(null);
137
142
  }, p = () => C(null);
138
- return window.addEventListener("scroll", l, !0), window.addEventListener("resize", p), () => {
139
- window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", p);
143
+ return window.addEventListener("scroll", i, !0), window.addEventListener("resize", p), () => {
144
+ window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", p);
140
145
  };
141
146
  }, [P]);
142
147
  function A(a) {
143
- const l = lt(a.value, a.selectionStart ?? a.value.length);
144
- C(l), l || k(0);
148
+ const i = dt(a.value, a.selectionStart ?? a.value.length);
149
+ C(i), i || k(0);
145
150
  }
146
151
  function F(a) {
147
152
  if (!m || !b.current) return;
148
- const l = b.current.selectionStart ?? t.length, p = a === "__owners__" ? "@owners " : typeof a == "object" && "role" in a ? `@${a.role.toLowerCase().replace(/\s+/g, "-")} ` : `@${ye(a)} `, f = t.slice(0, m.start) + p + t.slice(l);
149
- i(f), C(null), k(0);
153
+ const i = b.current.selectionStart ?? e.length, p = a === "__owners__" ? "@owners " : typeof a == "object" && "role" in a ? `@${a.role.toLowerCase().replace(/\s+/g, "-")} ` : `@${ve(a)} `, f = e.slice(0, m.start) + p + e.slice(i);
154
+ l(f), C(null), k(0);
150
155
  const w = m.start + p.length;
151
156
  requestAnimationFrame(() => {
152
157
  var O, L;
@@ -156,35 +161,35 @@ function re({
156
161
  function Q(a) {
157
162
  if (P)
158
163
  if (a.key === "ArrowDown")
159
- a.preventDefault(), k((l) => (l + 1) % o);
164
+ a.preventDefault(), k((i) => (i + 1) % o);
160
165
  else if (a.key === "ArrowUp")
161
- a.preventDefault(), k((l) => (l - 1 + o) % o);
166
+ a.preventDefault(), k((i) => (i - 1 + o) % o);
162
167
  else if (a.key === "Enter" || a.key === "Tab") {
163
168
  a.preventDefault();
164
- const l = Math.min(g, o - 1), p = N ? 1 : 0, f = p + y.length;
165
- if (N && l === 0) F("__owners__");
166
- else if (l >= f) {
167
- const w = $[l - f];
169
+ const i = Math.min(g, o - 1), p = N ? 1 : 0, f = p + y.length;
170
+ if (N && i === 0) F("__owners__");
171
+ else if (i >= f) {
172
+ const w = $[i - f];
168
173
  w && F({ role: w.name });
169
- } else F(y[l - p]);
174
+ } else F(y[i - p]);
170
175
  } else a.key === "Escape" && (a.preventDefault(), C(null));
171
176
  }
172
177
  return /* @__PURE__ */ s("div", { className: "relative", children: [
173
- /* @__PURE__ */ e(
174
- at,
178
+ /* @__PURE__ */ t(
179
+ rt,
175
180
  {
176
181
  ...d,
177
182
  ref: b,
178
- value: t,
183
+ value: e,
179
184
  onChange: (a) => {
180
- i(a.target.value), A(a.target);
185
+ l(a.target.value), A(a.target);
181
186
  },
182
187
  onKeyDown: Q,
183
188
  onClick: (a) => A(a.currentTarget),
184
189
  onBlur: () => setTimeout(() => C(null), 150)
185
190
  }
186
191
  ),
187
- P && h && Oe(
192
+ P && h && Ae(
188
193
  /* @__PURE__ */ s(
189
194
  "div",
190
195
  {
@@ -204,17 +209,17 @@ function re({
204
209
  onMouseEnter: () => k(0),
205
210
  className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${g === 0 ? "bg-nvr-cyan/10" : ""}`,
206
211
  children: [
207
- /* @__PURE__ */ e("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy/80 dark:text-nvr-cyan", children: "★" }),
212
+ /* @__PURE__ */ t("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy/80 dark:text-nvr-cyan", children: "★" }),
208
213
  /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
209
- /* @__PURE__ */ e("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: "Owners" }),
210
- /* @__PURE__ */ e("span", { className: "block truncate text-[11px] text-slate-400", children: "Everyone currently assigned to this record" })
214
+ /* @__PURE__ */ t("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: "Owners" }),
215
+ /* @__PURE__ */ t("span", { className: "block truncate text-[11px] text-slate-400", children: "Everyone currently assigned to this record" })
211
216
  ] })
212
217
  ]
213
218
  }
214
219
  ),
215
- y.map((a, l) => {
220
+ y.map((a, i) => {
216
221
  var w, O;
217
- const p = N ? l + 1 : l, f = [a.first_name, a.last_name].filter(Boolean).join(" ") || a.email;
222
+ const p = N ? i + 1 : i, f = [a.first_name, a.last_name].filter(Boolean).join(" ") || a.email;
218
223
  return /* @__PURE__ */ s(
219
224
  "button",
220
225
  {
@@ -227,7 +232,7 @@ function re({
227
232
  children: [
228
233
  /* @__PURE__ */ s("span", { className: "relative flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy/80 dark:text-nvr-cyan", children: [
229
234
  (`${((w = a.first_name) == null ? void 0 : w[0]) ?? ""}${((O = a.last_name) == null ? void 0 : O[0]) ?? ""}`.trim() || a.email[0]).toUpperCase(),
230
- c(a.id) < 2 && /* @__PURE__ */ e(
235
+ c(a.id) < 2 && /* @__PURE__ */ t(
231
236
  "span",
232
237
  {
233
238
  "data-mention-presence": c(a.id) === 0 ? "online" : "idle",
@@ -237,14 +242,14 @@ function re({
237
242
  )
238
243
  ] }),
239
244
  /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
240
- /* @__PURE__ */ e("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: f }),
245
+ /* @__PURE__ */ t("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: f }),
241
246
  /* @__PURE__ */ s("span", { className: "block truncate text-[11px] text-slate-400", children: [
242
247
  a.is_out_of_office && /* @__PURE__ */ s("span", { className: "mr-1 rounded bg-amber-100 px-1 py-px text-[9.5px] font-semibold text-amber-700 dark:bg-amber-400/15 dark:text-amber-400", children: [
243
248
  "OOO",
244
249
  a.ooo_end ? ` until ${String(a.ooo_end).slice(0, 10)}` : ""
245
250
  ] }),
246
251
  "@",
247
- ye(a),
252
+ ve(a),
248
253
  (a.title || a.department) && /* @__PURE__ */ s("span", { className: "text-slate-400 dark:text-slate-500", children: [
249
254
  " · ",
250
255
  [a.title, a.department].filter(Boolean).join(", ")
@@ -256,8 +261,8 @@ function re({
256
261
  a.id
257
262
  );
258
263
  }),
259
- $.map((a, l) => {
260
- const p = y.length + (N ? 1 : 0) + l;
264
+ $.map((a, i) => {
265
+ const p = y.length + (N ? 1 : 0) + i;
261
266
  return /* @__PURE__ */ s(
262
267
  "button",
263
268
  {
@@ -268,10 +273,10 @@ function re({
268
273
  onMouseEnter: () => k(p),
269
274
  className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${p === g ? "bg-nvr-cyan/10" : ""}`,
270
275
  children: [
271
- /* @__PURE__ */ e("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-violet-500/15 text-[10px] font-semibold text-violet-600 dark:text-violet-300", children: "R" }),
276
+ /* @__PURE__ */ t("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-violet-500/15 text-[10px] font-semibold text-violet-600 dark:text-violet-300", children: "R" }),
272
277
  /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
273
- /* @__PURE__ */ e("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: a.name }),
274
- /* @__PURE__ */ e("span", { className: "block text-[11px] text-slate-400", children: "Role — notifies every member" })
278
+ /* @__PURE__ */ t("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: a.name }),
279
+ /* @__PURE__ */ t("span", { className: "block text-[11px] text-slate-400", children: "Role — notifies every member" })
275
280
  ] })
276
281
  ]
277
282
  },
@@ -285,9 +290,9 @@ function re({
285
290
  )
286
291
  ] });
287
292
  }
288
- function ve(t) {
289
- if (t.kind === "comment") return "people";
290
- switch (t.note.source) {
293
+ function ke(e) {
294
+ if (e.kind === "comment") return "people";
295
+ switch (e.note.source) {
291
296
  case "note":
292
297
  return "people";
293
298
  case "external":
@@ -297,32 +302,32 @@ function ve(t) {
297
302
  return "system";
298
303
  }
299
304
  }
300
- const it = {
305
+ const ct = {
301
306
  people: "People",
302
307
  system: "System",
303
308
  integration: "Integration"
304
309
  };
305
- function dt(t) {
306
- const i = t.kind === "comment" ? t.comment.text : t.note.text;
307
- return (t.kind === "comment" ? i.replace(/<[^>]*>/g, " ") : i).replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
310
+ function mt(e) {
311
+ const l = e.kind === "comment" ? e.comment.text : e.note.text;
312
+ return (e.kind === "comment" ? l.replace(/<[^>]*>/g, " ") : l).replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
308
313
  }
309
- const ct = "integrations:";
310
- function mt({
311
- note: t,
312
- collection: i,
314
+ const ut = "integrations:";
315
+ function pt({
316
+ note: e,
317
+ collection: l,
313
318
  item: d
314
319
  }) {
315
320
  var P;
316
- const u = Ae(), [b, m] = _(!1), C = t.source === "external" && !!t.provider && !t.provider.startsWith(ct), g = oe(), k = ke(), [v, S] = _(!1), q = j({
317
- mutationFn: (o) => g.request(B(`/comments/${t.comment_id}/reactions`, { emoji: o })),
321
+ const u = Ke(), [b, m] = _(!1), C = e.source === "external" && !!e.provider && !e.provider.startsWith(ut), g = se(), k = Ne(), [v, S] = _(!1), q = j({
322
+ mutationFn: (o) => g.request(B(`/comments/${e.comment_id}/reactions`, { emoji: o })),
318
323
  onSuccess: () => {
319
324
  S(!1), k.invalidateQueries({ queryKey: ["comments-related"] }), k.invalidateQueries({ queryKey: ["row-comment-counts"] });
320
325
  },
321
326
  onError: () => I.error("Failed to react")
322
327
  }), [D, c] = _(!1), y = j({
323
328
  mutationFn: () => g.request(
324
- B(`/integration-events/${encodeURIComponent(t.provider ?? "")}/replay`, {
325
- entry_id: t.id.replace(/^external:/, "")
329
+ B(`/integration-events/${encodeURIComponent(e.provider ?? "")}/replay`, {
330
+ entry_id: e.id.replace(/^external:/, "")
326
331
  })
327
332
  ),
328
333
  onSuccess: (o) => {
@@ -337,8 +342,8 @@ function mt({
337
342
  const h = (E = o == null ? void 0 : o.response) == null ? void 0 : E.error;
338
343
  I.error(h ?? (o == null ? void 0 : o.message) ?? "Replay failed", { duration: 8e3 });
339
344
  }
340
- }), T = t.link ? () => {
341
- const o = t.link;
345
+ }), T = e.link ? () => {
346
+ const o = e.link;
342
347
  if (!o) return;
343
348
  const h = document.querySelector(`[data-o2m-row="${o.collection}:${o.item_id}"]`);
344
349
  if (h) {
@@ -346,23 +351,23 @@ function mt({
346
351
  return;
347
352
  }
348
353
  u == null || u.open({ collection: o.collection, itemId: o.item_id });
349
- } : null, $ = t.source === "transition" ? "border-nvr-cyan/30 bg-nvr-cyan/[0.06] text-nvr-navy dark:text-nvr-cyan" : t.source === "addendum" ? "border-amber-200 bg-amber-50/60 text-amber-700 dark:border-amber-900/40 dark:bg-amber-900/10 dark:text-amber-400" : t.source === "external" || t.source === "inbound" ? "border-sky-200 bg-sky-50/70 text-sky-700 dark:border-sky-900/40 dark:bg-sky-900/10 dark:text-sky-300" : t.source === "import" ? "border-emerald-200 bg-emerald-50/70 text-emerald-700 dark:border-emerald-900/40 dark:bg-emerald-900/10 dark:text-emerald-300" : "border-slate-200 bg-slate-50/80 text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", N = t.source === "import" && ((P = t.import) != null && P.file_id) ? t.import : null;
350
- return /* @__PURE__ */ s("div", { className: "flex gap-3", "data-recorded-note": t.source, children: [
351
- /* @__PURE__ */ e("div", { className: "mt-1 h-8 w-8 shrink-0", "aria-hidden": !0 }),
354
+ } : null, $ = e.source === "transition" ? "border-nvr-cyan/30 bg-nvr-cyan/[0.06] text-nvr-navy dark:text-nvr-cyan" : e.source === "addendum" ? "border-amber-200 bg-amber-50/60 text-amber-700 dark:border-amber-900/40 dark:bg-amber-900/10 dark:text-amber-400" : e.source === "external" || e.source === "inbound" ? "border-sky-200 bg-sky-50/70 text-sky-700 dark:border-sky-900/40 dark:bg-sky-900/10 dark:text-sky-300" : e.source === "import" ? "border-emerald-200 bg-emerald-50/70 text-emerald-700 dark:border-emerald-900/40 dark:bg-emerald-900/10 dark:text-emerald-300" : "border-slate-200 bg-slate-50/80 text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", N = e.source === "import" && ((P = e.import) != null && P.file_id) ? e.import : null;
355
+ return /* @__PURE__ */ s("div", { className: "flex gap-3", "data-recorded-note": e.source, children: [
356
+ /* @__PURE__ */ t("div", { className: "mt-1 h-8 w-8 shrink-0", "aria-hidden": !0 }),
352
357
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
353
358
  /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
354
- /* @__PURE__ */ e("span", { className: `rounded border px-1.5 py-px text-[10px] font-medium ${$}`, children: t.label }),
355
- t.user_name && /* @__PURE__ */ e("span", { className: "text-[12px] font-medium text-slate-700 dark:text-slate-200", children: t.user_name }),
356
- t.context && (T ? /* @__PURE__ */ e(
359
+ /* @__PURE__ */ t("span", { className: `rounded border px-1.5 py-px text-[10px] font-medium ${$}`, children: e.label }),
360
+ e.user_name && /* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-slate-700 dark:text-slate-200", children: e.user_name }),
361
+ e.context && (T ? /* @__PURE__ */ t(
357
362
  "button",
358
363
  {
359
364
  type: "button",
360
365
  onClick: T,
361
366
  className: "truncate text-[11px] text-nvr-navy underline-offset-2 hover:underline dark:text-nvr-cyan",
362
367
  "data-line-comment-link": !0,
363
- children: t.context
368
+ children: e.context
364
369
  }
365
- ) : N ? /* @__PURE__ */ e(
370
+ ) : N ? /* @__PURE__ */ t(
366
371
  "a",
367
372
  {
368
373
  href: `/api/files/${N.file_id}?download=1`,
@@ -371,23 +376,23 @@ function mt({
371
376
  onClick: (o) => o.stopPropagation(),
372
377
  className: "truncate text-[11px] text-nvr-navy underline decoration-dotted underline-offset-2 dark:text-nvr-cyan",
373
378
  "data-note-import-file": N.file_id ?? void 0,
374
- children: t.context
379
+ children: e.context
375
380
  }
376
- ) : /* @__PURE__ */ e("span", { className: "truncate text-[11px] text-slate-400", children: t.context })),
377
- /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", "data-tip": ie(t.created_at), children: le(t.created_at) }),
378
- t.source === "inbound" && t.inbound && /* @__PURE__ */ e(
379
- Ve,
381
+ ) : /* @__PURE__ */ t("span", { className: "truncate text-[11px] text-slate-400", children: e.context })),
382
+ /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", "data-tip": le(e.created_at), children: oe(e.created_at) }),
383
+ e.source === "inbound" && e.inbound && /* @__PURE__ */ t(
384
+ Ye,
380
385
  {
381
- activityId: t.inbound.activity_id,
382
- callerName: t.label,
383
- collection: i,
386
+ activityId: e.inbound.activity_id,
387
+ callerName: e.label,
388
+ collection: l,
384
389
  itemId: d,
385
390
  align: "end",
386
- children: /* @__PURE__ */ e(
391
+ children: /* @__PURE__ */ t(
387
392
  "button",
388
393
  {
389
394
  type: "button",
390
- "data-note-inbound-request": t.inbound.activity_id,
395
+ "data-note-inbound-request": e.inbound.activity_id,
391
396
  className: "ml-auto rounded px-1.5 py-px text-[10.5px] font-medium text-sky-700 transition-colors hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20",
392
397
  "data-tip": "The request this caller sent, and everything it set off",
393
398
  children: "Request"
@@ -395,35 +400,35 @@ function mt({
395
400
  )
396
401
  }
397
402
  ),
398
- t.source === "external" && t.status === "error" && /* @__PURE__ */ e("span", { className: "rounded bg-red-50 px-1 text-[10px] font-medium text-red-700 dark:bg-red-500/10 dark:text-red-400", children: "error" }),
399
- C && /* @__PURE__ */ e(
403
+ e.source === "external" && e.status === "error" && /* @__PURE__ */ t("span", { className: "rounded bg-red-50 px-1 text-[10px] font-medium text-red-700 dark:bg-red-500/10 dark:text-red-400", children: "error" }),
404
+ C && /* @__PURE__ */ t(
400
405
  "button",
401
406
  {
402
407
  type: "button",
403
408
  onClick: () => m(!0),
404
- "data-note-show-path": t.id,
409
+ "data-note-show-path": e.id,
405
410
  className: "ml-auto rounded px-1.5 py-px text-[10.5px] font-medium text-sky-700 transition-colors hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20",
406
411
  "data-tip": "Everything this event set off, step by step",
407
412
  children: "Show path"
408
413
  }
409
414
  ),
410
- t.source === "external" && t.replayable && t.provider && /* @__PURE__ */ e(
415
+ e.source === "external" && e.replayable && e.provider && /* @__PURE__ */ t(
411
416
  "button",
412
417
  {
413
418
  type: "button",
414
419
  onClick: () => D ? y.mutate() : c(!0),
415
420
  onBlur: () => c(!1),
416
421
  disabled: y.isPending,
417
- "data-note-replay": t.id,
422
+ "data-note-replay": e.id,
418
423
  className: `rounded px-1.5 py-px text-[10.5px] font-medium transition-colors ${D ? "bg-sky-600 text-white" : "text-sky-700 hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20"}`,
419
424
  "data-tip": "Re-apply this event from its stored payload",
420
425
  children: y.isPending ? "Replaying…" : D ? "Replay this event?" : "Replay"
421
426
  }
422
427
  )
423
428
  ] }),
424
- /* @__PURE__ */ e("p", { className: "mt-1 whitespace-pre-wrap break-words text-[13px] leading-snug text-slate-600 dark:text-slate-300", children: /* @__PURE__ */ e(se, { text: t.text }) }),
425
- t.comment_id && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
426
- (t.reactions ?? []).map((o) => /* @__PURE__ */ s(
429
+ /* @__PURE__ */ t("p", { className: "mt-1 whitespace-pre-wrap break-words text-[13px] leading-snug text-slate-600 dark:text-slate-300", children: /* @__PURE__ */ t(re, { text: e.text }) }),
430
+ e.comment_id && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
431
+ (e.reactions ?? []).map((o) => /* @__PURE__ */ s(
427
432
  "button",
428
433
  {
429
434
  type: "button",
@@ -431,23 +436,23 @@ function mt({
431
436
  className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${o.mine ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-slate-50 text-slate-600 hover:border-slate-300 dark:border-border dark:bg-muted dark:text-slate-300"}`,
432
437
  children: [
433
438
  o.emoji,
434
- /* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] font-semibold", children: o.count })
439
+ /* @__PURE__ */ t("span", { className: "tabular-nums text-[10px] font-semibold", children: o.count })
435
440
  ]
436
441
  },
437
442
  o.emoji
438
443
  )),
439
444
  /* @__PURE__ */ s("span", { className: "relative", children: [
440
- /* @__PURE__ */ e(
445
+ /* @__PURE__ */ t(
441
446
  "button",
442
447
  {
443
448
  type: "button",
444
449
  onClick: () => S((o) => !o),
445
450
  className: "rounded p-0.5 text-slate-300 transition-colors hover:bg-slate-100 hover:text-slate-500 dark:hover:bg-muted",
446
451
  "aria-label": "Add reaction",
447
- children: /* @__PURE__ */ e(Ne, { className: "h-3.5 w-3.5" })
452
+ children: /* @__PURE__ */ t(we, { className: "h-3.5 w-3.5" })
448
453
  }
449
454
  ),
450
- v && /* @__PURE__ */ e("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: we.map((o) => /* @__PURE__ */ e(
455
+ v && /* @__PURE__ */ t("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: _e.map((o) => /* @__PURE__ */ t(
451
456
  "button",
452
457
  {
453
458
  type: "button",
@@ -460,30 +465,30 @@ function mt({
460
465
  ] })
461
466
  ] })
462
467
  ] }),
463
- C && t.provider && /* @__PURE__ */ e(
464
- nt,
468
+ C && e.provider && /* @__PURE__ */ t(
469
+ st,
465
470
  {
466
471
  target: b ? {
467
- source: t.provider,
468
- id: t.id.replace(/^external:/, ""),
469
- record: { collection: i, item: d }
472
+ source: e.provider,
473
+ id: e.id.replace(/^external:/, ""),
474
+ record: { collection: l, item: d }
470
475
  } : null,
471
- event: { label: t.label },
476
+ event: { label: e.label },
472
477
  onClose: () => m(!1)
473
478
  }
474
479
  )
475
480
  ] });
476
481
  }
477
- function It({
478
- collection: t,
479
- item: i,
482
+ function jt({
483
+ collection: e,
484
+ item: l,
480
485
  title: d,
481
486
  defaultExpanded: u,
482
487
  queuedComments: b,
483
488
  onQueueComment: m,
484
489
  onUnsentDraft: C
485
490
  }) {
486
- const g = oe(), { userId: k } = je(), v = ke(), S = Ze(), [q, D] = He(u, !1), [c, y] = _(""), T = Y(C);
491
+ const g = se(), { userId: k } = Le(), v = Ne(), S = et(), [q, D] = Je(u, !1), [c, y] = _(""), T = Y(C);
487
492
  T.current = C, Z(() => {
488
493
  var r;
489
494
  (r = T.current) == null || r.call(T, c);
@@ -502,7 +507,7 @@ function It({
502
507
  N(!1);
503
508
  }
504
509
  }
505
- }, o = ze(t, i, "note"), h = Ue(t, i, "note"), E = Y(0);
510
+ }, o = We(e, l, "note"), h = Ge(e, l, "note"), E = Y(0);
506
511
  Z(() => {
507
512
  if (!c.trim()) {
508
513
  E.current && h("stop"), E.current = 0;
@@ -511,63 +516,63 @@ function It({
511
516
  const r = Date.now();
512
517
  r - E.current < 2500 || (E.current = r, h("start"));
513
518
  }, [c, h]), Z(() => () => h("stop"), [h]);
514
- const [W, A] = _(null), [F, Q] = _(null), [a, l] = _(""), p = !i || i === "new", f = ["comments", t, String(i)], { data: w, isLoading: O, isError: L } = z({
519
+ const [W, A] = _(null), [F, Q] = _(null), [a, i] = _(""), p = !l || l === "new", f = ["comments", e, String(l)], { data: w, isLoading: O, isError: L } = z({
515
520
  queryKey: f,
516
- queryFn: () => g.request(U("/comments", { collection: t, item: i })).then((r) => r.data),
521
+ queryFn: () => g.request(U("/comments", { collection: e, item: l })).then((r) => r.data),
517
522
  enabled: !p
518
- }), de = X(() => (w ?? []).filter((r) => !r.deleted), [w]), { data: _e } = z({
519
- queryKey: ["comments-related", t, String(i)],
520
- queryFn: () => g.request(U("/comments/related", { collection: t, item: i })).then((r) => r.data ?? []).catch(() => []),
523
+ }), ie = X(() => (w ?? []).filter((r) => !r.deleted), [w]), { data: Se } = z({
524
+ queryKey: ["comments-related", e, String(l)],
525
+ queryFn: () => g.request(U("/comments/related", { collection: e, item: l })).then((r) => r.data ?? []).catch(() => []),
521
526
  enabled: !p,
522
527
  staleTime: 3e4
523
- }), ce = _e ?? [], R = X(() => {
524
- const r = de.map((x) => ({ kind: "comment", at: x.created_at, comment: x })), n = ce.map((x) => ({ kind: "related", at: x.created_at, note: x }));
528
+ }), de = Se ?? [], R = X(() => {
529
+ const r = ie.map((x) => ({ kind: "comment", at: x.created_at, comment: x })), n = de.map((x) => ({ kind: "related", at: x.created_at, note: x }));
525
530
  return [...r, ...n].sort((x, K) => new Date(K.at).getTime() - new Date(x.at).getTime());
526
- }, [de, ce]), [G, Ce] = _(() => /* @__PURE__ */ new Set()), [H, Se] = _(""), me = X(() => {
531
+ }, [ie, de]), [G, $e] = _(() => /* @__PURE__ */ new Set()), [H, Ee] = _(""), ce = X(() => {
527
532
  const r = { people: 0, system: 0, integration: 0 };
528
- for (const n of R) r[ve(n)]++;
533
+ for (const n of R) r[ke(n)]++;
529
534
  return r;
530
- }, [R]), ue = p ? (b ?? []).length : me.people, ee = X(() => {
535
+ }, [R]), me = p ? (b ?? []).length : ce.people, ee = X(() => {
531
536
  const r = H.trim().toLowerCase();
532
- return R.filter((n) => G.has(ve(n)) ? !1 : r ? (n.kind === "comment" ? `${n.comment.text} ${ne(n.comment.user)}` : `${n.note.text} ${n.note.user_name ?? ""} ${n.note.label} ${n.note.context ?? ""} ${n.note.provider ?? ""}`).toLowerCase().includes(r) : !0);
533
- }, [R, G, H]), $e = (r) => Ce((n) => {
537
+ return R.filter((n) => G.has(ke(n)) ? !1 : r ? (n.kind === "comment" ? `${n.comment.text} ${Ce(n.comment.user)}` : `${n.note.text} ${n.note.user_name ?? ""} ${n.note.label} ${n.note.context ?? ""} ${n.note.provider ?? ""}`).toLowerCase().includes(r) : !0);
538
+ }, [R, G, H]), qe = (r) => $e((n) => {
534
539
  const x = new Set(n);
535
540
  return x.has(r) ? x.delete(r) : x.add(r), x;
536
- }), Ee = G.size > 0 || H.trim() !== "", te = j({
537
- mutationFn: (r) => g.request(B("/comments", { collection: t, item: i, text: r })),
541
+ }), De = G.size > 0 || H.trim() !== "", te = j({
542
+ mutationFn: (r) => g.request(B("/comments", { collection: e, item: l, text: r })),
538
543
  onSuccess: () => {
539
544
  v.invalidateQueries({ queryKey: f }), y("");
540
545
  },
541
546
  onError: () => I.error("Failed to post comment")
542
- }), pe = j({
543
- mutationFn: ({ id: r, text: n }) => g.request(Ke(`/comments/${r}`, { text: n })),
547
+ }), ue = j({
548
+ mutationFn: ({ id: r, text: n }) => g.request(Qe(`/comments/${r}`, { text: n })),
544
549
  onSuccess: () => {
545
- v.invalidateQueries({ queryKey: f }), A(null), l("");
550
+ v.invalidateQueries({ queryKey: f }), A(null), i("");
546
551
  },
547
552
  onError: () => I.error("Failed to update comment")
548
553
  }), ae = j({
549
- mutationFn: (r) => g.request(Be(`/comments/${r}`)),
554
+ mutationFn: (r) => g.request(ze(`/comments/${r}`)),
550
555
  onSuccess: () => v.invalidateQueries({ queryKey: f }),
551
556
  onError: () => I.error("Failed to delete comment")
552
- }), xe = j({
557
+ }), pe = j({
553
558
  mutationFn: ({ id: r, emoji: n }) => g.request(B(`/comments/${r}/reactions`, { emoji: n })),
554
559
  onSuccess: () => v.invalidateQueries({ queryKey: f }),
555
560
  onError: () => I.error("Failed to react")
556
- }), [he, be] = _(null), qe = j({
561
+ }), [xe, he] = _(null), Te = j({
557
562
  mutationFn: (r) => g.request(
558
563
  B("/tasks", {
559
- collection: t,
560
- item: i,
564
+ collection: e,
565
+ item: l,
561
566
  title: r.text.replace(/<[^>]*>/g, "").replace(/@\[([^\]]+)\]/g, "@$1").slice(0, 200),
562
567
  assignee: k
563
568
  })
564
569
  ),
565
570
  onSuccess: () => {
566
- Ge(v, t, i), I.success("Task created from comment — assigned to you");
571
+ Xe(v, e, l), I.success("Task created from comment — assigned to you");
567
572
  },
568
573
  onError: () => I.error("Could not create a task")
569
574
  });
570
- function fe(r) {
575
+ function be(r) {
571
576
  r.preventDefault(), c.trim() && (p && m ? (m(c.trim()), y("")) : te.mutate(c.trim()));
572
577
  }
573
578
  return (
@@ -589,41 +594,41 @@ function It({
589
594
  className: "flex w-full flex-col px-5 py-3.5 text-left transition-colors hover:bg-slate-50/50 dark:hover:bg-white/[0.02]",
590
595
  children: [
591
596
  /* @__PURE__ */ s("span", { className: "flex w-full items-center gap-2.5", children: [
592
- /* @__PURE__ */ e(De, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
593
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800 dark:text-slate-200", children: d || "Comments" }),
594
- ue > 0 && /* @__PURE__ */ e(
597
+ /* @__PURE__ */ t(Pe, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
598
+ /* @__PURE__ */ t("span", { className: "text-[13px] font-medium text-slate-800 dark:text-slate-200", children: d || "Comments" }),
599
+ me > 0 && /* @__PURE__ */ t(
595
600
  "span",
596
601
  {
597
602
  className: "rounded-full bg-slate-100 px-1.5 py-px text-[10.5px] font-semibold tabular-nums text-slate-500 dark:bg-muted dark:text-slate-400",
598
603
  "data-notes-badge": !0,
599
- children: ue
604
+ children: me
600
605
  }
601
606
  ),
602
- /* @__PURE__ */ e(
603
- Te,
607
+ /* @__PURE__ */ t(
608
+ Fe,
604
609
  {
605
610
  className: `ml-auto h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150${q ? " rotate-180" : ""}`
606
611
  }
607
612
  )
608
613
  ] }),
609
614
  !q && !p && R.length > 0 && (() => {
610
- const r = R[0], n = r.kind === "comment" ? ne(r.comment.user) : r.note.user_name ?? "System", x = dt(r);
615
+ const r = R[0], n = r.kind === "comment" ? ye(r.comment) : r.note.user_name ?? "System", x = mt(r);
611
616
  return x ? /* @__PURE__ */ s("span", { className: "mt-1 w-full truncate pl-6 text-[11.5px] text-slate-400", children: [
612
617
  /* @__PURE__ */ s("span", { className: "font-medium text-slate-500 dark:text-slate-400", children: [
613
618
  n,
614
619
  ":"
615
620
  ] }),
616
621
  " ",
617
- /* @__PURE__ */ e(se, { text: x, plain: !0 })
622
+ /* @__PURE__ */ t(re, { text: x, plain: !0 })
618
623
  ] }) : null;
619
624
  })()
620
625
  ]
621
626
  }
622
627
  ),
623
- q && /* @__PURE__ */ e("div", { className: "border-t border-slate-100 px-5 py-4 dark:border-border/60", children: p ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
624
- /* @__PURE__ */ s("form", { onSubmit: fe, className: "space-y-2", children: [
625
- /* @__PURE__ */ e(
626
- re,
628
+ q && /* @__PURE__ */ t("div", { className: "border-t border-slate-100 px-5 py-4 dark:border-border/60", children: p ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
629
+ /* @__PURE__ */ s("form", { onSubmit: be, className: "space-y-2", children: [
630
+ /* @__PURE__ */ t(
631
+ ne,
627
632
  {
628
633
  value: c,
629
634
  onChange: y,
@@ -633,28 +638,28 @@ function It({
633
638
  }
634
639
  ),
635
640
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
636
- /* @__PURE__ */ e("p", { className: "text-[11px] text-slate-400", children: "Comment will be posted after the record is saved." }),
637
- /* @__PURE__ */ e(J, { type: "submit", size: "sm", disabled: !c.trim(), children: "Queue" })
641
+ /* @__PURE__ */ t("p", { className: "text-[11px] text-slate-400", children: "Comment will be posted after the record is saved." }),
642
+ /* @__PURE__ */ t(J, { type: "submit", size: "sm", disabled: !c.trim(), children: "Queue" })
638
643
  ] })
639
644
  ] }),
640
645
  (b ?? []).length > 0 && /* @__PURE__ */ s("div", { className: "space-y-2", children: [
641
- /* @__PURE__ */ e(ge, {}),
646
+ /* @__PURE__ */ t(ge, {}),
642
647
  (b ?? []).map((r, n) => /* @__PURE__ */ s(
643
648
  "div",
644
649
  {
645
650
  className: "flex items-start gap-2.5 rounded-lg border border-dashed border-amber-200/70 bg-amber-50/40 px-3 py-2 dark:border-amber-500/20 dark:bg-amber-500/5",
646
651
  children: [
647
- /* @__PURE__ */ e("span", { className: "mt-0.5 inline-flex shrink-0 items-center rounded-full bg-amber-100 px-1.5 py-0.5 text-[10px] font-medium text-amber-600 dark:bg-amber-500/15 dark:text-amber-400", children: "Pending" }),
648
- /* @__PURE__ */ e("p", { className: "text-[13px] leading-relaxed text-slate-600 dark:text-slate-300", children: r })
652
+ /* @__PURE__ */ t("span", { className: "mt-0.5 inline-flex shrink-0 items-center rounded-full bg-amber-100 px-1.5 py-0.5 text-[10px] font-medium text-amber-600 dark:bg-amber-500/15 dark:text-amber-400", children: "Pending" }),
653
+ /* @__PURE__ */ t("p", { className: "text-[13px] leading-relaxed text-slate-600 dark:text-slate-300", children: r })
649
654
  ]
650
655
  },
651
656
  n
652
657
  ))
653
658
  ] })
654
659
  ] }) : /* @__PURE__ */ s(V, { children: [
655
- /* @__PURE__ */ s("form", { onSubmit: fe, className: "space-y-2", children: [
656
- /* @__PURE__ */ e(
657
- re,
660
+ /* @__PURE__ */ s("form", { onSubmit: be, className: "space-y-2", children: [
661
+ /* @__PURE__ */ t(
662
+ ne,
658
663
  {
659
664
  value: c,
660
665
  onChange: y,
@@ -664,9 +669,9 @@ function It({
664
669
  }
665
670
  ),
666
671
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
667
- /* @__PURE__ */ e("p", { className: "text-[11px] text-slate-400", children: "Type @ plus two letters to mention a teammate, or @owners to notify everyone currently assigned." }),
672
+ /* @__PURE__ */ t("p", { className: "text-[11px] text-slate-400", children: "Type @ plus two letters to mention a teammate, or @owners to notify everyone currently assigned." }),
668
673
  /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
669
- /* @__PURE__ */ e(
674
+ /* @__PURE__ */ t(
670
675
  "button",
671
676
  {
672
677
  type: "button",
@@ -677,7 +682,7 @@ function It({
677
682
  children: $ ? "…" : "✨ Polish"
678
683
  }
679
684
  ),
680
- /* @__PURE__ */ e(J, { type: "submit", size: "sm", disabled: !c.trim() || te.isPending, children: te.isPending ? "Posting…" : "Comment" })
685
+ /* @__PURE__ */ t(J, { type: "submit", size: "sm", disabled: !c.trim() || te.isPending, children: te.isPending ? "Posting…" : "Comment" })
681
686
  ] })
682
687
  ] })
683
688
  ] }),
@@ -687,95 +692,103 @@ function It({
687
692
  className: "flex items-center gap-1.5 text-[11.5px] italic text-slate-400",
688
693
  "data-note-typing": !0,
689
694
  children: [
690
- /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
691
- We(o, "writing a note"),
695
+ /* @__PURE__ */ t("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
696
+ He(o, "writing a note"),
692
697
  "…"
693
698
  ]
694
699
  }
695
700
  ),
696
- /* @__PURE__ */ e(ge, { className: "my-4" }),
701
+ /* @__PURE__ */ t(ge, { className: "my-4" }),
697
702
  R.length > 0 && /* @__PURE__ */ s("div", { className: "mb-3 flex flex-wrap items-center gap-1.5", "data-notes-filters": !0, children: [
698
703
  ["people", "system", "integration"].map((r) => {
699
- const n = !G.has(r), x = me[r];
704
+ const n = !G.has(r), x = ce[r];
700
705
  return /* @__PURE__ */ s(
701
706
  "button",
702
707
  {
703
708
  type: "button",
704
- onClick: () => $e(r),
709
+ onClick: () => qe(r),
705
710
  "aria-pressed": n,
706
711
  "data-notes-filter": r,
707
712
  disabled: x === 0 && n,
708
713
  className: `inline-flex items-center gap-1 rounded-full border px-2 py-px text-[11px] font-medium transition-colors ${n ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 text-slate-400 line-through decoration-slate-300 dark:border-border"} disabled:opacity-50`,
709
714
  title: r === "people" ? "Comments and notes people wrote" : r === "system" ? "State changes, change reasons, addendums and imports" : "Events an integration recorded",
710
715
  children: [
711
- it[r],
712
- /* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] opacity-70", children: x })
716
+ ct[r],
717
+ /* @__PURE__ */ t("span", { className: "tabular-nums text-[10px] opacity-70", children: x })
713
718
  ]
714
719
  },
715
720
  r
716
721
  );
717
722
  }),
718
- /* @__PURE__ */ e(
723
+ /* @__PURE__ */ t(
719
724
  "input",
720
725
  {
721
726
  value: H,
722
- onChange: (r) => Se(r.target.value),
727
+ onChange: (r) => Ee(r.target.value),
723
728
  placeholder: "Search notes…",
724
729
  "aria-label": "Search notes",
725
730
  "data-notes-search": !0,
726
731
  className: "ml-auto h-6 w-[150px] rounded-md border border-slate-200 bg-background px-2 text-[11.5px] dark:border-border"
727
732
  }
728
733
  ),
729
- Ee && /* @__PURE__ */ s("span", { className: "text-[10.5px] tabular-nums text-slate-400", "data-notes-shown": !0, children: [
734
+ De && /* @__PURE__ */ s("span", { className: "text-[10.5px] tabular-nums text-slate-400", "data-notes-shown": !0, children: [
730
735
  ee.length,
731
736
  " of ",
732
737
  R.length
733
738
  ] })
734
739
  ] }),
735
- O ? /* @__PURE__ */ e("div", { className: "space-y-4", children: ["a", "b"].map((r) => /* @__PURE__ */ s("div", { className: "flex gap-3", children: [
736
- /* @__PURE__ */ e("div", { className: "h-8 w-8 shrink-0 animate-pulse rounded-full bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
740
+ O ? /* @__PURE__ */ t("div", { className: "space-y-4", children: ["a", "b"].map((r) => /* @__PURE__ */ s("div", { className: "flex gap-3", children: [
741
+ /* @__PURE__ */ t("div", { className: "h-8 w-8 shrink-0 animate-pulse rounded-full bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
737
742
  /* @__PURE__ */ s("div", { className: "flex-1 space-y-1.5", children: [
738
- /* @__PURE__ */ e("div", { className: "h-3 w-32 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
739
- /* @__PURE__ */ e("div", { className: "h-3 w-full animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
743
+ /* @__PURE__ */ t("div", { className: "h-3 w-32 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
744
+ /* @__PURE__ */ t("div", { className: "h-3 w-full animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
740
745
  ] })
741
- ] }, r)) }) : L ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-red-500", children: "Failed to load comments." }) : R.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes yet." }) : ee.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes match — clear the search or turn a filter back on." }) : /* @__PURE__ */ e("div", { className: "nvr-stagger-direct space-y-4", children: ee.map((r) => {
746
+ ] }, r)) }) : L ? /* @__PURE__ */ t("p", { className: "py-6 text-center text-[12px] text-red-500", children: "Failed to load comments." }) : R.length === 0 ? /* @__PURE__ */ t("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes yet." }) : ee.length === 0 ? /* @__PURE__ */ t("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes match — clear the search or turn a filter back on." }) : /* @__PURE__ */ t("div", { className: "nvr-stagger-direct space-y-4", children: ee.map((r) => {
747
+ var fe;
742
748
  if (r.kind === "related")
743
- return /* @__PURE__ */ e("div", { className: "nvr-section-enter", children: /* @__PURE__ */ e(
744
- mt,
749
+ return /* @__PURE__ */ t("div", { className: "nvr-section-enter", children: /* @__PURE__ */ t(
750
+ pt,
745
751
  {
746
752
  note: r.note,
747
- collection: t,
748
- item: String(i)
753
+ collection: e,
754
+ item: String(l)
749
755
  }
750
756
  ) }, r.note.id);
751
757
  const n = r.comment, x = k === n.user.id, K = W === n.id;
752
758
  return /* @__PURE__ */ s("div", { className: "nvr-section-enter group flex gap-3", children: [
753
- /* @__PURE__ */ e(
754
- Ye,
759
+ /* @__PURE__ */ t(
760
+ tt,
755
761
  {
756
762
  userId: n.user.id,
757
763
  className: "h-8 w-8",
758
- fallback: /* @__PURE__ */ e(et, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ e(tt, { className: "bg-nvr-cyan/15 text-[11px] font-bold text-nvr-navy", children: rt(n.user) }) })
764
+ fallback: /* @__PURE__ */ t(at, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ t(nt, { className: "bg-nvr-cyan/15 text-[11px] font-bold text-nvr-navy", children: ot(n.user) }) })
759
765
  }
760
766
  ),
761
767
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
762
768
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
763
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800", children: ne(n.user) }),
764
- /* @__PURE__ */ e(Je, { label: n.via_agent }),
765
- /* @__PURE__ */ e(
769
+ /* @__PURE__ */ t(
770
+ "span",
771
+ {
772
+ className: "text-[13px] font-medium text-slate-800",
773
+ "data-comment-acting-admin": ((fe = n.acting_admin) == null ? void 0 : fe.id) || void 0,
774
+ children: ye(n)
775
+ }
776
+ ),
777
+ /* @__PURE__ */ t(Ze, { label: n.via_agent }),
778
+ /* @__PURE__ */ t(
766
779
  "span",
767
780
  {
768
781
  className: "text-[11px] text-slate-400",
769
- "data-tip": ie(n.created_at),
770
- children: le(n.created_at)
782
+ "data-tip": le(n.created_at),
783
+ children: oe(n.created_at)
771
784
  }
772
785
  ),
773
- n.updated_at && n.updated_at !== n.created_at && /* @__PURE__ */ e("span", { className: "text-[10px] text-slate-300", children: "(edited)" }),
774
- n.field && /* @__PURE__ */ e(
775
- ot,
786
+ n.updated_at && n.updated_at !== n.created_at && /* @__PURE__ */ t("span", { className: "text-[10px] text-slate-300", children: "(edited)" }),
787
+ n.field && /* @__PURE__ */ t(
788
+ it,
776
789
  {
777
790
  field: n.field,
778
- label: (S == null ? void 0 : S.labelOf(n.field)) ?? Xe(n.field),
791
+ label: (S == null ? void 0 : S.labelOf(n.field)) ?? Ve(n.field),
779
792
  resolved: !!n.resolved_at,
780
793
  onJump: S ? () => S.jump(n.field) : void 0
781
794
  }
@@ -785,19 +798,19 @@ function It({
785
798
  {
786
799
  className: `ml-auto flex items-center gap-1 transition-opacity group-hover:opacity-100 focus-within:opacity-100 ${F === n.id ? "opacity-100" : "opacity-0"}`,
787
800
  children: [
788
- /* @__PURE__ */ e(
801
+ /* @__PURE__ */ t(
789
802
  "button",
790
803
  {
791
804
  type: "button",
792
805
  title: "Make a task from this comment",
793
806
  "aria-label": "Make a task from this comment",
794
807
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
795
- onClick: () => qe.mutate(n),
796
- children: /* @__PURE__ */ e(Pe, { className: "h-3 w-3" })
808
+ onClick: () => Te.mutate(n),
809
+ children: /* @__PURE__ */ t(Re, { className: "h-3 w-3" })
797
810
  }
798
811
  ),
799
812
  x && (F === n.id ? /* @__PURE__ */ s(V, { children: [
800
- /* @__PURE__ */ e(
813
+ /* @__PURE__ */ t(
801
814
  "button",
802
815
  {
803
816
  type: "button",
@@ -811,7 +824,7 @@ function It({
811
824
  children: ae.isPending ? "Deleting…" : "Delete comment?"
812
825
  }
813
826
  ),
814
- /* @__PURE__ */ e(
827
+ /* @__PURE__ */ t(
815
828
  "button",
816
829
  {
817
830
  type: "button",
@@ -821,7 +834,7 @@ function It({
821
834
  }
822
835
  )
823
836
  ] }) : /* @__PURE__ */ s(V, { children: [
824
- /* @__PURE__ */ e(
837
+ /* @__PURE__ */ t(
825
838
  "button",
826
839
  {
827
840
  type: "button",
@@ -829,12 +842,12 @@ function It({
829
842
  "aria-label": "Edit comment",
830
843
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700",
831
844
  onClick: () => {
832
- A(n.id), l(n.text);
845
+ A(n.id), i(n.text);
833
846
  },
834
- children: /* @__PURE__ */ e(Fe, { className: "h-3 w-3" })
847
+ children: /* @__PURE__ */ t(Me, { className: "h-3 w-3" })
835
848
  }
836
849
  ),
837
- /* @__PURE__ */ e(
850
+ /* @__PURE__ */ t(
838
851
  "button",
839
852
  {
840
853
  type: "button",
@@ -842,7 +855,7 @@ function It({
842
855
  "aria-label": "Delete comment",
843
856
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-red-50 hover:text-red-500",
844
857
  onClick: () => Q(n.id),
845
- children: /* @__PURE__ */ e(Re, { className: "h-3 w-3" })
858
+ children: /* @__PURE__ */ t(Ie, { className: "h-3 w-3" })
846
859
  }
847
860
  )
848
861
  ] }))
@@ -851,11 +864,11 @@ function It({
851
864
  )
852
865
  ] }),
853
866
  K ? /* @__PURE__ */ s("div", { className: "mt-1.5 space-y-2", children: [
854
- /* @__PURE__ */ e(
855
- re,
867
+ /* @__PURE__ */ t(
868
+ ne,
856
869
  {
857
870
  value: a,
858
- onChange: l,
871
+ onChange: i,
859
872
  rows: 3,
860
873
  className: "text-[13px]"
861
874
  }
@@ -866,10 +879,10 @@ function It({
866
879
  {
867
880
  size: "sm",
868
881
  className: "h-7 gap-1.5",
869
- disabled: !a.trim() || pe.isPending,
870
- onClick: () => pe.mutate({ id: n.id, text: a.trim() }),
882
+ disabled: !a.trim() || ue.isPending,
883
+ onClick: () => ue.mutate({ id: n.id, text: a.trim() }),
871
884
  children: [
872
- /* @__PURE__ */ e(Me, { className: "h-3 w-3" }),
885
+ /* @__PURE__ */ t(Oe, { className: "h-3 w-3" }),
873
886
  " Save"
874
887
  ]
875
888
  }
@@ -881,48 +894,48 @@ function It({
881
894
  variant: "outline",
882
895
  className: "h-7 gap-1.5",
883
896
  onClick: () => {
884
- A(null), l("");
897
+ A(null), i("");
885
898
  },
886
899
  children: [
887
- /* @__PURE__ */ e(Ie, { className: "h-3 w-3" }),
900
+ /* @__PURE__ */ t(je, { className: "h-3 w-3" }),
888
901
  " Cancel"
889
902
  ]
890
903
  }
891
904
  )
892
905
  ] })
893
- ] }) : /* @__PURE__ */ e("p", { className: "mt-0.5 whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600", children: /* @__PURE__ */ e(se, { text: n.text }) }),
894
- !K && /* @__PURE__ */ e(st, { comment: n }),
906
+ ] }) : /* @__PURE__ */ t("p", { className: "mt-0.5 whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600", children: /* @__PURE__ */ t(re, { text: n.text }) }),
907
+ !K && /* @__PURE__ */ t(lt, { comment: n }),
895
908
  !K && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
896
909
  (n.reactions ?? []).map((M) => /* @__PURE__ */ s(
897
910
  "button",
898
911
  {
899
912
  type: "button",
900
- onClick: () => xe.mutate({ id: n.id, emoji: M.emoji }),
913
+ onClick: () => pe.mutate({ id: n.id, emoji: M.emoji }),
901
914
  className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${M.mine ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-slate-50 text-slate-600 hover:border-slate-300 dark:border-border dark:bg-muted dark:text-slate-300"}`,
902
915
  children: [
903
916
  M.emoji,
904
- /* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] font-semibold", children: M.count })
917
+ /* @__PURE__ */ t("span", { className: "tabular-nums text-[10px] font-semibold", children: M.count })
905
918
  ]
906
919
  },
907
920
  M.emoji
908
921
  )),
909
922
  /* @__PURE__ */ s("span", { className: "relative", children: [
910
- /* @__PURE__ */ e(
923
+ /* @__PURE__ */ t(
911
924
  "button",
912
925
  {
913
926
  type: "button",
914
- onClick: () => be(he === n.id ? null : n.id),
927
+ onClick: () => he(xe === n.id ? null : n.id),
915
928
  className: "rounded p-0.5 text-slate-300 transition-colors hover:bg-slate-100 hover:text-slate-500 dark:hover:bg-muted",
916
929
  "aria-label": "Add reaction",
917
- children: /* @__PURE__ */ e(Ne, { className: "h-3.5 w-3.5" })
930
+ children: /* @__PURE__ */ t(we, { className: "h-3.5 w-3.5" })
918
931
  }
919
932
  ),
920
- he === n.id && /* @__PURE__ */ e("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: we.map((M) => /* @__PURE__ */ e(
933
+ xe === n.id && /* @__PURE__ */ t("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: _e.map((M) => /* @__PURE__ */ t(
921
934
  "button",
922
935
  {
923
936
  type: "button",
924
937
  onClick: () => {
925
- xe.mutate({ id: n.id, emoji: M }), be(null);
938
+ pe.mutate({ id: n.id, emoji: M }), he(null);
926
939
  },
927
940
  className: "rounded-full px-1 text-[14px] hover:bg-muted",
928
941
  children: M
@@ -941,7 +954,7 @@ function It({
941
954
  );
942
955
  }
943
956
  export {
944
- It as CommentPanel,
945
- re as MentionTextarea,
946
- dt as notePreviewText
957
+ jt as CommentPanel,
958
+ ne as MentionTextarea,
959
+ mt as notePreviewText
947
960
  };