@toolbox-web/grid 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/all.js +648 -651
  2. package/all.js.map +1 -1
  3. package/index.js +668 -583
  4. package/index.js.map +1 -1
  5. package/lib/core/grid.d.ts +46 -0
  6. package/lib/core/grid.d.ts.map +1 -1
  7. package/lib/core/types.d.ts +114 -0
  8. package/lib/core/types.d.ts.map +1 -1
  9. package/lib/plugins/clipboard/index.js.map +1 -1
  10. package/lib/plugins/column-virtualization/index.js.map +1 -1
  11. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
  12. package/lib/plugins/context-menu/index.js +72 -71
  13. package/lib/plugins/context-menu/index.js.map +1 -1
  14. package/lib/plugins/editing/index.js.map +1 -1
  15. package/lib/plugins/export/index.js.map +1 -1
  16. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  17. package/lib/plugins/filtering/index.js +246 -250
  18. package/lib/plugins/filtering/index.js.map +1 -1
  19. package/lib/plugins/grouping-columns/index.js.map +1 -1
  20. package/lib/plugins/grouping-rows/index.js.map +1 -1
  21. package/lib/plugins/master-detail/index.js.map +1 -1
  22. package/lib/plugins/multi-sort/index.js.map +1 -1
  23. package/lib/plugins/pinned-columns/index.js.map +1 -1
  24. package/lib/plugins/pinned-rows/index.js.map +1 -1
  25. package/lib/plugins/pivot/index.js.map +1 -1
  26. package/lib/plugins/print/PrintPlugin.d.ts.map +1 -1
  27. package/lib/plugins/print/index.js +1 -1
  28. package/lib/plugins/print/index.js.map +1 -1
  29. package/lib/plugins/reorder/index.js.map +1 -1
  30. package/lib/plugins/responsive/index.js.map +1 -1
  31. package/lib/plugins/row-reorder/index.js.map +1 -1
  32. package/lib/plugins/selection/index.js.map +1 -1
  33. package/lib/plugins/server-side/index.js.map +1 -1
  34. package/lib/plugins/tree/index.js.map +1 -1
  35. package/lib/plugins/undo-redo/index.js.map +1 -1
  36. package/lib/plugins/visibility/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/public.d.ts +1 -1
  39. package/public.d.ts.map +1 -1
  40. package/umd/grid.all.umd.js +23 -23
  41. package/umd/grid.all.umd.js.map +1 -1
  42. package/umd/grid.umd.js +11 -11
  43. package/umd/grid.umd.js.map +1 -1
  44. package/umd/plugins/context-menu.umd.js +1 -1
  45. package/umd/plugins/context-menu.umd.js.map +1 -1
  46. package/umd/plugins/filtering.umd.js +1 -1
  47. package/umd/plugins/filtering.umd.js.map +1 -1
  48. package/umd/plugins/print.umd.js +1 -1
  49. package/umd/plugins/print.umd.js.map +1 -1
