@nivaro/react 0.3.139 → 0.3.141

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 (100) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +39 -2
  5. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  6. package/dist/shared/components/BroadcastView.js +213 -211
  7. package/dist/shared/components/CollectionBrowserView.js +2702 -2671
  8. package/dist/shared/components/ConfigHistory.js +45 -45
  9. package/dist/shared/components/ConformanceView.js +110 -110
  10. package/dist/shared/components/DataTable.js +51 -51
  11. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  12. package/dist/shared/components/ItemEditForm.js +3475 -3458
  13. package/dist/shared/components/LiveCount.js +27 -23
  14. package/dist/shared/components/LiveTraceView.js +62 -61
  15. package/dist/shared/components/PageRenderer.js +422 -410
  16. package/dist/shared/components/ProfileView.js +199 -199
  17. package/dist/shared/components/QualityRulesView.js +70 -70
  18. package/dist/shared/components/QueryTable.js +131 -130
  19. package/dist/shared/components/RecordGraph.js +98 -98
  20. package/dist/shared/components/RecordReadView.js +287 -288
  21. package/dist/shared/components/ReportView.js +1279 -1259
  22. package/dist/shared/components/RowPresence.js +83 -76
  23. package/dist/shared/components/SlaRulesView.js +73 -74
  24. package/dist/shared/components/UnseenDot.js +183 -22
  25. package/dist/shared/components/WidgetSlot.js +73 -73
  26. package/dist/shared/components/ai/AiChart.js +36 -32
  27. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  28. package/dist/shared/components/ai/TaskDo.js +87 -87
  29. package/dist/shared/components/ai/answer-formats.js +37 -30
  30. package/dist/shared/components/ai/call-log/format.js +17 -16
  31. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  32. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  33. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  34. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  35. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  36. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  37. package/dist/shared/components/cbv/column-totals.js +53 -51
  38. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  39. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  40. package/dist/shared/components/command-center/announce.js +7 -6
  41. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  42. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  43. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  44. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  45. package/dist/shared/components/delivery-analytics/drill.js +32 -32
  46. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  47. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  48. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  49. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  50. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  51. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  52. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  53. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  54. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  55. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  56. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  57. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  58. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  59. package/dist/shared/components/item-edit/InlineTableField.js +1390 -1376
  60. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  61. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  62. package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
  63. package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
  64. package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
  65. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  66. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  67. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
  68. package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
  69. package/dist/shared/components/layout-editor/settings/controls.js +98 -90
  70. package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
  71. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  72. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  73. package/dist/shared/components/ops-report/format.js +37 -36
  74. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  75. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  76. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  77. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  78. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  79. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  80. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  81. package/dist/shared/components/profile/DelegationCard.js +13 -12
  82. package/dist/shared/components/profile/PersonActivity.js +48 -48
  83. package/dist/shared/components/profile/PersonExtras.js +107 -107
  84. package/dist/shared/components/profile/PersonWeek.js +9 -9
  85. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  86. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  87. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  88. package/dist/shared/components/queue/QueueWorklist.js +884 -872
  89. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  90. package/dist/shared/components/support/RequestList.js +123 -123
  91. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  92. package/dist/shared/lib/activity-sentence.js +251 -229
  93. package/dist/shared/lib/format-value.js +5 -4
  94. package/dist/shared/lib/layout-resolve.js +64 -48
  95. package/dist/shared/lib/number-format.js +87 -0
  96. package/dist/shared/lib/number-kind.js +133 -0
  97. package/dist/shared/lib/utils.js +24 -20
  98. package/dist/shared/lib/watch-list.js +1 -1
  99. package/dist/shared/lib/widget-value-format.js +26 -12
  100. package/package.json +1 -1
