chordia-ui 4.0.7 → 4.0.9

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.
@@ -1,66 +1,66 @@
1
- import { jsxs as m, jsx as s, Fragment as Fe } from "react/jsx-runtime";
2
- import ht, { useState as g, useRef as U, useEffect as I, Suspense as cn, useMemo as ge, useCallback as P, useLayoutEffect as dn } from "react";
3
- import { u as un, a as At, D as fn, c as pn, S as mn, h as hn, b as gn, s as yn, K as xn, P as bn, d as gt, e as vn, C as Sn } from "./sortable.esm.es.js";
4
- import { CalendarClock as Ot, Download as wn, ChevronDown as Fn, Settings2 as kn, X as Dn, GripVertical as yt, Search as Cn, Check as st, ArrowUp as Rn, ArrowDown as zn, ArrowUpDown as En, ListFilter as Mn } from "lucide-react";
5
- import { createPortal as vt } from "react-dom";
6
- import { C as Bn, P as Nn } from "./CustomFilterChips.es.js";
1
+ import { jsxs as h, jsx as s, Fragment as Ce } from "react/jsx-runtime";
2
+ import wt, { useState as y, useRef as K, useEffect as j, Suspense as kn, useMemo as oe, useCallback as O, useLayoutEffect as Dn } from "react";
3
+ import { u as Cn, a as Ut, D as Rn, c as zn, S as Bn, h as En, b as Mn, s as An, K as Nn, P as Wn, d as Ft, e as On, C as Tn } from "./sortable.esm.es.js";
4
+ import { CalendarClock as Xt, Download as $n, ChevronDown as Ln, Settings2 as Pn, X as In, GripVertical as kt, Search as _n, Check as Qe, Minus as jn, ArrowUp as Hn, ArrowDown as Kn, ArrowUpDown as Un, ListFilter as Xn } from "lucide-react";
5
+ import { createPortal as Rt } from "react-dom";
6
+ import { C as Gn, P as Jn } from "./CustomFilterChips.es.js";
7
7
  import "motion/react";
8
8
  import "recharts";
9
9
  import "./AgentLiftAnalysisCard.es.js";
10
10
  import "./TourGuideTooltip.es.js";
