@ninebone/table 0.0.553 → 0.0.554

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.
@@ -4,8 +4,8 @@ var Ve = (R) => {
4
4
  };
5
5
  var Xe = (R, i, e) => i in R ? Fe(R, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[i] = e;
6
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), p = (R, i, e, s) => (Ye(R, i, "write to private field"), s ? s.call(R, e) : i.set(R, e), e);
7
+ var A = (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)), d = (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), p = (R, i, e, s) => (Ye(R, i, "write to private field"), s ? s.call(R, e) : i.set(R, e), e);
9
9
  var Ue = (R, i, e, s) => ({
10
10
  set _(r) {
11
11
  p(R, i, r, e);
@@ -27,60 +27,60 @@ 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
- 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(() => {
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__ */ 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 && (p(this, Z, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, Z).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ c(() => {
43
+ A(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 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
- a && (a.style.display = "flex");
47
+ const r = t(this, w).track, n = t(this, w).thumb, o = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth, h = s.scrollWidth;
48
+ if (a !== 0 && h > a)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- a && (a.style.display = "none");
51
+ o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
54
  const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
- const f = Math.max(Math.min(l * (o / d), l), 20);
56
+ const f = Math.max(Math.min(l * (a / h), l), 20);
57
57
  n.style.width = `${f}px`;
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
- const x = l - f;
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;
58
+ const u = e.scrollLeft, g = h - a;
59
+ let b = 0;
60
+ g > 0 && (b = parseInt(u / g * (l - f), 10)), b < 0 && (b = 0);
61
+ const m = l - f;
62
+ b > m && (b = m), n.style.left = `${b}px`, t(this, w).left.disabled = b === 0, t(this, w).right.disabled = b >= m - 1;
63
63
  }, "refresh"));
64
- h(this, G, /* @__PURE__ */ c((e) => {
64
+ d(this, G, /* @__PURE__ */ c((e) => {
65
65
  if (!t(this, w)) return !1;
66
66
  const s = t(this, w).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
68
- const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
69
- let o = e;
70
- o < 0 && (o = 0);
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;
68
+ const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
69
+ let a = e;
70
+ a < 0 && (a = 0);
71
+ const h = n.width - o;
72
+ a > h && (a = h), a = parseInt(a, 10), t(this, w).thumb.style.left = `${a}px`, t(this, w).left.disabled = a === 0, t(this, w).right.disabled = a >= h - 1;
73
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;
74
+ return h > 0 && u > 0 && (s.scrollLeft = a / h * u), a > 0 && a < h - 1;
75
75
  }, "#thumbMoveTo"));
76
- h(this, _t, /* @__PURE__ */ c(() => {
76
+ d(this, _t, /* @__PURE__ */ c(() => {
77
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
80
  t(this, G).call(this, n + r), p(this, X, setInterval(() => {
81
81
  clearInterval(t(this, X)), p(this, K, setInterval(() => {
82
- const a = parseInt(t(this, w).thumb.style.left || 0, 10);
83
- t(this, G).call(this, a + r) || clearInterval(t(this, K));
82
+ const o = parseInt(t(this, w).thumb.style.left || 0, 10);
83
+ t(this, G).call(this, o + r) || clearInterval(t(this, K));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ c(() => {
@@ -95,19 +95,19 @@ const Me = class Me extends HTMLElement {
95
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
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
- const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
99
- t(this, G).call(this, r.clientX - n.left - a / 2);
98
+ const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
99
+ t(this, G).call(this, r.clientX - n.left - o / 2);
100
100
  }), t(this, w).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
102
  r.stopPropagation(), r.preventDefault(), p(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
- const n = /* @__PURE__ */ c((o) => {
103
+ const n = /* @__PURE__ */ c((a) => {
104
104
  if (!t(this, j)) return;
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
- p(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
105
+ const h = t(this, w).track.getBoundingClientRect();
106
+ t(this, G).call(this, a.clientX - h.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
+ p(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
110
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -205,15 +205,15 @@ var F, at, J, q, xt, vt, Nt;
205
205
  const $e = class $e extends HTMLElement {
206
206
  constructor() {
207
207
  super();
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(() => {
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
+ A(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, r = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, d = t(this, at).getRowHeight(), l = o * d;
216
+ const e = t(this, q).container, s = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length, h = t(this, at).getRowHeight(), l = a * h;
217
217
  if (l <= n) {
218
218
  r.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
219
219
  return;
@@ -223,43 +223,43 @@ const $e = class $e extends HTMLElement {
223
223
  if (f <= 0) return;
224
224
  const u = Math.max(Math.min(f * (n / l), f), 20);
225
225
  r.style.height = `${u}px`;
226
- const b = e.scrollTop, g = Math.max(l - n, 1);
227
- let x = 0;
228
- g > 0 && (x = b / g * (f - u));
226
+ const g = e.scrollTop, b = Math.max(l - n, 1);
227
+ let m = 0;
228
+ b > 0 && (m = g / b * (f - u));
229
229
  const v = f - u;
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;
230
+ m < 0 && (m = 0), m > v && (m = v), r.style.top = `${m}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
231
231
  }, "refresh"));
232
- h(this, Nt, /* @__PURE__ */ c(() => {
232
+ d(this, Nt, /* @__PURE__ */ c(() => {
233
233
  N.log("nine-table-vscrollbar.#init");
234
234
  const e = t(this, q).container, s = /* @__PURE__ */ c(() => {
235
- const n = (t(this, F).data.get() || []).length, a = t(this, at).getRowHeight();
236
- return n * a;
235
+ const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
236
+ return n * o;
237
237
  }, "getContentHeight");
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, J) || this.refresh();
240
240
  }), t(this, q).thumb.addEventListener("mousedown", (r) => {
241
241
  if (r.button !== 0) return;
242
242
  r.stopPropagation(), r.preventDefault(), p(this, J, !0), p(this, xt, r.clientY), p(this, vt, e.scrollTop);
243
- const n = /* @__PURE__ */ c((o) => {
243
+ const n = /* @__PURE__ */ c((a) => {
244
244
  if (!t(this, J)) return;
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);
245
+ const h = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = h.height - l, g = a.clientY - t(this, xt), b = e.clientHeight, m = s(), v = Math.max(m - b, 1);
246
246
  if (u > 0 && v > 0) {
247
- const A = b / u * v;
248
- let m = t(this, vt) + A;
249
- const W = Math.max(0, x - g);
250
- m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
247
+ const E = g / u * v;
248
+ let x = t(this, vt) + E;
249
+ const O = Math.max(0, m - b);
250
+ x < 0 && (x = 0), x > O && (x = O), e.scrollTop = x;
251
251
  }
252
252
  this.refresh();
253
- }, "onMouseMove"), a = /* @__PURE__ */ c(() => {
254
- p(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
253
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
254
+ p(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
255
255
  }, "onMouseUp");
256
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
256
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
257
257
  }), t(this, q).track.addEventListener("mousedown", (r) => {
258
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;
259
+ const n = t(this, q).track.getBoundingClientRect(), o = t(this, q).thumb.clientHeight, a = r.clientY - n.top - o / 2, l = n.height - o, 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, a / l));
262
+ e.scrollTop = b * g;
263
263
  }
264
264
  this.refresh();
265
265
  }), t(this, q).top.addEventListener("click", () => {
@@ -357,60 +357,58 @@ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table
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
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(() => {
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
+ A(this, "refresh", /* @__PURE__ */ c(() => {
372
372
  var e;
373
373
  N.log("rowManager.refresh");
374
374
  const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
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__ */ c(() => {
377
+ A(this, "initialize", /* @__PURE__ */ c(() => {
378
378
  N.log("rowManager.initialize"), p(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
- }), p(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");
381
+ }), p(this, H, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
+ const a = t(this, S).querySelector(o);
385
383
  if (!a) return;
386
- const o = a.querySelector("tbody.bindable-tbody");
387
- if (!o) return;
388
- const l = Array.from(o.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
389
- t(this, P).set(r, l);
384
+ const h = a.querySelector(".ng-part-body table");
385
+ if (!h) return;
386
+ const l = h.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(o, u);
390
390
  });
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, setTimeout(() => {
395
- e && (e.scrollTop = r), s && (s.scrollTop = r), t(this, lt).call(this, r);
396
- });
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"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
+ 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 o = i.scrollTop, a = i.scrollLeft;
394
+ e && (e.scrollTop = o), s && (s.scrollTop = o), r && (r.scrollLeft = a), n && (n.scrollLeft = a), t(this, lt).call(this, o);
397
395
  }));
398
396
  }, "initialize"));
399
- h(this, Ot, /* @__PURE__ */ c((i, e) => {
397
+ d(this, Ot, /* @__PURE__ */ c((i, e) => {
400
398
  N.log("rowManager.#renderRows");
401
399
  const s = t(this, P).get(e);
402
400
  if (!s || s.length === 0) return;
403
401
  const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
404
402
  if (!r) return;
405
- r.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
406
- const n = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
407
- for (let o = 0; o < t(this, wt); o++)
408
- s.forEach((d) => {
409
- a.appendChild(d.cloneNode(!0));
403
+ r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
404
+ const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
405
+ for (let a = 0; a < t(this, wt); a++)
406
+ s.forEach((h) => {
407
+ o.appendChild(h.cloneNode(!0));
410
408
  });
411
- n ? n.before(a) : r.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
409
+ n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
412
410
  }, "#renderRows"));
413
- h(this, Bt, /* @__PURE__ */ c((i) => {
411
+ d(this, Bt, /* @__PURE__ */ c((i) => {
414
412
  if (N.log("rowManager.#measureAndCacheHeight"), t(this, H) !== null && t(this, H) > 0)
415
413
  return t(this, H);
416
414
  N.log("#measureAndCacheHeight");
@@ -418,63 +416,63 @@ const Ie = class Ie {
418
416
  if (!e || e.length === 0) return 24;
419
417
  const s = i.querySelector("tbody.bindable-tbody");
420
418
  if (!s) return 24;
421
- s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
419
+ s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
422
420
  const r = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
423
- e.forEach((b) => {
424
- n.appendChild(b.cloneNode(!0));
421
+ e.forEach((g) => {
422
+ n.appendChild(g.cloneNode(!0));
425
423
  }), r ? r.before(n) : s.appendChild(n);
426
- const a = t(this, S), o = a.style.display, d = a.style.visibility, l = a.style.position;
427
- (o === "none" || window.getComputedStyle(a).display === "none") && (a.style.display = "block", a.style.visibility = "hidden", a.style.position = "absolute");
424
+ const o = t(this, S), a = o.style.display, h = o.style.visibility, l = o.style.position;
425
+ (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
428
426
  let f = 0;
429
427
  const u = s.querySelectorAll("tr:not(.nodata)");
430
- return u.forEach((b) => {
431
- f += b.offsetHeight || b.getBoundingClientRect().height;
432
- }), u.forEach((b) => b.remove()), a.style.display = o, a.style.visibility = d, a.style.position = l, p(this, H, f > 0 ? f : 24), t(this, Et).call(this), t(this, H);
428
+ return u.forEach((g) => {
429
+ f += g.offsetHeight || g.getBoundingClientRect().height;
430
+ }), u.forEach((g) => g.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, p(this, H, f > 0 ? f : 24), t(this, Et).call(this), t(this, H);
433
431
  }, "#measureAndCacheHeight"));
434
- h(this, St, /* @__PURE__ */ c(() => {
432
+ d(this, St, /* @__PURE__ */ c(() => {
435
433
  N.log("rowManager.#updateVirtualScrollHeight");
436
434
  const e = (t(this, D).data.get() || []).length, s = t(this, H), r = e * s;
437
435
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
438
- const a = t(this, S).querySelector(n);
439
- if (!a) return;
440
- const o = a.querySelector(".ng-part-body .ng-virtual-spacer");
441
- o && (o.style.height = `${r}px`);
436
+ const o = t(this, S).querySelector(n);
437
+ if (!o) return;
438
+ const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
439
+ a && (a.style.height = `${r}px`);
442
440
  });
443
441
  }, "#updateVirtualScrollHeight"));
444
- h(this, Et, /* @__PURE__ */ c(() => {
442
+ d(this, Et, /* @__PURE__ */ c(() => {
445
443
  if (t(this, tt) > 0 && t(this, H) > 0) {
446
444
  const i = Math.ceil(t(this, tt) / t(this, H));
447
445
  p(this, wt, i + t(this, Wt));
448
446
  }
449
447
  }, "#updateRowCount"));
450
- h(this, zt, /* @__PURE__ */ c(() => {
451
- var o, d, l, f, u, b;
448
+ d(this, zt, /* @__PURE__ */ c(() => {
449
+ var a, h, l, f, u, g;
452
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");
453
451
  if (e) {
454
- 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);
455
- for (let m = 0; m < A; m++) {
456
- const W = [
457
- ((o = g[m]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
458
- ((d = x[m]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
459
- ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
460
- ], C = Math.max(...W);
461
- 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`));
452
+ const b = i ? Array.from(i.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], E = Math.max(b.length, m.length, v.length);
453
+ for (let x = 0; x < E; x++) {
454
+ const O = [
455
+ ((a = b[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
456
+ ((h = m[x]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
457
+ ((l = v[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
458
+ ], C = Math.max(...O);
459
+ C > 0 && (b[x] && (b[x].style.height = `${C}px`), m[x] && (m[x].style.height = `${C}px`), v[x] && (v[x].style.height = `${C}px`));
462
460
  }
463
461
  }
464
- 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");
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"), o = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
465
463
  if (n) {
466
- 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);
467
- for (let m = 0; m < A; m++) {
468
- const W = [
469
- ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
470
- ((u = x[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
471
- ((b = v[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
472
- ], C = Math.max(...W);
473
- 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`));
464
+ const b = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], E = Math.max(b.length, m.length, v.length);
465
+ for (let x = 0; x < E; x++) {
466
+ const O = [
467
+ ((f = b[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
468
+ ((u = m[x]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
469
+ ((g = v[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0
470
+ ], C = Math.max(...O);
471
+ C > 0 && (b[x] && (b[x].style.height = `${C}px`), m[x] && (m[x].style.height = `${C}px`), v[x] && (v[x].style.height = `${C}px`));
474
472
  }
475
473
  }
476
474
  }, "#syncRowHeights"));
477
- h(this, Pt, /* @__PURE__ */ c(() => {
475
+ d(this, Pt, /* @__PURE__ */ c(() => {
478
476
  !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, V, new ResizeObserver((i) => {
479
477
  for (const e of i) {
480
478
  const s = e.target;
@@ -482,61 +480,58 @@ const Ie = class Ie {
482
480
  const r = e.contentRect.height;
483
481
  if (r > 0) {
484
482
  let n = 0;
485
- const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
486
- a && (n += a.offsetHeight), o && (n += o.offsetHeight);
487
- const d = Math.max(r - n, 100);
488
- t(this, tt) !== d && (p(this, tt, d), t(this, Et).call(this), t(this, H) !== null && (t(this, At).call(this), this.refresh()));
483
+ const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
484
+ o && (n += o.offsetHeight), a && (n += a.offsetHeight);
485
+ const h = Math.max(r - n, 100);
486
+ t(this, tt) !== h && (p(this, tt, h), t(this, Et).call(this), t(this, H) !== null && (t(this, At).call(this), this.refresh()));
489
487
  }
490
488
  }
491
489
  })), t(this, V).observe(t(this, S)));
492
490
  }, "#initResizeObserver"));
493
- h(this, At, /* @__PURE__ */ c(() => {
491
+ d(this, At, /* @__PURE__ */ c(() => {
494
492
  N.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
495
493
  const e = t(this, S).querySelector(i);
496
494
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
497
495
  }), t(this, Dt).call(this), t(this, zt).call(this);
498
496
  }, "#renderAllContainers"));
499
- h(this, Ae, /* @__PURE__ */ c((i) => {
497
+ d(this, Ae, /* @__PURE__ */ c((i) => {
500
498
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
501
499
  var l;
502
500
  const s = t(this, S).querySelector(e);
503
501
  if (!s) return;
504
502
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
505
503
  if (!r) return;
506
- 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;
504
+ const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, h = (t(this, D).data.get() || []).length;
507
505
  n.forEach((f, u) => {
508
- const b = i + Math.floor(u / a);
509
- if (b >= d) {
506
+ const g = i + Math.floor(u / o);
507
+ if (g >= h) {
510
508
  f.style.display = "none";
511
509
  return;
512
510
  }
513
- const g = t(this, D).data.get(b);
514
- f.style.display = "", t(this, Rt).call(this, f, g, b);
511
+ const b = t(this, D).data.get(g);
512
+ f.style.display = "", t(this, Rt).call(this, f, b, g);
515
513
  });
516
514
  });
517
515
  }, "#adjustBufferRows"));
518
- h(this, lt, /* @__PURE__ */ c((i) => {
519
- var l, f;
516
+ d(this, lt, /* @__PURE__ */ c((i) => {
517
+ var h, l;
520
518
  const e = t(this, H);
521
519
  if (!e || e <= 0) return;
522
- 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;
523
- (f = t(this, Q)) == null || f.scrollTables.forEach((u) => {
524
- setTimeout(() => {
525
- u.style.transform = `translate3d(0, ${n}px, 0)`;
526
- });
527
- }), d !== r && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
528
- const b = t(this, S).querySelector(u);
529
- if (!b) return;
530
- const g = b.querySelector(".ng-part-body tbody.bindable-tbody");
520
+ const s = t(this, D).data.length, r = Math.max(0, Math.floor(i / e)), n = ((h = t(this, P).get(".ng-container-body")) == null ? void 0 : h.length) || 1, o = t(this, Q).firstTr, a = o && o.dataset.row !== void 0 ? parseInt(o.dataset.row, 10) : -1;
521
+ (l = t(this, Q)) == null || l.scrollTables.forEach((f) => {
522
+ }), a !== r && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((f) => {
523
+ const u = t(this, S).querySelector(f);
524
+ if (!u) return;
525
+ const g = u.querySelector(".ng-part-body tbody.bindable-tbody");
531
526
  if (!g) return;
532
- Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((v, A) => {
533
- const m = r + Math.floor(A / a);
534
- if (m >= s) {
535
- v.style.display = "none";
527
+ Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((m, v) => {
528
+ const E = r + Math.floor(v / n);
529
+ if (E >= s) {
530
+ m.style.display = "none";
536
531
  return;
537
532
  }
538
- const W = t(this, D).data.get(m);
539
- v.style.display = "", t(this, Rt).call(this, v, W, m);
533
+ const x = t(this, D).data.get(E);
534
+ m.style.display = "", t(this, Rt).call(this, m, x, E);
540
535
  });
541
536
  });
542
537
  }, "#handleScroll"));
@@ -554,29 +549,29 @@ const Ie = class Ie {
554
549
  cell.dataset.row = dataIndex;
555
550
  });
556
551
  }; */
557
- h(this, Rt, /* @__PURE__ */ c((i, e, s) => {
552
+ d(this, Rt, /* @__PURE__ */ c((i, e, s) => {
558
553
  i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
559
554
  r.dataset.row = s;
560
- const a = Array.from(r.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
561
- a && typeof a.refresh == "function" && a.refresh();
555
+ const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
556
+ o && typeof o.refresh == "function" && o.refresh();
562
557
  });
563
558
  }, "#bindRowData"));
564
- h(this, Dt, /* @__PURE__ */ c(() => {
565
- var d, l, f;
559
+ d(this, Dt, /* @__PURE__ */ c(() => {
560
+ var h, l, f;
566
561
  N.log("rowManager.#syncHeaderHeights");
567
562
  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");
568
563
  if (!e) return;
569
- 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);
570
- for (let u = 0; u < o; u++) {
571
- const b = [
572
- ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
564
+ const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
565
+ for (let u = 0; u < a; u++) {
566
+ const g = [
567
+ ((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
573
568
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
574
- ((f = a[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
575
- ], g = Math.max(...b);
576
- 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`));
569
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
570
+ ], b = Math.max(...g);
571
+ b > 0 && (r[u] && (r[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), o[u] && (o[u].style.height = `${b}px`));
577
572
  }
578
573
  }, "#syncHeaderHeights"));
579
- E(this, "destroy", /* @__PURE__ */ c(() => {
574
+ A(this, "destroy", /* @__PURE__ */ c(() => {
580
575
  t(this, V) && (t(this, V).disconnect(), p(this, V, null));
581
576
  }, "destroy"));
582
577
  p(this, D, i.getRootNode().host), p(this, S, i), t(this, Pt).call(this);
@@ -603,65 +598,65 @@ const jt = class jt {
603
598
  */
604
599
  static compile(i) {
605
600
  if (!i) return null;
606
- const e = /* @__PURE__ */ c((o) => {
607
- o.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
601
+ const e = /* @__PURE__ */ c((a) => {
602
+ a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
608
603
  const f = l.getAttribute("cell-type") || "renderer";
609
604
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
610
605
  let u = `cell-${f}`;
611
- const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), x = l.getAttribute("maxbyte"), v = l.getAttribute("type");
612
- let A = [];
613
- 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}>`;
606
+ const g = l.getAttribute("data-bind"), b = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), v = l.getAttribute("type");
607
+ let E = [];
608
+ g && E.push(`data-bind="${g}"`), b && E.push(`data-expr="${b}"`), m && E.push(`maxbyte="${m}"`), v && E.push(`type="${v}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
614
609
  });
615
- }, "processCellTypes"), s = /* @__PURE__ */ c((o) => {
616
- if (!o.querySelector("colgroup")) {
617
- 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);
618
- for (let b = 0; b < l; b++) {
619
- const g = document.createElement("col");
620
- g.setAttribute("width", u), f.appendChild(g);
610
+ }, "processCellTypes"), s = /* @__PURE__ */ c((a) => {
611
+ if (!a.querySelector("colgroup")) {
612
+ const h = a.querySelector("tbody tr") || a.querySelector("tr"), l = h ? h.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
613
+ for (let g = 0; g < l; g++) {
614
+ const b = document.createElement("col");
615
+ b.setAttribute("width", u), f.appendChild(b);
621
616
  }
622
- o.prepend(f);
617
+ a.prepend(f);
623
618
  }
624
- if (!o.querySelector("thead")) {
625
- const d = document.createElement("thead"), l = o.querySelector("colgroup");
626
- l ? l.after(d) : o.prepend(d);
619
+ if (!a.querySelector("thead")) {
620
+ const h = document.createElement("thead"), l = a.querySelector("colgroup");
621
+ l ? l.after(h) : a.prepend(h);
627
622
  }
628
- o.classList.add("nine-table-element"), o.style.display = "table";
629
- }, "ensureTableStructure"), r = /* @__PURE__ */ c((o, d) => {
630
- const l = Array.from(o.querySelectorAll(d + " tr")), f = Array.from(o.querySelectorAll(d + " th," + d + " td")), u = l.length;
623
+ a.classList.add("nine-table-element"), a.style.display = "table";
624
+ }, "ensureTableStructure"), r = /* @__PURE__ */ c((a, h) => {
625
+ const l = Array.from(a.querySelectorAll(h + " tr")), f = Array.from(a.querySelectorAll(h + " th," + h + " td")), u = l.length;
631
626
  if (u === 0 || f.length === 0) return;
632
- let b = 0;
633
- f.forEach((x) => {
634
- b += x.colSpan || 1;
627
+ let g = 0;
628
+ f.forEach((m) => {
629
+ g += m.colSpan || 1;
635
630
  });
636
- const g = Array.from(Array(u), () => Array(b).fill(null));
637
- l.forEach((x) => {
638
- const v = x.sectionRowIndex;
639
- let A = 0;
640
- Array.from(x.querySelectorAll("th,td")).forEach((m) => {
641
- for (let B = 0; B < g[v].length; B++)
642
- if (g[v][B] === null) {
643
- A = B;
631
+ const b = Array.from(Array(u), () => Array(g).fill(null));
632
+ l.forEach((m) => {
633
+ const v = m.sectionRowIndex;
634
+ let E = 0;
635
+ Array.from(m.querySelectorAll("th,td")).forEach((x) => {
636
+ for (let B = 0; B < b[v].length; B++)
637
+ if (b[v][B] === null) {
638
+ E = B;
644
639
  break;
645
640
  }
646
- const W = m.rowSpan || 1, C = m.colSpan || 1;
647
- for (let B = 0; B < W; B++)
641
+ const O = x.rowSpan || 1, C = x.colSpan || 1;
642
+ for (let B = 0; B < O; B++)
648
643
  for (let pt = 0; pt < C; pt++)
649
- v + B < u && A + pt < b && (g[v + B][A + pt] = B === 0 && pt === 0 ? "1" : "0");
644
+ v + B < u && E + pt < g && (b[v + B][E + pt] = B === 0 && pt === 0 ? "1" : "0");
650
645
  });
651
- }), l.forEach((x) => {
652
- const v = x.sectionRowIndex;
653
- Array.from(x.querySelectorAll("th,td")).forEach((A) => {
654
- for (let m = 0; m < g[v].length; m++)
655
- if (g[v][m] === "1") {
656
- A.dataset.col = m, g[v][m] = "0";
646
+ }), l.forEach((m) => {
647
+ const v = m.sectionRowIndex;
648
+ Array.from(m.querySelectorAll("th,td")).forEach((E) => {
649
+ for (let x = 0; x < b[v].length; x++)
650
+ if (b[v][x] === "1") {
651
+ E.dataset.col = x, b[v][x] = "0";
657
652
  break;
658
653
  }
659
654
  });
660
655
  });
661
656
  }, "resetColIndex"), n = i.cloneNode(!0);
662
- return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, d) => {
663
- const l = o.getAttribute("fixed");
664
- l && n.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((f) => {
657
+ return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, h) => {
658
+ const l = a.getAttribute("fixed");
659
+ l && n.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((f) => {
665
660
  f.setAttribute("fixed", l);
666
661
  });
667
662
  }), n;
@@ -674,13 +669,13 @@ var Ft, et, st, Vt, Yt, ct, Ut, Xt;
674
669
  const yt = class yt extends HTMLElement {
675
670
  constructor() {
676
671
  super();
677
- h(this, Ft);
678
- h(this, et, null);
679
- h(this, st);
680
- E(this, "invalidate", /* @__PURE__ */ c(() => {
672
+ d(this, Ft);
673
+ d(this, et, null);
674
+ d(this, st);
675
+ A(this, "invalidate", /* @__PURE__ */ c(() => {
681
676
  t(this, st).refresh();
682
677
  }, "invalidate"));
683
- h(this, Vt, /* @__PURE__ */ c(() => {
678
+ d(this, Vt, /* @__PURE__ */ c(() => {
684
679
  [
685
680
  { selector: ".ng-container-body", type: null },
686
681
  { selector: ".ng-container-left", type: "left" },
@@ -689,43 +684,43 @@ const yt = class yt extends HTMLElement {
689
684
  const n = this.querySelector(s);
690
685
  if (!n) return;
691
686
  n.innerHTML = "";
692
- const a = document.createElement("div");
693
- a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, et), r, "header"));
694
687
  const o = document.createElement("div");
695
- o.className = "ng-part-body";
696
- const d = document.createElement("div");
697
- 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"));
688
+ o.className = "ng-part-header", o.appendChild(t(this, ct).call(this, t(this, et), r, "header"));
689
+ const a = document.createElement("div");
690
+ a.className = "ng-part-body";
691
+ const h = document.createElement("div");
692
+ h.className = "ng-scroll-content", h.style.position = "relative", h.style.width = "100%", h.appendChild(t(this, ct).call(this, t(this, et), r, "body"));
698
693
  const l = document.createElement("div");
699
- l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", d.appendChild(l), o.appendChild(d);
694
+ l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", h.appendChild(l), a.appendChild(h);
700
695
  const f = document.createElement("div");
701
- 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);
696
+ f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, et), r, "footer")), n.appendChild(o), n.appendChild(a), n.appendChild(f);
702
697
  });
703
698
  }, "#renderSplitContainers"));
704
- h(this, Yt, /* @__PURE__ */ c(() => {
699
+ d(this, Yt, /* @__PURE__ */ c(() => {
705
700
  ["left", "right", "body"].forEach((e) => {
706
701
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
707
702
  if (!s || !r || r.length === 0) return;
708
703
  let n = 0;
709
- r[0].querySelectorAll("col").forEach((a) => {
710
- const o = parseInt(a.getAttribute("width"), 10);
711
- isNaN(n) || (n += o);
704
+ r[0].querySelectorAll("col").forEach((o) => {
705
+ const a = parseInt(o.getAttribute("width"), 10);
706
+ isNaN(n) || (n += a);
712
707
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
713
708
  });
714
709
  }, "#updateContainerWidths"));
715
- E(this, "generate", /* @__PURE__ */ c((e) => {
710
+ A(this, "generate", /* @__PURE__ */ c((e) => {
716
711
  e && (p(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, st).initialize(), setTimeout(() => {
717
712
  var s;
718
713
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
719
714
  }, 0));
720
715
  }, "generate"));
721
- h(this, ct, /* @__PURE__ */ c((e, s, r) => {
722
- const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), d = n.querySelector("tfoot");
716
+ d(this, ct, /* @__PURE__ */ c((e, s, r) => {
717
+ const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), h = n.querySelector("tfoot");
723
718
  if (r === "header") {
724
- if (o && o.remove(), d && d.remove(), e.querySelector("tbody")) {
719
+ if (a && a.remove(), h && h.remove(), e.querySelector("tbody")) {
725
720
  const f = document.createElement("tbody");
726
721
  f.className = "fixed-tbody", n.appendChild(f);
727
722
  }
728
- } else r === "body" ? (a && a.remove(), d && d.remove(), o && (o.className = "bindable-tbody")) : r === "footer" && (a && a.remove(), o && o.remove());
723
+ } else r === "body" ? (o && o.remove(), h && h.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
729
724
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
730
725
  l.getAttribute("fixed") !== "left" && l.remove();
731
726
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -734,19 +729,19 @@ const yt = class yt extends HTMLElement {
734
729
  l.remove();
735
730
  }), n;
736
731
  }, "#createSplitTable"));
737
- E(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
738
- E(this, "scrollToX", /* @__PURE__ */ c((e) => {
732
+ A(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
733
+ A(this, "scrollToX", /* @__PURE__ */ c((e) => {
739
734
  const s = this.querySelector(".ng-container-body .ng-part-body");
740
735
  s && (s.scrollLeft = e);
741
736
  }, "scrollToX"));
742
- E(this, "scrollToY", /* @__PURE__ */ c((e) => {
737
+ A(this, "scrollToY", /* @__PURE__ */ c((e) => {
743
738
  const s = this.querySelector(".ng-container-body .ng-part-body");
744
739
  s && (s.scrollTop = e);
745
740
  }, "scrollToY"));
746
- h(this, Ut, /* @__PURE__ */ c(() => {
741
+ d(this, Ut, /* @__PURE__ */ c(() => {
747
742
  t(this, Xt).call(this);
748
743
  }, "#init"));
749
- h(this, Xt, /* @__PURE__ */ c(() => {
744
+ d(this, Xt, /* @__PURE__ */ c(() => {
750
745
  const e = yt.SCROLLBAR_SIZE;
751
746
  this.innerHTML = `
752
747
  <style>
@@ -910,48 +905,48 @@ const yt = class yt extends HTMLElement {
910
905
  this.innerHTML = "", N.log("NineTableSheet destroyed.");
911
906
  }
912
907
  };
913
- 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(yt, "NineTableSheet"), E(yt, "SCROLLBAR_SIZE", 16);
908
+ 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(yt, "NineTableSheet"), A(yt, "SCROLLBAR_SIZE", 16);
914
909
  let $t = yt;
915
910
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
916
911
  var Kt, qt;
917
912
  const _e = class _e extends HTMLElement {
918
913
  constructor() {
919
914
  super();
920
- h(this, Kt, /* @__PURE__ */ c(() => {
915
+ d(this, Kt, /* @__PURE__ */ c(() => {
921
916
  var e;
922
917
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
923
- var a;
924
- const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
918
+ var o;
919
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
925
920
  t(this, qt).call(this, n, r);
926
921
  }), t(this, qt).call(this, 0, !1);
927
922
  }, "#init"));
928
- h(this, qt, /* @__PURE__ */ c((e, s = !1) => {
923
+ d(this, qt, /* @__PURE__ */ c((e, s = !1) => {
929
924
  const r = /* @__PURE__ */ c(() => {
930
925
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
931
- Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
932
- const b = f.filter((g) => g.classList.contains("active"));
933
- b.length < 2 || b.forEach((g) => {
934
- const x = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${x}"]`), A = f[x + 1];
935
- v && A && A.classList.contains("active") && v.style.setProperty("display", "flex");
926
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
927
+ const g = f.filter((b) => b.classList.contains("active"));
928
+ g.length < 2 || g.forEach((b) => {
929
+ const m = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), E = f[m + 1];
930
+ v && E && E.classList.contains("active") && v.style.setProperty("display", "flex");
936
931
  });
937
- }, "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");
938
- if (!o[e]) return;
932
+ }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
933
+ if (!a[e]) return;
939
934
  if (!s)
940
- o.forEach((f, u) => {
935
+ a.forEach((f, u) => {
941
936
  f.classList.toggle("active", u === e);
942
- }), d.forEach((f, u) => {
943
- const b = u === e;
944
- f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
937
+ }), h.forEach((f, u) => {
938
+ const g = u === e;
939
+ f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
945
940
  });
946
941
  else {
947
- const f = o[e], u = n.querySelectorAll(".nine-tab-item.active");
942
+ const f = a[e], u = n.querySelectorAll(".nine-tab-item.active");
948
943
  if (f.classList.contains("active") && u.length <= 1)
949
944
  return;
950
945
  f.classList.toggle("active");
951
- const b = a.querySelector(`nine-table-sheet[data-index="${e}"]`);
952
- b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
946
+ const g = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
947
+ g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
953
948
  }
954
- const l = a.querySelectorAll("nine-table-sheet.active");
949
+ const l = o.querySelectorAll("nine-table-sheet.active");
955
950
  l == null || l.forEach((f) => {
956
951
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
957
952
  }), r();
@@ -967,25 +962,25 @@ customElements.get("nine-table-sheets") || customElements.define("nine-table-she
967
962
  var M, Zt, Tt, Gt;
968
963
  const Ne = class Ne {
969
964
  constructor(i) {
970
- h(this, M);
971
- h(this, Zt, /* @__PURE__ */ c(() => {
965
+ d(this, M);
966
+ d(this, Zt, /* @__PURE__ */ c(() => {
972
967
  t(this, Gt).call(this), new ResizeObserver((i) => {
973
968
  for (let e of i)
974
969
  t(this, M).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
975
970
  }).observe(t(this, M));
976
971
  }, "#init"));
977
- h(this, Tt, /* @__PURE__ */ c(() => {
978
- var d, l;
972
+ d(this, Tt, /* @__PURE__ */ c(() => {
973
+ var h, l;
979
974
  const i = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
980
975
  if (i.length === 0) return;
981
- 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;
982
- t(this, M).style.height = `${o}px`;
976
+ const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (h = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = $t.SCROLLBAR_SIZE, a = e * s + r + n + o;
977
+ t(this, M).style.height = `${a}px`;
983
978
  }, "#applyAutoHeight"));
984
- h(this, Gt, /* @__PURE__ */ c(() => {
985
- 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) => {
986
- 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>` : "";
987
- return u + b;
988
- }).join(""), a = e.map((d, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
979
+ d(this, Gt, /* @__PURE__ */ c(() => {
980
+ const e = Array.from(t(this, M).children).filter((h) => h.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, n = e.map((h, l) => {
981
+ const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
982
+ return u + g;
983
+ }).join(""), o = e.map((h, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
989
984
  t(this, M).shadowRoot.innerHTML = `
990
985
  <style>
991
986
  :host {
@@ -1069,7 +1064,7 @@ const Ne = class Ne {
1069
1064
  <nine-table-sheets>
1070
1065
  <nine-table-sheets-body>${n}</nine-table-sheets-body>
1071
1066
  <nine-table-sheets-footer>
1072
- <div class="nine-tab-bar">${a}</div>
1067
+ <div class="nine-tab-bar">${o}</div>
1073
1068
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1074
1069
  </nine-table-sheets-footer>
1075
1070
  </nine-table-sheets>
@@ -1077,10 +1072,10 @@ const Ne = class Ne {
1077
1072
  </nine-table-body>
1078
1073
  <nine-table-footer></nine-table-footer>
1079
1074
  `;
1080
- const o = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1081
- o == null || o.forEach((d, l) => {
1075
+ const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1076
+ a == null || a.forEach((h, l) => {
1082
1077
  e[l] && setTimeout(() => {
1083
- d.generate(e[l]), s && t(this, Tt).call(this);
1078
+ h.generate(e[l]), s && t(this, Tt).call(this);
1084
1079
  });
1085
1080
  });
1086
1081
  }, "#render"));
@@ -1092,9 +1087,9 @@ let fe = Ne;
1092
1087
  var kt, ht;
1093
1088
  const We = class We {
1094
1089
  constructor(i) {
1095
- h(this, kt);
1096
- h(this, ht, -1);
1097
- E(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
1090
+ d(this, kt);
1091
+ d(this, ht, -1);
1092
+ A(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
1098
1093
  p(this, kt, i);
1099
1094
  }
1100
1095
  get at() {
@@ -1108,15 +1103,15 @@ const We = class We {
1108
1103
  kt = new WeakMap(), ht = new WeakMap(), c(We, "ngRow");
1109
1104
  let ue = We;
1110
1105
  var I, T, _, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
1111
- const O = class O {
1106
+ const W = class W {
1112
1107
  constructor(i, e) {
1113
- h(this, I);
1114
- h(this, T);
1115
- h(this, _, []);
1116
- h(this, dt, []);
1117
- h(this, Jt, 0);
1118
- h(this, Y, []);
1119
- h(this, Qt, /* @__PURE__ */ c(() => {
1108
+ d(this, I);
1109
+ d(this, T);
1110
+ d(this, _, []);
1111
+ d(this, dt, []);
1112
+ d(this, Jt, 0);
1113
+ d(this, Y, []);
1114
+ d(this, Qt, /* @__PURE__ */ c(() => {
1120
1115
  p(this, Y, []);
1121
1116
  const i = t(this, I).template || [];
1122
1117
  Array.from(i).forEach((e) => {
@@ -1126,12 +1121,12 @@ const O = class O {
1126
1121
  e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
1127
1122
  });
1128
1123
  }, "#initialize"));
1129
- h(this, it, /* @__PURE__ */ c(() => {
1124
+ d(this, it, /* @__PURE__ */ c(() => {
1130
1125
  t(this, I).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1131
1126
  i.invalidate();
1132
1127
  });
1133
1128
  }, "#invalidate"));
1134
- E(this, "get", /* @__PURE__ */ c((i, e) => {
1129
+ A(this, "get", /* @__PURE__ */ c((i, e) => {
1135
1130
  var n;
1136
1131
  const s = this.getValidData();
1137
1132
  if (!s || s.length <= 0) return;
@@ -1139,95 +1134,95 @@ const O = class O {
1139
1134
  if (i < 0 || i >= s.length) return null;
1140
1135
  const r = typeof ((n = t(this, I).fields) == null ? void 0 : n.get) == "function" ? t(this, I).fields.get() : [];
1141
1136
  if (e != null) {
1142
- const a = r.indexOf(e);
1143
- return a >= 0 ? s[i].v[a] : null;
1137
+ const o = r.indexOf(e);
1138
+ return o >= 0 ? s[i].v[o] : null;
1144
1139
  }
1145
1140
  return t(this, ft).call(this, s[i]);
1146
1141
  }, "get"));
1147
- E(this, "set", /* @__PURE__ */ c((i) => {
1142
+ A(this, "set", /* @__PURE__ */ c((i) => {
1148
1143
  this.clear(), this.add(i, !1), t(this, it).call(this);
1149
1144
  }, "set"));
1150
- h(this, Ct, /* @__PURE__ */ c(() => ({
1151
- rowState: O.ROW_STATE.EMPTY,
1145
+ d(this, Ct, /* @__PURE__ */ c(() => ({
1146
+ rowState: W.ROW_STATE.EMPTY,
1152
1147
  deleted: !1,
1153
1148
  filtered: !1,
1154
1149
  height: t(this, Y).slice(),
1155
1150
  o: {},
1156
1151
  c: {},
1157
- _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1152
+ _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1158
1153
  }), "#getDefaultMeta"));
1159
- E(this, "reset", /* @__PURE__ */ c(() => {
1154
+ A(this, "reset", /* @__PURE__ */ c(() => {
1160
1155
  p(this, _, []), p(this, dt, []), t(this, it).call(this);
1161
1156
  }, "reset"));
1162
- E(this, "clear", /* @__PURE__ */ c(() => {
1157
+ A(this, "clear", /* @__PURE__ */ c(() => {
1163
1158
  var i;
1164
1159
  t(this, T).rawRecords = [], p(this, _, []), p(this, dt, []), (i = t(this, T).viewRecords) != null && i.reset && t(this, T).viewRecords.reset();
1165
1160
  }, "clear"));
1166
- h(this, te, /* @__PURE__ */ c((i) => {
1161
+ d(this, te, /* @__PURE__ */ c((i) => {
1167
1162
  var r;
1168
1163
  Array.isArray(i) || (i = [i]);
1169
1164
  const e = typeof ((r = t(this, I).fields) == null ? void 0 : r.get) == "function" ? t(this, I).fields.get() : Object.keys(i[0] || {}), s = [];
1170
1165
  return i.forEach((n) => {
1171
- const a = { v: [] };
1172
- e.forEach((o) => {
1173
- a.v.push(n[o] !== void 0 && n[o] !== null ? n[o] : "");
1174
- }), s.push(a);
1166
+ const o = { v: [] };
1167
+ e.forEach((a) => {
1168
+ o.v.push(n[a] !== void 0 && n[a] !== null ? n[a] : "");
1169
+ }), s.push(o);
1175
1170
  }), s;
1176
1171
  }, "#json2Array"));
1177
- h(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1178
- 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;
1172
+ d(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1173
+ e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1179
1174
  }), i), "#defaultInsert"));
1180
- E(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1175
+ A(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1181
1176
  i === void 0 && (i = {});
1182
1177
  const s = t(this, te).call(this, i);
1183
1178
  t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1184
1179
  const r = this.count() - 1;
1185
- return e || s.forEach((n, a) => {
1186
- const o = t(this, T).rawRecords[r - a];
1187
- o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
1180
+ return e || s.forEach((n, o) => {
1181
+ const a = t(this, T).rawRecords[r - o];
1182
+ a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1188
1183
  }), t(this, it).call(this), r;
1189
1184
  }, "add"));
1190
- E(this, "delete", /* @__PURE__ */ c((i) => {
1185
+ A(this, "delete", /* @__PURE__ */ c((i) => {
1191
1186
  let e = [];
1192
1187
  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) => {
1193
1188
  if (t(this, _)[s]) {
1194
1189
  const r = t(this, _)[s].__ng.rowid;
1195
- 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) => {
1196
- n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1190
+ t(this, _)[s].__ng.rowState === W.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, T).rawRecords.forEach((n) => {
1191
+ n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = W.ROW_STATE.DELETE);
1197
1192
  });
1198
1193
  }
1199
1194
  }), this.resetRecords(), t(this, it).call(this);
1200
1195
  }, "delete"));
1201
- E(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1202
- var d;
1196
+ A(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1197
+ var h;
1203
1198
  i = parseInt(i, 10);
1204
- const n = (typeof ((d = t(this, I).fields) == null ? void 0 : d.get) == "function" ? t(this, I).fields.get() : []).indexOf(e);
1199
+ const n = (typeof ((h = t(this, I).fields) == null ? void 0 : h.get) == "function" ? t(this, I).fields.get() : []).indexOf(e);
1205
1200
  if (n < 0) return;
1206
- const a = this.getValidData()[i];
1207
- if (!a) return;
1208
- const o = a.v[n];
1209
- 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;
1201
+ const o = this.getValidData()[i];
1202
+ if (!o) return;
1203
+ const a = o.v[n];
1204
+ a !== s && o.__ng.rowState !== W.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = W.ROW_STATE.UPDATE), o.v[n] = s;
1210
1205
  }, "setValue"));
1211
- E(this, "resetRecords", /* @__PURE__ */ c(() => {
1206
+ A(this, "resetRecords", /* @__PURE__ */ c(() => {
1212
1207
  p(this, dt, t(this, T).rawRecords.filter((i) => !i.__ng.deleted)), p(this, _, t(this, T).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, T).rawRecords.forEach((i, e) => {
1213
1208
  i.__ng.rowidx = e;
1214
1209
  }), t(this, _).forEach((i, e) => {
1215
1210
  i.__ng.i = e;
1216
1211
  });
1217
1212
  }, "resetRecords"));
1218
- E(this, "getValidData", /* @__PURE__ */ c(() => (t(this, _).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1219
- h(this, ft, /* @__PURE__ */ c((i) => {
1220
- var a;
1213
+ A(this, "getValidData", /* @__PURE__ */ c(() => (t(this, _).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1214
+ d(this, ft, /* @__PURE__ */ c((i) => {
1215
+ var o;
1221
1216
  if (!i) return i;
1222
- 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) => {
1223
- const d = {};
1217
+ const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((o = t(this, I).fields) == null ? void 0 : o.get) == "function" ? t(this, I).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
1218
+ const h = {};
1224
1219
  return r.forEach((l, f) => {
1225
- d[l] = o.v ? o.v[f] : o[l];
1226
- }), d.__ng = o.__ng, d;
1220
+ h[l] = a.v ? a.v[f] : a[l];
1221
+ }), h.__ng = a.__ng, h;
1227
1222
  });
1228
1223
  return e ? n[0] : n;
1229
1224
  }, "#conv"));
1230
- E(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1225
+ A(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1231
1226
  p(this, I, i), p(this, T, e), t(this, Qt).call(this);
1232
1227
  }
1233
1228
  get source() {
@@ -1249,19 +1244,19 @@ const O = class O {
1249
1244
  return this.length;
1250
1245
  }
1251
1246
  };
1252
- 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"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1253
- E(O, "ROW_STATE", {
1247
+ 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(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1248
+ A(W, "ROW_STATE", {
1254
1249
  EMPTY: "EMPTY",
1255
1250
  NORMAL: "NORMAL",
1256
1251
  INSERT: "INSERT",
1257
1252
  UPDATE: "UPDATE",
1258
1253
  DELETE: "DELETE"
1259
1254
  });
1260
- let ge = O;
1255
+ let ge = W;
1261
1256
  var rt;
1262
1257
  const Oe = class Oe {
1263
1258
  constructor(i) {
1264
- h(this, rt);
1259
+ d(this, rt);
1265
1260
  p(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 = () => {
1266
1261
  var e;
1267
1262
  (e = t(this, rt).view) != null && e.redraw && t(this, rt).view.redraw();
@@ -1285,44 +1280,44 @@ var ut, L, Lt, se;
1285
1280
  const Be = class Be {
1286
1281
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1287
1282
  constructor(i) {
1288
- h(this, ut);
1289
- h(this, L, []);
1290
- E(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1283
+ d(this, ut);
1284
+ d(this, L, []);
1285
+ A(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1291
1286
  i.forEach((s) => {
1292
1287
  t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1293
1288
  }), t(this, Lt).call(this);
1294
1289
  }, "add"));
1295
- h(this, Lt, /* @__PURE__ */ c(() => {
1290
+ d(this, Lt, /* @__PURE__ */ c(() => {
1296
1291
  const i = /* @__PURE__ */ new Map();
1297
1292
  t(this, L).forEach((e) => {
1298
1293
  i.set(e.name, e.type);
1299
1294
  }), p(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), p(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1300
1295
  }, "#adjust"));
1301
- h(this, se, /* @__PURE__ */ c(() => {
1296
+ d(this, se, /* @__PURE__ */ c(() => {
1302
1297
  p(this, L, []), N.log(t(this, ut).querySelectorAll("table"));
1303
1298
  const i = Array.from(t(this, ut).querySelectorAll("table"));
1304
1299
  if (!(!i || i.length === 0)) {
1305
1300
  for (const e of i)
1306
1301
  N.log(e), $("[data-bind]", e).each((s, r) => {
1307
- const n = r.dataset.bind, a = r.getAttribute("data-type") || "string";
1308
- n && t(this, L).push({ name: n, type: a });
1302
+ const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1303
+ n && t(this, L).push({ name: n, type: o });
1309
1304
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1310
1305
  $(`[${s}]`, e).each((r, n) => {
1311
- var a = n.getAttribute(s);
1312
- if (a.indexOf("data.") < 0) {
1313
- const o = a.search(/[(]/g);
1314
- if (o > 0)
1306
+ var o = n.getAttribute(s);
1307
+ if (o.indexOf("data.") < 0) {
1308
+ const a = o.search(/[(]/g);
1309
+ if (a > 0)
1315
1310
  try {
1316
- a = String(window[a.substring(0, o).trim()]);
1311
+ o = String(window[o.substring(0, a).trim()]);
1317
1312
  } catch {
1318
- a = "";
1313
+ o = "";
1319
1314
  }
1320
1315
  }
1321
- a.split("data.").forEach((o) => {
1322
- if (o.trim() != "") {
1323
- const d = o.search(/[^_A-Za-z0-9]/g);
1316
+ o.split("data.").forEach((a) => {
1317
+ if (a.trim() != "") {
1318
+ const h = a.search(/[^_A-Za-z0-9]/g);
1324
1319
  let l = "";
1325
- d >= 0 ? l = o.substring(0, d) : a.startsWith("data.") && (l = o.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1320
+ h >= 0 ? l = a.substring(0, h) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1326
1321
  }
1327
1322
  });
1328
1323
  });
@@ -1359,9 +1354,9 @@ const ze = class ze extends HTMLElement {
1359
1354
  constructor() {
1360
1355
  super();
1361
1356
  //#created = false;
1362
- h(this, nt);
1363
- h(this, ie);
1364
- h(this, re, /* @__PURE__ */ c(() => {
1357
+ d(this, nt);
1358
+ d(this, ie);
1359
+ d(this, re, /* @__PURE__ */ c(() => {
1365
1360
  this.fields = new pe(this), p(this, ie, new fe(this)), N.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1366
1361
  }, "#init"));
1367
1362
  this.attachShadow({ mode: "open" }), p(this, nt, new be(this));
@@ -1399,20 +1394,20 @@ const mt = class mt extends HTMLElement {
1399
1394
  connectedCallback() {
1400
1395
  }
1401
1396
  };
1402
- c(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1397
+ c(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1403
1398
  let me = mt;
1404
1399
  var k, Ht, y, Re, qe, Te, ke, Ce;
1405
1400
  const Pe = class Pe extends me {
1406
1401
  constructor() {
1407
1402
  super();
1408
- h(this, k);
1409
- h(this, Ht);
1410
- h(this, y);
1411
- h(this, Re);
1412
- h(this, qe);
1413
- h(this, Te);
1414
- h(this, ke);
1415
- E(this, "getDisplayText", /* @__PURE__ */ c((e) => {
1403
+ d(this, k);
1404
+ d(this, Ht);
1405
+ d(this, y);
1406
+ d(this, Re);
1407
+ d(this, qe);
1408
+ d(this, Te);
1409
+ d(this, ke);
1410
+ A(this, "getDisplayText", /* @__PURE__ */ c((e) => {
1416
1411
  if (t(this, y))
1417
1412
  if (t(this, y).closest("tbody")) {
1418
1413
  const s = t(this, y).closest("tr").data, r = parseInt(t(this, y).dataset.row);
@@ -1432,23 +1427,23 @@ const Pe = class Pe extends me {
1432
1427
  } catch {
1433
1428
  }
1434
1429
  }, "getDisplayText"));
1435
- h(this, Ce, /* @__PURE__ */ c(() => {
1430
+ d(this, Ce, /* @__PURE__ */ c(() => {
1436
1431
  if (!(!t(this, k) || !t(this, k).template || !t(this, y).closest("tbody.bindable"))) {
1437
1432
  var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
1438
1433
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1439
1434
  var s = t(this, y).closest("tr"), r = [];
1440
- $("th,td", s).each((m, W) => {
1441
- var C = ninegrid.j.querySelectorAll(W).attr("suppress");
1442
- C && W.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && r.push(C));
1435
+ $("th,td", s).each((x, O) => {
1436
+ var C = ninegrid.j.querySelectorAll(O).attr("suppress");
1437
+ C && O.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && r.push(C));
1443
1438
  }), r.sort();
1444
1439
  var n = !1;
1445
1440
  if (parseInt(s.sectionRowIndex / t(this, k).template.length) > 0)
1446
- for (var a of r) {
1447
- if (a > e) break;
1448
- var o = parseInt(t(this, y).dataset.row), d = o - 1, l = t(this, y).closest("tr").data, f = t(this, k).data.get(d);
1441
+ for (var o of r) {
1442
+ if (o > e) break;
1443
+ var a = parseInt(t(this, y).dataset.row), h = a - 1, l = t(this, y).closest("tr").data, f = t(this, k).data.get(h);
1449
1444
  t(this, y).dataset.matrixRow;
1450
- var u = t(this, k).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, y).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];
1451
- if (b != g) {
1445
+ var u = t(this, k).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, y).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, h) : f[u.dataset.bind];
1446
+ if (g != b) {
1452
1447
  n = !0;
1453
1448
  break;
1454
1449
  }
@@ -1456,17 +1451,17 @@ const Pe = class Pe extends me {
1456
1451
  else
1457
1452
  n = !0;
1458
1453
  n ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, y)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, y)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, y)).addClass("hidden"));
1459
- var x = parseInt(t(this, y).dataset.matrixRow), v = x - 1, A = t(this, k).body.querySelector(`tbody.bindable [data-col="${t(this, y).dataset.col}"][data-matrix-row="${v}"]`);
1460
- $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1454
+ var m = parseInt(t(this, y).dataset.matrixRow), v = m - 1, E = t(this, k).body.querySelector(`tbody.bindable [data-col="${t(this, y).dataset.col}"][data-matrix-row="${v}"]`);
1455
+ $(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
1461
1456
  }
1462
1457
  }
1463
1458
  }, "#resetSuppress"));
1464
- E(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
1459
+ A(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
1465
1460
  if (typeof e < "u")
1466
1461
  try {
1467
1462
  r = parseInt(r);
1468
- const a = e.replace("()", "");
1469
- return t(this, k)[a] ? t(this, k)[a].call(this, s, r, t(this, y)) : t(this, k).exprFunction(e).call(this, s, r, t(this, k).data);
1463
+ const o = e.replace("()", "");
1464
+ return t(this, k)[o] ? t(this, k)[o].call(this, s, r, t(this, y)) : t(this, k).exprFunction(e).call(this, s, r, t(this, k).data);
1470
1465
  } catch {
1471
1466
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1472
1467
  }
@@ -1516,13 +1511,13 @@ var Mt, ot, gt, bt, ne, U, Le;
1516
1511
  const je = class je extends ve {
1517
1512
  constructor() {
1518
1513
  super();
1519
- h(this, Mt);
1520
- h(this, ot);
1521
- h(this, gt);
1522
- h(this, bt);
1523
- h(this, ne);
1524
- h(this, U);
1525
- E(this, "refresh", /* @__PURE__ */ c(() => {
1514
+ d(this, Mt);
1515
+ d(this, ot);
1516
+ d(this, gt);
1517
+ d(this, bt);
1518
+ d(this, ne);
1519
+ d(this, U);
1520
+ A(this, "refresh", /* @__PURE__ */ c(() => {
1526
1521
  const e = super.refresh();
1527
1522
  t(this, Mt).value = e;
1528
1523
  }, "refresh"));
@@ -1556,7 +1551,7 @@ const je = class je extends ve {
1556
1551
  if (!v) this.reset();
1557
1552
  };
1558
1553
  */
1559
- h(this, Le, /* @__PURE__ */ c((e) => {
1554
+ d(this, Le, /* @__PURE__ */ c((e) => {
1560
1555
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1561
1556
  if (t(this, ot) == "number") {
1562
1557
  let n = [];