@nivaro/react 0.3.114 → 0.3.115

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 (281) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1717 -21
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4088 -3592
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +1 -0
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/PageRenderer.js +636 -599
  39. package/dist/shared/components/PresenceDot.js +21 -0
  40. package/dist/shared/components/ProfileView.js +656 -536
  41. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  42. package/dist/shared/components/RecentRecordsRail.js +51 -48
  43. package/dist/shared/components/RecordCompare.js +241 -150
  44. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  45. package/dist/shared/components/RecordGridEditor.js +350 -311
  46. package/dist/shared/components/RecordHoverCard.js +147 -0
  47. package/dist/shared/components/RecordPeekHost.js +111 -0
  48. package/dist/shared/components/RecordReadView.js +414 -412
  49. package/dist/shared/components/RelativeTime.js +16 -0
  50. package/dist/shared/components/ReportView.js +1396 -1304
  51. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  52. package/dist/shared/components/TabCountHost.js +10 -0
  53. package/dist/shared/components/TickerNumber.js +19 -18
  54. package/dist/shared/components/TipLayer.js +70 -58
  55. package/dist/shared/components/WidgetImageMenu.js +59 -0
  56. package/dist/shared/components/WidgetSlot.js +571 -524
  57. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  58. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  59. package/dist/shared/components/cbv/approval-changed.js +20 -0
  60. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  61. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  62. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  63. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  65. package/dist/shared/components/change-proposals/types.js +4 -0
  66. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  67. package/dist/shared/components/chat/Composer.js +276 -298
  68. package/dist/shared/components/chat/room-due.js +13 -0
  69. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  70. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  71. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  72. package/dist/shared/components/imports/ImportConsole.js +159 -155
  73. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  74. package/dist/shared/components/integrations/SendStatus.js +202 -0
  75. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  76. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  77. package/dist/shared/components/integrations/console/api.js +161 -117
  78. package/dist/shared/components/integrations/console/tone.js +15 -12
  79. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  80. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  81. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  82. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  83. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  84. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  85. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  86. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  87. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  88. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  89. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  90. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  91. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  92. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  93. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  94. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  95. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  96. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  97. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  98. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  99. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  100. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  101. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  102. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  103. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  104. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  105. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  106. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  107. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  108. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  109. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  110. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  111. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  112. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  113. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  114. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  115. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  116. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  117. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  118. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  119. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  120. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  121. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  122. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  123. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  124. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  125. package/dist/shared/components/item-edit/file-live.js +77 -0
  126. package/dist/shared/components/item-edit/file-processing.js +87 -0
  127. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  128. package/dist/shared/components/item-edit/live-related.js +23 -0
  129. package/dist/shared/components/item-edit/live-title.js +66 -0
  130. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  131. package/dist/shared/components/item-edit/removed-line.js +58 -0
  132. package/dist/shared/components/item-edit/render-stability.js +70 -59
  133. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  134. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  135. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  136. package/dist/shared/components/list/InlineEdit.js +504 -208
  137. package/dist/shared/components/list/ListViewers.js +81 -0
  138. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  139. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  140. package/dist/shared/components/merge/merge-values.js +110 -0
  141. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  142. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  143. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  144. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  145. package/dist/shared/components/notifications/bundles.js +21 -19
  146. package/dist/shared/components/notifications/resolved-line.js +25 -0
  147. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  148. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  149. package/dist/shared/components/panels/AlertBanners.js +132 -0
  150. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  151. package/dist/shared/components/panels/BranchLanes.js +82 -54
  152. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  153. package/dist/shared/components/panels/CommentImages.js +219 -0
  154. package/dist/shared/components/panels/CommentPanel.js +649 -530
  155. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  156. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  157. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  158. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  159. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  160. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  161. package/dist/shared/components/panels/SlaClock.js +130 -99
  162. package/dist/shared/components/panels/TaskPanel.js +308 -287
  163. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  164. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  165. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  166. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  167. package/dist/shared/components/profile/AgentNameField.js +141 -0
  168. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  169. package/dist/shared/components/profile/PersonAccess.js +398 -330
  170. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  171. package/dist/shared/components/profile/PersonProfile.js +81 -73
  172. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  173. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  174. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  175. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  176. package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
  177. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  178. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  179. package/dist/shared/components/support/ReportProblem.js +1 -0
  180. package/dist/shared/components/support/ScreenShare.js +554 -0
  181. package/dist/shared/components/support/SupportView.js +160 -129
  182. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  183. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  184. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  185. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  186. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  187. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  188. package/dist/shared/lib/activity-sentence.js +87 -75
  189. package/dist/shared/lib/agent-presence.js +46 -0
  190. package/dist/shared/lib/approval-progress.js +49 -0
  191. package/dist/shared/lib/attention-prefs.js +27 -0
  192. package/dist/shared/lib/cell-locks.js +56 -0
  193. package/dist/shared/lib/co-edit.js +166 -0
  194. package/dist/shared/lib/coedit-registry.js +44 -0
  195. package/dist/shared/lib/comment-awareness.js +124 -0
  196. package/dist/shared/lib/comment-images.js +45 -0
  197. package/dist/shared/lib/config-watch.js +94 -0
  198. package/dist/shared/lib/copy-rules.js +65 -0
  199. package/dist/shared/lib/count-step.js +30 -0
  200. package/dist/shared/lib/deadline-ticker.js +68 -0
  201. package/dist/shared/lib/derived-causes.js +115 -0
  202. package/dist/shared/lib/draft-store.js +114 -85
  203. package/dist/shared/lib/error-hints.js +1 -0
  204. package/dist/shared/lib/field-merge.js +126 -0
  205. package/dist/shared/lib/filter-sentence.js +10 -10
  206. package/dist/shared/lib/focus-mode.js +16 -12
  207. package/dist/shared/lib/grid-cursors.js +77 -0
  208. package/dist/shared/lib/grid-presence.js +182 -0
  209. package/dist/shared/lib/idle-reload.js +100 -73
  210. package/dist/shared/lib/in-step.js +45 -0
  211. package/dist/shared/lib/integration-chip.js +19 -18
  212. package/dist/shared/lib/line-locks.js +141 -0
  213. package/dist/shared/lib/line-split.js +41 -0
  214. package/dist/shared/lib/linked-changes.js +150 -0
  215. package/dist/shared/lib/list-return.js +231 -0
  216. package/dist/shared/lib/list-viewers.js +52 -0
  217. package/dist/shared/lib/live-announcer.js +86 -0
  218. package/dist/shared/lib/live-counts.js +85 -0
  219. package/dist/shared/lib/live-data-changed.js +108 -0
  220. package/dist/shared/lib/live-deltas.js +81 -0
  221. package/dist/shared/lib/live-findings.js +113 -0
  222. package/dist/shared/lib/live-groups.js +122 -0
  223. package/dist/shared/lib/live-link-labels.js +162 -0
  224. package/dist/shared/lib/live-list-flow.js +334 -0
  225. package/dist/shared/lib/live-list.js +143 -129
  226. package/dist/shared/lib/live-moves.js +51 -0
  227. package/dist/shared/lib/live-ops.js +26 -26
  228. package/dist/shared/lib/live-pickers.js +7 -0
  229. package/dist/shared/lib/live-preference.js +184 -0
  230. package/dist/shared/lib/live-queries.js +226 -181
  231. package/dist/shared/lib/live-screen.js +333 -0
  232. package/dist/shared/lib/live-search.js +108 -0
  233. package/dist/shared/lib/live-seen.js +35 -0
  234. package/dist/shared/lib/live-views.js +100 -0
  235. package/dist/shared/lib/live.js +159 -133
  236. package/dist/shared/lib/missed-updates.js +198 -0
  237. package/dist/shared/lib/newer-file.js +56 -0
  238. package/dist/shared/lib/notification-sound.js +42 -20
  239. package/dist/shared/lib/own-writes.js +59 -41
  240. package/dist/shared/lib/picker-badges.js +94 -0
  241. package/dist/shared/lib/presence-signals.js +131 -84
  242. package/dist/shared/lib/realtime.js +49 -24
  243. package/dist/shared/lib/record-gaps.js +85 -0
  244. package/dist/shared/lib/record-outbox.js +369 -222
  245. package/dist/shared/lib/record-peek.js +75 -0
  246. package/dist/shared/lib/record-tabs.js +92 -72
  247. package/dist/shared/lib/relative-ticker.js +42 -0
  248. package/dist/shared/lib/request-gate.js +119 -119
  249. package/dist/shared/lib/rollup-recalc.js +107 -0
  250. package/dist/shared/lib/room-gaps.js +40 -36
  251. package/dist/shared/lib/rum.js +137 -87
  252. package/dist/shared/lib/save-progress.js +20 -0
  253. package/dist/shared/lib/scheduled-countdown.js +67 -0
  254. package/dist/shared/lib/screen-refresh.js +160 -0
  255. package/dist/shared/lib/screen-share.js +234 -0
  256. package/dist/shared/lib/seen-since.js +74 -0
  257. package/dist/shared/lib/selection-watch.js +205 -0
  258. package/dist/shared/lib/send-status.js +132 -0
  259. package/dist/shared/lib/send-view.js +23 -0
  260. package/dist/shared/lib/socket-liveness.js +155 -0
  261. package/dist/shared/lib/socket-realtime.js +168 -140
  262. package/dist/shared/lib/state-census.js +53 -0
  263. package/dist/shared/lib/summary-mode.js +61 -39
  264. package/dist/shared/lib/tab-attention.js +143 -32
  265. package/dist/shared/lib/table-density.js +64 -0
  266. package/dist/shared/lib/track-travel.js +40 -0
  267. package/dist/shared/lib/unseen-changes.js +68 -0
  268. package/dist/shared/lib/upload-file.js +33 -0
  269. package/dist/shared/lib/upload-presence.js +127 -0
  270. package/dist/shared/lib/urgent-chime.js +65 -0
  271. package/dist/shared/lib/use-online-users.js +32 -11
  272. package/dist/shared/lib/user-sync.js +155 -39
  273. package/dist/shared/lib/waiting-count.js +44 -0
  274. package/dist/shared/lib/watch-desktop.js +83 -0
  275. package/dist/shared/lib/watch-list.js +447 -0
  276. package/dist/shared/lib/widget-image-render.js +64 -0
  277. package/dist/shared/lib/widget-image.js +111 -0
  278. package/dist/shared/lib/worker-socket.js +130 -104
  279. package/dist/shared/lib/write-to-screen.js +133 -0
  280. package/package.json +1 -1
  281. package/styles.css +49 -1
