@nivaro/react 0.3.127 → 0.3.129

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 (50) hide show
  1. package/dist/components/slots/CommentsSlot.js +124 -95
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +29 -3
  5. package/dist/index.js +150 -147
  6. package/dist/shared/components/CollectionBrowserView.js +3259 -3211
  7. package/dist/shared/components/DataTable.js +406 -401
  8. package/dist/shared/components/ItemEditForm.js +4485 -4409
  9. package/dist/shared/components/MatrixEditor.js +548 -490
  10. package/dist/shared/components/MyWorkView.js +284 -274
  11. package/dist/shared/components/NotificationBell.js +264 -218
  12. package/dist/shared/components/RecordGridEditor.js +582 -472
  13. package/dist/shared/components/ai/AiMarkdown.js +215 -196
  14. package/dist/shared/components/chat/chat-core.js +331 -346
  15. package/dist/shared/components/chat/chat-typing.js +25 -0
  16. package/dist/shared/components/command-center/CommandCenterView.js +1 -1
  17. package/dist/shared/components/command-center/PeekPanel.js +8 -1
  18. package/dist/shared/components/command-center/api.js +17 -9
  19. package/dist/shared/components/command-center/panels/AttentionPanel.js +4 -1
  20. package/dist/shared/components/command-center/panels/PartnersPanel.js +2 -1
  21. package/dist/shared/components/item-edit/GroupSection.js +1 -1
  22. package/dist/shared/components/item-edit/HeaderTools.js +216 -210
  23. package/dist/shared/components/item-edit/InlineTableField.js +432 -429
  24. package/dist/shared/components/item-edit/RecordLiveSync.js +115 -108
  25. package/dist/shared/components/item-edit/RecordViewersChip.js +17 -16
  26. package/dist/shared/components/item-edit/RowComments.js +33 -30
  27. package/dist/shared/components/item-edit/cascade-clear-notice.js +30 -28
  28. package/dist/shared/components/item-edit/live-related.js +29 -16
  29. package/dist/shared/components/item-edit/record-opened-live.js +86 -0
  30. package/dist/shared/components/panels/CommentPanel.js +345 -327
  31. package/dist/shared/components/panels/OwnerOpenedLine.js +24 -23
  32. package/dist/shared/components/panels/RecordIntegrityBanner.js +1 -1
  33. package/dist/shared/components/pipeline/TeamSuggestions.js +1 -1
  34. package/dist/shared/components/queue/QueueItemSheet.js +171 -130
  35. package/dist/shared/components/record-grid-guard.js +85 -0
  36. package/dist/shared/components/support/TicketDetailSheet.js +213 -174
  37. package/dist/shared/components/trackers/MirroredText.js +40 -0
  38. package/dist/shared/components/trackers/SourceTracker.js +168 -0
  39. package/dist/shared/components/trackers/TrackerChip.js +71 -0
  40. package/dist/shared/components/trackers/TrackerLinkPanel.js +1039 -0
  41. package/dist/shared/components/trackers/TrackerPickers.js +245 -0
  42. package/dist/shared/components/trackers/tracker-model.js +126 -0
  43. package/dist/shared/components/trackers/use-tracker-link.js +159 -0
  44. package/dist/shared/lib/at-risk-fields.js +14 -0
  45. package/dist/shared/lib/live-queries.js +9 -8
  46. package/dist/shared/lib/live-screen.js +77 -76
  47. package/dist/shared/lib/presence-hooks.js +190 -127
  48. package/dist/shared/lib/user-sync.js +78 -65
  49. package/dist/shared/lib/waiting-count.js +40 -29
  50. package/package.json +1 -1
@@ -1,26 +1,26 @@
1
- import { jsxs as s, Fragment as U, jsx as t } from "react/jsx-runtime";
2
- import { Search as vt, Pin as Nt, ChevronDown as wt, Inbox as _t, ChevronsUpDown as me, ChevronUp as Ot, X as he, Check as St, CalendarDays as $t } from "lucide-react";
3
- import zt, { useState as $, useMemo as Ye, useRef as be, useEffect as re, useLayoutEffect as Et } from "react";
4
- import { parseDateFilter as Ze, describeDateFilter as Ct, DATE_FILTER_OPS as Mt, formatDateFilter as Tt } from "../lib/date-filter.js";
5
- import { useKeepRowCheckboxFocus as At } from "../lib/keep-row-focus.js";
6
- import { parseNumberFilter as Ie, describeNumberFilter as jt, NUMBER_FILTER_OPS as Vt, formatNumberFilter as Wt } from "../lib/number-filter.js";
7
- import { ROW_SURFACE_SELECTED as Bt, ROW_SURFACE as Ft, ROW_SURFACE_HOVER as Lt } from "../lib/row-surface.js";
8
- import { fitPins as Rt } from "../lib/table-pins.js";
9
- import { useBelowMd as qt } from "../lib/use-below-md.js";
10
- import { cn as h, formatNumber as Y } from "../lib/utils.js";
11
- import { CellCopyLayer as Ht } from "./CellCopyLayer.js";
12
- import { EmptyState as Ut } from "./EmptyState.js";
13
- import { HScrollProxy as Dt } from "./HScrollProxy.js";
14
- import { PhonePager as Jt } from "./list/PhonePager.js";
15
- import { TableSkeletonRows as Xt } from "./Skeletons.js";
1
+ import { jsxs as s, Fragment as H, jsx as t } from "react/jsx-runtime";
2
+ import { Search as Nt, Pin as wt, ChevronDown as _t, Inbox as Ot, ChevronsUpDown as me, ChevronUp as St, X as he, Check as $t, CalendarDays as zt } from "lucide-react";
3
+ import Et, { useState as z, useMemo as Ze, useRef as be, useEffect as re, useLayoutEffect as Ct } from "react";
4
+ import { parseDateFilter as Ie, describeDateFilter as Mt, DATE_FILTER_OPS as Tt, formatDateFilter as At } from "../lib/date-filter.js";
5
+ import { useKeepRowCheckboxFocus as jt } from "../lib/keep-row-focus.js";
6
+ import { parseNumberFilter as Ke, describeNumberFilter as Vt, NUMBER_FILTER_OPS as Wt, formatNumberFilter as Bt } from "../lib/number-filter.js";
7
+ import { ROW_SURFACE_SELECTED as Ft, ROW_SURFACE as Lt, ROW_SURFACE_HOVER as Rt } from "../lib/row-surface.js";
8
+ import { fitPins as qt } from "../lib/table-pins.js";
9
+ import { useBelowMd as Ht } from "../lib/use-below-md.js";
10
+ import { cn as h, formatNumber as Q } from "../lib/utils.js";
11
+ import { CellCopyLayer as Ut } from "./CellCopyLayer.js";
12
+ import { EmptyState as Dt } from "./EmptyState.js";
13
+ import { HScrollProxy as Jt } from "./HScrollProxy.js";
14
+ import { PhonePager as Xt } from "./list/PhonePager.js";
15
+ import { TableSkeletonRows as Qt } from "./Skeletons.js";
16
16
  import { Button as de } from "./ui/button.js";
17
- import { Checkbox as Ke } from "./ui/checkbox.js";
18
- import { Command as Qt, CommandInput as Yt, CommandList as Zt, CommandEmpty as It, CommandItem as Kt } from "./ui/command.js";
19
- import { Input as q } from "./ui/input.js";
17
+ import { Checkbox as Pe } from "./ui/checkbox.js";
18
+ import { Command as Yt, CommandInput as Zt, CommandList as It, CommandEmpty as Kt, CommandItem as Pt } from "./ui/command.js";
19
+ import { Input as R } from "./ui/input.js";
20
20
  import { Popover as ue, PopoverTrigger as fe, PopoverContent as xe } from "./ui/popover.js";