@@ -1,37 +1,37 @@
1
- import { jsxs as a, jsx as t, Fragment as ue } from "react/jsx-runtime";
2
- import { useQueryClient as Ct, useQuery as G, keepPreviousData as St, useMutation as D } from "@tanstack/react-query";
3
- import { ChevronUp as _t, Archive as Te, CheckCheck as At, Search as Dt, Check as me, AlarmClock as pe, ExternalLink as Le, Bell as Re, ShieldCheck as he, ChevronLeft as $t, ChevronRight as zt, History as Ft, Trash2 as qt, ChevronDown as Mt } from "lucide-react";
4
- import { useState as u, useEffect as be, useRef as Tt, useCallback as Lt, Fragment as xe } from "react";
5
- import { useNivaroClient as Rt } from "../../context.js";
6
- import { get as H, post as S, patch as Pt, del as Ot } from "../../lib/commands.js";
7
- import { useTopInserts as Pe, slideIn as It } from "../../lib/live-screen.js";
8
- import { resolveNotificationTargetFor as V, runNotificationTarget as fe } from "../../lib/notification-target.js";
9
- import { openInTabsMessage as Bt, openInTabs as Kt } from "../../lib/open-in-tabs.js";
10
- import { useRecordPeek as jt, isNewTabClick as Ut, notificationPeekTarget as Oe } from "../../lib/record-peek.js";
11
- import { cn as x, formatRelative as Ie } from "../../lib/utils.js";
12
- import { AgentBadge as Gt } from "../AgentBadge.js";
13
- import { bellGroupLabel as Ht, hasSnapshotView as Qt, offersChanges as Yt } from "../NotificationBell.js";
14
- import { RelativeTime as Be } from "../RelativeTime.js";
15
- import { SimpleSelect as ge } from "../ui/SimpleSelect.js";
16
- import { AsItWasSheet as Vt } from "./AsItWasSheet.js";
17
- import { bundleLocally as Wt, laneTone as Zt, bundleAsNotification as Jt, bundleHeadline as Ke, categoryChipLabel as Xt } from "./bundles.js";
18
- import { DeliveryChips as Et } from "./DeliveryChips.js";
19
- import { NotificationActions as ea } from "./NotificationActions.js";
20
- import { NotificationChangesList as ta, ResolvedLine as aa, NotificationDetailBits as na } from "./NotificationDetailBits.js";
21
- const ke = 25, la = [
1
+ import { jsxs as a, jsx as t, Fragment as me } from "react/jsx-runtime";
2
+ import { useQueryClient as St, useQuery as H, keepPreviousData as _t, useMutation as D } from "@tanstack/react-query";
3
+ import { ChevronUp as At, Archive as Le, CheckCheck as Dt, Search as $t, Check as pe, AlarmClock as he, ExternalLink as Re, Bell as Pe, ShieldCheck as be, ChevronLeft as zt, ChevronRight as Ft, History as qt, Trash2 as Mt, ChevronDown as Tt } from "lucide-react";
4
+ import { useState as u, useEffect as xe, useRef as Lt, useCallback as Rt, Fragment as fe } from "react";
5
+ import { useNivaroClient as Pt } from "../../context.js";
6
+ import { get as Q, post as S, patch as Ot, del as It } from "../../lib/commands.js";
7
+ import { useTopInserts as Oe, slideIn as Bt } from "../../lib/live-screen.js";
8
+ import { resolveNotificationTargetFor as W, runNotificationTarget as ge } from "../../lib/notification-target.js";
9
+ import { openInTabsMessage as Kt, openInTabs as jt } from "../../lib/open-in-tabs.js";
10
+ import { useRecordPeek as Ut, isNewTabClick as Gt, notificationPeekTarget as Ie } from "../../lib/record-peek.js";
11
+ import { formatNumber as $, cn as x, formatRelative as Be } from "../../lib/utils.js";
12
+ import { AgentBadge as Ht } from "../AgentBadge.js";
13
+ import { bellGroupLabel as Qt, hasSnapshotView as Yt, offersChanges as Vt } from "../NotificationBell.js";
14
+ import { RelativeTime as Ke } from "../RelativeTime.js";
15
+ import { SimpleSelect as ke } from "../ui/SimpleSelect.js";
16
+ import { AsItWasSheet as Wt } from "./AsItWasSheet.js";
17
+ import { bundleLocally as Zt, laneTone as Jt, bundleAsNotification as Xt, bundleHeadline as je, categoryChipLabel as Et } from "./bundles.js";
18
+ import { DeliveryChips as ea } from "./DeliveryChips.js";
19
+ import { NotificationActions as ta } from "./NotificationActions.js";
20
+ import { NotificationChangesList as aa, ResolvedLine as na, NotificationDetailBits as la } from "./NotificationDetailBits.js";
21
+ const ve = 25, ra = [
22
22
  { key: "all", label: "All" },
23
23
  { key: "inbox", label: "Unread" },
24
24
  { key: "read", label: "Read" },
25
25
  { key: "snoozed", label: "Snoozed" },
26
26
  { key: "archived", label: "Archived" },
27
27
  { key: "sent", label: "Sent" }
28
- ], ra = [
28
+ ], ia = [
29
29
  { key: "all", label: "Every lane" },
30
30
  { key: "critical", label: "Critical" },
31
31
  { key: "needs_you", label: "Needs you" },
32
32
  { key: "fyi", label: "FYI" }
33
33
  ];
34
- function je() {
34
+ function Ue() {
35
35
  const o = /* @__PURE__ */ new Date(), p = new Date(o.getTime() + 3600 * 1e3), f = new Date(o);
36
36
  f.setDate(f.getDate() + 1), f.setHours(8, 0, 0, 0);
37
37
  const g = new Date(o);
@@ -41,113 +41,113 @@ function je() {
41
41
  { label: "Until next week", until: g }
42
42
  ];
43
43
  }
44
- const Ue = (o) => `b:${o.collection}:${o.item}`, Ge = (o) => `n:${o.id}`;
45
- function Aa({
44
+ const Ge = (o) => `b:${o.collection}:${o.item}`, He = (o) => `n:${o.id}`;
45
+ function Da({
46
46
  routes: o,
47
47
  onNavigate: p,
48
48
  app: f,
49
49
  mailLogUrl: g,
50
- subscriptionsPath: W,
51
- rulesPath: Qe,
52
- changesId: ve,
50
+ subscriptionsPath: Z,
51
+ rulesPath: Ye,
52
+ changesId: ye,
53
53
  onNotice: r,
54
54
  onError: i,
55
- className: Ye
55
+ className: Ve
56
56
  }) {
57
- const h = Rt(), Z = jt(), J = Ct(), [X, Ve] = u(() => {
58
- if (ve !== void 0) return ve;
57
+ const h = Pt(), J = Ut(), X = St(), [E, We] = u(() => {
58
+ if (ye !== void 0) return ye;
59
59
  if (typeof window > "u") return null;
60
60
  const e = new URLSearchParams(window.location.search).get("changes"), n = Number(e);
61
61
  return e && Number.isInteger(n) && n > 0 ? n : null;
62
- }), [d, We] = u("all"), [N, Ze] = u("all"), [Q, Je] = u(!0), { data: ye = [], isLoading: Xe } = G({
63
- queryKey: ["notifications", "sent", Q],
62
+ }), [d, Ze] = u("all"), [N, Je] = u("all"), [Y, Xe] = u(!0), { data: we = [], isLoading: Ee } = H({
63
+ queryKey: ["notifications", "sent", Y],
64
64
  queryFn: () => h.request(
65
- H("/notifications/sent", { lane: Q ? "critical" : "all" })
65
+ Q("/notifications/sent", { lane: Y ? "critical" : "all" })
66
66
  ).then((e) => e.data ?? []),
67
67
  enabled: d === "sent",
68
68
  refetchInterval: d === "sent" ? 3e4 : !1
69
- }), [_, q] = u(1), [Ee, E] = u(null), [we, Ne] = u(null), [ee, et] = u(""), [M, tt] = u(""), [$, at] = u(""), [B, nt] = u(!0), [lt, rt] = u(() => /* @__PURE__ */ new Set()), [C, Ce] = u(null), [T, Y] = u(() => /* @__PURE__ */ new Set()), [te, K] = u(!1), [it, ae] = u(!1), [ne, dt] = u(!1), [Se, st] = u("30");
70
- be(() => {
71
- Y(/* @__PURE__ */ new Set()), K(!1), ae(!1);
72
- }, [d, N, _, M, $]), be(() => {
69
+ }), [_, M] = u(1), [et, ee] = u(null), [Ne, Ce] = u(null), [te, tt] = u(""), [T, at] = u(""), [z, nt] = u(""), [K, lt] = u(!0), [rt, it] = u(() => /* @__PURE__ */ new Set()), [C, Se] = u(null), [L, V] = u(() => /* @__PURE__ */ new Set()), [ae, j] = u(!1), [dt, ne] = u(!1), [le, st] = u(!1), [_e, ot] = u("30");
70
+ xe(() => {
71
+ V(/* @__PURE__ */ new Set()), j(!1), ne(!1);
72
+ }, [d, N, _, T, z]), xe(() => {
73
73
  const e = setTimeout(() => {
74
- tt(ee.trim()), q(1);
74
+ at(te.trim()), M(1);
75
75
  }, 350);
76
76
  return () => clearTimeout(e);
77
- }, [ee]);
78
- const { data: b } = G({
77
+ }, [te]);
78
+ const { data: b } = H({
79
79
  queryKey: ["notification-count"],
80
- queryFn: () => h.request(H("/notifications/unread-count"))
81
- }), { data: m, isLoading: ot, isPlaceholderData: ct } = G({
80
+ queryFn: () => h.request(Q("/notifications/unread-count"))
81
+ }), { data: m, isLoading: ct, isPlaceholderData: ut } = H({
82
82
  queryKey: [
83
83
  "notifications",
84
84
  "center",
85
85
  d,
86
86
  N,
87
87
  _,
88
- M,
89
- $,
88
+ T,
89
+ z,
90
90
  f ?? null,
91
- B
91
+ K
92
92
  ],
93
93
  queryFn: () => h.request(
94
- H("/notifications", {
94
+ Q("/notifications", {
95
95
  page: _,
96
- limit: ke,
96
+ limit: ve,
97
97
  status: d === "snoozed" || d === "sent" ? "all" : d,
98
98
  snoozed: d === "snoozed" ? "true" : void 0,
99
99
  lane: N === "all" ? void 0 : N,
100
- search: M || void 0,
101
- collection: $ || void 0,
100
+ search: T || void 0,
101
+ collection: z || void 0,
102
102
  app: f,
103
- bundle: B ? "record" : void 0
103
+ bundle: K ? "record" : void 0
104
104
  })
105
105
  ).then((e) => {
106
- if (!B || e.bundles) return e;
107
- const n = Wt(e.data ?? []);
106
+ if (!K || e.bundles) return e;
107
+ const n = Zt(e.data ?? []);
108
108
  return { ...e, data: n.rows, bundles: n.bundles };
109
109
  }),
110
- placeholderData: St,
110
+ placeholderData: _t,
111
111
  enabled: d !== "sent"
112
- }), { data: ut = [] } = G({
112
+ }), { data: mt = [] } = H({
113
113
  queryKey: ["notifications", "center", "collections"],
114
114
  queryFn: () => h.request(
115
- H("/collections")
115
+ Q("/collections")
116
116
  ).then((e) => {
117
117
  const n = Array.isArray(e) ? e : e.data ?? [];
118
118
  return [...new Set(n.map((l) => l.collection))].sort();
119
119
  }),
120
120
  staleTime: 3e5
121
- }), z = d === "archived" || _ > 1 ? [] : (m == null ? void 0 : m.pinned) ?? [], mt = new Set(z.map((e) => e.id)), L = ((m == null ? void 0 : m.data) ?? []).filter((e) => !mt.has(e.id)), j = (m == null ? void 0 : m.bundles) ?? [], F = (m == null ? void 0 : m.total) ?? 0, le = Math.max(1, Math.ceil(F / ke)), _e = d !== "sent" && _ === 1 && !!m && !ct, Ae = [d, N, M, $, f ?? "", B].join("|"), R = Pe(m ? j : void 0, Ue, {
122
- enabled: _e,
123
- resetKey: Ae
124
- }), P = Pe(m ? L : void 0, Ge, {
125
- enabled: _e,
126
- resetKey: Ae
127
- }), pt = m ? R.rows : j, De = m ? P.rows : L, re = R.held + P.held, $e = Tt(null), ze = R.rootRef, Fe = P.rootRef, ht = Lt(
121
+ }), F = d === "archived" || _ > 1 ? [] : (m == null ? void 0 : m.pinned) ?? [], pt = new Set(F.map((e) => e.id)), R = ((m == null ? void 0 : m.data) ?? []).filter((e) => !pt.has(e.id)), U = (m == null ? void 0 : m.bundles) ?? [], q = (m == null ? void 0 : m.total) ?? 0, re = Math.max(1, Math.ceil(q / ve)), Ae = d !== "sent" && _ === 1 && !!m && !ut, De = [d, N, T, z, f ?? "", K].join("|"), P = Oe(m ? U : void 0, Ge, {
122
+ enabled: Ae,
123
+ resetKey: De
124
+ }), O = Oe(m ? R : void 0, He, {
125
+ enabled: Ae,
126
+ resetKey: De
127
+ }), ht = m ? P.rows : U, $e = m ? O.rows : R, ie = P.held + O.held, ze = Lt(null), Fe = P.rootRef, qe = O.rootRef, bt = Rt(
128
128
  (e) => {
129
- $e.current = e, ze(e), Fe(e);
129
+ ze.current = e, Fe(e), qe(e);
130
130
  },
131
- [ze, Fe]
131
+ [Fe, qe]
132
132
  );
133
- be(() => {
134
- It($e.current, [...R.arrived, ...P.arrived]);
135
- }, [R.arrived, P.arrived]);
136
- const bt = () => {
137
- R.reveal(), P.reveal();
133
+ xe(() => {
134
+ Bt(ze.current, [...P.arrived, ...O.arrived]);
135
+ }, [P.arrived, O.arrived]);
136
+ const xt = () => {
137
+ P.reveal(), O.reveal();
138
138
  }, w = () => {
139
- J.invalidateQueries({ queryKey: ["notifications"] }), J.invalidateQueries({ queryKey: ["notification-count"] });
140
- }, xt = D({
139
+ X.invalidateQueries({ queryKey: ["notifications"] }), X.invalidateQueries({ queryKey: ["notification-count"] });
140
+ }, ft = D({
141
141
  mutationFn: (e) => h.request(S("/notifications/mark-read", { ids: e })),
142
142
  onSuccess: w,
143
143
  onError: () => i == null ? void 0 : i("Failed to mark the bundle read")
144
- }), ie = D({
144
+ }), de = D({
145
145
  mutationFn: () => h.request(S("/notifications/mark-all-read")),
146
146
  onSuccess: () => {
147
147
  w(), r == null || r("All notifications marked as read");
148
148
  },
149
149
  onError: () => i == null ? void 0 : i("Failed to mark all read")
150
- }), U = D({
150
+ }), G = D({
151
151
  mutationFn: ({
152
152
  id: e,
153
153
  until: n,
@@ -159,87 +159,87 @@ function Aa({
159
159
  )
160
160
  ),
161
161
  onSuccess: (e, n) => {
162
- w(), Ne(null), r == null || r(
162
+ w(), Ce(null), r == null || r(
163
163
  n.untilChange ? "Snoozed — it comes back when someone changes the record" : n.until ? "Snoozed — it will return unread" : "Snooze cleared"
164
164
  );
165
165
  },
166
166
  onError: () => i == null ? void 0 : i("Failed to snooze")
167
- }), qe = D({
167
+ }), Me = D({
168
168
  mutationFn: (e) => h.request(S(`/notifications/${e}/acknowledge`)),
169
169
  onSuccess: () => {
170
170
  w(), r == null || r("Acknowledged");
171
171
  },
172
172
  onError: () => i == null ? void 0 : i("Failed to acknowledge")
173
- }), ft = () => ({
173
+ }), gt = () => ({
174
174
  status: d === "snoozed" || d === "sent" ? "all" : d,
175
175
  snoozed: d === "snoozed" ? "true" : void 0,
176
176
  lane: N === "all" ? void 0 : N,
177
- search: M || void 0,
178
- collection: $ || void 0
179
- }), O = D({
177
+ search: T || void 0,
178
+ collection: z || void 0
179
+ }), I = D({
180
180
  mutationFn: (e) => h.request(
181
181
  S("/notifications/bulk-action", {
182
182
  action: e.action,
183
183
  until: e.until ? e.until.toISOString() : void 0,
184
- ...te ? { filter: ft() } : { ids: [...T] }
184
+ ...ae ? { filter: gt() } : { ids: [...L] }
185
185
  })
186
186
  ),
187
187
  onSuccess: (e, n) => {
188
188
  var s;
189
- w(), Y(/* @__PURE__ */ new Set()), K(!1), ae(!1);
189
+ w(), V(/* @__PURE__ */ new Set()), j(!1), ne(!1);
190
190
  const l = ((s = e.data) == null ? void 0 : s.updated) ?? 0;
191
191
  r == null || r(
192
192
  `${l} notification${l === 1 ? "" : "s"} ${n.action === "read" ? "marked read" : n.action === "archive" ? "archived" : "snoozed"}`
193
193
  );
194
194
  },
195
195
  onError: () => i == null ? void 0 : i("That bulk action failed")
196
- }), de = D({
196
+ }), se = D({
197
197
  mutationFn: (e) => h.request(S("/notifications/archive-read", { days: e })),
198
198
  onSuccess: (e) => {
199
199
  var n;
200
200
  w(), r == null || r(`${((n = e.data) == null ? void 0 : n.updated) ?? 0} archived — find them under Archived`);
201
201
  },
202
202
  onError: () => i == null ? void 0 : i("Clean-up failed")
203
- }), { data: se } = G({
203
+ }), { data: oe } = H({
204
204
  queryKey: ["nvr-profile-prefs"],
205
- queryFn: () => h.request(H("/users/me")).then((e) => {
205
+ queryFn: () => h.request(Q("/users/me")).then((e) => {
206
206
  var n;
207
207
  return ((n = e.data) == null ? void 0 : n.preferences) ?? {};
208
208
  }),
209
- enabled: ne
210
- }), gt = D({
211
- mutationFn: (e) => h.request(Pt("/users/me/preferences", { notification_cleanup_days: e })),
209
+ enabled: le
210
+ }), kt = D({
211
+ mutationFn: (e) => h.request(Ot("/users/me/preferences", { notification_cleanup_days: e })),
212
212
  onSuccess: () => {
213
- J.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }), r == null || r("Automatic clean-up saved");
213
+ X.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }), r == null || r("Automatic clean-up saved");
214
214
  },
215
215
  onError: () => i == null ? void 0 : i("Could not save the clean-up setting")
216
- }), oe = D({
217
- mutationFn: (e) => h.request(Ot(`/notifications/${e}`)),
216
+ }), ce = D({
217
+ mutationFn: (e) => h.request(It(`/notifications/${e}`)),
218
218
  onSuccess: () => {
219
- w(), E(null), r == null || r("Notification deleted");
219
+ w(), ee(null), r == null || r("Notification deleted");
220
220
  },
221
221
  onError: () => i == null ? void 0 : i("Failed to delete notification")
222
- }), kt = async (e) => {
222
+ }), vt = async (e) => {
223
223
  await h.request(S(`/notifications/${e}/read`)).catch(() => {
224
224
  }), w();
225
- }, vt = async (e, n) => {
226
- const l = Z && !Ut(n) ? Oe(e) : null;
227
- if (l && Z) {
228
- const s = L.map((k) => Oe(k)).filter((k) => !!k);
229
- Z.open(l, { list: s }), e.read || h.request(S(`/notifications/${e.id}/read`)).catch(() => {
225
+ }, yt = async (e, n) => {
226
+ const l = J && !Gt(n) ? Ie(e) : null;
227
+ if (l && J) {
228
+ const s = R.map((k) => Ie(k)).filter((k) => !!k);
229
+ J.open(l, { list: s }), e.read || h.request(S(`/notifications/${e.id}/read`)).catch(() => {
230
230
  }).then(() => w());
231
231
  return;
232
232
  }
233
233
  e.read || (await h.request(S(`/notifications/${e.id}/read`)).catch(() => {
234
- }), w()), fe(V(e, o), p);
235
- }, yt = (e) => {
236
- K(!1), Y((n) => {
234
+ }), w()), ge(W(e, o), p);
235
+ }, wt = (e) => {
236
+ j(!1), V((n) => {
237
237
  const l = new Set(n);
238
238
  return l.has(e) ? l.delete(e) : l.add(e), l;
239
239
  });
240
- }, ce = (e, n = !1) => {
241
- var I, A, c, v;
242
- const l = !e.read, s = V(e, o), k = /* @__PURE__ */ a(ue, { children: [
240
+ }, ue = (e, n = !1) => {
241
+ var B, A, c, v;
242
+ const l = !e.read, s = W(e, o), k = /* @__PURE__ */ a(me, { children: [
243
243
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-baseline gap-x-2 sm:flex-nowrap", children: [
244
244
  e.lane === "critical" && /* @__PURE__ */ t("span", { className: "shrink-0 rounded bg-red-500/10 px-1 text-[9.5px] font-bold uppercase tracking-wide text-red-600 dark:text-red-400", children: "Critical" }),
245
245
  e.lane === "needs_you" && l && /* @__PURE__ */ t("span", { className: "shrink-0 rounded bg-nvr-cyan/10 px-1 text-[9.5px] font-bold uppercase tracking-wide text-nvr-navy dark:text-nvr-cyan", children: "Needs you" }),
@@ -255,12 +255,12 @@ function Aa({
255
255
  }
256
256
  ),
257
257
  /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center gap-1.5 text-[10.5px] text-slate-400", children: [
258
- /* @__PURE__ */ t(Gt, { label: (I = e.detail) == null ? void 0 : I.via_agent }),
259
- /* @__PURE__ */ t(Be, { value: e.created_at ?? /* @__PURE__ */ new Date() })
258
+ /* @__PURE__ */ t(Ht, { label: (B = e.detail) == null ? void 0 : B.via_agent }),
259
+ /* @__PURE__ */ t(Ke, { value: e.created_at ?? /* @__PURE__ */ new Date() })
260
260
  ] })
261
261
  ] }),
262
- e.message && /* @__PURE__ */ t(ia, { text: e.message.replace(/<[^>]+>/g, "") }),
263
- /* @__PURE__ */ t(aa, { resolved: (A = e.detail) == null ? void 0 : A.resolved, className: "text-[11.5px]" })
262
+ e.message && /* @__PURE__ */ t(da, { text: e.message.replace(/<[^>]+>/g, "") }),
263
+ /* @__PURE__ */ t(na, { resolved: (A = e.detail) == null ? void 0 : A.resolved, className: "text-[11.5px]" })
264
264
  ] });
265
265
  return /* @__PURE__ */ a(
266
266
  "div",
@@ -278,8 +278,8 @@ function Aa({
278
278
  "input",
279
279
  {
280
280
  type: "checkbox",
281
- checked: T.has(e.id),
282
- onChange: () => yt(e.id),
281
+ checked: L.has(e.id),
282
+ onChange: () => wt(e.id),
283
283
  "aria-label": "Select notification",
284
284
  "data-notification-select": e.id,
285
285
  className: "mt-1.5 h-3.5 w-3.5 shrink-0"
@@ -299,7 +299,7 @@ function Aa({
299
299
  "button",
300
300
  {
301
301
  type: "button",
302
- onClick: (y) => void vt(e, y),
302
+ onClick: (y) => void yt(e, y),
303
303
  className: "block w-full text-left",
304
304
  children: k
305
305
  }
@@ -318,16 +318,16 @@ function Aa({
318
318
  "button",
319
319
  {
320
320
  type: "button",
321
- onClick: () => fe(s, p),
321
+ onClick: () => ge(s, p),
322
322
  ...e.collection && !e.item && s.type !== "chat" && s.type !== "external" ? {
323
- "aria-label": `See what changed in ${He(e.collection)}`,
324
- "data-tip": `See what changed in ${He(e.collection)}`
323
+ "aria-label": `See what changed in ${Qe(e.collection)}`,
324
+ "data-tip": `See what changed in ${Qe(e.collection)}`
325
325
  } : {},
326
326
  className: "inline-flex items-center gap-1 rounded-full bg-nvr-cyan/10 px-2 py-0.5 text-[10px] font-medium text-nvr-navy hover:bg-nvr-cyan/20 dark:bg-nvr-cyan/15 dark:text-nvr-cyan",
327
327
  children: s.type === "chat" ? "Open chat" : s.type === "external" ? "Open in app ↗" : e.target_label && e.kind !== "record" ? `${e.target_label}${e.item ? ` #${e.item}` : ""}` : e.collection === "__chat__" ? "Chat" : e.collection && !e.item ? "See changes" : e.collection ? (
328
328
  // The record's friendly id ("Workflow TP26-80418"), as the title
329
329
  // names it — never the table name and row id.
330
- (e.record_label ? Ht(e) : null) ?? `${e.collection} #${e.item}`
330
+ (e.record_label ? Qt(e) : null) ?? `${e.collection} #${e.item}`
331
331
  ) : "Open"
332
332
  }
333
333
  ),
@@ -336,64 +336,64 @@ function Aa({
336
336
  {
337
337
  type: "button",
338
338
  "data-notification-mark-read": e.id,
339
- onClick: () => void kt(e.id),
339
+ onClick: () => void vt(e.id),
340
340
  className: "inline-flex items-center gap-1 rounded-full border border-slate-200 px-2 py-0.5 text-[10px] font-medium text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:text-slate-400 dark:hover:bg-muted dark:hover:text-slate-200",
341
341
  children: [
342
- /* @__PURE__ */ t(me, { className: "h-3 w-3" }),
342
+ /* @__PURE__ */ t(pe, { className: "h-3 w-3" }),
343
343
  "Mark read"
344
344
  ]
345
345
  }
346
346
  ),
347
- /* @__PURE__ */ t(Et, { delivery: e.delivery, mailLogUrl: g, onNavigate: p }),
348
- Qt(e) && /* @__PURE__ */ a(
347
+ /* @__PURE__ */ t(ea, { delivery: e.delivery, mailLogUrl: g, onNavigate: p }),
348
+ Yt(e) && /* @__PURE__ */ a(
349
349
  "button",
350
350
  {
351
351
  type: "button",
352
352
  "data-notification-as-it-was": e.id,
353
353
  "data-tip": "The record as it was when you were told",
354
- onClick: () => Ce(e),
354
+ onClick: () => Se(e),
355
355
  className: "inline-flex items-center gap-1 rounded-full border border-slate-200 px-2 py-0.5 text-[10px] font-medium text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:text-slate-400 dark:hover:bg-muted dark:hover:text-slate-200",
356
356
  children: [
357
- /* @__PURE__ */ t(Ft, { className: "h-3 w-3" }),
357
+ /* @__PURE__ */ t(qt, { className: "h-3 w-3" }),
358
358
  "Record when sent"
359
359
  ]
360
360
  }
361
361
  )
362
362
  ] }),
363
363
  /* @__PURE__ */ t(
364
- na,
364
+ la,
365
365
  {
366
366
  detail: e.detail,
367
367
  why: e.why,
368
368
  delivery: e.delivery,
369
369
  notificationId: e.id,
370
- recordChanges: Yt(e),
371
- subscriptionsPath: W,
372
- rulesPath: Qe,
370
+ recordChanges: Vt(e),
371
+ subscriptionsPath: Z,
372
+ rulesPath: Ye,
373
373
  onNavigate: p,
374
374
  className: "mt-1"
375
375
  }
376
376
  ),
377
377
  ((c = e.ack) == null ? void 0 : c.required) && /* @__PURE__ */ t("div", { className: "mt-1.5", "data-notification-ack": e.ack.at ? "acked" : "pending", children: e.ack.at ? /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2 py-0.5 text-[10.5px] font-medium text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400", children: [
378
- /* @__PURE__ */ t(he, { className: "h-3 w-3" }),
378
+ /* @__PURE__ */ t(be, { className: "h-3 w-3" }),
379
379
  "Acknowledged ",
380
- Ie(e.ack.at)
380
+ Be(e.ack.at)
381
381
  ] }) : /* @__PURE__ */ a(
382
382
  "button",
383
383
  {
384
384
  type: "button",
385
- disabled: qe.isPending,
386
- onClick: () => qe.mutate(e.id),
385
+ disabled: Me.isPending,
386
+ onClick: () => Me.mutate(e.id),
387
387
  "data-notification-acknowledge": e.id,
388
388
  className: "inline-flex items-center gap-1 rounded-md bg-nvr-cyan px-2.5 py-1 text-[11.5px] font-medium text-white hover:opacity-90 disabled:opacity-50",
389
389
  children: [
390
- /* @__PURE__ */ t(he, { className: "h-3.5 w-3.5" }),
390
+ /* @__PURE__ */ t(be, { className: "h-3.5 w-3.5" }),
391
391
  "Acknowledge"
392
392
  ]
393
393
  }
394
394
  ) }),
395
395
  e.actions && e.actions.length > 0 && !((v = e.detail) != null && v.resolved) && /* @__PURE__ */ t(
396
- ea,
396
+ ta,
397
397
  {
398
398
  actions: l ? e.actions : e.actions.filter((y) => !!y.input),
399
399
  notificationId: e.id,
@@ -409,11 +409,11 @@ function Aa({
409
409
  "button",
410
410
  {
411
411
  type: "button",
412
- onClick: () => U.mutate({ id: e.id, until: null }),
412
+ onClick: () => G.mutate({ id: e.id, until: null }),
413
413
  className: "inline-flex items-center gap-1 rounded-full bg-amber-50 px-2 py-0.5 text-[10.5px] font-medium text-amber-700 hover:bg-amber-100 dark:bg-amber-400/10 dark:text-amber-300",
414
414
  "data-tip": "Click to wake now",
415
415
  children: [
416
- /* @__PURE__ */ t(pe, { className: "h-3 w-3" }),
416
+ /* @__PURE__ */ t(he, { className: "h-3 w-3" }),
417
417
  e.snooze_until_change ? "Until it changes" : `Until ${new Date(e.snoozed_until).toLocaleString([], {
418
418
  month: "short",
419
419
  day: "numeric",
@@ -426,19 +426,19 @@ function Aa({
426
426
  "button",
427
427
  {
428
428
  type: "button",
429
- onClick: () => Ne(we === e.id ? null : e.id),
429
+ onClick: () => Ce(Ne === e.id ? null : e.id),
430
430
  className: "rounded p-1.5 text-slate-300 opacity-0 transition-all hover:bg-amber-50 hover:text-amber-500 focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 dark:hover:bg-amber-400/10 [@media(hover:none)]:opacity-100",
431
431
  "aria-label": "Snooze notification",
432
- children: /* @__PURE__ */ t(pe, { className: "h-3.5 w-3.5" })
432
+ children: /* @__PURE__ */ t(he, { className: "h-3.5 w-3.5" })
433
433
  }
434
434
  ),
435
- we === e.id && /* @__PURE__ */ a("div", { className: "absolute right-0 top-8 z-20 w-[180px] rounded-md border border-slate-200 bg-white py-1 shadow-lg dark:border-border dark:bg-card", children: [
436
- je().map((y) => /* @__PURE__ */ t(
435
+ Ne === e.id && /* @__PURE__ */ a("div", { className: "absolute right-0 top-8 z-20 w-[180px] rounded-md border border-slate-200 bg-white py-1 shadow-lg dark:border-border dark:bg-card", children: [
436
+ Ue().map((y) => /* @__PURE__ */ t(
437
437
  "button",
438
438
  {
439
439
  type: "button",
440
- disabled: U.isPending,
441
- onClick: () => U.mutate({ id: e.id, until: y.until }),
440
+ disabled: G.isPending,
441
+ onClick: () => G.mutate({ id: e.id, until: y.until }),
442
442
  className: "block w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-muted dark:text-foreground",
443
443
  children: y.label
444
444
  },
@@ -448,8 +448,8 @@ function Aa({
448
448
  "button",
449
449
  {
450
450
  type: "button",
451
- disabled: U.isPending,
452
- onClick: () => U.mutate({ id: e.id, until: null, untilChange: !0 }),
451
+ disabled: G.isPending,
452
+ onClick: () => G.mutate({ id: e.id, until: null, untilChange: !0 }),
453
453
  className: "block w-full border-t border-slate-100 px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-muted dark:border-border dark:text-foreground",
454
454
  "data-snooze-until-change": !0,
455
455
  children: "Until the record changes"
@@ -457,12 +457,12 @@ function Aa({
457
457
  )
458
458
  ] })
459
459
  ] }),
460
- /* @__PURE__ */ t("div", { className: "shrink-0", children: Ee === e.id ? /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: [
460
+ /* @__PURE__ */ t("div", { className: "shrink-0", children: et === e.id ? /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: [
461
461
  /* @__PURE__ */ t(
462
462
  "button",
463
463
  {
464
464
  type: "button",
465
- onClick: () => E(null),
465
+ onClick: () => ee(null),
466
466
  className: "h-6 rounded-md border border-slate-200 px-2 text-[11px] dark:border-border",
467
467
  children: "Cancel"
468
468
  }
@@ -471,34 +471,34 @@ function Aa({
471
471
  "button",
472
472
  {
473
473
  type: "button",
474
- disabled: oe.isPending,
475
- onClick: () => oe.mutate(e.id),
474
+ disabled: ce.isPending,
475
+ onClick: () => ce.mutate(e.id),
476
476
  className: "h-6 rounded-md bg-red-500 px-2 text-[11px] text-white hover:bg-red-600",
477
- children: oe.isPending ? "Deleting…" : "Delete"
477
+ children: ce.isPending ? "Deleting…" : "Delete"
478
478
  }
479
479
  )
480
480
  ] }) : /* @__PURE__ */ t(
481
481
  "button",
482
482
  {
483
483
  type: "button",
484
- onClick: () => E(e.id),
484
+ onClick: () => ee(e.id),
485
485
  className: "rounded p-1.5 text-slate-300 opacity-0 transition-all hover:bg-red-50 hover:text-red-400 focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 [@media(hover:none)]:opacity-100",
486
486
  "aria-label": "Delete notification",
487
- children: /* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" })
487
+ children: /* @__PURE__ */ t(Mt, { className: "h-3.5 w-3.5" })
488
488
  }
489
489
  ) })
490
490
  ]
491
491
  }
492
492
  );
493
- }, wt = (e) => {
494
- const n = `${e.collection}:${e.item}`, l = lt.has(n), s = Zt(e.lane), k = e.deleted ? null : V(Jt(e), o), I = e.rows.filter((c) => !c.read).map((c) => c.id), A = () => rt((c) => {
493
+ }, Nt = (e) => {
494
+ const n = `${e.collection}:${e.item}`, l = rt.has(n), s = Jt(e.lane), k = e.deleted ? null : W(Xt(e), o), B = e.rows.filter((c) => !c.read).map((c) => c.id), A = () => it((c) => {
495
495
  const v = new Set(c);
496
496
  return v.has(n) ? v.delete(n) : v.add(n), v;
497
497
  });
498
498
  return /* @__PURE__ */ a(
499
499
  "div",
500
500
  {
501
- "data-live-key": Ue(e),
501
+ "data-live-key": Ge(e),
502
502
  "data-notification-bundle": n,
503
503
  "data-notification-bundle-count": e.count,
504
504
  "data-notification-bundle-lane": e.lane,
@@ -515,7 +515,7 @@ function Aa({
515
515
  onClick: A,
516
516
  className: "mt-1 rounded p-0.5 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
517
517
  children: /* @__PURE__ */ t(
518
- Mt,
518
+ Tt,
519
519
  {
520
520
  className: x("h-3.5 w-3.5 transition-transform", !l && "-rotate-90")
521
521
  }
@@ -552,13 +552,13 @@ function Aa({
552
552
  "min-w-0 line-clamp-2 break-words text-[13px] sm:line-clamp-none sm:truncate",
553
553
  e.unread > 0 ? x("font-medium", s.text) : "font-normal text-slate-600 dark:text-slate-400"
554
554
  ),
555
- children: e.label ? /* @__PURE__ */ a(ue, { children: [
556
- Ke(e).slice(0, -e.label.length),
555
+ children: e.label ? /* @__PURE__ */ a(me, { children: [
556
+ je(e).slice(0, -e.label.length),
557
557
  /* @__PURE__ */ t("span", { className: "whitespace-nowrap", children: e.label })
558
- ] }) : Ke(e)
558
+ ] }) : je(e)
559
559
  }
560
560
  ),
561
- /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: e.newest ? Ie(e.newest) : "" })
561
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: e.newest ? Be(e.newest) : "" })
562
562
  ] }) }),
563
563
  /* @__PURE__ */ a("div", { className: "mt-1 flex flex-wrap items-center gap-1.5", children: [
564
564
  e.collection_label && /* @__PURE__ */ t(
@@ -582,7 +582,7 @@ function Aa({
582
582
  {
583
583
  className: "rounded bg-slate-100 px-1.5 py-px text-[10px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
584
584
  "data-notification-bundle-category": c,
585
- children: Xt(c)
585
+ children: Et(c)
586
586
  },
587
587
  c
588
588
  )),
@@ -590,10 +590,10 @@ function Aa({
590
590
  "button",
591
591
  {
592
592
  type: "button",
593
- onClick: () => fe(k, p),
593
+ onClick: () => ge(k, p),
594
594
  className: "inline-flex items-center gap-1 rounded-full bg-nvr-cyan/10 px-2 py-0.5 text-[10px] font-medium text-nvr-navy hover:bg-nvr-cyan/20 dark:bg-nvr-cyan/15 dark:text-nvr-cyan",
595
595
  children: [
596
- /* @__PURE__ */ t(Le, { className: "h-3 w-3" }),
596
+ /* @__PURE__ */ t(Re, { className: "h-3 w-3" }),
597
597
  "Open ",
598
598
  e.label
599
599
  ]
@@ -605,17 +605,17 @@ function Aa({
605
605
  ] })
606
606
  ] })
607
607
  ] }),
608
- I.length > 0 && /* @__PURE__ */ a(
608
+ B.length > 0 && /* @__PURE__ */ a(
609
609
  "button",
610
610
  {
611
611
  type: "button",
612
612
  "data-notification-bundle-read": n,
613
- onClick: () => xt.mutate(I),
613
+ onClick: () => ft.mutate(B),
614
614
  "aria-label": "Mark read",
615
615
  "data-tip": "Mark read",
616
616
  className: "inline-flex shrink-0 items-center gap-1 rounded-md border border-slate-200 p-1.5 text-[11px] font-medium text-slate-600 hover:bg-slate-50 sm:px-2 sm:py-1 dark:border-border dark:text-slate-300 dark:hover:bg-muted",
617
617
  children: [
618
- /* @__PURE__ */ t(me, { className: "h-3.5 w-3.5 sm:h-3 sm:w-3" }),
618
+ /* @__PURE__ */ t(pe, { className: "h-3.5 w-3.5 sm:h-3 sm:w-3" }),
619
619
  /* @__PURE__ */ t("span", { className: "max-sm:hidden", children: "Mark read" })
620
620
  ]
621
621
  }
@@ -626,43 +626,43 @@ function Aa({
626
626
  {
627
627
  className: "divide-y divide-slate-100 border-t border-slate-100 dark:divide-border dark:border-border",
628
628
  "data-notification-bundle-rows": n,
629
- children: e.rows.map((c) => /* @__PURE__ */ t(xe, { children: ce(c, !0) }, c.id))
629
+ children: e.rows.map((c) => /* @__PURE__ */ t(fe, { children: ue(c, !0) }, c.id))
630
630
  }
631
631
  )
632
632
  ]
633
633
  },
634
634
  `bundle:${n}`
635
635
  );
636
- }, Me = z.length + L.length + j.reduce((e, n) => e + n.rows.length, 0), Nt = (e) => {
636
+ }, Te = F.length + R.length + U.reduce((e, n) => e + n.rows.length, 0), Ct = (e) => {
637
637
  var n;
638
638
  return e === "all" ? null : ((n = b == null ? void 0 : b.lanes) == null ? void 0 : n[e]) ?? null;
639
639
  };
640
- return /* @__PURE__ */ a("div", { className: x("flex flex-1 min-h-0 flex-col", Ye), "data-nvr-notification-center": !0, children: [
640
+ return /* @__PURE__ */ a("div", { className: x("flex flex-1 min-h-0 flex-col", Ve), "data-nvr-notification-center": !0, children: [
641
641
  /* @__PURE__ */ a("header", { className: "shrink-0 border-b border-slate-200 bg-white px-4 py-5 dark:border-border dark:bg-background sm:px-8", children: [
642
642
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center justify-between gap-x-3 gap-y-2", children: [
643
643
  /* @__PURE__ */ a("div", { children: [
644
644
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [
645
645
  /* @__PURE__ */ t("h1", { className: "text-xl font-bold text-slate-900 dark:text-slate-100", children: "Notifications" }),
646
- re > 0 && /* @__PURE__ */ a(
646
+ ie > 0 && /* @__PURE__ */ a(
647
647
  "button",
648
648
  {
649
649
  type: "button",
650
- "data-notification-new-pill": re,
651
- onClick: bt,
650
+ "data-notification-new-pill": ie,
651
+ onClick: xt,
652
652
  className: "inline-flex h-7 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.08] px-3 text-[12px] font-medium text-nvr-navy transition-colors hover:bg-nvr-cyan/15 focus-visible:outline focus-visible:outline-2 focus-visible:outline-nvr-cyan dark:border-nvr-cyan/40 dark:bg-nvr-cyan/15 dark:text-nvr-cyan dark:hover:bg-nvr-cyan/25",
653
653
  children: [
654
- /* @__PURE__ */ t(_t, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
655
- re,
654
+ /* @__PURE__ */ t(At, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
655
+ ie,
656
656
  " new"
657
657
  ]
658
658
  }
659
659
  )
660
660
  ] }),
661
661
  /* @__PURE__ */ a("p", { className: "mt-0.5 text-[13px] text-slate-500 dark:text-slate-400", children: [
662
- F,
662
+ $(q),
663
663
  " notification",
664
- F === 1 ? "" : "s",
665
- N !== "all" || d !== "all" || M || $ ? " in this view" : "",
664
+ q === 1 ? "" : "s",
665
+ N !== "all" || d !== "all" || T || z ? " in this view" : "",
666
666
  (b == null ? void 0 : b.attention) != null && b.attention > 0 ? ` · ${b.attention} need${b.attention === 1 ? "s" : ""} you` : ""
667
667
  ] })
668
668
  ] }),
@@ -671,14 +671,14 @@ function Aa({
671
671
  "button",
672
672
  {
673
673
  type: "button",
674
- onClick: () => dt((e) => !e),
674
+ onClick: () => st((e) => !e),
675
675
  "data-notification-cleanup-toggle": !0,
676
676
  "aria-label": "Clean up",
677
- "aria-expanded": ne,
677
+ "aria-expanded": le,
678
678
  "data-tip": "Clean up",
679
679
  className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-md border border-slate-200 px-2 text-[12px] font-medium text-slate-700 hover:bg-slate-50 sm:px-3 dark:border-border dark:text-foreground dark:hover:bg-muted",
680
680
  children: [
681
- /* @__PURE__ */ t(Te, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
681
+ /* @__PURE__ */ t(Le, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
682
682
  /* @__PURE__ */ t("span", { className: "hidden sm:inline", children: "Clean up" })
683
683
  ]
684
684
  }
@@ -687,20 +687,20 @@ function Aa({
687
687
  "button",
688
688
  {
689
689
  type: "button",
690
- onClick: () => ie.mutate(),
691
- disabled: ie.isPending || b != null && b.unread === 0,
690
+ onClick: () => de.mutate(),
691
+ disabled: de.isPending || b != null && b.unread === 0,
692
692
  "aria-label": "Mark all read",
693
693
  "data-tip": (b == null ? void 0 : b.unread) === 0 ? "Nothing unread" : "Mark all read",
694
694
  className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-md border border-slate-200 px-2 text-[12px] font-medium text-slate-700 hover:bg-slate-50 disabled:cursor-not-allowed disabled:opacity-50 sm:px-3 dark:border-border dark:text-foreground dark:hover:bg-muted",
695
695
  children: [
696
- /* @__PURE__ */ t(At, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
697
- /* @__PURE__ */ t("span", { className: "hidden sm:inline", children: ie.isPending ? "Marking…" : "Mark all read" })
696
+ /* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
697
+ /* @__PURE__ */ t("span", { className: "hidden sm:inline", children: de.isPending ? "Marking…" : "Mark all read" })
698
698
  ]
699
699
  }
700
700
  )
701
701
  ] })
702
702
  ] }),
703
- ne && /* @__PURE__ */ a(
703
+ le && /* @__PURE__ */ a(
704
704
  "div",
705
705
  {
706
706
  className: "mt-3 space-y-2 rounded-md border border-slate-200 bg-slate-50 px-3 py-2.5 text-[12px] text-slate-600 dark:border-border dark:bg-muted/40 dark:text-muted-foreground",
@@ -709,10 +709,10 @@ function Aa({
709
709
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
710
710
  "Archive everything read and older than",
711
711
  /* @__PURE__ */ t(
712
- ge,
712
+ ke,
713
713
  {
714
- value: Se,
715
- onChange: st,
714
+ value: _e,
715
+ onChange: ot,
716
716
  ariaLabel: "Older than",
717
717
  className: "h-7 w-auto rounded-md border-slate-200 bg-background px-2 text-[12px] dark:border-border",
718
718
  options: [
@@ -727,21 +727,21 @@ function Aa({
727
727
  "button",
728
728
  {
729
729
  type: "button",
730
- disabled: de.isPending,
731
- onClick: () => de.mutate(Number(Se)),
730
+ disabled: se.isPending,
731
+ onClick: () => se.mutate(Number(_e)),
732
732
  "data-notification-archive-read": !0,
733
733
  className: "h-7 rounded-md bg-[#0f172a] px-2.5 text-[11.5px] font-medium text-[#ffffff] hover:bg-[#334155] disabled:opacity-50 dark:bg-[#e2e8f0] dark:text-[#0f172a] dark:hover:bg-[#ffffff]",
734
- children: de.isPending ? "Archiving…" : "Archive now"
734
+ children: se.isPending ? "Archiving…" : "Archive now"
735
735
  }
736
736
  )
737
737
  ] }),
738
738
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
739
739
  "Or do it automatically — archive read notifications after",
740
740
  /* @__PURE__ */ t(
741
- ge,
741
+ ke,
742
742
  {
743
- value: String((se == null ? void 0 : se.notification_cleanup_days) ?? ""),
744
- onChange: (e) => gt.mutate(e ? Number(e) : null),
743
+ value: String((oe == null ? void 0 : oe.notification_cleanup_days) ?? ""),
744
+ onChange: (e) => kt.mutate(e ? Number(e) : null),
745
745
  ariaLabel: "Automatic clean-up",
746
746
  className: "h-7 w-auto rounded-md border-slate-200 bg-background px-2 text-[12px] dark:border-border",
747
747
  options: [
@@ -758,14 +758,14 @@ function Aa({
758
758
  }
759
759
  ),
760
760
  /* @__PURE__ */ a("div", { className: "mt-4 flex flex-wrap items-center gap-2", children: [
761
- /* @__PURE__ */ t("div", { className: "-mx-1 flex max-w-full items-center gap-1 overflow-x-auto px-1 [scrollbar-width:none] sm:flex-wrap", children: ra.map((e) => {
762
- const n = Nt(e.key);
761
+ /* @__PURE__ */ t("div", { className: "-mx-1 flex max-w-full items-center gap-1 overflow-x-auto px-1 [scrollbar-width:none] sm:flex-wrap", children: ia.map((e) => {
762
+ const n = Ct(e.key);
763
763
  return /* @__PURE__ */ a(
764
764
  "button",
765
765
  {
766
766
  type: "button",
767
767
  onClick: () => {
768
- Ze(e.key), q(1);
768
+ Je(e.key), M(1);
769
769
  },
770
770
  "data-nvr-lane": e.key,
771
771
  className: x(
@@ -788,12 +788,12 @@ function Aa({
788
788
  );
789
789
  }) }),
790
790
  /* @__PURE__ */ t("span", { className: "mx-1 hidden h-5 w-px bg-slate-200 dark:bg-border sm:block" }),
791
- /* @__PURE__ */ t("div", { className: "-mx-1 flex max-w-full items-center gap-1 overflow-x-auto px-1 [scrollbar-width:none] sm:flex-wrap", children: la.map((e) => /* @__PURE__ */ t(
791
+ /* @__PURE__ */ t("div", { className: "-mx-1 flex max-w-full items-center gap-1 overflow-x-auto px-1 [scrollbar-width:none] sm:flex-wrap", children: ra.map((e) => /* @__PURE__ */ t(
792
792
  "button",
793
793
  {
794
794
  type: "button",
795
795
  onClick: () => {
796
- We(e.key), q(1);
796
+ Ze(e.key), M(1);
797
797
  },
798
798
  className: x(
799
799
  "shrink-0 whitespace-nowrap rounded-md px-2.5 py-1.5 text-[12px] font-medium transition-colors",
@@ -804,29 +804,29 @@ function Aa({
804
804
  e.key
805
805
  )) }),
806
806
  /* @__PURE__ */ a("div", { className: "relative w-full sm:ml-auto sm:w-auto", children: [
807
- /* @__PURE__ */ t(Dt, { className: "pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
807
+ /* @__PURE__ */ t($t, { className: "pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
808
808
  /* @__PURE__ */ t(
809
809
  "input",
810
810
  {
811
- value: ee,
812
- onChange: (e) => et(e.target.value),
811
+ value: te,
812
+ onChange: (e) => tt(e.target.value),
813
813
  placeholder: "Search notifications…",
814
814
  className: "h-8 w-full rounded-md border border-slate-200 bg-background pl-8 sm:w-[240px] pr-2.5 text-[12.5px] dark:border-border"
815
815
  }
816
816
  )
817
817
  ] }),
818
818
  /* @__PURE__ */ t(
819
- ge,
819
+ ke,
820
820
  {
821
- value: $,
821
+ value: z,
822
822
  onChange: (e) => {
823
- at(e), q(1);
823
+ nt(e), M(1);
824
824
  },
825
825
  ariaLabel: "Collection",
826
826
  className: "h-8 w-auto rounded-md border-slate-200 bg-background px-2 text-[12.5px] dark:border-border",
827
827
  options: [
828
828
  { value: "", label: "All collections" },
829
- ...ut.map((e) => ({ value: e, label: e }))
829
+ ...mt.map((e) => ({ value: e, label: e }))
830
830
  ]
831
831
  }
832
832
  ),
@@ -840,8 +840,8 @@ function Aa({
840
840
  "input",
841
841
  {
842
842
  type: "checkbox",
843
- checked: B,
844
- onChange: (e) => nt(e.target.checked),
843
+ checked: K,
844
+ onChange: (e) => lt(e.target.checked),
845
845
  className: "h-3.5 w-3.5",
846
846
  "data-notification-group-by-record": !0
847
847
  }
@@ -852,11 +852,11 @@ function Aa({
852
852
  )
853
853
  ] })
854
854
  ] }),
855
- X != null && /* @__PURE__ */ a(
855
+ E != null && /* @__PURE__ */ a(
856
856
  "div",
857
857
  {
858
858
  className: "shrink-0 border-b border-slate-200 bg-white px-8 py-3 dark:border-border dark:bg-background",
859
- "data-notification-changes-landing": X,
859
+ "data-notification-changes-landing": E,
860
860
  children: [
861
861
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2", children: [
862
862
  /* @__PURE__ */ t("p", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "What changed" }),
@@ -864,33 +864,33 @@ function Aa({
864
864
  "button",
865
865
  {
866
866
  type: "button",
867
- onClick: () => Ve(null),
867
+ onClick: () => We(null),
868
868
  className: "text-[11.5px] text-slate-400 underline decoration-dotted underline-offset-2 hover:text-slate-600 dark:hover:text-slate-200",
869
869
  children: "Dismiss"
870
870
  }
871
871
  )
872
872
  ] }),
873
- /* @__PURE__ */ t(ta, { notificationId: X, className: "max-w-3xl" })
873
+ /* @__PURE__ */ t(aa, { notificationId: E, className: "max-w-3xl" })
874
874
  ]
875
875
  }
876
876
  ),
877
- d !== "sent" && T.size > 0 && /* @__PURE__ */ a(
877
+ d !== "sent" && L.size > 0 && /* @__PURE__ */ a(
878
878
  "div",
879
879
  {
880
880
  className: "flex shrink-0 flex-wrap items-center gap-2 border-b border-nvr-cyan/30 bg-nvr-cyan/5 px-8 py-2 text-[12px] text-slate-700 dark:text-slate-200",
881
881
  "data-notification-bulkbar": !0,
882
882
  children: [
883
- /* @__PURE__ */ t("span", { className: "font-medium", children: te ? `All ${F} matching` : `${T.size} selected` }),
884
- !te && T.size >= Me && F > Me && /* @__PURE__ */ a(
883
+ /* @__PURE__ */ t("span", { className: "font-medium", children: ae ? `All ${$(q)} matching` : `${$(L.size)} selected` }),
884
+ !ae && L.size >= Te && q > Te && /* @__PURE__ */ a(
885
885
  "button",
886
886
  {
887
887
  type: "button",
888
- onClick: () => K(!0),
888
+ onClick: () => j(!0),
889
889
  "data-notification-select-matching": !0,
890
890
  className: "text-nvr-navy underline decoration-dotted underline-offset-2 dark:text-nvr-cyan",
891
891
  children: [
892
892
  "Select all ",
893
- F,
893
+ $(q),
894
894
  " matching"
895
895
  ]
896
896
  }
@@ -900,12 +900,12 @@ function Aa({
900
900
  "button",
901
901
  {
902
902
  type: "button",
903
- disabled: O.isPending,
904
- onClick: () => O.mutate({ action: "read" }),
903
+ disabled: I.isPending,
904
+ onClick: () => I.mutate({ action: "read" }),
905
905
  "data-notification-bulk": "read",
906
906
  className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 bg-background px-2 text-[11.5px] font-medium hover:bg-slate-50 dark:border-border",
907
907
  children: [
908
- /* @__PURE__ */ t(me, { className: "h-3 w-3" }),
908
+ /* @__PURE__ */ t(pe, { className: "h-3 w-3" }),
909
909
  " Mark read"
910
910
  ]
911
911
  }
@@ -915,21 +915,21 @@ function Aa({
915
915
  "button",
916
916
  {
917
917
  type: "button",
918
- disabled: O.isPending,
919
- onClick: () => ae((e) => !e),
918
+ disabled: I.isPending,
919
+ onClick: () => ne((e) => !e),
920
920
  "data-notification-bulk": "snooze",
921
921
  className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 bg-background px-2 text-[11.5px] font-medium hover:bg-slate-50 dark:border-border",
922
922
  children: [
923
- /* @__PURE__ */ t(pe, { className: "h-3 w-3" }),
923
+ /* @__PURE__ */ t(he, { className: "h-3 w-3" }),
924
924
  " Snooze"
925
925
  ]
926
926
  }
927
927
  ),
928
- it && /* @__PURE__ */ t("div", { className: "absolute left-0 top-8 z-20 w-[180px] rounded-md border border-slate-200 bg-white py-1 shadow-lg dark:border-border dark:bg-card", children: je().map((e) => /* @__PURE__ */ t(
928
+ dt && /* @__PURE__ */ t("div", { className: "absolute left-0 top-8 z-20 w-[180px] rounded-md border border-slate-200 bg-white py-1 shadow-lg dark:border-border dark:bg-card", children: Ue().map((e) => /* @__PURE__ */ t(
929
929
  "button",
930
930
  {
931
931
  type: "button",
932
- onClick: () => O.mutate({ action: "snooze", until: e.until }),
932
+ onClick: () => I.mutate({ action: "snooze", until: e.until }),
933
933
  className: "block w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-muted dark:text-foreground",
934
934
  children: e.label
935
935
  },
@@ -940,12 +940,12 @@ function Aa({
940
940
  "button",
941
941
  {
942
942
  type: "button",
943
- disabled: O.isPending,
944
- onClick: () => O.mutate({ action: "archive" }),
943
+ disabled: I.isPending,
944
+ onClick: () => I.mutate({ action: "archive" }),
945
945
  "data-notification-bulk": "archive",
946
946
  className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 bg-background px-2 text-[11.5px] font-medium hover:bg-slate-50 dark:border-border",
947
947
  children: [
948
- /* @__PURE__ */ t(Te, { className: "h-3 w-3" }),
948
+ /* @__PURE__ */ t(Le, { className: "h-3 w-3" }),
949
949
  " Archive"
950
950
  ]
951
951
  }
@@ -956,17 +956,17 @@ function Aa({
956
956
  type: "button",
957
957
  onClick: () => {
958
958
  const e = [];
959
- for (const n of [...z, ...L, ...j.flatMap((l) => l.rows)]) {
960
- if (!T.has(n.id)) continue;
961
- const l = V(n, o);
959
+ for (const n of [...F, ...R, ...U.flatMap((l) => l.rows)]) {
960
+ if (!L.has(n.id)) continue;
961
+ const l = W(n, o);
962
962
  l && (l.type === "external" ? e.push(l.url) : l.type === "path" && typeof window < "u" && e.push(`${window.location.origin}${l.path}`));
963
963
  }
964
- e.length === 0 ? r == null || r("None of the selected notifications opens a page") : r == null || r(Bt(Kt(e)));
964
+ e.length === 0 ? r == null || r("None of the selected notifications opens a page") : r == null || r(Kt(jt(e)));
965
965
  },
966
966
  "data-notification-bulk": "tabs",
967
967
  className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 bg-background px-2 text-[11.5px] font-medium hover:bg-slate-50 dark:border-border",
968
968
  children: [
969
- /* @__PURE__ */ t(Le, { className: "h-3 w-3" }),
969
+ /* @__PURE__ */ t(Re, { className: "h-3 w-3" }),
970
970
  " Open in tabs"
971
971
  ]
972
972
  }
@@ -976,7 +976,7 @@ function Aa({
976
976
  {
977
977
  type: "button",
978
978
  onClick: () => {
979
- Y(/* @__PURE__ */ new Set()), K(!1);
979
+ V(/* @__PURE__ */ new Set()), j(!1);
980
980
  },
981
981
  className: "ml-auto text-[11.5px] text-slate-500 underline decoration-dotted underline-offset-2",
982
982
  children: "Clear selection"
@@ -994,8 +994,8 @@ function Aa({
994
994
  "input",
995
995
  {
996
996
  type: "checkbox",
997
- checked: Q,
998
- onChange: (e) => Je(e.target.checked),
997
+ checked: Y,
998
+ onChange: (e) => Xe(e.target.checked),
999
999
  className: "h-3.5 w-3.5",
1000
1000
  "data-nvr-sent-critical": !0
1001
1001
  }
@@ -1003,15 +1003,15 @@ function Aa({
1003
1003
  "Critical only"
1004
1004
  ] })
1005
1005
  ] }),
1006
- Xe ? /* @__PURE__ */ t("p", { className: "py-10 text-[13px] text-slate-400", children: "Loading…" }) : ye.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-24 text-center", children: [
1007
- /* @__PURE__ */ t(Re, { className: "h-10 w-10 text-slate-200 dark:text-slate-700" }),
1006
+ Ee ? /* @__PURE__ */ t("p", { className: "py-10 text-[13px] text-slate-400", children: "Loading…" }) : we.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-24 text-center", children: [
1007
+ /* @__PURE__ */ t(Pe, { className: "h-10 w-10 text-slate-200 dark:text-slate-700" }),
1008
1008
  /* @__PURE__ */ t("p", { className: "mt-3 text-[14px] font-medium text-slate-500", children: "Nothing sent yet" }),
1009
- /* @__PURE__ */ t("p", { className: "mt-1 text-[12px] text-slate-400", children: Q ? 'No critical sends. Untick "Critical only" to see everything you sent.' : "Messages you send to stakeholders or colleagues appear here." })
1010
- ] }) : /* @__PURE__ */ t("div", { className: "divide-y divide-slate-100 overflow-hidden rounded-lg border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card", children: ye.map((e) => /* @__PURE__ */ a("div", { className: "px-4 py-3", "data-nvr-sent-row": !0, children: [
1009
+ /* @__PURE__ */ t("p", { className: "mt-1 text-[12px] text-slate-400", children: Y ? 'No critical sends. Untick "Critical only" to see everything you sent.' : "Messages you send to stakeholders or colleagues appear here." })
1010
+ ] }) : /* @__PURE__ */ t("div", { className: "divide-y divide-slate-100 overflow-hidden rounded-lg border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card", children: we.map((e) => /* @__PURE__ */ a("div", { className: "px-4 py-3", "data-nvr-sent-row": !0, children: [
1011
1011
  /* @__PURE__ */ a("div", { className: "flex items-baseline gap-2", children: [
1012
1012
  e.lane === "critical" && /* @__PURE__ */ t("span", { className: "shrink-0 rounded bg-red-500/10 px-1 text-[9.5px] font-bold uppercase tracking-wide text-red-600 dark:text-red-400", children: "Critical" }),
1013
1013
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-slate-900 dark:text-slate-100", children: e.subject.replace(/^critical:\s*/i, "") }),
1014
- /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: /* @__PURE__ */ t(Be, { value: e.created_at ?? /* @__PURE__ */ new Date() }) }),
1014
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: /* @__PURE__ */ t(Ke, { value: e.created_at ?? /* @__PURE__ */ new Date() }) }),
1015
1015
  /* @__PURE__ */ a(
1016
1016
  "span",
1017
1017
  {
@@ -1021,9 +1021,9 @@ function Aa({
1021
1021
  ),
1022
1022
  "data-nvr-sent-read-count": !0,
1023
1023
  children: [
1024
- e.read_count,
1024
+ $(e.read_count),
1025
1025
  " of ",
1026
- e.total,
1026
+ $(e.total),
1027
1027
  " read"
1028
1028
  ]
1029
1029
  }
@@ -1034,9 +1034,9 @@ function Aa({
1034
1034
  className: "shrink-0 rounded-full bg-sky-50 px-2 py-0.5 text-[10.5px] font-semibold tabular-nums text-sky-700 dark:bg-sky-400/10 dark:text-sky-300",
1035
1035
  "data-nvr-sent-ack-count": !0,
1036
1036
  children: [
1037
- e.ack_count ?? 0,
1037
+ $(e.ack_count ?? 0),
1038
1038
  " of ",
1039
- e.total,
1039
+ $(e.total),
1040
1040
  " acknowledged"
1041
1041
  ]
1042
1042
  }
@@ -1064,50 +1064,50 @@ function Aa({
1064
1064
  }
1065
1065
  ),
1066
1066
  n.name,
1067
- n.ack === "acked" && /* @__PURE__ */ t(he, { className: "h-3 w-3" })
1067
+ n.ack === "acked" && /* @__PURE__ */ t(be, { className: "h-3 w-3" })
1068
1068
  ]
1069
1069
  },
1070
1070
  n.id
1071
1071
  )) })
1072
1072
  ] }, e.key)) })
1073
- ] }) : ot ? /* @__PURE__ */ t("p", { className: "px-8 py-10 text-[13px] text-slate-400", children: "Loading…" }) : L.length === 0 && j.length === 0 && z.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-24 text-center", children: [
1074
- /* @__PURE__ */ t(Re, { className: "h-10 w-10 text-slate-200 dark:text-slate-700" }),
1073
+ ] }) : ct ? /* @__PURE__ */ t("p", { className: "px-8 py-10 text-[13px] text-slate-400", children: "Loading…" }) : R.length === 0 && U.length === 0 && F.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-24 text-center", children: [
1074
+ /* @__PURE__ */ t(Pe, { className: "h-10 w-10 text-slate-200 dark:text-slate-700" }),
1075
1075
  /* @__PURE__ */ t("p", { className: "mt-3 text-[14px] font-medium text-slate-500", children: "You're all caught up" }),
1076
1076
  /* @__PURE__ */ t("p", { className: "mt-1 text-[12px] text-slate-400", children: d === "inbox" ? "No unread notifications." : "No notifications here." })
1077
- ] }) : /* @__PURE__ */ t(ue, { children: /* @__PURE__ */ a(
1077
+ ] }) : /* @__PURE__ */ t(me, { children: /* @__PURE__ */ a(
1078
1078
  "div",
1079
1079
  {
1080
- ref: ht,
1080
+ ref: bt,
1081
1081
  className: "mx-4 my-6 divide-y sm:mx-8 divide-slate-100 overflow-hidden rounded-lg border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card",
1082
1082
  children: [
1083
- z.length > 0 && /* @__PURE__ */ a("div", { "data-notification-pinned": !0, children: [
1083
+ F.length > 0 && /* @__PURE__ */ a("div", { "data-notification-pinned": !0, children: [
1084
1084
  /* @__PURE__ */ a("div", { className: "bg-amber-50 px-4 py-1 text-[10.5px] font-semibold uppercase tracking-wide text-amber-700 dark:bg-amber-400/10 dark:text-amber-300", children: [
1085
1085
  "Needs your acknowledgement · ",
1086
- z.length
1086
+ F.length
1087
1087
  ] }),
1088
- z.map((e) => /* @__PURE__ */ t(xe, { children: ce(e) }, `pin:${e.id}`))
1088
+ F.map((e) => /* @__PURE__ */ t(fe, { children: ue(e) }, `pin:${e.id}`))
1089
1089
  ] }),
1090
- pt.map(wt),
1091
- De.map((e, n) => {
1090
+ ht.map(Nt),
1091
+ $e.map((e, n) => {
1092
1092
  const l = (A) => {
1093
1093
  if (!A) return "Older";
1094
1094
  const c = new Date(A), v = /* @__PURE__ */ new Date(), y = new Date(v.getFullYear(), v.getMonth(), v.getDate());
1095
1095
  return c >= y ? "Today" : c >= new Date(y.getTime() - 864e5) ? "Yesterday" : c >= new Date(y.getTime() - 5184e5) ? "This week" : "Older";
1096
- }, s = l(e.created_at), k = n > 0 ? l(De[n - 1].created_at) : null;
1097
- return /* @__PURE__ */ a(xe, { children: [
1096
+ }, s = l(e.created_at), k = n > 0 ? l($e[n - 1].created_at) : null;
1097
+ return /* @__PURE__ */ a(fe, { children: [
1098
1098
  s !== k ? /* @__PURE__ */ t("div", { className: "bg-slate-50/80 px-4 py-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400 dark:bg-muted/40", children: s }) : null,
1099
- /* @__PURE__ */ t("div", { "data-live-key": Ge(e), children: ce(e) })
1099
+ /* @__PURE__ */ t("div", { "data-live-key": He(e), children: ue(e) })
1100
1100
  ] }, e.id);
1101
1101
  })
1102
1102
  ]
1103
1103
  }
1104
1104
  ) }),
1105
- d !== "sent" && F > ke && /* @__PURE__ */ a("div", { className: "mx-8 mb-6 flex items-center justify-between", children: [
1105
+ d !== "sent" && q > ve && /* @__PURE__ */ a("div", { className: "mx-8 mb-6 flex items-center justify-between", children: [
1106
1106
  /* @__PURE__ */ a("p", { className: "text-[12px] text-slate-400", children: [
1107
1107
  "Page ",
1108
1108
  _,
1109
1109
  " of ",
1110
- le
1110
+ re
1111
1111
  ] }),
1112
1112
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1113
1113
  /* @__PURE__ */ a(
@@ -1115,10 +1115,10 @@ function Aa({
1115
1115
  {
1116
1116
  type: "button",
1117
1117
  disabled: _ <= 1,
1118
- onClick: () => q((e) => Math.max(1, e - 1)),
1118
+ onClick: () => M((e) => Math.max(1, e - 1)),
1119
1119
  className: "inline-flex h-7 items-center rounded-md border border-slate-200 px-2 text-[12px] disabled:opacity-40 dark:border-border",
1120
1120
  children: [
1121
- /* @__PURE__ */ t($t, { className: "mr-1 h-3.5 w-3.5" }),
1121
+ /* @__PURE__ */ t(zt, { className: "mr-1 h-3.5 w-3.5" }),
1122
1122
  "Previous"
1123
1123
  ]
1124
1124
  }
@@ -1127,12 +1127,12 @@ function Aa({
1127
1127
  "button",
1128
1128
  {
1129
1129
  type: "button",
1130
- disabled: _ >= le,
1131
- onClick: () => q((e) => Math.min(le, e + 1)),
1130
+ disabled: _ >= re,
1131
+ onClick: () => M((e) => Math.min(re, e + 1)),
1132
1132
  className: "inline-flex h-7 items-center rounded-md border border-slate-200 px-2 text-[12px] disabled:opacity-40 dark:border-border",
1133
1133
  children: [
1134
1134
  "Next",
1135
- /* @__PURE__ */ t(zt, { className: "ml-1 h-3.5 w-3.5" })
1135
+ /* @__PURE__ */ t(Ft, { className: "ml-1 h-3.5 w-3.5" })
1136
1136
  ]
1137
1137
  }
1138
1138
  )
@@ -1140,29 +1140,29 @@ function Aa({
1140
1140
  ] })
1141
1141
  ] }),
1142
1142
  /* @__PURE__ */ t(
1143
- Vt,
1143
+ Wt,
1144
1144
  {
1145
1145
  notificationId: (C == null ? void 0 : C.id) ?? null,
1146
1146
  title: (C == null ? void 0 : C.subject) ?? (C == null ? void 0 : C.title) ?? null,
1147
- onClose: () => Ce(null)
1147
+ onClose: () => Se(null)
1148
1148
  }
1149
1149
  )
1150
1150
  ] });
1151
1151
  }
1152
- function He(o) {
1152
+ function Qe(o) {
1153
1153
  const p = o.replace(/_/g, " ").trim();
1154
1154
  return p ? p.charAt(0).toUpperCase() + p.slice(1) : o;
1155
1155
  }
1156
- function ia({ text: o }) {
1156
+ function da({ text: o }) {
1157
1157
  const p = o.split(`
1158
1158
  `).map((g) => g.trim()).filter(Boolean);
1159
1159
  if (p.length <= 1)
1160
1160
  return /* @__PURE__ */ t("p", { className: "mt-0.5 line-clamp-3 whitespace-pre-line text-[12px] text-slate-500", children: o });
1161
1161
  const f = p.slice(0, 4);
1162
1162
  return /* @__PURE__ */ a("div", { className: "mt-0.5 space-y-0.5 text-[12px] text-slate-500", children: [
1163
- f.map((g, W) => (
1163
+ f.map((g, Z) => (
1164
1164
  // biome-ignore lint/suspicious/noArrayIndexKey: static lines of one message
1165
- /* @__PURE__ */ t("p", { className: "line-clamp-2", children: g }, W)
1165
+ /* @__PURE__ */ t("p", { className: "line-clamp-2", children: g }, Z)
1166
1166
  )),
1167
1167
  p.length > f.length && /* @__PURE__ */ a("p", { className: "text-[11.5px] text-slate-400", children: [
1168
1168
  "+",
@@ -1172,5 +1172,5 @@ function ia({ text: o }) {
1172
1172
  ] });
1173
1173
  }
1174
1174
  export {
1175
- Aa as NotificationCenterView
1175
+ Da as NotificationCenterView
1176
1176
  };