@mineadmin/pro-table
Version:
基于 @mineadmin/table、@mineadmin/search 封装的加强型表格组件
828 lines • 80.3 kB
JavaScript
var kn = Object.defineProperty;
var An = (t, e, n) => e in t ? kn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var Ae = (t, e, n) => An(t, typeof e != "symbol" ? e + "" : e, n);
import { onMounted as en, nextTick as Ut, getCurrentScope as Bn, onScopeDispose as Fn, getCurrentInstance as Tn, unref as En, isRef as Hn, inject as nn, createElementBlock as Ft, openBlock as ft, createElementVNode as St, defineComponent as fe, computed as ge, ref as ct, shallowRef as zn, watch as Ln, onBeforeUnmount as Xn, createVNode as y, Fragment as Gt, withDirectives as Yn, resolveComponent as V, vShow as jn, h as Ke, mergeProps as an, isVNode as qn, createBlock as he, withCtx as Nt, normalizeClass as $n, renderList as Wn, toDisplayString as Vn } from "vue";
import { ElTag as Gn } from "element-plus";
const xt = (t) => !!(t && t.constructor && t.call && t.apply), rn = (t, e, n = !1) => t ? t.slice().sort(n === !0 ? (o, a) => e(a) - e(o) : (o, a) => e(o) - e(a)) : [];
function Be(t) {
return typeof t == "function" ? t() : En(t);
}
const Kn = typeof window < "u" && typeof document < "u";
function Un(t, e = !0, n) {
Tn() ? en(t, n) : e ? t() : Ut(t);
}
const Jn = Kn ? window.document : void 0;
/**!
* Sortable 1.15.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function ln(t, e) {
var n = Object.keys(t);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(t);
e && (o = o.filter(function(a) {
return Object.getOwnPropertyDescriptor(t, a).enumerable;
})), n.push.apply(n, o);
}
return n;
}
function Rt(t) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e] != null ? arguments[e] : {};
e % 2 ? ln(Object(n), !0).forEach(function(o) {
Zn(t, o, n[o]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : ln(Object(n)).forEach(function(o) {
Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o));
});
}
return t;
}
function Ue(t) {
return Ue = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
return typeof e;
} : function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, Ue(t);
}
function Zn(t, e, n) {
return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
function At() {
return At = Object.assign || function(t) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e];
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
}
return t;
}, At.apply(this, arguments);
}
function Qn(t, e) {
if (t == null) return {};
var n, o, a = function(i, c) {
if (i == null) return {};
var u, v, s = {}, g = Object.keys(i);
for (v = 0; v < g.length; v++) u = g[v], c.indexOf(u) >= 0 || (s[u] = i[u]);
return s;
}(t, e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(t);
for (o = 0; o < r.length; o++) n = r[o], e.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(t, n) && (a[n] = t[n]);
}
return a;
}
function Bt(t) {
if (typeof window < "u" && window.navigator) return !!navigator.userAgent.match(t);
}
var Ht = Bt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ve = Bt(/Edge/i), sn = Bt(/firefox/i), ce = Bt(/safari/i) && !Bt(/chrome/i) && !Bt(/android/i), xn = Bt(/iP(ad|od|hone)/i), _n = Bt(/chrome/i) && Bt(/android/i), Dn = { capture: !1, passive: !1 };
function F(t, e, n) {
t.addEventListener(e, n, !Ht && Dn);
}
function N(t, e, n) {
t.removeEventListener(e, n, !Ht && Dn);
}
function Oe(t, e) {
if (e) {
if (e[0] === ">" && (e = e.substring(1)), t) try {
if (t.matches) return t.matches(e);
if (t.msMatchesSelector) return t.msMatchesSelector(e);
if (t.webkitMatchesSelector) return t.webkitMatchesSelector(e);
} catch {
return !1;
}
return !1;
}
}
function to(t) {
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
}
function Ot(t, e, n, o) {
if (t) {
n = n || document;
do {
if (e != null && (e[0] === ">" ? t.parentNode === n && Oe(t, e) : Oe(t, e)) || o && t === n) return t;
if (t === n) break;
} while (t = to(t));
}
return null;
}
var ue, cn = /\s+/g;
function bt(t, e, n) {
if (t && e) if (t.classList) t.classList[n ? "add" : "remove"](e);
else {
var o = (" " + t.className + " ").replace(cn, " ").replace(" " + e + " ", " ");
t.className = (o + (n ? " " + e : "")).replace(cn, " ");
}
}
function T(t, e, n) {
var o = t && t.style;
if (o) {
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(t, "") : t.currentStyle && (n = t.currentStyle), e === void 0 ? n : n[e];
e in o || e.indexOf("webkit") !== -1 || (e = "-webkit-" + e), o[e] = n + (typeof n == "string" ? "" : "px");
}
}
function ne(t, e) {
var n = "";
if (typeof t == "string") n = t;
else do {
var o = T(t, "transform");
o && o !== "none" && (n = o + " " + n);
} while (!e && (t = t.parentNode));
var a = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
return a && new a(n);
}
function un(t, e, n) {
if (t) {
var o = t.getElementsByTagName(e), a = 0, r = o.length;
if (n) for (; a < r; a++) n(o[a], a);
return o;
}
return [];
}
function It() {
var t = document.scrollingElement;
return t || document.documentElement;
}
function K(t, e, n, o, a) {
if (t.getBoundingClientRect || t === window) {
var r, i, c, u, v, s, g;
if (t !== window && t.parentNode && t !== It() ? (i = (r = t.getBoundingClientRect()).top, c = r.left, u = r.bottom, v = r.right, s = r.height, g = r.width) : (i = 0, c = 0, u = window.innerHeight, v = window.innerWidth, s = window.innerHeight, g = window.innerWidth), (e || n) && t !== window && (a = a || t.parentNode, !Ht)) do
if (a && a.getBoundingClientRect && (T(a, "transform") !== "none" || n && T(a, "position") !== "static")) {
var C = a.getBoundingClientRect();
i -= C.top + parseInt(T(a, "border-top-width")), c -= C.left + parseInt(T(a, "border-left-width")), u = i + r.height, v = c + r.width;
break;
}
while (a = a.parentNode);
if (o && t !== window) {
var b = ne(a || t), X = b && b.a, R = b && b.d;
b && (u = (i /= R) + (s /= R), v = (c /= X) + (g /= X));
}
return { top: i, left: c, bottom: u, right: v, width: g, height: s };
}
}
function dn(t, e, n) {
for (var o = qt(t, !0), a = K(t)[e]; o; ) {
if (!(a >= K(o)[n])) return o;
if (o === It()) break;
o = qt(o, !1);
}
return !1;
}
function oe(t, e, n, o) {
for (var a = 0, r = 0, i = t.children; r < i.length; ) {
if (i[r].style.display !== "none" && i[r] !== S.ghost && (o || i[r] !== S.dragged) && Ot(i[r], n.draggable, t, !1)) {
if (a === e) return i[r];
a++;
}
r++;
}
return null;
}
function Je(t, e) {
for (var n = t.lastElementChild; n && (n === S.ghost || T(n, "display") === "none" || e && !Oe(n, e)); ) n = n.previousElementSibling;
return n || null;
}
function Et(t, e) {
var n = 0;
if (!t || !t.parentNode) return -1;
for (; t = t.previousElementSibling; ) t.nodeName.toUpperCase() === "TEMPLATE" || t === S.clone || e && !Oe(t, e) || n++;
return n;
}
function hn(t) {
var e = 0, n = 0, o = It();
if (t) do {
var a = ne(t), r = a.a, i = a.d;
e += t.scrollLeft * r, n += t.scrollTop * i;
} while (t !== o && (t = t.parentNode));
return [e, n];
}
function qt(t, e) {
if (!t || !t.getBoundingClientRect) return It();
var n = t, o = !1;
do
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
var a = T(n);
if (n.clientWidth < n.scrollWidth && (a.overflowX == "auto" || a.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (a.overflowY == "auto" || a.overflowY == "scroll")) {
if (!n.getBoundingClientRect || n === document.body) return It();
if (o || e) return n;
o = !0;
}
}
while (n = n.parentNode);
return It();
}
function Fe(t, e) {
return Math.round(t.top) === Math.round(e.top) && Math.round(t.left) === Math.round(e.left) && Math.round(t.height) === Math.round(e.height) && Math.round(t.width) === Math.round(e.width);
}
function Cn(t, e) {
return function() {
if (!ue) {
var n = arguments;
n.length === 1 ? t.call(this, n[0]) : t.apply(this, n), ue = setTimeout(function() {
ue = void 0;
}, e);
}
};
}
function On(t, e, n) {
t.scrollLeft += e, t.scrollTop += n;
}
function pn(t) {
var e = window.Polymer, n = window.jQuery || window.Zepto;
return e && e.dom ? e.dom(t).cloneNode(!0) : n ? n(t).clone(!0)[0] : t.cloneNode(!0);
}
function fn(t, e, n) {
var o = {};
return Array.from(t.children).forEach(function(a) {
var r, i, c, u;
if (Ot(a, e.draggable, t, !1) && !a.animated && a !== n) {
var v = K(a);
o.left = Math.min((r = o.left) !== null && r !== void 0 ? r : 1 / 0, v.left), o.top = Math.min((i = o.top) !== null && i !== void 0 ? i : 1 / 0, v.top), o.right = Math.max((c = o.right) !== null && c !== void 0 ? c : -1 / 0, v.right), o.bottom = Math.max((u = o.bottom) !== null && u !== void 0 ? u : -1 / 0, v.bottom);
}
}), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
}
var yt = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
function eo() {
var t, e = [];
return { captureAnimationState: function() {
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(n) {
if (T(n, "display") !== "none" && n !== S.ghost) {
e.push({ target: n, rect: K(n) });
var o = Rt({}, e[e.length - 1].rect);
if (n.thisAnimationDuration) {
var a = ne(n, !0);
a && (o.top -= a.f, o.left -= a.e);
}
n.fromRect = o;
}
});
}, addAnimationState: function(n) {
e.push(n);
}, removeAnimationState: function(n) {
e.splice(function(o, a) {
for (var r in o) if (o.hasOwnProperty(r)) {
for (var i in a) if (a.hasOwnProperty(i) && a[i] === o[r][i]) return Number(r);
}
return -1;
}(e, { target: n }), 1);
}, animateAll: function(n) {
var o = this;
if (!this.options.animation) return clearTimeout(t), void (typeof n == "function" && n());
var a = !1, r = 0;
e.forEach(function(i) {
var c = 0, u = i.target, v = u.fromRect, s = K(u), g = u.prevFromRect, C = u.prevToRect, b = i.rect, X = ne(u, !0);
X && (s.top -= X.f, s.left -= X.e), u.toRect = s, u.thisAnimationDuration && Fe(g, s) && !Fe(v, s) && (b.top - s.top) / (b.left - s.left) == (v.top - s.top) / (v.left - s.left) && (c = function(R, P, Z, vt) {
return Math.sqrt(Math.pow(P.top - R.top, 2) + Math.pow(P.left - R.left, 2)) / Math.sqrt(Math.pow(P.top - Z.top, 2) + Math.pow(P.left - Z.left, 2)) * vt.animation;
}(b, g, C, o.options)), Fe(s, v) || (u.prevFromRect = v, u.prevToRect = s, c || (c = o.options.animation), o.animate(u, b, s, c)), c && (a = !0, r = Math.max(r, c), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
}, c), u.thisAnimationDuration = c);
}), clearTimeout(t), a ? t = setTimeout(function() {
typeof n == "function" && n();
}, r) : typeof n == "function" && n(), e = [];
}, animate: function(n, o, a, r) {
if (r) {
T(n, "transition", ""), T(n, "transform", "");
var i = ne(this.el), c = i && i.a, u = i && i.d, v = (o.left - a.left) / (c || 1), s = (o.top - a.top) / (u || 1);
n.animatingX = !!v, n.animatingY = !!s, T(n, "transform", "translate3d(" + v + "px," + s + "px,0)"), this.forRepaintDummy = function(g) {
return g.offsetWidth;
}(n), T(n, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), T(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
T(n, "transition", ""), T(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
}, r);
}
} };
}
var Zt = [], He = { initializeByDefault: !0 }, pe = { mount: function(t) {
for (var e in He) He.hasOwnProperty(e) && !(e in t) && (t[e] = He[e]);
Zt.forEach(function(n) {
if (n.pluginName === t.pluginName) throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
}), Zt.push(t);
}, pluginEvent: function(t, e, n) {
var o = this;
this.eventCanceled = !1, n.cancel = function() {
o.eventCanceled = !0;
};
var a = t + "Global";
Zt.forEach(function(r) {
e[r.pluginName] && (e[r.pluginName][a] && e[r.pluginName][a](Rt({ sortable: e }, n)), e.options[r.pluginName] && e[r.pluginName][t] && e[r.pluginName][t](Rt({ sortable: e }, n)));
});
}, initializePlugins: function(t, e, n, o) {
for (var a in Zt.forEach(function(i) {
var c = i.pluginName;
if (t.options[c] || i.initializeByDefault) {
var u = new i(t, e, t.options);
u.sortable = t, u.options = t.options, t[c] = u, At(n, u.defaults);
}
}), t.options) if (t.options.hasOwnProperty(a)) {
var r = this.modifyOption(t, a, t.options[a]);
r !== void 0 && (t.options[a] = r);
}
}, getEventProperties: function(t, e) {
var n = {};
return Zt.forEach(function(o) {
typeof o.eventProperties == "function" && At(n, o.eventProperties.call(e[o.pluginName], t));
}), n;
}, modifyOption: function(t, e, n) {
var o;
return Zt.forEach(function(a) {
t[a.pluginName] && a.optionListeners && typeof a.optionListeners[e] == "function" && (o = a.optionListeners[e].call(t[a.pluginName], n));
}), o;
} }, no = ["evt"], pt = function(t, e) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = n.evt, a = Qn(n, no);
pe.pluginEvent.bind(S)(t, e, Rt({ dragEl: f, parentEl: q, ghostEl: x, rootEl: Y, nextEl: Kt, lastDownEl: De, cloneEl: $, cloneHidden: jt, dragStarted: ie, putSortable: tt, activeSortable: S.active, originalEvent: o, oldIndex: ee, oldDraggableIndex: de, newIndex: wt, newDraggableIndex: Yt, hideGhostForTarget: Rn, unhideGhostForTarget: In, cloneNowHidden: function() {
jt = !0;
}, cloneNowShown: function() {
jt = !1;
}, dispatchSortableEvent: function(r) {
st({ sortable: e, name: r, originalEvent: o });
} }, a));
};
function st(t) {
(function(e) {
var n = e.sortable, o = e.rootEl, a = e.name, r = e.targetEl, i = e.cloneEl, c = e.toEl, u = e.fromEl, v = e.oldIndex, s = e.newIndex, g = e.oldDraggableIndex, C = e.newDraggableIndex, b = e.originalEvent, X = e.putSortable, R = e.extraEventProperties;
if (n = n || o && o[yt]) {
var P, Z = n.options, vt = "on" + a.charAt(0).toUpperCase() + a.substr(1);
!window.CustomEvent || Ht || ve ? (P = document.createEvent("Event")).initEvent(a, !0, !0) : P = new CustomEvent(a, { bubbles: !0, cancelable: !0 }), P.to = c || o, P.from = u || o, P.item = r || o, P.clone = i, P.oldIndex = v, P.newIndex = s, P.oldDraggableIndex = g, P.newDraggableIndex = C, P.originalEvent = b, P.pullMode = X ? X.lastPutMode : void 0;
var et = Rt(Rt({}, R), pe.getEventProperties(a, n));
for (var at in et) P[at] = et[at];
o && o.dispatchEvent(P), Z[vt] && Z[vt].call(n, P);
}
})(Rt({ putSortable: tt, cloneEl: $, targetEl: f, rootEl: Y, oldIndex: ee, oldDraggableIndex: de, newIndex: wt, newDraggableIndex: Yt }, t));
}
var f, q, x, Y, Kt, De, $, jt, ee, wt, de, Yt, be, tt, Wt, Ct, ze, Le, vn, mn, ie, Qt, ae, we, ot, te = !1, Pe = !1, Me = [], re = !1, ye = !1, Xe = [], Ze = !1, Se = [], Re = typeof document < "u", Te = xn, gn = ve || Ht ? "cssFloat" : "float", oo = Re && !_n && !xn && "draggable" in document.createElement("div"), Pn = function() {
if (Re) {
if (Ht) return !1;
var t = document.createElement("x");
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
}
}(), Mn = function(t, e) {
var n = T(t), o = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), a = oe(t, 0, e), r = oe(t, 1, e), i = a && T(a), c = r && T(r), u = i && parseInt(i.marginLeft) + parseInt(i.marginRight) + K(a).width, v = c && parseInt(c.marginLeft) + parseInt(c.marginRight) + K(r).width;
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
if (a && i.float && i.float !== "none") {
var s = i.float === "left" ? "left" : "right";
return !r || c.clear !== "both" && c.clear !== s ? "horizontal" : "vertical";
}
return a && (i.display === "block" || i.display === "flex" || i.display === "table" || i.display === "grid" || u >= o && n[gn] === "none" || r && n[gn] === "none" && u + v > o) ? "vertical" : "horizontal";
}, Nn = function(t) {
function e(a, r) {
return function(i, c, u, v) {
var s = i.options.group.name && c.options.group.name && i.options.group.name === c.options.group.name;
if (a == null && (r || s)) return !0;
if (a == null || a === !1) return !1;
if (r && a === "clone") return a;
if (typeof a == "function") return e(a(i, c, u, v), r)(i, c, u, v);
var g = (r ? i : c).options.group.name;
return a === !0 || typeof a == "string" && a === g || a.join && a.indexOf(g) > -1;
};
}
var n = {}, o = t.group;
o && Ue(o) == "object" || (o = { name: o }), n.name = o.name, n.checkPull = e(o.pull, !0), n.checkPut = e(o.put), n.revertClone = o.revertClone, t.group = n;
}, Rn = function() {
!Pn && x && T(x, "display", "none");
}, In = function() {
!Pn && x && T(x, "display", "");
};
Re && !_n && document.addEventListener("click", function(t) {
if (Pe) return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), Pe = !1, !1;
}, !0);
var Vt = function(t) {
if (f) {
t = t.touches ? t.touches[0] : t;
var e = (a = t.clientX, r = t.clientY, Me.some(function(c) {
var u = c[yt].options.emptyInsertThreshold;
if (u && !Je(c)) {
var v = K(c), s = a >= v.left - u && a <= v.right + u, g = r >= v.top - u && r <= v.bottom + u;
return s && g ? i = c : void 0;
}
}), i);
if (e) {
var n = {};
for (var o in t) t.hasOwnProperty(o) && (n[o] = t[o]);
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[yt]._onDragOver(n);
}
}
var a, r, i;
}, ao = function(t) {
f && f.parentNode[yt]._isOutsideThisEl(t.target);
};
function S(t, e) {
if (!t || !t.nodeType || t.nodeType !== 1) throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
this.el = t, this.options = e = At({}, e), t[yt] = this;
var n = { group: null, sort: !0, disabled: !1, store: null, handle: null, draggable: /^[uo]l$/i.test(t.nodeName) ? ">li" : ">*", swapThreshold: 1, invertSwap: !1, invertedSwapThreshold: null, removeCloneOnHide: !0, direction: function() {
return Mn(t, this.options);
}, ghostClass: "sortable-ghost", chosenClass: "sortable-chosen", dragClass: "sortable-drag", ignore: "a, img", filter: null, preventOnFilter: !0, animation: 0, easing: null, setData: function(r, i) {
r.setData("Text", i.textContent);
}, dropBubble: !1, dragoverBubble: !1, dataIdAttr: "data-id", delay: 0, delayOnTouchOnly: !1, touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1, forceFallback: !1, fallbackClass: "sortable-fallback", fallbackOnBody: !1, fallbackTolerance: 0, fallbackOffset: { x: 0, y: 0 }, supportPointer: S.supportPointer !== !1 && "PointerEvent" in window && !ce, emptyInsertThreshold: 5 };
for (var o in pe.initializePlugins(this, t, n), n) !(o in e) && (e[o] = n[o]);
for (var a in Nn(e), this) a.charAt(0) === "_" && typeof this[a] == "function" && (this[a] = this[a].bind(this));
this.nativeDraggable = !e.forceFallback && oo, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? F(t, "pointerdown", this._onTapStart) : (F(t, "mousedown", this._onTapStart), F(t, "touchstart", this._onTapStart)), this.nativeDraggable && (F(t, "dragover", this), F(t, "dragenter", this)), Me.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), At(this, eo());
}
function Ee(t, e, n, o, a, r, i, c) {
var u, v, s = t[yt], g = s.options.onMove;
return !window.CustomEvent || Ht || ve ? (u = document.createEvent("Event")).initEvent("move", !0, !0) : u = new CustomEvent("move", { bubbles: !0, cancelable: !0 }), u.to = e, u.from = t, u.dragged = n, u.draggedRect = o, u.related = a || e, u.relatedRect = r || K(e), u.willInsertAfter = c, u.originalEvent = i, t.dispatchEvent(u), g && (v = g.call(s, u, i)), v;
}
function Ye(t) {
t.draggable = !1;
}
function ro() {
Ze = !1;
}
function io(t) {
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, n = e.length, o = 0; n--; ) o += e.charCodeAt(n);
return o.toString(36);
}
function xe(t) {
return setTimeout(t, 0);
}
function je(t) {
return clearTimeout(t);
}
S.prototype = { constructor: S, _isOutsideThisEl: function(t) {
this.el.contains(t) || t === this.el || (Qt = null);
}, _getDirection: function(t, e) {
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, f) : this.options.direction;
}, _onTapStart: function(t) {
if (t.cancelable) {
var e = this, n = this.el, o = this.options, a = o.preventOnFilter, r = t.type, i = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, c = (i || t).target, u = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || c, v = o.filter;
if (function(s) {
Se.length = 0;
for (var g = s.getElementsByTagName("input"), C = g.length; C--; ) {
var b = g[C];
b.checked && Se.push(b);
}
}(n), !f && !(/mousedown|pointerdown/.test(r) && t.button !== 0 || o.disabled) && !u.isContentEditable && (this.nativeDraggable || !ce || !c || c.tagName.toUpperCase() !== "SELECT") && !((c = Ot(c, o.draggable, n, !1)) && c.animated || De === c)) {
if (ee = Et(c), de = Et(c, o.draggable), typeof v == "function") {
if (v.call(this, t, c, this)) return st({ sortable: e, rootEl: u, name: "filter", targetEl: c, toEl: n, fromEl: n }), pt("filter", e, { evt: t }), void (a && t.cancelable && t.preventDefault());
} else if (v && (v = v.split(",").some(function(s) {
if (s = Ot(u, s.trim(), n, !1)) return st({ sortable: e, rootEl: s, name: "filter", targetEl: c, fromEl: n, toEl: n }), pt("filter", e, { evt: t }), !0;
}))) return void (a && t.cancelable && t.preventDefault());
o.handle && !Ot(u, o.handle, n, !1) || this._prepareDragStart(t, i, c);
}
}
}, _prepareDragStart: function(t, e, n) {
var o, a = this, r = a.el, i = a.options, c = r.ownerDocument;
if (n && !f && n.parentNode === r) {
var u = K(n);
if (Y = r, q = (f = n).parentNode, Kt = f.nextSibling, De = n, be = i.group, S.dragged = f, Wt = { target: f, clientX: (e || t).clientX, clientY: (e || t).clientY }, vn = Wt.clientX - u.left, mn = Wt.clientY - u.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, f.style["will-change"] = "all", o = function() {
pt("delayEnded", a, { evt: t }), S.eventCanceled ? a._onDrop() : (a._disableDelayedDragEvents(), !sn && a.nativeDraggable && (f.draggable = !0), a._triggerDragStart(t, e), st({ sortable: a, name: "choose", originalEvent: t }), bt(f, i.chosenClass, !0));
}, i.ignore.split(",").forEach(function(v) {
un(f, v.trim(), Ye);
}), F(c, "dragover", Vt), F(c, "mousemove", Vt), F(c, "touchmove", Vt), F(c, "mouseup", a._onDrop), F(c, "touchend", a._onDrop), F(c, "touchcancel", a._onDrop), sn && this.nativeDraggable && (this.options.touchStartThreshold = 4, f.draggable = !0), pt("delayStart", this, { evt: t }), !i.delay || i.delayOnTouchOnly && !e || this.nativeDraggable && (ve || Ht)) o();
else {
if (S.eventCanceled) return void this._onDrop();
F(c, "mouseup", a._disableDelayedDrag), F(c, "touchend", a._disableDelayedDrag), F(c, "touchcancel", a._disableDelayedDrag), F(c, "mousemove", a._delayedDragTouchMoveHandler), F(c, "touchmove", a._delayedDragTouchMoveHandler), i.supportPointer && F(c, "pointermove", a._delayedDragTouchMoveHandler), a._dragStartTimer = setTimeout(o, i.delay);
}
}
}, _delayedDragTouchMoveHandler: function(t) {
var e = t.touches ? t.touches[0] : t;
Math.max(Math.abs(e.clientX - this._lastX), Math.abs(e.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
}, _disableDelayedDrag: function() {
f && Ye(f), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
}, _disableDelayedDragEvents: function() {
var t = this.el.ownerDocument;
N(t, "mouseup", this._disableDelayedDrag), N(t, "touchend", this._disableDelayedDrag), N(t, "touchcancel", this._disableDelayedDrag), N(t, "mousemove", this._delayedDragTouchMoveHandler), N(t, "touchmove", this._delayedDragTouchMoveHandler), N(t, "pointermove", this._delayedDragTouchMoveHandler);
}, _triggerDragStart: function(t, e) {
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? F(document, "pointermove", this._onTouchMove) : F(document, e ? "touchmove" : "mousemove", this._onTouchMove) : (F(f, "dragend", this), F(Y, "dragstart", this._onDragStart));
try {
document.selection ? xe(function() {
document.selection.empty();
}) : window.getSelection().removeAllRanges();
} catch {
}
}, _dragStarted: function(t, e) {
if (te = !1, Y && f) {
pt("dragStarted", this, { evt: e }), this.nativeDraggable && F(document, "dragover", ao);
var n = this.options;
!t && bt(f, n.dragClass, !1), bt(f, n.ghostClass, !0), S.active = this, t && this._appendGhost(), st({ sortable: this, name: "start", originalEvent: e });
} else this._nulling();
}, _emulateDragOver: function() {
if (Ct) {
this._lastX = Ct.clientX, this._lastY = Ct.clientY, Rn();
for (var t = document.elementFromPoint(Ct.clientX, Ct.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(Ct.clientX, Ct.clientY)) !== e; ) e = t;
if (f.parentNode[yt]._isOutsideThisEl(t), e) do {
if (e[yt] && e[yt]._onDragOver({ clientX: Ct.clientX, clientY: Ct.clientY, target: t, rootEl: e }) && !this.options.dragoverBubble)
break;
t = e;
} while (e = e.parentNode);
In();
}
}, _onTouchMove: function(t) {
if (Wt) {
var e = this.options, n = e.fallbackTolerance, o = e.fallbackOffset, a = t.touches ? t.touches[0] : t, r = x && ne(x, !0), i = x && r && r.a, c = x && r && r.d, u = Te && ot && hn(ot), v = (a.clientX - Wt.clientX + o.x) / (i || 1) + (u ? u[0] - Xe[0] : 0) / (i || 1), s = (a.clientY - Wt.clientY + o.y) / (c || 1) + (u ? u[1] - Xe[1] : 0) / (c || 1);
if (!S.active && !te) {
if (n && Math.max(Math.abs(a.clientX - this._lastX), Math.abs(a.clientY - this._lastY)) < n) return;
this._onDragStart(t, !0);
}
if (x) {
r ? (r.e += v - (ze || 0), r.f += s - (Le || 0)) : r = { a: 1, b: 0, c: 0, d: 1, e: v, f: s };
var g = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
T(x, "webkitTransform", g), T(x, "mozTransform", g), T(x, "msTransform", g), T(x, "transform", g), ze = v, Le = s, Ct = a;
}
t.cancelable && t.preventDefault();
}
}, _appendGhost: function() {
if (!x) {
var t = this.options.fallbackOnBody ? document.body : Y, e = K(f, !0, Te, !0, t), n = this.options;
if (Te) {
for (ot = t; T(ot, "position") === "static" && T(ot, "transform") === "none" && ot !== document; ) ot = ot.parentNode;
ot !== document.body && ot !== document.documentElement ? (ot === document && (ot = It()), e.top += ot.scrollTop, e.left += ot.scrollLeft) : ot = It(), Xe = hn(ot);
}
bt(x = f.cloneNode(!0), n.ghostClass, !1), bt(x, n.fallbackClass, !0), bt(x, n.dragClass, !0), T(x, "transition", ""), T(x, "transform", ""), T(x, "box-sizing", "border-box"), T(x, "margin", 0), T(x, "top", e.top), T(x, "left", e.left), T(x, "width", e.width), T(x, "height", e.height), T(x, "opacity", "0.8"), T(x, "position", Te ? "absolute" : "fixed"), T(x, "zIndex", "100000"), T(x, "pointerEvents", "none"), S.ghost = x, t.appendChild(x), T(x, "transform-origin", vn / parseInt(x.style.width) * 100 + "% " + mn / parseInt(x.style.height) * 100 + "%");
}
}, _onDragStart: function(t, e) {
var n = this, o = t.dataTransfer, a = n.options;
pt("dragStart", this, { evt: t }), S.eventCanceled ? this._onDrop() : (pt("setupClone", this), S.eventCanceled || (($ = pn(f)).removeAttribute("id"), $.draggable = !1, $.style["will-change"] = "", this._hideClone(), bt($, this.options.chosenClass, !1), S.clone = $), n.cloneId = xe(function() {
pt("clone", n), S.eventCanceled || (n.options.removeCloneOnHide || Y.insertBefore($, f), n._hideClone(), st({ sortable: n, name: "clone" }));
}), !e && bt(f, a.dragClass, !0), e ? (Pe = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (N(document, "mouseup", n._onDrop), N(document, "touchend", n._onDrop), N(document, "touchcancel", n._onDrop), o && (o.effectAllowed = "move", a.setData && a.setData.call(n, o, f)), F(document, "drop", n), T(f, "transform", "translateZ(0)")), te = !0, n._dragStartId = xe(n._dragStarted.bind(n, e, t)), F(document, "selectstart", n), ie = !0, ce && T(document.body, "user-select", "none"));
}, _onDragOver: function(t) {
var e, n, o, a, r = this.el, i = t.target, c = this.options, u = c.group, v = S.active, s = be === u, g = c.sort, C = tt || v, b = this, X = !1;
if (!Ze) {
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = Ot(i, c.draggable, r, !0), gt("dragOver"), S.eventCanceled) return X;
if (f.contains(t.target) || i.animated && i.animatingX && i.animatingY || b._ignoreWhileAnimating === i) return it(!1);
if (Pe = !1, v && !c.disabled && (s ? g || (o = q !== Y) : tt === this || (this.lastPutMode = be.checkPull(this, v, f, t)) && u.checkPut(this, v, f, t))) {
if (a = this._getDirection(t, i) === "vertical", e = K(f), gt("dragOverValid"), S.eventCanceled) return X;
if (o) return q = Y, _t(), this._hideClone(), gt("revert"), S.eventCanceled || (Kt ? Y.insertBefore(f, Kt) : Y.appendChild(f)), it(!0);
var R = Je(r, c.draggable);
if (!R || function(k, Q, H) {
var W = K(Je(H.el, H.options.draggable)), dt = fn(H.el, H.options, x), j = 10;
return Q ? k.clientX > dt.right + j || k.clientY > W.bottom && k.clientX > W.left : k.clientY > dt.bottom + j || k.clientX > W.right && k.clientY > W.top;
}(t, a, this) && !R.animated) {
if (R === f) return it(!1);
if (R && r === t.target && (i = R), i && (n = K(i)), Ee(Y, r, f, e, i, n, t, !!i) !== !1) return _t(), R && R.nextSibling ? r.insertBefore(f, R.nextSibling) : r.appendChild(f), q = r, Pt(), it(!0);
} else if (R && function(k, Q, H) {
var W = K(oe(H.el, 0, H.options, !0)), dt = fn(H.el, H.options, x), j = 10;
return Q ? k.clientX < dt.left - j || k.clientY < W.top && k.clientX < W.right : k.clientY < dt.top - j || k.clientY < W.bottom && k.clientX < W.left;
}(t, a, this)) {
var P = oe(r, 0, c, !0);
if (P === f) return it(!1);
if (n = K(i = P), Ee(Y, r, f, e, i, n, t, !1) !== !1) return _t(), r.insertBefore(f, P), q = r, Pt(), it(!0);
} else if (i.parentNode === r) {
n = K(i);
var Z, vt, et, at = f.parentNode !== r, kt = !function(k, Q, H) {
var W = H ? k.left : k.top, dt = H ? k.right : k.bottom, j = H ? k.width : k.height, Lt = H ? Q.left : Q.top, Jt = H ? Q.right : Q.bottom, ht = H ? Q.width : Q.height;
return W === Lt || dt === Jt || W + j / 2 === Lt + ht / 2;
}(f.animated && f.toRect || e, i.animated && i.toRect || n, a), zt = a ? "top" : "left", rt = dn(i, "top", "top") || dn(f, "top", "top"), Tt = rt ? rt.scrollTop : void 0;
if (Qt !== i && (vt = n[zt], re = !1, ye = !kt && c.invertSwap || at), Z = function(k, Q, H, W, dt, j, Lt, Jt) {
var ht = W ? k.clientY : k.clientX, Dt = W ? H.height : H.width, l = W ? H.top : H.left, h = W ? H.bottom : H.right, d = !1;
if (!Lt) {
if (Jt && we < Dt * dt) {
if (!re && (ae === 1 ? ht > l + Dt * j / 2 : ht < h - Dt * j / 2) && (re = !0), re) d = !0;
else if (ae === 1 ? ht < l + we : ht > h - we) return -ae;
} else if (ht > l + Dt * (1 - dt) / 2 && ht < h - Dt * (1 - dt) / 2) return function(_) {
return Et(f) < Et(_) ? 1 : -1;
}(Q);
}
return (d = d || Lt) && (ht < l + Dt * j / 2 || ht > h - Dt * j / 2) ? ht > l + Dt / 2 ? 1 : -1 : 0;
}(t, i, n, a, kt ? 1 : c.swapThreshold, c.invertedSwapThreshold == null ? c.swapThreshold : c.invertedSwapThreshold, ye, Qt === i), Z !== 0) {
var U = Et(f);
do
U -= Z, et = q.children[U];
while (et && (T(et, "display") === "none" || et === x));
}
if (Z === 0 || et === i) return it(!1);
Qt = i, ae = Z;
var mt = i.nextElementSibling, z = !1, ut = Ee(Y, r, f, e, i, n, t, z = Z === 1);
if (ut !== !1) return ut !== 1 && ut !== -1 || (z = ut === 1), Ze = !0, setTimeout(ro, 30), _t(), z && !mt ? r.appendChild(f) : i.parentNode.insertBefore(f, z ? mt : i), rt && On(rt, 0, Tt - rt.scrollTop), q = f.parentNode, vt === void 0 || ye || (we = Math.abs(vt - K(i)[zt])), Pt(), it(!0);
}
if (r.contains(f)) return it(!1);
}
return !1;
}
function gt(k, Q) {
pt(k, b, Rt({ evt: t, isOwner: s, axis: a ? "vertical" : "horizontal", revert: o, dragRect: e, targetRect: n, canSort: g, fromSortable: C, target: i, completed: it, onMove: function(H, W) {
return Ee(Y, r, f, e, H, K(H), t, W);
}, changed: Pt }, Q));
}
function _t() {
gt("dragOverAnimationCapture"), b.captureAnimationState(), b !== C && C.captureAnimationState();
}
function it(k) {
return gt("dragOverCompleted", { insertion: k }), k && (s ? v._hideClone() : v._showClone(b), b !== C && (bt(f, tt ? tt.options.ghostClass : v.options.ghostClass, !1), bt(f, c.ghostClass, !0)), tt !== b && b !== S.active ? tt = b : b === S.active && tt && (tt = null), C === b && (b._ignoreWhileAnimating = i), b.animateAll(function() {
gt("dragOverAnimationComplete"), b._ignoreWhileAnimating = null;
}), b !== C && (C.animateAll(), C._ignoreWhileAnimating = null)), (i === f && !f.animated || i === r && !i.animated) && (Qt = null), c.dragoverBubble || t.rootEl || i === document || (f.parentNode[yt]._isOutsideThisEl(t.target), !k && Vt(t)), !c.dragoverBubble && t.stopPropagation && t.stopPropagation(), X = !0;
}
function Pt() {
wt = Et(f), Yt = Et(f, c.draggable), st({ sortable: b, name: "change", toEl: r, newIndex: wt, newDraggableIndex: Yt, originalEvent: t });
}
}, _ignoreWhileAnimating: null, _offMoveEvents: function() {
N(document, "mousemove", this._onTouchMove), N(document, "touchmove", this._onTouchMove), N(document, "pointermove", this._onTouchMove), N(document, "dragover", Vt), N(document, "mousemove", Vt), N(document, "touchmove", Vt);
}, _offUpEvents: function() {
var t = this.el.ownerDocument;
N(t, "mouseup", this._onDrop), N(t, "touchend", this._onDrop), N(t, "pointerup", this._onDrop), N(t, "touchcancel", this._onDrop), N(document, "selectstart", this);
}, _onDrop: function(t) {
var e = this.el, n = this.options;
wt = Et(f), Yt = Et(f, n.draggable), pt("drop", this, { evt: t }), q = f && f.parentNode, wt = Et(f), Yt = Et(f, n.draggable), S.eventCanceled || (te = !1, ye = !1, re = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), je(this.cloneId), je(this._dragStartId), this.nativeDraggable && (N(document, "drop", this), N(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ce && T(document.body, "user-select", ""), T(f, "transform", ""), t && (ie && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), x && x.parentNode && x.parentNode.removeChild(x), (Y === q || tt && tt.lastPutMode !== "clone") && $ && $.parentNode && $.parentNode.removeChild($), f && (this.nativeDraggable && N(f, "dragend", this), Ye(f), f.style["will-change"] = "", ie && !te && bt(f, tt ? tt.options.ghostClass : this.options.ghostClass, !1), bt(f, this.options.chosenClass, !1), st({ sortable: this, name: "unchoose", toEl: q, newIndex: null, newDraggableIndex: null, originalEvent: t }), Y !== q ? (wt >= 0 && (st({ rootEl: q, name: "add", toEl: q, fromEl: Y, originalEvent: t }), st({ sortable: this, name: "remove", toEl: q, originalEvent: t }), st({ rootEl: q, name: "sort", toEl: q, fromEl: Y, originalEvent: t }), st({ sortable: this, name: "sort", toEl: q, originalEvent: t })), tt && tt.save()) : wt !== ee && wt >= 0 && (st({ sortable: this, name: "update", toEl: q, originalEvent: t }), st({ sortable: this, name: "sort", toEl: q, originalEvent: t })), S.active && (wt != null && wt !== -1 || (wt = ee, Yt = de), st({ sortable: this, name: "end", toEl: q, originalEvent: t }), this.save())))), this._nulling();
}, _nulling: function() {
pt("nulling", this), Y = f = q = x = Kt = $ = De = jt = Wt = Ct = ie = wt = Yt = ee = de = Qt = ae = tt = be = S.dragged = S.ghost = S.clone = S.active = null, Se.forEach(function(t) {
t.checked = !0;
}), Se.length = ze = Le = 0;
}, handleEvent: function(t) {
switch (t.type) {
case "drop":
case "dragend":
this._onDrop(t);
break;
case "dragenter":
case "dragover":
f && (this._onDragOver(t), function(e) {
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
}(t));
break;
case "selectstart":
t.preventDefault();
}
}, toArray: function() {
for (var t, e = [], n = this.el.children, o = 0, a = n.length, r = this.options; o < a; o++) Ot(t = n[o], r.draggable, this.el, !1) && e.push(t.getAttribute(r.dataIdAttr) || io(t));
return e;
}, sort: function(t, e) {
var n = {}, o = this.el;
this.toArray().forEach(function(a, r) {
var i = o.children[r];
Ot(i, this.options.draggable, o, !1) && (n[a] = i);
}, this), e && this.captureAnimationState(), t.forEach(function(a) {
n[a] && (o.removeChild(n[a]), o.appendChild(n[a]));
}), e && this.animateAll();
}, save: function() {
var t = this.options.store;
t && t.set && t.set(this);
}, closest: function(t, e) {
return Ot(t, e || this.options.draggable, this.el, !1);
}, option: function(t, e) {
var n = this.options;
if (e === void 0) return n[t];
var o = pe.modifyOption(this, t, e);
n[t] = o !== void 0 ? o : e, t === "group" && Nn(n);
}, destroy: function() {
pt("destroy", this);
var t = this.el;
t[yt] = null, N(t, "mousedown", this._onTapStart), N(t, "touchstart", this._onTapStart), N(t, "pointerdown", this._onTapStart), this.nativeDraggable && (N(t, "dragover", this), N(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
e.removeAttribute("draggable");
}), this._onDrop(), this._disableDelayedDragEvents(), Me.splice(Me.indexOf(this.el), 1), this.el = t = null;
}, _hideClone: function() {
if (!jt) {
if (pt("hideClone", this), S.eventCanceled) return;
T($, "display", "none"), this.options.removeCloneOnHide && $.parentNode && $.parentNode.removeChild($), jt = !0;
}
}, _showClone: function(t) {
if (t.lastPutMode === "clone") {
if (jt) {
if (pt("showClone", this), S.eventCanceled) return;
f.parentNode != Y || this.options.group.revertClone ? Kt ? Y.insertBefore($, Kt) : Y.appendChild($) : Y.insertBefore($, f), this.options.group.revertClone && this.animate(f, $), T($, "display", ""), jt = !1;
}
} else this._hideClone();
} }, Re && F(document, "touchmove", function(t) {
(S.active || te) && t.cancelable && t.preventDefault();
}), S.utils = { on: F, off: N, css: T, find: un, is: function(t, e) {
return !!Ot(t, e, t, !1);
}, extend: function(t, e) {
if (t && e) for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
return t;
}, throttle: Cn, closest: Ot, toggleClass: bt, clone: pn, index: Et, nextTick: xe, cancelNextTick: je, detectDirection: Mn, getChild: oe }, S.get = function(t) {
return t[yt];
}, S.mount = function() {
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
e[0].constructor === Array && (e = e[0]), e.forEach(function(o) {
if (!o.prototype || !o.prototype.constructor) throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
o.utils && (S.utils = Rt(Rt({}, S.utils), o.utils)), pe.mount(o);
});
}, S.create = function(t, e) {
return new S(t, e);
}, S.version = "1.15.2";
var le, Qe, qe, $e, Ne, se, G = [], tn = !1;
function Ce() {
G.forEach(function(t) {
clearInterval(t.pid);
}), G = [];
}
function bn() {
clearInterval(se);
}
var We = Cn(function(t, e, n, o) {
if (e.scroll) {
var a, r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, c = e.scrollSensitivity, u = e.scrollSpeed, v = It(), s = !1;
Qe !== n && (Qe = n, Ce(), le = e.scroll, a = e.scrollFn, le === !0 && (le = qt(n, !0)));
var g = 0, C = le;
do {
var b = C, X = K(b), R = X.top, P = X.bottom, Z = X.left, vt = X.right, et = X.width, at = X.height, kt = void 0, zt = void 0, rt = b.scrollWidth, Tt = b.scrollHeight, U = T(b), mt = b.scrollLeft, z = b.scrollTop;
b === v ? (kt = et < rt && (U.overflowX === "auto" || U.overflowX === "scroll" || U.overflowX === "visible"), zt = at < Tt && (U.overflowY === "auto" || U.overflowY === "scroll" || U.overflowY === "visible")) : (kt = et < rt && (U.overflowX === "auto" || U.overflowX === "scroll"), zt = at < Tt && (U.overflowY === "auto" || U.overflowY === "scroll"));
var ut = kt && (Math.abs(vt - r) <= c && mt + et < rt) - (Math.abs(Z - r) <= c && !!mt), gt = zt && (Math.abs(P - i) <= c && z + at < Tt) - (Math.abs(R - i) <= c && !!z);
if (!G[g]) for (var _t = 0; _t <= g; _t++) G[_t] || (G[_t] = {});
G[g].vx == ut && G[g].vy == gt && G[g].el === b || (G[g].el = b, G[g].vx = ut, G[g].vy = gt, clearInterval(G[g].pid), ut == 0 && gt == 0 || (s = !0, G[g].pid = setInterval((function() {
o && this.layer === 0 && S.active._onTouchMove(Ne);
var it = G[this.layer].vy ? G[this.layer].vy * u : 0, Pt = G[this.layer].vx ? G[this.layer].vx * u : 0;
typeof a == "function" && a.call(S.dragged.parentNode[yt], Pt, it, t, Ne, G[this.layer].el) !== "continue" || On(G[this.layer].el, Pt, it);
}).bind({ layer: g }), 24))), g++;
} while (e.bubbleScroll && C !== v && (C = qt(C, !1)));
tn = s;
}
}, 30), wn = function(t) {
var e = t.originalEvent, n = t.putSortable, o = t.dragEl, a = t.activeSortable, r = t.dispatchSortableEvent, i = t.hideGhostForTarget, c = t.unhideGhostForTarget;
if (e) {
var u = n || a;
i();
var v = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, s = document.elementFromPoint(v.clientX, v.clientY);
c(), u && !u.el.contains(s) && (r("spill"), this.onSpill({ dragEl: o, putSortable: n }));
}
};
function Ve() {
}
function Ge() {
}
function lo(t, e, n = {}) {
let o;
const { document: a = Jn, ...r } = n, i = { onUpdate: (s) => {
(function(g, C, b) {
const X = Hn(g), R = X ? [...Be(g)] : Be(g);
if (b >= 0 && b < R.length) {
const P = R.splice(C, 1)[0];
Ut(() => {
R.splice(b, 0, P), X && (g.value = R);
});
}
})(e, s.oldIndex, s.newIndex);
} }, c = () => {
const s = typeof t == "string" ? a == null ? void 0 : a.querySelector(t) : function(g) {
var C;
const b = Be(g);
return (C = b == null ? void 0 : b.$el) != null ? C : b;
}(t);
s && o === void 0 && (o = new S(s, { ...i, ...r }));
}, u = () => {
o == null || o.destroy(), o = void 0;
};
var v;
return Un(c), v = u, Bn() && Fn(v), { stop: u, start: c, option: (s, g) => {
if (g === void 0) return o == null ? void 0 : o.option(s);
o == null || o.option(s, g);
} };
}
function so() {
var n;
const t = nn("MaProTableOptions"), { renderPlugins: e = [] } = ((n = t == null ? void 0 : t.value) == null ? void 0 : n.provider) ?? { renderPlugins: [] };
return { getPluginByName: (o) => e.find((a) => a.name === o), getPlugins: () => e, addPlugin: (o) => {
e.find((a) => a.name === o.name) || e.push(o);
}, removePlugin: (o) => {
const a = e.findIndex((r) => r.name === o);
a !== -1 && e.splice(a, 1);
} };
}
Ve.prototype = { startIndex: null, dragStart: function(t) {
var e = t.oldDraggableIndex;
this.startIndex = e;
}, onSpill: function(t) {
var e = t.dragEl, n = t.putSortable;
this.sortable.captureAnimationState(), n && n.captureAnimationState();
var o = oe(this.sortable.el, this.startIndex, this.options);
o ? this.sortable.el.insertBefore(e, o) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
}, drop: wn }, At(Ve, { pluginName: "revertOnSpill" }), Ge.prototype = { onSpill: function(t) {
var e = t.dragEl, n = t.putSortable || this.sortable;
n.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), n.animateAll();
}, drop: wn }, At(Ge, { pluginName: "removeOnSpill" }), S.mount(new function() {
function t() {
for (var e in this.defaults = { scroll: !0, forceAutoScrollFallback: !1, scrollSensitivity: 30, scrollSpeed: 10, bubbleScroll: !0 }, this) e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
}
return t.prototype = { dragStarted: function(e) {
var n = e.originalEvent;
this.sortable.nativeDraggable ? F(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? F(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? F(document, "touchmove", this._handleFallbackAutoScroll) : F(document, "mousemove", this._handleFallbackAutoScroll);
}, dragOverCompleted: function(e) {
var n = e.originalEvent;
this.options.dragOverBubble || n.rootEl || this._handleAutoScroll(n);
}, drop: function() {
this.sortable.nativeDraggable ? N(document, "dragover", this._handleAutoScroll) : (N(document, "pointermove", this._handleFallbackAutoScroll), N(document, "touchmove", this._handleFallbackAutoScroll), N(document, "mousemove", this._handleFallbackAutoScroll)), bn(), Ce(), clearTimeout(ue), ue = void 0;
}, nulling: function() {
Ne = Qe = le = tn = se = qe = $e = null, G.length = 0;
}, _handleFallbackAutoScroll: function(e) {
this._handleAutoScroll(e, !0);
}, _handleAutoScroll: function(e, n) {
var o = this, a = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, i = document.elementFromPoint(a, r);
if (Ne = e, n || this.options.forceAutoScrollFallback || ve || Ht || ce) {
We(e, this.options, i, n);
var c = qt(i, !0);
!tn || se && a === qe && r === $e || (se && bn(), se = setInterval(function() {
var u = qt(document.elementFromPoint(a, r), !0);
u !== c && (c = u, Ce()), We(e, o.options, u, n);
}, 10), qe = a, $e = r);
} else {
if (!this.options.bubbleScroll || qt(i, !0) === It()) return void Ce();
We(e, this.options, qt(i, !1), !1);
}
} }, At(t, { pluginName: "scroll", initializeByDefault: !0 });
}()), S.mount(Ge, Ve);
const $t = (t, e) => {
const n = t.__vccOpts || t;
for (const [o, a] of e) n[o] = a;
return n;
}, co = { xmlns: "http://www.w3.org/2000/svg", width: "1.3em", height: "1.3em", viewBox: "0 0 24 24" }, uo = $t({ name: "IcBaselineDragIndicator" }, [["render", function(t, e, n, o, a, r) {
return ft(), Ft("svg", co, e[0] || (e[0] = [St("path", { fill: "currentColor", d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2s.9-2 2-2s2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2" }, null, -1)]));
}]]), ho = { xmlns: "http://www.w3.org/2000/svg", width: "1.3em", height: "1.3em", viewBox: "0 0 24 24" }, yn = $t({ name: "RiMoreLine" }, [["render", function(t, e, n, o, a, r) {
return ft(), Ft("svg", ho, e[0] || (e[0] = [St("path", { fill: "currentColor", d: "M4.5 10.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S6 12.825 6 12s-.675-1.5-1.5-1.5m15 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S21 12.825 21 12s-.675-1.5-1.5-1.5m-7.5 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5s1.5-.675 1.5-1.5s-.675-1.5-1.5-1.5" }, null, -1)]));
}]]);
function _e(t) {
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !qn(t);
}
const Sn = fe({ name: "MaProTable", props: { options: { type: Object, default: () => ({ tableOptions: {}, searchOptions: {}, searchFormOptions: {} }) }, schema: { type: Object, default: () => ({ searchItems: [], tableColumns: [] }) } }, emits: ["row-drag-sort", "search-submit", "search-reset"], setup(t, { slots: e, emit: n, expose: o }) {
var Lt, Jt, ht, Dt;
const a = nn("MaProTableOptions"), r = ge(() => {
const l = [];
return rn(a.value.prov