@ninebone/table 0.0.546 → 0.0.548

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,16 +2,16 @@ var Fe = Object.defineProperty;
2
2
  var Ve = (R) => {
3
3
  throw TypeError(R);
4
4
  };
5
- var Xe = (R, r, e) => r in R ? Fe(R, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[r] = e;
6
- var h = (R, r) => Fe(R, "name", { value: r, configurable: !0 });
7
- var E = (R, r, e) => Xe(R, typeof r != "symbol" ? r + "" : r, e), Ye = (R, r, e) => r.has(R) || Ve("Cannot " + e);
8
- var t = (R, r, e) => (Ye(R, r, "read from private field"), e ? e.call(R) : r.get(R)), d = (R, r, e) => r.has(R) ? Ve("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(R) : r.set(R, e), y = (R, r, e, s) => (Ye(R, r, "write to private field"), s ? s.call(R, e) : r.set(R, e), e);
9
- var Ue = (R, r, e, s) => ({
10
- set _(i) {
11
- y(R, r, i, e);
5
+ var Xe = (R, i, e) => i in R ? Fe(R, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[i] = e;
6
+ var c = (R, i) => Fe(R, "name", { value: i, configurable: !0 });
7
+ var E = (R, i, e) => Xe(R, typeof i != "symbol" ? i + "" : i, e), Ye = (R, i, e) => i.has(R) || Ve("Cannot " + e);
8
+ var t = (R, i, e) => (Ye(R, i, "read from private field"), e ? e.call(R) : i.get(R)), h = (R, i, e) => i.has(R) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(R) : i.set(R, e), y = (R, i, e, s) => (Ye(R, i, "write to private field"), s ? s.call(R, e) : i.set(R, e), e);
9
+ var Ue = (R, i, e, s) => ({
10
+ set _(r) {
11
+ y(R, i, r, e);
12
12
  },
13
13
  get _() {
14
- return t(R, r, s);
14
+ return t(R, i, s);
15
15
  }
16
16
  });
17
17
  import { trace as Ke } from "@ninebone/util";
@@ -20,91 +20,91 @@ const He = class He extends Ke.constructor {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(He, "Trace");
23
+ c(He, "Trace");
24
24
  let oe = He;
25
25
  const N = new oe();
26
26
  var z, j, w, X, K, Z, It, G, _t;
27
27
  const Me = class Me extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, z);
31
- d(this, j, !1);
32
- d(this, w);
33
- d(this, X);
34
- d(this, K);
35
- d(this, Z);
36
- d(this, It, /* @__PURE__ */ h(() => {
30
+ h(this, z);
31
+ h(this, j, !1);
32
+ h(this, w);
33
+ h(this, X);
34
+ h(this, K);
35
+ h(this, Z);
36
+ h(this, It, /* @__PURE__ */ c(() => {
37
37
  if (!t(this, z)) return;
38
38
  const e = t(this, z).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (y(this, Z, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, Z).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ h(() => {
43
+ E(this, "refresh", /* @__PURE__ */ c(() => {
44
44
  if (!t(this, z) || !t(this, w) || t(this, j)) return;
45
45
  const e = t(this, w).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const i = t(this, w).track, n = t(this, w).thumb, a = t(this, z).querySelector(".ng-container-bottom"), o = e.clientWidth, c = s.scrollWidth;
48
- if (o !== 0 && c > o)
47
+ const r = t(this, w).track, n = t(this, w).thumb, a = t(this, z).querySelector(".ng-container-bottom"), o = e.clientWidth, d = s.scrollWidth;
48
+ if (o !== 0 && d > o)
49
49
  a && (a.style.display = "flex");
50
50
  else {
51
51
  a && (a.style.display = "none");
52
52
  return;
53
53
  }
54
- const l = i.clientWidth;
54
+ const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
- const f = Math.max(Math.min(l * (o / c), l), 20);
56
+ const f = Math.max(Math.min(l * (o / d), l), 20);
57
57
  n.style.width = `${f}px`;
58
- const u = e.scrollLeft, g = c - o;
59
- let b = 0;
60
- g > 0 && (b = parseInt(u / g * (l - f), 10)), b < 0 && (b = 0);
58
+ const u = e.scrollLeft, b = d - o;
59
+ let g = 0;
60
+ b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
61
61
  const x = l - f;
62
- b > x && (b = x), n.style.left = `${b}px`, t(this, w).left.disabled = b === 0, t(this, w).right.disabled = b >= x - 1;
62
+ g > x && (g = x), n.style.left = `${g}px`, t(this, w).left.disabled = g === 0, t(this, w).right.disabled = g >= x - 1;
63
63
  }, "refresh"));
64
- d(this, G, /* @__PURE__ */ h((e) => {
64
+ h(this, G, /* @__PURE__ */ c((e) => {
65
65
  if (!t(this, w)) return !1;
66
- const s = t(this, w).container, i = s.querySelector("table");
67
- if (!i) return !1;
66
+ const s = t(this, w).container, r = s.querySelector("table");
67
+ if (!r) return !1;
68
68
  const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
69
69
  let o = e;
70
70
  o < 0 && (o = 0);
71
- const c = n.width - a;
72
- o > c && (o = c), o = parseInt(o, 10), t(this, w).thumb.style.left = `${o}px`, t(this, w).left.disabled = o === 0, t(this, w).right.disabled = o >= c - 1;
73
- const l = s.clientWidth, u = i.scrollWidth - l;
74
- return c > 0 && u > 0 && (s.scrollLeft = o / c * u), o > 0 && o < c - 1;
71
+ const d = n.width - a;
72
+ o > d && (o = d), o = parseInt(o, 10), t(this, w).thumb.style.left = `${o}px`, t(this, w).left.disabled = o === 0, t(this, w).right.disabled = o >= d - 1;
73
+ const l = s.clientWidth, u = r.scrollWidth - l;
74
+ return d > 0 && u > 0 && (s.scrollLeft = o / d * u), o > 0 && o < d - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, _t, /* @__PURE__ */ h(() => {
77
- const e = /* @__PURE__ */ h((i) => {
76
+ h(this, _t, /* @__PURE__ */ c(() => {
77
+ const e = /* @__PURE__ */ c((r) => {
78
78
  clearInterval(t(this, X)), clearInterval(t(this, K));
79
79
  const n = parseInt(t(this, w).thumb.style.left || 0, 10);
80
- t(this, G).call(this, n + i), y(this, X, setInterval(() => {
80
+ t(this, G).call(this, n + r), y(this, X, setInterval(() => {
81
81
  clearInterval(t(this, X)), y(this, K, setInterval(() => {
82
82
  const a = parseInt(t(this, w).thumb.style.left || 0, 10);
83
- t(this, G).call(this, a + i) || clearInterval(t(this, K));
83
+ t(this, G).call(this, a + r) || clearInterval(t(this, K));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ h(() => {
86
+ }, "delayScroll"), s = /* @__PURE__ */ c(() => {
87
87
  clearInterval(t(this, X)), clearInterval(t(this, K));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((i) => {
90
- t(this, w).left.addEventListener(i, s), t(this, w).right.addEventListener(i, s), t(this, w).track.addEventListener(i, s);
91
- }), t(this, w).left.addEventListener("mousedown", (i) => {
92
- i.button === 0 && e(-20);
93
- }), t(this, w).right.addEventListener("mousedown", (i) => {
94
- i.button === 0 && e(20);
95
- }), t(this, w).left.addEventListener("touchstart", () => e(-20)), t(this, w).right.addEventListener("touchstart", () => e(20)), t(this, w).track.addEventListener("mousedown", (i) => {
96
- if (i.button !== 0) return;
97
- i.preventDefault();
89
+ ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
+ t(this, w).left.addEventListener(r, s), t(this, w).right.addEventListener(r, s), t(this, w).track.addEventListener(r, s);
91
+ }), t(this, w).left.addEventListener("mousedown", (r) => {
92
+ r.button === 0 && e(-20);
93
+ }), t(this, w).right.addEventListener("mousedown", (r) => {
94
+ r.button === 0 && e(20);
95
+ }), t(this, w).left.addEventListener("touchstart", () => e(-20)), t(this, w).right.addEventListener("touchstart", () => e(20)), t(this, w).track.addEventListener("mousedown", (r) => {
96
+ if (r.button !== 0) return;
97
+ r.preventDefault();
98
98
  const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
99
- t(this, G).call(this, i.clientX - n.left - a / 2);
100
- }), t(this, w).thumb.addEventListener("mousedown", (i) => {
101
- if (i.button !== 0) return;
102
- i.stopPropagation(), i.preventDefault(), y(this, j, !0), this.shiftX = i.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
- const n = /* @__PURE__ */ h((o) => {
99
+ t(this, G).call(this, r.clientX - n.left - a / 2);
100
+ }), t(this, w).thumb.addEventListener("mousedown", (r) => {
101
+ if (r.button !== 0) return;
102
+ r.stopPropagation(), r.preventDefault(), y(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
+ const n = /* @__PURE__ */ c((o) => {
104
104
  if (!t(this, j)) return;
105
- const c = t(this, w).track.getBoundingClientRect();
106
- t(this, G).call(this, o.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
105
+ const d = t(this, w).track.getBoundingClientRect();
106
+ t(this, G).call(this, o.clientX - d.left - this.shiftX);
107
+ }, "onMouseMove"), a = /* @__PURE__ */ c(() => {
108
108
  y(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
@@ -176,7 +176,7 @@ const Me = class Me extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ h(() => {
179
+ const e = /* @__PURE__ */ c(() => {
180
180
  const s = t(this, z).querySelector(".ng-container-body .ng-part-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
@@ -198,68 +198,68 @@ const Me = class Me extends HTMLElement {
198
198
  t(this, Z) && t(this, Z).disconnect();
199
199
  }
200
200
  };
201
- z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), h(Me, "NineTableHScrollBar");
201
+ z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), c(Me, "NineTableHScrollBar");
202
202
  let ae = Me;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
204
204
  var F, at, J, q, xt, vt, Nt;
205
205
  const $e = class $e extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, F);
209
- d(this, at);
210
- d(this, J, !1);
211
- d(this, q);
212
- d(this, xt, 0);
213
- d(this, vt, 0);
214
- E(this, "refresh", /* @__PURE__ */ h(() => {
208
+ h(this, F);
209
+ h(this, at);
210
+ h(this, J, !1);
211
+ h(this, q);
212
+ h(this, xt, 0);
213
+ h(this, vt, 0);
214
+ E(this, "refresh", /* @__PURE__ */ c(() => {
215
215
  if (!t(this, F) || !t(this, q)) return;
216
- const e = t(this, q).container, s = t(this, q).track, i = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, c = t(this, at).getRowHeight(), l = o * c;
216
+ const e = t(this, q).container, s = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, d = t(this, at).getRowHeight(), l = o * d;
217
217
  if (l <= n) {
218
- i.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
218
+ r.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
219
219
  return;
220
220
  } else
221
- i.style.display = "block";
221
+ r.style.display = "block";
222
222
  const f = s.clientHeight;
223
223
  if (f <= 0) return;
224
224
  const u = Math.max(Math.min(f * (n / l), f), 20);
225
- i.style.height = `${u}px`;
226
- const g = e.scrollTop, b = Math.max(l - n, 1);
225
+ r.style.height = `${u}px`;
226
+ const b = e.scrollTop, g = Math.max(l - n, 1);
227
227
  let x = 0;
228
- b > 0 && (x = g / b * (f - u));
228
+ g > 0 && (x = b / g * (f - u));
229
229
  const v = f - u;
230
- x < 0 && (x = 0), x > v && (x = v), i.style.top = `${x}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
230
+ x < 0 && (x = 0), x > v && (x = v), r.style.top = `${x}px`, t(this, q).top.disabled = b <= 0, t(this, q).bottom.disabled = b >= g - 1;
231
231
  }, "refresh"));
232
- d(this, Nt, /* @__PURE__ */ h(() => {
232
+ h(this, Nt, /* @__PURE__ */ c(() => {
233
233
  N.log("nine-table-vscrollbar.#init");
234
- const e = t(this, q).container, s = /* @__PURE__ */ h(() => {
234
+ const e = t(this, q).container, s = /* @__PURE__ */ c(() => {
235
235
  const n = (t(this, F).data.get() || []).length, a = t(this, at).getRowHeight();
236
236
  return n * a;
237
237
  }, "getContentHeight");
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, J) || this.refresh();
240
- }), t(this, q).thumb.addEventListener("mousedown", (i) => {
241
- if (i.button !== 0) return;
242
- i.stopPropagation(), i.preventDefault(), y(this, J, !0), y(this, xt, i.clientY), y(this, vt, e.scrollTop);
243
- const n = /* @__PURE__ */ h((o) => {
240
+ }), t(this, q).thumb.addEventListener("mousedown", (r) => {
241
+ if (r.button !== 0) return;
242
+ r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, xt, r.clientY), y(this, vt, e.scrollTop);
243
+ const n = /* @__PURE__ */ c((o) => {
244
244
  if (!t(this, J)) return;
245
- const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, g = o.clientY - t(this, xt), b = e.clientHeight, x = s(), v = Math.max(x - b, 1);
245
+ const d = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = d.height - l, b = o.clientY - t(this, xt), g = e.clientHeight, x = s(), v = Math.max(x - g, 1);
246
246
  if (u > 0 && v > 0) {
247
- const A = g / u * v;
247
+ const A = b / u * v;
248
248
  let m = t(this, vt) + A;
249
- const W = Math.max(0, x - b);
249
+ const W = Math.max(0, x - g);
250
250
  m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
251
251
  }
252
252
  this.refresh();
253
- }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
253
+ }, "onMouseMove"), a = /* @__PURE__ */ c(() => {
254
254
  y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
255
255
  }, "onMouseUp");
256
256
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
257
- }), t(this, q).track.addEventListener("mousedown", (i) => {
258
- if (i.button !== 0 || i.target === t(this, q).thumb) return;
259
- const n = t(this, q).track.getBoundingClientRect(), a = t(this, q).thumb.clientHeight, o = i.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
260
- if (l > 0 && g > 0) {
261
- const b = Math.max(0, Math.min(1, o / l));
262
- e.scrollTop = b * g;
257
+ }), t(this, q).track.addEventListener("mousedown", (r) => {
258
+ if (r.button !== 0 || r.target === t(this, q).thumb) return;
259
+ const n = t(this, q).track.getBoundingClientRect(), a = t(this, q).thumb.clientHeight, o = r.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
260
+ if (l > 0 && b > 0) {
261
+ const g = Math.max(0, Math.min(1, o / l));
262
+ e.scrollTop = g * b;
263
263
  }
264
264
  this.refresh();
265
265
  }), t(this, q).top.addEventListener("click", () => {
@@ -334,7 +334,7 @@ const $e = class $e extends HTMLElement {
334
334
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
335
335
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
336
  `;
337
- const e = /* @__PURE__ */ h(() => {
337
+ const e = /* @__PURE__ */ c(() => {
338
338
  const s = t(this, F).shadowRoot.querySelector(".ng-container-body .ng-part-body");
339
339
  if (!s) {
340
340
  setTimeout(e, 10);
@@ -351,191 +351,182 @@ const $e = class $e extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), h($e, "NineTableVScrollBar");
354
+ F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), c($e, "NineTableVScrollBar");
355
355
  let le = $e;
356
356
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
357
357
  var D, S, Q, P, H, V, tt, wt, Se, Ee, Wt, Ot, Bt, St, Et, zt, Pt, At, Ae, lt, Rt, Dt;
358
358
  const Ie = class Ie {
359
- constructor(r) {
360
- d(this, D);
361
- d(this, S);
362
- d(this, Q);
363
- d(this, P, /* @__PURE__ */ new Map());
364
- d(this, H, null);
365
- d(this, V, null);
366
- d(this, tt, 0);
367
- d(this, wt, 40);
368
- d(this, Se, !1);
369
- d(this, Ee, !1);
370
- d(this, Wt, 3);
371
- E(this, "refresh", /* @__PURE__ */ h(() => {
359
+ constructor(i) {
360
+ h(this, D);
361
+ h(this, S);
362
+ h(this, Q);
363
+ h(this, P, /* @__PURE__ */ new Map());
364
+ h(this, H, null);
365
+ h(this, V, null);
366
+ h(this, tt, 0);
367
+ h(this, wt, 40);
368
+ h(this, Se, !1);
369
+ h(this, Ee, !1);
370
+ h(this, Wt, 3);
371
+ E(this, "refresh", /* @__PURE__ */ c(() => {
372
372
  var e;
373
373
  N.log("rowManager.refresh");
374
- const r = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
- r && (t(this, St).call(this), t(this, lt).call(this, r.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
374
+ const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
+ i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
- E(this, "initialize", /* @__PURE__ */ h(() => {
377
+ E(this, "initialize", /* @__PURE__ */ c(() => {
378
378
  N.log("rowManager.initialize"), y(this, Q, {
379
379
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), y(this, H, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
382
- const o = t(this, S).querySelector(a);
381
+ }), y(this, H, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
382
+ const n = t(this, S).querySelector(r);
383
+ if (!n) return;
384
+ const a = n.querySelector(".ng-part-body table");
385
+ if (!a) return;
386
+ const o = a.querySelector("tbody.bindable-tbody");
383
387
  if (!o) return;
384
- const c = o.querySelector(".ng-part-body table");
385
- if (!c) return;
386
- const l = c.querySelector("tbody.bindable-tbody");
387
- if (!l) return;
388
- const u = Array.from(l.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
389
- t(this, P).set(a, u);
388
+ const l = Array.from(o.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
389
+ t(this, P).set(r, l);
390
390
  });
391
- const r = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), i = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
- if (r) {
393
- t(this, Bt).call(this, r), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, r.scrollTop);
394
- let a = !1;
395
- const o = /* @__PURE__ */ h((c, l, f) => {
396
- var u;
397
- a || (a = !0, r && r.scrollTop !== c && (r.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), s && s.scrollTop !== c && (s.scrollTop = c), i && i.scrollLeft !== l && (i.scrollLeft = l), n && n.scrollLeft !== l && (n.scrollLeft = l), t(this, lt).call(this, c), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), a = !1);
398
- }, "syncScroll");
399
- [r, e, s].forEach((c) => {
400
- c && c.addEventListener("scroll", () => {
401
- o(c.scrollTop, c.scrollLeft);
402
- });
403
- });
404
- }
391
+ const i = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body");
392
+ t(this, S).querySelector(".ng-container-body .ng-part-header"), t(this, S).querySelector(".ng-container-body .ng-part-footer"), i && (t(this, Bt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop), i.addEventListener("scroll", () => {
393
+ const r = i.scrollTop;
394
+ i.scrollLeft, e && (e.scrollTop = r), s && (s.scrollTop = r), t(this, lt).call(this, r);
395
+ }));
405
396
  }, "initialize"));
406
- d(this, Ot, /* @__PURE__ */ h((r, e) => {
397
+ h(this, Ot, /* @__PURE__ */ c((i, e) => {
407
398
  N.log("rowManager.#renderRows");
408
399
  const s = t(this, P).get(e);
409
400
  if (!s || s.length === 0) return;
410
- const i = r.querySelector(".ng-part-body tbody.bindable-tbody");
411
- if (!i) return;
412
- i.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
413
- const n = i.querySelector("tr.nodata"), a = document.createDocumentFragment();
401
+ const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
402
+ if (!r) return;
403
+ r.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
404
+ const n = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
414
405
  for (let o = 0; o < t(this, wt); o++)
415
- s.forEach((c) => {
416
- a.appendChild(c.cloneNode(!0));
406
+ s.forEach((d) => {
407
+ a.appendChild(d.cloneNode(!0));
417
408
  });
418
- n ? n.before(a) : i.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = i.querySelector("tr:not(.nodata)"));
409
+ n ? n.before(a) : r.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
419
410
  }, "#renderRows"));
420
- d(this, Bt, /* @__PURE__ */ h((r) => {
411
+ h(this, Bt, /* @__PURE__ */ c((i) => {
421
412
  if (N.log("rowManager.#measureAndCacheHeight"), t(this, H) !== null && t(this, H) > 0)
422
413
  return t(this, H);
423
414
  N.log("#measureAndCacheHeight");
424
415
  const e = t(this, P).get(".ng-container-body");
425
416
  if (!e || e.length === 0) return 24;
426
- const s = r.querySelector("tbody.bindable-tbody");
417
+ const s = i.querySelector("tbody.bindable-tbody");
427
418
  if (!s) return 24;
428
- s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
429
- const i = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
430
- e.forEach((g) => {
431
- n.appendChild(g.cloneNode(!0));
432
- }), i ? i.before(n) : s.appendChild(n);
433
- const a = t(this, S), o = a.style.display, c = a.style.visibility, l = a.style.position;
419
+ s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
420
+ const r = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
421
+ e.forEach((b) => {
422
+ n.appendChild(b.cloneNode(!0));
423
+ }), r ? r.before(n) : s.appendChild(n);
424
+ const a = t(this, S), o = a.style.display, d = a.style.visibility, l = a.style.position;
434
425
  (o === "none" || window.getComputedStyle(a).display === "none") && (a.style.display = "block", a.style.visibility = "hidden", a.style.position = "absolute");
435
426
  let f = 0;
436
427
  const u = s.querySelectorAll("tr:not(.nodata)");
437
- return u.forEach((g) => {
438
- f += g.offsetHeight || g.getBoundingClientRect().height;
439
- }), u.forEach((g) => g.remove()), a.style.display = o, a.style.visibility = c, a.style.position = l, y(this, H, f > 0 ? f : 24), t(this, Et).call(this), t(this, H);
428
+ return u.forEach((b) => {
429
+ f += b.offsetHeight || b.getBoundingClientRect().height;
430
+ }), u.forEach((b) => b.remove()), a.style.display = o, a.style.visibility = d, a.style.position = l, y(this, H, f > 0 ? f : 24), t(this, Et).call(this), t(this, H);
440
431
  }, "#measureAndCacheHeight"));
441
- d(this, St, /* @__PURE__ */ h(() => {
432
+ h(this, St, /* @__PURE__ */ c(() => {
442
433
  N.log("rowManager.#updateVirtualScrollHeight");
443
- const e = (t(this, D).data.get() || []).length, s = t(this, H), i = e * s;
434
+ const e = (t(this, D).data.get() || []).length, s = t(this, H), r = e * s;
444
435
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
445
436
  const a = t(this, S).querySelector(n);
446
437
  if (!a) return;
447
438
  const o = a.querySelector(".ng-part-body .ng-virtual-spacer");
448
- o && (o.style.height = `${i}px`);
439
+ o && (o.style.height = `${r}px`);
449
440
  });
450
441
  }, "#updateVirtualScrollHeight"));
451
- d(this, Et, /* @__PURE__ */ h(() => {
442
+ h(this, Et, /* @__PURE__ */ c(() => {
452
443
  if (t(this, tt) > 0 && t(this, H) > 0) {
453
- const r = Math.ceil(t(this, tt) / t(this, H));
454
- y(this, wt, r + t(this, Wt));
444
+ const i = Math.ceil(t(this, tt) / t(this, H));
445
+ y(this, wt, i + t(this, Wt));
455
446
  }
456
447
  }, "#updateRowCount"));
457
- d(this, zt, /* @__PURE__ */ h(() => {
458
- var o, c, l, f, u, g;
459
- const r = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
448
+ h(this, zt, /* @__PURE__ */ c(() => {
449
+ var o, d, l, f, u, b;
450
+ const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
460
451
  if (e) {
461
- const b = r ? Array.from(r.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(b.length, x.length, v.length);
452
+ const g = i ? Array.from(i.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(g.length, x.length, v.length);
462
453
  for (let m = 0; m < A; m++) {
463
454
  const W = [
464
- ((o = b[m]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
465
- ((c = x[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
455
+ ((o = g[m]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
456
+ ((d = x[m]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
466
457
  ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
467
458
  ], C = Math.max(...W);
468
- C > 0 && (b[m] && (b[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
459
+ C > 0 && (g[m] && (g[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
469
460
  }
470
461
  }
471
- const i = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
462
+ const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
472
463
  if (n) {
473
- const b = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], x = Array.from(n.querySelectorAll("tfoot tr")), v = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], A = Math.max(b.length, x.length, v.length);
464
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], x = Array.from(n.querySelectorAll("tfoot tr")), v = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], A = Math.max(g.length, x.length, v.length);
474
465
  for (let m = 0; m < A; m++) {
475
466
  const W = [
476
- ((f = b[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
467
+ ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
477
468
  ((u = x[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
478
- ((g = v[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0
469
+ ((b = v[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
479
470
  ], C = Math.max(...W);
480
- C > 0 && (b[m] && (b[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
471
+ C > 0 && (g[m] && (g[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
481
472
  }
482
473
  }
483
474
  }, "#syncRowHeights"));
484
- d(this, Pt, /* @__PURE__ */ h(() => {
485
- !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, V, new ResizeObserver((r) => {
486
- for (const e of r) {
475
+ h(this, Pt, /* @__PURE__ */ c(() => {
476
+ !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, V, new ResizeObserver((i) => {
477
+ for (const e of i) {
487
478
  const s = e.target;
488
479
  if (!s.classList.contains("active")) continue;
489
- const i = e.contentRect.height;
490
- if (i > 0) {
480
+ const r = e.contentRect.height;
481
+ if (r > 0) {
491
482
  let n = 0;
492
483
  const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
493
484
  a && (n += a.offsetHeight), o && (n += o.offsetHeight);
494
- const c = Math.max(i - n, 100);
495
- t(this, tt) !== c && (y(this, tt, c), t(this, Et).call(this), t(this, H) !== null && (t(this, At).call(this), this.refresh()));
485
+ const d = Math.max(r - n, 100);
486
+ t(this, tt) !== d && (y(this, tt, d), t(this, Et).call(this), t(this, H) !== null && (t(this, At).call(this), this.refresh()));
496
487
  }
497
488
  }
498
489
  })), t(this, V).observe(t(this, S)));
499
490
  }, "#initResizeObserver"));
500
- d(this, At, /* @__PURE__ */ h(() => {
501
- N.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
502
- const e = t(this, S).querySelector(r);
503
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, r);
491
+ h(this, At, /* @__PURE__ */ c(() => {
492
+ N.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
493
+ const e = t(this, S).querySelector(i);
494
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
504
495
  }), t(this, Dt).call(this), t(this, zt).call(this);
505
496
  }, "#renderAllContainers"));
506
- d(this, Ae, /* @__PURE__ */ h((r) => {
497
+ h(this, Ae, /* @__PURE__ */ c((i) => {
507
498
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
508
499
  var l;
509
500
  const s = t(this, S).querySelector(e);
510
501
  if (!s) return;
511
- const i = s.querySelector(".ng-part-body tbody.bindable-tbody");
512
- if (!i) return;
513
- const n = Array.from(i.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
502
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
503
+ if (!r) return;
504
+ const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, d = (t(this, D).data.get() || []).length;
514
505
  n.forEach((f, u) => {
515
- const g = r + Math.floor(u / a);
516
- if (g >= c) {
506
+ const b = i + Math.floor(u / a);
507
+ if (b >= d) {
517
508
  f.style.display = "none";
518
509
  return;
519
510
  }
520
- const b = t(this, D).data.get(g);
521
- f.style.display = "", t(this, Rt).call(this, f, b, g);
511
+ const g = t(this, D).data.get(b);
512
+ f.style.display = "", t(this, Rt).call(this, f, g, b);
522
513
  });
523
514
  });
524
515
  }, "#adjustBufferRows"));
525
- d(this, lt, /* @__PURE__ */ h((r) => {
516
+ h(this, lt, /* @__PURE__ */ c((i) => {
526
517
  var l, f;
527
518
  const e = t(this, H);
528
519
  if (!e || e <= 0) return;
529
- const s = t(this, D).data.length, i = Math.max(0, Math.floor(r / e)), n = i * e, a = ((l = t(this, P).get(".ng-container-body")) == null ? void 0 : l.length) || 1, o = t(this, Q).firstTr, c = o && o.dataset.row !== void 0 ? parseInt(o.dataset.row, 10) : -1;
520
+ const s = t(this, D).data.length, r = Math.max(0, Math.floor(i / e)), n = r * e, a = ((l = t(this, P).get(".ng-container-body")) == null ? void 0 : l.length) || 1, o = t(this, Q).firstTr, d = o && o.dataset.row !== void 0 ? parseInt(o.dataset.row, 10) : -1;
530
521
  (f = t(this, Q)) == null || f.scrollTables.forEach((u) => {
531
522
  u.style.transform = `translate3d(0, ${n}px, 0)`;
532
- }), c !== i && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
533
- const g = t(this, S).querySelector(u);
534
- if (!g) return;
535
- const b = g.querySelector(".ng-part-body tbody.bindable-tbody");
523
+ }), d !== r && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
524
+ const b = t(this, S).querySelector(u);
536
525
  if (!b) return;
537
- Array.from(b.querySelectorAll("tr:not(.nodata)")).forEach((v, A) => {
538
- const m = i + Math.floor(A / a);
526
+ const g = b.querySelector(".ng-part-body tbody.bindable-tbody");
527
+ if (!g) return;
528
+ Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((v, A) => {
529
+ const m = r + Math.floor(A / a);
539
530
  if (m >= s) {
540
531
  v.style.display = "none";
541
532
  return;
@@ -559,178 +550,178 @@ const Ie = class Ie {
559
550
  cell.dataset.row = dataIndex;
560
551
  });
561
552
  }; */
562
- d(this, Rt, /* @__PURE__ */ h((r, e, s) => {
563
- r.dataset.row = s, r.data = e, Array.from(r.cells).forEach((i, n) => {
564
- i.dataset.row = s;
565
- const a = Array.from(i.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
553
+ h(this, Rt, /* @__PURE__ */ c((i, e, s) => {
554
+ i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
555
+ r.dataset.row = s;
556
+ const a = Array.from(r.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
566
557
  a && typeof a.refresh == "function" && a.refresh();
567
558
  });
568
559
  }, "#bindRowData"));
569
- d(this, Dt, /* @__PURE__ */ h(() => {
570
- var c, l, f;
560
+ h(this, Dt, /* @__PURE__ */ c(() => {
561
+ var d, l, f;
571
562
  N.log("rowManager.#syncHeaderHeights");
572
- const r = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
563
+ const i = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
573
564
  if (!e) return;
574
- const i = r ? Array.from(r.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), a = s ? Array.from(s.querySelectorAll("tr")) : [], o = Math.max(i.length, n.length, a.length);
565
+ const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), a = s ? Array.from(s.querySelectorAll("tr")) : [], o = Math.max(r.length, n.length, a.length);
575
566
  for (let u = 0; u < o; u++) {
576
- const g = [
577
- ((c = i[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
567
+ const b = [
568
+ ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
578
569
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
579
570
  ((f = a[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
580
- ], b = Math.max(...g);
581
- b > 0 && (i[u] && (i[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), a[u] && (a[u].style.height = `${b}px`));
571
+ ], g = Math.max(...b);
572
+ g > 0 && (r[u] && (r[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`), a[u] && (a[u].style.height = `${g}px`));
582
573
  }
583
574
  }, "#syncHeaderHeights"));
584
- E(this, "destroy", /* @__PURE__ */ h(() => {
575
+ E(this, "destroy", /* @__PURE__ */ c(() => {
585
576
  t(this, V) && (t(this, V).disconnect(), y(this, V, null));
586
577
  }, "destroy"));
587
- y(this, D, r.getRootNode().host), y(this, S, r), t(this, Pt).call(this);
578
+ y(this, D, i.getRootNode().host), y(this, S, i), t(this, Pt).call(this);
588
579
  }
589
580
  getRowHeight() {
590
581
  return t(this, H);
591
582
  }
592
- templateLength(r = ".ng-container-body") {
583
+ templateLength(i = ".ng-container-body") {
593
584
  var e;
594
- return ((e = t(this, P).get(r)) == null ? void 0 : e.length) || 1;
585
+ return ((e = t(this, P).get(i)) == null ? void 0 : e.length) || 1;
595
586
  }
596
587
  };
597
- D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), H = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Dt = new WeakMap(), h(Ie, "RowManager");
588
+ D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), H = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Dt = new WeakMap(), c(Ie, "RowManager");
598
589
  let ce = Ie;
599
590
  const jt = class jt {
600
591
  /**
601
592
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
602
593
  */
603
- static compileAll(r) {
604
- return Array.isArray(r) ? r.map((e) => jt.compile(e)) : [];
594
+ static compileAll(i) {
595
+ return Array.isArray(i) ? i.map((e) => jt.compile(e)) : [];
605
596
  }
606
597
  /**
607
598
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
608
599
  */
609
- static compile(r) {
610
- if (!r) return null;
611
- const e = /* @__PURE__ */ h((o) => {
600
+ static compile(i) {
601
+ if (!i) return null;
602
+ const e = /* @__PURE__ */ c((o) => {
612
603
  o.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
613
604
  const f = l.getAttribute("cell-type") || "renderer";
614
605
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
615
606
  let u = `cell-${f}`;
616
- const g = l.getAttribute("data-bind"), b = l.getAttribute("data-expr"), x = l.getAttribute("maxbyte"), v = l.getAttribute("type");
607
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), x = l.getAttribute("maxbyte"), v = l.getAttribute("type");
617
608
  let A = [];
618
- g && A.push(`data-bind="${g}"`), b && A.push(`data-expr="${b}"`), x && A.push(`maxbyte="${x}"`), v && A.push(`type="${v}"`), l.innerHTML = `<${u} ${A.join(" ")}></${u}>`;
609
+ b && A.push(`data-bind="${b}"`), g && A.push(`data-expr="${g}"`), x && A.push(`maxbyte="${x}"`), v && A.push(`type="${v}"`), l.innerHTML = `<${u} ${A.join(" ")}></${u}>`;
619
610
  });
620
- }, "processCellTypes"), s = /* @__PURE__ */ h((o) => {
611
+ }, "processCellTypes"), s = /* @__PURE__ */ c((o) => {
621
612
  if (!o.querySelector("colgroup")) {
622
- const c = o.querySelector("tbody tr") || o.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(o.clientWidth / l), 100);
623
- for (let g = 0; g < l; g++) {
624
- const b = document.createElement("col");
625
- b.setAttribute("width", u), f.appendChild(b);
613
+ const d = o.querySelector("tbody tr") || o.querySelector("tr"), l = d ? d.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(o.clientWidth / l), 100);
614
+ for (let b = 0; b < l; b++) {
615
+ const g = document.createElement("col");
616
+ g.setAttribute("width", u), f.appendChild(g);
626
617
  }
627
618
  o.prepend(f);
628
619
  }
629
620
  if (!o.querySelector("thead")) {
630
- const c = document.createElement("thead"), l = o.querySelector("colgroup");
631
- l ? l.after(c) : o.prepend(c);
621
+ const d = document.createElement("thead"), l = o.querySelector("colgroup");
622
+ l ? l.after(d) : o.prepend(d);
632
623
  }
633
624
  o.classList.add("nine-table-element"), o.style.display = "table";
634
- }, "ensureTableStructure"), i = /* @__PURE__ */ h((o, c) => {
635
- const l = Array.from(o.querySelectorAll(c + " tr")), f = Array.from(o.querySelectorAll(c + " th," + c + " td")), u = l.length;
625
+ }, "ensureTableStructure"), r = /* @__PURE__ */ c((o, d) => {
626
+ const l = Array.from(o.querySelectorAll(d + " tr")), f = Array.from(o.querySelectorAll(d + " th," + d + " td")), u = l.length;
636
627
  if (u === 0 || f.length === 0) return;
637
- let g = 0;
628
+ let b = 0;
638
629
  f.forEach((x) => {
639
- g += x.colSpan || 1;
630
+ b += x.colSpan || 1;
640
631
  });
641
- const b = Array.from(Array(u), () => Array(g).fill(null));
632
+ const g = Array.from(Array(u), () => Array(b).fill(null));
642
633
  l.forEach((x) => {
643
634
  const v = x.sectionRowIndex;
644
635
  let A = 0;
645
636
  Array.from(x.querySelectorAll("th,td")).forEach((m) => {
646
- for (let B = 0; B < b[v].length; B++)
647
- if (b[v][B] === null) {
637
+ for (let B = 0; B < g[v].length; B++)
638
+ if (g[v][B] === null) {
648
639
  A = B;
649
640
  break;
650
641
  }
651
642
  const W = m.rowSpan || 1, C = m.colSpan || 1;
652
643
  for (let B = 0; B < W; B++)
653
644
  for (let yt = 0; yt < C; yt++)
654
- v + B < u && A + yt < g && (b[v + B][A + yt] = B === 0 && yt === 0 ? "1" : "0");
645
+ v + B < u && A + yt < b && (g[v + B][A + yt] = B === 0 && yt === 0 ? "1" : "0");
655
646
  });
656
647
  }), l.forEach((x) => {
657
648
  const v = x.sectionRowIndex;
658
649
  Array.from(x.querySelectorAll("th,td")).forEach((A) => {
659
- for (let m = 0; m < b[v].length; m++)
660
- if (b[v][m] === "1") {
661
- A.dataset.col = m, b[v][m] = "0";
650
+ for (let m = 0; m < g[v].length; m++)
651
+ if (g[v][m] === "1") {
652
+ A.dataset.col = m, g[v][m] = "0";
662
653
  break;
663
654
  }
664
655
  });
665
656
  });
666
- }, "resetColIndex"), n = r.cloneNode(!0);
667
- return s(n), e(n), i(n, "thead"), i(n, "tbody"), i(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, c) => {
657
+ }, "resetColIndex"), n = i.cloneNode(!0);
658
+ return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, d) => {
668
659
  const l = o.getAttribute("fixed");
669
- l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
660
+ l && n.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((f) => {
670
661
  f.setAttribute("fixed", l);
671
662
  });
672
663
  }), n;
673
664
  }
674
665
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
675
666
  };
676
- h(jt, "TableCompiler");
667
+ c(jt, "TableCompiler");
677
668
  let he = jt;
678
669
  var Ft, et, st, Vt, Yt, ct, Ut, Xt;
679
670
  const pt = class pt extends HTMLElement {
680
671
  constructor() {
681
672
  super();
682
- d(this, Ft);
683
- d(this, et, null);
684
- d(this, st);
685
- E(this, "invalidate", /* @__PURE__ */ h(() => {
673
+ h(this, Ft);
674
+ h(this, et, null);
675
+ h(this, st);
676
+ E(this, "invalidate", /* @__PURE__ */ c(() => {
686
677
  t(this, st).refresh();
687
678
  }, "invalidate"));
688
- d(this, Vt, /* @__PURE__ */ h(() => {
679
+ h(this, Vt, /* @__PURE__ */ c(() => {
689
680
  [
690
681
  { selector: ".ng-container-body", type: null },
691
682
  { selector: ".ng-container-left", type: "left" },
692
683
  { selector: ".ng-container-right", type: "right" }
693
- ].forEach(({ selector: s, type: i }) => {
684
+ ].forEach(({ selector: s, type: r }) => {
694
685
  const n = this.querySelector(s);
695
686
  if (!n) return;
696
687
  n.innerHTML = "";
697
688
  const a = document.createElement("div");
698
- a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, et), i, "header"));
689
+ a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, et), r, "header"));
699
690
  const o = document.createElement("div");
700
691
  o.className = "ng-part-body";
701
- const c = document.createElement("div");
702
- c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, et), i, "body"));
692
+ const d = document.createElement("div");
693
+ d.className = "ng-scroll-content", d.style.position = "relative", d.style.width = "100%", d.appendChild(t(this, ct).call(this, t(this, et), r, "body"));
703
694
  const l = document.createElement("div");
704
- l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), o.appendChild(c);
695
+ l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", d.appendChild(l), o.appendChild(d);
705
696
  const f = document.createElement("div");
706
- f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, et), i, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
697
+ f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, et), r, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
707
698
  });
708
699
  }, "#renderSplitContainers"));
709
- d(this, Yt, /* @__PURE__ */ h(() => {
700
+ h(this, Yt, /* @__PURE__ */ c(() => {
710
701
  ["left", "right", "body"].forEach((e) => {
711
- const s = this.querySelector(`.ng-container-${e}`), i = s == null ? void 0 : s.querySelectorAll("table");
712
- if (!s || !i || i.length === 0) return;
702
+ const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
703
+ if (!s || !r || r.length === 0) return;
713
704
  let n = 0;
714
- i[0].querySelectorAll("col").forEach((a) => {
705
+ r[0].querySelectorAll("col").forEach((a) => {
715
706
  const o = parseInt(a.getAttribute("width"), 10);
716
707
  isNaN(n) || (n += o);
717
708
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
718
709
  });
719
710
  }, "#updateContainerWidths"));
720
- E(this, "generate", /* @__PURE__ */ h((e) => {
711
+ E(this, "generate", /* @__PURE__ */ c((e) => {
721
712
  e && (y(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, st).initialize(), setTimeout(() => {
722
713
  var s;
723
714
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
724
715
  }, 0));
725
716
  }, "generate"));
726
- d(this, ct, /* @__PURE__ */ h((e, s, i) => {
727
- const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), c = n.querySelector("tfoot");
728
- if (i === "header") {
729
- if (o && o.remove(), c && c.remove(), e.querySelector("tbody")) {
717
+ h(this, ct, /* @__PURE__ */ c((e, s, r) => {
718
+ const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), d = n.querySelector("tfoot");
719
+ if (r === "header") {
720
+ if (o && o.remove(), d && d.remove(), e.querySelector("tbody")) {
730
721
  const f = document.createElement("tbody");
731
722
  f.className = "fixed-tbody", n.appendChild(f);
732
723
  }
733
- } else i === "body" ? (a && a.remove(), c && c.remove(), o && (o.className = "bindable-tbody")) : i === "footer" && (a && a.remove(), o && o.remove());
724
+ } else r === "body" ? (a && a.remove(), d && d.remove(), o && (o.className = "bindable-tbody")) : r === "footer" && (a && a.remove(), o && o.remove());
734
725
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
735
726
  l.getAttribute("fixed") !== "left" && l.remove();
736
727
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -739,19 +730,19 @@ const pt = class pt extends HTMLElement {
739
730
  l.remove();
740
731
  }), n;
741
732
  }, "#createSplitTable"));
742
- E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, st).getRowHeight(), "getRowHeight"));
743
- E(this, "scrollToX", /* @__PURE__ */ h((e) => {
733
+ E(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
734
+ E(this, "scrollToX", /* @__PURE__ */ c((e) => {
744
735
  const s = this.querySelector(".ng-container-body .ng-part-body");
745
736
  s && (s.scrollLeft = e);
746
737
  }, "scrollToX"));
747
- E(this, "scrollToY", /* @__PURE__ */ h((e) => {
738
+ E(this, "scrollToY", /* @__PURE__ */ c((e) => {
748
739
  const s = this.querySelector(".ng-container-body .ng-part-body");
749
740
  s && (s.scrollTop = e);
750
741
  }, "scrollToY"));
751
- d(this, Ut, /* @__PURE__ */ h(() => {
742
+ h(this, Ut, /* @__PURE__ */ c(() => {
752
743
  t(this, Xt).call(this);
753
744
  }, "#init"));
754
- d(this, Xt, /* @__PURE__ */ h(() => {
745
+ h(this, Xt, /* @__PURE__ */ c(() => {
755
746
  const e = pt.SCROLLBAR_SIZE;
756
747
  this.innerHTML = `
757
748
  <style>
@@ -909,82 +900,82 @@ const pt = class pt extends HTMLElement {
909
900
  this.innerHTML = "", N.log("NineTableSheet destroyed.");
910
901
  }
911
902
  };
912
- Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
903
+ Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), c(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
913
904
  let $t = pt;
914
905
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
915
906
  var Kt, qt;
916
907
  const _e = class _e extends HTMLElement {
917
908
  constructor() {
918
909
  super();
919
- d(this, Kt, /* @__PURE__ */ h(() => {
910
+ h(this, Kt, /* @__PURE__ */ c(() => {
920
911
  var e;
921
912
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
922
913
  var a;
923
- const i = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
924
- t(this, qt).call(this, n, i);
914
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
915
+ t(this, qt).call(this, n, r);
925
916
  }), t(this, qt).call(this, 0, !1);
926
917
  }, "#init"));
927
- d(this, qt, /* @__PURE__ */ h((e, s = !1) => {
928
- const i = /* @__PURE__ */ h(() => {
918
+ h(this, qt, /* @__PURE__ */ c((e, s = !1) => {
919
+ const r = /* @__PURE__ */ c(() => {
929
920
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
930
- Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
931
- const g = f.filter((b) => b.classList.contains("active"));
932
- g.length < 2 || g.forEach((b) => {
933
- const x = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${x}"]`), A = f[x + 1];
921
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
922
+ const b = f.filter((g) => g.classList.contains("active"));
923
+ b.length < 2 || b.forEach((g) => {
924
+ const x = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${x}"]`), A = f[x + 1];
934
925
  v && A && A.classList.contains("active") && v.style.setProperty("display", "flex");
935
926
  });
936
- }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), a = this.querySelector("nine-table-sheets-body"), o = n.querySelectorAll(".nine-tab-item"), c = a.querySelectorAll("nine-table-sheet");
927
+ }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), a = this.querySelector("nine-table-sheets-body"), o = n.querySelectorAll(".nine-tab-item"), d = a.querySelectorAll("nine-table-sheet");
937
928
  if (!o[e]) return;
938
929
  if (!s)
939
930
  o.forEach((f, u) => {
940
931
  f.classList.toggle("active", u === e);
941
- }), c.forEach((f, u) => {
942
- const g = u === e;
943
- f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
932
+ }), d.forEach((f, u) => {
933
+ const b = u === e;
934
+ f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
944
935
  });
945
936
  else {
946
937
  const f = o[e], u = n.querySelectorAll(".nine-tab-item.active");
947
938
  if (f.classList.contains("active") && u.length <= 1)
948
939
  return;
949
940
  f.classList.toggle("active");
950
- const g = a.querySelector(`nine-table-sheet[data-index="${e}"]`);
951
- g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
941
+ const b = a.querySelector(`nine-table-sheet[data-index="${e}"]`);
942
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
952
943
  }
953
944
  const l = a.querySelectorAll("nine-table-sheet.active");
954
945
  l == null || l.forEach((f) => {
955
946
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
956
- }), i();
947
+ }), r();
957
948
  }, "#switchSheet"));
958
949
  }
959
950
  connectedCallback() {
960
951
  t(this, Kt).call(this);
961
952
  }
962
953
  };
963
- Kt = new WeakMap(), qt = new WeakMap(), h(_e, "NineTableSheets");
954
+ Kt = new WeakMap(), qt = new WeakMap(), c(_e, "NineTableSheets");
964
955
  let de = _e;
965
956
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
966
- var M, Zt, kt, Gt;
957
+ var M, Zt, Tt, Gt;
967
958
  const Ne = class Ne {
968
- constructor(r) {
969
- d(this, M);
970
- d(this, Zt, /* @__PURE__ */ h(() => {
971
- t(this, Gt).call(this), new ResizeObserver((r) => {
972
- for (let e of r)
973
- t(this, M).getAttribute("auto-height") === "true" && t(this, kt).call(this);
959
+ constructor(i) {
960
+ h(this, M);
961
+ h(this, Zt, /* @__PURE__ */ c(() => {
962
+ t(this, Gt).call(this), new ResizeObserver((i) => {
963
+ for (let e of i)
964
+ t(this, M).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
974
965
  }).observe(t(this, M));
975
966
  }, "#init"));
976
- d(this, kt, /* @__PURE__ */ h(() => {
977
- var c, l;
978
- const r = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
979
- if (r.length === 0) return;
980
- const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...r.map((f) => f.getRowHeight())), i = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = $t.SCROLLBAR_SIZE, o = e * s + i + n + a;
967
+ h(this, Tt, /* @__PURE__ */ c(() => {
968
+ var d, l;
969
+ const i = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
970
+ if (i.length === 0) return;
971
+ const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (d = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = $t.SCROLLBAR_SIZE, o = e * s + r + n + a;
981
972
  t(this, M).style.height = `${o}px`;
982
973
  }, "#applyAutoHeight"));
983
- d(this, Gt, /* @__PURE__ */ h(() => {
984
- const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", i = e.length, n = e.map((c, l) => {
985
- const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < i - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
986
- return u + g;
987
- }).join(""), a = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
974
+ h(this, Gt, /* @__PURE__ */ c(() => {
975
+ const e = Array.from(t(this, M).children).filter((d) => d.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, n = e.map((d, l) => {
976
+ const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
977
+ return u + b;
978
+ }).join(""), a = e.map((d, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
988
979
  t(this, M).shadowRoot.innerHTML = `
989
980
  <style>
990
981
  :host {
@@ -1077,76 +1068,76 @@ const Ne = class Ne {
1077
1068
  <nine-table-footer></nine-table-footer>
1078
1069
  `;
1079
1070
  const o = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1080
- o == null || o.forEach((c, l) => {
1071
+ o == null || o.forEach((d, l) => {
1081
1072
  e[l] && setTimeout(() => {
1082
- c.generate(e[l]), s && t(this, kt).call(this);
1073
+ d.generate(e[l]), s && t(this, Tt).call(this);
1083
1074
  });
1084
1075
  });
1085
1076
  }, "#render"));
1086
- y(this, M, r), t(this, Zt).call(this);
1077
+ y(this, M, i), t(this, Zt).call(this);
1087
1078
  }
1088
1079
  };
1089
- M = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1080
+ M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), c(Ne, "LayoutManager");
1090
1081
  let fe = Ne;
1091
- var Tt, ht;
1082
+ var kt, ht;
1092
1083
  const We = class We {
1093
- constructor(r) {
1094
- d(this, Tt);
1095
- d(this, ht, -1);
1096
- E(this, "count", /* @__PURE__ */ h(() => t(this, Tt).rawRecords.length, "count"));
1097
- y(this, Tt, r);
1084
+ constructor(i) {
1085
+ h(this, kt);
1086
+ h(this, ht, -1);
1087
+ E(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
1088
+ y(this, kt, i);
1098
1089
  }
1099
1090
  get at() {
1100
1091
  return t(this, ht);
1101
1092
  }
1102
- set at(r) {
1103
- y(this, ht, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1093
+ set at(i) {
1094
+ y(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1104
1095
  });
1105
1096
  }
1106
1097
  };
1107
- Tt = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1098
+ kt = new WeakMap(), ht = new WeakMap(), c(We, "ngRow");
1108
1099
  let ue = We;
1109
- var I, k, _, dt, Jt, Y, Qt, rt, Ct, te, ee, ft;
1100
+ var I, T, _, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
1110
1101
  const O = class O {
1111
- constructor(r, e) {
1112
- d(this, I);
1113
- d(this, k);
1114
- d(this, _, []);
1115
- d(this, dt, []);
1116
- d(this, Jt, 0);
1117
- d(this, Y, []);
1118
- d(this, Qt, /* @__PURE__ */ h(() => {
1102
+ constructor(i, e) {
1103
+ h(this, I);
1104
+ h(this, T);
1105
+ h(this, _, []);
1106
+ h(this, dt, []);
1107
+ h(this, Jt, 0);
1108
+ h(this, Y, []);
1109
+ h(this, Qt, /* @__PURE__ */ c(() => {
1119
1110
  y(this, Y, []);
1120
- const r = t(this, I).template || [];
1121
- Array.from(r).forEach((e) => {
1111
+ const i = t(this, I).template || [];
1112
+ Array.from(i).forEach((e) => {
1122
1113
  var s;
1123
1114
  t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1124
- }), (t(this, k).rawRecords || []).forEach((e) => {
1115
+ }), (t(this, T).rawRecords || []).forEach((e) => {
1125
1116
  e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
1126
1117
  });
1127
1118
  }, "#initialize"));
1128
- d(this, rt, /* @__PURE__ */ h(() => {
1129
- t(this, I).shadowRoot.querySelectorAll("nine-table-sheet").forEach((r) => {
1130
- r.invalidate();
1119
+ h(this, it, /* @__PURE__ */ c(() => {
1120
+ t(this, I).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1121
+ i.invalidate();
1131
1122
  });
1132
1123
  }, "#invalidate"));
1133
- E(this, "get", /* @__PURE__ */ h((r, e) => {
1124
+ E(this, "get", /* @__PURE__ */ c((i, e) => {
1134
1125
  var n;
1135
1126
  const s = this.getValidData();
1136
1127
  if (!s || s.length <= 0) return;
1137
- if (r == null) return t(this, ft).call(this, s);
1138
- if (r < 0 || r >= s.length) return null;
1139
- const i = typeof ((n = t(this, I).fields) == null ? void 0 : n.get) == "function" ? t(this, I).fields.get() : [];
1128
+ if (i == null) return t(this, ft).call(this, s);
1129
+ if (i < 0 || i >= s.length) return null;
1130
+ const r = typeof ((n = t(this, I).fields) == null ? void 0 : n.get) == "function" ? t(this, I).fields.get() : [];
1140
1131
  if (e != null) {
1141
- const a = i.indexOf(e);
1142
- return a >= 0 ? s[r].v[a] : null;
1132
+ const a = r.indexOf(e);
1133
+ return a >= 0 ? s[i].v[a] : null;
1143
1134
  }
1144
- return t(this, ft).call(this, s[r]);
1135
+ return t(this, ft).call(this, s[i]);
1145
1136
  }, "get"));
1146
- E(this, "set", /* @__PURE__ */ h((r) => {
1147
- this.clear(), this.add(r, !1), t(this, rt).call(this);
1137
+ E(this, "set", /* @__PURE__ */ c((i) => {
1138
+ this.clear(), this.add(i, !1), t(this, it).call(this);
1148
1139
  }, "set"));
1149
- d(this, Ct, /* @__PURE__ */ h(() => ({
1140
+ h(this, Ct, /* @__PURE__ */ c(() => ({
1150
1141
  rowState: O.ROW_STATE.EMPTY,
1151
1142
  deleted: !1,
1152
1143
  filtered: !1,
@@ -1155,85 +1146,85 @@ const O = class O {
1155
1146
  c: {},
1156
1147
  _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1157
1148
  }), "#getDefaultMeta"));
1158
- E(this, "reset", /* @__PURE__ */ h(() => {
1159
- y(this, _, []), y(this, dt, []), t(this, rt).call(this);
1149
+ E(this, "reset", /* @__PURE__ */ c(() => {
1150
+ y(this, _, []), y(this, dt, []), t(this, it).call(this);
1160
1151
  }, "reset"));
1161
- E(this, "clear", /* @__PURE__ */ h(() => {
1162
- var r;
1163
- t(this, k).rawRecords = [], y(this, _, []), y(this, dt, []), (r = t(this, k).viewRecords) != null && r.reset && t(this, k).viewRecords.reset();
1164
- }, "clear"));
1165
- d(this, te, /* @__PURE__ */ h((r) => {
1152
+ E(this, "clear", /* @__PURE__ */ c(() => {
1166
1153
  var i;
1167
- Array.isArray(r) || (r = [r]);
1168
- const e = typeof ((i = t(this, I).fields) == null ? void 0 : i.get) == "function" ? t(this, I).fields.get() : Object.keys(r[0] || {}), s = [];
1169
- return r.forEach((n) => {
1154
+ t(this, T).rawRecords = [], y(this, _, []), y(this, dt, []), (i = t(this, T).viewRecords) != null && i.reset && t(this, T).viewRecords.reset();
1155
+ }, "clear"));
1156
+ h(this, te, /* @__PURE__ */ c((i) => {
1157
+ var r;
1158
+ Array.isArray(i) || (i = [i]);
1159
+ const e = typeof ((r = t(this, I).fields) == null ? void 0 : r.get) == "function" ? t(this, I).fields.get() : Object.keys(i[0] || {}), s = [];
1160
+ return i.forEach((n) => {
1170
1161
  const a = { v: [] };
1171
1162
  e.forEach((o) => {
1172
1163
  a.v.push(n[o] !== void 0 && n[o] !== null ? n[o] : "");
1173
1164
  }), s.push(a);
1174
1165
  }), s;
1175
1166
  }, "#json2Array"));
1176
- d(this, ee, /* @__PURE__ */ h((r) => (Array.isArray(r) || (r = [r]), r.forEach((e) => {
1167
+ h(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1177
1168
  e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1178
- }), r), "#defaultInsert"));
1179
- E(this, "add", /* @__PURE__ */ h((r, e = !0) => {
1180
- r === void 0 && (r = {});
1181
- const s = t(this, te).call(this, r);
1182
- t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1183
- const i = this.count() - 1;
1169
+ }), i), "#defaultInsert"));
1170
+ E(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1171
+ i === void 0 && (i = {});
1172
+ const s = t(this, te).call(this, i);
1173
+ t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1174
+ const r = this.count() - 1;
1184
1175
  return e || s.forEach((n, a) => {
1185
- const o = t(this, k).rawRecords[i - a];
1176
+ const o = t(this, T).rawRecords[r - a];
1186
1177
  o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
1187
- }), t(this, rt).call(this), i;
1178
+ }), t(this, it).call(this), r;
1188
1179
  }, "add"));
1189
- E(this, "delete", /* @__PURE__ */ h((r) => {
1180
+ E(this, "delete", /* @__PURE__ */ c((i) => {
1190
1181
  let e = [];
1191
- Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
1182
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1192
1183
  if (t(this, _)[s]) {
1193
- const i = t(this, _)[s].__ng.rowid;
1194
- t(this, _)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, k).rawRecords.forEach((n) => {
1195
- n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1184
+ const r = t(this, _)[s].__ng.rowid;
1185
+ t(this, _)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, T).rawRecords.forEach((n) => {
1186
+ n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1196
1187
  });
1197
1188
  }
1198
- }), this.resetRecords(), t(this, rt).call(this);
1189
+ }), this.resetRecords(), t(this, it).call(this);
1199
1190
  }, "delete"));
1200
- E(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
1201
- var c;
1202
- r = parseInt(r, 10);
1203
- const n = (typeof ((c = t(this, I).fields) == null ? void 0 : c.get) == "function" ? t(this, I).fields.get() : []).indexOf(e);
1191
+ E(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1192
+ var d;
1193
+ i = parseInt(i, 10);
1194
+ const n = (typeof ((d = t(this, I).fields) == null ? void 0 : d.get) == "function" ? t(this, I).fields.get() : []).indexOf(e);
1204
1195
  if (n < 0) return;
1205
- const a = this.getValidData()[r];
1196
+ const a = this.getValidData()[i];
1206
1197
  if (!a) return;
1207
1198
  const o = a.v[n];
1208
1199
  o !== s && a.__ng.rowState !== O.ROW_STATE.INSERT && (a.__ng.o.hasOwnProperty(e) || (a.__ng.o[e] = o), a.__ng.rowState = O.ROW_STATE.UPDATE), a.v[n] = s;
1209
1200
  }, "setValue"));
1210
- E(this, "resetRecords", /* @__PURE__ */ h(() => {
1211
- y(this, dt, t(this, k).rawRecords.filter((r) => !r.__ng.deleted)), y(this, _, t(this, k).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, k).rawRecords.forEach((r, e) => {
1212
- r.__ng.rowidx = e;
1213
- }), t(this, _).forEach((r, e) => {
1214
- r.__ng.i = e;
1201
+ E(this, "resetRecords", /* @__PURE__ */ c(() => {
1202
+ y(this, dt, t(this, T).rawRecords.filter((i) => !i.__ng.deleted)), y(this, _, t(this, T).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, T).rawRecords.forEach((i, e) => {
1203
+ i.__ng.rowidx = e;
1204
+ }), t(this, _).forEach((i, e) => {
1205
+ i.__ng.i = e;
1215
1206
  });
1216
1207
  }, "resetRecords"));
1217
- E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, _).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1218
- d(this, ft, /* @__PURE__ */ h((r) => {
1208
+ E(this, "getValidData", /* @__PURE__ */ c(() => (t(this, _).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1209
+ h(this, ft, /* @__PURE__ */ c((i) => {
1219
1210
  var a;
1220
- if (!r) return r;
1221
- const e = !Array.isArray(r), s = e ? [r] : r, i = typeof ((a = t(this, I).fields) == null ? void 0 : a.get) == "function" ? t(this, I).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
1222
- const c = {};
1223
- return i.forEach((l, f) => {
1224
- c[l] = o.v ? o.v[f] : o[l];
1225
- }), c.__ng = o.__ng, c;
1211
+ if (!i) return i;
1212
+ const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((a = t(this, I).fields) == null ? void 0 : a.get) == "function" ? t(this, I).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
1213
+ const d = {};
1214
+ return r.forEach((l, f) => {
1215
+ d[l] = o.v ? o.v[f] : o[l];
1216
+ }), d.__ng = o.__ng, d;
1226
1217
  });
1227
1218
  return e ? n[0] : n;
1228
1219
  }, "#conv"));
1229
- E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1230
- y(this, I, r), y(this, k, e), t(this, Qt).call(this);
1220
+ E(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1221
+ y(this, I, i), y(this, T, e), t(this, Qt).call(this);
1231
1222
  }
1232
1223
  get source() {
1233
- return t(this, ft).call(this, t(this, k).rawRecords);
1224
+ return t(this, ft).call(this, t(this, T).rawRecords);
1234
1225
  }
1235
- set source(r) {
1236
- this.clear(), this.add(r, !1);
1226
+ set source(i) {
1227
+ this.clear(), this.add(i, !1);
1237
1228
  }
1238
1229
  get nextId() {
1239
1230
  return ++Ue(this, Jt)._;
@@ -1248,7 +1239,7 @@ const O = class O {
1248
1239
  return this.length;
1249
1240
  }
1250
1241
  };
1251
- I = new WeakMap(), k = new WeakMap(), _ = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1242
+ I = new WeakMap(), T = new WeakMap(), _ = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), c(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1252
1243
  E(O, "ROW_STATE", {
1253
1244
  EMPTY: "EMPTY",
1254
1245
  NORMAL: "NORMAL",
@@ -1257,56 +1248,56 @@ E(O, "ROW_STATE", {
1257
1248
  DELETE: "DELETE"
1258
1249
  });
1259
1250
  let ge = O;
1260
- var it;
1251
+ var rt;
1261
1252
  const Oe = class Oe {
1262
- constructor(r) {
1263
- d(this, it);
1264
- y(this, it, r), this.row = new ue(this), this.data = new ge(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1253
+ constructor(i) {
1254
+ h(this, rt);
1255
+ y(this, rt, i), this.row = new ue(this), this.data = new ge(t(this, rt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1265
1256
  var e;
1266
- (e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
1257
+ (e = t(this, rt).view) != null && e.redraw && t(this, rt).view.redraw();
1267
1258
  }, this.setDataSource = (e) => {
1268
1259
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1269
1260
  }, this.getRowState = (e) => {
1270
- var i, n;
1261
+ var r, n;
1271
1262
  const s = parseInt(e, 10);
1272
1263
  if (!(s >= this.data.count()))
1273
- return (n = (i = this.data.getValidData()[s]) == null ? void 0 : i.__ng) == null ? void 0 : n.rowState;
1264
+ return (n = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : n.rowState;
1274
1265
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1275
1266
  this.row.at = e;
1276
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, i) => {
1277
- e = parseInt(e, 10), this.data.setValue(e, s, i);
1267
+ }, 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) => {
1268
+ e = parseInt(e, 10), this.data.setValue(e, s, r);
1278
1269
  }, this.setDataSource([]);
1279
1270
  }
1280
1271
  };
1281
- it = new WeakMap(), h(Oe, "ngDataManager");
1272
+ rt = new WeakMap(), c(Oe, "ngDataManager");
1282
1273
  let be = Oe;
1283
1274
  var ut, L, Lt, se;
1284
1275
  const Be = class Be {
1285
1276
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1286
- constructor(r) {
1287
- d(this, ut);
1288
- d(this, L, []);
1289
- E(this, "add", /* @__PURE__ */ h((r, e = "string") => {
1290
- r.forEach((s) => {
1291
- t(this, L).some((i) => i.name === s) || t(this, L).push({ name: s, type: e });
1277
+ constructor(i) {
1278
+ h(this, ut);
1279
+ h(this, L, []);
1280
+ E(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1281
+ i.forEach((s) => {
1282
+ t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1292
1283
  }), t(this, Lt).call(this);
1293
1284
  }, "add"));
1294
- d(this, Lt, /* @__PURE__ */ h(() => {
1295
- const r = /* @__PURE__ */ new Map();
1285
+ h(this, Lt, /* @__PURE__ */ c(() => {
1286
+ const i = /* @__PURE__ */ new Map();
1296
1287
  t(this, L).forEach((e) => {
1297
- r.set(e.name, e.type);
1298
- }), y(this, L, Array.from(r, ([e, s]) => ({ name: e, type: s }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1288
+ i.set(e.name, e.type);
1289
+ }), y(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1299
1290
  }, "#adjust"));
1300
- d(this, se, /* @__PURE__ */ h(() => {
1291
+ h(this, se, /* @__PURE__ */ c(() => {
1301
1292
  y(this, L, []), N.log(t(this, ut).querySelectorAll("table"));
1302
- const r = Array.from(t(this, ut).querySelectorAll("table"));
1303
- if (!(!r || r.length === 0)) {
1304
- for (const e of r)
1305
- N.log(e), $("[data-bind]", e).each((s, i) => {
1306
- const n = i.dataset.bind, a = i.getAttribute("data-type") || "string";
1293
+ const i = Array.from(t(this, ut).querySelectorAll("table"));
1294
+ if (!(!i || i.length === 0)) {
1295
+ for (const e of i)
1296
+ N.log(e), $("[data-bind]", e).each((s, r) => {
1297
+ const n = r.dataset.bind, a = r.getAttribute("data-type") || "string";
1307
1298
  n && t(this, L).push({ name: n, type: a });
1308
1299
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1309
- $(`[${s}]`, e).each((i, n) => {
1300
+ $(`[${s}]`, e).each((r, n) => {
1310
1301
  var a = n.getAttribute(s);
1311
1302
  if (a.indexOf("data.") < 0) {
1312
1303
  const o = a.search(/[(]/g);
@@ -1319,9 +1310,9 @@ const Be = class Be {
1319
1310
  }
1320
1311
  a.split("data.").forEach((o) => {
1321
1312
  if (o.trim() != "") {
1322
- const c = o.search(/[^_A-Za-z0-9]/g);
1313
+ const d = o.search(/[^_A-Za-z0-9]/g);
1323
1314
  let l = "";
1324
- c >= 0 ? l = o.substring(0, c) : a.startsWith("data.") && (l = o.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1315
+ d >= 0 ? l = o.substring(0, d) : a.startsWith("data.") && (l = o.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1325
1316
  }
1326
1317
  });
1327
1318
  });
@@ -1329,44 +1320,44 @@ const Be = class Be {
1329
1320
  t(this, Lt).call(this);
1330
1321
  }
1331
1322
  }, "#init"));
1332
- y(this, ut, r), t(this, se).call(this);
1323
+ y(this, ut, i), t(this, se).call(this);
1333
1324
  }
1334
1325
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1335
1326
  get() {
1336
- return t(this, L).map((r) => r.name);
1327
+ return t(this, L).map((i) => i.name);
1337
1328
  }
1338
1329
  // 🎯 내부 객체 통째로 얻기
1339
1330
  getFields() {
1340
1331
  return t(this, L);
1341
1332
  }
1342
1333
  // 🎯 특정 필드의 데이터 타입 조회
1343
- getType(r) {
1344
- const e = t(this, L).find((s) => s.name === r);
1334
+ getType(i) {
1335
+ const e = t(this, L).find((s) => s.name === i);
1345
1336
  return e ? e.type : "string";
1346
1337
  }
1347
- indexOf(r) {
1348
- return t(this, L).findIndex((e) => e.name === r);
1338
+ indexOf(i) {
1339
+ return t(this, L).findIndex((e) => e.name === i);
1349
1340
  }
1350
- includes(r) {
1351
- return t(this, L).some((e) => e.name === r);
1341
+ includes(i) {
1342
+ return t(this, L).some((e) => e.name === i);
1352
1343
  }
1353
1344
  };
1354
- ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Be, "ngFields");
1345
+ ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), c(Be, "ngFields");
1355
1346
  let ye = Be;
1356
- var nt, re, ie;
1347
+ var nt, ie, re;
1357
1348
  const ze = class ze extends HTMLElement {
1358
1349
  constructor() {
1359
1350
  super();
1360
1351
  //#created = false;
1361
- d(this, nt);
1362
- d(this, re);
1363
- d(this, ie, /* @__PURE__ */ h(() => {
1364
- this.fields = new ye(this), y(this, re, new fe(this)), N.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1352
+ h(this, nt);
1353
+ h(this, ie);
1354
+ h(this, re, /* @__PURE__ */ c(() => {
1355
+ this.fields = new ye(this), y(this, ie, new fe(this)), N.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1365
1356
  }, "#init"));
1366
1357
  this.attachShadow({ mode: "open" }), y(this, nt, new be(this));
1367
1358
  }
1368
1359
  connectedCallback() {
1369
- t(this, ie).call(this);
1360
+ t(this, re).call(this);
1370
1361
  }
1371
1362
  disconnectedCallback() {
1372
1363
  N.log("NineTable disconnected.");
@@ -1384,7 +1375,7 @@ const ze = class ze extends HTMLElement {
1384
1375
  return t(this, nt);
1385
1376
  }
1386
1377
  };
1387
- nt = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), h(ze, "NineTable");
1378
+ nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), c(ze, "NineTable");
1388
1379
  let pe = ze;
1389
1380
  customElements.get("nine-table") || customElements.define("nine-table", pe);
1390
1381
  const mt = class mt extends HTMLElement {
@@ -1398,56 +1389,56 @@ const mt = class mt extends HTMLElement {
1398
1389
  connectedCallback() {
1399
1390
  }
1400
1391
  };
1401
- h(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1392
+ c(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1402
1393
  let me = mt;
1403
- var T, Ht, p, Re, qe, ke, Te, Ce;
1394
+ var k, Ht, p, Re, qe, Te, ke, Ce;
1404
1395
  const Pe = class Pe extends me {
1405
1396
  constructor() {
1406
1397
  super();
1407
- d(this, T);
1408
- d(this, Ht);
1409
- d(this, p);
1410
- d(this, Re);
1411
- d(this, qe);
1412
- d(this, ke);
1413
- d(this, Te);
1414
- E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1398
+ h(this, k);
1399
+ h(this, Ht);
1400
+ h(this, p);
1401
+ h(this, Re);
1402
+ h(this, qe);
1403
+ h(this, Te);
1404
+ h(this, ke);
1405
+ E(this, "getDisplayText", /* @__PURE__ */ c((e) => {
1415
1406
  if (t(this, p))
1416
1407
  if (t(this, p).closest("tbody")) {
1417
- const s = t(this, p).closest("tr").data, i = parseInt(t(this, p).dataset.row);
1408
+ const s = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
1418
1409
  if (!s) return "";
1419
1410
  if (ninegrid.isNull(t(this, p).dataset.expr)) {
1420
1411
  if (!ninegrid.isNull(t(this, p).dataset.bind))
1421
1412
  return s[t(this, p).dataset.bind] || ninegrid.nvl(e, "");
1422
1413
  } else try {
1423
- return this.getExprValue(t(this, p).dataset.expr, s, i, t(this, p));
1414
+ return this.getExprValue(t(this, p).dataset.expr, s, r, t(this, p));
1424
1415
  } catch {
1425
1416
  console.error(t(this, p).dataset.expr, s, t(this, p).dataset.row);
1426
1417
  }
1427
1418
  return ninegrid.nvl(e, "");
1428
1419
  } else
1429
1420
  try {
1430
- return t(this, T).exprFunction(t(this, p).dataset.expr).call(this, null, -1, t(this, T).data);
1421
+ return t(this, k).exprFunction(t(this, p).dataset.expr).call(this, null, -1, t(this, k).data);
1431
1422
  } catch {
1432
1423
  }
1433
1424
  }, "getDisplayText"));
1434
- d(this, Ce, /* @__PURE__ */ h(() => {
1435
- if (!(!t(this, T) || !t(this, T).template || !t(this, p).closest("tbody.bindable"))) {
1425
+ h(this, Ce, /* @__PURE__ */ c(() => {
1426
+ if (!(!t(this, k) || !t(this, k).template || !t(this, p).closest("tbody.bindable"))) {
1436
1427
  var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
1437
1428
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1438
- var s = t(this, p).closest("tr"), i = [];
1429
+ var s = t(this, p).closest("tr"), r = [];
1439
1430
  $("th,td", s).each((m, W) => {
1440
1431
  var C = ninegrid.j.querySelectorAll(W).attr("suppress");
1441
- C && W.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && i.push(C));
1442
- }), i.sort();
1432
+ C && W.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && r.push(C));
1433
+ }), r.sort();
1443
1434
  var n = !1;
1444
- if (parseInt(s.sectionRowIndex / t(this, T).template.length) > 0)
1445
- for (var a of i) {
1435
+ if (parseInt(s.sectionRowIndex / t(this, k).template.length) > 0)
1436
+ for (var a of r) {
1446
1437
  if (a > e) break;
1447
- var o = parseInt(t(this, p).dataset.row), c = o - 1, l = t(this, p).closest("tr").data, f = t(this, T).data.get(c);
1438
+ var o = parseInt(t(this, p).dataset.row), d = o - 1, l = t(this, p).closest("tr").data, f = t(this, k).data.get(d);
1448
1439
  t(this, p).dataset.matrixRow;
1449
- var u = t(this, T).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1450
- if (g != b) {
1440
+ var u = t(this, k).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, d) : f[u.dataset.bind];
1441
+ if (b != g) {
1451
1442
  n = !0;
1452
1443
  break;
1453
1444
  }
@@ -1455,17 +1446,17 @@ const Pe = class Pe extends me {
1455
1446
  else
1456
1447
  n = !0;
1457
1448
  n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, p)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, p)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, p)).addClass("hidden"));
1458
- var x = parseInt(t(this, p).dataset.matrixRow), v = x - 1, A = t(this, T).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
1449
+ var x = parseInt(t(this, p).dataset.matrixRow), v = x - 1, A = t(this, k).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
1459
1450
  $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1460
1451
  }
1461
1452
  }
1462
1453
  }, "#resetSuppress"));
1463
- E(this, "getExprValue", /* @__PURE__ */ h((e, s, i, n) => {
1454
+ E(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
1464
1455
  if (typeof e < "u")
1465
1456
  try {
1466
- i = parseInt(i);
1457
+ r = parseInt(r);
1467
1458
  const a = e.replace("()", "");
1468
- return t(this, T)[a] ? t(this, T)[a].call(this, s, i, t(this, p)) : t(this, T).exprFunction(e).call(this, s, i, t(this, T).data);
1459
+ return t(this, k)[a] ? t(this, k)[a].call(this, s, r, t(this, p)) : t(this, k).exprFunction(e).call(this, s, r, t(this, k).data);
1469
1460
  } catch {
1470
1461
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1471
1462
  }
@@ -1474,16 +1465,16 @@ const Pe = class Pe extends me {
1474
1465
  }, "getExprValue"));
1475
1466
  }
1476
1467
  connectedCallback() {
1477
- super.connectedCallback(), y(this, T, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
1468
+ super.connectedCallback(), y(this, k, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
1478
1469
  }
1479
1470
  get value() {
1480
- var e = !t(this, T) || !t(this, T).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
1471
+ var e = !t(this, k) || !t(this, k).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
1481
1472
  return e ?? "";
1482
1473
  }
1483
1474
  set value(e) {
1484
1475
  var s = parseInt(t(this, p).dataset.row);
1485
- const i = this.getAttribute("update-row-state") != "false";
1486
- s < 0 ? t(this, T).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, i) : t(this, T).data.setValue(s, t(this, p).dataset.bind, e, i);
1476
+ const r = this.getAttribute("update-row-state") != "false";
1477
+ s < 0 ? t(this, k).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, r) : t(this, k).data.setValue(s, t(this, p).dataset.bind, e, r);
1487
1478
  }
1488
1479
  get row() {
1489
1480
  return parseInt(t(this, p).dataset.row);
@@ -1496,7 +1487,7 @@ const Pe = class Pe extends me {
1496
1487
  return parseInt(t(this, p).dataset.row), t(this, Ht).data[e];
1497
1488
  }
1498
1489
  };
1499
- T = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellElement");
1490
+ k = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), c(Pe, "CellElement");
1500
1491
  let xe = Pe;
1501
1492
  const De = class De extends xe {
1502
1493
  constructor() {
@@ -1509,19 +1500,19 @@ const De = class De extends xe {
1509
1500
  return super.refresh();
1510
1501
  }
1511
1502
  };
1512
- h(De, "EditableCellElement");
1503
+ c(De, "EditableCellElement");
1513
1504
  let ve = De;
1514
1505
  var Mt, ot, gt, bt, ne, U, Le;
1515
1506
  const je = class je extends ve {
1516
1507
  constructor() {
1517
1508
  super();
1518
- d(this, Mt);
1519
- d(this, ot);
1520
- d(this, gt);
1521
- d(this, bt);
1522
- d(this, ne);
1523
- d(this, U);
1524
- E(this, "refresh", /* @__PURE__ */ h(() => {
1509
+ h(this, Mt);
1510
+ h(this, ot);
1511
+ h(this, gt);
1512
+ h(this, bt);
1513
+ h(this, ne);
1514
+ h(this, U);
1515
+ E(this, "refresh", /* @__PURE__ */ c(() => {
1525
1516
  const e = super.refresh();
1526
1517
  t(this, Mt).value = e;
1527
1518
  }, "refresh"));
@@ -1555,14 +1546,14 @@ const je = class je extends ve {
1555
1546
  if (!v) this.reset();
1556
1547
  };
1557
1548
  */
1558
- d(this, Le, /* @__PURE__ */ h((e) => {
1549
+ h(this, Le, /* @__PURE__ */ c((e) => {
1559
1550
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1560
1551
  if (t(this, ot) == "number") {
1561
1552
  let n = [];
1562
1553
  if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, bt) && Number(t(this, bt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1563
- var s = e.target.value, i = s.indexOf(".");
1564
- if (i >= 0) {
1565
- var s = s.substr(i + 1, s.length);
1554
+ var s = e.target.value, r = s.indexOf(".");
1555
+ if (r >= 0) {
1556
+ var s = s.substr(r + 1, s.length);
1566
1557
  s.length >= Number(t(this, U)) && e.preventDefault();
1567
1558
  }
1568
1559
  }
@@ -1583,7 +1574,7 @@ const je = class je extends ve {
1583
1574
  `, super.connectedCallback(), y(this, Mt, this.querySelector("input"));
1584
1575
  }
1585
1576
  };
1586
- Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
1577
+ Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), c(je, "CellInputText");
1587
1578
  let we = je;
1588
1579
  customElements.get("cell-input-text");
1589
1580
  customElements.get("cell-input") || customElements.define("cell-input", we);