e-virt-table 1.3.23 → 1.3.25
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.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +616 -599
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Cell.d.ts +3 -1
- package/dist/lib/Cell.js +17 -3
- package/dist/lib/Cell.js.map +1 -1
- package/dist/lib/CellHeader.d.ts +2 -1
- package/dist/lib/CellHeader.js +8 -1
- package/dist/lib/CellHeader.js.map +1 -1
- package/dist/lib/Config.d.ts +5 -1
- package/dist/lib/Config.js +14 -0
- package/dist/lib/Config.js.map +1 -1
- package/dist/lib/ContextMenu.js +28 -6
- package/dist/lib/ContextMenu.js.map +1 -1
- package/dist/lib/DOMTreeMenu.d.ts +0 -1
- package/dist/lib/DOMTreeMenu.js +0 -8
- package/dist/lib/DOMTreeMenu.js.map +1 -1
- package/dist/lib/Editor.d.ts +1 -1
- package/dist/lib/Editor.js +16 -30
- package/dist/lib/Editor.js.map +1 -1
- package/dist/lib/types.d.ts +11 -0
- package/package.json +2 -2
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-body-bg-color: #fff;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--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;background-color:var(--evt-body-bg-color);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(.e-virt-table-menu-item-icon){padding-left:8px}.e-virt-table-menu-item-content{display:flex;align-items:center;flex:1;min-width:0}.e-virt-table-menu-item-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:8px;flex-shrink:0}.e-virt-table-menu-item-icon svg{width:100%;height:100%;fill:currentColor}.e-virt-table-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}.e-virt-table-finder-bar{position:absolute;top:8px;right:16px;display:none;z-index:10000;background:#fff;border:1px solid #dadce0;border-radius:12px;box-shadow:0 2px 6px #0003;padding:0 8px;height:48px;min-width:250px;align-items:center;font-size:12px}.e-virt-table-finder-bar.show{display:flex}.e-virt-table-finder-bar-input-wrapper{display:flex;align-items:center;flex:1;padding:0 8px;position:relative}.e-virt-table-finder-bar-input{border:none;outline:none;flex:1;font-size:12px;background:transparent;color:#333;min-width:150px;padding-left:0;position:relative}.e-virt-table-finder-bar-nav{display:flex;flex-direction:row;gap:8px;margin:0 8px;align-items:center}.e-virt-table-finder-bar-nav-btn{border:none;background:transparent;cursor:pointer;padding:0;color:#666;border-radius:50%;display:flex;align-items:center;justify-content:center}.e-virt-table-finder-bar-nav-btn svg{width:24px;height:24px}.e-virt-table-finder-bar-nav-btn.prev-btn{transform:rotate(-90deg)}.e-virt-table-finder-bar-nav-btn.next-btn{transform:rotate(90deg)}.e-virt-table-finder-bar-nav-btn.close-btn{font-size:24px;color:#666;line-height:1;width:24px;height:24px}.e-virt-table-finder-bar-nav-btn:hover{color:#666;background-color:#f0f0f0}.e-virt-table-finder-bar-count{color:#666;font-size:12px;margin:0 8px;white-space:nowrap;flex-shrink:0}.e-virt-table-finder-bar-count.no-results{color:#999}.e-virt-table-finder-bar-loading{display:none;position:absolute;left:8px;top:0;width:16px;height:16px;flex-shrink:0;pointer-events:none;z-index:0}.e-virt-table-finder-bar-loading.show{display:block}.e-virt-table-finder-bar-loading svg{width:100%;height:100%;color:#666;animation:rotate 1s linear infinite}.e-virt-table-empty{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:14px;color:#666;z-index:15}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var n = (c, t, e) =>
|
|
5
|
-
class
|
|
2
|
+
var ue = Object.defineProperty;
|
|
3
|
+
var xe = (c, t, e) => t in c ? ue(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
|
|
4
|
+
var n = (c, t, e) => xe(c, typeof t != "symbol" ? t + "" : t, e);
|
|
5
|
+
class ge {
|
|
6
6
|
constructor(t) {
|
|
7
7
|
n(this, "rules");
|
|
8
8
|
this.rules = t;
|
|
@@ -60,13 +60,13 @@ class ue {
|
|
|
60
60
|
return e;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function jt() {
|
|
64
64
|
return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(c) {
|
|
65
65
|
const t = Math.random() * 16 | 0;
|
|
66
66
|
return (c === "x" ? t : t & 3 | 8).toString(16);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function vt(c, t) {
|
|
70
70
|
let e = 0, i;
|
|
71
71
|
return function(...s) {
|
|
72
72
|
const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e, a = typeof t == "function" ? t() : t;
|
|
@@ -75,10 +75,10 @@ function bt(c, t) {
|
|
|
75
75
|
}, a - r));
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return c.length ? c.map((t) =>
|
|
78
|
+
function rt(c = []) {
|
|
79
|
+
return c.length ? c.map((t) => rt(t.children) + 1).sort((t, e) => e - t)[0] : 0;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function we(c = []) {
|
|
82
82
|
let t = [], e = [], i = [];
|
|
83
83
|
return c.forEach((s) => {
|
|
84
84
|
s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
|
|
@@ -88,14 +88,14 @@ function xe(c = []) {
|
|
|
88
88
|
...i.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0))
|
|
89
89
|
];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function nt(c = [], t = 1, e = 0, i = "") {
|
|
92
92
|
return c.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0)).map((s) => {
|
|
93
93
|
if (s.children) {
|
|
94
94
|
let o = 0, r = s.fixed;
|
|
95
95
|
s.children.forEach((l) => {
|
|
96
96
|
l.fixed = r;
|
|
97
97
|
});
|
|
98
|
-
const a =
|
|
98
|
+
const a = nt(s.children, t - 1, e + 1, s.key);
|
|
99
99
|
return a && a.forEach((l) => {
|
|
100
100
|
o += l.colspan ?? 0;
|
|
101
101
|
}), {
|
|
@@ -117,30 +117,30 @@ function rt(c = [], t = 1, e = 0, i = "") {
|
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Q(c = []) {
|
|
121
121
|
let t = [];
|
|
122
122
|
return c.forEach((e) => {
|
|
123
|
-
e.children ? t = t.concat(
|
|
123
|
+
e.children ? t = t.concat(Q(e.children)) : t.push(e);
|
|
124
124
|
}), t;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function qt(c) {
|
|
127
127
|
return c.filter((t) => !t.hide).map((t) => Array.isArray(t.children) && t.children.length > 0 ? {
|
|
128
128
|
...t,
|
|
129
|
-
children:
|
|
129
|
+
children: qt(t.children)
|
|
130
130
|
// 递归处理
|
|
131
131
|
} : { ...t });
|
|
132
132
|
}
|
|
133
|
-
const
|
|
134
|
-
function
|
|
133
|
+
const Dt = /^(\r\n|\n\r|\r|\n)/, me = /^[^\t\r\n]+/, Nt = /^\t/;
|
|
134
|
+
function Ee(c) {
|
|
135
135
|
let t = [[""]];
|
|
136
136
|
if (c.length === 0)
|
|
137
137
|
return t;
|
|
138
138
|
let e = 0, i = 0, s;
|
|
139
139
|
for (; c.length > 0 && s !== c.length; )
|
|
140
|
-
if (s = c.length, c.match(
|
|
141
|
-
c = c.replace(
|
|
142
|
-
else if (c.match(
|
|
143
|
-
c = c.replace(
|
|
140
|
+
if (s = c.length, c.match(Nt))
|
|
141
|
+
c = c.replace(Nt, ""), e += 1, t[i][e] = "";
|
|
142
|
+
else if (c.match(Dt))
|
|
143
|
+
c = c.replace(Dt, ""), e = 0, i += 1, t[i] = [""];
|
|
144
144
|
else {
|
|
145
145
|
let o = "";
|
|
146
146
|
if (c.startsWith('"')) {
|
|
@@ -151,14 +151,14 @@ function we(c) {
|
|
|
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 = c.match(
|
|
154
|
+
const r = c.match(me);
|
|
155
155
|
o = r ? r[0] : "", c = c.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
|
|
161
|
+
function pe(c) {
|
|
162
162
|
let t, e, i, s, o = "", r;
|
|
163
163
|
for (t = 0, e = c.length; t < e; t += 1) {
|
|
164
164
|
for (s = c[t].length, i = 0; i < s; i += 1)
|
|
@@ -169,7 +169,7 @@ function me(c) {
|
|
|
169
169
|
}
|
|
170
170
|
return o;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function Zt(c, t, e = []) {
|
|
173
173
|
let i = 0;
|
|
174
174
|
const s = [];
|
|
175
175
|
return c.forEach((o, r) => {
|
|
@@ -181,15 +181,15 @@ function Ut(c, t, e = []) {
|
|
|
181
181
|
}
|
|
182
182
|
}), s;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Jt(c, 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) : c[o.key] === c[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
|
|
192
|
-
const { visibleRows: i, rowIndex: s, headIndex: o } = c, r =
|
|
191
|
+
function ye(c, t, e = []) {
|
|
192
|
+
const { visibleRows: i, rowIndex: s, headIndex: o } = c, r = Zt(i, t, e);
|
|
193
193
|
return r[s - o] === 0 ? {
|
|
194
194
|
rowspan: 0,
|
|
195
195
|
colspan: 0,
|
|
@@ -202,10 +202,10 @@ function Ee(c, t, e = []) {
|
|
|
202
202
|
mergeRow: !0
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Ce(c, t = []) {
|
|
206
206
|
const { column: e, row: i, visibleLeafColumns: s } = c, o = s.filter((r) => t.includes(r.key));
|
|
207
207
|
if (t.includes(e.key)) {
|
|
208
|
-
const r =
|
|
208
|
+
const r = Jt(i, o);
|
|
209
209
|
return r[e.key] === 0 ? {
|
|
210
210
|
rowspan: 0,
|
|
211
211
|
colspan: 0,
|
|
@@ -219,11 +219,11 @@ function pe(c, t = []) {
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function be(c, t = document.documentElement) {
|
|
223
223
|
const e = c.startsWith("--") ? c : `--${c}`;
|
|
224
224
|
return getComputedStyle(t).getPropertyValue(e).trim();
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function kt(c) {
|
|
227
227
|
if (!c) return /* @__PURE__ */ new Date(0);
|
|
228
228
|
if (typeof c == "number")
|
|
229
229
|
return new Date(c);
|
|
@@ -277,11 +277,11 @@ function Dt(c) {
|
|
|
277
277
|
}
|
|
278
278
|
return /* @__PURE__ */ new Date(NaN);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const e =
|
|
280
|
+
function Ie(c, t) {
|
|
281
|
+
const e = kt(c), i = kt(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
|
-
class
|
|
284
|
+
class Qt {
|
|
285
285
|
constructor(t, e, i, s, o, r, a) {
|
|
286
286
|
n(this, "ctx");
|
|
287
287
|
n(this, "x", 0);
|
|
@@ -327,7 +327,7 @@ class qt {
|
|
|
327
327
|
getRightFixedX() {
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
class
|
|
330
|
+
class _t extends Qt {
|
|
331
331
|
constructor(e, i, s, o, r, a, l, h, d, f = "body", u = !0) {
|
|
332
332
|
super(e, o, r, a, l, f, h.fixed);
|
|
333
333
|
n(this, "formatter");
|
|
@@ -411,7 +411,9 @@ class vt extends qt {
|
|
|
411
411
|
n(this, "overflowTooltipMaxWidth", 500);
|
|
412
412
|
n(this, "overflowTooltipPlacement", "top");
|
|
413
413
|
n(this, "maxLineClamp", "auto");
|
|
414
|
-
|
|
414
|
+
n(this, "renderType", "default");
|
|
415
|
+
n(this, "renderFooterType", "default");
|
|
416
|
+
this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = h.key, this.type = h.type || "", this.editorType = h.editorType || "text", this.selectorCellValueType = h.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = h.editorProps || {}, this.cellType = f, this.align = h.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = h.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = h.fixed || "", this.level = h.level || 0, this.operation = h.operation || !1, this.column = h, this.rules = h.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = h.render, this.overflowTooltipShow = h.overflowTooltipShow !== !1, this.autoRowHeight = h.autoRowHeight !== void 0 ? h.autoRowHeight : this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = h.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = h.overflowTooltipPlacement || "top", this.renderFooter = h.renderFooter, this.hoverIconName = h.hoverIconName, this.formatter = h.formatter, this.formatterFooter = h.formatterFooter, this.maxLineClamp = h.maxLineClamp || "auto", this.renderType = h.renderType || "default", this.renderFooterType = h.renderFooterType || "default", u && this.update();
|
|
415
417
|
}
|
|
416
418
|
setWidthHeight(e, i) {
|
|
417
419
|
this.width = e, this.height = i;
|
|
@@ -536,8 +538,8 @@ class vt extends qt {
|
|
|
536
538
|
const R = this.ctx.icons.get("loading");
|
|
537
539
|
a = "loading", o = R;
|
|
538
540
|
} else if (d) {
|
|
539
|
-
const R = this.ctx.icons.get("expand"),
|
|
540
|
-
o = h ?
|
|
541
|
+
const R = this.ctx.icons.get("expand"), _ = this.ctx.icons.get("shrink");
|
|
542
|
+
o = h ? _ : R, a = h ? "shrink" : "expand";
|
|
541
543
|
}
|
|
542
544
|
let w = m, E = m, p = this.drawX;
|
|
543
545
|
(this.align === "center" || this.align === "right") && (p = this.drawX + (this.visibleWidth - w - 2 * e) / 2, this.align = "left");
|
|
@@ -606,31 +608,31 @@ class vt extends qt {
|
|
|
606
608
|
FINDER_CELL_BG_COLOR: w
|
|
607
609
|
} = this.ctx.config;
|
|
608
610
|
if (this.cellType === "footer") {
|
|
609
|
-
let
|
|
611
|
+
let S = h, T = l;
|
|
610
612
|
if (typeof o == "function") {
|
|
611
|
-
const M = o, { backgroundColor:
|
|
613
|
+
const M = o, { backgroundColor: O, color: A, font: H } = M({
|
|
612
614
|
row: this.row,
|
|
613
615
|
rowIndex: this.rowIndex,
|
|
614
616
|
colIndex: this.colIndex,
|
|
615
617
|
column: this.column,
|
|
616
618
|
value: this.getValue()
|
|
617
619
|
}) || {};
|
|
618
|
-
|
|
620
|
+
O && (S = O), A && (T = A), H && (this.drawTextFont = H);
|
|
619
621
|
}
|
|
620
|
-
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor =
|
|
622
|
+
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = S, this.drawTextColor = T;
|
|
621
623
|
return;
|
|
622
624
|
}
|
|
623
625
|
let E = "transparent";
|
|
624
626
|
const p = this.ctx.hoverCell, y = this.ctx.currentCell;
|
|
625
627
|
let b = this.rowIndex, C = this.rowIndex;
|
|
626
628
|
if (this.rowspan !== 1 && (u || d)) {
|
|
627
|
-
const
|
|
629
|
+
const S = this.getSpanInfo(), { yArr: T } = S;
|
|
628
630
|
b = T[0], C = T[1];
|
|
629
631
|
}
|
|
630
632
|
u && p && (p.rowKey === this.rowKey && (E = x), p.rowIndex >= b && p.rowIndex <= C && (E = x)), d && y && (y.rowKey === this.rowKey && (E = f), y.rowIndex >= b && y.rowIndex <= C && (E = f)), this.drawCellSkyBgColor = E;
|
|
631
|
-
let R = e,
|
|
632
|
-
if (this.ctx.database.getReadonly(this.rowKey, this.key) || (R = i,
|
|
633
|
-
const
|
|
633
|
+
let R = e, _ = a;
|
|
634
|
+
if (this.ctx.database.getReadonly(this.rowKey, this.key) || (R = i, _ = r), g && (this.rowIndex % 2 ? R = m : R = e), typeof s == "function") {
|
|
635
|
+
const S = s, { backgroundColor: T, color: M, font: O } = S({
|
|
634
636
|
row: this.row,
|
|
635
637
|
rowIndex: this.rowIndex,
|
|
636
638
|
colIndex: this.colIndex,
|
|
@@ -638,10 +640,10 @@ class vt extends qt {
|
|
|
638
640
|
isHasChanged: this.isHasChanged,
|
|
639
641
|
value: this.getValue()
|
|
640
642
|
}) || {};
|
|
641
|
-
T && (R = T), M && (
|
|
643
|
+
T && (R = T), M && (_ = M), O && (this.drawTextFont = O);
|
|
642
644
|
}
|
|
643
|
-
const { rowIndex:
|
|
644
|
-
|
|
645
|
+
const { rowIndex: L, colIndex: v, type: I } = this.ctx.finderBar;
|
|
646
|
+
L === this.rowIndex && v === this.colIndex && I === "body" && (R = w), this.drawCellBgColor = R, this.drawTextColor = _;
|
|
645
647
|
}
|
|
646
648
|
updateSelection() {
|
|
647
649
|
const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: a, rowIndex: l, rowKey: h } = this;
|
|
@@ -730,7 +732,7 @@ class vt extends qt {
|
|
|
730
732
|
* @returns
|
|
731
733
|
*/
|
|
732
734
|
getDisplayText() {
|
|
733
|
-
return this.cellType === "footer" ? this.renderFooter || this.text === null || this.text === void 0 ? "" : this.text : this.rowspan === 0 || this.colspan === 0 || this.render || this.type === "index-selection" && (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === this.rowIndex || ["checkbox-disabled", "checkbox-check"].includes(this.drawSelectionImageName)) || this.text === null || this.text === void 0 ? "" : `${this.text}`;
|
|
735
|
+
return this.cellType === "footer" ? this.renderFooter && this.renderFooterType === "default" || this.text === null || this.text === void 0 ? "" : this.text : this.rowspan === 0 || this.colspan === 0 || this.render && this.renderType === "default" || this.type === "index-selection" && (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === this.rowIndex || ["checkbox-disabled", "checkbox-check"].includes(this.drawSelectionImageName)) || this.text === null || this.text === void 0 ? "" : `${this.text}`;
|
|
734
736
|
}
|
|
735
737
|
/**
|
|
736
738
|
* 获取文本
|
|
@@ -791,7 +793,7 @@ class vt extends qt {
|
|
|
791
793
|
left: `${Math.round(e - 1)}px`,
|
|
792
794
|
top: `${Math.round(i - 1)}px`,
|
|
793
795
|
width: `${this.visibleWidth}px`,
|
|
794
|
-
height: this.autoRowHeight ? "auto" : `${this.visibleHeight}px`,
|
|
796
|
+
height: this.autoRowHeight && this.renderType === "default" ? "auto" : `${this.visibleHeight}px`,
|
|
795
797
|
// height: `${this.visibleHeight}px`,
|
|
796
798
|
// minHeight: `${this.visibleHeight}px`,
|
|
797
799
|
pointerEvents: "initial",
|
|
@@ -1020,7 +1022,7 @@ class vt extends qt {
|
|
|
1020
1022
|
}
|
|
1021
1023
|
}
|
|
1022
1024
|
}
|
|
1023
|
-
class
|
|
1025
|
+
class Re {
|
|
1024
1026
|
constructor(t, e) {
|
|
1025
1027
|
n(this, "ctx");
|
|
1026
1028
|
n(this, "data");
|
|
@@ -1066,7 +1068,7 @@ class be {
|
|
|
1066
1068
|
// 初始化默认不忽略清空改变值和校验map
|
|
1067
1069
|
init(t = !0) {
|
|
1068
1070
|
this.ctx.paint.clearTextCache(), this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear(), this.maxRowHeightCellMap.clear();
|
|
1069
|
-
const e = this.getColumns(), i =
|
|
1071
|
+
const e = this.getColumns(), i = Q(e);
|
|
1070
1072
|
if (this.ctx.hasSelection = i.some((s) => s.type === "selection"), this.ctx.hasTree = i.some((s) => s.type === "tree"), t) {
|
|
1071
1073
|
this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear();
|
|
1072
1074
|
const { ROW_KEY: s } = this.ctx.config;
|
|
@@ -1097,7 +1099,7 @@ class be {
|
|
|
1097
1099
|
t.forEach((f, u) => {
|
|
1098
1100
|
var y;
|
|
1099
1101
|
d !== "children" && (f.children = f[d]);
|
|
1100
|
-
const x = f[o], g = x != null ? `${x}` :
|
|
1102
|
+
const x = f[o], g = x != null ? `${x}` : jt();
|
|
1101
1103
|
this.itemRowKeyMap.set(f, g);
|
|
1102
1104
|
const m = f._height || a, w = f._readonly;
|
|
1103
1105
|
let E = !0;
|
|
@@ -1319,7 +1321,7 @@ class be {
|
|
|
1319
1321
|
} else if (s === "string") {
|
|
1320
1322
|
const d = String(a || ""), f = String(l || "");
|
|
1321
1323
|
h = d.localeCompare(f);
|
|
1322
|
-
} else s === "date" && (h =
|
|
1324
|
+
} else s === "date" && (h = Ie(a, l));
|
|
1323
1325
|
return i === "asc" ? h : -h;
|
|
1324
1326
|
});
|
|
1325
1327
|
}
|
|
@@ -1963,7 +1965,7 @@ class be {
|
|
|
1963
1965
|
value: this.getItemValue(t, e),
|
|
1964
1966
|
field: e,
|
|
1965
1967
|
fieldValue: this.getItemValue(t, e)
|
|
1966
|
-
}, u = new
|
|
1968
|
+
}, u = new ge(h).validate(d);
|
|
1967
1969
|
this.setValidationError(t, e, u), s(u);
|
|
1968
1970
|
} else
|
|
1969
1971
|
this.clearValidationError(t, e), s([]);
|
|
@@ -2013,16 +2015,16 @@ class be {
|
|
|
2013
2015
|
}
|
|
2014
2016
|
]
|
|
2015
2017
|
};
|
|
2016
|
-
let w = e, E = e, p = a, y = a, b = [], C = 0, R = 0,
|
|
2018
|
+
let w = e, E = e, p = a, y = a, b = [], C = 0, R = 0, _ = 0, L = 0;
|
|
2017
2019
|
if (d !== 1 && g) {
|
|
2018
|
-
|
|
2019
|
-
const v = l.reduce((I,
|
|
2020
|
-
const T = this.getItemValue(s,
|
|
2020
|
+
L = u;
|
|
2021
|
+
const v = l.reduce((I, S) => {
|
|
2022
|
+
const T = this.getItemValue(s, S) ?? "";
|
|
2021
2023
|
return `${I}${T}`;
|
|
2022
2024
|
}, "");
|
|
2023
2025
|
for (let I = e - 1; I >= 0; I--) {
|
|
2024
|
-
const
|
|
2025
|
-
const A = this.getItemValue(
|
|
2026
|
+
const S = this.rowIndexRowKeyMap.get(I) || "", T = l.reduce((M, O) => {
|
|
2027
|
+
const A = this.getItemValue(S, O) ?? "";
|
|
2026
2028
|
return `${M}${A}`;
|
|
2027
2029
|
}, "");
|
|
2028
2030
|
if (v === T)
|
|
@@ -2031,8 +2033,8 @@ class be {
|
|
|
2031
2033
|
break;
|
|
2032
2034
|
}
|
|
2033
2035
|
for (let I = e; I <= this.ctx.maxRowIndex; I++) {
|
|
2034
|
-
const
|
|
2035
|
-
const A = this.getItemValue(
|
|
2036
|
+
const S = this.rowIndexRowKeyMap.get(I) || "", T = l.reduce((M, O) => {
|
|
2037
|
+
const A = this.getItemValue(S, O) ?? "";
|
|
2036
2038
|
return `${M}${A}`;
|
|
2037
2039
|
}, "");
|
|
2038
2040
|
if (v === T)
|
|
@@ -2041,29 +2043,29 @@ class be {
|
|
|
2041
2043
|
break;
|
|
2042
2044
|
}
|
|
2043
2045
|
for (let I = w; I < e; I++) {
|
|
2044
|
-
const { height:
|
|
2045
|
-
C +=
|
|
2046
|
+
const { height: S } = this.positions[I];
|
|
2047
|
+
C += S;
|
|
2046
2048
|
}
|
|
2047
2049
|
for (let I = w; I <= E; I++) {
|
|
2048
|
-
const { height:
|
|
2049
|
-
|
|
2050
|
-
const T = this.rowIndexRowKeyMap.get(I) || "", { item: M } = this.rowKeyMap.get(T),
|
|
2050
|
+
const { height: S } = this.positions[I];
|
|
2051
|
+
_ += S;
|
|
2052
|
+
const T = this.rowIndexRowKeyMap.get(I) || "", { item: M } = this.rowKeyMap.get(T), O = this.getItemValue(T, i);
|
|
2051
2053
|
b.push({
|
|
2052
2054
|
rowKey: T,
|
|
2053
2055
|
key: i,
|
|
2054
|
-
value:
|
|
2056
|
+
value: O,
|
|
2055
2057
|
row: M
|
|
2056
2058
|
});
|
|
2057
2059
|
}
|
|
2058
2060
|
}
|
|
2059
2061
|
if (x !== 1 && m) {
|
|
2060
|
-
|
|
2062
|
+
_ = f;
|
|
2061
2063
|
for (let v = a - 1; v >= 0; v--) {
|
|
2062
2064
|
const I = this.getColumnByColIndex(v);
|
|
2063
2065
|
if (!I)
|
|
2064
2066
|
break;
|
|
2065
|
-
const
|
|
2066
|
-
if (
|
|
2067
|
+
const S = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
|
|
2068
|
+
if (S === T && h.includes(I.key))
|
|
2067
2069
|
p = v;
|
|
2068
2070
|
else
|
|
2069
2071
|
break;
|
|
@@ -2072,8 +2074,8 @@ class be {
|
|
|
2072
2074
|
const I = this.getColumnByColIndex(v);
|
|
2073
2075
|
if (!I)
|
|
2074
2076
|
break;
|
|
2075
|
-
const
|
|
2076
|
-
if (
|
|
2077
|
+
const S = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
|
|
2078
|
+
if (S === T && h.includes(I.key))
|
|
2077
2079
|
y = v;
|
|
2078
2080
|
else
|
|
2079
2081
|
break;
|
|
@@ -2088,7 +2090,7 @@ class be {
|
|
|
2088
2090
|
const I = this.getColumnByColIndex(v);
|
|
2089
2091
|
if (!I)
|
|
2090
2092
|
break;
|
|
2091
|
-
|
|
2093
|
+
L += I.width || 100, b.push({
|
|
2092
2094
|
rowKey: s,
|
|
2093
2095
|
key: I.key,
|
|
2094
2096
|
value: this.getItemValue(s, I.key),
|
|
@@ -2101,8 +2103,8 @@ class be {
|
|
|
2101
2103
|
yArr: [w, E],
|
|
2102
2104
|
rowspan: d,
|
|
2103
2105
|
colspan: x,
|
|
2104
|
-
height:
|
|
2105
|
-
width:
|
|
2106
|
+
height: _,
|
|
2107
|
+
width: L,
|
|
2106
2108
|
offsetTop: C,
|
|
2107
2109
|
offsetLeft: R,
|
|
2108
2110
|
dataList: b
|
|
@@ -2143,7 +2145,7 @@ class be {
|
|
|
2143
2145
|
// 获取虚拟单元格,只针对可见的
|
|
2144
2146
|
getVirtualBodyCell(t, e, i = !0) {
|
|
2145
2147
|
const s = this.getColumnByColIndex(e), o = this.getRowForRowIndex(t);
|
|
2146
|
-
return !s || !o ? void 0 : new
|
|
2148
|
+
return !s || !o ? void 0 : new _t(this.ctx, t, e, 0, 0, 0, 0, s, o.item, "body", i);
|
|
2147
2149
|
}
|
|
2148
2150
|
getVirtualBodyCellByKey(t, e) {
|
|
2149
2151
|
const i = this.getRowIndexForRowKey(t), s = this.getColIndexForKey(e);
|
|
@@ -2308,7 +2310,7 @@ class ve {
|
|
|
2308
2310
|
this.history = [], this.historyIndex = -1;
|
|
2309
2311
|
}
|
|
2310
2312
|
}
|
|
2311
|
-
class
|
|
2313
|
+
class _e {
|
|
2312
2314
|
constructor(t) {
|
|
2313
2315
|
n(this, "eventTasks", /* @__PURE__ */ new Set());
|
|
2314
2316
|
n(this, "ctx");
|
|
@@ -2390,7 +2392,7 @@ class Ie {
|
|
|
2390
2392
|
}
|
|
2391
2393
|
}
|
|
2392
2394
|
}
|
|
2393
|
-
class
|
|
2395
|
+
class Se {
|
|
2394
2396
|
constructor() {
|
|
2395
2397
|
n(this, "events", /* @__PURE__ */ new Map());
|
|
2396
2398
|
}
|
|
@@ -2428,7 +2430,7 @@ class Re {
|
|
|
2428
2430
|
this.events.clear();
|
|
2429
2431
|
}
|
|
2430
2432
|
}
|
|
2431
|
-
class
|
|
2433
|
+
class Te {
|
|
2432
2434
|
constructor(t) {
|
|
2433
2435
|
n(this, "ctx");
|
|
2434
2436
|
n(this, "textCacheMap", /* @__PURE__ */ new Map());
|
|
@@ -2544,33 +2546,33 @@ class _e {
|
|
|
2544
2546
|
const b = Math.round((o - 2 * d) / E);
|
|
2545
2547
|
let C = this.wrapText(t, p, r.cacheTextKey), R = Math.min(C.length, Math.max(b, 1));
|
|
2546
2548
|
u === "auto" && x ? R = C.length : typeof u == "number" && u < R && u !== 1 ? R = u : (u === 1 && (C = [t], R = 1), u === "auto" && b === 1 && (C = [t], R = 1));
|
|
2547
|
-
let
|
|
2548
|
-
const
|
|
2549
|
-
f === "middle" ?
|
|
2549
|
+
let _ = i + d;
|
|
2550
|
+
const L = Math.round(R * E);
|
|
2551
|
+
f === "middle" ? _ = i + (o - L) / 2 : f === "bottom" && (_ = i + o - L - d);
|
|
2550
2552
|
let v = e + d + g;
|
|
2551
2553
|
l === "center" ? v = e + s / 2 : l === "right" && (v = e + s - d - m);
|
|
2552
|
-
for (let
|
|
2553
|
-
const T = C[
|
|
2554
|
-
if (this.ctx.textBaseline = "top",
|
|
2555
|
-
const A = C.slice(
|
|
2554
|
+
for (let S = 0; S < C.length; S++) {
|
|
2555
|
+
const T = C[S], M = _ + S * E;
|
|
2556
|
+
if (this.ctx.textBaseline = "top", S === R - 1) {
|
|
2557
|
+
const A = C.slice(S).join(""), { _text: H, ellipsis: D } = this.handleEllipsis(A, s, d, a);
|
|
2556
2558
|
this.ctx.fillText(H, v, M), y = D;
|
|
2557
2559
|
break;
|
|
2558
2560
|
}
|
|
2559
2561
|
this.ctx.fillText(T, v, M);
|
|
2560
2562
|
}
|
|
2561
2563
|
if (r.textCallback && C.length) {
|
|
2562
|
-
const
|
|
2563
|
-
let M = v,
|
|
2564
|
-
l === "center" ? (M = v - T / 2,
|
|
2564
|
+
const S = C.reduce((H, D) => Math.max(H, this.ctx.measureText(D).width), 0), T = Math.round(S);
|
|
2565
|
+
let M = v, O = v + T;
|
|
2566
|
+
l === "center" ? (M = v - T / 2, O = v + T / 2) : l === "right" && (M = v - T, O = v);
|
|
2565
2567
|
const A = {
|
|
2566
2568
|
x: v,
|
|
2567
|
-
y:
|
|
2569
|
+
y: _,
|
|
2568
2570
|
width: T,
|
|
2569
|
-
height:
|
|
2571
|
+
height: L,
|
|
2570
2572
|
left: M,
|
|
2571
|
-
right:
|
|
2572
|
-
top:
|
|
2573
|
-
bottom:
|
|
2573
|
+
right: O,
|
|
2574
|
+
top: _,
|
|
2575
|
+
bottom: _ + L
|
|
2574
2576
|
};
|
|
2575
2577
|
r.textCallback(A);
|
|
2576
2578
|
}
|
|
@@ -2656,7 +2658,7 @@ class _e {
|
|
|
2656
2658
|
};
|
|
2657
2659
|
}
|
|
2658
2660
|
}
|
|
2659
|
-
class
|
|
2661
|
+
class Bt {
|
|
2660
2662
|
constructor(t) {
|
|
2661
2663
|
n(this, "_config", {});
|
|
2662
2664
|
/** CSS 类名前缀 */
|
|
@@ -3000,6 +3002,10 @@ class Nt {
|
|
|
3000
3002
|
n(this, "BEFORE_SET_SELECTOR_METHOD");
|
|
3001
3003
|
/** 设置填充器前回调 */
|
|
3002
3004
|
n(this, "BEFORE_SET_AUTOFILL_METHOD");
|
|
3005
|
+
/** 自定义表头右键菜单 */
|
|
3006
|
+
n(this, "BEFORE_HEADER_CONTEXT_MENU_METHOD");
|
|
3007
|
+
/** 自定义BODY右键菜单 */
|
|
3008
|
+
n(this, "BEFORE_BODY_CONTEXT_MENU_METHOD");
|
|
3003
3009
|
/** 数据复制前回调 */
|
|
3004
3010
|
n(this, "BEFORE_COPY_METHOD");
|
|
3005
3011
|
this._config = t, this.updateCssVar();
|
|
@@ -3013,14 +3019,14 @@ class Nt {
|
|
|
3013
3019
|
let t = {};
|
|
3014
3020
|
Object.keys(this).forEach((e) => {
|
|
3015
3021
|
if (e.endsWith("_COLOR") || e.endsWith("_FONT")) {
|
|
3016
|
-
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s =
|
|
3022
|
+
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = be(i);
|
|
3017
3023
|
s && (t[e] = s);
|
|
3018
3024
|
}
|
|
3019
3025
|
}), Object.assign(this, t, this._config);
|
|
3020
3026
|
}
|
|
3021
3027
|
}
|
|
3022
|
-
const nt = '<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>', Bt = '<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>', Se = It.replace('fill="currentColor" p-id="2016"', 'fill="#bec4c7" p-id="2016"'), Te = It.replace('fill="currentColor" p-id="2015"', 'fill="#bec4c7" p-id="2015"'), Zt = '<svg t="1724133395728" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2893" width="32" height="32"><path d="M512 226.8476541a19.82487759 19.82487759 0 0 1 14.66497778 5.70304692c3.80203107 3.82918865 5.70304692 8.71751457 5.70304693 14.66497779v122.20814825a19.82487759 19.82487759 0 0 1-5.70304693 14.66497778 19.82487759 19.82487759 0 0 1-14.66497778 5.70304691 19.82487759 19.82487759 0 0 1-14.66497778-5.70304691 19.82487759 19.82487759 0 0 1-5.70304693-14.66497778v-122.20814825a19.82487759 19.82487759 0 0 1 5.70304693-14.66497779 19.82487759 19.82487759 0 0 1 14.66497778-5.70304692z m0 407.36049415a19.82487759 19.82487759 0 0 1 14.66497778 5.70304691c3.80203107 3.82918865 5.70304692 8.71751457 5.70304693 14.66497778v122.20814827a19.82487759 19.82487759 0 0 1-5.70304693 14.66497776 19.82487759 19.82487759 0 0 1-14.66497778 5.70304693 19.82487759 19.82487759 0 0 1-14.66497778-5.70304693 19.82487759 19.82487759 0 0 1-5.70304693-14.66497776v-122.20814827a19.82487759 19.82487759 0 0 1 5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 14.66497778-5.70304691zM797.1523459 512a19.82487759 19.82487759 0 0 1-5.70304692 14.66497778 19.82487759 19.82487759 0 0 1-14.66497779 5.70304693h-122.20814825a19.82487759 19.82487759 0 0 1-14.66497778-5.70304693 19.82487759 19.82487759 0 0 1-5.70304691-14.66497778 19.82487759 19.82487759 0 0 1 5.70304691-14.66497778 19.82487759 19.82487759 0 0 1 14.66497778-5.70304693h122.20814825a19.82487759 19.82487759 0 0 1 14.66497779 5.70304693c3.80203107 3.82918865 5.70304692 8.71751457 5.70304692 14.66497778z m-407.36049415 0a19.82487759 19.82487759 0 0 1-5.70304691 14.66497778 19.82487759 19.82487759 0 0 1-14.66497778 5.70304693h-122.20814827a19.82487759 19.82487759 0 0 1-14.66497776-5.70304693 19.82487759 19.82487759 0 0 1-5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 14.66497776-5.70304693h122.20814827a19.82487759 19.82487759 0 0 1 14.66497778 5.70304693c3.80203107 3.82918865 5.70304692 8.71751457 5.70304691 14.66497778zM310.22076878 310.22076878a21.29137537 21.29137537 0 0 1 14.66497779-5.70304693c5.51294514 0 10.18401235 1.90101585 14.01320099 5.70304693l86.55052591 86.57768347a20.91117183 20.91117183 0 0 1 5.73020449 14.31193182 19.28172983 19.28172983 0 0 1-6.05609289 14.013201 19.11878565 19.11878565 0 0 1-14.013201 6.05609289 20.96548698 20.96548698 0 0 1-14.31193182-5.70304692L310.22076878 338.87178998a19.06447114 19.06447114 0 0 1-5.70304693-14.01320099c0-5.54010272 1.90101585-10.42842865 5.70304693-14.66497778z m288.32975775 288.32975775a19.79772001 19.79772001 0 0 1 14.3390894-6.35482371c5.29568642 0 10.04822572 2.11827457 14.31193182 6.38198066l86.57768347 86.55052651c3.80203107 3.80203107 5.70304692 8.47309828 5.70304691 14.01320102a19.55330372 19.55330372 0 0 1-6.05609225 14.31193182 19.66193339 19.66193339 0 0 1-14.31193245 6.05609288 19.01015661 19.01015661 0 0 1-14.01320099-5.70304692l-86.55052591-86.57768347a19.79772001 19.79772001 0 0 1-6.38198129-14.31193245c0-5.29568642 2.11827457-10.07538268 6.38198129-14.33908939zM713.77923122 310.22076878c3.80203107 4.26370672 5.70304692 9.15203265 5.70304693 14.66497779s-1.90101585 10.18401235-5.70304693 14.01320099l-86.57768347 86.55052591a20.91117183 20.91117183 0 0 1-14.31193182 5.73020449 19.28172983 19.28172983 0 0 1-14.013201-6.05609289 19.11878565 19.11878565 0 0 1-6.05609289-14.013201c0-5.29568642 1.90101585-10.07538268 5.70304692-14.31193182l86.57768348-86.57768347c3.80203107-3.80203107 8.50025585-5.70304692 14.01320099-5.70304693 5.54010272 0 10.40127108 1.90101585 14.66497779 5.70304693zM425.44947347 598.57768347a19.79772001 19.79772001 0 0 1 6.35482371 14.33908939c0 5.29568642-2.11827457 10.04822572-6.38198066 14.31193245L338.89894756 713.77923122a19.06447114 19.06447114 0 0 1-14.01320099 5.70304693 19.55330372 19.55330372 0 0 1-14.31193245-6.05609227 19.68909035 19.68909035 0 0 1-6.05609227-14.31193245 19.01015661 19.01015661 0 0 1 5.70304693-14.01320099l86.57768347-86.55052591a19.79772001 19.79772001 0 0 1 14.31193182-6.38198129c5.29568642 0 10.07538268 2.11827457 14.3390894 6.38198129z" fill="#000000" fill-opacity=".65" p-id="2894"></path></svg>';
|
|
3023
|
-
class
|
|
3028
|
+
const at = '<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>', Xt = '<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>', Yt = '<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>', St = '<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>', Oe = St.replace('fill="currentColor" p-id="2016"', 'fill="#bec4c7" p-id="2016"'), Le = St.replace('fill="currentColor" p-id="2015"', 'fill="#bec4c7" p-id="2015"'), te = '<svg t="1724133395728" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2893" width="32" height="32"><path d="M512 226.8476541a19.82487759 19.82487759 0 0 1 14.66497778 5.70304692c3.80203107 3.82918865 5.70304692 8.71751457 5.70304693 14.66497779v122.20814825a19.82487759 19.82487759 0 0 1-5.70304693 14.66497778 19.82487759 19.82487759 0 0 1-14.66497778 5.70304691 19.82487759 19.82487759 0 0 1-14.66497778-5.70304691 19.82487759 19.82487759 0 0 1-5.70304693-14.66497778v-122.20814825a19.82487759 19.82487759 0 0 1 5.70304693-14.66497779 19.82487759 19.82487759 0 0 1 14.66497778-5.70304692z m0 407.36049415a19.82487759 19.82487759 0 0 1 14.66497778 5.70304691c3.80203107 3.82918865 5.70304692 8.71751457 5.70304693 14.66497778v122.20814827a19.82487759 19.82487759 0 0 1-5.70304693 14.66497776 19.82487759 19.82487759 0 0 1-14.66497778 5.70304693 19.82487759 19.82487759 0 0 1-14.66497778-5.70304693 19.82487759 19.82487759 0 0 1-5.70304693-14.66497776v-122.20814827a19.82487759 19.82487759 0 0 1 5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 14.66497778-5.70304691zM797.1523459 512a19.82487759 19.82487759 0 0 1-5.70304692 14.66497778 19.82487759 19.82487759 0 0 1-14.66497779 5.70304693h-122.20814825a19.82487759 19.82487759 0 0 1-14.66497778-5.70304693 19.82487759 19.82487759 0 0 1-5.70304691-14.66497778 19.82487759 19.82487759 0 0 1 5.70304691-14.66497778 19.82487759 19.82487759 0 0 1 14.66497778-5.70304693h122.20814825a19.82487759 19.82487759 0 0 1 14.66497779 5.70304693c3.80203107 3.82918865 5.70304692 8.71751457 5.70304692 14.66497778z m-407.36049415 0a19.82487759 19.82487759 0 0 1-5.70304691 14.66497778 19.82487759 19.82487759 0 0 1-14.66497778 5.70304693h-122.20814827a19.82487759 19.82487759 0 0 1-14.66497776-5.70304693 19.82487759 19.82487759 0 0 1-5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 14.66497776-5.70304693h122.20814827a19.82487759 19.82487759 0 0 1 14.66497778 5.70304693c3.80203107 3.82918865 5.70304692 8.71751457 5.70304691 14.66497778zM310.22076878 310.22076878a21.29137537 21.29137537 0 0 1 14.66497779-5.70304693c5.51294514 0 10.18401235 1.90101585 14.01320099 5.70304693l86.55052591 86.57768347a20.91117183 20.91117183 0 0 1 5.73020449 14.31193182 19.28172983 19.28172983 0 0 1-6.05609289 14.013201 19.11878565 19.11878565 0 0 1-14.013201 6.05609289 20.96548698 20.96548698 0 0 1-14.31193182-5.70304692L310.22076878 338.87178998a19.06447114 19.06447114 0 0 1-5.70304693-14.01320099c0-5.54010272 1.90101585-10.42842865 5.70304693-14.66497778z m288.32975775 288.32975775a19.79772001 19.79772001 0 0 1 14.3390894-6.35482371c5.29568642 0 10.04822572 2.11827457 14.31193182 6.38198066l86.57768347 86.55052651c3.80203107 3.80203107 5.70304692 8.47309828 5.70304691 14.01320102a19.55330372 19.55330372 0 0 1-6.05609225 14.31193182 19.66193339 19.66193339 0 0 1-14.31193245 6.05609288 19.01015661 19.01015661 0 0 1-14.01320099-5.70304692l-86.55052591-86.57768347a19.79772001 19.79772001 0 0 1-6.38198129-14.31193245c0-5.29568642 2.11827457-10.07538268 6.38198129-14.33908939zM713.77923122 310.22076878c3.80203107 4.26370672 5.70304692 9.15203265 5.70304693 14.66497779s-1.90101585 10.18401235-5.70304693 14.01320099l-86.57768347 86.55052591a20.91117183 20.91117183 0 0 1-14.31193182 5.73020449 19.28172983 19.28172983 0 0 1-14.013201-6.05609289 19.11878565 19.11878565 0 0 1-6.05609289-14.013201c0-5.29568642 1.90101585-10.07538268 5.70304692-14.31193182l86.57768348-86.57768347c3.80203107-3.80203107 8.50025585-5.70304692 14.01320099-5.70304693 5.54010272 0 10.40127108 1.90101585 14.66497779 5.70304693zM425.44947347 598.57768347a19.79772001 19.79772001 0 0 1 6.35482371 14.33908939c0 5.29568642-2.11827457 10.04822572-6.38198066 14.31193245L338.89894756 713.77923122a19.06447114 19.06447114 0 0 1-14.01320099 5.70304693 19.55330372 19.55330372 0 0 1-14.31193245-6.05609227 19.68909035 19.68909035 0 0 1-6.05609227-14.31193245 19.01015661 19.01015661 0 0 1 5.70304693-14.01320099l86.57768347-86.55052591a19.79772001 19.79772001 0 0 1 14.31193182-6.38198129c5.29568642 0 10.07538268 2.11827457 14.3390894 6.38198129z" fill="#000000" fill-opacity=".65" p-id="2894"></path></svg>';
|
|
3029
|
+
class Me {
|
|
3024
3030
|
constructor(t) {
|
|
3025
3031
|
n(this, "ctx");
|
|
3026
3032
|
n(this, "list", [
|
|
@@ -3028,21 +3034,21 @@ class Oe {
|
|
|
3028
3034
|
name: "loading",
|
|
3029
3035
|
configName: "LOADING_ICON_SVG",
|
|
3030
3036
|
configColorName: "LOADING_ICON_COLOR",
|
|
3031
|
-
svg:
|
|
3037
|
+
svg: te,
|
|
3032
3038
|
color: "#4E5969"
|
|
3033
3039
|
},
|
|
3034
3040
|
{
|
|
3035
3041
|
name: "expand",
|
|
3036
3042
|
configName: "EXPAND_ICON_SVG",
|
|
3037
3043
|
configColorName: "EXPAND_ICON_COLOR",
|
|
3038
|
-
svg:
|
|
3044
|
+
svg: at,
|
|
3039
3045
|
color: "#4E5969"
|
|
3040
3046
|
},
|
|
3041
3047
|
{
|
|
3042
3048
|
name: "shrink",
|
|
3043
3049
|
configName: "SHRINK_ICON_SVG",
|
|
3044
3050
|
configColorName: "SHRINK_ICON_COLOR",
|
|
3045
|
-
svg:
|
|
3051
|
+
svg: Yt,
|
|
3046
3052
|
color: "#4E5969"
|
|
3047
3053
|
},
|
|
3048
3054
|
{
|
|
@@ -3056,7 +3062,7 @@ class Oe {
|
|
|
3056
3062
|
name: "checkbox-check",
|
|
3057
3063
|
configName: "CHECKBOX_CHECK_SVG",
|
|
3058
3064
|
configColorName: "CHECKBOX_COLOR",
|
|
3059
|
-
svg:
|
|
3065
|
+
svg: Xt,
|
|
3060
3066
|
color: "rgb(82,146,247)"
|
|
3061
3067
|
},
|
|
3062
3068
|
{
|
|
@@ -3069,7 +3075,7 @@ class Oe {
|
|
|
3069
3075
|
{
|
|
3070
3076
|
name: "checkbox-check-disabled",
|
|
3071
3077
|
configName: "CHECKBOX_CHECK_DISABLED_SVG",
|
|
3072
|
-
svg:
|
|
3078
|
+
svg: Xt,
|
|
3073
3079
|
color: "#DDE0EA"
|
|
3074
3080
|
},
|
|
3075
3081
|
{
|
|
@@ -3090,27 +3096,27 @@ class Oe {
|
|
|
3090
3096
|
name: "icon-select",
|
|
3091
3097
|
configName: "ICON_SELECT_SVG",
|
|
3092
3098
|
configColorName: "ICON_SELECT_COLOR",
|
|
3093
|
-
svg:
|
|
3099
|
+
svg: Yt,
|
|
3094
3100
|
color: "#4E5969"
|
|
3095
3101
|
},
|
|
3096
3102
|
{
|
|
3097
3103
|
name: "sort-asc",
|
|
3098
3104
|
configName: "SORT_ASC_ICON_SVG",
|
|
3099
3105
|
configColorName: "SORT_ICON_COLOR",
|
|
3100
|
-
svg:
|
|
3106
|
+
svg: Oe,
|
|
3101
3107
|
color: "rgb(82,146,247)"
|
|
3102
3108
|
},
|
|
3103
3109
|
{
|
|
3104
3110
|
name: "sort-desc",
|
|
3105
3111
|
configName: "SORT_DESC_ICON_SVG",
|
|
3106
3112
|
configColorName: "SORT_ICON_COLOR",
|
|
3107
|
-
svg:
|
|
3113
|
+
svg: Le,
|
|
3108
3114
|
color: "rgb(82,146,247)"
|
|
3109
3115
|
},
|
|
3110
3116
|
{
|
|
3111
3117
|
name: "sort-default",
|
|
3112
3118
|
configName: "SORTABLE_ICON_SVG",
|
|
3113
|
-
svg:
|
|
3119
|
+
svg: St,
|
|
3114
3120
|
color: "#bec4c7"
|
|
3115
3121
|
}
|
|
3116
3122
|
]);
|
|
@@ -3173,7 +3179,7 @@ class Oe {
|
|
|
3173
3179
|
return this.list.find((e) => e.name === t);
|
|
3174
3180
|
}
|
|
3175
3181
|
}
|
|
3176
|
-
class
|
|
3182
|
+
class yt extends Qt {
|
|
3177
3183
|
constructor(e, i, s, o, r, a, l) {
|
|
3178
3184
|
super(e, s, o, r, a, "header", l.fixed);
|
|
3179
3185
|
n(this, "align");
|
|
@@ -3235,7 +3241,8 @@ class mt extends qt {
|
|
|
3235
3241
|
n(this, "drawSortImageHeight", 0);
|
|
3236
3242
|
n(this, "drawSortImageName", "");
|
|
3237
3243
|
n(this, "drawSortImageSource");
|
|
3238
|
-
|
|
3244
|
+
n(this, "renderHeaderType", "default");
|
|
3245
|
+
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 = jt(), this.overflowTooltipShow = l.overflowTooltipHeaderShow !== !1, this.hasChildren = l.children && l.children.length > 0 || !1, this.render = l.renderHeader, this.maxLineClampHeader = l.maxLineClampHeader || "auto", this.renderHeaderType = l.renderHeaderType || "default";
|
|
3239
3246
|
}
|
|
3240
3247
|
/**
|
|
3241
3248
|
* 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
|
|
@@ -3362,7 +3369,7 @@ class mt extends qt {
|
|
|
3362
3369
|
));
|
|
3363
3370
|
}
|
|
3364
3371
|
getText() {
|
|
3365
|
-
return this.render || ["", null, void 0].includes(this.text) ? "" : `${this.text}`;
|
|
3372
|
+
return this.render && this.renderHeaderType === "default" || ["", null, void 0].includes(this.text) ? "" : `${this.text}`;
|
|
3366
3373
|
}
|
|
3367
3374
|
/**
|
|
3368
3375
|
* 获取样式
|
|
@@ -3381,7 +3388,7 @@ class mt extends qt {
|
|
|
3381
3388
|
};
|
|
3382
3389
|
}
|
|
3383
3390
|
}
|
|
3384
|
-
class
|
|
3391
|
+
class Ae {
|
|
3385
3392
|
constructor(t) {
|
|
3386
3393
|
n(this, "ctx");
|
|
3387
3394
|
n(this, "visibleHoverCell");
|
|
@@ -3504,7 +3511,7 @@ class Le {
|
|
|
3504
3511
|
t.drawSelectionImageWidth,
|
|
3505
3512
|
t.drawSelectionImageHeight
|
|
3506
3513
|
))
|
|
3507
|
-
if (t instanceof
|
|
3514
|
+
if (t instanceof yt)
|
|
3508
3515
|
t.drawSelectionImageName === "checkbox-uncheck" || t.drawSelectionImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawSelectionImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
|
|
3509
3516
|
else {
|
|
3510
3517
|
if (!this.ctx.database.getRowSelectable(t.rowKey))
|
|
@@ -3569,7 +3576,7 @@ class Le {
|
|
|
3569
3576
|
*/
|
|
3570
3577
|
imageEnterAndLeave(t, e) {
|
|
3571
3578
|
const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
|
|
3572
|
-
if (t instanceof
|
|
3579
|
+
if (t instanceof yt) {
|
|
3573
3580
|
if (t.drawSelectionImageSource && this.isInsideElement(
|
|
3574
3581
|
r,
|
|
3575
3582
|
o,
|
|
@@ -3593,7 +3600,7 @@ class Le {
|
|
|
3593
3600
|
return;
|
|
3594
3601
|
}
|
|
3595
3602
|
}
|
|
3596
|
-
if (t instanceof
|
|
3603
|
+
if (t instanceof _t) {
|
|
3597
3604
|
if (t.drawSelectionImageSource && this.isInsideElement(
|
|
3598
3605
|
r,
|
|
3599
3606
|
o,
|
|
@@ -3690,7 +3697,7 @@ class Le {
|
|
|
3690
3697
|
this.resizeObserver.unobserve(this.ctx.stageElement), this.mutationObserver.disconnect();
|
|
3691
3698
|
}
|
|
3692
3699
|
}
|
|
3693
|
-
class
|
|
3700
|
+
class He {
|
|
3694
3701
|
constructor(t, e) {
|
|
3695
3702
|
n(this, "eventBus");
|
|
3696
3703
|
n(this, "eventBrowser");
|
|
@@ -3835,10 +3842,10 @@ class Me {
|
|
|
3835
3842
|
loadingElement: h,
|
|
3836
3843
|
contextMenuElement: d
|
|
3837
3844
|
} = t;
|
|
3838
|
-
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = h, this.contextMenuElement = d, this.config = new
|
|
3845
|
+
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = h, this.contextMenuElement = d, this.config = new Bt(e.config || {}), this.eventBus = new Se(), this.eventBrowser = new _e(this), this.eventTable = new Ae(this), this.paint = new Te(this.canvasElement), this.database = new Re(this, e), this.history = new ve(this), this.icons = new Me(this);
|
|
3839
3846
|
}
|
|
3840
3847
|
setConfig(t) {
|
|
3841
|
-
this.config = new
|
|
3848
|
+
this.config = new Bt(t);
|
|
3842
3849
|
}
|
|
3843
3850
|
setItemValueByEditor(t, e, i, s = !0, o = !0, r = !0) {
|
|
3844
3851
|
if (this.config.ENABLE_MERGE_CELL_LINK) {
|
|
@@ -3969,7 +3976,7 @@ class Me {
|
|
|
3969
3976
|
this.eventTable.destroy(), this.eventBrowser.destroy(), this.eventBus.destroy();
|
|
3970
3977
|
}
|
|
3971
3978
|
}
|
|
3972
|
-
class
|
|
3979
|
+
class Kt {
|
|
3973
3980
|
constructor(t, e) {
|
|
3974
3981
|
n(this, "ctx");
|
|
3975
3982
|
n(this, "type");
|
|
@@ -4096,7 +4103,7 @@ class Xt {
|
|
|
4096
4103
|
}), this.ctx.scrollerFocus = this.isFocus;
|
|
4097
4104
|
}
|
|
4098
4105
|
}
|
|
4099
|
-
class
|
|
4106
|
+
class De {
|
|
4100
4107
|
// 垂直滚动定时器
|
|
4101
4108
|
constructor(t) {
|
|
4102
4109
|
n(this, "ctx");
|
|
@@ -4109,7 +4116,7 @@ class Ae {
|
|
|
4109
4116
|
n(this, "timerX", 0);
|
|
4110
4117
|
// 水平滚动定时器
|
|
4111
4118
|
n(this, "timerY", 0);
|
|
4112
|
-
this.ctx = t, this.verticalScrollbar = new
|
|
4119
|
+
this.ctx = t, this.verticalScrollbar = new Kt(t, "vertical"), this.horizontalScrollbar = new Kt(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) => {
|
|
4113
4120
|
this.onTouchstart(e);
|
|
4114
4121
|
}), this.ctx.on("setScroll", (e, i) => {
|
|
4115
4122
|
this.setScroll(e, i);
|
|
@@ -4211,7 +4218,7 @@ class Ae {
|
|
|
4211
4218
|
t && (this.adjustPositionX = "", this.timerX && (clearInterval(this.timerX), this.timerX = 0)), e && (this.adjustPositionY = "", this.timerY && (clearInterval(this.timerY), this.timerY = 0));
|
|
4212
4219
|
}
|
|
4213
4220
|
}
|
|
4214
|
-
class
|
|
4221
|
+
class Ne {
|
|
4215
4222
|
constructor(t, e) {
|
|
4216
4223
|
n(this, "root");
|
|
4217
4224
|
n(this, "key");
|
|
@@ -4251,7 +4258,7 @@ class He {
|
|
|
4251
4258
|
return null;
|
|
4252
4259
|
}
|
|
4253
4260
|
}
|
|
4254
|
-
class
|
|
4261
|
+
class ke {
|
|
4255
4262
|
constructor(t) {
|
|
4256
4263
|
n(this, "ctx");
|
|
4257
4264
|
// 上下文
|
|
@@ -4297,7 +4304,7 @@ class De {
|
|
|
4297
4304
|
n(this, "renderFixedCellHeaders", []);
|
|
4298
4305
|
this.ctx = t, this.ctx.on(
|
|
4299
4306
|
"resetHeader",
|
|
4300
|
-
|
|
4307
|
+
vt(() => {
|
|
4301
4308
|
this.init(), this.ctx.clearSelector(), this.ctx.emit("draw");
|
|
4302
4309
|
}, 100)
|
|
4303
4310
|
), this.init(), this.initResizeColumn(), this.initDragColumn();
|
|
@@ -4310,13 +4317,13 @@ class De {
|
|
|
4310
4317
|
const f = this.ctx.database.getColumns();
|
|
4311
4318
|
this.columns = f;
|
|
4312
4319
|
}
|
|
4313
|
-
this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleColumns =
|
|
4314
|
-
const s =
|
|
4320
|
+
this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleColumns = qt(this.columns);
|
|
4321
|
+
const s = rt(this.visibleColumns), o = Q(this.visibleColumns);
|
|
4315
4322
|
this.height = e * s, this.visibleHeight = this.height, this.width = o.reduce((f, u) => {
|
|
4316
4323
|
const x = u.width || 100, { maxWidth: g, minWidth: m } = u;
|
|
4317
4324
|
return g && x > g ? f + g : m && x < m ? f + m : f + x;
|
|
4318
4325
|
}, 0), this.columnIndex = 0, this.resizeNum = 0;
|
|
4319
|
-
const r =
|
|
4326
|
+
const r = we(nt(this.visibleColumns, s));
|
|
4320
4327
|
this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
|
|
4321
4328
|
const a = this.ctx.containerElement.getBoundingClientRect();
|
|
4322
4329
|
this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(a.width) : this.ctx.stageWidth = Math.min(
|
|
@@ -4381,7 +4388,7 @@ class De {
|
|
|
4381
4388
|
if (this.dragingCell && this.dragTarget) {
|
|
4382
4389
|
const t = (h, d = {}) => (h.forEach((f, u) => {
|
|
4383
4390
|
f.children && t(f.children, d), d[f.key] = u;
|
|
4384
|
-
}), d), e = this.ctx.database.getColumns(), i =
|
|
4391
|
+
}), d), e = this.ctx.database.getColumns(), i = nt(e, rt(e)), s = new Ne(i, {
|
|
4385
4392
|
key: "key",
|
|
4386
4393
|
// 节点唯一标识字段(对应我们之前的field)
|
|
4387
4394
|
childrenKey: "children"
|
|
@@ -4475,7 +4482,7 @@ class De {
|
|
|
4475
4482
|
columns: t,
|
|
4476
4483
|
customHeader: e
|
|
4477
4484
|
} : {
|
|
4478
|
-
columns:
|
|
4485
|
+
columns: nt(t, rt(t)),
|
|
4479
4486
|
customHeader: e
|
|
4480
4487
|
};
|
|
4481
4488
|
}
|
|
@@ -4486,8 +4493,8 @@ class De {
|
|
|
4486
4493
|
for (let r = 0; r < i; r++) {
|
|
4487
4494
|
const a = t[r], l = o * (a.rowspan || 0), h = o * (a.level || 0);
|
|
4488
4495
|
let { minWidth: d, maxWidth: f } = a, u = a.width || 100;
|
|
4489
|
-
d && u < d && (u = d), f && u > f && (u = f), a.children && (u =
|
|
4490
|
-
const x = new
|
|
4496
|
+
d && u < d && (u = d), f && u > f && (u = f), a.children && (u = Q(a.children).reduce((m, w) => m + ((w == null ? void 0 : w.width) || 100), 0));
|
|
4497
|
+
const x = new yt(this.ctx, this.columnIndex, s, h, u, l, a);
|
|
4491
4498
|
this.ctx.database.setHeader(a.key, x), this.allCellHeaders.push(x), a.children || (this.leafCellHeaders.push(x), x.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(x) : a.fixed === "right" ? this.fixedRightCellHeaders.push(x) : this.centerCellHeaders.push(x), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += u;
|
|
4492
4499
|
}
|
|
4493
4500
|
}
|
|
@@ -4606,7 +4613,7 @@ class De {
|
|
|
4606
4613
|
}), this.drawBottomLine(), this.drawTipLine(), this.drawDragTip();
|
|
4607
4614
|
}
|
|
4608
4615
|
}
|
|
4609
|
-
class
|
|
4616
|
+
class ee {
|
|
4610
4617
|
constructor(t, e, i = 0, s = 0, o = 0, r = 0, a, l = "body") {
|
|
4611
4618
|
n(this, "ctx");
|
|
4612
4619
|
n(this, "x", 0);
|
|
@@ -4627,7 +4634,7 @@ class Jt {
|
|
|
4627
4634
|
update() {
|
|
4628
4635
|
const { header: t } = this.ctx, e = [], i = [], s = [], o = [];
|
|
4629
4636
|
t.renderLeafCellHeaders.forEach((r) => {
|
|
4630
|
-
const a = new
|
|
4637
|
+
const a = new _t(
|
|
4631
4638
|
this.ctx,
|
|
4632
4639
|
this.rowIndex,
|
|
4633
4640
|
r.colIndex,
|
|
@@ -4670,7 +4677,7 @@ class Jt {
|
|
|
4670
4677
|
});
|
|
4671
4678
|
}
|
|
4672
4679
|
}
|
|
4673
|
-
class
|
|
4680
|
+
class Be {
|
|
4674
4681
|
constructor(t) {
|
|
4675
4682
|
n(this, "resizeTarget", null);
|
|
4676
4683
|
//调整行大小的目标
|
|
@@ -4732,12 +4739,12 @@ class Ne {
|
|
|
4732
4739
|
E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
|
|
4733
4740
|
let b = this.ctx.stageHeight - e.height - r;
|
|
4734
4741
|
o ? this.visibleHeight = b - m : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = x;
|
|
4735
|
-
const C = window.devicePixelRatio || 1, R = this.ctx.stageWidth * C,
|
|
4736
|
-
t.width = Math.round(R), t.height = Math.round(
|
|
4737
|
-
const
|
|
4742
|
+
const C = window.devicePixelRatio || 1, R = this.ctx.stageWidth * C, _ = this.ctx.stageHeight * C;
|
|
4743
|
+
t.width = Math.round(R), t.height = Math.round(_);
|
|
4744
|
+
const L = this.data.length ? "not-empty" : "empty";
|
|
4738
4745
|
this.ctx.emit("emptyChange", {
|
|
4739
|
-
isEmpty:
|
|
4740
|
-
type:
|
|
4746
|
+
isEmpty: L,
|
|
4747
|
+
type: L,
|
|
4741
4748
|
headerHeight: e.height,
|
|
4742
4749
|
bodyHeight: this.height,
|
|
4743
4750
|
footerHeight: m,
|
|
@@ -4869,7 +4876,7 @@ class Ne {
|
|
|
4869
4876
|
this.headIndex = Math.max(0, l), this.tailIndex = Math.min(this.ctx.maxRowIndex, h + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
|
|
4870
4877
|
const d = [];
|
|
4871
4878
|
for (let f = 0; f < this.visibleRows.length; f++) {
|
|
4872
|
-
const u = this.headIndex + f, x = this.visibleRows[f], { height: g, top: m } = this.ctx.database.getPositionForRowIndex(u), w = new
|
|
4879
|
+
const u = this.headIndex + f, x = this.visibleRows[f], { height: g, top: m } = this.ctx.database.getPositionForRowIndex(u), w = new ee(this.ctx, u, 0, m + this.y, t.width, g, x);
|
|
4873
4880
|
d.push(w);
|
|
4874
4881
|
}
|
|
4875
4882
|
this.renderRows = d, this.ctx.body.renderRows = d;
|
|
@@ -4899,7 +4906,7 @@ class Ne {
|
|
|
4899
4906
|
}), this.drawTipLine();
|
|
4900
4907
|
}
|
|
4901
4908
|
}
|
|
4902
|
-
class
|
|
4909
|
+
class Xe {
|
|
4903
4910
|
constructor(t) {
|
|
4904
4911
|
n(this, "ctx");
|
|
4905
4912
|
n(this, "renderRows", []);
|
|
@@ -4954,7 +4961,7 @@ class ke {
|
|
|
4954
4961
|
let e = this.y;
|
|
4955
4962
|
const i = [];
|
|
4956
4963
|
this.data.forEach((s, o) => {
|
|
4957
|
-
const r = new
|
|
4964
|
+
const r = new ee(this.ctx, o, 0, e, this.width, t, s, "footer");
|
|
4958
4965
|
e += t, i.push(r);
|
|
4959
4966
|
}), this.renderRows = i, this.ctx.footer.renderRows = this.renderRows;
|
|
4960
4967
|
}
|
|
@@ -4980,7 +4987,7 @@ class ke {
|
|
|
4980
4987
|
}), this.drawTopLine();
|
|
4981
4988
|
}
|
|
4982
4989
|
}
|
|
4983
|
-
class
|
|
4990
|
+
class Ye {
|
|
4984
4991
|
constructor(t) {
|
|
4985
4992
|
n(this, "isCut", !1);
|
|
4986
4993
|
n(this, "isMultipleRow", !1);
|
|
@@ -4992,7 +4999,7 @@ class Be {
|
|
|
4992
4999
|
this.moveFocus(t);
|
|
4993
5000
|
}), this.ctx.on(
|
|
4994
5001
|
"mousemove",
|
|
4995
|
-
|
|
5002
|
+
vt((t) => {
|
|
4996
5003
|
var e;
|
|
4997
5004
|
(e = this.ctx.focusCellHeader) != null && e.fixed || !this.ctx.dragHeaderIng && this.ctx.selectorMove && this.ctx.startAdjustPosition(t);
|
|
4998
5005
|
}, 100)
|
|
@@ -5111,14 +5118,14 @@ class Be {
|
|
|
5111
5118
|
E === p && y === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(x, E), Math.min(g, p)], r = [Math.max(m, y), Math.min(w, b)];
|
|
5112
5119
|
const { BEFORE_SET_SELECTOR_METHOD: C } = this.ctx.config;
|
|
5113
5120
|
if (typeof C == "function") {
|
|
5114
|
-
const
|
|
5121
|
+
const _ = C({
|
|
5115
5122
|
focusCell: this.ctx.focusCell,
|
|
5116
5123
|
xArr: o,
|
|
5117
5124
|
yArr: r
|
|
5118
5125
|
});
|
|
5119
|
-
if (!
|
|
5126
|
+
if (!_)
|
|
5120
5127
|
return;
|
|
5121
|
-
o =
|
|
5128
|
+
o = _.xArr, r = _.yArr;
|
|
5122
5129
|
}
|
|
5123
5130
|
this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && y === 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");
|
|
5124
5131
|
}
|
|
@@ -5287,7 +5294,7 @@ class Be {
|
|
|
5287
5294
|
return;
|
|
5288
5295
|
t = a.data;
|
|
5289
5296
|
}
|
|
5290
|
-
const o =
|
|
5297
|
+
const o = pe(t);
|
|
5291
5298
|
navigator.clipboard ? navigator.clipboard.writeText(o).then(() => {
|
|
5292
5299
|
this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
|
|
5293
5300
|
xArr: this.ctx.selector.xArrCopy,
|
|
@@ -5332,7 +5339,7 @@ class Be {
|
|
|
5332
5339
|
if (this.ctx.selector.enable && t) {
|
|
5333
5340
|
const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
|
|
5334
5341
|
navigator.clipboard.readText().then(async (o) => {
|
|
5335
|
-
let r =
|
|
5342
|
+
let r = Ee(o);
|
|
5336
5343
|
const a = [i, i + r[0].length - 1], l = [e, e + r.length - 1], [h, d] = l, [f, u] = a, x = d - this.ctx.maxRowIndex, g = u - this.ctx.maxColIndex;
|
|
5337
5344
|
(x > 0 || g > 0) && this.ctx.emit("onPastedDataOverflow", {
|
|
5338
5345
|
maxY: d,
|
|
@@ -5356,16 +5363,16 @@ class Be {
|
|
|
5356
5363
|
for (let y = 0; y <= r.length - 1; y++) {
|
|
5357
5364
|
const b = r[y].length;
|
|
5358
5365
|
for (let C = 0; C <= b - 1; C++) {
|
|
5359
|
-
const R = y + e,
|
|
5366
|
+
const R = y + e, _ = C + i, L = r[y][C], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
5360
5367
|
R,
|
|
5361
|
-
|
|
5368
|
+
_
|
|
5362
5369
|
);
|
|
5363
5370
|
if (v) {
|
|
5364
|
-
const { rowKey: I, key:
|
|
5365
|
-
this.ctx.database.getReadonly(I,
|
|
5371
|
+
const { rowKey: I, key: S } = v;
|
|
5372
|
+
this.ctx.database.getReadonly(I, S) || (s.add(I), w.push({
|
|
5366
5373
|
rowKey: I,
|
|
5367
|
-
key:
|
|
5368
|
-
value:
|
|
5374
|
+
key: S,
|
|
5375
|
+
value: L,
|
|
5369
5376
|
row: {}
|
|
5370
5377
|
//内部有设置
|
|
5371
5378
|
}));
|
|
@@ -5468,18 +5475,18 @@ class Be {
|
|
|
5468
5475
|
return;
|
|
5469
5476
|
g && this.ctx.onlyMergeCell && i.updateSpanInfo();
|
|
5470
5477
|
const { drawX: m, drawY: w, width: E, height: p, fixed: y } = i, b = o - m + 1, C = i.drawX + E - (e - s) + 1;
|
|
5471
|
-
let R = r.height - w,
|
|
5472
|
-
|
|
5473
|
-
let
|
|
5474
|
-
u && (x === "top" ? R = r.height + a.height - w :
|
|
5475
|
-
const v = w +
|
|
5476
|
-
let I = h,
|
|
5477
|
-
C > 0 && !y ? I = Math.floor(h + C) : b > 0 && !y && (I = Math.floor(h - b)), R > 0 ?
|
|
5478
|
+
let R = r.height - w, _ = p;
|
|
5479
|
+
_ > l.visibleHeight && (_ = l.visibleHeight);
|
|
5480
|
+
let L = 0;
|
|
5481
|
+
u && (x === "top" ? R = r.height + a.height - w : L = a.visibleHeight);
|
|
5482
|
+
const v = w + _ - (t - L - f);
|
|
5483
|
+
let I = h, S = d;
|
|
5484
|
+
C > 0 && !y ? I = Math.floor(h + C) : b > 0 && !y && (I = Math.floor(h - b)), R > 0 ? S = Math.floor(d - R) : v > 0 && (S = Math.floor(d + v)), (Math.abs(h - I) > 2.5 || Math.abs(d - S) > 2.5) && this.ctx.setScroll(I, S);
|
|
5478
5485
|
}
|
|
5479
5486
|
destroy() {
|
|
5480
5487
|
}
|
|
5481
5488
|
}
|
|
5482
|
-
class
|
|
5489
|
+
class Ke {
|
|
5483
5490
|
constructor(t) {
|
|
5484
5491
|
n(this, "ctx");
|
|
5485
5492
|
n(this, "maxColRowCell");
|
|
@@ -5533,13 +5540,13 @@ class Xe {
|
|
|
5533
5540
|
SELECTOR_AREA_MAX_X_OFFSET: g,
|
|
5534
5541
|
SELECTOR_AREA_MAX_Y_OFFSET: m
|
|
5535
5542
|
} = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g, p = u, y = x || this.ctx.maxRowIndex - m;
|
|
5536
|
-
let [b, C] = r, [R,
|
|
5543
|
+
let [b, C] = r, [R, _] = a;
|
|
5537
5544
|
if (b < w || R < p)
|
|
5538
5545
|
return;
|
|
5539
|
-
r = [Math.max(w, b), Math.min(E, C)], a = [Math.max(p, R), Math.min(y,
|
|
5540
|
-
const { BEFORE_SET_AUTOFILL_METHOD:
|
|
5541
|
-
if (typeof
|
|
5542
|
-
const I =
|
|
5546
|
+
r = [Math.max(w, b), Math.min(E, C)], a = [Math.max(p, R), Math.min(y, _)];
|
|
5547
|
+
const { BEFORE_SET_AUTOFILL_METHOD: L } = this.ctx.config;
|
|
5548
|
+
if (typeof L == "function") {
|
|
5549
|
+
const I = L({
|
|
5543
5550
|
focusCell: this.ctx.focusCell,
|
|
5544
5551
|
xArr: r,
|
|
5545
5552
|
yArr: a
|
|
@@ -5617,62 +5624,59 @@ class Xe {
|
|
|
5617
5624
|
destroy() {
|
|
5618
5625
|
}
|
|
5619
5626
|
}
|
|
5620
|
-
const
|
|
5627
|
+
const q = Math.min, $ = Math.max, lt = Math.round, ot = Math.floor, Y = (c) => ({
|
|
5621
5628
|
x: c,
|
|
5622
5629
|
y: c
|
|
5623
|
-
}),
|
|
5630
|
+
}), Fe = {
|
|
5624
5631
|
left: "right",
|
|
5625
5632
|
right: "left",
|
|
5626
5633
|
bottom: "top",
|
|
5627
5634
|
top: "bottom"
|
|
5628
|
-
}, Ke = {
|
|
5629
|
-
start: "end",
|
|
5630
|
-
end: "start"
|
|
5631
5635
|
};
|
|
5632
|
-
function
|
|
5633
|
-
return
|
|
5636
|
+
function Ct(c, t, e) {
|
|
5637
|
+
return $(c, q(t, e));
|
|
5634
5638
|
}
|
|
5635
|
-
function
|
|
5639
|
+
function et(c, t) {
|
|
5636
5640
|
return typeof c == "function" ? c(t) : c;
|
|
5637
5641
|
}
|
|
5638
|
-
function
|
|
5642
|
+
function G(c) {
|
|
5639
5643
|
return c.split("-")[0];
|
|
5640
5644
|
}
|
|
5641
|
-
function
|
|
5645
|
+
function it(c) {
|
|
5642
5646
|
return c.split("-")[1];
|
|
5643
5647
|
}
|
|
5644
|
-
function
|
|
5648
|
+
function ie(c) {
|
|
5645
5649
|
return c === "x" ? "y" : "x";
|
|
5646
5650
|
}
|
|
5647
|
-
function
|
|
5651
|
+
function Tt(c) {
|
|
5648
5652
|
return c === "y" ? "height" : "width";
|
|
5649
5653
|
}
|
|
5650
|
-
const Fe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
5651
5654
|
function V(c) {
|
|
5652
|
-
|
|
5655
|
+
const t = c[0];
|
|
5656
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
5653
5657
|
}
|
|
5654
|
-
function
|
|
5655
|
-
return
|
|
5658
|
+
function Ot(c) {
|
|
5659
|
+
return ie(V(c));
|
|
5656
5660
|
}
|
|
5657
5661
|
function We(c, t, e) {
|
|
5658
5662
|
e === void 0 && (e = !1);
|
|
5659
|
-
const i =
|
|
5663
|
+
const i = it(c), s = Ot(c), o = Tt(s);
|
|
5660
5664
|
let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
5661
|
-
return t.reference[o] > t.floating[o] && (r =
|
|
5665
|
+
return t.reference[o] > t.floating[o] && (r = ht(r)), [r, ht(r)];
|
|
5662
5666
|
}
|
|
5663
5667
|
function Ve(c) {
|
|
5664
|
-
const t =
|
|
5665
|
-
return [
|
|
5668
|
+
const t = ht(c);
|
|
5669
|
+
return [bt(c), t, bt(t)];
|
|
5666
5670
|
}
|
|
5667
|
-
function
|
|
5668
|
-
return c.replace(
|
|
5671
|
+
function bt(c) {
|
|
5672
|
+
return c.includes("start") ? c.replace("start", "end") : c.replace("end", "start");
|
|
5669
5673
|
}
|
|
5670
|
-
const
|
|
5674
|
+
const Ft = ["left", "right"], Wt = ["right", "left"], Pe = ["top", "bottom"], ze = ["bottom", "top"];
|
|
5671
5675
|
function $e(c, t, e) {
|
|
5672
5676
|
switch (c) {
|
|
5673
5677
|
case "top":
|
|
5674
5678
|
case "bottom":
|
|
5675
|
-
return e ? t ?
|
|
5679
|
+
return e ? t ? Wt : Ft : t ? Ft : Wt;
|
|
5676
5680
|
case "left":
|
|
5677
5681
|
case "right":
|
|
5678
5682
|
return t ? Pe : ze;
|
|
@@ -5681,12 +5685,13 @@ function $e(c, t, e) {
|
|
|
5681
5685
|
}
|
|
5682
5686
|
}
|
|
5683
5687
|
function Ge(c, t, e, i) {
|
|
5684
|
-
const s =
|
|
5685
|
-
let o = $e(
|
|
5686
|
-
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(
|
|
5688
|
+
const s = it(c);
|
|
5689
|
+
let o = $e(G(c), e === "start", i);
|
|
5690
|
+
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(bt)))), o;
|
|
5687
5691
|
}
|
|
5688
|
-
function
|
|
5689
|
-
|
|
5692
|
+
function ht(c) {
|
|
5693
|
+
const t = G(c);
|
|
5694
|
+
return Fe[t] + c.slice(t.length);
|
|
5690
5695
|
}
|
|
5691
5696
|
function Ue(c) {
|
|
5692
5697
|
return {
|
|
@@ -5697,7 +5702,7 @@ function Ue(c) {
|
|
|
5697
5702
|
...c
|
|
5698
5703
|
};
|
|
5699
5704
|
}
|
|
5700
|
-
function
|
|
5705
|
+
function se(c) {
|
|
5701
5706
|
return typeof c != "number" ? Ue(c) : {
|
|
5702
5707
|
top: c,
|
|
5703
5708
|
right: c,
|
|
@@ -5705,7 +5710,7 @@ function te(c) {
|
|
|
5705
5710
|
left: c
|
|
5706
5711
|
};
|
|
5707
5712
|
}
|
|
5708
|
-
function
|
|
5713
|
+
function ct(c) {
|
|
5709
5714
|
const {
|
|
5710
5715
|
x: t,
|
|
5711
5716
|
y: e,
|
|
@@ -5723,12 +5728,12 @@ function ht(c) {
|
|
|
5723
5728
|
y: e
|
|
5724
5729
|
};
|
|
5725
5730
|
}
|
|
5726
|
-
function
|
|
5731
|
+
function Vt(c, t, e) {
|
|
5727
5732
|
let {
|
|
5728
5733
|
reference: i,
|
|
5729
5734
|
floating: s
|
|
5730
5735
|
} = c;
|
|
5731
|
-
const o = V(t), r =
|
|
5736
|
+
const o = V(t), r = Ot(t), a = Tt(r), l = G(t), h = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, u = i[a] / 2 - s[a] / 2;
|
|
5732
5737
|
let x;
|
|
5733
5738
|
switch (l) {
|
|
5734
5739
|
case "top":
|
|
@@ -5761,7 +5766,7 @@ function Ft(c, t, e) {
|
|
|
5761
5766
|
y: i.y
|
|
5762
5767
|
};
|
|
5763
5768
|
}
|
|
5764
|
-
switch (
|
|
5769
|
+
switch (it(t)) {
|
|
5765
5770
|
case "start":
|
|
5766
5771
|
x[r] -= u * (e && h ? -1 : 1);
|
|
5767
5772
|
break;
|
|
@@ -5771,68 +5776,7 @@ function Ft(c, t, e) {
|
|
|
5771
5776
|
}
|
|
5772
5777
|
return x;
|
|
5773
5778
|
}
|
|
5774
|
-
|
|
5775
|
-
const {
|
|
5776
|
-
placement: i = "bottom",
|
|
5777
|
-
strategy: s = "absolute",
|
|
5778
|
-
middleware: o = [],
|
|
5779
|
-
platform: r
|
|
5780
|
-
} = e, a = o.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
5781
|
-
let h = await r.getElementRects({
|
|
5782
|
-
reference: c,
|
|
5783
|
-
floating: t,
|
|
5784
|
-
strategy: s
|
|
5785
|
-
}), {
|
|
5786
|
-
x: d,
|
|
5787
|
-
y: f
|
|
5788
|
-
} = Ft(h, i, l), u = i, x = {}, g = 0;
|
|
5789
|
-
for (let m = 0; m < a.length; m++) {
|
|
5790
|
-
const {
|
|
5791
|
-
name: w,
|
|
5792
|
-
fn: E
|
|
5793
|
-
} = a[m], {
|
|
5794
|
-
x: p,
|
|
5795
|
-
y,
|
|
5796
|
-
data: b,
|
|
5797
|
-
reset: C
|
|
5798
|
-
} = await E({
|
|
5799
|
-
x: d,
|
|
5800
|
-
y: f,
|
|
5801
|
-
initialPlacement: i,
|
|
5802
|
-
placement: u,
|
|
5803
|
-
strategy: s,
|
|
5804
|
-
middlewareData: x,
|
|
5805
|
-
rects: h,
|
|
5806
|
-
platform: r,
|
|
5807
|
-
elements: {
|
|
5808
|
-
reference: c,
|
|
5809
|
-
floating: t
|
|
5810
|
-
}
|
|
5811
|
-
});
|
|
5812
|
-
d = p ?? d, f = y ?? f, x = {
|
|
5813
|
-
...x,
|
|
5814
|
-
[w]: {
|
|
5815
|
-
...x[w],
|
|
5816
|
-
...b
|
|
5817
|
-
}
|
|
5818
|
-
}, C && g <= 50 && (g++, typeof C == "object" && (C.placement && (u = C.placement), C.rects && (h = C.rects === !0 ? await r.getElementRects({
|
|
5819
|
-
reference: c,
|
|
5820
|
-
floating: t,
|
|
5821
|
-
strategy: s
|
|
5822
|
-
}) : C.rects), {
|
|
5823
|
-
x: d,
|
|
5824
|
-
y: f
|
|
5825
|
-
} = Ft(h, u, l)), m = -1);
|
|
5826
|
-
}
|
|
5827
|
-
return {
|
|
5828
|
-
x: d,
|
|
5829
|
-
y: f,
|
|
5830
|
-
placement: u,
|
|
5831
|
-
strategy: s,
|
|
5832
|
-
middlewareData: x
|
|
5833
|
-
};
|
|
5834
|
-
};
|
|
5835
|
-
async function ee(c, t) {
|
|
5779
|
+
async function je(c, t) {
|
|
5836
5780
|
var e;
|
|
5837
5781
|
t === void 0 && (t = {});
|
|
5838
5782
|
const {
|
|
@@ -5848,7 +5792,7 @@ async function ee(c, t) {
|
|
|
5848
5792
|
elementContext: f = "floating",
|
|
5849
5793
|
altBoundary: u = !1,
|
|
5850
5794
|
padding: x = 0
|
|
5851
|
-
} =
|
|
5795
|
+
} = et(t, c), g = se(x), w = a[u ? f === "floating" ? "reference" : "floating" : f], E = ct(await o.getClippingRect({
|
|
5852
5796
|
element: (e = await (o.isElement == null ? void 0 : o.isElement(w))) == null || e ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
|
|
5853
5797
|
boundary: h,
|
|
5854
5798
|
rootBoundary: d,
|
|
@@ -5864,7 +5808,7 @@ async function ee(c, t) {
|
|
|
5864
5808
|
} : {
|
|
5865
5809
|
x: 1,
|
|
5866
5810
|
y: 1
|
|
5867
|
-
}, C =
|
|
5811
|
+
}, C = ct(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
5868
5812
|
elements: a,
|
|
5869
5813
|
rect: p,
|
|
5870
5814
|
offsetParent: y,
|
|
@@ -5877,7 +5821,71 @@ async function ee(c, t) {
|
|
|
5877
5821
|
right: (C.right - E.right + g.right) / b.x
|
|
5878
5822
|
};
|
|
5879
5823
|
}
|
|
5880
|
-
const qe = (c) =>
|
|
5824
|
+
const qe = 50, Ze = async (c, t, e) => {
|
|
5825
|
+
const {
|
|
5826
|
+
placement: i = "bottom",
|
|
5827
|
+
strategy: s = "absolute",
|
|
5828
|
+
middleware: o = [],
|
|
5829
|
+
platform: r
|
|
5830
|
+
} = e, a = r.detectOverflow ? r : {
|
|
5831
|
+
...r,
|
|
5832
|
+
detectOverflow: je
|
|
5833
|
+
}, l = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
5834
|
+
let h = await r.getElementRects({
|
|
5835
|
+
reference: c,
|
|
5836
|
+
floating: t,
|
|
5837
|
+
strategy: s
|
|
5838
|
+
}), {
|
|
5839
|
+
x: d,
|
|
5840
|
+
y: f
|
|
5841
|
+
} = Vt(h, i, l), u = i, x = 0;
|
|
5842
|
+
const g = {};
|
|
5843
|
+
for (let m = 0; m < o.length; m++) {
|
|
5844
|
+
const w = o[m];
|
|
5845
|
+
if (!w)
|
|
5846
|
+
continue;
|
|
5847
|
+
const {
|
|
5848
|
+
name: E,
|
|
5849
|
+
fn: p
|
|
5850
|
+
} = w, {
|
|
5851
|
+
x: y,
|
|
5852
|
+
y: b,
|
|
5853
|
+
data: C,
|
|
5854
|
+
reset: R
|
|
5855
|
+
} = await p({
|
|
5856
|
+
x: d,
|
|
5857
|
+
y: f,
|
|
5858
|
+
initialPlacement: i,
|
|
5859
|
+
placement: u,
|
|
5860
|
+
strategy: s,
|
|
5861
|
+
middlewareData: g,
|
|
5862
|
+
rects: h,
|
|
5863
|
+
platform: a,
|
|
5864
|
+
elements: {
|
|
5865
|
+
reference: c,
|
|
5866
|
+
floating: t
|
|
5867
|
+
}
|
|
5868
|
+
});
|
|
5869
|
+
d = y ?? d, f = b ?? f, g[E] = {
|
|
5870
|
+
...g[E],
|
|
5871
|
+
...C
|
|
5872
|
+
}, R && x < qe && (x++, typeof R == "object" && (R.placement && (u = R.placement), R.rects && (h = R.rects === !0 ? await r.getElementRects({
|
|
5873
|
+
reference: c,
|
|
5874
|
+
floating: t,
|
|
5875
|
+
strategy: s
|
|
5876
|
+
}) : R.rects), {
|
|
5877
|
+
x: d,
|
|
5878
|
+
y: f
|
|
5879
|
+
} = Vt(h, u, l)), m = -1);
|
|
5880
|
+
}
|
|
5881
|
+
return {
|
|
5882
|
+
x: d,
|
|
5883
|
+
y: f,
|
|
5884
|
+
placement: u,
|
|
5885
|
+
strategy: s,
|
|
5886
|
+
middlewareData: g
|
|
5887
|
+
};
|
|
5888
|
+
}, Je = (c) => ({
|
|
5881
5889
|
name: "arrow",
|
|
5882
5890
|
options: c,
|
|
5883
5891
|
async fn(t) {
|
|
@@ -5892,21 +5900,21 @@ const qe = (c) => ({
|
|
|
5892
5900
|
} = t, {
|
|
5893
5901
|
element: h,
|
|
5894
5902
|
padding: d = 0
|
|
5895
|
-
} =
|
|
5903
|
+
} = et(c, t) || {};
|
|
5896
5904
|
if (h == null)
|
|
5897
5905
|
return {};
|
|
5898
|
-
const f =
|
|
5906
|
+
const f = se(d), u = {
|
|
5899
5907
|
x: e,
|
|
5900
5908
|
y: i
|
|
5901
|
-
}, x =
|
|
5902
|
-
let
|
|
5903
|
-
(!
|
|
5904
|
-
const
|
|
5909
|
+
}, x = Ot(s), g = Tt(x), m = await r.getDimensions(h), w = x === "y", E = w ? "top" : "left", p = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = o.reference[g] + o.reference[x] - u[x] - o.floating[g], C = u[x] - o.reference[x], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
|
|
5910
|
+
let _ = R ? R[y] : 0;
|
|
5911
|
+
(!_ || !await (r.isElement == null ? void 0 : r.isElement(R))) && (_ = a.floating[y] || o.floating[g]);
|
|
5912
|
+
const L = b / 2 - C / 2, v = _ / 2 - m[g] / 2 - 1, I = q(f[E], v), S = q(f[p], v), T = I, M = _ - m[g] - S, O = _ / 2 - m[g] / 2 + L, A = Ct(T, O, M), H = !l.arrow && it(s) != null && O !== A && o.reference[g] / 2 - (O < T ? I : S) - m[g] / 2 < 0, D = H ? O < T ? O - T : O - M : 0;
|
|
5905
5913
|
return {
|
|
5906
5914
|
[x]: u[x] + D,
|
|
5907
5915
|
data: {
|
|
5908
5916
|
[x]: A,
|
|
5909
|
-
centerOffset:
|
|
5917
|
+
centerOffset: O - A - D,
|
|
5910
5918
|
...H && {
|
|
5911
5919
|
alignmentOffset: D
|
|
5912
5920
|
}
|
|
@@ -5914,7 +5922,7 @@ const qe = (c) => ({
|
|
|
5914
5922
|
reset: H
|
|
5915
5923
|
};
|
|
5916
5924
|
}
|
|
5917
|
-
}),
|
|
5925
|
+
}), Qe = function(c) {
|
|
5918
5926
|
return c === void 0 && (c = {}), {
|
|
5919
5927
|
name: "flip",
|
|
5920
5928
|
options: c,
|
|
@@ -5935,29 +5943,29 @@ const qe = (c) => ({
|
|
|
5935
5943
|
fallbackAxisSideDirection: g = "none",
|
|
5936
5944
|
flipAlignment: m = !0,
|
|
5937
5945
|
...w
|
|
5938
|
-
} =
|
|
5946
|
+
} = et(c, t);
|
|
5939
5947
|
if ((e = o.arrow) != null && e.alignmentOffset)
|
|
5940
5948
|
return {};
|
|
5941
|
-
const E =
|
|
5949
|
+
const E = G(s), p = V(a), y = G(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), C = u || (y || !m ? [ht(a)] : Ve(a)), R = g !== "none";
|
|
5942
5950
|
!u && R && C.push(...Ge(a, m, g, b));
|
|
5943
|
-
const
|
|
5951
|
+
const _ = [a, ...C], L = await l.detectOverflow(t, w), v = [];
|
|
5944
5952
|
let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
5945
|
-
if (d && v.push(
|
|
5946
|
-
const
|
|
5947
|
-
v.push(O[
|
|
5953
|
+
if (d && v.push(L[E]), f) {
|
|
5954
|
+
const O = We(s, r, b);
|
|
5955
|
+
v.push(L[O[0]], L[O[1]]);
|
|
5948
5956
|
}
|
|
5949
5957
|
if (I = [...I, {
|
|
5950
5958
|
placement: s,
|
|
5951
5959
|
overflows: v
|
|
5952
|
-
}], !v.every((
|
|
5953
|
-
var
|
|
5954
|
-
const
|
|
5960
|
+
}], !v.every((O) => O <= 0)) {
|
|
5961
|
+
var S, T;
|
|
5962
|
+
const O = (((S = o.flip) == null ? void 0 : S.index) || 0) + 1, A = _[O];
|
|
5955
5963
|
if (A && (!(f === "alignment" ? p !== V(A) : !1) || // We leave the current main axis only if every placement on that axis
|
|
5956
5964
|
// overflows the main axis.
|
|
5957
5965
|
I.every((k) => V(k.placement) === p ? k.overflows[0] > 0 : !0)))
|
|
5958
5966
|
return {
|
|
5959
5967
|
data: {
|
|
5960
|
-
index:
|
|
5968
|
+
index: O,
|
|
5961
5969
|
overflows: I
|
|
5962
5970
|
},
|
|
5963
5971
|
reset: {
|
|
@@ -5977,7 +5985,7 @@ const qe = (c) => ({
|
|
|
5977
5985
|
W === "y";
|
|
5978
5986
|
}
|
|
5979
5987
|
return !0;
|
|
5980
|
-
}).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W,
|
|
5988
|
+
}).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, fe) => W + fe, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : M[0];
|
|
5981
5989
|
D && (H = D);
|
|
5982
5990
|
break;
|
|
5983
5991
|
}
|
|
@@ -5995,13 +6003,13 @@ const qe = (c) => ({
|
|
|
5995
6003
|
return {};
|
|
5996
6004
|
}
|
|
5997
6005
|
};
|
|
5998
|
-
},
|
|
5999
|
-
async function
|
|
6006
|
+
}, ti = /* @__PURE__ */ new Set(["left", "top"]);
|
|
6007
|
+
async function ei(c, t) {
|
|
6000
6008
|
const {
|
|
6001
6009
|
placement: e,
|
|
6002
6010
|
platform: i,
|
|
6003
6011
|
elements: s
|
|
6004
|
-
} = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r =
|
|
6012
|
+
} = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = G(e), a = it(e), l = V(e) === "y", h = ti.has(r) ? -1 : 1, d = o && l ? -1 : 1, f = et(t, c);
|
|
6005
6013
|
let {
|
|
6006
6014
|
mainAxis: u,
|
|
6007
6015
|
crossAxis: x,
|
|
@@ -6023,7 +6031,7 @@ async function Qe(c, t) {
|
|
|
6023
6031
|
y: x * d
|
|
6024
6032
|
};
|
|
6025
6033
|
}
|
|
6026
|
-
const
|
|
6034
|
+
const ii = function(c) {
|
|
6027
6035
|
return c === void 0 && (c = 0), {
|
|
6028
6036
|
name: "offset",
|
|
6029
6037
|
options: c,
|
|
@@ -6034,7 +6042,7 @@ const ti = function(c) {
|
|
|
6034
6042
|
y: o,
|
|
6035
6043
|
placement: r,
|
|
6036
6044
|
middlewareData: a
|
|
6037
|
-
} = t, l = await
|
|
6045
|
+
} = t, l = await ei(t, c);
|
|
6038
6046
|
return r === ((e = a.offset) == null ? void 0 : e.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
|
|
6039
6047
|
x: s + l.x,
|
|
6040
6048
|
y: o + l.y,
|
|
@@ -6045,7 +6053,7 @@ const ti = function(c) {
|
|
|
6045
6053
|
};
|
|
6046
6054
|
}
|
|
6047
6055
|
};
|
|
6048
|
-
},
|
|
6056
|
+
}, si = function(c) {
|
|
6049
6057
|
return c === void 0 && (c = {}), {
|
|
6050
6058
|
name: "shift",
|
|
6051
6059
|
options: c,
|
|
@@ -6053,132 +6061,133 @@ const ti = function(c) {
|
|
|
6053
6061
|
const {
|
|
6054
6062
|
x: e,
|
|
6055
6063
|
y: i,
|
|
6056
|
-
placement: s
|
|
6064
|
+
placement: s,
|
|
6065
|
+
platform: o
|
|
6057
6066
|
} = t, {
|
|
6058
|
-
mainAxis:
|
|
6059
|
-
crossAxis:
|
|
6060
|
-
limiter:
|
|
6061
|
-
fn: (
|
|
6067
|
+
mainAxis: r = !0,
|
|
6068
|
+
crossAxis: a = !1,
|
|
6069
|
+
limiter: l = {
|
|
6070
|
+
fn: (E) => {
|
|
6062
6071
|
let {
|
|
6063
|
-
x:
|
|
6064
|
-
y
|
|
6065
|
-
} =
|
|
6072
|
+
x: p,
|
|
6073
|
+
y
|
|
6074
|
+
} = E;
|
|
6066
6075
|
return {
|
|
6067
|
-
x:
|
|
6068
|
-
y
|
|
6076
|
+
x: p,
|
|
6077
|
+
y
|
|
6069
6078
|
};
|
|
6070
6079
|
}
|
|
6071
6080
|
},
|
|
6072
|
-
...
|
|
6073
|
-
} =
|
|
6081
|
+
...h
|
|
6082
|
+
} = et(c, t), d = {
|
|
6074
6083
|
x: e,
|
|
6075
6084
|
y: i
|
|
6076
|
-
},
|
|
6077
|
-
let
|
|
6078
|
-
if (o) {
|
|
6079
|
-
const w = u === "y" ? "top" : "left", E = u === "y" ? "bottom" : "right", p = x + d[w], y = x - d[E];
|
|
6080
|
-
x = Et(p, x, y);
|
|
6081
|
-
}
|
|
6085
|
+
}, f = await o.detectOverflow(t, h), u = V(G(s)), x = ie(u);
|
|
6086
|
+
let g = d[x], m = d[u];
|
|
6082
6087
|
if (r) {
|
|
6083
|
-
const
|
|
6084
|
-
g =
|
|
6088
|
+
const E = x === "y" ? "top" : "left", p = x === "y" ? "bottom" : "right", y = g + f[E], b = g - f[p];
|
|
6089
|
+
g = Ct(y, g, b);
|
|
6090
|
+
}
|
|
6091
|
+
if (a) {
|
|
6092
|
+
const E = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", y = m + f[E], b = m - f[p];
|
|
6093
|
+
m = Ct(y, m, b);
|
|
6085
6094
|
}
|
|
6086
|
-
const
|
|
6095
|
+
const w = l.fn({
|
|
6087
6096
|
...t,
|
|
6088
|
-
[
|
|
6089
|
-
[
|
|
6097
|
+
[x]: g,
|
|
6098
|
+
[u]: m
|
|
6090
6099
|
});
|
|
6091
6100
|
return {
|
|
6092
|
-
...
|
|
6101
|
+
...w,
|
|
6093
6102
|
data: {
|
|
6094
|
-
x:
|
|
6095
|
-
y:
|
|
6103
|
+
x: w.x - e,
|
|
6104
|
+
y: w.y - i,
|
|
6096
6105
|
enabled: {
|
|
6097
|
-
[
|
|
6098
|
-
[
|
|
6106
|
+
[x]: r,
|
|
6107
|
+
[u]: a
|
|
6099
6108
|
}
|
|
6100
6109
|
}
|
|
6101
6110
|
};
|
|
6102
6111
|
}
|
|
6103
6112
|
};
|
|
6104
6113
|
};
|
|
6105
|
-
function
|
|
6114
|
+
function xt() {
|
|
6106
6115
|
return typeof window < "u";
|
|
6107
6116
|
}
|
|
6108
|
-
function
|
|
6109
|
-
return
|
|
6117
|
+
function J(c) {
|
|
6118
|
+
return oe(c) ? (c.nodeName || "").toLowerCase() : "#document";
|
|
6110
6119
|
}
|
|
6111
6120
|
function N(c) {
|
|
6112
6121
|
var t;
|
|
6113
6122
|
return (c == null || (t = c.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
6114
6123
|
}
|
|
6115
|
-
function
|
|
6124
|
+
function K(c) {
|
|
6116
6125
|
var t;
|
|
6117
|
-
return (t = (
|
|
6126
|
+
return (t = (oe(c) ? c.ownerDocument : c.document) || window.document) == null ? void 0 : t.documentElement;
|
|
6118
6127
|
}
|
|
6119
|
-
function
|
|
6120
|
-
return
|
|
6128
|
+
function oe(c) {
|
|
6129
|
+
return xt() ? c instanceof Node || c instanceof N(c).Node : !1;
|
|
6121
6130
|
}
|
|
6122
6131
|
function B(c) {
|
|
6123
|
-
return
|
|
6132
|
+
return xt() ? c instanceof Element || c instanceof N(c).Element : !1;
|
|
6124
6133
|
}
|
|
6125
|
-
function
|
|
6126
|
-
return
|
|
6134
|
+
function F(c) {
|
|
6135
|
+
return xt() ? c instanceof HTMLElement || c instanceof N(c).HTMLElement : !1;
|
|
6127
6136
|
}
|
|
6128
|
-
function
|
|
6129
|
-
return !
|
|
6137
|
+
function Pt(c) {
|
|
6138
|
+
return !xt() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof N(c).ShadowRoot;
|
|
6130
6139
|
}
|
|
6131
|
-
|
|
6132
|
-
function it(c) {
|
|
6140
|
+
function st(c) {
|
|
6133
6141
|
const {
|
|
6134
6142
|
overflow: t,
|
|
6135
6143
|
overflowX: e,
|
|
6136
6144
|
overflowY: i,
|
|
6137
6145
|
display: s
|
|
6138
6146
|
} = X(c);
|
|
6139
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) &&
|
|
6147
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && s !== "inline" && s !== "contents";
|
|
6140
6148
|
}
|
|
6141
|
-
const si = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
6142
6149
|
function oi(c) {
|
|
6143
|
-
return
|
|
6150
|
+
return /^(table|td|th)$/.test(J(c));
|
|
6144
6151
|
}
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
}
|
|
6152
|
+
function gt(c) {
|
|
6153
|
+
try {
|
|
6154
|
+
if (c.matches(":popover-open"))
|
|
6155
|
+
return !0;
|
|
6156
|
+
} catch {
|
|
6157
|
+
}
|
|
6158
|
+
try {
|
|
6159
|
+
return c.matches(":modal");
|
|
6160
|
+
} catch {
|
|
6161
|
+
return !1;
|
|
6162
|
+
}
|
|
6154
6163
|
}
|
|
6155
|
-
const
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6164
|
+
const ri = /transform|translate|scale|rotate|perspective|filter/, ni = /paint|layout|strict|content/, z = (c) => !!c && c !== "none";
|
|
6165
|
+
let Et;
|
|
6166
|
+
function Lt(c) {
|
|
6167
|
+
const t = B(c) ? X(c) : c;
|
|
6168
|
+
return z(t.transform) || z(t.translate) || z(t.scale) || z(t.rotate) || z(t.perspective) || !Mt() && (z(t.backdropFilter) || z(t.filter)) || ri.test(t.willChange || "") || ni.test(t.contain || "");
|
|
6159
6169
|
}
|
|
6160
|
-
function
|
|
6170
|
+
function ai(c) {
|
|
6161
6171
|
let t = P(c);
|
|
6162
|
-
for (;
|
|
6163
|
-
if (
|
|
6172
|
+
for (; F(t) && !Z(t); ) {
|
|
6173
|
+
if (Lt(t))
|
|
6164
6174
|
return t;
|
|
6165
|
-
if (
|
|
6175
|
+
if (gt(t))
|
|
6166
6176
|
return null;
|
|
6167
6177
|
t = P(t);
|
|
6168
6178
|
}
|
|
6169
6179
|
return null;
|
|
6170
6180
|
}
|
|
6171
|
-
function
|
|
6172
|
-
return typeof CSS
|
|
6181
|
+
function Mt() {
|
|
6182
|
+
return Et == null && (Et = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Et;
|
|
6173
6183
|
}
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
return ci.has(Z(c));
|
|
6184
|
+
function Z(c) {
|
|
6185
|
+
return /^(html|body|#document)$/.test(J(c));
|
|
6177
6186
|
}
|
|
6178
6187
|
function X(c) {
|
|
6179
6188
|
return N(c).getComputedStyle(c);
|
|
6180
6189
|
}
|
|
6181
|
-
function
|
|
6190
|
+
function wt(c) {
|
|
6182
6191
|
return B(c) ? {
|
|
6183
6192
|
scrollLeft: c.scrollLeft,
|
|
6184
6193
|
scrollTop: c.scrollTop
|
|
@@ -6188,130 +6197,126 @@ function gt(c) {
|
|
|
6188
6197
|
};
|
|
6189
6198
|
}
|
|
6190
6199
|
function P(c) {
|
|
6191
|
-
if (
|
|
6200
|
+
if (J(c) === "html")
|
|
6192
6201
|
return c;
|
|
6193
6202
|
const t = (
|
|
6194
6203
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
6195
6204
|
c.assignedSlot || // DOM Element detected.
|
|
6196
6205
|
c.parentNode || // ShadowRoot detected.
|
|
6197
|
-
|
|
6198
|
-
|
|
6206
|
+
Pt(c) && c.host || // Fallback.
|
|
6207
|
+
K(c)
|
|
6199
6208
|
);
|
|
6200
|
-
return
|
|
6209
|
+
return Pt(t) ? t.host : t;
|
|
6201
6210
|
}
|
|
6202
|
-
function
|
|
6211
|
+
function re(c) {
|
|
6203
6212
|
const t = P(c);
|
|
6204
|
-
return
|
|
6213
|
+
return Z(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : F(t) && st(t) ? t : re(t);
|
|
6205
6214
|
}
|
|
6206
|
-
function
|
|
6215
|
+
function tt(c, t, e) {
|
|
6207
6216
|
var i;
|
|
6208
6217
|
t === void 0 && (t = []), e === void 0 && (e = !0);
|
|
6209
|
-
const s =
|
|
6218
|
+
const s = re(c), o = s === ((i = c.ownerDocument) == null ? void 0 : i.body), r = N(s);
|
|
6210
6219
|
if (o) {
|
|
6211
|
-
const a =
|
|
6212
|
-
return t.concat(r, r.visualViewport || [],
|
|
6213
|
-
}
|
|
6214
|
-
|
|
6220
|
+
const a = It(r);
|
|
6221
|
+
return t.concat(r, r.visualViewport || [], st(s) ? s : [], a && e ? tt(a) : []);
|
|
6222
|
+
} else
|
|
6223
|
+
return t.concat(s, tt(s, [], e));
|
|
6215
6224
|
}
|
|
6216
|
-
function
|
|
6225
|
+
function It(c) {
|
|
6217
6226
|
return c.parent && Object.getPrototypeOf(c.parent) ? c.frameElement : null;
|
|
6218
6227
|
}
|
|
6219
|
-
function
|
|
6228
|
+
function ne(c) {
|
|
6220
6229
|
const t = X(c);
|
|
6221
6230
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
6222
|
-
const s =
|
|
6231
|
+
const s = F(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, a = lt(e) !== o || lt(i) !== r;
|
|
6223
6232
|
return a && (e = o, i = r), {
|
|
6224
6233
|
width: e,
|
|
6225
6234
|
height: i,
|
|
6226
6235
|
$: a
|
|
6227
6236
|
};
|
|
6228
6237
|
}
|
|
6229
|
-
function
|
|
6238
|
+
function At(c) {
|
|
6230
6239
|
return B(c) ? c : c.contextElement;
|
|
6231
6240
|
}
|
|
6232
|
-
function
|
|
6233
|
-
const t =
|
|
6234
|
-
if (!
|
|
6241
|
+
function j(c) {
|
|
6242
|
+
const t = At(c);
|
|
6243
|
+
if (!F(t))
|
|
6235
6244
|
return Y(1);
|
|
6236
6245
|
const e = t.getBoundingClientRect(), {
|
|
6237
6246
|
width: i,
|
|
6238
6247
|
height: s,
|
|
6239
6248
|
$: o
|
|
6240
|
-
} =
|
|
6241
|
-
let r = (o ?
|
|
6249
|
+
} = ne(t);
|
|
6250
|
+
let r = (o ? lt(e.width) : e.width) / i, a = (o ? lt(e.height) : e.height) / s;
|
|
6242
6251
|
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
6243
6252
|
x: r,
|
|
6244
6253
|
y: a
|
|
6245
6254
|
};
|
|
6246
6255
|
}
|
|
6247
|
-
const
|
|
6248
|
-
function
|
|
6256
|
+
const li = /* @__PURE__ */ Y(0);
|
|
6257
|
+
function ae(c) {
|
|
6249
6258
|
const t = N(c);
|
|
6250
|
-
return !
|
|
6259
|
+
return !Mt() || !t.visualViewport ? li : {
|
|
6251
6260
|
x: t.visualViewport.offsetLeft,
|
|
6252
6261
|
y: t.visualViewport.offsetTop
|
|
6253
6262
|
};
|
|
6254
6263
|
}
|
|
6255
|
-
function
|
|
6264
|
+
function hi(c, t, e) {
|
|
6256
6265
|
return t === void 0 && (t = !1), !e || t && e !== N(c) ? !1 : t;
|
|
6257
6266
|
}
|
|
6258
|
-
function
|
|
6267
|
+
function U(c, t, e, i) {
|
|
6259
6268
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
6260
|
-
const s = c.getBoundingClientRect(), o =
|
|
6269
|
+
const s = c.getBoundingClientRect(), o = At(c);
|
|
6261
6270
|
let r = Y(1);
|
|
6262
|
-
t && (i ? B(i) && (r =
|
|
6263
|
-
const a =
|
|
6271
|
+
t && (i ? B(i) && (r = j(i)) : r = j(c));
|
|
6272
|
+
const a = hi(o, e, i) ? ae(o) : Y(0);
|
|
6264
6273
|
let l = (s.left + a.x) / r.x, h = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
|
|
6265
6274
|
if (o) {
|
|
6266
6275
|
const u = N(o), x = i && B(i) ? N(i) : i;
|
|
6267
|
-
let g = u, m =
|
|
6276
|
+
let g = u, m = It(g);
|
|
6268
6277
|
for (; m && i && x !== g; ) {
|
|
6269
|
-
const w =
|
|
6270
|
-
l *= w.x, h *= w.y, d *= w.x, f *= w.y, l += y, h += b, g = N(m), m =
|
|
6278
|
+
const w = j(m), E = m.getBoundingClientRect(), p = X(m), y = E.left + (m.clientLeft + parseFloat(p.paddingLeft)) * w.x, b = E.top + (m.clientTop + parseFloat(p.paddingTop)) * w.y;
|
|
6279
|
+
l *= w.x, h *= w.y, d *= w.x, f *= w.y, l += y, h += b, g = N(m), m = It(g);
|
|
6271
6280
|
}
|
|
6272
6281
|
}
|
|
6273
|
-
return
|
|
6282
|
+
return ct({
|
|
6274
6283
|
width: d,
|
|
6275
6284
|
height: f,
|
|
6276
6285
|
x: l,
|
|
6277
6286
|
y: h
|
|
6278
6287
|
});
|
|
6279
6288
|
}
|
|
6280
|
-
function
|
|
6281
|
-
const e =
|
|
6282
|
-
return t ? t.left + e :
|
|
6289
|
+
function mt(c, t) {
|
|
6290
|
+
const e = wt(c).scrollLeft;
|
|
6291
|
+
return t ? t.left + e : U(K(c)).left + e;
|
|
6283
6292
|
}
|
|
6284
|
-
function
|
|
6285
|
-
e
|
|
6286
|
-
const i = c.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
|
|
6287
|
-
// RTL <body> scrollbar.
|
|
6288
|
-
Lt(c, i)
|
|
6289
|
-
)), o = i.top + t.scrollTop;
|
|
6293
|
+
function le(c, t) {
|
|
6294
|
+
const e = c.getBoundingClientRect(), i = e.left + t.scrollLeft - mt(c, e), s = e.top + t.scrollTop;
|
|
6290
6295
|
return {
|
|
6291
|
-
x:
|
|
6292
|
-
y:
|
|
6296
|
+
x: i,
|
|
6297
|
+
y: s
|
|
6293
6298
|
};
|
|
6294
6299
|
}
|
|
6295
|
-
function
|
|
6300
|
+
function ci(c) {
|
|
6296
6301
|
let {
|
|
6297
6302
|
elements: t,
|
|
6298
6303
|
rect: e,
|
|
6299
6304
|
offsetParent: i,
|
|
6300
6305
|
strategy: s
|
|
6301
6306
|
} = c;
|
|
6302
|
-
const o = s === "fixed", r =
|
|
6307
|
+
const o = s === "fixed", r = K(i), a = t ? gt(t.floating) : !1;
|
|
6303
6308
|
if (i === r || a && o)
|
|
6304
6309
|
return e;
|
|
6305
6310
|
let l = {
|
|
6306
6311
|
scrollLeft: 0,
|
|
6307
6312
|
scrollTop: 0
|
|
6308
6313
|
}, h = Y(1);
|
|
6309
|
-
const d = Y(0), f =
|
|
6310
|
-
if ((f || !f && !o) && ((
|
|
6311
|
-
const x =
|
|
6312
|
-
h =
|
|
6314
|
+
const d = Y(0), f = F(i);
|
|
6315
|
+
if ((f || !f && !o) && ((J(i) !== "body" || st(r)) && (l = wt(i)), f)) {
|
|
6316
|
+
const x = U(i);
|
|
6317
|
+
h = j(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
|
|
6313
6318
|
}
|
|
6314
|
-
const u = r && !f && !o ?
|
|
6319
|
+
const u = r && !f && !o ? le(r, l) : Y(0);
|
|
6315
6320
|
return {
|
|
6316
6321
|
width: e.width * h.x,
|
|
6317
6322
|
height: e.height * h.y,
|
|
@@ -6319,28 +6324,34 @@ function ui(c) {
|
|
|
6319
6324
|
y: e.y * h.y - l.scrollTop * h.y + d.y + u.y
|
|
6320
6325
|
};
|
|
6321
6326
|
}
|
|
6322
|
-
function
|
|
6327
|
+
function di(c) {
|
|
6323
6328
|
return Array.from(c.getClientRects());
|
|
6324
6329
|
}
|
|
6325
|
-
function
|
|
6326
|
-
const t =
|
|
6327
|
-
let r = -e.scrollLeft +
|
|
6330
|
+
function fi(c) {
|
|
6331
|
+
const t = K(c), e = wt(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
6332
|
+
let r = -e.scrollLeft + mt(c);
|
|
6328
6333
|
const a = -e.scrollTop;
|
|
6329
|
-
return X(i).direction === "rtl" && (r +=
|
|
6334
|
+
return X(i).direction === "rtl" && (r += $(t.clientWidth, i.clientWidth) - s), {
|
|
6330
6335
|
width: s,
|
|
6331
6336
|
height: o,
|
|
6332
6337
|
x: r,
|
|
6333
6338
|
y: a
|
|
6334
6339
|
};
|
|
6335
6340
|
}
|
|
6336
|
-
|
|
6337
|
-
|
|
6341
|
+
const zt = 25;
|
|
6342
|
+
function ui(c, t) {
|
|
6343
|
+
const e = N(c), i = K(c), s = e.visualViewport;
|
|
6338
6344
|
let o = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
|
|
6339
6345
|
if (s) {
|
|
6340
6346
|
o = s.width, r = s.height;
|
|
6341
|
-
const
|
|
6342
|
-
(!
|
|
6343
|
-
}
|
|
6347
|
+
const d = Mt();
|
|
6348
|
+
(!d || d && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
|
|
6349
|
+
}
|
|
6350
|
+
const h = mt(i);
|
|
6351
|
+
if (h <= 0) {
|
|
6352
|
+
const d = i.ownerDocument, f = d.body, u = getComputedStyle(f), x = d.compatMode === "CSS1Compat" && parseFloat(u.marginLeft) + parseFloat(u.marginRight) || 0, g = Math.abs(i.clientWidth - f.clientWidth - x);
|
|
6353
|
+
g <= zt && (o -= g);
|
|
6354
|
+
} else h <= zt && (o += h);
|
|
6344
6355
|
return {
|
|
6345
6356
|
width: o,
|
|
6346
6357
|
height: r,
|
|
@@ -6348,9 +6359,8 @@ function wi(c, t) {
|
|
|
6348
6359
|
y: l
|
|
6349
6360
|
};
|
|
6350
6361
|
}
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
const e = G(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = K(c) ? U(c) : Y(1), r = c.clientWidth * o.x, a = c.clientHeight * o.y, l = s * o.x, h = i * o.y;
|
|
6362
|
+
function xi(c, t) {
|
|
6363
|
+
const e = U(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = F(c) ? j(c) : Y(1), r = c.clientWidth * o.x, a = c.clientHeight * o.y, l = s * o.x, h = i * o.y;
|
|
6354
6364
|
return {
|
|
6355
6365
|
width: r,
|
|
6356
6366
|
height: a,
|
|
@@ -6358,16 +6368,16 @@ function Ei(c, t) {
|
|
|
6358
6368
|
y: h
|
|
6359
6369
|
};
|
|
6360
6370
|
}
|
|
6361
|
-
function
|
|
6371
|
+
function $t(c, t, e) {
|
|
6362
6372
|
let i;
|
|
6363
6373
|
if (t === "viewport")
|
|
6364
|
-
i =
|
|
6374
|
+
i = ui(c, e);
|
|
6365
6375
|
else if (t === "document")
|
|
6366
|
-
i =
|
|
6376
|
+
i = fi(K(c));
|
|
6367
6377
|
else if (B(t))
|
|
6368
|
-
i =
|
|
6378
|
+
i = xi(t, e);
|
|
6369
6379
|
else {
|
|
6370
|
-
const s =
|
|
6380
|
+
const s = ae(c);
|
|
6371
6381
|
i = {
|
|
6372
6382
|
x: t.x - s.x,
|
|
6373
6383
|
y: t.y - s.y,
|
|
@@ -6375,70 +6385,72 @@ function Vt(c, t, e) {
|
|
|
6375
6385
|
height: t.height
|
|
6376
6386
|
};
|
|
6377
6387
|
}
|
|
6378
|
-
return
|
|
6388
|
+
return ct(i);
|
|
6379
6389
|
}
|
|
6380
|
-
function
|
|
6390
|
+
function he(c, t) {
|
|
6381
6391
|
const e = P(c);
|
|
6382
|
-
return e === t || !B(e) ||
|
|
6392
|
+
return e === t || !B(e) || Z(e) ? !1 : X(e).position === "fixed" || he(e, t);
|
|
6383
6393
|
}
|
|
6384
|
-
function
|
|
6394
|
+
function gi(c, t) {
|
|
6385
6395
|
const e = t.get(c);
|
|
6386
6396
|
if (e)
|
|
6387
6397
|
return e;
|
|
6388
|
-
let i =
|
|
6398
|
+
let i = tt(c, [], !1).filter((a) => B(a) && J(a) !== "body"), s = null;
|
|
6389
6399
|
const o = X(c).position === "fixed";
|
|
6390
6400
|
let r = o ? P(c) : c;
|
|
6391
|
-
for (; B(r) && !
|
|
6392
|
-
const a = X(r), l =
|
|
6393
|
-
!l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s &&
|
|
6401
|
+
for (; B(r) && !Z(r); ) {
|
|
6402
|
+
const a = X(r), l = Lt(r);
|
|
6403
|
+
!l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && (s.position === "absolute" || s.position === "fixed") || st(r) && !l && he(c, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
|
|
6394
6404
|
}
|
|
6395
6405
|
return t.set(c, i), i;
|
|
6396
6406
|
}
|
|
6397
|
-
function
|
|
6407
|
+
function wi(c) {
|
|
6398
6408
|
let {
|
|
6399
6409
|
element: t,
|
|
6400
6410
|
boundary: e,
|
|
6401
6411
|
rootBoundary: i,
|
|
6402
6412
|
strategy: s
|
|
6403
6413
|
} = c;
|
|
6404
|
-
const r = [...e === "clippingAncestors" ?
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6414
|
+
const r = [...e === "clippingAncestors" ? gt(t) ? [] : gi(t, this._c) : [].concat(e), i], a = $t(t, r[0], s);
|
|
6415
|
+
let l = a.top, h = a.right, d = a.bottom, f = a.left;
|
|
6416
|
+
for (let u = 1; u < r.length; u++) {
|
|
6417
|
+
const x = $t(t, r[u], s);
|
|
6418
|
+
l = $(x.top, l), h = q(x.right, h), d = q(x.bottom, d), f = $(x.left, f);
|
|
6419
|
+
}
|
|
6408
6420
|
return {
|
|
6409
|
-
width:
|
|
6410
|
-
height:
|
|
6411
|
-
x:
|
|
6412
|
-
y: l
|
|
6421
|
+
width: h - f,
|
|
6422
|
+
height: d - l,
|
|
6423
|
+
x: f,
|
|
6424
|
+
y: l
|
|
6413
6425
|
};
|
|
6414
6426
|
}
|
|
6415
|
-
function
|
|
6427
|
+
function mi(c) {
|
|
6416
6428
|
const {
|
|
6417
6429
|
width: t,
|
|
6418
6430
|
height: e
|
|
6419
|
-
} =
|
|
6431
|
+
} = ne(c);
|
|
6420
6432
|
return {
|
|
6421
6433
|
width: t,
|
|
6422
6434
|
height: e
|
|
6423
6435
|
};
|
|
6424
6436
|
}
|
|
6425
|
-
function
|
|
6426
|
-
const i =
|
|
6437
|
+
function Ei(c, t, e) {
|
|
6438
|
+
const i = F(t), s = K(t), o = e === "fixed", r = U(c, !0, o, t);
|
|
6427
6439
|
let a = {
|
|
6428
6440
|
scrollLeft: 0,
|
|
6429
6441
|
scrollTop: 0
|
|
6430
6442
|
};
|
|
6431
6443
|
const l = Y(0);
|
|
6432
6444
|
function h() {
|
|
6433
|
-
l.x =
|
|
6445
|
+
l.x = mt(s);
|
|
6434
6446
|
}
|
|
6435
6447
|
if (i || !i && !o)
|
|
6436
|
-
if ((
|
|
6437
|
-
const x =
|
|
6448
|
+
if ((J(t) !== "body" || st(s)) && (a = wt(t)), i) {
|
|
6449
|
+
const x = U(t, !0, o, t);
|
|
6438
6450
|
l.x = x.x + t.clientLeft, l.y = x.y + t.clientTop;
|
|
6439
6451
|
} else s && h();
|
|
6440
6452
|
o && !i && s && h();
|
|
6441
|
-
const d = s && !i && !o ?
|
|
6453
|
+
const d = s && !i && !o ? le(s, a) : Y(0), f = r.left + a.scrollLeft - l.x - d.x, u = r.top + a.scrollTop - l.y - d.y;
|
|
6442
6454
|
return {
|
|
6443
6455
|
x: f,
|
|
6444
6456
|
y: u,
|
|
@@ -6446,39 +6458,39 @@ function bi(c, t, e) {
|
|
|
6446
6458
|
height: r.height
|
|
6447
6459
|
};
|
|
6448
6460
|
}
|
|
6449
|
-
function
|
|
6461
|
+
function pt(c) {
|
|
6450
6462
|
return X(c).position === "static";
|
|
6451
6463
|
}
|
|
6452
|
-
function
|
|
6453
|
-
if (!
|
|
6464
|
+
function Gt(c, t) {
|
|
6465
|
+
if (!F(c) || X(c).position === "fixed")
|
|
6454
6466
|
return null;
|
|
6455
6467
|
if (t)
|
|
6456
6468
|
return t(c);
|
|
6457
6469
|
let e = c.offsetParent;
|
|
6458
|
-
return
|
|
6470
|
+
return K(c) === e && (e = e.ownerDocument.body), e;
|
|
6459
6471
|
}
|
|
6460
|
-
function
|
|
6472
|
+
function ce(c, t) {
|
|
6461
6473
|
const e = N(c);
|
|
6462
|
-
if (
|
|
6474
|
+
if (gt(c))
|
|
6463
6475
|
return e;
|
|
6464
|
-
if (!
|
|
6476
|
+
if (!F(c)) {
|
|
6465
6477
|
let s = P(c);
|
|
6466
|
-
for (; s && !
|
|
6467
|
-
if (B(s) && !
|
|
6478
|
+
for (; s && !Z(s); ) {
|
|
6479
|
+
if (B(s) && !pt(s))
|
|
6468
6480
|
return s;
|
|
6469
6481
|
s = P(s);
|
|
6470
6482
|
}
|
|
6471
6483
|
return e;
|
|
6472
6484
|
}
|
|
6473
|
-
let i =
|
|
6474
|
-
for (; i && oi(i) &&
|
|
6475
|
-
i =
|
|
6476
|
-
return i &&
|
|
6485
|
+
let i = Gt(c, t);
|
|
6486
|
+
for (; i && oi(i) && pt(i); )
|
|
6487
|
+
i = Gt(i, t);
|
|
6488
|
+
return i && Z(i) && pt(i) && !Lt(i) ? e : i || ai(c) || e;
|
|
6477
6489
|
}
|
|
6478
|
-
const
|
|
6479
|
-
const t = this.getOffsetParent ||
|
|
6490
|
+
const pi = async function(c) {
|
|
6491
|
+
const t = this.getOffsetParent || ce, e = this.getDimensions, i = await e(c.floating);
|
|
6480
6492
|
return {
|
|
6481
|
-
reference:
|
|
6493
|
+
reference: Ei(c.reference, await t(c.floating), c.strategy),
|
|
6482
6494
|
floating: {
|
|
6483
6495
|
x: 0,
|
|
6484
6496
|
y: 0,
|
|
@@ -6487,27 +6499,27 @@ const vi = async function(c) {
|
|
|
6487
6499
|
}
|
|
6488
6500
|
};
|
|
6489
6501
|
};
|
|
6490
|
-
function
|
|
6502
|
+
function yi(c) {
|
|
6491
6503
|
return X(c).direction === "rtl";
|
|
6492
6504
|
}
|
|
6493
|
-
const
|
|
6494
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
6495
|
-
getDocumentElement:
|
|
6496
|
-
getClippingRect:
|
|
6497
|
-
getOffsetParent:
|
|
6498
|
-
getElementRects:
|
|
6499
|
-
getClientRects:
|
|
6500
|
-
getDimensions:
|
|
6501
|
-
getScale:
|
|
6505
|
+
const Ci = {
|
|
6506
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ci,
|
|
6507
|
+
getDocumentElement: K,
|
|
6508
|
+
getClippingRect: wi,
|
|
6509
|
+
getOffsetParent: ce,
|
|
6510
|
+
getElementRects: pi,
|
|
6511
|
+
getClientRects: di,
|
|
6512
|
+
getDimensions: mi,
|
|
6513
|
+
getScale: j,
|
|
6502
6514
|
isElement: B,
|
|
6503
|
-
isRTL:
|
|
6515
|
+
isRTL: yi
|
|
6504
6516
|
};
|
|
6505
|
-
function
|
|
6517
|
+
function de(c, t) {
|
|
6506
6518
|
return c.x === t.x && c.y === t.y && c.width === t.width && c.height === t.height;
|
|
6507
6519
|
}
|
|
6508
|
-
function
|
|
6520
|
+
function bi(c, t) {
|
|
6509
6521
|
let e = null, i;
|
|
6510
|
-
const s =
|
|
6522
|
+
const s = K(c);
|
|
6511
6523
|
function o() {
|
|
6512
6524
|
var a;
|
|
6513
6525
|
clearTimeout(i), (a = e) == null || a.disconnect(), e = null;
|
|
@@ -6522,21 +6534,21 @@ function _i(c, t) {
|
|
|
6522
6534
|
} = h;
|
|
6523
6535
|
if (a || t(), !u || !x)
|
|
6524
6536
|
return;
|
|
6525
|
-
const g =
|
|
6537
|
+
const g = ot(f), m = ot(s.clientWidth - (d + u)), w = ot(s.clientHeight - (f + x)), E = ot(d), y = {
|
|
6526
6538
|
rootMargin: -g + "px " + -m + "px " + -w + "px " + -E + "px",
|
|
6527
|
-
threshold:
|
|
6539
|
+
threshold: $(0, q(1, l)) || 1
|
|
6528
6540
|
};
|
|
6529
6541
|
let b = !0;
|
|
6530
6542
|
function C(R) {
|
|
6531
|
-
const
|
|
6532
|
-
if (
|
|
6543
|
+
const _ = R[0].intersectionRatio;
|
|
6544
|
+
if (_ !== l) {
|
|
6533
6545
|
if (!b)
|
|
6534
6546
|
return r();
|
|
6535
|
-
|
|
6547
|
+
_ ? r(!1, _) : i = setTimeout(() => {
|
|
6536
6548
|
r(!1, 1e-7);
|
|
6537
6549
|
}, 1e3);
|
|
6538
6550
|
}
|
|
6539
|
-
|
|
6551
|
+
_ === 1 && !de(h, c.getBoundingClientRect()) && r(), b = !1;
|
|
6540
6552
|
}
|
|
6541
6553
|
try {
|
|
6542
6554
|
e = new IntersectionObserver(C, {
|
|
@@ -6551,7 +6563,7 @@ function _i(c, t) {
|
|
|
6551
6563
|
}
|
|
6552
6564
|
return r(!0), o;
|
|
6553
6565
|
}
|
|
6554
|
-
function
|
|
6566
|
+
function Rt(c, t, e, i) {
|
|
6555
6567
|
i === void 0 && (i = {});
|
|
6556
6568
|
const {
|
|
6557
6569
|
ancestorScroll: s = !0,
|
|
@@ -6559,26 +6571,26 @@ function Ct(c, t, e, i) {
|
|
|
6559
6571
|
elementResize: r = typeof ResizeObserver == "function",
|
|
6560
6572
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
6561
6573
|
animationFrame: l = !1
|
|
6562
|
-
} = i, h =
|
|
6574
|
+
} = i, h = At(c), d = s || o ? [...h ? tt(h) : [], ...t ? tt(t) : []] : [];
|
|
6563
6575
|
d.forEach((E) => {
|
|
6564
6576
|
s && E.addEventListener("scroll", e, {
|
|
6565
6577
|
passive: !0
|
|
6566
6578
|
}), o && E.addEventListener("resize", e);
|
|
6567
6579
|
});
|
|
6568
|
-
const f = h && a ?
|
|
6580
|
+
const f = h && a ? bi(h, e) : null;
|
|
6569
6581
|
let u = -1, x = null;
|
|
6570
6582
|
r && (x = new ResizeObserver((E) => {
|
|
6571
6583
|
let [p] = E;
|
|
6572
|
-
p && p.target === h && x && (x.unobserve(t), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
6584
|
+
p && p.target === h && x && t && (x.unobserve(t), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
6573
6585
|
var y;
|
|
6574
6586
|
(y = x) == null || y.observe(t);
|
|
6575
6587
|
})), e();
|
|
6576
|
-
}), h && !l && x.observe(h), x.observe(t));
|
|
6577
|
-
let g, m = l ?
|
|
6588
|
+
}), h && !l && x.observe(h), t && x.observe(t));
|
|
6589
|
+
let g, m = l ? U(c) : null;
|
|
6578
6590
|
l && w();
|
|
6579
6591
|
function w() {
|
|
6580
|
-
const E =
|
|
6581
|
-
m && !
|
|
6592
|
+
const E = U(c);
|
|
6593
|
+
m && !de(m, E) && e(), m = E, g = requestAnimationFrame(w);
|
|
6582
6594
|
}
|
|
6583
6595
|
return e(), () => {
|
|
6584
6596
|
var E;
|
|
@@ -6587,20 +6599,20 @@ function Ct(c, t, e, i) {
|
|
|
6587
6599
|
}), f == null || f(), (E = x) == null || E.disconnect(), x = null, l && cancelAnimationFrame(g);
|
|
6588
6600
|
};
|
|
6589
6601
|
}
|
|
6590
|
-
const
|
|
6602
|
+
const dt = ii, ft = si, Ht = Qe, Ii = Je, ut = (c, t, e) => {
|
|
6591
6603
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
6592
|
-
platform:
|
|
6604
|
+
platform: Ci,
|
|
6593
6605
|
...e
|
|
6594
6606
|
}, o = {
|
|
6595
6607
|
...s.platform,
|
|
6596
6608
|
_c: i
|
|
6597
6609
|
};
|
|
6598
|
-
return
|
|
6610
|
+
return Ze(c, t, {
|
|
6599
6611
|
...s,
|
|
6600
6612
|
platform: o
|
|
6601
6613
|
});
|
|
6602
6614
|
};
|
|
6603
|
-
let
|
|
6615
|
+
let Ri = class {
|
|
6604
6616
|
constructor(t) {
|
|
6605
6617
|
n(this, "ctx");
|
|
6606
6618
|
n(this, "enable", !1);
|
|
@@ -6670,7 +6682,7 @@ let Ti = class {
|
|
|
6670
6682
|
return;
|
|
6671
6683
|
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 = i;
|
|
6672
6684
|
const o = t.drawX + s.x, r = t.drawY + s.y;
|
|
6673
|
-
|
|
6685
|
+
ut({
|
|
6674
6686
|
getBoundingClientRect() {
|
|
6675
6687
|
return {
|
|
6676
6688
|
width: t.visibleWidth,
|
|
@@ -6685,7 +6697,7 @@ let Ti = class {
|
|
|
6685
6697
|
}
|
|
6686
6698
|
}, this.floatingEl, {
|
|
6687
6699
|
placement: t.overflowTooltipPlacement,
|
|
6688
|
-
middleware: [
|
|
6700
|
+
middleware: [ft(), Ht(), dt(6), Ii({ element: this.arrowEl })]
|
|
6689
6701
|
}).then((l) => {
|
|
6690
6702
|
const { x: h, y: d, placement: f, middlewareData: u } = l;
|
|
6691
6703
|
if (Object.assign(this.floatingEl.style, {
|
|
@@ -6724,7 +6736,7 @@ let Ti = class {
|
|
|
6724
6736
|
this.contentEl.remove(), this.arrowEl.remove(), this.floatingEl.remove();
|
|
6725
6737
|
}
|
|
6726
6738
|
};
|
|
6727
|
-
class
|
|
6739
|
+
class vi {
|
|
6728
6740
|
constructor(t) {
|
|
6729
6741
|
n(this, "editorEl");
|
|
6730
6742
|
n(this, "inputEl");
|
|
@@ -6752,17 +6764,17 @@ class Oi {
|
|
|
6752
6764
|
if (!this.ctx.isTarget(t) || !this.ctx.focusCell || this.ctx.finding)
|
|
6753
6765
|
return;
|
|
6754
6766
|
const { focusCell: e } = this.ctx;
|
|
6755
|
-
if (
|
|
6767
|
+
if (t.code === "Escape" && this.ctx.editing) {
|
|
6756
6768
|
this.cancel = !0;
|
|
6757
|
-
const { focusCell:
|
|
6758
|
-
|
|
6769
|
+
const { focusCell: d } = this.ctx;
|
|
6770
|
+
d && (this.ctx.emit("setSelectorCell", d), this.cellTarget = d), this.doneEdit();
|
|
6759
6771
|
return;
|
|
6760
6772
|
}
|
|
6761
6773
|
if ((t.altKey || t.metaKey) && t.key === "Enter" && this.ctx.editing && this.inputEl) {
|
|
6762
6774
|
t.preventDefault();
|
|
6763
|
-
const
|
|
6764
|
-
this.inputEl.value =
|
|
6765
|
-
` +
|
|
6775
|
+
const d = this.inputEl.selectionStart, f = this.inputEl.value.substring(0, d), u = this.inputEl.value.substring(d);
|
|
6776
|
+
this.inputEl.value = f + `
|
|
6777
|
+
` + u, this.inputEl.selectionStart = this.inputEl.selectionEnd = d + 1, this.autoSize();
|
|
6766
6778
|
return;
|
|
6767
6779
|
}
|
|
6768
6780
|
if (t.code === "Tab" && this.ctx.editing) {
|
|
@@ -6785,9 +6797,10 @@ class Oi {
|
|
|
6785
6797
|
t.preventDefault(), this.startEdit();
|
|
6786
6798
|
return;
|
|
6787
6799
|
}
|
|
6788
|
-
const
|
|
6789
|
-
if (o || r || a ||
|
|
6800
|
+
const i = t.key, s = t.ctrlKey, o = t.altKey, r = t.shiftKey, a = t.metaKey;
|
|
6801
|
+
if (s || o || r || a || [
|
|
6790
6802
|
"Enter",
|
|
6803
|
+
"CapsLock",
|
|
6791
6804
|
"Escape",
|
|
6792
6805
|
"Tab",
|
|
6793
6806
|
"Backspace",
|
|
@@ -6813,9 +6826,9 @@ class Oi {
|
|
|
6813
6826
|
"F10",
|
|
6814
6827
|
"F11",
|
|
6815
6828
|
"F12"
|
|
6816
|
-
].includes(
|
|
6829
|
+
].includes(i))
|
|
6817
6830
|
return;
|
|
6818
|
-
if (!(document.activeElement === this.inputEl)) {
|
|
6831
|
+
if (!(document.activeElement === this.inputEl) && e.editorType === "text") {
|
|
6819
6832
|
t.preventDefault();
|
|
6820
6833
|
return;
|
|
6821
6834
|
}
|
|
@@ -6877,7 +6890,7 @@ class Oi {
|
|
|
6877
6890
|
header: d
|
|
6878
6891
|
} = this.ctx;
|
|
6879
6892
|
let f = this.ctx.body.visibleHeight;
|
|
6880
|
-
o > f && (o = f), this.editorEl.style.zIndex = "100", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxWidth = "none", this.editorEl.style.maxHeight = `${f}px`, ["text"].includes(s) ? (this.inputEl.style.opacity = "1", this.inputEl.style.position = "relative", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${h}px`, this.inputEl.value = "", i !== null && (this.inputEl.value = i)) : (this.inputEl.style.opacity = "0", this.inputEl.style.width = "1px", this.inputEl.style.height = "1px", this.inputEl.style.position = "absolute", this.inputEl.style.left = "0px", this.inputEl.style.top = "0px")
|
|
6893
|
+
o > f && (o = f), this.editorEl.style.zIndex = "100", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxWidth = "none", this.editorEl.style.maxHeight = `${f}px`, ["text"].includes(s) ? (this.inputEl.style.opacity = "1", this.inputEl.style.position = "relative", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${h}px`, this.inputEl.value = "", i !== null && (this.inputEl.value = i), (this.inputEl.scrollHeight > o || this.drawY < d.height) && this.autoSize()) : (this.inputEl.style.opacity = "0", this.inputEl.style.width = "1px", this.inputEl.style.height = "1px", this.inputEl.style.position = "absolute", this.inputEl.style.left = "0px", this.inputEl.style.top = "0px");
|
|
6881
6894
|
}
|
|
6882
6895
|
doneEditByInput() {
|
|
6883
6896
|
if (this.cellTarget && this.cellTarget.editorType === "text") {
|
|
@@ -6894,24 +6907,23 @@ class Oi {
|
|
|
6894
6907
|
if (!e)
|
|
6895
6908
|
return;
|
|
6896
6909
|
const i = this.ctx.focusCell;
|
|
6897
|
-
if (!i || ["index", "index-selection", "selection"].includes(i.type) || this.enable || !(i.isVerticalVisible() && i.isHorizontalVisible()))
|
|
6898
|
-
return;
|
|
6899
|
-
const { rowKey: o, key: r } = i, a = this.ctx.database.getReadonly(o, r);
|
|
6900
|
-
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("draw"));
|
|
6901
|
-
}
|
|
6902
|
-
editCell(t, e) {
|
|
6903
|
-
const i = this.ctx.body.renderRows.find((h) => h.rowIndex === t);
|
|
6904
6910
|
if (!i)
|
|
6905
6911
|
return;
|
|
6906
|
-
|
|
6912
|
+
i.isVerticalVisible() && i.isHorizontalVisible() || this.ctx.emit("scrollToIndex", i.rowIndex, i.colIndex), this.editCell(i.rowIndex, i.colIndex, t);
|
|
6913
|
+
}
|
|
6914
|
+
editCell(t, e, i = !1) {
|
|
6915
|
+
const s = this.ctx.body.renderRows.find((f) => f.rowIndex === t);
|
|
6907
6916
|
if (!s)
|
|
6908
6917
|
return;
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6918
|
+
const o = s.cells.find((f) => f.colIndex === e);
|
|
6919
|
+
if (!o || !(o.isVerticalVisible() && o.isHorizontalVisible()))
|
|
6920
|
+
return;
|
|
6921
|
+
this.ctx.emit("setSelectorCell", o);
|
|
6922
|
+
const a = this.ctx.focusCell;
|
|
6923
|
+
if (!a || ["index", "index-selection", "selection"].includes(a.type) || this.enable)
|
|
6912
6924
|
return;
|
|
6913
|
-
const { rowKey:
|
|
6914
|
-
|
|
6925
|
+
const { rowKey: l, key: h } = a, d = this.ctx.database.getReadonly(l, h);
|
|
6926
|
+
a && !d && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = a, this.startEditByInput(this.cellTarget, i), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("draw"));
|
|
6915
6927
|
}
|
|
6916
6928
|
doneEdit() {
|
|
6917
6929
|
this.enable && (this.doneEditByInput(), this.ctx.emit("cellHideTooltip"), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.resetEditorStyle(), setTimeout(() => {
|
|
@@ -6930,7 +6942,7 @@ class Oi {
|
|
|
6930
6942
|
(t = this.editorEl) == null || t.remove();
|
|
6931
6943
|
}
|
|
6932
6944
|
}
|
|
6933
|
-
let
|
|
6945
|
+
let _i = class {
|
|
6934
6946
|
constructor(t) {
|
|
6935
6947
|
n(this, "ctx");
|
|
6936
6948
|
n(this, "emptyEl");
|
|
@@ -6949,7 +6961,7 @@ let Li = class {
|
|
|
6949
6961
|
this.emptyEl.remove();
|
|
6950
6962
|
}
|
|
6951
6963
|
};
|
|
6952
|
-
class
|
|
6964
|
+
class Si {
|
|
6953
6965
|
constructor(t) {
|
|
6954
6966
|
n(this, "ctx");
|
|
6955
6967
|
n(this, "observer");
|
|
@@ -6963,7 +6975,7 @@ class Mi {
|
|
|
6963
6975
|
}
|
|
6964
6976
|
init() {
|
|
6965
6977
|
this.observer = new MutationObserver(
|
|
6966
|
-
|
|
6978
|
+
vt(() => {
|
|
6967
6979
|
const t = this.ctx.overlayerElement.querySelectorAll('[data-auto-height="true"]'), e = /* @__PURE__ */ new Map();
|
|
6968
6980
|
t.forEach((o) => {
|
|
6969
6981
|
const r = Number(o.getAttribute("data-row-index")), a = Number(o.getAttribute("data-col-index"));
|
|
@@ -7190,7 +7202,7 @@ class Mi {
|
|
|
7190
7202
|
};
|
|
7191
7203
|
}
|
|
7192
7204
|
}
|
|
7193
|
-
class
|
|
7205
|
+
class Ut {
|
|
7194
7206
|
constructor(t, e = [], i = {}) {
|
|
7195
7207
|
n(this, "container");
|
|
7196
7208
|
n(this, "menuData");
|
|
@@ -7224,7 +7236,7 @@ class zt {
|
|
|
7224
7236
|
const o = this.createElement("span", "e-virt-table-menu-item-text");
|
|
7225
7237
|
if (o.textContent = t.label, s.appendChild(o), i.appendChild(s), (r = t.children) != null && r.length) {
|
|
7226
7238
|
const a = this.createElement("span", "e-virt-table-menu-arrow");
|
|
7227
|
-
a.innerHTML =
|
|
7239
|
+
a.innerHTML = at, i.appendChild(a);
|
|
7228
7240
|
const l = this.createSubmenu(t.children);
|
|
7229
7241
|
i._submenu = l, this.container.appendChild(l);
|
|
7230
7242
|
}
|
|
@@ -7278,10 +7290,10 @@ class zt {
|
|
|
7278
7290
|
async showSubmenu(t, e) {
|
|
7279
7291
|
if (this.activeSubmenus.has(e)) return;
|
|
7280
7292
|
this.activeSubmenus.add(e), e.classList.add("show");
|
|
7281
|
-
const i =
|
|
7282
|
-
const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, h = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await
|
|
7293
|
+
const i = Rt(t, e, async () => {
|
|
7294
|
+
const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, h = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await ut(t, e, {
|
|
7283
7295
|
placement: h,
|
|
7284
|
-
middleware: [
|
|
7296
|
+
middleware: [dt(8), ft({ padding: 8 })]
|
|
7285
7297
|
});
|
|
7286
7298
|
Object.assign(e.style, {
|
|
7287
7299
|
left: `${d}px`,
|
|
@@ -7322,7 +7334,7 @@ class zt {
|
|
|
7322
7334
|
}
|
|
7323
7335
|
}
|
|
7324
7336
|
const i = e.getAttribute("data-menu") || (e == null ? void 0 : e.getAttribute("data-submenu")), s = this.findMenuItem(i || "");
|
|
7325
|
-
s &&
|
|
7337
|
+
s && this.onClick && this.onClick(s, i || "");
|
|
7326
7338
|
}
|
|
7327
7339
|
findMenuItem(t, e = this.menuData) {
|
|
7328
7340
|
for (const i of e) {
|
|
@@ -7348,10 +7360,10 @@ class zt {
|
|
|
7348
7360
|
}),
|
|
7349
7361
|
contextElement: document.body
|
|
7350
7362
|
};
|
|
7351
|
-
|
|
7352
|
-
|
|
7363
|
+
Rt(e, this.container, () => {
|
|
7364
|
+
ut(e, this.container, {
|
|
7353
7365
|
placement: "right-start",
|
|
7354
|
-
middleware: [
|
|
7366
|
+
middleware: [dt(), ft(), Ht()]
|
|
7355
7367
|
}).then(({ x: i, y: s }) => {
|
|
7356
7368
|
this.container && Object.assign(this.container.style, {
|
|
7357
7369
|
left: `${i}px`,
|
|
@@ -7360,9 +7372,6 @@ class zt {
|
|
|
7360
7372
|
});
|
|
7361
7373
|
});
|
|
7362
7374
|
}
|
|
7363
|
-
hide() {
|
|
7364
|
-
this.cleanupAllSubmenus(this.container), this.container.style.display = "none";
|
|
7365
|
-
}
|
|
7366
7375
|
destroy() {
|
|
7367
7376
|
this.container.removeEventListener("mouseenter", this.boundMouseEnterHandler, !0), this.container.removeEventListener("mouseleave", this.boundMouseLeaveHandler, !0), this.container.removeEventListener("click", this.boundClickHandler), this.cleanupAllSubmenus(this.container), this.container.style.display = "none", this.container.replaceChildren();
|
|
7368
7377
|
}
|
|
@@ -7416,7 +7425,7 @@ class zt {
|
|
|
7416
7425
|
}), t.remove();
|
|
7417
7426
|
}
|
|
7418
7427
|
}
|
|
7419
|
-
class
|
|
7428
|
+
class Ti {
|
|
7420
7429
|
constructor(t) {
|
|
7421
7430
|
n(this, "ctx");
|
|
7422
7431
|
n(this, "contextMenuEl");
|
|
@@ -7427,60 +7436,68 @@ class Ai {
|
|
|
7427
7436
|
init() {
|
|
7428
7437
|
this.ctx.on("outsideMousedown", () => {
|
|
7429
7438
|
this.hide();
|
|
7430
|
-
}), this.ctx.on("cellContextMenuClick", (t, e) => {
|
|
7439
|
+
}), this.ctx.on("cellContextMenuClick", async (t, e) => {
|
|
7431
7440
|
if (this.isCustom) {
|
|
7432
7441
|
this.contextMenuEl.style.display = "block", this.positionMenu(e);
|
|
7433
7442
|
return;
|
|
7434
7443
|
}
|
|
7435
|
-
const { ENABLE_CONTEXT_MENU: i, CUSTOM_BODY_CONTEXT_MENU: s, CONTEXT_MENU: o } = this.ctx.config
|
|
7436
|
-
|
|
7444
|
+
const { ENABLE_CONTEXT_MENU: i, CUSTOM_BODY_CONTEXT_MENU: s, CONTEXT_MENU: o, BEFORE_BODY_CONTEXT_MENU_METHOD: r } = this.ctx.config;
|
|
7445
|
+
let a = [...o, ...s];
|
|
7446
|
+
if (r && (a = await r({ list: a, cell: t, hide: this.hide.bind(this) })), !i || a.length === 0) return;
|
|
7437
7447
|
e.preventDefault();
|
|
7438
|
-
const { xArr:
|
|
7439
|
-
|
|
7440
|
-
onClick: (
|
|
7441
|
-
|
|
7448
|
+
const { xArr: l, yArr: h } = this.ctx.selector, [d, f] = l, [u, x] = h, { rowIndex: g, colIndex: m } = t;
|
|
7449
|
+
g >= u && g <= x && m >= d && m <= f || this.ctx.emit("setSelectorCell", t, e), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy(), this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new Ut(this.contextMenuEl, a, {
|
|
7450
|
+
onClick: (E, p) => {
|
|
7451
|
+
p === "copy" ? (this.ctx.emit("contextMenuCopy"), this.hide()) : p === "paste" ? (this.ctx.emit("contextMenuPaste"), this.hide()) : p === "cut" ? (this.ctx.emit("contextMenuCut"), this.hide()) : p === "clearSelected" ? (this.ctx.emit("contextMenuClearSelected"), this.hide()) : E.event && E.event(e, {
|
|
7452
|
+
hide: this.hide.bind(this),
|
|
7453
|
+
cell: t
|
|
7454
|
+
});
|
|
7442
7455
|
}
|
|
7443
7456
|
}), this.currentDOMTreeMenu.positionMenu(e);
|
|
7444
|
-
}), this.ctx.on("cellHeaderContextMenuClick", (t, e) => {
|
|
7457
|
+
}), this.ctx.on("cellHeaderContextMenuClick", async (t, e) => {
|
|
7445
7458
|
if (this.isCustom) {
|
|
7446
7459
|
this.contextMenuEl.style.display = "block", this.positionMenu(e);
|
|
7447
7460
|
return;
|
|
7448
7461
|
}
|
|
7449
|
-
const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: o } = this.ctx.config,
|
|
7450
|
-
if (t.colIndex <
|
|
7462
|
+
const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: o, BEFORE_HEADER_CONTEXT_MENU_METHOD: r } = this.ctx.config, a = i, l = s || this.ctx.maxColIndex - o;
|
|
7463
|
+
if (t.colIndex < a || t.colIndex > l)
|
|
7451
7464
|
return;
|
|
7452
|
-
const { HEADER_CONTEXT_MENU:
|
|
7453
|
-
|
|
7465
|
+
const { HEADER_CONTEXT_MENU: h, CUSTOM_HEADER_CONTEXT_MENU: d, ENABLE_HEADER_CONTEXT_MENU: f } = this.ctx.config;
|
|
7466
|
+
let u = [...h, ...d];
|
|
7467
|
+
if (r && (u = await r({ list: u, cell: t, hide: this.hide.bind(this) })), !f || u.length === 0) return;
|
|
7454
7468
|
e.preventDefault();
|
|
7455
|
-
const { xArr:
|
|
7456
|
-
|
|
7457
|
-
const
|
|
7458
|
-
...
|
|
7459
|
-
children: this.filterColumns(
|
|
7460
|
-
} :
|
|
7461
|
-
this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new
|
|
7462
|
-
onClick: (
|
|
7463
|
-
const { xArr:
|
|
7464
|
-
if (
|
|
7465
|
-
const
|
|
7469
|
+
const { xArr: x } = this.ctx.selector, [g, m] = x, { colIndex: w } = t;
|
|
7470
|
+
w >= g && w <= m || (this.ctx.focusCellHeader = t, this.ctx.emit("selectCols", t)), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy();
|
|
7471
|
+
const p = this.ctx.database.getColumns(), y = u.map((b) => b.value === "visible" ? {
|
|
7472
|
+
...b,
|
|
7473
|
+
children: this.filterColumns(p)
|
|
7474
|
+
} : b);
|
|
7475
|
+
this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new Ut(this.contextMenuEl, y, {
|
|
7476
|
+
onClick: (b, C) => {
|
|
7477
|
+
const { xArr: R } = this.ctx.selector, [_, L] = R;
|
|
7478
|
+
if (C === "fixedLeft" || C === "fixedRight" || C === "fixedNone") {
|
|
7479
|
+
const v = this.ctx.header.allCellHeaders.filter((I) => I.colIndex >= _ && I.colIndex <= L).filter((I) => I.level === 0).filter((I) => !I.column.fixedDisabled).map((I) => I.key);
|
|
7466
7480
|
this.ctx.database.setCustomHeaderFixedData(
|
|
7467
|
-
|
|
7468
|
-
|
|
7481
|
+
v,
|
|
7482
|
+
C === "fixedLeft" ? "left" : C === "fixedRight" ? "right" : ""
|
|
7469
7483
|
), this.hide();
|
|
7470
|
-
} else if (
|
|
7471
|
-
const
|
|
7472
|
-
|
|
7473
|
-
} else if (
|
|
7474
|
-
if (!
|
|
7475
|
-
if (
|
|
7476
|
-
const
|
|
7477
|
-
this.ctx.database.setCustomHeaderHideData(
|
|
7484
|
+
} else if (C === "hide") {
|
|
7485
|
+
const v = this.ctx.header.leafCellHeaders.filter((I) => I.colIndex >= _ && I.colIndex <= L).filter((I) => !I.children.length).filter((I) => !I.column.hideDisabled).map((I) => I.key);
|
|
7486
|
+
v.length > 0 && this.ctx.database.setCustomHeaderHideData(v, !0), this.hide();
|
|
7487
|
+
} else if (C !== "visible") if (C.startsWith("visible_")) {
|
|
7488
|
+
if (!b.key) return;
|
|
7489
|
+
if (b.children) {
|
|
7490
|
+
const T = this.getLeafKeys(b.children);
|
|
7491
|
+
this.ctx.database.setCustomHeaderHideData(T, !1);
|
|
7478
7492
|
} else
|
|
7479
|
-
this.ctx.database.setCustomHeaderHideData([
|
|
7480
|
-
this.currentDOMTreeMenu && this.currentDOMTreeMenu.removeSubMenuItem(
|
|
7481
|
-
const
|
|
7482
|
-
|
|
7483
|
-
} else
|
|
7493
|
+
this.ctx.database.setCustomHeaderHideData([b.key], !1);
|
|
7494
|
+
this.currentDOMTreeMenu && this.currentDOMTreeMenu.removeSubMenuItem(C);
|
|
7495
|
+
const v = this.ctx.database.getColumns();
|
|
7496
|
+
Q(v).filter((T) => T.hide).length === 0 && this.hide();
|
|
7497
|
+
} else C === "resetHeader" ? (this.ctx.database.resetCustomHeader(), this.hide()) : b.event && b.event(e, {
|
|
7498
|
+
hide: this.hide.bind(this),
|
|
7499
|
+
cell: t
|
|
7500
|
+
});
|
|
7484
7501
|
}
|
|
7485
7502
|
}), this.positionMenu(e);
|
|
7486
7503
|
}), this.ctx.on("click", () => {
|
|
@@ -7501,10 +7518,10 @@ class Ai {
|
|
|
7501
7518
|
}),
|
|
7502
7519
|
contextElement: document.body
|
|
7503
7520
|
};
|
|
7504
|
-
|
|
7505
|
-
|
|
7521
|
+
Rt(e, this.contextMenuEl, () => {
|
|
7522
|
+
ut(e, this.contextMenuEl, {
|
|
7506
7523
|
placement: "right-start",
|
|
7507
|
-
middleware: [
|
|
7524
|
+
middleware: [dt(), ft(), Ht()]
|
|
7508
7525
|
}).then(({ x: i, y: s }) => {
|
|
7509
7526
|
this.contextMenuEl && Object.assign(this.contextMenuEl.style, {
|
|
7510
7527
|
left: `${i}px`,
|
|
@@ -7540,7 +7557,7 @@ class Ai {
|
|
|
7540
7557
|
this.hide(), (t = this.contextMenuEl) == null || t.remove();
|
|
7541
7558
|
}
|
|
7542
7559
|
}
|
|
7543
|
-
class
|
|
7560
|
+
class Oi {
|
|
7544
7561
|
constructor(t) {
|
|
7545
7562
|
n(this, "ctx");
|
|
7546
7563
|
n(this, "loadingEl");
|
|
@@ -7570,7 +7587,7 @@ class Hi {
|
|
|
7570
7587
|
this.loadingEl.remove();
|
|
7571
7588
|
}
|
|
7572
7589
|
}
|
|
7573
|
-
class
|
|
7590
|
+
class Li {
|
|
7574
7591
|
constructor(t) {
|
|
7575
7592
|
n(this, "ctx");
|
|
7576
7593
|
n(this, "container");
|
|
@@ -7644,10 +7661,10 @@ class Di {
|
|
|
7644
7661
|
t.className = "e-virt-table-finder-bar";
|
|
7645
7662
|
const e = document.createElement("div");
|
|
7646
7663
|
e.className = "e-virt-table-finder-bar-input-wrapper", this.input = document.createElement("input"), this.input.type = "text", this.input.className = "e-virt-table-finder-bar-input", this.input.placeholder = "", e.appendChild(this.input), this.loadingEl = document.createElement("div"), this.loadingEl.className = "e-virt-table-finder-bar-loading";
|
|
7647
|
-
const i =
|
|
7664
|
+
const i = te;
|
|
7648
7665
|
this.loadingEl.innerHTML = i, e.appendChild(this.loadingEl), this.countEl = document.createElement("span"), this.countEl.className = "e-virt-table-finder-bar-count";
|
|
7649
7666
|
const s = document.createElement("div");
|
|
7650
|
-
return s.className = "e-virt-table-finder-bar-nav", this.prevBtn = document.createElement("button"), this.prevBtn.className = "e-virt-table-finder-bar-nav-btn prev-btn", this.prevBtn.innerHTML =
|
|
7667
|
+
return s.className = "e-virt-table-finder-bar-nav", this.prevBtn = document.createElement("button"), this.prevBtn.className = "e-virt-table-finder-bar-nav-btn prev-btn", this.prevBtn.innerHTML = at, this.nextBtn = document.createElement("button"), this.nextBtn.className = "e-virt-table-finder-bar-nav-btn next-btn", this.nextBtn.innerHTML = at, s.appendChild(this.prevBtn), s.appendChild(this.nextBtn), this.closeBtn = document.createElement("button"), this.closeBtn.className = "e-virt-table-finder-bar-nav-btn close-btn", this.closeBtn.innerHTML = "×", t.appendChild(e), t.appendChild(this.countEl), t.appendChild(s), t.appendChild(this.closeBtn), t;
|
|
7651
7668
|
}
|
|
7652
7669
|
bindEvents() {
|
|
7653
7670
|
this.input.addEventListener("input", () => {
|
|
@@ -7729,7 +7746,7 @@ class Di {
|
|
|
7729
7746
|
this.hide(), this.container.remove();
|
|
7730
7747
|
}
|
|
7731
7748
|
}
|
|
7732
|
-
class
|
|
7749
|
+
class Di {
|
|
7733
7750
|
constructor(t, e) {
|
|
7734
7751
|
n(this, "options");
|
|
7735
7752
|
n(this, "scroller");
|
|
@@ -7755,7 +7772,7 @@ class Xi {
|
|
|
7755
7772
|
o,
|
|
7756
7773
|
r
|
|
7757
7774
|
);
|
|
7758
|
-
this.ctx = new
|
|
7775
|
+
this.ctx = new He(a, this.options), this.header = new ke(this.ctx), this.footer = new Xe(this.ctx), this.body = new Be(this.ctx), this.scroller = new De(this.ctx), this.selector = new Ye(this.ctx), this.autofill = new Ke(this.ctx), this.tooltip = new Ri(this.ctx), this.empty = new _i(this.ctx), this.editor = new vi(this.ctx), this.overlayer = new Si(this.ctx), this.contextMenu = new Ti(this.ctx), this.loading = new Oi(this.ctx), this.finderBar = new Li(this.ctx), this.ctx.on("draw", () => {
|
|
7759
7776
|
this.draw();
|
|
7760
7777
|
}), this.ctx.on("drawView", () => {
|
|
7761
7778
|
this.draw(!0);
|
|
@@ -8021,10 +8038,10 @@ class Xi {
|
|
|
8021
8038
|
}
|
|
8022
8039
|
getUtils() {
|
|
8023
8040
|
return {
|
|
8024
|
-
mergeColCell:
|
|
8025
|
-
mergeRowCell:
|
|
8026
|
-
getSpanArrByRow:
|
|
8027
|
-
getSpanObjByColumn:
|
|
8041
|
+
mergeColCell: Ce,
|
|
8042
|
+
mergeRowCell: ye,
|
|
8043
|
+
getSpanArrByRow: Zt,
|
|
8044
|
+
getSpanObjByColumn: Jt
|
|
8028
8045
|
};
|
|
8029
8046
|
}
|
|
8030
8047
|
getColumnByKey(t) {
|
|
@@ -8045,6 +8062,6 @@ class Xi {
|
|
|
8045
8062
|
}
|
|
8046
8063
|
}
|
|
8047
8064
|
export {
|
|
8048
|
-
|
|
8065
|
+
Di as default
|
|
8049
8066
|
};
|
|
8050
8067
|
//# sourceMappingURL=index.es.js.map
|