e-virt-table 1.2.26 → 1.2.27

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,21 +1,21 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: transparent;--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-line-color: #e1e6eb;--evt-tree-line-color: #e1e6eb;--evt-sort-icon-color: rgb(82, 146, 247)}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-readonly-text-color: #cfd3dc;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:8px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  var se = Object.defineProperty;
3
- var oe = (h, t, e) => t in h ? se(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
4
- var n = (h, t, e) => oe(h, typeof t != "symbol" ? t + "" : t, e);
3
+ var oe = (l, t, e) => t in l ? se(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
4
+ var n = (l, t, e) => oe(l, typeof t != "symbol" ? t + "" : t, e);
5
5
  class re {
6
6
  constructor(t) {
7
7
  n(this, "rules");
8
8
  this.rules = t;
9
9
  }
10
10
  validate(t) {
11
- const e = [], { column: i, row: s, key: o, rowKey: r, colIndex: a, rowIndex: c, value: l, field: d, fieldValue: f } = t;
11
+ const e = [], { column: i, row: s, key: o, rowKey: r, colIndex: a, rowIndex: c, value: h, field: d, fieldValue: f } = t;
12
12
  Array.isArray(this.rules) || (this.rules = [this.rules]);
13
13
  for (const u of this.rules) {
14
14
  if (u.validator) {
15
15
  const x = {
16
16
  field: d,
17
17
  fieldValue: f,
18
- value: l,
18
+ value: h,
19
19
  column: i,
20
20
  colIndex: a,
21
21
  rowIndex: c,
@@ -24,17 +24,17 @@ class re {
24
24
  rowKey: r,
25
25
  ...u
26
26
  };
27
- u.validator(x, l, (w) => {
27
+ u.validator(x, h, (w) => {
28
28
  w && e.push({
29
29
  ...x,
30
30
  message: w
31
31
  });
32
32
  });
33
33
  }
34
- if (!u.required && (l == null || l === ""))
34
+ if (!u.required && (h == null || h === ""))
35
35
  return e;
36
- u.pattern && !u.pattern.test(l) && e.push({
37
- value: l,
36
+ u.pattern && !u.pattern.test(h) && e.push({
37
+ value: h,
38
38
  column: i,
39
39
  row: s,
40
40
  key: o,
@@ -44,8 +44,8 @@ class re {
44
44
  field: d,
45
45
  fieldValue: f,
46
46
  message: u.message || `${o} is pattern validation error`
47
- }), u.required && (l == null || l === "") && e.push({
48
- value: l,
47
+ }), u.required && (h == null || h === "") && e.push({
48
+ value: h,
49
49
  column: i,
50
50
  row: s,
51
51
  key: o,
@@ -61,26 +61,26 @@ class re {
61
61
  }
62
62
  }
63
63
  function Mt() {
64
- return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(h) {
64
+ return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(l) {
65
65
  const t = Math.random() * 16 | 0;
66
- return (h === "x" ? t : t & 3 | 8).toString(16);
66
+ return (l === "x" ? t : t & 3 | 8).toString(16);
67
67
  });
68
68
  }
69
- function Ht(h, t) {
69
+ function Ht(l, t) {
70
70
  let e = 0, i;
71
71
  return function(...s) {
72
72
  const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e;
73
- !e || r >= t ? (h.apply(this, s), e = o) : i || (i = setTimeout(() => {
74
- h.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
73
+ !e || r >= t ? (l.apply(this, s), e = o) : i || (i = setTimeout(() => {
74
+ l.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
75
75
  }, t - r));
76
76
  };
77
77
  }
78
- function Dt(h = []) {
79
- return h.length ? h.map((t) => Dt(t.children) + 1).sort((t, e) => e - t)[0] : 0;
78
+ function Dt(l = []) {
79
+ return l.length ? l.map((t) => Dt(t.children) + 1).sort((t, e) => e - t)[0] : 0;
80
80
  }
81
- function ne(h = []) {
81
+ function ne(l = []) {
82
82
  let t = [], e = [], i = [];
83
- return h.forEach((s) => {
83
+ return l.forEach((s) => {
84
84
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
85
85
  }), [
86
86
  ...t.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0)),
@@ -88,8 +88,8 @@ function ne(h = []) {
88
88
  ...i.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0))
89
89
  ];
90
90
  }
91
- function Nt(h = [], t = 1, e = 0) {
92
- return h.map((i) => {
91
+ function Nt(l = [], t = 1, e = 0) {
92
+ return l.map((i) => {
93
93
  if (i.children) {
94
94
  let s = 0, o = i.fixed;
95
95
  i.children.forEach((a) => {
@@ -115,72 +115,72 @@ function Nt(h = [], t = 1, e = 0) {
115
115
  };
116
116
  });
117
117
  }
118
- function et(h = []) {
118
+ function et(l = []) {
119
119
  let t = [];
120
- return h.forEach((e) => {
120
+ return l.forEach((e) => {
121
121
  e.children ? t = t.concat(et(e.children)) : t.push(e);
122
122
  }), t;
123
123
  }
124
124
  const yt = /^(\r\n|\n\r|\r|\n)/, ae = /^[^\t\r\n]+/, Ct = /^\t/;
125
- function ce(h) {
125
+ function ce(l) {
126
126
  let t = [[""]];
127
- if (h.length === 0)
127
+ if (l.length === 0)
128
128
  return t;
129
129
  let e = 0, i = 0, s;
130
- for (; h.length > 0 && s !== h.length; )
131
- if (s = h.length, h.match(Ct))
132
- h = h.replace(Ct, ""), e += 1, t[i][e] = "";
133
- else if (h.match(yt))
134
- h = h.replace(yt, ""), e = 0, i += 1, t[i] = [""];
130
+ for (; l.length > 0 && s !== l.length; )
131
+ if (s = l.length, l.match(Ct))
132
+ l = l.replace(Ct, ""), e += 1, t[i][e] = "";
133
+ else if (l.match(yt))
134
+ l = l.replace(yt, ""), e = 0, i += 1, t[i] = [""];
135
135
  else {
136
136
  let o = "";
137
- if (h.startsWith('"')) {
137
+ if (l.startsWith('"')) {
138
138
  let r = 0, a = !0;
139
139
  for (; a; ) {
140
- const c = h.slice(0, 1);
141
- c === '"' && (r += 1), o += c, h = h.slice(1), (h.length === 0 || h.match(/^[\t\r\n]/) && r % 2 === 0) && (a = !1);
140
+ const c = l.slice(0, 1);
141
+ c === '"' && (r += 1), o += c, l = l.slice(1), (l.length === 0 || l.match(/^[\t\r\n]/) && r % 2 === 0) && (a = !1);
142
142
  }
143
143
  o = o.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (c) => new Array(Math.floor(c.length / 2)).fill('"').join(""));
144
144
  } else {
145
- const r = h.match(ae);
146
- o = r ? r[0] : "", h = h.slice(o.length);
145
+ const r = l.match(ae);
146
+ o = r ? r[0] : "", l = l.slice(o.length);
147
147
  }
148
148
  t[i][e] = o;
149
149
  }
150
150
  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;
151
151
  }
152
- function le(h) {
152
+ function he(l) {
153
153
  let t, e, i, s, o = "", r;
154
- for (t = 0, e = h.length; t < e; t += 1) {
155
- for (s = h[t].length, i = 0; i < s; i += 1)
156
- i > 0 && (o += " "), r = h[t][i], typeof r == "string" ? r.indexOf(`
154
+ for (t = 0, e = l.length; t < e; t += 1) {
155
+ for (s = l[t].length, i = 0; i < s; i += 1)
156
+ i > 0 && (o += " "), r = l[t][i], typeof r == "string" ? r.indexOf(`
157
157
  `) > -1 ? o += `"${r.replace(/"/g, '""')}"` : o += r : r == null ? o += "" : o += r;
158
158
  t !== e - 1 && (o += `
159
159
  `);
160
160
  }
161
161
  return o;
162
162
  }
163
- function kt(h, t, e = []) {
163
+ function kt(l, t, e = []) {
164
164
  let i = 0;
165
165
  const s = [];
166
- return h.forEach((o, r) => {
166
+ return l.forEach((o, r) => {
167
167
  if (r === 0)
168
168
  s.push(1);
169
169
  else {
170
- const a = e.reduce((l, d) => `${l}${o[d] ?? ""}`, "") || o[t], c = e.reduce((l, d) => `${l}${h[r - 1][d] ?? ""}`, "") || h[r - 1][t];
170
+ const a = e.reduce((h, d) => `${h}${o[d] ?? ""}`, "") || o[t], c = e.reduce((h, d) => `${h}${l[r - 1][d] ?? ""}`, "") || l[r - 1][t];
171
171
  a === c ? (s[i] += 1, s.push(0)) : (s.push(1), i = r);
172
172
  }
173
173
  }), s;
174
174
  }
175
- function Xt(h, t) {
175
+ function Xt(l, t) {
176
176
  let e = "", i = "";
177
177
  const s = {};
178
178
  return t.forEach((o, r) => {
179
- r === 0 ? (e = o.key, i = o.key, s[o.key] = 1) : h[o.key] === h[e] ? (s[o.key] = 0, s[i] += 1) : (s[o.key] = 1, e = o.key, i = o.key);
179
+ r === 0 ? (e = o.key, i = o.key, s[o.key] = 1) : l[o.key] === l[e] ? (s[o.key] = 0, s[i] += 1) : (s[o.key] = 1, e = o.key, i = o.key);
180
180
  }), s;
181
181
  }
182
- function he(h, t, e = []) {
183
- const { visibleRows: i, rowIndex: s, headIndex: o } = h, r = kt(i, t, e);
182
+ function le(l, t, e = []) {
183
+ const { visibleRows: i, rowIndex: s, headIndex: o } = l, r = kt(i, t, e);
184
184
  return r[s - o] === 0 ? {
185
185
  rowspan: 0,
186
186
  colspan: 0,
@@ -193,8 +193,8 @@ function he(h, t, e = []) {
193
193
  mergeRow: !0
194
194
  };
195
195
  }
196
- function de(h, t = []) {
197
- const { column: e, row: i, visibleLeafColumns: s } = h, o = s.filter((r) => t.includes(r.key));
196
+ function de(l, t = []) {
197
+ const { column: e, row: i, visibleLeafColumns: s } = l, o = s.filter((r) => t.includes(r.key));
198
198
  if (t.includes(e.key)) {
199
199
  const r = Xt(i, o);
200
200
  return r[e.key] === 0 ? {
@@ -210,15 +210,15 @@ function de(h, t = []) {
210
210
  };
211
211
  }
212
212
  }
213
- function fe(h, t = document.documentElement) {
214
- const e = h.startsWith("--") ? h : `--${h}`;
213
+ function fe(l, t = document.documentElement) {
214
+ const e = l.startsWith("--") ? l : `--${l}`;
215
215
  return getComputedStyle(t).getPropertyValue(e).trim();
216
216
  }
217
- function bt(h) {
218
- if (!h) return /* @__PURE__ */ new Date(0);
219
- if (typeof h == "number")
220
- return new Date(h);
221
- const t = String(h).trim(), e = new Date(t);
217
+ function bt(l) {
218
+ if (!l) return /* @__PURE__ */ new Date(0);
219
+ if (typeof l == "number")
220
+ return new Date(l);
221
+ const t = String(l).trim(), e = new Date(t);
222
222
  if (!isNaN(e.getTime()))
223
223
  return e;
224
224
  const i = [
@@ -252,24 +252,24 @@ function bt(h) {
252
252
  if (o) {
253
253
  const r = o.slice(1).map(Number);
254
254
  if (s.source.includes("YYYY-MM-DD") || s.source.includes("YYYY/MM/DD") || s.source.includes("YYYY.MM.DD")) {
255
- const [a, c, l, d = 0, f = 0, u = 0] = r;
256
- return new Date(a, c - 1, l, d, f, u);
255
+ const [a, c, h, d = 0, f = 0, u = 0] = r;
256
+ return new Date(a, c - 1, h, d, f, u);
257
257
  } else if (s.source.includes("DD-MM-YYYY") || s.source.includes("DD/MM/YYYY") || s.source.includes("DD.MM.YYYY")) {
258
- const [a, c, l, d = 0, f = 0, u = 0] = r;
259
- return new Date(l, c - 1, a, d, f, u);
258
+ const [a, c, h, d = 0, f = 0, u = 0] = r;
259
+ return new Date(h, c - 1, a, d, f, u);
260
260
  } else if (s.source.includes("MM-DD-YYYY") || s.source.includes("MM/DD/YYYY") || s.source.includes("MM.DD.YYYY")) {
261
- const [a, c, l, d = 0, f = 0, u = 0] = r;
262
- return new Date(l, a - 1, c, d, f, u);
261
+ const [a, c, h, d = 0, f = 0, u = 0] = r;
262
+ return new Date(h, a - 1, c, d, f, u);
263
263
  } else if (s.source.includes("YYYYMMDD")) {
264
- const [a, c, l] = r;
265
- return new Date(a, c - 1, l);
264
+ const [a, c, h] = r;
265
+ return new Date(a, c - 1, h);
266
266
  }
267
267
  }
268
268
  }
269
269
  return /* @__PURE__ */ new Date(NaN);
270
270
  }
271
- function xe(h, t) {
272
- const e = bt(h), i = bt(t);
271
+ function xe(l, t) {
272
+ const e = bt(l), i = bt(t);
273
273
  return isNaN(e.getTime()) && isNaN(i.getTime()) ? 0 : isNaN(e.getTime()) ? -1 : isNaN(i.getTime()) ? 1 : e.getTime() - i.getTime();
274
274
  }
275
275
  class Yt {
@@ -319,8 +319,8 @@ class Yt {
319
319
  }
320
320
  }
321
321
  class xt extends Yt {
322
- constructor(e, i, s, o, r, a, c, l, d, f = "body") {
323
- super(e, o, r, a, c, f, l.fixed);
322
+ constructor(e, i, s, o, r, a, c, h, d, f = "body") {
323
+ super(e, o, r, a, c, f, h.fixed);
324
324
  n(this, "formatter");
325
325
  n(this, "formatterFooter");
326
326
  n(this, "hoverIconName", "");
@@ -395,7 +395,7 @@ class xt extends Yt {
395
395
  n(this, "selectorCellValueType", "value");
396
396
  n(this, "overflowTooltipMaxWidth", 500);
397
397
  n(this, "overflowTooltipPlacement", "top");
398
- 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.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.update();
398
+ this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = h.key, this.type = h.type || "", this.editorType = h.editorType || "text", this.selectorCellValueType = h.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = h.editorProps || {}, this.cellType = f, this.align = h.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = h.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = h.fixed, this.level = h.level || 0, this.operation = h.operation || !1, this.column = h, this.rules = h.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = h.render, this.overflowTooltipShow = h.overflowTooltipShow !== !1, this.overflowTooltipMaxWidth = h.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = h.overflowTooltipPlacement || "top", this.renderFooter = h.renderFooter, this.hoverIconName = h.hoverIconName, this.formatter = h.formatter, this.formatterFooter = h.formatterFooter, this.update();
399
399
  }
400
400
  setWidthHeight(e, i) {
401
401
  this.width = e, this.height = i;
@@ -422,7 +422,7 @@ class xt extends Yt {
422
422
  relationRowKeys: r,
423
423
  relationColKeys: a,
424
424
  mergeRow: c = !1,
425
- mergeCol: l = !1
425
+ mergeCol: h = !1
426
426
  } = i({
427
427
  row: this.row,
428
428
  rowIndex: this.rowIndex,
@@ -435,7 +435,7 @@ class xt extends Yt {
435
435
  visibleLeafColumns: this.ctx.header.visibleLeafColumns,
436
436
  rows: this.ctx.body.data
437
437
  }) || {};
438
- Array.isArray(r) && r.length > 0 ? this.relationRowKeys = r : this.relationRowKeys = [this.key], Array.isArray(a) && a.length > 0 ? this.relationColKeys = a : this.relationColKeys = [this.key], this.mergeCol = l, this.mergeRow = c, this.colspan = s, this.rowspan = o, this.visibleWidth = this.getWidthByColIndexColSpan(this.colIndex, this.colspan), this.visibleHeight = this.ctx.database.getHeightByRowIndexRowSpan(this.rowIndex, this.rowspan);
438
+ Array.isArray(r) && r.length > 0 ? this.relationRowKeys = r : this.relationRowKeys = [this.key], Array.isArray(a) && a.length > 0 ? this.relationColKeys = a : this.relationColKeys = [this.key], this.mergeCol = h, this.mergeRow = c, this.colspan = s, this.rowspan = o, this.visibleWidth = this.getWidthByColIndexColSpan(this.colIndex, this.colspan), this.visibleHeight = this.ctx.database.getHeightByRowIndexRowSpan(this.rowIndex, this.rowspan);
439
439
  }
440
440
  }
441
441
  updateSpanInfo() {
@@ -509,15 +509,15 @@ class xt extends Yt {
509
509
  let o, r = 0, a = "";
510
510
  if (!(["tree", "selection-tree", "tree-selection"].includes(this.type) && s === "body"))
511
511
  return;
512
- const c = this.ctx.database.getRowForRowKey(i), { expand: l = !1, hasChildren: d = !1, expandLoading: f = !1, level: u = 0 } = c || {};
513
- this.rowExpand = l, this.rowHasChildren = d;
512
+ const c = this.ctx.database.getRowForRowKey(i), { expand: h = !1, hasChildren: d = !1, expandLoading: f = !1, level: u = 0 } = c || {};
513
+ this.rowExpand = h, this.rowHasChildren = d;
514
514
  const { TREE_INDENT: x = 16, CHECKBOX_SIZE: w, TREE_ICON_SIZE: m } = this.ctx.config;
515
515
  if (r = u * x, f) {
516
516
  const R = this.ctx.icons.get("loading");
517
517
  a = "loading", o = R;
518
518
  } else if (d) {
519
519
  const R = this.ctx.icons.get("expand"), v = this.ctx.icons.get("shrink");
520
- o = l ? v : R, a = l ? "shrink" : "expand";
520
+ o = h ? v : R, a = h ? "shrink" : "expand";
521
521
  }
522
522
  let g = m, E = m, y = this.drawX;
523
523
  (this.align === "center" || this.align === "right") && (y = this.drawX + (this.visibleWidth - g - 2 * e) / 2, this.align = "left");
@@ -527,7 +527,7 @@ class xt extends Yt {
527
527
  drawTreeLine() {
528
528
  const { TREE_LINE: e, TREE_INDENT: i = 16, TREE_ICON_SIZE: s = 16, TREE_LINE_COLOR: o = "#e1e6eb" } = this.ctx.config;
529
529
  if (!e || this.cellType !== "body" || !["tree", "selection-tree", "tree-selection"].includes(this.type) || this.rowspan === 0 || this.colspan === 0) return;
530
- const r = this.ctx.database.getRowForRowKey(this.rowKey) || {}, a = r.level ?? 0, c = this.drawTreeImageX + this.drawTreeImageWidth / 2, l = this.drawTreeImageY + this.drawTreeImageHeight / 2;
530
+ const r = this.ctx.database.getRowForRowKey(this.rowKey) || {}, a = r.level ?? 0, c = this.drawTreeImageX + this.drawTreeImageWidth / 2, h = this.drawTreeImageY + this.drawTreeImageHeight / 2;
531
531
  let d = this.drawTreeImageX - a * i;
532
532
  const f = Array.isArray(r.parentRowKeys) ? r.parentRowKeys : [];
533
533
  if (a > 0) {
@@ -542,7 +542,7 @@ class xt extends Yt {
542
542
  lineDashOffset: 0
543
543
  });
544
544
  }
545
- const u = Math.round(this.drawTreeImageX - i + s / 2), w = !!r.isLastChild ? l : this.drawY + this.visibleHeight;
545
+ const u = Math.round(this.drawTreeImageX - i + s / 2), w = !!r.isLastChild ? h : this.drawY + this.visibleHeight;
546
546
  this.ctx.paint.drawLine([u, this.drawY, u, w], {
547
547
  borderColor: o,
548
548
  borderWidth: 1,
@@ -550,7 +550,7 @@ class xt extends Yt {
550
550
  lineDashOffset: 0
551
551
  });
552
552
  const m = Math.round(d + (a - 1) * i + s / 2);
553
- this.ctx.paint.drawLine([m, l, c, l], {
553
+ this.ctx.paint.drawLine([m, h, c, h], {
554
554
  borderColor: o,
555
555
  borderWidth: 1,
556
556
  lineDash: [4, 4],
@@ -576,7 +576,7 @@ class xt extends Yt {
576
576
  READONLY_TEXT_COLOR: r,
577
577
  BODY_TEXT_COLOR: a,
578
578
  FOOTER_TEXT_COLOR: c,
579
- FOOTER_BG_COLOR: l,
579
+ FOOTER_BG_COLOR: h,
580
580
  HIGHLIGHT_SELECTED_ROW: d,
581
581
  HIGHLIGHT_SELECTED_ROW_COLOR: f,
582
582
  HIGHLIGHT_HOVER_ROW: u,
@@ -585,7 +585,7 @@ class xt extends Yt {
585
585
  STRIPE_COLOR: m
586
586
  } = this.ctx.config;
587
587
  if (this.cellType === "footer") {
588
- let v = l, T = c;
588
+ let v = h, T = c;
589
589
  if (typeof o == "function") {
590
590
  const S = o, { backgroundColor: I, color: _ } = S({
591
591
  row: this.row,
@@ -622,25 +622,25 @@ class xt extends Yt {
622
622
  this.drawCellBgColor = C, this.drawTextColor = R;
623
623
  }
624
624
  updateSelection() {
625
- const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: a, rowIndex: c, rowKey: l } = this;
625
+ const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: a, rowIndex: c, rowKey: h } = this;
626
626
  if (s === 0 || o === 0 || r === "footer" || !["index-selection", "selection", "selection-tree", "tree-selection"].includes(a))
627
627
  return;
628
- const d = this.ctx.database.getRowSelectable(l), { CHECKBOX_SIZE: f = 0, CELL_PADDING: u } = this.ctx.config;
628
+ const d = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: f = 0, CELL_PADDING: u } = this.ctx.config;
629
629
  let x = this.drawX + u;
630
630
  (this.align === "center" || this.align === "right") && (x = this.drawX + (e - f) / 2);
631
631
  let w = x, m = this.drawY + (i - f) / 2;
632
632
  if (a !== "selection-tree") {
633
633
  if (a === "tree-selection") {
634
- const { TREE_INDENT: y = 16, TREE_ICON_SIZE: p } = this.ctx.config, b = this.ctx.database.getRowForRowKey(l), { level: C = 0 } = b || {}, R = C * y;
634
+ const { TREE_INDENT: y = 16, TREE_ICON_SIZE: p } = this.ctx.config, b = this.ctx.database.getRowForRowKey(h), { level: C = 0 } = b || {}, R = C * y;
635
635
  w = x + p + R;
636
636
  }
637
637
  }
638
638
  let g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck";
639
639
  if (a === "selection-tree" || a === "tree-selection") {
640
- const y = this.ctx.database.getTreeSelectionState(l);
640
+ const y = this.ctx.database.getTreeSelectionState(h);
641
641
  y.indeterminate && d ? (g = this.ctx.icons.get("checkbox-indeterminate"), E = "checkbox-indeterminate") : y.checked && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : !y.checked && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
642
642
  } else {
643
- const y = this.ctx.database.getRowSelection(l);
643
+ const y = this.ctx.database.getRowSelection(h);
644
644
  y && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : y && !d ? (g = this.ctx.icons.get("checkbox-check-disabled"), E = "checkbox-check-disabled") : !y && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
645
645
  }
646
646
  w + f + u > this.drawX + this.visibleWidth || m + f + u > this.drawY + this.visibleHeight || (a === "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === c || ["checkbox-disabled", "checkbox-check"].includes(E)) && (this.drawSelectionImageX = w, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = g) : (this.drawSelectionImageX = w, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = g));
@@ -650,27 +650,27 @@ class xt extends Yt {
650
650
  return;
651
651
  const { BODY_CELL_HOVER_ICON_METHOD: i, CELL_HOVER_ICON_SIZE: s, CELL_PADDING: o, ENABLE_MERGE_CELL_LINK: r } = this.ctx.config;
652
652
  if (typeof i == "function") {
653
- const l = i({
653
+ const h = i({
654
654
  row: this.row,
655
655
  rowIndex: this.rowIndex,
656
656
  colIndex: this.colIndex,
657
657
  column: this.column,
658
658
  value: this.getValue()
659
659
  });
660
- l !== void 0 && (this.hoverIconName = l);
660
+ h !== void 0 && (this.hoverIconName = h);
661
661
  }
662
662
  const { hoverCell: a } = this.ctx;
663
663
  if (this.hoverIconName && !this.ctx.editing && a) {
664
- let c = 0, l = 0;
665
- if (a.rowKey === this.rowKey && (c = this.drawX + this.width - s - o, l = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
664
+ let c = 0, h = 0;
665
+ if (a.rowKey === this.rowKey && (c = this.drawX + this.width - s - o, h = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
666
666
  const f = this.getSpanInfo(), { yArr: u } = f, x = u[0], w = u[1];
667
667
  if (a.rowIndex >= x && a.rowIndex <= w) {
668
668
  const { width: m, height: g, offsetTop: E, offsetLeft: y } = f;
669
- c = this.drawX - y + m - s - o, l = this.drawY - E + (g - s) / 2;
669
+ c = this.drawX - y + m - s - o, h = this.drawY - E + (g - s) / 2;
670
670
  }
671
671
  }
672
672
  const d = this.ctx.icons.get(this.hoverIconName);
673
- this.drawHoverImageX = c, this.drawHoverImageY = l, this.drawHoverImageWidth = s, this.drawHoverImageHeight = s, this.drawHoverImageName = this.hoverIconName, this.drawHoverImageSource = d;
673
+ this.drawHoverImageX = c, this.drawHoverImageY = h, this.drawHoverImageWidth = s, this.drawHoverImageHeight = s, this.drawHoverImageName = this.hoverIconName, this.drawHoverImageSource = d;
674
674
  }
675
675
  }
676
676
  // 过去跨度配置
@@ -765,8 +765,8 @@ class xt extends Yt {
765
765
  const { SELECT_BORDER_COLOR: e, ENABLE_AUTOFILL: i, ENABLE_SELECTOR: s, AUTOFILL_POINT_BORDER_COLOR: o } = this.ctx.config;
766
766
  if (!s || !i || this.ctx.editing)
767
767
  return;
768
- const { xArr: r, yArr: a } = this.ctx.selector, c = r[1], l = a[1], { colIndex: d, rowIndex: f, drawX: u, drawY: x } = this;
769
- if (d === c && f === l) {
768
+ const { xArr: r, yArr: a } = this.ctx.selector, c = r[1], h = a[1], { colIndex: d, rowIndex: f, drawX: u, drawY: x } = this;
769
+ if (d === c && f === h) {
770
770
  const m = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
771
771
  this.ctx.paint.drawRect(u + this.width - m, x + this.height - m, 6, 6, {
772
772
  borderColor: o,
@@ -872,11 +872,11 @@ class xt extends Yt {
872
872
  fillColor: "transparent",
873
873
  borderWidth: 1
874
874
  });
875
- const [a, c] = i, [l, d] = s;
876
- !(a === c && l === d) && this.colIndex >= a && this.colIndex <= c && this.rowIndex >= l && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
875
+ const [a, c] = i, [h, d] = s;
876
+ !(a === c && h === d) && this.colIndex >= a && this.colIndex <= c && this.rowIndex >= h && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
877
877
  borderColor: "transparent",
878
878
  fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)"
879
- }), this.operation && this.rowIndex >= l && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
879
+ }), this.operation && this.rowIndex >= h && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
880
880
  borderColor: "transparent",
881
881
  fillColor: this.ctx.config.SELECT_ROW_COL_BG_COLOR || "transparent"
882
882
  });
@@ -902,11 +902,11 @@ class xt extends Yt {
902
902
  }
903
903
  drawBorder(e) {
904
904
  const { drawX: i, drawY: s, rowIndex: o, colIndex: r, height: a, width: c } = this;
905
- let l = i, d = s;
905
+ let h = i, d = s;
906
906
  const { xArr: f, yArr: u, lineDash: x = [], borderWidth: w = 1, borderColor: m, fillColor: g } = e, E = f[0], y = f[1], p = u[0], b = u[1];
907
907
  if (r >= E && r <= y && o === p) {
908
908
  const C = r === y ? 1 : 0, R = r === E ? 1 : 0;
909
- this.ctx.paint.drawLine([l + R, d + 1, l + c - C, d + 1], {
909
+ this.ctx.paint.drawLine([h + R, d + 1, h + c - C, d + 1], {
910
910
  borderColor: m,
911
911
  fillColor: g,
912
912
  borderWidth: w,
@@ -917,7 +917,7 @@ class xt extends Yt {
917
917
  }
918
918
  if (r === y && o >= p && o <= b) {
919
919
  const C = o === p ? 1 : 0, R = o === b ? 1 : 0;
920
- this.ctx.paint.drawLine([l + c - 1, d + C, l + c - 1, d + a - R], {
920
+ this.ctx.paint.drawLine([h + c - 1, d + C, h + c - 1, d + a - R], {
921
921
  borderColor: m,
922
922
  fillColor: g,
923
923
  borderWidth: w,
@@ -928,7 +928,7 @@ class xt extends Yt {
928
928
  }
929
929
  if (r >= E && r <= y && o === b) {
930
930
  const C = r === y ? 1 : 0, R = r === E ? 1 : 0;
931
- this.ctx.paint.drawLine([l + R, d + a - 1, l + c - C, d + a - 1], {
931
+ this.ctx.paint.drawLine([h + R, d + a - 1, h + c - C, d + a - 1], {
932
932
  borderColor: m,
933
933
  fillColor: g,
934
934
  borderWidth: w,
@@ -939,7 +939,7 @@ class xt extends Yt {
939
939
  }
940
940
  if (r === E && o >= p && o <= b) {
941
941
  const C = o === b ? 1 : 0, R = o === p ? 1 : 0;
942
- this.ctx.paint.drawLine([l + 1, d + R, l + 1, d + a - C], {
942
+ this.ctx.paint.drawLine([h + 1, d + R, h + 1, d + a - C], {
943
943
  borderColor: m,
944
944
  fillColor: g,
945
945
  borderWidth: w,
@@ -1011,9 +1011,9 @@ class ue {
1011
1011
  const s = t.length;
1012
1012
  t.forEach((o, r) => {
1013
1013
  var y;
1014
- const { ROW_KEY: a = "", DEFAULT_EXPAND_ALL: c, CELL_HEIGHT: l, SELECTABLE_METHOD: d, CHECKBOX_KEY: f } = this.ctx.config, u = o[a], x = u != null ? `${u}` : Mt();
1014
+ const { ROW_KEY: a = "", DEFAULT_EXPAND_ALL: c, CELL_HEIGHT: h, SELECTABLE_METHOD: d, CHECKBOX_KEY: f } = this.ctx.config, u = o[a], x = u != null ? `${u}` : Mt();
1015
1015
  this.itemRowKeyMap.set(o, x);
1016
- const w = o._height || l, m = o._readonly;
1016
+ const w = o._height || h, m = o._readonly;
1017
1017
  let g = !0;
1018
1018
  if (typeof d == "function" && (g = d), f) {
1019
1019
  const p = o[f];
@@ -1107,12 +1107,12 @@ class ue {
1107
1107
  const i = (o) => {
1108
1108
  o.forEach((r) => {
1109
1109
  t.push(r);
1110
- const a = this.itemRowKeyMap.get(r), { expand: c, hasChildren: l, height: d } = this.rowKeyMap.get(a), f = this.sumHeight;
1110
+ const a = this.itemRowKeyMap.get(r), { expand: c, hasChildren: h, height: d } = this.rowKeyMap.get(a), f = this.sumHeight;
1111
1111
  this.sumHeight += d, this.rowIndexRowKeyMap.set(e, a), this.rowKeyRowIndexMap.set(a, e), this.positions.push({
1112
1112
  top: f,
1113
1113
  height: d,
1114
1114
  bottom: this.sumHeight
1115
- }), e += 1, c && l && i(r.children);
1115
+ }), e += 1, c && h && i(r.children);
1116
1116
  });
1117
1117
  };
1118
1118
  this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
@@ -1190,17 +1190,17 @@ class ue {
1190
1190
  applySingleColumnSort(t, e, i, s) {
1191
1191
  return t.sort((o, r) => {
1192
1192
  const a = o[e], c = r[e];
1193
- let l = 0;
1193
+ let h = 0;
1194
1194
  if (typeof s == "function")
1195
- l = s(o, r);
1195
+ h = s(o, r);
1196
1196
  else if (s === "number") {
1197
1197
  const d = Number(a) || 0, f = Number(c) || 0;
1198
- l = d - f;
1198
+ h = d - f;
1199
1199
  } else if (s === "string") {
1200
1200
  const d = String(a || ""), f = String(c || "");
1201
- l = d.localeCompare(f);
1202
- } else s === "date" && (l = xe(a, c));
1203
- return i === "asc" ? l : -l;
1201
+ h = d.localeCompare(f);
1202
+ } else s === "date" && (h = xe(a, c));
1203
+ return i === "asc" ? h : -h;
1204
1204
  });
1205
1205
  }
1206
1206
  /**
@@ -1312,7 +1312,7 @@ class ue {
1312
1312
  async batchSetItemValue(t, e = !1, i = !0, s = "none") {
1313
1313
  let o = [], r = i;
1314
1314
  const a = /* @__PURE__ */ new Set();
1315
- let c = [], l = t.map((x) => {
1315
+ let c = [], h = t.map((x) => {
1316
1316
  const { rowKey: w, key: m } = x;
1317
1317
  let g = x.value, E = g;
1318
1318
  const y = this.getRowDataItemForRowKey(w), p = this.getItemValue(w, m), b = this.getVirtualBodyCellByKey(w, m);
@@ -1328,7 +1328,7 @@ class ue {
1328
1328
  row: y
1329
1329
  };
1330
1330
  });
1331
- if (l = l.filter((x) => !c.some((w) => x.rowKey === w.rowKey && x.key === w.key)), c.length) {
1331
+ if (h = h.filter((x) => !c.some((w) => x.rowKey === w.rowKey && x.key === w.key)), c.length) {
1332
1332
  const x = {
1333
1333
  code: "ERR_BATCH_SET_NUMBER_VALUE",
1334
1334
  message: "Assignment failed, not a numeric type",
@@ -1336,10 +1336,10 @@ class ue {
1336
1336
  };
1337
1337
  this.ctx.emit("error", x);
1338
1338
  }
1339
- if (l = l.filter((x) => x.oldValue !== x.value), !l.length)
1339
+ if (h = h.filter((x) => x.oldValue !== x.value), !h.length)
1340
1340
  return;
1341
1341
  const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
1342
- s === "none" && typeof d == "function" && (l = await d(l), r = !1), l.forEach((x) => {
1342
+ s === "none" && typeof d == "function" && (h = await d(h), r = !1), h.forEach((x) => {
1343
1343
  const { value: w, rowKey: m, key: g } = x, E = this.getItemValue(m, g);
1344
1344
  a.add(m), this.setItemValue(m, g, w, !1, !1, !1, r), o.push({
1345
1345
  rowKey: m,
@@ -1352,10 +1352,10 @@ class ue {
1352
1352
  a.forEach((x) => {
1353
1353
  f.push(this.ctx.database.getRowDataItemForRowKey(x));
1354
1354
  });
1355
- const u = l.map(({ rowKey: x, key: w }) => this.getValidator(x, w));
1355
+ const u = h.map(({ rowKey: x, key: w }) => this.getValidator(x, w));
1356
1356
  Promise.all(u).then(() => {
1357
1357
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1358
- }), this.ctx.emit("change", l, f), e && this.ctx.history.pushState({
1358
+ }), this.ctx.emit("change", h, f), e && this.ctx.history.pushState({
1359
1359
  changeList: o,
1360
1360
  scrollX: this.ctx.scrollX,
1361
1361
  scrollY: this.ctx.scrollY,
@@ -1377,15 +1377,15 @@ class ue {
1377
1377
  if (!this.rowKeyMap.has(t))
1378
1378
  return {};
1379
1379
  const { item: c } = this.rowKeyMap.get(t);
1380
- let l = c[e], d = i;
1380
+ let h = c[e], d = i;
1381
1381
  if (a && this.ctx.database.getReadonly(t, e))
1382
1382
  return {
1383
- oldValue: l,
1384
- newValue: l
1383
+ oldValue: h,
1384
+ newValue: h
1385
1385
  };
1386
- c[e] !== null && typeof c[e] == "object" && (l = JSON.parse(JSON.stringify(c[e])));
1386
+ c[e] !== null && typeof c[e] == "object" && (h = JSON.parse(JSON.stringify(c[e])));
1387
1387
  const f = `${t}​_${e}`;
1388
- this.originalDataMap.has(f) || this.originalDataMap.set(f, l);
1388
+ this.originalDataMap.has(f) || this.originalDataMap.set(f, h);
1389
1389
  const u = this.originalDataMap.get(f), x = this.getRowDataItemForRowKey(t);
1390
1390
  if (r) {
1391
1391
  const w = this.getVirtualBodyCellByKey(t, e);
@@ -1395,7 +1395,7 @@ class ue {
1395
1395
  else if (/^-?\d+(\.\d+)?$/.test(`${i}`))
1396
1396
  d = Number(i);
1397
1397
  else {
1398
- d = l;
1398
+ d = h;
1399
1399
  const g = {
1400
1400
  code: "ERR_SET_NUMBER_VALUE",
1401
1401
  message: "Assignment failed, not a numeric type",
@@ -1404,31 +1404,31 @@ class ue {
1404
1404
  rowKey: t,
1405
1405
  key: e,
1406
1406
  value: d,
1407
- oldValue: l,
1407
+ oldValue: h,
1408
1408
  row: x
1409
1409
  }
1410
1410
  ]
1411
1411
  };
1412
1412
  this.ctx.emit("error", g);
1413
1413
  }
1414
- if (d === l)
1414
+ if (d === h)
1415
1415
  return {
1416
- oldValue: l,
1417
- newValue: l
1416
+ oldValue: h,
1417
+ newValue: h
1418
1418
  };
1419
1419
  let m = [
1420
1420
  {
1421
1421
  rowKey: t,
1422
1422
  key: e,
1423
1423
  value: d,
1424
- oldValue: l,
1424
+ oldValue: h,
1425
1425
  row: x
1426
1426
  }
1427
1427
  ];
1428
1428
  this.batchSetItemValue(m, s, !1), this.ctx.emit("editChange", {
1429
1429
  rowKey: t,
1430
1430
  key: e,
1431
- oldValue: l,
1431
+ oldValue: h,
1432
1432
  value: d,
1433
1433
  originalValue: u,
1434
1434
  row: x
@@ -1438,12 +1438,12 @@ class ue {
1438
1438
  return this.ctx.hasEvent("iterationChange") && this.ctx.emit("iterationChange", {
1439
1439
  rowKey: t,
1440
1440
  key: e,
1441
- oldValue: l,
1441
+ oldValue: h,
1442
1442
  value: d,
1443
1443
  originalValue: this.originalDataMap.get(f),
1444
1444
  row: x
1445
1445
  }), o && this.ctx.emit("draw"), {
1446
- oldValue: l,
1446
+ oldValue: h,
1447
1447
  newValue: d
1448
1448
  };
1449
1449
  }
@@ -1517,7 +1517,7 @@ class ue {
1517
1517
  const e = this.getTreeParent(t);
1518
1518
  if (!e)
1519
1519
  return;
1520
- const s = this.getTreeChildren(e).map((l) => this.selectionMap.get(l)), o = s.filter((l) => l == null ? void 0 : l.check).length, r = s.length;
1520
+ const s = this.getTreeChildren(e).map((h) => this.selectionMap.get(h)), o = s.filter((h) => h == null ? void 0 : h.check).length, r = s.length;
1521
1521
  let a = !1;
1522
1522
  r > 0 && (o === 0 ? a = !1 : o === r || this.ctx.config.TREE_SELECT_MODE === "auto" ? a = !0 : this.ctx.config.TREE_SELECT_MODE === "cautious" && (a = !1));
1523
1523
  const c = this.selectionMap.get(e);
@@ -1554,22 +1554,22 @@ class ue {
1554
1554
  return { checked: s, indeterminate: !1 };
1555
1555
  let r = !1, a = s;
1556
1556
  if (this.ctx.config.TREE_SELECT_MODE === "auto") {
1557
- const l = (g) => {
1557
+ const h = (g) => {
1558
1558
  const E = this.getTreeChildren(g);
1559
1559
  let y = [];
1560
1560
  for (const p of E)
1561
- y.push(p), y.push(...l(p));
1561
+ y.push(p), y.push(...h(p));
1562
1562
  return y;
1563
- }, f = l(t).map((g) => this.selectionMap.get(g)), u = f.filter((g) => g == null ? void 0 : g.check).length, x = f.length, w = u > 0;
1563
+ }, f = h(t).map((g) => this.selectionMap.get(g)), u = f.filter((g) => g == null ? void 0 : g.check).length, x = f.length, w = u > 0;
1564
1564
  r = w && !(u === x), a = s || w, s && x > 0 && u === 0 && (a = !1, r = !1);
1565
1565
  } else if (this.ctx.config.TREE_SELECT_MODE === "cautious") {
1566
- const l = (g) => {
1566
+ const h = (g) => {
1567
1567
  const E = this.getTreeChildren(g);
1568
1568
  let y = [];
1569
1569
  for (const p of E)
1570
- y.push(p), y.push(...l(p));
1570
+ y.push(p), y.push(...h(p));
1571
1571
  return y;
1572
- }, f = l(t).map((g) => this.selectionMap.get(g)), u = f.filter((g) => g == null ? void 0 : g.check).length, x = f.length, w = u > 0, m = u === x;
1572
+ }, f = h(t).map((g) => this.selectionMap.get(g)), u = f.filter((g) => g == null ? void 0 : g.check).length, x = f.length, w = u > 0, m = u === x;
1573
1573
  r = w && !m, a = s || m, s && x > 0 && u === 0 && (a = !1, r = !1);
1574
1574
  } else this.ctx.config.TREE_SELECT_MODE === "strictly" && (r = !1, a = s);
1575
1575
  return { checked: a, indeterminate: r };
@@ -1596,9 +1596,9 @@ class ue {
1596
1596
  for (const a of o.children) {
1597
1597
  if (this.getRowKeyByItem(a) === s)
1598
1598
  return r;
1599
- const l = e(o.children, s);
1600
- if (l)
1601
- return l;
1599
+ const h = e(o.children, s);
1600
+ if (h)
1601
+ return h;
1602
1602
  }
1603
1603
  }
1604
1604
  return null;
@@ -1681,15 +1681,15 @@ class ue {
1681
1681
  rowIndex: u.rowIndex
1682
1682
  })), w && (o += 1);
1683
1683
  });
1684
- const c = r > i && s === 0 && a, l = o && o > s && s > 0 || c, d = o !== 0, f = !!o && o === s;
1684
+ const c = r > i && s === 0 && a, h = o && o > s && s > 0 || c, d = o !== 0, f = !!o && o === s;
1685
1685
  return this.bufferCheckState = {
1686
1686
  buffer: !0,
1687
1687
  check: f,
1688
- indeterminate: l,
1688
+ indeterminate: h,
1689
1689
  selectable: d
1690
1690
  }, {
1691
1691
  check: f,
1692
- indeterminate: l,
1692
+ indeterminate: h,
1693
1693
  selectable: d
1694
1694
  };
1695
1695
  }
@@ -1818,7 +1818,7 @@ class ue {
1818
1818
  d && (c = d);
1819
1819
  }
1820
1820
  if (c) {
1821
- const l = {
1821
+ const h = {
1822
1822
  row: s.item,
1823
1823
  rowIndex: s.rowIndex,
1824
1824
  colIndex: o.colIndex,
@@ -1828,7 +1828,7 @@ class ue {
1828
1828
  value: this.getItemValue(t, e),
1829
1829
  field: e,
1830
1830
  fieldValue: this.getItemValue(t, e)
1831
- }, f = new re(c).validate(l);
1831
+ }, f = new re(c).validate(h);
1832
1832
  this.setValidationError(t, e, f), i(f);
1833
1833
  } else
1834
1834
  this.clearValidationError(t, e), i([]);
@@ -1851,7 +1851,7 @@ class ue {
1851
1851
  value: r,
1852
1852
  colIndex: a,
1853
1853
  relationRowKeys: c,
1854
- relationColKeys: l,
1854
+ relationColKeys: h,
1855
1855
  rowspan: d,
1856
1856
  height: f,
1857
1857
  width: u,
@@ -1928,7 +1928,7 @@ class ue {
1928
1928
  if (!I)
1929
1929
  break;
1930
1930
  const _ = this.getItemValue(s, i), O = this.getItemValue(s, I.key);
1931
- if (_ === O && l.includes(I.key))
1931
+ if (_ === O && h.includes(I.key))
1932
1932
  y = S;
1933
1933
  else
1934
1934
  break;
@@ -1938,7 +1938,7 @@ class ue {
1938
1938
  if (!I)
1939
1939
  break;
1940
1940
  const _ = this.getItemValue(s, i), O = this.getItemValue(s, I.key);
1941
- if (_ === O && l.includes(I.key))
1941
+ if (_ === O && h.includes(I.key))
1942
1942
  p = S;
1943
1943
  else
1944
1944
  break;
@@ -1983,7 +1983,7 @@ class ue {
1983
1983
  const s = this.rowIndexRowKeyMap.get(t), o = `${s}​_${e}`, r = this.getRowForRowIndex(t), a = this.getColumnByKey(e);
1984
1984
  if (!s || !a || !r)
1985
1985
  return;
1986
- const c = this.getItemValue(s, e), l = [
1986
+ const c = this.getItemValue(s, e), h = [
1987
1987
  {
1988
1988
  key: e,
1989
1989
  rowKey: s,
@@ -1997,7 +1997,7 @@ class ue {
1997
1997
  fieldValue: c
1998
1998
  }
1999
1999
  ];
2000
- this.validationErrorMap.set(o, l);
2000
+ this.validationErrorMap.set(o, h);
2001
2001
  }
2002
2002
  setValidationError(t, e, i) {
2003
2003
  const s = `${t}​_${e}`;
@@ -2257,21 +2257,21 @@ class Ee {
2257
2257
  * @param {string} color - 阴影的颜色
2258
2258
  */
2259
2259
  drawShadow(t, e, i, s, o) {
2260
- const { fillColor: r, side: a, shadowWidth: c, colorStart: l, colorEnd: d } = o;
2260
+ const { fillColor: r, side: a, shadowWidth: c, colorStart: h, colorEnd: d } = o;
2261
2261
  this.ctx.save(), r && (this.ctx.fillStyle = r, this.ctx.fillRect(t, e, i, s));
2262
2262
  let f;
2263
2263
  switch (a) {
2264
2264
  case "left":
2265
- f = this.ctx.createLinearGradient(t - c, e, t, e), f.addColorStop(0, l), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t - c, e, c, s);
2265
+ f = this.ctx.createLinearGradient(t - c, e, t, e), f.addColorStop(0, h), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t - c, e, c, s);
2266
2266
  break;
2267
2267
  case "right":
2268
- f = this.ctx.createLinearGradient(t + i, e, t + i + c, e), f.addColorStop(0, l), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t + i, e, c, s);
2268
+ f = this.ctx.createLinearGradient(t + i, e, t + i + c, e), f.addColorStop(0, h), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t + i, e, c, s);
2269
2269
  break;
2270
2270
  case "top":
2271
- f = this.ctx.createLinearGradient(t, e - c, t, e), f.addColorStop(0, l), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e - c, i, c);
2271
+ f = this.ctx.createLinearGradient(t, e - c, t, e), f.addColorStop(0, h), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e - c, i, c);
2272
2272
  break;
2273
2273
  case "bottom":
2274
- f = this.ctx.createLinearGradient(t, e + s, t, e + s + c), f.addColorStop(0, l), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e + s, i, c);
2274
+ f = this.ctx.createLinearGradient(t, e + s, t, e + s + c), f.addColorStop(0, h), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e + s, i, c);
2275
2275
  break;
2276
2276
  default:
2277
2277
  console.error("Invalid side specified for shadow");
@@ -2296,8 +2296,8 @@ class Ee {
2296
2296
  if (this.ctx.save(), this.ctx.beginPath(), a !== void 0 && (this.ctx.fillStyle = a), r !== void 0 && (this.ctx.lineWidth = o, this.ctx.strokeStyle = r), c === 0)
2297
2297
  this.ctx.rect(t - 0.5, e - 0.5, i, s);
2298
2298
  else {
2299
- const [l, d, f, u] = typeof c == "number" ? [c, c, c, c] : c;
2300
- this.ctx.moveTo(t + l, e), this.ctx.arcTo(t + i, e, t + i, e + d, d), this.ctx.arcTo(t + i, e + s, t + i - f, e + s, f), this.ctx.arcTo(t, e + s, t, e + s - u, u), this.ctx.arcTo(t, e, t + l, e, l);
2299
+ const [h, d, f, u] = typeof c == "number" ? [c, c, c, c] : c;
2300
+ this.ctx.moveTo(t + h, e), this.ctx.arcTo(t + i, e, t + i, e + d, d), this.ctx.arcTo(t + i, e + s, t + i - f, e + s, f), this.ctx.arcTo(t, e + s, t, e + s - u, u), this.ctx.arcTo(t, e, t + h, e, h);
2301
2301
  }
2302
2302
  a !== void 0 && this.ctx.fill(), r !== void 0 && this.ctx.stroke(), this.ctx.restore();
2303
2303
  }
@@ -2316,11 +2316,11 @@ class Ee {
2316
2316
  const {
2317
2317
  font: a = "12px Arial",
2318
2318
  align: c = "center",
2319
- color: l = "#495060",
2319
+ color: h = "#495060",
2320
2320
  padding: d = 0,
2321
2321
  verticalAlign: f = "middle"
2322
2322
  } = r;
2323
- this.ctx.font = a, this.ctx.fillStyle = l, this.ctx.textBaseline = f, this.ctx.textAlign = c;
2323
+ this.ctx.font = a, this.ctx.fillStyle = h, this.ctx.textBaseline = f, this.ctx.textAlign = c;
2324
2324
  let u = 0;
2325
2325
  f === "top" ? u = i + d : f === "bottom" ? u = i + o - d : u = i + (o + 1) / 2;
2326
2326
  let x = 0;
@@ -2344,9 +2344,9 @@ class Ee {
2344
2344
  const c = this.ctx.measureText(t).width;
2345
2345
  if (c && c + a >= e - i * 2) {
2346
2346
  o = !0;
2347
- let l = 0;
2347
+ let h = 0;
2348
2348
  for (let d = 0; d < t.length; d++)
2349
- if (l += this.ctx.measureText(t[d]).width, l >= e - i * 2 - a) {
2349
+ if (h += this.ctx.measureText(t[d]).width, h >= e - i * 2 - a) {
2350
2350
  r = t.slice(0, d) + "...";
2351
2351
  break;
2352
2352
  }
@@ -2791,22 +2791,22 @@ class Ce {
2791
2791
  }
2792
2792
  async createImageFromSVG(t, e, i = !1) {
2793
2793
  const r = new DOMParser().parseFromString(t, "image/svg+xml").documentElement;
2794
- e && r.querySelectorAll("*").forEach((l) => {
2795
- const d = l.getAttribute("fill");
2796
- (d === "currentColor" || d === null) && l.setAttribute("fill", e);
2794
+ e && r.querySelectorAll("*").forEach((h) => {
2795
+ const d = h.getAttribute("fill");
2796
+ (d === "currentColor" || d === null) && h.setAttribute("fill", e);
2797
2797
  });
2798
2798
  const a = new Image();
2799
2799
  let c = "";
2800
2800
  if (i) {
2801
- const l = new Blob([new XMLSerializer().serializeToString(r)], {
2801
+ const h = new Blob([new XMLSerializer().serializeToString(r)], {
2802
2802
  type: "image/svg+xml"
2803
2803
  });
2804
- c = URL.createObjectURL(l);
2804
+ c = URL.createObjectURL(h);
2805
2805
  } else
2806
2806
  c = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(r));
2807
- return a.src = c, new Promise((l, d) => {
2807
+ return a.src = c, new Promise((h, d) => {
2808
2808
  a.onerror = () => d(new Error("Failed to load image:" + t)), a.onload = () => {
2809
- l(a);
2809
+ h(a);
2810
2810
  };
2811
2811
  });
2812
2812
  }
@@ -2814,7 +2814,7 @@ class Ce {
2814
2814
  return this.icons.get(t);
2815
2815
  }
2816
2816
  }
2817
- class lt extends Yt {
2817
+ class ht extends Yt {
2818
2818
  constructor(e, i, s, o, r, a, c) {
2819
2819
  super(e, s, o, r, a, "header", c.fixed);
2820
2820
  n(this, "align");
@@ -2892,11 +2892,11 @@ class lt extends Yt {
2892
2892
  const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
2893
2893
  let o = i, r = s;
2894
2894
  if (typeof e == "function") {
2895
- const a = e, { backgroundColor: c, color: l } = a({
2895
+ const a = e, { backgroundColor: c, color: h } = a({
2896
2896
  colIndex: this.colIndex,
2897
2897
  column: this.column
2898
2898
  }) || {};
2899
- c && (o = c), l && (r = l);
2899
+ c && (o = c), h && (r = h);
2900
2900
  }
2901
2901
  this.drawCellBgColor = o, this.drawTextColor = r;
2902
2902
  }
@@ -2959,8 +2959,8 @@ class lt extends Yt {
2959
2959
  const { indeterminate: e, check: i, selectable: s } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: o = 0, CELL_PADDING: r } = this.ctx.config;
2960
2960
  let a = this.drawX + (this.width - o) / 2, c = this.drawY + (this.height - o) / 2;
2961
2961
  this.drawTextX = a + o - r / 2, this.drawTextWidth = this.drawX + this.visibleWidth - this.drawTextX, (this.align === "left" || this.align === "right") && (a = this.drawX + r, this.drawTextX = a + o - r / 2, this.drawTextWidth = this.drawX + this.visibleWidth - this.drawTextX), this.verticalAlign === "top" ? c = this.drawY + r / 2 : this.verticalAlign === "bottom" && (c = this.drawY + this.height - o - r / 2);
2962
- let l = this.ctx.icons.get("checkbox-uncheck"), d = "checkbox-uncheck";
2963
- e ? (l = this.ctx.icons.get("checkbox-indeterminate"), d = "checkbox-indeterminate") : i && s ? (l = this.ctx.icons.get("checkbox-check"), d = "checkbox-check") : i && !s ? (l = this.ctx.icons.get("checkbox-check-disabled"), d = "checkbox-check-disabled") : !i && s ? (l = this.ctx.icons.get("checkbox-uncheck"), d = "checkbox-uncheck") : (l = this.ctx.icons.get("checkbox-disabled"), d = "checkbox-disabled"), l && (this.drawSelectionImageX = a, this.drawSelectionImageY = c, this.drawSelectionImageWidth = o, this.drawSelectionImageHeight = o, this.drawSelectionImageName = d, this.drawSelectionImageSource = l, this.ctx.paint.drawImage(
2962
+ let h = this.ctx.icons.get("checkbox-uncheck"), d = "checkbox-uncheck";
2963
+ e ? (h = this.ctx.icons.get("checkbox-indeterminate"), d = "checkbox-indeterminate") : i && s ? (h = this.ctx.icons.get("checkbox-check"), d = "checkbox-check") : i && !s ? (h = this.ctx.icons.get("checkbox-check-disabled"), d = "checkbox-check-disabled") : !i && s ? (h = this.ctx.icons.get("checkbox-uncheck"), d = "checkbox-uncheck") : (h = this.ctx.icons.get("checkbox-disabled"), d = "checkbox-disabled"), h && (this.drawSelectionImageX = a, this.drawSelectionImageY = c, this.drawSelectionImageWidth = o, this.drawSelectionImageHeight = o, this.drawSelectionImageName = d, this.drawSelectionImageSource = h, this.ctx.paint.drawImage(
2964
2964
  this.drawSelectionImageSource,
2965
2965
  this.drawSelectionImageX,
2966
2966
  this.drawSelectionImageY,
@@ -2979,7 +2979,7 @@ class lt extends Yt {
2979
2979
  const a = this.ctx.icons.get(o);
2980
2980
  if (!a)
2981
2981
  return;
2982
- let c = 0, l = this.drawY + (this.height - i) / 2;
2982
+ let c = 0, h = this.drawY + (this.height - i) / 2;
2983
2983
  if (this.align === "left") {
2984
2984
  const d = this.ctx.paint.measureTextWidth(this.displayText, this.ctx.config.HEADER_FONT);
2985
2985
  c = this.drawX + e + d + s;
@@ -2987,7 +2987,7 @@ class lt extends Yt {
2987
2987
  const d = this.ctx.paint.measureTextWidth(this.displayText, this.ctx.config.HEADER_FONT);
2988
2988
  c = this.drawX + this.width / 2 - d / 2 + d + s;
2989
2989
  } else this.align === "right" && (c = this.drawX + this.width - e - i);
2990
- this.drawSortImageX = c, this.drawSortImageY = l, this.drawSortImageWidth = i, this.drawSortImageHeight = i, this.drawSortImageName = o, this.drawSortImageSource = a, this.ctx.paint.drawImage(
2990
+ this.drawSortImageX = c, this.drawSortImageY = h, this.drawSortImageWidth = i, this.drawSortImageHeight = i, this.drawSortImageName = o, this.drawSortImageSource = a, this.ctx.paint.drawImage(
2991
2991
  this.drawSortImageSource,
2992
2992
  this.drawSortImageX,
2993
2993
  this.drawSortImageY,
@@ -3048,9 +3048,23 @@ class be {
3048
3048
  const e = this.ctx.getOffset(t).offsetY, i = this.ctx.getOffset(t).offsetX;
3049
3049
  this.handleHeaderEvent(i, e, this.ctx.header.renderCellHeaders, (s) => {
3050
3050
  this.ctx.clickCellHeader = s, this.ctx.emit("cellHeaderClick", s, t), this.selectionClick(s, t), this.sortClick(s, t);
3051
- }), this.handleBodyEvent(i, e, this.ctx.body.renderRows, (s) => {
3052
- this.ctx.clickCell = s, this.ctx.emit("cellClick", s, t), this.selectionClick(s, t), this.treeClick(s, t), this.hoverIconClick(s);
3053
- });
3051
+ }), this.handleBodyEvent(
3052
+ i,
3053
+ e,
3054
+ this.ctx.body.renderRows,
3055
+ (s) => {
3056
+ this.ctx.clickCell = s, this.ctx.emit("cellClick", s, t), this.selectionClick(s, t), this.treeClick(s, t);
3057
+ },
3058
+ !0
3059
+ ), this.handleBodyEvent(
3060
+ i,
3061
+ e,
3062
+ this.ctx.body.renderRows,
3063
+ (s) => {
3064
+ this.hoverIconClick(s);
3065
+ },
3066
+ !1
3067
+ );
3054
3068
  }), this.ctx.on("dblclick", (t) => {
3055
3069
  if (t.button !== 0 || this.isBusy(t))
3056
3070
  return;
@@ -3083,7 +3097,7 @@ class be {
3083
3097
  e,
3084
3098
  this.ctx.body.renderRows,
3085
3099
  (s) => {
3086
- this.visibleHoverCell !== s && (this.ctx.emit("visibleCellMouseleave", s, t), this.visibleHoverCell = s, this.ctx.hoverCellHeader = void 0, this.ctx.emit("visibleCellHoverChange", s, t));
3100
+ this.imageEnterAndLeave(s, t), this.visibleHoverCell !== s && (this.ctx.emit("visibleCellMouseleave", s, t), this.visibleHoverCell = s, this.ctx.hoverCellHeader = void 0, this.ctx.emit("visibleCellHoverChange", s, t));
3087
3101
  },
3088
3102
  !0
3089
3103
  ), this.handleBodyEvent(i, e, this.ctx.body.renderRows, (s) => {
@@ -3111,7 +3125,7 @@ class be {
3111
3125
  t.drawSelectionImageWidth,
3112
3126
  t.drawSelectionImageHeight
3113
3127
  ))
3114
- if (t instanceof lt)
3128
+ if (t instanceof ht)
3115
3129
  t.drawSelectionImageName === "checkbox-uncheck" || t.drawSelectionImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawSelectionImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
3116
3130
  else {
3117
3131
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -3136,8 +3150,8 @@ class be {
3136
3150
  t.drawTreeImageHeight
3137
3151
  ))
3138
3152
  return;
3139
- const c = this.ctx.database.getRowForRowKey(t.rowKey), { expand: l = !1, expandLazy: d = !1 } = c || {}, { EXPAND_LAZY: f, EXPAND_LAZY_METHOD: u } = this.ctx.config;
3140
- if (f && u && !l && !d)
3153
+ const c = this.ctx.database.getRowForRowKey(t.rowKey), { expand: h = !1, expandLazy: d = !1 } = c || {}, { EXPAND_LAZY: f, EXPAND_LAZY_METHOD: u } = this.ctx.config;
3154
+ if (f && u && !h && !d)
3141
3155
  typeof u == "function" && (this.ctx.database.expandLoading(t.rowKey, !0), u({
3142
3156
  row: t.row,
3143
3157
  rowIndex: t.rowIndex,
@@ -3176,7 +3190,7 @@ class be {
3176
3190
  */
3177
3191
  imageEnterAndLeave(t, e) {
3178
3192
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
3179
- if (t instanceof lt) {
3193
+ if (t instanceof ht) {
3180
3194
  if (t.drawSelectionImageSource && this.isInsideElement(
3181
3195
  r,
3182
3196
  o,
@@ -3251,13 +3265,13 @@ class be {
3251
3265
  for (const r of i) {
3252
3266
  const a = r.fixedCells.concat(r.noFixedCells);
3253
3267
  for (const c of a) {
3254
- const l = c.getDrawX(), d = c.getDrawY();
3268
+ const h = c.getDrawX(), d = c.getDrawY();
3255
3269
  if (o) {
3256
- if (t > l && t < l + c.visibleWidth && e > d && e < d + c.visibleHeight) {
3270
+ if (t > h && t < h + c.visibleWidth && e > d && e < d + c.visibleHeight) {
3257
3271
  s(c);
3258
3272
  return;
3259
3273
  }
3260
- } else if (t > l && t < l + c.width && e > d && e < d + c.height) {
3274
+ } else if (t > h && t < h + c.width && e > d && e < d + c.height) {
3261
3275
  s(c);
3262
3276
  return;
3263
3277
  }
@@ -3398,9 +3412,9 @@ class Ie {
3398
3412
  overlayerElement: r,
3399
3413
  editorElement: a,
3400
3414
  emptyElement: c,
3401
- contextMenuElement: l
3415
+ contextMenuElement: h
3402
3416
  } = t;
3403
- this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = c, this.contextMenuElement = l, this.config = new It(e.config || {}), this.eventBus = new me(), this.eventBrowser = new we(this), this.eventTable = new be(this), this.paint = new Ee(this.canvasElement), this.database = new ue(this, e), this.history = new ge(this), this.icons = new Ce(this);
3417
+ this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = c, this.contextMenuElement = h, this.config = new It(e.config || {}), this.eventBus = new me(), this.eventBrowser = new we(this), this.eventTable = new be(this), this.paint = new Ee(this.canvasElement), this.database = new ue(this, e), this.history = new ge(this), this.icons = new Ce(this);
3404
3418
  }
3405
3419
  setConfig(t) {
3406
3420
  this.config = new It(t);
@@ -3409,8 +3423,8 @@ class Ie {
3409
3423
  if (this.config.ENABLE_MERGE_CELL_LINK) {
3410
3424
  const a = this.database.getVirtualBodyCellByKey(t, e);
3411
3425
  if (a && (a.mergeRow || a.mergeCol)) {
3412
- const { dataList: c } = a.getSpanInfo(), l = c.map((d) => ({ ...d, value: i }));
3413
- this.database.batchSetItemValue(l, s, r);
3426
+ const { dataList: c } = a.getSpanInfo(), h = c.map((d) => ({ ...d, value: i }));
3427
+ this.database.batchSetItemValue(h, s, r);
3414
3428
  return;
3415
3429
  }
3416
3430
  }
@@ -3424,7 +3438,7 @@ class Ie {
3424
3438
  if (r === void 0 || a === void 0) return;
3425
3439
  const c = this.database.getVirtualBodyCell(r, a);
3426
3440
  if (c) {
3427
- const { dataList: l } = c.getSpanInfo(), d = l.map((f) => ({ ...f, value: o.value }));
3441
+ const { dataList: h } = c.getSpanInfo(), d = h.map((f) => ({ ...f, value: o.value }));
3428
3442
  s.push(...d);
3429
3443
  }
3430
3444
  }), this.database.batchSetItemValue(s, e, i);
@@ -3469,7 +3483,7 @@ class Ie {
3469
3483
  for (let o = 0; o <= e[1] - e[0]; o++) {
3470
3484
  const r = [];
3471
3485
  for (let a = 0; a <= i[1] - i[0]; a++) {
3472
- const c = o + e[0], l = a + i[0], d = this.database.getVirtualBodyCell(c, l);
3486
+ const c = o + e[0], h = a + i[0], d = this.database.getVirtualBodyCell(c, h);
3473
3487
  d && (d.selectorCellValueType === "displayText" ? r.push(d.displayText) : r.push(d.getValue()));
3474
3488
  }
3475
3489
  s += `${r.join(" ")}\r`, t.push(r);
@@ -3617,21 +3631,21 @@ class St {
3617
3631
  stageHeight: i,
3618
3632
  stageWidth: s,
3619
3633
  config: { SCROLLER_TRACK_SIZE: o = 0, SCROLLER_SIZE: r = 0, BORDER: a }
3620
- } = this.ctx, c = s, l = i, d = e.height, f = e.width, u = t.height, x = this.ctx.footer.height;
3634
+ } = this.ctx, c = s, h = i, d = e.height, f = e.width, u = t.height, x = this.ctx.footer.height;
3621
3635
  if (this.type === "vertical") {
3622
- this.visibleDistance = l - o - d, this.distance = u - this.visibleDistance + x, this.trackX = c - o, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + o, d], this.trackWidth = o, this.trackHeight = l, this.barX = this.trackX - 1 + (o - r) / 2, this.barWidth = r;
3636
+ this.visibleDistance = h - o - d, this.distance = u - this.visibleDistance + x, this.trackX = c - o, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + o, d], this.trackWidth = o, this.trackHeight = h, this.barX = this.trackX - 1 + (o - r) / 2, this.barWidth = r;
3623
3637
  const w = this.distance ? this.visibleDistance / (u + x) : 0;
3624
3638
  let m = Math.floor(w * this.visibleDistance);
3625
3639
  m < 30 ? m = 30 : m > this.visibleDistance && (m = 0), this.barHeight = m, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3626
3640
  } else {
3627
3641
  this.visibleDistance = c - o, this.distance = f - this.visibleDistance, this.splitPoints = [
3628
3642
  c - o,
3629
- l - o,
3643
+ h - o,
3630
3644
  c - o,
3631
- l
3645
+ h
3632
3646
  ];
3633
3647
  const w = a ? 0 : 0.5;
3634
- this.trackX = 0, this.trackY = l - o + w, this.trackWidth = c, this.trackHeight = o;
3648
+ this.trackX = 0, this.trackY = h - o + w, this.trackWidth = c, this.trackHeight = o;
3635
3649
  const m = this.distance ? this.visibleDistance / f : 0;
3636
3650
  let g = Math.floor(m * this.visibleDistance);
3637
3651
  this.barY = this.trackY - 1 + (o - r) / 2, g < 30 ? g = 30 : g >= this.visibleDistance && (g = 0), this.barWidth = g, this.barHeight = r, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
@@ -3785,8 +3799,8 @@ class Se {
3785
3799
  const f = Math.floor(c / this.resizeNum * 100) / 100;
3786
3800
  this.resizeAllColumn(f);
3787
3801
  }
3788
- const l = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
3789
- this.ctx.fixedLeftWidth = l.reduce((f, u) => f + u.width, 0);
3802
+ const h = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
3803
+ this.ctx.fixedLeftWidth = h.reduce((f, u) => f + u.width, 0);
3790
3804
  const d = this.fixedRightCellHeaders.filter((f) => !f.hasChildren);
3791
3805
  this.ctx.fixedRightWidth = d.reduce((f, u) => f + u.width, e), this.ctx.maxColIndex = this.leafCellHeaders.length - 1, this.ctx.header.x = this.x, this.ctx.header.y = this.y, this.ctx.header.width = this.width, this.ctx.header.height = this.height, this.ctx.header.visibleWidth = this.visibleWidth, this.ctx.header.visibleHeight = this.visibleHeight;
3792
3806
  }
@@ -3819,8 +3833,8 @@ class Se {
3819
3833
  this.ctx.stageElement.style.cursor === "col-resize" && (this.ctx.stageElement.style.cursor = "default");
3820
3834
  const o = [...this.renderFixedCellHeaders, ...this.renderCenterCellHeaders];
3821
3835
  for (const r of o) {
3822
- const { offsetX: a, offsetY: c } = this.ctx.getOffset(e), l = a, d = r.getDrawX();
3823
- l > d + r.width - 5 && l < d + r.width + 4 && l < i - 4 && // 视窗中最后一列不允许调整宽
3836
+ const { offsetX: a, offsetY: c } = this.ctx.getOffset(e), h = a, d = r.getDrawX();
3837
+ h > d + r.width - 5 && h < d + r.width + 4 && h < i - 4 && // 视窗中最后一列不允许调整宽
3824
3838
  r.colspan <= 1 && this.ctx.isTarget(e) && c <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = r);
3825
3839
  }
3826
3840
  }
@@ -3875,10 +3889,10 @@ class Se {
3875
3889
  let s = e;
3876
3890
  const { HEADER_HEIGHT: o = 0 } = this.ctx.config;
3877
3891
  for (let r = 0; r < i; r++) {
3878
- const a = t[r], c = o * (a.rowspan || 0), l = o * (a.level || 0);
3892
+ const a = t[r], c = o * (a.rowspan || 0), h = o * (a.level || 0);
3879
3893
  let { minWidth: d, maxWidth: f } = a, u = a.width || 100;
3880
3894
  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));
3881
- const x = new lt(this.ctx, this.columnIndex, s, l, u, c, a);
3895
+ const x = new ht(this.ctx, this.columnIndex, s, h, u, c, a);
3882
3896
  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;
3883
3897
  }
3884
3898
  }
@@ -4045,7 +4059,7 @@ class ve {
4045
4059
  SCROLLER_TRACK_SIZE: r = 0,
4046
4060
  HEIGHT: a,
4047
4061
  EMPTY_BODY_HEIGHT: c = 0,
4048
- MAX_HEIGHT: l = 0,
4062
+ MAX_HEIGHT: h = 0,
4049
4063
  ENABLE_OFFSET_HEIGHT: d = 0,
4050
4064
  OFFSET_HEIGHT: f = 0,
4051
4065
  FOOTER_POSITION: u
@@ -4064,8 +4078,8 @@ class ve {
4064
4078
  const y = window.innerHeight, { top: p } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4065
4079
  if (y > p && d && !a) {
4066
4080
  const O = y - p - f;
4067
- O > e.height + r ? E = O : g > l && (E = l);
4068
- } else this.data.length && a ? E = a : this.data.length && l && g > l && (E = l);
4081
+ O > e.height + r ? E = O : g > h && (E = h);
4082
+ } else this.data.length && a ? E = a : this.data.length && h && g > h && (E = h);
4069
4083
  E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
4070
4084
  let b = this.ctx.stageHeight - e.height - r;
4071
4085
  o ? this.visibleHeight = b - m : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = x;
@@ -4103,7 +4117,7 @@ class ve {
4103
4117
  if (this.ctx.editing) return;
4104
4118
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s, a = e.clientY, {
4105
4119
  stageHeight: c,
4106
- scrollY: l,
4120
+ scrollY: h,
4107
4121
  config: { RESIZE_ROW_MIN_HEIGHT: d = 0 }
4108
4122
  } = this.ctx;
4109
4123
  if (this.isResizing && this.resizeTarget) {
@@ -4122,7 +4136,7 @@ class ve {
4122
4136
  this.ctx.stageElement.style.cursor === "row-resize" && (this.ctx.stageElement.style.cursor = "default");
4123
4137
  for (let f = 0; f < this.renderRows.length; f++) {
4124
4138
  const u = this.renderRows[f];
4125
- if (o > u.y - l + u.height - 1.5 && o < u.y - l + u.height + 1.5 && o < c - 4)
4139
+ if (o > u.y - h + u.height - 1.5 && o < u.y - h + u.height + 1.5 && o < c - 4)
4126
4140
  for (let w = 0; w < u.cells.length; w++) {
4127
4141
  const m = u.cells[w];
4128
4142
  r > m.drawX + 10 && r < m.drawX + m.width - 10 && m.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = u);
@@ -4200,12 +4214,12 @@ class ve {
4200
4214
  config: { CELL_HEIGHT: s }
4201
4215
  } = this.ctx, o = i, { data: r, positions: a } = e.getData();
4202
4216
  this.ctx.maxRowIndex = r.length - 1;
4203
- let c = this.binarySearch(a, o), l = this.binarySearch(a, o + this.visibleHeight);
4204
- if (l === -1 && (l = this.ctx.maxRowIndex), c === -1 && l === this.ctx.maxRowIndex) {
4217
+ let c = this.binarySearch(a, o), h = this.binarySearch(a, o + this.visibleHeight);
4218
+ if (h === -1 && (h = this.ctx.maxRowIndex), c === -1 && h === this.ctx.maxRowIndex) {
4205
4219
  const f = Math.floor(this.visibleHeight / s);
4206
4220
  c = this.ctx.maxRowIndex - f;
4207
4221
  }
4208
- this.headIndex = Math.max(0, c), this.tailIndex = Math.min(this.ctx.maxRowIndex, l + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4222
+ this.headIndex = Math.max(0, c), this.tailIndex = Math.min(this.ctx.maxRowIndex, h + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4209
4223
  const d = [];
4210
4224
  for (let f = 0; f < this.visibleRows.length; f++) {
4211
4225
  const u = this.headIndex + f, x = this.visibleRows[f], { height: w, top: m } = this.ctx.database.getPositionForRowIndex(u), g = new Bt(this.ctx, u, 0, m + this.y, t.width, w, x);
@@ -4264,8 +4278,8 @@ class _e {
4264
4278
  colorStart: "rgba(0,0,0,0.1)",
4265
4279
  colorEnd: "rgba(0,0,0,0)"
4266
4280
  }), i < Math.floor(s.width - o - 1) && e !== a) {
4267
- const l = s.width - (this.x + this.width) + o - e;
4268
- this.ctx.paint.drawShadow(l, c, e, this.height, {
4281
+ const h = s.width - (this.x + this.width) + o - e;
4282
+ this.ctx.paint.drawShadow(h, c, e, this.height, {
4269
4283
  fillColor: r,
4270
4284
  side: "left",
4271
4285
  shadowWidth: 4,
@@ -4424,11 +4438,11 @@ class Te {
4424
4438
  const {
4425
4439
  SELECTOR_AREA_MIN_X: a,
4426
4440
  SELECTOR_AREA_MAX_X: c,
4427
- SELECTOR_AREA_MIN_Y: l,
4441
+ SELECTOR_AREA_MIN_Y: h,
4428
4442
  SELECTOR_AREA_MAX_Y: d,
4429
4443
  SELECTOR_AREA_MAX_X_OFFSET: f,
4430
4444
  SELECTOR_AREA_MAX_Y_OFFSET: u
4431
- } = this.ctx.config, x = a, w = c || this.ctx.maxColIndex - f, m = l, g = d || this.ctx.maxRowIndex - u;
4445
+ } = this.ctx.config, x = a, w = c || this.ctx.maxColIndex - f, m = h, g = d || this.ctx.maxRowIndex - u;
4432
4446
  let [E, y] = o, [p, b] = r;
4433
4447
  if (E < x || y > w || p < m || b > g)
4434
4448
  return;
@@ -4460,7 +4474,7 @@ class Te {
4460
4474
  const E = m + e[0], y = g + t[0], p = this.ctx.database.getVirtualBodyCell(E, y);
4461
4475
  p && ((E === i || E === s) && a.push(p), (y === o || y === r) && c.push(p));
4462
4476
  }
4463
- const l = a.reduce(
4477
+ const h = a.reduce(
4464
4478
  (m, g) => {
4465
4479
  const { yArr: E } = g.getSpanInfo(), [y, p] = E;
4466
4480
  return m.minY = Math.min(m.minY, y), m.maxY = Math.max(m.maxY, p), m;
@@ -4478,9 +4492,9 @@ class Te {
4478
4492
  minX: o,
4479
4493
  maxX: r
4480
4494
  }
4481
- ), f = [d.minX, d.maxX], u = [l.minY, l.maxY];
4495
+ ), f = [d.minX, d.maxX], u = [h.minY, h.maxY];
4482
4496
  let x = !1;
4483
- if (d.minX !== d.maxX || l.minY !== l.maxY) {
4497
+ if (d.minX !== d.maxX || h.minY !== h.maxY) {
4484
4498
  const m = JSON.stringify(f) + JSON.stringify(u), g = (w = this.ctx.focusCell) == null ? void 0 : w.getSpanInfo();
4485
4499
  x = (g && JSON.stringify(g.xArr) + JSON.stringify(g.yArr)) === m;
4486
4500
  }
@@ -4501,11 +4515,11 @@ class Te {
4501
4515
  if (this.ctx.mousedown && this.ctx.focusCellHeader) {
4502
4516
  const { colIndex: a } = this.ctx.focusCellHeader;
4503
4517
  if (this.ctx.clearSelector(), t.colIndex >= a) {
4504
- const c = [a, t.colIndex + t.colspan - 1], l = [o, r];
4505
- this.setSelector(c, l);
4518
+ const c = [a, t.colIndex + t.colspan - 1], h = [o, r];
4519
+ this.setSelector(c, h);
4506
4520
  } else {
4507
- const c = [t.colIndex, a], l = [o, r];
4508
- this.setSelector(c, l);
4521
+ const c = [t.colIndex, a], h = [o, r];
4522
+ this.setSelector(c, h);
4509
4523
  }
4510
4524
  } else {
4511
4525
  const a = [t.colIndex, t.colIndex + t.colspan - 1], c = [o, r];
@@ -4524,7 +4538,7 @@ class Te {
4524
4538
  SELECTOR_AREA_MAX_Y: r,
4525
4539
  SELECTOR_AREA_MAX_X_OFFSET: a,
4526
4540
  SELECTOR_AREA_MAX_Y_OFFSET: c
4527
- } = this.ctx.config, l = i, d = s || this.ctx.maxColIndex - a, f = o, u = r || this.ctx.maxRowIndex - c, x = [l, d], w = [f, u];
4541
+ } = this.ctx.config, h = i, d = s || this.ctx.maxColIndex - a, f = o, u = r || this.ctx.maxRowIndex - c, x = [h, d], w = [f, u];
4528
4542
  this.setSelector(x, w);
4529
4543
  }
4530
4544
  }
@@ -4534,17 +4548,17 @@ class Te {
4534
4548
  const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: o } = this.ctx.config, r = s || this.ctx.maxColIndex - o, a = i;
4535
4549
  if (e) {
4536
4550
  this.ctx.setFocusCell(t);
4537
- const c = [a, r], l = [t.rowIndex, t.rowIndex];
4538
- this.setSelector(c, l);
4551
+ const c = [a, r], h = [t.rowIndex, t.rowIndex];
4552
+ this.setSelector(c, h);
4539
4553
  }
4540
4554
  if (this.ctx.focusCell && this.ctx.mousedown) {
4541
4555
  const { rowIndex: c } = this.ctx.focusCell;
4542
4556
  if (t.rowIndex >= c) {
4543
- const l = [a, r], d = [c, t.rowIndex];
4544
- this.setSelector(l, d);
4557
+ const h = [a, r], d = [c, t.rowIndex];
4558
+ this.setSelector(h, d);
4545
4559
  } else {
4546
- const l = [a, r], d = [t.rowIndex, c];
4547
- this.setSelector(l, d);
4560
+ const h = [a, r], d = [t.rowIndex, c];
4561
+ this.setSelector(h, d);
4548
4562
  }
4549
4563
  }
4550
4564
  }
@@ -4553,7 +4567,7 @@ class Te {
4553
4567
  return;
4554
4568
  const { mousedown: t, focusCell: e, hoverCell: i } = this.ctx;
4555
4569
  if (t && e && i) {
4556
- const { rowIndex: s, colIndex: o } = e, r = Math.min(i.colIndex, o), a = Math.max(i.colIndex, o), c = Math.min(i.rowIndex, s), l = Math.max(i.rowIndex, s), d = [r, a], f = [c, l];
4570
+ const { rowIndex: s, colIndex: o } = e, r = Math.min(i.colIndex, o), a = Math.max(i.colIndex, o), c = Math.min(i.rowIndex, s), h = Math.max(i.rowIndex, s), d = [r, a], f = [c, h];
4557
4571
  this.setSelector(d, f);
4558
4572
  }
4559
4573
  }
@@ -4563,7 +4577,7 @@ class Te {
4563
4577
  if (this.ctx.selector.enable = !0, i && t) {
4564
4578
  if (this.ctx.config.ENABLE_SELECTOR_SINGLE)
4565
4579
  return;
4566
- const { colIndex: s, rowIndex: o } = i, { colIndex: r, rowIndex: a } = e, c = Math.min(r, s), l = Math.max(r, s), d = Math.min(a, o), f = Math.max(a, o), u = [c, l], x = [d, f];
4580
+ const { colIndex: s, rowIndex: o } = i, { colIndex: r, rowIndex: a } = e, c = Math.min(r, s), h = Math.max(r, s), d = Math.min(a, o), f = Math.max(a, o), u = [c, h], x = [d, f];
4567
4581
  this.setSelector(u, x);
4568
4582
  } else {
4569
4583
  this.ctx.emit("cellSelectedClick", e);
@@ -4616,7 +4630,7 @@ class Te {
4616
4630
  return;
4617
4631
  t = a.data;
4618
4632
  }
4619
- const o = le(t);
4633
+ const o = he(t);
4620
4634
  navigator.clipboard ? navigator.clipboard.writeText(o).then(() => {
4621
4635
  this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
4622
4636
  xArr: this.ctx.selector.xArrCopy,
@@ -4629,8 +4643,8 @@ class Te {
4629
4643
  let o = [];
4630
4644
  const r = /* @__PURE__ */ new Set();
4631
4645
  for (let c = 0; c <= e[1] - e[0]; c++)
4632
- for (let l = 0; l <= t[1] - t[0]; l++) {
4633
- const d = c + e[0], f = l + t[0], u = this.ctx.database.getItemValueForRowIndexAndColIndex(d, f);
4646
+ for (let h = 0; h <= t[1] - t[0]; h++) {
4647
+ const d = c + e[0], f = h + t[0], u = this.ctx.database.getItemValueForRowIndexAndColIndex(d, f);
4634
4648
  if (u) {
4635
4649
  const { rowKey: x, key: w } = u;
4636
4650
  this.ctx.database.getReadonly(x, w) || (r.add(x), o.push({
@@ -4662,11 +4676,11 @@ class Te {
4662
4676
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4663
4677
  navigator.clipboard.readText().then(async (o) => {
4664
4678
  let r = ce(o);
4665
- const a = [i, i + r[0].length - 1], c = [e, e + r.length - 1], [l, d] = c, [f, u] = a, x = d - this.ctx.maxRowIndex, w = u - this.ctx.maxColIndex;
4679
+ const a = [i, i + r[0].length - 1], c = [e, e + r.length - 1], [h, d] = c, [f, u] = a, x = d - this.ctx.maxRowIndex, w = u - this.ctx.maxColIndex;
4666
4680
  (x > 0 || w > 0) && this.ctx.emit("onPastedDataOverflow", {
4667
4681
  maxY: d,
4668
4682
  maxX: u,
4669
- minY: l,
4683
+ minY: h,
4670
4684
  minX: f,
4671
4685
  overflowRowCount: x,
4672
4686
  overflowColCount: w,
@@ -4761,8 +4775,8 @@ class Te {
4761
4775
  s < c && s++;
4762
4776
  break;
4763
4777
  }
4764
- const l = [i, i], d = [s, s], f = this.getCell(s, i);
4765
- f && (f.operation || this.isInSettingRange(f.rowIndex, f.colIndex) && (this.ctx.setFocusCell(f), this.setSelector(l, d), this.adjustBoundaryPosition(), this.ctx.emit("moveFocus", f), this.ctx.emit("draw")));
4778
+ const h = [i, i], d = [s, s], f = this.getCell(s, i);
4779
+ f && (f.operation || this.isInSettingRange(f.rowIndex, f.colIndex) && (this.ctx.setFocusCell(f), this.setSelector(h, d), this.adjustBoundaryPosition(), this.ctx.emit("moveFocus", f), this.ctx.emit("draw")));
4766
4780
  }
4767
4781
  stopAdjustPosition() {
4768
4782
  this.adjustPositionX = "", this.adjustPositionY = "", this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerY && (clearInterval(this.timerY), this.timerY = 0);
@@ -4776,8 +4790,8 @@ class Te {
4776
4790
  SELECTOR_AREA_MAX_Y: r,
4777
4791
  SELECTOR_AREA_MAX_X_OFFSET: a,
4778
4792
  SELECTOR_AREA_MAX_Y_OFFSET: c
4779
- } = this.ctx.config, l = i, d = s || this.ctx.maxColIndex - a, f = o, u = r || this.ctx.maxRowIndex - c;
4780
- return !(e < l || e > d || t < f || t > u);
4793
+ } = this.ctx.config, h = i, d = s || this.ctx.maxColIndex - a, f = o, u = r || this.ctx.maxRowIndex - c;
4794
+ return !(e < h || e > d || t < f || t > u);
4781
4795
  }
4782
4796
  /**
4783
4797
  * 调整滚动条位置,让到达边界时自动滚动
@@ -4790,8 +4804,8 @@ class Te {
4790
4804
  let a = 10 * (s === "left" ? -1 : 1);
4791
4805
  this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerX = setInterval(() => {
4792
4806
  a *= 1.5;
4793
- const { scrollX: c } = this.ctx, l = c + a;
4794
- (l < 0 || l > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(l);
4807
+ const { scrollX: c } = this.ctx, h = c + a;
4808
+ (h < 0 || h > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(h);
4795
4809
  }, 100);
4796
4810
  }
4797
4811
  if (o && this.adjustPositionY !== o) {
@@ -4799,8 +4813,8 @@ class Te {
4799
4813
  let a = 10 * (o === "top" ? -1 : 1);
4800
4814
  this.timerY && (clearInterval(this.timerY), this.timerY = 0), this.timerY = setInterval(() => {
4801
4815
  a *= 1.5;
4802
- const { scrollY: c } = this.ctx, l = c + a;
4803
- (l < 0 || l > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(l);
4816
+ const { scrollY: c } = this.ctx, h = c + a;
4817
+ (h < 0 || h > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(h);
4804
4818
  }, 100);
4805
4819
  }
4806
4820
  }
@@ -4817,7 +4831,7 @@ class Te {
4817
4831
  header: r,
4818
4832
  footer: a,
4819
4833
  body: c,
4820
- scrollX: l,
4834
+ scrollX: h,
4821
4835
  scrollY: d,
4822
4836
  config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: u, FOOTER_POSITION: x, ENABLE_MERGE_CELL_LINK: w }
4823
4837
  } = this.ctx;
@@ -4830,8 +4844,8 @@ class Te {
4830
4844
  let T = 0;
4831
4845
  u && (x === "top" ? R = r.height + a.height - g : T = a.visibleHeight);
4832
4846
  const S = g + v - (t - T - f);
4833
- let I = l, _ = d;
4834
- C > 0 && !p ? I = Math.floor(l + C) : b > 0 && !p && (I = Math.floor(l - b)), R > 0 ? _ = Math.floor(d - R) : S > 0 && (_ = Math.floor(d + S)), (Math.abs(l - I) > 2 || Math.abs(d - _) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(I, _), this.ctx.emit("adjustBoundaryPosition", i));
4847
+ let I = h, _ = d;
4848
+ C > 0 && !p ? I = Math.floor(h + C) : b > 0 && !p && (I = Math.floor(h - b)), R > 0 ? _ = Math.floor(d - R) : S > 0 && (_ = Math.floor(d + S)), (Math.abs(h - I) > 2 || Math.abs(d - _) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(I, _), this.ctx.emit("adjustBoundaryPosition", i));
4835
4849
  }
4836
4850
  destroy() {
4837
4851
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -4847,7 +4861,7 @@ class Oe {
4847
4861
  this.ctx.on("mousemove", (t) => {
4848
4862
  if (this.ctx.stageElement.style.cursor === "crosshair" && (this.ctx.stageElement.style.cursor = "default"), this.ctx.editing || !this.ctx.focusCell || !this.maxColRowCell)
4849
4863
  return;
4850
- const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: o, drawX: r, drawY: a, width: c, height: l } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || o === this.ctx.maxRowIndex ? 0 : 2, u = r + c - d + f, x = a + l - d + f;
4864
+ const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: o, drawX: r, drawY: a, width: c, height: h } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || o === this.ctx.maxRowIndex ? 0 : 2, u = r + c - d + f, x = a + h - d + f;
4851
4865
  e > u && i > x && e < u + d && i < x + d && (this.ctx.stageElement.style.cursor = "crosshair");
4852
4866
  }), this.ctx.on("cellMouseenter", (t) => {
4853
4867
  const { xArr: e, yArr: i } = this.ctx.selector, s = e[1], o = i[1], { colIndex: r, rowIndex: a } = t;
@@ -4890,12 +4904,12 @@ class Oe {
4890
4904
  if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(r) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(a)) {
4891
4905
  const {
4892
4906
  SELECTOR_AREA_MIN_X: c,
4893
- SELECTOR_AREA_MAX_X: l,
4907
+ SELECTOR_AREA_MAX_X: h,
4894
4908
  SELECTOR_AREA_MIN_Y: d,
4895
4909
  SELECTOR_AREA_MAX_Y: f,
4896
4910
  SELECTOR_AREA_MAX_X_OFFSET: u,
4897
4911
  SELECTOR_AREA_MAX_Y_OFFSET: x
4898
- } = this.ctx.config, w = c, m = l || this.ctx.maxColIndex - u, g = d, E = f || this.ctx.maxRowIndex - x;
4912
+ } = this.ctx.config, w = c, m = h || this.ctx.maxColIndex - u, g = d, E = f || this.ctx.maxRowIndex - x;
4899
4913
  let [y, p] = r, [b, C] = a;
4900
4914
  if (y < w || b < g)
4901
4915
  return;
@@ -4924,8 +4938,8 @@ class Oe {
4924
4938
  const m = x + e.yArr[0], g = w + e.xArr[0];
4925
4939
  i.set(`${m}-${g}`, !0);
4926
4940
  }
4927
- const { value: s } = e, o = s[0].length, r = s.length, a = this.ctx.autofill.xArr, c = this.ctx.autofill.yArr, l = o === 1 && r === 1;
4928
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, c) && !l) {
4941
+ const { value: s } = e, o = s[0].length, r = s.length, a = this.ctx.autofill.xArr, c = this.ctx.autofill.yArr, h = o === 1 && r === 1;
4942
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, c) && !h) {
4929
4943
  const x = {
4930
4944
  code: "ERR_MERGED_CELLS_AUTOFILL",
4931
4945
  message: "Merged cells cannot span autofill data"
@@ -4980,9 +4994,9 @@ class Oe {
4980
4994
  destroy() {
4981
4995
  }
4982
4996
  }
4983
- const j = Math.min, $ = Math.max, it = Math.round, Y = (h) => ({
4984
- x: h,
4985
- y: h
4997
+ const j = Math.min, $ = Math.max, it = Math.round, Y = (l) => ({
4998
+ x: l,
4999
+ y: l
4986
5000
  }), Le = {
4987
5001
  left: "right",
4988
5002
  right: "left",
@@ -4992,47 +5006,47 @@ const j = Math.min, $ = Math.max, it = Math.round, Y = (h) => ({
4992
5006
  start: "end",
4993
5007
  end: "start"
4994
5008
  };
4995
- function ht(h, t, e) {
4996
- return $(h, j(t, e));
5009
+ function lt(l, t, e) {
5010
+ return $(l, j(t, e));
4997
5011
  }
4998
- function J(h, t) {
4999
- return typeof h == "function" ? h(t) : h;
5012
+ function J(l, t) {
5013
+ return typeof l == "function" ? l(t) : l;
5000
5014
  }
5001
- function z(h) {
5002
- return h.split("-")[0];
5015
+ function z(l) {
5016
+ return l.split("-")[0];
5003
5017
  }
5004
- function Q(h) {
5005
- return h.split("-")[1];
5018
+ function Q(l) {
5019
+ return l.split("-")[1];
5006
5020
  }
5007
- function Kt(h) {
5008
- return h === "x" ? "y" : "x";
5021
+ function Kt(l) {
5022
+ return l === "x" ? "y" : "x";
5009
5023
  }
5010
- function gt(h) {
5011
- return h === "y" ? "height" : "width";
5024
+ function gt(l) {
5025
+ return l === "y" ? "height" : "width";
5012
5026
  }
5013
5027
  const Me = /* @__PURE__ */ new Set(["top", "bottom"]);
5014
- function V(h) {
5015
- return Me.has(z(h)) ? "y" : "x";
5028
+ function V(l) {
5029
+ return Me.has(z(l)) ? "y" : "x";
5016
5030
  }
5017
- function wt(h) {
5018
- return Kt(V(h));
5031
+ function wt(l) {
5032
+ return Kt(V(l));
5019
5033
  }
5020
- function He(h, t, e) {
5034
+ function He(l, t, e) {
5021
5035
  e === void 0 && (e = !1);
5022
- const i = Q(h), s = wt(h), o = gt(s);
5036
+ const i = Q(l), s = wt(l), o = gt(s);
5023
5037
  let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
5024
5038
  return t.reference[o] > t.floating[o] && (r = st(r)), [r, st(r)];
5025
5039
  }
5026
- function De(h) {
5027
- const t = st(h);
5028
- return [dt(h), t, dt(t)];
5040
+ function De(l) {
5041
+ const t = st(l);
5042
+ return [dt(l), t, dt(t)];
5029
5043
  }
5030
- function dt(h) {
5031
- return h.replace(/start|end/g, (t) => Ae[t]);
5044
+ function dt(l) {
5045
+ return l.replace(/start|end/g, (t) => Ae[t]);
5032
5046
  }
5033
5047
  const vt = ["left", "right"], _t = ["right", "left"], Ne = ["top", "bottom"], ke = ["bottom", "top"];
5034
- function Xe(h, t, e) {
5035
- switch (h) {
5048
+ function Xe(l, t, e) {
5049
+ switch (l) {
5036
5050
  case "top":
5037
5051
  case "bottom":
5038
5052
  return e ? t ? _t : vt : t ? vt : _t;
@@ -5043,38 +5057,38 @@ function Xe(h, t, e) {
5043
5057
  return [];
5044
5058
  }
5045
5059
  }
5046
- function Ye(h, t, e, i) {
5047
- const s = Q(h);
5048
- let o = Xe(z(h), e === "start", i);
5060
+ function Ye(l, t, e, i) {
5061
+ const s = Q(l);
5062
+ let o = Xe(z(l), e === "start", i);
5049
5063
  return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(dt)))), o;
5050
5064
  }
5051
- function st(h) {
5052
- return h.replace(/left|right|bottom|top/g, (t) => Le[t]);
5065
+ function st(l) {
5066
+ return l.replace(/left|right|bottom|top/g, (t) => Le[t]);
5053
5067
  }
5054
- function Be(h) {
5068
+ function Be(l) {
5055
5069
  return {
5056
5070
  top: 0,
5057
5071
  right: 0,
5058
5072
  bottom: 0,
5059
5073
  left: 0,
5060
- ...h
5074
+ ...l
5061
5075
  };
5062
5076
  }
5063
- function Wt(h) {
5064
- return typeof h != "number" ? Be(h) : {
5065
- top: h,
5066
- right: h,
5067
- bottom: h,
5068
- left: h
5077
+ function Wt(l) {
5078
+ return typeof l != "number" ? Be(l) : {
5079
+ top: l,
5080
+ right: l,
5081
+ bottom: l,
5082
+ left: l
5069
5083
  };
5070
5084
  }
5071
- function ot(h) {
5085
+ function ot(l) {
5072
5086
  const {
5073
5087
  x: t,
5074
5088
  y: e,
5075
5089
  width: i,
5076
5090
  height: s
5077
- } = h;
5091
+ } = l;
5078
5092
  return {
5079
5093
  width: i,
5080
5094
  height: s,
@@ -5086,12 +5100,12 @@ function ot(h) {
5086
5100
  y: e
5087
5101
  };
5088
5102
  }
5089
- function Tt(h, t, e) {
5103
+ function Tt(l, t, e) {
5090
5104
  let {
5091
5105
  reference: i,
5092
5106
  floating: s
5093
- } = h;
5094
- const o = V(t), r = wt(t), a = gt(r), c = z(t), l = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, u = i[a] / 2 - s[a] / 2;
5107
+ } = l;
5108
+ const o = V(t), r = wt(t), a = gt(r), c = z(t), h = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, u = i[a] / 2 - s[a] / 2;
5095
5109
  let x;
5096
5110
  switch (c) {
5097
5111
  case "top":
@@ -5126,29 +5140,29 @@ function Tt(h, t, e) {
5126
5140
  }
5127
5141
  switch (Q(t)) {
5128
5142
  case "start":
5129
- x[r] -= u * (e && l ? -1 : 1);
5143
+ x[r] -= u * (e && h ? -1 : 1);
5130
5144
  break;
5131
5145
  case "end":
5132
- x[r] += u * (e && l ? -1 : 1);
5146
+ x[r] += u * (e && h ? -1 : 1);
5133
5147
  break;
5134
5148
  }
5135
5149
  return x;
5136
5150
  }
5137
- const Ke = async (h, t, e) => {
5151
+ const Ke = async (l, t, e) => {
5138
5152
  const {
5139
5153
  placement: i = "bottom",
5140
5154
  strategy: s = "absolute",
5141
5155
  middleware: o = [],
5142
5156
  platform: r
5143
5157
  } = e, a = o.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(t));
5144
- let l = await r.getElementRects({
5145
- reference: h,
5158
+ let h = await r.getElementRects({
5159
+ reference: l,
5146
5160
  floating: t,
5147
5161
  strategy: s
5148
5162
  }), {
5149
5163
  x: d,
5150
5164
  y: f
5151
- } = Tt(l, i, c), u = i, x = {}, w = 0;
5165
+ } = Tt(h, i, c), u = i, x = {}, w = 0;
5152
5166
  for (let m = 0; m < a.length; m++) {
5153
5167
  const {
5154
5168
  name: g,
@@ -5165,10 +5179,10 @@ const Ke = async (h, t, e) => {
5165
5179
  placement: u,
5166
5180
  strategy: s,
5167
5181
  middlewareData: x,
5168
- rects: l,
5182
+ rects: h,
5169
5183
  platform: r,
5170
5184
  elements: {
5171
- reference: h,
5185
+ reference: l,
5172
5186
  floating: t
5173
5187
  }
5174
5188
  });
@@ -5178,14 +5192,14 @@ const Ke = async (h, t, e) => {
5178
5192
  ...x[g],
5179
5193
  ...b
5180
5194
  }
5181
- }, C && w <= 50 && (w++, typeof C == "object" && (C.placement && (u = C.placement), C.rects && (l = C.rects === !0 ? await r.getElementRects({
5182
- reference: h,
5195
+ }, C && w <= 50 && (w++, typeof C == "object" && (C.placement && (u = C.placement), C.rects && (h = C.rects === !0 ? await r.getElementRects({
5196
+ reference: l,
5183
5197
  floating: t,
5184
5198
  strategy: s
5185
5199
  }) : C.rects), {
5186
5200
  x: d,
5187
5201
  y: f
5188
- } = Tt(l, u, c)), m = -1);
5202
+ } = Tt(h, u, c)), m = -1);
5189
5203
  }
5190
5204
  return {
5191
5205
  x: d,
@@ -5195,7 +5209,7 @@ const Ke = async (h, t, e) => {
5195
5209
  middlewareData: x
5196
5210
  };
5197
5211
  };
5198
- async function Ft(h, t) {
5212
+ async function Ft(l, t) {
5199
5213
  var e;
5200
5214
  t === void 0 && (t = {});
5201
5215
  const {
@@ -5205,15 +5219,15 @@ async function Ft(h, t) {
5205
5219
  rects: r,
5206
5220
  elements: a,
5207
5221
  strategy: c
5208
- } = h, {
5209
- boundary: l = "clippingAncestors",
5222
+ } = l, {
5223
+ boundary: h = "clippingAncestors",
5210
5224
  rootBoundary: d = "viewport",
5211
5225
  elementContext: f = "floating",
5212
5226
  altBoundary: u = !1,
5213
5227
  padding: x = 0
5214
- } = J(t, h), w = Wt(x), g = a[u ? f === "floating" ? "reference" : "floating" : f], E = ot(await o.getClippingRect({
5228
+ } = J(t, l), w = Wt(x), g = a[u ? f === "floating" ? "reference" : "floating" : f], E = ot(await o.getClippingRect({
5215
5229
  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)),
5216
- boundary: l,
5230
+ boundary: h,
5217
5231
  rootBoundary: d,
5218
5232
  strategy: c
5219
5233
  })), y = f === "floating" ? {
@@ -5240,9 +5254,9 @@ async function Ft(h, t) {
5240
5254
  right: (C.right - E.right + w.right) / b.x
5241
5255
  };
5242
5256
  }
5243
- const We = (h) => ({
5257
+ const We = (l) => ({
5244
5258
  name: "arrow",
5245
- options: h,
5259
+ options: l,
5246
5260
  async fn(t) {
5247
5261
  const {
5248
5262
  x: e,
@@ -5253,18 +5267,18 @@ const We = (h) => ({
5253
5267
  elements: a,
5254
5268
  middlewareData: c
5255
5269
  } = t, {
5256
- element: l,
5270
+ element: h,
5257
5271
  padding: d = 0
5258
- } = J(h, t) || {};
5259
- if (l == null)
5272
+ } = J(l, t) || {};
5273
+ if (h == null)
5260
5274
  return {};
5261
5275
  const f = Wt(d), u = {
5262
5276
  x: e,
5263
5277
  y: i
5264
- }, x = wt(s), w = gt(x), m = await r.getDimensions(l), g = x === "y", E = g ? "top" : "left", y = g ? "bottom" : "right", p = g ? "clientHeight" : "clientWidth", b = o.reference[w] + o.reference[x] - u[x] - o.floating[w], C = u[x] - o.reference[x], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
5278
+ }, x = wt(s), w = gt(x), m = await r.getDimensions(h), g = x === "y", E = g ? "top" : "left", y = g ? "bottom" : "right", p = g ? "clientHeight" : "clientWidth", b = o.reference[w] + o.reference[x] - u[x] - o.floating[w], C = u[x] - o.reference[x], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
5265
5279
  let v = R ? R[p] : 0;
5266
5280
  (!v || !await (r.isElement == null ? void 0 : r.isElement(R))) && (v = a.floating[p] || o.floating[w]);
5267
- const T = b / 2 - C / 2, S = v / 2 - m[w] / 2 - 1, I = j(f[E], S), _ = j(f[y], S), O = I, M = v - m[w] - _, L = v / 2 - m[w] / 2 + T, H = ht(O, L, M), K = !c.arrow && Q(s) != null && L !== H && o.reference[w] / 2 - (L < O ? I : _) - m[w] / 2 < 0, D = K ? L < O ? L - O : L - M : 0;
5281
+ const T = b / 2 - C / 2, S = v / 2 - m[w] / 2 - 1, I = j(f[E], S), _ = j(f[y], S), O = I, M = v - m[w] - _, L = v / 2 - m[w] / 2 + T, H = lt(O, L, M), K = !c.arrow && Q(s) != null && L !== H && o.reference[w] / 2 - (L < O ? I : _) - m[w] / 2 < 0, D = K ? L < O ? L - O : L - M : 0;
5268
5282
  return {
5269
5283
  [x]: u[x] + D,
5270
5284
  data: {
@@ -5277,10 +5291,10 @@ const We = (h) => ({
5277
5291
  reset: K
5278
5292
  };
5279
5293
  }
5280
- }), Fe = function(h) {
5281
- return h === void 0 && (h = {}), {
5294
+ }), Fe = function(l) {
5295
+ return l === void 0 && (l = {}), {
5282
5296
  name: "flip",
5283
- options: h,
5297
+ options: l,
5284
5298
  async fn(t) {
5285
5299
  var e, i;
5286
5300
  const {
@@ -5289,7 +5303,7 @@ const We = (h) => ({
5289
5303
  rects: r,
5290
5304
  initialPlacement: a,
5291
5305
  platform: c,
5292
- elements: l
5306
+ elements: h
5293
5307
  } = t, {
5294
5308
  mainAxis: d = !0,
5295
5309
  crossAxis: f = !0,
@@ -5298,10 +5312,10 @@ const We = (h) => ({
5298
5312
  fallbackAxisSideDirection: w = "none",
5299
5313
  flipAlignment: m = !0,
5300
5314
  ...g
5301
- } = J(h, t);
5315
+ } = J(l, t);
5302
5316
  if ((e = o.arrow) != null && e.alignmentOffset)
5303
5317
  return {};
5304
- const E = z(s), y = V(a), p = z(a) === a, b = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), C = u || (p || !m ? [st(a)] : De(a)), R = w !== "none";
5318
+ const E = z(s), y = V(a), p = z(a) === a, b = await (c.isRTL == null ? void 0 : c.isRTL(h.floating)), C = u || (p || !m ? [st(a)] : De(a)), R = w !== "none";
5305
5319
  !u && R && C.push(...Ye(a, m, w, b));
5306
5320
  const v = [a, ...C], T = await Ft(t, g), S = [];
5307
5321
  let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
@@ -5359,12 +5373,12 @@ const We = (h) => ({
5359
5373
  }
5360
5374
  };
5361
5375
  }, Ve = /* @__PURE__ */ new Set(["left", "top"]);
5362
- async function Pe(h, t) {
5376
+ async function Pe(l, t) {
5363
5377
  const {
5364
5378
  placement: e,
5365
5379
  platform: i,
5366
5380
  elements: s
5367
- } = h, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = z(e), a = Q(e), c = V(e) === "y", l = Ve.has(r) ? -1 : 1, d = o && c ? -1 : 1, f = J(t, h);
5381
+ } = l, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = z(e), a = Q(e), c = V(e) === "y", h = Ve.has(r) ? -1 : 1, d = o && c ? -1 : 1, f = J(t, l);
5368
5382
  let {
5369
5383
  mainAxis: u,
5370
5384
  crossAxis: x,
@@ -5380,16 +5394,16 @@ async function Pe(h, t) {
5380
5394
  };
5381
5395
  return a && typeof w == "number" && (x = a === "end" ? w * -1 : w), c ? {
5382
5396
  x: x * d,
5383
- y: u * l
5397
+ y: u * h
5384
5398
  } : {
5385
- x: u * l,
5399
+ x: u * h,
5386
5400
  y: x * d
5387
5401
  };
5388
5402
  }
5389
- const ze = function(h) {
5390
- return h === void 0 && (h = 0), {
5403
+ const ze = function(l) {
5404
+ return l === void 0 && (l = 0), {
5391
5405
  name: "offset",
5392
- options: h,
5406
+ options: l,
5393
5407
  async fn(t) {
5394
5408
  var e, i;
5395
5409
  const {
@@ -5397,7 +5411,7 @@ const ze = function(h) {
5397
5411
  y: o,
5398
5412
  placement: r,
5399
5413
  middlewareData: a
5400
- } = t, c = await Pe(t, h);
5414
+ } = t, c = await Pe(t, l);
5401
5415
  return r === ((e = a.offset) == null ? void 0 : e.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
5402
5416
  x: s + c.x,
5403
5417
  y: o + c.y,
@@ -5408,10 +5422,10 @@ const ze = function(h) {
5408
5422
  };
5409
5423
  }
5410
5424
  };
5411
- }, $e = function(h) {
5412
- return h === void 0 && (h = {}), {
5425
+ }, $e = function(l) {
5426
+ return l === void 0 && (l = {}), {
5413
5427
  name: "shift",
5414
- options: h,
5428
+ options: l,
5415
5429
  async fn(t) {
5416
5430
  const {
5417
5431
  x: e,
@@ -5433,18 +5447,18 @@ const ze = function(h) {
5433
5447
  }
5434
5448
  },
5435
5449
  ...c
5436
- } = J(h, t), l = {
5450
+ } = J(l, t), h = {
5437
5451
  x: e,
5438
5452
  y: i
5439
5453
  }, d = await Ft(t, c), f = V(z(s)), u = Kt(f);
5440
- let x = l[u], w = l[f];
5454
+ let x = h[u], w = h[f];
5441
5455
  if (o) {
5442
5456
  const g = u === "y" ? "top" : "left", E = u === "y" ? "bottom" : "right", y = x + d[g], p = x - d[E];
5443
- x = ht(y, x, p);
5457
+ x = lt(y, x, p);
5444
5458
  }
5445
5459
  if (r) {
5446
5460
  const g = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", y = w + d[g], p = w - d[E];
5447
- w = ht(y, w, p);
5461
+ w = lt(y, w, p);
5448
5462
  }
5449
5463
  const m = a.fn({
5450
5464
  ...t,
@@ -5468,60 +5482,60 @@ const ze = function(h) {
5468
5482
  function rt() {
5469
5483
  return typeof window < "u";
5470
5484
  }
5471
- function Z(h) {
5472
- return Vt(h) ? (h.nodeName || "").toLowerCase() : "#document";
5485
+ function Z(l) {
5486
+ return Vt(l) ? (l.nodeName || "").toLowerCase() : "#document";
5473
5487
  }
5474
- function A(h) {
5488
+ function A(l) {
5475
5489
  var t;
5476
- return (h == null || (t = h.ownerDocument) == null ? void 0 : t.defaultView) || window;
5490
+ return (l == null || (t = l.ownerDocument) == null ? void 0 : t.defaultView) || window;
5477
5491
  }
5478
- function W(h) {
5492
+ function W(l) {
5479
5493
  var t;
5480
- return (t = (Vt(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
5494
+ return (t = (Vt(l) ? l.ownerDocument : l.document) || window.document) == null ? void 0 : t.documentElement;
5481
5495
  }
5482
- function Vt(h) {
5483
- return rt() ? h instanceof Node || h instanceof A(h).Node : !1;
5496
+ function Vt(l) {
5497
+ return rt() ? l instanceof Node || l instanceof A(l).Node : !1;
5484
5498
  }
5485
- function k(h) {
5486
- return rt() ? h instanceof Element || h instanceof A(h).Element : !1;
5499
+ function k(l) {
5500
+ return rt() ? l instanceof Element || l instanceof A(l).Element : !1;
5487
5501
  }
5488
- function B(h) {
5489
- return rt() ? h instanceof HTMLElement || h instanceof A(h).HTMLElement : !1;
5502
+ function B(l) {
5503
+ return rt() ? l instanceof HTMLElement || l instanceof A(l).HTMLElement : !1;
5490
5504
  }
5491
- function Ot(h) {
5492
- return !rt() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof A(h).ShadowRoot;
5505
+ function Ot(l) {
5506
+ return !rt() || typeof ShadowRoot > "u" ? !1 : l instanceof ShadowRoot || l instanceof A(l).ShadowRoot;
5493
5507
  }
5494
5508
  const Ge = /* @__PURE__ */ new Set(["inline", "contents"]);
5495
- function tt(h) {
5509
+ function tt(l) {
5496
5510
  const {
5497
5511
  overflow: t,
5498
5512
  overflowX: e,
5499
5513
  overflowY: i,
5500
5514
  display: s
5501
- } = X(h);
5515
+ } = X(l);
5502
5516
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !Ge.has(s);
5503
5517
  }
5504
5518
  const Ue = /* @__PURE__ */ new Set(["table", "td", "th"]);
5505
- function Ze(h) {
5506
- return Ue.has(Z(h));
5519
+ function Ze(l) {
5520
+ return Ue.has(Z(l));
5507
5521
  }
5508
5522
  const je = [":popover-open", ":modal"];
5509
- function nt(h) {
5523
+ function nt(l) {
5510
5524
  return je.some((t) => {
5511
5525
  try {
5512
- return h.matches(t);
5526
+ return l.matches(t);
5513
5527
  } catch {
5514
5528
  return !1;
5515
5529
  }
5516
5530
  });
5517
5531
  }
5518
5532
  const qe = ["transform", "translate", "scale", "rotate", "perspective"], Je = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Qe = ["paint", "layout", "strict", "content"];
5519
- function mt(h) {
5520
- const t = Et(), e = k(h) ? X(h) : h;
5533
+ function mt(l) {
5534
+ const t = Et(), e = k(l) ? X(l) : l;
5521
5535
  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));
5522
5536
  }
5523
- function ti(h) {
5524
- let t = P(h);
5537
+ function ti(l) {
5538
+ let t = P(l);
5525
5539
  for (; B(t) && !U(t); ) {
5526
5540
  if (mt(t))
5527
5541
  return t;
@@ -5535,61 +5549,61 @@ function Et() {
5535
5549
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
5536
5550
  }
5537
5551
  const ei = /* @__PURE__ */ new Set(["html", "body", "#document"]);
5538
- function U(h) {
5539
- return ei.has(Z(h));
5552
+ function U(l) {
5553
+ return ei.has(Z(l));
5540
5554
  }
5541
- function X(h) {
5542
- return A(h).getComputedStyle(h);
5555
+ function X(l) {
5556
+ return A(l).getComputedStyle(l);
5543
5557
  }
5544
- function at(h) {
5545
- return k(h) ? {
5546
- scrollLeft: h.scrollLeft,
5547
- scrollTop: h.scrollTop
5558
+ function at(l) {
5559
+ return k(l) ? {
5560
+ scrollLeft: l.scrollLeft,
5561
+ scrollTop: l.scrollTop
5548
5562
  } : {
5549
- scrollLeft: h.scrollX,
5550
- scrollTop: h.scrollY
5563
+ scrollLeft: l.scrollX,
5564
+ scrollTop: l.scrollY
5551
5565
  };
5552
5566
  }
5553
- function P(h) {
5554
- if (Z(h) === "html")
5555
- return h;
5567
+ function P(l) {
5568
+ if (Z(l) === "html")
5569
+ return l;
5556
5570
  const t = (
5557
5571
  // Step into the shadow DOM of the parent of a slotted node.
5558
- h.assignedSlot || // DOM Element detected.
5559
- h.parentNode || // ShadowRoot detected.
5560
- Ot(h) && h.host || // Fallback.
5561
- W(h)
5572
+ l.assignedSlot || // DOM Element detected.
5573
+ l.parentNode || // ShadowRoot detected.
5574
+ Ot(l) && l.host || // Fallback.
5575
+ W(l)
5562
5576
  );
5563
5577
  return Ot(t) ? t.host : t;
5564
5578
  }
5565
- function Pt(h) {
5566
- const t = P(h);
5567
- return U(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : B(t) && tt(t) ? t : Pt(t);
5579
+ function Pt(l) {
5580
+ const t = P(l);
5581
+ return U(t) ? l.ownerDocument ? l.ownerDocument.body : l.body : B(t) && tt(t) ? t : Pt(t);
5568
5582
  }
5569
- function zt(h, t, e) {
5583
+ function zt(l, t, e) {
5570
5584
  var i;
5571
5585
  t === void 0 && (t = []);
5572
- const s = Pt(h), o = s === ((i = h.ownerDocument) == null ? void 0 : i.body), r = A(s);
5586
+ const s = Pt(l), o = s === ((i = l.ownerDocument) == null ? void 0 : i.body), r = A(s);
5573
5587
  return o ? (ft(r), t.concat(r, r.visualViewport || [], tt(s) ? s : [], [])) : t.concat(s, zt(s, []));
5574
5588
  }
5575
- function ft(h) {
5576
- return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
5589
+ function ft(l) {
5590
+ return l.parent && Object.getPrototypeOf(l.parent) ? l.frameElement : null;
5577
5591
  }
5578
- function $t(h) {
5579
- const t = X(h);
5592
+ function $t(l) {
5593
+ const t = X(l);
5580
5594
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5581
- const s = B(h), o = s ? h.offsetWidth : e, r = s ? h.offsetHeight : i, a = it(e) !== o || it(i) !== r;
5595
+ const s = B(l), o = s ? l.offsetWidth : e, r = s ? l.offsetHeight : i, a = it(e) !== o || it(i) !== r;
5582
5596
  return a && (e = o, i = r), {
5583
5597
  width: e,
5584
5598
  height: i,
5585
5599
  $: a
5586
5600
  };
5587
5601
  }
5588
- function Gt(h) {
5589
- return k(h) ? h : h.contextElement;
5602
+ function Gt(l) {
5603
+ return k(l) ? l : l.contextElement;
5590
5604
  }
5591
- function G(h) {
5592
- const t = Gt(h);
5605
+ function G(l) {
5606
+ const t = Gt(l);
5593
5607
  if (!B(t))
5594
5608
  return Y(1);
5595
5609
  const e = t.getBoundingClientRect(), {
@@ -5604,86 +5618,86 @@ function G(h) {
5604
5618
  };
5605
5619
  }
5606
5620
  const ii = /* @__PURE__ */ Y(0);
5607
- function Ut(h) {
5608
- const t = A(h);
5621
+ function Ut(l) {
5622
+ const t = A(l);
5609
5623
  return !Et() || !t.visualViewport ? ii : {
5610
5624
  x: t.visualViewport.offsetLeft,
5611
5625
  y: t.visualViewport.offsetTop
5612
5626
  };
5613
5627
  }
5614
- function si(h, t, e) {
5615
- return t === void 0 && (t = !1), !e || t && e !== A(h) ? !1 : t;
5628
+ function si(l, t, e) {
5629
+ return t === void 0 && (t = !1), !e || t && e !== A(l) ? !1 : t;
5616
5630
  }
5617
- function q(h, t, e, i) {
5631
+ function q(l, t, e, i) {
5618
5632
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5619
- const s = h.getBoundingClientRect(), o = Gt(h);
5633
+ const s = l.getBoundingClientRect(), o = Gt(l);
5620
5634
  let r = Y(1);
5621
- t && (i ? k(i) && (r = G(i)) : r = G(h));
5635
+ t && (i ? k(i) && (r = G(i)) : r = G(l));
5622
5636
  const a = si(o, e, i) ? Ut(o) : Y(0);
5623
- let c = (s.left + a.x) / r.x, l = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
5637
+ let c = (s.left + a.x) / r.x, h = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
5624
5638
  if (o) {
5625
5639
  const u = A(o), x = i && k(i) ? A(i) : i;
5626
5640
  let w = u, m = ft(w);
5627
5641
  for (; m && i && x !== w; ) {
5628
5642
  const g = G(m), E = m.getBoundingClientRect(), y = X(m), p = E.left + (m.clientLeft + parseFloat(y.paddingLeft)) * g.x, b = E.top + (m.clientTop + parseFloat(y.paddingTop)) * g.y;
5629
- c *= g.x, l *= g.y, d *= g.x, f *= g.y, c += p, l += b, w = A(m), m = ft(w);
5643
+ c *= g.x, h *= g.y, d *= g.x, f *= g.y, c += p, h += b, w = A(m), m = ft(w);
5630
5644
  }
5631
5645
  }
5632
5646
  return ot({
5633
5647
  width: d,
5634
5648
  height: f,
5635
5649
  x: c,
5636
- y: l
5650
+ y: h
5637
5651
  });
5638
5652
  }
5639
- function pt(h, t) {
5640
- const e = at(h).scrollLeft;
5641
- return t ? t.left + e : q(W(h)).left + e;
5653
+ function pt(l, t) {
5654
+ const e = at(l).scrollLeft;
5655
+ return t ? t.left + e : q(W(l)).left + e;
5642
5656
  }
5643
- function Zt(h, t, e) {
5657
+ function Zt(l, t, e) {
5644
5658
  e === void 0 && (e = !1);
5645
- const i = h.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
5659
+ const i = l.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
5646
5660
  // RTL <body> scrollbar.
5647
- pt(h, i)
5661
+ pt(l, i)
5648
5662
  )), o = i.top + t.scrollTop;
5649
5663
  return {
5650
5664
  x: s,
5651
5665
  y: o
5652
5666
  };
5653
5667
  }
5654
- function oi(h) {
5668
+ function oi(l) {
5655
5669
  let {
5656
5670
  elements: t,
5657
5671
  rect: e,
5658
5672
  offsetParent: i,
5659
5673
  strategy: s
5660
- } = h;
5674
+ } = l;
5661
5675
  const o = s === "fixed", r = W(i), a = t ? nt(t.floating) : !1;
5662
5676
  if (i === r || a && o)
5663
5677
  return e;
5664
5678
  let c = {
5665
5679
  scrollLeft: 0,
5666
5680
  scrollTop: 0
5667
- }, l = Y(1);
5681
+ }, h = Y(1);
5668
5682
  const d = Y(0), f = B(i);
5669
5683
  if ((f || !f && !o) && ((Z(i) !== "body" || tt(r)) && (c = at(i)), B(i))) {
5670
5684
  const x = q(i);
5671
- l = G(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5685
+ h = G(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5672
5686
  }
5673
5687
  const u = r && !f && !o ? Zt(r, c, !0) : Y(0);
5674
5688
  return {
5675
- width: e.width * l.x,
5676
- height: e.height * l.y,
5677
- x: e.x * l.x - c.scrollLeft * l.x + d.x + u.x,
5678
- y: e.y * l.y - c.scrollTop * l.y + d.y + u.y
5689
+ width: e.width * h.x,
5690
+ height: e.height * h.y,
5691
+ x: e.x * h.x - c.scrollLeft * h.x + d.x + u.x,
5692
+ y: e.y * h.y - c.scrollTop * h.y + d.y + u.y
5679
5693
  };
5680
5694
  }
5681
- function ri(h) {
5682
- return Array.from(h.getClientRects());
5695
+ function ri(l) {
5696
+ return Array.from(l.getClientRects());
5683
5697
  }
5684
- function ni(h) {
5685
- const t = W(h), e = at(h), i = h.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5686
- let r = -e.scrollLeft + pt(h);
5698
+ function ni(l) {
5699
+ const t = W(l), e = at(l), i = l.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5700
+ let r = -e.scrollLeft + pt(l);
5687
5701
  const a = -e.scrollTop;
5688
5702
  return X(i).direction === "rtl" && (r += $(t.clientWidth, i.clientWidth) - s), {
5689
5703
  width: s,
@@ -5692,13 +5706,13 @@ function ni(h) {
5692
5706
  y: a
5693
5707
  };
5694
5708
  }
5695
- function ai(h, t) {
5696
- const e = A(h), i = W(h), s = e.visualViewport;
5709
+ function ai(l, t) {
5710
+ const e = A(l), i = W(l), s = e.visualViewport;
5697
5711
  let o = i.clientWidth, r = i.clientHeight, a = 0, c = 0;
5698
5712
  if (s) {
5699
5713
  o = s.width, r = s.height;
5700
- const l = Et();
5701
- (!l || l && t === "fixed") && (a = s.offsetLeft, c = s.offsetTop);
5714
+ const h = Et();
5715
+ (!h || h && t === "fixed") && (a = s.offsetLeft, c = s.offsetTop);
5702
5716
  }
5703
5717
  return {
5704
5718
  width: o,
@@ -5708,25 +5722,25 @@ function ai(h, t) {
5708
5722
  };
5709
5723
  }
5710
5724
  const ci = /* @__PURE__ */ new Set(["absolute", "fixed"]);
5711
- function li(h, t) {
5712
- const e = q(h, !0, t === "fixed"), i = e.top + h.clientTop, s = e.left + h.clientLeft, o = B(h) ? G(h) : Y(1), r = h.clientWidth * o.x, a = h.clientHeight * o.y, c = s * o.x, l = i * o.y;
5725
+ function hi(l, t) {
5726
+ const e = q(l, !0, t === "fixed"), i = e.top + l.clientTop, s = e.left + l.clientLeft, o = B(l) ? G(l) : Y(1), r = l.clientWidth * o.x, a = l.clientHeight * o.y, c = s * o.x, h = i * o.y;
5713
5727
  return {
5714
5728
  width: r,
5715
5729
  height: a,
5716
5730
  x: c,
5717
- y: l
5731
+ y: h
5718
5732
  };
5719
5733
  }
5720
- function Lt(h, t, e) {
5734
+ function Lt(l, t, e) {
5721
5735
  let i;
5722
5736
  if (t === "viewport")
5723
- i = ai(h, e);
5737
+ i = ai(l, e);
5724
5738
  else if (t === "document")
5725
- i = ni(W(h));
5739
+ i = ni(W(l));
5726
5740
  else if (k(t))
5727
- i = li(t, e);
5741
+ i = hi(t, e);
5728
5742
  else {
5729
- const s = Ut(h);
5743
+ const s = Ut(l);
5730
5744
  i = {
5731
5745
  x: t.x - s.x,
5732
5746
  y: t.y - s.y,
@@ -5736,33 +5750,33 @@ function Lt(h, t, e) {
5736
5750
  }
5737
5751
  return ot(i);
5738
5752
  }
5739
- function jt(h, t) {
5740
- const e = P(h);
5753
+ function jt(l, t) {
5754
+ const e = P(l);
5741
5755
  return e === t || !k(e) || U(e) ? !1 : X(e).position === "fixed" || jt(e, t);
5742
5756
  }
5743
- function hi(h, t) {
5744
- const e = t.get(h);
5757
+ function li(l, t) {
5758
+ const e = t.get(l);
5745
5759
  if (e)
5746
5760
  return e;
5747
- let i = zt(h, []).filter((a) => k(a) && Z(a) !== "body"), s = null;
5748
- const o = X(h).position === "fixed";
5749
- let r = o ? P(h) : h;
5761
+ let i = zt(l, []).filter((a) => k(a) && Z(a) !== "body"), s = null;
5762
+ const o = X(l).position === "fixed";
5763
+ let r = o ? P(l) : l;
5750
5764
  for (; k(r) && !U(r); ) {
5751
5765
  const a = X(r), c = mt(r);
5752
- !c && a.position === "fixed" && (s = null), (o ? !c && !s : !c && a.position === "static" && !!s && ci.has(s.position) || tt(r) && !c && jt(h, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
5766
+ !c && a.position === "fixed" && (s = null), (o ? !c && !s : !c && a.position === "static" && !!s && ci.has(s.position) || tt(r) && !c && jt(l, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
5753
5767
  }
5754
- return t.set(h, i), i;
5768
+ return t.set(l, i), i;
5755
5769
  }
5756
- function di(h) {
5770
+ function di(l) {
5757
5771
  let {
5758
5772
  element: t,
5759
5773
  boundary: e,
5760
5774
  rootBoundary: i,
5761
5775
  strategy: s
5762
- } = h;
5763
- const r = [...e === "clippingAncestors" ? nt(t) ? [] : hi(t, this._c) : [].concat(e), i], a = r[0], c = r.reduce((l, d) => {
5776
+ } = l;
5777
+ const r = [...e === "clippingAncestors" ? nt(t) ? [] : li(t, this._c) : [].concat(e), i], a = r[0], c = r.reduce((h, d) => {
5764
5778
  const f = Lt(t, d, s);
5765
- 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;
5779
+ return h.top = $(f.top, h.top), h.right = j(f.right, h.right), h.bottom = j(f.bottom, h.bottom), h.left = $(f.left, h.left), h;
5766
5780
  }, Lt(t, a, s));
5767
5781
  return {
5768
5782
  width: c.right - c.left,
@@ -5771,32 +5785,32 @@ function di(h) {
5771
5785
  y: c.top
5772
5786
  };
5773
5787
  }
5774
- function fi(h) {
5788
+ function fi(l) {
5775
5789
  const {
5776
5790
  width: t,
5777
5791
  height: e
5778
- } = $t(h);
5792
+ } = $t(l);
5779
5793
  return {
5780
5794
  width: t,
5781
5795
  height: e
5782
5796
  };
5783
5797
  }
5784
- function xi(h, t, e) {
5785
- const i = B(t), s = W(t), o = e === "fixed", r = q(h, !0, o, t);
5798
+ function xi(l, t, e) {
5799
+ const i = B(t), s = W(t), o = e === "fixed", r = q(l, !0, o, t);
5786
5800
  let a = {
5787
5801
  scrollLeft: 0,
5788
5802
  scrollTop: 0
5789
5803
  };
5790
5804
  const c = Y(0);
5791
- function l() {
5805
+ function h() {
5792
5806
  c.x = pt(s);
5793
5807
  }
5794
5808
  if (i || !i && !o)
5795
5809
  if ((Z(t) !== "body" || tt(s)) && (a = at(t)), i) {
5796
5810
  const x = q(t, !0, o, t);
5797
5811
  c.x = x.x + t.clientLeft, c.y = x.y + t.clientTop;
5798
- } else s && l();
5799
- o && !i && s && l();
5812
+ } else s && h();
5813
+ o && !i && s && h();
5800
5814
  const d = s && !i && !o ? Zt(s, a) : Y(0), f = r.left + a.scrollLeft - c.x - d.x, u = r.top + a.scrollTop - c.y - d.y;
5801
5815
  return {
5802
5816
  x: f,
@@ -5805,23 +5819,23 @@ function xi(h, t, e) {
5805
5819
  height: r.height
5806
5820
  };
5807
5821
  }
5808
- function ct(h) {
5809
- return X(h).position === "static";
5822
+ function ct(l) {
5823
+ return X(l).position === "static";
5810
5824
  }
5811
- function At(h, t) {
5812
- if (!B(h) || X(h).position === "fixed")
5825
+ function At(l, t) {
5826
+ if (!B(l) || X(l).position === "fixed")
5813
5827
  return null;
5814
5828
  if (t)
5815
- return t(h);
5816
- let e = h.offsetParent;
5817
- return W(h) === e && (e = e.ownerDocument.body), e;
5829
+ return t(l);
5830
+ let e = l.offsetParent;
5831
+ return W(l) === e && (e = e.ownerDocument.body), e;
5818
5832
  }
5819
- function qt(h, t) {
5820
- const e = A(h);
5821
- if (nt(h))
5833
+ function qt(l, t) {
5834
+ const e = A(l);
5835
+ if (nt(l))
5822
5836
  return e;
5823
- if (!B(h)) {
5824
- let s = P(h);
5837
+ if (!B(l)) {
5838
+ let s = P(l);
5825
5839
  for (; s && !U(s); ) {
5826
5840
  if (k(s) && !ct(s))
5827
5841
  return s;
@@ -5829,15 +5843,15 @@ function qt(h, t) {
5829
5843
  }
5830
5844
  return e;
5831
5845
  }
5832
- let i = At(h, t);
5846
+ let i = At(l, t);
5833
5847
  for (; i && Ze(i) && ct(i); )
5834
5848
  i = At(i, t);
5835
- return i && U(i) && ct(i) && !mt(i) ? e : i || ti(h) || e;
5849
+ return i && U(i) && ct(i) && !mt(i) ? e : i || ti(l) || e;
5836
5850
  }
5837
- const ui = async function(h) {
5838
- const t = this.getOffsetParent || qt, e = this.getDimensions, i = await e(h.floating);
5851
+ const ui = async function(l) {
5852
+ const t = this.getOffsetParent || qt, e = this.getDimensions, i = await e(l.floating);
5839
5853
  return {
5840
- reference: xi(h.reference, await t(h.floating), h.strategy),
5854
+ reference: xi(l.reference, await t(l.floating), l.strategy),
5841
5855
  floating: {
5842
5856
  x: 0,
5843
5857
  y: 0,
@@ -5846,8 +5860,8 @@ const ui = async function(h) {
5846
5860
  }
5847
5861
  };
5848
5862
  };
5849
- function gi(h) {
5850
- return X(h).direction === "rtl";
5863
+ function gi(l) {
5864
+ return X(l).direction === "rtl";
5851
5865
  }
5852
5866
  const wi = {
5853
5867
  convertOffsetParentRelativeRectToViewportRelativeRect: oi,
@@ -5860,7 +5874,7 @@ const wi = {
5860
5874
  getScale: G,
5861
5875
  isElement: k,
5862
5876
  isRTL: gi
5863
- }, Jt = ze, Qt = $e, te = Fe, mi = We, ee = (h, t, e) => {
5877
+ }, Jt = ze, Qt = $e, te = Fe, mi = We, ee = (l, t, e) => {
5864
5878
  const i = /* @__PURE__ */ new Map(), s = {
5865
5879
  platform: wi,
5866
5880
  ...e
@@ -5868,7 +5882,7 @@ const wi = {
5868
5882
  ...s.platform,
5869
5883
  _c: i
5870
5884
  };
5871
- return Ke(h, t, {
5885
+ return Ke(l, t, {
5872
5886
  ...s,
5873
5887
  platform: o
5874
5888
  });
@@ -5952,9 +5966,9 @@ let Ei = class {
5952
5966
  placement: t.overflowTooltipPlacement,
5953
5967
  middleware: [Qt(), te(), Jt(6), mi({ element: this.arrowEl })]
5954
5968
  }).then((a) => {
5955
- const { x: c, y: l, placement: d, middlewareData: f } = a;
5969
+ const { x: c, y: h, placement: d, middlewareData: f } = a;
5956
5970
  if (Object.assign(this.floatingEl.style, {
5957
- top: `${l}px`,
5971
+ top: `${h}px`,
5958
5972
  left: `${c}px`
5959
5973
  }), f.arrow) {
5960
5974
  const u = f.arrow;
@@ -6026,8 +6040,8 @@ class pi {
6026
6040
  }
6027
6041
  if ((t.altKey || t.metaKey) && t.code === "Enter" && this.ctx.editing && this.inputEl) {
6028
6042
  t.preventDefault();
6029
- const c = this.inputEl.selectionStart, l = this.inputEl.value.substring(0, c), d = this.inputEl.value.substring(c);
6030
- this.inputEl.value = l + `
6043
+ const c = this.inputEl.selectionStart, h = this.inputEl.value.substring(0, c), d = this.inputEl.value.substring(c);
6044
+ this.inputEl.value = h + `
6031
6045
  ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = c + 1, this.autoSize();
6032
6046
  return;
6033
6047
  }
@@ -6134,12 +6148,12 @@ class pi {
6134
6148
  let { height: o, width: r, drawY: a, drawX: c } = t;
6135
6149
  this.drawX = c, this.drawY = a;
6136
6150
  const {
6137
- config: { CELL_PADDING: l },
6151
+ config: { CELL_PADDING: h },
6138
6152
  header: d
6139
6153
  } = this.ctx;
6140
6154
  let f = this.ctx.body.visibleHeight;
6141
6155
  if (o > f && (o = 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") {
6142
- this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${l}px`, i !== null && (this.inputEl.value = i), this.inputEl.focus({ preventScroll: !0 });
6156
+ this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${h}px`, i !== null && (this.inputEl.value = i), this.inputEl.focus({ preventScroll: !0 });
6143
6157
  const u = this.inputEl.value.length;
6144
6158
  this.inputEl.setSelectionRange(u, u);
6145
6159
  } else
@@ -6167,10 +6181,10 @@ class pi {
6167
6181
  i && !c && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
6168
6182
  }
6169
6183
  editCell(t, e) {
6170
- const i = this.ctx.body.renderRows.find((l) => l.rowIndex === t);
6184
+ const i = this.ctx.body.renderRows.find((h) => h.rowIndex === t);
6171
6185
  if (!i)
6172
6186
  return;
6173
- const s = i.cells.find((l) => l.colIndex === e);
6187
+ const s = i.cells.find((h) => h.colIndex === e);
6174
6188
  if (!s)
6175
6189
  return;
6176
6190
  this.ctx.emit("setSelectorCell", s);
@@ -6198,7 +6212,7 @@ class yi {
6198
6212
  this.ctx = t;
6199
6213
  const { EMPTY_TEXT: e, EMPTY_CUSTOM_STYLE: i } = this.ctx.config;
6200
6214
  this.ctx.emptyElement ? this.emptyEl = this.ctx.emptyElement : (this.emptyEl = document.createElement("div"), this.emptyEl.innerText = e), this.emptyEl.className = "e-virt-table-empty", this.emptyEl.style.display = "none", this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: s, headerHeight: o, bodyHeight: r, footerHeight: a }) => {
6201
- const c = o + (r + a) / 2, l = {
6215
+ const c = o + (r + a) / 2, h = {
6202
6216
  display: s === "empty" ? "block" : "none",
6203
6217
  position: "absolute",
6204
6218
  fontSize: "14px",
@@ -6208,7 +6222,7 @@ class yi {
6208
6222
  transform: "translate(-50%, -50%)",
6209
6223
  ...i
6210
6224
  };
6211
- Object.assign(this.emptyEl.style, l);
6225
+ Object.assign(this.emptyEl.style, h);
6212
6226
  });
6213
6227
  }
6214
6228
  destroy() {
@@ -6244,9 +6258,9 @@ class Ci {
6244
6258
  fixedRightWidth: e,
6245
6259
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
6246
6260
  } = this.ctx, { visibleWidth: o, visibleHeight: r, renderCellHeaders: a } = this.ctx.header;
6247
- let c = [], l = [], d = [];
6261
+ let c = [], h = [], d = [];
6248
6262
  a.forEach((g) => {
6249
- g.render && (g.fixed === "left" ? l.push(g) : g.fixed === "right" ? d.push(g) : c.push(g));
6263
+ g.render && (g.fixed === "left" ? h.push(g) : g.fixed === "right" ? d.push(g) : c.push(g));
6250
6264
  });
6251
6265
  const f = e - i, u = {
6252
6266
  key: "left",
@@ -6258,7 +6272,7 @@ class Ci {
6258
6272
  width: `${t}px`,
6259
6273
  height: `${r}px`
6260
6274
  },
6261
- cells: l
6275
+ cells: h
6262
6276
  }, x = {
6263
6277
  key: "center",
6264
6278
  style: {
@@ -6306,7 +6320,7 @@ class Ci {
6306
6320
  fixedLeftWidth: o,
6307
6321
  fixedRightWidth: r,
6308
6322
  config: { SCROLLER_TRACK_SIZE: a, CSS_PREFIX: c }
6309
- } = this.ctx, { visibleWidth: l, visibleHeight: d } = this.ctx.body, f = r - a, u = {
6323
+ } = this.ctx, { visibleWidth: h, visibleHeight: d } = this.ctx.body, f = r - a, u = {
6310
6324
  key: "left",
6311
6325
  style: {
6312
6326
  position: "absolute",
@@ -6324,7 +6338,7 @@ class Ci {
6324
6338
  top: `${0.5}px`,
6325
6339
  left: `${o - 0.5}px`,
6326
6340
  overflow: "hidden",
6327
- width: `${l - o - f}px`,
6341
+ width: `${h - o - f}px`,
6328
6342
  height: `${d}px`
6329
6343
  },
6330
6344
  cells: t
@@ -6346,7 +6360,7 @@ class Ci {
6346
6360
  style: {
6347
6361
  position: "relative",
6348
6362
  overflow: "hidden",
6349
- width: `${l}px`,
6363
+ width: `${h}px`,
6350
6364
  height: `${d}px`
6351
6365
  },
6352
6366
  views: [u, x, w]
@@ -6363,7 +6377,7 @@ class Ci {
6363
6377
  fixedLeftWidth: s,
6364
6378
  fixedRightWidth: o,
6365
6379
  config: { SCROLLER_TRACK_SIZE: r, CSS_PREFIX: a }
6366
- } = this.ctx, { visibleWidth: c, visibleHeight: l } = this.ctx.footer, d = o - r, f = {
6380
+ } = this.ctx, { visibleWidth: c, visibleHeight: h } = this.ctx.footer, d = o - r, f = {
6367
6381
  key: "left",
6368
6382
  style: {
6369
6383
  position: "absolute",
@@ -6371,7 +6385,7 @@ class Ci {
6371
6385
  left: `${0.5}px`,
6372
6386
  overflow: "hidden",
6373
6387
  width: `${s}px`,
6374
- height: `${l}px`
6388
+ height: `${h}px`
6375
6389
  },
6376
6390
  cells: e
6377
6391
  }, u = {
@@ -6382,7 +6396,7 @@ class Ci {
6382
6396
  left: `${s - 0.5}px`,
6383
6397
  overflow: "hidden",
6384
6398
  width: `${c - s - d}px`,
6385
- height: `${l}px`
6399
+ height: `${h}px`
6386
6400
  },
6387
6401
  cells: t
6388
6402
  }, x = {
@@ -6393,7 +6407,7 @@ class Ci {
6393
6407
  right: `${0.5}px`,
6394
6408
  overflow: "hidden",
6395
6409
  width: `${d}px`,
6396
- height: `${l}px`
6410
+ height: `${h}px`
6397
6411
  },
6398
6412
  cells: i
6399
6413
  };
@@ -6404,7 +6418,7 @@ class Ci {
6404
6418
  position: "relative",
6405
6419
  overflow: "hidden",
6406
6420
  width: `${c}px`,
6407
- height: `${l}px`
6421
+ height: `${h}px`
6408
6422
  },
6409
6423
  views: [f, u, x]
6410
6424
  };
@@ -6421,8 +6435,8 @@ class bi {
6421
6435
  this.ctx.on("cellContextMenuClick", (t, e) => {
6422
6436
  if (!this.ctx.config.ENABLE_CONTEXT_MENU) return;
6423
6437
  e.preventDefault();
6424
- const { xArr: i, yArr: s } = this.ctx.selector, [o, r] = i, [a, c] = s, { rowIndex: l, colIndex: d } = t;
6425
- l >= a && l <= c && d >= o && d <= r || this.ctx.emit("setSelectorCell", t, e);
6438
+ const { xArr: i, yArr: s } = this.ctx.selector, [o, r] = i, [a, c] = s, { rowIndex: h, colIndex: d } = t;
6439
+ h >= a && h <= c && d >= o && d <= r || this.ctx.emit("setSelectorCell", t, e);
6426
6440
  const u = {
6427
6441
  getBoundingClientRect: () => ({
6428
6442
  width: 0,
@@ -6529,15 +6543,15 @@ class Si {
6529
6543
  t.className = "e-virt-table-container";
6530
6544
  const r = document.createElement("div"), a = document.createElement("canvas"), c = e || document.createElement("div");
6531
6545
  r.className = "e-virt-table-stage", t.tabIndex = 0, a.className = "e-virt-table-canvas", c.className = "e-virt-table-overlayer";
6532
- const l = i || document.createElement("div");
6533
- l.className = "e-virt-table-editor";
6546
+ const h = i || document.createElement("div");
6547
+ h.className = "e-virt-table-editor";
6534
6548
  const d = s, f = o;
6535
6549
  return r.appendChild(a), r.appendChild(c), t.appendChild(r), {
6536
6550
  containerElement: t,
6537
6551
  stageElement: r,
6538
6552
  canvasElement: a,
6539
6553
  overlayerElement: c,
6540
- editorElement: l,
6554
+ editorElement: h,
6541
6555
  emptyElement: d,
6542
6556
  contextMenuElement: f
6543
6557
  };
@@ -6624,15 +6638,15 @@ class Si {
6624
6638
  return new Promise(async (i, s) => {
6625
6639
  let o = [];
6626
6640
  for (let r = 0; r < t.length; r++) {
6627
- const { rowKey: a, key: c } = t[r], l = await this.ctx.database.getValidator(a, c);
6628
- Array.isArray(l) && l.length && o.push(l);
6641
+ const { rowKey: a, key: c } = t[r], h = await this.ctx.database.getValidator(a, c);
6642
+ Array.isArray(h) && h.length && o.push(h);
6629
6643
  }
6630
6644
  if (o.length) {
6631
6645
  if (s(o), e) {
6632
6646
  const [r] = o;
6633
6647
  if (Array.isArray(r) && r.length) {
6634
- const [a] = r, { rowKey: c, key: l } = a;
6635
- this.scrollToRowkey(c), this.scrollToColkey(l);
6648
+ const [a] = r, { rowKey: c, key: h } = a;
6649
+ this.scrollToRowkey(c), this.scrollToColkey(h);
6636
6650
  }
6637
6651
  }
6638
6652
  this.ctx.emit("draw");
@@ -6649,9 +6663,9 @@ class Si {
6649
6663
  if (t && Array.isArray(s) && s.length) {
6650
6664
  const [o] = s;
6651
6665
  if (Array.isArray(o) && o.length) {
6652
- const [r] = o, { rowKey: a, key: c } = r, l = this.ctx.database.getRowForRowKey(a);
6653
- if (l) {
6654
- const { parentRowKeys: d = [] } = l;
6666
+ const [r] = o, { rowKey: a, key: c } = r, h = this.ctx.database.getRowForRowKey(a);
6667
+ if (h) {
6668
+ const { parentRowKeys: d = [] } = h;
6655
6669
  d && d.length && this.setExpandRowKeys(d, !0);
6656
6670
  }
6657
6671
  this.scrollToRowkey(a), this.scrollToColkey(c);
@@ -6763,7 +6777,7 @@ class Si {
6763
6777
  getUtils() {
6764
6778
  return {
6765
6779
  mergeColCell: de,
6766
- mergeRowCell: he,
6780
+ mergeRowCell: le,
6767
6781
  getSpanArrByRow: kt,
6768
6782
  getSpanObjByColumn: Xt
6769
6783
  };