@nivaro/react 0.3.113 → 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 (285) 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 +1727 -19
  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 +544 -504
  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/cbv/column-totals.js +75 -67
  62. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  63. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  65. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  66. package/dist/shared/components/change-proposals/types.js +4 -0
  67. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  68. package/dist/shared/components/chat/Composer.js +276 -298
  69. package/dist/shared/components/chat/room-due.js +13 -0
  70. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  71. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  72. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  73. package/dist/shared/components/imports/ImportConsole.js +159 -155
  74. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  75. package/dist/shared/components/integrations/SendStatus.js +202 -0
  76. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  77. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  78. package/dist/shared/components/integrations/console/api.js +161 -117
  79. package/dist/shared/components/integrations/console/tone.js +15 -12
  80. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  81. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  82. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  83. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  84. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  85. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  86. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  87. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  88. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  89. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  90. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  91. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  92. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  93. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  94. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  95. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  96. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  97. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  98. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  99. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  100. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  101. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  102. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  103. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  104. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  105. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  106. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  107. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  108. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  109. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  110. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  111. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  112. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  113. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  114. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  115. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  116. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  117. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  118. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  119. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  120. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  121. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  122. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  123. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  124. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  125. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  126. package/dist/shared/components/item-edit/file-live.js +77 -0
  127. package/dist/shared/components/item-edit/file-processing.js +87 -0
  128. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  129. package/dist/shared/components/item-edit/live-related.js +23 -0
  130. package/dist/shared/components/item-edit/live-title.js +66 -0
  131. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  132. package/dist/shared/components/item-edit/removed-line.js +58 -0
  133. package/dist/shared/components/item-edit/render-stability.js +70 -59
  134. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  135. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  136. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  137. package/dist/shared/components/list/InlineEdit.js +504 -208
  138. package/dist/shared/components/list/ListViewers.js +81 -0
  139. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  140. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  141. package/dist/shared/components/merge/merge-values.js +110 -0
  142. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  143. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  144. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  145. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  146. package/dist/shared/components/notifications/bundles.js +21 -19
  147. package/dist/shared/components/notifications/resolved-line.js +25 -0
  148. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  149. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  150. package/dist/shared/components/panels/AlertBanners.js +132 -0
  151. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  152. package/dist/shared/components/panels/BranchLanes.js +82 -54
  153. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  154. package/dist/shared/components/panels/CommentImages.js +219 -0
  155. package/dist/shared/components/panels/CommentPanel.js +649 -530
  156. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  157. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  158. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  159. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  160. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  161. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  162. package/dist/shared/components/panels/SlaClock.js +130 -99
  163. package/dist/shared/components/panels/TaskPanel.js +308 -287
  164. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  165. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  166. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  167. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  168. package/dist/shared/components/profile/AgentNameField.js +141 -0
  169. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  170. package/dist/shared/components/profile/PersonAccess.js +398 -330
  171. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  172. package/dist/shared/components/profile/PersonProfile.js +81 -73
  173. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  174. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  175. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  176. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  177. package/dist/shared/components/queue/QueueWorklist.js +2076 -1686
  178. package/dist/shared/components/queue/queue-totals.js +92 -0
  179. package/dist/shared/components/queue/worklist-helpers.js +18 -14
  180. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  181. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  182. package/dist/shared/components/support/ReportProblem.js +1 -0
  183. package/dist/shared/components/support/ScreenShare.js +554 -0
  184. package/dist/shared/components/support/SupportView.js +160 -129
  185. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  186. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  187. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  188. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  189. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  190. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  191. package/dist/shared/lib/activity-sentence.js +87 -75
  192. package/dist/shared/lib/agent-presence.js +46 -0
  193. package/dist/shared/lib/approval-progress.js +49 -0
  194. package/dist/shared/lib/attention-prefs.js +27 -0
  195. package/dist/shared/lib/cell-locks.js +56 -0
  196. package/dist/shared/lib/co-edit.js +166 -0
  197. package/dist/shared/lib/coedit-registry.js +44 -0
  198. package/dist/shared/lib/comment-awareness.js +124 -0
  199. package/dist/shared/lib/comment-images.js +45 -0
  200. package/dist/shared/lib/config-watch.js +94 -0
  201. package/dist/shared/lib/copy-rules.js +65 -0
  202. package/dist/shared/lib/count-step.js +30 -0
  203. package/dist/shared/lib/deadline-ticker.js +68 -0
  204. package/dist/shared/lib/derived-causes.js +115 -0
  205. package/dist/shared/lib/draft-store.js +114 -85
  206. package/dist/shared/lib/error-hints.js +1 -0
  207. package/dist/shared/lib/field-merge.js +126 -0
  208. package/dist/shared/lib/filter-sentence.js +10 -10
  209. package/dist/shared/lib/focus-mode.js +16 -12
  210. package/dist/shared/lib/grid-cursors.js +77 -0
  211. package/dist/shared/lib/grid-presence.js +182 -0
  212. package/dist/shared/lib/idle-reload.js +100 -73
  213. package/dist/shared/lib/in-step.js +45 -0
  214. package/dist/shared/lib/integration-chip.js +19 -18
  215. package/dist/shared/lib/line-locks.js +141 -0
  216. package/dist/shared/lib/line-split.js +41 -0
  217. package/dist/shared/lib/linked-changes.js +150 -0
  218. package/dist/shared/lib/list-link.js +56 -50
  219. package/dist/shared/lib/list-return.js +231 -0
  220. package/dist/shared/lib/list-viewers.js +52 -0
  221. package/dist/shared/lib/live-announcer.js +86 -0
  222. package/dist/shared/lib/live-counts.js +85 -0
  223. package/dist/shared/lib/live-data-changed.js +108 -0
  224. package/dist/shared/lib/live-deltas.js +81 -0
  225. package/dist/shared/lib/live-findings.js +113 -0
  226. package/dist/shared/lib/live-groups.js +122 -0
  227. package/dist/shared/lib/live-link-labels.js +162 -0
  228. package/dist/shared/lib/live-list-flow.js +334 -0
  229. package/dist/shared/lib/live-list.js +143 -129
  230. package/dist/shared/lib/live-moves.js +51 -0
  231. package/dist/shared/lib/live-ops.js +26 -26
  232. package/dist/shared/lib/live-pickers.js +7 -0
  233. package/dist/shared/lib/live-preference.js +184 -0
  234. package/dist/shared/lib/live-queries.js +226 -181
  235. package/dist/shared/lib/live-screen.js +333 -0
  236. package/dist/shared/lib/live-search.js +108 -0
  237. package/dist/shared/lib/live-seen.js +35 -0
  238. package/dist/shared/lib/live-views.js +100 -0
  239. package/dist/shared/lib/live.js +159 -133
  240. package/dist/shared/lib/missed-updates.js +198 -0
  241. package/dist/shared/lib/newer-file.js +56 -0
  242. package/dist/shared/lib/notification-sound.js +42 -20
  243. package/dist/shared/lib/own-writes.js +59 -41
  244. package/dist/shared/lib/picker-badges.js +94 -0
  245. package/dist/shared/lib/presence-signals.js +131 -84
  246. package/dist/shared/lib/realtime.js +49 -24
  247. package/dist/shared/lib/record-gaps.js +85 -0
  248. package/dist/shared/lib/record-outbox.js +369 -222
  249. package/dist/shared/lib/record-peek.js +75 -0
  250. package/dist/shared/lib/record-tabs.js +92 -72
  251. package/dist/shared/lib/relative-ticker.js +42 -0
  252. package/dist/shared/lib/request-gate.js +119 -119
  253. package/dist/shared/lib/rollup-recalc.js +107 -0
  254. package/dist/shared/lib/room-gaps.js +40 -36
  255. package/dist/shared/lib/rum.js +137 -87
  256. package/dist/shared/lib/save-progress.js +20 -0
  257. package/dist/shared/lib/scheduled-countdown.js +67 -0
  258. package/dist/shared/lib/screen-refresh.js +160 -0
  259. package/dist/shared/lib/screen-share.js +234 -0
  260. package/dist/shared/lib/seen-since.js +74 -0
  261. package/dist/shared/lib/selection-watch.js +205 -0
  262. package/dist/shared/lib/send-status.js +132 -0
  263. package/dist/shared/lib/send-view.js +23 -0
  264. package/dist/shared/lib/socket-liveness.js +155 -0
  265. package/dist/shared/lib/socket-realtime.js +168 -140
  266. package/dist/shared/lib/state-census.js +53 -0
  267. package/dist/shared/lib/summary-mode.js +61 -39
  268. package/dist/shared/lib/tab-attention.js +143 -32
  269. package/dist/shared/lib/table-density.js +64 -0
  270. package/dist/shared/lib/track-travel.js +40 -0
  271. package/dist/shared/lib/unseen-changes.js +68 -0
  272. package/dist/shared/lib/upload-file.js +33 -0
  273. package/dist/shared/lib/upload-presence.js +127 -0
  274. package/dist/shared/lib/urgent-chime.js +65 -0
  275. package/dist/shared/lib/use-online-users.js +32 -11
  276. package/dist/shared/lib/user-sync.js +155 -39
  277. package/dist/shared/lib/waiting-count.js +44 -0
  278. package/dist/shared/lib/watch-desktop.js +83 -0
  279. package/dist/shared/lib/watch-list.js +447 -0
  280. package/dist/shared/lib/widget-image-render.js +64 -0
  281. package/dist/shared/lib/widget-image.js +111 -0
  282. package/dist/shared/lib/worker-socket.js +130 -104
  283. package/dist/shared/lib/write-to-screen.js +133 -0
  284. package/package.json +1 -1
  285. package/styles.css +49 -1