package/all.js CHANGED
@@ -1,20 +1,20 @@
1
- import { BaseGridPlugin as _, DEFAULT_GRID_ICONS as at, a as lt, runAggregator as te, e as dt, s as ct, PLUGIN_QUERIES as Je, getAggregator as ye, getValueAggregator as ut, b as D, c as xe, g as ht } from "./index.js";
2
- import { DEFAULT_ANIMATION_CONFIG as Fn, DGEvents as In, DataGridElement as Pn, FitModeEnum as Dn, GridCSSVars as Mn, GridClasses as Nn, GridDataAttrs as qn, DataGridElement as Hn, GridSelectors as zn, PluginEvents as Kn, PluginManager as On, RenderPhase as Gn, builtInSort as Bn, createGrid as Vn, defaultComparator as Wn, queryGrid as $n } from "./index.js";
3
- const Qe = "__tbw_expander", gt = 32;
4
- function pe(s) {
5
- return s.field === Qe;
1
+ import { BaseGridPlugin as A, DEFAULT_GRID_ICONS as st, a as at, runAggregator as ee, e as lt, s as dt, PLUGIN_QUERIES as Ze, getAggregator as ve, getValueAggregator as ct, b as D, c as ye, g as ut } from "./index.js";
2
+ import { DEFAULT_ANIMATION_CONFIG as Ln, DGEvents as Fn, DataGridElement as In, FitModeEnum as Pn, GridCSSVars as Dn, GridClasses as Mn, GridDataAttrs as Nn, DataGridElement as qn, GridSelectors as Hn, PluginEvents as zn, PluginManager as Kn, RenderPhase as On, builtInSort as Gn, createGrid as Bn, defaultComparator as Vn, queryGrid as Wn } from "./index.js";
3
+ const Je = "__tbw_expander", ht = 32;
4
+ function fe(s) {
5
+ return s.field === Je;
6
6
  }
7
- function H(s) {
7
+ function q(s) {
8
8
  return s.meta?.utility === !0;
9
9
  }
10
- function ft(s) {
11
- return s.find(pe);
10
+ function gt(s) {
11
+ return s.find(fe);
12
12
  }
13
- function pt(s) {
13
+ function ft(s) {
14
14
  return {
15
- field: Qe,
15
+ field: Je,
16
16
  header: "",
17
- width: gt,
17
+ width: ht,
18
18
  resizable: !1,
19
19
  sortable: !1,
20
20
  filterable: !1,
@@ -27,7 +27,7 @@ function pt(s) {
27
27
  }
28
28
  };
29
29
  }
30
- async function ie(s) {
30
+ async function te(s) {
31
31
  try {
32
32
  return await navigator.clipboard.writeText(s), !0;
33
33
  } catch {
@@ -37,7 +37,7 @@ async function ie(s) {
37
37
  return document.body.removeChild(e), t;
38
38
  }
39
39
  }
40
- function Ce(s, e) {
40
+ function xe(s, e) {
41
41
  const t = e.delimiter ?? " ", i = e.newline ?? `
42
42
  `, n = s.replace(/\r\n/g, `
43
43
  `).replace(/\r/g, `
@@ -49,14 +49,14 @@ function Ce(s, e) {
49
49
  }
50
50
  return o.push(a), (o.length > 1 || o.some((d) => d.trim() !== "")) && r.push(o), r;
51
51
  }
52
- async function mt() {
52
+ async function pt() {
53
53
  try {
54
54
  return await navigator.clipboard.readText();
55
55
  } catch {
56
56
  return "";
57
57
  }
58
58
  }
59
- function wt(s, e) {
59
+ function mt(s, e) {
60
60
  const { rows: t, target: i, fields: n } = s;
61
61
  if (!i) return;
62
62
  const r = e.rows, o = e.effectiveConfig.columns ?? [], a = o.map((u) => u.field), l = /* @__PURE__ */ new Map();
@@ -81,7 +81,7 @@ function wt(s, e) {
81
81
  }
82
82
  }), e.rows = d;
83
83
  }
84
- class hn extends _ {
84
+ class un extends A {
85
85
  static dependencies = [
86
86
  { name: "selection", required: !1, reason: "Enables copy/paste of selected cells instead of entire grid" }
87
87
  ];
@@ -133,7 +133,7 @@ class hn extends _ {
133
133
  o = { startRow: l.row, startCol: l.col, endRow: l.row, endCol: l.col };
134
134
  }
135
135
  const a = this.#i(o);
136
- ie(a.text).then(() => {
136
+ te(a.text).then(() => {
137
137
  this.lastCopied = { text: a.text, timestamp: Date.now() }, this.emit("copy", {
138
138
  text: a.text,
139
139
  rowCount: a.rowCount,
@@ -145,10 +145,10 @@ class hn extends _ {
145
145
  const t = e.clipboardData?.getData("text/plain");
146
146
  if (!t) return;
147
147
  e.preventDefault();
148
- const i = Ce(t, this.config), r = this.#n()?.getSelection(), o = r?.ranges?.[0], a = o?.from.row ?? 0, l = o?.from.col ?? 0, c = o && (r?.mode === "range" || r?.mode === "row") && (o.from.row !== o.to.row || o.from.col !== o.to.col) ? { endRow: o.to.row, endCol: o.to.col } : null, u = c?.endCol ?? this.columns.length - 1, h = this.columns[l], g = h ? { row: a, col: l, field: h.field, bounds: c } : null, f = [], p = i[0]?.length ?? 0;
149
- for (let v = 0; v < p && l + v <= u; v++) {
150
- const y = this.columns[l + v];
151
- y && !y.hidden && f.push(y.field);
148
+ const i = xe(t, this.config), r = this.#n()?.getSelection(), o = r?.ranges?.[0], a = o?.from.row ?? 0, l = o?.from.col ?? 0, c = o && (r?.mode === "range" || r?.mode === "row") && (o.from.row !== o.to.row || o.from.col !== o.to.col) ? { endRow: o.to.row, endCol: o.to.col } : null, u = c?.endCol ?? this.columns.length - 1, h = this.columns[l], g = h ? { row: a, col: l, field: h.field, bounds: c } : null, f = [], p = i[0]?.length ?? 0;
149
+ for (let b = 0; b < p && l + b <= u; b++) {
150
+ const v = this.columns[l + b];
151
+ v && !v.hidden && f.push(v.field);
152
152
  }
153
153
  const w = { rows: i, text: t, target: g, fields: f };
154
154
  this.emit("paste", w), this.#o(w);
@@ -157,7 +157,7 @@ class hn extends _ {
157
157
  if (!this.grid) return;
158
158
  const { pasteHandler: t } = this.config;
159
159
  if (t === null) return;
160
- (t ?? wt)(e, this.grid);
160
+ (t ?? mt)(e, this.grid);
161
161
  }
162
162
  #n() {
163
163
  try {
@@ -169,7 +169,7 @@ class hn extends _ {
169
169
  }
170
170
  #i(e) {
171
171
  const { startRow: t, startCol: i, endRow: n, endCol: r } = e, o = Math.min(t, n), a = Math.max(t, n), l = Math.min(i, r), d = Math.max(i, r), c = this.config.delimiter ?? " ", u = this.config.newline ?? `
172
- `, h = [], g = this.columns.slice(l, d + 1).filter((f) => !H(f));
172
+ `, h = [], g = this.columns.slice(l, d + 1).filter((f) => !q(f));
173
173
  if (this.config.includeHeaders) {
174
174
  const f = g.map((p) => p.header || p.field);
175
175
  h.push(f.join(c));
@@ -177,9 +177,9 @@ class hn extends _ {
177
177
  for (let f = o; f <= a; f++) {
178
178
  const p = this.rows[f];
179
179
  if (!p) continue;
180
- const w = g.map((v) => {
181
- const y = p[v.field];
182
- return y == null ? "" : y instanceof Date ? y.toISOString() : String(y);
180
+ const w = g.map((b) => {
181
+ const v = p[b.field];
182
+ return v == null ? "" : v instanceof Date ? v.toISOString() : String(v);
183
183
  });
184
184
  h.push(w.join(c));
185
185
  }
@@ -212,7 +212,7 @@ class hn extends _ {
212
212
  };
213
213
  }
214
214
  const r = this.#i(n);
215
- return await ie(r.text), this.lastCopied = { text: r.text, timestamp: Date.now() }, r.text;
215
+ return await te(r.text), this.lastCopied = { text: r.text, timestamp: Date.now() }, r.text;
216
216
  }
217
217
  async copyRows(e) {
218
218
  if (e.length === 0) return "";
@@ -222,43 +222,43 @@ class hn extends _ {
222
222
  endRow: t[t.length - 1],
223
223
  endCol: i
224
224
  }, r = this.#i(n);
225
- return await ie(r.text), this.lastCopied = { text: r.text, timestamp: Date.now() }, r.text;
225
+ return await te(r.text), this.lastCopied = { text: r.text, timestamp: Date.now() }, r.text;
226
226
  }
227
227
  async paste() {
228
- const e = await mt();
229
- return e ? Ce(e, this.config) : null;
228
+ const e = await pt();
229
+ return e ? xe(e, this.config) : null;
230
230
  }
231
231
  getLastCopied() {
232
232
  return this.lastCopied;
233
233
  }
234
234
  }
235
- const Ee = 100;
236
- function me(s) {
235
+ const Ce = 100;
236
+ function pe(s) {
237
237
  if (s == null)
238
- return Ee;
238
+ return Ce;
239
239
  if (typeof s == "number")
240
240
  return s;
241
241
  const e = parseFloat(s);
242
- return isNaN(e) ? Ee : e;
242
+ return isNaN(e) ? Ce : e;
243
243
  }
244
- function Re(s) {
245
- return s.map((e) => me(e.width));
244
+ function Ee(s) {
245
+ return s.map((e) => pe(e.width));
246
246
  }
247
- function Se(s) {
247
+ function Re(s) {
248
248
  const e = [];
249
249
  let t = 0;
250
250
  for (const i of s)
251
- e.push(t), t += me(i.width);
251
+ e.push(t), t += pe(i.width);
252
252
  return e;
253
253
  }
254
- function ke(s) {
255
- return s.reduce((e, t) => e + me(t.width), 0);
254
+ function Se(s) {
255
+ return s.reduce((e, t) => e + pe(t.width), 0);
256
256
  }
257
- function bt(s, e, t, i, n) {
257
+ function wt(s, e, t, i, n) {
258
258
  const r = t.length;
259
259
  if (r === 0)
260
260
  return { startCol: 0, endCol: 0, visibleColumns: [] };
261
- let o = vt(s, t, i);
261
+ let o = bt(s, t, i);
262
262
  o = Math.max(0, o - n);
263
263
  const a = s + e;
264
264
  let l = o;
@@ -275,7 +275,7 @@ function bt(s, e, t, i, n) {
275
275
  d.push(c);
276
276
  return { startCol: o, endCol: l, visibleColumns: d };
277
277
  }
278
- function vt(s, e, t) {
278
+ function bt(s, e, t) {
279
279
  let i = 0, n = e.length - 1;
280
280
  for (; i < n; ) {
281
281
  const r = Math.floor((i + n) / 2);
@@ -283,10 +283,10 @@ function vt(s, e, t) {
283
283
  }
284
284
  return i;
285
285
  }
286
- function yt(s, e, t) {
286
+ function vt(s, e, t) {
287
287
  return t ? s > e : !1;
288
288
  }
289
- class gn extends _ {
289
+ class hn extends A {
290
290
  name = "columnVirtualization";
291
291
  get defaultConfig() {
292
292
  return {
@@ -305,16 +305,16 @@ class gn extends _ {
305
305
  attach(e) {
306
306
  super.attach(e);
307
307
  const t = this.columns;
308
- this.columnWidths = Re(t), this.columnOffsets = Se(t), this.totalWidth = ke(t), this.endCol = t.length - 1;
308
+ this.columnWidths = Ee(t), this.columnOffsets = Re(t), this.totalWidth = Se(t), this.endCol = t.length - 1;
309
309
  }
310
310
  detach() {
311
311
  this.columnWidths = [], this.columnOffsets = [], this.isVirtualized = !1, this.startCol = 0, this.endCol = 0, this.scrollLeft = 0, this.totalWidth = 0;
312
312
  }
313
313
  processColumns(e) {
314
- const t = yt(e.length, this.config.threshold ?? 30, this.config.autoEnable ?? !0);
315
- if (this.isVirtualized = t ?? !1, this.columnWidths = Re(e), this.columnOffsets = Se(e), this.totalWidth = ke(e), !t)
314
+ const t = vt(e.length, this.config.threshold ?? 30, this.config.autoEnable ?? !0);
315
+ if (this.isVirtualized = t ?? !1, this.columnWidths = Ee(e), this.columnOffsets = Re(e), this.totalWidth = Se(e), !t)
316
316
  return this.startCol = 0, this.endCol = e.length - 1, [...e];
317
- const i = this.grid.clientWidth || 800, n = bt(
317
+ const i = this.grid.clientWidth || 800, n = wt(
318
318
  this.scrollLeft,
319
319
  i,
320
320
  this.columnOffsets,
@@ -354,14 +354,14 @@ class gn extends _ {
354
354
  return this.totalWidth;
355
355
  }
356
356
  }
357
- const ne = "@layer tbw-plugins{.tbw-context-menu{position:fixed;background:var(--tbw-context-menu-bg, var(--tbw-color-panel-bg));color:var(--tbw-context-menu-fg, var(--tbw-color-fg));border:1px solid var(--tbw-context-menu-border, var(--tbw-color-border));border-radius:var(--tbw-context-menu-radius, var(--tbw-border-radius));box-shadow:0 2px 10px var(--tbw-context-menu-shadow, var(--tbw-color-shadow));min-width:var(--tbw-context-menu-min-width, var(--tbw-menu-min-width));padding:var(--tbw-spacing-xs) 0;z-index:10000;font-size:var(--tbw-context-menu-font-size, var(--tbw-font-size-sm));font-family:var(--tbw-context-menu-font-family, var(--tbw-font-family))}.tbw-context-menu-item{display:flex;align-items:center;padding:var(--tbw-context-menu-item-padding, var(--tbw-menu-item-padding));cursor:pointer;gap:var(--tbw-context-menu-item-gap, var(--tbw-menu-item-gap))}.tbw-context-menu-item:hover:not(.disabled){background:var(--tbw-context-menu-hover, var(--tbw-color-row-hover))}.tbw-context-menu-item.disabled{opacity:.5;cursor:default}.tbw-context-menu-item.danger{color:var(--tbw-context-menu-danger, var(--tbw-color-danger))}.tbw-context-menu-icon{width:var(--tbw-context-menu-icon-size, var(--tbw-icon-size));text-align:center}.tbw-context-menu-label{flex:1}.tbw-context-menu-shortcut{color:var(--tbw-context-menu-muted, var(--tbw-color-fg-muted));font-size:var(--tbw-context-menu-shortcut-size, var(--tbw-font-size-xs))}.tbw-context-menu-arrow{font-size:var(--tbw-context-menu-arrow-size, var(--tbw-font-size-2xs));color:var(--tbw-context-menu-muted, var(--tbw-color-fg-muted))}.tbw-context-menu-separator{height:1px;background:var(--tbw-context-menu-border, var(--tbw-color-border));margin:var(--tbw-spacing-xs) 0}}";
358
- function he(s, e) {
357
+ const ie = "@layer tbw-plugins{.tbw-context-menu{position:fixed;background:var(--tbw-context-menu-bg, var(--tbw-color-panel-bg));color:var(--tbw-context-menu-fg, var(--tbw-color-fg));border:1px solid var(--tbw-context-menu-border, var(--tbw-color-border));border-radius:var(--tbw-context-menu-radius, var(--tbw-border-radius));box-shadow:var(--tbw-context-menu-shadow, 0 2px 10px var(--tbw-color-shadow));min-width:var(--tbw-context-menu-min-width, var(--tbw-menu-min-width));padding:var(--tbw-spacing-xs) 0;z-index:10000;font-size:var(--tbw-context-menu-font-size, var(--tbw-font-size-sm));font-family:var(--tbw-context-menu-font-family, var(--tbw-font-family))}.tbw-context-menu-item{display:flex;align-items:center;padding:var(--tbw-context-menu-item-padding, var(--tbw-menu-item-padding));cursor:pointer;gap:var(--tbw-context-menu-item-gap, var(--tbw-menu-item-gap))}.tbw-context-menu-item:hover:not(.disabled){background:var(--tbw-context-menu-hover, var(--tbw-color-row-hover))}.tbw-context-menu-item.disabled{opacity:.5;cursor:default}.tbw-context-menu-item.danger{color:var(--tbw-context-menu-danger, var(--tbw-color-danger))}.tbw-context-menu-icon{width:var(--tbw-context-menu-icon-size, var(--tbw-icon-size));text-align:center}.tbw-context-menu-label{flex:1}.tbw-context-menu-shortcut{color:var(--tbw-context-menu-muted, var(--tbw-color-fg-muted));font-size:var(--tbw-context-menu-shortcut-size, var(--tbw-font-size-xs))}.tbw-context-menu-arrow{font-size:var(--tbw-context-menu-arrow-size, var(--tbw-font-size-2xs));color:var(--tbw-context-menu-muted, var(--tbw-color-fg-muted))}.tbw-context-menu-separator{height:1px;background:var(--tbw-context-menu-border, var(--tbw-color-border));margin:var(--tbw-spacing-xs) 0}}";
358
+ function ue(s, e) {
359
359
  return (typeof s == "function" ? s(e) : s).filter((i) => !(i.hidden === !0 || typeof i.hidden == "function" && i.hidden(e)));
360
360
  }
361
- function xt(s, e) {
361
+ function yt(s, e) {
362
362
  return s.disabled === !0 ? !0 : typeof s.disabled == "function" ? s.disabled(e) : !1;
363
363
  }
364
- function ge(s, e, t, i = at.submenuArrow) {
364
+ function he(s, e, t, i = st.submenuArrow) {
365
365
  const n = document.createElement("div");
366
366
  n.className = "tbw-context-menu", n.setAttribute("role", "menu");
367
367
  for (const r of s) {
@@ -372,7 +372,7 @@ function ge(s, e, t, i = at.submenuArrow) {
372
372
  }
373
373
  const o = document.createElement("div");
374
374
  o.className = "tbw-context-menu-item", r.cssClass && o.classList.add(r.cssClass), o.setAttribute("role", "menuitem"), o.setAttribute("data-id", r.id);
375
- const a = xt(r, e);
375
+ const a = yt(r, e);
376
376
  if (a && (o.classList.add("disabled"), o.setAttribute("aria-disabled", "true")), r.icon) {
377
377
  const d = document.createElement("span");
378
378
  d.className = "tbw-context-menu-icon", d.innerHTML = r.icon, o.appendChild(d);
@@ -386,7 +386,7 @@ function ge(s, e, t, i = at.submenuArrow) {
386
386
  const d = document.createElement("span");
387
387
  d.className = "tbw-context-menu-arrow", typeof i == "string" ? d.innerHTML = i : i instanceof HTMLElement && d.appendChild(i.cloneNode(!0)), o.appendChild(d), o.addEventListener("mouseenter", () => {
388
388
  if (o.querySelector(".tbw-context-menu") || !r.subMenu) return;
389
- const u = he(r.subMenu, e), h = ge(u, e, t, i);
389
+ const u = ue(r.subMenu, e), h = he(u, e, t, i);
390
390
  h.classList.add("tbw-context-submenu"), h.style.position = "absolute", h.style.left = "100%", h.style.top = "0", o.style.position = "relative", o.appendChild(h);
391
391
  }), o.addEventListener("mouseleave", () => {
392
392
  const c = o.querySelector(".tbw-context-menu");
@@ -399,14 +399,14 @@ function ge(s, e, t, i = at.submenuArrow) {
399
399
  }
400
400
  return n;
401
401
  }
402
- function Ae(s, e, t) {
402
+ function ke(s, e, t) {
403
403
  s.style.position = "fixed", s.style.left = `${e}px`, s.style.top = `${t}px`, s.style.visibility = "hidden", s.style.zIndex = "10000";
404
404
  const i = s.getBoundingClientRect(), n = window.innerWidth, r = window.innerHeight;
405
405
  let o = e, a = t;
406
406
  e + i.width > n && (o = e - i.width), t + i.height > r && (a = t - i.height), o = Math.max(0, o), a = Math.max(0, a), s.style.left = `${o}px`, s.style.top = `${a}px`, s.style.visibility = "visible";
407
407
  }
408
- let K = null, O = null, N = null, re = 0;
409
- const oe = [
408
+ let K = null, O = null, M = null, ne = 0;
409
+ const re = [
410
410
  {
411
411
  id: "copy",
412
412
  name: "Copy",
@@ -424,11 +424,11 @@ const oe = [
424
424
  }
425
425
  }
426
426
  ];
427
- class et extends _ {
427
+ class Qe extends A {
428
428
  name = "contextMenu";
429
429
  get defaultConfig() {
430
430
  return {
431
- items: oe
431
+ items: re
432
432
  };
433
433
  }
434
434
  isOpen = !1;
@@ -436,7 +436,7 @@ class et extends _ {
436
436
  params = null;
437
437
  menuElement = null;
438
438
  attach(e) {
439
- super.attach(e), this.installGlobalHandlers(), re++;
439
+ super.attach(e), this.installGlobalHandlers(), ne++;
440
440
  }
441
441
  detach() {
442
442
  this.menuElement && (this.menuElement.remove(), this.menuElement = null), this.isOpen = !1, this.params = null, this.uninstallGlobalHandlers();
@@ -479,25 +479,26 @@ class et extends _ {
479
479
  copyGridStyles(e) {
480
480
  const t = this.gridElement;
481
481
  if (!t) return;
482
- const i = getComputedStyle(t), n = [];
483
- for (const r of et.CSS_VARS_TO_COPY) {
484
- const o = i.getPropertyValue(r).trim();
485
- o && n.push(`${r}: ${o}`);
482
+ const i = getComputedStyle(t), n = [], r = i.getPropertyValue("color-scheme").trim();
483
+ r && n.push(`color-scheme: ${r}`);
484
+ for (const o of Qe.CSS_VARS_TO_COPY) {
485
+ const a = i.getPropertyValue(o).trim();
486
+ a && n.push(`${o}: ${a}`);
486
487
  }
487
488
  if (n.length > 0) {
488
- const r = e.getAttribute("style") || "";
489
- e.setAttribute("style", r + n.join("; ") + ";");
489
+ const o = e.getAttribute("style") || "";
490
+ e.setAttribute("style", o + n.join("; ") + ";");
490
491
  }
491
492
  }
492
493
  installGlobalHandlers() {
493
- !N && typeof document < "u" && typeof ne == "string" && ne && (N = document.createElement("style"), N.id = "tbw-context-menu-styles", N.textContent = ne, document.head.appendChild(N)), K || (K = () => {
494
+ !M && typeof document < "u" && typeof ie == "string" && ie && (M = document.createElement("style"), M.id = "tbw-context-menu-styles", M.textContent = ie, document.head.appendChild(M)), K || (K = () => {
494
495
  document.querySelectorAll(".tbw-context-menu").forEach((t) => t.remove());
495
496
  }, document.addEventListener("click", K)), O || (O = (e) => {
496
497
  e.key === "Escape" && document.querySelectorAll(".tbw-context-menu").forEach((i) => i.remove());
497
498
  }, document.addEventListener("keydown", O));
498
499
  }
499
500
  uninstallGlobalHandlers() {
500
- re--, !(re > 0) && (K && (document.removeEventListener("click", K), K = null), O && (document.removeEventListener("keydown", O), O = null), N && (N.remove(), N = null));
501
+ ne--, !(ne > 0) && (K && (document.removeEventListener("click", K), K = null), O && (document.removeEventListener("keydown", O), O = null), M && (M.remove(), M = null));
501
502
  }
502
503
  afterRender() {
503
504
  const e = this.gridElement;
@@ -535,15 +536,15 @@ class et extends _ {
535
536
  } else
536
537
  return;
537
538
  this.params = l, this.position = { x: n.clientX, y: n.clientY };
538
- const d = he(this.config.items ?? oe, l);
539
- d.length && (this.menuElement && this.menuElement.remove(), this.menuElement = ge(
539
+ const d = ue(this.config.items ?? re, l);
540
+ d.length && (this.menuElement && this.menuElement.remove(), this.menuElement = he(
540
541
  d,
541
542
  l,
542
543
  (c) => {
543
544
  c.action && c.action(l), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
544
545
  },
545
546
  this.gridIcons.submenuArrow
546
- ), document.body.appendChild(this.menuElement), this.copyGridStyles(this.menuElement), Ae(this.menuElement, n.clientX, n.clientY), this.isOpen = !0, this.emit("context-menu-open", { params: l, items: d }));
547
+ ), document.body.appendChild(this.menuElement), this.copyGridStyles(this.menuElement), ke(this.menuElement, n.clientX, n.clientY), this.isOpen = !0, this.emit("context-menu-open", { params: l, items: d }));
547
548
  }));
548
549
  }
549
550
  showMenu(e, t, i) {
@@ -556,15 +557,15 @@ class et extends _ {
556
557
  value: i.value ?? null,
557
558
  isHeader: i.isHeader ?? !1,
558
559
  event: i.event ?? new MouseEvent("contextmenu")
559
- }, r = he(this.config.items ?? oe, n);
560
- this.menuElement && this.menuElement.remove(), this.menuElement = ge(
560
+ }, r = ue(this.config.items ?? re, n);
561
+ this.menuElement && this.menuElement.remove(), this.menuElement = he(
561
562
  r,
562
563
  n,
563
564
  (o) => {
564
565
  o.action && o.action(n), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
565
566
  },
566
567
  this.gridIcons.submenuArrow
567
- ), document.body.appendChild(this.menuElement), this.copyGridStyles(this.menuElement), Ae(this.menuElement, e, t), this.isOpen = !0;
568
+ ), document.body.appendChild(this.menuElement), this.copyGridStyles(this.menuElement), ke(this.menuElement, e, t), this.isOpen = !0;
568
569
  }
569
570
  hideMenu() {
570
571
  this.menuElement && (this.menuElement.remove(), this.menuElement = null, this.isOpen = !1);
@@ -573,12 +574,12 @@ class et extends _ {
573
574
  return this.isOpen;
574
575
  }
575
576
  }
576
- const Ct = "@layer tbw-plugins{tbw-grid{--tbw-editing-bg: var(--tbw-color-selection);--tbw-editing-row-bg: var(--tbw-editing-bg);--tbw-editing-border: var(--tbw-border-input, 1px solid var(--tbw-color-border-strong));--tbw-padding-editing-input: var(--tbw-cell-padding-input, 2px 6px);--tbw-font-size-editor: inherit;--tbw-editing-row-outline-color: var(--tbw-color-accent);--tbw-editing-row-outline-width: 1px;.data-grid-row:has(.editing){background:var(--tbw-editing-row-bg);outline:var(--tbw-editing-row-outline-width) solid var(--tbw-editing-row-outline-color);outline-offset:calc(-1 * var(--tbw-editing-row-outline-width))}.data-grid-row>.cell.editing{overflow:hidden;padding:0;display:flex;min-height:calc(var(--tbw-row-height) + 2px);align-items:center;justify-content:center}.data-grid-row>.cell.editing input:not([type=checkbox]),.data-grid-row>.cell.editing select,.data-grid-row>.cell.editing textarea{width:100%;height:100%;flex:1 1 auto;min-width:0;border:var(--tbw-editing-border);padding:var(--tbw-padding-editing-input);font-size:var(--tbw-font-size-editor)}.tbw-editor-host{display:contents}}}";
577
- function Et(s) {
577
+ const xt = "@layer tbw-plugins{tbw-grid{--tbw-editing-bg: var(--tbw-color-selection);--tbw-editing-row-bg: var(--tbw-editing-bg);--tbw-editing-border: var(--tbw-border-input, 1px solid var(--tbw-color-border-strong));--tbw-padding-editing-input: var(--tbw-cell-padding-input, 2px 6px);--tbw-font-size-editor: inherit;--tbw-editing-row-outline-color: var(--tbw-color-accent);--tbw-editing-row-outline-width: 1px;.data-grid-row:has(.editing){background:var(--tbw-editing-row-bg);outline:var(--tbw-editing-row-outline-width) solid var(--tbw-editing-row-outline-color);outline-offset:calc(-1 * var(--tbw-editing-row-outline-width))}.data-grid-row>.cell.editing{overflow:hidden;padding:0;display:flex;min-height:calc(var(--tbw-row-height) + 2px);align-items:center;justify-content:center}.data-grid-row>.cell.editing input:not([type=checkbox]),.data-grid-row>.cell.editing select,.data-grid-row>.cell.editing textarea{width:100%;height:100%;flex:1 1 auto;min-width:0;border:var(--tbw-editing-border);padding:var(--tbw-padding-editing-input);font-size:var(--tbw-font-size-editor)}.tbw-editor-host{display:contents}}}";
578
+ function Ct(s) {
578
579
  const e = s.options;
579
580
  return e ? typeof e == "function" ? e() : e : [];
580
581
  }
581
- function Rt(s) {
582
+ function Et(s) {
582
583
  return (e) => {
583
584
  const t = s.editorParams, i = document.createElement("input");
584
585
  i.type = "number", i.value = e.value != null ? String(e.value) : "", t?.min !== void 0 && (i.min = String(t.min)), t?.max !== void 0 && (i.max = String(t.max)), t?.step !== void 0 && (i.step = String(t.step)), t?.placeholder && (i.placeholder = t.placeholder);
@@ -588,13 +589,13 @@ function Rt(s) {
588
589
  }), i;
589
590
  };
590
591
  }
591
- function St() {
592
+ function Rt() {
592
593
  return (s) => {
593
594
  const e = document.createElement("input");
594
595
  return e.type = "checkbox", e.checked = !!s.value, e.addEventListener("change", () => s.commit(e.checked)), e;
595
596
  };
596
597
  }
597
- function kt(s) {
598
+ function St(s) {
598
599
  return (e) => {
599
600
  const t = s.editorParams, i = document.createElement("input");
600
601
  return i.type = "date", e.value instanceof Date && (i.valueAsDate = e.value), t?.min && (i.min = t.min), t?.max && (i.max = t.max), t?.placeholder && (i.placeholder = t.placeholder), i.addEventListener("change", () => e.commit(i.valueAsDate)), i.addEventListener("keydown", (n) => {
@@ -602,14 +603,14 @@ function kt(s) {
602
603
  }), i;
603
604
  };
604
605
  }
605
- function At(s) {
606
+ function kt(s) {
606
607
  return (e) => {
607
608
  const t = s.editorParams, i = document.createElement("select");
608
609
  if (s.multi && (i.multiple = !0), t?.includeEmpty) {
609
610
  const o = document.createElement("option");
610
611
  o.value = "", o.textContent = t.emptyLabel ?? "", i.appendChild(o);
611
612
  }
612
- Et(s).forEach((o) => {
613
+ Ct(s).forEach((o) => {
613
614
  const a = document.createElement("option");
614
615
  a.value = String(o.value), a.textContent = o.label, (s.multi && Array.isArray(e.value) && e.value.includes(o.value) || !s.multi && e.value === o.value) && (a.selected = !0), i.appendChild(a);
615
616
  });
@@ -625,7 +626,7 @@ function At(s) {
625
626
  }), i;
626
627
  };
627
628
  }
628
- function _t(s) {
629
+ function At(s) {
629
630
  return (e) => {
630
631
  const t = s.editorParams, i = document.createElement("input");
631
632
  return i.type = "text", i.value = e.value != null ? String(e.value) : "", t?.maxLength !== void 0 && (i.maxLength = t.maxLength), t?.pattern && (i.pattern = t.pattern), t?.placeholder && (i.placeholder = t.placeholder), i.addEventListener("blur", () => e.commit(i.value)), i.addEventListener("keydown", (n) => {
@@ -633,22 +634,22 @@ function _t(s) {
633
634
  }), i;
634
635
  };
635
636
  }
636
- function Tt(s) {
637
+ function _t(s) {
637
638
  switch (s.type) {
638
639
  case "number":
639
- return Rt(s);
640
+ return Et(s);
640
641
  case "boolean":
641
- return St();
642
+ return Rt();
642
643
  case "date":
643
- return kt(s);
644
+ return St(s);
644
645
  case "select":
645
- return At(s);
646
+ return kt(s);
646
647
  default:
647
- return _t(s);
648
+ return At(s);
648
649
  }
649
650
  }
650
- const se = 'input,select,textarea,[contenteditable="true"],[contenteditable=""],[tabindex]:not([tabindex="-1"])';
651
- function Lt(s, e) {
651
+ const oe = 'input,select,textarea,[contenteditable="true"],[contenteditable=""],[tabindex]:not([tabindex="-1"])';
652
+ function Tt(s, e) {
652
653
  if (e.editor) return e.editor;
653
654
  if (e.__editorTemplate) return "template";
654
655
  if (!e.type) return;
@@ -665,25 +666,25 @@ function Lt(s, e) {
665
666
  function $(s) {
666
667
  return !(typeof s != "string" || s === "__proto__" || s === "constructor" || s === "prototype");
667
668
  }
668
- function Ft(s) {
669
+ function Lt(s) {
669
670
  const e = (s.__editingCellCount ?? 0) + 1;
670
671
  s.__editingCellCount = e, s.setAttribute("data-has-editing", "");
671
672
  }
672
- function It(s) {
673
+ function Ft(s) {
673
674
  s.__editingCellCount = 0, s.removeAttribute("data-has-editing");
674
675
  }
675
676
  function U(s, e) {
676
677
  return s instanceof HTMLInputElement ? s.type === "checkbox" ? s.checked : s.type === "number" ? s.value === "" ? null : Number(s.value) : s.type === "date" ? s.valueAsDate : s.value : e?.type === "number" && s.value !== "" ? Number(s.value) : s.value;
677
678
  }
678
- function _e(s) {
679
+ function Ae(s) {
679
680
  }
680
- function Pt(s, e, t) {
681
+ function It(s, e, t) {
681
682
  const i = s.querySelector("input,textarea,select");
682
683
  i && (i.addEventListener("blur", () => {
683
684
  t(U(i, e));
684
685
  }), i instanceof HTMLInputElement && i.type === "checkbox" ? i.addEventListener("change", () => t(i.checked)) : i instanceof HTMLSelectElement && i.addEventListener("change", () => t(U(i, e))));
685
686
  }
686
- class fn extends _ {
687
+ class gn extends A {
687
688
  static manifest = {
688
689
  ownedProperties: [
689
690
  {
@@ -705,7 +706,7 @@ class fn extends _ {
705
706
  ]
706
707
  };
707
708
  name = "editing";
708
- styles = Ct;
709
+ styles = xt;
709
710
  get defaultConfig() {
710
711
  return {
711
712
  editOn: "click"
@@ -899,7 +900,7 @@ class fn extends _ {
899
900
  }), setTimeout(() => {
900
901
  let a = r.querySelector(`.cell[data-col="${t._focusCol}"]`);
901
902
  if (a?.classList.contains("editing") || (a = r.querySelector(".cell.editing")), a?.classList.contains("editing")) {
902
- const l = a.querySelector(se);
903
+ const l = a.querySelector(oe);
903
904
  try {
904
905
  l?.focus({ preventScroll: !0 });
905
906
  } catch {
@@ -962,7 +963,7 @@ class fn extends _ {
962
963
  for (const l of this.#i)
963
964
  l.startsWith(`${e}:`) && this.#i.delete(l);
964
965
  o && (o.querySelectorAll(".cell.editing").forEach((l) => {
965
- l.classList.remove("editing"), It(l.parentElement);
966
+ l.classList.remove("editing"), Ft(l.parentElement);
966
967
  }), this.requestRender()), this.#r = !0, o || (this.#g(i), this.#r = !1);
967
968
  }
968
969
  #h(e, t, i, n) {
@@ -976,7 +977,7 @@ class fn extends _ {
976
977
  l = this.grid.getRowId(n);
977
978
  } catch {
978
979
  }
979
- const d = l ? !this.#n.has(l) : !0, c = l ? (g) => this.grid.updateRow(l, g, "cascade") : _e;
980
+ const d = l ? !this.#n.has(l) : !0, c = l ? (g) => this.grid.updateRow(l, g, "cascade") : Ae;
980
981
  if (this.emitCancelable("cell-commit", {
981
982
  row: n,
982
983
  rowId: l ?? "",
@@ -991,7 +992,7 @@ class fn extends _ {
991
992
  })) return;
992
993
  n[r] = i, l && this.#n.add(l), this.#a();
993
994
  const h = a.findRenderedRowElement?.(e);
994
- h && (h.classList.add("changed"), lt(h, "change"));
995
+ h && (h.classList.add("changed"), at(h, "change"));
995
996
  }
996
997
  #p(e, t, i, n, r, o) {
997
998
  if (!i.editable || r.classList.contains("editing")) return;
@@ -1000,63 +1001,63 @@ class fn extends _ {
1000
1001
  a = this.grid.getRowId(e);
1001
1002
  } catch {
1002
1003
  }
1003
- const l = a ? (x) => this.grid.updateRow(a, x, "cascade") : _e, d = $(i.field) ? e[i.field] : void 0;
1004
+ const l = a ? (C) => this.grid.updateRow(a, C, "cascade") : Ae, d = $(i.field) ? e[i.field] : void 0;
1004
1005
  r.classList.add("editing"), this.#i.add(`${t}:${n}`);
1005
1006
  const c = r.parentElement;
1006
- c && Ft(c);
1007
+ c && Lt(c);
1007
1008
  let u = !1;
1008
- const h = (x) => {
1009
- u || this.#e === -1 || this.#h(t, i, x, e);
1009
+ const h = (C) => {
1010
+ u || this.#e === -1 || this.#h(t, i, C, e);
1010
1011
  }, g = () => {
1011
1012
  u = !0, $(i.field) && (e[i.field] = d);
1012
1013
  }, f = document.createElement("div");
1013
- f.className = "tbw-editor-host", r.innerHTML = "", r.appendChild(f), f.addEventListener("keydown", (x) => {
1014
- x.key === "Enter" && (x.stopPropagation(), x.preventDefault(), u = !0, this.#s(t, !1)), x.key === "Escape" && (x.stopPropagation(), x.preventDefault(), g(), this.#s(t, !0));
1014
+ f.className = "tbw-editor-host", r.innerHTML = "", r.appendChild(f), f.addEventListener("keydown", (C) => {
1015
+ C.key === "Enter" && (C.stopPropagation(), C.preventDefault(), u = !0, this.#s(t, !1)), C.key === "Escape" && (C.stopPropagation(), C.preventDefault(), g(), this.#s(t, !0));
1015
1016
  });
1016
- const p = i, w = p.__editorTemplate, v = Lt(this.grid, p) ?? Tt(i), y = d;
1017
- if (v === "template" && w)
1017
+ const p = i, w = p.__editorTemplate, b = Tt(this.grid, p) ?? _t(i), v = d;
1018
+ if (b === "template" && w)
1018
1019
  this.#l(f, p, e, d, h, g, o, t);
1019
- else if (typeof v == "string") {
1020
- const x = document.createElement(v);
1021
- x.value = y, x.addEventListener("change", () => h(x.value)), f.appendChild(x), o || queueMicrotask(() => {
1022
- f.querySelector(se)?.focus({ preventScroll: !0 });
1020
+ else if (typeof b == "string") {
1021
+ const C = document.createElement(b);
1022
+ C.value = v, C.addEventListener("change", () => h(C.value)), f.appendChild(C), o || queueMicrotask(() => {
1023
+ f.querySelector(oe)?.focus({ preventScroll: !0 });
1023
1024
  });
1024
- } else if (typeof v == "function") {
1025
- const x = {
1025
+ } else if (typeof b == "function") {
1026
+ const C = {
1026
1027
  row: e,
1027
1028
  rowId: a ?? "",
1028
- value: y,
1029
+ value: v,
1029
1030
  field: i.field,
1030
1031
  column: i,
1031
1032
  commit: h,
1032
1033
  cancel: g,
1033
1034
  updateRow: l
1034
- }, A = v(x);
1035
- typeof A == "string" ? (f.innerHTML = A, Pt(f, i, h)) : A instanceof Node && f.appendChild(A), o || queueMicrotask(() => {
1036
- f.querySelector(se)?.focus({ preventScroll: !0 });
1035
+ }, _ = b(C);
1036
+ typeof _ == "string" ? (f.innerHTML = _, It(f, i, h)) : _ instanceof Node && f.appendChild(_), o || queueMicrotask(() => {
1037
+ f.querySelector(oe)?.focus({ preventScroll: !0 });
1037
1038
  });
1038
- } else if (v && typeof v == "object") {
1039
- const x = document.createElement("div");
1040
- x.setAttribute("data-external-editor", ""), x.setAttribute("data-field", i.field), f.appendChild(x);
1041
- const A = {
1039
+ } else if (b && typeof b == "object") {
1040
+ const C = document.createElement("div");
1041
+ C.setAttribute("data-external-editor", ""), C.setAttribute("data-field", i.field), f.appendChild(C);
1042
+ const _ = {
1042
1043
  row: e,
1043
1044
  rowId: a ?? "",
1044
- value: y,
1045
+ value: v,
1045
1046
  field: i.field,
1046
1047
  column: i,
1047
1048
  commit: h,
1048
1049
  cancel: g,
1049
1050
  updateRow: l
1050
1051
  };
1051
- if (v.mount)
1052
+ if (b.mount)
1052
1053
  try {
1053
- v.mount({ placeholder: x, context: A, spec: v });
1054
- } catch (F) {
1055
- console.warn(`[tbw-grid] External editor mount error for column '${i.field}':`, F);
1054
+ b.mount({ placeholder: C, context: _, spec: b });
1055
+ } catch (E) {
1056
+ console.warn(`[tbw-grid] External editor mount error for column '${i.field}':`, E);
1056
1057
  }
1057
1058
  else
1058
1059
  this.grid.dispatchEvent(
1059
- new CustomEvent("mount-external-editor", { detail: { placeholder: x, spec: v, context: A } })
1060
+ new CustomEvent("mount-external-editor", { detail: { placeholder: C, spec: b, context: _ } })
1060
1061
  );
1061
1062
  }
1062
1063
  }
@@ -1109,7 +1110,7 @@ class fn extends _ {
1109
1110
  });
1110
1111
  }
1111
1112
  }
1112
- function Te(s, e = !0) {
1113
+ function _e(s, e = !0) {
1113
1114
  if (s == null) return "";
1114
1115
  if (s instanceof Date) return s.toISOString();
1115
1116
  if (typeof s == "object") return JSON.stringify(s);
@@ -1117,37 +1118,37 @@ function Te(s, e = !0) {
1117
1118
  return e && (t.includes(",") || t.includes('"') || t.includes(`
1118
1119
  `) || t.includes("\r")) ? `"${t.replace(/"/g, '""')}"` : t;
1119
1120
  }
1120
- function Dt(s, e, t, i = {}) {
1121
+ function Pt(s, e, t, i = {}) {
1121
1122
  const n = i.delimiter ?? ",", r = i.newline ?? `
1122
1123
  `, o = [], a = i.bom ? "\uFEFF" : "";
1123
1124
  if (t.includeHeaders !== !1) {
1124
1125
  const l = e.map((d) => {
1125
1126
  const c = d.header || d.field, u = t.processHeader ? t.processHeader(c, d.field) : c;
1126
- return Te(u);
1127
+ return _e(u);
1127
1128
  });
1128
1129
  o.push(l.join(n));
1129
1130
  }
1130
1131
  for (const l of s) {
1131
1132
  const d = e.map((c) => {
1132
1133
  let u = l[c.field];
1133
- return t.processCell && (u = t.processCell(u, c.field, l)), Te(u);
1134
+ return t.processCell && (u = t.processCell(u, c.field, l)), _e(u);
1134
1135
  });
1135
1136
  o.push(d.join(n));
1136
1137
  }
1137
1138
  return a + o.join(r);
1138
1139
  }
1139
- function we(s, e) {
1140
+ function me(s, e) {
1140
1141
  const t = URL.createObjectURL(s), i = document.createElement("a");
1141
1142
  i.href = t, i.download = e, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(t);
1142
1143
  }
1143
- function Mt(s, e) {
1144
+ function Dt(s, e) {
1144
1145
  const t = new Blob([s], { type: "text/csv;charset=utf-8;" });
1145
- we(t, e);
1146
+ me(t, e);
1146
1147
  }
1147
- function Le(s) {
1148
+ function Te(s) {
1148
1149
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
1149
1150
  }
1150
- function Nt(s, e, t) {
1151
+ function Mt(s, e, t) {
1151
1152
  let i = `<?xml version="1.0" encoding="UTF-8"?>
1152
1153
  <?mso-application progid="Excel.Sheet"?>
1153
1154
  <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
@@ -1159,7 +1160,7 @@ function Nt(s, e, t) {
1159
1160
  <Row>`;
1160
1161
  for (const n of e) {
1161
1162
  const r = n.header || n.field, o = t.processHeader ? t.processHeader(r, n.field) : r;
1162
- i += `<Cell><Data ss:Type="String">${Le(o)}</Data></Cell>`;
1163
+ i += `<Cell><Data ss:Type="String">${Te(o)}</Data></Cell>`;
1163
1164
  }
1164
1165
  i += "</Row>";
1165
1166
  }
@@ -1170,7 +1171,7 @@ function Nt(s, e, t) {
1170
1171
  let o = n[r.field];
1171
1172
  t.processCell && (o = t.processCell(o, r.field, n));
1172
1173
  let a = "String", l = "";
1173
- o == null ? l = "" : typeof o == "number" && !isNaN(o) ? (a = "Number", l = String(o)) : o instanceof Date ? (a = "DateTime", l = o.toISOString()) : l = Le(String(o)), i += `<Cell><Data ss:Type="${a}">${l}</Data></Cell>`;
1174
+ o == null ? l = "" : typeof o == "number" && !isNaN(o) ? (a = "Number", l = String(o)) : o instanceof Date ? (a = "DateTime", l = o.toISOString()) : l = Te(String(o)), i += `<Cell><Data ss:Type="${a}">${l}</Data></Cell>`;
1174
1175
  }
1175
1176
  i += "</Row>";
1176
1177
  }
@@ -1179,13 +1180,13 @@ function Nt(s, e, t) {
1179
1180
  </Worksheet>
1180
1181
  </Workbook>`, i;
1181
1182
  }
1182
- function qt(s, e) {
1183
+ function Nt(s, e) {
1183
1184
  const t = e.endsWith(".xls") ? e : `${e}.xls`, i = new Blob([s], {
1184
1185
  type: "application/vnd.ms-excel;charset=utf-8;"
1185
1186
  });
1186
- we(i, t);
1187
+ me(i, t);
1187
1188
  }
1188
- class pn extends _ {
1189
+ class fn extends A {
1189
1190
  name = "export";
1190
1191
  get defaultConfig() {
1191
1192
  return {
@@ -1222,13 +1223,13 @@ class pn extends _ {
1222
1223
  try {
1223
1224
  switch (e) {
1224
1225
  case "csv": {
1225
- const l = Dt(o, r, n, { bom: !0 });
1226
- a = a.endsWith(".csv") ? a : `${a}.csv`, Mt(l, a);
1226
+ const l = Pt(o, r, n, { bom: !0 });
1227
+ a = a.endsWith(".csv") ? a : `${a}.csv`, Dt(l, a);
1227
1228
  break;
1228
1229
  }
1229
1230
  case "excel": {
1230
- const l = Nt(o, r, n);
1231
- a = a.endsWith(".xls") ? a : `${a}.xls`, qt(l, a);
1231
+ const l = Mt(o, r, n);
1232
+ a = a.endsWith(".xls") ? a : `${a}.xls`, Nt(l, a);
1232
1233
  break;
1233
1234
  }
1234
1235
  case "json": {
@@ -1242,7 +1243,7 @@ class pn extends _ {
1242
1243
  }), d = JSON.stringify(l, null, 2);
1243
1244
  a = a.endsWith(".json") ? a : `${a}.json`;
1244
1245
  const c = new Blob([d], { type: "application/json" });
1245
- we(c, a);
1246
+ me(c, a);
1246
1247
  break;
1247
1248
  }
1248
1249
  }
@@ -1279,7 +1280,7 @@ class pn extends _ {
1279
1280
  return this.lastExportInfo;
1280
1281
  }
1281
1282
  }
1282
- function Ht(s) {
1283
+ function qt(s) {
1283
1284
  const { totalRows: e, viewportHeight: t, scrollTop: i, rowHeight: n, overscan: r } = s, o = Math.ceil(t / n);
1284
1285
  let a = Math.floor(i / n) - r;
1285
1286
  a < 0 && (a = 0);
@@ -1291,10 +1292,10 @@ function Ht(s) {
1291
1292
  totalHeight: e * n
1292
1293
  };
1293
1294
  }
1294
- function zt(s, e) {
1295
+ function Ht(s, e) {
1295
1296
  return s <= e;
1296
1297
  }
1297
- function Kt(s, e, t = !1) {
1298
+ function zt(s, e, t = !1) {
1298
1299
  const i = s[e.field];
1299
1300
  if (e.operator === "blank")
1300
1301
  return i == null || i === "";
@@ -1333,10 +1334,10 @@ function Kt(s, e, t = !1) {
1333
1334
  return !0;
1334
1335
  }
1335
1336
  }
1336
- function Ot(s, e, t = !1) {
1337
- return e.length ? s.filter((i) => e.every((n) => Kt(i, n, t))) : s;
1337
+ function Kt(s, e, t = !1) {
1338
+ return e.length ? s.filter((i) => e.every((n) => zt(i, n, t))) : s;
1338
1339
  }
1339
- function Gt(s) {
1340
+ function Ot(s) {
1340
1341
  return JSON.stringify(
1341
1342
  s.map((e) => ({
1342
1343
  field: e.field,
@@ -1346,7 +1347,7 @@ function Gt(s) {
1346
1347
  }))
1347
1348
  );
1348
1349
  }
1349
- function Fe(s, e) {
1350
+ function Le(s, e) {
1350
1351
  const t = /* @__PURE__ */ new Set();
1351
1352
  for (const i of s) {
1352
1353
  const n = i[e];
@@ -1354,10 +1355,10 @@ function Fe(s, e) {
1354
1355
  }
1355
1356
  return [...t].sort((i, n) => typeof i == "number" && typeof n == "number" ? i - n : String(i).localeCompare(String(n)));
1356
1357
  }
1357
- const Bt = '@layer tbw-plugins{tbw-grid{.tbw-quick-filter-input{flex:1;max-width:300px;height:var(--tbw-input-height, 1.75rem);padding:var(--tbw-input-padding, 0 .5rem);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);color:var(--tbw-color-fg);font-size:var(--tbw-font-size-sm, .8125rem);&:focus{outline:none;border-color:var(--tbw-color-accent)}}.header-cell.filtered:before{content:"";position:absolute;top:var(--tbw-spacing-xs, .25rem);right:var(--tbw-spacing-xs, .25rem);width:var(--tbw-indicator-size, .375rem);height:var(--tbw-indicator-size, .375rem);background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border-radius:50%}.tbw-filter-btn{display:var(--tbw-filter-btn-display, inline-flex);visibility:var(--tbw-filter-btn-visibility, visible);align-items:center;justify-content:center;background:transparent;border:none;cursor:pointer;padding:2px;margin-left:var(--tbw-spacing-xs, .25rem);opacity:.4;transition:opacity .15s,visibility 0s,display 0s allow-discrete;color:inherit;vertical-align:middle;transition-behavior:allow-discrete;&:hover,&.active{opacity:1;visibility:visible;display:inline-flex}&.active{color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6))}}.header-row .cell:hover .tbw-filter-btn,.header-row .cell.filtered .tbw-filter-btn{display:inline-flex;visibility:visible}}}', Vt = "@layer tbw-plugins{.tbw-filter-panel{position:fixed;background:var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));color:var(--tbw-filter-panel-fg, var(--tbw-color-fg, light-dark(#222222, #eeeeee)));border:1px solid var(--tbw-filter-panel-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-panel-radius, var(--tbw-border-radius, .25rem));box-shadow:0 4px 16px var(--tbw-filter-panel-shadow, var(--tbw-color-shadow, light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3))));padding:var(--tbw-panel-padding, var(--tbw-spacing-lg, .75rem));z-index:10000;min-width:200px;max-width:280px;max-height:350px;display:flex;flex-direction:column;font-family:var(--tbw-font-family, system-ui, sans-serif);font-size:var(--tbw-font-size, .8125rem);transform-origin:top center}.tbw-filter-panel.tbw-filter-panel-above{transform-origin:bottom center}.tbw-filter-panel.tbw-filter-panel-animated{animation:tbw-filter-panel-enter var(--tbw-animation-duration, .15s) var(--tbw-animation-easing, ease-out)}.tbw-filter-panel.tbw-filter-panel-above.tbw-filter-panel-animated{animation:tbw-filter-panel-enter-above var(--tbw-animation-duration, .15s) var(--tbw-animation-easing, ease-out)}@keyframes tbw-filter-panel-enter{0%{opacity:0;transform:scaleY(.3) translateY(-10px)}to{opacity:1;transform:scaleY(1) translateY(0)}}@keyframes tbw-filter-panel-enter-above{0%{opacity:0;transform:scaleY(.3) translateY(10px)}to{opacity:1;transform:scaleY(1) translateY(0)}}@supports (anchor-name: --test){.tbw-filter-panel{position-anchor:--tbw-filter-anchor;top:anchor(bottom);left:anchor(left);margin-top:4px;position-try-fallbacks:flip-inline,flip-block,flip-block flip-inline}}.tbw-filter-search{margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));min-height:var(--tbw-filter-item-height, 28px)}.tbw-filter-search-input{height:var(--tbw-filter-item-height, 28px);width:100%;padding:var(--tbw-filter-search-padding, var(--tbw-spacing-sm, .375rem) var(--tbw-spacing-md, .5rem));background:var(--tbw-filter-input-bg, var(--tbw-color-bg, transparent));color:inherit;border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-input-radius, var(--tbw-border-radius, .25rem));font-size:inherit;box-sizing:border-box}.tbw-filter-search-input:focus{outline:none;border-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));box-shadow:0 0 0 2px rgba(from var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6)) r g b / 15%)}.tbw-filter-actions{display:flex;padding:var(--tbw-button-padding-sm, .25rem .125rem);margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));border-bottom:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));min-height:var(--tbw-filter-item-height, 28px)}.tbw-filter-action-btn{background:transparent;border:none;color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));cursor:pointer;font-size:var(--tbw-font-size-xs, .75rem);padding:2px 0}.tbw-filter-action-btn:hover{text-decoration:underline}.tbw-filter-values{flex:1;overflow-y:auto;margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));max-height:180px;position:relative}.tbw-filter-values-spacer{width:1px}.tbw-filter-values-content{position:absolute;top:0;left:0;right:0}.tbw-filter-value-item{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));padding:var(--tbw-button-padding-sm, .25rem .125rem);cursor:pointer;border-radius:3px;height:var(--tbw-filter-item-height, 28px)}.tbw-filter-value-item:hover{background:var(--tbw-filter-hover, var(--tbw-color-row-hover, light-dark(#f0f6ff, #1c1c1c)))}.tbw-filter-checkbox{margin:0;cursor:pointer;accent-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6))}.tbw-filter-no-match{color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));padding:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem)) 0;text-align:center;font-style:italic}.tbw-filter-buttons{display:flex;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));padding-top:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));border-top:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)))}.tbw-filter-apply-btn{flex:1;padding:var(--tbw-filter-btn-padding, var(--tbw-button-padding, .375rem .75rem));background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));color:var(--tbw-filter-accent-fg, var(--tbw-color-accent-fg, light-dark(#ffffff, #000000)));border:none;border-radius:var(--tbw-border-radius, .25rem);cursor:pointer;font-size:var(--tbw-font-size-sm, .8125rem);font-weight:var(--tbw-filter-btn-font-weight, 500);min-height:var(--tbw-filter-btn-min-height, auto)}.tbw-filter-apply-btn:hover{filter:brightness(.9)}.tbw-filter-clear-btn{flex:1;padding:var(--tbw-filter-btn-padding, var(--tbw-button-padding, .375rem .75rem));background:transparent;color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-border-radius, .25rem);cursor:pointer;font-size:var(--tbw-font-size-sm, .8125rem);font-weight:var(--tbw-filter-btn-font-weight, 500);min-height:var(--tbw-filter-btn-min-height, auto)}.tbw-filter-clear-btn:hover{background:var(--tbw-filter-hover, var(--tbw-color-row-hover, light-dark(#f0f6ff, #1c1c1c)))}.tbw-filter-range-title{font-weight:500;margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));padding-bottom:var(--tbw-spacing-sm, .375rem);border-bottom:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)))}.tbw-filter-range-inputs,.tbw-filter-date-range{display:flex;align-items:flex-end;gap:var(--tbw-spacing-sm, .375rem);margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.tbw-filter-range-group,.tbw-filter-date-group{display:flex;flex-direction:column;gap:var(--tbw-spacing-xs, .25rem);flex:1}.tbw-filter-range-label{font-size:var(--tbw-font-size-xs, .75rem);color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)))}.tbw-filter-range-input,.tbw-filter-date-input{width:100%;height:var(--tbw-filter-item-height, 28px);padding:var(--tbw-spacing-xs, .25rem) var(--tbw-spacing-sm, .375rem);background:var(--tbw-filter-input-bg, var(--tbw-color-bg, transparent));color:inherit;border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-input-radius, var(--tbw-border-radius, .25rem));font-size:inherit;box-sizing:border-box}.tbw-filter-range-input:focus,.tbw-filter-date-input:focus{outline:none;border-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));box-shadow:0 0 0 2px rgba(from var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6)) r g b / 15%)}.tbw-filter-range-separator{color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));padding-bottom:var(--tbw-spacing-xs, .25rem)}.tbw-filter-range-slider{position:relative;height:24px;margin:var(--tbw-spacing-md, .5rem) 0 var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.tbw-filter-range-track{position:absolute;top:50%;left:0;right:0;height:4px;background:var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:2px;transform:translateY(-50%)}.tbw-filter-range-fill{position:absolute;top:50%;height:4px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border-radius:2px;transform:translateY(-50%)}.tbw-filter-range-thumb{position:absolute;top:0;width:100%;height:100%;background:none;pointer-events:none;-webkit-appearance:none;appearance:none}.tbw-filter-range-thumb::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border:2px solid var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));border-radius:50%;cursor:pointer;pointer-events:all;box-shadow:0 1px 3px #0003}.tbw-filter-range-thumb::-moz-range-thumb{width:16px;height:16px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border:2px solid var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));border-radius:50%;cursor:pointer;pointer-events:all;box-shadow:0 1px 3px #0003}.tbw-filter-range-thumb::-webkit-slider-thumb:hover{transform:scale(1.1)}.tbw-filter-range-thumb::-moz-range-thumb:hover{transform:scale(1.1)}}";
1358
- class q extends _ {
1358
+ const Gt = '@layer tbw-plugins{tbw-grid{.tbw-quick-filter-input{flex:1;max-width:300px;height:var(--tbw-input-height, 1.75rem);padding:var(--tbw-input-padding, 0 .5rem);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);color:var(--tbw-color-fg);font-size:var(--tbw-font-size-sm, .8125rem);&:focus{outline:none;border-color:var(--tbw-color-accent)}}.header-cell.filtered:before{content:"";position:absolute;top:var(--tbw-spacing-xs, .25rem);right:var(--tbw-spacing-xs, .25rem);width:var(--tbw-indicator-size, .375rem);height:var(--tbw-indicator-size, .375rem);background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border-radius:50%}.tbw-filter-btn{display:var(--tbw-filter-btn-display, inline-flex);visibility:var(--tbw-filter-btn-visibility, visible);align-items:center;justify-content:center;background:transparent;border:none;cursor:pointer;padding:2px;margin-left:var(--tbw-spacing-xs, .25rem);opacity:.4;transition:opacity .15s,visibility 0s,display 0s allow-discrete;color:inherit;vertical-align:middle;transition-behavior:allow-discrete;&:hover,&.active{opacity:1;visibility:visible;display:inline-flex}&.active{color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6))}}.header-row .cell:hover .tbw-filter-btn,.header-row .cell.filtered .tbw-filter-btn{display:inline-flex;visibility:visible}}}', Bt = "@layer tbw-plugins{.tbw-filter-panel{position:fixed;background:var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));color:var(--tbw-filter-panel-fg, var(--tbw-color-fg, light-dark(#222222, #eeeeee)));border:1px solid var(--tbw-filter-panel-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-panel-radius, var(--tbw-border-radius, .25rem));box-shadow:0 4px 16px var(--tbw-filter-panel-shadow, var(--tbw-color-shadow, light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3))));padding:var(--tbw-panel-padding, var(--tbw-spacing-lg, .75rem));z-index:10000;min-width:200px;max-width:280px;max-height:350px;display:flex;flex-direction:column;font-family:var(--tbw-font-family, system-ui, sans-serif);font-size:var(--tbw-font-size, .8125rem);transform-origin:top center}.tbw-filter-panel.tbw-filter-panel-above{transform-origin:bottom center}.tbw-filter-panel.tbw-filter-panel-animated{animation:tbw-filter-panel-enter var(--tbw-animation-duration, .15s) var(--tbw-animation-easing, ease-out)}.tbw-filter-panel.tbw-filter-panel-above.tbw-filter-panel-animated{animation:tbw-filter-panel-enter-above var(--tbw-animation-duration, .15s) var(--tbw-animation-easing, ease-out)}@keyframes tbw-filter-panel-enter{0%{opacity:0;transform:scaleY(.3) translateY(-10px)}to{opacity:1;transform:scaleY(1) translateY(0)}}@keyframes tbw-filter-panel-enter-above{0%{opacity:0;transform:scaleY(.3) translateY(10px)}to{opacity:1;transform:scaleY(1) translateY(0)}}@supports (anchor-name: --test){.tbw-filter-panel{position-anchor:--tbw-filter-anchor;top:anchor(bottom);left:anchor(left);margin-top:4px;position-try-fallbacks:flip-inline,flip-block,flip-block flip-inline}}.tbw-filter-search{margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));min-height:var(--tbw-filter-item-height, 28px)}.tbw-filter-search-input{height:var(--tbw-filter-item-height, 28px);width:100%;padding:var(--tbw-filter-search-padding, var(--tbw-spacing-sm, .375rem) var(--tbw-spacing-md, .5rem));background:var(--tbw-filter-input-bg, var(--tbw-color-bg, transparent));color:inherit;border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-input-radius, var(--tbw-border-radius, .25rem));font-size:inherit;box-sizing:border-box}.tbw-filter-search-input:focus{outline:none;border-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));box-shadow:0 0 0 2px rgba(from var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6)) r g b / 15%)}.tbw-filter-actions{display:flex;padding:var(--tbw-button-padding-sm, .25rem .125rem);margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));border-bottom:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));min-height:var(--tbw-filter-item-height, 28px)}.tbw-filter-action-btn{background:transparent;border:none;color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));cursor:pointer;font-size:var(--tbw-font-size-xs, .75rem);padding:2px 0}.tbw-filter-action-btn:hover{text-decoration:underline}.tbw-filter-values{flex:1;overflow-y:auto;margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));max-height:180px;position:relative}.tbw-filter-values-spacer{width:1px}.tbw-filter-values-content{position:absolute;top:0;left:0;right:0}.tbw-filter-value-item{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));padding:var(--tbw-button-padding-sm, .25rem .125rem);cursor:pointer;border-radius:3px;height:var(--tbw-filter-item-height, 28px)}.tbw-filter-value-item:hover{background:var(--tbw-filter-hover, var(--tbw-color-row-hover, light-dark(#f0f6ff, #1c1c1c)))}.tbw-filter-checkbox{margin:0;cursor:pointer;accent-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6))}.tbw-filter-no-match{color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));padding:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem)) 0;text-align:center;font-style:italic}.tbw-filter-buttons{display:flex;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));padding-top:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));border-top:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)))}.tbw-filter-apply-btn{flex:1;padding:var(--tbw-filter-btn-padding, var(--tbw-button-padding, .375rem .75rem));background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));color:var(--tbw-filter-accent-fg, var(--tbw-color-accent-fg, light-dark(#ffffff, #000000)));border:none;border-radius:var(--tbw-border-radius, .25rem);cursor:pointer;font-size:var(--tbw-font-size-sm, .8125rem);font-weight:var(--tbw-filter-btn-font-weight, 500);min-height:var(--tbw-filter-btn-min-height, auto)}.tbw-filter-apply-btn:hover{filter:brightness(.9)}.tbw-filter-clear-btn{flex:1;padding:var(--tbw-filter-btn-padding, var(--tbw-button-padding, .375rem .75rem));background:transparent;color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-border-radius, .25rem);cursor:pointer;font-size:var(--tbw-font-size-sm, .8125rem);font-weight:var(--tbw-filter-btn-font-weight, 500);min-height:var(--tbw-filter-btn-min-height, auto)}.tbw-filter-clear-btn:hover{background:var(--tbw-filter-hover, var(--tbw-color-row-hover, light-dark(#f0f6ff, #1c1c1c)))}.tbw-filter-range-inputs,.tbw-filter-date-range{display:flex;align-items:flex-end;gap:var(--tbw-spacing-sm, .375rem);margin-bottom:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.tbw-filter-range-group,.tbw-filter-date-group{display:flex;flex-direction:column;gap:var(--tbw-spacing-xs, .25rem);flex:1}.tbw-filter-range-label{font-size:var(--tbw-font-size-xs, .75rem);color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)))}.tbw-filter-range-input,.tbw-filter-date-input{width:100%;height:var(--tbw-filter-item-height, 28px);padding:var(--tbw-spacing-xs, .25rem) var(--tbw-spacing-sm, .375rem);background:var(--tbw-filter-input-bg, var(--tbw-color-bg, transparent));color:inherit;border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-input-radius, var(--tbw-border-radius, .25rem));font-size:inherit;box-sizing:border-box}.tbw-filter-range-input:focus,.tbw-filter-date-input:focus{outline:none;border-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));box-shadow:0 0 0 2px rgba(from var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6)) r g b / 15%)}.tbw-filter-range-separator{color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));padding-bottom:var(--tbw-spacing-xs, .25rem)}.tbw-filter-range-slider{position:relative;height:24px;margin:var(--tbw-spacing-md, .5rem) 0 var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.tbw-filter-range-track{position:absolute;top:50%;left:0;right:0;height:4px;background:var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:2px;transform:translateY(-50%)}.tbw-filter-range-fill{position:absolute;top:50%;height:4px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border-radius:2px;transform:translateY(-50%)}.tbw-filter-range-thumb{position:absolute;top:0;width:100%;height:100%;background:none;pointer-events:none;-webkit-appearance:none;appearance:none}.tbw-filter-range-thumb::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border:2px solid var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));border-radius:50%;cursor:pointer;pointer-events:all;box-shadow:0 1px 3px #0003}.tbw-filter-range-thumb::-moz-range-thumb{width:16px;height:16px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border:2px solid var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));border-radius:50%;cursor:pointer;pointer-events:all;box-shadow:0 1px 3px #0003}.tbw-filter-range-thumb::-webkit-slider-thumb:hover{transform:scale(1.1)}.tbw-filter-range-thumb::-moz-range-thumb:hover{transform:scale(1.1)}}";
1359
+ class N extends A {
1359
1360
  name = "filtering";
1360
- styles = Bt;
1361
+ styles = Gt;
1361
1362
  get defaultConfig() {
1362
1363
  return {
1363
1364
  debounceMs: 300,
@@ -1394,7 +1395,7 @@ class q extends _ {
1394
1395
  return t;
1395
1396
  }
1396
1397
  }
1397
- return q.DEFAULT_LIST_ITEM_HEIGHT;
1398
+ return N.DEFAULT_LIST_ITEM_HEIGHT;
1398
1399
  }
1399
1400
  syncExcludedValues(e, t) {
1400
1401
  t ? t.type === "set" && t.operator === "notIn" && Array.isArray(t.value) ? this.excludedValues.set(e, new Set(t.value)) : t.type === "set" && this.excludedValues.delete(e) : this.excludedValues.delete(e);
@@ -1410,10 +1411,10 @@ class q extends _ {
1410
1411
  if (!t.length) return [...e];
1411
1412
  if (this.config.filterHandler)
1412
1413
  return this.cachedResult ? this.cachedResult : [...e];
1413
- const i = Gt(t);
1414
+ const i = Ot(t);
1414
1415
  if (this.cacheKey === i && this.cachedResult)
1415
1416
  return this.cachedResult;
1416
- const n = Ot([...e], t, this.config.caseSensitive);
1417
+ const n = Kt([...e], t, this.config.caseSensitive);
1417
1418
  return this.cachedResult = n, this.cacheKey = i, n;
1418
1419
  }
1419
1420
  afterRender() {
@@ -1423,7 +1424,7 @@ class q extends _ {
1423
1424
  const n = i.getAttribute("data-col");
1424
1425
  if (n === null) return;
1425
1426
  const r = this.visibleColumns[parseInt(n, 10)];
1426
- if (!r || !this.isColumnFilterable(r) || H(r)) return;
1427
+ if (!r || !this.isColumnFilterable(r) || q(r)) return;
1427
1428
  const o = r.field;
1428
1429
  if (!o) return;
1429
1430
  const a = this.filters.has(o);
@@ -1491,7 +1492,7 @@ class q extends _ {
1491
1492
  return this.getFilters();
1492
1493
  }
1493
1494
  getUniqueValues(e) {
1494
- return Fe(this.sourceRows, e);
1495
+ return Le(this.sourceRows, e);
1495
1496
  }
1496
1497
  copyGridThemeContext(e) {
1497
1498
  const t = this.gridElement;
@@ -1508,7 +1509,7 @@ class q extends _ {
1508
1509
  return;
1509
1510
  }
1510
1511
  const e = document.createElement("style");
1511
- e.id = "tbw-filter-panel-styles", e.textContent = Vt, document.head.appendChild(e), this.globalStylesInjected = !0;
1512
+ e.id = "tbw-filter-panel-styles", e.textContent = Bt, document.head.appendChild(e), this.globalStylesInjected = !0;
1512
1513
  }
1513
1514
  toggleFilterPanel(e, t, i) {
1514
1515
  if (this.openPanelField === e) {
@@ -1523,7 +1524,7 @@ class q extends _ {
1523
1524
  });
1524
1525
  return;
1525
1526
  }
1526
- const r = Fe(this.sourceRows, e);
1527
+ const r = Le(this.sourceRows, e);
1527
1528
  document.body.appendChild(n), this.positionPanel(n, i), this.renderPanelContent(e, t, n, r), this.setupPanelCloseHandler(n, i);
1528
1529
  }
1529
1530
  renderPanelContent(e, t, i, n) {
@@ -1573,11 +1574,11 @@ class q extends _ {
1573
1574
  }
1574
1575
  static supportsAnchorPositioning = null;
1575
1576
  static checkAnchorPositioningSupport() {
1576
- return q.supportsAnchorPositioning === null && (q.supportsAnchorPositioning = CSS.supports("anchor-name", "--test")), q.supportsAnchorPositioning;
1577
+ return N.supportsAnchorPositioning === null && (N.supportsAnchorPositioning = CSS.supports("anchor-name", "--test")), N.supportsAnchorPositioning;
1577
1578
  }
1578
1579
  positionPanel(e, t) {
1579
1580
  const n = t.closest(".cell") ?? t;
1580
- if (n.style.anchorName = "--tbw-filter-anchor", this.panelAnchorElement = n, q.checkAnchorPositioningSupport()) {
1581
+ if (n.style.anchorName = "--tbw-filter-anchor", this.panelAnchorElement = n, N.checkAnchorPositioningSupport()) {
1581
1582
  requestAnimationFrame(() => {
1582
1583
  const o = e.getBoundingClientRect(), a = n.getBoundingClientRect();
1583
1584
  o.top < a.top && e.classList.add("tbw-filter-panel-above");
@@ -1604,14 +1605,14 @@ class q extends _ {
1604
1605
  const h = document.createElement("span");
1605
1606
  h.textContent = "Select All", c.appendChild(u), c.appendChild(h), d.appendChild(c);
1606
1607
  const g = () => {
1607
- const b = [...v.values()], R = b.every((C) => C), T = b.every((C) => !C);
1608
- u.checked = R, u.indeterminate = !R && !T;
1608
+ const x = [...b.values()], S = x.every((m) => m), T = x.every((m) => !m);
1609
+ u.checked = S, u.indeterminate = !S && !T;
1609
1610
  };
1610
1611
  u.addEventListener("change", () => {
1611
- const b = u.checked;
1612
- for (const R of v.keys())
1613
- v.set(R, b);
1614
- g(), A();
1612
+ const x = u.checked;
1613
+ for (const S of b.keys())
1614
+ b.set(S, x);
1615
+ g(), _();
1615
1616
  }), e.appendChild(d);
1616
1617
  const f = document.createElement("div");
1617
1618
  f.className = "tbw-filter-values";
@@ -1619,186 +1620,182 @@ class q extends _ {
1619
1620
  p.className = "tbw-filter-values-spacer", f.appendChild(p);
1620
1621
  const w = document.createElement("div");
1621
1622
  w.className = "tbw-filter-values-content", f.appendChild(w);
1622
- const v = /* @__PURE__ */ new Map();
1623
- i.forEach((b) => {
1624
- const R = b == null ? "__null__" : String(b);
1625
- v.set(R, !n.has(b));
1623
+ const b = /* @__PURE__ */ new Map();
1624
+ i.forEach((x) => {
1625
+ const S = x == null ? "__null__" : String(x);
1626
+ b.set(S, !n.has(x));
1626
1627
  }), g();
1627
- let y = [];
1628
- const x = (b, R) => {
1629
- const T = b == null ? "(Blank)" : String(b), C = b == null ? "__null__" : String(b), m = document.createElement("label");
1630
- m.className = "tbw-filter-value-item", m.style.position = "absolute", m.style.top = `calc(var(--tbw-filter-item-height, 28px) * ${R})`, m.style.left = "0", m.style.right = "0", m.style.boxSizing = "border-box";
1631
- const E = document.createElement("input");
1632
- E.type = "checkbox", E.className = "tbw-filter-checkbox", E.checked = v.get(C) ?? !0, E.dataset.value = C, E.addEventListener("change", () => {
1633
- v.set(C, E.checked), g();
1628
+ let v = [];
1629
+ const C = (x, S) => {
1630
+ const T = x == null ? "(Blank)" : String(x), m = x == null ? "__null__" : String(x), y = document.createElement("label");
1631
+ y.className = "tbw-filter-value-item", y.style.position = "absolute", y.style.top = `calc(var(--tbw-filter-item-height, 28px) * ${S})`, y.style.left = "0", y.style.right = "0", y.style.boxSizing = "border-box";
1632
+ const L = document.createElement("input");
1633
+ L.type = "checkbox", L.className = "tbw-filter-checkbox", L.checked = b.get(m) ?? !0, L.dataset.value = m, L.addEventListener("change", () => {
1634
+ b.set(m, L.checked), g();
1634
1635
  });
1635
- const M = document.createElement("span");
1636
- return M.textContent = T, m.appendChild(E), m.appendChild(M), m;
1637
- }, A = () => {
1638
- const b = y.length, R = f.clientHeight, T = f.scrollTop;
1639
- if (p.style.height = `${b * o}px`, zt(b, q.LIST_BYPASS_THRESHOLD / 3)) {
1640
- w.innerHTML = "", w.style.transform = "translateY(0px)", y.forEach((m, E) => {
1641
- w.appendChild(x(m, E));
1636
+ const H = document.createElement("span");
1637
+ return H.textContent = T, y.appendChild(L), y.appendChild(H), y;
1638
+ }, _ = () => {
1639
+ const x = v.length, S = f.clientHeight, T = f.scrollTop;
1640
+ if (p.style.height = `${x * o}px`, Ht(x, N.LIST_BYPASS_THRESHOLD / 3)) {
1641
+ w.innerHTML = "", w.style.transform = "translateY(0px)", v.forEach((y, L) => {
1642
+ w.appendChild(C(y, L));
1642
1643
  });
1643
1644
  return;
1644
1645
  }
1645
- const C = Ht({
1646
- totalRows: b,
1647
- viewportHeight: R,
1646
+ const m = qt({
1647
+ totalRows: x,
1648
+ viewportHeight: S,
1648
1649
  scrollTop: T,
1649
1650
  rowHeight: o,
1650
- overscan: q.LIST_OVERSCAN
1651
+ overscan: N.LIST_OVERSCAN
1651
1652
  });
1652
- w.style.transform = `translateY(${C.offsetY}px)`, w.innerHTML = "";
1653
- for (let m = C.start; m < C.end; m++)
1654
- w.appendChild(x(y[m], m - C.start));
1655
- }, F = (b) => {
1656
- const R = this.config.caseSensitive ?? !1, T = R ? b : b.toLowerCase();
1657
- if (y = i.filter((C) => {
1658
- const m = C == null ? "(Blank)" : String(C), E = R ? m : m.toLowerCase();
1659
- return !b || E.includes(T);
1660
- }), y.length === 0) {
1653
+ w.style.transform = `translateY(${m.offsetY}px)`, w.innerHTML = "";
1654
+ for (let y = m.start; y < m.end; y++)
1655
+ w.appendChild(C(v[y], y - m.start));
1656
+ }, E = (x) => {
1657
+ const S = this.config.caseSensitive ?? !1, T = S ? x : x.toLowerCase();
1658
+ if (v = i.filter((m) => {
1659
+ const y = m == null ? "(Blank)" : String(m), L = S ? y : y.toLowerCase();
1660
+ return !x || L.includes(T);
1661
+ }), v.length === 0) {
1661
1662
  p.style.height = "0px", w.innerHTML = "";
1662
- const C = document.createElement("div");
1663
- C.className = "tbw-filter-no-match", C.textContent = "No matching values", w.appendChild(C);
1663
+ const m = document.createElement("div");
1664
+ m.className = "tbw-filter-no-match", m.textContent = "No matching values", w.appendChild(m);
1664
1665
  return;
1665
1666
  }
1666
- A();
1667
+ _();
1667
1668
  };
1668
1669
  f.addEventListener(
1669
1670
  "scroll",
1670
1671
  () => {
1671
- y.length > 0 && A();
1672
+ v.length > 0 && _();
1672
1673
  },
1673
1674
  { passive: !0 }
1674
- ), F(l.value), e.appendChild(f);
1675
- let k;
1675
+ ), E(l.value), e.appendChild(f);
1676
+ let P;
1676
1677
  l.addEventListener("input", () => {
1677
- clearTimeout(k), k = setTimeout(() => {
1678
- this.searchText.set(r, l.value), F(l.value);
1678
+ clearTimeout(P), P = setTimeout(() => {
1679
+ this.searchText.set(r, l.value), E(l.value);
1679
1680
  }, this.config.debounceMs ?? 150);
1680
1681
  });
1681
- const I = document.createElement("div");
1682
- I.className = "tbw-filter-buttons";
1683
- const L = document.createElement("button");
1684
- L.className = "tbw-filter-apply-btn", L.textContent = "Apply", L.addEventListener("click", () => {
1685
- const b = [];
1686
- for (const [R, T] of v)
1682
+ const F = document.createElement("div");
1683
+ F.className = "tbw-filter-buttons";
1684
+ const I = document.createElement("button");
1685
+ I.className = "tbw-filter-apply-btn", I.textContent = "Apply", I.addEventListener("click", () => {
1686
+ const x = [];
1687
+ for (const [S, T] of b)
1687
1688
  if (!T)
1688
- if (R === "__null__")
1689
- b.push(null);
1689
+ if (S === "__null__")
1690
+ x.push(null);
1690
1691
  else {
1691
- const C = i.find((m) => String(m) === R);
1692
- b.push(C !== void 0 ? C : R);
1692
+ const m = i.find((y) => String(y) === S);
1693
+ x.push(m !== void 0 ? m : S);
1693
1694
  }
1694
- t.applySetFilter(b);
1695
- }), I.appendChild(L);
1696
- const P = document.createElement("button");
1697
- P.className = "tbw-filter-clear-btn", P.textContent = "Clear Filter", P.addEventListener("click", () => {
1695
+ t.applySetFilter(x);
1696
+ }), F.appendChild(I);
1697
+ const R = document.createElement("button");
1698
+ R.className = "tbw-filter-clear-btn", R.textContent = "Clear Filter", R.addEventListener("click", () => {
1698
1699
  t.clearFilter();
1699
- }), I.appendChild(P), e.appendChild(I);
1700
+ }), F.appendChild(R), e.appendChild(F);
1700
1701
  }
1701
1702
  renderNumberFilterPanel(e, t, i) {
1702
- const { field: n, column: r } = t, o = r.filterParams, a = r.editorParams, l = (S, z) => {
1703
- if (typeof S == "number") return S;
1704
- if (typeof S == "string") {
1705
- const W = parseFloat(S);
1703
+ const { field: n, column: r } = t, o = r.filterParams, a = r.editorParams, l = (k, z) => {
1704
+ if (typeof k == "number") return k;
1705
+ if (typeof k == "string") {
1706
+ const W = parseFloat(k);
1706
1707
  return isNaN(W) ? z : W;
1707
1708
  }
1708
1709
  return z;
1709
- }, d = i.filter((S) => typeof S == "number" && !isNaN(S)), c = d.length > 0 ? Math.min(...d) : 0, u = d.length > 0 ? Math.max(...d) : 100, h = l(o?.min ?? a?.min, c), g = l(o?.max ?? a?.max, u), f = o?.step ?? a?.step ?? 1, p = this.filters.get(n);
1710
- let w = h, v = g;
1711
- p?.operator === "between" ? (w = l(p.value, h), v = l(p.valueTo, g)) : p?.operator === "greaterThanOrEqual" ? w = l(p.value, h) : p?.operator === "lessThanOrEqual" && (v = l(p.value, g));
1712
- const y = document.createElement("div");
1713
- y.className = "tbw-filter-range-title", y.textContent = r.header || n, e.appendChild(y);
1710
+ }, d = i.filter((k) => typeof k == "number" && !isNaN(k)), c = d.length > 0 ? Math.min(...d) : 0, u = d.length > 0 ? Math.max(...d) : 100, h = l(o?.min ?? a?.min, c), g = l(o?.max ?? a?.max, u), f = o?.step ?? a?.step ?? 1, p = this.filters.get(n);
1711
+ let w = h, b = g;
1712
+ p?.operator === "between" ? (w = l(p.value, h), b = l(p.valueTo, g)) : p?.operator === "greaterThanOrEqual" ? w = l(p.value, h) : p?.operator === "lessThanOrEqual" && (b = l(p.value, g));
1713
+ const v = document.createElement("div");
1714
+ v.className = "tbw-filter-range-inputs";
1715
+ const C = document.createElement("div");
1716
+ C.className = "tbw-filter-range-group";
1717
+ const _ = document.createElement("label");
1718
+ _.textContent = "Min", _.className = "tbw-filter-range-label";
1719
+ const E = document.createElement("input");
1720
+ E.type = "number", E.className = "tbw-filter-range-input", E.min = String(h), E.max = String(g), E.step = String(f), E.value = String(w), C.appendChild(_), C.appendChild(E), v.appendChild(C);
1721
+ const P = document.createElement("span");
1722
+ P.className = "tbw-filter-range-separator", P.textContent = "–", v.appendChild(P);
1723
+ const F = document.createElement("div");
1724
+ F.className = "tbw-filter-range-group";
1725
+ const I = document.createElement("label");
1726
+ I.textContent = "Max", I.className = "tbw-filter-range-label";
1727
+ const R = document.createElement("input");
1728
+ R.type = "number", R.className = "tbw-filter-range-input", R.min = String(h), R.max = String(g), R.step = String(f), R.value = String(b), F.appendChild(I), F.appendChild(R), v.appendChild(F), e.appendChild(v);
1714
1729
  const x = document.createElement("div");
1715
- x.className = "tbw-filter-range-inputs";
1716
- const A = document.createElement("div");
1717
- A.className = "tbw-filter-range-group";
1718
- const F = document.createElement("label");
1719
- F.textContent = "Min", F.className = "tbw-filter-range-label";
1720
- const k = document.createElement("input");
1721
- k.type = "number", k.className = "tbw-filter-range-input", k.min = String(h), k.max = String(g), k.step = String(f), k.value = String(w), A.appendChild(F), A.appendChild(k), x.appendChild(A);
1722
- const I = document.createElement("span");
1723
- I.className = "tbw-filter-range-separator", I.textContent = "–", x.appendChild(I);
1724
- const L = document.createElement("div");
1725
- L.className = "tbw-filter-range-group";
1726
- const P = document.createElement("label");
1727
- P.textContent = "Max", P.className = "tbw-filter-range-label";
1728
- const b = document.createElement("input");
1729
- b.type = "number", b.className = "tbw-filter-range-input", b.min = String(h), b.max = String(g), b.step = String(f), b.value = String(v), L.appendChild(P), L.appendChild(b), x.appendChild(L), e.appendChild(x);
1730
- const R = document.createElement("div");
1731
- R.className = "tbw-filter-range-slider";
1730
+ x.className = "tbw-filter-range-slider";
1731
+ const S = document.createElement("div");
1732
+ S.className = "tbw-filter-range-track";
1732
1733
  const T = document.createElement("div");
1733
- T.className = "tbw-filter-range-track";
1734
- const C = document.createElement("div");
1735
- C.className = "tbw-filter-range-fill";
1734
+ T.className = "tbw-filter-range-fill";
1736
1735
  const m = document.createElement("input");
1737
1736
  m.type = "range", m.className = "tbw-filter-range-thumb tbw-filter-range-thumb-min", m.min = String(h), m.max = String(g), m.step = String(f), m.value = String(w);
1738
- const E = document.createElement("input");
1739
- E.type = "range", E.className = "tbw-filter-range-thumb tbw-filter-range-thumb-max", E.min = String(h), E.max = String(g), E.step = String(f), E.value = String(v), R.appendChild(T), R.appendChild(C), R.appendChild(m), R.appendChild(E), e.appendChild(R);
1740
- const M = () => {
1741
- const S = parseFloat(m.value), z = parseFloat(E.value), W = g - h, ve = (S - h) / W * 100, st = (z - h) / W * 100;
1742
- C.style.left = `${ve}%`, C.style.width = `${st - ve}%`;
1737
+ const y = document.createElement("input");
1738
+ y.type = "range", y.className = "tbw-filter-range-thumb tbw-filter-range-thumb-max", y.min = String(h), y.max = String(g), y.step = String(f), y.value = String(b), x.appendChild(S), x.appendChild(T), x.appendChild(m), x.appendChild(y), e.appendChild(x);
1739
+ const L = () => {
1740
+ const k = parseFloat(m.value), z = parseFloat(y.value), W = g - h, be = (k - h) / W * 100, ot = (z - h) / W * 100;
1741
+ T.style.left = `${be}%`, T.style.width = `${ot - be}%`;
1743
1742
  };
1744
1743
  m.addEventListener("input", () => {
1745
- const S = Math.min(parseFloat(m.value), parseFloat(E.value));
1746
- m.value = String(S), k.value = String(S), M();
1744
+ const k = Math.min(parseFloat(m.value), parseFloat(y.value));
1745
+ m.value = String(k), E.value = String(k), L();
1746
+ }), y.addEventListener("input", () => {
1747
+ const k = Math.max(parseFloat(y.value), parseFloat(m.value));
1748
+ y.value = String(k), R.value = String(k), L();
1747
1749
  }), E.addEventListener("input", () => {
1748
- const S = Math.max(parseFloat(E.value), parseFloat(m.value));
1749
- E.value = String(S), b.value = String(S), M();
1750
- }), k.addEventListener("input", () => {
1751
- let S = parseFloat(k.value) || h;
1752
- S = Math.max(h, Math.min(S, parseFloat(b.value))), m.value = String(S), M();
1753
- }), b.addEventListener("input", () => {
1754
- let S = parseFloat(b.value) || g;
1755
- S = Math.min(g, Math.max(S, parseFloat(k.value))), E.value = String(S), M();
1756
- }), M();
1757
- const Y = document.createElement("div");
1758
- Y.className = "tbw-filter-buttons";
1750
+ let k = parseFloat(E.value) || h;
1751
+ k = Math.max(h, Math.min(k, parseFloat(R.value))), m.value = String(k), L();
1752
+ }), R.addEventListener("input", () => {
1753
+ let k = parseFloat(R.value) || g;
1754
+ k = Math.min(g, Math.max(k, parseFloat(E.value))), y.value = String(k), L();
1755
+ }), L();
1756
+ const H = document.createElement("div");
1757
+ H.className = "tbw-filter-buttons";
1758
+ const Y = document.createElement("button");
1759
+ Y.className = "tbw-filter-apply-btn", Y.textContent = "Apply", Y.addEventListener("click", () => {
1760
+ const k = parseFloat(E.value), z = parseFloat(R.value);
1761
+ t.applyTextFilter("between", k, z);
1762
+ }), H.appendChild(Y);
1759
1763
  const X = document.createElement("button");
1760
- X.className = "tbw-filter-apply-btn", X.textContent = "Apply", X.addEventListener("click", () => {
1761
- const S = parseFloat(k.value), z = parseFloat(b.value);
1762
- t.applyTextFilter("between", S, z);
1763
- }), Y.appendChild(X);
1764
- const Z = document.createElement("button");
1765
- Z.className = "tbw-filter-clear-btn", Z.textContent = "Clear Filter", Z.addEventListener("click", () => {
1764
+ X.className = "tbw-filter-clear-btn", X.textContent = "Clear Filter", X.addEventListener("click", () => {
1766
1765
  t.clearFilter();
1767
- }), Y.appendChild(Z), e.appendChild(Y);
1766
+ }), H.appendChild(X), e.appendChild(H);
1768
1767
  }
1769
1768
  renderDateFilterPanel(e, t, i) {
1770
1769
  const { field: n, column: r } = t, o = r.filterParams, a = r.editorParams, l = i.filter((m) => m instanceof Date || typeof m == "string" && !isNaN(Date.parse(m))).map((m) => m instanceof Date ? m : new Date(m)).filter((m) => !isNaN(m.getTime())), d = l.length > 0 ? new Date(Math.min(...l.map((m) => m.getTime()))) : null, c = l.length > 0 ? new Date(Math.max(...l.map((m) => m.getTime()))) : null, u = (m) => m ? m.toISOString().split("T")[0] : "", h = (m) => m ? typeof m == "string" ? m : typeof m == "number" ? u(new Date(m)) : "" : "", g = h(o?.min) || h(a?.min) || u(d), f = h(o?.max) || h(a?.max) || u(c), p = this.filters.get(n);
1771
- let w = "", v = "";
1772
- p?.operator === "between" ? (w = h(p.value) || "", v = h(p.valueTo) || "") : p?.operator === "greaterThanOrEqual" ? w = h(p.value) || "" : p?.operator === "lessThanOrEqual" && (v = h(p.value) || "");
1773
- const y = document.createElement("div");
1774
- y.className = "tbw-filter-range-title", y.textContent = r.header || n, e.appendChild(y);
1770
+ let w = "", b = "";
1771
+ p?.operator === "between" ? (w = h(p.value) || "", b = h(p.valueTo) || "") : p?.operator === "greaterThanOrEqual" ? w = h(p.value) || "" : p?.operator === "lessThanOrEqual" && (b = h(p.value) || "");
1772
+ const v = document.createElement("div");
1773
+ v.className = "tbw-filter-date-range";
1774
+ const C = document.createElement("div");
1775
+ C.className = "tbw-filter-date-group";
1776
+ const _ = document.createElement("label");
1777
+ _.textContent = "From", _.className = "tbw-filter-range-label";
1778
+ const E = document.createElement("input");
1779
+ E.type = "date", E.className = "tbw-filter-date-input", g && (E.min = g), f && (E.max = f), E.value = w, C.appendChild(_), C.appendChild(E), v.appendChild(C);
1780
+ const P = document.createElement("span");
1781
+ P.className = "tbw-filter-range-separator", P.textContent = "–", v.appendChild(P);
1782
+ const F = document.createElement("div");
1783
+ F.className = "tbw-filter-date-group";
1784
+ const I = document.createElement("label");
1785
+ I.textContent = "To", I.className = "tbw-filter-range-label";
1786
+ const R = document.createElement("input");
1787
+ R.type = "date", R.className = "tbw-filter-date-input", g && (R.min = g), f && (R.max = f), R.value = b, F.appendChild(I), F.appendChild(R), v.appendChild(F), e.appendChild(v);
1775
1788
  const x = document.createElement("div");
1776
- x.className = "tbw-filter-date-range";
1777
- const A = document.createElement("div");
1778
- A.className = "tbw-filter-date-group";
1779
- const F = document.createElement("label");
1780
- F.textContent = "From", F.className = "tbw-filter-range-label";
1781
- const k = document.createElement("input");
1782
- k.type = "date", k.className = "tbw-filter-date-input", g && (k.min = g), f && (k.max = f), k.value = w, A.appendChild(F), A.appendChild(k), x.appendChild(A);
1783
- const I = document.createElement("span");
1784
- I.className = "tbw-filter-range-separator", I.textContent = "–", x.appendChild(I);
1785
- const L = document.createElement("div");
1786
- L.className = "tbw-filter-date-group";
1787
- const P = document.createElement("label");
1788
- P.textContent = "To", P.className = "tbw-filter-range-label";
1789
- const b = document.createElement("input");
1790
- b.type = "date", b.className = "tbw-filter-date-input", g && (b.min = g), f && (b.max = f), b.value = v, L.appendChild(P), L.appendChild(b), x.appendChild(L), e.appendChild(x);
1791
- const R = document.createElement("div");
1792
- R.className = "tbw-filter-buttons";
1789
+ x.className = "tbw-filter-buttons";
1790
+ const S = document.createElement("button");
1791
+ S.className = "tbw-filter-apply-btn", S.textContent = "Apply", S.addEventListener("click", () => {
1792
+ const m = E.value, y = R.value;
1793
+ m && y ? t.applyTextFilter("between", m, y) : m ? t.applyTextFilter("greaterThanOrEqual", m) : y ? t.applyTextFilter("lessThanOrEqual", y) : t.clearFilter();
1794
+ }), x.appendChild(S);
1793
1795
  const T = document.createElement("button");
1794
- T.className = "tbw-filter-apply-btn", T.textContent = "Apply", T.addEventListener("click", () => {
1795
- const m = k.value, E = b.value;
1796
- m && E ? t.applyTextFilter("between", m, E) : m ? t.applyTextFilter("greaterThanOrEqual", m) : E ? t.applyTextFilter("lessThanOrEqual", E) : t.clearFilter();
1797
- }), R.appendChild(T);
1798
- const C = document.createElement("button");
1799
- C.className = "tbw-filter-clear-btn", C.textContent = "Clear Filter", C.addEventListener("click", () => {
1796
+ T.className = "tbw-filter-clear-btn", T.textContent = "Clear Filter", T.addEventListener("click", () => {
1800
1797
  t.clearFilter();
1801
- }), R.appendChild(C), e.appendChild(R);
1798
+ }), x.appendChild(T), e.appendChild(x);
1802
1799
  }
1803
1800
  applySetFilter(e, t) {
1804
1801
  this.excludedValues.set(e, new Set(t)), t.length === 0 ? this.filters.delete(e) : this.filters.set(e, {
@@ -1864,7 +1861,7 @@ class q extends _ {
1864
1861
  this.filters.set(e, i), this.cachedResult = null, this.cacheKey = null;
1865
1862
  }
1866
1863
  }
1867
- function Ie(s) {
1864
+ function Fe(s) {
1868
1865
  if (!s.length) return [];
1869
1866
  const e = /* @__PURE__ */ new Map(), t = [], i = (o, a) => {
1870
1867
  if (!a.length) return;
@@ -1899,7 +1896,7 @@ function Ie(s) {
1899
1896
  }, e.set(d, c), t.push(c)), c.columns.push(o);
1900
1897
  }), n.length && i(r, n), t.length === 1 && t[0].implicit && t[0].columns.length === s.length ? [] : t;
1901
1898
  }
1902
- function Wt(s, e, t) {
1899
+ function Vt(s, e, t) {
1903
1900
  if (!e.length || !s) return;
1904
1901
  const i = /* @__PURE__ */ new Map();
1905
1902
  for (const r of e)
@@ -1915,7 +1912,7 @@ function Wt(s, e, t) {
1915
1912
  a && a.classList.add("group-end");
1916
1913
  }
1917
1914
  }
1918
- function $t(s, e) {
1915
+ function Wt(s, e) {
1919
1916
  if (s.length === 0) return null;
1920
1917
  const t = document.createElement("div");
1921
1918
  t.className = "header-group-row", t.setAttribute("role", "row");
@@ -1927,11 +1924,11 @@ function $t(s, e) {
1927
1924
  }
1928
1925
  return t;
1929
1926
  }
1930
- function jt(s) {
1927
+ function $t(s) {
1931
1928
  return s.some((e) => e.group != null);
1932
1929
  }
1933
- const Ut = "@layer tbw-plugins{.header-group-row{display:grid;grid-auto-flow:column;background:var(--tbw-grouping-columns-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-grouping-columns-border, var(--tbw-color-border))}.header-group-cell{display:flex;align-items:center;justify-content:center;padding:var(--tbw-button-padding-sm, .25rem .5rem);font-weight:600;font-size:var(--tbw-font-size-sm, .9em);text-transform:uppercase;letter-spacing:.5px;border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.header-group-cell:last-child{border-right:none}.header-row .cell.grouped{border-top:none}.header-row .cell.group-end{border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.header-row .cell.group-end:last-child{border-right:none}.rows .cell.group-end{border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.rows .cell.group-end:last-child{border-right:none}.header-group-row.no-borders{border-bottom:none}.header-group-row.no-borders .header-group-cell{border-right:none}.header-row.no-group-borders .cell.group-end{border-right:1px solid var(--tbw-color-border)}}";
1934
- class mn extends _ {
1930
+ const jt = "@layer tbw-plugins{.header-group-row{display:grid;grid-auto-flow:column;background:var(--tbw-grouping-columns-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-grouping-columns-border, var(--tbw-color-border))}.header-group-cell{display:flex;align-items:center;justify-content:center;padding:var(--tbw-button-padding-sm, .25rem .5rem);font-weight:600;font-size:var(--tbw-font-size-sm, .9em);text-transform:uppercase;letter-spacing:.5px;border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.header-group-cell:last-child{border-right:none}.header-row .cell.grouped{border-top:none}.header-row .cell.group-end{border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.header-row .cell.group-end:last-child{border-right:none}.rows .cell.group-end{border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.rows .cell.group-end:last-child{border-right:none}.header-group-row.no-borders{border-bottom:none}.header-group-row.no-borders .header-group-cell{border-right:none}.header-row.no-group-borders .cell.group-end{border-right:1px solid var(--tbw-color-border)}}";
1931
+ class pn extends A {
1935
1932
  static manifest = {
1936
1933
  ownedProperties: [
1937
1934
  {
@@ -1948,7 +1945,7 @@ class mn extends _ {
1948
1945
  ]
1949
1946
  };
1950
1947
  name = "groupingColumns";
1951
- styles = Ut;
1948
+ styles = jt;
1952
1949
  get defaultConfig() {
1953
1950
  return {
1954
1951
  showGroupBorders: !0
@@ -1963,7 +1960,7 @@ class mn extends _ {
1963
1960
  if (t?.columnGroups && Array.isArray(t.columnGroups) && t.columnGroups.length > 0)
1964
1961
  return !0;
1965
1962
  const i = t?.columns;
1966
- return Array.isArray(i) ? jt(i) : !1;
1963
+ return Array.isArray(i) ? $t(i) : !1;
1967
1964
  }
1968
1965
  processColumns(e) {
1969
1966
  const t = this.grid?.gridConfig?.columnGroups;
@@ -1979,7 +1976,7 @@ class mn extends _ {
1979
1976
  });
1980
1977
  } else
1981
1978
  i = [...e];
1982
- const n = Ie(i);
1979
+ const n = Fe(i);
1983
1980
  return n.length === 0 ? (this.isActive = !1, this.groups = [], i) : (this.isActive = !0, this.groups = n, i);
1984
1981
  }
1985
1982
  afterRender() {
@@ -1992,16 +1989,16 @@ class mn extends _ {
1992
1989
  if (!e) return;
1993
1990
  const t = e.querySelector(".header-group-row");
1994
1991
  t && t.remove();
1995
- const i = this.columns, n = Ie(i);
1992
+ const i = this.columns, n = Fe(i);
1996
1993
  if (n.length === 0) return;
1997
- const r = $t(n, i);
1994
+ const r = Wt(n, i);
1998
1995
  if (r) {
1999
1996
  r.classList.toggle("no-borders", !this.config.showGroupBorders);
2000
1997
  const a = e.querySelector(".header-row");
2001
1998
  a ? e.insertBefore(r, a) : e.appendChild(r);
2002
1999
  }
2003
2000
  const o = e.querySelector(".header-row");
2004
- o && (o.classList.toggle("no-group-borders", !this.config.showGroupBorders), Wt(o, n)), this.#e(n);
2001
+ o && (o.classList.toggle("no-group-borders", !this.config.showGroupBorders), Vt(o, n)), this.#e(n);
2005
2002
  }
2006
2003
  #e(e) {
2007
2004
  if (!this.config.showGroupBorders) return;
@@ -2032,7 +2029,7 @@ class mn extends _ {
2032
2029
  this.requestRender();
2033
2030
  }
2034
2031
  }
2035
- function Pe({ rows: s, config: e, expanded: t, initialExpanded: i }) {
2032
+ function Ie({ rows: s, config: e, expanded: t, initialExpanded: i }) {
2036
2033
  const n = e.groupOn;
2037
2034
  if (typeof n != "function")
2038
2035
  return [];
@@ -2065,20 +2062,20 @@ function Pe({ rows: s, config: e, expanded: t, initialExpanded: i }) {
2065
2062
  };
2066
2063
  return l(r), a;
2067
2064
  }
2068
- function Yt(s, e) {
2065
+ function Ut(s, e) {
2069
2066
  const t = new Set(s);
2070
2067
  return t.has(e) ? t.delete(e) : t.add(e), t;
2071
2068
  }
2072
- function Xt(s) {
2069
+ function Yt(s) {
2073
2070
  const e = /* @__PURE__ */ new Set();
2074
2071
  for (const t of s)
2075
2072
  t.kind === "group" && e.add(t.key);
2076
2073
  return e;
2077
2074
  }
2078
- function Zt() {
2075
+ function Xt() {
2079
2076
  return /* @__PURE__ */ new Set();
2080
2077
  }
2081
- function Jt(s, e) {
2078
+ function Zt(s, e) {
2082
2079
  if (s === !0)
2083
2080
  return new Set(e);
2084
2081
  if (s === !1 || s == null)
@@ -2089,14 +2086,14 @@ function Jt(s, e) {
2089
2086
  }
2090
2087
  return typeof s == "string" ? /* @__PURE__ */ new Set([s]) : Array.isArray(s) ? new Set(s) : /* @__PURE__ */ new Set();
2091
2088
  }
2092
- function Qt(s) {
2089
+ function Jt(s) {
2093
2090
  return s.filter((e) => e.kind === "group").map((e) => e.key);
2094
2091
  }
2095
- function ei(s) {
2092
+ function Qt(s) {
2096
2093
  return s.kind !== "group" ? 0 : s.rows.length;
2097
2094
  }
2098
- const ti = "@layer tbw-plugins{.group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-grouping-rows-bg, var(--tbw-color-panel-bg));font-weight:500;border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height)}.group-row .cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, .125rem .5rem)}.group-row:hover{background:var(--tbw-grouping-rows-bg-hover, var(--tbw-color-row-hover))}.group-toggle{cursor:pointer;user-select:none;display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toggle-size, 1.25rem);height:var(--tbw-toggle-size, 1.25rem);margin-right:.25rem;background:none;border:0;font:inherit}.group-toggle:hover{background:var(--tbw-grouping-rows-toggle-hover, var(--tbw-color-row-hover));border-radius:var(--tbw-border-radius, .125rem)}.group-label{display:inline-flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.group-count{color:var(--tbw-grouping-rows-count-color, var(--tbw-color-fg-muted));font-size:var(--tbw-font-size-xs, .85em);font-weight:400}.group-aggregates{display:inline-flex;align-items:center;gap:var(--tbw-spacing-lg, 1rem);margin-left:var(--tbw-spacing-lg, 1rem);font-weight:400;font-size:var(--tbw-font-size-sm, .875em);color:var(--tbw-grouping-rows-aggregate-color, var(--tbw-color-fg-muted))}.group-aggregate{white-space:nowrap}.group-row{padding-left:calc(var(--tbw-group-depth, 0) * var(--tbw-group-indent-width, 1.25em))}.data-grid-row.tbw-group-slide-in{animation:tbw-group-slide-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-group-slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.data-grid-row.tbw-group-fade-in{animation:tbw-group-fade-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-group-fade-in{0%{opacity:0}to{opacity:1}}}";
2099
- class wn extends _ {
2095
+ const ei = "@layer tbw-plugins{.group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-grouping-rows-bg, var(--tbw-color-panel-bg));font-weight:500;border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height)}.group-row .cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, .125rem .5rem)}.group-row:hover{background:var(--tbw-grouping-rows-bg-hover, var(--tbw-color-row-hover))}.group-toggle{cursor:pointer;user-select:none;display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toggle-size, 1.25rem);height:var(--tbw-toggle-size, 1.25rem);margin-right:.25rem;background:none;border:0;font:inherit}.group-toggle:hover{background:var(--tbw-grouping-rows-toggle-hover, var(--tbw-color-row-hover));border-radius:var(--tbw-border-radius, .125rem)}.group-label{display:inline-flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.group-count{color:var(--tbw-grouping-rows-count-color, var(--tbw-color-fg-muted));font-size:var(--tbw-font-size-xs, .85em);font-weight:400}.group-aggregates{display:inline-flex;align-items:center;gap:var(--tbw-spacing-lg, 1rem);margin-left:var(--tbw-spacing-lg, 1rem);font-weight:400;font-size:var(--tbw-font-size-sm, .875em);color:var(--tbw-grouping-rows-aggregate-color, var(--tbw-color-fg-muted))}.group-aggregate{white-space:nowrap}.group-row{padding-left:calc(var(--tbw-group-depth, 0) * var(--tbw-group-indent-width, 1.25em))}.data-grid-row.tbw-group-slide-in{animation:tbw-group-slide-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-group-slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.data-grid-row.tbw-group-fade-in{animation:tbw-group-fade-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-group-fade-in{0%{opacity:0}to{opacity:1}}}";
2096
+ class mn extends A {
2100
2097
  static manifest = {
2101
2098
  configRules: [
2102
2099
  {
@@ -2111,7 +2108,7 @@ class wn extends _ {
2111
2108
  ]
2112
2109
  };
2113
2110
  name = "groupingRows";
2114
- styles = ti;
2111
+ styles = ei;
2115
2112
  get defaultConfig() {
2116
2113
  return {
2117
2114
  defaultExpanded: !1,
@@ -2141,7 +2138,7 @@ class wn extends _ {
2141
2138
  const t = this.config;
2142
2139
  if (typeof t.groupOn != "function")
2143
2140
  return this.isActive = !1, this.flattenedRows = [], [...e];
2144
- const i = Pe({
2141
+ const i = Ie({
2145
2142
  rows: [...e],
2146
2143
  config: t,
2147
2144
  expanded: /* @__PURE__ */ new Set()
@@ -2150,10 +2147,10 @@ class wn extends _ {
2150
2147
  return this.isActive = !1, this.flattenedRows = [], [...e];
2151
2148
  let n;
2152
2149
  if (!this.hasAppliedDefaultExpanded && this.expandedKeys.size === 0 && t.defaultExpanded !== !1) {
2153
- const a = Qt(i);
2154
- n = Jt(t.defaultExpanded ?? !1, a), n.size > 0 && (this.expandedKeys = new Set(n), this.hasAppliedDefaultExpanded = !0);
2150
+ const a = Jt(i);
2151
+ n = Zt(t.defaultExpanded ?? !1, a), n.size > 0 && (this.expandedKeys = new Set(n), this.hasAppliedDefaultExpanded = !0);
2155
2152
  }
2156
- const r = Pe({
2153
+ const r = Ie({
2157
2154
  rows: [...e],
2158
2155
  config: t,
2159
2156
  expanded: this.expandedKeys,
@@ -2173,7 +2170,7 @@ class wn extends _ {
2173
2170
  __groupDepth: a.depth,
2174
2171
  __groupRows: a.rows,
2175
2172
  __groupExpanded: a.expanded,
2176
- __groupRowCount: ei(a)
2173
+ __groupRowCount: Qt(a)
2177
2174
  } : a.row);
2178
2175
  }
2179
2176
  onCellClick(e) {
@@ -2245,7 +2242,7 @@ class wn extends _ {
2245
2242
  const c = document.createElement("span");
2246
2243
  c.className = "group-aggregates";
2247
2244
  for (const [u, h] of d) {
2248
- const g = this.columns.find((p) => p.field === u), f = te(h, o, u, g);
2245
+ const g = this.columns.find((p) => p.field === u), f = ee(h, o, u, g);
2249
2246
  if (f != null) {
2250
2247
  const p = document.createElement("span");
2251
2248
  p.className = "group-aggregate", p.setAttribute("data-field", u);
@@ -2263,14 +2260,14 @@ class wn extends _ {
2263
2260
  let c = !1;
2264
2261
  o.forEach((u, h) => {
2265
2262
  const g = document.createElement("div");
2266
- if (g.className = "cell group-cell", g.setAttribute("data-col", String(h)), g.setAttribute("role", "gridcell"), pe(u)) {
2263
+ if (g.className = "cell group-cell", g.setAttribute("data-col", String(h)), g.setAttribute("role", "gridcell"), fe(u)) {
2267
2264
  g.setAttribute("data-field", u.field), t.appendChild(g);
2268
2265
  return;
2269
2266
  }
2270
2267
  if (c) {
2271
2268
  const f = r[u.field];
2272
2269
  if (f) {
2273
- const p = te(f, a, u.field, u);
2270
+ const p = ee(f, a, u.field, u);
2274
2271
  g.textContent = p != null ? String(p) : "";
2275
2272
  } else
2276
2273
  g.textContent = "";
@@ -2278,7 +2275,7 @@ class wn extends _ {
2278
2275
  c = !0, g.appendChild(this.createToggleButton(e.__groupExpanded, i));
2279
2276
  const f = document.createElement("span"), p = r[u.field];
2280
2277
  if (p) {
2281
- const w = te(p, a, u.field, u);
2278
+ const w = ee(p, a, u.field, u);
2282
2279
  f.textContent = w != null ? String(w) : String(e.__groupValue);
2283
2280
  } else
2284
2281
  f.textContent = this.getGroupLabelText(e.__groupValue, e.__groupDepth || 0, e.__groupKey);
@@ -2291,10 +2288,10 @@ class wn extends _ {
2291
2288
  });
2292
2289
  }
2293
2290
  expandAll() {
2294
- this.expandedKeys = Xt(this.flattenedRows), this.requestRender();
2291
+ this.expandedKeys = Yt(this.flattenedRows), this.requestRender();
2295
2292
  }
2296
2293
  collapseAll() {
2297
- this.expandedKeys = Zt(), this.requestRender();
2294
+ this.expandedKeys = Xt(), this.requestRender();
2298
2295
  }
2299
2296
  toggle(e) {
2300
2297
  const t = !this.expandedKeys.has(e), i = this.config, n = this.flattenedRows.find((r) => r.kind === "group" && r.key === e);
@@ -2309,7 +2306,7 @@ class wn extends _ {
2309
2306
  }
2310
2307
  r.add(e), this.expandedKeys = r;
2311
2308
  } else
2312
- this.expandedKeys = Yt(this.expandedKeys, e);
2309
+ this.expandedKeys = Ut(this.expandedKeys, e);
2313
2310
  this.emit("group-toggle", {
2314
2311
  key: e,
2315
2312
  expanded: this.expandedKeys.has(e),
@@ -2357,22 +2354,22 @@ class wn extends _ {
2357
2354
  this.config.groupOn = e, this.requestRender();
2358
2355
  }
2359
2356
  }
2360
- function De(s, e) {
2357
+ function Pe(s, e) {
2361
2358
  const t = new Set(s);
2362
2359
  return t.has(e) ? t.delete(e) : t.add(e), t;
2363
2360
  }
2364
- function ii(s, e) {
2361
+ function ti(s, e) {
2365
2362
  const t = new Set(s);
2366
2363
  return t.add(e), t;
2367
2364
  }
2368
- function ni(s, e) {
2365
+ function ii(s, e) {
2369
2366
  const t = new Set(s);
2370
2367
  return t.delete(e), t;
2371
2368
  }
2372
- function ri(s, e) {
2369
+ function ni(s, e) {
2373
2370
  return s.has(e);
2374
2371
  }
2375
- function oi(s, e, t, i) {
2372
+ function ri(s, e, t, i) {
2376
2373
  const n = document.createElement("div");
2377
2374
  n.className = "master-detail-row", n.setAttribute("data-detail-for", String(e)), n.setAttribute("role", "row");
2378
2375
  const r = document.createElement("div");
@@ -2380,10 +2377,10 @@ function oi(s, e, t, i) {
2380
2377
  const o = t(s, e);
2381
2378
  return typeof o == "string" ? r.innerHTML = o : o instanceof HTMLElement && r.appendChild(o), n.appendChild(r), n;
2382
2379
  }
2383
- const si = "@layer tbw-plugins{tbw-grid{.cell[data-field=__tbw_expander]{border-right:none!important;padding:0;display:flex;align-items:center;justify-content:center}.header-row .cell[data-field=__tbw_expander]{display:none}.header-row .cell[data-field=__tbw_expander]+.cell{grid-column:1 / 3}.master-detail-expander{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.master-detail-toggle{cursor:pointer;opacity:.7;user-select:none;display:inline-flex;align-items:center;justify-content:center}.master-detail-toggle:hover{opacity:1}.master-detail-row{grid-column:1 / -1;display:grid;background:var(--tbw-master-detail-bg, var(--tbw-color-row-alt));border-bottom:1px solid var(--tbw-master-detail-border, var(--tbw-color-border));overflow:hidden}.master-detail-cell{padding:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem));overflow:auto}.master-detail-row.tbw-expanding{animation:tbw-detail-expand var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}.master-detail-row.tbw-collapsing{animation:tbw-detail-collapse var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}}@keyframes tbw-detail-expand{0%{opacity:0;max-height:0;padding-top:0;padding-bottom:0}to{opacity:1;max-height:var(--tbw-detail-max-height, 31.25rem);padding-top:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem));padding-bottom:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem))}}@keyframes tbw-detail-collapse{0%{opacity:1;max-height:var(--tbw-detail-max-height, 31.25rem)}to{opacity:0;max-height:0}}}";
2384
- class tt extends _ {
2380
+ const oi = "@layer tbw-plugins{tbw-grid{.cell[data-field=__tbw_expander]{border-right:none!important;padding:0;display:flex;align-items:center;justify-content:center}.header-row .cell[data-field=__tbw_expander]{display:none}.header-row .cell[data-field=__tbw_expander]+.cell{grid-column:1 / 3}.master-detail-expander{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.master-detail-toggle{cursor:pointer;opacity:.7;user-select:none;display:inline-flex;align-items:center;justify-content:center}.master-detail-toggle:hover{opacity:1}.master-detail-row{grid-column:1 / -1;display:grid;background:var(--tbw-master-detail-bg, var(--tbw-color-row-alt));border-bottom:1px solid var(--tbw-master-detail-border, var(--tbw-color-border));overflow:hidden}.master-detail-cell{padding:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem));overflow:auto}.master-detail-row.tbw-expanding{animation:tbw-detail-expand var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}.master-detail-row.tbw-collapsing{animation:tbw-detail-collapse var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}}@keyframes tbw-detail-expand{0%{opacity:0;max-height:0;padding-top:0;padding-bottom:0}to{opacity:1;max-height:var(--tbw-detail-max-height, 31.25rem);padding-top:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem));padding-bottom:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem))}}@keyframes tbw-detail-collapse{0%{opacity:1;max-height:var(--tbw-detail-max-height, 31.25rem)}to{opacity:0;max-height:0}}}";
2381
+ class et extends A {
2385
2382
  name = "masterDetail";
2386
- styles = si;
2383
+ styles = oi;
2387
2384
  get defaultConfig() {
2388
2385
  return {
2389
2386
  detailHeight: "auto",
@@ -2412,8 +2409,8 @@ class tt extends _ {
2412
2409
  n !== null && (d.animation = n === "false" ? !1 : n), r !== null && (d.showExpandColumn = r !== "false"), o !== null && (d.expandOnRowClick = o === "true"), a !== null && (d.collapseOnClickOutside = a === "true"), l !== null && (d.detailHeight = l === "auto" ? "auto" : parseInt(l, 10));
2413
2410
  const c = t.innerHTML.trim();
2414
2411
  c && !this.config.detailRenderer && (d.detailRenderer = (u, h) => {
2415
- const g = dt(c, { value: u, row: u });
2416
- return ct(g);
2412
+ const g = lt(c, { value: u, row: u });
2413
+ return dt(g);
2417
2414
  }), Object.keys(d).length > 0 && (this.config = { ...this.config, ...d });
2418
2415
  }
2419
2416
  get animationStyle() {
@@ -2444,10 +2441,10 @@ class tt extends _ {
2444
2441
  static DEFAULT_DETAIL_HEIGHT = 150;
2445
2442
  getDetailHeight(e) {
2446
2443
  const t = this.detailElements.get(e);
2447
- return t ? t.offsetHeight : typeof this.config?.detailHeight == "number" ? this.config.detailHeight : tt.DEFAULT_DETAIL_HEIGHT;
2444
+ return t ? t.offsetHeight : typeof this.config?.detailHeight == "number" ? this.config.detailHeight : et.DEFAULT_DETAIL_HEIGHT;
2448
2445
  }
2449
2446
  toggleAndEmit(e, t) {
2450
- this.expandedRows = De(this.expandedRows, e), this.emit("detail-expand", {
2447
+ this.expandedRows = Pe(this.expandedRows, e), this.emit("detail-expand", {
2451
2448
  rowIndex: t,
2452
2449
  row: e,
2453
2450
  expanded: this.expandedRows.has(e)
@@ -2460,9 +2457,9 @@ class tt extends _ {
2460
2457
  if (!(this.config.showExpandColumn === !0 || this.config.showExpandColumn !== !1 && !!this.config.detailRenderer))
2461
2458
  return [...e];
2462
2459
  const i = [...e];
2463
- if (ft(i))
2460
+ if (gt(i))
2464
2461
  return i;
2465
- const r = pt(this.name);
2462
+ const r = ft(this.name);
2466
2463
  return r.viewRenderer = (o) => {
2467
2464
  const { row: a } = o, l = this.expandedRows.has(a), d = document.createElement("span");
2468
2465
  d.className = "master-detail-expander expander-cell";
@@ -2482,7 +2479,7 @@ class tt extends _ {
2482
2479
  onKeyDown(e) {
2483
2480
  if (e.key !== " ") return;
2484
2481
  const t = this.grid._focusCol, i = this.grid._focusRow, n = this.columns[t];
2485
- if (!n || !pe(n)) return;
2482
+ if (!n || !fe(n)) return;
2486
2483
  const r = this.rows[i];
2487
2484
  if (r)
2488
2485
  return e.preventDefault(), this.toggleAndEmit(r, i), this.requestRenderWithFocus(), !0;
@@ -2515,7 +2512,7 @@ class tt extends _ {
2515
2512
  d.previousElementSibling !== a && a.after(d);
2516
2513
  continue;
2517
2514
  }
2518
- const c = oi(l, o, this.config.detailRenderer, n);
2515
+ const c = ri(l, o, this.config.detailRenderer, n);
2519
2516
  typeof this.config.detailHeight == "number" && (c.style.height = `${this.config.detailHeight}px`), a.after(c), this.detailElements.set(l, c), this.animateExpand(c);
2520
2517
  }
2521
2518
  }
@@ -2550,19 +2547,19 @@ class tt extends _ {
2550
2547
  }
2551
2548
  expand(e) {
2552
2549
  const t = this.rows[e];
2553
- t && (this.expandedRows = ii(this.expandedRows, t), this.requestRender());
2550
+ t && (this.expandedRows = ti(this.expandedRows, t), this.requestRender());
2554
2551
  }
2555
2552
  collapse(e) {
2556
2553
  const t = this.rows[e];
2557
- t && (this.expandedRows = ni(this.expandedRows, t), this.requestRender());
2554
+ t && (this.expandedRows = ii(this.expandedRows, t), this.requestRender());
2558
2555
  }
2559
2556
  toggle(e) {
2560
2557
  const t = this.rows[e];
2561
- t && (this.expandedRows = De(this.expandedRows, t), this.requestRender());
2558
+ t && (this.expandedRows = Pe(this.expandedRows, t), this.requestRender());
2562
2559
  }
2563
2560
  isExpanded(e) {
2564
2561
  const t = this.rows[e];
2565
- return t ? ri(this.expandedRows, t) : !1;
2562
+ return t ? ni(this.expandedRows, t) : !1;
2566
2563
  }
2567
2564
  expandAll() {
2568
2565
  for (const e of this.rows)
@@ -2592,34 +2589,34 @@ class tt extends _ {
2592
2589
  }
2593
2590
  }
2594
2591
  }
2595
- function ai(s, e, t) {
2592
+ function si(s, e, t) {
2596
2593
  return e.length ? [...s].sort((i, n) => {
2597
2594
  for (const r of e) {
2598
- const a = t.find((u) => u.field === r.field)?.sortComparator ?? li, l = i[r.field], d = n[r.field], c = a(l, d, i, n);
2595
+ const a = t.find((u) => u.field === r.field)?.sortComparator ?? ai, l = i[r.field], d = n[r.field], c = a(l, d, i, n);
2599
2596
  if (c !== 0)
2600
2597
  return r.direction === "asc" ? c : -c;
2601
2598
  }
2602
2599
  return 0;
2603
2600
  }) : [...s];
2604
2601
  }
2605
- function li(s, e) {
2602
+ function ai(s, e) {
2606
2603
  return s == null && e == null ? 0 : s == null ? 1 : e == null ? -1 : typeof s == "number" && typeof e == "number" ? s - e : s instanceof Date && e instanceof Date ? s.getTime() - e.getTime() : typeof s == "boolean" && typeof e == "boolean" ? s === e ? 0 : s ? -1 : 1 : String(s).localeCompare(String(e));
2607
2604
  }
2608
- function di(s, e, t, i) {
2605
+ function li(s, e, t, i) {
2609
2606
  const n = s.find((r) => r.field === e);
2610
2607
  return t ? n ? n.direction === "asc" ? s.map((r) => r.field === e ? { ...r, direction: "desc" } : r) : s.filter((r) => r.field !== e) : s.length < i ? [...s, { field: e, direction: "asc" }] : s : n?.direction === "asc" ? [{ field: e, direction: "desc" }] : n?.direction === "desc" ? [] : [{ field: e, direction: "asc" }];
2611
2608
  }
2612
- function Me(s, e) {
2609
+ function De(s, e) {
2613
2610
  const t = s.findIndex((i) => i.field === e);
2614
2611
  return t >= 0 ? t + 1 : void 0;
2615
2612
  }
2616
- function Ne(s, e) {
2613
+ function Me(s, e) {
2617
2614
  return s.find((t) => t.field === e)?.direction;
2618
2615
  }
2619
- const ci = '@layer tbw-plugins{.header-cell[data-sort=asc]:after{content:"↑";margin-left:var(--tbw-spacing-xs, .25em);opacity:.8}.header-cell[data-sort=desc]:after{content:"↓";margin-left:var(--tbw-spacing-xs, .25em);opacity:.8}.sort-indicator{margin-left:var(--tbw-spacing-xs, .25em);opacity:.8}.sort-index{font-size:var(--tbw-font-size-2xs, .7em);background:var(--tbw-multi-sort-badge-bg, var(--tbw-color-panel-bg));color:var(--tbw-multi-sort-badge-color, var(--tbw-color-fg));border-radius:50%;width:var(--tbw-multi-sort-badge-size, 1em);height:var(--tbw-multi-sort-badge-size, 1em);display:inline-flex;align-items:center;justify-content:center;margin-left:var(--tbw-spacing-xs, .125em);font-weight:600}}';
2620
- class bn extends _ {
2616
+ const di = '@layer tbw-plugins{.header-cell[data-sort=asc]:after{content:"↑";margin-left:var(--tbw-spacing-xs, .25em);opacity:.8}.header-cell[data-sort=desc]:after{content:"↓";margin-left:var(--tbw-spacing-xs, .25em);opacity:.8}.sort-indicator{margin-left:var(--tbw-spacing-xs, .25em);opacity:.8}.sort-index{font-size:var(--tbw-font-size-2xs, .7em);background:var(--tbw-multi-sort-badge-bg, var(--tbw-color-panel-bg));color:var(--tbw-multi-sort-badge-color, var(--tbw-color-fg));border-radius:50%;width:var(--tbw-multi-sort-badge-size, 1em);height:var(--tbw-multi-sort-badge-size, 1em);display:inline-flex;align-items:center;justify-content:center;margin-left:var(--tbw-spacing-xs, .125em);font-weight:600}}';
2617
+ class wn extends A {
2621
2618
  name = "multiSort";
2622
- styles = ci;
2619
+ styles = di;
2623
2620
  get defaultConfig() {
2624
2621
  return {
2625
2622
  maxSortColumns: 3,
@@ -2631,12 +2628,12 @@ class bn extends _ {
2631
2628
  this.sortModel = [];
2632
2629
  }
2633
2630
  processRows(e) {
2634
- return this.sortModel.length === 0 ? [...e] : ai([...e], this.sortModel, [...this.columns]);
2631
+ return this.sortModel.length === 0 ? [...e] : si([...e], this.sortModel, [...this.columns]);
2635
2632
  }
2636
2633
  onHeaderClick(e) {
2637
2634
  if (!this.columns.find((r) => r.field === e.field)?.sortable) return !1;
2638
2635
  const i = e.originalEvent.shiftKey, n = this.config.maxSortColumns ?? 3;
2639
- return this.sortModel = di(this.sortModel, e.field, i, n), this.emit("sort-change", { sortModel: [...this.sortModel] }), this.requestRender(), !0;
2636
+ return this.sortModel = li(this.sortModel, e.field, i, n), this.emit("sort-change", { sortModel: [...this.sortModel] }), this.requestRender(), !0;
2640
2637
  }
2641
2638
  afterRender() {
2642
2639
  const e = this.gridElement;
@@ -2645,7 +2642,7 @@ class bn extends _ {
2645
2642
  e.querySelectorAll(".header-row .cell[data-field]").forEach((n) => {
2646
2643
  const r = n.getAttribute("data-field");
2647
2644
  if (!r) return;
2648
- const o = Me(this.sortModel, r), a = Ne(this.sortModel, r);
2645
+ const o = De(this.sortModel, r), a = Me(this.sortModel, r);
2649
2646
  if (n.querySelector(".sort-index")?.remove(), a) {
2650
2647
  n.querySelector('[part~="sort-indicator"], .sort-indicator')?.remove(), n.setAttribute("data-sort", a);
2651
2648
  const c = document.createElement("span");
@@ -2669,10 +2666,10 @@ class bn extends _ {
2669
2666
  this.sortModel = [], this.emit("sort-change", { sortModel: [] }), this.requestRender();
2670
2667
  }
2671
2668
  getSortIndex(e) {
2672
- return Me(this.sortModel, e);
2669
+ return De(this.sortModel, e);
2673
2670
  }
2674
2671
  getSortDirection(e) {
2675
- return Ne(this.sortModel, e);
2672
+ return Me(this.sortModel, e);
2676
2673
  }
2677
2674
  getColumnState(e) {
2678
2675
  const t = this.sortModel.findIndex((n) => n.field === e);
@@ -2695,16 +2692,16 @@ class bn extends _ {
2695
2692
  i !== -1 ? this.sortModel[i] = n : this.sortModel.splice(t.sort.priority, 0, n);
2696
2693
  }
2697
2694
  }
2698
- function ui(s) {
2695
+ function ci(s) {
2699
2696
  return s.filter((e) => e.sticky === "left");
2700
2697
  }
2701
- function hi(s) {
2698
+ function ui(s) {
2702
2699
  return s.filter((e) => e.sticky === "right");
2703
2700
  }
2704
- function ae(s) {
2701
+ function se(s) {
2705
2702
  return s.some((e) => e.sticky === "left" || e.sticky === "right");
2706
2703
  }
2707
- function qe(s, e) {
2704
+ function Ne(s, e) {
2708
2705
  const t = Array.from(s.querySelectorAll(".header-row .cell"));
2709
2706
  if (!t.length) return;
2710
2707
  const i = /* @__PURE__ */ new Map();
@@ -2728,12 +2725,12 @@ function qe(s, e) {
2728
2725
  }), r += l.offsetWidth);
2729
2726
  }
2730
2727
  }
2731
- function He(s) {
2728
+ function qe(s) {
2732
2729
  s.querySelectorAll(".sticky-left, .sticky-right").forEach((t) => {
2733
2730
  t.classList.remove("sticky-left", "sticky-right"), t.style.position = "", t.style.left = "", t.style.right = "";
2734
2731
  });
2735
2732
  }
2736
- class vn extends _ {
2733
+ class bn extends A {
2737
2734
  static manifest = {
2738
2735
  ownedProperties: [
2739
2736
  {
@@ -2756,26 +2753,26 @@ class vn extends _ {
2756
2753
  }
2757
2754
  static detect(e, t) {
2758
2755
  const i = t?.columns;
2759
- return Array.isArray(i) ? ae(i) : !1;
2756
+ return Array.isArray(i) ? se(i) : !1;
2760
2757
  }
2761
2758
  processColumns(e) {
2762
- return this.isApplied = ae([...e]), [...e];
2759
+ return this.isApplied = se([...e]), [...e];
2763
2760
  }
2764
2761
  afterRender() {
2765
2762
  if (!this.isApplied)
2766
2763
  return;
2767
2764
  const e = this.grid, t = [...this.columns];
2768
- if (!ae(t)) {
2769
- He(e), this.isApplied = !1;
2765
+ if (!se(t)) {
2766
+ qe(e), this.isApplied = !1;
2770
2767
  return;
2771
2768
  }
2772
2769
  queueMicrotask(() => {
2773
- qe(e, t);
2770
+ Ne(e, t);
2774
2771
  });
2775
2772
  }
2776
2773
  onPluginQuery(e) {
2777
2774
  switch (e.type) {
2778
- case Je.CAN_MOVE_COLUMN: {
2775
+ case Ze.CAN_MOVE_COLUMN: {
2779
2776
  const t = e.context, i = t.sticky;
2780
2777
  if (i === "left" || i === "right")
2781
2778
  return !1;
@@ -2788,18 +2785,18 @@ class vn extends _ {
2788
2785
  }
2789
2786
  refreshStickyOffsets() {
2790
2787
  const e = [...this.columns];
2791
- qe(this.grid, e);
2788
+ Ne(this.grid, e);
2792
2789
  }
2793
2790
  getLeftPinnedColumns() {
2794
2791
  const e = [...this.columns];
2795
- return ui(e);
2792
+ return ci(e);
2796
2793
  }
2797
2794
  getRightPinnedColumns() {
2798
2795
  const e = [...this.columns];
2799
- return hi(e);
2796
+ return ui(e);
2800
2797
  }
2801
2798
  clearStickyPositions() {
2802
- He(this.grid);
2799
+ qe(this.grid);
2803
2800
  }
2804
2801
  getHorizontalScrollOffsets(e, t) {
2805
2802
  if (!this.isApplied)
@@ -2820,10 +2817,10 @@ class vn extends _ {
2820
2817
  return { left: i, right: n, skipScroll: r };
2821
2818
  }
2822
2819
  }
2823
- function gi(s) {
2820
+ function hi(s) {
2824
2821
  return typeof s == "object" && s !== null && "aggFunc" in s;
2825
2822
  }
2826
- function le(s, e) {
2823
+ function ae(s, e) {
2827
2824
  const t = document.createElement("div");
2828
2825
  t.className = "tbw-pinned-rows", t.setAttribute("role", "presentation"), t.setAttribute("aria-live", "polite");
2829
2826
  const i = document.createElement("div");
@@ -2845,7 +2842,7 @@ function le(s, e) {
2845
2842
  }
2846
2843
  if (s.customPanels)
2847
2844
  for (const o of s.customPanels) {
2848
- const a = fi(o, e);
2845
+ const a = gi(o, e);
2849
2846
  switch (o.position) {
2850
2847
  case "left":
2851
2848
  i.appendChild(a);
@@ -2860,11 +2857,11 @@ function le(s, e) {
2860
2857
  }
2861
2858
  return t.appendChild(i), t.appendChild(n), t.appendChild(r), t;
2862
2859
  }
2863
- function ze(s) {
2860
+ function He(s) {
2864
2861
  const e = document.createElement("div");
2865
2862
  return e.className = `tbw-aggregation-rows tbw-aggregation-rows-${s}`, e.setAttribute("role", "presentation"), e;
2866
2863
  }
2867
- function Ke(s, e, t, i) {
2864
+ function ze(s, e, t, i) {
2868
2865
  s.innerHTML = "";
2869
2866
  for (const n of e) {
2870
2867
  const r = document.createElement("div");
@@ -2878,11 +2875,11 @@ function Ke(s, e, t, i) {
2878
2875
  let l, d;
2879
2876
  const c = n.aggregators?.[o.field];
2880
2877
  if (c)
2881
- if (gi(c)) {
2882
- const u = ye(c.aggFunc);
2878
+ if (hi(c)) {
2879
+ const u = ve(c.aggFunc);
2883
2880
  u && (l = u(i, o.field, o)), d = c.formatter;
2884
2881
  } else {
2885
- const u = ye(c);
2882
+ const u = ve(c);
2886
2883
  u && (l = u(i, o.field, o));
2887
2884
  }
2888
2885
  else if (n.cells && Object.prototype.hasOwnProperty.call(n.cells, o.field)) {
@@ -2894,13 +2891,13 @@ function Ke(s, e, t, i) {
2894
2891
  s.appendChild(r);
2895
2892
  }
2896
2893
  }
2897
- function fi(s, e) {
2894
+ function gi(s, e) {
2898
2895
  const t = document.createElement("div");
2899
2896
  t.className = "tbw-status-panel tbw-status-panel-custom", t.id = `status-panel-${s.id}`;
2900
2897
  const i = s.render(e);
2901
2898
  return typeof i == "string" ? t.innerHTML = i : t.appendChild(i), t;
2902
2899
  }
2903
- function Oe(s, e, t, i, n) {
2900
+ function Ke(s, e, t, i, n) {
2904
2901
  return {
2905
2902
  totalRows: s.length,
2906
2903
  filteredRows: n?.cachedResult?.length ?? s.length,
@@ -2910,10 +2907,10 @@ function Oe(s, e, t, i, n) {
2910
2907
  grid: t
2911
2908
  };
2912
2909
  }
2913
- const pi = "@layer tbw-plugins{.tbw-footer{flex-shrink:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-color-panel-bg)}.tbw-pinned-rows{display:flex;align-items:center;justify-content:space-between;padding:var(--tbw-button-padding, var(--tbw-spacing-md, .5rem) var(--tbw-spacing-lg, .75rem));background:var(--tbw-pinned-rows-bg, var(--tbw-color-panel-bg));border-top:1px solid var(--tbw-pinned-rows-border, var(--tbw-color-border));font-size:var(--tbw-font-size-xs, .75rem);color:var(--tbw-pinned-rows-color, var(--tbw-color-fg-muted));min-height:32px;box-sizing:border-box;min-width:fit-content}.tbw-pinned-rows-left,.tbw-pinned-rows-center,.tbw-pinned-rows-right{display:flex;align-items:center;gap:var(--tbw-spacing-xl, 1rem)}.tbw-pinned-rows-left{justify-content:flex-start}.tbw-pinned-rows-center{justify-content:center;flex:1}.tbw-pinned-rows-right{justify-content:flex-end}.tbw-status-panel{white-space:nowrap}.tbw-aggregation-rows{min-width:fit-content;background:var(--tbw-aggregation-bg, var(--tbw-color-header-bg))}.tbw-aggregation-rows-top{border-bottom:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-rows-bottom{border-top:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-row{display:grid;grid-template-columns:var(--tbw-column-template);font-size:var(--tbw-aggregation-font-size, .8em);font-weight:var(--tbw-aggregation-font-weight, 600)}.tbw-aggregation-cell{padding:var(--tbw-cell-padding, .125rem .5rem);min-height:var(--tbw-row-height, 1.75rem);display:block;align-items:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;text-overflow:ellipsis;white-space:var(--tbw-cell-white-space, nowrap)}.tbw-aggregation-cell:last-child{border-right:0}.tbw-aggregation-cell-full{grid-column:1 / -1;border-right:0}}";
2914
- class yn extends _ {
2910
+ const fi = "@layer tbw-plugins{.tbw-footer{flex-shrink:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-color-panel-bg)}.tbw-pinned-rows{display:flex;align-items:center;justify-content:space-between;padding:var(--tbw-button-padding, var(--tbw-spacing-md, .5rem) var(--tbw-spacing-lg, .75rem));background:var(--tbw-pinned-rows-bg, var(--tbw-color-panel-bg));border-top:1px solid var(--tbw-pinned-rows-border, var(--tbw-color-border));font-size:var(--tbw-font-size-xs, .75rem);color:var(--tbw-pinned-rows-color, var(--tbw-color-fg-muted));min-height:32px;box-sizing:border-box;min-width:fit-content}.tbw-pinned-rows-left,.tbw-pinned-rows-center,.tbw-pinned-rows-right{display:flex;align-items:center;gap:var(--tbw-spacing-xl, 1rem)}.tbw-pinned-rows-left{justify-content:flex-start}.tbw-pinned-rows-center{justify-content:center;flex:1}.tbw-pinned-rows-right{justify-content:flex-end}.tbw-status-panel{white-space:nowrap}.tbw-aggregation-rows{min-width:fit-content;background:var(--tbw-aggregation-bg, var(--tbw-color-header-bg))}.tbw-aggregation-rows-top{border-bottom:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-rows-bottom{border-top:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-row{display:grid;grid-template-columns:var(--tbw-column-template);font-size:var(--tbw-aggregation-font-size, .8em);font-weight:var(--tbw-aggregation-font-weight, 600)}.tbw-aggregation-cell{padding:var(--tbw-cell-padding, .125rem .5rem);min-height:var(--tbw-row-height, 1.75rem);display:block;align-items:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;text-overflow:ellipsis;white-space:var(--tbw-cell-white-space, nowrap)}.tbw-aggregation-cell:last-child{border-right:0}.tbw-aggregation-cell-full{grid-column:1 / -1;border-right:0}}";
2911
+ class vn extends A {
2915
2912
  name = "pinnedRows";
2916
- styles = pi;
2913
+ styles = fi;
2917
2914
  get defaultConfig() {
2918
2915
  return {
2919
2916
  position: "bottom",
@@ -2935,7 +2932,7 @@ class yn extends _ {
2935
2932
  const t = e.querySelector(".tbw-scroll-area") ?? e.querySelector(".tbw-grid-content") ?? e.children[0];
2936
2933
  if (!t) return;
2937
2934
  this.footerWrapper && !t.contains(this.footerWrapper) && (this.footerWrapper = null, this.bottomAggregationContainer = null, this.infoBarElement = null), this.topAggregationContainer && !t.contains(this.topAggregationContainer) && (this.topAggregationContainer = null), this.infoBarElement && !t.contains(this.infoBarElement) && (this.infoBarElement = null);
2938
- const i = this.getSelectionState(), n = this.getFilterState(), r = Oe(
2935
+ const i = this.getSelectionState(), n = this.getFilterState(), r = Ke(
2939
2936
  this.rows,
2940
2937
  this.columns,
2941
2938
  this.grid,
@@ -2944,11 +2941,11 @@ class yn extends _ {
2944
2941
  ), o = this.config.aggregationRows || [], a = o.filter((h) => h.position === "top"), l = o.filter((h) => h.position !== "top");
2945
2942
  if (a.length > 0) {
2946
2943
  if (!this.topAggregationContainer) {
2947
- this.topAggregationContainer = ze("top");
2944
+ this.topAggregationContainer = He("top");
2948
2945
  const h = e.querySelector(".header");
2949
2946
  h && h.nextSibling ? t.insertBefore(this.topAggregationContainer, h.nextSibling) : t.appendChild(this.topAggregationContainer);
2950
2947
  }
2951
- Ke(
2948
+ ze(
2952
2949
  this.topAggregationContainer,
2953
2950
  a,
2954
2951
  this.visibleColumns,
@@ -2958,18 +2955,18 @@ class yn extends _ {
2958
2955
  const d = this.config.showRowCount !== !1 || this.config.showSelectedCount && r.selectedRows > 0 || this.config.showFilteredCount && r.filteredRows !== r.totalRows || this.config.customPanels && this.config.customPanels.length > 0, c = d && this.config.position !== "top", u = l.length > 0 || c;
2959
2956
  if (d && this.config.position === "top")
2960
2957
  if (!this.infoBarElement)
2961
- this.infoBarElement = le(this.config, r), t.insertBefore(this.infoBarElement, t.firstChild);
2958
+ this.infoBarElement = ae(this.config, r), t.insertBefore(this.infoBarElement, t.firstChild);
2962
2959
  else {
2963
- const h = le(this.config, r);
2960
+ const h = ae(this.config, r);
2964
2961
  this.infoBarElement.replaceWith(h), this.infoBarElement = h;
2965
2962
  }
2966
2963
  else this.config.position === "top" && this.infoBarElement && (this.infoBarElement.remove(), this.infoBarElement = null);
2967
- u ? (this.footerWrapper || (this.footerWrapper = document.createElement("div"), this.footerWrapper.className = "tbw-footer", t.appendChild(this.footerWrapper)), this.footerWrapper.innerHTML = "", l.length > 0 && (this.bottomAggregationContainer || (this.bottomAggregationContainer = ze("bottom")), this.footerWrapper.appendChild(this.bottomAggregationContainer), Ke(
2964
+ u ? (this.footerWrapper || (this.footerWrapper = document.createElement("div"), this.footerWrapper.className = "tbw-footer", t.appendChild(this.footerWrapper)), this.footerWrapper.innerHTML = "", l.length > 0 && (this.bottomAggregationContainer || (this.bottomAggregationContainer = He("bottom")), this.footerWrapper.appendChild(this.bottomAggregationContainer), ze(
2968
2965
  this.bottomAggregationContainer,
2969
2966
  l,
2970
2967
  this.visibleColumns,
2971
2968
  this.rows
2972
- )), c && (this.infoBarElement = le(this.config, r), this.footerWrapper.appendChild(this.infoBarElement))) : this.cleanupFooter();
2969
+ )), c && (this.infoBarElement = ae(this.config, r), this.footerWrapper.appendChild(this.infoBarElement))) : this.cleanupFooter();
2973
2970
  }
2974
2971
  cleanup() {
2975
2972
  this.infoBarElement && (this.infoBarElement.remove(), this.infoBarElement = null), this.topAggregationContainer && (this.topAggregationContainer.remove(), this.topAggregationContainer = null), this.bottomAggregationContainer && (this.bottomAggregationContainer.remove(), this.bottomAggregationContainer = null), this.footerWrapper && (this.footerWrapper.remove(), this.footerWrapper = null);
@@ -2996,7 +2993,7 @@ class yn extends _ {
2996
2993
  }
2997
2994
  getContext() {
2998
2995
  const e = this.getSelectionState(), t = this.getFilterState();
2999
- return Oe(
2996
+ return Ke(
3000
2997
  this.rows,
3001
2998
  this.columns,
3002
2999
  this.grid,
@@ -3017,16 +3014,16 @@ class yn extends _ {
3017
3014
  this.config.aggregationRows && (this.config.aggregationRows = this.config.aggregationRows.filter((t) => t.id !== e), this.requestRender());
3018
3015
  }
3019
3016
  }
3020
- const mi = ut;
3021
- function wi(s) {
3017
+ const pi = ct;
3018
+ function mi(s) {
3022
3019
  const e = [];
3023
3020
  return !s.rowGroupFields?.length && !s.columnGroupFields?.length && e.push("At least one row or column group field is required"), s.valueFields?.length || e.push("At least one value field is required"), e;
3024
3021
  }
3025
- function be(s, e) {
3022
+ function we(s, e) {
3026
3023
  return [...s, e].join("|");
3027
3024
  }
3028
- function bi(s, e) {
3029
- const t = e.rowGroupFields ?? [], i = e.columnGroupFields ?? [], n = e.valueFields ?? [], r = vi(s, i), o = it(
3025
+ function wi(s, e) {
3026
+ const t = e.rowGroupFields ?? [], i = e.columnGroupFields ?? [], n = e.valueFields ?? [], r = bi(s, i), o = tt(
3030
3027
  s,
3031
3028
  t,
3032
3029
  i,
@@ -3034,7 +3031,7 @@ function bi(s, e) {
3034
3031
  n,
3035
3032
  0,
3036
3033
  ""
3037
- ), a = xi(o, r, n), l = Object.values(a).reduce((d, c) => d + c, 0);
3034
+ ), a = yi(o, r, n), l = Object.values(a).reduce((d, c) => d + c, 0);
3038
3035
  return {
3039
3036
  rows: o,
3040
3037
  columnKeys: r,
@@ -3042,7 +3039,7 @@ function bi(s, e) {
3042
3039
  grandTotal: l
3043
3040
  };
3044
3041
  }
3045
- function vi(s, e) {
3042
+ function bi(s, e) {
3046
3043
  if (e.length === 0) return ["value"];
3047
3044
  const t = /* @__PURE__ */ new Set();
3048
3045
  for (const i of s) {
@@ -3051,7 +3048,7 @@ function vi(s, e) {
3051
3048
  }
3052
3049
  return [...t].sort();
3053
3050
  }
3054
- function yi(s, e) {
3051
+ function vi(s, e) {
3055
3052
  const t = /* @__PURE__ */ new Map();
3056
3053
  for (const i of s) {
3057
3054
  const n = String(i[e] ?? ""), r = t.get(n);
@@ -3059,10 +3056,10 @@ function yi(s, e) {
3059
3056
  }
3060
3057
  return t;
3061
3058
  }
3062
- function it(s, e, t, i, n, r, o) {
3059
+ function tt(s, e, t, i, n, r, o) {
3063
3060
  const a = [];
3064
3061
  if (e.length === 0) {
3065
- const h = Ge(s, t, i, n), g = Be(h);
3062
+ const h = Oe(s, t, i, n), g = Ge(h);
3066
3063
  return a.push({
3067
3064
  rowKey: o || "all",
3068
3065
  rowLabel: o || "All",
@@ -3073,11 +3070,11 @@ function it(s, e, t, i, n, r, o) {
3073
3070
  rowCount: s.length
3074
3071
  }), a;
3075
3072
  }
3076
- const l = e[0], d = e.slice(1), c = d.length > 0, u = yi(s, l);
3073
+ const l = e[0], d = e.slice(1), c = d.length > 0, u = vi(s, l);
3077
3074
  for (const [h, g] of u) {
3078
- const f = o ? `${o}|${h}` : h, p = Ge(g, t, i, n), w = Be(p);
3079
- let v;
3080
- c && (v = it(
3075
+ const f = o ? `${o}|${h}` : h, p = Oe(g, t, i, n), w = Ge(p);
3076
+ let b;
3077
+ c && (b = tt(
3081
3078
  g,
3082
3079
  d,
3083
3080
  t,
@@ -3092,42 +3089,42 @@ function it(s, e, t, i, n, r, o) {
3092
3089
  values: p,
3093
3090
  total: w,
3094
3091
  isGroup: c,
3095
- children: v,
3092
+ children: b,
3096
3093
  rowCount: g.length
3097
3094
  });
3098
3095
  }
3099
3096
  return a;
3100
3097
  }
3101
- function Ge(s, e, t, i) {
3098
+ function Oe(s, e, t, i) {
3102
3099
  const n = {};
3103
3100
  for (const r of t)
3104
3101
  for (const o of i) {
3105
- const l = (e.length > 0 ? s.filter((h) => e.map((g) => String(h[g] ?? "")).join("|") === r) : s).map((h) => Number(h[o.field]) || 0), d = mi(o.aggFunc), c = l.length > 0 ? d(l) : null, u = be([r], o.field);
3102
+ const l = (e.length > 0 ? s.filter((h) => e.map((g) => String(h[g] ?? "")).join("|") === r) : s).map((h) => Number(h[o.field]) || 0), d = pi(o.aggFunc), c = l.length > 0 ? d(l) : null, u = we([r], o.field);
3106
3103
  n[u] = c;
3107
3104
  }
3108
3105
  return n;
3109
3106
  }
3110
- function Be(s) {
3107
+ function Ge(s) {
3111
3108
  let e = 0;
3112
3109
  for (const t of Object.values(s))
3113
3110
  e += t ?? 0;
3114
3111
  return e;
3115
3112
  }
3116
- function xi(s, e, t) {
3113
+ function yi(s, e, t) {
3117
3114
  const i = {};
3118
3115
  function n(r) {
3119
3116
  for (const o of r)
3120
3117
  if (!o.isGroup || !o.children?.length)
3121
3118
  for (const a of e)
3122
3119
  for (const l of t) {
3123
- const d = be([a], l.field);
3120
+ const d = we([a], l.field);
3124
3121
  i[d] = (i[d] ?? 0) + (o.values[d] ?? 0);
3125
3122
  }
3126
3123
  else o.children && n(o.children);
3127
3124
  }
3128
3125
  return n(s), i;
3129
3126
  }
3130
- function Ci(s, e, t = !0) {
3127
+ function xi(s, e, t = !0) {
3131
3128
  const i = [];
3132
3129
  function n(r) {
3133
3130
  i.push(r);
@@ -3140,7 +3137,7 @@ function Ci(s, e, t = !0) {
3140
3137
  n(r);
3141
3138
  return i;
3142
3139
  }
3143
- function Ei(s) {
3140
+ function Ci(s) {
3144
3141
  const e = [];
3145
3142
  function t(i) {
3146
3143
  if (i.isGroup && e.push(i.rowKey), i.children)
@@ -3151,10 +3148,10 @@ function Ei(s) {
3151
3148
  t(i);
3152
3149
  return e;
3153
3150
  }
3154
- const Ri = ["sum", "avg", "count", "min", "max", "first", "last"];
3155
- function Si(s, e, t, i) {
3151
+ const Ei = ["sum", "avg", "count", "min", "max", "first", "last"];
3152
+ function Ri(s, e, t, i) {
3156
3153
  const n = new AbortController(), r = { config: e, callbacks: i, signal: n.signal }, o = document.createElement("div");
3157
- return o.className = "tbw-pivot-panel", o.appendChild(j("Options", () => Li(t, r))), o.appendChild(j("Row Groups", () => Ve("rowGroups", r))), o.appendChild(j("Column Groups", () => Ve("columnGroups", r))), o.appendChild(j("Values", () => Ai(r))), o.appendChild(j("Available Fields", () => Ti(r))), s.appendChild(o), () => {
3154
+ return o.className = "tbw-pivot-panel", o.appendChild(j("Options", () => Ti(t, r))), o.appendChild(j("Row Groups", () => Be("rowGroups", r))), o.appendChild(j("Column Groups", () => Be("columnGroups", r))), o.appendChild(j("Values", () => ki(r))), o.appendChild(j("Available Fields", () => _i(r))), s.appendChild(o), () => {
3158
3155
  n.abort(), o.remove();
3159
3156
  };
3160
3157
  }
@@ -3166,7 +3163,7 @@ function j(s, e) {
3166
3163
  const n = document.createElement("div");
3167
3164
  return n.className = "tbw-pivot-section-content", n.appendChild(e()), t.appendChild(i), t.appendChild(n), t;
3168
3165
  }
3169
- function Ve(s, e) {
3166
+ function Be(s, e) {
3170
3167
  const { config: t, callbacks: i, signal: n } = e, r = document.createElement("div");
3171
3168
  r.className = "tbw-pivot-drop-zone", r.setAttribute("data-zone", s);
3172
3169
  const o = s === "rowGroups" ? t.rowGroupFields ?? [] : t.columnGroupFields ?? [];
@@ -3175,7 +3172,7 @@ function Ve(s, e) {
3175
3172
  a.className = "tbw-pivot-placeholder", a.textContent = "Drag fields here or click to add", r.appendChild(a);
3176
3173
  } else
3177
3174
  for (const a of o)
3178
- r.appendChild(ki(a, s, e));
3175
+ r.appendChild(Si(a, s, e));
3179
3176
  return r.addEventListener(
3180
3177
  "dragover",
3181
3178
  (a) => {
@@ -3198,7 +3195,7 @@ function Ve(s, e) {
3198
3195
  { signal: n }
3199
3196
  ), r;
3200
3197
  }
3201
- function ki(s, e, t) {
3198
+ function Si(s, e, t) {
3202
3199
  const { callbacks: i, signal: n } = t, r = document.createElement("div");
3203
3200
  r.className = "tbw-pivot-field-chip", r.draggable = !0;
3204
3201
  const o = i.getAvailableFields().find((d) => d.field === s), a = document.createElement("span");
@@ -3224,7 +3221,7 @@ function ki(s, e, t) {
3224
3221
  { signal: n }
3225
3222
  ), r;
3226
3223
  }
3227
- function Ai(s) {
3224
+ function ki(s) {
3228
3225
  const { config: e, callbacks: t, signal: i } = s, n = document.createElement("div");
3229
3226
  n.className = "tbw-pivot-drop-zone tbw-pivot-values-zone", n.setAttribute("data-zone", "values");
3230
3227
  const r = e.valueFields ?? [];
@@ -3233,7 +3230,7 @@ function Ai(s) {
3233
3230
  o.className = "tbw-pivot-placeholder", o.textContent = "Drag numeric fields here for aggregation", n.appendChild(o);
3234
3231
  } else
3235
3232
  for (const o of r)
3236
- n.appendChild(_i(o, s));
3233
+ n.appendChild(Ai(o, s));
3237
3234
  return n.addEventListener(
3238
3235
  "dragover",
3239
3236
  (o) => {
@@ -3256,7 +3253,7 @@ function Ai(s) {
3256
3253
  { signal: i }
3257
3254
  ), n;
3258
3255
  }
3259
- function _i(s, e) {
3256
+ function Ai(s, e) {
3260
3257
  const { callbacks: t, signal: i } = e, n = document.createElement("div");
3261
3258
  n.className = "tbw-pivot-field-chip tbw-pivot-value-chip";
3262
3259
  const r = t.getAvailableFields().find((c) => c.field === s.field), o = document.createElement("div");
@@ -3265,7 +3262,7 @@ function _i(s, e) {
3265
3262
  a.className = "tbw-pivot-chip-label", a.textContent = r?.header ?? s.field;
3266
3263
  const l = document.createElement("select");
3267
3264
  l.className = "tbw-pivot-agg-select", l.title = "Aggregation function";
3268
- for (const c of Ri) {
3265
+ for (const c of Ei) {
3269
3266
  const u = document.createElement("option");
3270
3267
  u.value = c, u.textContent = c.toUpperCase(), u.selected = c === s.aggFunc, l.appendChild(u);
3271
3268
  }
@@ -3285,7 +3282,7 @@ function _i(s, e) {
3285
3282
  { signal: i }
3286
3283
  ), o.appendChild(a), o.appendChild(l), n.appendChild(o), n.appendChild(d), n;
3287
3284
  }
3288
- function Ti(s) {
3285
+ function _i(s) {
3289
3286
  const { config: e, callbacks: t, signal: i } = s, n = document.createElement("div");
3290
3287
  n.className = "tbw-pivot-available-fields";
3291
3288
  const r = t.getAvailableFields(), o = /* @__PURE__ */ new Set([
@@ -3315,10 +3312,10 @@ function Ti(s) {
3315
3312
  }
3316
3313
  return n;
3317
3314
  }
3318
- function Li(s, e) {
3315
+ function Ti(s, e) {
3319
3316
  const { config: t, callbacks: i, signal: n } = e, r = document.createElement("div");
3320
3317
  return r.className = "tbw-pivot-options", r.appendChild(
3321
- de(
3318
+ le(
3322
3319
  "Enable Pivot View",
3323
3320
  s,
3324
3321
  (o) => {
@@ -3327,7 +3324,7 @@ function Li(s, e) {
3327
3324
  n
3328
3325
  )
3329
3326
  ), r.appendChild(
3330
- de(
3327
+ le(
3331
3328
  "Show Row Totals",
3332
3329
  t.showTotals ?? !0,
3333
3330
  (o) => {
@@ -3336,7 +3333,7 @@ function Li(s, e) {
3336
3333
  n
3337
3334
  )
3338
3335
  ), r.appendChild(
3339
- de(
3336
+ le(
3340
3337
  "Show Grand Total",
3341
3338
  t.showGrandTotal ?? !0,
3342
3339
  (o) => {
@@ -3346,7 +3343,7 @@ function Li(s, e) {
3346
3343
  )
3347
3344
  ), r;
3348
3345
  }
3349
- function de(s, e, t, i) {
3346
+ function le(s, e, t, i) {
3350
3347
  const n = document.createElement("label");
3351
3348
  n.className = "tbw-pivot-checkbox";
3352
3349
  const r = document.createElement("input");
@@ -3354,7 +3351,7 @@ function de(s, e, t, i) {
3354
3351
  const o = document.createElement("span");
3355
3352
  return o.textContent = s, n.appendChild(r), n.appendChild(o), n;
3356
3353
  }
3357
- function Fi(s, e, t) {
3354
+ function Li(s, e, t) {
3358
3355
  return e.className = "data-grid-row pivot-group-row", e.setAttribute("data-pivot-depth", String(s.__pivotDepth ?? 0)), e.setAttribute("data-pivot-key", String(s.__pivotRowKey ?? "")), e.setAttribute("role", "row"), e.innerHTML = "", t.columns.forEach((i, n) => {
3359
3356
  const r = document.createElement("div");
3360
3357
  if (r.className = "cell", r.setAttribute("data-col", String(n)), r.setAttribute("data-row", String(t.rowIndex)), r.setAttribute("role", "gridcell"), n === 0) {
@@ -3375,7 +3372,7 @@ function Fi(s, e, t) {
3375
3372
  e.appendChild(r);
3376
3373
  }), !0;
3377
3374
  }
3378
- function Ii(s, e, t, i) {
3375
+ function Fi(s, e, t, i) {
3379
3376
  return e.className = "data-grid-row pivot-leaf-row", e.setAttribute("data-pivot-depth", String(s.__pivotDepth ?? 0)), e.setAttribute("data-pivot-key", String(s.__pivotRowKey ?? "")), e.innerHTML = "", t.forEach((n, r) => {
3380
3377
  const o = document.createElement("div");
3381
3378
  if (o.className = "cell", o.setAttribute("data-col", String(r)), o.setAttribute("data-row", String(i)), o.setAttribute("role", "gridcell"), r === 0) {
@@ -3390,7 +3387,7 @@ function Ii(s, e, t, i) {
3390
3387
  e.appendChild(o);
3391
3388
  }), !0;
3392
3389
  }
3393
- function Pi(s, e, t) {
3390
+ function Ii(s, e, t) {
3394
3391
  return e.className = "pivot-grand-total-row", e.setAttribute("role", "presentation"), e.innerHTML = "", t.forEach((i, n) => {
3395
3392
  const r = document.createElement("div");
3396
3393
  if (r.className = "cell", r.setAttribute("data-col", String(n)), n === 0) {
@@ -3403,10 +3400,10 @@ function Pi(s, e, t) {
3403
3400
  e.appendChild(r);
3404
3401
  }), !0;
3405
3402
  }
3406
- const Di = '@layer tbw-plugins{.pivot-group-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:600;background:var(--tbw-pivot-group-bg, var(--tbw-color-row-alt));min-height:var(--tbw-row-height);border-bottom:var(--tbw-row-divider)}.pivot-group-row:hover{background:var(--tbw-pivot-group-hover, var(--tbw-color-row-hover))}.pivot-leaf-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-pivot-leaf-bg, var(--tbw-color-bg));min-height:var(--tbw-row-height);border-bottom:var(--tbw-row-divider)}.pivot-grand-total-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:700;background:var(--tbw-pivot-grand-total-bg, var(--tbw-color-header-bg));min-height:var(--tbw-row-height);border-top:2px solid var(--tbw-color-border-strong)}.pivot-grand-total-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}.pivot-grand-total-row>.cell:last-child{border-right:0}.pivot-grand-total-footer{position:sticky;bottom:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-pivot-grand-total-bg, var(--tbw-color-header-bg));min-width:fit-content}.pivot-group-row>.cell,.pivot-leaf-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}.pivot-group-row>.cell:last-child,.pivot-leaf-row>.cell:last-child{border-right:0}.pivot-toggle{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-pivot-toggle-size, var(--tbw-toggle-size, 1.25em));height:var(--tbw-pivot-toggle-size, var(--tbw-toggle-size, 1.25em));margin-right:var(--tbw-spacing-sm, .375em);border:none;background:transparent;cursor:pointer;color:var(--tbw-pivot-toggle-color, var(--tbw-color-fg-muted));border-radius:var(--tbw-border-radius);transition:background var(--tbw-transition-duration, .12s) var(--tbw-transition-ease, ease),color var(--tbw-transition-duration, .12s) var(--tbw-transition-ease, ease)}.pivot-toggle:hover{background:var(--tbw-pivot-toggle-hover-bg, var(--tbw-color-row-hover));color:var(--tbw-pivot-toggle-hover-color, var(--tbw-color-fg))}.pivot-toggle:focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}.pivot-label{font-weight:inherit}.pivot-count{color:var(--tbw-pivot-count-color, var(--tbw-color-fg-muted));font-size:.9em;font-weight:400}.pivot-total-row{font-weight:700;border-top:2px solid var(--tbw-pivot-border, var(--tbw-color-border-strong))}[data-pivot-depth="1"]{--tbw-pivot-depth: 1}[data-pivot-depth="2"]{--tbw-pivot-depth: 2}[data-pivot-depth="3"]{--tbw-pivot-depth: 3}[data-pivot-depth="4"]{--tbw-pivot-depth: 4}.tbw-pivot-panel{display:flex;flex-direction:column;gap:var(--tbw-panel-padding, var(--tbw-spacing-lg, .75rem));padding:var(--tbw-panel-padding, var(--tbw-spacing-lg, .75rem));height:100%;overflow-y:auto;font-size:var(--tbw-font-size-sm, .8125rem)}.tbw-pivot-section{border:1px solid var(--tbw-pivot-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);background:var(--tbw-pivot-section-bg, var(--tbw-color-bg))}.tbw-pivot-section-header{padding:var(--tbw-button-padding, var(--tbw-spacing-md, .5rem) var(--tbw-spacing-lg, .75rem));font-weight:600;background:var(--tbw-pivot-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-pivot-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius) var(--tbw-border-radius) 0 0}.tbw-pivot-section-content{padding:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.tbw-pivot-toggle-wrapper{display:flex;align-items:center}.tbw-pivot-toggle-label{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));cursor:pointer}.tbw-pivot-toggle-label input{width:var(--tbw-icon-size, 1rem);height:var(--tbw-icon-size, 1rem);cursor:pointer}.tbw-pivot-drop-zone{min-height:60px;padding:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));border:2px dashed var(--tbw-pivot-drop-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);background:var(--tbw-pivot-drop-bg, var(--tbw-color-row-alt));display:flex;flex-wrap:wrap;gap:var(--tbw-spacing-sm, .375rem);align-content:flex-start;transition:all .15s ease}.tbw-pivot-drop-zone.drag-over{border-color:var(--tbw-color-accent);background:var(--tbw-pivot-drop-active, var(--tbw-focus-background))}.tbw-pivot-placeholder{color:var(--tbw-color-fg-muted);font-style:italic;padding:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));text-align:center;width:100%}.tbw-pivot-field-chip{display:inline-flex;align-items:center;gap:var(--tbw-spacing-sm, .375rem);padding:var(--tbw-button-padding-sm, var(--tbw-spacing-xs, .25rem) var(--tbw-spacing-md, .5rem));background:var(--tbw-pivot-chip-bg, var(--tbw-color-header-bg));border:1px solid var(--tbw-pivot-chip-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);cursor:grab;font-size:var(--tbw-font-size-xs, .75rem);transition:all .15s ease}.tbw-pivot-field-chip:hover{background:var(--tbw-pivot-chip-hover, var(--tbw-color-row-hover));border-color:var(--tbw-color-accent)}.tbw-pivot-field-chip.available{background:var(--tbw-color-bg)}.tbw-pivot-field-chip.dragging{opacity:.5;cursor:grabbing}.tbw-pivot-chip-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.tbw-pivot-chip-remove{display:flex;align-items:center;justify-content:center;width:var(--tbw-icon-size, 1rem);height:var(--tbw-icon-size, 1rem);padding:0;border:none;background:transparent;color:var(--tbw-color-fg-muted);font-size:var(--tbw-font-size-sm, .875rem);font-weight:700;cursor:pointer;border-radius:50%;transition:all .15s ease}.tbw-pivot-chip-remove:hover{background:var(--tbw-pivot-chip-remove-hover-bg, var(--tbw-color-accent));color:var(--tbw-pivot-chip-remove-hover-fg, var(--tbw-color-accent-fg))}.tbw-pivot-value-chip{padding:var(--tbw-button-padding-sm, var(--tbw-spacing-xs, .25rem) var(--tbw-spacing-md, .5rem))}.tbw-pivot-value-label-wrapper{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));flex:1;min-width:0}.tbw-pivot-agg-select{padding:var(--tbw-spacing-xs, .125rem) var(--tbw-spacing-xs, .25rem);font-size:var(--tbw-font-size-xs, .6875rem);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);cursor:pointer}.tbw-pivot-available-fields{display:flex;flex-wrap:wrap;gap:var(--tbw-spacing-sm, .375rem);min-height:40px}.tbw-pivot-options{display:flex;flex-direction:column;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.tbw-pivot-checkbox{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));cursor:pointer}.tbw-pivot-checkbox input{width:var(--tbw-icon-size-sm, .875rem);height:var(--tbw-icon-size-sm, .875rem);cursor:pointer}.pivot-group-row.tbw-pivot-slide-in,.pivot-leaf-row.tbw-pivot-slide-in{animation:tbw-pivot-slide-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-pivot-slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.pivot-group-row.tbw-pivot-fade-in,.pivot-leaf-row.tbw-pivot-fade-in{animation:tbw-pivot-fade-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-pivot-fade-in{0%{opacity:0}to{opacity:1}}}';
3407
- class G extends _ {
3403
+ const Pi = '@layer tbw-plugins{.pivot-group-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:600;background:var(--tbw-pivot-group-bg, var(--tbw-color-row-alt));min-height:var(--tbw-row-height);border-bottom:var(--tbw-row-divider)}.pivot-group-row:hover{background:var(--tbw-pivot-group-hover, var(--tbw-color-row-hover))}.pivot-leaf-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-pivot-leaf-bg, var(--tbw-color-bg));min-height:var(--tbw-row-height);border-bottom:var(--tbw-row-divider)}.pivot-grand-total-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:700;background:var(--tbw-pivot-grand-total-bg, var(--tbw-color-header-bg));min-height:var(--tbw-row-height);border-top:2px solid var(--tbw-color-border-strong)}.pivot-grand-total-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}.pivot-grand-total-row>.cell:last-child{border-right:0}.pivot-grand-total-footer{position:sticky;bottom:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-pivot-grand-total-bg, var(--tbw-color-header-bg));min-width:fit-content}.pivot-group-row>.cell,.pivot-leaf-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}.pivot-group-row>.cell:last-child,.pivot-leaf-row>.cell:last-child{border-right:0}.pivot-toggle{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-pivot-toggle-size, var(--tbw-toggle-size, 1.25em));height:var(--tbw-pivot-toggle-size, var(--tbw-toggle-size, 1.25em));margin-right:var(--tbw-spacing-sm, .375em);border:none;background:transparent;cursor:pointer;color:var(--tbw-pivot-toggle-color, var(--tbw-color-fg-muted));border-radius:var(--tbw-border-radius);transition:background var(--tbw-transition-duration, .12s) var(--tbw-transition-ease, ease),color var(--tbw-transition-duration, .12s) var(--tbw-transition-ease, ease)}.pivot-toggle:hover{background:var(--tbw-pivot-toggle-hover-bg, var(--tbw-color-row-hover));color:var(--tbw-pivot-toggle-hover-color, var(--tbw-color-fg))}.pivot-toggle:focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}.pivot-label{font-weight:inherit}.pivot-count{color:var(--tbw-pivot-count-color, var(--tbw-color-fg-muted));font-size:.9em;font-weight:400}.pivot-total-row{font-weight:700;border-top:2px solid var(--tbw-pivot-border, var(--tbw-color-border-strong))}[data-pivot-depth="1"]{--tbw-pivot-depth: 1}[data-pivot-depth="2"]{--tbw-pivot-depth: 2}[data-pivot-depth="3"]{--tbw-pivot-depth: 3}[data-pivot-depth="4"]{--tbw-pivot-depth: 4}.tbw-pivot-panel{display:flex;flex-direction:column;gap:var(--tbw-panel-padding, var(--tbw-spacing-lg, .75rem));padding:var(--tbw-panel-padding, var(--tbw-spacing-lg, .75rem));height:100%;overflow-y:auto;font-size:var(--tbw-font-size-sm, .8125rem)}.tbw-pivot-section{border:1px solid var(--tbw-pivot-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);background:var(--tbw-pivot-section-bg, var(--tbw-color-bg))}.tbw-pivot-section-header{padding:var(--tbw-button-padding, var(--tbw-spacing-md, .5rem) var(--tbw-spacing-lg, .75rem));font-weight:600;background:var(--tbw-pivot-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-pivot-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius) var(--tbw-border-radius) 0 0}.tbw-pivot-section-content{padding:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.tbw-pivot-toggle-wrapper{display:flex;align-items:center}.tbw-pivot-toggle-label{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));cursor:pointer}.tbw-pivot-toggle-label input{width:var(--tbw-icon-size, 1rem);height:var(--tbw-icon-size, 1rem);cursor:pointer}.tbw-pivot-drop-zone{min-height:60px;padding:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));border:2px dashed var(--tbw-pivot-drop-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);background:var(--tbw-pivot-drop-bg, var(--tbw-color-row-alt));display:flex;flex-wrap:wrap;gap:var(--tbw-spacing-sm, .375rem);align-content:flex-start;transition:all .15s ease}.tbw-pivot-drop-zone.drag-over{border-color:var(--tbw-color-accent);background:var(--tbw-pivot-drop-active, var(--tbw-focus-background))}.tbw-pivot-placeholder{color:var(--tbw-color-fg-muted);font-style:italic;padding:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));text-align:center;width:100%}.tbw-pivot-field-chip{display:inline-flex;align-items:center;gap:var(--tbw-spacing-sm, .375rem);padding:var(--tbw-button-padding-sm, var(--tbw-spacing-xs, .25rem) var(--tbw-spacing-md, .5rem));background:var(--tbw-pivot-chip-bg, var(--tbw-color-header-bg));border:1px solid var(--tbw-pivot-chip-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);cursor:grab;font-size:var(--tbw-font-size-xs, .75rem);transition:all .15s ease}.tbw-pivot-field-chip:hover{background:var(--tbw-pivot-chip-hover, var(--tbw-color-row-hover));border-color:var(--tbw-color-accent)}.tbw-pivot-field-chip.available{background:var(--tbw-color-bg)}.tbw-pivot-field-chip.dragging{opacity:.5;cursor:grabbing}.tbw-pivot-chip-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.tbw-pivot-chip-remove{display:flex;align-items:center;justify-content:center;width:var(--tbw-icon-size, 1rem);height:var(--tbw-icon-size, 1rem);padding:0;border:none;background:transparent;color:var(--tbw-color-fg-muted);font-size:var(--tbw-font-size-sm, .875rem);font-weight:700;cursor:pointer;border-radius:50%;transition:all .15s ease}.tbw-pivot-chip-remove:hover{background:var(--tbw-pivot-chip-remove-hover-bg, var(--tbw-color-accent));color:var(--tbw-pivot-chip-remove-hover-fg, var(--tbw-color-accent-fg))}.tbw-pivot-value-chip{padding:var(--tbw-button-padding-sm, var(--tbw-spacing-xs, .25rem) var(--tbw-spacing-md, .5rem))}.tbw-pivot-value-label-wrapper{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));flex:1;min-width:0}.tbw-pivot-agg-select{padding:var(--tbw-spacing-xs, .125rem) var(--tbw-spacing-xs, .25rem);font-size:var(--tbw-font-size-xs, .6875rem);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);cursor:pointer}.tbw-pivot-available-fields{display:flex;flex-wrap:wrap;gap:var(--tbw-spacing-sm, .375rem);min-height:40px}.tbw-pivot-options{display:flex;flex-direction:column;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.tbw-pivot-checkbox{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));cursor:pointer}.tbw-pivot-checkbox input{width:var(--tbw-icon-size-sm, .875rem);height:var(--tbw-icon-size-sm, .875rem);cursor:pointer}.pivot-group-row.tbw-pivot-slide-in,.pivot-leaf-row.tbw-pivot-slide-in{animation:tbw-pivot-slide-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-pivot-slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.pivot-group-row.tbw-pivot-fade-in,.pivot-leaf-row.tbw-pivot-fade-in{animation:tbw-pivot-fade-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-pivot-fade-in{0%{opacity:0}to{opacity:1}}}';
3404
+ class G extends A {
3408
3405
  name = "pivot";
3409
- styles = Di;
3406
+ styles = Pi;
3410
3407
  static PANEL_ID = "pivot";
3411
3408
  get defaultConfig() {
3412
3409
  return {
@@ -3452,11 +3449,11 @@ class G extends _ {
3452
3449
  processRows(e) {
3453
3450
  if (!this.hasInitialized && this.config.active !== !1 && this.hasValidPivotConfig() && (this.hasInitialized = !0, this.isActive = !0), !this.isActive)
3454
3451
  return [...e];
3455
- const t = wi(this.config);
3452
+ const t = mi(this.config);
3456
3453
  if (t.length > 0)
3457
3454
  return this.warn(`Config errors: ${t.join(", ")}`), [...e];
3458
- this.buildFieldHeaderMap(), this.defaultExpanded = this.config.defaultExpanded ?? !0, this.pivotResult = bi(e, this.config), this.expandedKeys.size === 0 && this.defaultExpanded && !this.userHasToggledExpand && this.expandAllKeys();
3459
- const i = this.config.indentWidth ?? 20, n = Ci(
3455
+ this.buildFieldHeaderMap(), this.defaultExpanded = this.config.defaultExpanded ?? !0, this.pivotResult = wi(e, this.config), this.expandedKeys.size === 0 && this.defaultExpanded && !this.userHasToggledExpand && this.expandAllKeys();
3456
+ const i = this.config.indentWidth ?? 20, n = xi(
3460
3457
  this.pivotResult.rows,
3461
3458
  this.expandedKeys,
3462
3459
  this.defaultExpanded
@@ -3491,7 +3488,7 @@ class G extends _ {
3491
3488
  });
3492
3489
  for (const n of this.pivotResult.columnKeys)
3493
3490
  for (const r of this.config.valueFields ?? []) {
3494
- const o = be([n], r.field), a = r.header || this.fieldHeaderMap.get(r.field) || r.field;
3491
+ const o = we([n], r.field), a = r.header || this.fieldHeaderMap.get(r.field) || r.field;
3495
3492
  t.push({
3496
3493
  field: o,
3497
3494
  header: `${n} - ${a} (${r.aggFunc})`,
@@ -3508,13 +3505,13 @@ class G extends _ {
3508
3505
  }
3509
3506
  renderRow(e, t, i) {
3510
3507
  const n = e;
3511
- return n.__pivotRowKey && n.__pivotHasChildren ? Fi(n, t, {
3508
+ return n.__pivotRowKey && n.__pivotHasChildren ? Li(n, t, {
3512
3509
  columns: this.gridColumns,
3513
3510
  rowIndex: i,
3514
3511
  onToggle: (r) => this.toggle(r),
3515
3512
  resolveIcon: (r) => this.resolveIcon(r),
3516
3513
  setIcon: (r, o) => this.setIcon(r, o)
3517
- }) : n.__pivotRowKey !== void 0 && this.isActive ? Ii(n, t, this.gridColumns, i) : (this.cleanupPivotStyling(t), !1);
3514
+ }) : n.__pivotRowKey !== void 0 && this.isActive ? Fi(n, t, this.gridColumns, i) : (this.cleanupPivotStyling(t), !1);
3518
3515
  }
3519
3516
  cleanupPivotStyling(e) {
3520
3517
  (e.classList.contains("pivot-group-row") || e.classList.contains("pivot-leaf-row") || e.classList.contains("pivot-grand-total-row")) && (e.classList.remove("pivot-group-row", "pivot-leaf-row", "pivot-grand-total-row"), e.classList.add("data-grid-row"), e.removeAttribute("data-pivot-depth"), e.innerHTML = "");
@@ -3552,7 +3549,7 @@ class G extends _ {
3552
3549
  __pivotTotal: this.pivotResult.grandTotal,
3553
3550
  ...this.pivotResult.totals
3554
3551
  };
3555
- Pi(i, this.grandTotalFooter, this.gridColumns);
3552
+ Ii(i, this.grandTotalFooter, this.gridColumns);
3556
3553
  }
3557
3554
  cleanupGrandTotalFooter() {
3558
3555
  this.grandTotalFooter && (this.grandTotalFooter.remove(), this.grandTotalFooter = null);
@@ -3574,7 +3571,7 @@ class G extends _ {
3574
3571
  }
3575
3572
  expandAllKeys() {
3576
3573
  if (!this.pivotResult) return;
3577
- const e = Ei(this.pivotResult.rows);
3574
+ const e = Ci(this.pivotResult.rows);
3578
3575
  for (const t of e)
3579
3576
  this.expandedKeys.add(t);
3580
3577
  }
@@ -3659,7 +3656,7 @@ class G extends _ {
3659
3656
  },
3660
3657
  getAvailableFields: () => this.getAvailableFields()
3661
3658
  };
3662
- return Si(e, this.config, this.isActive, t);
3659
+ return Ri(e, this.config, this.isActive, t);
3663
3660
  }
3664
3661
  refreshPanel() {
3665
3662
  this.panelContainer && (this.panelContainer.innerHTML = "", this.renderPanel(this.panelContainer));
@@ -3692,10 +3689,10 @@ class G extends _ {
3692
3689
  n >= 0 && (i[n] = { ...i[n], aggFunc: t }, this.config.valueFields = [...i]), this.isActive && this.refresh();
3693
3690
  }
3694
3691
  }
3695
- const Q = "tbw-print-isolation-style";
3696
- function Mi(s, e) {
3692
+ const J = "tbw-print-isolation-style";
3693
+ function Di(s, e) {
3697
3694
  const t = document.createElement("style");
3698
- return t.id = Q, t.textContent = `
3695
+ return t.id = J, t.textContent = `
3699
3696
  /* Print isolation: hide everything except the target grid */
3700
3697
  @media print {
3701
3698
  /* Hide all body children by default */
@@ -3767,22 +3764,22 @@ function Mi(s, e) {
3767
3764
  }
3768
3765
  `, t;
3769
3766
  }
3770
- async function Ni(s, e = {}) {
3767
+ async function Mi(s, e = {}) {
3771
3768
  const { orientation: t = "landscape" } = e, i = s.id;
3772
3769
  document.querySelectorAll(`#${CSS.escape(i)}`).length > 1 && console.warn(
3773
3770
  `[tbw-grid:print] Multiple elements found with id="${i}". Print isolation may not work correctly. Ensure each grid has a unique ID.`
3774
- ), document.getElementById(Q)?.remove();
3775
- const r = Mi(i, t);
3771
+ ), document.getElementById(J)?.remove();
3772
+ const r = Di(i, t);
3776
3773
  return document.head.appendChild(r), new Promise((o) => {
3777
3774
  const a = () => {
3778
- window.removeEventListener("afterprint", a), document.getElementById(Q)?.remove(), o();
3775
+ window.removeEventListener("afterprint", a), document.getElementById(J)?.remove(), o();
3779
3776
  };
3780
3777
  window.addEventListener("afterprint", a), window.print(), setTimeout(() => {
3781
- window.removeEventListener("afterprint", a), document.getElementById(Q)?.remove(), o();
3778
+ window.removeEventListener("afterprint", a), document.getElementById(J)?.remove(), o();
3782
3779
  }, 5e3);
3783
3780
  });
3784
3781
  }
3785
- const qi = ".tbw-print-header,.tbw-print-footer{display:none}@media print{tbw-grid{overflow:visible!important;height:auto!important;border:none!important;border-radius:0!important;color-scheme:light only;-webkit-print-color-adjust:exact;print-color-adjust:exact}tbw-grid .tbw-grid-content{overflow:visible!important;height:auto!important;max-height:none!important}tbw-grid .tbw-scroll-area{overflow:visible!important;height:auto!important;max-height:none!important}tbw-grid .rows-body{overflow:visible!important;height:auto!important;max-height:none!important}tbw-grid .rows-container,tbw-grid .rows-viewport,tbw-grid .rows{overflow:visible!important;height:auto!important;max-height:none!important;transform:none!important}tbw-grid .rows-viewport .rows{position:static!important}tbw-grid .resize-handle,tbw-grid [part=sort-indicator],tbw-grid .tbw-filter-btn,tbw-grid .tool-panel,tbw-grid .tool-panel-content,tbw-grid .tbw-shell-header,tbw-grid .shell-toolbar,tbw-grid .tool-panel-toggle,tbw-grid [data-print-hide],tbw-grid .expander-cell,tbw-grid .tree-toggle,tbw-grid .context-menu,tbw-grid .faux-vscroll{display:none!important}tbw-grid .tbw-print-header{display:flex;justify-content:space-between;align-items:baseline;padding:var(--tbw-spacing-md, .5em) 0;margin-bottom:var(--tbw-spacing-md, .5em);border-bottom:2px solid var(--tbw-print-border, var(--tbw-color-border-strong));font-family:inherit}.tbw-print-header-title{font-size:1.25em;font-weight:700}.tbw-print-header-timestamp{font-size:var(--tbw-font-size-sm, .875em);color:var(--tbw-print-muted, var(--tbw-color-fg-muted))}tbw-grid .tbw-print-footer{display:block;margin-top:var(--tbw-spacing-md, .5em);padding-top:var(--tbw-spacing-md, .5em);border-top:1px solid var(--tbw-print-border, var(--tbw-color-border));font-size:var(--tbw-font-size-xs, .75em);color:var(--tbw-print-muted, var(--tbw-color-fg-muted));text-align:right}tbw-grid .data-grid-row{break-inside:avoid;page-break-inside:avoid}tbw-grid .cell{border:1px solid var(--tbw-print-cell-border, var(--tbw-color-border))!important}tbw-grid .header-row,tbw-grid .data-grid-row{padding-right:1px}tbw-grid .data-grid-row:hover,tbw-grid .cell:hover{background:inherit!important}@page{margin:1cm}tbw-grid.print-landscape{@page{size:landscape}}tbw-grid.print-portrait{@page{size:portrait}}}", Hi = {
3782
+ const Ni = ".tbw-print-header,.tbw-print-footer{display:none}@media print{tbw-grid{overflow:visible!important;height:auto!important;border:none!important;border-radius:0!important;color-scheme:light only;-webkit-print-color-adjust:exact;print-color-adjust:exact}tbw-grid .tbw-grid-content{overflow:visible!important;height:auto!important;max-height:none!important}tbw-grid .tbw-scroll-area{overflow:visible!important;height:auto!important;max-height:none!important}tbw-grid .rows-body{overflow:visible!important;height:auto!important;max-height:none!important}tbw-grid .rows-container,tbw-grid .rows-viewport,tbw-grid .rows{overflow:visible!important;height:auto!important;max-height:none!important;transform:none!important}tbw-grid .rows-viewport .rows{position:static!important}tbw-grid .resize-handle,tbw-grid [part=sort-indicator],tbw-grid .tbw-filter-btn,tbw-grid .tool-panel,tbw-grid .tool-panel-content,tbw-grid .tbw-shell-header,tbw-grid .shell-toolbar,tbw-grid .tool-panel-toggle,tbw-grid [data-print-hide],tbw-grid .expander-cell,tbw-grid .tree-toggle,tbw-grid .context-menu,tbw-grid .faux-vscroll{display:none!important}tbw-grid .tbw-print-header{display:flex;justify-content:space-between;align-items:baseline;padding:var(--tbw-spacing-md, .5em) 0;margin-bottom:var(--tbw-spacing-md, .5em);border-bottom:2px solid var(--tbw-print-border, var(--tbw-color-border-strong));font-family:inherit}.tbw-print-header-title{font-size:1.25em;font-weight:700}.tbw-print-header-timestamp{font-size:var(--tbw-font-size-sm, .875em);color:var(--tbw-print-muted, var(--tbw-color-fg-muted))}tbw-grid .tbw-print-footer{display:block;margin-top:var(--tbw-spacing-md, .5em);padding-top:var(--tbw-spacing-md, .5em);border-top:1px solid var(--tbw-print-border, var(--tbw-color-border));font-size:var(--tbw-font-size-xs, .75em);color:var(--tbw-print-muted, var(--tbw-color-fg-muted));text-align:right}tbw-grid .data-grid-row{break-inside:avoid;page-break-inside:avoid}tbw-grid .cell{border:1px solid var(--tbw-print-cell-border, var(--tbw-color-border))!important}tbw-grid .header-row,tbw-grid .data-grid-row{padding-right:1px}tbw-grid .data-grid-row:hover,tbw-grid .cell:hover{background:inherit!important}@page{margin:1cm}tbw-grid.print-landscape{@page{size:landscape}}tbw-grid.print-portrait{@page{size:portrait}}}", qi = {
3786
3783
  button: !1,
3787
3784
  orientation: "landscape",
3788
3785
  warnThreshold: 500,
@@ -3792,10 +3789,10 @@ const qi = ".tbw-print-header,.tbw-print-footer{display:none}@media print{tbw-gr
3792
3789
  title: "",
3793
3790
  isolate: !1
3794
3791
  };
3795
- class xn extends _ {
3792
+ class yn extends A {
3796
3793
  name = "print";
3797
3794
  version = "1.0.0";
3798
- styles = qi;
3795
+ styles = Ni;
3799
3796
  #e = !1;
3800
3797
  #t = null;
3801
3798
  #o = null;
@@ -3819,7 +3816,7 @@ class xn extends _ {
3819
3816
  console.warn("[PrintPlugin] Grid not available");
3820
3817
  return;
3821
3818
  }
3822
- const i = { ...Hi, ...this.config, ...e }, r = this.rows.length;
3819
+ const i = { ...qi, ...this.config, ...e }, r = this.rows.length;
3823
3820
  let o = r, a = !1;
3824
3821
  if (i.warnThreshold > 0 && r > i.warnThreshold) {
3825
3822
  const d = i.maxRows > 0 ? `
@@ -3884,13 +3881,13 @@ Click OK to continue, or Cancel to abort.`
3884
3881
  window.removeEventListener("afterprint", t), e();
3885
3882
  };
3886
3883
  window.addEventListener("afterprint", t), window.print(), setTimeout(() => {
3887
- window.removeEventListener("afterprint", t), e();
3884
+ typeof window < "u" && window.removeEventListener("afterprint", t), e();
3888
3885
  }, 1e3);
3889
3886
  });
3890
3887
  }
3891
3888
  async #p(e) {
3892
3889
  const t = this.gridElement;
3893
- t && await Ni(t, {
3890
+ t && await Mi(t, {
3894
3891
  orientation: e.orientation
3895
3892
  });
3896
3893
  }
@@ -3939,19 +3936,19 @@ Click OK to continue, or Cancel to abort.`
3939
3936
  });
3940
3937
  }
3941
3938
  }
3942
- function zi(s) {
3939
+ function Hi(s) {
3943
3940
  const e = s.meta ?? {};
3944
3941
  return e.lockPosition !== !0 && e.suppressMovable !== !0;
3945
3942
  }
3946
- function We(s, e, t) {
3943
+ function Ve(s, e, t) {
3947
3944
  if (e === t || e < 0 || e >= s.length || t < 0 || t > s.length) return s;
3948
3945
  const i = [...s], [n] = i.splice(e, 1);
3949
3946
  return i.splice(t, 0, n), i;
3950
3947
  }
3951
- const Ki = '@layer tbw-plugins{.header-row>.cell[draggable=true]{cursor:grab;position:relative}.header-row>.cell.dragging{opacity:.5;cursor:grabbing}.header-row>.cell.drop-before:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.header-row>.cell.drop-after:after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.cell.flip-animating{transition:transform var(--tbw-animation-duration, .2s) ease-out;will-change:transform;z-index:1}@keyframes reorder-fade-in{0%{opacity:0}to{opacity:1}}.cell.fade-animating{animation:reorder-fade-in var(--tbw-animation-duration, .2s) ease-out backwards}}';
3952
- class Cn extends _ {
3948
+ const zi = '@layer tbw-plugins{.header-row>.cell[draggable=true]{cursor:grab;position:relative}.header-row>.cell.dragging{opacity:.5;cursor:grabbing}.header-row>.cell.drop-before:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.header-row>.cell.drop-after:after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.cell.flip-animating{transition:transform var(--tbw-animation-duration, .2s) ease-out;will-change:transform;z-index:1}@keyframes reorder-fade-in{0%{opacity:0}to{opacity:1}}.cell.fade-animating{animation:reorder-fade-in var(--tbw-animation-duration, .2s) ease-out backwards}}';
3949
+ class xn extends A {
3953
3950
  name = "reorder";
3954
- styles = Ki;
3951
+ styles = zi;
3955
3952
  get defaultConfig() {
3956
3953
  return {
3957
3954
  animation: "flip"
@@ -3968,8 +3965,8 @@ class Cn extends _ {
3968
3965
  draggedIndex = null;
3969
3966
  dropIndex = null;
3970
3967
  canMoveColumnWithPlugins(e) {
3971
- return !e || !zi(e) ? !1 : !this.grid.queryPlugins({
3972
- type: Je.CAN_MOVE_COLUMN,
3968
+ return !e || !Hi(e) ? !1 : !this.grid.queryPlugins({
3969
+ type: Ze.CAN_MOVE_COLUMN,
3973
3970
  context: e
3974
3971
  }).includes(!1);
3975
3972
  }
@@ -4018,7 +4015,7 @@ class Cn extends _ {
4018
4015
  const l = this.draggedField, d = this.draggedIndex, c = this.dropIndex;
4019
4016
  if (!this.isDragging || l === null || d === null || c === null)
4020
4017
  return;
4021
- const u = c > d ? c - 1 : c, h = this.getColumnOrder(), g = We(h, d, u), f = {
4018
+ const u = c > d ? c - 1 : c, h = this.getColumnOrder(), g = Ve(h, d, u), f = {
4022
4019
  field: l,
4023
4020
  fromIndex: d,
4024
4021
  toIndex: u,
@@ -4049,7 +4046,7 @@ class Cn extends _ {
4049
4046
  moveColumn(e, t) {
4050
4047
  const i = this.getColumnOrder(), n = i.indexOf(e);
4051
4048
  if (n === -1) return;
4052
- const r = We(i, n, t);
4049
+ const r = Ve(i, n, t);
4053
4050
  this.emitCancelable("column-move", {
4054
4051
  field: e,
4055
4052
  fromIndex: n,
@@ -4144,11 +4141,11 @@ class Cn extends _ {
4144
4141
  this.grid.requestStateChange?.();
4145
4142
  }
4146
4143
  }
4147
- const Oi = 'tbw-grid[data-responsive-animate]{.data-grid-row,.data-grid-row>.cell{transition:opacity var(--tbw-responsive-duration, .2s) ease-out,transform var(--tbw-responsive-duration, .2s) ease-out}}tbw-grid[data-responsive][data-responsive-animate]{.data-grid-row{animation:responsive-card-enter var(--tbw-responsive-duration, .2s) ease-out}}@keyframes responsive-card-enter{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}tbw-grid[data-responsive]{.header{display:none!important}.footer-row{display:none}.tbw-scroll-area{overflow-x:hidden;min-width:0!important}.rows-body-wrapper{min-width:0!important}.data-grid-row:not(.group-row){display:block!important;grid-template-columns:none!important;padding:var(--tbw-cell-padding);padding-left:var(--tbw-spacing-xl);border-bottom:1px solid var(--tbw-color-border);min-height:auto!important;height:auto!important;contain:none!important;content-visibility:visible!important;background:var(--tbw-color-bg);position:relative;&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}&[aria-selected=true]{background:var(--tbw-color-selection);&:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--tbw-color-accent)}}}.data-grid-row:not(.group-row)>.cell{display:flex!important;justify-content:space-between;align-items:center;padding:var(--tbw-spacing-xs) var(--tbw-spacing-md);width:100%!important;min-width:0!important;min-height:auto!important;height:auto!important;line-height:1.5!important;position:static!important;left:auto!important;right:auto!important;border:none!important;border-bottom:none!important;border-right:none!important;background:transparent!important;white-space:normal!important;overflow:visible!important;&:before{content:attr(data-header) ": ";font-weight:600;color:var(--tbw-color-header-fg);flex-shrink:0;margin-right:var(--tbw-spacing-md);min-width:100px}&:after{content:none}}.cell[data-utility]{display:none!important}}tbw-grid[data-responsive] .cell[data-responsive-hidden]{display:none!important}tbw-grid[data-responsive] .cell[data-responsive-value-only]{&:before{display:none!important}justify-content:flex-start!important;font-weight:500}tbw-grid:not([data-responsive]) .cell[data-responsive-hidden]{display:none!important}tbw-grid[data-responsive]{.tbw-footer,.tbw-pinned-rows,.tbw-aggregation-rows{display:none!important}.tbw-pinned-rows,.tbw-aggregation-rows,.tbw-aggregation-row{min-width:0!important}}tbw-grid[data-responsive] .data-grid-row.responsive-card{display:block!important;padding:var(--tbw-cell-padding);border-bottom:1px solid var(--tbw-color-border);>*{width:100%}.cell:before{display:none}}';
4148
- class En extends _ {
4144
+ const Ki = 'tbw-grid[data-responsive-animate]{.data-grid-row,.data-grid-row>.cell{transition:opacity var(--tbw-responsive-duration, .2s) ease-out,transform var(--tbw-responsive-duration, .2s) ease-out}}tbw-grid[data-responsive][data-responsive-animate]{.data-grid-row{animation:responsive-card-enter var(--tbw-responsive-duration, .2s) ease-out}}@keyframes responsive-card-enter{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}tbw-grid[data-responsive]{.header{display:none!important}.footer-row{display:none}.tbw-scroll-area{overflow-x:hidden;min-width:0!important}.rows-body-wrapper{min-width:0!important}.data-grid-row:not(.group-row){display:block!important;grid-template-columns:none!important;padding:var(--tbw-cell-padding);padding-left:var(--tbw-spacing-xl);border-bottom:1px solid var(--tbw-color-border);min-height:auto!important;height:auto!important;contain:none!important;content-visibility:visible!important;background:var(--tbw-color-bg);position:relative;&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}&[aria-selected=true]{background:var(--tbw-color-selection);&:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--tbw-color-accent)}}}.data-grid-row:not(.group-row)>.cell{display:flex!important;justify-content:space-between;align-items:center;padding:var(--tbw-spacing-xs) var(--tbw-spacing-md);width:100%!important;min-width:0!important;min-height:auto!important;height:auto!important;line-height:1.5!important;position:static!important;left:auto!important;right:auto!important;border:none!important;border-bottom:none!important;border-right:none!important;background:transparent!important;white-space:normal!important;overflow:visible!important;&:before{content:attr(data-header) ": ";font-weight:600;color:var(--tbw-color-header-fg);flex-shrink:0;margin-right:var(--tbw-spacing-md);min-width:100px}&:after{content:none}}.cell[data-utility]{display:none!important}}tbw-grid[data-responsive] .cell[data-responsive-hidden]{display:none!important}tbw-grid[data-responsive] .cell[data-responsive-value-only]{&:before{display:none!important}justify-content:flex-start!important;font-weight:500}tbw-grid:not([data-responsive]) .cell[data-responsive-hidden]{display:none!important}tbw-grid[data-responsive]{.tbw-footer,.tbw-pinned-rows,.tbw-aggregation-rows{display:none!important}.tbw-pinned-rows,.tbw-aggregation-rows,.tbw-aggregation-row{min-width:0!important}}tbw-grid[data-responsive] .data-grid-row.responsive-card{display:block!important;padding:var(--tbw-cell-padding);border-bottom:1px solid var(--tbw-color-border);>*{width:100%}.cell:before{display:none}}';
4145
+ class Cn extends A {
4149
4146
  name = "responsive";
4150
4147
  version = "1.0.0";
4151
- styles = Oi;
4148
+ styles = Ki;
4152
4149
  static manifest = {
4153
4150
  incompatibleWith: [
4154
4151
  {
@@ -4369,10 +4366,10 @@ class En extends _ {
4369
4366
  }));
4370
4367
  }
4371
4368
  }
4372
- const Gi = '@layer tbw-plugins{.dg-row-drag-handle{display:flex;align-items:center;justify-content:center;cursor:grab;user-select:none;color:var(--tbw-row-reorder-handle-color, var(--tbw-color-fg-muted));transition:color var(--tbw-transition-duration, .12s) var(--tbw-transition-ease, ease);font-size:var(--tbw-font-size, 1em);letter-spacing:-2px;&:hover{color:var(--tbw-row-reorder-handle-hover, var(--tbw-color-fg))}&:active{cursor:grabbing}}.data-grid-row.dragging{opacity:.6}.data-grid-row.drop-target{position:relative;&.drop-before:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background-color:var(--tbw-row-reorder-indicator, var(--tbw-color-accent));z-index:10}&.drop-after:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background-color:var(--tbw-row-reorder-indicator, var(--tbw-color-accent));z-index:10}}.data-grid-row.keyboard-moving{background-color:var(--tbw-row-reorder-moving-bg, var(--tbw-focus-background));box-shadow:0 0 0 1px var(--tbw-row-reorder-moving-border, var(--tbw-color-accent)) inset}.data-grid-row.flip-animating{transition:transform var(--tbw-animation-duration, .2s) ease-out;will-change:transform;z-index:1}}', Bi = "__tbw_row_drag";
4373
- class Rn extends _ {
4369
+ const Oi = '@layer tbw-plugins{.dg-row-drag-handle{display:flex;align-items:center;justify-content:center;cursor:grab;user-select:none;color:var(--tbw-row-reorder-handle-color, var(--tbw-color-fg-muted));transition:color var(--tbw-transition-duration, .12s) var(--tbw-transition-ease, ease);font-size:var(--tbw-font-size, 1em);letter-spacing:-2px;&:hover{color:var(--tbw-row-reorder-handle-hover, var(--tbw-color-fg))}&:active{cursor:grabbing}}.data-grid-row.dragging{opacity:.6}.data-grid-row.drop-target{position:relative;&.drop-before:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background-color:var(--tbw-row-reorder-indicator, var(--tbw-color-accent));z-index:10}&.drop-after:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background-color:var(--tbw-row-reorder-indicator, var(--tbw-color-accent));z-index:10}}.data-grid-row.keyboard-moving{background-color:var(--tbw-row-reorder-moving-bg, var(--tbw-focus-background));box-shadow:0 0 0 1px var(--tbw-row-reorder-moving-border, var(--tbw-color-accent)) inset}.data-grid-row.flip-animating{transition:transform var(--tbw-animation-duration, .2s) ease-out;will-change:transform;z-index:1}}', Gi = "__tbw_row_drag";
4370
+ class En extends A {
4374
4371
  name = "rowReorder";
4375
- styles = Gi;
4372
+ styles = Oi;
4376
4373
  get defaultConfig() {
4377
4374
  return {
4378
4375
  enableKeyboard: !0,
@@ -4399,7 +4396,7 @@ class Rn extends _ {
4399
4396
  if (!this.config.showDragHandle)
4400
4397
  return [...e];
4401
4398
  const t = {
4402
- field: Bi,
4399
+ field: Gi,
4403
4400
  header: "",
4404
4401
  width: this.config.dragHandleWidth ?? 40,
4405
4402
  resizable: !1,
@@ -4590,38 +4587,38 @@ function V(s) {
4590
4587
  endCol: Math.max(s.startCol, s.endCol)
4591
4588
  };
4592
4589
  }
4593
- function Vi(s) {
4590
+ function Bi(s) {
4594
4591
  const e = V(s);
4595
4592
  return {
4596
4593
  from: { row: e.startRow, col: e.startCol },
4597
4594
  to: { row: e.endRow, col: e.endCol }
4598
4595
  };
4599
4596
  }
4600
- function nt(s) {
4601
- return s.map(Vi);
4597
+ function it(s) {
4598
+ return s.map(Bi);
4602
4599
  }
4603
- function Wi(s, e, t) {
4600
+ function Vi(s, e, t) {
4604
4601
  const i = V(t);
4605
4602
  return s >= i.startRow && s <= i.endRow && e >= i.startCol && e <= i.endCol;
4606
4603
  }
4607
- function $e(s, e, t) {
4608
- return t.some((i) => Wi(s, e, i));
4604
+ function We(s, e, t) {
4605
+ return t.some((i) => Vi(s, e, i));
4609
4606
  }
4610
- function $i(s) {
4607
+ function Wi(s) {
4611
4608
  const e = [], t = V(s);
4612
4609
  for (let i = t.startRow; i <= t.endRow; i++)
4613
4610
  for (let n = t.startCol; n <= t.endCol; n++)
4614
4611
  e.push({ row: i, col: n });
4615
4612
  return e;
4616
4613
  }
4617
- function ji(s) {
4614
+ function $i(s) {
4618
4615
  const e = /* @__PURE__ */ new Map();
4619
4616
  for (const t of s)
4620
- for (const i of $i(t))
4617
+ for (const i of Wi(t))
4621
4618
  e.set(`${i.row},${i.col}`, i);
4622
4619
  return [...e.values()];
4623
4620
  }
4624
- function ce(s, e) {
4621
+ function de(s, e) {
4625
4622
  return {
4626
4623
  startRow: s.row,
4627
4624
  startCol: s.col,
@@ -4629,12 +4626,12 @@ function ce(s, e) {
4629
4626
  endCol: e.col
4630
4627
  };
4631
4628
  }
4632
- function J(s, e) {
4629
+ function Z(s, e) {
4633
4630
  const t = V(s), i = V(e);
4634
4631
  return t.startRow === i.startRow && t.startCol === i.startCol && t.endRow === i.endRow && t.endCol === i.endCol;
4635
4632
  }
4636
- const Ui = "@layer tbw-plugins{tbw-grid{&.selecting .data-grid-row>.cell{user-select:none}&[data-has-focus] .data-grid-row.row-focus{background-color:var(--tbw-focus-background, rgba(from var(--tbw-color-accent) r g b / 12%))}&[data-selection-mode=row] .cell-focus{outline:none}.data-grid-row>.cell.selected{background-color:var(--tbw-range-selection-bg);&.top{border-top:2px solid var(--tbw-range-border-color)}&.bottom{border-bottom:2px solid var(--tbw-range-border-color)}&.first{border-left:2px solid var(--tbw-range-border-color)}&.last{border-right:2px solid var(--tbw-range-border-color)}}.data-grid-row[data-selectable=false]{cursor:not-allowed;opacity:.6;&.row-focus{background-color:var(--tbw-color-row-alt)}}.data-grid-row>.cell[data-selectable=false]{cursor:not-allowed;opacity:.6;&.selected{background-color:var(--tbw-selection-warning-bg, rgba(from var(--tbw-color-error) r g b / 50%))}}.tbw-selection-summary{font-size:var(--tbw-font-size-sm, .8125rem);color:var(--tbw-color-fg-muted);white-space:nowrap}}}";
4637
- function Yi(s, e, t) {
4633
+ const ji = "@layer tbw-plugins{tbw-grid{&.selecting .data-grid-row>.cell{user-select:none}&[data-has-focus] .data-grid-row.row-focus{background-color:var(--tbw-focus-background, rgba(from var(--tbw-color-accent) r g b / 12%))}&[data-selection-mode=row] .cell-focus{outline:none}.data-grid-row>.cell.selected{background-color:var(--tbw-range-selection-bg);&.top{border-top:2px solid var(--tbw-range-border-color)}&.bottom{border-bottom:2px solid var(--tbw-range-border-color)}&.first{border-left:2px solid var(--tbw-range-border-color)}&.last{border-right:2px solid var(--tbw-range-border-color)}}.data-grid-row[data-selectable=false]{cursor:not-allowed;opacity:.6;&.row-focus{background-color:var(--tbw-color-row-alt)}}.data-grid-row>.cell[data-selectable=false]{cursor:not-allowed;opacity:.6;&.selected{background-color:var(--tbw-selection-warning-bg, rgba(from var(--tbw-color-error) r g b / 50%))}}.tbw-selection-summary{font-size:var(--tbw-font-size-sm, .8125rem);color:var(--tbw-color-fg-muted);white-space:nowrap}}}";
4634
+ function Ui(s, e, t) {
4638
4635
  if (s === "cell" && e.selectedCell)
4639
4636
  return {
4640
4637
  mode: s,
@@ -4652,9 +4649,9 @@ function Yi(s, e, t) {
4652
4649
  }));
4653
4650
  return { mode: s, ranges: i };
4654
4651
  }
4655
- return s === "range" && e.ranges.length > 0 ? { mode: s, ranges: nt(e.ranges) } : { mode: s, ranges: [] };
4652
+ return s === "range" && e.ranges.length > 0 ? { mode: s, ranges: it(e.ranges) } : { mode: s, ranges: [] };
4656
4653
  }
4657
- class Sn extends _ {
4654
+ class Rn extends A {
4658
4655
  static manifest = {
4659
4656
  configRules: [
4660
4657
  {
@@ -4668,7 +4665,7 @@ class Sn extends _ {
4668
4665
  ]
4669
4666
  };
4670
4667
  name = "selection";
4671
- styles = Ui;
4668
+ styles = ji;
4672
4669
  get defaultConfig() {
4673
4670
  return {
4674
4671
  mode: "cell",
@@ -4710,7 +4707,7 @@ class Sn extends _ {
4710
4707
  const { rowIndex: t, colIndex: i, originalEvent: n } = e, { mode: r, triggerOn: o = "click" } = this.config;
4711
4708
  if (n.type !== o)
4712
4709
  return !1;
4713
- const a = this.columns[i], l = a && H(a);
4710
+ const a = this.columns[i], l = a && q(a);
4714
4711
  if (r === "cell") {
4715
4712
  if (l || !this.isCellSelectable(t, i))
4716
4713
  return !1;
@@ -4724,8 +4721,8 @@ class Sn extends _ {
4724
4721
  return !1;
4725
4722
  const d = n.shiftKey, c = n.ctrlKey || n.metaKey;
4726
4723
  if (d && this.cellAnchor) {
4727
- const u = ce(this.cellAnchor, { row: t, col: i }), h = this.ranges.length > 0 ? this.ranges[this.ranges.length - 1] : null;
4728
- if (h && J(h, u))
4724
+ const u = de(this.cellAnchor, { row: t, col: i }), h = this.ranges.length > 0 ? this.ranges[this.ranges.length - 1] : null;
4725
+ if (h && Z(h, u))
4729
4726
  return !1;
4730
4727
  c ? this.ranges.length > 0 ? this.ranges[this.ranges.length - 1] = u : this.ranges.push(u) : this.ranges = [u], this.activeRange = u;
4731
4728
  } else if (c) {
@@ -4743,7 +4740,7 @@ class Sn extends _ {
4743
4740
  endRow: t,
4744
4741
  endCol: i
4745
4742
  };
4746
- if (this.ranges.length === 1 && J(this.ranges[0], u))
4743
+ if (this.ranges.length === 1 && Z(this.ranges[0], u))
4747
4744
  return !1;
4748
4745
  this.ranges = [u], this.activeRange = u, this.cellAnchor = { row: t, col: i };
4749
4746
  }
@@ -4788,7 +4785,7 @@ class Sn extends _ {
4788
4785
  onCellMouseDown(e) {
4789
4786
  if (!this.isSelectionEnabled() || this.config.mode !== "range" || e.rowIndex === void 0 || e.colIndex === void 0 || e.rowIndex < 0) return;
4790
4787
  const t = this.columns[e.colIndex];
4791
- if (t && H(t) || !this.isCellSelectable(e.rowIndex, e.colIndex) || e.originalEvent.shiftKey && this.cellAnchor)
4788
+ if (t && q(t) || !this.isCellSelectable(e.rowIndex, e.colIndex) || e.originalEvent.shiftKey && this.cellAnchor)
4792
4789
  return;
4793
4790
  this.isDragging = !0;
4794
4791
  const i = e.rowIndex, n = e.colIndex, r = e.originalEvent.ctrlKey || e.originalEvent.metaKey, o = {
@@ -4797,18 +4794,18 @@ class Sn extends _ {
4797
4794
  endRow: i,
4798
4795
  endCol: n
4799
4796
  };
4800
- return !r && this.ranges.length === 1 && J(this.ranges[0], o) ? (this.cellAnchor = { row: i, col: n }, !0) : (this.cellAnchor = { row: i, col: n }, r || (this.ranges = []), this.ranges.push(o), this.activeRange = o, this.emit("selection-change", this.#t()), this.requestAfterRender(), !0);
4797
+ return !r && this.ranges.length === 1 && Z(this.ranges[0], o) ? (this.cellAnchor = { row: i, col: n }, !0) : (this.cellAnchor = { row: i, col: n }, r || (this.ranges = []), this.ranges.push(o), this.activeRange = o, this.emit("selection-change", this.#t()), this.requestAfterRender(), !0);
4801
4798
  }
4802
4799
  onCellMouseMove(e) {
4803
4800
  if (!this.isSelectionEnabled() || this.config.mode !== "range" || !this.isDragging || !this.cellAnchor || e.rowIndex === void 0 || e.colIndex === void 0 || e.rowIndex < 0) return;
4804
4801
  let t = e.colIndex;
4805
4802
  const i = this.columns[t];
4806
- if (i && H(i)) {
4807
- const o = this.columns.findIndex((a) => !H(a));
4803
+ if (i && q(i)) {
4804
+ const o = this.columns.findIndex((a) => !q(a));
4808
4805
  o >= 0 && (t = o);
4809
4806
  }
4810
- const n = ce(this.cellAnchor, { row: e.rowIndex, col: t }), r = this.ranges.length > 0 ? this.ranges[this.ranges.length - 1] : null;
4811
- return r && J(r, n) || (this.ranges.length > 0 ? this.ranges[this.ranges.length - 1] = n : this.ranges.push(n), this.activeRange = n, this.emit("selection-change", this.#t()), this.requestAfterRender()), !0;
4807
+ const n = de(this.cellAnchor, { row: e.rowIndex, col: t }), r = this.ranges.length > 0 ? this.ranges[this.ranges.length - 1] : null;
4808
+ return r && Z(r, n) || (this.ranges.length > 0 ? this.ranges[this.ranges.length - 1] = n : this.ranges.push(n), this.activeRange = n, this.emit("selection-change", this.#t()), this.requestAfterRender()), !0;
4812
4809
  }
4813
4810
  onCellMouseUp(e) {
4814
4811
  if (this.isSelectionEnabled() && this.config.mode === "range" && this.isDragging)
@@ -4824,22 +4821,22 @@ class Sn extends _ {
4824
4821
  const r = e.querySelectorAll(".data-grid-row");
4825
4822
  if (r.forEach((o) => {
4826
4823
  o.classList.remove("selected", "row-focus"), i && o.removeAttribute("data-selectable");
4827
- }), t === "row" && (xe(e), r.forEach((o) => {
4828
- const a = o.querySelector(".cell[data-row]"), l = ht(a);
4824
+ }), t === "row" && (ye(e), r.forEach((o) => {
4825
+ const a = o.querySelector(".cell[data-row]"), l = ut(a);
4829
4826
  l >= 0 && (i && !this.isRowSelectable(l) && o.setAttribute("data-selectable", "false"), this.selected.has(l) && o.classList.add("selected", "row-focus"));
4830
4827
  })), (t === "cell" || t === "range") && i && e.querySelectorAll(".cell[data-row][data-col]").forEach((a) => {
4831
4828
  const l = parseInt(a.getAttribute("data-row") ?? "-1", 10), d = parseInt(a.getAttribute("data-col") ?? "-1", 10);
4832
4829
  l >= 0 && d >= 0 && (this.isCellSelectable(l, d) || a.setAttribute("data-selectable", "false"));
4833
4830
  }), t === "range" && this.ranges.length > 0) {
4834
- xe(e);
4835
- const o = this.activeRange ? V(this.activeRange) : null, a = this.columns.findIndex((d) => !H(d));
4831
+ ye(e);
4832
+ const o = this.activeRange ? V(this.activeRange) : null, a = this.columns.findIndex((d) => !q(d));
4836
4833
  this.columns.length - 1, e.querySelectorAll(".cell[data-row][data-col]").forEach((d) => {
4837
4834
  const c = parseInt(d.getAttribute("data-row") ?? "-1", 10), u = parseInt(d.getAttribute("data-col") ?? "-1", 10);
4838
4835
  if (c >= 0 && u >= 0) {
4839
4836
  const h = this.columns[u];
4840
- if (h && H(h))
4837
+ if (h && q(h))
4841
4838
  return;
4842
- if ($e(c, u, this.ranges) && (d.classList.add("selected"), o)) {
4839
+ if (We(c, u, this.ranges) && (d.classList.add("selected"), o)) {
4843
4840
  c === o.startRow && d.classList.add("top"), c === o.endRow && d.classList.add("bottom");
4844
4841
  const f = Math.max(o.startCol, a);
4845
4842
  u === f && d.classList.add("first"), u === o.endCol && d.classList.add("last");
@@ -4858,7 +4855,7 @@ class Sn extends _ {
4858
4855
  this.pendingKeyboardUpdate = null;
4859
4856
  const r = this.grid._focusRow, o = this.grid._focusCol;
4860
4857
  if (n && this.cellAnchor) {
4861
- const a = ce(this.cellAnchor, { row: r, col: o });
4858
+ const a = de(this.cellAnchor, { row: r, col: o });
4862
4859
  this.ranges = [a], this.activeRange = a;
4863
4860
  } else n || (this.ranges = [], this.activeRange = null, this.cellAnchor = { row: r, col: o });
4864
4861
  this.emit("selection-change", this.#t());
@@ -4876,10 +4873,10 @@ class Sn extends _ {
4876
4873
  };
4877
4874
  }
4878
4875
  getSelectedCells() {
4879
- return ji(this.ranges);
4876
+ return $i(this.ranges);
4880
4877
  }
4881
4878
  isCellSelected(e, t) {
4882
- return $e(e, t, this.ranges);
4879
+ return We(e, t, this.ranges);
4883
4880
  }
4884
4881
  clearSelection() {
4885
4882
  this.selectedCell = null, this.selected.clear(), this.anchor = null, this.ranges = [], this.activeRange = null, this.cellAnchor = null, this.emit("selection-change", { mode: this.config.mode, ranges: [] }), this.requestAfterRender();
@@ -4892,11 +4889,11 @@ class Sn extends _ {
4892
4889
  endCol: t.to.col
4893
4890
  })), this.activeRange = this.ranges.length > 0 ? this.ranges[this.ranges.length - 1] : null, this.emit("selection-change", {
4894
4891
  mode: this.config.mode,
4895
- ranges: nt(this.ranges)
4892
+ ranges: it(this.ranges)
4896
4893
  }), this.requestAfterRender();
4897
4894
  }
4898
4895
  #t() {
4899
- return Yi(
4896
+ return Ui(
4900
4897
  this.config.mode,
4901
4898
  {
4902
4899
  selectedCell: this.selectedCell,
@@ -4907,23 +4904,23 @@ class Sn extends _ {
4907
4904
  );
4908
4905
  }
4909
4906
  }
4910
- function ee(s, e) {
4907
+ function Q(s, e) {
4911
4908
  return Math.floor(s / e);
4912
4909
  }
4913
- function Xi(s, e) {
4910
+ function Yi(s, e) {
4914
4911
  return {
4915
4912
  start: s * e,
4916
4913
  end: (s + 1) * e
4917
4914
  };
4918
4915
  }
4919
- function Zi(s, e, t) {
4920
- const i = ee(s, t), n = ee(e - 1, t), r = [];
4916
+ function Xi(s, e, t) {
4917
+ const i = Q(s, t), n = Q(e - 1, t), r = [];
4921
4918
  for (let o = i; o <= n; o++)
4922
4919
  r.push(o);
4923
4920
  return r;
4924
4921
  }
4925
- async function je(s, e, t, i) {
4926
- const n = Xi(e, t);
4922
+ async function $e(s, e, t, i) {
4923
+ const n = Yi(e, t);
4927
4924
  return s.getRows({
4928
4925
  startRow: n.start,
4929
4926
  endRow: n.end,
@@ -4931,14 +4928,14 @@ async function je(s, e, t, i) {
4931
4928
  filterModel: i.filterModel
4932
4929
  });
4933
4930
  }
4934
- function Ji(s, e, t) {
4935
- const i = ee(s, e), n = t.get(i);
4931
+ function Zi(s, e, t) {
4932
+ const i = Q(s, e), n = t.get(i);
4936
4933
  if (!n) return;
4937
4934
  const r = s % e;
4938
4935
  return n[r];
4939
4936
  }
4940
- const Qi = 100;
4941
- class kn extends _ {
4937
+ const Ji = 100;
4938
+ class Sn extends A {
4942
4939
  name = "serverSide";
4943
4940
  get defaultConfig() {
4944
4941
  return {
@@ -4958,12 +4955,12 @@ class kn extends _ {
4958
4955
  }
4959
4956
  loadRequiredBlocks() {
4960
4957
  if (!this.dataSource) return;
4961
- const e = this.grid, t = this.config.cacheBlockSize ?? 100, i = { startRow: e._virtualization.start, endRow: e._virtualization.end }, n = Zi(i.startRow, i.endRow, t);
4958
+ const e = this.grid, t = this.config.cacheBlockSize ?? 100, i = { startRow: e._virtualization.start, endRow: e._virtualization.end }, n = Xi(i.startRow, i.endRow, t);
4962
4959
  for (const r of n)
4963
4960
  if (!(this.loadedBlocks.has(r) || this.loadingBlocks.has(r))) {
4964
4961
  if (this.loadingBlocks.size >= (this.config.maxConcurrentRequests ?? 2))
4965
4962
  break;
4966
- this.loadingBlocks.add(r), je(this.dataSource, r, t, {}).then((o) => {
4963
+ this.loadingBlocks.add(r), $e(this.dataSource, r, t, {}).then((o) => {
4967
4964
  this.loadedBlocks.set(r, o.rows), this.totalRowCount = o.totalRowCount, this.loadingBlocks.delete(r), this.requestRender(), this.loadRequiredBlocks();
4968
4965
  }).catch(() => {
4969
4966
  this.loadingBlocks.delete(r);
@@ -4974,7 +4971,7 @@ class kn extends _ {
4974
4971
  if (!this.dataSource) return [...e];
4975
4972
  const t = [];
4976
4973
  for (let i = 0; i < this.totalRowCount; i++) {
4977
- const n = Ji(i, this.config.cacheBlockSize ?? 100, this.loadedBlocks);
4974
+ const n = Zi(i, this.config.cacheBlockSize ?? 100, this.loadedBlocks);
4978
4975
  t.push(n ?? { __loading: !0, __index: i });
4979
4976
  }
4980
4977
  return t;
@@ -4982,12 +4979,12 @@ class kn extends _ {
4982
4979
  onScroll(e) {
4983
4980
  this.dataSource && (this.loadRequiredBlocks(), this.scrollDebounceTimer && clearTimeout(this.scrollDebounceTimer), this.scrollDebounceTimer = setTimeout(() => {
4984
4981
  this.loadRequiredBlocks();
4985
- }, Qi));
4982
+ }, Ji));
4986
4983
  }
4987
4984
  setDataSource(e) {
4988
4985
  this.dataSource = e, this.loadedBlocks.clear(), this.loadingBlocks.clear();
4989
4986
  const t = this.config.cacheBlockSize ?? 100;
4990
- je(e, 0, t, {}).then((i) => {
4987
+ $e(e, 0, t, {}).then((i) => {
4991
4988
  this.loadedBlocks.set(0, i.rows), this.totalRowCount = i.totalRowCount, this.requestRender();
4992
4989
  });
4993
4990
  }
@@ -5001,59 +4998,59 @@ class kn extends _ {
5001
4998
  return this.totalRowCount;
5002
4999
  }
5003
5000
  isRowLoaded(e) {
5004
- const t = this.config.cacheBlockSize ?? 100, i = ee(e, t);
5001
+ const t = this.config.cacheBlockSize ?? 100, i = Q(e, t);
5005
5002
  return this.loadedBlocks.has(i);
5006
5003
  }
5007
5004
  getLoadedBlockCount() {
5008
5005
  return this.loadedBlocks.size;
5009
5006
  }
5010
5007
  }
5011
- function rt(s, e, t) {
5008
+ function nt(s, e, t) {
5012
5009
  return s.id !== void 0 ? String(s.id) : t ? `${t}-${e}` : String(e);
5013
5010
  }
5014
- function ue(s, e) {
5011
+ function ce(s, e) {
5015
5012
  const t = new Set(s);
5016
5013
  return t.has(e) ? t.delete(e) : t.add(e), t;
5017
5014
  }
5018
- function fe(s, e, t = null, i = 0) {
5015
+ function ge(s, e, t = null, i = 0) {
5019
5016
  const n = e.childrenField ?? "children", r = /* @__PURE__ */ new Set();
5020
5017
  for (let o = 0; o < s.length; o++) {
5021
- const a = s[o], l = rt(a, o, t), d = a[n];
5018
+ const a = s[o], l = nt(a, o, t), d = a[n];
5022
5019
  if (Array.isArray(d) && d.length > 0) {
5023
5020
  r.add(l);
5024
- const c = fe(d, e, l, i + 1);
5021
+ const c = ge(d, e, l, i + 1);
5025
5022
  for (const u of c) r.add(u);
5026
5023
  }
5027
5024
  }
5028
5025
  return r;
5029
5026
  }
5030
- function en() {
5027
+ function Qi() {
5031
5028
  return /* @__PURE__ */ new Set();
5032
5029
  }
5033
- function ot(s, e, t, i = null, n = 0) {
5030
+ function rt(s, e, t, i = null, n = 0) {
5034
5031
  const r = t.childrenField ?? "children";
5035
5032
  for (let o = 0; o < s.length; o++) {
5036
- const a = s[o], l = rt(a, o, i);
5033
+ const a = s[o], l = nt(a, o, i);
5037
5034
  if (l === e)
5038
5035
  return [l];
5039
5036
  const d = a[r];
5040
5037
  if (Array.isArray(d) && d.length > 0) {
5041
- const c = ot(d, e, t, l, n + 1);
5038
+ const c = rt(d, e, t, l, n + 1);
5042
5039
  if (c)
5043
5040
  return [l, ...c];
5044
5041
  }
5045
5042
  }
5046
5043
  return null;
5047
5044
  }
5048
- function tn(s, e, t, i) {
5049
- const n = ot(s, e, t);
5045
+ function en(s, e, t, i) {
5046
+ const n = rt(s, e, t);
5050
5047
  if (!n) return i;
5051
5048
  const r = new Set(i);
5052
5049
  for (let o = 0; o < n.length - 1; o++)
5053
5050
  r.add(n[o]);
5054
5051
  return r;
5055
5052
  }
5056
- function Ue(s, e = "children") {
5053
+ function je(s, e = "children") {
5057
5054
  if (!Array.isArray(s) || s.length === 0) return !1;
5058
5055
  for (const t of s) {
5059
5056
  if (!t) continue;
@@ -5063,7 +5060,7 @@ function Ue(s, e = "children") {
5063
5060
  }
5064
5061
  return !1;
5065
5062
  }
5066
- function nn(s) {
5063
+ function tn(s) {
5067
5064
  if (!Array.isArray(s) || s.length === 0) return null;
5068
5065
  const e = ["children", "items", "nodes", "subRows", "nested"];
5069
5066
  for (const t of s)
@@ -5075,10 +5072,10 @@ function nn(s) {
5075
5072
  }
5076
5073
  return null;
5077
5074
  }
5078
- const rn = "@layer tbw-plugins{tbw-grid{.cell[data-field=__tbw_expander]{border-right:none!important;padding:0;display:flex;align-items:center;justify-content:flex-start}.header-row .cell[data-field=__tbw_expander]{display:none}.header-row .cell[data-field=__tbw_expander]+.cell{grid-column:1 / 3}.tree-cell-wrapper{display:inline-flex;align-items:center;padding-left:calc(var(--tbw-tree-depth, 0) * var(--tbw-tree-indent-width, var(--tbw-tree-toggle-size, 1.25em)))}.tree-expander{display:flex;align-items:center;justify-content:flex-start;width:100%;height:100%;box-sizing:border-box}.tree-toggle{cursor:pointer;user-select:none;display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-tree-toggle-size, 1.25em);height:var(--tbw-tree-toggle-size, 1.25em);flex-shrink:0}.tree-toggle:hover{color:var(--tbw-tree-accent, var(--tbw-color-accent))}.tree-spacer{width:var(--tbw-tree-toggle-size, 1.25em);display:inline-block;flex-shrink:0}.data-grid-row.tbw-tree-slide-in{animation:tbw-tree-slide-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}.data-grid-row.tbw-tree-fade-in{animation:tbw-tree-fade-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}}@keyframes tbw-tree-slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes tbw-tree-fade-in{0%{opacity:0}to{opacity:1}}}";
5079
- class An extends _ {
5075
+ const nn = "@layer tbw-plugins{tbw-grid{.cell[data-field=__tbw_expander]{border-right:none!important;padding:0;display:flex;align-items:center;justify-content:flex-start}.header-row .cell[data-field=__tbw_expander]{display:none}.header-row .cell[data-field=__tbw_expander]+.cell{grid-column:1 / 3}.tree-cell-wrapper{display:inline-flex;align-items:center;padding-left:calc(var(--tbw-tree-depth, 0) * var(--tbw-tree-indent-width, var(--tbw-tree-toggle-size, 1.25em)))}.tree-expander{display:flex;align-items:center;justify-content:flex-start;width:100%;height:100%;box-sizing:border-box}.tree-toggle{cursor:pointer;user-select:none;display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-tree-toggle-size, 1.25em);height:var(--tbw-tree-toggle-size, 1.25em);flex-shrink:0}.tree-toggle:hover{color:var(--tbw-tree-accent, var(--tbw-color-accent))}.tree-spacer{width:var(--tbw-tree-toggle-size, 1.25em);display:inline-block;flex-shrink:0}.data-grid-row.tbw-tree-slide-in{animation:tbw-tree-slide-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}.data-grid-row.tbw-tree-fade-in{animation:tbw-tree-fade-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}}@keyframes tbw-tree-slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes tbw-tree-fade-in{0%{opacity:0}to{opacity:1}}}";
5076
+ class kn extends A {
5080
5077
  name = "tree";
5081
- styles = rn;
5078
+ styles = nn;
5082
5079
  get defaultConfig() {
5083
5080
  return {
5084
5081
  childrenField: "children",
@@ -5104,15 +5101,15 @@ class An extends _ {
5104
5101
  }
5105
5102
  detect(e) {
5106
5103
  if (!this.config.autoDetect) return !1;
5107
- const t = e, i = this.config.childrenField ?? nn(t) ?? "children";
5108
- return Ue(t, i);
5104
+ const t = e, i = this.config.childrenField ?? tn(t) ?? "children";
5105
+ return je(t, i);
5109
5106
  }
5110
5107
  processRows(e) {
5111
5108
  const t = this.config.childrenField ?? "children", i = e;
5112
- if (!Ue(i, t))
5109
+ if (!je(i, t))
5113
5110
  return this.flattenedRows = [], this.rowKeyMap.clear(), this.previousVisibleKeys.clear(), [...e];
5114
5111
  let n = this.withStableKeys(i);
5115
- this.sortState && (n = this.sortTree(n, this.sortState.field, this.sortState.direction)), this.config.defaultExpanded && !this.initialExpansionDone && (this.expandedKeys = fe(n, this.config), this.initialExpansionDone = !0), this.flattenedRows = this.flattenTree(n, this.expandedKeys), this.rowKeyMap.clear(), this.keysToAnimate.clear();
5112
+ this.sortState && (n = this.sortTree(n, this.sortState.field, this.sortState.direction)), this.config.defaultExpanded && !this.initialExpansionDone && (this.expandedKeys = ge(n, this.config), this.initialExpansionDone = !0), this.flattenedRows = this.flattenTree(n, this.expandedKeys), this.rowKeyMap.clear(), this.keysToAnimate.clear();
5116
5113
  const r = /* @__PURE__ */ new Set();
5117
5114
  for (const o of this.flattenedRows)
5118
5115
  this.rowKeyMap.set(o.key, o), r.add(o.key), !this.previousVisibleKeys.has(o.key) && o.depth > 0 && this.keysToAnimate.add(o.key);
@@ -5168,19 +5165,19 @@ class An extends _ {
5168
5165
  const { row: c, value: u } = d, { showExpandIcons: h = !0, indentWidth: g } = r(), f = c, p = f.__treeDepth ?? 0, w = document.createElement("span");
5169
5166
  if (w.className = "tree-cell-wrapper", w.style.setProperty("--tbw-tree-depth", String(p)), g !== void 0 && w.style.setProperty("--tbw-tree-indent-width", `${g}px`), h)
5170
5167
  if (f.__treeHasChildren) {
5171
- const y = document.createElement("span");
5172
- y.className = `tree-toggle${f.__treeExpanded ? " expanded" : ""}`, o(y, a(f.__treeExpanded ? "collapse" : "expand")), y.setAttribute("data-tree-key", String(f.__treeKey ?? "")), w.appendChild(y);
5168
+ const v = document.createElement("span");
5169
+ v.className = `tree-toggle${f.__treeExpanded ? " expanded" : ""}`, o(v, a(f.__treeExpanded ? "collapse" : "expand")), v.setAttribute("data-tree-key", String(f.__treeKey ?? "")), w.appendChild(v);
5173
5170
  } else {
5174
- const y = document.createElement("span");
5175
- y.className = "tree-spacer", w.appendChild(y);
5171
+ const v = document.createElement("span");
5172
+ v.className = "tree-spacer", w.appendChild(v);
5176
5173
  }
5177
- const v = document.createElement("span");
5178
- if (v.className = "tree-content", n) {
5179
- const y = n(d);
5180
- y instanceof Node ? v.appendChild(y) : typeof y == "string" && (v.innerHTML = y);
5174
+ const b = document.createElement("span");
5175
+ if (b.className = "tree-content", n) {
5176
+ const v = n(d);
5177
+ v instanceof Node ? b.appendChild(v) : typeof v == "string" && (b.innerHTML = v);
5181
5178
  } else
5182
- v.textContent = u != null ? String(u) : "";
5183
- return w.appendChild(v), w;
5179
+ b.textContent = u != null ? String(u) : "";
5180
+ return w.appendChild(b), w;
5184
5181
  };
5185
5182
  return t[0] = { ...i, viewRenderer: l }, t;
5186
5183
  }
@@ -5190,7 +5187,7 @@ class An extends _ {
5190
5187
  const i = t.getAttribute("data-tree-key");
5191
5188
  if (!i) return !1;
5192
5189
  const n = this.rowKeyMap.get(i);
5193
- return n ? (this.expandedKeys = ue(this.expandedKeys, i), this.emit("tree-expand", {
5190
+ return n ? (this.expandedKeys = ce(this.expandedKeys, i), this.emit("tree-expand", {
5194
5191
  key: i,
5195
5192
  row: n.data,
5196
5193
  expanded: this.expandedKeys.has(i),
@@ -5201,7 +5198,7 @@ class An extends _ {
5201
5198
  if (e.key !== " ") return;
5202
5199
  const t = this.grid._focusRow, i = this.flattenedRows[t];
5203
5200
  if (i?.hasChildren)
5204
- return e.preventDefault(), this.expandedKeys = ue(this.expandedKeys, i.key), this.emit("tree-expand", {
5201
+ return e.preventDefault(), this.expandedKeys = ce(this.expandedKeys, i.key), this.emit("tree-expand", {
5205
5202
  key: i.key,
5206
5203
  row: i.data,
5207
5204
  expanded: this.expandedKeys.has(i.key),
@@ -5234,13 +5231,13 @@ class An extends _ {
5234
5231
  this.expandedKeys.delete(e), this.requestRender();
5235
5232
  }
5236
5233
  toggle(e) {
5237
- this.expandedKeys = ue(this.expandedKeys, e), this.requestRender();
5234
+ this.expandedKeys = ce(this.expandedKeys, e), this.requestRender();
5238
5235
  }
5239
5236
  expandAll() {
5240
- this.expandedKeys = fe(this.rows, this.config), this.requestRender();
5237
+ this.expandedKeys = ge(this.rows, this.config), this.requestRender();
5241
5238
  }
5242
5239
  collapseAll() {
5243
- this.expandedKeys = en(), this.requestRender();
5240
+ this.expandedKeys = Qi(), this.requestRender();
5244
5241
  }
5245
5242
  isExpanded(e) {
5246
5243
  return this.expandedKeys.has(e);
@@ -5255,10 +5252,10 @@ class An extends _ {
5255
5252
  return this.rowKeyMap.get(e)?.data;
5256
5253
  }
5257
5254
  expandToKey(e) {
5258
- this.expandedKeys = tn(this.rows, e, this.config, this.expandedKeys), this.requestRender();
5255
+ this.expandedKeys = en(this.rows, e, this.config, this.expandedKeys), this.requestRender();
5259
5256
  }
5260
5257
  }
5261
- function on(s, e, t) {
5258
+ function rn(s, e, t) {
5262
5259
  const i = [...s.undoStack, e];
5263
5260
  for (; i.length > t; )
5264
5261
  i.shift();
@@ -5267,7 +5264,7 @@ function on(s, e, t) {
5267
5264
  redoStack: []
5268
5265
  };
5269
5266
  }
5270
- function Ye(s) {
5267
+ function Ue(s) {
5271
5268
  if (s.undoStack.length === 0)
5272
5269
  return { newState: s, action: null };
5273
5270
  const e = [...s.undoStack], t = e.pop();
@@ -5279,7 +5276,7 @@ function Ye(s) {
5279
5276
  action: t
5280
5277
  } : { newState: s, action: null };
5281
5278
  }
5282
- function Xe(s) {
5279
+ function Ye(s) {
5283
5280
  if (s.redoStack.length === 0)
5284
5281
  return { newState: s, action: null };
5285
5282
  const e = [...s.redoStack], t = e.pop();
@@ -5291,16 +5288,16 @@ function Xe(s) {
5291
5288
  action: t
5292
5289
  } : { newState: s, action: null };
5293
5290
  }
5294
- function sn(s) {
5291
+ function on(s) {
5295
5292
  return s.undoStack.length > 0;
5296
5293
  }
5297
- function an(s) {
5294
+ function sn(s) {
5298
5295
  return s.redoStack.length > 0;
5299
5296
  }
5300
- function ln() {
5297
+ function an() {
5301
5298
  return { undoStack: [], redoStack: [] };
5302
5299
  }
5303
- function dn(s, e, t, i) {
5300
+ function ln(s, e, t, i) {
5304
5301
  return {
5305
5302
  type: "cell-edit",
5306
5303
  rowIndex: s,
@@ -5310,7 +5307,7 @@ function dn(s, e, t, i) {
5310
5307
  timestamp: Date.now()
5311
5308
  };
5312
5309
  }
5313
- class _n extends _ {
5310
+ class An extends A {
5314
5311
  static dependencies = [
5315
5312
  { name: "editing", required: !0, reason: "UndoRedoPlugin tracks cell edit history" }
5316
5313
  ];
@@ -5328,7 +5325,7 @@ class _n extends _ {
5328
5325
  onKeyDown(e) {
5329
5326
  const t = (e.ctrlKey || e.metaKey) && e.key === "z" && !e.shiftKey, i = (e.ctrlKey || e.metaKey) && (e.key === "y" || e.key === "z" && e.shiftKey);
5330
5327
  if (t) {
5331
- const n = Ye({ undoStack: this.undoStack, redoStack: this.redoStack });
5328
+ const n = Ue({ undoStack: this.undoStack, redoStack: this.redoStack });
5332
5329
  if (n.action) {
5333
5330
  const r = this.rows;
5334
5331
  r[n.action.rowIndex] && (r[n.action.rowIndex][n.action.field] = n.action.oldValue), this.undoStack = n.newState.undoStack, this.redoStack = n.newState.redoStack, this.emit("undo", {
@@ -5339,7 +5336,7 @@ class _n extends _ {
5339
5336
  return !0;
5340
5337
  }
5341
5338
  if (i) {
5342
- const n = Xe({ undoStack: this.undoStack, redoStack: this.redoStack });
5339
+ const n = Ye({ undoStack: this.undoStack, redoStack: this.redoStack });
5343
5340
  if (n.action) {
5344
5341
  const r = this.rows;
5345
5342
  r[n.action.rowIndex] && (r[n.action.rowIndex][n.action.field] = n.action.newValue), this.undoStack = n.newState.undoStack, this.redoStack = n.newState.redoStack, this.emit("redo", {
@@ -5352,7 +5349,7 @@ class _n extends _ {
5352
5349
  return !1;
5353
5350
  }
5354
5351
  recordEdit(e, t, i, n) {
5355
- const r = dn(e, t, i, n), o = on(
5352
+ const r = ln(e, t, i, n), o = rn(
5356
5353
  { undoStack: this.undoStack, redoStack: this.redoStack },
5357
5354
  r,
5358
5355
  this.config.maxHistorySize ?? 100
@@ -5360,7 +5357,7 @@ class _n extends _ {
5360
5357
  this.undoStack = o.undoStack, this.redoStack = o.redoStack;
5361
5358
  }
5362
5359
  undo() {
5363
- const e = Ye({ undoStack: this.undoStack, redoStack: this.redoStack });
5360
+ const e = Ue({ undoStack: this.undoStack, redoStack: this.redoStack });
5364
5361
  if (e.action) {
5365
5362
  const t = this.rows;
5366
5363
  t[e.action.rowIndex] && (t[e.action.rowIndex][e.action.field] = e.action.oldValue), this.undoStack = e.newState.undoStack, this.redoStack = e.newState.redoStack, this.requestRender();
@@ -5368,7 +5365,7 @@ class _n extends _ {
5368
5365
  return e.action;
5369
5366
  }
5370
5367
  redo() {
5371
- const e = Xe({ undoStack: this.undoStack, redoStack: this.redoStack });
5368
+ const e = Ye({ undoStack: this.undoStack, redoStack: this.redoStack });
5372
5369
  if (e.action) {
5373
5370
  const t = this.rows;
5374
5371
  t[e.action.rowIndex] && (t[e.action.rowIndex][e.action.field] = e.action.newValue), this.undoStack = e.newState.undoStack, this.redoStack = e.newState.redoStack, this.requestRender();
@@ -5376,13 +5373,13 @@ class _n extends _ {
5376
5373
  return e.action;
5377
5374
  }
5378
5375
  canUndo() {
5379
- return sn({ undoStack: this.undoStack, redoStack: this.redoStack });
5376
+ return on({ undoStack: this.undoStack, redoStack: this.redoStack });
5380
5377
  }
5381
5378
  canRedo() {
5382
- return an({ undoStack: this.undoStack, redoStack: this.redoStack });
5379
+ return sn({ undoStack: this.undoStack, redoStack: this.redoStack });
5383
5380
  }
5384
5381
  clearHistory() {
5385
- const e = ln();
5382
+ const e = an();
5386
5383
  this.undoStack = e.undoStack, this.redoStack = e.redoStack;
5387
5384
  }
5388
5385
  getUndoStack() {
@@ -5392,18 +5389,18 @@ class _n extends _ {
5392
5389
  return [...this.redoStack];
5393
5390
  }
5394
5391
  }
5395
- const cn = '@layer tbw-plugins{.tbw-visibility-content{display:flex;flex-direction:column;height:100%}.tbw-visibility-list{flex:1;overflow-y:auto;padding:var(--tbw-panel-padding, var(--tbw-spacing-md, .5rem))}.tbw-visibility-row{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));padding:var(--tbw-menu-item-padding, .375rem .25rem);cursor:pointer;font-size:var(--tbw-font-size-sm, .8125rem);border-radius:var(--tbw-border-radius, .25rem);position:relative}.tbw-visibility-row:hover{background:var(--tbw-visibility-hover, var(--tbw-color-row-hover))}.tbw-visibility-row input[type=checkbox]{cursor:pointer}.tbw-visibility-row.locked span{color:var(--tbw-color-fg-muted)}.tbw-visibility-handle{cursor:grab;color:var(--tbw-color-fg-muted);font-size:var(--tbw-font-size-2xs, .625rem);letter-spacing:-2px;user-select:none;flex-shrink:0}.tbw-visibility-row.reorderable:hover .tbw-visibility-handle{color:var(--tbw-color-fg)}.tbw-visibility-label{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));flex:1;cursor:pointer}.tbw-visibility-row.dragging{opacity:.5;cursor:grabbing}.tbw-visibility-row.drop-before:before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--tbw-visibility-indicator, var(--tbw-color-accent))}.tbw-visibility-row.drop-after:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--tbw-visibility-indicator, var(--tbw-color-accent))}.tbw-visibility-show-all{margin:var(--tbw-panel-padding, var(--tbw-spacing-md, .5rem));padding:var(--tbw-button-padding, .5rem .75rem);border:1px solid var(--tbw-visibility-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius, .25rem);background:var(--tbw-visibility-btn-bg, var(--tbw-color-header-bg));color:var(--tbw-color-fg);cursor:pointer;font-size:var(--tbw-font-size-sm, .8125rem)}.tbw-visibility-show-all:hover{background:var(--tbw-visibility-hover, var(--tbw-color-row-hover))}}';
5396
- function Ze(s) {
5392
+ const dn = '@layer tbw-plugins{.tbw-visibility-content{display:flex;flex-direction:column;height:100%}.tbw-visibility-list{flex:1;overflow-y:auto;padding:var(--tbw-panel-padding, var(--tbw-spacing-md, .5rem))}.tbw-visibility-row{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));padding:var(--tbw-menu-item-padding, .375rem .25rem);cursor:pointer;font-size:var(--tbw-font-size-sm, .8125rem);border-radius:var(--tbw-border-radius, .25rem);position:relative}.tbw-visibility-row:hover{background:var(--tbw-visibility-hover, var(--tbw-color-row-hover))}.tbw-visibility-row input[type=checkbox]{cursor:pointer}.tbw-visibility-row.locked span{color:var(--tbw-color-fg-muted)}.tbw-visibility-handle{cursor:grab;color:var(--tbw-color-fg-muted);font-size:var(--tbw-font-size-2xs, .625rem);letter-spacing:-2px;user-select:none;flex-shrink:0}.tbw-visibility-row.reorderable:hover .tbw-visibility-handle{color:var(--tbw-color-fg)}.tbw-visibility-label{display:flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem));flex:1;cursor:pointer}.tbw-visibility-row.dragging{opacity:.5;cursor:grabbing}.tbw-visibility-row.drop-before:before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--tbw-visibility-indicator, var(--tbw-color-accent))}.tbw-visibility-row.drop-after:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--tbw-visibility-indicator, var(--tbw-color-accent))}.tbw-visibility-show-all{margin:var(--tbw-panel-padding, var(--tbw-spacing-md, .5rem));padding:var(--tbw-button-padding, .5rem .75rem);border:1px solid var(--tbw-visibility-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius, .25rem);background:var(--tbw-visibility-btn-bg, var(--tbw-color-header-bg));color:var(--tbw-color-fg);cursor:pointer;font-size:var(--tbw-font-size-sm, .8125rem)}.tbw-visibility-show-all:hover{background:var(--tbw-visibility-hover, var(--tbw-color-row-hover))}}';
5393
+ function Xe(s) {
5397
5394
  const e = s.meta ?? {};
5398
5395
  return e.lockPosition !== !0 && e.suppressMovable !== !0;
5399
5396
  }
5400
- class B extends _ {
5397
+ class B extends A {
5401
5398
  static dependencies = [
5402
5399
  { name: "reorder", required: !1, reason: "Enables drag-to-reorder columns in visibility panel" }
5403
5400
  ];
5404
5401
  name = "visibility";
5405
5402
  static PANEL_ID = "columns";
5406
- styles = cn;
5403
+ styles = dn;
5407
5404
  get defaultConfig() {
5408
5405
  return {
5409
5406
  allowHideAll: !1
@@ -5493,7 +5490,7 @@ class B extends _ {
5493
5490
  const i = this.grid.getAllColumns().filter((n) => !n.utility);
5494
5491
  for (let n = 0; n < i.length; n++) {
5495
5492
  const r = i[n], o = r.header || r.field, a = document.createElement("div");
5496
- a.className = r.lockVisible ? "tbw-visibility-row locked" : "tbw-visibility-row", a.setAttribute("data-field", r.field), a.setAttribute("data-index", String(n)), t && Ze(r) && (a.draggable = !0, a.classList.add("reorderable"), this.setupDragListeners(a, r.field, n, e));
5493
+ a.className = r.lockVisible ? "tbw-visibility-row locked" : "tbw-visibility-row", a.setAttribute("data-field", r.field), a.setAttribute("data-index", String(n)), t && Xe(r) && (a.draggable = !0, a.classList.add("reorderable"), this.setupDragListeners(a, r.field, n, e));
5497
5494
  const l = document.createElement("label");
5498
5495
  l.className = "tbw-visibility-label";
5499
5496
  const d = document.createElement("input");
@@ -5501,7 +5498,7 @@ class B extends _ {
5501
5498
  this.grid.toggleColumnVisibility(r.field), setTimeout(() => this.rebuildToggles(e), 0);
5502
5499
  });
5503
5500
  const c = document.createElement("span");
5504
- if (c.textContent = o, l.appendChild(d), l.appendChild(c), t && Ze(r)) {
5501
+ if (c.textContent = o, l.appendChild(d), l.appendChild(c), t && Xe(r)) {
5505
5502
  const u = document.createElement("span");
5506
5503
  u.className = "tbw-visibility-handle", this.setIcon(u, this.resolveIcon("dragHandle")), u.title = "Drag to reorder", a.appendChild(u);
5507
5504
  }
@@ -5541,50 +5538,50 @@ class B extends _ {
5541
5538
  }
5542
5539
  }
5543
5540
  export {
5544
- _ as BaseGridPlugin,
5545
- hn as ClipboardPlugin,
5546
- gn as ColumnVirtualizationPlugin,
5547
- et as ContextMenuPlugin,
5548
- Fn as DEFAULT_ANIMATION_CONFIG,
5549
- at as DEFAULT_GRID_ICONS,
5550
- In as DGEvents,
5551
- Pn as DataGridElement,
5552
- fn as EditingPlugin,
5553
- pn as ExportPlugin,
5554
- q as FilteringPlugin,
5555
- Dn as FitModeEnum,
5556
- Mn as GridCSSVars,
5557
- Nn as GridClasses,
5558
- qn as GridDataAttrs,
5559
- Hn as GridElement,
5560
- zn as GridSelectors,
5561
- mn as GroupingColumnsPlugin,
5562
- wn as GroupingRowsPlugin,
5563
- tt as MasterDetailPlugin,
5564
- bn as MultiSortPlugin,
5565
- Je as PLUGIN_QUERIES,
5566
- vn as PinnedColumnsPlugin,
5567
- yn as PinnedRowsPlugin,
5541
+ A as BaseGridPlugin,
5542
+ un as ClipboardPlugin,
5543
+ hn as ColumnVirtualizationPlugin,
5544
+ Qe as ContextMenuPlugin,
5545
+ Ln as DEFAULT_ANIMATION_CONFIG,
5546
+ st as DEFAULT_GRID_ICONS,
5547
+ Fn as DGEvents,
5548
+ In as DataGridElement,
5549
+ gn as EditingPlugin,
5550
+ fn as ExportPlugin,
5551
+ N as FilteringPlugin,
5552
+ Pn as FitModeEnum,
5553
+ Dn as GridCSSVars,
5554
+ Mn as GridClasses,
5555
+ Nn as GridDataAttrs,
5556
+ qn as GridElement,
5557
+ Hn as GridSelectors,
5558
+ pn as GroupingColumnsPlugin,
5559
+ mn as GroupingRowsPlugin,
5560
+ et as MasterDetailPlugin,
5561
+ wn as MultiSortPlugin,
5562
+ Ze as PLUGIN_QUERIES,
5563
+ bn as PinnedColumnsPlugin,
5564
+ vn as PinnedRowsPlugin,
5568
5565
  G as PivotPlugin,
5569
- Kn as PluginEvents,
5570
- On as PluginManager,
5571
- xn as PrintPlugin,
5572
- Bi as ROW_DRAG_HANDLE_FIELD,
5573
- Gn as RenderPhase,
5574
- Cn as ReorderPlugin,
5575
- En as ResponsivePlugin,
5576
- Rn as RowReorderPlugin,
5577
- Sn as SelectionPlugin,
5578
- kn as ServerSidePlugin,
5579
- An as TreePlugin,
5580
- _n as UndoRedoPlugin,
5566
+ zn as PluginEvents,
5567
+ Kn as PluginManager,
5568
+ yn as PrintPlugin,
5569
+ Gi as ROW_DRAG_HANDLE_FIELD,
5570
+ On as RenderPhase,
5571
+ xn as ReorderPlugin,
5572
+ Cn as ResponsivePlugin,
5573
+ En as RowReorderPlugin,
5574
+ Rn as SelectionPlugin,
5575
+ Sn as ServerSidePlugin,
5576
+ kn as TreePlugin,
5577
+ An as UndoRedoPlugin,
5581
5578
  B as VisibilityPlugin,
5582
- Bn as builtInSort,
5583
- Vn as createGrid,
5584
- Wn as defaultComparator,
5585
- Tt as defaultEditorFor,
5586
- wt as defaultPasteHandler,
5587
- Ni as printGridIsolated,
5588
- $n as queryGrid
5579
+ Gn as builtInSort,
5580
+ Bn as createGrid,
5581
+ Vn as defaultComparator,
5582
+ _t as defaultEditorFor,
5583
+ mt as defaultPasteHandler,
5584
+ Mi as printGridIsolated,
5585
+ Wn as queryGrid
5589
5586
  };
5590
5587
  //# sourceMappingURL=all.js.map