@ninebone/table 0.0.797 β†’ 0.0.798

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
1
  var ys = Object.defineProperty;
2
- var ms = (C) => {
3
- throw TypeError(C);
2
+ var ms = (T) => {
3
+ throw TypeError(T);
4
4
  };
5
- var Ss = (C, n, e) => n in C ? ys(C, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : C[n] = e;
6
- var h = (C, n) => ys(C, "name", { value: n, configurable: !0 });
7
- var q = (C, n, e) => Ss(C, typeof n != "symbol" ? n + "" : n, e), Ee = (C, n, e) => n.has(C) || ms("Cannot " + e);
8
- var t = (C, n, e) => (Ee(C, n, "read from private field"), e ? e.call(C) : n.get(C)), d = (C, n, e) => n.has(C) ? ms("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(C) : n.set(C, e), y = (C, n, e, s) => (Ee(C, n, "write to private field"), s ? s.call(C, e) : n.set(C, e), e), V = (C, n, e) => (Ee(C, n, "access private method"), e);
9
- var xs = (C, n, e, s) => ({
5
+ var Ss = (T, s, e) => s in T ? ys(T, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[s] = e;
6
+ var h = (T, s) => ys(T, "name", { value: s, configurable: !0 });
7
+ var q = (T, s, e) => Ss(T, typeof s != "symbol" ? s + "" : s, e), Ee = (T, s, e) => s.has(T) || ms("Cannot " + e);
8
+ var t = (T, s, e) => (Ee(T, s, "read from private field"), e ? e.call(T) : s.get(T)), d = (T, s, e) => s.has(T) ? ms("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), y = (T, s, e, n) => (Ee(T, s, "write to private field"), n ? n.call(T, e) : s.set(T, e), e), V = (T, s, e) => (Ee(T, s, "access private method"), e);
9
+ var xs = (T, s, e, n) => ({
10
10
  set _(r) {
11
- y(C, n, r, e);
11
+ y(T, s, r, e);
12
12
  },
13
13
  get _() {
14
- return t(C, n, s);
14
+ return t(T, s, n);
15
15
  }
16
16
  });
17
17
  import { trace as Rs } from "@ninebone/util";
@@ -42,9 +42,9 @@ const es = class es extends HTMLElement {
42
42
  }, "#observeResize"));
43
43
  q(this, "refresh", /* @__PURE__ */ h(() => {
44
44
  if (!t(this, j) || !t(this, E) || t(this, G)) return;
45
- const e = t(this, E).container, s = e.querySelector("table");
46
- if (!s) return;
47
- const r = t(this, E).track, i = t(this, E).thumb, o = t(this, j).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
45
+ const e = t(this, E).container, n = e.querySelector("table");
46
+ if (!n) return;
47
+ const r = t(this, E).track, i = t(this, E).thumb, o = t(this, j).querySelector(".ng-container-bottom"), a = e.clientWidth, c = n.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  o && (o.style.display = "flex");
50
50
  else {
@@ -63,15 +63,15 @@ const es = class es extends HTMLElement {
63
63
  }, "refresh"));
64
64
  d(this, nt, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, E)) return !1;
66
- const s = t(this, E).container, r = s.querySelector("table");
66
+ const n = t(this, E).container, r = n.querySelector("table");
67
67
  if (!r) return !1;
68
68
  const i = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
71
  const c = i.width - o;
72
72
  a > c && (a = c), a = parseInt(a, 10), t(this, E).thumb.style.left = `${a}px`, S.log("1111=========="), t(this, E).left.disabled = a === 0, t(this, E).right.disabled = a >= c - 1;
73
- const l = s.clientWidth, f = r.scrollWidth - l;
74
- return c > 0 && f > 0 && (s.scrollLeft = a / c * f), a > 0 && a < c - 1;
73
+ const l = n.clientWidth, f = r.scrollWidth - l;
74
+ return c > 0 && f > 0 && (n.scrollLeft = a / c * f), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Qt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
@@ -83,11 +83,11 @@ const es = class es extends HTMLElement {
83
83
  t(this, nt).call(this, o + r) || clearInterval(t(this, et));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ h(() => {
86
+ }, "delayScroll"), n = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, tt)), clearInterval(t(this, et));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, E).left.addEventListener(r, s), t(this, E).right.addEventListener(r, s), t(this, E).track.addEventListener(r, s);
90
+ t(this, E).left.addEventListener(r, n), t(this, E).right.addEventListener(r, n), t(this, E).track.addEventListener(r, n);
91
91
  }), t(this, E).left.addEventListener("mousedown", (r) => {
92
92
  r.button === 0 && e(-20);
93
93
  }), t(this, E).right.addEventListener("mousedown", (r) => {
@@ -105,7 +105,7 @@ const es = class es extends HTMLElement {
105
105
  const c = t(this, E).track.getBoundingClientRect();
106
106
  t(this, nt).call(this, a.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
- y(this, G, !1), s(), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
108
+ y(this, G, !1), n(), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
111
111
  });
@@ -177,18 +177,18 @@ const es = class es extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ h(() => {
180
- const s = t(this, j).querySelector(".ng-container-body .ng-part-body");
181
- if (!s) {
180
+ const n = t(this, j).querySelector(".ng-container-body .ng-part-body");
181
+ if (!n) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
185
  y(this, E, {
186
- container: s,
186
+ container: n,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
- }), s.addEventListener("scroll", () => {
191
+ }), n.addEventListener("scroll", () => {
192
192
  t(this, G) || this.refresh();
193
193
  }), t(this, Qt).call(this), t(this, Jt).call(this), this.refresh();
194
194
  }, "initWhenReady");
@@ -199,8 +199,8 @@ const es = class es extends HTMLElement {
199
199
  }
200
200
  };
201
201
  j = new WeakMap(), G = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Jt = new WeakMap(), nt = new WeakMap(), Qt = new WeakMap(), h(es, "NineTableHScrollBar");
202
- let Ce = es;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ce);
202
+ let Te = es;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Te);
204
204
  var rt, ot, yt, k, kt, It, te;
205
205
  const ss = class ss extends HTMLElement {
206
206
  constructor() {
@@ -213,13 +213,13 @@ const ss = class ss extends HTMLElement {
213
213
  d(this, It, 0);
214
214
  q(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (S.log("vscrollbar.refresh"), !t(this, rt) || !t(this, k)) return;
216
- const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, i = e.clientHeight, o = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = o * a;
216
+ const e = t(this, k).container, n = t(this, k).track, r = t(this, k).thumb, i = e.clientHeight, o = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = o * a;
217
217
  if (c <= i || o === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
- const l = s.clientHeight;
222
+ const l = n.clientHeight;
223
223
  if (l <= 0) return;
224
224
  const u = Math.max(Math.min(l * (i / c), l), 20);
225
225
  r.style.height = `${u}px`;
@@ -232,7 +232,7 @@ const ss = class ss extends HTMLElement {
232
232
  }, "refresh"));
233
233
  d(this, te, /* @__PURE__ */ h(() => {
234
234
  S.log("nine-table-vscrollbar.#init");
235
- const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
235
+ const e = t(this, k).container, n = /* @__PURE__ */ h(() => {
236
236
  const i = (t(this, rt).data.get() || []).length, o = t(this, ot).getRowHeight();
237
237
  return i * o;
238
238
  }, "getContentHeight");
@@ -241,12 +241,12 @@ const ss = class ss extends HTMLElement {
241
241
  r.stopPropagation(), r.preventDefault(), y(this, yt, !0), y(this, kt, r.clientY), y(this, It, e.scrollTop);
242
242
  const i = /* @__PURE__ */ h((a) => {
243
243
  if (!t(this, yt)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, kt), g = e.clientHeight, p = s(), x = Math.max(p - g, 1);
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, kt), g = e.clientHeight, p = n(), x = Math.max(p - g, 1);
245
245
  if (f > 0 && x > 0) {
246
246
  const w = b / f * x;
247
247
  let m = t(this, It) + w;
248
- const T = Math.max(0, p - g);
249
- m < 0 && (m = 0), m > T && (m = T), e.scrollTop = m;
248
+ const C = Math.max(0, p - g);
249
+ m < 0 && (m = 0), m > C && (m = C), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
@@ -255,7 +255,7 @@ const ss = class ss extends HTMLElement {
255
255
  document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
256
256
  }), t(this, k).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
- const i = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - i.top - o / 2, l = i.height - o, u = e.clientHeight, f = s(), b = Math.max(f - u, 1);
258
+ const i = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - i.top - o / 2, l = i.height - o, u = e.clientHeight, f = n(), b = Math.max(f - u, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const g = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = g * b;
@@ -334,13 +334,13 @@ const ss = class ss extends HTMLElement {
334
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
335
335
  `;
336
336
  const e = /* @__PURE__ */ h(() => {
337
- const s = t(this, ot).querySelector(".ng-container-body .ng-part-body");
338
- if (!s) {
337
+ const n = t(this, ot).querySelector(".ng-container-body .ng-part-body");
338
+ if (!n) {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
342
  y(this, k, {
343
- container: s,
343
+ container: n,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
346
346
  top: this.querySelector(".ng-scroll-top"),
@@ -351,11 +351,11 @@ const ss = class ss extends HTMLElement {
351
351
  }
352
352
  };
353
353
  rt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), te = new WeakMap(), h(ss, "NineTableVScrollBar");
354
- let Te = ss;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Te);
354
+ let Ce = ss;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ce);
356
356
  var U, A, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, Ht, $t, ne, re, Nt, Ue, mt, _t, oe;
357
357
  const ns = class ns {
358
- constructor(n) {
358
+ constructor(s) {
359
359
  d(this, U);
360
360
  d(this, A);
361
361
  d(this, it);
@@ -371,52 +371,57 @@ const ns = class ns {
371
371
  q(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  S.log("rowManager.refresh");
374
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body");
375
- n && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop), (e = t(this, A).querySelector("nine-table-vscrollbar")) == null || e.refresh());
374
+ const s = t(this, A).querySelector(".ng-container-body .ng-part-body");
375
+ s && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, s.scrollTop), (e = t(this, A).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  q(this, "initialize", /* @__PURE__ */ h(() => {
378
378
  S.log("rowManager.initialize"), y(this, it, {
379
379
  scrollTables: t(this, A).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, A).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
382
- const i = t(this, A).querySelector(r);
383
- if (!i) return;
384
- const o = i.querySelector(".ng-part-body table");
385
- if (!o) return;
386
- const a = o.querySelector("tbody.bindable-tbody");
381
+ }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
+ const a = t(this, A).querySelector(o);
387
383
  if (!a) return;
388
- const l = Array.from(a.querySelectorAll("tr")).map((u) => u.cloneNode(!0));
389
- t(this, Y).set(r, l);
384
+ const c = a.querySelector(".ng-part-body table");
385
+ if (!c) return;
386
+ const l = c.querySelector("tbody.bindable-tbody");
387
+ if (!l) return;
388
+ const f = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
+ t(this, Y).set(o, f);
390
390
  });
391
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body"), e = t(this, A).querySelector(".ng-container-left .ng-part-body"), s = t(this, A).querySelector(".ng-container-right .ng-part-body");
392
- if (t(this, A).querySelector(".ng-container-body .ng-part-header"), t(this, A).querySelector(".ng-container-body .ng-part-footer"), n) {
393
- t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop);
394
- let r = !1;
395
- n.scrollTop, n.scrollLeft;
396
- const i = /* @__PURE__ */ h((o) => {
397
- var c;
398
- if (r) return;
399
- r = !0;
400
- const a = o.scrollTop;
401
- o.scrollLeft, S.log("======", o, o.scrollLeft), n && n.scrollTop !== a && (n.scrollTop = a), e && e.scrollTop !== a && (e.scrollTop = a), s && s.scrollTop !== a && (s.scrollTop = a), t(this, mt).call(this, a), (c = t(this, A).querySelector("nine-table-vscrollbar")) == null || c.refresh(), r = !1;
391
+ const s = t(this, A).querySelector(".ng-container-body .ng-part-body"), e = t(this, A).querySelector(".ng-container-left .ng-part-body"), n = t(this, A).querySelector(".ng-container-right .ng-part-body"), r = t(this, A).querySelector(".ng-container-body .ng-part-header"), i = t(this, A).querySelector(".ng-container-body .ng-part-footer");
392
+ if (s) {
393
+ t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, s.scrollTop);
394
+ let o = !1;
395
+ s.scrollTop, s.scrollLeft;
396
+ const a = /* @__PURE__ */ h((c) => {
397
+ var f;
398
+ if (o) return;
399
+ o = !0;
400
+ const l = c.scrollTop, u = c.scrollLeft;
401
+ S.log("======", c, c.scrollLeft), s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), r && r.scrollLeft !== u && (r.scrollLeft = u), i && i.scrollLeft !== u && (i.scrollLeft = u), t(this, mt).call(this, l), (f = t(this, A).querySelector("nine-table-vscrollbar")) == null || f.refresh(), o = !1;
402
402
  }, "handleContainerScroll");
403
- [n, e, s].forEach((o) => {
404
- o == null || o.addEventListener("scroll", (a) => {
405
- S.log(a), S.log("rowManager.scroll event"), i(o);
403
+ s == null || s.addEventListener("scroll", (c) => {
404
+ a(s);
405
+ }), [e, n].forEach((c) => {
406
+ c == null || c.addEventListener("scroll", (l) => {
407
+ if (o) return;
408
+ o = !0;
409
+ const u = c.scrollTop;
410
+ s && s.scrollTop !== u && (s.scrollTop = u), o = !1;
406
411
  });
407
412
  });
408
413
  }
409
414
  }, "initialize"));
410
- d(this, se, /* @__PURE__ */ h((n, e) => {
415
+ d(this, se, /* @__PURE__ */ h((s, e) => {
411
416
  S.log("rowManager.#renderRows");
412
- const s = t(this, Y).get(e);
413
- if (!s || s.length === 0) return;
414
- const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
417
+ const n = t(this, Y).get(e);
418
+ if (!n || n.length === 0) return;
419
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
415
420
  if (!r) return;
416
421
  r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
417
422
  const i = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
418
423
  for (let a = 0; a < t(this, Lt); a++)
419
- s.forEach((c) => {
424
+ n.forEach((c) => {
420
425
  o.appendChild(c.cloneNode(!0));
421
426
  });
422
427
  i ? i.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, it).firstTr = r.querySelector("tr:not(.nodata)"));
@@ -424,21 +429,21 @@ const ns = class ns {
424
429
  d(this, Mt, /* @__PURE__ */ h(() => {
425
430
  if (t(this, O) !== null && t(this, O) > 0)
426
431
  return t(this, O);
427
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body");
432
+ const s = t(this, A).querySelector(".ng-container-body .ng-part-body");
428
433
  S.log("rowManager.#measureAndCacheHeight");
429
434
  const e = t(this, Y).get(".ng-container-body");
430
435
  if (!e || e.length === 0) throw new Error("invalid dom");
431
- const s = n.querySelector("tbody.bindable-tbody");
432
- if (S.log(s), !s) throw new Error("invalid dom");
433
- s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
434
- const r = s.querySelector("tr.nodata"), i = document.createDocumentFragment();
436
+ const n = s.querySelector("tbody.bindable-tbody");
437
+ if (S.log(n), !n) throw new Error("invalid dom");
438
+ n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
439
+ const r = n.querySelector("tr.nodata"), i = document.createDocumentFragment();
435
440
  e.forEach((b) => {
436
441
  i.appendChild(b.cloneNode(!0));
437
- }), r ? r.before(i) : s.appendChild(i);
442
+ }), r ? r.before(i) : n.appendChild(i);
438
443
  const o = t(this, A), a = o.style.display, c = o.style.visibility, l = o.style.position;
439
444
  (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
440
445
  let u = 0;
441
- const f = s.querySelectorAll("tr");
446
+ const f = n.querySelectorAll("tr");
442
447
  return f.forEach((b) => {
443
448
  let g = b.offsetHeight || b.getBoundingClientRect().height;
444
449
  if (g === 0) {
@@ -450,8 +455,8 @@ const ns = class ns {
450
455
  }, "#measureAndCacheHeight"));
451
456
  d(this, Ht, /* @__PURE__ */ h(() => {
452
457
  S.log("rowManager.#updateVirtualScrollHeight");
453
- const e = (t(this, U).data.get() || []).length, s = t(this, O), r = e * s;
454
- S.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
458
+ const e = (t(this, U).data.get() || []).length, n = t(this, O), r = e * n;
459
+ S.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: n, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
455
460
  const o = t(this, A).querySelector(i);
456
461
  if (!o) return;
457
462
  const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
@@ -460,21 +465,21 @@ const ns = class ns {
460
465
  }, "#updateVirtualScrollHeight"));
461
466
  d(this, $t, /* @__PURE__ */ h(() => {
462
467
  if (t(this, at) > 0 && t(this, O) > 0) {
463
- const n = Math.ceil(t(this, at) / t(this, O));
464
- y(this, Lt, n + t(this, ee));
468
+ const s = Math.ceil(t(this, at) / t(this, O));
469
+ y(this, Lt, s + t(this, ee));
465
470
  }
466
471
  }, "#updateRowCount"));
467
472
  d(this, ne, /* @__PURE__ */ h(() => {
468
473
  var a, c, l, u, f, b;
469
- const n = t(this, A).querySelector(".ng-container-left .ng-part-body table"), e = t(this, A).querySelector(".ng-container-body .ng-part-body table"), s = t(this, A).querySelector(".ng-container-right .ng-part-body table");
474
+ const s = t(this, A).querySelector(".ng-container-left .ng-part-body table"), e = t(this, A).querySelector(".ng-container-body .ng-part-body table"), n = t(this, A).querySelector(".ng-container-right .ng-part-body table");
470
475
  if (e) {
471
- const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, x.length);
476
+ const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = n ? Array.from(n.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, x.length);
472
477
  for (let m = 0; m < w; m++) {
473
- const T = [
478
+ const C = [
474
479
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
475
480
  ((c = p[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
476
481
  ((l = x[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
477
- ], R = Math.max(...T);
482
+ ], R = Math.max(...C);
478
483
  R > 0 && (g[m] && (g[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
479
484
  }
480
485
  }
@@ -482,24 +487,24 @@ const ns = class ns {
482
487
  if (i) {
483
488
  const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, p.length, x.length);
484
489
  for (let m = 0; m < w; m++) {
485
- const T = [
490
+ const C = [
486
491
  ((u = g[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
492
  ((f = p[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
488
493
  ((b = x[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
489
- ], R = Math.max(...T);
494
+ ], R = Math.max(...C);
490
495
  R > 0 && (g[m] && (g[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
491
496
  }
492
497
  }
493
498
  }, "#syncRowHeights"));
494
499
  d(this, re, /* @__PURE__ */ h(() => {
495
- !t(this, A) || !(t(this, A) instanceof HTMLElement) || (y(this, Z, new ResizeObserver((n) => {
496
- for (const e of n) {
497
- const s = e.target;
498
- if (!s.classList.contains("active")) continue;
500
+ !t(this, A) || !(t(this, A) instanceof HTMLElement) || (y(this, Z, new ResizeObserver((s) => {
501
+ for (const e of s) {
502
+ const n = e.target;
503
+ if (!n.classList.contains("active")) continue;
499
504
  const r = e.contentRect.height;
500
505
  if (r > 0) {
501
506
  let i = 0;
502
- const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
507
+ const o = n.querySelector(".ng-part-header"), a = n.querySelector(".ng-part-footer");
503
508
  o && (i += o.offsetHeight), a && (i += a.offsetHeight);
504
509
  const c = Math.max(r - i, 100);
505
510
  t(this, at) !== c && (y(this, at, c), t(this, $t).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
@@ -508,21 +513,21 @@ const ns = class ns {
508
513
  })), t(this, Z).observe(t(this, A)));
509
514
  }, "#initResizeObserver"));
510
515
  d(this, Nt, /* @__PURE__ */ h(() => {
511
- S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
512
- const e = t(this, A).querySelector(n);
513
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, se).call(this, e, n);
516
+ S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
517
+ const e = t(this, A).querySelector(s);
518
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, se).call(this, e, s);
514
519
  }), t(this, oe).call(this), t(this, ne).call(this);
515
520
  }, "#renderAllContainers"));
516
- d(this, Ue, /* @__PURE__ */ h((n) => {
521
+ d(this, Ue, /* @__PURE__ */ h((s) => {
517
522
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
518
523
  var l;
519
- const s = t(this, A).querySelector(e);
520
- if (!s) return;
521
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
524
+ const n = t(this, A).querySelector(e);
525
+ if (!n) return;
526
+ const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
522
527
  if (!r) return;
523
528
  const i = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, Y).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, U).data.get() || []).length;
524
529
  i.forEach((u, f) => {
525
- const b = n + Math.floor(f / o);
530
+ const b = s + Math.floor(f / o);
526
531
  if (b >= c) {
527
532
  u.style.visibility = "hidden";
528
533
  return;
@@ -532,17 +537,17 @@ const ns = class ns {
532
537
  });
533
538
  });
534
539
  }, "#adjustBufferRows"));
535
- d(this, mt, /* @__PURE__ */ h((n) => {
540
+ d(this, mt, /* @__PURE__ */ h((s) => {
536
541
  var f, b;
537
542
  const e = t(this, O);
538
543
  if (!e || e <= 0) return;
539
- const s = t(this, U).data.length;
540
- if (s === 0) return;
544
+ const n = t(this, U).data.length;
545
+ if (n === 0) return;
541
546
  const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, A).querySelector(".ng-container-body .ng-part-body");
542
547
  S.log("bodyContainer.clientHeight", i.clientHeight);
543
- const o = Math.max(0, s - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(n / e)));
548
+ const o = Math.max(0, n - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(s / e)));
544
549
  let c = Math.floor(a * e);
545
- S.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && S.log(`πŸ“œ [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
550
+ S.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && S.log(`πŸ“œ [Scroll Inspect] scrollTop: ${s}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
546
551
  const l = t(this, it).firstTr, u = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
547
552
  (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
548
553
  g.style.transform = `translate3d(0, ${c}px, 0)`;
@@ -551,9 +556,9 @@ const ns = class ns {
551
556
  if (!p) return;
552
557
  const x = p.querySelector(".ng-part-body tbody.bindable-tbody");
553
558
  if (!x) return;
554
- Array.from(x.querySelectorAll("tr:not(.nodata)")).forEach((m, T) => {
555
- const R = a + Math.floor(T / r);
556
- if (R >= s) {
559
+ Array.from(x.querySelectorAll("tr:not(.nodata)")).forEach((m, C) => {
560
+ const R = a + Math.floor(C / r);
561
+ if (R >= n) {
557
562
  m.style.display = "none";
558
563
  return;
559
564
  }
@@ -576,9 +581,9 @@ const ns = class ns {
576
581
  cell.dataset.row = dataIndex;
577
582
  });
578
583
  }; */
579
- d(this, _t, /* @__PURE__ */ h((n, e, s) => {
580
- n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, i) => {
581
- r.dataset.row = s;
584
+ d(this, _t, /* @__PURE__ */ h((s, e, n) => {
585
+ s.dataset.row = n, s.data = e, Array.from(s.cells).forEach((r, i) => {
586
+ r.dataset.row = n;
582
587
  const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
583
588
  o && typeof o.refresh == "function" && o.refresh();
584
589
  });
@@ -586,9 +591,9 @@ const ns = class ns {
586
591
  d(this, oe, /* @__PURE__ */ h(() => {
587
592
  var c, l, u;
588
593
  S.log("rowManager.#syncHeaderHeights");
589
- const n = t(this, A).querySelector(".ng-container-left .ng-part-header table"), e = t(this, A).querySelector(".ng-container-body .ng-part-header table"), s = t(this, A).querySelector(".ng-container-right .ng-part-header table");
594
+ const s = t(this, A).querySelector(".ng-container-left .ng-part-header table"), e = t(this, A).querySelector(".ng-container-body .ng-part-header table"), n = t(this, A).querySelector(".ng-container-right .ng-part-header table");
590
595
  if (!e) return;
591
- const r = n ? Array.from(n.querySelectorAll("tr")) : [], i = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, i.length, o.length);
596
+ const r = s ? Array.from(s.querySelectorAll("tr")) : [], i = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], a = Math.max(r.length, i.length, o.length);
592
597
  for (let f = 0; f < a; f++) {
593
598
  const b = [
594
599
  ((c = r[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
@@ -601,14 +606,14 @@ const ns = class ns {
601
606
  q(this, "destroy", /* @__PURE__ */ h(() => {
602
607
  t(this, Z) && (t(this, Z).disconnect(), y(this, Z, null));
603
608
  }, "destroy"));
604
- y(this, U, n.getRootNode().host), y(this, A, n), t(this, re).call(this);
609
+ y(this, U, s.getRootNode().host), y(this, A, s), t(this, re).call(this);
605
610
  }
606
611
  getRowHeight() {
607
612
  return t(this, O);
608
613
  }
609
- templateLength(n = ".ng-container-body") {
614
+ templateLength(s = ".ng-container-body") {
610
615
  var e;
611
- return ((e = t(this, Y).get(n)) == null ? void 0 : e.length) || 1;
616
+ return ((e = t(this, Y).get(s)) == null ? void 0 : e.length) || 1;
612
617
  }
613
618
  };
614
619
  U = new WeakMap(), A = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(ns, "RowManager");
@@ -617,14 +622,14 @@ const ie = class ie {
617
622
  /**
618
623
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
619
624
  */
620
- static compileAll(n) {
621
- return Array.isArray(n) ? n.map((e) => ie.compile(e)) : [];
625
+ static compileAll(s) {
626
+ return Array.isArray(s) ? s.map((e) => ie.compile(e)) : [];
622
627
  }
623
628
  /**
624
629
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
625
630
  */
626
- static compile(n) {
627
- if (!n) return null;
631
+ static compile(s) {
632
+ if (!s) return null;
628
633
  const e = /* @__PURE__ */ h((a) => {
629
634
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
630
635
  const u = l.getAttribute("cell-type") || "renderer";
@@ -636,7 +641,7 @@ const ie = class ie {
636
641
  }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
637
642
  l.setAttribute("tabindex", "0");
638
643
  });
639
- }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
644
+ }, "processCellTypes"), n = /* @__PURE__ */ h((a) => {
640
645
  if (!a.querySelector("colgroup")) {
641
646
  const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, u = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / l), 100);
642
647
  for (let b = 0; b < l; b++) {
@@ -667,8 +672,8 @@ const ie = class ie {
667
672
  w = M;
668
673
  break;
669
674
  }
670
- const T = m.rowSpan || 1, R = m.colSpan || 1;
671
- for (let M = 0; M < T; M++)
675
+ const C = m.rowSpan || 1, R = m.colSpan || 1;
676
+ for (let M = 0; M < C; M++)
672
677
  for (let B = 0; B < R; B++)
673
678
  x + M < f && w + B < b && (g[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
674
679
  });
@@ -682,8 +687,8 @@ const ie = class ie {
682
687
  }
683
688
  });
684
689
  });
685
- }, "resetColIndex"), i = n.cloneNode(!0);
686
- return s(i), e(i), r(i, "thead"), r(i, "tbody"), r(i, "tfoot"), Array.from(i.querySelectorAll("colgroup col")).forEach((a, c) => {
690
+ }, "resetColIndex"), i = s.cloneNode(!0);
691
+ return n(i), e(i), r(i, "thead"), r(i, "tbody"), r(i, "tfoot"), Array.from(i.querySelectorAll("colgroup col")).forEach((a, c) => {
687
692
  const l = a.getAttribute("fixed");
688
693
  l && i.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((u) => {
689
694
  u.setAttribute("fixed", l);
@@ -696,12 +701,12 @@ h(ie, "TableCompiler");
696
701
  let Ie = ie;
697
702
  var N, X, K, qt, ws;
698
703
  const rs = class rs {
699
- constructor(n) {
704
+ constructor(s) {
700
705
  d(this, K);
701
706
  d(this, N);
702
707
  d(this, X, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
703
708
  q(this, "render", /* @__PURE__ */ h(() => {
704
- const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, X);
709
+ const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, X);
705
710
  S.log("🎨 [CellSelection.render] Rendering range ->", t(this, X));
706
711
  const i = t(this, N).querySelectorAll(
707
712
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
@@ -710,7 +715,7 @@ const rs = class rs {
710
715
  a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
711
716
  c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
712
717
  });
713
- }), n < 0 || e < 0) {
718
+ }), s < 0 || e < 0) {
714
719
  S.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
715
720
  return;
716
721
  }
@@ -722,22 +727,22 @@ const rs = class rs {
722
727
  const f = parseInt(u.dataset.col, 10);
723
728
  if (isNaN(f)) return;
724
729
  const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = l + b - 1, x = f + g - 1;
725
- p >= n && l <= s && x >= e && f <= r && (o++, u.classList.add("selected"), S.log(u, n, e, s, r), l <= n && u.classList.add("selected-top"), p >= s && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
730
+ p >= s && l <= n && x >= e && f <= r && (o++, u.classList.add("selected"), S.log(u, s, e, n, r), l <= s && u.classList.add("selected-top"), p >= n && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
726
731
  });
727
732
  });
728
733
  }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
729
734
  }, "render"));
730
- y(this, N, n), V(this, K, ws).call(this), t(this, N).querySelectorAll(
735
+ y(this, N, s), V(this, K, ws).call(this), t(this, N).querySelectorAll(
731
736
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
732
- ).forEach((s) => {
733
- s.addEventListener("scroll", () => {
737
+ ).forEach((n) => {
738
+ n.addEventListener("scroll", () => {
734
739
  t(this, X).startRow >= 0 && t(this, X).startCol >= 0 && this.render();
735
740
  });
736
741
  }), S.log("🎯 [CellSelection] Initialized");
737
742
  }
738
- setRange(n, e, s, r) {
739
- S.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
740
- let i = Math.min(n, s), o = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
743
+ setRange(s, e, n, r) {
744
+ S.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
745
+ let i = Math.min(s, n), o = Math.max(s, n), a = Math.min(e, r), c = Math.max(e, r);
741
746
  const l = t(this, N).querySelectorAll(
742
747
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
743
748
  );
@@ -750,7 +755,7 @@ const rs = class rs {
750
755
  p < 0 || g.querySelectorAll("td, th").forEach((x) => {
751
756
  const w = parseInt(x.dataset.col, 10);
752
757
  if (isNaN(w)) return;
753
- const m = parseInt(x.rowSpan || 1, 10), T = parseInt(x.colSpan || 1, 10), R = p + m - 1, M = w + T - 1;
758
+ const m = parseInt(x.rowSpan || 1, 10), C = parseInt(x.colSpan || 1, 10), R = p + m - 1, M = w + C - 1;
754
759
  if (R >= i && p <= o && M >= a && w <= c) {
755
760
  const z = Math.min(i, p), Gt = Math.max(o, R), bs = Math.min(a, w), ps = Math.max(c, M);
756
761
  (z !== i || Gt !== o || bs !== a || ps !== c) && (i = z, o = Gt, a = bs, c = ps, u = !0);
@@ -761,39 +766,39 @@ const rs = class rs {
761
766
  y(this, X, { startRow: i, startCol: a, endRow: o, endCol: c }), S.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, X)), this.render();
762
767
  }
763
768
  };
764
- N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(function(n) {
765
- if (!n || n.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
766
- const e = parseInt(n.dataset.row, 10);
769
+ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(function(s) {
770
+ if (!s || s.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
771
+ const e = parseInt(s.dataset.row, 10);
767
772
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
768
- const s = n.closest("tbody"), i = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), o = i.indexOf(n), a = i.length > 0 ? i.length : 1, c = e * a + (o >= 0 ? o : n.sectionRowIndex % a);
773
+ const n = s.closest("tbody"), i = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), o = i.indexOf(s), a = i.length > 0 ? i.length : 1, c = e * a + (o >= 0 ? o : s.sectionRowIndex % a);
769
774
  return { dataRow: e, subRowIndex: o, matrixRow: c };
770
775
  }, "#getMatrixRow"), ws = /* @__PURE__ */ h(function() {
771
- const n = t(this, N).querySelector(".ng-container-top");
772
- if (!n) {
776
+ const s = t(this, N).querySelector(".ng-container-top");
777
+ if (!s) {
773
778
  S.log("❌ [CellSelection] .ng-container-top not found!");
774
779
  return;
775
780
  }
776
- n.addEventListener("mousedown", (e) => {
781
+ s.addEventListener("mousedown", (e) => {
777
782
  if (e.button !== 0) return;
778
- const s = e.target.closest("td, th");
779
- if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
783
+ const n = e.target.closest("td, th");
784
+ if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
780
785
  t(this, N).style.userSelect = "none", t(this, N).style.webkitUserSelect = "none";
781
- const r = s.closest("tr"), { matrixRow: i } = V(this, K, qt).call(this, r), o = parseInt(s.dataset.col, 10);
786
+ const r = n.closest("tr"), { matrixRow: i } = V(this, K, qt).call(this, r), o = parseInt(n.dataset.col, 10);
782
787
  if (i < 0) {
783
788
  t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "";
784
789
  return;
785
790
  }
786
- S.log(`πŸ–±οΈ [MouseDown Success] startRow: ${i}, startCol: ${o}`), t(this, N).navigation.currentCell = s;
791
+ S.log(`πŸ–±οΈ [MouseDown Success] startRow: ${i}, startCol: ${o}`), t(this, N).navigation.currentCell = n;
787
792
  let a = i, c = o;
788
793
  const l = /* @__PURE__ */ h((f) => {
789
794
  const b = document.elementFromPoint(f.clientX, f.clientY);
790
795
  let g = b == null ? void 0 : b.closest("td, th");
791
796
  if (!g || !t(this, N).contains(g)) {
792
797
  const m = t(this, N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
793
- for (const T of m) {
794
- const R = T.getBoundingClientRect();
798
+ for (const C of m) {
799
+ const R = C.getBoundingClientRect();
795
800
  if (f.clientX >= R.left && f.clientX <= R.right && f.clientY >= R.top && f.clientY <= R.bottom) {
796
- g = T;
801
+ g = C;
797
802
  break;
798
803
  }
799
804
  }
@@ -810,22 +815,22 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(
810
815
  let Le = rs;
811
816
  var F, lt, ae, le, pt, He, Ot, Dt, Bt, ct, Wt, vs;
812
817
  const os = class os {
813
- constructor(n) {
818
+ constructor(s) {
814
819
  d(this, pt);
815
820
  d(this, F);
816
821
  d(this, lt, null);
817
822
  d(this, ae, -1);
818
823
  d(this, le, -1);
819
- d(this, Ot, /* @__PURE__ */ h((n) => {
824
+ d(this, Ot, /* @__PURE__ */ h((s) => {
820
825
  const e = [];
821
- return n.forEach((s) => e.push(...Array.from(s.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((s, r) => parseInt(s.dataset.col, 10) - parseInt(r.dataset.col, 10)), e[e.length - 1]);
826
+ return s.forEach((n) => e.push(...Array.from(n.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((n, r) => parseInt(n.dataset.col, 10) - parseInt(r.dataset.col, 10)), e[e.length - 1]);
822
827
  }, "#getMaxColCell"));
823
- d(this, Dt, /* @__PURE__ */ h((n, e) => {
824
- const s = t(this, ct).call(this, n);
825
- if (s.length === 0) return e + 1;
828
+ d(this, Dt, /* @__PURE__ */ h((s, e) => {
829
+ const n = t(this, ct).call(this, s);
830
+ if (n.length === 0) return e + 1;
826
831
  let r = e + 1;
827
832
  const i = [];
828
- s.forEach((o) => i.push(...Array.from(o.querySelectorAll("td")))), i.sort((o, a) => parseInt(o.dataset.col, 10) - parseInt(a.dataset.col, 10));
833
+ n.forEach((o) => i.push(...Array.from(o.querySelectorAll("td")))), i.sort((o, a) => parseInt(o.dataset.col, 10) - parseInt(a.dataset.col, 10));
829
834
  for (const o of i) {
830
835
  const a = parseInt(o.dataset.col, 10), c = parseInt(o.colSpan || 1, 10);
831
836
  if (e >= a && e < a + c) {
@@ -835,12 +840,12 @@ const os = class os {
835
840
  }
836
841
  return r;
837
842
  }, "#getNextCol"));
838
- d(this, Bt, /* @__PURE__ */ h((n, e) => {
839
- const s = t(this, ct).call(this, n);
840
- if (s.length === 0) return Math.max(0, e - 1);
843
+ d(this, Bt, /* @__PURE__ */ h((s, e) => {
844
+ const n = t(this, ct).call(this, s);
845
+ if (n.length === 0) return Math.max(0, e - 1);
841
846
  let r = -1;
842
847
  const i = [];
843
- s.forEach((o) => i.push(...Array.from(o.querySelectorAll("td")))), i.sort((o, a) => parseInt(o.dataset.col, 10) - parseInt(a.dataset.col, 10));
848
+ n.forEach((o) => i.push(...Array.from(o.querySelectorAll("td")))), i.sort((o, a) => parseInt(o.dataset.col, 10) - parseInt(a.dataset.col, 10));
844
849
  for (const o of i) {
845
850
  const a = parseInt(o.dataset.col, 10);
846
851
  if (a < e)
@@ -851,77 +856,77 @@ const os = class os {
851
856
  return r;
852
857
  }, "#getPreviousCol"));
853
858
  // 🎯 λ ˆκ±°μ‹œμ˜ 병합 μ…€(rowSpan) 블둝 포용 탐색 둜직 이식
854
- d(this, ct, /* @__PURE__ */ h((n) => {
859
+ d(this, ct, /* @__PURE__ */ h((s) => {
855
860
  const e = t(this, F).querySelectorAll(
856
861
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
857
- ), s = [];
862
+ ), n = [];
858
863
  return e.forEach((r) => {
859
864
  const i = Array.from(r.querySelectorAll("tbody tr:not(.nodata)"));
860
865
  for (const o of i) {
861
866
  const a = parseInt(o.dataset.row, 10), c = i.filter((p) => parseInt(p.dataset.row, 10) === a), l = c.length > 0 ? c.length : 1, u = c.indexOf(o), f = a * l + (u >= 0 ? u : 0);
862
- if (f === n) {
863
- s.push(o);
867
+ if (f === s) {
868
+ n.push(o);
864
869
  break;
865
870
  }
866
871
  const b = Array.from(o.querySelectorAll("td"));
867
872
  let g = !1;
868
873
  for (const p of b) {
869
874
  const x = parseInt(p.rowSpan || 1, 10);
870
- if (x > 1 && n >= f && n < f + x) {
871
- s.push(o), g = !0;
875
+ if (x > 1 && s >= f && s < f + x) {
876
+ n.push(o), g = !0;
872
877
  break;
873
878
  }
874
879
  }
875
880
  if (g) break;
876
881
  }
877
- }), s;
882
+ }), n;
878
883
  }, "#findTargetTrsByMatrix"));
879
884
  // 🎯 rowSpan 및 colSpan 경계λ₯Ό λͺ¨λ‘ μΆ©μ‘±ν•˜λŠ” 셀을 3λΆ„ν•  전체 μ˜μ—­μ—μ„œ 탐색
880
- d(this, Wt, /* @__PURE__ */ h((n, e, s, r) => {
885
+ d(this, Wt, /* @__PURE__ */ h((s, e, n, r) => {
881
886
  const i = t(this, F).querySelectorAll(
882
887
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
883
- ), o = r !== void 0 ? r : n * 1 + e;
888
+ ), o = r !== void 0 ? r : s * 1 + e;
884
889
  for (const a of i) {
885
890
  const c = Array.from(a.querySelectorAll("tbody tr:not(.nodata)"));
886
891
  for (const l of c) {
887
892
  const u = parseInt(l.dataset.row, 10), f = c.filter((w) => parseInt(w.dataset.row, 10) === u), b = f.length > 0 ? f.length : 1, g = f.indexOf(l), p = u * b + (g >= 0 ? g : 0), x = Array.from(l.querySelectorAll("td"));
888
893
  for (const w of x) {
889
- const m = parseInt(w.dataset.col, 10), T = parseInt(w.colSpan || 1, 10), R = parseInt(w.rowSpan || 1, 10);
890
- if (!isNaN(m) && s >= m && s < m + T && o >= p && o < p + R && window.getComputedStyle(w).display !== "none")
894
+ const m = parseInt(w.dataset.col, 10), C = parseInt(w.colSpan || 1, 10), R = parseInt(w.rowSpan || 1, 10);
895
+ if (!isNaN(m) && n >= m && n < m + C && o >= p && o < p + R && window.getComputedStyle(w).display !== "none")
891
896
  return w;
892
897
  }
893
898
  }
894
899
  }
895
900
  return null;
896
901
  }, "#getNearElement"));
897
- y(this, F, n), V(this, pt, vs).call(this), S.log("🎯 [CellNavigation] Initialized");
902
+ y(this, F, s), V(this, pt, vs).call(this), S.log("🎯 [CellNavigation] Initialized");
898
903
  }
899
904
  get currentCell() {
900
905
  return t(this, lt);
901
906
  }
902
- set currentCell(n) {
903
- if (!n) return;
904
- y(this, lt, n), n.focus({ preventScroll: !0 });
905
- const e = parseInt(n.dataset.row, 10), s = parseInt(n.dataset.col, 10);
906
- if (!isNaN(e) && !isNaN(s)) {
907
- y(this, ae, e), y(this, le, s);
908
- const r = n.closest("tr"), i = r == null ? void 0 : r.closest("tbody");
907
+ set currentCell(s) {
908
+ if (!s) return;
909
+ y(this, lt, s), s.focus({ preventScroll: !0 });
910
+ const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
911
+ if (!isNaN(e) && !isNaN(n)) {
912
+ y(this, ae, e), y(this, le, n);
913
+ const r = s.closest("tr"), i = r == null ? void 0 : r.closest("tbody");
909
914
  if (i) {
910
915
  const a = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), u = e * c + (l >= 0 ? l : 0);
911
- t(this, F).selection.setRange(u, s, u, s);
916
+ t(this, F).selection.setRange(u, n, u, n);
912
917
  }
913
918
  }
914
919
  }
915
- moveCell(n) {
916
- var m, T, R, M;
920
+ moveCell(s) {
921
+ var m, C, R, M;
917
922
  if (!t(this, lt)) return;
918
- const e = t(this, lt), s = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = s == null ? void 0 : s.closest("tbody");
923
+ const e = t(this, lt), n = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = n == null ? void 0 : n.closest("tbody");
919
924
  if (!o) return;
920
- const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, u = c.indexOf(s), f = r * l + (u >= 0 ? u : 0);
925
+ const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, u = c.indexOf(n), f = r * l + (u >= 0 ? u : 0);
921
926
  let b = f, g = i;
922
- switch (n.code) {
927
+ switch (s.code) {
923
928
  case "Tab":
924
- if (n.preventDefault(), n.shiftKey) {
929
+ if (s.preventDefault(), s.shiftKey) {
925
930
  if (g = t(this, Bt).call(this, f, i), g < 0 && f > 0) {
926
931
  b = f - 1;
927
932
  const B = t(this, ct).call(this, b), z = t(this, Ot).call(this, B);
@@ -940,10 +945,10 @@ const os = class os {
940
945
  g = t(this, Bt).call(this, f, i);
941
946
  break;
942
947
  case "ArrowDown":
943
- n.preventDefault(), b = f + (e.rowSpan || 1);
948
+ s.preventDefault(), b = f + (e.rowSpan || 1);
944
949
  break;
945
950
  case "ArrowUp":
946
- n.preventDefault(), b = Math.max(0, f - (e.rowSpan || 1));
951
+ s.preventDefault(), b = Math.max(0, f - (e.rowSpan || 1));
947
952
  break;
948
953
  }
949
954
  const p = Math.floor(b / l), x = b % l;
@@ -951,7 +956,7 @@ const os = class os {
951
956
  if (w)
952
957
  this.currentCell = w, V(this, pt, He).call(this, w);
953
958
  else if (p !== r && p >= 0) {
954
- const B = ((T = (m = t(this, F)).getRowHeight) == null ? void 0 : T.call(m)) || 40;
959
+ const B = ((C = (m = t(this, F)).getRowHeight) == null ? void 0 : C.call(m)) || 40;
955
960
  (M = (R = t(this, F)).scrollToY) == null || M.call(R, p * B), setTimeout(() => {
956
961
  const z = t(this, Wt).call(this, p, x, g, b);
957
962
  z && (this.currentCell = z, V(this, pt, He).call(this, z));
@@ -960,19 +965,19 @@ const os = class os {
960
965
  }
961
966
  };
962
967
  F = new WeakMap(), lt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), pt = new WeakSet(), // 🎯 셀이 보이지 μ•ŠλŠ” μ˜μ—­μ— μžˆμ„ λ•Œ μ»¨ν…Œμ΄λ„ˆ μŠ€ν¬λ‘€μ„ λ™κΈ°ν™”ν•˜λŠ” ν•¨μˆ˜
963
- He = /* @__PURE__ */ h(function(n) {
968
+ He = /* @__PURE__ */ h(function(s) {
964
969
  const e = t(this, F).querySelector(".ng-container-body .ng-part-body");
965
970
  if (!e) return;
966
- const s = n.getBoundingClientRect(), r = e.getBoundingClientRect();
967
- s.top < r.top ? e.scrollTop -= r.top - s.top : s.bottom > r.bottom && (e.scrollTop += s.bottom - r.bottom), s.left < r.left ? e.scrollLeft -= r.left - s.left : s.right > r.right && (e.scrollLeft += s.right - r.right);
971
+ const n = s.getBoundingClientRect(), r = e.getBoundingClientRect();
972
+ n.top < r.top ? e.scrollTop -= r.top - n.top : n.bottom > r.bottom && (e.scrollTop += n.bottom - r.bottom), n.left < r.left ? e.scrollLeft -= r.left - n.left : n.right > r.right && (e.scrollLeft += n.right - r.right);
968
973
  }, "#ensureCellVisible"), Ot = new WeakMap(), Dt = new WeakMap(), Bt = new WeakMap(), ct = new WeakMap(), Wt = new WeakMap(), vs = /* @__PURE__ */ h(function() {
969
- t(this, F).addEventListener("keydown", (n) => {
970
- ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(n.code) && this.moveCell(n);
974
+ t(this, F).addEventListener("keydown", (s) => {
975
+ ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
971
976
  });
972
977
  }, "#initEvents"), h(os, "CellNavigation");
973
978
  let Me = os;
974
- var ce, ht, dt, zt, Pt, he, de, xt, fe, ge;
975
- const Ct = class Ct extends HTMLElement {
979
+ var ce, ht, dt, zt, Pt, he, de, xt, fe, ue;
980
+ const Tt = class Tt extends HTMLElement {
976
981
  constructor() {
977
982
  super();
978
983
  d(this, ce);
@@ -986,8 +991,8 @@ const Ct = class Ct extends HTMLElement {
986
991
  q(this, "generate", /* @__PURE__ */ h((e) => {
987
992
  if (S.log("sheet.generate()"), !e) return;
988
993
  y(this, ht, Ie.compile(e)), t(this, he).call(this), t(this, de).call(this);
989
- const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), i = this.querySelector(".ng-nodata-overlay");
990
- s && i && (i.style.top = `${s.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
994
+ const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), i = this.querySelector(".ng-nodata-overlay");
995
+ n && i && (i.style.top = `${n.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
991
996
  var o;
992
997
  (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
993
998
  }, 0);
@@ -997,27 +1002,27 @@ const Ct = class Ct extends HTMLElement {
997
1002
  { selector: ".ng-container-body", type: null },
998
1003
  { selector: ".ng-container-left", type: "left" },
999
1004
  { selector: ".ng-container-right", type: "right" }
1000
- ].forEach(({ selector: s, type: r }) => {
1005
+ ].forEach(({ selector: n, type: r }) => {
1001
1006
  var i, o, a;
1002
- (i = this.querySelector(`${s} .ng-part-header`)) == null || i.appendChild(t(this, xt).call(this, t(this, ht), r, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, xt).call(this, t(this, ht), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, xt).call(this, t(this, ht), r, "footer"));
1007
+ (i = this.querySelector(`${n} .ng-part-header`)) == null || i.appendChild(t(this, xt).call(this, t(this, ht), r, "header")), (o = this.querySelector(`${n} .ng-virtual-spacer`)) == null || o.before(t(this, xt).call(this, t(this, ht), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, xt).call(this, t(this, ht), r, "footer"));
1003
1008
  });
1004
1009
  }, "#renderSplitContainers"));
1005
1010
  d(this, de, /* @__PURE__ */ h(() => {
1006
1011
  ["left", "right", "body"].forEach((e) => {
1007
- const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
1008
- if (!s || !r || r.length === 0) return;
1012
+ const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
1013
+ if (!n || !r || r.length === 0) return;
1009
1014
  let i = 0;
1010
1015
  r[0].querySelectorAll("col").forEach((o) => {
1011
1016
  const a = parseInt(o.getAttribute("width"), 10);
1012
1017
  isNaN(a) || (i += a);
1013
- }), e === "body" ? (s.style.flex = "1", r.forEach((o) => {
1018
+ }), e === "body" ? (n.style.flex = "1", r.forEach((o) => {
1014
1019
  o.style.width = `${i}px`, o.style.minWidth = `${i}px`;
1015
- })) : (s.style.flex = `0 0 ${i}px`, s.style.width = `${i}px`, r.forEach((o) => {
1020
+ })) : (n.style.flex = `0 0 ${i}px`, n.style.width = `${i}px`, r.forEach((o) => {
1016
1021
  o.style.width = `${i}px`, o.style.minWidth = `${i}px`;
1017
1022
  }));
1018
1023
  });
1019
1024
  }, "#updateContainerWidths"));
1020
- d(this, xt, /* @__PURE__ */ h((e, s, r) => {
1025
+ d(this, xt, /* @__PURE__ */ h((e, n, r) => {
1021
1026
  const i = e.cloneNode(!0), o = i.querySelector("thead"), a = i.querySelector("tbody"), c = i.querySelector("tfoot");
1022
1027
  if (r === "header") {
1023
1028
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
@@ -1025,9 +1030,9 @@ const Ct = class Ct extends HTMLElement {
1025
1030
  u.className = "fixed-tbody", i.appendChild(u);
1026
1031
  }
1027
1032
  } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
1028
- return s === "left" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1033
+ return n === "left" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1029
1034
  l.getAttribute("fixed") !== "left" && l.remove();
1030
- }) : s === "right" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1035
+ }) : n === "right" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1031
1036
  l.getAttribute("fixed") !== "right" && l.remove();
1032
1037
  }) : i.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
1033
1038
  l.remove();
@@ -1035,18 +1040,18 @@ const Ct = class Ct extends HTMLElement {
1035
1040
  }, "#createSplitTable"));
1036
1041
  q(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, dt).getRowHeight(), "getRowHeight"));
1037
1042
  q(this, "scrollToX", /* @__PURE__ */ h((e) => {
1038
- const s = this.querySelector(".ng-container-body .ng-part-body");
1039
- s && (s.scrollLeft = e);
1043
+ const n = this.querySelector(".ng-container-body .ng-part-body");
1044
+ n && (n.scrollLeft = e);
1040
1045
  }, "scrollToX"));
1041
1046
  q(this, "scrollToY", /* @__PURE__ */ h((e) => {
1042
- const s = this.querySelector(".ng-container-body .ng-part-body");
1043
- s && (s.scrollTop = e);
1047
+ const n = this.querySelector(".ng-container-body .ng-part-body");
1048
+ n && (n.scrollTop = e);
1044
1049
  }, "scrollToY"));
1045
1050
  d(this, fe, /* @__PURE__ */ h(() => {
1046
- t(this, ge).call(this), y(this, zt, new Le(this)), y(this, Pt, new Me(this));
1051
+ t(this, ue).call(this), y(this, zt, new Le(this)), y(this, Pt, new Me(this));
1047
1052
  }, "#init"));
1048
- d(this, ge, /* @__PURE__ */ h(() => {
1049
- const e = Ct.SCROLLBAR_SIZE;
1053
+ d(this, ue, /* @__PURE__ */ h(() => {
1054
+ const e = Tt.SCROLLBAR_SIZE;
1050
1055
  this.innerHTML = `
1051
1056
  <style>
1052
1057
  nine-table-sheet {
@@ -1262,22 +1267,22 @@ const Ct = class Ct extends HTMLElement {
1262
1267
  this.innerHTML = "", S.log("NineTableSheet destroyed.");
1263
1268
  }
1264
1269
  };
1265
- ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ge = new WeakMap(), h(Ct, "NineTableSheet"), q(Ct, "SCROLLBAR_SIZE", 16);
1266
- let Zt = Ct;
1270
+ ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), h(Tt, "NineTableSheet"), q(Tt, "SCROLLBAR_SIZE", 16);
1271
+ let Zt = Tt;
1267
1272
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Zt);
1268
- var ue, Ft;
1273
+ var ge, Ft;
1269
1274
  const is = class is extends HTMLElement {
1270
1275
  constructor() {
1271
1276
  super();
1272
- d(this, ue, /* @__PURE__ */ h(() => {
1277
+ d(this, ge, /* @__PURE__ */ h(() => {
1273
1278
  var e;
1274
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1279
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1275
1280
  var o;
1276
- const r = s.ctrlKey || s.metaKey || s.shiftKey, i = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
1281
+ const r = n.ctrlKey || n.metaKey || n.shiftKey, i = parseInt((o = n.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
1277
1282
  t(this, Ft).call(this, i, r);
1278
1283
  }), t(this, Ft).call(this, 0, !1);
1279
1284
  }, "#init"));
1280
- d(this, Ft, /* @__PURE__ */ h((e, s = !1) => {
1285
+ d(this, Ft, /* @__PURE__ */ h((e, n = !1) => {
1281
1286
  const r = /* @__PURE__ */ h(() => {
1282
1287
  const u = Array.from(this.querySelectorAll("nine-table-sheet"));
1283
1288
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
@@ -1288,7 +1293,7 @@ const is = class is extends HTMLElement {
1288
1293
  });
1289
1294
  }, "updateSplitters"), i = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = i.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
1290
1295
  if (!a[e]) return;
1291
- if (!s)
1296
+ if (!n)
1292
1297
  a.forEach((u, f) => {
1293
1298
  u.classList.toggle("active", f === e);
1294
1299
  }), c.forEach((u, f) => {
@@ -1310,31 +1315,31 @@ const is = class is extends HTMLElement {
1310
1315
  }, "#switchSheet"));
1311
1316
  }
1312
1317
  connectedCallback() {
1313
- t(this, ue).call(this);
1318
+ t(this, ge).call(this);
1314
1319
  }
1315
1320
  };
1316
- ue = new WeakMap(), Ft = new WeakMap(), h(is, "NineTableSheets");
1321
+ ge = new WeakMap(), Ft = new WeakMap(), h(is, "NineTableSheets");
1317
1322
  let $e = is;
1318
1323
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", $e);
1319
1324
  var _, be, jt, pe;
1320
1325
  const as = class as {
1321
- constructor(n) {
1326
+ constructor(s) {
1322
1327
  d(this, _);
1323
1328
  d(this, be, /* @__PURE__ */ h(() => {
1324
- t(this, pe).call(this), new ResizeObserver((n) => {
1325
- for (let e of n)
1329
+ t(this, pe).call(this), new ResizeObserver((s) => {
1330
+ for (let e of s)
1326
1331
  t(this, _).getAttribute("auto-height") === "true" && t(this, jt).call(this);
1327
1332
  }).observe(t(this, _));
1328
1333
  }, "#init"));
1329
1334
  d(this, jt, /* @__PURE__ */ h(() => {
1330
1335
  var c, l;
1331
- const n = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1332
- if (n.length === 0) return;
1333
- const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((u) => u.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, a = e * s + r + i + o;
1336
+ const s = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1337
+ if (s.length === 0) return;
1338
+ const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((u) => u.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, a = e * n + r + i + o;
1334
1339
  t(this, _).style.height = `${a}px`;
1335
1340
  }, "#applyAutoHeight"));
1336
1341
  d(this, pe, /* @__PURE__ */ h(() => {
1337
- const e = Array.from(t(this, _).children).filter((c) => c.tagName === "TABLE"), s = t(this, _).getAttribute("auto-height") === "true", r = e.length, i = e.map((c, l) => {
1342
+ const e = Array.from(t(this, _).children).filter((c) => c.tagName === "TABLE"), n = t(this, _).getAttribute("auto-height") === "true", r = e.length, i = e.map((c, l) => {
1338
1343
  const f = `<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>` : "";
1339
1344
  return f + b;
1340
1345
  }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
@@ -1345,7 +1350,7 @@ const as = class as {
1345
1350
  flex-direction: column;
1346
1351
  position: relative;
1347
1352
  overflow: hidden;
1348
- height: ${s ? "auto" : "100%"};
1353
+ height: ${n ? "auto" : "100%"};
1349
1354
  background: #fff;
1350
1355
  }
1351
1356
 
@@ -1462,28 +1467,28 @@ const as = class as {
1462
1467
  const a = t(this, _).shadowRoot.querySelectorAll("nine-table-sheet");
1463
1468
  a == null || a.forEach((c, l) => {
1464
1469
  e[l] && setTimeout(() => {
1465
- c.generate(e[l]), s && t(this, jt).call(this);
1470
+ c.generate(e[l]), n && t(this, jt).call(this);
1466
1471
  });
1467
1472
  });
1468
1473
  }, "#render"));
1469
- y(this, _, n), t(this, be).call(this);
1474
+ y(this, _, s), t(this, be).call(this);
1470
1475
  }
1471
1476
  };
1472
1477
  _ = new WeakMap(), be = new WeakMap(), jt = new WeakMap(), pe = new WeakMap(), h(as, "LayoutManager");
1473
1478
  let Ne = as;
1474
1479
  var Yt, wt;
1475
1480
  const ls = class ls {
1476
- constructor(n) {
1481
+ constructor(s) {
1477
1482
  d(this, Yt);
1478
1483
  d(this, wt, -1);
1479
1484
  q(this, "count", /* @__PURE__ */ h(() => t(this, Yt).rawRecords.length, "count"));
1480
- y(this, Yt, n);
1485
+ y(this, Yt, s);
1481
1486
  }
1482
1487
  get at() {
1483
1488
  return t(this, wt);
1484
1489
  }
1485
- set at(n) {
1486
- y(this, wt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, wt)}"]`) && setTimeout(() => {
1490
+ set at(s) {
1491
+ y(this, wt, parseInt(s, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, wt)}"]`) && setTimeout(() => {
1487
1492
  });
1488
1493
  }
1489
1494
  };
@@ -1491,7 +1496,7 @@ Yt = new WeakMap(), wt = new WeakMap(), h(ls, "ngRow");
1491
1496
  let _e = ls;
1492
1497
  var D, I, W, vt, ye, J, me, ft, Vt, xe, we, St;
1493
1498
  const P = class P {
1494
- constructor(n, e) {
1499
+ constructor(s, e) {
1495
1500
  d(this, D);
1496
1501
  d(this, I);
1497
1502
  d(this, W, []);
@@ -1500,35 +1505,35 @@ const P = class P {
1500
1505
  d(this, J, []);
1501
1506
  d(this, me, /* @__PURE__ */ h(() => {
1502
1507
  y(this, J, []);
1503
- const n = t(this, D).template || [];
1504
- Array.from(n).forEach((e) => {
1505
- var s;
1506
- t(this, J).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1508
+ const s = t(this, D).template || [];
1509
+ Array.from(s).forEach((e) => {
1510
+ var n;
1511
+ t(this, J).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1507
1512
  }), (t(this, I).rawRecords || []).forEach((e) => {
1508
1513
  e.__ng || (e.__ng = t(this, Vt).call(this)), e.__ng.height = t(this, J).slice();
1509
1514
  });
1510
1515
  }, "#initialize"));
1511
1516
  d(this, ft, /* @__PURE__ */ h(() => {
1512
- const n = t(this, D).shadowRoot.querySelector("nine-table-sheets");
1513
- n == null || n.classList.toggle("nodata", this.length === 0), t(this, D).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1517
+ const s = t(this, D).shadowRoot.querySelector("nine-table-sheets");
1518
+ s == null || s.classList.toggle("nodata", this.length === 0), t(this, D).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1514
1519
  e.invalidate();
1515
1520
  });
1516
1521
  }, "#invalidate"));
1517
- q(this, "get", /* @__PURE__ */ h((n, e) => {
1522
+ q(this, "get", /* @__PURE__ */ h((s, e) => {
1518
1523
  var i;
1519
- const s = this.getValidData();
1520
- if (!s || s.length <= 0) return;
1521
- if (n == null) return t(this, St).call(this, s);
1522
- if (n < 0 || n >= s.length) return null;
1524
+ const n = this.getValidData();
1525
+ if (!n || n.length <= 0) return;
1526
+ if (s == null) return t(this, St).call(this, n);
1527
+ if (s < 0 || s >= n.length) return null;
1523
1528
  const r = typeof ((i = t(this, D).fields) == null ? void 0 : i.get) == "function" ? t(this, D).fields.get() : [];
1524
1529
  if (e != null) {
1525
1530
  const o = r.indexOf(e);
1526
- return o >= 0 ? s[n].v[o] : null;
1531
+ return o >= 0 ? n[s].v[o] : null;
1527
1532
  }
1528
- return t(this, St).call(this, s[n]);
1533
+ return t(this, St).call(this, n[s]);
1529
1534
  }, "get"));
1530
- q(this, "set", /* @__PURE__ */ h((n) => {
1531
- this.clear(), this.add(n, !1), t(this, ft).call(this);
1535
+ q(this, "set", /* @__PURE__ */ h((s) => {
1536
+ this.clear(), this.add(s, !1), t(this, ft).call(this);
1532
1537
  }, "set"));
1533
1538
  d(this, Vt, /* @__PURE__ */ h(() => ({
1534
1539
  rowState: P.ROW_STATE.EMPTY,
@@ -1543,66 +1548,66 @@ const P = class P {
1543
1548
  y(this, W, []), y(this, vt, []), t(this, ft).call(this);
1544
1549
  }, "reset"));
1545
1550
  q(this, "clear", /* @__PURE__ */ h(() => {
1546
- var n;
1547
- t(this, I).rawRecords = [], y(this, W, []), y(this, vt, []), (n = t(this, I).viewRecords) != null && n.reset && t(this, I).viewRecords.reset();
1551
+ var s;
1552
+ t(this, I).rawRecords = [], y(this, W, []), y(this, vt, []), (s = t(this, I).viewRecords) != null && s.reset && t(this, I).viewRecords.reset();
1548
1553
  }, "clear"));
1549
- d(this, xe, /* @__PURE__ */ h((n) => {
1554
+ d(this, xe, /* @__PURE__ */ h((s) => {
1550
1555
  var r;
1551
- Array.isArray(n) || (n = [n]);
1552
- const e = typeof ((r = t(this, D).fields) == null ? void 0 : r.get) == "function" ? t(this, D).fields.get() : Object.keys(n[0] || {}), s = [];
1553
- return n.forEach((i) => {
1556
+ Array.isArray(s) || (s = [s]);
1557
+ const e = typeof ((r = t(this, D).fields) == null ? void 0 : r.get) == "function" ? t(this, D).fields.get() : Object.keys(s[0] || {}), n = [];
1558
+ return s.forEach((i) => {
1554
1559
  const o = { v: [] };
1555
1560
  e.forEach((a) => {
1556
1561
  o.v.push(i[a] !== void 0 && i[a] !== null ? i[a] : "");
1557
- }), s.push(o);
1558
- }), s;
1562
+ }), n.push(o);
1563
+ }), n;
1559
1564
  }, "#json2Array"));
1560
- d(this, we, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1565
+ d(this, we, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1561
1566
  e.__ng = t(this, Vt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = P.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1562
- }), n), "#defaultInsert"));
1563
- q(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1564
- n === void 0 && (n = {});
1565
- const s = t(this, xe).call(this, n);
1566
- t(this, I).rawRecords = t(this, I).rawRecords.concat(t(this, we).call(this, s)), this.resetRecords();
1567
+ }), s), "#defaultInsert"));
1568
+ q(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1569
+ s === void 0 && (s = {});
1570
+ const n = t(this, xe).call(this, s);
1571
+ t(this, I).rawRecords = t(this, I).rawRecords.concat(t(this, we).call(this, n)), this.resetRecords();
1567
1572
  const r = this.count() - 1;
1568
- return e || s.forEach((i, o) => {
1573
+ return e || n.forEach((i, o) => {
1569
1574
  const a = t(this, I).rawRecords[r - o];
1570
1575
  a && (a.__ng.rowState = P.ROW_STATE.EMPTY);
1571
1576
  }), t(this, ft).call(this), r;
1572
1577
  }, "add"));
1573
- q(this, "delete", /* @__PURE__ */ h((n) => {
1578
+ q(this, "delete", /* @__PURE__ */ h((s) => {
1574
1579
  let e = [];
1575
- Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, I).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1576
- if (t(this, W)[s]) {
1577
- const r = t(this, W)[s].__ng.rowid;
1578
- t(this, W)[s].__ng.rowState === P.ROW_STATE.INSERT ? t(this, I).rawRecords = t(this, I).rawRecords.filter((i) => i.__ng.rowid !== r) : t(this, I).rawRecords.forEach((i) => {
1580
+ Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, I).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1581
+ if (t(this, W)[n]) {
1582
+ const r = t(this, W)[n].__ng.rowid;
1583
+ t(this, W)[n].__ng.rowState === P.ROW_STATE.INSERT ? t(this, I).rawRecords = t(this, I).rawRecords.filter((i) => i.__ng.rowid !== r) : t(this, I).rawRecords.forEach((i) => {
1579
1584
  i.__ng.rowid === r && (i.__ng.deleted = !0, i.__ng.rowState = P.ROW_STATE.DELETE);
1580
1585
  });
1581
1586
  }
1582
1587
  }), this.resetRecords(), t(this, ft).call(this);
1583
1588
  }, "delete"));
1584
- q(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1589
+ q(this, "setValue", /* @__PURE__ */ h((s, e, n) => {
1585
1590
  var c;
1586
- n = parseInt(n, 10);
1591
+ s = parseInt(s, 10);
1587
1592
  const i = (typeof ((c = t(this, D).fields) == null ? void 0 : c.get) == "function" ? t(this, D).fields.get() : []).indexOf(e);
1588
1593
  if (i < 0) return;
1589
- const o = this.getValidData()[n];
1594
+ const o = this.getValidData()[s];
1590
1595
  if (!o) return;
1591
1596
  const a = o.v[i];
1592
- a !== s && o.__ng.rowState !== P.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = P.ROW_STATE.UPDATE), o.v[i] = s;
1597
+ a !== n && o.__ng.rowState !== P.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = P.ROW_STATE.UPDATE), o.v[i] = n;
1593
1598
  }, "setValue"));
1594
1599
  q(this, "resetRecords", /* @__PURE__ */ h(() => {
1595
- y(this, vt, t(this, I).rawRecords.filter((n) => !n.__ng.deleted)), y(this, W, t(this, I).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, I).rawRecords.forEach((n, e) => {
1596
- n.__ng.rowidx = e;
1597
- }), t(this, W).forEach((n, e) => {
1598
- n.__ng.i = e;
1600
+ y(this, vt, t(this, I).rawRecords.filter((s) => !s.__ng.deleted)), y(this, W, t(this, I).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, I).rawRecords.forEach((s, e) => {
1601
+ s.__ng.rowidx = e;
1602
+ }), t(this, W).forEach((s, e) => {
1603
+ s.__ng.i = e;
1599
1604
  });
1600
1605
  }, "resetRecords"));
1601
1606
  q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, I).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1602
- d(this, St, /* @__PURE__ */ h((n) => {
1607
+ d(this, St, /* @__PURE__ */ h((s) => {
1603
1608
  var o;
1604
- if (!n) return n;
1605
- const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : [], i = s.filter((a) => !a.__ng.deleted).map((a) => {
1609
+ if (!s) return s;
1610
+ const e = !Array.isArray(s), n = e ? [s] : s, r = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : [], i = n.filter((a) => !a.__ng.deleted).map((a) => {
1606
1611
  const c = {};
1607
1612
  return r.forEach((l, u) => {
1608
1613
  c[l] = a.v ? a.v[u] : a[l];
@@ -1611,13 +1616,13 @@ const P = class P {
1611
1616
  return e ? i[0] : i;
1612
1617
  }, "#conv"));
1613
1618
  q(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1614
- y(this, D, n), y(this, I, e), t(this, me).call(this);
1619
+ y(this, D, s), y(this, I, e), t(this, me).call(this);
1615
1620
  }
1616
1621
  get source() {
1617
1622
  return t(this, St).call(this, t(this, I).rawRecords);
1618
1623
  }
1619
- set source(n) {
1620
- this.clear(), this.add(n, !1);
1624
+ set source(s) {
1625
+ this.clear(), this.add(s, !1);
1621
1626
  }
1622
1627
  get nextId() {
1623
1628
  return ++xs(this, ye)._;
@@ -1641,57 +1646,57 @@ q(P, "ROW_STATE", {
1641
1646
  DELETE: "DELETE"
1642
1647
  });
1643
1648
  let Oe = P;
1644
- var gt;
1649
+ var ut;
1645
1650
  const cs = class cs {
1646
- constructor(n) {
1647
- d(this, gt);
1648
- y(this, gt, n), this.row = new _e(this), this.data = new Oe(t(this, gt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1651
+ constructor(s) {
1652
+ d(this, ut);
1653
+ y(this, ut, s), this.row = new _e(this), this.data = new Oe(t(this, ut), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1649
1654
  var e;
1650
- (e = t(this, gt).view) != null && e.redraw && t(this, gt).view.redraw();
1655
+ (e = t(this, ut).view) != null && e.redraw && t(this, ut).view.redraw();
1651
1656
  }, this.setDataSource = (e) => {
1652
1657
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1653
1658
  }, this.getRowState = (e) => {
1654
1659
  var r, i;
1655
- const s = parseInt(e, 10);
1656
- if (!(s >= this.data.count()))
1657
- return (i = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : i.rowState;
1660
+ const n = parseInt(e, 10);
1661
+ if (!(n >= this.data.count()))
1662
+ return (i = (r = this.data.getValidData()[n]) == null ? void 0 : r.__ng) == null ? void 0 : i.rowState;
1658
1663
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1659
1664
  this.row.at = e;
1660
- }, 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) => {
1661
- e = parseInt(e, 10), this.data.setValue(e, s, r);
1665
+ }, 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, n) => this.data.get(e, n), this.setColumn = (e, n, r) => {
1666
+ e = parseInt(e, 10), this.data.setValue(e, n, r);
1662
1667
  }, this.setDataSource([]);
1663
1668
  }
1664
1669
  };
1665
- gt = new WeakMap(), h(cs, "ngDataManager");
1670
+ ut = new WeakMap(), h(cs, "ngDataManager");
1666
1671
  let De = cs;
1667
1672
  var Rt, H, Ut, ve;
1668
1673
  const hs = class hs {
1669
1674
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1670
- constructor(n) {
1675
+ constructor(s) {
1671
1676
  d(this, Rt);
1672
1677
  d(this, H, []);
1673
- q(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1674
- n.forEach((s) => {
1675
- t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1678
+ q(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1679
+ s.forEach((n) => {
1680
+ t(this, H).some((r) => r.name === n) || t(this, H).push({ name: n, type: e });
1676
1681
  }), t(this, Ut).call(this);
1677
1682
  }, "add"));
1678
1683
  d(this, Ut, /* @__PURE__ */ h(() => {
1679
- const n = /* @__PURE__ */ new Map();
1684
+ const s = /* @__PURE__ */ new Map();
1680
1685
  t(this, H).forEach((e) => {
1681
- n.set(e.name, e.type);
1682
- }), y(this, H, Array.from(n, ([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);
1686
+ s.set(e.name, e.type);
1687
+ }), y(this, H, Array.from(s, ([e, n]) => ({ name: e, type: n }))), y(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1683
1688
  }, "#adjust"));
1684
1689
  d(this, ve, /* @__PURE__ */ h(() => {
1685
1690
  y(this, H, []), S.log(t(this, Rt).querySelectorAll("table"));
1686
- const n = Array.from(t(this, Rt).querySelectorAll("table"));
1687
- if (!(!n || n.length === 0)) {
1688
- for (const e of n)
1689
- S.log(e), $("[data-bind]", e).each((s, r) => {
1691
+ const s = Array.from(t(this, Rt).querySelectorAll("table"));
1692
+ if (!(!s || s.length === 0)) {
1693
+ for (const e of s)
1694
+ S.log(e), $("[data-bind]", e).each((n, r) => {
1690
1695
  const i = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1691
1696
  i && t(this, H).push({ name: i, type: o });
1692
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1693
- $(`[${s}]`, e).each((r, i) => {
1694
- var o = i.getAttribute(s);
1697
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1698
+ $(`[${n}]`, e).each((r, i) => {
1699
+ var o = i.getAttribute(n);
1695
1700
  if (o.indexOf("data.") < 0) {
1696
1701
  const a = o.search(/[(]/g);
1697
1702
  if (a > 0)
@@ -1713,41 +1718,41 @@ const hs = class hs {
1713
1718
  t(this, Ut).call(this);
1714
1719
  }
1715
1720
  }, "#init"));
1716
- y(this, Rt, n), t(this, ve).call(this);
1721
+ y(this, Rt, s), t(this, ve).call(this);
1717
1722
  }
1718
1723
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1719
1724
  get() {
1720
- return t(this, H).map((n) => n.name);
1725
+ return t(this, H).map((s) => s.name);
1721
1726
  }
1722
1727
  // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
1723
1728
  getFields() {
1724
1729
  return t(this, H);
1725
1730
  }
1726
1731
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1727
- getType(n) {
1728
- const e = t(this, H).find((s) => s.name === n);
1732
+ getType(s) {
1733
+ const e = t(this, H).find((n) => n.name === s);
1729
1734
  return e ? e.type : "string";
1730
1735
  }
1731
- indexOf(n) {
1732
- return t(this, H).findIndex((e) => e.name === n);
1736
+ indexOf(s) {
1737
+ return t(this, H).findIndex((e) => e.name === s);
1733
1738
  }
1734
- includes(n) {
1735
- return t(this, H).some((e) => e.name === n);
1739
+ includes(s) {
1740
+ return t(this, H).some((e) => e.name === s);
1736
1741
  }
1737
1742
  };
1738
1743
  Rt = new WeakMap(), H = new WeakMap(), Ut = new WeakMap(), ve = new WeakMap(), h(hs, "ngFields");
1739
1744
  let Be = hs;
1740
- var ut, Se, Re;
1745
+ var gt, Se, Re;
1741
1746
  const ds = class ds extends HTMLElement {
1742
1747
  constructor() {
1743
1748
  super();
1744
1749
  //#created = false;
1745
- d(this, ut);
1750
+ d(this, gt);
1746
1751
  d(this, Se);
1747
1752
  d(this, Re, /* @__PURE__ */ h(() => {
1748
1753
  this.fields = new Be(this), y(this, Se, new Ne(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1749
1754
  }, "#init"));
1750
- this.attachShadow({ mode: "open" }), y(this, ut, new De(this));
1755
+ this.attachShadow({ mode: "open" }), y(this, gt, new De(this));
1751
1756
  }
1752
1757
  connectedCallback() {
1753
1758
  t(this, Re).call(this);
@@ -1757,21 +1762,21 @@ const ds = class ds extends HTMLElement {
1757
1762
  }
1758
1763
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1759
1764
  get data() {
1760
- return t(this, ut).data;
1765
+ return t(this, gt).data;
1761
1766
  }
1762
1767
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1763
1768
  get row() {
1764
- return t(this, ut).row;
1769
+ return t(this, gt).row;
1765
1770
  }
1766
1771
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1767
1772
  get dataManager() {
1768
- return t(this, ut);
1773
+ return t(this, gt);
1769
1774
  }
1770
1775
  };
1771
- ut = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), h(ds, "NineTable");
1776
+ gt = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), h(ds, "NineTable");
1772
1777
  let We = ds;
1773
1778
  customElements.get("nine-table") || customElements.define("nine-table", We);
1774
- const Tt = class Tt extends HTMLElement {
1779
+ const Ct = class Ct extends HTMLElement {
1775
1780
  // πŸ‘ˆ μ»€μŠ€ν…€ μŠ€νƒ€μΌμš© μΊμ‹œ μΆ”κ°€
1776
1781
  constructor() {
1777
1782
  super();
@@ -1782,8 +1787,8 @@ const Tt = class Tt extends HTMLElement {
1782
1787
  connectedCallback() {
1783
1788
  }
1784
1789
  };
1785
- h(Tt, "BasicCellElement"), q(Tt, "_styleCache", /* @__PURE__ */ new Map()), q(Tt, "_customStyleCache", /* @__PURE__ */ new Map());
1786
- let ze = Tt;
1790
+ h(Ct, "BasicCellElement"), q(Ct, "_styleCache", /* @__PURE__ */ new Map()), q(Ct, "_customStyleCache", /* @__PURE__ */ new Map());
1791
+ let ze = Ct;
1787
1792
  var L, Xt, v, Xe, Ke, Ge, Ze, Je;
1788
1793
  const fs = class fs extends ze {
1789
1794
  constructor() {
@@ -1798,15 +1803,15 @@ const fs = class fs extends ze {
1798
1803
  q(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1799
1804
  if (t(this, v))
1800
1805
  if (t(this, v).closest("tbody")) {
1801
- const s = t(this, v).closest("tr").data, r = parseInt(t(this, v).dataset.row);
1802
- if (!s) return "";
1806
+ const n = t(this, v).closest("tr").data, r = parseInt(t(this, v).dataset.row);
1807
+ if (!n) return "";
1803
1808
  if (ninegrid.isNull(t(this, v).dataset.expr)) {
1804
1809
  if (!ninegrid.isNull(t(this, v).dataset.bind))
1805
- return s[t(this, v).dataset.bind] || ninegrid.nvl(e, "");
1810
+ return n[t(this, v).dataset.bind] || ninegrid.nvl(e, "");
1806
1811
  } else try {
1807
- return this.getExprValue(t(this, v).dataset.expr, s, r, t(this, v));
1812
+ return this.getExprValue(t(this, v).dataset.expr, n, r, t(this, v));
1808
1813
  } catch {
1809
- console.error(t(this, v).dataset.expr, s, t(this, v).dataset.row);
1814
+ console.error(t(this, v).dataset.expr, n, t(this, v).dataset.row);
1810
1815
  }
1811
1816
  return ninegrid.nvl(e, "");
1812
1817
  } else
@@ -1819,13 +1824,13 @@ const fs = class fs extends ze {
1819
1824
  if (!(!t(this, L) || !t(this, L).template || !t(this, v).closest("tbody.bindable"))) {
1820
1825
  var e = ninegrid.j.querySelectorAll(t(this, v)).attr("suppress");
1821
1826
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1822
- var s = t(this, v).closest("tr"), r = [];
1823
- $("th,td", s).each((m, T) => {
1824
- var R = ninegrid.j.querySelectorAll(T).attr("suppress");
1825
- R && T.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && r.push(R));
1827
+ var n = t(this, v).closest("tr"), r = [];
1828
+ $("th,td", n).each((m, C) => {
1829
+ var R = ninegrid.j.querySelectorAll(C).attr("suppress");
1830
+ R && C.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && r.push(R));
1826
1831
  }), r.sort();
1827
1832
  var i = !1;
1828
- if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1833
+ if (parseInt(n.sectionRowIndex / t(this, L).template.length) > 0)
1829
1834
  for (var o of r) {
1830
1835
  if (o > e) break;
1831
1836
  var a = parseInt(t(this, v).dataset.row), c = a - 1, l = t(this, v).closest("tr").data, u = t(this, L).data.get(c);
@@ -1844,12 +1849,12 @@ const fs = class fs extends ze {
1844
1849
  }
1845
1850
  }
1846
1851
  }, "#resetSuppress"));
1847
- q(this, "getExprValue", /* @__PURE__ */ h((e, s, r, i) => {
1852
+ q(this, "getExprValue", /* @__PURE__ */ h((e, n, r, i) => {
1848
1853
  if (typeof e < "u")
1849
1854
  try {
1850
1855
  r = parseInt(r);
1851
1856
  const o = e.replace("()", "");
1852
- return t(this, L)[o] ? t(this, L)[o].call(this, s, r, t(this, v)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1857
+ return t(this, L)[o] ? t(this, L)[o].call(this, n, r, t(this, v)) : t(this, L).exprFunction(e).call(this, n, r, t(this, L).data);
1853
1858
  } catch {
1854
1859
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1855
1860
  }
@@ -1865,9 +1870,9 @@ const fs = class fs extends ze {
1865
1870
  return e ?? "";
1866
1871
  }
1867
1872
  set value(e) {
1868
- var s = parseInt(t(this, v).dataset.row);
1873
+ var n = parseInt(t(this, v).dataset.row);
1869
1874
  const r = this.getAttribute("update-row-state") != "false";
1870
- s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, v).dataset.index), t(this, v).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, v).dataset.bind, e, r);
1875
+ n < 0 ? t(this, L).data.setValueNF(parseInt(t(this, v).dataset.index), t(this, v).dataset.bind, e, r) : t(this, L).data.setValue(n, t(this, v).dataset.bind, e, r);
1871
1876
  }
1872
1877
  get row() {
1873
1878
  return parseInt(t(this, v).dataset.row);
@@ -1882,7 +1887,7 @@ const fs = class fs extends ze {
1882
1887
  };
1883
1888
  L = new WeakMap(), Xt = new WeakMap(), v = new WeakMap(), Xe = new WeakMap(), Ke = new WeakMap(), Ge = new WeakMap(), Ze = new WeakMap(), Je = new WeakMap(), h(fs, "CellElement");
1884
1889
  let Pe = fs;
1885
- const gs = class gs extends Pe {
1890
+ const us = class us extends Pe {
1886
1891
  constructor() {
1887
1892
  super();
1888
1893
  }
@@ -1893,10 +1898,10 @@ const gs = class gs extends Pe {
1893
1898
  return super.refresh();
1894
1899
  }
1895
1900
  };
1896
- h(gs, "EditableCellElement");
1897
- let Fe = gs;
1901
+ h(us, "EditableCellElement");
1902
+ let Fe = us;
1898
1903
  var Kt, bt, At, Et, Ae, Q, Qe;
1899
- const us = class us extends Fe {
1904
+ const gs = class gs extends Fe {
1900
1905
  constructor() {
1901
1906
  super();
1902
1907
  d(this, Kt);
@@ -1944,10 +1949,10 @@ const us = class us extends Fe {
1944
1949
  if (t(this, bt) == "number") {
1945
1950
  let i = [];
1946
1951
  if (t(this, Q) && Number(t(this, Q)) > 0 && i.push("."), t(this, Et) && Number(t(this, Et)) >= 0 && i.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !i.includes(e.key) && e.preventDefault(), t(this, Q) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1947
- var s = e.target.value, r = s.indexOf(".");
1952
+ var n = e.target.value, r = n.indexOf(".");
1948
1953
  if (r >= 0) {
1949
- var s = s.substr(r + 1, s.length);
1950
- s.length >= Number(t(this, Q)) && e.preventDefault();
1954
+ var n = n.substr(r + 1, n.length);
1955
+ n.length >= Number(t(this, Q)) && e.preventDefault();
1951
1956
  }
1952
1957
  }
1953
1958
  }
@@ -1957,8 +1962,8 @@ const us = class us extends Fe {
1957
1962
  if (this.applyBaseStyle(), y(this, bt, this.getAttribute("type") || "text"), y(this, At, this.getAttribute("maxbyte")), y(this, Et, this.getAttribute("min")), y(this, Ae, this.getAttribute("max")), y(this, Q, this.getAttribute("scale")), !["text", "number"].includes(t(this, bt))) throw `invalid type : ${t(this, bt)}`;
1958
1963
  }
1959
1964
  connectedCallback() {
1960
- for (var e = [], s = 0; s < this.attributes.length; s++)
1961
- ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[s].name) && e.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);
1965
+ for (var e = [], n = 0; n < this.attributes.length; n++)
1966
+ ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[n].name) && e.push(`${this.attributes[n].name}="${this.attributes[n].value}"`);
1962
1967
  this.innerHTML = `
1963
1968
  <input type="text"
1964
1969
  ${e.join(" ")}
@@ -1967,8 +1972,8 @@ const us = class us extends Fe {
1967
1972
  `, super.connectedCallback(), y(this, Kt, this.querySelector("input"));
1968
1973
  }
1969
1974
  };
1970
- Kt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ae = new WeakMap(), Q = new WeakMap(), Qe = new WeakMap(), h(us, "CellInputText");
1971
- let je = us;
1975
+ Kt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ae = new WeakMap(), Q = new WeakMap(), Qe = new WeakMap(), h(gs, "CellInputText");
1976
+ let je = gs;
1972
1977
  customElements.get("cell-input-text");
1973
1978
  customElements.get("cell-input") || customElements.define("cell-input", je);
1974
1979
  //# sourceMappingURL=nine-table.js.map