chordia-ui 4.0.2 → 4.0.3

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,14 +1,14 @@
1
- import { jsxs as m, jsx as s, Fragment as Se } from "react/jsx-runtime";
2
- import ct, { useState as g, useRef as X, useEffect as _, Suspense as on, useMemo as me, useCallback as P, useLayoutEffect as sn } from "react";
3
- import { u as ln, a as Et, D as an, c as cn, S as dn, h as un, b as fn, s as pn, K as mn, P as hn, d as dt, e as gn, C as yn } from "./sortable.esm.es.js";
4
- import { CalendarClock as Nt, Download as xn, ChevronDown as bn, Settings2 as vn, X as Sn, GripVertical as ut, Search as wn, Check as Ve, ArrowUp as Fn, ArrowDown as kn, ArrowUpDown as Dn, ListFilter as Cn } from "lucide-react";
5
- import { createPortal as mt } from "react-dom";
6
- import { C as Rn, P as zn } from "./CustomFilterChips.es.js";
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";
7
7
  import "motion/react";
8
8
  import "recharts";
9
9
  import "./AgentLiftAnalysisCard.es.js";
10
10
  import "./TourGuideTooltip.es.js";
11
- function Bn({
11
+ function Wn({
12
12
  dateRangePicker: n,
13
13
  onWeekToDate: l,
14
14
  exportConfig: d,
@@ -16,10 +16,10 @@ function Bn({
16
16
  trailingActions: S
17
17
  // Optional extra actions rendered after Export (e.g., Add Users button)
18
18
  }) {
19
- const [v, a] = g(!1), b = X(null), E = X(null);
20
- _(() => {
19
+ const [v, a] = g(!1), b = U(null), B = U(null);
20
+ I(() => {
21
21
  const D = (w) => {
22
- E.current && !E.current.contains(w.target) && b.current && !b.current.contains(w.target) && a(!1);
22
+ B.current && !B.current.contains(w.target) && b.current && !b.current.contains(w.target) && a(!1);
23
23
  };
24
24
  if (v)
25
25
  return document.addEventListener("mousedown", D), () => {
@@ -33,7 +33,7 @@ function Bn({
33
33
  }, L = (() => {
34
34
  if (!(f != null && f.filters))
35
35
  return !1;
36
- const D = f.filters, w = f.customFilters || [], N = Object.entries(D).some(([B, M]) => !!(Array.isArray(M) && M.length || typeof M == "string" && M.trim() !== "" || M && typeof M == "object" && (M.min != null || M.max != null))), H = w.some((B) => B.active);
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
37
  return N || H;
38
38
  })();
39
39
  return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 flex-wrap", children: [
@@ -44,16 +44,16 @@ function Bn({
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(Nt, { size: 16 }),
47
+ /* @__PURE__ */ s(Ot, { size: 16 }),
48
48
  /* @__PURE__ */ s("span", { children: "Week to Date" })
49
49
  ]
50
50
  }
51
51
  ),
52
52
  n && /* @__PURE__ */ s(
53
- on,
53
+ cn,
54
54
  {
55
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(Nt, { size: 16 }),
56
+ /* @__PURE__ */ s(Ot, { size: 16 }),
57
57
  /* @__PURE__ */ s("span", { children: "Loading..." })
58
58
  ] }),
59
59
  children: n
@@ -70,17 +70,17 @@ function Bn({
70
70
  style: { fontFamily: "var(--font-sans)" },
71
71
  children: [
72
72
  /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
73
- /* @__PURE__ */ s(xn, { size: 16 }),
73
+ /* @__PURE__ */ s(wn, { size: 16 }),
74
74
  /* @__PURE__ */ s("span", { children: d.isExporting ? "Exporting..." : "Export" })
75
75
  ] }),
76
- /* @__PURE__ */ s(bn, { size: 16 })
76
+ /* @__PURE__ */ s(Fn, { size: 16 })
77
77
  ]
78
78
  }
79
79
  ),
80
80
  v && /* @__PURE__ */ s(
81
81
  "div",
82
82
  {
83
- ref: E,
83
+ ref: B,
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
85
  children: (d.types || ["csv"]).map((D) => /* @__PURE__ */ m(
86
86
  "button",
@@ -98,11 +98,11 @@ function Bn({
98
98
  }
99
99
  )
100
100
  ] }),
101
- (L || S) && /* @__PURE__ */ m(Se, { children: [
101
+ (L || S) && /* @__PURE__ */ m(Fe, { children: [
102
102
  L && /* @__PURE__ */ s("div", { className: "h-9 mt-1 w-px bg-gray-300 flex-shrink-0" }),
103
103
  /* @__PURE__ */ m("div", { className: "flex items-center gap-3 justify-end", children: [
104
104
  L && f && /* @__PURE__ */ s(
105
- Rn,
105
+ Bn,
106
106
  {
107
107
  filters: f.filters,
108
108
  onChange: f.onChange,
@@ -116,13 +116,13 @@ function Bn({
116
116
  ] })
117
117
  ] });
118
118
  }
119
- function ht(n) {
119
+ function St(n) {
120
120
  if (n == null)
121
121
  return NaN;
122
122
  const l = String(n).replace(/[,$%]|pp/gi, "").trim(), d = parseFloat(l);
123
123
  return Number.isFinite(d) ? d : NaN;
124
124
  }
125
- function Mn(n) {
125
+ function An(n) {
126
126
  if (n == null)
127
127
  return NaN;
128
128
  const l = String(n).trim(), d = l.match(/^(\d+):(\d+)(?::(\d+))?$/);
@@ -131,10 +131,10 @@ function Mn(n) {
131
131
  return z != null ? k * 3600 + C * 60 + z : k * 60 + C;
132
132
  }
133
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), E = 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), E && (f += +E[1], S = !0), S ? f : NaN;
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;
136
136
  }
137
- function En(n) {
137
+ function On(n) {
138
138
  if (!n)
139
139
  return null;
140
140
  const l = String(n).trim(), d = l.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/);
@@ -145,22 +145,22 @@ function En(n) {
145
145
  const f = new Date(l);
146
146
  return isNaN(f.getTime()) ? null : f;
147
147
  }
148
- function Nn(n) {
148
+ function Tn(n) {
149
149
  if (!n || n.length === 0)
150
150
  return "text";
151
151
  const l = n.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 je(n) {
154
+ function Ue(n) {
155
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;
156
156
  }
157
- function Wt(n) {
157
+ function Tt(n) {
158
158
  if (n == null || n === "" || isNaN(n))
159
159
  return "";
160
160
  const l = Number(n), d = Math.floor(l / 3600), f = Math.floor(l % 3600 / 60), S = Math.floor(l % 60);
161
161
  return d > 0 ? `${d}h ${f}m` : f > 0 ? `${f}m ${S}s` : `${S}s`;
162
162
  }
163
- function Wn(n) {
163
+ function $n(n) {
164
164
  if (!n)
165
165
  return "";
166
166
  if (Array.isArray(n))
@@ -170,7 +170,7 @@ function Wn(n) {
170
170
  return l != null && d != null ? `${l} – ${d}` : l != null ? `≥ ${l}` : d != null ? `≤ ${d}` : "";
171
171
  }
172
172
  if (n.type === "durationRange") {
173
- const l = n.minSec !== "" && n.minSec != null ? Wt(n.minSec) : null, d = n.maxSec !== "" && n.maxSec != null ? Wt(n.maxSec) : null;
173
+ const l = n.minSec !== "" && n.minSec != null ? Tt(n.minSec) : null, d = n.maxSec !== "" && n.maxSec != null ? Tt(n.maxSec) : null;
174
174
  return l && d ? `${l} – ${d}` : l ? `≥ ${l}` : d ? `≤ ${d}` : "";
175
175
  }
176
176
  if (n.type === "scoreRange") {
@@ -181,10 +181,10 @@ function Wn(n) {
181
181
  }
182
182
  return n.type === "dateRange" ? n.from && n.to ? `${n.from} – ${n.to}` : n.from ? `from ${n.from}` : n.to ? `to ${n.to}` : "" : "";
183
183
  }
184
- function An(n) {
184
+ function Ln(n) {
185
185
  return Array.isArray(n) ? Math.max(0, n.length - 1) : 0;
186
186
  }
187
- function $n(n) {
187
+ function Pn(n) {
188
188
  return Array.isArray(n) ? n.slice(1).map(String).join(", ") : "";
189
189
  }
190
190
  function In({ count: n, values: l }) {
@@ -242,7 +242,7 @@ function In({ count: n, values: l }) {
242
242
  }
243
243
  );
244
244
  }
245
- function On({ leftLabel: n, rightLabel: l, leftValue: d, rightValue: f, onLeftChange: S, onRightChange: v, type: a = "number", placeholderLeft: b = "Min", placeholderRight: E = "Max" }) {
245
+ function jn({ leftLabel: n, rightLabel: l, leftValue: d, rightValue: f, onLeftChange: S, onRightChange: v, type: a = "number", placeholderLeft: b = "Min", placeholderRight: B = "Max" }) {
246
246
  const k = {
247
247
  width: "100%",
248
248
  height: 32,
@@ -278,14 +278,14 @@ function On({ leftLabel: n, rightLabel: l, leftValue: d, rightValue: f, onLeftCh
278
278
  type: a,
279
279
  value: f,
280
280
  onChange: (z) => v(z.target.value),
281
- placeholder: E,
281
+ placeholder: B,
282
282
  style: k
283
283
  }
284
284
  )
285
285
  ] })
286
286
  ] });
287
287
  }
288
- const At = [
288
+ const $t = [
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,7 +293,7 @@ const At = [
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 $t(n) {
296
+ function Lt(n) {
297
297
  if (n == null || n === "")
298
298
  return null;
299
299
  const l = String(n).trim().match(/^(\d{1,3}):(\d{2})$/);
@@ -302,7 +302,7 @@ function $t(n) {
302
302
  const d = Number(n);
303
303
  return Number.isFinite(d) ? d : null;
304
304
  }
305
- function ft({ children: n }) {
305
+ function xt({ children: n }) {
306
306
  return /* @__PURE__ */ s(
307
307
  "div",
308
308
  {
@@ -318,7 +318,7 @@ function ft({ children: n }) {
318
318
  }
319
319
  );
320
320
  }
321
- function pt({
321
+ function bt({
322
322
  minValue: n,
323
323
  maxValue: l,
324
324
  onMinChange: d,
@@ -327,7 +327,7 @@ function pt({
327
327
  inputMode: v = "decimal",
328
328
  step: a,
329
329
  placeholder: b = "0.0",
330
- unit: E
330
+ unit: B
331
331
  }) {
332
332
  const k = {
333
333
  width: "100%",
@@ -375,7 +375,7 @@ function pt({
375
375
  )
376
376
  ] })
377
377
  ] }),
378
- E && /* @__PURE__ */ m(
378
+ B && /* @__PURE__ */ m(
379
379
  "span",
380
380
  {
381
381
  style: {
@@ -385,108 +385,108 @@ function pt({
385
385
  },
386
386
  children: [
387
387
  "Enter durations in ",
388
- E === "sec" ? "seconds" : E
388
+ B === "sec" ? "seconds" : B
389
389
  ]
390
390
  }
391
391
  )
392
392
  ] });
393
393
  }
394
- function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popoverRef: S, distinctValues: v, initialValue: a, onApply: b, onCancel: E, 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 || "")), B = me(() => {
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
396
  if (!N || !Array.isArray(v) || v.length === 0)
397
397
  return !1;
398
398
  let p = 1 / 0, h = -1 / 0;
399
399
  for (const y of v) {
400
- const F = ht(y);
400
+ const F = St(y);
401
401
  Number.isFinite(F) && (F < p && (p = F), F > h && (h = F));
402
402
  }
403
403
  return Number.isFinite(p) && Number.isFinite(h) && p >= 0 && h <= 5;
404
404
  }, [N, v]), [M, ae] = g(
405
405
  () => z ? new Set(Array.isArray(a) ? a : []) : /* @__PURE__ */ new Set()
406
- ), [he, Q] = g(""), [$, 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 : ""), [U, ge] = g(/* @__PURE__ */ new Set()), [V, te] = g(
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
407
  () => w && (a == null ? void 0 : a.type) === "durationRange" && a.minSec != null && a.minSec !== "" ? String(a.minSec) : ""
408
- ), [ye, ne] = g(
408
+ ), [be, ne] = g(
409
409
  () => w && (a == null ? void 0 : a.type) === "durationRange" && a.maxSec != null && a.maxSec !== "" ? String(a.maxSec) : ""
410
- ), [ce, we] = g(
410
+ ), [ce, ke] = g(
411
411
  () => N && (a == null ? void 0 : a.type) === "scoreRange" && Array.isArray(a.values) ? new Set(a.values) : /* @__PURE__ */ new Set()
412
- ), [Be, Y] = g(
412
+ ), [We, Q] = g(
413
413
  () => N && (a == null ? void 0 : a.type) === "scoreRange" && a.min != null && a.min !== "" ? String(a.min) : ""
414
414
  ), [W, se] = g(
415
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 || ""), [J, Fe] = g(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.to || "");
417
- _(() => {
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
418
  z && ae(new Set(Array.isArray(a) ? a : []));
419
419
  }, [l, z]);
420
- const [ke, Me] = g(null), [A, ue] = g(!1), be = X(0), ee = he.trim(), ve = z && typeof k == "function" && ee.length >= C;
421
- _(() => {
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(() => {
422
422
  if (!z || typeof k != "function")
423
423
  return;
424
424
  if (ee.length < C) {
425
- Me(null), ue(!1);
425
+ Ae(null), ue(!1);
426
426
  return;
427
427
  }
428
- const p = ++be.current;
428
+ const p = ++Se.current;
429
429
  ue(!0);
430
430
  const h = setTimeout(async () => {
431
431
  try {
432
432
  const y = await k(ee);
433
- if (p !== be.current)
433
+ if (p !== Se.current)
434
434
  return;
435
- const F = Array.isArray(y) ? y.map((I) => I && typeof I == "object" ? I.label ?? I.value : I).filter((I) => I != null && I !== "").map(String) : [];
436
- Me(F);
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);
437
437
  } catch {
438
- p === be.current && Me([]);
438
+ p === Se.current && Ae([]);
439
439
  } finally {
440
- p === be.current && ue(!1);
440
+ p === Se.current && ue(!1);
441
441
  }
442
442
  }, 300);
443
443
  return () => clearTimeout(h);
444
444
  }, [z, k, ee, C]);
445
- const xe = me(() => {
446
- const p = ee.toLowerCase(), h = ve ? ke || [] : p ? v.filter((F) => String(F).toLowerCase().includes(p)) : v, y = /* @__PURE__ */ new Map();
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
447
  for (const F of h)
448
448
  y.set(String(F), F);
449
449
  for (const F of M)
450
450
  y.set(String(F), F);
451
- return Array.from(y.values()).sort((F, I) => {
452
- const fe = M.has(F), $e = M.has(I);
453
- return fe !== $e ? fe ? -1 : 1 : String(F).localeCompare(String(I));
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));
454
454
  });
455
- }, [v, ee, M, ve, ke]), Ee = (p) => {
455
+ }, [v, ee, M, we, Ce]), Oe = (p) => {
456
456
  ae((h) => {
457
457
  const y = new Set(h);
458
458
  return y.has(p) ? y.delete(p) : y.add(p), y;
459
459
  });
460
- }, et = () => {
461
- z && ae(/* @__PURE__ */ new Set()), L && (oe(""), K("")), w && (ge(/* @__PURE__ */ new Set()), te(""), ne("")), N && (we(/* @__PURE__ */ new Set()), Y(""), se("")), D && (de(""), Fe("")), Q("");
462
- }, Ne = (p) => {
463
- ge((h) => {
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
464
  const y = new Set(h);
465
465
  return y.has(p) ? y.delete(p) : y.add(p), y;
466
466
  });
467
- }, We = (p) => {
468
- we((h) => {
467
+ }, $e = (p) => {
468
+ ke((h) => {
469
469
  const y = new Set(h);
470
470
  return y.has(p) ? y.delete(p) : y.add(p), y;
471
471
  });
472
- }, Ae = () => {
472
+ }, Le = () => {
473
473
  if (z)
474
474
  return b(Array.from(M));
475
475
  if (L)
476
- return b({ type: "range", min: $ === "" ? "" : Number($), max: Z === "" ? "" : Number(Z) });
476
+ return b({ type: "range", min: O === "" ? "" : Number(O), max: Z === "" ? "" : Number(Z) });
477
477
  if (w) {
478
- const p = $t(V), h = $t(ye), y = p != null || h != null;
479
- let F = "", I = "";
478
+ const p = Lt(V), h = Lt(be), y = p != null || h != null;
479
+ let F = "", T = "";
480
480
  if (y)
481
- F = p ?? "", I = h ?? "";
482
- else if (U.size > 0) {
483
- const fe = At.filter((q) => U.has(q.id));
484
- F = Math.min(...fe.map((q) => q.minSec)), I = fe.some((q) => q.maxSec == null) ? "" : Math.max(...fe.map((q) => q.maxSec));
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));
485
485
  }
486
- return b({ type: "durationRange", minSec: F, maxSec: I });
486
+ return b({ type: "durationRange", minSec: F, maxSec: T });
487
487
  }
488
488
  if (N) {
489
- const p = Be === "" ? null : Number(Be), h = W === "" ? null : Number(W);
489
+ const p = We === "" ? null : Number(We), h = W === "" ? null : Number(W);
490
490
  return p != null || h != null ? b({
491
491
  type: "scoreRange",
492
492
  values: [],
@@ -494,13 +494,13 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
494
494
  max: h != null && Number.isFinite(h) ? h : ""
495
495
  }) : b({
496
496
  type: "scoreRange",
497
- values: Array.from(ce).sort((F, I) => F - I),
497
+ values: Array.from(ce).sort((F, T) => F - T),
498
498
  min: "",
499
499
  max: ""
500
500
  });
501
501
  }
502
502
  if (D)
503
- return b({ type: "dateRange", from: re, to: J });
503
+ return b({ type: "dateRange", from: re, to: G });
504
504
  };
505
505
  return /* @__PURE__ */ m(
506
506
  "div",
@@ -525,7 +525,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
525
525
  fontFamily: "var(--font-sans)"
526
526
  },
527
527
  children: [
528
- z && /* @__PURE__ */ m(Se, { children: [
528
+ z && /* @__PURE__ */ m(Fe, { children: [
529
529
  /* @__PURE__ */ s(
530
530
  "div",
531
531
  {
@@ -551,14 +551,14 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
551
551
  padding: "0 8px"
552
552
  },
553
553
  children: [
554
- /* @__PURE__ */ s(wn, { size: 16, color: "#989898", strokeWidth: 2 }),
554
+ /* @__PURE__ */ s(Cn, { size: 16, color: "#989898", strokeWidth: 2 }),
555
555
  /* @__PURE__ */ s(
556
556
  "input",
557
557
  {
558
558
  autoFocus: !0,
559
559
  type: "text",
560
- value: he,
561
- onChange: (p) => Q(p.target.value),
560
+ value: ye,
561
+ onChange: (p) => Y(p.target.value),
562
562
  placeholder: "Search",
563
563
  style: {
564
564
  flex: 1,
@@ -577,7 +577,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
577
577
  )
578
578
  }
579
579
  ),
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…" }) : xe.length === 0 ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "No values" }) : xe.map((p) => {
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
581
  const h = M.has(p);
582
582
  return /* @__PURE__ */ m(
583
583
  "label",
@@ -605,7 +605,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
605
605
  border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
606
606
  flexShrink: 0
607
607
  },
608
- children: h && /* @__PURE__ */ s(Ve, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
608
+ children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
609
609
  }
610
610
  ),
611
611
  /* @__PURE__ */ s(
@@ -613,7 +613,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
613
613
  {
614
614
  type: "checkbox",
615
615
  checked: h,
616
- onChange: () => Ee(p),
616
+ onChange: () => Oe(p),
617
617
  style: { position: "absolute", opacity: 0, pointerEvents: "none" },
618
618
  tabIndex: -1
619
619
  }
@@ -622,7 +622,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
622
622
  "span",
623
623
  {
624
624
  onClick: (y) => {
625
- y.preventDefault(), Ee(p);
625
+ y.preventDefault(), Oe(p);
626
626
  },
627
627
  style: {
628
628
  fontSize: 14,
@@ -642,12 +642,12 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
642
642
  );
643
643
  }) })
644
644
  ] }),
645
- L && /* @__PURE__ */ m(Se, { children: [
646
- /* @__PURE__ */ s(ft, { children: n.label || "Filter" }),
645
+ L && /* @__PURE__ */ m(Fe, { children: [
646
+ /* @__PURE__ */ s(xt, { children: n.label || "Filter" }),
647
647
  /* @__PURE__ */ s(
648
- pt,
648
+ bt,
649
649
  {
650
- minValue: $,
650
+ minValue: O,
651
651
  maxValue: Z,
652
652
  onMinChange: oe,
653
653
  onMaxChange: K,
@@ -656,20 +656,20 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
656
656
  }
657
657
  )
658
658
  ] }),
659
- w && /* @__PURE__ */ m(Se, { children: [
660
- /* @__PURE__ */ s(ft, { children: n.label || "Duration" }),
661
- n.filterShowPresets === !0 && /* @__PURE__ */ m(Se, { children: [
662
- /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: At.map((p) => {
663
- const h = U.has(p.id);
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
664
  return /* @__PURE__ */ m(
665
665
  "div",
666
666
  {
667
667
  role: "checkbox",
668
668
  "aria-checked": h,
669
669
  tabIndex: 0,
670
- onClick: () => Ne(p.id),
670
+ onClick: () => Te(p.id),
671
671
  onKeyDown: (y) => {
672
- (y.key === " " || y.key === "Enter") && (y.preventDefault(), Ne(p.id));
672
+ (y.key === " " || y.key === "Enter") && (y.preventDefault(), Te(p.id));
673
673
  },
674
674
  style: {
675
675
  display: "flex",
@@ -693,7 +693,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
693
693
  border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
694
694
  flexShrink: 0
695
695
  },
696
- children: h && /* @__PURE__ */ s(Ve, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
696
+ children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
697
697
  }
698
698
  ),
699
699
  /* @__PURE__ */ s(
@@ -730,10 +730,10 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
730
730
  )
731
731
  ] }),
732
732
  /* @__PURE__ */ s(
733
- pt,
733
+ bt,
734
734
  {
735
735
  minValue: V,
736
- maxValue: ye,
736
+ maxValue: be,
737
737
  onMinChange: te,
738
738
  onMaxChange: ne,
739
739
  inputType: "number",
@@ -743,9 +743,9 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
743
743
  }
744
744
  )
745
745
  ] }),
746
- N && /* @__PURE__ */ m(Se, { children: [
747
- /* @__PURE__ */ s(ft, { children: n.label || "Score" }),
748
- B && n.filterShowPresets === !0 && /* @__PURE__ */ m(Se, { children: [
746
+ N && /* @__PURE__ */ m(Fe, { children: [
747
+ /* @__PURE__ */ s(xt, { children: n.label || "Score" }),
748
+ E && n.filterShowPresets === !0 && /* @__PURE__ */ m(Fe, { children: [
749
749
  /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [1, 2, 3, 4, 5].map((p) => {
750
750
  const h = ce.has(p);
751
751
  return /* @__PURE__ */ m(
@@ -754,9 +754,9 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
754
754
  role: "checkbox",
755
755
  "aria-checked": h,
756
756
  tabIndex: 0,
757
- onClick: () => We(p),
757
+ onClick: () => $e(p),
758
758
  onKeyDown: (y) => {
759
- (y.key === " " || y.key === "Enter") && (y.preventDefault(), We(p));
759
+ (y.key === " " || y.key === "Enter") && (y.preventDefault(), $e(p));
760
760
  },
761
761
  style: {
762
762
  display: "flex",
@@ -780,7 +780,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
780
780
  border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
781
781
  flexShrink: 0
782
782
  },
783
- children: h && /* @__PURE__ */ s(Ve, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
783
+ children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
784
784
  }
785
785
  ),
786
786
  /* @__PURE__ */ s(
@@ -802,7 +802,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
802
802
  }) }),
803
803
  /* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } })
804
804
  ] }),
805
- B && n.filterShowPresets === !0 && /* @__PURE__ */ s(
805
+ E && n.filterShowPresets === !0 && /* @__PURE__ */ s(
806
806
  "div",
807
807
  {
808
808
  style: {
@@ -817,25 +817,25 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
817
817
  }
818
818
  ),
819
819
  /* @__PURE__ */ s(
820
- pt,
820
+ bt,
821
821
  {
822
- minValue: Be,
822
+ minValue: We,
823
823
  maxValue: W,
824
- onMinChange: Y,
824
+ onMinChange: Q,
825
825
  onMaxChange: se,
826
826
  step: "0.1"
827
827
  }
828
828
  )
829
829
  ] }),
830
830
  D && /* @__PURE__ */ s(
831
- On,
831
+ jn,
832
832
  {
833
833
  leftLabel: "From",
834
834
  rightLabel: "To",
835
835
  leftValue: re,
836
- rightValue: J,
836
+ rightValue: G,
837
837
  onLeftChange: de,
838
- onRightChange: Fe,
838
+ onRightChange: De,
839
839
  type: "date",
840
840
  placeholderLeft: "",
841
841
  placeholderRight: ""
@@ -847,7 +847,7 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
847
847
  "button",
848
848
  {
849
849
  type: "button",
850
- onClick: et,
850
+ onClick: it,
851
851
  style: {
852
852
  background: "transparent",
853
853
  border: "none",
@@ -858,14 +858,14 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
858
858
  color: "#323232",
859
859
  fontFamily: "var(--font-sans)"
860
860
  },
861
- children: w && n.filterShowPresets === !0 || N && B && n.filterShowPresets === !0 ? "View All" : "Reset"
861
+ children: w && n.filterShowPresets === !0 || N && E && n.filterShowPresets === !0 ? "View All" : "Reset"
862
862
  }
863
863
  ),
864
864
  /* @__PURE__ */ s(
865
865
  "button",
866
866
  {
867
867
  type: "button",
868
- onClick: Ae,
868
+ onClick: Le,
869
869
  style: {
870
870
  background: "#0B0B0B",
871
871
  color: "#FFFFFF",
@@ -886,8 +886,8 @@ function Ln({ column: n, columnId: l, filterType: d = "text", position: f, popov
886
886
  }
887
887
  );
888
888
  }
889
- const Pn = () => ({ userData: { email: "anonymous" } }), Tn = (n) => /* @__PURE__ */ s("img", { ...n });
890
- function jn({
889
+ const Hn = () => ({ userData: { email: "anonymous" } }), Kn = (n) => /* @__PURE__ */ s("img", { ...n });
890
+ function Un({
891
891
  children: n,
892
892
  content: l,
893
893
  direction: d = "top",
@@ -895,34 +895,34 @@ function jn({
895
895
  styling: S,
896
896
  indicatorColor: v
897
897
  }) {
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)", [E, k] = g(!1), [C, z] = g(!1), [L, D] = g({ top: 0, left: 0, arrowLeft: 0, placement: "top" }), w = X(null), N = X(null);
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);
899
899
  if (!a)
900
900
  return n;
901
- _(() => {
901
+ I(() => {
902
902
  z(!0);
903
903
  }, []);
904
904
  const H = P(() => {
905
905
  if (!w.current || !N.current || typeof window > "u")
906
906
  return;
907
- const B = w.current.getBoundingClientRect(), M = N.current.getBoundingClientRect(), ae = window.innerWidth, he = window.innerHeight, Q = 8, $ = 10, oe = M.width, Z = M.height, K = B.top, U = he - B.bottom, ge = d === "bottom" ? "bottom" : "top";
908
- let V = ge;
909
- ge === "top" && K < Z + $ + Q && U > K ? V = "bottom" : ge === "bottom" && U < Z + $ + Q && K > U && (V = "top");
910
- let te = B.left + B.width / 2;
911
- f === "start" && (te = B.left), f === "end" && (te = B.right);
912
- let ye = V === "top" ? B.top - Z - $ : B.bottom + $, ne = f === "start" ? te : f === "end" ? te - oe : te - oe / 2;
913
- ye = Math.max(Q, Math.min(ye, he - Z - Q)), ne = Math.max(Q, Math.min(ne, ae - oe - Q));
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
914
  const ce = Math.max(10, Math.min(te - ne, oe - 10));
915
- D({ top: ye, left: ne, arrowLeft: ce, placement: V });
915
+ D({ top: be, left: ne, arrowLeft: ce, placement: V });
916
916
  }, [f, d]);
917
- return _(() => {
918
- if (!E || !C)
917
+ return I(() => {
918
+ if (!B || !C)
919
919
  return;
920
920
  H();
921
- const B = () => H();
922
- return window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), () => {
923
- window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
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);
924
924
  };
925
- }, [E, C, H]), /* @__PURE__ */ m(
925
+ }, [B, C, H]), /* @__PURE__ */ m(
926
926
  "span",
927
927
  {
928
928
  ref: w,
@@ -931,7 +931,7 @@ function jn({
931
931
  onMouseLeave: () => k(!1),
932
932
  children: [
933
933
  n,
934
- E && C && mt(
934
+ B && C && vt(
935
935
  /* @__PURE__ */ m(
936
936
  "span",
937
937
  {
@@ -987,7 +987,7 @@ function jn({
987
987
  }
988
988
  );
989
989
  }
990
- function Vn({
990
+ function rr({
991
991
  data: n = [],
992
992
  columns: l = [],
993
993
  initialPageSize: d = 10,
@@ -1001,7 +1001,7 @@ function Vn({
1001
1001
  // Controlled pageSize (null = use internal state)
1002
1002
  onPageChange: b = null,
1003
1003
  // Callback for page changes (null = use internal state)
1004
- onPageSizeChange: E = null,
1004
+ onPageSizeChange: B = null,
1005
1005
  // Callback for pageSize changes (null = use internal state)
1006
1006
  onFilterChange: k = null,
1007
1007
  // Callback for filter changes (null = use client-side filtering)
@@ -1022,7 +1022,7 @@ function Vn({
1022
1022
  filtersConfig: H = null,
1023
1023
  // Top toolbar filter config (chips/date/export). Note: this is different from `columnFilters` for inline header inputs.
1024
1024
  // Column resize (optional) — min/max in px; columns may override with column.minWidth / column.maxWidth
1025
- columnResizeMinWidth: B = 120,
1025
+ columnResizeMinWidth: E = 120,
1026
1026
  columnResizeMaxWidth: M = 280,
1027
1027
  // Fires whenever the user-visible column set changes. Useful for hosts that
1028
1028
  // want to scope a CSV export, etc., to whatever the user has selected.
@@ -1031,27 +1031,27 @@ function Vn({
1031
1031
  // When true, hides the "Columns" picker button in the toolbar. The
1032
1032
  // surrounding toolbar wrapper is also skipped if no other toolbar content
1033
1033
  // (e.g. `filtersConfig`) is configured.
1034
- hideColumnPicker: he = !1
1034
+ hideColumnPicker: ye = !1
1035
1035
  }) {
1036
- var Mt;
1037
- const { userData: Q } = Pn(), $ = (Q == null ? void 0 : Q.email) || "anonymous", oe = ct.memo(({ children: e, content: t, className: r = "" }) => {
1038
- const i = X(null), [o, u] = g(!1);
1039
- _(() => {
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(() => {
1040
1040
  const x = () => {
1041
1041
  if (i.current) {
1042
- const j = i.current.scrollWidth > i.current.clientWidth;
1043
- u(j);
1042
+ const _ = i.current.scrollWidth > i.current.clientWidth;
1043
+ u(_);
1044
1044
  }
1045
1045
  };
1046
1046
  x();
1047
- const T = setTimeout(x, 0);
1047
+ const j = setTimeout(x, 0);
1048
1048
  return window.addEventListener("resize", x), () => {
1049
- clearTimeout(T), window.removeEventListener("resize", x);
1049
+ clearTimeout(j), window.removeEventListener("resize", x);
1050
1050
  };
1051
1051
  }, [e, t]);
1052
1052
  const c = /* @__PURE__ */ s("span", { className: `truncate block ${r}`, ref: i, children: e });
1053
1053
  return o && t ? /* @__PURE__ */ s(
1054
- jn,
1054
+ Un,
1055
1055
  {
1056
1056
  content: t,
1057
1057
  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",
@@ -1062,11 +1062,11 @@ function Vn({
1062
1062
  ) : c;
1063
1063
  });
1064
1064
  oe.displayName = "TruncatedCell";
1065
- const Z = S !== null && b !== null, K = k !== null, U = L !== null, [ge, V] = g(1), [te, ye] = g(d), ne = v !== null ? v : ge, ce = a !== null ? a : te, we = (e) => {
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
1066
  b ? b(e) : V(e);
1067
- }, Be = (e) => {
1068
- E ? E(e) : ye(e);
1069
- }, Y = 50, W = "action", se = X(!1), re = me(() => w ? `dataTable_columns_${w}:${$}` : `dataTable_columns_${l.map((t) => t.id || t.key).sort().join("_")}:${$}`, [w, l, $]), de = me(() => w ? `dataTable_manual_change_${w}:${$}` : null, [w, $]);
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
1070
  P((e, t) => {
1071
1071
  if (typeof window > "u" || !e || !t || t.length === 0)
1072
1072
  return null;
@@ -1084,16 +1084,16 @@ function Vn({
1084
1084
  }
1085
1085
  return null;
1086
1086
  }, []);
1087
- const [J, Fe] = g({}), [ke, Me] = g(""), [A, ue] = g(null), [be, ee] = g({ top: 0, left: 0 }), ve = X(null), xe = X({}), [Ee, et] = g(null), [Ne, We] = g("asc"), Ae = P((e, t) => {
1088
- const r = je(t);
1089
- Fe((i) => {
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
1090
  const o = { ...i };
1091
1091
  return r ? o[e] = t : delete o[e], o;
1092
1092
  }), b ? b(1) : V(1), K && k && k(
1093
- r ? { ...J, [e]: t } : Object.fromEntries(Object.entries(J).filter(([i]) => i !== e))
1093
+ r ? { ...G, [e]: t } : Object.fromEntries(Object.entries(G).filter(([i]) => i !== e))
1094
1094
  );
1095
- }, [J, k, K, b]), p = P(() => {
1096
- Fe({}), Me(""), b ? b(1) : V(1), K && k && k({});
1095
+ }, [G, k, K, b]), p = P(() => {
1096
+ De({}), Ae(""), b ? b(1) : V(1), K && k && k({});
1097
1097
  }, [k, K, b]), h = P((e) => {
1098
1098
  const t = l.find((o) => (o.id || o.key) === e);
1099
1099
  if (t && Array.isArray(t.filterOptions)) {
@@ -1118,13 +1118,13 @@ function Vn({
1118
1118
  }
1119
1119
  return i.sort((o, u) => o.localeCompare(u));
1120
1120
  }, [n, l]), y = P((e) => {
1121
- const t = l.find((r) => G(r) === e);
1122
- return t && t.filterType ? t.filterType : Nn(h(e));
1121
+ const t = l.find((r) => J(r) === e);
1122
+ return t && t.filterType ? t.filterType : Tn(h(e));
1123
1123
  }, [l, h]), F = P((e) => {
1124
1124
  const i = typeof window < "u" ? window.innerWidth : 1 / 0;
1125
1125
  let o = e.left;
1126
1126
  return o + 280 > i - 8 && (o = Math.max(8, e.right - 280)), { top: e.bottom + 6, left: o };
1127
- }, []), I = P((e, t) => {
1127
+ }, []), T = P((e, t) => {
1128
1128
  if (!t) {
1129
1129
  ue(e);
1130
1130
  return;
@@ -1132,23 +1132,23 @@ function Vn({
1132
1132
  const r = t.getBoundingClientRect();
1133
1133
  ee(F(r)), ue((i) => i === e ? null : e);
1134
1134
  }, [F]);
1135
- _(() => {
1135
+ I(() => {
1136
1136
  if (!A)
1137
1137
  return;
1138
1138
  const e = (t) => {
1139
- if (ve.current && ve.current.contains(t.target))
1139
+ if (we.current && we.current.contains(t.target))
1140
1140
  return;
1141
- const r = xe.current[A];
1142
- r && r.contains(t.target) || Object.values(xe.current).some(
1141
+ const r = ve.current[A];
1142
+ r && r.contains(t.target) || Object.values(ve.current).some(
1143
1143
  (o) => o && o.contains(t.target)
1144
1144
  ) || ue(null);
1145
1145
  };
1146
1146
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1147
- }, [A]), _(() => {
1147
+ }, [A]), I(() => {
1148
1148
  if (!A)
1149
1149
  return;
1150
1150
  const e = () => {
1151
- const t = xe.current[A];
1151
+ const t = ve.current[A];
1152
1152
  if (!t)
1153
1153
  return;
1154
1154
  const r = t.getBoundingClientRect();
@@ -1157,44 +1157,44 @@ function Vn({
1157
1157
  return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
1158
1158
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
1159
1159
  };
1160
- }, [A, F]), sn(() => {
1160
+ }, [A, F]), dn(() => {
1161
1161
  if (!A)
1162
1162
  return;
1163
- const e = ve.current, t = xe.current[A];
1163
+ const e = we.current, t = ve.current[A];
1164
1164
  if (!e || !t)
1165
1165
  return;
1166
1166
  const r = e.offsetWidth, i = t.getBoundingClientRect(), o = 8, u = typeof window < "u" ? window.innerWidth : 1 / 0;
1167
1167
  if (!(i.left + r > u - o))
1168
1168
  return;
1169
1169
  const x = Math.max(o, i.right - r);
1170
- ee((T) => T.left === x ? T : { ...T, left: x });
1171
- }, [A, be.top]);
1170
+ ee((j) => j.left === x ? j : { ...j, left: x });
1171
+ }, [A, Se.top]);
1172
1172
  const fe = P((e) => !e || typeof e != "object" ? {} : Object.fromEntries(
1173
1173
  Object.entries(e).filter(([, t]) => t == null ? !1 : typeof t == "string" ? t.trim() !== "" : !0)
1174
- ), []), $e = P((e, t) => {
1174
+ ), []), Pe = P((e, t) => {
1175
1175
  const r = Object.keys(e || {}), i = Object.keys(t || {});
1176
1176
  return r.length !== i.length ? !1 : r.every((o) => e[o] === t[o]);
1177
1177
  }, []);
1178
- _(() => {
1178
+ I(() => {
1179
1179
  if (!K || C === null)
1180
1180
  return;
1181
1181
  const e = fe(C);
1182
- Fe((t) => $e(t, e) ? t : e);
1183
- }, [K, C, fe, $e]), P((e, t) => e === "csat_score" && t === "evaluation.csat_score" ? t : e, []);
1184
- const q = U && D.length > 0 ? D[0][0] : Ee, _e = U && D.length > 0 ? D[0][1] : Ne, [_n, gt] = g(
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(
1185
1185
  () => l.map((e) => e.id || e.key)
1186
1186
  ), ie = P((e) => {
1187
1187
  if (!e || e.length === 0)
1188
1188
  return e;
1189
1189
  let t = Array.from(new Set(e));
1190
- t.length > Y && (t = t.slice(0, Y));
1190
+ t.length > Q && (t = t.slice(0, Q));
1191
1191
  const i = l.map((c) => c.id || c.key).includes(W);
1192
- return !t.includes(W) && i && (t.length >= Y ? t = [...t.slice(0, Y - 1), W] : t = [...t, W]), [...t.filter((c) => c !== W), W];
1193
- }, [l]), [O, Ie] = g(() => {
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
1194
  if (typeof window < "u" && w)
1195
1195
  try {
1196
- if (localStorage.getItem(`dataTable_manual_change_${w}:${$}`) === "true") {
1197
- const i = localStorage.getItem(`dataTable_columns_${w}:${$}`);
1196
+ if (localStorage.getItem(`dataTable_manual_change_${w}:${O}`) === "true") {
1197
+ const i = localStorage.getItem(`dataTable_columns_${w}:${O}`);
1198
1198
  if (i) {
1199
1199
  const o = JSON.parse(i);
1200
1200
  if (Array.isArray(o) && o.length > 0) {
@@ -1203,18 +1203,18 @@ function Vn({
1203
1203
  (c) => l.some((x) => (x.id || x.key) === c)
1204
1204
  );
1205
1205
  if (u.length > 0)
1206
- return u.slice(0, Y);
1206
+ return u.slice(0, Q);
1207
1207
  }
1208
1208
  }
1209
1209
  }
1210
1210
  } catch (r) {
1211
1211
  console.warn("Failed to load saved columns from localStorage:", r);
1212
1212
  }
1213
- const t = l.map((r) => r.id || r.key).slice(0, Y);
1213
+ const t = l.map((r) => r.id || r.key).slice(0, Q);
1214
1214
  return ie(t);
1215
- }), [le, tt] = g(!1), [De, He] = g([]), [yt, It] = g({ top: 0, left: 0, width: 0 }), [xt, bt] = g(/* @__PURE__ */ new Set()), [vt, St] = g(/* @__PURE__ */ new Set()), Ke = X(null);
1216
- Ke.current === null && (Ke.current = [...O]);
1217
- const [pe, nt] = g(null), [Ot, Xe] = g(null), Ce = X(null), rt = X(null), ot = X(null), [wt, st] = g(null), [it, Lt] = g({}), Pt = X(null), Ue = X(null), G = (e) => e.id || e.key, Je = P((e) => {
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) => {
1218
1218
  if (typeof e == "number" && Number.isFinite(e))
1219
1219
  return e;
1220
1220
  if (typeof e == "string") {
@@ -1227,53 +1227,53 @@ function Vn({
1227
1227
  return Number.isFinite(r) && `${r}` === t ? r : null;
1228
1228
  }
1229
1229
  return null;
1230
- }, []), Ft = P((e, t) => it[e] != null ? `${it[e]}px` : typeof t == "number" ? `${t}px` : t || "auto", [it]), Ge = P((e) => {
1231
- if (!Ue.current)
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)
1232
1232
  return;
1233
- const { columnId: t, startX: r, startWidth: i, minWidth: o, maxWidth: u } = Ue.current, c = e.clientX - r, x = Math.round(i + c), T = Math.min(u, Math.max(o, x));
1234
- Lt((j) => ({ ...j, [t]: T }));
1235
- }, []), Oe = P(() => {
1236
- Ue.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", Ge), document.removeEventListener("mouseup", Oe);
1237
- }, [Ge]), Tt = P((e, t, r) => {
1238
- var qe;
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;
1239
1239
  e.preventDefault(), e.stopPropagation();
1240
- const i = t.id || t.key, o = Je(t.minWidth) ?? B, u = Je(t.maxWidth) ?? M, c = Math.min(o, u), x = Math.max(o, u), T = ((qe = e.currentTarget.closest("th")) == null ? void 0 : qe.getBoundingClientRect().width) || 0, j = Je(r), Te = j ?? Math.max(c, Math.round(T) || c), lt = Math.min(x, Math.max(c, Te));
1241
- Ue.current = { columnId: i, startX: e.clientX, startWidth: lt, minWidth: c, maxWidth: x }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", Ge), document.addEventListener("mouseup", Oe);
1242
- }, [M, B, Ge, Oe, Je]);
1243
- _(() => () => Oe(), [Oe]);
1244
- const jt = ln(
1245
- Et(hn),
1246
- Et(mn, {
1247
- coordinateGetter: pn
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
1248
1248
  })
1249
- ), _t = (e) => {
1249
+ ), Ut = (e) => {
1250
1250
  const { active: t, over: r } = e;
1251
1251
  if (r && t.id !== r.id) {
1252
1252
  if (t.id === W || r.id === W) {
1253
- Dt("Cannot drop columns on the Action column"), st(null);
1253
+ Rt("Cannot drop columns on the Action column"), ut(null);
1254
1254
  return;
1255
1255
  }
1256
1256
  se.current = !0, Ie((i) => {
1257
1257
  const o = i.indexOf(t.id), u = i.indexOf(r.id);
1258
1258
  if (o !== -1 && u !== -1) {
1259
- const c = dt(i, o, u), x = ie(c);
1260
- return Ct(x), x;
1259
+ const c = gt(i, o, u), x = ie(c);
1260
+ return zt(x), x;
1261
1261
  }
1262
1262
  return i;
1263
- }), gt((i) => {
1263
+ }), wt((i) => {
1264
1264
  const o = i.indexOf(t.id), u = i.indexOf(r.id);
1265
- return dt(i, o, u);
1265
+ return gt(i, o, u);
1266
1266
  });
1267
1267
  }
1268
- st(null);
1269
- }, Ht = (e) => {
1270
- st(e.active.id);
1271
- }, Qe = me(() => {
1268
+ ut(null);
1269
+ }, Xt = (e) => {
1270
+ ut(e.active.id);
1271
+ }, et = ge(() => {
1272
1272
  if (K)
1273
1273
  return n || [];
1274
1274
  if (!n || n.length === 0)
1275
1275
  return [];
1276
- const e = ke.trim().toLowerCase(), t = Object.entries(J).filter(([, r]) => je(r));
1276
+ const e = Ce.trim().toLowerCase(), t = Object.entries(G).filter(([, r]) => Ue(r));
1277
1277
  return n.filter((r) => {
1278
1278
  for (const [i, o] of t) {
1279
1279
  const u = r[i];
@@ -1286,19 +1286,19 @@ function Vn({
1286
1286
  continue;
1287
1287
  }
1288
1288
  if (o.type === "range") {
1289
- const c = ht(u);
1289
+ const c = St(u);
1290
1290
  if (isNaN(c) || o.min !== "" && o.min != null && c < Number(o.min) || o.max !== "" && o.max != null && c > Number(o.max))
1291
1291
  return !1;
1292
1292
  continue;
1293
1293
  }
1294
1294
  if (o.type === "durationRange") {
1295
- const c = Mn(u);
1295
+ const c = An(u);
1296
1296
  if (isNaN(c) || o.minSec !== "" && o.minSec != null && c < Number(o.minSec) || o.maxSec !== "" && o.maxSec != null && c > Number(o.maxSec))
1297
1297
  return !1;
1298
1298
  continue;
1299
1299
  }
1300
1300
  if (o.type === "scoreRange") {
1301
- const c = ht(u);
1301
+ const c = St(u);
1302
1302
  if (isNaN(c))
1303
1303
  return !1;
1304
1304
  if (Array.isArray(o.values) && o.values.length > 0) {
@@ -1312,7 +1312,7 @@ function Vn({
1312
1312
  continue;
1313
1313
  }
1314
1314
  if (o.type === "dateRange") {
1315
- const c = En(u);
1315
+ const c = On(u);
1316
1316
  if (!c)
1317
1317
  return !1;
1318
1318
  if (o.from) {
@@ -1330,78 +1330,117 @@ function Vn({
1330
1330
  }
1331
1331
  return !(e && !Object.values(r).some((o) => o == null ? !1 : String(o).toLowerCase().includes(e)));
1332
1332
  });
1333
- }, [n, J, ke, K]), Le = me(() => U || !q ? Qe : [...Qe].sort((e, t) => {
1333
+ }, [n, G, Ce, K]), _e = ge(() => X || !q ? et : [...et].sort((e, t) => {
1334
1334
  const r = e[q], i = t[q];
1335
1335
  if (r == null)
1336
1336
  return 1;
1337
1337
  if (i == null)
1338
1338
  return -1;
1339
1339
  if (typeof r == "number" && typeof i == "number")
1340
- return _e === "asc" ? r - i : i - r;
1340
+ return Xe === "asc" ? r - i : i - r;
1341
1341
  const o = String(r).toLowerCase(), u = String(i).toLowerCase();
1342
- return _e === "asc" ? o.localeCompare(u) : u.localeCompare(o);
1343
- }), [Qe, q, _e, U]), Ye = me(() => {
1342
+ return Xe === "asc" ? o.localeCompare(u) : u.localeCompare(o);
1343
+ }), [et, q, Xe, X]), tt = ge(() => {
1344
1344
  if (Z)
1345
- return Le;
1345
+ return _e;
1346
1346
  {
1347
1347
  const e = (ne - 1) * ce, t = e + ce;
1348
- return Le.slice(e, t);
1348
+ return _e.slice(e, t);
1349
1349
  }
1350
- }, [Le, ne, ce, Z]), kt = (e) => {
1351
- U && L ? (L(e), b ? b(1) : V(1)) : (Ee === e ? We(Ne === "asc" ? "desc" : "asc") : (et(e), We("asc")), we(1));
1352
- }, Kt = (e, t) => {
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
1353
  const r = (t || "").split(/\s+/).map((i) => i.trim()).filter(Boolean);
1354
- Ae(e, r);
1355
- }, Dt = (e) => {
1356
- ot.current || (typeof z == "function" && z(e), ot.current = setTimeout(() => {
1357
- ot.current = null;
1354
+ Le(e, r);
1355
+ }, Rt = (e) => {
1356
+ dt.current || (typeof z == "function" && z(e), dt.current = setTimeout(() => {
1357
+ dt.current = null;
1358
1358
  }, 3e3));
1359
- }, Ct = P((e) => {
1359
+ }, zt = P((e) => {
1360
1360
  if (typeof window < "u" && re && e.length > 0 && se.current)
1361
1361
  try {
1362
1362
  localStorage.setItem(re, JSON.stringify(e)), de && localStorage.setItem(de, "true");
1363
1363
  } catch (t) {
1364
1364
  console.warn("Failed to save columns to localStorage:", t);
1365
1365
  }
1366
- }, [re, de]), Xt = (e) => {
1367
- e !== W && He((t) => t.includes(e) ? t.length === 1 ? t : t.filter((r) => r !== e) : t.length >= Y ? (Dt("Maximum 9 column selection allowed"), t) : ie([...t, e]));
1368
- }, Ut = (e, t) => {
1369
- De[t] !== W && nt(t);
1366
+ }, [re, de]), Et = 250, nt = () => {
1367
+ Object.values(me.current).forEach((e) => clearTimeout(e)), me.current = {};
1370
1368
  }, Jt = () => {
1371
- nt(null), Xe(null);
1372
- }, Gt = (e, t) => {
1373
- e.preventDefault(), pe !== null && pe !== t && Xe(t);
1374
- }, Qt = () => {
1375
- Xe(null);
1376
- }, Yt = (e, t) => {
1377
- e.preventDefault(), pe !== null && pe !== t && De[t] !== W && De[pe] !== W && He((r) => {
1378
- const i = dt(r, pe, t);
1369
+ const e = pe.filter((t) => !Je.has(t));
1370
+ return Ge.forEach((t) => {
1371
+ e.includes(t) || e.push(t);
1372
+ }), ie(e);
1373
+ }, Yt = (e) => {
1374
+ if (e === W)
1375
+ return;
1376
+ if (me.current[e]) {
1377
+ clearTimeout(me.current[e]), delete me.current[e], ze((r) => {
1378
+ const i = new Set(r);
1379
+ return i.delete(e), i;
1380
+ }), Ee((r) => {
1381
+ const i = new Set(r);
1382
+ return i.delete(e), i;
1383
+ });
1384
+ return;
1385
+ }
1386
+ if (pe.includes(e)) {
1387
+ if (pe.length - Je.size <= 1)
1388
+ 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);
1395
+ } else {
1396
+ if (pe.length + Ge.size >= Q) {
1397
+ Rt("Maximum 9 column selection allowed");
1398
+ return;
1399
+ }
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);
1406
+ }
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);
1379
1418
  return ie(i);
1380
- }), nt(null), Xe(null);
1419
+ }), at(null), Qe(null);
1381
1420
  };
1382
- _(() => {
1383
- gt((e) => {
1384
- const t = O.filter((o) => e.includes(o)), r = O.filter((o) => !e.includes(o)), i = e.filter((o) => !O.includes(o));
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));
1385
1424
  return [...t, ...r, ...i];
1386
1425
  });
1387
- }, [O]), _(() => {
1388
- if (typeof window < "u" && re && O.length > 0 && se.current)
1426
+ }, [$]), I(() => {
1427
+ if (typeof window < "u" && re && $.length > 0 && se.current)
1389
1428
  try {
1390
- const e = ie(O);
1429
+ const e = ie($);
1391
1430
  localStorage.setItem(re, JSON.stringify(e)), de && localStorage.setItem(de, "true");
1392
1431
  } catch (e) {
1393
1432
  console.warn("Failed to save columns to localStorage:", e);
1394
1433
  }
1395
- }, [O, re, de]), _(() => {
1434
+ }, [$, re, de]), I(() => {
1396
1435
  ae && ae(
1397
- O.filter((e) => e !== W)
1436
+ $.filter((e) => e !== W)
1398
1437
  );
1399
- }, [O, ae]), _(() => {
1400
- if (l.length > 0 && O.length === 0) {
1438
+ }, [$, ae]), I(() => {
1439
+ if (l.length > 0 && $.length === 0) {
1401
1440
  if (typeof window < "u" && w)
1402
1441
  try {
1403
- if (localStorage.getItem(`dataTable_manual_change_${w}:${$}`) === "true") {
1404
- const r = localStorage.getItem(`dataTable_columns_${w}:${$}`);
1442
+ if (localStorage.getItem(`dataTable_manual_change_${w}:${O}`) === "true") {
1443
+ const r = localStorage.getItem(`dataTable_columns_${w}:${O}`);
1405
1444
  if (r) {
1406
1445
  const i = JSON.parse(r);
1407
1446
  if (Array.isArray(i) && i.length > 0) {
@@ -1409,7 +1448,7 @@ function Vn({
1409
1448
  (u) => l.some((c) => (c.id || c.key) === u)
1410
1449
  );
1411
1450
  if (o.length > 0) {
1412
- se.current = !0, Ie(o.slice(0, Y));
1451
+ se.current = !0, Ie(o.slice(0, Q));
1413
1452
  return;
1414
1453
  }
1415
1454
  }
@@ -1419,20 +1458,20 @@ function Vn({
1419
1458
  console.warn("Failed to load saved columns from localStorage:", t);
1420
1459
  }
1421
1460
  const e = l.map((t) => t.id || t.key);
1422
- Ie(ie(e.slice(0, Y)));
1461
+ Ie(ie(e.slice(0, Q)));
1423
1462
  }
1424
- }, [l, w, $, ie]);
1425
- const Re = me(() => {
1426
- const e = O.map((t) => l.find((r) => G(r) === t)).filter(Boolean);
1427
- return ie(e.map(G)).map((t) => l.find((r) => G(r) === t)).filter(Boolean);
1428
- }, [l, O]);
1429
- me(() => Re.some((e) => e.filterable === !0), [Re]), _(() => {
1430
- if (!le || !Ce.current)
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)
1431
1470
  return;
1432
1471
  const e = () => {
1433
- if (Ce.current) {
1434
- const t = Ce.current.getBoundingClientRect(), r = 217, i = Math.max(8, t.right - r);
1435
- It({
1472
+ if (Me.current) {
1473
+ const t = Me.current.getBoundingClientRect(), r = 217, i = Math.max(8, t.right - r);
1474
+ Pt({
1436
1475
  top: t.bottom,
1437
1476
  left: i,
1438
1477
  width: Math.max(t.width || 220, 220)
@@ -1442,39 +1481,39 @@ function Vn({
1442
1481
  return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
1443
1482
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
1444
1483
  };
1445
- }, [le]), _(() => {
1484
+ }, [le]), I(() => {
1446
1485
  const e = (t) => {
1447
- le && Ce.current && !Ce.current.contains(t.target) && rt.current && !rt.current.contains(t.target) && tt(!1);
1486
+ le && Me.current && !Me.current.contains(t.target) && ct.current && !ct.current.contains(t.target) && lt(!1);
1448
1487
  };
1449
1488
  if (le)
1450
1489
  return document.addEventListener("mousedown", e), () => {
1451
1490
  document.removeEventListener("mousedown", e);
1452
1491
  };
1453
- }, [le]), _(() => {
1454
- le && (He(O), bt(/* @__PURE__ */ new Set()), St(/* @__PURE__ */ new Set()));
1455
- }, [le, O]), O.length === 1 ? (Mt = l.find((e) => (e.id || e.key) === O[0])) != null && Mt.label : `${O.length}`;
1456
- function qt({ column: e, isHeaderRow: t = !0 }) {
1457
- const r = G(e), i = r === W, o = Ft(r, e.width), [u, c] = g(!1), {
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), {
1458
1497
  attributes: x,
1459
- listeners: T,
1460
- setNodeRef: j,
1461
- transform: Te,
1462
- transition: lt,
1463
- isDragging: qe
1464
- } = gn({ id: r }), Vt = {
1465
- transform: yn.Transform.toString(Te),
1466
- transition: lt,
1467
- opacity: qe ? 0.5 : 1,
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,
1468
1507
  width: o,
1469
1508
  minWidth: o
1470
1509
  };
1471
- let ze = !1;
1472
- if (U && D.length > 0) {
1510
+ let Ne = !1;
1511
+ if (X && D.length > 0) {
1473
1512
  const R = D[0][0];
1474
- (R === r || R === "csat_score" && r === "evaluation.csat_score") && (ze = !0);
1513
+ (R === r || R === "csat_score" && r === "evaluation.csat_score") && (Ne = !0);
1475
1514
  } else
1476
- ze = q === r;
1477
- const en = _e === "asc", tn = e.filterable === !0;
1515
+ Ne = q === r;
1516
+ const on = Xe === "asc", sn = e.filterable === !0;
1478
1517
  if (!t)
1479
1518
  return /* @__PURE__ */ s(
1480
1519
  "th",
@@ -1488,7 +1527,7 @@ function Vn({
1488
1527
  boxSizing: "border-box"
1489
1528
  },
1490
1529
  className: "sticky top-[57px] z-10 border-b border-[var(--border-strong)] px-4 py-2 text-left",
1491
- children: tn ? /* @__PURE__ */ m("div", { className: "relative", children: [
1530
+ children: sn ? /* @__PURE__ */ m("div", { className: "relative", children: [
1492
1531
  /* @__PURE__ */ s(
1493
1532
  Filter,
1494
1533
  {
@@ -1501,9 +1540,9 @@ function Vn({
1501
1540
  {
1502
1541
  type: "text",
1503
1542
  placeholder: "Filter...",
1504
- value: J[r] || "",
1543
+ value: G[r] || "",
1505
1544
  onChange: (R) => {
1506
- R.stopPropagation(), Kt(r, R.target.value);
1545
+ R.stopPropagation(), Gt(r, R.target.value);
1507
1546
  },
1508
1547
  onKeyDown: (R) => R.stopPropagation(),
1509
1548
  onMouseDown: (R) => R.stopPropagation(),
@@ -1515,15 +1554,15 @@ function Vn({
1515
1554
  ] }) : /* @__PURE__ */ s("div", { className: "h-[34px]" })
1516
1555
  }
1517
1556
  );
1518
- const at = A === r, Ze = je(J[r]), nn = e.sortable !== !1 && (u || ze), rn = e.filterable !== !1 && !i && (u || at || Ze);
1557
+ const mt = A === r, ot = Ue(G[r]), ln = e.sortable !== !1 && (u || Ne), an = e.filterable !== !1 && !i && (u || mt || ot);
1519
1558
  return /* @__PURE__ */ m(
1520
1559
  "th",
1521
1560
  {
1522
- ref: j,
1561
+ ref: _,
1523
1562
  onMouseEnter: () => c(!0),
1524
1563
  onMouseLeave: () => c(!1),
1525
1564
  style: {
1526
- ...Vt,
1565
+ ...rn,
1527
1566
  padding: "0 12px",
1528
1567
  height: 36,
1529
1568
  textAlign: i ? "center" : "left",
@@ -1542,7 +1581,7 @@ function Vn({
1542
1581
  wordBreak: "normal",
1543
1582
  overflowWrap: "normal",
1544
1583
  verticalAlign: "middle",
1545
- background: u || at ? "#e6e6e6" : "#f2f2f0",
1584
+ background: u || mt ? "#e6e6e6" : "#f2f2f0",
1546
1585
  borderBottom: "1px solid #e6e6e6",
1547
1586
  position: "sticky",
1548
1587
  top: 0,
@@ -1587,7 +1626,7 @@ function Vn({
1587
1626
  "div",
1588
1627
  {
1589
1628
  ...x,
1590
- ...T,
1629
+ ...j,
1591
1630
  style: {
1592
1631
  cursor: "grab",
1593
1632
  color: "rgba(11, 11, 11, 0.36)",
@@ -1596,13 +1635,13 @@ function Vn({
1596
1635
  visibility: u ? "visible" : "hidden",
1597
1636
  flexShrink: 0
1598
1637
  },
1599
- children: /* @__PURE__ */ s(ut, { size: 14 })
1638
+ children: /* @__PURE__ */ s(yt, { size: 14 })
1600
1639
  }
1601
1640
  ),
1602
1641
  /* @__PURE__ */ s(
1603
1642
  "span",
1604
1643
  {
1605
- onClick: () => e.sortable !== !1 && kt(r),
1644
+ onClick: () => e.sortable !== !1 && Ct(r),
1606
1645
  title: typeof e.label == "string" ? e.label : void 0,
1607
1646
  style: {
1608
1647
  cursor: e.sortable !== !1 ? "pointer" : "default",
@@ -1616,12 +1655,12 @@ function Vn({
1616
1655
  children: e.label
1617
1656
  }
1618
1657
  ),
1619
- nn && /* @__PURE__ */ s(
1658
+ ln && /* @__PURE__ */ s(
1620
1659
  "button",
1621
1660
  {
1622
1661
  type: "button",
1623
1662
  onClick: (R) => {
1624
- R.stopPropagation(), kt(r);
1663
+ R.stopPropagation(), Ct(r);
1625
1664
  },
1626
1665
  title: "Sort",
1627
1666
  style: {
@@ -1633,26 +1672,26 @@ function Vn({
1633
1672
  display: "inline-flex",
1634
1673
  alignItems: "center",
1635
1674
  justifyContent: "center",
1636
- color: ze ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
1675
+ color: Ne ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
1637
1676
  flexShrink: 0
1638
1677
  },
1639
- children: ze ? en ? /* @__PURE__ */ s(Fn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(kn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(Dn, { size: 14, strokeWidth: 1.75 })
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 })
1640
1679
  }
1641
1680
  ),
1642
- rn && /* @__PURE__ */ m(
1681
+ an && /* @__PURE__ */ m(
1643
1682
  "button",
1644
1683
  {
1645
1684
  type: "button",
1646
1685
  ref: (R) => {
1647
- xe.current[r] = R;
1686
+ ve.current[r] = R;
1648
1687
  },
1649
1688
  onClick: (R) => {
1650
- R.stopPropagation(), I(r, R.currentTarget);
1689
+ R.stopPropagation(), T(r, R.currentTarget);
1651
1690
  },
1652
1691
  title: "Filter",
1653
1692
  style: {
1654
1693
  position: "relative",
1655
- background: at || Ze ? "#D8D8D8" : "transparent",
1694
+ background: mt || ot ? "#D8D8D8" : "transparent",
1656
1695
  border: "none",
1657
1696
  padding: 4,
1658
1697
  borderRadius: 4,
@@ -1660,12 +1699,12 @@ function Vn({
1660
1699
  display: "inline-flex",
1661
1700
  alignItems: "center",
1662
1701
  justifyContent: "center",
1663
- color: Ze ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
1702
+ color: ot ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
1664
1703
  flexShrink: 0
1665
1704
  },
1666
1705
  children: [
1667
- /* @__PURE__ */ s(Cn, { size: 14, strokeWidth: 1.75 }),
1668
- Ze && /* @__PURE__ */ s(
1706
+ /* @__PURE__ */ s(Mn, { size: 14, strokeWidth: 1.75 }),
1707
+ ot && /* @__PURE__ */ s(
1669
1708
  "span",
1670
1709
  {
1671
1710
  "aria-hidden": "true",
@@ -1710,7 +1749,7 @@ function Vn({
1710
1749
  "aria-orientation": "vertical",
1711
1750
  "aria-label": `Resize ${e.label || r} column`,
1712
1751
  title: "Drag to resize column",
1713
- onMouseDown: (R) => Tt(R, e, o),
1752
+ onMouseDown: (R) => Ht(R, e, o),
1714
1753
  onClick: (R) => R.stopPropagation(),
1715
1754
  onMouseEnter: (R) => {
1716
1755
  R.currentTarget.style.background = "rgba(30, 33, 37, 0.18)";
@@ -1734,21 +1773,21 @@ function Vn({
1734
1773
  }
1735
1774
  );
1736
1775
  }
1737
- const Rt = wt ? l.find((e) => G(e) === wt) : null, zt = ({ col: e, columnId: t, isSelected: r, draggable: i, isAction: o, actualIndex: u }) => {
1738
- const c = i && pe === u, x = i && Ot === u && pe !== null && pe !== u;
1739
- r ? vt.has(t) : xt.has(t);
1740
- const T = r ? !vt.has(t) : xt.has(t);
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);
1741
1780
  return /* @__PURE__ */ m(
1742
1781
  "div",
1743
1782
  {
1744
1783
  draggable: i,
1745
- onDragStart: i ? (j) => Ut(j, u) : void 0,
1746
- onDragEnd: i ? Jt : void 0,
1747
- onDragOver: i ? (j) => Gt(j, u) : void 0,
1748
- onDragLeave: i ? Qt : void 0,
1749
- onDrop: i ? (j) => Yt(j, u) : void 0,
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,
1750
1789
  onClick: () => {
1751
- o || Xt(t);
1790
+ o || Yt(t);
1752
1791
  },
1753
1792
  style: {
1754
1793
  display: "flex",
@@ -1774,7 +1813,7 @@ function Vn({
1774
1813
  visibility: i ? "visible" : "hidden",
1775
1814
  flexShrink: 0
1776
1815
  },
1777
- children: /* @__PURE__ */ s(ut, { size: 14, strokeWidth: 1.75 })
1816
+ children: /* @__PURE__ */ s(yt, { size: 14, strokeWidth: 1.75 })
1778
1817
  }
1779
1818
  ),
1780
1819
  /* @__PURE__ */ s(
@@ -1787,12 +1826,12 @@ function Vn({
1787
1826
  display: "inline-flex",
1788
1827
  alignItems: "center",
1789
1828
  justifyContent: "center",
1790
- background: T ? "#0B0B0B" : "#FFFFFF",
1791
- border: `1px solid ${T ? "#0B0B0B" : "#676767"}`,
1829
+ background: j ? "#0B0B0B" : "#FFFFFF",
1830
+ border: `1px solid ${j ? "#0B0B0B" : "#676767"}`,
1792
1831
  flexShrink: 0,
1793
1832
  marginLeft: 8
1794
1833
  },
1795
- children: T && /* @__PURE__ */ s(Ve, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
1834
+ children: j && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
1796
1835
  }
1797
1836
  ),
1798
1837
  /* @__PURE__ */ s(
@@ -1812,14 +1851,14 @@ function Vn({
1812
1851
  ]
1813
1852
  }
1814
1853
  );
1815
- }, Zt = le ? /* @__PURE__ */ m(
1854
+ }, nn = le ? /* @__PURE__ */ m(
1816
1855
  "div",
1817
1856
  {
1818
- ref: rt,
1857
+ ref: ct,
1819
1858
  style: {
1820
1859
  position: "fixed",
1821
- top: `${yt.top}px`,
1822
- left: `${yt.left}px`,
1860
+ top: `${Ft.top}px`,
1861
+ left: `${Ft.left}px`,
1823
1862
  width: 217,
1824
1863
  maxHeight: 320,
1825
1864
  zIndex: 49,
@@ -1846,11 +1885,11 @@ function Vn({
1846
1885
  gap: 12
1847
1886
  },
1848
1887
  children: [
1849
- De.map((e, t) => {
1888
+ pe.map((e, t) => {
1850
1889
  if (e === W)
1851
1890
  return null;
1852
- const r = l.find((i) => G(i) === e);
1853
- return r ? /* @__PURE__ */ s(ct.Fragment, { children: zt({
1891
+ const r = l.find((i) => J(i) === e);
1892
+ return r ? /* @__PURE__ */ s(ht.Fragment, { children: Bt({
1854
1893
  col: r,
1855
1894
  columnId: e,
1856
1895
  isSelected: !0,
@@ -1860,11 +1899,11 @@ function Vn({
1860
1899
  }) }, `selected-${e}-${t}`) : null;
1861
1900
  }),
1862
1901
  l.filter((e) => {
1863
- const t = G(e);
1864
- return t !== W && !De.includes(t);
1902
+ const t = J(e);
1903
+ return t !== W && !pe.includes(t);
1865
1904
  }).map((e) => {
1866
- const t = G(e);
1867
- return /* @__PURE__ */ s(ct.Fragment, { children: zt({
1905
+ const t = J(e);
1906
+ return /* @__PURE__ */ s(ht.Fragment, { children: Bt({
1868
1907
  col: e,
1869
1908
  columnId: t,
1870
1909
  isSelected: !1,
@@ -1897,8 +1936,8 @@ function Vn({
1897
1936
  type: "button",
1898
1937
  onClick: (e) => {
1899
1938
  e.preventDefault(), e.stopPropagation();
1900
- const t = Ke.current ? [...Ke.current] : l.map(G).slice(0, Y), r = ie(t);
1901
- if (se.current = !1, He(r), Ie(r), bt(/* @__PURE__ */ new Set()), St(/* @__PURE__ */ new Set()), typeof window < "u" && re)
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)
1902
1941
  try {
1903
1942
  localStorage.removeItem(re);
1904
1943
  } catch {
@@ -1922,9 +1961,9 @@ function Vn({
1922
1961
  {
1923
1962
  type: "button",
1924
1963
  onClick: (e) => {
1925
- e.preventDefault(), e.stopPropagation();
1926
- const t = ie(De);
1927
- se.current = !0, Ie(t), Ct(t), tt(!1);
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);
1928
1967
  },
1929
1968
  style: {
1930
1969
  background: "#2E3236",
@@ -1946,28 +1985,28 @@ function Vn({
1946
1985
  )
1947
1986
  ]
1948
1987
  }
1949
- ) : null, Pe = A ? l.find((e) => G(e) === A) : null, Bt = Pe ? /* @__PURE__ */ s(
1950
- Ln,
1988
+ ) : null, He = A ? l.find((e) => J(e) === A) : null, Nt = He ? /* @__PURE__ */ s(
1989
+ _n,
1951
1990
  {
1952
- column: Pe,
1991
+ column: He,
1953
1992
  columnId: A,
1954
1993
  filterType: y(A),
1955
- position: be,
1956
- popoverRef: ve,
1994
+ position: Se,
1995
+ popoverRef: we,
1957
1996
  distinctValues: h(A),
1958
- initialValue: J[A],
1959
- onSearch: typeof Pe.onFilterSearch == "function" ? Pe.onFilterSearch : null,
1960
- searchMinChars: Pe.filterSearchMinChars ?? 3,
1997
+ initialValue: G[A],
1998
+ onSearch: typeof He.onFilterSearch == "function" ? He.onFilterSearch : null,
1999
+ searchMinChars: He.filterSearchMinChars ?? 3,
1961
2000
  onApply: (e) => {
1962
- Ae(A, e), ue(null);
2001
+ Le(A, e), ue(null);
1963
2002
  },
1964
2003
  onCancel: () => ue(null)
1965
2004
  },
1966
2005
  A
1967
2006
  ) : null;
1968
2007
  return /* @__PURE__ */ m("div", { className: "w-full", children: [
1969
- Bt && mt(Bt, document.body),
1970
- l.length > 0 && (H || !he) && /* @__PURE__ */ s(
2008
+ Nt && vt(Nt, document.body),
2009
+ l.length > 0 && (H || !ye) && /* @__PURE__ */ s(
1971
2010
  "div",
1972
2011
  {
1973
2012
  className: "pt-2 pb-1",
@@ -1988,7 +2027,7 @@ function Vn({
1988
2027
  },
1989
2028
  children: [
1990
2029
  H && /* @__PURE__ */ s("div", { style: { marginRight: "auto" }, children: /* @__PURE__ */ s(
1991
- Bn,
2030
+ Wn,
1992
2031
  {
1993
2032
  dateRangePicker: H.dateRangePicker,
1994
2033
  onWeekToDate: H.onWeekToDate,
@@ -1997,13 +2036,13 @@ function Vn({
1997
2036
  trailingActions: H.trailingActions
1998
2037
  }
1999
2038
  ) }),
2000
- !he && /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
2039
+ !ye && /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
2001
2040
  /* @__PURE__ */ m(
2002
2041
  "button",
2003
2042
  {
2004
- ref: Ce,
2043
+ ref: Me,
2005
2044
  type: "button",
2006
- onClick: () => tt(!le),
2045
+ onClick: () => lt(!le),
2007
2046
  style: {
2008
2047
  display: "inline-flex",
2009
2048
  alignItems: "center",
@@ -2021,19 +2060,19 @@ function Vn({
2021
2060
  whiteSpace: "nowrap"
2022
2061
  },
2023
2062
  children: [
2024
- /* @__PURE__ */ s(vn, { size: 20, strokeWidth: 1.75 }),
2063
+ /* @__PURE__ */ s(kn, { size: 20, strokeWidth: 1.75 }),
2025
2064
  "Columns"
2026
2065
  ]
2027
2066
  }
2028
2067
  ),
2029
- le && mt(Zt, document.body)
2068
+ le && vt(nn, document.body)
2030
2069
  ] })
2031
2070
  ]
2032
2071
  }
2033
2072
  )
2034
2073
  }
2035
2074
  ),
2036
- Object.keys(J).length > 0 && /* @__PURE__ */ m(
2075
+ Object.keys(G).length > 0 && /* @__PURE__ */ m(
2037
2076
  "div",
2038
2077
  {
2039
2078
  style: {
@@ -2044,11 +2083,11 @@ function Vn({
2044
2083
  padding: "8px 0"
2045
2084
  },
2046
2085
  children: [
2047
- Object.entries(J).map(([e, t]) => {
2048
- const r = l.find((c) => G(c) === e);
2049
- if (!r || !je(t))
2086
+ Object.entries(G).map(([e, t]) => {
2087
+ const r = l.find((c) => J(c) === e);
2088
+ if (!r || !Ue(t))
2050
2089
  return null;
2051
- const i = Wn(t), o = An(t), u = $n(t);
2090
+ const i = $n(t), o = Ln(t), u = Pn(t);
2052
2091
  return /* @__PURE__ */ m(
2053
2092
  "span",
2054
2093
  {
@@ -2080,7 +2119,7 @@ function Vn({
2080
2119
  "button",
2081
2120
  {
2082
2121
  type: "button",
2083
- onClick: () => Ae(e, []),
2122
+ onClick: () => Le(e, []),
2084
2123
  "aria-label": `Remove ${r.label} filter`,
2085
2124
  style: {
2086
2125
  background: "transparent",
@@ -2090,7 +2129,7 @@ function Vn({
2090
2129
  display: "inline-flex",
2091
2130
  color: "#676767"
2092
2131
  },
2093
- children: /* @__PURE__ */ s(Sn, { size: 14, strokeWidth: 2 })
2132
+ children: /* @__PURE__ */ s(Dn, { size: 14, strokeWidth: 2 })
2094
2133
  }
2095
2134
  )
2096
2135
  ]
@@ -2120,13 +2159,13 @@ function Vn({
2120
2159
  ]
2121
2160
  }
2122
2161
  ),
2123
- l.length > 0 && Re.length > 0 ? /* @__PURE__ */ m(
2124
- an,
2162
+ l.length > 0 && Be.length > 0 ? /* @__PURE__ */ m(
2163
+ fn,
2125
2164
  {
2126
- sensors: jt,
2127
- collisionDetection: cn,
2128
- onDragStart: Ht,
2129
- onDragEnd: _t,
2165
+ sensors: Kt,
2166
+ collisionDetection: pn,
2167
+ onDragStart: Xt,
2168
+ onDragEnd: Ut,
2130
2169
  children: [
2131
2170
  /* @__PURE__ */ m("div", { style: {
2132
2171
  borderRadius: 8,
@@ -2164,7 +2203,7 @@ function Vn({
2164
2203
  margin: 0
2165
2204
  }, children: "Loading..." }),
2166
2205
  /* @__PURE__ */ s(
2167
- Tn,
2206
+ Kn,
2168
2207
  {
2169
2208
  src: "/BrandLoading.gif",
2170
2209
  alt: "Loading",
@@ -2175,7 +2214,7 @@ function Vn({
2175
2214
  }
2176
2215
  )
2177
2216
  ] }) }),
2178
- /* @__PURE__ */ s("div", { className: "overflow-x-auto custom-thin-scrollbar-hidden", ref: Pt, style: { maxHeight: "500px", overflowY: "auto", position: "relative", zIndex: 1 }, children: /* @__PURE__ */ m("table", { style: {
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: {
2179
2218
  width: "auto",
2180
2219
  minWidth: "100%",
2181
2220
  tableLayout: "fixed",
@@ -2186,17 +2225,17 @@ function Vn({
2186
2225
  boxSizing: "border-box"
2187
2226
  }, children: [
2188
2227
  /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
2189
- dn,
2228
+ mn,
2190
2229
  {
2191
- items: O,
2192
- strategy: un,
2193
- children: Re.map((e) => /* @__PURE__ */ s(qt, { column: e, isHeaderRow: !0 }, `header-${G(e)}`))
2230
+ items: $,
2231
+ strategy: hn,
2232
+ children: Be.map((e) => /* @__PURE__ */ s(tn, { column: e, isHeaderRow: !0 }, `header-${J(e)}`))
2194
2233
  }
2195
2234
  ) }) }),
2196
- /* @__PURE__ */ s("tbody", { children: !N && Ye.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
2235
+ /* @__PURE__ */ s("tbody", { children: !N && tt.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
2197
2236
  "td",
2198
2237
  {
2199
- colSpan: Re.length,
2238
+ colSpan: Be.length,
2200
2239
  style: {
2201
2240
  padding: "32px",
2202
2241
  textAlign: "center",
@@ -2206,7 +2245,7 @@ function Vn({
2206
2245
  },
2207
2246
  children: "No results found"
2208
2247
  }
2209
- ) }) : !N && Ye.length > 0 ? Ye.map((e, t) => /* @__PURE__ */ s(
2248
+ ) }) : !N && tt.length > 0 ? tt.map((e, t) => /* @__PURE__ */ s(
2210
2249
  "tr",
2211
2250
  {
2212
2251
  "data-row-id": e.id || t,
@@ -2224,8 +2263,8 @@ function Vn({
2224
2263
  onMouseLeave: (r) => {
2225
2264
  r.currentTarget.style.background = "transparent";
2226
2265
  },
2227
- children: Re.map((r) => {
2228
- const i = G(r), o = Ft(i, r.width), u = e[i], c = r.render ? r.render(u, e) : u, x = o && o !== "auto", T = typeof c == "string" && c.trim() !== "", j = x && T, Te = j ? /* @__PURE__ */ s(oe, { content: c, children: c }) : c;
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;
2229
2268
  return /* @__PURE__ */ s(
2230
2269
  "td",
2231
2270
  {
@@ -2237,9 +2276,9 @@ function Vn({
2237
2276
  boxSizing: "border-box",
2238
2277
  width: o,
2239
2278
  fontFamily: "var(--font-sans)",
2240
- ...j && { maxWidth: o || "200px" }
2279
+ ..._ && { maxWidth: o || "200px" }
2241
2280
  },
2242
- children: Te
2281
+ children: Ke
2243
2282
  },
2244
2283
  i
2245
2284
  );
@@ -2249,26 +2288,26 @@ function Vn({
2249
2288
  )) : null })
2250
2289
  ] }) })
2251
2290
  ] }),
2252
- /* @__PURE__ */ s(fn, { children: Rt ? /* @__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: [
2253
- /* @__PURE__ */ s(ut, { size: 14, className: "text-[var(--text-faint)]" }),
2254
- /* @__PURE__ */ s("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children: Rt.label })
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 })
2255
2294
  ] }) }) : null })
2256
2295
  ]
2257
2296
  }
2258
2297
  ) : null,
2259
2298
  (() => {
2260
- const e = !K && (ke.trim() !== "" || Object.values(J).some((r) => je(r))), t = Z ? e ? Le.length : S : Le.length;
2299
+ const e = !K && (Ce.trim() !== "" || Object.values(G).some((r) => Ue(r))), t = Z ? e ? _e.length : S : _e.length;
2261
2300
  return t <= 0 ? null : /* @__PURE__ */ s(
2262
- zn,
2301
+ Nn,
2263
2302
  {
2264
2303
  page: ne,
2265
2304
  pageSizeOptions: [5, 10, 20, 50, 100],
2266
2305
  pageSize: ce,
2267
2306
  totalCount: t,
2268
- currentDataLength: Ye.length,
2269
- onPageChange: we,
2307
+ currentDataLength: tt.length,
2308
+ onPageChange: ke,
2270
2309
  onPageSizeChange: (r) => {
2271
- Be(r), we(1);
2310
+ We(r), ke(1);
2272
2311
  },
2273
2312
  showPageSizeSelector: !0
2274
2313
  }
@@ -2277,7 +2316,7 @@ function Vn({
2277
2316
  ] });
2278
2317
  }
2279
2318
  export {
2280
- Vn as D,
2281
- Bn as a
2319
+ rr as D,
2320
+ Wn as a
2282
2321
  };
2283
2322
  //# sourceMappingURL=DataTable2.es.js.map