jquery.dgtable 2.0.21 → 2.0.23
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/lib.cjs.js +1 -1
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +1 -1
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +1 -1
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +1 -1
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +1 -1
- package/dist/lib.umd.min.js.map +1 -1
- package/package.json +2 -2
package/dist/lib.cjs.js
CHANGED
|
@@ -3853,7 +3853,7 @@ const getSupportedTransform = () => {
|
|
|
3853
3853
|
return _isTransformSupported;
|
|
3854
3854
|
};
|
|
3855
3855
|
|
|
3856
|
-
function h(e, t) {for (let l = 0, o = e.length; l >= 0 && l < o; l += 1) if (t(e[l], l, e)) return e[l];}function c(e) {return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/'/g, "'").replace(/"/g, """).replace(/\n/g, "<br />");}const u = Symbol("safe"),m = Symbol("hover_in"),f = Symbol("hover_out"),p = Symbol("row_click"),g = Symbol("preview_cell"),b = Symbol("cell"),v = Symbol("related_touch"),C = Symbol("original_row_index"),w = Symbol("destroyed");class y extends Array {constructor(e) {var _e$sortColumn, _e$onComparatorRequir, _e$customSortingProvi;super(), this.onComparatorRequired = null, this.customSortingProvider = null, e = e || {}, this.sortColumn = (_e$sortColumn = e.sortColumn) !== null && _e$sortColumn !== void 0 ? _e$sortColumn : [], this.onComparatorRequired = (_e$onComparatorRequir = e.onComparatorRequired) !== null && _e$onComparatorRequir !== void 0 ? _e$onComparatorRequir : null, this.customSortingProvider = (_e$customSortingProvi = e.customSortingProvider) !== null && _e$customSortingProvi !== void 0 ? _e$customSortingProvi : null;}add(e, t) {if (Array.isArray(e)) {const l = e;if ("number" == typeof t) for (let e = 0, o = l.length; e < o; e++) this.splice(t++, 0, l[e]);else for (let e = 0, t = l.length; e < t; e++) this.push(l[e]);} else {const l = e;"number" == typeof t ? this.splice(t, 0, l) : this.push(l);}}reset(e) {this.length = 0, e && this.add(e);}filteredCollection(e, t) {if (e && t) {const l = new y({ sortColumn: this.sortColumn, onComparatorRequired: this.onComparatorRequired, customSortingProvider: this.customSortingProvider });for (let o = 0, r = this.length; o < r; o++) {const r = this[o];e(r, t) && (r[C] = o, l.push(r));}return l;}return null;}sort(e) {let t;if ("function" == typeof e) return super.sort(e);if (this.sortColumn.length) {const e = [];for (let t = 0; t < this.sortColumn.length; t++) {const l = W(this.sortColumn[t], this.sortColumn[t].descending);let o = null;this.onComparatorRequired && (o = this.onComparatorRequired(this.sortColumn[t].column, this.sortColumn[t].descending, l)), o || (o = l), e.push(o.bind(this));}if (1 === e.length) t = e[0];else {const l = e.length;t = (t, o) => {let r = 0;for (let i = 0; i < l; i++) if (r = e[i](t, o), 0 !== r) return r;return r;};}const l = (e) => (e.sort(t), e);if (this.customSortingProvider) {const e = this.customSortingProvider(this, l);e !== this && this.splice(0, this.length, ...e);} else l(this);}return this;}}function W(e, t) {let l = e.comparePath;"string" == typeof l && (l = l.split("."));const o = l.length,r = o > 1,i = t ? 1 : -1,s = t ? -1 : 1;return function (e, t) {let n = e[l[0]],a = t[l[0]];if (r) for (let e = 1; e < o; e++) n = n && n[l[e]], a = a && a[l[e]];return n === a ? 0 : null == n ? i : null == a ? s : n < a ? i : s;};}class R extends Array {constructor() {super();}get(e) {for (let t = 0, l = this.length; t < l; t++) if (this[t].name === e) return this[t];return null;}indexOf(e) {const t = "string" == typeof e ? e : e.name;for (let e = 0, l = this.length; e < l; e++) if (this[e].name === t) return e;return -1;}getByOrder(e) {for (let t = 0, l = this.length; t < l; t++) if (this[t].order === e) return this[t];return null;}normalizeOrder() {const e = [];for (let t = 0; t < this.length; t++) e.push(this[t]);e.sort((e, t) => e.order < t.order ? -1 : e.order > t.order ? 1 : 0);for (let t = 0; t < e.length; t++) e[t].order = t;return this;}getColumns() {const e = [];for (let t = 0; t < this.length; t++) e.push(this[t]);return e.sort((e, t) => e.order < t.order ? -1 : e.order > t.order ? 1 : 0), e;}getVisibleColumns() {const e = [];for (let t = 0; t < this.length; t++) {const l = this[t];l.visible && e.push(l);}return e.sort((e, t) => e.order < t.order ? -1 : e.order > t.order ? 1 : 0), e;}getMaxOrder() {let e = 0;for (let t = 0; t < this.length; t++) {const l = this[t];l.order > e && (e = l.order);}return e;}moveColumn(e, t) {if (e && t) {const l = e.order,o = t.order;if (l < o) for (let e = l + 1; e <= o; e++) {const t = this.getByOrder(e);t && t.order--;} else for (let e = l - 1; e >= o; e--) {const t = this.getByOrder(e);t && t.order++;}e.order = o;}return this;}}function S(e, t) {const l = t.column,o = null == t.keyword ? "" : t.keyword.toString();if (!o || !l) return true;let r = e[l];if (null == r) return false;let i = r.toString(),s = o;return t.caseSensitive || (i = i.toLowerCase(), s = s.toLowerCase()), -1 !== i.indexOf(s);}const _ = { NONE: "none", AUTO: "auto", SCROLL: "scroll" },N = document.createElement.bind(document);function x(e) {["relative", "absolute", "fixed"].includes(getComputedStyle(e).position) || (e.style.position = "relative");}function L(e) {const t = e.target;return /^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(t.tagName);}function k(e) {const t = getComputedStyle(e);return (parseFloat(t.paddingLeft) || 0) + (parseFloat(t.paddingRight) || 0);}function T(e) {const t = e.style;t["-webkit-touch-callout"] = "none", t["-webkit-user-select"] = "none", t["-moz-user-select"] = "none", t["-ms-user-select"] = "none", t["-o-user-select"] = "none", t["user-select"] = "none";}function z(e, t) {const r = e._o.tableClassName,i = N("div");i.className = e.el.className;const s = N("div");s.className = r + "-header";const n = N("div");n.className = r + "-header-row";const a = N("div");a.className = r + "-header-cell";const d = N("div");d.textContent = t, a.appendChild(d), n.appendChild(a), s.appendChild(n), i.appendChild(s), setCssProps(i, { position: "absolute", top: "-9999px", visibility: "hidden" }), document.body.appendChild(i);const h = getElementWidth(a);return i.remove(), h;}function P(e) {const t = e._o,r = e._p;let i,s = 0,n = 0;r.table && (s = r.table ? r.table.scrollTop : 0, n = r.table ? r.table.scrollLeft : 0, t.virtualTable && (i = r.table.style.display, r.table.style.display = "none"));let a = getElementWidth(e.el);r.table && (t.virtualTable && void 0 !== i && (r.table.style.display = i), r.table.scrollTop = s, r.table.scrollLeft = n, r.header && (r.header.scrollLeft = n));const d = t.tableClassName,h = N("div");h.className = e.el.className, setCssProps(h, { "z-index": "-1", position: "absolute", left: "0", top: "-9999px" });const c = N("div");c.className = `${d}-header`, h.appendChild(c);const u = N("div");u.index = null, u.vIndex = null, u.className = `${d}-header-row`, c.appendChild(u);for (let e = 0; e < r.visibleColumns.length; e++) {const t = r.visibleColumns[e],l = N("div");l.className = `${d}-header-cell ${t.cellClasses || ""}`, l.columnName = t.name, l.appendChild(N("div")), u.appendChild(l);}document.body.appendChild(h), a -= function (e) {const t = getComputedStyle(e);return (parseFloat(t.borderLeftWidth) || 0) + (parseFloat(t.borderRightWidth) || 0);}(u);const m = u.querySelectorAll(`div.${d}-header-cell`);for (const e of m) {const t = getComputedStyle(e);if ("border-box" !== t.boxSizing) {a -= (parseFloat(t.borderRightWidth) || 0) + (parseFloat(t.borderLeftWidth) || 0) + k(e);const l = e.columnName,o = r.columns.get(l);o && (a -= o.arrowProposedWidth || 0);}}return h.remove(), Math.max(0, a);}function F(e) {const t = e._p,r = e._o.tableClassName,i = r + "-row",s = r + "-cell",n = t.visibleColumns,a = n.length,d = N("div");d.className = i, d.style.float = "left";let h = 0;for (let e = 0; e < a; e++) {var _t$actualWidth, _t$actualWidth2;const t = n[e],l = N("div");l.className = s, l.style.width = ((_t$actualWidth = t.actualWidth) !== null && _t$actualWidth !== void 0 ? _t$actualWidth : 0) + "px", t.cellClasses && (l.className += " " + t.cellClasses), l.appendChild(N("div")), d.appendChild(l), h += (_t$actualWidth2 = t.actualWidth) !== null && _t$actualWidth2 !== void 0 ? _t$actualWidth2 : 0;}const c = N("div");c.className = e.el.className, setCssProps(c, { "z-index": "-1", position: "absolute", left: "0", top: "-9999px", float: "left", width: "1px", overflow: "hidden" });const u = N("div");u.className = r, c.appendChild(u);const m = N("div");m.className = r + "-body", m.style.width = h + 1e4 + "px", u.appendChild(m), m.appendChild(d), document.body.appendChild(c);const f = N("div");setCssProps(f, { border: "1.5px solid #000", width: "0", height: "0", position: "absolute", left: "0", top: "-9999px" }), document.body.appendChild(f);const p = parseFloat(getComputedStyle(f).borderWidth),g = Math.round(p) !== p;f.remove();let b = getElementWidth(d, true, true, true);return b -= t.scrollbarWidth || 0, g && b++, c.remove(), b;}function M(e) {const t = e._p;return !!t.table && "rtl" === getComputedStyle(t.table).direction;}function H(e) {return 0 === e.widthMode ? "auto" : 2 === e.widthMode ? 100 * e.width + "%" : e.width;}class E {static saveSelection(e) {const t = window.getSelection();if (!t || 0 === t.rangeCount) return null;const l = t.getRangeAt(0);if (e !== l.commonAncestorContainer && !function (e, t) {let l = e;for (; (l = (_l$parentNode = (_l = l) === null || _l === void 0 ? void 0 : _l.parentNode) !== null && _l$parentNode !== void 0 ? _l$parentNode : null) && l !== t;) {var _l$parentNode, _l;}return !!l;}(l.commonAncestorContainer, e)) return null;const o = l.cloneRange();o.selectNodeContents(e), o.setEnd(l.startContainer, l.startOffset);const r = o.toString().length;return { start: r, end: r + l.toString().length };}static restoreSelection(e, t) {let l = 0;const o = [e];let r,i = false,s = false;const n = document.createRange();for (n.setStart(e, 0), n.collapse(true); !s && (r = o.pop());) if (r.nodeType === Node.TEXT_NODE) {const e = l + r.length;!i && t.start >= l && t.start <= e && (n.setStart(r, t.start - l), i = true), i && t.end >= l && t.end <= e && (n.setEnd(r, t.end - l), s = true), l = e;} else {let e = r.childNodes.length;for (; e--;) o.push(r.childNodes[e]);}const a = window.getSelection();a && (a.removeAllRanges(), a.addRange(n));}}const A = document.createElement.bind(document);function I(e, t) {var _ref, _t$v, _d$changedTouches;const o = e._o,i = M(e);let s = t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if (!s) return null;s[b] && (s = s[b]);let n = s.previousSibling;for (; n && 1 !== n.nodeType;) n = n.previousSibling;const a = !n,d = t,h = (_ref = (_t$v = t[v]) !== null && _t$v !== void 0 ? _t$v : (_d$changedTouches = d.changedTouches) === null || _d$changedTouches === void 0 ? void 0 : _d$changedTouches[0]) !== null && _ref !== void 0 ? _ref : t,c = (h.pageX || h.clientX || 0) - getElementOffset(s).left;if (i) {var _n$columnName, _n, _s$columnName;if (!a && getElementWidth(s, true, true, true) - c <= o.resizeAreaWidth / 2) return (_n$columnName = (_n = n) === null || _n === void 0 ? void 0 : _n.columnName) !== null && _n$columnName !== void 0 ? _n$columnName : null;if (c <= o.resizeAreaWidth / 2) return (_s$columnName = s.columnName) !== null && _s$columnName !== void 0 ? _s$columnName : null;} else {var _n$columnName2, _n2, _s$columnName2;if (!a && c <= o.resizeAreaWidth / 2) return (_n$columnName2 = (_n2 = n) === null || _n2 === void 0 ? void 0 : _n2.columnName) !== null && _n$columnName2 !== void 0 ? _n$columnName2 : null;if (getElementWidth(s, true, true, true) - c <= o.resizeAreaWidth / 2) return (_s$columnName2 = s.columnName) !== null && _s$columnName2 !== void 0 ? _s$columnName2 : null;}return null;}function O(e) {const t = e._p;return t.resizer && (t.resizer.remove(), t.resizer = null, t.eventsSink.remove(document, ".colresize")), e;}function B(e, t) {const s = t;if ("mousedown" === t.type && 0 !== s.button) return;const n = e._o,a = e._p,d = I(e, t);if (d) {const s = a.columns.get(d);if (!n.resizableColumns || !s || !s.resizable) return false;const h = M(e);a.resizer && a.resizer.remove(), a.resizer = A("div"), a.resizer.className = n.resizerClassName, setCssProps(a.resizer, { position: "absolute", display: "block", zIndex: "-1", visibility: "hidden", width: "2px", background: "#000", opacity: "0.7" }), e.el.appendChild(a.resizer);const c = s.element,u = a.resizer.parentNode,m = getComputedStyle(u),f = getComputedStyle(c),p = getElementOffset(c),g = getElementOffset(u);g.left += parseFloat(m.borderLeftWidth) || 0, g.top += parseFloat(m.borderTopWidth) || 0, p.left -= g.left, p.top -= g.top, p.top -= parseFloat(f.borderTopWidth) || 0;const b = getElementWidth(a.resizer, true, true, true);h ? (p.left -= Math.ceil((parseFloat(f.borderLeftWidth) || 0) / 2), p.left -= Math.ceil(b / 2)) : (p.left += getElementWidth(c, true, true, true), p.left += Math.ceil((parseFloat(f.borderRightWidth) || 0) / 2), p.left -= Math.ceil(b / 2)), setCssProps(a.resizer, { "z-index": "10", visibility: "visible", left: p.left + "px", top: p.top + "px", height: getElementHeight(e.el, false, false, false) + "px" }), a.resizer.columnName = c.columnName;try {a.resizer.style.zIndex = "";} catch {}a.eventsSink.add(document, "mousemove.colresize", (t) => $(e, t)).add(document, "touchmove.colresize", (t) => $(e, t)).add(document, "mouseup.colresize", (t) => D(e, t)).add(document, "touchend.colresize", (t) => D(e, t)), t.preventDefault();}}function $(e, t) {var _ref2, _t$v2, _p$changedTouches;const o = e._p;if (!o.resizer) return;const i = o.columns.get(o.resizer.columnName);if (!i) return;const s = M(e),n = i.element,a = o.resizer.parentNode,d = getComputedStyle(a),h = getComputedStyle(n),c = getElementOffset(n),u = getElementOffset(a);u.left += parseFloat(d.borderLeftWidth) || 0, c.left -= u.left;const m = getElementWidth(o.resizer, true, true, true),f = "border-box" === h.boxSizing,p = t;let g = ((_ref2 = (_t$v2 = t[v]) !== null && _t$v2 !== void 0 ? _t$v2 : (_p$changedTouches = p.changedTouches) === null || _p$changedTouches === void 0 ? void 0 : _p$changedTouches[0]) !== null && _ref2 !== void 0 ? _ref2 : t).pageX - u.left,b = c.left;b -= Math.ceil(m / 2), s ? (b += getElementWidth(n, true, true, true), b -= i.ignoreMin ? 0 : e._o.minColumnWidth, f || (b -= Math.ceil((parseFloat(h.borderLeftWidth) || 0) / 2), b -= k(n)), g > b && (g = b)) : (b += i.ignoreMin ? 0 : e._o.minColumnWidth, f || (b += Math.ceil((parseFloat(h.borderRightWidth) || 0) / 2), b += k(n)), g < b && (g = b)), o.resizer.style.left = g + "px";}function D(e, t) {var _ref3, _t$v3, _b$changedTouches;const o = e._o,i = e._p;if (!i.resizer) return;i.eventsSink.remove(document, ".colresize");const s = i.columns.get(i.resizer.columnName);if (!s) return i.resizer.remove(), void (i.resizer = null);const n = M(e),a = s.element,d = a.firstChild,h = i.resizer.parentNode,c = getComputedStyle(h),u = getComputedStyle(a),m = getElementOffset(a),f = getElementOffset(h);f.left += parseFloat(c.borderLeftWidth) || 0, m.left -= f.left;const p = getElementWidth(i.resizer, true, true, true),g = "border-box" === u.boxSizing,b = t;let C = ((_ref3 = (_t$v3 = t[v]) !== null && _t$v3 !== void 0 ? _t$v3 : (_b$changedTouches = b.changedTouches) === null || _b$changedTouches === void 0 ? void 0 : _b$changedTouches[0]) !== null && _ref3 !== void 0 ? _ref3 : t).pageX - f.left,w = m.left,y = 0;if (w -= Math.ceil(p / 2), n) {if (!g) {C += k(a);const e = getComputedStyle(d || a);C += parseFloat(e.borderLeftWidth) || 0, C += parseFloat(e.borderRightWidth) || 0, C += s.arrowProposedWidth || 0;}w += getElementWidth(a, true, true, true);const t = w - (s.ignoreMin ? 0 : e._o.minColumnWidth);C > t && (C = t), y = w - C;} else {if (!g) {C -= k(a);const e = getComputedStyle(d || a);C -= parseFloat(e.borderLeftWidth) || 0, C -= parseFloat(e.borderRightWidth) || 0, C -= s.arrowProposedWidth || 0;}const t = w + (s.ignoreMin ? 0 : e._o.minColumnWidth);C < t && (C = t), y = C - w;}i.resizer.remove(), i.resizer = null;let W = y;if (2 === s.widthMode) {let t = P(e),l = 0,r = 0;for (let e = 0; e < i.visibleColumns.length; e++) {var _o$actualWidth;const o = i.visibleColumns[e];o.name !== s.name && (2 === o.widthMode ? (l += o.width, r++) : t -= (_o$actualWidth = o.actualWidth) !== null && _o$actualWidth !== void 0 ? _o$actualWidth : 0);}if (t = Math.max(1, t), 1 === t && i.table && (t = i.table.clientWidth), W = y / t, r > 0) {const e = W / ((1 - W) / l);l += W, (l < 1 && o.relativeWidthGrowsToFillWidth || l > 1 && o.relativeWidthShrinksToFillWidth) && (W = e);}W *= 100, W += "%";}e.setColumnWidth(s.name, W);}function q(e, t) {var _o$columns$get;const l = e._o,o = e._p;if (!l.resizableColumns) return;const r = I(e, t),i = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);i && (r && (_o$columns$get = o.columns.get(r)) !== null && _o$columns$get !== void 0 && _o$columns$get.resizable ? i.style.cursor = "e-resize" : i.style.cursor = "");}function V(e, t) {var _ref4, _t$v4, _s$changedTouches;const o = e._o,s = t,n = t,a = (_ref4 = (_t$v4 = t[v]) !== null && _t$v4 !== void 0 ? _t$v4 : (_s$changedTouches = s.changedTouches) === null || _s$changedTouches === void 0 ? void 0 : _s$changedTouches[0]) !== null && _ref4 !== void 0 ? _ref4 : { pageX: n.pageX, pageY: n.pageY },d = t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if (!d) return;const h = getElementOffset(d);h.width = getElementWidth(d, true, true, true), h.height = getElementHeight(d, true, true, true), e.emit("headercontextmenu", { columnName: d.columnName, pageX: a.pageX, pageY: a.pageY, bounds: h });}function j(e, t) {if (L(t)) return;if (I(e, t)) return;const l = e._o,o = e._p,r = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (!r) return;if (!l.sortableColumns) return;const i = o.columns.get(r.columnName),s = o.rows.sortColumn;if (i && i.sortable) {let t = true;const o = s.length ? s[s.length - 1] : null;o && o.column === i.name && (o.descending && l.allowCancelSort ? (t = false, s.splice(s.length - 1, 1)) : o.descending = !o.descending);const r = e;t ? r.sort(i.name, void 0, true).render() : r.sort();}}const X = Array.prototype.indexOf,U = document.createElement.bind(document);function Y(e) {const t = e._p;return t.headerRow && (t.headerRow = void 0), e;}function G(e) {const t = e._o,l = e._p;if (!l.tbody) return e;if (t.virtualTable && l.virtualListHelper) {const e = l.virtualListHelper.estimateFullHeight();l._lastVirtualScrollHeight = e, l.tbody.style.height = e + "px";} else l.tbody.style.height = "";return e;}function J(e, t) {const l = e._p;if (!l.table) return e;const o = l.table.offsetWidth - l.table.clientWidth;if (o !== l.scrollbarWidth || t) {var _l$notifyRendererOfCo;l.scrollbarWidth = o;for (let e = 0; e < l.columns.length; e++) l.columns[e].actualWidthConsideringScrollbarWidth = null;if (l.scrollbarWidth > 0 && l.visibleColumns.length > 0 && l.tbody && l.headerRow) {var _l$visibleColumns$e$a;const e = l.visibleColumns.length - 1;l.visibleColumns[e].actualWidthConsideringScrollbarWidth = ((_l$visibleColumns$e$a = l.visibleColumns[e].actualWidth) !== null && _l$visibleColumns$e$a !== void 0 ? _l$visibleColumns$e$a : 0) - l.scrollbarWidth;const t = l.visibleColumns[e].actualWidthConsideringScrollbarWidth + "px",o = l.tbody.childNodes;for (let l = 0, r = o.length; l < r; l++) {const r = o[l];1 === r.nodeType && (r.childNodes[e].style.width = t);}l.headerRow.childNodes[e].style.width = t;}Q(e), (_l$notifyRendererOfCo = l.notifyRendererOfColumnsConfig) === null || _l$notifyRendererOfCo === void 0 ? void 0 : _l$notifyRendererOfCo.call(l);}return e;}function K(e, t) {const o = e._o,r = e._p;if (!r.tbody || !r.table || !r.headerRow) return e;const i = F(e);if (r.tbody.style.minWidth = i + "px", r.headerRow.style.minWidth = i + (r.scrollbarWidth || 0) + "px", r.eventsSink.remove(r.table, "scroll"), o.width === _.AUTO) setElementWidth(r.table, getElementWidth(r.tbody, true, true, true)), setElementWidth(e.el, getElementWidth(r.table, true, true, true));else if (o.width === _.SCROLL) {if (t) {const t = r.table ? r.table.scrollTop : 0,l = r.table ? r.table.scrollLeft : 0;!function (e) {const t = e.style.display;e.style.display = "none", e.offsetHeight, e.style.display = t;}(e.el), r.table.scrollTop = t, r.table.scrollLeft = l, r.header && (r.header.scrollLeft = l);}const l = () => function (e) {const t = e._p;t.header.scrollLeft = t.table.scrollLeft, Z(e);}(e);r.eventsSink.add(r.table, "scroll", l);}return e;}function Q(e) {var _t$scrollbarWidth;const t = e._p,l = e._o;if (!t.headerRow) return;const o = l.tableClassName + "-sticky",r = t.headerRow,i = M(e);t.lastIsRtl = i;const s = (_t$scrollbarWidth = t.scrollbarWidth) !== null && _t$scrollbarWidth !== void 0 ? _t$scrollbarWidth : 0;let n = 0,a = 0,d = null;const h = [],c = [];let u = null,m = [];for (let e = r.firstElementChild; e; e = e.nextElementSibling) {var _u;const l = e.getAttribute("data-column");if (!l) continue;const r = t.columns.get(l);if (r) if ("start" === r.sticky || "end" === r.sticky) {var _r$actualWidth;e.className += " " + o, e.style.position = "sticky";let t = (_r$actualWidth = r.actualWidth) !== null && _r$actualWidth !== void 0 ? _r$actualWidth : 0,l = null;if (null === d && (l = getComputedStyle(e), d = l.boxSizing), "content-box" === d && (null === l && (l = getComputedStyle(e)), t += (parseFloat(l.paddingLeft) || 0) + (parseFloat(l.paddingRight) || 0) + (parseFloat(l.borderLeftWidth) || 0) + (parseFloat(l.borderRightWidth) || 0)), "start" === r.sticky) {const l = r.stickyPos = { direction: "start", absDirection: i ? "right" : "left", offset: n };e.style[l.absDirection] = n + "px", n += t, m.length = 0, u = [e], h.push(u);} else {const l = r.stickyPos = { direction: "end", absDirection: i ? "left" : "right", offset: a };e.style[l.absDirection] = a + s + "px", a += t, c.push([e, ...m]), m.length = 0;}} else delete r.stickyPos, (_u = u) !== null && _u !== void 0 && _u.push(e), m !== null && m !== void 0 && m.push(e), "sticky" === e.style.position && (e.classList.remove(o), e.style.position = "", e.style.left = "", e.style.right = "");}t.stickiesStart = h, t.stickiesEnd = c, Z(e);}function Z(e) {const t = e._p;if (!t.table || !t.headerRow || !t.tbody) return;const l = t.stickiesStart,o = t.stickiesEnd,r = t.stickiesSetStart,i = t.stickiesSetEnd,s = t.stickiesSetStart = new Set(),n = t.stickiesSetEnd = new Set();if (l !== null && l !== void 0 && l.length || o !== null && o !== void 0 && o.length) {const e = t.table.scrollLeft;if (e === t.lastStickyScrollLeft) return;t.lastStickyScrollLeft = e;const r = t.headerRow.children,i = 1.5,a = t.lastIsRtl,d = (e, t, l) => {if (e && e.length) for (const o of e) {const e = o[0],s = o.slice(1),n = s[0],d = s[s.length - 1];if (!e || !e.getBoundingClientRect) continue;const h = e.getBoundingClientRect(),c = t !== a;let u = false;if (n && d) {const e = n.getBoundingClientRect(),l = d.getBoundingClientRect();u = t ? a ? h.right - i > l.left && h.left + i < e.right : h.right - i > e.left && h.left + i < l.right : a ? h.left + i < e.right && h.right - i > l.left : h.left + i < l.right && h.right - i > e.left;}e.classList.toggle(c ? "is-sticky-left" : "is-sticky-right", u), u && l.add(X.call(r, e));}};d(l, true, s), d(o, false, n);}const a = [],d = [];for (const e of s) (r === null || r === void 0 ? void 0 : r.has(e)) || a.push({ index: e, start: true });for (const e of n) (i === null || i === void 0 ? void 0 : i.has(e)) || a.push({ index: e, start: false });if (r) for (const e of r) s.has(e) || d.push({ index: e, start: true });if (i) for (const e of i) n.has(e) || d.push({ index: e, start: false });if (!a.length && !d.length) return;let h = t.tbody.firstElementChild;for (; h;) {const e = h.children;for (const l of d) {var _e$l$index;(_e$l$index = e[l.index]) === null || _e$l$index === void 0 || _e$l$index.classList.remove(l.start !== t.lastIsRtl ? "is-sticky-left" : "is-sticky-right");}for (const l of a) {var _e$l$index2;(_e$l$index2 = e[l.index]) === null || _e$l$index2 === void 0 || _e$l$index2.classList.add(l.start !== t.lastIsRtl ? "is-sticky-left" : "is-sticky-right");}h = h.nextElementSibling;}t.isStickyColumns = new Map();for (const e of s) t.isStickyColumns.set(e, "start");for (const e of n) t.isStickyColumns.set(e, "end");}function ee(e, t) {const l = e._p,o = e._o;if (!l.headerRow || !l.tbody) return e;const r = l.headerRow.querySelectorAll(`div.${o.tableClassName}-header-cell`)[t];if (!r) return e;const i = l.columns.get(r.columnName);if (i) {r.style.width = (i.actualWidthConsideringScrollbarWidth || i.actualWidth || 0) + "px";const e = (i.actualWidthConsideringScrollbarWidth || i.actualWidth || 0) + "px",o = l.tbody.childNodes;for (let l = 0, r = o.length; l < r; l++) {const r = o[l];1 === r.nodeType && (r.childNodes[t].style.width = e);}}return e;}function te(e) {const t = e._p,l = e._o;if (t.table && t.headerRow) {const e = l.tableClassName,o = scopedSelectorAll(t.headerRow, `>div.${e}-header-cell.sorted`),r = Array.prototype.slice.call(o, 0).map((e) => e.querySelector(":scope>div>.sort-arrow")).filter((e) => !!e);for (const e of r) {var _e$parentNode;const l = (_e$parentNode = e.parentNode) === null || _e$parentNode === void 0 ? void 0 : _e$parentNode.parentNode;if (l) {const e = t.columns.get(l.columnName);e && (e.arrowProposedWidth = 0);}e.remove();}for (const e of o) e.classList.remove("sorted", "desc");}return e;}function le(e, t, l) {var _i$element$firstChild;const o = e._p,r = e._o,i = o.columns.get(t);if (!i) return false;const s = U("span");return s.className = "sort-arrow", i.element && (i.element.className += l ? " sorted desc" : " sorted", (_i$element$firstChild = i.element.firstChild) !== null && _i$element$firstChild !== void 0 && _i$element$firstChild.insertBefore(s, i.element.firstChild.firstChild)), 2 !== i.widthMode && r.adjustColumnWidthForSortArrow && (i.arrowProposedWidth = s.scrollWidth + (parseFloat(getComputedStyle(s).marginRight) || 0) + (parseFloat(getComputedStyle(s).marginLeft) || 0)), true;}function oe(e, t) {const l = t.firstChild;t.addEventListener("mousedown", (t) => B(e, t)), t.addEventListener("mousemove", (t) => q(e, t)), t.addEventListener("mouseup", (t) => function (e, t) {2 === t.button && V(e, t);}(e, t)), t.addEventListener("mouseleave", (t) => function (e, t) {const l = e._o,o = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);o && (o.style.cursor = "");}(e, t)), t.addEventListener("touchstart", (t) => function (e, t) {const l = e._p;if (l.currentTouchId) return;const o = t.changedTouches[0];l.currentTouchId = o.identifier;const r = t.currentTarget,i = { x: o.pageX, y: o.pageY };let s,n = i;const a = function () {l.currentTouchId = null, l.eventsSink.remove(r, ".colheader"), clearTimeout(s);};t[v] = t.changedTouches[0], B(e, t), s = setTimeout(() => {a(), l.eventsSink.add(r, "touchend.colheader", (e) => {L(e) || e.preventDefault(), l.eventsSink.remove(r, ".colheader");}, { once: true }).add(r, "touchcancel.colheader", (e) => {l.eventsSink.remove(r, ".colheader");}, { once: true }), Math.sqrt(Math.pow(Math.abs(n.x - i.x), 2) + Math.pow(Math.abs(n.y - i.y), 2)) < 9 && (O(e), V(e, t));}, 500), l.eventsSink.add(r, "touchend.colheader", (t) => {const o = t,r = h(Array.from(o.changedTouches), (e) => e.identifier === l.currentTouchId);r && (a(), L(t) || t.preventDefault(), n = { x: r.pageX, y: r.pageY }, (Math.sqrt(Math.pow(Math.abs(n.x - i.x), 2) + Math.pow(Math.abs(n.y - i.y), 2)) < 9 || l.resizer) && (o[v] = r, j(e, o)));}).add(r, "touchcancel.colheader", a).add(r, "touchmove.colheader", (t) => {const o = t,r = h(Array.from(o.changedTouches), (e) => e.identifier === l.currentTouchId);r && (n = { x: r.pageX, y: r.pageY }, l.resizer && (t.preventDefault(), o[v] = r, q(e, o)));});}(e, t)), t.addEventListener("dragstart", (t) => function (e, t) {const l = e._o,o = e._p;if (l.movableColumns) {var _t$dataTransfer;const e = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (!e) return void t.preventDefault();const r = o.columns.get(e.columnName);r && r.movable ? (e.style.opacity = "0.35", o.dragId = 161061273 * Math.random(), (_t$dataTransfer = t.dataTransfer) === null || _t$dataTransfer === void 0 ? void 0 : _t$dataTransfer.setData("text", JSON.stringify({ dragId: o.dragId, column: r.name }))) : t.preventDefault();} else t.preventDefault();}(e, t)), t.addEventListener("click", (t) => j(e, t)), t.addEventListener("contextmenu", (e) => e.preventDefault()), l.addEventListener("dragenter", (t) => function (e, t) {const l = e._o,o = e._p;if (l.movableColumns) {var _t$dataTransfer2;let e = null;const r = (_t$dataTransfer2 = t.dataTransfer) === null || _t$dataTransfer2 === void 0 ? void 0 : _t$dataTransfer2.getData("text");if (r) try {e = JSON.parse(r);} catch {e = null;}const i = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (!i) return;if (!e || o.dragId === e.dragId && i.columnName !== e.column) {const e = o.columns.get(i.columnName);e && (e.movable || e !== o.visibleColumns[0]) && i.classList.add("drag-over");}}}(e, t)), l.addEventListener("dragover", (e) => {e.preventDefault();}), l.addEventListener("dragleave", (t) => function (e, t) {const l = e._o,o = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (!o) return;const r = t.relatedTarget;(r === null || r === void 0 ? void 0 : r.contains(o.firstChild)) || o.classList.remove("drag-over");}(e, t)), l.addEventListener("drop", (t) => function (e, t, _t$dataTransfer3) {t.preventDefault();const l = e._o,o = e._p,r = (_t$dataTransfer3 = t.dataTransfer) === null || _t$dataTransfer3 === void 0 ? void 0 : _t$dataTransfer3.getData("text");if (!r) return;let i;try {i = JSON.parse(r);} catch {return;}const s = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (s) {if (l.movableColumns && i.dragId === o.dragId) {const t = i.column,l = s.columnName,r = o.columns.get(t),n = o.columns.get(l);r && n && r.movable && (n.movable || n !== o.visibleColumns[0]) && e.moveColumn(t, l);}s.classList.remove("drag-over");}}(e, t));}function re(e, t) {let l = Math.max(0, parseFloat(e) || 0),o = 0;return l > 0 && (e === l + "%" ? (o = 2, l /= 100) : l > 0 && l < 1 ? o = 2 : (l < t && (l = t), o = 1)), { width: l, mode: o };}function ie(e, t) {var _t$allowPreview;let l = re(t.width, t.ignoreMin ? 0 : e.minColumnWidth),o = { name: t.name, label: void 0 === t.label ? t.name : t.label, width: l.width, widthMode: l.mode, resizable: void 0 === t.resizable || t.resizable, sortable: void 0 === t.sortable || t.sortable, movable: void 0 === t.movable || t.movable, visible: void 0 === t.visible || t.visible, cellClasses: void 0 === t.cellClasses ? e.cellClasses : t.cellClasses, ignoreMin: void 0 !== t.ignoreMin && !!t.ignoreMin, sticky: void 0 === t.sticky ? null : t.sticky || null, allowPreview: !!((_t$allowPreview = t.allowPreview) !== null && _t$allowPreview !== void 0 ? _t$allowPreview : 1), dataPath: [], comparePath: [], order: 0 };const r = void 0 === t.dataPath ? o.name : t.dataPath,i = void 0 === t.comparePath ? r : t.comparePath;return o.dataPath = "string" == typeof r ? r.split(".") : r, o.comparePath = "string" == typeof i ? i.split(".") : i, o;}function se(e) {const t = e._p;0 === t.visibleColumns.length && t.columns.length && (t.columns[0].visible = true, t.visibleColumns.push(t.columns[0]), e.emit("showcolumn", t.columns[0].name));}function ne(e) {const t = e._p;if (t.filteredRows && t.filterArgs) {let l = e._o.filter || S;t.filteredRows = t.rows.filteredCollection(l, t.filterArgs);}}function ae(e, t, l) {let o = l.dataPath,r = t[o[0]];for (let e = 1; e < o.length && null != r; e++) r = r && r[o[e]];const i = e.cellFormatter;let s;if (i[u]) s = i(r, l.name, t);else try {s = i(r, l.name, t);} catch (e) {s = "[ERROR]", console.error("Failed to generate content for cell " + l.name, e);}return null == s && (s = ""), s;}const de = Array.prototype.indexOf,he = document.createElement.bind(document);function ce(e) {const t = e._p;if (t.cellPreviewCell) {var _l$rowIndex;const l = t.cellPreviewCell,o = l[b];let r;try {r = E.saveSelection(l);} catch {}t.cellPreviewCell.remove(), o && t._unbindCellHoverOut(o), t._unbindCellHoverOut(l);try {r && o && E.restoreSelection(o, r);} catch {}e.emit("cellpreviewdestroy", { el: l.firstChild, name: l.columnName, rowIndex: (_l$rowIndex = l.rowIndex) !== null && _l$rowIndex !== void 0 ? _l$rowIndex : null, rowData: null == l.rowIndex ? null : t.rows[l.rowIndex], cell: o, cellEl: o === null || o === void 0 ? void 0 : o.firstChild }), o && delete o[g], delete l[b], t.cellPreviewCell = null, t.abortCellPreview = false;} else t.abortCellPreview = true;return e;}const ue = Object.prototype.hasOwnProperty;class me {constructor(e) {var _e$maxColumnsSortCoun, _e$sortedColumns;this.VERSION = me.VERSION;const t = this._o = {},s = this._p = { eventsSink: new DomEventsSink(), mitt: { all: n = n || new Map(), on: function (e, t) {var l = n.get(e);l ? l.push(t) : n.set(e, [t]);}, off: function (e, t) {var l = n.get(e);l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : n.set(e, []));}, emit: function (e, t) {var l = n.get(e);l && l.slice().map(function (e) {e(t);}), (l = n.get("*")) && l.slice().map(function (l) {l(e, t);});} }, tableSkeletonNeedsRendering: true };var n;this.el = e.el && e.el instanceof HTMLElement ? e.el : document.createElement("div"), this.el !== e.el && this.el.classList.add(e.className || "dgtable-wrapper"), s.eventsSink.add(this.el, "dragend.colresize", (e) => {return t = e, void (this._p.resizer || (t.target.style.opacity = ""));var t;}), t.virtualTable = void 0 === e.virtualTable || !!e.virtualTable, t.estimatedRowHeight = e.estimatedRowHeight || void 0, t.rowsBufferSize = e.rowsBufferSize || 3, t.minColumnWidth = Math.max(e.minColumnWidth || 35, 0), t.resizeAreaWidth = e.resizeAreaWidth || 8, t.resizableColumns = void 0 === e.resizableColumns || !!e.resizableColumns, t.movableColumns = void 0 === e.movableColumns || !!e.movableColumns;const d = (_e$maxColumnsSortCoun = e.maxColumnsSortCount) !== null && _e$maxColumnsSortCoun !== void 0 ? _e$maxColumnsSortCoun : e.sortableColumns;t.sortableColumns = void 0 === d ? 1 : Number(d) || 1, t.adjustColumnWidthForSortArrow = void 0 === e.adjustColumnWidthForSortArrow || !!e.adjustColumnWidthForSortArrow, t.convertColumnWidthsToRelative = void 0 !== e.convertColumnWidthsToRelative && !!e.convertColumnWidthsToRelative, t.autoFillTableWidth = void 0 !== e.autoFillTableWidth && !!e.autoFillTableWidth, t.allowCancelSort = void 0 === e.allowCancelSort || !!e.allowCancelSort, t.cellClasses = void 0 === e.cellClasses ? "" : e.cellClasses, t.resizerClassName = void 0 === e.resizerClassName ? "dgtable-resize" : e.resizerClassName, t.tableClassName = void 0 === e.tableClassName ? "dgtable" : e.tableClassName, t.allowCellPreview = void 0 === e.allowCellPreview || e.allowCellPreview, t.allowHeaderCellPreview = void 0 === e.allowHeaderCellPreview || e.allowHeaderCellPreview, t.cellPreviewClassName = void 0 === e.cellPreviewClassName ? "dgtable-cell-preview" : e.cellPreviewClassName, t.cellPreviewAutoBackground = void 0 === e.cellPreviewAutoBackground || e.cellPreviewAutoBackground, t.onComparatorRequired = void 0 === e.onComparatorRequired ? null : e.onComparatorRequired, t.customSortingProvider = void 0 === e.customSortingProvider ? null : e.customSortingProvider, t.width = void 0 === e.width ? _.NONE : e.width, t.relativeWidthGrowsToFillWidth = void 0 === e.relativeWidthGrowsToFillWidth || !!e.relativeWidthGrowsToFillWidth, t.relativeWidthShrinksToFillWidth = void 0 !== e.relativeWidthShrinksToFillWidth && !!e.relativeWidthShrinksToFillWidth, this.setCellFormatter(e.cellFormatter), this.setHeaderCellFormatter(e.headerCellFormatter), this.setFilter(e.filter), t.height = e.height, this.setColumns(e.columns || [], false);let h = [];const c = (_e$sortedColumns = e.sortedColumns) !== null && _e$sortedColumns !== void 0 ? _e$sortedColumns : e.sortColumn;if (c) {let e = Array.isArray(c) ? c : [c];for (let t = 0, l = e.length; t < l; t++) {var _l$descending;let l = e[t];"string" == typeof l && (l = { column: l, descending: false });let o = s.columns.get(l.column);o && h.push({ column: l.column, comparePath: o.comparePath || o.dataPath, descending: (_l$descending = l.descending) !== null && _l$descending !== void 0 ? _l$descending : false });}}s.rows = new y({ sortColumn: h }), s.rows.onComparatorRequired = (e, l, o) => {if (t.onComparatorRequired) return t.onComparatorRequired(e, l, o);}, s.rows.customSortingProvider = (e, l) => t.customSortingProvider ? t.customSortingProvider(e, l) : l(e), s.filteredRows = null, s.scrollbarWidth = 0, s._lastVirtualScrollHeight = 0, function (e) {const t = e._p,s = (t) => {let s = t.currentTarget,n = t.relatedTarget;n === s || s.contains(n) || s[g] && (n === s[g] || s[g].contains(n)) || function (e, t, _n$visibleColumns$de$, _F$right) {const s = e._o,n = e._p,a = t.firstElementChild;if (!a) return;if (!(a.scrollWidth - a.clientWidth > 1 || a.scrollHeight - a.clientHeight > 1)) return;ce(e), n.abortCellPreview = false;const d = t.parentElement;if (!d) return;const h = (_n$visibleColumns$de$ = n.visibleColumns[de.call(d.childNodes, t)]) === null || _n$visibleColumns$de$ === void 0 ? void 0 : _n$visibleColumns$de$.name,c = h ? n.columns.get(h) : null;if (!c || false === c.allowPreview) return;const u = he("div");u.innerHTML = t.innerHTML, u.className = s.cellPreviewClassName;const m = t.classList.contains(`${s.tableClassName}-header-cell`);m && (u.classList.add("header"), t.classList.contains("sortable") && u.classList.add("sortable"), u.draggable = true, oe(e, u));const f = getComputedStyle(t),p = getComputedStyle(a),v = "right" === f.float,C = v ? "right" : "left",w = parseFloat(f.paddingLeft) || 0,y = parseFloat(f.paddingRight) || 0,W = parseFloat(f.paddingTop) || 0,R = parseFloat(f.paddingBottom) || 0;let S = a.scrollWidth + (t.clientWidth - a.offsetWidth);const _ = "border-box" === f.boxSizing;if (_ ? u.style.boxSizing = "border-box" : (S -= w + y, u.style.marginTop = (parseFloat(f.borderTopWidth) || 0) + "px"), !n.transparentBgColor1) {const e = document.createElement("div");document.body.appendChild(e), e.style.backgroundColor = "transparent", n.transparentBgColor1 = getComputedStyle(e).backgroundColor, e.style.backgroundColor = "rgba(0,0,0,0)", n.transparentBgColor2 = getComputedStyle(e).backgroundColor, e.remove();}const N = { "box-sizing": _ ? "border-box" : "content-box", width: S + "px", "min-height": Math.max(getElementHeight(t), /%/.test(f.minHeight) ? 0 : parseFloat(f.minHeight) || 0) + "px", "padding-left": w + "px", "padding-right": y + "px", "padding-top": W + "px", "padding-bottom": R + "px", overflow: "hidden", position: "absolute", "z-index": "-1", [C]: "0", top: "0", cursor: f.cursor };let x = f.backgroundColor;x !== n.transparentBgColor1 && x !== n.transparentBgColor2 || (x = getComputedStyle(d).backgroundColor), x !== n.transparentBgColor1 && x !== n.transparentBgColor2 || (x = "#fff"), N["background-color"] = x, setCssProps(u, N), u.firstChild && setCssProps(u.firstChild, { direction: p.direction, "white-space": p.whiteSpace, "min-height": p.minHeight, "line-height": p.lineHeight, font: p.font }), e.el.appendChild(u), m && T(u), u.rowVIndex = d.vIndex;const L = u.rowIndex = d.index;u.columnName = h;try {const e = E.saveSelection(t);e && E.restoreSelection(u, e);} catch {}if (e.emit("cellpreview", { el: u.firstElementChild, name: u.columnName, rowIndex: L !== null && L !== void 0 ? L : null, rowData: null == L ? null : n.rows[L], cell: t, cellEl: a }), n.abortCellPreview) return void u.remove();null != L && u.addEventListener("click", (t) => {e.emit("rowclick", { event: t, filteredRowIndex: d.vIndex, rowIndex: L, rowEl: d, rowData: n.rows[L] });});const k = e.el,z = k === window ? document : k,P = getComputedStyle(k),F = getElementOffset(t),M = getElementOffset(k);if (v) {const e = window.innerWidth;F.right = e - (F.left + getElementWidth(t, true, true, true)), M.right = e - (M.left + getElementWidth(k, true, true, true));}F.left -= parseFloat(P.borderLeftWidth) || 0, "right" === C && void 0 !== F.right && void 0 !== M.right && (F.right -= parseFloat(P.borderRightWidth) || 0), F.top -= parseFloat(P.borderTopWidth) || 0, "left" === C ? F.left += parseFloat(f.borderLeftWidth) || 0 : void 0 !== F.right && (F.right += parseFloat(f.borderRightWidth) || 0), F.top += parseFloat(f.borderTopWidth) || parseFloat(f.borderBottomWidth) || 0, F.left -= M.left, "right" === C && void 0 !== F.right && void 0 !== M.right && (F.right -= M.right), F.top -= M.top;const H = getElementWidth(k, false, false, false) - getElementWidth(u, true, true, true),A = "left" === C ? F.left : (_F$right = F.right) !== null && _F$right !== void 0 ? _F$right : 0,I = A < 0 ? 0 : A > H ? H : A;"left" === C ? F.left = I : F.right = I;const O = getElementHeight(t, true, true, true),B = ("scrollTop" in z ? z.scrollTop : 0) + getElementHeight(k, true) - O;F.top > B && (F.top = Math.max(0, B));const $ = { top: F.top + "px", "z-index": 9999 };$[C] = ("left" === C ? F.left : F.right) + "px", setCssProps(u, $), u[b] = t, n.cellPreviewCell = u, t[g] = u, n._bindCellHoverOut(t), n._bindCellHoverOut(u), u.addEventListener("wheel", () => {ce(e);});}(e, s);},n = (t) => {let l = t.currentTarget[b] || t.currentTarget,o = t.relatedTarget;o === e.el || l.contains(o) || l[g] && (o === l[g] || l[g].contains(o)) || function (e) {ce(e);}(e);};t._bindCellHoverIn = (e) => {e[m] || e.addEventListener("mouseover", e[m] = s);}, t._unbindCellHoverIn = (e) => {e[m] && (e.removeEventListener("mouseover", e[m]), e[m] = null);}, t._bindCellHoverOut = (e) => {e[f] || e.addEventListener("mouseout", e[f] = n);}, t._unbindCellHoverOut = (e) => {e[f] && (e.removeEventListener("mouseout", e[f]), e[f] = null);};}(this);}on(e, t) {return this[w] || this._p.mitt.on(e, t), this;}once(e, t) {if (this[w]) return this;const l = (o) => {this._p.mitt.off(e, l), t(o);};return this._p.mitt.on(e, l), this;}off(e, t) {return this[w] || (e || t ? this._p.mitt.off(e, t) : this._p.mitt.all.clear()), this;}emit(e, t) {return this[w] || this._p.mitt.emit(e, t), this;}destroy() {var _e$virtualListHelper, _e$table, _e$tbody;const e = this._p,t = this.el;if (this[w] || !e) return this;if (e.resizer && (e.resizer.remove(), e.resizer = null), (_e$virtualListHelper = e.virtualListHelper) !== null && _e$virtualListHelper !== void 0 && _e$virtualListHelper.destroy(), e.virtualListHelper = null, Y(this), (_e$table = e.table) !== null && _e$table !== void 0 && _e$table.remove(), (_e$tbody = e.tbody) !== null && _e$tbody !== void 0 && _e$tbody.remove(), e.workerListeners) {for (let t = 0; t < e.workerListeners.length; t++) {let l = e.workerListeners[t];l.worker.removeEventListener("message", l.listener, false);}e.workerListeners.length = 0;}e.rows.length = e.columns.length = 0, e._deferredRender && clearTimeout(e._deferredRender);for (let e in this) ue.call(this, e) && (this[e] = null);return this[w] = true, t && t.remove(), this;}close() {this.destroy();}remove() {this.destroy();}render() {const l = this._o,r = this._p;if (!this.el.offsetParent) return r._deferredRender || (r._deferredRender = setTimeout(() => {r._deferredRender = null, !this[w] && this.el.offsetParent && this.render();})), this;if (true === r.tableSkeletonNeedsRendering) {var _r$filteredRows;r.tableSkeletonNeedsRendering = false, l.width === _.AUTO && te(this);let s = r.table && r.table.parentNode ? r.table.scrollTop : NaN,n = r.table && r.table.parentNode ? getScrollHorz(r.table) : NaN;!function (e, _t$virtualListHelper) {const t = e._p,l = e._o;(_t$virtualListHelper = t.virtualListHelper) !== null && _t$virtualListHelper !== void 0 && _t$virtualListHelper.destroy(), t.virtualListHelper = null, t.table && l.virtualTable && (t.table.remove(), t.table = void 0, t.tbody = void 0), Y(e), t.currentTouchId = null, t.header && t.header.remove();const o = l.tableClassName,r = U("div"),s = U("div");r.className = `${o}-header`, s.className = `${o}-header-row`, t.header = r, t.headerRow = s, r.appendChild(s), e.el.prepend(r), x(e.el), l.width === _.SCROLL ? e.el.style.overflow = "hidden" : e.el.style.overflow = "", !l.height && l.virtualTable && (l.height = getElementHeight(e.el, true));}(this), function (e) {const t = e._p,l = e._o,r = l.tableClassName;if (l.virtualTable && !t.virtualRowHeight) {const l = () => {const e = U("div"),t = e.appendChild(U("div")),l = t.appendChild(U("div"));return e.className = `${r}-row`, t.className = `${r}-cell`, l.innerHTML = "0", e.style.visibility = "hidden", e.style.position = "absolute", e;},s = U("div");s.className = e.el.className, setCssProps(s, { "z-index": "-1", position: "absolute", left: "0", top: "-9999px", width: "1px", overflow: "hidden" });const n = U("div");n.className = r, s.appendChild(n);const a = U("div");a.className = `${r}-body`, a.style.width = "99999px", n.appendChild(a), document.body.appendChild(s);const d = l(),h = l(),c = l();a.appendChild(d), a.appendChild(h), a.appendChild(c), t.virtualRowHeight = getElementHeight(h, true, true, true), s.remove();}if (!t.table) {var _l$height;const s = document.createDocumentFragment(),n = U("div");n.className = r, l.virtualTable && (n.className += " virtual");const a = getComputedStyle(n);let h = ((_l$height = l.height) !== null && _l$height !== void 0 ? _l$height : 0) - getElementHeight(t.header, true, true, true);"border-box" !== a.boxSizing && (h -= parseFloat(a.borderTopWidth) || 0, h -= parseFloat(a.borderBottomWidth) || 0, h -= parseFloat(a.paddingTop) || 0, h -= parseFloat(a.paddingBottom) || 0), setCssProps(n, { height: l.height ? h + "px" : "auto", display: "block", overflowY: "auto", overflowX: l.width === _.SCROLL ? "auto" : "hidden" }), s.appendChild(n);const c = U("div");c.className = l.tableClassName + "-body", c.style.minHeight = "1px", t.table = n, t.tbody = c, x(c), x(n), n.appendChild(c), e.el.appendChild(s), function (e, _t$filteredRows) {const t = e._p,l = e._o,o = l.tableClassName,r = o + "-row",i = o + "-row-alt",s = o + "-cell",n = o + "-sticky";let a = t.visibleColumns,h = a.length;t.notifyRendererOfColumnsConfig = () => {a = t.visibleColumns, h = a.length;for (let e = 0; e < h; e++) {const t = a[e];t._finalWidth = t.actualWidthConsideringScrollbarWidth || t.actualWidth;}}, t.virtualListHelper = new VirtualListHelper({ list: t.table, itemsParent: t.tbody, autoVirtualWrapperWidth: false, virtual: l.virtualTable, buffer: l.rowsBufferSize, estimatedItemHeight: l.estimatedRowHeight ? l.estimatedRowHeight : t.virtualRowHeight || 40, itemElementCreatorFn: () => U("div"), onItemRender: (o, d) => {const c = t.filteredRows || t.rows,u = !!t.filteredRows,m = l.allowCellPreview,f = t.isStickyColumns;o.className = r, d % 2 == 1 && (o.className += " " + i);const g = c[d],b = u ? g[C] : d;o.vIndex = d, o.index = b;for (let e = 0; e < h; e++) {var _r$_finalWidth;const r = a[e],i = U("div");if (i.columnName = r.name, i.setAttribute("data-column", r.name), i.className = s, i.style.width = ((_r$_finalWidth = r._finalWidth) !== null && _r$_finalWidth !== void 0 ? _r$_finalWidth : 0) + "px", r.cellClasses && (i.className += " " + r.cellClasses), r.stickyPos) {i.className += " " + n, i.style.position = "sticky", i.style[r.stickyPos.absDirection] = r.stickyPos.offset + "px";const l = f === null || f === void 0 ? void 0 : f.get(e);"start" === l && !t.lastIsRtl || "end" === l && t.lastIsRtl ? i.classList.add("is-sticky-left") : ("start" === l && t.lastIsRtl || "end" === l && !t.lastIsRtl) && i.classList.add("is-sticky-right");}m && t._bindCellHoverIn(i), i.appendChild(U("div")).innerHTML = ae(l, g, r), o.appendChild(i);}o.addEventListener("click", o[p] = (t) => {e.emit("rowclick", { event: t, filteredRowIndex: d, rowIndex: b, rowEl: o, rowData: g });}), e.emit("rowcreate", { filteredRowIndex: d, rowIndex: b, rowEl: o, rowData: g });}, onItemUnrender: (t) => {t[p] && t.removeEventListener("click", t[p]), function (e, t) {const l = e._p;for (let e = 0, o = t.childNodes, r = o.length; e < r; e++) l._unbindCellHoverIn(o[e]);}(e, t), e.emit("rowdestroy", t);}, onScrollHeightChange: (l) => {l > t._lastVirtualScrollHeight && !t.scrollbarWidth && J(e), t._lastVirtualScrollHeight = l;} }), t.virtualListHelper.setCount(((_t$filteredRows = t.filteredRows) !== null && _t$filteredRows !== void 0 ? _t$filteredRows : t.rows).length), t.notifyRendererOfColumnsConfig();}(e);}}(this), this.tableWidthChanged(true, false), function (e) {const t = e._p,l = e._o,o = l.allowCellPreview,r = l.allowHeaderCellPreview,i = l.tableClassName + "-header-cell",s = t.headerRow;for (let n = 0; n < t.visibleColumns.length; n++) {const a = t.visibleColumns[n];if (a.visible) {var _a$actualWidth;const d = U("div");d.draggable = true, d.className = i, d.style.width = ((_a$actualWidth = a.actualWidth) !== null && _a$actualWidth !== void 0 ? _a$actualWidth : 0) + "px", l.sortableColumns && a.sortable && (d.className += " sortable"), d.columnName = a.name, d.setAttribute("data-column", a.name);const h = U("div");h.innerHTML = l.headerCellFormatter(a.label, a.name), d.appendChild(h), o && r && t._bindCellHoverIn(d), s.appendChild(d), t.visibleColumns[n].element = d, oe(e, d), T(d);}}Q(e), e.emit("headerrowcreate", s);}(this), r.virtualListHelper.setCount(((_r$filteredRows = r.filteredRows) !== null && _r$filteredRows !== void 0 ? _r$filteredRows : r.rows).length), G(this), J(this, true), K(this, true);for (let e = 0; e < r.rows.sortColumn.length; e++) le(this, r.rows.sortColumn[e].column, r.rows.sortColumn[e].descending);l.adjustColumnWidthForSortArrow && r.rows.sortColumn.length ? this.tableWidthChanged(true) : l.virtualTable || this.tableWidthChanged(), isNaN(s) || (r.table.scrollTop = s), isNaN(n) || (setScrollHorz(r.table, n), setScrollHorz(r.header, n)), this.emit("renderskeleton");}return r.virtualListHelper.render(), this.emit("render"), this;}clearAndRender(e) {var _t$notifyRendererOfCo;let t = this._p;return t.tableSkeletonNeedsRendering = true, (_t$notifyRendererOfCo = t.notifyRendererOfColumnsConfig) !== null && _t$notifyRendererOfCo !== void 0 && _t$notifyRendererOfCo.call(t), (void 0 === e || e) && this.render(), this;}setColumns(e, t) {const l = this._p;e = e || [];let o = new R();for (let t = 0, l = 0; t < e.length; t++) {let r = e[t],i = ie(this._o, r);void 0 !== r.order ? (r.order > l && (l = r.order + 1), i.order = r.order) : i.order = l++, o.push(i);}return o.normalizeOrder(), l.columns = o, l.visibleColumns = o.getVisibleColumns(), se(this), this.clearAndRender(t), this;}addColumn(e, t, l) {const o = this._p;let r = o.columns;if (e && !r.get(e.name)) {let i = null;void 0 !== t && (i = "string" == typeof t ? r.get(t) : r.getByOrder(t));let s = ie(this._o, e);s.order = i ? i.order : r.getMaxOrder() + 1;for (let e = r.getMaxOrder(), t = s.order; e >= t; e--) {let t = r.getByOrder(e);t && t.order++;}r.push(s), r.normalizeOrder(), o.visibleColumns = r.getVisibleColumns(), se(this), this.clearAndRender(l), this.emit("addcolumn", s.name);}return this;}removeColumn(e, t) {const l = this._p;let o = l.columns,r = o.indexOf(e);return r > -1 && (o.splice(r, 1), o.normalizeOrder(), l.visibleColumns = o.getVisibleColumns(), se(this), this.clearAndRender(t), this.emit("removecolumn", e)), this;}setColumnLabel(e, t) {let l = this._p.columns.get(e);if (l && (l.label = void 0 === t ? l.name : t, l.element)) for (let e = 0; e < l.element.firstChild.childNodes.length; e++) {let t = l.element.firstChild.childNodes[e];if (3 === t.nodeType) {t.textContent = l.label;break;}}return this;}moveColumn(e, t, l = true) {const o = this._o,r = this._p;let i,s,a = r.columns,d = l ? r.visibleColumns : a.getColumns();if ("string" == typeof e ? i = a.get(e) : "number" == typeof e && (i = d[e]), "string" == typeof t ? s = a.get(t) : "number" == typeof t && (s = d[t]), i && s && e !== t) {let e = i.order,t = s.order,l = a.moveColumn(i, s).getVisibleColumns();if (r.visibleColumns.length !== l.length || r.visibleColumns.some((e, t) => e !== l[t])) if (r.visibleColumns = l, se(this), o.virtualTable) this.clearAndRender();else {var _ref5, _ref6;const l = scopedSelectorAll(r.headerRow, `>div.${o.tableClassName}-header-cell`);let i = e < t ? t + 1 : t,s = e;l[0].parentNode.insertBefore(l[s], l[i]);let a = r.visibleColumns[e],d = ((_ref5 = a.actualWidthConsideringScrollbarWidth || a.actualWidth) !== null && _ref5 !== void 0 ? _ref5 : 0) + "px",h = r.visibleColumns[t],c = ((_ref6 = h.actualWidthConsideringScrollbarWidth || h.actualWidth) !== null && _ref6 !== void 0 ? _ref6 : 0) + "px",u = r.tbody.childNodes;for (let l = 0, o = u.length; l < o; l++) {let o = u[l];1 === o.nodeType && (o.insertBefore(o.childNodes[s], o.childNodes[i]), o.childNodes[t].firstChild.style.width = c, o.childNodes[e].firstChild.style.width = d);}}this.emit("movecolumn", { name: i.name, src: e, dest: t });}return this;}setColumnVisible(e, t) {const l = this._p;let o = l.columns.get(e);return t = !!t, o && !!o.visible !== t && (o.visible = t, l.visibleColumns = l.columns.getVisibleColumns(), this.emit(t ? "showcolumn" : "hidecolumn", e), se(this), this.clearAndRender()), this;}isColumnVisible(e) {let t = this._p.columns.get(e);return !!t && t.visible;}setMinColumnWidth(e) {let t = this._o;return e = Math.max(e, 0), t.minColumnWidth !== e && (t.minColumnWidth = e, this.tableWidthChanged(true)), this;}getMinColumnWidth() {return this._o.minColumnWidth;}setColumnWidth(e, t) {let l = this._p.columns.get(e),o = re(t, l.ignoreMin ? 0 : this._o.minColumnWidth);if (l) {let e = H(l);l.width = o.width, l.widthMode = o.mode;let t = H(l);e !== t && this.tableWidthChanged(true), this.emit("columnwidth", { name: l.name, width: t, oldWidth: e });}return this;}getColumnWidth(e) {let t = this._p.columns.get(e);return t ? H(t) : null;}getColumnConfig(e) {var _t$dataPath, _t$comparePath;let t = this._p.columns.get(e);return t ? { name: t.name, label: t.label, width: H(t), dataPath: (_t$dataPath = t.dataPath) === null || _t$dataPath === void 0 ? void 0 : _t$dataPath.join("."), comparePath: (_t$comparePath = t.comparePath) === null || _t$comparePath === void 0 ? void 0 : _t$comparePath.join("."), resizable: t.resizable, movable: t.movable, sortable: t.sortable, visible: t.visible, cellClasses: t.cellClasses, ignoreMin: t.ignoreMin, sticky: t.sticky, order: t.order } : null;}getColumnsConfig() {const e = this._p;let t = {};for (let l = 0; l < e.columns.length; l++) t[e.columns[l].name] = this.getColumnConfig(e.columns[l].name);return t;}setMaxColumnSortCount(e) {const t = this._p,l = this._o;if (l.sortableColumns !== e && (l.sortableColumns = e, t.table)) {const e = scopedSelectorAll(t.headerRow, `>div.${l.tableClassName}-header-cell`);for (let o = 0, r = e.length; o < r; o++) e[o].classList[l.sortableColumns > 0 && t.visibleColumns[o].sortable ? "add" : "remove"]("sortable");}return this;}getMaxColumnSortCount() {return this._o.sortableColumns;}setSortableColumns(e) {return this.setMaxColumnSortCount(e);}getSortableColumns() {return this.getMaxColumnSortCount();}setMovableColumns(e) {let t = this._o;return e = void 0 === e || !!e, t.movableColumns !== e && (t.movableColumns = e), this;}getMovableColumns() {return this._o.movableColumns;}setResizableColumns(e) {let t = this._o;return e = void 0 === e || !!e, t.resizableColumns !== e && (t.resizableColumns = e), this;}getResizableColumns() {return this._o.resizableColumns;}getConvertColumnWidthsToRelative() {return this._o.convertColumnWidthsToRelative;}setConvertColumnWidthsToRelative(e, t = true) {let l = this._o;return e = !!e, l.convertColumnWidthsToRelative !== e && (l.convertColumnWidthsToRelative = e, t && this.tableWidthChanged(true)), this;}setOnComparatorRequired(e) {let t = this._o;return t.onComparatorRequired !== e && (t.onComparatorRequired = e), this;}setCustomSortingProvider(e) {let t = this._o;return t.customSortingProvider !== e && (t.customSortingProvider = e), this;}sort(e, t, l) {const o = this._o,r = this._p;let i = r.columns.get(e),s = r.rows.sortColumn.map((e) => ({ column: e.column, descending: e.descending }));if (i) {if (l) {for (let e = 0; e < s.length; e++) if (s[e].column === i.name) {e < s.length - 1 ? s.length = 0 : (t = s[s.length - 1].descending, s.splice(s.length - 1, 1));break;}(o.sortableColumns > 0 && s.length >= o.sortableColumns || s.length >= r.visibleColumns.length) && (s.length = 0);} else s.length = 0;t = void 0 !== t && t, s.push({ column: i.name, descending: !!t });} else s.length = 0;return this.setSortedColumns(s);}resort() {const e = this._p;let t = e.columns,l = e.rows.sortColumn;if (l.length) {for (let e = 0; e < l.length; e++) t.get(l[e].column) || l.splice(e--, 1);e.rows.sortColumn = l, l.length && (e.rows.sort(), e.filteredRows && e.filteredRows.sort());let o = [];for (let e = 0; e < l.length; e++) o.push({ column: l[e].column, descending: l[e].descending });this.emit("sort", { sorts: o, resort: true });}return this;}setSortedColumns(e, t = { immediate: true, render: true }) {var _o$virtualListHelper;const l = this._o,o = this._p;let r = o.columns,i = e.filter((e) => r.get(e.column)).map((e) => {let t = r.get(e.column);return { column: t.name, comparePath: t.comparePath || t.dataPath, descending: !!e.descending };});l.sortableColumns > 0 && i.length > l.sortableColumns && (i.length = l.sortableColumns), te(this);for (let e = 0; e < i.length; e++) le(this, i[e].column, i[e].descending);l.adjustColumnWidthForSortArrow && !o.tableSkeletonNeedsRendering && this.tableWidthChanged(true), o.rows.sortColumn = i, i.length && t.immediate && (o.rows.sort(), o.filteredRows && o.filteredRows.sort()), (_o$virtualListHelper = o.virtualListHelper) !== null && _o$virtualListHelper !== void 0 && _o$virtualListHelper.invalidate(), o.virtualListHelper && t.render && o.virtualListHelper.render();let s = [];for (let e = 0; e < i.length; e++) s.push({ column: i[e].column, descending: i[e].descending });return this.emit("sort", { sorts: s }), this;}getSortedColumns() {const e = this._p;let t = [];for (let l = 0; l < e.rows.sortColumn.length; l++) {let o = e.rows.sortColumn[l];t.push({ column: o.column, descending: o.descending });}return t;}setCellFormatter(e) {if (!e) {const t = (e) => "string" == typeof e ? c(e) : e;t[u] = true, e = t;}return this._o.cellFormatter = e, this;}setHeaderCellFormatter(e) {return this._o.headerCellFormatter = e || function (e) {return "string" == typeof e ? c(e) : e;}, this;}setFilter(e) {return this._o.filter = e, this;}filter(e) {const t = this._p;let l = this._o.filter || S;"string" == typeof arguments[0] && "string" == typeof arguments[1] && (e = { column: arguments[0], keyword: arguments[1], caseSensitive: arguments[2] });let o = !!t.filteredRows;return t.filteredRows && (t.filteredRows = null), t.filterArgs = null == e ? null : "object" != typeof e || Array.isArray(e) ? e : Object.assign({}, e), null !== t.filterArgs ? (t.filteredRows = t.rows.filteredCollection(l, t.filterArgs), (o || t.filteredRows) && (this.clearAndRender(), this.emit("filter", e))) : (t.filterArgs = null, t.filteredRows = null, this.clearAndRender(), this.emit("filterclear", {})), this;}clearFilter() {const e = this._p;return e.filteredRows && (e.filterArgs = null, e.filteredRows = null, this.clearAndRender(), this.emit("filterclear", {})), this;}getHtmlForRowCell(e, t) {const l = this._p;if (e < 0 || e > l.rows.length - 1) return null;let o = l.columns.get(t);if (!o) return null;let r = l.rows[e];return ae(this._o, r, o);}getHtmlForRowDataCell(e, t) {let l = this._p.columns.get(t);return l ? ae(this._o, e, l) : null;}getRowYPos(e) {return this._p.virtualListHelper.getItemPosition(e) || null;}getDataForRow(e) {const t = this._p;return e < 0 || e > t.rows.length - 1 ? null : t.rows[e];}getRowCount() {const e = this._p;return e.rows ? e.rows.length : 0;}getIndexForRow(e) {return this._p.rows.indexOf(e);}getFilteredRowCount() {const e = this._p;return (e.filteredRows || e.rows).length;}getIndexForFilteredRow(e) {const t = this._p;return (t.filteredRows || t.rows).indexOf(e);}getDataForFilteredRow(e) {const t = this._p;return e < 0 || e > (t.filteredRows || t.rows).length - 1 ? null : (t.filteredRows || t.rows)[e];}getHeaderRowElement() {return this._p.headerRow;}addRows(e, t, l, o) {let r = this._p;"boolean" == typeof t && (o = l, l = t, t = -1), "number" != typeof t && (t = -1), (t < 0 || t > r.rows.length) && (t = r.rows.length), o = void 0 === o || !!o;const i = (Array.isArray(e) ? e : [e]).length;return e && (r.rows.add(e, t), r.filteredRows || l && r.rows.sortColumn.length ? (l && r.rows.sortColumn.length ? this.resort() : ne(this), r.tableSkeletonNeedsRendering = true, o && this.render()) : o && (r.virtualListHelper.addItemsAt(i, t), this._o.virtualTable ? (G(this), J(this), this.render(), K(this, false)) : r.tbody && (this.render(), J(this), K(this, true))), this.emit("addrows", { count: i, clear: false })), this;}removeRows(e, t, l) {let o = this._p;return "number" != typeof t || t <= 0 || e < 0 || e > o.rows.length - 1 || (o.rows.splice(e, t), l = void 0 === l || !!l, o.filteredRows ? (ne(this), o.tableSkeletonNeedsRendering = true, l && this.render()) : l && (o.virtualListHelper.removeItemsAt(t, e), this._o.virtualTable ? (G(this), J(this), this.render(), K(this, false)) : (this.render(), J(this), K(this, true)))), this;}removeRow(e, t) {return this.removeRows(e, 1, t);}refreshRow(e, t = true) {let l = this._p;if (e < 0 || e > l.rows.length - 1) return this;let o = -1;return l.filteredRows && -1 === (o = l.filteredRows.indexOf(l.rows[e])) || (-1 === o && (o = e), l.virtualListHelper.refreshItemAt(o), t && l.virtualListHelper.render()), this;}getRowElement(e) {let t = this._p;if (e < 0 || e > t.rows.length - 1) return null;let l = -1;return t.filteredRows && -1 === (l = t.filteredRows.indexOf(t.rows[e])) ? null : (-1 === l && (l = e), t.virtualListHelper.getItemElementAt(l) || null);}refreshAllVirtualRows() {return this._p.virtualListHelper.invalidate().render(), this;}setRows(e, t) {let l = this._p;return l.rows.reset(e), t && l.rows.sortColumn.length ? this.resort() : ne(this), this.clearAndRender().emit("addrows", { count: e.length, clear: true }), this;}tableWidthChanged(e, t) {let l = this._o,o = this._p,r = P(this),i = r,s = 0;if (!o.table) return this;t = void 0 === t || t;let n = 0;if (o.tbody || (t = false), t && (n = parseFloat(o.tbody.style.minWidth) || 0), i !== o.lastDetectedWidth || e) {var _o$notifyRendererOfCo;o.lastDetectedWidth = r;let e = 0,a = [],d = 0;for (let e = 0; e < o.columns.length; e++) o.columns[e].actualWidthConsideringScrollbarWidth = null;for (let t = 0; t < o.visibleColumns.length; t++) {let r = o.visibleColumns[t];if (1 === r.widthMode) {let o = r.width;o += r.arrowProposedWidth || 0, !r.ignoreMin && o < l.minColumnWidth && (o = l.minColumnWidth), i -= o, e += o, o !== r.actualWidth && (r.actualWidth = o, a.push(t));} else if (0 === r.widthMode) {let o = z(this, r.label) + 20;o += r.arrowProposedWidth || 0, !r.ignoreMin && o < l.minColumnWidth && (o = l.minColumnWidth), i -= o, e += o, o !== r.actualWidth && (r.actualWidth = o, l.convertColumnWidthsToRelative || a.push(t));} else 2 === r.widthMode && (d += r.width, s++);}if (l.convertColumnWidthsToRelative) for (let t = 0; t < o.visibleColumns.length; t++) {let l = o.visibleColumns[t];0 === l.widthMode && (l.widthMode = 2, i += l.actualWidth, l.width = l.actualWidth / e, d += l.width, s++);}if (s && (d < 1 && l.relativeWidthGrowsToFillWidth || d > 1 && l.relativeWidthShrinksToFillWidth)) for (let e = 0; e < o.visibleColumns.length; e++) {let t = o.visibleColumns[e];2 === t.widthMode && (t.width /= d);}let h = Math.max(0, i);0 === h && (h = o.table.clientWidth);let c = l.minColumnWidth / h;if (isNaN(c) && (c = 0), c > 0) {let e,t = 0;for (let e = 0; e < o.visibleColumns.length; e++) {let l = o.visibleColumns[e];2 === l.widthMode && !l.ignoreMin && l.width < c && (t += c - l.width, l.width = c);}for (let l = 0; l < o.visibleColumns.length; l++) {let r = o.visibleColumns[l];2 === r.widthMode && !r.ignoreMin && r.width > c && t > 0 && (e = Math.min(t, r.width - c), r.width -= e, t -= e);}}if (l.autoFillTableWidth && i > 0) {let e = 0,t = i;for (let l = 0; l < o.visibleColumns.length; l++) {let r = o.visibleColumns[l];r.resizable || 1 !== r.widthMode || (e += r.width), 2 === r.widthMode && (t -= Math.round(h * r.width));}let l = (r - e) / (r - t - e) || NaN;for (let e = 0; e < o.visibleColumns.length && t > 0; e++) {let t = o.visibleColumns[e];if (t.resizable || 1 !== t.widthMode) if (2 === t.widthMode) t.width *= l;else {let o = t.actualWidth * l;t.actualWidth !== o && (t.actualWidth = o, -1 === a.indexOf(e) && a.push(e));}}}for (let e = 0; e < o.visibleColumns.length; e++) {let t = o.visibleColumns[e];if (2 === t.widthMode) {let l = Math.round(h * t.width);i -= l, s--, 0 === s && 1 === i && (l++, i--), -1 === i && (l--, i++), l !== t.actualWidth && (t.actualWidth = l, a.push(e));}}if (o.visibleColumns.length && (o.visibleColumns[o.visibleColumns.length - 1].actualWidthConsideringScrollbarWidth = o.visibleColumns[o.visibleColumns.length - 1].actualWidth - (o.scrollbarWidth || 0)), (_o$notifyRendererOfCo = o.notifyRendererOfColumnsConfig) !== null && _o$notifyRendererOfCo !== void 0 && _o$notifyRendererOfCo.call(o), t) {let e = F(this);n < e && K(this, false);for (let e = 0; e < a.length; e++) ee(this, a[e]);n > e && K(this, false);}}return this;}tableHeightChanged() {let e = this._o,t = this._p;if (!t.table) return this;const l = getComputedStyle(t.table);let o = getElementHeight(this.el, true) - (parseFloat(l.borderTopWidth) || 0) - (parseFloat(l.borderBottomWidth) || 0);return o !== e.height && (e.height = o, t.tbody && (t.tbody.style.height = Math.max(e.height - getElementHeight(t.header, true, true, true), 1) + "px"), e.virtualTable && this.clearAndRender()), this;}hideCellPreview() {return ce(this), this;}abortCellPreview() {return this.hideCellPreview(), this;}cancelColumnResize() {return O(this), this;}getUrlForElementContent(e) {let t,l = document.getElementById(e);if (l) {let e = l.textContent;if ("function" == typeof Blob) t = new Blob([e || ""]);else {const l = window,o = l.BlobBuilder || l.WebKitBlobBuilder || l.MozBlobBuilder || l.MSBlobBuilder;if (!o) return null;const r = new o();r.append(e || ""), t = r.getBlob();}return (window.URL || window.webkitURL).createObjectURL(t);}return null;}isWorkerSupported() {return window.Worker instanceof Function;}createWebWorker(e, t, l) {if (this.isWorkerSupported()) {let o = this._p,r = new Worker(e),i = (e) => {e.data.append ? this.addRows(e.data.rows, l) : this.setRows(e.data.rows, l);};return r.addEventListener("message", i, false), o.workerListeners || (o.workerListeners = []), o.workerListeners.push({ worker: r, listener: i }), (t || void 0 === t) && r.postMessage(null), r;}return null;}unbindWebWorker(e) {let t = this._p;if (t.workerListeners) for (let l = 0; l < t.workerListeners.length; l++) t.workerListeners[l].worker === e && (e.removeEventListener("message", t.workerListeners[l].listener, false), t.workerListeners.splice(l, 1), l--);return this;}}me.VERSION = "@@VERSION", me.Width = _;
|
|
3856
|
+
function h(e, t) {for (let l = 0, o = e.length; l >= 0 && l < o; l += 1) if (t(e[l], l, e)) return e[l];}function c(e) {return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/'/g, "'").replace(/"/g, """).replace(/\n/g, "<br />");}const u = Symbol("safe"),m = Symbol("hover_in"),f = Symbol("hover_out"),p = Symbol("row_click"),g = Symbol("preview_cell"),v = Symbol("cell"),b = Symbol("related_touch"),C = Symbol("original_row_index"),w = Symbol("destroyed");class y extends Array {constructor(e) {var _e$sortColumn, _e$onComparatorRequir, _e$customSortingProvi;super(), this.onComparatorRequired = null, this.customSortingProvider = null, e = e || {}, this.sortColumn = (_e$sortColumn = e.sortColumn) !== null && _e$sortColumn !== void 0 ? _e$sortColumn : [], this.onComparatorRequired = (_e$onComparatorRequir = e.onComparatorRequired) !== null && _e$onComparatorRequir !== void 0 ? _e$onComparatorRequir : null, this.customSortingProvider = (_e$customSortingProvi = e.customSortingProvider) !== null && _e$customSortingProvi !== void 0 ? _e$customSortingProvi : null;}add(e, t) {if (Array.isArray(e)) {const l = e;if ("number" == typeof t) for (let e = 0, o = l.length; e < o; e++) this.splice(t++, 0, l[e]);else for (let e = 0, t = l.length; e < t; e++) this.push(l[e]);} else {const l = e;"number" == typeof t ? this.splice(t, 0, l) : this.push(l);}}reset(e) {this.length = 0, e && this.add(e);}filteredCollection(e, t) {if (e && t) {const l = new y({ sortColumn: this.sortColumn, onComparatorRequired: this.onComparatorRequired, customSortingProvider: this.customSortingProvider });for (let o = 0, i = this.length; o < i; o++) {const i = this[o];e(i, t) && (i[C] = o, l.push(i));}return l;}return null;}sort(e) {let t;if ("function" == typeof e) return super.sort(e);if (this.sortColumn.length) {const e = [];for (let t = 0; t < this.sortColumn.length; t++) {const l = W(this.sortColumn[t], this.sortColumn[t].descending);let o = null;this.onComparatorRequired && (o = this.onComparatorRequired(this.sortColumn[t].column, this.sortColumn[t].descending, l)), o || (o = l), e.push(o.bind(this));}if (1 === e.length) t = e[0];else {const l = e.length;t = (t, o) => {let i = 0;for (let r = 0; r < l; r++) if (i = e[r](t, o), 0 !== i) return i;return i;};}const l = (e) => (e.sort(t), e);if (this.customSortingProvider) {const e = this.customSortingProvider(this, l);e !== this && this.splice(0, this.length, ...e);} else l(this);}return this;}}function W(e, t) {let l = e.comparePath;"string" == typeof l && (l = l.split("."));const o = l.length,i = o > 1,r = t ? 1 : -1,s = t ? -1 : 1;return function (e, t) {let n = e[l[0]],a = t[l[0]];if (i) for (let e = 1; e < o; e++) n = n && n[l[e]], a = a && a[l[e]];return n === a ? 0 : null == n ? r : null == a ? s : n < a ? r : s;};}class R extends Array {constructor() {super();}get(e) {for (let t = 0, l = this.length; t < l; t++) if (this[t].name === e) return this[t];return null;}indexOf(e) {const t = "string" == typeof e ? e : e.name;for (let e = 0, l = this.length; e < l; e++) if (this[e].name === t) return e;return -1;}getByOrder(e) {for (let t = 0, l = this.length; t < l; t++) if (this[t].order === e) return this[t];return null;}normalizeOrder() {const e = [];for (let t = 0; t < this.length; t++) e.push(this[t]);e.sort((e, t) => e.order < t.order ? -1 : e.order > t.order ? 1 : 0);for (let t = 0; t < e.length; t++) e[t].order = t;return this;}getColumns() {const e = [];for (let t = 0; t < this.length; t++) e.push(this[t]);return e.sort((e, t) => e.order < t.order ? -1 : e.order > t.order ? 1 : 0), e;}getVisibleColumns() {const e = [];for (let t = 0; t < this.length; t++) {const l = this[t];l.visible && e.push(l);}return e.sort((e, t) => e.order < t.order ? -1 : e.order > t.order ? 1 : 0), e;}getMaxOrder() {let e = 0;for (let t = 0; t < this.length; t++) {const l = this[t];l.order > e && (e = l.order);}return e;}moveColumn(e, t) {if (e && t) {const l = e.order,o = t.order;if (l < o) for (let e = l + 1; e <= o; e++) {const t = this.getByOrder(e);t && t.order--;} else for (let e = l - 1; e >= o; e--) {const t = this.getByOrder(e);t && t.order++;}e.order = o;}return this;}}function S(e, t) {const l = t.column,o = null == t.keyword ? "" : t.keyword.toString();if (!o || !l) return true;let i = e[l];if (null == i) return false;let r = i.toString(),s = o;return t.caseSensitive || (r = r.toLowerCase(), s = s.toLowerCase()), -1 !== r.indexOf(s);}const _ = { NONE: "none", AUTO: "auto", SCROLL: "scroll" },N = document.createElement.bind(document);function x(e) {["relative", "absolute", "fixed"].includes(getComputedStyle(e).position) || (e.style.position = "relative");}function L(e) {const t = e.target;return /^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(t.tagName);}function k(e) {const t = getComputedStyle(e);return (parseFloat(t.paddingLeft) || 0) + (parseFloat(t.paddingRight) || 0);}function T(e) {const t = e.style;t["-webkit-touch-callout"] = "none", t["-webkit-user-select"] = "none", t["-moz-user-select"] = "none", t["-ms-user-select"] = "none", t["-o-user-select"] = "none", t["user-select"] = "none";}function M(e, t) {const i = e._o.tableClassName,r = N("div");r.className = e.el.className;const s = N("div");s.className = i + "-header";const n = N("div");n.className = i + "-header-row";const a = N("div");a.className = i + "-header-cell";const d = N("div");d.textContent = t, a.appendChild(d), n.appendChild(a), s.appendChild(n), r.appendChild(s), setCssProps(r, { position: "absolute", top: "-9999px", visibility: "hidden" }), document.body.appendChild(r);const h = getElementWidth(a);return r.remove(), h;}function z(e) {const t = e._o,i = e._p;let r,s = 0,n = 0;i.table && (s = i.table ? i.table.scrollTop : 0, n = i.table ? i.table.scrollLeft : 0, t.virtualTable && (r = i.table.style.display, i.table.style.display = "none"));let a = getElementWidth(e.el);i.table && (t.virtualTable && void 0 !== r && (i.table.style.display = r), i.table.scrollTop = s, i.table.scrollLeft = n, i.header && (i.header.scrollLeft = n));const d = t.tableClassName,h = N("div");h.className = e.el.className, setCssProps(h, { "z-index": "-1", position: "absolute", left: "0", top: "-9999px" });const c = N("div");c.className = `${d}-header`, h.appendChild(c);const u = N("div");u.index = null, u.vIndex = null, u.className = `${d}-header-row`, c.appendChild(u);for (let e = 0; e < i.visibleColumns.length; e++) {const t = i.visibleColumns[e],l = N("div");l.className = `${d}-header-cell ${t.cellClasses || ""}`, l.columnName = t.name, l.appendChild(N("div")), u.appendChild(l);}document.body.appendChild(h), a -= function (e) {const t = getComputedStyle(e);return (parseFloat(t.borderLeftWidth) || 0) + (parseFloat(t.borderRightWidth) || 0);}(u);const m = u.querySelectorAll(`div.${d}-header-cell`);for (const e of m) {const t = getComputedStyle(e);if ("border-box" !== t.boxSizing) {a -= (parseFloat(t.borderRightWidth) || 0) + (parseFloat(t.borderLeftWidth) || 0) + k(e);const l = e.columnName,o = i.columns.get(l);o && (a -= o.arrowProposedWidth || 0);}}return h.remove(), Math.max(0, a);}function P(e) {const t = e._p,i = e._o.tableClassName,r = i + "-row",s = i + "-cell",n = t.visibleColumns,a = n.length,d = N("div");d.className = r, d.style.float = "left";let h = 0;for (let e = 0; e < a; e++) {var _t$actualWidth, _t$actualWidth2;const t = n[e],l = N("div");l.className = s, l.style.width = ((_t$actualWidth = t.actualWidth) !== null && _t$actualWidth !== void 0 ? _t$actualWidth : 0) + "px", t.cellClasses && (l.className += " " + t.cellClasses), l.appendChild(N("div")), d.appendChild(l), h += (_t$actualWidth2 = t.actualWidth) !== null && _t$actualWidth2 !== void 0 ? _t$actualWidth2 : 0;}const c = N("div");c.className = e.el.className, setCssProps(c, { "z-index": "-1", position: "absolute", left: "0", top: "-9999px", float: "left", width: "1px", overflow: "hidden" });const u = N("div");u.className = i, c.appendChild(u);const m = N("div");m.className = i + "-body", m.style.width = h + 1e4 + "px", u.appendChild(m), m.appendChild(d), document.body.appendChild(c);const f = N("div");setCssProps(f, { border: "1.5px solid #000", width: "0", height: "0", position: "absolute", left: "0", top: "-9999px" }), document.body.appendChild(f);const p = parseFloat(getComputedStyle(f).borderWidth),g = Math.round(p) !== p;f.remove();let v = getElementWidth(d, true, true, true);return v -= t.scrollbarWidth || 0, g && v++, c.remove(), v;}function F(e) {const t = e._p;return !!t.table && "rtl" === getComputedStyle(t.table).direction;}function H(e) {return 0 === e.widthMode ? "auto" : 2 === e.widthMode ? 100 * e.width + "%" : e.width;}class E {static saveSelection(e) {const t = window.getSelection();if (!t || 0 === t.rangeCount) return null;const l = t.getRangeAt(0);if (e !== l.commonAncestorContainer && !function (e, t) {let l = e;for (; (l = (_l$parentNode = (_l = l) === null || _l === void 0 ? void 0 : _l.parentNode) !== null && _l$parentNode !== void 0 ? _l$parentNode : null) && l !== t;) {var _l$parentNode, _l;}return !!l;}(l.commonAncestorContainer, e)) return null;const o = l.cloneRange();o.selectNodeContents(e), o.setEnd(l.startContainer, l.startOffset);const i = o.toString().length;return { start: i, end: i + l.toString().length };}static restoreSelection(e, t) {let l = 0;const o = [e];let i,r = false,s = false;const n = document.createRange();for (n.setStart(e, 0), n.collapse(true); !s && (i = o.pop());) if (i.nodeType === Node.TEXT_NODE) {const e = l + i.length;!r && t.start >= l && t.start <= e && (n.setStart(i, t.start - l), r = true), r && t.end >= l && t.end <= e && (n.setEnd(i, t.end - l), s = true), l = e;} else {let e = i.childNodes.length;for (; e--;) o.push(i.childNodes[e]);}const a = window.getSelection();a && (a.removeAllRanges(), a.addRange(n));}}const A = document.createElement.bind(document);function I(e, t) {var _ref, _t$b, _d$changedTouches;const o = e._o,r = F(e);let s = t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if (!s) return null;s[v] && (s = s[v]);let n = s.previousSibling;for (; n && 1 !== n.nodeType;) n = n.previousSibling;const a = !n,d = t,h = (_ref = (_t$b = t[b]) !== null && _t$b !== void 0 ? _t$b : (_d$changedTouches = d.changedTouches) === null || _d$changedTouches === void 0 ? void 0 : _d$changedTouches[0]) !== null && _ref !== void 0 ? _ref : t,c = (h.pageX || h.clientX || 0) - getElementOffset(s).left;if (r) {var _n$columnName, _n, _s$columnName;if (!a && getElementWidth(s, true, true, true) - c <= o.resizeAreaWidth / 2) return (_n$columnName = (_n = n) === null || _n === void 0 ? void 0 : _n.columnName) !== null && _n$columnName !== void 0 ? _n$columnName : null;if (c <= o.resizeAreaWidth / 2) return (_s$columnName = s.columnName) !== null && _s$columnName !== void 0 ? _s$columnName : null;} else {var _n$columnName2, _n2, _s$columnName2;if (!a && c <= o.resizeAreaWidth / 2) return (_n$columnName2 = (_n2 = n) === null || _n2 === void 0 ? void 0 : _n2.columnName) !== null && _n$columnName2 !== void 0 ? _n$columnName2 : null;if (getElementWidth(s, true, true, true) - c <= o.resizeAreaWidth / 2) return (_s$columnName2 = s.columnName) !== null && _s$columnName2 !== void 0 ? _s$columnName2 : null;}return null;}function O(e) {const t = e._p;return t.resizer && (t.resizer.remove(), t.resizer = null, t.eventsSink.remove(document, ".colresize")), e;}function B(e, t) {const s = t;if ("mousedown" === t.type && 0 !== s.button) return;const n = e._o,a = e._p,d = I(e, t);if (d) {const s = a.columns.get(d);if (!n.resizableColumns || !s || !s.resizable) return false;const h = F(e);a.resizer && a.resizer.remove(), a.resizer = A("div"), a.resizer.className = n.resizerClassName, setCssProps(a.resizer, { position: "absolute", display: "block", zIndex: "-1", visibility: "hidden", width: "2px", background: "#000", opacity: "0.7" }), e.el.appendChild(a.resizer);const c = s.element,u = a.resizer.parentNode,m = getComputedStyle(u),f = getComputedStyle(c),p = getElementOffset(c),g = getElementOffset(u);g.left += parseFloat(m.borderLeftWidth) || 0, g.top += parseFloat(m.borderTopWidth) || 0, p.left -= g.left, p.top -= g.top, p.top -= parseFloat(f.borderTopWidth) || 0;const v = getElementWidth(a.resizer, true, true, true);h ? (p.left -= Math.ceil((parseFloat(f.borderLeftWidth) || 0) / 2), p.left -= Math.ceil(v / 2)) : (p.left += getElementWidth(c, true, true, true), p.left += Math.ceil((parseFloat(f.borderRightWidth) || 0) / 2), p.left -= Math.ceil(v / 2)), setCssProps(a.resizer, { "z-index": "10", visibility: "visible", left: p.left + "px", top: p.top + "px", height: getElementHeight(e.el, false, false, false) + "px" }), a.resizer.columnName = c.columnName;try {a.resizer.style.zIndex = "";} catch {}a.eventsSink.add(document, "mousemove.colresize", (t) => $(e, t)).add(document, "touchmove.colresize", (t) => $(e, t)).add(document, "mouseup.colresize", (t) => D(e, t)).add(document, "touchend.colresize", (t) => D(e, t)), t.preventDefault();}}function $(e, t) {var _ref2, _t$b2, _p$changedTouches;const o = e._p;if (!o.resizer) return;const r = o.columns.get(o.resizer.columnName);if (!r) return;const s = F(e),n = r.element,a = o.resizer.parentNode,d = getComputedStyle(a),h = getComputedStyle(n),c = getElementOffset(n),u = getElementOffset(a);u.left += parseFloat(d.borderLeftWidth) || 0, c.left -= u.left;const m = getElementWidth(o.resizer, true, true, true),f = "border-box" === h.boxSizing,p = t;let g = ((_ref2 = (_t$b2 = t[b]) !== null && _t$b2 !== void 0 ? _t$b2 : (_p$changedTouches = p.changedTouches) === null || _p$changedTouches === void 0 ? void 0 : _p$changedTouches[0]) !== null && _ref2 !== void 0 ? _ref2 : t).pageX - u.left,v = c.left;v -= Math.ceil(m / 2), s ? (v += getElementWidth(n, true, true, true), v -= r.ignoreMin ? 0 : e._o.minColumnWidth, f || (v -= Math.ceil((parseFloat(h.borderLeftWidth) || 0) / 2), v -= k(n)), g > v && (g = v)) : (v += r.ignoreMin ? 0 : e._o.minColumnWidth, f || (v += Math.ceil((parseFloat(h.borderRightWidth) || 0) / 2), v += k(n)), g < v && (g = v)), o.resizer.style.left = g + "px";}function D(e, t) {var _ref3, _t$b3, _v$changedTouches;const o = e._o,r = e._p;if (!r.resizer) return;r.eventsSink.remove(document, ".colresize");const s = r.columns.get(r.resizer.columnName);if (!s) return r.resizer.remove(), void (r.resizer = null);const n = F(e),a = s.element,d = a.firstChild,h = r.resizer.parentNode,c = getComputedStyle(h),u = getComputedStyle(a),m = getElementOffset(a),f = getElementOffset(h);f.left += parseFloat(c.borderLeftWidth) || 0, m.left -= f.left;const p = getElementWidth(r.resizer, true, true, true),g = "border-box" === u.boxSizing,v = t;let C = ((_ref3 = (_t$b3 = t[b]) !== null && _t$b3 !== void 0 ? _t$b3 : (_v$changedTouches = v.changedTouches) === null || _v$changedTouches === void 0 ? void 0 : _v$changedTouches[0]) !== null && _ref3 !== void 0 ? _ref3 : t).pageX - f.left,w = m.left,y = 0;if (w -= Math.ceil(p / 2), n) {if (!g) {C += k(a);const e = getComputedStyle(d || a);C += parseFloat(e.borderLeftWidth) || 0, C += parseFloat(e.borderRightWidth) || 0, C += s.arrowProposedWidth || 0;}w += getElementWidth(a, true, true, true);const t = w - (s.ignoreMin ? 0 : e._o.minColumnWidth);C > t && (C = t), y = w - C;} else {if (!g) {C -= k(a);const e = getComputedStyle(d || a);C -= parseFloat(e.borderLeftWidth) || 0, C -= parseFloat(e.borderRightWidth) || 0, C -= s.arrowProposedWidth || 0;}const t = w + (s.ignoreMin ? 0 : e._o.minColumnWidth);C < t && (C = t), y = C - w;}r.resizer.remove(), r.resizer = null;let W = y;if (2 === s.widthMode) {let t = z(e),l = 0,i = 0;for (let e = 0; e < r.visibleColumns.length; e++) {var _o$actualWidth;const o = r.visibleColumns[e];o.name !== s.name && (2 === o.widthMode ? (l += o.width, i++) : t -= (_o$actualWidth = o.actualWidth) !== null && _o$actualWidth !== void 0 ? _o$actualWidth : 0);}if (t = Math.max(1, t), 1 === t && r.table && (t = r.table.clientWidth), W = y / t, i > 0) {const e = W / ((1 - W) / l);l += W, (l < 1 && o.relativeWidthGrowsToFillWidth || l > 1 && o.relativeWidthShrinksToFillWidth) && (W = e);}W *= 100, W += "%";}e.setColumnWidth(s.name, W);}function q(e, t) {var _o$columns$get;const l = e._o,o = e._p;if (!l.resizableColumns) return;const i = I(e, t),r = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);r && (i && (_o$columns$get = o.columns.get(i)) !== null && _o$columns$get !== void 0 && _o$columns$get.resizable ? r.style.cursor = "e-resize" : r.style.cursor = "");}function V(e, t) {var _ref4, _t$b4, _s$changedTouches;const o = e._o,s = t,n = t,a = (_ref4 = (_t$b4 = t[b]) !== null && _t$b4 !== void 0 ? _t$b4 : (_s$changedTouches = s.changedTouches) === null || _s$changedTouches === void 0 ? void 0 : _s$changedTouches[0]) !== null && _ref4 !== void 0 ? _ref4 : { pageX: n.pageX, pageY: n.pageY },d = t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if (!d) return;const h = getElementOffset(d);h.width = getElementWidth(d, true, true, true), h.height = getElementHeight(d, true, true, true), e.emit("headercontextmenu", { columnName: d.columnName, pageX: a.pageX, pageY: a.pageY, bounds: h });}function j(e, t) {if (L(t)) return;if (I(e, t)) return;const l = e._o,o = e._p,i = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (!i) return;if (!l.sortableColumns) return;const r = o.columns.get(i.columnName),s = o.rows.sortColumn;if (r && r.sortable) {let t = true;const o = s.length ? s[s.length - 1] : null;o && o.column === r.name && (o.descending && l.allowCancelSort ? (t = false, s.splice(s.length - 1, 1)) : o.descending = !o.descending);const i = e;t ? i.sort(r.name, void 0, true).render() : i.sort();}}const X = Array.prototype.indexOf,U = document.createElement.bind(document);function Y(e) {const t = e._p;return t.headerRow && (t.headerRow = void 0), e;}function G(e) {const t = e._o,l = e._p;if (!l.tbody) return e;if (t.virtualTable && l.virtualListHelper) {const e = l.virtualListHelper.estimateFullHeight();l._lastVirtualScrollHeight = e, l.tbody.style.height = e + "px";} else l.tbody.style.height = "";return e;}function J(e, t) {const l = e._p;if (!l.table) return e;const o = l.table.offsetWidth - l.table.clientWidth;if (o !== l.scrollbarWidth || t) {var _l$notifyRendererOfCo;l.scrollbarWidth = o;for (let e = 0; e < l.columns.length; e++) l.columns[e].actualWidthConsideringScrollbarWidth = null;if (l.scrollbarWidth > 0 && l.visibleColumns.length > 0 && l.tbody && l.headerRow) {var _l$visibleColumns$e$a;const e = l.visibleColumns.length - 1;l.visibleColumns[e].actualWidthConsideringScrollbarWidth = ((_l$visibleColumns$e$a = l.visibleColumns[e].actualWidth) !== null && _l$visibleColumns$e$a !== void 0 ? _l$visibleColumns$e$a : 0) - l.scrollbarWidth;const t = l.visibleColumns[e].actualWidthConsideringScrollbarWidth + "px",o = l.tbody.childNodes;for (let l = 0, i = o.length; l < i; l++) {const i = o[l];1 === i.nodeType && (i.childNodes[e].style.width = t);}l.headerRow.childNodes[e].style.width = t;}Q(e), (_l$notifyRendererOfCo = l.notifyRendererOfColumnsConfig) === null || _l$notifyRendererOfCo === void 0 ? void 0 : _l$notifyRendererOfCo.call(l);}return e;}function K(e, t) {const o = e._o,i = e._p;if (!i.tbody || !i.table || !i.headerRow) return e;const r = P(e);if (i.tbody.style.minWidth = r + "px", i.headerRow.style.minWidth = r + (i.scrollbarWidth || 0) + "px", i.eventsSink.remove(i.table, "scroll"), o.width === _.AUTO) setElementWidth(i.table, getElementWidth(i.tbody, true, true, true)), setElementWidth(e.el, getElementWidth(i.table, true, true, true));else if (o.width === _.SCROLL) {if (t) {const t = i.table ? i.table.scrollTop : 0,l = i.table ? i.table.scrollLeft : 0;!function (e) {const t = e.style.display;e.style.display = "none", e.offsetHeight, e.style.display = t;}(e.el), i.table.scrollTop = t, i.table.scrollLeft = l, i.header && (i.header.scrollLeft = l);}const l = () => function (e) {const t = e._p;t.header.scrollLeft = t.table.scrollLeft, Z(e);}(e);i.eventsSink.add(i.table, "scroll", l);}return e;}function Q(e) {var _t$scrollbarWidth;const t = e._p,l = e._o;if (!t.headerRow) return;const o = l.tableClassName + "-sticky",i = t.headerRow,r = F(e);t.lastIsRtl = r;const s = (_t$scrollbarWidth = t.scrollbarWidth) !== null && _t$scrollbarWidth !== void 0 ? _t$scrollbarWidth : 0;let n = 0,a = 0,d = null;const h = [],c = [];let u = null,m = [];for (let e = i.firstElementChild; e; e = e.nextElementSibling) {var _u;const l = e.getAttribute("data-column");if (!l) continue;const i = t.columns.get(l);if (i) if ("start" === i.sticky || "end" === i.sticky) {var _i$actualWidth;e.className += " " + o, e.style.position = "sticky";let t = (_i$actualWidth = i.actualWidth) !== null && _i$actualWidth !== void 0 ? _i$actualWidth : 0,l = null;if (null === d && (l = getComputedStyle(e), d = l.boxSizing), "content-box" === d && (null === l && (l = getComputedStyle(e)), t += (parseFloat(l.paddingLeft) || 0) + (parseFloat(l.paddingRight) || 0) + (parseFloat(l.borderLeftWidth) || 0) + (parseFloat(l.borderRightWidth) || 0)), "start" === i.sticky) {const l = i.stickyPos = { direction: "start", absDirection: r ? "right" : "left", offset: n };e.style[l.absDirection] = n + "px", n += t, m.length = 0, u = [e], h.push(u);} else {const l = i.stickyPos = { direction: "end", absDirection: r ? "left" : "right", offset: a };e.style[l.absDirection] = a + s + "px", a += t, c.push([e, ...m]), m.length = 0;}} else delete i.stickyPos, (_u = u) !== null && _u !== void 0 && _u.push(e), m !== null && m !== void 0 && m.push(e), "sticky" === e.style.position && (e.classList.remove(o), e.style.position = "", e.style.left = "", e.style.right = "");}t.stickiesStart = h, t.stickiesEnd = c, Z(e);}function Z(e) {const t = e._p;if (!t.table || !t.headerRow || !t.tbody) return;const l = t.stickiesStart,o = t.stickiesEnd,i = t.stickiesSetStart,r = t.stickiesSetEnd,s = t.stickiesSetStart = new Set(),n = t.stickiesSetEnd = new Set();if (l !== null && l !== void 0 && l.length || o !== null && o !== void 0 && o.length) {const e = t.table.scrollLeft;if (e === t.lastStickyScrollLeft) return;t.lastStickyScrollLeft = e;const i = t.headerRow.children,r = 1.5,a = t.lastIsRtl,d = (e, t, l) => {if (e && e.length) for (const o of e) {const e = o[0],s = o.slice(1),n = s[0],d = s[s.length - 1];if (!e || !e.getBoundingClientRect) continue;const h = e.getBoundingClientRect(),c = t !== a;let u = false;if (n && d) {const e = n.getBoundingClientRect(),l = d.getBoundingClientRect();u = t ? a ? h.right - r > l.left && h.left + r < e.right : h.right - r > e.left && h.left + r < l.right : a ? h.left + r < e.right && h.right - r > l.left : h.left + r < l.right && h.right - r > e.left;}e.classList.toggle(c ? "is-sticky-left" : "is-sticky-right", u), u && l.add(X.call(i, e));}};d(l, true, s), d(o, false, n);}const a = [],d = [];for (const e of s) (i === null || i === void 0 ? void 0 : i.has(e)) || a.push({ index: e, start: true });for (const e of n) (r === null || r === void 0 ? void 0 : r.has(e)) || a.push({ index: e, start: false });if (i) for (const e of i) s.has(e) || d.push({ index: e, start: true });if (r) for (const e of r) n.has(e) || d.push({ index: e, start: false });if (!a.length && !d.length) return;let h = t.tbody.firstElementChild;for (; h;) {const e = h.children;for (const l of d) {var _e$l$index;(_e$l$index = e[l.index]) === null || _e$l$index === void 0 || _e$l$index.classList.remove(l.start !== t.lastIsRtl ? "is-sticky-left" : "is-sticky-right");}for (const l of a) {var _e$l$index2;(_e$l$index2 = e[l.index]) === null || _e$l$index2 === void 0 || _e$l$index2.classList.add(l.start !== t.lastIsRtl ? "is-sticky-left" : "is-sticky-right");}h = h.nextElementSibling;}t.isStickyColumns = new Map();for (const e of s) t.isStickyColumns.set(e, "start");for (const e of n) t.isStickyColumns.set(e, "end");}function ee(e, t) {const l = e._p,o = e._o;if (!l.headerRow || !l.tbody) return e;const i = l.headerRow.querySelectorAll(`div.${o.tableClassName}-header-cell`)[t];if (!i) return e;const r = l.columns.get(i.columnName);if (r) {i.style.width = (r.actualWidthConsideringScrollbarWidth || r.actualWidth || 0) + "px";const e = (r.actualWidthConsideringScrollbarWidth || r.actualWidth || 0) + "px",o = l.tbody.childNodes;for (let l = 0, i = o.length; l < i; l++) {const i = o[l];1 === i.nodeType && (i.childNodes[t].style.width = e);}}return e;}function te(e) {const t = e._p,l = e._o;if (t.table && t.headerRow) {const e = l.tableClassName,o = scopedSelectorAll(t.headerRow, `>div.${e}-header-cell.sorted`),i = Array.prototype.slice.call(o, 0).map((e) => e.querySelector(":scope>div>.sort-arrow")).filter((e) => !!e);for (const e of i) {var _e$parentNode;const l = (_e$parentNode = e.parentNode) === null || _e$parentNode === void 0 ? void 0 : _e$parentNode.parentNode;if (l) {const e = t.columns.get(l.columnName);e && (e.arrowProposedWidth = 0);}e.remove();}for (const e of o) e.classList.remove("sorted", "desc");}return e;}function le(e, t, l) {var _r$element$firstChild;const o = e._p,i = e._o,r = o.columns.get(t);if (!r) return false;const s = U("span");return s.className = "sort-arrow", r.element && (r.element.className += l ? " sorted desc" : " sorted", (_r$element$firstChild = r.element.firstChild) !== null && _r$element$firstChild !== void 0 && _r$element$firstChild.insertBefore(s, r.element.firstChild.firstChild)), 2 !== r.widthMode && i.adjustColumnWidthForSortArrow && (r.arrowProposedWidth = s.scrollWidth + (parseFloat(getComputedStyle(s).marginRight) || 0) + (parseFloat(getComputedStyle(s).marginLeft) || 0)), true;}function oe(e, t) {const l = t.firstChild;t.addEventListener("mousedown", (t) => B(e, t)), t.addEventListener("mousemove", (t) => q(e, t)), t.addEventListener("mouseup", (t) => function (e, t) {2 === t.button && V(e, t);}(e, t)), t.addEventListener("mouseleave", (t) => function (e, t) {const l = e._o,o = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);o && (o.style.cursor = "");}(e, t)), t.addEventListener("touchstart", (t) => function (e, t) {const l = e._p;if (l.currentTouchId) return;const o = t.changedTouches[0];l.currentTouchId = o.identifier;const i = t.currentTarget,r = { x: o.pageX, y: o.pageY };let s,n = r;const a = function () {l.currentTouchId = null, l.eventsSink.remove(i, ".colheader"), clearTimeout(s);};t[b] = t.changedTouches[0], B(e, t), s = setTimeout(() => {a(), l.eventsSink.add(i, "touchend.colheader", (e) => {L(e) || e.preventDefault(), l.eventsSink.remove(i, ".colheader");}, { once: true }).add(i, "touchcancel.colheader", (e) => {l.eventsSink.remove(i, ".colheader");}, { once: true }), Math.sqrt(Math.pow(Math.abs(n.x - r.x), 2) + Math.pow(Math.abs(n.y - r.y), 2)) < 9 && (O(e), V(e, t));}, 500), l.eventsSink.add(i, "touchend.colheader", (t) => {const o = t,i = h(Array.from(o.changedTouches), (e) => e.identifier === l.currentTouchId);i && (a(), L(t) || t.preventDefault(), n = { x: i.pageX, y: i.pageY }, (Math.sqrt(Math.pow(Math.abs(n.x - r.x), 2) + Math.pow(Math.abs(n.y - r.y), 2)) < 9 || l.resizer) && (o[b] = i, j(e, o)));}).add(i, "touchcancel.colheader", a).add(i, "touchmove.colheader", (t) => {const o = t,i = h(Array.from(o.changedTouches), (e) => e.identifier === l.currentTouchId);i && (n = { x: i.pageX, y: i.pageY }, l.resizer && (t.preventDefault(), o[b] = i, q(e, o)));});}(e, t)), t.addEventListener("dragstart", (t) => function (e, t) {const l = e._o,o = e._p;if (l.movableColumns) {var _t$dataTransfer;const e = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (!e) return void t.preventDefault();const i = o.columns.get(e.columnName);i && i.movable ? (e.style.opacity = "0.35", o.dragId = 161061273 * Math.random(), (_t$dataTransfer = t.dataTransfer) === null || _t$dataTransfer === void 0 ? void 0 : _t$dataTransfer.setData("text", JSON.stringify({ dragId: o.dragId, column: i.name }))) : t.preventDefault();} else t.preventDefault();}(e, t)), t.addEventListener("click", (t) => j(e, t)), t.addEventListener("contextmenu", (e) => e.preventDefault()), l.addEventListener("dragenter", (t) => function (e, t) {const l = e._o,o = e._p;if (l.movableColumns) {var _t$dataTransfer2;let e = null;const i = (_t$dataTransfer2 = t.dataTransfer) === null || _t$dataTransfer2 === void 0 ? void 0 : _t$dataTransfer2.getData("text");if (i) try {e = JSON.parse(i);} catch {e = null;}const r = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (!r) return;if (!e || o.dragId === e.dragId && r.columnName !== e.column) {const e = o.columns.get(r.columnName);e && (e.movable || e !== o.visibleColumns[0]) && r.classList.add("drag-over");}}}(e, t)), l.addEventListener("dragover", (e) => {e.preventDefault();}), l.addEventListener("dragleave", (t) => function (e, t) {const l = e._o,o = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (!o) return;const i = t.relatedTarget;(i === null || i === void 0 ? void 0 : i.contains(o.firstChild)) || o.classList.remove("drag-over");}(e, t)), l.addEventListener("drop", (t) => function (e, t, _t$dataTransfer3) {t.preventDefault();const l = e._o,o = e._p,i = (_t$dataTransfer3 = t.dataTransfer) === null || _t$dataTransfer3 === void 0 ? void 0 : _t$dataTransfer3.getData("text");if (!i) return;let r;try {r = JSON.parse(i);} catch {return;}const s = t.target.closest(`div.${l.tableClassName}-header-cell,div.${l.cellPreviewClassName}`);if (s) {if (l.movableColumns && r.dragId === o.dragId) {const t = r.column,l = s.columnName,i = o.columns.get(t),n = o.columns.get(l);i && n && i.movable && (n.movable || n !== o.visibleColumns[0]) && e.moveColumn(t, l);}s.classList.remove("drag-over");}}(e, t));}function ie(e, t) {let l = Math.max(0, parseFloat(e) || 0),o = 0;return l > 0 && (e === l + "%" ? (o = 2, l /= 100) : l > 0 && l < 1 ? o = 2 : (l < t && (l = t), o = 1)), { width: l, mode: o };}function re(e, t) {var _t$allowPreview;let l = ie(t.width, t.ignoreMin ? 0 : e.minColumnWidth),o = { name: t.name, label: void 0 === t.label ? t.name : t.label, width: l.width, widthMode: l.mode, resizable: void 0 === t.resizable || t.resizable, sortable: void 0 === t.sortable || t.sortable, movable: void 0 === t.movable || t.movable, visible: void 0 === t.visible || t.visible, cellClasses: void 0 === t.cellClasses ? e.cellClasses : t.cellClasses, ignoreMin: void 0 !== t.ignoreMin && !!t.ignoreMin, sticky: void 0 === t.sticky ? null : t.sticky || null, allowPreview: !!((_t$allowPreview = t.allowPreview) !== null && _t$allowPreview !== void 0 ? _t$allowPreview : 1), dataPath: [], comparePath: [], order: 0 };const i = void 0 === t.dataPath ? o.name : t.dataPath,r = void 0 === t.comparePath ? i : t.comparePath;return o.dataPath = "string" == typeof i ? i.split(".") : i, o.comparePath = "string" == typeof r ? r.split(".") : r, o;}function se(e) {const t = e._p;0 === t.visibleColumns.length && t.columns.length && (t.columns[0].visible = true, t.visibleColumns.push(t.columns[0]), e.emit("showcolumn", t.columns[0].name));}function ne(e) {const t = e._p;if (t.filteredRows && t.filterArgs) {let l = e._o.filter || S;t.filteredRows = t.rows.filteredCollection(l, t.filterArgs);}}function ae(e, t, l) {let o = l.dataPath,i = t[o[0]];for (let e = 1; e < o.length && null != i; e++) i = i && i[o[e]];const r = e.cellFormatter;let s;if (r[u]) s = r(i, l.name, t);else try {s = r(i, l.name, t);} catch (e) {s = "[ERROR]", console.error("Failed to generate content for cell " + l.name, e);}return null == s && (s = ""), s;}const de = Array.prototype.indexOf,he = document.createElement.bind(document);function ce(e) {const t = e._p;if (t.cellPreviewCell) {var _l$rowIndex;const l = t.cellPreviewCell,o = l[v];let i;try {i = E.saveSelection(l);} catch {}t.cellPreviewCell.remove(), o && t._unbindCellHoverOut(o), t._unbindCellHoverOut(l);try {i && o && E.restoreSelection(o, i);} catch {}e.emit("cellpreviewdestroy", { el: l.firstChild, name: l.columnName, rowIndex: (_l$rowIndex = l.rowIndex) !== null && _l$rowIndex !== void 0 ? _l$rowIndex : null, rowData: null == l.rowIndex ? null : t.rows[l.rowIndex], cell: o, cellEl: o === null || o === void 0 ? void 0 : o.firstChild }), o && delete o[g], delete l[v], t.cellPreviewCell = null, t.abortCellPreview = false;} else t.abortCellPreview = true;return e;}const ue = Object.prototype.hasOwnProperty;class me {constructor(e) {var _e$maxColumnsSortCoun, _e$sortedColumns;this.VERSION = me.VERSION;const t = this._o = {},s = this._p = { eventsSink: new DomEventsSink(), mitt: { all: n = n || new Map(), on: function (e, t) {var l = n.get(e);l ? l.push(t) : n.set(e, [t]);}, off: function (e, t) {var l = n.get(e);l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : n.set(e, []));}, emit: function (e, t) {var l = n.get(e);l && l.slice().map(function (e) {e(t);}), (l = n.get("*")) && l.slice().map(function (l) {l(e, t);});} }, tableSkeletonNeedsRendering: true };var n;this.el = e.el && e.el instanceof HTMLElement ? e.el : document.createElement("div"), this.el !== e.el && this.el.classList.add(e.className || "dgtable-wrapper"), s.eventsSink.add(this.el, "dragend.colresize", (e) => {return t = e, void (this._p.resizer || (t.target.style.opacity = ""));var t;}), t.virtualTable = void 0 === e.virtualTable || !!e.virtualTable, t.estimatedRowHeight = e.estimatedRowHeight || void 0, t.rowsBufferSize = e.rowsBufferSize || 3, t.minColumnWidth = Math.max(e.minColumnWidth || 35, 0), t.resizeAreaWidth = e.resizeAreaWidth || 8, t.resizableColumns = void 0 === e.resizableColumns || !!e.resizableColumns, t.movableColumns = void 0 === e.movableColumns || !!e.movableColumns;const d = (_e$maxColumnsSortCoun = e.maxColumnsSortCount) !== null && _e$maxColumnsSortCoun !== void 0 ? _e$maxColumnsSortCoun : e.sortableColumns;t.sortableColumns = void 0 === d ? 1 : Number(d) || 1, t.adjustColumnWidthForSortArrow = void 0 === e.adjustColumnWidthForSortArrow || !!e.adjustColumnWidthForSortArrow, t.convertColumnWidthsToRelative = void 0 !== e.convertColumnWidthsToRelative && !!e.convertColumnWidthsToRelative, t.autoFillTableWidth = void 0 !== e.autoFillTableWidth && !!e.autoFillTableWidth, t.allowCancelSort = void 0 === e.allowCancelSort || !!e.allowCancelSort, t.cellClasses = void 0 === e.cellClasses ? "" : e.cellClasses, t.resizerClassName = void 0 === e.resizerClassName ? "dgtable-resize" : e.resizerClassName, t.tableClassName = void 0 === e.tableClassName ? "dgtable" : e.tableClassName, t.allowCellPreview = void 0 === e.allowCellPreview || e.allowCellPreview, t.allowHeaderCellPreview = void 0 === e.allowHeaderCellPreview || e.allowHeaderCellPreview, t.cellPreviewClassName = void 0 === e.cellPreviewClassName ? "dgtable-cell-preview" : e.cellPreviewClassName, t.cellPreviewAutoBackground = void 0 === e.cellPreviewAutoBackground || e.cellPreviewAutoBackground, t.onComparatorRequired = void 0 === e.onComparatorRequired ? null : e.onComparatorRequired, t.customSortingProvider = void 0 === e.customSortingProvider ? null : e.customSortingProvider, t.width = void 0 === e.width ? _.NONE : e.width, t.relativeWidthGrowsToFillWidth = void 0 === e.relativeWidthGrowsToFillWidth || !!e.relativeWidthGrowsToFillWidth, t.relativeWidthShrinksToFillWidth = void 0 !== e.relativeWidthShrinksToFillWidth && !!e.relativeWidthShrinksToFillWidth, this.setCellFormatter(e.cellFormatter), this.setHeaderCellFormatter(e.headerCellFormatter), this.setFilter(e.filter), t.height = e.height, this.setColumns(e.columns || [], false);let h = [];const c = (_e$sortedColumns = e.sortedColumns) !== null && _e$sortedColumns !== void 0 ? _e$sortedColumns : e.sortColumn;if (c) {let e = Array.isArray(c) ? c : [c];for (let t = 0, l = e.length; t < l; t++) {var _l$descending;let l = e[t];"string" == typeof l && (l = { column: l, descending: false });let o = s.columns.get(l.column);o && h.push({ column: l.column, comparePath: o.comparePath || o.dataPath, descending: (_l$descending = l.descending) !== null && _l$descending !== void 0 ? _l$descending : false });}}s.rows = new y({ sortColumn: h }), s.rows.onComparatorRequired = (e, l, o) => {if (t.onComparatorRequired) return t.onComparatorRequired(e, l, o);}, s.rows.customSortingProvider = (e, l) => t.customSortingProvider ? t.customSortingProvider(e, l) : l(e), s.filteredRows = null, s.scrollbarWidth = 0, s._lastVirtualScrollHeight = 0, function (e) {const t = e._p,s = (t) => {let s = t.currentTarget,n = t.relatedTarget;n === s || s.contains(n) || s[g] && (n === s[g] || s[g].contains(n)) || function (e, t, _n$visibleColumns$de$, _P$right) {const s = e._o,n = e._p,a = t.firstElementChild;if (!a) return;if (!(a.scrollWidth - a.clientWidth > 1 || a.scrollHeight - a.clientHeight > 1)) return;ce(e), n.abortCellPreview = false;const d = t.parentElement;if (!d) return;const h = (_n$visibleColumns$de$ = n.visibleColumns[de.call(d.childNodes, t)]) === null || _n$visibleColumns$de$ === void 0 ? void 0 : _n$visibleColumns$de$.name,c = h ? n.columns.get(h) : null;if (!c || false === c.allowPreview) return;const u = he("div");u.innerHTML = t.innerHTML, u.className = s.cellPreviewClassName;const m = t.classList.contains(`${s.tableClassName}-header-cell`);m && (u.classList.add("header"), t.classList.contains("sortable") && u.classList.add("sortable"), u.draggable = true, oe(e, u));const f = getComputedStyle(t),p = getComputedStyle(a),b = "right" === f.float,C = b ? "right" : "left",w = parseFloat(f.paddingLeft) || 0,y = parseFloat(f.paddingRight) || 0,W = parseFloat(f.paddingTop) || 0,R = parseFloat(f.paddingBottom) || 0;let S = a.scrollWidth + (t.clientWidth - a.offsetWidth);const _ = "border-box" === f.boxSizing;if (_ ? u.style.boxSizing = "border-box" : (S -= w + y, u.style.marginTop = (parseFloat(f.borderTopWidth) || 0) + "px"), !n.transparentBgColor1) {const e = document.createElement("div");document.body.appendChild(e), e.style.backgroundColor = "transparent", n.transparentBgColor1 = getComputedStyle(e).backgroundColor, e.style.backgroundColor = "rgba(0,0,0,0)", n.transparentBgColor2 = getComputedStyle(e).backgroundColor, e.remove();}const N = { "box-sizing": _ ? "border-box" : "content-box", width: S + "px", "min-height": Math.max(getElementHeight(t), /%/.test(f.minHeight) ? 0 : parseFloat(f.minHeight) || 0) + "px", "padding-left": w + "px", "padding-right": y + "px", "padding-top": W + "px", "padding-bottom": R + "px", overflow: "hidden", position: "absolute", "z-index": "-1", [C]: "0", top: "0", cursor: f.cursor };let x = f.backgroundColor;x !== n.transparentBgColor1 && x !== n.transparentBgColor2 || (x = getComputedStyle(d).backgroundColor), x !== n.transparentBgColor1 && x !== n.transparentBgColor2 || (x = "#fff"), N["background-color"] = x, setCssProps(u, N), u.firstChild && setCssProps(u.firstChild, { direction: p.direction, "white-space": p.whiteSpace, "min-height": p.minHeight, "line-height": p.lineHeight, font: p.font }), e.el.appendChild(u), m && T(u), u.rowVIndex = d.vIndex;const L = u.rowIndex = d.index;u.columnName = h;try {const e = E.saveSelection(t);e && E.restoreSelection(u, e);} catch {}if (e.emit("cellpreview", { el: u.firstElementChild, name: u.columnName, rowIndex: L !== null && L !== void 0 ? L : null, rowData: null == L ? null : n.rows[L], cell: t, cellEl: a }), n.abortCellPreview) return void u.remove();null != L && u.addEventListener("click", (t) => {e.emit("rowclick", { event: t, filteredRowIndex: d.vIndex, rowIndex: L, rowEl: d, rowData: n.rows[L] });});const k = e.el,M = k === window ? document : k,z = getComputedStyle(k),P = getElementOffset(t),F = getElementOffset(k);if (b) {const e = window.innerWidth;P.right = e - (P.left + getElementWidth(t, true, true, true)), F.right = e - (F.left + getElementWidth(k, true, true, true));}P.left -= parseFloat(z.borderLeftWidth) || 0, "right" === C && void 0 !== P.right && void 0 !== F.right && (P.right -= parseFloat(z.borderRightWidth) || 0), P.top -= parseFloat(z.borderTopWidth) || 0, "left" === C ? P.left += parseFloat(f.borderLeftWidth) || 0 : void 0 !== P.right && (P.right += parseFloat(f.borderRightWidth) || 0), P.top += parseFloat(f.borderTopWidth) || parseFloat(f.borderBottomWidth) || 0, P.left -= F.left, "right" === C && void 0 !== P.right && void 0 !== F.right && (P.right -= F.right), P.top -= F.top;const H = getElementWidth(k, false, false, false) - getElementWidth(u, true, true, true),A = "left" === C ? P.left : (_P$right = P.right) !== null && _P$right !== void 0 ? _P$right : 0,I = A < 0 ? 0 : A > H ? H : A;"left" === C ? P.left = I : P.right = I;const O = getElementHeight(t, true, true, true),B = ("scrollTop" in M ? M.scrollTop : 0) + getElementHeight(k, true) - O;P.top > B && (P.top = Math.max(0, B));const $ = { top: P.top + "px", "z-index": 9999 };$[C] = ("left" === C ? P.left : P.right) + "px", setCssProps(u, $), u[v] = t, n.cellPreviewCell = u, t[g] = u, n._bindCellHoverOut(t), n._bindCellHoverOut(u), u.addEventListener("wheel", () => {ce(e);});}(e, s);},n = (t) => {let l = t.currentTarget[v] || t.currentTarget,o = t.relatedTarget;o === e.el || l.contains(o) || l[g] && (o === l[g] || l[g].contains(o)) || function (e) {ce(e);}(e);};t._bindCellHoverIn = (e) => {e[m] || e.addEventListener("mouseover", e[m] = s);}, t._unbindCellHoverIn = (e) => {e[m] && (e.removeEventListener("mouseover", e[m]), e[m] = null);}, t._bindCellHoverOut = (e) => {e[f] || e.addEventListener("mouseout", e[f] = n);}, t._unbindCellHoverOut = (e) => {e[f] && (e.removeEventListener("mouseout", e[f]), e[f] = null);};}(this);}on(e, t) {return this[w] || this._p.mitt.on(e, t), this;}once(e, t) {if (this[w]) return this;const l = (o) => {this._p.mitt.off(e, l), t(o);};return this._p.mitt.on(e, l), this;}off(e, t) {return this[w] || (e || t ? this._p.mitt.off(e, t) : this._p.mitt.all.clear()), this;}emit(e, t) {return this[w] || this._p.mitt.emit(e, t), this;}destroy() {var _e$virtualListHelper, _e$table, _e$tbody;const e = this._p,t = this.el;if (this[w] || !e) return this;if (e.resizer && (e.resizer.remove(), e.resizer = null), (_e$virtualListHelper = e.virtualListHelper) !== null && _e$virtualListHelper !== void 0 && _e$virtualListHelper.destroy(), e.virtualListHelper = null, Y(this), (_e$table = e.table) !== null && _e$table !== void 0 && _e$table.remove(), (_e$tbody = e.tbody) !== null && _e$tbody !== void 0 && _e$tbody.remove(), e.workerListeners) {for (let t = 0; t < e.workerListeners.length; t++) {let l = e.workerListeners[t];l.worker.removeEventListener("message", l.listener, false);}e.workerListeners.length = 0;}e.rows.length = e.columns.length = 0, e._deferredRender && clearTimeout(e._deferredRender);for (let e in this) ue.call(this, e) && (this[e] = null);return this[w] = true, t && t.remove(), this;}close() {this.destroy();}remove() {this.destroy();}render() {const l = this._o,i = this._p;if (!this.el.offsetParent) return i._deferredRender || (i._deferredRender = setTimeout(() => {i._deferredRender = null, !this[w] && this.el.offsetParent && this.render();})), this;if (true === i.tableSkeletonNeedsRendering) {var _i$filteredRows;i.tableSkeletonNeedsRendering = false, l.width === _.AUTO && te(this);let s = i.table && i.table.parentNode ? i.table.scrollTop : NaN,n = i.table && i.table.parentNode ? getScrollHorz(i.table) : NaN;!function (e, _t$virtualListHelper) {const t = e._p,l = e._o;(_t$virtualListHelper = t.virtualListHelper) !== null && _t$virtualListHelper !== void 0 && _t$virtualListHelper.destroy(), t.virtualListHelper = null, t.table && l.virtualTable && (t.table.remove(), t.table = void 0, t.tbody = void 0), Y(e), t.currentTouchId = null, t.header && t.header.remove();const o = l.tableClassName,i = U("div"),s = U("div");i.className = `${o}-header`, s.className = `${o}-header-row`, t.header = i, t.headerRow = s, i.appendChild(s), e.el.prepend(i), x(e.el), l.width === _.SCROLL ? e.el.style.overflow = "hidden" : e.el.style.overflow = "", !l.height && l.virtualTable && (l.height = getElementHeight(e.el, true));}(this), function (e) {const t = e._p,l = e._o,i = l.tableClassName;if (l.virtualTable && !t.virtualRowHeight) {const l = () => {const e = U("div"),t = e.appendChild(U("div")),l = t.appendChild(U("div"));return e.className = `${i}-row`, t.className = `${i}-cell`, l.innerHTML = "0", e.style.visibility = "hidden", e.style.position = "absolute", e;},s = U("div");s.className = e.el.className, setCssProps(s, { "z-index": "-1", position: "absolute", left: "0", top: "-9999px", width: "1px", overflow: "hidden" });const n = U("div");n.className = i, s.appendChild(n);const a = U("div");a.className = `${i}-body`, a.style.width = "99999px", n.appendChild(a), document.body.appendChild(s);const d = l(),h = l(),c = l();a.appendChild(d), a.appendChild(h), a.appendChild(c), t.virtualRowHeight = getElementHeight(h, true, true, true), s.remove();}if (!t.table) {var _l$height;const s = document.createDocumentFragment(),n = U("div");n.className = i, l.virtualTable && (n.className += " virtual");const a = getComputedStyle(n);let h = ((_l$height = l.height) !== null && _l$height !== void 0 ? _l$height : 0) - getElementHeight(t.header, true, true, true);"border-box" !== a.boxSizing && (h -= parseFloat(a.borderTopWidth) || 0, h -= parseFloat(a.borderBottomWidth) || 0, h -= parseFloat(a.paddingTop) || 0, h -= parseFloat(a.paddingBottom) || 0), setCssProps(n, { height: l.height ? h + "px" : "auto", display: "block", overflowY: "auto", overflowX: l.width === _.SCROLL ? "auto" : "hidden" }), s.appendChild(n);const c = U("div");c.className = l.tableClassName + "-body", c.style.minHeight = "1px", t.table = n, t.tbody = c, x(c), x(n), n.appendChild(c), e.el.appendChild(s), function (e, _t$filteredRows) {const t = e._p,l = e._o,o = l.tableClassName,i = o + "-row",r = o + "-row-alt",s = o + "-cell",n = o + "-sticky";let a = t.visibleColumns,h = a.length;t.notifyRendererOfColumnsConfig = () => {a = t.visibleColumns, h = a.length;for (let e = 0; e < h; e++) {const t = a[e];t._finalWidth = t.actualWidthConsideringScrollbarWidth || t.actualWidth;}}, t.virtualListHelper = new VirtualListHelper({ list: t.table, itemsParent: t.tbody, autoVirtualWrapperWidth: false, virtual: l.virtualTable, buffer: l.rowsBufferSize, estimatedItemHeight: l.estimatedRowHeight ? l.estimatedRowHeight : t.virtualRowHeight || 40, itemElementCreatorFn: () => U("div"), onItemRender: (o, d) => {const c = t.filteredRows || t.rows,u = !!t.filteredRows,m = l.allowCellPreview,f = t.isStickyColumns;o.className = i, d % 2 == 1 && (o.className += " " + r);const g = c[d],v = u ? g[C] : d;o.vIndex = d, o.index = v;for (let e = 0; e < h; e++) {var _i$_finalWidth;const i = a[e],r = U("div");if (r.columnName = i.name, r.setAttribute("data-column", i.name), r.className = s, r.style.width = ((_i$_finalWidth = i._finalWidth) !== null && _i$_finalWidth !== void 0 ? _i$_finalWidth : 0) + "px", i.cellClasses && (r.className += " " + i.cellClasses), i.stickyPos) {r.className += " " + n, r.style.position = "sticky", r.style[i.stickyPos.absDirection] = i.stickyPos.offset + "px";const l = f === null || f === void 0 ? void 0 : f.get(e);"start" === l && !t.lastIsRtl || "end" === l && t.lastIsRtl ? r.classList.add("is-sticky-left") : ("start" === l && t.lastIsRtl || "end" === l && !t.lastIsRtl) && r.classList.add("is-sticky-right");}m && t._bindCellHoverIn(r), r.appendChild(U("div")).innerHTML = ae(l, g, i), o.appendChild(r);}o.addEventListener("click", o[p] = (t) => {e.emit("rowclick", { event: t, filteredRowIndex: d, rowIndex: v, rowEl: o, rowData: g });}), e.emit("rowcreate", { filteredRowIndex: d, rowIndex: v, rowEl: o, rowData: g });}, onItemUnrender: (t) => {t[p] && t.removeEventListener("click", t[p]), function (e, t) {const l = e._p;for (let e = 0, o = t.childNodes, i = o.length; e < i; e++) l._unbindCellHoverIn(o[e]);}(e, t), e.emit("rowdestroy", t);}, onScrollHeightChange: (l) => {l > t._lastVirtualScrollHeight && !t.scrollbarWidth && J(e), t._lastVirtualScrollHeight = l;} }), t.virtualListHelper.setCount(((_t$filteredRows = t.filteredRows) !== null && _t$filteredRows !== void 0 ? _t$filteredRows : t.rows).length), t.notifyRendererOfColumnsConfig();}(e);}}(this), this.tableWidthChanged(true, false), function (e) {const t = e._p,l = e._o,o = l.allowCellPreview,i = l.allowHeaderCellPreview,r = l.tableClassName + "-header-cell",s = t.headerRow;for (let n = 0; n < t.visibleColumns.length; n++) {const a = t.visibleColumns[n];if (a.visible) {var _a$actualWidth;const d = U("div");d.draggable = true, d.className = r, d.style.width = ((_a$actualWidth = a.actualWidth) !== null && _a$actualWidth !== void 0 ? _a$actualWidth : 0) + "px", l.sortableColumns && a.sortable && (d.className += " sortable"), d.columnName = a.name, d.setAttribute("data-column", a.name);const h = U("div");h.innerHTML = l.headerCellFormatter(a.label, a.name), d.appendChild(h), o && i && t._bindCellHoverIn(d), s.appendChild(d), t.visibleColumns[n].element = d, oe(e, d), T(d);}}Q(e), e.emit("headerrowcreate", s);}(this), i.virtualListHelper.setCount(((_i$filteredRows = i.filteredRows) !== null && _i$filteredRows !== void 0 ? _i$filteredRows : i.rows).length), G(this), J(this, true), K(this, true);for (let e = 0; e < i.rows.sortColumn.length; e++) le(this, i.rows.sortColumn[e].column, i.rows.sortColumn[e].descending);l.adjustColumnWidthForSortArrow && i.rows.sortColumn.length ? this.tableWidthChanged(true) : l.virtualTable || this.tableWidthChanged(), isNaN(s) || (i.table.scrollTop = s), isNaN(n) || (setScrollHorz(i.table, n), setScrollHorz(i.header, n)), this.emit("renderskeleton");}return i.virtualListHelper.render(), this.emit("render"), this;}clearAndRender(e) {var _t$notifyRendererOfCo;let t = this._p;return t.tableSkeletonNeedsRendering = true, (_t$notifyRendererOfCo = t.notifyRendererOfColumnsConfig) !== null && _t$notifyRendererOfCo !== void 0 && _t$notifyRendererOfCo.call(t), (void 0 === e || e) && this.render(), this;}setColumns(e, t) {const l = this._p;e = e || [];let o = new R();for (let t = 0, l = 0; t < e.length; t++) {let i = e[t],r = re(this._o, i);void 0 !== i.order ? (i.order > l && (l = i.order + 1), r.order = i.order) : r.order = l++, o.push(r);}return o.normalizeOrder(), l.columns = o, l.visibleColumns = o.getVisibleColumns(), se(this), this.clearAndRender(t), this;}addColumn(e, t, l) {const o = this._p;let i = o.columns;if (e && !i.get(e.name)) {let r = null;void 0 !== t && (r = "string" == typeof t ? i.get(t) : i.getByOrder(t));let s = re(this._o, e);s.order = r ? r.order : i.getMaxOrder() + 1;for (let e = i.getMaxOrder(), t = s.order; e >= t; e--) {let t = i.getByOrder(e);t && t.order++;}i.push(s), i.normalizeOrder(), o.visibleColumns = i.getVisibleColumns(), se(this), this.clearAndRender(l), this.emit("addcolumn", s.name);}return this;}removeColumn(e, t) {const l = this._p;let o = l.columns,i = o.indexOf(e);return i > -1 && (o.splice(i, 1), o.normalizeOrder(), l.visibleColumns = o.getVisibleColumns(), se(this), this.clearAndRender(t), this.emit("removecolumn", e)), this;}setColumnLabel(e, t) {let l = this._p.columns.get(e);if (l && (l.label = void 0 === t ? l.name : t, l.element)) for (let e = 0; e < l.element.firstChild.childNodes.length; e++) {let t = l.element.firstChild.childNodes[e];if (3 === t.nodeType) {t.textContent = l.label;break;}}return this;}moveColumn(e, t, l = true) {const o = this._o,i = this._p;let r,s,a = i.columns,d = l ? i.visibleColumns : a.getColumns();if ("string" == typeof e ? r = a.get(e) : "number" == typeof e && (r = d[e]), "string" == typeof t ? s = a.get(t) : "number" == typeof t && (s = d[t]), r && s && e !== t) {let e = r.order,t = s.order,l = a.moveColumn(r, s).getVisibleColumns();if (i.visibleColumns.length !== l.length || i.visibleColumns.some((e, t) => e !== l[t])) if (i.visibleColumns = l, se(this), o.virtualTable) this.clearAndRender();else {var _ref5, _ref6;const l = scopedSelectorAll(i.headerRow, `>div.${o.tableClassName}-header-cell`);let r = e < t ? t + 1 : t,s = e;l[0].parentNode.insertBefore(l[s], l[r]);let a = i.visibleColumns[e],d = ((_ref5 = a.actualWidthConsideringScrollbarWidth || a.actualWidth) !== null && _ref5 !== void 0 ? _ref5 : 0) + "px",h = i.visibleColumns[t],c = ((_ref6 = h.actualWidthConsideringScrollbarWidth || h.actualWidth) !== null && _ref6 !== void 0 ? _ref6 : 0) + "px",u = i.tbody.childNodes;for (let l = 0, o = u.length; l < o; l++) {let o = u[l];1 === o.nodeType && (o.insertBefore(o.childNodes[s], o.childNodes[r]), o.childNodes[t].firstChild.style.width = c, o.childNodes[e].firstChild.style.width = d);}}this.emit("movecolumn", { name: r.name, src: e, dest: t });}return this;}setColumnVisible(e, t) {const l = this._p;let o = l.columns.get(e);return t = !!t, o && !!o.visible !== t && (o.visible = t, l.visibleColumns = l.columns.getVisibleColumns(), this.emit(t ? "showcolumn" : "hidecolumn", e), se(this), this.clearAndRender()), this;}isColumnVisible(e) {let t = this._p.columns.get(e);return !!t && t.visible;}setMinColumnWidth(e) {let t = this._o;return e = Math.max(e, 0), t.minColumnWidth !== e && (t.minColumnWidth = e, this.tableWidthChanged(true)), this;}getMinColumnWidth() {return this._o.minColumnWidth;}setColumnWidth(e, t) {let l = this._p.columns.get(e),o = ie(t, l.ignoreMin ? 0 : this._o.minColumnWidth);if (l) {let e = H(l);l.width = o.width, l.widthMode = o.mode, l.unconvertedWidth = null, l.unconvertedWidthMode = null;let t = H(l);e !== t && this.tableWidthChanged(true), this.emit("columnwidth", { name: l.name, width: t, oldWidth: e });}return this;}getColumnWidth(e) {let t = this._p.columns.get(e);return t ? H(t) : null;}getColumnConfig(e) {let t = this._p.columns.get(e);if (t) {var _t$dataPath, _t$comparePath;const e = t.width,l = t.widthMode;null != t.unconvertedWidth && (t.width = t.unconvertedWidth, t.widthMode = t.unconvertedWidthMode);const o = H(t);return null != t.unconvertedWidth && (t.width = e, t.widthMode = l), { name: t.name, label: t.label, width: o, dataPath: (_t$dataPath = t.dataPath) === null || _t$dataPath === void 0 ? void 0 : _t$dataPath.join("."), comparePath: (_t$comparePath = t.comparePath) === null || _t$comparePath === void 0 ? void 0 : _t$comparePath.join("."), resizable: t.resizable, movable: t.movable, sortable: t.sortable, visible: t.visible, cellClasses: t.cellClasses, ignoreMin: t.ignoreMin, sticky: t.sticky, order: t.order };}return null;}getColumnsConfig() {const e = this._p;let t = {};for (let l = 0; l < e.columns.length; l++) t[e.columns[l].name] = this.getColumnConfig(e.columns[l].name);return t;}setMaxColumnSortCount(e) {const t = this._p,l = this._o;if (l.sortableColumns !== e && (l.sortableColumns = e, t.table)) {const e = scopedSelectorAll(t.headerRow, `>div.${l.tableClassName}-header-cell`);for (let o = 0, i = e.length; o < i; o++) e[o].classList[l.sortableColumns > 0 && t.visibleColumns[o].sortable ? "add" : "remove"]("sortable");}return this;}getMaxColumnSortCount() {return this._o.sortableColumns;}setSortableColumns(e) {return this.setMaxColumnSortCount(e);}getSortableColumns() {return this.getMaxColumnSortCount();}setMovableColumns(e) {let t = this._o;return e = void 0 === e || !!e, t.movableColumns !== e && (t.movableColumns = e), this;}getMovableColumns() {return this._o.movableColumns;}setResizableColumns(e) {let t = this._o;return e = void 0 === e || !!e, t.resizableColumns !== e && (t.resizableColumns = e), this;}getResizableColumns() {return this._o.resizableColumns;}getConvertColumnWidthsToRelative() {return this._o.convertColumnWidthsToRelative;}setConvertColumnWidthsToRelative(e, t = true) {let l = this._o;return e = !!e, l.convertColumnWidthsToRelative !== e && (l.convertColumnWidthsToRelative = e, t && this.tableWidthChanged(true)), this;}setOnComparatorRequired(e) {let t = this._o;return t.onComparatorRequired !== e && (t.onComparatorRequired = e), this;}setCustomSortingProvider(e) {let t = this._o;return t.customSortingProvider !== e && (t.customSortingProvider = e), this;}sort(e, t, l) {const o = this._o,i = this._p;let r = i.columns.get(e),s = i.rows.sortColumn.map((e) => ({ column: e.column, descending: e.descending }));if (r) {if (l) {for (let e = 0; e < s.length; e++) if (s[e].column === r.name) {e < s.length - 1 ? s.length = 0 : (t = s[s.length - 1].descending, s.splice(s.length - 1, 1));break;}(o.sortableColumns > 0 && s.length >= o.sortableColumns || s.length >= i.visibleColumns.length) && (s.length = 0);} else s.length = 0;t = void 0 !== t && t, s.push({ column: r.name, descending: !!t });} else s.length = 0;return this.setSortedColumns(s);}resort() {const e = this._p;let t = e.columns,l = e.rows.sortColumn;if (l.length) {var _e$virtualListHelper2;for (let e = 0; e < l.length; e++) t.get(l[e].column) || l.splice(e--, 1);e.rows.sortColumn = l, l.length && (e.rows.sort(), e.filteredRows && e.filteredRows.sort()), (_e$virtualListHelper2 = e.virtualListHelper) === null || _e$virtualListHelper2 === void 0 ? void 0 : _e$virtualListHelper2.invalidate();let o = [];for (let e = 0; e < l.length; e++) o.push({ column: l[e].column, descending: l[e].descending });this.emit("sort", { sorts: o, resort: true });}return this;}setSortedColumns(e, t = { immediate: true, render: true }) {var _o$virtualListHelper;const l = this._o,o = this._p;let i = o.columns,r = e.filter((e) => i.get(e.column)).map((e) => {let t = i.get(e.column);return { column: t.name, comparePath: t.comparePath || t.dataPath, descending: !!e.descending };});l.sortableColumns > 0 && r.length > l.sortableColumns && (r.length = l.sortableColumns), te(this);for (let e = 0; e < r.length; e++) le(this, r[e].column, r[e].descending);l.adjustColumnWidthForSortArrow && !o.tableSkeletonNeedsRendering && this.tableWidthChanged(true), o.rows.sortColumn = r, r.length && t.immediate && (o.rows.sort(), o.filteredRows && o.filteredRows.sort(), (_o$virtualListHelper = o.virtualListHelper) !== null && _o$virtualListHelper !== void 0 && _o$virtualListHelper.invalidate(), o.virtualListHelper && t.render && o.virtualListHelper.render());let s = [];for (let e = 0; e < r.length; e++) s.push({ column: r[e].column, descending: r[e].descending });return this.emit("sort", { sorts: s }), this;}getSortedColumns() {const e = this._p;let t = [];for (let l = 0; l < e.rows.sortColumn.length; l++) {let o = e.rows.sortColumn[l];t.push({ column: o.column, descending: o.descending });}return t;}setCellFormatter(e) {if (!e) {const t = (e) => "string" == typeof e ? c(e) : e;t[u] = true, e = t;}return this._o.cellFormatter = e, this;}setHeaderCellFormatter(e) {return this._o.headerCellFormatter = e || function (e) {return "string" == typeof e ? c(e) : e;}, this;}setFilter(e) {return this._o.filter = e, this;}filter(e) {const t = this._p;let l = this._o.filter || S;"string" == typeof arguments[0] && "string" == typeof arguments[1] && (e = { column: arguments[0], keyword: arguments[1], caseSensitive: arguments[2] });let o = !!t.filteredRows;return t.filteredRows && (t.filteredRows = null), t.filterArgs = null == e ? null : "object" != typeof e || Array.isArray(e) ? e : Object.assign({}, e), null !== t.filterArgs ? (t.filteredRows = t.rows.filteredCollection(l, t.filterArgs), (o || t.filteredRows) && (this.clearAndRender(), this.emit("filter", e))) : (t.filterArgs = null, t.filteredRows = null, this.clearAndRender(), this.emit("filterclear", {})), this;}clearFilter() {const e = this._p;return e.filteredRows && (e.filterArgs = null, e.filteredRows = null, this.clearAndRender(), this.emit("filterclear", {})), this;}getHtmlForRowCell(e, t) {const l = this._p;if (e < 0 || e > l.rows.length - 1) return null;let o = l.columns.get(t);if (!o) return null;let i = l.rows[e];return ae(this._o, i, o);}getHtmlForRowDataCell(e, t) {let l = this._p.columns.get(t);return l ? ae(this._o, e, l) : null;}getRowYPos(e) {return this._p.virtualListHelper.getItemPosition(e) || null;}getDataForRow(e) {const t = this._p;return e < 0 || e > t.rows.length - 1 ? null : t.rows[e];}getRowCount() {const e = this._p;return e.rows ? e.rows.length : 0;}getIndexForRow(e) {return this._p.rows.indexOf(e);}getFilteredRowCount() {const e = this._p;return (e.filteredRows || e.rows).length;}getIndexForFilteredRow(e) {const t = this._p;return (t.filteredRows || t.rows).indexOf(e);}getDataForFilteredRow(e) {const t = this._p;return e < 0 || e > (t.filteredRows || t.rows).length - 1 ? null : (t.filteredRows || t.rows)[e];}getHeaderRowElement() {return this._p.headerRow;}addRows(e, t, l, o) {let i = this._p;"boolean" == typeof t && (o = l, l = t, t = -1), "number" != typeof t && (t = -1), (t < 0 || t > i.rows.length) && (t = i.rows.length), o = void 0 === o || !!o;const r = (Array.isArray(e) ? e : [e]).length;return e && (i.rows.add(e, t), i.filteredRows || l && i.rows.sortColumn.length ? (l && i.rows.sortColumn.length ? this.resort() : ne(this), i.tableSkeletonNeedsRendering = true, o && this.render()) : o && (i.virtualListHelper.addItemsAt(r, t), this._o.virtualTable ? (G(this), J(this), this.render(), K(this, false)) : i.tbody && (this.render(), J(this), K(this, true))), this.emit("addrows", { count: r, clear: false })), this;}removeRows(e, t, l) {let o = this._p;return "number" != typeof t || t <= 0 || e < 0 || e > o.rows.length - 1 || (o.rows.splice(e, t), l = void 0 === l || !!l, o.filteredRows ? (ne(this), o.tableSkeletonNeedsRendering = true, l && this.render()) : l && (o.virtualListHelper.removeItemsAt(t, e), this._o.virtualTable ? (G(this), J(this), this.render(), K(this, false)) : (this.render(), J(this), K(this, true)))), this;}removeRow(e, t) {return this.removeRows(e, 1, t);}refreshRow(e, t = true) {let l = this._p;if (e < 0 || e > l.rows.length - 1) return this;let o = -1;return l.filteredRows && -1 === (o = l.filteredRows.indexOf(l.rows[e])) || (-1 === o && (o = e), l.virtualListHelper.refreshItemAt(o), t && l.virtualListHelper.render()), this;}getRowElement(e) {let t = this._p;if (e < 0 || e > t.rows.length - 1) return null;let l = -1;return t.filteredRows && -1 === (l = t.filteredRows.indexOf(t.rows[e])) ? null : (-1 === l && (l = e), t.virtualListHelper.getItemElementAt(l) || null);}refreshAllVirtualRows() {return this._p.virtualListHelper.invalidate().render(), this;}setRows(e, t) {let l = this._p;return l.rows.reset(e), t && l.rows.sortColumn.length ? this.resort() : ne(this), this.clearAndRender().emit("addrows", { count: e.length, clear: true }), this;}tableWidthChanged(e, t) {let l = this._o,o = this._p,i = z(this),r = i,s = 0;if (!o.table) return this;t = void 0 === t || t;let n = 0;if (o.tbody || (t = false), t && (n = parseFloat(o.tbody.style.minWidth) || 0), r !== o.lastDetectedWidth || e) {var _o$notifyRendererOfCo;o.lastDetectedWidth = i;let e = 0,a = [],d = 0;for (let e = 0; e < o.columns.length; e++) o.columns[e].actualWidthConsideringScrollbarWidth = null;for (let t = 0; t < o.visibleColumns.length; t++) {let i = o.visibleColumns[t];if (1 === i.widthMode) {let o = i.width;o += i.arrowProposedWidth || 0, !i.ignoreMin && o < l.minColumnWidth && (o = l.minColumnWidth), r -= o, e += o, o !== i.actualWidth && (i.actualWidth = o, a.push(t));} else if (0 === i.widthMode) {let o = M(this, i.label) + 20;o += i.arrowProposedWidth || 0, !i.ignoreMin && o < l.minColumnWidth && (o = l.minColumnWidth), r -= o, e += o, o !== i.actualWidth && (i.actualWidth = o, l.convertColumnWidthsToRelative || a.push(t));} else 2 === i.widthMode && (d += i.width, s++);}if (l.convertColumnWidthsToRelative) for (let t = 0; t < o.visibleColumns.length; t++) {let l = o.visibleColumns[t];0 === l.widthMode && (l.widthMode = 2, null == l.unconvertedWidth && (l.unconvertedWidth = l.width, l.unconvertedWidthMode = l.unconvertedWidth), r += l.actualWidth, l.width = l.actualWidth / e, d += l.width, s++);}if (s && (d < 1 && l.relativeWidthGrowsToFillWidth || d > 1 && l.relativeWidthShrinksToFillWidth)) for (let e = 0; e < o.visibleColumns.length; e++) {let t = o.visibleColumns[e];2 === t.widthMode && (t.width /= d);}let h = Math.max(0, r);0 === h && (h = o.table.clientWidth);let c = l.minColumnWidth / h;if (isNaN(c) && (c = 0), c > 0) {let e,t = 0;for (let e = 0; e < o.visibleColumns.length; e++) {let l = o.visibleColumns[e];2 === l.widthMode && !l.ignoreMin && l.width < c && (t += c - l.width, l.width = c);}for (let l = 0; l < o.visibleColumns.length; l++) {let i = o.visibleColumns[l];2 === i.widthMode && !i.ignoreMin && i.width > c && t > 0 && (null == i.unconvertedWidth && (i.unconvertedWidth = i.width, i.unconvertedWidthMode = i.widthMode), e = Math.min(t, i.width - c), i.width -= e, t -= e);}}if (l.autoFillTableWidth && r > 0) {let e = 0,t = r;for (let l = 0; l < o.visibleColumns.length; l++) {let i = o.visibleColumns[l];i.resizable || 1 !== i.widthMode || (e += i.width), 2 === i.widthMode && (t -= Math.round(h * i.width));}let l = (i - e) / (i - t - e) || NaN;for (let e = 0; e < o.visibleColumns.length && t > 0; e++) {let t = o.visibleColumns[e];if (t.resizable || 1 !== t.widthMode) if (2 === t.widthMode) null == t.unconvertedWidth && (t.unconvertedWidth = t.width, t.unconvertedWidthMode = t.widthMode), t.width *= l;else {let o = t.actualWidth * l;t.actualWidth !== o && (t.actualWidth = o, -1 === a.indexOf(e) && a.push(e));}}}for (let e = 0; e < o.visibleColumns.length; e++) {let t = o.visibleColumns[e];if (2 === t.widthMode) {let l = Math.round(h * t.width);r -= l, s--, 0 === s && 1 === r && (l++, r--), -1 === r && (l--, r++), l !== t.actualWidth && (t.actualWidth = l, a.push(e));}}if (o.visibleColumns.length && (o.visibleColumns[o.visibleColumns.length - 1].actualWidthConsideringScrollbarWidth = o.visibleColumns[o.visibleColumns.length - 1].actualWidth - (o.scrollbarWidth || 0)), (_o$notifyRendererOfCo = o.notifyRendererOfColumnsConfig) !== null && _o$notifyRendererOfCo !== void 0 && _o$notifyRendererOfCo.call(o), Q(this), t) {let e = P(this);n < e && K(this, false);for (let e = 0; e < a.length; e++) ee(this, a[e]);n > e && K(this, false);}}return this;}tableHeightChanged() {let e = this._o,t = this._p;if (!t.table) return this;const l = getComputedStyle(t.table);let o = getElementHeight(this.el, true) - (parseFloat(l.borderTopWidth) || 0) - (parseFloat(l.borderBottomWidth) || 0);return o !== e.height && (e.height = o, t.tbody && (t.tbody.style.height = Math.max(e.height - getElementHeight(t.header, true, true, true), 1) + "px"), e.virtualTable && this.clearAndRender()), this;}hideCellPreview() {return ce(this), this;}abortCellPreview() {return this.hideCellPreview(), this;}cancelColumnResize() {return O(this), this;}getUrlForElementContent(e) {let t,l = document.getElementById(e);if (l) {let e = l.textContent;if ("function" == typeof Blob) t = new Blob([e || ""]);else {const l = window,o = l.BlobBuilder || l.WebKitBlobBuilder || l.MozBlobBuilder || l.MSBlobBuilder;if (!o) return null;const i = new o();i.append(e || ""), t = i.getBlob();}return (window.URL || window.webkitURL).createObjectURL(t);}return null;}isWorkerSupported() {return window.Worker instanceof Function;}createWebWorker(e, t, l) {if (this.isWorkerSupported()) {let o = this._p,i = new Worker(e),r = (e) => {e.data.append ? this.addRows(e.data.rows, l) : this.setRows(e.data.rows, l);};return i.addEventListener("message", r, false), o.workerListeners || (o.workerListeners = []), o.workerListeners.push({ worker: i, listener: r }), (t || void 0 === t) && i.postMessage(null), i;}return null;}unbindWebWorker(e) {let t = this._p;if (t.workerListeners) for (let l = 0; l < t.workerListeners.length; l++) t.workerListeners[l].worker === e && (e.removeEventListener("message", t.workerListeners[l].listener, false), t.workerListeners.splice(l, 1), l--);return this;}}me.VERSION = "@@VERSION", me.Width = _;
|
|
3857
3857
|
|
|
3858
3858
|
class DGTableJQuery extends me {
|
|
3859
3859
|
constructor(options) {
|