@ninebone/table 0.0.700 → 0.0.702

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,113 +1,113 @@
1
- var es = Object.defineProperty;
2
- var ss = (R) => {
3
- throw TypeError(R);
1
+ var ss = Object.defineProperty;
2
+ var ns = (q) => {
3
+ throw TypeError(q);
4
4
  };
5
- var os = (R, n, e) => n in R ? es(R, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[n] = e;
6
- var h = (R, n) => es(R, "name", { value: n, configurable: !0 });
7
- var E = (R, n, e) => os(R, typeof n != "symbol" ? n + "" : n, e), he = (R, n, e) => n.has(R) || ss("Cannot " + e);
8
- var t = (R, n, e) => (he(R, n, "read from private field"), e ? e.call(R) : n.get(R)), d = (R, n, e) => n.has(R) ? ss("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(R) : n.set(R, e), p = (R, n, e, s) => (he(R, n, "write to private field"), s ? s.call(R, e) : n.set(R, e), e), de = (R, n, e) => (he(R, n, "access private method"), e);
9
- var ns = (R, n, e, s) => ({
10
- set _(r) {
11
- p(R, n, r, e);
5
+ var as = (q, n, e) => n in q ? ss(q, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[n] = e;
6
+ var h = (q, n) => ss(q, "name", { value: n, configurable: !0 });
7
+ var A = (q, n, e) => as(q, typeof n != "symbol" ? n + "" : n, e), he = (q, n, e) => n.has(q) || ns("Cannot " + e);
8
+ var t = (q, n, e) => (he(q, n, "read from private field"), e ? e.call(q) : n.get(q)), d = (q, n, e) => n.has(q) ? ns("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(q) : n.set(q, e), p = (q, n, e, s) => (he(q, n, "write to private field"), s ? s.call(q, e) : n.set(q, e), e), de = (q, n, e) => (he(q, n, "access private method"), e);
9
+ var os = (q, n, e, s) => ({
10
+ set _(o) {
11
+ p(q, n, o, e);
12
12
  },
13
13
  get _() {
14
- return t(R, n, s);
14
+ return t(q, n, s);
15
15
  }
16
16
  });
17
- import { trace as as } from "@ninebone/util";
18
- const We = class We extends as.constructor {
17
+ import { trace as ls } from "@ninebone/util";
18
+ const De = class De extends ls.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(We, "Trace");
24
- let fe = We;
25
- const T = new fe();
26
- var B, j, S, K, Z, G, Ot, J, Bt;
27
- const Oe = class Oe extends HTMLElement {
23
+ h(De, "Trace");
24
+ let fe = De;
25
+ const w = new fe();
26
+ var B, j, R, K, Z, G, Wt, J, Bt;
27
+ const We = class We extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, B);
31
31
  d(this, j, !1);
32
- d(this, S);
32
+ d(this, R);
33
33
  d(this, K);
34
34
  d(this, Z);
35
35
  d(this, G);
36
- d(this, Ot, /* @__PURE__ */ h(() => {
36
+ d(this, Wt, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, B)) return;
38
38
  const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (p(this, G, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, G).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, B) || !t(this, S) || t(this, j)) return;
45
- const e = t(this, S).container, s = e.querySelector("table");
43
+ A(this, "refresh", /* @__PURE__ */ h(() => {
44
+ if (!t(this, B) || !t(this, R) || t(this, j)) return;
45
+ const e = t(this, R).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, S).track, o = t(this, S).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
47
+ const o = t(this, R).track, r = t(this, R).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  i && (i.style.display = "flex");
50
50
  else {
51
51
  i && (i.style.display = "none");
52
52
  return;
53
53
  }
54
- const l = r.clientWidth;
54
+ const l = o.clientWidth;
55
55
  if (l <= 0) return;
56
56
  const f = Math.max(Math.min(l * (a / c), l), 20);
57
- o.style.width = `${f}px`;
57
+ r.style.width = `${f}px`;
58
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
- const m = l - f;
62
- u > m && (u = m), o.style.left = `${u}px`, t(this, S).left.disabled = u === 0, t(this, S).right.disabled = u >= m - 1;
61
+ const y = l - f;
62
+ u > y && (u = y), r.style.left = `${u}px`, t(this, R).left.disabled = u === 0, t(this, R).right.disabled = u >= y - 1;
63
63
  }, "refresh"));
64
64
  d(this, J, /* @__PURE__ */ h((e) => {
65
- if (!t(this, S)) return !1;
66
- const s = t(this, S).container, r = s.querySelector("table");
67
- if (!r) return !1;
68
- const o = t(this, S).track.getBoundingClientRect(), i = t(this, S).thumb.clientWidth;
65
+ if (!t(this, R)) return !1;
66
+ const s = t(this, R).container, o = s.querySelector("table");
67
+ if (!o) return !1;
68
+ const r = t(this, R).track.getBoundingClientRect(), i = t(this, R).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
- const c = o.width - i;
72
- a > c && (a = c), a = parseInt(a, 10), t(this, S).thumb.style.left = `${a}px`, t(this, S).left.disabled = a === 0, t(this, S).right.disabled = a >= c - 1;
73
- const l = s.clientWidth, g = r.scrollWidth - l;
71
+ const c = r.width - i;
72
+ a > c && (a = c), a = parseInt(a, 10), t(this, R).thumb.style.left = `${a}px`, t(this, R).left.disabled = a === 0, t(this, R).right.disabled = a >= c - 1;
73
+ const l = s.clientWidth, g = o.scrollWidth - l;
74
74
  return c > 0 && g > 0 && (s.scrollLeft = a / c * g), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Bt, /* @__PURE__ */ h(() => {
77
- const e = /* @__PURE__ */ h((r) => {
77
+ const e = /* @__PURE__ */ h((o) => {
78
78
  clearInterval(t(this, K)), clearInterval(t(this, Z));
79
- const o = parseInt(t(this, S).thumb.style.left || 0, 10);
80
- t(this, J).call(this, o + r), p(this, K, setInterval(() => {
79
+ const r = parseInt(t(this, R).thumb.style.left || 0, 10);
80
+ t(this, J).call(this, r + o), p(this, K, setInterval(() => {
81
81
  clearInterval(t(this, K)), p(this, Z, setInterval(() => {
82
- const i = parseInt(t(this, S).thumb.style.left || 0, 10);
83
- t(this, J).call(this, i + r) || clearInterval(t(this, Z));
82
+ const i = parseInt(t(this, R).thumb.style.left || 0, 10);
83
+ t(this, J).call(this, i + o) || clearInterval(t(this, Z));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, K)), clearInterval(t(this, Z));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, S).left.addEventListener(r, s), t(this, S).right.addEventListener(r, s), t(this, S).track.addEventListener(r, s);
91
- }), t(this, S).left.addEventListener("mousedown", (r) => {
92
- r.button === 0 && e(-20);
93
- }), t(this, S).right.addEventListener("mousedown", (r) => {
94
- r.button === 0 && e(20);
95
- }), t(this, S).left.addEventListener("touchstart", () => e(-20)), t(this, S).right.addEventListener("touchstart", () => e(20)), t(this, S).track.addEventListener("mousedown", (r) => {
96
- if (r.button !== 0) return;
97
- r.preventDefault();
98
- const o = t(this, S).track.getBoundingClientRect(), i = t(this, S).thumb.clientWidth;
99
- t(this, J).call(this, r.clientX - o.left - i / 2);
100
- }), t(this, S).thumb.addEventListener("mousedown", (r) => {
101
- if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), p(this, j, !0), this.shiftX = r.clientX - t(this, S).thumb.getBoundingClientRect().left;
103
- const o = /* @__PURE__ */ h((a) => {
89
+ ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
+ t(this, R).left.addEventListener(o, s), t(this, R).right.addEventListener(o, s), t(this, R).track.addEventListener(o, s);
91
+ }), t(this, R).left.addEventListener("mousedown", (o) => {
92
+ o.button === 0 && e(-20);
93
+ }), t(this, R).right.addEventListener("mousedown", (o) => {
94
+ o.button === 0 && e(20);
95
+ }), t(this, R).left.addEventListener("touchstart", () => e(-20)), t(this, R).right.addEventListener("touchstart", () => e(20)), t(this, R).track.addEventListener("mousedown", (o) => {
96
+ if (o.button !== 0) return;
97
+ o.preventDefault();
98
+ const r = t(this, R).track.getBoundingClientRect(), i = t(this, R).thumb.clientWidth;
99
+ t(this, J).call(this, o.clientX - r.left - i / 2);
100
+ }), t(this, R).thumb.addEventListener("mousedown", (o) => {
101
+ if (o.button !== 0) return;
102
+ o.stopPropagation(), o.preventDefault(), p(this, j, !0), this.shiftX = o.clientX - t(this, R).thumb.getBoundingClientRect().left;
103
+ const r = /* @__PURE__ */ h((a) => {
104
104
  if (!t(this, j)) return;
105
- const c = t(this, S).track.getBoundingClientRect();
105
+ const c = t(this, R).track.getBoundingClientRect();
106
106
  t(this, J).call(this, a.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
- p(this, j, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
108
+ p(this, j, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -182,7 +182,7 @@ const Oe = class Oe extends HTMLElement {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- p(this, S, {
185
+ p(this, R, {
186
186
  container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -190,7 +190,7 @@ const Oe = class Oe extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
192
  t(this, j) || this.refresh();
193
- }), t(this, Bt).call(this), t(this, Ot).call(this), this.refresh();
193
+ }), t(this, Bt).call(this), t(this, Wt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
@@ -198,72 +198,72 @@ const Oe = class Oe extends HTMLElement {
198
198
  t(this, G) && t(this, G).disconnect();
199
199
  }
200
200
  };
201
- B = new WeakMap(), j = new WeakMap(), S = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Ot = new WeakMap(), J = new WeakMap(), Bt = new WeakMap(), h(Oe, "NineTableHScrollBar");
202
- let ue = Oe;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ue);
204
- var Q, tt, ct, k, wt, St, Pt;
201
+ B = new WeakMap(), j = new WeakMap(), R = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Wt = new WeakMap(), J = new WeakMap(), Bt = new WeakMap(), h(We, "NineTableHScrollBar");
202
+ let ge = We;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
204
+ var Q, tt, ht, T, St, Et, Ot;
205
205
  const Be = class Be extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  d(this, Q);
209
209
  d(this, tt);
210
- d(this, ct, !1);
211
- d(this, k);
212
- d(this, wt, 0);
210
+ d(this, ht, !1);
211
+ d(this, T);
213
212
  d(this, St, 0);
214
- E(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (T.log("vscrollbar.refresh"), !t(this, Q) || !t(this, k)) return;
216
- const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, Q).data.length, a = t(this, tt).getRowHeight(), c = i * a;
217
- if (c <= o || i === 0) {
213
+ d(this, Et, 0);
214
+ A(this, "refresh", /* @__PURE__ */ h(() => {
215
+ if (w.log("vscrollbar.refresh"), !t(this, Q) || !t(this, T)) return;
216
+ const e = t(this, T).container, s = t(this, T).track, o = t(this, T).thumb, r = e.clientHeight, i = t(this, Q).data.length, a = t(this, tt).getRowHeight(), c = i * a;
217
+ if (c <= r || i === 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 * (o / c), l), 20);
225
- r.style.height = `${f}px`;
226
- const g = e.scrollTop, b = Math.max(c - o, 1);
227
- T.log(e, g, b);
224
+ const f = Math.max(Math.min(l * (r / c), l), 20);
225
+ o.style.height = `${f}px`;
226
+ const g = e.scrollTop, b = Math.max(c - r, 1);
227
+ w.log(e, g, b);
228
228
  let u = 0;
229
229
  b > 0 && (u = g / b * (l - f));
230
- const m = l - f;
231
- u < 0 && (u = 0), u > m && (u = m), r.style.top = `${u}px`, t(this, k).top.disabled = g <= 0, t(this, k).bottom.disabled = g >= b - 1;
230
+ const y = l - f;
231
+ u < 0 && (u = 0), u > y && (u = y), o.style.top = `${u}px`, t(this, T).top.disabled = g <= 0, t(this, T).bottom.disabled = g >= b - 1;
232
232
  }, "refresh"));
233
- d(this, Pt, /* @__PURE__ */ h(() => {
234
- T.log("nine-table-vscrollbar.#init");
235
- const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
- const o = (t(this, Q).data.get() || []).length, i = t(this, tt).getRowHeight();
237
- return o * i;
233
+ d(this, Ot, /* @__PURE__ */ h(() => {
234
+ w.log("nine-table-vscrollbar.#init");
235
+ const e = t(this, T).container, s = /* @__PURE__ */ h(() => {
236
+ const r = (t(this, Q).data.get() || []).length, i = t(this, tt).getRowHeight();
237
+ return r * i;
238
238
  }, "getContentHeight");
239
- t(this, k).thumb.addEventListener("mousedown", (r) => {
240
- if (r.button !== 0) return;
241
- r.stopPropagation(), r.preventDefault(), p(this, ct, !0), p(this, wt, r.clientY), p(this, St, e.scrollTop);
242
- const o = /* @__PURE__ */ h((a) => {
243
- if (!t(this, ct)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, g = c.height - l, b = a.clientY - t(this, wt), u = e.clientHeight, m = s(), v = Math.max(m - u, 1);
239
+ t(this, T).thumb.addEventListener("mousedown", (o) => {
240
+ if (o.button !== 0) return;
241
+ o.stopPropagation(), o.preventDefault(), p(this, ht, !0), p(this, St, o.clientY), p(this, Et, e.scrollTop);
242
+ const r = /* @__PURE__ */ h((a) => {
243
+ if (!t(this, ht)) return;
244
+ const c = t(this, T).track.getBoundingClientRect(), l = t(this, T).thumb.clientHeight, g = c.height - l, b = a.clientY - t(this, St), u = e.clientHeight, y = s(), v = Math.max(y - u, 1);
245
245
  if (g > 0 && v > 0) {
246
- const A = b / g * v;
247
- let x = t(this, St) + A;
248
- const M = Math.max(0, m - u);
249
- x < 0 && (x = 0), x > M && (x = M), e.scrollTop = x;
246
+ const S = b / g * v;
247
+ let m = t(this, Et) + S;
248
+ const I = Math.max(0, y - u);
249
+ m < 0 && (m = 0), m > I && (m = I), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
253
- p(this, ct, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
253
+ p(this, ht, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), this.refresh();
254
254
  }, "onMouseUp");
255
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
256
- }), t(this, k).track.addEventListener("mousedown", (r) => {
257
- if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
- const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, g = s(), b = Math.max(g - f, 1);
255
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
256
+ }), t(this, T).track.addEventListener("mousedown", (o) => {
257
+ if (o.button !== 0 || o.target === t(this, T).thumb) return;
258
+ const r = t(this, T).track.getBoundingClientRect(), i = t(this, T).thumb.clientHeight, a = o.clientY - r.top - i / 2, l = r.height - i, f = e.clientHeight, g = s(), b = Math.max(g - f, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const u = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = u * b;
262
262
  }
263
263
  this.refresh();
264
- }), t(this, k).top.addEventListener("click", () => {
264
+ }), t(this, T).top.addEventListener("click", () => {
265
265
  e.scrollTop -= 40;
266
- }), t(this, k).bottom.addEventListener("click", () => {
266
+ }), t(this, T).bottom.addEventListener("click", () => {
267
267
  e.scrollTop += 40;
268
268
  });
269
269
  }, "#init"));
@@ -339,65 +339,65 @@ const Be = class Be extends HTMLElement {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
- p(this, k, {
342
+ p(this, T, {
343
343
  container: s,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
346
346
  top: this.querySelector(".ng-scroll-top"),
347
347
  bottom: this.querySelector(".ng-scroll-bottom")
348
- }), t(this, Pt).call(this), this.refresh();
348
+ }), t(this, Ot).call(this), this.refresh();
349
349
  }, "initWhenReady");
350
350
  e();
351
351
  }
352
352
  };
353
- Q = new WeakMap(), tt = new WeakMap(), ct = new WeakMap(), k = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Pt = new WeakMap(), h(Be, "NineTableVScrollBar");
354
- let ge = Be;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ge);
356
- var D, w, et, P, _, V, st, Et, Ce, Le, Dt, Ft, At, Rt, qt, jt, Vt, Tt, He, ht, kt, Yt;
357
- const Pe = class Pe {
353
+ Q = new WeakMap(), tt = new WeakMap(), ht = new WeakMap(), T = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Ot = new WeakMap(), h(Be, "NineTableVScrollBar");
354
+ let ue = Be;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ue);
356
+ var P, E, et, O, N, V, st, Rt, ke, Me, Pt, Ft, At, qt, Ct, Yt, jt, Tt, Le, dt, kt, Vt;
357
+ const Oe = class Oe {
358
358
  constructor(n) {
359
- d(this, D);
360
- d(this, w);
359
+ d(this, P);
360
+ d(this, E);
361
361
  d(this, et);
362
- d(this, P, /* @__PURE__ */ new Map());
363
- d(this, _, null);
362
+ d(this, O, /* @__PURE__ */ new Map());
363
+ d(this, N, null);
364
364
  d(this, V, null);
365
365
  d(this, st, 0);
366
- d(this, Et, 40);
367
- d(this, Ce, !1);
368
- d(this, Le, !1);
366
+ d(this, Rt, 40);
367
+ d(this, ke, !1);
368
+ d(this, Me, !1);
369
369
  //#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
370
- d(this, Dt, 3);
371
- E(this, "refresh", /* @__PURE__ */ h(() => {
370
+ d(this, Pt, 3);
371
+ A(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
- T.log("rowManager.refresh");
374
- const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
375
- n && (t(this, At).call(this), t(this, Rt).call(this), t(this, ht).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
373
+ w.log("rowManager.refresh");
374
+ const n = t(this, E).querySelector(".ng-container-body .ng-part-body");
375
+ n && (t(this, At).call(this), t(this, qt).call(this), t(this, dt).call(this, n.scrollTop), (e = t(this, E).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
- E(this, "initialize", /* @__PURE__ */ h(() => {
378
- T.log("rowManager.initialize"), p(this, et, {
379
- scrollTables: t(this, w).querySelectorAll(".ng-part-body table"),
380
- firstTr: t(this, w).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), p(this, _, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
382
- const a = t(this, w).querySelector(i);
377
+ A(this, "initialize", /* @__PURE__ */ h(() => {
378
+ w.log("rowManager.initialize"), p(this, et, {
379
+ scrollTables: t(this, E).querySelectorAll(".ng-part-body table"),
380
+ firstTr: t(this, E).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
+ }), p(this, N, null), t(this, O).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
382
+ const a = t(this, E).querySelector(i);
383
383
  if (!a) return;
384
384
  const c = a.querySelector(".ng-part-body table");
385
385
  if (!c) return;
386
386
  const l = c.querySelector("tbody.bindable-tbody");
387
387
  if (!l) return;
388
388
  const g = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
- t(this, P).set(i, g);
389
+ t(this, O).set(i, g);
390
390
  });
391
- const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), s = t(this, w).querySelector(".ng-container-right .ng-part-body"), r = t(this, w).querySelector(".ng-container-body .ng-part-header"), o = t(this, w).querySelector(".ng-container-body .ng-part-footer");
391
+ const n = t(this, E).querySelector(".ng-container-body .ng-part-body"), e = t(this, E).querySelector(".ng-container-left .ng-part-body"), s = t(this, E).querySelector(".ng-container-right .ng-part-body"), o = t(this, E).querySelector(".ng-container-body .ng-part-header"), r = t(this, E).querySelector(".ng-container-body .ng-part-footer");
392
392
  if (n) {
393
- t(this, At).call(this), t(this, Tt).call(this), t(this, Rt).call(this), t(this, ht).call(this, n.scrollTop);
393
+ t(this, At).call(this), t(this, Tt).call(this), t(this, qt).call(this), t(this, dt).call(this, n.scrollTop);
394
394
  let i = !1;
395
395
  const a = /* @__PURE__ */ h((c) => {
396
396
  var g;
397
397
  if (i) return;
398
398
  i = !0;
399
399
  const l = c.scrollTop, f = c.scrollLeft;
400
- n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, ht).call(this, l), (g = t(this, w).querySelector("nine-table-vscrollbar")) == null || g.refresh(), i = !1;
400
+ n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), o && o.scrollLeft !== f && (o.scrollLeft = f), r && r.scrollLeft !== f && (r.scrollLeft = f), t(this, dt).call(this, l), (g = t(this, E).querySelector("nine-table-vscrollbar")) == null || g.refresh(), i = !1;
401
401
  }, "handleContainerScroll");
402
402
  [n, e, s].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", () => {
@@ -407,157 +407,157 @@ const Pe = class Pe {
407
407
  }
408
408
  }, "initialize"));
409
409
  d(this, Ft, /* @__PURE__ */ h((n, e) => {
410
- T.log("rowManager.#renderRows");
411
- const s = t(this, P).get(e);
410
+ w.log("rowManager.#renderRows");
411
+ const s = t(this, O).get(e);
412
412
  if (!s || s.length === 0) return;
413
- const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
414
- if (!r) return;
415
- r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
- const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
417
- for (let a = 0; a < t(this, Et); a++)
413
+ const o = n.querySelector(".ng-part-body tbody.bindable-tbody");
414
+ if (!o) return;
415
+ o.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
+ const r = o.querySelector("tr.nodata"), i = document.createDocumentFragment();
417
+ for (let a = 0; a < t(this, Rt); a++)
418
418
  s.forEach((c) => {
419
419
  i.appendChild(c.cloneNode(!0));
420
420
  });
421
- o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, et).firstTr = r.querySelector("tr:not(.nodata)"));
421
+ r ? r.before(i) : o.appendChild(i), e === ".ng-container-body" && (t(this, et).firstTr = o.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
423
  d(this, At, /* @__PURE__ */ h(() => {
424
- if (t(this, _) !== null && t(this, _) > 0)
425
- return t(this, _);
426
- const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
427
- T.log("rowManager.#measureAndCacheHeight");
428
- const e = t(this, P).get(".ng-container-body");
424
+ if (t(this, N) !== null && t(this, N) > 0)
425
+ return t(this, N);
426
+ const n = t(this, E).querySelector(".ng-container-body .ng-part-body");
427
+ w.log("rowManager.#measureAndCacheHeight");
428
+ const e = t(this, O).get(".ng-container-body");
429
429
  if (!e || e.length === 0) throw new Error("invalid dom");
430
430
  const s = n.querySelector("tbody.bindable-tbody");
431
- if (T.log(s), !s) throw new Error("invalid dom");
431
+ if (w.log(s), !s) throw new Error("invalid dom");
432
432
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
- const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
433
+ const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
434
434
  e.forEach((b) => {
435
- o.appendChild(b.cloneNode(!0));
436
- }), r ? r.before(o) : s.appendChild(o);
437
- const i = t(this, w), a = i.style.display, c = i.style.visibility, l = i.style.position;
435
+ r.appendChild(b.cloneNode(!0));
436
+ }), o ? o.before(r) : s.appendChild(r);
437
+ const i = t(this, E), a = i.style.display, c = i.style.visibility, l = i.style.position;
438
438
  (a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
439
439
  let f = 0;
440
440
  const g = s.querySelectorAll("tr");
441
441
  return g.forEach((b) => {
442
442
  let u = b.offsetHeight || b.getBoundingClientRect().height;
443
443
  if (u === 0) {
444
- const m = window.getComputedStyle(b);
445
- u = parseFloat(m.height) || parseFloat(m.minHeight) || 0;
444
+ const y = window.getComputedStyle(b);
445
+ u = parseFloat(y.height) || parseFloat(y.minHeight) || 0;
446
446
  }
447
447
  f += u;
448
- }), g.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, _, f), t(this, qt).call(this), t(this, _));
448
+ }), g.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, N, f), t(this, Ct).call(this), t(this, N));
449
449
  }, "#measureAndCacheHeight"));
450
- d(this, Rt, /* @__PURE__ */ h(() => {
451
- T.log("rowManager.#updateVirtualScrollHeight");
452
- const e = (t(this, D).data.get() || []).length, s = t(this, _), r = e * s;
453
- T.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
454
- const i = t(this, w).querySelector(o);
450
+ d(this, qt, /* @__PURE__ */ h(() => {
451
+ w.log("rowManager.#updateVirtualScrollHeight");
452
+ const e = (t(this, P).data.get() || []).length, s = t(this, N), o = e * s;
453
+ w.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: o }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
454
+ const i = t(this, E).querySelector(r);
455
455
  if (!i) return;
456
456
  const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
457
- a && (a.style.height = `${r}px`);
457
+ a && (a.style.height = `${o}px`);
458
458
  });
459
459
  }, "#updateVirtualScrollHeight"));
460
- d(this, qt, /* @__PURE__ */ h(() => {
461
- if (t(this, st) > 0 && t(this, _) > 0) {
462
- const n = Math.ceil(t(this, st) / t(this, _));
463
- p(this, Et, n + t(this, Dt));
460
+ d(this, Ct, /* @__PURE__ */ h(() => {
461
+ if (t(this, st) > 0 && t(this, N) > 0) {
462
+ const n = Math.ceil(t(this, st) / t(this, N));
463
+ p(this, Rt, n + t(this, Pt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, jt, /* @__PURE__ */ h(() => {
466
+ d(this, Yt, /* @__PURE__ */ h(() => {
467
467
  var a, c, l, f, g, b;
468
- const n = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), s = t(this, w).querySelector(".ng-container-right .ng-part-body table");
468
+ const n = t(this, E).querySelector(".ng-container-left .ng-part-body table"), e = t(this, E).querySelector(".ng-container-body .ng-part-body table"), s = t(this, E).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(u.length, m.length, v.length);
471
- for (let x = 0; x < A; x++) {
472
- const M = [
473
- ((a = u[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
- ((c = m[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
- ((l = v[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
- ], q = Math.max(...M);
477
- q > 0 && (u[x] && (u[x].style.height = `${q}px`), m[x] && (m[x].style.height = `${q}px`), v[x] && (v[x].style.height = `${q}px`));
470
+ const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], S = Math.max(u.length, y.length, v.length);
471
+ for (let m = 0; m < S; m++) {
472
+ const I = [
473
+ ((a = u[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
+ ((c = y[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
+ ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
+ ], C = Math.max(...I);
477
+ C > 0 && (u[m] && (u[m].style.height = `${C}px`), y[m] && (y[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
478
478
  }
479
479
  }
480
- const r = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
481
- if (o) {
482
- const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], A = Math.max(u.length, m.length, v.length);
483
- for (let x = 0; x < A; x++) {
484
- const M = [
485
- ((f = u[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
- ((g = m[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
487
- ((b = v[x]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
- ], q = Math.max(...M);
489
- q > 0 && (u[x] && (u[x].style.height = `${q}px`), m[x] && (m[x].style.height = `${q}px`), v[x] && (v[x].style.height = `${q}px`));
480
+ const o = t(this, E).querySelector(".ng-container-left .ng-part-footer table"), r = t(this, E).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, E).querySelector(".ng-container-right .ng-part-footer table");
481
+ if (r) {
482
+ const u = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], y = Array.from(r.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], S = Math.max(u.length, y.length, v.length);
483
+ for (let m = 0; m < S; m++) {
484
+ const I = [
485
+ ((f = u[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
+ ((g = y[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
487
+ ((b = v[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
+ ], C = Math.max(...I);
489
+ C > 0 && (u[m] && (u[m].style.height = `${C}px`), y[m] && (y[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
- d(this, Vt, /* @__PURE__ */ h(() => {
494
- !t(this, w) || !(t(this, w) instanceof HTMLElement) || (p(this, V, new ResizeObserver((n) => {
493
+ d(this, jt, /* @__PURE__ */ h(() => {
494
+ !t(this, E) || !(t(this, E) instanceof HTMLElement) || (p(this, V, new ResizeObserver((n) => {
495
495
  for (const e of n) {
496
496
  const s = e.target;
497
497
  if (!s.classList.contains("active")) continue;
498
- const r = e.contentRect.height;
499
- if (r > 0) {
500
- let o = 0;
498
+ const o = e.contentRect.height;
499
+ if (o > 0) {
500
+ let r = 0;
501
501
  const i = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
- i && (o += i.offsetHeight), a && (o += a.offsetHeight);
503
- const c = Math.max(r - o, 100);
504
- t(this, st) !== c && (p(this, st, c), t(this, qt).call(this), t(this, _) !== null && (t(this, Tt).call(this), this.refresh()));
502
+ i && (r += i.offsetHeight), a && (r += a.offsetHeight);
503
+ const c = Math.max(o - r, 100);
504
+ t(this, st) !== c && (p(this, st, c), t(this, Ct).call(this), t(this, N) !== null && (t(this, Tt).call(this), this.refresh()));
505
505
  }
506
506
  }
507
- })), t(this, V).observe(t(this, w)));
507
+ })), t(this, V).observe(t(this, E)));
508
508
  }, "#initResizeObserver"));
509
509
  d(this, Tt, /* @__PURE__ */ h(() => {
510
- T.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
- const e = t(this, w).querySelector(n);
510
+ w.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
+ const e = t(this, E).querySelector(n);
512
512
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ft).call(this, e, n);
513
- }), t(this, Yt).call(this), t(this, jt).call(this);
513
+ }), t(this, Vt).call(this), t(this, Yt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, He, /* @__PURE__ */ h((n) => {
515
+ d(this, Le, /* @__PURE__ */ h((n) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
- const s = t(this, w).querySelector(e);
518
+ const s = t(this, E).querySelector(e);
519
519
  if (!s) return;
520
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
- if (!r) return;
522
- const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
523
- o.forEach((f, g) => {
520
+ const o = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
+ if (!o) return;
522
+ const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, O).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).data.get() || []).length;
523
+ r.forEach((f, g) => {
524
524
  const b = n + Math.floor(g / i);
525
525
  if (b >= c) {
526
526
  f.style.visibility = "hidden";
527
527
  return;
528
528
  }
529
- const u = t(this, D).data.get(b);
529
+ const u = t(this, P).data.get(b);
530
530
  f.style.display = "", t(this, kt).call(this, f, u, b);
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
534
- d(this, ht, /* @__PURE__ */ h((n) => {
534
+ d(this, dt, /* @__PURE__ */ h((n) => {
535
535
  var g, b;
536
- const e = t(this, _);
536
+ const e = t(this, N);
537
537
  if (!e || e <= 0) return;
538
- const s = t(this, D).data.length;
538
+ const s = t(this, P).data.length;
539
539
  if (s === 0) return;
540
- const r = ((g = t(this, P).get(".ng-container-body")) == null ? void 0 : g.length) || 1, o = t(this, w).querySelector(".ng-container-body .ng-part-body");
541
- T.log("bodyContainer.clientHeight", o.clientHeight);
542
- const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
540
+ const o = ((g = t(this, O).get(".ng-container-body")) == null ? void 0 : g.length) || 1, r = t(this, E).querySelector(".ng-container-body .ng-part-body");
541
+ w.log("bodyContainer.clientHeight", r.clientHeight);
542
+ const i = Math.max(0, s - Math.floor(r.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
543
543
  let c = Math.floor(a * e);
544
- T.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && T.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
544
+ w.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && w.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
545
  const l = t(this, et).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
546
  (b = t(this, et)) == null || b.scrollTables.forEach((u) => {
547
547
  u.style.transform = `translate3d(0, ${c}px, 0)`;
548
- }), f !== a && (T.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
549
- const m = t(this, w).querySelector(u);
550
- if (!m) return;
551
- const v = m.querySelector(".ng-part-body tbody.bindable-tbody");
548
+ }), f !== a && (w.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
549
+ const y = t(this, E).querySelector(u);
550
+ if (!y) return;
551
+ const v = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
552
  if (!v) return;
553
- Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((x, M) => {
554
- const q = a + Math.floor(M / r);
555
- if (q >= s) {
556
- x.style.display = "none";
553
+ Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((m, I) => {
554
+ const C = a + Math.floor(I / o);
555
+ if (C >= s) {
556
+ m.style.display = "none";
557
557
  return;
558
558
  }
559
- const W = t(this, D).data.get(q);
560
- x.style.display = "", t(this, kt).call(this, x, W, q);
559
+ const _ = t(this, P).data.get(C);
560
+ m.style.display = "", t(this, kt).call(this, m, _, C);
561
561
  });
562
562
  }));
563
563
  }, "#handleScroll"));
@@ -576,48 +576,48 @@ const Pe = class Pe {
576
576
  });
577
577
  }; */
578
578
  d(this, kt, /* @__PURE__ */ h((n, e, s) => {
579
- n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
580
- r.dataset.row = s;
581
- const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
579
+ n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((o, r) => {
580
+ o.dataset.row = s;
581
+ const i = Array.from(o.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
582
  i && typeof i.refresh == "function" && i.refresh();
583
583
  });
584
584
  }, "#bindRowData"));
585
- d(this, Yt, /* @__PURE__ */ h(() => {
585
+ d(this, Vt, /* @__PURE__ */ h(() => {
586
586
  var c, l, f;
587
- T.log("rowManager.#syncHeaderHeights");
588
- const n = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), s = t(this, w).querySelector(".ng-container-right .ng-part-header table");
587
+ w.log("rowManager.#syncHeaderHeights");
588
+ const n = t(this, E).querySelector(".ng-container-left .ng-part-header table"), e = t(this, E).querySelector(".ng-container-body .ng-part-header table"), s = t(this, E).querySelector(".ng-container-right .ng-part-header table");
589
589
  if (!e) return;
590
- const r = n ? Array.from(n.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
590
+ const o = n ? Array.from(n.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), i = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(o.length, r.length, i.length);
591
591
  for (let g = 0; g < a; g++) {
592
592
  const b = [
593
- ((c = r[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
- ((l = o[g]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
593
+ ((c = o[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
+ ((l = r[g]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
595
  ((f = i[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
596
596
  ], u = Math.max(...b);
597
- u > 0 && (r[g] && (r[g].style.height = `${u}px`), o[g] && (o[g].style.height = `${u}px`), i[g] && (i[g].style.height = `${u}px`));
597
+ u > 0 && (o[g] && (o[g].style.height = `${u}px`), r[g] && (r[g].style.height = `${u}px`), i[g] && (i[g].style.height = `${u}px`));
598
598
  }
599
599
  }, "#syncHeaderHeights"));
600
- E(this, "destroy", /* @__PURE__ */ h(() => {
600
+ A(this, "destroy", /* @__PURE__ */ h(() => {
601
601
  t(this, V) && (t(this, V).disconnect(), p(this, V, null));
602
602
  }, "destroy"));
603
- p(this, D, n.getRootNode().host), p(this, w, n), t(this, Vt).call(this);
603
+ p(this, P, n.getRootNode().host), p(this, E, n), t(this, jt).call(this);
604
604
  }
605
605
  getRowHeight() {
606
- return t(this, _);
606
+ return t(this, N);
607
607
  }
608
608
  templateLength(n = ".ng-container-body") {
609
609
  var e;
610
- return ((e = t(this, P).get(n)) == null ? void 0 : e.length) || 1;
610
+ return ((e = t(this, O).get(n)) == null ? void 0 : e.length) || 1;
611
611
  }
612
612
  };
613
- D = new WeakMap(), w = new WeakMap(), et = new WeakMap(), P = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), st = new WeakMap(), Et = new WeakMap(), Ce = new WeakMap(), Le = new WeakMap(), Dt = new WeakMap(), Ft = new WeakMap(), At = new WeakMap(), Rt = new WeakMap(), qt = new WeakMap(), jt = new WeakMap(), Vt = new WeakMap(), Tt = new WeakMap(), He = new WeakMap(), ht = new WeakMap(), kt = new WeakMap(), Yt = new WeakMap(), h(Pe, "RowManager");
614
- let be = Pe;
615
- const Ut = class Ut {
613
+ P = new WeakMap(), E = new WeakMap(), et = new WeakMap(), O = new WeakMap(), N = new WeakMap(), V = new WeakMap(), st = new WeakMap(), Rt = new WeakMap(), ke = new WeakMap(), Me = new WeakMap(), Pt = new WeakMap(), Ft = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), Ct = new WeakMap(), Yt = new WeakMap(), jt = new WeakMap(), Tt = new WeakMap(), Le = new WeakMap(), dt = new WeakMap(), kt = new WeakMap(), Vt = new WeakMap(), h(Oe, "RowManager");
614
+ let be = Oe;
615
+ const Xt = class Xt {
616
616
  /**
617
617
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
618
618
  */
619
619
  static compileAll(n) {
620
- return Array.isArray(n) ? n.map((e) => Ut.compile(e)) : [];
620
+ return Array.isArray(n) ? n.map((e) => Xt.compile(e)) : [];
621
621
  }
622
622
  /**
623
623
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
@@ -629,9 +629,9 @@ const Ut = class Ut {
629
629
  const f = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
631
  let g = `cell-${f}`;
632
- const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
- let A = [];
634
- b && A.push(`data-bind="${b}"`), u && A.push(`data-expr="${u}"`), m && A.push(`maxbyte="${m}"`), v && A.push(`type="${v}"`), l.innerHTML = `<${g} ${A.join(" ")}></${g}>`;
632
+ const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
+ let S = [];
634
+ b && S.push(`data-bind="${b}"`), u && S.push(`data-expr="${u}"`), y && S.push(`maxbyte="${y}"`), v && S.push(`type="${v}"`), l.innerHTML = `<${g} ${S.join(" ")}></${g}>`;
635
635
  });
636
636
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
637
637
  if (!a.querySelector("colgroup")) {
@@ -647,136 +647,191 @@ const Ut = class Ut {
647
647
  l ? l.after(c) : a.prepend(c);
648
648
  }
649
649
  a.classList.add("nine-table-element");
650
- }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
650
+ }, "ensureTableStructure"), o = /* @__PURE__ */ h((a, c) => {
651
651
  const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), g = l.length;
652
652
  if (g === 0 || f.length === 0) return;
653
653
  let b = 0;
654
- f.forEach((m) => {
655
- b += m.colSpan || 1;
654
+ f.forEach((y) => {
655
+ b += y.colSpan || 1;
656
656
  });
657
657
  const u = Array.from(Array(g), () => Array(b).fill(null));
658
- l.forEach((m) => {
659
- const v = m.sectionRowIndex;
660
- let A = 0;
661
- Array.from(m.querySelectorAll("th,td")).forEach((x) => {
662
- for (let W = 0; W < u[v].length; W++)
663
- if (u[v][W] === null) {
664
- A = W;
658
+ l.forEach((y) => {
659
+ const v = y.sectionRowIndex;
660
+ let S = 0;
661
+ Array.from(y.querySelectorAll("th,td")).forEach((m) => {
662
+ for (let _ = 0; _ < u[v].length; _++)
663
+ if (u[v][_] === null) {
664
+ S = _;
665
665
  break;
666
666
  }
667
- const M = x.rowSpan || 1, q = x.colSpan || 1;
668
- for (let W = 0; W < M; W++)
669
- for (let F = 0; F < q; F++)
670
- v + W < g && A + F < b && (u[v + W][A + F] = W === 0 && F === 0 ? "1" : "0");
667
+ const I = m.rowSpan || 1, C = m.colSpan || 1;
668
+ for (let _ = 0; _ < I; _++)
669
+ for (let Y = 0; Y < C; Y++)
670
+ v + _ < g && S + Y < b && (u[v + _][S + Y] = _ === 0 && Y === 0 ? "1" : "0");
671
671
  });
672
- }), l.forEach((m) => {
673
- const v = m.sectionRowIndex;
674
- Array.from(m.querySelectorAll("th,td")).forEach((A) => {
675
- for (let x = 0; x < u[v].length; x++)
676
- if (u[v][x] === "1") {
677
- A.dataset.col = x, u[v][x] = "0";
672
+ }), l.forEach((y) => {
673
+ const v = y.sectionRowIndex;
674
+ Array.from(y.querySelectorAll("th,td")).forEach((S) => {
675
+ for (let m = 0; m < u[v].length; m++)
676
+ if (u[v][m] === "1") {
677
+ S.dataset.col = m, u[v][m] = "0";
678
678
  break;
679
679
  }
680
680
  });
681
681
  });
682
- }, "resetColIndex"), o = n.cloneNode(!0);
683
- return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
682
+ }, "resetColIndex"), r = n.cloneNode(!0);
683
+ return s(r), e(r), o(r, "thead"), o(r, "tbody"), o(r, "tfoot"), Array.from(r.querySelectorAll("colgroup col")).forEach((a, c) => {
684
684
  const l = a.getAttribute("fixed");
685
- l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
685
+ l && r.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
686
686
  f.setAttribute("fixed", l);
687
687
  });
688
- }), o;
688
+ }), r;
689
689
  }
690
690
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
691
691
  };
692
- h(Ut, "TableCompiler");
693
- let pe = Ut;
694
- var Y, Ct, mt, rs, is;
695
- const De = class De {
692
+ h(Xt, "TableCompiler");
693
+ let pe = Xt;
694
+ var F, nt, xt, rs, is;
695
+ const Pe = class Pe {
696
696
  constructor(n) {
697
- d(this, mt);
698
- d(this, Y);
699
- d(this, Ct, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
- // 3. 뷰 렌더링 (9분할 전체를 순회하며 경계선 클래스 부여)
701
- E(this, "render", /* @__PURE__ */ h(() => {
702
- const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, Ct), o = t(this, Y).querySelectorAll(".ng-container-top td, .ng-container-top th");
703
- o.forEach((i) => {
704
- i.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
705
- }), !(n < 0 || e < 0) && o.forEach((i) => {
706
- const a = i.closest("tr");
707
- if (!a || a.classList.contains("nodata")) return;
708
- const c = parseInt(a.dataset.row, 10), l = parseInt(i.dataset.col, 10);
709
- if (isNaN(c) || isNaN(l)) return;
710
- const f = parseInt(i.rowSpan || 1, 10), g = parseInt(i.colSpan || 1, 10), b = c + f - 1, u = l + g - 1;
711
- c <= s && b >= n && l <= r && u >= e && (i.classList.add("selected"), c === n && i.classList.add("selected-top"), b === s && i.classList.add("selected-bottom"), l === e && i.classList.add("selected-left"), u === r && i.classList.add("selected-right"));
712
- });
697
+ d(this, xt);
698
+ d(this, F);
699
+ d(this, nt, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
+ A(this, "render", /* @__PURE__ */ h(() => {
701
+ const { startRow: n, startCol: e, endRow: s, endCol: o } = t(this, nt);
702
+ w.log("🎨 [CellSelection.render] Rendering range ->", t(this, nt));
703
+ const r = t(this, F).querySelectorAll(
704
+ ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
705
+ );
706
+ if (r.forEach((a) => {
707
+ a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
708
+ c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
709
+ });
710
+ }), n < 0 || e < 0) {
711
+ w.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
712
+ return;
713
+ }
714
+ let i = 0;
715
+ r.forEach((a, c) => {
716
+ a.querySelectorAll("tbody tr").forEach((l) => {
717
+ if (l.classList.contains("nodata")) return;
718
+ const f = parseInt(l.dataset.row, 10);
719
+ isNaN(f) || l.querySelectorAll("td, th").forEach((g) => {
720
+ const b = parseInt(g.dataset.col, 10);
721
+ if (isNaN(b)) return;
722
+ const u = parseInt(g.rowSpan || 1, 10), y = parseInt(g.colSpan || 1, 10), v = f + u - 1, S = b + y - 1;
723
+ f <= s && v >= n && b <= o && S >= e && (i++, g.classList.add("selected"), f === n && g.classList.add("selected-top"), v === s && g.classList.add("selected-bottom"), b === e && g.classList.add("selected-left"), S === o && g.classList.add("selected-right"));
724
+ });
725
+ });
726
+ }), w.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
713
727
  }, "render"));
714
- p(this, Y, n), de(this, mt, is).call(this);
728
+ p(this, F, n), de(this, xt, is).call(this), w.log("🎯 [CellSelection] Initialized");
715
729
  }
716
- setRange(n, e, s, r) {
717
- let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
718
- const l = de(this, mt, rs).call(this, o, a, i, c);
719
- p(this, Ct, l), this.render();
730
+ setRange(n, e, s, o) {
731
+ w.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${o}`);
732
+ let r = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, o), c = Math.max(e, o);
733
+ const l = de(this, xt, rs).call(this, r, a, i, c);
734
+ p(this, nt, l), w.log("📦 [CellSelection.setRange] Expanded Range ->", t(this, nt)), this.render();
720
735
  }
721
736
  };
722
- Y = new WeakMap(), Ct = new WeakMap(), mt = new WeakSet(), // 머지된 셀이 선택 영역에 걸쳐있으면 범위를 자동으로 넓혀주는 보정기
723
- rs = /* @__PURE__ */ h(function(n, e, s, r) {
724
- let o = n, i = e, a = s, c = r, l = !0;
725
- const f = t(this, Y).querySelectorAll(
737
+ F = new WeakMap(), nt = new WeakMap(), xt = new WeakSet(), rs = /* @__PURE__ */ h(function(n, e, s, o) {
738
+ let r = n, i = e, a = s, c = o, l = !0, f = 0;
739
+ const g = t(this, F).querySelectorAll(
726
740
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
727
741
  );
728
- for (; l; )
729
- l = !1, f.forEach((g) => {
730
- g.querySelectorAll("tbody tr").forEach((b) => {
731
- const u = parseInt(b.dataset.row, 10);
732
- isNaN(u) || b.querySelectorAll("td, th").forEach((m) => {
733
- const v = parseInt(m.dataset.col, 10);
734
- if (isNaN(v)) return;
735
- const A = parseInt(m.rowSpan || 1, 10), x = parseInt(m.colSpan || 1, 10), M = u + A - 1, q = v + x - 1;
736
- if (u <= a && M >= o && v <= c && q >= i) {
737
- const F = Math.min(o, u), Je = Math.max(a, M), Qe = Math.min(i, v), ts = Math.max(c, q);
738
- (F !== o || Je !== a || Qe !== i || ts !== c) && (o = F, a = Je, i = Qe, c = ts, l = !0);
742
+ for (; l && f < 10; )
743
+ l = !1, f++, g.forEach((b, u) => {
744
+ b.querySelectorAll("tbody tr").forEach((y) => {
745
+ const v = parseInt(y.dataset.row, 10);
746
+ isNaN(v) || y.querySelectorAll("td, th").forEach((S) => {
747
+ const m = parseInt(S.dataset.col, 10);
748
+ if (isNaN(m)) return;
749
+ const I = parseInt(S.rowSpan || 1, 10), C = parseInt(S.colSpan || 1, 10), _ = v + I - 1, Y = m + C - 1;
750
+ if (v <= a && _ >= r && m <= c && Y >= i) {
751
+ const Je = Math.min(r, v), Qe = Math.max(a, _), ts = Math.min(i, m), es = Math.max(c, Y);
752
+ (Je !== r || Qe !== a || ts !== i || es !== c) && (r = Je, a = Qe, i = ts, c = es, l = !0);
739
753
  }
740
754
  });
741
755
  });
742
756
  });
743
- return { startRow: o, startCol: i, endRow: a, endCol: c };
744
- }, "#expandRangeByMerge"), is = /* @__PURE__ */ h(function() {
745
- const n = t(this, Y).querySelector(".ng-container-top");
746
- n && n.addEventListener("mousedown", (e) => {
757
+ return { startRow: r, startCol: i, endRow: a, endCol: c };
758
+ }, "#expandRangeByMerge"), // CellSelection.js 내부의 #initEvents 메서드 수정
759
+ is = /* @__PURE__ */ h(function() {
760
+ const n = t(this, F).querySelector(".ng-container-top");
761
+ if (!n) {
762
+ w.log("❌ [CellSelection] .ng-container-top not found!");
763
+ return;
764
+ }
765
+ n.addEventListener("mousedown", (e) => {
747
766
  if (e.button !== 0) return;
748
767
  const s = e.target.closest("td, th");
749
- if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
750
- const r = parseInt(s.dataset.row, 10), o = parseInt(s.dataset.col, 10);
751
- this.setRange(r, o, r, o);
768
+ if (!s) {
769
+ w.log("🖱️ [MouseDown] Target is not td or th:", e.target);
770
+ return;
771
+ }
772
+ if (s.dataset.row === void 0 || s.dataset.col === void 0) {
773
+ w.log("🖱️ [MouseDown] Cell missing dataset.row or dataset.col:", s);
774
+ return;
775
+ }
776
+ if (s.closest("tr").classList.contains("nodata")) {
777
+ w.log("🖱️ [MouseDown] Clicked on .nodata row");
778
+ return;
779
+ }
780
+ const o = parseInt(s.dataset.row, 10), r = parseInt(s.dataset.col, 10);
781
+ w.log(`🖱️ [MouseDown Success] startRow: ${o}, startCol: ${r}`), this.setRange(o, r, o, r);
752
782
  const i = /* @__PURE__ */ h((c) => {
753
- const l = document.elementFromPoint(c.clientX, c.clientY), f = l == null ? void 0 : l.closest("td, th");
754
- if (!f || !t(this, Y).contains(f) || f.dataset.row === void 0 || f.dataset.col === void 0 || f.closest("tr").classList.contains("nodata")) return;
783
+ w.log(`🏃 [MouseMove Event] clientX: ${c.clientX}, clientY: ${c.clientY}`);
784
+ const l = document.elementFromPoint(c.clientX, c.clientY);
785
+ let f = l == null ? void 0 : l.closest("td, th");
786
+ if (f ? w.log("🎯 [MouseMove] elementFromPoint found cell:", { row: f.dataset.row, col: f.dataset.col }) : w.log("🔍 [MouseMove] elementFromPoint failed to find td/th. Element found:", l), !f || !t(this, F).contains(f)) {
787
+ w.log("⚠️ [MouseMove] Fallback to bounding rect check...");
788
+ const u = t(this, F).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
789
+ for (const y of u) {
790
+ const v = y.getBoundingClientRect();
791
+ if (c.clientX >= v.left && c.clientX <= v.right && c.clientY >= v.top && c.clientY <= v.bottom) {
792
+ f = y;
793
+ break;
794
+ }
795
+ }
796
+ w.log(`🔍 [MouseMove Fallback Result] Matched cell found: ${!!f}, total checked cells: ${u.length}`);
797
+ }
798
+ if (!f) {
799
+ w.log("❌ [MouseMove] Target cell is still null after fallback.");
800
+ return;
801
+ }
802
+ if (f.dataset.row === void 0 || f.dataset.col === void 0) {
803
+ w.log("❌ [MouseMove] Target cell missing dataset.row or dataset.col", f);
804
+ return;
805
+ }
806
+ if (f.closest("tr").classList.contains("nodata")) {
807
+ w.log("🏃 [MouseMove] Target cell is in .nodata row");
808
+ return;
809
+ }
755
810
  const g = parseInt(f.dataset.row, 10), b = parseInt(f.dataset.col, 10);
756
- this.setRange(r, o, g, b);
811
+ w.log(`🏃 [MouseMove Dragging Success] endRow: ${g}, endCol: ${b}`), this.setRange(o, r, g, b);
757
812
  }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
758
- document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a);
813
+ w.log("🖱️ [MouseUp] Drag ended."), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a);
759
814
  }, "onMouseUp");
760
815
  document.addEventListener("mousemove", i), document.addEventListener("mouseup", a);
761
816
  });
762
- }, "#initEvents"), h(De, "CellSelection");
763
- let ye = De;
764
- var Xt, nt, rt, Lt, Kt, Zt, dt, Gt, Jt;
765
- const xt = class xt extends HTMLElement {
817
+ }, "#initEvents"), h(Pe, "CellSelection");
818
+ let ye = Pe;
819
+ var Ut, ot, rt, Mt, Kt, Zt, ft, Gt, Jt;
820
+ const vt = class vt extends HTMLElement {
766
821
  constructor() {
767
822
  super();
768
- d(this, Xt);
769
- d(this, nt, null);
823
+ d(this, Ut);
824
+ d(this, ot, null);
770
825
  d(this, rt);
771
- d(this, Lt);
772
- E(this, "invalidate", /* @__PURE__ */ h(() => {
773
- T.log("sheet.invalidate()"), t(this, rt).refresh();
826
+ d(this, Mt);
827
+ A(this, "invalidate", /* @__PURE__ */ h(() => {
828
+ w.log("sheet.invalidate()"), t(this, rt).refresh();
774
829
  }, "invalidate"));
775
- E(this, "generate", /* @__PURE__ */ h((e) => {
776
- if (T.log("sheet.generate()"), !e) return;
777
- p(this, nt, pe.compile(e)), t(this, Kt).call(this), t(this, Zt).call(this);
778
- const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
779
- s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, rt).initialize(), setTimeout(() => {
830
+ A(this, "generate", /* @__PURE__ */ h((e) => {
831
+ if (w.log("sheet.generate()"), !e) return;
832
+ p(this, ot, pe.compile(e)), t(this, Kt).call(this), t(this, Zt).call(this);
833
+ const s = this.querySelector(".ng-container-body .ng-part-header"), o = this.querySelector(".ng-container-body .ng-part-footer"), r = this.querySelector(".ng-nodata-overlay");
834
+ s && r && (r.style.top = `${s.offsetHeight}px`), o && r && (r.style.bottom = `${o.offsetHeight}px`), t(this, rt).initialize(), setTimeout(() => {
780
835
  var i;
781
836
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
782
837
  }, 0);
@@ -786,52 +841,52 @@ const xt = class xt extends HTMLElement {
786
841
  { selector: ".ng-container-body", type: null },
787
842
  { selector: ".ng-container-left", type: "left" },
788
843
  { selector: ".ng-container-right", type: "right" }
789
- ].forEach(({ selector: s, type: r }) => {
790
- var o, i, a;
791
- (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, dt).call(this, t(this, nt), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, dt).call(this, t(this, nt), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, dt).call(this, t(this, nt), r, "footer"));
844
+ ].forEach(({ selector: s, type: o }) => {
845
+ var r, i, a;
846
+ (r = this.querySelector(`${s} .ng-part-header`)) == null || r.appendChild(t(this, ft).call(this, t(this, ot), o, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, ft).call(this, t(this, ot), o, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ft).call(this, t(this, ot), o, "footer"));
792
847
  });
793
848
  }, "#renderSplitContainers"));
794
849
  d(this, Zt, /* @__PURE__ */ h(() => {
795
850
  ["left", "right", "body"].forEach((e) => {
796
- const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
797
- if (!s || !r || r.length === 0) return;
798
- let o = 0;
799
- r[0].querySelectorAll("col").forEach((i) => {
851
+ const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelectorAll("table");
852
+ if (!s || !o || o.length === 0) return;
853
+ let r = 0;
854
+ o[0].querySelectorAll("col").forEach((i) => {
800
855
  const a = parseInt(i.getAttribute("width"), 10);
801
- isNaN(o) || (o += a);
802
- }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`);
856
+ isNaN(r) || (r += a);
857
+ }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`);
803
858
  });
804
859
  }, "#updateContainerWidths"));
805
- d(this, dt, /* @__PURE__ */ h((e, s, r) => {
806
- const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
807
- if (r === "header") {
860
+ d(this, ft, /* @__PURE__ */ h((e, s, o) => {
861
+ const r = e.cloneNode(!0), i = r.querySelector("thead"), a = r.querySelector("tbody"), c = r.querySelector("tfoot");
862
+ if (o === "header") {
808
863
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
809
864
  const f = document.createElement("tbody");
810
- f.className = "fixed-tbody", o.appendChild(f);
865
+ f.className = "fixed-tbody", r.appendChild(f);
811
866
  }
812
- } else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
813
- return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
867
+ } else o === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : o === "footer" && (i && i.remove(), a && a.remove());
868
+ return s === "left" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
814
869
  l.getAttribute("fixed") !== "left" && l.remove();
815
- }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
870
+ }) : s === "right" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
816
871
  l.getAttribute("fixed") !== "right" && l.remove();
817
- }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
872
+ }) : r.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
818
873
  l.remove();
819
- }), o;
874
+ }), r;
820
875
  }, "#createSplitTable"));
821
- E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, rt).getRowHeight(), "getRowHeight"));
822
- E(this, "scrollToX", /* @__PURE__ */ h((e) => {
876
+ A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, rt).getRowHeight(), "getRowHeight"));
877
+ A(this, "scrollToX", /* @__PURE__ */ h((e) => {
823
878
  const s = this.querySelector(".ng-container-body .ng-part-body");
824
879
  s && (s.scrollLeft = e);
825
880
  }, "scrollToX"));
826
- E(this, "scrollToY", /* @__PURE__ */ h((e) => {
881
+ A(this, "scrollToY", /* @__PURE__ */ h((e) => {
827
882
  const s = this.querySelector(".ng-container-body .ng-part-body");
828
883
  s && (s.scrollTop = e);
829
884
  }, "scrollToY"));
830
885
  d(this, Gt, /* @__PURE__ */ h(() => {
831
- t(this, Jt).call(this), p(this, Lt, new ye(this));
886
+ t(this, Jt).call(this), p(this, Mt, new ye(this));
832
887
  }, "#init"));
833
888
  d(this, Jt, /* @__PURE__ */ h(() => {
834
- const e = xt.SCROLLBAR_SIZE;
889
+ const e = vt.SCROLLBAR_SIZE;
835
890
  this.innerHTML = `
836
891
  <style>
837
892
  nine-table-sheet {
@@ -1031,22 +1086,22 @@ const xt = class xt extends HTMLElement {
1031
1086
  </div>
1032
1087
  `;
1033
1088
  }, "#render"));
1034
- p(this, rt, new be(this)), p(this, Xt, this.getRootNode().host);
1089
+ p(this, rt, new be(this)), p(this, Ut, this.getRootNode().host);
1035
1090
  }
1036
1091
  connectedCallback() {
1037
1092
  t(this, Gt).call(this);
1038
1093
  }
1039
1094
  get selection() {
1040
- return t(this, Lt);
1095
+ return t(this, Mt);
1041
1096
  }
1042
1097
  disconnectedCallback() {
1043
- this.innerHTML = "", T.log("NineTableSheet destroyed.");
1098
+ this.innerHTML = "", w.log("NineTableSheet destroyed.");
1044
1099
  }
1045
1100
  };
1046
- Xt = new WeakMap(), nt = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), dt = new WeakMap(), Gt = new WeakMap(), Jt = new WeakMap(), h(xt, "NineTableSheet"), E(xt, "SCROLLBAR_SIZE", 16);
1047
- let Wt = xt;
1048
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Wt);
1049
- var Qt, Ht;
1101
+ Ut = new WeakMap(), ot = new WeakMap(), rt = new WeakMap(), Mt = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), ft = new WeakMap(), Gt = new WeakMap(), Jt = new WeakMap(), h(vt, "NineTableSheet"), A(vt, "SCROLLBAR_SIZE", 16);
1102
+ let Dt = vt;
1103
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Dt);
1104
+ var Qt, Lt;
1050
1105
  const Fe = class Fe extends HTMLElement {
1051
1106
  constructor() {
1052
1107
  super();
@@ -1054,20 +1109,20 @@ const Fe = class Fe extends HTMLElement {
1054
1109
  var e;
1055
1110
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1056
1111
  var i;
1057
- const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1058
- t(this, Ht).call(this, o, r);
1059
- }), t(this, Ht).call(this, 0, !1);
1112
+ const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1113
+ t(this, Lt).call(this, r, o);
1114
+ }), t(this, Lt).call(this, 0, !1);
1060
1115
  }, "#init"));
1061
- d(this, Ht, /* @__PURE__ */ h((e, s = !1) => {
1062
- const r = /* @__PURE__ */ h(() => {
1116
+ d(this, Lt, /* @__PURE__ */ h((e, s = !1) => {
1117
+ const o = /* @__PURE__ */ h(() => {
1063
1118
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1064
1119
  Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
1065
1120
  const b = f.filter((u) => u.classList.contains("active"));
1066
1121
  b.length < 2 || b.forEach((u) => {
1067
- const m = parseInt(u.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), A = f[m + 1];
1068
- v && A && A.classList.contains("active") && v.style.setProperty("display", "flex");
1122
+ const y = parseInt(u.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${y}"]`), S = f[y + 1];
1123
+ v && S && S.classList.contains("active") && v.style.setProperty("display", "flex");
1069
1124
  });
1070
- }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1125
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = r.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1071
1126
  if (!a[e]) return;
1072
1127
  if (!s)
1073
1128
  a.forEach((f, g) => {
@@ -1077,7 +1132,7 @@ const Fe = class Fe extends HTMLElement {
1077
1132
  f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
1078
1133
  });
1079
1134
  else {
1080
- const f = a[e], g = o.querySelectorAll(".nine-tab-item.active");
1135
+ const f = a[e], g = r.querySelectorAll(".nine-tab-item.active");
1081
1136
  if (f.classList.contains("active") && g.length <= 1)
1082
1137
  return;
1083
1138
  f.classList.toggle("active");
@@ -1087,39 +1142,39 @@ const Fe = class Fe extends HTMLElement {
1087
1142
  const l = i.querySelectorAll("nine-table-sheet.active");
1088
1143
  l == null || l.forEach((f) => {
1089
1144
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1090
- }), r();
1145
+ }), o();
1091
1146
  }, "#switchSheet"));
1092
1147
  }
1093
1148
  connectedCallback() {
1094
1149
  t(this, Qt).call(this);
1095
1150
  }
1096
1151
  };
1097
- Qt = new WeakMap(), Ht = new WeakMap(), h(Fe, "NineTableSheets");
1152
+ Qt = new WeakMap(), Lt = new WeakMap(), h(Fe, "NineTableSheets");
1098
1153
  let me = Fe;
1099
1154
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", me);
1100
- var I, te, Mt, ee;
1101
- const je = class je {
1155
+ var H, te, $t, ee;
1156
+ const Ye = class Ye {
1102
1157
  constructor(n) {
1103
- d(this, I);
1158
+ d(this, H);
1104
1159
  d(this, te, /* @__PURE__ */ h(() => {
1105
1160
  t(this, ee).call(this), new ResizeObserver((n) => {
1106
1161
  for (let e of n)
1107
- t(this, I).getAttribute("auto-height") === "true" && t(this, Mt).call(this);
1108
- }).observe(t(this, I));
1162
+ t(this, H).getAttribute("auto-height") === "true" && t(this, $t).call(this);
1163
+ }).observe(t(this, H));
1109
1164
  }, "#init"));
1110
- d(this, Mt, /* @__PURE__ */ h(() => {
1165
+ d(this, $t, /* @__PURE__ */ h(() => {
1111
1166
  var c, l;
1112
- const n = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1167
+ const n = Array.from(t(this, H).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1113
1168
  if (n.length === 0) return;
1114
- const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Wt.SCROLLBAR_SIZE, a = e * s + r + o + i;
1115
- t(this, I).style.height = `${a}px`;
1169
+ const e = parseInt(t(this, H).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), o = (c = t(this, H).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (l = t(this, H).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Dt.SCROLLBAR_SIZE, a = e * s + o + r + i;
1170
+ t(this, H).style.height = `${a}px`;
1116
1171
  }, "#applyAutoHeight"));
1117
1172
  d(this, ee, /* @__PURE__ */ h(() => {
1118
- const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1119
- 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>` : "";
1173
+ const e = Array.from(t(this, H).children).filter((c) => c.tagName === "TABLE"), s = t(this, H).getAttribute("auto-height") === "true", o = e.length, r = e.map((c, l) => {
1174
+ const g = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < o - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1120
1175
  return g + b;
1121
1176
  }).join(""), i = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1122
- t(this, I).shadowRoot.innerHTML = `
1177
+ t(this, H).shadowRoot.innerHTML = `
1123
1178
  <style>
1124
1179
  :host {
1125
1180
  display: flex;
@@ -1230,7 +1285,7 @@ const je = class je {
1230
1285
  <nine-table-body>
1231
1286
  <nine-table-summary></nine-table-summary>
1232
1287
  <nine-table-sheets>
1233
- <nine-table-sheets-body>${o}</nine-table-sheets-body>
1288
+ <nine-table-sheets-body>${r}</nine-table-sheets-body>
1234
1289
  <nine-table-sheets-footer>
1235
1290
  <div class="nine-tab-bar">${i}</div>
1236
1291
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
@@ -1239,240 +1294,240 @@ const je = class je {
1239
1294
  <nine-table-analysis></nine-table-analysis>
1240
1295
  </nine-table-body>
1241
1296
  <nine-table-footer></nine-table-footer>
1242
- `, t(this, I).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1243
- const a = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
1297
+ `, t(this, H).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1298
+ const a = t(this, H).shadowRoot.querySelectorAll("nine-table-sheet");
1244
1299
  a == null || a.forEach((c, l) => {
1245
1300
  e[l] && setTimeout(() => {
1246
- c.generate(e[l]), s && t(this, Mt).call(this);
1301
+ c.generate(e[l]), s && t(this, $t).call(this);
1247
1302
  });
1248
1303
  });
1249
1304
  }, "#render"));
1250
- p(this, I, n), t(this, te).call(this);
1305
+ p(this, H, n), t(this, te).call(this);
1251
1306
  }
1252
1307
  };
1253
- I = new WeakMap(), te = new WeakMap(), Mt = new WeakMap(), ee = new WeakMap(), h(je, "LayoutManager");
1254
- let xe = je;
1255
- var It, ft;
1256
- const Ve = class Ve {
1308
+ H = new WeakMap(), te = new WeakMap(), $t = new WeakMap(), ee = new WeakMap(), h(Ye, "LayoutManager");
1309
+ let xe = Ye;
1310
+ var Ht, gt;
1311
+ const je = class je {
1257
1312
  constructor(n) {
1258
- d(this, It);
1259
- d(this, ft, -1);
1260
- E(this, "count", /* @__PURE__ */ h(() => t(this, It).rawRecords.length, "count"));
1261
- p(this, It, n);
1313
+ d(this, Ht);
1314
+ d(this, gt, -1);
1315
+ A(this, "count", /* @__PURE__ */ h(() => t(this, Ht).rawRecords.length, "count"));
1316
+ p(this, Ht, n);
1262
1317
  }
1263
1318
  get at() {
1264
- return t(this, ft);
1319
+ return t(this, gt);
1265
1320
  }
1266
1321
  set at(n) {
1267
- p(this, ft, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ft)}"]`) && setTimeout(() => {
1322
+ p(this, gt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, gt)}"]`) && setTimeout(() => {
1268
1323
  });
1269
1324
  }
1270
1325
  };
1271
- It = new WeakMap(), ft = new WeakMap(), h(Ve, "ngRow");
1272
- let ve = Ve;
1273
- var N, C, z, ut, se, U, ne, it, $t, re, ie, gt;
1274
- const O = class O {
1326
+ Ht = new WeakMap(), gt = new WeakMap(), h(je, "ngRow");
1327
+ let ve = je;
1328
+ var z, k, D, ut, se, X, ne, it, It, oe, re, bt;
1329
+ const W = class W {
1275
1330
  constructor(n, e) {
1276
- d(this, N);
1277
- d(this, C);
1278
- d(this, z, []);
1331
+ d(this, z);
1332
+ d(this, k);
1333
+ d(this, D, []);
1279
1334
  d(this, ut, []);
1280
1335
  d(this, se, 0);
1281
- d(this, U, []);
1336
+ d(this, X, []);
1282
1337
  d(this, ne, /* @__PURE__ */ h(() => {
1283
- p(this, U, []);
1284
- const n = t(this, N).template || [];
1338
+ p(this, X, []);
1339
+ const n = t(this, z).template || [];
1285
1340
  Array.from(n).forEach((e) => {
1286
1341
  var s;
1287
- t(this, U).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1288
- }), (t(this, C).rawRecords || []).forEach((e) => {
1289
- e.__ng || (e.__ng = t(this, $t).call(this)), e.__ng.height = t(this, U).slice();
1342
+ t(this, X).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1343
+ }), (t(this, k).rawRecords || []).forEach((e) => {
1344
+ e.__ng || (e.__ng = t(this, It).call(this)), e.__ng.height = t(this, X).slice();
1290
1345
  });
1291
1346
  }, "#initialize"));
1292
1347
  d(this, it, /* @__PURE__ */ h(() => {
1293
- const n = t(this, N).shadowRoot.querySelector("nine-table-sheets");
1294
- n == null || n.classList.toggle("nodata", this.length === 0), t(this, N).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1348
+ const n = t(this, z).shadowRoot.querySelector("nine-table-sheets");
1349
+ n == null || n.classList.toggle("nodata", this.length === 0), t(this, z).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1295
1350
  e.invalidate();
1296
1351
  });
1297
1352
  }, "#invalidate"));
1298
- E(this, "get", /* @__PURE__ */ h((n, e) => {
1299
- var o;
1353
+ A(this, "get", /* @__PURE__ */ h((n, e) => {
1354
+ var r;
1300
1355
  const s = this.getValidData();
1301
1356
  if (!s || s.length <= 0) return;
1302
- if (n == null) return t(this, gt).call(this, s);
1357
+ if (n == null) return t(this, bt).call(this, s);
1303
1358
  if (n < 0 || n >= s.length) return null;
1304
- const r = typeof ((o = t(this, N).fields) == null ? void 0 : o.get) == "function" ? t(this, N).fields.get() : [];
1359
+ const o = typeof ((r = t(this, z).fields) == null ? void 0 : r.get) == "function" ? t(this, z).fields.get() : [];
1305
1360
  if (e != null) {
1306
- const i = r.indexOf(e);
1361
+ const i = o.indexOf(e);
1307
1362
  return i >= 0 ? s[n].v[i] : null;
1308
1363
  }
1309
- return t(this, gt).call(this, s[n]);
1364
+ return t(this, bt).call(this, s[n]);
1310
1365
  }, "get"));
1311
- E(this, "set", /* @__PURE__ */ h((n) => {
1366
+ A(this, "set", /* @__PURE__ */ h((n) => {
1312
1367
  this.clear(), this.add(n, !1), t(this, it).call(this);
1313
1368
  }, "set"));
1314
- d(this, $t, /* @__PURE__ */ h(() => ({
1315
- rowState: O.ROW_STATE.EMPTY,
1369
+ d(this, It, /* @__PURE__ */ h(() => ({
1370
+ rowState: W.ROW_STATE.EMPTY,
1316
1371
  deleted: !1,
1317
1372
  filtered: !1,
1318
- height: t(this, U).slice(),
1373
+ height: t(this, X).slice(),
1319
1374
  o: {},
1320
1375
  c: {},
1321
- _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, U).slice(), -1, {}, {}]
1376
+ _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, X).slice(), -1, {}, {}]
1322
1377
  }), "#getDefaultMeta"));
1323
- E(this, "reset", /* @__PURE__ */ h(() => {
1324
- p(this, z, []), p(this, ut, []), t(this, it).call(this);
1378
+ A(this, "reset", /* @__PURE__ */ h(() => {
1379
+ p(this, D, []), p(this, ut, []), t(this, it).call(this);
1325
1380
  }, "reset"));
1326
- E(this, "clear", /* @__PURE__ */ h(() => {
1381
+ A(this, "clear", /* @__PURE__ */ h(() => {
1327
1382
  var n;
1328
- t(this, C).rawRecords = [], p(this, z, []), p(this, ut, []), (n = t(this, C).viewRecords) != null && n.reset && t(this, C).viewRecords.reset();
1383
+ t(this, k).rawRecords = [], p(this, D, []), p(this, ut, []), (n = t(this, k).viewRecords) != null && n.reset && t(this, k).viewRecords.reset();
1329
1384
  }, "clear"));
1330
- d(this, re, /* @__PURE__ */ h((n) => {
1331
- var r;
1385
+ d(this, oe, /* @__PURE__ */ h((n) => {
1386
+ var o;
1332
1387
  Array.isArray(n) || (n = [n]);
1333
- const e = typeof ((r = t(this, N).fields) == null ? void 0 : r.get) == "function" ? t(this, N).fields.get() : Object.keys(n[0] || {}), s = [];
1334
- return n.forEach((o) => {
1388
+ const e = typeof ((o = t(this, z).fields) == null ? void 0 : o.get) == "function" ? t(this, z).fields.get() : Object.keys(n[0] || {}), s = [];
1389
+ return n.forEach((r) => {
1335
1390
  const i = { v: [] };
1336
1391
  e.forEach((a) => {
1337
- i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1392
+ i.v.push(r[a] !== void 0 && r[a] !== null ? r[a] : "");
1338
1393
  }), s.push(i);
1339
1394
  }), s;
1340
1395
  }, "#json2Array"));
1341
- d(this, ie, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1342
- e.__ng = t(this, $t).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1396
+ d(this, re, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1397
+ e.__ng = t(this, It).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1343
1398
  }), n), "#defaultInsert"));
1344
- E(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1399
+ A(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1345
1400
  n === void 0 && (n = {});
1346
- const s = t(this, re).call(this, n);
1347
- t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this, ie).call(this, s)), this.resetRecords();
1348
- const r = this.count() - 1;
1349
- return e || s.forEach((o, i) => {
1350
- const a = t(this, C).rawRecords[r - i];
1351
- a && (a.__ng.rowState = O.ROW_STATE.EMPTY);
1352
- }), t(this, it).call(this), r;
1401
+ const s = t(this, oe).call(this, n);
1402
+ t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, re).call(this, s)), this.resetRecords();
1403
+ const o = this.count() - 1;
1404
+ return e || s.forEach((r, i) => {
1405
+ const a = t(this, k).rawRecords[o - i];
1406
+ a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1407
+ }), t(this, it).call(this), o;
1353
1408
  }, "add"));
1354
- E(this, "delete", /* @__PURE__ */ h((n) => {
1409
+ A(this, "delete", /* @__PURE__ */ h((n) => {
1355
1410
  let e = [];
1356
- Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, C).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1357
- if (t(this, z)[s]) {
1358
- const r = t(this, z)[s].__ng.rowid;
1359
- t(this, z)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, C).rawRecords.forEach((o) => {
1360
- o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = O.ROW_STATE.DELETE);
1411
+ Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(n, 10)], e.sort((s, o) => o - s).forEach((s) => {
1412
+ if (t(this, D)[s]) {
1413
+ const o = t(this, D)[s].__ng.rowid;
1414
+ t(this, D)[s].__ng.rowState === W.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, k).rawRecords.forEach((r) => {
1415
+ r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = W.ROW_STATE.DELETE);
1361
1416
  });
1362
1417
  }
1363
1418
  }), this.resetRecords(), t(this, it).call(this);
1364
1419
  }, "delete"));
1365
- E(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1420
+ A(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1366
1421
  var c;
1367
1422
  n = parseInt(n, 10);
1368
- const o = (typeof ((c = t(this, N).fields) == null ? void 0 : c.get) == "function" ? t(this, N).fields.get() : []).indexOf(e);
1369
- if (o < 0) return;
1423
+ const r = (typeof ((c = t(this, z).fields) == null ? void 0 : c.get) == "function" ? t(this, z).fields.get() : []).indexOf(e);
1424
+ if (r < 0) return;
1370
1425
  const i = this.getValidData()[n];
1371
1426
  if (!i) return;
1372
- const a = i.v[o];
1373
- a !== s && i.__ng.rowState !== O.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = O.ROW_STATE.UPDATE), i.v[o] = s;
1427
+ const a = i.v[r];
1428
+ a !== s && i.__ng.rowState !== W.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = W.ROW_STATE.UPDATE), i.v[r] = s;
1374
1429
  }, "setValue"));
1375
- E(this, "resetRecords", /* @__PURE__ */ h(() => {
1376
- p(this, ut, t(this, C).rawRecords.filter((n) => !n.__ng.deleted)), p(this, z, t(this, C).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, C).rawRecords.forEach((n, e) => {
1430
+ A(this, "resetRecords", /* @__PURE__ */ h(() => {
1431
+ p(this, ut, t(this, k).rawRecords.filter((n) => !n.__ng.deleted)), p(this, D, t(this, k).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, k).rawRecords.forEach((n, e) => {
1377
1432
  n.__ng.rowidx = e;
1378
- }), t(this, z).forEach((n, e) => {
1433
+ }), t(this, D).forEach((n, e) => {
1379
1434
  n.__ng.i = e;
1380
1435
  });
1381
1436
  }, "resetRecords"));
1382
- E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, C).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1383
- d(this, gt, /* @__PURE__ */ h((n) => {
1437
+ A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, D).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, D)), "getValidData"));
1438
+ d(this, bt, /* @__PURE__ */ h((n) => {
1384
1439
  var i;
1385
1440
  if (!n) return n;
1386
- const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, N).fields) == null ? void 0 : i.get) == "function" ? t(this, N).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1441
+ const e = !Array.isArray(n), s = e ? [n] : n, o = typeof ((i = t(this, z).fields) == null ? void 0 : i.get) == "function" ? t(this, z).fields.get() : [], r = s.filter((a) => !a.__ng.deleted).map((a) => {
1387
1442
  const c = {};
1388
- return r.forEach((l, f) => {
1443
+ return o.forEach((l, f) => {
1389
1444
  c[l] = a.v ? a.v[f] : a[l];
1390
1445
  }), c.__ng = a.__ng, c;
1391
1446
  });
1392
- return e ? o[0] : o;
1447
+ return e ? r[0] : r;
1393
1448
  }, "#conv"));
1394
- E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1395
- p(this, N, n), p(this, C, e), t(this, ne).call(this);
1449
+ A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1450
+ p(this, z, n), p(this, k, e), t(this, ne).call(this);
1396
1451
  }
1397
1452
  get source() {
1398
- return t(this, gt).call(this, t(this, C).rawRecords);
1453
+ return t(this, bt).call(this, t(this, k).rawRecords);
1399
1454
  }
1400
1455
  set source(n) {
1401
1456
  this.clear(), this.add(n, !1);
1402
1457
  }
1403
1458
  get nextId() {
1404
- return ++ns(this, se)._;
1459
+ return ++os(this, se)._;
1405
1460
  }
1406
1461
  get count() {
1407
- return t(this, z).length;
1462
+ return t(this, D).length;
1408
1463
  }
1409
1464
  get length() {
1410
- return t(this, z).length;
1465
+ return t(this, D).length;
1411
1466
  }
1412
1467
  getRowCount() {
1413
1468
  return this.length;
1414
1469
  }
1415
1470
  };
1416
- N = new WeakMap(), C = new WeakMap(), z = new WeakMap(), ut = new WeakMap(), se = new WeakMap(), U = new WeakMap(), ne = new WeakMap(), it = new WeakMap(), $t = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), gt = new WeakMap(), h(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1417
- E(O, "ROW_STATE", {
1471
+ z = new WeakMap(), k = new WeakMap(), D = new WeakMap(), ut = new WeakMap(), se = new WeakMap(), X = new WeakMap(), ne = new WeakMap(), it = new WeakMap(), It = new WeakMap(), oe = new WeakMap(), re = new WeakMap(), bt = new WeakMap(), h(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1472
+ A(W, "ROW_STATE", {
1418
1473
  EMPTY: "EMPTY",
1419
1474
  NORMAL: "NORMAL",
1420
1475
  INSERT: "INSERT",
1421
1476
  UPDATE: "UPDATE",
1422
1477
  DELETE: "DELETE"
1423
1478
  });
1424
- let we = O;
1425
- var ot;
1426
- const Ye = class Ye {
1479
+ let we = W;
1480
+ var at;
1481
+ const Ve = class Ve {
1427
1482
  constructor(n) {
1428
- d(this, ot);
1429
- p(this, ot, n), this.row = new ve(this), this.data = new we(t(this, ot), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1483
+ d(this, at);
1484
+ p(this, at, n), this.row = new ve(this), this.data = new we(t(this, at), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1430
1485
  var e;
1431
- (e = t(this, ot).view) != null && e.redraw && t(this, ot).view.redraw();
1486
+ (e = t(this, at).view) != null && e.redraw && t(this, at).view.redraw();
1432
1487
  }, this.setDataSource = (e) => {
1433
1488
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1434
1489
  }, this.getRowState = (e) => {
1435
- var r, o;
1490
+ var o, r;
1436
1491
  const s = parseInt(e, 10);
1437
1492
  if (!(s >= this.data.count()))
1438
- return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1493
+ return (r = (o = this.data.getValidData()[s]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1439
1494
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1440
1495
  this.row.at = e;
1441
- }, 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) => {
1442
- e = parseInt(e, 10), this.data.setValue(e, s, r);
1496
+ }, 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, o) => {
1497
+ e = parseInt(e, 10), this.data.setValue(e, s, o);
1443
1498
  }, this.setDataSource([]);
1444
1499
  }
1445
1500
  };
1446
- ot = new WeakMap(), h(Ye, "ngDataManager");
1447
- let Se = Ye;
1448
- var bt, H, _t, oe;
1449
- const Ue = class Ue {
1501
+ at = new WeakMap(), h(Ve, "ngDataManager");
1502
+ let Se = Ve;
1503
+ var pt, L, _t, ie;
1504
+ const Xe = class Xe {
1450
1505
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1451
1506
  constructor(n) {
1452
- d(this, bt);
1453
- d(this, H, []);
1454
- E(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1507
+ d(this, pt);
1508
+ d(this, L, []);
1509
+ A(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1455
1510
  n.forEach((s) => {
1456
- t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1511
+ t(this, L).some((o) => o.name === s) || t(this, L).push({ name: s, type: e });
1457
1512
  }), t(this, _t).call(this);
1458
1513
  }, "add"));
1459
1514
  d(this, _t, /* @__PURE__ */ h(() => {
1460
1515
  const n = /* @__PURE__ */ new Map();
1461
- t(this, H).forEach((e) => {
1516
+ t(this, L).forEach((e) => {
1462
1517
  n.set(e.name, e.type);
1463
- }), p(this, H, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(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);
1518
+ }), p(this, L, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(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);
1464
1519
  }, "#adjust"));
1465
- d(this, oe, /* @__PURE__ */ h(() => {
1466
- p(this, H, []), T.log(t(this, bt).querySelectorAll("table"));
1467
- const n = Array.from(t(this, bt).querySelectorAll("table"));
1520
+ d(this, ie, /* @__PURE__ */ h(() => {
1521
+ p(this, L, []), w.log(t(this, pt).querySelectorAll("table"));
1522
+ const n = Array.from(t(this, pt).querySelectorAll("table"));
1468
1523
  if (!(!n || n.length === 0)) {
1469
1524
  for (const e of n)
1470
- T.log(e), $("[data-bind]", e).each((s, r) => {
1471
- const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1472
- o && t(this, H).push({ name: o, type: i });
1525
+ w.log(e), $("[data-bind]", e).each((s, o) => {
1526
+ const r = o.dataset.bind, i = o.getAttribute("data-type") || "string";
1527
+ r && t(this, L).push({ name: r, type: i });
1473
1528
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1474
- $(`[${s}]`, e).each((r, o) => {
1475
- var i = o.getAttribute(s);
1529
+ $(`[${s}]`, e).each((o, r) => {
1530
+ var i = r.getAttribute(s);
1476
1531
  if (i.indexOf("data.") < 0) {
1477
1532
  const a = i.search(/[(]/g);
1478
1533
  if (a > 0)
@@ -1486,7 +1541,7 @@ const Ue = class Ue {
1486
1541
  if (a.trim() != "") {
1487
1542
  const c = a.search(/[^_A-Za-z0-9]/g);
1488
1543
  let l = "";
1489
- c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1544
+ c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1490
1545
  }
1491
1546
  });
1492
1547
  });
@@ -1494,65 +1549,65 @@ const Ue = class Ue {
1494
1549
  t(this, _t).call(this);
1495
1550
  }
1496
1551
  }, "#init"));
1497
- p(this, bt, n), t(this, oe).call(this);
1552
+ p(this, pt, n), t(this, ie).call(this);
1498
1553
  }
1499
1554
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1500
1555
  get() {
1501
- return t(this, H).map((n) => n.name);
1556
+ return t(this, L).map((n) => n.name);
1502
1557
  }
1503
1558
  // 🎯 내부 객체 통째로 얻기
1504
1559
  getFields() {
1505
- return t(this, H);
1560
+ return t(this, L);
1506
1561
  }
1507
1562
  // 🎯 특정 필드의 데이터 타입 조회
1508
1563
  getType(n) {
1509
- const e = t(this, H).find((s) => s.name === n);
1564
+ const e = t(this, L).find((s) => s.name === n);
1510
1565
  return e ? e.type : "string";
1511
1566
  }
1512
1567
  indexOf(n) {
1513
- return t(this, H).findIndex((e) => e.name === n);
1568
+ return t(this, L).findIndex((e) => e.name === n);
1514
1569
  }
1515
1570
  includes(n) {
1516
- return t(this, H).some((e) => e.name === n);
1571
+ return t(this, L).some((e) => e.name === n);
1517
1572
  }
1518
1573
  };
1519
- bt = new WeakMap(), H = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(Ue, "ngFields");
1520
- let Ee = Ue;
1521
- var at, ae, le;
1522
- const Xe = class Xe extends HTMLElement {
1574
+ pt = new WeakMap(), L = new WeakMap(), _t = new WeakMap(), ie = new WeakMap(), h(Xe, "ngFields");
1575
+ let Ee = Xe;
1576
+ var lt, ae, le;
1577
+ const Ue = class Ue extends HTMLElement {
1523
1578
  constructor() {
1524
1579
  super();
1525
1580
  //#created = false;
1526
- d(this, at);
1581
+ d(this, lt);
1527
1582
  d(this, ae);
1528
1583
  d(this, le, /* @__PURE__ */ h(() => {
1529
- this.fields = new Ee(this), p(this, ae, new xe(this)), T.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1584
+ this.fields = new Ee(this), p(this, ae, new xe(this)), w.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1530
1585
  }, "#init"));
1531
- this.attachShadow({ mode: "open" }), p(this, at, new Se(this));
1586
+ this.attachShadow({ mode: "open" }), p(this, lt, new Se(this));
1532
1587
  }
1533
1588
  connectedCallback() {
1534
1589
  t(this, le).call(this);
1535
1590
  }
1536
1591
  disconnectedCallback() {
1537
- T.log("NineTable disconnected.");
1592
+ w.log("NineTable disconnected.");
1538
1593
  }
1539
1594
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1540
1595
  get data() {
1541
- return t(this, at).data;
1596
+ return t(this, lt).data;
1542
1597
  }
1543
1598
  // 🎯 행(row) 관련 제어 접근자 오픈
1544
1599
  get row() {
1545
- return t(this, at).row;
1600
+ return t(this, lt).row;
1546
1601
  }
1547
1602
  // 🎯 전체 데이터 매니저 접근 필요할 경우
1548
1603
  get dataManager() {
1549
- return t(this, at);
1604
+ return t(this, lt);
1550
1605
  }
1551
1606
  };
1552
- at = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Xe, "NineTable");
1553
- let Ae = Xe;
1554
- customElements.get("nine-table") || customElements.define("nine-table", Ae);
1555
- const vt = class vt extends HTMLElement {
1607
+ lt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Ue, "NineTable");
1608
+ let Re = Ue;
1609
+ customElements.get("nine-table") || customElements.define("nine-table", Re);
1610
+ const wt = class wt extends HTMLElement {
1556
1611
  // 👈 커스텀 스타일용 캐시 추가
1557
1612
  constructor() {
1558
1613
  super();
@@ -1563,74 +1618,74 @@ const vt = class vt extends HTMLElement {
1563
1618
  connectedCallback() {
1564
1619
  }
1565
1620
  };
1566
- h(vt, "BasicCellElement"), E(vt, "_styleCache", /* @__PURE__ */ new Map()), E(vt, "_customStyleCache", /* @__PURE__ */ new Map());
1567
- let Re = vt;
1568
- var L, Nt, y, Me, Ie, $e, _e, Ne;
1569
- const Ke = class Ke extends Re {
1621
+ h(wt, "BasicCellElement"), A(wt, "_styleCache", /* @__PURE__ */ new Map()), A(wt, "_customStyleCache", /* @__PURE__ */ new Map());
1622
+ let Ae = wt;
1623
+ var M, Nt, x, $e, He, Ie, _e, Ne;
1624
+ const Ke = class Ke extends Ae {
1570
1625
  constructor() {
1571
1626
  super();
1572
- d(this, L);
1627
+ d(this, M);
1573
1628
  d(this, Nt);
1574
- d(this, y);
1575
- d(this, Me);
1576
- d(this, Ie);
1629
+ d(this, x);
1577
1630
  d(this, $e);
1631
+ d(this, He);
1632
+ d(this, Ie);
1578
1633
  d(this, _e);
1579
- E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1580
- if (t(this, y))
1581
- if (t(this, y).closest("tbody")) {
1582
- const s = t(this, y).closest("tr").data, r = parseInt(t(this, y).dataset.row);
1634
+ A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1635
+ if (t(this, x))
1636
+ if (t(this, x).closest("tbody")) {
1637
+ const s = t(this, x).closest("tr").data, o = parseInt(t(this, x).dataset.row);
1583
1638
  if (!s) return "";
1584
- if (ninegrid.isNull(t(this, y).dataset.expr)) {
1585
- if (!ninegrid.isNull(t(this, y).dataset.bind))
1586
- return s[t(this, y).dataset.bind] || ninegrid.nvl(e, "");
1639
+ if (ninegrid.isNull(t(this, x).dataset.expr)) {
1640
+ if (!ninegrid.isNull(t(this, x).dataset.bind))
1641
+ return s[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1587
1642
  } else try {
1588
- return this.getExprValue(t(this, y).dataset.expr, s, r, t(this, y));
1643
+ return this.getExprValue(t(this, x).dataset.expr, s, o, t(this, x));
1589
1644
  } catch {
1590
- console.error(t(this, y).dataset.expr, s, t(this, y).dataset.row);
1645
+ console.error(t(this, x).dataset.expr, s, t(this, x).dataset.row);
1591
1646
  }
1592
1647
  return ninegrid.nvl(e, "");
1593
1648
  } else
1594
1649
  try {
1595
- return t(this, L).exprFunction(t(this, y).dataset.expr).call(this, null, -1, t(this, L).data);
1650
+ return t(this, M).exprFunction(t(this, x).dataset.expr).call(this, null, -1, t(this, M).data);
1596
1651
  } catch {
1597
1652
  }
1598
1653
  }, "getDisplayText"));
1599
1654
  d(this, Ne, /* @__PURE__ */ h(() => {
1600
- if (!(!t(this, L) || !t(this, L).template || !t(this, y).closest("tbody.bindable"))) {
1601
- var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
1655
+ if (!(!t(this, M) || !t(this, M).template || !t(this, x).closest("tbody.bindable"))) {
1656
+ var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
1602
1657
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1603
- var s = t(this, y).closest("tr"), r = [];
1604
- $("th,td", s).each((x, M) => {
1605
- var q = ninegrid.j.querySelectorAll(M).attr("suppress");
1606
- q && M.dataset.row && (q = parseInt(q), !isNaN(q) && q <= e && r.push(q));
1607
- }), r.sort();
1608
- var o = !1;
1609
- if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1610
- for (var i of r) {
1658
+ var s = t(this, x).closest("tr"), o = [];
1659
+ $("th,td", s).each((m, I) => {
1660
+ var C = ninegrid.j.querySelectorAll(I).attr("suppress");
1661
+ C && I.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && o.push(C));
1662
+ }), o.sort();
1663
+ var r = !1;
1664
+ if (parseInt(s.sectionRowIndex / t(this, M).template.length) > 0)
1665
+ for (var i of o) {
1611
1666
  if (i > e) break;
1612
- var a = parseInt(t(this, y).dataset.row), c = a - 1, l = t(this, y).closest("tr").data, f = t(this, L).data.get(c);
1613
- t(this, y).dataset.matrixRow;
1614
- var g = t(this, L).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, y).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];
1667
+ var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, f = t(this, M).data.get(c);
1668
+ t(this, x).dataset.matrixRow;
1669
+ var g = t(this, M).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, x).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];
1615
1670
  if (b != u) {
1616
- o = !0;
1671
+ r = !0;
1617
1672
  break;
1618
1673
  }
1619
1674
  }
1620
1675
  else
1621
- o = !0;
1622
- o ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, y)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, y)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, y)).addClass("hidden"));
1623
- var m = parseInt(t(this, y).dataset.matrixRow), v = m - 1, A = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, y).dataset.col}"][data-matrix-row="${v}"]`);
1624
- $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1676
+ r = !0;
1677
+ r ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, x)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, x)).hasClass("hidden") || (r ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, x)).addClass("hidden"));
1678
+ var y = parseInt(t(this, x).dataset.matrixRow), v = y - 1, S = t(this, M).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${v}"]`);
1679
+ $(S).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").addClass("last-suppress") : !$(S).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(S).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").removeClass("last-suppress");
1625
1680
  }
1626
1681
  }
1627
1682
  }, "#resetSuppress"));
1628
- E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1683
+ A(this, "getExprValue", /* @__PURE__ */ h((e, s, o, r) => {
1629
1684
  if (typeof e < "u")
1630
1685
  try {
1631
- r = parseInt(r);
1686
+ o = parseInt(o);
1632
1687
  const i = e.replace("()", "");
1633
- return t(this, L)[i] ? t(this, L)[i].call(this, s, r, t(this, y)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1688
+ return t(this, M)[i] ? t(this, M)[i].call(this, s, o, t(this, x)) : t(this, M).exprFunction(e).call(this, s, o, t(this, M).data);
1634
1689
  } catch {
1635
1690
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1636
1691
  }
@@ -1639,29 +1694,29 @@ const Ke = class Ke extends Re {
1639
1694
  }, "getExprValue"));
1640
1695
  }
1641
1696
  connectedCallback() {
1642
- super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, y, this.closest("th,td")), p(this, Nt, t(this, y).closest("tr"));
1697
+ super.connectedCallback(), p(this, M, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Nt, t(this, x).closest("tr"));
1643
1698
  }
1644
1699
  get value() {
1645
- var e = !t(this, L) || !t(this, L).dataManager || !t(this, y) || !t(this, y).dataset || !t(this, y).dataset.row || !t(this, y).dataset.bind ? "" : t(this, y).closest("tr").data[t(this, y).dataset.bind];
1700
+ var e = !t(this, M) || !t(this, M).dataManager || !t(this, x) || !t(this, x).dataset || !t(this, x).dataset.row || !t(this, x).dataset.bind ? "" : t(this, x).closest("tr").data[t(this, x).dataset.bind];
1646
1701
  return e ?? "";
1647
1702
  }
1648
1703
  set value(e) {
1649
- var s = parseInt(t(this, y).dataset.row);
1650
- const r = this.getAttribute("update-row-state") != "false";
1651
- s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, y).dataset.index), t(this, y).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, y).dataset.bind, e, r);
1704
+ var s = parseInt(t(this, x).dataset.row);
1705
+ const o = this.getAttribute("update-row-state") != "false";
1706
+ s < 0 ? t(this, M).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, o) : t(this, M).data.setValue(s, t(this, x).dataset.bind, e, o);
1652
1707
  }
1653
1708
  get row() {
1654
- return parseInt(t(this, y).dataset.row);
1709
+ return parseInt(t(this, x).dataset.row);
1655
1710
  }
1656
1711
  get data() {
1657
- return t(this, y).closest("tr").data;
1712
+ return t(this, x).closest("tr").data;
1658
1713
  }
1659
1714
  refresh() {
1660
- const e = t(this, y).dataset.bind;
1661
- return parseInt(t(this, y).dataset.row), t(this, Nt).data[e];
1715
+ const e = t(this, x).dataset.bind;
1716
+ return parseInt(t(this, x).dataset.row), t(this, Nt).data[e];
1662
1717
  }
1663
1718
  };
1664
- L = new WeakMap(), Nt = new WeakMap(), y = new WeakMap(), Me = new WeakMap(), Ie = new WeakMap(), $e = new WeakMap(), _e = new WeakMap(), Ne = new WeakMap(), h(Ke, "CellElement");
1719
+ M = new WeakMap(), Nt = new WeakMap(), x = new WeakMap(), $e = new WeakMap(), He = new WeakMap(), Ie = new WeakMap(), _e = new WeakMap(), Ne = new WeakMap(), h(Ke, "CellElement");
1665
1720
  let qe = Ke;
1666
1721
  const Ze = class Ze extends qe {
1667
1722
  constructor() {
@@ -1675,18 +1730,18 @@ const Ze = class Ze extends qe {
1675
1730
  }
1676
1731
  };
1677
1732
  h(Ze, "EditableCellElement");
1678
- let Te = Ze;
1679
- var zt, lt, pt, yt, ce, X, ze;
1680
- const Ge = class Ge extends Te {
1733
+ let Ce = Ze;
1734
+ var zt, ct, yt, mt, ce, U, ze;
1735
+ const Ge = class Ge extends Ce {
1681
1736
  constructor() {
1682
1737
  super();
1683
1738
  d(this, zt);
1684
- d(this, lt);
1685
- d(this, pt);
1739
+ d(this, ct);
1686
1740
  d(this, yt);
1741
+ d(this, mt);
1687
1742
  d(this, ce);
1688
- d(this, X);
1689
- E(this, "refresh", /* @__PURE__ */ h(() => {
1743
+ d(this, U);
1744
+ A(this, "refresh", /* @__PURE__ */ h(() => {
1690
1745
  const e = super.refresh();
1691
1746
  t(this, zt).value = e;
1692
1747
  }, "refresh"));
@@ -1722,20 +1777,20 @@ const Ge = class Ge extends Te {
1722
1777
  */
1723
1778
  d(this, ze, /* @__PURE__ */ h((e) => {
1724
1779
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1725
- if (t(this, lt) == "number") {
1726
- let o = [];
1727
- if (t(this, X) && Number(t(this, X)) > 0 && o.push("."), t(this, yt) && Number(t(this, yt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, X) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1728
- var s = e.target.value, r = s.indexOf(".");
1729
- if (r >= 0) {
1730
- var s = s.substr(r + 1, s.length);
1731
- s.length >= Number(t(this, X)) && e.preventDefault();
1780
+ if (t(this, ct) == "number") {
1781
+ let r = [];
1782
+ if (t(this, U) && Number(t(this, U)) > 0 && r.push("."), t(this, mt) && Number(t(this, mt)) >= 0 && r.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !r.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1783
+ var s = e.target.value, o = s.indexOf(".");
1784
+ if (o >= 0) {
1785
+ var s = s.substr(o + 1, s.length);
1786
+ s.length >= Number(t(this, U)) && e.preventDefault();
1732
1787
  }
1733
1788
  }
1734
1789
  }
1735
- t(this, pt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, pt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1790
+ t(this, yt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, yt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1736
1791
  }
1737
1792
  }, "#onKeyDown"));
1738
- if (this.applyBaseStyle(), p(this, lt, this.getAttribute("type") || "text"), p(this, pt, this.getAttribute("maxbyte")), p(this, yt, this.getAttribute("min")), p(this, ce, this.getAttribute("max")), p(this, X, this.getAttribute("scale")), !["text", "number"].includes(t(this, lt))) throw `invalid type : ${t(this, lt)}`;
1793
+ if (this.applyBaseStyle(), p(this, ct, this.getAttribute("type") || "text"), p(this, yt, this.getAttribute("maxbyte")), p(this, mt, this.getAttribute("min")), p(this, ce, this.getAttribute("max")), p(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ct))) throw `invalid type : ${t(this, ct)}`;
1739
1794
  }
1740
1795
  connectedCallback() {
1741
1796
  for (var e = [], s = 0; s < this.attributes.length; s++)
@@ -1748,8 +1803,8 @@ const Ge = class Ge extends Te {
1748
1803
  `, super.connectedCallback(), p(this, zt, this.querySelector("input"));
1749
1804
  }
1750
1805
  };
1751
- zt = new WeakMap(), lt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), ce = new WeakMap(), X = new WeakMap(), ze = new WeakMap(), h(Ge, "CellInputText");
1752
- let ke = Ge;
1806
+ zt = new WeakMap(), ct = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), ce = new WeakMap(), U = new WeakMap(), ze = new WeakMap(), h(Ge, "CellInputText");
1807
+ let Te = Ge;
1753
1808
  customElements.get("cell-input-text");
1754
- customElements.get("cell-input") || customElements.define("cell-input", ke);
1809
+ customElements.get("cell-input") || customElements.define("cell-input", Te);
1755
1810
  //# sourceMappingURL=nine-table.js.map