@nivaro/react 0.3.117 → 0.3.119

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 (138) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +136 -14
  4. package/dist/index.js +488 -485
  5. package/dist/shared/components/ActivityEntry.js +130 -125
  6. package/dist/shared/components/AgentPresenceChip.js +36 -26
  7. package/dist/shared/components/CellCopyLayer.js +50 -45
  8. package/dist/shared/components/CollectionBrowserView.js +3757 -3695
  9. package/dist/shared/components/FilePreviewLightbox.js +96 -58
  10. package/dist/shared/components/InStep.js +18 -17
  11. package/dist/shared/components/ItemEditForm.js +4451 -4385
  12. package/dist/shared/components/JobsTray.js +8 -8
  13. package/dist/shared/components/LiveNewMatchesPill.js +21 -14
  14. package/dist/shared/components/LiveOffNote.js +3 -2
  15. package/dist/shared/components/LiveRowMark.js +53 -23
  16. package/dist/shared/components/LiveTraceView.js +162 -123
  17. package/dist/shared/components/MyWorkView.js +320 -299
  18. package/dist/shared/components/NotificationBell.js +14 -14
  19. package/dist/shared/components/OverflowRail.js +1 -1
  20. package/dist/shared/components/PageRenderer.js +120 -116
  21. package/dist/shared/components/ProfileView.js +203 -202
  22. package/dist/shared/components/RealtimeStatusBanner.js +31 -29
  23. package/dist/shared/components/RecordDrilldownSheet.js +7 -7
  24. package/dist/shared/components/RecordHoverCard.js +102 -84
  25. package/dist/shared/components/RecordReadView.js +146 -146
  26. package/dist/shared/components/ScreenRefreshButton.js +34 -32
  27. package/dist/shared/components/TipLayer.js +65 -58
  28. package/dist/shared/components/WidgetImageMenu.js +83 -43
  29. package/dist/shared/components/activity/RecordActivityStream.js +175 -173
  30. package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
  31. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
  32. package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
  33. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
  34. package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
  35. package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
  36. package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
  37. package/dist/shared/components/collections-directory/page-model.js +72 -67
  38. package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
  39. package/dist/shared/components/integrations/SendStatus.js +65 -59
  40. package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
  41. package/dist/shared/components/integrations/console/SignalCard.js +237 -230
  42. package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
  43. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +135 -94
  44. package/dist/shared/components/item-edit/CloneDialog.js +191 -161
  45. package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
  46. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
  47. package/dist/shared/components/item-edit/FieldComments.js +88 -85
  48. package/dist/shared/components/item-edit/FieldPointer.js +82 -67
  49. package/dist/shared/components/item-edit/FieldRow.js +106 -100
  50. package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
  51. package/dist/shared/components/item-edit/FilePickerField.js +452 -387
  52. package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
  53. package/dist/shared/components/item-edit/HeaderTools.js +245 -141
  54. package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
  55. package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
  56. package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
  57. package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
  58. package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
  59. package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
  60. package/dist/shared/components/item-edit/RecalcValue.js +57 -32
  61. package/dist/shared/components/item-edit/RecordHelpChip.js +15 -16
  62. package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
  63. package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
  64. package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
  65. package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
  66. package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
  67. package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
  68. package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
  69. package/dist/shared/components/item-edit/SectionPresence.js +18 -10
  70. package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
  71. package/dist/shared/components/item-edit/UserChip.js +1 -1
  72. package/dist/shared/components/item-edit/addendum-view.js +6 -0
  73. package/dist/shared/components/item-edit/file-live.js +69 -54
  74. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  75. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  76. package/dist/shared/components/item-edit/removed-line.js +31 -25
  77. package/dist/shared/components/layout-editor/pickers/field-picker.js +151 -130
  78. package/dist/shared/components/list/ListViewers.js +46 -35
  79. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  80. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  81. package/dist/shared/components/panels/AlertBanners.js +82 -72
  82. package/dist/shared/components/panels/BranchLanes.js +22 -22
  83. package/dist/shared/components/panels/CommentImages.js +123 -102
  84. package/dist/shared/components/panels/CommentPanel.js +186 -185
  85. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  86. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  87. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  88. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  89. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  90. package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
  91. package/dist/shared/components/profile/AgentNameField.js +107 -81
  92. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  93. package/dist/shared/components/profile/PersonAccess.js +599 -495
  94. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  95. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  96. package/dist/shared/components/profile/primitives.js +1 -1
  97. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  98. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  99. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  100. package/dist/shared/components/support/AssignRules.js +1733 -0
  101. package/dist/shared/components/support/PersonPick.js +88 -0
  102. package/dist/shared/components/support/RequestList.js +790 -0
  103. package/dist/shared/components/support/ScreenShare.js +158 -152
  104. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  105. package/dist/shared/components/support/SupportView.js +140 -246
  106. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  107. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  108. package/dist/shared/components/support/assign-rules-text.js +171 -0
  109. package/dist/shared/components/support/support-list.js +125 -0
  110. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  111. package/dist/shared/components/ui/checkbox.js +6 -6
  112. package/dist/shared/components/ui/select.js +43 -39
  113. package/dist/shared/components/ui/sheet.js +9 -9
  114. package/dist/shared/components/ui/switch.js +12 -11
  115. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  116. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  117. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  118. package/dist/shared/lib/activity-sentence.js +103 -91
  119. package/dist/shared/lib/agent-presence.js +27 -21
  120. package/dist/shared/lib/approval-progress.js +2 -2
  121. package/dist/shared/lib/copy-rules.js +31 -24
  122. package/dist/shared/lib/derived-causes.js +113 -78
  123. package/dist/shared/lib/grid-cursors.js +26 -26
  124. package/dist/shared/lib/label-flash.js +27 -0
  125. package/dist/shared/lib/list-return.js +137 -125
  126. package/dist/shared/lib/live-deltas.js +40 -34
  127. package/dist/shared/lib/live-groups.js +56 -52
  128. package/dist/shared/lib/live-preference.js +64 -59
  129. package/dist/shared/lib/live-screen.js +223 -192
  130. package/dist/shared/lib/partner-failure.js +11 -11
  131. package/dist/shared/lib/rollup-recalc.js +68 -64
  132. package/dist/shared/lib/screen-refresh.js +74 -68
  133. package/dist/shared/lib/screen-share.js +108 -104
  134. package/dist/shared/lib/send-status.js +77 -61
  135. package/dist/shared/lib/text-diff-window.js +29 -0
  136. package/dist/shared/lib/watch-list.js +210 -209
  137. package/dist/shared/lib/widget-image-render.js +72 -49
  138. package/package.json +1 -1
