@smallwebco/tinypivot-vue 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +1,35 @@
1
- import { ref as M, computed as T, watch as ze, defineComponent as Qe, onMounted as xt, nextTick as Ue, onUnmounted as Tt, createElementBlock as u, openBlock as r, createElementVNode as e, toDisplayString as R, normalizeClass as q, withDirectives as it, createCommentVNode as z, vModelText as rt, createTextVNode as I, Fragment as W, renderList as J, withModifiers as Ke, unref as S, normalizeStyle as ve, createVNode as Ye, createBlock as io, Transition as ro, withCtx as uo, withKeys as vo, Teleport as co } from "vue";
1
+ import { ref as M, computed as T, watch as Ae, defineComponent as Qe, onMounted as xt, nextTick as Ue, onUnmounted as Tt, createElementBlock as u, openBlock as r, createElementVNode as e, toDisplayString as R, normalizeClass as q, withDirectives as it, createCommentVNode as A, vModelText as rt, createTextVNode as I, Fragment as W, renderList as J, withModifiers as Ke, unref as S, normalizeStyle as ve, createVNode as Ye, createBlock as io, Transition as ro, withCtx as uo, withKeys as vo, Teleport as co } from "vue";
2
2
  import { useVueTable as go, getFilteredRowModel as po, getSortedRowModel as fo, getCoreRowModel as mo } from "@tanstack/vue-table";
3
3
  function ho(t) {
4
- const i = t.filter((c) => c != null && c !== "");
5
- if (i.length === 0)
4
+ const a = t.filter((c) => c != null && c !== "");
5
+ if (a.length === 0)
6
6
  return "string";
7
- const n = i.slice(0, 100);
7
+ const n = a.slice(0, 100);
8
8
  let l = 0, v = 0, m = 0;
9
9
  for (const c of n)
10
10
  typeof c == "boolean" ? m++ : typeof c == "number" || !Number.isNaN(Number(c)) && c !== "" ? l++ : (c instanceof Date || !Number.isNaN(Date.parse(String(c)))) && v++;
11
11
  const y = n.length * 0.8;
12
12
  return m >= y ? "boolean" : l >= y ? "number" : v >= y ? "date" : "string";
13
13
  }
