@ninebone/table 0.0.685 β†’ 0.0.687

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.
@@ -2,16 +2,16 @@ var Fe = Object.defineProperty;
2
2
  var Ve = (q) => {
3
3
  throw TypeError(q);
4
4
  };
5
- var Xe = (q, i, e) => i in q ? Fe(q, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[i] = e;
6
- var h = (q, i) => Fe(q, "name", { value: i, configurable: !0 });
7
- var E = (q, i, e) => Xe(q, typeof i != "symbol" ? i + "" : i, e), Ye = (q, i, e) => i.has(q) || Ve("Cannot " + e);
8
- var t = (q, i, e) => (Ye(q, i, "read from private field"), e ? e.call(q) : i.get(q)), d = (q, i, e) => i.has(q) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(q) : i.set(q, e), y = (q, i, e, s) => (Ye(q, i, "write to private field"), s ? s.call(q, e) : i.set(q, e), e);
9
- var Ue = (q, i, e, s) => ({
10
- set _(r) {
11
- y(q, i, r, e);
5
+ var Xe = (q, r, e) => r in q ? Fe(q, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[r] = e;
6
+ var h = (q, r) => Fe(q, "name", { value: r, configurable: !0 });
7
+ var E = (q, r, e) => Xe(q, typeof r != "symbol" ? r + "" : r, e), Ye = (q, r, e) => r.has(q) || Ve("Cannot " + e);
8
+ var t = (q, r, e) => (Ye(q, r, "read from private field"), e ? e.call(q) : r.get(q)), d = (q, r, e) => r.has(q) ? Ve("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(q) : r.set(q, e), y = (q, r, e, s) => (Ye(q, r, "write to private field"), s ? s.call(q, e) : r.set(q, e), e);
9
+ var Ue = (q, r, e, s) => ({
10
+ set _(i) {
11
+ y(q, r, i, e);
12
12
  },
13
13
  get _() {
14
- return t(q, i, s);
14
+ return t(q, r, s);
15
15
  }
16
16
  });
17
17
  import { trace as Ke } from "@ninebone/util";
@@ -44,14 +44,14 @@ const $e = class $e extends HTMLElement {
44
44
  if (!t(this, z) || !t(this, S) || t(this, j)) return;
45
45
  const e = t(this, S).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, S).track, n = t(this, S).thumb, o = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
47
+ const i = t(this, S).track, n = t(this, S).thumb, o = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  o && (o.style.display = "flex");
50
50
  else {
51
51
  o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
- const l = r.clientWidth;
54
+ const l = i.clientWidth;
55
55
  if (l <= 0) return;
56
56
  const f = Math.max(Math.min(l * (a / c), l), 20);
57
57
  n.style.width = `${f}px`;
@@ -63,43 +63,43 @@ const $e = class $e extends HTMLElement {
63
63
  }, "refresh"));
64
64
  d(this, G, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, S)) return !1;
66
- const s = t(this, S).container, r = s.querySelector("table");
67
- if (!r) return !1;
66
+ const s = t(this, S).container, i = s.querySelector("table");
67
+ if (!i) return !1;
68
68
  const n = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
71
  const c = n.width - o;
72
72
  a > c && (a = c), a = parseInt(a, 10), t(this, S).thumb.style.left = `${a}px`, t(this, S).left.disabled = a === 0, t(this, S).right.disabled = a >= c - 1;
73
- const l = s.clientWidth, u = r.scrollWidth - l;
73
+ const l = s.clientWidth, u = i.scrollWidth - l;
74
74
  return c > 0 && u > 0 && (s.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Nt, /* @__PURE__ */ h(() => {
77
- const e = /* @__PURE__ */ h((r) => {
77
+ const e = /* @__PURE__ */ h((i) => {
78
78
  clearInterval(t(this, X)), clearInterval(t(this, K));
79
79
  const n = parseInt(t(this, S).thumb.style.left || 0, 10);
80
- t(this, G).call(this, n + r), y(this, X, setInterval(() => {
80
+ t(this, G).call(this, n + i), y(this, X, setInterval(() => {
81
81
  clearInterval(t(this, X)), y(this, K, setInterval(() => {
82
82
  const o = parseInt(t(this, S).thumb.style.left || 0, 10);
83
- t(this, G).call(this, o + r) || clearInterval(t(this, K));
83
+ t(this, G).call(this, o + i) || clearInterval(t(this, K));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, X)), clearInterval(t(this, K));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, S).left.addEventListener(r, s), t(this, S).right.addEventListener(r, s), t(this, S).track.addEventListener(r, s);
91
- }), t(this, S).left.addEventListener("mousedown", (r) => {
92
- r.button === 0 && e(-20);
93
- }), t(this, S).right.addEventListener("mousedown", (r) => {
94
- r.button === 0 && e(20);
95
- }), t(this, S).left.addEventListener("touchstart", () => e(-20)), t(this, S).right.addEventListener("touchstart", () => e(20)), t(this, S).track.addEventListener("mousedown", (r) => {
96
- if (r.button !== 0) return;
97
- r.preventDefault();
89
+ ["mouseup", "mouseleave", "touchend"].forEach((i) => {
90
+ t(this, S).left.addEventListener(i, s), t(this, S).right.addEventListener(i, s), t(this, S).track.addEventListener(i, s);
91
+ }), t(this, S).left.addEventListener("mousedown", (i) => {
92
+ i.button === 0 && e(-20);
93
+ }), t(this, S).right.addEventListener("mousedown", (i) => {
94
+ i.button === 0 && e(20);
95
+ }), t(this, S).left.addEventListener("touchstart", () => e(-20)), t(this, S).right.addEventListener("touchstart", () => e(20)), t(this, S).track.addEventListener("mousedown", (i) => {
96
+ if (i.button !== 0) return;
97
+ i.preventDefault();
98
98
  const n = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientWidth;
99
- t(this, G).call(this, r.clientX - n.left - o / 2);
100
- }), t(this, S).thumb.addEventListener("mousedown", (r) => {
101
- if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), y(this, j, !0), this.shiftX = r.clientX - t(this, S).thumb.getBoundingClientRect().left;
99
+ t(this, G).call(this, i.clientX - n.left - o / 2);
100
+ }), t(this, S).thumb.addEventListener("mousedown", (i) => {
101
+ if (i.button !== 0) return;
102
+ i.stopPropagation(), i.preventDefault(), y(this, j, !0), this.shiftX = i.clientX - t(this, S).thumb.getBoundingClientRect().left;
103
103
  const n = /* @__PURE__ */ h((a) => {
104
104
  if (!t(this, j)) return;
105
105
  const c = t(this, S).track.getBoundingClientRect();
@@ -212,8 +212,8 @@ const Me = class Me extends HTMLElement {
212
212
  d(this, vt, 0);
213
213
  d(this, xt, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (!t(this, F) || !t(this, k)) return;
216
- const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, n = e.clientHeight, o = t(this, F).data.length, a = t(this, at).getRowHeight(), c = o * a;
215
+ if (R.log("vscrollbar.refresh"), R.log(t(this, k)), !t(this, F) || !t(this, k)) return;
216
+ const e = t(this, k).container, s = t(this, k).track, i = t(this, k).thumb, n = e.clientHeight, o = t(this, F).data.length, a = t(this, at).getRowHeight(), c = o * a;
217
217
  if (c <= n || o === 0) {
218
218
  this.style.display = "none";
219
219
  return;
@@ -222,12 +222,12 @@ const Me = class Me extends HTMLElement {
222
222
  const l = s.clientHeight;
223
223
  if (l <= 0) return;
224
224
  const f = Math.max(Math.min(l * (n / c), l), 20);
225
- r.style.height = `${f}px`;
225
+ i.style.height = `${f}px`;
226
226
  const u = e.scrollTop, b = Math.max(c - n, 1);
227
227
  let g = 0;
228
228
  b > 0 && (g = u / b * (l - f));
229
229
  const v = l - f;
230
- g < 0 && (g = 0), g > v && (g = v), r.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
230
+ g < 0 && (g = 0), g > v && (g = v), i.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
231
231
  }, "refresh"));
232
232
  d(this, Wt, /* @__PURE__ */ h(() => {
233
233
  R.log("nine-table-vscrollbar.#init");
@@ -237,9 +237,9 @@ const Me = class Me extends HTMLElement {
237
237
  }, "getContentHeight");
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, J) || this.refresh();
240
- }), t(this, k).thumb.addEventListener("mousedown", (r) => {
241
- if (r.button !== 0) return;
242
- r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, vt, r.clientY), y(this, xt, e.scrollTop);
240
+ }), t(this, k).thumb.addEventListener("mousedown", (i) => {
241
+ if (i.button !== 0) return;
242
+ i.stopPropagation(), i.preventDefault(), y(this, J, !0), y(this, vt, i.clientY), y(this, xt, e.scrollTop);
243
243
  const n = /* @__PURE__ */ h((a) => {
244
244
  if (!t(this, J)) return;
245
245
  const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, vt), g = e.clientHeight, v = s(), w = Math.max(v - g, 1);
@@ -254,9 +254,9 @@ const Me = class Me extends HTMLElement {
254
254
  y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
255
255
  }, "onMouseUp");
256
256
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
257
- }), t(this, k).track.addEventListener("mousedown", (r) => {
258
- if (r.button !== 0 || r.target === t(this, k).thumb) return;
259
- const n = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
257
+ }), t(this, k).track.addEventListener("mousedown", (i) => {
258
+ if (i.button !== 0 || i.target === t(this, k).thumb) return;
259
+ const n = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = i.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
260
260
  if (l > 0 && b > 0) {
261
261
  const g = Math.max(0, Math.min(1, a / l));
262
262
  e.scrollTop = g * b;
@@ -356,7 +356,7 @@ let le = Me;
356
356
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
357
357
  var P, x, Q, D, M, V, tt, wt, Se, Ee, Ot, Bt, St, Et, At, zt, Dt, qt, Ae, lt, Rt, Pt;
358
358
  const Ie = class Ie {
359
- constructor(i) {
359
+ constructor(r) {
360
360
  d(this, P);
361
361
  d(this, x);
362
362
  d(this, Q);
@@ -372,8 +372,8 @@ const Ie = class Ie {
372
372
  E(this, "refresh", /* @__PURE__ */ h(() => {
373
373
  var e;
374
374
  R.log("rowManager.refresh");
375
- const i = t(this, x).querySelector(".ng-container-body .ng-part-body");
376
- i && (t(this, St).call(this), t(this, Et).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, x).querySelector("nine-table-vscrollbar")) == null || e.refresh());
375
+ const r = t(this, x).querySelector(".ng-container-body .ng-part-body");
376
+ r && (t(this, St).call(this), t(this, Et).call(this), t(this, lt).call(this, r.scrollTop), (e = t(this, x).querySelector("nine-table-vscrollbar")) == null || e.refresh());
377
377
  }, "refresh"));
378
378
  E(this, "initialize", /* @__PURE__ */ h(() => {
379
379
  R.log("rowManager.initialize"), y(this, Q, {
@@ -389,86 +389,85 @@ const Ie = class Ie {
389
389
  const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
390
390
  t(this, D).set(o, u);
391
391
  });
392
- const i = t(this, x).querySelector(".ng-container-body .ng-part-body"), e = t(this, x).querySelector(".ng-container-left .ng-part-body"), s = t(this, x).querySelector(".ng-container-right .ng-part-body"), r = t(this, x).querySelector(".ng-container-body .ng-part-header"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer");
393
- if (i) {
394
- t(this, St).call(this), t(this, qt).call(this), t(this, Et).call(this), t(this, lt).call(this, i.scrollTop);
392
+ const r = t(this, x).querySelector(".ng-container-body .ng-part-body"), e = t(this, x).querySelector(".ng-container-left .ng-part-body"), s = t(this, x).querySelector(".ng-container-right .ng-part-body"), i = t(this, x).querySelector(".ng-container-body .ng-part-header"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer");
393
+ if (r) {
394
+ t(this, St).call(this), t(this, qt).call(this), t(this, Et).call(this), t(this, lt).call(this, r.scrollTop);
395
395
  let o = !1;
396
396
  const a = /* @__PURE__ */ h((c) => {
397
397
  if (o) return;
398
398
  o = !0;
399
399
  const l = c.scrollTop, f = c.scrollLeft;
400
- i && i.scrollTop !== l && (i.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), o = !1;
400
+ r && r.scrollTop !== l && (r.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), i && i.scrollLeft !== f && (i.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), o = !1;
401
401
  }, "handleContainerScroll");
402
- [i, e, s].forEach((c) => {
402
+ [r, e, s].forEach((c) => {
403
403
  R.log(c), c && c.addEventListener("scroll", () => {
404
404
  a(c);
405
405
  });
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Bt, /* @__PURE__ */ h((i, e) => {
409
+ d(this, Bt, /* @__PURE__ */ h((r, e) => {
410
410
  R.log("rowManager.#renderRows");
411
411
  const s = t(this, D).get(e);
412
412
  if (!s || s.length === 0) return;
413
- const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
414
- if (!r) return;
415
- r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
- const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
413
+ const i = r.querySelector(".ng-part-body tbody.bindable-tbody");
414
+ if (!i) return;
415
+ i.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
+ const n = i.querySelector("tr.nodata"), o = document.createDocumentFragment();
417
417
  for (let a = 0; a < t(this, wt); a++)
418
418
  s.forEach((c) => {
419
419
  o.appendChild(c.cloneNode(!0));
420
420
  });
421
- n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
421
+ n ? n.before(o) : i.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = i.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
423
  d(this, St, /* @__PURE__ */ h(() => {
424
424
  if (t(this, M) !== null && t(this, M) > 0)
425
425
  return t(this, M);
426
- const i = t(this, x).querySelector(".ng-container-body .ng-part-body");
426
+ const r = t(this, x).querySelector(".ng-container-body .ng-part-body");
427
427
  R.log("rowManager.#measureAndCacheHeight");
428
428
  const e = t(this, D).get(".ng-container-body");
429
429
  if (!e || e.length === 0) throw new Error("invalid dom");
430
- const s = i.querySelector("tbody.bindable-tbody");
430
+ const s = r.querySelector("tbody.bindable-tbody");
431
431
  if (R.log(s), !s) throw new Error("invalid dom");
432
432
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
- const r = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
433
+ const i = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
434
434
  e.forEach((b) => {
435
435
  n.appendChild(b.cloneNode(!0));
436
- }), r ? r.before(n) : s.appendChild(n);
436
+ }), i ? i.before(n) : s.appendChild(n);
437
437
  const o = t(this, x), a = o.style.display, c = o.style.visibility, l = o.style.position;
438
438
  (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
439
439
  let f = 0;
440
440
  const u = s.querySelectorAll("tr");
441
- if (u.forEach((b) => {
441
+ return u.forEach((b) => {
442
442
  let g = b.offsetHeight || b.getBoundingClientRect().height;
443
443
  if (g === 0) {
444
444
  const v = window.getComputedStyle(b);
445
445
  g = parseFloat(v.height) || parseFloat(v.minHeight) || 0;
446
446
  }
447
447
  f += g;
448
- }), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, f <= 0) throw new Error("#measureAndCacheHeight() invalid dom");
449
- return y(this, M, f), t(this, At).call(this), t(this, M);
448
+ }), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, f <= 0 ? -1 : (y(this, M, f), t(this, At).call(this), t(this, M));
450
449
  }, "#measureAndCacheHeight"));
451
450
  d(this, Et, /* @__PURE__ */ h(() => {
452
451
  R.log("rowManager.#updateVirtualScrollHeight");
453
- const e = (t(this, P).data.get() || []).length, s = t(this, M), r = e * s;
454
- R.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
452
+ const e = (t(this, P).data.get() || []).length, s = t(this, M), i = e * s;
453
+ R.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: i }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
455
454
  const o = t(this, x).querySelector(n);
456
455
  if (!o) return;
457
456
  const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
458
- a && (a.style.height = `${r}px`);
457
+ a && (a.style.height = `${i}px`);
459
458
  });
460
459
  }, "#updateVirtualScrollHeight"));
461
460
  d(this, At, /* @__PURE__ */ h(() => {
462
461
  if (t(this, tt) > 0 && t(this, M) > 0) {
463
- const i = Math.ceil(t(this, tt) / t(this, M));
464
- y(this, wt, i + t(this, Ot));
462
+ const r = Math.ceil(t(this, tt) / t(this, M));
463
+ y(this, wt, r + t(this, Ot));
465
464
  }
466
465
  }, "#updateRowCount"));
467
466
  d(this, zt, /* @__PURE__ */ h(() => {
468
467
  var a, c, l, f, u, b;
469
- const i = t(this, x).querySelector(".ng-container-left .ng-part-body table"), e = t(this, x).querySelector(".ng-container-body .ng-part-body table"), s = t(this, x).querySelector(".ng-container-right .ng-part-body table");
468
+ const r = t(this, x).querySelector(".ng-container-left .ng-part-body table"), e = t(this, x).querySelector(".ng-container-body .ng-part-body table"), s = t(this, x).querySelector(".ng-container-right .ng-part-body table");
470
469
  if (e) {
471
- const g = i ? Array.from(i.querySelectorAll("tbody tr")) : [], v = Array.from(e.querySelectorAll("tbody tr")), w = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(g.length, v.length, w.length);
470
+ const g = r ? Array.from(r.querySelectorAll("tbody tr")) : [], v = Array.from(e.querySelectorAll("tbody tr")), w = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(g.length, v.length, w.length);
472
471
  for (let m = 0; m < A; m++) {
473
472
  const W = [
474
473
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
@@ -478,9 +477,9 @@ const Ie = class Ie {
478
477
  T > 0 && (g[m] && (g[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
479
478
  }
480
479
  }
481
- const r = t(this, x).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, x).querySelector(".ng-container-right .ng-part-footer table");
480
+ const i = t(this, x).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, x).querySelector(".ng-container-right .ng-part-footer table");
482
481
  if (n) {
483
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], v = Array.from(n.querySelectorAll("tfoot tr")), w = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], A = Math.max(g.length, v.length, w.length);
482
+ const g = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], v = Array.from(n.querySelectorAll("tfoot tr")), w = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], A = Math.max(g.length, v.length, w.length);
484
483
  for (let m = 0; m < A; m++) {
485
484
  const W = [
486
485
  ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
@@ -492,37 +491,37 @@ const Ie = class Ie {
492
491
  }
493
492
  }, "#syncRowHeights"));
494
493
  d(this, Dt, /* @__PURE__ */ h(() => {
495
- !t(this, x) || !(t(this, x) instanceof HTMLElement) || (y(this, V, new ResizeObserver((i) => {
496
- for (const e of i) {
494
+ !t(this, x) || !(t(this, x) instanceof HTMLElement) || (y(this, V, new ResizeObserver((r) => {
495
+ for (const e of r) {
497
496
  const s = e.target;
498
497
  if (!s.classList.contains("active")) continue;
499
- const r = e.contentRect.height;
500
- if (r > 0) {
498
+ const i = e.contentRect.height;
499
+ if (i > 0) {
501
500
  let n = 0;
502
501
  const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
503
502
  o && (n += o.offsetHeight), a && (n += a.offsetHeight);
504
- const c = Math.max(r - n, 100);
503
+ const c = Math.max(i - n, 100);
505
504
  t(this, tt) !== c && (y(this, tt, c), t(this, At).call(this), t(this, M) !== null && (t(this, qt).call(this), this.refresh()));
506
505
  }
507
506
  }
508
507
  })), t(this, V).observe(t(this, x)));
509
508
  }, "#initResizeObserver"));
510
509
  d(this, qt, /* @__PURE__ */ h(() => {
511
- R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
512
- const e = t(this, x).querySelector(i);
513
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, i);
510
+ R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
511
+ const e = t(this, x).querySelector(r);
512
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, r);
514
513
  }), t(this, Pt).call(this), t(this, zt).call(this);
515
514
  }, "#renderAllContainers"));
516
- d(this, Ae, /* @__PURE__ */ h((i) => {
515
+ d(this, Ae, /* @__PURE__ */ h((r) => {
517
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
518
517
  var l;
519
518
  const s = t(this, x).querySelector(e);
520
519
  if (!s) return;
521
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
522
- if (!r) return;
523
- const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).data.get() || []).length;
520
+ const i = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
+ if (!i) return;
522
+ const n = Array.from(i.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).data.get() || []).length;
524
523
  n.forEach((f, u) => {
525
- const b = i + Math.floor(u / o);
524
+ const b = r + Math.floor(u / o);
526
525
  if (b >= c) {
527
526
  f.style.visibility = "hidden";
528
527
  return;
@@ -532,18 +531,18 @@ const Ie = class Ie {
532
531
  });
533
532
  });
534
533
  }, "#adjustBufferRows"));
535
- d(this, lt, /* @__PURE__ */ h((i) => {
534
+ d(this, lt, /* @__PURE__ */ h((r) => {
536
535
  var u, b;
537
536
  R.log("rowManager.#handleScroll()", t(this, M));
538
537
  const e = t(this, M);
539
538
  if (!e || e <= 0) return;
540
539
  const s = t(this, P).data.length;
541
540
  if (s === 0) return;
542
- const r = ((u = t(this, D).get(".ng-container-body")) == null ? void 0 : u.length) || 1, n = t(this, x).querySelector(".ng-container-body .ng-part-body");
541
+ const i = ((u = t(this, D).get(".ng-container-body")) == null ? void 0 : u.length) || 1, n = t(this, x).querySelector(".ng-container-body .ng-part-body");
543
542
  R.log("bodyContainer.clientHeight", n.clientHeight);
544
- const o = Math.max(0, s - Math.floor(n.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(i / e)));
543
+ const o = Math.max(0, s - Math.floor(n.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(r / e)));
545
544
  let c = Math.floor(a * e);
546
- R.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && R.log(`πŸ“œ [Scroll Inspect] scrollTop: ${i}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
545
+ R.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && R.log(`πŸ“œ [Scroll Inspect] scrollTop: ${r}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
547
546
  const l = t(this, Q).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
548
547
  (b = t(this, Q)) == null || b.scrollTables.forEach((g) => {
549
548
  g.style.transform = `translate3d(0, ${c}px, 0)`;
@@ -553,7 +552,7 @@ const Ie = class Ie {
553
552
  const w = v.querySelector(".ng-part-body tbody.bindable-tbody");
554
553
  if (!w) return;
555
554
  Array.from(w.querySelectorAll("tr:not(.nodata)")).forEach((m, W) => {
556
- const T = a + Math.floor(W / r);
555
+ const T = a + Math.floor(W / i);
557
556
  if (T >= s) {
558
557
  m.style.display = "none";
559
558
  return;
@@ -577,39 +576,39 @@ const Ie = class Ie {
577
576
  cell.dataset.row = dataIndex;
578
577
  });
579
578
  }; */
580
- d(this, Rt, /* @__PURE__ */ h((i, e, s) => {
581
- i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
582
- r.dataset.row = s;
583
- const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
579
+ d(this, Rt, /* @__PURE__ */ h((r, e, s) => {
580
+ r.dataset.row = s, r.data = e, Array.from(r.cells).forEach((i, n) => {
581
+ i.dataset.row = s;
582
+ const o = Array.from(i.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
584
583
  o && typeof o.refresh == "function" && o.refresh();
585
584
  });
586
585
  }, "#bindRowData"));
587
586
  d(this, Pt, /* @__PURE__ */ h(() => {
588
587
  var c, l, f;
589
588
  R.log("rowManager.#syncHeaderHeights");
590
- const i = t(this, x).querySelector(".ng-container-left .ng-part-header table"), e = t(this, x).querySelector(".ng-container-body .ng-part-header table"), s = t(this, x).querySelector(".ng-container-right .ng-part-header table");
589
+ const r = t(this, x).querySelector(".ng-container-left .ng-part-header table"), e = t(this, x).querySelector(".ng-container-body .ng-part-header table"), s = t(this, x).querySelector(".ng-container-right .ng-part-header table");
591
590
  if (!e) return;
592
- const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
591
+ const i = r ? Array.from(r.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(i.length, n.length, o.length);
593
592
  for (let u = 0; u < a; u++) {
594
593
  const b = [
595
- ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
+ ((c = i[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
596
595
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
597
596
  ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
598
597
  ], g = Math.max(...b);
599
- g > 0 && (r[u] && (r[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`));
598
+ g > 0 && (i[u] && (i[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`));
600
599
  }
601
600
  }, "#syncHeaderHeights"));
602
601
  E(this, "destroy", /* @__PURE__ */ h(() => {
603
602
  t(this, V) && (t(this, V).disconnect(), y(this, V, null));
604
603
  }, "destroy"));
605
- y(this, P, i.getRootNode().host), y(this, x, i), t(this, Dt).call(this);
604
+ y(this, P, r.getRootNode().host), y(this, x, r), t(this, Dt).call(this);
606
605
  }
607
606
  getRowHeight() {
608
607
  return t(this, M);
609
608
  }
610
- templateLength(i = ".ng-container-body") {
609
+ templateLength(r = ".ng-container-body") {
611
610
  var e;
612
- return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
611
+ return ((e = t(this, D).get(r)) == null ? void 0 : e.length) || 1;
613
612
  }
614
613
  };
615
614
  P = new WeakMap(), x = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), M = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), qt = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), h(Ie, "RowManager");
@@ -618,14 +617,14 @@ const jt = class jt {
618
617
  /**
619
618
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
620
619
  */
621
- static compileAll(i) {
622
- return Array.isArray(i) ? i.map((e) => jt.compile(e)) : [];
620
+ static compileAll(r) {
621
+ return Array.isArray(r) ? r.map((e) => jt.compile(e)) : [];
623
622
  }
624
623
  /**
625
624
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
626
625
  */
627
- static compile(i) {
628
- if (!i) return null;
626
+ static compile(r) {
627
+ if (!r) return null;
629
628
  const e = /* @__PURE__ */ h((a) => {
630
629
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
631
630
  const f = l.getAttribute("cell-type") || "renderer";
@@ -649,7 +648,7 @@ const jt = class jt {
649
648
  l ? l.after(c) : a.prepend(c);
650
649
  }
651
650
  a.classList.add("nine-table-element");
652
- }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
651
+ }, "ensureTableStructure"), i = /* @__PURE__ */ h((a, c) => {
653
652
  const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), u = l.length;
654
653
  if (u === 0 || f.length === 0) return;
655
654
  let b = 0;
@@ -681,8 +680,8 @@ const jt = class jt {
681
680
  }
682
681
  });
683
682
  });
684
- }, "resetColIndex"), n = i.cloneNode(!0);
685
- return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, c) => {
683
+ }, "resetColIndex"), n = r.cloneNode(!0);
684
+ return s(n), e(n), i(n, "thead"), i(n, "tbody"), i(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, c) => {
686
685
  const l = a.getAttribute("fixed");
687
686
  l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
688
687
  f.setAttribute("fixed", l);
@@ -706,8 +705,8 @@ const pt = class pt extends HTMLElement {
706
705
  E(this, "generate", /* @__PURE__ */ h((e) => {
707
706
  if (R.log("sheet.generate()"), !e) return;
708
707
  y(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this);
709
- const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), n = this.querySelector(".ng-nodata-overlay");
710
- s && n && (n.style.top = `${s.offsetHeight}px`), r && n && (n.style.bottom = `${r.offsetHeight}px`), t(this, st).initialize(), setTimeout(() => {
708
+ const s = this.querySelector(".ng-container-body .ng-part-header"), i = this.querySelector(".ng-container-body .ng-part-footer"), n = this.querySelector(".ng-nodata-overlay");
709
+ s && n && (n.style.top = `${s.offsetHeight}px`), i && n && (n.style.bottom = `${i.offsetHeight}px`), t(this, st).initialize(), setTimeout(() => {
711
710
  var o;
712
711
  (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
713
712
  }, 0);
@@ -717,30 +716,30 @@ const pt = class pt extends HTMLElement {
717
716
  { selector: ".ng-container-body", type: null },
718
717
  { selector: ".ng-container-left", type: "left" },
719
718
  { selector: ".ng-container-right", type: "right" }
720
- ].forEach(({ selector: s, type: r }) => {
719
+ ].forEach(({ selector: s, type: i }) => {
721
720
  var n, o, a;
722
- (n = this.querySelector(`${s} .ng-part-header`)) == null || n.appendChild(t(this, ct).call(this, t(this, et), r, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, ct).call(this, t(this, et), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ct).call(this, t(this, et), r, "footer"));
721
+ (n = this.querySelector(`${s} .ng-part-header`)) == null || n.appendChild(t(this, ct).call(this, t(this, et), i, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, ct).call(this, t(this, et), i, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ct).call(this, t(this, et), i, "footer"));
723
722
  });
724
723
  }, "#renderSplitContainers"));
725
724
  d(this, Yt, /* @__PURE__ */ h(() => {
726
725
  ["left", "right", "body"].forEach((e) => {
727
- const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
728
- if (!s || !r || r.length === 0) return;
726
+ const s = this.querySelector(`.ng-container-${e}`), i = s == null ? void 0 : s.querySelectorAll("table");
727
+ if (!s || !i || i.length === 0) return;
729
728
  let n = 0;
730
- r[0].querySelectorAll("col").forEach((o) => {
729
+ i[0].querySelectorAll("col").forEach((o) => {
731
730
  const a = parseInt(o.getAttribute("width"), 10);
732
731
  isNaN(n) || (n += a);
733
732
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
734
733
  });
735
734
  }, "#updateContainerWidths"));
736
- d(this, ct, /* @__PURE__ */ h((e, s, r) => {
735
+ d(this, ct, /* @__PURE__ */ h((e, s, i) => {
737
736
  const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), c = n.querySelector("tfoot");
738
- if (r === "header") {
737
+ if (i === "header") {
739
738
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
740
739
  const f = document.createElement("tbody");
741
740
  f.className = "fixed-tbody", n.appendChild(f);
742
741
  }
743
- } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
742
+ } else i === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : i === "footer" && (o && o.remove(), a && a.remove());
744
743
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
745
744
  l.getAttribute("fixed") !== "left" && l.remove();
746
745
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -972,12 +971,12 @@ const _e = class _e extends HTMLElement {
972
971
  var e;
973
972
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
974
973
  var o;
975
- const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
976
- t(this, Tt).call(this, n, r);
974
+ const i = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
975
+ t(this, Tt).call(this, n, i);
977
976
  }), t(this, Tt).call(this, 0, !1);
978
977
  }, "#init"));
979
978
  d(this, Tt, /* @__PURE__ */ h((e, s = !1) => {
980
- const r = /* @__PURE__ */ h(() => {
979
+ const i = /* @__PURE__ */ h(() => {
981
980
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
982
981
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
983
982
  const b = f.filter((g) => g.classList.contains("active"));
@@ -1005,7 +1004,7 @@ const _e = class _e extends HTMLElement {
1005
1004
  const l = o.querySelectorAll("nine-table-sheet.active");
1006
1005
  l == null || l.forEach((f) => {
1007
1006
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1008
- }), r();
1007
+ }), i();
1009
1008
  }, "#switchSheet"));
1010
1009
  }
1011
1010
  connectedCallback() {
@@ -1017,24 +1016,24 @@ let de = _e;
1017
1016
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
1018
1017
  var I, Zt, kt, Gt;
1019
1018
  const Ne = class Ne {
1020
- constructor(i) {
1019
+ constructor(r) {
1021
1020
  d(this, I);
1022
1021
  d(this, Zt, /* @__PURE__ */ h(() => {
1023
- t(this, Gt).call(this), new ResizeObserver((i) => {
1024
- for (let e of i)
1022
+ t(this, Gt).call(this), new ResizeObserver((r) => {
1023
+ for (let e of r)
1025
1024
  t(this, I).getAttribute("auto-height") === "true" && t(this, kt).call(this);
1026
1025
  }).observe(t(this, I));
1027
1026
  }, "#init"));
1028
1027
  d(this, kt, /* @__PURE__ */ h(() => {
1029
1028
  var c, l;
1030
- const i = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1031
- if (i.length === 0) return;
1032
- const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = It.SCROLLBAR_SIZE, a = e * s + r + n + o;
1029
+ const r = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1030
+ if (r.length === 0) return;
1031
+ const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...r.map((f) => f.getRowHeight())), i = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = It.SCROLLBAR_SIZE, a = e * s + i + n + o;
1033
1032
  t(this, I).style.height = `${a}px`;
1034
1033
  }, "#applyAutoHeight"));
1035
1034
  d(this, Gt, /* @__PURE__ */ h(() => {
1036
- const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", r = e.length, n = e.map((c, l) => {
1037
- 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>` : "";
1035
+ const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", i = e.length, n = e.map((c, l) => {
1036
+ const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < i - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1038
1037
  return u + b;
1039
1038
  }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1040
1039
  t(this, I).shadowRoot.innerHTML = `
@@ -1165,32 +1164,32 @@ const Ne = class Ne {
1165
1164
  });
1166
1165
  });
1167
1166
  }, "#render"));
1168
- y(this, I, i), t(this, Zt).call(this);
1167
+ y(this, I, r), t(this, Zt).call(this);
1169
1168
  }
1170
1169
  };
1171
1170
  I = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1172
1171
  let fe = Ne;
1173
1172
  var Ct, ht;
1174
1173
  const We = class We {
1175
- constructor(i) {
1174
+ constructor(r) {
1176
1175
  d(this, Ct);
1177
1176
  d(this, ht, -1);
1178
1177
  E(this, "count", /* @__PURE__ */ h(() => t(this, Ct).rawRecords.length, "count"));
1179
- y(this, Ct, i);
1178
+ y(this, Ct, r);
1180
1179
  }
1181
1180
  get at() {
1182
1181
  return t(this, ht);
1183
1182
  }
1184
- set at(i) {
1185
- y(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1183
+ set at(r) {
1184
+ y(this, ht, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1186
1185
  });
1187
1186
  }
1188
1187
  };
1189
1188
  Ct = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1190
1189
  let ge = We;
1191
- var _, C, N, dt, Jt, Y, Qt, it, Lt, te, ee, ft;
1190
+ var _, C, N, dt, Jt, Y, Qt, rt, Lt, te, ee, ft;
1192
1191
  const B = class B {
1193
- constructor(i, e) {
1192
+ constructor(r, e) {
1194
1193
  d(this, _);
1195
1194
  d(this, C);
1196
1195
  d(this, N, []);
@@ -1199,35 +1198,35 @@ const B = class B {
1199
1198
  d(this, Y, []);
1200
1199
  d(this, Qt, /* @__PURE__ */ h(() => {
1201
1200
  y(this, Y, []);
1202
- const i = t(this, _).template || [];
1203
- Array.from(i).forEach((e) => {
1201
+ const r = t(this, _).template || [];
1202
+ Array.from(r).forEach((e) => {
1204
1203
  var s;
1205
1204
  t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1206
1205
  }), (t(this, C).rawRecords || []).forEach((e) => {
1207
1206
  e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, Y).slice();
1208
1207
  });
1209
1208
  }, "#initialize"));
1210
- d(this, it, /* @__PURE__ */ h(() => {
1211
- const i = t(this, _).shadowRoot.querySelector("nine-table-sheets");
1212
- i == null || i.classList.toggle("nodata", this.length === 0), t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1209
+ d(this, rt, /* @__PURE__ */ h(() => {
1210
+ const r = t(this, _).shadowRoot.querySelector("nine-table-sheets");
1211
+ r == null || r.classList.toggle("nodata", this.length === 0), t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1213
1212
  e.invalidate();
1214
1213
  });
1215
1214
  }, "#invalidate"));
1216
- E(this, "get", /* @__PURE__ */ h((i, e) => {
1215
+ E(this, "get", /* @__PURE__ */ h((r, e) => {
1217
1216
  var n;
1218
1217
  const s = this.getValidData();
1219
1218
  if (!s || s.length <= 0) return;
1220
- if (i == null) return t(this, ft).call(this, s);
1221
- if (i < 0 || i >= s.length) return null;
1222
- const r = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
1219
+ if (r == null) return t(this, ft).call(this, s);
1220
+ if (r < 0 || r >= s.length) return null;
1221
+ const i = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
1223
1222
  if (e != null) {
1224
- const o = r.indexOf(e);
1225
- return o >= 0 ? s[i].v[o] : null;
1223
+ const o = i.indexOf(e);
1224
+ return o >= 0 ? s[r].v[o] : null;
1226
1225
  }
1227
- return t(this, ft).call(this, s[i]);
1226
+ return t(this, ft).call(this, s[r]);
1228
1227
  }, "get"));
1229
- E(this, "set", /* @__PURE__ */ h((i) => {
1230
- this.clear(), this.add(i, !1), t(this, it).call(this);
1228
+ E(this, "set", /* @__PURE__ */ h((r) => {
1229
+ this.clear(), this.add(r, !1), t(this, rt).call(this);
1231
1230
  }, "set"));
1232
1231
  d(this, Lt, /* @__PURE__ */ h(() => ({
1233
1232
  rowState: B.ROW_STATE.EMPTY,
@@ -1239,84 +1238,84 @@ const B = class B {
1239
1238
  _: [0, 0, 0, 0, B.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1240
1239
  }), "#getDefaultMeta"));
1241
1240
  E(this, "reset", /* @__PURE__ */ h(() => {
1242
- y(this, N, []), y(this, dt, []), t(this, it).call(this);
1241
+ y(this, N, []), y(this, dt, []), t(this, rt).call(this);
1243
1242
  }, "reset"));
1244
1243
  E(this, "clear", /* @__PURE__ */ h(() => {
1245
- var i;
1246
- t(this, C).rawRecords = [], y(this, N, []), y(this, dt, []), (i = t(this, C).viewRecords) != null && i.reset && t(this, C).viewRecords.reset();
1247
- }, "clear"));
1248
- d(this, te, /* @__PURE__ */ h((i) => {
1249
1244
  var r;
1250
- Array.isArray(i) || (i = [i]);
1251
- const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(i[0] || {}), s = [];
1252
- return i.forEach((n) => {
1245
+ t(this, C).rawRecords = [], y(this, N, []), y(this, dt, []), (r = t(this, C).viewRecords) != null && r.reset && t(this, C).viewRecords.reset();
1246
+ }, "clear"));
1247
+ d(this, te, /* @__PURE__ */ h((r) => {
1248
+ var i;
1249
+ Array.isArray(r) || (r = [r]);
1250
+ const e = typeof ((i = t(this, _).fields) == null ? void 0 : i.get) == "function" ? t(this, _).fields.get() : Object.keys(r[0] || {}), s = [];
1251
+ return r.forEach((n) => {
1253
1252
  const o = { v: [] };
1254
1253
  e.forEach((a) => {
1255
1254
  o.v.push(n[a] !== void 0 && n[a] !== null ? n[a] : "");
1256
1255
  }), s.push(o);
1257
1256
  }), s;
1258
1257
  }, "#json2Array"));
1259
- d(this, ee, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1258
+ d(this, ee, /* @__PURE__ */ h((r) => (Array.isArray(r) || (r = [r]), r.forEach((e) => {
1260
1259
  e.__ng = t(this, Lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = B.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1261
- }), i), "#defaultInsert"));
1262
- E(this, "add", /* @__PURE__ */ h((i, e = !0) => {
1263
- i === void 0 && (i = {});
1264
- const s = t(this, te).call(this, i);
1260
+ }), r), "#defaultInsert"));
1261
+ E(this, "add", /* @__PURE__ */ h((r, e = !0) => {
1262
+ r === void 0 && (r = {});
1263
+ const s = t(this, te).call(this, r);
1265
1264
  t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1266
- const r = this.count() - 1;
1265
+ const i = this.count() - 1;
1267
1266
  return e || s.forEach((n, o) => {
1268
- const a = t(this, C).rawRecords[r - o];
1267
+ const a = t(this, C).rawRecords[i - o];
1269
1268
  a && (a.__ng.rowState = B.ROW_STATE.EMPTY);
1270
- }), t(this, it).call(this), r;
1269
+ }), t(this, rt).call(this), i;
1271
1270
  }, "add"));
1272
- E(this, "delete", /* @__PURE__ */ h((i) => {
1271
+ E(this, "delete", /* @__PURE__ */ h((r) => {
1273
1272
  let e = [];
1274
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, C).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1273
+ Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, C).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
1275
1274
  if (t(this, N)[s]) {
1276
- const r = t(this, N)[s].__ng.rowid;
1277
- t(this, N)[s].__ng.rowState === B.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, C).rawRecords.forEach((n) => {
1278
- n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = B.ROW_STATE.DELETE);
1275
+ const i = t(this, N)[s].__ng.rowid;
1276
+ t(this, N)[s].__ng.rowState === B.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, C).rawRecords.forEach((n) => {
1277
+ n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = B.ROW_STATE.DELETE);
1279
1278
  });
1280
1279
  }
1281
- }), this.resetRecords(), t(this, it).call(this);
1280
+ }), this.resetRecords(), t(this, rt).call(this);
1282
1281
  }, "delete"));
1283
- E(this, "setValue", /* @__PURE__ */ h((i, e, s) => {
1282
+ E(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
1284
1283
  var c;
1285
- i = parseInt(i, 10);
1284
+ r = parseInt(r, 10);
1286
1285
  const n = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1287
1286
  if (n < 0) return;
1288
- const o = this.getValidData()[i];
1287
+ const o = this.getValidData()[r];
1289
1288
  if (!o) return;
1290
1289
  const a = o.v[n];
1291
1290
  a !== s && o.__ng.rowState !== B.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = B.ROW_STATE.UPDATE), o.v[n] = s;
1292
1291
  }, "setValue"));
1293
1292
  E(this, "resetRecords", /* @__PURE__ */ h(() => {
1294
- y(this, dt, t(this, C).rawRecords.filter((i) => !i.__ng.deleted)), y(this, N, t(this, C).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, C).rawRecords.forEach((i, e) => {
1295
- i.__ng.rowidx = e;
1296
- }), t(this, N).forEach((i, e) => {
1297
- i.__ng.i = e;
1293
+ y(this, dt, t(this, C).rawRecords.filter((r) => !r.__ng.deleted)), y(this, N, t(this, C).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, C).rawRecords.forEach((r, e) => {
1294
+ r.__ng.rowidx = e;
1295
+ }), t(this, N).forEach((r, e) => {
1296
+ r.__ng.i = e;
1298
1297
  });
1299
1298
  }, "resetRecords"));
1300
1299
  E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, C).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1301
- d(this, ft, /* @__PURE__ */ h((i) => {
1300
+ d(this, ft, /* @__PURE__ */ h((r) => {
1302
1301
  var o;
1303
- if (!i) return i;
1304
- const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
1302
+ if (!r) return r;
1303
+ const e = !Array.isArray(r), s = e ? [r] : r, i = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
1305
1304
  const c = {};
1306
- return r.forEach((l, f) => {
1305
+ return i.forEach((l, f) => {
1307
1306
  c[l] = a.v ? a.v[f] : a[l];
1308
1307
  }), c.__ng = a.__ng, c;
1309
1308
  });
1310
1309
  return e ? n[0] : n;
1311
1310
  }, "#conv"));
1312
1311
  E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1313
- y(this, _, i), y(this, C, e), t(this, Qt).call(this);
1312
+ y(this, _, r), y(this, C, e), t(this, Qt).call(this);
1314
1313
  }
1315
1314
  get source() {
1316
1315
  return t(this, ft).call(this, t(this, C).rawRecords);
1317
1316
  }
1318
- set source(i) {
1319
- this.clear(), this.add(i, !1);
1317
+ set source(r) {
1318
+ this.clear(), this.add(r, !1);
1320
1319
  }
1321
1320
  get nextId() {
1322
1321
  return ++Ue(this, Jt)._;
@@ -1331,7 +1330,7 @@ const B = class B {
1331
1330
  return this.length;
1332
1331
  }
1333
1332
  };
1334
- _ = new WeakMap(), C = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Lt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(B, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1333
+ _ = new WeakMap(), C = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(B, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1335
1334
  E(B, "ROW_STATE", {
1336
1335
  EMPTY: "EMPTY",
1337
1336
  NORMAL: "NORMAL",
@@ -1340,56 +1339,56 @@ E(B, "ROW_STATE", {
1340
1339
  DELETE: "DELETE"
1341
1340
  });
1342
1341
  let ue = B;
1343
- var rt;
1342
+ var it;
1344
1343
  const Oe = class Oe {
1345
- constructor(i) {
1346
- d(this, rt);
1347
- y(this, rt, i), this.row = new ge(this), this.data = new ue(t(this, rt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1344
+ constructor(r) {
1345
+ d(this, it);
1346
+ y(this, it, r), this.row = new ge(this), this.data = new ue(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1348
1347
  var e;
1349
- (e = t(this, rt).view) != null && e.redraw && t(this, rt).view.redraw();
1348
+ (e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
1350
1349
  }, this.setDataSource = (e) => {
1351
1350
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1352
1351
  }, this.getRowState = (e) => {
1353
- var r, n;
1352
+ var i, n;
1354
1353
  const s = parseInt(e, 10);
1355
1354
  if (!(s >= this.data.count()))
1356
- return (n = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : n.rowState;
1355
+ return (n = (i = this.data.getValidData()[s]) == null ? void 0 : i.__ng) == null ? void 0 : n.rowState;
1357
1356
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1358
1357
  this.row.at = e;
1359
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, r) => {
1360
- e = parseInt(e, 10), this.data.setValue(e, s, r);
1358
+ }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, i) => {
1359
+ e = parseInt(e, 10), this.data.setValue(e, s, i);
1361
1360
  }, this.setDataSource([]);
1362
1361
  }
1363
1362
  };
1364
- rt = new WeakMap(), h(Oe, "ngDataManager");
1363
+ it = new WeakMap(), h(Oe, "ngDataManager");
1365
1364
  let be = Oe;
1366
1365
  var gt, H, Ht, se;
1367
1366
  const Be = class Be {
1368
1367
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1369
- constructor(i) {
1368
+ constructor(r) {
1370
1369
  d(this, gt);
1371
1370
  d(this, H, []);
1372
- E(this, "add", /* @__PURE__ */ h((i, e = "string") => {
1373
- i.forEach((s) => {
1374
- t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1371
+ E(this, "add", /* @__PURE__ */ h((r, e = "string") => {
1372
+ r.forEach((s) => {
1373
+ t(this, H).some((i) => i.name === s) || t(this, H).push({ name: s, type: e });
1375
1374
  }), t(this, Ht).call(this);
1376
1375
  }, "add"));
1377
1376
  d(this, Ht, /* @__PURE__ */ h(() => {
1378
- const i = /* @__PURE__ */ new Map();
1377
+ const r = /* @__PURE__ */ new Map();
1379
1378
  t(this, H).forEach((e) => {
1380
- i.set(e.name, e.type);
1381
- }), y(this, H, Array.from(i, ([e, s]) => ({ name: e, type: s }))), y(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1379
+ r.set(e.name, e.type);
1380
+ }), y(this, H, Array.from(r, ([e, s]) => ({ name: e, type: s }))), y(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1382
1381
  }, "#adjust"));
1383
1382
  d(this, se, /* @__PURE__ */ h(() => {
1384
1383
  y(this, H, []), R.log(t(this, gt).querySelectorAll("table"));
1385
- const i = Array.from(t(this, gt).querySelectorAll("table"));
1386
- if (!(!i || i.length === 0)) {
1387
- for (const e of i)
1388
- R.log(e), $("[data-bind]", e).each((s, r) => {
1389
- const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1384
+ const r = Array.from(t(this, gt).querySelectorAll("table"));
1385
+ if (!(!r || r.length === 0)) {
1386
+ for (const e of r)
1387
+ R.log(e), $("[data-bind]", e).each((s, i) => {
1388
+ const n = i.dataset.bind, o = i.getAttribute("data-type") || "string";
1390
1389
  n && t(this, H).push({ name: n, type: o });
1391
1390
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1392
- $(`[${s}]`, e).each((r, n) => {
1391
+ $(`[${s}]`, e).each((i, n) => {
1393
1392
  var o = n.getAttribute(s);
1394
1393
  if (o.indexOf("data.") < 0) {
1395
1394
  const a = o.search(/[(]/g);
@@ -1412,44 +1411,44 @@ const Be = class Be {
1412
1411
  t(this, Ht).call(this);
1413
1412
  }
1414
1413
  }, "#init"));
1415
- y(this, gt, i), t(this, se).call(this);
1414
+ y(this, gt, r), t(this, se).call(this);
1416
1415
  }
1417
1416
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1418
1417
  get() {
1419
- return t(this, H).map((i) => i.name);
1418
+ return t(this, H).map((r) => r.name);
1420
1419
  }
1421
1420
  // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
1422
1421
  getFields() {
1423
1422
  return t(this, H);
1424
1423
  }
1425
1424
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1426
- getType(i) {
1427
- const e = t(this, H).find((s) => s.name === i);
1425
+ getType(r) {
1426
+ const e = t(this, H).find((s) => s.name === r);
1428
1427
  return e ? e.type : "string";
1429
1428
  }
1430
- indexOf(i) {
1431
- return t(this, H).findIndex((e) => e.name === i);
1429
+ indexOf(r) {
1430
+ return t(this, H).findIndex((e) => e.name === r);
1432
1431
  }
1433
- includes(i) {
1434
- return t(this, H).some((e) => e.name === i);
1432
+ includes(r) {
1433
+ return t(this, H).some((e) => e.name === r);
1435
1434
  }
1436
1435
  };
1437
1436
  gt = new WeakMap(), H = new WeakMap(), Ht = new WeakMap(), se = new WeakMap(), h(Be, "ngFields");
1438
1437
  let ye = Be;
1439
- var nt, ie, re;
1438
+ var nt, re, ie;
1440
1439
  const ze = class ze extends HTMLElement {
1441
1440
  constructor() {
1442
1441
  super();
1443
1442
  //#created = false;
1444
1443
  d(this, nt);
1445
- d(this, ie);
1446
- d(this, re, /* @__PURE__ */ h(() => {
1447
- this.fields = new ye(this), y(this, ie, new fe(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1444
+ d(this, re);
1445
+ d(this, ie, /* @__PURE__ */ h(() => {
1446
+ this.fields = new ye(this), y(this, re, new fe(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1448
1447
  }, "#init"));
1449
1448
  this.attachShadow({ mode: "open" }), y(this, nt, new be(this));
1450
1449
  }
1451
1450
  connectedCallback() {
1452
- t(this, re).call(this);
1451
+ t(this, ie).call(this);
1453
1452
  }
1454
1453
  disconnectedCallback() {
1455
1454
  R.log("NineTable disconnected.");
@@ -1467,7 +1466,7 @@ const ze = class ze extends HTMLElement {
1467
1466
  return t(this, nt);
1468
1467
  }
1469
1468
  };
1470
- nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(ze, "NineTable");
1469
+ nt = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), h(ze, "NineTable");
1471
1470
  let pe = ze;
1472
1471
  customElements.get("nine-table") || customElements.define("nine-table", pe);
1473
1472
  const mt = class mt extends HTMLElement {
@@ -1497,13 +1496,13 @@ const De = class De extends me {
1497
1496
  E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1498
1497
  if (t(this, p))
1499
1498
  if (t(this, p).closest("tbody")) {
1500
- const s = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
1499
+ const s = t(this, p).closest("tr").data, i = parseInt(t(this, p).dataset.row);
1501
1500
  if (!s) return "";
1502
1501
  if (ninegrid.isNull(t(this, p).dataset.expr)) {
1503
1502
  if (!ninegrid.isNull(t(this, p).dataset.bind))
1504
1503
  return s[t(this, p).dataset.bind] || ninegrid.nvl(e, "");
1505
1504
  } else try {
1506
- return this.getExprValue(t(this, p).dataset.expr, s, r, t(this, p));
1505
+ return this.getExprValue(t(this, p).dataset.expr, s, i, t(this, p));
1507
1506
  } catch {
1508
1507
  console.error(t(this, p).dataset.expr, s, t(this, p).dataset.row);
1509
1508
  }
@@ -1518,14 +1517,14 @@ const De = class De extends me {
1518
1517
  if (!(!t(this, L) || !t(this, L).template || !t(this, p).closest("tbody.bindable"))) {
1519
1518
  var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
1520
1519
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1521
- var s = t(this, p).closest("tr"), r = [];
1520
+ var s = t(this, p).closest("tr"), i = [];
1522
1521
  $("th,td", s).each((m, W) => {
1523
1522
  var T = ninegrid.j.querySelectorAll(W).attr("suppress");
1524
- T && W.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
1525
- }), r.sort();
1523
+ T && W.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && i.push(T));
1524
+ }), i.sort();
1526
1525
  var n = !1;
1527
1526
  if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1528
- for (var o of r) {
1527
+ for (var o of i) {
1529
1528
  if (o > e) break;
1530
1529
  var a = parseInt(t(this, p).dataset.row), c = a - 1, l = t(this, p).closest("tr").data, f = t(this, L).data.get(c);
1531
1530
  t(this, p).dataset.matrixRow;
@@ -1543,12 +1542,12 @@ const De = class De extends me {
1543
1542
  }
1544
1543
  }
1545
1544
  }, "#resetSuppress"));
1546
- E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, n) => {
1545
+ E(this, "getExprValue", /* @__PURE__ */ h((e, s, i, n) => {
1547
1546
  if (typeof e < "u")
1548
1547
  try {
1549
- r = parseInt(r);
1548
+ i = parseInt(i);
1550
1549
  const o = e.replace("()", "");
1551
- return t(this, L)[o] ? t(this, L)[o].call(this, s, r, t(this, p)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1550
+ return t(this, L)[o] ? t(this, L)[o].call(this, s, i, t(this, p)) : t(this, L).exprFunction(e).call(this, s, i, t(this, L).data);
1552
1551
  } catch {
1553
1552
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1554
1553
  }
@@ -1565,8 +1564,8 @@ const De = class De extends me {
1565
1564
  }
1566
1565
  set value(e) {
1567
1566
  var s = parseInt(t(this, p).dataset.row);
1568
- const r = this.getAttribute("update-row-state") != "false";
1569
- s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, p).dataset.bind, e, r);
1567
+ const i = this.getAttribute("update-row-state") != "false";
1568
+ s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, i) : t(this, L).data.setValue(s, t(this, p).dataset.bind, e, i);
1570
1569
  }
1571
1570
  get row() {
1572
1571
  return parseInt(t(this, p).dataset.row);
@@ -1643,9 +1642,9 @@ const je = class je extends xe {
1643
1642
  if (t(this, ot) == "number") {
1644
1643
  let n = [];
1645
1644
  if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, bt) && Number(t(this, bt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1646
- var s = e.target.value, r = s.indexOf(".");
1647
- if (r >= 0) {
1648
- var s = s.substr(r + 1, s.length);
1645
+ var s = e.target.value, i = s.indexOf(".");
1646
+ if (i >= 0) {
1647
+ var s = s.substr(i + 1, s.length);
1649
1648
  s.length >= Number(t(this, U)) && e.preventDefault();
1650
1649
  }
1651
1650
  }