@@ -11,7 +11,7 @@ import { readGroupStructure as Yt, isFolded as zt, isEmptyValue as ye, planField
11
11
  import { quietHiddenSectionsOf as Zt } from "../lib/layout-resolve.js";
12
12
  import { useLiveRecord as el } from "../lib/live.js";
13
13
  import { isDisplayFormulaField as Ce, resolvePlacementText as tl, displayFormulaOf as ll, formatDisplayValue as rl } from "../lib/placement-behaviour.js";
14
- import { invalidateRecordRow as al, useRecordReader as nl } from "../lib/record-loader.js";
14
+ import { invalidateRecordRow as nl, useRecordReader as al } from "../lib/record-loader.js";
15
15
  import { sanitizeHtml as il } from "../lib/sanitize-html.js";
16
16
  import { titleCase as Ze, formatRelative as We } from "../lib/utils.js";
17
17
  import { matchesVisibleWhen as sl } from "../lib/visible-when.js";
@@ -35,17 +35,17 @@ import { RecordHoverCard as et } from "./RecordHoverCard.js";
35
35
  import { RelativeTime as Fl } from "./RelativeTime.js";
36
36
  import { SimpleSelectXs as yt } from "./ui/SimpleSelect.js";
37
37
  import { WidgetSlot as ql } from "./WidgetSlot.js";
38
- const xe = (n) => {
39
- if (!n) return {};
40
- if (typeof n == "object") return n;
38
+ const xe = (a) => {
39
+ if (!a) return {};
40
+ if (typeof a == "object") return a;
41
41
  try {
42
- return JSON.parse(n);
42
+ return JSON.parse(a);
43
43
  } catch {
44
44
  return {};
45
45
  }
46
46
  }, Al = 3;
47
- function Rl(n) {
48
- let m = n;
47
+ function Rl(a) {
48
+ let m = a;
49
49
  if (typeof m == "string")
50
50
  try {
51
51
  m = JSON.parse(m);
@@ -65,17 +65,17 @@ function Rl(n) {
65
65
  }
66
66
  return b.filter((s) => !s.field.startsWith("__"));
67
67
  }
68
- const Nt = (n) => {
69
- const m = String(n).match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ]00:00:00(?:\.0+)?(?:Z|[+-]00:?00)?)?$/);
68
+ const Nt = (a) => {
69
+ const m = String(a).match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ]00:00:00(?:\.0+)?(?:Z|[+-]00:?00)?)?$/);
70
70
  if (m) return `${m[2]}/${m[3]}/${m[1]}`;
