@ninebone/table 0.0.661 → 0.0.663

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.
@@ -3,7 +3,7 @@ var Ve = (q) => {
3
3
  throw TypeError(q);
4
4
  };
5
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 c = (q, i) => Fe(q, "name", { value: i, configurable: !0 });
6
+ var h = (q, i) => Fe(q, "name", { value: i, configurable: !0 });
7
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
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
9
  var Ue = (q, i, e, s) => ({
@@ -20,7 +20,7 @@ const He = class He extends Ke.constructor {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- c(He, "Trace");
23
+ h(He, "Trace");
24
24
  let oe = He;
25
25
  const H = new oe();
26
26
  var B, j, w, X, K, Z, It, G, _t;
@@ -33,19 +33,19 @@ const Me = class Me extends HTMLElement {
33
33
  d(this, X);
34
34
  d(this, K);
35
35
  d(this, Z);
36
- d(this, It, /* @__PURE__ */ c(() => {
36
+ d(this, It, /* @__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 && (y(this, Z, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, Z).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ c(() => {
43
+ E(this, "refresh", /* @__PURE__ */ h(() => {
44
44
  if (!t(this, B) || !t(this, w) || t(this, j)) return;
45
45
  const e = t(this, w).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, w).track, n = t(this, w).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, h = s.scrollWidth;
48
- if (a !== 0 && h > a)
47
+ const r = t(this, w).track, n = t(this, w).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
+ if (a !== 0 && c > a)
49
49
  o && (o.style.display = "flex");
50
50
  else {
51
51
  o && (o.style.display = "none");
@@ -53,28 +53,28 @@ const Me = class Me 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 / h), l), 20);
56
+ const f = Math.max(Math.min(l * (a / c), l), 20);
57
57
  n.style.width = `${f}px`;
58
- const g = e.scrollLeft, b = h - a;
58
+ const g = e.scrollLeft, b = c - a;
59
59
  let u = 0;
60
60
  b > 0 && (u = parseInt(g / b * (l - f), 10)), u < 0 && (u = 0);
61
61
  const v = l - f;
62
62
  u > v && (u = v), n.style.left = `${u}px`, t(this, w).left.disabled = u === 0, t(this, w).right.disabled = u >= v - 1;
63
63
  }, "refresh"));
64
- d(this, G, /* @__PURE__ */ c((e) => {
64
+ d(this, G, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, w)) return !1;
66
66
  const s = t(this, w).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
68
68
  const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
- const h = n.width - o;
72
- a > h && (a = h), a = parseInt(a, 10), t(this, w).thumb.style.left = `${a}px`, t(this, w).left.disabled = a === 0, t(this, w).right.disabled = a >= h - 1;
71
+ const c = n.width - o;
72
+ a > c && (a = c), a = parseInt(a, 10), t(this, w).thumb.style.left = `${a}px`, t(this, w).left.disabled = a === 0, t(this, w).right.disabled = a >= c - 1;
73
73
  const l = s.clientWidth, g = r.scrollWidth - l;
74
- return h > 0 && g > 0 && (s.scrollLeft = a / h * g), a > 0 && a < h - 1;
74
+ return c > 0 && g > 0 && (s.scrollLeft = a / c * g), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, _t, /* @__PURE__ */ c(() => {
77
- const e = /* @__PURE__ */ c((r) => {
76
+ d(this, _t, /* @__PURE__ */ h(() => {
77
+ const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, X)), clearInterval(t(this, K));
79
79
  const n = parseInt(t(this, w).thumb.style.left || 0, 10);
80
80
  t(this, G).call(this, n + r), y(this, X, setInterval(() => {
@@ -83,7 +83,7 @@ const Me = class Me extends HTMLElement {
83
83
  t(this, G).call(this, o + r) || clearInterval(t(this, K));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ c(() => {
86
+ }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, X)), clearInterval(t(this, K));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
@@ -100,11 +100,11 @@ const Me = class Me extends HTMLElement {
100
100
  }), t(this, w).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
102
  r.stopPropagation(), r.preventDefault(), y(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
- const n = /* @__PURE__ */ c((a) => {
103
+ const n = /* @__PURE__ */ h((a) => {
104
104
  if (!t(this, j)) return;
105
- const h = t(this, w).track.getBoundingClientRect();
106
- t(this, G).call(this, a.clientX - h.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
105
+ const c = t(this, w).track.getBoundingClientRect();
106
+ t(this, G).call(this, a.clientX - c.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
108
  y(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
@@ -176,7 +176,7 @@ const Me = class Me extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ c(() => {
179
+ const e = /* @__PURE__ */ h(() => {
180
180
  const s = t(this, B).querySelector(".ng-container-body .ng-part-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
@@ -198,7 +198,7 @@ const Me = class Me extends HTMLElement {
198
198
  t(this, Z) && t(this, Z).disconnect();
199
199
  }
200
200
  };
201
- B = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), c(Me, "NineTableHScrollBar");
201
+ B = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), h(Me, "NineTableHScrollBar");
202
202
  let ae = Me;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
204
204
  var F, at, J, T, vt, xt, Nt;
@@ -211,27 +211,27 @@ const $e = class $e extends HTMLElement {
211
211
  d(this, T);
212
212
  d(this, vt, 0);
213
213
  d(this, xt, 0);
214
- E(this, "refresh", /* @__PURE__ */ c(() => {
214
+ E(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (!t(this, F) || !t(this, T)) return;
216
- const e = t(this, T).container, s = t(this, T).track, r = t(this, T).thumb, n = e.clientHeight, o = t(this, F).data.length, a = t(this, at).getRowHeight(), h = o * a;
217
- if (h <= n || o === 0) {
216
+ const e = t(this, T).container, s = t(this, T).track, r = t(this, T).thumb, n = e.clientHeight, o = t(this, F).data.length, a = t(this, at).getRowHeight(), c = o * a;
217
+ if (c <= n || o === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
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 * (n / h), l), 20);
224
+ const f = Math.max(Math.min(l * (n / c), l), 20);
225
225
  r.style.height = `${f}px`;
226
- const g = e.scrollTop, b = Math.max(h - n, 1);
226
+ const g = e.scrollTop, b = Math.max(c - n, 1);
227
227
  let u = 0;
228
228
  b > 0 && (u = g / b * (l - f));
229
229
  const v = l - f;
230
230
  u < 0 && (u = 0), u > v && (u = v), r.style.top = `${u}px`, t(this, T).top.disabled = g <= 0, t(this, T).bottom.disabled = g >= b - 1;
231
231
  }, "refresh"));
232
- d(this, Nt, /* @__PURE__ */ c(() => {
232
+ d(this, Nt, /* @__PURE__ */ h(() => {
233
233
  H.log("nine-table-vscrollbar.#init");
234
- const e = t(this, T).container, s = /* @__PURE__ */ c(() => {
234
+ const e = t(this, T).container, s = /* @__PURE__ */ h(() => {
235
235
  const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
236
236
  return n * o;
237
237
  }, "getContentHeight");
@@ -240,9 +240,9 @@ const $e = class $e extends HTMLElement {
240
240
  }), t(this, T).thumb.addEventListener("mousedown", (r) => {
241
241
  if (r.button !== 0) return;
242
242
  r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, vt, r.clientY), y(this, xt, e.scrollTop);
243
- const n = /* @__PURE__ */ c((a) => {
243
+ const n = /* @__PURE__ */ h((a) => {
244
244
  if (!t(this, J)) return;
245
- const h = t(this, T).track.getBoundingClientRect(), l = t(this, T).thumb.clientHeight, g = h.height - l, b = a.clientY - t(this, vt), u = e.clientHeight, v = s(), x = Math.max(v - u, 1);
245
+ const c = t(this, T).track.getBoundingClientRect(), l = t(this, T).thumb.clientHeight, g = c.height - l, b = a.clientY - t(this, vt), u = e.clientHeight, v = s(), x = Math.max(v - u, 1);
246
246
  if (g > 0 && x > 0) {
247
247
  const A = b / g * x;
248
248
  let m = t(this, xt) + A;
@@ -250,7 +250,7 @@ const $e = class $e extends HTMLElement {
250
250
  m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
251
251
  }
252
252
  this.refresh();
253
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
253
+ }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
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);
@@ -334,7 +334,7 @@ const $e = class $e extends HTMLElement {
334
334
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
335
335
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
336
  `;
337
- const e = /* @__PURE__ */ c(() => {
337
+ const e = /* @__PURE__ */ h(() => {
338
338
  const s = t(this, F).shadowRoot.querySelector(".ng-container-body .ng-part-body");
339
339
  if (!s) {
340
340
  setTimeout(e, 10);
@@ -351,7 +351,7 @@ const $e = class $e extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), T = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Nt = new WeakMap(), c($e, "NineTableVScrollBar");
354
+ F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), T = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Nt = new WeakMap(), h($e, "NineTableVScrollBar");
355
355
  let le = $e;
356
356
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
357
357
  var P, S, Q, D, I, V, tt, wt, Se, Ee, Wt, Ot, zt, St, Et, Bt, Dt, At, Ae, lt, qt, Pt;
@@ -369,22 +369,22 @@ const Ie = class Ie {
369
369
  d(this, Ee, !1);
370
370
  //#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
371
371
  d(this, Wt, 3);
372
- E(this, "refresh", /* @__PURE__ */ c(() => {
372
+ E(this, "refresh", /* @__PURE__ */ h(() => {
373
373
  var e;
374
374
  H.log("rowManager.refresh");
375
375
  const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
376
376
  i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
377
377
  }, "refresh"));
378
- E(this, "initialize", /* @__PURE__ */ c(() => {
378
+ E(this, "initialize", /* @__PURE__ */ h(() => {
379
379
  H.log("rowManager.initialize"), y(this, Q, {
380
380
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
381
381
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
382
382
  }), y(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
383
383
  const a = t(this, S).querySelector(o);
384
384
  if (!a) return;
385
- const h = a.querySelector(".ng-part-body table");
386
- if (!h) return;
387
- const l = h.querySelector("tbody.bindable-tbody");
385
+ const c = a.querySelector(".ng-part-body table");
386
+ if (!c) return;
387
+ const l = c.querySelector("tbody.bindable-tbody");
388
388
  if (!l) return;
389
389
  const g = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
390
390
  t(this, D).set(o, g);
@@ -393,20 +393,20 @@ const Ie = class Ie {
393
393
  if (i) {
394
394
  t(this, zt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop);
395
395
  let o = !1;
396
- const a = /* @__PURE__ */ c((h) => {
396
+ const a = /* @__PURE__ */ h((c) => {
397
397
  if (o) return;
398
398
  o = !0;
399
- const l = h.scrollTop, f = h.scrollLeft;
399
+ const l = c.scrollTop, f = c.scrollLeft;
400
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;
401
401
  }, "handleContainerScroll");
402
- [i, e, s].forEach((h) => {
403
- h && h.addEventListener("scroll", () => {
404
- a(h);
402
+ [i, e, s].forEach((c) => {
403
+ c && c.addEventListener("scroll", () => {
404
+ a(c);
405
405
  }, { passive: !0 });
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Ot, /* @__PURE__ */ c((i, e) => {
409
+ d(this, Ot, /* @__PURE__ */ h((i, e) => {
410
410
  H.log("rowManager.#renderRows");
411
411
  const s = t(this, D).get(e);
412
412
  if (!s || s.length === 0) return;
@@ -415,12 +415,12 @@ const Ie = class Ie {
415
415
  r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
416
  const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
417
417
  for (let a = 0; a < t(this, wt); a++)
418
- s.forEach((h) => {
419
- o.appendChild(h.cloneNode(!0));
418
+ s.forEach((c) => {
419
+ o.appendChild(c.cloneNode(!0));
420
420
  });
421
421
  n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
- d(this, zt, /* @__PURE__ */ c((i) => {
423
+ d(this, zt, /* @__PURE__ */ h((i) => {
424
424
  if (H.log("rowManager.#measureAndCacheHeight"), t(this, I) !== null && t(this, I) > 0)
425
425
  return t(this, I);
426
426
  H.log("#measureAndCacheHeight");
@@ -433,7 +433,7 @@ const Ie = class Ie {
433
433
  e.forEach((b) => {
434
434
  n.appendChild(b.cloneNode(!0));
435
435
  }), r ? r.before(n) : s.appendChild(n);
436
- const o = t(this, S), a = o.style.display, h = o.style.visibility, l = o.style.position;
436
+ const o = t(this, S), a = o.style.display, c = o.style.visibility, l = o.style.position;
437
437
  (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
438
438
  let f = 0;
439
439
  const g = s.querySelectorAll("tr");
@@ -444,10 +444,10 @@ const Ie = class Ie {
444
444
  u = parseFloat(v.height) || parseFloat(v.minHeight) || 0;
445
445
  }
446
446
  f += u;
447
- }), g.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, f <= 0) throw new Error("invalid dom");
447
+ }), g.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, f <= 0) throw new Error("invalid dom");
448
448
  return y(this, I, f), t(this, Et).call(this), t(this, I);
449
449
  }, "#measureAndCacheHeight"));
450
- d(this, St, /* @__PURE__ */ c(() => {
450
+ d(this, St, /* @__PURE__ */ h(() => {
451
451
  H.log("rowManager.#updateVirtualScrollHeight");
452
452
  const e = (t(this, P).data.get() || []).length, s = t(this, I), r = e * s;
453
453
  H.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
@@ -457,21 +457,21 @@ const Ie = class Ie {
457
457
  a && (a.style.height = `${r}px`);
458
458
  });
459
459
  }, "#updateVirtualScrollHeight"));
460
- d(this, Et, /* @__PURE__ */ c(() => {
460
+ d(this, Et, /* @__PURE__ */ h(() => {
461
461
  if (t(this, tt) > 0 && t(this, I) > 0) {
462
462
  const i = Math.ceil(t(this, tt) / t(this, I));
463
463
  y(this, wt, i + t(this, Wt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, Bt, /* @__PURE__ */ c(() => {
467
- var a, h, l, f, g, b;
466
+ d(this, Bt, /* @__PURE__ */ h(() => {
467
+ var a, c, l, f, g, b;
468
468
  const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
470
  const u = i ? Array.from(i.querySelectorAll("tbody tr")) : [], v = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(u.length, v.length, x.length);
471
471
  for (let m = 0; m < A; m++) {
472
472
  const W = [
473
473
  ((a = u[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
- ((h = v[m]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
474
+ ((c = v[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
475
  ((l = x[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
476
  ], R = Math.max(...W);
477
477
  R > 0 && (u[m] && (u[m].style.height = `${R}px`), v[m] && (v[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
@@ -490,7 +490,7 @@ const Ie = class Ie {
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
- d(this, Dt, /* @__PURE__ */ c(() => {
493
+ d(this, Dt, /* @__PURE__ */ h(() => {
494
494
  !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, V, new ResizeObserver((i) => {
495
495
  for (const e of i) {
496
496
  const s = e.target;
@@ -500,29 +500,29 @@ const Ie = class Ie {
500
500
  let n = 0;
501
501
  const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
502
  o && (n += o.offsetHeight), a && (n += a.offsetHeight);
503
- const h = Math.max(r - n, 100);
504
- t(this, tt) !== h && (y(this, tt, h), t(this, Et).call(this), t(this, I) !== null && (t(this, At).call(this), this.refresh()));
503
+ const c = Math.max(r - n, 100);
504
+ t(this, tt) !== c && (y(this, tt, c), t(this, Et).call(this), t(this, I) !== null && (t(this, At).call(this), this.refresh()));
505
505
  }
506
506
  }
507
507
  })), t(this, V).observe(t(this, S)));
508
508
  }, "#initResizeObserver"));
509
- d(this, At, /* @__PURE__ */ c(() => {
509
+ d(this, At, /* @__PURE__ */ h(() => {
510
510
  H.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
511
511
  const e = t(this, S).querySelector(i);
512
512
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
513
513
  }), t(this, Pt).call(this), t(this, Bt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, Ae, /* @__PURE__ */ c((i) => {
515
+ d(this, Ae, /* @__PURE__ */ h((i) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
518
  const s = t(this, S).querySelector(e);
519
519
  if (!s) return;
520
520
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
521
  if (!r) return;
522
- const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, h = (t(this, P).data.get() || []).length;
522
+ 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;
523
523
  n.forEach((f, g) => {
524
524
  const b = i + Math.floor(g / o);
525
- if (b >= h) {
525
+ if (b >= c) {
526
526
  f.style.visibility = "hidden";
527
527
  return;
528
528
  }
@@ -531,18 +531,18 @@ const Ie = class Ie {
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
534
- d(this, lt, /* @__PURE__ */ c((i) => {
534
+ d(this, lt, /* @__PURE__ */ h((i) => {
535
535
  var g, b;
536
536
  const e = t(this, I);
537
537
  if (!e || e <= 0) return;
538
538
  const s = t(this, P).data.length;
539
539
  if (s === 0) return;
540
540
  const r = ((g = t(this, D).get(".ng-container-body")) == null ? void 0 : g.length) || 1, n = t(this, S).querySelector(".ng-container-body .ng-part-body"), o = Math.max(0, s - Math.floor(n.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(i / e)));
541
- let h = Math.floor(a * e);
542
- H.log(`📜 [Scroll Inspect] scrollTop: ${i}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${h}`);
541
+ let c = Math.floor(a * e);
542
+ a === o && (c = i + e), H.log(`📜 [Scroll Inspect] scrollTop: ${i}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
543
543
  const l = t(this, Q).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
544
544
  (b = t(this, Q)) == null || b.scrollTables.forEach((u) => {
545
- u.style.transform = `translate3d(0, ${h}px, 0)`;
545
+ u.style.transform = `translate3d(0, ${c}px, 0)`;
546
546
  }), f !== a && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
547
547
  const v = t(this, S).querySelector(u);
548
548
  if (!v) return;
@@ -573,29 +573,29 @@ const Ie = class Ie {
573
573
  cell.dataset.row = dataIndex;
574
574
  });
575
575
  }; */
576
- d(this, qt, /* @__PURE__ */ c((i, e, s) => {
576
+ d(this, qt, /* @__PURE__ */ h((i, e, s) => {
577
577
  i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
578
578
  r.dataset.row = s;
579
579
  const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
580
580
  o && typeof o.refresh == "function" && o.refresh();
581
581
  });
582
582
  }, "#bindRowData"));
583
- d(this, Pt, /* @__PURE__ */ c(() => {
584
- var h, l, f;
583
+ d(this, Pt, /* @__PURE__ */ h(() => {
584
+ var c, l, f;
585
585
  H.log("rowManager.#syncHeaderHeights");
586
586
  const i = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
587
587
  if (!e) return;
588
588
  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);
589
589
  for (let g = 0; g < a; g++) {
590
590
  const b = [
591
- ((h = r[g]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
591
+ ((c = r[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
592
592
  ((l = n[g]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
593
593
  ((f = o[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
594
594
  ], u = Math.max(...b);
595
595
  u > 0 && (r[g] && (r[g].style.height = `${u}px`), n[g] && (n[g].style.height = `${u}px`), o[g] && (o[g].style.height = `${u}px`));
596
596
  }
597
597
  }, "#syncHeaderHeights"));
598
- E(this, "destroy", /* @__PURE__ */ c(() => {
598
+ E(this, "destroy", /* @__PURE__ */ h(() => {
599
599
  t(this, V) && (t(this, V).disconnect(), y(this, V, null));
600
600
  }, "destroy"));
601
601
  y(this, P, i.getRootNode().host), y(this, S, i), t(this, Dt).call(this);
@@ -608,7 +608,7 @@ const Ie = class Ie {
608
608
  return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
609
609
  }
610
610
  };
611
- P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), I = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Bt = new WeakMap(), Dt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), Pt = new WeakMap(), c(Ie, "RowManager");
611
+ P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), I = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Bt = new WeakMap(), Dt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), Pt = new WeakMap(), h(Ie, "RowManager");
612
612
  let ce = Ie;
613
613
  const jt = class jt {
614
614
  /**
@@ -622,7 +622,7 @@ const jt = class jt {
622
622
  */
623
623
  static compile(i) {
624
624
  if (!i) return null;
625
- const e = /* @__PURE__ */ c((a) => {
625
+ const e = /* @__PURE__ */ h((a) => {
626
626
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
627
627
  const f = l.getAttribute("cell-type") || "renderer";
628
628
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
@@ -631,9 +631,9 @@ const jt = class jt {
631
631
  let A = [];
632
632
  b && A.push(`data-bind="${b}"`), u && A.push(`data-expr="${u}"`), v && A.push(`maxbyte="${v}"`), x && A.push(`type="${x}"`), l.innerHTML = `<${g} ${A.join(" ")}></${g}>`;
633
633
  });
634
- }, "processCellTypes"), s = /* @__PURE__ */ c((a) => {
634
+ }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
635
635
  if (!a.querySelector("colgroup")) {
636
- const h = a.querySelector("tbody tr") || a.querySelector("tr"), l = h ? h.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), g = Math.max(Math.floor(a.clientWidth / l), 100);
636
+ const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), g = Math.max(Math.floor(a.clientWidth / l), 100);
637
637
  for (let b = 0; b < l; b++) {
638
638
  const u = document.createElement("col");
639
639
  u.setAttribute("width", g), f.appendChild(u);
@@ -641,12 +641,12 @@ const jt = class jt {
641
641
  a.prepend(f);
642
642
  }
643
643
  if (!a.querySelector("thead")) {
644
- const h = document.createElement("thead"), l = a.querySelector("colgroup");
645
- l ? l.after(h) : a.prepend(h);
644
+ const c = document.createElement("thead"), l = a.querySelector("colgroup");
645
+ l ? l.after(c) : a.prepend(c);
646
646
  }
647
647
  a.classList.add("nine-table-element");
648
- }, "ensureTableStructure"), r = /* @__PURE__ */ c((a, h) => {
649
- const l = Array.from(a.querySelectorAll(h + " tr")), f = Array.from(a.querySelectorAll(h + " th," + h + " td")), g = l.length;
648
+ }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
649
+ const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), g = l.length;
650
650
  if (g === 0 || f.length === 0) return;
651
651
  let b = 0;
652
652
  f.forEach((v) => {
@@ -678,16 +678,16 @@ const jt = class jt {
678
678
  });
679
679
  });
680
680
  }, "resetColIndex"), n = i.cloneNode(!0);
681
- return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, h) => {
681
+ return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, c) => {
682
682
  const l = a.getAttribute("fixed");
683
- l && n.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((f) => {
683
+ l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
684
684
  f.setAttribute("fixed", l);
685
685
  });
686
686
  }), n;
687
687
  }
688
688
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
689
689
  };
690
- c(jt, "TableCompiler");
690
+ h(jt, "TableCompiler");
691
691
  let he = jt;
692
692
  var Ft, et, st, Vt, Yt, ct, Ut, Xt;
693
693
  const pt = class pt extends HTMLElement {
@@ -696,10 +696,10 @@ const pt = class pt extends HTMLElement {
696
696
  d(this, Ft);
697
697
  d(this, et, null);
698
698
  d(this, st);
699
- E(this, "invalidate", /* @__PURE__ */ c(() => {
699
+ E(this, "invalidate", /* @__PURE__ */ h(() => {
700
700
  t(this, st).refresh();
701
701
  }, "invalidate"));
702
- d(this, Vt, /* @__PURE__ */ c(() => {
702
+ d(this, Vt, /* @__PURE__ */ h(() => {
703
703
  [
704
704
  { selector: ".ng-container-body", type: null },
705
705
  { selector: ".ng-container-left", type: "left" },
@@ -709,7 +709,7 @@ const pt = class pt extends HTMLElement {
709
709
  (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"));
710
710
  });
711
711
  }, "#renderSplitContainers"));
712
- d(this, Yt, /* @__PURE__ */ c(() => {
712
+ d(this, Yt, /* @__PURE__ */ h(() => {
713
713
  ["left", "right", "body"].forEach((e) => {
714
714
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
715
715
  if (!s || !r || r.length === 0) return;
@@ -720,7 +720,7 @@ const pt = class pt extends HTMLElement {
720
720
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
721
721
  });
722
722
  }, "#updateContainerWidths"));
723
- E(this, "generate", /* @__PURE__ */ c((e) => {
723
+ E(this, "generate", /* @__PURE__ */ h((e) => {
724
724
  if (!e) return;
725
725
  y(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this);
726
726
  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");
@@ -729,14 +729,14 @@ const pt = class pt extends HTMLElement {
729
729
  (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
730
730
  }, 0);
731
731
  }, "generate"));
732
- d(this, ct, /* @__PURE__ */ c((e, s, r) => {
733
- const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), h = n.querySelector("tfoot");
732
+ d(this, ct, /* @__PURE__ */ h((e, s, r) => {
733
+ const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), c = n.querySelector("tfoot");
734
734
  if (r === "header") {
735
- if (a && a.remove(), h && h.remove(), e.querySelector("tbody")) {
735
+ if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
736
736
  const f = document.createElement("tbody");
737
737
  f.className = "fixed-tbody", n.appendChild(f);
738
738
  }
739
- } else r === "body" ? (o && o.remove(), h && h.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
739
+ } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
740
740
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
741
741
  l.getAttribute("fixed") !== "left" && l.remove();
742
742
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -745,19 +745,19 @@ const pt = class pt extends HTMLElement {
745
745
  l.remove();
746
746
  }), n;
747
747
  }, "#createSplitTable"));
748
- E(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
749
- E(this, "scrollToX", /* @__PURE__ */ c((e) => {
748
+ E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, st).getRowHeight(), "getRowHeight"));
749
+ E(this, "scrollToX", /* @__PURE__ */ h((e) => {
750
750
  const s = this.querySelector(".ng-container-body .ng-part-body");
751
751
  s && (s.scrollLeft = e);
752
752
  }, "scrollToX"));
753
- E(this, "scrollToY", /* @__PURE__ */ c((e) => {
753
+ E(this, "scrollToY", /* @__PURE__ */ h((e) => {
754
754
  const s = this.querySelector(".ng-container-body .ng-part-body");
755
755
  s && (s.scrollTop = e);
756
756
  }, "scrollToY"));
757
- d(this, Ut, /* @__PURE__ */ c(() => {
757
+ d(this, Ut, /* @__PURE__ */ h(() => {
758
758
  t(this, Xt).call(this);
759
759
  }, "#init"));
760
- d(this, Xt, /* @__PURE__ */ c(() => {
760
+ d(this, Xt, /* @__PURE__ */ h(() => {
761
761
  const e = pt.SCROLLBAR_SIZE;
762
762
  this.innerHTML = `
763
763
  <style>
@@ -955,14 +955,14 @@ const pt = class pt extends HTMLElement {
955
955
  this.innerHTML = "", H.log("NineTableSheet destroyed.");
956
956
  }
957
957
  };
958
- Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), c(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
958
+ Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
959
959
  let $t = pt;
960
960
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
961
961
  var Kt, Rt;
962
962
  const _e = class _e extends HTMLElement {
963
963
  constructor() {
964
964
  super();
965
- d(this, Kt, /* @__PURE__ */ c(() => {
965
+ d(this, Kt, /* @__PURE__ */ h(() => {
966
966
  var e;
967
967
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
968
968
  var o;
@@ -970,8 +970,8 @@ const _e = class _e extends HTMLElement {
970
970
  t(this, Rt).call(this, n, r);
971
971
  }), t(this, Rt).call(this, 0, !1);
972
972
  }, "#init"));
973
- d(this, Rt, /* @__PURE__ */ c((e, s = !1) => {
974
- const r = /* @__PURE__ */ c(() => {
973
+ d(this, Rt, /* @__PURE__ */ h((e, s = !1) => {
974
+ const r = /* @__PURE__ */ h(() => {
975
975
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
976
976
  Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
977
977
  const b = f.filter((u) => u.classList.contains("active"));
@@ -979,12 +979,12 @@ const _e = class _e extends HTMLElement {
979
979
  const v = parseInt(u.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${v}"]`), A = f[v + 1];
980
980
  x && A && A.classList.contains("active") && x.style.setProperty("display", "flex");
981
981
  });
982
- }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
982
+ }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
983
983
  if (!a[e]) return;
984
984
  if (!s)
985
985
  a.forEach((f, g) => {
986
986
  f.classList.toggle("active", g === e);
987
- }), h.forEach((f, g) => {
987
+ }), c.forEach((f, g) => {
988
988
  const b = g === e;
989
989
  f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
990
990
  });
@@ -1006,31 +1006,31 @@ const _e = class _e extends HTMLElement {
1006
1006
  t(this, Kt).call(this);
1007
1007
  }
1008
1008
  };
1009
- Kt = new WeakMap(), Rt = new WeakMap(), c(_e, "NineTableSheets");
1009
+ Kt = new WeakMap(), Rt = new WeakMap(), h(_e, "NineTableSheets");
1010
1010
  let de = _e;
1011
1011
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
1012
1012
  var M, Zt, Tt, Gt;
1013
1013
  const Ne = class Ne {
1014
1014
  constructor(i) {
1015
1015
  d(this, M);
1016
- d(this, Zt, /* @__PURE__ */ c(() => {
1016
+ d(this, Zt, /* @__PURE__ */ h(() => {
1017
1017
  t(this, Gt).call(this), new ResizeObserver((i) => {
1018
1018
  for (let e of i)
1019
1019
  t(this, M).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
1020
1020
  }).observe(t(this, M));
1021
1021
  }, "#init"));
1022
- d(this, Tt, /* @__PURE__ */ c(() => {
1023
- var h, l;
1022
+ d(this, Tt, /* @__PURE__ */ h(() => {
1023
+ var c, l;
1024
1024
  const i = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1025
1025
  if (i.length === 0) return;
1026
- const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (h = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = $t.SCROLLBAR_SIZE, a = e * s + r + n + o;
1026
+ const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = $t.SCROLLBAR_SIZE, a = e * s + r + n + o;
1027
1027
  t(this, M).style.height = `${a}px`;
1028
1028
  }, "#applyAutoHeight"));
1029
- d(this, Gt, /* @__PURE__ */ c(() => {
1030
- const e = Array.from(t(this, M).children).filter((h) => h.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, n = e.map((h, l) => {
1029
+ d(this, Gt, /* @__PURE__ */ h(() => {
1030
+ const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, n = e.map((c, l) => {
1031
1031
  const g = `<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>` : "";
1032
1032
  return g + b;
1033
- }).join(""), o = e.map((h, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1033
+ }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1034
1034
  t(this, M).shadowRoot.innerHTML = `
1035
1035
  <style>
1036
1036
  :host {
@@ -1153,23 +1153,23 @@ const Ne = class Ne {
1153
1153
  <nine-table-footer></nine-table-footer>
1154
1154
  `, t(this, M).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1155
1155
  const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1156
- a == null || a.forEach((h, l) => {
1156
+ a == null || a.forEach((c, l) => {
1157
1157
  e[l] && setTimeout(() => {
1158
- h.generate(e[l]), s && t(this, Tt).call(this);
1158
+ c.generate(e[l]), s && t(this, Tt).call(this);
1159
1159
  });
1160
1160
  });
1161
1161
  }, "#render"));
1162
1162
  y(this, M, i), t(this, Zt).call(this);
1163
1163
  }
1164
1164
  };
1165
- M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), c(Ne, "LayoutManager");
1165
+ M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1166
1166
  let fe = Ne;
1167
1167
  var kt, ht;
1168
1168
  const We = class We {
1169
1169
  constructor(i) {
1170
1170
  d(this, kt);
1171
1171
  d(this, ht, -1);
1172
- E(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
1172
+ E(this, "count", /* @__PURE__ */ h(() => t(this, kt).rawRecords.length, "count"));
1173
1173
  y(this, kt, i);
1174
1174
  }
1175
1175
  get at() {
@@ -1180,7 +1180,7 @@ const We = class We {
1180
1180
  });
1181
1181
  }
1182
1182
  };
1183
- kt = new WeakMap(), ht = new WeakMap(), c(We, "ngRow");
1183
+ kt = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1184
1184
  let ue = We;
1185
1185
  var _, k, N, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
1186
1186
  const z = class z {
@@ -1191,7 +1191,7 @@ const z = class z {
1191
1191
  d(this, dt, []);
1192
1192
  d(this, Jt, 0);
1193
1193
  d(this, Y, []);
1194
- d(this, Qt, /* @__PURE__ */ c(() => {
1194
+ d(this, Qt, /* @__PURE__ */ h(() => {
1195
1195
  y(this, Y, []);
1196
1196
  const i = t(this, _).template || [];
1197
1197
  Array.from(i).forEach((e) => {
@@ -1201,13 +1201,13 @@ const z = class z {
1201
1201
  e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
1202
1202
  });
1203
1203
  }, "#initialize"));
1204
- d(this, it, /* @__PURE__ */ c(() => {
1204
+ d(this, it, /* @__PURE__ */ h(() => {
1205
1205
  const i = t(this, _).shadowRoot.querySelector("nine-table-sheets");
1206
1206
  i == null || i.classList.toggle("nodata", this.length === 0), t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1207
1207
  e.invalidate();
1208
1208
  });
1209
1209
  }, "#invalidate"));
1210
- E(this, "get", /* @__PURE__ */ c((i, e) => {
1210
+ E(this, "get", /* @__PURE__ */ h((i, e) => {
1211
1211
  var n;
1212
1212
  const s = this.getValidData();
1213
1213
  if (!s || s.length <= 0) return;
@@ -1220,10 +1220,10 @@ const z = class z {
1220
1220
  }
1221
1221
  return t(this, ft).call(this, s[i]);
1222
1222
  }, "get"));
1223
- E(this, "set", /* @__PURE__ */ c((i) => {
1223
+ E(this, "set", /* @__PURE__ */ h((i) => {
1224
1224
  this.clear(), this.add(i, !1), t(this, it).call(this);
1225
1225
  }, "set"));
1226
- d(this, Ct, /* @__PURE__ */ c(() => ({
1226
+ d(this, Ct, /* @__PURE__ */ h(() => ({
1227
1227
  rowState: z.ROW_STATE.EMPTY,
1228
1228
  deleted: !1,
1229
1229
  filtered: !1,
@@ -1232,14 +1232,14 @@ const z = class z {
1232
1232
  c: {},
1233
1233
  _: [0, 0, 0, 0, z.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1234
1234
  }), "#getDefaultMeta"));
1235
- E(this, "reset", /* @__PURE__ */ c(() => {
1235
+ E(this, "reset", /* @__PURE__ */ h(() => {
1236
1236
  y(this, N, []), y(this, dt, []), t(this, it).call(this);
1237
1237
  }, "reset"));
1238
- E(this, "clear", /* @__PURE__ */ c(() => {
1238
+ E(this, "clear", /* @__PURE__ */ h(() => {
1239
1239
  var i;
1240
1240
  t(this, k).rawRecords = [], y(this, N, []), y(this, dt, []), (i = t(this, k).viewRecords) != null && i.reset && t(this, k).viewRecords.reset();
1241
1241
  }, "clear"));
1242
- d(this, te, /* @__PURE__ */ c((i) => {
1242
+ d(this, te, /* @__PURE__ */ h((i) => {
1243
1243
  var r;
1244
1244
  Array.isArray(i) || (i = [i]);
1245
1245
  const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(i[0] || {}), s = [];
@@ -1250,10 +1250,10 @@ const z = class z {
1250
1250
  }), s.push(o);
1251
1251
  }), s;
1252
1252
  }, "#json2Array"));
1253
- d(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1253
+ d(this, ee, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1254
1254
  e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = z.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1255
1255
  }), i), "#defaultInsert"));
1256
- E(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1256
+ E(this, "add", /* @__PURE__ */ h((i, e = !0) => {
1257
1257
  i === void 0 && (i = {});
1258
1258
  const s = t(this, te).call(this, i);
1259
1259
  t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
@@ -1263,7 +1263,7 @@ const z = class z {
1263
1263
  a && (a.__ng.rowState = z.ROW_STATE.EMPTY);
1264
1264
  }), t(this, it).call(this), r;
1265
1265
  }, "add"));
1266
- E(this, "delete", /* @__PURE__ */ c((i) => {
1266
+ E(this, "delete", /* @__PURE__ */ h((i) => {
1267
1267
  let e = [];
1268
1268
  Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1269
1269
  if (t(this, N)[s]) {
@@ -1274,36 +1274,36 @@ const z = class z {
1274
1274
  }
1275
1275
  }), this.resetRecords(), t(this, it).call(this);
1276
1276
  }, "delete"));
1277
- E(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1278
- var h;
1277
+ E(this, "setValue", /* @__PURE__ */ h((i, e, s) => {
1278
+ var c;
1279
1279
  i = parseInt(i, 10);
1280
- const n = (typeof ((h = t(this, _).fields) == null ? void 0 : h.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1280
+ const n = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1281
1281
  if (n < 0) return;
1282
1282
  const o = this.getValidData()[i];
1283
1283
  if (!o) return;
1284
1284
  const a = o.v[n];
1285
1285
  a !== s && o.__ng.rowState !== z.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = z.ROW_STATE.UPDATE), o.v[n] = s;
1286
1286
  }, "setValue"));
1287
- E(this, "resetRecords", /* @__PURE__ */ c(() => {
1287
+ E(this, "resetRecords", /* @__PURE__ */ h(() => {
1288
1288
  y(this, dt, t(this, k).rawRecords.filter((i) => !i.__ng.deleted)), y(this, N, t(this, k).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, k).rawRecords.forEach((i, e) => {
1289
1289
  i.__ng.rowidx = e;
1290
1290
  }), t(this, N).forEach((i, e) => {
1291
1291
  i.__ng.i = e;
1292
1292
  });
1293
1293
  }, "resetRecords"));
1294
- E(this, "getValidData", /* @__PURE__ */ c(() => (t(this, N).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1295
- d(this, ft, /* @__PURE__ */ c((i) => {
1294
+ E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1295
+ d(this, ft, /* @__PURE__ */ h((i) => {
1296
1296
  var o;
1297
1297
  if (!i) return i;
1298
1298
  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) => {
1299
- const h = {};
1299
+ const c = {};
1300
1300
  return r.forEach((l, f) => {
1301
- h[l] = a.v ? a.v[f] : a[l];
1302
- }), h.__ng = a.__ng, h;
1301
+ c[l] = a.v ? a.v[f] : a[l];
1302
+ }), c.__ng = a.__ng, c;
1303
1303
  });
1304
1304
  return e ? n[0] : n;
1305
1305
  }, "#conv"));
1306
- E(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1306
+ E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1307
1307
  y(this, _, i), y(this, k, e), t(this, Qt).call(this);
1308
1308
  }
1309
1309
  get source() {
@@ -1325,7 +1325,7 @@ const z = class z {
1325
1325
  return this.length;
1326
1326
  }
1327
1327
  };
1328
- _ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), c(z, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1328
+ _ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(z, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1329
1329
  E(z, "ROW_STATE", {
1330
1330
  EMPTY: "EMPTY",
1331
1331
  NORMAL: "NORMAL",
@@ -1355,7 +1355,7 @@ const Oe = class Oe {
1355
1355
  }, this.setDataSource([]);
1356
1356
  }
1357
1357
  };
1358
- rt = new WeakMap(), c(Oe, "ngDataManager");
1358
+ rt = new WeakMap(), h(Oe, "ngDataManager");
1359
1359
  let be = Oe;
1360
1360
  var ut, L, Lt, se;
1361
1361
  const ze = class ze {
@@ -1363,18 +1363,18 @@ const ze = class ze {
1363
1363
  constructor(i) {
1364
1364
  d(this, ut);
1365
1365
  d(this, L, []);
1366
- E(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1366
+ E(this, "add", /* @__PURE__ */ h((i, e = "string") => {
1367
1367
  i.forEach((s) => {
1368
1368
  t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1369
1369
  }), t(this, Lt).call(this);
1370
1370
  }, "add"));
1371
- d(this, Lt, /* @__PURE__ */ c(() => {
1371
+ d(this, Lt, /* @__PURE__ */ h(() => {
1372
1372
  const i = /* @__PURE__ */ new Map();
1373
1373
  t(this, L).forEach((e) => {
1374
1374
  i.set(e.name, e.type);
1375
1375
  }), y(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1376
1376
  }, "#adjust"));
1377
- d(this, se, /* @__PURE__ */ c(() => {
1377
+ d(this, se, /* @__PURE__ */ h(() => {
1378
1378
  y(this, L, []), H.log(t(this, ut).querySelectorAll("table"));
1379
1379
  const i = Array.from(t(this, ut).querySelectorAll("table"));
1380
1380
  if (!(!i || i.length === 0)) {
@@ -1396,9 +1396,9 @@ const ze = class ze {
1396
1396
  }
1397
1397
  o.split("data.").forEach((a) => {
1398
1398
  if (a.trim() != "") {
1399
- const h = a.search(/[^_A-Za-z0-9]/g);
1399
+ const c = a.search(/[^_A-Za-z0-9]/g);
1400
1400
  let l = "";
1401
- h >= 0 ? l = a.substring(0, h) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1401
+ c >= 0 ? l = a.substring(0, c) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1402
1402
  }
1403
1403
  });
1404
1404
  });
@@ -1428,7 +1428,7 @@ const ze = class ze {
1428
1428
  return t(this, L).some((e) => e.name === i);
1429
1429
  }
1430
1430
  };
1431
- ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), c(ze, "ngFields");
1431
+ ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(ze, "ngFields");
1432
1432
  let ye = ze;
1433
1433
  var nt, ie, re;
1434
1434
  const Be = class Be extends HTMLElement {
@@ -1437,7 +1437,7 @@ const Be = class Be extends HTMLElement {
1437
1437
  //#created = false;
1438
1438
  d(this, nt);
1439
1439
  d(this, ie);
1440
- d(this, re, /* @__PURE__ */ c(() => {
1440
+ d(this, re, /* @__PURE__ */ h(() => {
1441
1441
  this.fields = new ye(this), y(this, ie, new fe(this)), H.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1442
1442
  }, "#init"));
1443
1443
  this.attachShadow({ mode: "open" }), y(this, nt, new be(this));
@@ -1461,7 +1461,7 @@ const Be = class Be extends HTMLElement {
1461
1461
  return t(this, nt);
1462
1462
  }
1463
1463
  };
1464
- nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), c(Be, "NineTable");
1464
+ nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Be, "NineTable");
1465
1465
  let pe = Be;
1466
1466
  customElements.get("nine-table") || customElements.define("nine-table", pe);
1467
1467
  const mt = class mt extends HTMLElement {
@@ -1475,7 +1475,7 @@ const mt = class mt extends HTMLElement {
1475
1475
  connectedCallback() {
1476
1476
  }
1477
1477
  };
1478
- c(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1478
+ h(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1479
1479
  let me = mt;
1480
1480
  var C, Ht, p, qe, Re, Te, ke, Ce;
1481
1481
  const De = class De extends me {
@@ -1488,7 +1488,7 @@ const De = class De extends me {
1488
1488
  d(this, Re);
1489
1489
  d(this, Te);
1490
1490
  d(this, ke);
1491
- E(this, "getDisplayText", /* @__PURE__ */ c((e) => {
1491
+ E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1492
1492
  if (t(this, p))
1493
1493
  if (t(this, p).closest("tbody")) {
1494
1494
  const s = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
@@ -1508,7 +1508,7 @@ const De = class De extends me {
1508
1508
  } catch {
1509
1509
  }
1510
1510
  }, "getDisplayText"));
1511
- d(this, Ce, /* @__PURE__ */ c(() => {
1511
+ d(this, Ce, /* @__PURE__ */ h(() => {
1512
1512
  if (!(!t(this, C) || !t(this, C).template || !t(this, p).closest("tbody.bindable"))) {
1513
1513
  var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
1514
1514
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
@@ -1521,9 +1521,9 @@ const De = class De extends me {
1521
1521
  if (parseInt(s.sectionRowIndex / t(this, C).template.length) > 0)
1522
1522
  for (var o of r) {
1523
1523
  if (o > e) break;
1524
- var a = parseInt(t(this, p).dataset.row), h = a - 1, l = t(this, p).closest("tr").data, f = t(this, C).data.get(h);
1524
+ var a = parseInt(t(this, p).dataset.row), c = a - 1, l = t(this, p).closest("tr").data, f = t(this, C).data.get(c);
1525
1525
  t(this, p).dataset.matrixRow;
1526
- var g = t(this, C).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), b = g.dataset.expr ? this.getExprValue(g.dataset.expr, l, a) : l[g.dataset.bind], u = g.dataset.expr ? this.getExprValue(g.dataset.expr, f, h) : f[g.dataset.bind];
1526
+ var g = t(this, C).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), b = g.dataset.expr ? this.getExprValue(g.dataset.expr, l, a) : l[g.dataset.bind], u = g.dataset.expr ? this.getExprValue(g.dataset.expr, f, c) : f[g.dataset.bind];
1527
1527
  if (b != u) {
1528
1528
  n = !0;
1529
1529
  break;
@@ -1537,7 +1537,7 @@ const De = class De extends me {
1537
1537
  }
1538
1538
  }
1539
1539
  }, "#resetSuppress"));
1540
- E(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
1540
+ E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, n) => {
1541
1541
  if (typeof e < "u")
1542
1542
  try {
1543
1543
  r = parseInt(r);
@@ -1573,7 +1573,7 @@ const De = class De extends me {
1573
1573
  return parseInt(t(this, p).dataset.row), t(this, Ht).data[e];
1574
1574
  }
1575
1575
  };
1576
- C = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), qe = new WeakMap(), Re = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), c(De, "CellElement");
1576
+ C = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), qe = new WeakMap(), Re = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), h(De, "CellElement");
1577
1577
  let ve = De;
1578
1578
  const Pe = class Pe extends ve {
1579
1579
  constructor() {
@@ -1586,7 +1586,7 @@ const Pe = class Pe extends ve {
1586
1586
  return super.refresh();
1587
1587
  }
1588
1588
  };
1589
- c(Pe, "EditableCellElement");
1589
+ h(Pe, "EditableCellElement");
1590
1590
  let xe = Pe;
1591
1591
  var Mt, ot, gt, bt, ne, U, Le;
1592
1592
  const je = class je extends xe {
@@ -1598,7 +1598,7 @@ const je = class je extends xe {
1598
1598
  d(this, bt);
1599
1599
  d(this, ne);
1600
1600
  d(this, U);
1601
- E(this, "refresh", /* @__PURE__ */ c(() => {
1601
+ E(this, "refresh", /* @__PURE__ */ h(() => {
1602
1602
  const e = super.refresh();
1603
1603
  t(this, Mt).value = e;
1604
1604
  }, "refresh"));
@@ -1632,7 +1632,7 @@ const je = class je extends xe {
1632
1632
  if (!v) this.reset();
1633
1633
  };
1634
1634
  */
1635
- d(this, Le, /* @__PURE__ */ c((e) => {
1635
+ d(this, Le, /* @__PURE__ */ h((e) => {
1636
1636
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1637
1637
  if (t(this, ot) == "number") {
1638
1638
  let n = [];
@@ -1660,7 +1660,7 @@ const je = class je extends xe {
1660
1660
  `, super.connectedCallback(), y(this, Mt, this.querySelector("input"));
1661
1661
  }
1662
1662
  };
1663
- Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), c(je, "CellInputText");
1663
+ Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
1664
1664
  let we = je;
1665
1665
  customElements.get("cell-input-text");
1666
1666
  customElements.get("cell-input") || customElements.define("cell-input", we);