e-virt-table 0.0.15 → 0.0.16

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
@@ -12,7 +12,7 @@ function $() {
12
12
  return a;
13
13
  }, $.apply(this, arguments);
14
14
  }
15
- function be(a, t) {
15
+ function Ce(a, t) {
16
16
  a.prototype = Object.create(t.prototype), a.prototype.constructor = a, st(a, t);
17
17
  }
18
18
  function Et(a) {
@@ -25,7 +25,7 @@ function st(a, t) {
25
25
  return i.__proto__ = s, i;
26
26
  }, st(a, t);
27
27
  }
28
- function Ce() {
28
+ function be() {
29
29
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
30
30
  if (typeof Proxy == "function") return !0;
31
31
  try {
@@ -36,7 +36,7 @@ function Ce() {
36
36
  }
37
37
  }
38
38
  function dt(a, t, e) {
39
- return Ce() ? dt = Reflect.construct.bind() : dt = function(s, o, r) {
39
+ return be() ? dt = Reflect.construct.bind() : dt = function(s, o, r) {
40
40
  var n = [null];
41
41
  n.push.apply(n, o);
42
42
  var l = Function.bind.apply(s, n), h = new l();
@@ -46,9 +46,9 @@ function dt(a, t, e) {
46
46
  function ve(a) {
47
47
  return Function.toString.call(a).indexOf("[native code]") !== -1;
48
48
  }
49
- function bt(a) {
49
+ function Ct(a) {
50
50
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
51
- return bt = function(i) {
51
+ return Ct = function(i) {
52
52
  if (i === null || !ve(i)) return i;
53
53
  if (typeof i != "function")
54
54
  throw new TypeError("Super expression must either be null or a function");
@@ -67,7 +67,7 @@ function bt(a) {
67
67
  configurable: !0
68
68
  }
69
69
  }), st(s, i);
70
- }, bt(a);
70
+ }, Ct(a);
71
71
  }
72
72
  var Re = /%[sdj%]/g, jt = function() {
73
73
  };
@@ -76,7 +76,7 @@ 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 Ct(a) {
79
+ function bt(a) {
80
80
  if (!a || !a.length) return null;
81
81
  var t = {};
82
82
  return a.forEach(function(e) {
@@ -116,13 +116,13 @@ function M(a) {
116
116
  }
117
117
  return a;
118
118
  }
119
- function Ie(a) {
119
+ function _e(a) {
120
120
  return a === "string" || a === "url" || a === "hex" || a === "email" || a === "date" || a === "pattern";
121
121
  }
122
- function I(a, t) {
123
- return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Ie(t) && typeof a == "string" && !a);
122
+ function _(a, t) {
123
+ return !!(a == null || t === "array" && Array.isArray(a) && !a.length || _e(t) && typeof a == "string" && !a);
124
124
  }
125
- function _e(a, t, e) {
125
+ function Ie(a, t, e) {
126
126
  var i = [], s = 0, o = a.length;
127
127
  function r(n) {
128
128
  i.push.apply(i, n || []), s++, s === o && e(i);
@@ -131,7 +131,7 @@ function _e(a, t, e) {
131
131
  t(n, r);
132
132
  });
133
133
  }
134
- function kt(a, t, e) {
134
+ function Ft(a, t, e) {
135
135
  var i = 0, s = a.length;
136
136
  function o(r) {
137
137
  if (r && r.length) {
@@ -149,34 +149,34 @@ function Oe(a) {
149
149
  t.push.apply(t, a[e] || []);
150
150
  }), t;
151
151
  }
152
- var Nt = /* @__PURE__ */ function(a) {
153
- be(t, a);
152
+ var kt = /* @__PURE__ */ function(a) {
153
+ Ce(t, a);
154
154
  function t(e, i) {
155
155
  var s;
156
156
  return s = a.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
157
157
  }
158
158
  return t;
159
- }(/* @__PURE__ */ bt(Error));
159
+ }(/* @__PURE__ */ Ct(Error));
160
160
  function Se(a, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var o = new Promise(function(x, u) {
163
- var y = function(p) {
164
- return i(p), p.length ? u(new Nt(p, Ct(p))) : x(s);
163
+ var p = function(y) {
164
+ return i(y), y.length ? u(new kt(y, bt(y))) : x(s);
165
165
  }, g = Oe(a);
166
- kt(g, e, y);
166
+ Ft(g, e, p);
167
167
  });
168
168
  return o.catch(function(x) {
169
169
  return x;
170
170
  }), o;
171
171
  }
172
172
  var r = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), l = n.length, h = 0, f = [], d = new Promise(function(x, u) {
173
- var y = function(w) {
173
+ var p = function(w) {
174
174
  if (f.push.apply(f, w), h++, h === l)
175
- return i(f), f.length ? u(new Nt(f, Ct(f))) : x(s);
175
+ return i(f), f.length ? u(new kt(f, bt(f))) : x(s);
176
176
  };
177
177
  n.length || (i(f), x(s)), n.forEach(function(g) {
178
178
  var w = a[g];
179
- r.indexOf(g) !== -1 ? kt(w, e, y) : _e(w, e, y);
179
+ r.indexOf(g) !== -1 ? Ft(w, e, p) : Ie(w, e, p);
180
180
  });
181
181
  });
182
182
  return d.catch(function(x) {
@@ -194,7 +194,7 @@ function Le(a, t) {
194
194
  }
195
195
  return e;
196
196
  }
197
- function Ft(a, t) {
197
+ function Nt(a, t) {
198
198
  return function(e) {
199
199
  var i;
200
200
  return a.fullFields ? i = Le(t, a.fullFields) : i = t[e.field || a.fullField], Te(e) ? (e.field = e.field || a.fullField, e.fieldValue = i, e) : {
@@ -215,14 +215,14 @@ function Yt(a, t) {
215
215
  return a;
216
216
  }
217
217
  var Ut = function(t, e, i, s, o, r) {
218
- t.required && (!i.hasOwnProperty(t.field) || I(e, r || t.type)) && s.push(M(o.messages.required, t.fullField));
218
+ t.required && (!i.hasOwnProperty(t.field) || _(e, r || t.type)) && s.push(M(o.messages.required, t.fullField));
219
219
  }, Ae = function(t, e, i, s, o) {
220
220
  (/^\s+$/.test(e) || e === "") && s.push(M(o.messages.whitespace, t.fullField));
221
221
  }, ht, Me = function() {
222
222
  if (ht)
223
223
  return ht;
224
- var a = "[a-fA-F\\d:]", t = function(b) {
225
- return b && b.includeBoundaries ? "(?:(?<=\\s|^)(?=" + a + ")|(?<=" + a + ")(?=\\s|$))" : "";
224
+ var a = "[a-fA-F\\d:]", t = function(E) {
225
+ return E && E.includeBoundaries ? "(?:(?<=\\s|^)(?=" + a + ")|(?<=" + a + ")(?=\\s|$))" : "";
226
226
  }, e = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", i = "[a-fA-F\\d]{1,4}", s = (`
227
227
  (?:
228
228
  (?:` + i + ":){7}(?:" + i + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
@@ -234,16 +234,16 @@ var Ut = function(t, e, i, s, o, r) {
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(), o = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), r = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), l = function(b) {
238
- return b && b.exact ? o : new RegExp("(?:" + t(b) + e + t(b) + ")|(?:" + t(b) + s + t(b) + ")", "g");
237
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), o = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), r = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), l = function(E) {
238
+ return E && E.exact ? o : new RegExp("(?:" + t(E) + e + t(E) + ")|(?:" + t(E) + s + t(E) + ")", "g");
239
239
  };
240
240
  l.v4 = function(m) {
241
241
  return m && m.exact ? r : new RegExp("" + t(m) + e + t(m), "g");
242
242
  }, l.v6 = function(m) {
243
243
  return m && m.exact ? n : new RegExp("" + t(m) + s + t(m), "g");
244
244
  };
245
- var h = "(?:(?:[a-z]+:)?//)", f = "(?:\\S+(?::\\S*)?@)?", d = l.v4().source, x = l.v6().source, u = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", y = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", p = '(?:[/?#][^\\s"]*)?', E = "(?:" + h + "|www\\.)" + f + "(?:localhost|" + d + "|" + x + "|" + u + y + g + ")" + w + p;
246
- return ht = new RegExp("(?:^" + E + "$)", "i"), ht;
245
+ var h = "(?:(?:[a-z]+:)?//)", f = "(?:\\S+(?::\\S*)?@)?", d = l.v4().source, x = l.v6().source, u = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', C = "(?:" + h + "|www\\.)" + f + "(?:localhost|" + d + "|" + x + "|" + u + p + g + ")" + w + y;
246
+ return ht = new RegExp("(?:^" + C + "$)", "i"), ht;
247
247
  }, Kt = {
248
248
  // http://emailregex.com/
249
249
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
@@ -300,13 +300,13 @@ var Ut = function(t, e, i, s, o, r) {
300
300
  var r = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
301
301
  r.indexOf(n) > -1 ? et[n](e) || s.push(M(o.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(M(o.messages.types[n], t.fullField, t.type));
302
302
  }, De = function(t, e, i, s, o) {
303
- var r = typeof t.len == "number", n = typeof t.min == "number", l = typeof t.max == "number", h = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = e, d = null, x = typeof e == "number", u = typeof e == "string", y = Array.isArray(e);
304
- if (x ? d = "number" : u ? d = "string" : y && (d = "array"), !d)
303
+ var r = typeof t.len == "number", n = typeof t.min == "number", l = typeof t.max == "number", h = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = e, d = null, x = typeof e == "number", u = typeof e == "string", p = Array.isArray(e);
304
+ if (x ? d = "number" : u ? d = "string" : p && (d = "array"), !d)
305
305
  return !1;
306
- y && (f = e.length), u && (f = e.replace(h, "_").length), r ? f !== t.len && s.push(M(o.messages[d].len, t.fullField, t.len)) : n && !l && f < t.min ? s.push(M(o.messages[d].min, t.fullField, t.min)) : l && !n && f > t.max ? s.push(M(o.messages[d].max, t.fullField, t.max)) : n && l && (f < t.min || f > t.max) && s.push(M(o.messages[d].range, t.fullField, t.min, t.max));
306
+ p && (f = e.length), u && (f = e.replace(h, "_").length), r ? f !== t.len && s.push(M(o.messages[d].len, t.fullField, t.len)) : n && !l && f < t.min ? s.push(M(o.messages[d].min, t.fullField, t.min)) : l && !n && f > t.max ? s.push(M(o.messages[d].max, t.fullField, t.max)) : n && l && (f < t.min || f > t.max) && s.push(M(o.messages[d].range, t.fullField, t.min, t.max));
307
307
  }, j = "enum", Xe = function(t, e, i, s, o) {
308
308
  t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(M(o.messages[j], t.fullField, t[j].join(", ")));
309
- }, ke = function(t, e, i, s, o) {
309
+ }, Fe = function(t, e, i, s, o) {
310
310
  if (t.pattern) {
311
311
  if (t.pattern instanceof RegExp)
312
312
  t.pattern.lastIndex = 0, t.pattern.test(e) || s.push(M(o.messages.pattern.mismatch, t.fullField, e, t.pattern));
@@ -321,19 +321,19 @@ var Ut = function(t, e, i, s, o, r) {
321
321
  type: He,
322
322
  range: De,
323
323
  enum: Xe,
324
- pattern: ke
325
- }, Ne = function(t, e, i, s, o) {
324
+ pattern: Fe
325
+ }, ke = function(t, e, i, s, o) {
326
326
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
327
327
  if (n) {
328
- if (I(e, "string") && !t.required)
328
+ if (_(e, "string") && !t.required)
329
329
  return i();
330
- v.required(t, e, s, r, o, "string"), I(e, "string") || (v.type(t, e, s, r, o), v.range(t, e, s, r, o), v.pattern(t, e, s, r, o), t.whitespace === !0 && v.whitespace(t, e, s, r, o));
330
+ v.required(t, e, s, r, o, "string"), _(e, "string") || (v.type(t, e, s, r, o), v.range(t, e, s, r, o), v.pattern(t, e, s, r, o), t.whitespace === !0 && v.whitespace(t, e, s, r, o));
331
331
  }
332
332
  i(r);
333
- }, Fe = function(t, e, i, s, o) {
333
+ }, Ne = function(t, e, i, s, o) {
334
334
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
335
335
  if (n) {
336
- if (I(e) && !t.required)
336
+ if (_(e) && !t.required)
337
337
  return i();
338
338
  v.required(t, e, s, r, o), e !== void 0 && v.type(t, e, s, r, o);
339
339
  }
@@ -341,7 +341,7 @@ var Ut = function(t, e, i, s, o, r) {
341
341
  }, Ye = function(t, e, i, s, o) {
342
342
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
343
343
  if (n) {
344
- if (e === "" && (e = void 0), I(e) && !t.required)
344
+ if (e === "" && (e = void 0), _(e) && !t.required)
345
345
  return i();
346
346
  v.required(t, e, s, r, o), e !== void 0 && (v.type(t, e, s, r, o), v.range(t, e, s, r, o));
347
347
  }
@@ -349,7 +349,7 @@ var Ut = function(t, e, i, s, o, r) {
349
349
  }, Ke = function(t, e, i, s, o) {
350
350
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
351
351
  if (n) {
352
- if (I(e) && !t.required)
352
+ if (_(e) && !t.required)
353
353
  return i();
354
354
  v.required(t, e, s, r, o), e !== void 0 && v.type(t, e, s, r, o);
355
355
  }
@@ -357,15 +357,15 @@ var Ut = function(t, e, i, s, o, r) {
357
357
  }, Be = function(t, e, i, s, o) {
358
358
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
359
359
  if (n) {
360
- if (I(e) && !t.required)
360
+ if (_(e) && !t.required)
361
361
  return i();
362
- v.required(t, e, s, r, o), I(e) || v.type(t, e, s, r, o);
362
+ v.required(t, e, s, r, o), _(e) || v.type(t, e, s, r, o);
363
363
  }
364
364
  i(r);
365
365
  }, We = function(t, e, i, s, o) {
366
366
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
367
367
  if (n) {
368
- if (I(e) && !t.required)
368
+ if (_(e) && !t.required)
369
369
  return i();
370
370
  v.required(t, e, s, r, o), e !== void 0 && (v.type(t, e, s, r, o), v.range(t, e, s, r, o));
371
371
  }
@@ -373,7 +373,7 @@ var Ut = function(t, e, i, s, o, r) {
373
373
  }, Pe = function(t, e, i, s, o) {
374
374
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
375
375
  if (n) {
376
- if (I(e) && !t.required)
376
+ if (_(e) && !t.required)
377
377
  return i();
378
378
  v.required(t, e, s, r, o), e !== void 0 && (v.type(t, e, s, r, o), v.range(t, e, s, r, o));
379
379
  }
@@ -389,7 +389,7 @@ var Ut = function(t, e, i, s, o, r) {
389
389
  }, Ve = function(t, e, i, s, o) {
390
390
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
391
391
  if (n) {
392
- if (I(e) && !t.required)
392
+ if (_(e) && !t.required)
393
393
  return i();
394
394
  v.required(t, e, s, r, o), e !== void 0 && v.type(t, e, s, r, o);
395
395
  }
@@ -397,7 +397,7 @@ var Ut = function(t, e, i, s, o, r) {
397
397
  }, $e = "enum", qe = function(t, e, i, s, o) {
398
398
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
399
399
  if (n) {
400
- if (I(e) && !t.required)
400
+ if (_(e) && !t.required)
401
401
  return i();
402
402
  v.required(t, e, s, r, o), e !== void 0 && v[$e](t, e, s, r, o);
403
403
  }
@@ -405,17 +405,17 @@ var Ut = function(t, e, i, s, o, r) {
405
405
  }, Ge = function(t, e, i, s, o) {
406
406
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
407
407
  if (n) {
408
- if (I(e, "string") && !t.required)
408
+ if (_(e, "string") && !t.required)
409
409
  return i();
410
- v.required(t, e, s, r, o), I(e, "string") || v.pattern(t, e, s, r, o);
410
+ v.required(t, e, s, r, o), _(e, "string") || v.pattern(t, e, s, r, o);
411
411
  }
412
412
  i(r);
413
413
  }, je = function(t, e, i, s, o) {
414
414
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
415
415
  if (n) {
416
- if (I(e, "date") && !t.required)
416
+ if (_(e, "date") && !t.required)
417
417
  return i();
418
- if (v.required(t, e, s, r, o), !I(e, "date")) {
418
+ if (v.required(t, e, s, r, o), !_(e, "date")) {
419
419
  var l;
420
420
  e instanceof Date ? l = e : l = new Date(e), v.type(t, l, s, r, o), l && v.range(t, l.getTime(), s, r, o);
421
421
  }
@@ -427,22 +427,22 @@ var Ut = function(t, e, i, s, o, r) {
427
427
  }, yt = function(t, e, i, s, o) {
428
428
  var r = t.type, n = [], l = t.required || !t.required && s.hasOwnProperty(t.field);
429
429
  if (l) {
430
- if (I(e, r) && !t.required)
430
+ if (_(e, r) && !t.required)
431
431
  return i();
432
- v.required(t, e, s, n, o, r), I(e, r) || v.type(t, e, s, n, o);
432
+ v.required(t, e, s, n, o, r), _(e, r) || v.type(t, e, s, n, o);
433
433
  }
434
434
  i(n);
435
435
  }, Ze = function(t, e, i, s, o) {
436
436
  var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
437
437
  if (n) {
438
- if (I(e) && !t.required)
438
+ if (_(e) && !t.required)
439
439
  return i();
440
440
  v.required(t, e, s, r, o);
441
441
  }
442
442
  i(r);
443
443
  }, it = {
444
- string: Ne,
445
- method: Fe,
444
+ string: ke,
445
+ method: Ne,
446
446
  number: Ye,
447
447
  boolean: Ke,
448
448
  regexp: Be,
@@ -537,17 +537,17 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
537
537
  if (typeof l == "function" && (h = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
538
538
  return h && h(null, n), Promise.resolve(n);
539
539
  function f(g) {
540
- var w = [], p = {};
541
- function E(b) {
542
- if (Array.isArray(b)) {
543
- var C;
544
- w = (C = w).concat.apply(C, b);
540
+ var w = [], y = {};
541
+ function C(E) {
542
+ if (Array.isArray(E)) {
543
+ var b;
544
+ w = (b = w).concat.apply(b, E);
545
545
  } else
546
- w.push(b);
546
+ w.push(E);
547
547
  }
548
548
  for (var m = 0; m < g.length; m++)
549
- E(g[m]);
550
- w.length ? (p = Ct(w), h(w, p)) : h(null, n);
549
+ C(g[m]);
550
+ w.length ? (y = bt(w), h(w, y)) : h(null, n);
551
551
  }
552
552
  if (l.messages) {
553
553
  var d = this.messages();
@@ -556,74 +556,74 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
556
556
  l.messages = this.messages();
557
557
  var x = {}, u = l.keys || Object.keys(this.rules);
558
558
  u.forEach(function(g) {
559
- var w = r.rules[g], p = n[g];
560
- w.forEach(function(E) {
561
- var m = E;
562
- typeof m.transform == "function" && (n === i && (n = $({}, n)), p = n[g] = m.transform(p)), typeof m == "function" ? m = {
559
+ var w = r.rules[g], y = n[g];
560
+ w.forEach(function(C) {
561
+ var m = C;
562
+ typeof m.transform == "function" && (n === i && (n = $({}, n)), y = n[g] = m.transform(y)), typeof m == "function" ? m = {
563
563
  validator: m
564
564
  } : m = $({}, m), m.validator = r.getValidationMethod(m), m.validator && (m.field = g, m.fullField = m.fullField || g, m.type = r.getType(m), x[g] = x[g] || [], x[g].push({
565
565
  rule: m,
566
- value: p,
566
+ value: y,
567
567
  source: n,
568
568
  field: g
569
569
  }));
570
570
  });
571
571
  });
572
- var y = {};
572
+ var p = {};
573
573
  return Se(x, l, function(g, w) {
574
- var p = g.rule, E = (p.type === "object" || p.type === "array") && (typeof p.fields == "object" || typeof p.defaultField == "object");
575
- E = E && (p.required || !p.required && g.value), p.field = g.field;
574
+ var y = g.rule, C = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
+ C = C && (y.required || !y.required && g.value), y.field = g.field;
576
576
  function m(R, T) {
577
577
  return $({}, T, {
578
- fullField: p.fullField + "." + R,
579
- fullFields: p.fullFields ? [].concat(p.fullFields, [R]) : [R]
578
+ fullField: y.fullField + "." + R,
579
+ fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
580
580
  });
581
581
  }
582
- function b(R) {
582
+ function E(R) {
583
583
  R === void 0 && (R = []);
584
584
  var T = Array.isArray(R) ? R : [R];
585
- !l.suppressWarning && T.length && a.warning("async-validator:", T), T.length && p.message !== void 0 && (T = [].concat(p.message));
586
- var L = T.map(Ft(p, n));
585
+ !l.suppressWarning && T.length && a.warning("async-validator:", T), T.length && y.message !== void 0 && (T = [].concat(y.message));
586
+ var L = T.map(Nt(y, n));
587
587
  if (l.first && L.length)
588
- return y[p.field] = 1, w(L);
589
- if (!E)
588
+ return p[y.field] = 1, w(L);
589
+ if (!C)
590
590
  w(L);
591
591
  else {
592
- if (p.required && !g.value)
593
- return p.message !== void 0 ? L = [].concat(p.message).map(Ft(p, n)) : l.error && (L = [l.error(p, M(l.messages.required, p.field))]), w(L);
592
+ if (y.required && !g.value)
593
+ return y.message !== void 0 ? L = [].concat(y.message).map(Nt(y, n)) : l.error && (L = [l.error(y, M(l.messages.required, y.field))]), w(L);
594
594
  var A = {};
595
- p.defaultField && Object.keys(g.value).map(function(_) {
596
- A[_] = p.defaultField;
595
+ y.defaultField && Object.keys(g.value).map(function(I) {
596
+ A[I] = y.defaultField;
597
597
  }), A = $({}, A, g.rule.fields);
598
598
  var D = {};
599
- Object.keys(A).forEach(function(_) {
600
- var S = A[_], O = Array.isArray(S) ? S : [S];
601
- D[_] = O.map(m.bind(null, _));
599
+ Object.keys(A).forEach(function(I) {
600
+ var S = A[I], O = Array.isArray(S) ? S : [S];
601
+ D[I] = O.map(m.bind(null, I));
602
602
  });
603
603
  var B = new a(D);
604
- B.messages(l.messages), g.rule.options && (g.rule.options.messages = l.messages, g.rule.options.error = l.error), B.validate(g.value, g.rule.options || l, function(_) {
604
+ B.messages(l.messages), g.rule.options && (g.rule.options.messages = l.messages, g.rule.options.error = l.error), B.validate(g.value, g.rule.options || l, function(I) {
605
605
  var S = [];
606
- L && L.length && S.push.apply(S, L), _ && _.length && S.push.apply(S, _), w(S.length ? S : null);
606
+ L && L.length && S.push.apply(S, L), I && I.length && S.push.apply(S, I), w(S.length ? S : null);
607
607
  });
608
608
  }
609
609
  }
610
- var C;
611
- if (p.asyncValidator)
612
- C = p.asyncValidator(p, g.value, b, g.source, l);
613
- else if (p.validator) {
610
+ var b;
611
+ if (y.asyncValidator)
612
+ b = y.asyncValidator(y, g.value, E, g.source, l);
613
+ else if (y.validator) {
614
614
  try {
615
- C = p.validator(p, g.value, b, g.source, l);
615
+ b = y.validator(y, g.value, E, g.source, l);
616
616
  } catch (R) {
617
617
  console.error == null || console.error(R), l.suppressValidatorError || setTimeout(function() {
618
618
  throw R;
619
- }, 0), b(R.message);
619
+ }, 0), E(R.message);
620
620
  }
621
- C === !0 ? b() : C === !1 ? b(typeof p.message == "function" ? p.message(p.fullField || p.field) : p.message || (p.fullField || p.field) + " fails") : C instanceof Array ? b(C) : C instanceof Error && b(C.message);
621
+ b === !0 ? E() : b === !1 ? E(typeof y.message == "function" ? y.message(y.fullField || y.field) : y.message || (y.fullField || y.field) + " fails") : b instanceof Array ? E(b) : b instanceof Error && E(b.message);
622
622
  }
623
- C && C.then && C.then(function() {
624
- return b();
623
+ b && b.then && b.then(function() {
624
+ return E();
625
625
  }, function(R) {
626
- return b(R);
626
+ return E(R);
627
627
  });
628
628
  }, function(g) {
629
629
  f(g);
@@ -702,10 +702,10 @@ function Qt(a = [], t = 1, e = 0) {
702
702
  };
703
703
  });
704
704
  }
705
- function It(a = []) {
705
+ function _t(a = []) {
706
706
  let t = [];
707
707
  return a.forEach((e) => {
708
- e.children ? t = t.concat(It(e.children)) : t.push(e);
708
+ e.children ? t = t.concat(_t(e.children)) : t.push(e);
709
709
  }), t;
710
710
  }
711
711
  const Bt = /^(\r\n|\n\r|\r|\n)/, Qe = /^[^\t\r\n]+/, Wt = /^\t/;
@@ -792,18 +792,18 @@ class ii {
792
792
  Array.isArray(i.children) && (o = !0, this.initData(i.children, e + 1));
793
793
  const { ROW_KEY: r = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: l, SELECTABLE_METHOD: h, CHECKBOX_KEY: f } = this.ctx.config, d = i[r], x = d ?? At();
794
794
  this.itemRowKeyMap.set(i, x);
795
- const u = i._height || l, y = i._readonly;
795
+ const u = i._height || l, p = i._readonly;
796
796
  let g = !0;
797
797
  if (typeof h == "function" && (g = h), f) {
798
798
  const w = i[f];
799
799
  if (this.checkboxKeyMap.has(w)) {
800
- const p = this.checkboxKeyMap.get(w);
801
- p.push(x), this.checkboxKeyMap.set(w, p);
800
+ const y = this.checkboxKeyMap.get(w);
801
+ y.push(x), this.checkboxKeyMap.set(w, y);
802
802
  } else
803
803
  this.checkboxKeyMap.set(w, [x]);
804
804
  }
805
805
  this.rowKeyMap.set(x, {
806
- readonly: y,
806
+ readonly: p,
807
807
  index: s,
808
808
  rowIndex: s,
809
809
  level: e,
@@ -1328,8 +1328,8 @@ class ii {
1328
1328
  new nt(h).validate(f).then(() => {
1329
1329
  this.setValidationError(t, e, []), i([]);
1330
1330
  }).catch(({ errors: x }) => {
1331
- const u = x.map((y) => ({
1332
- ...y,
1331
+ const u = x.map((p) => ({
1332
+ ...p,
1333
1333
  column: n,
1334
1334
  key: e,
1335
1335
  row: s.item,
@@ -1632,8 +1632,8 @@ class ni {
1632
1632
  d === "top" ? x = i + f : d === "bottom" ? x = i + o - f : x = i + (o + f) / 2;
1633
1633
  let u = 0;
1634
1634
  l === "left" ? u = e + f : l === "right" ? u = e + s - f : u = e + s / 2;
1635
- const { _text: y, ellipsis: g } = this.handleEllipsis(t, s, f);
1636
- return this.ctx.fillText(y, u, x), this.ctx.restore(), g;
1635
+ const { _text: p, ellipsis: g } = this.handleEllipsis(t, s, f);
1636
+ return this.ctx.fillText(p, u, x), this.ctx.restore(), g;
1637
1637
  }
1638
1638
  handleEllipsis(t, e, i = 0) {
1639
1639
  let s = !1, o = t;
@@ -1727,12 +1727,16 @@ class Pt {
1727
1727
  // 启用点击选择器编辑
1728
1728
  c(this, "SELECTOR_AREA_MIN_X", 0);
1729
1729
  // 选择器X最小范围
1730
+ c(this, "SELECTOR_AREA_MAX_X_OFFSET", 0);
1731
+ // 选择器X最大范围colMax - offset
1730
1732
  c(this, "SELECTOR_AREA_MAX_X", 0);
1731
1733
  // 选择器X最大范围,0默认最大colMax
1732
1734
  c(this, "SELECTOR_AREA_MIN_Y", 0);
1733
1735
  // 选择器Y最小范围
1734
1736
  c(this, "SELECTOR_AREA_MAX_Y", 0);
1735
1737
  // 选择器Y最大范围,0默认rowMax
1738
+ c(this, "SELECTOR_AREA_MAX_Y_OFFSET", 0);
1739
+ // 选择器Y最大范围,0默认rowMax
1736
1740
  c(this, "ENABLE_SELECTOR_SINGLE", !1);
1737
1741
  c(this, "ENABLE_SELECTOR_SPAN_COL", !0);
1738
1742
  c(this, "ENABLE_SELECTOR_SPAN_ROW", !0);
@@ -2079,13 +2083,13 @@ class ee extends te {
2079
2083
  const u = this.ctx.icons.get("loading");
2080
2084
  n = "loading", o = u, r = x * 8;
2081
2085
  } else if (f) {
2082
- const u = this.ctx.icons.get("expand"), y = this.ctx.icons.get("shrink");
2083
- o = h ? y : u, n = h ? "shrink" : "expand", r = x * 8;
2086
+ const u = this.ctx.icons.get("expand"), p = this.ctx.icons.get("shrink");
2087
+ o = h ? p : u, n = h ? "shrink" : "expand", r = x * 8;
2084
2088
  } else
2085
2089
  r = x * 8;
2086
2090
  if (o) {
2087
- let u = 20, y = 20, g = this.drawX + r + e, w = this.drawY + (this.visibleHeight - y) / 2 + 2;
2088
- this.ctx.paint.drawImage(o, g, w, u, y), this.drawImageX = g, this.drawImageY = w, this.drawImageWidth = u, this.drawImageHeight = y, this.drawImageName = n, this.drawImageSource = o, this.align = "left", this.drawTextX = r + this.drawX + u + 0.5;
2091
+ let u = 20, p = 20, g = this.drawX + r + e, w = this.drawY + (this.visibleHeight - p) / 2 + 2;
2092
+ this.ctx.paint.drawImage(o, g, w, u, p), this.drawImageX = g, this.drawImageY = w, this.drawImageWidth = u, this.drawImageHeight = p, this.drawImageName = n, this.drawImageSource = o, this.align = "left", this.drawTextX = r + this.drawX + u + 0.5;
2089
2093
  }
2090
2094
  }
2091
2095
  }
@@ -2103,46 +2107,46 @@ class ee extends te {
2103
2107
  HIGHLIGHT_HOVER_ROW_COLOR: d
2104
2108
  } = this.ctx.config;
2105
2109
  if (this.cellType === "footer") {
2106
- let p = n, E = r;
2110
+ let y = n, C = r;
2107
2111
  if (typeof o == "function") {
2108
- const m = o, { backgroundColor: b, color: C } = m({
2112
+ const m = o, { backgroundColor: E, color: b } = m({
2109
2113
  row: this.row,
2110
2114
  rowIndex: this.rowIndex,
2111
2115
  colIndex: this.colIndex,
2112
2116
  column: this.column,
2113
2117
  value: this.getValue()
2114
2118
  }) || {};
2115
- b && (p = b), C && (E = C);
2119
+ E && (y = E), b && (C = b);
2116
2120
  }
2117
- this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = p, this.drawTextColor = E;
2121
+ this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = y, this.drawTextColor = C;
2118
2122
  return;
2119
2123
  }
2120
2124
  let x = "transparent";
2121
- const u = this.ctx.focusCell, y = this.ctx.hoverCell;
2122
- f && (y == null ? void 0 : y.rowKey) === this.rowKey && (x = d), l && (u == null ? void 0 : u.rowKey) === this.rowKey && (x = h), this.drawCellSkyBgColor = x;
2125
+ const u = this.ctx.focusCell, p = this.ctx.hoverCell;
2126
+ f && (p == null ? void 0 : p.rowKey) === this.rowKey && (x = d), l && (u == null ? void 0 : u.rowKey) === this.rowKey && (x = h), this.drawCellSkyBgColor = x;
2123
2127
  let g = e, w = r;
2124
2128
  if (["index", "index-selection", "selection"].includes(this.type)) {
2125
2129
  this.drawCellBgColor = e, this.drawTextColor = r;
2126
2130
  return;
2127
2131
  }
2128
2132
  if (this.ctx.database.getReadonly(this.rowKey, this.key) || (g = i, w = r), typeof s == "function") {
2129
- const p = s, { backgroundColor: E, color: m } = p({
2133
+ const y = s, { backgroundColor: C, color: m } = y({
2130
2134
  row: this.row,
2131
2135
  rowIndex: this.rowIndex,
2132
2136
  colIndex: this.colIndex,
2133
2137
  column: this.column,
2134
2138
  value: this.getValue()
2135
2139
  }) || {};
2136
- E && (g = E), m && (w = m);
2140
+ C && (g = C), m && (w = m);
2137
2141
  }
2138
2142
  this.drawCellBgColor = g, this.drawTextColor = w;
2139
2143
  }
2140
2144
  updateSelection() {
2141
2145
  const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: n, rowIndex: l, rowKey: h } = this;
2142
2146
  if (!(s === 0 || o === 0) && r !== "footer" && ["index-selection", "selection"].includes(n)) {
2143
- const f = this.ctx.database.getRowSelection(h), d = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, u = this.drawX + (e - x) / 2, y = this.drawY + (i - x) / 2;
2147
+ const f = this.ctx.database.getRowSelection(h), d = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, u = this.drawX + (e - x) / 2, p = this.drawY + (i - x) / 2;
2144
2148
  let g = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
2145
- f && d ? (g = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : f && d ? (g = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !f && d ? (g = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), g && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = u, this.drawImageY = y, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = g) : g && n === "selection" && (this.drawImageX = u, this.drawImageY = y, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = g);
2149
+ f && d ? (g = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : f && d ? (g = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !f && d ? (g = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), g && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = u, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = g) : g && n === "selection" && (this.drawImageX = u, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = g);
2146
2150
  }
2147
2151
  }
2148
2152
  updateHoverIcon() {
@@ -2330,32 +2334,32 @@ class ee extends te {
2330
2334
  const { drawX: i, drawY: s, width: o, rowIndex: r, colIndex: n } = this, l = i + 0.5;
2331
2335
  let h = s + 0.5, f = this.height;
2332
2336
  r === 0 && (h = this.y + 1, f = f - 1);
2333
- const { xArr: d, yArr: x, lineDash: u = [], borderWidth: y = 1, borderColor: g, fillColor: w } = e, p = d[0], E = d[1], m = x[0], b = x[1];
2334
- n >= p && n <= E && r === m && this.ctx.paint.drawLine([l, h, l + o - 2, h], {
2337
+ const { xArr: d, yArr: x, lineDash: u = [], borderWidth: p = 1, borderColor: g, fillColor: w } = e, y = d[0], C = d[1], m = x[0], E = x[1];
2338
+ n >= y && n <= C && r === m && this.ctx.paint.drawLine([l, h, l + o - 2, h], {
2335
2339
  borderColor: g,
2336
2340
  fillColor: w,
2337
- borderWidth: y,
2341
+ borderWidth: p,
2338
2342
  lineCap: "round",
2339
2343
  lineJoin: "round",
2340
2344
  lineDash: u
2341
- }), n >= p && n <= E && r === b && this.ctx.paint.drawLine([l, h + f - 1.5, l + o, h + f - 1.5], {
2345
+ }), n >= y && n <= C && r === E && this.ctx.paint.drawLine([l, h + f - 1.5, l + o, h + f - 1.5], {
2342
2346
  borderColor: g,
2343
2347
  fillColor: w,
2344
- borderWidth: y,
2348
+ borderWidth: p,
2345
2349
  lineCap: "round",
2346
2350
  lineJoin: "round",
2347
2351
  lineDash: u
2348
- }), n === p && r >= m && r <= b && this.ctx.paint.drawLine([l, h, l, h + f - 1], {
2352
+ }), n === y && r >= m && r <= E && this.ctx.paint.drawLine([l, h, l, h + f - 1], {
2349
2353
  borderColor: g,
2350
2354
  fillColor: w,
2351
- borderWidth: y,
2355
+ borderWidth: p,
2352
2356
  lineCap: "round",
2353
2357
  lineJoin: "round",
2354
2358
  lineDash: u
2355
- }), n === E && r >= m && r <= b && this.ctx.paint.drawLine([l + o - 1, h, l + o - 1, h + f - 1], {
2359
+ }), n === C && r >= m && r <= E && this.ctx.paint.drawLine([l + o - 1, h, l + o - 1, h + f - 1], {
2356
2360
  borderColor: g,
2357
2361
  fillColor: w,
2358
- borderWidth: y,
2362
+ borderWidth: p,
2359
2363
  lineCap: "round",
2360
2364
  lineJoin: "round",
2361
2365
  lineDash: u
@@ -3035,7 +3039,7 @@ class di {
3035
3039
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3036
3040
  } = this.ctx, i = this.ctx.database.getColumns();
3037
3041
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3038
- const s = Jt(i), o = It(i);
3042
+ const s = Jt(i), o = _t(i);
3039
3043
  this.height = t * s, this.width = o.reduce((d, x) => d + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
3040
3044
  const r = Je(Qt(i, s));
3041
3045
  this.columnIndex = 0, this.resizeNum = 0, this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
@@ -3134,7 +3138,7 @@ class di {
3134
3138
  for (let r = 0; r < i; r++) {
3135
3139
  const n = t[r], l = o * (n.rowspan || 1), h = o * n.level;
3136
3140
  let f = n.width || 100;
3137
- n.children && (f = It(n.children).reduce((u, y) => u + ((y == null ? void 0 : y.width) || 100), 0));
3141
+ n.children && (f = _t(n.children).reduce((u, p) => u + ((p == null ? void 0 : p.width) || 100), 0));
3138
3142
  const d = new ie(this.ctx, this.columnIndex, s, h, f, l, n);
3139
3143
  this.ctx.database.setHeader(n.key, d), this.allCellHeaders.push(d), n.children || (this.leafCellHeaders.push(d), d.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(d) : n.fixed === "right" ? this.fixedRightCellHeaders.push(d) : this.centerCellHeaders.push(d), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += f;
3140
3144
  }
@@ -3293,30 +3297,30 @@ class fi {
3293
3297
  if (!e.width)
3294
3298
  return;
3295
3299
  this.x = 0, this.y = e.height;
3296
- const { data: u, sumHeight: y } = i.getData();
3297
- this.height = y, this.data = u;
3300
+ const { data: u, sumHeight: p } = i.getData();
3301
+ this.height = p, this.data = u;
3298
3302
  const { top: g } = t.getBoundingClientRect();
3299
3303
  this.width = e.width, this.visibleWidth = t.width - o;
3300
3304
  const w = this.ctx.footer.height;
3301
3305
  this.data.length || (this.height = h);
3302
- const p = this.data.length ? "not-empty" : "empty";
3306
+ const y = this.data.length ? "not-empty" : "empty";
3303
3307
  this.ctx.emit("emptyChange", {
3304
- isEmpty: p,
3305
- type: p,
3308
+ isEmpty: y,
3309
+ type: y,
3306
3310
  headerHeight: e.height,
3307
3311
  bodyHeight: this.height,
3308
3312
  footerHeight: w,
3309
3313
  width: this.width,
3310
3314
  height: this.data.length ? 0 : h + w
3311
3315
  });
3312
- let E = this.height + e.height + o;
3313
- E += w;
3316
+ let C = this.height + e.height + o;
3317
+ C += w;
3314
3318
  let m = 0;
3315
3319
  this.data.length && d ? (m = window.innerHeight - g - x, m < 0 && (m = 32, console.error(
3316
3320
  "There is an error in the height calculation ENABLE_OFFSET_HEIGHT and OFFSET_HEIGHT are invalid"
3317
- ))) : this.data.length && l ? m = l : this.data.length && f && E > f ? m = f : m = E, m > 0 && (this.ctx.target.height = m);
3318
- let b = t.height - e.height - o;
3319
- s ? this.visibleHeight = b - w : this.visibleHeight = b, this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = u, this.ctx.target.setAttribute(
3321
+ ))) : this.data.length && l ? m = l : this.data.length && f && C > f ? m = f : m = C, m > 0 && (this.ctx.target.height = m);
3322
+ let E = t.height - e.height - o;
3323
+ s ? this.visibleHeight = E - w : this.visibleHeight = E, this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = u, this.ctx.target.setAttribute(
3320
3324
  "style",
3321
3325
  `outline: none; position: relative; border-radius: ${n}px; border: 1px solid ${r}; height:${this.ctx.target.height}px;width:${this.ctx.target.width - 1}px;`
3322
3326
  );
@@ -3427,7 +3431,7 @@ class fi {
3427
3431
  l === -1 && (l = o.length), this.headIndex = Math.max(0, n), this.tailIndex = Math.min(this.ctx.maxRowIndex, l + 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;
3428
3432
  const h = [];
3429
3433
  for (let f = 0; f < this.visibleRows.length; f++) {
3430
- const d = this.headIndex + f, x = this.visibleRows[f], { height: u, top: y } = this.ctx.database.getPositionForRowIndex(d), g = new se(this.ctx, d, 0, y + this.y, t.width, u, x);
3434
+ const d = this.headIndex + f, x = this.visibleRows[f], { height: u, top: p } = this.ctx.database.getPositionForRowIndex(d), g = new se(this.ctx, d, 0, p + this.y, t.width, u, x);
3431
3435
  h.push(g);
3432
3436
  }
3433
3437
  this.renderRows = h, this.ctx.body.renderRows = h;
@@ -3619,11 +3623,18 @@ class ui {
3619
3623
  }
3620
3624
  if (JSON.stringify(this.ctx.selector.xArr) !== JSON.stringify(o) || JSON.stringify(this.ctx.selector.yArr) !== JSON.stringify(r)) {
3621
3625
  this.ctx.mousedown && (this.ctx.selectorMove = !0), this.ctx.selector.enable = !0;
3622
- const { SELECTOR_AREA_MIN_X: n, SELECTOR_AREA_MAX_X: l, SELECTOR_AREA_MIN_Y: h, SELECTOR_AREA_MAX_Y: f } = this.ctx.config, d = n, x = l || this.ctx.maxColIndex, u = h, y = f || this.ctx.maxRowIndex;
3623
- let [g, w] = o, [p, E] = r;
3624
- if (g < d || p < u)
3626
+ const {
3627
+ SELECTOR_AREA_MIN_X: n,
3628
+ SELECTOR_AREA_MAX_X: l,
3629
+ SELECTOR_AREA_MIN_Y: h,
3630
+ SELECTOR_AREA_MAX_Y: f,
3631
+ SELECTOR_AREA_MAX_X_OFFSET: d,
3632
+ SELECTOR_AREA_MAX_Y_OFFSET: x
3633
+ } = this.ctx.config, u = n, p = l || this.ctx.maxColIndex - d, g = h, w = f || this.ctx.maxRowIndex - x;
3634
+ let [y, C] = o, [m, E] = r;
3635
+ if (y < u || C > p || m < g || E > w)
3625
3636
  return;
3626
- this.ctx.selector.xArr = [Math.max(d, g), Math.min(x, w)], this.ctx.selector.yArr = [Math.max(u, p), Math.min(y, E)], this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("draw");
3637
+ this.ctx.selector.xArr = [Math.max(u, y), Math.min(p, C)], this.ctx.selector.yArr = [Math.max(g, m), Math.min(w, E)], this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("draw");
3627
3638
  }
3628
3639
  }
3629
3640
  selectCols(t) {
@@ -3633,19 +3644,19 @@ class ui {
3633
3644
  this.selectAll();
3634
3645
  return;
3635
3646
  }
3636
- const { SELECTOR_AREA_MIN_Y: e, SELECTOR_AREA_MAX_Y: i } = this.ctx.config, s = e, o = i || this.ctx.maxRowIndex;
3647
+ const { SELECTOR_AREA_MIN_Y: e, SELECTOR_AREA_MAX_Y: i, SELECTOR_AREA_MAX_Y_OFFSET: s } = this.ctx.config, o = e, r = i || this.ctx.maxRowIndex - s;
3637
3648
  if (this.ctx.mousedown && this.ctx.focusCellHeader) {
3638
- const { colIndex: r } = this.ctx.focusCellHeader;
3639
- if (this.ctx.clearSelector(), t.colIndex >= r) {
3640
- const n = [r, t.colIndex + t.colspan - 1], l = [s, o];
3641
- this.setSelector(n, l);
3649
+ const { colIndex: n } = this.ctx.focusCellHeader;
3650
+ if (this.ctx.clearSelector(), t.colIndex >= n) {
3651
+ const l = [n, t.colIndex + t.colspan - 1], h = [o, r];
3652
+ this.setSelector(l, h);
3642
3653
  } else {
3643
- const n = [t.colIndex, r], l = [s, o];
3644
- this.setSelector(n, l);
3654
+ const l = [t.colIndex, n], h = [o, r];
3655
+ this.setSelector(l, h);
3645
3656
  }
3646
3657
  } else {
3647
- const r = [t.colIndex, t.colIndex + t.colspan - 1], n = [s, o];
3648
- this.setSelector(r, n);
3658
+ const n = [t.colIndex, t.colIndex + t.colspan - 1], l = [o, r];
3659
+ this.setSelector(n, l);
3649
3660
  }
3650
3661
  }
3651
3662
  selectAll() {
@@ -3653,27 +3664,34 @@ class ui {
3653
3664
  return;
3654
3665
  const { ENABLE_SELECTOR_ALL_ROWS: t, ENABLE_SELECTOR_ALL_COLS: e } = this.ctx.config;
3655
3666
  if (t && e) {
3656
- const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MIN_Y: o, SELECTOR_AREA_MAX_Y: r } = this.ctx.config, n = i, l = s || this.ctx.maxColIndex, h = o, f = r || this.ctx.maxRowIndex, d = [n, l], x = [h, f];
3657
- this.setSelector(d, x);
3667
+ const {
3668
+ SELECTOR_AREA_MIN_X: i,
3669
+ SELECTOR_AREA_MAX_X: s,
3670
+ SELECTOR_AREA_MIN_Y: o,
3671
+ SELECTOR_AREA_MAX_Y: r,
3672
+ SELECTOR_AREA_MAX_X_OFFSET: n,
3673
+ SELECTOR_AREA_MAX_Y_OFFSET: l
3674
+ } = this.ctx.config, h = i, f = s || this.ctx.maxColIndex - n, d = o, x = r || this.ctx.maxRowIndex - l, u = [h, f], p = [d, x];
3675
+ this.setSelector(u, p);
3658
3676
  }
3659
3677
  }
3660
3678
  selectRows(t, e = !0) {
3661
3679
  if (this.ctx.config.ENABLE_SELECTOR_SINGLE || !this.ctx.config.ENABLE_SELECTOR_ALL_COLS || this.ctx.autofillMove || this.ctx.editing)
3662
3680
  return;
3663
- const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s } = this.ctx.config, o = s || this.ctx.maxColIndex, r = i;
3681
+ const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: o } = this.ctx.config, r = s || this.ctx.maxColIndex - o, n = i;
3664
3682
  if (e) {
3665
3683
  this.ctx.setFocusCell(t);
3666
- const n = [r, o], l = [t.rowIndex, t.rowIndex];
3667
- this.setSelector(n, l);
3684
+ const l = [n, r], h = [t.rowIndex, t.rowIndex];
3685
+ this.setSelector(l, h);
3668
3686
  }
3669
3687
  if (this.ctx.focusCell && this.ctx.mousedown) {
3670
- const { rowIndex: n } = this.ctx.focusCell;
3671
- if (t.rowIndex >= n) {
3672
- const l = [r, o], h = [n, t.rowIndex];
3673
- this.setSelector(l, h);
3688
+ const { rowIndex: l } = this.ctx.focusCell;
3689
+ if (t.rowIndex >= l) {
3690
+ const h = [n, r], f = [l, t.rowIndex];
3691
+ this.setSelector(h, f);
3674
3692
  } else {
3675
- const l = [r, o], h = [t.rowIndex, n];
3676
- this.setSelector(l, h);
3693
+ const h = [n, r], f = [t.rowIndex, l];
3694
+ this.setSelector(h, f);
3677
3695
  }
3678
3696
  }
3679
3697
  }
@@ -3763,16 +3781,16 @@ class ui {
3763
3781
  for (let h = 0; h <= r.length - 1; h++) {
3764
3782
  const f = r[h].length;
3765
3783
  for (let d = 0; d <= f - 1; d++) {
3766
- const x = h + e, u = d + i, y = r[h][d], g = this.ctx.database.getItemValueForRowIndexAndColIndex(
3784
+ const x = h + e, u = d + i, p = r[h][d], g = this.ctx.database.getItemValueForRowIndexAndColIndex(
3767
3785
  x,
3768
3786
  u
3769
3787
  );
3770
3788
  if (g) {
3771
- const { rowKey: w, key: p } = g;
3772
- this.ctx.database.getReadonly(w, p) || (s.add(w), n.push({
3789
+ const { rowKey: w, key: y } = g;
3790
+ this.ctx.database.getReadonly(w, y) || (s.add(w), n.push({
3773
3791
  rowKey: w,
3774
- key: p,
3775
- value: y,
3792
+ key: y,
3793
+ value: p,
3776
3794
  row: {}
3777
3795
  //内部有设置
3778
3796
  }));
@@ -3873,8 +3891,8 @@ class ui {
3873
3891
  const { SCROLLER_TRACK_SIZE: h = 0, FOOTER_FIXED: f } = this.ctx.config;
3874
3892
  let d = 0;
3875
3893
  f && (d = r.visibleHeight);
3876
- const x = s - e.drawX + 1, u = e.drawX + e.width - (t.width - i) + 1, y = o.height - e.drawY, g = e.drawY + e.height - (t.height - d - h);
3877
- u > 0 && !e.fixed ? this.ctx.setScrollX(n + u) : x > 0 && !e.fixed && this.ctx.setScrollX(n - x), y > 0 ? this.ctx.setScrollY(l - y) : g > 0 && this.ctx.setScrollY(l + g);
3894
+ const x = s - e.drawX + 1, u = e.drawX + e.width - (t.width - i) + 1, p = o.height - e.drawY, g = e.drawY + e.height - (t.height - d - h);
3895
+ u > 0 && !e.fixed ? this.ctx.setScrollX(n + u) : x > 0 && !e.fixed && this.ctx.setScrollX(n - x), p > 0 ? this.ctx.setScrollY(l - p) : g > 0 && this.ctx.setScrollY(l + g);
3878
3896
  }
3879
3897
  destroy() {
3880
3898
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -3890,8 +3908,8 @@ class gi {
3890
3908
  this.ctx.target.style.cursor === "crosshair" && (this.ctx.target.style.cursor = "default");
3891
3909
  const { xArr: i, yArr: s } = this.ctx.selector, o = i[1], r = s[1], { colIndex: n, rowIndex: l, drawX: h, drawY: f, width: d, height: x } = t;
3892
3910
  if (this.ctx.config.ENABLE_AUTOFILL && n === o && l === r) {
3893
- const y = h + d - 6, g = f + x - 6;
3894
- e.offsetX > y && e.offsetY > g && (this.ctx.target.style.cursor = "crosshair");
3911
+ const p = h + d - 6, g = f + x - 6;
3912
+ e.offsetX > p && e.offsetY > g && (this.ctx.target.style.cursor = "crosshair");
3895
3913
  }
3896
3914
  this.mouseenter(t);
3897
3915
  }), this.ctx.on("cellMousedown", () => {
@@ -3930,11 +3948,18 @@ class gi {
3930
3948
  r = [l, l];
3931
3949
  }
3932
3950
  if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(r) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(n)) {
3933
- const { SELECTOR_AREA_MIN_X: l, SELECTOR_AREA_MAX_X: h, SELECTOR_AREA_MIN_Y: f, SELECTOR_AREA_MAX_Y: d } = this.ctx.config, x = l, u = h || this.ctx.maxColIndex, y = f, g = d || this.ctx.maxRowIndex;
3934
- let [w, p] = r, [E, m] = n;
3935
- if (w < x || E < y)
3951
+ const {
3952
+ SELECTOR_AREA_MIN_X: l,
3953
+ SELECTOR_AREA_MAX_X: h,
3954
+ SELECTOR_AREA_MIN_Y: f,
3955
+ SELECTOR_AREA_MAX_Y: d,
3956
+ SELECTOR_AREA_MAX_X_OFFSET: x,
3957
+ SELECTOR_AREA_MAX_Y_OFFSET: u
3958
+ } = this.ctx.config, p = l, g = h || this.ctx.maxColIndex - x, w = f, y = d || this.ctx.maxRowIndex - u;
3959
+ let [C, m] = r, [E, b] = n;
3960
+ if (C < p || E < w)
3936
3961
  return;
3937
- this.ctx.autofill.xArr = [Math.max(x, w), Math.min(u, p)], this.ctx.autofill.yArr = [Math.max(y, E), Math.min(g, m)], this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
3962
+ this.ctx.autofill.xArr = [Math.max(p, C), Math.min(g, m)], this.ctx.autofill.yArr = [Math.max(w, E), Math.min(y, b)], this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
3938
3963
  }
3939
3964
  }
3940
3965
  /**
@@ -3944,18 +3969,18 @@ class gi {
3944
3969
  const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
3945
3970
  for (let d = 0; d <= e.yArr[1] - e.yArr[0]; d++)
3946
3971
  for (let x = 0; x <= e.xArr[1] - e.xArr[0]; x++) {
3947
- const u = d + e.yArr[0], y = x + e.xArr[0];
3948
- i.set(`${u}-${y}`, !0);
3972
+ const u = d + e.yArr[0], p = x + e.xArr[0];
3973
+ i.set(`${u}-${p}`, !0);
3949
3974
  }
3950
3975
  const { value: s } = e, o = s[0].length, r = s.length, n = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr;
3951
3976
  let h = [];
3952
3977
  for (let d = 0; d <= l[1] - l[0]; d++)
3953
3978
  for (let x = 0; x <= n[1] - n[0]; x++) {
3954
- const u = x + n[0], y = d + l[0], g = s[d % r][x % o], w = this.ctx.database.getItemValueForRowIndexAndColIndex(y, u), p = `${y}-${u}`;
3955
- if (w && !i.has(p)) {
3956
- const { rowKey: E, key: m } = w;
3957
- this.ctx.database.getReadonly(E, m) || (t.add(E), h.push({
3958
- rowKey: E,
3979
+ const u = x + n[0], p = d + l[0], g = s[d % r][x % o], w = this.ctx.database.getItemValueForRowIndexAndColIndex(p, u), y = `${p}-${u}`;
3980
+ if (w && !i.has(y)) {
3981
+ const { rowKey: C, key: m } = w;
3982
+ this.ctx.database.getReadonly(C, m) || (t.add(C), h.push({
3983
+ rowKey: C,
3959
3984
  key: m,
3960
3985
  value: g,
3961
3986
  row: {}
@@ -3994,7 +4019,7 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
3994
4019
  start: "end",
3995
4020
  end: "start"
3996
4021
  };
3997
- function _t(a, t, e) {
4022
+ function It(a, t, e) {
3998
4023
  return U(a, rt(t, e));
3999
4024
  }
4000
4025
  function at(a, t) {
@@ -4044,7 +4069,7 @@ function Ei(a, t, e) {
4044
4069
  return [];
4045
4070
  }
4046
4071
  }
4047
- function bi(a, t, e, i) {
4072
+ function Ci(a, t, e, i) {
4048
4073
  const s = ct(a);
4049
4074
  let o = Ei(q(a), e === "start", i);
4050
4075
  return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(Ot)))), o;
@@ -4052,7 +4077,7 @@ function bi(a, t, e, i) {
4052
4077
  function xt(a) {
4053
4078
  return a.replace(/left|right|bottom|top/g, (t) => wi[t]);
4054
4079
  }
4055
- function Ci(a) {
4080
+ function bi(a) {
4056
4081
  return {
4057
4082
  top: 0,
4058
4083
  right: 0,
@@ -4062,7 +4087,7 @@ function Ci(a) {
4062
4087
  };
4063
4088
  }
4064
4089
  function oe(a) {
4065
- return typeof a != "number" ? Ci(a) : {
4090
+ return typeof a != "number" ? bi(a) : {
4066
4091
  top: a,
4067
4092
  right: a,
4068
4093
  bottom: a,
@@ -4149,17 +4174,17 @@ const vi = async (a, t, e) => {
4149
4174
  }), {
4150
4175
  x: f,
4151
4176
  y: d
4152
- } = Vt(h, i, l), x = i, u = {}, y = 0;
4177
+ } = Vt(h, i, l), x = i, u = {}, p = 0;
4153
4178
  for (let g = 0; g < n.length; g++) {
4154
4179
  const {
4155
4180
  name: w,
4156
- fn: p
4181
+ fn: y
4157
4182
  } = n[g], {
4158
- x: E,
4183
+ x: C,
4159
4184
  y: m,
4160
- data: b,
4161
- reset: C
4162
- } = await p({
4185
+ data: E,
4186
+ reset: b
4187
+ } = await y({
4163
4188
  x: f,
4164
4189
  y: d,
4165
4190
  initialPlacement: i,
@@ -4173,17 +4198,17 @@ const vi = async (a, t, e) => {
4173
4198
  floating: t
4174
4199
  }
4175
4200
  });
4176
- f = E ?? f, d = m ?? d, u = {
4201
+ f = C ?? f, d = m ?? d, u = {
4177
4202
  ...u,
4178
4203
  [w]: {
4179
4204
  ...u[w],
4180
- ...b
4205
+ ...E
4181
4206
  }
4182
- }, C && y <= 50 && (y++, typeof C == "object" && (C.placement && (x = C.placement), C.rects && (h = C.rects === !0 ? await r.getElementRects({
4207
+ }, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (x = b.placement), b.rects && (h = b.rects === !0 ? await r.getElementRects({
4183
4208
  reference: a,
4184
4209
  floating: t,
4185
4210
  strategy: s
4186
- }) : C.rects), {
4211
+ }) : b.rects), {
4187
4212
  x: f,
4188
4213
  y: d
4189
4214
  } = Vt(h, x, l)), g = -1);
@@ -4212,33 +4237,33 @@ async function ne(a, t) {
4212
4237
  elementContext: d = "floating",
4213
4238
  altBoundary: x = !1,
4214
4239
  padding: u = 0
4215
- } = at(t, a), y = oe(u), w = n[x ? d === "floating" ? "reference" : "floating" : d], p = ut(await o.getClippingRect({
4240
+ } = at(t, a), p = oe(u), w = n[x ? d === "floating" ? "reference" : "floating" : d], y = ut(await o.getClippingRect({
4216
4241
  element: (e = await (o.isElement == null ? void 0 : o.isElement(w))) == null || e ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(n.floating)),
4217
4242
  boundary: h,
4218
4243
  rootBoundary: f,
4219
4244
  strategy: l
4220
- })), E = d === "floating" ? {
4245
+ })), C = d === "floating" ? {
4221
4246
  x: i,
4222
4247
  y: s,
4223
4248
  width: r.floating.width,
4224
4249
  height: r.floating.height
4225
- } : r.reference, m = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(n.floating)), b = await (o.isElement == null ? void 0 : o.isElement(m)) ? await (o.getScale == null ? void 0 : o.getScale(m)) || {
4250
+ } : r.reference, m = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(n.floating)), E = await (o.isElement == null ? void 0 : o.isElement(m)) ? await (o.getScale == null ? void 0 : o.getScale(m)) || {
4226
4251
  x: 1,
4227
4252
  y: 1
4228
4253
  } : {
4229
4254
  x: 1,
4230
4255
  y: 1
4231
- }, C = ut(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
4256
+ }, b = ut(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
4232
4257
  elements: n,
4233
- rect: E,
4258
+ rect: C,
4234
4259
  offsetParent: m,
4235
4260
  strategy: l
4236
- }) : E);
4261
+ }) : C);
4237
4262
  return {
4238
- top: (p.top - C.top + y.top) / b.y,
4239
- bottom: (C.bottom - p.bottom + y.bottom) / b.y,
4240
- left: (p.left - C.left + y.left) / b.x,
4241
- right: (C.right - p.right + y.right) / b.x
4263
+ top: (y.top - b.top + p.top) / E.y,
4264
+ bottom: (b.bottom - y.bottom + p.bottom) / E.y,
4265
+ left: (y.left - b.left + p.left) / E.x,
4266
+ right: (b.right - y.right + p.right) / E.x
4242
4267
  };
4243
4268
  }
4244
4269
  const Ri = (a) => ({
@@ -4262,23 +4287,23 @@ const Ri = (a) => ({
4262
4287
  const d = oe(f), x = {
4263
4288
  x: e,
4264
4289
  y: i
4265
- }, u = Ht(s), y = Mt(u), g = await r.getDimensions(h), w = u === "y", p = w ? "top" : "left", E = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", b = o.reference[y] + o.reference[u] - x[u] - o.floating[y], C = x[u] - o.reference[u], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
4290
+ }, u = Ht(s), p = Mt(u), g = await r.getDimensions(h), w = u === "y", y = w ? "top" : "left", C = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", E = o.reference[p] + o.reference[u] - x[u] - o.floating[p], b = x[u] - o.reference[u], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
4266
4291
  let T = R ? R[m] : 0;
4267
- (!T || !await (r.isElement == null ? void 0 : r.isElement(R))) && (T = n.floating[m] || o.floating[y]);
4268
- const L = b / 2 - C / 2, A = T / 2 - g[y] / 2 - 1, D = rt(d[p], A), B = rt(d[E], A), _ = D, S = T - g[y] - B, O = T / 2 - g[y] / 2 + L, G = _t(_, O, S), Y = !l.arrow && ct(s) != null && O !== G && o.reference[y] / 2 - (O < _ ? D : B) - g[y] / 2 < 0, N = Y ? O < _ ? O - _ : O - S : 0;
4292
+ (!T || !await (r.isElement == null ? void 0 : r.isElement(R))) && (T = n.floating[m] || o.floating[p]);
4293
+ const L = E / 2 - b / 2, A = T / 2 - g[p] / 2 - 1, D = rt(d[y], A), B = rt(d[C], A), I = D, S = T - g[p] - B, O = T / 2 - g[p] / 2 + L, G = It(I, O, S), Y = !l.arrow && ct(s) != null && O !== G && o.reference[p] / 2 - (O < I ? D : B) - g[p] / 2 < 0, k = Y ? O < I ? O - I : O - S : 0;
4269
4294
  return {
4270
- [u]: x[u] + N,
4295
+ [u]: x[u] + k,
4271
4296
  data: {
4272
4297
  [u]: G,
4273
- centerOffset: O - G - N,
4298
+ centerOffset: O - G - k,
4274
4299
  ...Y && {
4275
- alignmentOffset: N
4300
+ alignmentOffset: k
4276
4301
  }
4277
4302
  },
4278
4303
  reset: Y
4279
4304
  };
4280
4305
  }
4281
- }), Ii = function(a) {
4306
+ }), _i = function(a) {
4282
4307
  return a === void 0 && (a = {}), {
4283
4308
  name: "flip",
4284
4309
  options: a,
@@ -4296,25 +4321,25 @@ const Ri = (a) => ({
4296
4321
  crossAxis: d = !0,
4297
4322
  fallbackPlacements: x,
4298
4323
  fallbackStrategy: u = "bestFit",
4299
- fallbackAxisSideDirection: y = "none",
4324
+ fallbackAxisSideDirection: p = "none",
4300
4325
  flipAlignment: g = !0,
4301
4326
  ...w
4302
4327
  } = at(a, t);
4303
4328
  if ((e = o.arrow) != null && e.alignmentOffset)
4304
4329
  return {};
4305
- const p = q(s), E = J(n), m = q(n) === n, b = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), C = x || (m || !g ? [xt(n)] : mi(n)), R = y !== "none";
4306
- !x && R && C.push(...bi(n, g, y, b));
4307
- const T = [n, ...C], L = await ne(t, w), A = [];
4330
+ const y = q(s), C = J(n), m = q(n) === n, E = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), b = x || (m || !g ? [xt(n)] : mi(n)), R = p !== "none";
4331
+ !x && R && b.push(...Ci(n, g, p, E));
4332
+ const T = [n, ...b], L = await ne(t, w), A = [];
4308
4333
  let D = ((i = o.flip) == null ? void 0 : i.overflows) || [];
4309
- if (f && A.push(L[p]), d) {
4310
- const O = yi(s, r, b);
4334
+ if (f && A.push(L[y]), d) {
4335
+ const O = yi(s, r, E);
4311
4336
  A.push(L[O[0]], L[O[1]]);
4312
4337
  }
4313
4338
  if (D = [...D, {
4314
4339
  placement: s,
4315
4340
  overflows: A
4316
4341
  }], !A.every((O) => O <= 0)) {
4317
- var B, _;
4342
+ var B, I;
4318
4343
  const O = (((B = o.flip) == null ? void 0 : B.index) || 0) + 1, G = T[O];
4319
4344
  if (G)
4320
4345
  return {
@@ -4326,21 +4351,21 @@ const Ri = (a) => ({
4326
4351
  placement: G
4327
4352
  }
4328
4353
  };
4329
- let Y = (_ = D.filter((N) => N.overflows[0] <= 0).sort((N, W) => N.overflows[1] - W.overflows[1])[0]) == null ? void 0 : _.placement;
4354
+ let Y = (I = D.filter((k) => k.overflows[0] <= 0).sort((k, W) => k.overflows[1] - W.overflows[1])[0]) == null ? void 0 : I.placement;
4330
4355
  if (!Y)
4331
4356
  switch (u) {
4332
4357
  case "bestFit": {
4333
4358
  var S;
4334
- const N = (S = D.filter((W) => {
4359
+ const k = (S = D.filter((W) => {
4335
4360
  if (R) {
4336
4361
  const P = J(W.placement);
4337
- return P === E || // Create a bias to the `y` side axis due to horizontal
4362
+ return P === C || // Create a bias to the `y` side axis due to horizontal
4338
4363
  // reading directions favoring greater width.
4339
4364
  P === "y";
4340
4365
  }
4341
4366
  return !0;
4342
4367
  }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, ye) => P + ye, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : S[0];
4343
- N && (Y = N);
4368
+ k && (Y = k);
4344
4369
  break;
4345
4370
  }
4346
4371
  case "initialPlacement":
@@ -4358,7 +4383,7 @@ const Ri = (a) => ({
4358
4383
  }
4359
4384
  };
4360
4385
  };
4361
- async function _i(a, t) {
4386
+ async function Ii(a, t) {
4362
4387
  const {
4363
4388
  placement: e,
4364
4389
  platform: i,
@@ -4367,7 +4392,7 @@ async function _i(a, t) {
4367
4392
  let {
4368
4393
  mainAxis: x,
4369
4394
  crossAxis: u,
4370
- alignmentAxis: y
4395
+ alignmentAxis: p
4371
4396
  } = typeof d == "number" ? {
4372
4397
  mainAxis: d,
4373
4398
  crossAxis: 0,
@@ -4377,7 +4402,7 @@ async function _i(a, t) {
4377
4402
  crossAxis: d.crossAxis || 0,
4378
4403
  alignmentAxis: d.alignmentAxis
4379
4404
  };
4380
- return n && typeof y == "number" && (u = n === "end" ? y * -1 : y), l ? {
4405
+ return n && typeof p == "number" && (u = n === "end" ? p * -1 : p), l ? {
4381
4406
  x: u * f,
4382
4407
  y: x * h
4383
4408
  } : {
@@ -4396,7 +4421,7 @@ const Oi = function(a) {
4396
4421
  y: o,
4397
4422
  placement: r,
4398
4423
  middlewareData: n
4399
- } = t, l = await _i(t, a);
4424
+ } = t, l = await Ii(t, a);
4400
4425
  return r === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
4401
4426
  x: s + l.x,
4402
4427
  y: o + l.y,
@@ -4422,12 +4447,12 @@ const Oi = function(a) {
4422
4447
  limiter: n = {
4423
4448
  fn: (w) => {
4424
4449
  let {
4425
- x: p,
4426
- y: E
4450
+ x: y,
4451
+ y: C
4427
4452
  } = w;
4428
4453
  return {
4429
- x: p,
4430
- y: E
4454
+ x: y,
4455
+ y: C
4431
4456
  };
4432
4457
  }
4433
4458
  },
@@ -4436,19 +4461,19 @@ const Oi = function(a) {
4436
4461
  x: e,
4437
4462
  y: i
4438
4463
  }, f = await ne(t, l), d = J(q(s)), x = re(d);
4439
- let u = h[x], y = h[d];
4464
+ let u = h[x], p = h[d];
4440
4465
  if (o) {
4441
- const w = x === "y" ? "top" : "left", p = x === "y" ? "bottom" : "right", E = u + f[w], m = u - f[p];
4442
- u = _t(E, u, m);
4466
+ const w = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", C = u + f[w], m = u - f[y];
4467
+ u = It(C, u, m);
4443
4468
  }
4444
4469
  if (r) {
4445
- const w = d === "y" ? "top" : "left", p = d === "y" ? "bottom" : "right", E = y + f[w], m = y - f[p];
4446
- y = _t(E, y, m);
4470
+ const w = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", C = p + f[w], m = p - f[y];
4471
+ p = It(C, p, m);
4447
4472
  }
4448
4473
  const g = n.fn({
4449
4474
  ...t,
4450
4475
  [x]: u,
4451
- [d]: y
4476
+ [d]: p
4452
4477
  });
4453
4478
  return {
4454
4479
  ...g,
@@ -4484,7 +4509,7 @@ function ae(a) {
4484
4509
  function X(a) {
4485
4510
  return gt() ? a instanceof Element || a instanceof H(a).Element : !1;
4486
4511
  }
4487
- function F(a) {
4512
+ function N(a) {
4488
4513
  return gt() ? a instanceof HTMLElement || a instanceof H(a).HTMLElement : !1;
4489
4514
  }
4490
4515
  function $t(a) {
@@ -4496,7 +4521,7 @@ function lt(a) {
4496
4521
  overflowX: e,
4497
4522
  overflowY: i,
4498
4523
  display: s
4499
- } = k(a);
4524
+ } = F(a);
4500
4525
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
4501
4526
  }
4502
4527
  function Ti(a) {
@@ -4512,12 +4537,12 @@ function wt(a) {
4512
4537
  });
4513
4538
  }
4514
4539
  function Dt(a) {
4515
- const t = Xt(), e = X(a) ? k(a) : a;
4540
+ const t = Xt(), e = X(a) ? F(a) : a;
4516
4541
  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));
4517
4542
  }
4518
4543
  function Li(a) {
4519
4544
  let t = V(a);
4520
- for (; F(t) && !Q(t); ) {
4545
+ for (; N(t) && !Q(t); ) {
4521
4546
  if (Dt(t))
4522
4547
  return t;
4523
4548
  if (wt(t))
@@ -4532,7 +4557,7 @@ function Xt() {
4532
4557
  function Q(a) {
4533
4558
  return ["html", "body", "#document"].includes(tt(a));
4534
4559
  }
4535
- function k(a) {
4560
+ function F(a) {
4536
4561
  return H(a).getComputedStyle(a);
4537
4562
  }
4538
4563
  function pt(a) {
@@ -4558,7 +4583,7 @@ function V(a) {
4558
4583
  }
4559
4584
  function ce(a) {
4560
4585
  const t = V(a);
4561
- return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : F(t) && lt(t) ? t : ce(t);
4586
+ return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : N(t) && lt(t) ? t : ce(t);
4562
4587
  }
4563
4588
  function St(a, t, e) {
4564
4589
  var i;
@@ -4574,9 +4599,9 @@ function Tt(a) {
4574
4599
  return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
4575
4600
  }
4576
4601
  function le(a) {
4577
- const t = k(a);
4602
+ const t = F(a);
4578
4603
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
4579
- const s = F(a), o = s ? a.offsetWidth : e, r = s ? a.offsetHeight : i, n = ft(e) !== o || ft(i) !== r;
4604
+ const s = N(a), o = s ? a.offsetWidth : e, r = s ? a.offsetHeight : i, n = ft(e) !== o || ft(i) !== r;
4580
4605
  return n && (e = o, i = r), {
4581
4606
  width: e,
4582
4607
  height: i,
@@ -4588,7 +4613,7 @@ function he(a) {
4588
4613
  }
4589
4614
  function Z(a) {
4590
4615
  const t = he(a);
4591
- if (!F(t))
4616
+ if (!N(t))
4592
4617
  return z(1);
4593
4618
  const e = t.getBoundingClientRect(), {
4594
4619
  width: i,
@@ -4621,10 +4646,10 @@ function ot(a, t, e, i) {
4621
4646
  let l = (s.left + n.x) / r.x, h = (s.top + n.y) / r.y, f = s.width / r.x, d = s.height / r.y;
4622
4647
  if (o) {
4623
4648
  const x = H(o), u = i && X(i) ? H(i) : i;
4624
- let y = x, g = Tt(y);
4625
- for (; g && i && u !== y; ) {
4626
- const w = Z(g), p = g.getBoundingClientRect(), E = k(g), m = p.left + (g.clientLeft + parseFloat(E.paddingLeft)) * w.x, b = p.top + (g.clientTop + parseFloat(E.paddingTop)) * w.y;
4627
- l *= w.x, h *= w.y, f *= w.x, d *= w.y, l += m, h += b, y = H(g), g = Tt(y);
4649
+ let p = x, g = Tt(p);
4650
+ for (; g && i && u !== p; ) {
4651
+ const w = Z(g), y = g.getBoundingClientRect(), C = F(g), m = y.left + (g.clientLeft + parseFloat(C.paddingLeft)) * w.x, E = y.top + (g.clientTop + parseFloat(C.paddingTop)) * w.y;
4652
+ l *= w.x, h *= w.y, f *= w.x, d *= w.y, l += m, h += E, p = H(g), g = Tt(p);
4628
4653
  }
4629
4654
  }
4630
4655
  return ut({
@@ -4648,8 +4673,8 @@ function Hi(a) {
4648
4673
  scrollLeft: 0,
4649
4674
  scrollTop: 0
4650
4675
  }, h = z(1);
4651
- const f = z(0), d = F(i);
4652
- if ((d || !d && !o) && ((tt(i) !== "body" || lt(r)) && (l = pt(i)), F(i))) {
4676
+ const f = z(0), d = N(i);
4677
+ if ((d || !d && !o) && ((tt(i) !== "body" || lt(r)) && (l = pt(i)), N(i))) {
4653
4678
  const x = ot(i);
4654
4679
  h = Z(i), f.x = x.x + i.clientLeft, f.y = x.y + i.clientTop;
4655
4680
  }
@@ -4671,14 +4696,14 @@ function Xi(a) {
4671
4696
  const t = K(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
4672
4697
  let r = -e.scrollLeft + Lt(a);
4673
4698
  const n = -e.scrollTop;
4674
- return k(i).direction === "rtl" && (r += U(t.clientWidth, i.clientWidth) - s), {
4699
+ return F(i).direction === "rtl" && (r += U(t.clientWidth, i.clientWidth) - s), {
4675
4700
  width: s,
4676
4701
  height: o,
4677
4702
  x: r,
4678
4703
  y: n
4679
4704
  };
4680
4705
  }
4681
- function ki(a, t) {
4706
+ function Fi(a, t) {
4682
4707
  const e = H(a), i = K(a), s = e.visualViewport;
4683
4708
  let o = i.clientWidth, r = i.clientHeight, n = 0, l = 0;
4684
4709
  if (s) {
@@ -4693,8 +4718,8 @@ function ki(a, t) {
4693
4718
  y: l
4694
4719
  };
4695
4720
  }
4696
- function Ni(a, t) {
4697
- const e = ot(a, !0, t === "fixed"), i = e.top + a.clientTop, s = e.left + a.clientLeft, o = F(a) ? Z(a) : z(1), r = a.clientWidth * o.x, n = a.clientHeight * o.y, l = s * o.x, h = i * o.y;
4721
+ function ki(a, t) {
4722
+ const e = ot(a, !0, t === "fixed"), i = e.top + a.clientTop, s = e.left + a.clientLeft, o = N(a) ? Z(a) : z(1), r = a.clientWidth * o.x, n = a.clientHeight * o.y, l = s * o.x, h = i * o.y;
4698
4723
  return {
4699
4724
  width: r,
4700
4725
  height: n,
@@ -4705,11 +4730,11 @@ function Ni(a, t) {
4705
4730
  function qt(a, t, e) {
4706
4731
  let i;
4707
4732
  if (t === "viewport")
4708
- i = ki(a, e);
4733
+ i = Fi(a, e);
4709
4734
  else if (t === "document")
4710
4735
  i = Xi(K(a));
4711
4736
  else if (X(t))
4712
- i = Ni(t, e);
4737
+ i = ki(t, e);
4713
4738
  else {
4714
4739
  const s = de(a);
4715
4740
  i = {
@@ -4722,17 +4747,17 @@ function qt(a, t, e) {
4722
4747
  }
4723
4748
  function fe(a, t) {
4724
4749
  const e = V(a);
4725
- return e === t || !X(e) || Q(e) ? !1 : k(e).position === "fixed" || fe(e, t);
4750
+ return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || fe(e, t);
4726
4751
  }
4727
- function Fi(a, t) {
4752
+ function Ni(a, t) {
4728
4753
  const e = t.get(a);
4729
4754
  if (e)
4730
4755
  return e;
4731
4756
  let i = St(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
4732
- const o = k(a).position === "fixed";
4757
+ const o = F(a).position === "fixed";
4733
4758
  let r = o ? V(a) : a;
4734
4759
  for (; X(r) && !Q(r); ) {
4735
- const n = k(r), l = Dt(r);
4760
+ const n = F(r), l = Dt(r);
4736
4761
  !l && n.position === "fixed" && (s = null), (o ? !l && !s : !l && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || lt(r) && !l && fe(a, r)) ? i = i.filter((f) => f !== r) : s = n, r = V(r);
4737
4762
  }
4738
4763
  return t.set(a, i), i;
@@ -4744,7 +4769,7 @@ function Yi(a) {
4744
4769
  rootBoundary: i,
4745
4770
  strategy: s
4746
4771
  } = a;
4747
- const r = [...e === "clippingAncestors" ? wt(t) ? [] : Fi(t, this._c) : [].concat(e), i], n = r[0], l = r.reduce((h, f) => {
4772
+ const r = [...e === "clippingAncestors" ? wt(t) ? [] : Ni(t, this._c) : [].concat(e), i], n = r[0], l = r.reduce((h, f) => {
4748
4773
  const d = qt(t, f, s);
4749
4774
  return h.top = U(d.top, h.top), h.right = rt(d.right, h.right), h.bottom = rt(d.bottom, h.bottom), h.left = U(d.left, h.left), h;
4750
4775
  }, qt(t, n, s));
@@ -4766,7 +4791,7 @@ function Ki(a) {
4766
4791
  };
4767
4792
  }
4768
4793
  function Bi(a, t, e) {
4769
- const i = F(t), s = K(t), o = e === "fixed", r = ot(a, !0, o, t);
4794
+ const i = N(t), s = K(t), o = e === "fixed", r = ot(a, !0, o, t);
4770
4795
  let n = {
4771
4796
  scrollLeft: 0,
4772
4797
  scrollTop: 0
@@ -4792,10 +4817,10 @@ function Bi(a, t, e) {
4792
4817
  };
4793
4818
  }
4794
4819
  function mt(a) {
4795
- return k(a).position === "static";
4820
+ return F(a).position === "static";
4796
4821
  }
4797
4822
  function Gt(a, t) {
4798
- if (!F(a) || k(a).position === "fixed")
4823
+ if (!N(a) || F(a).position === "fixed")
4799
4824
  return null;
4800
4825
  if (t)
4801
4826
  return t(a);
@@ -4806,7 +4831,7 @@ function xe(a, t) {
4806
4831
  const e = H(a);
4807
4832
  if (wt(a))
4808
4833
  return e;
4809
- if (!F(a)) {
4834
+ if (!N(a)) {
4810
4835
  let s = V(a);
4811
4836
  for (; s && !Q(s); ) {
4812
4837
  if (X(s) && !mt(s))
@@ -4833,7 +4858,7 @@ const Wi = async function(a) {
4833
4858
  };
4834
4859
  };
4835
4860
  function Pi(a) {
4836
- return k(a).direction === "rtl";
4861
+ return F(a).direction === "rtl";
4837
4862
  }
4838
4863
  const zi = {
4839
4864
  convertOffsetParentRelativeRectToViewportRelativeRect: Hi,
@@ -4846,7 +4871,7 @@ const zi = {
4846
4871
  getScale: Z,
4847
4872
  isElement: X,
4848
4873
  isRTL: Pi
4849
- }, ue = Oi, ge = Si, we = Ii, Vi = Ri, pe = (a, t, e) => {
4874
+ }, ue = Oi, ge = Si, we = _i, Vi = Ri, pe = (a, t, e) => {
4850
4875
  const i = /* @__PURE__ */ new Map(), s = {
4851
4876
  platform: zi,
4852
4877
  ...e
@@ -5240,7 +5265,7 @@ class ji {
5240
5265
  height: `${r}px`
5241
5266
  },
5242
5267
  cells: l
5243
- }, y = {
5268
+ }, p = {
5244
5269
  key: "right",
5245
5270
  style: {
5246
5271
  position: "absolute",
@@ -5261,15 +5286,15 @@ class ji {
5261
5286
  width: `${o}px`,
5262
5287
  height: `${r}px`
5263
5288
  },
5264
- views: [x, u, y]
5289
+ views: [x, u, p]
5265
5290
  };
5266
5291
  }
5267
5292
  getBody() {
5268
5293
  const t = [], e = [], i = [];
5269
5294
  let s = this.ctx.body.renderRows;
5270
5295
  this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((w) => {
5271
- w.cells.forEach((p) => {
5272
- p.cellType === "footer" && (p.render = p.renderFooter), p.render && (p.fixed === "left" ? e.push(p) : p.fixed === "right" ? i.push(p) : t.push(p));
5296
+ w.cells.forEach((y) => {
5297
+ y.cellType === "footer" && (y.render = y.renderFooter), y.render && (y.fixed === "left" ? e.push(y) : y.fixed === "right" ? i.push(y) : t.push(y));
5273
5298
  });
5274
5299
  });
5275
5300
  const {
@@ -5298,7 +5323,7 @@ class ji {
5298
5323
  height: `${f}px`
5299
5324
  },
5300
5325
  cells: t
5301
- }, y = {
5326
+ }, p = {
5302
5327
  key: "right",
5303
5328
  style: {
5304
5329
  position: "absolute",
@@ -5319,7 +5344,7 @@ class ji {
5319
5344
  width: `${h}px`,
5320
5345
  height: `${f}px`
5321
5346
  },
5322
- views: [x, u, y]
5347
+ views: [x, u, p]
5323
5348
  };
5324
5349
  }
5325
5350
  getFooter() {
@@ -5408,8 +5433,8 @@ class Ui {
5408
5433
  pe(x, this.contextMenuEl, {
5409
5434
  placement: "right-start",
5410
5435
  middleware: [ue(), ge(), we()]
5411
- }).then(({ x: u, y }) => {
5412
- this.show(u, y);
5436
+ }).then(({ x: u, y: p }) => {
5437
+ this.show(u, p);
5413
5438
  });
5414
5439
  }), this.ctx.on("click", this.hide.bind(this)), this.ctx.on("onScroll", this.hide.bind(this)), this.ctx.on("resize", this.hide.bind(this));
5415
5440
  }