@pravinrd/awesome-grid 0.2.8 → 0.2.10

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.
package/dist-lib/index.js CHANGED
@@ -1,67 +1,67 @@
1
- import It, { useRef as Z, useState as v, useDeferredValue as $t, useTransition as Ft, useMemo as H, useEffect as B, useCallback as we, useLayoutEffect as pt } from "react";
2
- const Wt = "_container_dihwe_1", zt = "_themeLight_dihwe_10", Gt = "_themeDark_dihwe_29", Ut = "_themePurple_dihwe_48", Vt = "_headerRow_dihwe_67", Ht = "_flexRow_dihwe_76", Yt = "_toolbarGroup_dihwe_82", qt = "_dropdown_dihwe_86", Xt = "_buttonBase_dihwe_90", Jt = "_buttonPrimary_dihwe_101", Kt = "_buttonDanger_dihwe_111", Zt = "_buttonMuted_dihwe_121", Qt = "_dropdownToggle_dihwe_142", er = "_dropdownMenu_dihwe_147", tr = "_dropdownMenuOpen_dihwe_163", rr = "_menuItemButton_dihwe_167", nr = "_labelMuted_dihwe_185", or = "_selectSmall_dihwe_190", ar = "_selectAuto_dihwe_199", sr = "_switchRow_dihwe_203", lr = "_groupingSummary_dihwe_210", ir = "_relative_dihwe_217", cr = "_overlay_dihwe_221", ur = "_overlayInner_dihwe_229", dr = "_spinner_dihwe_236", hr = "_tableWrap_dihwe_252", pr = "_tableWrapAll_dihwe_256", mr = "_table_dihwe_252", fr = "_tableHead_dihwe_278", gr = "_thCellTop_dihwe_282", wr = "_thCellFilter_dihwe_290", yr = "_thInner_dihwe_297", br = "_resizeHandle_dihwe_303", _r = "_sortButton_dihwe_328", xr = "_iconMuted_dihwe_338", vr = "_inlineGroup_dihwe_342", kr = "_input_dihwe_350", jr = "_rowInteractive_dihwe_362", Nr = "_groupRow_dihwe_375", Sr = "_groupRowAnimated_dihwe_382", Cr = "_groupChildRow_dihwe_386", Rr = "_groupToggle_dihwe_390", Er = "_groupMeta_dihwe_430", Tr = "_checkbox_dihwe_438", Ar = "_tfoot_dihwe_447", Or = "_textCenter_dihwe_455", Dr = "_paginationWrap_dihwe_459", Mr = "_pagination_dihwe_459", Pr = "_pageButton_dihwe_473", Lr = "_pageButtonActive_dihwe_488", Br = "_backdrop_dihwe_494", Ir = "_drawer_dihwe_500", $r = "_drawerTitle_dihwe_515", Fr = "_drawerSection_dihwe_521", Wr = "_drawerSubtitle_dihwe_527", zr = "_sectionToggle_dihwe_534", Gr = "_sectionBody_dihwe_547", Ur = "_drawerRow_dihwe_551", Vr = "_spacerAuto_dihwe_558", Hr = "_srOnly_dihwe_570", a = {
3
- container: Wt,
4
- themeLight: zt,
5
- themeDark: Gt,
1
+ import $t, { useRef as Q, useState as x, useDeferredValue as Wt, useTransition as Ft, useMemo as Y, useEffect as L, useCallback as ye, useLayoutEffect as pt } from "react";
2
+ const zt = "_container_dihwe_1", Gt = "_themeLight_dihwe_10", Vt = "_themeDark_dihwe_29", Ut = "_themePurple_dihwe_48", Ht = "_headerRow_dihwe_67", Yt = "_flexRow_dihwe_76", qt = "_toolbarGroup_dihwe_82", Jt = "_dropdown_dihwe_86", Xt = "_buttonBase_dihwe_90", Kt = "_buttonPrimary_dihwe_101", Zt = "_buttonDanger_dihwe_111", Qt = "_buttonMuted_dihwe_121", er = "_dropdownToggle_dihwe_142", tr = "_dropdownMenu_dihwe_147", rr = "_dropdownMenuOpen_dihwe_163", nr = "_menuItemButton_dihwe_167", or = "_labelMuted_dihwe_185", sr = "_selectSmall_dihwe_190", ar = "_selectAuto_dihwe_199", lr = "_switchRow_dihwe_203", ir = "_groupingSummary_dihwe_210", cr = "_relative_dihwe_217", ur = "_overlay_dihwe_221", dr = "_overlayInner_dihwe_229", hr = "_spinner_dihwe_236", pr = "_tableWrap_dihwe_252", mr = "_tableWrapAll_dihwe_256", fr = "_table_dihwe_252", gr = "_tableHead_dihwe_278", wr = "_thCellTop_dihwe_282", yr = "_thCellFilter_dihwe_290", br = "_thInner_dihwe_297", _r = "_resizeHandle_dihwe_303", vr = "_sortButton_dihwe_328", xr = "_iconMuted_dihwe_338", kr = "_inlineGroup_dihwe_342", jr = "_input_dihwe_350", Nr = "_rowInteractive_dihwe_362", Cr = "_groupRow_dihwe_375", Sr = "_groupRowAnimated_dihwe_382", Rr = "_groupChildRow_dihwe_386", Tr = "_groupToggle_dihwe_390", Er = "_groupMeta_dihwe_430", Or = "_checkbox_dihwe_438", Ar = "_tfoot_dihwe_447", Dr = "_textCenter_dihwe_455", Mr = "_paginationWrap_dihwe_459", Pr = "_pagination_dihwe_459", Br = "_pageButton_dihwe_473", Lr = "_pageButtonActive_dihwe_488", Ir = "_backdrop_dihwe_494", $r = "_drawer_dihwe_500", Wr = "_drawerTitle_dihwe_515", Fr = "_drawerSection_dihwe_521", zr = "_drawerSubtitle_dihwe_527", Gr = "_sectionToggle_dihwe_534", Vr = "_sectionBody_dihwe_547", Ur = "_drawerRow_dihwe_551", Hr = "_spacerAuto_dihwe_558", Yr = "_srOnly_dihwe_570", s = {
3
+ container: zt,
4
+ themeLight: Gt,
5
+ themeDark: Vt,
6
6
  themePurple: Ut,
7
- headerRow: Vt,
8
- flexRow: Ht,
9
- toolbarGroup: Yt,
10
- dropdown: qt,
7
+ headerRow: Ht,
8
+ flexRow: Yt,
9
+ toolbarGroup: qt,
10
+ dropdown: Jt,
11
11
  buttonBase: Xt,
12
- buttonPrimary: Jt,
13
- buttonDanger: Kt,
14
- buttonMuted: Zt,
15
- dropdownToggle: Qt,
16
- dropdownMenu: er,
17
- dropdownMenuOpen: tr,
18
- menuItemButton: rr,
19
- labelMuted: nr,
20
- selectSmall: or,
12
+ buttonPrimary: Kt,
13
+ buttonDanger: Zt,
14
+ buttonMuted: Qt,
15
+ dropdownToggle: er,
16
+ dropdownMenu: tr,
17
+ dropdownMenuOpen: rr,
18
+ menuItemButton: nr,
19
+ labelMuted: or,
20
+ selectSmall: sr,
21
21
  selectAuto: ar,
22
- switchRow: sr,
23
- groupingSummary: lr,
24
- relative: ir,
25
- overlay: cr,
26
- overlayInner: ur,
27
- spinner: dr,
28
- tableWrap: hr,
29
- tableWrapAll: pr,
30
- table: mr,
31
- tableHead: fr,
32
- thCellTop: gr,
33
- thCellFilter: wr,
34
- thInner: yr,
35
- resizeHandle: br,
36
- sortButton: _r,
22
+ switchRow: lr,
23
+ groupingSummary: ir,
24
+ relative: cr,
25
+ overlay: ur,
26
+ overlayInner: dr,
27
+ spinner: hr,
28
+ tableWrap: pr,
29
+ tableWrapAll: mr,
30
+ table: fr,
31
+ tableHead: gr,
32
+ thCellTop: wr,
33
+ thCellFilter: yr,
34
+ thInner: br,
35
+ resizeHandle: _r,
36
+ sortButton: vr,
37
37
  iconMuted: xr,
38
- inlineGroup: vr,
39
- input: kr,
40
- rowInteractive: jr,
41
- groupRow: Nr,
38
+ inlineGroup: kr,
39
+ input: jr,
40
+ rowInteractive: Nr,
41
+ groupRow: Cr,
42
42
  groupRowAnimated: Sr,
43
- groupChildRow: Cr,
44
- groupToggle: Rr,
43
+ groupChildRow: Rr,
44
+ groupToggle: Tr,
45
45
  groupMeta: Er,
46
- checkbox: Tr,
46
+ checkbox: Or,
47
47
  tfoot: Ar,
48
- textCenter: Or,
49
- paginationWrap: Dr,
50
- pagination: Mr,
51
- pageButton: Pr,
48
+ textCenter: Dr,
49
+ paginationWrap: Mr,
50
+ pagination: Pr,
51
+ pageButton: Br,
52
52
  pageButtonActive: Lr,
53
- backdrop: Br,
54
- drawer: Ir,
55
- drawerTitle: $r,
53
+ backdrop: Ir,
54
+ drawer: $r,
55
+ drawerTitle: Wr,
56
56
  drawerSection: Fr,
57
- drawerSubtitle: Wr,
58
- sectionToggle: zr,
59
- sectionBody: Gr,
57
+ drawerSubtitle: zr,
58
+ sectionToggle: Gr,
59
+ sectionBody: Vr,
60
60
  drawerRow: Ur,
61
- spacerAuto: Vr,
62
- srOnly: Hr
61
+ spacerAuto: Hr,
62
+ srOnly: Yr
63
63
  };
64
- var We = { exports: {} }, Te = {};
64
+ var Fe = { exports: {} }, Oe = {};
65
65
  /**
66
66
  * @license React
67
67
  * react-jsx-runtime.production.js
@@ -72,26 +72,26 @@ var We = { exports: {} }, Te = {};
72
72
  * LICENSE file in the root directory of this source tree.
73
73
  */
74
74
  var mt;
75
- function Yr() {
76
- if (mt) return Te;
75
+ function qr() {
76
+ if (mt) return Oe;
77
77
  mt = 1;
78
- var p = Symbol.for("react.transitional.element"), w = Symbol.for("react.fragment");
79
- function d(k, j, S) {
80
- var C = null;
81
- if (S !== void 0 && (C = "" + S), j.key !== void 0 && (C = "" + j.key), "key" in j) {
82
- S = {};
78
+ var m = Symbol.for("react.transitional.element"), w = Symbol.for("react.fragment");
79
+ function p(k, j, C) {
80
+ var S = null;
81
+ if (C !== void 0 && (S = "" + C), j.key !== void 0 && (S = "" + j.key), "key" in j) {
82
+ C = {};
83
83
  for (var I in j)
84
- I !== "key" && (S[I] = j[I]);
85
- } else S = j;
86
- return j = S.ref, {
87
- $$typeof: p,
84
+ I !== "key" && (C[I] = j[I]);
85
+ } else C = j;
86
+ return j = C.ref, {
87
+ $$typeof: m,
88
88
  type: k,
89
- key: C,
89
+ key: S,
90
90
  ref: j !== void 0 ? j : null,
91
- props: S
91
+ props: C
92
92
  };
93
93
  }
94
- return Te.Fragment = w, Te.jsx = d, Te.jsxs = d, Te;
94
+ return Oe.Fragment = w, Oe.jsx = p, Oe.jsxs = p, Oe;
95
95
  }
96
96
  var Ae = {};
97
97
  /**
@@ -104,166 +104,166 @@ var Ae = {};
104
104
  * LICENSE file in the root directory of this source tree.
105
105
  */
106
106
  var ft;
107
- function qr() {
107
+ function Jr() {
108
108
  return ft || (ft = 1, process.env.NODE_ENV !== "production" && (function() {
109
- function p(n) {
110
- if (n == null) return null;
111
- if (typeof n == "function")
112
- return n.$$typeof === je ? null : n.displayName || n.name || null;
113
- if (typeof n == "string") return n;
114
- switch (n) {
109
+ function m(o) {
110
+ if (o == null) return null;
111
+ if (typeof o == "function")
112
+ return o.$$typeof === Ne ? null : o.displayName || o.name || null;
113
+ if (typeof o == "string") return o;
114
+ switch (o) {
115
115
  case xe:
116
116
  return "Fragment";
117
- case Ue:
117
+ case Ve:
118
118
  return "Profiler";
119
- case le:
119
+ case ie:
120
120
  return "StrictMode";
121
- case te:
121
+ case re:
122
122
  return "Suspense";
123
- case ve:
123
+ case ke:
124
124
  return "SuspenseList";
125
- case V:
125
+ case H:
126
126
  return "Activity";
127
127
  }
128
- if (typeof n == "object")
129
- switch (typeof n.tag == "number" && console.error(
128
+ if (typeof o == "object")
129
+ switch (typeof o.tag == "number" && console.error(
130
130
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
131
- ), n.$$typeof) {
132
- case se:
131
+ ), o.$$typeof) {
132
+ case le:
133
133
  return "Portal";
134
- case Ve:
135
- return n.displayName || "Context";
134
+ case Ue:
135
+ return o.displayName || "Context";
136
136
  case g:
137
- return (n._context.displayName || "Context") + ".Consumer";
137
+ return (o._context.displayName || "Context") + ".Consumer";
138
138
  case U:
139
- var i = n.render;
140
- return n = n.displayName, n || (n = i.displayName || i.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
141
- case ke:
142
- return i = n.displayName || null, i !== null ? i : p(n.type) || "Memo";
139
+ var i = o.render;
140
+ return o = o.displayName, o || (o = i.displayName || i.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
141
+ case je:
142
+ return i = o.displayName || null, i !== null ? i : m(o.type) || "Memo";
143
143
  case z:
144
- i = n._payload, n = n._init;
144
+ i = o._payload, o = o._init;
145
145
  try {
146
- return p(n(i));
146
+ return m(o(i));
147
147
  } catch {
148
148
  }
149
149
  }
150
150
  return null;
151
151
  }
152
- function w(n) {
153
- return "" + n;
152
+ function w(o) {
153
+ return "" + o;
154
154
  }
155
- function d(n) {
155
+ function p(o) {
156
156
  try {
157
- w(n);
157
+ w(o);
158
158
  var i = !1;
159
159
  } catch {
160
160
  i = !0;
161
161
  }
162
162
  if (i) {
163
163
  i = console;
164
- var m = i.error, b = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
165
- return m.call(
164
+ var f = i.error, b = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
165
+ return f.call(
166
166
  i,
167
167
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
168
168
  b
169
- ), w(n);
169
+ ), w(o);
170
170
  }
171
171
  }
172
- function k(n) {
173
- if (n === xe) return "<>";
174
- if (typeof n == "object" && n !== null && n.$$typeof === z)
172
+ function k(o) {
173
+ if (o === xe) return "<>";
174
+ if (typeof o == "object" && o !== null && o.$$typeof === z)
175
175
  return "<...>";
176
176
  try {
177
- var i = p(n);
177
+ var i = m(o);
178
178
  return i ? "<" + i + ">" : "<...>";
179
179
  } catch {
180
180
  return "<...>";
181
181
  }
182
182
  }
183
183
  function j() {
184
- var n = Ne.A;
185
- return n === null ? null : n.getOwner();
184
+ var o = Ce.A;
185
+ return o === null ? null : o.getOwner();
186
186
  }
187
- function S() {
187
+ function C() {
188
188
  return Error("react-stack-top-frame");
189
189
  }
190
- function C(n) {
191
- if (N.call(n, "key")) {
192
- var i = Object.getOwnPropertyDescriptor(n, "key").get;
190
+ function S(o) {
191
+ if (N.call(o, "key")) {
192
+ var i = Object.getOwnPropertyDescriptor(o, "key").get;
193
193
  if (i && i.isReactWarning) return !1;
194
194
  }
195
- return n.key !== void 0;
195
+ return o.key !== void 0;
196
196
  }
197
- function I(n, i) {
198
- function m() {
199
- Ce || (Ce = !0, console.error(
197
+ function I(o, i) {
198
+ function f() {
199
+ Re || (Re = !0, console.error(
200
200
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
201
201
  i
202
202
  ));
203
203
  }
204
- m.isReactWarning = !0, Object.defineProperty(n, "key", {
205
- get: m,
204
+ f.isReactWarning = !0, Object.defineProperty(o, "key", {
205
+ get: f,
206
206
  configurable: !0
207
207
  });
208
208
  }
209
- function be() {
210
- var n = p(this.type);
211
- return A[n] || (A[n] = !0, console.error(
209
+ function _e() {
210
+ var o = m(this.type);
211
+ return O[o] || (O[o] = !0, console.error(
212
212
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
213
- )), n = this.props.ref, n !== void 0 ? n : null;
213
+ )), o = this.props.ref, o !== void 0 ? o : null;
214
214
  }
215
- function _e(n, i, m, b, G, ue) {
216
- var y = m.ref;
217
- return n = {
218
- $$typeof: De,
219
- type: n,
215
+ function ve(o, i, f, b, G, de) {
216
+ var y = f.ref;
217
+ return o = {
218
+ $$typeof: Me,
219
+ type: o,
220
220
  key: i,
221
- props: m,
221
+ props: f,
222
222
  _owner: b
223
- }, (y !== void 0 ? y : null) !== null ? Object.defineProperty(n, "ref", {
223
+ }, (y !== void 0 ? y : null) !== null ? Object.defineProperty(o, "ref", {
224
224
  enumerable: !1,
225
- get: be
226
- }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
225
+ get: _e
226
+ }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
227
227
  configurable: !1,
228
228
  enumerable: !1,
229
229
  writable: !0,
230
230
  value: 0
231
- }), Object.defineProperty(n, "_debugInfo", {
231
+ }), Object.defineProperty(o, "_debugInfo", {
232
232
  configurable: !1,
233
233
  enumerable: !1,
234
234
  writable: !0,
235
235
  value: null
236
- }), Object.defineProperty(n, "_debugStack", {
236
+ }), Object.defineProperty(o, "_debugStack", {
237
237
  configurable: !1,
238
238
  enumerable: !1,
239
239
  writable: !0,
240
240
  value: G
241
- }), Object.defineProperty(n, "_debugTask", {
241
+ }), Object.defineProperty(o, "_debugTask", {
242
242
  configurable: !1,
243
243
  enumerable: !1,
244
244
  writable: !0,
245
- value: ue
246
- }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
245
+ value: de
246
+ }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
247
247
  }
248
- function Q(n, i, m, b, G, ue) {
248
+ function ee(o, i, f, b, G, de) {
249
249
  var y = i.children;
250
250
  if (y !== void 0)
251
251
  if (b)
252
252
  if (He(y)) {
253
253
  for (b = 0; b < y.length; b++)
254
- ee(y[b]);
254
+ te(y[b]);
255
255
  Object.freeze && Object.freeze(y);
256
256
  } else
257
257
  console.error(
258
258
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
259
259
  );
260
- else ee(y);
260
+ else te(y);
261
261
  if (N.call(i, "key")) {
262
- y = p(n);
263
- var q = Object.keys(i).filter(function($) {
262
+ y = m(o);
263
+ var J = Object.keys(i).filter(function($) {
264
264
  return $ !== "key";
265
265
  });
266
- b = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", ce[y + b] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
266
+ b = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", ue[y + b] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
267
267
  `A props object containing a "key" prop is being spread into JSX:
268
268
  let props = %s;
269
269
  <%s {...props} />
@@ -272,101 +272,101 @@ React keys must be passed directly to JSX without using spread:
272
272
  <%s key={someKey} {...props} />`,
273
273
  b,
274
274
  y,
275
- q,
275
+ J,
276
276
  y
277
- ), ce[y + b] = !0);
277
+ ), ue[y + b] = !0);
278
278
  }
279
- if (y = null, m !== void 0 && (d(m), y = "" + m), C(i) && (d(i.key), y = "" + i.key), "key" in i) {
280
- m = {};
281
- for (var de in i)
282
- de !== "key" && (m[de] = i[de]);
283
- } else m = i;
279
+ if (y = null, f !== void 0 && (p(f), y = "" + f), S(i) && (p(i.key), y = "" + i.key), "key" in i) {
280
+ f = {};
281
+ for (var he in i)
282
+ he !== "key" && (f[he] = i[he]);
283
+ } else f = i;
284
284
  return y && I(
285
- m,
286
- typeof n == "function" ? n.displayName || n.name || "Unknown" : n
287
- ), _e(
288
- n,
285
+ f,
286
+ typeof o == "function" ? o.displayName || o.name || "Unknown" : o
287
+ ), ve(
288
+ o,
289
289
  y,
290
- m,
290
+ f,
291
291
  j(),
292
292
  G,
293
- ue
293
+ de
294
294
  );
295
295
  }
296
- function ee(n) {
297
- ae(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === z && (n._payload.status === "fulfilled" ? ae(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
296
+ function te(o) {
297
+ ae(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === z && (o._payload.status === "fulfilled" ? ae(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
298
298
  }
299
- function ae(n) {
300
- return typeof n == "object" && n !== null && n.$$typeof === De;
299
+ function ae(o) {
300
+ return typeof o == "object" && o !== null && o.$$typeof === Me;
301
301
  }
302
- var Y = It, De = Symbol.for("react.transitional.element"), se = Symbol.for("react.portal"), xe = Symbol.for("react.fragment"), le = Symbol.for("react.strict_mode"), Ue = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), Ve = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), te = Symbol.for("react.suspense"), ve = Symbol.for("react.suspense_list"), ke = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), je = Symbol.for("react.client.reference"), Ne = Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, He = Array.isArray, Se = console.createTask ? console.createTask : function() {
302
+ var q = $t, Me = Symbol.for("react.transitional.element"), le = Symbol.for("react.portal"), xe = Symbol.for("react.fragment"), ie = Symbol.for("react.strict_mode"), Ve = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), Ue = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), re = Symbol.for("react.suspense"), ke = Symbol.for("react.suspense_list"), je = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Ne = Symbol.for("react.client.reference"), Ce = q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, He = Array.isArray, Se = console.createTask ? console.createTask : function() {
303
303
  return null;
304
304
  };
305
- Y = {
306
- react_stack_bottom_frame: function(n) {
307
- return n();
305
+ q = {
306
+ react_stack_bottom_frame: function(o) {
307
+ return o();
308
308
  }
309
309
  };
310
- var Ce, A = {}, re = Y.react_stack_bottom_frame.bind(
311
- Y,
312
- S
313
- )(), ie = Se(k(S)), ce = {};
314
- Ae.Fragment = xe, Ae.jsx = function(n, i, m) {
315
- var b = 1e4 > Ne.recentlyCreatedOwnerStacks++;
316
- return Q(
317
- n,
310
+ var Re, O = {}, ne = q.react_stack_bottom_frame.bind(
311
+ q,
312
+ C
313
+ )(), ce = Se(k(C)), ue = {};
314
+ Ae.Fragment = xe, Ae.jsx = function(o, i, f) {
315
+ var b = 1e4 > Ce.recentlyCreatedOwnerStacks++;
316
+ return ee(
317
+ o,
318
318
  i,
319
- m,
319
+ f,
320
320
  !1,
321
- b ? Error("react-stack-top-frame") : re,
322
- b ? Se(k(n)) : ie
321
+ b ? Error("react-stack-top-frame") : ne,
322
+ b ? Se(k(o)) : ce
323
323
  );
324
- }, Ae.jsxs = function(n, i, m) {
325
- var b = 1e4 > Ne.recentlyCreatedOwnerStacks++;
326
- return Q(
327
- n,
324
+ }, Ae.jsxs = function(o, i, f) {
325
+ var b = 1e4 > Ce.recentlyCreatedOwnerStacks++;
326
+ return ee(
327
+ o,
328
328
  i,
329
- m,
329
+ f,
330
330
  !0,
331
- b ? Error("react-stack-top-frame") : re,
332
- b ? Se(k(n)) : ie
331
+ b ? Error("react-stack-top-frame") : ne,
332
+ b ? Se(k(o)) : ce
333
333
  );
334
334
  };
335
335
  })()), Ae;
336
336
  }
337
337
  var gt;
338
338
  function Xr() {
339
- return gt || (gt = 1, process.env.NODE_ENV === "production" ? We.exports = Yr() : We.exports = qr()), We.exports;
339
+ return gt || (gt = 1, process.env.NODE_ENV === "production" ? Fe.exports = qr() : Fe.exports = Jr()), Fe.exports;
340
340
  }
341
341
  var r = Xr();
342
- const T = (...p) => p.filter(Boolean).join(" ");
343
- function wt({ label: p, children: w }) {
344
- const [d, k] = v(!1), j = Z(null);
345
- return B(() => {
346
- const S = (C) => {
347
- j.current && !j.current.contains(C.target) && k(!1);
342
+ const E = (...m) => m.filter(Boolean).join(" ");
343
+ function wt({ label: m, children: w }) {
344
+ const [p, k] = x(!1), j = Q(null);
345
+ return L(() => {
346
+ const C = (S) => {
347
+ j.current && !j.current.contains(S.target) && k(!1);
348
348
  };
349
- return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
350
- }, []), /* @__PURE__ */ r.jsxs("div", { className: a.dropdown, ref: j, children: [
349
+ return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
350
+ }, []), /* @__PURE__ */ r.jsxs("div", { className: s.dropdown, ref: j, children: [
351
351
  /* @__PURE__ */ r.jsx(
352
352
  "button",
353
353
  {
354
- className: T(
355
- a.buttonBase,
356
- a.buttonPrimary,
357
- a.dropdownToggle
354
+ className: E(
355
+ s.buttonBase,
356
+ s.buttonPrimary,
357
+ s.dropdownToggle
358
358
  ),
359
359
  type: "button",
360
360
  "aria-haspopup": "menu",
361
- "aria-expanded": d,
362
- onClick: () => k(!d),
363
- children: p
361
+ "aria-expanded": p,
362
+ onClick: () => k(!p),
363
+ children: m
364
364
  }
365
365
  ),
366
366
  /* @__PURE__ */ r.jsx(
367
367
  "ul",
368
368
  {
369
- className: T(a.dropdownMenu, d && a.dropdownMenuOpen),
369
+ className: E(s.dropdownMenu, p && s.dropdownMenuOpen),
370
370
  role: "menu",
371
371
  onClick: () => k(!1),
372
372
  children: w
@@ -374,161 +374,184 @@ function wt({ label: p, children: w }) {
374
374
  )
375
375
  ] });
376
376
  }
377
- const Ke = (p, w = "14px system-ui") => {
377
+ const Ke = (m, w = "14px system-ui") => {
378
378
  const k = (Ke.canvas || (Ke.canvas = document.createElement("canvas"))).getContext("2d");
379
- return k.font = w, k.measureText(p).width;
380
- }, Oe = (p) => p.toLowerCase().replace(/[_\s]+(.)?/g, (w, d) => d ? d.toUpperCase() : "").replace(/^(.)/, (w) => w.toLowerCase()), Jr = (p) => {
381
- if (!p || typeof p != "object") return p;
379
+ return k.font = w, k.measureText(m).width;
380
+ }, De = (m) => m.toLowerCase().replace(/[_\s]+(.)?/g, (w, p) => p ? p.toUpperCase() : "").replace(/^(.)/, (w) => w.toLowerCase()), Kr = (m) => {
381
+ if (!m || typeof m != "object") return m;
382
382
  const w = {};
383
- return Object.keys(p).forEach((d) => {
384
- w[Oe(d)] = p[d];
383
+ return Object.keys(m).forEach((p) => {
384
+ w[De(p)] = m[p];
385
385
  }), w;
386
- }, J = 0, ze = 38, yt = 10, Kr = [], Ge = 80, Zr = "awesome-grid", ye = "preferences", bt = () => new Promise((p, w) => {
387
- const d = indexedDB.open(Zr, 1);
388
- d.onupgradeneeded = () => {
389
- const k = d.result;
390
- k.objectStoreNames.contains(ye) || k.createObjectStore(ye);
391
- }, d.onsuccess = () => p(d.result), d.onerror = () => w(d.error);
392
- }), Qr = async (p) => {
386
+ }, K = 0, ze = 38, yt = 10, Zr = [], Ge = 80, Qr = "awesome-grid", be = "preferences", _t = () => new Promise((m, w) => {
387
+ const p = indexedDB.open(Qr, 1);
388
+ p.onupgradeneeded = () => {
389
+ const k = p.result;
390
+ k.objectStoreNames.contains(be) || k.createObjectStore(be);
391
+ }, p.onsuccess = () => m(p.result), p.onerror = () => w(p.error);
392
+ }), en = async (m) => {
393
393
  if (typeof indexedDB > "u") return null;
394
- const w = await bt();
395
- return new Promise((d, k) => {
396
- const C = w.transaction(ye, "readonly").objectStore(ye).get(p);
397
- C.onsuccess = () => d(C.result || null), C.onerror = () => k(C.error);
394
+ const w = await _t();
395
+ return new Promise((p, k) => {
396
+ const S = w.transaction(be, "readonly").objectStore(be).get(m);
397
+ S.onsuccess = () => p(S.result || null), S.onerror = () => k(S.error);
398
398
  }).finally(() => w.close());
399
- }, en = async (p, w) => {
399
+ }, bt = async (m, w) => {
400
400
  if (typeof indexedDB > "u") return;
401
- const d = await bt();
401
+ const p = await _t();
402
402
  return new Promise((k, j) => {
403
- const I = d.transaction(ye, "readwrite").objectStore(ye).put(w, p);
403
+ const I = p.transaction(be, "readwrite").objectStore(be).put(w, m);
404
404
  I.onsuccess = () => k(), I.onerror = () => j(I.error);
405
- }).finally(() => d.close());
405
+ }).finally(() => p.close());
406
406
  };
407
407
  function rn({
408
- apiEndpoint: p,
408
+ apiEndpoint: m,
409
409
  rowKey: w,
410
- theme: d = "light",
410
+ theme: p = "light",
411
411
  storageKey: k,
412
- computedColumns: j = Kr,
413
- currency: S = "INR",
414
- dateFormat: C = {
412
+ computedColumns: j = Zr,
413
+ currency: C = "INR",
414
+ dateFormat: S = {
415
415
  locale: "en-US",
416
416
  options: { year: "numeric", month: "2-digit", day: "2-digit" }
417
417
  },
418
418
  dateSeparator: I = "/",
419
- pageSizeOptions: be = [50, 100, 500, 1e3, 0],
420
- defaultPageSize: _e
419
+ pageSizeOptions: _e = [50, 100, 500, 1e3, 0],
420
+ defaultPageSize: ve
421
421
  }) {
422
- const Q = Z(!1), ee = Z(!1), ae = Z(!1), Y = Z(!1), De = 50, [se, xe] = v(!0), [le, Ue] = v([]), [g, Ve] = v([]), [U, te] = v([]), [ve, ke] = v(!1), [z, V] = v(1), je = Array.isArray(be) && be.length > 0 ? be : [50, 100, 500, 1e3, 0], Ne = _e !== void 0 && je.includes(_e) ? _e : je[0] || 50, [N, He] = v(Ne), [Se, Ce] = v(!1), [A, re] = v([]), [ie, ce] = v({}), [n, i] = v([]), [m, b] = v(() => {
423
- const e = String(d || "light").toLowerCase();
422
+ const ee = Q(!1), te = Q(!1), ae = Q(!1), q = Q(!1), Me = 50, [le, xe] = x(!0), [ie, Ve] = x([]), [g, Ue] = x([]), [U, re] = x([]), [ke, je] = x(!1), [z, H] = x(1), Ne = Array.isArray(_e) && _e.length > 0 ? _e : [50, 100, 500, 1e3, 0], Ce = ve !== void 0 && Ne.includes(ve) ? ve : Ne[0] || 50, [N, He] = x(Ce), [Se, Re] = x(!1), [O, ne] = x([]), [ce, ue] = x({}), [o, i] = x([]), [f, b] = x(() => {
423
+ const e = String(p || "light").toLowerCase();
424
424
  return e === "dark" || e === "purple" ? e : "light";
425
- }), [G, ue] = v({
425
+ }), [G, de] = x({
426
426
  groupBy: !1,
427
427
  aggregates: !1
428
- }), [y, q] = v({}), de = $t(y), [$, _t] = v({ key: null, direction: "asc" }), [ne, Re] = v([]), [Me, Pe] = v({}), [xt, D] = Ft(), Ze = Z(null), [vt, kt] = v(0), Le = Z(null), [Qe, et] = v(0), [tt, jt] = v(0), he = Z(null), [Nt, rt] = v(() => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(max-width: 767.98px)").matches), Ye = String(S || "INR").toUpperCase() === "USD" ? "USD" : "INR", nt = Ye === "USD" ? "en-US" : "en-IN", ot = C?.locale || "en-US", at = H(
429
- () => C?.options || {
428
+ }), [y, J] = x({}), he = Wt(y), [$, vt] = x({ key: null, direction: "asc" }), [oe, Te] = x([]), [Pe, Be] = x({}), [xt, D] = Ft(), Ze = Q(null), [kt, jt] = x(0), Le = Q(null), [Qe, et] = x(0), [tt, Nt] = x(0), pe = Q(null), [Ct, rt] = x(() => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(max-width: 767.98px)").matches), Ye = String(C || "INR").toUpperCase() === "USD" ? "USD" : "INR", nt = Ye === "USD" ? "en-US" : "en-IN", ot = S?.locale || "en-US", st = Y(
429
+ () => S?.options || {
430
430
  year: "numeric",
431
431
  month: "2-digit",
432
432
  day: "2-digit"
433
433
  },
434
- [C]
435
- ), Be = k || p || "awesome-grid";
436
- B(() => {
437
- N > 100 && ke(!0);
438
- }, [N]), B(() => {
434
+ [S]
435
+ ), V = k || m || "awesome-grid";
436
+ L(() => {
437
+ N > 100 && je(!0);
438
+ }, [N]), L(() => {
439
439
  let e = !0;
440
440
  const t = new AbortController();
441
441
  return (async () => {
442
442
  try {
443
- ke(!0);
444
- const o = new URLSearchParams({
443
+ je(!0);
444
+ const n = new URLSearchParams({
445
445
  page: String(z),
446
446
  pageSize: String(N)
447
- }), s = await fetch(`${p}?${o.toString()}`, {
447
+ }), a = await fetch(`${m}?${n.toString()}`, {
448
448
  signal: t.signal
449
449
  });
450
- if (!s.ok)
451
- throw new Error(`Request failed: ${s.status} ${s.statusText}`);
452
- const l = await s.json();
450
+ if (!a.ok)
451
+ throw new Error(`Request failed: ${a.status} ${a.statusText}`);
452
+ const l = await a.json();
453
453
  if (!e) return;
454
- const f = (Array.isArray(l?.data) ? l.data : []).map((u) => Jr(u)), _ = l?.columns || [], x = j.filter((u) => u && u.key && typeof u.formula == "function").map((u) => ({
455
- key: Oe(u.key),
456
- label: u.label || u.key,
457
- formula: u.formula
458
- })), c = _.map((u) => {
459
- const E = typeof u == "string" ? u : u.key;
454
+ const u = (Array.isArray(l?.data) ? l.data : []).map((h) => Kr(h)), _ = l?.columns || [], v = j.filter((h) => h && h.key && typeof h.formula == "function").map((h) => ({
455
+ key: De(h.key),
456
+ label: h.label || h.key,
457
+ formula: h.formula
458
+ })), d = _.map((h) => {
459
+ const T = typeof h == "string" ? h : h.key;
460
460
  return {
461
- key: Oe(E),
462
- label: u.label || E.replace(/_/g, " ").replace(/\b\w/g, (W) => W.toUpperCase())
461
+ key: De(T),
462
+ label: h.label || T.replace(/_/g, " ").replace(/\b\w/g, (F) => F.toUpperCase())
463
463
  };
464
464
  }), R = [
465
- ...c,
466
- ...x.filter((u) => !c.some((E) => E.key === u.key)).map(({ key: u, label: E }) => ({ key: u, label: E }))
467
- ], O = f.map((u) => {
468
- const E = { ...u };
469
- return x.forEach((W) => {
465
+ ...d,
466
+ ...v.filter((h) => !d.some((T) => T.key === h.key)).map(({ key: h, label: T }) => ({ key: h, label: T }))
467
+ ], A = u.map((h) => {
468
+ const T = { ...h };
469
+ return v.forEach((F) => {
470
470
  try {
471
- E[W.key] = W.formula(u);
472
- } catch (ge) {
473
- E[W.key] = "", console.error(`Failed computed column formula for '${W.key}'`, ge);
471
+ T[F.key] = F.formula(h);
472
+ } catch (we) {
473
+ T[F.key] = "", console.error(`Failed computed column formula for '${F.key}'`, we);
474
474
  }
475
- }), E;
475
+ }), T;
476
476
  });
477
- if (Ue(O), Ve(R), !Q.current && !Y.current) {
478
- const u = R.map((E) => E.key);
479
- te(u), Re(u), Q.current = !0;
477
+ if (Ve(A), Ue(R), !ee.current && !q.current) {
478
+ const h = R.map((T) => T.key);
479
+ re(h), Te(h), ee.current = !0;
480
480
  }
481
- } catch (o) {
482
- if (o?.name === "AbortError") return;
483
- console.error("Failed to load grid data", o);
481
+ } catch (n) {
482
+ if (n?.name === "AbortError") return;
483
+ console.error("Failed to load grid data", n);
484
484
  } finally {
485
- e && ke(!1);
485
+ e && je(!1);
486
486
  }
487
487
  })(), () => {
488
488
  e = !1, t.abort();
489
489
  };
490
- }, [p, z, N, j]), B(() => {
491
- if (g.length > 0 && U.length === 0 && !Y.current) {
490
+ }, [m, z, N, j]), L(() => {
491
+ if (g.length > 0 && U.length === 0 && !q.current) {
492
492
  const e = g.map((t) => t.key);
493
- te(e), Re(e), Q.current = !0;
493
+ re(e), Te(e), ee.current = !0;
494
494
  }
495
- }, [g, U]), B(() => {
495
+ }, [g, U]), L(() => {
496
496
  if (!g.length) return;
497
497
  const e = g.map((t) => t.key);
498
- Re((t) => {
499
- const o = t.filter((l) => e.includes(l)), s = e.filter((l) => !o.includes(l));
500
- return [...o, ...s];
501
- }), te((t) => {
498
+ Te((t) => {
499
+ const n = t.filter((l) => e.includes(l)), a = e.filter((l) => !n.includes(l));
500
+ return [...n, ...a];
501
+ }), re((t) => {
502
502
  if (!t.length) return e;
503
- const o = t.filter((l) => e.includes(l)), s = e.filter((l) => !o.includes(l));
504
- return [...o, ...s];
503
+ const n = t.filter((l) => e.includes(l)), a = e.filter((l) => !n.includes(l));
504
+ return [...n, ...a];
505
505
  });
506
- }, [g]), B(() => {
506
+ }, [g]), L(() => {
507
507
  if (!g.length) return;
508
508
  const e = new Set(g.map((t) => t.key));
509
- re((t) => t.filter((o) => e.has(o)));
510
- }, [g]), B(() => {
511
- const e = () => V(1);
509
+ ne((t) => t.filter((n) => e.has(n)));
510
+ }, [g]), L(() => {
511
+ const e = () => H(1);
512
512
  return window.addEventListener("refreshTable", e), () => window.removeEventListener("refreshTable", e);
513
- }, []), B(() => {
513
+ }, []), L(() => {
514
514
  let e = !1;
515
- return ee.current = !1, ae.current = !1, Y.current = !1, (async () => {
515
+ return te.current = !1, ae.current = !1, q.current = !1, (async () => {
516
516
  try {
517
- const t = await Qr(Be);
517
+ let t = await en(V);
518
+ if (!t && typeof localStorage < "u") {
519
+ const n = {
520
+ columnOrder: `columnOrder_${V}`,
521
+ visibleColumns: `visibleColumns_${V}`,
522
+ groupByColumns: `groupByColumns_${V}`,
523
+ totalColumns: `totalColumns_${V}`,
524
+ selectedTheme: `theme_${V}`,
525
+ columnWidthOverrides: `columnWidths_${V}`
526
+ }, a = Object.fromEntries(
527
+ Object.entries(n).map(([c, u]) => [c, localStorage.getItem(u)])
528
+ );
529
+ if (Object.values(a).some((c) => c !== null)) {
530
+ const c = {
531
+ columnOrder: a.columnOrder ? JSON.parse(a.columnOrder) : void 0,
532
+ visibleColumns: a.visibleColumns ? JSON.parse(a.visibleColumns) : void 0,
533
+ groupByColumns: a.groupByColumns ? JSON.parse(a.groupByColumns) : void 0,
534
+ totalColumns: a.totalColumns ? JSON.parse(a.totalColumns) : void 0,
535
+ selectedTheme: a.selectedTheme || void 0,
536
+ columnWidthOverrides: a.columnWidthOverrides ? JSON.parse(a.columnWidthOverrides) : void 0
537
+ };
538
+ await bt(V, c), t = c, Object.values(n).forEach((u) => localStorage.removeItem(u));
539
+ }
540
+ }
518
541
  if (e) return;
519
542
  if (t && typeof t == "object")
520
- if (Y.current = !0, Array.isArray(t.columnOrder) && (Re(t.columnOrder), Q.current = !0), Array.isArray(t.visibleColumns) && te(t.visibleColumns), Array.isArray(t.groupByColumns) && re(t.groupByColumns), Array.isArray(t.totalColumns) && (i(t.totalColumns), ee.current = !0), t.columnWidthOverrides && typeof t.columnWidthOverrides == "object" && Pe(t.columnWidthOverrides), t.selectedTheme === "light" || t.selectedTheme === "dark" || t.selectedTheme === "purple")
543
+ if (q.current = !0, Array.isArray(t.columnOrder) && (Te(t.columnOrder), ee.current = !0), Array.isArray(t.visibleColumns) && re(t.visibleColumns), Array.isArray(t.groupByColumns) && ne(t.groupByColumns), Array.isArray(t.totalColumns) && (i(t.totalColumns), te.current = !0), t.columnWidthOverrides && typeof t.columnWidthOverrides == "object" && Be(t.columnWidthOverrides), t.selectedTheme === "light" || t.selectedTheme === "dark" || t.selectedTheme === "purple")
521
544
  b(t.selectedTheme);
522
545
  else {
523
- const o = String(d || "light").toLowerCase();
546
+ const n = String(p || "light").toLowerCase();
524
547
  b(
525
- o === "dark" || o === "purple" ? o : "light"
548
+ n === "dark" || n === "purple" ? n : "light"
526
549
  );
527
550
  }
528
551
  else {
529
- const o = String(d || "light").toLowerCase();
552
+ const n = String(p || "light").toLowerCase();
530
553
  b(
531
- o === "dark" || o === "purple" ? o : "light"
554
+ n === "dark" || n === "purple" ? n : "light"
532
555
  );
533
556
  }
534
557
  } catch (t) {
@@ -539,28 +562,28 @@ function rn({
539
562
  })(), () => {
540
563
  e = !0;
541
564
  };
542
- }, [Be, d]), B(() => {
565
+ }, [V, p]), L(() => {
543
566
  if (!ae.current) return;
544
- en(Be, {
545
- columnOrder: ne,
567
+ bt(V, {
568
+ columnOrder: oe,
546
569
  visibleColumns: U,
547
- groupByColumns: A,
548
- totalColumns: n,
549
- selectedTheme: m,
550
- columnWidthOverrides: Me
570
+ groupByColumns: O,
571
+ totalColumns: o,
572
+ selectedTheme: f,
573
+ columnWidthOverrides: Pe
551
574
  }).catch((t) => {
552
575
  console.error("Failed to save preferences", t);
553
576
  });
554
577
  }, [
555
- Be,
556
- ne,
578
+ V,
579
+ oe,
557
580
  U,
558
- A,
559
- n,
560
- m,
561
- Me
581
+ O,
582
+ o,
583
+ f,
584
+ Pe
562
585
  ]);
563
- const oe = (e, t) => e[t] ?? "", pe = we(
586
+ const se = (e, t) => e[t] ?? "", me = ye(
564
587
  (e) => {
565
588
  const t = Number(e);
566
589
  return Number.isNaN(t) ? "" : new Intl.NumberFormat(nt, {
@@ -570,25 +593,25 @@ function rn({
570
593
  }).format(t);
571
594
  },
572
595
  [nt, Ye]
573
- ), St = we(
596
+ ), St = ye(
574
597
  (e) => {
575
598
  const t = new Date(e);
576
- return Number.isNaN(t.getTime()) ? e ?? "" : new Intl.DateTimeFormat(ot, at).formatToParts(t).filter((s) => s.type === "year" || s.type === "month" || s.type === "day").map((s) => s.value).join(I);
599
+ return Number.isNaN(t.getTime()) ? e ?? "" : new Intl.DateTimeFormat(ot, st).formatToParts(t).filter((a) => a.type === "year" || a.type === "month" || a.type === "day").map((a) => a.value).join(I);
577
600
  },
578
- [ot, at, I]
579
- ), X = we(
601
+ [ot, st, I]
602
+ ), X = ye(
580
603
  (e) => {
581
- const t = le[0]?.[e];
604
+ const t = ie[0]?.[e];
582
605
  return t == null ? "text" : isNaN(Number(t)) ? isNaN(Date.parse(t)) ? "text" : "date" : "number";
583
606
  },
584
- [le]
585
- ), st = (e) => {
607
+ [ie]
608
+ ), at = (e) => {
586
609
  const t = new Date(e);
587
610
  return Number.isNaN(t.getTime()) ? null : `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(
588
611
  t.getDate()
589
612
  ).padStart(2, "0")}`;
590
- }, Ie = H(() => g.filter((e) => X(e.key) === "number"), [g, X]);
591
- B(() => {
613
+ }, Ie = Y(() => g.filter((e) => X(e.key) === "number"), [g, X]);
614
+ L(() => {
592
615
  if (!g.length) return;
593
616
  const e = Ie.map((t) => t.key);
594
617
  if (!e.length) {
@@ -596,320 +619,320 @@ function rn({
596
619
  return;
597
620
  }
598
621
  i((t) => {
599
- const o = new Set(e);
600
- return ee.current ? t.filter((s) => o.has(s)) : (ee.current = !0, e);
622
+ const n = new Set(e);
623
+ return te.current ? t.filter((a) => n.has(a)) : (te.current = !0, e);
601
624
  });
602
625
  }, [g.length, Ie]);
603
626
  const Ee = (e, t) => {
604
627
  D(() => {
605
- q((o) => ({
606
- ...o,
607
- [e]: { ...o[e], ...t }
608
- })), V(1);
628
+ J((n) => ({
629
+ ...n,
630
+ [e]: { ...n[e], ...t }
631
+ })), H(1);
609
632
  });
610
- }, Ct = () => {
633
+ }, Rt = () => {
611
634
  D(() => {
612
- q({}), V(1);
635
+ J({}), H(1);
613
636
  });
614
- }, qe = H(() => le.filter(
615
- (e) => Object.entries(de).every(([t, o]) => {
616
- if (!(o?.value !== void 0 && o?.value !== null && String(o.value).trim() !== "")) return !0;
617
- const l = oe(e, t);
618
- if (o.type === "number") {
619
- const h = Number(l), f = Number(o.value), _ = o.op || "=";
620
- return Number.isNaN(h) || Number.isNaN(f) ? !0 : _ === "=" ? h === f : _ === ">" ? h > f : _ === "<" ? h < f : _ === "!=" ? h !== f : !0;
637
+ }, qe = Y(() => ie.filter(
638
+ (e) => Object.entries(he).every(([t, n]) => {
639
+ if (!(n?.value !== void 0 && n?.value !== null && String(n.value).trim() !== "")) return !0;
640
+ const l = se(e, t);
641
+ if (n.type === "number") {
642
+ const c = Number(l), u = Number(n.value), _ = n.op || "=";
643
+ return Number.isNaN(c) || Number.isNaN(u) ? !0 : _ === "=" ? c === u : _ === ">" ? c > u : _ === "<" ? c < u : _ === "!=" ? c !== u : !0;
621
644
  }
622
- if (o.type === "date") {
623
- const h = st(l), f = st(o.value), _ = o.op || "=";
624
- return !h || !f ? !0 : _ === "=" ? h === f : _ === ">" ? h > f : _ === "<" ? h < f : _ === "!=" ? h !== f : !0;
645
+ if (n.type === "date") {
646
+ const c = at(l), u = at(n.value), _ = n.op || "=";
647
+ return !c || !u ? !0 : _ === "=" ? c === u : _ === ">" ? c > u : _ === "<" ? c < u : _ === "!=" ? c !== u : !0;
625
648
  }
626
- return String(l).toLowerCase().includes(String(o.value).toLowerCase());
649
+ return String(l).toLowerCase().includes(String(n.value).toLowerCase());
627
650
  })
628
- ), [le, de]), Rt = (e) => {
651
+ ), [ie, he]), Tt = (e) => {
629
652
  D(() => {
630
- _t((t) => ({
653
+ vt((t) => ({
631
654
  key: e,
632
655
  direction: t.key === e && t.direction === "asc" ? "desc" : "asc"
633
656
  }));
634
657
  });
635
- }, M = H(() => {
658
+ }, M = Y(() => {
636
659
  if (!$.key) return qe;
637
660
  const e = X($.key);
638
- return [...qe].sort((t, o) => {
639
- const s = oe(t, $.key), l = oe(o, $.key), h = e === "date" ? new Date(s).getTime() : isNaN(Number(s)) ? s : Number(s), f = e === "date" ? new Date(l).getTime() : isNaN(Number(l)) ? l : Number(l);
640
- return h < f ? $.direction === "asc" ? -1 : 1 : h > f ? $.direction === "asc" ? 1 : -1 : 0;
661
+ return [...qe].sort((t, n) => {
662
+ const a = se(t, $.key), l = se(n, $.key), c = e === "date" ? new Date(a).getTime() : isNaN(Number(a)) ? a : Number(a), u = e === "date" ? new Date(l).getTime() : isNaN(Number(l)) ? l : Number(l);
663
+ return c < u ? $.direction === "asc" ? -1 : 1 : c > u ? $.direction === "asc" ? 1 : -1 : 0;
641
664
  });
642
- }, [qe, $, X]), $e = H(() => {
643
- if (!se) return null;
665
+ }, [qe, $, X]), $e = Y(() => {
666
+ if (!le) return null;
644
667
  const e = {};
645
668
  return g.forEach((t) => {
646
- X(t.key) === "number" && n.includes(t.key) && (e[t.key] = M.reduce(
647
- (o, s) => o + Number(s[t.key] || 0),
669
+ X(t.key) === "number" && o.includes(t.key) && (e[t.key] = M.reduce(
670
+ (n, a) => n + Number(a[t.key] || 0),
648
671
  0
649
672
  ));
650
673
  }), e;
651
- }, [se, M, g, X, n]), Fe = N === J ? M.length : Math.min(N, De), Xe = N === J ? 1 : Math.ceil(M.length / Fe), K = H(() => {
652
- if (N === J) return M;
653
- const e = (z - 1) * Fe;
654
- return M.slice(e, e + Fe);
655
- }, [M, z, N, Fe]), P = A.length > 0, F = !P && N === J && !Nt, Et = (e) => {
674
+ }, [le, M, g, X, o]), We = N === K ? M.length : Math.min(N, Me), Je = N === K ? 1 : Math.ceil(M.length / We), Z = Y(() => {
675
+ if (N === K) return M;
676
+ const e = (z - 1) * We;
677
+ return M.slice(e, e + We);
678
+ }, [M, z, N, We]), P = O.length > 0, W = !P && N === K && !Ct, Et = (e) => {
656
679
  D(() => {
657
- re(
658
- (t) => t.includes(e) ? t.filter((o) => o !== e) : [...t, e]
659
- ), ce({}), V(1);
680
+ ne(
681
+ (t) => t.includes(e) ? t.filter((n) => n !== e) : [...t, e]
682
+ ), ue({}), H(1);
660
683
  });
661
- }, Tt = (e) => {
662
- ce((t) => ({
684
+ }, Ot = (e) => {
685
+ ue((t) => ({
663
686
  ...t,
664
687
  [e]: !t[e]
665
688
  }));
666
689
  }, At = (e) => {
667
690
  D(() => {
668
691
  i(
669
- (t) => t.includes(e) ? t.filter((o) => o !== e) : [...t, e]
692
+ (t) => t.includes(e) ? t.filter((n) => n !== e) : [...t, e]
670
693
  );
671
694
  });
672
- }, lt = we(
695
+ }, lt = ye(
673
696
  (e) => {
674
697
  const t = {};
675
- return n.forEach((o) => {
676
- const s = e.map((x) => Number(x[o])).filter((x) => !Number.isNaN(x));
677
- if (!s.length) return;
678
- const l = s.reduce((x, c) => x + c, 0), h = Math.min(...s), f = Math.max(...s), _ = l / s.length;
679
- t[o] = {
680
- count: s.length,
698
+ return o.forEach((n) => {
699
+ const a = e.map((v) => Number(v[n])).filter((v) => !Number.isNaN(v));
700
+ if (!a.length) return;
701
+ const l = a.reduce((v, d) => v + d, 0), c = Math.min(...a), u = Math.max(...a), _ = l / a.length;
702
+ t[n] = {
703
+ count: a.length,
681
704
  sum: l,
682
705
  avg: _,
683
- min: h,
684
- max: f
706
+ min: c,
707
+ max: u
685
708
  };
686
709
  }), t;
687
710
  },
688
- [n]
689
- ), Je = H(() => {
711
+ [o]
712
+ ), Xe = Y(() => {
690
713
  if (!P) return [];
691
- const e = [], t = M, o = (s, l, h) => {
692
- const f = A[l], _ = /* @__PURE__ */ new Map();
693
- s.forEach((x) => {
694
- const c = oe(x, f), R = c == null || c === "" ? "(Blank)" : String(c);
695
- _.has(R) || _.set(R, []), _.get(R).push(x);
696
- }), Array.from(_.entries()).forEach(([x, c], R) => {
697
- const O = `${h}${f}:${x}:${R}`;
714
+ const e = [], t = M, n = (a, l, c) => {
715
+ const u = O[l], _ = /* @__PURE__ */ new Map();
716
+ a.forEach((v) => {
717
+ const d = se(v, u), R = d == null || d === "" ? "(Blank)" : String(d);
718
+ _.has(R) || _.set(R, []), _.get(R).push(v);
719
+ }), Array.from(_.entries()).forEach(([v, d], R) => {
720
+ const A = `${c}${u}:${v}:${R}`;
698
721
  if (e.push({
699
722
  type: "group",
700
- id: O,
701
- groupKey: f,
702
- groupValue: x,
723
+ id: A,
724
+ groupKey: u,
725
+ groupValue: v,
703
726
  level: l,
704
- count: c.length,
705
- aggregates: lt(c)
706
- }), !ie[O]) {
707
- if (l < A.length - 1) {
708
- o(c, l + 1, `${O}|`);
727
+ count: d.length,
728
+ aggregates: lt(d)
729
+ }), !ce[A]) {
730
+ if (l < O.length - 1) {
731
+ n(d, l + 1, `${A}|`);
709
732
  return;
710
733
  }
711
- c.forEach((u, E) => {
712
- const W = u[Oe(w)] ?? u[w] ?? E;
734
+ d.forEach((h, T) => {
735
+ const F = h[De(w)] ?? h[w] ?? T;
713
736
  e.push({
714
737
  type: "row",
715
- id: `${O}|row:${W}:${E}`,
716
- row: u
738
+ id: `${A}|row:${F}:${T}`,
739
+ row: h
717
740
  });
718
741
  });
719
742
  }
720
743
  });
721
744
  };
722
- return o(t, 0, ""), e;
745
+ return n(t, 0, ""), e;
723
746
  }, [
724
747
  P,
725
748
  M,
726
- A,
727
- ie,
749
+ O,
750
+ ce,
728
751
  lt,
729
752
  w
730
- ]), Ot = we(
753
+ ]), Dt = ye(
731
754
  (e) => {
732
- F && et(e.currentTarget.scrollTop);
755
+ W && et(e.currentTarget.scrollTop);
733
756
  },
734
- [F]
757
+ [W]
735
758
  );
736
759
  pt(() => {
737
- if (!F) return;
760
+ if (!W) return;
738
761
  const e = Le.current;
739
762
  if (!e) return;
740
- const t = () => jt(e.clientHeight || 0);
763
+ const t = () => Nt(e.clientHeight || 0);
741
764
  return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
742
- }, [F]), B(() => {
765
+ }, [W]), L(() => {
743
766
  et(0), Le.current && (Le.current.scrollTop = 0);
744
- }, [F, M.length]);
745
- const me = H(() => {
746
- if (!F)
767
+ }, [W, M.length]);
768
+ const fe = Y(() => {
769
+ if (!W)
747
770
  return {
748
771
  start: 0,
749
- end: K.length,
750
- rows: K,
772
+ end: Z.length,
773
+ rows: Z,
751
774
  topSpacer: 0,
752
775
  bottomSpacer: 0
753
776
  };
754
- const e = K.length, t = Math.ceil((tt || 1) / ze), o = Math.max(
777
+ const e = Z.length, t = Math.ceil((tt || 1) / ze), n = Math.max(
755
778
  0,
756
779
  Math.floor(Qe / ze) - yt
757
- ), s = Math.min(
780
+ ), a = Math.min(
758
781
  e,
759
- o + t + yt * 2
782
+ n + t + yt * 2
760
783
  );
761
784
  return {
762
- start: o,
763
- end: s,
764
- rows: K.slice(o, s),
765
- topSpacer: o * ze,
766
- bottomSpacer: Math.max(0, (e - s) * ze)
785
+ start: n,
786
+ end: a,
787
+ rows: Z.slice(n, a),
788
+ topSpacer: n * ze,
789
+ bottomSpacer: Math.max(0, (e - a) * ze)
767
790
  };
768
- }, [F, K, Qe, tt]), it = we(
769
- (e) => Object.entries(e || {}).map(([t, o]) => `${g.find((l) => l.key === t)?.label || t}: Σ ${pe(o.sum)} | Avg ${pe(o.avg)} | Min ${pe(o.min)} | Max ${pe(o.max)}`),
770
- [g, pe]
771
- ), Dt = () => {
791
+ }, [W, Z, Qe, tt]), it = ye(
792
+ (e) => Object.entries(e || {}).map(([t, n]) => `${g.find((l) => l.key === t)?.label || t}: Σ ${me(n.sum)} | Avg ${me(n.avg)} | Min ${me(n.min)} | Max ${me(n.max)}`),
793
+ [g, me]
794
+ ), Mt = () => {
772
795
  try {
773
- const e = L.filter(
774
- (c) => U.includes(c.key)
775
- ), t = (c) => {
776
- const O = String(c ?? "").replace(/"/g, '""');
777
- return /[",\n\r]/.test(O) ? `"${O}"` : O;
778
- }, o = P ? Je.map((c) => {
779
- if (c.type === "group") {
780
- const u = g.find((ge) => ge.key === c.groupKey)?.label || c.groupKey, E = it(c.aggregates).join(" || "), W = {};
781
- return e.forEach((ge, ht) => {
796
+ const e = B.filter(
797
+ (d) => U.includes(d.key)
798
+ ), t = (d) => {
799
+ const A = String(d ?? "").replace(/"/g, '""');
800
+ return /[",\n\r]/.test(A) ? `"${A}"` : A;
801
+ }, n = P ? Xe.map((d) => {
802
+ if (d.type === "group") {
803
+ const h = g.find((we) => we.key === d.groupKey)?.label || d.groupKey, T = it(d.aggregates).join(" || "), F = {};
804
+ return e.forEach((we, ht) => {
782
805
  if (ht === 0) {
783
- W[ge.key] = `GROUP ${u}: ${c.groupValue} (${c.count})`;
806
+ F[we.key] = `GROUP ${h}: ${d.groupValue} (${d.count})`;
784
807
  return;
785
808
  }
786
- W[ge.key] = ht === 1 ? E : "";
787
- }), W;
809
+ F[we.key] = ht === 1 ? T : "";
810
+ }), F;
788
811
  }
789
- const R = {}, O = c.row;
790
- return e.forEach((u) => {
791
- R[u.key] = oe(O, u.key);
812
+ const R = {}, A = d.row;
813
+ return e.forEach((h) => {
814
+ R[h.key] = se(A, h.key);
792
815
  }), R;
793
- }) : M.map((c) => {
816
+ }) : M.map((d) => {
794
817
  const R = {};
795
- return e.forEach((O) => {
796
- R[O.key] = oe(c, O.key);
818
+ return e.forEach((A) => {
819
+ R[A.key] = se(d, A.key);
797
820
  }), R;
798
- }), s = e.map((c) => t(c.label)).join(","), l = o.map(
799
- (c) => e.map((R) => t(c[R.key])).join(",")
821
+ }), a = e.map((d) => t(d.label)).join(","), l = n.map(
822
+ (d) => e.map((R) => t(d[R.key])).join(",")
800
823
  ).join(`\r
801
- `), h = `\uFEFF${s}\r
802
- ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObjectURL(f), x = document.createElement("a");
803
- x.href = _, x.download = "TableData.csv", document.body.appendChild(x), x.click(), document.body.removeChild(x), URL.revokeObjectURL(_);
824
+ `), c = `\uFEFF${a}\r
825
+ ${l}`, u = new Blob([c], { type: "text/csv;charset=utf-8;" }), _ = URL.createObjectURL(u), v = document.createElement("a");
826
+ v.href = _, v.download = "TableData.csv", document.body.appendChild(v), v.click(), document.body.removeChild(v), URL.revokeObjectURL(_);
804
827
  } catch (e) {
805
828
  console.error("Failed to export CSV", e);
806
829
  }
807
830
  }, ct = (e, t) => {
808
831
  e.dataTransfer.setData("colKey", t);
809
832
  }, ut = (e, t) => {
810
- const o = e.dataTransfer.getData("colKey");
811
- !o || o === t || D(() => {
812
- Re((s) => {
813
- const l = [...s], h = l.indexOf(o), f = l.indexOf(t);
814
- return l.splice(h, 1), l.splice(f, 0, o), l;
833
+ const n = e.dataTransfer.getData("colKey");
834
+ !n || n === t || D(() => {
835
+ Te((a) => {
836
+ const l = [...a], c = l.indexOf(n), u = l.indexOf(t);
837
+ return l.splice(c, 1), l.splice(u, 0, n), l;
815
838
  });
816
839
  });
817
- }, dt = (e) => e.preventDefault(), L = H(() => ne.map((e) => g.find((t) => t.key === e)).filter((e) => e && U.includes(e.key)), [g, ne, U]), fe = H(() => {
818
- const s = "14px system-ui", l = {};
819
- return L.forEach((h) => {
820
- const f = Ke(h.label, s), _ = Math.min(
840
+ }, dt = (e) => e.preventDefault(), B = Y(() => oe.map((e) => g.find((t) => t.key === e)).filter((e) => e && U.includes(e.key)), [g, oe, U]), ge = Y(() => {
841
+ const a = "14px system-ui", l = {};
842
+ return B.forEach((c) => {
843
+ const u = Ke(c.label, a), _ = Math.min(
821
844
  320,
822
- Math.max(Ge, f + 32 + 48)
845
+ Math.max(Ge, u + 32 + 48)
823
846
  );
824
- l[h.key] = Math.max(
847
+ l[c.key] = Math.max(
825
848
  Ge,
826
- Me[h.key] ?? _
849
+ Pe[c.key] ?? _
827
850
  );
828
851
  }), l;
829
- }, [L, Me]);
830
- B(() => {
852
+ }, [B, Pe]);
853
+ L(() => {
831
854
  if (!g.length) return;
832
855
  const e = new Set(g.map((t) => t.key));
833
- Pe((t) => {
834
- const o = {};
835
- return Object.entries(t).forEach(([s, l]) => {
836
- e.has(s) && (o[s] = l);
837
- }), o;
856
+ Be((t) => {
857
+ const n = {};
858
+ return Object.entries(t).forEach(([a, l]) => {
859
+ e.has(a) && (n[a] = l);
860
+ }), n;
838
861
  });
839
862
  }, [g]);
840
- const Mt = (e, t) => {
863
+ const Pt = (e, t) => {
841
864
  if (e.preventDefault(), e.stopPropagation(), e.button !== void 0 && e.button !== 0) return;
842
- const o = e.clientX, s = fe[t] || Ge;
843
- he.current = { key: t, startX: o, startWidth: s }, document.body.style.cursor = "col-resize";
844
- const l = (f) => {
845
- if (!he.current) return;
846
- const _ = f.clientX - he.current.startX, x = Math.max(
865
+ const n = e.clientX, a = ge[t] || Ge;
866
+ pe.current = { key: t, startX: n, startWidth: a }, document.body.style.cursor = "col-resize";
867
+ const l = (u) => {
868
+ if (!pe.current) return;
869
+ const _ = u.clientX - pe.current.startX, v = Math.max(
847
870
  Ge,
848
- he.current.startWidth + _
871
+ pe.current.startWidth + _
849
872
  );
850
- Pe((c) => ({
851
- ...c,
852
- [he.current.key]: x
873
+ Be((d) => ({
874
+ ...d,
875
+ [pe.current.key]: v
853
876
  }));
854
- }, h = () => {
855
- he.current = null, document.body.style.cursor = "", window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", h);
877
+ }, c = () => {
878
+ pe.current = null, document.body.style.cursor = "", window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", c);
856
879
  };
857
- window.addEventListener("pointermove", l), window.addEventListener("pointerup", h);
858
- }, Pt = (e, t) => {
859
- e.preventDefault(), e.stopPropagation(), Pe((o) => {
860
- const s = { ...o };
861
- return delete s[t], s;
880
+ window.addEventListener("pointermove", l), window.addEventListener("pointerup", c);
881
+ }, Bt = (e, t) => {
882
+ e.preventDefault(), e.stopPropagation(), Be((n) => {
883
+ const a = { ...n };
884
+ return delete a[t], a;
862
885
  });
863
- }, Lt = ve || xt, Bt = m === "dark" ? a.themeDark : m === "purple" ? a.themePurple : a.themeLight;
886
+ }, Lt = ke || xt, It = f === "dark" ? s.themeDark : f === "purple" ? s.themePurple : s.themeLight;
864
887
  return pt(() => {
865
888
  const e = () => {
866
- kt(Ze.current?.offsetHeight || 0);
889
+ jt(Ze.current?.offsetHeight || 0);
867
890
  };
868
891
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
869
- }, [L.length]), B(() => {
892
+ }, [B.length]), L(() => {
870
893
  if (typeof window > "u" || typeof window.matchMedia != "function") return;
871
- const e = window.matchMedia("(max-width: 767.98px)"), t = (o) => rt(o.matches);
894
+ const e = window.matchMedia("(max-width: 767.98px)"), t = (n) => rt(n.matches);
872
895
  return rt(e.matches), e.addEventListener("change", t), () => e.removeEventListener("change", t);
873
- }, []), /* @__PURE__ */ r.jsxs("div", { className: T(a.container, Bt), children: [
874
- /* @__PURE__ */ r.jsxs("div", { className: a.headerRow, children: [
875
- /* @__PURE__ */ r.jsxs("div", { className: T(a.flexRow, a.toolbarGroup), children: [
876
- /* @__PURE__ */ r.jsx("label", { className: a.labelMuted, children: "Rows:" }),
896
+ }, []), /* @__PURE__ */ r.jsxs("div", { className: E(s.container, It), children: [
897
+ /* @__PURE__ */ r.jsxs("div", { className: s.headerRow, children: [
898
+ /* @__PURE__ */ r.jsxs("div", { className: E(s.flexRow, s.toolbarGroup), children: [
899
+ /* @__PURE__ */ r.jsx("label", { className: s.labelMuted, children: "Rows:" }),
877
900
  /* @__PURE__ */ r.jsx(
878
901
  "select",
879
902
  {
880
- className: T(a.selectSmall, a.selectAuto),
903
+ className: E(s.selectSmall, s.selectAuto),
881
904
  value: N,
882
905
  onChange: (e) => D(() => {
883
- He(Number(e.target.value)), V(1);
906
+ He(Number(e.target.value)), H(1);
884
907
  }),
885
- children: je.map((e) => /* @__PURE__ */ r.jsx("option", { value: e, children: e === J ? "All" : e }, e))
908
+ children: Ne.map((e) => /* @__PURE__ */ r.jsx("option", { value: e, children: e === K ? "All" : e }, e))
886
909
  }
887
910
  ),
888
- /* @__PURE__ */ r.jsxs("div", { className: a.switchRow, children: [
911
+ /* @__PURE__ */ r.jsxs("div", { className: s.switchRow, children: [
889
912
  /* @__PURE__ */ r.jsx(
890
913
  "input",
891
914
  {
892
- className: a.checkbox,
915
+ className: s.checkbox,
893
916
  type: "checkbox",
894
- checked: se,
917
+ checked: le,
895
918
  onChange: (e) => D(() => xe(e.target.checked))
896
919
  }
897
920
  ),
898
- /* @__PURE__ */ r.jsx("label", { className: a.labelMuted, children: "Show Totals" })
921
+ /* @__PURE__ */ r.jsx("label", { className: s.labelMuted, children: "Show Totals" })
899
922
  ] }),
900
- /* @__PURE__ */ r.jsxs("div", { className: a.groupingSummary, children: [
901
- /* @__PURE__ */ r.jsxs("span", { className: a.labelMuted, children: [
923
+ /* @__PURE__ */ r.jsxs("div", { className: s.groupingSummary, children: [
924
+ /* @__PURE__ */ r.jsxs("span", { className: s.labelMuted, children: [
902
925
  "Group By:",
903
926
  " ",
904
- A.length ? A.map((e) => g.find((t) => t.key === e)?.label || e).join(" > ") : "None"
927
+ O.length ? O.map((e) => g.find((t) => t.key === e)?.label || e).join(" > ") : "None"
905
928
  ] }),
906
- A.length > 0 && /* @__PURE__ */ r.jsx(
929
+ O.length > 0 && /* @__PURE__ */ r.jsx(
907
930
  "button",
908
931
  {
909
- className: T(a.buttonBase, a.buttonMuted),
932
+ className: E(s.buttonBase, s.buttonMuted),
910
933
  onClick: () => {
911
934
  D(() => {
912
- re([]), ce({});
935
+ ne([]), ue({});
913
936
  });
914
937
  },
915
938
  children: "Clear Groups"
@@ -917,13 +940,13 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
917
940
  )
918
941
  ] })
919
942
  ] }),
920
- /* @__PURE__ */ r.jsxs("div", { className: T(a.flexRow, a.toolbarGroup), children: [
943
+ /* @__PURE__ */ r.jsxs("div", { className: E(s.flexRow, s.toolbarGroup), children: [
921
944
  /* @__PURE__ */ r.jsxs(
922
945
  "button",
923
946
  {
924
- className: T(a.buttonBase, a.buttonDanger),
947
+ className: E(s.buttonBase, s.buttonDanger),
925
948
  disabled: !Object.values(y).some((e) => e?.value),
926
- onClick: Ct,
949
+ onClick: Rt,
927
950
  children: [
928
951
  "✕",
929
952
  " ",
@@ -938,14 +961,14 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
938
961
  "⬇",
939
962
  " Export"
940
963
  ] }),
941
- children: /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { className: a.menuItemButton, onClick: Dt, children: "Export to CSV" }) })
964
+ children: /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { className: s.menuItemButton, onClick: Mt, children: "Export to CSV" }) })
942
965
  }
943
966
  ),
944
967
  /* @__PURE__ */ r.jsxs(
945
968
  "button",
946
969
  {
947
- className: T(a.buttonBase, a.buttonMuted),
948
- onClick: () => Ce(!0),
970
+ className: E(s.buttonBase, s.buttonMuted),
971
+ onClick: () => Re(!0),
949
972
  children: [
950
973
  "☰",
951
974
  " ",
@@ -964,10 +987,10 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
964
987
  /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs(
965
988
  "button",
966
989
  {
967
- className: a.menuItemButton,
990
+ className: s.menuItemButton,
968
991
  onClick: () => b("light"),
969
992
  children: [
970
- m === "light" ? "✓ " : "",
993
+ f === "light" ? "✓ " : "",
971
994
  "Light"
972
995
  ]
973
996
  }
@@ -975,10 +998,10 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
975
998
  /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs(
976
999
  "button",
977
1000
  {
978
- className: a.menuItemButton,
1001
+ className: s.menuItemButton,
979
1002
  onClick: () => b("dark"),
980
1003
  children: [
981
- m === "dark" ? "✓ " : "",
1004
+ f === "dark" ? "✓ " : "",
982
1005
  "Dark"
983
1006
  ]
984
1007
  }
@@ -986,10 +1009,10 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
986
1009
  /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs(
987
1010
  "button",
988
1011
  {
989
- className: a.menuItemButton,
1012
+ className: s.menuItemButton,
990
1013
  onClick: () => b("purple"),
991
1014
  children: [
992
- m === "purple" ? "✓ " : "",
1015
+ f === "purple" ? "✓ " : "",
993
1016
  "Purple"
994
1017
  ]
995
1018
  }
@@ -999,67 +1022,67 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
999
1022
  )
1000
1023
  ] })
1001
1024
  ] }),
1002
- /* @__PURE__ */ r.jsxs("div", { className: a.relative, children: [
1003
- /* @__PURE__ */ r.jsx("div", { className: a.srOnly, "aria-live": "polite", children: ve ? "Loading table data" : "Table updated" }),
1004
- Lt && /* @__PURE__ */ r.jsx("div", { className: a.overlay, children: /* @__PURE__ */ r.jsxs(
1025
+ /* @__PURE__ */ r.jsxs("div", { className: s.relative, children: [
1026
+ /* @__PURE__ */ r.jsx("div", { className: s.srOnly, "aria-live": "polite", children: ke ? "Loading table data" : "Table updated" }),
1027
+ Lt && /* @__PURE__ */ r.jsx("div", { className: s.overlay, children: /* @__PURE__ */ r.jsxs(
1005
1028
  "div",
1006
1029
  {
1007
- className: a.overlayInner,
1030
+ className: s.overlayInner,
1008
1031
  style: { top: "15%" },
1009
1032
  children: [
1010
- /* @__PURE__ */ r.jsx("div", { className: a.spinner, role: "status" }),
1011
- /* @__PURE__ */ r.jsx("div", { className: a.labelMuted, children: ve ? "Loading data..." : "Updating..." })
1033
+ /* @__PURE__ */ r.jsx("div", { className: s.spinner, role: "status" }),
1034
+ /* @__PURE__ */ r.jsx("div", { className: s.labelMuted, children: ke ? "Loading data..." : "Updating..." })
1012
1035
  ]
1013
1036
  }
1014
1037
  ) }),
1015
1038
  /* @__PURE__ */ r.jsx(
1016
1039
  "div",
1017
1040
  {
1018
- className: T(
1019
- a.tableWrap,
1020
- N === J && a.tableWrapAll
1041
+ className: E(
1042
+ s.tableWrap,
1043
+ N === K && s.tableWrapAll
1021
1044
  ),
1022
1045
  ref: Le,
1023
- style: N === J ? { maxHeight: "70vh", overflowY: "auto" } : {},
1024
- onScroll: Ot,
1046
+ style: N === K ? { maxHeight: "70vh", overflowY: "auto" } : {},
1047
+ onScroll: Dt,
1025
1048
  children: /* @__PURE__ */ r.jsxs(
1026
1049
  "table",
1027
1050
  {
1028
- className: a.table,
1051
+ className: s.table,
1029
1052
  style: { tableLayout: "fixed" },
1030
1053
  role: "grid",
1031
- "aria-rowcount": P ? Je.length : K.length,
1032
- "aria-colcount": L.length,
1054
+ "aria-rowcount": P ? Xe.length : Z.length,
1055
+ "aria-colcount": B.length,
1033
1056
  children: [
1034
- /* @__PURE__ */ r.jsxs("thead", { className: a.tableHead, children: [
1035
- /* @__PURE__ */ r.jsx("tr", { ref: Ze, children: L.map((e) => {
1036
- const t = $.key === e.key, o = t ? $.direction === "asc" ? "↑" : "↓" : "⇅";
1057
+ /* @__PURE__ */ r.jsxs("thead", { className: s.tableHead, children: [
1058
+ /* @__PURE__ */ r.jsx("tr", { ref: Ze, children: B.map((e) => {
1059
+ const t = $.key === e.key, n = t ? $.direction === "asc" ? "↑" : "↓" : "⇅";
1037
1060
  return /* @__PURE__ */ r.jsxs(
1038
1061
  "th",
1039
1062
  {
1040
1063
  scope: "col",
1041
1064
  "aria-sort": t ? $.direction === "asc" ? "ascending" : "descending" : "none",
1042
1065
  draggable: !0,
1043
- onDragStart: (s) => ct(s, e.key),
1066
+ onDragStart: (a) => ct(a, e.key),
1044
1067
  onDragOver: dt,
1045
- onDrop: (s) => ut(s, e.key),
1068
+ onDrop: (a) => ut(a, e.key),
1046
1069
  style: {
1047
- width: fe[e.key]
1070
+ width: ge[e.key]
1048
1071
  },
1049
- className: a.thCellTop,
1072
+ className: s.thCellTop,
1050
1073
  children: [
1051
- /* @__PURE__ */ r.jsx("div", { className: a.thInner, children: /* @__PURE__ */ r.jsxs(
1074
+ /* @__PURE__ */ r.jsx("div", { className: s.thInner, children: /* @__PURE__ */ r.jsxs(
1052
1075
  "button",
1053
1076
  {
1054
1077
  type: "button",
1055
- className: a.sortButton,
1078
+ className: s.sortButton,
1056
1079
  "aria-label": `Sort by ${e.label}`,
1057
- onClick: () => Rt(e.key),
1080
+ onClick: () => Tt(e.key),
1058
1081
  children: [
1059
1082
  e.label,
1060
- /* @__PURE__ */ r.jsxs("span", { className: a.iconMuted, children: [
1083
+ /* @__PURE__ */ r.jsxs("span", { className: s.iconMuted, children: [
1061
1084
  " ",
1062
- o
1085
+ n
1063
1086
  ] })
1064
1087
  ]
1065
1088
  }
@@ -1067,13 +1090,13 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1067
1090
  /* @__PURE__ */ r.jsx(
1068
1091
  "span",
1069
1092
  {
1070
- className: a.resizeHandle,
1093
+ className: s.resizeHandle,
1071
1094
  role: "separator",
1072
1095
  "aria-orientation": "vertical",
1073
1096
  "aria-label": `Resize ${e.label} column`,
1074
1097
  tabIndex: 0,
1075
- onPointerDown: (s) => Mt(s, e.key),
1076
- onDoubleClick: (s) => Pt(s, e.key)
1098
+ onPointerDown: (a) => Pt(a, e.key),
1099
+ onDoubleClick: (a) => Bt(a, e.key)
1077
1100
  }
1078
1101
  )
1079
1102
  ]
@@ -1081,18 +1104,18 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1081
1104
  e.key
1082
1105
  );
1083
1106
  }) }),
1084
- /* @__PURE__ */ r.jsx("tr", { children: L.map((e) => /* @__PURE__ */ r.jsx(
1107
+ /* @__PURE__ */ r.jsx("tr", { children: B.map((e) => /* @__PURE__ */ r.jsx(
1085
1108
  "th",
1086
1109
  {
1087
1110
  style: {
1088
- top: vt
1111
+ top: kt
1089
1112
  },
1090
- className: a.thCellFilter,
1091
- children: X(e.key) === "number" ? /* @__PURE__ */ r.jsxs("div", { className: a.inlineGroup, children: [
1113
+ className: s.thCellFilter,
1114
+ children: X(e.key) === "number" ? /* @__PURE__ */ r.jsxs("div", { className: s.inlineGroup, children: [
1092
1115
  /* @__PURE__ */ r.jsxs(
1093
1116
  "select",
1094
1117
  {
1095
- className: T(a.selectSmall, a.selectAuto),
1118
+ className: E(s.selectSmall, s.selectAuto),
1096
1119
  value: y[e.key]?.op || "=",
1097
1120
  onChange: (t) => Ee(e.key, {
1098
1121
  type: "number",
@@ -1110,7 +1133,7 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1110
1133
  "input",
1111
1134
  {
1112
1135
  type: "number",
1113
- className: a.input,
1136
+ className: s.input,
1114
1137
  value: y[e.key]?.value || "",
1115
1138
  onChange: (t) => Ee(e.key, {
1116
1139
  type: "number",
@@ -1118,11 +1141,11 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1118
1141
  })
1119
1142
  }
1120
1143
  )
1121
- ] }) : X(e.key) === "date" ? /* @__PURE__ */ r.jsxs("div", { className: a.inlineGroup, children: [
1144
+ ] }) : X(e.key) === "date" ? /* @__PURE__ */ r.jsxs("div", { className: s.inlineGroup, children: [
1122
1145
  /* @__PURE__ */ r.jsxs(
1123
1146
  "select",
1124
1147
  {
1125
- className: T(a.selectSmall, a.selectAuto),
1148
+ className: E(s.selectSmall, s.selectAuto),
1126
1149
  value: y[e.key]?.op || "=",
1127
1150
  onChange: (t) => Ee(e.key, {
1128
1151
  type: "date",
@@ -1140,7 +1163,7 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1140
1163
  "input",
1141
1164
  {
1142
1165
  type: "date",
1143
- className: a.input,
1166
+ className: s.input,
1144
1167
  value: y[e.key]?.value || "",
1145
1168
  onChange: (t) => Ee(e.key, {
1146
1169
  type: "date",
@@ -1152,7 +1175,7 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1152
1175
  "input",
1153
1176
  {
1154
1177
  type: "text",
1155
- className: a.input,
1178
+ className: s.input,
1156
1179
  placeholder: "Filter...",
1157
1180
  value: y[e.key]?.value || "",
1158
1181
  onChange: (t) => Ee(e.key, {
@@ -1166,34 +1189,34 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1166
1189
  )) })
1167
1190
  ] }),
1168
1191
  /* @__PURE__ */ r.jsxs("tbody", { children: [
1169
- F && me.topSpacer > 0 && /* @__PURE__ */ r.jsx("tr", { "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
1192
+ W && fe.topSpacer > 0 && /* @__PURE__ */ r.jsx("tr", { "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
1170
1193
  "td",
1171
1194
  {
1172
- colSpan: L.length,
1173
- style: { height: `${me.topSpacer}px`, padding: 0 }
1195
+ colSpan: B.length,
1196
+ style: { height: `${fe.topSpacer}px`, padding: 0 }
1174
1197
  }
1175
1198
  ) }),
1176
- (P ? Je : F ? me.rows : K).map((e) => {
1199
+ (P ? Xe : W ? fe.rows : Z).map((e) => {
1177
1200
  if (P && e.type === "group") {
1178
- const o = g.find((h) => h.key === e.groupKey)?.label || e.groupKey, s = !!ie[e.id], l = it(e.aggregates).join(" || ");
1179
- return /* @__PURE__ */ r.jsx("tr", { className: T(a.groupRow, a.groupRowAnimated), children: /* @__PURE__ */ r.jsx("td", { colSpan: L.length, children: /* @__PURE__ */ r.jsxs(
1201
+ const n = g.find((c) => c.key === e.groupKey)?.label || e.groupKey, a = !!ce[e.id], l = it(e.aggregates).join(" || ");
1202
+ return /* @__PURE__ */ r.jsx("tr", { className: E(s.groupRow, s.groupRowAnimated), children: /* @__PURE__ */ r.jsx("td", { colSpan: B.length, children: /* @__PURE__ */ r.jsxs(
1180
1203
  "button",
1181
1204
  {
1182
1205
  type: "button",
1183
- className: a.groupToggle,
1184
- onClick: () => Tt(e.id),
1206
+ className: s.groupToggle,
1207
+ onClick: () => Ot(e.id),
1185
1208
  children: [
1186
1209
  /* @__PURE__ */ r.jsxs("span", { style: { paddingLeft: `${e.level * 18}px` }, children: [
1187
- s ? "▶" : "▼",
1210
+ a ? "▶" : "▼",
1188
1211
  " ",
1189
- o,
1212
+ n,
1190
1213
  ": ",
1191
1214
  e.groupValue,
1192
1215
  " (",
1193
1216
  e.count,
1194
1217
  ")"
1195
1218
  ] }),
1196
- l && /* @__PURE__ */ r.jsxs("span", { className: a.groupMeta, children: [
1219
+ l && /* @__PURE__ */ r.jsxs("span", { className: s.groupMeta, children: [
1197
1220
  " ",
1198
1221
  l
1199
1222
  ] })
@@ -1205,67 +1228,67 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1205
1228
  return /* @__PURE__ */ r.jsx(
1206
1229
  "tr",
1207
1230
  {
1208
- className: T(
1209
- a.rowInteractive,
1210
- P && a.groupChildRow
1231
+ className: E(
1232
+ s.rowInteractive,
1233
+ P && s.groupChildRow
1211
1234
  ),
1212
1235
  tabIndex: 0,
1213
- children: L.map((o) => {
1214
- const s = oe(t, o.key);
1215
- return typeof s == "boolean" ? /* @__PURE__ */ r.jsx(
1236
+ children: B.map((n) => {
1237
+ const a = se(t, n.key);
1238
+ return typeof a == "boolean" ? /* @__PURE__ */ r.jsx(
1216
1239
  "td",
1217
1240
  {
1218
- "data-label": o.label,
1219
- style: { width: fe[o.key] },
1241
+ "data-label": n.label,
1242
+ style: { width: ge[n.key] },
1220
1243
  children: /* @__PURE__ */ r.jsx(
1221
1244
  "input",
1222
1245
  {
1223
1246
  type: "checkbox",
1224
- checked: s,
1247
+ checked: a,
1225
1248
  disabled: !0,
1226
- className: a.checkbox
1249
+ className: s.checkbox
1227
1250
  }
1228
1251
  )
1229
1252
  },
1230
- o.key
1231
- ) : X(o.key) === "date" ? /* @__PURE__ */ r.jsx(
1253
+ n.key
1254
+ ) : X(n.key) === "date" ? /* @__PURE__ */ r.jsx(
1232
1255
  "td",
1233
1256
  {
1234
- "data-label": o.label,
1235
- style: { width: fe[o.key] },
1236
- children: St(s)
1257
+ "data-label": n.label,
1258
+ style: { width: ge[n.key] },
1259
+ children: St(a)
1237
1260
  },
1238
- o.key
1261
+ n.key
1239
1262
  ) : /* @__PURE__ */ r.jsx(
1240
1263
  "td",
1241
1264
  {
1242
- "data-label": o.label,
1243
- style: { width: fe[o.key] },
1244
- children: s
1265
+ "data-label": n.label,
1266
+ style: { width: ge[n.key] },
1267
+ children: a
1245
1268
  },
1246
- o.key
1269
+ n.key
1247
1270
  );
1248
1271
  })
1249
1272
  },
1250
- P ? e.id : t[Oe(w)] ?? t[w]
1273
+ P ? e.id : t[De(w)] ?? t[w]
1251
1274
  );
1252
1275
  }),
1253
- F && me.bottomSpacer > 0 && /* @__PURE__ */ r.jsx("tr", { "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
1276
+ W && fe.bottomSpacer > 0 && /* @__PURE__ */ r.jsx("tr", { "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
1254
1277
  "td",
1255
1278
  {
1256
- colSpan: L.length,
1257
- style: { height: `${me.bottomSpacer}px`, padding: 0 }
1279
+ colSpan: B.length,
1280
+ style: { height: `${fe.bottomSpacer}px`, padding: 0 }
1258
1281
  }
1259
1282
  ) })
1260
1283
  ] }),
1261
- se && $e && Object.keys($e).length > 0 && /* @__PURE__ */ r.jsxs("tfoot", { className: a.tfoot, children: [
1262
- /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx("td", { colSpan: L.length, className: a.textCenter, children: "Totals" }) }),
1263
- /* @__PURE__ */ r.jsx("tr", { children: L.map((e) => /* @__PURE__ */ r.jsx(
1284
+ le && $e && Object.keys($e).length > 0 && /* @__PURE__ */ r.jsxs("tfoot", { className: s.tfoot, children: [
1285
+ /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx("td", { colSpan: B.length, className: s.textCenter, children: "Totals" }) }),
1286
+ /* @__PURE__ */ r.jsx("tr", { children: B.map((e) => /* @__PURE__ */ r.jsx(
1264
1287
  "td",
1265
1288
  {
1266
1289
  "data-label": e.label,
1267
- style: { width: fe[e.key] },
1268
- children: $e[e.key] !== void 0 ? pe($e[e.key]) : ""
1290
+ style: { width: ge[e.key] },
1291
+ children: $e[e.key] !== void 0 ? me($e[e.key]) : ""
1269
1292
  },
1270
1293
  e.key
1271
1294
  )) })
@@ -1276,118 +1299,118 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1276
1299
  }
1277
1300
  )
1278
1301
  ] }),
1279
- !P && N !== J && Xe > 1 && /* @__PURE__ */ r.jsx("div", { className: a.paginationWrap, children: /* @__PURE__ */ r.jsxs("ul", { className: a.pagination, children: [
1302
+ !P && N !== K && Je > 1 && /* @__PURE__ */ r.jsx("div", { className: s.paginationWrap, children: /* @__PURE__ */ r.jsxs("ul", { className: s.pagination, children: [
1280
1303
  /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
1281
1304
  "button",
1282
1305
  {
1283
- className: a.pageButton,
1306
+ className: s.pageButton,
1284
1307
  disabled: z === 1,
1285
- onClick: () => D(() => V((e) => e - 1)),
1308
+ onClick: () => D(() => H((e) => e - 1)),
1286
1309
  children: "Prev"
1287
1310
  }
1288
1311
  ) }),
1289
- Array.from({ length: Xe }, (e, t) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
1312
+ Array.from({ length: Je }, (e, t) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
1290
1313
  "button",
1291
1314
  {
1292
- className: T(
1293
- a.pageButton,
1294
- z === t + 1 && a.pageButtonActive
1315
+ className: E(
1316
+ s.pageButton,
1317
+ z === t + 1 && s.pageButtonActive
1295
1318
  ),
1296
- onClick: () => D(() => V(t + 1)),
1319
+ onClick: () => D(() => H(t + 1)),
1297
1320
  children: t + 1
1298
1321
  }
1299
1322
  ) }, t)),
1300
1323
  /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
1301
1324
  "button",
1302
1325
  {
1303
- className: a.pageButton,
1304
- disabled: z === Xe,
1305
- onClick: () => D(() => V((e) => e + 1)),
1326
+ className: s.pageButton,
1327
+ disabled: z === Je,
1328
+ onClick: () => D(() => H((e) => e + 1)),
1306
1329
  children: "Next"
1307
1330
  }
1308
1331
  ) })
1309
1332
  ] }) }),
1310
- !P && N === J && /* @__PURE__ */ r.jsxs("div", { className: a.labelMuted, children: [
1333
+ !P && N === K && /* @__PURE__ */ r.jsxs("div", { className: s.labelMuted, children: [
1311
1334
  "Showing",
1312
1335
  " ",
1313
- (F ? me.end : K.length).toLocaleString(),
1336
+ (W ? fe.end : Z.length).toLocaleString(),
1314
1337
  " of",
1315
1338
  " ",
1316
1339
  M.length.toLocaleString(),
1317
1340
  " rows",
1318
- F ? " (virtualized)" : ""
1341
+ W ? " (virtualized)" : ""
1319
1342
  ] }),
1320
- P && /* @__PURE__ */ r.jsxs("div", { className: a.labelMuted, children: [
1343
+ P && /* @__PURE__ */ r.jsxs("div", { className: s.labelMuted, children: [
1321
1344
  "Grouped view: ",
1322
1345
  M.length.toLocaleString(),
1323
1346
  " rows across",
1324
1347
  " ",
1325
- A.length,
1348
+ O.length,
1326
1349
  " level",
1327
- A.length > 1 ? "s" : ""
1350
+ O.length > 1 ? "s" : ""
1328
1351
  ] }),
1329
1352
  Se && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1330
- /* @__PURE__ */ r.jsx("div", { className: a.backdrop, onClick: () => Ce(!1) }),
1331
- /* @__PURE__ */ r.jsxs("div", { className: a.drawer, children: [
1332
- /* @__PURE__ */ r.jsx("h6", { className: a.drawerTitle, children: "Column Settings" }),
1333
- /* @__PURE__ */ r.jsx("h6", { className: a.drawerSubtitle, children: "Visible Columns" }),
1334
- ne.map((e) => {
1335
- const t = g.find((o) => o.key === e);
1353
+ /* @__PURE__ */ r.jsx("div", { className: s.backdrop, onClick: () => Re(!1) }),
1354
+ /* @__PURE__ */ r.jsxs("div", { className: s.drawer, children: [
1355
+ /* @__PURE__ */ r.jsx("h6", { className: s.drawerTitle, children: "Column Settings" }),
1356
+ /* @__PURE__ */ r.jsx("h6", { className: s.drawerSubtitle, children: "Visible Columns" }),
1357
+ oe.map((e) => {
1358
+ const t = g.find((n) => n.key === e);
1336
1359
  return t ? /* @__PURE__ */ r.jsxs(
1337
1360
  "div",
1338
1361
  {
1339
- className: a.drawerRow,
1362
+ className: s.drawerRow,
1340
1363
  draggable: !0,
1341
- onDragStart: (o) => ct(o, t.key),
1364
+ onDragStart: (n) => ct(n, t.key),
1342
1365
  onDragOver: dt,
1343
- onDrop: (o) => ut(o, t.key),
1366
+ onDrop: (n) => ut(n, t.key),
1344
1367
  children: [
1345
1368
  /* @__PURE__ */ r.jsx(
1346
1369
  "input",
1347
1370
  {
1348
1371
  type: "checkbox",
1349
- className: a.checkbox,
1372
+ className: s.checkbox,
1350
1373
  checked: U.includes(t.key),
1351
1374
  onChange: () => D(
1352
- () => te(
1353
- (o) => o.includes(t.key) ? o.filter((s) => s !== t.key) : [...o, t.key]
1375
+ () => re(
1376
+ (n) => n.includes(t.key) ? n.filter((a) => a !== t.key) : [...n, t.key]
1354
1377
  )
1355
1378
  )
1356
1379
  }
1357
1380
  ),
1358
1381
  /* @__PURE__ */ r.jsx("label", { children: t.label }),
1359
- /* @__PURE__ */ r.jsx("span", { className: T(a.spacerAuto, a.iconMuted), children: "⋮" })
1382
+ /* @__PURE__ */ r.jsx("span", { className: E(s.spacerAuto, s.iconMuted), children: "⋮" })
1360
1383
  ]
1361
1384
  },
1362
1385
  t.key
1363
1386
  ) : null;
1364
1387
  }),
1365
- /* @__PURE__ */ r.jsxs("div", { className: a.drawerSection, children: [
1388
+ /* @__PURE__ */ r.jsxs("div", { className: s.drawerSection, children: [
1366
1389
  /* @__PURE__ */ r.jsxs(
1367
1390
  "button",
1368
1391
  {
1369
1392
  type: "button",
1370
- className: a.sectionToggle,
1393
+ className: s.sectionToggle,
1371
1394
  "aria-expanded": G.groupBy,
1372
- onClick: () => ue((e) => ({
1395
+ onClick: () => de((e) => ({
1373
1396
  ...e,
1374
1397
  groupBy: !e.groupBy
1375
1398
  })),
1376
1399
  children: [
1377
1400
  /* @__PURE__ */ r.jsx("span", { children: "Group By Columns" }),
1378
- /* @__PURE__ */ r.jsx("span", { className: a.iconMuted, children: G.groupBy ? "▲" : "▼" })
1401
+ /* @__PURE__ */ r.jsx("span", { className: s.iconMuted, children: G.groupBy ? "▲" : "▼" })
1379
1402
  ]
1380
1403
  }
1381
1404
  ),
1382
- G.groupBy && /* @__PURE__ */ r.jsx("div", { className: a.sectionBody, children: ne.map((e) => {
1383
- const t = g.find((o) => o.key === e);
1384
- return t ? /* @__PURE__ */ r.jsxs("div", { className: a.drawerRow, children: [
1405
+ G.groupBy && /* @__PURE__ */ r.jsx("div", { className: s.sectionBody, children: oe.map((e) => {
1406
+ const t = g.find((n) => n.key === e);
1407
+ return t ? /* @__PURE__ */ r.jsxs("div", { className: s.drawerRow, children: [
1385
1408
  /* @__PURE__ */ r.jsx(
1386
1409
  "input",
1387
1410
  {
1388
1411
  type: "checkbox",
1389
- className: a.checkbox,
1390
- checked: A.includes(t.key),
1412
+ className: s.checkbox,
1413
+ checked: O.includes(t.key),
1391
1414
  onChange: () => Et(t.key)
1392
1415
  }
1393
1416
  ),
@@ -1395,34 +1418,34 @@ ${l}`, f = new Blob([h], { type: "text/csv;charset=utf-8;" }), _ = URL.createObj
1395
1418
  ] }, `group-${t.key}`) : null;
1396
1419
  }) })
1397
1420
  ] }),
1398
- /* @__PURE__ */ r.jsxs("div", { className: a.drawerSection, children: [
1421
+ /* @__PURE__ */ r.jsxs("div", { className: s.drawerSection, children: [
1399
1422
  /* @__PURE__ */ r.jsxs(
1400
1423
  "button",
1401
1424
  {
1402
1425
  type: "button",
1403
- className: a.sectionToggle,
1426
+ className: s.sectionToggle,
1404
1427
  "aria-expanded": G.aggregates,
1405
- onClick: () => ue((e) => ({
1428
+ onClick: () => de((e) => ({
1406
1429
  ...e,
1407
1430
  aggregates: !e.aggregates
1408
1431
  })),
1409
1432
  children: [
1410
1433
  /* @__PURE__ */ r.jsx("span", { children: "Show Total/Aggregate For" }),
1411
- /* @__PURE__ */ r.jsx("span", { className: a.iconMuted, children: G.aggregates ? "▲" : "▼" })
1434
+ /* @__PURE__ */ r.jsx("span", { className: s.iconMuted, children: G.aggregates ? "▲" : "▼" })
1412
1435
  ]
1413
1436
  }
1414
1437
  ),
1415
- G.aggregates && /* @__PURE__ */ r.jsxs("div", { className: a.sectionBody, children: [
1416
- Ie.length === 0 && /* @__PURE__ */ r.jsx("div", { className: a.labelMuted, children: "No numeric columns available." }),
1417
- ne.map((e) => {
1418
- const t = Ie.find((o) => o.key === e);
1419
- return t ? /* @__PURE__ */ r.jsxs("div", { className: a.drawerRow, children: [
1438
+ G.aggregates && /* @__PURE__ */ r.jsxs("div", { className: s.sectionBody, children: [
1439
+ Ie.length === 0 && /* @__PURE__ */ r.jsx("div", { className: s.labelMuted, children: "No numeric columns available." }),
1440
+ oe.map((e) => {
1441
+ const t = Ie.find((n) => n.key === e);
1442
+ return t ? /* @__PURE__ */ r.jsxs("div", { className: s.drawerRow, children: [
1420
1443
  /* @__PURE__ */ r.jsx(
1421
1444
  "input",
1422
1445
  {
1423
1446
  type: "checkbox",
1424
- className: a.checkbox,
1425
- checked: n.includes(t.key),
1447
+ className: s.checkbox,
1448
+ checked: o.includes(t.key),
1426
1449
  onChange: () => At(t.key)
1427
1450
  }
1428
1451
  ),