71
- const b = new Date(String(n));
72
- return Number.isNaN(b.getTime()) ? String(n) : `${String(b.getMonth() + 1).padStart(2, "0")}/${String(b.getDate()).padStart(2, "0")}/${b.getFullYear()}`;
73
- }, tt = (n) => {
74
- const m = Number(n);
75
- return Number.isNaN(m) ? String(n) : `$${m.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
76
- }, He = (n) => {
77
- const m = Number(n);
78
- return Number.isNaN(m) ? String(n) : m.toLocaleString("en-US");
71
+ const b = new Date(String(a));
72
+ return Number.isNaN(b.getTime()) ? String(a) : `${String(b.getMonth() + 1).padStart(2, "0")}/${String(b.getDate()).padStart(2, "0")}/${b.getFullYear()}`;
73
+ }, tt = (a) => {
74
+ const m = Number(a);
75
+ return Number.isNaN(m) ? String(a) : `$${m.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
76
+ }, He = (a) => {
77
+ const m = Number(a);
78
+ return Number.isNaN(m) ? String(a) : m.toLocaleString("en-US");
79
79
  }, Ie = "text-[11.5px] font-medium text-slate-500 dark:text-slate-400", le = () => /* @__PURE__ */ t("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }), Tl = `
80
80
  [data-read-board]{grid-template-columns:minmax(0,1fr)}
81
81
  [data-read-dl]{grid-template-columns:repeat(2,minmax(0,1fr))}
@@ -92,10 +92,10 @@ const Nt = (n) => {
92
92
  @media (min-width:1536px){[data-read-dl="full"]{grid-template-columns:repeat(6,minmax(0,1fr))}}
93
93
  `;
94
94
  function Ue({
95
- value: n,
95
+ value: a,
96
96
  trueTone: m = "positive"
97
97
  }) {
98
- const b = n === !0 || n === 1 || n === "1" || n === "true";
98
+ const b = a === !0 || a === 1 || a === "1" || a === "true";
99
99
  return /* @__PURE__ */ t(
100
100
  "span",
101
101
  {
@@ -104,11 +104,11 @@ function Ue({
104
104
  }
105
105
  );
106
106
  }
107
- function Ll({ collection: n, id: m }) {
108
- const b = Ne(), s = nl(), F = _t(), { data: N } = U({
109
- queryKey: ["cbv-collection-meta", n],
107
+ function Ll({ collection: a, id: m }) {
108
+ const b = Ne(), s = al(), F = _t(), { data: N } = U({
109
+ queryKey: ["cbv-collection-meta", a],
110
110
  queryFn: () => b.request(
111
- Y(`/collections/${n}`)
111
+ Y(`/collections/${a}`)
112
112
  ).then((A) => A.data).catch(() => ({ display_template: null, fields: [] })),
113
113
  staleTime: 10 * 6e4,
114
114
  retry: !1
@@ -117,8 +117,8 @@ function Ll({ collection: n, id: m }) {
117
117
  isPending: O,
118
118
  error: q
119
119
  } = U({
120
- queryKey: ["rrv-related", n, String(m)],
121
- queryFn: () => s(n, m),
120
+ queryKey: ["rrv-related", a, String(m)],
121
+ queryFn: () => s(a, m),
122
122
  enabled: m != null && !!N,
123
123
  staleTime: 6e4,
124
124
  retry: !1
@@ -126,7 +126,7 @@ function Ll({ collection: n, id: m }) {
126
126
  if (m == null) return /* @__PURE__ */ t(le, {});
127
127
  if (!_ && !q && (O || !N))
128
128
  return /* @__PURE__ */ t("span", { className: gl });
129
- if (!_) return /* @__PURE__ */ t(yl, { error: q, collection: n, id: m });
129
+ if (!_) return /* @__PURE__ */ t(yl, { error: q, collection: a, id: m });
130
130
  let f = "";
131
131
  const T = N == null ? void 0 : N.display_template;
132
132
  if (T && (f = T.replace(/\{\{\s*([^}]+?)\s*\}\}/g, (A, j) => {
@@ -148,34 +148,34 @@ function Ll({ collection: n, id: m }) {
148
148
  break;
149
149
  }
150
150
  }
151
- return ul(f) && (f = fl), F ? /* @__PURE__ */ t(et, { collection: n, id: m, children: /* @__PURE__ */ t(
151
+ return ul(f) && (f = fl), F ? /* @__PURE__ */ t(et, { collection: a, id: m, children: /* @__PURE__ */ t(
152
152
  "button",
153
153
  {
154
154
  type: "button",
155
- onClick: () => F.open({ collection: n, itemId: String(m) }),
156
- className: "text-left underline decoration-slate-300 underline-offset-2 transition-colors hover:text-[#007a99] hover:decoration-[#007a99] dark:decoration-slate-600 dark:hover:text-nvr-cyan dark:hover:decoration-nvr-cyan",
155
+ onClick: () => F.open({ collection: a, itemId: String(m) }),
156
+ className: "inline-block max-w-full truncate text-left align-bottom underline decoration-slate-300 underline-offset-2 transition-colors hover:text-[#007a99] hover:decoration-[#007a99] dark:decoration-slate-600 dark:hover:text-nvr-cyan dark:hover:decoration-nvr-cyan",
157
157
  children: f
158
158
  }
159
- ) }) : /* @__PURE__ */ t(et, { collection: n, id: m, children: f });
159
+ ) }) : /* @__PURE__ */ t(et, { collection: a, id: m, children: f });
160
160
  }
161
- function Ol({ id: n }) {
161
+ function Ol({ id: a }) {
162
162
  const m = Ne(), { apiBase: b } = Vt(), { data: s, isPending: F } = U({
163
- queryKey: ["rrv-file-meta", String(n)],
163
+ queryKey: ["rrv-file-meta", String(a)],
164
164
  queryFn: () => m.request(
165
- Y(`/files/${n}/meta`)
165
+ Y(`/files/${a}/meta`)
166
166
  ).then((_) => _.data).catch(() => null),
167
- enabled: n != null,
167
+ enabled: a != null,
168
168
  staleTime: 5 * 6e4,
169
169
  retry: !1
170
170
  });
171
- if (n == null) return /* @__PURE__ */ t(le, {});
171
+ if (a == null) return /* @__PURE__ */ t(le, {});
172
172
  if (!s && F)
173
173
  return /* @__PURE__ */ t("span", { className: "inline-block h-3.5 w-24 animate-pulse rounded bg-slate-100 align-middle dark:bg-[hsl(var(--nvr-skeleton))]" });
174
- const N = (s == null ? void 0 : s.title) || (s == null ? void 0 : s.filename_download) || `#${String(n)}`;
174
+ const N = (s == null ? void 0 : s.title) || (s == null ? void 0 : s.filename_download) || `#${String(a)}`;
175
175
  return /* @__PURE__ */ t(
176
176
  "a",
177
177
  {
178
- href: `${b}/files/${n}`,
178
+ href: `${b}/files/${a}`,
179
179
  target: "_blank",
180
180
  rel: "noreferrer",
181
181
  className: "underline decoration-slate-300 underline-offset-2 transition-colors hover:text-[#007a99] hover:decoration-[#007a99] dark:decoration-slate-600 dark:hover:text-nvr-cyan dark:hover:decoration-nvr-cyan",
@@ -183,9 +183,9 @@ function Ol({ id: n }) {
183
183
  }
184
184
  );
185
185
  }
186
- const lt = ({ collection: n, id: m }) => n === "nivaro_files" ? /* @__PURE__ */ t(Ol, { id: m }) : /* @__PURE__ */ t(Ll, { collection: n, id: m });
186
+ const lt = ({ collection: a, id: m }) => a === "nivaro_files" ? /* @__PURE__ */ t(Ol, { id: m }) : /* @__PURE__ */ t(Ll, { collection: a, id: m });
187
187
  function Cl({
188
- junction: n,
188
+ junction: a,
189
189
  parentFk: m,
190
190
  junctionField: b,
191
191
  parentId: s,
@@ -195,12 +195,12 @@ function Cl({
195
195
  }) {
196
196
  var W;
197
197
  const O = Ne(), { data: q } = U({
198
- queryKey: ["cbv-collection-meta", n],
199
- queryFn: () => O.request(Y(`/collections/${n}`)).then((v) => v.data),
198
+ queryKey: ["cbv-collection-meta", a],
199
+ queryFn: () => O.request(Y(`/collections/${a}`)).then((v) => v.data),
200
200
  staleTime: 10 * 6e4,
201
201
  retry: !1
202
202
  }), f = ((q == null ? void 0 : q.relations) ?? []).find(
203
- (v) => v.many_collection === n && v.many_field === b
203
+ (v) => v.many_collection === a && v.many_field === b
204
204
  ), T = Gt(f == null ? void 0 : f.one_allowed_collections), A = !!f && !f.one_collection && (T.length > 0 || !!f.one_collection_field), j = (f == null ? void 0 : f.one_collection_field) ?? "collection", w = (v) => v ? v === "directus_users" ? "nivaro_users" : v : null, x = (f == null ? void 0 : f.one_collection) ?? (A ? T.some((v) => v === "directus_users" || v === "nivaro_users") ? "nivaro_users" : w(T[0]) : null), { data: g } = U({
205
205
  // Under the edit form's ['m2m-items', junction, parentFk, parentId] prefix (a longer key,
206
206
  // so never the same cache entry): every link write that refreshes the form's list —
@@ -208,7 +208,7 @@ function Cl({
208
208
  // 'rrv-m2m' key heard none of them, so a file added this session never showed here.
209
209
  queryKey: [
210
210
  "m2m-items",
211
- n,
211
+ a,
212
212
  m,
213
213
  s,
214
214
  "rrv",
@@ -216,7 +216,7 @@ function Cl({
216
216
  A ? j : ""
217
217
  ],
218
218
  queryFn: () => O.request(
219
- Y(`/items/${n}`, {
219
+ Y(`/items/${a}`, {
220
220
  filter: JSON.stringify({ [m]: { _eq: s } }),
221
221
  fields: A ? `id,${b},${j}` : `id,${b}`,
222
222
  limit: 200
@@ -260,7 +260,7 @@ function Cl({
260
260
  )) });
261
261
  }
262
262
  function Dl({
263
- collection: n,
263
+ collection: a,
264
264
  fkField: m,
265
265
  parentId: b,
266
266
  layoutId: s,
@@ -274,19 +274,19 @@ function Dl({
274
274
  return f.length >= 2 ? ((l = f.find((d) => d.name === N)) == null ? void 0 : l.name) ?? f[0].name : "__all__";
275
275
  }
276
276
  ), { data: j } = U({
277
- queryKey: ["cbv-collection-meta", n],
278
- queryFn: () => O.request(Y(`/collections/${n}`)).then((l) => l.data),
277
+ queryKey: ["cbv-collection-meta", a],
278
+ queryFn: () => O.request(Y(`/collections/${a}`)).then((l) => l.data),
279
279
  staleTime: 10 * 6e4,
280
280
  retry: !1
281
281
  }), w = (l) => {
282
282
  var d;
283
283
  return ((d = ((j == null ? void 0 : j.relations) ?? []).find(
284
- (o) => o.many_collection === n && o.many_field === l && o.one_collection
284
+ (o) => o.many_collection === a && o.many_field === l && o.one_collection
285
285
  )) == null ? void 0 : d.one_collection) ?? null;
286
286
  }, { data: x } = U({
287
- queryKey: ["rrv-cols", n, s ?? null],
287
+ queryKey: ["rrv-cols", a, s ?? null],
288
288
  queryFn: () => O.request(
289
- Y(`/field-config/${n}`, s ? { layout_id: s } : {})
289
+ Y(`/field-config/${a}`, s ? { layout_id: s } : {})
290
290
  ).then((l) => ({
291
291
  // Lines carry their own number — sort by it and show it first.
292
292
  lineNo: (l.data ?? []).some((d) => d.field === "line_number"),
@@ -326,9 +326,9 @@ function Dl({
326
326
  isLoading: ue,
327
327
  isFetching: Ee
328
328
  } = U({
329
- queryKey: ["rrv-rows", n, m, b, W, C, k, De],
329
+ queryKey: ["rrv-rows", a, m, b, W, C, k, De],
330
330
  queryFn: () => O.request(
331
- Y(`/items/${n}`, {
331
+ Y(`/items/${a}`, {
332
332
  limit: u,
333
333
  page: k,
334
334
  ...W ? { sort: W } : C ? { sort: "line_number" } : {},
@@ -345,12 +345,12 @@ function Dl({
345
345
  const fe = D.filter((l) => l.field.includes(".")), pe = E.map((l) => String(l.id)), { data: z } = U({
346
346
  queryKey: [
347
347
  "rrv-resolve-paths",
348
- n,
348
+ a,
349
349
  fe.map((l) => l.field).join(","),
350
350
  pe.join(",")
351
351
  ],
352
352
  queryFn: () => O.request(
353
- Y(`/items/${n}/resolve-paths`, {
353
+ Y(`/items/${a}/resolve-paths`, {
354
354
  ids: pe.join(","),
355
355
  paths: fe.map((l) => l.field).join(",")
356
356
  })
@@ -378,11 +378,11 @@ function Dl({
378
378
  const Be = (l, d) => {
379
379
  var M, re;
380
380
  if (d.field.includes(".")) {
381
- const ae = (M = z == null ? void 0 : z.rows[String(l.id)]) == null ? void 0 : M[d.field];
381
+ const ne = (M = z == null ? void 0 : z.rows[String(l.id)]) == null ? void 0 : M[d.field];
382
382
  if (!z)
383
383
  return /* @__PURE__ */ t("span", { className: "inline-block h-3 w-14 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" });
384
- if (!ae || ae.value === "") return /* @__PURE__ */ t(le, {});
385
- const qe = z.targets[d.field], he = (re = ae.ids) == null ? void 0 : re[0];
384
+ if (!ne || ne.value === "") return /* @__PURE__ */ t(le, {});
385
+ const qe = z.targets[d.field], he = (re = ne.ids) == null ? void 0 : re[0];
386
386
  return q && qe && he ? /* @__PURE__ */ t(et, { collection: qe, id: he, children: /* @__PURE__ */ t(
387
387
  "button",
388
388
  {
@@ -390,10 +390,10 @@ function Dl({
390
390
  onClick: (Ge) => {
391
391
  Ge.stopPropagation(), q.open({ collection: qe, itemId: String(he) });
392
392
  },
393
- className: "text-left underline decoration-slate-300 underline-offset-2 hover:text-[#007a99] dark:decoration-slate-600 dark:hover:text-nvr-cyan",
394
- children: ae.value
393
+ className: "inline-block max-w-full truncate text-left align-bottom underline decoration-slate-300 underline-offset-2 hover:text-[#007a99] dark:decoration-slate-600 dark:hover:text-nvr-cyan",
394
+ children: ne.value
395
395
  }
396
- ) }) : ae.value;
396
+ ) }) : ne.value;
397
397
  }
398
398
  const o = l[d.field];
399
399
  if (d.type === "boolean" && o == null) return /* @__PURE__ */ t(Ue, { value: !1 });
@@ -539,7 +539,7 @@ function Dl({
539
539
  E.map((l) => /* @__PURE__ */ p(
540
540
  "tr",
541
541
  {
542
- onClick: q ? () => q.open({ collection: n, itemId: String(l.id) }) : void 0,
542
+ onClick: q ? () => q.open({ collection: a, itemId: String(l.id) }) : void 0,
543
543
  className: `border-b border-slate-100 last:border-0 dark:border-slate-800 ${q ? "cursor-pointer hover:bg-nvr-cyan/5 dark:hover:bg-nvr-cyan/10" : ""}`,
544
544
  children: [
545
545
  P && /* @__PURE__ */ t("td", { className: "px-2 py-1.5 text-right text-[11px] tabular-nums text-slate-400", children: l.line_number == null ? "" : String(l.line_number) }),
@@ -647,7 +647,7 @@ function Dl({
647
647
  ] });
648
648
  }
649
649
  function xt({
650
- collection: n,
650
+ collection: a,
651
651
  itemId: m,
652
652
  layoutData: b,
653
653
  design: s,
@@ -676,7 +676,7 @@ function xt({
676
676
  )
677
677
  ].sort(),
678
678
  [g, s]
679
- ), { data: W } = cl(n, x, D), v = (e) => {
679
+ ), { data: W } = cl(a, x, D), v = (e) => {
680
680
  const r = W == null ? void 0 : W[e];
681
681
  if (!r) return null;
682
682
  const i = r.via !== "user";
@@ -685,7 +685,7 @@ function xt({
685
685
  {
686
686
  activityId: r.activity_id,
687
687
  callerName: r.caller.name,
688
- collection: n,
688
+ collection: a,
689
689
  itemId: x,
690
690
  children: /* @__PURE__ */ p(
691
691
  "button",
@@ -715,7 +715,7 @@ function xt({
715
715
  className: `ml-1 inline-block h-1.5 w-1.5 rounded-full align-middle ${i ? "bg-amber-400" : "bg-slate-300 dark:bg-slate-600"}`
716
716
  }
717
717
  );
718
- }, { data: k } = Sl(n, x, !!_ && !s), $ = _e(
718
+ }, { data: k } = Sl(a, x, !!_ && !s), $ = _e(
719
719
  () => _ && (k != null && k.enabled) ? $l(k.findings) : null,
720
720
  [_, k]
721
721
  ), ie = ({ field: e }) => {
@@ -735,26 +735,26 @@ function xt({
735
735
  }
736
736
  );
737
737
  }, { data: V } = U({
738
- queryKey: ["cbv-collection-meta", n],
738
+ queryKey: ["cbv-collection-meta", a],
739
739
  queryFn: () => T.request(
740
- Y(`/collections/${n}`)
740
+ Y(`/collections/${a}`)
741
741
  ).then((e) => e.data),
742
742
  staleTime: 10 * 6e4,
743
743
  retry: !1
744
744
  }), Z = vt(), { data: De } = U({
745
- queryKey: ["rrv-record", n, x],
745
+ queryKey: ["rrv-record", a, x],
746
746
  enabled: !s,
747
- queryFn: () => T.request(Y(`/items/${n}/${x}`)).then((e) => e.data),
748
- initialData: () => Z.getQueryData(["item", n, x]) ?? void 0,
747
+ queryFn: () => T.request(Y(`/items/${a}/${x}`)).then((e) => e.data),
748
+ initialData: () => Z.getQueryData(["item", a, x]) ?? void 0,
749
749
  initialDataUpdatedAt: () => {
750
750
  var e;
751
- return (e = Z.getQueryState(["item", n, x])) == null ? void 0 : e.dataUpdatedAt;
751
+ return (e = Z.getQueryState(["item", a, x])) == null ? void 0 : e.dataUpdatedAt;
752
752
  },
753
753
  staleTime: 3e4,
754
754
  retry: !1
755
755
  }), u = j ?? De;
756
- el(n, s ? null : x, (e) => {
757
- e.aspectsOnly || e.deleted || (Z.invalidateQueries({ queryKey: ["rrv-record", n, x] }), Z.invalidateQueries({ queryKey: ["field-touch", n, x] }));
756
+ el(a, s ? null : x, (e) => {
757
+ e.aspectsOnly || e.deleted || (Z.invalidateQueries({ queryKey: ["rrv-record", a, x] }), Z.invalidateQueries({ queryKey: ["field-touch", a, x] }));
758
758
  });
759
759
  const B = It(null), [ue, Ee] = Q(() => /* @__PURE__ */ new Set());
760
760
  ke(() => {
@@ -769,10 +769,10 @@ function xt({
769
769
  return () => clearTimeout(i);
770
770
  }, [u, s]);
771
771
  const E = (e) => ue.has(e) ? " nvr-value-pulse-bg rounded-sm" : "", { data: ee } = U({
772
- queryKey: ["rrv-field-config", n, g.layout.id],
772
+ queryKey: ["rrv-field-config", a, g.layout.id],
773
773
  enabled: !s,
774
774
  queryFn: () => T.request(
775
- Y(`/field-config/${n}`, { layout_id: g.layout.id })
775
+ Y(`/field-config/${a}`, { layout_id: g.layout.id })
776
776
  ).then((e) => e.data ?? []).catch(() => null),
777
777
  staleTime: 5 * 6e4,
778
778
  retry: !1
@@ -782,10 +782,10 @@ function xt({
782
782
  ), fe = (V == null ? void 0 : V.relations) ?? [], pe = (e) => {
783
783
  var r;
784
784
  return ((r = fe.find(
785
- (i) => i.many_collection === n && i.many_field === e && i.one_collection
785
+ (i) => i.many_collection === a && i.many_field === e && i.one_collection
786
786
  )) == null ? void 0 : r.one_collection) ?? null;
787
787
  }, z = (e) => fe.find(
788
- (r) => r.one_collection === n && (r.one_field === e || r.many_collection === e)
788
+ (r) => r.one_collection === a && (r.one_field === e || r.many_collection === e)
789
789
  ) ?? null, P = (e) => {
790
790
  var r;
791
791
  return !((e.is_visible === void 0 || e.is_visible) && xe(e.overrides).hidden !== !0 && !((r = H.get(e.field)) != null && r.hidden));
@@ -838,7 +838,7 @@ function xt({
838
838
  widgetId: c.widget_id,
839
839
  inputBindings: Ve(c),
840
840
  itemDraft: u ?? {},
841
- itemCollection: n,
841
+ itemCollection: a,
842
842
  ready: !!u,
843
843
  label: c.label_override ?? void 0,
844
844
  defaultExpanded: c.default_expanded == null ? !0 : !!c.default_expanded,
@@ -849,7 +849,7 @@ function xt({
849
849
  ),
850
850
  P(c)
851
851
  ) }, c.field)) });
852
- }, [ae, qe] = Q(() => /* @__PURE__ */ new Set()), he = w || !u ? [] : xl({
852
+ }, [ne, qe] = Q(() => /* @__PURE__ */ new Set()), he = w || !u ? [] : xl({
853
853
  groups: g.groups.filter(
854
854
  (e) => e.type !== "container" && e.visibility_mode !== "new_only"
855
855
  ),
@@ -866,7 +866,7 @@ function xt({
866
866
  const i = new Set(r);
867
867
  return i.has(e) ? i.delete(e) : i.add(e), i;
868
868
  }), rt = [...g.groups].sort((e, r) => e.sort - r.sort).filter((e) => w || e.visibility_mode !== "new_only").filter(
869
- (e) => w || !u || ae.has(e.key) || sl(e.visible_when, u)
869
+ (e) => w || !u || ne.has(e.key) || sl(e.visible_when, u)
870
870
  ), [wt, Je] = Q(() => /* @__PURE__ */ new Set()), be = (e) => !e.is_collapsed || wt.has(e.key), St = (e) => Je((r) => {
871
871
  const i = new Set(r);
872
872
  return i.has(e) ? i.delete(e) : i.add(e), i;
@@ -889,7 +889,7 @@ function xt({
889
889
  const G = (e) => {
890
890
  var r;
891
891
  return !!((r = z(e.field)) != null && r.junction_field);
892
- }, at = (e) => {
892
+ }, nt = (e) => {
893
893
  var i;
894
894
  const r = String(
895
895
  xe(e.overrides).interface ?? ((i = H.get(e.field)) == null ? void 0 : i.interface) ?? ""
@@ -901,7 +901,7 @@ function xt({
901
901
  return /* @__PURE__ */ t(
902
902
  El,
903
903
  {
904
- collection: n,
904
+ collection: a,
905
905
  itemId: String(x),
906
906
  field: e.field,
907
907
  value: u[e.field],
@@ -942,7 +942,7 @@ function xt({
942
942
  }
943
943
  );
944
944
  const te = i.options ?? {};
945
- return at(e) && typeof y == "string" ? /^\s*\{/.test(y) ? /* @__PURE__ */ t("div", { className: "min-w-0 whitespace-pre-wrap font-normal [overflow-wrap:anywhere]", children: ml(y) }) : /* @__PURE__ */ t(
945
+ return nt(e) && typeof y == "string" ? /^\s*\{/.test(y) ? /* @__PURE__ */ t("div", { className: "min-w-0 whitespace-pre-wrap font-normal [overflow-wrap:anywhere]", children: ml(y) }) : /* @__PURE__ */ t(
946
946
  "div",
947
947
  {
948
948
  className: "rrv-prose min-w-0 font-normal leading-relaxed [overflow-wrap:anywhere] [&_a]:underline [&_h1]:text-[15px] [&_h1]:font-semibold [&_h2]:text-[14px] [&_h2]:font-semibold [&_h3]:font-semibold [&_li]:ml-4 [&_ol]:list-decimal [&_p]:my-1 [&_ul]:list-disc",
@@ -978,7 +978,7 @@ function xt({
978
978
  },
979
979
  e.field
980
980
  );
981
- }, X = (e) => !!z(e.field) && !G(e), Ft = !!g.layout.hide_empty, nt = Array.isArray(g.layout.header_fields) ? g.layout.header_fields.filter((e) => typeof e == "string") : [], qt = new Set(nt), At = (e) => {
981
+ }, X = (e) => !!z(e.field) && !G(e), Ft = !!g.layout.hide_empty, at = Array.isArray(g.layout.header_fields) ? g.layout.header_fields.filter((e) => typeof e == "string") : [], qt = new Set(at), At = (e) => {
982
982
  if (!u || G(e)) return !1;
983
983
  const r = u[e.field];
984
984
  return r == null || r === "" || Array.isArray(r) && r.length === 0;
@@ -987,55 +987,55 @@ function xt({
987
987
  const r = xe(e.overrides).label, i = A ? tl(e.overrides, A).label : void 0;
988
988
  return i !== void 0 ? i : Ce(e.field) ? typeof r == "string" && r.trim() ? r : "Formula" : typeof r == "string" && r.trim() ? r : e.label_override || ((c = H.get(e.field)) == null ? void 0 : c.label) || Ze(e.field);
989
989
  }, Tt = (e) => {
990
- const r = Yt(e.swap_config), i = se.filter((a) => a.group_key === e.key && !qt.has(a.field)).filter((a) => w || !u || !zt(a.overrides) || !ye(u[a.field])).sort((a, R) => a.sort - R.sort), c = de.filter((a) => a.group_key === e.key), y = Me(e.key), I = i.length === 0 && c.length === 0 && y.length === 0;
990
+ const r = Yt(e.swap_config), i = se.filter((n) => n.group_key === e.key && !qt.has(n.field)).filter((n) => w || !u || !zt(n.overrides) || !ye(u[n.field])).sort((n, R) => n.sort - R.sort), c = de.filter((n) => n.group_key === e.key), y = Me(e.key), I = i.length === 0 && c.length === 0 && y.length === 0;
991
991
  if (I && !s) return null;
992
- const te = (a) => Ft && !w && (X(a) || G(a)) && ((f == null ? void 0 : f[a.field]) ?? l[a.field]) === 0, K = i.filter((a) => !X(a)), me = i.filter(X), je = c.filter((a) => Fe(a.field)), Ot = !e.hide_when_empty && y.length === 0 && je.length === 0 && i.length > 0 && i.some((a) => X(a) || G(a)) && i.every(te), Ye = (a) => !Ot && te(a), Ct = i.filter((a) => !Ye(a)), ge = (a) => (f == null ? void 0 : f[a.field]) ?? l[a.field], Dt = !!e.hide_when_empty && !s && !w && !!u && y.length === 0 && je.length === 0 && i.every((a) => X(a) || G(a) ? ge(a) === 0 : ye(u[a.field])) || !I && Ct.length === 0 && y.length === 0 && je.length === 0, Et = (a) => (f == null ? void 0 : f[a.field]) ?? l[a.field], ze = !!r.emptyText && !!u && !s && y.length === 0 && je.length === 0 && i.every((a) => X(a) || G(a) ? Et(a) === 0 : ye(u[a.field])), Pt = Xt(K, { rows: r.rows }).units, Xe = e.is_collapsed ? Rl(e.summary_fields).map((a) => {
993
- const R = i.find((Le) => Le.field === a.field);
994
- return R ? { a: R, label: a.label || ce(R) } : null;
995
- }).filter((a) => !!a).filter(
996
- ({ a }) => !e.summary_hide_empty || !u || (X(a) || G(a) ? ge(a) !== 0 : !ye(u[a.field]))
997
- ).slice(0, Al) : [], ct = e.read_width === "full" || e.read_width === "half" || e.read_width === "third" ? e.read_width : me.length > 0 || c.length > 0 || y.length > 0 || K.length > 4 ? "full" : "half", Mt = (a) => {
992
+ const te = (n) => Ft && !w && (X(n) || G(n)) && ((f == null ? void 0 : f[n.field]) ?? l[n.field]) === 0, K = i.filter((n) => !X(n)), me = i.filter(X), je = c.filter((n) => Fe(n.field)), Ot = !e.hide_when_empty && y.length === 0 && je.length === 0 && i.length > 0 && i.some((n) => X(n) || G(n)) && i.every(te), Ye = (n) => !Ot && te(n), Ct = i.filter((n) => !Ye(n)), ge = (n) => (f == null ? void 0 : f[n.field]) ?? l[n.field], Dt = !!e.hide_when_empty && !s && !w && !!u && y.length === 0 && je.length === 0 && i.every((n) => X(n) || G(n) ? ge(n) === 0 : ye(u[n.field])) || !I && Ct.length === 0 && y.length === 0 && je.length === 0, Et = (n) => (f == null ? void 0 : f[n.field]) ?? l[n.field], ze = !!r.emptyText && !!u && !s && y.length === 0 && je.length === 0 && i.every((n) => X(n) || G(n) ? Et(n) === 0 : ye(u[n.field])), Pt = Xt(K, { rows: r.rows }).units, Xe = e.is_collapsed ? Rl(e.summary_fields).map((n) => {
993
+ const R = i.find((Le) => Le.field === n.field);
994
+ return R ? { a: R, label: n.label || ce(R) } : null;
995
+ }).filter((n) => !!n).filter(
996
+ ({ a: n }) => !e.summary_hide_empty || !u || (X(n) || G(n) ? ge(n) !== 0 : !ye(u[n.field]))
997
+ ).slice(0, Al) : [], ct = e.read_width === "full" || e.read_width === "half" || e.read_width === "third" ? e.read_width : me.length > 0 || c.length > 0 || y.length > 0 || K.length > 4 ? "full" : "half", Mt = (n) => {
998
998
  var ft, pt, ht;
999
- const R = Ye(a), J = !!(xe(a.overrides).options ?? {}).emphasis, Oe = at(a) || !!((pt = (ft = H.get(a.field)) == null ? void 0 : ft.interface) != null && pt.includes("rich-text")), mt = u == null ? void 0 : u[a.field], ut = !Oe && !G(a) && !pe(a.field) && (String(((ht = H.get(a.field)) == null ? void 0 : ht.interface) ?? "").includes("textarea") || typeof mt == "string" && mt.length > 36);
999
+ const R = Ye(n), J = !!(xe(n.overrides).options ?? {}).emphasis, Oe = nt(n) || !!((pt = (ft = H.get(n.field)) == null ? void 0 : ft.interface) != null && pt.includes("rich-text")), mt = u == null ? void 0 : u[n.field], ut = !Oe && !G(n) && !pe(n.field) && (String(((ht = H.get(n.field)) == null ? void 0 : ht.interface) ?? "").includes("textarea") || typeof mt == "string" && mt.length > 36);
1000
1000
  return /* @__PURE__ */ t(
1001
1001
  "div",
1002
1002
  {
1003
1003
  hidden: R,
1004
- className: `min-w-0 ${Oe || G(a) && (h[a.field] === "nivaro_files" || (l[a.field] ?? 0) > 3) ? "col-span-full" : J || ut ? "col-span-2" : ""}`,
1004
+ className: `min-w-0 ${Oe || G(n) && (h[n.field] === "nivaro_files" || (l[n.field] ?? 0) > 3) ? "col-span-full" : J || ut ? "col-span-2" : ""}`,
1005
1005
  children: S(
1006
- C(a),
1006
+ C(n),
1007
1007
  /* @__PURE__ */ p(ve, { children: [
1008
1008
  /* @__PURE__ */ p("dt", { className: Ie, children: [
1009
- ce(a),
1010
- /* @__PURE__ */ t(ie, { field: a.field }),
1011
- /* @__PURE__ */ t(gt, { field: a.field }),
1012
- v(a.field)
1009
+ ce(n),
1010
+ /* @__PURE__ */ t(ie, { field: n.field }),
1011
+ /* @__PURE__ */ t(gt, { field: n.field }),
1012
+ v(n.field)
1013
1013
  ] }),
1014
1014
  /* @__PURE__ */ t(
1015
1015
  "dd",
1016
1016
  {
1017
- "data-replay-field": a.field,
1018
- "data-field-collection": n,
1019
- "data-remote-changed": ue.has(a.field) || void 0,
1020
- className: `mt-1 min-w-0${E(a.field)} ${J ? "text-[17px] font-semibold tracking-[-0.01em] text-slate-900 dark:text-white" : `${G(a) || Oe ? "" : ut ? "line-clamp-3 break-words " : "truncate "}text-[13px] font-medium text-slate-800 dark:text-slate-100`}`,
1021
- children: u ? Te(a) : /* @__PURE__ */ t("span", { className: "inline-block h-3.5 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
1017
+ "data-replay-field": n.field,
1018
+ "data-field-collection": a,
1019
+ "data-remote-changed": ue.has(n.field) || void 0,
1020
+ className: `mt-1 min-w-0${E(n.field)} ${J ? "text-[17px] font-semibold tracking-[-0.01em] text-slate-900 dark:text-white" : `${G(n) || Oe ? "" : ut ? "line-clamp-3 break-words " : "truncate "}text-[13px] font-medium text-slate-800 dark:text-slate-100`}`,
1021
+ children: u ? Te(n) : /* @__PURE__ */ t("span", { className: "inline-block h-3.5 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
1022
1022
  }
1023
1023
  )
1024
1024
  ] }),
1025
- P(a)
1025
+ P(n)
1026
1026
  )
1027
1027
  },
1028
- a.field
1028
+ n.field
1029
1029
  );
1030
- }, Kt = (a, R) => {
1030
+ }, Kt = (n, R) => {
1031
1031
  const Le = u && !s ? R.filter((J) => !ye(u[J.field])) : R;
1032
1032
  return /* @__PURE__ */ p(
1033
1033
  "div",
1034
1034
  {
1035
- "data-read-row": a.key,
1035
+ "data-read-row": n.key,
1036
1036
  className: `min-w-0 ${R.length > 2 ? "col-span-full" : "col-span-2"}`,
1037
1037
  children: [
1038
- /* @__PURE__ */ t("dt", { className: Ie, children: a.label.trim() || R.map(ce).join(" / ") }),
1038
+ /* @__PURE__ */ t("dt", { className: Ie, children: n.label.trim() || R.map(ce).join(" / ") }),
1039
1039
  /* @__PURE__ */ t("dd", { className: "mt-1 flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-[13px] font-medium text-slate-800 dark:text-slate-100", children: u ? Le.length === 0 ? /* @__PURE__ */ t(le, {}) : Le.map((J, Oe) => /* @__PURE__ */ p(Ht, { children: [
1040
1040
  Oe > 0 && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "text-slate-300 dark:text-slate-600", children: "·" }),
1041
1041
  S(
@@ -1044,7 +1044,7 @@ function xt({
1044
1044
  "span",
1045
1045
  {
1046
1046
  "data-replay-field": J.field,
1047
- "data-field-collection": n,
1047
+ "data-field-collection": a,
1048
1048
  className: `min-w-0 break-words${E(J.field)}`,
1049
1049
  children: Te(J)
1050
1050
  }
@@ -1054,7 +1054,7 @@ function xt({
1054
1054
  ] }, J.field)) : /* @__PURE__ */ t("span", { className: "inline-block h-3.5 w-28 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) })
1055
1055
  ]
1056
1056
  },
1057
- `row:${a.key}`
1057
+ `row:${n.key}`
1058
1058
  );
1059
1059
  };
1060
1060
  return /* @__PURE__ */ t(
@@ -1091,10 +1091,10 @@ function xt({
1091
1091
  {
1092
1092
  "data-read-collapsed-summary": e.key,
1093
1093
  className: "pointer-events-none flex min-w-0 flex-1 items-baseline gap-x-3 overflow-hidden whitespace-nowrap text-[12px] font-normal",
1094
- children: Xe.map(({ a, label: R }) => /* @__PURE__ */ p("span", { className: "flex min-w-0 shrink items-baseline gap-1", children: [
1094
+ children: Xe.map(({ a: n, label: R }) => /* @__PURE__ */ p("span", { className: "flex min-w-0 shrink items-baseline gap-1", children: [
1095
1095
  /* @__PURE__ */ t("span", { className: "shrink-0 text-[10px] font-semibold uppercase tracking-wider text-slate-400 dark:text-slate-500", children: R }),
1096
- /* @__PURE__ */ t("span", { className: "min-w-0 truncate font-medium text-slate-700 dark:text-slate-300", children: u ? X(a) || G(a) ? ge(a) == null ? "…" : `${ge(a)} ${X(a) ? ge(a) === 1 ? "row" : "rows" : ge(a) === 1 ? "item" : "items"}` : ye(u[a.field]) ? /* @__PURE__ */ t("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : Te(a) : "…" })
1097
- ] }, a.field))
1096
+ /* @__PURE__ */ t("span", { className: "min-w-0 truncate font-medium text-slate-700 dark:text-slate-300", children: u ? X(n) || G(n) ? ge(n) == null ? "…" : `${ge(n)} ${X(n) ? ge(n) === 1 ? "row" : "rows" : ge(n) === 1 ? "item" : "items"}` : ye(u[n.field]) ? /* @__PURE__ */ t("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : Te(n) : "…" })
1097
+ ] }, n.field))
1098
1098
  }
1099
1099
  )
1100
1100
  ] }) : /* @__PURE__ */ t("span", { className: "min-w-0 flex-1", children: e.label }),
@@ -1104,8 +1104,8 @@ function xt({
1104
1104
  type: "button",
1105
1105
  "data-read-edit-section": e.key,
1106
1106
  onClick: () => {
1107
- var a, R;
1108
- return q(e.key, ((a = K[0]) == null ? void 0 : a.field) ?? ((R = me[0]) == null ? void 0 : R.field) ?? null);
1107
+ var n, R;
1108
+ return q(e.key, ((n = K[0]) == null ? void 0 : n.field) ?? ((R = me[0]) == null ? void 0 : R.field) ?? null);
1109
1109
  },
1110
1110
  title: `Edit ${e.label}`,
1111
1111
  "aria-label": `Edit ${e.label}`,
@@ -1143,37 +1143,37 @@ function xt({
1143
1143
  "data-read-dl": ct,
1144
1144
  style: ze ? { display: "none" } : void 0,
1145
1145
  children: Pt.map(
1146
- (a) => a.kind === "row" ? Kt(a.row, a.members) : Mt(a.field)
1146
+ (n) => n.kind === "row" ? Kt(n.row, n.members) : Mt(n.field)
1147
1147
  )
1148
1148
  }
1149
1149
  ),
1150
- me.map((a) => {
1150
+ me.map((n) => {
1151
1151
  var R;
1152
1152
  return /* @__PURE__ */ t(
1153
1153
  "div",
1154
1154
  {
1155
1155
  className: K.length > 0 ? "mt-3" : "",
1156
- hidden: Ye(a) || ze,
1156
+ hidden: Ye(n) || ze,
1157
1157
  children: S(
1158
- C(a),
1158
+ C(n),
1159
1159
  /* @__PURE__ */ p(ve, { children: [
1160
- (R = $ == null ? void 0 : $.get(a.field)) != null && R.length ? /* @__PURE__ */ p("div", { className: "mb-1.5 flex items-center gap-1.5 text-[11px] font-medium text-amber-700 dark:text-amber-300", children: [
1161
- /* @__PURE__ */ t("span", { children: ce(a) }),
1162
- /* @__PURE__ */ t(ie, { field: a.field }),
1160
+ (R = $ == null ? void 0 : $.get(n.field)) != null && R.length ? /* @__PURE__ */ p("div", { className: "mb-1.5 flex items-center gap-1.5 text-[11px] font-medium text-amber-700 dark:text-amber-300", children: [
1161
+ /* @__PURE__ */ t("span", { children: ce(n) }),
1162
+ /* @__PURE__ */ t(ie, { field: n.field }),
1163
1163
  /* @__PURE__ */ p("span", { className: "font-normal text-amber-700/80 dark:text-amber-300/80", children: [
1164
1164
  "— ",
1165
- $.get(a.field).length,
1165
+ $.get(n.field).length,
1166
1166
  " line issue",
1167
- $.get(a.field).length === 1 ? "" : "s",
1167
+ $.get(n.field).length === 1 ? "" : "s",
1168
1168
  "; switch to Edit to fix"
1169
1169
  ] })
1170
1170
  ] }) : null,
1171
- (O ? O(a) : null) ?? $t(a)
1171
+ (O ? O(n) : null) ?? $t(n)
1172
1172
  ] }),
1173
- P(a)
1173
+ P(n)
1174
1174
  )
1175
1175
  },
1176
- a.field
1176
+ n.field
1177
1177
  );
1178
1178
  }),
1179
1179
  re(e.key),
@@ -1193,7 +1193,7 @@ function xt({
1193
1193
  },
1194
1194
  e.key
1195
1195
  );
1196
- }, it = Se(null), Lt = Se(null, "leading"), st = nt.map((e) => Rt(e)).filter((e) => !!e && !X(e)).filter((e) => w || !At(e)), [ne, ...dt] = st;
1196
+ }, it = Se(null), Lt = Se(null, "leading"), st = at.map((e) => Rt(e)).filter((e) => !!e && !X(e)).filter((e) => w || !At(e)), [ae, ...dt] = st;
1197
1197
  return /* @__PURE__ */ p(
1198
1198
  "div",
1199
1199
  {
@@ -1206,24 +1206,24 @@ function xt({
1206
1206
  "data-read-header": !0,
1207
1207
  className: "mb-4 rounded-xl border border-slate-200 bg-white px-5 py-4 dark:border-slate-700/60 dark:bg-slate-900/40",
1208
1208
  children: [
1209
- ne && S(
1210
- { kind: "header", field: ne.field },
1209
+ ae && S(
1210
+ { kind: "header", field: ae.field },
1211
1211
  /* @__PURE__ */ p("div", { className: "min-w-0", children: [
1212
1212
  /* @__PURE__ */ p("p", { className: Ie, children: [
1213
- ce(ne),
1214
- /* @__PURE__ */ t(ie, { field: ne.field })
1213
+ ce(ae),
1214
+ /* @__PURE__ */ t(ie, { field: ae.field })
1215
1215
  ] }),
1216
1216
  /* @__PURE__ */ t(
1217
1217
  "p",
1218
1218
  {
1219
- "data-replay-field": ne.field,
1220
- "data-field-collection": n,
1221
- className: `truncate text-[22px] font-semibold leading-tight tracking-[-0.015em] text-slate-900 dark:text-white${E(ne.field)}`,
1222
- children: u ? Te(ne) : "…"
1219
+ "data-replay-field": ae.field,
1220
+ "data-field-collection": a,
1221
+ className: `truncate text-[22px] font-semibold leading-tight tracking-[-0.015em] text-slate-900 dark:text-white${E(ae.field)}`,
1222
+ children: u ? Te(ae) : "…"
1223
1223
  }
1224
1224
  )
1225
1225
  ] }),
1226
- P(ne)
1226
+ P(ae)
1227
1227
  ),
1228
1228
  dt.length > 0 && /* @__PURE__ */ t("dl", { className: "mt-3 flex flex-wrap gap-x-8 gap-y-2", children: dt.map((e) => /* @__PURE__ */ t("div", { className: "min-w-0", children: S(
1229
1229
  { kind: "header", field: e.field },
@@ -1238,7 +1238,7 @@ function xt({
1238
1238
  "dd",
1239
1239
  {
1240
1240
  "data-replay-field": e.field,
1241
- "data-field-collection": n,
1241
+ "data-field-collection": a,
1242
1242
  "data-remote-changed": ue.has(e.field) || void 0,
1243
1243
  className: `mt-0.5 truncate text-[13px] font-medium text-slate-800 dark:text-slate-100${E(e.field)}`,
1244
1244
  children: u ? Te(e) : "…"
@@ -1251,7 +1251,7 @@ function xt({
1251
1251
  }
1252
1252
  ),
1253
1253
  /* @__PURE__ */ t("style", { children: Tl }),
1254
- V && he.length > 0 && /* @__PURE__ */ t("div", { className: "mb-3", children: /* @__PURE__ */ t(bl, { items: he, revealed: ae, onToggle: Ge }) }),
1254
+ V && he.length > 0 && /* @__PURE__ */ t("div", { className: "mb-3", children: /* @__PURE__ */ t(bl, { items: he, revealed: ne, onToggle: Ge }) }),
1255
1255
  V ? /* @__PURE__ */ t("div", { className: "grid items-stretch gap-4", "data-read-board": !0, children: Qe.map(Tt) }) : /* @__PURE__ */ p("div", { className: "flex flex-col gap-4", "data-read-board-pending": !0, children: [
1256
1256
  /* @__PURE__ */ t("div", { className: "h-32 animate-pulse rounded-xl bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
1257
1257
  /* @__PURE__ */ t("div", { className: "h-32 animate-pulse rounded-xl bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
@@ -1262,11 +1262,11 @@ function xt({
1262
1262
  }
1263
1263
  );
1264
1264
  }
1265
- function Nr(n) {
1266
- return n.design ? /* @__PURE__ */ t(kl, { design: n.design.context, onRefusedWrite: n.design.onRefusedWrite, children: /* @__PURE__ */ t(Ut.Provider, { value: null, children: /* @__PURE__ */ t(xt, { ...n }) }) }) : /* @__PURE__ */ t(xt, { ...n });
1265
+ function Nr(a) {
1266
+ return a.design ? /* @__PURE__ */ t(kl, { design: a.design.context, onRefusedWrite: a.design.onRefusedWrite, children: /* @__PURE__ */ t(Ut.Provider, { value: null, children: /* @__PURE__ */ t(xt, { ...a }) }) }) : /* @__PURE__ */ t(xt, { ...a });
1267
1267
  }
1268
1268
  function El({
1269
- collection: n,
1269
+ collection: a,
1270
1270
  itemId: m,
1271
1271
  field: b,
1272
1272
  value: s,
@@ -1277,10 +1277,10 @@ function El({
1277
1277
  const A = !f;
1278
1278
  q(A);
1279
1279
  try {
1280
- await N.request(Jt(`/items/${n}/${m}`, { [b]: A })), await Promise.all([
1281
- _.invalidateQueries({ queryKey: ["rrv-record", n, m] }),
1282
- _.invalidateQueries({ queryKey: ["item", n, m] })
1283
- ]), al(_, n, m);
1280
+ await N.request(Jt(`/items/${a}/${m}`, { [b]: A })), await Promise.all([
1281
+ _.invalidateQueries({ queryKey: ["rrv-record", a, m] }),
1282
+ _.invalidateQueries({ queryKey: ["item", a, m] })
1283
+ ]), nl(_, a, m);
1284
1284
  } catch (j) {
1285
1285
  Qt(j, "Could not save that change");
1286
1286
  } finally {