11
- function Wn({
12
- dateRangePicker: n,
11
+ function Yn({
12
+ dateRangePicker: r,
13
13
  onWeekToDate: l,
14
14
  exportConfig: d,
15
15
  filterChipsConfig: f,
16
- trailingActions: S
16
+ trailingActions: w
17
17
  // Optional extra actions rendered after Export (e.g., Add Users button)
18
18
  }) {
19
- const [v, a] = g(!1), b = U(null), B = U(null);
20
- I(() => {
21
- const D = (w) => {
22
- B.current && !B.current.contains(w.target) && b.current && !b.current.contains(w.target) && a(!1);
19
+ const [S, a] = y(!1), b = K(null), T = K(null);
20
+ j(() => {
21
+ const D = (v) => {
22
+ T.current && !T.current.contains(v.target) && b.current && !b.current.contains(v.target) && a(!1);
23
23
  };
24
- if (v)
24
+ if (S)
25
25
  return document.addEventListener("mousedown", D), () => {
26
26
  document.removeEventListener("mousedown", D);
27
27
  };
28
- }, [v]);
28
+ }, [S]);
29
29
  const k = () => {
30
30
  a((D) => !D);
31
31
  }, C = (D) => {
32
32
  a(!1), d != null && d.onExport && d.onExport(D);
33
- }, L = (() => {
33
+ }, H = (() => {
34
34
  if (!(f != null && f.filters))
35
35
  return !1;
36
- const D = f.filters, w = f.customFilters || [], N = Object.entries(D).some(([E, M]) => !!(Array.isArray(M) && M.length || typeof M == "string" && M.trim() !== "" || M && typeof M == "object" && (M.min != null || M.max != null))), H = w.some((E) => E.active);
37
- return N || H;
36
+ const D = f.filters, v = f.customFilters || [], $ = Object.entries(D).some(([B, A]) => !!(Array.isArray(A) && A.length || typeof A == "string" && A.trim() !== "" || A && typeof A == "object" && (A.min != null || A.max != null))), L = v.some((B) => B.active);
37
+ return $ || L;
38
38
  })();
39
- return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 flex-wrap", children: [
40
- l && /* @__PURE__ */ m(
39
+ return /* @__PURE__ */ h("div", { className: "flex items-center gap-3 flex-wrap", children: [
40
+ l && /* @__PURE__ */ h(
41
41
  "button",
42
42
  {
43
43
  onClick: l,
44
44
  className: "inline-flex items-center gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 transition-colors hover:bg-white text-sm font-medium text-gray-900",
45
45
  style: { fontFamily: "var(--font-sans)" },
46
46
  children: [
47
- /* @__PURE__ */ s(Ot, { size: 16 }),
47
+ /* @__PURE__ */ s(Xt, { size: 16 }),
48
48
  /* @__PURE__ */ s("span", { children: "Week to Date" })
49
49
  ]
50
50
  }
51
51
  ),
52
- n && /* @__PURE__ */ s(
53
- cn,
52
+ r && /* @__PURE__ */ s(
53
+ kn,
54
54
  {
55
- fallback: /* @__PURE__ */ m("div", { className: "inline-flex items-center gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 text-sm font-medium text-gray-400", children: [
56
- /* @__PURE__ */ s(Ot, { size: 16 }),
55
+ fallback: /* @__PURE__ */ h("div", { className: "inline-flex items-center gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 text-sm font-medium text-gray-400", children: [
56
+ /* @__PURE__ */ s(Xt, { size: 16 }),
57
57
  /* @__PURE__ */ s("span", { children: "Loading..." })
58
58
  ] }),
59
- children: n
59
+ children: r
60
60
  }
61
61
  ),
62
- d && /* @__PURE__ */ m("div", { className: "relative", children: [
63
- /* @__PURE__ */ m(
62
+ d && /* @__PURE__ */ h("div", { className: "relative", children: [
63
+ /* @__PURE__ */ h(
64
64
  "button",
65
65
  {
66
66
  ref: b,
@@ -69,20 +69,20 @@ function Wn({
69
69
  className: "inline-flex items-center justify-between gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 transition-colors hover:bg-white text-sm font-medium text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed min-w-[120px]",
70
70
  style: { fontFamily: "var(--font-sans)" },
71
71
  children: [
72
- /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
73
- /* @__PURE__ */ s(wn, { size: 16 }),
72
+ /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
73
+ /* @__PURE__ */ s($n, { size: 16 }),
74
74
  /* @__PURE__ */ s("span", { children: d.isExporting ? "Exporting..." : "Export" })
75
75
  ] }),
76
- /* @__PURE__ */ s(Fn, { size: 16 })
76
+ /* @__PURE__ */ s(Ln, { size: 16 })
77
77
  ]
78
78
  }
79
79
  ),
80
- v && /* @__PURE__ */ s(
80
+ S && /* @__PURE__ */ s(
81
81
  "div",
82
82
  {
83
- ref: B,
83
+ ref: T,
84
84
  className: "absolute top-full right-0 mt-2 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50 min-w-[120px]",
85
- children: (d.types || ["csv"]).map((D) => /* @__PURE__ */ m(
85
+ children: (d.types || ["csv"]).map((D) => /* @__PURE__ */ h(
86
86
  "button",
87
87
  {
88
88
  onClick: () => C(D),
@@ -98,11 +98,11 @@ function Wn({
98
98
  }
99
99
  )
100
100
  ] }),
101
- (L || S) && /* @__PURE__ */ m(Fe, { children: [
102
- L && /* @__PURE__ */ s("div", { className: "h-9 mt-1 w-px bg-gray-300 flex-shrink-0" }),
103
- /* @__PURE__ */ m("div", { className: "flex items-center gap-3 justify-end", children: [
104
- L && f && /* @__PURE__ */ s(
105
- Bn,
101
+ (H || w) && /* @__PURE__ */ h(Ce, { children: [
102
+ H && /* @__PURE__ */ s("div", { className: "h-9 mt-1 w-px bg-gray-300 flex-shrink-0" }),
103
+ /* @__PURE__ */ h("div", { className: "flex items-center gap-3 justify-end", children: [
104
+ H && f && /* @__PURE__ */ s(
105
+ Gn,
106
106
  {
107
107
  filters: f.filters,
108
108
  onChange: f.onChange,
@@ -111,85 +111,85 @@ function Wn({
111
111
  fieldOptions: f.fieldOptions || {}
112
112
  }
113
113
  ),
114
- S && /* @__PURE__ */ s("div", { className: "flex-shrink-0", children: S })
114
+ w && /* @__PURE__ */ s("div", { className: "flex-shrink-0", children: w })
115
115
  ] })
116
116
  ] })
117
117
  ] });
118
118
  }
119
- function St(n) {
120
- if (n == null)
119
+ function zt(r) {
120
+ if (r == null)
121
121
  return NaN;
122
- const l = String(n).replace(/[,$%]|pp/gi, "").trim(), d = parseFloat(l);
122
+ const l = String(r).replace(/[,$%]|pp/gi, "").trim(), d = parseFloat(l);
123
123
  return Number.isFinite(d) ? d : NaN;
124
124
  }
125
- function An(n) {
126
- if (n == null)
125
+ function Qn(r) {
126
+ if (r == null)
127
127
  return NaN;
128
- const l = String(n).trim(), d = l.match(/^(\d+):(\d+)(?::(\d+))?$/);
128
+ const l = String(r).trim(), d = l.match(/^(\d+):(\d+)(?::(\d+))?$/);
129
129
  if (d) {
130
130
  const k = +d[1], C = +d[2], z = d[3] != null ? +d[3] : null;
131
131
  return z != null ? k * 3600 + C * 60 + z : k * 60 + C;
132
132
  }
133
- let f = 0, S = !1;
134
- const v = l.match(/(\d+)\s*d\b/i), a = l.match(/(\d+)\s*h\b/i), b = l.match(/(\d+)\s*m(?!s)\b/i), B = l.match(/(\d+)\s*s\b/i);
135
- return v && (f += +v[1] * 86400, S = !0), a && (f += +a[1] * 3600, S = !0), b && (f += +b[1] * 60, S = !0), B && (f += +B[1], S = !0), S ? f : NaN;
133
+ let f = 0, w = !1;
134
+ const S = l.match(/(\d+)\s*d\b/i), a = l.match(/(\d+)\s*h\b/i), b = l.match(/(\d+)\s*m(?!s)\b/i), T = l.match(/(\d+)\s*s\b/i);
135
+ return S && (f += +S[1] * 86400, w = !0), a && (f += +a[1] * 3600, w = !0), b && (f += +b[1] * 60, w = !0), T && (f += +T[1], w = !0), w ? f : NaN;
136
136
  }
137
- function On(n) {
138
- if (!n)
137
+ function qn(r) {
138
+ if (!r)
139
139
  return null;
140
- const l = String(n).trim(), d = l.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/);
140
+ const l = String(r).trim(), d = l.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/);
141
141
  if (d) {
142
- const S = d[3].length === 2 ? 2e3 + +d[3] : +d[3], v = new Date(S, +d[1] - 1, +d[2]);
143
- return isNaN(v.getTime()) ? null : v;
142
+ const w = d[3].length === 2 ? 2e3 + +d[3] : +d[3], S = new Date(w, +d[1] - 1, +d[2]);
143
+ return isNaN(S.getTime()) ? null : S;
144
144
  }
145
145
  const f = new Date(l);
146
146
  return isNaN(f.getTime()) ? null : f;
147
147
  }
148
- function Tn(n) {
149
- if (!n || n.length === 0)
148
+ function Zn(r) {
149
+ if (!r || r.length === 0)
150
150
  return "text";
151
- const l = n.slice(0, 25), d = (f) => l.every(f);
151
+ const l = r.slice(0, 25), d = (f) => l.every(f);
152
152
  return d((f) => /^\d{1,2}\/\d{1,2}\/\d{2,4}$/.test(f) || /^\d{4}-\d{2}-\d{2}/.test(f)) ? "date" : d((f) => /^\d+\s*[dhms]\b/i.test(f) || /^\d+:\d+(:\d+)?$/.test(f)) ? "duration" : d((f) => /^-?[\d,.]+(%|pp)?$/i.test(f)) ? "number" : "text";
153
153
  }
154
- function Ue(n) {
155
- return n ? Array.isArray(n) ? n.length > 0 : n.type === "range" ? n.min !== "" && n.min !== void 0 && n.min !== null || n.max !== "" && n.max !== void 0 && n.max !== null : n.type === "durationRange" ? n.minSec !== "" && n.minSec != null || n.maxSec !== "" && n.maxSec != null : n.type === "scoreRange" ? Array.isArray(n.values) && n.values.length > 0 || n.min !== "" && n.min != null || n.max !== "" && n.max != null : n.type === "dateRange" ? !!(n.from || n.to) : !1 : !1;
154
+ function Ye(r) {
155
+ return r ? Array.isArray(r) ? r.length > 0 : r.type === "range" ? r.min !== "" && r.min !== void 0 && r.min !== null || r.max !== "" && r.max !== void 0 && r.max !== null : r.type === "durationRange" ? r.minSec !== "" && r.minSec != null || r.maxSec !== "" && r.maxSec != null : r.type === "scoreRange" ? Array.isArray(r.values) && r.values.length > 0 || r.min !== "" && r.min != null || r.max !== "" && r.max != null : r.type === "dateRange" ? !!(r.from || r.to) : !1 : !1;
156
156
  }
157
- function Tt(n) {
158
- if (n == null || n === "" || isNaN(n))
157
+ function Gt(r) {
158
+ if (r == null || r === "" || isNaN(r))
159
159
  return "";
160
- const l = Number(n), d = Math.floor(l / 3600), f = Math.floor(l % 3600 / 60), S = Math.floor(l % 60);
161
- return d > 0 ? `${d}h ${f}m` : f > 0 ? `${f}m ${S}s` : `${S}s`;
160
+ const l = Number(r), d = Math.floor(l / 3600), f = Math.floor(l % 3600 / 60), w = Math.floor(l % 60);
161
+ return d > 0 ? `${d}h ${f}m` : f > 0 ? `${f}m ${w}s` : `${w}s`;
162
162
  }
163
- function $n(n) {
164
- if (!n)
163
+ function Vn(r) {
164
+ if (!r)
165
165
  return "";
166
- if (Array.isArray(n))
167
- return n.length === 0 ? "" : String(n[0]);
168
- if (n.type === "range") {
169
- const l = n.min !== "" && n.min != null ? n.min : null, d = n.max !== "" && n.max != null ? n.max : null;
166
+ if (Array.isArray(r))
167
+ return r.length === 0 ? "" : String(r[0]);
168
+ if (r.type === "range") {
169
+ const l = r.min !== "" && r.min != null ? r.min : null, d = r.max !== "" && r.max != null ? r.max : null;
170
170
  return l != null && d != null ? `${l} – ${d}` : l != null ? `≥ ${l}` : d != null ? `≤ ${d}` : "";
171
171
  }
172
- if (n.type === "durationRange") {
173
- const l = n.minSec !== "" && n.minSec != null ? Tt(n.minSec) : null, d = n.maxSec !== "" && n.maxSec != null ? Tt(n.maxSec) : null;
172
+ if (r.type === "durationRange") {
173
+ const l = r.minSec !== "" && r.minSec != null ? Gt(r.minSec) : null, d = r.maxSec !== "" && r.maxSec != null ? Gt(r.maxSec) : null;
174
174
  return l && d ? `${l} – ${d}` : l ? `≥ ${l}` : d ? `≤ ${d}` : "";
175
175
  }
176
- if (n.type === "scoreRange") {
177
- if (Array.isArray(n.values) && n.values.length > 0)
178
- return n.values.slice().sort((f, S) => f - S).join(", ");
179
- const l = n.min !== "" && n.min != null ? n.min : null, d = n.max !== "" && n.max != null ? n.max : null;
176
+ if (r.type === "scoreRange") {
177
+ if (Array.isArray(r.values) && r.values.length > 0)
178
+ return r.values.slice().sort((f, w) => f - w).join(", ");
179
+ const l = r.min !== "" && r.min != null ? r.min : null, d = r.max !== "" && r.max != null ? r.max : null;
180
180
  return l != null && d != null ? `${l} – ${d}` : l != null ? `≥ ${l}` : d != null ? `≤ ${d}` : "";
181
181
  }
182
- return n.type === "dateRange" ? n.from && n.to ? `${n.from} – ${n.to}` : n.from ? `from ${n.from}` : n.to ? `to ${n.to}` : "" : "";
182
+ return r.type === "dateRange" ? r.from && r.to ? `${r.from} – ${r.to}` : r.from ? `from ${r.from}` : r.to ? `to ${r.to}` : "" : "";
183
183
  }
184
- function Ln(n) {
185
- return Array.isArray(n) ? Math.max(0, n.length - 1) : 0;
184
+ function er(r) {
185
+ return Array.isArray(r) ? Math.max(0, r.length - 1) : 0;
186
186
  }
187
- function Pn(n) {
188
- return Array.isArray(n) ? n.slice(1).map(String).join(", ") : "";
187
+ function tr(r) {
188
+ return Array.isArray(r) ? r.slice(1).map(String).join(", ") : "";
189
189
  }
190
- function In({ count: n, values: l }) {
191
- const [d, f] = g(!1);
192
- return /* @__PURE__ */ m(
190
+ function nr({ count: r, values: l }) {
191
+ const [d, f] = y(!1);
192
+ return /* @__PURE__ */ h(
193
193
  "span",
194
194
  {
195
195
  onMouseEnter: () => f(!0),
@@ -212,7 +212,7 @@ function In({ count: n, values: l }) {
212
212
  },
213
213
  children: [
214
214
  "+",
215
- n,
215
+ r,
216
216
  d && /* @__PURE__ */ s(
217
217
  "span",
218
218
  {
@@ -242,7 +242,7 @@ function In({ count: n, values: l }) {
242
242
  }
243
243
  );
244
244
  }
245
- function jn({ leftLabel: n, rightLabel: l, leftValue: d, rightValue: f, onLeftChange: S, onRightChange: v, type: a = "number", placeholderLeft: b = "Min", placeholderRight: B = "Max" }) {
245
+ function rr({ leftLabel: r, rightLabel: l, leftValue: d, rightValue: f, onLeftChange: w, onRightChange: S, type: a = "number", placeholderLeft: b = "Min", placeholderRight: T = "Max" }) {
246
246
  const k = {
247
247
  width: "100%",
248
248
  height: 32,
@@ -256,36 +256,36 @@ function jn({ leftLabel: n, rightLabel: l, leftValue: d, rightValue: f, onLeftCh
256
256
  outline: "none",
257
257
  boxSizing: "border-box"
258
258
  }, C = { fontSize: 12, color: "#676767", marginBottom: 4, fontFamily: "var(--font-sans)" };
259
- return /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
260
- /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column" }, children: [
261
- /* @__PURE__ */ s("span", { style: C, children: n }),
259
+ return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
260
+ /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
261
+ /* @__PURE__ */ s("span", { style: C, children: r }),
262
262
  /* @__PURE__ */ s(
263
263
  "input",
264
264
  {
265
265
  type: a,
266
266
  value: d,
267
- onChange: (z) => S(z.target.value),
267
+ onChange: (z) => w(z.target.value),
268
268
  placeholder: b,
269
269
  style: k
270
270
  }
271
271
  )
272
272
  ] }),
273
- /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column" }, children: [
273
+ /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
274
274
  /* @__PURE__ */ s("span", { style: C, children: l }),
275
275
  /* @__PURE__ */ s(
276
276
  "input",
277
277
  {
278
278
  type: a,
279
279
  value: f,
280
- onChange: (z) => v(z.target.value),
281
- placeholder: B,
280
+ onChange: (z) => S(z.target.value),
281
+ placeholder: T,
282
282
  style: k
283
283
  }
284
284
  )
285
285
  ] })
286
286
  ] });
287
287
  }
288
- const $t = [
288
+ const Jt = [
289
289
  { id: "0-60", label: "0 to 60 Sec", minSec: 0, maxSec: 60 },
290
290
  { id: "60-120", label: "1m to 2 m", minSec: 60, maxSec: 120 },
291
291
  { id: "120-180", label: "2m to 3 m", minSec: 120, maxSec: 180 },
@@ -293,16 +293,16 @@ const $t = [
293
293
  { id: "240-300", label: "4m to 5m", minSec: 240, maxSec: 300 },
294
294
  { id: "300+", label: "5 mins and above", minSec: 300, maxSec: null }
295
295
  ];
296
- function Lt(n) {
297
- if (n == null || n === "")
296
+ function Yt(r) {
297
+ if (r == null || r === "")
298
298
  return null;
299
- const l = String(n).trim().match(/^(\d{1,3}):(\d{2})$/);
299
+ const l = String(r).trim().match(/^(\d{1,3}):(\d{2})$/);
300
300
  if (l)
301
301
  return Number(l[1]) * 60 + Number(l[2]);
302
- const d = Number(n);
302
+ const d = Number(r);
303
303
  return Number.isFinite(d) ? d : null;
304
304
  }
305
- function xt({ children: n }) {
305
+ function Dt({ children: r }) {
306
306
  return /* @__PURE__ */ s(
307
307
  "div",
308
308
  {
@@ -314,20 +314,20 @@ function xt({ children: n }) {
314
314
  padding: "4px 0 2px",
315
315
  fontFamily: "var(--font-sans)"
316
316
  },
317
- children: n
317
+ children: r
318
318
  }
319
319
  );
320
320
  }
321
- function bt({
322
- minValue: n,
321
+ function Ct({
322
+ minValue: r,
323
323
  maxValue: l,
324
324
  onMinChange: d,
325
325
  onMaxChange: f,
326
- inputType: S = "number",
327
- inputMode: v = "decimal",
326
+ inputType: w = "number",
327
+ inputMode: S = "decimal",
328
328
  step: a,
329
329
  placeholder: b = "0.0",
330
- unit: B
330
+ unit: T
331
331
  }) {
332
332
  const k = {
333
333
  width: "100%",
@@ -341,31 +341,31 @@ function bt({
341
341
  outline: "none",
342
342
  boxSizing: "border-box"
343
343
  };
344
- return /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
345
- /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "flex-end", gap: 8 }, children: [
346
- /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
344
+ return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
345
+ /* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "flex-end", gap: 8 }, children: [
346
+ /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
347
347
  /* @__PURE__ */ s("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Min From" }),
348
348
  /* @__PURE__ */ s(
349
349
  "input",
350
350
  {
351
- type: S,
352
- inputMode: v,
351
+ type: w,
352
+ inputMode: S,
353
353
  step: a,
354
354
  placeholder: b,
355
- value: n,
355
+ value: r,
356
356
  onChange: (C) => d(C.target.value),
357
357
  style: k
358
358
  }
359
359
  )
360
360
  ] }),
361
361
  /* @__PURE__ */ s("span", { style: { fontSize: 12, fontWeight: 600, color: "#323232", paddingBottom: 8, fontFamily: "var(--font-sans)" }, children: "to" }),
362
- /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
362
+ /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
363
363
  /* @__PURE__ */ s("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Max" }),
364
364
  /* @__PURE__ */ s(
365
365
  "input",
366
366
  {
367
- type: S,
368
- inputMode: v,
367
+ type: w,
368
+ inputMode: S,
369
369
  step: a,
370
370
  placeholder: b,
371
371
  value: l,
@@ -375,7 +375,7 @@ function bt({
375
375
  )
376
376
  ] })
377
377
  ] }),
378
- B && /* @__PURE__ */ m(
378
+ T && /* @__PURE__ */ h(
379
379
  "span",
380
380
  {
381
381
  style: {
@@ -385,129 +385,132 @@ function bt({
385
385
  },
386
386
  children: [
387
387
  "Enter durations in ",
388
- B === "sec" ? "seconds" : B
388
+ T === "sec" ? "seconds" : T
389
389
  ]
390
390
  }
391
391
  )
392
392
  ] });
393
393
  }
394
- function _n({ column: n, columnId: l, filterType: d = "text", position: f, popoverRef: S, distinctValues: v, initialValue: a, onApply: b, onCancel: B, onSearch: k = null, searchMinChars: C = 3 }) {
395
- const z = d === "text", L = d === "number", D = d === "date", w = d === "duration", N = d === "score", H = /duration/i.test(String((n == null ? void 0 : n.label) || l || "")), E = ge(() => {
396
- if (!N || !Array.isArray(v) || v.length === 0)
394
+ function or({ column: r, columnId: l, filterType: d = "text", position: f, popoverRef: w, distinctValues: S, initialValue: a, onApply: b, onCancel: T, onSearch: k = null, searchMinChars: C = 3 }) {
395
+ const z = d === "text", H = d === "number", D = d === "date", v = d === "duration", $ = d === "score", L = /duration/i.test(String((r == null ? void 0 : r.label) || l || "")), B = oe(() => {
396
+ if (!$ || !Array.isArray(S) || S.length === 0)
397
397
  return !1;
398
- let p = 1 / 0, h = -1 / 0;
399
- for (const y of v) {
400
- const F = St(y);
401
- Number.isFinite(F) && (F < p && (p = F), F > h && (h = F));
398
+ let p = 1 / 0, m = -1 / 0;
399
+ for (const g of S) {
400
+ const F = zt(g);
401
+ Number.isFinite(F) && (F < p && (p = F), F > m && (m = F));
402
402
  }
403
- return Number.isFinite(p) && Number.isFinite(h) && p >= 0 && h <= 5;
404
- }, [N, v]), [M, ae] = g(
403
+ return Number.isFinite(p) && Number.isFinite(m) && p >= 0 && m <= 5;
404
+ }, [$, S]), [A, ce] = y(
405
405
  () => z ? new Set(Array.isArray(a) ? a : []) : /* @__PURE__ */ new Set()
406
- ), [ye, Y] = g(""), [O, oe] = g(() => L && (a == null ? void 0 : a.type) === "range" && a.min != null ? a.min : ""), [Z, K] = g(() => L && (a == null ? void 0 : a.type) === "range" && a.max != null ? a.max : ""), [X, xe] = g(/* @__PURE__ */ new Set()), [V, te] = g(
407
- () => w && (a == null ? void 0 : a.type) === "durationRange" && a.minSec != null && a.minSec !== "" ? String(a.minSec) : ""
408
- ), [be, ne] = g(
409
- () => w && (a == null ? void 0 : a.type) === "durationRange" && a.maxSec != null && a.maxSec !== "" ? String(a.maxSec) : ""
410
- ), [ce, ke] = g(
411
- () => N && (a == null ? void 0 : a.type) === "scoreRange" && Array.isArray(a.values) ? new Set(a.values) : /* @__PURE__ */ new Set()
412
- ), [We, Q] = g(
413
- () => N && (a == null ? void 0 : a.type) === "scoreRange" && a.min != null && a.min !== "" ? String(a.min) : ""
414
- ), [W, se] = g(
415
- () => N && (a == null ? void 0 : a.type) === "scoreRange" && a.max != null && a.max !== "" ? String(a.max) : ""
416
- ), [re, de] = g(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.from || ""), [G, De] = g(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.to || "");
417
- I(() => {
418
- z && ae(new Set(Array.isArray(a) ? a : []));
406
+ ), [ge, G] = y(""), [Z, J] = y(() => H && (a == null ? void 0 : a.type) === "range" && a.min != null ? a.min : ""), [V, ie] = y(() => H && (a == null ? void 0 : a.type) === "range" && a.max != null ? a.max : ""), [E, de] = y(/* @__PURE__ */ new Set()), [se, P] = y(
407
+ () => v && (a == null ? void 0 : a.type) === "durationRange" && a.minSec != null && a.minSec !== "" ? String(a.minSec) : ""
408
+ ), [q, ue] = y(
409
+ () => v && (a == null ? void 0 : a.type) === "durationRange" && a.maxSec != null && a.maxSec !== "" ? String(a.maxSec) : ""
410
+ ), [fe, qe] = y(
411
+ () => $ && (a == null ? void 0 : a.type) === "scoreRange" && Array.isArray(a.values) ? new Set(a.values) : /* @__PURE__ */ new Set()
412
+ ), [je, Re] = y(
413
+ () => $ && (a == null ? void 0 : a.type) === "scoreRange" && a.min != null && a.min !== "" ? String(a.min) : ""
414
+ ), [ye, ze] = y(
415
+ () => $ && (a == null ? void 0 : a.type) === "scoreRange" && a.max != null && a.max !== "" ? String(a.max) : ""
416
+ ), [Ze, Y] = y(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.from || ""), [I, ee] = y(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.to || "");
417
+ j(() => {
418
+ z && ce(new Set(Array.isArray(a) ? a : []));
419
419
  }, [l, z]);
420
- const [Ce, Ae] = g(null), [A, ue] = g(!1), Se = U(0), ee = ye.trim(), we = z && typeof k == "function" && ee.length >= C;
421
- I(() => {
420
+ const [He, te] = y(null), [xe, X] = y(!1), be = K(0), ne = ge.trim(), Ve = z && typeof k == "function" && ne.length >= C;
421
+ j(() => {
422
422
  if (!z || typeof k != "function")
423
423
  return;
424
- if (ee.length < C) {
425
- Ae(null), ue(!1);
424
+ if (ne.length < C) {
425
+ te(null), X(!1);
426
426
  return;
427
427
  }
428
- const p = ++Se.current;
429
- ue(!0);
430
- const h = setTimeout(async () => {
428
+ const p = ++be.current;
429
+ X(!0);
430
+ const m = setTimeout(async () => {
431
431
  try {
432
- const y = await k(ee);
433
- if (p !== Se.current)
432
+ const g = await k(ne);
433
+ if (p !== be.current)
434
434
  return;
435
- const F = Array.isArray(y) ? y.map((T) => T && typeof T == "object" ? T.label ?? T.value : T).filter((T) => T != null && T !== "").map(String) : [];
436
- Ae(F);
435
+ const F = Array.isArray(g) ? g.map((M) => M && typeof M == "object" ? M.label ?? M.value : M).filter((M) => M != null && M !== "").map(String) : [];
436
+ te(F);
437
437
  } catch {
438
- p === Se.current && Ae([]);
438
+ p === be.current && te([]);
439
439
  } finally {
440
- p === Se.current && ue(!1);
440
+ p === be.current && X(!1);
441
441
  }
442
442
  }, 300);
443
- return () => clearTimeout(h);
444
- }, [z, k, ee, C]);
445
- const ve = ge(() => {
446
- const p = ee.toLowerCase(), h = we ? Ce || [] : p ? v.filter((F) => String(F).toLowerCase().includes(p)) : v, y = /* @__PURE__ */ new Map();
447
- for (const F of h)
448
- y.set(String(F), F);
449
- for (const F of M)
450
- y.set(String(F), F);
451
- return Array.from(y.values()).sort((F, T) => {
452
- const fe = M.has(F), Pe = M.has(T);
453
- return fe !== Pe ? fe ? -1 : 1 : String(F).localeCompare(String(T));
443
+ return () => clearTimeout(m);
444
+ }, [z, k, ne, C]);
445
+ const N = oe(() => {
446
+ const p = ne.toLowerCase(), m = Ve ? He || [] : p ? S.filter((F) => String(F).toLowerCase().includes(p)) : S, g = /* @__PURE__ */ new Map();
447
+ for (const F of m)
448
+ g.set(String(F), F);
449
+ for (const F of A)
450
+ g.set(String(F), F);
451
+ return Array.from(g.values()).sort((F, M) => {
452
+ const Se = String(F) === "NA", Ee = String(M) === "NA";
453
+ if (Se !== Ee)
454
+ return Se ? -1 : 1;
455
+ const re = A.has(F), Me = A.has(M);
456
+ return re !== Me ? re ? -1 : 1 : String(F).localeCompare(String(M));
454
457
  });
455
- }, [v, ee, M, we, Ce]), Oe = (p) => {
456
- ae((h) => {
457
- const y = new Set(h);
458
- return y.has(p) ? y.delete(p) : y.add(p), y;
458
+ }, [S, ne, A, Ve, He]), ve = (p) => {
459
+ ce((m) => {
460
+ const g = new Set(m);
461
+ return g.has(p) ? g.delete(p) : g.add(p), g;
459
462
  });
460
- }, it = () => {
461
- z && ae(/* @__PURE__ */ new Set()), L && (oe(""), K("")), w && (xe(/* @__PURE__ */ new Set()), te(""), ne("")), N && (ke(/* @__PURE__ */ new Set()), Q(""), se("")), D && (de(""), De("")), Y("");
462
- }, Te = (p) => {
463
- xe((h) => {
464
- const y = new Set(h);
465
- return y.has(p) ? y.delete(p) : y.add(p), y;
463
+ }, et = () => {
464
+ z && ce(/* @__PURE__ */ new Set()), H && (J(""), ie("")), v && (de(/* @__PURE__ */ new Set()), P(""), ue("")), $ && (qe(/* @__PURE__ */ new Set()), Re(""), ze("")), D && (Y(""), ee("")), G("");
465
+ }, Be = (p) => {
466
+ de((m) => {
467
+ const g = new Set(m);
468
+ return g.has(p) ? g.delete(p) : g.add(p), g;
466
469
  });
467
- }, $e = (p) => {
468
- ke((h) => {
469
- const y = new Set(h);
470
- return y.has(p) ? y.delete(p) : y.add(p), y;
470
+ }, we = (p) => {
471
+ qe((m) => {
472
+ const g = new Set(m);
473
+ return g.has(p) ? g.delete(p) : g.add(p), g;
471
474
  });
472
- }, Le = () => {
475
+ }, Fe = () => {
473
476
  if (z)
474
- return b(Array.from(M));
475
- if (L)
476
- return b({ type: "range", min: O === "" ? "" : Number(O), max: Z === "" ? "" : Number(Z) });
477
- if (w) {
478
- const p = Lt(V), h = Lt(be), y = p != null || h != null;
479
- let F = "", T = "";
480
- if (y)
481
- F = p ?? "", T = h ?? "";
482
- else if (X.size > 0) {
483
- const fe = $t.filter((q) => X.has(q.id));
484
- F = Math.min(...fe.map((q) => q.minSec)), T = fe.some((q) => q.maxSec == null) ? "" : Math.max(...fe.map((q) => q.maxSec));
477
+ return b(Array.from(A));
478
+ if (H)
479
+ return b({ type: "range", min: Z === "" ? "" : Number(Z), max: V === "" ? "" : Number(V) });
480
+ if (v) {
481
+ const p = Yt(se), m = Yt(q), g = p != null || m != null;
482
+ let F = "", M = "";
483
+ if (g)
484
+ F = p ?? "", M = m ?? "";
485
+ else if (E.size > 0) {
486
+ const Se = Jt.filter((re) => E.has(re.id));
487
+ F = Math.min(...Se.map((re) => re.minSec)), M = Se.some((re) => re.maxSec == null) ? "" : Math.max(...Se.map((re) => re.maxSec));
485
488
  }
486
- return b({ type: "durationRange", minSec: F, maxSec: T });
489
+ return b({ type: "durationRange", minSec: F, maxSec: M });
487
490
  }
488
- if (N) {
489
- const p = We === "" ? null : Number(We), h = W === "" ? null : Number(W);
490
- return p != null || h != null ? b({
491
+ if ($) {
492
+ const p = je === "" ? null : Number(je), m = ye === "" ? null : Number(ye);
493
+ return p != null || m != null ? b({
491
494
  type: "scoreRange",
492
495
  values: [],
493
496
  min: p != null && Number.isFinite(p) ? p : "",
494
- max: h != null && Number.isFinite(h) ? h : ""
497
+ max: m != null && Number.isFinite(m) ? m : ""
495
498
  }) : b({
496
499
  type: "scoreRange",
497
- values: Array.from(ce).sort((F, T) => F - T),
500
+ values: Array.from(fe).sort((F, M) => F - M),
498
501
  min: "",
499
502
  max: ""
500
503
  });
501
504
  }
502
505
  if (D)
503
- return b({ type: "dateRange", from: re, to: G });
506
+ return b({ type: "dateRange", from: Ze, to: I });
504
507
  };
505
- return /* @__PURE__ */ m(
508
+ return /* @__PURE__ */ h(
506
509
  "div",
507
510
  {
508
- ref: S,
511
+ ref: w,
509
512
  role: "dialog",
510
- "aria-label": `Filter ${n.label || l}`,
513
+ "aria-label": `Filter ${r.label || l}`,
511
514
  style: {
512
515
  position: "fixed",
513
516
  top: f.top,
@@ -525,7 +528,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
525
528
  fontFamily: "var(--font-sans)"
526
529
  },
527
530
  children: [
528
- z && /* @__PURE__ */ m(Fe, { children: [
531
+ z && /* @__PURE__ */ h(Ce, { children: [
529
532
  /* @__PURE__ */ s(
530
533
  "div",
531
534
  {
@@ -537,7 +540,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
537
540
  display: "flex",
538
541
  alignItems: "center"
539
542
  },
540
- children: /* @__PURE__ */ m(
543
+ children: /* @__PURE__ */ h(
541
544
  "div",
542
545
  {
543
546
  style: {
@@ -551,14 +554,14 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
551
554
  padding: "0 8px"
552
555
  },
553
556
  children: [
554
- /* @__PURE__ */ s(Cn, { size: 16, color: "#989898", strokeWidth: 2 }),
557
+ /* @__PURE__ */ s(_n, { size: 16, color: "#989898", strokeWidth: 2 }),
555
558
  /* @__PURE__ */ s(
556
559
  "input",
557
560
  {
558
561
  autoFocus: !0,
559
562
  type: "text",
560
- value: ye,
561
- onChange: (p) => Y(p.target.value),
563
+ value: ge,
564
+ onChange: (p) => G(p.target.value),
562
565
  placeholder: "Search",
563
566
  style: {
564
567
  flex: 1,
@@ -577,9 +580,9 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
577
580
  )
578
581
  }
579
582
  ),
580
- /* @__PURE__ */ s("div", { style: { maxHeight: 220, overflowY: "auto", display: "flex", flexDirection: "column", gap: 4 }, children: typeof k == "function" && ee.length > 0 && ee.length < C ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: `Type at least ${C} characters to search` }) : A ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "Searching…" }) : ve.length === 0 ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "No values" }) : ve.map((p) => {
581
- const h = M.has(p);
582
- return /* @__PURE__ */ m(
583
+ /* @__PURE__ */ s("div", { style: { maxHeight: 220, overflowY: "auto", display: "flex", flexDirection: "column", gap: 4 }, children: typeof k == "function" && ne.length > 0 && ne.length < C ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: `Type at least ${C} characters to search` }) : xe ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "Searching…" }) : N.length === 0 ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "No values" }) : N.map((p) => {
584
+ const m = A.has(p);
585
+ return /* @__PURE__ */ h(
583
586
  "label",
584
587
  {
585
588
  style: {
@@ -601,19 +604,19 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
601
604
  display: "inline-flex",
602
605
  alignItems: "center",
603
606
  justifyContent: "center",
604
- background: h ? "#0B0B0B" : "#FFFFFF",
605
- border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
607
+ background: m ? "#0B0B0B" : "#FFFFFF",
608
+ border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
606
609
  flexShrink: 0
607
610
  },
608
- children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
611
+ children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
609
612
  }
610
613
  ),
611
614
  /* @__PURE__ */ s(
612
615
  "input",
613
616
  {
614
617
  type: "checkbox",
615
- checked: h,
616
- onChange: () => Oe(p),
618
+ checked: m,
619
+ onChange: () => ve(p),
617
620
  style: { position: "absolute", opacity: 0, pointerEvents: "none" },
618
621
  tabIndex: -1
619
622
  }
@@ -621,8 +624,8 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
621
624
  /* @__PURE__ */ s(
622
625
  "span",
623
626
  {
624
- onClick: (y) => {
625
- y.preventDefault(), Oe(p);
627
+ onClick: (g) => {
628
+ g.preventDefault(), ve(p);
626
629
  },
627
630
  style: {
628
631
  fontSize: 14,
@@ -642,34 +645,34 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
642
645
  );
643
646
  }) })
644
647
  ] }),
645
- L && /* @__PURE__ */ m(Fe, { children: [
646
- /* @__PURE__ */ s(xt, { children: n.label || "Filter" }),
648
+ H && /* @__PURE__ */ h(Ce, { children: [
649
+ /* @__PURE__ */ s(Dt, { children: r.label || "Filter" }),
647
650
  /* @__PURE__ */ s(
648
- bt,
651
+ Ct,
649
652
  {
650
- minValue: O,
651
- maxValue: Z,
652
- onMinChange: oe,
653
- onMaxChange: K,
654
- placeholder: H ? "00" : "0.0",
655
- unit: H ? "sec" : void 0
653
+ minValue: Z,
654
+ maxValue: V,
655
+ onMinChange: J,
656
+ onMaxChange: ie,
657
+ placeholder: L ? "00" : "0.0",
658
+ unit: L ? "sec" : void 0
656
659
  }
657
660
  )
658
661
  ] }),
659
- w && /* @__PURE__ */ m(Fe, { children: [
660
- /* @__PURE__ */ s(xt, { children: n.label || "Duration" }),
661
- n.filterShowPresets === !0 && /* @__PURE__ */ m(Fe, { children: [
662
- /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: $t.map((p) => {
663
- const h = X.has(p.id);
664
- return /* @__PURE__ */ m(
662
+ v && /* @__PURE__ */ h(Ce, { children: [
663
+ /* @__PURE__ */ s(Dt, { children: r.label || "Duration" }),
664
+ r.filterShowPresets === !0 && /* @__PURE__ */ h(Ce, { children: [
665
+ /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: Jt.map((p) => {
666
+ const m = E.has(p.id);
667
+ return /* @__PURE__ */ h(
665
668
  "div",
666
669
  {
667
670
  role: "checkbox",
668
- "aria-checked": h,
671
+ "aria-checked": m,
669
672
  tabIndex: 0,
670
- onClick: () => Te(p.id),
671
- onKeyDown: (y) => {
672
- (y.key === " " || y.key === "Enter") && (y.preventDefault(), Te(p.id));
673
+ onClick: () => Be(p.id),
674
+ onKeyDown: (g) => {
675
+ (g.key === " " || g.key === "Enter") && (g.preventDefault(), Be(p.id));
673
676
  },
674
677
  style: {
675
678
  display: "flex",
@@ -689,11 +692,11 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
689
692
  display: "inline-flex",
690
693
  alignItems: "center",
691
694
  justifyContent: "center",
692
- background: h ? "#0B0B0B" : "#FFFFFF",
693
- border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
695
+ background: m ? "#0B0B0B" : "#FFFFFF",
696
+ border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
694
697
  flexShrink: 0
695
698
  },
696
- children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
699
+ children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
697
700
  }
698
701
  ),
699
702
  /* @__PURE__ */ s(
@@ -730,12 +733,12 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
730
733
  )
731
734
  ] }),
732
735
  /* @__PURE__ */ s(
733
- bt,
736
+ Ct,
734
737
  {
735
- minValue: V,
736
- maxValue: be,
737
- onMinChange: te,
738
- onMaxChange: ne,
738
+ minValue: se,
739
+ maxValue: q,
740
+ onMinChange: P,
741
+ onMaxChange: ue,
739
742
  inputType: "number",
740
743
  inputMode: "numeric",
741
744
  placeholder: "00",
@@ -743,20 +746,20 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
743
746
  }
744
747
  )
745
748
  ] }),
746
- N && /* @__PURE__ */ m(Fe, { children: [
747
- /* @__PURE__ */ s(xt, { children: n.label || "Score" }),
748
- E && n.filterShowPresets === !0 && /* @__PURE__ */ m(Fe, { children: [
749
+ $ && /* @__PURE__ */ h(Ce, { children: [
750
+ /* @__PURE__ */ s(Dt, { children: r.label || "Score" }),
751
+ B && r.filterShowPresets === !0 && /* @__PURE__ */ h(Ce, { children: [
749
752
  /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [1, 2, 3, 4, 5].map((p) => {
750
- const h = ce.has(p);
751
- return /* @__PURE__ */ m(
753
+ const m = fe.has(p);
754
+ return /* @__PURE__ */ h(
752
755
  "div",
753
756
  {
754
757
  role: "checkbox",
755
- "aria-checked": h,
758
+ "aria-checked": m,
756
759
  tabIndex: 0,
757
- onClick: () => $e(p),
758
- onKeyDown: (y) => {
759
- (y.key === " " || y.key === "Enter") && (y.preventDefault(), $e(p));
760
+ onClick: () => we(p),
761
+ onKeyDown: (g) => {
762
+ (g.key === " " || g.key === "Enter") && (g.preventDefault(), we(p));
760
763
  },
761
764
  style: {
762
765
  display: "flex",
@@ -776,11 +779,11 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
776
779
  display: "inline-flex",
777
780
  alignItems: "center",
778
781
  justifyContent: "center",
779
- background: h ? "#0B0B0B" : "#FFFFFF",
780
- border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
782
+ background: m ? "#0B0B0B" : "#FFFFFF",
783
+ border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
781
784
  flexShrink: 0
782
785
  },
783
- children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
786
+ children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
784
787
  }
785
788
  ),
786
789
  /* @__PURE__ */ s(
@@ -802,7 +805,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
802
805
  }) }),
803
806
  /* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } })
804
807
  ] }),
805
- E && n.filterShowPresets === !0 && /* @__PURE__ */ s(
808
+ B && r.filterShowPresets === !0 && /* @__PURE__ */ s(
806
809
  "div",
807
810
  {
808
811
  style: {
@@ -817,37 +820,37 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
817
820
  }
818
821
  ),
819
822
  /* @__PURE__ */ s(
820
- bt,
823
+ Ct,
821
824
  {
822
- minValue: We,
823
- maxValue: W,
824
- onMinChange: Q,
825
- onMaxChange: se,
825
+ minValue: je,
826
+ maxValue: ye,
827
+ onMinChange: Re,
828
+ onMaxChange: ze,
826
829
  step: "0.1"
827
830
  }
828
831
  )
829
832
  ] }),
830
833
  D && /* @__PURE__ */ s(
831
- jn,
834
+ rr,
832
835
  {
833
836
  leftLabel: "From",
834
837
  rightLabel: "To",
835
- leftValue: re,
836
- rightValue: G,
837
- onLeftChange: de,
838
- onRightChange: De,
838
+ leftValue: Ze,
839
+ rightValue: I,
840
+ onLeftChange: Y,
841
+ onRightChange: ee,
839
842
  type: "date",
840
843
  placeholderLeft: "",
841
844
  placeholderRight: ""
842
845
  }
843
846
  ),
844
847
  /* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
845
- /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
848
+ /* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
846
849
  /* @__PURE__ */ s(
847
850
  "button",
848
851
  {
849
852
  type: "button",
850
- onClick: it,
853
+ onClick: et,
851
854
  style: {
852
855
  background: "transparent",
853
856
  border: "none",
@@ -858,14 +861,14 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
858
861
  color: "#323232",
859
862
  fontFamily: "var(--font-sans)"
860
863
  },
861
- children: w && n.filterShowPresets === !0 || N && E && n.filterShowPresets === !0 ? "View All" : "Reset"
864
+ children: v && r.filterShowPresets === !0 || $ && B && r.filterShowPresets === !0 ? "View All" : "Reset"
862
865
  }
863
866
  ),
864
867
  /* @__PURE__ */ s(
865
868
  "button",
866
869
  {
867
870
  type: "button",
868
- onClick: Le,
871
+ onClick: Fe,
869
872
  style: {
870
873
  background: "#0B0B0B",
871
874
  color: "#FFFFFF",
@@ -886,60 +889,60 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
886
889
  }
887
890
  );
888
891
  }
889
- const Hn = () => ({ userData: { email: "anonymous" } }), Kn = (n) => /* @__PURE__ */ s("img", { ...n });
890
- function Un({
891
- children: n,
892
+ const sr = () => ({ userData: { email: "anonymous" } }), ir = (r) => /* @__PURE__ */ s("img", { ...r });
893
+ function lr({
894
+ children: r,
892
895
  content: l,
893
896
  direction: d = "top",
894
897
  align: f = "center",
895
- styling: S,
896
- indicatorColor: v
898
+ styling: w,
899
+ indicatorColor: S
897
900
  }) {
898
- const a = typeof l == "string" ? l : l != null ? String(l) : "", b = typeof v == "string" && (v.startsWith("#") || v.startsWith("rgb") || v.startsWith("hsl") || v.startsWith("var(")) ? v : "var(--Grey-Strong, #2E3236)", [B, k] = g(!1), [C, z] = g(!1), [L, D] = g({ top: 0, left: 0, arrowLeft: 0, placement: "top" }), w = U(null), N = U(null);
901
+ const a = typeof l == "string" ? l : l != null ? String(l) : "", b = typeof S == "string" && (S.startsWith("#") || S.startsWith("rgb") || S.startsWith("hsl") || S.startsWith("var(")) ? S : "var(--Grey-Strong, #2E3236)", [T, k] = y(!1), [C, z] = y(!1), [H, D] = y({ top: 0, left: 0, arrowLeft: 0, placement: "top" }), v = K(null), $ = K(null);
899
902
  if (!a)
900
- return n;
901
- I(() => {
903
+ return r;
904
+ j(() => {
902
905
  z(!0);
903
906
  }, []);
904
- const H = P(() => {
905
- if (!w.current || !N.current || typeof window > "u")
907
+ const L = O(() => {
908
+ if (!v.current || !$.current || typeof window > "u")
906
909
  return;
907
- const E = w.current.getBoundingClientRect(), M = N.current.getBoundingClientRect(), ae = window.innerWidth, ye = window.innerHeight, Y = 8, O = 10, oe = M.width, Z = M.height, K = E.top, X = ye - E.bottom, xe = d === "bottom" ? "bottom" : "top";
908
- let V = xe;
909
- xe === "top" && K < Z + O + Y && X > K ? V = "bottom" : xe === "bottom" && X < Z + O + Y && K > X && (V = "top");
910
- let te = E.left + E.width / 2;
911
- f === "start" && (te = E.left), f === "end" && (te = E.right);
912
- let be = V === "top" ? E.top - Z - O : E.bottom + O, ne = f === "start" ? te : f === "end" ? te - oe : te - oe / 2;
913
- be = Math.max(Y, Math.min(be, ye - Z - Y)), ne = Math.max(Y, Math.min(ne, ae - oe - Y));
914
- const ce = Math.max(10, Math.min(te - ne, oe - 10));
915
- D({ top: be, left: ne, arrowLeft: ce, placement: V });
910
+ const B = v.current.getBoundingClientRect(), A = $.current.getBoundingClientRect(), ce = window.innerWidth, ge = window.innerHeight, G = 8, Z = 10, J = A.width, V = A.height, ie = B.top, E = ge - B.bottom, de = d === "bottom" ? "bottom" : "top";
911
+ let se = de;
912
+ de === "top" && ie < V + Z + G && E > ie ? se = "bottom" : de === "bottom" && E < V + Z + G && ie > E && (se = "top");
913
+ let P = B.left + B.width / 2;
914
+ f === "start" && (P = B.left), f === "end" && (P = B.right);
915
+ let q = se === "top" ? B.top - V - Z : B.bottom + Z, ue = f === "start" ? P : f === "end" ? P - J : P - J / 2;
916
+ q = Math.max(G, Math.min(q, ge - V - G)), ue = Math.max(G, Math.min(ue, ce - J - G));
917
+ const fe = Math.max(10, Math.min(P - ue, J - 10));
918
+ D({ top: q, left: ue, arrowLeft: fe, placement: se });
916
919
  }, [f, d]);
917
- return I(() => {
918
- if (!B || !C)
920
+ return j(() => {
921
+ if (!T || !C)
919
922
  return;
920
- H();
921
- const E = () => H();
922
- return window.addEventListener("resize", E), window.addEventListener("scroll", E, !0), () => {
923
- window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0);
923
+ L();
924
+ const B = () => L();
925
+ return window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), () => {
926
+ window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
924
927
  };
925
- }, [B, C, H]), /* @__PURE__ */ m(
928
+ }, [T, C, L]), /* @__PURE__ */ h(
926
929
  "span",
927
930
  {
928
- ref: w,
931
+ ref: v,
929
932
  style: { display: "block", width: "100%" },
930
933
  onMouseEnter: () => k(!0),
931
934
  onMouseLeave: () => k(!1),
932
935
  children: [
933
- n,
934
- B && C && vt(
935
- /* @__PURE__ */ m(
936
+ r,
937
+ T && C && Rt(
938
+ /* @__PURE__ */ h(
936
939
  "span",
937
940
  {
938
- ref: N,
941
+ ref: $,
939
942
  style: {
940
943
  position: "fixed",
941
- top: `${L.top}px`,
942
- left: `${L.left}px`,
944
+ top: `${H.top}px`,
945
+ left: `${H.left}px`,
943
946
  background: "var(--Grey-Strong, #2E3236)",
944
947
  color: "var(--Grey-White, #FFF)",
945
948
  fontSize: "12px",
@@ -953,7 +956,7 @@ function Un({
953
956
  boxShadow: "0 6px 18px rgba(0, 0, 0, 0.2)",
954
957
  zIndex: 99999,
955
958
  pointerEvents: "none",
956
- ...typeof S == "object" ? S : {}
959
+ ...typeof w == "object" ? w : {}
957
960
  },
958
961
  children: [
959
962
  a,
@@ -962,13 +965,13 @@ function Un({
962
965
  {
963
966
  style: {
964
967
  position: "absolute",
965
- left: `${L.arrowLeft}px`,
968
+ left: `${H.arrowLeft}px`,
966
969
  transform: "translateX(-50%)",
967
970
  width: 0,
968
971
  height: 0,
969
972
  borderLeft: "6px solid transparent",
970
973
  borderRight: "6px solid transparent",
971
- ...L.placement === "top" ? {
974
+ ...H.placement === "top" ? {
972
975
  top: "100%",
973
976
  borderTop: `7px solid ${b}`
974
977
  } : {
@@ -987,21 +990,21 @@ function Un({
987
990
  }
988
991
  );
989
992
  }
990
- function rr({
991
- data: n = [],
993
+ function br({
994
+ data: r = [],
992
995
  columns: l = [],
993
996
  initialPageSize: d = 10,
994
997
  onRowClick: f,
995
998
  // Server-side pagination props (optional)
996
- totalCount: S = null,
999
+ totalCount: w = null,
997
1000
  // Total count from server (null = use client-side pagination)
998
- page: v = null,
1001
+ page: S = null,
999
1002
  // Controlled page (null = use internal state)
1000
1003
  pageSize: a = null,
1001
1004
  // Controlled pageSize (null = use internal state)
1002
1005
  onPageChange: b = null,
1003
1006
  // Callback for page changes (null = use internal state)
1004
- onPageSizeChange: B = null,
1007
+ onPageSizeChange: T = null,
1005
1008
  // Callback for pageSize changes (null = use internal state)
1006
1009
  onFilterChange: k = null,
1007
1010
  // Callback for filter changes (null = use client-side filtering)
@@ -1010,48 +1013,58 @@ function rr({
1010
1013
  // Optional callback to surface column limit errors to host app
1011
1014
  onMaxColumnsError: z = null,
1012
1015
  // Server-side sorting props (optional)
1013
- onSort: L = null,
1016
+ onSort: H = null,
1014
1017
  // Callback for sort changes (null = use client-side sorting)
1015
1018
  sortFields: D = [],
1016
1019
  // Array of [field, direction] tuples from parent (null = use internal state)
1017
- tableId: w = null,
1020
+ tableId: v = null,
1018
1021
  // Optional unique identifier for localStorage persistence (e.g., "history", "agents")
1019
- isLoading: N = !1,
1022
+ isLoading: $ = !1,
1020
1023
  // Loading state to show overlay inside table
1021
1024
  // Filter props (optional)
1022
- filtersConfig: H = null,
1025
+ filtersConfig: L = null,
1023
1026
  // Top toolbar filter config (chips/date/export). Note: this is different from `columnFilters` for inline header inputs.
1024
1027
  // Column resize (optional) — min/max in px; columns may override with column.minWidth / column.maxWidth
1025
- columnResizeMinWidth: E = 120,
1026
- columnResizeMaxWidth: M = 280,
1028
+ columnResizeMinWidth: B = 120,
1029
+ columnResizeMaxWidth: A = 280,
1027
1030
  // Fires whenever the user-visible column set changes. Useful for hosts that
1028
1031
  // want to scope a CSV export, etc., to whatever the user has selected.
1029
1032
  // Receives an array of column ids (excluding the action column).
1030
- onVisibleColumnsChange: ae = null,
1033
+ onVisibleColumnsChange: ce = null,
1031
1034
  // When true, hides the "Columns" picker button in the toolbar. The
1032
1035
  // surrounding toolbar wrapper is also skipped if no other toolbar content
1033
1036
  // (e.g. `filtersConfig`) is configured.
1034
- hideColumnPicker: ye = !1
1037
+ hideColumnPicker: ge = !1,
1038
+ // Row selection (opt-in). When `selectable` is true a leading checkbox
1039
+ // column is rendered outside the reorderable/persisted column system, so it
1040
+ // is always visible and unaffected by the column picker or saved prefs.
1041
+ // Selection is controlled by the host: pass `selectedRowIds` (array of ids)
1042
+ // and handle `onSelectionChange(nextIdsArray)`. `getRowId` resolves a row's
1043
+ // id (defaults to `row.id`).
1044
+ selectable: G = !1,
1045
+ selectedRowIds: Z = null,
1046
+ onSelectionChange: J = null,
1047
+ getRowId: V = null
1035
1048
  }) {
1036
- var Wt;
1037
- const { userData: Y } = Hn(), O = (Y == null ? void 0 : Y.email) || "anonymous", oe = ht.memo(({ children: e, content: t, className: r = "" }) => {
1038
- const i = U(null), [o, u] = g(!1);
1039
- I(() => {
1049
+ var Kt;
1050
+ const { userData: ie } = sr(), E = (ie == null ? void 0 : ie.email) || "anonymous", de = wt.memo(({ children: e, content: t, className: o = "" }) => {
1051
+ const i = K(null), [n, u] = y(!1);
1052
+ j(() => {
1040
1053
  const x = () => {
1041
1054
  if (i.current) {
1042
- const _ = i.current.scrollWidth > i.current.clientWidth;
1043
- u(_);
1055
+ const U = i.current.scrollWidth > i.current.clientWidth;
1056
+ u(U);
1044
1057
  }
1045
1058
  };
1046
1059
  x();
1047
- const j = setTimeout(x, 0);
1060
+ const W = setTimeout(x, 0);
1048
1061
  return window.addEventListener("resize", x), () => {
1049
- clearTimeout(j), window.removeEventListener("resize", x);
1062
+ clearTimeout(W), window.removeEventListener("resize", x);
1050
1063
  };
1051
1064
  }, [e, t]);
1052
- const c = /* @__PURE__ */ s("span", { className: `truncate block ${r}`, ref: i, children: e });
1053
- return o && t ? /* @__PURE__ */ s(
1054
- Un,
1065
+ const c = /* @__PURE__ */ s("span", { className: `truncate block ${o}`, ref: i, children: e });
1066
+ return n && t ? /* @__PURE__ */ s(
1067
+ lr,
1055
1068
  {
1056
1069
  content: t,
1057
1070
  styling: "bg-green-2 text-gray-900 px-3 py-2 text-sm rounded-lg shadow-md border border-gray-300 max-w-xs whitespace-normal",
@@ -1061,160 +1074,160 @@ function rr({
1061
1074
  }
1062
1075
  ) : c;
1063
1076
  });
1064
- oe.displayName = "TruncatedCell";
1065
- const Z = S !== null && b !== null, K = k !== null, X = L !== null, [xe, V] = g(1), [te, be] = g(d), ne = v !== null ? v : xe, ce = a !== null ? a : te, ke = (e) => {
1066
- b ? b(e) : V(e);
1067
- }, We = (e) => {
1068
- B ? B(e) : be(e);
1069
- }, Q = 50, W = "action", se = U(!1), re = ge(() => w ? `dataTable_columns_${w}:${O}` : `dataTable_columns_${l.map((t) => t.id || t.key).sort().join("_")}:${O}`, [w, l, O]), de = ge(() => w ? `dataTable_manual_change_${w}:${O}` : null, [w, O]);
1070
- P((e, t) => {
1077
+ de.displayName = "TruncatedCell";
1078
+ const se = w !== null && b !== null, P = k !== null, q = H !== null, [ue, fe] = y(1), [qe, je] = y(d), Re = S !== null ? S : ue, ye = a !== null ? a : qe, ze = (e) => {
1079
+ b ? b(e) : fe(e);
1080
+ }, Ze = (e) => {
1081
+ T ? T(e) : je(e);
1082
+ }, Y = 50, I = "action", ee = K(!1), He = K(null), te = oe(() => v ? `dataTable_columns_${v}:${E}` : `dataTable_columns_${l.map((t) => t.id || t.key).sort().join("_")}:${E}`, [v, l, E]), xe = oe(() => v ? `dataTable_manual_change_${v}:${E}` : null, [v, E]);
1083
+ O((e, t) => {
1071
1084
  if (typeof window > "u" || !e || !t || t.length === 0)
1072
1085
  return null;
1073
1086
  try {
1074
- const r = localStorage.getItem(e);
1075
- if (r) {
1076
- const o = JSON.parse(r).filter(
1087
+ const o = localStorage.getItem(e);
1088
+ if (o) {
1089
+ const n = JSON.parse(o).filter(
1077
1090
  (u) => t.some((c) => (c.id || c.key) === u)
1078
1091
  );
1079
- if (o.length > 0)
1080
- return o;
1092
+ if (n.length > 0)
1093
+ return n;
1081
1094
  }
1082
- } catch (r) {
1083
- console.warn("Failed to load saved columns from localStorage:", r);
1095
+ } catch (o) {
1096
+ console.warn("Failed to load saved columns from localStorage:", o);
1084
1097
  }
1085
1098
  return null;
1086
1099
  }, []);
1087
- const [G, De] = g({}), [Ce, Ae] = g(""), [A, ue] = g(null), [Se, ee] = g({ top: 0, left: 0 }), we = U(null), ve = U({}), [Oe, it] = g(null), [Te, $e] = g("asc"), Le = P((e, t) => {
1088
- const r = Ue(t);
1089
- De((i) => {
1090
- const o = { ...i };
1091
- return r ? o[e] = t : delete o[e], o;
1092
- }), b ? b(1) : V(1), K && k && k(
1093
- r ? { ...G, [e]: t } : Object.fromEntries(Object.entries(G).filter(([i]) => i !== e))
1100
+ const [X, be] = y({}), [ne, Ve] = y(""), [N, ve] = y(null), [et, Be] = y({ top: 0, left: 0 }), we = K(null), Fe = K({}), [p, m] = y(null), [g, F] = y("asc"), M = O((e, t) => {
1101
+ const o = Ye(t);
1102
+ be((i) => {
1103
+ const n = { ...i };
1104
+ return o ? n[e] = t : delete n[e], n;
1105
+ }), b ? b(1) : fe(1), P && k && k(
1106
+ o ? { ...X, [e]: t } : Object.fromEntries(Object.entries(X).filter(([i]) => i !== e))
1094
1107
  );
1095
- }, [G, k, K, b]), p = P(() => {
1096
- De({}), Ae(""), b ? b(1) : V(1), K && k && k({});
1097
- }, [k, K, b]), h = P((e) => {
1098
- const t = l.find((o) => (o.id || o.key) === e);
1108
+ }, [X, k, P, b]), Se = O(() => {
1109
+ be({}), Ve(""), b ? b(1) : fe(1), P && k && k({});
1110
+ }, [k, P, b]), Ee = O((e) => {
1111
+ const t = l.find((n) => (n.id || n.key) === e);
1099
1112
  if (t && Array.isArray(t.filterOptions)) {
1100
- const o = /* @__PURE__ */ new Set(), u = [];
1113
+ const n = /* @__PURE__ */ new Set(), u = [];
1101
1114
  for (const c of t.filterOptions) {
1102
1115
  if (c == null || c === "")
1103
1116
  continue;
1104
1117
  const x = typeof c == "object" ? JSON.stringify(c) : String(c);
1105
- o.has(x) || (o.add(x), u.push(x));
1118
+ n.has(x) || (n.add(x), u.push(x));
1106
1119
  }
1107
1120
  return u.sort((c, x) => c.localeCompare(x));
1108
1121
  }
1109
- if (!n || n.length === 0)
1122
+ if (!r || r.length === 0)
1110
1123
  return [];
1111
- const r = /* @__PURE__ */ new Set(), i = [];
1112
- for (const o of n) {
1113
- const u = o[e];
1124
+ const o = /* @__PURE__ */ new Set(), i = [];
1125
+ for (const n of r) {
1126
+ const u = n[e];
1114
1127
  if (u == null)
1115
1128
  continue;
1116
1129
  const c = typeof u == "object" ? JSON.stringify(u) : String(u);
1117
- r.has(c) || (r.add(c), i.push(c));
1130
+ o.has(c) || (o.add(c), i.push(c));
1118
1131
  }
1119
- return i.sort((o, u) => o.localeCompare(u));
1120
- }, [n, l]), y = P((e) => {
1121
- const t = l.find((r) => J(r) === e);
1122
- return t && t.filterType ? t.filterType : Tn(h(e));
1123
- }, [l, h]), F = P((e) => {
1132
+ return i.sort((n, u) => n.localeCompare(u));
1133
+ }, [r, l]), re = O((e) => {
1134
+ const t = l.find((o) => Q(o) === e);
1135
+ return t && t.filterType ? t.filterType : Zn(Ee(e));
1136
+ }, [l, Ee]), Me = O((e) => {
1124
1137
  const i = typeof window < "u" ? window.innerWidth : 1 / 0;
1125
- let o = e.left;
1126
- return o + 280 > i - 8 && (o = Math.max(8, e.right - 280)), { top: e.bottom + 6, left: o };
1127
- }, []), T = P((e, t) => {
1138
+ let n = e.left;
1139
+ return n + 280 > i - 8 && (n = Math.max(8, e.right - 280)), { top: e.bottom + 6, left: n };
1140
+ }, []), Qt = O((e, t) => {
1128
1141
  if (!t) {
1129
- ue(e);
1142
+ ve(e);
1130
1143
  return;
1131
1144
  }
1132
- const r = t.getBoundingClientRect();
1133
- ee(F(r)), ue((i) => i === e ? null : e);
1134
- }, [F]);
1135
- I(() => {
1136
- if (!A)
1145
+ const o = t.getBoundingClientRect();
1146
+ Be(Me(o)), ve((i) => i === e ? null : e);
1147
+ }, [Me]);
1148
+ j(() => {
1149
+ if (!N)
1137
1150
  return;
1138
1151
  const e = (t) => {
1139
1152
  if (we.current && we.current.contains(t.target))
1140
1153
  return;
1141
- const r = ve.current[A];
1142
- r && r.contains(t.target) || Object.values(ve.current).some(
1143
- (o) => o && o.contains(t.target)
1144
- ) || ue(null);
1154
+ const o = Fe.current[N];
1155
+ o && o.contains(t.target) || Object.values(Fe.current).some(
1156
+ (n) => n && n.contains(t.target)
1157
+ ) || ve(null);
1145
1158
  };
1146
1159
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1147
- }, [A]), I(() => {
1148
- if (!A)
1160
+ }, [N]), j(() => {
1161
+ if (!N)
1149
1162
  return;
1150
1163
  const e = () => {
1151
- const t = ve.current[A];
1164
+ const t = Fe.current[N];
1152
1165
  if (!t)
1153
1166
  return;
1154
- const r = t.getBoundingClientRect();
1155
- ee(F(r));
1167
+ const o = t.getBoundingClientRect();
1168
+ Be(Me(o));
1156
1169
  };
1157
1170
  return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
1158
1171
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
1159
1172
  };
1160
- }, [A, F]), dn(() => {
1161
- if (!A)
1173
+ }, [N, Me]), Dn(() => {
1174
+ if (!N)
1162
1175
  return;
1163
- const e = we.current, t = ve.current[A];
1176
+ const e = we.current, t = Fe.current[N];
1164
1177
  if (!e || !t)
1165
1178
  return;
1166
- const r = e.offsetWidth, i = t.getBoundingClientRect(), o = 8, u = typeof window < "u" ? window.innerWidth : 1 / 0;
1167
- if (!(i.left + r > u - o))
1179
+ const o = e.offsetWidth, i = t.getBoundingClientRect(), n = 8, u = typeof window < "u" ? window.innerWidth : 1 / 0;
1180
+ if (!(i.left + o > u - n))
1168
1181
  return;
1169
- const x = Math.max(o, i.right - r);
1170
- ee((j) => j.left === x ? j : { ...j, left: x });
1171
- }, [A, Se.top]);
1172
- const fe = P((e) => !e || typeof e != "object" ? {} : Object.fromEntries(
1182
+ const x = Math.max(n, i.right - o);
1183
+ Be((W) => W.left === x ? W : { ...W, left: x });
1184
+ }, [N, et.top]);
1185
+ const Bt = O((e) => !e || typeof e != "object" ? {} : Object.fromEntries(
1173
1186
  Object.entries(e).filter(([, t]) => t == null ? !1 : typeof t == "string" ? t.trim() !== "" : !0)
1174
- ), []), Pe = P((e, t) => {
1175
- const r = Object.keys(e || {}), i = Object.keys(t || {});
1176
- return r.length !== i.length ? !1 : r.every((o) => e[o] === t[o]);
1187
+ ), []), Et = O((e, t) => {
1188
+ const o = Object.keys(e || {}), i = Object.keys(t || {});
1189
+ return o.length !== i.length ? !1 : o.every((n) => e[n] === t[n]);
1177
1190
  }, []);
1178
- I(() => {
1179
- if (!K || C === null)
1191
+ j(() => {
1192
+ if (!P || C === null)
1180
1193
  return;
1181
- const e = fe(C);
1182
- De((t) => Pe(t, e) ? t : e);
1183
- }, [K, C, fe, Pe]), P((e, t) => e === "csat_score" && t === "evaluation.csat_score" ? t : e, []);
1184
- const q = X && D.length > 0 ? D[0][0] : Oe, Xe = X && D.length > 0 ? D[0][1] : Te, [Xn, wt] = g(
1194
+ const e = Bt(C);
1195
+ be((t) => Et(t, e) ? t : e);
1196
+ }, [P, C, Bt, Et]), O((e, t) => e === "csat_score" && t === "evaluation.csat_score" ? t : e, []);
1197
+ const Ke = q && D.length > 0 ? D[0][0] : p, tt = q && D.length > 0 ? D[0][1] : g, [ar, Mt] = y(
1185
1198
  () => l.map((e) => e.id || e.key)
1186
- ), ie = P((e) => {
1199
+ ), le = O((e) => {
1187
1200
  if (!e || e.length === 0)
1188
1201
  return e;
1189
1202
  let t = Array.from(new Set(e));
1190
- t.length > Q && (t = t.slice(0, Q));
1191
- const i = l.map((c) => c.id || c.key).includes(W);
1192
- return !t.includes(W) && i && (t.length >= Q ? t = [...t.slice(0, Q - 1), W] : t = [...t, W]), [...t.filter((c) => c !== W), W];
1193
- }, [l]), [$, Ie] = g(() => {
1194
- if (typeof window < "u" && w)
1203
+ t.length > Y && (t = t.slice(0, Y));
1204
+ const i = l.map((c) => c.id || c.key).includes(I);
1205
+ return !t.includes(I) && i && (t.length >= Y ? t = [...t.slice(0, Y - 1), I] : t = [...t, I]), [...t.filter((c) => c !== I), I];
1206
+ }, [l]), [_, Ae] = y(() => {
1207
+ if (typeof window < "u" && v)
1195
1208
  try {
1196
- if (localStorage.getItem(`dataTable_manual_change_${w}:${O}`) === "true") {
1197
- const i = localStorage.getItem(`dataTable_columns_${w}:${O}`);
1209
+ if (localStorage.getItem(`dataTable_manual_change_${v}:${E}`) === "true") {
1210
+ const i = localStorage.getItem(`dataTable_columns_${v}:${E}`);
1198
1211
  if (i) {
1199
- const o = JSON.parse(i);
1200
- if (Array.isArray(o) && o.length > 0) {
1201
- se.current = !0;
1202
- const u = o.filter(
1212
+ const n = JSON.parse(i);
1213
+ if (Array.isArray(n) && n.length > 0) {
1214
+ ee.current = !0;
1215
+ const u = n.filter(
1203
1216
  (c) => l.some((x) => (x.id || x.key) === c)
1204
1217
  );
1205
1218
  if (u.length > 0)
1206
- return u.slice(0, Q);
1219
+ return u.slice(0, Y);
1207
1220
  }
1208
1221
  }
1209
1222
  }
1210
- } catch (r) {
1211
- console.warn("Failed to load saved columns from localStorage:", r);
1223
+ } catch (o) {
1224
+ console.warn("Failed to load saved columns from localStorage:", o);
1212
1225
  }
1213
- const t = l.map((r) => r.id || r.key).slice(0, Q);
1214
- return ie(t);
1215
- }), [le, lt] = g(!1), [pe, Re] = g([]), [Ft, Pt] = g({ top: 0, left: 0, width: 0 }), [Ge, ze] = g(/* @__PURE__ */ new Set()), [Je, Ee] = g(/* @__PURE__ */ new Set()), me = U({}), Ye = U(null);
1216
- Ye.current === null && (Ye.current = [...$]);
1217
- const [he, at] = g(null), [It, Qe] = g(null), Me = U(null), ct = U(null), dt = U(null), [kt, ut] = g(null), [ft, jt] = g({}), _t = U(null), qe = U(null), J = (e) => e.id || e.key, Ze = P((e) => {
1226
+ const t = l.map((o) => o.id || o.key).slice(0, Y);
1227
+ return le(t);
1228
+ }), [ae, ht] = y(!1), [pe, Ne] = y([]), [At, qt] = y({ top: 0, left: 0, width: 0 }), [nt, We] = y(/* @__PURE__ */ new Set()), [rt, Oe] = y(/* @__PURE__ */ new Set()), he = K({}), ot = K(null);
1229
+ ot.current === null && (ot.current = [..._]);
1230
+ const [me, mt] = y(null), [Zt, st] = y(null), Te = K(null), gt = K(null), yt = K(null), [Nt, xt] = y(null), [bt, Vt] = y({}), en = K(null), it = K(null), Q = (e) => e.id || e.key, lt = O((e) => {
1218
1231
  if (typeof e == "number" && Number.isFinite(e))
1219
1232
  return e;
1220
1233
  if (typeof e == "string") {
@@ -1223,232 +1236,284 @@ function rr({
1223
1236
  const i = parseFloat(t);
1224
1237
  return Number.isFinite(i) ? i : null;
1225
1238
  }
1226
- const r = parseFloat(t);
1227
- return Number.isFinite(r) && `${r}` === t ? r : null;
1239
+ const o = parseFloat(t);
1240
+ return Number.isFinite(o) && `${o}` === t ? o : null;
1228
1241
  }
1229
1242
  return null;
1230
- }, []), Dt = P((e, t) => ft[e] != null ? `${ft[e]}px` : typeof t == "number" ? `${t}px` : t || "auto", [ft]), Ve = P((e) => {
1231
- if (!qe.current)
1243
+ }, []), Wt = O((e, t) => bt[e] != null ? `${bt[e]}px` : typeof t == "number" ? `${t}px` : t || "auto", [bt]), at = O((e) => {
1244
+ if (!it.current)
1232
1245
  return;
1233
- const { columnId: t, startX: r, startWidth: i, minWidth: o, maxWidth: u } = qe.current, c = e.clientX - r, x = Math.round(i + c), j = Math.min(u, Math.max(o, x));
1234
- jt((_) => ({ ..._, [t]: j }));
1235
- }, []), je = P(() => {
1236
- qe.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", Ve), document.removeEventListener("mouseup", je);
1237
- }, [Ve]), Ht = P((e, t, r) => {
1238
- var rt;
1246
+ const { columnId: t, startX: o, startWidth: i, minWidth: n, maxWidth: u } = it.current, c = e.clientX - o, x = Math.round(i + c), W = Math.min(u, Math.max(n, x));
1247
+ Vt((U) => ({ ...U, [t]: W }));
1248
+ }, []), Ue = O(() => {
1249
+ it.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", at), document.removeEventListener("mouseup", Ue);
1250
+ }, [at]), tn = O((e, t, o) => {
1251
+ var Ie;
1239
1252
  e.preventDefault(), e.stopPropagation();
1240
- const i = t.id || t.key, o = Ze(t.minWidth) ?? E, u = Ze(t.maxWidth) ?? M, c = Math.min(o, u), x = Math.max(o, u), j = ((rt = e.currentTarget.closest("th")) == null ? void 0 : rt.getBoundingClientRect().width) || 0, _ = Ze(r), Ke = _ ?? Math.max(c, Math.round(j) || c), pt = Math.min(x, Math.max(c, Ke));
1241
- qe.current = { columnId: i, startX: e.clientX, startWidth: pt, minWidth: c, maxWidth: x }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", Ve), document.addEventListener("mouseup", je);
1242
- }, [M, E, Ve, je, Ze]);
1243
- I(() => () => je(), [je]);
1244
- const Kt = un(
1245
- At(bn),
1246
- At(xn, {
1247
- coordinateGetter: yn
1253
+ const i = t.id || t.key, n = lt(t.minWidth) ?? B, u = lt(t.maxWidth) ?? A, c = Math.min(n, u), x = Math.max(n, u), W = ((Ie = e.currentTarget.closest("th")) == null ? void 0 : Ie.getBoundingClientRect().width) || 0, U = lt(o), Je = U ?? Math.max(c, Math.round(W) || c), Pe = Math.min(x, Math.max(c, Je));
1254
+ it.current = { columnId: i, startX: e.clientX, startWidth: Pe, minWidth: c, maxWidth: x }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", at), document.addEventListener("mouseup", Ue);
1255
+ }, [A, B, at, Ue, lt]);
1256
+ j(() => () => Ue(), [Ue]);
1257
+ const nn = Cn(
1258
+ Ut(Wn),
1259
+ Ut(Nn, {
1260
+ coordinateGetter: An
1248
1261
  })
1249
- ), Ut = (e) => {
1250
- const { active: t, over: r } = e;
1251
- if (r && t.id !== r.id) {
1252
- if (t.id === W || r.id === W) {
1253
- Rt("Cannot drop columns on the Action column"), ut(null);
1262
+ ), rn = (e) => {
1263
+ const { active: t, over: o } = e;
1264
+ if (o && t.id !== o.id) {
1265
+ if (t.id === I || o.id === I) {
1266
+ Lt("Cannot drop columns on the Action column"), xt(null);
1254
1267
  return;
1255
1268
  }
1256
- se.current = !0, Ie((i) => {
1257
- const o = i.indexOf(t.id), u = i.indexOf(r.id);
1258
- if (o !== -1 && u !== -1) {
1259
- const c = gt(i, o, u), x = ie(c);
1260
- return zt(x), x;
1269
+ ee.current = !0, Ae((i) => {
1270
+ const n = i.indexOf(t.id), u = i.indexOf(o.id);
1271
+ if (n !== -1 && u !== -1) {
1272
+ const c = Ft(i, n, u), x = le(c);
1273
+ return Pt(x), x;
1261
1274
  }
1262
1275
  return i;
1263
- }), wt((i) => {
1264
- const o = i.indexOf(t.id), u = i.indexOf(r.id);
1265
- return gt(i, o, u);
1276
+ }), Mt((i) => {
1277
+ const n = i.indexOf(t.id), u = i.indexOf(o.id);
1278
+ return Ft(i, n, u);
1266
1279
  });
1267
1280
  }
1268
- ut(null);
1269
- }, Xt = (e) => {
1270
- ut(e.active.id);
1271
- }, et = ge(() => {
1272
- if (K)
1273
- return n || [];
1274
- if (!n || n.length === 0)
1281
+ xt(null);
1282
+ }, on = (e) => {
1283
+ xt(e.active.id);
1284
+ }, ct = oe(() => {
1285
+ if (P)
1286
+ return r || [];
1287
+ if (!r || r.length === 0)
1275
1288
  return [];
1276
- const e = Ce.trim().toLowerCase(), t = Object.entries(G).filter(([, r]) => Ue(r));
1277
- return n.filter((r) => {
1278
- for (const [i, o] of t) {
1279
- const u = r[i];
1289
+ const e = ne.trim().toLowerCase(), t = Object.entries(X).filter(([, o]) => Ye(o));
1290
+ return r.filter((o) => {
1291
+ for (const [i, n] of t) {
1292
+ const u = o[i];
1280
1293
  if (u == null)
1281
1294
  return !1;
1282
- if (Array.isArray(o)) {
1295
+ if (Array.isArray(n)) {
1283
1296
  const c = String(u);
1284
- if (!o.some((x) => String(x) === c))
1297
+ if (!n.some((x) => String(x) === c))
1285
1298
  return !1;
1286
1299
  continue;
1287
1300
  }
1288
- if (o.type === "range") {
1289
- const c = St(u);
1290
- if (isNaN(c) || o.min !== "" && o.min != null && c < Number(o.min) || o.max !== "" && o.max != null && c > Number(o.max))
1301
+ if (n.type === "range") {
1302
+ const c = zt(u);
1303
+ if (isNaN(c) || n.min !== "" && n.min != null && c < Number(n.min) || n.max !== "" && n.max != null && c > Number(n.max))
1291
1304
  return !1;
1292
1305
  continue;
1293
1306
  }
1294
- if (o.type === "durationRange") {
1295
- const c = An(u);
1296
- if (isNaN(c) || o.minSec !== "" && o.minSec != null && c < Number(o.minSec) || o.maxSec !== "" && o.maxSec != null && c > Number(o.maxSec))
1307
+ if (n.type === "durationRange") {
1308
+ const c = Qn(u);
1309
+ if (isNaN(c) || n.minSec !== "" && n.minSec != null && c < Number(n.minSec) || n.maxSec !== "" && n.maxSec != null && c > Number(n.maxSec))
1297
1310
  return !1;
1298
1311
  continue;
1299
1312
  }
1300
- if (o.type === "scoreRange") {
1301
- const c = St(u);
1313
+ if (n.type === "scoreRange") {
1314
+ const c = zt(u);
1302
1315
  if (isNaN(c))
1303
1316
  return !1;
1304
- if (Array.isArray(o.values) && o.values.length > 0) {
1317
+ if (Array.isArray(n.values) && n.values.length > 0) {
1305
1318
  const x = Math.floor(c);
1306
- if (!o.values.includes(x))
1319
+ if (!n.values.includes(x))
1307
1320
  return !1;
1308
1321
  continue;
1309
1322
  }
1310
- if (o.min !== "" && o.min != null && c < Number(o.min) || o.max !== "" && o.max != null && c > Number(o.max))
1323
+ if (n.min !== "" && n.min != null && c < Number(n.min) || n.max !== "" && n.max != null && c > Number(n.max))
1311
1324
  return !1;
1312
1325
  continue;
1313
1326
  }
1314
- if (o.type === "dateRange") {
1315
- const c = On(u);
1327
+ if (n.type === "dateRange") {
1328
+ const c = qn(u);
1316
1329
  if (!c)
1317
1330
  return !1;
1318
- if (o.from) {
1319
- const x = /* @__PURE__ */ new Date(o.from + "T00:00:00");
1331
+ if (n.from) {
1332
+ const x = /* @__PURE__ */ new Date(n.from + "T00:00:00");
1320
1333
  if (c < x)
1321
1334
  return !1;
1322
1335
  }
1323
- if (o.to) {
1324
- const x = /* @__PURE__ */ new Date(o.to + "T23:59:59");
1336
+ if (n.to) {
1337
+ const x = /* @__PURE__ */ new Date(n.to + "T23:59:59");
1325
1338
  if (c > x)
1326
1339
  return !1;
1327
1340
  }
1328
1341
  continue;
1329
1342
  }
1330
1343
  }
1331
- return !(e && !Object.values(r).some((o) => o == null ? !1 : String(o).toLowerCase().includes(e)));
1344
+ return !(e && !Object.values(o).some((n) => n == null ? !1 : String(n).toLowerCase().includes(e)));
1332
1345
  });
1333
- }, [n, G, Ce, K]), _e = ge(() => X || !q ? et : [...et].sort((e, t) => {
1334
- const r = e[q], i = t[q];
1335
- if (r == null)
1346
+ }, [r, X, ne, P]), Xe = oe(() => q || !Ke ? ct : [...ct].sort((e, t) => {
1347
+ const o = e[Ke], i = t[Ke];
1348
+ if (o == null)
1336
1349
  return 1;
1337
1350
  if (i == null)
1338
1351
  return -1;
1339
- if (typeof r == "number" && typeof i == "number")
1340
- return Xe === "asc" ? r - i : i - r;
1341
- const o = String(r).toLowerCase(), u = String(i).toLowerCase();
1342
- return Xe === "asc" ? o.localeCompare(u) : u.localeCompare(o);
1343
- }), [et, q, Xe, X]), tt = ge(() => {
1344
- if (Z)
1345
- return _e;
1352
+ if (typeof o == "number" && typeof i == "number")
1353
+ return tt === "asc" ? o - i : i - o;
1354
+ const n = String(o).toLowerCase(), u = String(i).toLowerCase();
1355
+ return tt === "asc" ? n.localeCompare(u) : u.localeCompare(n);
1356
+ }), [ct, Ke, tt, q]), $e = oe(() => {
1357
+ if (se)
1358
+ return Xe;
1346
1359
  {
1347
- const e = (ne - 1) * ce, t = e + ce;
1348
- return _e.slice(e, t);
1360
+ const e = (Re - 1) * ye, t = e + ye;
1361
+ return Xe.slice(e, t);
1349
1362
  }
1350
- }, [_e, ne, ce, Z]), Ct = (e) => {
1351
- X && L ? (L(e), b ? b(1) : V(1)) : (Oe === e ? $e(Te === "asc" ? "desc" : "asc") : (it(e), $e("asc")), ke(1));
1352
- }, Gt = (e, t) => {
1353
- const r = (t || "").split(/\s+/).map((i) => i.trim()).filter(Boolean);
1354
- Le(e, r);
1355
- }, Rt = (e) => {
1356
- dt.current || (typeof z == "function" && z(e), dt.current = setTimeout(() => {
1357
- dt.current = null;
1363
+ }, [Xe, Re, ye, se]), vt = O(
1364
+ (e, t) => V ? V(e, t) : (e == null ? void 0 : e.id) ?? t,
1365
+ [V]
1366
+ ), ke = oe(
1367
+ () => new Set(Array.isArray(Z) ? Z : []),
1368
+ [Z]
1369
+ ), De = oe(
1370
+ () => $e.map((e, t) => vt(e, t)),
1371
+ [$e, vt]
1372
+ ), Ot = oe(
1373
+ () => De.reduce((e, t) => ke.has(t) ? e + 1 : e, 0),
1374
+ [De, ke]
1375
+ ), dt = De.length > 0 && Ot === De.length, sn = Ot > 0 && !dt, ln = O(
1376
+ (e) => {
1377
+ if (!J)
1378
+ return;
1379
+ const t = new Set(ke);
1380
+ t.has(e) ? t.delete(e) : t.add(e), J(Array.from(t));
1381
+ },
1382
+ [J, ke]
1383
+ ), an = O(() => {
1384
+ if (!J)
1385
+ return;
1386
+ const e = new Set(ke);
1387
+ dt ? De.forEach((t) => e.delete(t)) : De.forEach((t) => e.add(t)), J(Array.from(e));
1388
+ }, [J, ke, dt, De]), Tt = ({ checked: e, indeterminate: t = !1, onToggle: o, ariaLabel: i }) => /* @__PURE__ */ s(
1389
+ "span",
1390
+ {
1391
+ role: "checkbox",
1392
+ "aria-checked": t ? "mixed" : e,
1393
+ "aria-label": i,
1394
+ tabIndex: 0,
1395
+ onClick: (n) => {
1396
+ n.stopPropagation(), o();
1397
+ },
1398
+ onKeyDown: (n) => {
1399
+ (n.key === " " || n.key === "Enter") && (n.preventDefault(), n.stopPropagation(), o());
1400
+ },
1401
+ style: {
1402
+ width: 16,
1403
+ height: 16,
1404
+ borderRadius: 5,
1405
+ display: "inline-flex",
1406
+ alignItems: "center",
1407
+ justifyContent: "center",
1408
+ background: e || t ? "#0B0B0B" : "#FFFFFF",
1409
+ border: `1px solid ${e || t ? "#0B0B0B" : "#676767"}`,
1410
+ cursor: "pointer",
1411
+ flexShrink: 0
1412
+ },
1413
+ children: t ? /* @__PURE__ */ s(jn, { size: 11, color: "#FFFFFF", strokeWidth: 3 }) : e ? /* @__PURE__ */ s(Qe, { size: 11, color: "#FFFFFF", strokeWidth: 3 }) : null
1414
+ }
1415
+ ), ut = 44, $t = (e) => {
1416
+ q && H ? (H(e), b ? b(1) : fe(1)) : (p === e ? F(g === "asc" ? "desc" : "asc") : (m(e), F("asc")), ze(1));
1417
+ }, cn = (e, t) => {
1418
+ const o = (t || "").split(/\s+/).map((i) => i.trim()).filter(Boolean);
1419
+ M(e, o);
1420
+ }, Lt = (e) => {
1421
+ yt.current || (typeof z == "function" && z(e), yt.current = setTimeout(() => {
1422
+ yt.current = null;
1358
1423
  }, 3e3));
1359
- }, zt = P((e) => {
1360
- if (typeof window < "u" && re && e.length > 0 && se.current)
1424
+ }, Pt = O((e) => {
1425
+ if (typeof window < "u" && te && e.length > 0 && ee.current)
1361
1426
  try {
1362
- localStorage.setItem(re, JSON.stringify(e)), de && localStorage.setItem(de, "true");
1427
+ localStorage.setItem(te, JSON.stringify(e)), xe && localStorage.setItem(xe, "true");
1363
1428
  } catch (t) {
1364
1429
  console.warn("Failed to save columns to localStorage:", t);
1365
1430
  }
1366
- }, [re, de]), Et = 250, nt = () => {
1367
- Object.values(me.current).forEach((e) => clearTimeout(e)), me.current = {};
1368
- }, Jt = () => {
1369
- const e = pe.filter((t) => !Je.has(t));
1370
- return Ge.forEach((t) => {
1431
+ }, [te, xe]), It = 250, ft = () => {
1432
+ Object.values(he.current).forEach((e) => clearTimeout(e)), he.current = {};
1433
+ }, dn = () => {
1434
+ const e = pe.filter((t) => !rt.has(t));
1435
+ return nt.forEach((t) => {
1371
1436
  e.includes(t) || e.push(t);
1372
- }), ie(e);
1373
- }, Yt = (e) => {
1374
- if (e === W)
1437
+ }), le(e);
1438
+ }, un = (e) => {
1439
+ if (e === I)
1375
1440
  return;
1376
- if (me.current[e]) {
1377
- clearTimeout(me.current[e]), delete me.current[e], ze((r) => {
1378
- const i = new Set(r);
1441
+ if (he.current[e]) {
1442
+ clearTimeout(he.current[e]), delete he.current[e], We((o) => {
1443
+ const i = new Set(o);
1379
1444
  return i.delete(e), i;
1380
- }), Ee((r) => {
1381
- const i = new Set(r);
1445
+ }), Oe((o) => {
1446
+ const i = new Set(o);
1382
1447
  return i.delete(e), i;
1383
1448
  });
1384
1449
  return;
1385
1450
  }
1386
1451
  if (pe.includes(e)) {
1387
- if (pe.length - Je.size <= 1)
1452
+ if (pe.length - rt.size <= 1)
1388
1453
  return;
1389
- Ee((i) => new Set(i).add(e)), me.current[e] = setTimeout(() => {
1390
- Re((i) => i.filter((o) => o !== e)), Ee((i) => {
1391
- const o = new Set(i);
1392
- return o.delete(e), o;
1393
- }), delete me.current[e];
1394
- }, Et);
1454
+ Oe((i) => new Set(i).add(e)), he.current[e] = setTimeout(() => {
1455
+ Ne((i) => i.filter((n) => n !== e)), Oe((i) => {
1456
+ const n = new Set(i);
1457
+ return n.delete(e), n;
1458
+ }), delete he.current[e];
1459
+ }, It);
1395
1460
  } else {
1396
- if (pe.length + Ge.size >= Q) {
1397
- Rt("Maximum 9 column selection allowed");
1461
+ if (pe.length + nt.size >= Y) {
1462
+ Lt("Maximum 9 column selection allowed");
1398
1463
  return;
1399
1464
  }
1400
- ze((i) => new Set(i).add(e)), me.current[e] = setTimeout(() => {
1401
- Re((i) => ie([...i, e])), ze((i) => {
1402
- const o = new Set(i);
1403
- return o.delete(e), o;
1404
- }), delete me.current[e];
1405
- }, Et);
1465
+ We((i) => new Set(i).add(e)), he.current[e] = setTimeout(() => {
1466
+ Ne((i) => le([...i, e])), We((i) => {
1467
+ const n = new Set(i);
1468
+ return n.delete(e), n;
1469
+ }), delete he.current[e];
1470
+ }, It);
1406
1471
  }
1407
- }, Qt = (e, t) => {
1408
- pe[t] !== W && at(t);
1409
- }, qt = () => {
1410
- at(null), Qe(null);
1411
- }, Zt = (e, t) => {
1412
- e.preventDefault(), he !== null && he !== t && Qe(t);
1413
- }, Vt = () => {
1414
- Qe(null);
1415
- }, en = (e, t) => {
1416
- e.preventDefault(), he !== null && he !== t && pe[t] !== W && pe[he] !== W && Re((r) => {
1417
- const i = gt(r, he, t);
1418
- return ie(i);
1419
- }), at(null), Qe(null);
1472
+ }, fn = (e, t) => {
1473
+ pe[t] !== I && mt(t);
1474
+ }, pn = () => {
1475
+ mt(null), st(null);
1476
+ }, hn = (e, t) => {
1477
+ e.preventDefault(), me !== null && me !== t && st(t);
1478
+ }, mn = () => {
1479
+ st(null);
1480
+ }, gn = (e, t) => {
1481
+ e.preventDefault(), me !== null && me !== t && pe[t] !== I && pe[me] !== I && Ne((o) => {
1482
+ const i = Ft(o, me, t);
1483
+ return le(i);
1484
+ }), mt(null), st(null);
1420
1485
  };
1421
- I(() => {
1422
- wt((e) => {
1423
- const t = $.filter((o) => e.includes(o)), r = $.filter((o) => !e.includes(o)), i = e.filter((o) => !$.includes(o));
1424
- return [...t, ...r, ...i];
1486
+ j(() => {
1487
+ Mt((e) => {
1488
+ const t = _.filter((n) => e.includes(n)), o = _.filter((n) => !e.includes(n)), i = e.filter((n) => !_.includes(n));
1489
+ return [...t, ...o, ...i];
1425
1490
  });
1426
- }, [$]), I(() => {
1427
- if (typeof window < "u" && re && $.length > 0 && se.current)
1491
+ }, [_]), j(() => {
1492
+ if (typeof window < "u" && te && _.length > 0 && ee.current)
1428
1493
  try {
1429
- const e = ie($);
1430
- localStorage.setItem(re, JSON.stringify(e)), de && localStorage.setItem(de, "true");
1494
+ const e = le(_);
1495
+ localStorage.setItem(te, JSON.stringify(e)), xe && localStorage.setItem(xe, "true");
1431
1496
  } catch (e) {
1432
1497
  console.warn("Failed to save columns to localStorage:", e);
1433
1498
  }
1434
- }, [$, re, de]), I(() => {
1435
- ae && ae(
1436
- $.filter((e) => e !== W)
1499
+ }, [_, te, xe]), j(() => {
1500
+ ce && ce(
1501
+ _.filter((e) => e !== I)
1437
1502
  );
1438
- }, [$, ae]), I(() => {
1439
- if (l.length > 0 && $.length === 0) {
1440
- if (typeof window < "u" && w)
1503
+ }, [_, ce]), j(() => {
1504
+ if (l.length > 0 && _.length === 0) {
1505
+ if (typeof window < "u" && v)
1441
1506
  try {
1442
- if (localStorage.getItem(`dataTable_manual_change_${w}:${O}`) === "true") {
1443
- const r = localStorage.getItem(`dataTable_columns_${w}:${O}`);
1444
- if (r) {
1445
- const i = JSON.parse(r);
1507
+ if (localStorage.getItem(`dataTable_manual_change_${v}:${E}`) === "true") {
1508
+ const o = localStorage.getItem(`dataTable_columns_${v}:${E}`);
1509
+ if (o) {
1510
+ const i = JSON.parse(o);
1446
1511
  if (Array.isArray(i) && i.length > 0) {
1447
- const o = i.filter(
1512
+ const n = i.filter(
1448
1513
  (u) => l.some((c) => (c.id || c.key) === u)
1449
1514
  );
1450
- if (o.length > 0) {
1451
- se.current = !0, Ie(o.slice(0, Q));
1515
+ if (n.length > 0) {
1516
+ ee.current = !0, Ae(n.slice(0, Y));
1452
1517
  return;
1453
1518
  }
1454
1519
  }
@@ -1458,20 +1523,38 @@ function rr({
1458
1523
  console.warn("Failed to load saved columns from localStorage:", t);
1459
1524
  }
1460
1525
  const e = l.map((t) => t.id || t.key);
1461
- Ie(ie(e.slice(0, Q)));
1526
+ Ae(le(e.slice(0, Y)));
1462
1527
  }
1463
- }, [l, w, O, ie]);
1464
- const Be = ge(() => {
1465
- const e = $.map((t) => l.find((r) => J(r) === t)).filter(Boolean);
1466
- return ie(e.map(J)).map((t) => l.find((r) => J(r) === t)).filter(Boolean);
1467
- }, [l, $]);
1468
- ge(() => Be.some((e) => e.filterable === !0), [Be]), I(() => {
1469
- if (!le || !Me.current)
1528
+ }, [l, v, E, le]), j(() => {
1529
+ if (!(typeof window > "u" || !v) && !(!l || l.length === 0) && He.current !== E && (He.current = E, !ee.current))
1530
+ try {
1531
+ if (!(localStorage.getItem(`dataTable_manual_change_${v}:${E}`) === "true"))
1532
+ return;
1533
+ const t = localStorage.getItem(`dataTable_columns_${v}:${E}`);
1534
+ if (!t)
1535
+ return;
1536
+ const o = JSON.parse(t);
1537
+ if (!Array.isArray(o) || o.length === 0)
1538
+ return;
1539
+ const i = o.filter(
1540
+ (n) => l.some((u) => (u.id || u.key) === n)
1541
+ );
1542
+ i.length > 0 && (ee.current = !0, Ae(i.slice(0, Y)));
1543
+ } catch (e) {
1544
+ console.warn("Failed to re-load saved columns after user resolved:", e);
1545
+ }
1546
+ }, [E, v, l]);
1547
+ const Le = oe(() => {
1548
+ const e = _.map((t) => l.find((o) => Q(o) === t)).filter(Boolean);
1549
+ return le(e.map(Q)).map((t) => l.find((o) => Q(o) === t)).filter(Boolean);
1550
+ }, [l, _]);
1551
+ oe(() => Le.some((e) => e.filterable === !0), [Le]), j(() => {
1552
+ if (!ae || !Te.current)
1470
1553
  return;
1471
1554
  const e = () => {
1472
- if (Me.current) {
1473
- const t = Me.current.getBoundingClientRect(), r = 217, i = Math.max(8, t.right - r);
1474
- Pt({
1555
+ if (Te.current) {
1556
+ const t = Te.current.getBoundingClientRect(), o = 217, i = Math.max(8, t.right - o);
1557
+ qt({
1475
1558
  top: t.bottom,
1476
1559
  left: i,
1477
1560
  width: Math.max(t.width || 220, 220)
@@ -1481,53 +1564,53 @@ function rr({
1481
1564
  return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
1482
1565
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
1483
1566
  };
1484
- }, [le]), I(() => {
1567
+ }, [ae]), j(() => {
1485
1568
  const e = (t) => {
1486
- le && Me.current && !Me.current.contains(t.target) && ct.current && !ct.current.contains(t.target) && lt(!1);
1569
+ ae && Te.current && !Te.current.contains(t.target) && gt.current && !gt.current.contains(t.target) && ht(!1);
1487
1570
  };
1488
- if (le)
1571
+ if (ae)
1489
1572
  return document.addEventListener("mousedown", e), () => {
1490
1573
  document.removeEventListener("mousedown", e);
1491
1574
  };
1492
- }, [le]), I(() => {
1493
- le && (nt(), Re($), ze(/* @__PURE__ */ new Set()), Ee(/* @__PURE__ */ new Set()));
1494
- }, [le, $]), I(() => () => nt(), []), $.length === 1 ? (Wt = l.find((e) => (e.id || e.key) === $[0])) != null && Wt.label : `${$.length}`;
1495
- function tn({ column: e, isHeaderRow: t = !0 }) {
1496
- const r = J(e), i = r === W, o = Dt(r, e.width), [u, c] = g(!1), {
1575
+ }, [ae]), j(() => {
1576
+ ae && (ft(), Ne(_), We(/* @__PURE__ */ new Set()), Oe(/* @__PURE__ */ new Set()));
1577
+ }, [ae, _]), j(() => () => ft(), []), _.length === 1 ? (Kt = l.find((e) => (e.id || e.key) === _[0])) != null && Kt.label : `${_.length}`;
1578
+ function yn({ column: e, isHeaderRow: t = !0 }) {
1579
+ const o = Q(e), i = o === I, n = Wt(o, e.width), [u, c] = y(!1), {
1497
1580
  attributes: x,
1498
- listeners: j,
1499
- setNodeRef: _,
1500
- transform: Ke,
1501
- transition: pt,
1502
- isDragging: rt
1503
- } = vn({ id: r }), rn = {
1504
- transform: Sn.Transform.toString(Ke),
1505
- transition: pt,
1506
- opacity: rt ? 0.5 : 1,
1507
- width: o,
1508
- minWidth: o
1581
+ listeners: W,
1582
+ setNodeRef: U,
1583
+ transform: Je,
1584
+ transition: Pe,
1585
+ isDragging: Ie
1586
+ } = On({ id: o }), bn = {
1587
+ transform: Tn.Transform.toString(Je),
1588
+ transition: Pe,
1589
+ opacity: Ie ? 0.5 : 1,
1590
+ width: n,
1591
+ minWidth: n
1509
1592
  };
1510
- let Ne = !1;
1511
- if (X && D.length > 0) {
1593
+ let _e = !1;
1594
+ if (q && D.length > 0) {
1512
1595
  const R = D[0][0];
1513
- (R === r || R === "csat_score" && r === "evaluation.csat_score") && (Ne = !0);
1596
+ (R === o || R === "csat_score" && o === "evaluation.csat_score") && (_e = !0);
1514
1597
  } else
1515
- Ne = q === r;
1516
- const on = Xe === "asc", sn = e.filterable === !0;
1598
+ _e = Ke === o;
1599
+ const vn = tt === "asc", Sn = e.filterable === !0;
1517
1600
  if (!t)
1518
1601
  return /* @__PURE__ */ s(
1519
1602
  "th",
1520
1603
  {
1521
1604
  style: {
1522
- width: o,
1523
- minWidth: o,
1605
+ width: n,
1606
+ minWidth: n,
1524
1607
  backgroundColor: "var(--primary-foreground)",
1525
1608
  borderRight: "1px solid #e6e6e6",
1526
1609
  borderBottom: "1px solid #e6e6e6",
1527
1610
  boxSizing: "border-box"
1528
1611
  },
1529
1612
  className: "sticky top-[57px] z-10 border-b border-[var(--border-strong)] px-4 py-2 text-left",
1530
- children: sn ? /* @__PURE__ */ m("div", { className: "relative", children: [
1613
+ children: Sn ? /* @__PURE__ */ h("div", { className: "relative", children: [
1531
1614
  /* @__PURE__ */ s(
1532
1615
  Filter,
1533
1616
  {
@@ -1540,9 +1623,9 @@ function rr({
1540
1623
  {
1541
1624
  type: "text",
1542
1625
  placeholder: "Filter...",
1543
- value: G[r] || "",
1626
+ value: X[o] || "",
1544
1627
  onChange: (R) => {
1545
- R.stopPropagation(), Gt(r, R.target.value);
1628
+ R.stopPropagation(), cn(o, R.target.value);
1546
1629
  },
1547
1630
  onKeyDown: (R) => R.stopPropagation(),
1548
1631
  onMouseDown: (R) => R.stopPropagation(),
@@ -1554,15 +1637,15 @@ function rr({
1554
1637
  ] }) : /* @__PURE__ */ s("div", { className: "h-[34px]" })
1555
1638
  }
1556
1639
  );
1557
- const mt = A === r, ot = Ue(G[r]), ln = e.sortable !== !1 && (u || Ne), an = e.filterable !== !1 && !i && (u || mt || ot);
1558
- return /* @__PURE__ */ m(
1640
+ const St = N === o, pt = Ye(X[o]), wn = e.sortable !== !1 && (u || _e), Fn = e.filterable !== !1 && !i && (u || St || pt);
1641
+ return /* @__PURE__ */ h(
1559
1642
  "th",
1560
1643
  {
1561
- ref: _,
1644
+ ref: U,
1562
1645
  onMouseEnter: () => c(!0),
1563
1646
  onMouseLeave: () => c(!1),
1564
1647
  style: {
1565
- ...rn,
1648
+ ...bn,
1566
1649
  padding: "0 12px",
1567
1650
  height: 36,
1568
1651
  textAlign: i ? "center" : "left",
@@ -1572,8 +1655,8 @@ function rr({
1572
1655
  textTransform: "none",
1573
1656
  color: "#0b0b0b",
1574
1657
  cursor: e.sortable !== !1 ? "pointer" : "default",
1575
- width: o,
1576
- ...typeof o == "string" && o.endsWith("px") ? { maxWidth: o } : {},
1658
+ width: n,
1659
+ ...typeof n == "string" && n.endsWith("px") ? { maxWidth: n } : {},
1577
1660
  borderRight: "1px solid #e6e6e6",
1578
1661
  boxSizing: "border-box",
1579
1662
  userSelect: "none",
@@ -1581,7 +1664,7 @@ function rr({
1581
1664
  wordBreak: "normal",
1582
1665
  overflowWrap: "normal",
1583
1666
  verticalAlign: "middle",
1584
- background: u || mt ? "#e6e6e6" : "#f2f2f0",
1667
+ background: u || St ? "#e6e6e6" : "#f2f2f0",
1585
1668
  borderBottom: "1px solid #e6e6e6",
1586
1669
  position: "sticky",
1587
1670
  top: 0,
@@ -1607,7 +1690,7 @@ function rr({
1607
1690
  }
1608
1691
  }
1609
1692
  ),
1610
- /* @__PURE__ */ m(
1693
+ /* @__PURE__ */ h(
1611
1694
  "div",
1612
1695
  {
1613
1696
  style: {
@@ -1626,7 +1709,7 @@ function rr({
1626
1709
  "div",
1627
1710
  {
1628
1711
  ...x,
1629
- ...j,
1712
+ ...W,
1630
1713
  style: {
1631
1714
  cursor: "grab",
1632
1715
  color: "rgba(11, 11, 11, 0.36)",
@@ -1635,13 +1718,13 @@ function rr({
1635
1718
  visibility: u ? "visible" : "hidden",
1636
1719
  flexShrink: 0
1637
1720
  },
1638
- children: /* @__PURE__ */ s(yt, { size: 14 })
1721
+ children: /* @__PURE__ */ s(kt, { size: 14 })
1639
1722
  }
1640
1723
  ),
1641
1724
  /* @__PURE__ */ s(
1642
1725
  "span",
1643
1726
  {
1644
- onClick: () => e.sortable !== !1 && Ct(r),
1727
+ onClick: () => e.sortable !== !1 && $t(o),
1645
1728
  title: typeof e.label == "string" ? e.label : void 0,
1646
1729
  style: {
1647
1730
  cursor: e.sortable !== !1 ? "pointer" : "default",
@@ -1655,12 +1738,12 @@ function rr({
1655
1738
  children: e.label
1656
1739
  }
1657
1740
  ),
1658
- ln && /* @__PURE__ */ s(
1741
+ wn && /* @__PURE__ */ s(
1659
1742
  "button",
1660
1743
  {
1661
1744
  type: "button",
1662
1745
  onClick: (R) => {
1663
- R.stopPropagation(), Ct(r);
1746
+ R.stopPropagation(), $t(o);
1664
1747
  },
1665
1748
  title: "Sort",
1666
1749
  style: {
@@ -1672,26 +1755,26 @@ function rr({
1672
1755
  display: "inline-flex",
1673
1756
  alignItems: "center",
1674
1757
  justifyContent: "center",
1675
- color: Ne ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
1758
+ color: _e ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
1676
1759
  flexShrink: 0
1677
1760
  },
1678
- children: Ne ? on ? /* @__PURE__ */ s(Rn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(zn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(En, { size: 14, strokeWidth: 1.75 })
1761
+ children: _e ? vn ? /* @__PURE__ */ s(Hn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(Kn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(Un, { size: 14, strokeWidth: 1.75 })
1679
1762
  }
1680
1763
  ),
1681
- an && /* @__PURE__ */ m(
1764
+ Fn && /* @__PURE__ */ h(
1682
1765
  "button",
1683
1766
  {
1684
1767
  type: "button",
1685
1768
  ref: (R) => {
1686
- ve.current[r] = R;
1769
+ Fe.current[o] = R;
1687
1770
  },
1688
1771
  onClick: (R) => {
1689
- R.stopPropagation(), T(r, R.currentTarget);
1772
+ R.stopPropagation(), Qt(o, R.currentTarget);
1690
1773
  },
1691
1774
  title: "Filter",
1692
1775
  style: {
1693
1776
  position: "relative",
1694
- background: mt || ot ? "#D8D8D8" : "transparent",
1777
+ background: St || pt ? "#D8D8D8" : "transparent",
1695
1778
  border: "none",
1696
1779
  padding: 4,
1697
1780
  borderRadius: 4,
@@ -1699,12 +1782,12 @@ function rr({
1699
1782
  display: "inline-flex",
1700
1783
  alignItems: "center",
1701
1784
  justifyContent: "center",
1702
- color: ot ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
1785
+ color: pt ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
1703
1786
  flexShrink: 0
1704
1787
  },
1705
1788
  children: [
1706
- /* @__PURE__ */ s(Mn, { size: 14, strokeWidth: 1.75 }),
1707
- ot && /* @__PURE__ */ s(
1789
+ /* @__PURE__ */ s(Xn, { size: 14, strokeWidth: 1.75 }),
1790
+ pt && /* @__PURE__ */ s(
1708
1791
  "span",
1709
1792
  {
1710
1793
  "aria-hidden": "true",
@@ -1747,9 +1830,9 @@ function rr({
1747
1830
  {
1748
1831
  role: "separator",
1749
1832
  "aria-orientation": "vertical",
1750
- "aria-label": `Resize ${e.label || r} column`,
1833
+ "aria-label": `Resize ${e.label || o} column`,
1751
1834
  title: "Drag to resize column",
1752
- onMouseDown: (R) => Ht(R, e, o),
1835
+ onMouseDown: (R) => tn(R, e, n),
1753
1836
  onClick: (R) => R.stopPropagation(),
1754
1837
  onMouseEnter: (R) => {
1755
1838
  R.currentTarget.style.background = "rgba(30, 33, 37, 0.18)";
@@ -1773,28 +1856,28 @@ function rr({
1773
1856
  }
1774
1857
  );
1775
1858
  }
1776
- const Mt = kt ? l.find((e) => J(e) === kt) : null, Bt = ({ col: e, columnId: t, isSelected: r, draggable: i, isAction: o, actualIndex: u }) => {
1777
- const c = i && he === u, x = i && It === u && he !== null && he !== u;
1778
- r ? Je.has(t) : Ge.has(t);
1779
- const j = r ? !Je.has(t) : Ge.has(t);
1780
- return /* @__PURE__ */ m(
1859
+ const _t = Nt ? l.find((e) => Q(e) === Nt) : null, jt = ({ col: e, columnId: t, isSelected: o, draggable: i, isAction: n, actualIndex: u }) => {
1860
+ const c = i && me === u, x = i && Zt === u && me !== null && me !== u;
1861
+ o ? rt.has(t) : nt.has(t);
1862
+ const W = o ? !rt.has(t) : nt.has(t);
1863
+ return /* @__PURE__ */ h(
1781
1864
  "div",
1782
1865
  {
1783
1866
  draggable: i,
1784
- onDragStart: i ? (_) => Qt(_, u) : void 0,
1785
- onDragEnd: i ? qt : void 0,
1786
- onDragOver: i ? (_) => Zt(_, u) : void 0,
1787
- onDragLeave: i ? Vt : void 0,
1788
- onDrop: i ? (_) => en(_, u) : void 0,
1867
+ onDragStart: i ? (U) => fn(U, u) : void 0,
1868
+ onDragEnd: i ? pn : void 0,
1869
+ onDragOver: i ? (U) => hn(U, u) : void 0,
1870
+ onDragLeave: i ? mn : void 0,
1871
+ onDrop: i ? (U) => gn(U, u) : void 0,
1789
1872
  onClick: () => {
1790
- o || Yt(t);
1873
+ n || un(t);
1791
1874
  },
1792
1875
  style: {
1793
1876
  display: "flex",
1794
1877
  alignItems: "center",
1795
1878
  gap: 4,
1796
1879
  padding: "2px 0",
1797
- cursor: o ? "default" : i ? "grab" : "pointer",
1880
+ cursor: n ? "default" : i ? "grab" : "pointer",
1798
1881
  opacity: c ? 0.5 : 1,
1799
1882
  background: x ? "#F2F2F0" : "transparent",
1800
1883
  borderRadius: 6
@@ -1813,7 +1896,7 @@ function rr({
1813
1896
  visibility: i ? "visible" : "hidden",
1814
1897
  flexShrink: 0
1815
1898
  },
1816
- children: /* @__PURE__ */ s(yt, { size: 14, strokeWidth: 1.75 })
1899
+ children: /* @__PURE__ */ s(kt, { size: 14, strokeWidth: 1.75 })
1817
1900
  }
1818
1901
  ),
1819
1902
  /* @__PURE__ */ s(
@@ -1826,12 +1909,12 @@ function rr({
1826
1909
  display: "inline-flex",
1827
1910
  alignItems: "center",
1828
1911
  justifyContent: "center",
1829
- background: j ? "#0B0B0B" : "#FFFFFF",
1830
- border: `1px solid ${j ? "#0B0B0B" : "#676767"}`,
1912
+ background: W ? "#0B0B0B" : "#FFFFFF",
1913
+ border: `1px solid ${W ? "#0B0B0B" : "#676767"}`,
1831
1914
  flexShrink: 0,
1832
1915
  marginLeft: 8
1833
1916
  },
1834
- children: j && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
1917
+ children: W && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
1835
1918
  }
1836
1919
  ),
1837
1920
  /* @__PURE__ */ s(
@@ -1851,14 +1934,14 @@ function rr({
1851
1934
  ]
1852
1935
  }
1853
1936
  );
1854
- }, nn = le ? /* @__PURE__ */ m(
1937
+ }, xn = ae ? /* @__PURE__ */ h(
1855
1938
  "div",
1856
1939
  {
1857
- ref: ct,
1940
+ ref: gt,
1858
1941
  style: {
1859
1942
  position: "fixed",
1860
- top: `${Ft.top}px`,
1861
- left: `${Ft.left}px`,
1943
+ top: `${At.top}px`,
1944
+ left: `${At.left}px`,
1862
1945
  width: 217,
1863
1946
  maxHeight: 320,
1864
1947
  zIndex: 49,
@@ -1872,7 +1955,7 @@ function rr({
1872
1955
  boxShadow: "0 8px 24px rgba(11, 11, 11, 0.08)"
1873
1956
  },
1874
1957
  children: [
1875
- /* @__PURE__ */ m(
1958
+ /* @__PURE__ */ h(
1876
1959
  "div",
1877
1960
  {
1878
1961
  style: {
@@ -1886,11 +1969,11 @@ function rr({
1886
1969
  },
1887
1970
  children: [
1888
1971
  pe.map((e, t) => {
1889
- if (e === W)
1972
+ if (e === I)
1890
1973
  return null;
1891
- const r = l.find((i) => J(i) === e);
1892
- return r ? /* @__PURE__ */ s(ht.Fragment, { children: Bt({
1893
- col: r,
1974
+ const o = l.find((i) => Q(i) === e);
1975
+ return o ? /* @__PURE__ */ s(wt.Fragment, { children: jt({
1976
+ col: o,
1894
1977
  columnId: e,
1895
1978
  isSelected: !0,
1896
1979
  draggable: !0,
@@ -1899,11 +1982,11 @@ function rr({
1899
1982
  }) }, `selected-${e}-${t}`) : null;
1900
1983
  }),
1901
1984
  l.filter((e) => {
1902
- const t = J(e);
1903
- return t !== W && !pe.includes(t);
1985
+ const t = Q(e);
1986
+ return t !== I && !pe.includes(t);
1904
1987
  }).map((e) => {
1905
- const t = J(e);
1906
- return /* @__PURE__ */ s(ht.Fragment, { children: Bt({
1988
+ const t = Q(e);
1989
+ return /* @__PURE__ */ s(wt.Fragment, { children: jt({
1907
1990
  col: e,
1908
1991
  columnId: t,
1909
1992
  isSelected: !1,
@@ -1915,7 +1998,7 @@ function rr({
1915
1998
  ]
1916
1999
  }
1917
2000
  ),
1918
- /* @__PURE__ */ m(
2001
+ /* @__PURE__ */ h(
1919
2002
  "div",
1920
2003
  {
1921
2004
  style: {
@@ -1936,10 +2019,10 @@ function rr({
1936
2019
  type: "button",
1937
2020
  onClick: (e) => {
1938
2021
  e.preventDefault(), e.stopPropagation();
1939
- const t = Ye.current ? [...Ye.current] : l.map(J).slice(0, Q), r = ie(t);
1940
- if (se.current = !1, nt(), Re(r), Ie(r), ze(/* @__PURE__ */ new Set()), Ee(/* @__PURE__ */ new Set()), typeof window < "u" && re)
2022
+ const t = ot.current ? [...ot.current] : l.map(Q).slice(0, Y), o = le(t);
2023
+ if (ee.current = !1, ft(), Ne(o), Ae(o), We(/* @__PURE__ */ new Set()), Oe(/* @__PURE__ */ new Set()), typeof window < "u" && te)
1941
2024
  try {
1942
- localStorage.removeItem(re);
2025
+ localStorage.removeItem(te);
1943
2026
  } catch {
1944
2027
  }
1945
2028
  },
@@ -1961,9 +2044,9 @@ function rr({
1961
2044
  {
1962
2045
  type: "button",
1963
2046
  onClick: (e) => {
1964
- e.preventDefault(), e.stopPropagation(), nt();
1965
- const t = Jt();
1966
- Re(t), ze(/* @__PURE__ */ new Set()), Ee(/* @__PURE__ */ new Set()), se.current = !0, Ie(t), zt(t), lt(!1);
2047
+ e.preventDefault(), e.stopPropagation(), ft();
2048
+ const t = dn();
2049
+ Ne(t), We(/* @__PURE__ */ new Set()), Oe(/* @__PURE__ */ new Set()), ee.current = !0, Ae(t), Pt(t), ht(!1);
1967
2050
  },
1968
2051
  style: {
1969
2052
  background: "#2E3236",
@@ -1985,28 +2068,28 @@ function rr({
1985
2068
  )
1986
2069
  ]
1987
2070
  }
1988
- ) : null, He = A ? l.find((e) => J(e) === A) : null, Nt = He ? /* @__PURE__ */ s(
1989
- _n,
2071
+ ) : null, Ge = N ? l.find((e) => Q(e) === N) : null, Ht = Ge ? /* @__PURE__ */ s(
2072
+ or,
1990
2073
  {
1991
- column: He,
1992
- columnId: A,
1993
- filterType: y(A),
1994
- position: Se,
2074
+ column: Ge,
2075
+ columnId: N,
2076
+ filterType: re(N),
2077
+ position: et,
1995
2078
  popoverRef: we,
1996
- distinctValues: h(A),
1997
- initialValue: G[A],
1998
- onSearch: typeof He.onFilterSearch == "function" ? He.onFilterSearch : null,
1999
- searchMinChars: He.filterSearchMinChars ?? 3,
2079
+ distinctValues: Ee(N),
2080
+ initialValue: X[N],
2081
+ onSearch: typeof Ge.onFilterSearch == "function" ? Ge.onFilterSearch : null,
2082
+ searchMinChars: Ge.filterSearchMinChars ?? 3,
2000
2083
  onApply: (e) => {
2001
- Le(A, e), ue(null);
2084
+ M(N, e), ve(null);
2002
2085
  },
2003
- onCancel: () => ue(null)
2086
+ onCancel: () => ve(null)
2004
2087
  },
2005
- A
2088
+ N
2006
2089
  ) : null;
2007
- return /* @__PURE__ */ m("div", { className: "w-full", children: [
2008
- Nt && vt(Nt, document.body),
2009
- l.length > 0 && (H || !ye) && /* @__PURE__ */ s(
2090
+ return /* @__PURE__ */ h("div", { className: "w-full", children: [
2091
+ Ht && Rt(Ht, document.body),
2092
+ l.length > 0 && (L || !ge) && /* @__PURE__ */ s(
2010
2093
  "div",
2011
2094
  {
2012
2095
  className: "pt-2 pb-1",
@@ -2015,7 +2098,7 @@ function rr({
2015
2098
  zIndex: 35,
2016
2099
  backgroundColor: "var(--primary-foreground)"
2017
2100
  },
2018
- children: /* @__PURE__ */ m(
2101
+ children: /* @__PURE__ */ h(
2019
2102
  "div",
2020
2103
  {
2021
2104
  style: {
@@ -2026,23 +2109,24 @@ function rr({
2026
2109
  flexWrap: "wrap"
2027
2110
  },
2028
2111
  children: [
2029
- H && /* @__PURE__ */ s("div", { style: { marginRight: "auto" }, children: /* @__PURE__ */ s(
2030
- Wn,
2112
+ L && /* @__PURE__ */ s("div", { style: { marginRight: "auto" }, children: /* @__PURE__ */ s(
2113
+ Yn,
2031
2114
  {
2032
- dateRangePicker: H.dateRangePicker,
2033
- onWeekToDate: H.onWeekToDate,
2034
- exportConfig: H.exportConfig,
2035
- filterChipsConfig: H.filterChipsConfig,
2036
- trailingActions: H.trailingActions
2115
+ dateRangePicker: L.dateRangePicker,
2116
+ onWeekToDate: L.onWeekToDate,
2117
+ exportConfig: L.exportConfig,
2118
+ filterChipsConfig: L.filterChipsConfig,
2119
+ trailingActions: L.trailingActions
2037
2120
  }
2038
2121
  ) }),
2039
- !ye && /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
2040
- /* @__PURE__ */ m(
2122
+ (L == null ? void 0 : L.rightActions) && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: 12, flexShrink: 0 }, children: L.rightActions }),
2123
+ !ge && /* @__PURE__ */ h("div", { style: { position: "relative" }, children: [
2124
+ /* @__PURE__ */ h(
2041
2125
  "button",
2042
2126
  {
2043
- ref: Me,
2127
+ ref: Te,
2044
2128
  type: "button",
2045
- onClick: () => lt(!le),
2129
+ onClick: () => ht(!ae),
2046
2130
  style: {
2047
2131
  display: "inline-flex",
2048
2132
  alignItems: "center",
@@ -2060,19 +2144,19 @@ function rr({
2060
2144
  whiteSpace: "nowrap"
2061
2145
  },
2062
2146
  children: [
2063
- /* @__PURE__ */ s(kn, { size: 20, strokeWidth: 1.75 }),
2147
+ /* @__PURE__ */ s(Pn, { size: 20, strokeWidth: 1.75 }),
2064
2148
  "Columns"
2065
2149
  ]
2066
2150
  }
2067
2151
  ),
2068
- le && vt(nn, document.body)
2152
+ ae && Rt(xn, document.body)
2069
2153
  ] })
2070
2154
  ]
2071
2155
  }
2072
2156
  )
2073
2157
  }
2074
2158
  ),
2075
- Object.keys(G).length > 0 && /* @__PURE__ */ m(
2159
+ Object.keys(X).length > 0 && /* @__PURE__ */ h(
2076
2160
  "div",
2077
2161
  {
2078
2162
  style: {
@@ -2083,12 +2167,12 @@ function rr({
2083
2167
  padding: "8px 0"
2084
2168
  },
2085
2169
  children: [
2086
- Object.entries(G).map(([e, t]) => {
2087
- const r = l.find((c) => J(c) === e);
2088
- if (!r || !Ue(t))
2170
+ Object.entries(X).map(([e, t]) => {
2171
+ const o = l.find((c) => Q(c) === e);
2172
+ if (!o || !Ye(t))
2089
2173
  return null;
2090
- const i = $n(t), o = Ln(t), u = Pn(t);
2091
- return /* @__PURE__ */ m(
2174
+ const i = Vn(t), n = er(t), u = tr(t);
2175
+ return /* @__PURE__ */ h(
2092
2176
  "span",
2093
2177
  {
2094
2178
  style: {
@@ -2107,20 +2191,20 @@ function rr({
2107
2191
  whiteSpace: "nowrap"
2108
2192
  },
2109
2193
  children: [
2110
- /* @__PURE__ */ m("span", { children: [
2111
- /* @__PURE__ */ m("span", { style: { color: "#676767" }, children: [
2112
- r.label,
2194
+ /* @__PURE__ */ h("span", { children: [
2195
+ /* @__PURE__ */ h("span", { style: { color: "#676767" }, children: [
2196
+ o.label,
2113
2197
  ": "
2114
2198
  ] }),
2115
2199
  /* @__PURE__ */ s("span", { children: i })
2116
2200
  ] }),
2117
- o > 0 && /* @__PURE__ */ s(In, { count: o, values: u }),
2201
+ n > 0 && /* @__PURE__ */ s(nr, { count: n, values: u }),
2118
2202
  /* @__PURE__ */ s(
2119
2203
  "button",
2120
2204
  {
2121
2205
  type: "button",
2122
- onClick: () => Le(e, []),
2123
- "aria-label": `Remove ${r.label} filter`,
2206
+ onClick: () => M(e, []),
2207
+ "aria-label": `Remove ${o.label} filter`,
2124
2208
  style: {
2125
2209
  background: "transparent",
2126
2210
  border: "none",
@@ -2129,7 +2213,7 @@ function rr({
2129
2213
  display: "inline-flex",
2130
2214
  color: "#676767"
2131
2215
  },
2132
- children: /* @__PURE__ */ s(Dn, { size: 14, strokeWidth: 2 })
2216
+ children: /* @__PURE__ */ s(In, { size: 14, strokeWidth: 2 })
2133
2217
  }
2134
2218
  )
2135
2219
  ]
@@ -2141,7 +2225,7 @@ function rr({
2141
2225
  "button",
2142
2226
  {
2143
2227
  type: "button",
2144
- onClick: p,
2228
+ onClick: Se,
2145
2229
  style: {
2146
2230
  marginLeft: "auto",
2147
2231
  background: "transparent",
@@ -2159,15 +2243,15 @@ function rr({
2159
2243
  ]
2160
2244
  }
2161
2245
  ),
2162
- l.length > 0 && Be.length > 0 ? /* @__PURE__ */ m(
2163
- fn,
2246
+ l.length > 0 && Le.length > 0 ? /* @__PURE__ */ h(
2247
+ Rn,
2164
2248
  {
2165
- sensors: Kt,
2166
- collisionDetection: pn,
2167
- onDragStart: Xt,
2168
- onDragEnd: Ut,
2249
+ sensors: nn,
2250
+ collisionDetection: zn,
2251
+ onDragStart: on,
2252
+ onDragEnd: rn,
2169
2253
  children: [
2170
- /* @__PURE__ */ m("div", { style: {
2254
+ /* @__PURE__ */ h("div", { style: {
2171
2255
  borderRadius: 8,
2172
2256
  border: "1px solid #E6E6E6",
2173
2257
  overflow: "hidden",
@@ -2178,9 +2262,9 @@ function rr({
2178
2262
  // collapse to just the header height and the centered overlay/loader
2179
2263
  // would be squeezed into a thin strip. Reserve vertical space so the
2180
2264
  // loader stays properly visible and centered.
2181
- ...N ? { minHeight: 320 } : {}
2265
+ ...$ ? { minHeight: 320 } : {}
2182
2266
  }, children: [
2183
- N && /* @__PURE__ */ s("div", { style: {
2267
+ $ && /* @__PURE__ */ s("div", { style: {
2184
2268
  position: "absolute",
2185
2269
  inset: 0,
2186
2270
  background: "rgba(255, 255, 255, 0.9)",
@@ -2191,7 +2275,7 @@ function rr({
2191
2275
  alignItems: "center",
2192
2276
  justifyContent: "center",
2193
2277
  borderRadius: "14px"
2194
- }, children: /* @__PURE__ */ m("div", { style: {
2278
+ }, children: /* @__PURE__ */ h("div", { style: {
2195
2279
  display: "flex",
2196
2280
  flexDirection: "column",
2197
2281
  alignItems: "center",
@@ -2203,7 +2287,7 @@ function rr({
2203
2287
  margin: 0
2204
2288
  }, children: "Loading..." }),
2205
2289
  /* @__PURE__ */ s(
2206
- Kn,
2290
+ ir,
2207
2291
  {
2208
2292
  src: "/BrandLoading.gif",
2209
2293
  alt: "Loading",
@@ -2214,7 +2298,7 @@ function rr({
2214
2298
  }
2215
2299
  )
2216
2300
  ] }) }),
2217
- /* @__PURE__ */ s("div", { className: "overflow-x-auto custom-thin-scrollbar-hidden", ref: _t, style: { maxHeight: "500px", overflowY: "auto", position: "relative", zIndex: 1 }, children: /* @__PURE__ */ m("table", { style: {
2301
+ /* @__PURE__ */ s("div", { className: "overflow-x-auto custom-thin-scrollbar-hidden", ref: en, style: { maxHeight: "500px", overflowY: "auto", position: "relative", zIndex: 1 }, children: /* @__PURE__ */ h("table", { style: {
2218
2302
  width: "auto",
2219
2303
  minWidth: "100%",
2220
2304
  tableLayout: "fixed",
@@ -2224,18 +2308,48 @@ function rr({
2224
2308
  border: "1px solid #e6e6e6",
2225
2309
  boxSizing: "border-box"
2226
2310
  }, children: [
2227
- /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
2228
- mn,
2229
- {
2230
- items: $,
2231
- strategy: hn,
2232
- children: Be.map((e) => /* @__PURE__ */ s(tn, { column: e, isHeaderRow: !0 }, `header-${J(e)}`))
2233
- }
2234
- ) }) }),
2235
- /* @__PURE__ */ s("tbody", { children: !N && tt.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
2311
+ /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ h("tr", { children: [
2312
+ G && /* @__PURE__ */ s(
2313
+ "th",
2314
+ {
2315
+ style: {
2316
+ width: ut,
2317
+ minWidth: ut,
2318
+ padding: "10px 8px",
2319
+ textAlign: "center",
2320
+ verticalAlign: "middle",
2321
+ background: "#f2f2f0",
2322
+ borderRight: "1px solid #e6e6e6",
2323
+ borderBottom: "1px solid #e6e6e6",
2324
+ position: "sticky",
2325
+ top: 0,
2326
+ zIndex: 10,
2327
+ boxSizing: "border-box"
2328
+ },
2329
+ children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", lineHeight: 0 }, children: /* @__PURE__ */ s(
2330
+ Tt,
2331
+ {
2332
+ checked: dt,
2333
+ indeterminate: sn,
2334
+ onToggle: an,
2335
+ ariaLabel: "Select all rows on this page"
2336
+ }
2337
+ ) })
2338
+ }
2339
+ ),
2340
+ /* @__PURE__ */ s(
2341
+ Bn,
2342
+ {
2343
+ items: _,
2344
+ strategy: En,
2345
+ children: Le.map((e) => /* @__PURE__ */ s(yn, { column: e, isHeaderRow: !0 }, `header-${Q(e)}`))
2346
+ }
2347
+ )
2348
+ ] }) }),
2349
+ /* @__PURE__ */ s("tbody", { children: !$ && $e.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
2236
2350
  "td",
2237
2351
  {
2238
- colSpan: Be.length,
2352
+ colSpan: Le.length + (G ? 1 : 0),
2239
2353
  style: {
2240
2354
  padding: "32px",
2241
2355
  textAlign: "center",
@@ -2245,69 +2359,98 @@ function rr({
2245
2359
  },
2246
2360
  children: "No results found"
2247
2361
  }
2248
- ) }) : !N && tt.length > 0 ? tt.map((e, t) => /* @__PURE__ */ s(
2249
- "tr",
2250
- {
2251
- "data-row-id": e.id || t,
2252
- style: {
2253
- borderBottom: "1px solid #e6e6e6",
2254
- cursor: f ? "pointer" : "default",
2255
- transition: "background 0.15s ease"
2256
- },
2257
- onClick: f ? (r) => {
2258
- r.stopPropagation(), f(e, t);
2259
- } : void 0,
2260
- onMouseEnter: (r) => {
2261
- r.currentTarget.style.background = "#E6E6E6";
2262
- },
2263
- onMouseLeave: (r) => {
2264
- r.currentTarget.style.background = "transparent";
2362
+ ) }) : !$ && $e.length > 0 ? $e.map((e, t) => {
2363
+ const o = vt(e, t), i = G && ke.has(o);
2364
+ return /* @__PURE__ */ h(
2365
+ "tr",
2366
+ {
2367
+ "data-row-id": e.id || t,
2368
+ style: {
2369
+ borderBottom: "1px solid #e6e6e6",
2370
+ cursor: f ? "pointer" : "default",
2371
+ transition: "background 0.15s ease",
2372
+ background: i ? "#F2F4F7" : "transparent"
2373
+ },
2374
+ onClick: f ? (n) => {
2375
+ n.stopPropagation(), f(e, t);
2376
+ } : void 0,
2377
+ onMouseEnter: (n) => {
2378
+ n.currentTarget.style.background = "#E6E6E6";
2379
+ },
2380
+ onMouseLeave: (n) => {
2381
+ n.currentTarget.style.background = i ? "#F2F4F7" : "transparent";
2382
+ },
2383
+ children: [
2384
+ G && /* @__PURE__ */ s(
2385
+ "td",
2386
+ {
2387
+ onClick: (n) => n.stopPropagation(),
2388
+ style: {
2389
+ width: ut,
2390
+ minWidth: ut,
2391
+ padding: "10px 8px",
2392
+ textAlign: "center",
2393
+ verticalAlign: "middle",
2394
+ borderRight: "1px solid #e6e6e6",
2395
+ boxSizing: "border-box"
2396
+ },
2397
+ children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", lineHeight: 0 }, children: /* @__PURE__ */ s(
2398
+ Tt,
2399
+ {
2400
+ checked: i,
2401
+ onToggle: () => ln(o),
2402
+ ariaLabel: "Select row"
2403
+ }
2404
+ ) })
2405
+ }
2406
+ ),
2407
+ Le.map((n) => {
2408
+ const u = Q(n), c = Wt(u, n.width), x = e[u], W = n.render ? n.render(x, e) : x, U = c && c !== "auto", Je = typeof W == "string" && W.trim() !== "", Pe = U && Je, Ie = Pe ? /* @__PURE__ */ s(de, { content: W, children: W }) : W;
2409
+ return /* @__PURE__ */ s(
2410
+ "td",
2411
+ {
2412
+ style: {
2413
+ padding: "10px 14px",
2414
+ color: "rgba(30, 33, 37, 0.78)",
2415
+ fontSize: "13px",
2416
+ borderRight: "1px solid #e6e6e6",
2417
+ boxSizing: "border-box",
2418
+ width: c,
2419
+ fontFamily: "var(--font-sans)",
2420
+ ...Pe && { maxWidth: c || "200px" }
2421
+ },
2422
+ children: Ie
2423
+ },
2424
+ u
2425
+ );
2426
+ })
2427
+ ]
2265
2428
  },
2266
- children: Be.map((r) => {
2267
- const i = J(r), o = Dt(i, r.width), u = e[i], c = r.render ? r.render(u, e) : u, x = o && o !== "auto", j = typeof c == "string" && c.trim() !== "", _ = x && j, Ke = _ ? /* @__PURE__ */ s(oe, { content: c, children: c }) : c;
2268
- return /* @__PURE__ */ s(
2269
- "td",
2270
- {
2271
- style: {
2272
- padding: "10px 14px",
2273
- color: "rgba(30, 33, 37, 0.78)",
2274
- fontSize: "13px",
2275
- borderRight: "1px solid #e6e6e6",
2276
- boxSizing: "border-box",
2277
- width: o,
2278
- fontFamily: "var(--font-sans)",
2279
- ..._ && { maxWidth: o || "200px" }
2280
- },
2281
- children: Ke
2282
- },
2283
- i
2284
- );
2285
- })
2286
- },
2287
- t
2288
- )) : null })
2429
+ t
2430
+ );
2431
+ }) : null })
2289
2432
  ] }) })
2290
2433
  ] }),
2291
- /* @__PURE__ */ s(gn, { children: Mt ? /* @__PURE__ */ s("div", { className: "bg-[var(--paper-high)] border border-[var(--border-strong)] rounded px-4 py-2 shadow-lg", children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
2292
- /* @__PURE__ */ s(yt, { size: 14, className: "text-[var(--text-faint)]" }),
2293
- /* @__PURE__ */ s("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children: Mt.label })
2434
+ /* @__PURE__ */ s(Mn, { children: _t ? /* @__PURE__ */ s("div", { className: "bg-[var(--paper-high)] border border-[var(--border-strong)] rounded px-4 py-2 shadow-lg", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
2435
+ /* @__PURE__ */ s(kt, { size: 14, className: "text-[var(--text-faint)]" }),
2436
+ /* @__PURE__ */ s("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children: _t.label })
2294
2437
  ] }) }) : null })
2295
2438
  ]
2296
2439
  }
2297
2440
  ) : null,
2298
2441
  (() => {
2299
- const e = !K && (Ce.trim() !== "" || Object.values(G).some((r) => Ue(r))), t = Z ? e ? _e.length : S : _e.length;
2442
+ const e = !P && (ne.trim() !== "" || Object.values(X).some((o) => Ye(o))), t = se ? e ? Xe.length : w : Xe.length;
2300
2443
  return t <= 0 ? null : /* @__PURE__ */ s(
2301
- Nn,
2444
+ Jn,
2302
2445
  {
2303
- page: ne,
2446
+ page: Re,
2304
2447
  pageSizeOptions: [5, 10, 20, 50, 100],
2305
- pageSize: ce,
2448
+ pageSize: ye,
2306
2449
  totalCount: t,
2307
- currentDataLength: tt.length,
2308
- onPageChange: ke,
2309
- onPageSizeChange: (r) => {
2310
- We(r), ke(1);
2450
+ currentDataLength: $e.length,
2451
+ onPageChange: ze,
2452
+ onPageSizeChange: (o) => {
2453
+ Ze(o), ze(1);
2311
2454
  },
2312
2455
  showPageSizeSelector: !0
2313
2456
  }
@@ -2316,7 +2459,7 @@ function rr({
2316
2459
  ] });
2317
2460
  }
2318
2461
  export {
2319
- rr as D,
2320
- Wn as a
2462
+ br as D,
2463
+ Yn as a
2321
2464
  };
2322
2465
  //# sourceMappingURL=DataTable2.es.js.map