quick-admin-vue3-core
Version:
以快(计算机执行效率、开发效率)为核心的后台管理系统开发模板
1,372 lines • 85.7 kB
JavaScript
import { onActivated as yo, defineComponent as Re, mergeDefaults as Ue, computed as _e, resolveComponent as be, createElementBlock as pe, openBlock as M, Fragment as Le, renderList as He, createBlock as Z, defineAsyncComponent as Wt, inject as fn, mergeProps as he, unref as _, withCtx as Q, createVNode as Ae, ref as le, reactive as qe, resolveDirective as Yn, withDirectives as jn, createSlots as Hn, renderSlot as Se, resolveDynamicComponent as wo, createCommentVNode as Ie, createTextVNode as bt, toDisplayString as yt, normalizeClass as Ct, watch as Tt, withKeys as So, createElementVNode as qt, normalizeStyle as _o, isRef as rt, useSlots as Eo, onMounted as Do, normalizeProps as pn, guardReactiveProps as hn } from "vue";
import { s as Co, c as Qe, a as To, h as Ao, _ as Wn, g as Po, b as Gt, e as Oo, o as mn, p as gn, t as vn, f as bn, i as Bo, j as Fo, k as No, l as Io, m as ko, n as Mo, q as yn, r as Ro } from "./platform-DsTwHxm6.js";
import { g as qn, a as wn, b as et, d as Gn, u as xo, c as $o } from "./index-C0qRtkRj.js";
import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
import { s as zo, p as Lo, a as Vo, r as Xo, b as Un, m as Yo } from "./index-D-KS7NhM.js";
import { s as jo, o as At, g as Ho, d as Qn, a as Wo, b as qo, c as Go, e as Uo } from "./_config-BPwT698v.js";
import { u as Qo } from "./index-KDj-4JiF.js";
/* empty css */
import { _ as Ko } from "./Column.vue_vue_type_script_setup_true_lang-CYhJp1rY.js";
import { F as Jo } from "./Index-h9FbLr36.js";
import { _ as Zo } from "./Index.vue_vue_type_script_setup_true_lang-C2wcd99b.js";
import { u as er } from "./event-DRbgA5Jd.js";
import { u as tr } from "./form-attrs-Ddm3tVIR.js";
import { g as nr, a as or } from "./_utils-CpYRDY0G.js";
const rr = () => {
let o = null, e = 0;
function n(t, r) {
let i = t.target;
if (r && (i = i.querySelector(r)), !i) return;
const { scrollTop: a } = i;
!o && (o = i), e = a;
}
return yo(() => {
o == null || o.scrollTo(0, e);
}), {
handleScroll: n
};
}, ir = { class: "extra-btns f-fs-fs-w" };
var Nn, In;
const ar = /* @__PURE__ */ Re({
__name: "ExtraBtns",
props: /* @__PURE__ */ Ue({
btns: {},
isStand: { type: Boolean }
}, {
btns: () => [],
isStand: !0,
...(In = (Nn = Qe) == null ? void 0 : Nn.BaseCrud) == null ? void 0 : In.ExtraBtns
}),
emits: ["click"],
setup(o, { emit: e }) {
const n = o, t = e, r = _e(() => {
const { isStand: i, btns: a } = n;
return Co(i ? a : a.map((l) => qn(l)));
});
return (i, a) => {
const l = be("BaseBtn");
return M(), pe("div", ir, [
(M(!0), pe(Le, null, He(r.value, (u, s) => (M(), Z(l, {
tpl: u,
isStand: "",
onClick: a[0] || (a[0] = (...f) => t("click", ...f)),
key: s
}, null, 8, ["tpl"]))), 128))
]);
};
}
}), lr = /* @__PURE__ */ dt(ar, [["__scopeId", "data-v-507043ae"]]), sr = { class: "set-btns" };
var kn, Mn;
const ur = /* @__PURE__ */ Re({
__name: "Index",
props: /* @__PURE__ */ Ue({
cols: {},
originCols: {},
toolBtns: {},
disabled: { type: Boolean }
}, {
cols: () => [],
originCols: () => [],
toolBtns: () => ["print", "set"],
// "set" "print",
...(Mn = (kn = Qe) == null ? void 0 : kn.BaseCrud) == null ? void 0 : Mn.SetBtns
}),
emits: ["update:cols"],
setup(o, { emit: e }) {
const n = Wt(() => import("./SetPrint-07es23Qq.js")), t = Wt(() => import("./SetTable-ILrADnvY.js")), i = {
print: {
name: "print",
title: "打印",
show: !!Qo().vipLevel,
attrs: {
type: "primary",
icon: Lo,
plain: !0,
circle: !0
}
},
set: {
name: "set",
title: "设置",
show: !0,
attrs: {
type: "primary",
icon: zo,
plain: !0,
circle: !0
}
}
}, a = e, l = fn("openPopup"), u = fn("closePopup"), s = o, f = _e({
get: () => s.cols,
set: (E) => a("update:cols", E)
}), d = _e(() => s.toolBtns.map((E) => i[E]).filter((E) => E.show));
function v(E) {
var R;
const C = {
set: () => g(),
print: () => l("打印设置", n)
};
(R = C[E]) == null || R.call(C);
}
function g() {
const E = f.value.map((C) => {
const { prop: R, label: T, type: N, sortable: z = !1, visible: G, exportable: U } = C;
return {
hidden: jo.includes(N),
colProp: R,
label: T,
visible: G,
exportable: U,
sortable: !!z
};
});
l(
{ title: "列设置", closeOnClickModal: !0 },
[
t,
{
rows: E,
onChange: b,
onSubmit: y,
onReset: $
}
],
"drawer"
);
}
function b({ type: E, isTrue: C, rowInd: R }) {
const T = f.value[R];
if (T[E] = C, E === "sortable") {
const { width: N } = T;
T.width = Number(N) + 16 * (C ? 1 : -1);
}
}
function y() {
u();
}
function $() {
f.value = JSON.parse(JSON.stringify(s.originCols));
}
return (E, C) => {
const R = be("el-button"), T = be("el-tooltip");
return M(), pe("div", sr, [
(M(!0), pe(Le, null, He(d.value, (N, z) => (M(), Z(T, he({
content: N.title,
ref_for: !0
}, _(To), { key: z }), {
default: Q(() => [
Ae(R, he({
disabled: E.disabled,
onClick: (G) => v(N.name),
ref_for: !0
}, N.attrs), null, 16, ["disabled", "onClick"])
]),
_: 2
}, 1040, ["content"]))), 128))
]);
};
}
}), dr = /* @__PURE__ */ dt(ur, [["__scopeId", "data-v-de7969e6"]]);
var Rn, xn;
const cr = /* @__PURE__ */ Re({
__name: "QueryTable",
props: /* @__PURE__ */ Ue({
cols: {},
data: {},
operateBtns: { type: [Array, Function] },
operateBtnsAttrs: {},
disabled: { type: Boolean },
loading: { type: Boolean },
showSummary: { type: Boolean },
currPage: {},
pageSize: {},
handleAuth: { type: Function },
refreshList: { type: Function },
summaryMethod: { type: Function }
}, {
cols: () => [],
data: () => [],
summaryMethod: Ao,
...(xn = (Rn = Qe) == null ? void 0 : Rn.BaseCrud) == null ? void 0 : xn.QueryTable
}),
emits: ["update:cols", "selectionChange", At, "change"],
setup(o, { expose: e, emit: n }) {
const t = o, r = n, { handleScroll: i } = rr();
let a = t.showSummary ? 2 : 1;
const l = le(null), u = le([]), s = qe(
Ho(
t,
(g, b) => {
a += g - 1, r("update:cols", b);
},
!0
)
), f = _e(() => {
const { showSummary: g, summaryMethod: b } = t;
return Object.assign(
{
maxHeight: `calc(100% + ${a * 40}px)`,
cellClassName(y) {
const { row: $, column: E, rowIndex: C, columnIndex: R } = y;
if (E.type === "sort") return "sort-cell";
}
},
Qn,
{ showSummary: g, summaryMethod: b }
);
});
function d(g, { row: b, col: y, $index: $ }, E, C) {
r(At, g, { $index: $, ...b }, E, C);
}
function v(g) {
u.value = g;
const b = g.map((y) => y[f.value.rowKey]);
r("selectionChange", g, b);
}
return e({
tableRef: l
// //全不选
// clearSelection() {
// return tableRef?.value?.clearSelection();
// },
// //全选
// allSelection() {
// return tableRef?.value?.toggleAllSelection();
// },
// //反选
// invertSelection() {
// // console.log(
// // tableRef.value.getSelectionRows(),
// // "点击反选按钮-暴露出来的-----------------"
// // );
// seledRows?.value?.forEach((row, ind) => {
// tableRef?.value?.toggleRowSelection(row, false);
// });
// },
// ...tableRef.value,
}), (g, b) => {
const y = be("BaseEmpty"), $ = be("el-table"), E = Yn("loading");
return jn((M(), Z($, he({
class: "query-table",
data: g.data,
onSelectionChange: v,
onScrollCapture: _(i)
}, f.value, {
ref_key: "tableRef",
ref: l
}), Hn({
default: Q(() => [
(M(!0), pe(Le, null, He(s, (C, R) => (M(), Z(Ko, {
col: C,
disabled: g.disabled,
refreshList: g.refreshList,
operateBtnsAttrs: g.operateBtnsAttrs,
getBtns: (T, N) => _(Wo)(T, N, t),
onOperateBtns: d,
key: R
}, {
custom: Q(({ row: T, col: N, $index: z }) => [
Se(g.$slots, "custom", he({ ref_for: !0 }, { row: T, col: N, $index: z }), void 0, !0)
]),
"children-custom": Q(({ row: T, col: N, $index: z }) => [
Se(g.$slots, "children-custom", he({ ref_for: !0 }, { row: T, col: N, $index: z }), void 0, !0)
]),
_: 2
}, 1032, ["col", "disabled", "refreshList", "operateBtnsAttrs", "getBtns"]))), 128))
]),
_: 2
}, [
g.loading ? void 0 : {
name: "empty",
fn: Q(() => [
Ae(y)
]),
key: "0"
}
]), 1040, ["data", "onScrollCapture"])), [
[E, g.loading]
]);
};
}
}), fr = /* @__PURE__ */ dt(cr, [["__scopeId", "data-v-65b56304"]]), Sn = /* @__PURE__ */ Re({
__name: "QueryFields",
props: {
modelValue: { default: () => qe({}) },
field: {},
disabled: { type: Boolean },
readonly: { type: Boolean },
inputDebounce: { type: Boolean },
layoutType: {}
},
emits: ["update:modelValue", "change", "blur", "focus"],
setup(o, { emit: e }) {
const n = o, t = e;
let r = _e({
get: () => n.modelValue,
set: (a) => t("update:modelValue", a)
});
function i(a) {
return a.attrs ? a.attrs.style = "width:100%" : a.attrs = { style: "width:100%" }, a;
}
return (a, l) => {
var u, s, f, d;
return M(), Z(wo(a.layoutType === "flex" ? Jo : Zo), {
modelValue: _(r)[a.field.prop],
"onUpdate:modelValue": l[0] || (l[0] = (v) => _(r)[a.field.prop] = v),
class: "form-item",
field: i(a.field),
colAttrs: a.layoutType === "flex" ? void 0 : { class: "query-field-item" },
disabled: ((s = (u = a.field) == null ? void 0 : u.attrs) == null ? void 0 : s.disabled) ?? a.disabled,
readonly: ((d = (f = a.field) == null ? void 0 : f.attrs) == null ? void 0 : d.readonly) ?? a.readonly,
inputDebounce: a.inputDebounce,
onBlur: l[1] || (l[1] = (...v) => t("blur", ...v)),
onFocus: l[2] || (l[2] = (...v) => t("focus", ...v)),
onChange: l[3] || (l[3] = (...v) => t("change", ...v))
}, {
custom: Q(({ field: v }) => [
Se(a.$slots, "custom", { field: v })
]),
_: 3
}, 40, ["modelValue", "field", "colAttrs", "disabled", "readonly", "inputDebounce"]);
};
}
}), _n = /* @__PURE__ */ Re({
__name: "QueryBtns",
props: {
isFold: { type: Boolean, default: !0 },
loading: { type: Boolean },
showFoldBtn: { type: Boolean }
},
emits: ["submit", "reset", "fold"],
setup(o, { emit: e }) {
const n = e;
return (t, r) => {
const i = be("el-button"), a = be("el-icon"), l = be("el-col"), u = Yn("debounce");
return M(), Z(l, { class: "query-btns f-fe-fs ml-a" }, {
default: Q(() => [
jn((M(), Z(i, {
type: "primary",
icon: _(Vo),
disabled: t.loading,
loading: t.loading
}, {
default: Q(() => [
bt(yt(t.$t("base.button.search")), 1)
]),
_: 1
}, 8, ["icon", "disabled", "loading"])), [
[
u,
() => n("submit"),
void 0,
{ immediate: !0 }
]
]),
Ae(i, {
icon: _(Xo),
onClick: r[0] || (r[0] = (s) => n("reset")),
disabled: t.loading
}, {
default: Q(() => [
bt(yt(t.$t("base.button.reset")), 1)
]),
_: 1
}, 8, ["icon", "disabled"]),
t.showFoldBtn ? (M(), Z(i, {
key: 0,
onClick: r[1] || (r[1] = (s) => n("fold")),
text: "",
type: "primary"
}, {
icon: Q(() => [
Ae(a, {
class: Ct(["icon-fold", { "rotate-180": !t.isFold }])
}, {
default: Q(() => [
Ae(_(Un))
]),
_: 1
}, 8, ["class"])
]),
default: Q(() => [
bt(" " + yt(t.isFold ? t.$t("base.button.unfold") : t.$t("base.button.fold")), 1)
]),
_: 1
})) : Ie("", !0)
]),
_: 1
});
};
}
}), pr = { class: "sec-fields f-fs-fs-w f-1" };
var $n, zn;
const hr = /* @__PURE__ */ Re({
__name: "Index",
props: /* @__PURE__ */ Ue({
modelValue: {},
fields: {},
sections: {},
loading: { type: Boolean },
disabled: { type: Boolean },
readonly: { type: Boolean },
rowNum: {},
extraParams: {},
inputDebounce: { type: Boolean },
grid: {},
showWhenNoFields: { type: Boolean },
sectionFoldable: { type: Boolean },
layoutType: {},
afterReset: { type: Function }
}, {
layoutType: "grid",
rowNum: 2,
fields: () => [],
modelValue: () => qe({}),
sectionFoldable: !0,
...(zn = ($n = Qe) == null ? void 0 : $n.BaseCrud) == null ? void 0 : zn.QueryForm
}),
emits: ["update:modelValue", "submit", "change", "ready"],
setup(o, { expose: e, emit: n }) {
var G, U;
const { merge: t } = Wn, r = o, i = n, a = le(), l = le(T()), u = le(!0), s = qe(
((G = r == null ? void 0 : r.sections) == null ? void 0 : G.map((p) => {
var m;
return ((m = p == null ? void 0 : p.fields) == null ? void 0 : m.length) ?? 0 <= l.value, !1;
})) ?? []
), f = le([]), d = le([]);
function v(p) {
if (!u.value) return;
const { sections: m, rowNum: P } = r;
if (!m) return l.value > 1 ? l.value * P - 1 : 1 * P;
const L = d.value.length;
if (L > P) return l.value - (p === P - 1 ? 1 : 0);
const A = p === L - 1;
return l.value > 1 ? l.value - (A ? 1 : 0) : 1;
}
function g(p) {
return p === d.value.length - 1 ? l.value - 1 : l.value;
}
const b = _e(() => {
const { sections: p, rowNum: m } = r;
if (p) {
const P = d.value.map((A, x) => {
const k = x === d.value.length - 1;
return A.fields.length <= l.value - (k ? 1 : 0) ? 1 : 2;
});
let L = 0;
for (let A = 0; A < P.length; A++)
if (L += P[A], L > m) return !0;
return !1;
} else
return f.value.length > l.value * m - 1;
}), y = _e({
get: () => r.modelValue,
set: (p) => i("update:modelValue", p)
});
let $ = !0;
Tt(
() => r.fields,
(p, m) => {
var X;
if ((X = r.sections) != null && X.length) return;
const { modelValue: P, grid: L } = r, A = wn(p, P, { quickAttrs: { grid: et(L) } }, "query"), { data: x, fields: k } = A;
f.value = k, t(y.value, x), $ && (i("ready"), $ = !1);
},
{ immediate: !0, deep: !0, once: !!((U = r == null ? void 0 : r.sections) != null && U.length) }
), Tt(
() => r.sections,
(p) => {
if (!(p != null && p.length)) return d.value = [];
const { modelValue: m } = r;
d.value = p.map((P) => {
const { fields: L } = P, A = wn(L, m, void 0, "query"), { data: x, fields: k } = A;
return P.fields = k, t(y.value, x), P;
}) ?? [], $ && (i("ready"), $ = !1);
},
{ immediate: !0, deep: !0, once: !r.sections }
), er("resize", () => l.value = T(), !0);
const { size: E } = tr();
function C() {
const { rowNum: p } = r, P = { small: 28, default: 40, large: 50 }[E];
return u.value ? (l.value > 1 ? p : p + 1) * P + "px" : "35vh";
}
function R(p) {
var X;
const { disabled: m, readonly: P, inputDebounce: L, layoutType: A, grid: x } = r, k = { field: p, disabled: m, readonly: P, layoutType: A, inputDebounce: L };
if (A === "grid")
k.grid = et(((X = p == null ? void 0 : p.quickAttrs) == null ? void 0 : X.grid) ?? x);
else if (A === "flex")
Object.assign(k, { class: "f-1", style: { maxWidth: "350px", min: "300px" } });
else
throw new Error(`暂不支持此类型:${A}`);
return k;
}
function T() {
const { grid: p } = r, m = et(p), P = {}, L = Po();
for (const A in m)
P[A] = 24 / m[A];
return P[L];
}
function N() {
const p = a.value;
p && p.validate((m, P) => {
if (!m) {
const A = Object.values(P)[0][0];
return Gt(A == null ? void 0 : A.message, "error");
}
const { extraParams: L } = r;
i("submit", t({}, L, y.value));
});
}
function z() {
var p, m;
(p = a.value) == null || p.resetFields(), (m = r.afterReset) == null || m.call(r);
}
return e({
formRef: a,
getFields() {
var p;
return (p = r.sections) != null && p.length ? d.value.map((m) => m.fields).flat(1) : f.value;
}
}), (p, m) => {
const P = be("el-icon"), L = be("el-button"), A = be("el-form");
return f.value.length || d.value.length || p.showWhenNoFields ? (M(), Z(A, he({
key: 0,
class: "query-form",
model: y.value
}, _(Gn), {
onKeyup: So(N, ["enter"]),
ref_key: "formRef",
ref: a
}), {
default: Q(() => [
qt("div", {
class: Ct(["wrap-box all-hide-scroll", { "f-fs-fs-w": !d.value.length }]),
style: _o({ maxHeight: C() })
}, [
d.value.length ? (M(!0), pe(Le, { key: 0 }, He(d.value.slice(0, u.value ? p.rowNum : void 0), (x, k) => (M(), pe("div", {
class: "f-fs-fs",
key: k
}, [
Ae(L, {
class: "f-0",
onClick: (X) => s[k] = !s[k],
text: "",
type: "info",
disabled: !p.sectionFoldable || s[k] === void 0
}, Hn({
default: Q(() => [
bt(" " + yt(x.title), 1)
]),
_: 2
}, [
p.sectionFoldable ? {
name: "icon",
fn: Q(() => [
Ae(P, {
class: Ct(["icon-fold", { "rotate-180": !s[k] && !s[k] }])
}, {
default: Q(() => [
s[k] === void 0 ? (M(), Z(_(Yo), { key: 0 })) : (M(), Z(_(Un), { key: 1 }))
]),
_: 2
}, 1032, ["class"])
]),
key: "0"
} : void 0
]), 1032, ["onClick", "disabled"]),
qt("div", pr, [
(M(!0), pe(Le, null, He(x.fields.slice(0, s[k] ? g(k) : v(k)), (X, Ee) => (M(), Z(Sn, he({
modelValue: y.value,
"onUpdate:modelValue": m[0] || (m[0] = (ue) => y.value = ue),
ref_for: !0
}, R(X), {
onChange: m[1] || (m[1] = (ue, Ke) => i("change", { [Ke]: ue })),
key: Ee
}), {
custom: Q(({ field: ue }) => [
Se(p.$slots, "custom", { field: ue }, void 0, !0)
]),
_: 2
}, 1040, ["modelValue"]))), 128)),
(d.value.length <= p.rowNum ? k === d.value.length - 1 : u.value ? k === p.rowNum - 1 : k === d.value.length - 1) ? (M(), Z(_n, he({
key: 0,
loading: p.loading,
isFold: u.value,
showFoldBtn: b.value,
onFold: m[2] || (m[2] = (X) => u.value = !u.value),
onSubmit: N,
onReset: z,
ref_for: !0
}, _(et)(p.grid)), null, 16, ["loading", "isFold", "showFoldBtn"])) : Ie("", !0)
])
]))), 128)) : (M(), pe(Le, { key: 1 }, [
(M(!0), pe(Le, null, He(f.value.slice(0, v()), (x, k) => (M(), Z(Sn, he({
modelValue: y.value,
"onUpdate:modelValue": m[3] || (m[3] = (X) => y.value = X),
ref_for: !0
}, R(x), {
onChange: m[4] || (m[4] = (X, Ee) => i("change", { [Ee]: X })),
key: k
}), {
custom: Q(({ field: X }) => [
Se(p.$slots, "custom", { field: X }, void 0, !0)
]),
_: 2
}, 1040, ["modelValue"]))), 128)),
Ae(_n, he({
loading: p.loading,
isFold: u.value,
showFoldBtn: b.value,
onFold: m[5] || (m[5] = (x) => u.value = !u.value),
onSubmit: N,
onReset: z
}, _(et)(p.grid)), null, 16, ["loading", "isFold", "showFoldBtn"])
], 64))
], 6)
]),
_: 3
}, 16, ["model"])) : Ie("", !0);
};
}
}), mr = /* @__PURE__ */ dt(hr, [["__scopeId", "data-v-80fff670"]]);
/**!
* Sortable 1.15.6
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function En(o, e) {
var n = Object.keys(o);
if (Object.getOwnPropertySymbols) {
var t = Object.getOwnPropertySymbols(o);
e && (t = t.filter(function(r) {
return Object.getOwnPropertyDescriptor(o, r).enumerable;
})), n.push.apply(n, t);
}
return n;
}
function Ce(o) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e] != null ? arguments[e] : {};
e % 2 ? En(Object(n), !0).forEach(function(t) {
gr(o, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(n)) : En(Object(n)).forEach(function(t) {
Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return o;
}
function wt(o) {
"@babel/helpers - typeof";
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? wt = function(e) {
return typeof e;
} : wt = function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, wt(o);
}
function gr(o, e, n) {
return e in o ? Object.defineProperty(o, e, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : o[e] = n, o;
}
function Oe() {
return Oe = Object.assign || function(o) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e];
for (var t in n)
Object.prototype.hasOwnProperty.call(n, t) && (o[t] = n[t]);
}
return o;
}, Oe.apply(this, arguments);
}
function vr(o, e) {
if (o == null) return {};
var n = {}, t = Object.keys(o), r, i;
for (i = 0; i < t.length; i++)
r = t[i], !(e.indexOf(r) >= 0) && (n[r] = o[r]);
return n;
}
function br(o, e) {
if (o == null) return {};
var n = vr(o, e), t, r;
if (Object.getOwnPropertySymbols) {
var i = Object.getOwnPropertySymbols(o);
for (r = 0; r < i.length; r++)
t = i[r], !(e.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(o, t) && (n[t] = o[t]);
}
return n;
}
var yr = "1.15.6";
function Pe(o) {
if (typeof window < "u" && window.navigator)
return !!/* @__PURE__ */ navigator.userAgent.match(o);
}
var Be = Pe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ct = Pe(/Edge/i), Dn = Pe(/firefox/i), it = Pe(/safari/i) && !Pe(/chrome/i) && !Pe(/android/i), Zt = Pe(/iP(ad|od|hone)/i), Kn = Pe(/chrome/i) && Pe(/android/i), Jn = {
capture: !1,
passive: !1
};
function F(o, e, n) {
o.addEventListener(e, n, !Be && Jn);
}
function B(o, e, n) {
o.removeEventListener(e, n, !Be && Jn);
}
function Pt(o, e) {
if (e) {
if (e[0] === ">" && (e = e.substring(1)), o)
try {
if (o.matches)
return o.matches(e);
if (o.msMatchesSelector)
return o.msMatchesSelector(e);
if (o.webkitMatchesSelector)
return o.webkitMatchesSelector(e);
} catch {
return !1;
}
return !1;
}
}
function Zn(o) {
return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
}
function we(o, e, n, t) {
if (o) {
n = n || document;
do {
if (e != null && (e[0] === ">" ? o.parentNode === n && Pt(o, e) : Pt(o, e)) || t && o === n)
return o;
if (o === n) break;
} while (o = Zn(o));
}
return null;
}
var Cn = /\s+/g;
function ce(o, e, n) {
if (o && e)
if (o.classList)
o.classList[n ? "add" : "remove"](e);
else {
var t = (" " + o.className + " ").replace(Cn, " ").replace(" " + e + " ", " ");
o.className = (t + (n ? " " + e : "")).replace(Cn, " ");
}
}
function w(o, e, n) {
var t = o && o.style;
if (t) {
if (n === void 0)
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (n = o.currentStyle), e === void 0 ? n : n[e];
!(e in t) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), t[e] = n + (typeof n == "string" ? "" : "px");
}
}
function We(o, e) {
var n = "";
if (typeof o == "string")
n = o;
else
do {
var t = w(o, "transform");
t && t !== "none" && (n = t + " " + n);
} while (!e && (o = o.parentNode));
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
return r && new r(n);
}
function eo(o, e, n) {
if (o) {
var t = o.getElementsByTagName(e), r = 0, i = t.length;
if (n)
for (; r < i; r++)
n(t[r], r);
return t;
}
return [];
}
function De() {
var o = document.scrollingElement;
return o || document.documentElement;
}
function J(o, e, n, t, r) {
if (!(!o.getBoundingClientRect && o !== window)) {
var i, a, l, u, s, f, d;
if (o !== window && o.parentNode && o !== De() ? (i = o.getBoundingClientRect(), a = i.top, l = i.left, u = i.bottom, s = i.right, f = i.height, d = i.width) : (a = 0, l = 0, u = window.innerHeight, s = window.innerWidth, f = window.innerHeight, d = window.innerWidth), (e || n) && o !== window && (r = r || o.parentNode, !Be))
do
if (r && r.getBoundingClientRect && (w(r, "transform") !== "none" || n && w(r, "position") !== "static")) {
var v = r.getBoundingClientRect();
a -= v.top + parseInt(w(r, "border-top-width")), l -= v.left + parseInt(w(r, "border-left-width")), u = a + i.height, s = l + i.width;
break;
}
while (r = r.parentNode);
if (t && o !== window) {
var g = We(r || o), b = g && g.a, y = g && g.d;
g && (a /= y, l /= b, d /= b, f /= y, u = a + f, s = l + d);
}
return {
top: a,
left: l,
bottom: u,
right: s,
width: d,
height: f
};
}
}
function Tn(o, e, n) {
for (var t = Me(o, !0), r = J(o)[e]; t; ) {
var i = J(t)[n], a = void 0;
if (a = r >= i, !a) return t;
if (t === De()) break;
t = Me(t, !1);
}
return !1;
}
function Ge(o, e, n, t) {
for (var r = 0, i = 0, a = o.children; i < a.length; ) {
if (a[i].style.display !== "none" && a[i] !== S.ghost && (t || a[i] !== S.dragged) && we(a[i], n.draggable, o, !1)) {
if (r === e)
return a[i];
r++;
}
i++;
}
return null;
}
function en(o, e) {
for (var n = o.lastElementChild; n && (n === S.ghost || w(n, "display") === "none" || e && !Pt(n, e)); )
n = n.previousElementSibling;
return n || null;
}
function ve(o, e) {
var n = 0;
if (!o || !o.parentNode)
return -1;
for (; o = o.previousElementSibling; )
o.nodeName.toUpperCase() !== "TEMPLATE" && o !== S.clone && (!e || Pt(o, e)) && n++;
return n;
}
function An(o) {
var e = 0, n = 0, t = De();
if (o)
do {
var r = We(o), i = r.a, a = r.d;
e += o.scrollLeft * i, n += o.scrollTop * a;
} while (o !== t && (o = o.parentNode));
return [e, n];
}
function wr(o, e) {
for (var n in o)
if (o.hasOwnProperty(n)) {
for (var t in e)
if (e.hasOwnProperty(t) && e[t] === o[n][t]) return Number(n);
}
return -1;
}
function Me(o, e) {
if (!o || !o.getBoundingClientRect) return De();
var n = o, t = !1;
do
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
var r = w(n);
if (n.clientWidth < n.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
if (!n.getBoundingClientRect || n === document.body) return De();
if (t || e) return n;
t = !0;
}
}
while (n = n.parentNode);
return De();
}
function Sr(o, e) {
if (o && e)
for (var n in e)
e.hasOwnProperty(n) && (o[n] = e[n]);
return o;
}
function xt(o, e) {
return Math.round(o.top) === Math.round(e.top) && Math.round(o.left) === Math.round(e.left) && Math.round(o.height) === Math.round(e.height) && Math.round(o.width) === Math.round(e.width);
}
var at;
function to(o, e) {
return function() {
if (!at) {
var n = arguments, t = this;
n.length === 1 ? o.call(t, n[0]) : o.apply(t, n), at = setTimeout(function() {
at = void 0;
}, e);
}
};
}
function _r() {
clearTimeout(at), at = void 0;
}
function no(o, e, n) {
o.scrollLeft += e, o.scrollTop += n;
}
function oo(o) {
var e = window.Polymer, n = window.jQuery || window.Zepto;
return e && e.dom ? e.dom(o).cloneNode(!0) : n ? n(o).clone(!0)[0] : o.cloneNode(!0);
}
function ro(o, e, n) {
var t = {};
return Array.from(o.children).forEach(function(r) {
var i, a, l, u;
if (!(!we(r, e.draggable, o, !1) || r.animated || r === n)) {
var s = J(r);
t.left = Math.min((i = t.left) !== null && i !== void 0 ? i : 1 / 0, s.left), t.top = Math.min((a = t.top) !== null && a !== void 0 ? a : 1 / 0, s.top), t.right = Math.max((l = t.right) !== null && l !== void 0 ? l : -1 / 0, s.right), t.bottom = Math.max((u = t.bottom) !== null && u !== void 0 ? u : -1 / 0, s.bottom);
}
}), t.width = t.right - t.left, t.height = t.bottom - t.top, t.x = t.left, t.y = t.top, t;
}
var se = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
function Er() {
var o = [], e;
return {
captureAnimationState: function() {
if (o = [], !!this.options.animation) {
var t = [].slice.call(this.el.children);
t.forEach(function(r) {
if (!(w(r, "display") === "none" || r === S.ghost)) {
o.push({
target: r,
rect: J(r)
});
var i = Ce({}, o[o.length - 1].rect);
if (r.thisAnimationDuration) {
var a = We(r, !0);
a && (i.top -= a.f, i.left -= a.e);
}
r.fromRect = i;
}
});
}
},
addAnimationState: function(t) {
o.push(t);
},
removeAnimationState: function(t) {
o.splice(wr(o, {
target: t
}), 1);
},
animateAll: function(t) {
var r = this;
if (!this.options.animation) {
clearTimeout(e), typeof t == "function" && t();
return;
}
var i = !1, a = 0;
o.forEach(function(l) {
var u = 0, s = l.target, f = s.fromRect, d = J(s), v = s.prevFromRect, g = s.prevToRect, b = l.rect, y = We(s, !0);
y && (d.top -= y.f, d.left -= y.e), s.toRect = d, s.thisAnimationDuration && xt(v, d) && !xt(f, d) && // Make sure animatingRect is on line between toRect & fromRect
(b.top - d.top) / (b.left - d.left) === (f.top - d.top) / (f.left - d.left) && (u = Cr(b, v, g, r.options)), xt(d, f) || (s.prevFromRect = f, s.prevToRect = d, u || (u = r.options.animation), r.animate(s, b, d, u)), u && (i = !0, a = Math.max(a, u), clearTimeout(s.animationResetTimer), s.animationResetTimer = setTimeout(function() {
s.animationTime = 0, s.prevFromRect = null, s.fromRect = null, s.prevToRect = null, s.thisAnimationDuration = null;
}, u), s.thisAnimationDuration = u);
}), clearTimeout(e), i ? e = setTimeout(function() {
typeof t == "function" && t();
}, a) : typeof t == "function" && t(), o = [];
},
animate: function(t, r, i, a) {
if (a) {
w(t, "transition", ""), w(t, "transform", "");
var l = We(this.el), u = l && l.a, s = l && l.d, f = (r.left - i.left) / (u || 1), d = (r.top - i.top) / (s || 1);
t.animatingX = !!f, t.animatingY = !!d, w(t, "transform", "translate3d(" + f + "px," + d + "px,0)"), this.forRepaintDummy = Dr(t), w(t, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), w(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
w(t, "transition", ""), w(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
}, a);
}
}
};
}
function Dr(o) {
return o.offsetWidth;
}
function Cr(o, e, n, t) {
return Math.sqrt(Math.pow(e.top - o.top, 2) + Math.pow(e.left - o.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * t.animation;
}
var Ve = [], $t = {
initializeByDefault: !0
}, ft = {
mount: function(e) {
for (var n in $t)
$t.hasOwnProperty(n) && !(n in e) && (e[n] = $t[n]);
Ve.forEach(function(t) {
if (t.pluginName === e.pluginName)
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
}), Ve.push(e);
},
pluginEvent: function(e, n, t) {
var r = this;
this.eventCanceled = !1, t.cancel = function() {
r.eventCanceled = !0;
};
var i = e + "Global";
Ve.forEach(function(a) {
n[a.pluginName] && (n[a.pluginName][i] && n[a.pluginName][i](Ce({
sortable: n
}, t)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](Ce({
sortable: n
}, t)));
});
},
initializePlugins: function(e, n, t, r) {
Ve.forEach(function(l) {
var u = l.pluginName;
if (!(!e.options[u] && !l.initializeByDefault)) {
var s = new l(e, n, e.options);
s.sortable = e, s.options = e.options, e[u] = s, Oe(t, s.defaults);
}
});
for (var i in e.options)
if (e.options.hasOwnProperty(i)) {
var a = this.modifyOption(e, i, e.options[i]);
typeof a < "u" && (e.options[i] = a);
}
},
getEventProperties: function(e, n) {
var t = {};
return Ve.forEach(function(r) {
typeof r.eventProperties == "function" && Oe(t, r.eventProperties.call(n[r.pluginName], e));
}), t;
},
modifyOption: function(e, n, t) {
var r;
return Ve.forEach(function(i) {
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[n] == "function" && (r = i.optionListeners[n].call(e[i.pluginName], t));
}), r;
}
};
function Tr(o) {
var e = o.sortable, n = o.rootEl, t = o.name, r = o.targetEl, i = o.cloneEl, a = o.toEl, l = o.fromEl, u = o.oldIndex, s = o.newIndex, f = o.oldDraggableIndex, d = o.newDraggableIndex, v = o.originalEvent, g = o.putSortable, b = o.extraEventProperties;
if (e = e || n && n[se], !!e) {
var y, $ = e.options, E = "on" + t.charAt(0).toUpperCase() + t.substr(1);
window.CustomEvent && !Be && !ct ? y = new CustomEvent(t, {
bubbles: !0,
cancelable: !0
}) : (y = document.createEvent("Event"), y.initEvent(t, !0, !0)), y.to = a || n, y.from = l || n, y.item = r || n, y.clone = i, y.oldIndex = u, y.newIndex = s, y.oldDraggableIndex = f, y.newDraggableIndex = d, y.originalEvent = v, y.pullMode = g ? g.lastPutMode : void 0;
var C = Ce(Ce({}, b), ft.getEventProperties(t, e));
for (var R in C)
y[R] = C[R];
n && n.dispatchEvent(y), $[E] && $[E].call(e, y);
}
}
var Ar = ["evt"], ae = function(e, n) {
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = t.evt, i = br(t, Ar);
ft.pluginEvent.bind(S)(e, n, Ce({
dragEl: c,
parentEl: q,
ghostEl: D,
rootEl: H,
nextEl: ze,
lastDownEl: St,
cloneEl: W,
cloneHidden: ke,
dragStarted: tt,
putSortable: ne,
activeSortable: S.active,
originalEvent: r,
oldIndex: je,
oldDraggableIndex: lt,
newIndex: fe,
newDraggableIndex: Ne,
hideGhostForTarget: so,
unhideGhostForTarget: uo,
cloneNowHidden: function() {
ke = !0;
},
cloneNowShown: function() {
ke = !1;
},
dispatchSortableEvent: function(l) {
ie({
sortable: n,
name: l,
originalEvent: r
});
}
}, i));
};
function ie(o) {
Tr(Ce({
putSortable: ne,
cloneEl: W,
targetEl: c,
rootEl: H,
oldIndex: je,
oldDraggableIndex: lt,
newIndex: fe,
newDraggableIndex: Ne
}, o));
}
var c, q, D, H, ze, St, W, ke, je, fe, lt, Ne, ht, ne, Ye = !1, Ot = !1, Bt = [], xe, ye, zt, Lt, Pn, On, tt, Xe, st, ut = !1, mt = !1, _t, re, Vt = [], Ut = !1, Ft = [], It = typeof document < "u", gt = Zt, Bn = ct || Be ? "cssFloat" : "float", Pr = It && !Kn && !Zt && "draggable" in document.createElement("div"), io = function() {
if (It) {
if (Be)
return !1;
var o = document.createElement("x");
return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
}
}(), ao = function(e, n) {
var t = w(e), r = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), i = Ge(e, 0, n), a = Ge(e, 1, n), l = i && w(i), u = a && w(a), s = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + J(i).width, f = u && parseInt(u.marginLeft) + parseInt(u.marginRight) + J(a).width;
if (t.display === "flex")
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
if (t.display === "grid")
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
if (i && l.float && l.float !== "none") {
var d = l.float === "left" ? "left" : "right";
return a && (u.clear === "both" || u.clear === d) ? "vertical" : "horizontal";
}
return i && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || s >= r && t[Bn] === "none" || a && t[Bn] === "none" && s + f > r) ? "vertical" : "horizontal";
}, Or = function(e, n, t) {
var r = t ? e.left : e.top, i = t ? e.right : e.bottom, a = t ? e.width : e.height, l = t ? n.left : n.top, u = t ? n.right : n.bottom, s = t ? n.width : n.height;
return r === l || i === u || r + a / 2 === l + s / 2;
}, Br = function(e, n) {
var t;
return Bt.some(function(r) {
var i = r[se].options.emptyInsertThreshold;
if (!(!i || en(r))) {
var a = J(r), l = e >= a.left - i && e <= a.right + i, u = n >= a.top - i && n <= a.bottom + i;
if (l && u)
return t = r;
}
}), t;
}, lo = function(e) {
function n(i, a) {
return function(l, u, s, f) {
var d = l.options.group.name && u.options.group.name && l.options.group.name === u.options.group.name;
if (i == null && (a || d))
return !0;
if (i == null || i === !1)
return !1;
if (a && i === "clone")
return i;
if (typeof i == "function")
return n(i(l, u, s, f), a)(l, u, s, f);
var v = (a ? l : u).options.group.name;
return i === !0 || typeof i == "string" && i === v || i.join && i.indexOf(v) > -1;
};
}
var t = {}, r = e.group;
(!r || wt(r) != "object") && (r = {
name: r
}), t.name = r.name, t.checkPull = n(r.pull, !0), t.checkPut = n(r.put), t.revertClone = r.revertClone, e.group = t;
}, so = function() {
!io && D && w(D, "display", "none");
}, uo = function() {
!io && D && w(D, "display", "");
};
It && !Kn && document.addEventListener("click", function(o) {
if (Ot)
return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), Ot = !1, !1;
}, !0);
var $e = function(e) {
if (c) {
e = e.touches ? e.touches[0] : e;
var n = Br(e.clientX, e.clientY);
if (n) {
var t = {};
for (var r in e)
e.hasOwnProperty(r) && (t[r] = e[r]);
t.target = t.rootEl = n, t.preventDefault = void 0, t.stopPropagation = void 0, n[se]._onDragOver(t);
}
}
}, Fr = function(e) {
c && c.parentNode[se]._isOutsideThisEl(e.target);
};
function S(o, e) {
if (!(o && o.nodeType && o.nodeType === 1))
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
this.el = o, this.options = e = Oe({}, e), o[se] = this;
var n = {
group: null,
sort: !0,
disabled: !1,
store: null,
handle: null,
draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
swapThreshold: 1,
// percentage; 0 <= x <= 1
invertSwap: !1,
// invert always
invertedSwapThreshold: null,
// will be set to same as swapThreshold if default
removeCloneOnHide: !0,
direction: function() {
return ao(o, this.options);
},
ghostClass: "sortable-ghost",
chosenClass: "sortable-chosen",
dragClass: "sortable-drag",
ignore: "a, img",
filter: null,
preventOnFilter: !0,
animation: 0,
easing: null,
setData: function(a, l) {
a.setData("Text", l.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
},
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
supportPointer: S.supportPointer !== !1 && "PointerEvent" in window && (!it || Zt),
emptyInsertThreshold: 5
};
ft.initializePlugins(this, o, n);
for (var t in n)
!(t in e) && (e[t] = n[t]);
lo(e);
for (var r in this)
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
this.nativeDraggable = e.forceFallback ? !1 : Pr, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? F(o, "pointerdown", this._onTapStart) : (F(o, "mousedown", this._onTapStart), F(o, "touchstart", this._onTapStart)), this.nativeDraggable && (F(o, "dragover", this), F(o, "dragenter", this)), Bt.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), Oe(this, Er());
}
S.prototype = /** @lends Sortable.prototype */
{
constructor: S,
_isOutsideThisEl: function(e) {
!this.el.contains(e) && e !== this.el && (Xe = null);
},
_getDirection: function(e, n) {
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, c) : this.options.direction;
},
_onTapStart: function(e) {
if (e.cancelable) {
var n = this, t = this.el, r = this.options, i = r.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, u = (l || e).target, s = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || u, f = r.filter;
if (zr(t), !c && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !s.isContentEditable && !(!this.nativeDraggable && it && u && u.tagName.toUpperCase() === "SELECT") && (u = we(u, r.draggable, t, !1), !(u && u.animated) && St !== u)) {
if (je = ve(u), lt = ve(u, r.draggable), typeof f == "function") {
if (f.call(this, e, u, this)) {
ie({
sortable: n,
rootEl: s,
name: "filter",
targetEl: u,
toEl: t,
fromEl: t
}), ae("filter", n, {
evt: e
}), i && e.preventDefault();
return;
}
} else if (f && (f = f.split(",").some(function(d) {
if (d = we(s, d.trim(), t, !1), d)
return ie({
sortable: n,
rootEl: d,
name: "filter",
targetEl: u,
fromEl: t,
toEl: t
}), ae("filter", n, {
evt: e
}), !0;
}), f)) {
i && e.preventDefault();
return;
}
r.handle && !we(s, r.handle, t, !1) || this._prepareDragStart(e, l, u);
}
}
},
_prepareDragStart: function(e, n, t) {
var r = this, i = r.el, a = r.options, l = i.ownerDocument, u;
if (t && !c && t.parentNode === i) {
var s = J(t);
if (H = i, c = t, q = c.parentNode, ze = c.nextSibling, St = t, ht = a.group, S.dragged = c, xe = {
target: c,
clientX: (n || e).clientX,
clientY: (n || e).clientY
}, Pn = xe.clientX - s.left, On = xe.clientY - s.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, c.style["will-change"] = "all", u = function() {
if (ae("delayEnded", r, {
evt: e
}), S.eventCanceled) {
r._onDrop();
return;
}
r._disableDelayedDragEvents(), !Dn && r.nativeDraggable && (c.draggable = !0), r._triggerDragStart(e, n), ie({
sortable: r,
name: "choose",
originalEvent: e
}), ce(c, a.chosenClass, !0);
}, a.ignore.split(",").forEach(function(f) {
eo(c, f.trim(), Xt);
}), F(l, "dragover", $e), F(l, "mousemove", $e), F(l, "touchmove", $e), a.supportPointer ? (F(l, "pointerup", r._onDrop), !this.nativeDraggable && F(l, "pointercancel", r._onDrop)) : (F(l, "mouseup", r._onDrop), F(l, "touchend", r._onDrop), F(l, "touchcancel", r._onDrop)), Dn && this.nativeDraggable && (this.options.touchStartThreshold = 4, c.draggable = !0), ae("delayStart", this, {
evt: e
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(ct || Be))) {
if (S.eventCanceled) {
this._onDrop();
return;
}
a.supportPointer ? (F(l, "pointerup", r._disableDelayedDrag), F(l, "pointercancel", r._disableDelayedDrag)) : (F(l, "mouseup", r._disableDelayedDrag), F(l, "touchend", r._disableDelayedDrag), F(l, "touchcancel", r._disableDelayedDrag)), F(l, "mousemove", r._delayedDragTouchMoveHandler), F(l, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && F(l, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(u, a.delay);
} else
u();
}
},
_delayedDragTouchMoveHandler: function(e) {
var n = e.touches ? e.touches[0] : e;
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
},
_disableDelayedDrag: function() {
c && Xt(c), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
},
_disableDelayedDragEvents: function() {
var e = this.el.ownerDocument;
B(e, "mouseup", this._disableDelayedDrag), B(e, "touchend", this._disableDelayedDrag), B(e, "touchcancel", this._disableDelayedDrag), B(e, "pointerup", this._disableDelayedDrag), B(e, "pointercancel", this._disableDelayedDrag), B(e, "mousemove", this._delayedDragTouchMoveHandler), B(e, "touchmove", this._delayedDragTouchMoveHandler), B(e, "pointermove", this._delayedDragTouchMoveHandler);
},
_triggerDragStart: function(e, n) {
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? F(document, "pointermove", this._onTouchMove) : n ? F(document, "touchmove", this._onTouchMove) : F(document, "mousemove", this._onTouchMove) : (F(c, "dragend", this), F(H, "dragstart", this._onDragStart));
try {
document.selection ? Et(function() {
document.selection.empty();
}) : window.getSelection().removeAllRanges();
} catch {
}
},
_dragStarted: function(e, n) {
if (Ye = !1, H && c) {
ae("dragStarted", this, {
evt: n
}), this.nativeDraggable && F(document, "dragover", Fr);
var t = this.options;
!e && ce(c, t.dragClass, !1), ce(c, t.ghostClass, !0), S.active = this, e && this._appendGhost(), ie({
sortable: this,
name: "start",
originalEvent: n
});
} else
this._nulling();
},
_emulateDragOver: function() {
if (ye) {
this._lastX = ye.clientX, this._lastY = ye.clientY, so();
for (var e = document.elementFromPoint(ye.clientX, ye.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ye.clientX, ye.clientY), e !== n); )
n = e;
if (c.parentNode[se]._isOutsideThisEl(e), n)
do {
if (n[se]) {
var t = void 0;
if (t = n[se]._onDragOver({
clientX: ye.clientX,
clientY: ye.clientY,
target: e,
rootEl: n
}), t && !this.options.dragoverBubble)
break;
}
e = n;
} while (n = Zn(n));
uo();
}
},
_onTouchMove: function(e) {
if (xe) {
var n = this.options, t = n.fallbackTolerance, r = n.fallbackOffset, i = e.touches ? e.touches[0] : e, a = D && We(D, !0), l = D && a && a.a, u = D && a && a.d, s = gt && re &