e-virt-table 1.3.3 → 1.3.5

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,8 +1,8 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.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-required-color: #f56c6c;--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: rgba(82, 146, 247, .1);--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-checkbox-uncheck-color: #dde0ea;--evt-checkbox-disabled-color: #f1f2f4;--evt-checkbox-check-disabled-color: #dde0ea;--evt-icon-edit-color: #4e5969;--evt-icon-select-color: #4e5969;--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-text-color: #fff;--evt-resize-column-text-bg-color: var(--evt-color-primary);--evt-resize-column-line-color: #e1e6eb;--evt-tree-line-color: #e1e6eb;--evt-sort-icon-color: var(--evt-color-primary);--evt-drag-tip-bg-color: rgba(82, 146, 247, .1);--evt-drag-tip-line-color: var(--evt-color-primary);--evt-context-menu-min-width: 150px;--evt-context-menu-max-width: 220px;--evt-context-menu-item-padding: 8px 12px;--evt-context-menu-bg-color: #fff;--evt-context-menu-text-color: #333;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #f5f5f5;--evt-context-menu-text-size: 13px}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-body-text-color: #cfd3dc;--evt-readonly-text-color: #cfd3dc;--evt-footer-text-color: #cfd3dc;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc;--evt-context-menu-bg-color: #141414;--evt-context-menu-text-color: #cfd3dc;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #414243}.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:6px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}.e-virt-table-loading{display:none;position:absolute;left:0;top:0;right:0;bottom:0;width:100%;height:100%;z-index:2000;background-color:#fff6;display:flex;align-items:center;justify-content:center}.e-virt-table-loading-spinner{opacity:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.e-virt-table-loading-spinner svg{color:var(--evt-text-color-regular);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.e-virt-table-loading-text{margin:0;font-size:12px;color:var(--evt-text-color-regular)}.e-virt-table-main-menu,.e-virt-table-submenu{position:absolute;background:var(--evt-context-menu-bg-color);border-radius:4px;box-shadow:0 2px 8px #0000001a;min-width:var(--evt-context-menu-min-width);max-width:var(--evt-context-menu-max-width);color:var(--evt-text-color-primary)}.e-virt-table-main-menu{border:1px solid var(--evt-border-color);z-index:3000;left:-99999px;top:-99999px;display:none;position:fixed;background-color:var(--evt-body-bg-color)}.e-virt-table-submenu{border:1px solid var(--evt-border-color);z-index:1000;max-height:350px;overflow-y:auto;opacity:0;visibility:hidden;transform:translate(-10px);transition:opacity .2s,visibility .2s,transform .2s;-ms-overflow-style:none;scrollbar-width:none}.e-virt-table-submenu::-webkit-scrollbar{display:none}.e-virt-table-submenu.show{opacity:1;visibility:visible;transform:translate(0)}.e-virt-table-submenu:not(.show){transition:none}.e-virt-table-menu-item,.e-virt-table-submenu-item{position:relative;-webkit-user-select:none;user-select:none;padding:var(--evt-context-menu-item-padding);cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:background .2s,color .2s;color:var(--evt-context-menu-text-color);font-size:var(--evt-context-menu-text-size)}.e-virt-table-menu-item:last-child,.e-virt-table-submenu-item:last-child{border-bottom:none}.e-virt-table-menu-item:has(.menu-item-icon){padding-left:8px}.menu-item-content{display:flex;align-items:center;flex:1;min-width:0}.menu-item-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:8px;flex-shrink:0}.menu-item-icon svg{width:100%;height:100%;fill:currentColor}.menu-item-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.e-virt-table-menu-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--evt-text-color-regular);transition:color .2s}.e-virt-table-menu-arrow svg{width:20px;height:20px;fill:currentColor}.e-virt-table-submenu-item:hover,.e-virt-table-menu-item:hover,.e-virt-table-menu-item.active{background:var(--evt-context-menu-item-hover-bg-color);color:var(--evt-context-menu-item-hover-text-color)}.e-virt-table-menu-item.disabled,.e-virt-table-submenu-item.disabled{cursor:not-allowed}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- var de = Object.defineProperty;
3
- var fe = (h, t, e) => t in h ? de(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
4
- var n = (h, t, e) => fe(h, typeof t != "symbol" ? t + "" : t, e);
5
- class ue {
2
+ var he = Object.defineProperty;
3
+ var de = (h, t, e) => t in h ? he(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
4
+ var n = (h, t, e) => de(h, typeof t != "symbol" ? t + "" : t, e);
5
+ class fe {
6
6
  constructor(t) {
7
7
  n(this, "rules");
8
8
  this.rules = t;
@@ -60,7 +60,7 @@ class ue {
60
60
  return e;
61
61
  }
62
62
  }
63
- function $t() {
63
+ function zt() {
64
64
  return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(h) {
65
65
  const t = Math.random() * 16 | 0;
66
66
  return (h === "x" ? t : t & 3 | 8).toString(16);
@@ -78,7 +78,7 @@ function J(h, t) {
78
78
  function rt(h = []) {
79
79
  return h.length ? h.map((t) => rt(t.children) + 1).sort((t, e) => e - t)[0] : 0;
80
80
  }
81
- function xe(h = []) {
81
+ function ue(h = []) {
82
82
  let t = [], e = [], i = [];
83
83
  return h.forEach((s) => {
84
84
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
@@ -123,24 +123,24 @@ function Q(h = []) {
123
123
  e.children ? t = t.concat(Q(e.children)) : t.push(e);
124
124
  }), t;
125
125
  }
126
- function Gt(h) {
126
+ function $t(h) {
127
127
  return h.filter((t) => !t.hide).map((t) => Array.isArray(t.children) && t.children.length > 0 ? {
128
128
  ...t,
129
- children: Gt(t.children)
129
+ children: $t(t.children)
130
130
  // 递归处理
131
131
  } : { ...t });
132
132
  }
133
- const At = /^(\r\n|\n\r|\r|\n)/, ge = /^[^\t\r\n]+/, Ht = /^\t/;
134
- function we(h) {
133
+ const Mt = /^(\r\n|\n\r|\r|\n)/, xe = /^[^\t\r\n]+/, At = /^\t/;
134
+ function ge(h) {
135
135
  let t = [[""]];
136
136
  if (h.length === 0)
137
137
  return t;
138
138
  let e = 0, i = 0, s;
139
139
  for (; h.length > 0 && s !== h.length; )
140
- if (s = h.length, h.match(Ht))
141
- h = h.replace(Ht, ""), e += 1, t[i][e] = "";
142
- else if (h.match(At))
143
- h = h.replace(At, ""), e = 0, i += 1, t[i] = [""];
140
+ if (s = h.length, h.match(At))
141
+ h = h.replace(At, ""), e += 1, t[i][e] = "";
142
+ else if (h.match(Mt))
143
+ h = h.replace(Mt, ""), e = 0, i += 1, t[i] = [""];
144
144
  else {
145
145
  let o = "";
146
146
  if (h.startsWith('"')) {
@@ -151,14 +151,14 @@ function we(h) {
151
151
  }
152
152
  o = o.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (l) => new Array(Math.floor(l.length / 2)).fill('"').join(""));
153
153
  } else {
154
- const r = h.match(ge);
154
+ const r = h.match(xe);
155
155
  o = r ? r[0] : "", h = h.slice(o.length);
156
156
  }
157
157
  t[i][e] = o;
158
158
  }
159
159
  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;
160
160
  }
161
- function me(h) {
161
+ function we(h) {
162
162
  let t, e, i, s, o = "", r;
163
163
  for (t = 0, e = h.length; t < e; t += 1) {
164
164
  for (s = h[t].length, i = 0; i < s; i += 1)
@@ -169,7 +169,7 @@ function me(h) {
169
169
  }
170
170
  return o;
171
171
  }
172
- function Ut(h, t, e = []) {
172
+ function Gt(h, t, e = []) {
173
173
  let i = 0;
174
174
  const s = [];
175
175
  return h.forEach((o, r) => {
@@ -181,15 +181,15 @@ function Ut(h, t, e = []) {
181
181
  }
182
182
  }), s;
183
183
  }
184
- function qt(h, t) {
184
+ function Ut(h, t) {
185
185
  let e = "", i = "";
186
186
  const s = {};
187
187
  return t.forEach((o, r) => {
188
188
  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);
189
189
  }), s;
190
190
  }
191
- function Ee(h, t, e = []) {
192
- const { visibleRows: i, rowIndex: s, headIndex: o } = h, r = Ut(i, t, e);
191
+ function me(h, t, e = []) {
192
+ const { visibleRows: i, rowIndex: s, headIndex: o } = h, r = Gt(i, t, e);
193
193
  return r[s - o] === 0 ? {
194
194
  rowspan: 0,
195
195
  colspan: 0,
@@ -202,10 +202,10 @@ function Ee(h, t, e = []) {
202
202
  mergeRow: !0
203
203
  };
204
204
  }
205
- function pe(h, t = []) {
205
+ function Ee(h, t = []) {
206
206
  const { column: e, row: i, visibleLeafColumns: s } = h, o = s.filter((r) => t.includes(r.key));
207
207
  if (t.includes(e.key)) {
208
- const r = qt(i, o);
208
+ const r = Ut(i, o);
209
209
  return r[e.key] === 0 ? {
210
210
  rowspan: 0,
211
211
  colspan: 0,
@@ -219,11 +219,11 @@ function pe(h, t = []) {
219
219
  };
220
220
  }
221
221
  }
222
- function Ce(h, t = document.documentElement) {
222
+ function pe(h, t = document.documentElement) {
223
223
  const e = h.startsWith("--") ? h : `--${h}`;
224
224
  return getComputedStyle(t).getPropertyValue(e).trim();
225
225
  }
226
- function Dt(h) {
226
+ function Ht(h) {
227
227
  if (!h) return /* @__PURE__ */ new Date(0);
228
228
  if (typeof h == "number")
229
229
  return new Date(h);
@@ -277,18 +277,10 @@ function Dt(h) {
277
277
  }
278
278
  return /* @__PURE__ */ new Date(NaN);
279
279
  }
280
- function ye(h, t) {
281
- const e = Dt(h), i = Dt(t);
280
+ function Ce(h, t) {
281
+ const e = Ht(h), i = Ht(t);
282
282
  return isNaN(e.getTime()) && isNaN(i.getTime()) ? 0 : isNaN(e.getTime()) ? -1 : isNaN(i.getTime()) ? 1 : e.getTime() - i.getTime();
283
283
  }
284
- function at(h, t = /* @__PURE__ */ new WeakMap()) {
285
- if (h === null || typeof h != "object") return h;
286
- if (t.has(h)) return t.get(h);
287
- const e = Array.isArray(h) ? [] : {};
288
- return t.set(h, e), Reflect.ownKeys(h).forEach((i) => {
289
- e[i] = at(h[i], t);
290
- }), e;
291
- }
292
284
  class jt {
293
285
  constructor(t, e, i, s, o, r, a) {
294
286
  n(this, "ctx");
@@ -335,7 +327,7 @@ class jt {
335
327
  getRightFixedX() {
336
328
  }
337
329
  }
338
- class It extends jt {
330
+ class bt extends jt {
339
331
  constructor(e, i, s, o, r, a, l, c, d, f = "body") {
340
332
  super(e, o, r, a, l, f, c.fixed);
341
333
  n(this, "formatter");
@@ -547,10 +539,10 @@ class It extends jt {
547
539
  const v = this.ctx.icons.get("expand"), _ = this.ctx.icons.get("shrink");
548
540
  o = c ? _ : v, a = c ? "shrink" : "expand";
549
541
  }
550
- let g = m, E = m, C = this.drawX;
551
- (this.align === "center" || this.align === "right") && (C = this.drawX + (this.visibleWidth - g - 2 * e) / 2, this.align = "left");
552
- let p = C + r + e, b = this.drawY + (this.visibleHeight - E) / 2, y = r + this.drawX + g - 0.5;
553
- this.type === "selection-tree" ? (p = r + this.drawSelectionImageX + this.drawSelectionImageWidth, y = p + g - e / 2) : this.type === "tree-selection" ? y = p + w + g - e / 2 : y = p + g - e / 2, this.drawTextX = y, this.drawTextWidth = this.drawX + this.visibleWidth - y, !(p + g + e > this.drawX + this.visibleWidth) && (b + E + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = p, this.drawTreeImageY = b, this.drawTreeImageWidth = g, this.drawTreeImageHeight = E, o ? (this.drawTreeImageName = a, this.drawTreeImageSource = o) : (this.drawTreeImageName = "", this.drawTreeImageSource = void 0)));
542
+ let g = m, E = m, p = this.drawX;
543
+ (this.align === "center" || this.align === "right") && (p = this.drawX + (this.visibleWidth - g - 2 * e) / 2, this.align = "left");
544
+ let C = p + r + e, b = this.drawY + (this.visibleHeight - E) / 2, y = r + this.drawX + g - 0.5;
545
+ this.type === "selection-tree" ? (C = r + this.drawSelectionImageX + this.drawSelectionImageWidth, y = C + g - e / 2) : this.type === "tree-selection" ? y = C + w + g - e / 2 : y = C + g - e / 2, this.drawTextX = y, this.drawTextWidth = this.drawX + this.visibleWidth - y, !(C + g + e > this.drawX + this.visibleWidth) && (b + E + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = C, this.drawTreeImageY = b, this.drawTreeImageWidth = g, this.drawTreeImageHeight = E, o ? (this.drawTreeImageName = a, this.drawTreeImageSource = o) : (this.drawTreeImageName = "", this.drawTreeImageSource = void 0)));
554
546
  }
555
547
  drawTreeLine() {
556
548
  const { TREE_LINE: e, TREE_INDENT: i = 16, TREE_ICON_SIZE: s = 16, TREE_LINE_COLOR: o = "#e1e6eb" } = this.ctx.config;
@@ -628,13 +620,13 @@ class It extends jt {
628
620
  return;
629
621
  }
630
622
  let g = "transparent";
631
- const E = this.ctx.hoverCell, C = this.ctx.currentCell;
632
- let p = this.rowIndex, b = this.rowIndex;
623
+ const E = this.ctx.hoverCell, p = this.ctx.currentCell;
624
+ let C = this.rowIndex, b = this.rowIndex;
633
625
  if (this.rowspan !== 1 && (x || d)) {
634
626
  const _ = this.getSpanInfo(), { yArr: S } = _;
635
- p = S[0], b = S[1];
627
+ C = S[0], b = S[1];
636
628
  }
637
- x && E && (E.rowKey === this.rowKey && (g = u), E.rowIndex >= p && E.rowIndex <= b && (g = u)), d && C && (C.rowKey === this.rowKey && (g = f), C.rowIndex >= p && C.rowIndex <= b && (g = f)), this.drawCellSkyBgColor = g;
629
+ x && E && (E.rowKey === this.rowKey && (g = u), E.rowIndex >= C && E.rowIndex <= b && (g = u)), d && p && (p.rowKey === this.rowKey && (g = f), p.rowIndex >= C && p.rowIndex <= b && (g = f)), this.drawCellSkyBgColor = g;
638
630
  let y = e, v = a;
639
631
  if (this.ctx.database.getReadonly(this.rowKey, this.key) || (y = i, v = r), w && (this.rowIndex % 2 ? y = m : y = e), typeof s == "function") {
640
632
  const _ = s, { backgroundColor: S, color: I, font: R } = _({
@@ -659,17 +651,17 @@ class It extends jt {
659
651
  let w = u, m = this.drawY + (i - f) / 2;
660
652
  if (a !== "selection-tree") {
661
653
  if (a === "tree-selection") {
662
- const { TREE_INDENT: C = 16, TREE_ICON_SIZE: p } = this.ctx.config, b = this.ctx.database.getRowForRowKey(c), { level: y = 0 } = b || {}, v = y * C;
663
- w = u + p + v;
654
+ const { TREE_INDENT: p = 16, TREE_ICON_SIZE: C } = this.ctx.config, b = this.ctx.database.getRowForRowKey(c), { level: y = 0 } = b || {}, v = y * p;
655
+ w = u + C + v;
664
656
  }
665
657
  }
666
658
  let g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck";
667
659
  if (a === "selection-tree" || a === "tree-selection") {
668
- const C = this.ctx.database.getTreeSelectionState(c);
669
- C.indeterminate && d ? (g = this.ctx.icons.get("checkbox-indeterminate"), E = "checkbox-indeterminate") : C.checked && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : !C.checked && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
660
+ const p = this.ctx.database.getTreeSelectionState(c);
661
+ p.indeterminate && d ? (g = this.ctx.icons.get("checkbox-indeterminate"), E = "checkbox-indeterminate") : p.checked && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : !p.checked && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
670
662
  } else {
671
- const C = this.ctx.database.getRowSelection(c);
672
- C && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : C && !d ? (g = this.ctx.icons.get("checkbox-check-disabled"), E = "checkbox-check-disabled") : !C && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
663
+ const p = this.ctx.database.getRowSelection(c);
664
+ p && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : p && !d ? (g = this.ctx.icons.get("checkbox-check-disabled"), E = "checkbox-check-disabled") : !p && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
673
665
  }
674
666
  w + f + x > this.drawX + this.visibleWidth || m + f + x > this.drawY + this.visibleHeight || (a === "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["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));
675
667
  }
@@ -693,8 +685,8 @@ class It extends jt {
693
685
  if (a.rowKey === this.rowKey && (l = this.drawX + this.width - s - o, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
694
686
  const f = this.getSpanInfo(), { yArr: x } = f, u = x[0], w = x[1];
695
687
  if (a.rowIndex >= u && a.rowIndex <= w) {
696
- const { width: m, height: g, offsetTop: E, offsetLeft: C } = f;
697
- l = this.drawX - C + m - s - o, c = this.drawY - E + (g - s) / 2;
688
+ const { width: m, height: g, offsetTop: E, offsetLeft: p } = f;
689
+ l = this.drawX - p + m - s - o, c = this.drawY - E + (g - s) / 2;
698
690
  }
699
691
  }
700
692
  const d = this.ctx.icons.get(this.hoverIconName);
@@ -967,9 +959,9 @@ class It extends jt {
967
959
  drawBorder(e) {
968
960
  const { drawX: i, drawY: s, rowIndex: o, colIndex: r, height: a, width: l } = this;
969
961
  let c = i, d = s;
970
- const { xArr: f, yArr: x, lineDash: u = [], borderWidth: w = 1, borderColor: m, fillColor: g } = e, E = f[0], C = f[1], p = x[0], b = x[1];
971
- if (r >= E && r <= C && o === p) {
972
- const y = r === C ? 1 : 0, v = r === E ? 1 : 0;
962
+ const { xArr: f, yArr: x, lineDash: u = [], borderWidth: w = 1, borderColor: m, fillColor: g } = e, E = f[0], p = f[1], C = x[0], b = x[1];
963
+ if (r >= E && r <= p && o === C) {
964
+ const y = r === p ? 1 : 0, v = r === E ? 1 : 0;
973
965
  this.ctx.paint.drawLine([c + v, d + 1, c + l - y, d + 1], {
974
966
  borderColor: m,
975
967
  fillColor: g,
@@ -979,8 +971,8 @@ class It extends jt {
979
971
  lineDash: u
980
972
  });
981
973
  }
982
- if (r === C && o >= p && o <= b) {
983
- const y = o === p ? 1 : 0, v = o === b ? 1 : 0;
974
+ if (r === p && o >= C && o <= b) {
975
+ const y = o === C ? 1 : 0, v = o === b ? 1 : 0;
984
976
  this.ctx.paint.drawLine([c + l - 1, d + y, c + l - 1, d + a - v], {
985
977
  borderColor: m,
986
978
  fillColor: g,
@@ -990,8 +982,8 @@ class It extends jt {
990
982
  lineDash: u
991
983
  });
992
984
  }
993
- if (r >= E && r <= C && o === b) {
994
- const y = r === C ? 1 : 0, v = r === E ? 1 : 0;
985
+ if (r >= E && r <= p && o === b) {
986
+ const y = r === p ? 1 : 0, v = r === E ? 1 : 0;
995
987
  this.ctx.paint.drawLine([c + v, d + a - 1, c + l - y, d + a - 1], {
996
988
  borderColor: m,
997
989
  fillColor: g,
@@ -1001,8 +993,8 @@ class It extends jt {
1001
993
  lineDash: u
1002
994
  });
1003
995
  }
1004
- if (r === E && o >= p && o <= b) {
1005
- const y = o === b ? 1 : 0, v = o === p ? 1 : 0;
996
+ if (r === E && o >= C && o <= b) {
997
+ const y = o === b ? 1 : 0, v = o === C ? 1 : 0;
1006
998
  this.ctx.paint.drawLine([c + 1, d + v, c + 1, d + a - y], {
1007
999
  borderColor: m,
1008
1000
  fillColor: g,
@@ -1014,7 +1006,7 @@ class It extends jt {
1014
1006
  }
1015
1007
  }
1016
1008
  }
1017
- class be {
1009
+ class ye {
1018
1010
  constructor(t, e) {
1019
1011
  n(this, "ctx");
1020
1012
  n(this, "data");
@@ -1033,7 +1025,6 @@ class be {
1033
1025
  n(this, "validationErrorMap", /* @__PURE__ */ new Map());
1034
1026
  n(this, "itemRowKeyMap", /* @__PURE__ */ new WeakMap());
1035
1027
  n(this, "bufferData", []);
1036
- n(this, "originalColumns", []);
1037
1028
  n(this, "customHeader", {
1038
1029
  fixedData: {},
1039
1030
  sortData: {},
@@ -1054,7 +1045,7 @@ class be {
1054
1045
  n(this, "sortState", /* @__PURE__ */ new Map());
1055
1046
  this.ctx = t;
1056
1047
  const { data: i = [], columns: s = [], footerData: o = [] } = e;
1057
- this.data = i, this.footerData = o, this.columns = s, this.originalColumns = at(s), this.init();
1048
+ this.data = i, this.footerData = o, this.columns = s, this.init();
1058
1049
  }
1059
1050
  // 初始化默认不忽略清空改变值和校验map
1060
1051
  init(t = !0) {
@@ -1081,23 +1072,23 @@ class be {
1081
1072
  initData(t, e = 0, i = []) {
1082
1073
  const s = t.length;
1083
1074
  t.forEach((o, r) => {
1084
- var C;
1085
- const { ROW_KEY: a = "", DEFAULT_EXPAND_ALL: l, CELL_HEIGHT: c, SELECTABLE_METHOD: d, CHECKBOX_KEY: f } = this.ctx.config, x = o[a], u = x != null ? `${x}` : $t();
1075
+ var p;
1076
+ const { ROW_KEY: a = "", DEFAULT_EXPAND_ALL: l, CELL_HEIGHT: c, SELECTABLE_METHOD: d, CHECKBOX_KEY: f } = this.ctx.config, x = o[a], u = x != null ? `${x}` : zt();
1086
1077
  this.itemRowKeyMap.set(o, u);
1087
1078
  const w = o._height || c, m = o._readonly;
1088
1079
  let g = !0;
1089
1080
  if (typeof d == "function" && (g = d), f) {
1090
- const p = o[f];
1091
- if (this.checkboxKeyMap.has(p)) {
1092
- const b = this.checkboxKeyMap.get(p) || [];
1093
- b.push(u), this.checkboxKeyMap.set(p, b);
1081
+ const C = o[f];
1082
+ if (this.checkboxKeyMap.has(C)) {
1083
+ const b = this.checkboxKeyMap.get(C) || [];
1084
+ b.push(u), this.checkboxKeyMap.set(C, b);
1094
1085
  } else
1095
- this.checkboxKeyMap.set(p, [u]);
1086
+ this.checkboxKeyMap.set(C, [u]);
1096
1087
  }
1097
1088
  this.selectionMap.set(u, {
1098
1089
  key: f ? o[f] : u,
1099
1090
  row: o,
1100
- check: ((C = this.selectionMap.get(u)) == null ? void 0 : C.check) || !1
1091
+ check: ((p = this.selectionMap.get(u)) == null ? void 0 : p.check) || !1
1101
1092
  });
1102
1093
  const E = l || this.expandMap.get(u) || o._expand || !1;
1103
1094
  this.expandMap.set(u, E), this.rowKeyMap.set(u, {
@@ -1167,26 +1158,26 @@ class be {
1167
1158
  }
1168
1159
  generateColumns(t) {
1169
1160
  const e = (i) => i.map((s) => {
1170
- var a, l, c, d, f, x, u, w;
1171
- s.children && Array.isArray(s.children) && (s.children = e(s.children));
1172
- const o = {
1173
- hide: (l = (a = this.customHeader) == null ? void 0 : a.hideData) == null ? void 0 : l[s.key],
1174
- fixed: (d = (c = this.customHeader) == null ? void 0 : c.fixedData) == null ? void 0 : d[s.key],
1175
- sort: (x = (f = this.customHeader) == null ? void 0 : f.sortData) == null ? void 0 : x[s.key],
1176
- width: (w = (u = this.customHeader) == null ? void 0 : u.resizableData) == null ? void 0 : w[s.key]
1177
- }, r = {};
1178
- for (const [m, g] of Object.entries(o))
1179
- g !== void 0 && (r[m] = g);
1161
+ var l, c, d, f, x, u, w, m;
1162
+ const o = s.children && Array.isArray(s.children) ? e(s.children) : void 0, r = {
1163
+ hide: (c = (l = this.customHeader) == null ? void 0 : l.hideData) == null ? void 0 : c[s.key],
1164
+ fixed: (f = (d = this.customHeader) == null ? void 0 : d.fixedData) == null ? void 0 : f[s.key],
1165
+ sort: (u = (x = this.customHeader) == null ? void 0 : x.sortData) == null ? void 0 : u[s.key],
1166
+ width: (m = (w = this.customHeader) == null ? void 0 : w.resizableData) == null ? void 0 : m[s.key]
1167
+ }, a = {};
1168
+ for (const [g, E] of Object.entries(r))
1169
+ E !== void 0 && (a[g] = E);
1180
1170
  return {
1181
1171
  ...s,
1182
- ...r
1172
+ children: o,
1173
+ hide: typeof s.hide == "function" ? s.hide(s) : s.hide,
1174
+ ...a
1183
1175
  };
1184
1176
  });
1185
1177
  return e(t);
1186
1178
  }
1187
1179
  getColumns() {
1188
- const t = at(this.columns);
1189
- return this.generateColumns(t);
1180
+ return this.generateColumns(this.columns);
1190
1181
  }
1191
1182
  setColumns(t) {
1192
1183
  this.columns = t, this.clearBufferData();
@@ -1303,7 +1294,7 @@ class be {
1303
1294
  } else if (s === "string") {
1304
1295
  const d = String(a || ""), f = String(l || "");
1305
1296
  c = d.localeCompare(f);
1306
- } else s === "date" && (c = ye(a, l));
1297
+ } else s === "date" && (c = Ce(a, l));
1307
1298
  return i === "asc" ? c : -c;
1308
1299
  });
1309
1300
  }
@@ -1416,50 +1407,58 @@ class be {
1416
1407
  async batchSetItemValue(t, e = !1, i = !0, s = "none") {
1417
1408
  let o = [], r = i;
1418
1409
  const a = /* @__PURE__ */ new Set();
1419
- let l = [], c = t.map((u) => {
1420
- const { rowKey: w, key: m } = u;
1421
- let g = u.value, E = g;
1422
- const C = this.getRowDataItemForRowKey(w), p = this.getItemValue(w, m), b = this.getVirtualBodyCellByKey(w, m);
1423
- return (b == null ? void 0 : b.type) === "number" && (["", void 0, null].includes(g) ? E = null : /^-?\d+(\.\d+)?$/.test(`${g}`) ? E = Number(g) : (E = p, l.push({
1424
- ...u,
1425
- value: E,
1426
- oldValue: p,
1410
+ let l = [], c = t.map((w) => {
1411
+ const { rowKey: m, key: g } = w;
1412
+ let E = w.value, p = E;
1413
+ const C = this.getRowDataItemForRowKey(m), b = this.getItemValue(m, g), y = this.getVirtualBodyCellByKey(m, g);
1414
+ return (y == null ? void 0 : y.type) === "number" && (["", void 0, null].includes(E) ? p = null : /^-?\d+(\.\d+)?$/.test(`${E}`) ? p = Number(E) : (p = b, l.push({
1415
+ ...w,
1416
+ value: p,
1417
+ oldValue: b,
1427
1418
  row: C
1428
1419
  }))), {
1429
- ...u,
1430
- value: E,
1431
- oldValue: p,
1420
+ ...w,
1421
+ value: p,
1422
+ oldValue: b,
1432
1423
  row: C
1433
1424
  };
1434
1425
  });
1435
- if (c = c.filter((u) => !l.some((w) => u.rowKey === w.rowKey && u.key === w.key)), l.length) {
1436
- const u = {
1426
+ if (c = c.filter((w) => !l.some((m) => w.rowKey === m.rowKey && w.key === m.key)), l.length) {
1427
+ const w = {
1437
1428
  code: "ERR_BATCH_SET_NUMBER_VALUE",
1438
1429
  message: "Assignment failed, not a numeric type",
1439
1430
  data: l
1440
1431
  };
1441
- this.ctx.emit("error", u);
1432
+ this.ctx.emit("error", w);
1442
1433
  }
1443
- if (c = c.filter((u) => u.oldValue !== u.value), !c.length)
1434
+ if (c = c.filter((w) => w.oldValue !== w.value), !c.length)
1444
1435
  return;
1445
1436
  const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
1446
- s === "none" && typeof d == "function" && (c = await d(c), r = !1), c.forEach((u) => {
1447
- const { value: w, rowKey: m, key: g } = u, E = this.getItemValue(m, g);
1448
- a.add(m), this.setItemValue(m, g, w, !1, !1, !1, r), o.push({
1449
- rowKey: m,
1450
- key: g,
1451
- oldValue: E,
1452
- newValue: w
1437
+ s === "none" && typeof d == "function" && (c = await d(c), r = !1), c.forEach((w) => {
1438
+ const { value: m, rowKey: g, key: E } = w, p = this.getItemValue(g, E);
1439
+ a.add(g), this.setItemValue(g, E, m, !1, !1, !1, r), o.push({
1440
+ rowKey: g,
1441
+ key: E,
1442
+ oldValue: p,
1443
+ newValue: m
1453
1444
  });
1454
1445
  });
1455
1446
  let f = [];
1456
- a.forEach((u) => {
1457
- f.push(this.ctx.database.getRowDataItemForRowKey(u));
1447
+ a.forEach((w) => {
1448
+ f.push(this.ctx.database.getRowDataItemForRowKey(w));
1458
1449
  });
1459
- const x = c.map(({ rowKey: u, key: w }) => this.getValidator(u, w));
1450
+ const x = c.map(({ rowKey: w, key: m }) => this.getValidator(w, m));
1460
1451
  Promise.all(x).then(() => {
1461
1452
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1462
- }), this.ctx.emit("change", c, f), e && this.ctx.history.pushState({
1453
+ });
1454
+ const u = c.map((w) => {
1455
+ const m = !!this.getValidationError(w.rowKey, w.key).length;
1456
+ return {
1457
+ ...w,
1458
+ errorTip: m
1459
+ };
1460
+ });
1461
+ this.ctx.emit("change", u, f), e && this.ctx.history.pushState({
1463
1462
  changeList: o,
1464
1463
  scrollX: this.ctx.scrollX,
1465
1464
  scrollY: this.ctx.scrollY,
@@ -1664,19 +1663,19 @@ class be {
1664
1663
  if (this.ctx.config.TREE_SELECT_MODE === "auto") {
1665
1664
  const c = (g) => {
1666
1665
  const E = this.getTreeChildren(g);
1667
- let C = [];
1668
- for (const p of E)
1669
- C.push(p), C.push(...c(p));
1670
- return C;
1666
+ let p = [];
1667
+ for (const C of E)
1668
+ p.push(C), p.push(...c(C));
1669
+ return p;
1671
1670
  }, f = c(t).map((g) => this.selectionMap.get(g)), x = f.filter((g) => g == null ? void 0 : g.check).length, u = f.length, w = x > 0;
1672
1671
  r = w && !(x === u), a = s || w, s && u > 0 && x === 0 && (a = !1, r = !1);
1673
1672
  } else if (this.ctx.config.TREE_SELECT_MODE === "cautious") {
1674
1673
  const c = (g) => {
1675
1674
  const E = this.getTreeChildren(g);
1676
- let C = [];
1677
- for (const p of E)
1678
- C.push(p), C.push(...c(p));
1679
- return C;
1675
+ let p = [];
1676
+ for (const C of E)
1677
+ p.push(C), p.push(...c(C));
1678
+ return p;
1680
1679
  }, f = c(t).map((g) => this.selectionMap.get(g)), x = f.filter((g) => g == null ? void 0 : g.check).length, u = f.length, w = x > 0, m = x === u;
1681
1680
  r = w && !m, a = s || m, s && u > 0 && x === 0 && (a = !1, r = !1);
1682
1681
  } else this.ctx.config.TREE_SELECT_MODE === "strictly" && (r = !1, a = s);
@@ -1912,7 +1911,7 @@ class be {
1912
1911
  getValidator(t, e) {
1913
1912
  return new Promise((i) => {
1914
1913
  const s = this.rowKeyMap.get(t), o = this.headerMap.get(e), { BODY_CELL_RULES_METHOD: r } = this.ctx.config;
1915
- if (o === void 0)
1914
+ if (s === void 0 || o === void 0)
1916
1915
  return i([]);
1917
1916
  const a = o.column;
1918
1917
  let l = a.rules;
@@ -1937,7 +1936,7 @@ class be {
1937
1936
  value: this.getItemValue(t, e),
1938
1937
  field: e,
1939
1938
  fieldValue: this.getItemValue(t, e)
1940
- }, f = new ue(l).validate(c);
1939
+ }, f = new fe(l).validate(c);
1941
1940
  this.setValidationError(t, e, f), i(f);
1942
1941
  } else
1943
1942
  this.clearValidationError(t, e), i([]);
@@ -1987,7 +1986,7 @@ class be {
1987
1986
  }
1988
1987
  ]
1989
1988
  };
1990
- let g = e, E = e, C = a, p = a, b = [], y = 0, v = 0, _ = 0, S = 0;
1989
+ let g = e, E = e, p = a, C = a, b = [], y = 0, v = 0, _ = 0, S = 0;
1991
1990
  if (d !== 1 && w) {
1992
1991
  S = x;
1993
1992
  const I = l.reduce((R, T) => {
@@ -2038,7 +2037,7 @@ class be {
2038
2037
  break;
2039
2038
  const T = this.getItemValue(s, i), O = this.getItemValue(s, R.key);
2040
2039
  if (T === O && c.includes(R.key))
2041
- C = I;
2040
+ p = I;
2042
2041
  else
2043
2042
  break;
2044
2043
  }
@@ -2048,17 +2047,17 @@ class be {
2048
2047
  break;
2049
2048
  const T = this.getItemValue(s, i), O = this.getItemValue(s, R.key);
2050
2049
  if (T === O && c.includes(R.key))
2051
- p = I;
2050
+ C = I;
2052
2051
  else
2053
2052
  break;
2054
2053
  }
2055
- for (let I = C; I < a; I++) {
2054
+ for (let I = p; I < a; I++) {
2056
2055
  const R = this.getColumnByColIndex(I);
2057
2056
  if (!R)
2058
2057
  break;
2059
2058
  v += R.width || 100;
2060
2059
  }
2061
- for (let I = C; I <= p; I++) {
2060
+ for (let I = p; I <= C; I++) {
2062
2061
  const R = this.getColumnByColIndex(I);
2063
2062
  if (!R)
2064
2063
  break;
@@ -2071,7 +2070,7 @@ class be {
2071
2070
  }
2072
2071
  }
2073
2072
  return {
2074
- xArr: [C, p],
2073
+ xArr: [p, C],
2075
2074
  yArr: [g, E],
2076
2075
  rowspan: d,
2077
2076
  colspan: u,
@@ -2117,7 +2116,7 @@ class be {
2117
2116
  // 获取虚拟单元格,只针对可见的
2118
2117
  getVirtualBodyCell(t, e) {
2119
2118
  const i = this.getColumnByColIndex(e), s = this.getRowForRowIndex(t);
2120
- return !i || !s ? void 0 : new It(this.ctx, t, e, 0, 0, 0, 0, i, s.item, "body");
2119
+ return !i || !s ? void 0 : new bt(this.ctx, t, e, 0, 0, 0, 0, i, s.item, "body");
2121
2120
  }
2122
2121
  getVirtualBodyCellByKey(t, e) {
2123
2122
  const i = this.getRowIndexForRowKey(t), s = this.getColIndexForKey(e);
@@ -2166,12 +2165,12 @@ class be {
2166
2165
  const s = t[i];
2167
2166
  s !== void 0 && (this.customHeader[i] = s);
2168
2167
  }), !e) {
2169
- const i = this.clearCustomHeaderInvalidValues(this.originalColumns);
2168
+ const i = this.clearCustomHeaderInvalidValues(this.columns);
2170
2169
  this.ctx.emit("customHeaderChange", i);
2171
2170
  }
2172
2171
  }
2173
2172
  resetCustomHeader() {
2174
- this.customHeader = {}, this.columns = this.originalColumns, this.init(!1), this.ctx.emit("resetHeader"), this.ctx.emit("customHeaderChange", this.customHeader);
2173
+ this.customHeader = {}, this.ctx.emit("resetHeader"), this.ctx.emit("customHeaderChange", this.customHeader);
2175
2174
  }
2176
2175
  getCustomHeader() {
2177
2176
  return this.customHeader;
@@ -2188,7 +2187,7 @@ class be {
2188
2187
  i[s] = e;
2189
2188
  }), this.setCustomHeader({
2190
2189
  hideData: i
2191
- }), this.init(!1), this.ctx.emit("resetHeader");
2190
+ }), this.ctx.emit("resetHeader");
2192
2191
  }
2193
2192
  setCustomHeaderFixedData(t, e) {
2194
2193
  let { fixedData: i = {} } = this.customHeader;
@@ -2196,10 +2195,7 @@ class be {
2196
2195
  i[s] = e;
2197
2196
  }), this.setCustomHeader({
2198
2197
  fixedData: i
2199
- }), this.init(!1), this.ctx.emit("resetHeader");
2200
- }
2201
- setOriginalColumns(t) {
2202
- this.originalColumns = t;
2198
+ }), this.ctx.emit("resetHeader");
2203
2199
  }
2204
2200
  // 递归处理
2205
2201
  clearCustomHeaderInvalidValues(t) {
@@ -2218,7 +2214,7 @@ class be {
2218
2214
  return e(t, i), i;
2219
2215
  }
2220
2216
  }
2221
- class Ie {
2217
+ class be {
2222
2218
  constructor(t) {
2223
2219
  n(this, "ctx");
2224
2220
  n(this, "history", []);
@@ -2273,7 +2269,7 @@ class Ie {
2273
2269
  this.history = [], this.historyIndex = -1;
2274
2270
  }
2275
2271
  }
2276
- class Re {
2272
+ class Ie {
2277
2273
  constructor(t) {
2278
2274
  n(this, "eventTasks", /* @__PURE__ */ new Set());
2279
2275
  n(this, "ctx");
@@ -2355,7 +2351,7 @@ class Re {
2355
2351
  }
2356
2352
  }
2357
2353
  }
2358
- class ve {
2354
+ class Re {
2359
2355
  constructor() {
2360
2356
  n(this, "events", /* @__PURE__ */ new Map());
2361
2357
  }
@@ -2393,7 +2389,7 @@ class ve {
2393
2389
  this.events.clear();
2394
2390
  }
2395
2391
  }
2396
- class _e {
2392
+ class ve {
2397
2393
  constructor(t) {
2398
2394
  n(this, "ctx");
2399
2395
  n(this, "textCacheMap", /* @__PURE__ */ new Map());
@@ -2504,10 +2500,10 @@ class _e {
2504
2500
  } = r;
2505
2501
  if (this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textAlign = l, ["", null, void 0].includes(t))
2506
2502
  return this.ctx.restore(), !1;
2507
- const E = parseInt(((R = a.match(/\d+/)) == null ? void 0 : R[0]) || "12") * (r.lineHeight || 1.2), C = s - d * 2 - w - m;
2508
- let p = !1;
2503
+ const E = parseInt(((R = a.match(/\d+/)) == null ? void 0 : R[0]) || "12") * (r.lineHeight || 1.2), p = s - d * 2 - w - m;
2504
+ let C = !1;
2509
2505
  const b = Math.round((o - 2 * d) / E);
2510
- let y = this.wrapText(t, C, r.cacheTextKey), v = Math.min(y.length, Math.max(b, 1));
2506
+ let y = this.wrapText(t, p, r.cacheTextKey), v = Math.min(y.length, Math.max(b, 1));
2511
2507
  x === "auto" && u ? v = y.length : typeof x == "number" && x < v && x !== 1 ? v = x : (x === 1 && (y = [t], v = 1), x === "auto" && b === 1 && (y = [t], v = 1));
2512
2508
  let _ = i + d;
2513
2509
  const S = Math.round(v * E);
@@ -2518,7 +2514,7 @@ class _e {
2518
2514
  const O = y[T], M = _ + T * E;
2519
2515
  if (this.ctx.textBaseline = "top", T === v - 1) {
2520
2516
  const A = y.slice(T).join(""), { _text: D, ellipsis: H } = this.handleEllipsis(A, s, d, a);
2521
- this.ctx.fillText(D, I, M), p = H;
2517
+ this.ctx.fillText(D, I, M), C = H;
2522
2518
  break;
2523
2519
  }
2524
2520
  this.ctx.fillText(O, I, M);
@@ -2539,7 +2535,7 @@ class _e {
2539
2535
  };
2540
2536
  r.textCallback(A);
2541
2537
  }
2542
- return this.ctx.restore(), p;
2538
+ return this.ctx.restore(), C;
2543
2539
  }
2544
2540
  /**
2545
2541
  * 将文本按宽度换行
@@ -2621,7 +2617,7 @@ class _e {
2621
2617
  };
2622
2618
  }
2623
2619
  }
2624
- class Nt {
2620
+ class Dt {
2625
2621
  constructor(t) {
2626
2622
  n(this, "_config", {});
2627
2623
  /** CSS 类名前缀 */
@@ -2855,6 +2851,8 @@ class Nt {
2855
2851
  n(this, "RESIZE_ROW_LINE_COLOR", "#e1e6eb");
2856
2852
  /** 列调整线颜色 */
2857
2853
  n(this, "RESIZE_COLUMN_LINE_COLOR", "#e1e6eb");
2854
+ /** 启用列调整文本 */
2855
+ n(this, "ENABLE_RESIZE_COLUMN_TEXT", !0);
2858
2856
  /** 列调整线颜色 */
2859
2857
  n(this, "RESIZE_COLUMN_TEXT_COLOR", "#fff");
2860
2858
  /** 列调整线文本背景色 */
@@ -2966,14 +2964,14 @@ class Nt {
2966
2964
  let t = {};
2967
2965
  Object.keys(this).forEach((e) => {
2968
2966
  if (e.endsWith("_COLOR") || e.endsWith("_FONT")) {
2969
- const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = Ce(i);
2967
+ const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = pe(i);
2970
2968
  s && (t[e] = s);
2971
2969
  }
2972
2970
  }), Object.assign(this, t, this._config);
2973
2971
  }
2974
2972
  }
2975
- const Zt = '<svg t="1724122015492" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4237" width="32" height="32"><path d="M401.472 316.992l159.04 217.664L591.488 512l-30.976-22.656-159.04 217.728q-2.24 3.008-3.84 6.464-1.6 3.456-2.496 7.104-0.896 3.648-1.024 7.424-0.192 3.84 0.384 7.552 0.64 3.712 1.92 7.296 1.28 3.52 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992 3.072 2.24 6.464 3.84 3.456 1.6 7.168 2.496 3.648 0.896 7.424 1.024 3.776 0.192 7.488-0.448 3.776-0.576 7.296-1.856 3.584-1.28 6.784-3.264 3.2-1.92 6.016-4.48 2.816-2.56 5.056-5.632l159.04-217.728q3.584-4.928 5.504-10.752 1.92-5.76 1.92-11.904 0-6.08-1.92-11.904-1.92-5.76-5.504-10.752L463.488 271.68q-2.24-3.072-5.056-5.632-2.752-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.52-1.28-7.296-1.856-3.712-0.576-7.488-0.448-3.84 0.192-7.424 1.088-3.712 0.896-7.168 2.496-3.392 1.6-6.4 3.84-3.136 2.176-5.696 4.992-2.56 2.752-4.48 6.016-1.984 3.2-3.264 6.784-1.28 3.52-1.92 7.296-0.576 3.712-0.384 7.488 0.128 3.84 1.024 7.488 0.896 3.648 2.496 7.04 1.6 3.456 3.84 6.528z m30.976-61.056q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.24-3.52 1.408-6.656 3.52-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.232 1.408 3.456 3.52 6.592 2.112 3.2 4.8 5.824 2.688 2.688 5.76 4.8 3.2 2.112 6.72 3.52 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.656 1.472-3.52 2.24-7.232 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.456-3.52-6.592-2.112-3.2-4.8-5.824-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.52-3.52-1.472-7.232-2.24Q436.224 256 432.448 256z m0 435.392q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.176-3.52 1.472-6.656 3.584-3.2 2.112-5.824 4.736-2.688 2.688-4.8 5.824-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.76 2.688 2.752 5.76 4.8 3.2 2.112 6.72 3.584 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.472 6.592-3.584 3.2-2.048 5.824-4.736 2.688-2.688 4.8-5.824 2.112-3.2 3.52-6.656 1.472-3.456 2.24-7.168 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.52-3.52-6.656-2.112-3.136-4.8-5.76-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704z" p-id="4238"></path></svg>', kt = '<svg t="1722595535853" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M640 128H384c-170.496 0-256 85.504-256 256v256c0 170.496 85.504 256 256 256h256c170.496 0 256-85.504 256-256V384c0-170.496-85.504-256-256-256z m67.584 302.592c-2.048 4.608-4.608 8.704-8.192 12.288L506.88 634.88c-3.584 3.584-7.68 6.144-12.288 8.192-4.608 2.048-9.728 3.072-14.848 3.072s-10.24-1.024-14.848-3.072c-4.608-2.048-8.704-4.608-12.288-8.192l-96.256-96.256c-3.584-3.584-6.144-7.68-8.192-12.288-2.048-4.608-3.072-9.728-3.072-14.848 0-2.56 0-5.12 1.024-7.68 0.512-2.56 1.024-5.12 2.048-7.168 1.024-2.56 2.048-4.608 3.584-6.656 1.536-2.048 3.072-4.096 4.608-5.632 1.536-2.048 3.584-3.584 5.632-4.608 2.048-1.536 4.096-2.56 6.656-3.584 2.56-1.024 4.608-1.536 7.168-2.048 2.56-0.512 5.12-0.512 7.68-0.512 5.12 0 10.24 1.024 14.848 3.072 4.608 2.048 8.704 4.608 12.288 8.192l69.12 68.608L645.12 389.12c3.584-3.584 7.68-6.144 12.288-8.192 4.608-2.048 9.728-3.072 14.848-3.072 2.56 0 5.12 0 7.68 0.512s5.12 1.024 7.168 2.048c2.56 1.024 4.608 2.048 6.656 3.584 2.048 1.536 4.096 3.072 5.632 4.608 1.536 1.536 3.584 3.584 4.608 5.632 1.536 2.048 2.56 4.096 3.584 6.656 1.024 2.56 1.536 4.608 2.048 7.168 0.512 2.56 1.024 5.12 1.024 7.68 0 5.12-1.024 10.24-3.072 14.848z" p-id="4552"></path></svg>', Xt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>', Rt = '<svg t="1755138507987" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5079" width="200" height="200"><path d="M512 938.688a42.688 42.688 0 0 1-35.072-18.432l-192-277.312A42.56 42.56 0 0 1 320 576h384a42.752 42.752 0 0 1 35.072 66.944l-192 277.312a42.688 42.688 0 0 1-35.072 18.432" fill="currentColor" p-id="2016"></path><path d="M704 448H320a42.752 42.752 0 0 1-35.072-66.944l192-277.312c16-23.04 54.208-23.04 70.144 0l192 277.312A42.56 42.56 0 0 1 704 448" fill="currentColor" p-id="2015"></path></svg>', Se = Rt.replace('fill="currentColor" p-id="2016"', 'fill="#bec4c7" p-id="2016"'), Te = Rt.replace('fill="currentColor" p-id="2015"', 'fill="#bec4c7" p-id="2015"');
2976
- class Oe {
2973
+ const qt = '<svg t="1724122015492" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4237" width="32" height="32"><path d="M401.472 316.992l159.04 217.664L591.488 512l-30.976-22.656-159.04 217.728q-2.24 3.008-3.84 6.464-1.6 3.456-2.496 7.104-0.896 3.648-1.024 7.424-0.192 3.84 0.384 7.552 0.64 3.712 1.92 7.296 1.28 3.52 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992 3.072 2.24 6.464 3.84 3.456 1.6 7.168 2.496 3.648 0.896 7.424 1.024 3.776 0.192 7.488-0.448 3.776-0.576 7.296-1.856 3.584-1.28 6.784-3.264 3.2-1.92 6.016-4.48 2.816-2.56 5.056-5.632l159.04-217.728q3.584-4.928 5.504-10.752 1.92-5.76 1.92-11.904 0-6.08-1.92-11.904-1.92-5.76-5.504-10.752L463.488 271.68q-2.24-3.072-5.056-5.632-2.752-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.52-1.28-7.296-1.856-3.712-0.576-7.488-0.448-3.84 0.192-7.424 1.088-3.712 0.896-7.168 2.496-3.392 1.6-6.4 3.84-3.136 2.176-5.696 4.992-2.56 2.752-4.48 6.016-1.984 3.2-3.264 6.784-1.28 3.52-1.92 7.296-0.576 3.712-0.384 7.488 0.128 3.84 1.024 7.488 0.896 3.648 2.496 7.04 1.6 3.456 3.84 6.528z m30.976-61.056q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.24-3.52 1.408-6.656 3.52-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.232 1.408 3.456 3.52 6.592 2.112 3.2 4.8 5.824 2.688 2.688 5.76 4.8 3.2 2.112 6.72 3.52 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.656 1.472-3.52 2.24-7.232 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.456-3.52-6.592-2.112-3.2-4.8-5.824-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.52-3.52-1.472-7.232-2.24Q436.224 256 432.448 256z m0 435.392q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.176-3.52 1.472-6.656 3.584-3.2 2.112-5.824 4.736-2.688 2.688-4.8 5.824-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.76 2.688 2.752 5.76 4.8 3.2 2.112 6.72 3.584 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.472 6.592-3.584 3.2-2.048 5.824-4.736 2.688-2.688 4.8-5.824 2.112-3.2 3.52-6.656 1.472-3.456 2.24-7.168 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.52-3.52-6.656-2.112-3.136-4.8-5.76-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704z" p-id="4238"></path></svg>', Nt = '<svg t="1722595535853" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M640 128H384c-170.496 0-256 85.504-256 256v256c0 170.496 85.504 256 256 256h256c170.496 0 256-85.504 256-256V384c0-170.496-85.504-256-256-256z m67.584 302.592c-2.048 4.608-4.608 8.704-8.192 12.288L506.88 634.88c-3.584 3.584-7.68 6.144-12.288 8.192-4.608 2.048-9.728 3.072-14.848 3.072s-10.24-1.024-14.848-3.072c-4.608-2.048-8.704-4.608-12.288-8.192l-96.256-96.256c-3.584-3.584-6.144-7.68-8.192-12.288-2.048-4.608-3.072-9.728-3.072-14.848 0-2.56 0-5.12 1.024-7.68 0.512-2.56 1.024-5.12 2.048-7.168 1.024-2.56 2.048-4.608 3.584-6.656 1.536-2.048 3.072-4.096 4.608-5.632 1.536-2.048 3.584-3.584 5.632-4.608 2.048-1.536 4.096-2.56 6.656-3.584 2.56-1.024 4.608-1.536 7.168-2.048 2.56-0.512 5.12-0.512 7.68-0.512 5.12 0 10.24 1.024 14.848 3.072 4.608 2.048 8.704 4.608 12.288 8.192l69.12 68.608L645.12 389.12c3.584-3.584 7.68-6.144 12.288-8.192 4.608-2.048 9.728-3.072 14.848-3.072 2.56 0 5.12 0 7.68 0.512s5.12 1.024 7.168 2.048c2.56 1.024 4.608 2.048 6.656 3.584 2.048 1.536 4.096 3.072 5.632 4.608 1.536 1.536 3.584 3.584 4.608 5.632 1.536 2.048 2.56 4.096 3.584 6.656 1.024 2.56 1.536 4.608 2.048 7.168 0.512 2.56 1.024 5.12 1.024 7.68 0 5.12-1.024 10.24-3.072 14.848z" p-id="4552"></path></svg>', kt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>', It = '<svg t="1755138507987" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5079" width="200" height="200"><path d="M512 938.688a42.688 42.688 0 0 1-35.072-18.432l-192-277.312A42.56 42.56 0 0 1 320 576h384a42.752 42.752 0 0 1 35.072 66.944l-192 277.312a42.688 42.688 0 0 1-35.072 18.432" fill="currentColor" p-id="2016"></path><path d="M704 448H320a42.752 42.752 0 0 1-35.072-66.944l192-277.312c16-23.04 54.208-23.04 70.144 0l192 277.312A42.56 42.56 0 0 1 704 448" fill="currentColor" p-id="2015"></path></svg>', _e = It.replace('fill="currentColor" p-id="2016"', 'fill="#bec4c7" p-id="2016"'), Se = It.replace('fill="currentColor" p-id="2015"', 'fill="#bec4c7" p-id="2015"');
2974
+ class Te {
2977
2975
  constructor(t) {
2978
2976
  n(this, "ctx");
2979
2977
  n(this, "list", [
@@ -2988,14 +2986,14 @@ class Oe {
2988
2986
  name: "expand",
2989
2987
  configName: "EXPAND_ICON_SVG",
2990
2988
  configColorName: "EXPAND_ICON_COLOR",
2991
- svg: Zt,
2989
+ svg: qt,
2992
2990
  color: "#4E5969"
2993
2991
  },
2994
2992
  {
2995
2993
  name: "shrink",
2996
2994
  configName: "SHRINK_ICON_SVG",
2997
2995
  configColorName: "SHRINK_ICON_COLOR",
2998
- svg: Xt,
2996
+ svg: kt,
2999
2997
  color: "#4E5969"
3000
2998
  },
3001
2999
  {
@@ -3009,7 +3007,7 @@ class Oe {
3009
3007
  name: "checkbox-check",
3010
3008
  configName: "CHECKBOX_CHECK_SVG",
3011
3009
  configColorName: "CHECKBOX_COLOR",
3012
- svg: kt,
3010
+ svg: Nt,
3013
3011
  color: "rgb(82,146,247)"
3014
3012
  },
3015
3013
  {
@@ -3022,7 +3020,7 @@ class Oe {
3022
3020
  {
3023
3021
  name: "checkbox-check-disabled",
3024
3022
  configName: "CHECKBOX_CHECK_DISABLED_SVG",
3025
- svg: kt,
3023
+ svg: Nt,
3026
3024
  color: "#DDE0EA"
3027
3025
  },
3028
3026
  {
@@ -3043,27 +3041,27 @@ class Oe {
3043
3041
  name: "icon-select",
3044
3042
  configName: "ICON_SELECT_SVG",
3045
3043
  configColorName: "ICON_SELECT_COLOR",
3046
- svg: Xt,
3044
+ svg: kt,
3047
3045
  color: "#4E5969"
3048
3046
  },
3049
3047
  {
3050
3048
  name: "sort-asc",
3051
3049
  configName: "SORT_ASC_ICON_SVG",
3052
3050
  configColorName: "SORT_ICON_COLOR",
3053
- svg: Se,
3051
+ svg: _e,
3054
3052
  color: "rgb(82,146,247)"
3055
3053
  },
3056
3054
  {
3057
3055
  name: "sort-desc",
3058
3056
  configName: "SORT_DESC_ICON_SVG",
3059
3057
  configColorName: "SORT_ICON_COLOR",
3060
- svg: Te,
3058
+ svg: Se,
3061
3059
  color: "rgb(82,146,247)"
3062
3060
  },
3063
3061
  {
3064
3062
  name: "sort-default",
3065
3063
  configName: "SORTABLE_ICON_SVG",
3066
- svg: Rt,
3064
+ svg: It,
3067
3065
  color: "#bec4c7"
3068
3066
  }
3069
3067
  ]);
@@ -3126,7 +3124,7 @@ class Oe {
3126
3124
  return this.list.find((e) => e.name === t);
3127
3125
  }
3128
3126
  }
3129
- class Et extends jt {
3127
+ class mt extends jt {
3130
3128
  constructor(e, i, s, o, r, a, l) {
3131
3129
  super(e, s, o, r, a, "header", l.fixed);
3132
3130
  n(this, "align");
@@ -3188,7 +3186,7 @@ class Et extends jt {
3188
3186
  n(this, "drawSortImageHeight", 0);
3189
3187
  n(this, "drawSortImageName", "");
3190
3188
  n(this, "drawSortImageSource");
3191
- this.ctx = e, this.x = s, this.y = o, this.width = r, this.height = a, this.visibleWidth = r, this.visibleHeight = a, this.colIndex = i, this.key = l.key, this.minWidth = l.minWidth, this.maxWidth = l.maxWidth, this.hide = l.hide || !1, this.type = l.type || "", this.editorType = l.editorType || "text", this.hideHeaderSelection = l.hideHeaderSelection || !1, this.align = l.headerAlign || l.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = l.headerVerticalAlign || l.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = l.fixed || "", this.level = l.level || 0, this.operation = l.operation || !1, this.text = l.title, this.column = l, this.colspan = l.colspan || 1, this.widthFillDisable = l.widthFillDisable || !1, this.rowspan = l.rowspan || 1, this.rules = l.rules, this.readonly = l.readonly || !1, this.required = l.required || !1, this.sortIconName = l.sortIconName || "sort-default", this.sortAscIconName = l.sortAscIconName || "sort-asc", this.sortDescIconName = l.sortDescIconName || "sort-desc", this.rowKey = $t(), this.overflowTooltipShow = l.overflowTooltipHeaderShow !== !1, this.hasChildren = l.children && l.children.length > 0 || !1, this.render = l.renderHeader, this.maxLineClampHeader = l.maxLineClampHeader || "auto";
3189
+ this.ctx = e, this.x = s, this.y = o, this.width = r, this.height = a, this.visibleWidth = r, this.visibleHeight = a, this.colIndex = i, this.key = l.key, this.minWidth = l.minWidth, this.maxWidth = l.maxWidth, this.hide = (typeof l.hide == "function" ? l.hide(l) : l.hide) || !1, this.type = l.type || "", this.editorType = l.editorType || "text", this.hideHeaderSelection = l.hideHeaderSelection || !1, this.align = l.headerAlign || l.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = l.headerVerticalAlign || l.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = l.fixed || "", this.level = l.level || 0, this.operation = l.operation || !1, this.text = l.title, this.column = l, this.colspan = l.colspan || 1, this.widthFillDisable = l.widthFillDisable || !1, this.rowspan = l.rowspan || 1, this.rules = l.rules, this.readonly = l.readonly || !1, this.required = l.required || !1, this.sortIconName = l.sortIconName || "sort-default", this.sortAscIconName = l.sortAscIconName || "sort-asc", this.sortDescIconName = l.sortDescIconName || "sort-desc", this.rowKey = zt(), this.overflowTooltipShow = l.overflowTooltipHeaderShow !== !1, this.hasChildren = l.children && l.children.length > 0 || !1, this.render = l.renderHeader, this.maxLineClampHeader = l.maxLineClampHeader || "auto";
3192
3190
  }
3193
3191
  /**
3194
3192
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -3333,7 +3331,7 @@ class Et extends jt {
3333
3331
  };
3334
3332
  }
3335
3333
  }
3336
- class Le {
3334
+ class Oe {
3337
3335
  constructor(t) {
3338
3336
  n(this, "ctx");
3339
3337
  n(this, "visibleHoverCell");
@@ -3454,7 +3452,7 @@ class Le {
3454
3452
  t.drawSelectionImageWidth,
3455
3453
  t.drawSelectionImageHeight
3456
3454
  ))
3457
- if (t instanceof Et)
3455
+ if (t instanceof mt)
3458
3456
  t.drawSelectionImageName === "checkbox-uncheck" || t.drawSelectionImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawSelectionImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
3459
3457
  else {
3460
3458
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -3519,7 +3517,7 @@ class Le {
3519
3517
  */
3520
3518
  imageEnterAndLeave(t, e) {
3521
3519
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
3522
- if (t instanceof Et) {
3520
+ if (t instanceof mt) {
3523
3521
  if (t.drawSelectionImageSource && this.isInsideElement(
3524
3522
  r,
3525
3523
  o,
@@ -3543,7 +3541,7 @@ class Le {
3543
3541
  return;
3544
3542
  }
3545
3543
  }
3546
- if (t instanceof It) {
3544
+ if (t instanceof bt) {
3547
3545
  if (t.drawSelectionImageSource && this.isInsideElement(
3548
3546
  r,
3549
3547
  o,
@@ -3640,7 +3638,7 @@ class Le {
3640
3638
  this.resizeObserver.unobserve(this.ctx.stageElement), this.mutationObserver.disconnect();
3641
3639
  }
3642
3640
  }
3643
- class Me {
3641
+ class Le {
3644
3642
  constructor(t, e) {
3645
3643
  n(this, "eventBus");
3646
3644
  n(this, "eventBrowser");
@@ -3778,10 +3776,10 @@ class Me {
3778
3776
  loadingElement: c,
3779
3777
  contextMenuElement: d
3780
3778
  } = t;
3781
- this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = c, this.contextMenuElement = d, this.config = new Nt(e.config || {}), this.eventBus = new ve(), this.eventBrowser = new Re(this), this.eventTable = new Le(this), this.paint = new _e(this.canvasElement), this.database = new be(this, e), this.history = new Ie(this), this.icons = new Oe(this);
3779
+ this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = c, this.contextMenuElement = d, this.config = new Dt(e.config || {}), this.eventBus = new Re(), this.eventBrowser = new Ie(this), this.eventTable = new Oe(this), this.paint = new ve(this.canvasElement), this.database = new ye(this, e), this.history = new be(this), this.icons = new Te(this);
3782
3780
  }
3783
3781
  setConfig(t) {
3784
- this.config = new Nt(t);
3782
+ this.config = new Dt(t);
3785
3783
  }
3786
3784
  setItemValueByEditor(t, e, i, s = !0, o = !0, r = !0) {
3787
3785
  if (this.config.ENABLE_MERGE_CELL_LINK) {
@@ -3912,7 +3910,7 @@ class Me {
3912
3910
  this.eventTable.destroy(), this.eventBrowser.destroy(), this.eventBus.destroy();
3913
3911
  }
3914
3912
  }
3915
- class Bt {
3913
+ class Xt {
3916
3914
  constructor(t, e) {
3917
3915
  n(this, "ctx");
3918
3916
  n(this, "type");
@@ -4039,7 +4037,7 @@ class Bt {
4039
4037
  }), this.ctx.scrollerFocus = this.isFocus;
4040
4038
  }
4041
4039
  }
4042
- class Ae {
4040
+ class Me {
4043
4041
  // 垂直滚动定时器
4044
4042
  constructor(t) {
4045
4043
  n(this, "ctx");
@@ -4052,7 +4050,7 @@ class Ae {
4052
4050
  n(this, "timerX", 0);
4053
4051
  // 水平滚动定时器
4054
4052
  n(this, "timerY", 0);
4055
- this.ctx = t, this.verticalScrollbar = new Bt(t, "vertical"), this.horizontalScrollbar = new Bt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
4053
+ this.ctx = t, this.verticalScrollbar = new Xt(t, "vertical"), this.horizontalScrollbar = new Xt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
4056
4054
  this.onTouchstart(e);
4057
4055
  }), this.ctx.on("setScroll", (e, i) => {
4058
4056
  this.setScroll(e, i);
@@ -4149,7 +4147,7 @@ class Ae {
4149
4147
  t && (this.adjustPositionX = "", this.timerX && (clearInterval(this.timerX), this.timerX = 0)), e && (this.adjustPositionY = "", this.timerY && (clearInterval(this.timerY), this.timerY = 0));
4150
4148
  }
4151
4149
  }
4152
- class He {
4150
+ class Ae {
4153
4151
  constructor(t, e) {
4154
4152
  n(this, "root");
4155
4153
  n(this, "key");
@@ -4189,7 +4187,7 @@ class He {
4189
4187
  return null;
4190
4188
  }
4191
4189
  }
4192
- class De {
4190
+ class He {
4193
4191
  constructor(t) {
4194
4192
  n(this, "ctx");
4195
4193
  // 上下文
@@ -4244,13 +4242,13 @@ class De {
4244
4242
  const {
4245
4243
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
4246
4244
  } = this.ctx, i = this.ctx.database.getColumns();
4247
- this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleHeight = this.height, this.visibleColumns = Gt(i);
4245
+ this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleHeight = this.height, this.visibleColumns = $t(i);
4248
4246
  const s = rt(this.visibleColumns), o = Q(this.visibleColumns);
4249
4247
  this.height = t * s, this.width = o.reduce((f, x) => {
4250
4248
  const u = x.width || 100, { maxWidth: w, minWidth: m } = x;
4251
4249
  return w && u > w ? f + w : m && u < m ? f + m : f + u;
4252
4250
  }, 0), this.columnIndex = 0, this.resizeNum = 0;
4253
- const r = xe(nt(this.visibleColumns, s));
4251
+ const r = ue(nt(this.visibleColumns, s));
4254
4252
  this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
4255
4253
  const a = this.ctx.containerElement.getBoundingClientRect();
4256
4254
  this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(a.width) : this.ctx.stageWidth = Math.min(
@@ -4315,7 +4313,7 @@ class De {
4315
4313
  if (this.dragingCell && this.dragTarget) {
4316
4314
  const t = (c, d = {}) => (c.forEach((f, x) => {
4317
4315
  f.children && t(f.children, d), d[f.key] = x;
4318
- }), d), e = this.ctx.database.getColumns(), i = nt(e, rt(e)), s = new He(at(i), {
4316
+ }), d), e = this.ctx.database.getColumns(), i = nt(e, rt(e)), s = new Ae(i, {
4319
4317
  key: "key",
4320
4318
  // 节点唯一标识字段(对应我们之前的field)
4321
4319
  childrenKey: "children"
@@ -4323,7 +4321,7 @@ class De {
4323
4321
  }), o = this.dragTarget.colIndex > this.dragingCell.colIndex ? "before" : "after";
4324
4322
  s.treeMove(this.dragTarget.column, this.dragingCell.column, o);
4325
4323
  const r = s.getTree(), a = t(r);
4326
- this.ctx.database.setCustomHeader({ sortData: a }), this.ctx.database.init(!1), this.init();
4324
+ this.ctx.database.setCustomHeader({ sortData: a }), this.init();
4327
4325
  const l = {
4328
4326
  source: this.dragTarget,
4329
4327
  target: this.dragingCell,
@@ -4381,7 +4379,7 @@ class De {
4381
4379
  width: o,
4382
4380
  column: t.column,
4383
4381
  columns: this.columns
4384
- }), this.ctx.database.setCustomHeaderResizableData(t.key, o), this.ctx.database.init(!1), this.init(), this.ctx.emit("draw");
4382
+ }), this.ctx.database.setCustomHeaderResizableData(t.key, o), this.init(), this.ctx.emit("draw");
4385
4383
  }
4386
4384
  resizeAllColumn(t) {
4387
4385
  if (t === 0) return;
@@ -4421,7 +4419,7 @@ class De {
4421
4419
  const a = t[r], l = o * (a.rowspan || 0), c = o * (a.level || 0);
4422
4420
  let { minWidth: d, maxWidth: f } = a, x = a.width || 100;
4423
4421
  d && x < d && (x = d), f && x > f && (x = f), a.children && (x = Q(a.children).reduce((m, g) => m + ((g == null ? void 0 : g.width) || 100), 0));
4424
- const u = new Et(this.ctx, this.columnIndex, s, c, x, l, a);
4422
+ const u = new mt(this.ctx, this.columnIndex, s, c, x, l, a);
4425
4423
  this.ctx.database.setHeader(a.key, u), this.allCellHeaders.push(u), a.children || (this.leafCellHeaders.push(u), u.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(u) : a.fixed === "right" ? this.fixedRightCellHeaders.push(u) : this.centerCellHeaders.push(u), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += x;
4426
4424
  }
4427
4425
  }
@@ -4429,22 +4427,28 @@ class De {
4429
4427
  if (this.isResizing && this.resizeTarget) {
4430
4428
  const {
4431
4429
  stageHeight: t,
4432
- config: { RESIZE_COLUMN_LINE_COLOR: e, RESIZE_COLUMN_TEXT_COLOR: i, RESIZE_COLUMN_TEXT_BG_COLOR: s }
4433
- } = this.ctx, o = this.resizeTarget.getDrawX(), r = this.resizeTarget.width, a = o + r + this.resizeDiff - 0.5, l = [a - 0.5, 0, a - 0.5, t];
4434
- this.ctx.paint.drawLine(l, {
4430
+ config: {
4431
+ RESIZE_COLUMN_LINE_COLOR: e,
4432
+ RESIZE_COLUMN_TEXT_COLOR: i,
4433
+ RESIZE_COLUMN_TEXT_BG_COLOR: s,
4434
+ ENABLE_RESIZE_COLUMN_TEXT: o
4435
+ }
4436
+ } = this.ctx, r = this.resizeTarget.getDrawX(), a = this.resizeTarget.width, l = r + a + this.resizeDiff - 0.5, c = [l - 0.5, 0, l - 0.5, t];
4437
+ if (this.ctx.paint.drawLine(c, {
4435
4438
  borderColor: e
4436
- });
4437
- const d = `${Math.floor(r + this.resizeDiff)}px`, f = 45, x = 24;
4438
- this.ctx.paint.drawRect(a + f / 2, this.ctx.mouseY - x / 2, f, x, {
4439
- fillColor: s,
4440
- borderWidth: 0,
4441
- borderColor: "transparent"
4442
- }), this.ctx.paint.drawText(d, a + f / 2, this.ctx.mouseY - x / 2, f, x + 2, {
4443
- padding: 0,
4444
- color: i,
4445
- align: "center",
4446
- verticalAlign: "middle"
4447
- });
4439
+ }), o) {
4440
+ const f = `${Math.floor(a + this.resizeDiff)}px`, x = 45, u = 24;
4441
+ this.ctx.paint.drawRect(l + x / 2, this.ctx.mouseY - u / 2, x, u, {
4442
+ fillColor: s,
4443
+ borderWidth: 0,
4444
+ borderColor: "transparent"
4445
+ }), this.ctx.paint.drawText(f, l + x / 2, this.ctx.mouseY - u / 2, x, u + 2, {
4446
+ padding: 0,
4447
+ color: i,
4448
+ align: "center",
4449
+ verticalAlign: "middle"
4450
+ });
4451
+ }
4448
4452
  }
4449
4453
  }
4450
4454
  drawDragTip() {
@@ -4534,7 +4538,7 @@ class De {
4534
4538
  }), this.drawBottomLine(), this.drawTipLine(), this.drawDragTip();
4535
4539
  }
4536
4540
  }
4537
- class Jt {
4541
+ class Zt {
4538
4542
  constructor(t, e, i = 0, s = 0, o = 0, r = 0, a, l = "body") {
4539
4543
  n(this, "ctx");
4540
4544
  n(this, "x", 0);
@@ -4555,7 +4559,7 @@ class Jt {
4555
4559
  update() {
4556
4560
  const { header: t } = this.ctx, e = [], i = [], s = [], o = [];
4557
4561
  t.renderLeafCellHeaders.forEach((r) => {
4558
- const a = new It(
4562
+ const a = new bt(
4559
4563
  this.ctx,
4560
4564
  this.rowIndex,
4561
4565
  r.colIndex,
@@ -4595,7 +4599,7 @@ class Jt {
4595
4599
  });
4596
4600
  }
4597
4601
  }
4598
- class Ne {
4602
+ class De {
4599
4603
  constructor(t) {
4600
4604
  n(this, "resizeTarget", null);
4601
4605
  //调整行大小的目标
@@ -4649,9 +4653,9 @@ class Ne {
4649
4653
  let g = this.height + e.height + r;
4650
4654
  g += m;
4651
4655
  let E = g;
4652
- const C = window.innerHeight, { top: p } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4653
- if (C > p && d && !a) {
4654
- const O = C - p - f;
4656
+ const p = window.innerHeight, { top: C } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4657
+ if (p > C && d && !a) {
4658
+ const O = p - C - f;
4655
4659
  O > e.height + r ? E = O : g > c && (E = c);
4656
4660
  } else this.data.length && a ? E = a : this.data.length && c && g > c && (E = c);
4657
4661
  E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
@@ -4794,7 +4798,7 @@ class Ne {
4794
4798
  this.headIndex = Math.max(0, l), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 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;
4795
4799
  const d = [];
4796
4800
  for (let f = 0; f < this.visibleRows.length; f++) {
4797
- const x = this.headIndex + f, u = this.visibleRows[f], { height: w, top: m } = this.ctx.database.getPositionForRowIndex(x), g = new Jt(this.ctx, x, 0, m + this.y, t.width, w, u);
4801
+ const x = this.headIndex + f, u = this.visibleRows[f], { height: w, top: m } = this.ctx.database.getPositionForRowIndex(x), g = new Zt(this.ctx, x, 0, m + this.y, t.width, w, u);
4798
4802
  d.push(g);
4799
4803
  }
4800
4804
  this.renderRows = d, this.ctx.body.renderRows = d;
@@ -4824,7 +4828,7 @@ class Ne {
4824
4828
  }), this.drawTipLine();
4825
4829
  }
4826
4830
  }
4827
- class ke {
4831
+ class Ne {
4828
4832
  constructor(t) {
4829
4833
  n(this, "ctx");
4830
4834
  n(this, "renderRows", []);
@@ -4879,7 +4883,7 @@ class ke {
4879
4883
  let e = this.y;
4880
4884
  const i = [];
4881
4885
  this.data.forEach((s, o) => {
4882
- const r = new Jt(this.ctx, o, 0, e, this.width, t, s, "footer");
4886
+ const r = new Zt(this.ctx, o, 0, e, this.width, t, s, "footer");
4883
4887
  e += t, i.push(r);
4884
4888
  }), this.renderRows = i, this.ctx.footer.renderRows = this.renderRows;
4885
4889
  }
@@ -4905,7 +4909,7 @@ class ke {
4905
4909
  }), this.drawTopLine();
4906
4910
  }
4907
4911
  }
4908
- class Xe {
4912
+ class ke {
4909
4913
  constructor(t) {
4910
4914
  n(this, "isCut", !1);
4911
4915
  n(this, "isMultipleRow", !1);
@@ -5025,14 +5029,14 @@ class Xe {
5025
5029
  SELECTOR_AREA_MAX_X_OFFSET: f,
5026
5030
  SELECTOR_AREA_MAX_Y_OFFSET: x
5027
5031
  } = this.ctx.config, u = a, w = l || this.ctx.maxColIndex - f, m = c, g = d || this.ctx.maxRowIndex - x;
5028
- let [E, C] = o, [p, b] = r;
5029
- if (E < u || C > w || p < m || b > g)
5032
+ let [E, p] = o, [C, b] = r;
5033
+ if (E < u || p > w || C < m || b > g)
5030
5034
  return;
5031
5035
  if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
5032
5036
  const v = this.adjustMergeCells(o, r);
5033
- p = v.yArr[0], b = v.yArr[1], E = v.xArr[0], C = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
5037
+ C = v.yArr[0], b = v.yArr[1], E = v.xArr[0], p = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
5034
5038
  }
5035
- E === C && p === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(w, C)], r = [Math.max(m, p), Math.min(g, b)];
5039
+ E === p && C === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(w, p)], r = [Math.max(m, C), Math.min(g, b)];
5036
5040
  const { BEFORE_SET_SELECTOR_METHOD: y } = this.ctx.config;
5037
5041
  if (typeof y == "function") {
5038
5042
  const _ = y({
@@ -5044,7 +5048,7 @@ class Xe {
5044
5048
  return;
5045
5049
  o = _.xArr, r = _.yArr;
5046
5050
  }
5047
- this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && p === 0 ? this.ctx.selectColsIng = !0 : this.ctx.selectColsIng = !1, C === this.ctx.maxColIndex && E === 0 ? this.ctx.selectRowsIng = !0 : this.ctx.selectRowsIng = !1, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
5051
+ this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && C === 0 ? this.ctx.selectColsIng = !0 : this.ctx.selectColsIng = !1, p === this.ctx.maxColIndex && E === 0 ? this.ctx.selectRowsIng = !0 : this.ctx.selectRowsIng = !1, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
5048
5052
  }
5049
5053
  }
5050
5054
  adjustMergeCells(t, e) {
@@ -5059,13 +5063,13 @@ class Xe {
5059
5063
  let a = [], l = [];
5060
5064
  for (let m = 0; m <= e[1] - e[0]; m++)
5061
5065
  for (let g = 0; g <= t[1] - t[0]; g++) {
5062
- const E = m + e[0], C = g + t[0], p = this.ctx.database.getVirtualBodyCell(E, C);
5063
- p && ((E === i || E === s) && a.push(p), (C === o || C === r) && l.push(p));
5066
+ const E = m + e[0], p = g + t[0], C = this.ctx.database.getVirtualBodyCell(E, p);
5067
+ C && ((E === i || E === s) && a.push(C), (p === o || p === r) && l.push(C));
5064
5068
  }
5065
5069
  const c = a.reduce(
5066
5070
  (m, g) => {
5067
- const { yArr: E } = g.getSpanInfo(), [C, p] = E;
5068
- return m.minY = Math.min(m.minY, C), m.maxY = Math.max(m.maxY, p), m;
5071
+ const { yArr: E } = g.getSpanInfo(), [p, C] = E;
5072
+ return m.minY = Math.min(m.minY, p), m.maxY = Math.max(m.maxY, C), m;
5069
5073
  },
5070
5074
  {
5071
5075
  minY: i,
@@ -5073,8 +5077,8 @@ class Xe {
5073
5077
  }
5074
5078
  ), d = l.reduce(
5075
5079
  (m, g) => {
5076
- const { xArr: E } = g.getSpanInfo(), [C, p] = E;
5077
- return m.minX = Math.min(m.minX, C), m.maxX = Math.max(m.maxX, p), m;
5080
+ const { xArr: E } = g.getSpanInfo(), [p, C] = E;
5081
+ return m.minX = Math.min(m.minX, p), m.maxX = Math.max(m.maxX, C), m;
5078
5082
  },
5079
5083
  {
5080
5084
  minX: o,
@@ -5211,7 +5215,7 @@ class Xe {
5211
5215
  return;
5212
5216
  t = a.data;
5213
5217
  }
5214
- const o = me(t);
5218
+ const o = we(t);
5215
5219
  navigator.clipboard ? navigator.clipboard.writeText(o).then(() => {
5216
5220
  this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
5217
5221
  xArr: this.ctx.selector.xArrCopy,
@@ -5256,7 +5260,7 @@ class Xe {
5256
5260
  if (this.ctx.selector.enable && t) {
5257
5261
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
5258
5262
  navigator.clipboard.readText().then(async (o) => {
5259
- let r = we(o);
5263
+ let r = ge(o);
5260
5264
  const a = [i, i + r[0].length - 1], l = [e, e + r.length - 1], [c, d] = l, [f, x] = a, u = d - this.ctx.maxRowIndex, w = x - this.ctx.maxColIndex;
5261
5265
  (u > 0 || w > 0) && this.ctx.emit("onPastedDataOverflow", {
5262
5266
  maxY: d,
@@ -5269,18 +5273,18 @@ class Xe {
5269
5273
  });
5270
5274
  const m = r.length === 1 && r[0].length === 1;
5271
5275
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !m) {
5272
- const p = {
5276
+ const C = {
5273
5277
  code: "ERR_MERGED_CELLS_PASTE",
5274
5278
  message: "Merged cells cannot span paste data"
5275
5279
  };
5276
- this.ctx.hasEvent("error") ? this.ctx.emit("error", p) : alert(p.message);
5280
+ this.ctx.hasEvent("error") ? this.ctx.emit("error", C) : alert(C.message);
5277
5281
  return;
5278
5282
  }
5279
5283
  let g = [];
5280
- for (let p = 0; p <= r.length - 1; p++) {
5281
- const b = r[p].length;
5284
+ for (let C = 0; C <= r.length - 1; C++) {
5285
+ const b = r[C].length;
5282
5286
  for (let y = 0; y <= b - 1; y++) {
5283
- const v = p + e, _ = y + i, S = r[p][y], I = this.ctx.database.getItemValueForRowIndexAndColIndex(
5287
+ const v = C + e, _ = y + i, S = r[C][y], I = this.ctx.database.getItemValueForRowIndexAndColIndex(
5284
5288
  v,
5285
5289
  _
5286
5290
  );
@@ -5297,13 +5301,13 @@ class Xe {
5297
5301
  }
5298
5302
  }
5299
5303
  if (this.isCut) {
5300
- const p = this.clearSelectedData(
5304
+ const C = this.clearSelectedData(
5301
5305
  this.ctx.selector.xArrCopy,
5302
5306
  this.ctx.selector.yArrCopy,
5303
5307
  !0
5304
5308
  // 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
5305
5309
  ), b = g.map((y) => `${y.rowKey}-${y.key}`);
5306
- p.forEach((y) => {
5310
+ C.forEach((y) => {
5307
5311
  b.includes(`${y.rowKey}-${y.key}`) || g.unshift(y);
5308
5312
  }), this.isCut = !1;
5309
5313
  }
@@ -5311,21 +5315,21 @@ class Xe {
5311
5315
  return;
5312
5316
  const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
5313
5317
  if (typeof E == "function") {
5314
- const p = E, b = g.map((y) => ({
5318
+ const C = E, b = g.map((y) => ({
5315
5319
  rowKey: y.rowKey,
5316
5320
  key: y.key,
5317
5321
  value: y.value,
5318
5322
  oldValue: this.ctx.database.getItemValue(y.rowKey, y.key),
5319
5323
  row: this.ctx.database.getRowDataItemForRowKey(y.rowKey)
5320
5324
  }));
5321
- if (g = await p(b, a, l, r), g && !g.length)
5325
+ if (g = await C(b, a, l, r), g && !g.length)
5322
5326
  return;
5323
5327
  }
5324
5328
  this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(g, !0);
5325
- let C = [];
5326
- s.forEach((p) => {
5327
- C.push(this.ctx.database.getRowDataItemForRowKey(p));
5328
- }), this.ctx.emit("pasteChange", g, C), this.ctx.emit("draw");
5329
+ let p = [];
5330
+ s.forEach((C) => {
5331
+ p.push(this.ctx.database.getRowDataItemForRowKey(C));
5332
+ }), this.ctx.emit("pasteChange", g, p), this.ctx.emit("draw");
5329
5333
  }).catch((o) => {
5330
5334
  console.error("Failed to get the clipboard content:", o);
5331
5335
  });
@@ -5391,19 +5395,19 @@ class Xe {
5391
5395
  if (!i)
5392
5396
  return;
5393
5397
  w && this.ctx.onlyMergeCell && i.updateSpanInfo();
5394
- const { drawX: m, drawY: g, width: E, height: C, fixed: p } = i, b = o - m + 1, y = i.drawX + E - (e - s) + 1;
5395
- let v = r.height - g, _ = C;
5398
+ const { drawX: m, drawY: g, width: E, height: p, fixed: C } = i, b = o - m + 1, y = i.drawX + E - (e - s) + 1;
5399
+ let v = r.height - g, _ = p;
5396
5400
  _ > l.visibleHeight && (_ = l.visibleHeight);
5397
5401
  let S = 0;
5398
5402
  x && (u === "top" ? v = r.height + a.height - g : S = a.visibleHeight);
5399
5403
  const I = g + _ - (t - S - f);
5400
5404
  let R = c, T = d;
5401
- y > 0 && !p ? R = Math.floor(c + y) : b > 0 && !p && (R = Math.floor(c - b)), v > 0 ? T = Math.floor(d - v) : I > 0 && (T = Math.floor(d + I)), (Math.abs(c - R) > 2 || Math.abs(d - T) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(R, T), this.ctx.emit("adjustBoundaryPosition", i));
5405
+ y > 0 && !C ? R = Math.floor(c + y) : b > 0 && !C && (R = Math.floor(c - b)), v > 0 ? T = Math.floor(d - v) : I > 0 && (T = Math.floor(d + I)), (Math.abs(c - R) > 2 || Math.abs(d - T) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(R, T), this.ctx.emit("adjustBoundaryPosition", i));
5402
5406
  }
5403
5407
  destroy() {
5404
5408
  }
5405
5409
  }
5406
- class Be {
5410
+ class Xe {
5407
5411
  constructor(t) {
5408
5412
  n(this, "ctx");
5409
5413
  n(this, "maxColRowCell");
@@ -5462,10 +5466,10 @@ class Be {
5462
5466
  SELECTOR_AREA_MAX_X_OFFSET: x,
5463
5467
  SELECTOR_AREA_MAX_Y_OFFSET: u
5464
5468
  } = this.ctx.config, w = l, m = c || this.ctx.maxColIndex - x, g = d, E = f || this.ctx.maxRowIndex - u;
5465
- let [C, p] = r, [b, y] = a;
5466
- if (C < w || b < g)
5469
+ let [p, C] = r, [b, y] = a;
5470
+ if (p < w || b < g)
5467
5471
  return;
5468
- r = [Math.max(w, C), Math.min(m, p)], a = [Math.max(g, b), Math.min(E, y)];
5472
+ r = [Math.max(w, p), Math.min(m, C)], a = [Math.max(g, b), Math.min(E, y)];
5469
5473
  const { BEFORE_SET_AUTOFILL_METHOD: v } = this.ctx.config;
5470
5474
  if (typeof v == "function") {
5471
5475
  const S = v({
@@ -5502,9 +5506,9 @@ class Be {
5502
5506
  let d = [];
5503
5507
  for (let u = 0; u <= l[1] - l[0]; u++)
5504
5508
  for (let w = 0; w <= a[1] - a[0]; w++) {
5505
- const m = w + a[0], g = u + l[0], E = s[u % r][w % o], C = this.ctx.database.getItemValueForRowIndexAndColIndex(g, m), p = `${g}-${m}`;
5506
- if (C && !i.has(p)) {
5507
- const { rowKey: b, key: y } = C;
5509
+ const m = w + a[0], g = u + l[0], E = s[u % r][w % o], p = this.ctx.database.getItemValueForRowIndexAndColIndex(g, m), C = `${g}-${m}`;
5510
+ if (p && !i.has(C)) {
5511
+ const { rowKey: b, key: y } = p;
5508
5512
  this.ctx.database.getReadonly(b, y) || (t.add(b), d.push({
5509
5513
  rowKey: b,
5510
5514
  key: y,
@@ -5546,20 +5550,20 @@ class Be {
5546
5550
  destroy() {
5547
5551
  }
5548
5552
  }
5549
- const q = Math.min, z = Math.max, lt = Math.round, ot = Math.floor, Y = (h) => ({
5553
+ const j = Math.min, z = Math.max, at = Math.round, ot = Math.floor, Y = (h) => ({
5550
5554
  x: h,
5551
5555
  y: h
5552
- }), Ye = {
5556
+ }), Be = {
5553
5557
  left: "right",
5554
5558
  right: "left",
5555
5559
  bottom: "top",
5556
5560
  top: "bottom"
5557
- }, Ke = {
5561
+ }, Ye = {
5558
5562
  start: "end",
5559
5563
  end: "start"
5560
5564
  };
5561
- function pt(h, t, e) {
5562
- return z(h, q(t, e));
5565
+ function Et(h, t, e) {
5566
+ return z(h, j(t, e));
5563
5567
  }
5564
5568
  function et(h, t) {
5565
5569
  return typeof h == "function" ? h(t) : h;
@@ -5570,54 +5574,54 @@ function $(h) {
5570
5574
  function it(h) {
5571
5575
  return h.split("-")[1];
5572
5576
  }
5573
- function Qt(h) {
5577
+ function Jt(h) {
5574
5578
  return h === "x" ? "y" : "x";
5575
5579
  }
5576
- function vt(h) {
5580
+ function Rt(h) {
5577
5581
  return h === "y" ? "height" : "width";
5578
5582
  }
5579
- const Fe = /* @__PURE__ */ new Set(["top", "bottom"]);
5583
+ const Ke = /* @__PURE__ */ new Set(["top", "bottom"]);
5580
5584
  function V(h) {
5581
- return Fe.has($(h)) ? "y" : "x";
5585
+ return Ke.has($(h)) ? "y" : "x";
5582
5586
  }
5583
- function _t(h) {
5584
- return Qt(V(h));
5587
+ function vt(h) {
5588
+ return Jt(V(h));
5585
5589
  }
5586
- function We(h, t, e) {
5590
+ function Fe(h, t, e) {
5587
5591
  e === void 0 && (e = !1);
5588
- const i = it(h), s = _t(h), o = vt(s);
5592
+ const i = it(h), s = vt(h), o = Rt(s);
5589
5593
  let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
5590
- return t.reference[o] > t.floating[o] && (r = ct(r)), [r, ct(r)];
5594
+ return t.reference[o] > t.floating[o] && (r = lt(r)), [r, lt(r)];
5591
5595
  }
5592
- function Ve(h) {
5593
- const t = ct(h);
5594
- return [Ct(h), t, Ct(t)];
5596
+ function We(h) {
5597
+ const t = lt(h);
5598
+ return [pt(h), t, pt(t)];
5595
5599
  }
5596
- function Ct(h) {
5597
- return h.replace(/start|end/g, (t) => Ke[t]);
5600
+ function pt(h) {
5601
+ return h.replace(/start|end/g, (t) => Ye[t]);
5598
5602
  }
5599
- const Yt = ["left", "right"], Kt = ["right", "left"], Pe = ["top", "bottom"], ze = ["bottom", "top"];
5600
- function $e(h, t, e) {
5603
+ const Bt = ["left", "right"], Yt = ["right", "left"], Ve = ["top", "bottom"], Pe = ["bottom", "top"];
5604
+ function ze(h, t, e) {
5601
5605
  switch (h) {
5602
5606
  case "top":
5603
5607
  case "bottom":
5604
- return e ? t ? Kt : Yt : t ? Yt : Kt;
5608
+ return e ? t ? Yt : Bt : t ? Bt : Yt;
5605
5609
  case "left":
5606
5610
  case "right":
5607
- return t ? Pe : ze;
5611
+ return t ? Ve : Pe;
5608
5612
  default:
5609
5613
  return [];
5610
5614
  }
5611
5615
  }
5612
- function Ge(h, t, e, i) {
5616
+ function $e(h, t, e, i) {
5613
5617
  const s = it(h);
5614
- let o = $e($(h), e === "start", i);
5615
- return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(Ct)))), o;
5618
+ let o = ze($(h), e === "start", i);
5619
+ return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(pt)))), o;
5616
5620
  }
5617
- function ct(h) {
5618
- return h.replace(/left|right|bottom|top/g, (t) => Ye[t]);
5621
+ function lt(h) {
5622
+ return h.replace(/left|right|bottom|top/g, (t) => Be[t]);
5619
5623
  }
5620
- function Ue(h) {
5624
+ function Ge(h) {
5621
5625
  return {
5622
5626
  top: 0,
5623
5627
  right: 0,
@@ -5626,15 +5630,15 @@ function Ue(h) {
5626
5630
  ...h
5627
5631
  };
5628
5632
  }
5629
- function te(h) {
5630
- return typeof h != "number" ? Ue(h) : {
5633
+ function Qt(h) {
5634
+ return typeof h != "number" ? Ge(h) : {
5631
5635
  top: h,
5632
5636
  right: h,
5633
5637
  bottom: h,
5634
5638
  left: h
5635
5639
  };
5636
5640
  }
5637
- function ht(h) {
5641
+ function ct(h) {
5638
5642
  const {
5639
5643
  x: t,
5640
5644
  y: e,
@@ -5652,12 +5656,12 @@ function ht(h) {
5652
5656
  y: e
5653
5657
  };
5654
5658
  }
5655
- function Ft(h, t, e) {
5659
+ function Kt(h, t, e) {
5656
5660
  let {
5657
5661
  reference: i,
5658
5662
  floating: s
5659
5663
  } = h;
5660
- const o = V(t), r = _t(t), a = vt(r), l = $(t), c = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
5664
+ const o = V(t), r = vt(t), a = Rt(r), l = $(t), c = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
5661
5665
  let u;
5662
5666
  switch (l) {
5663
5667
  case "top":
@@ -5700,7 +5704,7 @@ function Ft(h, t, e) {
5700
5704
  }
5701
5705
  return u;
5702
5706
  }
5703
- const qe = async (h, t, e) => {
5707
+ const Ue = async (h, t, e) => {
5704
5708
  const {
5705
5709
  placement: i = "bottom",
5706
5710
  strategy: s = "absolute",
@@ -5714,14 +5718,14 @@ const qe = async (h, t, e) => {
5714
5718
  }), {
5715
5719
  x: d,
5716
5720
  y: f
5717
- } = Ft(c, i, l), x = i, u = {}, w = 0;
5721
+ } = Kt(c, i, l), x = i, u = {}, w = 0;
5718
5722
  for (let m = 0; m < a.length; m++) {
5719
5723
  const {
5720
5724
  name: g,
5721
5725
  fn: E
5722
5726
  } = a[m], {
5723
- x: C,
5724
- y: p,
5727
+ x: p,
5728
+ y: C,
5725
5729
  data: b,
5726
5730
  reset: y
5727
5731
  } = await E({
@@ -5738,7 +5742,7 @@ const qe = async (h, t, e) => {
5738
5742
  floating: t
5739
5743
  }
5740
5744
  });
5741
- d = C ?? d, f = p ?? f, u = {
5745
+ d = p ?? d, f = C ?? f, u = {
5742
5746
  ...u,
5743
5747
  [g]: {
5744
5748
  ...u[g],
@@ -5751,7 +5755,7 @@ const qe = async (h, t, e) => {
5751
5755
  }) : y.rects), {
5752
5756
  x: d,
5753
5757
  y: f
5754
- } = Ft(c, x, l)), m = -1);
5758
+ } = Kt(c, x, l)), m = -1);
5755
5759
  }
5756
5760
  return {
5757
5761
  x: d,
@@ -5761,7 +5765,7 @@ const qe = async (h, t, e) => {
5761
5765
  middlewareData: u
5762
5766
  };
5763
5767
  };
5764
- async function ee(h, t) {
5768
+ async function te(h, t) {
5765
5769
  var e;
5766
5770
  t === void 0 && (t = {});
5767
5771
  const {
@@ -5777,28 +5781,28 @@ async function ee(h, t) {
5777
5781
  elementContext: f = "floating",
5778
5782
  altBoundary: x = !1,
5779
5783
  padding: u = 0
5780
- } = et(t, h), w = te(u), g = a[x ? f === "floating" ? "reference" : "floating" : f], E = ht(await o.getClippingRect({
5784
+ } = et(t, h), w = Qt(u), g = a[x ? f === "floating" ? "reference" : "floating" : f], E = ct(await o.getClippingRect({
5781
5785
  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)),
5782
5786
  boundary: c,
5783
5787
  rootBoundary: d,
5784
5788
  strategy: l
5785
- })), C = f === "floating" ? {
5789
+ })), p = f === "floating" ? {
5786
5790
  x: i,
5787
5791
  y: s,
5788
5792
  width: r.floating.width,
5789
5793
  height: r.floating.height
5790
- } : r.reference, p = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), b = await (o.isElement == null ? void 0 : o.isElement(p)) ? await (o.getScale == null ? void 0 : o.getScale(p)) || {
5794
+ } : r.reference, C = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), b = await (o.isElement == null ? void 0 : o.isElement(C)) ? await (o.getScale == null ? void 0 : o.getScale(C)) || {
5791
5795
  x: 1,
5792
5796
  y: 1
5793
5797
  } : {
5794
5798
  x: 1,
5795
5799
  y: 1
5796
- }, y = ht(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5800
+ }, y = ct(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5797
5801
  elements: a,
5798
- rect: C,
5799
- offsetParent: p,
5802
+ rect: p,
5803
+ offsetParent: C,
5800
5804
  strategy: l
5801
- }) : C);
5805
+ }) : p);
5802
5806
  return {
5803
5807
  top: (E.top - y.top + w.top) / b.y,
5804
5808
  bottom: (y.bottom - E.bottom + w.bottom) / b.y,
@@ -5824,13 +5828,13 @@ const je = (h) => ({
5824
5828
  } = et(h, t) || {};
5825
5829
  if (c == null)
5826
5830
  return {};
5827
- const f = te(d), x = {
5831
+ const f = Qt(d), x = {
5828
5832
  x: e,
5829
5833
  y: i
5830
- }, u = _t(s), w = vt(u), m = await r.getDimensions(c), g = u === "y", E = g ? "top" : "left", C = g ? "bottom" : "right", p = g ? "clientHeight" : "clientWidth", b = o.reference[w] + o.reference[u] - x[u] - o.floating[w], y = x[u] - o.reference[u], v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
5831
- let _ = v ? v[p] : 0;
5832
- (!_ || !await (r.isElement == null ? void 0 : r.isElement(v))) && (_ = a.floating[p] || o.floating[w]);
5833
- const S = b / 2 - y / 2, I = _ / 2 - m[w] / 2 - 1, R = q(f[E], I), T = q(f[C], I), O = R, M = _ - m[w] - T, L = _ / 2 - m[w] / 2 + S, A = pt(O, L, M), D = !l.arrow && it(s) != null && L !== A && o.reference[w] / 2 - (L < O ? R : T) - m[w] / 2 < 0, H = D ? L < O ? L - O : L - M : 0;
5834
+ }, u = vt(s), w = Rt(u), m = await r.getDimensions(c), g = u === "y", E = g ? "top" : "left", p = g ? "bottom" : "right", C = g ? "clientHeight" : "clientWidth", b = o.reference[w] + o.reference[u] - x[u] - o.floating[w], y = x[u] - o.reference[u], v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
5835
+ let _ = v ? v[C] : 0;
5836
+ (!_ || !await (r.isElement == null ? void 0 : r.isElement(v))) && (_ = a.floating[C] || o.floating[w]);
5837
+ const S = b / 2 - y / 2, I = _ / 2 - m[w] / 2 - 1, R = j(f[E], I), T = j(f[p], I), O = R, M = _ - m[w] - T, L = _ / 2 - m[w] / 2 + S, A = Et(O, L, M), D = !l.arrow && it(s) != null && L !== A && o.reference[w] / 2 - (L < O ? R : T) - m[w] / 2 < 0, H = D ? L < O ? L - O : L - M : 0;
5834
5838
  return {
5835
5839
  [u]: x[u] + H,
5836
5840
  data: {
@@ -5843,7 +5847,7 @@ const je = (h) => ({
5843
5847
  reset: D
5844
5848
  };
5845
5849
  }
5846
- }), Ze = function(h) {
5850
+ }), qe = function(h) {
5847
5851
  return h === void 0 && (h = {}), {
5848
5852
  name: "flip",
5849
5853
  options: h,
@@ -5867,12 +5871,12 @@ const je = (h) => ({
5867
5871
  } = et(h, t);
5868
5872
  if ((e = o.arrow) != null && e.alignmentOffset)
5869
5873
  return {};
5870
- const E = $(s), C = V(a), p = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = x || (p || !m ? [ct(a)] : Ve(a)), v = w !== "none";
5871
- !x && v && y.push(...Ge(a, m, w, b));
5872
- const _ = [a, ...y], S = await ee(t, g), I = [];
5874
+ const E = $(s), p = V(a), C = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = x || (C || !m ? [lt(a)] : We(a)), v = w !== "none";
5875
+ !x && v && y.push(...$e(a, m, w, b));
5876
+ const _ = [a, ...y], S = await te(t, g), I = [];
5873
5877
  let R = ((i = o.flip) == null ? void 0 : i.overflows) || [];
5874
5878
  if (d && I.push(S[E]), f) {
5875
- const L = We(s, r, b);
5879
+ const L = Fe(s, r, b);
5876
5880
  I.push(S[L[0]], S[L[1]]);
5877
5881
  }
5878
5882
  if (R = [...R, {
@@ -5881,9 +5885,9 @@ const je = (h) => ({
5881
5885
  }], !I.every((L) => L <= 0)) {
5882
5886
  var T, O;
5883
5887
  const L = (((T = o.flip) == null ? void 0 : T.index) || 0) + 1, A = _[L];
5884
- if (A && (!(f === "alignment" ? C !== V(A) : !1) || // We leave the current main axis only if every placement on that axis
5888
+ if (A && (!(f === "alignment" ? p !== V(A) : !1) || // We leave the current main axis only if every placement on that axis
5885
5889
  // overflows the main axis.
5886
- R.every((k) => V(k.placement) === C ? k.overflows[0] > 0 : !0)))
5890
+ R.every((k) => V(k.placement) === p ? k.overflows[0] > 0 : !0)))
5887
5891
  return {
5888
5892
  data: {
5889
5893
  index: L,
@@ -5901,12 +5905,12 @@ const je = (h) => ({
5901
5905
  const H = (M = R.filter((k) => {
5902
5906
  if (v) {
5903
5907
  const W = V(k.placement);
5904
- return W === C || // Create a bias to the `y` side axis due to horizontal
5908
+ return W === p || // Create a bias to the `y` side axis due to horizontal
5905
5909
  // reading directions favoring greater width.
5906
5910
  W === "y";
5907
5911
  }
5908
5912
  return !0;
5909
- }).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, he) => W + he, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : M[0];
5913
+ }).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, ce) => W + ce, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : M[0];
5910
5914
  H && (D = H);
5911
5915
  break;
5912
5916
  }
@@ -5924,13 +5928,13 @@ const je = (h) => ({
5924
5928
  return {};
5925
5929
  }
5926
5930
  };
5927
- }, Je = /* @__PURE__ */ new Set(["left", "top"]);
5928
- async function Qe(h, t) {
5931
+ }, Ze = /* @__PURE__ */ new Set(["left", "top"]);
5932
+ async function Je(h, t) {
5929
5933
  const {
5930
5934
  placement: e,
5931
5935
  platform: i,
5932
5936
  elements: s
5933
- } = h, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = $(e), a = it(e), l = V(e) === "y", c = Je.has(r) ? -1 : 1, d = o && l ? -1 : 1, f = et(t, h);
5937
+ } = h, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = $(e), a = it(e), l = V(e) === "y", c = Ze.has(r) ? -1 : 1, d = o && l ? -1 : 1, f = et(t, h);
5934
5938
  let {
5935
5939
  mainAxis: x,
5936
5940
  crossAxis: u,
@@ -5952,7 +5956,7 @@ async function Qe(h, t) {
5952
5956
  y: u * d
5953
5957
  };
5954
5958
  }
5955
- const ti = function(h) {
5959
+ const Qe = function(h) {
5956
5960
  return h === void 0 && (h = 0), {
5957
5961
  name: "offset",
5958
5962
  options: h,
@@ -5963,7 +5967,7 @@ const ti = function(h) {
5963
5967
  y: o,
5964
5968
  placement: r,
5965
5969
  middlewareData: a
5966
- } = t, l = await Qe(t, h);
5970
+ } = t, l = await Je(t, h);
5967
5971
  return r === ((e = a.offset) == null ? void 0 : e.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
5968
5972
  x: s + l.x,
5969
5973
  y: o + l.y,
@@ -5974,7 +5978,7 @@ const ti = function(h) {
5974
5978
  };
5975
5979
  }
5976
5980
  };
5977
- }, ei = function(h) {
5981
+ }, ti = function(h) {
5978
5982
  return h === void 0 && (h = {}), {
5979
5983
  name: "shift",
5980
5984
  options: h,
@@ -5990,11 +5994,11 @@ const ti = function(h) {
5990
5994
  fn: (g) => {
5991
5995
  let {
5992
5996
  x: E,
5993
- y: C
5997
+ y: p
5994
5998
  } = g;
5995
5999
  return {
5996
6000
  x: E,
5997
- y: C
6001
+ y: p
5998
6002
  };
5999
6003
  }
6000
6004
  },
@@ -6002,15 +6006,15 @@ const ti = function(h) {
6002
6006
  } = et(h, t), c = {
6003
6007
  x: e,
6004
6008
  y: i
6005
- }, d = await ee(t, l), f = V($(s)), x = Qt(f);
6009
+ }, d = await te(t, l), f = V($(s)), x = Jt(f);
6006
6010
  let u = c[x], w = c[f];
6007
6011
  if (o) {
6008
- const g = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", C = u + d[g], p = u - d[E];
6009
- u = pt(C, u, p);
6012
+ const g = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", p = u + d[g], C = u - d[E];
6013
+ u = Et(p, u, C);
6010
6014
  }
6011
6015
  if (r) {
6012
- const g = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", C = w + d[g], p = w - d[E];
6013
- w = pt(C, w, p);
6016
+ const g = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", p = w + d[g], C = w - d[E];
6017
+ w = Et(p, w, C);
6014
6018
  }
6015
6019
  const m = a.fn({
6016
6020
  ...t,
@@ -6031,11 +6035,11 @@ const ti = function(h) {
6031
6035
  }
6032
6036
  };
6033
6037
  };
6034
- function xt() {
6038
+ function ut() {
6035
6039
  return typeof window < "u";
6036
6040
  }
6037
6041
  function Z(h) {
6038
- return ie(h) ? (h.nodeName || "").toLowerCase() : "#document";
6042
+ return ee(h) ? (h.nodeName || "").toLowerCase() : "#document";
6039
6043
  }
6040
6044
  function N(h) {
6041
6045
  var t;
@@ -6043,21 +6047,21 @@ function N(h) {
6043
6047
  }
6044
6048
  function F(h) {
6045
6049
  var t;
6046
- return (t = (ie(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
6050
+ return (t = (ee(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
6047
6051
  }
6048
- function ie(h) {
6049
- return xt() ? h instanceof Node || h instanceof N(h).Node : !1;
6052
+ function ee(h) {
6053
+ return ut() ? h instanceof Node || h instanceof N(h).Node : !1;
6050
6054
  }
6051
6055
  function X(h) {
6052
- return xt() ? h instanceof Element || h instanceof N(h).Element : !1;
6056
+ return ut() ? h instanceof Element || h instanceof N(h).Element : !1;
6053
6057
  }
6054
6058
  function K(h) {
6055
- return xt() ? h instanceof HTMLElement || h instanceof N(h).HTMLElement : !1;
6059
+ return ut() ? h instanceof HTMLElement || h instanceof N(h).HTMLElement : !1;
6056
6060
  }
6057
- function Wt(h) {
6058
- return !xt() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof N(h).ShadowRoot;
6061
+ function Ft(h) {
6062
+ return !ut() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof N(h).ShadowRoot;
6059
6063
  }
6060
- const ii = /* @__PURE__ */ new Set(["inline", "contents"]);
6064
+ const ei = /* @__PURE__ */ new Set(["inline", "contents"]);
6061
6065
  function st(h) {
6062
6066
  const {
6063
6067
  overflow: t,
@@ -6065,15 +6069,15 @@ function st(h) {
6065
6069
  overflowY: i,
6066
6070
  display: s
6067
6071
  } = B(h);
6068
- return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !ii.has(s);
6072
+ return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !ei.has(s);
6069
6073
  }
6070
- const si = /* @__PURE__ */ new Set(["table", "td", "th"]);
6071
- function oi(h) {
6072
- return si.has(Z(h));
6074
+ const ii = /* @__PURE__ */ new Set(["table", "td", "th"]);
6075
+ function si(h) {
6076
+ return ii.has(Z(h));
6073
6077
  }
6074
- const ri = [":popover-open", ":modal"];
6075
- function gt(h) {
6076
- return ri.some((t) => {
6078
+ const oi = [":popover-open", ":modal"];
6079
+ function xt(h) {
6080
+ return oi.some((t) => {
6077
6081
  try {
6078
6082
  return h.matches(t);
6079
6083
  } catch {
@@ -6081,33 +6085,33 @@ function gt(h) {
6081
6085
  }
6082
6086
  });
6083
6087
  }
6084
- const ni = ["transform", "translate", "scale", "rotate", "perspective"], ai = ["transform", "translate", "scale", "rotate", "perspective", "filter"], li = ["paint", "layout", "strict", "content"];
6085
- function St(h) {
6086
- const t = Tt(), e = X(h) ? B(h) : h;
6087
- return ni.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) || ai.some((i) => (e.willChange || "").includes(i)) || li.some((i) => (e.contain || "").includes(i));
6088
+ const ri = ["transform", "translate", "scale", "rotate", "perspective"], ni = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ai = ["paint", "layout", "strict", "content"];
6089
+ function _t(h) {
6090
+ const t = St(), e = X(h) ? B(h) : h;
6091
+ return ri.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) || ni.some((i) => (e.willChange || "").includes(i)) || ai.some((i) => (e.contain || "").includes(i));
6088
6092
  }
6089
- function ci(h) {
6093
+ function li(h) {
6090
6094
  let t = P(h);
6091
- for (; K(t) && !j(t); ) {
6092
- if (St(t))
6095
+ for (; K(t) && !q(t); ) {
6096
+ if (_t(t))
6093
6097
  return t;
6094
- if (gt(t))
6098
+ if (xt(t))
6095
6099
  return null;
6096
6100
  t = P(t);
6097
6101
  }
6098
6102
  return null;
6099
6103
  }
6100
- function Tt() {
6104
+ function St() {
6101
6105
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
6102
6106
  }
6103
- const hi = /* @__PURE__ */ new Set(["html", "body", "#document"]);
6104
- function j(h) {
6105
- return hi.has(Z(h));
6107
+ const ci = /* @__PURE__ */ new Set(["html", "body", "#document"]);
6108
+ function q(h) {
6109
+ return ci.has(Z(h));
6106
6110
  }
6107
6111
  function B(h) {
6108
6112
  return N(h).getComputedStyle(h);
6109
6113
  }
6110
- function wt(h) {
6114
+ function gt(h) {
6111
6115
  return X(h) ? {
6112
6116
  scrollLeft: h.scrollLeft,
6113
6117
  scrollTop: h.scrollTop
@@ -6123,112 +6127,112 @@ function P(h) {
6123
6127
  // Step into the shadow DOM of the parent of a slotted node.
6124
6128
  h.assignedSlot || // DOM Element detected.
6125
6129
  h.parentNode || // ShadowRoot detected.
6126
- Wt(h) && h.host || // Fallback.
6130
+ Ft(h) && h.host || // Fallback.
6127
6131
  F(h)
6128
6132
  );
6129
- return Wt(t) ? t.host : t;
6133
+ return Ft(t) ? t.host : t;
6130
6134
  }
6131
- function se(h) {
6135
+ function ie(h) {
6132
6136
  const t = P(h);
6133
- return j(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) && st(t) ? t : se(t);
6137
+ return q(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) && st(t) ? t : ie(t);
6134
6138
  }
6135
6139
  function tt(h, t, e) {
6136
6140
  var i;
6137
6141
  t === void 0 && (t = []), e === void 0 && (e = !0);
6138
- const s = se(h), o = s === ((i = h.ownerDocument) == null ? void 0 : i.body), r = N(s);
6142
+ const s = ie(h), o = s === ((i = h.ownerDocument) == null ? void 0 : i.body), r = N(s);
6139
6143
  if (o) {
6140
- const a = yt(r);
6144
+ const a = Ct(r);
6141
6145
  return t.concat(r, r.visualViewport || [], st(s) ? s : [], a && e ? tt(a) : []);
6142
6146
  }
6143
6147
  return t.concat(s, tt(s, [], e));
6144
6148
  }
6145
- function yt(h) {
6149
+ function Ct(h) {
6146
6150
  return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
6147
6151
  }
6148
- function oe(h) {
6152
+ function se(h) {
6149
6153
  const t = B(h);
6150
6154
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
6151
- const s = K(h), o = s ? h.offsetWidth : e, r = s ? h.offsetHeight : i, a = lt(e) !== o || lt(i) !== r;
6155
+ const s = K(h), o = s ? h.offsetWidth : e, r = s ? h.offsetHeight : i, a = at(e) !== o || at(i) !== r;
6152
6156
  return a && (e = o, i = r), {
6153
6157
  width: e,
6154
6158
  height: i,
6155
6159
  $: a
6156
6160
  };
6157
6161
  }
6158
- function Ot(h) {
6162
+ function Tt(h) {
6159
6163
  return X(h) ? h : h.contextElement;
6160
6164
  }
6161
6165
  function U(h) {
6162
- const t = Ot(h);
6166
+ const t = Tt(h);
6163
6167
  if (!K(t))
6164
6168
  return Y(1);
6165
6169
  const e = t.getBoundingClientRect(), {
6166
6170
  width: i,
6167
6171
  height: s,
6168
6172
  $: o
6169
- } = oe(t);
6170
- let r = (o ? lt(e.width) : e.width) / i, a = (o ? lt(e.height) : e.height) / s;
6173
+ } = se(t);
6174
+ let r = (o ? at(e.width) : e.width) / i, a = (o ? at(e.height) : e.height) / s;
6171
6175
  return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
6172
6176
  x: r,
6173
6177
  y: a
6174
6178
  };
6175
6179
  }
6176
- const di = /* @__PURE__ */ Y(0);
6177
- function re(h) {
6180
+ const hi = /* @__PURE__ */ Y(0);
6181
+ function oe(h) {
6178
6182
  const t = N(h);
6179
- return !Tt() || !t.visualViewport ? di : {
6183
+ return !St() || !t.visualViewport ? hi : {
6180
6184
  x: t.visualViewport.offsetLeft,
6181
6185
  y: t.visualViewport.offsetTop
6182
6186
  };
6183
6187
  }
6184
- function fi(h, t, e) {
6188
+ function di(h, t, e) {
6185
6189
  return t === void 0 && (t = !1), !e || t && e !== N(h) ? !1 : t;
6186
6190
  }
6187
6191
  function G(h, t, e, i) {
6188
6192
  t === void 0 && (t = !1), e === void 0 && (e = !1);
6189
- const s = h.getBoundingClientRect(), o = Ot(h);
6193
+ const s = h.getBoundingClientRect(), o = Tt(h);
6190
6194
  let r = Y(1);
6191
6195
  t && (i ? X(i) && (r = U(i)) : r = U(h));
6192
- const a = fi(o, e, i) ? re(o) : Y(0);
6196
+ const a = di(o, e, i) ? oe(o) : Y(0);
6193
6197
  let l = (s.left + a.x) / r.x, c = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
6194
6198
  if (o) {
6195
6199
  const x = N(o), u = i && X(i) ? N(i) : i;
6196
- let w = x, m = yt(w);
6200
+ let w = x, m = Ct(w);
6197
6201
  for (; m && i && u !== w; ) {
6198
- const g = U(m), E = m.getBoundingClientRect(), C = B(m), p = E.left + (m.clientLeft + parseFloat(C.paddingLeft)) * g.x, b = E.top + (m.clientTop + parseFloat(C.paddingTop)) * g.y;
6199
- l *= g.x, c *= g.y, d *= g.x, f *= g.y, l += p, c += b, w = N(m), m = yt(w);
6202
+ const g = U(m), E = m.getBoundingClientRect(), p = B(m), C = E.left + (m.clientLeft + parseFloat(p.paddingLeft)) * g.x, b = E.top + (m.clientTop + parseFloat(p.paddingTop)) * g.y;
6203
+ l *= g.x, c *= g.y, d *= g.x, f *= g.y, l += C, c += b, w = N(m), m = Ct(w);
6200
6204
  }
6201
6205
  }
6202
- return ht({
6206
+ return ct({
6203
6207
  width: d,
6204
6208
  height: f,
6205
6209
  x: l,
6206
6210
  y: c
6207
6211
  });
6208
6212
  }
6209
- function Lt(h, t) {
6210
- const e = wt(h).scrollLeft;
6213
+ function Ot(h, t) {
6214
+ const e = gt(h).scrollLeft;
6211
6215
  return t ? t.left + e : G(F(h)).left + e;
6212
6216
  }
6213
- function ne(h, t, e) {
6217
+ function re(h, t, e) {
6214
6218
  e === void 0 && (e = !1);
6215
6219
  const i = h.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
6216
6220
  // RTL <body> scrollbar.
6217
- Lt(h, i)
6221
+ Ot(h, i)
6218
6222
  )), o = i.top + t.scrollTop;
6219
6223
  return {
6220
6224
  x: s,
6221
6225
  y: o
6222
6226
  };
6223
6227
  }
6224
- function ui(h) {
6228
+ function fi(h) {
6225
6229
  let {
6226
6230
  elements: t,
6227
6231
  rect: e,
6228
6232
  offsetParent: i,
6229
6233
  strategy: s
6230
6234
  } = h;
6231
- const o = s === "fixed", r = F(i), a = t ? gt(t.floating) : !1;
6235
+ const o = s === "fixed", r = F(i), a = t ? xt(t.floating) : !1;
6232
6236
  if (i === r || a && o)
6233
6237
  return e;
6234
6238
  let l = {
@@ -6236,11 +6240,11 @@ function ui(h) {
6236
6240
  scrollTop: 0
6237
6241
  }, c = Y(1);
6238
6242
  const d = Y(0), f = K(i);
6239
- if ((f || !f && !o) && ((Z(i) !== "body" || st(r)) && (l = wt(i)), K(i))) {
6243
+ if ((f || !f && !o) && ((Z(i) !== "body" || st(r)) && (l = gt(i)), K(i))) {
6240
6244
  const u = G(i);
6241
6245
  c = U(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
6242
6246
  }
6243
- const x = r && !f && !o ? ne(r, l, !0) : Y(0);
6247
+ const x = r && !f && !o ? re(r, l, !0) : Y(0);
6244
6248
  return {
6245
6249
  width: e.width * c.x,
6246
6250
  height: e.height * c.y,
@@ -6248,12 +6252,12 @@ function ui(h) {
6248
6252
  y: e.y * c.y - l.scrollTop * c.y + d.y + x.y
6249
6253
  };
6250
6254
  }
6251
- function xi(h) {
6255
+ function ui(h) {
6252
6256
  return Array.from(h.getClientRects());
6253
6257
  }
6254
- function gi(h) {
6255
- const t = F(h), e = wt(h), i = h.ownerDocument.body, s = z(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = z(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
6256
- let r = -e.scrollLeft + Lt(h);
6258
+ function xi(h) {
6259
+ const t = F(h), e = gt(h), i = h.ownerDocument.body, s = z(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = z(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
6260
+ let r = -e.scrollLeft + Ot(h);
6257
6261
  const a = -e.scrollTop;
6258
6262
  return B(i).direction === "rtl" && (r += z(t.clientWidth, i.clientWidth) - s), {
6259
6263
  width: s,
@@ -6262,12 +6266,12 @@ function gi(h) {
6262
6266
  y: a
6263
6267
  };
6264
6268
  }
6265
- function wi(h, t) {
6269
+ function gi(h, t) {
6266
6270
  const e = N(h), i = F(h), s = e.visualViewport;
6267
6271
  let o = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
6268
6272
  if (s) {
6269
6273
  o = s.width, r = s.height;
6270
- const c = Tt();
6274
+ const c = St();
6271
6275
  (!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
6272
6276
  }
6273
6277
  return {
@@ -6277,8 +6281,8 @@ function wi(h, t) {
6277
6281
  y: l
6278
6282
  };
6279
6283
  }
6280
- const mi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
6281
- function Ei(h, t) {
6284
+ const wi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
6285
+ function mi(h, t) {
6282
6286
  const e = G(h, !0, t === "fixed"), i = e.top + h.clientTop, s = e.left + h.clientLeft, o = K(h) ? U(h) : Y(1), r = h.clientWidth * o.x, a = h.clientHeight * o.y, l = s * o.x, c = i * o.y;
6283
6287
  return {
6284
6288
  width: r,
@@ -6287,16 +6291,16 @@ function Ei(h, t) {
6287
6291
  y: c
6288
6292
  };
6289
6293
  }
6290
- function Vt(h, t, e) {
6294
+ function Wt(h, t, e) {
6291
6295
  let i;
6292
6296
  if (t === "viewport")
6293
- i = wi(h, e);
6297
+ i = gi(h, e);
6294
6298
  else if (t === "document")
6295
- i = gi(F(h));
6299
+ i = xi(F(h));
6296
6300
  else if (X(t))
6297
- i = Ei(t, e);
6301
+ i = mi(t, e);
6298
6302
  else {
6299
- const s = re(h);
6303
+ const s = oe(h);
6300
6304
  i = {
6301
6305
  x: t.x - s.x,
6302
6306
  y: t.y - s.y,
@@ -6304,36 +6308,36 @@ function Vt(h, t, e) {
6304
6308
  height: t.height
6305
6309
  };
6306
6310
  }
6307
- return ht(i);
6311
+ return ct(i);
6308
6312
  }
6309
- function ae(h, t) {
6313
+ function ne(h, t) {
6310
6314
  const e = P(h);
6311
- return e === t || !X(e) || j(e) ? !1 : B(e).position === "fixed" || ae(e, t);
6315
+ return e === t || !X(e) || q(e) ? !1 : B(e).position === "fixed" || ne(e, t);
6312
6316
  }
6313
- function pi(h, t) {
6317
+ function Ei(h, t) {
6314
6318
  const e = t.get(h);
6315
6319
  if (e)
6316
6320
  return e;
6317
6321
  let i = tt(h, [], !1).filter((a) => X(a) && Z(a) !== "body"), s = null;
6318
6322
  const o = B(h).position === "fixed";
6319
6323
  let r = o ? P(h) : h;
6320
- for (; X(r) && !j(r); ) {
6321
- const a = B(r), l = St(r);
6322
- !l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && mi.has(s.position) || st(r) && !l && ae(h, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
6324
+ for (; X(r) && !q(r); ) {
6325
+ const a = B(r), l = _t(r);
6326
+ !l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && wi.has(s.position) || st(r) && !l && ne(h, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
6323
6327
  }
6324
6328
  return t.set(h, i), i;
6325
6329
  }
6326
- function Ci(h) {
6330
+ function pi(h) {
6327
6331
  let {
6328
6332
  element: t,
6329
6333
  boundary: e,
6330
6334
  rootBoundary: i,
6331
6335
  strategy: s
6332
6336
  } = h;
6333
- const r = [...e === "clippingAncestors" ? gt(t) ? [] : pi(t, this._c) : [].concat(e), i], a = r[0], l = r.reduce((c, d) => {
6334
- const f = Vt(t, d, s);
6335
- return c.top = z(f.top, c.top), c.right = q(f.right, c.right), c.bottom = q(f.bottom, c.bottom), c.left = z(f.left, c.left), c;
6336
- }, Vt(t, a, s));
6337
+ const r = [...e === "clippingAncestors" ? xt(t) ? [] : Ei(t, this._c) : [].concat(e), i], a = r[0], l = r.reduce((c, d) => {
6338
+ const f = Wt(t, d, s);
6339
+ return c.top = z(f.top, c.top), c.right = j(f.right, c.right), c.bottom = j(f.bottom, c.bottom), c.left = z(f.left, c.left), c;
6340
+ }, Wt(t, a, s));
6337
6341
  return {
6338
6342
  width: l.right - l.left,
6339
6343
  height: l.bottom - l.top,
@@ -6341,17 +6345,17 @@ function Ci(h) {
6341
6345
  y: l.top
6342
6346
  };
6343
6347
  }
6344
- function yi(h) {
6348
+ function Ci(h) {
6345
6349
  const {
6346
6350
  width: t,
6347
6351
  height: e
6348
- } = oe(h);
6352
+ } = se(h);
6349
6353
  return {
6350
6354
  width: t,
6351
6355
  height: e
6352
6356
  };
6353
6357
  }
6354
- function bi(h, t, e) {
6358
+ function yi(h, t, e) {
6355
6359
  const i = K(t), s = F(t), o = e === "fixed", r = G(h, !0, o, t);
6356
6360
  let a = {
6357
6361
  scrollLeft: 0,
@@ -6359,15 +6363,15 @@ function bi(h, t, e) {
6359
6363
  };
6360
6364
  const l = Y(0);
6361
6365
  function c() {
6362
- l.x = Lt(s);
6366
+ l.x = Ot(s);
6363
6367
  }
6364
6368
  if (i || !i && !o)
6365
- if ((Z(t) !== "body" || st(s)) && (a = wt(t)), i) {
6369
+ if ((Z(t) !== "body" || st(s)) && (a = gt(t)), i) {
6366
6370
  const u = G(t, !0, o, t);
6367
6371
  l.x = u.x + t.clientLeft, l.y = u.y + t.clientTop;
6368
6372
  } else s && c();
6369
6373
  o && !i && s && c();
6370
- const d = s && !i && !o ? ne(s, a) : Y(0), f = r.left + a.scrollLeft - l.x - d.x, x = r.top + a.scrollTop - l.y - d.y;
6374
+ const d = s && !i && !o ? re(s, a) : Y(0), f = r.left + a.scrollLeft - l.x - d.x, x = r.top + a.scrollTop - l.y - d.y;
6371
6375
  return {
6372
6376
  x: f,
6373
6377
  y: x,
@@ -6375,10 +6379,10 @@ function bi(h, t, e) {
6375
6379
  height: r.height
6376
6380
  };
6377
6381
  }
6378
- function mt(h) {
6382
+ function wt(h) {
6379
6383
  return B(h).position === "static";
6380
6384
  }
6381
- function Pt(h, t) {
6385
+ function Vt(h, t) {
6382
6386
  if (!K(h) || B(h).position === "fixed")
6383
6387
  return null;
6384
6388
  if (t)
@@ -6386,28 +6390,28 @@ function Pt(h, t) {
6386
6390
  let e = h.offsetParent;
6387
6391
  return F(h) === e && (e = e.ownerDocument.body), e;
6388
6392
  }
6389
- function le(h, t) {
6393
+ function ae(h, t) {
6390
6394
  const e = N(h);
6391
- if (gt(h))
6395
+ if (xt(h))
6392
6396
  return e;
6393
6397
  if (!K(h)) {
6394
6398
  let s = P(h);
6395
- for (; s && !j(s); ) {
6396
- if (X(s) && !mt(s))
6399
+ for (; s && !q(s); ) {
6400
+ if (X(s) && !wt(s))
6397
6401
  return s;
6398
6402
  s = P(s);
6399
6403
  }
6400
6404
  return e;
6401
6405
  }
6402
- let i = Pt(h, t);
6403
- for (; i && oi(i) && mt(i); )
6404
- i = Pt(i, t);
6405
- return i && j(i) && mt(i) && !St(i) ? e : i || ci(h) || e;
6406
+ let i = Vt(h, t);
6407
+ for (; i && si(i) && wt(i); )
6408
+ i = Vt(i, t);
6409
+ return i && q(i) && wt(i) && !_t(i) ? e : i || li(h) || e;
6406
6410
  }
6407
- const Ii = async function(h) {
6408
- const t = this.getOffsetParent || le, e = this.getDimensions, i = await e(h.floating);
6411
+ const bi = async function(h) {
6412
+ const t = this.getOffsetParent || ae, e = this.getDimensions, i = await e(h.floating);
6409
6413
  return {
6410
- reference: bi(h.reference, await t(h.floating), h.strategy),
6414
+ reference: yi(h.reference, await t(h.floating), h.strategy),
6411
6415
  floating: {
6412
6416
  x: 0,
6413
6417
  y: 0,
@@ -6416,25 +6420,25 @@ const Ii = async function(h) {
6416
6420
  }
6417
6421
  };
6418
6422
  };
6419
- function Ri(h) {
6423
+ function Ii(h) {
6420
6424
  return B(h).direction === "rtl";
6421
6425
  }
6422
- const vi = {
6423
- convertOffsetParentRelativeRectToViewportRelativeRect: ui,
6426
+ const Ri = {
6427
+ convertOffsetParentRelativeRectToViewportRelativeRect: fi,
6424
6428
  getDocumentElement: F,
6425
- getClippingRect: Ci,
6426
- getOffsetParent: le,
6427
- getElementRects: Ii,
6428
- getClientRects: xi,
6429
- getDimensions: yi,
6429
+ getClippingRect: pi,
6430
+ getOffsetParent: ae,
6431
+ getElementRects: bi,
6432
+ getClientRects: ui,
6433
+ getDimensions: Ci,
6430
6434
  getScale: U,
6431
6435
  isElement: X,
6432
- isRTL: Ri
6436
+ isRTL: Ii
6433
6437
  };
6434
- function ce(h, t) {
6438
+ function le(h, t) {
6435
6439
  return h.x === t.x && h.y === t.y && h.width === t.width && h.height === t.height;
6436
6440
  }
6437
- function _i(h, t) {
6441
+ function vi(h, t) {
6438
6442
  let e = null, i;
6439
6443
  const s = F(h);
6440
6444
  function o() {
@@ -6451,9 +6455,9 @@ function _i(h, t) {
6451
6455
  } = c;
6452
6456
  if (a || t(), !x || !u)
6453
6457
  return;
6454
- const w = ot(f), m = ot(s.clientWidth - (d + x)), g = ot(s.clientHeight - (f + u)), E = ot(d), p = {
6458
+ const w = ot(f), m = ot(s.clientWidth - (d + x)), g = ot(s.clientHeight - (f + u)), E = ot(d), C = {
6455
6459
  rootMargin: -w + "px " + -m + "px " + -g + "px " + -E + "px",
6456
- threshold: z(0, q(1, l)) || 1
6460
+ threshold: z(0, j(1, l)) || 1
6457
6461
  };
6458
6462
  let b = !0;
6459
6463
  function y(v) {
@@ -6465,22 +6469,22 @@ function _i(h, t) {
6465
6469
  r(!1, 1e-7);
6466
6470
  }, 1e3);
6467
6471
  }
6468
- _ === 1 && !ce(c, h.getBoundingClientRect()) && r(), b = !1;
6472
+ _ === 1 && !le(c, h.getBoundingClientRect()) && r(), b = !1;
6469
6473
  }
6470
6474
  try {
6471
6475
  e = new IntersectionObserver(y, {
6472
- ...p,
6476
+ ...C,
6473
6477
  // Handle <iframe>s
6474
6478
  root: s.ownerDocument
6475
6479
  });
6476
6480
  } catch {
6477
- e = new IntersectionObserver(y, p);
6481
+ e = new IntersectionObserver(y, C);
6478
6482
  }
6479
6483
  e.observe(h);
6480
6484
  }
6481
6485
  return r(!0), o;
6482
6486
  }
6483
- function bt(h, t, e, i) {
6487
+ function yt(h, t, e, i) {
6484
6488
  i === void 0 && (i = {});
6485
6489
  const {
6486
6490
  ancestorScroll: s = !0,
@@ -6488,48 +6492,48 @@ function bt(h, t, e, i) {
6488
6492
  elementResize: r = typeof ResizeObserver == "function",
6489
6493
  layoutShift: a = typeof IntersectionObserver == "function",
6490
6494
  animationFrame: l = !1
6491
- } = i, c = Ot(h), d = s || o ? [...c ? tt(c) : [], ...tt(t)] : [];
6495
+ } = i, c = Tt(h), d = s || o ? [...c ? tt(c) : [], ...tt(t)] : [];
6492
6496
  d.forEach((E) => {
6493
6497
  s && E.addEventListener("scroll", e, {
6494
6498
  passive: !0
6495
6499
  }), o && E.addEventListener("resize", e);
6496
6500
  });
6497
- const f = c && a ? _i(c, e) : null;
6501
+ const f = c && a ? vi(c, e) : null;
6498
6502
  let x = -1, u = null;
6499
6503
  r && (u = new ResizeObserver((E) => {
6500
- let [C] = E;
6501
- C && C.target === c && u && (u.unobserve(t), cancelAnimationFrame(x), x = requestAnimationFrame(() => {
6502
- var p;
6503
- (p = u) == null || p.observe(t);
6504
+ let [p] = E;
6505
+ p && p.target === c && u && (u.unobserve(t), cancelAnimationFrame(x), x = requestAnimationFrame(() => {
6506
+ var C;
6507
+ (C = u) == null || C.observe(t);
6504
6508
  })), e();
6505
6509
  }), c && !l && u.observe(c), u.observe(t));
6506
6510
  let w, m = l ? G(h) : null;
6507
6511
  l && g();
6508
6512
  function g() {
6509
6513
  const E = G(h);
6510
- m && !ce(m, E) && e(), m = E, w = requestAnimationFrame(g);
6514
+ m && !le(m, E) && e(), m = E, w = requestAnimationFrame(g);
6511
6515
  }
6512
6516
  return e(), () => {
6513
6517
  var E;
6514
- d.forEach((C) => {
6515
- s && C.removeEventListener("scroll", e), o && C.removeEventListener("resize", e);
6518
+ d.forEach((p) => {
6519
+ s && p.removeEventListener("scroll", e), o && p.removeEventListener("resize", e);
6516
6520
  }), f == null || f(), (E = u) == null || E.disconnect(), u = null, l && cancelAnimationFrame(w);
6517
6521
  };
6518
6522
  }
6519
- const dt = ti, ft = ei, Mt = Ze, Si = je, ut = (h, t, e) => {
6523
+ const ht = Qe, dt = ti, Lt = qe, _i = je, ft = (h, t, e) => {
6520
6524
  const i = /* @__PURE__ */ new Map(), s = {
6521
- platform: vi,
6525
+ platform: Ri,
6522
6526
  ...e
6523
6527
  }, o = {
6524
6528
  ...s.platform,
6525
6529
  _c: i
6526
6530
  };
6527
- return qe(h, t, {
6531
+ return Ue(h, t, {
6528
6532
  ...s,
6529
6533
  platform: o
6530
6534
  });
6531
6535
  };
6532
- let Ti = class {
6536
+ let Si = class {
6533
6537
  constructor(t) {
6534
6538
  n(this, "ctx");
6535
6539
  n(this, "enable", !1);
@@ -6595,7 +6599,7 @@ let Ti = class {
6595
6599
  return;
6596
6600
  this.enable = !0, this.contentEl.style.maxWidth = `${t.overflowTooltipMaxWidth || 500}px`, this.contentEl.style.minWidth = "100px", this.contentEl.style.width = "100%", this.contentEl.style.display = "inline-block", this.contentEl.style.wordBreak = "break-all", this.contentEl.style.lineHeight = "1.5", this.contentEl.innerText = e;
6597
6601
  const s = t.drawX + i.x, o = t.drawY + i.y;
6598
- ut({
6602
+ ft({
6599
6603
  getBoundingClientRect() {
6600
6604
  return {
6601
6605
  width: t.visibleWidth,
@@ -6610,7 +6614,7 @@ let Ti = class {
6610
6614
  }
6611
6615
  }, this.floatingEl, {
6612
6616
  placement: t.overflowTooltipPlacement,
6613
- middleware: [ft(), Mt(), dt(6), Si({ element: this.arrowEl })]
6617
+ middleware: [dt(), Lt(), ht(6), _i({ element: this.arrowEl })]
6614
6618
  }).then((a) => {
6615
6619
  const { x: l, y: c, placement: d, middlewareData: f } = a;
6616
6620
  if (Object.assign(this.floatingEl.style, {
@@ -6649,7 +6653,7 @@ let Ti = class {
6649
6653
  this.contentEl.remove(), this.arrowEl.remove(), this.floatingEl.remove();
6650
6654
  }
6651
6655
  };
6652
- class Oi {
6656
+ class Ti {
6653
6657
  constructor(t) {
6654
6658
  n(this, "editorEl");
6655
6659
  n(this, "inputEl");
@@ -6674,7 +6678,7 @@ class Oi {
6674
6678
  }), this.ctx.on("cellHeaderMousedown", () => {
6675
6679
  this.enable && this.doneEdit(), this.cellTarget = null;
6676
6680
  }), this.ctx.on("hoverIconClick", (t) => {
6677
- t.editorType !== "none" && this.editCell(t.rowIndex, t.colIndex);
6681
+ this.editCell(t.rowIndex, t.colIndex);
6678
6682
  }), this.ctx.on("keydown", (t) => {
6679
6683
  if (!this.ctx.isTarget(t) || !this.ctx.focusCell)
6680
6684
  return;
@@ -6786,6 +6790,8 @@ class Oi {
6786
6790
  }
6787
6791
  startEditByInput(t, e = !1) {
6788
6792
  const i = e ? null : t.getValue(), { editorType: s } = t;
6793
+ if (s === "none")
6794
+ return;
6789
6795
  t.update(), this.ctx.config.ENABLE_MERGE_CELL_LINK && t.updateSpanInfo();
6790
6796
  let { height: o, width: r, drawY: a, drawX: l } = t;
6791
6797
  this.drawX = l, this.drawY = a;
@@ -6816,11 +6822,8 @@ class Oi {
6816
6822
  const i = this.ctx.focusCell;
6817
6823
  if (!i || ["index", "index-selection", "selection"].includes(i.type) || this.enable || !(i.isVerticalVisible() && i.isHorizontalVisible()))
6818
6824
  return;
6819
- const { rowKey: o, key: r, editorType: a } = i;
6820
- if (a === "none")
6821
- return;
6822
- const l = this.ctx.database.getReadonly(o, r);
6823
- i && !l && (this.ctx.emit("drawView"), this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
6825
+ const { rowKey: o, key: r } = i, a = this.ctx.database.getReadonly(o, r);
6826
+ i && !a && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("drawView"));
6824
6827
  }
6825
6828
  editCell(t, e) {
6826
6829
  const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
@@ -6834,7 +6837,7 @@ class Oi {
6834
6837
  if (!o || ["index", "index-selection", "selection"].includes(o.type) || this.enable)
6835
6838
  return;
6836
6839
  const { rowKey: r, key: a } = o, l = this.ctx.database.getReadonly(r, a);
6837
- o && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = o, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
6840
+ o && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = o, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("drawView"));
6838
6841
  }
6839
6842
  doneEdit() {
6840
6843
  this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.ctx.containerElement.focus({ preventScroll: !0 }), this.editorEl.style.display = "none", this.ctx.emit("draw"));
@@ -6847,7 +6850,7 @@ class Oi {
6847
6850
  (t = this.editorEl) == null || t.remove();
6848
6851
  }
6849
6852
  }
6850
- let Li = class {
6853
+ let Oi = class {
6851
6854
  constructor(t) {
6852
6855
  n(this, "ctx");
6853
6856
  n(this, "emptyEl");
@@ -6871,7 +6874,7 @@ let Li = class {
6871
6874
  this.emptyEl.remove();
6872
6875
  }
6873
6876
  };
6874
- class Mi {
6877
+ class Li {
6875
6878
  constructor(t) {
6876
6879
  n(this, "ctx");
6877
6880
  n(this, "observer");
@@ -7090,7 +7093,7 @@ class Mi {
7090
7093
  };
7091
7094
  }
7092
7095
  }
7093
- class zt {
7096
+ class Pt {
7094
7097
  constructor(t, e = [], i = {}) {
7095
7098
  n(this, "container");
7096
7099
  n(this, "menuData");
@@ -7124,7 +7127,7 @@ class zt {
7124
7127
  const o = this.createElement("span", "menu-item-text");
7125
7128
  if (o.textContent = t.label, s.appendChild(o), i.appendChild(s), (r = t.children) != null && r.length) {
7126
7129
  const a = this.createElement("span", "e-virt-table-menu-arrow");
7127
- a.innerHTML = Zt, i.appendChild(a);
7130
+ a.innerHTML = qt, i.appendChild(a);
7128
7131
  const l = this.createSubmenu(t.children);
7129
7132
  i._submenu = l, this.container.appendChild(l);
7130
7133
  }
@@ -7178,10 +7181,10 @@ class zt {
7178
7181
  async showSubmenu(t, e) {
7179
7182
  if (this.activeSubmenus.has(e)) return;
7180
7183
  this.activeSubmenus.add(e), e.classList.add("show");
7181
- const i = bt(t, e, async () => {
7182
- const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, c = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await ut(t, e, {
7184
+ const i = yt(t, e, async () => {
7185
+ const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, c = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await ft(t, e, {
7183
7186
  placement: c,
7184
- middleware: [dt(8), ft({ padding: 8 })]
7187
+ middleware: [ht(8), dt({ padding: 8 })]
7185
7188
  });
7186
7189
  Object.assign(e.style, {
7187
7190
  left: `${d}px`,
@@ -7248,10 +7251,10 @@ class zt {
7248
7251
  }),
7249
7252
  contextElement: document.body
7250
7253
  };
7251
- bt(e, this.container, () => {
7252
- ut(e, this.container, {
7254
+ yt(e, this.container, () => {
7255
+ ft(e, this.container, {
7253
7256
  placement: "right-start",
7254
- middleware: [dt(), ft(), Mt()]
7257
+ middleware: [ht(), dt(), Lt()]
7255
7258
  }).then(({ x: i, y: s }) => {
7256
7259
  this.container && Object.assign(this.container.style, {
7257
7260
  left: `${i}px`,
@@ -7316,7 +7319,7 @@ class zt {
7316
7319
  }), t.remove();
7317
7320
  }
7318
7321
  }
7319
- class Ai {
7322
+ class Mi {
7320
7323
  constructor(t) {
7321
7324
  n(this, "ctx");
7322
7325
  n(this, "contextMenuEl");
@@ -7336,7 +7339,7 @@ class Ai {
7336
7339
  if (!i || r.length === 0) return;
7337
7340
  e.preventDefault();
7338
7341
  const { xArr: a, yArr: l } = this.ctx.selector, [c, d] = a, [f, x] = l, { rowIndex: u, colIndex: w } = t;
7339
- u >= f && u <= x && w >= c && w <= d || this.ctx.emit("setSelectorCell", t, e), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy(), this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new zt(this.contextMenuEl, r, {
7342
+ u >= f && u <= x && w >= c && w <= d || this.ctx.emit("setSelectorCell", t, e), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy(), this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new Pt(this.contextMenuEl, r, {
7340
7343
  onClick: (g, E) => {
7341
7344
  E === "copy" ? (this.ctx.emit("contextMenuCopy"), this.hide()) : E === "paste" ? (this.ctx.emit("contextMenuPaste"), this.hide()) : E === "cut" ? (this.ctx.emit("contextMenuCut"), this.hide()) : E === "clearSelected" && (this.ctx.emit("contextMenuClearSelected"), this.hide());
7342
7345
  }
@@ -7354,12 +7357,12 @@ class Ai {
7354
7357
  e.preventDefault();
7355
7358
  const { xArr: x } = this.ctx.selector, [u, w] = x, { colIndex: m } = t;
7356
7359
  m >= u && m <= w || (this.ctx.focusCellHeader = t, this.ctx.emit("selectCols", t)), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy();
7357
- const E = this.ctx.database.getColumns(), C = f.map((p) => p.value === "visible" ? {
7358
- ...p,
7360
+ const E = this.ctx.database.getColumns(), p = f.map((C) => C.value === "visible" ? {
7361
+ ...C,
7359
7362
  children: this.filterColumns(E)
7360
- } : p);
7361
- this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new zt(this.contextMenuEl, C, {
7362
- onClick: (p, b) => {
7363
+ } : C);
7364
+ this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new Pt(this.contextMenuEl, p, {
7365
+ onClick: (C, b) => {
7363
7366
  const { xArr: y } = this.ctx.selector, [v, _] = y;
7364
7367
  if (b === "fixedLeft" || b === "fixedRight" || b === "fixedNone") {
7365
7368
  const S = this.ctx.header.allCellHeaders.filter((I) => I.colIndex >= v && I.colIndex <= _).filter((I) => I.level === 0).filter((I) => !I.column.fixedDisabled).map((I) => I.key);
@@ -7396,10 +7399,10 @@ class Ai {
7396
7399
  }),
7397
7400
  contextElement: document.body
7398
7401
  };
7399
- bt(e, this.contextMenuEl, () => {
7400
- ut(e, this.contextMenuEl, {
7402
+ yt(e, this.contextMenuEl, () => {
7403
+ ft(e, this.contextMenuEl, {
7401
7404
  placement: "right-start",
7402
- middleware: [dt(), ft(), Mt()]
7405
+ middleware: [ht(), dt(), Lt()]
7403
7406
  }).then(({ x: i, y: s }) => {
7404
7407
  this.contextMenuEl && Object.assign(this.contextMenuEl.style, {
7405
7408
  left: `${i}px`,
@@ -7431,7 +7434,7 @@ class Ai {
7431
7434
  this.hide(), (t = this.contextMenuEl) == null || t.remove();
7432
7435
  }
7433
7436
  }
7434
- class Hi {
7437
+ class Ai {
7435
7438
  constructor(t) {
7436
7439
  n(this, "ctx");
7437
7440
  n(this, "loadingEl");
@@ -7461,7 +7464,7 @@ class Hi {
7461
7464
  this.loadingEl.remove();
7462
7465
  }
7463
7466
  }
7464
- class Xi {
7467
+ class ki {
7465
7468
  constructor(t, e) {
7466
7469
  n(this, "options");
7467
7470
  n(this, "scroller");
@@ -7487,7 +7490,7 @@ class Xi {
7487
7490
  o,
7488
7491
  r
7489
7492
  );
7490
- this.ctx = new Me(a, this.options), this.header = new De(this.ctx), this.footer = new ke(this.ctx), this.body = new Ne(this.ctx), this.scroller = new Ae(this.ctx), this.selector = new Xe(this.ctx), this.autofill = new Be(this.ctx), this.tooltip = new Ti(this.ctx), this.empty = new Li(this.ctx), this.editor = new Oi(this.ctx), this.overlayer = new Mi(this.ctx), this.contextMenu = new Ai(this.ctx), this.loading = new Hi(this.ctx), this.ctx.on(
7493
+ this.ctx = new Le(a, this.options), this.header = new He(this.ctx), this.footer = new Ne(this.ctx), this.body = new De(this.ctx), this.scroller = new Me(this.ctx), this.selector = new ke(this.ctx), this.autofill = new Xe(this.ctx), this.tooltip = new Si(this.ctx), this.empty = new Oi(this.ctx), this.editor = new Ti(this.ctx), this.overlayer = new Li(this.ctx), this.contextMenu = new Mi(this.ctx), this.loading = new Ai(this.ctx), this.ctx.on(
7491
7494
  "draw",
7492
7495
  J(
7493
7496
  () => {
@@ -7536,7 +7539,7 @@ class Xi {
7536
7539
  this.ctx.config.init(t), this.ctx.database.init(!1), this.header.init(), this.ctx.emit("draw");
7537
7540
  }
7538
7541
  loadColumns(t) {
7539
- this.editor.doneEdit(), this.ctx.database.setColumns(t), this.ctx.database.setOriginalColumns(t), this.header.init(), this.ctx.emit("draw");
7542
+ this.editor.doneEdit(), this.ctx.database.setColumns(t), this.header.init(), this.ctx.emit("draw");
7540
7543
  }
7541
7544
  loadData(t) {
7542
7545
  this.editor.doneEdit(), this.ctx.database.setData(t), this.header.init(), this.tooltip.hide(), this.ctx.emit("draw");
@@ -7545,7 +7548,7 @@ class Xi {
7545
7548
  this.ctx.database.setFooterData(t), this.ctx.emit("draw");
7546
7549
  }
7547
7550
  setCustomHeader(t, e = !0) {
7548
- this.ctx.database.setCustomHeader(t, e), this.ctx.database.init(!1), this.header.init(), this.ctx.emit("draw");
7551
+ this.ctx.database.setCustomHeader(t, e), this.header.init(), this.ctx.emit("draw");
7549
7552
  }
7550
7553
  getCustomHeader() {
7551
7554
  return this.header.getCustomHeader();
@@ -7753,10 +7756,10 @@ class Xi {
7753
7756
  }
7754
7757
  getUtils() {
7755
7758
  return {
7756
- mergeColCell: pe,
7757
- mergeRowCell: Ee,
7758
- getSpanArrByRow: Ut,
7759
- getSpanObjByColumn: qt
7759
+ mergeColCell: Ee,
7760
+ mergeRowCell: me,
7761
+ getSpanArrByRow: Gt,
7762
+ getSpanObjByColumn: Ut
7760
7763
  };
7761
7764
  }
7762
7765
  getColumnByKey(t) {
@@ -7771,6 +7774,6 @@ class Xi {
7771
7774
  }
7772
7775
  }
7773
7776
  export {
7774
- Xi as default
7777
+ ki as default
7775
7778
  };
7776
7779
  //# sourceMappingURL=index.es.js.map