14
- function wo(t, i) {
15
- const l = t.map((c) => c[i]).filter((c) => c != null && c !== "").slice(0, 100);
14
+ function wo(t, a) {
15
+ const l = t.map((c) => c[a]).filter((c) => c != null && c !== "").slice(0, 100);
16
16
  let v = 0;
17
17
  const m = /* @__PURE__ */ new Set();
18
18
  for (const c of l)
19
19
  m.add(String(c)), (typeof c == "number" || !Number.isNaN(Number(c)) && c !== "") && v++;
20
20
  const y = v >= l.length * 0.8;
21
21
  return {
22
- field: i,
22
+ field: a,
23
23
  type: y ? "number" : "string",
24
24
  uniqueCount: m.size,
25
25
  isNumeric: y
26
26
  };
27
27
  }
28
- function ko(t, i, n = 500) {
28
+ function ko(t, a, n = 500) {
29
29
  const l = [];
30
30
  let v = 0;
31
31
  for (const c of t) {
32
- const b = c[i];
32
+ const b = c[a];
33
33
  b == null || b === "" ? v++ : l.push(b);
34
34
  }
35
35
  const m = /* @__PURE__ */ new Set();
@@ -38,18 +38,18 @@ function ko(t, i, n = 500) {
38
38
  break;
39
39
  return {
40
40
  uniqueValues: Array.from(m).sort((c, b) => {
41
- const C = Number.parseFloat(c), V = Number.parseFloat(b);
42
- return !Number.isNaN(C) && !Number.isNaN(V) ? C - V : c.localeCompare(b);
41
+ const C = Number.parseFloat(c), D = Number.parseFloat(b);
42
+ return !Number.isNaN(C) && !Number.isNaN(D) ? C - D : c.localeCompare(b);
43
43
  }),
44
44
  totalCount: t.length,
45
45
  nullCount: v,
46
46
  type: ho(l)
47
47
  };
48
48
  }
49
- function Co(t, i) {
49
+ function Co(t, a) {
50
50
  if (t == null || t === "")
51
51
  return "";
52
- switch (i) {
52
+ switch (a) {
53
53
  case "number": {
54
54
  const n = typeof t == "number" ? t : Number.parseFloat(String(t));
55
55
  return Number.isNaN(n) ? String(t) : Math.abs(n) >= 1e3 ? n.toLocaleString("en-US", { maximumFractionDigits: 2 }) : n.toLocaleString("en-US", { maximumFractionDigits: 4 });
@@ -68,16 +68,16 @@ function Co(t, i) {
68
68
  return String(t);
69
69
  }
70
70
  }
71
- function Ft(t, i) {
72
- return i.map((n) => String(t[n] ?? "(blank)")).join("|||");
71
+ function Ft(t, a) {
72
+ return a.map((n) => String(t[n] ?? "(blank)")).join("|||");
73
73
  }
74
74
  function St(t) {
75
75
  return t.split("|||");
76
76
  }
77
- function Ze(t, i) {
77
+ function Ze(t, a) {
78
78
  if (t.length === 0)
79
79
  return null;
80
- switch (i) {
80
+ switch (a) {
81
81
  case "sum":
82
82
  return t.reduce((n, l) => n + l, 0);
83
83
  case "count":
@@ -94,8 +94,8 @@ function Ze(t, i) {
94
94
  return t.reduce((n, l) => n + l, 0);
95
95
  }
96
96
  }
97
- function Je(t, i) {
98
- return t === null ? "-" : i === "count" || i === "countDistinct" ? Math.round(t).toLocaleString() : Math.abs(t) >= 1e3 ? t.toLocaleString("en-US", { maximumFractionDigits: 2 }) : t.toLocaleString("en-US", { maximumFractionDigits: 4 });
97
+ function Je(t, a) {
98
+ return t === null ? "-" : a === "count" || a === "countDistinct" ? Math.round(t).toLocaleString() : Math.abs(t) >= 1e3 ? t.toLocaleString("en-US", { maximumFractionDigits: 2 }) : t.toLocaleString("en-US", { maximumFractionDigits: 4 });
99
99
  }
100
100
  function Rt(t) {
101
101
  return {
@@ -110,20 +110,20 @@ function Rt(t) {
110
110
  function yo(t) {
111
111
  return t.length === 0 ? [] : Object.keys(t[0]).map((n) => wo(t, n));
112
112
  }
113
- function bo(t, i, n, l) {
113
+ function bo(t, a, n, l) {
114
114
  const v = /* @__PURE__ */ new Set([
115
- ...i,
115
+ ...a,
116
116
  ...n,
117
117
  ...l.map((m) => m.field)
118
118
  ]);
119
119
  return t.filter((m) => !v.has(m.field));
120
120
  }
121
- function Vt(t) {
121
+ function Dt(t) {
122
122
  return (t.rowFields.length > 0 || t.columnFields.length > 0) && t.valueFields.length > 0;
123
123
  }
124
- function Fo(t, i) {
125
- const { rowFields: n, columnFields: l, valueFields: v, showRowTotals: m, showColumnTotals: y } = i;
126
- if (!Vt(i) || t.length === 0)
124
+ function Fo(t, a) {
125
+ const { rowFields: n, columnFields: l, valueFields: v, showRowTotals: m, showColumnTotals: y } = a;
126
+ if (!Dt(a) || t.length === 0)
127
127
  return null;
128
128
  const c = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map();
129
129
  for (const f of t) {
@@ -140,7 +140,7 @@ function Fo(t, i) {
140
140
  }
141
141
  }
142
142
  }
143
- const V = Array.from(c).sort(), $ = Array.from(b).sort(), U = [];
143
+ const D = Array.from(c).sort(), $ = Array.from(b).sort(), U = [];
144
144
  if (l.length > 0)
145
145
  for (let f = 0; f < l.length; f++) {
146
146
  const s = [];
@@ -157,8 +157,8 @@ function Fo(t, i) {
157
157
  f.push(`${d.label || d.field} (${Rt(d.aggregation)})`);
158
158
  $.length === 1 && $[0] === "__all__" ? U.push(v.map((s) => `${s.label || s.field} (${Rt(s.aggregation)})`)) : U.push(f);
159
159
  }
160
- const D = V.map((f) => f === "__all__" ? ["Total"] : St(f)), H = [], O = [], _ = /* @__PURE__ */ new Map();
161
- for (const f of V) {
160
+ const V = D.map((f) => f === "__all__" ? ["Total"] : St(f)), H = [], O = [], _ = /* @__PURE__ */ new Map();
161
+ for (const f of D) {
162
162
  const s = [], d = v.map(() => []);
163
163
  let F = 0;
164
164
  for (const g of $) {
@@ -186,10 +186,10 @@ function Fo(t, i) {
186
186
  }
187
187
  }
188
188
  const X = [];
189
- if (y && V.length > 1)
189
+ if (y && D.length > 1)
190
190
  for (let f = 0; f < $.length * v.length; f++) {
191
191
  const s = f % v.length, d = v[s], F = [];
192
- for (const w of V) {
192
+ for (const w of D) {
193
193
  const x = C.get(w), L = $[Math.floor(f / v.length)], ee = (x == null ? void 0 : x.get(L)) || v.map(() => []);
194
194
  F.push(...ee[s]);
195
195
  }
@@ -215,7 +215,7 @@ function Fo(t, i) {
215
215
  }
216
216
  return {
217
217
  headers: U,
218
- rowHeaders: D,
218
+ rowHeaders: V,
219
219
  data: H,
220
220
  rowTotals: O,
221
221
  columnTotals: X,
@@ -227,30 +227,30 @@ function Ro(t) {
227
227
  const n = [...t].sort().join("|").substring(0, 100);
228
228
  return `${So}${n}`;
229
229
  }
230
- function $o(t, i) {
230
+ function $o(t, a) {
231
231
  try {
232
- sessionStorage.setItem(t, JSON.stringify(i));
232
+ sessionStorage.setItem(t, JSON.stringify(a));
233
233
  } catch {
234
234
  }
235
235
  }
236
236
  function Mo(t) {
237
237
  try {
238
- const i = sessionStorage.getItem(t);
239
- if (i)
240
- return JSON.parse(i);
238
+ const a = sessionStorage.getItem(t);
239
+ if (a)
240
+ return JSON.parse(a);
241
241
  } catch {
242
242
  }
243
243
  return null;
244
244
  }
245
- function lt(t, i) {
246
- const n = new Set(i);
245
+ function lt(t, a) {
246
+ const n = new Set(a);
247
247
  return [
248
248
  ...t.rowFields,
249
249
  ...t.columnFields,
250
250
  ...t.valueFields.map((v) => v.field)
251
251
  ].every((v) => n.has(v));
252
252
  }
253
- const Dt = {
253
+ const Vt = {
254
254
  type: "free",
255
255
  isValid: !0,
256
256
  features: {
@@ -282,90 +282,99 @@ const Dt = {
282
282
  // Still show watermark in demo
283
283
  }
284
284
  };
285
- async function To(t, i, n) {
285
+ async function To(t, a, n) {
286
286
  const l = globalThis.__TP_LICENSE_SECRET__;
287
287
  if (!l)
288
288
  return console.warn("[TinyPivot] License secret not configured. Call configureLicenseSecret() first."), !1;
289
289
  const v = `TP-${t}-${n}`;
290
290
  try {
291
291
  const m = new TextEncoder(), y = m.encode(l), c = m.encode(v), b = await crypto.subtle.importKey("raw", y, { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]), C = await crypto.subtle.sign("HMAC", b, c), $ = Array.from(new Uint8Array(C)).map((U) => U.toString(16).padStart(2, "0")).join("").slice(0, 12).toUpperCase();
292
- return i === $;
292
+ return a === $;
293
293
  } catch {
294
294
  return !1;
295
295
  }
296
296
  }
297
- async function Vo(t) {
297
+ async function Do(t) {
298
298
  if (!t || t === "")
299
- return Dt;
300
- const i = t.split("-");
301
- if (i.length !== 4 || i[0] !== "TP")
299
+ return Vt;
300
+ const a = t.split("-");
301
+ if (a.length !== 4 || a[0] !== "TP")
302
302
  return st;
303
- const n = i[1], l = i[2], v = i[3];
303
+ const n = a[1], l = a[2], v = a[3];
304
304
  if (!await To(n, l, v))
305
305
  return st;
306
306
  const y = Number.parseInt(v.slice(0, 4)), c = Number.parseInt(v.slice(4, 6)) - 1, b = Number.parseInt(v.slice(6, 8)), C = new Date(y, c, b);
307
307
  if (C < /* @__PURE__ */ new Date())
308
308
  return { ...st, expiresAt: C };
309
- let V = "free";
310
- return n === "PRO1" ? V = "pro-single" : n === "PROU" ? V = "pro-unlimited" : n === "PROT" && (V = "pro-team"), {
311
- type: V,
309
+ let D = "free";
310
+ return n === "PRO1" ? D = "pro-single" : n === "PROU" ? D = "pro-unlimited" : n === "PROT" && (D = "pro-team"), {
311
+ type: D,
312
312
  isValid: !0,
313
313
  expiresAt: C,
314
314
  features: {
315
- pivot: V !== "free",
316
- advancedAggregations: V !== "free",
317
- percentageMode: V !== "free",
318
- sessionPersistence: V !== "free",
319
- noWatermark: V !== "free"
315
+ pivot: D !== "free",
316
+ advancedAggregations: D !== "free",
317
+ percentageMode: D !== "free",
318
+ sessionPersistence: D !== "free",
319
+ noWatermark: D !== "free"
320
320
  }
321
321
  };
322
322
  }
323
- function Do(t) {
323
+ function Vo(t) {
324
324
  globalThis.__TP_LICENSE_SECRET__ = t;
325
325
  }
326
- function zo() {
327
- return xo;
326
+ const Ao = "A48AA0618518D3E62F31FCFCA2DD2B86E7FE0863E2F90756FB0A960AE7A51583";
327
+ async function zo(t) {
328
+ try {
329
+ const n = new TextEncoder().encode(t), l = await crypto.subtle.digest("SHA-256", n);
330
+ return Array.from(new Uint8Array(l)).map((m) => m.toString(16).padStart(2, "0")).join("").toUpperCase();
331
+ } catch {
332
+ return "";
333
+ }
334
+ }
335
+ async function Lo(t) {
336
+ return !t || await zo(t) !== Ao ? null : xo;
328
337
  }
329
- function Ao() {
330
- return Dt;
338
+ function Po() {
339
+ return Vt;
331
340
  }
332
- function Lo(t) {
341
+ function Eo(t) {
333
342
  return t.features.pivot;
334
343
  }
335
- function Po(t) {
344
+ function No(t) {
336
345
  return t.isValid && t.type !== "free";
337
346
  }
338
- function Eo(t, i) {
339
- return i || !t.features.noWatermark;
347
+ function Bo(t, a) {
348
+ return a || !t.features.noWatermark;
340
349
  }
341
- function No(t) {
350
+ function jo(t) {
342
351
  console.warn(`[TinyPivot] "${t}" requires a Pro license. Visit https://tiny-pivot.com/#pricing to upgrade.`);
343
352
  }
344
- function le(t, i = ",") {
353
+ function le(t, a = ",") {
345
354
  if (t == null)
346
355
  return "";
347
356
  const n = String(t);
348
- return n.includes(i) || n.includes('"') || n.includes(`
357
+ return n.includes(a) || n.includes('"') || n.includes(`
349
358
  `) ? `"${n.replace(/"/g, '""')}"` : n;
350
359
  }
351
- function Bo(t, i, n = {}) {
360
+ function Ho(t, a, n = {}) {
352
361
  const { filename: l = "export.csv", includeHeaders: v = !0, delimiter: m = "," } = n, y = [];
353
- v && y.push(i.map((b) => le(b, m)).join(m));
362
+ v && y.push(a.map((b) => le(b, m)).join(m));
354
363
  for (const b of t) {
355
- const C = i.map((V) => le(b[V], m));
364
+ const C = a.map((D) => le(b[D], m));
356
365
  y.push(C.join(m));
357
366
  }
358
367
  const c = y.join(`
359
368
  `);
360
- zt(c, l, "text/csv;charset=utf-8;");
369
+ At(c, l, "text/csv;charset=utf-8;");
361
370
  }
362
- function jo(t, i, n, l, v = {}) {
363
- const { filename: m = "pivot-export.csv", delimiter: y = "," } = v, c = [], { headers: b, rowHeaders: C, data: V, rowTotals: $, columnTotals: U, grandTotal: D, showRowTotals: H, showColumnTotals: O } = t, _ = i.length || 1;
371
+ function Uo(t, a, n, l, v = {}) {
372
+ const { filename: m = "pivot-export.csv", delimiter: y = "," } = v, c = [], { headers: b, rowHeaders: C, data: D, rowTotals: $, columnTotals: U, grandTotal: V, showRowTotals: H, showColumnTotals: O } = t, _ = a.length || 1;
364
373
  if (b.length > 0)
365
374
  for (let B = 0; B < b.length; B++) {
366
375
  const f = [];
367
376
  for (let s = 0; s < _; s++)
368
- f.push(B === b.length - 1 ? le(i[s] || "", y) : "");
377
+ f.push(B === b.length - 1 ? le(a[s] || "", y) : "");
369
378
  for (const s of b[B])
370
379
  f.push(le(s, y));
371
380
  if (H && $ && $.length > 0)
@@ -380,7 +389,7 @@ function jo(t, i, n, l, v = {}) {
380
389
  else {
381
390
  const B = [];
382
391
  for (let f = 0; f < _; f++)
383
- B.push(le(i[f] || "", y));
392
+ B.push(le(a[f] || "", y));
384
393
  for (const f of l)
385
394
  B.push(le(`${f.field} (${f.aggregation})`, y));
386
395
  H && $ && $.length > 0 && B.push(le("Total", y)), c.push(B.join(y));
@@ -389,7 +398,7 @@ function jo(t, i, n, l, v = {}) {
389
398
  const f = [], s = C[B] || [];
390
399
  for (let F = 0; F < _; F++)
391
400
  f.push(le(s[F] || "", y));
392
- const d = V[B] || [];
401
+ const d = D[B] || [];
393
402
  for (const F of d)
394
403
  f.push(le((F == null ? void 0 : F.formattedValue) || "", y));
395
404
  H && $ && $[B] && f.push(le($[B].formattedValue || "", y)), c.push(f.join(y));
@@ -401,55 +410,55 @@ function jo(t, i, n, l, v = {}) {
401
410
  B.push("");
402
411
  for (const f of U)
403
412
  B.push(le((f == null ? void 0 : f.formattedValue) || "", y));
404
- H && D && B.push(le(D.formattedValue || "", y)), c.push(B.join(y));
413
+ H && V && B.push(le(V.formattedValue || "", y)), c.push(B.join(y));
405
414
  }
406
415
  const X = c.join(`
407
416
  `);
408
- zt(X, m, "text/csv;charset=utf-8;");
417
+ At(X, m, "text/csv;charset=utf-8;");
409
418
  }
410
- function zt(t, i, n) {
419
+ function At(t, a, n) {
411
420
  const l = new Blob([t], { type: n }), v = URL.createObjectURL(l), m = document.createElement("a");
412
- m.href = v, m.download = i, m.style.display = "none", document.body.appendChild(m), m.click(), document.body.removeChild(m), URL.revokeObjectURL(v);
421
+ m.href = v, m.download = a, m.style.display = "none", document.body.appendChild(m), m.click(), document.body.removeChild(m), URL.revokeObjectURL(v);
413
422
  }
414
- function Ho(t, i, n) {
415
- navigator.clipboard.writeText(t).then(i).catch(n);
423
+ function Ko(t, a, n) {
424
+ navigator.clipboard.writeText(t).then(a).catch(n);
416
425
  }
417
- function Uo(t, i, n) {
426
+ function Wo(t, a, n) {
418
427
  const { minRow: l, maxRow: v, minCol: m, maxCol: y } = n, c = [];
419
428
  for (let b = l; b <= v; b++) {
420
429
  const C = t[b];
421
430
  if (!C)
422
431
  continue;
423
- const V = [];
432
+ const D = [];
424
433
  for (let $ = m; $ <= y; $++) {
425
- const U = i[$];
434
+ const U = a[$];
426
435
  if (!U)
427
436
  continue;
428
- const D = C[U];
429
- V.push(D == null ? "" : String(D));
437
+ const V = C[U];
438
+ D.push(V == null ? "" : String(V));
430
439
  }
431
- c.push(V.join(" "));
440
+ c.push(D.join(" "));
432
441
  }
433
442
  return c.join(`
434
443
  `);
435
444
  }
436
- const $t = (t, i, n) => {
445
+ const $t = (t, a, n) => {
437
446
  if (!n || !Array.isArray(n) || n.length === 0)
438
447
  return !0;
439
- const l = t.getValue(i), v = l == null || l === "" ? "(blank)" : String(l);
448
+ const l = t.getValue(a), v = l == null || l === "" ? "(blank)" : String(l);
440
449
  return n.includes(v);
441
450
  };
442
- function Ko(t) {
443
- const { data: i, enableSorting: n = !0, enableFiltering: l = !0 } = t, v = M([]), m = M([]), y = M({}), c = M(""), b = M({}), C = T(() => i.value.length === 0 ? [] : Object.keys(i.value[0]));
444
- function V(g) {
445
- const w = `${g}-${i.value.length}`;
446
- return b.value[w] || (b.value[w] = ko(i.value, g)), b.value[w];
451
+ function _o(t) {
452
+ const { data: a, enableSorting: n = !0, enableFiltering: l = !0 } = t, v = M([]), m = M([]), y = M({}), c = M(""), b = M({}), C = T(() => a.value.length === 0 ? [] : Object.keys(a.value[0]));
453
+ function D(g) {
454
+ const w = `${g}-${a.value.length}`;
455
+ return b.value[w] || (b.value[w] = ko(a.value, g)), b.value[w];
447
456
  }
448
457
  function $() {
449
458
  b.value = {};
450
459
  }
451
460
  const U = T(() => C.value.map((g) => {
452
- const w = V(g);
461
+ const w = D(g);
453
462
  return {
454
463
  id: g,
455
464
  accessorKey: g,
@@ -462,9 +471,9 @@ function Ko(t) {
462
471
  uniqueCount: w.uniqueValues.length
463
472
  }
464
473
  };
465
- })), D = go({
474
+ })), V = go({
466
475
  get data() {
467
- return i.value;
476
+ return a.value;
468
477
  },
469
478
  get columns() {
470
479
  return U.value;
@@ -497,25 +506,25 @@ function Ko(t) {
497
506
  },
498
507
  enableSorting: n,
499
508
  enableFilters: l
500
- }), H = T(() => D.getFilteredRowModel().rows.length), O = T(() => i.value.length), _ = T(() => m.value.map((g) => ({
509
+ }), H = T(() => V.getFilteredRowModel().rows.length), O = T(() => a.value.length), _ = T(() => m.value.map((g) => ({
501
510
  column: g.id,
502
511
  values: g.value
503
512
  })));
504
513
  function X(g) {
505
- const w = D.getColumn(g);
514
+ const w = V.getColumn(g);
506
515
  if (!w) return !1;
507
516
  const x = w.getFilterValue();
508
517
  return x !== void 0 && Array.isArray(x) && x.length > 0;
509
518
  }
510
519
  function B(g, w) {
511
- const x = D.getColumn(g);
512
- x && (x.setFilterValue(w.length === 0 ? void 0 : w), m.value = D.getState().columnFilters);
520
+ const x = V.getColumn(g);
521
+ x && (x.setFilterValue(w.length === 0 ? void 0 : w), m.value = V.getState().columnFilters);
513
522
  }
514
523
  function f() {
515
- D.resetColumnFilters(), c.value = "", m.value = [];
524
+ V.resetColumnFilters(), c.value = "", m.value = [];
516
525
  }
517
526
  function s(g) {
518
- const w = D.getColumn(g);
527
+ const w = V.getColumn(g);
519
528
  if (!w) return [];
520
529
  const x = w.getFilterValue();
521
530
  return Array.isArray(x) ? x : [];
@@ -528,11 +537,11 @@ function Ko(t) {
528
537
  const w = v.value.find((x) => x.id === g);
529
538
  return w ? w.desc ? "desc" : "asc" : null;
530
539
  }
531
- return ze(i, () => {
540
+ return Ae(a, () => {
532
541
  $();
533
542
  }), {
534
543
  // Table instance
535
- table: D,
544
+ table: V,
536
545
  // State
537
546
  sorting: v,
538
547
  columnFilters: m,
@@ -544,7 +553,7 @@ function Ko(t) {
544
553
  totalRowCount: O,
545
554
  activeFilters: _,
546
555
  // Methods
547
- getColumnStats: V,
556
+ getColumnStats: D,
548
557
  clearStatsCache: $,
549
558
  hasActiveFilter: X,
550
559
  setColumnFilter: B,
@@ -554,30 +563,31 @@ function Ko(t) {
554
563
  getSortDirection: F
555
564
  };
556
565
  }
557
- const Wo = M(null), $e = M(!1), ce = M(Ao());
566
+ const qo = M(null), $e = M(!1), ce = M(Po());
558
567
  let at = null;
559
- async function As(t) {
560
- Wo.value = t, at = Vo(t), ce.value = await at, at = null, ce.value.isValid ? ce.value.type !== "free" && console.info(`[TinyPivot] Pro license activated (${ce.value.type})`) : console.warn("[TinyPivot] Invalid or expired license key. Running in free mode.");
568
+ async function Ps(t) {
569
+ qo.value = t, at = Do(t), ce.value = await at, at = null, ce.value.isValid ? ce.value.type !== "free" && console.info(`[TinyPivot] Pro license activated (${ce.value.type})`) : console.warn("[TinyPivot] Invalid or expired license key. Running in free mode.");
561
570
  }
562
- function Ls() {
563
- $e.value = !0, ce.value = zo(), console.info("[TinyPivot] Demo mode enabled - all Pro features unlocked for evaluation");
571
+ async function Es(t) {
572
+ const a = await Lo(t);
573
+ return a ? ($e.value = !0, ce.value = a, console.info("[TinyPivot] Demo mode enabled - all Pro features unlocked for evaluation"), !0) : (console.warn("[TinyPivot] Demo mode activation failed - invalid secret"), !1);
564
574
  }
565
- function Ps(t) {
566
- Do(t);
575
+ function Ns(t) {
576
+ Vo(t);
567
577
  }
568
578
  function Ie() {
569
- const t = T(() => $e.value), i = T(() => $e.value || Po(ce.value)), n = T(() => $e.value || Lo(ce.value)), l = T(
579
+ const t = T(() => $e.value), a = T(() => $e.value || No(ce.value)), n = T(() => $e.value || Eo(ce.value)), l = T(
570
580
  () => $e.value || ce.value.features.advancedAggregations
571
581
  ), v = T(
572
582
  () => $e.value || ce.value.features.percentageMode
573
- ), m = T(() => Eo(ce.value, $e.value));
583
+ ), m = T(() => Bo(ce.value, $e.value));
574
584
  function y(c) {
575
- return i.value ? !0 : (No(c), !1);
585
+ return a.value ? !0 : (jo(c), !1);
576
586
  }
577
587
  return {
578
588
  licenseInfo: T(() => ce.value),
579
589
  isDemo: t,
580
- isPro: i,
590
+ isPro: a,
581
591
  canUsePivot: n,
582
592
  canUseAdvancedAggregations: l,
583
593
  canUsePercentageMode: v,
@@ -585,26 +595,26 @@ function Ie() {
585
595
  requirePro: y
586
596
  };
587
597
  }
588
- function _o(t) {
589
- const { canUsePivot: i, requirePro: n } = Ie(), l = M([]), v = M([]), m = M([]), y = M(!0), c = M(!0), b = M(null), C = T(() => yo(t.value)), V = T(() => bo(
598
+ function Oo(t) {
599
+ const { canUsePivot: a, requirePro: n } = Ie(), l = M([]), v = M([]), m = M([]), y = M(!0), c = M(!0), b = M(null), C = T(() => yo(t.value)), D = T(() => bo(
590
600
  C.value,
591
601
  l.value,
592
602
  v.value,
593
603
  m.value
594
- )), $ = T(() => Vt({
604
+ )), $ = T(() => Dt({
595
605
  rowFields: l.value,
596
606
  columnFields: v.value,
597
607
  valueFields: m.value,
598
608
  showRowTotals: y.value,
599
609
  showColumnTotals: c.value
600
- })), U = T(() => !$.value || !i.value ? null : Fo(t.value, {
610
+ })), U = T(() => !$.value || !a.value ? null : Fo(t.value, {
601
611
  rowFields: l.value,
602
612
  columnFields: v.value,
603
613
  valueFields: m.value,
604
614
  showRowTotals: y.value,
605
615
  showColumnTotals: c.value
606
616
  }));
607
- function D(g) {
617
+ function V(g) {
608
618
  n("Pivot Table - Row Fields") && (l.value.includes(g) || (l.value = [...l.value, g]));
609
619
  }
610
620
  function H(g) {
@@ -646,7 +656,7 @@ function _o(t) {
646
656
  const g = C.value.filter((x) => !x.isNumeric && x.uniqueCount < 50), w = C.value.filter((x) => x.isNumeric);
647
657
  g.length > 0 && w.length > 0 && (l.value = [g[0].field], m.value = [{ field: w[0].field, aggregation: "sum" }]);
648
658
  }
649
- return ze(
659
+ return Ae(
650
660
  t,
651
661
  (g) => {
652
662
  if (g.length === 0) return;
@@ -678,7 +688,7 @@ function _o(t) {
678
688
  }
679
689
  },
680
690
  { immediate: !0 }
681
- ), ze(
691
+ ), Ae(
682
692
  [l, v, m, y, c],
683
693
  () => {
684
694
  if (!b.value) return;
@@ -701,11 +711,11 @@ function _o(t) {
701
711
  showColumnTotals: c,
702
712
  // Computed
703
713
  availableFields: C,
704
- unassignedFields: V,
714
+ unassignedFields: D,
705
715
  isConfigured: $,
706
716
  pivotResult: U,
707
717
  // Actions
708
- addRowField: D,
718
+ addRowField: V,
709
719
  removeRowField: H,
710
720
  addColumnField: O,
711
721
  removeColumnField: _,
@@ -717,20 +727,20 @@ function _o(t) {
717
727
  autoSuggestConfig: F
718
728
  };
719
729
  }
720
- function qo(t, i, n) {
721
- Bo(t, i, n);
730
+ function Go(t, a, n) {
731
+ Ho(t, a, n);
722
732
  }
723
- function Oo(t, i, n, l, v) {
724
- jo(t, i, n, l, v);
733
+ function Xo(t, a, n, l, v) {
734
+ Uo(t, a, n, l, v);
725
735
  }
726
- function Go(t, i, n) {
727
- Ho(t, i, n);
736
+ function Yo(t, a, n) {
737
+ Ko(t, a, n);
728
738
  }
729
- function Xo(t, i, n) {
730
- return Uo(t, i, n);
739
+ function Zo(t, a, n) {
740
+ return Wo(t, a, n);
731
741
  }
732
- function Es(t, i = {}) {
733
- const n = M(i.pageSize ?? 50), l = M(i.currentPage ?? 1), v = T(
742
+ function Bs(t, a = {}) {
743
+ const n = M(a.pageSize ?? 50), l = M(a.currentPage ?? 1), v = T(
734
744
  () => Math.max(1, Math.ceil(t.value.length / n.value))
735
745
  ), m = T(() => {
736
746
  const H = (l.value - 1) * n.value, O = H + n.value;
@@ -744,7 +754,7 @@ function Es(t, i = {}) {
744
754
  function C() {
745
755
  l.value < v.value && l.value++;
746
756
  }
747
- function V() {
757
+ function D() {
748
758
  l.value > 1 && l.value--;
749
759
  }
750
760
  function $() {
@@ -753,7 +763,7 @@ function Es(t, i = {}) {
753
763
  function U() {
754
764
  l.value = v.value;
755
765
  }
756
- function D(H) {
766
+ function V(H) {
757
767
  n.value = H, l.value = 1;
758
768
  }
759
769
  return {
@@ -765,19 +775,19 @@ function Es(t, i = {}) {
765
775
  endIndex: c,
766
776
  goToPage: b,
767
777
  nextPage: C,
768
- prevPage: V,
778
+ prevPage: D,
769
779
  firstPage: $,
770
780
  lastPage: U,
771
- setPageSize: D
781
+ setPageSize: V
772
782
  };
773
783
  }
774
- function Ns(t, i) {
784
+ function js(t, a) {
775
785
  const n = M(""), l = M(!1), v = T(() => {
776
786
  if (!n.value.trim())
777
787
  return t.value;
778
788
  const y = l.value ? n.value.trim() : n.value.trim().toLowerCase();
779
789
  return t.value.filter((c) => {
780
- for (const b of i.value) {
790
+ for (const b of a.value) {
781
791
  const C = c[b];
782
792
  if (C == null) continue;
783
793
  if ((l.value ? String(C) : String(C).toLowerCase()).includes(y))
@@ -796,37 +806,37 @@ function Ns(t, i) {
796
806
  clearSearch: m
797
807
  };
798
808
  }
799
- function Bs(t) {
800
- const i = M(/* @__PURE__ */ new Set()), n = T(() => Array.from(i.value).sort((D, H) => D - H).map((D) => t.value[D]).filter(Boolean)), l = T(() => t.value.length > 0 && i.value.size === t.value.length), v = T(() => i.value.size > 0 && i.value.size < t.value.length);
801
- function m(D) {
802
- i.value.has(D) ? i.value.delete(D) : i.value.add(D), i.value = new Set(i.value);
809
+ function Hs(t) {
810
+ const a = M(/* @__PURE__ */ new Set()), n = T(() => Array.from(a.value).sort((V, H) => V - H).map((V) => t.value[V]).filter(Boolean)), l = T(() => t.value.length > 0 && a.value.size === t.value.length), v = T(() => a.value.size > 0 && a.value.size < t.value.length);
811
+ function m(V) {
812
+ a.value.has(V) ? a.value.delete(V) : a.value.add(V), a.value = new Set(a.value);
803
813
  }
804
- function y(D) {
805
- i.value.add(D), i.value = new Set(i.value);
814
+ function y(V) {
815
+ a.value.add(V), a.value = new Set(a.value);
806
816
  }
807
- function c(D) {
808
- i.value.delete(D), i.value = new Set(i.value);
817
+ function c(V) {
818
+ a.value.delete(V), a.value = new Set(a.value);
809
819
  }
810
820
  function b() {
811
- i.value = new Set(t.value.map((D, H) => H));
821
+ a.value = new Set(t.value.map((V, H) => H));
812
822
  }
813
823
  function C() {
814
- i.value = /* @__PURE__ */ new Set();
824
+ a.value = /* @__PURE__ */ new Set();
815
825
  }
816
- function V() {
826
+ function D() {
817
827
  l.value ? C() : b();
818
828
  }
819
- function $(D) {
820
- return i.value.has(D);
829
+ function $(V) {
830
+ return a.value.has(V);
821
831
  }
822
- function U(D, H) {
823
- const O = Math.min(D, H), _ = Math.max(D, H);
832
+ function U(V, H) {
833
+ const O = Math.min(V, H), _ = Math.max(V, H);
824
834
  for (let X = O; X <= _; X++)
825
- i.value.add(X);
826
- i.value = new Set(i.value);
835
+ a.value.add(X);
836
+ a.value = new Set(a.value);
827
837
  }
828
838
  return {
829
- selectedRowIndices: i,
839
+ selectedRowIndices: a,
830
840
  selectedRows: n,
831
841
  allSelected: l,
832
842
  someSelected: v,
@@ -835,25 +845,25 @@ function Bs(t) {
835
845
  deselectRow: c,
836
846
  selectAll: b,
837
847
  deselectAll: C,
838
- toggleAll: V,
848
+ toggleAll: D,
839
849
  isSelected: $,
840
850
  selectRange: U
841
851
  };
842
852
  }
843
- function js(t, i = 60, n = 600) {
853
+ function Us(t, a = 60, n = 600) {
844
854
  const l = M({ ...t.value }), v = M(!1), m = M(null);
845
- function y(C, V) {
855
+ function y(C, D) {
846
856
  v.value = !0, m.value = C;
847
- const $ = V.clientX, U = l.value[C] || 150, D = (O) => {
848
- const _ = O.clientX - $, X = Math.max(i, Math.min(n, U + _));
857
+ const $ = D.clientX, U = l.value[C] || 150, V = (O) => {
858
+ const _ = O.clientX - $, X = Math.max(a, Math.min(n, U + _));
849
859
  l.value = {
850
860
  ...l.value,
851
861
  [C]: X
852
862
  };
853
863
  }, H = () => {
854
- v.value = !1, m.value = null, document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", H);
864
+ v.value = !1, m.value = null, document.removeEventListener("mousemove", V), document.removeEventListener("mouseup", H);
855
865
  };
856
- document.addEventListener("mousemove", D), document.addEventListener("mouseup", H);
866
+ document.addEventListener("mousemove", V), document.addEventListener("mouseup", H);
857
867
  }
858
868
  function c(C) {
859
869
  t.value[C] && (l.value = {
@@ -873,10 +883,10 @@ function js(t, i = 60, n = 600) {
873
883
  resetAllWidths: b
874
884
  };
875
885
  }
876
- const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, Jo = { class: "vpg-filter-count" }, Qo = { class: "vpg-sort-controls" }, Io = { class: "vpg-search-container" }, en = { class: "vpg-values-list" }, tn = ["checked", "onChange"], on = {
886
+ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, Io = { class: "vpg-filter-count" }, en = { class: "vpg-sort-controls" }, tn = { class: "vpg-search-container" }, on = { class: "vpg-values-list" }, nn = ["checked", "onChange"], ln = {
877
887
  key: 0,
878
888
  class: "vpg-no-results"
879
- }, nn = /* @__PURE__ */ Qe({
889
+ }, sn = /* @__PURE__ */ Qe({
880
890
  __name: "ColumnFilter",
881
891
  props: {
882
892
  columnId: {},
@@ -886,8 +896,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
886
896
  sortDirection: {}
887
897
  },
888
898
  emits: ["filter", "sort", "close"],
889
- setup(t, { emit: i }) {
890
- const n = t, l = i, v = M(""), m = M(), y = M();
899
+ setup(t, { emit: a }) {
900
+ const n = t, l = a, v = M(""), m = M(), y = M();
891
901
  T(() => {
892
902
  const s = [...n.stats.uniqueValues];
893
903
  return n.stats.nullCount > 0 && s.unshift("(blank)"), s;
@@ -898,20 +908,20 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
898
908
  return s;
899
909
  const d = v.value.toLowerCase();
900
910
  return s.filter((F) => F.toLowerCase().includes(d));
901
- }), V = T(() => {
911
+ }), D = T(() => {
902
912
  const s = [...C.value];
903
913
  return b.value && (!v.value || "(blank)".includes(v.value.toLowerCase())) && s.unshift("(blank)"), s;
904
914
  });
905
- T(() => V.value.every((s) => c.value.has(s))), T(() => c.value.size === 0);
915
+ T(() => D.value.every((s) => c.value.has(s))), T(() => c.value.size === 0);
906
916
  function $(s) {
907
917
  c.value.has(s) ? c.value.delete(s) : c.value.add(s), c.value = new Set(c.value);
908
918
  }
909
919
  function U() {
910
- for (const s of V.value)
920
+ for (const s of D.value)
911
921
  c.value.add(s);
912
922
  c.value = new Set(c.value);
913
923
  }
914
- function D() {
924
+ function V() {
915
925
  c.value.clear(), c.value = new Set(c.value);
916
926
  }
917
927
  function H() {
@@ -939,18 +949,18 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
939
949
  }), document.addEventListener("mousedown", B), document.addEventListener("keydown", f);
940
950
  }), Tt(() => {
941
951
  document.removeEventListener("mousedown", B), document.removeEventListener("keydown", f);
942
- }), ze(() => n.selectedValues, (s) => {
952
+ }), Ae(() => n.selectedValues, (s) => {
943
953
  c.value = new Set(s);
944
954
  }, { immediate: !0 }), (s, d) => (r(), u("div", {
945
955
  ref_key: "dropdownRef",
946
956
  ref: m,
947
957
  class: "vpg-filter-dropdown"
948
958
  }, [
949
- e("div", Yo, [
950
- e("span", Zo, R(t.columnName), 1),
951
- e("span", Jo, R(t.stats.uniqueValues.length.toLocaleString()) + " unique ", 1)
959
+ e("div", Jo, [
960
+ e("span", Qo, R(t.columnName), 1),
961
+ e("span", Io, R(t.stats.uniqueValues.length.toLocaleString()) + " unique ", 1)
952
962
  ]),
953
- e("div", Qo, [
963
+ e("div", en, [
954
964
  e("button", {
955
965
  class: q(["vpg-sort-btn", { active: t.sortDirection === "asc" }]),
956
966
  title: "Sort A to Z",
@@ -993,7 +1003,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
993
1003
  ])], 2)
994
1004
  ]),
995
1005
  d[7] || (d[7] = e("div", { class: "vpg-divider" }, null, -1)),
996
- e("div", Io, [
1006
+ e("div", tn, [
997
1007
  d[4] || (d[4] = e("svg", {
998
1008
  class: "vpg-search-icon",
999
1009
  fill: "none",
@@ -1021,7 +1031,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1021
1031
  key: 0,
1022
1032
  class: "vpg-clear-search",
1023
1033
  onClick: d[1] || (d[1] = (F) => v.value = "")
1024
- }, " × ")) : z("", !0)
1034
+ }, " × ")) : A("", !0)
1025
1035
  ]),
1026
1036
  e("div", { class: "vpg-bulk-actions" }, [
1027
1037
  e("button", {
@@ -1045,7 +1055,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1045
1055
  ])]),
1046
1056
  e("button", {
1047
1057
  class: "vpg-bulk-btn",
1048
- onClick: D
1058
+ onClick: V
1049
1059
  }, [...d[6] || (d[6] = [
1050
1060
  e("svg", {
1051
1061
  class: "vpg-icon-sm",
@@ -1063,8 +1073,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1063
1073
  I(" Clear All ", -1)
1064
1074
  ])])
1065
1075
  ]),
1066
- e("div", en, [
1067
- (r(!0), u(W, null, J(V.value, (F) => (r(), u("label", {
1076
+ e("div", on, [
1077
+ (r(!0), u(W, null, J(D.value, (F) => (r(), u("label", {
1068
1078
  key: F,
1069
1079
  class: q(["vpg-value-item", { selected: c.value.has(F) }])
1070
1080
  }, [
@@ -1073,12 +1083,12 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1073
1083
  checked: c.value.has(F),
1074
1084
  class: "vpg-value-checkbox",
1075
1085
  onChange: (g) => $(F)
1076
- }, null, 40, tn),
1086
+ }, null, 40, nn),
1077
1087
  e("span", {
1078
1088
  class: q(["vpg-value-text", { "vpg-blank": F === "(blank)" }])
1079
1089
  }, R(F), 3)
1080
1090
  ], 2))), 128)),
1081
- V.value.length === 0 ? (r(), u("div", on, " No matching values ")) : z("", !0)
1091
+ D.value.length === 0 ? (r(), u("div", ln, " No matching values ")) : A("", !0)
1082
1092
  ]),
1083
1093
  e("div", { class: "vpg-filter-footer" }, [
1084
1094
  e("button", {
@@ -1092,24 +1102,24 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1092
1102
  ])
1093
1103
  ], 512));
1094
1104
  }
1095
- }), et = (t, i) => {
1105
+ }), et = (t, a) => {
1096
1106
  const n = t.__vccOpts || t;
1097
- for (const [l, v] of i)
1107
+ for (const [l, v] of a)
1098
1108
  n[l] = v;
1099
1109
  return n;
1100
- }, ln = /* @__PURE__ */ et(nn, [["__scopeId", "data-v-0e340167"]]), sn = { class: "vpg-pivot-config" }, an = { class: "vpg-config-header" }, rn = { class: "vpg-header-actions" }, un = {
1110
+ }, an = /* @__PURE__ */ et(sn, [["__scopeId", "data-v-0e340167"]]), rn = { class: "vpg-pivot-config" }, un = { class: "vpg-config-header" }, vn = { class: "vpg-header-actions" }, cn = {
1101
1111
  key: 0,
1102
1112
  class: "vpg-assigned-section"
1103
- }, vn = { class: "vpg-assigned-list" }, cn = ["title", "onDragstart"], dn = { class: "vpg-item-main" }, gn = { class: "vpg-item-name" }, pn = { class: "vpg-item-actions" }, fn = ["title", "onClick"], mn = ["value", "onChange"], hn = ["value"], wn = ["onClick"], kn = { class: "vpg-unassigned-section" }, Cn = { class: "vpg-section-header" }, yn = { class: "vpg-section-label" }, bn = { class: "vpg-count" }, Fn = { class: "vpg-field-search" }, Sn = { class: "vpg-field-list" }, Rn = ["title", "onDragstart"], $n = ["title"], Mn = { class: "vpg-field-name" }, xn = { class: "vpg-unique-count" }, Tn = {
1113
+ }, dn = { class: "vpg-assigned-list" }, gn = ["title", "onDragstart"], pn = { class: "vpg-item-main" }, fn = { class: "vpg-item-name" }, mn = { class: "vpg-item-actions" }, hn = ["title", "onClick"], wn = ["value", "onChange"], kn = ["value"], Cn = ["onClick"], yn = { class: "vpg-unassigned-section" }, bn = { class: "vpg-section-header" }, Fn = { class: "vpg-section-label" }, Sn = { class: "vpg-count" }, Rn = { class: "vpg-field-search" }, $n = { class: "vpg-field-list" }, Mn = ["title", "onDragstart"], xn = ["title"], Tn = { class: "vpg-field-name" }, Dn = { class: "vpg-unique-count" }, Vn = {
1104
1114
  key: 0,
1105
1115
  class: "vpg-empty-hint"
1106
- }, Vn = {
1116
+ }, An = {
1107
1117
  key: 1,
1108
1118
  class: "vpg-empty-hint"
1109
- }, Dn = { class: "vpg-options-section" }, zn = { class: "vpg-option-toggle" }, An = ["checked"], Ln = {
1119
+ }, zn = { class: "vpg-options-section" }, Ln = { class: "vpg-option-toggle" }, Pn = ["checked"], En = {
1110
1120
  key: 1,
1111
1121
  class: "vpg-watermark"
1112
- }, Pn = /* @__PURE__ */ Qe({
1122
+ }, Nn = /* @__PURE__ */ Qe({
1113
1123
  __name: "PivotConfig",
1114
1124
  props: {
1115
1125
  availableFields: {},
@@ -1120,8 +1130,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1120
1130
  showColumnTotals: { type: Boolean }
1121
1131
  },
1122
1132
  emits: ["update:showRowTotals", "update:showColumnTotals", "clearConfig", "autoSuggest", "dragStart", "dragEnd", "updateAggregation", "addRowField", "removeRowField", "addColumnField", "removeColumnField", "addValueField", "removeValueField"],
1123
- setup(t, { emit: i }) {
1124
- const n = t, l = i, { isPro: v, showWatermark: m } = Ie(), y = [
1133
+ setup(t, { emit: a }) {
1134
+ const n = t, l = a, { isPro: v, showWatermark: m } = Ie(), y = [
1125
1135
  { value: "sum", label: "Sum", symbol: "Σ" },
1126
1136
  { value: "count", label: "Count", symbol: "#" },
1127
1137
  { value: "avg", label: "Avg", symbol: "x̄" },
@@ -1145,13 +1155,13 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1145
1155
  return n.availableFields.filter(
1146
1156
  (F) => !f.has(F.field) && !s.has(F.field) && !d.has(F.field)
1147
1157
  );
1148
- }), V = T(() => b.value.length), $ = M(""), U = T(() => {
1158
+ }), D = T(() => b.value.length), $ = M(""), U = T(() => {
1149
1159
  if (!$.value.trim())
1150
1160
  return C.value;
1151
1161
  const f = $.value.toLowerCase().trim();
1152
1162
  return C.value.filter((s) => s.field.toLowerCase().includes(f));
1153
1163
  });
1154
- function D(f) {
1164
+ function V(f) {
1155
1165
  switch (f) {
1156
1166
  case "number":
1157
1167
  return "#";
@@ -1179,8 +1189,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1179
1189
  function B(f, s, d) {
1180
1190
  s === "row" ? l("removeRowField", f) : s === "column" ? l("removeColumnField", f) : d && l("removeValueField", f, d.aggregation);
1181
1191
  }
1182
- return (f, s) => (r(), u("div", sn, [
1183
- e("div", an, [
1192
+ return (f, s) => (r(), u("div", rn, [
1193
+ e("div", un, [
1184
1194
  s[7] || (s[7] = e("h3", { class: "vpg-config-title" }, [
1185
1195
  e("svg", {
1186
1196
  class: "vpg-icon",
@@ -1197,8 +1207,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1197
1207
  ]),
1198
1208
  I(" Fields ")
1199
1209
  ], -1)),
1200
- e("div", rn, [
1201
- V.value > 0 ? (r(), u("button", {
1210
+ e("div", vn, [
1211
+ D.value > 0 ? (r(), u("button", {
1202
1212
  key: 0,
1203
1213
  class: "vpg-action-btn vpg-clear-btn",
1204
1214
  title: "Clear all",
@@ -1217,12 +1227,12 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1217
1227
  d: "M6 18L18 6M6 6l12 12"
1218
1228
  })
1219
1229
  ], -1)
1220
- ])])) : z("", !0)
1230
+ ])])) : A("", !0)
1221
1231
  ])
1222
1232
  ]),
1223
- V.value > 0 ? (r(), u("div", un, [
1233
+ D.value > 0 ? (r(), u("div", cn, [
1224
1234
  s[9] || (s[9] = e("div", { class: "vpg-section-label" }, "Active", -1)),
1225
- e("div", vn, [
1235
+ e("div", dn, [
1226
1236
  (r(!0), u(W, null, J(b.value, (d) => {
1227
1237
  var F;
1228
1238
  return r(), u("div", {
@@ -1233,13 +1243,13 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1233
1243
  onDragstart: (g) => H(d.field, g),
1234
1244
  onDragend: O
1235
1245
  }, [
1236
- e("div", dn, [
1246
+ e("div", pn, [
1237
1247
  e("span", {
1238
1248
  class: q(["vpg-item-badge", d.assignedTo])
1239
1249
  }, R(d.assignedTo === "row" ? "R" : d.assignedTo === "column" ? "C" : c(((F = d.valueConfig) == null ? void 0 : F.aggregation) || "sum")), 3),
1240
- e("span", gn, R(d.field), 1)
1250
+ e("span", fn, R(d.field), 1)
1241
1251
  ]),
1242
- e("div", pn, [
1252
+ e("div", mn, [
1243
1253
  d.assignedTo === "row" || d.assignedTo === "column" ? (r(), u("button", {
1244
1254
  key: 0,
1245
1255
  class: "vpg-toggle-btn",
@@ -1259,7 +1269,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1259
1269
  d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"
1260
1270
  })
1261
1271
  ], -1)
1262
- ])], 8, fn)) : z("", !0),
1272
+ ])], 8, hn)) : A("", !0),
1263
1273
  d.assignedTo === "value" && d.valueConfig ? (r(), u("select", {
1264
1274
  key: 1,
1265
1275
  class: "vpg-agg-select",
@@ -1271,26 +1281,26 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1271
1281
  (r(), u(W, null, J(y, (g) => e("option", {
1272
1282
  key: g.value,
1273
1283
  value: g.value
1274
- }, R(g.symbol) + " " + R(g.label), 9, hn)), 64))
1275
- ], 40, mn)) : z("", !0),
1284
+ }, R(g.symbol) + " " + R(g.label), 9, kn)), 64))
1285
+ ], 40, wn)) : A("", !0),
1276
1286
  e("button", {
1277
1287
  class: "vpg-remove-btn",
1278
1288
  title: "Remove",
1279
1289
  onClick: Ke((g) => B(d.field, d.assignedTo, d.valueConfig), ["stop"])
1280
- }, " × ", 8, wn)
1290
+ }, " × ", 8, Cn)
1281
1291
  ])
1282
- ], 42, cn);
1292
+ ], 42, gn);
1283
1293
  }), 128))
1284
1294
  ])
1285
- ])) : z("", !0),
1286
- e("div", kn, [
1287
- e("div", Cn, [
1288
- e("div", yn, [
1295
+ ])) : A("", !0),
1296
+ e("div", yn, [
1297
+ e("div", bn, [
1298
+ e("div", Fn, [
1289
1299
  s[10] || (s[10] = I(" Available ", -1)),
1290
- e("span", bn, R(C.value.length), 1)
1300
+ e("span", Sn, R(C.value.length), 1)
1291
1301
  ])
1292
1302
  ]),
1293
- e("div", Fn, [
1303
+ e("div", Rn, [
1294
1304
  s[12] || (s[12] = e("svg", {
1295
1305
  class: "vpg-search-icon",
1296
1306
  fill: "none",
@@ -1330,9 +1340,9 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1330
1340
  d: "M6 18L18 6M6 6l12 12"
1331
1341
  })
1332
1342
  ], -1)
1333
- ])])) : z("", !0)
1343
+ ])])) : A("", !0)
1334
1344
  ]),
1335
- e("div", Sn, [
1345
+ e("div", $n, [
1336
1346
  (r(!0), u(W, null, J(U.value, (d) => (r(), u("div", {
1337
1347
  key: d.field,
1338
1348
  class: q(["vpg-field-item", { "vpg-is-numeric": d.isNumeric }]),
@@ -1344,20 +1354,20 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1344
1354
  e("span", {
1345
1355
  class: "vpg-field-type-icon",
1346
1356
  title: d.type
1347
- }, R(D(d.type)), 9, $n),
1348
- e("span", Mn, R(d.field), 1),
1349
- e("span", xn, R(d.uniqueCount), 1)
1350
- ], 42, Rn))), 128)),
1351
- U.value.length === 0 && $.value ? (r(), u("div", Tn, ' No fields match "' + R($.value) + '" ', 1)) : C.value.length === 0 ? (r(), u("div", Vn, " All fields assigned ")) : z("", !0)
1357
+ }, R(V(d.type)), 9, xn),
1358
+ e("span", Tn, R(d.field), 1),
1359
+ e("span", Dn, R(d.uniqueCount), 1)
1360
+ ], 42, Mn))), 128)),
1361
+ U.value.length === 0 && $.value ? (r(), u("div", Vn, ' No fields match "' + R($.value) + '" ', 1)) : C.value.length === 0 ? (r(), u("div", An, " All fields assigned ")) : A("", !0)
1352
1362
  ])
1353
1363
  ]),
1354
- e("div", Dn, [
1355
- e("label", zn, [
1364
+ e("div", zn, [
1365
+ e("label", Ln, [
1356
1366
  e("input", {
1357
1367
  type: "checkbox",
1358
1368
  checked: t.showRowTotals,
1359
1369
  onChange: s[4] || (s[4] = (d) => l("update:showRowTotals", d.target.checked))
1360
- }, null, 40, An),
1370
+ }, null, 40, Pn),
1361
1371
  s[13] || (s[13] = e("span", null, "Totals", -1))
1362
1372
  ]),
1363
1373
  e("button", {
@@ -1380,69 +1390,69 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1380
1390
  I(" Auto ", -1)
1381
1391
  ])])
1382
1392
  ]),
1383
- S(m) ? (r(), u("div", Ln, [...s[15] || (s[15] = [
1393
+ S(m) ? (r(), u("div", En, [...s[15] || (s[15] = [
1384
1394
  e("a", {
1385
1395
  href: "https://tiny-pivot.com",
1386
1396
  target: "_blank",
1387
1397
  rel: "noopener"
1388
1398
  }, " TinyPivot ", -1)
1389
- ])])) : z("", !0)
1399
+ ])])) : A("", !0)
1390
1400
  ]));
1391
1401
  }
1392
- }), En = /* @__PURE__ */ et(Pn, [["__scopeId", "data-v-6663dd14"]]), Nn = { class: "vpg-skeleton-header" }, Bn = { class: "vpg-header-right" }, jn = { class: "vpg-filter-text" }, Hn = {
1402
+ }), Bn = /* @__PURE__ */ et(Nn, [["__scopeId", "data-v-6663dd14"]]), jn = { class: "vpg-skeleton-header" }, Hn = { class: "vpg-header-right" }, Un = { class: "vpg-filter-text" }, Kn = {
1393
1403
  key: 0,
1394
1404
  class: "vpg-filter-count"
1395
- }, Un = {
1405
+ }, Wn = {
1396
1406
  key: 0,
1397
1407
  class: "vpg-filter-tooltip"
1398
- }, Kn = { class: "vpg-tooltip-column" }, Wn = { class: "vpg-tooltip-values" }, _n = {
1408
+ }, _n = { class: "vpg-tooltip-column" }, qn = { class: "vpg-tooltip-values" }, On = {
1399
1409
  key: 0,
1400
1410
  class: "vpg-tooltip-more"
1401
- }, qn = {
1411
+ }, Gn = {
1402
1412
  key: 0,
1403
1413
  class: "vpg-tooltip-summary"
1404
- }, On = {
1414
+ }, Xn = {
1405
1415
  key: 1,
1406
1416
  class: "vpg-config-summary"
1407
- }, Gn = { class: "vpg-summary-badge vpg-rows" }, Xn = { class: "vpg-summary-badge vpg-cols" }, Yn = { class: "vpg-summary-badge vpg-vals" }, Zn = {
1417
+ }, Yn = { class: "vpg-summary-badge vpg-rows" }, Zn = { class: "vpg-summary-badge vpg-cols" }, Jn = { class: "vpg-summary-badge vpg-vals" }, Qn = {
1408
1418
  key: 2,
1409
1419
  class: "vpg-font-size-toggle"
1410
- }, Jn = ["onClick"], Qn = {
1420
+ }, In = ["onClick"], el = {
1411
1421
  key: 0,
1412
1422
  class: "vpg-pro-required"
1413
- }, In = { class: "vpg-config-bar" }, el = { class: "vpg-zone-chips" }, tl = ["onDragstart", "onDragover", "onDrop"], ol = { class: "vpg-mini-name" }, nl = ["onClick"], ll = {
1423
+ }, tl = { class: "vpg-config-bar" }, ol = { class: "vpg-zone-chips" }, nl = ["onDragstart", "onDragover", "onDrop"], ll = { class: "vpg-mini-name" }, sl = ["onClick"], al = {
1414
1424
  key: 0,
1415
1425
  class: "vpg-zone-hint"
1416
- }, sl = { class: "vpg-zone-chips" }, al = ["onDragstart", "onDragover", "onDrop"], il = { class: "vpg-mini-name" }, rl = ["onClick"], ul = {
1426
+ }, il = { class: "vpg-zone-chips" }, rl = ["onDragstart", "onDragover", "onDrop"], ul = { class: "vpg-mini-name" }, vl = ["onClick"], cl = {
1417
1427
  key: 0,
1418
1428
  class: "vpg-zone-hint"
1419
- }, vl = { class: "vpg-zone-chips" }, cl = { class: "vpg-agg-symbol" }, dl = { class: "vpg-mini-name" }, gl = ["onClick"], pl = {
1429
+ }, dl = { class: "vpg-zone-chips" }, gl = { class: "vpg-agg-symbol" }, pl = { class: "vpg-mini-name" }, fl = ["onClick"], ml = {
1420
1430
  key: 0,
1421
1431
  class: "vpg-zone-hint"
1422
- }, fl = {
1432
+ }, hl = {
1423
1433
  key: 0,
1424
1434
  class: "vpg-placeholder"
1425
- }, ml = { class: "vpg-placeholder-content" }, hl = { class: "vpg-placeholder-text" }, wl = {
1435
+ }, wl = { class: "vpg-placeholder-content" }, kl = { class: "vpg-placeholder-text" }, Cl = {
1426
1436
  key: 1,
1427
1437
  class: "vpg-table-container"
1428
- }, kl = { class: "vpg-pivot-table" }, Cl = ["rowspan"], yl = { class: "vpg-header-content" }, bl = ["colspan", "onClick"], Fl = { class: "vpg-header-content" }, Sl = ["rowspan"], Rl = ["onClick"], $l = {
1438
+ }, yl = { class: "vpg-pivot-table" }, bl = ["rowspan"], Fl = { class: "vpg-header-content" }, Sl = ["colspan", "onClick"], Rl = { class: "vpg-header-content" }, $l = ["rowspan"], Ml = ["onClick"], xl = {
1429
1439
  key: 0,
1430
1440
  class: "vpg-data-cell vpg-total-cell"
1431
- }, Ml = {
1441
+ }, Tl = {
1432
1442
  key: 0,
1433
1443
  class: "vpg-totals-row"
1434
- }, xl = {
1444
+ }, Dl = {
1435
1445
  key: 0,
1436
1446
  class: "vpg-data-cell vpg-grand-total-cell"
1437
- }, Tl = {
1447
+ }, Vl = {
1438
1448
  key: 2,
1439
1449
  class: "vpg-skeleton-footer"
1440
- }, Vl = {
1450
+ }, Al = {
1441
1451
  key: 1,
1442
1452
  href: "https://tiny-pivot.com",
1443
1453
  target: "_blank",
1444
1454
  rel: "noopener"
1445
- }, Dl = /* @__PURE__ */ Qe({
1455
+ }, zl = /* @__PURE__ */ Qe({
1446
1456
  __name: "PivotSkeleton",
1447
1457
  props: {
1448
1458
  rowFields: {},
@@ -1457,8 +1467,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1457
1467
  filteredRowCount: {}
1458
1468
  },
1459
1469
  emits: ["addRowField", "removeRowField", "addColumnField", "removeColumnField", "addValueField", "removeValueField", "updateAggregation", "reorderRowFields", "reorderColumnFields"],
1460
- setup(t, { emit: i }) {
1461
- const n = t, l = i, { showWatermark: v, canUsePivot: m, isDemo: y } = Ie(), c = M(null), b = M(null), C = M(null), V = {
1470
+ setup(t, { emit: a }) {
1471
+ const n = t, l = a, { showWatermark: v, canUsePivot: m, isDemo: y } = Ie(), c = M(null), b = M(null), C = M(null), D = {
1462
1472
  sum: "Sum",
1463
1473
  count: "Count",
1464
1474
  avg: "Average",
@@ -1467,7 +1477,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1467
1477
  countDistinct: "Count Distinct"
1468
1478
  };
1469
1479
  function $(E) {
1470
- return V[E];
1480
+ return D[E];
1471
1481
  }
1472
1482
  function U(E) {
1473
1483
  return {
@@ -1479,7 +1489,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1479
1489
  countDistinct: "◇"
1480
1490
  }[E] || "Σ";
1481
1491
  }
1482
- const D = M(n.fontSize || "xs"), H = [
1492
+ const V = M(n.fontSize || "xs"), H = [
1483
1493
  { value: "xs", label: "S" },
1484
1494
  { value: "sm", label: "M" },
1485
1495
  { value: "base", label: "L" }
@@ -1497,15 +1507,15 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1497
1507
  const F = T(() => {
1498
1508
  if (!n.pivotResult)
1499
1509
  return [];
1500
- const E = n.pivotResult.rowHeaders.map((k, A) => A), p = n.pivotResult.rowHeaders, P = n.pivotResult.data;
1501
- return E.sort((k, A) => {
1510
+ const E = n.pivotResult.rowHeaders.map((k, z) => z), p = n.pivotResult.rowHeaders, P = n.pivotResult.data;
1511
+ return E.sort((k, z) => {
1502
1512
  var G, Me, Ee, Ne, Be, je;
1503
1513
  let N;
1504
1514
  if (s.value === "row") {
1505
- const be = ((G = p[k]) == null ? void 0 : G.join(" / ")) || "", ke = ((Me = p[A]) == null ? void 0 : Me.join(" / ")) || "";
1515
+ const be = ((G = p[k]) == null ? void 0 : G.join(" / ")) || "", ke = ((Me = p[z]) == null ? void 0 : Me.join(" / ")) || "";
1506
1516
  N = be.localeCompare(ke, void 0, { numeric: !0, sensitivity: "base" });
1507
1517
  } else {
1508
- const be = s.value, ke = ((Ne = (Ee = P[k]) == null ? void 0 : Ee[be]) == null ? void 0 : Ne.value) ?? null, He = ((je = (Be = P[A]) == null ? void 0 : Be[be]) == null ? void 0 : je.value) ?? null;
1518
+ const be = s.value, ke = ((Ne = (Ee = P[k]) == null ? void 0 : Ee[be]) == null ? void 0 : Ne.value) ?? null, He = ((je = (Be = P[z]) == null ? void 0 : Be[be]) == null ? void 0 : je.value) ?? null;
1509
1519
  ke === null && He === null ? N = 0 : ke === null ? N = 1 : He === null ? N = -1 : N = ke - He;
1510
1520
  }
1511
1521
  return f.value === "asc" ? N : -N;
@@ -1519,13 +1529,13 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1519
1529
  const E = [];
1520
1530
  for (let p = 0; p < n.pivotResult.headers.length; p++) {
1521
1531
  const P = n.pivotResult.headers[p], k = [];
1522
- let A = 0;
1523
- for (; A < P.length; ) {
1524
- const N = P[A];
1532
+ let z = 0;
1533
+ for (; z < P.length; ) {
1534
+ const N = P[z];
1525
1535
  let G = 1;
1526
- for (; A + G < P.length && P[A + G] === N; )
1536
+ for (; z + G < P.length && P[z + G] === N; )
1527
1537
  G++;
1528
- k.push({ label: N, colspan: G }), A += G;
1538
+ k.push({ label: N, colspan: G }), z += G;
1529
1539
  }
1530
1540
  E.push(k);
1531
1541
  }
@@ -1545,9 +1555,9 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1545
1555
  c.value = null;
1546
1556
  }
1547
1557
  function me(E, p) {
1548
- var A;
1558
+ var z;
1549
1559
  p.preventDefault();
1550
- const P = (A = p.dataTransfer) == null ? void 0 : A.getData("text/plain");
1560
+ const P = (z = p.dataTransfer) == null ? void 0 : z.getData("text/plain");
1551
1561
  if (!P || P.startsWith("reorder:")) {
1552
1562
  c.value = null;
1553
1563
  return;
@@ -1581,7 +1591,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1581
1591
  function re() {
1582
1592
  C.value = null;
1583
1593
  }
1584
- function Ae(E, p, P) {
1594
+ function ze(E, p, P) {
1585
1595
  if (P.preventDefault(), P.stopPropagation(), !b.value || b.value.zone !== E)
1586
1596
  return;
1587
1597
  const k = b.value.index;
@@ -1589,8 +1599,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1589
1599
  b.value = null, C.value = null;
1590
1600
  return;
1591
1601
  }
1592
- const A = E === "row" ? [...n.rowFields] : [...n.columnFields], [N] = A.splice(k, 1);
1593
- A.splice(p, 0, N), l(E === "row" ? "reorderRowFields" : "reorderColumnFields", A), b.value = null, C.value = null;
1602
+ const z = E === "row" ? [...n.rowFields] : [...n.columnFields], [N] = z.splice(k, 1);
1603
+ z.splice(p, 0, N), l(E === "row" ? "reorderRowFields" : "reorderColumnFields", z), b.value = null, C.value = null;
1594
1604
  }
1595
1605
  function Le(E, p) {
1596
1606
  var P, k;
@@ -1605,11 +1615,11 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1605
1615
  var P;
1606
1616
  return r(), u("div", {
1607
1617
  class: q(["vpg-pivot-skeleton", [
1608
- `vpg-font-${D.value}`,
1618
+ `vpg-font-${V.value}`,
1609
1619
  { "vpg-is-dragging": t.draggingField }
1610
1620
  ]])
1611
1621
  }, [
1612
- e("div", Nn, [
1622
+ e("div", jn, [
1613
1623
  p[12] || (p[12] = e("div", { class: "vpg-skeleton-title" }, [
1614
1624
  e("svg", {
1615
1625
  class: "vpg-icon",
@@ -1626,7 +1636,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1626
1636
  ]),
1627
1637
  e("span", null, "Pivot Table")
1628
1638
  ], -1)),
1629
- e("div", Bn, [
1639
+ e("div", Hn, [
1630
1640
  O.value ? (r(), u("div", {
1631
1641
  key: 0,
1632
1642
  class: "vpg-filter-indicator",
@@ -1646,45 +1656,45 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1646
1656
  d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
1647
1657
  })
1648
1658
  ], -1)),
1649
- e("span", jn, [
1659
+ e("span", Un, [
1650
1660
  p[9] || (p[9] = I(" Filtered: ", -1)),
1651
1661
  e("strong", null, R(_.value), 1),
1652
- t.filteredRowCount !== void 0 && t.totalRowCount !== void 0 ? (r(), u("span", Hn, " (" + R(t.filteredRowCount.toLocaleString()) + " of " + R(t.totalRowCount.toLocaleString()) + " rows) ", 1)) : z("", !0)
1662
+ t.filteredRowCount !== void 0 && t.totalRowCount !== void 0 ? (r(), u("span", Kn, " (" + R(t.filteredRowCount.toLocaleString()) + " of " + R(t.totalRowCount.toLocaleString()) + " rows) ", 1)) : A("", !0)
1653
1663
  ]),
1654
- B.value ? (r(), u("div", Un, [
1664
+ B.value ? (r(), u("div", Wn, [
1655
1665
  p[10] || (p[10] = e("div", { class: "vpg-tooltip-header" }, "Active Filters", -1)),
1656
1666
  (r(!0), u(W, null, J(X.value, (k) => (r(), u("div", {
1657
1667
  key: k.column,
1658
1668
  class: "vpg-tooltip-filter"
1659
1669
  }, [
1660
- e("div", Kn, R(k.column), 1),
1661
- e("div", Wn, [
1662
- (r(!0), u(W, null, J(k.values, (A, N) => (r(), u("span", {
1670
+ e("div", _n, R(k.column), 1),
1671
+ e("div", qn, [
1672
+ (r(!0), u(W, null, J(k.values, (z, N) => (r(), u("span", {
1663
1673
  key: N,
1664
1674
  class: "vpg-tooltip-value"
1665
- }, R(A), 1))), 128)),
1666
- k.remaining > 0 ? (r(), u("span", _n, " +" + R(k.remaining) + " more ", 1)) : z("", !0)
1675
+ }, R(z), 1))), 128)),
1676
+ k.remaining > 0 ? (r(), u("span", On, " +" + R(k.remaining) + " more ", 1)) : A("", !0)
1667
1677
  ])
1668
1678
  ]))), 128)),
1669
- t.filteredRowCount !== void 0 && t.totalRowCount !== void 0 ? (r(), u("div", qn, " Showing " + R(t.filteredRowCount.toLocaleString()) + " of " + R(t.totalRowCount.toLocaleString()) + " rows ", 1)) : z("", !0)
1670
- ])) : z("", !0)
1671
- ], 32)) : z("", !0),
1672
- t.isConfigured ? (r(), u("div", On, [
1673
- e("span", Gn, R(t.rowFields.length) + " row" + R(t.rowFields.length !== 1 ? "s" : ""), 1),
1674
- e("span", Xn, R(t.columnFields.length) + " col" + R(t.columnFields.length !== 1 ? "s" : ""), 1),
1675
- e("span", Yn, R(t.valueFields.length) + " val" + R(t.valueFields.length !== 1 ? "s" : ""), 1)
1676
- ])) : z("", !0),
1677
- t.isConfigured && t.pivotResult ? (r(), u("div", Zn, [
1679
+ t.filteredRowCount !== void 0 && t.totalRowCount !== void 0 ? (r(), u("div", Gn, " Showing " + R(t.filteredRowCount.toLocaleString()) + " of " + R(t.totalRowCount.toLocaleString()) + " rows ", 1)) : A("", !0)
1680
+ ])) : A("", !0)
1681
+ ], 32)) : A("", !0),
1682
+ t.isConfigured ? (r(), u("div", Xn, [
1683
+ e("span", Yn, R(t.rowFields.length) + " row" + R(t.rowFields.length !== 1 ? "s" : ""), 1),
1684
+ e("span", Zn, R(t.columnFields.length) + " col" + R(t.columnFields.length !== 1 ? "s" : ""), 1),
1685
+ e("span", Jn, R(t.valueFields.length) + " val" + R(t.valueFields.length !== 1 ? "s" : ""), 1)
1686
+ ])) : A("", !0),
1687
+ t.isConfigured && t.pivotResult ? (r(), u("div", Qn, [
1678
1688
  (r(), u(W, null, J(H, (k) => e("button", {
1679
1689
  key: k.value,
1680
- class: q(["vpg-font-size-btn", { active: D.value === k.value }]),
1681
- onClick: (A) => D.value = k.value
1682
- }, R(k.label), 11, Jn)), 64))
1683
- ])) : z("", !0)
1690
+ class: q(["vpg-font-size-btn", { active: V.value === k.value }]),
1691
+ onClick: (z) => V.value = k.value
1692
+ }, R(k.label), 11, In)), 64))
1693
+ ])) : A("", !0)
1684
1694
  ])
1685
1695
  ]),
1686
1696
  S(m) ? (r(), u(W, { key: 1 }, [
1687
- e("div", In, [
1697
+ e("div", tl, [
1688
1698
  e("div", {
1689
1699
  class: q(["vpg-drop-zone vpg-row-zone", { "vpg-drag-over": c.value === "row" }]),
1690
1700
  onDragover: p[2] || (p[2] = (k) => ee("row", k)),
@@ -1695,28 +1705,28 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1695
1705
  e("span", { class: "vpg-zone-icon vpg-row-icon" }, "↓"),
1696
1706
  e("span", { class: "vpg-zone-label" }, "Rows")
1697
1707
  ], -1)),
1698
- e("div", el, [
1699
- (r(!0), u(W, null, J(t.rowFields, (k, A) => (r(), u("div", {
1708
+ e("div", ol, [
1709
+ (r(!0), u(W, null, J(t.rowFields, (k, z) => (r(), u("div", {
1700
1710
  key: k,
1701
1711
  class: q(["vpg-mini-chip vpg-row-chip", {
1702
- "vpg-chip-dragging": Le("row", A),
1703
- "vpg-chip-drop-target": _e("row", A)
1712
+ "vpg-chip-dragging": Le("row", z),
1713
+ "vpg-chip-drop-target": _e("row", z)
1704
1714
  }]),
1705
1715
  draggable: "true",
1706
- onDragstart: (N) => We("row", A, N),
1716
+ onDragstart: (N) => We("row", z, N),
1707
1717
  onDragend: ye,
1708
- onDragover: (N) => he("row", A, N),
1718
+ onDragover: (N) => he("row", z, N),
1709
1719
  onDragleave: re,
1710
- onDrop: (N) => Ae("row", A, N)
1720
+ onDrop: (N) => ze("row", z, N)
1711
1721
  }, [
1712
1722
  p[14] || (p[14] = e("span", { class: "vpg-drag-handle" }, "⋮⋮", -1)),
1713
- e("span", ol, R(k), 1),
1723
+ e("span", ll, R(k), 1),
1714
1724
  e("button", {
1715
1725
  class: "vpg-mini-remove",
1716
1726
  onClick: Ke((N) => l("removeRowField", k), ["stop"])
1717
- }, "×", 8, nl)
1718
- ], 42, tl))), 128)),
1719
- t.rowFields.length === 0 ? (r(), u("span", ll, "Drop here")) : z("", !0)
1727
+ }, "×", 8, sl)
1728
+ ], 42, nl))), 128)),
1729
+ t.rowFields.length === 0 ? (r(), u("span", al, "Drop here")) : A("", !0)
1720
1730
  ])
1721
1731
  ], 34),
1722
1732
  e("div", {
@@ -1729,28 +1739,28 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1729
1739
  e("span", { class: "vpg-zone-icon vpg-column-icon" }, "→"),
1730
1740
  e("span", { class: "vpg-zone-label" }, "Columns")
1731
1741
  ], -1)),
1732
- e("div", sl, [
1733
- (r(!0), u(W, null, J(t.columnFields, (k, A) => (r(), u("div", {
1742
+ e("div", il, [
1743
+ (r(!0), u(W, null, J(t.columnFields, (k, z) => (r(), u("div", {
1734
1744
  key: k,
1735
1745
  class: q(["vpg-mini-chip vpg-column-chip", {
1736
- "vpg-chip-dragging": Le("column", A),
1737
- "vpg-chip-drop-target": _e("column", A)
1746
+ "vpg-chip-dragging": Le("column", z),
1747
+ "vpg-chip-drop-target": _e("column", z)
1738
1748
  }]),
1739
1749
  draggable: "true",
1740
- onDragstart: (N) => We("column", A, N),
1750
+ onDragstart: (N) => We("column", z, N),
1741
1751
  onDragend: ye,
1742
- onDragover: (N) => he("column", A, N),
1752
+ onDragover: (N) => he("column", z, N),
1743
1753
  onDragleave: re,
1744
- onDrop: (N) => Ae("column", A, N)
1754
+ onDrop: (N) => ze("column", z, N)
1745
1755
  }, [
1746
1756
  p[16] || (p[16] = e("span", { class: "vpg-drag-handle" }, "⋮⋮", -1)),
1747
- e("span", il, R(k), 1),
1757
+ e("span", ul, R(k), 1),
1748
1758
  e("button", {
1749
1759
  class: "vpg-mini-remove",
1750
1760
  onClick: Ke((N) => l("removeColumnField", k), ["stop"])
1751
- }, "×", 8, rl)
1752
- ], 42, al))), 128)),
1753
- t.columnFields.length === 0 ? (r(), u("span", ul, "Drop here")) : z("", !0)
1761
+ }, "×", 8, vl)
1762
+ ], 42, rl))), 128)),
1763
+ t.columnFields.length === 0 ? (r(), u("span", cl, "Drop here")) : A("", !0)
1754
1764
  ])
1755
1765
  ], 34),
1756
1766
  e("div", {
@@ -1763,24 +1773,24 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1763
1773
  e("span", { class: "vpg-zone-icon vpg-value-icon" }, "Σ"),
1764
1774
  e("span", { class: "vpg-zone-label" }, "Values")
1765
1775
  ], -1)),
1766
- e("div", vl, [
1776
+ e("div", dl, [
1767
1777
  (r(!0), u(W, null, J(t.valueFields, (k) => (r(), u("div", {
1768
1778
  key: `${k.field}-${k.aggregation}`,
1769
1779
  class: "vpg-mini-chip vpg-value-chip"
1770
1780
  }, [
1771
- e("span", cl, R(U(k.aggregation)), 1),
1772
- e("span", dl, R(k.field), 1),
1781
+ e("span", gl, R(U(k.aggregation)), 1),
1782
+ e("span", pl, R(k.field), 1),
1773
1783
  e("button", {
1774
1784
  class: "vpg-mini-remove",
1775
- onClick: (A) => l("removeValueField", k.field, k.aggregation)
1776
- }, "×", 8, gl)
1785
+ onClick: (z) => l("removeValueField", k.field, k.aggregation)
1786
+ }, "×", 8, fl)
1777
1787
  ]))), 128)),
1778
- t.valueFields.length === 0 ? (r(), u("span", pl, "Drop numeric")) : z("", !0)
1788
+ t.valueFields.length === 0 ? (r(), u("span", ml, "Drop numeric")) : A("", !0)
1779
1789
  ])
1780
1790
  ], 34)
1781
1791
  ]),
1782
- !t.isConfigured || !t.pivotResult ? (r(), u("div", fl, [
1783
- e("div", ml, [
1792
+ !t.isConfigured || !t.pivotResult ? (r(), u("div", hl, [
1793
+ e("div", wl, [
1784
1794
  p[27] || (p[27] = e("svg", {
1785
1795
  class: "vpg-placeholder-icon",
1786
1796
  fill: "none",
@@ -1794,7 +1804,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1794
1804
  d: "M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"
1795
1805
  })
1796
1806
  ], -1)),
1797
- e("span", hl, [
1807
+ e("span", kl, [
1798
1808
  t.valueFields.length === 0 ? (r(), u(W, { key: 0 }, [
1799
1809
  p[19] || (p[19] = I(" Add a ", -1)),
1800
1810
  p[20] || (p[20] = e("strong", null, "Values", -1)),
@@ -1810,47 +1820,47 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1810
1820
  ], 64))
1811
1821
  ])
1812
1822
  ])
1813
- ])) : (r(), u("div", wl, [
1814
- e("table", kl, [
1823
+ ])) : (r(), u("div", Cl, [
1824
+ e("table", yl, [
1815
1825
  e("thead", null, [
1816
- (r(!0), u(W, null, J(g.value, (k, A) => (r(), u("tr", {
1817
- key: `header-${A}`,
1826
+ (r(!0), u(W, null, J(g.value, (k, z) => (r(), u("tr", {
1827
+ key: `header-${z}`,
1818
1828
  class: "vpg-column-header-row"
1819
1829
  }, [
1820
- A === 0 ? (r(), u("th", {
1830
+ z === 0 ? (r(), u("th", {
1821
1831
  key: 0,
1822
1832
  class: "vpg-row-header-label",
1823
1833
  rowspan: g.value.length,
1824
1834
  style: ve({ width: `${Pe.value}px` }),
1825
1835
  onClick: p[8] || (p[8] = (N) => d("row"))
1826
1836
  }, [
1827
- e("div", yl, [
1837
+ e("div", Fl, [
1828
1838
  e("span", null, R(t.rowFields.join(" / ") || "Rows"), 1),
1829
1839
  e("span", {
1830
1840
  class: q(["vpg-sort-indicator", { active: s.value === "row" }])
1831
1841
  }, R(s.value === "row" ? f.value === "asc" ? "↑" : "↓" : "⇅"), 3)
1832
1842
  ])
1833
- ], 12, Cl)) : z("", !0),
1843
+ ], 12, bl)) : A("", !0),
1834
1844
  (r(!0), u(W, null, J(k, (N, G) => (r(), u("th", {
1835
1845
  key: G,
1836
1846
  class: "vpg-column-header-cell",
1837
1847
  colspan: N.colspan,
1838
1848
  style: ve({ width: `${we.value * N.colspan}px` }),
1839
- onClick: (Me) => A === g.value.length - 1 && d(G)
1849
+ onClick: (Me) => z === g.value.length - 1 && d(G)
1840
1850
  }, [
1841
- e("div", Fl, [
1851
+ e("div", Rl, [
1842
1852
  e("span", null, R(N.label), 1),
1843
- A === g.value.length - 1 ? (r(), u("span", {
1853
+ z === g.value.length - 1 ? (r(), u("span", {
1844
1854
  key: 0,
1845
1855
  class: q(["vpg-sort-indicator", { active: s.value === G }])
1846
- }, R(s.value === G ? f.value === "asc" ? "↑" : "↓" : "⇅"), 3)) : z("", !0)
1856
+ }, R(s.value === G ? f.value === "asc" ? "↑" : "↓" : "⇅"), 3)) : A("", !0)
1847
1857
  ])
1848
- ], 12, bl))), 128)),
1849
- t.pivotResult.rowTotals.length > 0 && A === 0 ? (r(), u("th", {
1858
+ ], 12, Sl))), 128)),
1859
+ t.pivotResult.rowTotals.length > 0 && z === 0 ? (r(), u("th", {
1850
1860
  key: 1,
1851
1861
  class: "vpg-total-header",
1852
1862
  rowspan: g.value.length
1853
- }, " Total ", 8, Sl)) : z("", !0)
1863
+ }, " Total ", 8, $l)) : A("", !0)
1854
1864
  ]))), 128))
1855
1865
  ]),
1856
1866
  e("tbody", null, [
@@ -1862,41 +1872,41 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1862
1872
  class: "vpg-row-header-cell",
1863
1873
  style: ve({ width: `${Pe.value}px` })
1864
1874
  }, [
1865
- (r(!0), u(W, null, J(t.pivotResult.rowHeaders[k], (A, N) => (r(), u("span", {
1875
+ (r(!0), u(W, null, J(t.pivotResult.rowHeaders[k], (z, N) => (r(), u("span", {
1866
1876
  key: N,
1867
1877
  class: "vpg-row-value"
1868
- }, R(A), 1))), 128))
1878
+ }, R(z), 1))), 128))
1869
1879
  ], 4),
1870
- (r(!0), u(W, null, J(t.pivotResult.data[k], (A, N) => (r(), u("td", {
1880
+ (r(!0), u(W, null, J(t.pivotResult.data[k], (z, N) => (r(), u("td", {
1871
1881
  key: N,
1872
1882
  class: q(["vpg-data-cell", [
1873
1883
  L(k, N) && "selected",
1874
- A.value === null && "vpg-is-null"
1884
+ z.value === null && "vpg-is-null"
1875
1885
  ]]),
1876
1886
  style: ve({ width: `${we.value}px` }),
1877
1887
  onClick: (G) => x(k, N)
1878
- }, R(A.formattedValue), 15, Rl))), 128)),
1879
- t.pivotResult.rowTotals[k] ? (r(), u("td", $l, R(t.pivotResult.rowTotals[k].formattedValue), 1)) : z("", !0)
1888
+ }, R(z.formattedValue), 15, Ml))), 128)),
1889
+ t.pivotResult.rowTotals[k] ? (r(), u("td", xl, R(t.pivotResult.rowTotals[k].formattedValue), 1)) : A("", !0)
1880
1890
  ]))), 128)),
1881
- t.pivotResult.columnTotals.length > 0 ? (r(), u("tr", Ml, [
1891
+ t.pivotResult.columnTotals.length > 0 ? (r(), u("tr", Tl, [
1882
1892
  e("th", {
1883
1893
  class: "vpg-row-header-cell vpg-total-label",
1884
1894
  style: ve({ width: `${Pe.value}px` })
1885
1895
  }, " Total ", 4),
1886
- (r(!0), u(W, null, J(t.pivotResult.columnTotals, (k, A) => (r(), u("td", {
1887
- key: A,
1896
+ (r(!0), u(W, null, J(t.pivotResult.columnTotals, (k, z) => (r(), u("td", {
1897
+ key: z,
1888
1898
  class: "vpg-data-cell vpg-total-cell",
1889
1899
  style: ve({ width: `${we.value}px` })
1890
1900
  }, R(k.formattedValue), 5))), 128)),
1891
- t.pivotResult.rowTotals.length > 0 ? (r(), u("td", xl, R(t.pivotResult.grandTotal.formattedValue), 1)) : z("", !0)
1892
- ])) : z("", !0)
1901
+ t.pivotResult.rowTotals.length > 0 ? (r(), u("td", Dl, R(t.pivotResult.grandTotal.formattedValue), 1)) : A("", !0)
1902
+ ])) : A("", !0)
1893
1903
  ])
1894
1904
  ])
1895
1905
  ])),
1896
- t.isConfigured && t.pivotResult ? (r(), u("div", Tl, [
1906
+ t.isConfigured && t.pivotResult ? (r(), u("div", Vl, [
1897
1907
  e("span", null, R(t.pivotResult.rowHeaders.length) + " rows × " + R(((P = t.pivotResult.data[0]) == null ? void 0 : P.length) || 0) + " columns", 1)
1898
- ])) : z("", !0)
1899
- ], 64)) : (r(), u("div", Qn, [...p[13] || (p[13] = [
1908
+ ])) : A("", !0)
1909
+ ], 64)) : (r(), u("div", el, [...p[13] || (p[13] = [
1900
1910
  e("div", { class: "vpg-pro-content" }, [
1901
1911
  e("svg", {
1902
1912
  class: "vpg-pro-icon",
@@ -1933,82 +1943,82 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
1933
1943
  rel: "noopener",
1934
1944
  class: "vpg-get-pro"
1935
1945
  }, " Get Pro License → ", -1))
1936
- ], 64)) : (r(), u("a", Vl, " Powered by TinyPivot "))
1937
- ], 2)) : z("", !0)
1946
+ ], 64)) : (r(), u("a", Al, " Powered by TinyPivot "))
1947
+ ], 2)) : A("", !0)
1938
1948
  ], 2);
1939
1949
  };
1940
1950
  }
1941
- }), zl = /* @__PURE__ */ et(Dl, [["__scopeId", "data-v-ccaad6a3"]]), Al = {
1951
+ }), Ll = /* @__PURE__ */ et(zl, [["__scopeId", "data-v-ccaad6a3"]]), Pl = {
1942
1952
  key: 0,
1943
1953
  class: "vpg-toast"
1944
- }, Ll = { class: "vpg-toolbar" }, Pl = { class: "vpg-toolbar-left" }, El = {
1954
+ }, El = { class: "vpg-toolbar" }, Nl = { class: "vpg-toolbar-left" }, Bl = {
1945
1955
  key: 0,
1946
1956
  class: "vpg-view-toggle"
1947
- }, Nl = {
1957
+ }, jl = {
1948
1958
  key: 0,
1949
1959
  class: "vpg-search-container"
1950
- }, Bl = {
1960
+ }, Hl = {
1951
1961
  key: 1,
1952
1962
  class: "vpg-search-box"
1953
- }, jl = { class: "vpg-font-size-control" }, Hl = { class: "vpg-font-size-toggle" }, Ul = ["onClick"], Kl = {
1963
+ }, Ul = { class: "vpg-font-size-control" }, Kl = { class: "vpg-font-size-toggle" }, Wl = ["onClick"], _l = {
1954
1964
  key: 1,
1955
1965
  class: "vpg-filter-info"
1956
- }, Wl = {
1966
+ }, ql = {
1957
1967
  key: 2,
1958
1968
  class: "vpg-search-info"
1959
- }, _l = {
1969
+ }, Ol = {
1960
1970
  key: 0,
1961
1971
  class: "vpg-pivot-status"
1962
- }, ql = { class: "vpg-toolbar-right" }, Ol = ["title"], Gl = {
1972
+ }, Gl = { class: "vpg-toolbar-right" }, Xl = ["title"], Yl = {
1963
1973
  key: 0,
1964
1974
  class: "vpg-loading"
1965
- }, Xl = {
1975
+ }, Zl = {
1966
1976
  key: 1,
1967
1977
  class: "vpg-empty"
1968
- }, Yl = {
1978
+ }, Jl = {
1969
1979
  key: 2,
1970
1980
  class: "vpg-empty"
1971
- }, Zl = {
1981
+ }, Ql = {
1972
1982
  key: 3,
1973
1983
  class: "vpg-table-wrapper"
1974
- }, Jl = ["onClick"], Ql = { class: "vpg-header-content" }, Il = { class: "vpg-header-text" }, es = { class: "vpg-header-icons" }, ts = {
1984
+ }, Il = ["onClick"], es = { class: "vpg-header-content" }, ts = { class: "vpg-header-text" }, os = { class: "vpg-header-icons" }, ns = {
1975
1985
  key: 0,
1976
1986
  class: "vpg-sort-indicator"
1977
- }, os = {
1987
+ }, ls = {
1978
1988
  key: 0,
1979
1989
  class: "vpg-icon-sm",
1980
1990
  fill: "currentColor",
1981
1991
  viewBox: "0 0 20 20"
1982
- }, ns = {
1992
+ }, ss = {
1983
1993
  key: 1,
1984
1994
  class: "vpg-icon-sm",
1985
1995
  fill: "currentColor",
1986
1996
  viewBox: "0 0 20 20"
1987
- }, ls = {
1997
+ }, as = {
1988
1998
  key: 1,
1989
1999
  class: "vpg-filter-indicator"
1990
- }, ss = ["onMousedown"], as = ["data-row", "data-col", "onMousedown", "onMouseenter"], is = {
2000
+ }, is = ["onMousedown"], rs = ["data-row", "data-col", "onMousedown", "onMouseenter"], us = {
1991
2001
  key: 1,
1992
2002
  class: "vpg-pivot-container"
1993
- }, rs = {
2003
+ }, vs = {
1994
2004
  key: 0,
1995
2005
  class: "vpg-pivot-config-panel"
1996
- }, us = { class: "vpg-footer" }, vs = { class: "vpg-footer-left" }, cs = {
2006
+ }, cs = { class: "vpg-footer" }, ds = { class: "vpg-footer-left" }, gs = {
1997
2007
  key: 0,
1998
2008
  class: "vpg-filtered-note"
1999
- }, ds = { key: 1 }, gs = { class: "vpg-filtered-count" }, ps = {
2009
+ }, ps = { key: 1 }, fs = { class: "vpg-filtered-count" }, ms = {
2000
2010
  key: 0,
2001
2011
  class: "vpg-pagination"
2002
- }, fs = ["disabled"], ms = ["disabled"], hs = { class: "vpg-page-info" }, ws = ["disabled"], ks = ["disabled"], Cs = {
2012
+ }, hs = ["disabled"], ws = ["disabled"], ks = { class: "vpg-page-info" }, Cs = ["disabled"], ys = ["disabled"], bs = {
2003
2013
  key: 1,
2004
2014
  class: "vpg-selection-stats"
2005
- }, ys = { class: "vpg-stat" }, bs = { class: "vpg-stat-value" }, Fs = { class: "vpg-stat" }, Ss = { class: "vpg-stat-value" }, Rs = { class: "vpg-stat" }, $s = { class: "vpg-stat-value" }, Ms = { class: "vpg-footer-right" }, xs = {
2015
+ }, Fs = { class: "vpg-stat" }, Ss = { class: "vpg-stat-value" }, Rs = { class: "vpg-stat" }, $s = { class: "vpg-stat-value" }, Ms = { class: "vpg-stat" }, xs = { class: "vpg-stat-value" }, Ts = { class: "vpg-footer-right" }, Ds = {
2006
2016
  key: 0,
2007
2017
  class: "vpg-demo-banner"
2008
- }, Ts = {
2018
+ }, Vs = {
2009
2019
  key: 1,
2010
2020
  class: "vpg-watermark-inline"
2011
- }, Ce = 120, Mt = 350, Vs = /* @__PURE__ */ Qe({
2021
+ }, Ce = 120, Mt = 350, As = /* @__PURE__ */ Qe({
2012
2022
  __name: "DataGrid",
2013
2023
  props: {
2014
2024
  data: {},
@@ -2032,11 +2042,11 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2032
2042
  maxHeight: { default: 1200 }
2033
2043
  },
2034
2044
  emits: ["cellClick", "selectionChange", "export", "copy"],
2035
- setup(t, { emit: i }) {
2036
- const n = t, l = i, { showWatermark: v, canUsePivot: m, isDemo: y } = Ie(), c = T(() => {
2037
- var a;
2038
- return n.theme === "auto" ? (a = window.matchMedia) != null && a.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light" : n.theme;
2039
- }), b = M(n.fontSize), C = M(""), V = M(!1), $ = M(1), U = M(null), D = M(0), H = M(0), O = M(n.initialHeight), _ = M(!1), X = M(0), B = M(0), f = M(!1), s = M(""), d = [
2045
+ setup(t, { emit: a }) {
2046
+ const n = t, l = a, { showWatermark: v, canUsePivot: m, isDemo: y } = Ie(), c = T(() => {
2047
+ var i;
2048
+ return n.theme === "auto" ? (i = window.matchMedia) != null && i.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light" : n.theme;
2049
+ }), b = M(n.fontSize), C = M(""), D = M(!1), $ = M(1), U = M(null), V = M(0), H = M(0), O = M(n.initialHeight), _ = M(!1), X = M(0), B = M(0), f = M(!1), s = M(""), d = [
2040
2050
  { value: "xs", label: "S" },
2041
2051
  { value: "sm", label: "M" },
2042
2052
  { value: "base", label: "L" }
@@ -2052,14 +2062,14 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2052
2062
  clearAllFilters: ye,
2053
2063
  toggleSort: he,
2054
2064
  getSortDirection: re,
2055
- columnFilters: Ae,
2065
+ columnFilters: ze,
2056
2066
  activeFilters: Le
2057
- } = Ko({ data: F }), _e = T(() => g.getFilteredRowModel().rows.map((o) => o.original)), Pe = T(() => Le.value.length === 0 ? null : Le.value.map((a) => {
2067
+ } = _o({ data: F }), _e = T(() => g.getFilteredRowModel().rows.map((o) => o.original)), Pe = T(() => Le.value.length === 0 ? null : Le.value.map((i) => {
2058
2068
  var o;
2059
2069
  return {
2060
- column: a.column,
2061
- valueCount: ((o = a.values) == null ? void 0 : o.length) || 0,
2062
- values: a.values || []
2070
+ column: i.column,
2071
+ valueCount: ((o = i.values) == null ? void 0 : o.length) || 0,
2072
+ values: i.values || []
2063
2073
  };
2064
2074
  })), {
2065
2075
  rowFields: we,
@@ -2067,7 +2077,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2067
2077
  valueFields: p,
2068
2078
  showRowTotals: P,
2069
2079
  showColumnTotals: k,
2070
- availableFields: A,
2080
+ availableFields: z,
2071
2081
  isConfigured: N,
2072
2082
  pivotResult: G,
2073
2083
  addRowField: Me,
@@ -2078,23 +2088,23 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2078
2088
  removeValueField: be,
2079
2089
  updateValueFieldAggregation: ke,
2080
2090
  clearConfig: He,
2081
- autoSuggestConfig: At
2082
- } = _o(_e), qe = T(() => {
2091
+ autoSuggestConfig: zt
2092
+ } = Oo(_e), qe = T(() => {
2083
2093
  if (!C.value.trim() || !n.enableSearch)
2084
2094
  return Fe.value;
2085
- const a = C.value.toLowerCase().trim();
2095
+ const i = C.value.toLowerCase().trim();
2086
2096
  return Fe.value.filter((o) => {
2087
2097
  for (const h of w.value) {
2088
2098
  const j = o.original[h];
2089
- if (j != null && String(j).toLowerCase().includes(a))
2099
+ if (j != null && String(j).toLowerCase().includes(i))
2090
2100
  return !0;
2091
2101
  }
2092
2102
  return !1;
2093
2103
  });
2094
2104
  }), de = T(() => qe.value.length), xe = T(() => n.enablePagination ? Math.max(1, Math.ceil(de.value / n.pageSize)) : 1), ut = T(() => {
2095
2105
  if (!n.enablePagination) return qe.value;
2096
- const a = ($.value - 1) * n.pageSize, o = a + n.pageSize;
2097
- return qe.value.slice(a, o);
2106
+ const i = ($.value - 1) * n.pageSize, o = i + n.pageSize;
2107
+ return qe.value.slice(i, o);
2098
2108
  }), Lt = T(() => de.value === 0 ? 0 : ($.value - 1) * n.pageSize + 1), Pt = T(
2099
2109
  () => Math.min($.value * n.pageSize, de.value)
2100
2110
  );
@@ -2104,7 +2114,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2104
2114
  function Nt() {
2105
2115
  $.value > 1 && $.value--;
2106
2116
  }
2107
- ze([Ae, C], () => {
2117
+ Ae([ze, C], () => {
2108
2118
  $.value = 1;
2109
2119
  });
2110
2120
  function Bt() {
@@ -2112,16 +2122,16 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2112
2122
  jt();
2113
2123
  return;
2114
2124
  }
2115
- const a = n.enableSearch && C.value.trim() ? qe.value.map((o) => o.original) : Fe.value.map((o) => o.original);
2116
- qo(a, w.value, {
2125
+ const i = n.enableSearch && C.value.trim() ? qe.value.map((o) => o.original) : Fe.value.map((o) => o.original);
2126
+ Go(i, w.value, {
2117
2127
  filename: n.exportFilename,
2118
2128
  includeHeaders: !0
2119
- }), l("export", { rowCount: a.length, filename: n.exportFilename });
2129
+ }), l("export", { rowCount: i.length, filename: n.exportFilename });
2120
2130
  }
2121
2131
  function jt() {
2122
2132
  if (!G.value) return;
2123
- const a = n.exportFilename.replace(".csv", "-pivot.csv");
2124
- Oo(
2133
+ const i = n.exportFilename.replace(".csv", "-pivot.csv");
2134
+ Xo(
2125
2135
  {
2126
2136
  headers: G.value.headers,
2127
2137
  rowHeaders: G.value.rowHeaders,
@@ -2135,17 +2145,17 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2135
2145
  we.value,
2136
2146
  E.value,
2137
2147
  p.value,
2138
- { filename: a }
2148
+ { filename: i }
2139
2149
  );
2140
2150
  const o = G.value.rowHeaders.length;
2141
- l("export", { rowCount: o, filename: a });
2151
+ l("export", { rowCount: o, filename: i });
2142
2152
  }
2143
- function Ht(a, o) {
2144
- n.enableColumnResize && (o.preventDefault(), o.stopPropagation(), U.value = a, D.value = o.clientX, H.value = ge.value[a] || Ce, document.addEventListener("mousemove", vt), document.addEventListener("mouseup", ct));
2153
+ function Ht(i, o) {
2154
+ n.enableColumnResize && (o.preventDefault(), o.stopPropagation(), U.value = i, V.value = o.clientX, H.value = ge.value[i] || Ce, document.addEventListener("mousemove", vt), document.addEventListener("mouseup", ct));
2145
2155
  }
2146
- function vt(a) {
2156
+ function vt(i) {
2147
2157
  if (!U.value) return;
2148
- const o = a.clientX - D.value, h = Math.max(Ce, Math.min(Mt, H.value + o));
2158
+ const o = i.clientX - V.value, h = Math.max(Ce, Math.min(Mt, H.value + o));
2149
2159
  ge.value = {
2150
2160
  ...ge.value,
2151
2161
  [U.value]: h
@@ -2154,12 +2164,12 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2154
2164
  function ct() {
2155
2165
  U.value = null, document.removeEventListener("mousemove", vt), document.removeEventListener("mouseup", ct);
2156
2166
  }
2157
- function Ut(a) {
2158
- n.enableVerticalResize && (a.preventDefault(), _.value = !0, X.value = a.clientY, B.value = O.value, document.addEventListener("mousemove", dt), document.addEventListener("mouseup", gt));
2167
+ function Ut(i) {
2168
+ n.enableVerticalResize && (i.preventDefault(), _.value = !0, X.value = i.clientY, B.value = O.value, document.addEventListener("mousemove", dt), document.addEventListener("mouseup", gt));
2159
2169
  }
2160
- function dt(a) {
2170
+ function dt(i) {
2161
2171
  if (!_.value) return;
2162
- const o = a.clientY - X.value, h = Math.max(
2172
+ const o = i.clientY - X.value, h = Math.max(
2163
2173
  n.minHeight,
2164
2174
  Math.min(n.maxHeight, B.value + o)
2165
2175
  );
@@ -2170,18 +2180,18 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2170
2180
  }
2171
2181
  function pt() {
2172
2182
  if (!ae.value || !n.enableClipboard) return;
2173
- const a = Xo(
2183
+ const i = Zo(
2174
2184
  Fe.value.map((o) => o.original),
2175
2185
  w.value,
2176
2186
  ae.value
2177
2187
  );
2178
- Go(
2179
- a,
2188
+ Yo(
2189
+ i,
2180
2190
  () => {
2181
2191
  const o = (ae.value.maxRow - ae.value.minRow + 1) * (ae.value.maxCol - ae.value.minCol + 1);
2182
2192
  s.value = `Copied ${o} cell${o > 1 ? "s" : ""}`, f.value = !0, setTimeout(() => {
2183
2193
  f.value = !1;
2184
- }, 2e3), l("copy", { text: a, cellCount: o });
2194
+ }, 2e3), l("copy", { text: i, cellCount: o });
2185
2195
  },
2186
2196
  (o) => {
2187
2197
  s.value = "Copy failed", f.value = !0, setTimeout(() => {
@@ -2191,23 +2201,23 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2191
2201
  );
2192
2202
  }
2193
2203
  const te = M("grid"), Te = M(!0), tt = M(null);
2194
- function Kt(a) {
2195
- tt.value = a;
2204
+ function Kt(i) {
2205
+ tt.value = i;
2196
2206
  }
2197
2207
  function Wt() {
2198
2208
  tt.value = null;
2199
2209
  }
2200
- function _t(a) {
2201
- we.value = a;
2210
+ function _t(i) {
2211
+ we.value = i;
2202
2212
  }
2203
- function qt(a) {
2204
- E.value = a;
2213
+ function qt(i) {
2214
+ E.value = i;
2205
2215
  }
2206
2216
  const ot = M(), ft = M(), Fe = T(() => g.getRowModel().rows), ne = M(null), Oe = M({ top: 0, left: 0, maxHeight: 400 }), ge = M({});
2207
2217
  function mt() {
2208
2218
  if (n.data.length === 0)
2209
2219
  return;
2210
- const a = {}, o = Math.min(100, n.data.length), j = document.createElement("canvas").getContext("2d");
2220
+ const i = {}, o = Math.min(100, n.data.length), j = document.createElement("canvas").getContext("2d");
2211
2221
  if (j) {
2212
2222
  j.font = "13px system-ui, -apple-system, sans-serif";
2213
2223
  for (const K of w.value) {
@@ -2216,45 +2226,45 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2216
2226
  const Y = n.data[Z][K], oe = Y == null ? "" : String(Y), fe = j.measureText(oe).width + 28;
2217
2227
  Q = Math.max(Q, fe);
2218
2228
  }
2219
- a[K] = Math.min(Math.max(Q, Ce), Mt);
2229
+ i[K] = Math.min(Math.max(Q, Ce), Mt);
2220
2230
  }
2221
- ge.value = a;
2231
+ ge.value = i;
2222
2232
  }
2223
2233
  }
2224
- function Ot(a, o) {
2234
+ function Ot(i, o) {
2225
2235
  o.stopPropagation();
2226
2236
  const h = o.currentTarget, j = h.closest(".vpg-header-cell"), K = (j == null ? void 0 : j.getBoundingClientRect()) || h.getBoundingClientRect(), Q = 280, Z = 12;
2227
2237
  let Y = K.left;
2228
2238
  Y + Q > window.innerWidth - Z && (Y = window.innerWidth - Q - Z), Y = Math.max(Z, Y);
2229
2239
  const oe = window.innerHeight - K.bottom - Z, fe = K.top - Z;
2230
2240
  let Se, Re;
2231
- oe >= 300 || oe >= fe ? (Se = K.bottom + 4, Re = Math.min(400, oe - 4)) : (Re = Math.min(400, fe - 4), Se = K.top - Re - 4), Oe.value = { top: Se, left: Y, maxHeight: Re }, ne.value = a;
2241
+ oe >= 300 || oe >= fe ? (Se = K.bottom + 4, Re = Math.min(400, oe - 4)) : (Re = Math.min(400, fe - 4), Se = K.top - Re - 4), Oe.value = { top: Se, left: Y, maxHeight: Re }, ne.value = i;
2232
2242
  }
2233
2243
  function Ge() {
2234
2244
  ne.value = null;
2235
2245
  }
2236
- function Gt(a, o) {
2237
- me(a, o);
2246
+ function Gt(i, o) {
2247
+ me(i, o);
2238
2248
  }
2239
- function Xt(a, o) {
2249
+ function Xt(i, o) {
2240
2250
  if (o === null)
2241
- re(a) && (he(a), re(a) && he(a));
2251
+ re(i) && (he(i), re(i) && he(i));
2242
2252
  else {
2243
- const h = re(a);
2244
- h === null ? (he(a), o === "desc" && re(a) === "asc" && he(a)) : h !== o && he(a);
2253
+ const h = re(i);
2254
+ h === null ? (he(i), o === "desc" && re(i) === "asc" && he(i)) : h !== o && he(i);
2245
2255
  }
2246
2256
  }
2247
- const Xe = T(() => Ae.value.length), pe = M(null), ue = M(null), se = M(null), nt = M(!1);
2248
- function Yt(a) {
2257
+ const Xe = T(() => ze.value.length), pe = M(null), ue = M(null), se = M(null), nt = M(!1);
2258
+ function Yt(i) {
2249
2259
  const o = Fe.value.length - 1;
2250
- o < 0 || (ue.value = { row: 0, col: a }, se.value = { row: o, col: a }, pe.value = { row: 0, col: a });
2260
+ o < 0 || (ue.value = { row: 0, col: i }, se.value = { row: o, col: i }, pe.value = { row: 0, col: i });
2251
2261
  }
2252
- function Zt(a, o) {
2262
+ function Zt(i, o) {
2253
2263
  if (o.target.closest(".vpg-dropdown-arrow")) {
2254
- const j = w.value[a];
2264
+ const j = w.value[i];
2255
2265
  Ot(j, o);
2256
2266
  } else
2257
- Yt(a);
2267
+ Yt(i);
2258
2268
  }
2259
2269
  const ae = T(() => !ue.value || !se.value ? null : {
2260
2270
  minRow: Math.min(ue.value.row, se.value.row),
@@ -2262,27 +2272,27 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2262
2272
  minCol: Math.min(ue.value.col, se.value.col),
2263
2273
  maxCol: Math.max(ue.value.col, se.value.col)
2264
2274
  });
2265
- function Jt(a, o) {
2275
+ function Jt(i, o) {
2266
2276
  if (!ae.value)
2267
2277
  return !1;
2268
2278
  const { minRow: h, maxRow: j, minCol: K, maxCol: Q } = ae.value;
2269
- return a >= h && a <= j && o >= K && o <= Q;
2279
+ return i >= h && i <= j && o >= K && o <= Q;
2270
2280
  }
2271
- const Ve = T(() => {
2281
+ const De = T(() => {
2272
2282
  if (!ae.value)
2273
2283
  return null;
2274
- const { minRow: a, maxRow: o, minCol: h, maxCol: j } = ae.value, K = [];
2284
+ const { minRow: i, maxRow: o, minCol: h, maxCol: j } = ae.value, K = [];
2275
2285
  let Q = 0;
2276
- for (let oe = a; oe <= o; oe++) {
2286
+ for (let oe = i; oe <= o; oe++) {
2277
2287
  const fe = Fe.value[oe];
2278
2288
  if (fe)
2279
2289
  for (let Se = h; Se <= j; Se++) {
2280
2290
  const Re = w.value[Se];
2281
2291
  if (!Re)
2282
2292
  continue;
2283
- const De = fe.original[Re];
2284
- if (Q++, De != null && De !== "") {
2285
- const bt = typeof De == "number" ? De : Number.parseFloat(String(De));
2293
+ const Ve = fe.original[Re];
2294
+ if (Q++, Ve != null && Ve !== "") {
2295
+ const bt = typeof Ve == "number" ? Ve : Number.parseFloat(String(Ve));
2286
2296
  Number.isNaN(bt) || K.push(bt);
2287
2297
  }
2288
2298
  }
@@ -2292,16 +2302,16 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2292
2302
  const Z = K.reduce((oe, fe) => oe + fe, 0), Y = Z / K.length;
2293
2303
  return { count: Q, sum: Z, avg: Y, numericCount: K.length };
2294
2304
  });
2295
- function ht(a) {
2296
- return a === null ? "-" : Math.abs(a) >= 1e3 ? a.toLocaleString("en-US", { maximumFractionDigits: 2 }) : a.toLocaleString("en-US", { maximumFractionDigits: 4 });
2305
+ function ht(i) {
2306
+ return i === null ? "-" : Math.abs(i) >= 1e3 ? i.toLocaleString("en-US", { maximumFractionDigits: 2 }) : i.toLocaleString("en-US", { maximumFractionDigits: 4 });
2297
2307
  }
2298
- function wt(a) {
2299
- if ((a.ctrlKey || a.metaKey) && a.key === "c" && ae.value) {
2300
- a.preventDefault(), pt();
2308
+ function wt(i) {
2309
+ if ((i.ctrlKey || i.metaKey) && i.key === "c" && ae.value) {
2310
+ i.preventDefault(), pt();
2301
2311
  return;
2302
2312
  }
2303
- if ((a.ctrlKey || a.metaKey) && a.key === "f" && n.enableSearch) {
2304
- a.preventDefault(), V.value = !0, Ue(() => {
2313
+ if ((i.ctrlKey || i.metaKey) && i.key === "f" && n.enableSearch) {
2314
+ i.preventDefault(), D.value = !0, Ue(() => {
2305
2315
  const Y = document.querySelector(".vpg-search-input");
2306
2316
  Y == null || Y.focus();
2307
2317
  });
@@ -2311,78 +2321,78 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2311
2321
  return;
2312
2322
  const { row: o, col: h } = pe.value, K = ut.value.length - 1, Q = w.value.length - 1;
2313
2323
  function Z(Y, oe) {
2314
- a.shiftKey ? (ue.value || (ue.value = { row: o, col: h }), se.value = { row: Y, col: oe }) : (ue.value = { row: Y, col: oe }, se.value = { row: Y, col: oe }), pe.value = { row: Y, col: oe }, Qt(Y, oe);
2324
+ i.shiftKey ? (ue.value || (ue.value = { row: o, col: h }), se.value = { row: Y, col: oe }) : (ue.value = { row: Y, col: oe }, se.value = { row: Y, col: oe }), pe.value = { row: Y, col: oe }, Qt(Y, oe);
2315
2325
  }
2316
- switch (a.key) {
2326
+ switch (i.key) {
2317
2327
  case "ArrowUp":
2318
- a.preventDefault(), o > 0 && Z(o - 1, h);
2328
+ i.preventDefault(), o > 0 && Z(o - 1, h);
2319
2329
  break;
2320
2330
  case "ArrowDown":
2321
- a.preventDefault(), o < K && Z(o + 1, h);
2331
+ i.preventDefault(), o < K && Z(o + 1, h);
2322
2332
  break;
2323
2333
  case "ArrowLeft":
2324
- a.preventDefault(), h > 0 && Z(o, h - 1);
2334
+ i.preventDefault(), h > 0 && Z(o, h - 1);
2325
2335
  break;
2326
2336
  case "ArrowRight":
2327
- a.preventDefault(), h < Q && Z(o, h + 1);
2337
+ i.preventDefault(), h < Q && Z(o, h + 1);
2328
2338
  break;
2329
2339
  case "Escape":
2330
- pe.value = null, ue.value = null, se.value = null, V.value = !1, C.value = "";
2340
+ pe.value = null, ue.value = null, se.value = null, D.value = !1, C.value = "";
2331
2341
  break;
2332
2342
  }
2333
2343
  }
2334
- function Qt(a, o) {
2344
+ function Qt(i, o) {
2335
2345
  Ue(() => {
2336
2346
  var j;
2337
2347
  const h = (j = ft.value) == null ? void 0 : j.querySelector(
2338
- `[data-row="${a}"][data-col="${o}"]`
2348
+ `[data-row="${i}"][data-col="${o}"]`
2339
2349
  );
2340
2350
  h == null || h.scrollIntoView({ block: "nearest", inline: "nearest" });
2341
2351
  });
2342
2352
  }
2343
- function It(a, o, h) {
2344
- h.preventDefault(), h.shiftKey && pe.value ? se.value = { row: a, col: o } : (pe.value = { row: a, col: o }, ue.value = { row: a, col: o }, se.value = { row: a, col: o }, nt.value = !0);
2345
- const j = Fe.value[a];
2353
+ function It(i, o, h) {
2354
+ h.preventDefault(), h.shiftKey && pe.value ? se.value = { row: i, col: o } : (pe.value = { row: i, col: o }, ue.value = { row: i, col: o }, se.value = { row: i, col: o }, nt.value = !0);
2355
+ const j = Fe.value[i];
2346
2356
  if (j) {
2347
2357
  const K = w.value[o];
2348
2358
  l("cellClick", {
2349
- row: a,
2359
+ row: i,
2350
2360
  col: o,
2351
2361
  value: j.original[K],
2352
2362
  rowData: j.original
2353
2363
  });
2354
2364
  }
2355
2365
  }
2356
- function eo(a, o) {
2357
- nt.value && (se.value = { row: a, col: o });
2366
+ function eo(i, o) {
2367
+ nt.value && (se.value = { row: i, col: o });
2358
2368
  }
2359
2369
  function kt() {
2360
2370
  nt.value = !1;
2361
2371
  }
2362
- function to(a, o) {
2372
+ function to(i, o) {
2363
2373
  var h, j;
2364
- return Jt(a, o) ? !0 : ((h = pe.value) == null ? void 0 : h.row) === a && ((j = pe.value) == null ? void 0 : j.col) === o;
2374
+ return Jt(i, o) ? !0 : ((h = pe.value) == null ? void 0 : h.row) === i && ((j = pe.value) == null ? void 0 : j.col) === o;
2365
2375
  }
2366
2376
  const oo = /^(?:.*_)?(?:id|code|year|month|quarter|day|week|date|zip|phone|fax|ssn|ein|npi|ndc|gpi|hcpcs|icd|cpt|rx|bin|pcn|group|member|claim|rx_number|script|fill)(?:_.*)?$/i;
2367
- function no(a) {
2368
- return !oo.test(a);
2377
+ function no(i) {
2378
+ return !oo.test(i);
2369
2379
  }
2370
- function lo(a, o) {
2371
- if (a == null || a === "")
2380
+ function lo(i, o) {
2381
+ if (i == null || i === "")
2372
2382
  return "";
2373
2383
  if (ee(o).type === "number") {
2374
- const j = typeof a == "number" ? a : Number.parseFloat(String(a));
2375
- return Number.isNaN(j) ? String(a) : no(o) && Math.abs(j) >= 1e3 ? j.toLocaleString("en-US", { maximumFractionDigits: 2 }) : Number.isInteger(j) ? String(j) : j.toLocaleString("en-US", { maximumFractionDigits: 4, useGrouping: !1 });
2384
+ const j = typeof i == "number" ? i : Number.parseFloat(String(i));
2385
+ return Number.isNaN(j) ? String(i) : no(o) && Math.abs(j) >= 1e3 ? j.toLocaleString("en-US", { maximumFractionDigits: 2 }) : Number.isInteger(j) ? String(j) : j.toLocaleString("en-US", { maximumFractionDigits: 4, useGrouping: !1 });
2376
2386
  }
2377
- return String(a);
2387
+ return String(i);
2378
2388
  }
2379
2389
  function Ct() {
2380
2390
  ne.value && Ge();
2381
2391
  }
2382
- function yt(a) {
2392
+ function yt(i) {
2383
2393
  var o;
2384
2394
  if (ne.value) {
2385
- const h = a.target;
2395
+ const h = i.target;
2386
2396
  if (h && ((o = h.closest) != null && o.call(h, ".vpg-filter-portal")))
2387
2397
  return;
2388
2398
  Ge();
@@ -2390,20 +2400,20 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2390
2400
  }
2391
2401
  xt(() => {
2392
2402
  mt(), document.addEventListener("keydown", wt), document.addEventListener("mouseup", kt), Ue(() => {
2393
- var a;
2394
- (a = ot.value) == null || a.addEventListener("scroll", Ct, { passive: !0 });
2403
+ var i;
2404
+ (i = ot.value) == null || i.addEventListener("scroll", Ct, { passive: !0 });
2395
2405
  }), window.addEventListener("scroll", yt, { passive: !0, capture: !0 });
2396
2406
  }), Tt(() => {
2397
- var a;
2398
- document.removeEventListener("keydown", wt), document.removeEventListener("mouseup", kt), (a = ot.value) == null || a.removeEventListener("scroll", Ct), window.removeEventListener("scroll", yt, { capture: !0 });
2399
- }), ze(() => n.data, () => {
2407
+ var i;
2408
+ document.removeEventListener("keydown", wt), document.removeEventListener("mouseup", kt), (i = ot.value) == null || i.removeEventListener("scroll", Ct), window.removeEventListener("scroll", yt, { capture: !0 });
2409
+ }), Ae(() => n.data, () => {
2400
2410
  Ue(mt);
2401
2411
  }, { immediate: !0 });
2402
- const so = T(() => w.value.reduce((a, o) => a + (ge.value[o] || Ce), 0));
2403
- function ao(a) {
2404
- ne.value && (a.target.closest(".vpg-filter-portal") || Ge());
2412
+ const so = T(() => w.value.reduce((i, o) => i + (ge.value[o] || Ce), 0));
2413
+ function ao(i) {
2414
+ ne.value && (i.target.closest(".vpg-filter-portal") || Ge());
2405
2415
  }
2406
- return (a, o) => (r(), u("div", {
2416
+ return (i, o) => (r(), u("div", {
2407
2417
  class: q(["vpg-data-grid", [
2408
2418
  `vpg-font-${b.value}`,
2409
2419
  `vpg-theme-${c.value}`,
@@ -2416,7 +2426,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2416
2426
  }, [
2417
2427
  Ye(ro, { name: "vpg-toast" }, {
2418
2428
  default: uo(() => [
2419
- f.value ? (r(), u("div", Al, [
2429
+ f.value ? (r(), u("div", Pl, [
2420
2430
  o[15] || (o[15] = e("svg", {
2421
2431
  class: "vpg-icon",
2422
2432
  fill: "none",
@@ -2431,13 +2441,13 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2431
2441
  })
2432
2442
  ], -1)),
2433
2443
  I(" " + R(s.value), 1)
2434
- ])) : z("", !0)
2444
+ ])) : A("", !0)
2435
2445
  ]),
2436
2446
  _: 1
2437
2447
  }),
2438
- e("div", Ll, [
2439
- e("div", Pl, [
2440
- t.showPivot ? (r(), u("div", El, [
2448
+ e("div", El, [
2449
+ e("div", Nl, [
2450
+ t.showPivot ? (r(), u("div", Bl, [
2441
2451
  e("button", {
2442
2452
  class: q(["vpg-view-btn", { active: te.value === "grid" }]),
2443
2453
  onClick: o[0] || (o[0] = (h) => te.value = "grid")
@@ -2476,10 +2486,10 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2476
2486
  ], -1),
2477
2487
  I(" Pivot ", -1)
2478
2488
  ])], 2)
2479
- ])) : z("", !0),
2489
+ ])) : A("", !0),
2480
2490
  te.value === "grid" ? (r(), u(W, { key: 1 }, [
2481
- t.enableSearch ? (r(), u("div", Nl, [
2482
- V.value ? (r(), u("div", Bl, [
2491
+ t.enableSearch ? (r(), u("div", jl, [
2492
+ D.value ? (r(), u("div", Hl, [
2483
2493
  o[20] || (o[20] = e("svg", {
2484
2494
  class: "vpg-search-icon",
2485
2495
  fill: "none",
@@ -2499,7 +2509,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2499
2509
  class: "vpg-search-input",
2500
2510
  placeholder: "Search all columns...",
2501
2511
  onKeydown: o[4] || (o[4] = vo((h) => {
2502
- V.value = !1, C.value = "";
2512
+ D.value = !1, C.value = "";
2503
2513
  }, ["escape"]))
2504
2514
  }, null, 544), [
2505
2515
  [rt, C.value]
@@ -2522,12 +2532,12 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2522
2532
  d: "M6 18L18 6M6 6l12 12"
2523
2533
  })
2524
2534
  ], -1)
2525
- ])])) : z("", !0)
2535
+ ])])) : A("", !0)
2526
2536
  ])) : (r(), u("button", {
2527
2537
  key: 0,
2528
2538
  class: "vpg-icon-btn",
2529
2539
  title: "Search (Ctrl+F)",
2530
- onClick: o[2] || (o[2] = (h) => V.value = !0)
2540
+ onClick: o[2] || (o[2] = (h) => D.value = !0)
2531
2541
  }, [...o[18] || (o[18] = [
2532
2542
  e("svg", {
2533
2543
  class: "vpg-icon",
@@ -2543,18 +2553,18 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2543
2553
  })
2544
2554
  ], -1)
2545
2555
  ])]))
2546
- ])) : z("", !0),
2547
- e("div", jl, [
2556
+ ])) : A("", !0),
2557
+ e("div", Ul, [
2548
2558
  o[21] || (o[21] = e("span", { class: "vpg-label" }, "Size:", -1)),
2549
- e("div", Hl, [
2559
+ e("div", Kl, [
2550
2560
  (r(), u(W, null, J(d, (h) => e("button", {
2551
2561
  key: h.value,
2552
2562
  class: q(["vpg-font-size-btn", { active: b.value === h.value }]),
2553
2563
  onClick: (j) => b.value = h.value
2554
- }, R(h.label), 11, Ul)), 64))
2564
+ }, R(h.label), 11, Wl)), 64))
2555
2565
  ])
2556
2566
  ]),
2557
- Xe.value > 0 ? (r(), u("div", Kl, [
2567
+ Xe.value > 0 ? (r(), u("div", _l, [
2558
2568
  o[22] || (o[22] = e("svg", {
2559
2569
  class: "vpg-icon",
2560
2570
  fill: "currentColor",
@@ -2567,11 +2577,11 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2567
2577
  })
2568
2578
  ], -1)),
2569
2579
  e("span", null, R(Xe.value) + " filter" + R(Xe.value > 1 ? "s" : ""), 1)
2570
- ])) : z("", !0),
2571
- C.value ? (r(), u("div", Wl, [
2580
+ ])) : A("", !0),
2581
+ C.value ? (r(), u("div", ql, [
2572
2582
  e("span", null, R(de.value) + " match" + R(de.value !== 1 ? "es" : ""), 1)
2573
- ])) : z("", !0)
2574
- ], 64)) : z("", !0),
2583
+ ])) : A("", !0)
2584
+ ], 64)) : A("", !0),
2575
2585
  te.value === "pivot" && S(m) ? (r(), u(W, { key: 2 }, [
2576
2586
  e("button", {
2577
2587
  class: q(["vpg-config-toggle", { active: Te.value }]),
@@ -2592,7 +2602,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2592
2602
  ], -1)),
2593
2603
  I(" " + R(Te.value ? "Hide" : "Show") + " Config ", 1)
2594
2604
  ], 2),
2595
- S(N) ? (r(), u("div", _l, [...o[24] || (o[24] = [
2605
+ S(N) ? (r(), u("div", Ol, [...o[24] || (o[24] = [
2596
2606
  e("svg", {
2597
2607
  class: "vpg-icon",
2598
2608
  fill: "currentColor",
@@ -2605,10 +2615,10 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2605
2615
  })
2606
2616
  ], -1),
2607
2617
  e("span", null, "Pivot configured", -1)
2608
- ])])) : z("", !0)
2609
- ], 64)) : z("", !0)
2618
+ ])])) : A("", !0)
2619
+ ], 64)) : A("", !0)
2610
2620
  ]),
2611
- e("div", ql, [
2621
+ e("div", Gl, [
2612
2622
  te.value === "grid" && Xe.value > 0 ? (r(), u("button", {
2613
2623
  key: 0,
2614
2624
  class: "vpg-clear-filters",
@@ -2629,7 +2639,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2629
2639
  })
2630
2640
  ], -1),
2631
2641
  I(" Clear Filters ", -1)
2632
- ])])) : z("", !0),
2642
+ ])])) : A("", !0),
2633
2643
  t.enableClipboard && ae.value && te.value === "grid" ? (r(), u("button", {
2634
2644
  key: 1,
2635
2645
  class: "vpg-icon-btn",
@@ -2649,7 +2659,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2649
2659
  d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
2650
2660
  })
2651
2661
  ], -1)
2652
- ])])) : z("", !0),
2662
+ ])])) : A("", !0),
2653
2663
  t.enableExport && (te.value === "grid" || te.value === "pivot" && S(N)) ? (r(), u("button", {
2654
2664
  key: 2,
2655
2665
  class: "vpg-export-btn",
@@ -2670,7 +2680,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2670
2680
  })
2671
2681
  ], -1)),
2672
2682
  I(" Export" + R(te.value === "pivot" ? " Pivot" : ""), 1)
2673
- ], 8, Ol)) : z("", !0)
2683
+ ], 8, Xl)) : A("", !0)
2674
2684
  ])
2675
2685
  ]),
2676
2686
  te.value === "grid" ? (r(), u("div", {
@@ -2680,10 +2690,10 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2680
2690
  class: "vpg-grid-container",
2681
2691
  tabindex: "0"
2682
2692
  }, [
2683
- t.loading ? (r(), u("div", Gl, [...o[28] || (o[28] = [
2693
+ t.loading ? (r(), u("div", Yl, [...o[28] || (o[28] = [
2684
2694
  e("div", { class: "vpg-spinner" }, null, -1),
2685
2695
  e("span", null, "Loading data...", -1)
2686
- ])])) : t.data.length === 0 ? (r(), u("div", Xl, [...o[29] || (o[29] = [
2696
+ ])])) : t.data.length === 0 ? (r(), u("div", Zl, [...o[29] || (o[29] = [
2687
2697
  e("div", { class: "vpg-empty-icon" }, [
2688
2698
  e("svg", {
2689
2699
  class: "vpg-icon-lg",
@@ -2700,7 +2710,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2700
2710
  ])
2701
2711
  ], -1),
2702
2712
  e("span", null, "No data available", -1)
2703
- ])])) : S(x) === 0 ? (r(), u("div", Yl, [
2713
+ ])])) : S(x) === 0 ? (r(), u("div", Jl, [
2704
2714
  o[30] || (o[30] = e("div", { class: "vpg-empty-icon vpg-warning" }, [
2705
2715
  e("svg", {
2706
2716
  class: "vpg-icon-lg",
@@ -2722,7 +2732,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2722
2732
  onClick: o[8] || (o[8] = //@ts-ignore
2723
2733
  (...h) => S(ye) && S(ye)(...h))
2724
2734
  }, " Clear all filters ")
2725
- ])) : (r(), u("div", Zl, [
2735
+ ])) : (r(), u("div", Ql, [
2726
2736
  e("table", {
2727
2737
  class: "vpg-table",
2728
2738
  style: ve({ minWidth: `${so.value}px` })
@@ -2739,25 +2749,25 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2739
2749
  style: ve({ width: `${ge.value[h] || Ce}px`, minWidth: `${ge.value[h] || Ce}px` }),
2740
2750
  onClick: (K) => Zt(j, K)
2741
2751
  }, [
2742
- e("div", Ql, [
2743
- e("span", Il, R(h), 1),
2744
- e("div", es, [
2745
- S(re)(h) ? (r(), u("span", ts, [
2746
- S(re)(h) === "asc" ? (r(), u("svg", os, [...o[32] || (o[32] = [
2752
+ e("div", es, [
2753
+ e("span", ts, R(h), 1),
2754
+ e("div", os, [
2755
+ S(re)(h) ? (r(), u("span", ns, [
2756
+ S(re)(h) === "asc" ? (r(), u("svg", ls, [...o[32] || (o[32] = [
2747
2757
  e("path", {
2748
2758
  "fill-rule": "evenodd",
2749
2759
  d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
2750
2760
  "clip-rule": "evenodd"
2751
2761
  }, null, -1)
2752
- ])])) : (r(), u("svg", ns, [...o[33] || (o[33] = [
2762
+ ])])) : (r(), u("svg", ss, [...o[33] || (o[33] = [
2753
2763
  e("path", {
2754
2764
  "fill-rule": "evenodd",
2755
2765
  d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
2756
2766
  "clip-rule": "evenodd"
2757
2767
  }, null, -1)
2758
2768
  ])]))
2759
- ])) : z("", !0),
2760
- S(ie)(h) ? (r(), u("span", ls, [...o[34] || (o[34] = [
2769
+ ])) : A("", !0),
2770
+ S(ie)(h) ? (r(), u("span", as, [...o[34] || (o[34] = [
2761
2771
  e("svg", {
2762
2772
  class: "vpg-icon-xs",
2763
2773
  fill: "currentColor",
@@ -2769,7 +2779,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2769
2779
  "clip-rule": "evenodd"
2770
2780
  })
2771
2781
  ], -1)
2772
- ])])) : z("", !0),
2782
+ ])])) : A("", !0),
2773
2783
  o[35] || (o[35] = e("span", {
2774
2784
  class: "vpg-dropdown-arrow",
2775
2785
  title: "Filter & Sort"
@@ -2794,8 +2804,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2794
2804
  key: 0,
2795
2805
  class: "vpg-resize-handle",
2796
2806
  onMousedown: (K) => Ht(h, K)
2797
- }, null, 40, ss)) : z("", !0)
2798
- ], 14, Jl))), 128))
2807
+ }, null, 40, is)) : A("", !0)
2808
+ ], 14, Il))), 128))
2799
2809
  ])
2800
2810
  ]),
2801
2811
  e("tbody", {
@@ -2817,15 +2827,15 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2817
2827
  style: ve({ width: `${ge.value[K] || Ce}px`, minWidth: `${ge.value[K] || Ce}px` }),
2818
2828
  onMousedown: (Z) => It(j, Q, Z),
2819
2829
  onMouseenter: (Z) => eo(j, Q)
2820
- }, R(lo(h.original[K], K)), 47, as))), 128))
2830
+ }, R(lo(h.original[K], K)), 47, rs))), 128))
2821
2831
  ]))), 128))
2822
2832
  ], 512)
2823
2833
  ], 4)
2824
2834
  ]))
2825
- ], 512)) : (r(), u("div", is, [
2826
- Te.value && S(m) ? (r(), u("div", rs, [
2827
- Ye(En, {
2828
- "available-fields": S(A),
2835
+ ], 512)) : (r(), u("div", us, [
2836
+ Te.value && S(m) ? (r(), u("div", vs, [
2837
+ Ye(Bn, {
2838
+ "available-fields": S(z),
2829
2839
  "row-fields": S(we),
2830
2840
  "column-fields": S(E),
2831
2841
  "value-fields": S(p),
@@ -2834,7 +2844,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2834
2844
  "onUpdate:showRowTotals": o[9] || (o[9] = (h) => P.value = h),
2835
2845
  "onUpdate:showColumnTotals": o[10] || (o[10] = (h) => k.value = h),
2836
2846
  onClearConfig: S(He),
2837
- onAutoSuggest: S(At),
2847
+ onAutoSuggest: S(zt),
2838
2848
  onDragStart: Kt,
2839
2849
  onDragEnd: Wt,
2840
2850
  onUpdateAggregation: S(ke),
@@ -2845,11 +2855,11 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2845
2855
  onAddValueField: S(je),
2846
2856
  onRemoveValueField: S(be)
2847
2857
  }, null, 8, ["available-fields", "row-fields", "column-fields", "value-fields", "show-row-totals", "show-column-totals", "onClearConfig", "onAutoSuggest", "onUpdateAggregation", "onAddRowField", "onRemoveRowField", "onAddColumnField", "onRemoveColumnField", "onAddValueField", "onRemoveValueField"])
2848
- ])) : z("", !0),
2858
+ ])) : A("", !0),
2849
2859
  e("div", {
2850
2860
  class: q(["vpg-pivot-main", { "vpg-full-width": !Te.value }])
2851
2861
  }, [
2852
- Ye(zl, {
2862
+ Ye(Ll, {
2853
2863
  "row-fields": S(we),
2854
2864
  "column-fields": S(E),
2855
2865
  "value-fields": S(p),
@@ -2872,16 +2882,16 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2872
2882
  }, null, 8, ["row-fields", "column-fields", "value-fields", "is-configured", "dragging-field", "pivot-result", "font-size", "active-filters", "total-row-count", "filtered-row-count", "onAddRowField", "onRemoveRowField", "onAddColumnField", "onRemoveColumnField", "onAddValueField", "onRemoveValueField", "onUpdateAggregation"])
2873
2883
  ], 2)
2874
2884
  ])),
2875
- e("div", us, [
2876
- e("div", vs, [
2885
+ e("div", cs, [
2886
+ e("div", ds, [
2877
2887
  te.value === "grid" ? (r(), u(W, { key: 0 }, [
2878
2888
  t.enablePagination ? (r(), u(W, { key: 0 }, [
2879
2889
  e("span", null, R(Lt.value.toLocaleString()) + "-" + R(Pt.value.toLocaleString()), 1),
2880
2890
  o[36] || (o[36] = e("span", { class: "vpg-separator" }, "of", -1)),
2881
2891
  e("span", null, R(de.value.toLocaleString()), 1),
2882
- de.value !== S(L) ? (r(), u("span", cs, " (" + R(S(L).toLocaleString()) + " total) ", 1)) : z("", !0)
2883
- ], 64)) : S(x) === S(L) && de.value === S(L) ? (r(), u("span", ds, R(S(L).toLocaleString()) + " records", 1)) : (r(), u(W, { key: 2 }, [
2884
- e("span", gs, R(de.value.toLocaleString()), 1),
2892
+ de.value !== S(L) ? (r(), u("span", gs, " (" + R(S(L).toLocaleString()) + " total) ", 1)) : A("", !0)
2893
+ ], 64)) : S(x) === S(L) && de.value === S(L) ? (r(), u("span", ps, R(S(L).toLocaleString()) + " records", 1)) : (r(), u(W, { key: 2 }, [
2894
+ e("span", fs, R(de.value.toLocaleString()), 1),
2885
2895
  o[37] || (o[37] = e("span", { class: "vpg-separator" }, "of", -1)),
2886
2896
  e("span", null, R(S(L).toLocaleString()), 1),
2887
2897
  o[38] || (o[38] = e("span", { class: "vpg-separator" }, "records", -1))
@@ -2892,7 +2902,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2892
2902
  e("span", null, R(S(L).toLocaleString()) + " source records", 1)
2893
2903
  ], 64))
2894
2904
  ]),
2895
- t.enablePagination && te.value === "grid" && xe.value > 1 ? (r(), u("div", ps, [
2905
+ t.enablePagination && te.value === "grid" && xe.value > 1 ? (r(), u("div", ms, [
2896
2906
  e("button", {
2897
2907
  class: "vpg-page-btn",
2898
2908
  disabled: $.value === 1,
@@ -2911,7 +2921,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2911
2921
  d: "M11 19l-7-7 7-7m8 14l-7-7 7-7"
2912
2922
  })
2913
2923
  ], -1)
2914
- ])], 8, fs),
2924
+ ])], 8, hs),
2915
2925
  e("button", {
2916
2926
  class: "vpg-page-btn",
2917
2927
  disabled: $.value === 1,
@@ -2930,8 +2940,8 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2930
2940
  d: "M15 19l-7-7 7-7"
2931
2941
  })
2932
2942
  ], -1)
2933
- ])], 8, ms),
2934
- e("span", hs, " Page " + R($.value) + " of " + R(xe.value), 1),
2943
+ ])], 8, ws),
2944
+ e("span", ks, " Page " + R($.value) + " of " + R(xe.value), 1),
2935
2945
  e("button", {
2936
2946
  class: "vpg-page-btn",
2937
2947
  disabled: $.value === xe.value,
@@ -2950,7 +2960,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2950
2960
  d: "M9 5l7 7-7 7"
2951
2961
  })
2952
2962
  ], -1)
2953
- ])], 8, ws),
2963
+ ])], 8, Cs),
2954
2964
  e("button", {
2955
2965
  class: "vpg-page-btn",
2956
2966
  disabled: $.value === xe.value,
@@ -2969,28 +2979,28 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2969
2979
  d: "M13 5l7 7-7 7M5 5l7 7-7 7"
2970
2980
  })
2971
2981
  ], -1)
2972
- ])], 8, ks)
2973
- ])) : z("", !0),
2974
- te.value === "grid" && Ve.value && Ve.value.count > 1 ? (r(), u("div", Cs, [
2975
- e("span", ys, [
2982
+ ])], 8, ys)
2983
+ ])) : A("", !0),
2984
+ te.value === "grid" && De.value && De.value.count > 1 ? (r(), u("div", bs, [
2985
+ e("span", Fs, [
2976
2986
  o[45] || (o[45] = e("span", { class: "vpg-stat-label" }, "Count:", -1)),
2977
- e("span", bs, R(Ve.value.count), 1)
2987
+ e("span", Ss, R(De.value.count), 1)
2978
2988
  ]),
2979
- Ve.value.numericCount > 0 ? (r(), u(W, { key: 0 }, [
2989
+ De.value.numericCount > 0 ? (r(), u(W, { key: 0 }, [
2980
2990
  o[48] || (o[48] = e("span", { class: "vpg-stat-divider" }, "|", -1)),
2981
- e("span", Fs, [
2991
+ e("span", Rs, [
2982
2992
  o[46] || (o[46] = e("span", { class: "vpg-stat-label" }, "Sum:", -1)),
2983
- e("span", Ss, R(ht(Ve.value.sum)), 1)
2993
+ e("span", $s, R(ht(De.value.sum)), 1)
2984
2994
  ]),
2985
2995
  o[49] || (o[49] = e("span", { class: "vpg-stat-divider" }, "|", -1)),
2986
- e("span", Rs, [
2996
+ e("span", Ms, [
2987
2997
  o[47] || (o[47] = e("span", { class: "vpg-stat-label" }, "Avg:", -1)),
2988
- e("span", $s, R(ht(Ve.value.avg)), 1)
2998
+ e("span", xs, R(ht(De.value.avg)), 1)
2989
2999
  ])
2990
- ], 64)) : z("", !0)
2991
- ])) : z("", !0),
2992
- e("div", Ms, [
2993
- S(y) ? (r(), u("div", xs, [...o[50] || (o[50] = [
3000
+ ], 64)) : A("", !0)
3001
+ ])) : A("", !0),
3002
+ e("div", Ts, [
3003
+ S(y) ? (r(), u("div", Ds, [...o[50] || (o[50] = [
2994
3004
  e("span", { class: "vpg-demo-badge" }, "DEMO", -1),
2995
3005
  e("span", null, "Pro features enabled", -1),
2996
3006
  e("a", {
@@ -2998,13 +3008,13 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
2998
3008
  target: "_blank",
2999
3009
  rel: "noopener"
3000
3010
  }, "Get License →", -1)
3001
- ])])) : S(v) ? (r(), u("span", Ts, [...o[51] || (o[51] = [
3011
+ ])])) : S(v) ? (r(), u("span", Vs, [...o[51] || (o[51] = [
3002
3012
  e("a", {
3003
3013
  href: "https://tiny-pivot.com",
3004
3014
  target: "_blank",
3005
3015
  rel: "noopener"
3006
3016
  }, "TinyPivot", -1)
3007
- ])])) : z("", !0)
3017
+ ])])) : A("", !0)
3008
3018
  ])
3009
3019
  ]),
3010
3020
  t.enableVerticalResize ? (r(), u("div", {
@@ -3017,7 +3027,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
3017
3027
  e("span"),
3018
3028
  e("span")
3019
3029
  ], -1)
3020
- ])], 32)) : z("", !0),
3030
+ ])], 32)) : A("", !0),
3021
3031
  (r(), io(co, { to: "body" }, [
3022
3032
  ne.value ? (r(), u("div", {
3023
3033
  key: 0,
@@ -3030,7 +3040,7 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
3030
3040
  zIndex: 9999
3031
3041
  })
3032
3042
  }, [
3033
- Ye(ln, {
3043
+ Ye(an, {
3034
3044
  "column-id": ne.value,
3035
3045
  "column-name": ne.value,
3036
3046
  stats: S(ee)(ne.value),
@@ -3040,32 +3050,32 @@ const Yo = { class: "vpg-filter-header" }, Zo = { class: "vpg-filter-title" }, J
3040
3050
  onSort: o[14] || (o[14] = (h) => Xt(ne.value, h)),
3041
3051
  onClose: Ge
3042
3052
  }, null, 8, ["column-id", "column-name", "stats", "selected-values", "sort-direction"])
3043
- ], 4)) : z("", !0)
3053
+ ], 4)) : A("", !0)
3044
3054
  ]))
3045
3055
  ], 6));
3046
3056
  }
3047
- }), Hs = /* @__PURE__ */ et(Vs, [["__scopeId", "data-v-d439bb38"]]);
3057
+ }), Ks = /* @__PURE__ */ et(As, [["__scopeId", "data-v-d439bb38"]]);
3048
3058
  export {
3049
- ln as ColumnFilter,
3050
- Hs as DataGrid,
3051
- En as PivotConfig,
3052
- zl as PivotSkeleton,
3053
- Ps as configureLicenseSecret,
3054
- Go as copyToClipboard,
3055
- Ls as enableDemoMode,
3056
- Oo as exportPivotToCSV,
3057
- qo as exportToCSV,
3059
+ an as ColumnFilter,
3060
+ Ks as DataGrid,
3061
+ Bn as PivotConfig,
3062
+ Ll as PivotSkeleton,
3063
+ Ns as configureLicenseSecret,
3064
+ Yo as copyToClipboard,
3065
+ Es as enableDemoMode,
3066
+ Xo as exportPivotToCSV,
3067
+ Go as exportToCSV,
3058
3068
  Co as formatCellValue,
3059
- Xo as formatSelectionForClipboard,
3069
+ Zo as formatSelectionForClipboard,
3060
3070
  Rt as getAggregationLabel,
3061
3071
  ko as getColumnUniqueValues,
3062
- As as setLicenseKey,
3063
- js as useColumnResize,
3064
- Ko as useExcelGrid,
3065
- Ns as useGlobalSearch,
3072
+ Ps as setLicenseKey,
3073
+ Us as useColumnResize,
3074
+ _o as useExcelGrid,
3075
+ js as useGlobalSearch,
3066
3076
  Ie as useLicense,
3067
- Es as usePagination,
3068
- _o as usePivotTable,
3069
- Bs as useRowSelection
3077
+ Bs as usePagination,
3078
+ Oo as usePivotTable,
3079
+ Hs as useRowSelection
3070
3080
  };
3071
3081
  //# sourceMappingURL=tinypivot-vue.js.map