e-virt-table 1.2.11 → 1.2.13

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,29 +1,29 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: transparent;--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-line-color: #e1e6eb}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-readonly-text-color: #cfd3dc;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.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(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.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(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-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(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  var be = Object.defineProperty;
3
- var ve = (l, t, e) => t in l ? be(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
4
- var a = (l, t, e) => ve(l, typeof t != "symbol" ? t + "" : t, e);
3
+ var ve = (h, t, e) => t in h ? be(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
4
+ var a = (h, t, e) => ve(h, typeof t != "symbol" ? t + "" : t, e);
5
5
  function q() {
6
- return q = Object.assign ? Object.assign.bind() : function(l) {
6
+ return q = Object.assign ? Object.assign.bind() : function(h) {
7
7
  for (var t = 1; t < arguments.length; t++) {
8
8
  var e = arguments[t];
9
9
  for (var i in e)
10
- Object.prototype.hasOwnProperty.call(e, i) && (l[i] = e[i]);
10
+ Object.prototype.hasOwnProperty.call(e, i) && (h[i] = e[i]);
11
11
  }
12
- return l;
12
+ return h;
13
13
  }, q.apply(this, arguments);
14
14
  }
15
- function Re(l, t) {
16
- l.prototype = Object.create(t.prototype), l.prototype.constructor = l, st(l, t);
15
+ function Re(h, t) {
16
+ h.prototype = Object.create(t.prototype), h.prototype.constructor = h, st(h, t);
17
17
  }
18
- function Et(l) {
18
+ function Et(h) {
19
19
  return Et = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
20
20
  return e.__proto__ || Object.getPrototypeOf(e);
21
- }, Et(l);
21
+ }, Et(h);
22
22
  }
23
- function st(l, t) {
23
+ function st(h, t) {
24
24
  return st = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
25
25
  return i.__proto__ = s, i;
26
- }, st(l, t);
26
+ }, st(h, t);
27
27
  }
28
28
  function _e() {
29
29
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
@@ -35,18 +35,18 @@ function _e() {
35
35
  return !1;
36
36
  }
37
37
  }
38
- function dt(l, t, e) {
38
+ function dt(h, t, e) {
39
39
  return _e() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
40
40
  var n = [null];
41
41
  n.push.apply(n, r);
42
- var h = Function.bind.apply(s, n), c = new h();
42
+ var l = Function.bind.apply(s, n), c = new l();
43
43
  return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
46
- function Ie(l) {
47
- return Function.toString.call(l).indexOf("[native code]") !== -1;
46
+ function Ie(h) {
47
+ return Function.toString.call(h).indexOf("[native code]") !== -1;
48
48
  }
49
- function Ct(l) {
49
+ function Ct(h) {
50
50
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
51
51
  return Ct = function(i) {
52
52
  if (i === null || !Ie(i)) return i;
@@ -67,7 +67,7 @@ function Ct(l) {
67
67
  configurable: !0
68
68
  }
69
69
  }), st(s, i);
70
- }, Ct(l);
70
+ }, Ct(h);
71
71
  }
72
72
  var Oe = /%[sdj%]/g, Ut = function() {
73
73
  };
@@ -76,22 +76,22 @@ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" &&
76
76
  return typeof i == "string";
77
77
  }) && console.warn(t, e);
78
78
  });
