e-virt-table 1.2.29 → 1.2.30

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
@@ -66,13 +66,13 @@ function Ht() {
66
66
  return (c === "x" ? t : t & 3 | 8).toString(16);
67
67
  });
68
68
  }
69
- function xt(c, t) {
69
+ function Z(c, t) {
70
70
  let e = 0, i;
71
71
  return function(...s) {
72
- const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e;
73
- !e || r >= t ? (c.apply(this, s), e = o) : i || (i = setTimeout(() => {
72
+ const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e, a = typeof t == "function" ? t() : t;
73
+ !e || r >= a ? (c.apply(this, s), e = o) : i || (i = setTimeout(() => {
74
74
  c.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
75
- }, t - r));
75
+ }, a - r));
76
76
  };
77
77
  }
78
78
  function Dt(c = []) {
@@ -115,10 +115,10 @@ function Nt(c = [], t = 1, e = 0) {
115
115
  };
116
116
  });
117
117
  }
118
- function et(c = []) {
118
+ function it(c = []) {
119
119
  let t = [];
120
120
  return c.forEach((e) => {
121
- e.children ? t = t.concat(et(e.children)) : t.push(e);
121
+ e.children ? t = t.concat(it(e.children)) : t.push(e);
122
122
  }), t;
123
123
  }
124
124
  const Ct = /^(\r\n|\n\r|\r|\n)/, ae = /^[^\t\r\n]+/, bt = /^\t/;
@@ -401,7 +401,7 @@ class ut extends Yt {
401
401
  n(this, "overflowTooltipMaxWidth", 500);
402
402
  n(this, "overflowTooltipPlacement", "top");
403
403
  n(this, "maxLineClamp", "auto");
404
- this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = l.key, this.type = l.type || "", this.editorType = l.editorType || "text", this.selectorCellValueType = l.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = l.editorProps || {}, this.cellType = f, this.align = l.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = l.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = l.fixed, this.level = l.level || 0, this.operation = l.operation || !1, this.column = l, this.rules = l.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = l.render, this.overflowTooltipShow = l.overflowTooltipShow !== !1, this.autoRowHeight = l.autoRowHeight || this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = l.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = l.overflowTooltipPlacement || "top", this.renderFooter = l.renderFooter, this.hoverIconName = l.hoverIconName, this.formatter = l.formatter, this.formatterFooter = l.formatterFooter, this.maxLineClamp = l.maxLineClamp || "auto", this.update();
404
+ this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = l.key, this.type = l.type || "", this.editorType = l.editorType || "text", this.selectorCellValueType = l.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = l.editorProps || {}, this.cellType = f, this.align = l.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = l.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = l.fixed, this.level = l.level || 0, this.operation = l.operation || !1, this.column = l, this.rules = l.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = l.render, this.overflowTooltipShow = l.overflowTooltipShow !== !1, this.autoRowHeight = l.autoRowHeight !== void 0 ? l.autoRowHeight : this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = l.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = l.overflowTooltipPlacement || "top", this.renderFooter = l.renderFooter, this.hoverIconName = l.hoverIconName, this.formatter = l.formatter, this.formatterFooter = l.formatterFooter, this.maxLineClamp = l.maxLineClamp || "auto", this.update();
405
405
  }
406
406
  setWidthHeight(e, i) {
407
407
  this.width = e, this.height = i;
@@ -691,12 +691,12 @@ class ut extends Yt {
691
691
  if (this.cellType !== "body" || !this.autoRowHeight || this.rowspan === 0)
692
692
  return 0;
693
693
  if (this.render) {
694
- const r = this.ctx.database.getOverlayerAutoHeight(this.rowIndex, this.colIndex);
695
- return this.rowspan > 1 ? r < this.visibleHeight ? 0 : Math.round(r - (this.visibleHeight - this.height)) : Math.round(r);
694
+ const a = this.ctx.database.getOverlayerAutoHeight(this.rowIndex, this.colIndex);
695
+ return this.rowspan > 1 ? a < this.visibleHeight ? 0 : Math.round(a - (this.visibleHeight - this.height)) : Math.round(a);
696
696
  }
697
697
  if (!(this.displayText && typeof this.displayText == "string"))
698
698
  return 0;
699
- const { BODY_FONT: e, CELL_PADDING: i, CELL_LINE_HEIGHT: s } = this.ctx.config, o = this.ctx.paint.calculateTextHeight(this.displayText, this.drawTextWidth, {
699
+ const { BODY_FONT: e, CELL_PADDING: i, CELL_LINE_HEIGHT: s } = this.ctx.config, o = `${this.displayText}_${this.drawTextWidth}`, r = this.ctx.paint.calculateTextHeight(this.displayText, this.drawTextWidth, {
700
700
  font: e,
701
701
  padding: i,
702
702
  align: this.align,
@@ -704,9 +704,10 @@ class ut extends Yt {
704
704
  color: this.drawTextColor,
705
705
  autoRowHeight: this.autoRowHeight,
706
706
  lineHeight: s,
707
- maxLineClamp: this.maxLineClamp
707
+ maxLineClamp: this.maxLineClamp,
708
+ cacheTextKey: o
708
709
  });
709
- return this.rowspan > 1 ? o < this.visibleHeight ? 0 : Math.round(o - (this.visibleHeight - this.height)) : Math.round(o);
710
+ return this.rowspan > 1 ? r < this.visibleHeight ? 0 : Math.round(r - (this.visibleHeight - this.height)) : Math.round(r);
710
711
  }
711
712
  // 过去跨度配置
712
713
  getSpanInfo() {
@@ -831,7 +832,10 @@ class ut extends Yt {
831
832
  drawText() {
832
833
  const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s, CELL_LINE_HEIGHT: o } = this.ctx.config, { placeholder: r } = this.column;
833
834
  let a = this.displayText, h = this.drawTextColor;
834
- return !this.ctx.database.getReadonly(this.rowKey, this.key) && r && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (a = r, h = s), a ? (this.ellipsis = this.ctx.paint.drawText(
835
+ if (!this.ctx.database.getReadonly(this.rowKey, this.key) && r && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (a = r, h = s), !a)
836
+ return !1;
837
+ const d = `${a}_${this.drawTextWidth}`;
838
+ return this.ellipsis = this.ctx.paint.drawText(
835
839
  a,
836
840
  this.drawTextX,
837
841
  this.drawTextY,
@@ -845,9 +849,10 @@ class ut extends Yt {
845
849
  color: h,
846
850
  autoRowHeight: this.autoRowHeight,
847
851
  lineHeight: o,
848
- maxLineClamp: this.maxLineClamp
852
+ maxLineClamp: this.maxLineClamp,
853
+ cacheTextKey: d
849
854
  }
850
- ), this.ellipsis) : !1;
855
+ ), this.ellipsis;
851
856
  }
852
857
  drawImage() {
853
858
  if (this.drawSelectionImageSource && this.ctx.paint.drawImage(
@@ -1028,8 +1033,8 @@ class ue {
1028
1033
  }
1029
1034
  // 初始化默认不忽略清空改变值和校验map
1030
1035
  init(t = !0) {
1031
- this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
1032
- const e = this.getColumns(), i = et(e);
1036
+ this.ctx.paint.clearTextCache(), this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
1037
+ const e = this.getColumns(), i = it(e);
1033
1038
  if (this.ctx.hasSelection = i.some((s) => s.type === "selection"), this.ctx.hasTree = i.some((s) => s.type === "tree"), t) {
1034
1039
  this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear();
1035
1040
  const { ROW_KEY: s } = this.ctx.config;
@@ -2295,10 +2300,14 @@ class me {
2295
2300
  class pe {
2296
2301
  constructor(t) {
2297
2302
  n(this, "ctx");
2303
+ n(this, "textCacheMap", /* @__PURE__ */ new Map());
2298
2304
  const e = t.getContext("2d");
2299
2305
  if (!e) throw new Error("canvas context not found");
2300
2306
  this.ctx = e;
2301
2307
  }
2308
+ clearTextCache() {
2309
+ this.textCacheMap.clear();
2310
+ }
2302
2311
  scale(t) {
2303
2312
  this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.scale(t, t);
2304
2313
  }
@@ -2403,7 +2412,7 @@ class pe {
2403
2412
  if (s <= E + d * 2 + w + m)
2404
2413
  return this.ctx.restore(), R = !0, R;
2405
2414
  const C = Math.round((o - 2 * d) / p);
2406
- let I = this.wrapText(t, y), S = Math.min(I.length, Math.max(C, 1));
2415
+ let I = this.wrapText(t, y, r.cacheTextKey), S = Math.min(I.length, Math.max(C, 1));
2407
2416
  u === "auto" && x ? S = I.length : typeof u == "number" && u < C ? S = u : (u === 1 && !x && (I = [t], S = 1), u === "auto" && C === 1 && (I = [t], S = 1));
2408
2417
  let _ = i + d;
2409
2418
  const v = Math.round(S * p);
@@ -2443,31 +2452,34 @@ class pe {
2443
2452
  * @param maxWidth
2444
2453
  * @returns
2445
2454
  */
2446
- wrapText(t, e) {
2455
+ wrapText(t, e, i = "") {
2447
2456
  if (!t) return [""];
2448
- const i = [], s = t.split(`
2457
+ if (i && this.textCacheMap.has(i))
2458
+ return this.textCacheMap.get(i) || [""];
2459
+ const s = [], o = t.split(`
2449
2460
  `);
2450
- for (const o of s) {
2451
- if (o === "") {
2452
- i.push("");
2461
+ for (const a of o) {
2462
+ if (a === "") {
2463
+ s.push("");
2453
2464
  continue;
2454
2465
  }
2455
- const r = o.split("");
2456
- let a = "";
2457
- for (const h of r) {
2458
- const l = a + h;
2459
- this.ctx.measureText(l).width <= e ? a = l : a ? (i.push(a), a = h) : (i.push(h), a = "");
2466
+ const h = a.split("");
2467
+ let l = "";
2468
+ for (const d of h) {
2469
+ const f = l + d;
2470
+ this.ctx.measureText(f).width <= e ? l = f : l ? (s.push(l), l = d) : (s.push(d), l = "");
2460
2471
  }
2461
- a && i.push(a);
2472
+ l && s.push(l);
2462
2473
  }
2463
- if (i.length >= 1) {
2464
- const o = i[i.length - 1], { ellipsis: r } = this.handleEllipsis(o, e, 0, this.ctx.font);
2465
- if (r) {
2466
- const a = o.slice(0, -1);
2467
- i[i.length - 1] = a, i.push(o.slice(-1));
2474
+ if (s.length >= 1) {
2475
+ const a = s[s.length - 1], { ellipsis: h } = this.handleEllipsis(a, e, 0, this.ctx.font);
2476
+ if (h) {
2477
+ const l = a.slice(0, -1);
2478
+ s[s.length - 1] = l, s.push(a.slice(-1));
2468
2479
  }
2469
2480
  }
2470
- return i.length > 0 ? i : [""];
2481
+ const r = s.length > 0 ? s : [""];
2482
+ return i && this.textCacheMap.set(i, r), r;
2471
2483
  }
2472
2484
  /**
2473
2485
  * 计算文本自适应高度
@@ -2477,12 +2489,19 @@ class pe {
2477
2489
  * @returns 计算出的高度
2478
2490
  */
2479
2491
  calculateTextHeight(t = "", e, i = {}) {
2480
- var w;
2481
- const { font: s = "12px Arial", padding: o = 0, align: r = "center", color: a = "#495060", maxLineClamp: h = 1 } = i;
2492
+ var m;
2493
+ const {
2494
+ font: s = "12px Arial",
2495
+ padding: o = 0,
2496
+ align: r = "center",
2497
+ color: a = "#495060",
2498
+ maxLineClamp: h = 1,
2499
+ cacheTextKey: l = ""
2500
+ } = i;
2482
2501
  this.ctx.save(), this.ctx.font = s, this.ctx.fillStyle = a, this.ctx.textAlign = r;
2483
- const l = parseInt(((w = s.match(/\d+/)) == null ? void 0 : w[0]) || "12"), d = l * (i.lineHeight || 1.2), f = e - o * 2, u = this.wrapText(t, f);
2484
- let x = 1;
2485
- return h === "auto" ? x = u.length : u.length > h ? x = h : x = u.length, this.ctx.restore(), Math.max(Math.floor(x * d + o * 2), Math.floor(l + o * 2));
2502
+ const d = parseInt(((m = s.match(/\d+/)) == null ? void 0 : m[0]) || "12"), f = d * (i.lineHeight || 1.2), u = e - o * 2, x = this.wrapText(t, u, l);
2503
+ let w = 1;
2504
+ return h === "auto" ? w = x.length : x.length > h ? w = h : w = x.length, this.ctx.restore(), Math.max(Math.floor(w * f + o * 2), Math.floor(d + o * 2));
2486
2505
  }
2487
2506
  handleEllipsis(t, e, i = 0, s = "12px Arial") {
2488
2507
  this.ctx.save();
@@ -2519,6 +2538,8 @@ class It {
2519
2538
  n(this, "_config", {});
2520
2539
  /** CSS 类名前缀 */
2521
2540
  n(this, "CSS_PREFIX", "e-virt-table");
2541
+ /** 绘制时间 */
2542
+ n(this, "DRAW_TIME_MULTIPLIER", 2);
2522
2543
  /** 图标集合 */
2523
2544
  n(this, "ICONS", []);
2524
2545
  /** 行的唯一标识键 */
@@ -2975,7 +2996,7 @@ class Ce {
2975
2996
  return this.icons.get(t);
2976
2997
  }
2977
2998
  }
2978
- class lt extends Yt {
2999
+ class ct extends Yt {
2979
3000
  constructor(e, i, s, o, r, a, h) {
2980
3001
  super(e, s, o, r, a, "header", h.fixed);
2981
3002
  n(this, "align");
@@ -3083,7 +3104,7 @@ class lt extends Yt {
3083
3104
  const {
3084
3105
  paint: e,
3085
3106
  config: { HEADER_FONT: i, CELL_PADDING: s }
3086
- } = this.ctx;
3107
+ } = this.ctx, o = `${this.displayText}_${this.drawTextWidth}`;
3087
3108
  this.ellipsis = e.drawText(
3088
3109
  this.displayText,
3089
3110
  this.drawTextX,
@@ -3101,11 +3122,12 @@ class lt extends Yt {
3101
3122
  // 排序图标占位
3102
3123
  offsetLeft: this.required ? 12 : 0,
3103
3124
  // 必填星号占位
3104
- textCallback: (o) => {
3105
- this.column.sortBy && (this.drawSortImageX = o.right + 4, this.drawSortImageY = o.top + (o.height - 16) / 2), this.required && e.drawText(
3125
+ cacheTextKey: o,
3126
+ textCallback: (r) => {
3127
+ this.column.sortBy && (this.drawSortImageX = r.right + 4, this.drawSortImageY = r.top + (r.height - 16) / 2), this.required && e.drawText(
3106
3128
  "*",
3107
- o.left - 18,
3108
- o.top + (o.height - 12) / 2,
3129
+ r.left - 18,
3130
+ r.top + (r.height - 12) / 2,
3109
3131
  24,
3110
3132
  24,
3111
3133
  {
@@ -3300,7 +3322,7 @@ class be {
3300
3322
  t.drawSelectionImageWidth,
3301
3323
  t.drawSelectionImageHeight
3302
3324
  ))
3303
- if (t instanceof lt)
3325
+ if (t instanceof ct)
3304
3326
  t.drawSelectionImageName === "checkbox-uncheck" || t.drawSelectionImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawSelectionImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
3305
3327
  else {
3306
3328
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -3365,7 +3387,7 @@ class be {
3365
3387
  */
3366
3388
  imageEnterAndLeave(t, e) {
3367
3389
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
3368
- if (t instanceof lt) {
3390
+ if (t instanceof ct) {
3369
3391
  if (t.drawSelectionImageSource && this.isInsideElement(
3370
3392
  r,
3371
3393
  o,
@@ -3580,6 +3602,7 @@ class Re {
3580
3602
  n(this, "database");
3581
3603
  n(this, "history");
3582
3604
  n(this, "config");
3605
+ n(this, "drawTime", 0);
3583
3606
  const {
3584
3607
  containerElement: i,
3585
3608
  stageElement: s,
@@ -3950,7 +3973,7 @@ class ve {
3950
3973
  n(this, "renderFixedCellHeaders", []);
3951
3974
  this.ctx = t, this.ctx.on(
3952
3975
  "resetHeader",
3953
- xt(() => {
3976
+ Z(() => {
3954
3977
  this.init(), this.ctx.emit("draw");
3955
3978
  }, 100)
3956
3979
  ), this.init(), this.initResizeColumn();
@@ -3960,7 +3983,7 @@ class ve {
3960
3983
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3961
3984
  } = this.ctx, i = this.ctx.database.getColumns();
3962
3985
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3963
- const s = Dt(i), o = et(i);
3986
+ const s = Dt(i), o = it(i);
3964
3987
  this.height = t * s, this.width = o.reduce((f, u) => {
3965
3988
  const x = u.width || 100, { maxWidth: w, minWidth: m } = u;
3966
3989
  return w && x > w ? f + w : m && x < m ? f + m : f + x;
@@ -4066,8 +4089,8 @@ class ve {
4066
4089
  for (let r = 0; r < i; r++) {
4067
4090
  const a = t[r], h = o * (a.rowspan || 0), l = o * (a.level || 0);
4068
4091
  let { minWidth: d, maxWidth: f } = a, u = a.width || 100;
4069
- d && u < d && (u = d), f && u > f && (u = f), a.children && (u = et(a.children).reduce((m, g) => m + ((g == null ? void 0 : g.width) || 100), 0));
4070
- const x = new lt(this.ctx, this.columnIndex, s, l, u, h, a);
4092
+ d && u < d && (u = d), f && u > f && (u = f), a.children && (u = it(a.children).reduce((m, g) => m + ((g == null ? void 0 : g.width) || 100), 0));
4093
+ const x = new ct(this.ctx, this.columnIndex, s, l, u, h, a);
4071
4094
  this.ctx.database.setHeader(a.key, x), this.allCellHeaders.push(x), a.children || (this.leafCellHeaders.push(x), x.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(x) : a.fixed === "right" ? this.fixedRightCellHeaders.push(x) : this.centerCellHeaders.push(x), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += u;
4072
4095
  }
4073
4096
  }
@@ -4534,7 +4557,7 @@ class Te {
4534
4557
  this.moveFocus(t);
4535
4558
  }), this.ctx.on(
4536
4559
  "mousemove",
4537
- xt((t) => {
4560
+ Z((t) => {
4538
4561
  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;
4539
4562
  (this.ctx.selectorMove || this.ctx.autofillMove) && (!s && !this.mousedownHeader ? this.startAdjustPosition(t) : this.stopAdjustPosition());
4540
4563
  }, 100)
@@ -5189,7 +5212,7 @@ class Oe {
5189
5212
  destroy() {
5190
5213
  }
5191
5214
  }
5192
- const j = Math.min, $ = Math.max, it = Math.round, B = (c) => ({
5215
+ const j = Math.min, $ = Math.max, st = Math.round, B = (c) => ({
5193
5216
  x: c,
5194
5217
  y: c
5195
5218
  }), Le = {
@@ -5201,16 +5224,16 @@ const j = Math.min, $ = Math.max, it = Math.round, B = (c) => ({
5201
5224
  start: "end",
5202
5225
  end: "start"
5203
5226
  };
5204
- function ct(c, t, e) {
5227
+ function dt(c, t, e) {
5205
5228
  return $(c, j(t, e));
5206
5229
  }
5207
- function J(c, t) {
5230
+ function Q(c, t) {
5208
5231
  return typeof c == "function" ? c(t) : c;
5209
5232
  }
5210
5233
  function z(c) {
5211
5234
  return c.split("-")[0];
5212
5235
  }
5213
- function Q(c) {
5236
+ function tt(c) {
5214
5237
  return c.split("-")[1];
5215
5238
  }
5216
5239
  function Kt(c) {
@@ -5228,15 +5251,15 @@ function mt(c) {
5228
5251
  }
5229
5252
  function He(c, t, e) {
5230
5253
  e === void 0 && (e = !1);
5231
- const i = Q(c), s = mt(c), o = wt(s);
5254
+ const i = tt(c), s = mt(c), o = wt(s);
5232
5255
  let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
5233
- return t.reference[o] > t.floating[o] && (r = st(r)), [r, st(r)];
5256
+ return t.reference[o] > t.floating[o] && (r = ot(r)), [r, ot(r)];
5234
5257
  }
5235
5258
  function De(c) {
5236
- const t = st(c);
5237
- return [dt(c), t, dt(t)];
5259
+ const t = ot(c);
5260
+ return [ft(c), t, ft(t)];
5238
5261
  }
5239
- function dt(c) {
5262
+ function ft(c) {
5240
5263
  return c.replace(/start|end/g, (t) => Me[t]);
5241
5264
  }
5242
5265
  const _t = ["left", "right"], Tt = ["right", "left"], Ne = ["top", "bottom"], ke = ["bottom", "top"];
@@ -5253,11 +5276,11 @@ function Xe(c, t, e) {
5253
5276
  }
5254
5277
  }
5255
5278
  function Ye(c, t, e, i) {
5256
- const s = Q(c);
5279
+ const s = tt(c);
5257
5280
  let o = Xe(z(c), e === "start", i);
5258
- return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(dt)))), o;
5281
+ return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(ft)))), o;
5259
5282
  }
5260
- function st(c) {
5283
+ function ot(c) {
5261
5284
  return c.replace(/left|right|bottom|top/g, (t) => Le[t]);
5262
5285
  }
5263
5286
  function Be(c) {
@@ -5277,7 +5300,7 @@ function Wt(c) {
5277
5300
  left: c
5278
5301
  };
5279
5302
  }
5280
- function ot(c) {
5303
+ function rt(c) {
5281
5304
  const {
5282
5305
  x: t,
5283
5306
  y: e,
@@ -5333,7 +5356,7 @@ function Ot(c, t, e) {
5333
5356
  y: i.y
5334
5357
  };
5335
5358
  }
5336
- switch (Q(t)) {
5359
+ switch (tt(t)) {
5337
5360
  case "start":
5338
5361
  x[r] -= u * (e && l ? -1 : 1);
5339
5362
  break;
@@ -5420,7 +5443,7 @@ async function Ft(c, t) {
5420
5443
  elementContext: f = "floating",
5421
5444
  altBoundary: u = !1,
5422
5445
  padding: x = 0
5423
- } = J(t, c), w = Wt(x), g = a[u ? f === "floating" ? "reference" : "floating" : f], p = ot(await o.getClippingRect({
5446
+ } = Q(t, c), w = Wt(x), g = a[u ? f === "floating" ? "reference" : "floating" : f], p = rt(await o.getClippingRect({
5424
5447
  element: (e = await (o.isElement == null ? void 0 : o.isElement(g))) == null || e ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
5425
5448
  boundary: l,
5426
5449
  rootBoundary: d,
@@ -5436,7 +5459,7 @@ async function Ft(c, t) {
5436
5459
  } : {
5437
5460
  x: 1,
5438
5461
  y: 1
5439
- }, C = ot(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5462
+ }, C = rt(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5440
5463
  elements: a,
5441
5464
  rect: y,
5442
5465
  offsetParent: E,
@@ -5464,7 +5487,7 @@ const We = (c) => ({
5464
5487
  } = t, {
5465
5488
  element: l,
5466
5489
  padding: d = 0
5467
- } = J(c, t) || {};
5490
+ } = Q(c, t) || {};
5468
5491
  if (l == null)
5469
5492
  return {};
5470
5493
  const f = Wt(d), u = {
@@ -5473,7 +5496,7 @@ const We = (c) => ({
5473
5496
  }, x = mt(s), w = wt(x), m = await r.getDimensions(l), g = x === "y", p = g ? "top" : "left", y = g ? "bottom" : "right", E = g ? "clientHeight" : "clientWidth", R = o.reference[w] + o.reference[x] - u[x] - o.floating[w], C = u[x] - o.reference[x], I = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
5474
5497
  let S = I ? I[E] : 0;
5475
5498
  (!S || !await (r.isElement == null ? void 0 : r.isElement(I))) && (S = a.floating[E] || o.floating[w]);
5476
- const _ = R / 2 - C / 2, v = S / 2 - m[w] / 2 - 1, b = j(f[p], v), O = j(f[y], v), T = b, M = S - m[w] - O, L = S / 2 - m[w] / 2 + _, A = ct(T, L, M), D = !h.arrow && Q(s) != null && L !== A && o.reference[w] / 2 - (L < T ? b : O) - m[w] / 2 < 0, N = D ? L < T ? L - T : L - M : 0;
5499
+ const _ = R / 2 - C / 2, v = S / 2 - m[w] / 2 - 1, b = j(f[p], v), O = j(f[y], v), T = b, M = S - m[w] - O, L = S / 2 - m[w] / 2 + _, A = dt(T, L, M), D = !h.arrow && tt(s) != null && L !== A && o.reference[w] / 2 - (L < T ? b : O) - m[w] / 2 < 0, N = D ? L < T ? L - T : L - M : 0;
5477
5500
  return {
5478
5501
  [x]: u[x] + N,
5479
5502
  data: {
@@ -5507,10 +5530,10 @@ const We = (c) => ({
5507
5530
  fallbackAxisSideDirection: w = "none",
5508
5531
  flipAlignment: m = !0,
5509
5532
  ...g
5510
- } = J(c, t);
5533
+ } = Q(c, t);
5511
5534
  if ((e = o.arrow) != null && e.alignmentOffset)
5512
5535
  return {};
5513
- const p = z(s), y = V(a), E = z(a) === a, R = await (h.isRTL == null ? void 0 : h.isRTL(l.floating)), C = u || (E || !m ? [st(a)] : De(a)), I = w !== "none";
5536
+ const p = z(s), y = V(a), E = z(a) === a, R = await (h.isRTL == null ? void 0 : h.isRTL(l.floating)), C = u || (E || !m ? [ot(a)] : De(a)), I = w !== "none";
5514
5537
  !u && I && C.push(...Ye(a, m, w, R));
5515
5538
  const S = [a, ...C], _ = await Ft(t, g), v = [];
5516
5539
  let b = ((i = o.flip) == null ? void 0 : i.overflows) || [];
@@ -5573,7 +5596,7 @@ async function Pe(c, t) {
5573
5596
  placement: e,
5574
5597
  platform: i,
5575
5598
  elements: s
5576
- } = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = z(e), a = Q(e), h = V(e) === "y", l = Ve.has(r) ? -1 : 1, d = o && h ? -1 : 1, f = J(t, c);
5599
+ } = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = z(e), a = tt(e), h = V(e) === "y", l = Ve.has(r) ? -1 : 1, d = o && h ? -1 : 1, f = Q(t, c);
5577
5600
  let {
5578
5601
  mainAxis: u,
5579
5602
  crossAxis: x,
@@ -5642,18 +5665,18 @@ const ze = function(c) {
5642
5665
  }
5643
5666
  },
5644
5667
  ...h
5645
- } = J(c, t), l = {
5668
+ } = Q(c, t), l = {
5646
5669
  x: e,
5647
5670
  y: i
5648
5671
  }, d = await Ft(t, h), f = V(z(s)), u = Kt(f);
5649
5672
  let x = l[u], w = l[f];
5650
5673
  if (o) {
5651
5674
  const g = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", y = x + d[g], E = x - d[p];
5652
- x = ct(y, x, E);
5675
+ x = dt(y, x, E);
5653
5676
  }
5654
5677
  if (r) {
5655
5678
  const g = f === "y" ? "top" : "left", p = f === "y" ? "bottom" : "right", y = w + d[g], E = w - d[p];
5656
- w = ct(y, w, E);
5679
+ w = dt(y, w, E);
5657
5680
  }
5658
5681
  const m = a.fn({
5659
5682
  ...t,
@@ -5674,10 +5697,10 @@ const ze = function(c) {
5674
5697
  }
5675
5698
  };
5676
5699
  };
5677
- function rt() {
5700
+ function nt() {
5678
5701
  return typeof window < "u";
5679
5702
  }
5680
- function Z(c) {
5703
+ function q(c) {
5681
5704
  return Vt(c) ? (c.nodeName || "").toLowerCase() : "#document";
5682
5705
  }
5683
5706
  function H(c) {
@@ -5689,19 +5712,19 @@ function W(c) {
5689
5712
  return (t = (Vt(c) ? c.ownerDocument : c.document) || window.document) == null ? void 0 : t.documentElement;
5690
5713
  }
5691
5714
  function Vt(c) {
5692
- return rt() ? c instanceof Node || c instanceof H(c).Node : !1;
5715
+ return nt() ? c instanceof Node || c instanceof H(c).Node : !1;
5693
5716
  }
5694
5717
  function X(c) {
5695
- return rt() ? c instanceof Element || c instanceof H(c).Element : !1;
5718
+ return nt() ? c instanceof Element || c instanceof H(c).Element : !1;
5696
5719
  }
5697
5720
  function K(c) {
5698
- return rt() ? c instanceof HTMLElement || c instanceof H(c).HTMLElement : !1;
5721
+ return nt() ? c instanceof HTMLElement || c instanceof H(c).HTMLElement : !1;
5699
5722
  }
5700
5723
  function Lt(c) {
5701
- return !rt() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof H(c).ShadowRoot;
5724
+ return !nt() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof H(c).ShadowRoot;
5702
5725
  }
5703
5726
  const Ge = /* @__PURE__ */ new Set(["inline", "contents"]);
5704
- function tt(c) {
5727
+ function et(c) {
5705
5728
  const {
5706
5729
  overflow: t,
5707
5730
  overflowX: e,
@@ -5711,12 +5734,12 @@ function tt(c) {
5711
5734
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !Ge.has(s);
5712
5735
  }
5713
5736
  const Ue = /* @__PURE__ */ new Set(["table", "td", "th"]);
5714
- function Ze(c) {
5715
- return Ue.has(Z(c));
5737
+ function qe(c) {
5738
+ return Ue.has(q(c));
5716
5739
  }
5717
- const je = [":popover-open", ":modal"];
5718
- function nt(c) {
5719
- return je.some((t) => {
5740
+ const Ze = [":popover-open", ":modal"];
5741
+ function at(c) {
5742
+ return Ze.some((t) => {
5720
5743
  try {
5721
5744
  return c.matches(t);
5722
5745
  } catch {
@@ -5724,17 +5747,17 @@ function nt(c) {
5724
5747
  }
5725
5748
  });
5726
5749
  }
5727
- const qe = ["transform", "translate", "scale", "rotate", "perspective"], Je = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Qe = ["paint", "layout", "strict", "content"];
5750
+ const je = ["transform", "translate", "scale", "rotate", "perspective"], Je = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Qe = ["paint", "layout", "strict", "content"];
5728
5751
  function pt(c) {
5729
5752
  const t = Et(), e = X(c) ? Y(c) : c;
5730
- return qe.some((i) => e[i] ? e[i] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || Je.some((i) => (e.willChange || "").includes(i)) || Qe.some((i) => (e.contain || "").includes(i));
5753
+ return je.some((i) => e[i] ? e[i] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || Je.some((i) => (e.willChange || "").includes(i)) || Qe.some((i) => (e.contain || "").includes(i));
5731
5754
  }
5732
5755
  function ti(c) {
5733
5756
  let t = P(c);
5734
5757
  for (; K(t) && !U(t); ) {
5735
5758
  if (pt(t))
5736
5759
  return t;
5737
- if (nt(t))
5760
+ if (at(t))
5738
5761
  return null;
5739
5762
  t = P(t);
5740
5763
  }
@@ -5745,12 +5768,12 @@ function Et() {
5745
5768
  }
5746
5769
  const ei = /* @__PURE__ */ new Set(["html", "body", "#document"]);
5747
5770
  function U(c) {
5748
- return ei.has(Z(c));
5771
+ return ei.has(q(c));
5749
5772
  }
5750
5773
  function Y(c) {
5751
5774
  return H(c).getComputedStyle(c);
5752
5775
  }
5753
- function at(c) {
5776
+ function ht(c) {
5754
5777
  return X(c) ? {
5755
5778
  scrollLeft: c.scrollLeft,
5756
5779
  scrollTop: c.scrollTop
@@ -5760,7 +5783,7 @@ function at(c) {
5760
5783
  };
5761
5784
  }
5762
5785
  function P(c) {
5763
- if (Z(c) === "html")
5786
+ if (q(c) === "html")
5764
5787
  return c;
5765
5788
  const t = (
5766
5789
  // Step into the shadow DOM of the parent of a slotted node.
@@ -5773,21 +5796,21 @@ function P(c) {
5773
5796
  }
5774
5797
  function Pt(c) {
5775
5798
  const t = P(c);
5776
- return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : K(t) && tt(t) ? t : Pt(t);
5799
+ return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : K(t) && et(t) ? t : Pt(t);
5777
5800
  }
5778
5801
  function zt(c, t, e) {
5779
5802
  var i;
5780
5803
  t === void 0 && (t = []);
5781
5804
  const s = Pt(c), o = s === ((i = c.ownerDocument) == null ? void 0 : i.body), r = H(s);
5782
- return o ? (ft(r), t.concat(r, r.visualViewport || [], tt(s) ? s : [], [])) : t.concat(s, zt(s, []));
5805
+ return o ? (xt(r), t.concat(r, r.visualViewport || [], et(s) ? s : [], [])) : t.concat(s, zt(s, []));
5783
5806
  }
5784
- function ft(c) {
5807
+ function xt(c) {
5785
5808
  return c.parent && Object.getPrototypeOf(c.parent) ? c.frameElement : null;
5786
5809
  }
5787
5810
  function $t(c) {
5788
5811
  const t = Y(c);
5789
5812
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5790
- const s = K(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, a = it(e) !== o || it(i) !== r;
5813
+ const s = K(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, a = st(e) !== o || st(i) !== r;
5791
5814
  return a && (e = o, i = r), {
5792
5815
  width: e,
5793
5816
  height: i,
@@ -5806,7 +5829,7 @@ function G(c) {
5806
5829
  height: s,
5807
5830
  $: o
5808
5831
  } = $t(t);
5809
- let r = (o ? it(e.width) : e.width) / i, a = (o ? it(e.height) : e.height) / s;
5832
+ let r = (o ? st(e.width) : e.width) / i, a = (o ? st(e.height) : e.height) / s;
5810
5833
  return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
5811
5834
  x: r,
5812
5835
  y: a
@@ -5823,7 +5846,7 @@ function Ut(c) {
5823
5846
  function si(c, t, e) {
5824
5847
  return t === void 0 && (t = !1), !e || t && e !== H(c) ? !1 : t;
5825
5848
  }
5826
- function q(c, t, e, i) {
5849
+ function J(c, t, e, i) {
5827
5850
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5828
5851
  const s = c.getBoundingClientRect(), o = Gt(c);
5829
5852
  let r = B(1);
@@ -5832,13 +5855,13 @@ function q(c, t, e, i) {
5832
5855
  let h = (s.left + a.x) / r.x, l = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
5833
5856
  if (o) {
5834
5857
  const u = H(o), x = i && X(i) ? H(i) : i;
5835
- let w = u, m = ft(w);
5858
+ let w = u, m = xt(w);
5836
5859
  for (; m && i && x !== w; ) {
5837
5860
  const g = G(m), p = m.getBoundingClientRect(), y = Y(m), E = p.left + (m.clientLeft + parseFloat(y.paddingLeft)) * g.x, R = p.top + (m.clientTop + parseFloat(y.paddingTop)) * g.y;
5838
- h *= g.x, l *= g.y, d *= g.x, f *= g.y, h += E, l += R, w = H(m), m = ft(w);
5861
+ h *= g.x, l *= g.y, d *= g.x, f *= g.y, h += E, l += R, w = H(m), m = xt(w);
5839
5862
  }
5840
5863
  }
5841
- return ot({
5864
+ return rt({
5842
5865
  width: d,
5843
5866
  height: f,
5844
5867
  x: h,
@@ -5846,10 +5869,10 @@ function q(c, t, e, i) {
5846
5869
  });
5847
5870
  }
5848
5871
  function yt(c, t) {
5849
- const e = at(c).scrollLeft;
5850
- return t ? t.left + e : q(W(c)).left + e;
5872
+ const e = ht(c).scrollLeft;
5873
+ return t ? t.left + e : J(W(c)).left + e;
5851
5874
  }
5852
- function Zt(c, t, e) {
5875
+ function qt(c, t, e) {
5853
5876
  e === void 0 && (e = !1);
5854
5877
  const i = c.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
5855
5878
  // RTL <body> scrollbar.
@@ -5867,7 +5890,7 @@ function oi(c) {
5867
5890
  offsetParent: i,
5868
5891
  strategy: s
5869
5892
  } = c;
5870
- const o = s === "fixed", r = W(i), a = t ? nt(t.floating) : !1;
5893
+ const o = s === "fixed", r = W(i), a = t ? at(t.floating) : !1;
5871
5894
  if (i === r || a && o)
5872
5895
  return e;
5873
5896
  let h = {
@@ -5875,11 +5898,11 @@ function oi(c) {
5875
5898
  scrollTop: 0
5876
5899
  }, l = B(1);
5877
5900
  const d = B(0), f = K(i);
5878
- if ((f || !f && !o) && ((Z(i) !== "body" || tt(r)) && (h = at(i)), K(i))) {
5879
- const x = q(i);
5901
+ if ((f || !f && !o) && ((q(i) !== "body" || et(r)) && (h = ht(i)), K(i))) {
5902
+ const x = J(i);
5880
5903
  l = G(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5881
5904
  }
5882
- const u = r && !f && !o ? Zt(r, h, !0) : B(0);
5905
+ const u = r && !f && !o ? qt(r, h, !0) : B(0);
5883
5906
  return {
5884
5907
  width: e.width * l.x,
5885
5908
  height: e.height * l.y,
@@ -5891,7 +5914,7 @@ function ri(c) {
5891
5914
  return Array.from(c.getClientRects());
5892
5915
  }
5893
5916
  function ni(c) {
5894
- const t = W(c), e = at(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5917
+ const t = W(c), e = ht(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5895
5918
  let r = -e.scrollLeft + yt(c);
5896
5919
  const a = -e.scrollTop;
5897
5920
  return Y(i).direction === "rtl" && (r += $(t.clientWidth, i.clientWidth) - s), {
@@ -5918,7 +5941,7 @@ function ai(c, t) {
5918
5941
  }
5919
5942
  const hi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
5920
5943
  function li(c, t) {
5921
- const e = q(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = K(c) ? G(c) : B(1), r = c.clientWidth * o.x, a = c.clientHeight * o.y, h = s * o.x, l = i * o.y;
5944
+ const e = J(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = K(c) ? G(c) : B(1), r = c.clientWidth * o.x, a = c.clientHeight * o.y, h = s * o.x, l = i * o.y;
5922
5945
  return {
5923
5946
  width: r,
5924
5947
  height: a,
@@ -5943,22 +5966,22 @@ function Mt(c, t, e) {
5943
5966
  height: t.height
5944
5967
  };
5945
5968
  }
5946
- return ot(i);
5969
+ return rt(i);
5947
5970
  }
5948
- function jt(c, t) {
5971
+ function Zt(c, t) {
5949
5972
  const e = P(c);
5950
- return e === t || !X(e) || U(e) ? !1 : Y(e).position === "fixed" || jt(e, t);
5973
+ return e === t || !X(e) || U(e) ? !1 : Y(e).position === "fixed" || Zt(e, t);
5951
5974
  }
5952
5975
  function ci(c, t) {
5953
5976
  const e = t.get(c);
5954
5977
  if (e)
5955
5978
  return e;
5956
- let i = zt(c, []).filter((a) => X(a) && Z(a) !== "body"), s = null;
5979
+ let i = zt(c, []).filter((a) => X(a) && q(a) !== "body"), s = null;
5957
5980
  const o = Y(c).position === "fixed";
5958
5981
  let r = o ? P(c) : c;
5959
5982
  for (; X(r) && !U(r); ) {
5960
5983
  const a = Y(r), h = pt(r);
5961
- !h && a.position === "fixed" && (s = null), (o ? !h && !s : !h && a.position === "static" && !!s && hi.has(s.position) || tt(r) && !h && jt(c, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
5984
+ !h && a.position === "fixed" && (s = null), (o ? !h && !s : !h && a.position === "static" && !!s && hi.has(s.position) || et(r) && !h && Zt(c, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
5962
5985
  }
5963
5986
  return t.set(c, i), i;
5964
5987
  }
@@ -5969,7 +5992,7 @@ function di(c) {
5969
5992
  rootBoundary: i,
5970
5993
  strategy: s
5971
5994
  } = c;
5972
- const r = [...e === "clippingAncestors" ? nt(t) ? [] : ci(t, this._c) : [].concat(e), i], a = r[0], h = r.reduce((l, d) => {
5995
+ const r = [...e === "clippingAncestors" ? at(t) ? [] : ci(t, this._c) : [].concat(e), i], a = r[0], h = r.reduce((l, d) => {
5973
5996
  const f = Mt(t, d, s);
5974
5997
  return l.top = $(f.top, l.top), l.right = j(f.right, l.right), l.bottom = j(f.bottom, l.bottom), l.left = $(f.left, l.left), l;
5975
5998
  }, Mt(t, a, s));
@@ -5991,7 +6014,7 @@ function fi(c) {
5991
6014
  };
5992
6015
  }
5993
6016
  function xi(c, t, e) {
5994
- const i = K(t), s = W(t), o = e === "fixed", r = q(c, !0, o, t);
6017
+ const i = K(t), s = W(t), o = e === "fixed", r = J(c, !0, o, t);
5995
6018
  let a = {
5996
6019
  scrollLeft: 0,
5997
6020
  scrollTop: 0
@@ -6001,12 +6024,12 @@ function xi(c, t, e) {
6001
6024
  h.x = yt(s);
6002
6025
  }
6003
6026
  if (i || !i && !o)
6004
- if ((Z(t) !== "body" || tt(s)) && (a = at(t)), i) {
6005
- const x = q(t, !0, o, t);
6027
+ if ((q(t) !== "body" || et(s)) && (a = ht(t)), i) {
6028
+ const x = J(t, !0, o, t);
6006
6029
  h.x = x.x + t.clientLeft, h.y = x.y + t.clientTop;
6007
6030
  } else s && l();
6008
6031
  o && !i && s && l();
6009
- const d = s && !i && !o ? Zt(s, a) : B(0), f = r.left + a.scrollLeft - h.x - d.x, u = r.top + a.scrollTop - h.y - d.y;
6032
+ const d = s && !i && !o ? qt(s, a) : B(0), f = r.left + a.scrollLeft - h.x - d.x, u = r.top + a.scrollTop - h.y - d.y;
6010
6033
  return {
6011
6034
  x: f,
6012
6035
  y: u,
@@ -6014,7 +6037,7 @@ function xi(c, t, e) {
6014
6037
  height: r.height
6015
6038
  };
6016
6039
  }
6017
- function ht(c) {
6040
+ function lt(c) {
6018
6041
  return Y(c).position === "static";
6019
6042
  }
6020
6043
  function At(c, t) {
@@ -6025,26 +6048,26 @@ function At(c, t) {
6025
6048
  let e = c.offsetParent;
6026
6049
  return W(c) === e && (e = e.ownerDocument.body), e;
6027
6050
  }
6028
- function qt(c, t) {
6051
+ function jt(c, t) {
6029
6052
  const e = H(c);
6030
- if (nt(c))
6053
+ if (at(c))
6031
6054
  return e;
6032
6055
  if (!K(c)) {
6033
6056
  let s = P(c);
6034
6057
  for (; s && !U(s); ) {
6035
- if (X(s) && !ht(s))
6058
+ if (X(s) && !lt(s))
6036
6059
  return s;
6037
6060
  s = P(s);
6038
6061
  }
6039
6062
  return e;
6040
6063
  }
6041
6064
  let i = At(c, t);
6042
- for (; i && Ze(i) && ht(i); )
6065
+ for (; i && qe(i) && lt(i); )
6043
6066
  i = At(i, t);
6044
- return i && U(i) && ht(i) && !pt(i) ? e : i || ti(c) || e;
6067
+ return i && U(i) && lt(i) && !pt(i) ? e : i || ti(c) || e;
6045
6068
  }
6046
6069
  const ui = async function(c) {
6047
- const t = this.getOffsetParent || qt, e = this.getDimensions, i = await e(c.floating);
6070
+ const t = this.getOffsetParent || jt, e = this.getDimensions, i = await e(c.floating);
6048
6071
  return {
6049
6072
  reference: xi(c.reference, await t(c.floating), c.strategy),
6050
6073
  floating: {
@@ -6062,7 +6085,7 @@ const wi = {
6062
6085
  convertOffsetParentRelativeRectToViewportRelativeRect: oi,
6063
6086
  getDocumentElement: W,
6064
6087
  getClippingRect: di,
6065
- getOffsetParent: qt,
6088
+ getOffsetParent: jt,
6066
6089
  getElementRects: ui,
6067
6090
  getClientRects: ri,
6068
6091
  getDimensions: fi,
@@ -6425,7 +6448,7 @@ class Ci {
6425
6448
  n(this, "ctx");
6426
6449
  n(this, "observer");
6427
6450
  this.ctx = t, this.observer = new MutationObserver(
6428
- xt(() => {
6451
+ Z(() => {
6429
6452
  const e = this.ctx.overlayerElement.querySelectorAll('[data-auto-height="true"]'), i = /* @__PURE__ */ new Map();
6430
6453
  e.forEach((r) => {
6431
6454
  const a = Number(r.getAttribute("data-row-index")), h = Number(r.getAttribute("data-col-index"));
@@ -6748,11 +6771,23 @@ class vi {
6748
6771
  o,
6749
6772
  r
6750
6773
  );
6751
- this.ctx = new Re(a, this.options), this.header = new ve(this.ctx), this.footer = new _e(this.ctx), this.body = new Se(this.ctx), this.scroller = new Ie(this.ctx), this.selector = new Te(this.ctx), this.autofill = new Oe(this.ctx), this.tooltip = new pi(this.ctx), this.empty = new yi(this.ctx), this.editor = new Ei(this.ctx), this.overlayer = new Ci(this.ctx), this.contextMenu = new bi(this.ctx), this.ctx.on("draw", () => {
6752
- this.draw();
6753
- }), this.ctx.on("drawView", () => {
6754
- this.draw(!0);
6755
- }), this.draw();
6774
+ this.ctx = new Re(a, this.options), this.header = new ve(this.ctx), this.footer = new _e(this.ctx), this.body = new Se(this.ctx), this.scroller = new Ie(this.ctx), this.selector = new Te(this.ctx), this.autofill = new Oe(this.ctx), this.tooltip = new pi(this.ctx), this.empty = new yi(this.ctx), this.editor = new Ei(this.ctx), this.overlayer = new Ci(this.ctx), this.contextMenu = new bi(this.ctx), this.ctx.on(
6775
+ "draw",
6776
+ Z(
6777
+ () => {
6778
+ this.draw();
6779
+ },
6780
+ () => this.ctx.drawTime
6781
+ )
6782
+ ), this.ctx.on(
6783
+ "drawView",
6784
+ Z(
6785
+ () => {
6786
+ this.draw(!0);
6787
+ },
6788
+ () => this.ctx.drawTime
6789
+ )
6790
+ ), this.draw();
6756
6791
  }
6757
6792
  createContainer(t, e, i, s, o) {
6758
6793
  t.className = "e-virt-table-container";
@@ -6773,7 +6808,12 @@ class vi {
6773
6808
  }
6774
6809
  draw(t = !1) {
6775
6810
  requestAnimationFrame(() => {
6776
- this.header.update(), this.footer.update(), this.body.update(), this.ctx.paint.clear(), this.body.draw(), this.footer.draw(), this.header.draw(), this.scroller.draw(), t || this.overlayer.draw(), this.body.updateAutoHeight();
6811
+ const e = performance.now();
6812
+ this.header.update(), this.footer.update(), this.body.update(), this.ctx.paint.clear(), this.body.draw(), this.footer.draw(), this.header.draw(), this.scroller.draw(), t || this.overlayer.draw(), requestAnimationFrame(() => {
6813
+ this.body.updateAutoHeight();
6814
+ });
6815
+ const i = performance.now(), s = Math.round(i - e);
6816
+ this.ctx.drawTime = s * this.ctx.config.DRAW_TIME_MULTIPLIER;
6777
6817
  });
6778
6818
  }
6779
6819
  loadConfig(t) {