e-virt-table 1.1.8 → 1.1.9

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,18 +1,18 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(":root{--e-virt-table-color-white: #fff;--e-virt-table-color-black: #000000;--e-virt-table-color-primary: rgb(82, 146, 247);--e-virt-table-text-color-primary: #333;--e-virt-table-text-color-regular: #666;--e-virt-table-text-color-secondary: #999;--e-virt-table-box-shadow: 0 2px 12px 0 #0000001a;--e-virt-table-editor-bg-color: #fff;--e-virt-table-border-color: #e1e6eb}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--e-virt-table-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index: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(--e-virt-table-editor-bg-color);border:2px solid var(--e-virt-table-color-primary);box-sizing:border-box;box-shadow:var(--e-virt-table-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index: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(--e-virt-table-color-white);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--e-virt-table-text-color-regular);background-color:var(--e-virt-table-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--e-virt-table-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:8px 24px;color:var(--e-virt-table-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--e-virt-table-color-primary);background-color:#f5f7fa}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- var Ce = Object.defineProperty;
3
- var be = (a, t, e) => t in a ? Ce(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
4
- var l = (a, t, e) => be(a, typeof t != "symbol" ? t + "" : t, e);
5
- function G() {
6
- return G = Object.assign ? Object.assign.bind() : function(a) {
2
+ var be = Object.defineProperty;
3
+ var ve = (a, t, e) => t in a ? be(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
4
+ var l = (a, t, e) => ve(a, typeof t != "symbol" ? t + "" : t, e);
5
+ function q() {
6
+ return q = Object.assign ? Object.assign.bind() : function(a) {
7
7
  for (var t = 1; t < arguments.length; t++) {
8
8
  var e = arguments[t];
9
9
  for (var i in e)
10
10
  Object.prototype.hasOwnProperty.call(e, i) && (a[i] = e[i]);
11
11
  }
12
12
  return a;
13
- }, G.apply(this, arguments);
13
+ }, q.apply(this, arguments);
14
14
  }
15
- function ve(a, t) {
15
+ function Re(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 Re() {
28
+ function Ie() {
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,20 +36,20 @@ function Re() {
36
36
  }
37
37
  }
38
38
  function dt(a, t, e) {
39
- return Re() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
39
+ return Ie() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
40
40
  var n = [null];
41
41
  n.push.apply(n, r);
42
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(a) {
46
+ function _e(a) {
47
47
  return Function.toString.call(a).indexOf("[native code]") !== -1;
48
48
  }
49
49
  function Ct(a) {
50
50
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
51
51
  return Ct = function(i) {
52
- if (i === null || !Ie(i)) return i;
52
+ if (i === null || !_e(i)) return i;
53
53
  if (typeof i != "function")
54
54
  throw new TypeError("Super expression must either be null or a function");
55
55
  if (typeof t < "u") {
@@ -69,9 +69,9 @@ function Ct(a) {
69
69
  }), st(s, i);
70
70
  }, Ct(a);
71
71
  }
72
- var _e = /%[sdj%]/g, jt = function() {
72
+ var Oe = /%[sdj%]/g, Ut = function() {
73
73
  };
74
- typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (jt = function(t, e) {
74
+ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Ut = function(t, e) {
75
75
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && e.every(function(i) {
76
76
  return typeof i == "string";
77
77
  }) && console.warn(t, e);
@@ -91,7 +91,7 @@ function D(a) {
91
91
  if (typeof a == "function")
92
92
  return a.apply(null, e);
93
93
  if (typeof a == "string") {
94
- var o = a.replace(_e, function(n) {
94
+ var o = a.replace(Oe, function(n) {
95
95
  if (n === "%%")
96
96
  return "%";
97
97
  if (s >= r)
@@ -116,13 +116,13 @@ function D(a) {
116
116
  }
117
117
  return a;
118
118
  }
119
- function Oe(a) {
119
+ function Se(a) {
120
120
  return a === "string" || a === "url" || a === "hex" || a === "email" || a === "date" || a === "pattern";
121
121
  }
122
122
  function H(a, t) {
123
- return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Oe(t) && typeof a == "string" && !a);
123
+ return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Se(t) && typeof a == "string" && !a);
124
124
  }
125
- function Se(a, t, e) {
125
+ function Le(a, t, e) {
126
126
  var i = [], s = 0, r = a.length;
127
127
  function o(n) {
128
128
  i.push.apply(i, n || []), s++, s === r && e(i);
@@ -143,26 +143,26 @@ function Xt(a, t, e) {
143
143
  }
144
144
  r([]);
145
145
  }
146
- function Le(a) {
146
+ function Ae(a) {
147
147
  var t = [];
148
148
  return Object.keys(a).forEach(function(e) {
149
149
  t.push.apply(t, a[e] || []);
150
150
  }), t;
151
151
  }
152
- var kt = /* @__PURE__ */ function(a) {
153
- ve(t, a);
152
+ var Bt = /* @__PURE__ */ function(a) {
153
+ Re(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
159
  }(/* @__PURE__ */ Ct(Error));
160
- function Ae(a, t, e, i, s) {
160
+ function Te(a, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(x, g) {
163
163
  var p = function(y) {
164
- return i(y), y.length ? g(new kt(y, bt(y))) : x(s);
165
- }, u = Le(a);
164
+ return i(y), y.length ? g(new Bt(y, bt(y))) : x(s);
165
+ }, u = Ae(a);
166
166
  Xt(u, e, p);
167
167
  });
168
168
  return r.catch(function(x) {
@@ -172,21 +172,21 @@ function Ae(a, t, e, i, s) {
172
172
  var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
173
173
  var p = function(w) {
174
174
  if (d.push.apply(d, w), c++, c === h)
175
- return i(d), d.length ? g(new kt(d, bt(d))) : x(s);
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
178
  var w = a[u];
179
- o.indexOf(u) !== -1 ? Xt(w, e, p) : Se(w, e, p);
179
+ o.indexOf(u) !== -1 ? Xt(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 Te(a) {
186
+ function Me(a) {
187
187
  return !!(a && a.message !== void 0);
188
188
  }
189
- function Me(a, t) {
189
+ function He(a, t) {
190
190
  for (var e = a, i = 0; i < t.length; i++) {
191
191
  if (e == null)
192
192
  return e;
@@ -194,31 +194,31 @@ function Me(a, t) {
194
194
  }
195
195
  return e;
196
196
  }
197
- function Nt(a, t) {
197
+ function Ft(a, t) {
198
198
  return function(e) {
199
199
  var i;
200
- return a.fullFields ? i = Me(t, a.fullFields) : i = t[e.field || a.fullField], Te(e) ? (e.field = e.field || a.fullField, e.fieldValue = i, e) : {
200
+ return a.fullFields ? i = He(t, a.fullFields) : i = t[e.field || a.fullField], Me(e) ? (e.field = e.field || a.fullField, e.fieldValue = i, e) : {
201
201
  message: typeof e == "function" ? e() : e,
202
202
  fieldValue: i,
203
203
  field: e.field || a.fullField
204
204
  };
205
205
  };
206
206
  }
207
- function Bt(a, t) {
207
+ function kt(a, 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 a[e] == "object" ? a[e] = G({}, a[e], i) : a[e] = i;
212
+ typeof i == "object" && typeof a[e] == "object" ? a[e] = q({}, a[e], i) : a[e] = i;
213
213
  }
214
214
  }
215
215
  return a;
216
216
  }
217
- var Ut = function(t, e, i, s, r, o) {
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));
219
- }, He = function(t, e, i, s, r) {
219
+ }, De = function(t, e, i, s, r) {
220
220
  (/^\s+$/.test(e) || e === "") && s.push(D(r.messages.whitespace, t.fullField));
221
- }, ct, De = function() {
221
+ }, ct, Ne = function() {
222
222
  if (ct)
223
223
  return ct;
224
224
  var a = "[a-fA-F\\d:]", t = function(C) {
@@ -287,26 +287,26 @@ var Ut = function(t, e, i, s, r, o) {
287
287
  return typeof t == "string" && t.length <= 320 && !!t.match(Kt.email);
288
288
  },
289
289
  url: function(t) {
290
- return typeof t == "string" && t.length <= 2048 && !!t.match(De());
290
+ return typeof t == "string" && t.length <= 2048 && !!t.match(Ne());
291
291
  },
292
292
  hex: function(t) {
293
293
  return typeof t == "string" && !!t.match(Kt.hex);
294
294
  }
295
- }, Fe = function(t, e, i, s, r) {
295
+ }, Xe = function(t, e, i, s, r) {
296
296
  if (t.required && e === void 0) {
297
- Ut(t, e, i, s, r);
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
- }, Xe = function(t, e, i, s, r) {
302
+ }, Be = function(t, e, i, s, r) {
303
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
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
- }, j = "enum", ke = function(t, e, i, s, r) {
307
+ }, j = "enum", Fe = 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
- }, Ne = function(t, e, i, s, r) {
309
+ }, ke = function(t, e, i, s, r) {
310
310
  if (t.pattern) {
311
311
  if (t.pattern instanceof RegExp)
312
312
  t.pattern.lastIndex = 0, t.pattern.test(e) || s.push(D(r.messages.pattern.mismatch, t.fullField, e, t.pattern));
@@ -316,13 +316,13 @@ var Ut = function(t, e, i, s, r, o) {
316
316
  }
317
317
  }
318
318
  }, _ = {
319
- required: Ut,
320
- whitespace: He,
321
- type: Fe,
322
- range: Xe,
323
- enum: ke,
324
- pattern: Ne
325
- }, Be = function(t, e, i, s, r) {
319
+ required: Zt,
320
+ whitespace: De,
321
+ type: Xe,
322
+ range: Be,
323
+ enum: Fe,
324
+ pattern: ke
325
+ }, Ke = function(t, e, i, s, r) {
326
326
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
327
327
  if (n) {
328
328
  if (H(e, "string") && !t.required)
@@ -330,7 +330,7 @@ var Ut = function(t, e, i, s, r, o) {
330
330
  _.required(t, e, s, o, r, "string"), H(e, "string") || (_.type(t, e, s, o, r), _.range(t, e, s, o, r), _.pattern(t, e, s, o, r), t.whitespace === !0 && _.whitespace(t, e, s, o, r));
331
331
  }
332
332
  i(o);
333
- }, Ke = function(t, e, i, s, r) {
333
+ }, Ye = function(t, e, i, s, r) {
334
334
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
335
335
  if (n) {
336
336
  if (H(e) && !t.required)
@@ -338,7 +338,7 @@ var Ut = function(t, e, i, s, r, o) {
338
338
  _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
339
339
  }
340
340
  i(o);
341
- }, Ye = function(t, e, i, s, r) {
341
+ }, Ve = function(t, e, i, s, r) {
342
342
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
343
343
  if (n) {
344
344
  if (e === "" && (e = void 0), H(e) && !t.required)
@@ -346,7 +346,7 @@ var Ut = function(t, e, i, s, r, o) {
346
346
  _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
347
347
  }
348
348
  i(o);
349
- }, Ve = function(t, e, i, s, r) {
349
+ }, We = function(t, e, i, s, r) {
350
350
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
351
351
  if (n) {
352
352
  if (H(e) && !t.required)
@@ -354,7 +354,7 @@ var Ut = function(t, e, i, s, r, o) {
354
354
  _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
355
355
  }
356
356
  i(o);
357
- }, We = function(t, e, i, s, r) {
357
+ }, Pe = function(t, e, i, s, r) {
358
358
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
359
359
  if (n) {
360
360
  if (H(e) && !t.required)
@@ -362,7 +362,7 @@ var Ut = function(t, e, i, s, r, o) {
362
362
  _.required(t, e, s, o, r), H(e) || _.type(t, e, s, o, r);
363
363
  }
364
364
  i(o);
365
- }, Pe = function(t, e, i, s, r) {
365
+ }, ze = function(t, e, i, s, r) {
366
366
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
367
367
  if (n) {
368
368
  if (H(e) && !t.required)
@@ -370,7 +370,7 @@ var Ut = function(t, e, i, s, r, o) {
370
370
  _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
371
371
  }
372
372
  i(o);
373
- }, ze = function(t, e, i, s, r) {
373
+ }, $e = function(t, e, i, s, r) {
374
374
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
375
375
  if (n) {
376
376
  if (H(e) && !t.required)
@@ -378,7 +378,7 @@ var Ut = function(t, e, i, s, r, o) {
378
378
  _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
379
379
  }
380
380
  i(o);
381
- }, $e = function(t, e, i, s, r) {
381
+ }, qe = function(t, e, i, s, r) {
382
382
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
383
383
  if (n) {
384
384
  if (e == null && !t.required)
@@ -394,15 +394,15 @@ var Ut = function(t, e, i, s, r, o) {
394
394
  _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
395
395
  }
396
396
  i(o);
397
- }, qe = "enum", je = function(t, e, i, s, r) {
397
+ }, je = "enum", Ue = function(t, e, i, s, r) {
398
398
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
399
399
  if (n) {
400
400
  if (H(e) && !t.required)
401
401
  return i();
402
- _.required(t, e, s, o, r), e !== void 0 && _[qe](t, e, s, o, r);
402
+ _.required(t, e, s, o, r), e !== void 0 && _[je](t, e, s, o, r);
403
403
  }
404
404
  i(o);
405
- }, Ue = function(t, e, i, s, r) {
405
+ }, Ze = function(t, e, i, s, r) {
406
406
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
407
407
  if (n) {
408
408
  if (H(e, "string") && !t.required)
@@ -410,7 +410,7 @@ var Ut = function(t, e, i, s, r, o) {
410
410
  _.required(t, e, s, o, r), H(e, "string") || _.pattern(t, e, s, o, r);
411
411
  }
412
412
  i(o);
413
- }, Ze = function(t, e, i, s, r) {
413
+ }, Je = function(t, e, i, s, r) {
414
414
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
415
415
  if (n) {
416
416
  if (H(e, "date") && !t.required)
@@ -421,7 +421,7 @@ var Ut = function(t, e, i, s, r, o) {
421
421
  }
422
422
  }
423
423
  i(o);
424
- }, Je = function(t, e, i, s, r) {
424
+ }, Qe = function(t, e, i, s, r) {
425
425
  var o = [], n = Array.isArray(e) ? "array" : typeof e;
426
426
  _.required(t, e, s, o, r, n), i(o);
427
427
  }, yt = function(t, e, i, s, r) {
@@ -432,7 +432,7 @@ var Ut = function(t, e, i, s, r, o) {
432
432
  _.required(t, e, s, n, r, o), H(e, o) || _.type(t, e, s, n, r);
433
433
  }
434
434
  i(n);
435
- }, Qe = function(t, e, i, s, r) {
435
+ }, ti = function(t, e, i, s, r) {
436
436
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
437
437
  if (n) {
438
438
  if (H(e) && !t.required)
@@ -441,23 +441,23 @@ var Ut = function(t, e, i, s, r, o) {
441
441
  }
442
442
  i(o);
443
443
  }, it = {
444
- string: Be,
445
- method: Ke,
446
- number: Ye,
447
- boolean: Ve,
448
- regexp: We,
449
- integer: Pe,
450
- float: ze,
451
- array: $e,
444
+ string: Ke,
445
+ method: Ye,
446
+ number: Ve,
447
+ boolean: We,
448
+ regexp: Pe,
449
+ integer: ze,
450
+ float: $e,
451
+ array: qe,
452
452
  object: Ge,
453
- enum: je,
454
- pattern: Ue,
455
- date: Ze,
453
+ enum: Ue,
454
+ pattern: Ze,
455
+ date: Je,
456
456
  url: yt,
457
457
  hex: yt,
458
458
  email: yt,
459
- required: Je,
460
- any: Qe
459
+ required: Qe,
460
+ any: ti
461
461
  };
462
462
  function vt() {
463
463
  return {
@@ -528,7 +528,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
528
528
  s.rules[r] = Array.isArray(o) ? o : [o];
529
529
  });
530
530
  }, t.messages = function(i) {
531
- return i && (this._messages = Bt(vt(), i)), this._messages;
531
+ return i && (this._messages = kt(vt(), i)), this._messages;
532
532
  }, t.validate = function(i, s, r) {
533
533
  var o = this;
534
534
  s === void 0 && (s = {}), r === void 0 && (r = function() {
@@ -551,7 +551,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
551
551
  }
552
552
  if (h.messages) {
553
553
  var f = this.messages();
554
- f === Rt && (f = vt()), Bt(f, h.messages), h.messages = f;
554
+ f === Rt && (f = vt()), kt(f, h.messages), h.messages = f;
555
555
  } else
556
556
  h.messages = this.messages();
557
557
  var x = {}, g = h.keys || Object.keys(this.rules);
@@ -559,9 +559,9 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
559
559
  var w = o.rules[u], y = n[u];
560
560
  w.forEach(function(E) {
561
561
  var m = E;
562
- typeof m.transform == "function" && (n === i && (n = G({}, n)), y = n[u] = m.transform(y)), typeof m == "function" ? m = {
562
+ typeof m.transform == "function" && (n === i && (n = q({}, n)), y = n[u] = m.transform(y)), typeof m == "function" ? m = {
563
563
  validator: m
564
- } : m = G({}, m), m.validator = o.getValidationMethod(m), m.validator && (m.field = u, m.fullField = m.fullField || u, m.type = o.getType(m), x[u] = x[u] || [], x[u].push({
564
+ } : m = q({}, m), m.validator = o.getValidationMethod(m), m.validator && (m.field = u, m.fullField = m.fullField || u, m.type = o.getType(m), x[u] = x[u] || [], x[u].push({
565
565
  rule: m,
566
566
  value: y,
567
567
  source: n,
@@ -570,11 +570,11 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
570
570
  });
571
571
  });
572
572
  var p = {};
573
- return Ae(x, h, function(u, w) {
573
+ return Te(x, h, function(u, w) {
574
574
  var y = u.rule, E = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
575
  E = E && (y.required || !y.required && u.value), y.field = u.field;
576
576
  function m(v, O) {
577
- return G({}, O, {
577
+ return q({}, O, {
578
578
  fullField: y.fullField + "." + v,
579
579
  fullFields: y.fullFields ? [].concat(y.fullFields, [v]) : [v]
580
580
  });
@@ -583,18 +583,18 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
583
583
  v === void 0 && (v = []);
584
584
  var O = Array.isArray(v) ? v : [v];
585
585
  !h.suppressWarning && O.length && a.warning("async-validator:", O), O.length && y.message !== void 0 && (O = [].concat(y.message));
586
- var S = O.map(Nt(y, n));
586
+ var S = O.map(Ft(y, n));
587
587
  if (h.first && S.length)
588
588
  return p[y.field] = 1, w(S);
589
589
  if (!E)
590
590
  w(S);
591
591
  else {
592
592
  if (y.required && !u.value)
593
- return y.message !== void 0 ? S = [].concat(y.message).map(Nt(y, n)) : h.error && (S = [h.error(y, D(h.messages.required, y.field))]), w(S);
593
+ return y.message !== void 0 ? S = [].concat(y.message).map(Ft(y, n)) : h.error && (S = [h.error(y, D(h.messages.required, y.field))]), w(S);
594
594
  var I = {};
595
595
  y.defaultField && Object.keys(u.value).map(function(L) {
596
596
  I[L] = y.defaultField;
597
- }), I = G({}, I, u.rule.fields);
597
+ }), I = q({}, I, u.rule.fields);
598
598
  var R = {};
599
599
  Object.keys(I).forEach(function(L) {
600
600
  var M = I[L], T = Array.isArray(M) ? M : [M];
@@ -644,16 +644,16 @@ nt.register = function(t, e) {
644
644
  throw new Error("Cannot register a validator by type, validator is not a function");
645
645
  it[t] = e;
646
646
  };
647
- nt.warning = jt;
647
+ nt.warning = Ut;
648
648
  nt.messages = Rt;
649
649
  nt.validators = it;
650
- function Zt() {
650
+ function Jt() {
651
651
  return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(a) {
652
652
  const t = Math.random() * 16 | 0;
653
653
  return (a === "x" ? t : t & 3 | 8).toString(16);
654
654
  });
655
655
  }
656
- function Jt(a, t) {
656
+ function Qt(a, t) {
657
657
  let e = 0, i;
658
658
  return function(...s) {
659
659
  const r = (/* @__PURE__ */ new Date()).getTime(), o = r - e;
@@ -662,10 +662,10 @@ function Jt(a, t) {
662
662
  }, t - o));
663
663
  };
664
664
  }
665
- function Qt(a = []) {
666
- return a.length ? a.map((t) => Qt(t.children) + 1).sort((t, e) => e - t)[0] : 0;
665
+ function te(a = []) {
666
+ return a.length ? a.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
667
667
  }
668
- function ti(a = []) {
668
+ function ei(a = []) {
669
669
  let t = [], e = [], i = [];
670
670
  return a.forEach((s) => {
671
671
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
@@ -675,14 +675,14 @@ function ti(a = []) {
675
675
  ...i.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0))
676
676
  ];
677
677
  }
678
- function te(a = [], t = 1, e = 0) {
678
+ function ee(a = [], t = 1, e = 0) {
679
679
  return a.map((i) => {
680
680
  if (i.children) {
681
681
  let s = 0, r = i.fixed;
682
682
  i.children.forEach((n) => {
683
683
  n.fixed = r;
684
684
  });
685
- const o = te(i.children, t - 1, e + 1);
685
+ const o = ee(i.children, t - 1, e + 1);
686
686
  return o && o.forEach((n) => {
687
687
  s += n.colspan ?? 0;
688
688
  }), {
@@ -708,8 +708,8 @@ function It(a = []) {
708
708
  e.children ? t = t.concat(It(e.children)) : t.push(e);
709
709
  }), t;
710
710
  }
711
- const Yt = /^(\r\n|\n\r|\r|\n)/, ei = /^[^\t\r\n]+/, Vt = /^\t/;
712
- function ii(a) {
711
+ const Yt = /^(\r\n|\n\r|\r|\n)/, ii = /^[^\t\r\n]+/, Vt = /^\t/;
712
+ function si(a) {
713
713
  let t = [[""]];
714
714
  if (a.length === 0)
715
715
  return t;
@@ -729,14 +729,14 @@ function ii(a) {
729
729
  }
730
730
  r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (h) => new Array(Math.floor(h.length / 2)).fill('"').join(""));
731
731
  } else {
732
- const o = a.match(ei);
732
+ const o = a.match(ii);
733
733
  r = o ? o[0] : "", a = a.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 si(a) {
739
+ function ri(a) {
740
740
  let t, e, i, s, r = "", o;
741
741
  for (t = 0, e = a.length; t < e; t += 1) {
742
742
  for (s = a[t].length, i = 0; i < s; i += 1)
@@ -747,7 +747,7 @@ function si(a) {
747
747
  }
748
748
  return r;
749
749
  }
750
- function ee(a, t, e = []) {
750
+ function ie(a, t, e = []) {
751
751
  let i = 0;
752
752
  const s = [];
753
753
  return a.forEach((r, o) => {
@@ -759,15 +759,15 @@ function ee(a, t, e = []) {
759
759
  }
760
760
  }), s;
761
761
  }
762
- function ie(a, t) {
762
+ function se(a, t) {
763
763
  let e = "", i = "";
764
764
  const s = {};
765
765
  return t.forEach((r, o) => {
766
766
  o === 0 ? (e = r.key, i = r.key, s[r.key] = 1) : a[r.key] === a[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 ri(a, t, e = []) {
770
- const { visibleRows: i, rowIndex: s, headIndex: r } = a, o = ee(i, t, e);
769
+ function oi(a, t, e = []) {
770
+ const { visibleRows: i, rowIndex: s, headIndex: r } = a, o = ie(i, t, e);
771
771
  return o[s - r] === 0 ? {
772
772
  rowspan: 0,
773
773
  colspan: 0,
@@ -780,10 +780,10 @@ function ri(a, t, e = []) {
780
780
  mergeRow: !0
781
781
  };
782
782
  }
783
- function oi(a, t = []) {
783
+ function ni(a, t = []) {
784
784
  const { column: e, row: i, visibleLeafColumns: s } = a, r = s.filter((o) => t.includes(o.key));
785
785
  if (t.includes(e.key)) {
786
- const o = ie(i, r);
786
+ const o = se(i, r);
787
787
  return o[e.key] === 0 ? {
788
788
  rowspan: 0,
789
789
  colspan: 0,
@@ -797,7 +797,7 @@ function oi(a, t = []) {
797
797
  };
798
798
  }
799
799
  }
800
- class se {
800
+ class re {
801
801
  constructor(t, e, i, s, r, o, n) {
802
802
  l(this, "ctx");
803
803
  l(this, "x", 0);
@@ -843,7 +843,7 @@ class se {
843
843
  getRightFixedX() {
844
844
  }
845
845
  }
846
- class Tt extends se {
846
+ class Tt extends re {
847
847
  constructor(e, i, s, r, o, n, h, c, d, f = "body") {
848
848
  super(e, r, o, n, h, f, c.fixed);
849
849
  l(this, "formatter");
@@ -1256,13 +1256,30 @@ class Tt extends se {
1256
1256
  });
1257
1257
  }
1258
1258
  drawImage() {
1259
- this.drawImageSource && this.ctx.paint.drawImage(
1260
- this.drawImageSource,
1261
- this.drawImageX,
1262
- this.drawImageY,
1263
- this.drawImageWidth,
1264
- this.drawImageHeight
1265
- );
1259
+ if (this.drawImageSource) {
1260
+ if (this.hoverIconName) {
1261
+ const { CELL_HOVER_ICON_BG_COLOR: e, CELL_HOVER_ICON_BORDER_COLOR: i } = this.ctx.config;
1262
+ this.ctx.paint.drawRect(
1263
+ this.drawImageX - 2,
1264
+ this.drawImageY - 2,
1265
+ this.drawImageWidth + 4,
1266
+ this.drawImageHeight + 4,
1267
+ {
1268
+ borderColor: i,
1269
+ radius: 4,
1270
+ borderWidth: 1,
1271
+ fillColor: e
1272
+ }
1273
+ );
1274
+ }
1275
+ this.ctx.paint.drawImage(
1276
+ this.drawImageSource,
1277
+ this.drawImageX,
1278
+ this.drawImageY,
1279
+ this.drawImageWidth,
1280
+ this.drawImageHeight
1281
+ );
1282
+ }
1266
1283
  }
1267
1284
  drawSelector() {
1268
1285
  if (this.cellType === "footer")
@@ -1370,7 +1387,7 @@ class Tt extends se {
1370
1387
  }
1371
1388
  }
1372
1389
  }
1373
- class ni {
1390
+ class ai {
1374
1391
  //虚拟滚动位置
1375
1392
  constructor(t, e) {
1376
1393
  l(this, "loading", !1);
@@ -1423,7 +1440,7 @@ class ni {
1423
1440
  var w;
1424
1441
  let r = i._hasChildren || !1;
1425
1442
  Array.isArray(i.children) && i.children.length && (r = !0, this.initData(i.children, e + 1));
1426
- 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}` : Zt();
1443
+ 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();
1427
1444
  this.itemRowKeyMap.set(i, x);
1428
1445
  const g = i._height || h, p = i._readonly;
1429
1446
  let u = !0;
@@ -2162,8 +2179,8 @@ class ni {
2162
2179
  }, "");
2163
2180
  for (let R = e - 1; R >= 0; R--) {
2164
2181
  const A = this.rowIndexRowKeyMap.get(R) || "", L = h.reduce((M, T) => {
2165
- const N = this.getItemValue(A, T) ?? "";
2166
- return `${M}${N}`;
2182
+ const F = this.getItemValue(A, T) ?? "";
2183
+ return `${M}${F}`;
2167
2184
  }, "");
2168
2185
  if (I === L)
2169
2186
  w = R;
@@ -2172,8 +2189,8 @@ class ni {
2172
2189
  }
2173
2190
  for (let R = e; R <= this.ctx.maxRowIndex; R++) {
2174
2191
  const A = this.rowIndexRowKeyMap.get(R) || "", L = h.reduce((M, T) => {
2175
- const N = this.getItemValue(A, T) ?? "";
2176
- return `${M}${N}`;
2192
+ const F = this.getItemValue(A, T) ?? "";
2193
+ return `${M}${F}`;
2177
2194
  }, "");
2178
2195
  if (I === L)
2179
2196
  y = R;
@@ -2297,7 +2314,7 @@ class ni {
2297
2314
  return i;
2298
2315
  }
2299
2316
  }
2300
- class ai {
2317
+ class li {
2301
2318
  constructor(t) {
2302
2319
  l(this, "ctx");
2303
2320
  l(this, "history", []);
@@ -2352,7 +2369,7 @@ class ai {
2352
2369
  this.history = [], this.historyIndex = -1;
2353
2370
  }
2354
2371
  }
2355
- class li {
2372
+ class hi {
2356
2373
  constructor(t) {
2357
2374
  l(this, "eventTasks", /* @__PURE__ */ new Map());
2358
2375
  l(this, "ctx");
@@ -2370,7 +2387,7 @@ class li {
2370
2387
  this.ctx.emit("resetHeader", t), this.ctx.emit("resize", t);
2371
2388
  }
2372
2389
  handleMouseDown(t) {
2373
- t.button === 0 && (this.ctx.mousedown = !0), this.ctx.containerElement.focus(), this.ctx.emit("mousedown", t);
2390
+ t.button === 0 && (this.ctx.mousedown = !0), this.ctx.containerElement.focus({ preventScroll: !0 }), this.ctx.emit("mousedown", t);
2374
2391
  }
2375
2392
  handleMousemove(t) {
2376
2393
  this.ctx.emit("mousemove", t);
@@ -2419,7 +2436,7 @@ class li {
2419
2436
  t.removeEventListener(e, i), this.eventTasks.delete(e);
2420
2437
  }
2421
2438
  }
2422
- class hi {
2439
+ class ci {
2423
2440
  constructor() {
2424
2441
  l(this, "events", /* @__PURE__ */ new Map());
2425
2442
  }
@@ -2457,7 +2474,7 @@ class hi {
2457
2474
  this.events.clear();
2458
2475
  }
2459
2476
  }
2460
- class ci {
2477
+ class di {
2461
2478
  constructor(t) {
2462
2479
  l(this, "ctx");
2463
2480
  const e = t.getContext("2d");
@@ -2634,7 +2651,9 @@ class Wt {
2634
2651
  l(this, "CELL_WIDTH", 100);
2635
2652
  l(this, "CELL_HEIGHT", 36);
2636
2653
  l(this, "CELL_PADDING", 8);
2637
- l(this, "CELL_HOVER_ICON_SIZE", 20);
2654
+ l(this, "CELL_HOVER_ICON_SIZE", 14);
2655
+ l(this, "CELL_HOVER_ICON_BG_COLOR", "#fff");
2656
+ l(this, "CELL_HOVER_ICON_BORDER_COLOR", "#DDE0EA");
2638
2657
  l(this, "SCROLLER_TRACK_SIZE", 14);
2639
2658
  l(this, "SCROLLER_SIZE", 8);
2640
2659
  l(this, "SCROLLER_COLOR", "#dee0e3");
@@ -2736,7 +2755,8 @@ class Wt {
2736
2755
  Object.assign(this, t);
2737
2756
  }
2738
2757
  }
2739
- class di {
2758
+ const Pt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>';
2759
+ class fi {
2740
2760
  constructor(t) {
2741
2761
  l(this, "ctx");
2742
2762
  l(this, "list", [
@@ -2758,7 +2778,7 @@ class di {
2758
2778
  name: "shrink",
2759
2779
  configName: "CHECKBOX_UNCHECK_SVG",
2760
2780
  configColorName: "SHRINK_ICON_COLOR",
2761
- svg: '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>',
2781
+ svg: Pt,
2762
2782
  color: "#4E5969"
2763
2783
  },
2764
2784
  {
@@ -2799,6 +2819,19 @@ class di {
2799
2819
  configName: "CHECKBOX_DISABLED_SVG",
2800
2820
  svg: '<svg t="1722595946663" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4865" width="32" height="32"><path d="M128 640V384a256 256 0 0 1 256-256h256a256 256 0 0 1 256 256v256a256 256 0 0 1-256 256H384a256 256 0 0 1-256-256z" fill="#F1F2F4" p-id="4866"></path><path d="M128 640V384a256 256 0 0 1 256-256h256a256 256 0 0 1 256 256v256a256 256 0 0 1-256 256H384a256 256 0 0 1-256-256z m64 0q0 79.552 56.256 135.744Q304.448 832 384 832h256q79.552 0 135.744-56.256Q832 719.552 832 640V384q0-79.552-56.256-135.744Q719.552 192 640 192H384q-79.552 0-135.744 56.256Q192 304.448 192 384v256z" fill="#DDE0EA" p-id="4867"></path></svg>',
2801
2821
  color: ""
2822
+ },
2823
+ {
2824
+ name: "icon-edit",
2825
+ configName: "CHECKBOX_DISABLED_SVG",
2826
+ svg: '<svg t="1744798692576" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6606" width="200" height="200"><path d="M855.296 894.528H168.768v-76.8h686.528v76.8z m38.4-38.4q0 3.84-0.768 7.488-0.704 3.712-2.176 7.232-1.472 3.52-3.52 6.656-2.112 3.136-4.8 5.76-2.688 2.688-5.824 4.8-3.2 2.112-6.656 3.584-3.456 1.408-7.168 2.176-3.712 0.704-7.488 0.704-3.84 0-7.488-0.704-3.712-0.768-7.232-2.176-3.52-1.472-6.656-3.584-3.136-2.112-5.76-4.736-2.688-2.688-4.8-5.824-2.112-3.2-3.584-6.656-1.408-3.52-2.176-7.232-0.704-3.648-0.704-7.488 0-3.776 0.704-7.488 0.768-3.712 2.176-7.168 1.472-3.52 3.584-6.656 2.112-3.136 4.736-5.76 2.688-2.752 5.824-4.8 3.2-2.112 6.656-3.584 3.52-1.472 7.232-2.176 3.712-0.768 7.488-0.768 3.776 0 7.488 0.768 3.712 0.704 7.168 2.176 3.52 1.472 6.656 3.584 3.2 2.048 5.76 4.736 2.752 2.688 4.864 5.824 2.048 3.2 3.52 6.656 1.472 3.456 2.176 7.168 0.768 3.712 0.768 7.488z m-686.528 0q0 3.84-0.768 7.488-0.704 3.712-2.176 7.232-1.472 3.52-3.52 6.656-2.112 3.136-4.8 5.76-2.688 2.688-5.76 4.8-3.2 2.112-6.72 3.584-3.456 1.408-7.168 2.176-3.712 0.704-7.488 0.704-3.84 0-7.488-0.704-3.712-0.768-7.232-2.176-3.456-1.472-6.656-3.584-3.136-2.112-5.76-4.736-2.688-2.688-4.8-5.824-2.112-3.2-3.584-6.656-1.408-3.52-2.176-7.232-0.704-3.648-0.704-7.488 0-3.776 0.704-7.488 0.768-3.712 2.176-7.168 1.472-3.52 3.584-6.656 2.112-3.136 4.736-5.76 2.688-2.752 5.824-4.8 3.2-2.112 6.656-3.584 3.52-1.472 7.232-2.176 3.712-0.768 7.488-0.768 3.776 0 7.488 0.768 3.712 0.704 7.168 2.176 3.52 1.472 6.656 3.584 3.2 2.048 5.824 4.736 2.688 2.688 4.8 5.824 2.048 3.2 3.52 6.656 1.472 3.456 2.176 7.168 0.768 3.712 0.768 7.488zM652.032 211.2l-369.92 370.368v89.344h90.048l369.664-369.856L652.032 211.2z m-54.4-54.272q22.528-22.528 54.4-22.528 31.808 0 54.336 22.528l89.792 89.856q22.464 22.464 22.464 54.272t-22.464 54.272l-369.664 369.856q-22.464 22.528-54.336 22.528H282.24q-31.808 0-54.336-22.528-22.464-22.464-22.464-54.272V581.568q0-31.808 22.4-54.272l369.92-370.368z" p-id="6607"></path></svg>',
2827
+ color: "#4E5969"
2828
+ },
2829
+ {
2830
+ name: "icon-select",
2831
+ configName: "CHECKBOX_UNCHECK_SVG",
2832
+ configColorName: "SHRINK_ICON_COLOR",
2833
+ svg: Pt,
2834
+ color: "#4E5969"
2802
2835
  }
2803
2836
  ]);
2804
2837
  l(this, "icons", /* @__PURE__ */ new Map());
@@ -2850,7 +2883,7 @@ class di {
2850
2883
  return this.icons.get(t);
2851
2884
  }
2852
2885
  }
2853
- class re extends se {
2886
+ class oe extends re {
2854
2887
  constructor(e, i, s, r, o, n, h) {
2855
2888
  super(e, s, r, o, n, "header", h.fixed);
2856
2889
  l(this, "align");
@@ -2887,7 +2920,7 @@ class re extends se {
2887
2920
  l(this, "drawImageHeight", 0);
2888
2921
  l(this, "drawImageName", "");
2889
2922
  l(this, "drawImageSource");
2890
- this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, this.type = h.type || "", this.editorType = h.editorType || "text", this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level || 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 = Zt(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2923
+ this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, this.type = h.type || "", this.editorType = h.editorType || "text", this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level || 0, this.operation = h.operation || !1, this.text = h.title, this.column = h, this.colspan = h.colspan || 1, this.widthFillDisable = h.widthFillDisable || !1, this.rowspan = h.rowspan || 1, this.rules = h.rules, this.readonly = h.readonly || !1, this.required = h.required || !1, this.rowKey = Jt(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2891
2924
  }
2892
2925
  /**
2893
2926
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -2978,7 +3011,7 @@ class re extends se {
2978
3011
  };
2979
3012
  }
2980
3013
  }
2981
- class fi {
3014
+ class xi {
2982
3015
  constructor(t) {
2983
3016
  l(this, "ctx");
2984
3017
  l(this, "visibleHoverCell");
@@ -3056,7 +3089,7 @@ class fi {
3056
3089
  */
3057
3090
  selectionClick(t) {
3058
3091
  if (["selection", "index-selection"].includes(t.type) && this.ctx.isPointer)
3059
- if (t instanceof re)
3092
+ if (t instanceof oe)
3060
3093
  t.drawImageName === "checkbox-uncheck" || t.drawImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
3061
3094
  else {
3062
3095
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -3143,7 +3176,7 @@ class fi {
3143
3176
  this.resizeObserver.unobserve(this.ctx.stageElement);
3144
3177
  }
3145
3178
  }
3146
- class xi {
3179
+ class ui {
3147
3180
  constructor(t, e) {
3148
3181
  l(this, "eventBus");
3149
3182
  l(this, "eventBrowser");
@@ -3257,7 +3290,7 @@ class xi {
3257
3290
  emptyElement: h,
3258
3291
  contextMenuElement: c
3259
3292
  } = t;
3260
- 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 hi(), this.eventBrowser = new li(this), this.eventTable = new fi(this), this.paint = new ci(this.canvasElement), this.database = new ni(this, e), this.history = new ai(this), this.icons = new di(this);
3293
+ 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 ci(), this.eventBrowser = new hi(this), this.eventTable = new xi(this), this.paint = new di(this.canvasElement), this.database = new ai(this, e), this.history = new li(this), this.icons = new fi(this);
3261
3294
  }
3262
3295
  setConfig(t) {
3263
3296
  this.config = new Wt(t);
@@ -3374,7 +3407,7 @@ class xi {
3374
3407
  this.eventTable.destroy(), this.eventBrowser.destroy(), this.eventBus.destroy();
3375
3408
  }
3376
3409
  }
3377
- class Pt {
3410
+ class zt {
3378
3411
  constructor(t, e) {
3379
3412
  l(this, "ctx");
3380
3413
  l(this, "type");
@@ -3501,12 +3534,12 @@ class Pt {
3501
3534
  }), this.ctx.scrollerFocus = this.isFocus;
3502
3535
  }
3503
3536
  }
3504
- class ui {
3537
+ class gi {
3505
3538
  constructor(t) {
3506
3539
  l(this, "ctx");
3507
3540
  l(this, "verticalScrollbar");
3508
3541
  l(this, "horizontalScrollbar");
3509
- this.ctx = t, this.verticalScrollbar = new Pt(t, "vertical"), this.horizontalScrollbar = new Pt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
3542
+ this.ctx = t, this.verticalScrollbar = new zt(t, "vertical"), this.horizontalScrollbar = new zt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
3510
3543
  this.onTouchstart(e);
3511
3544
  }), this.ctx.on("setScroll", (e, i) => {
3512
3545
  this.setScroll(e, i);
@@ -3565,7 +3598,7 @@ class ui {
3565
3598
  this.setScrollY(r - e.visibleHeight / 2);
3566
3599
  }
3567
3600
  }
3568
- class gi {
3601
+ class wi {
3569
3602
  constructor(t) {
3570
3603
  l(this, "ctx");
3571
3604
  // 上下文
@@ -3604,7 +3637,7 @@ class gi {
3604
3637
  l(this, "renderFixedCellHeaders", []);
3605
3638
  this.ctx = t, this.ctx.on(
3606
3639
  "resetHeader",
3607
- Jt(() => {
3640
+ Qt(() => {
3608
3641
  this.init(), this.ctx.emit("draw");
3609
3642
  }, 100)
3610
3643
  ), this.init(), this.initResizeColumn();
@@ -3614,9 +3647,9 @@ class gi {
3614
3647
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3615
3648
  } = this.ctx, i = this.ctx.database.getColumns();
3616
3649
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3617
- const s = Qt(i), r = It(i);
3650
+ const s = te(i), r = It(i);
3618
3651
  this.height = t * s, this.width = r.reduce((f, x) => f + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
3619
- const o = ti(te(i, s));
3652
+ const o = ei(ee(i, s));
3620
3653
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3621
3654
  const n = this.ctx.containerElement.getBoundingClientRect();
3622
3655
  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 - 0.5 + "px", this.visibleWidth = this.ctx.stageWidth - e;
@@ -3718,7 +3751,7 @@ class gi {
3718
3751
  const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
3719
3752
  let d = n.width || 100;
3720
3753
  n.children && (d = It(n.children).reduce((g, p) => g + ((p == null ? void 0 : p.width) || 100), 0));
3721
- const f = new re(this.ctx, this.columnIndex, s, c, d, h, n);
3754
+ const f = new oe(this.ctx, this.columnIndex, s, c, d, h, n);
3722
3755
  this.ctx.database.setHeader(n.key, f), this.allCellHeaders.push(f), n.children || (this.leafCellHeaders.push(f), f.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(f) : n.fixed === "right" ? this.fixedRightCellHeaders.push(f) : this.centerCellHeaders.push(f), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += d;
3723
3756
  }
3724
3757
  }
@@ -3792,7 +3825,7 @@ class gi {
3792
3825
  }), this.drawTipLine(), this.drawBottomLine();
3793
3826
  }
3794
3827
  }
3795
- class oe {
3828
+ class ne {
3796
3829
  constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, h = "body") {
3797
3830
  l(this, "ctx");
3798
3831
  l(this, "x", 0);
@@ -3847,7 +3880,7 @@ class oe {
3847
3880
  });
3848
3881
  }
3849
3882
  }
3850
- class wi {
3883
+ class pi {
3851
3884
  constructor(t) {
3852
3885
  l(this, "resizeTarget", null);
3853
3886
  //调整行大小的目标
@@ -4049,7 +4082,7 @@ class wi {
4049
4082
  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;
4050
4083
  const d = [];
4051
4084
  for (let f = 0; f < this.visibleRows.length; f++) {
4052
- const x = this.headIndex + f, g = this.visibleRows[f], { height: p, top: u } = this.ctx.database.getPositionForRowIndex(x), w = new oe(this.ctx, x, 0, u + this.y, t.width, p, g);
4085
+ 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);
4053
4086
  d.push(w);
4054
4087
  }
4055
4088
  this.renderRows = d, this.ctx.body.renderRows = d;
@@ -4066,7 +4099,7 @@ class wi {
4066
4099
  }), this.drawTipLine();
4067
4100
  }
4068
4101
  }
4069
- class pi {
4102
+ class yi {
4070
4103
  constructor(t) {
4071
4104
  l(this, "ctx");
4072
4105
  l(this, "renderRows", []);
@@ -4121,7 +4154,7 @@ class pi {
4121
4154
  let e = this.y;
4122
4155
  const i = [];
4123
4156
  this.data.forEach((s, r) => {
4124
- const o = new oe(this.ctx, r, 0, e, this.width, t, s, "footer");
4157
+ const o = new ne(this.ctx, r, 0, e, this.width, t, s, "footer");
4125
4158
  e += t, i.push(o);
4126
4159
  }), this.renderRows = i, this.ctx.footer.renderRows = this.renderRows;
4127
4160
  }
@@ -4147,7 +4180,7 @@ class pi {
4147
4180
  }), this.drawTopLine();
4148
4181
  }
4149
4182
  }
4150
- class yi {
4183
+ class mi {
4151
4184
  // 垂直滚动定时器
4152
4185
  constructor(t) {
4153
4186
  l(this, "isCut", !1);
@@ -4166,7 +4199,7 @@ class yi {
4166
4199
  this.moveFocus(t);
4167
4200
  }), this.ctx.on(
4168
4201
  "mousemove",
4169
- Jt((t) => {
4202
+ Qt((t) => {
4170
4203
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = this.ctx.isTarget(t) && i > 0 && i < this.ctx.body.visibleWidth && e > this.ctx.header.visibleHeight && e < this.ctx.header.visibleHeight + this.ctx.body.visibleHeight;
4171
4204
  (this.ctx.selectorMove || this.ctx.autofillMove) && (!s && !this.mousedownHeader ? this.startAdjustPosition(t) : this.stopAdjustPosition());
4172
4205
  }, 100)
@@ -4271,7 +4304,7 @@ class yi {
4271
4304
  let [y, E] = r, [m, C] = o;
4272
4305
  if (y < g || E > p || m < u || C > w)
4273
4306
  return;
4274
- if (this.ctx.stageElement.focus(), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4307
+ if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4275
4308
  const v = this.adjustMergeCells(r, o);
4276
4309
  m = v.yArr[0], C = v.yArr[1], y = v.xArr[0], E = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
4277
4310
  }
@@ -4455,7 +4488,7 @@ class yi {
4455
4488
  return;
4456
4489
  t = n.data;
4457
4490
  }
4458
- const r = si(t);
4491
+ const r = ri(t);
4459
4492
  navigator.clipboard ? navigator.clipboard.writeText(r).then(() => {
4460
4493
  this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
4461
4494
  xArr: this.ctx.selector.xArrCopy,
@@ -4500,7 +4533,7 @@ class yi {
4500
4533
  if (this.ctx.selector.enable && t) {
4501
4534
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4502
4535
  navigator.clipboard.readText().then(async (r) => {
4503
- let o = ii(r);
4536
+ let o = si(r);
4504
4537
  const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], c = o.length === 1 && o[0].length === 1;
4505
4538
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !c) {
4506
4539
  const g = {
@@ -4666,7 +4699,7 @@ class yi {
4666
4699
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
4667
4700
  }
4668
4701
  }
4669
- class mi {
4702
+ class Ei {
4670
4703
  constructor(t) {
4671
4704
  l(this, "ctx");
4672
4705
  l(this, "maxColRowCell");
@@ -4812,12 +4845,12 @@ class mi {
4812
4845
  const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
4813
4846
  x: a,
4814
4847
  y: a
4815
- }), Ei = {
4848
+ }), Ci = {
4816
4849
  left: "right",
4817
4850
  right: "left",
4818
4851
  bottom: "top",
4819
4852
  top: "bottom"
4820
- }, Ci = {
4853
+ }, bi = {
4821
4854
  start: "end",
4822
4855
  end: "start"
4823
4856
  };
@@ -4827,38 +4860,38 @@ function _t(a, t, e) {
4827
4860
  function at(a, t) {
4828
4861
  return typeof a == "function" ? a(t) : a;
4829
4862
  }
4830
- function q(a) {
4863
+ function G(a) {
4831
4864
  return a.split("-")[0];
4832
4865
  }
4833
4866
  function lt(a) {
4834
4867
  return a.split("-")[1];
4835
4868
  }
4836
- function ne(a) {
4869
+ function ae(a) {
4837
4870
  return a === "x" ? "y" : "x";
4838
4871
  }
4839
4872
  function Mt(a) {
4840
4873
  return a === "y" ? "height" : "width";
4841
4874
  }
4842
4875
  function J(a) {
4843
- return ["top", "bottom"].includes(q(a)) ? "y" : "x";
4876
+ return ["top", "bottom"].includes(G(a)) ? "y" : "x";
4844
4877
  }
4845
4878
  function Ht(a) {
4846
- return ne(J(a));
4879
+ return ae(J(a));
4847
4880
  }
4848
- function bi(a, t, e) {
4881
+ function vi(a, t, e) {
4849
4882
  e === void 0 && (e = !1);
4850
4883
  const i = lt(a), s = Ht(a), r = Mt(s);
4851
4884
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4852
4885
  return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4853
4886
  }
4854
- function vi(a) {
4887
+ function Ri(a) {
4855
4888
  const t = xt(a);
4856
4889
  return [Ot(a), t, Ot(t)];
4857
4890
  }
4858
4891
  function Ot(a) {
4859
- return a.replace(/start|end/g, (t) => Ci[t]);
4892
+ return a.replace(/start|end/g, (t) => bi[t]);
4860
4893
  }
4861
- function Ri(a, t, e) {
4894
+ function Ii(a, t, e) {
4862
4895
  const i = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], o = ["bottom", "top"];
4863
4896
  switch (a) {
4864
4897
  case "top":
@@ -4871,15 +4904,15 @@ function Ri(a, t, e) {
4871
4904
  return [];
4872
4905
  }
4873
4906
  }
4874
- function Ii(a, t, e, i) {
4907
+ function _i(a, t, e, i) {
4875
4908
  const s = lt(a);
4876
- let r = Ri(q(a), e === "start", i);
4909
+ let r = Ii(G(a), e === "start", i);
4877
4910
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4878
4911
  }
4879
4912
  function xt(a) {
4880
- return a.replace(/left|right|bottom|top/g, (t) => Ei[t]);
4913
+ return a.replace(/left|right|bottom|top/g, (t) => Ci[t]);
4881
4914
  }
4882
- function _i(a) {
4915
+ function Oi(a) {
4883
4916
  return {
4884
4917
  top: 0,
4885
4918
  right: 0,
@@ -4888,8 +4921,8 @@ function _i(a) {
4888
4921
  ...a
4889
4922
  };
4890
4923
  }
4891
- function ae(a) {
4892
- return typeof a != "number" ? _i(a) : {
4924
+ function le(a) {
4925
+ return typeof a != "number" ? Oi(a) : {
4893
4926
  top: a,
4894
4927
  right: a,
4895
4928
  bottom: a,
@@ -4914,12 +4947,12 @@ function ut(a) {
4914
4947
  y: e
4915
4948
  };
4916
4949
  }
4917
- function zt(a, t, e) {
4950
+ function $t(a, t, e) {
4918
4951
  let {
4919
4952
  reference: i,
4920
4953
  floating: s
4921
4954
  } = a;
4922
- const r = J(t), o = Ht(t), n = Mt(o), h = q(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;
4955
+ 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;
4923
4956
  let g;
4924
4957
  switch (h) {
4925
4958
  case "top":
@@ -4962,7 +4995,7 @@ function zt(a, t, e) {
4962
4995
  }
4963
4996
  return g;
4964
4997
  }
4965
- const Oi = async (a, t, e) => {
4998
+ const Si = async (a, t, e) => {
4966
4999
  const {
4967
5000
  placement: i = "bottom",
4968
5001
  strategy: s = "absolute",
@@ -4976,7 +5009,7 @@ const Oi = async (a, t, e) => {
4976
5009
  }), {
4977
5010
  x: d,
4978
5011
  y: f
4979
- } = zt(c, i, h), x = i, g = {}, p = 0;
5012
+ } = $t(c, i, h), x = i, g = {}, p = 0;
4980
5013
  for (let u = 0; u < n.length; u++) {
4981
5014
  const {
4982
5015
  name: w,
@@ -5013,7 +5046,7 @@ const Oi = async (a, t, e) => {
5013
5046
  }) : b.rects), {
5014
5047
  x: d,
5015
5048
  y: f
5016
- } = zt(c, x, h)), u = -1);
5049
+ } = $t(c, x, h)), u = -1);
5017
5050
  }
5018
5051
  return {
5019
5052
  x: d,
@@ -5023,7 +5056,7 @@ const Oi = async (a, t, e) => {
5023
5056
  middlewareData: g
5024
5057
  };
5025
5058
  };
5026
- async function le(a, t) {
5059
+ async function he(a, t) {
5027
5060
  var e;
5028
5061
  t === void 0 && (t = {});
5029
5062
  const {
@@ -5039,7 +5072,7 @@ async function le(a, t) {
5039
5072
  elementContext: f = "floating",
5040
5073
  altBoundary: x = !1,
5041
5074
  padding: g = 0
5042
- } = at(t, a), p = ae(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], y = ut(await r.getClippingRect({
5075
+ } = at(t, a), p = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], y = ut(await r.getClippingRect({
5043
5076
  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)),
5044
5077
  boundary: c,
5045
5078
  rootBoundary: d,
@@ -5068,7 +5101,7 @@ async function le(a, t) {
5068
5101
  right: (b.right - y.right + p.right) / C.x
5069
5102
  };
5070
5103
  }
5071
- const Si = (a) => ({
5104
+ const Li = (a) => ({
5072
5105
  name: "arrow",
5073
5106
  options: a,
5074
5107
  async fn(t) {
@@ -5086,26 +5119,26 @@ const Si = (a) => ({
5086
5119
  } = at(a, t) || {};
5087
5120
  if (c == null)
5088
5121
  return {};
5089
- const f = ae(d), x = {
5122
+ const f = le(d), x = {
5090
5123
  x: e,
5091
5124
  y: i
5092
5125
  }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", y = w ? "top" : "left", E = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", C = r.reference[p] + r.reference[g] - x[g] - r.floating[p], b = x[g] - r.reference[g], v = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5093
5126
  let O = v ? v[m] : 0;
5094
5127
  (!O || !await (o.isElement == null ? void 0 : o.isElement(v))) && (O = n.floating[m] || r.floating[p]);
5095
- const S = C / 2 - b / 2, I = O / 2 - u[p] / 2 - 1, R = rt(f[y], I), A = rt(f[E], I), L = R, M = O - u[p] - A, T = O / 2 - u[p] / 2 + S, N = _t(L, T, M), Y = !h.arrow && lt(s) != null && T !== N && r.reference[p] / 2 - (T < L ? R : A) - u[p] / 2 < 0, B = Y ? T < L ? T - L : T - M : 0;
5128
+ const S = C / 2 - b / 2, I = O / 2 - u[p] / 2 - 1, R = rt(f[y], I), A = rt(f[E], I), L = R, M = O - u[p] - A, T = O / 2 - u[p] / 2 + S, F = _t(L, T, M), Y = !h.arrow && lt(s) != null && T !== F && r.reference[p] / 2 - (T < L ? R : A) - u[p] / 2 < 0, k = Y ? T < L ? T - L : T - M : 0;
5096
5129
  return {
5097
- [g]: x[g] + B,
5130
+ [g]: x[g] + k,
5098
5131
  data: {
5099
- [g]: N,
5100
- centerOffset: T - N - B,
5132
+ [g]: F,
5133
+ centerOffset: T - F - k,
5101
5134
  ...Y && {
5102
- alignmentOffset: B
5135
+ alignmentOffset: k
5103
5136
  }
5104
5137
  },
5105
5138
  reset: Y
5106
5139
  };
5107
5140
  }
5108
- }), Li = function(a) {
5141
+ }), Ai = function(a) {
5109
5142
  return a === void 0 && (a = {}), {
5110
5143
  name: "flip",
5111
5144
  options: a,
@@ -5129,12 +5162,12 @@ const Si = (a) => ({
5129
5162
  } = at(a, t);
5130
5163
  if ((e = r.arrow) != null && e.alignmentOffset)
5131
5164
  return {};
5132
- const y = q(s), E = J(n), m = q(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), b = x || (m || !u ? [xt(n)] : vi(n)), v = p !== "none";
5133
- !x && v && b.push(...Ii(n, u, p, C));
5134
- const O = [n, ...b], S = await le(t, w), I = [];
5165
+ const y = G(s), E = J(n), m = G(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), b = x || (m || !u ? [xt(n)] : Ri(n)), v = p !== "none";
5166
+ !x && v && b.push(..._i(n, u, p, C));
5167
+ const O = [n, ...b], S = await he(t, w), I = [];
5135
5168
  let R = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5136
5169
  if (d && I.push(S[y]), f) {
5137
- const T = bi(s, o, C);
5170
+ const T = vi(s, o, C);
5138
5171
  I.push(S[T[0]], S[T[1]]);
5139
5172
  }
5140
5173
  if (R = [...R, {
@@ -5142,23 +5175,23 @@ const Si = (a) => ({
5142
5175
  overflows: I
5143
5176
  }], !I.every((T) => T <= 0)) {
5144
5177
  var A, L;
5145
- const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, N = O[T];
5146
- if (N)
5178
+ const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, F = O[T];
5179
+ if (F)
5147
5180
  return {
5148
5181
  data: {
5149
5182
  index: T,
5150
5183
  overflows: R
5151
5184
  },
5152
5185
  reset: {
5153
- placement: N
5186
+ placement: F
5154
5187
  }
5155
5188
  };
5156
- let Y = (L = R.filter((B) => B.overflows[0] <= 0).sort((B, W) => B.overflows[1] - W.overflows[1])[0]) == null ? void 0 : L.placement;
5189
+ let Y = (L = R.filter((k) => k.overflows[0] <= 0).sort((k, W) => k.overflows[1] - W.overflows[1])[0]) == null ? void 0 : L.placement;
5157
5190
  if (!Y)
5158
5191
  switch (g) {
5159
5192
  case "bestFit": {
5160
5193
  var M;
5161
- const B = (M = R.filter((W) => {
5194
+ const k = (M = R.filter((W) => {
5162
5195
  if (v) {
5163
5196
  const P = J(W.placement);
5164
5197
  return P === E || // Create a bias to the `y` side axis due to horizontal
@@ -5166,8 +5199,8 @@ const Si = (a) => ({
5166
5199
  P === "y";
5167
5200
  }
5168
5201
  return !0;
5169
- }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, Ee) => P + Ee, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : M[0];
5170
- B && (Y = B);
5202
+ }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, Ce) => P + Ce, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : M[0];
5203
+ k && (Y = k);
5171
5204
  break;
5172
5205
  }
5173
5206
  case "initialPlacement":
@@ -5185,12 +5218,12 @@ const Si = (a) => ({
5185
5218
  }
5186
5219
  };
5187
5220
  };
5188
- async function Ai(a, t) {
5221
+ async function Ti(a, t) {
5189
5222
  const {
5190
5223
  placement: e,
5191
5224
  platform: i,
5192
5225
  elements: s
5193
- } = a, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = q(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, a);
5226
+ } = a, 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, a);
5194
5227
  let {
5195
5228
  mainAxis: x,
5196
5229
  crossAxis: g,
@@ -5212,7 +5245,7 @@ async function Ai(a, t) {
5212
5245
  y: g * d
5213
5246
  };
5214
5247
  }
5215
- const Ti = function(a) {
5248
+ const Mi = function(a) {
5216
5249
  return a === void 0 && (a = 0), {
5217
5250
  name: "offset",
5218
5251
  options: a,
@@ -5223,7 +5256,7 @@ const Ti = function(a) {
5223
5256
  y: r,
5224
5257
  placement: o,
5225
5258
  middlewareData: n
5226
- } = t, h = await Ai(t, a);
5259
+ } = t, h = await Ti(t, a);
5227
5260
  return o === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
5228
5261
  x: s + h.x,
5229
5262
  y: r + h.y,
@@ -5234,7 +5267,7 @@ const Ti = function(a) {
5234
5267
  };
5235
5268
  }
5236
5269
  };
5237
- }, Mi = function(a) {
5270
+ }, Hi = function(a) {
5238
5271
  return a === void 0 && (a = {}), {
5239
5272
  name: "shift",
5240
5273
  options: a,
@@ -5262,7 +5295,7 @@ const Ti = function(a) {
5262
5295
  } = at(a, t), c = {
5263
5296
  x: e,
5264
5297
  y: i
5265
- }, d = await le(t, h), f = J(q(s)), x = ne(f);
5298
+ }, d = await he(t, h), f = J(G(s)), x = ae(f);
5266
5299
  let g = c[x], p = c[f];
5267
5300
  if (r) {
5268
5301
  const w = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", E = g + d[w], m = g - d[y];
@@ -5295,27 +5328,27 @@ function gt() {
5295
5328
  return typeof window < "u";
5296
5329
  }
5297
5330
  function tt(a) {
5298
- return he(a) ? (a.nodeName || "").toLowerCase() : "#document";
5331
+ return ce(a) ? (a.nodeName || "").toLowerCase() : "#document";
5299
5332
  }
5300
- function F(a) {
5333
+ function N(a) {
5301
5334
  var t;
5302
5335
  return (a == null || (t = a.ownerDocument) == null ? void 0 : t.defaultView) || window;
5303
5336
  }
5304
5337
  function V(a) {
5305
5338
  var t;
5306
- return (t = (he(a) ? a.ownerDocument : a.document) || window.document) == null ? void 0 : t.documentElement;
5339
+ return (t = (ce(a) ? a.ownerDocument : a.document) || window.document) == null ? void 0 : t.documentElement;
5307
5340
  }
5308
- function he(a) {
5309
- return gt() ? a instanceof Node || a instanceof F(a).Node : !1;
5341
+ function ce(a) {
5342
+ return gt() ? a instanceof Node || a instanceof N(a).Node : !1;
5310
5343
  }
5311
5344
  function X(a) {
5312
- return gt() ? a instanceof Element || a instanceof F(a).Element : !1;
5345
+ return gt() ? a instanceof Element || a instanceof N(a).Element : !1;
5313
5346
  }
5314
5347
  function K(a) {
5315
- return gt() ? a instanceof HTMLElement || a instanceof F(a).HTMLElement : !1;
5348
+ return gt() ? a instanceof HTMLElement || a instanceof N(a).HTMLElement : !1;
5316
5349
  }
5317
- function $t(a) {
5318
- return !gt() || typeof ShadowRoot > "u" ? !1 : a instanceof ShadowRoot || a instanceof F(a).ShadowRoot;
5350
+ function qt(a) {
5351
+ return !gt() || typeof ShadowRoot > "u" ? !1 : a instanceof ShadowRoot || a instanceof N(a).ShadowRoot;
5319
5352
  }
5320
5353
  function ht(a) {
5321
5354
  const {
@@ -5323,10 +5356,10 @@ function ht(a) {
5323
5356
  overflowX: e,
5324
5357
  overflowY: i,
5325
5358
  display: s
5326
- } = k(a);
5359
+ } = B(a);
5327
5360
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5328
5361
  }
5329
- function Hi(a) {
5362
+ function Di(a) {
5330
5363
  return ["table", "td", "th"].includes(tt(a));
5331
5364
  }
5332
5365
  function wt(a) {
@@ -5339,10 +5372,10 @@ function wt(a) {
5339
5372
  });
5340
5373
  }
5341
5374
  function Dt(a) {
5342
- const t = Ft(), e = X(a) ? k(a) : a;
5375
+ const t = Nt(), e = X(a) ? B(a) : a;
5343
5376
  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));
5344
5377
  }
5345
- function Di(a) {
5378
+ function Ni(a) {
5346
5379
  let t = $(a);
5347
5380
  for (; K(t) && !Q(t); ) {
5348
5381
  if (Dt(t))
@@ -5353,14 +5386,14 @@ function Di(a) {
5353
5386
  }
5354
5387
  return null;
5355
5388
  }
5356
- function Ft() {
5389
+ function Nt() {
5357
5390
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
5358
5391
  }
5359
5392
  function Q(a) {
5360
5393
  return ["html", "body", "#document"].includes(tt(a));
5361
5394
  }
5362
- function k(a) {
5363
- return F(a).getComputedStyle(a);
5395
+ function B(a) {
5396
+ return N(a).getComputedStyle(a);
5364
5397
  }
5365
5398
  function pt(a) {
5366
5399
  return X(a) ? {
@@ -5378,19 +5411,19 @@ function $(a) {
5378
5411
  // Step into the shadow DOM of the parent of a slotted node.
5379
5412
  a.assignedSlot || // DOM Element detected.
5380
5413
  a.parentNode || // ShadowRoot detected.
5381
- $t(a) && a.host || // Fallback.
5414
+ qt(a) && a.host || // Fallback.
5382
5415
  V(a)
5383
5416
  );
5384
- return $t(t) ? t.host : t;
5417
+ return qt(t) ? t.host : t;
5385
5418
  }
5386
- function ce(a) {
5419
+ function de(a) {
5387
5420
  const t = $(a);
5388
- return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : K(t) && ht(t) ? t : ce(t);
5421
+ return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : K(t) && ht(t) ? t : de(t);
5389
5422
  }
5390
5423
  function St(a, t, e) {
5391
5424
  var i;
5392
5425
  t === void 0 && (t = []), e === void 0 && (e = !0);
5393
- const s = ce(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o = F(s);
5426
+ const s = de(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o = N(s);
5394
5427
  if (r) {
5395
5428
  const n = Lt(o);
5396
5429
  return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? St(n) : []);
@@ -5400,8 +5433,8 @@ function St(a, t, e) {
5400
5433
  function Lt(a) {
5401
5434
  return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
5402
5435
  }
5403
- function de(a) {
5404
- const t = k(a);
5436
+ function fe(a) {
5437
+ const t = B(a);
5405
5438
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5406
5439
  const s = K(a), r = s ? a.offsetWidth : e, o = s ? a.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5407
5440
  return n && (e = r, i = o), {
@@ -5410,48 +5443,48 @@ function de(a) {
5410
5443
  $: n
5411
5444
  };
5412
5445
  }
5413
- function fe(a) {
5446
+ function xe(a) {
5414
5447
  return X(a) ? a : a.contextElement;
5415
5448
  }
5416
5449
  function Z(a) {
5417
- const t = fe(a);
5450
+ const t = xe(a);
5418
5451
  if (!K(t))
5419
5452
  return z(1);
5420
5453
  const e = t.getBoundingClientRect(), {
5421
5454
  width: i,
5422
5455
  height: s,
5423
5456
  $: r
5424
- } = de(t);
5457
+ } = fe(t);
5425
5458
  let o = (r ? ft(e.width) : e.width) / i, n = (r ? ft(e.height) : e.height) / s;
5426
5459
  return (!o || !Number.isFinite(o)) && (o = 1), (!n || !Number.isFinite(n)) && (n = 1), {
5427
5460
  x: o,
5428
5461
  y: n
5429
5462
  };
5430
5463
  }
5431
- const Fi = /* @__PURE__ */ z(0);
5432
- function xe(a) {
5433
- const t = F(a);
5434
- return !Ft() || !t.visualViewport ? Fi : {
5464
+ const Xi = /* @__PURE__ */ z(0);
5465
+ function ue(a) {
5466
+ const t = N(a);
5467
+ return !Nt() || !t.visualViewport ? Xi : {
5435
5468
  x: t.visualViewport.offsetLeft,
5436
5469
  y: t.visualViewport.offsetTop
5437
5470
  };
5438
5471
  }
5439
- function Xi(a, t, e) {
5440
- return t === void 0 && (t = !1), !e || t && e !== F(a) ? !1 : t;
5472
+ function Bi(a, t, e) {
5473
+ return t === void 0 && (t = !1), !e || t && e !== N(a) ? !1 : t;
5441
5474
  }
5442
5475
  function ot(a, t, e, i) {
5443
5476
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5444
- const s = a.getBoundingClientRect(), r = fe(a);
5477
+ const s = a.getBoundingClientRect(), r = xe(a);
5445
5478
  let o = z(1);
5446
5479
  t && (i ? X(i) && (o = Z(i)) : o = Z(a));
5447
- const n = Xi(r, e, i) ? xe(r) : z(0);
5480
+ const n = Bi(r, e, i) ? ue(r) : z(0);
5448
5481
  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;
5449
5482
  if (r) {
5450
- const x = F(r), g = i && X(i) ? F(i) : i;
5483
+ const x = N(r), g = i && X(i) ? N(i) : i;
5451
5484
  let p = x, u = Lt(p);
5452
5485
  for (; u && i && g !== p; ) {
5453
- const w = Z(u), y = u.getBoundingClientRect(), E = k(u), m = y.left + (u.clientLeft + parseFloat(E.paddingLeft)) * w.x, C = y.top + (u.clientTop + parseFloat(E.paddingTop)) * w.y;
5454
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += m, c += C, p = F(u), u = Lt(p);
5486
+ const w = Z(u), y = u.getBoundingClientRect(), E = B(u), m = y.left + (u.clientLeft + parseFloat(E.paddingLeft)) * w.x, C = y.top + (u.clientTop + parseFloat(E.paddingTop)) * w.y;
5487
+ h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += m, c += C, p = N(u), u = Lt(p);
5455
5488
  }
5456
5489
  }
5457
5490
  return ut({
@@ -5461,7 +5494,7 @@ function ot(a, t, e, i) {
5461
5494
  y: c
5462
5495
  });
5463
5496
  }
5464
- function ki(a) {
5497
+ function Fi(a) {
5465
5498
  let {
5466
5499
  elements: t,
5467
5500
  rect: e,
@@ -5487,30 +5520,30 @@ function ki(a) {
5487
5520
  y: e.y * c.y - h.scrollTop * c.y + d.y
5488
5521
  };
5489
5522
  }
5490
- function Ni(a) {
5523
+ function ki(a) {
5491
5524
  return Array.from(a.getClientRects());
5492
5525
  }
5493
5526
  function At(a, t) {
5494
5527
  const e = pt(a).scrollLeft;
5495
5528
  return t ? t.left + e : ot(V(a)).left + e;
5496
5529
  }
5497
- function Bi(a) {
5530
+ function Ki(a) {
5498
5531
  const t = V(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5499
5532
  let o = -e.scrollLeft + At(a);
5500
5533
  const n = -e.scrollTop;
5501
- return k(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5534
+ return B(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5502
5535
  width: s,
5503
5536
  height: r,
5504
5537
  x: o,
5505
5538
  y: n
5506
5539
  };
5507
5540
  }
5508
- function Ki(a, t) {
5509
- const e = F(a), i = V(a), s = e.visualViewport;
5541
+ function Yi(a, t) {
5542
+ const e = N(a), i = V(a), s = e.visualViewport;
5510
5543
  let r = i.clientWidth, o = i.clientHeight, n = 0, h = 0;
5511
5544
  if (s) {
5512
5545
  r = s.width, o = s.height;
5513
- const c = Ft();
5546
+ const c = Nt();
5514
5547
  (!c || c && t === "fixed") && (n = s.offsetLeft, h = s.offsetTop);
5515
5548
  }
5516
5549
  return {
@@ -5520,7 +5553,7 @@ function Ki(a, t) {
5520
5553
  y: h
5521
5554
  };
5522
5555
  }
5523
- function Yi(a, t) {
5556
+ function Vi(a, t) {
5524
5557
  const e = ot(a, !0, t === "fixed"), i = e.top + a.clientTop, s = e.left + a.clientLeft, r = K(a) ? Z(a) : z(1), o = a.clientWidth * r.x, n = a.clientHeight * r.y, h = s * r.x, c = i * r.y;
5525
5558
  return {
5526
5559
  width: o,
@@ -5532,13 +5565,13 @@ function Yi(a, t) {
5532
5565
  function Gt(a, t, e) {
5533
5566
  let i;
5534
5567
  if (t === "viewport")
5535
- i = Ki(a, e);
5568
+ i = Yi(a, e);
5536
5569
  else if (t === "document")
5537
- i = Bi(V(a));
5570
+ i = Ki(V(a));
5538
5571
  else if (X(t))
5539
- i = Yi(t, e);
5572
+ i = Vi(t, e);
5540
5573
  else {
5541
- const s = xe(a);
5574
+ const s = ue(a);
5542
5575
  i = {
5543
5576
  ...t,
5544
5577
  x: t.x - s.x,
@@ -5547,31 +5580,31 @@ function Gt(a, t, e) {
5547
5580
  }
5548
5581
  return ut(i);
5549
5582
  }
5550
- function ue(a, t) {
5583
+ function ge(a, t) {
5551
5584
  const e = $(a);
5552
- return e === t || !X(e) || Q(e) ? !1 : k(e).position === "fixed" || ue(e, t);
5585
+ return e === t || !X(e) || Q(e) ? !1 : B(e).position === "fixed" || ge(e, t);
5553
5586
  }
5554
- function Vi(a, t) {
5587
+ function Wi(a, t) {
5555
5588
  const e = t.get(a);
5556
5589
  if (e)
5557
5590
  return e;
5558
5591
  let i = St(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
5559
- const r = k(a).position === "fixed";
5592
+ const r = B(a).position === "fixed";
5560
5593
  let o = r ? $(a) : a;
5561
5594
  for (; X(o) && !Q(o); ) {
5562
- const n = k(o), h = Dt(o);
5563
- !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ue(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5595
+ const n = B(o), h = Dt(o);
5596
+ !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5564
5597
  }
5565
5598
  return t.set(a, i), i;
5566
5599
  }
5567
- function Wi(a) {
5600
+ function Pi(a) {
5568
5601
  let {
5569
5602
  element: t,
5570
5603
  boundary: e,
5571
5604
  rootBoundary: i,
5572
5605
  strategy: s
5573
5606
  } = a;
5574
- const o = [...e === "clippingAncestors" ? wt(t) ? [] : Vi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5607
+ const o = [...e === "clippingAncestors" ? wt(t) ? [] : Wi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5575
5608
  const f = Gt(t, d, s);
5576
5609
  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;
5577
5610
  }, Gt(t, n, s));
@@ -5582,17 +5615,17 @@ function Wi(a) {
5582
5615
  y: h.top
5583
5616
  };
5584
5617
  }
5585
- function Pi(a) {
5618
+ function zi(a) {
5586
5619
  const {
5587
5620
  width: t,
5588
5621
  height: e
5589
- } = de(a);
5622
+ } = fe(a);
5590
5623
  return {
5591
5624
  width: t,
5592
5625
  height: e
5593
5626
  };
5594
5627
  }
5595
- function zi(a, t, e) {
5628
+ function $i(a, t, e) {
5596
5629
  const i = K(t), s = V(t), r = e === "fixed", o = ot(a, !0, r, t);
5597
5630
  let n = {
5598
5631
  scrollLeft: 0,
@@ -5619,18 +5652,18 @@ function zi(a, t, e) {
5619
5652
  };
5620
5653
  }
5621
5654
  function mt(a) {
5622
- return k(a).position === "static";
5655
+ return B(a).position === "static";
5623
5656
  }
5624
- function qt(a, t) {
5625
- if (!K(a) || k(a).position === "fixed")
5657
+ function jt(a, t) {
5658
+ if (!K(a) || B(a).position === "fixed")
5626
5659
  return null;
5627
5660
  if (t)
5628
5661
  return t(a);
5629
5662
  let e = a.offsetParent;
5630
5663
  return V(a) === e && (e = e.ownerDocument.body), e;
5631
5664
  }
5632
- function ge(a, t) {
5633
- const e = F(a);
5665
+ function we(a, t) {
5666
+ const e = N(a);
5634
5667
  if (wt(a))
5635
5668
  return e;
5636
5669
  if (!K(a)) {
@@ -5642,15 +5675,15 @@ function ge(a, t) {
5642
5675
  }
5643
5676
  return e;
5644
5677
  }
5645
- let i = qt(a, t);
5646
- for (; i && Hi(i) && mt(i); )
5647
- i = qt(i, t);
5648
- return i && Q(i) && mt(i) && !Dt(i) ? e : i || Di(a) || e;
5678
+ let i = jt(a, t);
5679
+ for (; i && Di(i) && mt(i); )
5680
+ i = jt(i, t);
5681
+ return i && Q(i) && mt(i) && !Dt(i) ? e : i || Ni(a) || e;
5649
5682
  }
5650
- const $i = async function(a) {
5651
- const t = this.getOffsetParent || ge, e = this.getDimensions, i = await e(a.floating);
5683
+ const qi = async function(a) {
5684
+ const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(a.floating);
5652
5685
  return {
5653
- reference: zi(a.reference, await t(a.floating), a.strategy),
5686
+ reference: $i(a.reference, await t(a.floating), a.strategy),
5654
5687
  floating: {
5655
5688
  x: 0,
5656
5689
  y: 0,
@@ -5660,33 +5693,33 @@ const $i = async function(a) {
5660
5693
  };
5661
5694
  };
5662
5695
  function Gi(a) {
5663
- return k(a).direction === "rtl";
5696
+ return B(a).direction === "rtl";
5664
5697
  }
5665
- const qi = {
5666
- convertOffsetParentRelativeRectToViewportRelativeRect: ki,
5698
+ const ji = {
5699
+ convertOffsetParentRelativeRectToViewportRelativeRect: Fi,
5667
5700
  getDocumentElement: V,
5668
- getClippingRect: Wi,
5669
- getOffsetParent: ge,
5670
- getElementRects: $i,
5671
- getClientRects: Ni,
5672
- getDimensions: Pi,
5701
+ getClippingRect: Pi,
5702
+ getOffsetParent: we,
5703
+ getElementRects: qi,
5704
+ getClientRects: ki,
5705
+ getDimensions: zi,
5673
5706
  getScale: Z,
5674
5707
  isElement: X,
5675
5708
  isRTL: Gi
5676
- }, we = Ti, pe = Mi, ye = Li, ji = Si, me = (a, t, e) => {
5709
+ }, pe = Mi, ye = Hi, me = Ai, Ui = Li, Ee = (a, t, e) => {
5677
5710
  const i = /* @__PURE__ */ new Map(), s = {
5678
- platform: qi,
5711
+ platform: ji,
5679
5712
  ...e
5680
5713
  }, r = {
5681
5714
  ...s.platform,
5682
5715
  _c: i
5683
5716
  };
5684
- return Oi(a, t, {
5717
+ return Si(a, t, {
5685
5718
  ...s,
5686
5719
  platform: r
5687
5720
  });
5688
5721
  };
5689
- let Ui = class {
5722
+ let Zi = class {
5690
5723
  constructor(t) {
5691
5724
  l(this, "ctx");
5692
5725
  l(this, "enable", !1);
@@ -5743,7 +5776,7 @@ let Ui = class {
5743
5776
  return;
5744
5777
  this.enable = !0, this.contentEl.style.maxWidth = `${t.overflowTooltipMaxWidth || 500}px`, this.contentEl.style.minWidth = "100px", this.contentEl.style.width = "100%", this.contentEl.style.display = "inline-block", this.contentEl.style.wordBreak = "break-all", this.contentEl.style.lineHeight = "1.5", this.contentEl.innerText = e;
5745
5778
  const s = t.drawX + i.x, r = t.drawY + i.y;
5746
- me({
5779
+ Ee({
5747
5780
  getBoundingClientRect() {
5748
5781
  return {
5749
5782
  width: t.visibleWidth,
@@ -5758,7 +5791,7 @@ let Ui = class {
5758
5791
  }
5759
5792
  }, this.floatingEl, {
5760
5793
  placement: t.overflowTooltipPlacement,
5761
- middleware: [pe(), ye(), we(6), ji({ element: this.arrowEl })]
5794
+ middleware: [ye(), me(), pe(6), Ui({ element: this.arrowEl })]
5762
5795
  }).then((n) => {
5763
5796
  const { x: h, y: c, placement: d, middlewareData: f } = n;
5764
5797
  if (Object.assign(this.floatingEl.style, {
@@ -5797,7 +5830,7 @@ let Ui = class {
5797
5830
  this.contentEl.remove(), this.arrowEl.remove(), this.floatingEl.remove();
5798
5831
  }
5799
5832
  };
5800
- class Zi {
5833
+ class Ji {
5801
5834
  constructor(t) {
5802
5835
  l(this, "editorEl");
5803
5836
  l(this, "inputEl");
@@ -5939,7 +5972,7 @@ class Zi {
5939
5972
  } = this.ctx;
5940
5973
  let f = this.ctx.body.visibleHeight;
5941
5974
  if (r > f && (r = f), this.editorEl.style.display = "inline-block", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text") {
5942
- this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${o - 1}px`, this.inputEl.style.minHeight = `${r - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${o - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, i !== null && (this.inputEl.value = i), this.inputEl.focus();
5975
+ this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${o - 1}px`, this.inputEl.style.minHeight = `${r - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${o - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, i !== null && (this.inputEl.value = i), this.inputEl.focus({ preventScroll: !0 });
5943
5976
  const x = this.inputEl.value.length;
5944
5977
  this.inputEl.setSelectionRange(x, x);
5945
5978
  } else
@@ -5981,7 +6014,7 @@ class Zi {
5981
6014
  r && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5982
6015
  }
5983
6016
  doneEdit() {
5984
- this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.ctx.containerElement.focus(), this.editorEl.style.display = "none", this.ctx.emit("drawView"));
6017
+ 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"));
5985
6018
  }
5986
6019
  clearEditor() {
5987
6020
  this.doneEdit(), this.cellTarget = null, this.selectorArrStr = "", this.ctx.clearSelector(), this.ctx.focusCell = void 0, this.ctx.emit("drawView");
@@ -5991,7 +6024,7 @@ class Zi {
5991
6024
  (t = this.editorEl) == null || t.remove();
5992
6025
  }
5993
6026
  }
5994
- class Ji {
6027
+ class Qi {
5995
6028
  constructor(t) {
5996
6029
  l(this, "ctx");
5997
6030
  l(this, "emptyEl");
@@ -6015,7 +6048,7 @@ class Ji {
6015
6048
  this.emptyEl.remove();
6016
6049
  }
6017
6050
  }
6018
- class Qi {
6051
+ class ts {
6019
6052
  constructor(t) {
6020
6053
  l(this, "ctx");
6021
6054
  this.ctx = t;
@@ -6210,7 +6243,7 @@ class Qi {
6210
6243
  };
6211
6244
  }
6212
6245
  }
6213
- class ts {
6246
+ class es {
6214
6247
  constructor(t) {
6215
6248
  l(this, "ctx");
6216
6249
  l(this, "contextMenuEl");
@@ -6236,9 +6269,9 @@ class ts {
6236
6269
  }),
6237
6270
  contextElement: document.body
6238
6271
  };
6239
- me(x, this.contextMenuEl, {
6272
+ Ee(x, this.contextMenuEl, {
6240
6273
  placement: "right-start",
6241
- middleware: [we(), pe(), ye()]
6274
+ middleware: [pe(), ye(), me()]
6242
6275
  }).then(({ x: g, y: p }) => {
6243
6276
  this.show(g, p);
6244
6277
  });
@@ -6294,7 +6327,7 @@ class ts {
6294
6327
  this.contextMenuEl.remove();
6295
6328
  }
6296
6329
  }
6297
- class ss {
6330
+ class rs {
6298
6331
  constructor(t, e) {
6299
6332
  l(this, "options");
6300
6333
  l(this, "scroller");
@@ -6317,7 +6350,7 @@ class ss {
6317
6350
  r,
6318
6351
  o
6319
6352
  );
6320
- this.ctx = new xi(n, this.options), this.header = new gi(this.ctx), this.footer = new pi(this.ctx), this.body = new wi(this.ctx), this.scroller = new ui(this.ctx), this.selector = new yi(this.ctx), this.autofill = new mi(this.ctx), this.tooltip = new Ui(this.ctx), this.empty = new Ji(this.ctx), this.editor = new Zi(this.ctx), this.overlayer = new Qi(this.ctx), this.contextMenu = new ts(this.ctx), this.ctx.on("draw", () => {
6353
+ this.ctx = new ui(n, this.options), this.header = new wi(this.ctx), this.footer = new yi(this.ctx), this.body = new pi(this.ctx), this.scroller = new gi(this.ctx), this.selector = new mi(this.ctx), this.autofill = new Ei(this.ctx), this.tooltip = new Zi(this.ctx), this.empty = new Qi(this.ctx), this.editor = new Ji(this.ctx), this.overlayer = new ts(this.ctx), this.contextMenu = new es(this.ctx), this.ctx.on("draw", () => {
6321
6354
  this.draw();
6322
6355
  }), this.ctx.on("drawView", () => {
6323
6356
  this.draw(!0);
@@ -6531,10 +6564,10 @@ class ss {
6531
6564
  }
6532
6565
  getUtils() {
6533
6566
  return {
6534
- mergeColCell: oi,
6535
- mergeRowCell: ri,
6536
- getSpanArrByRow: ee,
6537
- getSpanObjByColumn: ie
6567
+ mergeColCell: ni,
6568
+ mergeRowCell: oi,
6569
+ getSpanArrByRow: ie,
6570
+ getSpanObjByColumn: se
6538
6571
  };
6539
6572
  }
6540
6573
  getColumnByKey(t) {
@@ -6549,6 +6582,6 @@ class ss {
6549
6582
  }
6550
6583
  }
6551
6584
  export {
6552
- ss as default
6585
+ rs as default
6553
6586
  };
6554
6587
  //# sourceMappingURL=index.es.js.map