e-virt-table 1.2.13 → 1.2.15

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 = (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);
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);
5
5
  function q() {
6
- return q = Object.assign ? Object.assign.bind() : function(h) {
6
+ return q = Object.assign ? Object.assign.bind() : function(l) {
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) && (h[i] = e[i]);
10
+ Object.prototype.hasOwnProperty.call(e, i) && (l[i] = e[i]);
11
11
  }
12
- return h;
12
+ return l;
13
13
  }, q.apply(this, arguments);
14
14
  }
15
- function Re(h, t) {
16
- h.prototype = Object.create(t.prototype), h.prototype.constructor = h, st(h, t);
15
+ function Re(l, t) {
16
+ l.prototype = Object.create(t.prototype), l.prototype.constructor = l, st(l, t);
17
17
  }
18
- function Et(h) {
18
+ function Et(l) {
19
19
  return Et = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
20
20
  return e.__proto__ || Object.getPrototypeOf(e);
21
- }, Et(h);
21
+ }, Et(l);
22
22
  }
23
- function st(h, t) {
23
+ function st(l, t) {
24
24
  return st = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
25
25
  return i.__proto__ = s, i;
26
- }, st(h, t);
26
+ }, st(l, 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(h, t, e) {
38
+ function dt(l, 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 l = Function.bind.apply(s, n), c = new l();
42
+ var h = Function.bind.apply(s, n), c = new h();
43
43
  return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
46
- function Ie(h) {
47
- return Function.toString.call(h).indexOf("[native code]") !== -1;
46
+ function Ie(l) {
47
+ return Function.toString.call(l).indexOf("[native code]") !== -1;
48
48
  }
49
- function Ct(h) {
49
+ function Ct(l) {
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(h) {
67
67
  configurable: !0
68
68
  }
69
69
  }), st(s, i);
70
- }, Ct(h);
70
+ }, Ct(l);
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(h) {
80
- if (!h || !h.length) return null;
79
+ function bt(l) {
80
+ if (!l || !l.length) return null;
81
81
  var t = {};
82
- return h.forEach(function(e) {
82
+ return l.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(h) {
87
+ function D(l) {
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 h == "function")
92
- return h.apply(null, e);
93
- if (typeof h == "string") {
94
- var o = h.replace(Oe, function(n) {
91
+ if (typeof l == "function")
92
+ return l.apply(null, e);
93
+ if (typeof l == "string") {
94
+ var o = l.replace(Oe, function(n) {
95
95
  if (n === "%%")
96
96
  return "%";
97
97
  if (s >= r)
@@ -114,105 +114,105 @@ function D(h) {
114
114
  });
115
115
  return o;
116
116
  }
117
- return h;
117
+ return l;
118
118
  }
119
- function Le(h) {
120
- return h === "string" || h === "url" || h === "hex" || h === "email" || h === "date" || h === "pattern";
119
+ function Se(l) {
120
+ return l === "string" || l === "url" || l === "hex" || l === "email" || l === "date" || l === "pattern";
121
121
  }
122
- function H(h, t) {
123
- return !!(h == null || t === "array" && Array.isArray(h) && !h.length || Le(t) && typeof h == "string" && !h);
122
+ function H(l, t) {
123
+ return !!(l == null || t === "array" && Array.isArray(l) && !l.length || Se(t) && typeof l == "string" && !l);
124
124
  }
125
- function Se(h, t, e) {
126
- var i = [], s = 0, r = h.length;
125
+ function Le(l, t, e) {
126
+ var i = [], s = 0, r = l.length;
127
127
  function o(n) {
128
128
  i.push.apply(i, n || []), s++, s === r && e(i);
129
129
  }
130
- h.forEach(function(n) {
130
+ l.forEach(function(n) {
131
131
  t(n, o);
132
132
  });
133
133
  }
134
- function Bt(h, t, e) {
135
- var i = 0, s = h.length;
134
+ function Ft(l, t, e) {
135
+ var i = 0, s = l.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(h[n], r) : e([]);
142
+ i = i + 1, n < s ? t(l[n], r) : e([]);
143
143
  }
144
144
  r([]);
145
145
  }
146
- function Te(h) {
146
+ function Te(l) {
147
147
  var t = [];
148
- return Object.keys(h).forEach(function(e) {
149
- t.push.apply(t, h[e] || []);
148
+ return Object.keys(l).forEach(function(e) {
149
+ t.push.apply(t, l[e] || []);
150
150
  }), t;
151
151
  }
152
- var Ft = /* @__PURE__ */ function(h) {
153
- Re(t, h);
152
+ var Bt = /* @__PURE__ */ function(l) {
153
+ Re(t, l);
154
154
  function t(e, i) {
155
155
  var s;
156
- return s = h.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
156
+ return s = l.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(h, t, e, i, s) {
160
+ function Ae(l, 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
- return i(m), m.length ? g(new Ft(m, bt(m))) : x(s);
165
- }, u = Te(h);
166
- Bt(u, e, p);
164
+ return i(m), m.length ? g(new Bt(m, bt(m))) : x(s);
165
+ }, u = Te(l);
166
+ Ft(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(h) : t.firstFields || [], n = Object.keys(h), l = n.length, c = 0, d = [], f = new Promise(function(x, g) {
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) {
173
173
  var p = function(w) {
174
- if (d.push.apply(d, w), c++, c === l)
175
- return i(d), d.length ? g(new Ft(d, bt(d))) : x(s);
174
+ if (d.push.apply(d, w), c++, c === h)
175
+ return i(d), d.length ? g(new Bt(d, bt(d))) : x(s);
176
176
  };
177
177
  n.length || (i(d), x(s)), n.forEach(function(u) {
178
- var w = h[u];
179
- o.indexOf(u) !== -1 ? Bt(w, e, p) : Se(w, e, p);
178
+ var w = l[u];
179
+ o.indexOf(u) !== -1 ? Ft(w, e, p) : Le(w, e, p);
180
180
  });
181
181
  });
182
182
  return f.catch(function(x) {
183
183
  return x;
184
184
  }), f;
185
185
  }
186
- function Me(h) {
187
- return !!(h && h.message !== void 0);
186
+ function Me(l) {
187
+ return !!(l && l.message !== void 0);
188
188
  }
189
- function He(h, t) {
190
- for (var e = h, i = 0; i < t.length; i++) {
189
+ function He(l, t) {
190
+ for (var e = l, 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(h, t) {
197
+ function Nt(l, t) {
198
198
  return function(e) {
199
199
  var i;
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) : {
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) : {
201
201
  message: typeof e == "function" ? e() : e,
202
202
  fieldValue: i,
203
- field: e.field || h.fullField
203
+ field: e.field || l.fullField
204
204
  };
205
205
  };
206
206
  }
207
- function kt(h, t) {
207
+ function kt(l, 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 h[e] == "object" ? h[e] = q({}, h[e], i) : h[e] = i;
212
+ typeof i == "object" && typeof l[e] == "object" ? l[e] = q({}, l[e], i) : l[e] = i;
213
213
  }
214
214
  }
215
- return h;
215
+ return l;
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 h = "[a-fA-F\\d:]", t = function(b) {
225
- return b && b.includeBoundaries ? "(?:(?<=\\s|^)(?=" + h + ")|(?<=" + h + ")(?=\\s|$))" : "";
224
+ var l = "[a-fA-F\\d:]", t = function(b) {
225
+ return b && b.includeBoundaries ? "(?:(?<=\\s|^)(?=" + l + ")|(?<=" + l + ")(?=\\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,15 +234,15 @@ 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 + "$"), l = function(b) {
237
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), h = function(b) {
238
238
  return b && b.exact ? r : new RegExp("(?:" + t(b) + e + t(b) + ")|(?:" + t(b) + s + t(b) + ")", "g");
239
239
  };
240
- l.v4 = function(y) {
240
+ h.v4 = function(y) {
241
241
  return y && y.exact ? o : new RegExp("" + t(y) + e + t(y), "g");
242
- }, l.v6 = function(y) {
242
+ }, h.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 = 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;
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"]*)?', C = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + p + u + ")" + w + m;
246
246
  return ct = new RegExp("(?:^" + C + "$)", "i"), ct;
247
247
  }, Kt = {
248
248
  // http://emailregex.com/
@@ -292,18 +292,18 @@ var Zt = function(t, e, i, s, r, o) {
292
292
  hex: function(t) {
293
293
  return typeof t == "string" && !!t.match(Kt.hex);
294
294
  }
295
- }, Be = function(t, e, i, s, r) {
295
+ }, Fe = function(t, e, i, s, r) {
296
296
  if (t.required && e === void 0) {
297
297
  Zt(t, e, i, s, r);
298
298
  return;
299
299
  }
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
- }, Fe = function(t, e, i, s, r) {
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);
302
+ }, Be = 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);
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 && !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));
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));
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) {
@@ -315,11 +315,11 @@ var Zt = function(t, e, i, s, r, o) {
315
315
  o.test(e) || s.push(D(r.messages.pattern.mismatch, t.fullField, e, t.pattern));
316
316
  }
317
317
  }
318
- }, L = {
318
+ }, S = {
319
319
  required: Zt,
320
320
  whitespace: De,
321
- type: Be,
322
- range: Fe,
321
+ type: Fe,
322
+ range: Be,
323
323
  enum: Ne,
324
324
  pattern: ke
325
325
  }, Ke = function(t, e, i, s, r) {
@@ -327,7 +327,7 @@ var Zt = function(t, e, i, s, r, o) {
327
327
  if (n) {
328
328
  if (H(e, "string") && !t.required)
329
329
  return i();
330
- L.required(t, e, s, o, r, "string"), H(e, "string") || (L.type(t, e, s, o, r), L.range(t, e, s, o, r), L.pattern(t, e, s, o, r), t.whitespace === !0 && L.whitespace(t, e, s, o, r));
330
+ S.required(t, e, s, o, r, "string"), H(e, "string") || (S.type(t, e, s, o, r), S.range(t, e, s, o, r), S.pattern(t, e, s, o, r), t.whitespace === !0 && S.whitespace(t, e, s, o, r));
331
331
  }
332
332
  i(o);
333
333
  }, Ye = function(t, e, i, s, r) {
@@ -335,7 +335,7 @@ var Zt = function(t, e, i, s, r, o) {
335
335
  if (n) {
336
336
  if (H(e) && !t.required)
337
337
  return i();
338
- L.required(t, e, s, o, r), e !== void 0 && L.type(t, e, s, o, r);
338
+ S.required(t, e, s, o, r), e !== void 0 && S.type(t, e, s, o, r);
339
339
  }
340
340
  i(o);
341
341
  }, Ve = function(t, e, i, s, r) {
@@ -343,7 +343,7 @@ var Zt = function(t, e, i, s, r, o) {
343
343
  if (n) {
344
344
  if (e === "" && (e = void 0), H(e) && !t.required)
345
345
  return i();
346
- L.required(t, e, s, o, r), e !== void 0 && (L.type(t, e, s, o, r), L.range(t, e, s, o, r));
346
+ S.required(t, e, s, o, r), e !== void 0 && (S.type(t, e, s, o, r), S.range(t, e, s, o, r));
347
347
  }
348
348
  i(o);
349
349
  }, We = function(t, e, i, s, r) {
@@ -351,7 +351,7 @@ var Zt = function(t, e, i, s, r, o) {
351
351
  if (n) {
352
352
  if (H(e) && !t.required)
353
353
  return i();
354
- L.required(t, e, s, o, r), e !== void 0 && L.type(t, e, s, o, r);
354
+ S.required(t, e, s, o, r), e !== void 0 && S.type(t, e, s, o, r);
355
355
  }
356
356
  i(o);
357
357
  }, Pe = function(t, e, i, s, r) {
@@ -359,7 +359,7 @@ var Zt = function(t, e, i, s, r, o) {
359
359
  if (n) {
360
360
  if (H(e) && !t.required)
361
361
  return i();
362
- L.required(t, e, s, o, r), H(e) || L.type(t, e, s, o, r);
362
+ S.required(t, e, s, o, r), H(e) || S.type(t, e, s, o, r);
363
363
  }
364
364
  i(o);
365
365
  }, ze = function(t, e, i, s, r) {
@@ -367,7 +367,7 @@ var Zt = function(t, e, i, s, r, o) {
367
367
  if (n) {
368
368
  if (H(e) && !t.required)
369
369
  return i();
370
- L.required(t, e, s, o, r), e !== void 0 && (L.type(t, e, s, o, r), L.range(t, e, s, o, r));
370
+ S.required(t, e, s, o, r), e !== void 0 && (S.type(t, e, s, o, r), S.range(t, e, s, o, r));
371
371
  }
372
372
  i(o);
373
373
  }, $e = function(t, e, i, s, r) {
@@ -375,7 +375,7 @@ var Zt = function(t, e, i, s, r, o) {
375
375
  if (n) {
376
376
  if (H(e) && !t.required)
377
377
  return i();
378
- L.required(t, e, s, o, r), e !== void 0 && (L.type(t, e, s, o, r), L.range(t, e, s, o, r));
378
+ S.required(t, e, s, o, r), e !== void 0 && (S.type(t, e, s, o, r), S.range(t, e, s, o, r));
379
379
  }
380
380
  i(o);
381
381
  }, qe = function(t, e, i, s, r) {
@@ -383,7 +383,7 @@ var Zt = function(t, e, i, s, r, o) {
383
383
  if (n) {
384
384
  if (e == null && !t.required)
385
385
  return i();
386
- L.required(t, e, s, o, r, "array"), e != null && (L.type(t, e, s, o, r), L.range(t, e, s, o, r));
386
+ S.required(t, e, s, o, r, "array"), e != null && (S.type(t, e, s, o, r), S.range(t, e, s, o, r));
387
387
  }
388
388
  i(o);
389
389
  }, Ge = function(t, e, i, s, r) {
@@ -391,7 +391,7 @@ var Zt = function(t, e, i, s, r, o) {
391
391
  if (n) {
392
392
  if (H(e) && !t.required)
393
393
  return i();
394
- L.required(t, e, s, o, r), e !== void 0 && L.type(t, e, s, o, r);
394
+ S.required(t, e, s, o, r), e !== void 0 && S.type(t, e, s, o, r);
395
395
  }
396
396
  i(o);
397
397
  }, je = "enum", Ue = function(t, e, i, s, r) {
@@ -399,7 +399,7 @@ var Zt = function(t, e, i, s, r, o) {
399
399
  if (n) {
400
400
  if (H(e) && !t.required)
401
401
  return i();
402
- L.required(t, e, s, o, r), e !== void 0 && L[je](t, e, s, o, r);
402
+ S.required(t, e, s, o, r), e !== void 0 && S[je](t, e, s, o, r);
403
403
  }
404
404
  i(o);
405
405
  }, Ze = function(t, e, i, s, r) {
@@ -407,7 +407,7 @@ var Zt = function(t, e, i, s, r, o) {
407
407
  if (n) {
408
408
  if (H(e, "string") && !t.required)
409
409
  return i();
410
- L.required(t, e, s, o, r), H(e, "string") || L.pattern(t, e, s, o, r);
410
+ S.required(t, e, s, o, r), H(e, "string") || S.pattern(t, e, s, o, r);
411
411
  }
412
412
  i(o);
413
413
  }, Je = function(t, e, i, s, r) {
@@ -415,21 +415,21 @@ var Zt = function(t, e, i, s, r, o) {
415
415
  if (n) {
416
416
  if (H(e, "date") && !t.required)
417
417
  return i();
418
- if (L.required(t, e, s, o, r), !H(e, "date")) {
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);
418
+ if (S.required(t, e, s, o, r), !H(e, "date")) {
419
+ var h;
420
+ e instanceof Date ? h = e : h = new Date(e), S.type(t, h, s, o, r), h && S.range(t, h.getTime(), s, o, r);
421
421
  }
422
422
  }
423
423
  i(o);
424
424
  }, Qe = function(t, e, i, s, r) {
425
425
  var o = [], n = Array.isArray(e) ? "array" : typeof e;
426
- L.required(t, e, s, o, r, n), i(o);
426
+ S.required(t, e, s, o, r, n), i(o);
427
427
  }, mt = function(t, e, i, s, r) {
428
- var o = t.type, n = [], l = t.required || !t.required && s.hasOwnProperty(t.field);
429
- if (l) {
428
+ var o = t.type, n = [], h = t.required || !t.required && s.hasOwnProperty(t.field);
429
+ if (h) {
430
430
  if (H(e, o) && !t.required)
431
431
  return i();
432
- L.required(t, e, s, n, r, o), H(e, o) || L.type(t, e, s, n, r);
432
+ S.required(t, e, s, n, r, o), H(e, o) || S.type(t, e, s, n, r);
433
433
  }
434
434
  i(n);
435
435
  }, ti = function(t, e, i, s, r) {
@@ -437,7 +437,7 @@ var Zt = function(t, e, i, s, r, o) {
437
437
  if (n) {
438
438
  if (H(e) && !t.required)
439
439
  return i();
440
- L.required(t, e, s, o, r);
440
+ S.required(t, e, s, o, r);
441
441
  }
442
442
  i(o);
443
443
  }, it = {
@@ -513,10 +513,10 @@ function vt() {
513
513
  };
514
514
  }
515
515
  var Rt = vt(), nt = /* @__PURE__ */ function() {
516
- function h(e) {
516
+ function l(e) {
517
517
  this.rules = null, this._messages = Rt, this.define(e);
518
518
  }
519
- var t = h.prototype;
519
+ var t = l.prototype;
520
520
  return t.define = function(i) {
521
521
  var s = this;
522
522
  if (!i)
@@ -533,8 +533,8 @@ 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, l = s, c = r;
537
- if (typeof l == "function" && (c = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
536
+ var n = i, h = s, c = r;
537
+ if (typeof h == "function" && (c = h, h = {}), !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 = {};
@@ -549,12 +549,12 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
549
549
  C(u[y]);
550
550
  w.length ? (m = bt(w), c(w, m)) : c(null, n);
551
551
  }
552
- if (l.messages) {
552
+ if (h.messages) {
553
553
  var f = this.messages();
554
- f === Rt && (f = vt()), kt(f, l.messages), l.messages = f;
554
+ f === Rt && (f = vt()), kt(f, h.messages), h.messages = f;
555
555
  } else
556
- l.messages = this.messages();
557
- var x = {}, g = l.keys || Object.keys(this.rules);
556
+ h.messages = this.messages();
557
+ var x = {}, g = h.keys || Object.keys(this.rules);
558
558
  g.forEach(function(u) {
559
559
  var w = o.rules[u], m = n[u];
560
560
  w.forEach(function(C) {
@@ -570,7 +570,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
570
570
  });
571
571
  });
572
572
  var p = {};
573
- return Ae(x, l, function(u, w) {
573
+ return Ae(x, h, function(u, w) {
574
574
  var m = u.rule, C = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
575
575
  C = C && (m.required || !m.required && u.value), m.field = u.field;
576
576
  function y(R, O) {
@@ -582,15 +582,15 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
582
582
  function b(R) {
583
583
  R === void 0 && (R = []);
584
584
  var O = Array.isArray(R) ? R : [R];
585
- !l.suppressWarning && O.length && h.warning("async-validator:", O), O.length && m.message !== void 0 && (O = [].concat(m.message));
585
+ !h.suppressWarning && O.length && l.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 (l.first && I.length)
587
+ if (h.first && I.length)
588
588
  return p[m.field] = 1, w(I);
589
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)) : l.error && (I = [l.error(m, D(l.messages.required, m.field))]), w(I);
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);
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 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) {
603
+ var L = new l(v);
604
+ L.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), L.validate(u.value, u.rule.options || h, 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,12 +609,12 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
609
609
  }
610
610
  var E;
611
611
  if (m.asyncValidator)
612
- E = m.asyncValidator(m, u.value, b, u.source, l);
612
+ E = m.asyncValidator(m, u.value, b, u.source, h);
613
613
  else if (m.validator) {
614
614
  try {
615
- E = m.validator(m, u.value, b, u.source, l);
615
+ E = m.validator(m, u.value, b, u.source, h);
616
616
  } catch (R) {
617
- console.error == null || console.error(R), l.suppressValidatorError || setTimeout(function() {
617
+ console.error == null || console.error(R), h.suppressValidatorError || setTimeout(function() {
618
618
  throw R;
619
619
  }, 0), b(R.message);
620
620
  }
@@ -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
- }, h;
640
+ }, l;
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(h) {
651
+ return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(l) {
652
652
  const t = Math.random() * 16 | 0;
653
- return (h === "x" ? t : t & 3 | 8).toString(16);
653
+ return (l === "x" ? t : t & 3 | 8).toString(16);
654
654
  });
655
655
  }
656
- function Qt(h, t) {
656
+ function Qt(l, 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 ? (h.apply(this, s), e = r) : i || (i = setTimeout(() => {
661
- h.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
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;
662
662
  }, t - o));
663
663
  };
664
664
  }
665
- function te(h = []) {
666
- return h.length ? h.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
665
+ function te(l = []) {
666
+ return l.length ? l.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
667
667
  }
668
- function ei(h = []) {
668
+ function ei(l = []) {
669
669
  let t = [], e = [], i = [];
670
- return h.forEach((s) => {
670
+ return l.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(h = []) {
675
675
  ...i.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0))
676
676
  ];
677
677
  }
678
- function ee(h = [], t = 1, e = 0) {
679
- return h.map((i) => {
678
+ function ee(l = [], t = 1, e = 0) {
679
+ return l.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(h = [], t = 1, e = 0) {
702
702
  };
703
703
  });
704
704
  }
705
- function _t(h = []) {
705
+ function _t(l = []) {
706
706
  let t = [];
707
- return h.forEach((e) => {
707
+ return l.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(h) {
712
+ function si(l) {
713
713
  let t = [[""]];
714
- if (h.length === 0)
714
+ if (l.length === 0)
715
715
  return t;
716
716
  let e = 0, i = 0, s;
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] = [""];
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] = [""];
722
722
  else {
723
723
  let r = "";
724
- if (h.startsWith('"')) {
724
+ if (l.startsWith('"')) {
725
725
  let o = 0, n = !0;
726
726
  for (; n; ) {
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);
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);
729
729
  }
730
- r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (l) => new Array(Math.floor(l.length / 2)).fill('"').join(""));
730
+ r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (h) => new Array(Math.floor(h.length / 2)).fill('"').join(""));
731
731
  } else {
732
- const o = h.match(ii);
733
- r = o ? o[0] : "", h = h.slice(r.length);
732
+ const o = l.match(ii);
733
+ r = o ? o[0] : "", l = l.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(h) {
739
+ function ri(l) {
740
740
  let t, e, i, s, r = "", o;
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(`
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(`
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(h, t, e = []) {
750
+ function ie(l, t, e = []) {
751
751
  let i = 0;
752
752
  const s = [];
753
- return h.forEach((r, o) => {
753
+ return l.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], 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);
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);
759
759
  }
760
760
  }), s;
761
761
  }
762
- function se(h, t) {
762
+ function se(l, 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) : h[r.key] === h[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) : l[r.key] === l[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(h, t, e = []) {
770
- const { visibleRows: i, rowIndex: s, headIndex: r } = h, o = ie(i, t, e);
769
+ function oi(l, t, e = []) {
770
+ const { visibleRows: i, rowIndex: s, headIndex: r } = l, 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(h, t, e = []) {
780
780
  mergeRow: !0
781
781
  };
782
782
  }
783
- function ni(h, t = []) {
784
- const { column: e, row: i, visibleLeafColumns: s } = h, r = s.filter((o) => t.includes(o.key));
783
+ function ni(l, t = []) {
784
+ const { column: e, row: i, visibleLeafColumns: s } = l, 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(h, t = []) {
797
797
  };
798
798
  }
799
799
  }
800
- function ai(h, t = document.documentElement) {
801
- const e = h.startsWith("--") ? h : `--${h}`;
800
+ function ai(l, t = document.documentElement) {
801
+ const e = l.startsWith("--") ? l : `--${l}`;
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, l, c, d, f = "body") {
852
- super(e, r, o, n, l, f, c.fixed);
851
+ constructor(e, i, s, r, o, n, h, c, d, f = "body") {
852
+ super(e, r, o, n, h, 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: l = !1,
935
+ mergeRow: h = !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 = 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);
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);
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 l = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = l || {};
1022
+ const h = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = h || {};
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: l,
1047
+ FOOTER_TEXT_COLOR: h,
1048
1048
  FOOTER_BG_COLOR: c,
1049
1049
  HIGHLIGHT_SELECTED_ROW: d,
1050
1050
  HIGHLIGHT_SELECTED_ROW_COLOR: f,
@@ -1054,16 +1054,16 @@ 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 = l;
1057
+ let O = c, I = h;
1058
1058
  if (typeof r == "function") {
1059
- const _ = r, { backgroundColor: v, color: S } = _({
1059
+ const _ = r, { backgroundColor: v, color: L } = _({
1060
1060
  row: this.row,
1061
1061
  rowIndex: this.rowIndex,
1062
1062
  colIndex: this.colIndex,
1063
1063
  column: this.column,
1064
1064
  value: this.getValue()
1065
1065
  }) || {};
1066
- v && (O = v), S && (I = S);
1066
+ v && (O = v), L && (I = L);
1067
1067
  }
1068
1068
  this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = O, this.drawTextColor = I;
1069
1069
  return;
@@ -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: l, rowKey: c } = this;
1094
+ const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: h, 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 === 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);
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);
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 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) {
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) {
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
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;
1122
+ h = 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 = l, this.drawImageY = c, this.drawImageWidth = s, this.drawImageHeight = s, this.drawImageName = this.hoverIconName, this.drawImageSource = d;
1126
+ this.drawImageX = h, 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, l = o[1], c = n[1], { colIndex: d, rowIndex: f, drawX: x, drawY: g } = this;
1222
- if (d === l && f === c) {
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) {
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 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, {
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, {
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, 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, {
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, {
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: l } = this;
1349
+ const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: h } = this;
1350
1350
  let c = i, d = s;
1351
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
1352
  if (o >= m && o <= C && r === y) {
1353
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], {
1354
+ this.ctx.paint.drawLine([c + R, d + 1, c + h - E, d + 1], {
1355
1355
  borderColor: u,
1356
1356
  fillColor: w,
1357
1357
  borderWidth: p,
@@ -1362,7 +1362,7 @@ class At extends re {
1362
1362
  }
1363
1363
  if (o === C && r >= y && r <= b) {
1364
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], {
1365
+ this.ctx.paint.drawLine([c + h - 1, d + E, c + h - 1, d + n - R], {
1366
1366
  borderColor: u,
1367
1367
  fillColor: w,
1368
1368
  borderWidth: p,
@@ -1373,7 +1373,7 @@ class At extends re {
1373
1373
  }
1374
1374
  if (o >= m && o <= C && r === b) {
1375
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], {
1376
+ this.ctx.paint.drawLine([c + R, d + n - 1, c + h - E, d + n - 1], {
1377
1377
  borderColor: u,
1378
1378
  fillColor: w,
1379
1379
  borderWidth: p,
@@ -1395,7 +1395,7 @@ class At extends re {
1395
1395
  }
1396
1396
  }
1397
1397
  }
1398
- class hi {
1398
+ class li {
1399
1399
  //虚拟滚动位置
1400
1400
  constructor(t, e) {
1401
1401
  a(this, "loading", !1);
@@ -1448,9 +1448,9 @@ class hi {
1448
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: l, 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: h, 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 || l, p = i._readonly;
1453
+ const g = i._height || h, p = i._readonly;
1454
1454
  let u = !0;
1455
1455
  if (typeof c == "function" && (u = c), d) {
1456
1456
  const C = i[d];
@@ -1541,12 +1541,12 @@ class hi {
1541
1541
  const i = (r) => {
1542
1542
  r.forEach((o) => {
1543
1543
  t.push(o);
1544
- const n = this.itemRowKeyMap.get(o), { expand: l, hasChildren: c, height: d } = this.rowKeyMap.get(n), f = this.sumHeight;
1544
+ const n = this.itemRowKeyMap.get(o), { expand: h, hasChildren: c, height: d } = this.rowKeyMap.get(n), f = this.sumHeight;
1545
1545
  this.sumHeight += d, this.rowIndexRowKeyMap.set(e, n), this.rowKeyRowIndexMap.set(n, e), this.positions.push({
1546
1546
  top: f,
1547
1547
  height: d,
1548
1548
  bottom: this.sumHeight
1549
- }), e += 1, l && c && i(o.children);
1549
+ }), e += 1, h && c && i(o.children);
1550
1550
  });
1551
1551
  };
1552
1552
  this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
@@ -1720,14 +1720,14 @@ class hi {
1720
1720
  newValue: f
1721
1721
  });
1722
1722
  });
1723
- let l = [];
1723
+ let h = [];
1724
1724
  s.forEach((d) => {
1725
- l.push(this.ctx.database.getRowDataItemForRowKey(d));
1725
+ h.push(this.ctx.database.getRowDataItemForRowKey(d));
1726
1726
  });
1727
1727
  const c = o.map(({ rowKey: d, key: f }) => this.getValidator(d, f));
1728
1728
  Promise.all(c).then(() => {
1729
1729
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1730
- }), this.ctx.emit("change", o, l), e && this.ctx.history.pushState({
1730
+ }), this.ctx.emit("change", o, h), e && this.ctx.history.pushState({
1731
1731
  changeList: i,
1732
1732
  scrollX: this.ctx.scrollX,
1733
1733
  scrollY: this.ctx.scrollY,
@@ -1748,15 +1748,15 @@ class hi {
1748
1748
  if (!this.rowKeyMap.has(t))
1749
1749
  return {};
1750
1750
  const { item: n } = this.rowKeyMap.get(t);
1751
- let l = n[e], c = i;
1751
+ let h = n[e], c = i;
1752
1752
  if (this.ctx.database.getReadonly(t, e))
1753
1753
  return {
1754
- oldValue: l,
1755
- newValue: l
1754
+ oldValue: h,
1755
+ newValue: h
1756
1756
  };
1757
- n[e] !== null && typeof n[e] == "object" && (l = JSON.parse(JSON.stringify(n[e])));
1757
+ n[e] !== null && typeof n[e] == "object" && (h = JSON.parse(JSON.stringify(n[e])));
1758
1758
  const d = `${t}​_${e}`;
1759
- this.originalDataMap.has(d) || this.originalDataMap.set(d, l);
1759
+ this.originalDataMap.has(d) || this.originalDataMap.set(d, h);
1760
1760
  const f = this.originalDataMap.get(d), x = this.getRowDataItemForRowKey(t);
1761
1761
  if (o) {
1762
1762
  const g = this.getVirtualBodyCellByKey(t, e);
@@ -1766,7 +1766,7 @@ class hi {
1766
1766
  else if (/^-?\d+(\.\d+)?$/.test(`${i}`))
1767
1767
  c = Number(i);
1768
1768
  else {
1769
- c = l;
1769
+ c = h;
1770
1770
  const w = {
1771
1771
  code: "ERR_SET_NUMBER_VALUE",
1772
1772
  message: "Assignment failed, not a numeric type",
@@ -1775,17 +1775,17 @@ class hi {
1775
1775
  rowKey: t,
1776
1776
  key: e,
1777
1777
  value: c,
1778
- oldValue: l,
1778
+ oldValue: h,
1779
1779
  row: x
1780
1780
  }
1781
1781
  ]
1782
1782
  };
1783
1783
  this.ctx.emit("error", w);
1784
1784
  }
1785
- if (c === l)
1785
+ if (c === h)
1786
1786
  return {
1787
- oldValue: l,
1788
- newValue: l
1787
+ oldValue: h,
1788
+ newValue: h
1789
1789
  };
1790
1790
  const { BEFORE_VALUE_CHANGE_METHOD: p } = this.ctx.config;
1791
1791
  if (typeof p == "function") {
@@ -1804,7 +1804,7 @@ class hi {
1804
1804
  const u = {
1805
1805
  rowKey: t,
1806
1806
  key: e,
1807
- oldValue: l,
1807
+ oldValue: h,
1808
1808
  value: c,
1809
1809
  row: x
1810
1810
  };
@@ -1813,7 +1813,7 @@ class hi {
1813
1813
  }), this.ctx.emit("change", [u], [x]), this.ctx.emit("editChange", {
1814
1814
  rowKey: t,
1815
1815
  key: e,
1816
- oldValue: l,
1816
+ oldValue: h,
1817
1817
  value: c,
1818
1818
  originalValue: f,
1819
1819
  row: x
@@ -1823,7 +1823,7 @@ class hi {
1823
1823
  return this.ctx.hasEvent("iterationChange") && this.ctx.emit("iterationChange", {
1824
1824
  rowKey: t,
1825
1825
  key: e,
1826
- oldValue: l,
1826
+ oldValue: h,
1827
1827
  value: c,
1828
1828
  originalValue: this.originalDataMap.get(d),
1829
1829
  row: x
@@ -1835,12 +1835,12 @@ class hi {
1835
1835
  {
1836
1836
  rowKey: t,
1837
1837
  key: e,
1838
- oldValue: l,
1838
+ oldValue: h,
1839
1839
  newValue: c
1840
1840
  }
1841
1841
  ]
1842
1842
  }), r && this.ctx.emit("draw"), {
1843
- oldValue: l,
1843
+ oldValue: h,
1844
1844
  newValue: c
1845
1845
  };
1846
1846
  }
@@ -1867,8 +1867,8 @@ class hi {
1867
1867
  return !1;
1868
1868
  const { item: s } = this.rowKeyMap.get(t), r = s[i];
1869
1869
  this.checkboxKeyMap.has(r) && (this.checkboxKeyMap.get(r) || []).forEach((n) => {
1870
- const l = this.selectionMap.get(n);
1871
- l && (l.check = e);
1870
+ const h = this.selectionMap.get(n);
1871
+ h && (h.check = e);
1872
1872
  });
1873
1873
  }
1874
1874
  }
@@ -1969,7 +1969,7 @@ class hi {
1969
1969
  rowIndex: x.rowIndex
1970
1970
  })), p && (r += 1);
1971
1971
  });
1972
- const l = o > i && s === 0 && n, c = r && r > s && s > 0 || l, d = r !== 0, f = !!r && r === s;
1972
+ const h = o > i && s === 0 && n, c = r && r > s && s > 0 || h, d = r !== 0, f = !!r && r === s;
1973
1973
  return this.bufferCheckState = {
1974
1974
  buffer: !0,
1975
1975
  check: f,
@@ -2068,9 +2068,9 @@ class hi {
2068
2068
  const s = this.rowKeyMap.get(t), r = this.headerMap.get(e);
2069
2069
  if (!s || !r)
2070
2070
  return !0;
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({
2071
+ const o = s.readonly, n = r.readonly, { BODY_CELL_READONLY_METHOD: h } = this.ctx.config;
2072
+ if (typeof h == "function" && r) {
2073
+ const d = h({
2074
2074
  row: s.item,
2075
2075
  rowIndex: s.rowIndex,
2076
2076
  colIndex: r.colIndex,
@@ -2094,7 +2094,7 @@ class hi {
2094
2094
  if (r === void 0)
2095
2095
  return i([]);
2096
2096
  const n = r.column;
2097
- let l = n.rules;
2097
+ let h = n.rules;
2098
2098
  if (typeof o == "function") {
2099
2099
  const d = o({
2100
2100
  row: s.item,
@@ -2103,12 +2103,12 @@ class hi {
2103
2103
  column: n,
2104
2104
  value: this.getItemValue(t, e)
2105
2105
  });
2106
- d && (l = d);
2106
+ d && (h = d);
2107
2107
  }
2108
- if (l) {
2108
+ if (h) {
2109
2109
  let c = {}, d = {};
2110
- if (d[e] = this.getItemValue(t, e), Array.isArray(l)) {
2111
- const x = l.map((g) => ({
2110
+ if (d[e] = this.getItemValue(t, e), Array.isArray(h)) {
2111
+ const x = h.map((g) => ({
2112
2112
  ...g,
2113
2113
  row: s.item,
2114
2114
  column: n,
@@ -2118,7 +2118,7 @@ class hi {
2118
2118
  c[e] = x;
2119
2119
  } else
2120
2120
  c[e] = {
2121
- ...l,
2121
+ ...h,
2122
2122
  row: s.item,
2123
2123
  column: n,
2124
2124
  rowIndex: s.rowIndex,
@@ -2156,7 +2156,7 @@ class hi {
2156
2156
  row: r,
2157
2157
  value: o,
2158
2158
  colIndex: n,
2159
- relationRowKeys: l,
2159
+ relationRowKeys: h,
2160
2160
  relationColKeys: c,
2161
2161
  rowspan: d,
2162
2162
  height: f,
@@ -2187,13 +2187,13 @@ class hi {
2187
2187
  let w = e, m = e, C = n, y = n, b = [], E = 0, R = 0, O = 0, I = 0;
2188
2188
  if (d !== 1 && p) {
2189
2189
  I = x;
2190
- const _ = l.reduce((v, S) => {
2191
- const T = this.getItemValue(s, S) ?? "";
2190
+ const _ = h.reduce((v, L) => {
2191
+ const T = this.getItemValue(s, L) ?? "";
2192
2192
  return `${v}${T}`;
2193
2193
  }, "");
2194
2194
  for (let v = e - 1; v >= 0; v--) {
2195
- const S = this.rowIndexRowKeyMap.get(v) || "", T = l.reduce((M, A) => {
2196
- const N = this.getItemValue(S, A) ?? "";
2195
+ const L = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
2196
+ const N = this.getItemValue(L, A) ?? "";
2197
2197
  return `${M}${N}`;
2198
2198
  }, "");
2199
2199
  if (_ === T)
@@ -2202,8 +2202,8 @@ class hi {
2202
2202
  break;
2203
2203
  }
2204
2204
  for (let v = e; v <= this.ctx.maxRowIndex; v++) {
2205
- const S = this.rowIndexRowKeyMap.get(v) || "", T = l.reduce((M, A) => {
2206
- const N = this.getItemValue(S, A) ?? "";
2205
+ const L = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
2206
+ const N = this.getItemValue(L, A) ?? "";
2207
2207
  return `${M}${N}`;
2208
2208
  }, "");
2209
2209
  if (_ === T)
@@ -2212,12 +2212,12 @@ class hi {
2212
2212
  break;
2213
2213
  }
2214
2214
  for (let v = w; v < e; v++) {
2215
- const { height: S } = this.positions[v];
2216
- E += S;
2215
+ const { height: L } = this.positions[v];
2216
+ E += L;
2217
2217
  }
2218
2218
  for (let v = w; v <= m; v++) {
2219
- const { height: S } = this.positions[v];
2220
- O += S;
2219
+ const { height: L } = this.positions[v];
2220
+ O += L;
2221
2221
  const T = this.rowIndexRowKeyMap.get(v) || "", { item: M } = this.rowKeyMap.get(T), A = this.getItemValue(T, i);
2222
2222
  b.push({
2223
2223
  rowKey: T,
@@ -2233,8 +2233,8 @@ class hi {
2233
2233
  const v = this.getColumnByColIndex(_);
2234
2234
  if (!v)
2235
2235
  break;
2236
- const S = this.getItemValue(s, i), T = this.getItemValue(s, v.key);
2237
- if (S === T && c.includes(v.key))
2236
+ const L = this.getItemValue(s, i), T = this.getItemValue(s, v.key);
2237
+ if (L === T && c.includes(v.key))
2238
2238
  C = _;
2239
2239
  else
2240
2240
  break;
@@ -2243,8 +2243,8 @@ class hi {
2243
2243
  const v = this.getColumnByColIndex(_);
2244
2244
  if (!v)
2245
2245
  break;
2246
- const S = this.getItemValue(s, i), T = this.getItemValue(s, v.key);
2247
- if (S === T && c.includes(v.key))
2246
+ const L = this.getItemValue(s, i), T = this.getItemValue(s, v.key);
2247
+ if (L === T && c.includes(v.key))
2248
2248
  y = _;
2249
2249
  else
2250
2250
  break;
@@ -2328,7 +2328,7 @@ class hi {
2328
2328
  return i;
2329
2329
  }
2330
2330
  }
2331
- class li {
2331
+ class hi {
2332
2332
  constructor(t) {
2333
2333
  a(this, "ctx");
2334
2334
  a(this, "history", []);
@@ -2390,18 +2390,27 @@ class ci {
2390
2390
  this.ctx = t, this.init();
2391
2391
  }
2392
2392
  init() {
2393
- this.bind(window, "resize", this.handleResize.bind(this)), this.bind(window, "mouseup", this.handleMouseUp.bind(this)), this.bind(window, "mousemove", this.handleMousemove.bind(this)), this.bind(window, "blur", this.handleOutsideMousedown.bind(this)), this.bind(window, "mousedown", this.handleOutsideMousedown.bind(this)), this.bind(this.ctx.stageElement, "click", this.handleClick.bind(this)), this.bind(window, "keydown", this.handleKeydown.bind(this)), this.bind(this.ctx.stageElement, "wheel", this.handleWheel.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "touchstart", this.handleTouchstart.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "touchend", this.handleTouchend.bind(this)), this.bind(this.ctx.stageElement, "touchmove", this.handleTouchmove.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "contextmenu", this.handleContextMenu.bind(this)), this.bind(this.ctx.stageElement, "mousedown", this.handleMouseDown.bind(this)), this.bind(this.ctx.stageElement, "dblclick", this.handleDblclick.bind(this)), this.bind(this.ctx.stageElement, "mouseover", this.handleMouseover.bind(this)), this.bind(this.ctx.stageElement, "mouseout", this.handleMouseout.bind(this));
2393
+ this.bind(window, "resize", this.handleResize.bind(this)), this.bind(window, "mouseup", this.handleMouseUp.bind(this)), this.bind(window, "mousemove", this.handleMousemove.bind(this)), this.bind(window, "blur", this.handleOutsideMousedown.bind(this)), this.bind(window, "mousedown", this.handleOutsideMousedown.bind(this)), this.bind(this.ctx.stageElement, "click", this.handleClick.bind(this)), this.bind(window, "keydown", this.handleKeydown.bind(this)), this.bind(this.ctx.stageElement, "wheel", this.handleWheel.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "touchstart", this.handleTouchstart.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "touchend", this.handleTouchend.bind(this)), this.bind(this.ctx.stageElement, "touchmove", this.handleTouchmove.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "contextmenu", this.handleContextMenu.bind(this)), this.bind(this.ctx.stageElement, "mousedown", this.handleMouseDown.bind(this)), this.bind(this.ctx.stageElement, "dblclick", this.handleDblclick.bind(this)), this.bind(this.ctx.stageElement, "mouseover", this.handleMouseover.bind(this)), this.bind(this.ctx.stageElement, "mouseout", this.handleMouseout.bind(this)), document.addEventListener("selectionchange", this.selectionchange.bind(this));
2394
+ }
2395
+ selectionchange() {
2396
+ this.ctx.domSelectionStr = "";
2397
+ const t = window.getSelection();
2398
+ t && t.toString() && (this.ctx.domSelectionStr = t.toString());
2399
+ }
2400
+ clearDomSelection() {
2401
+ const t = window.getSelection();
2402
+ t && !t.isCollapsed && t.removeAllRanges();
2394
2403
  }
2395
2404
  destroy() {
2396
2405
  this.eventTasks.forEach((t, e) => {
2397
2406
  this.unbind(window, e, t);
2398
- }), this.eventTasks.clear();
2407
+ }), document.removeEventListener("selectionchange", this.selectionchange.bind(this)), this.eventTasks.clear();
2399
2408
  }
2400
2409
  handleResize(t) {
2401
2410
  this.ctx.emit("resetHeader", t), this.ctx.emit("resize", t);
2402
2411
  }
2403
2412
  handleMouseDown(t) {
2404
- t.button === 0 && (this.ctx.mousedown = !0), this.ctx.containerElement.focus({ preventScroll: !0 }), this.ctx.emit("mousedown", t);
2413
+ this.clearDomSelection(), t.button === 0 && (this.ctx.mousedown = !0), this.ctx.containerElement.focus({ preventScroll: !0 }), this.ctx.emit("mousedown", t);
2405
2414
  }
2406
2415
  handleMousemove(t) {
2407
2416
  this.ctx.emit("mousemove", t);
@@ -2524,21 +2533,21 @@ class fi {
2524
2533
  * @param {string} color - 阴影的颜色
2525
2534
  */
2526
2535
  drawShadow(t, e, i, s, r) {
2527
- const { fillColor: o, side: n, shadowWidth: l, colorStart: c, colorEnd: d } = r;
2536
+ const { fillColor: o, side: n, shadowWidth: h, colorStart: c, colorEnd: d } = r;
2528
2537
  this.ctx.save(), o && (this.ctx.fillStyle = o, this.ctx.fillRect(t, e, i, s));
2529
2538
  let f;
2530
2539
  switch (n) {
2531
2540
  case "left":
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);
2541
+ 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);
2533
2542
  break;
2534
2543
  case "right":
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);
2544
+ 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);
2536
2545
  break;
2537
2546
  case "top":
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);
2547
+ 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);
2539
2548
  break;
2540
2549
  case "bottom":
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);
2550
+ 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);
2542
2551
  break;
2543
2552
  default:
2544
2553
  console.error("Invalid side specified for shadow");
@@ -2559,11 +2568,11 @@ class fi {
2559
2568
  drawImage(t, e, i, s, r) {
2560
2569
  this.ctx.save(), this.ctx.drawImage(t, e, i, s, r), this.ctx.restore();
2561
2570
  }
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)
2571
+ drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: n, radius: h = 0 } = {}) {
2572
+ 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)
2564
2573
  this.ctx.rect(t - 0.5, e - 0.5, i, s);
2565
2574
  else {
2566
- const [c, d, f, x] = typeof l == "number" ? [l, l, l, l] : l;
2575
+ const [c, d, f, x] = typeof h == "number" ? [h, h, h, h] : h;
2567
2576
  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);
2568
2577
  }
2569
2578
  n !== void 0 && this.ctx.fill(), o !== void 0 && this.ctx.stroke(), this.ctx.restore();
@@ -2582,16 +2591,16 @@ class fi {
2582
2591
  this.ctx.save();
2583
2592
  const {
2584
2593
  font: n = "12px Arial",
2585
- align: l = "center",
2594
+ align: h = "center",
2586
2595
  color: c = "#495060",
2587
2596
  padding: d = 0,
2588
2597
  verticalAlign: f = "middle"
2589
2598
  } = o;
2590
- this.ctx.font = n, this.ctx.fillStyle = c, this.ctx.textBaseline = f, this.ctx.textAlign = l;
2599
+ this.ctx.font = n, this.ctx.fillStyle = c, this.ctx.textBaseline = f, this.ctx.textAlign = h;
2591
2600
  let x = 0;
2592
2601
  f === "top" ? x = i + d : f === "bottom" ? x = i + r - d : x = i + (r + 1) / 2;
2593
2602
  let g = 0;
2594
- l === "left" ? g = e + d : l === "right" ? g = e + s - d : g = e + s / 2;
2603
+ h === "left" ? g = e + d : h === "right" ? g = e + s - d : g = e + s / 2;
2595
2604
  const { _text: p, ellipsis: u } = this.handleEllipsis(t, s, d, n);
2596
2605
  return this.ctx.fillText(p, g, x), this.ctx.restore(), u;
2597
2606
  }
@@ -2602,8 +2611,8 @@ class fi {
2602
2611
  _text: "",
2603
2612
  ellipsis: r
2604
2613
  };
2605
- const n = this.ctx.measureText("...").width, l = this.ctx.measureText(t).width;
2606
- if (l && l + n >= e - i * 2) {
2614
+ const n = this.ctx.measureText("...").width, h = this.ctx.measureText(t).width;
2615
+ if (h && h + n >= e - i * 2) {
2607
2616
  r = !0;
2608
2617
  let c = 0;
2609
2618
  for (let d = 0; d < t.length; d++)
@@ -2897,15 +2906,15 @@ class xi {
2897
2906
  c.setAttribute("fill", e);
2898
2907
  });
2899
2908
  const n = new Image();
2900
- let l = "";
2909
+ let h = "";
2901
2910
  if (i) {
2902
2911
  const c = new Blob([new XMLSerializer().serializeToString(o)], {
2903
2912
  type: "image/svg+xml"
2904
2913
  });
2905
- l = URL.createObjectURL(c);
2914
+ h = URL.createObjectURL(c);
2906
2915
  } else
2907
- l = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(o));
2908
- return n.src = l, new Promise((c, d) => {
2916
+ h = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(o));
2917
+ return n.src = h, new Promise((c, d) => {
2909
2918
  n.onerror = () => d(new Error("Failed to load image")), n.onload = () => {
2910
2919
  c(n);
2911
2920
  };
@@ -2916,8 +2925,8 @@ class xi {
2916
2925
  }
2917
2926
  }
2918
2927
  class oe extends re {
2919
- constructor(e, i, s, r, o, n, l) {
2920
- super(e, s, r, o, n, "header", l.fixed);
2928
+ constructor(e, i, s, r, o, n, h) {
2929
+ super(e, s, r, o, n, "header", h.fixed);
2921
2930
  a(this, "align");
2922
2931
  a(this, "verticalAlign", "middle");
2923
2932
  a(this, "fixed");
@@ -2936,6 +2945,8 @@ class oe extends re {
2936
2945
  a(this, "key");
2937
2946
  a(this, "required", !1);
2938
2947
  a(this, "readonly", !1);
2948
+ a(this, "ellipsis", !1);
2949
+ a(this, "overflowTooltipShow", !0);
2939
2950
  a(this, "children", []);
2940
2951
  a(this, "column");
2941
2952
  a(this, "colIndex");
@@ -2946,6 +2957,8 @@ class oe extends re {
2946
2957
  a(this, "style", {});
2947
2958
  a(this, "drawX", 0);
2948
2959
  a(this, "drawY", 0);
2960
+ a(this, "visibleWidth", 0);
2961
+ a(this, "visibleHeight", 0);
2949
2962
  a(this, "drawCellBgColor", "");
2950
2963
  a(this, "drawTextColor", "");
2951
2964
  a(this, "drawImageX", 0);
@@ -2954,7 +2967,7 @@ class oe extends re {
2954
2967
  a(this, "drawImageHeight", 0);
2955
2968
  a(this, "drawImageName", "");
2956
2969
  a(this, "drawImageSource");
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;
2970
+ this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.visibleWidth = o, this.visibleHeight = 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.overflowTooltipShow = h.overflowTooltipHeaderShow !== !1, this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2958
2971
  }
2959
2972
  /**
2960
2973
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -2974,11 +2987,11 @@ class oe extends re {
2974
2987
  const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
2975
2988
  let r = i, o = s;
2976
2989
  if (typeof e == "function") {
2977
- const n = e, { backgroundColor: l, color: c } = n({
2990
+ const n = e, { backgroundColor: h, color: c } = n({
2978
2991
  colIndex: this.colIndex,
2979
2992
  column: this.column
2980
2993
  }) || {};
2981
- l && (r = l), c && (o = c);
2994
+ h && (r = h), c && (o = c);
2982
2995
  }
2983
2996
  this.drawCellBgColor = r, this.drawTextColor = o;
2984
2997
  }
@@ -2989,11 +3002,11 @@ class oe extends re {
2989
3002
  const {
2990
3003
  paint: e,
2991
3004
  config: { BORDER_COLOR: i, CELL_PADDING: s, HEADER_FONT: r, BORDER: o }
2992
- } = this.ctx, { drawX: n, drawY: l, displayText: c } = this;
2993
- e.drawRect(n, l, this.width, this.height, {
3005
+ } = this.ctx, { drawX: n, drawY: h, displayText: c } = this;
3006
+ e.drawRect(n, h, this.width, this.height, {
2994
3007
  borderColor: o ? i : "transparent",
2995
3008
  fillColor: this.drawCellBgColor
2996
- }), e.drawText(c, n, l, this.width, this.height, {
3009
+ }), this.ellipsis = e.drawText(c, n, h, this.width, this.height, {
2997
3010
  font: r,
2998
3011
  padding: s,
2999
3012
  color: this.drawTextColor,
@@ -3014,9 +3027,9 @@ class oe extends re {
3014
3027
  drawSelection() {
3015
3028
  const { width: e, height: i, type: s } = this;
3016
3029
  if (["index-selection", "selection"].includes(s)) {
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;
3030
+ 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;
3018
3031
  let f = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck";
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(
3032
+ 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(
3020
3033
  this.drawImageSource,
3021
3034
  this.drawImageX,
3022
3035
  this.drawImageY,
@@ -3107,13 +3120,13 @@ class ui {
3107
3120
  this.ctx.isPointer = !1, this.ctx.stageElement.style.cursor === "pointer" && (this.ctx.stageElement.style.cursor = "default");
3108
3121
  const e = this.ctx.getOffset(t).offsetY, i = this.ctx.getOffset(t).offsetX;
3109
3122
  this.handleHeaderEvent(i, e, this.ctx.header.renderCellHeaders, (s) => {
3110
- this.ctx.emit("cellHeaderMouseenter", s, t), this.ctx.hoverCellHeader && this.ctx.hoverCellHeader !== s && this.ctx.emit("cellHeaderMouseleave", this.ctx.hoverCellHeader, t), this.imageEnterAndLeave(s, t), this.ctx.hoverCellHeader !== s && (this.ctx.hoverCellHeader = s, this.ctx.emit("cellHeaderHoverChange", s));
3123
+ this.ctx.emit("cellHeaderMouseenter", s, t), this.ctx.hoverCellHeader && this.ctx.hoverCellHeader !== s && this.ctx.emit("cellHeaderMouseleave", this.ctx.hoverCellHeader, t), this.imageEnterAndLeave(s, t), this.ctx.hoverCellHeader !== s && (this.ctx.hoverCellHeader = s, this.visibleHoverCell = void 0, this.ctx.emit("cellHeaderHoverChange", s, t));
3111
3124
  }), this.handleBodyEvent(
3112
3125
  i,
3113
3126
  e,
3114
3127
  this.ctx.body.renderRows,
3115
3128
  (s) => {
3116
- this.selectionEnterAndLeave(s, t), this.visibleHoverCell !== s && (this.ctx.emit("visibleCellMouseleave", s, t), this.visibleHoverCell = s, this.ctx.emit("visibleCellHoverChange", s, t));
3129
+ this.selectionEnterAndLeave(s, t), this.visibleHoverCell !== s && (this.ctx.emit("visibleCellMouseleave", s, t), this.visibleHoverCell = s, this.ctx.hoverCellHeader = void 0, this.ctx.emit("visibleCellHoverChange", s, t));
3117
3130
  },
3118
3131
  !0
3119
3132
  ), this.handleBodyEvent(i, e, this.ctx.body.renderRows, (s) => {
@@ -3153,10 +3166,10 @@ class ui {
3153
3166
  colIndex: t.colIndex,
3154
3167
  column: t.column,
3155
3168
  value: t.getValue()
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);
3169
+ }).then((h) => {
3170
+ this.ctx.database.setExpandChildren(t.rowKey, h), this.ctx.database.expandLoading(t.rowKey, !1), this.ctx.emit("expandChange", this.ctx.database.getExpandRowKeys());
3171
+ }).catch((h) => {
3172
+ this.ctx.database.expandLoading(t.rowKey, !1), console.error(h);
3160
3173
  }));
3161
3174
  else {
3162
3175
  const n = this.ctx.database.getIsExpand(t.rowKey);
@@ -3188,15 +3201,15 @@ class ui {
3188
3201
  if (this.isInsideBody(e))
3189
3202
  for (const o of i) {
3190
3203
  const n = o.fixedCells.concat(o.noFixedCells);
3191
- for (const l of n) {
3192
- const c = l.getDrawX(), d = l.getDrawY();
3204
+ for (const h of n) {
3205
+ const c = h.getDrawX(), d = h.getDrawY();
3193
3206
  if (r) {
3194
- if (t > c && t < c + l.visibleWidth && e > d && e < d + l.visibleHeight) {
3195
- s(l);
3207
+ if (t > c && t < c + h.visibleWidth && e > d && e < d + h.visibleHeight) {
3208
+ s(h);
3196
3209
  return;
3197
3210
  }
3198
- } else if (t > c && t < c + l.width && e > d && e < d + l.height) {
3199
- s(l);
3211
+ } else if (t > c && t < c + h.width && e > d && e < d + h.height) {
3212
+ s(h);
3200
3213
  return;
3201
3214
  }
3202
3215
  }
@@ -3234,6 +3247,7 @@ class gi {
3234
3247
  a(this, "stageHeight", 0);
3235
3248
  a(this, "paint");
3236
3249
  a(this, "icons");
3250
+ a(this, "domSelectionStr", "");
3237
3251
  a(this, "isMouseoverTargetContainer", !1);
3238
3252
  a(this, "mousedown", !1);
3239
3253
  a(this, "isPointer", !1);
@@ -3330,10 +3344,10 @@ class gi {
3330
3344
  canvasElement: r,
3331
3345
  overlayerElement: o,
3332
3346
  editorElement: n,
3333
- emptyElement: l,
3347
+ emptyElement: h,
3334
3348
  contextMenuElement: c
3335
3349
  } = t;
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);
3350
+ 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);
3337
3351
  }
3338
3352
  setConfig(t) {
3339
3353
  this.config = new Wt(t);
@@ -3342,8 +3356,8 @@ class gi {
3342
3356
  if (this.config.ENABLE_MERGE_CELL_LINK) {
3343
3357
  const o = this.database.getVirtualBodyCellByKey(t, e);
3344
3358
  if (o && (o.mergeRow || o.mergeCol)) {
3345
- const { dataList: n } = o.getSpanInfo(), l = n.map((c) => ({ ...c, value: i }));
3346
- this.database.batchSetItemValue(l, s);
3359
+ const { dataList: n } = o.getSpanInfo(), h = n.map((c) => ({ ...c, value: i }));
3360
+ this.database.batchSetItemValue(h, s);
3347
3361
  return;
3348
3362
  }
3349
3363
  }
@@ -3357,7 +3371,7 @@ class gi {
3357
3371
  if (r === void 0 || o === void 0) return;
3358
3372
  const n = this.database.getVirtualBodyCell(r, o);
3359
3373
  if (n) {
3360
- const { dataList: l } = n.getSpanInfo(), c = l.map((d) => ({ ...d, value: s.value }));
3374
+ const { dataList: h } = n.getSpanInfo(), c = h.map((d) => ({ ...d, value: s.value }));
3361
3375
  i.push(...c);
3362
3376
  }
3363
3377
  }), this.database.batchSetItemValue(i, e);
@@ -3402,7 +3416,7 @@ class gi {
3402
3416
  for (let r = 0; r <= e[1] - e[0]; r++) {
3403
3417
  const o = [];
3404
3418
  for (let n = 0; n <= i[1] - i[0]; n++) {
3405
- const l = r + e[0], c = n + i[0], d = this.database.getItemValueForRowIndexAndColIndex(l, c);
3419
+ const h = r + e[0], c = n + i[0], d = this.database.getItemValueForRowIndexAndColIndex(h, c);
3406
3420
  d && o.push(d.value);
3407
3421
  }
3408
3422
  s += `${o.join(" ")}\r`, t.push(o);
@@ -3523,8 +3537,8 @@ class zt {
3523
3537
  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;
3524
3538
  let n = 0;
3525
3539
  if (this.type === "horizontal" ? n = s - this.clientX : n = r - this.clientY, this.isDragging && n !== 0) {
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));
3540
+ let h = 0;
3541
+ 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));
3528
3542
  }
3529
3543
  }
3530
3544
  isPointInElement(t, e, i, s, r, o) {
@@ -3550,21 +3564,21 @@ class zt {
3550
3564
  stageHeight: i,
3551
3565
  stageWidth: s,
3552
3566
  config: { SCROLLER_TRACK_SIZE: r = 0, SCROLLER_SIZE: o = 0, BORDER: n }
3553
- } = this.ctx, l = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
3567
+ } = this.ctx, h = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
3554
3568
  if (this.type === "vertical") {
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;
3569
+ 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;
3556
3570
  const p = this.distance ? this.visibleDistance / (x + g) : 0;
3557
3571
  let u = Math.floor(p * this.visibleDistance);
3558
3572
  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));
3559
3573
  } else {
3560
- this.visibleDistance = l - r, this.distance = f - this.visibleDistance, this.splitPoints = [
3561
- l - r,
3574
+ this.visibleDistance = h - r, this.distance = f - this.visibleDistance, this.splitPoints = [
3575
+ h - r,
3562
3576
  c - r,
3563
- l - r,
3577
+ h - r,
3564
3578
  c
3565
3579
  ];
3566
3580
  const p = n ? 0 : 0.5;
3567
- this.trackX = 0, this.trackY = c - r + p, this.trackWidth = l, this.trackHeight = r;
3581
+ this.trackX = 0, this.trackY = c - r + p, this.trackWidth = h, this.trackHeight = r;
3568
3582
  const u = this.distance ? this.visibleDistance / f : 0;
3569
3583
  let w = Math.floor(u * this.visibleDistance);
3570
3584
  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));
@@ -3706,16 +3720,16 @@ class pi {
3706
3720
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3707
3721
  const s = te(i), r = _t(i);
3708
3722
  this.height = t * s, this.width = r.reduce((f, x) => {
3709
- const { width: g = 100, maxWidth: p, minWidth: u } = x;
3723
+ const g = x.width || 100, { maxWidth: p, minWidth: u } = x;
3710
3724
  return p && g > p ? f + p : u && g < u ? f + u : f + g;
3711
3725
  }, 0), this.visibleHeight = this.height;
3712
3726
  const o = ei(ee(i, s));
3713
3727
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3714
3728
  const n = this.ctx.containerElement.getBoundingClientRect();
3715
3729
  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;
3716
- const l = this.visibleWidth - this.width;
3717
- if (this.resizeNum && l > 0) {
3718
- const f = Math.floor(l / this.resizeNum * 100) / 100;
3730
+ const h = this.visibleWidth - this.width;
3731
+ if (this.resizeNum && h > 0) {
3732
+ const f = Math.floor(h / this.resizeNum * 100) / 100;
3719
3733
  this.resizeAllColumn(f);
3720
3734
  }
3721
3735
  const c = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
@@ -3740,8 +3754,8 @@ class pi {
3740
3754
  } = this.ctx;
3741
3755
  if (this.isResizing && this.resizeTarget) {
3742
3756
  const r = this.resizeTarget.width, o = this.resizeTarget.minWidth, n = this.resizeTarget.maxWidth;
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");
3757
+ let h = e.clientX - this.clientX;
3758
+ 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");
3745
3759
  } else {
3746
3760
  if (this.resizeTarget = null, this.isMouseDown)
3747
3761
  return;
@@ -3752,9 +3766,9 @@ class pi {
3752
3766
  this.ctx.stageElement.style.cursor === "col-resize" && (this.ctx.stageElement.style.cursor = "default");
3753
3767
  const r = [...this.renderFixedCellHeaders, ...this.renderCenterCellHeaders];
3754
3768
  for (const o of r) {
3755
- const { offsetX: n, offsetY: l } = this.ctx.getOffset(e), c = n, d = o.getDrawX();
3769
+ const { offsetX: n, offsetY: h } = this.ctx.getOffset(e), c = n, d = o.getDrawX();
3756
3770
  c > d + o.width - 5 && c < d + o.width + 4 && c < i - 4 && // 视窗中最后一列不允许调整宽
3757
- o.colspan <= 1 && this.ctx.isTarget(e) && l <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3771
+ o.colspan <= 1 && this.ctx.isTarget(e) && h <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3758
3772
  }
3759
3773
  }
3760
3774
  }));
@@ -3808,10 +3822,10 @@ class pi {
3808
3822
  let s = e;
3809
3823
  const { HEADER_HEIGHT: r = 0 } = this.ctx.config;
3810
3824
  for (let o = 0; o < i; o++) {
3811
- const n = t[o], l = r * (n.rowspan || 0), c = r * (n.level || 0);
3825
+ const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
3812
3826
  let { minWidth: d, maxWidth: f } = n, x = n.width || 100;
3813
3827
  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));
3814
- const g = new oe(this.ctx, this.columnIndex, s, c, x, l, n);
3828
+ const g = new oe(this.ctx, this.columnIndex, s, c, x, h, n);
3815
3829
  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;
3816
3830
  }
3817
3831
  }
@@ -3843,8 +3857,8 @@ class pi {
3843
3857
  colorStart: "rgba(0,0,0,0.1)",
3844
3858
  colorEnd: "rgba(0,0,0,0)"
3845
3859
  }), i < Math.floor(s.width - r - 1) && e !== n) {
3846
- const l = s.width - (this.x + this.width) + r - e;
3847
- this.ctx.paint.drawShadow(l, this.y, e, this.height, {
3860
+ const h = s.width - (this.x + this.width) + r - e;
3861
+ this.ctx.paint.drawShadow(h, this.y, e, this.height, {
3848
3862
  fillColor: o,
3849
3863
  side: "left",
3850
3864
  shadowWidth: 4,
@@ -3886,7 +3900,7 @@ class pi {
3886
3900
  }
3887
3901
  }
3888
3902
  class ne {
3889
- constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, l = "body") {
3903
+ constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, h = "body") {
3890
3904
  a(this, "ctx");
3891
3905
  a(this, "x", 0);
3892
3906
  a(this, "y", 0);
@@ -3899,7 +3913,7 @@ class ne {
3899
3913
  a(this, "rowKey", "");
3900
3914
  a(this, "rowType", "body");
3901
3915
  a(this, "data");
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();
3916
+ 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();
3903
3917
  }
3904
3918
  update() {
3905
3919
  const { header: t } = this.ctx, e = [], i = [], s = [];
@@ -3977,7 +3991,7 @@ class mi {
3977
3991
  FOOTER_FIXED: r,
3978
3992
  SCROLLER_TRACK_SIZE: o = 0,
3979
3993
  HEIGHT: n,
3980
- EMPTY_BODY_HEIGHT: l = 0,
3994
+ EMPTY_BODY_HEIGHT: h = 0,
3981
3995
  MAX_HEIGHT: c = 0,
3982
3996
  ENABLE_OFFSET_HEIGHT: d = 0,
3983
3997
  OFFSET_HEIGHT: f = 0,
@@ -3990,7 +4004,7 @@ class mi {
3990
4004
  const { data: g, sumHeight: p } = s.getData();
3991
4005
  this.height = p, this.data = g, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - o;
3992
4006
  const u = this.ctx.footer.height;
3993
- !this.data.length && !n ? this.height = l : !this.data.length && n && (this.height = n - e.height - u - o);
4007
+ !this.data.length && !n ? this.height = h : !this.data.length && n && (this.height = n - e.height - u - o);
3994
4008
  let w = this.height + e.height + o;
3995
4009
  w += u;
3996
4010
  let m = w;
@@ -4012,7 +4026,7 @@ class mi {
4012
4026
  bodyHeight: this.height,
4013
4027
  footerHeight: u,
4014
4028
  width: this.width,
4015
- height: this.data.length ? 0 : l + u
4029
+ height: this.data.length ? 0 : h + u
4016
4030
  });
4017
4031
  const _ = Math.round(t.width / E * 1e4) / 1e4, v = Math.round(t.height / E * 1e4) / 1e4;
4018
4032
  this.ctx.canvasElement.setAttribute("style", `height:${v}px;width:${_}px;`), this.ctx.paint.scale(E);
@@ -4035,7 +4049,7 @@ class mi {
4035
4049
  }), this.ctx.on("mousemove", (e) => {
4036
4050
  if (this.ctx.editing) return;
4037
4051
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s, n = e.clientY, {
4038
- stageHeight: l,
4052
+ stageHeight: h,
4039
4053
  scrollY: c,
4040
4054
  config: { RESIZE_ROW_MIN_HEIGHT: d = 0 }
4041
4055
  } = this.ctx;
@@ -4055,7 +4069,7 @@ class mi {
4055
4069
  this.ctx.stageElement.style.cursor === "row-resize" && (this.ctx.stageElement.style.cursor = "default");
4056
4070
  for (let f = 0; f < this.renderRows.length; f++) {
4057
4071
  const x = this.renderRows[f];
4058
- if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < l - 4)
4072
+ if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < h - 4)
4059
4073
  for (let p = 0; p < x.cells.length; p++) {
4060
4074
  const u = x.cells[p];
4061
4075
  o > u.drawX + 10 && o < u.drawX + u.width - 10 && u.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
@@ -4104,8 +4118,8 @@ class mi {
4104
4118
  colorStart: "rgba(0,0,0,0.1)",
4105
4119
  colorEnd: "rgba(0,0,0,0)"
4106
4120
  }), i < Math.floor(s.width - r - 1) && e !== n) {
4107
- const l = s.width - (this.x + this.width) + r - e;
4108
- this.ctx.paint.drawShadow(l, this.y, e, this.height, {
4121
+ const h = s.width - (this.x + this.width) + r - e;
4122
+ this.ctx.paint.drawShadow(h, this.y, e, this.height, {
4109
4123
  fillColor: o,
4110
4124
  side: "left",
4111
4125
  shadowWidth: 4,
@@ -4133,12 +4147,12 @@ class mi {
4133
4147
  config: { CELL_HEIGHT: s }
4134
4148
  } = this.ctx, r = i, { data: o, positions: n } = e.getData();
4135
4149
  this.ctx.maxRowIndex = o.length - 1;
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) {
4150
+ let h = this.binarySearch(n, r), c = this.binarySearch(n, r + this.visibleHeight);
4151
+ if (c === -1 && (c = this.ctx.maxRowIndex), h === -1 && c === this.ctx.maxRowIndex) {
4138
4152
  const f = Math.floor(this.visibleHeight / s);
4139
- l = this.ctx.maxRowIndex - f;
4153
+ h = this.ctx.maxRowIndex - f;
4140
4154
  }
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;
4155
+ 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;
4142
4156
  const d = [];
4143
4157
  for (let f = 0; f < this.visibleRows.length; f++) {
4144
4158
  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);
@@ -4189,8 +4203,8 @@ class yi {
4189
4203
  stageWidth: r,
4190
4204
  config: { HEADER_BG_COLOR: o, SCROLLER_TRACK_SIZE: n }
4191
4205
  } = this.ctx;
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, {
4206
+ let h = this.y;
4207
+ 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, {
4194
4208
  fillColor: o,
4195
4209
  side: "right",
4196
4210
  shadowWidth: 4,
@@ -4198,7 +4212,7 @@ class yi {
4198
4212
  colorEnd: "rgba(0,0,0,0)"
4199
4213
  }), i < Math.floor(s.width - r - 1) && e !== n) {
4200
4214
  const c = s.width - (this.x + this.width) + r - e;
4201
- this.ctx.paint.drawShadow(c, l, e, this.height, {
4215
+ this.ctx.paint.drawShadow(c, h, e, this.height, {
4202
4216
  fillColor: o,
4203
4217
  side: "left",
4204
4218
  shadowWidth: 4,
@@ -4271,13 +4285,13 @@ class Ei {
4271
4285
  this.isMultipleRow || this.mouseenter();
4272
4286
  }
4273
4287
  }), this.ctx.on("cellMousedown", (t, e) => {
4274
- if (this.ctx.isTarget(e) && this.ctx.stageElement.style.cursor !== "pointer" && !this.ctx.isPointer && this.ctx.stageElement.style.cursor !== "crosshair") {
4275
- if (t.operation) {
4276
- this.isMultipleRow = !0, this.selectRows(t);
4277
- return;
4278
- }
4279
- e.preventDefault(), this.isMultipleRow = !1, this.click(e.shiftKey), this.ctx.emit("selectorClick", t);
4288
+ if (!this.ctx.isTarget(e) || this.ctx.stageElement.style.cursor === "pointer" || this.ctx.isPointer || this.ctx.stageElement.style.cursor === "crosshair")
4289
+ return;
4290
+ if (t.operation) {
4291
+ this.isMultipleRow = !0, this.selectRows(t);
4292
+ return;
4280
4293
  }
4294
+ window.getComputedStyle(e.target).userSelect !== "text" && e.preventDefault(), this.isMultipleRow = !1, this.click(e.shiftKey), this.ctx.emit("selectorClick", t);
4281
4295
  }), this.ctx.on("mouseup", () => {
4282
4296
  this.mousedownHeader = !1;
4283
4297
  const t = setTimeout(() => {
@@ -4286,7 +4300,9 @@ class Ei {
4286
4300
  }), this.ctx.on("cellHeaderHoverChange", (t) => {
4287
4301
  this.ctx.mousedown && this.selectCols(t);
4288
4302
  }), this.ctx.on("cellHeaderMousedown", (t, e) => {
4289
- this.ctx.stageElement.style.cursor !== "pointer" && (this.ctx.isPointer || (e.preventDefault(), this.mousedownHeader = !0, this.selectCols(t)));
4303
+ if (this.ctx.stageElement.style.cursor === "pointer" || this.ctx.isPointer)
4304
+ return;
4305
+ window.getComputedStyle(e.target).userSelect !== "text" && e.preventDefault(), this.mousedownHeader = !0, this.selectCols(t);
4290
4306
  }), this.ctx.on("keydown", (t) => {
4291
4307
  if (!this.ctx.editing) {
4292
4308
  if (t.ctrlKey && t.code === "KeyV" || t.metaKey && t.code === "KeyV") {
@@ -4354,12 +4370,12 @@ class Ei {
4354
4370
  this.ctx.mousedown && (this.ctx.selectorMove = !0), this.ctx.selector.enable = !0;
4355
4371
  const {
4356
4372
  SELECTOR_AREA_MIN_X: n,
4357
- SELECTOR_AREA_MAX_X: l,
4373
+ SELECTOR_AREA_MAX_X: h,
4358
4374
  SELECTOR_AREA_MIN_Y: c,
4359
4375
  SELECTOR_AREA_MAX_Y: d,
4360
4376
  SELECTOR_AREA_MAX_X_OFFSET: f,
4361
4377
  SELECTOR_AREA_MAX_Y_OFFSET: x
4362
- } = this.ctx.config, g = n, p = l || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4378
+ } = this.ctx.config, g = n, p = h || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4363
4379
  let [m, C] = r, [y, b] = o;
4364
4380
  if (m < g || C > p || y < u || b > w)
4365
4381
  return;
@@ -4385,11 +4401,11 @@ class Ei {
4385
4401
  adjustMergeCells(t, e) {
4386
4402
  var p;
4387
4403
  const [i, s] = e, [r, o] = t;
4388
- let n = [], l = [];
4404
+ let n = [], h = [];
4389
4405
  for (let u = 0; u <= e[1] - e[0]; u++)
4390
4406
  for (let w = 0; w <= t[1] - t[0]; w++) {
4391
4407
  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));
4408
+ y && ((m === i || m === s) && n.push(y), (C === r || C === o) && h.push(y));
4393
4409
  }
4394
4410
  const c = n.reduce(
4395
4411
  (u, w) => {
@@ -4400,7 +4416,7 @@ class Ei {
4400
4416
  minY: i,
4401
4417
  maxY: s
4402
4418
  }
4403
- ), d = l.reduce(
4419
+ ), d = h.reduce(
4404
4420
  (u, w) => {
4405
4421
  const { xArr: m } = w.getSpanInfo(), [C, y] = m;
4406
4422
  return u.minX = Math.min(u.minX, C), u.maxX = Math.max(u.maxX, y), u;
@@ -4432,15 +4448,15 @@ class Ei {
4432
4448
  if (this.ctx.mousedown && this.ctx.focusCellHeader) {
4433
4449
  const { colIndex: n } = this.ctx.focusCellHeader;
4434
4450
  if (this.ctx.clearSelector(), t.colIndex >= n) {
4435
- const l = [n, t.colIndex + t.colspan - 1], c = [r, o];
4436
- this.setSelector(l, c);
4451
+ const h = [n, t.colIndex + t.colspan - 1], c = [r, o];
4452
+ this.setSelector(h, c);
4437
4453
  } else {
4438
- const l = [t.colIndex, n], c = [r, o];
4439
- this.setSelector(l, c);
4454
+ const h = [t.colIndex, n], c = [r, o];
4455
+ this.setSelector(h, c);
4440
4456
  }
4441
4457
  } else {
4442
- const n = [t.colIndex, t.colIndex + t.colspan - 1], l = [r, o];
4443
- this.setSelector(n, l);
4458
+ const n = [t.colIndex, t.colIndex + t.colspan - 1], h = [r, o];
4459
+ this.setSelector(n, h);
4444
4460
  }
4445
4461
  }
4446
4462
  selectAll() {
@@ -4454,8 +4470,8 @@ class Ei {
4454
4470
  SELECTOR_AREA_MIN_Y: r,
4455
4471
  SELECTOR_AREA_MAX_Y: o,
4456
4472
  SELECTOR_AREA_MAX_X_OFFSET: n,
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];
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];
4459
4475
  this.setSelector(g, p);
4460
4476
  }
4461
4477
  }
@@ -4465,16 +4481,16 @@ class Ei {
4465
4481
  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;
4466
4482
  if (e) {
4467
4483
  this.ctx.setFocusCell(t);
4468
- const l = [n, o], c = [t.rowIndex, t.rowIndex];
4469
- this.setSelector(l, c);
4484
+ const h = [n, o], c = [t.rowIndex, t.rowIndex];
4485
+ this.setSelector(h, c);
4470
4486
  }
4471
4487
  if (this.ctx.focusCell && this.ctx.mousedown) {
4472
- const { rowIndex: l } = this.ctx.focusCell;
4473
- if (t.rowIndex >= l) {
4474
- const c = [n, o], d = [l, t.rowIndex];
4488
+ const { rowIndex: h } = this.ctx.focusCell;
4489
+ if (t.rowIndex >= h) {
4490
+ const c = [n, o], d = [h, t.rowIndex];
4475
4491
  this.setSelector(c, d);
4476
4492
  } else {
4477
- const c = [n, o], d = [t.rowIndex, l];
4493
+ const c = [n, o], d = [t.rowIndex, h];
4478
4494
  this.setSelector(c, d);
4479
4495
  }
4480
4496
  }
@@ -4484,7 +4500,7 @@ class Ei {
4484
4500
  return;
4485
4501
  const { mousedown: t, focusCell: e, hoverCell: i } = this.ctx;
4486
4502
  if (t && e && i) {
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];
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];
4488
4504
  this.setSelector(d, f);
4489
4505
  }
4490
4506
  }
@@ -4494,7 +4510,7 @@ class Ei {
4494
4510
  if (this.ctx.selector.enable = !0, i && t) {
4495
4511
  if (this.ctx.config.ENABLE_SELECTOR_SINGLE)
4496
4512
  return;
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];
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];
4498
4514
  this.setSelector(x, g);
4499
4515
  } else {
4500
4516
  this.ctx.emit("cellSelectedClick", e);
@@ -4520,7 +4536,7 @@ class Ei {
4520
4536
  * @returns
4521
4537
  */
4522
4538
  copy() {
4523
- if (!this.ctx.config.ENABLE_COPY)
4539
+ if (!this.ctx.config.ENABLE_COPY || this.ctx.domSelectionStr)
4524
4540
  return;
4525
4541
  let { value: t, xArr: e, yArr: i } = this.ctx.getSelectedData();
4526
4542
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(e, i))
@@ -4560,8 +4576,8 @@ class Ei {
4560
4576
  let s = [];
4561
4577
  const r = /* @__PURE__ */ new Set();
4562
4578
  for (let n = 0; n <= e[1] - e[0]; n++)
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);
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);
4565
4581
  if (f) {
4566
4582
  const { rowKey: x, key: g } = f;
4567
4583
  this.ctx.database.getReadonly(x, g) || (r.add(x), s.push({
@@ -4593,7 +4609,7 @@ class Ei {
4593
4609
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4594
4610
  navigator.clipboard.readText().then(async (r) => {
4595
4611
  let o = si(r);
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;
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;
4597
4613
  (g > 0 || p > 0) && this.ctx.emit("onPastedDataOverflow", {
4598
4614
  maxY: d,
4599
4615
  maxX: x,
@@ -4604,7 +4620,7 @@ class Ei {
4604
4620
  textArr: o
4605
4621
  });
4606
4622
  const u = o.length === 1 && o[0].length === 1;
4607
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, l) && !u) {
4623
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !u) {
4608
4624
  const y = {
4609
4625
  code: "ERR_MERGED_CELLS_PASTE",
4610
4626
  message: "Merged cells cannot span paste data"
@@ -4621,10 +4637,10 @@ class Ei {
4621
4637
  O
4622
4638
  );
4623
4639
  if (_) {
4624
- const { rowKey: v, key: S } = _;
4625
- this.ctx.database.getReadonly(v, S) || (s.add(v), w.push({
4640
+ const { rowKey: v, key: L } = _;
4641
+ this.ctx.database.getReadonly(v, L) || (s.add(v), w.push({
4626
4642
  rowKey: v,
4627
- key: S,
4643
+ key: L,
4628
4644
  value: I,
4629
4645
  row: {}
4630
4646
  //内部有设置
@@ -4654,7 +4670,7 @@ class Ei {
4654
4670
  oldValue: this.ctx.database.getItemValue(E.rowKey, E.key),
4655
4671
  row: this.ctx.database.getRowDataItemForRowKey(E.rowKey)
4656
4672
  }));
4657
- if (w = await y(b, n, l, o), w && !w.length)
4673
+ if (w = await y(b, n, h, o), w && !w.length)
4658
4674
  return;
4659
4675
  }
4660
4676
  this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
@@ -4677,7 +4693,7 @@ class Ei {
4677
4693
  if (!e)
4678
4694
  return;
4679
4695
  let { colIndex: i = 0, rowIndex: s = 0 } = e;
4680
- const r = 0, o = 0, n = this.ctx.maxColIndex, l = this.ctx.maxRowIndex;
4696
+ const r = 0, o = 0, n = this.ctx.maxColIndex, h = this.ctx.maxRowIndex;
4681
4697
  switch (t) {
4682
4698
  case "LEFT":
4683
4699
  i > r && i--;
@@ -4689,7 +4705,7 @@ class Ei {
4689
4705
  i < n && i++;
4690
4706
  break;
4691
4707
  case "BOTTOM":
4692
- s < l && s++;
4708
+ s < h && s++;
4693
4709
  break;
4694
4710
  }
4695
4711
  const c = [i, i], d = [s, s], f = this.getCell(s, i);
@@ -4706,8 +4722,8 @@ class Ei {
4706
4722
  SELECTOR_AREA_MIN_Y: r,
4707
4723
  SELECTOR_AREA_MAX_Y: o,
4708
4724
  SELECTOR_AREA_MAX_X_OFFSET: n,
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;
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;
4711
4727
  return !(e < c || e > d || t < f || t > x);
4712
4728
  }
4713
4729
  /**
@@ -4721,7 +4737,7 @@ class Ei {
4721
4737
  let n = 10 * (s === "left" ? -1 : 1);
4722
4738
  this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerX = setInterval(() => {
4723
4739
  n *= 1.5;
4724
- const { scrollX: l } = this.ctx, c = l + n;
4740
+ const { scrollX: h } = this.ctx, c = h + n;
4725
4741
  (c < 0 || c > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(c);
4726
4742
  }, 100);
4727
4743
  }
@@ -4730,7 +4746,7 @@ class Ei {
4730
4746
  let n = 10 * (r === "top" ? -1 : 1);
4731
4747
  this.timerY && (clearInterval(this.timerY), this.timerY = 0), this.timerY = setInterval(() => {
4732
4748
  n *= 1.5;
4733
- const { scrollY: l } = this.ctx, c = l + n;
4749
+ const { scrollY: h } = this.ctx, c = h + n;
4734
4750
  (c < 0 || c > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(c);
4735
4751
  }, 100);
4736
4752
  }
@@ -4747,7 +4763,7 @@ class Ei {
4747
4763
  fixedLeftWidth: r,
4748
4764
  header: o,
4749
4765
  footer: n,
4750
- body: l,
4766
+ body: h,
4751
4767
  scrollX: c,
4752
4768
  scrollY: d,
4753
4769
  config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK: p }
@@ -4757,12 +4773,12 @@ class Ei {
4757
4773
  p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4758
4774
  const { drawX: u, drawY: w, width: m, height: C, fixed: y } = i, b = r - u + 1, E = i.drawX + m - (e - s) + 1;
4759
4775
  let R = o.height - w, O = C;
4760
- O > l.visibleHeight && (O = l.visibleHeight);
4776
+ O > h.visibleHeight && (O = h.visibleHeight);
4761
4777
  let I = 0;
4762
4778
  x && (g === "top" ? R = o.height + n.height - w : I = n.visibleHeight);
4763
4779
  const _ = w + O - (t - I - f);
4764
- let v = c, S = d;
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));
4780
+ let v = c, L = d;
4781
+ E > 0 && !y ? v = Math.floor(c + E) : b > 0 && !y && (v = Math.floor(c - b)), R > 0 ? L = Math.floor(d - R) : _ > 0 && (L = Math.floor(d + _)), (Math.abs(c - v) > 2 || Math.abs(d - L) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, L), this.ctx.emit("adjustBoundaryPosition", i));
4766
4782
  }
4767
4783
  destroy() {
4768
4784
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -4778,7 +4794,7 @@ class Ci {
4778
4794
  this.ctx.on("mousemove", (t) => {
4779
4795
  if (this.ctx.stageElement.style.cursor === "crosshair" && (this.ctx.stageElement.style.cursor = "default"), this.ctx.editing || !this.ctx.focusCell || !this.maxColRowCell)
4780
4796
  return;
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;
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;
4782
4798
  e > x && i > g && e < x + d && i < g + d && (this.ctx.stageElement.style.cursor = "crosshair");
4783
4799
  }), this.ctx.on("cellMouseenter", (t) => {
4784
4800
  const { xArr: e, yArr: i } = this.ctx.selector, s = e[1], r = i[1], { colIndex: o, rowIndex: n } = t;
@@ -4811,22 +4827,22 @@ class Ci {
4811
4827
  return;
4812
4828
  let o = t, n = e;
4813
4829
  if (!r) {
4814
- const [l] = n;
4815
- n = [l, l];
4830
+ const [h] = n;
4831
+ n = [h, h];
4816
4832
  }
4817
4833
  if (!s) {
4818
- const [l] = o;
4819
- o = [l, l];
4834
+ const [h] = o;
4835
+ o = [h, h];
4820
4836
  }
4821
4837
  if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(o) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(n)) {
4822
4838
  const {
4823
- SELECTOR_AREA_MIN_X: l,
4839
+ SELECTOR_AREA_MIN_X: h,
4824
4840
  SELECTOR_AREA_MAX_X: c,
4825
4841
  SELECTOR_AREA_MIN_Y: d,
4826
4842
  SELECTOR_AREA_MAX_Y: f,
4827
4843
  SELECTOR_AREA_MAX_X_OFFSET: x,
4828
4844
  SELECTOR_AREA_MAX_Y_OFFSET: g
4829
- } = this.ctx.config, p = l, u = c || this.ctx.maxColIndex - x, w = d, m = f || this.ctx.maxRowIndex - g;
4845
+ } = this.ctx.config, p = h, u = c || this.ctx.maxColIndex - x, w = d, m = f || this.ctx.maxRowIndex - g;
4830
4846
  let [C, y] = o, [b, E] = n;
4831
4847
  if (C < p || b < w)
4832
4848
  return;
@@ -4855,8 +4871,8 @@ class Ci {
4855
4871
  const u = g + e.yArr[0], w = p + e.xArr[0];
4856
4872
  i.set(`${u}-${w}`, !0);
4857
4873
  }
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) {
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) {
4860
4876
  const g = {
4861
4877
  code: "ERR_MERGED_CELLS_AUTOFILL",
4862
4878
  message: "Merged cells cannot span autofill data"
@@ -4865,9 +4881,9 @@ class Ci {
4865
4881
  return;
4866
4882
  }
4867
4883
  let d = [];
4868
- for (let g = 0; g <= l[1] - l[0]; g++)
4884
+ for (let g = 0; g <= h[1] - h[0]; g++)
4869
4885
  for (let p = 0; p <= n[1] - n[0]; p++) {
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}`;
4886
+ const u = p + n[0], w = g + h[0], m = s[g % o][p % r], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), y = `${w}-${u}`;
4871
4887
  if (C && !i.has(y)) {
4872
4888
  const { rowKey: b, key: E } = C;
4873
4889
  this.ctx.database.getReadonly(b, E) || (t.add(b), d.push({
@@ -4890,7 +4906,7 @@ class Ci {
4890
4906
  oldValue: this.ctx.database.getItemValue(u.rowKey, u.key),
4891
4907
  row: this.ctx.database.getRowDataItemForRowKey(u.rowKey)
4892
4908
  }));
4893
- if (d = await g(p, n, l), d && !d.length)
4909
+ if (d = await g(p, n, h), d && !d.length)
4894
4910
  return;
4895
4911
  }
4896
4912
  this.ctx.batchSetItemValueByEditor(d, !0);
@@ -4911,9 +4927,9 @@ class Ci {
4911
4927
  destroy() {
4912
4928
  }
4913
4929
  }
4914
- const rt = Math.min, U = Math.max, ft = Math.round, z = (h) => ({
4915
- x: h,
4916
- y: h
4930
+ const rt = Math.min, U = Math.max, ft = Math.round, z = (l) => ({
4931
+ x: l,
4932
+ y: l
4917
4933
  }), bi = {
4918
4934
  left: "right",
4919
4935
  right: "left",
@@ -4923,46 +4939,46 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (h) => ({
4923
4939
  start: "end",
4924
4940
  end: "start"
4925
4941
  };
4926
- function It(h, t, e) {
4927
- return U(h, rt(t, e));
4942
+ function It(l, t, e) {
4943
+ return U(l, rt(t, e));
4928
4944
  }
4929
- function at(h, t) {
4930
- return typeof h == "function" ? h(t) : h;
4945
+ function at(l, t) {
4946
+ return typeof l == "function" ? l(t) : l;
4931
4947
  }
4932
- function G(h) {
4933
- return h.split("-")[0];
4948
+ function G(l) {
4949
+ return l.split("-")[0];
4934
4950
  }
4935
- function ht(h) {
4936
- return h.split("-")[1];
4951
+ function lt(l) {
4952
+ return l.split("-")[1];
4937
4953
  }
4938
- function ae(h) {
4939
- return h === "x" ? "y" : "x";
4954
+ function ae(l) {
4955
+ return l === "x" ? "y" : "x";
4940
4956
  }
4941
- function Mt(h) {
4942
- return h === "y" ? "height" : "width";
4957
+ function Mt(l) {
4958
+ return l === "y" ? "height" : "width";
4943
4959
  }
4944
- function J(h) {
4945
- return ["top", "bottom"].includes(G(h)) ? "y" : "x";
4960
+ function J(l) {
4961
+ return ["top", "bottom"].includes(G(l)) ? "y" : "x";
4946
4962
  }
4947
- function Ht(h) {
4948
- return ae(J(h));
4963
+ function Ht(l) {
4964
+ return ae(J(l));
4949
4965
  }
4950
- function Ri(h, t, e) {
4966
+ function Ri(l, t, e) {
4951
4967
  e === void 0 && (e = !1);
4952
- const i = ht(h), s = Ht(h), r = Mt(s);
4968
+ const i = lt(l), s = Ht(l), r = Mt(s);
4953
4969
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4954
4970
  return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4955
4971
  }
4956
- function _i(h) {
4957
- const t = xt(h);
4958
- return [Ot(h), t, Ot(t)];
4972
+ function _i(l) {
4973
+ const t = xt(l);
4974
+ return [Ot(l), t, Ot(t)];
4959
4975
  }
4960
- function Ot(h) {
4961
- return h.replace(/start|end/g, (t) => vi[t]);
4976
+ function Ot(l) {
4977
+ return l.replace(/start|end/g, (t) => vi[t]);
4962
4978
  }
4963
- function Ii(h, t, e) {
4979
+ function Ii(l, t, e) {
4964
4980
  const i = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], o = ["bottom", "top"];
4965
- switch (h) {
4981
+ switch (l) {
4966
4982
  case "top":
4967
4983
  case "bottom":
4968
4984
  return e ? t ? s : i : t ? i : s;
@@ -4973,38 +4989,38 @@ function Ii(h, t, e) {
4973
4989
  return [];
4974
4990
  }
4975
4991
  }
4976
- function Oi(h, t, e, i) {
4977
- const s = ht(h);
4978
- let r = Ii(G(h), e === "start", i);
4992
+ function Oi(l, t, e, i) {
4993
+ const s = lt(l);
4994
+ let r = Ii(G(l), e === "start", i);
4979
4995
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4980
4996
  }
4981
- function xt(h) {
4982
- return h.replace(/left|right|bottom|top/g, (t) => bi[t]);
4997
+ function xt(l) {
4998
+ return l.replace(/left|right|bottom|top/g, (t) => bi[t]);
4983
4999
  }
4984
- function Li(h) {
5000
+ function Si(l) {
4985
5001
  return {
4986
5002
  top: 0,
4987
5003
  right: 0,
4988
5004
  bottom: 0,
4989
5005
  left: 0,
4990
- ...h
5006
+ ...l
4991
5007
  };
4992
5008
  }
4993
- function he(h) {
4994
- return typeof h != "number" ? Li(h) : {
4995
- top: h,
4996
- right: h,
4997
- bottom: h,
4998
- left: h
5009
+ function le(l) {
5010
+ return typeof l != "number" ? Si(l) : {
5011
+ top: l,
5012
+ right: l,
5013
+ bottom: l,
5014
+ left: l
4999
5015
  };
5000
5016
  }
5001
- function ut(h) {
5017
+ function ut(l) {
5002
5018
  const {
5003
5019
  x: t,
5004
5020
  y: e,
5005
5021
  width: i,
5006
5022
  height: s
5007
- } = h;
5023
+ } = l;
5008
5024
  return {
5009
5025
  width: i,
5010
5026
  height: s,
@@ -5016,14 +5032,14 @@ function ut(h) {
5016
5032
  y: e
5017
5033
  };
5018
5034
  }
5019
- function $t(h, t, e) {
5035
+ function $t(l, t, e) {
5020
5036
  let {
5021
5037
  reference: i,
5022
5038
  floating: s
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;
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;
5025
5041
  let g;
5026
- switch (l) {
5042
+ switch (h) {
5027
5043
  case "top":
5028
5044
  g = {
5029
5045
  x: d,
@@ -5054,7 +5070,7 @@ function $t(h, t, e) {
5054
5070
  y: i.y
5055
5071
  };
5056
5072
  }
5057
- switch (ht(t)) {
5073
+ switch (lt(t)) {
5058
5074
  case "start":
5059
5075
  g[o] -= x * (e && c ? -1 : 1);
5060
5076
  break;
@@ -5064,21 +5080,21 @@ function $t(h, t, e) {
5064
5080
  }
5065
5081
  return g;
5066
5082
  }
5067
- const Si = async (h, t, e) => {
5083
+ const Li = async (l, t, e) => {
5068
5084
  const {
5069
5085
  placement: i = "bottom",
5070
5086
  strategy: s = "absolute",
5071
5087
  middleware: r = [],
5072
5088
  platform: o
5073
- } = e, n = r.filter(Boolean), l = await (o.isRTL == null ? void 0 : o.isRTL(t));
5089
+ } = e, n = r.filter(Boolean), h = await (o.isRTL == null ? void 0 : o.isRTL(t));
5074
5090
  let c = await o.getElementRects({
5075
- reference: h,
5091
+ reference: l,
5076
5092
  floating: t,
5077
5093
  strategy: s
5078
5094
  }), {
5079
5095
  x: d,
5080
5096
  y: f
5081
- } = $t(c, i, l), x = i, g = {}, p = 0;
5097
+ } = $t(c, i, h), x = i, g = {}, p = 0;
5082
5098
  for (let u = 0; u < n.length; u++) {
5083
5099
  const {
5084
5100
  name: w,
@@ -5098,7 +5114,7 @@ const Si = async (h, t, e) => {
5098
5114
  rects: c,
5099
5115
  platform: o,
5100
5116
  elements: {
5101
- reference: h,
5117
+ reference: l,
5102
5118
  floating: t
5103
5119
  }
5104
5120
  });
@@ -5109,13 +5125,13 @@ const Si = async (h, t, e) => {
5109
5125
  ...b
5110
5126
  }
5111
5127
  }, E && p <= 50 && (p++, typeof E == "object" && (E.placement && (x = E.placement), E.rects && (c = E.rects === !0 ? await o.getElementRects({
5112
- reference: h,
5128
+ reference: l,
5113
5129
  floating: t,
5114
5130
  strategy: s
5115
5131
  }) : E.rects), {
5116
5132
  x: d,
5117
5133
  y: f
5118
- } = $t(c, x, l)), u = -1);
5134
+ } = $t(c, x, h)), u = -1);
5119
5135
  }
5120
5136
  return {
5121
5137
  x: d,
@@ -5125,7 +5141,7 @@ const Si = async (h, t, e) => {
5125
5141
  middlewareData: g
5126
5142
  };
5127
5143
  };
5128
- async function le(h, t) {
5144
+ async function he(l, t) {
5129
5145
  var e;
5130
5146
  t === void 0 && (t = {});
5131
5147
  const {
@@ -5134,18 +5150,18 @@ async function le(h, t) {
5134
5150
  platform: r,
5135
5151
  rects: o,
5136
5152
  elements: n,
5137
- strategy: l
5138
- } = h, {
5153
+ strategy: h
5154
+ } = l, {
5139
5155
  boundary: c = "clippingAncestors",
5140
5156
  rootBoundary: d = "viewport",
5141
5157
  elementContext: f = "floating",
5142
5158
  altBoundary: x = !1,
5143
5159
  padding: g = 0
5144
- } = at(t, h), p = he(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], m = ut(await r.getClippingRect({
5160
+ } = at(t, l), p = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], m = ut(await r.getClippingRect({
5145
5161
  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)),
5146
5162
  boundary: c,
5147
5163
  rootBoundary: d,
5148
- strategy: l
5164
+ strategy: h
5149
5165
  })), C = f === "floating" ? {
5150
5166
  x: i,
5151
5167
  y: s,
@@ -5161,7 +5177,7 @@ async function le(h, t) {
5161
5177
  elements: n,
5162
5178
  rect: C,
5163
5179
  offsetParent: y,
5164
- strategy: l
5180
+ strategy: h
5165
5181
  }) : C);
5166
5182
  return {
5167
5183
  top: (m.top - E.top + p.top) / b.y,
@@ -5170,9 +5186,9 @@ async function le(h, t) {
5170
5186
  right: (E.right - m.right + p.right) / b.x
5171
5187
  };
5172
5188
  }
5173
- const Ti = (h) => ({
5189
+ const Ti = (l) => ({
5174
5190
  name: "arrow",
5175
- options: h,
5191
+ options: l,
5176
5192
  async fn(t) {
5177
5193
  const {
5178
5194
  x: e,
@@ -5181,20 +5197,20 @@ const Ti = (h) => ({
5181
5197
  rects: r,
5182
5198
  platform: o,
5183
5199
  elements: n,
5184
- middlewareData: l
5200
+ middlewareData: h
5185
5201
  } = t, {
5186
5202
  element: c,
5187
5203
  padding: d = 0
5188
- } = at(h, t) || {};
5204
+ } = at(l, t) || {};
5189
5205
  if (c == null)
5190
5206
  return {};
5191
- const f = he(d), x = {
5207
+ const f = le(d), x = {
5192
5208
  x: e,
5193
5209
  y: i
5194
5210
  }, 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));
5195
5211
  let O = R ? R[y] : 0;
5196
5212
  (!O || !await (o.isElement == null ? void 0 : o.isElement(R))) && (O = n.floating[y] || r.floating[p]);
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;
5213
+ const I = b / 2 - E / 2, _ = O / 2 - u[p] / 2 - 1, v = rt(f[m], _), L = rt(f[C], _), T = v, M = O - u[p] - L, 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 : L) - u[p] / 2 < 0, k = Y ? A < T ? A - T : A - M : 0;
5198
5214
  return {
5199
5215
  [g]: x[g] + k,
5200
5216
  data: {
@@ -5207,10 +5223,10 @@ const Ti = (h) => ({
5207
5223
  reset: Y
5208
5224
  };
5209
5225
  }
5210
- }), Ai = function(h) {
5211
- return h === void 0 && (h = {}), {
5226
+ }), Ai = function(l) {
5227
+ return l === void 0 && (l = {}), {
5212
5228
  name: "flip",
5213
- options: h,
5229
+ options: l,
5214
5230
  async fn(t) {
5215
5231
  var e, i;
5216
5232
  const {
@@ -5218,7 +5234,7 @@ const Ti = (h) => ({
5218
5234
  middlewareData: r,
5219
5235
  rects: o,
5220
5236
  initialPlacement: n,
5221
- platform: l,
5237
+ platform: h,
5222
5238
  elements: c
5223
5239
  } = t, {
5224
5240
  mainAxis: d = !0,
@@ -5228,12 +5244,12 @@ const Ti = (h) => ({
5228
5244
  fallbackAxisSideDirection: p = "none",
5229
5245
  flipAlignment: u = !0,
5230
5246
  ...w
5231
- } = at(h, t);
5247
+ } = at(l, t);
5232
5248
  if ((e = r.arrow) != null && e.alignmentOffset)
5233
5249
  return {};
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";
5250
+ const m = G(s), C = J(n), y = G(n) === n, b = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : _i(n)), R = p !== "none";
5235
5251
  !x && R && E.push(...Oi(n, u, p, b));
5236
- const O = [n, ...E], I = await le(t, w), _ = [];
5252
+ const O = [n, ...E], I = await he(t, w), _ = [];
5237
5253
  let v = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5238
5254
  if (d && _.push(I[m]), f) {
5239
5255
  const A = Ri(s, o, b);
@@ -5243,8 +5259,8 @@ const Ti = (h) => ({
5243
5259
  placement: s,
5244
5260
  overflows: _
5245
5261
  }], !_.every((A) => A <= 0)) {
5246
- var S, T;
5247
- const A = (((S = r.flip) == null ? void 0 : S.index) || 0) + 1, N = O[A];
5262
+ var L, T;
5263
+ const A = (((L = r.flip) == null ? void 0 : L.index) || 0) + 1, N = O[A];
5248
5264
  if (N)
5249
5265
  return {
5250
5266
  data: {
@@ -5287,12 +5303,12 @@ const Ti = (h) => ({
5287
5303
  }
5288
5304
  };
5289
5305
  };
5290
- async function Mi(h, t) {
5306
+ async function Mi(l, t) {
5291
5307
  const {
5292
5308
  placement: e,
5293
5309
  platform: i,
5294
5310
  elements: s
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);
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);
5296
5312
  let {
5297
5313
  mainAxis: x,
5298
5314
  crossAxis: g,
@@ -5306,7 +5322,7 @@ async function Mi(h, t) {
5306
5322
  crossAxis: f.crossAxis || 0,
5307
5323
  alignmentAxis: f.alignmentAxis
5308
5324
  };
5309
- return n && typeof p == "number" && (g = n === "end" ? p * -1 : p), l ? {
5325
+ return n && typeof p == "number" && (g = n === "end" ? p * -1 : p), h ? {
5310
5326
  x: g * d,
5311
5327
  y: x * c
5312
5328
  } : {
@@ -5314,10 +5330,10 @@ async function Mi(h, t) {
5314
5330
  y: g * d
5315
5331
  };
5316
5332
  }
5317
- const Hi = function(h) {
5318
- return h === void 0 && (h = 0), {
5333
+ const Hi = function(l) {
5334
+ return l === void 0 && (l = 0), {
5319
5335
  name: "offset",
5320
- options: h,
5336
+ options: l,
5321
5337
  async fn(t) {
5322
5338
  var e, i;
5323
5339
  const {
@@ -5325,21 +5341,21 @@ const Hi = function(h) {
5325
5341
  y: r,
5326
5342
  placement: o,
5327
5343
  middlewareData: n
5328
- } = t, l = await Mi(t, h);
5344
+ } = t, h = await Mi(t, l);
5329
5345
  return o === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
5330
- x: s + l.x,
5331
- y: r + l.y,
5346
+ x: s + h.x,
5347
+ y: r + h.y,
5332
5348
  data: {
5333
- ...l,
5349
+ ...h,
5334
5350
  placement: o
5335
5351
  }
5336
5352
  };
5337
5353
  }
5338
5354
  };
5339
- }, Di = function(h) {
5340
- return h === void 0 && (h = {}), {
5355
+ }, Di = function(l) {
5356
+ return l === void 0 && (l = {}), {
5341
5357
  name: "shift",
5342
- options: h,
5358
+ options: l,
5343
5359
  async fn(t) {
5344
5360
  const {
5345
5361
  x: e,
@@ -5360,11 +5376,11 @@ const Hi = function(h) {
5360
5376
  };
5361
5377
  }
5362
5378
  },
5363
- ...l
5364
- } = at(h, t), c = {
5379
+ ...h
5380
+ } = at(l, t), c = {
5365
5381
  x: e,
5366
5382
  y: i
5367
- }, d = await le(t, l), f = J(G(s)), x = ae(f);
5383
+ }, d = await he(t, h), f = J(G(s)), x = ae(f);
5368
5384
  let g = c[x], p = c[f];
5369
5385
  if (r) {
5370
5386
  const w = x === "y" ? "top" : "left", m = x === "y" ? "bottom" : "right", C = g + d[w], y = g - d[m];
@@ -5396,56 +5412,56 @@ const Hi = function(h) {
5396
5412
  function gt() {
5397
5413
  return typeof window < "u";
5398
5414
  }
5399
- function tt(h) {
5400
- return ce(h) ? (h.nodeName || "").toLowerCase() : "#document";
5415
+ function tt(l) {
5416
+ return ce(l) ? (l.nodeName || "").toLowerCase() : "#document";
5401
5417
  }
5402
- function X(h) {
5418
+ function X(l) {
5403
5419
  var t;
5404
- return (h == null || (t = h.ownerDocument) == null ? void 0 : t.defaultView) || window;
5420
+ return (l == null || (t = l.ownerDocument) == null ? void 0 : t.defaultView) || window;
5405
5421
  }
5406
- function V(h) {
5422
+ function V(l) {
5407
5423
  var t;
5408
- return (t = (ce(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
5424
+ return (t = (ce(l) ? l.ownerDocument : l.document) || window.document) == null ? void 0 : t.documentElement;
5409
5425
  }
5410
- function ce(h) {
5411
- return gt() ? h instanceof Node || h instanceof X(h).Node : !1;
5426
+ function ce(l) {
5427
+ return gt() ? l instanceof Node || l instanceof X(l).Node : !1;
5412
5428
  }
5413
- function B(h) {
5414
- return gt() ? h instanceof Element || h instanceof X(h).Element : !1;
5429
+ function F(l) {
5430
+ return gt() ? l instanceof Element || l instanceof X(l).Element : !1;
5415
5431
  }
5416
- function K(h) {
5417
- return gt() ? h instanceof HTMLElement || h instanceof X(h).HTMLElement : !1;
5432
+ function K(l) {
5433
+ return gt() ? l instanceof HTMLElement || l instanceof X(l).HTMLElement : !1;
5418
5434
  }
5419
- function qt(h) {
5420
- return !gt() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof X(h).ShadowRoot;
5435
+ function qt(l) {
5436
+ return !gt() || typeof ShadowRoot > "u" ? !1 : l instanceof ShadowRoot || l instanceof X(l).ShadowRoot;
5421
5437
  }
5422
- function lt(h) {
5438
+ function ht(l) {
5423
5439
  const {
5424
5440
  overflow: t,
5425
5441
  overflowX: e,
5426
5442
  overflowY: i,
5427
5443
  display: s
5428
- } = F(h);
5444
+ } = B(l);
5429
5445
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5430
5446
  }
5431
- function Xi(h) {
5432
- return ["table", "td", "th"].includes(tt(h));
5447
+ function Xi(l) {
5448
+ return ["table", "td", "th"].includes(tt(l));
5433
5449
  }
5434
- function wt(h) {
5450
+ function wt(l) {
5435
5451
  return [":popover-open", ":modal"].some((t) => {
5436
5452
  try {
5437
- return h.matches(t);
5453
+ return l.matches(t);
5438
5454
  } catch {
5439
5455
  return !1;
5440
5456
  }
5441
5457
  });
5442
5458
  }
5443
- function Dt(h) {
5444
- const t = Xt(), e = B(h) ? F(h) : h;
5459
+ function Dt(l) {
5460
+ const t = Xt(), e = F(l) ? B(l) : l;
5445
5461
  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));
5446
5462
  }
5447
- function Bi(h) {
5448
- let t = $(h);
5463
+ function Fi(l) {
5464
+ let t = $(l);
5449
5465
  for (; K(t) && !Q(t); ) {
5450
5466
  if (Dt(t))
5451
5467
  return t;
@@ -5458,65 +5474,65 @@ function Bi(h) {
5458
5474
  function Xt() {
5459
5475
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
5460
5476
  }
5461
- function Q(h) {
5462
- return ["html", "body", "#document"].includes(tt(h));
5477
+ function Q(l) {
5478
+ return ["html", "body", "#document"].includes(tt(l));
5463
5479
  }
5464
- function F(h) {
5465
- return X(h).getComputedStyle(h);
5480
+ function B(l) {
5481
+ return X(l).getComputedStyle(l);
5466
5482
  }
5467
- function pt(h) {
5468
- return B(h) ? {
5469
- scrollLeft: h.scrollLeft,
5470
- scrollTop: h.scrollTop
5483
+ function pt(l) {
5484
+ return F(l) ? {
5485
+ scrollLeft: l.scrollLeft,
5486
+ scrollTop: l.scrollTop
5471
5487
  } : {
5472
- scrollLeft: h.scrollX,
5473
- scrollTop: h.scrollY
5488
+ scrollLeft: l.scrollX,
5489
+ scrollTop: l.scrollY
5474
5490
  };
5475
5491
  }
5476
- function $(h) {
5477
- if (tt(h) === "html")
5478
- return h;
5492
+ function $(l) {
5493
+ if (tt(l) === "html")
5494
+ return l;
5479
5495
  const t = (
5480
5496
  // Step into the shadow DOM of the parent of a slotted node.
5481
- h.assignedSlot || // DOM Element detected.
5482
- h.parentNode || // ShadowRoot detected.
5483
- qt(h) && h.host || // Fallback.
5484
- V(h)
5497
+ l.assignedSlot || // DOM Element detected.
5498
+ l.parentNode || // ShadowRoot detected.
5499
+ qt(l) && l.host || // Fallback.
5500
+ V(l)
5485
5501
  );
5486
5502
  return qt(t) ? t.host : t;
5487
5503
  }
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);
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);
5491
5507
  }
5492
- function Lt(h, t, e) {
5508
+ function St(l, t, e) {
5493
5509
  var i;
5494
5510
  t === void 0 && (t = []), e === void 0 && (e = !0);
5495
- const s = de(h), r = s === ((i = h.ownerDocument) == null ? void 0 : i.body), o = X(s);
5511
+ const s = de(l), r = s === ((i = l.ownerDocument) == null ? void 0 : i.body), o = X(s);
5496
5512
  if (r) {
5497
- const n = St(o);
5498
- return t.concat(o, o.visualViewport || [], lt(s) ? s : [], n && e ? Lt(n) : []);
5513
+ const n = Lt(o);
5514
+ return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? St(n) : []);
5499
5515
  }
5500
- return t.concat(s, Lt(s, [], e));
5516
+ return t.concat(s, St(s, [], e));
5501
5517
  }
5502
- function St(h) {
5503
- return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
5518
+ function Lt(l) {
5519
+ return l.parent && Object.getPrototypeOf(l.parent) ? l.frameElement : null;
5504
5520
  }
5505
- function fe(h) {
5506
- const t = F(h);
5521
+ function fe(l) {
5522
+ const t = B(l);
5507
5523
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5508
- const s = K(h), r = s ? h.offsetWidth : e, o = s ? h.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5524
+ const s = K(l), r = s ? l.offsetWidth : e, o = s ? l.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5509
5525
  return n && (e = r, i = o), {
5510
5526
  width: e,
5511
5527
  height: i,
5512
5528
  $: n
5513
5529
  };
5514
5530
  }
5515
- function xe(h) {
5516
- return B(h) ? h : h.contextElement;
5531
+ function xe(l) {
5532
+ return F(l) ? l : l.contextElement;
5517
5533
  }
5518
- function Z(h) {
5519
- const t = xe(h);
5534
+ function Z(l) {
5535
+ const t = xe(l);
5520
5536
  if (!K(t))
5521
5537
  return z(1);
5522
5538
  const e = t.getBoundingClientRect(), {
@@ -5530,117 +5546,117 @@ function Z(h) {
5530
5546
  y: n
5531
5547
  };
5532
5548
  }
5533
- const Fi = /* @__PURE__ */ z(0);
5534
- function ue(h) {
5535
- const t = X(h);
5536
- return !Xt() || !t.visualViewport ? Fi : {
5549
+ const Bi = /* @__PURE__ */ z(0);
5550
+ function ue(l) {
5551
+ const t = X(l);
5552
+ return !Xt() || !t.visualViewport ? Bi : {
5537
5553
  x: t.visualViewport.offsetLeft,
5538
5554
  y: t.visualViewport.offsetTop
5539
5555
  };
5540
5556
  }
5541
- function Ni(h, t, e) {
5542
- return t === void 0 && (t = !1), !e || t && e !== X(h) ? !1 : t;
5557
+ function Ni(l, t, e) {
5558
+ return t === void 0 && (t = !1), !e || t && e !== X(l) ? !1 : t;
5543
5559
  }
5544
- function ot(h, t, e, i) {
5560
+ function ot(l, t, e, i) {
5545
5561
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5546
- const s = h.getBoundingClientRect(), r = xe(h);
5562
+ const s = l.getBoundingClientRect(), r = xe(l);
5547
5563
  let o = z(1);
5548
- t && (i ? B(i) && (o = Z(i)) : o = Z(h));
5564
+ t && (i ? F(i) && (o = Z(i)) : o = Z(l));
5549
5565
  const n = Ni(r, e, i) ? ue(r) : z(0);
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;
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;
5551
5567
  if (r) {
5552
- const x = X(r), g = i && B(i) ? X(i) : i;
5553
- let p = x, u = St(p);
5568
+ const x = X(r), g = i && F(i) ? X(i) : i;
5569
+ let p = x, u = Lt(p);
5554
5570
  for (; u && i && g !== 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);
5571
+ const w = Z(u), m = u.getBoundingClientRect(), C = B(u), y = m.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = m.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
5572
+ h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, p = X(u), u = Lt(p);
5557
5573
  }
5558
5574
  }
5559
5575
  return ut({
5560
5576
  width: d,
5561
5577
  height: f,
5562
- x: l,
5578
+ x: h,
5563
5579
  y: c
5564
5580
  });
5565
5581
  }
5566
- function ki(h) {
5582
+ function ki(l) {
5567
5583
  let {
5568
5584
  elements: t,
5569
5585
  rect: e,
5570
5586
  offsetParent: i,
5571
5587
  strategy: s
5572
- } = h;
5588
+ } = l;
5573
5589
  const r = s === "fixed", o = V(i), n = t ? wt(t.floating) : !1;
5574
5590
  if (i === o || n && r)
5575
5591
  return e;
5576
- let l = {
5592
+ let h = {
5577
5593
  scrollLeft: 0,
5578
5594
  scrollTop: 0
5579
5595
  }, c = z(1);
5580
5596
  const d = z(0), f = K(i);
5581
- if ((f || !f && !r) && ((tt(i) !== "body" || lt(o)) && (l = pt(i)), K(i))) {
5597
+ if ((f || !f && !r) && ((tt(i) !== "body" || ht(o)) && (h = pt(i)), K(i))) {
5582
5598
  const x = ot(i);
5583
5599
  c = Z(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5584
5600
  }
5585
5601
  return {
5586
5602
  width: e.width * c.x,
5587
5603
  height: e.height * c.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
5604
+ x: e.x * c.x - h.scrollLeft * c.x + d.x,
5605
+ y: e.y * c.y - h.scrollTop * c.y + d.y
5590
5606
  };
5591
5607
  }
5592
- function Ki(h) {
5593
- return Array.from(h.getClientRects());
5608
+ function Ki(l) {
5609
+ return Array.from(l.getClientRects());
5594
5610
  }
5595
- function Tt(h, t) {
5596
- const e = pt(h).scrollLeft;
5597
- return t ? t.left + e : ot(V(h)).left + e;
5611
+ function Tt(l, t) {
5612
+ const e = pt(l).scrollLeft;
5613
+ return t ? t.left + e : ot(V(l)).left + e;
5598
5614
  }
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);
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);
5602
5618
  const n = -e.scrollTop;
5603
- return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5619
+ return B(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5604
5620
  width: s,
5605
5621
  height: r,
5606
5622
  x: o,
5607
5623
  y: n
5608
5624
  };
5609
5625
  }
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;
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;
5613
5629
  if (s) {
5614
5630
  r = s.width, o = s.height;
5615
5631
  const c = Xt();
5616
- (!c || c && t === "fixed") && (n = s.offsetLeft, l = s.offsetTop);
5632
+ (!c || c && t === "fixed") && (n = s.offsetLeft, h = s.offsetTop);
5617
5633
  }
5618
5634
  return {
5619
5635
  width: r,
5620
5636
  height: o,
5621
5637
  x: n,
5622
- y: l
5638
+ y: h
5623
5639
  };
5624
5640
  }
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;
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;
5627
5643
  return {
5628
5644
  width: o,
5629
5645
  height: n,
5630
- x: l,
5646
+ x: h,
5631
5647
  y: c
5632
5648
  };
5633
5649
  }
5634
- function Gt(h, t, e) {
5650
+ function Gt(l, t, e) {
5635
5651
  let i;
5636
5652
  if (t === "viewport")
5637
- i = Vi(h, e);
5653
+ i = Vi(l, e);
5638
5654
  else if (t === "document")
5639
- i = Yi(V(h));
5640
- else if (B(t))
5655
+ i = Yi(V(l));
5656
+ else if (F(t))
5641
5657
  i = Wi(t, e);
5642
5658
  else {
5643
- const s = ue(h);
5659
+ const s = ue(l);
5644
5660
  i = {
5645
5661
  ...t,
5646
5662
  x: t.x - s.x,
@@ -5649,70 +5665,70 @@ function Gt(h, t, e) {
5649
5665
  }
5650
5666
  return ut(i);
5651
5667
  }
5652
- function ge(h, t) {
5653
- const e = $(h);
5654
- return e === t || !B(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
5668
+ function ge(l, t) {
5669
+ const e = $(l);
5670
+ return e === t || !F(e) || Q(e) ? !1 : B(e).position === "fixed" || ge(e, t);
5655
5671
  }
5656
- function Pi(h, t) {
5657
- const e = t.get(h);
5672
+ function Pi(l, t) {
5673
+ const e = t.get(l);
5658
5674
  if (e)
5659
5675
  return e;
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;
5663
- for (; B(o) && !Q(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);
5666
- }
5667
- return t.set(h, i), i;
5676
+ let i = St(l, [], !1).filter((n) => F(n) && tt(n) !== "body"), s = null;
5677
+ const r = B(l).position === "fixed";
5678
+ let o = r ? $(l) : l;
5679
+ for (; F(o) && !Q(o); ) {
5680
+ const n = B(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);
5682
+ }
5683
+ return t.set(l, i), i;
5668
5684
  }
5669
- function zi(h) {
5685
+ function zi(l) {
5670
5686
  let {
5671
5687
  element: t,
5672
5688
  boundary: e,
5673
5689
  rootBoundary: i,
5674
5690
  strategy: s
5675
- } = h;
5676
- const o = [...e === "clippingAncestors" ? wt(t) ? [] : Pi(t, this._c) : [].concat(e), i], n = o[0], l = o.reduce((c, d) => {
5691
+ } = l;
5692
+ const o = [...e === "clippingAncestors" ? wt(t) ? [] : Pi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5677
5693
  const f = Gt(t, d, s);
5678
5694
  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;
5679
5695
  }, Gt(t, n, s));
5680
5696
  return {
5681
- width: l.right - l.left,
5682
- height: l.bottom - l.top,
5683
- x: l.left,
5684
- y: l.top
5697
+ width: h.right - h.left,
5698
+ height: h.bottom - h.top,
5699
+ x: h.left,
5700
+ y: h.top
5685
5701
  };
5686
5702
  }
5687
- function $i(h) {
5703
+ function $i(l) {
5688
5704
  const {
5689
5705
  width: t,
5690
5706
  height: e
5691
- } = fe(h);
5707
+ } = fe(l);
5692
5708
  return {
5693
5709
  width: t,
5694
5710
  height: e
5695
5711
  };
5696
5712
  }
5697
- function qi(h, t, e) {
5698
- const i = K(t), s = V(t), r = e === "fixed", o = ot(h, !0, r, t);
5713
+ function qi(l, t, e) {
5714
+ const i = K(t), s = V(t), r = e === "fixed", o = ot(l, !0, r, t);
5699
5715
  let n = {
5700
5716
  scrollLeft: 0,
5701
5717
  scrollTop: 0
5702
5718
  };
5703
- const l = z(0);
5719
+ const h = z(0);
5704
5720
  if (i || !i && !r)
5705
- if ((tt(t) !== "body" || lt(s)) && (n = pt(t)), i) {
5721
+ if ((tt(t) !== "body" || ht(s)) && (n = pt(t)), i) {
5706
5722
  const g = ot(t, !0, r, t);
5707
- l.x = g.x + t.clientLeft, l.y = g.y + t.clientTop;
5708
- } else s && (l.x = Tt(s));
5723
+ h.x = g.x + t.clientLeft, h.y = g.y + t.clientTop;
5724
+ } else s && (h.x = Tt(s));
5709
5725
  let c = 0, d = 0;
5710
5726
  if (s && !i && !r) {
5711
5727
  const g = s.getBoundingClientRect();
5712
5728
  d = g.top + n.scrollTop, c = g.left + n.scrollLeft - // RTL <body> scrollbar.
5713
5729
  Tt(s, g);
5714
5730
  }
5715
- const f = o.left + n.scrollLeft - l.x - c, x = o.top + n.scrollTop - l.y - d;
5731
+ const f = o.left + n.scrollLeft - h.x - c, x = o.top + n.scrollTop - h.y - d;
5716
5732
  return {
5717
5733
  x: f,
5718
5734
  y: x,
@@ -5720,39 +5736,39 @@ function qi(h, t, e) {
5720
5736
  height: o.height
5721
5737
  };
5722
5738
  }
5723
- function yt(h) {
5724
- return F(h).position === "static";
5739
+ function yt(l) {
5740
+ return B(l).position === "static";
5725
5741
  }
5726
- function jt(h, t) {
5727
- if (!K(h) || F(h).position === "fixed")
5742
+ function jt(l, t) {
5743
+ if (!K(l) || B(l).position === "fixed")
5728
5744
  return null;
5729
5745
  if (t)
5730
- return t(h);
5731
- let e = h.offsetParent;
5732
- return V(h) === e && (e = e.ownerDocument.body), e;
5746
+ return t(l);
5747
+ let e = l.offsetParent;
5748
+ return V(l) === e && (e = e.ownerDocument.body), e;
5733
5749
  }
5734
- function we(h, t) {
5735
- const e = X(h);
5736
- if (wt(h))
5750
+ function we(l, t) {
5751
+ const e = X(l);
5752
+ if (wt(l))
5737
5753
  return e;
5738
- if (!K(h)) {
5739
- let s = $(h);
5754
+ if (!K(l)) {
5755
+ let s = $(l);
5740
5756
  for (; s && !Q(s); ) {
5741
- if (B(s) && !yt(s))
5757
+ if (F(s) && !yt(s))
5742
5758
  return s;
5743
5759
  s = $(s);
5744
5760
  }
5745
5761
  return e;
5746
5762
  }
5747
- let i = jt(h, t);
5763
+ let i = jt(l, t);
5748
5764
  for (; i && Xi(i) && yt(i); )
5749
5765
  i = jt(i, t);
5750
- return i && Q(i) && yt(i) && !Dt(i) ? e : i || Bi(h) || e;
5766
+ return i && Q(i) && yt(i) && !Dt(i) ? e : i || Fi(l) || e;
5751
5767
  }
5752
- const Gi = async function(h) {
5753
- const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(h.floating);
5768
+ const Gi = async function(l) {
5769
+ const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(l.floating);
5754
5770
  return {
5755
- reference: qi(h.reference, await t(h.floating), h.strategy),
5771
+ reference: qi(l.reference, await t(l.floating), l.strategy),
5756
5772
  floating: {
5757
5773
  x: 0,
5758
5774
  y: 0,
@@ -5761,8 +5777,8 @@ const Gi = async function(h) {
5761
5777
  }
5762
5778
  };
5763
5779
  };
5764
- function ji(h) {
5765
- return F(h).direction === "rtl";
5780
+ function ji(l) {
5781
+ return B(l).direction === "rtl";
5766
5782
  }
5767
5783
  const Ui = {
5768
5784
  convertOffsetParentRelativeRectToViewportRelativeRect: ki,
@@ -5773,9 +5789,9 @@ const Ui = {
5773
5789
  getClientRects: Ki,
5774
5790
  getDimensions: $i,
5775
5791
  getScale: Z,
5776
- isElement: B,
5792
+ isElement: F,
5777
5793
  isRTL: ji
5778
- }, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (h, t, e) => {
5794
+ }, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (l, t, e) => {
5779
5795
  const i = /* @__PURE__ */ new Map(), s = {
5780
5796
  platform: Ui,
5781
5797
  ...e
@@ -5783,7 +5799,7 @@ const Ui = {
5783
5799
  ...s.platform,
5784
5800
  _c: i
5785
5801
  };
5786
- return Si(h, t, {
5802
+ return Li(l, t, {
5787
5803
  ...s,
5788
5804
  platform: r
5789
5805
  });
@@ -5809,7 +5825,7 @@ let Ji = class {
5809
5825
  borderRadius: "4px",
5810
5826
  fontSize: "12px",
5811
5827
  ...r
5812
- }, l = {
5828
+ }, h = {
5813
5829
  position: "absolute",
5814
5830
  width: "10px",
5815
5831
  height: "10px",
@@ -5818,20 +5834,25 @@ let Ji = class {
5818
5834
  transform: "rotate(45deg)",
5819
5835
  zIndex: n.zIndex
5820
5836
  };
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();
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();
5822
5838
  }
5823
5839
  init() {
5824
- this.ctx.on("mousemove", (t) => {
5825
- if (!this.ctx.isTarget(t))
5826
- return;
5827
- const e = this.ctx.containerElement.getBoundingClientRect();
5828
- e && (t.clientX < e.x || t.clientX > e.x + e.width || t.clientY < e.y || t.clientY > e.y + e.height) && this.hide();
5840
+ this.floatingEl.addEventListener("mouseleave", () => {
5841
+ this.hide();
5842
+ }), this.ctx.on("mouseout", (t) => {
5843
+ this.floatingEl.contains(t.relatedTarget) || this.hide();
5844
+ }), this.ctx.on("onScroll", () => {
5845
+ this.hide();
5829
5846
  }), this.ctx.on("startEdit", () => {
5830
5847
  this.hide();
5831
5848
  }), this.ctx.on("visibleCellHoverChange", (t, e) => {
5832
5849
  this.floatingEl.contains(e.target) || (t.ellipsis || t.message) && this.show(t);
5833
5850
  }), this.ctx.on("visibleCellMouseleave", (t, e) => {
5834
5851
  this.floatingEl.contains(e.target) || this.hide();
5852
+ }), this.ctx.on("cellHeaderMouseleave", (t, e) => {
5853
+ this.floatingEl.contains(e.target) || this.hide();
5854
+ }), this.ctx.on("cellHeaderHoverChange", (t, e) => {
5855
+ this.floatingEl.contains(e.target) || t.ellipsis && this.show(t);
5835
5856
  });
5836
5857
  }
5837
5858
  show(t) {
@@ -5862,10 +5883,10 @@ let Ji = class {
5862
5883
  placement: t.overflowTooltipPlacement,
5863
5884
  middleware: [me(), ye(), pe(6), Zi({ element: this.arrowEl })]
5864
5885
  }).then((n) => {
5865
- const { x: l, y: c, placement: d, middlewareData: f } = n;
5886
+ const { x: h, y: c, placement: d, middlewareData: f } = n;
5866
5887
  if (Object.assign(this.floatingEl.style, {
5867
5888
  top: `${c}px`,
5868
- left: `${l}px`
5889
+ left: `${h}px`
5869
5890
  }), f.arrow) {
5870
5891
  const x = f.arrow;
5871
5892
  ["left", "left-start", "left-end"].includes(d) ? Object.assign(this.arrowEl.style, {
@@ -5930,15 +5951,15 @@ class Qi {
5930
5951
  return;
5931
5952
  if (t.code === "Escape" && this.ctx.editing) {
5932
5953
  this.cancel = !0;
5933
- const { focusCell: l } = this.ctx;
5934
- l && (this.ctx.emit("setSelectorCell", l), this.cellTarget = l), this.doneEdit();
5954
+ const { focusCell: h } = this.ctx;
5955
+ h && (this.ctx.emit("setSelectorCell", h), this.cellTarget = h), this.doneEdit();
5935
5956
  return;
5936
5957
  }
5937
5958
  if ((t.altKey || t.metaKey) && t.code === "Enter" && this.ctx.editing && this.inputEl) {
5938
5959
  t.preventDefault();
5939
- const l = this.inputEl.selectionStart, c = this.inputEl.value.substring(0, l), d = this.inputEl.value.substring(l);
5960
+ const h = this.inputEl.selectionStart, c = this.inputEl.value.substring(0, h), d = this.inputEl.value.substring(h);
5940
5961
  this.inputEl.value = c + `
5941
- ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = l + 1, this.autoSize();
5962
+ ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = h + 1, this.autoSize();
5942
5963
  return;
5943
5964
  }
5944
5965
  if (t.code === "Tab" && this.ctx.editing) {
@@ -6018,8 +6039,8 @@ class Qi {
6018
6039
  });
6019
6040
  }
6020
6041
  isInSelectorRange(t, e) {
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);
6042
+ const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, h] = s;
6043
+ return !(e < r || e > o || t < n || t > h);
6023
6044
  }
6024
6045
  initTextEditor() {
6025
6046
  this.inputEl = document.createElement("textarea"), this.inputEl.setAttribute("rows", "1"), this.inputEl.addEventListener("input", this.autoSize.bind(this)), this.inputEl.addEventListener("blur", () => {
@@ -6041,8 +6062,8 @@ class Qi {
6041
6062
  startEditByInput(t, e = !1) {
6042
6063
  const i = e ? null : t.getValue(), { editorType: s } = t;
6043
6064
  t.update(), this.ctx.config.ENABLE_MERGE_CELL_LINK && t.updateSpanInfo();
6044
- let { height: r, width: o, drawY: n, drawX: l } = t;
6045
- this.drawX = l, this.drawY = n;
6065
+ let { height: r, width: o, drawY: n, drawX: h } = t;
6066
+ this.drawX = h, this.drawY = n;
6046
6067
  const {
6047
6068
  config: { CELL_PADDING: c },
6048
6069
  header: d
@@ -6063,18 +6084,18 @@ class Qi {
6063
6084
  }
6064
6085
  }
6065
6086
  startEdit(t = !1) {
6066
- this.ctx.emit("draw"), this.cancel = !1;
6087
+ this.cancel = !1;
6067
6088
  const { ENABLE_EDIT_CLICK_SELECTOR: e } = this.ctx.config;
6068
6089
  if (!e)
6069
6090
  return;
6070
6091
  const i = this.ctx.focusCell;
6071
- if (!i || ["index", "index-selection", "selection"].includes(i.type) || this.enable || !(i.isVerticalVisible() && i.isHorizontalVisible()))
6092
+ if (!i || ["index", "index-selection", "selection"].includes(i.type) || this.enable || (this.ctx.emit("drawView"), !(i.isVerticalVisible() && i.isHorizontalVisible())))
6072
6093
  return;
6073
6094
  const { rowKey: r, key: o, editorType: n } = i;
6074
6095
  if (n === "none")
6075
6096
  return;
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));
6097
+ const h = this.ctx.database.getReadonly(r, o);
6098
+ i && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
6078
6099
  }
6079
6100
  editCell(t, e) {
6080
6101
  const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
@@ -6087,8 +6108,8 @@ class Qi {
6087
6108
  const r = this.ctx.focusCell;
6088
6109
  if (!r || ["index", "index-selection", "selection"].includes(r.type) || this.enable)
6089
6110
  return;
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));
6111
+ const { rowKey: o, key: n } = r, h = this.ctx.database.getReadonly(o, n);
6112
+ r && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
6092
6113
  }
6093
6114
  doneEdit() {
6094
6115
  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"));
@@ -6108,13 +6129,13 @@ class ts {
6108
6129
  this.ctx = t;
6109
6130
  const { EMPTY_TEXT: e, EMPTY_CUSTOM_STYLE: i } = this.ctx.config;
6110
6131
  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 }) => {
6111
- const l = r + (o + n) / 2, c = {
6132
+ const h = r + (o + n) / 2, c = {
6112
6133
  display: s === "empty" ? "block" : "none",
6113
6134
  position: "absolute",
6114
6135
  fontSize: "14px",
6115
6136
  color: "#666",
6116
6137
  left: "50%",
6117
- top: `${l}px`,
6138
+ top: `${h}px`,
6118
6139
  transform: "translate(-50%, -50%)",
6119
6140
  ...i
6120
6141
  };
@@ -6154,9 +6175,9 @@ class es {
6154
6175
  fixedRightWidth: e,
6155
6176
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
6156
6177
  } = this.ctx, { visibleWidth: r, visibleHeight: o, renderCellHeaders: n } = this.ctx.header;
6157
- let l = [], c = [], d = [];
6178
+ let h = [], c = [], d = [];
6158
6179
  n.forEach((w) => {
6159
- w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : l.push(w));
6180
+ w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : h.push(w));
6160
6181
  });
6161
6182
  const f = e - i, x = {
6162
6183
  key: "left",
@@ -6179,7 +6200,7 @@ class es {
6179
6200
  width: `${r - t - f + 1}px`,
6180
6201
  height: `${o}px`
6181
6202
  },
6182
- cells: l
6203
+ cells: h
6183
6204
  }, p = {
6184
6205
  key: "right",
6185
6206
  style: {
@@ -6215,7 +6236,7 @@ class es {
6215
6236
  const {
6216
6237
  fixedLeftWidth: r,
6217
6238
  fixedRightWidth: o,
6218
- config: { SCROLLER_TRACK_SIZE: n, CSS_PREFIX: l }
6239
+ config: { SCROLLER_TRACK_SIZE: n, CSS_PREFIX: h }
6219
6240
  } = this.ctx, { visibleWidth: c, visibleHeight: d } = this.ctx.body, f = o - n, x = {
6220
6241
  key: "left",
6221
6242
  style: {
@@ -6252,7 +6273,7 @@ class es {
6252
6273
  };
6253
6274
  return {
6254
6275
  type: "body",
6255
- class: `${l}-overlayer-body`,
6276
+ class: `${h}-overlayer-body`,
6256
6277
  style: {
6257
6278
  position: "relative",
6258
6279
  overflow: "hidden",
@@ -6273,7 +6294,7 @@ class es {
6273
6294
  fixedLeftWidth: s,
6274
6295
  fixedRightWidth: r,
6275
6296
  config: { SCROLLER_TRACK_SIZE: o, CSS_PREFIX: n }
6276
- } = this.ctx, { visibleWidth: l, visibleHeight: c } = this.ctx.footer, d = r - o, f = {
6297
+ } = this.ctx, { visibleWidth: h, visibleHeight: c } = this.ctx.footer, d = r - o, f = {
6277
6298
  key: "left",
6278
6299
  style: {
6279
6300
  position: "absolute",
@@ -6291,7 +6312,7 @@ class es {
6291
6312
  top: `${0.5}px`,
6292
6313
  left: `${s - 0.5}px`,
6293
6314
  overflow: "hidden",
6294
- width: `${l - s - d}px`,
6315
+ width: `${h - s - d}px`,
6295
6316
  height: `${c}px`
6296
6317
  },
6297
6318
  cells: t
@@ -6313,7 +6334,7 @@ class es {
6313
6334
  style: {
6314
6335
  position: "relative",
6315
6336
  overflow: "hidden",
6316
- width: `${l}px`,
6337
+ width: `${h}px`,
6317
6338
  height: `${c}px`
6318
6339
  },
6319
6340
  views: [f, x, g]
@@ -6331,8 +6352,8 @@ class is {
6331
6352
  this.ctx.on("cellContextMenuClick", (t, e) => {
6332
6353
  if (!this.ctx.config.ENABLE_CONTEXT_MENU) return;
6333
6354
  e.preventDefault();
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);
6355
+ const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, h] = s, { rowIndex: c, colIndex: d } = t;
6356
+ c >= n && c <= h && d >= r && d <= o || this.ctx.emit("setSelectorCell", t, e);
6336
6357
  const x = {
6337
6358
  getBoundingClientRect: () => ({
6338
6359
  width: 0,
@@ -6437,16 +6458,16 @@ class os {
6437
6458
  }
6438
6459
  createContainer(t, e, i, s, r) {
6439
6460
  t.className = "e-virt-table-container";
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";
6461
+ const o = document.createElement("div"), n = document.createElement("canvas"), h = e || document.createElement("div");
6462
+ o.className = "e-virt-table-stage", t.tabIndex = 0, n.className = "e-virt-table-canvas", h.className = "e-virt-table-overlayer";
6442
6463
  const c = i || document.createElement("div");
6443
6464
  c.className = "e-virt-table-editor";
6444
6465
  const d = s, f = r;
6445
- return o.appendChild(n), o.appendChild(l), t.appendChild(o), {
6466
+ return o.appendChild(n), o.appendChild(h), t.appendChild(o), {
6446
6467
  containerElement: t,
6447
6468
  stageElement: o,
6448
6469
  canvasElement: n,
6449
- overlayerElement: l,
6470
+ overlayerElement: h,
6450
6471
  editorElement: c,
6451
6472
  emptyElement: d,
6452
6473
  contextMenuElement: f
@@ -6530,15 +6551,15 @@ class os {
6530
6551
  return new Promise(async (i, s) => {
6531
6552
  let r = [];
6532
6553
  for (let o = 0; o < t.length; o++) {
6533
- const { rowKey: n, key: l } = t[o], c = await this.ctx.database.getValidator(n, l);
6554
+ const { rowKey: n, key: h } = t[o], c = await this.ctx.database.getValidator(n, h);
6534
6555
  Array.isArray(c) && c.length && r.push(c);
6535
6556
  }
6536
6557
  if (r.length) {
6537
6558
  if (s(r), e) {
6538
6559
  const [o] = r;
6539
6560
  if (Array.isArray(o) && o.length) {
6540
- const [n] = o, { rowKey: l, key: c } = n;
6541
- this.scrollToRowkey(l), this.scrollToColkey(c);
6561
+ const [n] = o, { rowKey: h, key: c } = n;
6562
+ this.scrollToRowkey(h), this.scrollToColkey(c);
6542
6563
  }
6543
6564
  }
6544
6565
  this.ctx.emit("draw");
@@ -6555,8 +6576,8 @@ class os {
6555
6576
  if (t && Array.isArray(s) && s.length) {
6556
6577
  const [r] = s;
6557
6578
  if (Array.isArray(r) && r.length) {
6558
- const [o] = r, { rowKey: n, key: l } = o;
6559
- this.scrollToRowkey(n), this.scrollToColkey(l);
6579
+ const [o] = r, { rowKey: n, key: h } = o;
6580
+ this.scrollToRowkey(n), this.scrollToColkey(h);
6560
6581
  }
6561
6582
  }
6562
6583
  i(s);
@@ -6581,7 +6602,7 @@ class os {
6581
6602
  let r = [];
6582
6603
  for (let o = 0; o < i.length; o++)
6583
6604
  for (let n = 0; n < s.length; n++) {
6584
- const l = this.ctx.database.getRowKeyByItem(i[o]), d = s[n].key, f = await this.ctx.database.getValidator(l, d);
6605
+ const h = this.ctx.database.getRowKeyByItem(i[o]), d = s[n].key, f = await this.ctx.database.getValidator(h, d);
6585
6606
  Array.isArray(f) && f.length && r.push(f);
6586
6607
  }
6587
6608
  r.length ? (e(r), this.ctx.emit("draw")) : (t([]), this.ctx.emit("draw"));