@ninebone/table 0.0.440 β†’ 0.0.442

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,51 +1,51 @@
1
- var me = Object.defineProperty;
2
- var xe = (x) => {
3
- throw TypeError(x);
1
+ var xe = Object.defineProperty;
2
+ var ve = (S) => {
3
+ throw TypeError(S);
4
4
  };
5
- var Se = (x, i, e) => i in x ? me(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
- var c = (x, i) => me(x, "name", { value: i, configurable: !0 });
7
- var v = (x, i, e) => Se(x, typeof i != "symbol" ? i + "" : i, e), ve = (x, i, e) => i.has(x) || xe("Cannot " + e);
8
- var t = (x, i, e) => (ve(x, i, "read from private field"), e ? e.call(x) : i.get(x)), d = (x, i, e) => i.has(x) ? xe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, n) => (ve(x, i, "write to private field"), n ? n.call(x, e) : i.set(x, e), e);
9
- var we = (x, i, e, n) => ({
5
+ var Ee = (S, n, e) => n in S ? xe(S, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : S[n] = e;
6
+ var h = (S, n) => xe(S, "name", { value: n, configurable: !0 });
7
+ var E = (S, n, e) => Ee(S, typeof n != "symbol" ? n + "" : n, e), we = (S, n, e) => n.has(S) || ve("Cannot " + e);
8
+ var t = (S, n, e) => (we(S, n, "read from private field"), e ? e.call(S) : n.get(S)), d = (S, n, e) => n.has(S) ? ve("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(S) : n.set(S, e), u = (S, n, e, i) => (we(S, n, "write to private field"), i ? i.call(S, e) : n.set(S, e), e);
9
+ var Se = (S, n, e, i) => ({
10
10
  set _(s) {
11
- g(x, i, s, e);
11
+ u(S, n, s, e);
12
12
  },
13
13
  get _() {
14
- return t(x, i, n);
14
+ return t(S, n, i);
15
15
  }
16
16
  });
17
- import { trace as Ee } from "@ninebone/util";
18
- const le = class le extends Ee.constructor {
17
+ import { trace as Re } from "@ninebone/util";
18
+ const ce = class ce extends Re.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- c(le, "Trace");
24
- let Kt = le;
25
- const lt = new Kt();
26
- var M, W, p, B, P, D, Et, Y, Rt;
27
- const ae = class ae extends HTMLElement {
23
+ h(ce, "Trace");
24
+ let Gt = ce;
25
+ const dt = new Gt();
26
+ var I, B, m, Y, F, V, At, X, qt;
27
+ const he = class he extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, M);
31
- d(this, W, !1);
32
- d(this, p);
33
- d(this, B);
34
- d(this, P);
35
- d(this, D);
36
- d(this, Et, /* @__PURE__ */ c(() => {
37
- if (!t(this, M)) return;
38
- const e = t(this, M).querySelector(".ng-container-body");
39
- e && (g(this, D, new ResizeObserver(() => {
30
+ d(this, I);
31
+ d(this, B, !1);
32
+ d(this, m);
33
+ d(this, Y);
34
+ d(this, F);
35
+ d(this, V);
36
+ d(this, At, /* @__PURE__ */ h(() => {
37
+ if (!t(this, I)) return;
38
+ const e = t(this, I).querySelector(".ng-container-body .ng-part-body");
39
+ e && (u(this, V, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, D).observe(e));
41
+ })), t(this, V).observe(e));
42
42
  }, "#observeResize"));
43
- v(this, "refresh", /* @__PURE__ */ c(() => {
44
- if (!t(this, M) || !t(this, p) || t(this, W)) return;
45
- const e = t(this, p).container, n = e.querySelector("table");
46
- if (!n) return;
47
- const s = t(this, p).track, r = t(this, p).thumb, o = t(this, M).querySelector(".ng-container-bottom"), l = e.clientWidth, h = n.scrollWidth;
48
- if (l !== 0 && h > l)
43
+ E(this, "refresh", /* @__PURE__ */ h(() => {
44
+ if (!t(this, I) || !t(this, m) || t(this, B)) return;
45
+ const e = t(this, m).container, i = e.querySelector("table");
46
+ if (!i) return;
47
+ const s = t(this, m).track, r = t(this, m).thumb, o = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, c = i.scrollWidth;
48
+ if (l !== 0 && c > l)
49
49
  o && (o.style.display = "flex");
50
50
  else {
51
51
  o && (o.style.display = "none");
@@ -53,66 +53,66 @@ const ae = class ae extends HTMLElement {
53
53
  }
54
54
  const a = s.clientWidth;
55
55
  if (a <= 0) return;
56
- const f = Math.max(Math.min(a * (l / h), a), 20);
56
+ const f = Math.max(Math.min(a * (l / c), a), 20);
57
57
  r.style.width = `${f}px`;
58
- const u = e.scrollLeft, b = h - l;
59
- let y = 0;
60
- b > 0 && (y = parseInt(u / b * (a - f), 10)), y < 0 && (y = 0);
61
- const m = a - f;
62
- y > m && (y = m), r.style.left = `${y}px`, lt.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= m - 1;
58
+ const g = e.scrollLeft, y = c - l;
59
+ let b = 0;
60
+ y > 0 && (b = parseInt(g / y * (a - f), 10)), b < 0 && (b = 0);
61
+ const p = a - f;
62
+ b > p && (b = p), r.style.left = `${b}px`, t(this, m).left.disabled = b === 0, t(this, m).right.disabled = b >= p - 1;
63
63
  }, "refresh"));
64
- d(this, Y, /* @__PURE__ */ c((e) => {
65
- if (!t(this, p)) return !1;
66
- const n = t(this, p).container, s = n.querySelector("table");
64
+ d(this, X, /* @__PURE__ */ h((e) => {
65
+ if (!t(this, m)) return !1;
66
+ const i = t(this, m).container, s = i.querySelector("table");
67
67
  if (!s) return !1;
68
- const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
68
+ const r = t(this, m).track.getBoundingClientRect(), o = t(this, m).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const h = r.width - o;
72
- l > h && (l = h), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= h - 1;
73
- const a = n.clientWidth, u = s.scrollWidth - a;
74
- return h > 0 && u > 0 && (n.scrollLeft = l / h * u), l > 0 && l < h - 1;
71
+ const c = r.width - o;
72
+ l > c && (l = c), l = parseInt(l, 10), t(this, m).thumb.style.left = `${l}px`, t(this, m).left.disabled = l === 0, t(this, m).right.disabled = l >= c - 1;
73
+ const a = i.clientWidth, g = s.scrollWidth - a;
74
+ return c > 0 && g > 0 && (i.scrollLeft = l / c * g), l > 0 && l < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, Rt, /* @__PURE__ */ c(() => {
77
- const e = /* @__PURE__ */ c((s) => {
78
- clearInterval(t(this, B)), clearInterval(t(this, P));
79
- const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
- t(this, Y).call(this, r + s), g(this, B, setInterval(() => {
81
- clearInterval(t(this, B)), g(this, P, setInterval(() => {
82
- const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
- t(this, Y).call(this, o + s) || clearInterval(t(this, P));
76
+ d(this, qt, /* @__PURE__ */ h(() => {
77
+ const e = /* @__PURE__ */ h((s) => {
78
+ clearInterval(t(this, Y)), clearInterval(t(this, F));
79
+ const r = parseInt(t(this, m).thumb.style.left || 0, 10);
80
+ t(this, X).call(this, r + s), u(this, Y, setInterval(() => {
81
+ clearInterval(t(this, Y)), u(this, F, setInterval(() => {
82
+ const o = parseInt(t(this, m).thumb.style.left || 0, 10);
83
+ t(this, X).call(this, o + s) || clearInterval(t(this, F));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), n = /* @__PURE__ */ c(() => {
87
- clearInterval(t(this, B)), clearInterval(t(this, P));
86
+ }, "delayScroll"), i = /* @__PURE__ */ h(() => {
87
+ clearInterval(t(this, Y)), clearInterval(t(this, F));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((s) => {
90
- t(this, p).left.addEventListener(s, n), t(this, p).right.addEventListener(s, n), t(this, p).track.addEventListener(s, n);
91
- }), t(this, p).left.addEventListener("mousedown", (s) => {
90
+ t(this, m).left.addEventListener(s, i), t(this, m).right.addEventListener(s, i), t(this, m).track.addEventListener(s, i);
91
+ }), t(this, m).left.addEventListener("mousedown", (s) => {
92
92
  s.button === 0 && e(-20);
93
- }), t(this, p).right.addEventListener("mousedown", (s) => {
93
+ }), t(this, m).right.addEventListener("mousedown", (s) => {
94
94
  s.button === 0 && e(20);
95
- }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (s) => {
95
+ }), t(this, m).left.addEventListener("touchstart", () => e(-20)), t(this, m).right.addEventListener("touchstart", () => e(20)), t(this, m).track.addEventListener("mousedown", (s) => {
96
96
  if (s.button !== 0) return;
97
97
  s.preventDefault();
98
- const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
99
- t(this, Y).call(this, s.clientX - r.left - o / 2);
100
- }), t(this, p).thumb.addEventListener("mousedown", (s) => {
98
+ const r = t(this, m).track.getBoundingClientRect(), o = t(this, m).thumb.clientWidth;
99
+ t(this, X).call(this, s.clientX - r.left - o / 2);
100
+ }), t(this, m).thumb.addEventListener("mousedown", (s) => {
101
101
  if (s.button !== 0) return;
102
- s.stopPropagation(), s.preventDefault(), g(this, W, !0), this.shiftX = s.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
- const r = /* @__PURE__ */ c((l) => {
104
- if (!t(this, W)) return;
105
- const h = t(this, p).track.getBoundingClientRect();
106
- t(this, Y).call(this, l.clientX - h.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
- g(this, W, !1), n(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
102
+ s.stopPropagation(), s.preventDefault(), u(this, B, !0), this.shiftX = s.clientX - t(this, m).thumb.getBoundingClientRect().left;
103
+ const r = /* @__PURE__ */ h((l) => {
104
+ if (!t(this, B)) return;
105
+ const c = t(this, m).track.getBoundingClientRect();
106
+ t(this, X).call(this, l.clientX - c.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
+ u(this, B, !1), i(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (g(this, M, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, M)) return;
115
+ if (u(this, I, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, I)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -176,100 +176,100 @@ const ae = class ae extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ c(() => {
180
- const n = t(this, M).querySelector(".ng-container-body");
181
- if (!n) {
179
+ const e = /* @__PURE__ */ h(() => {
180
+ const i = t(this, I).querySelector(".ng-container-body .ng-part-body");
181
+ if (!i) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- g(this, p, {
186
- container: n,
185
+ u(this, m, {
186
+ container: i,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
- }), n.addEventListener("scroll", () => {
192
- t(this, W) || this.refresh();
193
- }), t(this, Rt).call(this), t(this, Et).call(this), this.refresh();
191
+ }), i.addEventListener("scroll", () => {
192
+ t(this, B) || this.refresh();
193
+ }), t(this, qt).call(this), t(this, At).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, D) && t(this, D).disconnect();
198
+ t(this, V) && t(this, V).disconnect();
199
199
  }
200
200
  };
201
- M = new WeakMap(), W = new WeakMap(), p = new WeakMap(), B = new WeakMap(), P = new WeakMap(), D = new WeakMap(), Et = new WeakMap(), Y = new WeakMap(), Rt = new WeakMap(), c(ae, "NineTableHScrollBar");
202
- let Zt = ae;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Zt);
204
- var O, J, V, S, ht, dt, At;
205
- const ce = class ce extends HTMLElement {
201
+ I = new WeakMap(), B = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), F = new WeakMap(), V = new WeakMap(), At = new WeakMap(), X = new WeakMap(), qt = new WeakMap(), h(he, "NineTableHScrollBar");
202
+ let Jt = he;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Jt);
204
+ var N, et, U, R, ft, gt, Tt;
205
+ const de = class de extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, O);
209
- d(this, J);
210
- d(this, V, !1);
211
- d(this, S);
212
- d(this, ht, 0);
213
- d(this, dt, 0);
214
- v(this, "refresh", /* @__PURE__ */ c(() => {
215
- if (!t(this, O) || !t(this, S)) return;
216
- const e = t(this, S).container, n = t(this, S).track, s = t(this, S).thumb, r = e.clientHeight, l = (t(this, O).data.get() || []).length, h = t(this, J).getRowHeight(), a = l * h;
208
+ d(this, N);
209
+ d(this, et);
210
+ d(this, U, !1);
211
+ d(this, R);
212
+ d(this, ft, 0);
213
+ d(this, gt, 0);
214
+ E(this, "refresh", /* @__PURE__ */ h(() => {
215
+ if (!t(this, N) || !t(this, R)) return;
216
+ const e = t(this, R).container, i = t(this, R).track, s = t(this, R).thumb, r = e.clientHeight, l = (t(this, N).data.get() || []).length, c = t(this, et).getRowHeight(), a = l * c;
217
217
  if (a <= r) {
218
- s.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
218
+ s.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
219
219
  return;
220
220
  } else
221
221
  s.style.display = "block";
222
- const f = n.clientHeight;
222
+ const f = i.clientHeight;
223
223
  if (f <= 0) return;
224
- const u = Math.max(Math.min(f * (r / a), f), 20);
225
- s.style.height = `${u}px`;
226
- const b = e.scrollTop, y = Math.max(a - r, 1);
227
- let m = 0;
228
- y > 0 && (m = b / y * (f - u));
229
- const R = f - u;
230
- m < 0 && (m = 0), m > R && (m = R), s.style.top = `${m}px`, t(this, S).top.disabled = b <= 0, t(this, S).bottom.disabled = b >= y - 1;
224
+ const g = Math.max(Math.min(f * (r / a), f), 20);
225
+ s.style.height = `${g}px`;
226
+ const y = e.scrollTop, b = Math.max(a - r, 1);
227
+ let p = 0;
228
+ b > 0 && (p = y / b * (f - g));
229
+ const v = f - g;
230
+ p < 0 && (p = 0), p > v && (p = v), s.style.top = `${p}px`, t(this, R).top.disabled = y <= 0, t(this, R).bottom.disabled = y >= b - 1;
231
231
  }, "refresh"));
232
- d(this, At, /* @__PURE__ */ c(() => {
233
- const e = t(this, S).container, n = /* @__PURE__ */ c(() => {
234
- const r = (t(this, O).data.get() || []).length, o = t(this, J).getRowHeight();
232
+ d(this, Tt, /* @__PURE__ */ h(() => {
233
+ const e = t(this, R).container, i = /* @__PURE__ */ h(() => {
234
+ const r = (t(this, N).data.get() || []).length, o = t(this, et).getRowHeight();
235
235
  return r * o;
236
236
  }, "getContentHeight");
237
237
  e.addEventListener("scroll", () => {
238
- t(this, V) || this.refresh();
239
- }), t(this, S).thumb.addEventListener("mousedown", (s) => {
238
+ t(this, U) || this.refresh();
239
+ }), t(this, R).thumb.addEventListener("mousedown", (s) => {
240
240
  if (s.button !== 0) return;
241
- s.stopPropagation(), s.preventDefault(), g(this, V, !0), g(this, ht, s.clientY), g(this, dt, e.scrollTop);
242
- const r = /* @__PURE__ */ c((l) => {
243
- if (!t(this, V)) return;
244
- const h = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, u = h.height - a, b = l.clientY - t(this, ht), y = e.clientHeight, m = n(), R = Math.max(m - y, 1);
245
- if (u > 0 && R > 0) {
246
- const G = b / u * R;
247
- let at = t(this, dt) + G;
248
- const pe = Math.max(0, m - y);
249
- at < 0 && (at = 0), at > pe && (at = pe), e.scrollTop = at;
241
+ s.stopPropagation(), s.preventDefault(), u(this, U, !0), u(this, ft, s.clientY), u(this, gt, e.scrollTop);
242
+ const r = /* @__PURE__ */ h((l) => {
243
+ if (!t(this, U)) return;
244
+ const c = t(this, R).track.getBoundingClientRect(), a = t(this, R).thumb.clientHeight, g = c.height - a, y = l.clientY - t(this, ft), b = e.clientHeight, p = i(), v = Math.max(p - b, 1);
245
+ if (g > 0 && v > 0) {
246
+ const M = y / g * v;
247
+ let x = t(this, gt) + M;
248
+ const tt = Math.max(0, p - b);
249
+ x < 0 && (x = 0), x > tt && (x = tt), e.scrollTop = x;
250
250
  }
251
251
  this.refresh();
252
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
253
- g(this, V, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
252
+ }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
253
+ u(this, U, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
254
254
  }, "onMouseUp");
255
255
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
256
- }), t(this, S).track.addEventListener("mousedown", (s) => {
257
- if (s.button !== 0 || s.target === t(this, S).thumb) return;
258
- const r = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
259
- if (a > 0 && b > 0) {
260
- const y = Math.max(0, Math.min(1, l / a));
261
- e.scrollTop = y * b;
256
+ }), t(this, R).track.addEventListener("mousedown", (s) => {
257
+ if (s.button !== 0 || s.target === t(this, R).thumb) return;
258
+ const r = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, g = i(), y = Math.max(g - f, 1);
259
+ if (a > 0 && y > 0) {
260
+ const b = Math.max(0, Math.min(1, l / a));
261
+ e.scrollTop = b * y;
262
262
  }
263
263
  this.refresh();
264
- }), t(this, S).top.addEventListener("click", () => {
264
+ }), t(this, R).top.addEventListener("click", () => {
265
265
  e.scrollTop -= 40;
266
- }), t(this, S).bottom.addEventListener("click", () => {
266
+ }), t(this, R).bottom.addEventListener("click", () => {
267
267
  e.scrollTop += 40;
268
268
  });
269
269
  }, "#init"));
270
270
  }
271
271
  connectedCallback() {
272
- g(this, O, this.getRootNode().host), g(this, J, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ u(this, N, this.getRootNode().host), u(this, et, this.closest("nine-table-sheet")), this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
275
275
  display: flex;
@@ -333,45 +333,45 @@ const ce = class ce extends HTMLElement {
333
333
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
334
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
335
335
  `;
336
- const e = /* @__PURE__ */ c(() => {
337
- const n = t(this, O).shadowRoot.querySelector(".ng-container-body .ng-part-body");
338
- if (!n) {
336
+ const e = /* @__PURE__ */ h(() => {
337
+ const i = t(this, N).shadowRoot.querySelector(".ng-container-body .ng-part-body");
338
+ if (!i) {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
- g(this, S, {
343
- container: n,
342
+ u(this, R, {
343
+ container: i,
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, At).call(this), this.refresh();
348
+ }), t(this, Tt).call(this), this.refresh();
349
349
  }, "initWhenReady");
350
350
  e();
351
351
  }
352
352
  };
353
- O = new WeakMap(), J = new WeakMap(), V = new WeakMap(), S = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), At = new WeakMap(), c(ce, "NineTableVScrollBar");
354
- let Gt = ce;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Gt);
356
- var I, w, _, q, z, X, ft, Q, qt, Tt, kt, ut, gt, Lt, Ct, bt, Ht, tt, yt, Mt;
357
- const he = class he {
358
- constructor(i) {
359
- d(this, I);
353
+ N = new WeakMap(), et = new WeakMap(), U = new WeakMap(), R = new WeakMap(), ft = new WeakMap(), gt = new WeakMap(), Tt = new WeakMap(), h(de, "NineTableVScrollBar");
354
+ let Qt = de;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Qt);
356
+ var z, w, W, T, P, j, ut, nt, kt, Lt, Ct, bt, yt, Ht, Mt, pt, _t, it, mt, $t;
357
+ const fe = class fe {
358
+ constructor(n) {
359
+ d(this, z);
360
360
  d(this, w);
361
- d(this, _, /* @__PURE__ */ new Map());
362
- d(this, q, null);
363
- d(this, z, null);
364
- d(this, X, 0);
365
- d(this, ft, 40);
366
- d(this, Q, !1);
367
- d(this, qt, 3);
368
- v(this, "refresh", /* @__PURE__ */ c(() => {
361
+ d(this, W, /* @__PURE__ */ new Map());
362
+ d(this, T, null);
363
+ d(this, P, null);
364
+ d(this, j, 0);
365
+ d(this, ut, 40);
366
+ d(this, nt, !1);
367
+ d(this, kt, 3);
368
+ E(this, "refresh", /* @__PURE__ */ h(() => {
369
369
  var e;
370
- const i = t(this, w).querySelector(".ng-container-body .ng-part-body");
371
- i && (t(this, ut).call(this), t(this, tt).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
370
+ const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
371
+ n && (t(this, bt).call(this), t(this, it).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
372
372
  }, "refresh"));
373
- v(this, "initialize", /* @__PURE__ */ c(() => {
374
- g(this, q, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
373
+ E(this, "initialize", /* @__PURE__ */ h(() => {
374
+ u(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
375
375
  const r = t(this, w).querySelector(s);
376
376
  if (!r) return;
377
377
  const o = r.querySelector(".ng-part-body table");
@@ -379,57 +379,58 @@ const he = class he {
379
379
  const l = o.querySelector("tbody.bindable-tbody");
380
380
  if (!l) return;
381
381
  const a = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
382
- t(this, _).set(s, a);
382
+ t(this, W).set(s, a);
383
383
  });
384
- const i = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), n = t(this, w).querySelector(".ng-container-right .ng-part-body");
385
- if (i) {
386
- t(this, kt).call(this, i), t(this, bt).call(this), t(this, ut).call(this), t(this, tt).call(this, i.scrollTop);
387
- let s = i.scrollTop;
388
- const r = /* @__PURE__ */ c((o) => {
389
- var l;
390
- e && e.scrollTop !== o && (e.scrollTop = o), n && n.scrollTop !== o && (n.scrollTop = o), t(this, tt).call(this, o), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
384
+ const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), i = t(this, w).querySelector(".ng-container-right .ng-part-body");
385
+ if (n) {
386
+ t(this, Ct).call(this, n), t(this, pt).call(this), t(this, bt).call(this), t(this, it).call(this, n.scrollTop);
387
+ let s = !1;
388
+ const r = /* @__PURE__ */ h((o, l) => {
389
+ var c;
390
+ s || (s = !0, n && n.scrollTop !== o && (n.scrollTop = o), e && e.scrollTop !== o && (e.scrollTop = o), i && i.scrollTop !== o && (i.scrollTop = o), t(this, it).call(this, o), (c = t(this, w).querySelector("nine-table-vscrollbar")) == null || c.refresh(), s = !1);
391
391
  }, "syncScroll");
392
- i.addEventListener("scroll", () => {
393
- const o = i.scrollTop;
394
- s !== o && (s = o, r(o));
392
+ [n, e, i].forEach((o) => {
393
+ o && o.addEventListener("scroll", () => {
394
+ r(o.scrollTop);
395
+ });
395
396
  });
396
397
  }
397
398
  }, "initialize"));
398
- d(this, Tt, /* @__PURE__ */ c((i, e) => {
399
- const n = t(this, _).get(e);
400
- if (!n || n.length === 0) return;
401
- const s = i.querySelector(".ng-part-body tbody.bindable-tbody");
399
+ d(this, Lt, /* @__PURE__ */ h((n, e) => {
400
+ const i = t(this, W).get(e);
401
+ if (!i || i.length === 0) return;
402
+ const s = n.querySelector(".ng-part-body tbody.bindable-tbody");
402
403
  if (!s) return;
403
404
  s.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
404
405
  const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
405
- for (let l = 0; l < t(this, ft); l++)
406
- n.forEach((h) => {
407
- o.appendChild(h.cloneNode(!0));
406
+ for (let l = 0; l < t(this, ut); l++)
407
+ i.forEach((c) => {
408
+ o.appendChild(c.cloneNode(!0));
408
409
  });
409
410
  r ? r.before(o) : s.appendChild(o);
410
411
  }, "#renderRows"));
411
- d(this, kt, /* @__PURE__ */ c((i) => {
412
- if (t(this, q) !== null && t(this, q) > 0)
413
- return t(this, q);
414
- const e = t(this, _).get(".ng-container-body");
412
+ d(this, Ct, /* @__PURE__ */ h((n) => {
413
+ if (t(this, T) !== null && t(this, T) > 0)
414
+ return t(this, T);
415
+ const e = t(this, W).get(".ng-container-body");
415
416
  if (!e || e.length === 0) return 24;
416
- const n = i.querySelector("tbody.bindable-tbody");
417
- if (!n) return 24;
418
- n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
419
- const s = n.querySelector("tr.nodata"), r = document.createDocumentFragment();
420
- e.forEach((b) => {
421
- r.appendChild(b.cloneNode(!0));
422
- }), s ? s.before(r) : n.appendChild(r);
423
- const o = t(this, w), l = o.style.display, h = o.style.visibility, a = o.style.position;
417
+ const i = n.querySelector("tbody.bindable-tbody");
418
+ if (!i) return 24;
419
+ i.querySelectorAll("tr:not(.nodata)").forEach((y) => y.remove());
420
+ const s = i.querySelector("tr.nodata"), r = document.createDocumentFragment();
421
+ e.forEach((y) => {
422
+ r.appendChild(y.cloneNode(!0));
423
+ }), s ? s.before(r) : i.appendChild(r);
424
+ const o = t(this, w), l = o.style.display, c = o.style.visibility, a = o.style.position;
424
425
  (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
425
426
  let f = 0;
426
- const u = n.querySelectorAll("tr:not(.nodata)");
427
- return u.forEach((b) => {
428
- f += b.offsetHeight || b.getBoundingClientRect().height;
429
- }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = h, o.style.position = a, g(this, q, f > 0 ? f : 24), t(this, gt).call(this), t(this, q);
427
+ const g = i.querySelectorAll("tr:not(.nodata)");
428
+ return g.forEach((y) => {
429
+ f += y.offsetHeight || y.getBoundingClientRect().height;
430
+ }), g.forEach((y) => y.remove()), o.style.display = l, o.style.visibility = c, o.style.position = a, u(this, T, f > 0 ? f : 24), t(this, yt).call(this), t(this, T);
430
431
  }, "#measureAndCacheHeight"));
431
- d(this, ut, /* @__PURE__ */ c(() => {
432
- const e = (t(this, I).data.get() || []).length, n = t(this, q) || 24, s = e * n;
432
+ d(this, bt, /* @__PURE__ */ h(() => {
433
+ const e = (t(this, z).data.get() || []).length, i = t(this, T) || 24, s = e * i;
433
434
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
434
435
  const o = t(this, w).querySelector(r);
435
436
  if (!o) return;
@@ -437,275 +438,288 @@ const he = class he {
437
438
  l && (l.style.height = `${s}px`);
438
439
  });
439
440
  }, "#updateVirtualScrollHeight"));
440
- d(this, gt, /* @__PURE__ */ c(() => {
441
- if (t(this, X) > 0 && t(this, q) > 0) {
442
- const i = Math.ceil(t(this, X) / t(this, q));
443
- g(this, ft, i + t(this, qt));
441
+ d(this, yt, /* @__PURE__ */ h(() => {
442
+ if (t(this, j) > 0 && t(this, T) > 0) {
443
+ const n = Math.ceil(t(this, j) / t(this, T));
444
+ u(this, ut, n + t(this, kt));
444
445
  }
445
446
  }, "#updateRowCount"));
446
- d(this, Lt, /* @__PURE__ */ c(() => {
447
- var h, a, f;
448
- const i = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), n = t(this, w).querySelector(".ng-container-right .ng-part-body table");
449
- if (!e) return;
450
- const s = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
451
- for (let u = 0; u < l; u++) {
452
- const b = [
453
- ((h = s[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
454
- ((a = r[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
455
- ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
456
- ], y = Math.max(...b);
457
- y > 0 && (s[u] && (s[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
447
+ d(this, Ht, /* @__PURE__ */ h(() => {
448
+ var l, c, a, f, g, y;
449
+ 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"), i = t(this, w).querySelector(".ng-container-right .ng-part-body table");
450
+ if (e) {
451
+ const b = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), v = i ? Array.from(i.querySelectorAll("tbody tr")) : [], M = Math.max(b.length, p.length, v.length);
452
+ for (let x = 0; x < M; x++) {
453
+ const tt = [
454
+ ((l = b[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
455
+ ((c = p[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
456
+ ((a = v[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0
457
+ ], O = Math.max(...tt);
458
+ O > 0 && (b[x] && (b[x].style.height = `${O}px`), p[x] && (p[x].style.height = `${O}px`), v[x] && (v[x].style.height = `${O}px`));
459
+ }
460
+ }
461
+ const s = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), r = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
462
+ if (r) {
463
+ const b = s ? Array.from(s.querySelectorAll("tfoot tr")) : [], p = Array.from(r.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], M = Math.max(b.length, p.length, v.length);
464
+ for (let x = 0; x < M; x++) {
465
+ const tt = [
466
+ ((f = b[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
467
+ ((g = p[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
468
+ ((y = v[x]) == null ? void 0 : y.getBoundingClientRect().height) || 0
469
+ ], O = Math.max(...tt);
470
+ O > 0 && (b[x] && (b[x].style.height = `${O}px`), p[x] && (p[x].style.height = `${O}px`), v[x] && (v[x].style.height = `${O}px`));
471
+ }
458
472
  }
459
473
  }, "#syncRowHeights"));
460
- d(this, Ct, /* @__PURE__ */ c(() => {
461
- !t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, z, new ResizeObserver((i) => {
462
- for (const e of i) {
463
- const n = e.target;
464
- if (!n.classList.contains("active")) continue;
474
+ d(this, Mt, /* @__PURE__ */ h(() => {
475
+ !t(this, w) || !(t(this, w) instanceof HTMLElement) || (u(this, P, new ResizeObserver((n) => {
476
+ for (const e of n) {
477
+ const i = e.target;
478
+ if (!i.classList.contains("active")) continue;
465
479
  const s = e.contentRect.height;
466
480
  if (s > 0) {
467
481
  let r = 0;
468
- const o = n.querySelector(".ng-part-header"), l = n.querySelector(".ng-part-footer");
482
+ const o = i.querySelector(".ng-part-header"), l = i.querySelector(".ng-part-footer");
469
483
  o && (r += o.offsetHeight), l && (r += l.offsetHeight);
470
- const h = Math.max(s - r, 100);
471
- t(this, X) !== h && (g(this, X, h), t(this, gt).call(this), t(this, q) !== null && t(this, bt).call(this));
484
+ const c = Math.max(s - r, 100);
485
+ t(this, j) !== c && (u(this, j, c), t(this, yt).call(this), t(this, T) !== null && t(this, pt).call(this));
472
486
  }
473
487
  }
474
- })), t(this, z).observe(t(this, w)));
488
+ })), t(this, P).observe(t(this, w)));
475
489
  }, "#initResizeObserver"));
476
- d(this, bt, /* @__PURE__ */ c(() => {
477
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
478
- const e = t(this, w).querySelector(i);
479
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Tt).call(this, e, i);
480
- }), t(this, Mt).call(this), t(this, Lt).call(this);
490
+ d(this, pt, /* @__PURE__ */ h(() => {
491
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
492
+ const e = t(this, w).querySelector(n);
493
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Lt).call(this, e, n);
494
+ }), t(this, $t).call(this), t(this, Ht).call(this);
481
495
  }, "#renderAllContainers"));
482
- d(this, Ht, /* @__PURE__ */ c((i) => {
496
+ d(this, _t, /* @__PURE__ */ h((n) => {
483
497
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
484
498
  var a;
485
- const n = t(this, w).querySelector(e);
486
- if (!n) return;
487
- const s = n.querySelector(".ng-part-body tbody.bindable-tbody");
499
+ const i = t(this, w).querySelector(e);
500
+ if (!i) return;
501
+ const s = i.querySelector(".ng-part-body tbody.bindable-tbody");
488
502
  if (!s) return;
489
- const r = Array.from(s.querySelectorAll("tr:not(.nodata)")), o = ((a = t(this, _).get(e)) == null ? void 0 : a.length) || 1, h = (t(this, I).data.get() || []).length;
490
- r.forEach((f, u) => {
491
- const b = i + Math.floor(u / o);
492
- if (b >= h) {
503
+ const r = Array.from(s.querySelectorAll("tr:not(.nodata)")), o = ((a = t(this, W).get(e)) == null ? void 0 : a.length) || 1, c = (t(this, z).data.get() || []).length;
504
+ r.forEach((f, g) => {
505
+ const y = n + Math.floor(g / o);
506
+ if (y >= c) {
493
507
  f.style.display = "none";
494
508
  return;
495
509
  }
496
- const y = t(this, I).data.get(b);
497
- f.style.display = "", t(this, yt).call(this, f, y, b);
510
+ const b = t(this, z).data.get(y);
511
+ f.style.display = "", t(this, mt).call(this, f, b, y);
498
512
  });
499
513
  });
500
514
  }, "#adjustBufferRows"));
501
- d(this, tt, /* @__PURE__ */ c((i) => {
502
- var h;
503
- const e = t(this, q);
515
+ d(this, it, /* @__PURE__ */ h((n) => {
516
+ var c;
517
+ const e = t(this, T);
504
518
  if (!e || e <= 0) return;
505
- const s = (t(this, I).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), o = r * e, l = ((h = t(this, _).get(".ng-container-body")) == null ? void 0 : h.length) || 1;
519
+ const s = (t(this, z).data.get() || []).length, r = Math.max(0, Math.floor(n / e)), o = r * e, l = ((c = t(this, W).get(".ng-container-body")) == null ? void 0 : c.length) || 1;
506
520
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
507
521
  const f = t(this, w).querySelector(a);
508
522
  if (!f) return;
509
- const u = f.querySelector(".ng-part-body tbody.bindable-tbody");
510
- if (!u) return;
511
- u.style.transform = `translateY(${o}px)`, Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y, m) => {
512
- const R = r + Math.floor(m / l);
513
- if (R >= s) {
514
- y.style.display = "none";
523
+ const g = f.querySelector(".ng-part-body tbody.bindable-tbody");
524
+ if (!g) return;
525
+ g.style.transform = `translateY(${o}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((b, p) => {
526
+ const v = r + Math.floor(p / l);
527
+ if (v >= s) {
528
+ b.style.display = "none";
515
529
  return;
516
530
  }
517
- const G = t(this, I).data.get(R);
518
- y.style.display = "", t(this, yt).call(this, y, G, R);
531
+ const M = t(this, z).data.get(v);
532
+ b.style.display = "", t(this, mt).call(this, b, M, v);
519
533
  });
520
- }), t(this, Q) || (g(this, Q, !0), setTimeout(() => {
521
- t(this, Ht).call(this, r), g(this, Q, !1);
534
+ }), t(this, nt) || (u(this, nt, !0), setTimeout(() => {
535
+ t(this, _t).call(this, r), u(this, nt, !1);
522
536
  }, 0));
523
537
  }, "#handleScroll"));
524
- d(this, yt, /* @__PURE__ */ c((i, e, n) => {
525
- i.dataset.row = n, Array.from(i.cells).forEach((s, r) => {
538
+ d(this, mt, /* @__PURE__ */ h((n, e, i) => {
539
+ n.dataset.row = i, Array.from(n.cells).forEach((s, r) => {
526
540
  const o = s.dataset.bind;
527
- o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${n}C${r}` : `ν–‰ ${n + 1}`, s.dataset.row = n;
541
+ o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${i}C${r}` : `ν–‰ ${i + 1}`, s.dataset.row = i;
528
542
  });
529
543
  }, "#bindRowData"));
530
- d(this, Mt, /* @__PURE__ */ c(() => {
531
- var h, a, f;
532
- const i = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), n = t(this, w).querySelector(".ng-container-right .ng-part-header table");
544
+ d(this, $t, /* @__PURE__ */ h(() => {
545
+ var c, a, f;
546
+ 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"), i = t(this, w).querySelector(".ng-container-right .ng-part-header table");
533
547
  if (!e) return;
534
- const s = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
535
- for (let u = 0; u < l; u++) {
536
- const b = [
537
- ((h = s[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
538
- ((a = r[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
539
- ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
540
- ], y = Math.max(...b);
541
- y > 0 && (s[u] && (s[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
548
+ const s = n ? Array.from(n.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = i ? Array.from(i.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
549
+ for (let g = 0; g < l; g++) {
550
+ const y = [
551
+ ((c = s[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
552
+ ((a = r[g]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
553
+ ((f = o[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
554
+ ], b = Math.max(...y);
555
+ b > 0 && (s[g] && (s[g].style.height = `${b}px`), r[g] && (r[g].style.height = `${b}px`), o[g] && (o[g].style.height = `${b}px`));
542
556
  }
543
557
  }, "#syncHeaderHeights"));
544
- v(this, "destroy", /* @__PURE__ */ c(() => {
545
- t(this, z) && (t(this, z).disconnect(), g(this, z, null));
558
+ E(this, "destroy", /* @__PURE__ */ h(() => {
559
+ t(this, P) && (t(this, P).disconnect(), u(this, P, null));
546
560
  }, "destroy"));
547
- g(this, I, i.getRootNode().host), g(this, w, i), t(this, Ct).call(this);
561
+ u(this, z, n.getRootNode().host), u(this, w, n), t(this, Mt).call(this);
548
562
  }
549
563
  getRowHeight() {
550
- return t(this, q);
564
+ return t(this, T);
551
565
  }
552
- templateLength(i = ".ng-container-body") {
566
+ templateLength(n = ".ng-container-body") {
553
567
  var e;
554
- return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
568
+ return ((e = t(this, W).get(n)) == null ? void 0 : e.length) || 1;
555
569
  }
556
570
  };
557
- I = new WeakMap(), w = new WeakMap(), _ = new WeakMap(), q = new WeakMap(), z = new WeakMap(), X = new WeakMap(), ft = new WeakMap(), Q = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), Ht = new WeakMap(), tt = new WeakMap(), yt = new WeakMap(), Mt = new WeakMap(), c(he, "RowManager");
558
- let Jt = he;
559
- var _t, et;
560
- const H = class H {
571
+ z = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), P = new WeakMap(), j = new WeakMap(), ut = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), Ht = new WeakMap(), Mt = new WeakMap(), pt = new WeakMap(), _t = new WeakMap(), it = new WeakMap(), mt = new WeakMap(), $t = new WeakMap(), h(fe, "RowManager");
572
+ let te = fe;
573
+ var It, st;
574
+ const _ = class _ {
561
575
  /**
562
576
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
563
577
  */
564
- static compileAll(i) {
565
- return Array.isArray(i) ? i.map((e) => H.compile(e)) : [];
578
+ static compileAll(n) {
579
+ return Array.isArray(n) ? n.map((e) => _.compile(e)) : [];
566
580
  }
567
581
  /**
568
582
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
569
583
  */
570
- static compile(i) {
584
+ static compile(n) {
571
585
  var s, r, o, l;
572
- if (!i) return null;
573
- const e = i.cloneNode(!0);
574
- return t(s = H, _t).call(s, e), t(r = H, et).call(r, e, "thead"), t(o = H, et).call(o, e, "tbody"), t(l = H, et).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, a) => {
575
- const f = h.getAttribute("fixed");
576
- f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((u) => {
577
- u.setAttribute("fixed", f);
586
+ if (!n) return null;
587
+ const e = n.cloneNode(!0);
588
+ return t(s = _, It).call(s, e), t(r = _, st).call(r, e, "thead"), t(o = _, st).call(o, e, "tbody"), t(l = _, st).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, a) => {
589
+ const f = c.getAttribute("fixed");
590
+ f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((g) => {
591
+ g.setAttribute("fixed", f);
578
592
  });
579
593
  }), e;
580
594
  }
581
595
  };
582
- _t = new WeakMap(), et = new WeakMap(), c(H, "TableCompiler"), d(H, _t, /* @__PURE__ */ c((i) => {
583
- if (!i.querySelector("colgroup")) {
584
- const e = i.querySelector("tbody tr") || i.querySelector("tr"), n = e ? e.querySelectorAll("th, td").length : 1, s = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / n), 100);
585
- for (let o = 0; o < n; o++) {
596
+ It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PURE__ */ h((n) => {
597
+ if (!n.querySelector("colgroup")) {
598
+ const e = n.querySelector("tbody tr") || n.querySelector("tr"), i = e ? e.querySelectorAll("th, td").length : 1, s = document.createElement("colgroup"), r = Math.max(Math.floor(n.clientWidth / i), 100);
599
+ for (let o = 0; o < i; o++) {
586
600
  const l = document.createElement("col");
587
601
  l.setAttribute("width", r), s.appendChild(l);
588
602
  }
589
- i.prepend(s);
603
+ n.prepend(s);
590
604
  }
591
- if (!i.querySelector("thead")) {
592
- const e = document.createElement("thead"), n = i.querySelector("colgroup");
593
- n ? n.after(e) : i.prepend(e);
605
+ if (!n.querySelector("thead")) {
606
+ const e = document.createElement("thead"), i = n.querySelector("colgroup");
607
+ i ? i.after(e) : n.prepend(e);
594
608
  }
595
- i.classList.add("nine-table-element"), i.style.display = "table";
596
- }, "#ensureTableStructure")), d(H, et, /* @__PURE__ */ c((i, e) => {
597
- const n = Array.from(i.querySelectorAll(e + " tr")), s = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = n.length;
609
+ n.classList.add("nine-table-element"), n.style.display = "table";
610
+ }, "#ensureTableStructure")), d(_, st, /* @__PURE__ */ h((n, e) => {
611
+ const i = Array.from(n.querySelectorAll(e + " tr")), s = Array.from(n.querySelectorAll(e + " th," + e + " td")), r = i.length;
598
612
  if (r === 0 || s.length === 0) return;
599
613
  let o = 0;
600
- s.forEach((h) => {
601
- o += h.colSpan || 1;
614
+ s.forEach((c) => {
615
+ o += c.colSpan || 1;
602
616
  });
603
617
  const l = Array.from(Array(r), () => Array(o).fill(null));
604
- n.forEach((h) => {
605
- const a = h.sectionRowIndex;
618
+ i.forEach((c) => {
619
+ const a = c.sectionRowIndex;
606
620
  let f = 0;
607
- Array.from(h.querySelectorAll("th,td")).forEach((u) => {
608
- for (let m = 0; m < l[a].length; m++)
609
- if (l[a][m] === null) {
610
- f = m;
621
+ Array.from(c.querySelectorAll("th,td")).forEach((g) => {
622
+ for (let p = 0; p < l[a].length; p++)
623
+ if (l[a][p] === null) {
624
+ f = p;
611
625
  break;
612
626
  }
613
- const b = u.rowSpan || 1, y = u.colSpan || 1;
614
- for (let m = 0; m < b; m++)
615
- for (let R = 0; R < y; R++)
616
- a + m < r && f + R < o && (l[a + m][f + R] = m === 0 && R === 0 ? "1" : "0");
627
+ const y = g.rowSpan || 1, b = g.colSpan || 1;
628
+ for (let p = 0; p < y; p++)
629
+ for (let v = 0; v < b; v++)
630
+ a + p < r && f + v < o && (l[a + p][f + v] = p === 0 && v === 0 ? "1" : "0");
617
631
  });
618
- }), n.forEach((h) => {
619
- const a = h.sectionRowIndex;
620
- Array.from(h.querySelectorAll("th,td")).forEach((f) => {
621
- for (let u = 0; u < l[a].length; u++)
622
- if (l[a][u] === "1") {
623
- f.dataset.col = u, l[a][u] = "0";
632
+ }), i.forEach((c) => {
633
+ const a = c.sectionRowIndex;
634
+ Array.from(c.querySelectorAll("th,td")).forEach((f) => {
635
+ for (let g = 0; g < l[a].length; g++)
636
+ if (l[a][g] === "1") {
637
+ f.dataset.col = g, l[a][g] = "0";
624
638
  break;
625
639
  }
626
640
  });
627
641
  });
628
642
  }, "#resetColIndex"));
629
- let Qt = H;
630
- var $t, U, F, It, Wt, it, Ot, zt;
631
- const ct = class ct extends HTMLElement {
643
+ let ee = _;
644
+ var Wt, K, Z, Ot, zt, ot, Bt, Nt;
645
+ const ht = class ht extends HTMLElement {
632
646
  constructor() {
633
647
  super();
634
- d(this, $t);
635
- d(this, U, null);
636
- d(this, F);
637
- v(this, "invalidate", /* @__PURE__ */ c(() => {
638
- var e, n;
639
- t(this, F).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (n = this.querySelector("nine-table-vscrollbar")) == null || n.refresh();
648
+ d(this, Wt);
649
+ d(this, K, null);
650
+ d(this, Z);
651
+ E(this, "invalidate", /* @__PURE__ */ h(() => {
652
+ var e, i;
653
+ t(this, Z).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (i = this.querySelector("nine-table-vscrollbar")) == null || i.refresh();
640
654
  }, "invalidate"));
641
- d(this, It, /* @__PURE__ */ c(() => {
655
+ d(this, Ot, /* @__PURE__ */ h(() => {
642
656
  [
643
657
  { selector: ".ng-container-body", type: null },
644
658
  { selector: ".ng-container-left", type: "left" },
645
659
  { selector: ".ng-container-right", type: "right" }
646
- ].forEach(({ selector: n, type: s }) => {
647
- const r = this.querySelector(n);
660
+ ].forEach(({ selector: i, type: s }) => {
661
+ const r = this.querySelector(i);
648
662
  if (!r) return;
649
663
  r.innerHTML = "";
650
664
  const o = document.createElement("div");
651
- o.className = "ng-part-header", o.appendChild(t(this, it).call(this, t(this, U), s, "header"));
665
+ o.className = "ng-part-header", o.appendChild(t(this, ot).call(this, t(this, K), s, "header"));
652
666
  const l = document.createElement("div");
653
667
  l.className = "ng-part-body";
654
- const h = document.createElement("div");
655
- h.className = "ng-scroll-content", h.style.position = "relative", h.style.width = "100%", h.appendChild(t(this, it).call(this, t(this, U), s, "body"));
668
+ const c = document.createElement("div");
669
+ c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ot).call(this, t(this, K), s, "body"));
656
670
  const a = document.createElement("div");
657
- a.className = "ng-virtual-spacer", a.style.width = "100%", a.style.pointerEvents = "none", h.appendChild(a), l.appendChild(h);
671
+ a.className = "ng-virtual-spacer", a.style.width = "100%", a.style.pointerEvents = "none", c.appendChild(a), l.appendChild(c);
658
672
  const f = document.createElement("div");
659
- f.className = "ng-part-footer", f.appendChild(t(this, it).call(this, t(this, U), s, "footer")), r.appendChild(o), r.appendChild(l), r.appendChild(f);
673
+ f.className = "ng-part-footer", f.appendChild(t(this, ot).call(this, t(this, K), s, "footer")), r.appendChild(o), r.appendChild(l), r.appendChild(f);
660
674
  });
661
675
  }, "#renderSplitContainers"));
662
- d(this, Wt, /* @__PURE__ */ c(() => {
676
+ d(this, zt, /* @__PURE__ */ h(() => {
663
677
  ["left", "right", "body"].forEach((e) => {
664
- const n = this.querySelector(`.ng-container-${e}`), s = n == null ? void 0 : n.querySelectorAll("table");
665
- if (!n || !s || s.length === 0) return;
678
+ const i = this.querySelector(`.ng-container-${e}`), s = i == null ? void 0 : i.querySelectorAll("table");
679
+ if (!i || !s || s.length === 0) return;
666
680
  let r = 0;
667
681
  s[0].querySelectorAll("col").forEach((o) => {
668
682
  const l = parseInt(o.getAttribute("width"), 10);
669
683
  isNaN(r) || (r += l);
670
- }), e === "body" ? n.style.flex = "1" : (n.style.flex = `0 0 ${r}px`, n.style.width = `${r}px`);
684
+ }), e === "body" ? i.style.flex = "1" : (i.style.flex = `0 0 ${r}px`, i.style.width = `${r}px`);
671
685
  });
672
686
  }, "#updateContainerWidths"));
673
- v(this, "generate", /* @__PURE__ */ c((e) => {
674
- e && (g(this, U, Qt.compile(e)), t(this, It).call(this), t(this, Wt).call(this), t(this, F).initialize(), setTimeout(() => {
675
- var n;
676
- (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
687
+ E(this, "generate", /* @__PURE__ */ h((e) => {
688
+ e && (u(this, K, ee.compile(e)), t(this, Ot).call(this), t(this, zt).call(this), t(this, Z).initialize(), setTimeout(() => {
689
+ var i;
690
+ (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
677
691
  }, 0));
678
692
  }, "generate"));
679
- d(this, it, /* @__PURE__ */ c((e, n, s) => {
680
- const r = e.cloneNode(!0), o = r.querySelector("thead"), l = r.querySelector("tbody"), h = r.querySelector("tfoot");
693
+ d(this, ot, /* @__PURE__ */ h((e, i, s) => {
694
+ const r = e.cloneNode(!0), o = r.querySelector("thead"), l = r.querySelector("tbody"), c = r.querySelector("tfoot");
681
695
  if (s === "header") {
682
- if (l && l.remove(), h && h.remove(), e.querySelector("tbody")) {
696
+ if (l && l.remove(), c && c.remove(), e.querySelector("tbody")) {
683
697
  const f = document.createElement("tbody");
684
698
  f.className = "fixed-tbody", r.appendChild(f);
685
699
  }
686
- } else s === "body" ? (o && o.remove(), h && h.remove(), l && (l.className = "bindable-tbody")) : s === "footer" && (o && o.remove(), l && l.remove());
687
- return n === "left" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
700
+ } else s === "body" ? (o && o.remove(), c && c.remove(), l && (l.className = "bindable-tbody")) : s === "footer" && (o && o.remove(), l && l.remove());
701
+ return i === "left" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
688
702
  a.getAttribute("fixed") !== "left" && a.remove();
689
- }) : n === "right" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
703
+ }) : i === "right" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
690
704
  a.getAttribute("fixed") !== "right" && a.remove();
691
705
  }) : r.querySelectorAll("[fixed=left], [fixed=right]").forEach((a) => {
692
706
  a.remove();
693
707
  }), r;
694
708
  }, "#createSplitTable"));
695
- v(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, F).getRowHeight(), "getRowHeight"));
696
- v(this, "scrollToX", /* @__PURE__ */ c((e) => {
697
- const n = this.querySelector(".ng-container-body .ng-part-body");
698
- n && (n.scrollLeft = e);
709
+ E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, Z).getRowHeight(), "getRowHeight"));
710
+ E(this, "scrollToX", /* @__PURE__ */ h((e) => {
711
+ const i = this.querySelector(".ng-container-body .ng-part-body");
712
+ i && (i.scrollLeft = e);
699
713
  }, "scrollToX"));
700
- v(this, "scrollToY", /* @__PURE__ */ c((e) => {
701
- const n = this.querySelector(".ng-container-body .ng-part-body");
702
- n && (n.scrollTop = e);
714
+ E(this, "scrollToY", /* @__PURE__ */ h((e) => {
715
+ const i = this.querySelector(".ng-container-body .ng-part-body");
716
+ i && (i.scrollTop = e);
703
717
  }, "scrollToY"));
704
- d(this, Ot, /* @__PURE__ */ c(() => {
705
- t(this, zt).call(this);
718
+ d(this, Bt, /* @__PURE__ */ h(() => {
719
+ t(this, Nt).call(this);
706
720
  }, "#init"));
707
- d(this, zt, /* @__PURE__ */ c(() => {
708
- const e = ct.SCROLLBAR_SIZE;
721
+ d(this, Nt, /* @__PURE__ */ h(() => {
722
+ const e = ht.SCROLLBAR_SIZE;
709
723
  this.innerHTML = `
710
724
  <style>
711
725
  nine-table-sheet {
@@ -846,55 +860,55 @@ const ct = class ct extends HTMLElement {
846
860
  </div>
847
861
  `;
848
862
  }, "#render"));
849
- g(this, F, new Jt(this)), g(this, $t, this.getRootNode().host);
863
+ u(this, Z, new te(this)), u(this, Wt, this.getRootNode().host);
850
864
  }
851
865
  connectedCallback() {
852
- t(this, Ot).call(this);
866
+ t(this, Bt).call(this);
853
867
  }
854
868
  disconnectedCallback() {
855
- this.innerHTML = "", lt.log("NineTableSheet destroyed.");
869
+ this.innerHTML = "", dt.log("NineTableSheet destroyed.");
856
870
  }
857
871
  };
858
- $t = new WeakMap(), U = new WeakMap(), F = new WeakMap(), It = new WeakMap(), Wt = new WeakMap(), it = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), c(ct, "NineTableSheet"), v(ct, "SCROLLBAR_SIZE", 16);
859
- let St = ct;
860
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", St);
861
- var Nt, pt;
862
- const de = class de extends HTMLElement {
872
+ Wt = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), ot = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), h(ht, "NineTableSheet"), E(ht, "SCROLLBAR_SIZE", 16);
873
+ let Rt = ht;
874
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Rt);
875
+ var Pt, xt;
876
+ const ge = class ge extends HTMLElement {
863
877
  constructor() {
864
878
  super();
865
- d(this, Nt, /* @__PURE__ */ c(() => {
879
+ d(this, Pt, /* @__PURE__ */ h(() => {
866
880
  var e;
867
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
881
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (i) => {
868
882
  var o;
869
- const s = n.ctrlKey || n.metaKey || n.shiftKey, r = parseInt((o = n.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
870
- t(this, pt).call(this, r, s);
871
- }), t(this, pt).call(this, 0, !1);
883
+ const s = i.ctrlKey || i.metaKey || i.shiftKey, r = parseInt((o = i.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
884
+ t(this, xt).call(this, r, s);
885
+ }), t(this, xt).call(this, 0, !1);
872
886
  }, "#init"));
873
- d(this, pt, /* @__PURE__ */ c((e, n = !1) => {
874
- const s = /* @__PURE__ */ c(() => {
887
+ d(this, xt, /* @__PURE__ */ h((e, i = !1) => {
888
+ const s = /* @__PURE__ */ h(() => {
875
889
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
876
- Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
877
- const b = f.filter((y) => y.classList.contains("active"));
878
- b.length < 2 || b.forEach((y) => {
879
- const m = parseInt(y.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), G = f[m + 1];
880
- R && G && G.classList.contains("active") && R.style.setProperty("display", "flex");
890
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
891
+ const y = f.filter((b) => b.classList.contains("active"));
892
+ y.length < 2 || y.forEach((b) => {
893
+ const p = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${p}"]`), M = f[p + 1];
894
+ v && M && M.classList.contains("active") && v.style.setProperty("display", "flex");
881
895
  });
882
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
896
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
883
897
  if (!l[e]) return;
884
- if (!n)
885
- l.forEach((f, u) => {
886
- f.classList.toggle("active", u === e);
887
- }), h.forEach((f, u) => {
888
- const b = u === e;
889
- f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
898
+ if (!i)
899
+ l.forEach((f, g) => {
900
+ f.classList.toggle("active", g === e);
901
+ }), c.forEach((f, g) => {
902
+ const y = g === e;
903
+ f.classList.toggle("active", y), f.style.flex = y ? "1 1 100%" : "";
890
904
  });
891
905
  else {
892
- const f = l[e], u = r.querySelectorAll(".nine-tab-item.active");
893
- if (f.classList.contains("active") && u.length <= 1)
906
+ const f = l[e], g = r.querySelectorAll(".nine-tab-item.active");
907
+ if (f.classList.contains("active") && g.length <= 1)
894
908
  return;
895
909
  f.classList.toggle("active");
896
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
897
- b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
910
+ const y = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
911
+ y && (y.classList.toggle("active"), y.classList.contains("active") || (y.style.flex = ""));
898
912
  }
899
913
  const a = o.querySelectorAll("nine-table-sheet.active");
900
914
  a == null || a.forEach((f) => {
@@ -903,42 +917,42 @@ const de = class de extends HTMLElement {
903
917
  }, "#switchSheet"));
904
918
  }
905
919
  connectedCallback() {
906
- t(this, Nt).call(this);
920
+ t(this, Pt).call(this);
907
921
  }
908
922
  };
909
- Nt = new WeakMap(), pt = new WeakMap(), c(de, "NineTableSheets");
910
- let te = de;
911
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", te);
912
- var T, Bt, mt, Pt;
913
- const fe = class fe {
914
- constructor(i) {
915
- d(this, T);
916
- d(this, Bt, /* @__PURE__ */ c(() => {
917
- t(this, Pt).call(this), new ResizeObserver((i) => {
918
- for (let e of i)
919
- t(this, T).getAttribute("auto-height") === "true" && t(this, mt).call(this);
920
- }).observe(t(this, T));
923
+ Pt = new WeakMap(), xt = new WeakMap(), h(ge, "NineTableSheets");
924
+ let ne = ge;
925
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ne);
926
+ var k, Dt, vt, Yt;
927
+ const ue = class ue {
928
+ constructor(n) {
929
+ d(this, k);
930
+ d(this, Dt, /* @__PURE__ */ h(() => {
931
+ t(this, Yt).call(this), new ResizeObserver((n) => {
932
+ for (let e of n)
933
+ t(this, k).getAttribute("auto-height") === "true" && t(this, vt).call(this);
934
+ }).observe(t(this, k));
921
935
  }, "#init"));
922
- d(this, mt, /* @__PURE__ */ c(() => {
923
- var h, a;
924
- const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
925
- if (i.length === 0) return;
926
- const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, n = Math.max(...i.map((f) => f.getRowHeight())), s = (h = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (a = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, o = St.SCROLLBAR_SIZE, l = e * n + s + r + o;
927
- t(this, T).style.height = `${l}px`;
936
+ d(this, vt, /* @__PURE__ */ h(() => {
937
+ var c, a;
938
+ const n = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
939
+ if (n.length === 0) return;
940
+ const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, i = Math.max(...n.map((f) => f.getRowHeight())), s = (c = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (a = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, o = Rt.SCROLLBAR_SIZE, l = e * i + s + r + o;
941
+ t(this, k).style.height = `${l}px`;
928
942
  }, "#applyAutoHeight"));
929
- d(this, Pt, /* @__PURE__ */ c(() => {
930
- const e = Array.from(t(this, T).children).filter((h) => h.tagName === "TABLE"), n = t(this, T).getAttribute("auto-height") === "true", s = e.length, r = e.map((h, a) => {
931
- const u = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, b = a < s - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
932
- return u + b;
933
- }).join(""), o = e.map((h, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
934
- t(this, T).shadowRoot.innerHTML = `
943
+ d(this, Yt, /* @__PURE__ */ h(() => {
944
+ const e = Array.from(t(this, k).children).filter((c) => c.tagName === "TABLE"), i = t(this, k).getAttribute("auto-height") === "true", s = e.length, r = e.map((c, a) => {
945
+ const g = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, y = a < s - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
946
+ return g + y;
947
+ }).join(""), o = e.map((c, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
948
+ t(this, k).shadowRoot.innerHTML = `
935
949
  <style>
936
950
  :host {
937
951
  display: flex;
938
952
  flex-direction: column;
939
953
  position: relative;
940
954
  overflow: hidden;
941
- height: ${n ? "auto" : "100%"};
955
+ height: ${i ? "auto" : "100%"};
942
956
  background: #fff;
943
957
  }
944
958
 
@@ -1022,235 +1036,235 @@ const fe = class fe {
1022
1036
  </nine-table-body>
1023
1037
  <nine-table-footer></nine-table-footer>
1024
1038
  `;
1025
- const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
1026
- l == null || l.forEach((h, a) => {
1039
+ const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
1040
+ l == null || l.forEach((c, a) => {
1027
1041
  e[a] && setTimeout(() => {
1028
- h.generate(e[a]), n && t(this, mt).call(this);
1042
+ c.generate(e[a]), i && t(this, vt).call(this);
1029
1043
  });
1030
1044
  });
1031
1045
  }, "#render"));
1032
- g(this, T, i), t(this, Bt).call(this);
1046
+ u(this, k, n), t(this, Dt).call(this);
1033
1047
  }
1034
1048
  };
1035
- T = new WeakMap(), Bt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), c(fe, "LayoutManager");
1036
- let ee = fe;
1037
- var xt, nt;
1038
- const ue = class ue {
1039
- constructor(i) {
1040
- d(this, xt);
1041
- d(this, nt, -1);
1042
- v(this, "count", /* @__PURE__ */ c(() => t(this, xt).rawRecords.length, "count"));
1043
- g(this, xt, i);
1049
+ k = new WeakMap(), Dt = new WeakMap(), vt = new WeakMap(), Yt = new WeakMap(), h(ue, "LayoutManager");
1050
+ let ie = ue;
1051
+ var wt, rt;
1052
+ const be = class be {
1053
+ constructor(n) {
1054
+ d(this, wt);
1055
+ d(this, rt, -1);
1056
+ E(this, "count", /* @__PURE__ */ h(() => t(this, wt).rawRecords.length, "count"));
1057
+ u(this, wt, n);
1044
1058
  }
1045
1059
  get at() {
1046
- return t(this, nt);
1060
+ return t(this, rt);
1047
1061
  }
1048
- set at(i) {
1049
- g(this, nt, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, nt)}"]`) && setTimeout(() => {
1062
+ set at(n) {
1063
+ u(this, rt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, rt)}"]`) && setTimeout(() => {
1050
1064
  });
1051
1065
  }
1052
1066
  };
1053
- xt = new WeakMap(), nt = new WeakMap(), c(ue, "ngRow");
1054
- let ie = ue;
1055
- var k, E, L, st, Dt, N, Yt, j, vt, Vt, Xt, ot;
1056
- const C = class C {
1057
- constructor(i, e) {
1058
- d(this, k);
1059
- d(this, E);
1060
- d(this, L, []);
1061
- d(this, st, []);
1062
- d(this, Dt, 0);
1063
- d(this, N, []);
1064
- d(this, Yt, /* @__PURE__ */ c(() => {
1065
- g(this, N, []);
1066
- const i = t(this, k).template || [];
1067
- Array.from(i).forEach((e) => {
1068
- var n;
1069
- t(this, N).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1070
- }), (t(this, E).rawRecords || []).forEach((e) => {
1071
- e.__ng || (e.__ng = t(this, vt).call(this)), e.__ng.height = t(this, N).slice();
1067
+ wt = new WeakMap(), rt = new WeakMap(), h(be, "ngRow");
1068
+ let se = be;
1069
+ var L, A, C, lt, Ft, D, Vt, G, St, Xt, Ut, at;
1070
+ const H = class H {
1071
+ constructor(n, e) {
1072
+ d(this, L);
1073
+ d(this, A);
1074
+ d(this, C, []);
1075
+ d(this, lt, []);
1076
+ d(this, Ft, 0);
1077
+ d(this, D, []);
1078
+ d(this, Vt, /* @__PURE__ */ h(() => {
1079
+ u(this, D, []);
1080
+ const n = t(this, L).template || [];
1081
+ Array.from(n).forEach((e) => {
1082
+ var i;
1083
+ t(this, D).push(((i = e.getBoundingClientRect) == null ? void 0 : i.call(e).height) || 24);
1084
+ }), (t(this, A).rawRecords || []).forEach((e) => {
1085
+ e.__ng || (e.__ng = t(this, St).call(this)), e.__ng.height = t(this, D).slice();
1072
1086
  });
1073
1087
  }, "#initialize"));
1074
- d(this, j, /* @__PURE__ */ c(() => {
1075
- t(this, k).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1076
- i.invalidate();
1088
+ d(this, G, /* @__PURE__ */ h(() => {
1089
+ t(this, L).shadowRoot.querySelectorAll("nine-table-sheet").forEach((n) => {
1090
+ n.invalidate();
1077
1091
  });
1078
1092
  }, "#invalidate"));
1079
- v(this, "get", /* @__PURE__ */ c((i, e) => {
1093
+ E(this, "get", /* @__PURE__ */ h((n, e) => {
1080
1094
  var r;
1081
- const n = this.getValidData();
1082
- if (!n || n.length <= 0) return;
1083
- if (i == null) return t(this, ot).call(this, n);
1084
- if (i < 0 || i >= n.length) return null;
1085
- const s = typeof ((r = t(this, k).fields) == null ? void 0 : r.get) == "function" ? t(this, k).fields.get() : [];
1095
+ const i = this.getValidData();
1096
+ if (!i || i.length <= 0) return;
1097
+ if (n == null) return t(this, at).call(this, i);
1098
+ if (n < 0 || n >= i.length) return null;
1099
+ const s = typeof ((r = t(this, L).fields) == null ? void 0 : r.get) == "function" ? t(this, L).fields.get() : [];
1086
1100
  if (e != null) {
1087
1101
  const o = s.indexOf(e);
1088
- return o >= 0 ? n[i].v[o] : null;
1102
+ return o >= 0 ? i[n].v[o] : null;
1089
1103
  }
1090
- return t(this, ot).call(this, n[i]);
1104
+ return t(this, at).call(this, i[n]);
1091
1105
  }, "get"));
1092
- v(this, "set", /* @__PURE__ */ c((i) => {
1093
- this.clear(), this.add(i, !1), t(this, j).call(this);
1106
+ E(this, "set", /* @__PURE__ */ h((n) => {
1107
+ this.clear(), this.add(n, !1), t(this, G).call(this);
1094
1108
  }, "set"));
1095
- d(this, vt, /* @__PURE__ */ c(() => ({
1096
- rowState: C.ROW_STATE.EMPTY,
1109
+ d(this, St, /* @__PURE__ */ h(() => ({
1110
+ rowState: H.ROW_STATE.EMPTY,
1097
1111
  deleted: !1,
1098
1112
  filtered: !1,
1099
- height: t(this, N).slice(),
1113
+ height: t(this, D).slice(),
1100
1114
  o: {},
1101
1115
  c: {},
1102
- _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, N).slice(), -1, {}, {}]
1116
+ _: [0, 0, 0, 0, H.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
1103
1117
  }), "#getDefaultMeta"));
1104
- v(this, "reset", /* @__PURE__ */ c(() => {
1105
- g(this, L, []), g(this, st, []), t(this, j).call(this);
1118
+ E(this, "reset", /* @__PURE__ */ h(() => {
1119
+ u(this, C, []), u(this, lt, []), t(this, G).call(this);
1106
1120
  }, "reset"));
1107
- v(this, "clear", /* @__PURE__ */ c(() => {
1108
- var i;
1109
- t(this, E).rawRecords = [], g(this, L, []), g(this, st, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1121
+ E(this, "clear", /* @__PURE__ */ h(() => {
1122
+ var n;
1123
+ t(this, A).rawRecords = [], u(this, C, []), u(this, lt, []), (n = t(this, A).viewRecords) != null && n.reset && t(this, A).viewRecords.reset();
1110
1124
  }, "clear"));
1111
- d(this, Vt, /* @__PURE__ */ c((i) => {
1125
+ d(this, Xt, /* @__PURE__ */ h((n) => {
1112
1126
  var s;
1113
- Array.isArray(i) || (i = [i]);
1114
- const e = typeof ((s = t(this, k).fields) == null ? void 0 : s.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), n = [];
1115
- return i.forEach((r) => {
1127
+ Array.isArray(n) || (n = [n]);
1128
+ const e = typeof ((s = t(this, L).fields) == null ? void 0 : s.get) == "function" ? t(this, L).fields.get() : Object.keys(n[0] || {}), i = [];
1129
+ return n.forEach((r) => {
1116
1130
  const o = { v: [] };
1117
1131
  e.forEach((l) => {
1118
1132
  o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1119
- }), n.push(o);
1120
- }), n;
1133
+ }), i.push(o);
1134
+ }), i;
1121
1135
  }, "#json2Array"));
1122
- d(this, Xt, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1123
- e.__ng = t(this, vt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = C.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1124
- }), i), "#defaultInsert"));
1125
- v(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1126
- i === void 0 && (i = {});
1127
- const n = t(this, Vt).call(this, i);
1128
- t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Xt).call(this, n)), this.resetRecords();
1136
+ d(this, Ut, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1137
+ e.__ng = t(this, St).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = H.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1138
+ }), n), "#defaultInsert"));
1139
+ E(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1140
+ n === void 0 && (n = {});
1141
+ const i = t(this, Xt).call(this, n);
1142
+ t(this, A).rawRecords = t(this, A).rawRecords.concat(t(this, Ut).call(this, i)), this.resetRecords();
1129
1143
  const s = this.count() - 1;
1130
- return e || n.forEach((r, o) => {
1131
- const l = t(this, E).rawRecords[s - o];
1132
- l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
1133
- }), t(this, j).call(this), s;
1144
+ return e || i.forEach((r, o) => {
1145
+ const l = t(this, A).rawRecords[s - o];
1146
+ l && (l.__ng.rowState = H.ROW_STATE.EMPTY);
1147
+ }), t(this, G).call(this), s;
1134
1148
  }, "add"));
1135
- v(this, "delete", /* @__PURE__ */ c((i) => {
1149
+ E(this, "delete", /* @__PURE__ */ h((n) => {
1136
1150
  let e = [];
1137
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((n, s) => s - n).forEach((n) => {
1138
- if (t(this, L)[n]) {
1139
- const s = t(this, L)[n].__ng.rowid;
1140
- t(this, L)[n].__ng.rowState === C.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== s) : t(this, E).rawRecords.forEach((r) => {
1141
- r.__ng.rowid === s && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1151
+ Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, A).host.row.at] : e = [parseInt(n, 10)], e.sort((i, s) => s - i).forEach((i) => {
1152
+ if (t(this, C)[i]) {
1153
+ const s = t(this, C)[i].__ng.rowid;
1154
+ t(this, C)[i].__ng.rowState === H.ROW_STATE.INSERT ? t(this, A).rawRecords = t(this, A).rawRecords.filter((r) => r.__ng.rowid !== s) : t(this, A).rawRecords.forEach((r) => {
1155
+ r.__ng.rowid === s && (r.__ng.deleted = !0, r.__ng.rowState = H.ROW_STATE.DELETE);
1142
1156
  });
1143
1157
  }
1144
- }), this.resetRecords(), t(this, j).call(this);
1158
+ }), this.resetRecords(), t(this, G).call(this);
1145
1159
  }, "delete"));
1146
- v(this, "setValue", /* @__PURE__ */ c((i, e, n) => {
1147
- var h;
1148
- i = parseInt(i, 10);
1149
- const r = (typeof ((h = t(this, k).fields) == null ? void 0 : h.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1160
+ E(this, "setValue", /* @__PURE__ */ h((n, e, i) => {
1161
+ var c;
1162
+ n = parseInt(n, 10);
1163
+ const r = (typeof ((c = t(this, L).fields) == null ? void 0 : c.get) == "function" ? t(this, L).fields.get() : []).indexOf(e);
1150
1164
  if (r < 0) return;
1151
- const o = this.getValidData()[i];
1165
+ const o = this.getValidData()[n];
1152
1166
  if (!o) return;
1153
1167
  const l = o.v[r];
1154
- l !== n && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[r] = n;
1168
+ l !== i && o.__ng.rowState !== H.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = H.ROW_STATE.UPDATE), o.v[r] = i;
1155
1169
  }, "setValue"));
1156
- v(this, "resetRecords", /* @__PURE__ */ c(() => {
1157
- g(this, st, t(this, E).rawRecords.filter((i) => !i.__ng.deleted)), g(this, L, t(this, E).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, E).rawRecords.forEach((i, e) => {
1158
- i.__ng.rowidx = e;
1159
- }), t(this, L).forEach((i, e) => {
1160
- i.__ng.i = e;
1170
+ E(this, "resetRecords", /* @__PURE__ */ h(() => {
1171
+ u(this, lt, t(this, A).rawRecords.filter((n) => !n.__ng.deleted)), u(this, C, t(this, A).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, A).rawRecords.forEach((n, e) => {
1172
+ n.__ng.rowidx = e;
1173
+ }), t(this, C).forEach((n, e) => {
1174
+ n.__ng.i = e;
1161
1175
  });
1162
1176
  }, "resetRecords"));
1163
- v(this, "getValidData", /* @__PURE__ */ c(() => (t(this, L).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, L)), "getValidData"));
1164
- d(this, ot, /* @__PURE__ */ c((i) => {
1177
+ E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, C).length === 0 && t(this, A).rawRecords.length > 0 && this.resetRecords(), t(this, C)), "getValidData"));
1178
+ d(this, at, /* @__PURE__ */ h((n) => {
1165
1179
  var o;
1166
- if (!i) return i;
1167
- const e = !Array.isArray(i), n = e ? [i] : i, s = typeof ((o = t(this, k).fields) == null ? void 0 : o.get) == "function" ? t(this, k).fields.get() : [], r = n.filter((l) => !l.__ng.deleted).map((l) => {
1168
- const h = {};
1180
+ if (!n) return n;
1181
+ const e = !Array.isArray(n), i = e ? [n] : n, s = typeof ((o = t(this, L).fields) == null ? void 0 : o.get) == "function" ? t(this, L).fields.get() : [], r = i.filter((l) => !l.__ng.deleted).map((l) => {
1182
+ const c = {};
1169
1183
  return s.forEach((a, f) => {
1170
- h[a] = l.v ? l.v[f] : l[a];
1171
- }), h.__ng = l.__ng, h;
1184
+ c[a] = l.v ? l.v[f] : l[a];
1185
+ }), c.__ng = l.__ng, c;
1172
1186
  });
1173
1187
  return e ? r[0] : r;
1174
1188
  }, "#conv"));
1175
- v(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1176
- g(this, k, i), g(this, E, e), t(this, Yt).call(this);
1189
+ E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1190
+ u(this, L, n), u(this, A, e), t(this, Vt).call(this);
1177
1191
  }
1178
1192
  get source() {
1179
- return t(this, ot).call(this, t(this, E).rawRecords);
1193
+ return t(this, at).call(this, t(this, A).rawRecords);
1180
1194
  }
1181
- set source(i) {
1182
- this.clear(), this.add(i, !1);
1195
+ set source(n) {
1196
+ this.clear(), this.add(n, !1);
1183
1197
  }
1184
1198
  get nextId() {
1185
- return ++we(this, Dt)._;
1199
+ return ++Se(this, Ft)._;
1186
1200
  }
1187
1201
  get length() {
1188
- return t(this, L).length;
1202
+ return t(this, C).length;
1189
1203
  }
1190
1204
  getRowCount() {
1191
1205
  return this.length;
1192
1206
  }
1193
1207
  };
1194
- k = new WeakMap(), E = new WeakMap(), L = new WeakMap(), st = new WeakMap(), Dt = new WeakMap(), N = new WeakMap(), Yt = new WeakMap(), j = new WeakMap(), vt = new WeakMap(), Vt = new WeakMap(), Xt = new WeakMap(), ot = new WeakMap(), c(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1195
- v(C, "ROW_STATE", {
1208
+ L = new WeakMap(), A = new WeakMap(), C = new WeakMap(), lt = new WeakMap(), Ft = new WeakMap(), D = new WeakMap(), Vt = new WeakMap(), G = new WeakMap(), St = new WeakMap(), Xt = new WeakMap(), Ut = new WeakMap(), at = new WeakMap(), h(H, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1209
+ E(H, "ROW_STATE", {
1196
1210
  EMPTY: "EMPTY",
1197
1211
  NORMAL: "NORMAL",
1198
1212
  INSERT: "INSERT",
1199
1213
  UPDATE: "UPDATE",
1200
1214
  DELETE: "DELETE"
1201
1215
  });
1202
- let ne = C;
1203
- var K;
1204
- const ge = class ge {
1205
- constructor(i) {
1206
- d(this, K);
1207
- g(this, K, i), this.row = new ie(this), this.data = new ne(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1216
+ let oe = H;
1217
+ var J;
1218
+ const ye = class ye {
1219
+ constructor(n) {
1220
+ d(this, J);
1221
+ u(this, J, n), this.row = new se(this), this.data = new oe(t(this, J), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1208
1222
  var e;
1209
- (e = t(this, K).view) != null && e.redraw && t(this, K).view.redraw();
1223
+ (e = t(this, J).view) != null && e.redraw && t(this, J).view.redraw();
1210
1224
  }, this.setDataSource = (e) => {
1211
1225
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1212
1226
  }, this.getRowState = (e) => {
1213
1227
  var s, r;
1214
- const n = parseInt(e, 10);
1215
- if (!(n >= this.data.count()))
1216
- return (r = (s = this.data.getValidData()[n]) == null ? void 0 : s.__ng) == null ? void 0 : r.rowState;
1228
+ const i = parseInt(e, 10);
1229
+ if (!(i >= this.data.count()))
1230
+ return (r = (s = this.data.getValidData()[i]) == null ? void 0 : s.__ng) == null ? void 0 : r.rowState;
1217
1231
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1218
1232
  this.row.at = e;
1219
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, n) => this.data.get(e, n), this.setColumn = (e, n, s) => {
1220
- e = parseInt(e, 10), this.data.setValue(e, n, s);
1233
+ }, 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, i) => this.data.get(e, i), this.setColumn = (e, i, s) => {
1234
+ e = parseInt(e, 10), this.data.setValue(e, i, s);
1221
1235
  }, this.setDataSource([]);
1222
1236
  }
1223
1237
  };
1224
- K = new WeakMap(), c(ge, "ngDataManager");
1225
- let se = ge;
1226
- var rt, A, wt, Ut;
1227
- const be = class be {
1238
+ J = new WeakMap(), h(ye, "ngDataManager");
1239
+ let re = ye;
1240
+ var ct, q, Et, jt;
1241
+ const pe = class pe {
1228
1242
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1229
- constructor(i) {
1230
- d(this, rt);
1231
- d(this, A, []);
1232
- v(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1233
- i.forEach((n) => {
1234
- t(this, A).some((s) => s.name === n) || t(this, A).push({ name: n, type: e });
1235
- }), t(this, wt).call(this);
1243
+ constructor(n) {
1244
+ d(this, ct);
1245
+ d(this, q, []);
1246
+ E(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1247
+ n.forEach((i) => {
1248
+ t(this, q).some((s) => s.name === i) || t(this, q).push({ name: i, type: e });
1249
+ }), t(this, Et).call(this);
1236
1250
  }, "add"));
1237
- d(this, wt, /* @__PURE__ */ c(() => {
1238
- const i = /* @__PURE__ */ new Map();
1239
- t(this, A).forEach((e) => {
1240
- i.set(e.name, e.type);
1241
- }), g(this, A, Array.from(i, ([e, n]) => ({ name: e, type: n }))), g(this, A, t(this, A).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, A).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1251
+ d(this, Et, /* @__PURE__ */ h(() => {
1252
+ const n = /* @__PURE__ */ new Map();
1253
+ t(this, q).forEach((e) => {
1254
+ n.set(e.name, e.type);
1255
+ }), u(this, q, Array.from(n, ([e, i]) => ({ name: e, type: i }))), u(this, q, t(this, q).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, q).sort((e, i) => e.name.length < i.name.length ? 1 : -1);
1242
1256
  }, "#adjust"));
1243
- d(this, Ut, /* @__PURE__ */ c(() => {
1244
- g(this, A, []), lt.log(t(this, rt).querySelectorAll("table"));
1245
- const i = Array.from(t(this, rt).querySelectorAll("table"));
1246
- if (!(!i || i.length === 0)) {
1247
- for (const e of i)
1248
- lt.log(e), $("[data-bind]", e).each((n, s) => {
1257
+ d(this, jt, /* @__PURE__ */ h(() => {
1258
+ u(this, q, []), dt.log(t(this, ct).querySelectorAll("table"));
1259
+ const n = Array.from(t(this, ct).querySelectorAll("table"));
1260
+ if (!(!n || n.length === 0)) {
1261
+ for (const e of n)
1262
+ dt.log(e), $("[data-bind]", e).each((i, s) => {
1249
1263
  const r = s.dataset.bind, o = s.getAttribute("data-type") || "string";
1250
- r && t(this, A).push({ name: r, type: o });
1251
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1252
- $(`[${n}]`, e).each((s, r) => {
1253
- var o = r.getAttribute(n);
1264
+ r && t(this, q).push({ name: r, type: o });
1265
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((i) => {
1266
+ $(`[${i}]`, e).each((s, r) => {
1267
+ var o = r.getAttribute(i);
1254
1268
  if (o.indexOf("data.") < 0) {
1255
1269
  const l = o.search(/[(]/g);
1256
1270
  if (l > 0)
@@ -1262,72 +1276,72 @@ const be = class be {
1262
1276
  }
1263
1277
  o.split("data.").forEach((l) => {
1264
1278
  if (l.trim() != "") {
1265
- const h = l.search(/[^_A-Za-z0-9]/g);
1279
+ const c = l.search(/[^_A-Za-z0-9]/g);
1266
1280
  let a = "";
1267
- h >= 0 ? a = l.substring(0, h) : o.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, A).push({ name: a, type: "string" });
1281
+ c >= 0 ? a = l.substring(0, c) : o.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, q).push({ name: a, type: "string" });
1268
1282
  }
1269
1283
  });
1270
1284
  });
1271
1285
  });
1272
- t(this, wt).call(this);
1286
+ t(this, Et).call(this);
1273
1287
  }
1274
1288
  }, "#init"));
1275
- g(this, rt, i), t(this, Ut).call(this);
1289
+ u(this, ct, n), t(this, jt).call(this);
1276
1290
  }
1277
1291
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1278
1292
  get() {
1279
- return t(this, A).map((i) => i.name);
1293
+ return t(this, q).map((n) => n.name);
1280
1294
  }
1281
1295
  // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
1282
1296
  getFields() {
1283
- return t(this, A);
1297
+ return t(this, q);
1284
1298
  }
1285
1299
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1286
- getType(i) {
1287
- const e = t(this, A).find((n) => n.name === i);
1300
+ getType(n) {
1301
+ const e = t(this, q).find((i) => i.name === n);
1288
1302
  return e ? e.type : "string";
1289
1303
  }
1290
- indexOf(i) {
1291
- return t(this, A).findIndex((e) => e.name === i);
1304
+ indexOf(n) {
1305
+ return t(this, q).findIndex((e) => e.name === n);
1292
1306
  }
1293
- includes(i) {
1294
- return t(this, A).some((e) => e.name === i);
1307
+ includes(n) {
1308
+ return t(this, q).some((e) => e.name === n);
1295
1309
  }
1296
1310
  };
1297
- rt = new WeakMap(), A = new WeakMap(), wt = new WeakMap(), Ut = new WeakMap(), c(be, "ngFields");
1298
- let oe = be;
1299
- var Z, Ft, jt;
1300
- const ye = class ye extends HTMLElement {
1311
+ ct = new WeakMap(), q = new WeakMap(), Et = new WeakMap(), jt = new WeakMap(), h(pe, "ngFields");
1312
+ let le = pe;
1313
+ var Q, Kt, Zt;
1314
+ const me = class me extends HTMLElement {
1301
1315
  constructor() {
1302
1316
  super();
1303
1317
  //#created = false;
1304
- d(this, Z);
1305
- d(this, Ft);
1306
- d(this, jt, /* @__PURE__ */ c(() => {
1307
- this.fields = new oe(this), g(this, Ft, new ee(this)), lt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1318
+ d(this, Q);
1319
+ d(this, Kt);
1320
+ d(this, Zt, /* @__PURE__ */ h(() => {
1321
+ this.fields = new le(this), u(this, Kt, new ie(this)), dt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1308
1322
  }, "#init"));
1309
- this.attachShadow({ mode: "open" }), g(this, Z, new se(this));
1323
+ this.attachShadow({ mode: "open" }), u(this, Q, new re(this));
1310
1324
  }
1311
1325
  connectedCallback() {
1312
- t(this, jt).call(this);
1326
+ t(this, Zt).call(this);
1313
1327
  }
1314
1328
  disconnectedCallback() {
1315
- lt.log("NineTable disconnected.");
1329
+ dt.log("NineTable disconnected.");
1316
1330
  }
1317
1331
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1318
1332
  get data() {
1319
- return t(this, Z).data;
1333
+ return t(this, Q).data;
1320
1334
  }
1321
1335
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1322
1336
  get row() {
1323
- return t(this, Z).row;
1337
+ return t(this, Q).row;
1324
1338
  }
1325
1339
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1326
1340
  get dataManager() {
1327
- return t(this, Z);
1341
+ return t(this, Q);
1328
1342
  }
1329
1343
  };
1330
- Z = new WeakMap(), Ft = new WeakMap(), jt = new WeakMap(), c(ye, "NineTable");
1331
- let re = ye;
1332
- customElements.get("nine-table") || customElements.define("nine-table", re);
1344
+ Q = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), h(me, "NineTable");
1345
+ let ae = me;
1346
+ customElements.get("nine-table") || customElements.define("nine-table", ae);
1333
1347
  //# sourceMappingURL=nine-table.js.map