21
- import { Select as Pt, SelectTrigger as Gt, SelectValue as er, SelectContent as tr, SelectItem as Pe } from "./ui/select.js";
22
- import { Table as Ge, TableHeader as et, TableRow as Z, TableHead as I, TableBody as tt, TableCell as ce } from "./ui/table.js";
23
- const rr = [1, 2, 3, 4, 5, 6, 7, 8];
21
+ import { Select as Gt, SelectTrigger as er, SelectValue as tr, SelectContent as rr, SelectItem as Ge } from "./ui/select.js";
22
+ import { Table as et, TableHeader as tt, TableRow as Y, TableHead as Z, TableBody as rt, TableCell as ce } from "./ui/table.js";
23
+ const ar = [1, 2, 3, 4, 5, 6, 7, 8];
24
24
  function pe(r) {
25
25
  var d;
26
26
  return r == null || typeof r == "boolean" ? "" : typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(pe).join("") : typeof r == "object" && "props" in r ? pe((d = r.props) == null ? void 0 : d.children) : "";
@@ -31,32 +31,32 @@ function oe(r) {
31
31
  const c = (r.key.split(".").pop() ?? r.key).replace(/_/g, " ").trim();
32
32
  return c ? c[0].toUpperCase() + c.slice(1) : r.key;
33
33
  }
34
- function Ce(r) {
34
+ function Me(r) {
35
35
  return r.startsWith("-") ? r.slice(1) : r;
36
36
  }
37
- function Me(r) {
37
+ function Te(r) {
38
38
  return r ? r.startsWith("-") ? "desc" : "asc" : null;
39
39
  }
40
- function ar(r, d) {
41
- const o = Ce(r), c = Me(r);
40
+ function lr(r, d) {
41
+ const o = Me(r), c = Te(r);
42
42
  return o !== d || !r ? d : c === "asc" ? `-${d}` : "";
43
43
  }
44
- function lr(r, d) {
44
+ function nr(r, d) {
45
45
  const o = d.trim().toLowerCase().split(/\s+/).filter(Boolean);
46
46
  if (o.length === 0) return 1;
47
47
  const c = r.toLowerCase();
48
48
  return o.every((b) => c.includes(b)) ? 1 : 0;
49
49
  }
50
- function nr(r, d) {
51
- return !r || Ce(r) !== d ? "none" : Me(r) === "desc" ? "descending" : "ascending";
50
+ function sr(r, d) {
51
+ return !r || Me(r) !== d ? "none" : Te(r) === "desc" ? "descending" : "ascending";
52
52
  }
53
- function Ee(r) {
53
+ function Ce(r) {
54
54
  return typeof r == "string" || typeof r == "number";
55
55
  }
56
- function rt({ field: r, sort: d }) {
57
- const o = Ce(d), c = Me(d);
56
+ function at({ field: r, sort: d }) {
57
+ const o = Me(d), c = Te(d);
58
58
  return o !== r || !d ? /* @__PURE__ */ t(me, { className: "ml-1 inline h-3 w-3 shrink-0 text-slate-300" }) : /* @__PURE__ */ t(
59
- Ot,
59
+ St,
60
60
  {
61
61
  className: h(
62
62
  "ml-1 inline h-3 w-3 shrink-0 text-nvr-cyan transition-transform duration-200",
@@ -65,41 +65,41 @@ function rt({ field: r, sort: d }) {
65
65
  }
66
66
  );
67
67
  }
68
- function sr({
68
+ function ir({
69
69
  def: r,
70
70
  value: d,
71
71
  onChange: o
72
72
  }) {
73
- const [c, b] = $(!1), [n, p] = $(""), [k, v] = $([]), [N, f] = $(!1), [m, w] = $({}), a = be(0), E = !!r.loadOptions, O = Array.isArray(d) ? d : d === "" ? [] : [d];
73
+ const [c, b] = z(!1), [n, p] = z(""), [g, w] = z([]), [N, x] = z(!1), [u, k] = z({}), a = be(0), O = !!r.loadOptions, S = Array.isArray(d) ? d : d === "" ? [] : [d];
74
74
  re(() => {
75
- if (!E || !c) return;
76
- const x = ++a.current;
77
- f(!0);
78
- const M = setTimeout(
75
+ if (!O || !c) return;
76
+ const m = ++a.current;
77
+ x(!0);
78
+ const T = setTimeout(
79
79
  () => {
80
- var A;
81
- (A = r.loadOptions) == null || A.call(r, n).then((L) => {
82
- a.current === x && v(L);
80
+ var C;
81
+ (C = r.loadOptions) == null || C.call(r, n).then((F) => {
82
+ a.current === m && w(F);
83
83
  }).catch(() => {
84
- a.current === x && v([]);
84
+ a.current === m && w([]);
85
85
  }).finally(() => {
86
- a.current === x && f(!1);
86
+ a.current === m && x(!1);
87
87
  });
88
88
  },
89
89
  n ? 250 : 0
90
90
  );
91
- return () => clearTimeout(M);
92
- }, [n, c, E]);
93
- const K = E ? k : r.options ?? [], ae = (x) => {
94
- var M, A;
95
- return ((M = K.find((L) => L.value === x)) == null ? void 0 : M.label) ?? ((A = (r.options ?? []).find((L) => L.value === x)) == null ? void 0 : A.label) ?? m[x] ?? x;
96
- }, T = O.length === 0 ? null : O.length === 1 ? ae(O[0]) : `${ae(O[0])} +${O.length - 1}`;
91
+ return () => clearTimeout(T);
92
+ }, [n, c, O]);
93
+ const I = O ? g : r.options ?? [], K = (m) => {
94
+ var T, C;
95
+ return ((T = I.find((F) => F.value === m)) == null ? void 0 : T.label) ?? ((C = (r.options ?? []).find((F) => F.value === m)) == null ? void 0 : C.label) ?? u[m] ?? m;
96
+ }, ae = S.length === 0 ? null : S.length === 1 ? K(S[0]) : `${K(S[0])} +${S.length - 1}`;
97
97
  return /* @__PURE__ */ s(
98
98
  ue,
99
99
  {
100
100
  open: c,
101
- onOpenChange: (x) => {
102
- b(x), x || p("");
101
+ onOpenChange: (m) => {
102
+ b(m), m || p("");
103
103
  },
104
104
  children: [
105
105
  /* @__PURE__ */ t(fe, { asChild: !0, children: /* @__PURE__ */ s(
@@ -108,20 +108,20 @@ function sr({
108
108
  type: "button",
109
109
  className: h(
110
110
  "flex h-8 w-40 items-center justify-between rounded-md border border-slate-200 bg-slate-50 px-2.5 text-[13px] dark:border-border dark:bg-muted/40",
111
- T ? "text-slate-800 dark:text-foreground" : "text-slate-500"
111
+ ae ? "text-slate-800 dark:text-foreground" : "text-slate-500"
112
112
  ),
113
113
  children: [
114
- /* @__PURE__ */ t("span", { className: "truncate", children: T ?? r.placeholder }),
114
+ /* @__PURE__ */ t("span", { className: "truncate", children: ae ?? r.placeholder }),
115
115
  /* @__PURE__ */ s("span", { className: "ml-1 flex shrink-0 items-center gap-0.5", children: [
116
- O.length > 0 && // biome-ignore lint/a11y/useKeyWithClickEvents: auxiliary clear affordance; Esc + reselect cover keyboard
116
+ S.length > 0 && // biome-ignore lint/a11y/useKeyWithClickEvents: auxiliary clear affordance; Esc + reselect cover keyboard
117
117
  /* @__PURE__ */ t(
118
118
  "span",
119
119
  {
120
120
  role: "button",
121
121
  tabIndex: -1,
122
122
  "aria-label": "Clear filter",
123
- onClick: (x) => {
124
- x.stopPropagation(), o(r.multi ? [] : "");
123
+ onClick: (m) => {
124
+ m.stopPropagation(), o(r.multi ? [] : "");
125
125
  },
126
126
  className: "rounded p-0.5 text-slate-400 hover:text-slate-600",
127
127
  children: /* @__PURE__ */ t(he, { className: "h-3 w-3" })
@@ -132,9 +132,9 @@ function sr({
132
132
  ]
133
133
  }
134
134
  ) }),
135
- /* @__PURE__ */ t(xe, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(Qt, { shouldFilter: !E, filter: lr, children: [
135
+ /* @__PURE__ */ t(xe, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(Yt, { shouldFilter: !O, filter: nr, children: [
136
136
  /* @__PURE__ */ t(
137
- Yt,
137
+ Zt,
138
138
  {
139
139
  placeholder: "Search…",
140
140
  className: "h-8 text-[12px]",
@@ -142,26 +142,26 @@ function sr({
142
142
  onValueChange: p
143
143
  }
144
144
  ),
145
- /* @__PURE__ */ s(Zt, { children: [
146
- /* @__PURE__ */ t(It, { className: "py-3 text-center text-[12px] text-slate-400", children: N ? "Searching…" : "No results" }),
147
- K.map((x) => {
148
- const M = O.includes(x.value);
145
+ /* @__PURE__ */ s(It, { children: [
146
+ /* @__PURE__ */ t(Kt, { className: "py-3 text-center text-[12px] text-slate-400", children: N ? "Searching…" : "No results" }),
147
+ I.map((m) => {
148
+ const T = S.includes(m.value);
149
149
  return /* @__PURE__ */ s(
150
- Kt,
150
+ Pt,
151
151
  {
152
- value: E ? x.value : x.label,
152
+ value: O ? m.value : m.label,
153
153
  onSelect: () => {
154
- w((A) => ({ ...A, [x.value]: x.label })), r.multi ? o(
155
- M ? O.filter((A) => A !== x.value) : [...O, x.value]
156
- ) : (o(M ? "" : x.value), b(!1));
154
+ k((C) => ({ ...C, [m.value]: m.label })), r.multi ? o(
155
+ T ? S.filter((C) => C !== m.value) : [...S, m.value]
156
+ ) : (o(T ? "" : m.value), b(!1));
157
157
  },
158
158
  className: "text-[12px]",
159
159
  children: [
160
- /* @__PURE__ */ t(St, { className: h("mr-2 h-3 w-3", M ? "opacity-100" : "opacity-0") }),
161
- x.label
160
+ /* @__PURE__ */ t($t, { className: h("mr-2 h-3 w-3", T ? "opacity-100" : "opacity-0") }),
161
+ m.label
162
162
  ]
163
163
  },
164
- x.value
164
+ m.value
165
165
  );
166
166
  })
167
167
  ] })
@@ -170,19 +170,19 @@ function sr({
170
170
  }
171
171
  );
172
172
  }
173
- function ir({
173
+ function dr({
174
174
  value: r,
175
175
  placeholder: d,
176
176
  onChange: o
177
177
  }) {
178
- const [c, b] = $(!1), n = Ze(r), [p, k] = $((n == null ? void 0 : n.op) ?? "on"), [v, N] = $((n == null ? void 0 : n.from) ?? ""), [f, m] = $((n == null ? void 0 : n.to) ?? "");
178
+ const [c, b] = z(!1), n = Ie(r), [p, g] = z((n == null ? void 0 : n.op) ?? "on"), [w, N] = z((n == null ? void 0 : n.from) ?? ""), [x, u] = z((n == null ? void 0 : n.to) ?? "");
179
179
  re(() => {
180
180
  if (!c) return;
181
- const a = Ze(r);
182
- k((a == null ? void 0 : a.op) ?? "on"), N((a == null ? void 0 : a.from) ?? ""), m((a == null ? void 0 : a.to) ?? "");
181
+ const a = Ie(r);
182
+ g((a == null ? void 0 : a.op) ?? "on"), N((a == null ? void 0 : a.from) ?? ""), u((a == null ? void 0 : a.to) ?? "");
183
183
  }, [c, r]);
184
- const w = (a, E, O) => {
185
- E && (o(Tt({ op: a, from: E, to: O || E })), (a !== "between" || O) && b(!1));
184
+ const k = (a, O, S) => {
185
+ O && (o(At({ op: a, from: O, to: S || O })), (a !== "between" || S) && b(!1));
186
186
  };
187
187
  return /* @__PURE__ */ s(ue, { open: c, onOpenChange: b, children: [
188
188
  /* @__PURE__ */ t(fe, { asChild: !0, children: /* @__PURE__ */ s(
@@ -192,7 +192,7 @@ function ir({
192
192
  "data-date-filter": !0,
193
193
  className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
194
194
  children: [
195
- /* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? Ct(n) : d }),
195
+ /* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? Mt(n) : d }),
196
196
  n ? /* @__PURE__ */ t(
197
197
  he,
198
198
  {
@@ -201,19 +201,19 @@ function ir({
201
201
  a.stopPropagation(), o(null);
202
202
  }
203
203
  }
204
- ) : /* @__PURE__ */ t($t, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
204
+ ) : /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
205
205
  ]
206
206
  }
207
207
  ) }),
208
208
  /* @__PURE__ */ s(xe, { align: "start", className: "w-[248px] space-y-2 p-2", children: [
209
- /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1", children: Mt.map((a) => /* @__PURE__ */ t(
209
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1", children: Tt.map((a) => /* @__PURE__ */ t(
210
210
  "button",
211
211
  {
212
212
  type: "button",
213
213
  "data-date-op": a.op,
214
214
  "aria-pressed": p === a.op,
215
215
  onClick: () => {
216
- k(a.op), v && w(a.op, v, f);
216
+ g(a.op), w && k(a.op, w, x);
217
217
  },
218
218
  className: h(
219
219
  "rounded border px-1 py-1 text-[11px] leading-tight transition-colors",
@@ -228,22 +228,22 @@ function ir({
228
228
  "input",
229
229
  {
230
230
  type: "date",
231
- value: v,
231
+ value: w,
232
232
  onChange: (a) => {
233
- N(a.target.value), p !== "between" && w(p, a.target.value, "");
233
+ N(a.target.value), p !== "between" && k(p, a.target.value, "");
234
234
  },
235
235
  className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
236
236
  }
237
237
  ),
238
- p === "between" && /* @__PURE__ */ s(U, { children: [
238
+ p === "between" && /* @__PURE__ */ s(H, { children: [
239
239
  /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "to" }),
240
240
  /* @__PURE__ */ t(
241
241
  "input",
242
242
  {
243
243
  type: "date",
244
- value: f,
244
+ value: x,
245
245
  onChange: (a) => {
246
- m(a.target.value), w("between", v, a.target.value);
246
+ u(a.target.value), k("between", w, a.target.value);
247
247
  },
248
248
  className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
249
249
  }
@@ -253,13 +253,13 @@ function ir({
253
253
  ] })
254
254
  ] });
255
255
  }
256
- function dr({
256
+ function cr({
257
257
  value: r,
258
258
  placeholder: d,
259
259
  unit: o,
260
260
  onChange: c
261
261
  }) {
262
- const [b, n] = $(!1), [p, k] = r.split(":"), v = o ?? "", N = p && k ? `${p}–${k}${v}` : p ? `${p}${v}+` : k ? `≤ ${k}${v}` : d, f = (m, w) => c(m === "" && w === "" ? null : `${m}:${w}`);
262
+ const [b, n] = z(!1), [p, g] = r.split(":"), w = o ?? "", N = p && g ? `${p}–${g}${w}` : p ? `${p}${w}+` : g ? `≤ ${g}${w}` : d, x = (u, k) => c(u === "" && k === "" ? null : `${u}:${k}`);
263
263
  return /* @__PURE__ */ s(ue, { open: b, onOpenChange: n, children: [
264
264
  /* @__PURE__ */ t(fe, { asChild: !0, children: /* @__PURE__ */ s(
265
265
  "button",
@@ -271,16 +271,16 @@ function dr({
271
271
  /* @__PURE__ */ t(
272
272
  "span",
273
273
  {
274
- className: h("truncate", !p && !k && "text-slate-500 dark:text-muted-foreground"),
274
+ className: h("truncate", !p && !g && "text-slate-500 dark:text-muted-foreground"),
275
275
  children: N
276
276
  }
277
277
  ),
278
- p || k ? /* @__PURE__ */ t(
278
+ p || g ? /* @__PURE__ */ t(
279
279
  he,
280
280
  {
281
281
  className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
282
- onClick: (m) => {
283
- m.stopPropagation(), c(null);
282
+ onClick: (u) => {
283
+ u.stopPropagation(), c(null);
284
284
  }
285
285
  }
286
286
  ) : /* @__PURE__ */ t(me, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
@@ -291,25 +291,25 @@ function dr({
291
291
  /* @__PURE__ */ t("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: d }),
292
292
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
293
293
  /* @__PURE__ */ t(
294
- q,
294
+ R,
295
295
  {
296
296
  type: "number",
297
297
  "aria-label": `Minimum ${d}`,
298
298
  placeholder: "Min",
299
299
  value: p ?? "",
300
- onChange: (m) => f(m.target.value, k ?? ""),
300
+ onChange: (u) => x(u.target.value, g ?? ""),
301
301
  className: "h-7 text-[12px]"
302
302
  }
303
303
  ),
304
304
  /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "–" }),
305
305
  /* @__PURE__ */ t(
306
- q,
306
+ R,
307
307
  {
308
308
  type: "number",
309
309
  "aria-label": `Maximum ${d}`,
310
310
  placeholder: "Max",
311
- value: k ?? "",
312
- onChange: (m) => f(p ?? "", m.target.value),
311
+ value: g ?? "",
312
+ onChange: (u) => x(p ?? "", u.target.value),
313
313
  className: "h-7 text-[12px]"
314
314
  }
315
315
  )
@@ -317,19 +317,19 @@ function dr({
317
317
  ] })
318
318
  ] });
319
319
  }
320
- function cr({
320
+ function or({
321
321
  value: r,
322
322
  placeholder: d,
323
323
  onChange: o
324
324
  }) {
325
- const [c, b] = $(!1), n = Ie(r), [p, k] = $((n == null ? void 0 : n.op) ?? "eq"), [v, N] = $(n ? String(n.a) : ""), [f, m] = $((n == null ? void 0 : n.b) != null ? String(n.b) : "");
325
+ const [c, b] = z(!1), n = Ke(r), [p, g] = z((n == null ? void 0 : n.op) ?? "eq"), [w, N] = z(n ? String(n.a) : ""), [x, u] = z((n == null ? void 0 : n.b) != null ? String(n.b) : "");
326
326
  re(() => {
327
327
  if (!c) return;
328
- const a = Ie(r);
329
- k((a == null ? void 0 : a.op) ?? "eq"), N(a ? String(a.a) : ""), m((a == null ? void 0 : a.b) != null ? String(a.b) : "");
328
+ const a = Ke(r);
329
+ g((a == null ? void 0 : a.op) ?? "eq"), N(a ? String(a.a) : ""), u((a == null ? void 0 : a.b) != null ? String(a.b) : "");
330
330
  }, [c, r]);
331
- const w = (a, E, O) => {
332
- E === "" || Number.isNaN(Number(E)) || a === "between" && (O === "" || Number.isNaN(Number(O))) || o(Wt({ op: a, a: Number(E), b: O === "" ? void 0 : Number(O) }));
331
+ const k = (a, O, S) => {
332
+ O === "" || Number.isNaN(Number(O)) || a === "between" && (S === "" || Number.isNaN(Number(S))) || o(Bt({ op: a, a: Number(O), b: S === "" ? void 0 : Number(S) }));
333
333
  };
334
334
  return /* @__PURE__ */ s(ue, { open: c, onOpenChange: b, children: [
335
335
  /* @__PURE__ */ t(fe, { asChild: !0, children: /* @__PURE__ */ s(
@@ -339,7 +339,7 @@ function cr({
339
339
  "data-number-filter": !0,
340
340
  className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
341
341
  children: [
342
- /* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? jt(n) : d }),
342
+ /* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? Vt(n) : d }),
343
343
  n ? /* @__PURE__ */ t(
344
344
  he,
345
345
  {
@@ -353,14 +353,14 @@ function cr({
353
353
  }
354
354
  ) }),
355
355
  /* @__PURE__ */ s(xe, { align: "start", className: "w-[220px] space-y-2 p-2", children: [
356
- /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-1", children: Vt.map((a) => /* @__PURE__ */ t(
356
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-1", children: Wt.map((a) => /* @__PURE__ */ t(
357
357
  "button",
358
358
  {
359
359
  type: "button",
360
360
  "data-number-op": a.op,
361
361
  "aria-pressed": p === a.op,
362
362
  onClick: () => {
363
- k(a.op), w(a.op, v, f);
363
+ g(a.op), k(a.op, w, x);
364
364
  },
365
365
  className: h(
366
366
  "rounded border px-1 py-1 text-[11px] transition-colors",
@@ -372,25 +372,25 @@ function cr({
372
372
  )) }),
373
373
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
374
374
  /* @__PURE__ */ t(
375
- q,
375
+ R,
376
376
  {
377
377
  type: "number",
378
- value: v,
378
+ value: w,
379
379
  onChange: (a) => {
380
- N(a.target.value), w(p, a.target.value, f);
380
+ N(a.target.value), k(p, a.target.value, x);
381
381
  },
382
382
  className: "h-7 text-[12px]"
383
383
  }
384
384
  ),
385
- p === "between" && /* @__PURE__ */ s(U, { children: [
385
+ p === "between" && /* @__PURE__ */ s(H, { children: [
386
386
  /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "–" }),
387
387
  /* @__PURE__ */ t(
388
- q,
388
+ R,
389
389
  {
390
390
  type: "number",
391
- value: f,
391
+ value: x,
392
392
  onChange: (a) => {
393
- m(a.target.value), w(p, v, a.target.value);
393
+ u(a.target.value), k(p, w, a.target.value);
394
394
  },
395
395
  className: "h-7 text-[12px]"
396
396
  }
@@ -400,22 +400,22 @@ function cr({
400
400
  ] })
401
401
  ] });
402
402
  }
403
- function at({
403
+ function lt({
404
404
  def: r,
405
405
  value: d,
406
406
  onChange: o,
407
407
  layout: c = "inline"
408
408
  }) {
409
- const b = c === "stacked", n = c === "cell", p = typeof d == "string" ? d : "", k = b || n ? "w-full" : "w-40", v = n ? "h-7 text-[12px]" : "text-[13px]";
409
+ const b = c === "stacked", n = c === "cell", p = typeof d == "string" ? d : "", g = b || n ? "w-full" : "w-40", w = n ? "h-7 text-[12px]" : "text-[13px]";
410
410
  let N;
411
411
  if (r.type === "text")
412
412
  N = /* @__PURE__ */ t(
413
- q,
413
+ R,
414
414
  {
415
- className: h("h-8 border-slate-200 bg-slate-50", v, k),
415
+ className: h("h-8 border-slate-200 bg-slate-50", w, g),
416
416
  placeholder: r.placeholder,
417
417
  value: p,
418
- onChange: (f) => o(f.target.value)
418
+ onChange: (x) => o(x.target.value)
419
419
  }
420
420
  );
421
421
  else if (r.type === "combobox")
@@ -426,88 +426,88 @@ function at({
426
426
  (b || n) && "[&>button]:w-full",
427
427
  n && "[&>button]:h-7 [&>button]:min-w-[88px] [&>button]:px-1.5 [&>button]:text-[12px]"
428
428
  ),
429
- children: /* @__PURE__ */ t(sr, { def: r, value: d, onChange: o })
429
+ children: /* @__PURE__ */ t(ir, { def: r, value: d, onChange: o })
430
430
  }
431
431
  );
432
432
  else if (r.type === "date")
433
- N = /* @__PURE__ */ t("div", { className: h(n && "[&>div>button]:h-7 [&>div>button]:text-[12px]", k), children: /* @__PURE__ */ t(
434
- ir,
433
+ N = /* @__PURE__ */ t("div", { className: h(n && "[&>div>button]:h-7 [&>div>button]:text-[12px]", g), children: /* @__PURE__ */ t(
434
+ dr,
435
435
  {
436
436
  value: p,
437
437
  placeholder: r.placeholder,
438
- onChange: (f) => o(f ?? "")
438
+ onChange: (x) => o(x ?? "")
439
439
  }
440
440
  ) });
441
441
  else if (r.type === "number")
442
- N = /* @__PURE__ */ t("div", { className: h(n && "[&>div>button]:h-7 [&>div>button]:text-[12px]", k), children: /* @__PURE__ */ t(
443
- cr,
442
+ N = /* @__PURE__ */ t("div", { className: h(n && "[&>div>button]:h-7 [&>div>button]:text-[12px]", g), children: /* @__PURE__ */ t(
443
+ or,
444
444
  {
445
445
  value: p,
446
446
  placeholder: r.placeholder,
447
- onChange: (f) => o(f ?? "")
447
+ onChange: (x) => o(x ?? "")
448
448
  }
449
449
  ) });
450
450
  else if (r.type === "range" && n)
451
451
  N = /* @__PURE__ */ t("div", { className: "[&>div>button]:h-7 [&>div>button]:text-[12px] w-full", children: /* @__PURE__ */ t(
452
- dr,
452
+ cr,
453
453
  {
454
454
  value: p,
455
455
  placeholder: r.placeholder,
456
456
  unit: r.range_unit,
457
- onChange: (f) => o(f ?? "")
457
+ onChange: (x) => o(x ?? "")
458
458
  }
459
459
  ) });
460
460
  else if (r.type === "range") {
461
- const [f, m] = p.split(":");
461
+ const [x, u] = p.split(":");
462
462
  N = /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
463
463
  /* @__PURE__ */ t(
464
- q,
464
+ R,
465
465
  {
466
466
  type: "number",
467
467
  className: h(
468
468
  "h-8 border-slate-200 bg-slate-50",
469
- v,
469
+ w,
470
470
  b || n ? "w-full min-w-[48px]" : "w-20"
471
471
  ),
472
472
  placeholder: "Min",
473
- value: f ?? "",
474
- onChange: (w) => o(`${w.target.value}:${m ?? ""}`)
473
+ value: x ?? "",
474
+ onChange: (k) => o(`${k.target.value}:${u ?? ""}`)
475
475
  }
476
476
  ),
477
477
  /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-400", children: "–" }),
478
478
  /* @__PURE__ */ t(
479
- q,
479
+ R,
480
480
  {
481
481
  type: "number",
482
482
  className: h(
483
483
  "h-8 border-slate-200 bg-slate-50",
484
- v,
484
+ w,
485
485
  b || n ? "w-full min-w-[48px]" : "w-20"
486
486
  ),
487
487
  placeholder: "Max",
488
- value: m ?? "",
489
- onChange: (w) => o(`${f ?? ""}:${w.target.value}`)
488
+ value: u ?? "",
489
+ onChange: (k) => o(`${x ?? ""}:${k.target.value}`)
490
490
  }
491
491
  )
492
492
  ] });
493
493
  } else
494
- N = /* @__PURE__ */ s(Pt, { value: p === "" ? "__all__" : p, onValueChange: (m) => o(m === "__all__" ? "" : m), children: [
494
+ N = /* @__PURE__ */ s(Gt, { value: p === "" ? "__all__" : p, onValueChange: (u) => o(u === "__all__" ? "" : u), children: [
495
495
  /* @__PURE__ */ t(
496
- Gt,
496
+ er,
497
497
  {
498
- "aria-label": lt(r),
499
- className: h("h-8 border-slate-200 bg-slate-50", v, k),
500
- children: /* @__PURE__ */ t(er, { placeholder: r.placeholder })
498
+ "aria-label": nt(r),
499
+ className: h("h-8 border-slate-200 bg-slate-50", w, g),
500
+ children: /* @__PURE__ */ t(tr, { placeholder: r.placeholder })
501
501
  }
502
502
  ),
503
- /* @__PURE__ */ s(tr, { children: [
504
- /* @__PURE__ */ t(Pe, { value: "__all__", children: r.placeholder }),
505
- (r.options ?? []).filter((m) => m.value !== "").map((m) => /* @__PURE__ */ t(Pe, { value: m.value, children: m.label }, m.value))
503
+ /* @__PURE__ */ s(rr, { children: [
504
+ /* @__PURE__ */ t(Ge, { value: "__all__", children: r.placeholder }),
505
+ (r.options ?? []).filter((u) => u.value !== "").map((u) => /* @__PURE__ */ t(Ge, { value: u.value, children: u.label }, u.value))
506
506
  ] })
507
507
  ] });
508
508
  return b ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
509
509
  /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
510
- lt(r),
510
+ nt(r),
511
511
  r.restricted && /* @__PURE__ */ t(
512
512
  "span",
513
513
  {
@@ -525,12 +525,12 @@ function at({
525
525
  className: "[&_button]:!border-amber-400 [&_input]:!border-amber-400 dark:[&_button]:!border-amber-500/60 dark:[&_input]:!border-amber-500/60",
526
526
  children: N
527
527
  }
528
- ) : /* @__PURE__ */ t(U, { children: N });
528
+ ) : /* @__PURE__ */ t(H, { children: N });
529
529
  }
530
- function lt(r) {
530
+ function nt(r) {
531
531
  return r.placeholder.replace(/^Search\s+/i, "").replace(/[…]|\.{3}$/g, "");
532
532
  }
533
- function Tr(r, d) {
533
+ function Ar(r, d) {
534
534
  const o = (c) => {
535
535
  var b, n;
536
536
  return ((n = (b = r.options) == null ? void 0 : b.find((p) => p.value === c)) == null ? void 0 : n.label) ?? c;
@@ -545,7 +545,7 @@ function Tr(r, d) {
545
545
  }
546
546
  return o(d);
547
547
  }
548
- function Ar({
548
+ function jr({
549
549
  columns: r,
550
550
  rows: d,
551
551
  rowKey: o,
@@ -553,124 +553,125 @@ function Ar({
553
553
  page: b,
554
554
  limit: n = 25,
555
555
  isLoading: p,
556
- isError: k,
557
- errorMessage: v,
558
- onRetry: N,
559
- sort: f = "",
560
- onSortChange: m,
561
- onPageChange: w,
562
- onRowClick: a,
563
- onRowContextMenu: E,
564
- searchValue: O,
556
+ isStale: g,
557
+ isError: w,
558
+ errorMessage: N,
559
+ onRetry: x,
560
+ sort: u = "",
561
+ onSortChange: k,
562
+ onPageChange: a,
563
+ onRowClick: O,
564
+ onRowContextMenu: S,
565
+ searchValue: I,
565
566
  onSearchChange: K,
566
567
  searchPlaceholder: ae = "Search…",
567
- filterDefs: T,
568
- filterValues: x = {},
569
- onFilterChange: M,
570
- toolbarRight: A,
571
- emptyMessage: L = "No records found.",
572
- minBodyHeight: nt,
568
+ filterDefs: m,
569
+ filterValues: T = {},
570
+ onFilterChange: C,
571
+ toolbarRight: F,
572
+ emptyMessage: ye = "No records found.",
573
+ minBodyHeight: st,
573
574
  fillHeight: le = !1,
574
- footer: st,
575
- hideFilterRow: it = !1,
576
- nowrapCells: dt = !1,
577
- density: ye = "comfortable",
578
- pinFirstColumn: j = !1,
579
- columnPins: g,
580
- onColumnPinChange: ge,
581
- pinKeepRank: ke,
582
- pinRightShare: ct,
583
- columnFilterRow: ot = !1,
584
- hScrollProxy: Te = !1,
585
- selectedIds: V,
586
- onSelectionChange: C,
587
- rowClassName: ve,
588
- rowDragProps: Ne,
589
- rowTitle: we,
590
- enterKey: bt,
591
- rowGroups: W,
592
- collapsedGroups: D,
593
- onToggleGroup: _e,
594
- onRowFocus: J,
575
+ footer: it,
576
+ hideFilterRow: dt = !1,
577
+ nowrapCells: ct = !1,
578
+ density: ge = "comfortable",
579
+ pinFirstColumn: A = !1,
580
+ columnPins: v,
581
+ onColumnPinChange: ke,
582
+ pinKeepRank: ve,
583
+ pinRightShare: ot,
584
+ columnFilterRow: bt = !1,
585
+ hScrollProxy: Ae = !1,
586
+ selectedIds: j,
587
+ onSelectionChange: M,
588
+ rowClassName: Ne,
589
+ rowDragProps: we,
590
+ rowTitle: _e,
591
+ enterKey: pt,
592
+ rowGroups: V,
593
+ collapsedGroups: U,
594
+ onToggleGroup: Oe,
595
+ onRowFocus: D,
595
596
  activeRowKey: ne,
596
- rowAriaLabel: Oe,
597
+ rowAriaLabel: Se,
597
598
  totalsRow: P
598
599
  }) {
599
- const G = Math.ceil(c / n), Ae = (b - 1) * n + 1, je = Math.min(b * n, c), Ve = !it && T && T.length > 0, pt = O !== void 0 || Ve || A !== void 0, We = (e) => {
600
- !e.sortable || !m || m(ar(f, e.key));
601
- }, _ = g !== void 0, [Be, mt] = $([]), R = Ye(() => {
602
- if (!_ || !g) return r;
603
- const e = new Set(Be), l = (S) => g[S] === "right" && !e.has(S), i = r.filter((S) => g[S.key] === "left"), z = r.filter((S) => l(S.key)), B = r.filter((S) => g[S.key] !== "left" && !l(S.key));
604
- return [...i, ...B, ...z];
605
- }, [r, g, _, Be]), Fe = be({}), H = be(null);
606
- At(H);
607
- const Le = be(null), Re = !p && (W ? W.length === 0 : d.length === 0), [qe, ht] = $(null);
600
+ const G = Math.ceil(c / n), je = (b - 1) * n + 1, Ve = Math.min(b * n, c), We = !dt && m && m.length > 0, mt = I !== void 0 || We || F !== void 0, Be = (e) => {
601
+ !e.sortable || !k || k(lr(u, e.key));
602
+ }, _ = v !== void 0, [Fe, ht] = z([]), L = Ze(() => {
603
+ if (!_ || !v) return r;
604
+ const e = new Set(Fe), l = ($) => v[$] === "right" && !e.has($), i = r.filter(($) => v[$.key] === "left"), E = r.filter(($) => l($.key)), W = r.filter(($) => v[$.key] !== "left" && !l($.key));
605
+ return [...i, ...W, ...E];
606
+ }, [r, v, _, Fe]), Le = be({}), q = be(null);
607
+ jt(q);
608
+ const Re = be(null), qe = !p && (V ? V.length === 0 : d.length === 0), [He, ut] = z(null);
608
609
  re(() => {
609
- const e = H.current;
610
- if (!Re || !e) return;
611
- const l = () => ht(e.clientWidth);
610
+ const e = q.current;
611
+ if (!qe || !e) return;
612
+ const l = () => ut(e.clientWidth);
612
613
  if (l(), typeof ResizeObserver > "u") return;
613
614
  const i = new ResizeObserver(l);
614
615
  return i.observe(e), () => i.disconnect();
615
- }, [Re]);
616
- const [ee, ut] = $({}), [, ft] = $(0), Se = qt(), X = le && Se ? void 0 : nt;
616
+ }, [qe]);
617
+ const [ee, ft] = z({}), [, xt] = z(0), $e = Ht(), J = le && $e ? void 0 : st;
617
618
  re(() => {
618
- const e = H.current;
619
+ const e = q.current;
619
620
  if (!_ || !e || typeof ResizeObserver > "u") return;
620
- const l = new ResizeObserver(() => ft(e.clientWidth));
621
+ const l = new ResizeObserver(() => xt(e.clientWidth));
621
622
  return l.observe(e), () => l.disconnect();
622
- }, [_, p]), Et(() => {
623
- var Je, Xe;
624
- if (!_ || !g) return;
625
- const e = (u) => {
626
- var F;
627
- return ((F = Fe.current[u]) == null ? void 0 : F.getBoundingClientRect().width) ?? 120;
628
- }, l = C ? ((Je = Le.current) == null ? void 0 : Je.getBoundingClientRect().width) ?? 40 : 0;
623
+ }, [_, p]), Ct(() => {
624
+ var Xe, Qe;
625
+ if (!_ || !v) return;
626
+ const e = (f) => {
627
+ var B;
628
+ return ((B = Le.current[f]) == null ? void 0 : B.getBoundingClientRect().width) ?? 120;
629
+ }, l = M ? ((Xe = Re.current) == null ? void 0 : Xe.getBoundingClientRect().width) ?? 40 : 0;
629
630
  let i = null;
630
- const z = (u) => {
631
- var Qe;
631
+ const E = (f) => {
632
+ var Ye;
632
633
  i ?? (i = [
633
- ...((Qe = H.current) == null ? void 0 : Qe.querySelectorAll("tbody td[data-dt-col]")) ?? []
634
+ ...((Ye = q.current) == null ? void 0 : Ye.querySelectorAll("tbody td[data-dt-col]")) ?? []
634
635
  ]);
635
- const F = i.filter((te) => te.dataset.dtCol === u);
636
- if (F.length === 0) return !1;
637
- for (const te of F) {
636
+ const B = i.filter((te) => te.dataset.dtCol === f);
637
+ if (B.length === 0) return !1;
638
+ for (const te of B) {
638
639
  if (te.querySelector("[data-cell-empty]")) continue;
639
640
  if (te.querySelector("img, svg, button, input, a")) return !1;
640
- const ze = (te.textContent ?? "").trim();
641
- if (ze !== "" && ze !== "—" && ze !== "-") return !1;
641
+ const Ee = (te.textContent ?? "").trim();
642
+ if (Ee !== "" && Ee !== "—" && Ee !== "-") return !1;
642
643
  }
643
644
  return !0;
644
- }, B = r.filter((u) => g[u.key] === "right").map((u) => u.key), { left: S, right: y } = Rt(
645
- R.filter((u) => g[u.key] === "left").map((u) => u.key),
646
- B,
645
+ }, W = r.filter((f) => v[f.key] === "right").map((f) => f.key), { left: $, right: y } = qt(
646
+ L.filter((f) => v[f.key] === "left").map((f) => f.key),
647
+ W,
647
648
  e,
648
649
  l,
649
- ((Xe = H.current) == null ? void 0 : Xe.clientWidth) ?? 0,
650
+ ((Qe = q.current) == null ? void 0 : Qe.clientWidth) ?? 0,
650
651
  {
651
- compact: Se,
652
- rightShare: ct,
653
- rank: ke ? (u) => z(u) ? -1e6 : ke(u) : void 0
652
+ compact: $e,
653
+ rightShare: ot,
654
+ rank: ve ? (f) => E(f) ? -1e6 : ve(f) : void 0
654
655
  }
655
- ), Q = ke && !Se ? B.filter((u) => !y.includes(u)) : [];
656
- mt((u) => u.join("|") === Q.join("|") ? u : Q);
656
+ ), X = ve && !$e ? W.filter((f) => !y.includes(f)) : [];
657
+ ht((f) => f.join("|") === X.join("|") ? f : X);
657
658
  const ie = {};
658
- let Ue = l;
659
- S.forEach((u, F) => {
660
- ie[u] = { side: "left", offset: Math.floor(Ue), seam: F === S.length - 1 }, Ue += e(u);
659
+ let De = l;
660
+ $.forEach((f, B) => {
661
+ ie[f] = { side: "left", offset: Math.floor(De), seam: B === $.length - 1 }, De += e(f);
661
662
  });
662
- let De = 0;
663
- for (let u = y.length - 1; u >= 0; u--) {
664
- const F = y[u];
665
- ie[F] = { side: "right", offset: Math.floor(De), seam: u === 0 }, De += e(F);
663
+ let Je = 0;
664
+ for (let f = y.length - 1; f >= 0; f--) {
665
+ const B = y[f];
666
+ ie[B] = { side: "right", offset: Math.floor(Je), seam: f === 0 }, Je += e(B);
666
667
  }
667
- ut((u) => JSON.stringify(u) === JSON.stringify(ie) ? u : ie);
668
+ ft((f) => JSON.stringify(f) === JSON.stringify(ie) ? f : ie);
668
669
  });
669
670
  const se = (e) => {
670
671
  const l = ee[e];
671
672
  if (!(!_ || !l))
672
673
  return l.side === "left" ? { left: l.offset } : { right: l.offset };
673
- }, $e = (e, l) => {
674
+ }, ze = (e, l) => {
674
675
  const i = ee[e];
675
676
  if (!(!_ || !i))
676
677
  return h(
@@ -682,85 +683,85 @@ function Ar({
682
683
  i.side === "left" && i.seam && "border-r border-slate-200 dark:border-border",
683
684
  i.side === "right" && i.seam && "border-l border-slate-200 dark:border-border"
684
685
  );
685
- }, xt = (e) => {
686
- if (!ge) return;
687
- const l = (g == null ? void 0 : g[e]) ?? null;
688
- ge(e, l === null ? "left" : l === "left" ? "right" : null);
689
- }, yt = Ye(() => {
686
+ }, yt = (e) => {
687
+ if (!ke) return;
688
+ const l = (v == null ? void 0 : v[e]) ?? null;
689
+ ke(e, l === null ? "left" : l === "left" ? "right" : null);
690
+ }, gt = Ze(() => {
690
691
  const e = /* @__PURE__ */ new Map();
691
- for (const l of T ?? []) e.set(l.key, l);
692
+ for (const l of m ?? []) e.set(l.key, l);
692
693
  return e;
693
- }, [T]), gt = ot && ((T == null ? void 0 : T.length) ?? 0) > 0, kt = (() => {
694
- if (!J) return null;
695
- const e = W ? W.flatMap((i) => D != null && D.has(i.key) ? [] : i.rows) : d, l = (i, z) => o ? o(i, z) : String(z);
696
- return ne && e.some((i, z) => l(i, z) === ne) ? ne : e.length > 0 ? l(e[0], 0) : null;
697
- })(), He = (e, l) => {
698
- const i = o ? o(e, l) : String(l), z = (V == null ? void 0 : V.includes(i)) ?? !1, B = !!J, S = B && i === kt;
694
+ }, [m]), kt = bt && ((m == null ? void 0 : m.length) ?? 0) > 0, vt = (() => {
695
+ if (!D) return null;
696
+ const e = V ? V.flatMap((i) => U != null && U.has(i.key) ? [] : i.rows) : d, l = (i, E) => o ? o(i, E) : String(E);
697
+ return ne && e.some((i, E) => l(i, E) === ne) ? ne : e.length > 0 ? l(e[0], 0) : null;
698
+ })(), Ue = (e, l) => {
699
+ const i = o ? o(e, l) : String(l), E = (j == null ? void 0 : j.includes(i)) ?? !1, W = !!D, $ = W && i === vt;
699
700
  return /* @__PURE__ */ s(
700
- Z,
701
+ Y,
701
702
  {
702
- ...Ne == null ? void 0 : Ne(e),
703
+ ...we == null ? void 0 : we(e),
703
704
  className: h(
704
705
  // NAMED group: queue cells already use bare `group-hover:` against
705
706
  // their own local group, and claiming the unnamed one here would
706
707
  // make those reveal on row hover instead.
707
708
  "group/row nvr-row-enter border-slate-100 transition-colors duration-150",
708
- J && "focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-nvr-cyan",
709
+ D && "focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-nvr-cyan",
709
710
  // Pinned: opaque surface AND opaque hover (the base row's hover:bg-muted/50 is
710
711
  // translucent, so the pinned cells would go see-through under the pointer).
711
- (j || _) && `${Ft} ${Lt}`,
712
- a && (j || _ ? "cursor-pointer" : "cursor-pointer hover:bg-slate-50/80"),
713
- ve == null ? void 0 : ve(e),
712
+ (A || _) && `${Lt} ${Rt}`,
713
+ O && (A || _ ? "cursor-pointer" : "cursor-pointer hover:bg-slate-50/80"),
714
+ Ne == null ? void 0 : Ne(e),
714
715
  // Pinned sticky cells use bg-inherit, so a selected row's bg must be
715
716
  // OPAQUE or horizontally-scrolled content bleeds through the pinned
716
717
  // column (lib/row-surface.ts: the accent mixed over the card).
717
- z && (j || _ ? Bt : "bg-nvr-cyan/5")
718
+ E && (A || _ ? Ft : "bg-nvr-cyan/5")
718
719
  ),
719
720
  style: { animationDelay: `${Math.min(l, 14) * 16}ms` },
720
721
  "data-row-key": i,
721
- title: we == null ? void 0 : we(e),
722
- onClick: () => a == null ? void 0 : a(e),
723
- onContextMenu: E ? (y) => E(e, y) : void 0,
724
- ...B ? {
725
- tabIndex: S ? 0 : -1,
726
- "aria-current": S && ne === i ? "true" : void 0,
727
- "aria-label": Oe == null ? void 0 : Oe(e),
722
+ title: _e == null ? void 0 : _e(e),
723
+ onClick: () => O == null ? void 0 : O(e),
724
+ onContextMenu: S ? (y) => S(e, y) : void 0,
725
+ ...W ? {
726
+ tabIndex: $ ? 0 : -1,
727
+ "aria-current": $ && ne === i ? "true" : void 0,
728
+ "aria-label": Se == null ? void 0 : Se(e),
728
729
  onFocus: (y) => {
729
- y.target === y.currentTarget && (J == null || J(e));
730
+ y.target === y.currentTarget && (D == null || D(e));
730
731
  },
731
732
  onKeyDown: (y) => {
732
- y.key !== "Enter" || y.target !== y.currentTarget || !a || (y.preventDefault(), a(e));
733
+ y.key !== "Enter" || y.target !== y.currentTarget || !O || (y.preventDefault(), O(e));
733
734
  }
734
735
  } : {},
735
736
  children: [
736
- C && /* @__PURE__ */ t(
737
+ M && /* @__PURE__ */ t(
737
738
  ce,
738
739
  {
739
740
  className: h(
740
741
  "w-9 px-3",
741
- ye === "compact" ? "py-1" : "py-2",
742
- (j || _) && "sticky left-0 z-[1] min-w-[40px] bg-inherit"
742
+ ge === "compact" ? "py-1" : "py-2",
743
+ (A || _) && "sticky left-0 z-[1] min-w-[40px] bg-inherit"
743
744
  ),
744
745
  onClick: (y) => {
745
- y.stopPropagation(), C(z ? (V == null ? void 0 : V.filter((Q) => Q !== i)) ?? [] : [...V ?? [], i]);
746
+ y.stopPropagation(), M(E ? (j == null ? void 0 : j.filter((X) => X !== i)) ?? [] : [...j ?? [], i]);
746
747
  },
747
- children: /* @__PURE__ */ t(Ke, { checked: z, "aria-label": "Select row" })
748
+ children: /* @__PURE__ */ t(Pe, { checked: E, "aria-label": "Select row" })
748
749
  }
749
750
  ),
750
- R.map((y, Q) => /* @__PURE__ */ t(
751
+ L.map((y, X) => /* @__PURE__ */ t(
751
752
  ce,
752
753
  {
753
754
  "data-dt-col": y.key,
754
755
  style: se(y.key),
755
756
  className: h(
756
757
  "px-3",
757
- ye === "compact" ? "py-1" : "py-2",
758
- dt && "whitespace-nowrap",
759
- !_ && j && Q === 0 && h(
758
+ ge === "compact" ? "py-1" : "py-2",
759
+ ct && "whitespace-nowrap",
760
+ !_ && A && X === 0 && h(
760
761
  "sticky z-[1] border-r border-slate-100 bg-inherit dark:border-border",
761
- C ? "left-[39px]" : "left-0"
762
+ M ? "left-[39px]" : "left-0"
762
763
  ),
763
- $e(y.key, !1),
764
+ ze(y.key, !1),
764
765
  y.className
765
766
  ),
766
767
  children: y.render ? y.render(e, l) : String(e[y.key] ?? "—")
@@ -772,23 +773,23 @@ function Ar({
772
773
  i
773
774
  );
774
775
  };
775
- return /* @__PURE__ */ s(U, { children: [
776
- /* @__PURE__ */ t(Ht, {}),
777
- k && v && /* @__PURE__ */ s(
776
+ return /* @__PURE__ */ s(H, { children: [
777
+ /* @__PURE__ */ t(Ut, {}),
778
+ w && N && /* @__PURE__ */ s(
778
779
  "div",
779
780
  {
780
781
  role: "alert",
781
782
  className: "mb-4 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-300",
782
783
  children: [
783
784
  /* @__PURE__ */ s("span", { children: [
784
- v,
785
+ N,
785
786
  d.length > 0 && " Showing the last list that loaded."
786
787
  ] }),
787
- N && /* @__PURE__ */ t(
788
+ x && /* @__PURE__ */ t(
788
789
  "button",
789
790
  {
790
791
  type: "button",
791
- onClick: N,
792
+ onClick: x,
792
793
  className: "font-medium underline underline-offset-2 hover:text-red-900 dark:hover:text-red-200",
793
794
  children: "Try again"
794
795
  }
@@ -804,30 +805,30 @@ function Ar({
804
805
  le && "flex h-full min-h-0 flex-col"
805
806
  ),
806
807
  children: [
807
- pt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
808
+ mt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
808
809
  K !== void 0 && /* @__PURE__ */ s("div", { className: "relative min-w-0 max-w-full", children: [
809
- /* @__PURE__ */ t(vt, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
810
+ /* @__PURE__ */ t(Nt, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
810
811
  /* @__PURE__ */ t(
811
- q,
812
+ R,
812
813
  {
813
814
  className: "h-8 w-56 max-w-full border-slate-200 bg-slate-50 pl-8 text-[13px]",
814
815
  placeholder: ae,
815
- value: O ?? "",
816
+ value: I ?? "",
816
817
  onChange: (e) => K(e.target.value)
817
818
  }
818
819
  )
819
820
  ] }),
820
- Ve && (T == null ? void 0 : T.map((e) => /* @__PURE__ */ t(
821
- at,
821
+ We && (m == null ? void 0 : m.map((e) => /* @__PURE__ */ t(
822
+ lt,
822
823
  {
823
824
  def: e,
824
- value: x[e.key] ?? "",
825
- onChange: (l) => M == null ? void 0 : M(e.key, l)
825
+ value: T[e.key] ?? "",
826
+ onChange: (l) => C == null ? void 0 : C(e.key, l)
826
827
  },
827
828
  e.key
828
829
  ))),
829
830
  /* @__PURE__ */ t("div", { className: "flex-1" }),
830
- A
831
+ F
831
832
  ] }),
832
833
  p ? (
833
834
  // #3229 — the real header (same labels, h-9) over rows with the real cell padding
@@ -839,12 +840,12 @@ function Ar({
839
840
  "data-skeleton": "table",
840
841
  "aria-busy": "true",
841
842
  className: h(le && "min-h-0 flex-1 overflow-hidden"),
842
- style: X ? { minHeight: X } : void 0,
843
- children: /* @__PURE__ */ s(Ge, { className: "border-separate border-spacing-0", children: [
844
- /* @__PURE__ */ t(et, { children: /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
845
- C && /* @__PURE__ */ t(I, { className: "h-9 w-9 border-b border-slate-200 bg-slate-50 px-3 py-0 dark:border-border dark:bg-muted" }),
846
- R.map((e) => /* @__PURE__ */ t(
847
- I,
843
+ style: J ? { minHeight: J } : void 0,
844
+ children: /* @__PURE__ */ s(et, { className: "border-separate border-spacing-0", children: [
845
+ /* @__PURE__ */ t(tt, { children: /* @__PURE__ */ s(Y, { className: "border-b border-slate-200 hover:bg-transparent", children: [
846
+ M && /* @__PURE__ */ t(Z, { className: "h-9 w-9 border-b border-slate-200 bg-slate-50 px-3 py-0 dark:border-border dark:bg-muted" }),
847
+ L.map((e) => /* @__PURE__ */ t(
848
+ Z,
848
849
  {
849
850
  className: h(
850
851
  "h-9 whitespace-nowrap border-b border-slate-200 bg-slate-50 px-3 py-0 text-[11px] font-medium text-slate-500 dark:border-border dark:bg-muted",
@@ -855,58 +856,62 @@ function Ar({
855
856
  e.key
856
857
  ))
857
858
  ] }) }),
858
- /* @__PURE__ */ t(tt, { children: /* @__PURE__ */ t(
859
- Xt,
859
+ /* @__PURE__ */ t(rt, { children: /* @__PURE__ */ t(
860
+ Qt,
860
861
  {
861
- columns: R.map((e) => ({ key: e.key })),
862
- rows: Math.min(Math.max(n ?? rr.length, 1), 15),
862
+ columns: L.map((e) => ({ key: e.key })),
863
+ rows: Math.min(Math.max(n ?? ar.length, 1), 15),
863
864
  rowClassName: "",
864
- cellClassName: h("px-3", ye === "compact" ? "py-1" : "py-2"),
865
- leadingCells: C ? 1 : 0
865
+ cellClassName: h("px-3", ge === "compact" ? "py-1" : "py-2"),
866
+ leadingCells: M ? 1 : 0
866
867
  }
867
868
  ) })
868
869
  ] })
869
870
  }
870
871
  )
871
- ) : /* @__PURE__ */ s(U, { children: [
872
+ ) : /* @__PURE__ */ s(H, { children: [
872
873
  /* @__PURE__ */ t(
873
874
  "div",
874
875
  {
875
- ref: H,
876
+ ref: q,
877
+ "data-stale": g ? "" : void 0,
878
+ "aria-busy": g || void 0,
876
879
  className: h(
877
- Te && "overflow-x-hidden [&>div]:overflow-visible",
880
+ "transition-opacity",
881
+ g && "opacity-60",
882
+ Ae && "overflow-x-hidden [&>div]:overflow-visible",
878
883
  // Bounded mode: rows scroll here under a sticky header. Header
879
884
  // cells sit above pinned body cells (z-[1/2]); the pinned
880
885
  // header corner (left-0) tops the other header cells so
881
886
  // horizontal scroll cannot bleed through it.
882
887
  le && "min-h-0 flex-1 overflow-y-auto [&_thead_th]:sticky [&_thead_th]:top-0 [&_thead_th]:z-[5] [&_thead_th.left-0]:z-[6] [&_thead_th.dt-pinned]:z-[6]"
883
888
  ),
884
- style: X ? { minHeight: X } : void 0,
889
+ style: J ? { minHeight: J } : void 0,
885
890
  children: /* @__PURE__ */ s(
886
- Ge,
891
+ et,
887
892
  {
888
893
  "data-copy-cells": "",
889
894
  className: "border-separate border-spacing-0 [&>tbody>tr.border-b:not(:last-child)>td]:border-b [&>tbody>tr.border-b:not(:last-child)>td]:[border-bottom-color:inherit] [&>thead>tr.border-b>th]:border-b [&>thead>tr.border-b>th]:[border-bottom-color:inherit]",
890
895
  children: [
891
- /* @__PURE__ */ s(et, { children: [
892
- /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
893
- C && /* @__PURE__ */ t(
894
- I,
896
+ /* @__PURE__ */ s(tt, { children: [
897
+ /* @__PURE__ */ s(Y, { className: "border-b border-slate-200 hover:bg-transparent", children: [
898
+ M && /* @__PURE__ */ t(
899
+ Z,
895
900
  {
896
- ref: Le,
901
+ ref: Re,
897
902
  className: h(
898
903
  "h-9 w-9 bg-slate-50 px-3 py-0",
899
- (j || _) && "sticky left-0 z-[2] min-w-[40px]"
904
+ (A || _) && "sticky left-0 z-[2] min-w-[40px]"
900
905
  ),
901
906
  children: /* @__PURE__ */ t(
902
- Ke,
907
+ Pe,
903
908
  {
904
909
  checked: d.length > 0 && d.every((e, l) => {
905
910
  const i = o ? o(e, l) : String(l);
906
- return V == null ? void 0 : V.includes(i);
911
+ return j == null ? void 0 : j.includes(i);
907
912
  }),
908
913
  onCheckedChange: (e) => {
909
- C(
914
+ M(
910
915
  e ? d.map((l, i) => o ? o(l, i) : String(i)) : []
911
916
  );
912
917
  },
@@ -915,32 +920,32 @@ function Ar({
915
920
  )
916
921
  }
917
922
  ),
918
- R.map((e, l) => /* @__PURE__ */ t(
919
- I,
923
+ L.map((e, l) => /* @__PURE__ */ t(
924
+ Z,
920
925
  {
921
926
  ref: (i) => {
922
- Fe.current[e.key] = i;
927
+ Le.current[e.key] = i;
923
928
  },
924
929
  style: se(e.key),
925
930
  className: h(
926
931
  "group/th group/hcell h-9 whitespace-nowrap bg-slate-50 px-3 py-0 text-[11px] font-medium text-slate-500",
927
- e.sortable && m && "cursor-pointer select-none hover:text-slate-600",
928
- !_ && j && l === 0 && h(
932
+ e.sortable && k && "cursor-pointer select-none hover:text-slate-600",
933
+ !_ && A && l === 0 && h(
929
934
  "sticky z-[2] border-r border-slate-200 dark:border-border",
930
- C ? "left-[39px]" : "left-0"
935
+ M ? "left-[39px]" : "left-0"
931
936
  ),
932
937
  _ && "bg-slate-50 dark:bg-muted",
933
- $e(e.key, !0),
938
+ ze(e.key, !0),
934
939
  e.headerClassName
935
940
  ),
936
- onClick: () => We(e),
937
- "aria-sort": e.sortable && m ? nr(f, e.key) : void 0,
938
- tabIndex: e.sortable && m && !Ee(e.header) ? 0 : void 0,
939
- onKeyDown: e.sortable && m && !Ee(e.header) ? (i) => {
940
- i.target === i.currentTarget && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), We(e));
941
+ onClick: () => Be(e),
942
+ "aria-sort": e.sortable && k ? sr(u, e.key) : void 0,
943
+ tabIndex: e.sortable && k && !Ce(e.header) ? 0 : void 0,
944
+ onKeyDown: e.sortable && k && !Ce(e.header) ? (i) => {
945
+ i.target === i.currentTarget && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), Be(e));
941
946
  } : void 0,
942
947
  children: /* @__PURE__ */ s("span", { className: "inline-flex items-center", children: [
943
- e.sortable && m && Ee(e.header) ? /* @__PURE__ */ s(
948
+ e.sortable && k && Ce(e.header) ? /* @__PURE__ */ s(
944
949
  "button",
945
950
  {
946
951
  type: "button",
@@ -948,33 +953,33 @@ function Ar({
948
953
  "data-dt-sort": e.key,
949
954
  children: [
950
955
  e.header,
951
- /* @__PURE__ */ t(rt, { field: e.key, sort: f })
956
+ /* @__PURE__ */ t(at, { field: e.key, sort: u })
952
957
  ]
953
958
  }
954
- ) : /* @__PURE__ */ s(U, { children: [
959
+ ) : /* @__PURE__ */ s(H, { children: [
955
960
  e.header,
956
961
  !pe(e.header).trim() && /* @__PURE__ */ t("span", { className: "sr-only", children: oe(e) }),
957
- e.sortable && m && /* @__PURE__ */ t(rt, { field: e.key, sort: f })
962
+ e.sortable && k && /* @__PURE__ */ t(at, { field: e.key, sort: u })
958
963
  ] }),
959
- _ && ge && e.key !== "claim" && /* @__PURE__ */ t(
964
+ _ && ke && e.key !== "claim" && /* @__PURE__ */ t(
960
965
  "button",
961
966
  {
962
967
  type: "button",
963
968
  onClick: (i) => {
964
- i.stopPropagation(), xt(e.key);
969
+ i.stopPropagation(), yt(e.key);
965
970
  },
966
971
  "aria-label": `Pin column ${oe(e)}`,
967
- title: (g == null ? void 0 : g[e.key]) === "left" ? "Pinned left — click to pin right" : (g == null ? void 0 : g[e.key]) === "right" ? "Pinned right — click to unpin" : "Pin column",
972
+ title: (v == null ? void 0 : v[e.key]) === "left" ? "Pinned left — click to pin right" : (v == null ? void 0 : v[e.key]) === "right" ? "Pinned right — click to unpin" : "Pin column",
968
973
  className: h(
969
974
  "ml-1 rounded p-0.5 transition-opacity",
970
- g != null && g[e.key] ? "text-nvr-cyan opacity-100" : "text-slate-300 opacity-0 hover:text-slate-500 group-hover/th:opacity-100"
975
+ v != null && v[e.key] ? "text-nvr-cyan opacity-100" : "text-slate-300 opacity-0 hover:text-slate-500 group-hover/th:opacity-100"
971
976
  ),
972
977
  children: /* @__PURE__ */ t(
973
- Nt,
978
+ wt,
974
979
  {
975
980
  className: h(
976
981
  "h-3 w-3",
977
- (g == null ? void 0 : g[e.key]) === "right" && "rotate-90"
982
+ (v == null ? void 0 : v[e.key]) === "right" && "rotate-90"
978
983
  )
979
984
  }
980
985
  )
@@ -986,36 +991,36 @@ function Ar({
986
991
  e.key
987
992
  ))
988
993
  ] }),
989
- gt && /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
990
- C && /* @__PURE__ */ t(
991
- I,
994
+ kt && /* @__PURE__ */ s(Y, { className: "border-b border-slate-200 hover:bg-transparent", children: [
995
+ M && /* @__PURE__ */ t(
996
+ Z,
992
997
  {
993
998
  className: h(
994
999
  "h-9 w-9 bg-slate-50 px-3 py-1",
995
- (j || _) && "sticky left-0 z-[2] min-w-[40px]"
1000
+ (A || _) && "sticky left-0 z-[2] min-w-[40px]"
996
1001
  ),
997
1002
  children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Filters" })
998
1003
  }
999
1004
  ),
1000
- R.map((e) => {
1001
- const l = yt.get(e.key);
1005
+ L.map((e) => {
1006
+ const l = gt.get(e.key);
1002
1007
  return /* @__PURE__ */ s(
1003
- I,
1008
+ Z,
1004
1009
  {
1005
1010
  style: se(e.key),
1006
1011
  className: h(
1007
1012
  "h-9 bg-slate-50 px-1.5 py-1 align-middle",
1008
1013
  _ && "bg-slate-50 dark:bg-muted",
1009
- $e(e.key, !0)
1014
+ ze(e.key, !0)
1010
1015
  ),
1011
1016
  children: [
1012
- /* @__PURE__ */ t("span", { className: "sr-only", children: l && M ? `Filter ${oe(e)}` : `${oe(e)}: no filter` }),
1013
- l && M ? /* @__PURE__ */ t(
1014
- at,
1017
+ /* @__PURE__ */ t("span", { className: "sr-only", children: l && C ? `Filter ${oe(e)}` : `${oe(e)}: no filter` }),
1018
+ l && C ? /* @__PURE__ */ t(
1019
+ lt,
1015
1020
  {
1016
1021
  def: l,
1017
- value: x[l.key] ?? "",
1018
- onChange: (i) => M(l.key, i),
1022
+ value: T[l.key] ?? "",
1023
+ onChange: (i) => C(l.key, i),
1019
1024
  layout: "cell"
1020
1025
  }
1021
1026
  ) : null
@@ -1026,24 +1031,24 @@ function Ar({
1026
1031
  })
1027
1032
  ] })
1028
1033
  ] }),
1029
- /* @__PURE__ */ s(tt, { className: "tabular-nums", children: [
1030
- W ? W.map((e) => {
1031
- const l = (D == null ? void 0 : D.has(e.key)) ?? !1;
1032
- return /* @__PURE__ */ s(zt.Fragment, { children: [
1034
+ /* @__PURE__ */ s(rt, { className: "tabular-nums", children: [
1035
+ V ? V.map((e) => {
1036
+ const l = (U == null ? void 0 : U.has(e.key)) ?? !1;
1037
+ return /* @__PURE__ */ s(Et.Fragment, { children: [
1033
1038
  /* @__PURE__ */ t(
1034
- Z,
1039
+ Y,
1035
1040
  {
1036
1041
  "data-group-key": e.key,
1037
1042
  className: "nvr-row-enter cursor-pointer border-slate-200 bg-slate-50/80 transition-colors hover:bg-slate-100/80 dark:bg-muted/40",
1038
- onClick: () => _e == null ? void 0 : _e(e.key),
1043
+ onClick: () => Oe == null ? void 0 : Oe(e.key),
1039
1044
  children: /* @__PURE__ */ t(
1040
1045
  ce,
1041
1046
  {
1042
- colSpan: r.length + (C ? 1 : 0),
1047
+ colSpan: r.length + (M ? 1 : 0),
1043
1048
  className: "px-3 py-1.5",
1044
1049
  children: /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[12px] font-medium text-slate-600 dark:text-foreground", children: [
1045
1050
  /* @__PURE__ */ t(
1046
- wt,
1051
+ _t,
1047
1052
  {
1048
1053
  className: h(
1049
1054
  "h-3.5 w-3.5 text-slate-400 transition-transform duration-200",
@@ -1057,58 +1062,58 @@ function Ar({
1057
1062
  )
1058
1063
  }
1059
1064
  ),
1060
- !l && e.rows.map((i, z) => He(i, z))
1065
+ !l && e.rows.map((i, E) => Ue(i, E))
1061
1066
  ] }, e.key);
1062
- }) : d.map((e, l) => He(e, l)),
1063
- (W ? W.length === 0 : d.length === 0) && /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ t(
1067
+ }) : d.map((e, l) => Ue(e, l)),
1068
+ (V ? V.length === 0 : d.length === 0) && /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(
1064
1069
  ce,
1065
1070
  {
1066
- colSpan: r.length + (C ? 1 : 0),
1071
+ colSpan: r.length + (M ? 1 : 0),
1067
1072
  className: "nvr-fade-in p-0 text-center align-middle text-[13px] text-slate-400",
1068
- style: X ? { height: Math.max(96, X - 56) } : void 0,
1073
+ style: J ? { height: Math.max(96, J - 56) } : void 0,
1069
1074
  children: /* @__PURE__ */ t(
1070
1075
  "div",
1071
1076
  {
1072
1077
  className: "sticky left-0 py-12",
1073
- style: qe ? { width: qe } : void 0,
1078
+ style: He ? { width: He } : void 0,
1074
1079
  "data-table-empty": !0,
1075
- children: typeof L == "string" ? /* @__PURE__ */ t(Ut, { icon: _t, title: L }) : L
1080
+ children: typeof ye == "string" ? /* @__PURE__ */ t(Dt, { icon: Ot, title: ye }) : ye
1076
1081
  }
1077
1082
  )
1078
1083
  }
1079
1084
  ) })
1080
- ] }, bt),
1081
- P && !W && d.length > 0 && // Sticky per cell (not per row): a pinned cell sticks left/right AND bottom.
1085
+ ] }, pt),
1086
+ P && !V && d.length > 0 && // Sticky per cell (not per row): a pinned cell sticks left/right AND bottom.
1082
1087
  /* @__PURE__ */ t("tfoot", { className: "text-[12px] tabular-nums", "data-dt-totals": !0, children: /* @__PURE__ */ s("tr", { children: [
1083
- C && /* @__PURE__ */ t(
1088
+ M && /* @__PURE__ */ t(
1084
1089
  "td",
1085
1090
  {
1086
1091
  className: h(
1087
1092
  "sticky bottom-0 z-[3] border-t-2 border-slate-200 bg-slate-50 px-3 py-1.5 dark:border-border dark:bg-muted",
1088
- (j || _) && "left-0 z-[4]"
1093
+ (A || _) && "left-0 z-[4]"
1089
1094
  )
1090
1095
  }
1091
1096
  ),
1092
1097
  (() => {
1093
- const e = R.findIndex(
1098
+ const e = L.findIndex(
1094
1099
  (l) => P.cells[l.key] == null
1095
1100
  );
1096
- return R.map((l, i) => {
1097
- var S, y;
1098
- const z = _ && !!ee[l.key], B = P.cells[l.key];
1101
+ return L.map((l, i) => {
1102
+ var $, y;
1103
+ const E = _ && !!ee[l.key], W = P.cells[l.key];
1099
1104
  return /* @__PURE__ */ t(
1100
1105
  "td",
1101
1106
  {
1102
1107
  style: se(l.key),
1103
- "data-dt-total-cell": B != null ? l.key : void 0,
1108
+ "data-dt-total-cell": W != null ? l.key : void 0,
1104
1109
  className: h(
1105
1110
  "sticky bottom-0 z-[3] whitespace-nowrap border-t-2 border-slate-200 bg-slate-50 px-3 py-1.5 font-medium dark:border-border dark:bg-muted",
1106
- z && "z-[4]",
1107
- z && ((S = ee[l.key]) == null ? void 0 : S.seam) && (((y = ee[l.key]) == null ? void 0 : y.side) === "left" ? "border-r" : "border-l"),
1108
- !_ && j && i === 0 && "z-[4]",
1109
- !_ && j && i === 0 && (C ? "left-[39px]" : "left-0")
1111
+ E && "z-[4]",
1112
+ E && (($ = ee[l.key]) == null ? void 0 : $.seam) && (((y = ee[l.key]) == null ? void 0 : y.side) === "left" ? "border-r" : "border-l"),
1113
+ !_ && A && i === 0 && "z-[4]",
1114
+ !_ && A && i === 0 && (M ? "left-[39px]" : "left-0")
1110
1115
  ),
1111
- children: B ?? (i === e && P.label != null ? P.label : null)
1116
+ children: W ?? (i === e && P.label != null ? P.label : null)
1112
1117
  },
1113
1118
  l.key
1114
1119
  );
@@ -1120,40 +1125,40 @@ function Ar({
1120
1125
  )
1121
1126
  }
1122
1127
  ),
1123
- Te && /* @__PURE__ */ t(Dt, { scrollerRef: H }),
1124
- st,
1125
- !W && c > n && /* @__PURE__ */ s(
1128
+ Ae && /* @__PURE__ */ t(Jt, { scrollerRef: q }),
1129
+ it,
1130
+ !V && c > n && /* @__PURE__ */ s(
1126
1131
  "div",
1127
1132
  {
1128
1133
  className: "flex items-center justify-between border-t border-slate-100 py-1.5 pl-2 dark:border-border md:py-2.5 md:pl-4",
1129
1134
  style: { paddingRight: "calc(0.5rem + var(--nvr-corner-float, 0px))" },
1130
1135
  children: [
1131
1136
  /* @__PURE__ */ t(
1132
- Jt,
1137
+ Xt,
1133
1138
  {
1134
1139
  className: "w-full",
1135
- range: /* @__PURE__ */ s(U, { children: [
1140
+ range: /* @__PURE__ */ s(H, { children: [
1136
1141
  /* @__PURE__ */ s("span", { className: "font-semibold text-slate-700 dark:text-slate-200", children: [
1137
- Y(Ae),
1142
+ Q(je),
1138
1143
  "–",
1139
- Y(je)
1144
+ Q(Ve)
1140
1145
  ] }),
1141
1146
  " ",
1142
1147
  "of ",
1143
- Y(c)
1148
+ Q(c)
1144
1149
  ] }),
1145
1150
  prevDisabled: b <= 1,
1146
1151
  nextDisabled: b >= G,
1147
- onPrev: () => w(b - 1),
1148
- onNext: () => w(b + 1)
1152
+ onPrev: () => a(b - 1),
1153
+ onNext: () => a(b + 1)
1149
1154
  }
1150
1155
  ),
1151
1156
  /* @__PURE__ */ s("p", { className: "hidden text-[12px] text-slate-400 md:block", children: [
1152
- Y(Ae),
1157
+ Q(je),
1153
1158
  "–",
1154
- Y(je),
1159
+ Q(Ve),
1155
1160
  " of ",
1156
- Y(c),
1161
+ Q(c),
1157
1162
  " records"
1158
1163
  ] }),
1159
1164
  /* @__PURE__ */ s("div", { className: "hidden items-center gap-1 md:flex", children: [
@@ -1164,7 +1169,7 @@ function Ar({
1164
1169
  size: "sm",
1165
1170
  className: "h-7 px-2 text-[12px] text-slate-600",
1166
1171
  disabled: b <= 1,
1167
- onClick: () => w(1),
1172
+ onClick: () => a(1),
1168
1173
  "aria-label": "First page",
1169
1174
  "data-tip": "First page",
1170
1175
  children: "«"
@@ -1177,7 +1182,7 @@ function Ar({
1177
1182
  size: "sm",
1178
1183
  className: "h-7 px-2.5 text-[12px] text-slate-600",
1179
1184
  disabled: b <= 1,
1180
- onClick: () => w(b - 1),
1185
+ onClick: () => a(b - 1),
1181
1186
  children: "← Prev"
1182
1187
  }
1183
1188
  ),
@@ -1193,7 +1198,7 @@ function Ar({
1193
1198
  size: "sm",
1194
1199
  className: "h-7 px-2.5 text-[12px] text-slate-600",
1195
1200
  disabled: b >= G,
1196
- onClick: () => w(b + 1),
1201
+ onClick: () => a(b + 1),
1197
1202
  children: "Next →"
1198
1203
  }
1199
1204
  ),
@@ -1204,7 +1209,7 @@ function Ar({
1204
1209
  size: "sm",
1205
1210
  className: "h-7 px-2 text-[12px] text-slate-600",
1206
1211
  disabled: b >= G,
1207
- onClick: () => w(G),
1212
+ onClick: () => a(G),
1208
1213
  "aria-label": "Last page",
1209
1214
  "data-tip": "Last page",
1210
1215
  children: "»"
@@ -1221,11 +1226,11 @@ function Ar({
1221
1226
  ] });
1222
1227
  }
1223
1228
  export {
1224
- Ar as DataTable,
1225
- at as FilterControl,
1226
- nr as ariaSortFor,
1227
- lr as containsFilter,
1228
- lt as filterDefLabel,
1229
- Tr as filterValueDisplay,
1229
+ jr as DataTable,
1230
+ lt as FilterControl,
1231
+ sr as ariaSortFor,
1232
+ nr as containsFilter,
1233
+ nt as filterDefLabel,
1234
+ Ar as filterValueDisplay,
1230
1235
  oe as pinColumnName
1231
1236
  };