@@ -0,0 +1,334 @@
1
+ import { useMemo as R, useState as L, useRef as y, useCallback as w, useEffect as E, useLayoutEffect as P, useSyncExternalStore as B } from "react";
2
+ import { useActorNames as z, writerOf as D } from "./live-list.js";
3
+ const C = 12, X = 2e3, G = 2500, q = 5e3, $ = (e) => (e == null ? void 0 : e.item) == null || String(e.item) === "*" ? "*" : String(e.item);
4
+ function F(e = {}) {
5
+ const r = e.threshold ?? C, n = e.windowMs ?? X, t = e.quietMs ?? G;
6
+ let c = [], l = !1, f = 0, s = null;
7
+ const i = (u) => u === "create" ? "create" : u === "delete" ? "delete" : "update", d = (u) => {
8
+ if (!s) return;
9
+ s.sources.add(u.source === "import" || u.source === "raw" ? u.source : "");
10
+ const a = $(u);
11
+ if (a === "*") {
12
+ typeof u.bulk == "number" && u.bulk > 0 ? s.extra += u.bulk : s.approx = !0;
13
+ return;
14
+ }
15
+ const o = i(u.action), p = s.kinds.get(a);
16
+ if (p) {
17
+ p !== "delete" && o === "delete" && s.kinds.set(a, "delete");
18
+ return;
19
+ }
20
+ if (s.kinds.size >= q) {
21
+ s.overflow[o]++;
22
+ return;
23
+ }
24
+ s.kinds.set(a, o);
25
+ };
26
+ return {
27
+ push(u, a = Date.now()) {
28
+ if (u.length === 0) return l;
29
+ if (l && a - f > t && (l = !1), f = a, l) {
30
+ for (const h of u) d(h);
31
+ return !0;
32
+ }
33
+ c = c.filter((h) => a - h.at <= n);
34
+ for (const h of u) c.push({ at: a, ev: h });
35
+ const o = /* @__PURE__ */ new Set();
36
+ let p = !0;
37
+ for (const h of c) {
38
+ const S = $(h.ev);
39
+ S === "*" ? p = !1 : o.add(S);
40
+ }
41
+ if (p && o.size < r) return !1;
42
+ l = !0, s || (s = {
43
+ kinds: /* @__PURE__ */ new Map(),
44
+ extra: 0,
45
+ overflow: { create: 0, update: 0, delete: 0 },
46
+ sources: /* @__PURE__ */ new Set(),
47
+ approx: !1
48
+ });
49
+ for (const h of c) d(h.ev);
50
+ return c = [], !0;
51
+ },
52
+ current() {
53
+ if (!s) return null;
54
+ const u = { ...s.overflow };
55
+ for (const o of s.kinds.values()) u[o]++;
56
+ const a = s.sources.size === 1 ? [...s.sources][0] : "";
57
+ return {
58
+ count: u.create + u.update + u.delete + s.extra,
59
+ creates: u.create,
60
+ updates: u.update,
61
+ deletes: u.delete,
62
+ source: a === "import" || a === "raw" ? a : null,
63
+ approx: s.approx,
64
+ sample: [...s.kinds.keys()].slice(0, 10)
65
+ };
66
+ },
67
+ clear() {
68
+ s = null, l = !1, c = [];
69
+ }
70
+ };
71
+ }
72
+ function Y(e, r = null) {
73
+ const n = r ?? (e.source === "import" ? "Import" : null);
74
+ if (e.count === 0) return n ? `${n} changed many records` : "Many records changed";
75
+ const t = `${e.count.toLocaleString("en-US")}${e.approx ? "+" : ""}`, c = e.count === 1 && !e.approx ? "record" : "records", l = [e.creates, e.updates, e.deletes].filter((s) => s > 0).length, f = (s) => l === 1 && s > 0 && e.creates + e.updates + e.deletes === e.count;
76
+ return f(e.creates) ? n ? `${n} added ${t} ${c}` : `${t} ${c} added` : f(e.deletes) ? n ? `${n} removed ${t} ${c}` : `${t} ${c} removed` : f(e.updates) ? n ? `${n} updated ${t} ${c}` : `${t} ${c} updated` : n ? `${n} changed ${t} ${c}` : `${t} ${c} changed`;
77
+ }
78
+ function ue(e) {
79
+ let r = null;
80
+ for (const n of e) {
81
+ const t = D(n);
82
+ if (t) {
83
+ if (r && r.toUpperCase() !== t.toUpperCase()) return null;
84
+ r = r ?? t;
85
+ }
86
+ }
87
+ return r;
88
+ }
89
+ function le() {
90
+ const e = R(() => F(), []), [r, n] = L(null), [t, c] = L(null), l = y(!1), f = z(t ? [t] : []), s = w(() => n(e.current()), [e]), i = w(() => l.current ? !1 : (l.current = !0, !0), []), d = w((p) => c(p), []), u = w(() => {
91
+ e.clear(), l.current = !1, c(null), n(null);
92
+ }, [e]), a = t ? f.get(t) ?? null : null, o = r ? Y(r, a) : null;
93
+ return R(
94
+ () => ({ tracker: e, publish: s, claimWriterRead: i, setWriter: d, label: o, info: r, clear: u }),
95
+ [e, s, i, d, o, r, u]
96
+ );
97
+ }
98
+ function H(e) {
99
+ const r = /* @__PURE__ */ new Set();
100
+ let n = 0;
101
+ for (const t of e) {
102
+ const c = $(t);
103
+ c === "*" ? n += typeof (t == null ? void 0 : t.bulk) == "number" && t.bulk > 0 ? t.bulk : 1 : r.add(c);
104
+ }
105
+ return r.size + n;
106
+ }
107
+ function ae(e) {
108
+ return e.some((r) => $(r) === "*") || H(e) >= C;
109
+ }
110
+ const N = "nvr:live-paused";
111
+ let v = null;
112
+ const M = /* @__PURE__ */ new Set();
113
+ function U() {
114
+ if (v) return v;
115
+ v = /* @__PURE__ */ new Set();
116
+ try {
117
+ const e = typeof sessionStorage > "u" ? null : sessionStorage.getItem(N), r = e ? JSON.parse(e) : null;
118
+ if (Array.isArray(r))
119
+ for (const n of r) typeof n == "string" && v.add(n);
120
+ } catch {
121
+ }
122
+ return v;
123
+ }
124
+ function O(e) {
125
+ return !!e && U().has(e);
126
+ }
127
+ function J(e, r) {
128
+ const n = U();
129
+ if (n.has(e) !== r) {
130
+ r ? n.add(e) : n.delete(e);
131
+ try {
132
+ sessionStorage.setItem(N, JSON.stringify([...n].slice(-100)));
133
+ } catch {
134
+ }
135
+ for (const t of M) t();
136
+ }
137
+ }
138
+ function j(e) {
139
+ return M.add(e), () => {
140
+ M.delete(e);
141
+ };
142
+ }
143
+ function Q(e) {
144
+ return B(
145
+ j,
146
+ () => O(e),
147
+ () => !1
148
+ );
149
+ }
150
+ const A = 2e3;
151
+ function ie(e, r) {
152
+ const n = Q(e), t = y([]), [c, l] = L(0), f = y(r);
153
+ f.current = r;
154
+ const s = y(e);
155
+ s.current = e;
156
+ const i = w((o, p) => {
157
+ if (!O(s.current)) {
158
+ p(o);
159
+ return;
160
+ }
161
+ t.current.push(...o), t.current.length > A && (t.current = t.current.slice(-A)), l(H(t.current));
162
+ }, []), d = w(() => {
163
+ const o = t.current;
164
+ t.current = [], l(0), o.length > 0 && f.current(o);
165
+ }, []), u = w(() => {
166
+ const o = s.current;
167
+ if (!o) return;
168
+ const p = !O(o);
169
+ J(o, p), p || d();
170
+ }, [d]), a = w(() => {
171
+ t.current = [], l(0);
172
+ }, []);
173
+ return E(() => {
174
+ n || d();
175
+ }, [n, d]), { paused: n, held: c, gate: i, toggle: u, dropHeld: a };
176
+ }
177
+ function V(e, r, n) {
178
+ let t = -1;
179
+ for (const o of n) o != null && (t = Math.max(t, e.indexOf(o)));
180
+ if (t < 0) return { order: r, gone: [], hidden: [], held: !1 };
181
+ let c = r.length > t;
182
+ for (let o = 0; c && o <= t; o++) e[o] !== r[o] && (c = !1);
183
+ if (c) return { order: r, gone: [], hidden: [], held: !1 };
184
+ const l = e.slice(0, t + 1), f = new Set(r), s = new Set(l), i = new Set(e), d = r.indexOf(e[t]), u = [], a = [];
185
+ return r.forEach((o, p) => {
186
+ s.has(o) || (!i.has(o) && (d < 0 || p < d) ? a.push(o) : u.push(o));
187
+ }), {
188
+ order: [...l, ...u],
189
+ gone: l.filter((o) => !f.has(o)),
190
+ hidden: a,
191
+ held: !0
192
+ };
193
+ }
194
+ const Z = 1e4, fe = "No longer matches this view — it leaves when you move the pointer away", de = "[&>td:not(.sticky)]:opacity-50 [&>td.sticky>*]:opacity-50", ee = "§";
195
+ function T(e) {
196
+ if (!(e instanceof Element)) return null;
197
+ const r = e.closest("[data-row-key],[data-group-key]");
198
+ if (!r) return null;
199
+ const n = r.getAttribute("data-row-key");
200
+ if (n != null) return n;
201
+ const t = r.getAttribute("data-group-key");
202
+ return t != null ? `${ee}${t}` : null;
203
+ }
204
+ function te(e, r, n) {
205
+ const t = y(null), c = y(null), l = y(n);
206
+ l.current = n;
207
+ const f = y(null), s = y(null);
208
+ return E(() => {
209
+ var p;
210
+ const i = r ? e.current : null;
211
+ if (f.current === i || ((p = s.current) == null || p.call(s), s.current = null, f.current = i, t.current = null, c.current = null, !i)) return;
212
+ const d = (h) => {
213
+ t.current = T(h.target);
214
+ }, u = () => {
215
+ t.current = null, l.current();
216
+ }, a = (h) => {
217
+ c.current = T(h.target);
218
+ }, o = (h) => {
219
+ const S = h.relatedTarget;
220
+ S instanceof Node && i.contains(S) || (c.current = null, l.current());
221
+ };
222
+ i.addEventListener("pointerover", d), i.addEventListener("pointerleave", u), i.addEventListener("focusin", a), i.addEventListener("focusout", o), s.current = () => {
223
+ i.removeEventListener("pointerover", d), i.removeEventListener("pointerleave", u), i.removeEventListener("focusin", a), i.removeEventListener("focusout", o);
224
+ };
225
+ }), E(
226
+ () => () => {
227
+ var i;
228
+ (i = s.current) == null || i.call(s), s.current = null, f.current = null;
229
+ },
230
+ []
231
+ ), R(
232
+ () => ({
233
+ current: () => [t.current, c.current],
234
+ clear: () => {
235
+ t.current = null, c.current = null;
236
+ }
237
+ }),
238
+ []
239
+ );
240
+ }
241
+ const re = /* @__PURE__ */ new Set();
242
+ function pe(e, r, n, t = {}) {
243
+ const c = t.enabled !== !1, l = y({
244
+ order: [],
245
+ byKey: /* @__PURE__ */ new Map()
246
+ }), f = y(!1), [, s] = L(0), i = te(n, c, () => {
247
+ f.current && s((g) => g + 1);
248
+ }), d = e.map(r), u = l.current, a = c && u.resetKey === t.resetKey ? V(u.order, d, i.current()) : null, o = !!(a != null && a.held), p = t.maxHoldMs ?? Z;
249
+ E(() => {
250
+ if (f.current = o, !o) return;
251
+ const g = setTimeout(() => {
252
+ i.clear(), s((m) => m + 1);
253
+ }, p);
254
+ return () => clearTimeout(g);
255
+ }, [o, p, i]);
256
+ let h = e, S = re, k = d;
257
+ if (a != null && a.held) {
258
+ const g = /* @__PURE__ */ new Map();
259
+ e.forEach((m, b) => {
260
+ g.set(d[b], m);
261
+ }), h = [], k = [];
262
+ for (const m of a.order) {
263
+ const b = g.has(m) ? g.get(m) : u.byKey.get(m);
264
+ b !== void 0 && (h.push(b), k.push(m));
265
+ }
266
+ S = new Set(a.gone);
267
+ }
268
+ const _ = y([]), x = y(!1);
269
+ P(() => {
270
+ const g = _.current, m = x.current && !o;
271
+ if (_.current = k, x.current = o, !c || g.length === 0) return;
272
+ const b = new Set(k);
273
+ g.some((K) => !b.has(K)) && (m || i.current()[0] != null) && se(n.current);
274
+ }), E(() => {
275
+ const g = /* @__PURE__ */ new Map();
276
+ k.forEach((m, b) => {
277
+ g.set(m, h[b]);
278
+ }), l.current = { order: k, byKey: g, resetKey: t.resetKey };
279
+ });
280
+ const W = [...S].join(""), I = w((g) => S.has(g), [W]);
281
+ return { rows: h, isGone: I, holding: o };
282
+ }
283
+ function he(e) {
284
+ const r = y(e), n = y(void 0);
285
+ r.current !== e && (n.current = r.current ?? n.current, r.current = e);
286
+ const t = n.current;
287
+ return R(() => e ? t ? { ...t, ...e } : e : t ?? void 0, [e, t]);
288
+ }
289
+ const ne = 200;
290
+ function se(e) {
291
+ const r = e == null ? void 0 : e.querySelector("tbody"), n = r == null ? void 0 : r.closest("table");
292
+ if (!r || !n || typeof document < "u" && r.contains(document.activeElement) || r.rows.length > ne) return !1;
293
+ const t = n.style.borderCollapse, c = getComputedStyle(n).borderCollapse === "collapse" ? "separate" : "collapse";
294
+ return n.style.borderCollapse = c, n.offsetHeight, n.style.borderCollapse = t, !0;
295
+ }
296
+ function ge(e, r, n = /* @__PURE__ */ new Set()) {
297
+ if (r.size === 0) return !1;
298
+ for (const t of e) {
299
+ if (!t) continue;
300
+ if (t.action === "create" || t.action === "delete") return !0;
301
+ const c = t.changed_fields;
302
+ if (!c || c.length === 0) return !0;
303
+ if (!c.every((l) => l.startsWith("$")) && c.some((l) => r.has(l) || n.has(l)))
304
+ return !0;
305
+ }
306
+ return !1;
307
+ }
308
+ export {
309
+ G as BURST_QUIET_MS,
310
+ C as BURST_THRESHOLD,
311
+ X as BURST_WINDOW_MS,
312
+ de as GONE_ROW_CLASS,
313
+ fe as GONE_ROW_TITLE,
314
+ ee as GROUP_ANCHOR_PREFIX,
315
+ ne as RELAYOUT_MAX_ROWS,
316
+ Z as ROW_HOLD_MAX_MS,
317
+ T as anchorKeyOf,
318
+ Y as burstLabel,
319
+ ue as burstWriter,
320
+ F as createBurstTracker,
321
+ H as heldChangeCount,
322
+ O as isListPaused,
323
+ V as planRowOrder,
324
+ se as relayoutRows,
325
+ ae as resumeAsRefetch,
326
+ J as setListPaused,
327
+ ge as totalsMayMove,
328
+ he as useKeptEntries,
329
+ te as useListAnchors,
330
+ Q as useListPaused,
331
+ le as useLiveBurst,
332
+ ie as useLivePause,
333
+ pe as useSteadyRows
334
+ };