@@ -1,240 +1,274 @@
1
- import { jsxs as n, jsx as t, Fragment as at } from "react/jsx-runtime";
2
- import { useQueryClient as nt, useQuery as I, keepPreviousData as lt, useMutation as v } from "@tanstack/react-query";
3
- import { Archive as we, CheckCheck as rt, Search as dt, Check as de, AlarmClock as ie, ExternalLink as Ne, Bell as Ce, ShieldCheck as se, ChevronLeft as it, ChevronRight as st, History as ot, Trash2 as ct, ChevronDown as ut } from "lucide-react";
4
- import { useState as s, useEffect as Se, Fragment as oe } from "react";
5
- import { useNivaroClient as mt } from "../../context.js";
6
- import { get as R, post as y, patch as pt, del as bt } from "../../lib/commands.js";
7
- import { resolveNotificationTargetFor as Q, runNotificationTarget as ce } from "../../lib/notification-target.js";
8
- import { openInTabsMessage as ht, openInTabs as xt } from "../../lib/open-in-tabs.js";
9
- import { cn as m, formatRelative as G } from "../../lib/utils.js";
10
- import { hasSnapshotView as gt, offersChanges as ft } from "../NotificationBell.js";
11
- import { SimpleSelect as ue } from "../ui/SimpleSelect.js";
12
- import { AsItWasSheet as kt } from "./AsItWasSheet.js";
13
- import { bundleLocally as vt, laneTone as yt, bundleAsNotification as wt, bundleHeadline as Nt, categoryChipLabel as Ct } from "./bundles.js";
14
- import { DeliveryChips as St } from "./DeliveryChips.js";
15
- import { NotificationActions as _t } from "./NotificationActions.js";
16
- import { NotificationChangesList as Dt, NotificationDetailBits as zt } from "./NotificationDetailBits.js";
17
- const me = 25, At = [
1
+ import { jsxs as n, jsx as t, Fragment as qe } from "react/jsx-runtime";
2
+ import { useQueryClient as Nt, useQuery as H, keepPreviousData as Ct, useMutation as A } from "@tanstack/react-query";
3
+ import { Archive as Me, CheckCheck as St, Search as _t, Check as oe, AlarmClock as ce, ExternalLink as Te, Bell as Le, ShieldCheck as ue, ChevronUp as At, ChevronLeft as Dt, ChevronRight as zt, History as $t, Trash2 as Ft, ChevronDown as qt } from "lucide-react";
4
+ import { useState as c, useEffect as me, useRef as Mt, useCallback as Tt, Fragment as pe } from "react";
5
+ import { useNivaroClient as Lt } from "../../context.js";
6
+ import { get as Q, post as w, patch as Pt, del as Rt } from "../../lib/commands.js";
7
+ import { useTopInserts as Pe, slideIn as Ot } from "../../lib/live-screen.js";
8
+ import { resolveNotificationTargetFor as V, runNotificationTarget as be } from "../../lib/notification-target.js";
9
+ import { openInTabsMessage as It, openInTabs as jt } from "../../lib/open-in-tabs.js";
10
+ import { useRecordPeek as Kt, isNewTabClick as Bt, notificationPeekTarget as Re } from "../../lib/record-peek.js";
11
+ import { cn as b, formatRelative as Oe } from "../../lib/utils.js";
12
+ import { AgentBadge as Ut } from "../AgentBadge.js";
13
+ import { hasSnapshotView as Ht, offersChanges as Qt } from "../NotificationBell.js";
14
+ import { RelativeTime as Ie } from "../RelativeTime.js";
15
+ import { SimpleSelect as he } from "../ui/SimpleSelect.js";
16
+ import { AsItWasSheet as Gt } from "./AsItWasSheet.js";
17
+ import { bundleLocally as Yt, laneTone as Vt, bundleAsNotification as Wt, bundleHeadline as Zt, categoryChipLabel as Jt } from "./bundles.js";
18
+ import { DeliveryChips as Xt } from "./DeliveryChips.js";
19
+ import { NotificationActions as Et } from "./NotificationActions.js";
20
+ import { NotificationChangesList as ea, ResolvedLine as ta, NotificationDetailBits as aa } from "./NotificationDetailBits.js";
21
+ const xe = 25, na = [
18
22
  { key: "all", label: "All" },
19
23
  { key: "inbox", label: "Unread" },
20
24
  { key: "read", label: "Read" },
21
25
  { key: "snoozed", label: "Snoozed" },
22
26
  { key: "archived", label: "Archived" },
23
27
  { key: "sent", label: "Sent" }
24
- ], qt = [
28
+ ], la = [
25
29
  { key: "all", label: "Every lane" },
26
30
  { key: "critical", label: "Critical" },
27
31
  { key: "needs_you", label: "Needs you" },
28
32
  { key: "fyi", label: "FYI" }
29
33
  ];
30
- function _e() {
31
- const f = /* @__PURE__ */ new Date(), w = new Date(f.getTime() + 3600 * 1e3), N = new Date(f);
34
+ function je() {
35
+ const m = /* @__PURE__ */ new Date(), h = new Date(m.getTime() + 3600 * 1e3), N = new Date(m);
32
36
  N.setDate(N.getDate() + 1), N.setHours(8, 0, 0, 0);
33
- const C = new Date(f);
34
- return C.setDate(C.getDate() + ((8 - C.getDay()) % 7 || 7)), C.setHours(8, 0, 0, 0), [
35
- { label: "For 1 hour", until: w },
37
+ const D = new Date(m);
38
+ return D.setDate(D.getDate() + ((8 - D.getDay()) % 7 || 7)), D.setHours(8, 0, 0, 0), [
39
+ { label: "For 1 hour", until: h },
36
40
  { label: "Until tomorrow 8am", until: N },
37
- { label: "Until next week", until: C }
41
+ { label: "Until next week", until: D }
38
42
  ];
39
43
  }
40
- function Yt({
41
- routes: f,
42
- onNavigate: w,
44
+ const Ke = (m) => `b:${m.collection}:${m.item}`, Be = (m) => `n:${m.id}`;
45
+ function Sa({
46
+ routes: m,
47
+ onNavigate: h,
43
48
  app: N,
44
- mailLogUrl: C,
45
- subscriptionsPath: De,
46
- rulesPath: ze,
47
- changesId: pe,
49
+ mailLogUrl: D,
50
+ subscriptionsPath: He,
51
+ rulesPath: Qe,
52
+ changesId: fe,
48
53
  onNotice: r,
49
54
  onError: d,
50
- className: Ae
55
+ className: Ge
51
56
  }) {
52
- const u = mt(), Y = nt(), [V, qe] = s(() => {
53
- if (pe !== void 0) return pe;
57
+ const p = Lt(), W = Kt(), Z = Nt(), [J, Ye] = c(() => {
58
+ if (fe !== void 0) return fe;
54
59
  if (typeof window > "u") return null;
55
60
  const e = new URLSearchParams(window.location.search).get("changes"), a = Number(e);
56
61
  return e && Number.isInteger(a) && a > 0 ? a : null;
57
- }), [i, Fe] = s("all"), [S, $e] = s("all"), [j, Me] = s(!0), { data: be = [], isLoading: Te } = I({
58
- queryKey: ["notifications", "sent", j],
59
- queryFn: () => u.request(
60
- R("/notifications/sent", { lane: j ? "critical" : "all" })
62
+ }), [i, Ve] = c("all"), [C, We] = c("all"), [G, Ze] = c(!0), { data: ge = [], isLoading: Je } = H({
63
+ queryKey: ["notifications", "sent", G],
64
+ queryFn: () => p.request(
65
+ Q("/notifications/sent", { lane: G ? "critical" : "all" })
61
66
  ).then((e) => e.data ?? []),
62
67
  enabled: i === "sent",
63
68
  refetchInterval: i === "sent" ? 3e4 : !1
64
- }), [_, q] = s(1), [Le, Z] = s(null), [he, xe] = s(null), [J, Oe] = s(""), [B, Pe] = s(""), [T, Ie] = s(""), [U, Re] = s(!0), [je, Be] = s(() => /* @__PURE__ */ new Set()), [h, ge] = s(null), [F, K] = s(() => /* @__PURE__ */ new Set()), [W, L] = s(!1), [Ue, X] = s(!1), [fe, Ke] = s(!1), [ke, He] = s("30");
65
- Se(() => {
66
- K(/* @__PURE__ */ new Set()), L(!1), X(!1);
67
- }, [i, S, _, B, T]), Se(() => {
69
+ }), [S, F] = c(1), [Xe, X] = c(null), [ke, ve] = c(null), [E, Ee] = c(""), [I, et] = c(""), [q, tt] = c(""), [j, at] = c(!0), [nt, lt] = c(() => /* @__PURE__ */ new Set()), [v, ye] = c(null), [M, Y] = c(() => /* @__PURE__ */ new Set()), [ee, K] = c(!1), [rt, te] = c(!1), [we, dt] = c(!1), [Ne, it] = c("30");
70
+ me(() => {
71
+ Y(/* @__PURE__ */ new Set()), K(!1), te(!1);
72
+ }, [i, C, S, I, q]), me(() => {
68
73
  const e = setTimeout(() => {
69
- Pe(J.trim()), q(1);
74
+ et(E.trim()), F(1);
70
75
  }, 350);
71
76
  return () => clearTimeout(e);
72
- }, [J]);
73
- const { data: x } = I({
77
+ }, [E]);
78
+ const { data: y } = H({
74
79
  queryKey: ["notification-count"],
75
- queryFn: () => u.request(R("/notifications/unread-count"))
76
- }), { data: p, isLoading: Qe } = I({
80
+ queryFn: () => p.request(Q("/notifications/unread-count"))
81
+ }), { data: u, isLoading: st, isPlaceholderData: ot } = H({
77
82
  queryKey: [
78
83
  "notifications",
79
84
  "center",
80
85
  i,
86
+ C,
81
87
  S,
82
- _,
83
- B,
84
- T,
88
+ I,
89
+ q,
85
90
  N ?? null,
86
- U
91
+ j
87
92
  ],
88
- queryFn: () => u.request(
89
- R("/notifications", {
90
- page: _,
91
- limit: me,
93
+ queryFn: () => p.request(
94
+ Q("/notifications", {
95
+ page: S,
96
+ limit: xe,
92
97
  status: i === "snoozed" || i === "sent" ? "all" : i,
93
98
  snoozed: i === "snoozed" ? "true" : void 0,
94
- lane: S === "all" ? void 0 : S,
95
- search: B || void 0,
96
- collection: T || void 0,
99
+ lane: C === "all" ? void 0 : C,
100
+ search: I || void 0,
101
+ collection: q || void 0,
97
102
  app: N,
98
- bundle: U ? "record" : void 0
103
+ bundle: j ? "record" : void 0
99
104
  })
100
105
  ).then((e) => {
101
- if (!U || e.bundles) return e;
102
- const a = vt(e.data ?? []);
106
+ if (!j || e.bundles) return e;
107
+ const a = Yt(e.data ?? []);
103
108
  return { ...e, data: a.rows, bundles: a.bundles };
104
109
  }),
105
- placeholderData: lt,
110
+ placeholderData: Ct,
106
111
  enabled: i !== "sent"
107
- }), { data: Ge = [] } = I({
112
+ }), { data: ct = [] } = H({
108
113
  queryKey: ["notifications", "center", "collections"],
109
- queryFn: () => u.request(
110
- R("/collections")
114
+ queryFn: () => p.request(
115
+ Q("/collections")
111
116
  ).then((e) => {
112
117
  const a = Array.isArray(e) ? e : e.data ?? [];
113
118
  return [...new Set(a.map((l) => l.collection))].sort();
114
119
  }),
115
120
  staleTime: 3e5
116
- }), D = i === "archived" || _ > 1 ? [] : (p == null ? void 0 : p.pinned) ?? [], Ye = new Set(D.map((e) => e.id)), O = ((p == null ? void 0 : p.data) ?? []).filter((e) => !Ye.has(e.id)), H = (p == null ? void 0 : p.bundles) ?? [], z = (p == null ? void 0 : p.total) ?? 0, E = Math.max(1, Math.ceil(z / me)), g = () => {
117
- Y.invalidateQueries({ queryKey: ["notifications"] }), Y.invalidateQueries({ queryKey: ["notification-count"] });
118
- }, Ve = v({
119
- mutationFn: (e) => u.request(y("/notifications/mark-read", { ids: e })),
120
- onSuccess: g,
121
+ }), z = i === "archived" || S > 1 ? [] : (u == null ? void 0 : u.pinned) ?? [], ut = new Set(z.map((e) => e.id)), T = ((u == null ? void 0 : u.data) ?? []).filter((e) => !ut.has(e.id)), B = (u == null ? void 0 : u.bundles) ?? [], $ = (u == null ? void 0 : u.total) ?? 0, ae = Math.max(1, Math.ceil($ / xe)), Ce = i !== "sent" && S === 1 && !!u && !ot, Se = [i, C, I, q, N ?? "", j].join("|"), L = Pe(u ? B : void 0, Ke, {
122
+ enabled: Ce,
123
+ resetKey: Se
124
+ }), P = Pe(u ? T : void 0, Be, {
125
+ enabled: Ce,
126
+ resetKey: Se
127
+ }), mt = u ? L.rows : B, _e = u ? P.rows : T, ne = L.held + P.held, Ae = Mt(null), De = L.rootRef, ze = P.rootRef, pt = Tt(
128
+ (e) => {
129
+ Ae.current = e, De(e), ze(e);
130
+ },
131
+ [De, ze]
132
+ );
133
+ me(() => {
134
+ Ot(Ae.current, [...L.arrived, ...P.arrived]);
135
+ }, [L.arrived, P.arrived]);
136
+ const bt = () => {
137
+ L.reveal(), P.reveal();
138
+ }, k = () => {
139
+ Z.invalidateQueries({ queryKey: ["notifications"] }), Z.invalidateQueries({ queryKey: ["notification-count"] });
140
+ }, ht = A({
141
+ mutationFn: (e) => p.request(w("/notifications/mark-read", { ids: e })),
142
+ onSuccess: k,
121
143
  onError: () => d == null ? void 0 : d("Failed to mark the bundle read")
122
- }), ee = v({
123
- mutationFn: () => u.request(y("/notifications/mark-all-read")),
144
+ }), le = A({
145
+ mutationFn: () => p.request(w("/notifications/mark-all-read")),
124
146
  onSuccess: () => {
125
- g(), r == null || r("All notifications marked as read");
147
+ k(), r == null || r("All notifications marked as read");
126
148
  },
127
149
  onError: () => d == null ? void 0 : d("Failed to mark all read")
128
- }), P = v({
150
+ }), U = A({
129
151
  mutationFn: ({
130
152
  id: e,
131
153
  until: a,
132
154
  untilChange: l
133
- }) => u.request(
134
- y(
155
+ }) => p.request(
156
+ w(
135
157
  `/notifications/${e}/snooze`,
136
158
  l ? { until_change: !0 } : { until: a ? a.toISOString() : null }
137
159
  )
138
160
  ),
139
161
  onSuccess: (e, a) => {
140
- g(), xe(null), r == null || r(
162
+ k(), ve(null), r == null || r(
141
163
  a.untilChange ? "Snoozed — it comes back when someone changes the record" : a.until ? "Snoozed — it will return unread" : "Snooze cleared"
142
164
  );
143
165
  },
144
166
  onError: () => d == null ? void 0 : d("Failed to snooze")
145
- }), ve = v({
146
- mutationFn: (e) => u.request(y(`/notifications/${e}/acknowledge`)),
167
+ }), $e = A({
168
+ mutationFn: (e) => p.request(w(`/notifications/${e}/acknowledge`)),
147
169
  onSuccess: () => {
148
- g(), r == null || r("Acknowledged");
170
+ k(), r == null || r("Acknowledged");
149
171
  },
150
172
  onError: () => d == null ? void 0 : d("Failed to acknowledge")
151
- }), Ze = () => ({
173
+ }), xt = () => ({
152
174
  status: i === "snoozed" || i === "sent" ? "all" : i,
153
175
  snoozed: i === "snoozed" ? "true" : void 0,
154
- lane: S === "all" ? void 0 : S,
155
- search: B || void 0,
156
- collection: T || void 0
157
- }), $ = v({
158
- mutationFn: (e) => u.request(
159
- y("/notifications/bulk-action", {
176
+ lane: C === "all" ? void 0 : C,
177
+ search: I || void 0,
178
+ collection: q || void 0
179
+ }), R = A({
180
+ mutationFn: (e) => p.request(
181
+ w("/notifications/bulk-action", {
160
182
  action: e.action,
161
183
  until: e.until ? e.until.toISOString() : void 0,
162
- ...W ? { filter: Ze() } : { ids: [...F] }
184
+ ...ee ? { filter: xt() } : { ids: [...M] }
163
185
  })
164
186
  ),
165
187
  onSuccess: (e, a) => {
166
- var o;
167
- g(), K(/* @__PURE__ */ new Set()), L(!1), X(!1);
168
- const l = ((o = e.data) == null ? void 0 : o.updated) ?? 0;
188
+ var s;
189
+ k(), Y(/* @__PURE__ */ new Set()), K(!1), te(!1);
190
+ const l = ((s = e.data) == null ? void 0 : s.updated) ?? 0;
169
191
  r == null || r(
170
192
  `${l} notification${l === 1 ? "" : "s"} ${a.action === "read" ? "marked read" : a.action === "archive" ? "archived" : "snoozed"}`
171
193
  );
172
194
  },
173
195
  onError: () => d == null ? void 0 : d("That bulk action failed")
174
- }), te = v({
175
- mutationFn: (e) => u.request(y("/notifications/archive-read", { days: e })),
196
+ }), re = A({
197
+ mutationFn: (e) => p.request(w("/notifications/archive-read", { days: e })),
176
198
  onSuccess: (e) => {
177
199
  var a;
178
- g(), r == null || r(`${((a = e.data) == null ? void 0 : a.updated) ?? 0} archived — find them under Archived`);
200
+ k(), r == null || r(`${((a = e.data) == null ? void 0 : a.updated) ?? 0} archived — find them under Archived`);
179
201
  },
180
202
  onError: () => d == null ? void 0 : d("Clean-up failed")
181
- }), { data: ae } = I({
203
+ }), { data: de } = H({
182
204
  queryKey: ["nvr-profile-prefs"],
183
- queryFn: () => u.request(R("/users/me")).then((e) => {
205
+ queryFn: () => p.request(Q("/users/me")).then((e) => {
184
206
  var a;
185
207
  return ((a = e.data) == null ? void 0 : a.preferences) ?? {};
186
208
  }),
187
- enabled: fe
188
- }), Je = v({
189
- mutationFn: (e) => u.request(pt("/users/me/preferences", { notification_cleanup_days: e })),
209
+ enabled: we
210
+ }), ft = A({
211
+ mutationFn: (e) => p.request(Pt("/users/me/preferences", { notification_cleanup_days: e })),
190
212
  onSuccess: () => {
191
- Y.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }), r == null || r("Automatic clean-up saved");
213
+ Z.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }), r == null || r("Automatic clean-up saved");
192
214
  },
193
215
  onError: () => d == null ? void 0 : d("Could not save the clean-up setting")
194
- }), ne = v({
195
- mutationFn: (e) => u.request(bt(`/notifications/${e}`)),
216
+ }), ie = A({
217
+ mutationFn: (e) => p.request(Rt(`/notifications/${e}`)),
196
218
  onSuccess: () => {
197
- g(), Z(null), r == null || r("Notification deleted");
219
+ k(), X(null), r == null || r("Notification deleted");
198
220
  },
199
221
  onError: () => d == null ? void 0 : d("Failed to delete notification")
200
- }), We = async (e) => {
201
- await u.request(y(`/notifications/${e}/read`)).catch(() => {
202
- }), g();
203
- }, Xe = async (e) => {
204
- e.read || (await u.request(y(`/notifications/${e.id}/read`)).catch(() => {
205
- }), g()), ce(Q(e, f), w);
206
- }, Ee = (e) => {
207
- L(!1), K((a) => {
222
+ }), gt = async (e) => {
223
+ await p.request(w(`/notifications/${e}/read`)).catch(() => {
224
+ }), k();
225
+ }, kt = async (e, a) => {
226
+ const l = W && !Bt(a) ? Re(e) : null;
227
+ if (l && W) {
228
+ const s = T.map((x) => Re(x)).filter((x) => !!x);
229
+ W.open(l, { list: s }), e.read || p.request(w(`/notifications/${e.id}/read`)).catch(() => {
230
+ }).then(() => k());
231
+ return;
232
+ }
233
+ e.read || (await p.request(w(`/notifications/${e.id}/read`)).catch(() => {
234
+ }), k()), be(V(e, m), h);
235
+ }, vt = (e) => {
236
+ K(!1), Y((a) => {
208
237
  const l = new Set(a);
209
238
  return l.has(e) ? l.delete(e) : l.add(e), l;
210
239
  });
211
- }, le = (e, a = !1) => {
212
- var M;
213
- const l = !e.read, o = Q(e, f), A = /* @__PURE__ */ n(at, { children: [
214
- /* @__PURE__ */ n("div", { className: "flex items-baseline gap-2", children: [
240
+ }, se = (e, a = !1) => {
241
+ var O, _, o, f;
242
+ const l = !e.read, s = V(e, m), x = /* @__PURE__ */ n(qe, { children: [
243
+ /* @__PURE__ */ n("div", { className: "flex flex-wrap items-baseline gap-x-2 sm:flex-nowrap", children: [
215
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" }),
216
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" }),
217
246
  /* @__PURE__ */ t(
218
247
  "span",
219
248
  {
220
- className: m(
221
- "truncate text-[13px]",
249
+ className: b(
250
+ // Wraps on a phone so the sender and what changed stay readable; one line on wider screens.
251
+ "min-w-0 break-words text-[13px] sm:truncate",
222
252
  l ? "font-medium text-slate-900 dark:text-slate-100" : "font-normal text-slate-600 dark:text-slate-400"
223
253
  ),
224
254
  children: e.subject ?? e.title ?? "—"
225
255
  }
226
256
  ),
227
- /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: G(e.created_at ?? /* @__PURE__ */ new Date()) })
257
+ /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center gap-1.5 text-[10.5px] text-slate-400", children: [
258
+ /* @__PURE__ */ t(Ut, { label: (O = e.detail) == null ? void 0 : O.via_agent }),
259
+ /* @__PURE__ */ t(Ie, { value: e.created_at ?? /* @__PURE__ */ new Date() })
260
+ ] })
228
261
  ] }),
229
- e.message && /* @__PURE__ */ t("p", { className: "mt-0.5 line-clamp-2 text-[12px] text-slate-500", children: e.message.replace(/<[^>]+>/g, "") })
262
+ e.message && /* @__PURE__ */ t("p", { className: "mt-0.5 line-clamp-3 whitespace-pre-line text-[12px] text-slate-500", children: e.message.replace(/<[^>]+>/g, "") }),
263
+ /* @__PURE__ */ t(ta, { resolved: (_ = e.detail) == null ? void 0 : _.resolved, className: "text-[11.5px]" })
230
264
  ] });
231
265
  return /* @__PURE__ */ n(
232
266
  "div",
233
267
  {
234
- className: m(
268
+ className: b(
235
269
  "group relative flex items-start gap-3 py-3",
236
270
  // Only a row that opens something lights up under the pointer.
237
- o && "transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/40",
271
+ s && "transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/40",
238
272
  a ? "bg-slate-50/50 pl-8 pr-4 dark:bg-muted/30" : "px-4"
239
273
  ),
240
274
  "data-notification-row": e.id,
@@ -244,8 +278,8 @@ function Yt({
244
278
  "input",
245
279
  {
246
280
  type: "checkbox",
247
- checked: F.has(e.id),
248
- onChange: () => Ee(e.id),
281
+ checked: M.has(e.id),
282
+ onChange: () => vt(e.id),
249
283
  "aria-label": "Select notification",
250
284
  "data-notification-select": e.id,
251
285
  className: "mt-1.5 h-3.5 w-3.5 shrink-0"
@@ -254,106 +288,110 @@ function Yt({
254
288
  /* @__PURE__ */ t(
255
289
  "span",
256
290
  {
257
- className: m(
291
+ className: b(
258
292
  "mt-2 h-2 w-2 shrink-0 rounded-full",
259
293
  l ? e.lane === "critical" ? "bg-red-500" : "bg-nvr-cyan" : "bg-transparent"
260
294
  )
261
295
  }
262
296
  ),
263
297
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
264
- o ? /* @__PURE__ */ t(
298
+ s ? /* @__PURE__ */ t(
265
299
  "button",
266
300
  {
267
301
  type: "button",
268
- onClick: () => void Xe(e),
302
+ onClick: (g) => void kt(e, g),
269
303
  className: "block w-full text-left",
270
- children: A
304
+ children: x
271
305
  }
272
306
  ) : (
273
307
  // Nowhere to open: plain text, read or not. As a button its click
274
308
  // only marked the row read, so the row dimmed (or left the Unread
275
309
  // list) and opened nothing. Mark read is its own control below.
276
- /* @__PURE__ */ t("div", { "data-notification-plain": !0, children: A })
310
+ /* @__PURE__ */ t("div", { "data-notification-plain": !0, children: x })
277
311
  ),
278
312
  /* @__PURE__ */ n("div", { className: "mt-1 flex flex-wrap items-center gap-2", children: [
279
313
  e.sender_name && /* @__PURE__ */ n("span", { className: "text-[11px] text-slate-400", children: [
280
314
  "From ",
281
315
  e.sender_name
282
316
  ] }),
283
- o && /* @__PURE__ */ t(
317
+ s && /* @__PURE__ */ t(
284
318
  "button",
285
319
  {
286
320
  type: "button",
287
- onClick: () => ce(o, w),
321
+ onClick: () => be(s, h),
322
+ ...e.collection && !e.item && s.type !== "chat" && s.type !== "external" ? {
323
+ "aria-label": `See what changed in ${Ue(e.collection)}`,
324
+ "data-tip": `See what changed in ${Ue(e.collection)}`
325
+ } : {},
288
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",
289
- children: o.type === "chat" ? "Open chat" : o.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.collection}${e.item ? ` #${e.item}` : ""}` : "Open"
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 ? `${e.collection} #${e.item}` : "Open"
290
328
  }
291
329
  ),
292
- l && !o && /* @__PURE__ */ n(
330
+ l && !s && /* @__PURE__ */ n(
293
331
  "button",
294
332
  {
295
333
  type: "button",
296
334
  "data-notification-mark-read": e.id,
297
- onClick: () => void We(e.id),
335
+ onClick: () => void gt(e.id),
298
336
  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",
299
337
  children: [
300
- /* @__PURE__ */ t(de, { className: "h-3 w-3" }),
338
+ /* @__PURE__ */ t(oe, { className: "h-3 w-3" }),
301
339
  "Mark read"
302
340
  ]
303
341
  }
304
342
  ),
305
- /* @__PURE__ */ t(St, { delivery: e.delivery, mailLogUrl: C, onNavigate: w }),
306
- gt(e) && /* @__PURE__ */ n(
343
+ /* @__PURE__ */ t(Xt, { delivery: e.delivery, mailLogUrl: D, onNavigate: h }),
344
+ Ht(e) && /* @__PURE__ */ n(
307
345
  "button",
308
346
  {
309
347
  type: "button",
310
348
  "data-notification-as-it-was": e.id,
311
349
  "data-tip": "The record as it was when you were told",
312
- onClick: () => ge(e),
350
+ onClick: () => ye(e),
313
351
  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",
314
352
  children: [
315
- /* @__PURE__ */ t(ot, { className: "h-3 w-3" }),
353
+ /* @__PURE__ */ t($t, { className: "h-3 w-3" }),
316
354
  "as it was"
317
355
  ]
318
356
  }
319
357
  )
320
358
  ] }),
321
359
  /* @__PURE__ */ t(
322
- zt,
360
+ aa,
323
361
  {
324
362
  detail: e.detail,
325
363
  why: e.why,
326
364
  delivery: e.delivery,
327
365
  notificationId: e.id,
328
- recordChanges: ft(e),
329
- subscriptionsPath: De,
330
- rulesPath: ze,
331
- onNavigate: w,
366
+ recordChanges: Qt(e),
367
+ subscriptionsPath: He,
368
+ rulesPath: Qe,
369
+ onNavigate: h,
332
370
  className: "mt-1"
333
371
  }
334
372
  ),
335
- ((M = e.ack) == null ? void 0 : M.required) && /* @__PURE__ */ t("div", { className: "mt-1.5", "data-notification-ack": e.ack.at ? "acked" : "pending", children: e.ack.at ? /* @__PURE__ */ n("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: [
336
- /* @__PURE__ */ t(se, { className: "h-3 w-3" }),
373
+ ((o = e.ack) == null ? void 0 : o.required) && /* @__PURE__ */ t("div", { className: "mt-1.5", "data-notification-ack": e.ack.at ? "acked" : "pending", children: e.ack.at ? /* @__PURE__ */ n("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: [
374
+ /* @__PURE__ */ t(ue, { className: "h-3 w-3" }),
337
375
  "Acknowledged ",
338
- G(e.ack.at)
376
+ Oe(e.ack.at)
339
377
  ] }) : /* @__PURE__ */ n(
340
378
  "button",
341
379
  {
342
380
  type: "button",
343
- disabled: ve.isPending,
344
- onClick: () => ve.mutate(e.id),
381
+ disabled: $e.isPending,
382
+ onClick: () => $e.mutate(e.id),
345
383
  "data-notification-acknowledge": e.id,
346
384
  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",
347
385
  children: [
348
- /* @__PURE__ */ t(se, { className: "h-3.5 w-3.5" }),
386
+ /* @__PURE__ */ t(ue, { className: "h-3.5 w-3.5" }),
349
387
  "Acknowledge"
350
388
  ]
351
389
  }
352
390
  ) }),
353
- e.actions && e.actions.length > 0 && /* @__PURE__ */ t(
354
- _t,
391
+ e.actions && e.actions.length > 0 && !((f = e.detail) != null && f.resolved) && /* @__PURE__ */ t(
392
+ Et,
355
393
  {
356
- actions: l ? e.actions : e.actions.filter((b) => !!b.input),
394
+ actions: l ? e.actions : e.actions.filter((g) => !!g.input),
357
395
  notificationId: e.id,
358
396
  size: "sm",
359
397
  onError: d,
@@ -367,11 +405,11 @@ function Yt({
367
405
  "button",
368
406
  {
369
407
  type: "button",
370
- onClick: () => P.mutate({ id: e.id, until: null }),
408
+ onClick: () => U.mutate({ id: e.id, until: null }),
371
409
  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",
372
410
  "data-tip": "Click to wake now",
373
411
  children: [
374
- /* @__PURE__ */ t(ie, { className: "h-3 w-3" }),
412
+ /* @__PURE__ */ t(ce, { className: "h-3 w-3" }),
375
413
  e.snooze_until_change ? "Until it changes" : `Until ${new Date(e.snoozed_until).toLocaleString([], {
376
414
  month: "short",
377
415
  day: "numeric",
@@ -384,30 +422,30 @@ function Yt({
384
422
  "button",
385
423
  {
386
424
  type: "button",
387
- onClick: () => xe(he === e.id ? null : e.id),
425
+ onClick: () => ve(ke === e.id ? null : e.id),
388
426
  className: "rounded p-1.5 text-slate-300 opacity-0 transition-all hover:bg-amber-50 hover:text-amber-500 group-hover:opacity-100 dark:hover:bg-amber-400/10",
389
427
  "aria-label": "Snooze notification",
390
- children: /* @__PURE__ */ t(ie, { className: "h-3.5 w-3.5" })
428
+ children: /* @__PURE__ */ t(ce, { className: "h-3.5 w-3.5" })
391
429
  }
392
430
  ),
393
- he === e.id && /* @__PURE__ */ n("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: [
394
- _e().map((b) => /* @__PURE__ */ t(
431
+ ke === e.id && /* @__PURE__ */ n("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: [
432
+ je().map((g) => /* @__PURE__ */ t(
395
433
  "button",
396
434
  {
397
435
  type: "button",
398
- disabled: P.isPending,
399
- onClick: () => P.mutate({ id: e.id, until: b.until }),
436
+ disabled: U.isPending,
437
+ onClick: () => U.mutate({ id: e.id, until: g.until }),
400
438
  className: "block w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-muted dark:text-foreground",
401
- children: b.label
439
+ children: g.label
402
440
  },
403
- b.label
441
+ g.label
404
442
  )),
405
443
  e.collection && e.item != null && /* @__PURE__ */ t(
406
444
  "button",
407
445
  {
408
446
  type: "button",
409
- disabled: P.isPending,
410
- onClick: () => P.mutate({ id: e.id, until: null, untilChange: !0 }),
447
+ disabled: U.isPending,
448
+ onClick: () => U.mutate({ id: e.id, until: null, untilChange: !0 }),
411
449
  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",
412
450
  "data-snooze-until-change": !0,
413
451
  children: "Until the record changes"
@@ -415,12 +453,12 @@ function Yt({
415
453
  )
416
454
  ] })
417
455
  ] }),
418
- /* @__PURE__ */ t("div", { className: "shrink-0", children: Le === e.id ? /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
456
+ /* @__PURE__ */ t("div", { className: "shrink-0", children: Xe === e.id ? /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
419
457
  /* @__PURE__ */ t(
420
458
  "button",
421
459
  {
422
460
  type: "button",
423
- onClick: () => Z(null),
461
+ onClick: () => X(null),
424
462
  className: "h-6 rounded-md border border-slate-200 px-2 text-[11px] dark:border-border",
425
463
  children: "Cancel"
426
464
  }
@@ -429,33 +467,34 @@ function Yt({
429
467
  "button",
430
468
  {
431
469
  type: "button",
432
- disabled: ne.isPending,
433
- onClick: () => ne.mutate(e.id),
470
+ disabled: ie.isPending,
471
+ onClick: () => ie.mutate(e.id),
434
472
  className: "h-6 rounded-md bg-red-500 px-2 text-[11px] text-white hover:bg-red-600",
435
- children: ne.isPending ? "Deleting…" : "Delete"
473
+ children: ie.isPending ? "Deleting…" : "Delete"
436
474
  }
437
475
  )
438
476
  ] }) : /* @__PURE__ */ t(
439
477
  "button",
440
478
  {
441
479
  type: "button",
442
- onClick: () => Z(e.id),
480
+ onClick: () => X(e.id),
443
481
  className: "rounded p-1.5 text-slate-300 opacity-0 transition-all hover:bg-red-50 hover:text-red-400 group-hover:opacity-100",
444
482
  "aria-label": "Delete notification",
445
- children: /* @__PURE__ */ t(ct, { className: "h-3.5 w-3.5" })
483
+ children: /* @__PURE__ */ t(Ft, { className: "h-3.5 w-3.5" })
446
484
  }
447
485
  ) })
448
486
  ]
449
487
  }
450
488
  );
451
- }, et = (e) => {
452
- const a = `${e.collection}:${e.item}`, l = je.has(a), o = yt(e.lane), A = e.deleted ? null : Q(wt(e), f), M = e.rows.filter((c) => !c.read).map((c) => c.id), b = () => Be((c) => {
453
- const k = new Set(c);
454
- return k.has(a) ? k.delete(a) : k.add(a), k;
489
+ }, yt = (e) => {
490
+ const a = `${e.collection}:${e.item}`, l = nt.has(a), s = Vt(e.lane), x = e.deleted ? null : V(Wt(e), m), O = e.rows.filter((o) => !o.read).map((o) => o.id), _ = () => lt((o) => {
491
+ const f = new Set(o);
492
+ return f.has(a) ? f.delete(a) : f.add(a), f;
455
493
  });
456
494
  return /* @__PURE__ */ n(
457
495
  "div",
458
496
  {
497
+ "data-live-key": Ke(e),
459
498
  "data-notification-bundle": a,
460
499
  "data-notification-bundle-count": e.count,
461
500
  "data-notification-bundle-lane": e.lane,
@@ -469,12 +508,12 @@ function Yt({
469
508
  "aria-expanded": l,
470
509
  "aria-label": l ? "Collapse" : "Expand",
471
510
  "data-notification-bundle-expand": a,
472
- onClick: b,
511
+ onClick: _,
473
512
  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",
474
513
  children: /* @__PURE__ */ t(
475
- ut,
514
+ qt,
476
515
  {
477
- className: m("h-3.5 w-3.5 transition-transform", !l && "-rotate-90")
516
+ className: b("h-3.5 w-3.5 transition-transform", !l && "-rotate-90")
478
517
  }
479
518
  )
480
519
  }
@@ -482,20 +521,20 @@ function Yt({
482
521
  /* @__PURE__ */ t(
483
522
  "span",
484
523
  {
485
- className: m(
524
+ className: b(
486
525
  "mt-2 h-2 w-2 shrink-0 rounded-full",
487
- e.unread > 0 ? o.dot : "bg-transparent"
526
+ e.unread > 0 ? s.dot : "bg-transparent"
488
527
  )
489
528
  }
490
529
  ),
491
530
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
492
- /* @__PURE__ */ t("button", { type: "button", onClick: b, className: "block w-full text-left", children: /* @__PURE__ */ n("div", { className: "flex items-baseline gap-2", children: [
531
+ /* @__PURE__ */ t("button", { type: "button", onClick: _, className: "block w-full text-left", children: /* @__PURE__ */ n("div", { className: "flex items-baseline gap-2", children: [
493
532
  e.lane === "critical" && e.unread > 0 && /* @__PURE__ */ t(
494
533
  "span",
495
534
  {
496
- className: m(
535
+ className: b(
497
536
  "shrink-0 rounded px-1 text-[9.5px] font-bold uppercase tracking-wide",
498
- o.chip
537
+ s.chip
499
538
  ),
500
539
  children: "Critical"
501
540
  }
@@ -503,14 +542,14 @@ function Yt({
503
542
  /* @__PURE__ */ t(
504
543
  "span",
505
544
  {
506
- className: m(
545
+ className: b(
507
546
  "truncate text-[13px]",
508
- e.unread > 0 ? m("font-medium", o.text) : "font-normal text-slate-600 dark:text-slate-400"
547
+ e.unread > 0 ? b("font-medium", s.text) : "font-normal text-slate-600 dark:text-slate-400"
509
548
  ),
510
- children: Nt(e)
549
+ children: Zt(e)
511
550
  }
512
551
  ),
513
- /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: e.newest ? G(e.newest) : "" })
552
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: e.newest ? Oe(e.newest) : "" })
514
553
  ] }) }),
515
554
  /* @__PURE__ */ n("div", { className: "mt-1 flex flex-wrap items-center gap-1.5", children: [
516
555
  e.collection_label && /* @__PURE__ */ t(
@@ -529,23 +568,23 @@ function Yt({
529
568
  children: "deleted"
530
569
  }
531
570
  ),
532
- e.categories.map((c) => /* @__PURE__ */ t(
571
+ e.categories.map((o) => /* @__PURE__ */ t(
533
572
  "span",
534
573
  {
535
574
  className: "rounded bg-slate-100 px-1.5 py-px text-[10px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
536
- "data-notification-bundle-category": c,
537
- children: Ct(c)
575
+ "data-notification-bundle-category": o,
576
+ children: Jt(o)
538
577
  },
539
- c
578
+ o
540
579
  )),
541
- A && /* @__PURE__ */ n(
580
+ x && /* @__PURE__ */ n(
542
581
  "button",
543
582
  {
544
583
  type: "button",
545
- onClick: () => ce(A, w),
584
+ onClick: () => be(x, h),
546
585
  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",
547
586
  children: [
548
- /* @__PURE__ */ t(Ne, { className: "h-3 w-3" }),
587
+ /* @__PURE__ */ t(Te, { className: "h-3 w-3" }),
549
588
  "Open ",
550
589
  e.label
551
590
  ]
@@ -557,15 +596,15 @@ function Yt({
557
596
  ] })
558
597
  ] })
559
598
  ] }),
560
- M.length > 0 && /* @__PURE__ */ n(
599
+ O.length > 0 && /* @__PURE__ */ n(
561
600
  "button",
562
601
  {
563
602
  type: "button",
564
603
  "data-notification-bundle-read": a,
565
- onClick: () => Ve.mutate(M),
604
+ onClick: () => ht.mutate(O),
566
605
  className: "inline-flex items-center gap-1 rounded-md border border-slate-200 px-2 py-1 text-[11px] font-medium text-slate-600 hover:bg-slate-50 dark:border-border dark:text-slate-300 dark:hover:bg-muted",
567
606
  children: [
568
- /* @__PURE__ */ t(de, { className: "h-3 w-3" }),
607
+ /* @__PURE__ */ t(oe, { className: "h-3 w-3" }),
569
608
  "Mark read"
570
609
  ]
571
610
  }
@@ -576,39 +615,39 @@ function Yt({
576
615
  {
577
616
  className: "divide-y divide-slate-100 border-t border-slate-100 dark:divide-border dark:border-border",
578
617
  "data-notification-bundle-rows": a,
579
- children: e.rows.map((c) => /* @__PURE__ */ t(oe, { children: le(c, !0) }, c.id))
618
+ children: e.rows.map((o) => /* @__PURE__ */ t(pe, { children: se(o, !0) }, o.id))
580
619
  }
581
620
  )
582
621
  ]
583
622
  },
584
623
  `bundle:${a}`
585
624
  );
586
- }, ye = D.length + O.length + H.reduce((e, a) => e + a.rows.length, 0), tt = (e) => {
625
+ }, Fe = z.length + T.length + B.reduce((e, a) => e + a.rows.length, 0), wt = (e) => {
587
626
  var a;
588
- return e === "all" ? null : ((a = x == null ? void 0 : x.lanes) == null ? void 0 : a[e]) ?? null;
627
+ return e === "all" ? null : ((a = y == null ? void 0 : y.lanes) == null ? void 0 : a[e]) ?? null;
589
628
  };
590
- return /* @__PURE__ */ n("div", { className: m("flex flex-1 min-h-0 flex-col", Ae), "data-nvr-notification-center": !0, children: [
591
- /* @__PURE__ */ n("header", { className: "shrink-0 border-b border-slate-200 bg-white px-8 py-5 dark:border-border dark:bg-background", children: [
592
- /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
629
+ return /* @__PURE__ */ n("div", { className: b("flex flex-1 min-h-0 flex-col", Ge), "data-nvr-notification-center": !0, children: [
630
+ /* @__PURE__ */ n("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: [
631
+ /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center justify-between gap-x-3 gap-y-2", children: [
593
632
  /* @__PURE__ */ n("div", { children: [
594
633
  /* @__PURE__ */ t("h1", { className: "text-xl font-bold text-slate-900 dark:text-slate-100", children: "Notifications" }),
595
634
  /* @__PURE__ */ n("p", { className: "mt-0.5 text-[13px] text-slate-400", children: [
596
- z,
635
+ $,
597
636
  " notification",
598
- z === 1 ? "" : "s",
599
- (x == null ? void 0 : x.attention) != null && x.attention > 0 ? ` · ${x.attention} need${x.attention === 1 ? "s" : ""} you` : ""
637
+ $ === 1 ? "" : "s",
638
+ (y == null ? void 0 : y.attention) != null && y.attention > 0 ? ` · ${y.attention} need${y.attention === 1 ? "s" : ""} you` : ""
600
639
  ] })
601
640
  ] }),
602
- /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
641
+ /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-2", children: [
603
642
  /* @__PURE__ */ n(
604
643
  "button",
605
644
  {
606
645
  type: "button",
607
- onClick: () => Ke((e) => !e),
646
+ onClick: () => dt((e) => !e),
608
647
  "data-notification-cleanup-toggle": !0,
609
- className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-slate-200 px-3 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-border dark:text-foreground dark:hover:bg-muted",
648
+ className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-md border border-slate-200 px-3 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-border dark:text-foreground dark:hover:bg-muted",
610
649
  children: [
611
- /* @__PURE__ */ t(we, { className: "h-3.5 w-3.5" }),
650
+ /* @__PURE__ */ t(Me, { className: "h-3.5 w-3.5" }),
612
651
  "Clean up"
613
652
  ]
614
653
  }
@@ -617,18 +656,18 @@ function Yt({
617
656
  "button",
618
657
  {
619
658
  type: "button",
620
- onClick: () => ee.mutate(),
621
- disabled: ee.isPending,
622
- className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-slate-200 px-3 text-[12px] font-medium text-slate-700 hover:bg-slate-50 disabled:opacity-50 dark:border-border dark:text-foreground dark:hover:bg-muted",
659
+ onClick: () => le.mutate(),
660
+ disabled: le.isPending,
661
+ className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-md border border-slate-200 px-3 text-[12px] font-medium text-slate-700 hover:bg-slate-50 disabled:opacity-50 dark:border-border dark:text-foreground dark:hover:bg-muted",
623
662
  children: [
624
- /* @__PURE__ */ t(rt, { className: "h-3.5 w-3.5" }),
625
- ee.isPending ? "Marking…" : "Mark all read"
663
+ /* @__PURE__ */ t(St, { className: "h-3.5 w-3.5" }),
664
+ le.isPending ? "Marking…" : "Mark all read"
626
665
  ]
627
666
  }
628
667
  )
629
668
  ] })
630
669
  ] }),
631
- fe && /* @__PURE__ */ n(
670
+ we && /* @__PURE__ */ n(
632
671
  "div",
633
672
  {
634
673
  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",
@@ -637,10 +676,10 @@ function Yt({
637
676
  /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: [
638
677
  "Archive everything read and older than",
639
678
  /* @__PURE__ */ t(
640
- ue,
679
+ he,
641
680
  {
642
- value: ke,
643
- onChange: He,
681
+ value: Ne,
682
+ onChange: it,
644
683
  ariaLabel: "Older than",
645
684
  className: "h-7 w-auto rounded-md border-slate-200 bg-background px-2 text-[12px] dark:border-border",
646
685
  options: [
@@ -655,21 +694,21 @@ function Yt({
655
694
  "button",
656
695
  {
657
696
  type: "button",
658
- disabled: te.isPending,
659
- onClick: () => te.mutate(Number(ke)),
697
+ disabled: re.isPending,
698
+ onClick: () => re.mutate(Number(Ne)),
660
699
  "data-notification-archive-read": !0,
661
700
  className: "h-7 rounded-md bg-slate-900 px-2.5 text-[11.5px] font-medium text-white hover:bg-slate-700 disabled:opacity-50 dark:bg-slate-100 dark:text-slate-900",
662
- children: te.isPending ? "Archiving…" : "Archive now"
701
+ children: re.isPending ? "Archiving…" : "Archive now"
663
702
  }
664
703
  )
665
704
  ] }),
666
705
  /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: [
667
706
  "Or do it automatically — archive read notifications after",
668
707
  /* @__PURE__ */ t(
669
- ue,
708
+ he,
670
709
  {
671
- value: String((ae == null ? void 0 : ae.notification_cleanup_days) ?? ""),
672
- onChange: (e) => Je.mutate(e ? Number(e) : null),
710
+ value: String((de == null ? void 0 : de.notification_cleanup_days) ?? ""),
711
+ onChange: (e) => ft.mutate(e ? Number(e) : null),
673
712
  ariaLabel: "Automatic clean-up",
674
713
  className: "h-7 w-auto rounded-md border-slate-200 bg-background px-2 text-[12px] dark:border-border",
675
714
  options: [
@@ -686,19 +725,19 @@ function Yt({
686
725
  }
687
726
  ),
688
727
  /* @__PURE__ */ n("div", { className: "mt-4 flex flex-wrap items-center gap-2", children: [
689
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: qt.map((e) => {
690
- const a = tt(e.key);
728
+ /* @__PURE__ */ t("div", { className: "flex max-w-full flex-wrap items-center gap-1", children: la.map((e) => {
729
+ const a = wt(e.key);
691
730
  return /* @__PURE__ */ n(
692
731
  "button",
693
732
  {
694
733
  type: "button",
695
734
  onClick: () => {
696
- $e(e.key), q(1);
735
+ We(e.key), F(1);
697
736
  },
698
737
  "data-nvr-lane": e.key,
699
- className: m(
700
- "rounded-md px-3 py-1.5 text-[12.5px] font-medium transition-colors",
701
- S === e.key ? e.key === "critical" ? "bg-red-500/10 text-red-700 dark:text-red-400" : "bg-nvr-cyan/10 text-nvr-navy dark:bg-nvr-cyan/15 dark:text-nvr-cyan" : "text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:hover:bg-slate-800/50"
738
+ className: b(
739
+ "shrink-0 whitespace-nowrap rounded-md px-3 py-1.5 text-[12.5px] font-medium transition-colors",
740
+ C === e.key ? e.key === "critical" ? "bg-red-500/10 text-red-700 dark:text-red-400" : "bg-nvr-cyan/10 text-nvr-navy dark:bg-nvr-cyan/15 dark:text-nvr-cyan" : "text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:hover:bg-slate-800/50"
702
741
  ),
703
742
  children: [
704
743
  e.label,
@@ -708,46 +747,46 @@ function Yt({
708
747
  e.key
709
748
  );
710
749
  }) }),
711
- /* @__PURE__ */ t("span", { className: "mx-1 h-5 w-px bg-slate-200 dark:bg-border" }),
712
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: At.map((e) => /* @__PURE__ */ t(
750
+ /* @__PURE__ */ t("span", { className: "mx-1 hidden h-5 w-px bg-slate-200 dark:bg-border sm:block" }),
751
+ /* @__PURE__ */ t("div", { className: "flex max-w-full flex-wrap items-center gap-1", children: na.map((e) => /* @__PURE__ */ t(
713
752
  "button",
714
753
  {
715
754
  type: "button",
716
755
  onClick: () => {
717
- Fe(e.key), q(1);
756
+ Ve(e.key), F(1);
718
757
  },
719
- className: m(
720
- "rounded-md px-2.5 py-1.5 text-[12px] font-medium transition-colors",
758
+ className: b(
759
+ "shrink-0 whitespace-nowrap rounded-md px-2.5 py-1.5 text-[12px] font-medium transition-colors",
721
760
  i === e.key ? "bg-slate-900 text-white dark:bg-slate-100 dark:text-slate-900" : "text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:hover:bg-slate-800/50"
722
761
  ),
723
762
  children: e.label
724
763
  },
725
764
  e.key
726
765
  )) }),
727
- /* @__PURE__ */ n("div", { className: "relative ml-auto", children: [
728
- /* @__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" }),
766
+ /* @__PURE__ */ n("div", { className: "relative w-full sm:ml-auto sm:w-auto", children: [
767
+ /* @__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" }),
729
768
  /* @__PURE__ */ t(
730
769
  "input",
731
770
  {
732
- value: J,
733
- onChange: (e) => Oe(e.target.value),
771
+ value: E,
772
+ onChange: (e) => Ee(e.target.value),
734
773
  placeholder: "Search notifications…",
735
- className: "h-8 w-[240px] rounded-md border border-slate-200 bg-background pl-8 pr-2.5 text-[12.5px] dark:border-border"
774
+ 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"
736
775
  }
737
776
  )
738
777
  ] }),
739
778
  /* @__PURE__ */ t(
740
- ue,
779
+ he,
741
780
  {
742
- value: T,
781
+ value: q,
743
782
  onChange: (e) => {
744
- Ie(e), q(1);
783
+ tt(e), F(1);
745
784
  },
746
785
  ariaLabel: "Collection",
747
786
  className: "h-8 w-auto rounded-md border-slate-200 bg-background px-2 text-[12.5px] dark:border-border",
748
787
  options: [
749
788
  { value: "", label: "All collections" },
750
- ...Ge.map((e) => ({ value: e, label: e }))
789
+ ...ct.map((e) => ({ value: e, label: e }))
751
790
  ]
752
791
  }
753
792
  ),
@@ -761,8 +800,8 @@ function Yt({
761
800
  "input",
762
801
  {
763
802
  type: "checkbox",
764
- checked: U,
765
- onChange: (e) => Re(e.target.checked),
803
+ checked: j,
804
+ onChange: (e) => at(e.target.checked),
766
805
  className: "h-3.5 w-3.5",
767
806
  "data-notification-group-by-record": !0
768
807
  }
@@ -773,11 +812,11 @@ function Yt({
773
812
  )
774
813
  ] })
775
814
  ] }),
776
- V != null && /* @__PURE__ */ n(
815
+ J != null && /* @__PURE__ */ n(
777
816
  "div",
778
817
  {
779
818
  className: "shrink-0 border-b border-slate-200 bg-white px-8 py-3 dark:border-border dark:bg-background",
780
- "data-notification-changes-landing": V,
819
+ "data-notification-changes-landing": J,
781
820
  children: [
782
821
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-2", children: [
783
822
  /* @__PURE__ */ t("p", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "What changed" }),
@@ -785,33 +824,33 @@ function Yt({
785
824
  "button",
786
825
  {
787
826
  type: "button",
788
- onClick: () => qe(null),
827
+ onClick: () => Ye(null),
789
828
  className: "text-[11.5px] text-slate-400 underline decoration-dotted underline-offset-2 hover:text-slate-600 dark:hover:text-slate-200",
790
829
  children: "Dismiss"
791
830
  }
792
831
  )
793
832
  ] }),
794
- /* @__PURE__ */ t(Dt, { notificationId: V, className: "max-w-3xl" })
833
+ /* @__PURE__ */ t(ea, { notificationId: J, className: "max-w-3xl" })
795
834
  ]
796
835
  }
797
836
  ),
798
- i !== "sent" && F.size > 0 && /* @__PURE__ */ n(
837
+ i !== "sent" && M.size > 0 && /* @__PURE__ */ n(
799
838
  "div",
800
839
  {
801
840
  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",
802
841
  "data-notification-bulkbar": !0,
803
842
  children: [
804
- /* @__PURE__ */ t("span", { className: "font-medium", children: W ? `All ${z} matching` : `${F.size} selected` }),
805
- !W && F.size >= ye && z > ye && /* @__PURE__ */ n(
843
+ /* @__PURE__ */ t("span", { className: "font-medium", children: ee ? `All ${$} matching` : `${M.size} selected` }),
844
+ !ee && M.size >= Fe && $ > Fe && /* @__PURE__ */ n(
806
845
  "button",
807
846
  {
808
847
  type: "button",
809
- onClick: () => L(!0),
848
+ onClick: () => K(!0),
810
849
  "data-notification-select-matching": !0,
811
850
  className: "text-nvr-navy underline decoration-dotted underline-offset-2 dark:text-nvr-cyan",
812
851
  children: [
813
852
  "Select all ",
814
- z,
853
+ $,
815
854
  " matching"
816
855
  ]
817
856
  }
@@ -821,12 +860,12 @@ function Yt({
821
860
  "button",
822
861
  {
823
862
  type: "button",
824
- disabled: $.isPending,
825
- onClick: () => $.mutate({ action: "read" }),
863
+ disabled: R.isPending,
864
+ onClick: () => R.mutate({ action: "read" }),
826
865
  "data-notification-bulk": "read",
827
866
  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",
828
867
  children: [
829
- /* @__PURE__ */ t(de, { className: "h-3 w-3" }),
868
+ /* @__PURE__ */ t(oe, { className: "h-3 w-3" }),
830
869
  " Mark read"
831
870
  ]
832
871
  }
@@ -836,21 +875,21 @@ function Yt({
836
875
  "button",
837
876
  {
838
877
  type: "button",
839
- disabled: $.isPending,
840
- onClick: () => X((e) => !e),
878
+ disabled: R.isPending,
879
+ onClick: () => te((e) => !e),
841
880
  "data-notification-bulk": "snooze",
842
881
  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",
843
882
  children: [
844
- /* @__PURE__ */ t(ie, { className: "h-3 w-3" }),
883
+ /* @__PURE__ */ t(ce, { className: "h-3 w-3" }),
845
884
  " Snooze"
846
885
  ]
847
886
  }
848
887
  ),
849
- Ue && /* @__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: _e().map((e) => /* @__PURE__ */ t(
888
+ rt && /* @__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(
850
889
  "button",
851
890
  {
852
891
  type: "button",
853
- onClick: () => $.mutate({ action: "snooze", until: e.until }),
892
+ onClick: () => R.mutate({ action: "snooze", until: e.until }),
854
893
  className: "block w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-muted dark:text-foreground",
855
894
  children: e.label
856
895
  },
@@ -861,12 +900,12 @@ function Yt({
861
900
  "button",
862
901
  {
863
902
  type: "button",
864
- disabled: $.isPending,
865
- onClick: () => $.mutate({ action: "archive" }),
903
+ disabled: R.isPending,
904
+ onClick: () => R.mutate({ action: "archive" }),
866
905
  "data-notification-bulk": "archive",
867
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",
868
907
  children: [
869
- /* @__PURE__ */ t(we, { className: "h-3 w-3" }),
908
+ /* @__PURE__ */ t(Me, { className: "h-3 w-3" }),
870
909
  " Archive"
871
910
  ]
872
911
  }
@@ -877,17 +916,17 @@ function Yt({
877
916
  type: "button",
878
917
  onClick: () => {
879
918
  const e = [];
880
- for (const a of [...D, ...O, ...H.flatMap((l) => l.rows)]) {
881
- if (!F.has(a.id)) continue;
882
- const l = Q(a, f);
919
+ for (const a of [...z, ...T, ...B.flatMap((l) => l.rows)]) {
920
+ if (!M.has(a.id)) continue;
921
+ const l = V(a, m);
883
922
  l && (l.type === "external" ? e.push(l.url) : l.type === "path" && typeof window < "u" && e.push(`${window.location.origin}${l.path}`));
884
923
  }
885
- e.length === 0 ? r == null || r("None of the selected notifications opens a page") : r == null || r(ht(xt(e)));
924
+ e.length === 0 ? r == null || r("None of the selected notifications opens a page") : r == null || r(It(jt(e)));
886
925
  },
887
926
  "data-notification-bulk": "tabs",
888
927
  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",
889
928
  children: [
890
- /* @__PURE__ */ t(Ne, { className: "h-3 w-3" }),
929
+ /* @__PURE__ */ t(Te, { className: "h-3 w-3" }),
891
930
  " Open in tabs"
892
931
  ]
893
932
  }
@@ -897,7 +936,7 @@ function Yt({
897
936
  {
898
937
  type: "button",
899
938
  onClick: () => {
900
- K(/* @__PURE__ */ new Set()), L(!1);
939
+ Y(/* @__PURE__ */ new Set()), K(!1);
901
940
  },
902
941
  className: "ml-auto text-[11.5px] text-slate-500 underline decoration-dotted underline-offset-2",
903
942
  children: "Clear selection"
@@ -915,8 +954,8 @@ function Yt({
915
954
  "input",
916
955
  {
917
956
  type: "checkbox",
918
- checked: j,
919
- onChange: (e) => Me(e.target.checked),
957
+ checked: G,
958
+ onChange: (e) => Ze(e.target.checked),
920
959
  className: "h-3.5 w-3.5",
921
960
  "data-nvr-sent-critical": !0
922
961
  }
@@ -924,19 +963,19 @@ function Yt({
924
963
  "Critical only"
925
964
  ] })
926
965
  ] }),
927
- Te ? /* @__PURE__ */ t("p", { className: "py-10 text-[13px] text-slate-400", children: "Loading…" }) : be.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-24 text-center", children: [
928
- /* @__PURE__ */ t(Ce, { className: "h-10 w-10 text-slate-200 dark:text-slate-700" }),
966
+ Je ? /* @__PURE__ */ t("p", { className: "py-10 text-[13px] text-slate-400", children: "Loading…" }) : ge.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-24 text-center", children: [
967
+ /* @__PURE__ */ t(Le, { className: "h-10 w-10 text-slate-200 dark:text-slate-700" }),
929
968
  /* @__PURE__ */ t("p", { className: "mt-3 text-[14px] font-medium text-slate-500", children: "Nothing sent yet" }),
930
- /* @__PURE__ */ t("p", { className: "mt-1 text-[12px] text-slate-400", children: j ? 'No critical sends. Untick "Critical only" to see everything you sent.' : "Messages you send to stakeholders or colleagues appear here." })
931
- ] }) : /* @__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: be.map((e) => /* @__PURE__ */ n("div", { className: "px-4 py-3", "data-nvr-sent-row": !0, children: [
969
+ /* @__PURE__ */ t("p", { className: "mt-1 text-[12px] text-slate-400", children: G ? 'No critical sends. Untick "Critical only" to see everything you sent.' : "Messages you send to stakeholders or colleagues appear here." })
970
+ ] }) : /* @__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: ge.map((e) => /* @__PURE__ */ n("div", { className: "px-4 py-3", "data-nvr-sent-row": !0, children: [
932
971
  /* @__PURE__ */ n("div", { className: "flex items-baseline gap-2", children: [
933
972
  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" }),
934
973
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-slate-900 dark:text-slate-100", children: e.subject.replace(/^critical:\s*/i, "") }),
935
- /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: G(e.created_at ?? /* @__PURE__ */ new Date()) }),
974
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-[10.5px] text-slate-400", children: /* @__PURE__ */ t(Ie, { value: e.created_at ?? /* @__PURE__ */ new Date() }) }),
936
975
  /* @__PURE__ */ n(
937
976
  "span",
938
977
  {
939
- className: m(
978
+ className: b(
940
979
  "ml-auto shrink-0 rounded-full px-2 py-0.5 text-[10.5px] font-semibold tabular-nums",
941
980
  e.read_count === e.total ? "bg-emerald-50 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400" : "bg-amber-50 text-amber-700 dark:bg-amber-400/10 dark:text-amber-300"
942
981
  ),
@@ -963,11 +1002,11 @@ function Yt({
963
1002
  }
964
1003
  )
965
1004
  ] }),
966
- e.message && /* @__PURE__ */ t("p", { className: "mt-0.5 line-clamp-2 text-[12px] text-slate-500", children: e.message.replace(/<[^>]+>/g, "") }),
1005
+ e.message && /* @__PURE__ */ t("p", { className: "mt-0.5 line-clamp-2 whitespace-pre-line text-[12px] text-slate-500", children: e.message.replace(/<[^>]+>/g, "") }),
967
1006
  /* @__PURE__ */ t("div", { className: "mt-1.5 flex flex-wrap gap-1", children: e.recipients.map((a) => /* @__PURE__ */ n(
968
1007
  "span",
969
1008
  {
970
- className: m(
1009
+ className: b(
971
1010
  "inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[10.5px]",
972
1011
  a.read ? "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 text-slate-500 dark:border-border dark:bg-muted dark:text-slate-400"
973
1012
  ),
@@ -978,61 +1017,85 @@ function Yt({
978
1017
  /* @__PURE__ */ t(
979
1018
  "span",
980
1019
  {
981
- className: m(
1020
+ className: b(
982
1021
  "h-1.5 w-1.5 rounded-full",
983
1022
  a.read ? "bg-emerald-500" : "bg-slate-300 dark:bg-slate-600"
984
1023
  )
985
1024
  }
986
1025
  ),
987
1026
  a.name,
988
- a.ack === "acked" && /* @__PURE__ */ t(se, { className: "h-3 w-3" })
1027
+ a.ack === "acked" && /* @__PURE__ */ t(ue, { className: "h-3 w-3" })
989
1028
  ]
990
1029
  },
991
1030
  a.id
992
1031
  )) })
993
1032
  ] }, e.key)) })
994
- ] }) : Qe ? /* @__PURE__ */ t("p", { className: "px-8 py-10 text-[13px] text-slate-400", children: "Loading…" }) : O.length === 0 && H.length === 0 && D.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-24 text-center", children: [
995
- /* @__PURE__ */ t(Ce, { className: "h-10 w-10 text-slate-200 dark:text-slate-700" }),
1033
+ ] }) : st ? /* @__PURE__ */ t("p", { className: "px-8 py-10 text-[13px] text-slate-400", children: "Loading…" }) : T.length === 0 && B.length === 0 && z.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-24 text-center", children: [
1034
+ /* @__PURE__ */ t(Le, { className: "h-10 w-10 text-slate-200 dark:text-slate-700" }),
996
1035
  /* @__PURE__ */ t("p", { className: "mt-3 text-[14px] font-medium text-slate-500", children: "You're all caught up" }),
997
1036
  /* @__PURE__ */ t("p", { className: "mt-1 text-[12px] text-slate-400", children: i === "inbox" ? "No unread notifications." : "No notifications here." })
998
- ] }) : /* @__PURE__ */ n("div", { className: "mx-8 my-6 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: [
999
- D.length > 0 && /* @__PURE__ */ n("div", { "data-notification-pinned": !0, children: [
1000
- /* @__PURE__ */ n("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: [
1001
- "Needs your acknowledgement · ",
1002
- D.length
1003
- ] }),
1004
- D.map((e) => /* @__PURE__ */ t(oe, { children: le(e) }, `pin:${e.id}`))
1005
- ] }),
1006
- H.map(et),
1007
- O.map((e, a) => {
1008
- const l = (b) => {
1009
- if (!b) return "Older";
1010
- const c = new Date(b), k = /* @__PURE__ */ new Date(), re = new Date(k.getFullYear(), k.getMonth(), k.getDate());
1011
- return c >= re ? "Today" : c >= new Date(re.getTime() - 864e5) ? "Yesterday" : c >= new Date(re.getTime() - 5184e5) ? "This week" : "Older";
1012
- }, o = l(e.created_at), A = a > 0 ? l(O[a - 1].created_at) : null;
1013
- return /* @__PURE__ */ n(oe, { children: [
1014
- o !== A ? /* @__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: o }) : null,
1015
- le(e)
1016
- ] }, e.id);
1017
- })
1037
+ ] }) : /* @__PURE__ */ n(qe, { children: [
1038
+ ne > 0 && // Zero-height and sticky: floats over the list, never pushes it.
1039
+ /* @__PURE__ */ t("div", { className: "sticky top-2 z-10 flex h-0 justify-center overflow-visible", children: /* @__PURE__ */ n(
1040
+ "button",
1041
+ {
1042
+ type: "button",
1043
+ "data-notification-new-pill": ne,
1044
+ onClick: bt,
1045
+ className: "mt-1 inline-flex h-7 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-white px-3 text-[12px] font-medium text-nvr-navy shadow-sm transition-colors hover:bg-nvr-cyan/10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-nvr-cyan dark:border-nvr-cyan/40 dark:bg-card dark:text-nvr-cyan dark:hover:bg-nvr-cyan/10",
1046
+ children: [
1047
+ /* @__PURE__ */ t(At, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
1048
+ ne,
1049
+ " new"
1050
+ ]
1051
+ }
1052
+ ) }),
1053
+ /* @__PURE__ */ n(
1054
+ "div",
1055
+ {
1056
+ ref: pt,
1057
+ className: "mx-8 my-6 divide-y divide-slate-100 overflow-hidden rounded-lg border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card",
1058
+ children: [
1059
+ z.length > 0 && /* @__PURE__ */ n("div", { "data-notification-pinned": !0, children: [
1060
+ /* @__PURE__ */ n("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: [
1061
+ "Needs your acknowledgement · ",
1062
+ z.length
1063
+ ] }),
1064
+ z.map((e) => /* @__PURE__ */ t(pe, { children: se(e) }, `pin:${e.id}`))
1065
+ ] }),
1066
+ mt.map(yt),
1067
+ _e.map((e, a) => {
1068
+ const l = (_) => {
1069
+ if (!_) return "Older";
1070
+ const o = new Date(_), f = /* @__PURE__ */ new Date(), g = new Date(f.getFullYear(), f.getMonth(), f.getDate());
1071
+ return o >= g ? "Today" : o >= new Date(g.getTime() - 864e5) ? "Yesterday" : o >= new Date(g.getTime() - 5184e5) ? "This week" : "Older";
1072
+ }, s = l(e.created_at), x = a > 0 ? l(_e[a - 1].created_at) : null;
1073
+ return /* @__PURE__ */ n(pe, { children: [
1074
+ s !== x ? /* @__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,
1075
+ /* @__PURE__ */ t("div", { "data-live-key": Be(e), children: se(e) })
1076
+ ] }, e.id);
1077
+ })
1078
+ ]
1079
+ }
1080
+ )
1018
1081
  ] }),
1019
- i !== "sent" && z > me && /* @__PURE__ */ n("div", { className: "mx-8 mb-6 flex items-center justify-between", children: [
1082
+ i !== "sent" && $ > xe && /* @__PURE__ */ n("div", { className: "mx-8 mb-6 flex items-center justify-between", children: [
1020
1083
  /* @__PURE__ */ n("p", { className: "text-[12px] text-slate-400", children: [
1021
1084
  "Page ",
1022
- _,
1085
+ S,
1023
1086
  " of ",
1024
- E
1087
+ ae
1025
1088
  ] }),
1026
1089
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1027
1090
  /* @__PURE__ */ n(
1028
1091
  "button",
1029
1092
  {
1030
1093
  type: "button",
1031
- disabled: _ <= 1,
1032
- onClick: () => q((e) => Math.max(1, e - 1)),
1094
+ disabled: S <= 1,
1095
+ onClick: () => F((e) => Math.max(1, e - 1)),
1033
1096
  className: "inline-flex h-7 items-center rounded-md border border-slate-200 px-2 text-[12px] disabled:opacity-40 dark:border-border",
1034
1097
  children: [
1035
- /* @__PURE__ */ t(it, { className: "mr-1 h-3.5 w-3.5" }),
1098
+ /* @__PURE__ */ t(Dt, { className: "mr-1 h-3.5 w-3.5" }),
1036
1099
  "Previous"
1037
1100
  ]
1038
1101
  }
@@ -1041,12 +1104,12 @@ function Yt({
1041
1104
  "button",
1042
1105
  {
1043
1106
  type: "button",
1044
- disabled: _ >= E,
1045
- onClick: () => q((e) => Math.min(E, e + 1)),
1107
+ disabled: S >= ae,
1108
+ onClick: () => F((e) => Math.min(ae, e + 1)),
1046
1109
  className: "inline-flex h-7 items-center rounded-md border border-slate-200 px-2 text-[12px] disabled:opacity-40 dark:border-border",
1047
1110
  children: [
1048
1111
  "Next",
1049
- /* @__PURE__ */ t(st, { className: "ml-1 h-3.5 w-3.5" })
1112
+ /* @__PURE__ */ t(zt, { className: "ml-1 h-3.5 w-3.5" })
1050
1113
  ]
1051
1114
  }
1052
1115
  )
@@ -1054,15 +1117,19 @@ function Yt({
1054
1117
  ] })
1055
1118
  ] }),
1056
1119
  /* @__PURE__ */ t(
1057
- kt,
1120
+ Gt,
1058
1121
  {
1059
- notificationId: (h == null ? void 0 : h.id) ?? null,
1060
- title: (h == null ? void 0 : h.subject) ?? (h == null ? void 0 : h.title) ?? null,
1061
- onClose: () => ge(null)
1122
+ notificationId: (v == null ? void 0 : v.id) ?? null,
1123
+ title: (v == null ? void 0 : v.subject) ?? (v == null ? void 0 : v.title) ?? null,
1124
+ onClose: () => ye(null)
1062
1125
  }
1063
1126
  )
1064
1127
  ] });
1065
1128
  }
1129
+ function Ue(m) {
1130
+ const h = m.replace(/_/g, " ").trim();
1131
+ return h ? h.charAt(0).toUpperCase() + h.slice(1) : m;
1132
+ }
1066
1133
  export {
1067
- Yt as NotificationCenterView
1134
+ Sa as NotificationCenterView
1068
1135
  };