@ninebone/table 0.0.772 โ†’ 0.0.773

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.
@@ -5,7 +5,7 @@ var ps = (T) => {
5
5
  var ws = (T, n, e) => n in T ? bs(T, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[n] = e;
6
6
  var h = (T, n) => bs(T, "name", { value: n, configurable: !0 });
7
7
  var q = (T, n, e) => ws(T, typeof n != "symbol" ? n + "" : n, e), Se = (T, n, e) => n.has(T) || ps("Cannot " + e);
8
- var t = (T, n, e) => (Se(T, n, "read from private field"), e ? e.call(T) : n.get(T)), d = (T, n, e) => n.has(T) ? ps("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(T) : n.set(T, e), p = (T, n, e, s) => (Se(T, n, "write to private field"), s ? s.call(T, e) : n.set(T, e), e), Z = (T, n, e) => (Se(T, n, "access private method"), e);
8
+ var t = (T, n, e) => (Se(T, n, "read from private field"), e ? e.call(T) : n.get(T)), f = (T, n, e) => n.has(T) ? ps("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(T) : n.set(T, e), p = (T, n, e, s) => (Se(T, n, "write to private field"), s ? s.call(T, e) : n.set(T, e), e), Z = (T, n, e) => (Se(T, n, "access private method"), e);
9
9
  var ys = (T, n, e, s) => ({
10
10
  set _(r) {
11
11
  p(T, n, r, e);
@@ -27,13 +27,13 @@ var B, U, E, J, Q, tt, Xt, et, Gt;
27
27
  const Ze = class Ze extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, B);
31
- d(this, U, !1);
32
- d(this, E);
33
- d(this, J);
34
- d(this, Q);
35
- d(this, tt);
36
- d(this, Xt, /* @__PURE__ */ h(() => {
30
+ f(this, B);
31
+ f(this, U, !1);
32
+ f(this, E);
33
+ f(this, J);
34
+ f(this, Q);
35
+ f(this, tt);
36
+ f(this, Xt, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, B)) return;
38
38
  const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (p(this, tt, new ResizeObserver(() => {
@@ -53,15 +53,15 @@ const Ze = class Ze extends HTMLElement {
53
53
  }
54
54
  const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
- const f = Math.max(Math.min(l * (a / c), l), 20);
57
- o.style.width = `${f}px`;
56
+ const d = Math.max(Math.min(l * (a / c), l), 20);
57
+ o.style.width = `${d}px`;
58
58
  const u = e.scrollLeft, b = c - a;
59
59
  let g = 0;
60
- b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
61
- const y = l - f;
60
+ b > 0 && (g = parseInt(u / b * (l - d), 10)), g < 0 && (g = 0);
61
+ const y = l - d;
62
62
  g > y && (g = y), o.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= y - 1;
63
63
  }, "refresh"));
64
- d(this, et, /* @__PURE__ */ h((e) => {
64
+ f(this, et, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, E)) return !1;
66
66
  const s = t(this, E).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
@@ -73,7 +73,7 @@ const Ze = class Ze extends HTMLElement {
73
73
  const l = s.clientWidth, u = r.scrollWidth - l;
74
74
  return c > 0 && u > 0 && (s.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, Gt, /* @__PURE__ */ h(() => {
76
+ f(this, Gt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, J)), clearInterval(t(this, Q));
79
79
  const o = parseInt(t(this, E).thumb.style.left || 0, 10);
@@ -205,12 +205,12 @@ var st, nt, gt, k, qt, Tt, Kt;
205
205
  const Je = class Je extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, st);
209
- d(this, nt);
210
- d(this, gt, !1);
211
- d(this, k);
212
- d(this, qt, 0);
213
- d(this, Tt, 0);
208
+ f(this, st);
209
+ f(this, nt);
210
+ f(this, gt, !1);
211
+ f(this, k);
212
+ f(this, qt, 0);
213
+ f(this, Tt, 0);
214
214
  q(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (S.log("vscrollbar.refresh"), !t(this, st) || !t(this, k)) return;
216
216
  const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, st).data.length, a = t(this, nt).getRowHeight(), c = i * a;
@@ -221,16 +221,16 @@ const Je = class Je extends HTMLElement {
221
221
  this.style.display = "flex";
222
222
  const l = s.clientHeight;
223
223
  if (l <= 0) return;
224
- const f = Math.max(Math.min(l * (o / c), l), 20);
225
- r.style.height = `${f}px`;
224
+ const d = Math.max(Math.min(l * (o / c), l), 20);
225
+ r.style.height = `${d}px`;
226
226
  const u = e.scrollTop, b = Math.max(c - o, 1);
227
227
  S.log(e, u, b);
228
228
  let g = 0;
229
- b > 0 && (g = u / b * (l - f));
230
- const y = l - f;
229
+ b > 0 && (g = u / b * (l - d));
230
+ const y = l - d;
231
231
  g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
232
232
  }, "refresh"));
233
- d(this, Kt, /* @__PURE__ */ h(() => {
233
+ f(this, Kt, /* @__PURE__ */ h(() => {
234
234
  S.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
236
  const o = (t(this, st).data.get() || []).length, i = t(this, nt).getRowHeight();
@@ -255,7 +255,7 @@ const Je = class Je extends HTMLElement {
255
255
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
256
256
  }), t(this, k).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
- const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
258
+ const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, d = e.clientHeight, u = s(), b = Math.max(u - d, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const g = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = g * b;
@@ -356,18 +356,18 @@ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table
356
356
  var j, R, rt, P, D, X, ot, Ct, Be, Pe, Zt, Jt, kt, Lt, It, Qt, te, Ht, Fe, bt, Mt, ee;
357
357
  const Qe = class Qe {
358
358
  constructor(n) {
359
- d(this, j);
360
- d(this, R);
361
- d(this, rt);
362
- d(this, P, /* @__PURE__ */ new Map());
363
- d(this, D, null);
364
- d(this, X, null);
365
- d(this, ot, 0);
366
- d(this, Ct, 40);
367
- d(this, Be, !1);
368
- d(this, Pe, !1);
359
+ f(this, j);
360
+ f(this, R);
361
+ f(this, rt);
362
+ f(this, P, /* @__PURE__ */ new Map());
363
+ f(this, D, null);
364
+ f(this, X, null);
365
+ f(this, ot, 0);
366
+ f(this, Ct, 40);
367
+ f(this, Be, !1);
368
+ f(this, Pe, !1);
369
369
  //#ticking = false; // ๐ŸŽฏ ๊ณ ์† ์Šคํฌ๋กค ์Šค๋กœํ‹€๋ง์šฉ ํ”Œ๋ž˜๊ทธ
370
- d(this, Zt, 3);
370
+ f(this, Zt, 3);
371
371
  q(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  S.log("rowManager.refresh");
@@ -396,8 +396,8 @@ const Qe = class Qe {
396
396
  var u;
397
397
  if (i) return;
398
398
  i = !0;
399
- const l = c.scrollTop, f = c.scrollLeft;
400
- n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, bt).call(this, l), (u = t(this, R).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
399
+ const l = c.scrollTop, d = c.scrollLeft;
400
+ n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== d && (r.scrollLeft = d), o && o.scrollLeft !== d && (o.scrollLeft = d), t(this, bt).call(this, l), (u = t(this, R).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
401
401
  }, "handleContainerScroll");
402
402
  [n, e, s].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", (l) => {
@@ -406,7 +406,7 @@ const Qe = class Qe {
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Jt, /* @__PURE__ */ h((n, e) => {
409
+ f(this, Jt, /* @__PURE__ */ h((n, e) => {
410
410
  S.log("rowManager.#renderRows");
411
411
  const s = t(this, P).get(e);
412
412
  if (!s || s.length === 0) return;
@@ -420,7 +420,7 @@ const Qe = class Qe {
420
420
  });
421
421
  o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, rt).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
- d(this, kt, /* @__PURE__ */ h(() => {
423
+ f(this, kt, /* @__PURE__ */ h(() => {
424
424
  if (t(this, D) !== null && t(this, D) > 0)
425
425
  return t(this, D);
426
426
  const n = t(this, R).querySelector(".ng-container-body .ng-part-body");
@@ -436,7 +436,7 @@ const Qe = class Qe {
436
436
  }), r ? r.before(o) : s.appendChild(o);
437
437
  const i = t(this, R), a = i.style.display, c = i.style.visibility, l = i.style.position;
438
438
  (a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
439
- let f = 0;
439
+ let d = 0;
440
440
  const u = s.querySelectorAll("tr");
441
441
  return u.forEach((b) => {
442
442
  let g = b.offsetHeight || b.getBoundingClientRect().height;
@@ -444,10 +444,10 @@ const Qe = class Qe {
444
444
  const y = window.getComputedStyle(b);
445
445
  g = parseFloat(y.height) || parseFloat(y.minHeight) || 0;
446
446
  }
447
- f += g;
448
- }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, D, f), t(this, It).call(this), t(this, D));
447
+ d += g;
448
+ }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, d <= 0 ? -1 : (p(this, D, d), t(this, It).call(this), t(this, D));
449
449
  }, "#measureAndCacheHeight"));
450
- d(this, Lt, /* @__PURE__ */ h(() => {
450
+ f(this, Lt, /* @__PURE__ */ h(() => {
451
451
  S.log("rowManager.#updateVirtualScrollHeight");
452
452
  const e = (t(this, j).data.get() || []).length, s = t(this, D), r = e * s;
453
453
  S.log("๐Ÿ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
@@ -457,14 +457,14 @@ const Qe = class Qe {
457
457
  a && (a.style.height = `${r}px`);
458
458
  });
459
459
  }, "#updateVirtualScrollHeight"));
460
- d(this, It, /* @__PURE__ */ h(() => {
460
+ f(this, It, /* @__PURE__ */ h(() => {
461
461
  if (t(this, ot) > 0 && t(this, D) > 0) {
462
462
  const n = Math.ceil(t(this, ot) / t(this, D));
463
463
  p(this, Ct, n + t(this, Zt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, Qt, /* @__PURE__ */ h(() => {
467
- var a, c, l, f, u, b;
466
+ f(this, Qt, /* @__PURE__ */ h(() => {
467
+ var a, c, l, d, u, b;
468
468
  const n = t(this, R).querySelector(".ng-container-left .ng-part-body table"), e = t(this, R).querySelector(".ng-container-body .ng-part-body table"), s = t(this, R).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
470
  const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), w = s ? Array.from(s.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, y.length, w.length);
@@ -482,7 +482,7 @@ const Qe = class Qe {
482
482
  const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), w = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], v = Math.max(g.length, y.length, w.length);
483
483
  for (let m = 0; m < v; m++) {
484
484
  const C = [
485
- ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
485
+ ((d = g[m]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
486
486
  ((u = y[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
487
  ((b = w[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
488
  ], A = Math.max(...C);
@@ -490,7 +490,7 @@ const Qe = class Qe {
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
- d(this, te, /* @__PURE__ */ h(() => {
493
+ f(this, te, /* @__PURE__ */ h(() => {
494
494
  !t(this, R) || !(t(this, R) instanceof HTMLElement) || (p(this, X, new ResizeObserver((n) => {
495
495
  for (const e of n) {
496
496
  const s = e.target;
@@ -506,13 +506,13 @@ const Qe = class Qe {
506
506
  }
507
507
  })), t(this, X).observe(t(this, R)));
508
508
  }, "#initResizeObserver"));
509
- d(this, Ht, /* @__PURE__ */ h(() => {
509
+ f(this, Ht, /* @__PURE__ */ h(() => {
510
510
  S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
511
  const e = t(this, R).querySelector(n);
512
512
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Jt).call(this, e, n);
513
513
  }), t(this, ee).call(this), t(this, Qt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, Fe, /* @__PURE__ */ h((n) => {
515
+ f(this, Fe, /* @__PURE__ */ h((n) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
518
  const s = t(this, R).querySelector(e);
@@ -520,18 +520,18 @@ const Qe = class Qe {
520
520
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
521
  if (!r) return;
522
522
  const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, j).data.get() || []).length;
523
- o.forEach((f, u) => {
523
+ o.forEach((d, u) => {
524
524
  const b = n + Math.floor(u / i);
525
525
  if (b >= c) {
526
- f.style.visibility = "hidden";
526
+ d.style.visibility = "hidden";
527
527
  return;
528
528
  }
529
529
  const g = t(this, j).data.get(b);
530
- f.style.display = "", t(this, Mt).call(this, f, g, b);
530
+ d.style.display = "", t(this, Mt).call(this, d, g, b);
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
534
- d(this, bt, /* @__PURE__ */ h((n) => {
534
+ f(this, bt, /* @__PURE__ */ h((n) => {
535
535
  var u, b;
536
536
  const e = t(this, D);
537
537
  if (!e || e <= 0) return;
@@ -542,10 +542,10 @@ const Qe = class Qe {
542
542
  const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
543
543
  let c = Math.floor(a * e);
544
544
  S.log(`๐Ÿ“œ [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && S.log(`๐Ÿ“œ [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
- const l = t(this, rt).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
545
+ const l = t(this, rt).firstTr, d = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
546
  (b = t(this, rt)) == null || b.scrollTables.forEach((g) => {
547
547
  g.style.transform = `translate3d(0, ${c}px, 0)`;
548
- }), f !== a && (S.log(`๐Ÿ”„ [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
548
+ }), d !== a && (S.log(`๐Ÿ”„ [Row Bind Trigger] currentStartIndex(${d}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
549
  const y = t(this, R).querySelector(g);
550
550
  if (!y) return;
551
551
  const w = y.querySelector(".ng-part-body tbody.bindable-tbody");
@@ -575,15 +575,15 @@ const Qe = class Qe {
575
575
  cell.dataset.row = dataIndex;
576
576
  });
577
577
  }; */
578
- d(this, Mt, /* @__PURE__ */ h((n, e, s) => {
578
+ f(this, Mt, /* @__PURE__ */ h((n, e, s) => {
579
579
  n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
580
580
  r.dataset.row = s;
581
581
  const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
582
  i && typeof i.refresh == "function" && i.refresh();
583
583
  });
584
584
  }, "#bindRowData"));
585
- d(this, ee, /* @__PURE__ */ h(() => {
586
- var c, l, f;
585
+ f(this, ee, /* @__PURE__ */ h(() => {
586
+ var c, l, d;
587
587
  S.log("rowManager.#syncHeaderHeights");
588
588
  const n = t(this, R).querySelector(".ng-container-left .ng-part-header table"), e = t(this, R).querySelector(".ng-container-body .ng-part-header table"), s = t(this, R).querySelector(".ng-container-right .ng-part-header table");
589
589
  if (!e) return;
@@ -592,7 +592,7 @@ const Qe = class Qe {
592
592
  const b = [
593
593
  ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
594
  ((l = o[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
- ((f = i[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
595
+ ((d = i[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0
596
596
  ], g = Math.max(...b);
597
597
  g > 0 && (r[u] && (r[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`), i[u] && (i[u].style.height = `${g}px`));
598
598
  }
@@ -626,9 +626,9 @@ const se = class se {
626
626
  if (!n) return null;
627
627
  const e = /* @__PURE__ */ h((a) => {
628
628
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
629
- const f = l.getAttribute("cell-type") || "renderer";
629
+ const d = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
- let u = `cell-${f}`;
631
+ let u = `cell-${d}`;
632
632
  const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), w = l.getAttribute("type");
633
633
  let v = [];
634
634
  b && v.push(`data-bind="${b}"`), g && v.push(`data-expr="${g}"`), y && v.push(`maxbyte="${y}"`), w && v.push(`type="${w}"`), l.innerHTML = `<${u} ${v.join(" ")}></${u}>`;
@@ -637,12 +637,12 @@ const se = class se {
637
637
  });
638
638
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
639
639
  if (!a.querySelector("colgroup")) {
640
- const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
640
+ const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, d = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
641
641
  for (let b = 0; b < l; b++) {
642
642
  const g = document.createElement("col");
643
- g.setAttribute("width", u), f.appendChild(g);
643
+ g.setAttribute("width", u), d.appendChild(g);
644
644
  }
645
- a.prepend(f);
645
+ a.prepend(d);
646
646
  }
647
647
  if (!a.querySelector("thead")) {
648
648
  const c = document.createElement("thead"), l = a.querySelector("colgroup");
@@ -650,10 +650,10 @@ const se = class se {
650
650
  }
651
651
  a.classList.add("nine-table-element");
652
652
  }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
653
- const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), u = l.length;
654
- if (u === 0 || f.length === 0) return;
653
+ const l = Array.from(a.querySelectorAll(c + " tr")), d = Array.from(a.querySelectorAll(c + " th," + c + " td")), u = l.length;
654
+ if (u === 0 || d.length === 0) return;
655
655
  let b = 0;
656
- f.forEach((y) => {
656
+ d.forEach((y) => {
657
657
  b += y.colSpan || 1;
658
658
  });
659
659
  const g = Array.from(Array(u), () => Array(b).fill(null));
@@ -684,8 +684,8 @@ const se = class se {
684
684
  }, "resetColIndex"), o = n.cloneNode(!0);
685
685
  return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
686
686
  const l = a.getAttribute("fixed");
687
- l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
688
- f.setAttribute("fixed", l);
687
+ l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((d) => {
688
+ d.setAttribute("fixed", l);
689
689
  });
690
690
  }), o;
691
691
  }
@@ -696,9 +696,9 @@ let Te = se;
696
696
  var N, Y, V, At, ms;
697
697
  const ts = class ts {
698
698
  constructor(n) {
699
- d(this, V);
700
- d(this, N);
701
- d(this, Y, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
699
+ f(this, V);
700
+ f(this, N);
701
+ f(this, Y, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
702
702
  q(this, "render", /* @__PURE__ */ h(() => {
703
703
  const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, Y);
704
704
  S.log("๐ŸŽจ [CellSelection.render] Rendering range ->", t(this, Y));
@@ -717,11 +717,11 @@ const ts = class ts {
717
717
  o.forEach((a) => {
718
718
  a.querySelectorAll("tbody tr").forEach((c) => {
719
719
  const { matrixRow: l } = Z(this, V, At).call(this, c);
720
- l < 0 || c.querySelectorAll("td, th").forEach((f) => {
721
- const u = parseInt(f.dataset.col, 10);
720
+ l < 0 || c.querySelectorAll("td, th").forEach((d) => {
721
+ const u = parseInt(d.dataset.col, 10);
722
722
  if (isNaN(u)) return;
723
- const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, w = u + g - 1;
724
- y >= n && l <= s && w >= e && u <= r && (i++, f.classList.add("selected"), S.log(f, n, e, s, r), l <= n && f.classList.add("selected-top"), y >= s && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), w >= r && f.classList.add("selected-right"));
723
+ const b = parseInt(d.rowSpan || 1, 10), g = parseInt(d.colSpan || 1, 10), y = l + b - 1, w = u + g - 1;
724
+ y >= n && l <= s && w >= e && u <= r && (i++, d.classList.add("selected"), S.log(d, n, e, s, r), l <= n && d.classList.add("selected-top"), y >= s && d.classList.add("selected-bottom"), u <= e && d.classList.add("selected-left"), w >= r && d.classList.add("selected-right"));
725
725
  });
726
726
  });
727
727
  }), S.log(`โœจ [CellSelection.render] Total rendered cells marked: ${i}`);
@@ -740,9 +740,9 @@ const ts = class ts {
740
740
  const l = t(this, N).querySelectorAll(
741
741
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
742
742
  );
743
- let f = !0, u = 0;
744
- for (; f && u < 5; )
745
- f = !1, u++, l.forEach((b) => {
743
+ let d = !0, u = 0;
744
+ for (; d && u < 5; )
745
+ d = !1, u++, l.forEach((b) => {
746
746
  b.querySelectorAll("tbody tr").forEach((g) => {
747
747
  if (g.classList.contains("nodata")) return;
748
748
  const { matrixRow: y } = Z(this, V, At).call(this, g);
@@ -752,7 +752,7 @@ const ts = class ts {
752
752
  const m = parseInt(w.rowSpan || 1, 10), C = parseInt(w.colSpan || 1, 10), A = y + m - 1, H = v + C - 1;
753
753
  if (A >= o && y <= i && H >= a && v <= c) {
754
754
  const ds = Math.min(o, y), fs = Math.max(i, A), us = Math.min(a, v), gs = Math.max(c, H);
755
- (ds !== o || fs !== i || us !== a || gs !== c) && (o = ds, i = fs, a = us, c = gs, f = !0);
755
+ (ds !== o || fs !== i || us !== a || gs !== c) && (o = ds, i = fs, a = us, c = gs, d = !0);
756
756
  }
757
757
  });
758
758
  });
@@ -800,50 +800,52 @@ N = new WeakMap(), Y = new WeakMap(), V = new WeakSet(), At = /* @__PURE__ */ h(
800
800
  if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
801
801
  const y = g.closest("tr"), { matrixRow: w } = Z(this, V, At).call(this, y), v = parseInt(g.dataset.col, 10);
802
802
  w < 0 || a === w && c === v || (a = w, c = v, this.setRange(o, i, w, v));
803
- }, "onMouseMove"), f = /* @__PURE__ */ h(() => {
804
- S.log("๐Ÿ–ฑ๏ธ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", f);
803
+ }, "onMouseMove"), d = /* @__PURE__ */ h(() => {
804
+ S.log("๐Ÿ–ฑ๏ธ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", d);
805
805
  }, "onMouseUp");
806
- document.addEventListener("mousemove", l), document.addEventListener("mouseup", f);
806
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", d);
807
807
  });
808
808
  }, "#initEvents"), h(ts, "CellSelection");
809
809
  let Ce = ts;
810
810
  var F, it, ne, re, $t, Nt, _t, Dt, oe, xs;
811
811
  const es = class es {
812
812
  constructor(n) {
813
- d(this, oe);
814
- d(this, F);
815
- d(this, it, null);
816
- d(this, ne, -1);
817
- d(this, re, -1);
818
- d(this, $t, /* @__PURE__ */ h((n, e, s) => {
813
+ f(this, oe);
814
+ f(this, F);
815
+ f(this, it, null);
816
+ f(this, ne, -1);
817
+ f(this, re, -1);
818
+ // ๐ŸŽฏ ๋ณ‘ํ•ฉ๋œ ์…€(colSpan) ๋ฒ”์œ„๋ฅผ ์™„๋ฒฝํ•˜๊ฒŒ ๊ณ ๋ คํ•œ ๋‹ค์Œ ์ปฌ๋Ÿผ ํƒ์ƒ‰
819
+ f(this, $t, /* @__PURE__ */ h((n, e, s) => {
819
820
  const r = t(this, _t).call(this, n, e);
820
821
  if (!r) return s + 1;
821
- const o = Array.from(r.querySelectorAll("th, td"));
822
- let i = !1, a = s + 1;
823
- for (const c of o) {
824
- const l = parseInt(c.dataset.col, 10), f = parseInt(c.colSpan || 1, 10);
825
- if (l === s) {
826
- a = s + f, i = !0;
822
+ let o = s + 1;
823
+ const i = Array.from(r.querySelectorAll("td"));
824
+ for (const a of i) {
825
+ const c = parseInt(a.dataset.col, 10), l = parseInt(a.colSpan || 1, 10);
826
+ if (s >= c && s < c + l) {
827
+ o = c + l;
827
828
  break;
828
829
  }
829
830
  }
830
- return i ? a : s + 1;
831
+ return o;
831
832
  }, "#getNextCol"));
832
- d(this, Nt, /* @__PURE__ */ h((n, e, s) => {
833
+ // ๐ŸŽฏ ๋ณ‘ํ•ฉ๋œ ์…€(colSpan) ๋ฒ”์œ„๋ฅผ ๊ณ ๋ คํ•œ ์ด์ „ ์ปฌ๋Ÿผ ํƒ์ƒ‰
834
+ f(this, Nt, /* @__PURE__ */ h((n, e, s) => {
833
835
  const r = t(this, _t).call(this, n, e);
834
836
  if (!r) return Math.max(0, s - 1);
835
- const o = Array.from(r.querySelectorAll("th, td"));
836
- let i = Math.max(0, s - 1);
837
- for (const a of o) {
838
- const c = parseInt(a.dataset.col, 10), l = parseInt(a.colSpan || 1, 10);
839
- if (c + l === s) {
840
- i = c;
837
+ let o = Math.max(0, s - 1);
838
+ const i = Array.from(r.querySelectorAll("td"));
839
+ for (const a of i) {
840
+ const c = parseInt(a.dataset.col, 10);
841
+ if (c < s)
842
+ o = c;
843
+ else
841
844
  break;
842
- }
843
845
  }
844
- return i;
846
+ return o;
845
847
  }, "#getPreviousCol"));
846
- d(this, _t, /* @__PURE__ */ h((n, e) => {
848
+ f(this, _t, /* @__PURE__ */ h((n, e) => {
847
849
  const s = t(this, F).querySelectorAll(
848
850
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
849
851
  );
@@ -854,16 +856,19 @@ const es = class es {
854
856
  }
855
857
  return null;
856
858
  }, "#findTargetTr"));
857
- d(this, Dt, /* @__PURE__ */ h((n, e, s) => {
859
+ f(this, Dt, /* @__PURE__ */ h((n, e, s) => {
858
860
  const r = t(this, F).querySelectorAll(
859
861
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
860
862
  );
861
863
  for (const o of r) {
862
864
  const c = Array.from(o.querySelectorAll("tbody tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === n)[e];
863
865
  if (c) {
864
- const l = c.querySelector(`[data-col="${s}"]`);
865
- if (l && window.getComputedStyle(l).display !== "none")
866
- return l;
866
+ const l = Array.from(c.querySelectorAll("td"));
867
+ for (const d of l) {
868
+ const u = parseInt(d.dataset.col, 10), b = parseInt(d.colSpan || 1, 10);
869
+ if (!isNaN(u) && s >= u && s < u + b && window.getComputedStyle(d).display !== "none")
870
+ return d;
871
+ }
867
872
  }
868
873
  }
869
874
  return null;
@@ -881,8 +886,8 @@ const es = class es {
881
886
  p(this, ne, e), p(this, re, s);
882
887
  const r = n.closest("tr"), o = r == null ? void 0 : r.closest("tbody");
883
888
  if (o) {
884
- const a = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((u) => parseInt(u.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), f = e * c + (l >= 0 ? l : 0);
885
- t(this, F).selection.setRange(f, s, f, s);
889
+ const a = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((u) => parseInt(u.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), d = e * c + (l >= 0 ? l : 0);
890
+ t(this, F).selection.setRange(d, s, d, s);
886
891
  }
887
892
  }
888
893
  }
@@ -891,23 +896,23 @@ const es = class es {
891
896
  if (!t(this, it)) return;
892
897
  const e = t(this, it), s = e.closest("tr"), r = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), i = s == null ? void 0 : s.closest("tbody");
893
898
  if (!i) return;
894
- const c = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((A) => parseInt(A.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, f = c.indexOf(s);
895
- let u = r, b = f, g = o;
899
+ const c = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((A) => parseInt(A.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, d = c.indexOf(s);
900
+ let u = r, b = d, g = o;
896
901
  switch (n.code) {
897
902
  case "Tab":
898
- n.preventDefault(), g = n.shiftKey ? t(this, Nt).call(this, r, f, o) : t(this, $t).call(this, r, f, o);
903
+ n.preventDefault(), g = n.shiftKey ? t(this, Nt).call(this, r, d, o) : t(this, $t).call(this, r, d, o);
899
904
  break;
900
905
  case "ArrowRight":
901
- g = t(this, $t).call(this, r, f, o);
906
+ g = t(this, $t).call(this, r, d, o);
902
907
  break;
903
908
  case "ArrowLeft":
904
- g = t(this, Nt).call(this, r, f, o);
909
+ g = t(this, Nt).call(this, r, d, o);
905
910
  break;
906
911
  case "ArrowDown":
907
- n.preventDefault(), f < l - 1 ? b = f + 1 : (u = r + 1, b = 0);
912
+ n.preventDefault(), d < l - 1 ? b = d + 1 : (u = r + 1, b = 0);
908
913
  break;
909
914
  case "ArrowUp":
910
- n.preventDefault(), f > 0 ? b = f - 1 : (u = r - 1, b = l - 1);
915
+ n.preventDefault(), d > 0 ? b = d - 1 : (u = r - 1, b = l - 1);
911
916
  break;
912
917
  }
913
918
  let y = t(this, Dt).call(this, u, b, g);
@@ -932,11 +937,11 @@ var ie, at, lt, Ot, Wt, ae, le, pt, ce, he;
932
937
  const Rt = class Rt extends HTMLElement {
933
938
  constructor() {
934
939
  super();
935
- d(this, ie);
936
- d(this, at, null);
937
- d(this, lt);
938
- d(this, Ot);
939
- d(this, Wt);
940
+ f(this, ie);
941
+ f(this, at, null);
942
+ f(this, lt);
943
+ f(this, Ot);
944
+ f(this, Wt);
940
945
  q(this, "invalidate", /* @__PURE__ */ h(() => {
941
946
  S.log("sheet.invalidate()"), t(this, lt).refresh();
942
947
  }, "invalidate"));
@@ -949,7 +954,7 @@ const Rt = class Rt extends HTMLElement {
949
954
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
950
955
  }, 0);
951
956
  }, "generate"));
952
- d(this, ae, /* @__PURE__ */ h(() => {
957
+ f(this, ae, /* @__PURE__ */ h(() => {
953
958
  [
954
959
  { selector: ".ng-container-body", type: null },
955
960
  { selector: ".ng-container-left", type: "left" },
@@ -959,7 +964,7 @@ const Rt = class Rt extends HTMLElement {
959
964
  (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, pt).call(this, t(this, at), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, pt).call(this, t(this, at), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, pt).call(this, t(this, at), r, "footer"));
960
965
  });
961
966
  }, "#renderSplitContainers"));
962
- d(this, le, /* @__PURE__ */ h(() => {
967
+ f(this, le, /* @__PURE__ */ h(() => {
963
968
  ["left", "right", "body"].forEach((e) => {
964
969
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
965
970
  if (!s || !r || r.length === 0) return;
@@ -974,12 +979,12 @@ const Rt = class Rt extends HTMLElement {
974
979
  }));
975
980
  });
976
981
  }, "#updateContainerWidths"));
977
- d(this, pt, /* @__PURE__ */ h((e, s, r) => {
982
+ f(this, pt, /* @__PURE__ */ h((e, s, r) => {
978
983
  const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
979
984
  if (r === "header") {
980
985
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
981
- const f = document.createElement("tbody");
982
- f.className = "fixed-tbody", o.appendChild(f);
986
+ const d = document.createElement("tbody");
987
+ d.className = "fixed-tbody", o.appendChild(d);
983
988
  }
984
989
  } else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
985
990
  return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -999,10 +1004,10 @@ const Rt = class Rt extends HTMLElement {
999
1004
  const s = this.querySelector(".ng-container-body .ng-part-body");
1000
1005
  s && (s.scrollTop = e);
1001
1006
  }, "scrollToY"));
1002
- d(this, ce, /* @__PURE__ */ h(() => {
1007
+ f(this, ce, /* @__PURE__ */ h(() => {
1003
1008
  t(this, he).call(this), p(this, Ot, new Ce(this)), p(this, Wt, new ke(this));
1004
1009
  }, "#init"));
1005
- d(this, he, /* @__PURE__ */ h(() => {
1010
+ f(this, he, /* @__PURE__ */ h(() => {
1006
1011
  const e = Rt.SCROLLBAR_SIZE;
1007
1012
  this.innerHTML = `
1008
1013
  <style>
@@ -1226,7 +1231,7 @@ var de, zt;
1226
1231
  const ss = class ss extends HTMLElement {
1227
1232
  constructor() {
1228
1233
  super();
1229
- d(this, de, /* @__PURE__ */ h(() => {
1234
+ f(this, de, /* @__PURE__ */ h(() => {
1230
1235
  var e;
1231
1236
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1232
1237
  var i;
@@ -1234,35 +1239,35 @@ const ss = class ss extends HTMLElement {
1234
1239
  t(this, zt).call(this, o, r);
1235
1240
  }), t(this, zt).call(this, 0, !1);
1236
1241
  }, "#init"));
1237
- d(this, zt, /* @__PURE__ */ h((e, s = !1) => {
1242
+ f(this, zt, /* @__PURE__ */ h((e, s = !1) => {
1238
1243
  const r = /* @__PURE__ */ h(() => {
1239
- const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1244
+ const d = Array.from(this.querySelectorAll("nine-table-sheet"));
1240
1245
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1241
- const b = f.filter((g) => g.classList.contains("active"));
1246
+ const b = d.filter((g) => g.classList.contains("active"));
1242
1247
  b.length < 2 || b.forEach((g) => {
1243
- const y = parseInt(g.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${y}"]`), v = f[y + 1];
1248
+ const y = parseInt(g.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${y}"]`), v = d[y + 1];
1244
1249
  w && v && v.classList.contains("active") && w.style.setProperty("display", "flex");
1245
1250
  });
1246
1251
  }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1247
1252
  if (!a[e]) return;
1248
1253
  if (!s)
1249
- a.forEach((f, u) => {
1250
- f.classList.toggle("active", u === e);
1251
- }), c.forEach((f, u) => {
1254
+ a.forEach((d, u) => {
1255
+ d.classList.toggle("active", u === e);
1256
+ }), c.forEach((d, u) => {
1252
1257
  const b = u === e;
1253
- f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
1258
+ d.classList.toggle("active", b), d.style.flex = b ? "1 1 100%" : "";
1254
1259
  });
1255
1260
  else {
1256
- const f = a[e], u = o.querySelectorAll(".nine-tab-item.active");
1257
- if (f.classList.contains("active") && u.length <= 1)
1261
+ const d = a[e], u = o.querySelectorAll(".nine-tab-item.active");
1262
+ if (d.classList.contains("active") && u.length <= 1)
1258
1263
  return;
1259
- f.classList.toggle("active");
1264
+ d.classList.toggle("active");
1260
1265
  const b = i.querySelector(`nine-table-sheet[data-index="${e}"]`);
1261
1266
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1262
1267
  }
1263
1268
  const l = i.querySelectorAll("nine-table-sheet.active");
1264
- l == null || l.forEach((f) => {
1265
- f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1269
+ l == null || l.forEach((d) => {
1270
+ d.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1266
1271
  }), r();
1267
1272
  }, "#switchSheet"));
1268
1273
  }
@@ -1276,21 +1281,21 @@ customElements.get("nine-table-sheets") || customElements.define("nine-table-she
1276
1281
  var _, fe, Bt, ue;
1277
1282
  const ns = class ns {
1278
1283
  constructor(n) {
1279
- d(this, _);
1280
- d(this, fe, /* @__PURE__ */ h(() => {
1284
+ f(this, _);
1285
+ f(this, fe, /* @__PURE__ */ h(() => {
1281
1286
  t(this, ue).call(this), new ResizeObserver((n) => {
1282
1287
  for (let e of n)
1283
1288
  t(this, _).getAttribute("auto-height") === "true" && t(this, Bt).call(this);
1284
1289
  }).observe(t(this, _));
1285
1290
  }, "#init"));
1286
- d(this, Bt, /* @__PURE__ */ h(() => {
1291
+ f(this, Bt, /* @__PURE__ */ h(() => {
1287
1292
  var c, l;
1288
1293
  const n = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1289
1294
  if (n.length === 0) return;
1290
- const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Ut.SCROLLBAR_SIZE, a = e * s + r + o + i;
1295
+ const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((d) => d.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Ut.SCROLLBAR_SIZE, a = e * s + r + o + i;
1291
1296
  t(this, _).style.height = `${a}px`;
1292
1297
  }, "#applyAutoHeight"));
1293
- d(this, ue, /* @__PURE__ */ h(() => {
1298
+ f(this, ue, /* @__PURE__ */ h(() => {
1294
1299
  const e = Array.from(t(this, _).children).filter((c) => c.tagName === "TABLE"), s = t(this, _).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1295
1300
  const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1296
1301
  return u + b;
@@ -1431,8 +1436,8 @@ let Ie = ns;
1431
1436
  var Pt, yt;
1432
1437
  const rs = class rs {
1433
1438
  constructor(n) {
1434
- d(this, Pt);
1435
- d(this, yt, -1);
1439
+ f(this, Pt);
1440
+ f(this, yt, -1);
1436
1441
  q(this, "count", /* @__PURE__ */ h(() => t(this, Pt).rawRecords.length, "count"));
1437
1442
  p(this, Pt, n);
1438
1443
  }
@@ -1449,13 +1454,13 @@ let He = rs;
1449
1454
  var O, L, W, mt, ge, G, be, ct, Ft, pe, ye, xt;
1450
1455
  const z = class z {
1451
1456
  constructor(n, e) {
1452
- d(this, O);
1453
- d(this, L);
1454
- d(this, W, []);
1455
- d(this, mt, []);
1456
- d(this, ge, 0);
1457
- d(this, G, []);
1458
- d(this, be, /* @__PURE__ */ h(() => {
1457
+ f(this, O);
1458
+ f(this, L);
1459
+ f(this, W, []);
1460
+ f(this, mt, []);
1461
+ f(this, ge, 0);
1462
+ f(this, G, []);
1463
+ f(this, be, /* @__PURE__ */ h(() => {
1459
1464
  p(this, G, []);
1460
1465
  const n = t(this, O).template || [];
1461
1466
  Array.from(n).forEach((e) => {
@@ -1465,7 +1470,7 @@ const z = class z {
1465
1470
  e.__ng || (e.__ng = t(this, Ft).call(this)), e.__ng.height = t(this, G).slice();
1466
1471
  });
1467
1472
  }, "#initialize"));
1468
- d(this, ct, /* @__PURE__ */ h(() => {
1473
+ f(this, ct, /* @__PURE__ */ h(() => {
1469
1474
  const n = t(this, O).shadowRoot.querySelector("nine-table-sheets");
1470
1475
  n == null || n.classList.toggle("nodata", this.length === 0), t(this, O).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1471
1476
  e.invalidate();
@@ -1487,7 +1492,7 @@ const z = class z {
1487
1492
  q(this, "set", /* @__PURE__ */ h((n) => {
1488
1493
  this.clear(), this.add(n, !1), t(this, ct).call(this);
1489
1494
  }, "set"));
1490
- d(this, Ft, /* @__PURE__ */ h(() => ({
1495
+ f(this, Ft, /* @__PURE__ */ h(() => ({
1491
1496
  rowState: z.ROW_STATE.EMPTY,
1492
1497
  deleted: !1,
1493
1498
  filtered: !1,
@@ -1503,7 +1508,7 @@ const z = class z {
1503
1508
  var n;
1504
1509
  t(this, L).rawRecords = [], p(this, W, []), p(this, mt, []), (n = t(this, L).viewRecords) != null && n.reset && t(this, L).viewRecords.reset();
1505
1510
  }, "clear"));
1506
- d(this, pe, /* @__PURE__ */ h((n) => {
1511
+ f(this, pe, /* @__PURE__ */ h((n) => {
1507
1512
  var r;
1508
1513
  Array.isArray(n) || (n = [n]);
1509
1514
  const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(n[0] || {}), s = [];
@@ -1514,7 +1519,7 @@ const z = class z {
1514
1519
  }), s.push(i);
1515
1520
  }), s;
1516
1521
  }, "#json2Array"));
1517
- d(this, ye, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1522
+ f(this, ye, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1518
1523
  e.__ng = t(this, Ft).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = z.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1519
1524
  }), n), "#defaultInsert"));
1520
1525
  q(this, "add", /* @__PURE__ */ h((n, e = !0) => {
@@ -1556,13 +1561,13 @@ const z = class z {
1556
1561
  });
1557
1562
  }, "resetRecords"));
1558
1563
  q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, L).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1559
- d(this, xt, /* @__PURE__ */ h((n) => {
1564
+ f(this, xt, /* @__PURE__ */ h((n) => {
1560
1565
  var i;
1561
1566
  if (!n) return n;
1562
1567
  const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, O).fields) == null ? void 0 : i.get) == "function" ? t(this, O).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1563
1568
  const c = {};
1564
- return r.forEach((l, f) => {
1565
- c[l] = a.v ? a.v[f] : a[l];
1569
+ return r.forEach((l, d) => {
1570
+ c[l] = a.v ? a.v[d] : a[l];
1566
1571
  }), c.__ng = a.__ng, c;
1567
1572
  });
1568
1573
  return e ? o[0] : o;
@@ -1601,7 +1606,7 @@ let Me = z;
1601
1606
  var ht;
1602
1607
  const os = class os {
1603
1608
  constructor(n) {
1604
- d(this, ht);
1609
+ f(this, ht);
1605
1610
  p(this, ht, n), this.row = new He(this), this.data = new Me(t(this, ht), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1606
1611
  var e;
1607
1612
  (e = t(this, ht).view) != null && e.redraw && t(this, ht).view.redraw();
@@ -1625,20 +1630,20 @@ var wt, M, jt, me;
1625
1630
  const is = class is {
1626
1631
  // ๐ŸŽฏ ์ด์ œ { name: string, type: string } ๊ฐ์ฒด๋“ค์˜ ๋ฐฐ์—ด๋กœ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
1627
1632
  constructor(n) {
1628
- d(this, wt);
1629
- d(this, M, []);
1633
+ f(this, wt);
1634
+ f(this, M, []);
1630
1635
  q(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1631
1636
  n.forEach((s) => {
1632
1637
  t(this, M).some((r) => r.name === s) || t(this, M).push({ name: s, type: e });
1633
1638
  }), t(this, jt).call(this);
1634
1639
  }, "add"));
1635
- d(this, jt, /* @__PURE__ */ h(() => {
1640
+ f(this, jt, /* @__PURE__ */ h(() => {
1636
1641
  const n = /* @__PURE__ */ new Map();
1637
1642
  t(this, M).forEach((e) => {
1638
1643
  n.set(e.name, e.type);
1639
1644
  }), p(this, M, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1640
1645
  }, "#adjust"));
1641
- d(this, me, /* @__PURE__ */ h(() => {
1646
+ f(this, me, /* @__PURE__ */ h(() => {
1642
1647
  p(this, M, []), S.log(t(this, wt).querySelectorAll("table"));
1643
1648
  const n = Array.from(t(this, wt).querySelectorAll("table"));
1644
1649
  if (!(!n || n.length === 0)) {
@@ -1699,9 +1704,9 @@ const as = class as extends HTMLElement {
1699
1704
  constructor() {
1700
1705
  super();
1701
1706
  //#created = false;
1702
- d(this, dt);
1703
- d(this, xe);
1704
- d(this, we, /* @__PURE__ */ h(() => {
1707
+ f(this, dt);
1708
+ f(this, xe);
1709
+ f(this, we, /* @__PURE__ */ h(() => {
1705
1710
  this.fields = new Ne(this), p(this, xe, new Ie(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1706
1711
  }, "#init"));
1707
1712
  this.attachShadow({ mode: "open" }), p(this, dt, new $e(this));
@@ -1745,13 +1750,13 @@ var I, Yt, x, je, Ye, Ve, Ue, Xe;
1745
1750
  const ls = class ls extends De {
1746
1751
  constructor() {
1747
1752
  super();
1748
- d(this, I);
1749
- d(this, Yt);
1750
- d(this, x);
1751
- d(this, je);
1752
- d(this, Ye);
1753
- d(this, Ve);
1754
- d(this, Ue);
1753
+ f(this, I);
1754
+ f(this, Yt);
1755
+ f(this, x);
1756
+ f(this, je);
1757
+ f(this, Ye);
1758
+ f(this, Ve);
1759
+ f(this, Ue);
1755
1760
  q(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1756
1761
  if (t(this, x))
1757
1762
  if (t(this, x).closest("tbody")) {
@@ -1772,7 +1777,7 @@ const ls = class ls extends De {
1772
1777
  } catch {
1773
1778
  }
1774
1779
  }, "getDisplayText"));
1775
- d(this, Xe, /* @__PURE__ */ h(() => {
1780
+ f(this, Xe, /* @__PURE__ */ h(() => {
1776
1781
  if (!(!t(this, I) || !t(this, I).template || !t(this, x).closest("tbody.bindable"))) {
1777
1782
  var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
1778
1783
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
@@ -1785,9 +1790,9 @@ const ls = class ls extends De {
1785
1790
  if (parseInt(s.sectionRowIndex / t(this, I).template.length) > 0)
1786
1791
  for (var i of r) {
1787
1792
  if (i > e) break;
1788
- var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, f = t(this, I).data.get(c);
1793
+ var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, d = t(this, I).data.get(c);
1789
1794
  t(this, x).dataset.matrixRow;
1790
- var u = t(this, I).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, x).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1795
+ var u = t(this, I).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, x).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, d, c) : d[u.dataset.bind];
1791
1796
  if (b != g) {
1792
1797
  o = !0;
1793
1798
  break;
@@ -1856,12 +1861,12 @@ var Vt, ft, vt, St, ve, K, Ge;
1856
1861
  const hs = class hs extends We {
1857
1862
  constructor() {
1858
1863
  super();
1859
- d(this, Vt);
1860
- d(this, ft);
1861
- d(this, vt);
1862
- d(this, St);
1863
- d(this, ve);
1864
- d(this, K);
1864
+ f(this, Vt);
1865
+ f(this, ft);
1866
+ f(this, vt);
1867
+ f(this, St);
1868
+ f(this, ve);
1869
+ f(this, K);
1865
1870
  q(this, "refresh", /* @__PURE__ */ h(() => {
1866
1871
  const e = super.refresh();
1867
1872
  t(this, Vt).value = e;
@@ -1896,7 +1901,7 @@ const hs = class hs extends We {
1896
1901
  if (!v) this.reset();
1897
1902
  };
1898
1903
  */
1899
- d(this, Ge, /* @__PURE__ */ h((e) => {
1904
+ f(this, Ge, /* @__PURE__ */ h((e) => {
1900
1905
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1901
1906
  if (t(this, ft) == "number") {
1902
1907
  let o = [];