e-virt-table 0.1.4 → 0.1.6

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.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--e-virt-table-color-white: #fff;--e-virt-table-color-black: #000000;--e-virt-table-color-primary: rgb(82, 146, 247);--e-virt-table-text-color-primary: #333;--e-virt-table-text-color-regular: #666;--e-virt-table-text-color-secondary: #999;--e-virt-table-box-shadow: 0 2px 12px 0 #0000001a;--e-virt-table-editor-bg-color: #fff;--e-virt-table-border-color: #e1e6eb}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;z-index:10;border-radius:8px;border:1px solid var(--e-virt-table-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10px}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--e-virt-table-editor-bg-color);border:2px solid var(--e-virt-table-color-primary);box-sizing:border-box;box-shadow:var(--e-virt-table-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:"absolute";left:0;top:0;overflow:hidden;z-index:10}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--e-virt-table-color-white);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--e-virt-table-text-color-regular);background-color:var(--e-virt-table-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--e-virt-table-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:8px 24px;color:var(--e-virt-table-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--e-virt-table-color-primary);background-color:#f5f7fa}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
2
  var me = Object.defineProperty;
3
3
  var Ee = (n, t, e) => t in n ? me(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
4
- var l = (n, t, e) => Ee(n, typeof t != "symbol" ? t + "" : t, e);
4
+ var h = (n, t, e) => Ee(n, typeof t != "symbol" ? t + "" : t, e);
5
5
  function $() {
6
6
  return $ = Object.assign ? Object.assign.bind() : function(n) {
7
7
  for (var t = 1; t < arguments.length; t++) {
@@ -39,7 +39,7 @@ function dt(n, t, e) {
39
39
  return Ce() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
40
40
  var a = [null];
41
41
  a.push.apply(a, r);
42
- var h = Function.bind.apply(s, a), c = new h();
42
+ var l = Function.bind.apply(s, a), c = new l();
43
43
  return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
@@ -157,11 +157,11 @@ var Ft = /* @__PURE__ */ function(n) {
157
157
  }
158
158
  return t;
159
159
  }(/* @__PURE__ */ bt(Error));
160
- function Te(n, t, e, i, s) {
160
+ function Se(n, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(x, u) {
163
- var g = function(y) {
164
- return i(y), y.length ? u(new Ft(y, Ct(y))) : x(s);
163
+ var g = function(p) {
164
+ return i(p), p.length ? u(new Ft(p, Ct(p))) : x(s);
165
165
  }, w = Oe(n);
166
166
  Xt(w, e, g);
167
167
  });
@@ -169,21 +169,21 @@ function Te(n, t, e, i, s) {
169
169
  return x;
170
170
  }), r;
171
171
  }
172
- var o = t.firstFields === !0 ? Object.keys(n) : t.firstFields || [], a = Object.keys(n), h = a.length, c = 0, f = [], d = new Promise(function(x, u) {
173
- var g = function(p) {
174
- if (f.push.apply(f, p), c++, c === h)
172
+ var o = t.firstFields === !0 ? Object.keys(n) : t.firstFields || [], a = Object.keys(n), l = a.length, c = 0, f = [], d = new Promise(function(x, u) {
173
+ var g = function(y) {
174
+ if (f.push.apply(f, y), c++, c === l)
175
175
  return i(f), f.length ? u(new Ft(f, Ct(f))) : x(s);
176
176
  };
177
177
  a.length || (i(f), x(s)), a.forEach(function(w) {
178
- var p = n[w];
179
- o.indexOf(w) !== -1 ? Xt(p, e, g) : Ie(p, e, g);
178
+ var y = n[w];
179
+ o.indexOf(w) !== -1 ? Xt(y, e, g) : Ie(y, e, g);
180
180
  });
181
181
  });
182
182
  return d.catch(function(x) {
183
183
  return x;
184
184
  }), d;
185
185
  }
186
- function Se(n) {
186
+ function Te(n) {
187
187
  return !!(n && n.message !== void 0);
188
188
  }
189
189
  function Ae(n, t) {
@@ -197,7 +197,7 @@ function Ae(n, t) {
197
197
  function kt(n, t) {
198
198
  return function(e) {
199
199
  var i;
200
- return n.fullFields ? i = Ae(t, n.fullFields) : i = t[e.field || n.fullField], Se(e) ? (e.field = e.field || n.fullField, e.fieldValue = i, e) : {
200
+ return n.fullFields ? i = Ae(t, n.fullFields) : i = t[e.field || n.fullField], Te(e) ? (e.field = e.field || n.fullField, e.fieldValue = i, e) : {
201
201
  message: typeof e == "function" ? e() : e,
202
202
  fieldValue: i,
203
203
  field: e.field || n.fullField
@@ -234,15 +234,15 @@ var jt = function(t, e, i, s, r, o) {
234
234
  (?:` + i + ":){1}(?:(?::" + i + "){0,4}:" + e + "|(?::" + i + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
235
235
  (?::(?:(?::` + i + "){0,5}:" + e + "|(?::" + i + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
236
236
  )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
237
- `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), a = new RegExp("^" + s + "$"), h = function(E) {
237
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), a = new RegExp("^" + s + "$"), l = function(E) {
238
238
  return E && E.exact ? r : new RegExp("(?:" + t(E) + e + t(E) + ")|(?:" + t(E) + s + t(E) + ")", "g");
239
239
  };
240
- h.v4 = function(m) {
240
+ l.v4 = function(m) {
241
241
  return m && m.exact ? o : new RegExp("" + t(m) + e + t(m), "g");
242
- }, h.v6 = function(m) {
242
+ }, l.v6 = function(m) {
243
243
  return m && m.exact ? a : new RegExp("" + t(m) + s + t(m), "g");
244
244
  };
245
- var c = "(?:(?:[a-z]+:)?//)", f = "(?:\\S+(?::\\S*)?@)?", d = h.v4().source, x = h.v6().source, u = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", g = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", w = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", p = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', b = "(?:" + c + "|www\\.)" + f + "(?:localhost|" + d + "|" + x + "|" + u + g + w + ")" + p + y;
245
+ var c = "(?:(?:[a-z]+:)?//)", f = "(?:\\S+(?::\\S*)?@)?", d = l.v4().source, x = l.v6().source, u = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", g = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", w = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", y = "(?::\\d{2,5})?", p = '(?:[/?#][^\\s"]*)?', b = "(?:" + c + "|www\\.)" + f + "(?:localhost|" + d + "|" + x + "|" + u + g + w + ")" + y + p;
246
246
  return ct = new RegExp("(?:^" + b + "$)", "i"), ct;
247
247
  }, Yt = {
248
248
  // http://emailregex.com/
@@ -300,10 +300,10 @@ var jt = function(t, e, i, s, r, o) {
300
300
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], a = t.type;
301
301
  o.indexOf(a) > -1 ? et[a](e) || s.push(M(r.messages.types[a], t.fullField, t.type)) : a && typeof e !== t.type && s.push(M(r.messages.types[a], t.fullField, t.type));
302
302
  }, De = function(t, e, i, s, r) {
303
- var o = typeof t.len == "number", a = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = e, d = null, x = typeof e == "number", u = typeof e == "string", g = Array.isArray(e);
303
+ var o = typeof t.len == "number", a = typeof t.min == "number", l = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = e, d = null, x = typeof e == "number", u = typeof e == "string", g = Array.isArray(e);
304
304
  if (x ? d = "number" : u ? d = "string" : g && (d = "array"), !d)
305
305
  return !1;
306
- g && (f = e.length), u && (f = e.replace(c, "_").length), o ? f !== t.len && s.push(M(r.messages[d].len, t.fullField, t.len)) : a && !h && f < t.min ? s.push(M(r.messages[d].min, t.fullField, t.min)) : h && !a && f > t.max ? s.push(M(r.messages[d].max, t.fullField, t.max)) : a && h && (f < t.min || f > t.max) && s.push(M(r.messages[d].range, t.fullField, t.min, t.max));
306
+ g && (f = e.length), u && (f = e.replace(c, "_").length), o ? f !== t.len && s.push(M(r.messages[d].len, t.fullField, t.len)) : a && !l && f < t.min ? s.push(M(r.messages[d].min, t.fullField, t.min)) : l && !a && f > t.max ? s.push(M(r.messages[d].max, t.fullField, t.max)) : a && l && (f < t.min || f > t.max) && s.push(M(r.messages[d].range, t.fullField, t.min, t.max));
307
307
  }, j = "enum", Xe = function(t, e, i, s, r) {
308
308
  t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(M(r.messages[j], t.fullField, t[j].join(", ")));
309
309
  }, Fe = function(t, e, i, s, r) {
@@ -416,8 +416,8 @@ var jt = function(t, e, i, s, r, o) {
416
416
  if (_(e, "date") && !t.required)
417
417
  return i();
418
418
  if (v.required(t, e, s, o, r), !_(e, "date")) {
419
- var h;
420
- e instanceof Date ? h = e : h = new Date(e), v.type(t, h, s, o, r), h && v.range(t, h.getTime(), s, o, r);
419
+ var l;
420
+ e instanceof Date ? l = e : l = new Date(e), v.type(t, l, s, o, r), l && v.range(t, l.getTime(), s, o, r);
421
421
  }
422
422
  }
423
423
  i(o);
@@ -425,8 +425,8 @@ var jt = function(t, e, i, s, r, o) {
425
425
  var o = [], a = Array.isArray(e) ? "array" : typeof e;
426
426
  v.required(t, e, s, o, r, a), i(o);
427
427
  }, yt = function(t, e, i, s, r) {
428
- var o = t.type, a = [], h = t.required || !t.required && s.hasOwnProperty(t.field);
429
- if (h) {
428
+ var o = t.type, a = [], l = t.required || !t.required && s.hasOwnProperty(t.field);
429
+ if (l) {
430
430
  if (_(e, o) && !t.required)
431
431
  return i();
432
432
  v.required(t, e, s, a, r, o), _(e, o) || v.type(t, e, s, a, r);
@@ -533,92 +533,92 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
533
533
  var o = this;
534
534
  s === void 0 && (s = {}), r === void 0 && (r = function() {
535
535
  });
536
- var a = i, h = s, c = r;
537
- if (typeof h == "function" && (c = h, h = {}), !this.rules || Object.keys(this.rules).length === 0)
536
+ var a = i, l = s, c = r;
537
+ if (typeof l == "function" && (c = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
538
538
  return c && c(null, a), Promise.resolve(a);
539
539
  function f(w) {
540
- var p = [], y = {};
540
+ var y = [], p = {};
541
541
  function b(E) {
542
542
  if (Array.isArray(E)) {
543
543
  var C;
544
- p = (C = p).concat.apply(C, E);
544
+ y = (C = y).concat.apply(C, E);
545
545
  } else
546
- p.push(E);
546
+ y.push(E);
547
547
  }
548
548
  for (var m = 0; m < w.length; m++)
549
549
  b(w[m]);
550
- p.length ? (y = Ct(p), c(p, y)) : c(null, a);
550
+ y.length ? (p = Ct(y), c(y, p)) : c(null, a);
551
551
  }
552
- if (h.messages) {
552
+ if (l.messages) {
553
553
  var d = this.messages();
554
- d === Rt && (d = vt()), Nt(d, h.messages), h.messages = d;
554
+ d === Rt && (d = vt()), Nt(d, l.messages), l.messages = d;
555
555
  } else
556
- h.messages = this.messages();
557
- var x = {}, u = h.keys || Object.keys(this.rules);
556
+ l.messages = this.messages();
557
+ var x = {}, u = l.keys || Object.keys(this.rules);
558
558
  u.forEach(function(w) {
559
- var p = o.rules[w], y = a[w];
560
- p.forEach(function(b) {
559
+ var y = o.rules[w], p = a[w];
560
+ y.forEach(function(b) {
561
561
  var m = b;
562
- typeof m.transform == "function" && (a === i && (a = $({}, a)), y = a[w] = m.transform(y)), typeof m == "function" ? m = {
562
+ typeof m.transform == "function" && (a === i && (a = $({}, a)), p = a[w] = m.transform(p)), typeof m == "function" ? m = {
563
563
  validator: m
564
564
  } : m = $({}, m), m.validator = o.getValidationMethod(m), m.validator && (m.field = w, m.fullField = m.fullField || w, m.type = o.getType(m), x[w] = x[w] || [], x[w].push({
565
565
  rule: m,
566
- value: y,
566
+ value: p,
567
567
  source: a,
568
568
  field: w
569
569
  }));
570
570
  });
571
571
  });
572
572
  var g = {};
573
- return Te(x, h, function(w, p) {
574
- var y = w.rule, b = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
- b = b && (y.required || !y.required && w.value), y.field = w.field;
576
- function m(R, T) {
577
- return $({}, T, {
578
- fullField: y.fullField + "." + R,
579
- fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
573
+ return Se(x, l, function(w, y) {
574
+ var p = w.rule, b = (p.type === "object" || p.type === "array") && (typeof p.fields == "object" || typeof p.defaultField == "object");
575
+ b = b && (p.required || !p.required && w.value), p.field = w.field;
576
+ function m(R, S) {
577
+ return $({}, S, {
578
+ fullField: p.fullField + "." + R,
579
+ fullFields: p.fullFields ? [].concat(p.fullFields, [R]) : [R]
580
580
  });
581
581
  }
582
582
  function E(R) {
583
583
  R === void 0 && (R = []);
584
- var T = Array.isArray(R) ? R : [R];
585
- !h.suppressWarning && T.length && n.warning("async-validator:", T), T.length && y.message !== void 0 && (T = [].concat(y.message));
586
- var A = T.map(kt(y, a));
587
- if (h.first && A.length)
588
- return g[y.field] = 1, p(A);
584
+ var S = Array.isArray(R) ? R : [R];
585
+ !l.suppressWarning && S.length && n.warning("async-validator:", S), S.length && p.message !== void 0 && (S = [].concat(p.message));
586
+ var A = S.map(kt(p, a));
587
+ if (l.first && A.length)
588
+ return g[p.field] = 1, y(A);
589
589
  if (!b)
590
- p(A);
590
+ y(A);
591
591
  else {
592
- if (y.required && !w.value)
593
- return y.message !== void 0 ? A = [].concat(y.message).map(kt(y, a)) : h.error && (A = [h.error(y, M(h.messages.required, y.field))]), p(A);
592
+ if (p.required && !w.value)
593
+ return p.message !== void 0 ? A = [].concat(p.message).map(kt(p, a)) : l.error && (A = [l.error(p, M(l.messages.required, p.field))]), y(A);
594
594
  var L = {};
595
- y.defaultField && Object.keys(w.value).map(function(I) {
596
- L[I] = y.defaultField;
595
+ p.defaultField && Object.keys(w.value).map(function(I) {
596
+ L[I] = p.defaultField;
597
597
  }), L = $({}, L, w.rule.fields);
598
598
  var D = {};
599
599
  Object.keys(L).forEach(function(I) {
600
- var S = L[I], O = Array.isArray(S) ? S : [S];
600
+ var T = L[I], O = Array.isArray(T) ? T : [T];
601
601
  D[I] = O.map(m.bind(null, I));
602
602
  });
603
603
  var B = new n(D);
604
- B.messages(h.messages), w.rule.options && (w.rule.options.messages = h.messages, w.rule.options.error = h.error), B.validate(w.value, w.rule.options || h, function(I) {
605
- var S = [];
606
- A && A.length && S.push.apply(S, A), I && I.length && S.push.apply(S, I), p(S.length ? S : null);
604
+ B.messages(l.messages), w.rule.options && (w.rule.options.messages = l.messages, w.rule.options.error = l.error), B.validate(w.value, w.rule.options || l, function(I) {
605
+ var T = [];
606
+ A && A.length && T.push.apply(T, A), I && I.length && T.push.apply(T, I), y(T.length ? T : null);
607
607
  });
608
608
  }
609
609
  }
610
610
  var C;
611
- if (y.asyncValidator)
612
- C = y.asyncValidator(y, w.value, E, w.source, h);
613
- else if (y.validator) {
611
+ if (p.asyncValidator)
612
+ C = p.asyncValidator(p, w.value, E, w.source, l);
613
+ else if (p.validator) {
614
614
  try {
615
- C = y.validator(y, w.value, E, w.source, h);
615
+ C = p.validator(p, w.value, E, w.source, l);
616
616
  } catch (R) {
617
- console.error == null || console.error(R), h.suppressValidatorError || setTimeout(function() {
617
+ console.error == null || console.error(R), l.suppressValidatorError || setTimeout(function() {
618
618
  throw R;
619
619
  }, 0), E(R.message);
620
620
  }
621
- C === !0 ? E() : C === !1 ? E(typeof y.message == "function" ? y.message(y.fullField || y.field) : y.message || (y.fullField || y.field) + " fails") : C instanceof Array ? E(C) : C instanceof Error && E(C.message);
621
+ C === !0 ? E() : C === !1 ? E(typeof p.message == "function" ? p.message(p.fullField || p.field) : p.message || (p.fullField || p.field) + " fails") : C instanceof Array ? E(C) : C instanceof Error && E(C.message);
622
622
  }
623
623
  C && C.then && C.then(function() {
624
624
  return E();
@@ -724,10 +724,10 @@ function ti(n) {
724
724
  if (n.startsWith('"')) {
725
725
  let o = 0, a = !0;
726
726
  for (; a; ) {
727
- const h = n.slice(0, 1);
728
- h === '"' && (o += 1), r += h, n = n.slice(1), (n.length === 0 || n.match(/^[\t\r\n]/) && o % 2 === 0) && (a = !1);
727
+ const l = n.slice(0, 1);
728
+ l === '"' && (o += 1), r += l, n = n.slice(1), (n.length === 0 || n.match(/^[\t\r\n]/) && o % 2 === 0) && (a = !1);
729
729
  }
730
- r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (h) => new Array(Math.floor(h.length / 2)).fill('"').join(""));
730
+ r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (l) => new Array(Math.floor(l.length / 2)).fill('"').join(""));
731
731
  } else {
732
732
  const o = n.match(Qe);
733
733
  r = o ? o[0] : "", n = n.slice(r.length);
@@ -750,24 +750,24 @@ function ei(n) {
750
750
  class ii {
751
751
  //虚拟滚动位置
752
752
  constructor(t, e) {
753
- l(this, "loading", !1);
754
- l(this, "ctx");
755
- l(this, "data");
756
- l(this, "columns");
757
- l(this, "footerData", []);
758
- l(this, "rowKeyMap", /* @__PURE__ */ new Map());
759
- l(this, "colIndexKeyMap", /* @__PURE__ */ new Map());
760
- l(this, "headerMap", /* @__PURE__ */ new Map());
761
- l(this, "rowIndexRowKeyMap", /* @__PURE__ */ new Map());
762
- l(this, "checkboxKeyMap", /* @__PURE__ */ new Map());
763
- l(this, "originalDataMap", /* @__PURE__ */ new Map());
764
- l(this, "changedDataMap", /* @__PURE__ */ new Map());
765
- l(this, "validationErrorMap", /* @__PURE__ */ new Map());
766
- l(this, "itemRowKeyMap", /* @__PURE__ */ new WeakMap());
767
- l(this, "bufferData", []);
768
- l(this, "sumHeight", 0);
769
- l(this, "filterMethod");
770
- l(this, "positions", []);
753
+ h(this, "loading", !1);
754
+ h(this, "ctx");
755
+ h(this, "data");
756
+ h(this, "columns");
757
+ h(this, "footerData", []);
758
+ h(this, "rowKeyMap", /* @__PURE__ */ new Map());
759
+ h(this, "colIndexKeyMap", /* @__PURE__ */ new Map());
760
+ h(this, "headerMap", /* @__PURE__ */ new Map());
761
+ h(this, "rowIndexRowKeyMap", /* @__PURE__ */ new Map());
762
+ h(this, "checkboxKeyMap", /* @__PURE__ */ new Map());
763
+ h(this, "originalDataMap", /* @__PURE__ */ new Map());
764
+ h(this, "changedDataMap", /* @__PURE__ */ new Map());
765
+ h(this, "validationErrorMap", /* @__PURE__ */ new Map());
766
+ h(this, "itemRowKeyMap", /* @__PURE__ */ new WeakMap());
767
+ h(this, "bufferData", []);
768
+ h(this, "sumHeight", 0);
769
+ h(this, "filterMethod");
770
+ h(this, "positions", []);
771
771
  this.ctx = t;
772
772
  const { data: i = [], columns: s = [], footerData: r = [] } = e;
773
773
  this.data = i, this.footerData = r, this.columns = s, this.setLoading(!0), this.init();
@@ -790,17 +790,17 @@ class ii {
790
790
  t.forEach((i, s) => {
791
791
  let r = !1;
792
792
  Array.isArray(i.children) && (r = !0, this.initData(i.children, e + 1));
793
- const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: a, CELL_HEIGHT: h, SELECTABLE_METHOD: c, CHECKBOX_KEY: f } = this.ctx.config, d = i[o], x = d ?? Ut();
793
+ const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: a, CELL_HEIGHT: l, SELECTABLE_METHOD: c, CHECKBOX_KEY: f } = this.ctx.config, d = i[o], x = d ?? Ut();
794
794
  this.itemRowKeyMap.set(i, x);
795
- const u = i._height || h, g = i._readonly;
795
+ const u = i._height || l, g = i._readonly;
796
796
  let w = !0;
797
797
  if (typeof c == "function" && (w = c), f) {
798
- const p = i[f];
799
- if (this.checkboxKeyMap.has(p)) {
800
- const y = this.checkboxKeyMap.get(p);
801
- y.push(x), this.checkboxKeyMap.set(p, y);
798
+ const y = i[f];
799
+ if (this.checkboxKeyMap.has(y)) {
800
+ const p = this.checkboxKeyMap.get(y);
801
+ p.push(x), this.checkboxKeyMap.set(y, p);
802
802
  } else
803
- this.checkboxKeyMap.set(p, [x]);
803
+ this.checkboxKeyMap.set(y, [x]);
804
804
  }
805
805
  this.rowKeyMap.set(x, {
806
806
  readonly: g,
@@ -874,12 +874,12 @@ class ii {
874
874
  const i = (r) => {
875
875
  r.forEach((o) => {
876
876
  t.push(o);
877
- const a = this.itemRowKeyMap.get(o), { expand: h, hasChildren: c, height: f } = this.rowKeyMap.get(a), d = this.sumHeight;
877
+ const a = this.itemRowKeyMap.get(o), { expand: l, hasChildren: c, height: f } = this.rowKeyMap.get(a), d = this.sumHeight;
878
878
  this.sumHeight += f, this.rowIndexRowKeyMap.set(e, a), this.positions.push({
879
879
  top: d,
880
880
  height: f,
881
881
  bottom: this.sumHeight
882
- }), e += 1, h && c && i(o.children);
882
+ }), e += 1, l && c && i(o.children);
883
883
  });
884
884
  };
885
885
  this.rowIndexRowKeyMap.clear();
@@ -1002,7 +1002,7 @@ class ii {
1002
1002
  let i = [];
1003
1003
  const s = /* @__PURE__ */ new Set();
1004
1004
  t.forEach((a) => {
1005
- const { value: h, rowKey: c, key: f } = a, { oldValue: d, newValue: x } = this.setItemValue(c, f, h);
1005
+ const { value: l, rowKey: c, key: f } = a, { oldValue: d, newValue: x } = this.setItemValue(c, f, l);
1006
1006
  s.add(c), i.push({
1007
1007
  rowKey: c,
1008
1008
  key: f,
@@ -1012,12 +1012,12 @@ class ii {
1012
1012
  });
1013
1013
  let r = [];
1014
1014
  const o = i.map((a) => {
1015
- const h = this.ctx.database.getRowDataItemForRowKey(a.rowKey);
1015
+ const l = this.ctx.database.getRowDataItemForRowKey(a.rowKey);
1016
1016
  return {
1017
1017
  rowKey: a.rowKey,
1018
1018
  key: a.key,
1019
1019
  value: a.newValue,
1020
- row: h
1020
+ row: l
1021
1021
  };
1022
1022
  });
1023
1023
  return s.forEach((a) => {
@@ -1043,15 +1043,15 @@ class ii {
1043
1043
  if (!this.rowKeyMap.has(t))
1044
1044
  return {};
1045
1045
  const { item: a } = this.rowKeyMap.get(t);
1046
- let h = a[e];
1046
+ let l = a[e];
1047
1047
  if (this.ctx.database.getReadonly(t, e))
1048
1048
  return {
1049
- oldValue: h,
1050
- newValue: h
1049
+ oldValue: l,
1050
+ newValue: l
1051
1051
  };
1052
- a[e] !== null && typeof a[e] == "object" && (h = JSON.parse(JSON.stringify(a[e])));
1053
- const c = `${t}_${e}`;
1054
- if (this.originalDataMap.has(c) || this.originalDataMap.set(c, h), this.changedDataMap.set(c, i), a[e] = i, o) {
1052
+ a[e] !== null && typeof a[e] == "object" && (l = JSON.parse(JSON.stringify(a[e])));
1053
+ const c = `${t}_${e}`;
1054
+ if (this.originalDataMap.has(c) || this.originalDataMap.set(c, l), this.changedDataMap.set(c, i), a[e] = i, o) {
1055
1055
  const f = this.ctx.database.getRowDataItemForRowKey(t), d = {
1056
1056
  rowKey: t,
1057
1057
  key: e,
@@ -1061,7 +1061,7 @@ class ii {
1061
1061
  this.ctx.emit("change", [d], [f]), this.ctx.emit("editChange", {
1062
1062
  rowKey: t,
1063
1063
  key: e,
1064
- oldValue: h,
1064
+ oldValue: l,
1065
1065
  value: i,
1066
1066
  originalValue: this.originalDataMap.get(c),
1067
1067
  row: f
@@ -1070,7 +1070,7 @@ class ii {
1070
1070
  return this.ctx.hasEvent("iterationChange") && this.ctx.emit("iterationChange", {
1071
1071
  rowKey: t,
1072
1072
  key: e,
1073
- oldValue: h,
1073
+ oldValue: l,
1074
1074
  value: i,
1075
1075
  originalValue: this.originalDataMap.get(c),
1076
1076
  row: this.ctx.database.getRowDataItemForRowKey(t)
@@ -1082,12 +1082,12 @@ class ii {
1082
1082
  {
1083
1083
  rowKey: t,
1084
1084
  key: e,
1085
- oldValue: h,
1085
+ oldValue: l,
1086
1086
  newValue: i
1087
1087
  }
1088
1088
  ]
1089
1089
  }), this.getValidator(t, e), r && this.ctx.emit("draw"), {
1090
- oldValue: h,
1090
+ oldValue: l,
1091
1091
  newValue: i
1092
1092
  };
1093
1093
  }
@@ -1114,8 +1114,8 @@ class ii {
1114
1114
  return !1;
1115
1115
  const { item: s } = this.rowKeyMap.get(t), r = s[i];
1116
1116
  this.checkboxKeyMap.has(r) && this.checkboxKeyMap.get(r).forEach((a) => {
1117
- const h = this.rowKeyMap.get(a);
1118
- h.check = e;
1117
+ const l = this.rowKeyMap.get(a);
1118
+ l.check = e;
1119
1119
  });
1120
1120
  }
1121
1121
  }
@@ -1230,7 +1230,7 @@ class ii {
1230
1230
  getChangedData() {
1231
1231
  let t = [];
1232
1232
  return this.changedDataMap.forEach((e, i) => {
1233
- const s = this.originalDataMap.get(i), r = i.split("_")[0], o = i.split("_")[1];
1233
+ const s = this.originalDataMap.get(i), r = i.split("_")[0], o = i.split("_")[1];
1234
1234
  s !== e && t.push({
1235
1235
  rowKey: r,
1236
1236
  colKey: o,
@@ -1243,7 +1243,7 @@ class ii {
1243
1243
  getChangedRows() {
1244
1244
  const t = /* @__PURE__ */ new Set();
1245
1245
  this.changedDataMap.forEach((i, s) => {
1246
- const r = this.originalDataMap.get(s), o = s.split("_")[0];
1246
+ const r = this.originalDataMap.get(s), o = s.split("_")[0];
1247
1247
  r !== i && t.add(o);
1248
1248
  });
1249
1249
  let e = [];
@@ -1258,7 +1258,7 @@ class ii {
1258
1258
  * @returns
1259
1259
  */
1260
1260
  isHasChangedData(t, e) {
1261
- const i = `${t}_${e}`;
1261
+ const i = `${t}_${e}`;
1262
1262
  if (!this.changedDataMap.has(i))
1263
1263
  return !1;
1264
1264
  const s = this.originalDataMap.get(i), r = this.changedDataMap.get(i);
@@ -1295,7 +1295,7 @@ class ii {
1295
1295
  getValidator(t, e) {
1296
1296
  return new Promise((i) => {
1297
1297
  const s = this.rowKeyMap.get(t), r = this.headerMap.get(e), { CELL_RULES_METHOD: o } = this.ctx.config, a = r.column;
1298
- let h = a.rules;
1298
+ let l = a.rules;
1299
1299
  if (typeof o == "function") {
1300
1300
  const f = o({
1301
1301
  row: s.item,
@@ -1304,12 +1304,12 @@ class ii {
1304
1304
  column: a,
1305
1305
  value: this.getItemValue(t, e)
1306
1306
  });
1307
- f && (h = f);
1307
+ f && (l = f);
1308
1308
  }
1309
- if (h) {
1309
+ if (l) {
1310
1310
  let c = {}, f = {};
1311
- if (f[e] = this.getItemValue(t, e), Array.isArray(h) && h.length) {
1312
- const x = h.map((u) => ({
1311
+ if (f[e] = this.getItemValue(t, e), Array.isArray(l) && l.length) {
1312
+ const x = l.map((u) => ({
1313
1313
  ...u,
1314
1314
  row: s.item,
1315
1315
  column: a,
@@ -1319,7 +1319,7 @@ class ii {
1319
1319
  c[e] = x;
1320
1320
  } else
1321
1321
  c[e] = {
1322
- ...h,
1322
+ ...l,
1323
1323
  row: s.item,
1324
1324
  column: a,
1325
1325
  rowIndex: s.rowIndex,
@@ -1356,7 +1356,7 @@ class ii {
1356
1356
  return this.loading;
1357
1357
  }
1358
1358
  setValidationErrorByRowIndex(t, e, i) {
1359
- const r = `${this.rowIndexRowKeyMap.get(t)}_${e}`, o = [
1359
+ const r = `${this.rowIndexRowKeyMap.get(t)}_${e}`, o = [
1360
1360
  {
1361
1361
  message: i
1362
1362
  }
@@ -1364,19 +1364,19 @@ class ii {
1364
1364
  this.validationErrorMap.set(r, o);
1365
1365
  }
1366
1366
  setValidationError(t, e, i) {
1367
- const s = `${t}_${e}`;
1367
+ const s = `${t}_${e}`;
1368
1368
  this.validationErrorMap.set(s, i);
1369
1369
  }
1370
1370
  getValidationError(t, e) {
1371
- const i = `${t}_${e}`;
1371
+ const i = `${t}_${e}`;
1372
1372
  return this.validationErrorMap.get(i) || [];
1373
1373
  }
1374
1374
  }
1375
1375
  class si {
1376
1376
  constructor(t) {
1377
- l(this, "ctx");
1378
- l(this, "history", []);
1379
- l(this, "historyIndex", -1);
1377
+ h(this, "ctx");
1378
+ h(this, "history", []);
1379
+ h(this, "historyIndex", -1);
1380
1380
  this.ctx = t, this.init();
1381
1381
  }
1382
1382
  init() {
@@ -1431,8 +1431,8 @@ class si {
1431
1431
  }
1432
1432
  class ri {
1433
1433
  constructor(t) {
1434
- l(this, "eventTasks", /* @__PURE__ */ new Map());
1435
- l(this, "ctx");
1434
+ h(this, "eventTasks", /* @__PURE__ */ new Map());
1435
+ h(this, "ctx");
1436
1436
  this.ctx = t, this.init();
1437
1437
  }
1438
1438
  init() {
@@ -1486,7 +1486,7 @@ class ri {
1486
1486
  }
1487
1487
  class oi {
1488
1488
  constructor() {
1489
- l(this, "events", /* @__PURE__ */ new Map());
1489
+ h(this, "events", /* @__PURE__ */ new Map());
1490
1490
  }
1491
1491
  has(t) {
1492
1492
  return this.events.has(t);
@@ -1524,7 +1524,7 @@ class oi {
1524
1524
  }
1525
1525
  class ni {
1526
1526
  constructor(t) {
1527
- l(this, "ctx");
1527
+ h(this, "ctx");
1528
1528
  const e = t.getContext("2d");
1529
1529
  if (!e) throw new Error("canvas context not found");
1530
1530
  this.ctx = e;
@@ -1558,21 +1558,21 @@ class ni {
1558
1558
  * @param {string} color - 阴影的颜色
1559
1559
  */
1560
1560
  drawShadow(t, e, i, s, r) {
1561
- const { fillColor: o, side: a, shadowWidth: h, colorStart: c, colorEnd: f } = r;
1561
+ const { fillColor: o, side: a, shadowWidth: l, colorStart: c, colorEnd: f } = r;
1562
1562
  this.ctx.save(), o && (this.ctx.fillStyle = o, this.ctx.fillRect(t, e, i, s));
1563
1563
  let d;
1564
1564
  switch (a) {
1565
1565
  case "left":
1566
- d = this.ctx.createLinearGradient(t - h, e, t, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t - h, e, h, s);
1566
+ d = this.ctx.createLinearGradient(t - l, e, t, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t - l, e, l, s);
1567
1567
  break;
1568
1568
  case "right":
1569
- d = this.ctx.createLinearGradient(t + i, e, t + i + h, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t + i, e, h, s);
1569
+ d = this.ctx.createLinearGradient(t + i, e, t + i + l, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t + i, e, l, s);
1570
1570
  break;
1571
1571
  case "top":
1572
- d = this.ctx.createLinearGradient(t, e - h, t, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t, e - h, i, h);
1572
+ d = this.ctx.createLinearGradient(t, e - l, t, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t, e - l, i, l);
1573
1573
  break;
1574
1574
  case "bottom":
1575
- d = this.ctx.createLinearGradient(t, e + s, t, e + s + h), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t, e + s, i, h);
1575
+ d = this.ctx.createLinearGradient(t, e + s, t, e + s + l), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t, e + s, i, l);
1576
1576
  break;
1577
1577
  default:
1578
1578
  console.error("Invalid side specified for shadow");
@@ -1593,11 +1593,11 @@ class ni {
1593
1593
  drawImage(t, e, i, s, r) {
1594
1594
  this.ctx.save(), this.ctx.drawImage(t, e, i, s, r), this.ctx.restore();
1595
1595
  }
1596
- drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: a, radius: h = 0 } = {}) {
1597
- if (this.ctx.save(), this.ctx.beginPath(), a !== void 0 && (this.ctx.fillStyle = a), o !== void 0 && (this.ctx.lineWidth = r, this.ctx.strokeStyle = o), h === 0)
1596
+ drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: a, radius: l = 0 } = {}) {
1597
+ if (this.ctx.save(), this.ctx.beginPath(), a !== void 0 && (this.ctx.fillStyle = a), o !== void 0 && (this.ctx.lineWidth = r, this.ctx.strokeStyle = o), l === 0)
1598
1598
  this.ctx.rect(t - 0.5, e - 0.5, i, s);
1599
1599
  else {
1600
- const [c, f, d, x] = typeof h == "number" ? [h, h, h, h] : h;
1600
+ const [c, f, d, x] = typeof l == "number" ? [l, l, l, l] : l;
1601
1601
  this.ctx.moveTo(t + c, e), this.ctx.arcTo(t + i, e, t + i, e + f, f), this.ctx.arcTo(t + i, e + s, t + i - d, e + s, d), this.ctx.arcTo(t, e + s, t, e + s - x, x), this.ctx.arcTo(t, e, t + c, e, c);
1602
1602
  }
1603
1603
  a !== void 0 && this.ctx.fill(), o !== void 0 && this.ctx.stroke(), this.ctx.restore();
@@ -1616,16 +1616,16 @@ class ni {
1616
1616
  this.ctx.save();
1617
1617
  const {
1618
1618
  font: a = "12px Arial",
1619
- align: h = "center",
1619
+ align: l = "center",
1620
1620
  color: c = "#495060",
1621
1621
  padding: f = 0,
1622
1622
  verticalAlign: d = "middle"
1623
1623
  } = o;
1624
- this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textBaseline = d, this.ctx.textAlign = h;
1624
+ this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textBaseline = d, this.ctx.textAlign = l;
1625
1625
  let x = 0;
1626
1626
  d === "top" ? x = i + f : d === "bottom" ? x = i + r - f : x = i + (r + 1) / 2;
1627
1627
  let u = 0;
1628
- h === "left" ? u = e + f : h === "right" ? u = e + s - f : u = e + s / 2;
1628
+ l === "left" ? u = e + f : l === "right" ? u = e + s - f : u = e + s / 2;
1629
1629
  const { _text: g, ellipsis: w } = this.handleEllipsis(t, s, f, a);
1630
1630
  return this.ctx.fillText(g, u, x), this.ctx.restore(), w;
1631
1631
  }
@@ -1636,8 +1636,8 @@ class ni {
1636
1636
  _text: "",
1637
1637
  ellipsis: r
1638
1638
  };
1639
- const a = this.ctx.measureText("...").width, h = this.ctx.measureText(t).width;
1640
- if (h && h + a >= e - i * 2) {
1639
+ const a = this.ctx.measureText("...").width, l = this.ctx.measureText(t).width;
1640
+ if (l && l + a >= e - i * 2) {
1641
1641
  r = !0;
1642
1642
  let c = 0;
1643
1643
  for (let f = 0; f < t.length; f++)
@@ -1654,129 +1654,129 @@ class ni {
1654
1654
  }
1655
1655
  class Wt {
1656
1656
  constructor(t) {
1657
- l(this, "PROCESSOR_NUM", 50);
1658
- l(this, "CSS_PREFIX", "e-virt-table");
1659
- l(this, "ICONS", []);
1660
- l(this, "ROW_KEY", "");
1661
- l(this, "HEADER_FONT", "12px normal Arial");
1662
- l(this, "BODY_FONT", "12px normal Arial");
1663
- l(this, "BORDER_COLOR", "#e1e6eb");
1664
- l(this, "WIDTH", 0);
1665
- l(this, "RESIZE_MIN_WIDTH", 40);
1666
- l(this, "HEIGHT", 0);
1667
- l(this, "EMPTY_BODY_HEIGHT", 120);
1668
- l(this, "EMPTY_CUSTOM", !1);
1669
- l(this, "EMPTY_CUSTOM_STYLE", {});
1670
- l(this, "EMPTY_TEXT", "暂无数据");
1671
- l(this, "MAX_HEIGHT", 1e3);
1672
- l(this, "BORDER_RADIUS", 8);
1673
- l(this, "ENABLE_OFFSET_HEIGHT", !1);
1674
- l(this, "OFFSET_HEIGHT", 0);
1675
- l(this, "HEADER_HEIGHT", 36);
1676
- l(this, "ENABLE_HEADER_STICKY", !1);
1657
+ h(this, "PROCESSOR_NUM", 50);
1658
+ h(this, "CSS_PREFIX", "e-virt-table");
1659
+ h(this, "ICONS", []);
1660
+ h(this, "ROW_KEY", "");
1661
+ h(this, "HEADER_FONT", "12px normal Arial");
1662
+ h(this, "BODY_FONT", "12px normal Arial");
1663
+ h(this, "BORDER_COLOR", "#e1e6eb");
1664
+ h(this, "WIDTH", 0);
1665
+ h(this, "RESIZE_MIN_WIDTH", 40);
1666
+ h(this, "HEIGHT", 0);
1667
+ h(this, "EMPTY_BODY_HEIGHT", 120);
1668
+ h(this, "EMPTY_CUSTOM", !1);
1669
+ h(this, "EMPTY_CUSTOM_STYLE", {});
1670
+ h(this, "EMPTY_TEXT", "暂无数据");
1671
+ h(this, "MAX_HEIGHT", 1e3);
1672
+ h(this, "BORDER_RADIUS", 8);
1673
+ h(this, "ENABLE_OFFSET_HEIGHT", !1);
1674
+ h(this, "OFFSET_HEIGHT", 0);
1675
+ h(this, "HEADER_HEIGHT", 36);
1676
+ h(this, "ENABLE_HEADER_STICKY", !1);
1677
1677
  // 启用头部固定,需要外面实现覆盖层,或者所有表头都要是元素
1678
- l(this, "HEADER_BG_COLOR", "#F8FAFF");
1679
- l(this, "BODY_BG_COLOR", "#FFF");
1680
- l(this, "HEADER_TEXT_COLOR", "#1D2129");
1681
- l(this, "LOADING_ICON_SVG", "");
1682
- l(this, "LOADING_ICON_COLOR", "#4E5969");
1683
- l(this, "EXPAND_ICON_SVG", "");
1684
- l(this, "SHRINK_ICON_SVG", "");
1685
- l(this, "EXPAND_ICON_COLOR", "#4E5969");
1686
- l(this, "SHRINK_ICON_COLOR", "#4E5969");
1687
- l(this, "ERROR_TIP_ICON_COLOR", "red");
1688
- l(this, "ERROR_TIP_ICON_SIZE", 6);
1689
- l(this, "EXPAND_LAZY", !0);
1690
- l(this, "DEFAULT_EXPAND_ALL", !1);
1691
- l(this, "CELL_WIDTH", 100);
1692
- l(this, "CELL_HEIGHT", 36);
1693
- l(this, "CELL_PADDING", 8);
1694
- l(this, "CELL_HOVER_ICON_SIZE", 20);
1695
- l(this, "SCROLLER_TRACK_SIZE", 14);
1696
- l(this, "SCROLLER_SIZE", 8);
1697
- l(this, "SCROLLER_COLOR", "#dee0e3");
1698
- l(this, "SCROLLER_TRACK_COLOR", "#fff");
1699
- l(this, "SCROLLER_FOCUS_COLOR", "#bbbec4");
1700
- l(this, "SELECT_BORDER_COLOR", "rgb(82,146,247)");
1701
- l(this, "SELECT_AREA_COLOR", "rgba(82,146,247,0.1)");
1702
- l(this, "SELECT_BG_COLOR", "rgba(82,146,247,0.1)");
1703
- l(this, "EDIT_BG_COLOR", "#fcf6ed");
1704
- l(this, "CHECKBOX_KEY", "");
1705
- l(this, "CHECKBOX_COLOR", "rgb(82,146,247)");
1706
- l(this, "CHECKBOX_SIZE", 20);
1707
- l(this, "CHECKBOX_DISABLED_SVG", "");
1708
- l(this, "CHECKBOX_CHECK_SVG", "");
1709
- l(this, "CHECKBOX_UNCHECK_SVG", "");
1710
- l(this, "CHECKBOX_INDETERMINATE_SVG", "");
1711
- l(this, "READONLY_COLOR", "#fff");
1712
- l(this, "READONLY_TEXT_COLOR", "#4E5969");
1713
- l(this, "ERROR_TIP_COLOR", "#ED3F14");
1714
- l(this, "FOOTER_BG_COLOR", "#fafafa");
1715
- l(this, "FOOTER_FIXED", !0);
1716
- l(this, "CELL_FOOTER_HEIGHT", 36);
1717
- l(this, "ENABLE_SELECTOR", !1);
1718
- l(this, "ENABLE_EDIT_SINGLE_CLICK", !1);
1678
+ h(this, "HEADER_BG_COLOR", "#F8FAFF");
1679
+ h(this, "BODY_BG_COLOR", "#FFF");
1680
+ h(this, "HEADER_TEXT_COLOR", "#1D2129");
1681
+ h(this, "LOADING_ICON_SVG", "");
1682
+ h(this, "LOADING_ICON_COLOR", "#4E5969");
1683
+ h(this, "EXPAND_ICON_SVG", "");
1684
+ h(this, "SHRINK_ICON_SVG", "");
1685
+ h(this, "EXPAND_ICON_COLOR", "#4E5969");
1686
+ h(this, "SHRINK_ICON_COLOR", "#4E5969");
1687
+ h(this, "ERROR_TIP_ICON_COLOR", "red");
1688
+ h(this, "ERROR_TIP_ICON_SIZE", 6);
1689
+ h(this, "EXPAND_LAZY", !0);
1690
+ h(this, "DEFAULT_EXPAND_ALL", !1);
1691
+ h(this, "CELL_WIDTH", 100);
1692
+ h(this, "CELL_HEIGHT", 36);
1693
+ h(this, "CELL_PADDING", 8);
1694
+ h(this, "CELL_HOVER_ICON_SIZE", 20);
1695
+ h(this, "SCROLLER_TRACK_SIZE", 14);
1696
+ h(this, "SCROLLER_SIZE", 8);
1697
+ h(this, "SCROLLER_COLOR", "#dee0e3");
1698
+ h(this, "SCROLLER_TRACK_COLOR", "#fff");
1699
+ h(this, "SCROLLER_FOCUS_COLOR", "#bbbec4");
1700
+ h(this, "SELECT_BORDER_COLOR", "rgb(82,146,247)");
1701
+ h(this, "SELECT_AREA_COLOR", "rgba(82,146,247,0.1)");
1702
+ h(this, "SELECT_BG_COLOR", "rgba(82,146,247,0.1)");
1703
+ h(this, "EDIT_BG_COLOR", "#fcf6ed");
1704
+ h(this, "CHECKBOX_KEY", "");
1705
+ h(this, "CHECKBOX_COLOR", "rgb(82,146,247)");
1706
+ h(this, "CHECKBOX_SIZE", 20);
1707
+ h(this, "CHECKBOX_DISABLED_SVG", "");
1708
+ h(this, "CHECKBOX_CHECK_SVG", "");
1709
+ h(this, "CHECKBOX_UNCHECK_SVG", "");
1710
+ h(this, "CHECKBOX_INDETERMINATE_SVG", "");
1711
+ h(this, "READONLY_COLOR", "#fff");
1712
+ h(this, "READONLY_TEXT_COLOR", "#4E5969");
1713
+ h(this, "ERROR_TIP_COLOR", "#ED3F14");
1714
+ h(this, "FOOTER_BG_COLOR", "#fafafa");
1715
+ h(this, "FOOTER_FIXED", !0);
1716
+ h(this, "CELL_FOOTER_HEIGHT", 36);
1717
+ h(this, "ENABLE_SELECTOR", !1);
1718
+ h(this, "ENABLE_EDIT_SINGLE_CLICK", !1);
1719
1719
  // 启用单点击立马编辑
1720
- l(this, "ENABLE_EDIT_CLICK_SELECTOR", !0);
1720
+ h(this, "ENABLE_EDIT_CLICK_SELECTOR", !0);
1721
1721
  // 启用点击选择器编辑
1722
- l(this, "SELECTOR_AREA_MIN_X", 0);
1722
+ h(this, "SELECTOR_AREA_MIN_X", 0);
1723
1723
  // 选择器X最小范围
1724
- l(this, "SELECTOR_AREA_MAX_X_OFFSET", 0);
1724
+ h(this, "SELECTOR_AREA_MAX_X_OFFSET", 0);
1725
1725
  // 选择器X最大范围colMax - offset
1726
- l(this, "SELECTOR_AREA_MAX_X", 0);
1726
+ h(this, "SELECTOR_AREA_MAX_X", 0);
1727
1727
  // 选择器X最大范围,0默认最大colMax
1728
- l(this, "SELECTOR_AREA_MIN_Y", 0);
1728
+ h(this, "SELECTOR_AREA_MIN_Y", 0);
1729
1729
  // 选择器Y最小范围
1730
- l(this, "SELECTOR_AREA_MAX_Y", 0);
1730
+ h(this, "SELECTOR_AREA_MAX_Y", 0);
1731
1731
  // 选择器Y最大范围,0默认rowMax
1732
- l(this, "SELECTOR_AREA_MAX_Y_OFFSET", 0);
1732
+ h(this, "SELECTOR_AREA_MAX_Y_OFFSET", 0);
1733
1733
  // 选择器Y最大范围,0默认rowMax
1734
- l(this, "ENABLE_SELECTOR_SINGLE", !1);
1735
- l(this, "ENABLE_SELECTOR_SPAN_COL", !0);
1736
- l(this, "ENABLE_SELECTOR_SPAN_ROW", !0);
1737
- l(this, "ENABLE_SELECTOR_ALL_ROWS", !0);
1738
- l(this, "ENABLE_SELECTOR_ALL_COLS", !0);
1739
- l(this, "ENABLE_AUTOFILL", !1);
1740
- l(this, "ENABLE_CONTEXT_MENU", !1);
1741
- l(this, "ENABLE_COPY", !0);
1742
- l(this, "ENABLE_PASTER", !0);
1743
- l(this, "ENABLE_RESIZE_ROW", !0);
1744
- l(this, "ENABLE_RESIZE_COLUMN", !0);
1745
- l(this, "RESIZE_ROW_LINE_COLOR", "#e1e6eb");
1746
- l(this, "RESIZE_COLUMN_LINE_COLOR", "#e1e6eb");
1747
- l(this, "RESIZE_ROW_MIN_HEIGHT", 36);
1748
- l(this, "RESIZE_COLUMN_MIN_WIDTH", 40);
1749
- l(this, "ENABLE_KEYBOARD", !0);
1750
- l(this, "ENABLE_HISTORY", !1);
1751
- l(this, "ENABLE_VALIDATOR_IMMEDIATE", !0);
1752
- l(this, "HISTORY_NUM", 50);
1753
- l(this, "HIGHLIGHT_HOVER_ROW", !1);
1754
- l(this, "HIGHLIGHT_HOVER_ROW_COLOR", "rgba(186,203,231,0.1)");
1755
- l(this, "HIGHLIGHT_SELECTED_ROW", !1);
1756
- l(this, "HIGHLIGHT_SELECTED_ROW_COLOR", "rgba(82,146,247,0.1)");
1757
- l(this, "TOOLTIP_BG_COLOR", "#303133");
1758
- l(this, "TOOLTIP_TEXT_COLOR", "#fff");
1759
- l(this, "TOOLTIP_ZINDEX", 3e3);
1760
- l(this, "TOOLTIP_CUSTOM_STYLE", {});
1761
- l(this, "CONTEXT_MENU", [
1734
+ h(this, "ENABLE_SELECTOR_SINGLE", !1);
1735
+ h(this, "ENABLE_SELECTOR_SPAN_COL", !0);
1736
+ h(this, "ENABLE_SELECTOR_SPAN_ROW", !0);
1737
+ h(this, "ENABLE_SELECTOR_ALL_ROWS", !0);
1738
+ h(this, "ENABLE_SELECTOR_ALL_COLS", !0);
1739
+ h(this, "ENABLE_AUTOFILL", !1);
1740
+ h(this, "ENABLE_CONTEXT_MENU", !1);
1741
+ h(this, "ENABLE_COPY", !0);
1742
+ h(this, "ENABLE_PASTER", !0);
1743
+ h(this, "ENABLE_RESIZE_ROW", !0);
1744
+ h(this, "ENABLE_RESIZE_COLUMN", !0);
1745
+ h(this, "RESIZE_ROW_LINE_COLOR", "#e1e6eb");
1746
+ h(this, "RESIZE_COLUMN_LINE_COLOR", "#e1e6eb");
1747
+ h(this, "RESIZE_ROW_MIN_HEIGHT", 36);
1748
+ h(this, "RESIZE_COLUMN_MIN_WIDTH", 40);
1749
+ h(this, "ENABLE_KEYBOARD", !0);
1750
+ h(this, "ENABLE_HISTORY", !1);
1751
+ h(this, "ENABLE_VALIDATOR_IMMEDIATE", !0);
1752
+ h(this, "HISTORY_NUM", 50);
1753
+ h(this, "HIGHLIGHT_HOVER_ROW", !1);
1754
+ h(this, "HIGHLIGHT_HOVER_ROW_COLOR", "rgba(186,203,231,0.1)");
1755
+ h(this, "HIGHLIGHT_SELECTED_ROW", !1);
1756
+ h(this, "HIGHLIGHT_SELECTED_ROW_COLOR", "rgba(82,146,247,0.1)");
1757
+ h(this, "TOOLTIP_BG_COLOR", "#303133");
1758
+ h(this, "TOOLTIP_TEXT_COLOR", "#fff");
1759
+ h(this, "TOOLTIP_ZINDEX", 3e3);
1760
+ h(this, "TOOLTIP_CUSTOM_STYLE", {});
1761
+ h(this, "CONTEXT_MENU", [
1762
1762
  { label: "复制", value: "copy" },
1763
1763
  { label: "剪切", value: "cut" },
1764
1764
  { label: "粘贴", value: "paste" },
1765
1765
  { label: "清空选中内容", value: "clearSelected" }
1766
1766
  ]);
1767
- l(this, "HEADER_CELL_STYLE_METHOD");
1768
- l(this, "BODY_CELL_STYLE_METHOD");
1769
- l(this, "FOOTER_CELL_STYLE_METHOD");
1770
- l(this, "CELL_READONLY_METHOD");
1771
- l(this, "CELL_FORMATTER_METHOD");
1772
- l(this, "CELL_RULES_METHOD");
1773
- l(this, "CELL_TYPE_METHOD");
1774
- l(this, "CELL_EDITOR_TYPE_METHOD");
1775
- l(this, "CELL_RENDER_METHOD");
1776
- l(this, "CELL_HOVER_ICON_METHOD");
1777
- l(this, "SPAN_METHOD");
1778
- l(this, "SELECTABLE_METHOD");
1779
- l(this, "EXPAND_LAZY_METHOD");
1767
+ h(this, "HEADER_CELL_STYLE_METHOD");
1768
+ h(this, "BODY_CELL_STYLE_METHOD");
1769
+ h(this, "FOOTER_CELL_STYLE_METHOD");
1770
+ h(this, "CELL_READONLY_METHOD");
1771
+ h(this, "CELL_FORMATTER_METHOD");
1772
+ h(this, "CELL_RULES_METHOD");
1773
+ h(this, "CELL_TYPE_METHOD");
1774
+ h(this, "CELL_EDITOR_TYPE_METHOD");
1775
+ h(this, "CELL_RENDER_METHOD");
1776
+ h(this, "CELL_HOVER_ICON_METHOD");
1777
+ h(this, "SPAN_METHOD");
1778
+ h(this, "SELECTABLE_METHOD");
1779
+ h(this, "EXPAND_LAZY_METHOD");
1780
1780
  Object.assign(this, t);
1781
1781
  }
1782
1782
  init(t) {
@@ -1785,8 +1785,8 @@ class Wt {
1785
1785
  }
1786
1786
  class ai {
1787
1787
  constructor(t) {
1788
- l(this, "ctx");
1789
- l(this, "list", [
1788
+ h(this, "ctx");
1789
+ h(this, "list", [
1790
1790
  {
1791
1791
  name: "loading",
1792
1792
  configName: "LOADING_ICON_SVG",
@@ -1848,7 +1848,7 @@ class ai {
1848
1848
  color: ""
1849
1849
  }
1850
1850
  ]);
1851
- l(this, "icons", /* @__PURE__ */ new Map());
1851
+ h(this, "icons", /* @__PURE__ */ new Map());
1852
1852
  this.ctx = t, this.init();
1853
1853
  }
1854
1854
  async init() {
@@ -1882,8 +1882,8 @@ class ai {
1882
1882
  });
1883
1883
  const o = new Image(), a = new Blob([new XMLSerializer().serializeToString(r)], {
1884
1884
  type: "image/svg+xml"
1885
- }), h = URL.createObjectURL(a);
1886
- return o.src = h, new Promise((c, f) => {
1885
+ }), l = URL.createObjectURL(a);
1886
+ return o.src = l, new Promise((c, f) => {
1887
1887
  o.onerror = () => f(new Error("Failed to load image")), o.onload = () => {
1888
1888
  c(o);
1889
1889
  };
@@ -1895,13 +1895,13 @@ class ai {
1895
1895
  }
1896
1896
  class te {
1897
1897
  constructor(t, e, i, s, r, o, a) {
1898
- l(this, "ctx");
1899
- l(this, "x", 0);
1900
- l(this, "y", 0);
1901
- l(this, "width", 0);
1902
- l(this, "height", 0);
1903
- l(this, "fixed");
1904
- l(this, "cellType");
1898
+ h(this, "ctx");
1899
+ h(this, "x", 0);
1900
+ h(this, "y", 0);
1901
+ h(this, "width", 0);
1902
+ h(this, "height", 0);
1903
+ h(this, "fixed");
1904
+ h(this, "cellType");
1905
1905
  this.ctx = t, this.x = e, this.y = i, this.width = s, this.height = r, this.fixed = o, this.cellType = a;
1906
1906
  }
1907
1907
  isHorizontalVisible() {
@@ -1940,55 +1940,55 @@ class te {
1940
1940
  }
1941
1941
  }
1942
1942
  class ee extends te {
1943
- constructor(e, i, s, r, o, a, h, c, f, d = "body") {
1944
- super(e, r, o, a, h, c.fixed, d);
1945
- l(this, "formatter");
1946
- l(this, "hoverIconName", "");
1947
- l(this, "operation", !1);
1948
- l(this, "align");
1949
- l(this, "verticalAlign");
1950
- l(this, "fixed");
1951
- l(this, "type");
1952
- l(this, "editorType");
1953
- l(this, "cellType");
1954
- l(this, "level");
1955
- l(this, "colspan", 1);
1956
- l(this, "rowspan", 1);
1957
- l(this, "key");
1958
- l(this, "column");
1959
- l(this, "rowIndex");
1960
- l(this, "colIndex");
1961
- l(this, "rowKey");
1962
- l(this, "row");
1963
- l(this, "value");
1964
- l(this, "render");
1965
- l(this, "renderFooter");
1966
- l(this, "style", {});
1967
- l(this, "rules", {});
1968
- l(this, "message", "");
1969
- l(this, "text", "");
1970
- l(this, "displayText", "");
1971
- l(this, "visibleWidth", 0);
1972
- l(this, "visibleHeight", 0);
1973
- l(this, "drawX", 0);
1974
- l(this, "drawY", 0);
1975
- l(this, "drawCellBgColor", "");
1976
- l(this, "drawCellSkyBgColor", "");
1977
- l(this, "drawTextColor", "");
1978
- l(this, "drawTextX", 0);
1979
- l(this, "drawTextY", 0);
1980
- l(this, "drawImageX", 0);
1981
- l(this, "drawImageY", 0);
1982
- l(this, "drawImageWidth", 0);
1983
- l(this, "drawImageHeight", 0);
1984
- l(this, "drawImageName", "");
1985
- l(this, "drawImageSource");
1986
- l(this, "ellipsis", !1);
1987
- l(this, "rowExpand", !1);
1988
- l(this, "rowHasChildren", !1);
1989
- l(this, "overflowTooltipShow", !0);
1990
- l(this, "overflowTooltipMaxWidth", 500);
1991
- l(this, "overflowTooltipPlacement", "top");
1943
+ constructor(e, i, s, r, o, a, l, c, f, d = "body") {
1944
+ super(e, r, o, a, l, c.fixed, d);
1945
+ h(this, "formatter");
1946
+ h(this, "hoverIconName", "");
1947
+ h(this, "operation", !1);
1948
+ h(this, "align");
1949
+ h(this, "verticalAlign");
1950
+ h(this, "fixed");
1951
+ h(this, "type");
1952
+ h(this, "editorType");
1953
+ h(this, "cellType");
1954
+ h(this, "level");
1955
+ h(this, "colspan", 1);
1956
+ h(this, "rowspan", 1);
1957
+ h(this, "key");
1958
+ h(this, "column");
1959
+ h(this, "rowIndex");
1960
+ h(this, "colIndex");
1961
+ h(this, "rowKey");
1962
+ h(this, "row");
1963
+ h(this, "value");
1964
+ h(this, "render");
1965
+ h(this, "renderFooter");
1966
+ h(this, "style", {});
1967
+ h(this, "rules", {});
1968
+ h(this, "message", "");
1969
+ h(this, "text", "");
1970
+ h(this, "displayText", "");
1971
+ h(this, "visibleWidth", 0);
1972
+ h(this, "visibleHeight", 0);
1973
+ h(this, "drawX", 0);
1974
+ h(this, "drawY", 0);
1975
+ h(this, "drawCellBgColor", "");
1976
+ h(this, "drawCellSkyBgColor", "");
1977
+ h(this, "drawTextColor", "");
1978
+ h(this, "drawTextX", 0);
1979
+ h(this, "drawTextY", 0);
1980
+ h(this, "drawImageX", 0);
1981
+ h(this, "drawImageY", 0);
1982
+ h(this, "drawImageWidth", 0);
1983
+ h(this, "drawImageHeight", 0);
1984
+ h(this, "drawImageName", "");
1985
+ h(this, "drawImageSource");
1986
+ h(this, "ellipsis", !1);
1987
+ h(this, "rowExpand", !1);
1988
+ h(this, "rowHasChildren", !1);
1989
+ h(this, "overflowTooltipShow", !0);
1990
+ h(this, "overflowTooltipMaxWidth", 500);
1991
+ h(this, "overflowTooltipPlacement", "top");
1992
1992
  this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = c.key, this.type = c.type || "text", this.editorType = c.editorType || "text", this.cellType = d, this.align = c.align || "center", this.verticalAlign = c.verticalAlign || "middle", this.fixed = c.fixed, this.level = c.level, this.operation = c.operation || !1, this.column = c, this.rules = c.rules, this.row = f, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = c.render, this.overflowTooltipShow = c.overflowTooltipShow !== !1, this.overflowTooltipMaxWidth = c.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = c.overflowTooltipPlacement || "top", this.renderFooter = c.renderFooter, this.hoverIconName = c.hoverIconName, this.formatter = c.formatter, this.update();
1993
1993
  }
1994
1994
  getValidationMessage() {
@@ -2083,7 +2083,7 @@ class ee extends te {
2083
2083
  const { CELL_PADDING: e = 0 } = this.ctx.config, { rowKey: i, cellType: s } = this;
2084
2084
  let r, o = 0, a = "";
2085
2085
  if (this.type === "tree" && s === "body") {
2086
- const h = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: f = !1, expandLoading: d = !1, level: x = 0 } = h || {};
2086
+ const l = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: f = !1, expandLoading: d = !1, level: x = 0 } = l || {};
2087
2087
  if (this.rowExpand = c, this.rowHasChildren = f, d) {
2088
2088
  const u = this.ctx.icons.get("loading");
2089
2089
  a = "loading", r = u, o = x * 8;
@@ -2093,8 +2093,8 @@ class ee extends te {
2093
2093
  } else
2094
2094
  o = x * 8;
2095
2095
  if (r) {
2096
- let u = 20, g = 20, w = this.drawX + o + e, p = this.drawY + (this.visibleHeight - g) / 2;
2097
- this.ctx.paint.drawImage(r, w, p, u, g), this.drawImageX = w, this.drawImageY = p, this.drawImageWidth = u, this.drawImageHeight = g, this.drawImageName = a, this.drawImageSource = r, this.align = "left", this.drawTextX = o + this.drawX + u - 0.5;
2096
+ let u = 20, g = 20, w = this.drawX + o + e, y = this.drawY + (this.visibleHeight - g) / 2;
2097
+ this.ctx.paint.drawImage(r, w, y, u, g), this.drawImageX = w, this.drawImageY = y, this.drawImageWidth = u, this.drawImageHeight = g, this.drawImageName = a, this.drawImageSource = r, this.align = "left", this.drawTextX = o + this.drawX + u - 0.5;
2098
2098
  }
2099
2099
  }
2100
2100
  }
@@ -2106,13 +2106,13 @@ class ee extends te {
2106
2106
  FOOTER_CELL_STYLE_METHOD: r,
2107
2107
  READONLY_TEXT_COLOR: o,
2108
2108
  FOOTER_BG_COLOR: a,
2109
- HIGHLIGHT_SELECTED_ROW: h,
2109
+ HIGHLIGHT_SELECTED_ROW: l,
2110
2110
  HIGHLIGHT_SELECTED_ROW_COLOR: c,
2111
2111
  HIGHLIGHT_HOVER_ROW: f,
2112
2112
  HIGHLIGHT_HOVER_ROW_COLOR: d
2113
2113
  } = this.ctx.config;
2114
2114
  if (this.cellType === "footer") {
2115
- let y = a, b = o;
2115
+ let p = a, b = o;
2116
2116
  if (typeof r == "function") {
2117
2117
  const m = r, { backgroundColor: E, color: C } = m({
2118
2118
  row: this.row,
@@ -2121,50 +2121,50 @@ class ee extends te {
2121
2121
  column: this.column,
2122
2122
  value: this.getValue()
2123
2123
  }) || {};
2124
- E && (y = E), C && (b = C);
2124
+ E && (p = E), C && (b = C);
2125
2125
  }
2126
- this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = y, this.drawTextColor = b;
2126
+ this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = p, this.drawTextColor = b;
2127
2127
  return;
2128
2128
  }
2129
2129
  let x = "transparent";
2130
2130
  const u = this.ctx.focusCell, g = this.ctx.hoverCell;
2131
- f && (g == null ? void 0 : g.rowKey) === this.rowKey && (x = d), h && (u == null ? void 0 : u.rowKey) === this.rowKey && (x = c), this.drawCellSkyBgColor = x;
2132
- let w = e, p = o;
2131
+ f && (g == null ? void 0 : g.rowKey) === this.rowKey && (x = d), l && (u == null ? void 0 : u.rowKey) === this.rowKey && (x = c), this.drawCellSkyBgColor = x;
2132
+ let w = e, y = o;
2133
2133
  if (["index", "index-selection", "selection"].includes(this.type)) {
2134
2134
  this.drawCellBgColor = e, this.drawTextColor = o;
2135
2135
  return;
2136
2136
  }
2137
- if (this.ctx.database.getReadonly(this.rowKey, this.key) || (w = i, p = o), typeof s == "function") {
2138
- const y = s, { backgroundColor: b, color: m } = y({
2137
+ if (this.ctx.database.getReadonly(this.rowKey, this.key) || (w = i, y = o), typeof s == "function") {
2138
+ const p = s, { backgroundColor: b, color: m } = p({
2139
2139
  row: this.row,
2140
2140
  rowIndex: this.rowIndex,
2141
2141
  colIndex: this.colIndex,
2142
2142
  column: this.column,
2143
2143
  value: this.getValue()
2144
2144
  }) || {};
2145
- b && (w = b), m && (p = m);
2145
+ b && (w = b), m && (y = m);
2146
2146
  }
2147
- this.drawCellBgColor = w, this.drawTextColor = p;
2147
+ this.drawCellBgColor = w, this.drawTextColor = y;
2148
2148
  }
2149
2149
  updateSelection() {
2150
- const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: a, rowIndex: h, rowKey: c } = this;
2150
+ const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: a, rowIndex: l, rowKey: c } = this;
2151
2151
  if (!(s === 0 || r === 0) && o !== "footer" && ["index-selection", "selection"].includes(a)) {
2152
2152
  const f = this.ctx.database.getRowSelection(c), d = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, u = this.drawX + (e - x) / 2, g = this.drawY + (i - x) / 2;
2153
- let w = this.ctx.icons.get("checkbox-uncheck"), p = "checkbox-uncheck";
2154
- f && d ? (w = this.ctx.icons.get("checkbox-check"), p = "checkbox-check") : f && d ? (w = this.ctx.icons.get("checkbox-check-disabled"), p = "checkbox-check-disabled") : !f && d ? (w = this.ctx.icons.get("checkbox-uncheck"), p = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), p = "checkbox-disabled"), w && a == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === h || ["checkbox-disabled", "checkbox-check"].includes(p)) && (this.drawImageX = u, this.drawImageY = g, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = p, this.drawImageSource = w) : w && a === "selection" && (this.drawImageX = u, this.drawImageY = g, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = p, this.drawImageSource = w);
2153
+ let w = this.ctx.icons.get("checkbox-uncheck"), y = "checkbox-uncheck";
2154
+ f && d ? (w = this.ctx.icons.get("checkbox-check"), y = "checkbox-check") : f && d ? (w = this.ctx.icons.get("checkbox-check-disabled"), y = "checkbox-check-disabled") : !f && d ? (w = this.ctx.icons.get("checkbox-uncheck"), y = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), y = "checkbox-disabled"), w && a == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(y)) && (this.drawImageX = u, this.drawImageY = g, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = y, this.drawImageSource = w) : w && a === "selection" && (this.drawImageX = u, this.drawImageY = g, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = y, this.drawImageSource = w);
2155
2155
  }
2156
2156
  }
2157
2157
  updateHoverIcon() {
2158
2158
  const { CELL_HOVER_ICON_METHOD: e, CELL_HOVER_ICON_SIZE: i, CELL_PADDING: s } = this.ctx.config;
2159
2159
  if (typeof e == "function") {
2160
- const h = e({
2160
+ const l = e({
2161
2161
  row: this.row,
2162
2162
  rowIndex: this.rowIndex,
2163
2163
  colIndex: this.colIndex,
2164
2164
  column: this.column,
2165
2165
  value: this.getValue()
2166
2166
  });
2167
- h !== void 0 && (this.hoverIconName = h);
2167
+ l !== void 0 && (this.hoverIconName = l);
2168
2168
  }
2169
2169
  const r = this.drawX + this.width - i - s, o = this.drawY + (this.height - i) / 2;
2170
2170
  if (this.hoverIconName && this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === this.rowIndex) {
@@ -2280,8 +2280,8 @@ class ee extends te {
2280
2280
  const { SELECT_BORDER_COLOR: e, ENABLE_AUTOFILL: i, ENABLE_SELECTOR: s } = this.ctx.config;
2281
2281
  if (!s || !i)
2282
2282
  return;
2283
- const { xArr: r, yArr: o } = this.ctx.selector, a = r[1], h = o[1], { colIndex: c, rowIndex: f, drawX: d, drawY: x } = this;
2284
- c === a && f === h && this.ctx.paint.drawRect(d + this.width - 6, x + this.height - 6, 6, 6, {
2283
+ const { xArr: r, yArr: o } = this.ctx.selector, a = r[1], l = o[1], { colIndex: c, rowIndex: f, drawX: d, drawY: x } = this;
2284
+ c === a && f === l && this.ctx.paint.drawRect(d + this.width - 6, x + this.height - 6, 6, 6, {
2285
2285
  borderColor: "#fff",
2286
2286
  fillColor: e
2287
2287
  });
@@ -2336,33 +2336,33 @@ class ee extends te {
2336
2336
  }
2337
2337
  drawBorder(e) {
2338
2338
  const { drawX: i, drawY: s, width: r, rowIndex: o, colIndex: a } = this;
2339
- let h = i + 0.5, c = s + 0.5, f = this.height;
2340
- o === 0 && (c = this.y + 1, f = f - 1), a === this.ctx.maxColIndex && (h = h - 1);
2341
- const { xArr: d, yArr: x, lineDash: u = [], borderWidth: g = 1, borderColor: w, fillColor: p } = e, y = d[0], b = d[1], m = x[0], E = x[1];
2342
- a >= y && a <= b && o === m && this.ctx.paint.drawLine([h, c, h + r - 2, c], {
2339
+ let l = i + 0.5, c = s + 0.5, f = this.height;
2340
+ o === 0 && (c = this.y + 1, f = f - 1), a === this.ctx.maxColIndex && (l = l - 1);
2341
+ const { xArr: d, yArr: x, lineDash: u = [], borderWidth: g = 1, borderColor: w, fillColor: y } = e, p = d[0], b = d[1], m = x[0], E = x[1];
2342
+ a >= p && a <= b && o === m && this.ctx.paint.drawLine([l, c, l + r - 2, c], {
2343
2343
  borderColor: w,
2344
- fillColor: p,
2344
+ fillColor: y,
2345
2345
  borderWidth: g,
2346
2346
  lineCap: "round",
2347
2347
  lineJoin: "round",
2348
2348
  lineDash: u
2349
- }), a >= y && a <= b && o === E && this.ctx.paint.drawLine([h, c + f - 1.5, h + r, c + f - 1.5], {
2349
+ }), a >= p && a <= b && o === E && this.ctx.paint.drawLine([l, c + f - 1.5, l + r, c + f - 1.5], {
2350
2350
  borderColor: w,
2351
- fillColor: p,
2351
+ fillColor: y,
2352
2352
  borderWidth: g,
2353
2353
  lineCap: "round",
2354
2354
  lineJoin: "round",
2355
2355
  lineDash: u
2356
- }), a === y && o >= m && o <= E && this.ctx.paint.drawLine([h, c, h, c + f - 1], {
2356
+ }), a === p && o >= m && o <= E && this.ctx.paint.drawLine([l, c, l, c + f - 1], {
2357
2357
  borderColor: w,
2358
- fillColor: p,
2358
+ fillColor: y,
2359
2359
  borderWidth: g,
2360
2360
  lineCap: "round",
2361
2361
  lineJoin: "round",
2362
2362
  lineDash: u
2363
- }), a === b && o >= m && o <= E && this.ctx.paint.drawLine([h + r - 1.5, c, h + r - 1.5, c + f - 1.5], {
2363
+ }), a === b && o >= m && o <= E && this.ctx.paint.drawLine([l + r - 1.5, c, l + r - 1.5, c + f - 1.5], {
2364
2364
  borderColor: w,
2365
- fillColor: p,
2365
+ fillColor: y,
2366
2366
  borderWidth: g,
2367
2367
  lineCap: "round",
2368
2368
  lineJoin: "round",
@@ -2371,42 +2371,42 @@ class ee extends te {
2371
2371
  }
2372
2372
  }
2373
2373
  class ie extends te {
2374
- constructor(e, i, s, r, o, a, h) {
2375
- super(e, s, r, o, a, h.fixed, "header");
2376
- l(this, "align");
2377
- l(this, "verticalAlign", "middle");
2378
- l(this, "fixed");
2379
- l(this, "widthFillDisable");
2380
- l(this, "type");
2381
- l(this, "operation", !1);
2382
- l(this, "editorType");
2383
- l(this, "level");
2384
- l(this, "text");
2385
- l(this, "displayText", "");
2386
- l(this, "colspan");
2387
- l(this, "rowspan");
2388
- l(this, "key");
2389
- l(this, "required", !1);
2390
- l(this, "readonly", !1);
2391
- l(this, "children", []);
2392
- l(this, "column");
2393
- l(this, "colIndex");
2394
- l(this, "rowKey");
2395
- l(this, "rules");
2396
- l(this, "hasChildren");
2397
- l(this, "render");
2398
- l(this, "style", {});
2399
- l(this, "drawX", 0);
2400
- l(this, "drawY", 0);
2401
- l(this, "drawCellBgColor", "");
2402
- l(this, "drawTextColor", "");
2403
- l(this, "drawImageX", 0);
2404
- l(this, "drawImageY", 0);
2405
- l(this, "drawImageWidth", 0);
2406
- l(this, "drawImageHeight", 0);
2407
- l(this, "drawImageName", "");
2408
- l(this, "drawImageSource");
2409
- this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = a, this.colIndex = i, this.key = h.key, this.type = h.type, this.editorType = h.editorType || "text", this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level, this.operation = h.operation || !1, this.text = h.title, this.column = h, this.colspan = h.colspan, this.widthFillDisable = h.widthFillDisable, this.rowspan = h.rowspan, this.rules = h.rules, this.readonly = h.readonly, this.required = h.required, this.rowKey = Ut(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2374
+ constructor(e, i, s, r, o, a, l) {
2375
+ super(e, s, r, o, a, l.fixed, "header");
2376
+ h(this, "align");
2377
+ h(this, "verticalAlign", "middle");
2378
+ h(this, "fixed");
2379
+ h(this, "widthFillDisable");
2380
+ h(this, "type");
2381
+ h(this, "operation", !1);
2382
+ h(this, "editorType");
2383
+ h(this, "level");
2384
+ h(this, "text");
2385
+ h(this, "displayText", "");
2386
+ h(this, "colspan");
2387
+ h(this, "rowspan");
2388
+ h(this, "key");
2389
+ h(this, "required", !1);
2390
+ h(this, "readonly", !1);
2391
+ h(this, "children", []);
2392
+ h(this, "column");
2393
+ h(this, "colIndex");
2394
+ h(this, "rowKey");
2395
+ h(this, "rules");
2396
+ h(this, "hasChildren");
2397
+ h(this, "render");
2398
+ h(this, "style", {});
2399
+ h(this, "drawX", 0);
2400
+ h(this, "drawY", 0);
2401
+ h(this, "drawCellBgColor", "");
2402
+ h(this, "drawTextColor", "");
2403
+ h(this, "drawImageX", 0);
2404
+ h(this, "drawImageY", 0);
2405
+ h(this, "drawImageWidth", 0);
2406
+ h(this, "drawImageHeight", 0);
2407
+ h(this, "drawImageName", "");
2408
+ h(this, "drawImageSource");
2409
+ this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = a, this.colIndex = i, this.key = l.key, this.type = l.type, this.editorType = l.editorType || "text", this.align = l.align || "center", this.verticalAlign = l.verticalAlign || "middle", this.fixed = l.fixed, this.level = l.level, this.operation = l.operation || !1, this.text = l.title, this.column = l, this.colspan = l.colspan, this.widthFillDisable = l.widthFillDisable, this.rowspan = l.rowspan, this.rules = l.rules, this.readonly = l.readonly, this.required = l.required, this.rowKey = Ut(), this.hasChildren = l.children && l.children.length > 0 || !1, this.render = l.renderHeader;
2410
2410
  }
2411
2411
  /**
2412
2412
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -2426,11 +2426,11 @@ class ie extends te {
2426
2426
  const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
2427
2427
  let r = i, o = s;
2428
2428
  if (typeof e == "function") {
2429
- const a = e, { backgroundColor: h, color: c } = a({
2429
+ const a = e, { backgroundColor: l, color: c } = a({
2430
2430
  colIndex: this.colIndex,
2431
2431
  column: this.column
2432
2432
  }) || {};
2433
- h && (r = h), c && (o = c);
2433
+ l && (r = l), c && (o = c);
2434
2434
  }
2435
2435
  this.drawCellBgColor = r, this.drawTextColor = o;
2436
2436
  }
@@ -2441,11 +2441,11 @@ class ie extends te {
2441
2441
  const {
2442
2442
  paint: e,
2443
2443
  config: { BORDER_COLOR: i, CELL_PADDING: s, HEADER_FONT: r }
2444
- } = this.ctx, { drawX: o, drawY: a, displayText: h } = this;
2444
+ } = this.ctx, { drawX: o, drawY: a, displayText: l } = this;
2445
2445
  e.drawRect(o, a, this.width, this.height, {
2446
2446
  borderColor: i,
2447
2447
  fillColor: this.drawCellBgColor
2448
- }), e.drawText(h, o, a, this.width, this.height, {
2448
+ }), e.drawText(l, o, a, this.width, this.height, {
2449
2449
  font: r,
2450
2450
  padding: s,
2451
2451
  color: this.drawTextColor,
@@ -2456,9 +2456,9 @@ class ie extends te {
2456
2456
  drawSelection() {
2457
2457
  const { width: e, height: i, type: s } = this;
2458
2458
  if (["index-selection", "selection"].includes(s)) {
2459
- const { indeterminate: r, check: o, selectable: a } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: h = 0 } = this.ctx.config, c = this.drawX + (e - h) / 2, f = this.drawY + (i - h) / 2;
2459
+ const { indeterminate: r, check: o, selectable: a } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: l = 0 } = this.ctx.config, c = this.drawX + (e - l) / 2, f = this.drawY + (i - l) / 2;
2460
2460
  let d = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck";
2461
- r ? (d = this.ctx.icons.get("checkbox-indeterminate"), x = "checkbox-indeterminate") : o && a ? (d = this.ctx.icons.get("checkbox-check"), x = "checkbox-check") : o && a ? (d = this.ctx.icons.get("checkbox-check-disabled"), x = "checkbox-check-disabled") : !o && a ? (d = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck") : (d = this.ctx.icons.get("checkbox-disabled"), x = "checkbox-disabled"), d && (this.drawImageX = c, this.drawImageY = f, this.drawImageWidth = h, this.drawImageHeight = h, this.drawImageName = x, this.drawImageSource = d, this.ctx.paint.drawImage(
2461
+ r ? (d = this.ctx.icons.get("checkbox-indeterminate"), x = "checkbox-indeterminate") : o && a ? (d = this.ctx.icons.get("checkbox-check"), x = "checkbox-check") : o && a ? (d = this.ctx.icons.get("checkbox-check-disabled"), x = "checkbox-check-disabled") : !o && a ? (d = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck") : (d = this.ctx.icons.get("checkbox-disabled"), x = "checkbox-disabled"), d && (this.drawImageX = c, this.drawImageY = f, this.drawImageWidth = l, this.drawImageHeight = l, this.drawImageName = x, this.drawImageSource = d, this.ctx.paint.drawImage(
2462
2462
  this.drawImageSource,
2463
2463
  this.drawImageX,
2464
2464
  this.drawImageY,
@@ -2485,11 +2485,11 @@ class ie extends te {
2485
2485
  };
2486
2486
  }
2487
2487
  }
2488
- class li {
2488
+ class hi {
2489
2489
  constructor(t) {
2490
- l(this, "ctx");
2491
- l(this, "visibleHoverCell");
2492
- l(this, "resizeObserver");
2490
+ h(this, "ctx");
2491
+ h(this, "visibleHoverCell");
2492
+ h(this, "resizeObserver");
2493
2493
  this.ctx = t, this.init();
2494
2494
  }
2495
2495
  init() {
@@ -2579,10 +2579,10 @@ class li {
2579
2579
  colIndex: t.colIndex,
2580
2580
  column: t.column,
2581
2581
  value: t.getValue()
2582
- }).then((h) => {
2583
- this.ctx.database.setExpandChildren(t.rowKey, h), this.ctx.database.expandLoading(t.rowKey, !1);
2584
- }).catch((h) => {
2585
- this.ctx.database.expandLoading(t.rowKey, !1), console.error(h);
2582
+ }).then((l) => {
2583
+ this.ctx.database.setExpandChildren(t.rowKey, l), this.ctx.database.expandLoading(t.rowKey, !1);
2584
+ }).catch((l) => {
2585
+ this.ctx.database.expandLoading(t.rowKey, !1), console.error(l);
2586
2586
  }));
2587
2587
  else {
2588
2588
  const a = this.ctx.database.getIsExpand(t.rowKey);
@@ -2609,15 +2609,15 @@ class li {
2609
2609
  handleBodyEvent(t, e, i, s, r = !1) {
2610
2610
  for (const o of i) {
2611
2611
  const a = o.fixedCells.concat(o.noFixedCells);
2612
- for (const h of a) {
2613
- const c = h.getDrawX(), f = h.getDrawY();
2612
+ for (const l of a) {
2613
+ const c = l.getDrawX(), f = l.getDrawY();
2614
2614
  if (r) {
2615
- if (t > c && t < c + h.visibleWidth && e > f && e < f + h.visibleHeight) {
2616
- s(h);
2615
+ if (t > c && t < c + l.visibleWidth && e > f && e < f + l.visibleHeight) {
2616
+ s(l);
2617
2617
  return;
2618
2618
  }
2619
- } else if (t > c && t < c + h.width && e > f && e < f + h.height) {
2620
- s(h);
2619
+ } else if (t > c && t < c + l.width && e > f && e < f + l.height) {
2620
+ s(l);
2621
2621
  return;
2622
2622
  }
2623
2623
  }
@@ -2636,51 +2636,51 @@ class li {
2636
2636
  this.resizeObserver.unobserve(this.ctx.stageElement);
2637
2637
  }
2638
2638
  }
2639
- class hi {
2639
+ class li {
2640
2640
  constructor(t, e) {
2641
- l(this, "eventBus");
2642
- l(this, "eventBrowser");
2643
- l(this, "eventTable");
2644
- l(this, "containerElement");
2645
- l(this, "stageElement");
2646
- l(this, "canvasElement");
2647
- l(this, "overlayerElement");
2648
- l(this, "editorElement");
2649
- l(this, "stageWidth", 0);
2650
- l(this, "stageHeight", 0);
2651
- l(this, "paint");
2652
- l(this, "icons");
2653
- l(this, "isInsideTargetContainer", !1);
2654
- l(this, "mousedown", !1);
2655
- l(this, "isPointer", !1);
2656
- l(this, "rowResizing", !1);
2641
+ h(this, "eventBus");
2642
+ h(this, "eventBrowser");
2643
+ h(this, "eventTable");
2644
+ h(this, "containerElement");
2645
+ h(this, "stageElement");
2646
+ h(this, "canvasElement");
2647
+ h(this, "overlayerElement");
2648
+ h(this, "editorElement");
2649
+ h(this, "stageWidth", 0);
2650
+ h(this, "stageHeight", 0);
2651
+ h(this, "paint");
2652
+ h(this, "icons");
2653
+ h(this, "isInsideTargetContainer", !1);
2654
+ h(this, "mousedown", !1);
2655
+ h(this, "isPointer", !1);
2656
+ h(this, "rowResizing", !1);
2657
2657
  // 行调整大小中
2658
- l(this, "columnResizing", !1);
2658
+ h(this, "columnResizing", !1);
2659
2659
  // 列调整大小中
2660
- l(this, "scrollerMove", !1);
2660
+ h(this, "scrollerMove", !1);
2661
2661
  // 滚动条移动中
2662
- l(this, "scrollerFocus", !1);
2662
+ h(this, "scrollerFocus", !1);
2663
2663
  // 滚动条focus中
2664
- l(this, "autofillMove", !1);
2664
+ h(this, "autofillMove", !1);
2665
2665
  // 自动填充移动中
2666
- l(this, "selectorMove", !1);
2666
+ h(this, "selectorMove", !1);
2667
2667
  // 选择器移动中
2668
- l(this, "editing", !1);
2668
+ h(this, "editing", !1);
2669
2669
  // 编辑中
2670
- l(this, "scrollY", 0);
2671
- l(this, "scrollX", 0);
2672
- l(this, "fixedLeftWidth", 0);
2673
- l(this, "fixedRightWidth", 0);
2674
- l(this, "maxColIndex", 0);
2675
- l(this, "maxRowIndex", 0);
2676
- l(this, "hoverRow");
2677
- l(this, "clickCell");
2678
- l(this, "focusCell");
2679
- l(this, "hoverCell");
2680
- l(this, "clickCellHeader");
2681
- l(this, "focusCellHeader");
2682
- l(this, "hoverCellHeader");
2683
- l(this, "body", {
2670
+ h(this, "scrollY", 0);
2671
+ h(this, "scrollX", 0);
2672
+ h(this, "fixedLeftWidth", 0);
2673
+ h(this, "fixedRightWidth", 0);
2674
+ h(this, "maxColIndex", 0);
2675
+ h(this, "maxRowIndex", 0);
2676
+ h(this, "hoverRow");
2677
+ h(this, "clickCell");
2678
+ h(this, "focusCell");
2679
+ h(this, "hoverCell");
2680
+ h(this, "clickCellHeader");
2681
+ h(this, "focusCellHeader");
2682
+ h(this, "hoverCellHeader");
2683
+ h(this, "body", {
2684
2684
  x: 0,
2685
2685
  y: 0,
2686
2686
  width: 0,
@@ -2693,7 +2693,7 @@ class hi {
2693
2693
  renderRows: [],
2694
2694
  data: []
2695
2695
  });
2696
- l(this, "footer", {
2696
+ h(this, "footer", {
2697
2697
  x: 0,
2698
2698
  y: 0,
2699
2699
  width: 0,
@@ -2702,7 +2702,7 @@ class hi {
2702
2702
  visibleWidth: 0,
2703
2703
  renderRows: []
2704
2704
  });
2705
- l(this, "header", {
2705
+ h(this, "header", {
2706
2706
  x: 0,
2707
2707
  y: 0,
2708
2708
  width: 0,
@@ -2717,23 +2717,23 @@ class hi {
2717
2717
  fixedRightCellHeaders: [],
2718
2718
  renderCenterCellHeaders: []
2719
2719
  });
2720
- l(this, "selector", {
2720
+ h(this, "selector", {
2721
2721
  enable: !1,
2722
2722
  xArr: [-1, -1],
2723
2723
  yArr: [-1, -1],
2724
2724
  xArrCopy: [-1, -1],
2725
2725
  yArrCopy: [-1, -1]
2726
2726
  });
2727
- l(this, "autofill", {
2727
+ h(this, "autofill", {
2728
2728
  enable: !1,
2729
2729
  xArr: [-1, -1],
2730
2730
  yArr: [-1, -1]
2731
2731
  });
2732
- l(this, "database");
2733
- l(this, "history");
2734
- l(this, "config");
2732
+ h(this, "database");
2733
+ h(this, "history");
2734
+ h(this, "config");
2735
2735
  const { containerElement: i, stageElement: s, canvasElement: r, overlayerElement: o, editorElement: a } = t;
2736
- this.containerElement = i, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = a, this.config = new Wt(e.config || {}), this.eventBus = new oi(), this.eventBrowser = new ri(this), this.eventTable = new li(this), this.paint = new ni(this.canvasElement), this.database = new ii(this, e), this.history = new si(this), this.icons = new ai(this);
2736
+ this.containerElement = i, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = a, this.config = new Wt(e.config || {}), this.eventBus = new oi(), this.eventBrowser = new ri(this), this.eventTable = new hi(this), this.paint = new ni(this.canvasElement), this.database = new ii(this, e), this.history = new si(this), this.icons = new ai(this);
2737
2737
  }
2738
2738
  setConfig(t) {
2739
2739
  this.config = new Wt(t);
@@ -2768,7 +2768,7 @@ class hi {
2768
2768
  for (let r = 0; r <= e[1] - e[0]; r++) {
2769
2769
  const o = [];
2770
2770
  for (let a = 0; a <= i[1] - i[0]; a++) {
2771
- const h = r + e[0], c = a + i[0], f = this.database.getItemValueForRowIndexAndColIndex(h, c);
2771
+ const l = r + e[0], c = a + i[0], f = this.database.getItemValueForRowIndexAndColIndex(l, c);
2772
2772
  f && o.push(f.value);
2773
2773
  }
2774
2774
  s += `${o.join(" ")}\r`, t.push(o);
@@ -2829,29 +2829,29 @@ class hi {
2829
2829
  }
2830
2830
  class Pt {
2831
2831
  constructor(t, e) {
2832
- l(this, "ctx");
2833
- l(this, "type");
2834
- l(this, "isFocus", !1);
2835
- l(this, "trackX", 0);
2836
- l(this, "trackY", 0);
2837
- l(this, "trackWidth", 0);
2838
- l(this, "trackHeight", 0);
2839
- l(this, "splitPoints", []);
2832
+ h(this, "ctx");
2833
+ h(this, "type");
2834
+ h(this, "isFocus", !1);
2835
+ h(this, "trackX", 0);
2836
+ h(this, "trackY", 0);
2837
+ h(this, "trackWidth", 0);
2838
+ h(this, "trackHeight", 0);
2839
+ h(this, "splitPoints", []);
2840
2840
  //分割线
2841
- l(this, "barX", 0);
2842
- l(this, "barY", 0);
2843
- l(this, "barWidth", 0);
2844
- l(this, "barHeight", 0);
2845
- l(this, "distance", 0);
2841
+ h(this, "barX", 0);
2842
+ h(this, "barY", 0);
2843
+ h(this, "barWidth", 0);
2844
+ h(this, "barHeight", 0);
2845
+ h(this, "distance", 0);
2846
2846
  // 滚动条的长度
2847
- l(this, "visibleDistance", 0);
2847
+ h(this, "visibleDistance", 0);
2848
2848
  //可见区域的长度
2849
- l(this, "clientX", 0);
2850
- l(this, "clientY", 0);
2851
- l(this, "dragStart", 0);
2849
+ h(this, "clientX", 0);
2850
+ h(this, "clientY", 0);
2851
+ h(this, "dragStart", 0);
2852
2852
  // 拖拽开始的位置
2853
- l(this, "isDragging", !1);
2854
- l(this, "scroll", 0);
2853
+ h(this, "isDragging", !1);
2854
+ h(this, "scroll", 0);
2855
2855
  this.ctx = t, this.type = e, this.type === "vertical" ? this.scroll = this.ctx.scrollY : this.scroll = this.ctx.scrollX;
2856
2856
  }
2857
2857
  onWheel(t) {
@@ -2904,19 +2904,19 @@ class Pt {
2904
2904
  stageHeight: i,
2905
2905
  stageWidth: s,
2906
2906
  config: { SCROLLER_TRACK_SIZE: r = 0, SCROLLER_SIZE: o = 0 }
2907
- } = this.ctx, a = s, h = i, c = e.height, f = e.width, d = t.height, x = this.ctx.footer.height;
2907
+ } = this.ctx, a = s, l = i, c = e.height, f = e.width, d = t.height, x = this.ctx.footer.height;
2908
2908
  if (this.type === "vertical") {
2909
- this.visibleDistance = h - r - c, this.distance = d - this.visibleDistance + x, this.trackX = a - r, this.trackY = 0, this.splitPoints = [this.trackX, c, this.trackX + r, c], this.trackWidth = r, this.trackHeight = h, this.barX = this.trackX - 0.5 + (r - o) / 2, this.barWidth = o;
2909
+ this.visibleDistance = l - r - c, this.distance = d - this.visibleDistance + x, this.trackX = a - r, this.trackY = 0, this.splitPoints = [this.trackX, c, this.trackX + r, c], this.trackWidth = r, this.trackHeight = l, this.barX = this.trackX - 0.5 + (r - o) / 2, this.barWidth = o;
2910
2910
  const u = this.distance ? this.visibleDistance / d : 0;
2911
2911
  let g = Math.floor(u * this.visibleDistance);
2912
2912
  g < 30 ? g = 30 : g > this.visibleDistance && (g = 0), this.barHeight = g, this.barY = c + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
2913
2913
  } else {
2914
2914
  this.visibleDistance = a - r, this.distance = f - this.visibleDistance, this.splitPoints = [
2915
2915
  a - r,
2916
- h - r,
2916
+ l - r,
2917
2917
  a - r,
2918
- h
2919
- ], this.trackX = 0, this.trackY = h - r, this.trackWidth = a, this.trackHeight = r;
2918
+ l
2919
+ ], this.trackX = 0, this.trackY = l - r, this.trackWidth = a, this.trackHeight = r;
2920
2920
  const u = this.distance ? this.visibleDistance / f : 0;
2921
2921
  let g = Math.floor(u * this.visibleDistance);
2922
2922
  this.barY = this.trackY - 0.5 + (r - o) / 2, g < 30 ? g = 30 : g >= this.visibleDistance && (g = 0), this.barWidth = g, this.barHeight = o, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
@@ -2940,9 +2940,9 @@ class Pt {
2940
2940
  }
2941
2941
  class ci {
2942
2942
  constructor(t) {
2943
- l(this, "ctx");
2944
- l(this, "verticalScrollbar");
2945
- l(this, "horizontalScrollbar");
2943
+ h(this, "ctx");
2944
+ h(this, "verticalScrollbar");
2945
+ h(this, "horizontalScrollbar");
2946
2946
  this.ctx = t, this.verticalScrollbar = new Pt(t, "vertical"), this.horizontalScrollbar = new Pt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("setScroll", (e, i) => {
2947
2947
  this.setScroll(e, i);
2948
2948
  }), this.ctx.on("setScrollX", (e) => {
@@ -2996,41 +2996,41 @@ class ci {
2996
2996
  }
2997
2997
  class di {
2998
2998
  constructor(t) {
2999
- l(this, "ctx");
2999
+ h(this, "ctx");
3000
3000
  // 上下文
3001
- l(this, "x", 0);
3001
+ h(this, "x", 0);
3002
3002
  // x坐标
3003
- l(this, "y", 0);
3003
+ h(this, "y", 0);
3004
3004
  // y坐标
3005
- l(this, "width", 0);
3005
+ h(this, "width", 0);
3006
3006
  // 宽度
3007
- l(this, "height", 0);
3007
+ h(this, "height", 0);
3008
3008
  // 高度
3009
- l(this, "resizeTarget", null);
3009
+ h(this, "resizeTarget", null);
3010
3010
  //调整表头
3011
- l(this, "resizeNum", 0);
3011
+ h(this, "resizeNum", 0);
3012
3012
  // 调整列的数量
3013
- l(this, "isResizing", !1);
3013
+ h(this, "isResizing", !1);
3014
3014
  // 是否移动中
3015
- l(this, "clientX", 0);
3015
+ h(this, "clientX", 0);
3016
3016
  // 鼠标按下时的x轴位置
3017
- l(this, "resizeDiff", 0);
3017
+ h(this, "resizeDiff", 0);
3018
3018
  // 是否移动中
3019
- l(this, "columnIndex", 0);
3020
- l(this, "isMouseDown", !1);
3019
+ h(this, "columnIndex", 0);
3020
+ h(this, "isMouseDown", !1);
3021
3021
  // 是否按下
3022
- l(this, "columns");
3023
- l(this, "visibleLeafColumns", []);
3024
- l(this, "visibleHeight", 0);
3025
- l(this, "visibleWidth", 0);
3026
- l(this, "allCellHeaders", []);
3027
- l(this, "leafCellHeaders", []);
3028
- l(this, "renderLeafCellHeaders", []);
3029
- l(this, "fixedLeftCellHeaders", []);
3030
- l(this, "centerCellHeaders", []);
3031
- l(this, "fixedRightCellHeaders", []);
3032
- l(this, "renderCenterCellHeaders", []);
3033
- l(this, "renderFixedCellHeaders", []);
3022
+ h(this, "columns");
3023
+ h(this, "visibleLeafColumns", []);
3024
+ h(this, "visibleHeight", 0);
3025
+ h(this, "visibleWidth", 0);
3026
+ h(this, "allCellHeaders", []);
3027
+ h(this, "leafCellHeaders", []);
3028
+ h(this, "renderLeafCellHeaders", []);
3029
+ h(this, "fixedLeftCellHeaders", []);
3030
+ h(this, "centerCellHeaders", []);
3031
+ h(this, "fixedRightCellHeaders", []);
3032
+ h(this, "renderCenterCellHeaders", []);
3033
+ h(this, "renderFixedCellHeaders", []);
3034
3034
  this.ctx = t, this.ctx.on(
3035
3035
  "resetHeader",
3036
3036
  Zt(() => {
@@ -3049,9 +3049,9 @@ class di {
3049
3049
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3050
3050
  const a = this.ctx.containerElement.getBoundingClientRect();
3051
3051
  this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(a.width) : this.ctx.stageWidth = Math.floor(this.width + e), this.ctx.stageElement.style.width = this.ctx.stageWidth - 0.5 + "px", this.visibleWidth = this.ctx.stageWidth - e;
3052
- const h = this.visibleWidth - this.width;
3053
- if (this.resizeNum && h > 0) {
3054
- const d = Math.floor(h / this.resizeNum * 100) / 100;
3052
+ const l = this.visibleWidth - this.width;
3053
+ if (this.resizeNum && l > 0) {
3054
+ const d = Math.floor(l / this.resizeNum * 100) / 100;
3055
3055
  this.resizeAllColumn(d);
3056
3056
  }
3057
3057
  const c = this.fixedLeftCellHeaders.filter((d) => !d.hasChildren);
@@ -3084,9 +3084,9 @@ class di {
3084
3084
  this.ctx.stageElement.style.cursor === "col-resize" && (this.ctx.stageElement.style.cursor = "default");
3085
3085
  const r = [...this.renderFixedCellHeaders, ...this.renderCenterCellHeaders];
3086
3086
  for (const o of r) {
3087
- const { offsetX: a, offsetY: h } = this.ctx.getOffset(e), c = a, f = o.getDrawX();
3087
+ const { offsetX: a, offsetY: l } = this.ctx.getOffset(e), c = a, f = o.getDrawX();
3088
3088
  c > f + o.width - 5 && c < f + o.width + 4 && c < i - 4 && // 视窗中最后一列不允许调整宽
3089
- o.colspan <= 1 && this.ctx.isTarget() && h <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3089
+ o.colspan <= 1 && this.ctx.isTarget() && l <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3090
3090
  }
3091
3091
  }
3092
3092
  }));
@@ -3140,10 +3140,10 @@ class di {
3140
3140
  let s = e;
3141
3141
  const { HEADER_HEIGHT: r = 0 } = this.ctx.config;
3142
3142
  for (let o = 0; o < i; o++) {
3143
- const a = t[o], h = r * (a.rowspan || 1), c = r * a.level;
3143
+ const a = t[o], l = r * (a.rowspan || 1), c = r * a.level;
3144
3144
  let f = a.width || 100;
3145
3145
  a.children && (f = _t(a.children).reduce((u, g) => u + ((g == null ? void 0 : g.width) || 100), 0));
3146
- const d = new ie(this.ctx, this.columnIndex, s, c, f, h, a);
3146
+ const d = new ie(this.ctx, this.columnIndex, s, c, f, l, a);
3147
3147
  this.ctx.database.setHeader(a.key, d), this.allCellHeaders.push(d), a.children || (this.leafCellHeaders.push(d), d.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(d) : a.fixed === "right" ? this.fixedRightCellHeaders.push(d) : this.centerCellHeaders.push(d), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += f;
3148
3148
  }
3149
3149
  }
@@ -3175,8 +3175,8 @@ class di {
3175
3175
  colorStart: "rgba(0,0,0,0.1)",
3176
3176
  colorEnd: "rgba(0,0,0,0)"
3177
3177
  }), i < Math.floor(s.width - r - 1) && e !== a) {
3178
- const h = s.width - (this.x + this.width) + r - e;
3179
- this.ctx.paint.drawShadow(h + 1, this.y, e, this.height, {
3178
+ const l = s.width - (this.x + this.width) + r - e;
3179
+ this.ctx.paint.drawShadow(l + 1, this.y, e, this.height, {
3180
3180
  fillColor: o,
3181
3181
  side: "left",
3182
3182
  shadowWidth: 4,
@@ -3204,20 +3204,20 @@ class di {
3204
3204
  }
3205
3205
  }
3206
3206
  class se {
3207
- constructor(t, e, i = 0, s = 0, r = 0, o = 0, a, h = "body") {
3208
- l(this, "ctx");
3209
- l(this, "x", 0);
3210
- l(this, "y", 0);
3211
- l(this, "width", 0);
3212
- l(this, "height");
3213
- l(this, "cells", []);
3214
- l(this, "fixedCells", []);
3215
- l(this, "noFixedCells", []);
3216
- l(this, "rowIndex", 0);
3217
- l(this, "rowKey", "");
3218
- l(this, "rowType", "body");
3219
- l(this, "data");
3220
- this.ctx = t, this.x = i, this.y = s, this.width = r, this.height = o, this.rowIndex = e, this.rowKey = t.database.getRowKeyForRowIndex(e), this.rowType = h, this.data = a, this.update();
3207
+ constructor(t, e, i = 0, s = 0, r = 0, o = 0, a, l = "body") {
3208
+ h(this, "ctx");
3209
+ h(this, "x", 0);
3210
+ h(this, "y", 0);
3211
+ h(this, "width", 0);
3212
+ h(this, "height");
3213
+ h(this, "cells", []);
3214
+ h(this, "fixedCells", []);
3215
+ h(this, "noFixedCells", []);
3216
+ h(this, "rowIndex", 0);
3217
+ h(this, "rowKey", "");
3218
+ h(this, "rowType", "body");
3219
+ h(this, "data");
3220
+ this.ctx = t, this.x = i, this.y = s, this.width = r, this.height = o, this.rowIndex = e, this.rowKey = t.database.getRowKeyForRowIndex(e), this.rowType = l, this.data = a, this.update();
3221
3221
  }
3222
3222
  update() {
3223
3223
  const { header: t } = this.ctx, e = [], i = [], s = [];
@@ -3257,28 +3257,28 @@ class se {
3257
3257
  }
3258
3258
  class fi {
3259
3259
  constructor(t) {
3260
- l(this, "resizeTarget", null);
3260
+ h(this, "resizeTarget", null);
3261
3261
  //调整行大小的目标
3262
- l(this, "isMouseDown", !1);
3262
+ h(this, "isMouseDown", !1);
3263
3263
  // 是否按下
3264
- l(this, "resizeDiff", 0);
3264
+ h(this, "resizeDiff", 0);
3265
3265
  // 是否移动中
3266
- l(this, "clientY", 0);
3266
+ h(this, "clientY", 0);
3267
3267
  // 鼠标按下时的y轴位置
3268
- l(this, "ctx");
3269
- l(this, "x", 0);
3270
- l(this, "y", 0);
3271
- l(this, "width", 0);
3272
- l(this, "height", 0);
3273
- l(this, "headIndex", 0);
3274
- l(this, "tailIndex", 0);
3275
- l(this, "isResizing", !1);
3268
+ h(this, "ctx");
3269
+ h(this, "x", 0);
3270
+ h(this, "y", 0);
3271
+ h(this, "width", 0);
3272
+ h(this, "height", 0);
3273
+ h(this, "headIndex", 0);
3274
+ h(this, "tailIndex", 0);
3275
+ h(this, "isResizing", !1);
3276
3276
  //是否正在调整大小
3277
- l(this, "renderRows", []);
3278
- l(this, "visibleRows", []);
3279
- l(this, "visibleHeight", 0);
3280
- l(this, "visibleWidth", 0);
3281
- l(this, "data", []);
3277
+ h(this, "renderRows", []);
3278
+ h(this, "visibleRows", []);
3279
+ h(this, "visibleHeight", 0);
3280
+ h(this, "visibleWidth", 0);
3281
+ h(this, "data", []);
3282
3282
  this.ctx = t, this.init(), this.initResizeRow();
3283
3283
  }
3284
3284
  init() {
@@ -3291,7 +3291,7 @@ class fi {
3291
3291
  SCROLLER_TRACK_SIZE: r = 0,
3292
3292
  HEIGHT: o,
3293
3293
  EMPTY_BODY_HEIGHT: a = 0,
3294
- MAX_HEIGHT: h = 0,
3294
+ MAX_HEIGHT: l = 0,
3295
3295
  ENABLE_OFFSET_HEIGHT: c = 0,
3296
3296
  OFFSET_HEIGHT: f = 0
3297
3297
  }
@@ -3315,12 +3315,12 @@ class fi {
3315
3315
  width: this.width,
3316
3316
  height: this.data.length ? 0 : a + g
3317
3317
  });
3318
- let p = this.height + e.height + r;
3319
- p += g;
3320
- let y = 0;
3321
- this.data.length && c ? (y = window.innerHeight - u - f, y < 0 && (y = 32, console.error(
3318
+ let y = this.height + e.height + r;
3319
+ y += g;
3320
+ let p = 0;
3321
+ this.data.length && c ? (p = window.innerHeight - u - f, p < 0 && (p = 32, console.error(
3322
3322
  "There is an error in the height calculation ENABLE_OFFSET_HEIGHT and OFFSET_HEIGHT are invalid"
3323
- ))) : this.data.length && o ? y = o : this.data.length && h && p > h ? y = h : y = p, y > 0 && (this.ctx.stageHeight = Math.floor(y), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3323
+ ))) : this.data.length && o ? p = o : this.data.length && l && y > l ? p = l : p = y, p > 0 && (this.ctx.stageHeight = Math.floor(p), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3324
3324
  let b = this.ctx.stageHeight - e.height - r;
3325
3325
  s ? this.visibleHeight = b - g : this.visibleHeight = b, this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = d;
3326
3326
  const m = window.devicePixelRatio || 1, E = this.ctx.stageWidth * m, C = this.ctx.stageHeight * m;
@@ -3343,7 +3343,7 @@ class fi {
3343
3343
  }), this.ctx.on("mousemove", (e) => {
3344
3344
  if (this.ctx.editing) return;
3345
3345
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s, a = e.clientY, {
3346
- stageHeight: h,
3346
+ stageHeight: l,
3347
3347
  scrollY: c,
3348
3348
  config: { RESIZE_ROW_MIN_HEIGHT: f = 0 }
3349
3349
  } = this.ctx;
@@ -3357,7 +3357,7 @@ class fi {
3357
3357
  this.ctx.stageElement.style.cursor === "row-resize" && (this.ctx.stageElement.style.cursor = "default");
3358
3358
  for (let d = 0; d < this.renderRows.length; d++) {
3359
3359
  const x = this.renderRows[d];
3360
- if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < h - 4)
3360
+ if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < l - 4)
3361
3361
  for (let g = 0; g < x.cells.length; g++) {
3362
3362
  const w = x.cells[g];
3363
3363
  o > w.drawX + 10 && o < w.drawX + w.width - 10 && w.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
@@ -3406,8 +3406,8 @@ class fi {
3406
3406
  colorStart: "rgba(0,0,0,0.1)",
3407
3407
  colorEnd: "rgba(0,0,0,0)"
3408
3408
  }), i < Math.floor(s.width - r - 1) && e !== a) {
3409
- const h = s.width - (this.x + this.width) + r - e;
3410
- this.ctx.paint.drawShadow(h + 1, this.y, e, this.height, {
3409
+ const l = s.width - (this.x + this.width) + r - e;
3410
+ this.ctx.paint.drawShadow(l + 1, this.y, e, this.height, {
3411
3411
  fillColor: o,
3412
3412
  side: "left",
3413
3413
  shadowWidth: 4,
@@ -3431,8 +3431,8 @@ class fi {
3431
3431
  const { header: t, database: e, scrollY: i } = this.ctx, s = i, { data: r, positions: o } = e.getData();
3432
3432
  this.ctx.maxRowIndex = r.length - 1;
3433
3433
  const a = this.binarySearch(o, s);
3434
- let h = this.binarySearch(o, s + this.visibleHeight);
3435
- h === -1 && (h = r.length), this.headIndex = Math.max(0, a), this.tailIndex = Math.min(this.ctx.maxRowIndex, h + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
3434
+ let l = this.binarySearch(o, s + this.visibleHeight);
3435
+ l === -1 && (l = r.length), this.headIndex = Math.max(0, a), this.tailIndex = Math.min(this.ctx.maxRowIndex, l + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
3436
3436
  const c = [];
3437
3437
  for (let f = 0; f < this.visibleRows.length; f++) {
3438
3438
  const d = this.headIndex + f, x = this.visibleRows[f], { height: u, top: g } = this.ctx.database.getPositionForRowIndex(d), w = new se(this.ctx, d, 0, g + this.y, t.width, u, x);
@@ -3450,15 +3450,15 @@ class fi {
3450
3450
  }
3451
3451
  class xi {
3452
3452
  constructor(t) {
3453
- l(this, "ctx");
3454
- l(this, "renderRows", []);
3455
- l(this, "data", []);
3456
- l(this, "x", 0);
3457
- l(this, "y", 0);
3458
- l(this, "width", 0);
3459
- l(this, "height", 0);
3460
- l(this, "visibleWidth", 0);
3461
- l(this, "visibleHeight", 0);
3453
+ h(this, "ctx");
3454
+ h(this, "renderRows", []);
3455
+ h(this, "data", []);
3456
+ h(this, "x", 0);
3457
+ h(this, "y", 0);
3458
+ h(this, "width", 0);
3459
+ h(this, "height", 0);
3460
+ h(this, "visibleWidth", 0);
3461
+ h(this, "visibleHeight", 0);
3462
3462
  this.ctx = t, this.init();
3463
3463
  }
3464
3464
  init() {
@@ -3479,8 +3479,8 @@ class xi {
3479
3479
  stageWidth: r,
3480
3480
  config: { HEADER_BG_COLOR: o, SCROLLER_TRACK_SIZE: a }
3481
3481
  } = this.ctx;
3482
- let h = this.y;
3483
- if (this.ctx.config.FOOTER_FIXED || (h = this.y - this.ctx.scrollY), i > 0 && t !== 0 && this.ctx.paint.drawShadow(this.x, h, t, this.height, {
3482
+ let l = this.y;
3483
+ if (this.ctx.config.FOOTER_FIXED || (l = this.y - this.ctx.scrollY), i > 0 && t !== 0 && this.ctx.paint.drawShadow(this.x, l, t, this.height, {
3484
3484
  fillColor: o,
3485
3485
  side: "right",
3486
3486
  shadowWidth: 4,
@@ -3488,7 +3488,7 @@ class xi {
3488
3488
  colorEnd: "rgba(0,0,0,0)"
3489
3489
  }), i < Math.floor(s.width - r - 1) && e !== a) {
3490
3490
  const c = s.width - (this.x + this.width) + r - e;
3491
- this.ctx.paint.drawShadow(c + 1, h, e, this.height, {
3491
+ this.ctx.paint.drawShadow(c + 1, l, e, this.height, {
3492
3492
  fillColor: o,
3493
3493
  side: "left",
3494
3494
  shadowWidth: 4,
@@ -3525,17 +3525,16 @@ class xi {
3525
3525
  }
3526
3526
  }
3527
3527
  class ui {
3528
+ // 垂直滚动定时器
3528
3529
  constructor(t) {
3529
- l(this, "isCut", !1);
3530
- l(this, "isMultipleRow", !1);
3531
- l(this, "ctx");
3532
- l(this, "adjustPositionX", "");
3533
- l(this, "adjustPositionY", "");
3534
- l(this, "timerX", 0);
3530
+ h(this, "isCut", !1);
3531
+ h(this, "isMultipleRow", !1);
3532
+ h(this, "ctx");
3533
+ h(this, "adjustPositionX", "");
3534
+ h(this, "adjustPositionY", "");
3535
+ h(this, "timerX", 0);
3535
3536
  // 水平滚动定时器
3536
- l(this, "timerY", 0);
3537
- // 垂直滚动定时器
3538
- l(this, "adjustTimer", 0);
3537
+ h(this, "timerY", 0);
3539
3538
  this.ctx = t, this.init();
3540
3539
  }
3541
3540
  init() {
@@ -3630,16 +3629,16 @@ class ui {
3630
3629
  this.ctx.mousedown && (this.ctx.selectorMove = !0), this.ctx.selector.enable = !0;
3631
3630
  const {
3632
3631
  SELECTOR_AREA_MIN_X: a,
3633
- SELECTOR_AREA_MAX_X: h,
3632
+ SELECTOR_AREA_MAX_X: l,
3634
3633
  SELECTOR_AREA_MIN_Y: c,
3635
3634
  SELECTOR_AREA_MAX_Y: f,
3636
3635
  SELECTOR_AREA_MAX_X_OFFSET: d,
3637
3636
  SELECTOR_AREA_MAX_Y_OFFSET: x
3638
- } = this.ctx.config, u = a, g = h || this.ctx.maxColIndex - d, w = c, p = f || this.ctx.maxRowIndex - x;
3639
- let [y, b] = r, [m, E] = o;
3640
- if (y < u || b > g || m < w || E > p)
3637
+ } = this.ctx.config, u = a, g = l || this.ctx.maxColIndex - d, w = c, y = f || this.ctx.maxRowIndex - x;
3638
+ let [p, b] = r, [m, E] = o;
3639
+ if (p < u || b > g || m < w || E > y)
3641
3640
  return;
3642
- this.ctx.selector.xArr = [Math.max(u, y), Math.min(g, b)], this.ctx.selector.yArr = [Math.max(w, m), Math.min(p, E)], this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
3641
+ this.ctx.selector.xArr = [Math.max(u, p), Math.min(g, b)], this.ctx.selector.yArr = [Math.max(w, m), Math.min(y, E)], this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
3643
3642
  }
3644
3643
  }
3645
3644
  selectCols(t) {
@@ -3653,15 +3652,15 @@ class ui {
3653
3652
  if (this.ctx.mousedown && this.ctx.focusCellHeader) {
3654
3653
  const { colIndex: a } = this.ctx.focusCellHeader;
3655
3654
  if (this.ctx.clearSelector(), t.colIndex >= a) {
3656
- const h = [a, t.colIndex + t.colspan - 1], c = [r, o];
3657
- this.setSelector(h, c);
3655
+ const l = [a, t.colIndex + t.colspan - 1], c = [r, o];
3656
+ this.setSelector(l, c);
3658
3657
  } else {
3659
- const h = [t.colIndex, a], c = [r, o];
3660
- this.setSelector(h, c);
3658
+ const l = [t.colIndex, a], c = [r, o];
3659
+ this.setSelector(l, c);
3661
3660
  }
3662
3661
  } else {
3663
- const a = [t.colIndex, t.colIndex + t.colspan - 1], h = [r, o];
3664
- this.setSelector(a, h);
3662
+ const a = [t.colIndex, t.colIndex + t.colspan - 1], l = [r, o];
3663
+ this.setSelector(a, l);
3665
3664
  }
3666
3665
  }
3667
3666
  selectAll() {
@@ -3675,8 +3674,8 @@ class ui {
3675
3674
  SELECTOR_AREA_MIN_Y: r,
3676
3675
  SELECTOR_AREA_MAX_Y: o,
3677
3676
  SELECTOR_AREA_MAX_X_OFFSET: a,
3678
- SELECTOR_AREA_MAX_Y_OFFSET: h
3679
- } = this.ctx.config, c = i, f = s || this.ctx.maxColIndex - a, d = r, x = o || this.ctx.maxRowIndex - h, u = [c, f], g = [d, x];
3677
+ SELECTOR_AREA_MAX_Y_OFFSET: l
3678
+ } = this.ctx.config, c = i, f = s || this.ctx.maxColIndex - a, d = r, x = o || this.ctx.maxRowIndex - l, u = [c, f], g = [d, x];
3680
3679
  this.setSelector(u, g);
3681
3680
  }
3682
3681
  }
@@ -3686,16 +3685,16 @@ class ui {
3686
3685
  const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: r } = this.ctx.config, o = s || this.ctx.maxColIndex - r, a = i;
3687
3686
  if (e) {
3688
3687
  this.ctx.setFocusCell(t);
3689
- const h = [a, o], c = [t.rowIndex, t.rowIndex];
3690
- this.setSelector(h, c);
3688
+ const l = [a, o], c = [t.rowIndex, t.rowIndex];
3689
+ this.setSelector(l, c);
3691
3690
  }
3692
3691
  if (this.ctx.focusCell && this.ctx.mousedown) {
3693
- const { rowIndex: h } = this.ctx.focusCell;
3694
- if (t.rowIndex >= h) {
3695
- const c = [a, o], f = [h, t.rowIndex];
3692
+ const { rowIndex: l } = this.ctx.focusCell;
3693
+ if (t.rowIndex >= l) {
3694
+ const c = [a, o], f = [l, t.rowIndex];
3696
3695
  this.setSelector(c, f);
3697
3696
  } else {
3698
- const c = [a, o], f = [t.rowIndex, h];
3697
+ const c = [a, o], f = [t.rowIndex, l];
3699
3698
  this.setSelector(c, f);
3700
3699
  }
3701
3700
  }
@@ -3705,7 +3704,7 @@ class ui {
3705
3704
  return;
3706
3705
  const { mousedown: t, focusCell: e, hoverCell: i } = this.ctx;
3707
3706
  if (t && e && i) {
3708
- const { rowIndex: s, colIndex: r } = e, o = Math.min(i.colIndex, r), a = Math.max(i.colIndex, r), h = Math.min(i.rowIndex, s), c = Math.max(i.rowIndex, s), f = [o, a], d = [h, c];
3707
+ const { rowIndex: s, colIndex: r } = e, o = Math.min(i.colIndex, r), a = Math.max(i.colIndex, r), l = Math.min(i.rowIndex, s), c = Math.max(i.rowIndex, s), f = [o, a], d = [l, c];
3709
3708
  this.setSelector(f, d);
3710
3709
  }
3711
3710
  }
@@ -3713,7 +3712,7 @@ class ui {
3713
3712
  const { focusCell: e, clickCell: i } = this.ctx;
3714
3713
  if (e && this.isInSettingRange(e.rowIndex, e.colIndex))
3715
3714
  if (this.ctx.selector.enable = !0, i && t) {
3716
- const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: a } = e, h = Math.min(o, s), c = Math.max(o, s), f = Math.min(a, r), d = Math.max(a, r), x = [h, c], u = [f, d];
3715
+ const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: a } = e, l = Math.min(o, s), c = Math.max(o, s), f = Math.min(a, r), d = Math.max(a, r), x = [l, c], u = [f, d];
3717
3716
  this.setSelector(x, u);
3718
3717
  } else {
3719
3718
  this.ctx.emit("cellSelectedClick", e);
@@ -3750,8 +3749,8 @@ class ui {
3750
3749
  let s = [];
3751
3750
  const r = /* @__PURE__ */ new Set();
3752
3751
  for (let a = 0; a <= e[1] - e[0]; a++)
3753
- for (let h = 0; h <= t[1] - t[0]; h++) {
3754
- const c = a + e[0], f = h + t[0], d = this.ctx.database.getItemValueForRowIndexAndColIndex(c, f);
3752
+ for (let l = 0; l <= t[1] - t[0]; l++) {
3753
+ const c = a + e[0], f = l + t[0], d = this.ctx.database.getItemValueForRowIndexAndColIndex(c, f);
3755
3754
  if (d) {
3756
3755
  const { rowKey: x, key: u } = d;
3757
3756
  this.ctx.database.getReadonly(x, u) || (r.add(x), s.push({
@@ -3791,10 +3790,10 @@ class ui {
3791
3790
  u
3792
3791
  );
3793
3792
  if (w) {
3794
- const { rowKey: p, key: y } = w;
3795
- this.ctx.database.getReadonly(p, y) || (s.add(p), a.push({
3796
- rowKey: p,
3797
- key: y,
3793
+ const { rowKey: y, key: p } = w;
3794
+ this.ctx.database.getReadonly(y, p) || (s.add(y), a.push({
3795
+ rowKey: y,
3796
+ key: p,
3798
3797
  value: g,
3799
3798
  row: {}
3800
3799
  //内部有设置
@@ -3816,10 +3815,10 @@ class ui {
3816
3815
  if (!a.length)
3817
3816
  return;
3818
3817
  this.ctx.database.batchSetItemValue(a, !0);
3819
- let h = [];
3818
+ let l = [];
3820
3819
  s.forEach((c) => {
3821
- h.push(this.ctx.database.getRowDataItemForRowKey(c));
3822
- }), this.ctx.emit("pasteChange", a, h), this.clearCopyLine(), this.ctx.emit("drawView");
3820
+ l.push(this.ctx.database.getRowDataItemForRowKey(c));
3821
+ }), this.ctx.emit("pasteChange", a, l), this.clearCopyLine(), this.ctx.emit("drawView");
3823
3822
  }).catch((r) => {
3824
3823
  console.error("获取剪贴板内容失败:", r);
3825
3824
  });
@@ -3835,7 +3834,7 @@ class ui {
3835
3834
  if (!e)
3836
3835
  return;
3837
3836
  let { colIndex: i = 0, rowIndex: s = 0 } = e;
3838
- const r = 0, o = 0, a = this.ctx.maxColIndex, h = this.ctx.maxRowIndex;
3837
+ const r = 0, o = 0, a = this.ctx.maxColIndex, l = this.ctx.maxRowIndex;
3839
3838
  switch (t) {
3840
3839
  case "LEFT":
3841
3840
  i > r && i--;
@@ -3847,7 +3846,7 @@ class ui {
3847
3846
  i < a && i++;
3848
3847
  break;
3849
3848
  case "BOTTOM":
3850
- s < h && s++;
3849
+ s < l && s++;
3851
3850
  break;
3852
3851
  }
3853
3852
  const c = [i, i], f = [s, s], d = this.getCell(s, i);
@@ -3864,8 +3863,8 @@ class ui {
3864
3863
  SELECTOR_AREA_MIN_Y: r,
3865
3864
  SELECTOR_AREA_MAX_Y: o,
3866
3865
  SELECTOR_AREA_MAX_X_OFFSET: a,
3867
- SELECTOR_AREA_MAX_Y_OFFSET: h
3868
- } = this.ctx.config, c = i, f = s || this.ctx.maxColIndex - a, d = r, x = o || this.ctx.maxRowIndex - h;
3866
+ SELECTOR_AREA_MAX_Y_OFFSET: l
3867
+ } = this.ctx.config, c = i, f = s || this.ctx.maxColIndex - a, d = r, x = o || this.ctx.maxRowIndex - l;
3869
3868
  return !(e < c || e > f || t < d || t > x);
3870
3869
  }
3871
3870
  /**
@@ -3879,7 +3878,7 @@ class ui {
3879
3878
  let a = 10 * (s === "left" ? -1 : 1);
3880
3879
  this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerX = setInterval(() => {
3881
3880
  a *= 1.5;
3882
- const { scrollX: h } = this.ctx, c = h + a;
3881
+ const { scrollX: l } = this.ctx, c = l + a;
3883
3882
  (c < 0 || c > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(c);
3884
3883
  }, 100);
3885
3884
  }
@@ -3888,7 +3887,7 @@ class ui {
3888
3887
  let a = 10 * (r === "top" ? -1 : 1);
3889
3888
  this.timerY && (clearInterval(this.timerY), this.timerY = 0), this.timerY = setInterval(() => {
3890
3889
  a *= 1.5;
3891
- const { scrollY: h } = this.ctx, c = h + a;
3890
+ const { scrollY: l } = this.ctx, c = l + a;
3892
3891
  (c < 0 || c > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(c);
3893
3892
  }, 100);
3894
3893
  }
@@ -3905,18 +3904,18 @@ class ui {
3905
3904
  fixedLeftWidth: r,
3906
3905
  header: o,
3907
3906
  footer: a,
3908
- scrollX: h,
3909
- scrollY: c
3907
+ body: l,
3908
+ scrollX: c,
3909
+ scrollY: f,
3910
+ config: { SCROLLER_TRACK_SIZE: d, FOOTER_FIXED: x }
3910
3911
  } = this.ctx;
3911
- if (!i || i.height > t)
3912
+ if (!i || i.height > l.visibleHeight || i.width > l.visibleWidth - r - s)
3912
3913
  return;
3913
- const { SCROLLER_TRACK_SIZE: f = 0, FOOTER_FIXED: d } = this.ctx.config;
3914
- let x = 0;
3915
- d && (x = a.visibleHeight);
3916
- const u = r - i.drawX + 1, g = i.drawX + i.width - (e - s) + 1, w = o.height - i.drawY, p = i.drawY + i.height - (t - x - f);
3917
- this.adjustTimer && (clearTimeout(this.adjustTimer), this.adjustTimer = 0), this.adjustTimer = setTimeout(() => {
3918
- this.ctx.editing || (g > 0 && !i.fixed ? this.ctx.setScrollX(h + g) : u > 0 && !i.fixed && this.ctx.setScrollX(h - u), w > 0 ? this.ctx.setScrollY(c - w) : p > 0 && this.ctx.setScrollY(c + p));
3919
- }, 167);
3914
+ let u = 0;
3915
+ if (x && (u = a.visibleHeight), i.fixed || !(i.drawX < r || i.drawX + i.width > e - s || i.drawY < this.ctx.header.height || i.drawY + i.height > t - u - d))
3916
+ return;
3917
+ const g = r - i.drawX + 1, w = i.drawX + i.width - (e - s) + 1, y = o.height - i.drawY, p = i.drawY + i.height - (t - u - d);
3918
+ w > 0 && !i.fixed ? this.ctx.setScrollX(c + w) : g > 0 && !i.fixed && this.ctx.setScrollX(c - g), y > 0 ? this.ctx.setScrollY(f - y) : p > 0 && this.ctx.setScrollY(f + p), this.ctx.emit("adjustBoundaryPosition", i);
3920
3919
  }
3921
3920
  destroy() {
3922
3921
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -3924,16 +3923,16 @@ class ui {
3924
3923
  }
3925
3924
  class gi {
3926
3925
  constructor(t) {
3927
- l(this, "ctx");
3926
+ h(this, "ctx");
3928
3927
  this.ctx = t, this.init();
3929
3928
  }
3930
3929
  init() {
3931
3930
  this.ctx.on("cellMouseenter", (t, e) => {
3932
3931
  this.ctx.stageElement.style.cursor === "crosshair" && (this.ctx.stageElement.style.cursor = "default");
3933
- const { offsetX: i, offsetY: s } = this.ctx.getOffset(e), { xArr: r, yArr: o } = this.ctx.selector, a = r[1], h = o[1], { colIndex: c, rowIndex: f, drawX: d, drawY: x, width: u, height: g } = t;
3934
- if (this.ctx.config.ENABLE_AUTOFILL && c === a && f === h) {
3935
- const p = d + u - 6, y = x + g - 6;
3936
- i > p && s > y && (this.ctx.stageElement.style.cursor = "crosshair");
3932
+ const { offsetX: i, offsetY: s } = this.ctx.getOffset(e), { xArr: r, yArr: o } = this.ctx.selector, a = r[1], l = o[1], { colIndex: c, rowIndex: f, drawX: d, drawY: x, width: u, height: g } = t;
3933
+ if (this.ctx.config.ENABLE_AUTOFILL && c === a && f === l) {
3934
+ const y = d + u - 6, p = x + g - 6;
3935
+ i > y && s > p && (this.ctx.stageElement.style.cursor = "crosshair");
3937
3936
  }
3938
3937
  this.mouseenter(t);
3939
3938
  }), this.ctx.on("cellMousedown", () => {
@@ -3964,26 +3963,26 @@ class gi {
3964
3963
  return;
3965
3964
  let o = t, a = e;
3966
3965
  if (!r) {
3967
- const [h] = a;
3968
- a = [h, h];
3966
+ const [l] = a;
3967
+ a = [l, l];
3969
3968
  }
3970
3969
  if (!s) {
3971
- const [h] = o;
3972
- o = [h, h];
3970
+ const [l] = o;
3971
+ o = [l, l];
3973
3972
  }
3974
3973
  if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(o) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(a)) {
3975
3974
  const {
3976
- SELECTOR_AREA_MIN_X: h,
3975
+ SELECTOR_AREA_MIN_X: l,
3977
3976
  SELECTOR_AREA_MAX_X: c,
3978
3977
  SELECTOR_AREA_MIN_Y: f,
3979
3978
  SELECTOR_AREA_MAX_Y: d,
3980
3979
  SELECTOR_AREA_MAX_X_OFFSET: x,
3981
3980
  SELECTOR_AREA_MAX_Y_OFFSET: u
3982
- } = this.ctx.config, g = h, w = c || this.ctx.maxColIndex - x, p = f, y = d || this.ctx.maxRowIndex - u;
3981
+ } = this.ctx.config, g = l, w = c || this.ctx.maxColIndex - x, y = f, p = d || this.ctx.maxRowIndex - u;
3983
3982
  let [b, m] = o, [E, C] = a;
3984
- if (b < g || E < p)
3983
+ if (b < g || E < y)
3985
3984
  return;
3986
- this.ctx.autofill.xArr = [Math.max(g, b), Math.min(w, m)], this.ctx.autofill.yArr = [Math.max(p, E), Math.min(y, C)], this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
3985
+ this.ctx.autofill.xArr = [Math.max(g, b), Math.min(w, m)], this.ctx.autofill.yArr = [Math.max(y, E), Math.min(p, C)], this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
3987
3986
  }
3988
3987
  }
3989
3988
  /**
@@ -3996,13 +3995,13 @@ class gi {
3996
3995
  const u = d + e.yArr[0], g = x + e.xArr[0];
3997
3996
  i.set(`${u}-${g}`, !0);
3998
3997
  }
3999
- const { value: s } = e, r = s[0].length, o = s.length, a = this.ctx.autofill.xArr, h = this.ctx.autofill.yArr;
3998
+ const { value: s } = e, r = s[0].length, o = s.length, a = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr;
4000
3999
  let c = [];
4001
- for (let d = 0; d <= h[1] - h[0]; d++)
4000
+ for (let d = 0; d <= l[1] - l[0]; d++)
4002
4001
  for (let x = 0; x <= a[1] - a[0]; x++) {
4003
- const u = x + a[0], g = d + h[0], w = s[d % o][x % r], p = this.ctx.database.getItemValueForRowIndexAndColIndex(g, u), y = `${g}-${u}`;
4004
- if (p && !i.has(y)) {
4005
- const { rowKey: b, key: m } = p;
4002
+ const u = x + a[0], g = d + l[0], w = s[d % o][x % r], y = this.ctx.database.getItemValueForRowIndexAndColIndex(g, u), p = `${g}-${u}`;
4003
+ if (y && !i.has(p)) {
4004
+ const { rowKey: b, key: m } = y;
4006
4005
  this.ctx.database.getReadonly(b, m) || (t.add(b), c.push({
4007
4006
  rowKey: b,
4008
4007
  key: m,
@@ -4052,7 +4051,7 @@ function at(n, t) {
4052
4051
  function q(n) {
4053
4052
  return n.split("-")[0];
4054
4053
  }
4055
- function lt(n) {
4054
+ function ht(n) {
4056
4055
  return n.split("-")[1];
4057
4056
  }
4058
4057
  function re(n) {
@@ -4069,7 +4068,7 @@ function Mt(n) {
4069
4068
  }
4070
4069
  function yi(n, t, e) {
4071
4070
  e === void 0 && (e = !1);
4072
- const i = lt(n), s = Mt(n), r = Lt(s);
4071
+ const i = ht(n), s = Mt(n), r = Lt(s);
4073
4072
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4074
4073
  return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4075
4074
  }
@@ -4094,7 +4093,7 @@ function Ei(n, t, e) {
4094
4093
  }
4095
4094
  }
4096
4095
  function bi(n, t, e, i) {
4097
- const s = lt(n);
4096
+ const s = ht(n);
4098
4097
  let r = Ei(q(n), e === "start", i);
4099
4098
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4100
4099
  }
@@ -4141,9 +4140,9 @@ function Vt(n, t, e) {
4141
4140
  reference: i,
4142
4141
  floating: s
4143
4142
  } = n;
4144
- const r = J(t), o = Mt(t), a = Lt(o), h = q(t), c = r === "y", f = i.x + i.width / 2 - s.width / 2, d = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
4143
+ const r = J(t), o = Mt(t), a = Lt(o), l = q(t), c = r === "y", f = i.x + i.width / 2 - s.width / 2, d = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
4145
4144
  let u;
4146
- switch (h) {
4145
+ switch (l) {
4147
4146
  case "top":
4148
4147
  u = {
4149
4148
  x: f,
@@ -4174,7 +4173,7 @@ function Vt(n, t, e) {
4174
4173
  y: i.y
4175
4174
  };
4176
4175
  }
4177
- switch (lt(t)) {
4176
+ switch (ht(t)) {
4178
4177
  case "start":
4179
4178
  u[o] -= x * (e && c ? -1 : 1);
4180
4179
  break;
@@ -4190,7 +4189,7 @@ const vi = async (n, t, e) => {
4190
4189
  strategy: s = "absolute",
4191
4190
  middleware: r = [],
4192
4191
  platform: o
4193
- } = e, a = r.filter(Boolean), h = await (o.isRTL == null ? void 0 : o.isRTL(t));
4192
+ } = e, a = r.filter(Boolean), l = await (o.isRTL == null ? void 0 : o.isRTL(t));
4194
4193
  let c = await o.getElementRects({
4195
4194
  reference: n,
4196
4195
  floating: t,
@@ -4198,17 +4197,17 @@ const vi = async (n, t, e) => {
4198
4197
  }), {
4199
4198
  x: f,
4200
4199
  y: d
4201
- } = Vt(c, i, h), x = i, u = {}, g = 0;
4200
+ } = Vt(c, i, l), x = i, u = {}, g = 0;
4202
4201
  for (let w = 0; w < a.length; w++) {
4203
4202
  const {
4204
- name: p,
4205
- fn: y
4203
+ name: y,
4204
+ fn: p
4206
4205
  } = a[w], {
4207
4206
  x: b,
4208
4207
  y: m,
4209
4208
  data: E,
4210
4209
  reset: C
4211
- } = await y({
4210
+ } = await p({
4212
4211
  x: f,
4213
4212
  y: d,
4214
4213
  initialPlacement: i,
@@ -4224,8 +4223,8 @@ const vi = async (n, t, e) => {
4224
4223
  });
4225
4224
  f = b ?? f, d = m ?? d, u = {
4226
4225
  ...u,
4227
- [p]: {
4228
- ...u[p],
4226
+ [y]: {
4227
+ ...u[y],
4229
4228
  ...E
4230
4229
  }
4231
4230
  }, C && g <= 50 && (g++, typeof C == "object" && (C.placement && (x = C.placement), C.rects && (c = C.rects === !0 ? await o.getElementRects({
@@ -4235,7 +4234,7 @@ const vi = async (n, t, e) => {
4235
4234
  }) : C.rects), {
4236
4235
  x: f,
4237
4236
  y: d
4238
- } = Vt(c, x, h)), w = -1);
4237
+ } = Vt(c, x, l)), w = -1);
4239
4238
  }
4240
4239
  return {
4241
4240
  x: f,
@@ -4254,18 +4253,18 @@ async function ne(n, t) {
4254
4253
  platform: r,
4255
4254
  rects: o,
4256
4255
  elements: a,
4257
- strategy: h
4256
+ strategy: l
4258
4257
  } = n, {
4259
4258
  boundary: c = "clippingAncestors",
4260
4259
  rootBoundary: f = "viewport",
4261
4260
  elementContext: d = "floating",
4262
4261
  altBoundary: x = !1,
4263
4262
  padding: u = 0
4264
- } = at(t, n), g = oe(u), p = a[x ? d === "floating" ? "reference" : "floating" : d], y = ut(await r.getClippingRect({
4265
- element: (e = await (r.isElement == null ? void 0 : r.isElement(p))) == null || e ? p : p.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
4263
+ } = at(t, n), g = oe(u), y = a[x ? d === "floating" ? "reference" : "floating" : d], p = ut(await r.getClippingRect({
4264
+ element: (e = await (r.isElement == null ? void 0 : r.isElement(y))) == null || e ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
4266
4265
  boundary: c,
4267
4266
  rootBoundary: f,
4268
- strategy: h
4267
+ strategy: l
4269
4268
  })), b = d === "floating" ? {
4270
4269
  x: i,
4271
4270
  y: s,
@@ -4281,13 +4280,13 @@ async function ne(n, t) {
4281
4280
  elements: a,
4282
4281
  rect: b,
4283
4282
  offsetParent: m,
4284
- strategy: h
4283
+ strategy: l
4285
4284
  }) : b);
4286
4285
  return {
4287
- top: (y.top - C.top + g.top) / E.y,
4288
- bottom: (C.bottom - y.bottom + g.bottom) / E.y,
4289
- left: (y.left - C.left + g.left) / E.x,
4290
- right: (C.right - y.right + g.right) / E.x
4286
+ top: (p.top - C.top + g.top) / E.y,
4287
+ bottom: (C.bottom - p.bottom + g.bottom) / E.y,
4288
+ left: (p.left - C.left + g.left) / E.x,
4289
+ right: (C.right - p.right + g.right) / E.x
4291
4290
  };
4292
4291
  }
4293
4292
  const Ri = (n) => ({
@@ -4301,7 +4300,7 @@ const Ri = (n) => ({
4301
4300
  rects: r,
4302
4301
  platform: o,
4303
4302
  elements: a,
4304
- middlewareData: h
4303
+ middlewareData: l
4305
4304
  } = t, {
4306
4305
  element: c,
4307
4306
  padding: f = 0
@@ -4311,10 +4310,10 @@ const Ri = (n) => ({
4311
4310
  const d = oe(f), x = {
4312
4311
  x: e,
4313
4312
  y: i
4314
- }, u = Mt(s), g = Lt(u), w = await o.getDimensions(c), p = u === "y", y = p ? "top" : "left", b = p ? "bottom" : "right", m = p ? "clientHeight" : "clientWidth", E = r.reference[g] + r.reference[u] - x[u] - r.floating[g], C = x[u] - r.reference[u], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
4315
- let T = R ? R[m] : 0;
4316
- (!T || !await (o.isElement == null ? void 0 : o.isElement(R))) && (T = a.floating[m] || r.floating[g]);
4317
- const A = E / 2 - C / 2, L = T / 2 - w[g] / 2 - 1, D = rt(d[y], L), B = rt(d[b], L), I = D, S = T - w[g] - B, O = T / 2 - w[g] / 2 + A, G = It(I, O, S), Y = !h.arrow && lt(s) != null && O !== G && r.reference[g] / 2 - (O < I ? D : B) - w[g] / 2 < 0, k = Y ? O < I ? O - I : O - S : 0;
4313
+ }, u = Mt(s), g = Lt(u), w = await o.getDimensions(c), y = u === "y", p = y ? "top" : "left", b = y ? "bottom" : "right", m = y ? "clientHeight" : "clientWidth", E = r.reference[g] + r.reference[u] - x[u] - r.floating[g], C = x[u] - r.reference[u], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
4314
+ let S = R ? R[m] : 0;
4315
+ (!S || !await (o.isElement == null ? void 0 : o.isElement(R))) && (S = a.floating[m] || r.floating[g]);
4316
+ const A = E / 2 - C / 2, L = S / 2 - w[g] / 2 - 1, D = rt(d[p], L), B = rt(d[b], L), I = D, T = S - w[g] - B, O = S / 2 - w[g] / 2 + A, G = It(I, O, T), Y = !l.arrow && ht(s) != null && O !== G && r.reference[g] / 2 - (O < I ? D : B) - w[g] / 2 < 0, k = Y ? O < I ? O - I : O - T : 0;
4318
4317
  return {
4319
4318
  [u]: x[u] + k,
4320
4319
  data: {
@@ -4338,7 +4337,7 @@ const Ri = (n) => ({
4338
4337
  middlewareData: r,
4339
4338
  rects: o,
4340
4339
  initialPlacement: a,
4341
- platform: h,
4340
+ platform: l,
4342
4341
  elements: c
4343
4342
  } = t, {
4344
4343
  mainAxis: f = !0,
@@ -4347,15 +4346,15 @@ const Ri = (n) => ({
4347
4346
  fallbackStrategy: u = "bestFit",
4348
4347
  fallbackAxisSideDirection: g = "none",
4349
4348
  flipAlignment: w = !0,
4350
- ...p
4349
+ ...y
4351
4350
  } = at(n, t);
4352
4351
  if ((e = r.arrow) != null && e.alignmentOffset)
4353
4352
  return {};
4354
- const y = q(s), b = J(a), m = q(a) === a, E = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), C = x || (m || !w ? [xt(a)] : mi(a)), R = g !== "none";
4353
+ const p = q(s), b = J(a), m = q(a) === a, E = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), C = x || (m || !w ? [xt(a)] : mi(a)), R = g !== "none";
4355
4354
  !x && R && C.push(...bi(a, w, g, E));
4356
- const T = [a, ...C], A = await ne(t, p), L = [];
4355
+ const S = [a, ...C], A = await ne(t, y), L = [];
4357
4356
  let D = ((i = r.flip) == null ? void 0 : i.overflows) || [];
4358
- if (f && L.push(A[y]), d) {
4357
+ if (f && L.push(A[p]), d) {
4359
4358
  const O = yi(s, o, E);
4360
4359
  L.push(A[O[0]], A[O[1]]);
4361
4360
  }
@@ -4364,7 +4363,7 @@ const Ri = (n) => ({
4364
4363
  overflows: L
4365
4364
  }], !L.every((O) => O <= 0)) {
4366
4365
  var B, I;
4367
- const O = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, G = T[O];
4366
+ const O = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, G = S[O];
4368
4367
  if (G)
4369
4368
  return {
4370
4369
  data: {
@@ -4379,8 +4378,8 @@ const Ri = (n) => ({
4379
4378
  if (!Y)
4380
4379
  switch (u) {
4381
4380
  case "bestFit": {
4382
- var S;
4383
- const k = (S = D.filter((W) => {
4381
+ var T;
4382
+ const k = (T = D.filter((W) => {
4384
4383
  if (R) {
4385
4384
  const P = J(W.placement);
4386
4385
  return P === b || // Create a bias to the `y` side axis due to horizontal
@@ -4388,7 +4387,7 @@ const Ri = (n) => ({
4388
4387
  P === "y";
4389
4388
  }
4390
4389
  return !0;
4391
- }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, ye) => P + ye, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : S[0];
4390
+ }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, ye) => P + ye, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : T[0];
4392
4391
  k && (Y = k);
4393
4392
  break;
4394
4393
  }
@@ -4412,7 +4411,7 @@ async function Ii(n, t) {
4412
4411
  placement: e,
4413
4412
  platform: i,
4414
4413
  elements: s
4415
- } = n, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = q(e), a = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, f = r && h ? -1 : 1, d = at(t, n);
4414
+ } = n, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = q(e), a = ht(e), l = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, f = r && l ? -1 : 1, d = at(t, n);
4416
4415
  let {
4417
4416
  mainAxis: x,
4418
4417
  crossAxis: u,
@@ -4426,7 +4425,7 @@ async function Ii(n, t) {
4426
4425
  crossAxis: d.crossAxis || 0,
4427
4426
  alignmentAxis: d.alignmentAxis
4428
4427
  };
4429
- return a && typeof g == "number" && (u = a === "end" ? g * -1 : g), h ? {
4428
+ return a && typeof g == "number" && (u = a === "end" ? g * -1 : g), l ? {
4430
4429
  x: u * f,
4431
4430
  y: x * c
4432
4431
  } : {
@@ -4445,18 +4444,18 @@ const Oi = function(n) {
4445
4444
  y: r,
4446
4445
  placement: o,
4447
4446
  middlewareData: a
4448
- } = t, h = await Ii(t, n);
4447
+ } = t, l = await Ii(t, n);
4449
4448
  return o === ((e = a.offset) == null ? void 0 : e.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
4450
- x: s + h.x,
4451
- y: r + h.y,
4449
+ x: s + l.x,
4450
+ y: r + l.y,
4452
4451
  data: {
4453
- ...h,
4452
+ ...l,
4454
4453
  placement: o
4455
4454
  }
4456
4455
  };
4457
4456
  }
4458
4457
  };
4459
- }, Ti = function(n) {
4458
+ }, Si = function(n) {
4460
4459
  return n === void 0 && (n = {}), {
4461
4460
  name: "shift",
4462
4461
  options: n,
@@ -4469,29 +4468,29 @@ const Oi = function(n) {
4469
4468
  mainAxis: r = !0,
4470
4469
  crossAxis: o = !1,
4471
4470
  limiter: a = {
4472
- fn: (p) => {
4471
+ fn: (y) => {
4473
4472
  let {
4474
- x: y,
4473
+ x: p,
4475
4474
  y: b
4476
- } = p;
4475
+ } = y;
4477
4476
  return {
4478
- x: y,
4477
+ x: p,
4479
4478
  y: b
4480
4479
  };
4481
4480
  }
4482
4481
  },
4483
- ...h
4482
+ ...l
4484
4483
  } = at(n, t), c = {
4485
4484
  x: e,
4486
4485
  y: i
4487
- }, f = await ne(t, h), d = J(q(s)), x = re(d);
4486
+ }, f = await ne(t, l), d = J(q(s)), x = re(d);
4488
4487
  let u = c[x], g = c[d];
4489
4488
  if (r) {
4490
- const p = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", b = u + f[p], m = u - f[y];
4489
+ const y = x === "y" ? "top" : "left", p = x === "y" ? "bottom" : "right", b = u + f[y], m = u - f[p];
4491
4490
  u = It(b, u, m);
4492
4491
  }
4493
4492
  if (o) {
4494
- const p = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", b = g + f[p], m = g - f[y];
4493
+ const y = d === "y" ? "top" : "left", p = d === "y" ? "bottom" : "right", b = g + f[y], m = g - f[p];
4495
4494
  g = It(b, g, m);
4496
4495
  }
4497
4496
  const w = a.fn({
@@ -4539,7 +4538,7 @@ function N(n) {
4539
4538
  function zt(n) {
4540
4539
  return !gt() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof H(n).ShadowRoot;
4541
4540
  }
4542
- function ht(n) {
4541
+ function lt(n) {
4543
4542
  const {
4544
4543
  overflow: t,
4545
4544
  overflowX: e,
@@ -4548,7 +4547,7 @@ function ht(n) {
4548
4547
  } = F(n);
4549
4548
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
4550
4549
  }
4551
- function Si(n) {
4550
+ function Ti(n) {
4552
4551
  return ["table", "td", "th"].includes(tt(n));
4553
4552
  }
4554
4553
  function wt(n) {
@@ -4605,24 +4604,24 @@ function z(n) {
4605
4604
  );
4606
4605
  return zt(t) ? t.host : t;
4607
4606
  }
4608
- function le(n) {
4607
+ function he(n) {
4609
4608
  const t = z(n);
4610
- return Q(t) ? n.ownerDocument ? n.ownerDocument.body : n.body : N(t) && ht(t) ? t : le(t);
4609
+ return Q(t) ? n.ownerDocument ? n.ownerDocument.body : n.body : N(t) && lt(t) ? t : he(t);
4611
4610
  }
4612
- function Tt(n, t, e) {
4611
+ function St(n, t, e) {
4613
4612
  var i;
4614
4613
  t === void 0 && (t = []), e === void 0 && (e = !0);
4615
- const s = le(n), r = s === ((i = n.ownerDocument) == null ? void 0 : i.body), o = H(s);
4614
+ const s = he(n), r = s === ((i = n.ownerDocument) == null ? void 0 : i.body), o = H(s);
4616
4615
  if (r) {
4617
- const a = St(o);
4618
- return t.concat(o, o.visualViewport || [], ht(s) ? s : [], a && e ? Tt(a) : []);
4616
+ const a = Tt(o);
4617
+ return t.concat(o, o.visualViewport || [], lt(s) ? s : [], a && e ? St(a) : []);
4619
4618
  }
4620
- return t.concat(s, Tt(s, [], e));
4619
+ return t.concat(s, St(s, [], e));
4621
4620
  }
4622
- function St(n) {
4621
+ function Tt(n) {
4623
4622
  return n.parent && Object.getPrototypeOf(n.parent) ? n.frameElement : null;
4624
4623
  }
4625
- function he(n) {
4624
+ function le(n) {
4626
4625
  const t = F(n);
4627
4626
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
4628
4627
  const s = N(n), r = s ? n.offsetWidth : e, o = s ? n.offsetHeight : i, a = ft(e) !== r || ft(i) !== o;
@@ -4643,7 +4642,7 @@ function Z(n) {
4643
4642
  width: i,
4644
4643
  height: s,
4645
4644
  $: r
4646
- } = he(t);
4645
+ } = le(t);
4647
4646
  let o = (r ? ft(e.width) : e.width) / i, a = (r ? ft(e.height) : e.height) / s;
4648
4647
  return (!o || !Number.isFinite(o)) && (o = 1), (!a || !Number.isFinite(a)) && (a = 1), {
4649
4648
  x: o,
@@ -4667,19 +4666,19 @@ function ot(n, t, e, i) {
4667
4666
  let o = V(1);
4668
4667
  t && (i ? X(i) && (o = Z(i)) : o = Z(n));
4669
4668
  const a = Mi(r, e, i) ? de(r) : V(0);
4670
- let h = (s.left + a.x) / o.x, c = (s.top + a.y) / o.y, f = s.width / o.x, d = s.height / o.y;
4669
+ let l = (s.left + a.x) / o.x, c = (s.top + a.y) / o.y, f = s.width / o.x, d = s.height / o.y;
4671
4670
  if (r) {
4672
4671
  const x = H(r), u = i && X(i) ? H(i) : i;
4673
- let g = x, w = St(g);
4672
+ let g = x, w = Tt(g);
4674
4673
  for (; w && i && u !== g; ) {
4675
- const p = Z(w), y = w.getBoundingClientRect(), b = F(w), m = y.left + (w.clientLeft + parseFloat(b.paddingLeft)) * p.x, E = y.top + (w.clientTop + parseFloat(b.paddingTop)) * p.y;
4676
- h *= p.x, c *= p.y, f *= p.x, d *= p.y, h += m, c += E, g = H(w), w = St(g);
4674
+ const y = Z(w), p = w.getBoundingClientRect(), b = F(w), m = p.left + (w.clientLeft + parseFloat(b.paddingLeft)) * y.x, E = p.top + (w.clientTop + parseFloat(b.paddingTop)) * y.y;
4675
+ l *= y.x, c *= y.y, f *= y.x, d *= y.y, l += m, c += E, g = H(w), w = Tt(g);
4677
4676
  }
4678
4677
  }
4679
4678
  return ut({
4680
4679
  width: f,
4681
4680
  height: d,
4682
- x: h,
4681
+ x: l,
4683
4682
  y: c
4684
4683
  });
4685
4684
  }
@@ -4693,20 +4692,20 @@ function Hi(n) {
4693
4692
  const r = s === "fixed", o = K(i), a = t ? wt(t.floating) : !1;
4694
4693
  if (i === o || a && r)
4695
4694
  return e;
4696
- let h = {
4695
+ let l = {
4697
4696
  scrollLeft: 0,
4698
4697
  scrollTop: 0
4699
4698
  }, c = V(1);
4700
4699
  const f = V(0), d = N(i);
4701
- if ((d || !d && !r) && ((tt(i) !== "body" || ht(o)) && (h = pt(i)), N(i))) {
4700
+ if ((d || !d && !r) && ((tt(i) !== "body" || lt(o)) && (l = pt(i)), N(i))) {
4702
4701
  const x = ot(i);
4703
4702
  c = Z(i), f.x = x.x + i.clientLeft, f.y = x.y + i.clientTop;
4704
4703
  }
4705
4704
  return {
4706
4705
  width: e.width * c.x,
4707
4706
  height: e.height * c.y,
4708
- x: e.x * c.x - h.scrollLeft * c.x + f.x,
4709
- y: e.y * c.y - h.scrollTop * c.y + f.y
4707
+ x: e.x * c.x - l.scrollLeft * c.x + f.x,
4708
+ y: e.y * c.y - l.scrollTop * c.y + f.y
4710
4709
  };
4711
4710
  }
4712
4711
  function Di(n) {
@@ -4729,25 +4728,25 @@ function Xi(n) {
4729
4728
  }
4730
4729
  function Fi(n, t) {
4731
4730
  const e = H(n), i = K(n), s = e.visualViewport;
4732
- let r = i.clientWidth, o = i.clientHeight, a = 0, h = 0;
4731
+ let r = i.clientWidth, o = i.clientHeight, a = 0, l = 0;
4733
4732
  if (s) {
4734
4733
  r = s.width, o = s.height;
4735
4734
  const c = Dt();
4736
- (!c || c && t === "fixed") && (a = s.offsetLeft, h = s.offsetTop);
4735
+ (!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
4737
4736
  }
4738
4737
  return {
4739
4738
  width: r,
4740
4739
  height: o,
4741
4740
  x: a,
4742
- y: h
4741
+ y: l
4743
4742
  };
4744
4743
  }
4745
4744
  function ki(n, t) {
4746
- const e = ot(n, !0, t === "fixed"), i = e.top + n.clientTop, s = e.left + n.clientLeft, r = N(n) ? Z(n) : V(1), o = n.clientWidth * r.x, a = n.clientHeight * r.y, h = s * r.x, c = i * r.y;
4745
+ const e = ot(n, !0, t === "fixed"), i = e.top + n.clientTop, s = e.left + n.clientLeft, r = N(n) ? Z(n) : V(1), o = n.clientWidth * r.x, a = n.clientHeight * r.y, l = s * r.x, c = i * r.y;
4747
4746
  return {
4748
4747
  width: o,
4749
4748
  height: a,
4750
- x: h,
4749
+ x: l,
4751
4750
  y: c
4752
4751
  };
4753
4752
  }
@@ -4777,12 +4776,12 @@ function Ni(n, t) {
4777
4776
  const e = t.get(n);
4778
4777
  if (e)
4779
4778
  return e;
4780
- let i = Tt(n, [], !1).filter((a) => X(a) && tt(a) !== "body"), s = null;
4779
+ let i = St(n, [], !1).filter((a) => X(a) && tt(a) !== "body"), s = null;
4781
4780
  const r = F(n).position === "fixed";
4782
4781
  let o = r ? z(n) : n;
4783
4782
  for (; X(o) && !Q(o); ) {
4784
- const a = F(o), h = Ht(o);
4785
- !h && a.position === "fixed" && (s = null), (r ? !h && !s : !h && a.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && fe(n, o)) ? i = i.filter((f) => f !== o) : s = a, o = z(o);
4783
+ const a = F(o), l = Ht(o);
4784
+ !l && a.position === "fixed" && (s = null), (r ? !l && !s : !l && a.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || lt(o) && !l && fe(n, o)) ? i = i.filter((f) => f !== o) : s = a, o = z(o);
4786
4785
  }
4787
4786
  return t.set(n, i), i;
4788
4787
  }
@@ -4793,22 +4792,22 @@ function Yi(n) {
4793
4792
  rootBoundary: i,
4794
4793
  strategy: s
4795
4794
  } = n;
4796
- const o = [...e === "clippingAncestors" ? wt(t) ? [] : Ni(t, this._c) : [].concat(e), i], a = o[0], h = o.reduce((c, f) => {
4795
+ const o = [...e === "clippingAncestors" ? wt(t) ? [] : Ni(t, this._c) : [].concat(e), i], a = o[0], l = o.reduce((c, f) => {
4797
4796
  const d = $t(t, f, s);
4798
4797
  return c.top = U(d.top, c.top), c.right = rt(d.right, c.right), c.bottom = rt(d.bottom, c.bottom), c.left = U(d.left, c.left), c;
4799
4798
  }, $t(t, a, s));
4800
4799
  return {
4801
- width: h.right - h.left,
4802
- height: h.bottom - h.top,
4803
- x: h.left,
4804
- y: h.top
4800
+ width: l.right - l.left,
4801
+ height: l.bottom - l.top,
4802
+ x: l.left,
4803
+ y: l.top
4805
4804
  };
4806
4805
  }
4807
4806
  function Ki(n) {
4808
4807
  const {
4809
4808
  width: t,
4810
4809
  height: e
4811
- } = he(n);
4810
+ } = le(n);
4812
4811
  return {
4813
4812
  width: t,
4814
4813
  height: e
@@ -4820,19 +4819,19 @@ function Bi(n, t, e) {
4820
4819
  scrollLeft: 0,
4821
4820
  scrollTop: 0
4822
4821
  };
4823
- const h = V(0);
4822
+ const l = V(0);
4824
4823
  if (i || !i && !r)
4825
- if ((tt(t) !== "body" || ht(s)) && (a = pt(t)), i) {
4824
+ if ((tt(t) !== "body" || lt(s)) && (a = pt(t)), i) {
4826
4825
  const u = ot(t, !0, r, t);
4827
- h.x = u.x + t.clientLeft, h.y = u.y + t.clientTop;
4828
- } else s && (h.x = At(s));
4826
+ l.x = u.x + t.clientLeft, l.y = u.y + t.clientTop;
4827
+ } else s && (l.x = At(s));
4829
4828
  let c = 0, f = 0;
4830
4829
  if (s && !i && !r) {
4831
4830
  const u = s.getBoundingClientRect();
4832
4831
  f = u.top + a.scrollTop, c = u.left + a.scrollLeft - // RTL <body> scrollbar.
4833
4832
  At(s, u);
4834
4833
  }
4835
- const d = o.left + a.scrollLeft - h.x - c, x = o.top + a.scrollTop - h.y - f;
4834
+ const d = o.left + a.scrollLeft - l.x - c, x = o.top + a.scrollTop - l.y - f;
4836
4835
  return {
4837
4836
  x: d,
4838
4837
  y: x,
@@ -4865,7 +4864,7 @@ function xe(n, t) {
4865
4864
  return e;
4866
4865
  }
4867
4866
  let i = qt(n, t);
4868
- for (; i && Si(i) && mt(i); )
4867
+ for (; i && Ti(i) && mt(i); )
4869
4868
  i = qt(i, t);
4870
4869
  return i && Q(i) && mt(i) && !Ht(i) ? e : i || Ai(n) || e;
4871
4870
  }
@@ -4895,7 +4894,7 @@ const Vi = {
4895
4894
  getScale: Z,
4896
4895
  isElement: X,
4897
4896
  isRTL: Pi
4898
- }, ue = Oi, ge = Ti, we = _i, zi = Ri, pe = (n, t, e) => {
4897
+ }, ue = Oi, ge = Si, we = _i, zi = Ri, pe = (n, t, e) => {
4899
4898
  const i = /* @__PURE__ */ new Map(), s = {
4900
4899
  platform: Vi,
4901
4900
  ...e
@@ -4910,11 +4909,11 @@ const Vi = {
4910
4909
  };
4911
4910
  let $i = class {
4912
4911
  constructor(t) {
4913
- l(this, "ctx");
4914
- l(this, "enable", !1);
4915
- l(this, "contentEl");
4916
- l(this, "floatingEl");
4917
- l(this, "arrowEl");
4912
+ h(this, "ctx");
4913
+ h(this, "enable", !1);
4914
+ h(this, "contentEl");
4915
+ h(this, "floatingEl");
4916
+ h(this, "arrowEl");
4918
4917
  this.ctx = t;
4919
4918
  const { TOOLTIP_BG_COLOR: e, TOOLTIP_TEXT_COLOR: i, TOOLTIP_ZINDEX: s, TOOLTIP_CUSTOM_STYLE: r, CSS_PREFIX: o } = this.ctx.config;
4920
4919
  this.contentEl = document.createElement("div"), this.arrowEl = document.createElement("div"), this.floatingEl = document.createElement("div"), this.floatingEl.className = `${o}-tooltip`, this.contentEl.className = `${o}-tooltip-content`, this.arrowEl.className = `${o}-tooltip-arrow`;
@@ -4929,7 +4928,7 @@ let $i = class {
4929
4928
  borderRadius: "4px",
4930
4929
  fontSize: "12px",
4931
4930
  ...r
4932
- }, h = {
4931
+ }, l = {
4933
4932
  position: "absolute",
4934
4933
  width: "10px",
4935
4934
  height: "10px",
@@ -4938,7 +4937,7 @@ let $i = class {
4938
4937
  transform: "rotate(45deg)",
4939
4938
  zIndex: a.zIndex
4940
4939
  };
4941
- Object.assign(this.arrowEl.style, h), Object.assign(this.floatingEl.style, a), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
4940
+ Object.assign(this.arrowEl.style, l), Object.assign(this.floatingEl.style, a), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
4942
4941
  }
4943
4942
  init() {
4944
4943
  this.ctx.on("mousemove", (t) => {
@@ -4982,10 +4981,10 @@ let $i = class {
4982
4981
  placement: t.overflowTooltipPlacement,
4983
4982
  middleware: [ge(), we(), ue(6), zi({ element: this.arrowEl })]
4984
4983
  }).then((a) => {
4985
- const { x: h, y: c, placement: f, middlewareData: d } = a;
4984
+ const { x: l, y: c, placement: f, middlewareData: d } = a;
4986
4985
  if (Object.assign(this.floatingEl.style, {
4987
4986
  top: `${c}px`,
4988
- left: `${h}px`
4987
+ left: `${l}px`
4989
4988
  }), d.arrow) {
4990
4989
  const x = d.arrow;
4991
4990
  ["left", "left-start", "left-end"].includes(f) ? Object.assign(this.arrowEl.style, {
@@ -5021,13 +5020,13 @@ let $i = class {
5021
5020
  };
5022
5021
  class qi {
5023
5022
  constructor(t) {
5024
- l(this, "editorEl");
5025
- l(this, "inputEl");
5026
- l(this, "enable", !1);
5027
- l(this, "cellTarget", null);
5028
- l(this, "ctx");
5029
- l(this, "drawY", 0);
5030
- l(this, "drawX", 0);
5023
+ h(this, "editorEl");
5024
+ h(this, "inputEl");
5025
+ h(this, "enable", !1);
5026
+ h(this, "cellTarget", null);
5027
+ h(this, "ctx");
5028
+ h(this, "drawY", 0);
5029
+ h(this, "drawX", 0);
5031
5030
  this.ctx = t, this.initTextEditor(), this.init();
5032
5031
  }
5033
5032
  init() {
@@ -5074,6 +5073,8 @@ class qi {
5074
5073
  }), this.ctx.on("cellClick", (t) => {
5075
5074
  var e, i;
5076
5075
  t.rowKey === ((e = this.cellTarget) == null ? void 0 : e.rowKey) && t.key === ((i = this.cellTarget) == null ? void 0 : i.key) ? this.startEdit() : (this.doneEdit(), this.cellTarget = t, this.ctx.config.ENABLE_EDIT_SINGLE_CLICK && this.startEdit());
5076
+ }), this.ctx.on("adjustBoundaryPosition", (t) => {
5077
+ this.cellTarget = t;
5077
5078
  });
5078
5079
  }
5079
5080
  initTextEditor() {
@@ -5103,7 +5104,7 @@ class qi {
5103
5104
  header: r,
5104
5105
  config: { SCROLLER_TRACK_SIZE: o }
5105
5106
  } = this.ctx, a = i - s.height - o;
5106
- this.editorEl.style.bottom = "auto", (this.drawY + t > a || this.drawY < r.height) && (this.editorEl.style.left = `${this.drawX}px`, this.editorEl.style.top = "auto", this.editorEl.style.bottom = `${i - a}px`), this.inputEl.style.height = `${t}px`;
5107
+ this.editorEl.style.bottom = "auto", (this.drawY + t > a || this.drawY < r.height) && (this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = "auto", this.editorEl.style.bottom = `${i - a}px`), this.inputEl.style.height = `${t}px`;
5107
5108
  }
5108
5109
  startEditByInput(t) {
5109
5110
  const e = t.getValue(), { width: i, editorType: s } = t, r = t.getDrawX();
@@ -5111,12 +5112,12 @@ class qi {
5111
5112
  this.drawX = r, this.drawY = o;
5112
5113
  let { height: a } = t;
5113
5114
  const {
5114
- config: { CELL_PADDING: h },
5115
+ config: { CELL_PADDING: l },
5115
5116
  header: c
5116
5117
  } = this.ctx;
5117
5118
  let f = this.ctx.body.visibleHeight;
5118
- if (a > f && (a = f), this.editorEl.style.left = `${r}px`, this.editorEl.style.top = `${o}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text") {
5119
- this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${i - 1}px`, this.inputEl.style.minHeight = `${a - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${i - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${h}px`, e !== null && (this.inputEl.value = e), this.inputEl.focus();
5119
+ if (a > f && (a = f), this.editorEl.style.left = `${r - 1}px`, this.editorEl.style.top = `${o - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text") {
5120
+ this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${i - 1}px`, this.inputEl.style.minHeight = `${a - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${i - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${l}px`, e !== null && (this.inputEl.value = e), this.inputEl.focus();
5120
5121
  const d = this.inputEl.value.length;
5121
5122
  this.inputEl.setSelectionRange(d, d);
5122
5123
  } else
@@ -5150,11 +5151,11 @@ class qi {
5150
5151
  const r = this.ctx.focusCell;
5151
5152
  if (!r || ["index", "index-selection", "selection"].includes(r.type) || this.enable)
5152
5153
  return;
5153
- const { rowKey: o, key: a } = r, h = this.ctx.database.getReadonly(o, a);
5154
- r && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5154
+ const { rowKey: o, key: a } = r, l = this.ctx.database.getReadonly(o, a);
5155
+ r && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5155
5156
  }
5156
5157
  doneEdit() {
5157
- this.enable && this.cellTarget && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.stageElement.focus(), this.ctx.editing = !1, this.cellTarget = null, this.ctx.emit("draw"));
5158
+ this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.stageElement.focus(), this.ctx.editing = !1, this.ctx.emit("draw"));
5158
5159
  }
5159
5160
  destroy() {
5160
5161
  var t;
@@ -5163,14 +5164,14 @@ class qi {
5163
5164
  }
5164
5165
  class Gi {
5165
5166
  constructor(t) {
5166
- l(this, "ctx");
5167
- l(this, "emptyEl");
5167
+ h(this, "ctx");
5168
+ h(this, "emptyEl");
5168
5169
  this.ctx = t;
5169
5170
  const { EMPTY_TEXT: e, EMPTY_CUSTOM: i, EMPTY_CUSTOM_STYLE: s, CSS_PREFIX: r } = this.ctx.config;
5170
- this.emptyEl = document.createElement("div"), this.emptyEl.className = `${r}-empty`, this.emptyEl.style.display = "none", this.emptyEl.innerText = e, this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: o, headerHeight: a, bodyHeight: h, footerHeight: c }) => {
5171
+ this.emptyEl = document.createElement("div"), this.emptyEl.className = `${r}-empty`, this.emptyEl.style.display = "none", this.emptyEl.innerText = e, this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: o, headerHeight: a, bodyHeight: l, footerHeight: c }) => {
5171
5172
  if (i)
5172
5173
  return;
5173
- const f = a + (h + c) / 2, d = {
5174
+ const f = a + (l + c) / 2, d = {
5174
5175
  display: o === "empty" ? "block" : "none",
5175
5176
  position: "absolute",
5176
5177
  fontSize: "14px",
@@ -5189,7 +5190,7 @@ class Gi {
5189
5190
  }
5190
5191
  class ji {
5191
5192
  constructor(t) {
5192
- l(this, "ctx");
5193
+ h(this, "ctx");
5193
5194
  this.ctx = t;
5194
5195
  }
5195
5196
  draw() {
@@ -5216,9 +5217,9 @@ class ji {
5216
5217
  fixedRightWidth: e,
5217
5218
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
5218
5219
  } = this.ctx, { visibleWidth: r, visibleHeight: o, renderCellHeaders: a } = this.ctx.header;
5219
- let h = [], c = [], f = [];
5220
- a.forEach((p) => {
5221
- p.render && (p.fixed === "left" ? c.push(p) : p.fixed === "right" ? f.push(p) : h.push(p));
5220
+ let l = [], c = [], f = [];
5221
+ a.forEach((y) => {
5222
+ y.render && (y.fixed === "left" ? c.push(y) : y.fixed === "right" ? f.push(y) : l.push(y));
5222
5223
  });
5223
5224
  const d = e - i, x = {
5224
5225
  key: "left",
@@ -5241,7 +5242,7 @@ class ji {
5241
5242
  width: `${r - t - d + 1}px`,
5242
5243
  height: `${o}px`
5243
5244
  },
5244
- cells: h
5245
+ cells: l
5245
5246
  }, g = {
5246
5247
  key: "right",
5247
5248
  style: {
@@ -5269,15 +5270,15 @@ class ji {
5269
5270
  getBody() {
5270
5271
  const t = [], e = [], i = [];
5271
5272
  let s = this.ctx.body.renderRows;
5272
- this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((p) => {
5273
- p.cells.forEach((y) => {
5274
- y.cellType === "footer" && (y.render = y.renderFooter), y.render && (y.fixed === "left" ? e.push(y) : y.fixed === "right" ? i.push(y) : t.push(y));
5273
+ this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((y) => {
5274
+ y.cells.forEach((p) => {
5275
+ p.cellType === "footer" && (p.render = p.renderFooter), p.render && (p.fixed === "left" ? e.push(p) : p.fixed === "right" ? i.push(p) : t.push(p));
5275
5276
  });
5276
5277
  });
5277
5278
  const {
5278
5279
  fixedLeftWidth: r,
5279
5280
  fixedRightWidth: o,
5280
- config: { SCROLLER_TRACK_SIZE: a, CSS_PREFIX: h }
5281
+ config: { SCROLLER_TRACK_SIZE: a, CSS_PREFIX: l }
5281
5282
  } = this.ctx, { visibleWidth: c, visibleHeight: f } = this.ctx.body, d = o - a, x = {
5282
5283
  key: "left",
5283
5284
  style: {
@@ -5314,7 +5315,7 @@ class ji {
5314
5315
  };
5315
5316
  return {
5316
5317
  type: "body",
5317
- class: `${h}-overlayer-body`,
5318
+ class: `${l}-overlayer-body`,
5318
5319
  style: {
5319
5320
  position: "relative",
5320
5321
  overflow: "hidden",
@@ -5327,15 +5328,15 @@ class ji {
5327
5328
  getFooter() {
5328
5329
  const t = [], e = [], i = [];
5329
5330
  this.ctx.footer.renderRows.forEach((w) => {
5330
- w.cells.forEach((p) => {
5331
- p.cellType === "footer" && p.renderFooter && (p.render = p.renderFooter, p.fixed === "left" ? e.push(p) : p.fixed === "right" ? i.push(p) : t.push(p));
5331
+ w.cells.forEach((y) => {
5332
+ y.cellType === "footer" && y.renderFooter && (y.render = y.renderFooter, y.fixed === "left" ? e.push(y) : y.fixed === "right" ? i.push(y) : t.push(y));
5332
5333
  });
5333
5334
  });
5334
5335
  const {
5335
5336
  fixedLeftWidth: s,
5336
5337
  fixedRightWidth: r,
5337
5338
  config: { SCROLLER_TRACK_SIZE: o, CSS_PREFIX: a }
5338
- } = this.ctx, { visibleWidth: h, visibleHeight: c } = this.ctx.footer, f = r - o, d = {
5339
+ } = this.ctx, { visibleWidth: l, visibleHeight: c } = this.ctx.footer, f = r - o, d = {
5339
5340
  key: "left",
5340
5341
  style: {
5341
5342
  position: "absolute",
@@ -5353,7 +5354,7 @@ class ji {
5353
5354
  top: `${0.5}px`,
5354
5355
  left: `${s - 0.5}px`,
5355
5356
  overflow: "hidden",
5356
- width: `${h - s - f}px`,
5357
+ width: `${l - s - f}px`,
5357
5358
  height: `${c}px`
5358
5359
  },
5359
5360
  cells: t
@@ -5375,7 +5376,7 @@ class ji {
5375
5376
  style: {
5376
5377
  position: "relative",
5377
5378
  overflow: "hidden",
5378
- width: `${h}px`,
5379
+ width: `${l}px`,
5379
5380
  height: `${c}px`
5380
5381
  },
5381
5382
  views: [d, x, u]
@@ -5384,16 +5385,16 @@ class ji {
5384
5385
  }
5385
5386
  class Ui {
5386
5387
  constructor(t) {
5387
- l(this, "ctx");
5388
- l(this, "contextMenuEl");
5388
+ h(this, "ctx");
5389
+ h(this, "contextMenuEl");
5389
5390
  this.ctx = t, this.contextMenuEl = document.createElement("div"), this.createContextMenu(), this.init();
5390
5391
  }
5391
5392
  init() {
5392
5393
  this.ctx.on("cellContextMenuClick", (t, e) => {
5393
5394
  if (!this.ctx.config.ENABLE_CONTEXT_MENU) return;
5394
5395
  e.preventDefault();
5395
- const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [a, h] = s, { rowIndex: c, colIndex: f } = t;
5396
- c >= a && c <= h && f >= r && f <= o || this.ctx.emit("setSelectorCell", t, e);
5396
+ const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [a, l] = s, { rowIndex: c, colIndex: f } = t;
5397
+ c >= a && c <= l && f >= r && f <= o || this.ctx.emit("setSelectorCell", t, e);
5397
5398
  const x = {
5398
5399
  getBoundingClientRect: () => ({
5399
5400
  width: 0,
@@ -5467,22 +5468,22 @@ class Ui {
5467
5468
  }
5468
5469
  class Qi {
5469
5470
  constructor(t, e) {
5470
- l(this, "options");
5471
- l(this, "scroller");
5472
- l(this, "header");
5473
- l(this, "body");
5474
- l(this, "footer");
5475
- l(this, "selector");
5476
- l(this, "autofill");
5477
- l(this, "tooltip");
5478
- l(this, "editor");
5479
- l(this, "empty");
5480
- l(this, "overlayer");
5481
- l(this, "contextMenu");
5482
- l(this, "ctx");
5471
+ h(this, "options");
5472
+ h(this, "scroller");
5473
+ h(this, "header");
5474
+ h(this, "body");
5475
+ h(this, "footer");
5476
+ h(this, "selector");
5477
+ h(this, "autofill");
5478
+ h(this, "tooltip");
5479
+ h(this, "editor");
5480
+ h(this, "empty");
5481
+ h(this, "overlayer");
5482
+ h(this, "contextMenu");
5483
+ h(this, "ctx");
5483
5484
  this.options = e;
5484
5485
  const { overlayerElement: i, editorElement: s } = e, r = this.createContainer(t, i, s);
5485
- this.ctx = new hi(r, this.options), this.header = new di(this.ctx), this.body = new fi(this.ctx), this.footer = new xi(this.ctx), this.scroller = new ci(this.ctx), this.selector = new ui(this.ctx), this.autofill = new gi(this.ctx), this.tooltip = new $i(this.ctx), this.empty = new Gi(this.ctx), this.editor = new qi(this.ctx), this.overlayer = new ji(this.ctx), this.contextMenu = new Ui(this.ctx), this.ctx.on("draw", () => {
5486
+ this.ctx = new li(r, this.options), this.header = new di(this.ctx), this.body = new fi(this.ctx), this.footer = new xi(this.ctx), this.scroller = new ci(this.ctx), this.selector = new ui(this.ctx), this.autofill = new gi(this.ctx), this.tooltip = new $i(this.ctx), this.empty = new Gi(this.ctx), this.editor = new qi(this.ctx), this.overlayer = new ji(this.ctx), this.contextMenu = new Ui(this.ctx), this.ctx.on("draw", () => {
5486
5487
  this.draw();
5487
5488
  }), this.ctx.on("drawView", () => {
5488
5489
  this.draw(!0);
@@ -5563,8 +5564,8 @@ class Qi {
5563
5564
  if (t && Array.isArray(s) && s.length) {
5564
5565
  const [r] = s;
5565
5566
  if (Array.isArray(r) && r.length) {
5566
- const [o] = r, { rowKey: a, key: h } = o;
5567
- this.scrollToRowkey(a), this.scrollToColkey(h);
5567
+ const [o] = r, { rowKey: a, key: l } = o;
5568
+ this.scrollToRowkey(a), this.scrollToColkey(l);
5568
5569
  }
5569
5570
  }
5570
5571
  i(s);
@@ -5589,7 +5590,7 @@ class Qi {
5589
5590
  let r = [];
5590
5591
  for (let o = 0; o < i.length; o++)
5591
5592
  for (let a = 0; a < s.length; a++) {
5592
- const h = this.ctx.database.getRowKeyByItem(i[o]), f = s[a].key, d = await this.ctx.database.getValidator(h, f);
5593
+ const l = this.ctx.database.getRowKeyByItem(i[o]), f = s[a].key, d = await this.ctx.database.getValidator(l, f);
5593
5594
  Array.isArray(d) && d.length && r.push(d);
5594
5595
  }
5595
5596
  r.length ? (e(r), this.ctx.emit("draw")) : (t([]), this.ctx.emit("draw"));