79
- function bt(l) {
80
- if (!l || !l.length) return null;
79
+ function bt(h) {
80
+ if (!h || !h.length) return null;
81
81
  var t = {};
82
- return l.forEach(function(e) {
82
+ return h.forEach(function(e) {
83
83
  var i = e.field;
84
84
  t[i] = t[i] || [], t[i].push(e);
85
85
  }), t;
86
86
  }
87
- function D(l) {
87
+ function D(h) {
88
88
  for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
89
89
  e[i - 1] = arguments[i];
90
90
  var s = 0, r = e.length;
91
- if (typeof l == "function")
92
- return l.apply(null, e);
93
- if (typeof l == "string") {
94
- var o = l.replace(Oe, function(n) {
91
+ if (typeof h == "function")
92
+ return h.apply(null, e);
93
+ if (typeof h == "string") {
94
+ var o = h.replace(Oe, function(n) {
95
95
  if (n === "%%")
96
96
  return "%";
97
97
  if (s >= r)
@@ -114,68 +114,68 @@ function D(l) {
114
114
  });
115
115
  return o;
116
116
  }
117
- return l;
117
+ return h;
118
118
  }
119
- function Le(l) {
120
- return l === "string" || l === "url" || l === "hex" || l === "email" || l === "date" || l === "pattern";
119
+ function Le(h) {
120
+ return h === "string" || h === "url" || h === "hex" || h === "email" || h === "date" || h === "pattern";
121
121
  }
122
- function H(l, t) {
123
- return !!(l == null || t === "array" && Array.isArray(l) && !l.length || Le(t) && typeof l == "string" && !l);
122
+ function H(h, t) {
123
+ return !!(h == null || t === "array" && Array.isArray(h) && !h.length || Le(t) && typeof h == "string" && !h);
124
124
  }
125
- function Se(l, t, e) {
126
- var i = [], s = 0, r = l.length;
125
+ function Se(h, t, e) {
126
+ var i = [], s = 0, r = h.length;
127
127
  function o(n) {
128
128
  i.push.apply(i, n || []), s++, s === r && e(i);
129
129
  }
130
- l.forEach(function(n) {
130
+ h.forEach(function(n) {
131
131
  t(n, o);
132
132
  });
133
133
  }
134
- function Bt(l, t, e) {
135
- var i = 0, s = l.length;
134
+ function Bt(h, t, e) {
135
+ var i = 0, s = h.length;
136
136
  function r(o) {
137
137
  if (o && o.length) {
138
138
  e(o);
139
139
  return;
140
140
  }
141
141
  var n = i;
142
- i = i + 1, n < s ? t(l[n], r) : e([]);
142
+ i = i + 1, n < s ? t(h[n], r) : e([]);
143
143
  }
144
144
  r([]);
145
145
  }
146
- function Te(l) {
146
+ function Te(h) {
147
147
  var t = [];
148
- return Object.keys(l).forEach(function(e) {
149
- t.push.apply(t, l[e] || []);
148
+ return Object.keys(h).forEach(function(e) {
149
+ t.push.apply(t, h[e] || []);
150
150
  }), t;
151
151
  }
152
- var Ft = /* @__PURE__ */ function(l) {
153
- Re(t, l);
152
+ var Ft = /* @__PURE__ */ function(h) {
153
+ Re(t, h);
154
154
  function t(e, i) {
155
155
  var s;
156
- return s = l.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
156
+ return s = h.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
157
157
  }
158
158
  return t;
159
159
  }(/* @__PURE__ */ Ct(Error));
160
- function Ae(l, t, e, i, s) {
160
+ function Ae(h, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(x, g) {
163
163
  var p = function(m) {
164
164
  return i(m), m.length ? g(new Ft(m, bt(m))) : x(s);
165
- }, u = Te(l);
165
+ }, u = Te(h);
166
166
  Bt(u, e, p);
167
167
  });
168
168
  return r.catch(function(x) {
169
169
  return x;
170
170
  }), r;
171
171
  }
172
- var o = t.firstFields === !0 ? Object.keys(l) : t.firstFields || [], n = Object.keys(l), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
172
+ var o = t.firstFields === !0 ? Object.keys(h) : t.firstFields || [], n = Object.keys(h), l = n.length, c = 0, d = [], f = new Promise(function(x, g) {
173
173
  var p = function(w) {
174
- if (d.push.apply(d, w), c++, c === h)
174
+ if (d.push.apply(d, w), c++, c === l)
175
175
  return i(d), d.length ? g(new Ft(d, bt(d))) : x(s);
176
176
  };
177
177
  n.length || (i(d), x(s)), n.forEach(function(u) {
178
- var w = l[u];
178
+ var w = h[u];
179
179
  o.indexOf(u) !== -1 ? Bt(w, e, p) : Se(w, e, p);
180
180
  });
181
181
  });
@@ -183,36 +183,36 @@ function Ae(l, t, e, i, s) {
183
183
  return x;
184
184
  }), f;
185
185
  }
186
- function Me(l) {
187
- return !!(l && l.message !== void 0);
186
+ function Me(h) {
187
+ return !!(h && h.message !== void 0);
188
188
  }
189
- function He(l, t) {
190
- for (var e = l, i = 0; i < t.length; i++) {
189
+ function He(h, t) {
190
+ for (var e = h, i = 0; i < t.length; i++) {
191
191
  if (e == null)
192
192
  return e;
193
193
  e = e[t[i]];
194
194
  }
195
195
  return e;
196
196
  }
197
- function Nt(l, t) {
197
+ function Nt(h, t) {
198
198
  return function(e) {
199
199
  var i;
200
- return l.fullFields ? i = He(t, l.fullFields) : i = t[e.field || l.fullField], Me(e) ? (e.field = e.field || l.fullField, e.fieldValue = i, e) : {
200
+ return h.fullFields ? i = He(t, h.fullFields) : i = t[e.field || h.fullField], Me(e) ? (e.field = e.field || h.fullField, e.fieldValue = i, e) : {
201
201
  message: typeof e == "function" ? e() : e,
202
202
  fieldValue: i,
203
- field: e.field || l.fullField
203
+ field: e.field || h.fullField
204
204
  };
205
205
  };
206
206
  }
207
- function kt(l, t) {
207
+ function kt(h, t) {
208
208
  if (t) {
209
209
  for (var e in t)
210
210
  if (t.hasOwnProperty(e)) {
211
211
  var i = t[e];
212
- typeof i == "object" && typeof l[e] == "object" ? l[e] = q({}, l[e], i) : l[e] = i;
212
+ typeof i == "object" && typeof h[e] == "object" ? h[e] = q({}, h[e], i) : h[e] = i;
213
213
  }
214
214
  }
215
- return l;
215
+ return h;
216
216
  }
217
217
  var Zt = function(t, e, i, s, r, o) {
218
218
  t.required && (!i.hasOwnProperty(t.field) || H(e, o || t.type)) && s.push(D(r.messages.required, t.fullField));
@@ -221,8 +221,8 @@ var Zt = function(t, e, i, s, r, o) {
221
221
  }, ct, Xe = function() {
222
222
  if (ct)
223
223
  return ct;
224
- var l = "[a-fA-F\\d:]", t = function(C) {
225
- return C && C.includeBoundaries ? "(?:(?<=\\s|^)(?=" + l + ")|(?<=" + l + ")(?=\\s|$))" : "";
224
+ var h = "[a-fA-F\\d:]", t = function(b) {
225
+ return b && b.includeBoundaries ? "(?:(?<=\\s|^)(?=" + h + ")|(?<=" + h + ")(?=\\s|$))" : "";
226
226
  }, e = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", i = "[a-fA-F\\d]{1,4}", s = (`
227
227
  (?:
228
228
  (?:` + i + ":){7}(?:" + i + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
@@ -234,16 +234,16 @@ var Zt = 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 + "$"), n = new RegExp("^" + s + "$"), h = function(C) {
238
- return C && C.exact ? r : new RegExp("(?:" + t(C) + e + t(C) + ")|(?:" + t(C) + s + t(C) + ")", "g");
237
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), l = function(b) {
238
+ return b && b.exact ? r : new RegExp("(?:" + t(b) + e + t(b) + ")|(?:" + t(b) + s + t(b) + ")", "g");
239
239
  };
240
- h.v4 = function(y) {
240
+ l.v4 = function(y) {
241
241
  return y && y.exact ? o : new RegExp("" + t(y) + e + t(y), "g");
242
- }, h.v6 = function(y) {
242
+ }, l.v6 = function(y) {
243
243
  return y && y.exact ? n : new RegExp("" + t(y) + s + t(y), "g");
244
244
  };
245
- var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, x = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", u = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', b = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + p + u + ")" + w + m;
246
- return ct = new RegExp("(?:^" + b + "$)", "i"), ct;
245
+ var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = l.v4().source, x = l.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", u = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', C = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + p + u + ")" + w + m;
246
+ return ct = new RegExp("(?:^" + C + "$)", "i"), ct;
247
247
  }, Kt = {
248
248
  // http://emailregex.com/
249
249
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
@@ -300,10 +300,10 @@ var Zt = function(t, e, i, s, r, o) {
300
300
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
301
301
  o.indexOf(n) > -1 ? et[n](e) || s.push(D(r.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(D(r.messages.types[n], t.fullField, t.type));
302
302
  }, Fe = function(t, e, i, s, r) {
303
- var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", p = Array.isArray(e);
303
+ var o = typeof t.len == "number", n = typeof t.min == "number", l = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", p = Array.isArray(e);
304
304
  if (x ? f = "number" : g ? f = "string" : p && (f = "array"), !f)
305
305
  return !1;
306
- p && (d = e.length), g && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !h && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : h && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && h && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
306
+ p && (d = e.length), g && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !l && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : l && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && l && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
307
307
  }, j = "enum", Ne = function(t, e, i, s, r) {
308
308
  t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(D(r.messages[j], t.fullField, t[j].join(", ")));
309
309
  }, ke = function(t, e, i, s, r) {
@@ -416,8 +416,8 @@ var Zt = function(t, e, i, s, r, o) {
416
416
  if (H(e, "date") && !t.required)
417
417
  return i();
418
418
  if (L.required(t, e, s, o, r), !H(e, "date")) {
419
- var h;
420
- e instanceof Date ? h = e : h = new Date(e), L.type(t, h, s, o, r), h && L.range(t, h.getTime(), s, o, r);
419
+ var l;
420
+ e instanceof Date ? l = e : l = new Date(e), L.type(t, l, s, o, r), l && L.range(t, l.getTime(), s, o, r);
421
421
  }
422
422
  }
423
423
  i(o);
@@ -425,8 +425,8 @@ var Zt = function(t, e, i, s, r, o) {
425
425
  var o = [], n = Array.isArray(e) ? "array" : typeof e;
426
426
  L.required(t, e, s, o, r, n), i(o);
427
427
  }, mt = function(t, e, i, s, r) {
428
- var o = t.type, n = [], h = t.required || !t.required && s.hasOwnProperty(t.field);
429
- if (h) {
428
+ var o = t.type, n = [], l = t.required || !t.required && s.hasOwnProperty(t.field);
429
+ if (l) {
430
430
  if (H(e, o) && !t.required)
431
431
  return i();
432
432
  L.required(t, e, s, n, r, o), H(e, o) || L.type(t, e, s, n, r);
@@ -513,10 +513,10 @@ function vt() {
513
513
  };
514
514
  }
515
515
  var Rt = vt(), nt = /* @__PURE__ */ function() {
516
- function l(e) {
516
+ function h(e) {
517
517
  this.rules = null, this._messages = Rt, this.define(e);
518
518
  }
519
- var t = l.prototype;
519
+ var t = h.prototype;
520
520
  return t.define = function(i) {
521
521
  var s = this;
522
522
  if (!i)
@@ -533,32 +533,32 @@ 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 n = i, h = s, c = r;
537
- if (typeof h == "function" && (c = h, h = {}), !this.rules || Object.keys(this.rules).length === 0)
536
+ var n = 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, n), Promise.resolve(n);
539
539
  function d(u) {
540
540
  var w = [], m = {};
541
- function b(C) {
542
- if (Array.isArray(C)) {
541
+ function C(b) {
542
+ if (Array.isArray(b)) {
543
543
  var E;
544
- w = (E = w).concat.apply(E, C);
544
+ w = (E = w).concat.apply(E, b);
545
545
  } else
546
- w.push(C);
546
+ w.push(b);
547
547
  }
548
548
  for (var y = 0; y < u.length; y++)
549
- b(u[y]);
549
+ C(u[y]);
550
550
  w.length ? (m = bt(w), c(w, m)) : c(null, n);
551
551
  }
552
- if (h.messages) {
552
+ if (l.messages) {
553
553
  var f = this.messages();
554
- f === Rt && (f = vt()), kt(f, h.messages), h.messages = f;
554
+ f === Rt && (f = vt()), kt(f, l.messages), l.messages = f;
555
555
  } else
556
- h.messages = this.messages();
557
- var x = {}, g = h.keys || Object.keys(this.rules);
556
+ l.messages = this.messages();
557
+ var x = {}, g = l.keys || Object.keys(this.rules);
558
558
  g.forEach(function(u) {
559
559
  var w = o.rules[u], m = n[u];
560
- w.forEach(function(b) {
561
- var y = b;
560
+ w.forEach(function(C) {
561
+ var y = C;
562
562
  typeof y.transform == "function" && (n === i && (n = q({}, n)), m = n[u] = y.transform(m)), typeof y == "function" ? y = {
563
563
  validator: y
564
564
  } : y = q({}, y), y.validator = o.getValidationMethod(y), y.validator && (y.field = u, y.fullField = y.fullField || u, y.type = o.getType(y), x[u] = x[u] || [], x[u].push({
@@ -570,27 +570,27 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
570
570
  });
571
571
  });
572
572
  var p = {};
573
- return Ae(x, h, function(u, w) {
574
- var m = u.rule, b = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
575
- b = b && (m.required || !m.required && u.value), m.field = u.field;
573
+ return Ae(x, l, function(u, w) {
574
+ var m = u.rule, C = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
575
+ C = C && (m.required || !m.required && u.value), m.field = u.field;
576
576
  function y(R, O) {
577
577
  return q({}, O, {
578
578
  fullField: m.fullField + "." + R,
579
579
  fullFields: m.fullFields ? [].concat(m.fullFields, [R]) : [R]
580
580
  });
581
581
  }
582
- function C(R) {
582
+ function b(R) {
583
583
  R === void 0 && (R = []);
584
584
  var O = Array.isArray(R) ? R : [R];
585
- !h.suppressWarning && O.length && l.warning("async-validator:", O), O.length && m.message !== void 0 && (O = [].concat(m.message));
585
+ !l.suppressWarning && O.length && h.warning("async-validator:", O), O.length && m.message !== void 0 && (O = [].concat(m.message));
586
586
  var I = O.map(Nt(m, n));
587
- if (h.first && I.length)
587
+ if (l.first && I.length)
588
588
  return p[m.field] = 1, w(I);
589
- if (!b)
589
+ if (!C)
590
590
  w(I);
591
591
  else {
592
592
  if (m.required && !u.value)
593
- return m.message !== void 0 ? I = [].concat(m.message).map(Nt(m, n)) : h.error && (I = [h.error(m, D(h.messages.required, m.field))]), w(I);
593
+ return m.message !== void 0 ? I = [].concat(m.message).map(Nt(m, n)) : l.error && (I = [l.error(m, D(l.messages.required, m.field))]), w(I);
594
594
  var _ = {};
595
595
  m.defaultField && Object.keys(u.value).map(function(T) {
596
596
  _[T] = m.defaultField;
@@ -600,8 +600,8 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
600
600
  var M = _[T], A = Array.isArray(M) ? M : [M];
601
601
  v[T] = A.map(y.bind(null, T));
602
602
  });
603
- var S = new l(v);
604
- S.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), S.validate(u.value, u.rule.options || h, function(T) {
603
+ var S = new h(v);
604
+ S.messages(l.messages), u.rule.options && (u.rule.options.messages = l.messages, u.rule.options.error = l.error), S.validate(u.value, u.rule.options || l, function(T) {
605
605
  var M = [];
606
606
  I && I.length && M.push.apply(M, I), T && T.length && M.push.apply(M, T), w(M.length ? M : null);
607
607
  });
@@ -609,21 +609,21 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
609
609
  }
610
610
  var E;
611
611
  if (m.asyncValidator)
612
- E = m.asyncValidator(m, u.value, C, u.source, h);
612
+ E = m.asyncValidator(m, u.value, b, u.source, l);
613
613
  else if (m.validator) {
614
614
  try {
615
- E = m.validator(m, u.value, C, u.source, h);
615
+ E = m.validator(m, u.value, b, u.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
- }, 0), C(R.message);
619
+ }, 0), b(R.message);
620
620
  }
621
- E === !0 ? C() : E === !1 ? C(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : E instanceof Array ? C(E) : E instanceof Error && C(E.message);
621
+ E === !0 ? b() : E === !1 ? b(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : E instanceof Array ? b(E) : E instanceof Error && b(E.message);
622
622
  }
623
623
  E && E.then && E.then(function() {
624
- return C();
624
+ return b();
625
625
  }, function(R) {
626
- return C(R);
626
+ return b(R);
627
627
  });
628
628
  }, function(u) {
629
629
  d(u);
@@ -637,7 +637,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
637
637
  return i.validator;
638
638
  var s = Object.keys(i), r = s.indexOf("message");
639
639
  return r !== -1 && s.splice(r, 1), s.length === 1 && s[0] === "required" ? it.required : it[this.getType(i)] || void 0;
640
- }, l;
640
+ }, h;
641
641
  }();
642
642
  nt.register = function(t, e) {
643
643
  if (typeof e != "function")
@@ -648,26 +648,26 @@ nt.warning = Ut;
648
648
  nt.messages = Rt;
649
649
  nt.validators = it;
650
650
  function Jt() {
651
- return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(l) {
651
+ return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(h) {
652
652
  const t = Math.random() * 16 | 0;
653
- return (l === "x" ? t : t & 3 | 8).toString(16);
653
+ return (h === "x" ? t : t & 3 | 8).toString(16);
654
654
  });
655
655
  }
656
- function Qt(l, t) {
656
+ function Qt(h, t) {
657
657
  let e = 0, i;
658
658
  return function(...s) {
659
659
  const r = (/* @__PURE__ */ new Date()).getTime(), o = r - e;
660
- !e || o >= t ? (l.apply(this, s), e = r) : i || (i = setTimeout(() => {
661
- l.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
660
+ !e || o >= t ? (h.apply(this, s), e = r) : i || (i = setTimeout(() => {
661
+ h.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
662
662
  }, t - o));
663
663
  };
664
664
  }
665
- function te(l = []) {
666
- return l.length ? l.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
665
+ function te(h = []) {
666
+ return h.length ? h.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
667
667
  }
668
- function ei(l = []) {
668
+ function ei(h = []) {
669
669
  let t = [], e = [], i = [];
670
- return l.forEach((s) => {
670
+ return h.forEach((s) => {
671
671
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
672
672
  }), [
673
673
  ...t.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0)),
@@ -675,8 +675,8 @@ function ei(l = []) {
675
675
  ...i.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0))
676
676
  ];
677
677
  }
678
- function ee(l = [], t = 1, e = 0) {
679
- return l.map((i) => {
678
+ function ee(h = [], t = 1, e = 0) {
679
+ return h.map((i) => {
680
680
  if (i.children) {
681
681
  let s = 0, r = i.fixed;
682
682
  i.children.forEach((n) => {
@@ -702,72 +702,72 @@ function ee(l = [], t = 1, e = 0) {
702
702
  };
703
703
  });
704
704
  }
705
- function _t(l = []) {
705
+ function _t(h = []) {
706
706
  let t = [];
707
- return l.forEach((e) => {
707
+ return h.forEach((e) => {
708
708
  e.children ? t = t.concat(_t(e.children)) : t.push(e);
709
709
  }), t;
710
710
  }
711
711
  const Yt = /^(\r\n|\n\r|\r|\n)/, ii = /^[^\t\r\n]+/, Vt = /^\t/;
712
- function si(l) {
712
+ function si(h) {
713
713
  let t = [[""]];
714
- if (l.length === 0)
714
+ if (h.length === 0)
715
715
  return t;
716
716
  let e = 0, i = 0, s;
717
- for (; l.length > 0 && s !== l.length; )
718
- if (s = l.length, l.match(Vt))
719
- l = l.replace(Vt, ""), e += 1, t[i][e] = "";
720
- else if (l.match(Yt))
721
- l = l.replace(Yt, ""), e = 0, i += 1, t[i] = [""];
717
+ for (; h.length > 0 && s !== h.length; )
718
+ if (s = h.length, h.match(Vt))
719
+ h = h.replace(Vt, ""), e += 1, t[i][e] = "";
720
+ else if (h.match(Yt))
721
+ h = h.replace(Yt, ""), e = 0, i += 1, t[i] = [""];
722
722
  else {
723
723
  let r = "";
724
- if (l.startsWith('"')) {
724
+ if (h.startsWith('"')) {
725
725
  let o = 0, n = !0;
726
726
  for (; n; ) {
727
- const h = l.slice(0, 1);
728
- h === '"' && (o += 1), r += h, l = l.slice(1), (l.length === 0 || l.match(/^[\t\r\n]/) && o % 2 === 0) && (n = !1);
727
+ const l = h.slice(0, 1);
728
+ l === '"' && (o += 1), r += l, h = h.slice(1), (h.length === 0 || h.match(/^[\t\r\n]/) && o % 2 === 0) && (n = !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
- const o = l.match(ii);
733
- r = o ? o[0] : "", l = l.slice(r.length);
732
+ const o = h.match(ii);
733
+ r = o ? o[0] : "", h = h.slice(r.length);
734
734
  }
735
735
  t[i][e] = r;
736
736
  }
737
737
  return Array.isArray(t) && t.length > 1 && t[t.length - 1].length === 1 && t[t.length - 1][0] === "" && (t = t.slice(0, t.length - 1)), t;
738
738
  }
739
- function ri(l) {
739
+ function ri(h) {
740
740
  let t, e, i, s, r = "", o;
741
- for (t = 0, e = l.length; t < e; t += 1) {
742
- for (s = l[t].length, i = 0; i < s; i += 1)
743
- i > 0 && (r += " "), o = l[t][i], typeof o == "string" ? o.indexOf(`
741
+ for (t = 0, e = h.length; t < e; t += 1) {
742
+ for (s = h[t].length, i = 0; i < s; i += 1)
743
+ i > 0 && (r += " "), o = h[t][i], typeof o == "string" ? o.indexOf(`
744
744
  `) > -1 ? r += `"${o.replace(/"/g, '""')}"` : r += o : o == null ? r += "" : r += o;
745
745
  t !== e - 1 && (r += `
746
746
  `);
747
747
  }
748
748
  return r;
749
749
  }
750
- function ie(l, t, e = []) {
750
+ function ie(h, t, e = []) {
751
751
  let i = 0;
752
752
  const s = [];
753
- return l.forEach((r, o) => {
753
+ return h.forEach((r, o) => {
754
754
  if (o === 0)
755
755
  s.push(1);
756
756
  else {
757
- const n = e.reduce((c, d) => `${c}${r[d] ?? ""}`, "") || r[t], h = e.reduce((c, d) => `${c}${l[o - 1][d] ?? ""}`, "") || l[o - 1][t];
758
- n === h ? (s[i] += 1, s.push(0)) : (s.push(1), i = o);
757
+ const n = e.reduce((c, d) => `${c}${r[d] ?? ""}`, "") || r[t], l = e.reduce((c, d) => `${c}${h[o - 1][d] ?? ""}`, "") || h[o - 1][t];
758
+ n === l ? (s[i] += 1, s.push(0)) : (s.push(1), i = o);
759
759
  }
760
760
  }), s;
761
761
  }
762
- function se(l, t) {
762
+ function se(h, t) {
763
763
  let e = "", i = "";
764
764
  const s = {};
765
765
  return t.forEach((r, o) => {
766
- o === 0 ? (e = r.key, i = r.key, s[r.key] = 1) : l[r.key] === l[e] ? (s[r.key] = 0, s[i] += 1) : (s[r.key] = 1, e = r.key, i = r.key);
766
+ o === 0 ? (e = r.key, i = r.key, s[r.key] = 1) : h[r.key] === h[e] ? (s[r.key] = 0, s[i] += 1) : (s[r.key] = 1, e = r.key, i = r.key);
767
767
  }), s;
768
768
  }
769
- function oi(l, t, e = []) {
770
- const { visibleRows: i, rowIndex: s, headIndex: r } = l, o = ie(i, t, e);
769
+ function oi(h, t, e = []) {
770
+ const { visibleRows: i, rowIndex: s, headIndex: r } = h, o = ie(i, t, e);
771
771
  return o[s - r] === 0 ? {
772
772
  rowspan: 0,
773
773
  colspan: 0,
@@ -780,8 +780,8 @@ function oi(l, t, e = []) {
780
780
  mergeRow: !0
781
781
  };
782
782
  }
783
- function ni(l, t = []) {
784
- const { column: e, row: i, visibleLeafColumns: s } = l, r = s.filter((o) => t.includes(o.key));
783
+ function ni(h, t = []) {
784
+ const { column: e, row: i, visibleLeafColumns: s } = h, r = s.filter((o) => t.includes(o.key));
785
785
  if (t.includes(e.key)) {
786
786
  const o = se(i, r);
787
787
  return o[e.key] === 0 ? {
@@ -797,8 +797,8 @@ function ni(l, t = []) {
797
797
  };
798
798
  }
799
799
  }
800
- function ai(l, t = document.documentElement) {
801
- const e = l.startsWith("--") ? l : `--${l}`;
800
+ function ai(h, t = document.documentElement) {
801
+ const e = h.startsWith("--") ? h : `--${h}`;
802
802
  return getComputedStyle(t).getPropertyValue(e).trim();
803
803
  }
804
804
  class re {
@@ -848,8 +848,8 @@ class re {
848
848
  }
849
849
  }
850
850
  class At extends re {
851
- constructor(e, i, s, r, o, n, h, c, d, f = "body") {
852
- super(e, r, o, n, h, f, c.fixed);
851
+ constructor(e, i, s, r, o, n, l, c, d, f = "body") {
852
+ super(e, r, o, n, l, f, c.fixed);
853
853
  a(this, "formatter");
854
854
  a(this, "formatterFooter");
855
855
  a(this, "hoverIconName", "");
@@ -932,7 +932,7 @@ class At extends re {
932
932
  rowspan: r = 1,
933
933
  relationRowKeys: o,
934
934
  relationColKeys: n,
935
- mergeRow: h = !1,
935
+ mergeRow: l = !1,
936
936
  mergeCol: c = !1
937
937
  } = i({
938
938
  row: this.row,
@@ -946,7 +946,7 @@ class At extends re {
946
946
  visibleLeafColumns: this.ctx.header.visibleLeafColumns,
947
947
  rows: this.ctx.body.data
948
948
  }) || {};
949
- Array.isArray(o) && o.length > 0 ? this.relationRowKeys = o : this.relationRowKeys = [this.key], Array.isArray(n) && n.length > 0 ? this.relationColKeys = n : this.relationColKeys = [this.key], this.mergeCol = c, this.mergeRow = h, this.colspan = s, this.rowspan = r, this.visibleWidth = this.getWidthByColIndexColSpan(this.colIndex, this.colspan), this.visibleHeight = this.ctx.database.getHeightByRowIndexRowSpan(this.rowIndex, this.rowspan);
949
+ Array.isArray(o) && o.length > 0 ? this.relationRowKeys = o : this.relationRowKeys = [this.key], Array.isArray(n) && n.length > 0 ? this.relationColKeys = n : this.relationColKeys = [this.key], this.mergeCol = c, this.mergeRow = l, this.colspan = s, this.rowspan = r, this.visibleWidth = this.getWidthByColIndexColSpan(this.colIndex, this.colspan), this.visibleHeight = this.ctx.database.getHeightByRowIndexRowSpan(this.rowIndex, this.rowspan);
950
950
  }
951
951
  }
952
952
  updateSpanInfo() {
@@ -1019,7 +1019,7 @@ class At extends re {
1019
1019
  const { CELL_PADDING: e = 0 } = this.ctx.config, { rowKey: i, cellType: s } = this;
1020
1020
  let r, o = 0, n = "";
1021
1021
  if (this.type === "tree" && s === "body") {
1022
- const h = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = h || {};
1022
+ const l = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = l || {};
1023
1023
  if (this.rowExpand = c, this.rowHasChildren = d, f) {
1024
1024
  const u = this.ctx.icons.get("loading");
1025
1025
  n = "loading", r = u, o = x * 8;
@@ -1044,7 +1044,7 @@ class At extends re {
1044
1044
  FOOTER_CELL_STYLE_METHOD: r,
1045
1045
  READONLY_TEXT_COLOR: o,
1046
1046
  BODY_TEXT_COLOR: n,
1047
- FOOTER_TEXT_COLOR: h,
1047
+ FOOTER_TEXT_COLOR: l,
1048
1048
  FOOTER_BG_COLOR: c,
1049
1049
  HIGHLIGHT_SELECTED_ROW: d,
1050
1050
  HIGHLIGHT_SELECTED_ROW_COLOR: f,
@@ -1054,7 +1054,7 @@ class At extends re {
1054
1054
  STRIPE_COLOR: u
1055
1055
  } = this.ctx.config;
1056
1056
  if (this.cellType === "footer") {
1057
- let O = c, I = h;
1057
+ let O = c, I = l;
1058
1058
  if (typeof r == "function") {
1059
1059
  const _ = r, { backgroundColor: v, color: S } = _({
1060
1060
  row: this.row,
@@ -1069,13 +1069,13 @@ class At extends re {
1069
1069
  return;
1070
1070
  }
1071
1071
  let w = "transparent";
1072
- const m = this.ctx.hoverCell, b = this.ctx.currentCell;
1073
- let y = this.rowIndex, C = this.rowIndex;
1072
+ const m = this.ctx.hoverCell, C = this.ctx.currentCell;
1073
+ let y = this.rowIndex, b = this.rowIndex;
1074
1074
  if (this.rowspan !== 1 && (x || d)) {
1075
1075
  const O = this.getSpanInfo(), { yArr: I } = O;
1076
- y = I[0], C = I[1];
1076
+ y = I[0], b = I[1];
1077
1077
  }
1078
- x && m && (m.rowKey === this.rowKey && (w = g), m.rowIndex >= y && m.rowIndex <= C && (w = g)), d && b && (b.rowKey === this.rowKey && (w = f), b.rowIndex >= y && b.rowIndex <= C && (w = f)), this.drawCellSkyBgColor = w;
1078
+ x && m && (m.rowKey === this.rowKey && (w = g), m.rowIndex >= y && m.rowIndex <= b && (w = g)), d && C && (C.rowKey === this.rowKey && (w = f), C.rowIndex >= y && C.rowIndex <= b && (w = f)), this.drawCellSkyBgColor = w;
1079
1079
  let E = e, R = n;
1080
1080
  if (this.ctx.database.getReadonly(this.rowKey, this.key) || (E = i, R = o), p && (this.rowIndex % 2 ? E = u : E = e), typeof s == "function") {
1081
1081
  const O = s, { backgroundColor: I, color: _ } = O({
@@ -1091,11 +1091,11 @@ class At extends re {
1091
1091
  this.drawCellBgColor = E, this.drawTextColor = R;
1092
1092
  }
1093
1093
  updateSelection() {
1094
- const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: h, rowKey: c } = this;
1094
+ const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: l, rowKey: c } = this;
1095
1095
  if (!(s === 0 || r === 0) && o !== "footer" && ["index-selection", "selection"].includes(n)) {
1096
1096
  const d = this.ctx.database.getRowSelection(c), f = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, g = this.drawX + (e - x) / 2, p = this.drawY + (i - x) / 2;
1097
1097
  let u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
1098
- d && f ? (u = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (u = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (u = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), u && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === h || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u) : u && n === "selection" && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u);
1098
+ d && f ? (u = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (u = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (u = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), u && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u) : u && n === "selection" && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u);
1099
1099
  }
1100
1100
  }
1101
1101
  updateHoverIcon() {
@@ -1114,16 +1114,16 @@ class At extends re {
1114
1114
  }
1115
1115
  const { hoverCell: n } = this.ctx;
1116
1116
  if (this.hoverIconName && !this.ctx.editing && n) {
1117
- let h = 0, c = 0;
1118
- if (n.rowKey === this.rowKey && (h = this.drawX + this.width - s - r, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && o) {
1117
+ let l = 0, c = 0;
1118
+ if (n.rowKey === this.rowKey && (l = this.drawX + this.width - s - r, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && o) {
1119
1119
  const f = this.getSpanInfo(), { yArr: x } = f, g = x[0], p = x[1];
1120
1120
  if (n.rowIndex >= g && n.rowIndex <= p) {
1121
- const { width: u, height: w, offsetTop: m, offsetLeft: b } = f;
1122
- h = this.drawX - b + u - s - r, c = this.drawY - m + (w - s) / 2;
1121
+ const { width: u, height: w, offsetTop: m, offsetLeft: C } = f;
1122
+ l = this.drawX - C + u - s - r, c = this.drawY - m + (w - s) / 2;
1123
1123
  }
1124
1124
  }
1125
1125
  const d = this.ctx.icons.get(this.hoverIconName);
1126
- this.drawImageX = h, this.drawImageY = c, this.drawImageWidth = s, this.drawImageHeight = s, this.drawImageName = this.hoverIconName, this.drawImageSource = d;
1126
+ this.drawImageX = l, this.drawImageY = c, this.drawImageWidth = s, this.drawImageHeight = s, this.drawImageName = this.hoverIconName, this.drawImageSource = d;
1127
1127
  }
1128
1128
  }
1129
1129
  // 过去跨度配置
@@ -1218,8 +1218,8 @@ class At extends re {
1218
1218
  const { SELECT_BORDER_COLOR: e, ENABLE_AUTOFILL: i, ENABLE_SELECTOR: s, AUTOFILL_POINT_BORDER_COLOR: r } = this.ctx.config;
1219
1219
  if (!s || !i || this.ctx.editing)
1220
1220
  return;
1221
- const { xArr: o, yArr: n } = this.ctx.selector, h = o[1], c = n[1], { colIndex: d, rowIndex: f, drawX: x, drawY: g } = this;
1222
- if (d === h && f === c) {
1221
+ const { xArr: o, yArr: n } = this.ctx.selector, l = o[1], c = n[1], { colIndex: d, rowIndex: f, drawX: x, drawY: g } = this;
1222
+ if (d === l && f === c) {
1223
1223
  const u = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
1224
1224
  this.ctx.paint.drawRect(x + this.width - u, g + this.height - u, 6, 6, {
1225
1225
  borderColor: r,
@@ -1254,8 +1254,8 @@ class At extends re {
1254
1254
  const { ellipsis: o } = this.ctx.paint.handleEllipsis(this.displayText, r, e, i);
1255
1255
  this.ellipsis = o;
1256
1256
  const { placeholder: n } = this.column;
1257
- let h = this.displayText, c = this.drawTextColor;
1258
- return !this.ctx.database.getReadonly(this.rowKey, this.key) && n && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (h = n, c = s), this.ctx.paint.drawText(h, this.drawTextX, this.drawTextY, r, this.visibleHeight, {
1257
+ let l = this.displayText, c = this.drawTextColor;
1258
+ return !this.ctx.database.getReadonly(this.rowKey, this.key) && n && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (l = n, c = s), this.ctx.paint.drawText(l, this.drawTextX, this.drawTextY, r, this.visibleHeight, {
1259
1259
  font: i,
1260
1260
  padding: e,
1261
1261
  align: this.align,
@@ -1317,8 +1317,8 @@ class At extends re {
1317
1317
  fillColor: "transparent",
1318
1318
  borderWidth: 1
1319
1319
  });
1320
- const [n, h] = i, [c, d] = s;
1321
- !(n === h && c === d) && this.colIndex >= n && this.colIndex <= h && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
1320
+ const [n, l] = i, [c, d] = s;
1321
+ !(n === l && c === d) && this.colIndex >= n && this.colIndex <= l && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
1322
1322
  borderColor: "transparent",
1323
1323
  fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)"
1324
1324
  }), this.operation && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
@@ -1346,12 +1346,12 @@ class At extends re {
1346
1346
  });
1347
1347
  }
1348
1348
  drawBorder(e) {
1349
- const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: h } = this;
1349
+ const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: l } = this;
1350
1350
  let c = i, d = s;
1351
- const { xArr: f, yArr: x, lineDash: g = [], borderWidth: p = 1, borderColor: u, fillColor: w } = e, m = f[0], b = f[1], y = x[0], C = x[1];
1352
- if (o >= m && o <= b && r === y) {
1353
- const E = o === b ? 1 : 0, R = o === m ? 1 : 0;
1354
- this.ctx.paint.drawLine([c + R, d + 1, c + h - E, d + 1], {
1351
+ const { xArr: f, yArr: x, lineDash: g = [], borderWidth: p = 1, borderColor: u, fillColor: w } = e, m = f[0], C = f[1], y = x[0], b = x[1];
1352
+ if (o >= m && o <= C && r === y) {
1353
+ const E = o === C ? 1 : 0, R = o === m ? 1 : 0;
1354
+ this.ctx.paint.drawLine([c + R, d + 1, c + l - E, d + 1], {
1355
1355
  borderColor: u,
1356
1356
  fillColor: w,
1357
1357
  borderWidth: p,
@@ -1360,9 +1360,9 @@ class At extends re {
1360
1360
  lineDash: g
1361
1361
  });
1362
1362
  }
1363
- if (o === b && r >= y && r <= C) {
1364
- const E = r === y ? 1 : 0, R = r === C ? 1 : 0;
1365
- this.ctx.paint.drawLine([c + h - 1, d + E, c + h - 1, d + n - R], {
1363
+ if (o === C && r >= y && r <= b) {
1364
+ const E = r === y ? 1 : 0, R = r === b ? 1 : 0;
1365
+ this.ctx.paint.drawLine([c + l - 1, d + E, c + l - 1, d + n - R], {
1366
1366
  borderColor: u,
1367
1367
  fillColor: w,
1368
1368
  borderWidth: p,
@@ -1371,9 +1371,9 @@ class At extends re {
1371
1371
  lineDash: g
1372
1372
  });
1373
1373
  }
1374
- if (o >= m && o <= b && r === C) {
1375
- const E = o === b ? 1 : 0, R = o === m ? 1 : 0;
1376
- this.ctx.paint.drawLine([c + R, d + n - 1, c + h - E, d + n - 1], {
1374
+ if (o >= m && o <= C && r === b) {
1375
+ const E = o === C ? 1 : 0, R = o === m ? 1 : 0;
1376
+ this.ctx.paint.drawLine([c + R, d + n - 1, c + l - E, d + n - 1], {
1377
1377
  borderColor: u,
1378
1378
  fillColor: w,
1379
1379
  borderWidth: p,
@@ -1382,8 +1382,8 @@ class At extends re {
1382
1382
  lineDash: g
1383
1383
  });
1384
1384
  }
1385
- if (o === m && r >= y && r <= C) {
1386
- const E = r === C ? 1 : 0, R = r === y ? 1 : 0;
1385
+ if (o === m && r >= y && r <= b) {
1386
+ const E = r === b ? 1 : 0, R = r === y ? 1 : 0;
1387
1387
  this.ctx.paint.drawLine([c + 1, d + R, c + 1, d + n - E], {
1388
1388
  borderColor: u,
1389
1389
  fillColor: w,
@@ -1395,7 +1395,7 @@ class At extends re {
1395
1395
  }
1396
1396
  }
1397
1397
  }
1398
- class li {
1398
+ class hi {
1399
1399
  //虚拟滚动位置
1400
1400
  constructor(t, e) {
1401
1401
  a(this, "loading", !1);
@@ -1445,32 +1445,28 @@ class li {
1445
1445
  */
1446
1446
  initData(t, e = 0) {
1447
1447
  t.forEach((i, s) => {
1448
- var m, b;
1448
+ var m;
1449
1449
  let r = !1;
1450
1450
  Array.isArray(i.children) && (r = i._hasChildren, i.children.length && (r = !0, this.initData(i.children, e + 1)));
1451
- const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: h, SELECTABLE_METHOD: c, CHECKBOX_KEY: d } = this.ctx.config, f = i[o], x = f != null ? `${f}` : Jt();
1451
+ const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: l, SELECTABLE_METHOD: c, CHECKBOX_KEY: d } = this.ctx.config, f = i[o], x = f != null ? `${f}` : Jt();
1452
1452
  this.itemRowKeyMap.set(i, x);
1453
- const g = i._height || h, p = i._readonly;
1453
+ const g = i._height || l, p = i._readonly;
1454
1454
  let u = !0;
1455
1455
  if (typeof c == "function" && (u = c), d) {
1456
- const y = i[d];
1457
- if (this.checkboxKeyMap.has(y)) {
1458
- const C = this.checkboxKeyMap.get(y) || [];
1459
- C.push(x), this.checkboxKeyMap.set(y, C);
1456
+ const C = i[d];
1457
+ if (this.checkboxKeyMap.has(C)) {
1458
+ const y = this.checkboxKeyMap.get(C) || [];
1459
+ y.push(x), this.checkboxKeyMap.set(C, y);
1460
1460
  } else
1461
- this.checkboxKeyMap.set(y, [x]);
1461
+ this.checkboxKeyMap.set(C, [x]);
1462
1462
  }
1463
1463
  this.selectionMap.set(x, {
1464
1464
  key: d ? i[d] : x,
1465
1465
  row: i,
1466
1466
  check: ((m = this.selectionMap.get(x)) == null ? void 0 : m.check) || !1
1467
1467
  });
1468
- const w = n || ((b = this.expandMap.get(x)) == null ? void 0 : b.expand) || i._expand || !1;
1469
- this.expandMap.set(x, {
1470
- key: x,
1471
- row: i,
1472
- expand: w
1473
- }), this.rowKeyMap.set(x, {
1468
+ const w = n || this.expandMap.get(x) || i._expand || !1;
1469
+ this.expandMap.set(x, w), this.rowKeyMap.set(x, {
1474
1470
  readonly: p,
1475
1471
  index: s,
1476
1472
  rowIndex: s,
@@ -1545,12 +1541,12 @@ class li {
1545
1541
  const i = (r) => {
1546
1542
  r.forEach((o) => {
1547
1543
  t.push(o);
1548
- const n = this.itemRowKeyMap.get(o), { expand: h, hasChildren: c, height: d } = this.rowKeyMap.get(n), f = this.sumHeight;
1544
+ const n = this.itemRowKeyMap.get(o), { expand: l, hasChildren: c, height: d } = this.rowKeyMap.get(n), f = this.sumHeight;
1549
1545
  this.sumHeight += d, this.rowIndexRowKeyMap.set(e, n), this.rowKeyRowIndexMap.set(n, e), this.positions.push({
1550
1546
  top: f,
1551
1547
  height: d,
1552
1548
  bottom: this.sumHeight
1553
- }), e += 1, h && c && i(o.children);
1549
+ }), e += 1, l && c && i(o.children);
1554
1550
  });
1555
1551
  };
1556
1552
  this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
@@ -1586,20 +1582,12 @@ class li {
1586
1582
  */
1587
1583
  expandItem(t, e = !1) {
1588
1584
  const i = this.rowKeyMap.get(t);
1589
- i.expand = e, this.expandMap.set(t, {
1590
- key: t,
1591
- row: i.item,
1592
- expand: e
1593
- }), this.clearBufferData(), this.ctx.emit("draw");
1585
+ i.expand = e, this.expandMap.set(t, e), this.clearBufferData(), this.ctx.emit("draw");
1594
1586
  }
1595
1587
  setExpandRowKeys(t, e = !0) {
1596
- t.forEach((i) => {
1588
+ this.expandMap.clear(), t.forEach((i) => {
1597
1589
  const s = this.rowKeyMap.get(i);
1598
- this.expandMap.set(i, {
1599
- key: i,
1600
- row: s.item,
1601
- expand: e
1602
- }), s.expand = e;
1590
+ this.expandMap.set(i, e), s.expand = e;
1603
1591
  }), this.clearBufferData(), this.ctx.emit("draw");
1604
1592
  }
1605
1593
  getExpandRowKeys() {
@@ -1609,12 +1597,8 @@ class li {
1609
1597
  }), t;
1610
1598
  }
1611
1599
  expandAll(t) {
1612
- this.rowKeyMap.forEach((e) => {
1613
- e.expand = t, this.expandMap.set(e.key, {
1614
- key: e.key,
1615
- row: e.item,
1616
- expand: t
1617
- });
1600
+ this.expandMap.clear(), this.rowKeyMap.forEach((e) => {
1601
+ e.expand = t, this.expandMap.set(e.key, t);
1618
1602
  }), this.clearBufferData(), this.ctx.emit("draw");
1619
1603
  }
1620
1604
  expandLoading(t, e = !1) {
@@ -1623,11 +1607,7 @@ class li {
1623
1607
  }
1624
1608
  setExpandChildren(t, e) {
1625
1609
  const i = this.rowKeyMap.get(t);
1626
- i.expand = !0, this.expandMap.set(t, {
1627
- key: t,
1628
- row: i.item,
1629
- expand: !0
1630
- }), i.expandLazy = !0, i.item.children = e, this.initData(i.item.children, i.level + 1), this.clearBufferData();
1610
+ i.expand = !0, this.expandMap.set(t, !0), i.expandLazy = !0, i.item.children = e, this.initData(i.item.children, i.level + 1), this.clearBufferData();
1631
1611
  }
1632
1612
  getIsExpandLoading(t) {
1633
1613
  return this.rowKeyMap.get(t).expandLoading;
@@ -1740,14 +1720,14 @@ class li {
1740
1720
  newValue: f
1741
1721
  });
1742
1722
  });
1743
- let h = [];
1723
+ let l = [];
1744
1724
  s.forEach((d) => {
1745
- h.push(this.ctx.database.getRowDataItemForRowKey(d));
1725
+ l.push(this.ctx.database.getRowDataItemForRowKey(d));
1746
1726
  });
1747
1727
  const c = o.map(({ rowKey: d, key: f }) => this.getValidator(d, f));
1748
1728
  Promise.all(c).then(() => {
1749
1729
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1750
- }), this.ctx.emit("change", o, h), e && this.ctx.history.pushState({
1730
+ }), this.ctx.emit("change", o, l), e && this.ctx.history.pushState({
1751
1731
  changeList: i,
1752
1732
  scrollX: this.ctx.scrollX,
1753
1733
  scrollY: this.ctx.scrollY,
@@ -1768,15 +1748,15 @@ class li {
1768
1748
  if (!this.rowKeyMap.has(t))
1769
1749
  return {};
1770
1750
  const { item: n } = this.rowKeyMap.get(t);
1771
- let h = n[e], c = i;
1751
+ let l = n[e], c = i;
1772
1752
  if (this.ctx.database.getReadonly(t, e))
1773
1753
  return {
1774
- oldValue: h,
1775
- newValue: h
1754
+ oldValue: l,
1755
+ newValue: l
1776
1756
  };
1777
- n[e] !== null && typeof n[e] == "object" && (h = JSON.parse(JSON.stringify(n[e])));
1757
+ n[e] !== null && typeof n[e] == "object" && (l = JSON.parse(JSON.stringify(n[e])));
1778
1758
  const d = `${t}​_${e}`;
1779
- this.originalDataMap.has(d) || this.originalDataMap.set(d, h);
1759
+ this.originalDataMap.has(d) || this.originalDataMap.set(d, l);
1780
1760
  const f = this.originalDataMap.get(d), x = this.getRowDataItemForRowKey(t);
1781
1761
  if (o) {
1782
1762
  const g = this.getVirtualBodyCellByKey(t, e);
@@ -1786,7 +1766,7 @@ class li {
1786
1766
  else if (/^-?\d+(\.\d+)?$/.test(`${i}`))
1787
1767
  c = Number(i);
1788
1768
  else {
1789
- c = h;
1769
+ c = l;
1790
1770
  const w = {
1791
1771
  code: "ERR_SET_NUMBER_VALUE",
1792
1772
  message: "Assignment failed, not a numeric type",
@@ -1795,17 +1775,17 @@ class li {
1795
1775
  rowKey: t,
1796
1776
  key: e,
1797
1777
  value: c,
1798
- oldValue: h,
1778
+ oldValue: l,
1799
1779
  row: x
1800
1780
  }
1801
1781
  ]
1802
1782
  };
1803
1783
  this.ctx.emit("error", w);
1804
1784
  }
1805
- if (c === h)
1785
+ if (c === l)
1806
1786
  return {
1807
- oldValue: h,
1808
- newValue: h
1787
+ oldValue: l,
1788
+ newValue: l
1809
1789
  };
1810
1790
  const { BEFORE_VALUE_CHANGE_METHOD: p } = this.ctx.config;
1811
1791
  if (typeof p == "function") {
@@ -1824,7 +1804,7 @@ class li {
1824
1804
  const u = {
1825
1805
  rowKey: t,
1826
1806
  key: e,
1827
- oldValue: h,
1807
+ oldValue: l,
1828
1808
  value: c,
1829
1809
  row: x
1830
1810
  };
@@ -1833,7 +1813,7 @@ class li {
1833
1813
  }), this.ctx.emit("change", [u], [x]), this.ctx.emit("editChange", {
1834
1814
  rowKey: t,
1835
1815
  key: e,
1836
- oldValue: h,
1816
+ oldValue: l,
1837
1817
  value: c,
1838
1818
  originalValue: f,
1839
1819
  row: x
@@ -1843,7 +1823,7 @@ class li {
1843
1823
  return this.ctx.hasEvent("iterationChange") && this.ctx.emit("iterationChange", {
1844
1824
  rowKey: t,
1845
1825
  key: e,
1846
- oldValue: h,
1826
+ oldValue: l,
1847
1827
  value: c,
1848
1828
  originalValue: this.originalDataMap.get(d),
1849
1829
  row: x
@@ -1855,12 +1835,12 @@ class li {
1855
1835
  {
1856
1836
  rowKey: t,
1857
1837
  key: e,
1858
- oldValue: h,
1838
+ oldValue: l,
1859
1839
  newValue: c
1860
1840
  }
1861
1841
  ]
1862
1842
  }), r && this.ctx.emit("draw"), {
1863
- oldValue: h,
1843
+ oldValue: l,
1864
1844
  newValue: c
1865
1845
  };
1866
1846
  }
@@ -1887,8 +1867,8 @@ class li {
1887
1867
  return !1;
1888
1868
  const { item: s } = this.rowKeyMap.get(t), r = s[i];
1889
1869
  this.checkboxKeyMap.has(r) && (this.checkboxKeyMap.get(r) || []).forEach((n) => {
1890
- const h = this.selectionMap.get(n);
1891
- h && (h.check = e);
1870
+ const l = this.selectionMap.get(n);
1871
+ l && (l.check = e);
1892
1872
  });
1893
1873
  }
1894
1874
  }
@@ -1959,9 +1939,13 @@ class li {
1959
1939
  clearSelection(t = !1) {
1960
1940
  t ? this.rowKeyMap.forEach((i, s) => {
1961
1941
  this.setRowSelection(s, !1, !1);
1962
- }) : this.selectionMap.forEach((i, s) => {
1963
- this.setRowSelection(s, !1, !1);
1964
- });
1942
+ }) : (this.selectionMap.clear(), this.rowKeyMap.forEach((i, s) => {
1943
+ this.selectionMap.set(s, {
1944
+ check: !1,
1945
+ row: i.item,
1946
+ key: s
1947
+ });
1948
+ }));
1965
1949
  const e = this.getSelectionRows();
1966
1950
  this.ctx.emit("clearSelection"), this.ctx.emit("selectionChange", e), this.bufferCheckState.buffer = !1, this.ctx.emit("draw");
1967
1951
  }
@@ -1985,7 +1969,7 @@ class li {
1985
1969
  rowIndex: x.rowIndex
1986
1970
  })), p && (r += 1);
1987
1971
  });
1988
- const h = o > i && s === 0 && n, c = r && r > s && s > 0 || h, d = r !== 0, f = !!r && r === s;
1972
+ const l = o > i && s === 0 && n, c = r && r > s && s > 0 || l, d = r !== 0, f = !!r && r === s;
1989
1973
  return this.bufferCheckState = {
1990
1974
  buffer: !0,
1991
1975
  check: f,
@@ -2084,9 +2068,9 @@ class li {
2084
2068
  const s = this.rowKeyMap.get(t), r = this.headerMap.get(e);
2085
2069
  if (!s || !r)
2086
2070
  return !0;
2087
- const o = s.readonly, n = r.readonly, { BODY_CELL_READONLY_METHOD: h } = this.ctx.config;
2088
- if (typeof h == "function" && r) {
2089
- const d = h({
2071
+ const o = s.readonly, n = r.readonly, { BODY_CELL_READONLY_METHOD: l } = this.ctx.config;
2072
+ if (typeof l == "function" && r) {
2073
+ const d = l({
2090
2074
  row: s.item,
2091
2075
  rowIndex: s.rowIndex,
2092
2076
  colIndex: r.colIndex,
@@ -2110,7 +2094,7 @@ class li {
2110
2094
  if (r === void 0)
2111
2095
  return i([]);
2112
2096
  const n = r.column;
2113
- let h = n.rules;
2097
+ let l = n.rules;
2114
2098
  if (typeof o == "function") {
2115
2099
  const d = o({
2116
2100
  row: s.item,
@@ -2119,12 +2103,12 @@ class li {
2119
2103
  column: n,
2120
2104
  value: this.getItemValue(t, e)
2121
2105
  });
2122
- d && (h = d);
2106
+ d && (l = d);
2123
2107
  }
2124
- if (h) {
2108
+ if (l) {
2125
2109
  let c = {}, d = {};
2126
- if (d[e] = this.getItemValue(t, e), Array.isArray(h)) {
2127
- const x = h.map((g) => ({
2110
+ if (d[e] = this.getItemValue(t, e), Array.isArray(l)) {
2111
+ const x = l.map((g) => ({
2128
2112
  ...g,
2129
2113
  row: s.item,
2130
2114
  column: n,
@@ -2134,7 +2118,7 @@ class li {
2134
2118
  c[e] = x;
2135
2119
  } else
2136
2120
  c[e] = {
2137
- ...h,
2121
+ ...l,
2138
2122
  row: s.item,
2139
2123
  column: n,
2140
2124
  rowIndex: s.rowIndex,
@@ -2172,7 +2156,7 @@ class li {
2172
2156
  row: r,
2173
2157
  value: o,
2174
2158
  colIndex: n,
2175
- relationRowKeys: h,
2159
+ relationRowKeys: l,
2176
2160
  relationColKeys: c,
2177
2161
  rowspan: d,
2178
2162
  height: f,
@@ -2200,15 +2184,15 @@ class li {
2200
2184
  }
2201
2185
  ]
2202
2186
  };
2203
- let w = e, m = e, b = n, y = n, C = [], E = 0, R = 0, O = 0, I = 0;
2187
+ let w = e, m = e, C = n, y = n, b = [], E = 0, R = 0, O = 0, I = 0;
2204
2188
  if (d !== 1 && p) {
2205
2189
  I = x;
2206
- const _ = h.reduce((v, S) => {
2190
+ const _ = l.reduce((v, S) => {
2207
2191
  const T = this.getItemValue(s, S) ?? "";
2208
2192
  return `${v}${T}`;
2209
2193
  }, "");
2210
2194
  for (let v = e - 1; v >= 0; v--) {
2211
- const S = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
2195
+ const S = this.rowIndexRowKeyMap.get(v) || "", T = l.reduce((M, A) => {
2212
2196
  const N = this.getItemValue(S, A) ?? "";
2213
2197
  return `${M}${N}`;
2214
2198
  }, "");
@@ -2218,7 +2202,7 @@ class li {
2218
2202
  break;
2219
2203
  }
2220
2204
  for (let v = e; v <= this.ctx.maxRowIndex; v++) {
2221
- const S = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
2205
+ const S = this.rowIndexRowKeyMap.get(v) || "", T = l.reduce((M, A) => {
2222
2206
  const N = this.getItemValue(S, A) ?? "";
2223
2207
  return `${M}${N}`;
2224
2208
  }, "");
@@ -2235,7 +2219,7 @@ class li {
2235
2219
  const { height: S } = this.positions[v];
2236
2220
  O += S;
2237
2221
  const T = this.rowIndexRowKeyMap.get(v) || "", { item: M } = this.rowKeyMap.get(T), A = this.getItemValue(T, i);
2238
- C.push({
2222
+ b.push({
2239
2223
  rowKey: T,
2240
2224
  key: i,
2241
2225
  value: A,
@@ -2251,7 +2235,7 @@ class li {
2251
2235
  break;
2252
2236
  const S = this.getItemValue(s, i), T = this.getItemValue(s, v.key);
2253
2237
  if (S === T && c.includes(v.key))
2254
- b = _;
2238
+ C = _;
2255
2239
  else
2256
2240
  break;
2257
2241
  }
@@ -2265,17 +2249,17 @@ class li {
2265
2249
  else
2266
2250
  break;
2267
2251
  }
2268
- for (let _ = b; _ < n; _++) {
2252
+ for (let _ = C; _ < n; _++) {
2269
2253
  const v = this.getColumnByColIndex(_);
2270
2254
  if (!v)
2271
2255
  break;
2272
2256
  R += v.width || 100;
2273
2257
  }
2274
- for (let _ = b; _ <= y; _++) {
2258
+ for (let _ = C; _ <= y; _++) {
2275
2259
  const v = this.getColumnByColIndex(_);
2276
2260
  if (!v)
2277
2261
  break;
2278
- I += v.width || 100, C.push({
2262
+ I += v.width || 100, b.push({
2279
2263
  rowKey: s,
2280
2264
  key: v.key,
2281
2265
  value: this.getItemValue(s, v.key),
@@ -2284,7 +2268,7 @@ class li {
2284
2268
  }
2285
2269
  }
2286
2270
  return {
2287
- xArr: [b, y],
2271
+ xArr: [C, y],
2288
2272
  yArr: [w, m],
2289
2273
  rowspan: d,
2290
2274
  colspan: g,
@@ -2292,7 +2276,7 @@ class li {
2292
2276
  width: I,
2293
2277
  offsetTop: E,
2294
2278
  offsetLeft: R,
2295
- dataList: C
2279
+ dataList: b
2296
2280
  };
2297
2281
  }
2298
2282
  setLoading(t) {
@@ -2344,7 +2328,7 @@ class li {
2344
2328
  return i;
2345
2329
  }
2346
2330
  }
2347
- class hi {
2331
+ class li {
2348
2332
  constructor(t) {
2349
2333
  a(this, "ctx");
2350
2334
  a(this, "history", []);
@@ -2540,21 +2524,21 @@ class fi {
2540
2524
  * @param {string} color - 阴影的颜色
2541
2525
  */
2542
2526
  drawShadow(t, e, i, s, r) {
2543
- const { fillColor: o, side: n, shadowWidth: h, colorStart: c, colorEnd: d } = r;
2527
+ const { fillColor: o, side: n, shadowWidth: l, colorStart: c, colorEnd: d } = r;
2544
2528
  this.ctx.save(), o && (this.ctx.fillStyle = o, this.ctx.fillRect(t, e, i, s));
2545
2529
  let f;
2546
2530
  switch (n) {
2547
2531
  case "left":
2548
- f = this.ctx.createLinearGradient(t - h, e, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t - h, e, h, s);
2532
+ f = this.ctx.createLinearGradient(t - l, e, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t - l, e, l, s);
2549
2533
  break;
2550
2534
  case "right":
2551
- f = this.ctx.createLinearGradient(t + i, e, t + i + h, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t + i, e, h, s);
2535
+ f = this.ctx.createLinearGradient(t + i, e, t + i + l, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t + i, e, l, s);
2552
2536
  break;
2553
2537
  case "top":
2554
- f = this.ctx.createLinearGradient(t, e - h, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e - h, i, h);
2538
+ f = this.ctx.createLinearGradient(t, e - l, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e - l, i, l);
2555
2539
  break;
2556
2540
  case "bottom":
2557
- f = this.ctx.createLinearGradient(t, e + s, t, e + s + h), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e + s, i, h);
2541
+ f = this.ctx.createLinearGradient(t, e + s, t, e + s + l), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e + s, i, l);
2558
2542
  break;
2559
2543
  default:
2560
2544
  console.error("Invalid side specified for shadow");
@@ -2575,11 +2559,11 @@ class fi {
2575
2559
  drawImage(t, e, i, s, r) {
2576
2560
  this.ctx.save(), this.ctx.drawImage(t, e, i, s, r), this.ctx.restore();
2577
2561
  }
2578
- drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: n, radius: h = 0 } = {}) {
2579
- if (this.ctx.save(), this.ctx.beginPath(), n !== void 0 && (this.ctx.fillStyle = n), o !== void 0 && (this.ctx.lineWidth = r, this.ctx.strokeStyle = o), h === 0)
2562
+ drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: n, radius: l = 0 } = {}) {
2563
+ if (this.ctx.save(), this.ctx.beginPath(), n !== void 0 && (this.ctx.fillStyle = n), o !== void 0 && (this.ctx.lineWidth = r, this.ctx.strokeStyle = o), l === 0)
2580
2564
  this.ctx.rect(t - 0.5, e - 0.5, i, s);
2581
2565
  else {
2582
- const [c, d, f, x] = typeof h == "number" ? [h, h, h, h] : h;
2566
+ const [c, d, f, x] = typeof l == "number" ? [l, l, l, l] : l;
2583
2567
  this.ctx.moveTo(t + c, e), this.ctx.arcTo(t + i, e, t + i, e + d, d), this.ctx.arcTo(t + i, e + s, t + i - f, e + s, f), this.ctx.arcTo(t, e + s, t, e + s - x, x), this.ctx.arcTo(t, e, t + c, e, c);
2584
2568
  }
2585
2569
  n !== void 0 && this.ctx.fill(), o !== void 0 && this.ctx.stroke(), this.ctx.restore();
@@ -2598,16 +2582,16 @@ class fi {
2598
2582
  this.ctx.save();
2599
2583
  const {
2600
2584
  font: n = "12px Arial",
2601
- align: h = "center",
2585
+ align: l = "center",
2602
2586
  color: c = "#495060",
2603
2587
  padding: d = 0,
2604
2588
  verticalAlign: f = "middle"
2605
2589
  } = o;
2606
- this.ctx.font = n, this.ctx.fillStyle = c, this.ctx.textBaseline = f, this.ctx.textAlign = h;
2590
+ this.ctx.font = n, this.ctx.fillStyle = c, this.ctx.textBaseline = f, this.ctx.textAlign = l;
2607
2591
  let x = 0;
2608
2592
  f === "top" ? x = i + d : f === "bottom" ? x = i + r - d : x = i + (r + 1) / 2;
2609
2593
  let g = 0;
2610
- h === "left" ? g = e + d : h === "right" ? g = e + s - d : g = e + s / 2;
2594
+ l === "left" ? g = e + d : l === "right" ? g = e + s - d : g = e + s / 2;
2611
2595
  const { _text: p, ellipsis: u } = this.handleEllipsis(t, s, d, n);
2612
2596
  return this.ctx.fillText(p, g, x), this.ctx.restore(), u;
2613
2597
  }
@@ -2618,8 +2602,8 @@ class fi {
2618
2602
  _text: "",
2619
2603
  ellipsis: r
2620
2604
  };
2621
- const n = this.ctx.measureText("...").width, h = this.ctx.measureText(t).width;
2622
- if (h && h + n >= e - i * 2) {
2605
+ const n = this.ctx.measureText("...").width, l = this.ctx.measureText(t).width;
2606
+ if (l && l + n >= e - i * 2) {
2623
2607
  r = !0;
2624
2608
  let c = 0;
2625
2609
  for (let d = 0; d < t.length; d++)
@@ -2913,15 +2897,15 @@ class xi {
2913
2897
  c.setAttribute("fill", e);
2914
2898
  });
2915
2899
  const n = new Image();
2916
- let h = "";
2900
+ let l = "";
2917
2901
  if (i) {
2918
2902
  const c = new Blob([new XMLSerializer().serializeToString(o)], {
2919
2903
  type: "image/svg+xml"
2920
2904
  });
2921
- h = URL.createObjectURL(c);
2905
+ l = URL.createObjectURL(c);
2922
2906
  } else
2923
- h = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(o));
2924
- return n.src = h, new Promise((c, d) => {
2907
+ l = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(o));
2908
+ return n.src = l, new Promise((c, d) => {
2925
2909
  n.onerror = () => d(new Error("Failed to load image")), n.onload = () => {
2926
2910
  c(n);
2927
2911
  };
@@ -2932,8 +2916,8 @@ class xi {
2932
2916
  }
2933
2917
  }
2934
2918
  class oe extends re {
2935
- constructor(e, i, s, r, o, n, h) {
2936
- super(e, s, r, o, n, "header", h.fixed);
2919
+ constructor(e, i, s, r, o, n, l) {
2920
+ super(e, s, r, o, n, "header", l.fixed);
2937
2921
  a(this, "align");
2938
2922
  a(this, "verticalAlign", "middle");
2939
2923
  a(this, "fixed");
@@ -2970,7 +2954,7 @@ class oe extends re {
2970
2954
  a(this, "drawImageHeight", 0);
2971
2955
  a(this, "drawImageName", "");
2972
2956
  a(this, "drawImageSource");
2973
- this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, this.minWidth = h.minWidth, this.maxWidth = h.maxWidth, 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 || 0, this.operation = h.operation || !1, this.text = h.title, this.column = h, this.colspan = h.colspan || 1, this.widthFillDisable = h.widthFillDisable || !1, this.rowspan = h.rowspan || 1, this.rules = h.rules, this.readonly = h.readonly || !1, this.required = h.required || !1, this.rowKey = Jt(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2957
+ this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = l.key, this.minWidth = l.minWidth, this.maxWidth = l.maxWidth, 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 || 0, this.operation = l.operation || !1, this.text = l.title, this.column = l, this.colspan = l.colspan || 1, this.widthFillDisable = l.widthFillDisable || !1, this.rowspan = l.rowspan || 1, this.rules = l.rules, this.readonly = l.readonly || !1, this.required = l.required || !1, this.rowKey = Jt(), this.hasChildren = l.children && l.children.length > 0 || !1, this.render = l.renderHeader;
2974
2958
  }
2975
2959
  /**
2976
2960
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -2990,11 +2974,11 @@ class oe extends re {
2990
2974
  const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
2991
2975
  let r = i, o = s;
2992
2976
  if (typeof e == "function") {
2993
- const n = e, { backgroundColor: h, color: c } = n({
2977
+ const n = e, { backgroundColor: l, color: c } = n({
2994
2978
  colIndex: this.colIndex,
2995
2979
  column: this.column
2996
2980
  }) || {};
2997
- h && (r = h), c && (o = c);
2981
+ l && (r = l), c && (o = c);
2998
2982
  }
2999
2983
  this.drawCellBgColor = r, this.drawTextColor = o;
3000
2984
  }
@@ -3005,11 +2989,11 @@ class oe extends re {
3005
2989
  const {
3006
2990
  paint: e,
3007
2991
  config: { BORDER_COLOR: i, CELL_PADDING: s, HEADER_FONT: r, BORDER: o }
3008
- } = this.ctx, { drawX: n, drawY: h, displayText: c } = this;
3009
- e.drawRect(n, h, this.width, this.height, {
2992
+ } = this.ctx, { drawX: n, drawY: l, displayText: c } = this;
2993
+ e.drawRect(n, l, this.width, this.height, {
3010
2994
  borderColor: o ? i : "transparent",
3011
2995
  fillColor: this.drawCellBgColor
3012
- }), e.drawText(c, n, h, this.width, this.height, {
2996
+ }), e.drawText(c, n, l, this.width, this.height, {
3013
2997
  font: r,
3014
2998
  padding: s,
3015
2999
  color: this.drawTextColor,
@@ -3030,9 +3014,9 @@ class oe extends re {
3030
3014
  drawSelection() {
3031
3015
  const { width: e, height: i, type: s } = this;
3032
3016
  if (["index-selection", "selection"].includes(s)) {
3033
- const { indeterminate: r, check: o, selectable: n } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: h = 0 } = this.ctx.config, c = this.drawX + (e - h) / 2, d = this.drawY + (i - h) / 2;
3017
+ const { indeterminate: r, check: o, selectable: n } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: l = 0 } = this.ctx.config, c = this.drawX + (e - l) / 2, d = this.drawY + (i - l) / 2;
3034
3018
  let f = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck";
3035
- r ? (f = this.ctx.icons.get("checkbox-indeterminate"), x = "checkbox-indeterminate") : o && n ? (f = this.ctx.icons.get("checkbox-check"), x = "checkbox-check") : o && n ? (f = this.ctx.icons.get("checkbox-check-disabled"), x = "checkbox-check-disabled") : !o && n ? (f = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck") : (f = this.ctx.icons.get("checkbox-disabled"), x = "checkbox-disabled"), f && (this.drawImageX = c, this.drawImageY = d, this.drawImageWidth = h, this.drawImageHeight = h, this.drawImageName = x, this.drawImageSource = f, this.ctx.paint.drawImage(
3019
+ r ? (f = this.ctx.icons.get("checkbox-indeterminate"), x = "checkbox-indeterminate") : o && n ? (f = this.ctx.icons.get("checkbox-check"), x = "checkbox-check") : o && n ? (f = this.ctx.icons.get("checkbox-check-disabled"), x = "checkbox-check-disabled") : !o && n ? (f = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck") : (f = this.ctx.icons.get("checkbox-disabled"), x = "checkbox-disabled"), f && (this.drawImageX = c, this.drawImageY = d, this.drawImageWidth = l, this.drawImageHeight = l, this.drawImageName = x, this.drawImageSource = f, this.ctx.paint.drawImage(
3036
3020
  this.drawImageSource,
3037
3021
  this.drawImageX,
3038
3022
  this.drawImageY,
@@ -3169,10 +3153,10 @@ class ui {
3169
3153
  colIndex: t.colIndex,
3170
3154
  column: t.column,
3171
3155
  value: t.getValue()
3172
- }).then((h) => {
3173
- this.ctx.database.setExpandChildren(t.rowKey, h), this.ctx.database.expandLoading(t.rowKey, !1), this.ctx.emit("expandChange", this.ctx.database.getExpandRowKeys());
3174
- }).catch((h) => {
3175
- this.ctx.database.expandLoading(t.rowKey, !1), console.error(h);
3156
+ }).then((l) => {
3157
+ this.ctx.database.setExpandChildren(t.rowKey, l), this.ctx.database.expandLoading(t.rowKey, !1), this.ctx.emit("expandChange", this.ctx.database.getExpandRowKeys());
3158
+ }).catch((l) => {
3159
+ this.ctx.database.expandLoading(t.rowKey, !1), console.error(l);
3176
3160
  }));
3177
3161
  else {
3178
3162
  const n = this.ctx.database.getIsExpand(t.rowKey);
@@ -3204,15 +3188,15 @@ class ui {
3204
3188
  if (this.isInsideBody(e))
3205
3189
  for (const o of i) {
3206
3190
  const n = o.fixedCells.concat(o.noFixedCells);
3207
- for (const h of n) {
3208
- const c = h.getDrawX(), d = h.getDrawY();
3191
+ for (const l of n) {
3192
+ const c = l.getDrawX(), d = l.getDrawY();
3209
3193
  if (r) {
3210
- if (t > c && t < c + h.visibleWidth && e > d && e < d + h.visibleHeight) {
3211
- s(h);
3194
+ if (t > c && t < c + l.visibleWidth && e > d && e < d + l.visibleHeight) {
3195
+ s(l);
3212
3196
  return;
3213
3197
  }
3214
- } else if (t > c && t < c + h.width && e > d && e < d + h.height) {
3215
- s(h);
3198
+ } else if (t > c && t < c + l.width && e > d && e < d + l.height) {
3199
+ s(l);
3216
3200
  return;
3217
3201
  }
3218
3202
  }
@@ -3346,10 +3330,10 @@ class gi {
3346
3330
  canvasElement: r,
3347
3331
  overlayerElement: o,
3348
3332
  editorElement: n,
3349
- emptyElement: h,
3333
+ emptyElement: l,
3350
3334
  contextMenuElement: c
3351
3335
  } = t;
3352
- this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = n, this.emptyElement = h, this.contextMenuElement = c, this.config = new Wt(e.config || {}), this.eventBus = new di(), this.eventBrowser = new ci(this), this.eventTable = new ui(this), this.paint = new fi(this.canvasElement), this.database = new li(this, e), this.history = new hi(this), this.icons = new xi(this);
3336
+ this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = n, this.emptyElement = l, this.contextMenuElement = c, this.config = new Wt(e.config || {}), this.eventBus = new di(), this.eventBrowser = new ci(this), this.eventTable = new ui(this), this.paint = new fi(this.canvasElement), this.database = new hi(this, e), this.history = new li(this), this.icons = new xi(this);
3353
3337
  }
3354
3338
  setConfig(t) {
3355
3339
  this.config = new Wt(t);
@@ -3358,8 +3342,8 @@ class gi {
3358
3342
  if (this.config.ENABLE_MERGE_CELL_LINK) {
3359
3343
  const o = this.database.getVirtualBodyCellByKey(t, e);
3360
3344
  if (o && (o.mergeRow || o.mergeCol)) {
3361
- const { dataList: n } = o.getSpanInfo(), h = n.map((c) => ({ ...c, value: i }));
3362
- this.database.batchSetItemValue(h, s);
3345
+ const { dataList: n } = o.getSpanInfo(), l = n.map((c) => ({ ...c, value: i }));
3346
+ this.database.batchSetItemValue(l, s);
3363
3347
  return;
3364
3348
  }
3365
3349
  }
@@ -3373,7 +3357,7 @@ class gi {
3373
3357
  if (r === void 0 || o === void 0) return;
3374
3358
  const n = this.database.getVirtualBodyCell(r, o);
3375
3359
  if (n) {
3376
- const { dataList: h } = n.getSpanInfo(), c = h.map((d) => ({ ...d, value: s.value }));
3360
+ const { dataList: l } = n.getSpanInfo(), c = l.map((d) => ({ ...d, value: s.value }));
3377
3361
  i.push(...c);
3378
3362
  }
3379
3363
  }), this.database.batchSetItemValue(i, e);
@@ -3418,7 +3402,7 @@ class gi {
3418
3402
  for (let r = 0; r <= e[1] - e[0]; r++) {
3419
3403
  const o = [];
3420
3404
  for (let n = 0; n <= i[1] - i[0]; n++) {
3421
- const h = r + e[0], c = n + i[0], d = this.database.getItemValueForRowIndexAndColIndex(h, c);
3405
+ const l = r + e[0], c = n + i[0], d = this.database.getItemValueForRowIndexAndColIndex(l, c);
3422
3406
  d && o.push(d.value);
3423
3407
  }
3424
3408
  s += `${o.join(" ")}\r`, t.push(o);
@@ -3539,8 +3523,8 @@ class zt {
3539
3523
  if (this.isOnScrollbar(e, i) && t.target === this.ctx.canvasElement ? this.isFocus = !0 : this.isFocus = !1, o === 0 || s == this.clientX && r == this.clientY) return;
3540
3524
  let n = 0;
3541
3525
  if (this.type === "horizontal" ? n = s - this.clientX : n = r - this.clientY, this.isDragging && n !== 0) {
3542
- let h = 0;
3543
- this.type === "vertical" ? h = this.dragStart + n / (this.visibleDistance - this.barHeight) * this.distance : h = this.dragStart + n / (this.visibleDistance - this.barWidth) * this.distance, this.scroll = Math.max(0, Math.min(h, this.distance));
3526
+ let l = 0;
3527
+ this.type === "vertical" ? l = this.dragStart + n / (this.visibleDistance - this.barHeight) * this.distance : l = this.dragStart + n / (this.visibleDistance - this.barWidth) * this.distance, this.scroll = Math.max(0, Math.min(l, this.distance));
3544
3528
  }
3545
3529
  }
3546
3530
  isPointInElement(t, e, i, s, r, o) {
@@ -3566,21 +3550,21 @@ class zt {
3566
3550
  stageHeight: i,
3567
3551
  stageWidth: s,
3568
3552
  config: { SCROLLER_TRACK_SIZE: r = 0, SCROLLER_SIZE: o = 0, BORDER: n }
3569
- } = this.ctx, h = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
3553
+ } = this.ctx, l = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
3570
3554
  if (this.type === "vertical") {
3571
- this.visibleDistance = c - r - d, this.distance = x - this.visibleDistance + g, this.trackX = h - r, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + r, d], this.trackWidth = r, this.trackHeight = c, this.barX = this.trackX - 1 + (r - o) / 2, this.barWidth = o;
3555
+ this.visibleDistance = c - r - d, this.distance = x - this.visibleDistance + g, this.trackX = l - r, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + r, d], this.trackWidth = r, this.trackHeight = c, this.barX = this.trackX - 1 + (r - o) / 2, this.barWidth = o;
3572
3556
  const p = this.distance ? this.visibleDistance / (x + g) : 0;
3573
3557
  let u = Math.floor(p * this.visibleDistance);
3574
3558
  u < 30 ? u = 30 : u > this.visibleDistance && (u = 0), this.barHeight = u, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3575
3559
  } else {
3576
- this.visibleDistance = h - r, this.distance = f - this.visibleDistance, this.splitPoints = [
3577
- h - r,
3560
+ this.visibleDistance = l - r, this.distance = f - this.visibleDistance, this.splitPoints = [
3561
+ l - r,
3578
3562
  c - r,
3579
- h - r,
3563
+ l - r,
3580
3564
  c
3581
3565
  ];
3582
3566
  const p = n ? 0 : 0.5;
3583
- this.trackX = 0, this.trackY = c - r + p, this.trackWidth = h, this.trackHeight = r;
3567
+ this.trackX = 0, this.trackY = c - r + p, this.trackWidth = l, this.trackHeight = r;
3584
3568
  const u = this.distance ? this.visibleDistance / f : 0;
3585
3569
  let w = Math.floor(u * this.visibleDistance);
3586
3570
  this.barY = this.trackY - 1 + (r - o) / 2, w < 30 ? w = 30 : w >= this.visibleDistance && (w = 0), this.barWidth = w, this.barHeight = o, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
@@ -3729,9 +3713,9 @@ class pi {
3729
3713
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3730
3714
  const n = this.ctx.containerElement.getBoundingClientRect();
3731
3715
  this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(n.width) : this.ctx.stageWidth = Math.floor(this.width + e), this.ctx.stageElement.style.width = this.ctx.stageWidth + "px", this.visibleWidth = this.ctx.stageWidth - e;
3732
- const h = this.visibleWidth - this.width;
3733
- if (this.resizeNum && h > 0) {
3734
- const f = Math.floor(h / this.resizeNum * 100) / 100;
3716
+ const l = this.visibleWidth - this.width;
3717
+ if (this.resizeNum && l > 0) {
3718
+ const f = Math.floor(l / this.resizeNum * 100) / 100;
3735
3719
  this.resizeAllColumn(f);
3736
3720
  }
3737
3721
  const c = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
@@ -3756,8 +3740,8 @@ class pi {
3756
3740
  } = this.ctx;
3757
3741
  if (this.isResizing && this.resizeTarget) {
3758
3742
  const r = this.resizeTarget.width, o = this.resizeTarget.minWidth, n = this.resizeTarget.maxWidth;
3759
- let h = e.clientX - this.clientX;
3760
- h + r < s && (h = -(r - s)), o && h + r < o && (h = -(r - o)), n && h + r > n && (h = n - r), this.resizeDiff = h, this.ctx.emit("draw");
3743
+ let l = e.clientX - this.clientX;
3744
+ l + r < s && (l = -(r - s)), o && l + r < o && (l = -(r - o)), n && l + r > n && (l = n - r), this.resizeDiff = l, this.ctx.emit("draw");
3761
3745
  } else {
3762
3746
  if (this.resizeTarget = null, this.isMouseDown)
3763
3747
  return;
@@ -3768,9 +3752,9 @@ class pi {
3768
3752
  this.ctx.stageElement.style.cursor === "col-resize" && (this.ctx.stageElement.style.cursor = "default");
3769
3753
  const r = [...this.renderFixedCellHeaders, ...this.renderCenterCellHeaders];
3770
3754
  for (const o of r) {
3771
- const { offsetX: n, offsetY: h } = this.ctx.getOffset(e), c = n, d = o.getDrawX();
3755
+ const { offsetX: n, offsetY: l } = this.ctx.getOffset(e), c = n, d = o.getDrawX();
3772
3756
  c > d + o.width - 5 && c < d + o.width + 4 && c < i - 4 && // 视窗中最后一列不允许调整宽
3773
- o.colspan <= 1 && this.ctx.isTarget(e) && h <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3757
+ o.colspan <= 1 && this.ctx.isTarget(e) && l <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3774
3758
  }
3775
3759
  }
3776
3760
  }));
@@ -3824,10 +3808,10 @@ class pi {
3824
3808
  let s = e;
3825
3809
  const { HEADER_HEIGHT: r = 0 } = this.ctx.config;
3826
3810
  for (let o = 0; o < i; o++) {
3827
- const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
3811
+ const n = t[o], l = r * (n.rowspan || 0), c = r * (n.level || 0);
3828
3812
  let { minWidth: d, maxWidth: f } = n, x = n.width || 100;
3829
3813
  d && x < d && (x = d), f && x > f && (x = f), n.children && (x = _t(n.children).reduce((u, w) => u + ((w == null ? void 0 : w.width) || 100), 0));
3830
- const g = new oe(this.ctx, this.columnIndex, s, c, x, h, n);
3814
+ const g = new oe(this.ctx, this.columnIndex, s, c, x, l, n);
3831
3815
  this.ctx.database.setHeader(n.key, g), this.allCellHeaders.push(g), n.children || (this.leafCellHeaders.push(g), g.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(g) : n.fixed === "right" ? this.fixedRightCellHeaders.push(g) : this.centerCellHeaders.push(g), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += x;
3832
3816
  }
3833
3817
  }
@@ -3859,8 +3843,8 @@ class pi {
3859
3843
  colorStart: "rgba(0,0,0,0.1)",
3860
3844
  colorEnd: "rgba(0,0,0,0)"
3861
3845
  }), i < Math.floor(s.width - r - 1) && e !== n) {
3862
- const h = s.width - (this.x + this.width) + r - e;
3863
- this.ctx.paint.drawShadow(h, this.y, e, this.height, {
3846
+ const l = s.width - (this.x + this.width) + r - e;
3847
+ this.ctx.paint.drawShadow(l, this.y, e, this.height, {
3864
3848
  fillColor: o,
3865
3849
  side: "left",
3866
3850
  shadowWidth: 4,
@@ -3902,7 +3886,7 @@ class pi {
3902
3886
  }
3903
3887
  }
3904
3888
  class ne {
3905
- constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, h = "body") {
3889
+ constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, l = "body") {
3906
3890
  a(this, "ctx");
3907
3891
  a(this, "x", 0);
3908
3892
  a(this, "y", 0);
@@ -3915,7 +3899,7 @@ class ne {
3915
3899
  a(this, "rowKey", "");
3916
3900
  a(this, "rowType", "body");
3917
3901
  a(this, "data");
3918
- 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 = n, this.update();
3902
+ 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 = n, this.update();
3919
3903
  }
3920
3904
  update() {
3921
3905
  const { header: t } = this.ctx, e = [], i = [], s = [];
@@ -3993,7 +3977,7 @@ class mi {
3993
3977
  FOOTER_FIXED: r,
3994
3978
  SCROLLER_TRACK_SIZE: o = 0,
3995
3979
  HEIGHT: n,
3996
- EMPTY_BODY_HEIGHT: h = 0,
3980
+ EMPTY_BODY_HEIGHT: l = 0,
3997
3981
  MAX_HEIGHT: c = 0,
3998
3982
  ENABLE_OFFSET_HEIGHT: d = 0,
3999
3983
  OFFSET_HEIGHT: f = 0,
@@ -4006,18 +3990,18 @@ class mi {
4006
3990
  const { data: g, sumHeight: p } = s.getData();
4007
3991
  this.height = p, this.data = g, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - o;
4008
3992
  const u = this.ctx.footer.height;
4009
- !this.data.length && !n ? this.height = h : !this.data.length && n && (this.height = n - e.height - u - o);
3993
+ !this.data.length && !n ? this.height = l : !this.data.length && n && (this.height = n - e.height - u - o);
4010
3994
  let w = this.height + e.height + o;
4011
3995
  w += u;
4012
3996
  let m = w;
4013
- const b = window.innerHeight, { top: y } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4014
- if (b > y && d && !n) {
4015
- const T = b - y - f;
3997
+ const C = window.innerHeight, { top: y } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
3998
+ if (C > y && d && !n) {
3999
+ const T = C - y - f;
4016
4000
  T > e.height + o ? m = T : w > c && (m = c);
4017
4001
  } else this.data.length && n ? m = n : this.data.length && c && w > c && (m = c);
4018
4002
  m > 0 && (this.ctx.stageHeight = Math.floor(m), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
4019
- let C = this.ctx.stageHeight - e.height - o;
4020
- r ? this.visibleHeight = C - u : this.visibleHeight = C, this.data.length || (this.height = this.visibleHeight), 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 = g;
4003
+ let b = this.ctx.stageHeight - e.height - o;
4004
+ r ? this.visibleHeight = b - u : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), 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 = g;
4021
4005
  const E = window.devicePixelRatio || 1, R = this.ctx.stageWidth * E, O = this.ctx.stageHeight * E;
4022
4006
  t.width = Math.round(R), t.height = Math.round(O);
4023
4007
  const I = this.data.length ? "not-empty" : "empty";
@@ -4028,7 +4012,7 @@ class mi {
4028
4012
  bodyHeight: this.height,
4029
4013
  footerHeight: u,
4030
4014
  width: this.width,
4031
- height: this.data.length ? 0 : h + u
4015
+ height: this.data.length ? 0 : l + u
4032
4016
  });
4033
4017
  const _ = Math.round(t.width / E * 1e4) / 1e4, v = Math.round(t.height / E * 1e4) / 1e4;
4034
4018
  this.ctx.canvasElement.setAttribute("style", `height:${v}px;width:${_}px;`), this.ctx.paint.scale(E);
@@ -4051,7 +4035,7 @@ class mi {
4051
4035
  }), this.ctx.on("mousemove", (e) => {
4052
4036
  if (this.ctx.editing) return;
4053
4037
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s, n = e.clientY, {
4054
- stageHeight: h,
4038
+ stageHeight: l,
4055
4039
  scrollY: c,
4056
4040
  config: { RESIZE_ROW_MIN_HEIGHT: d = 0 }
4057
4041
  } = this.ctx;
@@ -4071,7 +4055,7 @@ class mi {
4071
4055
  this.ctx.stageElement.style.cursor === "row-resize" && (this.ctx.stageElement.style.cursor = "default");
4072
4056
  for (let f = 0; f < this.renderRows.length; f++) {
4073
4057
  const x = this.renderRows[f];
4074
- if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < h - 4)
4058
+ if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < l - 4)
4075
4059
  for (let p = 0; p < x.cells.length; p++) {
4076
4060
  const u = x.cells[p];
4077
4061
  o > u.drawX + 10 && o < u.drawX + u.width - 10 && u.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
@@ -4120,8 +4104,8 @@ class mi {
4120
4104
  colorStart: "rgba(0,0,0,0.1)",
4121
4105
  colorEnd: "rgba(0,0,0,0)"
4122
4106
  }), i < Math.floor(s.width - r - 1) && e !== n) {
4123
- const h = s.width - (this.x + this.width) + r - e;
4124
- this.ctx.paint.drawShadow(h, this.y, e, this.height, {
4107
+ const l = s.width - (this.x + this.width) + r - e;
4108
+ this.ctx.paint.drawShadow(l, this.y, e, this.height, {
4125
4109
  fillColor: o,
4126
4110
  side: "left",
4127
4111
  shadowWidth: 4,
@@ -4149,12 +4133,12 @@ class mi {
4149
4133
  config: { CELL_HEIGHT: s }
4150
4134
  } = this.ctx, r = i, { data: o, positions: n } = e.getData();
4151
4135
  this.ctx.maxRowIndex = o.length - 1;
4152
- let h = this.binarySearch(n, r), c = this.binarySearch(n, r + this.visibleHeight);
4153
- if (c === -1 && (c = this.ctx.maxRowIndex), h === -1 && c === this.ctx.maxRowIndex) {
4136
+ let l = this.binarySearch(n, r), c = this.binarySearch(n, r + this.visibleHeight);
4137
+ if (c === -1 && (c = this.ctx.maxRowIndex), l === -1 && c === this.ctx.maxRowIndex) {
4154
4138
  const f = Math.floor(this.visibleHeight / s);
4155
- h = this.ctx.maxRowIndex - f;
4139
+ l = this.ctx.maxRowIndex - f;
4156
4140
  }
4157
- this.headIndex = Math.max(0, h), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 1), this.visibleRows = o.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4141
+ this.headIndex = Math.max(0, l), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 1), this.visibleRows = o.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4158
4142
  const d = [];
4159
4143
  for (let f = 0; f < this.visibleRows.length; f++) {
4160
4144
  const x = this.headIndex + f, g = this.visibleRows[f], { height: p, top: u } = this.ctx.database.getPositionForRowIndex(x), w = new ne(this.ctx, x, 0, u + this.y, t.width, p, g);
@@ -4205,8 +4189,8 @@ class yi {
4205
4189
  stageWidth: r,
4206
4190
  config: { HEADER_BG_COLOR: o, SCROLLER_TRACK_SIZE: n }
4207
4191
  } = this.ctx;
4208
- let h = this.y;
4209
- 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, {
4192
+ let l = this.y;
4193
+ 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, {
4210
4194
  fillColor: o,
4211
4195
  side: "right",
4212
4196
  shadowWidth: 4,
@@ -4214,7 +4198,7 @@ class yi {
4214
4198
  colorEnd: "rgba(0,0,0,0)"
4215
4199
  }), i < Math.floor(s.width - r - 1) && e !== n) {
4216
4200
  const c = s.width - (this.x + this.width) + r - e;
4217
- this.ctx.paint.drawShadow(c, h, e, this.height, {
4201
+ this.ctx.paint.drawShadow(c, l, e, this.height, {
4218
4202
  fillColor: o,
4219
4203
  side: "left",
4220
4204
  shadowWidth: 4,
@@ -4370,20 +4354,20 @@ class Ei {
4370
4354
  this.ctx.mousedown && (this.ctx.selectorMove = !0), this.ctx.selector.enable = !0;
4371
4355
  const {
4372
4356
  SELECTOR_AREA_MIN_X: n,
4373
- SELECTOR_AREA_MAX_X: h,
4357
+ SELECTOR_AREA_MAX_X: l,
4374
4358
  SELECTOR_AREA_MIN_Y: c,
4375
4359
  SELECTOR_AREA_MAX_Y: d,
4376
4360
  SELECTOR_AREA_MAX_X_OFFSET: f,
4377
4361
  SELECTOR_AREA_MAX_Y_OFFSET: x
4378
- } = this.ctx.config, g = n, p = h || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4379
- let [m, b] = r, [y, C] = o;
4380
- if (m < g || b > p || y < u || C > w)
4362
+ } = this.ctx.config, g = n, p = l || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4363
+ let [m, C] = r, [y, b] = o;
4364
+ if (m < g || C > p || y < u || b > w)
4381
4365
  return;
4382
4366
  if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4383
4367
  const R = this.adjustMergeCells(r, o);
4384
- y = R.yArr[0], C = R.yArr[1], m = R.xArr[0], b = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
4368
+ y = R.yArr[0], b = R.yArr[1], m = R.xArr[0], C = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
4385
4369
  }
4386
- m === b && y === C ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, m), Math.min(p, b)], o = [Math.max(u, y), Math.min(w, C)];
4370
+ m === C && y === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, m), Math.min(p, C)], o = [Math.max(u, y), Math.min(w, b)];
4387
4371
  const { BEFORE_SET_SELECTOR_METHOD: E } = this.ctx.config;
4388
4372
  if (typeof E == "function") {
4389
4373
  const O = E({
@@ -4401,25 +4385,25 @@ class Ei {
4401
4385
  adjustMergeCells(t, e) {
4402
4386
  var p;
4403
4387
  const [i, s] = e, [r, o] = t;
4404
- let n = [], h = [];
4388
+ let n = [], l = [];
4405
4389
  for (let u = 0; u <= e[1] - e[0]; u++)
4406
4390
  for (let w = 0; w <= t[1] - t[0]; w++) {
4407
- const m = u + e[0], b = w + t[0], y = this.ctx.database.getVirtualBodyCell(m, b);
4408
- y && ((m === i || m === s) && n.push(y), (b === r || b === o) && h.push(y));
4391
+ const m = u + e[0], C = w + t[0], y = this.ctx.database.getVirtualBodyCell(m, C);
4392
+ y && ((m === i || m === s) && n.push(y), (C === r || C === o) && l.push(y));
4409
4393
  }
4410
4394
  const c = n.reduce(
4411
4395
  (u, w) => {
4412
- const { yArr: m } = w.getSpanInfo(), [b, y] = m;
4413
- return u.minY = Math.min(u.minY, b), u.maxY = Math.max(u.maxY, y), u;
4396
+ const { yArr: m } = w.getSpanInfo(), [C, y] = m;
4397
+ return u.minY = Math.min(u.minY, C), u.maxY = Math.max(u.maxY, y), u;
4414
4398
  },
4415
4399
  {
4416
4400
  minY: i,
4417
4401
  maxY: s
4418
4402
  }
4419
- ), d = h.reduce(
4403
+ ), d = l.reduce(
4420
4404
  (u, w) => {
4421
- const { xArr: m } = w.getSpanInfo(), [b, y] = m;
4422
- return u.minX = Math.min(u.minX, b), u.maxX = Math.max(u.maxX, y), u;
4405
+ const { xArr: m } = w.getSpanInfo(), [C, y] = m;
4406
+ return u.minX = Math.min(u.minX, C), u.maxX = Math.max(u.maxX, y), u;
4423
4407
  },
4424
4408
  {
4425
4409
  minX: r,
@@ -4448,15 +4432,15 @@ class Ei {
4448
4432
  if (this.ctx.mousedown && this.ctx.focusCellHeader) {
4449
4433
  const { colIndex: n } = this.ctx.focusCellHeader;
4450
4434
  if (this.ctx.clearSelector(), t.colIndex >= n) {
4451
- const h = [n, t.colIndex + t.colspan - 1], c = [r, o];
4452
- this.setSelector(h, c);
4435
+ const l = [n, t.colIndex + t.colspan - 1], c = [r, o];
4436
+ this.setSelector(l, c);
4453
4437
  } else {
4454
- const h = [t.colIndex, n], c = [r, o];
4455
- this.setSelector(h, c);
4438
+ const l = [t.colIndex, n], c = [r, o];
4439
+ this.setSelector(l, c);
4456
4440
  }
4457
4441
  } else {
4458
- const n = [t.colIndex, t.colIndex + t.colspan - 1], h = [r, o];
4459
- this.setSelector(n, h);
4442
+ const n = [t.colIndex, t.colIndex + t.colspan - 1], l = [r, o];
4443
+ this.setSelector(n, l);
4460
4444
  }
4461
4445
  }
4462
4446
  selectAll() {
@@ -4470,8 +4454,8 @@ class Ei {
4470
4454
  SELECTOR_AREA_MIN_Y: r,
4471
4455
  SELECTOR_AREA_MAX_Y: o,
4472
4456
  SELECTOR_AREA_MAX_X_OFFSET: n,
4473
- SELECTOR_AREA_MAX_Y_OFFSET: h
4474
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h, g = [c, d], p = [f, x];
4457
+ SELECTOR_AREA_MAX_Y_OFFSET: l
4458
+ } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - l, g = [c, d], p = [f, x];
4475
4459
  this.setSelector(g, p);
4476
4460
  }
4477
4461
  }
@@ -4481,16 +4465,16 @@ class Ei {
4481
4465
  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, n = i;
4482
4466
  if (e) {
4483
4467
  this.ctx.setFocusCell(t);
4484
- const h = [n, o], c = [t.rowIndex, t.rowIndex];
4485
- this.setSelector(h, c);
4468
+ const l = [n, o], c = [t.rowIndex, t.rowIndex];
4469
+ this.setSelector(l, c);
4486
4470
  }
4487
4471
  if (this.ctx.focusCell && this.ctx.mousedown) {
4488
- const { rowIndex: h } = this.ctx.focusCell;
4489
- if (t.rowIndex >= h) {
4490
- const c = [n, o], d = [h, t.rowIndex];
4472
+ const { rowIndex: l } = this.ctx.focusCell;
4473
+ if (t.rowIndex >= l) {
4474
+ const c = [n, o], d = [l, t.rowIndex];
4491
4475
  this.setSelector(c, d);
4492
4476
  } else {
4493
- const c = [n, o], d = [t.rowIndex, h];
4477
+ const c = [n, o], d = [t.rowIndex, l];
4494
4478
  this.setSelector(c, d);
4495
4479
  }
4496
4480
  }
@@ -4500,7 +4484,7 @@ class Ei {
4500
4484
  return;
4501
4485
  const { mousedown: t, focusCell: e, hoverCell: i } = this.ctx;
4502
4486
  if (t && e && i) {
4503
- const { rowIndex: s, colIndex: r } = e, o = Math.min(i.colIndex, r), n = Math.max(i.colIndex, r), h = Math.min(i.rowIndex, s), c = Math.max(i.rowIndex, s), d = [o, n], f = [h, c];
4487
+ const { rowIndex: s, colIndex: r } = e, o = Math.min(i.colIndex, r), n = Math.max(i.colIndex, r), l = Math.min(i.rowIndex, s), c = Math.max(i.rowIndex, s), d = [o, n], f = [l, c];
4504
4488
  this.setSelector(d, f);
4505
4489
  }
4506
4490
  }
@@ -4510,7 +4494,7 @@ class Ei {
4510
4494
  if (this.ctx.selector.enable = !0, i && t) {
4511
4495
  if (this.ctx.config.ENABLE_SELECTOR_SINGLE)
4512
4496
  return;
4513
- const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: n } = e, h = Math.min(o, s), c = Math.max(o, s), d = Math.min(n, r), f = Math.max(n, r), x = [h, c], g = [d, f];
4497
+ const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: n } = e, l = Math.min(o, s), c = Math.max(o, s), d = Math.min(n, r), f = Math.max(n, r), x = [l, c], g = [d, f];
4514
4498
  this.setSelector(x, g);
4515
4499
  } else {
4516
4500
  this.ctx.emit("cellSelectedClick", e);
@@ -4576,8 +4560,8 @@ class Ei {
4576
4560
  let s = [];
4577
4561
  const r = /* @__PURE__ */ new Set();
4578
4562
  for (let n = 0; n <= e[1] - e[0]; n++)
4579
- for (let h = 0; h <= t[1] - t[0]; h++) {
4580
- const c = n + e[0], d = h + t[0], f = this.ctx.database.getItemValueForRowIndexAndColIndex(c, d);
4563
+ for (let l = 0; l <= t[1] - t[0]; l++) {
4564
+ const c = n + e[0], d = l + t[0], f = this.ctx.database.getItemValueForRowIndexAndColIndex(c, d);
4581
4565
  if (f) {
4582
4566
  const { rowKey: x, key: g } = f;
4583
4567
  this.ctx.database.getReadonly(x, g) || (r.add(x), s.push({
@@ -4609,7 +4593,7 @@ class Ei {
4609
4593
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4610
4594
  navigator.clipboard.readText().then(async (r) => {
4611
4595
  let o = si(r);
4612
- const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], [c, d] = h, [f, x] = n, g = d - this.ctx.maxRowIndex, p = x - this.ctx.maxColIndex;
4596
+ const n = [i, i + o[0].length - 1], l = [e, e + o.length - 1], [c, d] = l, [f, x] = n, g = d - this.ctx.maxRowIndex, p = x - this.ctx.maxColIndex;
4613
4597
  (g > 0 || p > 0) && this.ctx.emit("onPastedDataOverflow", {
4614
4598
  maxY: d,
4615
4599
  maxX: x,
@@ -4620,7 +4604,7 @@ class Ei {
4620
4604
  textArr: o
4621
4605
  });
4622
4606
  const u = o.length === 1 && o[0].length === 1;
4623
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !u) {
4607
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, l) && !u) {
4624
4608
  const y = {
4625
4609
  code: "ERR_MERGED_CELLS_PASTE",
4626
4610
  message: "Merged cells cannot span paste data"
@@ -4630,8 +4614,8 @@ class Ei {
4630
4614
  }
4631
4615
  let w = [];
4632
4616
  for (let y = 0; y <= o.length - 1; y++) {
4633
- const C = o[y].length;
4634
- for (let E = 0; E <= C - 1; E++) {
4617
+ const b = o[y].length;
4618
+ for (let E = 0; E <= b - 1; E++) {
4635
4619
  const R = y + e, O = E + i, I = o[y][E], _ = this.ctx.database.getItemValueForRowIndexAndColIndex(
4636
4620
  R,
4637
4621
  O
@@ -4654,30 +4638,30 @@ class Ei {
4654
4638
  this.ctx.selector.yArrCopy,
4655
4639
  !0
4656
4640
  // 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
4657
- ), C = w.map((E) => `${E.rowKey}-${E.key}`);
4641
+ ), b = w.map((E) => `${E.rowKey}-${E.key}`);
4658
4642
  y.forEach((E) => {
4659
- C.includes(`${E.rowKey}-${E.key}`) || w.unshift(E);
4643
+ b.includes(`${E.rowKey}-${E.key}`) || w.unshift(E);
4660
4644
  }), this.isCut = !1;
4661
4645
  }
4662
4646
  if (!w.length)
4663
4647
  return;
4664
4648
  const { BEFORE_PASTE_DATA_METHOD: m } = this.ctx.config;
4665
4649
  if (typeof m == "function") {
4666
- const y = m, C = w.map((E) => ({
4650
+ const y = m, b = w.map((E) => ({
4667
4651
  rowKey: E.rowKey,
4668
4652
  key: E.key,
4669
4653
  value: E.value,
4670
4654
  oldValue: this.ctx.database.getItemValue(E.rowKey, E.key),
4671
4655
  row: this.ctx.database.getRowDataItemForRowKey(E.rowKey)
4672
4656
  }));
4673
- if (w = await y(C, n, h, o), w && !w.length)
4657
+ if (w = await y(b, n, l, o), w && !w.length)
4674
4658
  return;
4675
4659
  }
4676
4660
  this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
4677
- let b = [];
4661
+ let C = [];
4678
4662
  s.forEach((y) => {
4679
- b.push(this.ctx.database.getRowDataItemForRowKey(y));
4680
- }), this.ctx.emit("pasteChange", w, b);
4663
+ C.push(this.ctx.database.getRowDataItemForRowKey(y));
4664
+ }), this.ctx.emit("pasteChange", w, C);
4681
4665
  }).catch((r) => {
4682
4666
  console.error("Failed to get the clipboard content:", r);
4683
4667
  });
@@ -4693,7 +4677,7 @@ class Ei {
4693
4677
  if (!e)
4694
4678
  return;
4695
4679
  let { colIndex: i = 0, rowIndex: s = 0 } = e;
4696
- const r = 0, o = 0, n = this.ctx.maxColIndex, h = this.ctx.maxRowIndex;
4680
+ const r = 0, o = 0, n = this.ctx.maxColIndex, l = this.ctx.maxRowIndex;
4697
4681
  switch (t) {
4698
4682
  case "LEFT":
4699
4683
  i > r && i--;
@@ -4705,7 +4689,7 @@ class Ei {
4705
4689
  i < n && i++;
4706
4690
  break;
4707
4691
  case "BOTTOM":
4708
- s < h && s++;
4692
+ s < l && s++;
4709
4693
  break;
4710
4694
  }
4711
4695
  const c = [i, i], d = [s, s], f = this.getCell(s, i);
@@ -4722,8 +4706,8 @@ class Ei {
4722
4706
  SELECTOR_AREA_MIN_Y: r,
4723
4707
  SELECTOR_AREA_MAX_Y: o,
4724
4708
  SELECTOR_AREA_MAX_X_OFFSET: n,
4725
- SELECTOR_AREA_MAX_Y_OFFSET: h
4726
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h;
4709
+ SELECTOR_AREA_MAX_Y_OFFSET: l
4710
+ } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - l;
4727
4711
  return !(e < c || e > d || t < f || t > x);
4728
4712
  }
4729
4713
  /**
@@ -4737,7 +4721,7 @@ class Ei {
4737
4721
  let n = 10 * (s === "left" ? -1 : 1);
4738
4722
  this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerX = setInterval(() => {
4739
4723
  n *= 1.5;
4740
- const { scrollX: h } = this.ctx, c = h + n;
4724
+ const { scrollX: l } = this.ctx, c = l + n;
4741
4725
  (c < 0 || c > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(c);
4742
4726
  }, 100);
4743
4727
  }
@@ -4746,7 +4730,7 @@ class Ei {
4746
4730
  let n = 10 * (r === "top" ? -1 : 1);
4747
4731
  this.timerY && (clearInterval(this.timerY), this.timerY = 0), this.timerY = setInterval(() => {
4748
4732
  n *= 1.5;
4749
- const { scrollY: h } = this.ctx, c = h + n;
4733
+ const { scrollY: l } = this.ctx, c = l + n;
4750
4734
  (c < 0 || c > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(c);
4751
4735
  }, 100);
4752
4736
  }
@@ -4763,7 +4747,7 @@ class Ei {
4763
4747
  fixedLeftWidth: r,
4764
4748
  header: o,
4765
4749
  footer: n,
4766
- body: h,
4750
+ body: l,
4767
4751
  scrollX: c,
4768
4752
  scrollY: d,
4769
4753
  config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK: p }
@@ -4771,14 +4755,14 @@ class Ei {
4771
4755
  if (!i)
4772
4756
  return;
4773
4757
  p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4774
- const { drawX: u, drawY: w, width: m, height: b, fixed: y } = i, C = r - u + 1, E = i.drawX + m - (e - s) + 1;
4775
- let R = o.height - w, O = b;
4776
- O > h.visibleHeight && (O = h.visibleHeight);
4758
+ const { drawX: u, drawY: w, width: m, height: C, fixed: y } = i, b = r - u + 1, E = i.drawX + m - (e - s) + 1;
4759
+ let R = o.height - w, O = C;
4760
+ O > l.visibleHeight && (O = l.visibleHeight);
4777
4761
  let I = 0;
4778
4762
  x && (g === "top" ? R = o.height + n.height - w : I = n.visibleHeight);
4779
4763
  const _ = w + O - (t - I - f);
4780
4764
  let v = c, S = d;
4781
- E > 0 && !y ? v = Math.floor(c + E) : C > 0 && !y && (v = Math.floor(c - C)), R > 0 ? S = Math.floor(d - R) : _ > 0 && (S = Math.floor(d + _)), (Math.abs(c - v) > 2 || Math.abs(d - S) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, S), this.ctx.emit("adjustBoundaryPosition", i));
4765
+ E > 0 && !y ? v = Math.floor(c + E) : b > 0 && !y && (v = Math.floor(c - b)), R > 0 ? S = Math.floor(d - R) : _ > 0 && (S = Math.floor(d + _)), (Math.abs(c - v) > 2 || Math.abs(d - S) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, S), this.ctx.emit("adjustBoundaryPosition", i));
4782
4766
  }
4783
4767
  destroy() {
4784
4768
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -4794,7 +4778,7 @@ class Ci {
4794
4778
  this.ctx.on("mousemove", (t) => {
4795
4779
  if (this.ctx.stageElement.style.cursor === "crosshair" && (this.ctx.stageElement.style.cursor = "default"), this.ctx.editing || !this.ctx.focusCell || !this.maxColRowCell)
4796
4780
  return;
4797
- const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: r, drawX: o, drawY: n, width: h, height: c } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || r === this.ctx.maxRowIndex ? 0 : 2, x = o + h - d + f, g = n + c - d + f;
4781
+ const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: r, drawX: o, drawY: n, width: l, height: c } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || r === this.ctx.maxRowIndex ? 0 : 2, x = o + l - d + f, g = n + c - d + f;
4798
4782
  e > x && i > g && e < x + d && i < g + d && (this.ctx.stageElement.style.cursor = "crosshair");
4799
4783
  }), this.ctx.on("cellMouseenter", (t) => {
4800
4784
  const { xArr: e, yArr: i } = this.ctx.selector, s = e[1], r = i[1], { colIndex: o, rowIndex: n } = t;
@@ -4827,26 +4811,26 @@ class Ci {
4827
4811
  return;
4828
4812
  let o = t, n = e;
4829
4813
  if (!r) {
4830
- const [h] = n;
4831
- n = [h, h];
4814
+ const [l] = n;
4815
+ n = [l, l];
4832
4816
  }
4833
4817
  if (!s) {
4834
- const [h] = o;
4835
- o = [h, h];
4818
+ const [l] = o;
4819
+ o = [l, l];
4836
4820
  }
4837
4821
  if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(o) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(n)) {
4838
4822
  const {
4839
- SELECTOR_AREA_MIN_X: h,
4823
+ SELECTOR_AREA_MIN_X: l,
4840
4824
  SELECTOR_AREA_MAX_X: c,
4841
4825
  SELECTOR_AREA_MIN_Y: d,
4842
4826
  SELECTOR_AREA_MAX_Y: f,
4843
4827
  SELECTOR_AREA_MAX_X_OFFSET: x,
4844
4828
  SELECTOR_AREA_MAX_Y_OFFSET: g
4845
- } = this.ctx.config, p = h, u = c || this.ctx.maxColIndex - x, w = d, m = f || this.ctx.maxRowIndex - g;
4846
- let [b, y] = o, [C, E] = n;
4847
- if (b < p || C < w)
4829
+ } = this.ctx.config, p = l, u = c || this.ctx.maxColIndex - x, w = d, m = f || this.ctx.maxRowIndex - g;
4830
+ let [C, y] = o, [b, E] = n;
4831
+ if (C < p || b < w)
4848
4832
  return;
4849
- o = [Math.max(p, b), Math.min(u, y)], n = [Math.max(w, C), Math.min(m, E)];
4833
+ o = [Math.max(p, C), Math.min(u, y)], n = [Math.max(w, b), Math.min(m, E)];
4850
4834
  const { BEFORE_SET_AUTOFILL_METHOD: R } = this.ctx.config;
4851
4835
  if (typeof R == "function") {
4852
4836
  const I = R({
@@ -4871,8 +4855,8 @@ class Ci {
4871
4855
  const u = g + e.yArr[0], w = p + e.xArr[0];
4872
4856
  i.set(`${u}-${w}`, !0);
4873
4857
  }
4874
- const { value: s } = e, r = s[0].length, o = s.length, n = this.ctx.autofill.xArr, h = this.ctx.autofill.yArr, c = r === 1 && o === 1;
4875
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !c) {
4858
+ const { value: s } = e, r = s[0].length, o = s.length, n = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr, c = r === 1 && o === 1;
4859
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, l) && !c) {
4876
4860
  const g = {
4877
4861
  code: "ERR_MERGED_CELLS_AUTOFILL",
4878
4862
  message: "Merged cells cannot span autofill data"
@@ -4881,13 +4865,13 @@ class Ci {
4881
4865
  return;
4882
4866
  }
4883
4867
  let d = [];
4884
- for (let g = 0; g <= h[1] - h[0]; g++)
4868
+ for (let g = 0; g <= l[1] - l[0]; g++)
4885
4869
  for (let p = 0; p <= n[1] - n[0]; p++) {
4886
- const u = p + n[0], w = g + h[0], m = s[g % o][p % r], b = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), y = `${w}-${u}`;
4887
- if (b && !i.has(y)) {
4888
- const { rowKey: C, key: E } = b;
4889
- this.ctx.database.getReadonly(C, E) || (t.add(C), d.push({
4890
- rowKey: C,
4870
+ const u = p + n[0], w = g + l[0], m = s[g % o][p % r], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), y = `${w}-${u}`;
4871
+ if (C && !i.has(y)) {
4872
+ const { rowKey: b, key: E } = C;
4873
+ this.ctx.database.getReadonly(b, E) || (t.add(b), d.push({
4874
+ rowKey: b,
4891
4875
  key: E,
4892
4876
  value: m,
4893
4877
  row: {}
@@ -4906,7 +4890,7 @@ class Ci {
4906
4890
  oldValue: this.ctx.database.getItemValue(u.rowKey, u.key),
4907
4891
  row: this.ctx.database.getRowDataItemForRowKey(u.rowKey)
4908
4892
  }));
4909
- if (d = await g(p, n, h), d && !d.length)
4893
+ if (d = await g(p, n, l), d && !d.length)
4910
4894
  return;
4911
4895
  }
4912
4896
  this.ctx.batchSetItemValueByEditor(d, !0);
@@ -4927,9 +4911,9 @@ class Ci {
4927
4911
  destroy() {
4928
4912
  }
4929
4913
  }
4930
- const rt = Math.min, U = Math.max, ft = Math.round, z = (l) => ({
4931
- x: l,
4932
- y: l
4914
+ const rt = Math.min, U = Math.max, ft = Math.round, z = (h) => ({
4915
+ x: h,
4916
+ y: h
4933
4917
  }), bi = {
4934
4918
  left: "right",
4935
4919
  right: "left",
@@ -4939,46 +4923,46 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (l) => ({
4939
4923
  start: "end",
4940
4924
  end: "start"
4941
4925
  };
4942
- function It(l, t, e) {
4943
- return U(l, rt(t, e));
4926
+ function It(h, t, e) {
4927
+ return U(h, rt(t, e));
4944
4928
  }
4945
- function at(l, t) {
4946
- return typeof l == "function" ? l(t) : l;
4929
+ function at(h, t) {
4930
+ return typeof h == "function" ? h(t) : h;
4947
4931
  }
4948
- function G(l) {
4949
- return l.split("-")[0];
4932
+ function G(h) {
4933
+ return h.split("-")[0];
4950
4934
  }
4951
- function lt(l) {
4952
- return l.split("-")[1];
4935
+ function ht(h) {
4936
+ return h.split("-")[1];
4953
4937
  }
4954
- function ae(l) {
4955
- return l === "x" ? "y" : "x";
4938
+ function ae(h) {
4939
+ return h === "x" ? "y" : "x";
4956
4940
  }
4957
- function Mt(l) {
4958
- return l === "y" ? "height" : "width";
4941
+ function Mt(h) {
4942
+ return h === "y" ? "height" : "width";
4959
4943
  }
4960
- function J(l) {
4961
- return ["top", "bottom"].includes(G(l)) ? "y" : "x";
4944
+ function J(h) {
4945
+ return ["top", "bottom"].includes(G(h)) ? "y" : "x";
4962
4946
  }
4963
- function Ht(l) {
4964
- return ae(J(l));
4947
+ function Ht(h) {
4948
+ return ae(J(h));
4965
4949
  }
4966
- function Ri(l, t, e) {
4950
+ function Ri(h, t, e) {
4967
4951
  e === void 0 && (e = !1);
4968
- const i = lt(l), s = Ht(l), r = Mt(s);
4952
+ const i = ht(h), s = Ht(h), r = Mt(s);
4969
4953
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4970
4954
  return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4971
4955
  }
4972
- function _i(l) {
4973
- const t = xt(l);
4974
- return [Ot(l), t, Ot(t)];
4956
+ function _i(h) {
4957
+ const t = xt(h);
4958
+ return [Ot(h), t, Ot(t)];
4975
4959
  }
4976
- function Ot(l) {
4977
- return l.replace(/start|end/g, (t) => vi[t]);
4960
+ function Ot(h) {
4961
+ return h.replace(/start|end/g, (t) => vi[t]);
4978
4962
  }
4979
- function Ii(l, t, e) {
4963
+ function Ii(h, t, e) {
4980
4964
  const i = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], o = ["bottom", "top"];
4981
- switch (l) {
4965
+ switch (h) {
4982
4966
  case "top":
4983
4967
  case "bottom":
4984
4968
  return e ? t ? s : i : t ? i : s;
@@ -4989,38 +4973,38 @@ function Ii(l, t, e) {
4989
4973
  return [];
4990
4974
  }
4991
4975
  }
4992
- function Oi(l, t, e, i) {
4993
- const s = lt(l);
4994
- let r = Ii(G(l), e === "start", i);
4976
+ function Oi(h, t, e, i) {
4977
+ const s = ht(h);
4978
+ let r = Ii(G(h), e === "start", i);
4995
4979
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4996
4980
  }
4997
- function xt(l) {
4998
- return l.replace(/left|right|bottom|top/g, (t) => bi[t]);
4981
+ function xt(h) {
4982
+ return h.replace(/left|right|bottom|top/g, (t) => bi[t]);
4999
4983
  }
5000
- function Li(l) {
4984
+ function Li(h) {
5001
4985
  return {
5002
4986
  top: 0,
5003
4987
  right: 0,
5004
4988
  bottom: 0,
5005
4989
  left: 0,
5006
- ...l
4990
+ ...h
5007
4991
  };
5008
4992
  }
5009
- function le(l) {
5010
- return typeof l != "number" ? Li(l) : {
5011
- top: l,
5012
- right: l,
5013
- bottom: l,
5014
- left: l
4993
+ function he(h) {
4994
+ return typeof h != "number" ? Li(h) : {
4995
+ top: h,
4996
+ right: h,
4997
+ bottom: h,
4998
+ left: h
5015
4999
  };
5016
5000
  }
5017
- function ut(l) {
5001
+ function ut(h) {
5018
5002
  const {
5019
5003
  x: t,
5020
5004
  y: e,
5021
5005
  width: i,
5022
5006
  height: s
5023
- } = l;
5007
+ } = h;
5024
5008
  return {
5025
5009
  width: i,
5026
5010
  height: s,
@@ -5032,14 +5016,14 @@ function ut(l) {
5032
5016
  y: e
5033
5017
  };
5034
5018
  }
5035
- function $t(l, t, e) {
5019
+ function $t(h, t, e) {
5036
5020
  let {
5037
5021
  reference: i,
5038
5022
  floating: s
5039
- } = l;
5040
- const r = J(t), o = Ht(t), n = Mt(o), h = G(t), c = r === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[n] / 2 - s[n] / 2;
5023
+ } = h;
5024
+ const r = J(t), o = Ht(t), n = Mt(o), l = G(t), c = r === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[n] / 2 - s[n] / 2;
5041
5025
  let g;
5042
- switch (h) {
5026
+ switch (l) {
5043
5027
  case "top":
5044
5028
  g = {
5045
5029
  x: d,
@@ -5070,7 +5054,7 @@ function $t(l, t, e) {
5070
5054
  y: i.y
5071
5055
  };
5072
5056
  }
5073
- switch (lt(t)) {
5057
+ switch (ht(t)) {
5074
5058
  case "start":
5075
5059
  g[o] -= x * (e && c ? -1 : 1);
5076
5060
  break;
@@ -5080,29 +5064,29 @@ function $t(l, t, e) {
5080
5064
  }
5081
5065
  return g;
5082
5066
  }
5083
- const Si = async (l, t, e) => {
5067
+ const Si = async (h, t, e) => {
5084
5068
  const {
5085
5069
  placement: i = "bottom",
5086
5070
  strategy: s = "absolute",
5087
5071
  middleware: r = [],
5088
5072
  platform: o
5089
- } = e, n = r.filter(Boolean), h = await (o.isRTL == null ? void 0 : o.isRTL(t));
5073
+ } = e, n = r.filter(Boolean), l = await (o.isRTL == null ? void 0 : o.isRTL(t));
5090
5074
  let c = await o.getElementRects({
5091
- reference: l,
5075
+ reference: h,
5092
5076
  floating: t,
5093
5077
  strategy: s
5094
5078
  }), {
5095
5079
  x: d,
5096
5080
  y: f
5097
- } = $t(c, i, h), x = i, g = {}, p = 0;
5081
+ } = $t(c, i, l), x = i, g = {}, p = 0;
5098
5082
  for (let u = 0; u < n.length; u++) {
5099
5083
  const {
5100
5084
  name: w,
5101
5085
  fn: m
5102
5086
  } = n[u], {
5103
- x: b,
5087
+ x: C,
5104
5088
  y,
5105
- data: C,
5089
+ data: b,
5106
5090
  reset: E
5107
5091
  } = await m({
5108
5092
  x: d,
@@ -5114,24 +5098,24 @@ const Si = async (l, t, e) => {
5114
5098
  rects: c,
5115
5099
  platform: o,
5116
5100
  elements: {
5117
- reference: l,
5101
+ reference: h,
5118
5102
  floating: t
5119
5103
  }
5120
5104
  });
5121
- d = b ?? d, f = y ?? f, g = {
5105
+ d = C ?? d, f = y ?? f, g = {
5122
5106
  ...g,
5123
5107
  [w]: {
5124
5108
  ...g[w],
5125
- ...C
5109
+ ...b
5126
5110
  }
5127
5111
  }, E && p <= 50 && (p++, typeof E == "object" && (E.placement && (x = E.placement), E.rects && (c = E.rects === !0 ? await o.getElementRects({
5128
- reference: l,
5112
+ reference: h,
5129
5113
  floating: t,
5130
5114
  strategy: s
5131
5115
  }) : E.rects), {
5132
5116
  x: d,
5133
5117
  y: f
5134
- } = $t(c, x, h)), u = -1);
5118
+ } = $t(c, x, l)), u = -1);
5135
5119
  }
5136
5120
  return {
5137
5121
  x: d,
@@ -5141,7 +5125,7 @@ const Si = async (l, t, e) => {
5141
5125
  middlewareData: g
5142
5126
  };
5143
5127
  };
5144
- async function he(l, t) {
5128
+ async function le(h, t) {
5145
5129
  var e;
5146
5130
  t === void 0 && (t = {});
5147
5131
  const {
@@ -5150,24 +5134,24 @@ async function he(l, t) {
5150
5134
  platform: r,
5151
5135
  rects: o,
5152
5136
  elements: n,
5153
- strategy: h
5154
- } = l, {
5137
+ strategy: l
5138
+ } = h, {
5155
5139
  boundary: c = "clippingAncestors",
5156
5140
  rootBoundary: d = "viewport",
5157
5141
  elementContext: f = "floating",
5158
5142
  altBoundary: x = !1,
5159
5143
  padding: g = 0
5160
- } = at(t, l), p = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], m = ut(await r.getClippingRect({
5144
+ } = at(t, h), p = he(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], m = ut(await r.getClippingRect({
5161
5145
  element: (e = await (r.isElement == null ? void 0 : r.isElement(w))) == null || e ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(n.floating)),
5162
5146
  boundary: c,
5163
5147
  rootBoundary: d,
5164
- strategy: h
5165
- })), b = f === "floating" ? {
5148
+ strategy: l
5149
+ })), C = f === "floating" ? {
5166
5150
  x: i,
5167
5151
  y: s,
5168
5152
  width: o.floating.width,
5169
5153
  height: o.floating.height
5170
- } : o.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), C = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
5154
+ } : o.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
5171
5155
  x: 1,
5172
5156
  y: 1
5173
5157
  } : {
@@ -5175,20 +5159,20 @@ async function he(l, t) {
5175
5159
  y: 1
5176
5160
  }, E = ut(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
5177
5161
  elements: n,
5178
- rect: b,
5162
+ rect: C,
5179
5163
  offsetParent: y,
5180
- strategy: h
5181
- }) : b);
5164
+ strategy: l
5165
+ }) : C);
5182
5166
  return {
5183
- top: (m.top - E.top + p.top) / C.y,
5184
- bottom: (E.bottom - m.bottom + p.bottom) / C.y,
5185
- left: (m.left - E.left + p.left) / C.x,
5186
- right: (E.right - m.right + p.right) / C.x
5167
+ top: (m.top - E.top + p.top) / b.y,
5168
+ bottom: (E.bottom - m.bottom + p.bottom) / b.y,
5169
+ left: (m.left - E.left + p.left) / b.x,
5170
+ right: (E.right - m.right + p.right) / b.x
5187
5171
  };
5188
5172
  }
5189
- const Ti = (l) => ({
5173
+ const Ti = (h) => ({
5190
5174
  name: "arrow",
5191
- options: l,
5175
+ options: h,
5192
5176
  async fn(t) {
5193
5177
  const {
5194
5178
  x: e,
@@ -5197,20 +5181,20 @@ const Ti = (l) => ({
5197
5181
  rects: r,
5198
5182
  platform: o,
5199
5183
  elements: n,
5200
- middlewareData: h
5184
+ middlewareData: l
5201
5185
  } = t, {
5202
5186
  element: c,
5203
5187
  padding: d = 0
5204
- } = at(l, t) || {};
5188
+ } = at(h, t) || {};
5205
5189
  if (c == null)
5206
5190
  return {};
5207
- const f = le(d), x = {
5191
+ const f = he(d), x = {
5208
5192
  x: e,
5209
5193
  y: i
5210
- }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", m = w ? "top" : "left", b = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", C = r.reference[p] + r.reference[g] - x[g] - r.floating[p], E = x[g] - r.reference[g], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5194
+ }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", m = w ? "top" : "left", C = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[p] + r.reference[g] - x[g] - r.floating[p], E = x[g] - r.reference[g], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5211
5195
  let O = R ? R[y] : 0;
5212
5196
  (!O || !await (o.isElement == null ? void 0 : o.isElement(R))) && (O = n.floating[y] || r.floating[p]);
5213
- const I = C / 2 - E / 2, _ = O / 2 - u[p] / 2 - 1, v = rt(f[m], _), S = rt(f[b], _), T = v, M = O - u[p] - S, A = O / 2 - u[p] / 2 + I, N = It(T, A, M), Y = !h.arrow && lt(s) != null && A !== N && r.reference[p] / 2 - (A < T ? v : S) - u[p] / 2 < 0, k = Y ? A < T ? A - T : A - M : 0;
5197
+ const I = b / 2 - E / 2, _ = O / 2 - u[p] / 2 - 1, v = rt(f[m], _), S = rt(f[C], _), T = v, M = O - u[p] - S, A = O / 2 - u[p] / 2 + I, N = It(T, A, M), Y = !l.arrow && ht(s) != null && A !== N && r.reference[p] / 2 - (A < T ? v : S) - u[p] / 2 < 0, k = Y ? A < T ? A - T : A - M : 0;
5214
5198
  return {
5215
5199
  [g]: x[g] + k,
5216
5200
  data: {
@@ -5223,10 +5207,10 @@ const Ti = (l) => ({
5223
5207
  reset: Y
5224
5208
  };
5225
5209
  }
5226
- }), Ai = function(l) {
5227
- return l === void 0 && (l = {}), {
5210
+ }), Ai = function(h) {
5211
+ return h === void 0 && (h = {}), {
5228
5212
  name: "flip",
5229
- options: l,
5213
+ options: h,
5230
5214
  async fn(t) {
5231
5215
  var e, i;
5232
5216
  const {
@@ -5234,7 +5218,7 @@ const Ti = (l) => ({
5234
5218
  middlewareData: r,
5235
5219
  rects: o,
5236
5220
  initialPlacement: n,
5237
- platform: h,
5221
+ platform: l,
5238
5222
  elements: c
5239
5223
  } = t, {
5240
5224
  mainAxis: d = !0,
@@ -5244,15 +5228,15 @@ const Ti = (l) => ({
5244
5228
  fallbackAxisSideDirection: p = "none",
5245
5229
  flipAlignment: u = !0,
5246
5230
  ...w
5247
- } = at(l, t);
5231
+ } = at(h, t);
5248
5232
  if ((e = r.arrow) != null && e.alignmentOffset)
5249
5233
  return {};
5250
- const m = G(s), b = J(n), y = G(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : _i(n)), R = p !== "none";
5251
- !x && R && E.push(...Oi(n, u, p, C));
5252
- const O = [n, ...E], I = await he(t, w), _ = [];
5234
+ const m = G(s), C = J(n), y = G(n) === n, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : _i(n)), R = p !== "none";
5235
+ !x && R && E.push(...Oi(n, u, p, b));
5236
+ const O = [n, ...E], I = await le(t, w), _ = [];
5253
5237
  let v = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5254
5238
  if (d && _.push(I[m]), f) {
5255
- const A = Ri(s, o, C);
5239
+ const A = Ri(s, o, b);
5256
5240
  _.push(I[A[0]], I[A[1]]);
5257
5241
  }
5258
5242
  if (v = [...v, {
@@ -5279,7 +5263,7 @@ const Ti = (l) => ({
5279
5263
  const k = (M = v.filter((W) => {
5280
5264
  if (R) {
5281
5265
  const P = J(W.placement);
5282
- return P === b || // Create a bias to the `y` side axis due to horizontal
5266
+ return P === C || // Create a bias to the `y` side axis due to horizontal
5283
5267
  // reading directions favoring greater width.
5284
5268
  P === "y";
5285
5269
  }
@@ -5303,12 +5287,12 @@ const Ti = (l) => ({
5303
5287
  }
5304
5288
  };
5305
5289
  };
5306
- async function Mi(l, t) {
5290
+ async function Mi(h, t) {
5307
5291
  const {
5308
5292
  placement: e,
5309
5293
  platform: i,
5310
5294
  elements: s
5311
- } = l, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = G(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, l);
5295
+ } = h, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = G(e), n = ht(e), l = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && l ? -1 : 1, f = at(t, h);
5312
5296
  let {
5313
5297
  mainAxis: x,
5314
5298
  crossAxis: g,
@@ -5322,7 +5306,7 @@ async function Mi(l, t) {
5322
5306
  crossAxis: f.crossAxis || 0,
5323
5307
  alignmentAxis: f.alignmentAxis
5324
5308
  };
5325
- return n && typeof p == "number" && (g = n === "end" ? p * -1 : p), h ? {
5309
+ return n && typeof p == "number" && (g = n === "end" ? p * -1 : p), l ? {
5326
5310
  x: g * d,
5327
5311
  y: x * c
5328
5312
  } : {
@@ -5330,10 +5314,10 @@ async function Mi(l, t) {
5330
5314
  y: g * d
5331
5315
  };
5332
5316
  }
5333
- const Hi = function(l) {
5334
- return l === void 0 && (l = 0), {
5317
+ const Hi = function(h) {
5318
+ return h === void 0 && (h = 0), {
5335
5319
  name: "offset",
5336
- options: l,
5320
+ options: h,
5337
5321
  async fn(t) {
5338
5322
  var e, i;
5339
5323
  const {
@@ -5341,21 +5325,21 @@ const Hi = function(l) {
5341
5325
  y: r,
5342
5326
  placement: o,
5343
5327
  middlewareData: n
5344
- } = t, h = await Mi(t, l);
5328
+ } = t, l = await Mi(t, h);
5345
5329
  return o === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
5346
- x: s + h.x,
5347
- y: r + h.y,
5330
+ x: s + l.x,
5331
+ y: r + l.y,
5348
5332
  data: {
5349
- ...h,
5333
+ ...l,
5350
5334
  placement: o
5351
5335
  }
5352
5336
  };
5353
5337
  }
5354
5338
  };
5355
- }, Di = function(l) {
5356
- return l === void 0 && (l = {}), {
5339
+ }, Di = function(h) {
5340
+ return h === void 0 && (h = {}), {
5357
5341
  name: "shift",
5358
- options: l,
5342
+ options: h,
5359
5343
  async fn(t) {
5360
5344
  const {
5361
5345
  x: e,
@@ -5368,27 +5352,27 @@ const Hi = function(l) {
5368
5352
  fn: (w) => {
5369
5353
  let {
5370
5354
  x: m,
5371
- y: b
5355
+ y: C
5372
5356
  } = w;
5373
5357
  return {
5374
5358
  x: m,
5375
- y: b
5359
+ y: C
5376
5360
  };
5377
5361
  }
5378
5362
  },
5379
- ...h
5380
- } = at(l, t), c = {
5363
+ ...l
5364
+ } = at(h, t), c = {
5381
5365
  x: e,
5382
5366
  y: i
5383
- }, d = await he(t, h), f = J(G(s)), x = ae(f);
5367
+ }, d = await le(t, l), f = J(G(s)), x = ae(f);
5384
5368
  let g = c[x], p = c[f];
5385
5369
  if (r) {
5386
- const w = x === "y" ? "top" : "left", m = x === "y" ? "bottom" : "right", b = g + d[w], y = g - d[m];
5387
- g = It(b, g, y);
5370
+ const w = x === "y" ? "top" : "left", m = x === "y" ? "bottom" : "right", C = g + d[w], y = g - d[m];
5371
+ g = It(C, g, y);
5388
5372
  }
5389
5373
  if (o) {
5390
- const w = f === "y" ? "top" : "left", m = f === "y" ? "bottom" : "right", b = p + d[w], y = p - d[m];
5391
- p = It(b, p, y);
5374
+ const w = f === "y" ? "top" : "left", m = f === "y" ? "bottom" : "right", C = p + d[w], y = p - d[m];
5375
+ p = It(C, p, y);
5392
5376
  }
5393
5377
  const u = n.fn({
5394
5378
  ...t,
@@ -5412,56 +5396,56 @@ const Hi = function(l) {
5412
5396
  function gt() {
5413
5397
  return typeof window < "u";
5414
5398
  }
5415
- function tt(l) {
5416
- return ce(l) ? (l.nodeName || "").toLowerCase() : "#document";
5399
+ function tt(h) {
5400
+ return ce(h) ? (h.nodeName || "").toLowerCase() : "#document";
5417
5401
  }
5418
- function X(l) {
5402
+ function X(h) {
5419
5403
  var t;
5420
- return (l == null || (t = l.ownerDocument) == null ? void 0 : t.defaultView) || window;
5404
+ return (h == null || (t = h.ownerDocument) == null ? void 0 : t.defaultView) || window;
5421
5405
  }
5422
- function V(l) {
5406
+ function V(h) {
5423
5407
  var t;
5424
- return (t = (ce(l) ? l.ownerDocument : l.document) || window.document) == null ? void 0 : t.documentElement;
5408
+ return (t = (ce(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
5425
5409
  }
5426
- function ce(l) {
5427
- return gt() ? l instanceof Node || l instanceof X(l).Node : !1;
5410
+ function ce(h) {
5411
+ return gt() ? h instanceof Node || h instanceof X(h).Node : !1;
5428
5412
  }
5429
- function B(l) {
5430
- return gt() ? l instanceof Element || l instanceof X(l).Element : !1;
5413
+ function B(h) {
5414
+ return gt() ? h instanceof Element || h instanceof X(h).Element : !1;
5431
5415
  }
5432
- function K(l) {
5433
- return gt() ? l instanceof HTMLElement || l instanceof X(l).HTMLElement : !1;
5416
+ function K(h) {
5417
+ return gt() ? h instanceof HTMLElement || h instanceof X(h).HTMLElement : !1;
5434
5418
  }
5435
- function qt(l) {
5436
- return !gt() || typeof ShadowRoot > "u" ? !1 : l instanceof ShadowRoot || l instanceof X(l).ShadowRoot;
5419
+ function qt(h) {
5420
+ return !gt() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof X(h).ShadowRoot;
5437
5421
  }
5438
- function ht(l) {
5422
+ function lt(h) {
5439
5423
  const {
5440
5424
  overflow: t,
5441
5425
  overflowX: e,
5442
5426
  overflowY: i,
5443
5427
  display: s
5444
- } = F(l);
5428
+ } = F(h);
5445
5429
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5446
5430
  }
5447
- function Xi(l) {
5448
- return ["table", "td", "th"].includes(tt(l));
5431
+ function Xi(h) {
5432
+ return ["table", "td", "th"].includes(tt(h));
5449
5433
  }
5450
- function wt(l) {
5434
+ function wt(h) {
5451
5435
  return [":popover-open", ":modal"].some((t) => {
5452
5436
  try {
5453
- return l.matches(t);
5437
+ return h.matches(t);
5454
5438
  } catch {
5455
5439
  return !1;
5456
5440
  }
5457
5441
  });
5458
5442
  }
5459
- function Dt(l) {
5460
- const t = Xt(), e = B(l) ? F(l) : l;
5443
+ function Dt(h) {
5444
+ const t = Xt(), e = B(h) ? F(h) : h;
5461
5445
  return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (e.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (e.contain || "").includes(i));
5462
5446
  }
5463
- function Bi(l) {
5464
- let t = $(l);
5447
+ function Bi(h) {
5448
+ let t = $(h);
5465
5449
  for (; K(t) && !Q(t); ) {
5466
5450
  if (Dt(t))
5467
5451
  return t;
@@ -5474,65 +5458,65 @@ function Bi(l) {
5474
5458
  function Xt() {
5475
5459
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
5476
5460
  }
5477
- function Q(l) {
5478
- return ["html", "body", "#document"].includes(tt(l));
5461
+ function Q(h) {
5462
+ return ["html", "body", "#document"].includes(tt(h));
5479
5463
  }
5480
- function F(l) {
5481
- return X(l).getComputedStyle(l);
5464
+ function F(h) {
5465
+ return X(h).getComputedStyle(h);
5482
5466
  }
5483
- function pt(l) {
5484
- return B(l) ? {
5485
- scrollLeft: l.scrollLeft,
5486
- scrollTop: l.scrollTop
5467
+ function pt(h) {
5468
+ return B(h) ? {
5469
+ scrollLeft: h.scrollLeft,
5470
+ scrollTop: h.scrollTop
5487
5471
  } : {
5488
- scrollLeft: l.scrollX,
5489
- scrollTop: l.scrollY
5472
+ scrollLeft: h.scrollX,
5473
+ scrollTop: h.scrollY
5490
5474
  };
5491
5475
  }
5492
- function $(l) {
5493
- if (tt(l) === "html")
5494
- return l;
5476
+ function $(h) {
5477
+ if (tt(h) === "html")
5478
+ return h;
5495
5479
  const t = (
5496
5480
  // Step into the shadow DOM of the parent of a slotted node.
5497
- l.assignedSlot || // DOM Element detected.
5498
- l.parentNode || // ShadowRoot detected.
5499
- qt(l) && l.host || // Fallback.
5500
- V(l)
5481
+ h.assignedSlot || // DOM Element detected.
5482
+ h.parentNode || // ShadowRoot detected.
5483
+ qt(h) && h.host || // Fallback.
5484
+ V(h)
5501
5485
  );
5502
5486
  return qt(t) ? t.host : t;
5503
5487
  }
5504
- function de(l) {
5505
- const t = $(l);
5506
- return Q(t) ? l.ownerDocument ? l.ownerDocument.body : l.body : K(t) && ht(t) ? t : de(t);
5488
+ function de(h) {
5489
+ const t = $(h);
5490
+ return Q(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) && lt(t) ? t : de(t);
5507
5491
  }
5508
- function Lt(l, t, e) {
5492
+ function Lt(h, t, e) {
5509
5493
  var i;
5510
5494
  t === void 0 && (t = []), e === void 0 && (e = !0);
5511
- const s = de(l), r = s === ((i = l.ownerDocument) == null ? void 0 : i.body), o = X(s);
5495
+ const s = de(h), r = s === ((i = h.ownerDocument) == null ? void 0 : i.body), o = X(s);
5512
5496
  if (r) {
5513
5497
  const n = St(o);
5514
- return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? Lt(n) : []);
5498
+ return t.concat(o, o.visualViewport || [], lt(s) ? s : [], n && e ? Lt(n) : []);
5515
5499
  }
5516
5500
  return t.concat(s, Lt(s, [], e));
5517
5501
  }
5518
- function St(l) {
5519
- return l.parent && Object.getPrototypeOf(l.parent) ? l.frameElement : null;
5502
+ function St(h) {
5503
+ return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
5520
5504
  }
5521
- function fe(l) {
5522
- const t = F(l);
5505
+ function fe(h) {
5506
+ const t = F(h);
5523
5507
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5524
- const s = K(l), r = s ? l.offsetWidth : e, o = s ? l.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5508
+ const s = K(h), r = s ? h.offsetWidth : e, o = s ? h.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5525
5509
  return n && (e = r, i = o), {
5526
5510
  width: e,
5527
5511
  height: i,
5528
5512
  $: n
5529
5513
  };
5530
5514
  }
5531
- function xe(l) {
5532
- return B(l) ? l : l.contextElement;
5515
+ function xe(h) {
5516
+ return B(h) ? h : h.contextElement;
5533
5517
  }
5534
- function Z(l) {
5535
- const t = xe(l);
5518
+ function Z(h) {
5519
+ const t = xe(h);
5536
5520
  if (!K(t))
5537
5521
  return z(1);
5538
5522
  const e = t.getBoundingClientRect(), {
@@ -5547,74 +5531,74 @@ function Z(l) {
5547
5531
  };
5548
5532
  }
5549
5533
  const Fi = /* @__PURE__ */ z(0);
5550
- function ue(l) {
5551
- const t = X(l);
5534
+ function ue(h) {
5535
+ const t = X(h);
5552
5536
  return !Xt() || !t.visualViewport ? Fi : {
5553
5537
  x: t.visualViewport.offsetLeft,
5554
5538
  y: t.visualViewport.offsetTop
5555
5539
  };
5556
5540
  }
5557
- function Ni(l, t, e) {
5558
- return t === void 0 && (t = !1), !e || t && e !== X(l) ? !1 : t;
5541
+ function Ni(h, t, e) {
5542
+ return t === void 0 && (t = !1), !e || t && e !== X(h) ? !1 : t;
5559
5543
  }
5560
- function ot(l, t, e, i) {
5544
+ function ot(h, t, e, i) {
5561
5545
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5562
- const s = l.getBoundingClientRect(), r = xe(l);
5546
+ const s = h.getBoundingClientRect(), r = xe(h);
5563
5547
  let o = z(1);
5564
- t && (i ? B(i) && (o = Z(i)) : o = Z(l));
5548
+ t && (i ? B(i) && (o = Z(i)) : o = Z(h));
5565
5549
  const n = Ni(r, e, i) ? ue(r) : z(0);
5566
- let h = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
5550
+ let l = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
5567
5551
  if (r) {
5568
5552
  const x = X(r), g = i && B(i) ? X(i) : i;
5569
5553
  let p = x, u = St(p);
5570
5554
  for (; u && i && g !== p; ) {
5571
- const w = Z(u), m = u.getBoundingClientRect(), b = F(u), y = m.left + (u.clientLeft + parseFloat(b.paddingLeft)) * w.x, C = m.top + (u.clientTop + parseFloat(b.paddingTop)) * w.y;
5572
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += C, p = X(u), u = St(p);
5555
+ const w = Z(u), m = u.getBoundingClientRect(), C = F(u), y = m.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = m.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
5556
+ l *= w.x, c *= w.y, d *= w.x, f *= w.y, l += y, c += b, p = X(u), u = St(p);
5573
5557
  }
5574
5558
  }
5575
5559
  return ut({
5576
5560
  width: d,
5577
5561
  height: f,
5578
- x: h,
5562
+ x: l,
5579
5563
  y: c
5580
5564
  });
5581
5565
  }
5582
- function ki(l) {
5566
+ function ki(h) {
5583
5567
  let {
5584
5568
  elements: t,
5585
5569
  rect: e,
5586
5570
  offsetParent: i,
5587
5571
  strategy: s
5588
- } = l;
5572
+ } = h;
5589
5573
  const r = s === "fixed", o = V(i), n = t ? wt(t.floating) : !1;
5590
5574
  if (i === o || n && r)
5591
5575
  return e;
5592
- let h = {
5576
+ let l = {
5593
5577
  scrollLeft: 0,
5594
5578
  scrollTop: 0
5595
5579
  }, c = z(1);
5596
5580
  const d = z(0), f = K(i);
5597
- if ((f || !f && !r) && ((tt(i) !== "body" || ht(o)) && (h = pt(i)), K(i))) {
5581
+ if ((f || !f && !r) && ((tt(i) !== "body" || lt(o)) && (l = pt(i)), K(i))) {
5598
5582
  const x = ot(i);
5599
5583
  c = Z(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5600
5584
  }
5601
5585
  return {
5602
5586
  width: e.width * c.x,
5603
5587
  height: e.height * c.y,
5604
- x: e.x * c.x - h.scrollLeft * c.x + d.x,
5605
- y: e.y * c.y - h.scrollTop * c.y + d.y
5588
+ x: e.x * c.x - l.scrollLeft * c.x + d.x,
5589
+ y: e.y * c.y - l.scrollTop * c.y + d.y
5606
5590
  };
5607
5591
  }
5608
- function Ki(l) {
5609
- return Array.from(l.getClientRects());
5592
+ function Ki(h) {
5593
+ return Array.from(h.getClientRects());
5610
5594
  }
5611
- function Tt(l, t) {
5612
- const e = pt(l).scrollLeft;
5613
- return t ? t.left + e : ot(V(l)).left + e;
5595
+ function Tt(h, t) {
5596
+ const e = pt(h).scrollLeft;
5597
+ return t ? t.left + e : ot(V(h)).left + e;
5614
5598
  }
5615
- function Yi(l) {
5616
- const t = V(l), e = pt(l), i = l.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5617
- let o = -e.scrollLeft + Tt(l);
5599
+ function Yi(h) {
5600
+ const t = V(h), e = pt(h), i = h.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5601
+ let o = -e.scrollLeft + Tt(h);
5618
5602
  const n = -e.scrollTop;
5619
5603
  return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5620
5604
  width: s,
@@ -5623,40 +5607,40 @@ function Yi(l) {
5623
5607
  y: n
5624
5608
  };
5625
5609
  }
5626
- function Vi(l, t) {
5627
- const e = X(l), i = V(l), s = e.visualViewport;
5628
- let r = i.clientWidth, o = i.clientHeight, n = 0, h = 0;
5610
+ function Vi(h, t) {
5611
+ const e = X(h), i = V(h), s = e.visualViewport;
5612
+ let r = i.clientWidth, o = i.clientHeight, n = 0, l = 0;
5629
5613
  if (s) {
5630
5614
  r = s.width, o = s.height;
5631
5615
  const c = Xt();
5632
- (!c || c && t === "fixed") && (n = s.offsetLeft, h = s.offsetTop);
5616
+ (!c || c && t === "fixed") && (n = s.offsetLeft, l = s.offsetTop);
5633
5617
  }
5634
5618
  return {
5635
5619
  width: r,
5636
5620
  height: o,
5637
5621
  x: n,
5638
- y: h
5622
+ y: l
5639
5623
  };
5640
5624
  }
5641
- function Wi(l, t) {
5642
- const e = ot(l, !0, t === "fixed"), i = e.top + l.clientTop, s = e.left + l.clientLeft, r = K(l) ? Z(l) : z(1), o = l.clientWidth * r.x, n = l.clientHeight * r.y, h = s * r.x, c = i * r.y;
5625
+ function Wi(h, t) {
5626
+ const e = ot(h, !0, t === "fixed"), i = e.top + h.clientTop, s = e.left + h.clientLeft, r = K(h) ? Z(h) : z(1), o = h.clientWidth * r.x, n = h.clientHeight * r.y, l = s * r.x, c = i * r.y;
5643
5627
  return {
5644
5628
  width: o,
5645
5629
  height: n,
5646
- x: h,
5630
+ x: l,
5647
5631
  y: c
5648
5632
  };
5649
5633
  }
5650
- function Gt(l, t, e) {
5634
+ function Gt(h, t, e) {
5651
5635
  let i;
5652
5636
  if (t === "viewport")
5653
- i = Vi(l, e);
5637
+ i = Vi(h, e);
5654
5638
  else if (t === "document")
5655
- i = Yi(V(l));
5639
+ i = Yi(V(h));
5656
5640
  else if (B(t))
5657
5641
  i = Wi(t, e);
5658
5642
  else {
5659
- const s = ue(l);
5643
+ const s = ue(h);
5660
5644
  i = {
5661
5645
  ...t,
5662
5646
  x: t.x - s.x,
@@ -5665,70 +5649,70 @@ function Gt(l, t, e) {
5665
5649
  }
5666
5650
  return ut(i);
5667
5651
  }
5668
- function ge(l, t) {
5669
- const e = $(l);
5652
+ function ge(h, t) {
5653
+ const e = $(h);
5670
5654
  return e === t || !B(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
5671
5655
  }
5672
- function Pi(l, t) {
5673
- const e = t.get(l);
5656
+ function Pi(h, t) {
5657
+ const e = t.get(h);
5674
5658
  if (e)
5675
5659
  return e;
5676
- let i = Lt(l, [], !1).filter((n) => B(n) && tt(n) !== "body"), s = null;
5677
- const r = F(l).position === "fixed";
5678
- let o = r ? $(l) : l;
5660
+ let i = Lt(h, [], !1).filter((n) => B(n) && tt(n) !== "body"), s = null;
5661
+ const r = F(h).position === "fixed";
5662
+ let o = r ? $(h) : h;
5679
5663
  for (; B(o) && !Q(o); ) {
5680
- const n = F(o), h = Dt(o);
5681
- !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(l, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5664
+ const n = F(o), l = Dt(o);
5665
+ !l && n.position === "fixed" && (s = null), (r ? !l && !s : !l && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || lt(o) && !l && ge(h, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5682
5666
  }
5683
- return t.set(l, i), i;
5667
+ return t.set(h, i), i;
5684
5668
  }
5685
- function zi(l) {
5669
+ function zi(h) {
5686
5670
  let {
5687
5671
  element: t,
5688
5672
  boundary: e,
5689
5673
  rootBoundary: i,
5690
5674
  strategy: s
5691
- } = l;
5692
- const o = [...e === "clippingAncestors" ? wt(t) ? [] : Pi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5675
+ } = h;
5676
+ const o = [...e === "clippingAncestors" ? wt(t) ? [] : Pi(t, this._c) : [].concat(e), i], n = o[0], l = o.reduce((c, d) => {
5693
5677
  const f = Gt(t, d, s);
5694
5678
  return c.top = U(f.top, c.top), c.right = rt(f.right, c.right), c.bottom = rt(f.bottom, c.bottom), c.left = U(f.left, c.left), c;
5695
5679
  }, Gt(t, n, s));
5696
5680
  return {
5697
- width: h.right - h.left,
5698
- height: h.bottom - h.top,
5699
- x: h.left,
5700
- y: h.top
5681
+ width: l.right - l.left,
5682
+ height: l.bottom - l.top,
5683
+ x: l.left,
5684
+ y: l.top
5701
5685
  };
5702
5686
  }
5703
- function $i(l) {
5687
+ function $i(h) {
5704
5688
  const {
5705
5689
  width: t,
5706
5690
  height: e
5707
- } = fe(l);
5691
+ } = fe(h);
5708
5692
  return {
5709
5693
  width: t,
5710
5694
  height: e
5711
5695
  };
5712
5696
  }
5713
- function qi(l, t, e) {
5714
- const i = K(t), s = V(t), r = e === "fixed", o = ot(l, !0, r, t);
5697
+ function qi(h, t, e) {
5698
+ const i = K(t), s = V(t), r = e === "fixed", o = ot(h, !0, r, t);
5715
5699
  let n = {
5716
5700
  scrollLeft: 0,
5717
5701
  scrollTop: 0
5718
5702
  };
5719
- const h = z(0);
5703
+ const l = z(0);
5720
5704
  if (i || !i && !r)
5721
- if ((tt(t) !== "body" || ht(s)) && (n = pt(t)), i) {
5705
+ if ((tt(t) !== "body" || lt(s)) && (n = pt(t)), i) {
5722
5706
  const g = ot(t, !0, r, t);
5723
- h.x = g.x + t.clientLeft, h.y = g.y + t.clientTop;
5724
- } else s && (h.x = Tt(s));
5707
+ l.x = g.x + t.clientLeft, l.y = g.y + t.clientTop;
5708
+ } else s && (l.x = Tt(s));
5725
5709
  let c = 0, d = 0;
5726
5710
  if (s && !i && !r) {
5727
5711
  const g = s.getBoundingClientRect();
5728
5712
  d = g.top + n.scrollTop, c = g.left + n.scrollLeft - // RTL <body> scrollbar.
5729
5713
  Tt(s, g);
5730
5714
  }
5731
- const f = o.left + n.scrollLeft - h.x - c, x = o.top + n.scrollTop - h.y - d;
5715
+ const f = o.left + n.scrollLeft - l.x - c, x = o.top + n.scrollTop - l.y - d;
5732
5716
  return {
5733
5717
  x: f,
5734
5718
  y: x,
@@ -5736,23 +5720,23 @@ function qi(l, t, e) {
5736
5720
  height: o.height
5737
5721
  };
5738
5722
  }
5739
- function yt(l) {
5740
- return F(l).position === "static";
5723
+ function yt(h) {
5724
+ return F(h).position === "static";
5741
5725
  }
5742
- function jt(l, t) {
5743
- if (!K(l) || F(l).position === "fixed")
5726
+ function jt(h, t) {
5727
+ if (!K(h) || F(h).position === "fixed")
5744
5728
  return null;
5745
5729
  if (t)
5746
- return t(l);
5747
- let e = l.offsetParent;
5748
- return V(l) === e && (e = e.ownerDocument.body), e;
5730
+ return t(h);
5731
+ let e = h.offsetParent;
5732
+ return V(h) === e && (e = e.ownerDocument.body), e;
5749
5733
  }
5750
- function we(l, t) {
5751
- const e = X(l);
5752
- if (wt(l))
5734
+ function we(h, t) {
5735
+ const e = X(h);
5736
+ if (wt(h))
5753
5737
  return e;
5754
- if (!K(l)) {
5755
- let s = $(l);
5738
+ if (!K(h)) {
5739
+ let s = $(h);
5756
5740
  for (; s && !Q(s); ) {
5757
5741
  if (B(s) && !yt(s))
5758
5742
  return s;
@@ -5760,15 +5744,15 @@ function we(l, t) {
5760
5744
  }
5761
5745
  return e;
5762
5746
  }
5763
- let i = jt(l, t);
5747
+ let i = jt(h, t);
5764
5748
  for (; i && Xi(i) && yt(i); )
5765
5749
  i = jt(i, t);
5766
- return i && Q(i) && yt(i) && !Dt(i) ? e : i || Bi(l) || e;
5750
+ return i && Q(i) && yt(i) && !Dt(i) ? e : i || Bi(h) || e;
5767
5751
  }
5768
- const Gi = async function(l) {
5769
- const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(l.floating);
5752
+ const Gi = async function(h) {
5753
+ const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(h.floating);
5770
5754
  return {
5771
- reference: qi(l.reference, await t(l.floating), l.strategy),
5755
+ reference: qi(h.reference, await t(h.floating), h.strategy),
5772
5756
  floating: {
5773
5757
  x: 0,
5774
5758
  y: 0,
@@ -5777,8 +5761,8 @@ const Gi = async function(l) {
5777
5761
  }
5778
5762
  };
5779
5763
  };
5780
- function ji(l) {
5781
- return F(l).direction === "rtl";
5764
+ function ji(h) {
5765
+ return F(h).direction === "rtl";
5782
5766
  }
5783
5767
  const Ui = {
5784
5768
  convertOffsetParentRelativeRectToViewportRelativeRect: ki,
@@ -5791,7 +5775,7 @@ const Ui = {
5791
5775
  getScale: Z,
5792
5776
  isElement: B,
5793
5777
  isRTL: ji
5794
- }, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (l, t, e) => {
5778
+ }, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (h, t, e) => {
5795
5779
  const i = /* @__PURE__ */ new Map(), s = {
5796
5780
  platform: Ui,
5797
5781
  ...e
@@ -5799,7 +5783,7 @@ const Ui = {
5799
5783
  ...s.platform,
5800
5784
  _c: i
5801
5785
  };
5802
- return Si(l, t, {
5786
+ return Si(h, t, {
5803
5787
  ...s,
5804
5788
  platform: r
5805
5789
  });
@@ -5825,7 +5809,7 @@ let Ji = class {
5825
5809
  borderRadius: "4px",
5826
5810
  fontSize: "12px",
5827
5811
  ...r
5828
- }, h = {
5812
+ }, l = {
5829
5813
  position: "absolute",
5830
5814
  width: "10px",
5831
5815
  height: "10px",
@@ -5834,7 +5818,7 @@ let Ji = class {
5834
5818
  transform: "rotate(45deg)",
5835
5819
  zIndex: n.zIndex
5836
5820
  };
5837
- Object.assign(this.arrowEl.style, h), Object.assign(this.floatingEl.style, n), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
5821
+ Object.assign(this.arrowEl.style, l), Object.assign(this.floatingEl.style, n), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
5838
5822
  }
5839
5823
  init() {
5840
5824
  this.ctx.on("mousemove", (t) => {
@@ -5878,10 +5862,10 @@ let Ji = class {
5878
5862
  placement: t.overflowTooltipPlacement,
5879
5863
  middleware: [me(), ye(), pe(6), Zi({ element: this.arrowEl })]
5880
5864
  }).then((n) => {
5881
- const { x: h, y: c, placement: d, middlewareData: f } = n;
5865
+ const { x: l, y: c, placement: d, middlewareData: f } = n;
5882
5866
  if (Object.assign(this.floatingEl.style, {
5883
5867
  top: `${c}px`,
5884
- left: `${h}px`
5868
+ left: `${l}px`
5885
5869
  }), f.arrow) {
5886
5870
  const x = f.arrow;
5887
5871
  ["left", "left-start", "left-end"].includes(d) ? Object.assign(this.arrowEl.style, {
@@ -5946,15 +5930,15 @@ class Qi {
5946
5930
  return;
5947
5931
  if (t.code === "Escape" && this.ctx.editing) {
5948
5932
  this.cancel = !0;
5949
- const { focusCell: h } = this.ctx;
5950
- h && (this.ctx.emit("setSelectorCell", h), this.cellTarget = h), this.doneEdit();
5933
+ const { focusCell: l } = this.ctx;
5934
+ l && (this.ctx.emit("setSelectorCell", l), this.cellTarget = l), this.doneEdit();
5951
5935
  return;
5952
5936
  }
5953
5937
  if ((t.altKey || t.metaKey) && t.code === "Enter" && this.ctx.editing && this.inputEl) {
5954
5938
  t.preventDefault();
5955
- const h = this.inputEl.selectionStart, c = this.inputEl.value.substring(0, h), d = this.inputEl.value.substring(h);
5939
+ const l = this.inputEl.selectionStart, c = this.inputEl.value.substring(0, l), d = this.inputEl.value.substring(l);
5956
5940
  this.inputEl.value = c + `
5957
- ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = h + 1, this.autoSize();
5941
+ ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = l + 1, this.autoSize();
5958
5942
  return;
5959
5943
  }
5960
5944
  if (t.code === "Tab" && this.ctx.editing) {
@@ -6034,8 +6018,8 @@ class Qi {
6034
6018
  });
6035
6019
  }
6036
6020
  isInSelectorRange(t, e) {
6037
- const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, h] = s;
6038
- return !(e < r || e > o || t < n || t > h);
6021
+ const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, l] = s;
6022
+ return !(e < r || e > o || t < n || t > l);
6039
6023
  }
6040
6024
  initTextEditor() {
6041
6025
  this.inputEl = document.createElement("textarea"), this.inputEl.setAttribute("rows", "1"), this.inputEl.addEventListener("input", this.autoSize.bind(this)), this.inputEl.addEventListener("blur", () => {
@@ -6057,8 +6041,8 @@ class Qi {
6057
6041
  startEditByInput(t, e = !1) {
6058
6042
  const i = e ? null : t.getValue(), { editorType: s } = t;
6059
6043
  t.update(), this.ctx.config.ENABLE_MERGE_CELL_LINK && t.updateSpanInfo();
6060
- let { height: r, width: o, drawY: n, drawX: h } = t;
6061
- this.drawX = h, this.drawY = n;
6044
+ let { height: r, width: o, drawY: n, drawX: l } = t;
6045
+ this.drawX = l, this.drawY = n;
6062
6046
  const {
6063
6047
  config: { CELL_PADDING: c },
6064
6048
  header: d
@@ -6089,8 +6073,8 @@ class Qi {
6089
6073
  const { rowKey: r, key: o, editorType: n } = i;
6090
6074
  if (n === "none")
6091
6075
  return;
6092
- const h = this.ctx.database.getReadonly(r, o);
6093
- i && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
6076
+ const l = this.ctx.database.getReadonly(r, o);
6077
+ i && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
6094
6078
  }
6095
6079
  editCell(t, e) {
6096
6080
  const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
@@ -6103,8 +6087,8 @@ class Qi {
6103
6087
  const r = this.ctx.focusCell;
6104
6088
  if (!r || ["index", "index-selection", "selection"].includes(r.type) || this.enable)
6105
6089
  return;
6106
- const { rowKey: o, key: n } = r, h = this.ctx.database.getReadonly(o, n);
6107
- r && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
6090
+ const { rowKey: o, key: n } = r, l = this.ctx.database.getReadonly(o, n);
6091
+ r && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
6108
6092
  }
6109
6093
  doneEdit() {
6110
6094
  this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.ctx.containerElement.focus({ preventScroll: !0 }), this.editorEl.style.display = "none", this.ctx.emit("drawView"));
@@ -6124,13 +6108,13 @@ class ts {
6124
6108
  this.ctx = t;
6125
6109
  const { EMPTY_TEXT: e, EMPTY_CUSTOM_STYLE: i } = this.ctx.config;
6126
6110
  this.ctx.emptyElement ? this.emptyEl = this.ctx.emptyElement : (this.emptyEl = document.createElement("div"), this.emptyEl.innerText = e), this.emptyEl.className = "e-virt-table-empty", this.emptyEl.style.display = "none", this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: s, headerHeight: r, bodyHeight: o, footerHeight: n }) => {
6127
- const h = r + (o + n) / 2, c = {
6111
+ const l = r + (o + n) / 2, c = {
6128
6112
  display: s === "empty" ? "block" : "none",
6129
6113
  position: "absolute",
6130
6114
  fontSize: "14px",
6131
6115
  color: "#666",
6132
6116
  left: "50%",
6133
- top: `${h}px`,
6117
+ top: `${l}px`,
6134
6118
  transform: "translate(-50%, -50%)",
6135
6119
  ...i
6136
6120
  };
@@ -6170,9 +6154,9 @@ class es {
6170
6154
  fixedRightWidth: e,
6171
6155
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
6172
6156
  } = this.ctx, { visibleWidth: r, visibleHeight: o, renderCellHeaders: n } = this.ctx.header;
6173
- let h = [], c = [], d = [];
6157
+ let l = [], c = [], d = [];
6174
6158
  n.forEach((w) => {
6175
- w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : h.push(w));
6159
+ w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : l.push(w));
6176
6160
  });
6177
6161
  const f = e - i, x = {
6178
6162
  key: "left",
@@ -6195,7 +6179,7 @@ class es {
6195
6179
  width: `${r - t - f + 1}px`,
6196
6180
  height: `${o}px`
6197
6181
  },
6198
- cells: h
6182
+ cells: l
6199
6183
  }, p = {
6200
6184
  key: "right",
6201
6185
  style: {
@@ -6231,7 +6215,7 @@ class es {
6231
6215
  const {
6232
6216
  fixedLeftWidth: r,
6233
6217
  fixedRightWidth: o,
6234
- config: { SCROLLER_TRACK_SIZE: n, CSS_PREFIX: h }
6218
+ config: { SCROLLER_TRACK_SIZE: n, CSS_PREFIX: l }
6235
6219
  } = this.ctx, { visibleWidth: c, visibleHeight: d } = this.ctx.body, f = o - n, x = {
6236
6220
  key: "left",
6237
6221
  style: {
@@ -6268,7 +6252,7 @@ class es {
6268
6252
  };
6269
6253
  return {
6270
6254
  type: "body",
6271
- class: `${h}-overlayer-body`,
6255
+ class: `${l}-overlayer-body`,
6272
6256
  style: {
6273
6257
  position: "relative",
6274
6258
  overflow: "hidden",
@@ -6289,7 +6273,7 @@ class es {
6289
6273
  fixedLeftWidth: s,
6290
6274
  fixedRightWidth: r,
6291
6275
  config: { SCROLLER_TRACK_SIZE: o, CSS_PREFIX: n }
6292
- } = this.ctx, { visibleWidth: h, visibleHeight: c } = this.ctx.footer, d = r - o, f = {
6276
+ } = this.ctx, { visibleWidth: l, visibleHeight: c } = this.ctx.footer, d = r - o, f = {
6293
6277
  key: "left",
6294
6278
  style: {
6295
6279
  position: "absolute",
@@ -6307,7 +6291,7 @@ class es {
6307
6291
  top: `${0.5}px`,
6308
6292
  left: `${s - 0.5}px`,
6309
6293
  overflow: "hidden",
6310
- width: `${h - s - d}px`,
6294
+ width: `${l - s - d}px`,
6311
6295
  height: `${c}px`
6312
6296
  },
6313
6297
  cells: t
@@ -6329,7 +6313,7 @@ class es {
6329
6313
  style: {
6330
6314
  position: "relative",
6331
6315
  overflow: "hidden",
6332
- width: `${h}px`,
6316
+ width: `${l}px`,
6333
6317
  height: `${c}px`
6334
6318
  },
6335
6319
  views: [f, x, g]
@@ -6347,8 +6331,8 @@ class is {
6347
6331
  this.ctx.on("cellContextMenuClick", (t, e) => {
6348
6332
  if (!this.ctx.config.ENABLE_CONTEXT_MENU) return;
6349
6333
  e.preventDefault();
6350
- const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, h] = s, { rowIndex: c, colIndex: d } = t;
6351
- c >= n && c <= h && d >= r && d <= o || this.ctx.emit("setSelectorCell", t, e);
6334
+ const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, l] = s, { rowIndex: c, colIndex: d } = t;
6335
+ c >= n && c <= l && d >= r && d <= o || this.ctx.emit("setSelectorCell", t, e);
6352
6336
  const x = {
6353
6337
  getBoundingClientRect: () => ({
6354
6338
  width: 0,
@@ -6453,16 +6437,16 @@ class os {
6453
6437
  }
6454
6438
  createContainer(t, e, i, s, r) {
6455
6439
  t.className = "e-virt-table-container";
6456
- const o = document.createElement("div"), n = document.createElement("canvas"), h = e || document.createElement("div");
6457
- o.className = "e-virt-table-stage", t.tabIndex = 0, n.className = "e-virt-table-canvas", h.className = "e-virt-table-overlayer";
6440
+ const o = document.createElement("div"), n = document.createElement("canvas"), l = e || document.createElement("div");
6441
+ o.className = "e-virt-table-stage", t.tabIndex = 0, n.className = "e-virt-table-canvas", l.className = "e-virt-table-overlayer";
6458
6442
  const c = i || document.createElement("div");
6459
6443
  c.className = "e-virt-table-editor";
6460
6444
  const d = s, f = r;
6461
- return o.appendChild(n), o.appendChild(h), t.appendChild(o), {
6445
+ return o.appendChild(n), o.appendChild(l), t.appendChild(o), {
6462
6446
  containerElement: t,
6463
6447
  stageElement: o,
6464
6448
  canvasElement: n,
6465
- overlayerElement: h,
6449
+ overlayerElement: l,
6466
6450
  editorElement: c,
6467
6451
  emptyElement: d,
6468
6452
  contextMenuElement: f
@@ -6480,7 +6464,7 @@ class os {
6480
6464
  this.editor.doneEdit(), this.ctx.database.setColumns(t), this.header.init(), this.ctx.emit("draw");
6481
6465
  }
6482
6466
  loadData(t) {
6483
- this.editor.doneEdit(), this.ctx.database.setData(t), this.header.init(), this.ctx.emit("draw");
6467
+ this.editor.doneEdit(), this.ctx.database.setData(t), this.header.init(), this.tooltip.hide(), this.ctx.emit("draw");
6484
6468
  }
6485
6469
  loadFooterData(t) {
6486
6470
  this.ctx.database.setFooterData(t), this.ctx.emit("draw");
@@ -6546,15 +6530,15 @@ class os {
6546
6530
  return new Promise(async (i, s) => {
6547
6531
  let r = [];
6548
6532
  for (let o = 0; o < t.length; o++) {
6549
- const { rowKey: n, key: h } = t[o], c = await this.ctx.database.getValidator(n, h);
6533
+ const { rowKey: n, key: l } = t[o], c = await this.ctx.database.getValidator(n, l);
6550
6534
  Array.isArray(c) && c.length && r.push(c);
6551
6535
  }
6552
6536
  if (r.length) {
6553
6537
  if (s(r), e) {
6554
6538
  const [o] = r;
6555
6539
  if (Array.isArray(o) && o.length) {
6556
- const [n] = o, { rowKey: h, key: c } = n;
6557
- this.scrollToRowkey(h), this.scrollToColkey(c);
6540
+ const [n] = o, { rowKey: l, key: c } = n;
6541
+ this.scrollToRowkey(l), this.scrollToColkey(c);
6558
6542
  }
6559
6543
  }
6560
6544
  this.ctx.emit("draw");
@@ -6571,8 +6555,8 @@ class os {
6571
6555
  if (t && Array.isArray(s) && s.length) {
6572
6556
  const [r] = s;
6573
6557
  if (Array.isArray(r) && r.length) {
6574
- const [o] = r, { rowKey: n, key: h } = o;
6575
- this.scrollToRowkey(n), this.scrollToColkey(h);
6558
+ const [o] = r, { rowKey: n, key: l } = o;
6559
+ this.scrollToRowkey(n), this.scrollToColkey(l);
6576
6560
  }
6577
6561
  }
6578
6562
  i(s);
@@ -6597,7 +6581,7 @@ class os {
6597
6581
  let r = [];
6598
6582
  for (let o = 0; o < i.length; o++)
6599
6583
  for (let n = 0; n < s.length; n++) {
6600
- const h = this.ctx.database.getRowKeyByItem(i[o]), d = s[n].key, f = await this.ctx.database.getValidator(h, d);
6584
+ const l = this.ctx.database.getRowKeyByItem(i[o]), d = s[n].key, f = await this.ctx.database.getValidator(l, d);
6601
6585
  Array.isArray(f) && f.length && r.push(f);
6602
6586
  }
6603
6587
  r.length ? (e(r), this.ctx.emit("draw")) : (t([]), this.ctx.emit("draw"));