UNPKG

hk-core-antdv

Version:

Based on Antd Vue3 custom components

1,461 lines 959 kB
var yy = Object.defineProperty; var by = (r, e, t) => e in r ? yy(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t; var at = (r, e, t) => by(r, typeof e != "symbol" ? e + "" : e, t); import { defineComponent as On, reactive as Xr, createVNode as y, Fragment as Ae, resolveComponent as w, withDirectives as wy, vShow as Cy, mergeProps as ve, createTextVNode as re, computed as wc, toRefs as ky, unref as Ct, ref as nu, h as Ty, getCurrentInstance as ra, watch as iu, onMounted as fp, nextTick as dp, onUnmounted as hp, isRef as ds, toRaw as Cc, isVNode as Ro } from "vue"; var _e = /* @__PURE__ */ ((r) => (r.ALL = "ALL", r.TD = "TD", r.YD = "YD", r.TW = "TW", r.LW = "LW", r.TM = "TM", r.LM = "LM", r.TY = "TY", r.LY = "LY", r.CUSTOM = "CUSTOM", r))(_e || {}); const hs = [ { name: "所有", value: _e.ALL }, { name: "今天", value: _e.TD }, { name: "昨天", value: _e.YD }, { name: "本周", value: _e.TW }, { name: "上周", value: _e.LW }, { name: "本月", value: _e.TM }, { name: "上月", value: _e.LM }, { name: "今年", value: _e.TY }, { name: "去年", value: _e.LY }, { name: "自定义", value: _e.CUSTOM } ]; function st(r) { return r == null || r === ""; } function Jt(r, e) { return st(r) ? typeof e == "function" ? e() : e : r; } const _fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, defaultIfEmpty: Jt, isEmpty: st }, Symbol.toStringTag, { value: "Module" })); function xy(r, e) { const t = []; for (let n = 0, i = r.length; n < i; n += e) t.push(r.slice(n, n + e)); return t; } const $fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, sliceByNum: xy }, Symbol.toStringTag, { value: "Module" })), pp = /* @__PURE__ */ On({ name: "DateCheckableTag", // 定义 emit向父组件提交事件 emits: ["tag-change", "custom-date-change"], props: { /** * 显示的tag,如果为空数组,会显示所有 */ tags: { type: Array, required: !1, default: [] }, /*排除的tag*/ excludeTag: { type: Array, required: !1, default: [] }, //默认选择的tag defaultSelect: { type: String, required: !1, default: _e.ALL } }, setup(r, { emit: e }) { const t = Xr({ rangeValue: [], dateTags: r.tags.length > 0 ? hs.filter((n) => r.tags.includes(n.value)) : hs, selectedTags: [], selectedTagsChange: (n) => { t.rangeValue = [], t.selectedTags = [n.value], n.value != _e.CUSTOM && e("tag-change", n); }, rangeChange: (n) => { t.rangeValue = n, e("custom-date-change", { start: n == null ? null : n[0], end: n == null ? null : n[1] }); } }); if (r.excludeTag.length > 0 && (t.dateTags = t.dateTags.filter((n) => !r.excludeTag.includes(n.value))), !st(r.defaultSelect)) { const n = hs.find((i) => i.value == r.defaultSelect); n && t.selectedTagsChange(n); } return () => y(Ae, null, [y(w("a-row"), { style: { "min-height": "32px", "align-items": "center" } }, { default: () => [t.dateTags.map((n, i) => y(w("a-checkable-tag"), { key: i, onChange: () => t.selectedTagsChange(n), checked: t.selectedTags.includes(n.value) }, { default: () => [n.name] })), wy(y(w("a-range-picker"), { value: t.rangeValue, "show-time": !0, valueFormat: "YYYY-MM-DD HH:mm:ss", onChange: (n) => t.rangeChange(n) }, null), [[Cy, t.selectedTags.includes(_e.CUSTOM)]])] })]); } }); class vp { constructor() { at(this, "pageIndex", 1); at(this, "pageSize", 10); /** * 查询排序 */ at(this, "orders", []); } setPageIndex(e) { this.pageIndex = e; } setPageSize(e) { this.pageSize = e; } /** * 根据字段更新查询排序 * @param order */ updateOrder(e) { let t = !1; this.orders.forEach((n) => { n.field == e.field && (n.desc = e.desc, t = !0); }), t || this.orders.push(e); } /** * 指定指定的查询条件 * @param orderField */ removeOrder(e) { this.orders = this.orders.filter((t) => t.field != e); } } class kc extends vp { constructor() { super(...arguments); at(this, "param", { /** * 普通参数查询条件 */ simple: [], /** * 日期范围参数查询条件 */ dateRange: [] }); } /** * 根据 field 更新simple条件的值 * @param condition */ updateSimpleCondition(t) { let n = !1; this.param.simple.forEach((i) => { i.field == t.field && (i.operator = t.operator, i.value = t.value, n = !0); }), n || this.param.simple.push(t); } /** * 删除指定的simple 条件 * @param field */ removeSimpleCondition(t) { this.param.simple.length > 0 && (this.param.simple = this.param.simple.filter((n) => n.field != t)); } /** * 根据 field 更新DateRange条件的值 * @param condition */ updateDateRangeCondition(t) { let n = !1; this.param.dateRange.forEach((i) => { i.field == t.field && (i.range = t.range, i.start = t.start, i.end = t.end, n = !0); }), n || this.param.dateRange.push(t); } /** * 删除日期条件 * @param field */ removeDateRangeCondition(t) { this.param.dateRange.length > 0 && (this.param.dateRange = this.param.dateRange.filter((n) => n.field != t)); } } class Tc { constructor(e, t, n = null, i = null) { /** * range */ at(this, "range"); /** * field */ at(this, "field"); /** * 开始值 */ at(this, "start"); /** * 结束值 */ at(this, "end"); this.range = e, this.field = t, this.start = n, this.end = i; } } var mp = /* @__PURE__ */ ((r) => (r.EQ = "EQ", r.NE = "NE", r.LIKE = "LIKE", r.LIKESTART = "LIKE_START", r.LIKEEND = "LIKE_END", r.LIKEANYWHERE = "LIKE_ANY_WHERE", r.GT = "GT", r.GTE = "GTE", r.LTE = "LTE", r.IN = "IN", r.NOTIN = "NOT_IN", r.ISNULL = "IS_NULL", r.ISNOTNULL = "IS_NOT_NULL", r))(mp || {}); class Ja { constructor(e, t = !1) { /** * 排序字段名 */ at(this, "field"); at(this, "desc", !1); this.field = e, this.desc = t; } static desc(e) { return new Ja(e, !0); } static asc(e) { return new Ja(e, !1); } } class xc { constructor(e, t, n = mp.EQ) { /** * field */ at(this, "field"); /** * operator */ at(this, "operator"); /** * value */ at(this, "value"); this.field = e, this.value = t, this.operator = n; } } class Ec extends vp { constructor() { super(...arguments); at(this, "param", {}); } updateParamValue(t, n) { st(n) ? delete this.param[t] : this.param[t] = n; } } const Ey = 10, Sy = ["10", "20", "50", "100"], My = (r) => `共 ${r} 条记录`; function Dy(r, e = {}) { const t = e.simple, n = e.defaultParams, i = t ? new Ec() : new kc(), a = () => { if (t) throw Error("错误查询类型"); }, o = Xr({ dataSource: [], loading: { spinning: !1, tip: e.tip || "加载中..." }, param: i, pagination: { total: 0, position: e.position || ["bottomCenter"], current: 1, defaultPageSize: Ey, pageSizeOptions: Sy, showTotal: My, showQuickJumper: e.showQuickJumper || !0, showSizeChanger: e.showSizeChanger || !0 }, startLoading: () => { o.loading.spinning = !0; }, stopLoading: () => { o.loading.spinning = !1; }, /** * table change事件,如排序、分页参数变化时回调 * @param pagination 分页参数 * @param filters 过滤条件 * @param sorter 排序 */ tableChange: (s, l, u) => { const c = { ...o.pagination }; c.current = s.current, c.pageSize = s.pageSize, o.pagination = c; const f = Object.assign(t ? new Ec() : new kc(), o.param); return f.setPageIndex(s.current), f.setPageSize(s.pageSize), u.order ? f.updateOrder(new Ja(u.field, u.order === "descend")) : f.removeOrder(u.field), o.loadingData(f); }, /** * 点击查询事件,将 data.param做为条件查询数据 */ searchHandler: () => o.loadingData(o.param), /** * 更新查询参数 * 如果当前使用的是 {@link SimpleQueryModel} ,则调用 updateParamValue * 如果当前使用的是 {@link CompositeQuery} ,则调用 updateParamValue * @param field 字段名 * @param value 字段值 * @param operator 比较符 */ updateParamValue: (s, l, u) => { t ? o.param.updateParamValue(s, l) : st(l) ? o.param.removeSimpleCondition(s) : o.param.updateSimpleCondition(new xc(s, l, u)); }, /** * 当日期控件(DateCheckableTag) 值变化时的事件,将条件添加到 更新 CompositeQuery 对象的 param.dateRange 属性中 * @param field 字段值 * @param dateRange dateRange 是一个对象, {name: '',value: ''} 格式 */ tagChange: (s, l) => { a(), l.value != _e.CUSTOM && l.value != _e.ALL ? o.param.updateDateRangeCondition(new Tc(l.value, s)) : o.param.removeDateRangeCondition(s), console.log(o.param); }, /** * 当日期控件(DateCheckableTag) 值为CUSTOM的事件,将条件添加到 更新 CompositeQuery 对象的 param.dateRange 属性中 * @param field 字段名称 * @param date 日期范围 {start: '',end:''} */ customDateChange: (s, l) => { a(), st(l.start) || st(l.end) ? o.param.removeDateRangeCondition(s) : o.param.updateDateRangeCondition(new Tc( _e.CUSTOM, s, l.start, l.end )); }, addDefaultObjParam: (s, l) => { t ? s.updateParamValue(l.field, l.value) : st(l.value) ? s.removeSimpleCondition(l.field) : s.updateSimpleCondition(new xc(l.field, l.value, l.operator)); }, addDefaultParam: (s) => { n != null && (Array.isArray(n) ? n.forEach((l) => { o.addDefaultObjParam(s, l); }) : o.addDefaultObjParam(s, n)); }, /** * 查询数据,并设置到 dataSource 、 pagination属性中 * @param query 默认为 data.param */ loadingData: async (s = o.param) => r === void 0 || typeof r != "function" ? Promise.reject("queryCall not defined or not a function.") : (o.loading.spinning = !0, o.addDefaultParam(s), r(s).then((l) => (o.pagination.total = l.data.totalRow, o.pagination.current = l.data.pageIndex, o.dataSource = l.data.data, Promise.resolve(l))).catch((l) => Promise.reject(l)).finally(() => { o.loading.spinning = !1; })) }); return o; } const Oy = /* @__PURE__ */ On({ name: "TableList", // 定义一些emit 事件名 emits: ["add-button-click", "upload-button-click", "download-button-click", "loading-data-finish", "loading-data-error"], props: { /** * compositeParam: * {'colSpan': '列span,默认24','label':'显示label',...其它属性参考 DateCheckableTag组件} */ compositeParam: { type: Object, required: !1 }, /** * 表的属性:如 columns、row-selection * data-source 、loading 、change、pagination 不需要,已内置处理 * 更多属性参考: https://www.antdv.com/components/table-cn * { * columns: [{title: "权限名称",dataIndex: "permName", ellipsis: true,width: "50%"}] * row-selection: {type:'checkbox',columnWidth: '10%',fixed:true,hideSelectAll: false} * } */ tableAttrs: { type: Object, required: !0, default: {} }, /** * 列表查询数据方法 */ queryPageCall: { type: Function, required: !0 }, /** * 查询参数: * [{label: "",field: "",component: "Input or Select",attrs: '对应组件的属性,参考antd vue官网对应的组件'}] */ params: { type: Array, required: !1, default: [] }, defaultParam: { type: Object, required: !1 }, searchColSpan: { type: Number, required: !1, default: 6 }, /** * add button 是否显示 */ showAddButton: { type: Boolean, required: !1, default: !0 }, /** * reset button 是否显示 */ showResetButton: { type: Boolean, required: !1, default: !1 }, /** * upload button 是否显示 */ showUploadButton: { type: Boolean, required: !1, default: !1 }, /** * download button 是否显示 */ showDownloadButton: { type: Boolean, required: !1, default: !1 } }, setup(r, { emit: e, slots: t, expose: n }) { const i = st(r.compositeParam), a = Dy(r.queryPageCall, { simple: i, defaultParams: r.defaultParam }); st(r.tableAttrs.rowKey) && (r.tableAttrs.rowKey = (s) => s.id || "key"); const o = Xr({ defaultFormItemAttrs: { labelAlign: "right", labelCol: { span: 4 }, wrapperCol: { span: 18 } }, tableProps: r.tableAttrs, /** * 添加button 单击 */ addButtonClick: () => e("add-button-click"), /** * reset */ resetHandler: () => { r.params.forEach((s) => { delete s.attrs?.value, Array.isArray(s.field) ? s.field.forEach((l) => a.updateParamValue(l, null)) : a.updateParamValue(s.field, null); }), o.searchHandler(); }, searchHandler: () => a.searchHandler().then((s) => { e("loading-data-finish", s); }).catch((s) => { e("loading-data-error", s); }), tableChange: (s, l, u) => a.tableChange(s, l, u).then((c) => { e("loading-data-finish", c); }).catch((c) => { e("loading-data-error", c); }), /** * 当点击了 upload Button的单击事件 */ uploadButtonClick: () => e("upload-button-click"), /** * 当点击了 download Button的单击事件 */ downloadButtonClick: () => e("download-button-click"), formItemCascaderChangeHandler: (s, l) => { const u = l.field; Array.isArray(u) ? s == null || s.length === 0 ? u.forEach((f) => { a.updateParamValue(f, null, l.operator); }) : s.forEach((f, d) => { a.updateParamValue(u[d], f, l.operator); }) : a.updateParamValue(u, s, l.operator); const c = l.attrs || {}; c.value = s, l.attrs = c, l.attrs.change != null && typeof l.attrs.change == "function" && l.attrs.change(s, l); }, customDateChange: (s, l) => { a.customDateChange(s, l); }, tagChange: (s, l) => { a.customDateChange(s, l); }, formItemChangeHandler: (s, l) => { a.updateParamValue(l.field, s, l.operator); const u = l.attrs || {}; u.value = s, l.attrs = u, l.attrs.change != null && typeof l.attrs.change == "function" && l.attrs.change(s, l); }, /** * 加载列表数据, * {@link useQuery#loadingData} */ refreshData: () => a.loadingData().then((s) => { e("loading-data-finish", s); }).catch((s) => { e("loading-data-error", s); }) }); return n({ refreshData: () => o.refreshData(), updateParamValue: a.updateParamValue, startLoading: () => a.startLoading(), stopLoading: () => a.stopLoading() }), o.refreshData(), () => y(Ae, null, [y("div", { className: "search", style: { width: "100%" } }, [t.searchBefore?.(), i ? null : y(w("a-row"), null, { default: () => [y(w("a-col"), { span: r.compositeParam?.colSpan || 24 }, { default: () => [y(w("a-form-item"), { label: r.compositeParam?.label }, { default: () => [y(pp, { tags: r.compositeParam?.tags, excludeTag: r.compositeParam?.excludeTag, defaultSelect: r.compositeParam?.defaultSelect, "onCustom-date-change": (s) => o.customDateChange(r.compositeParam?.field, s), "onTag-change": (s) => o.tagChange(r.compositeParam?.field, s) }, null)] })] })] }), y(w("a-row"), null, { default: () => [r.params.map((s) => y(w("a-col"), { span: r.searchColSpan, key: "search-col-" + s.field }, { default: () => [y(w("a-form-item"), ve({ label: s.label }, Object.assign({}, o.defaultFormItemAttrs, s.formItemAttrs)), { default: () => { switch (s.component) { case "Input": return y(w("a-input"), ve({ "allow-clear": !0, placeholder: Jt(s.placeholder, () => `请输入${s.label}`) }, s.attrs, { onChange: (l) => o.formItemChangeHandler(l.target.value, s) }), null); case "InputNumber": return y(w("a-input-number"), ve({ "allow-clear": !0, placeholder: Jt(s.placeholder, () => `请输入${s.label}`) }, s.attrs, { onChange: (l) => o.formItemChangeHandler(l.target.value, s) }), null); case "Select": return y(w("a-select"), ve({ "allow-clear": !0, placeholder: Jt(s.placeholder, () => `请选择${s.label}`) }, s.attrs, { onChange: (l) => o.formItemChangeHandler(l, s) }), null); case "Cascader": return y(w("a-cascader"), ve({ "allow-clear": !0, placeholder: Jt(s.placeholder, () => `请选择${s.label}`) }, s.attrs, { onChange: (l) => o.formItemCascaderChangeHandler(l, s) }), null); case "TreeSelect": return y(w("a-tree-select"), ve({ "allow-clear": !0, placeholder: Jt(s.placeholder, () => `请选择${s.label}`) }, s.attrs, { onChange: (l) => o.formItemChangeHandler(l, s) }), null); case "TimePicker": return y(w("a-time-picker"), ve({ "allow-clear": !0, placeholder: Jt(s.placeholder, () => `请选择${s.label}`) }, s.attrs, { onChange: (l) => o.formItemChangeHandler(l, s) }), null); case "TimeRangePicker": return y(w("a-time-range-picker"), ve({ "allow-clear": !0, placeholder: Jt(s.placeholder, () => `请选择${s.label}`) }, s.attrs, { onChange: (l) => o.formItemChangeHandler(l, s) }), null); case "DatePicker": return y(w("a-date-picker"), ve({ "allow-clear": !0, valueFormat: s.attrs?.showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD", placeholder: Jt(s.placeholder, () => `请选择${s.label}`) }, s.attrs, { onChange: (l) => o.formItemChangeHandler(l, s) }), null); case "RangePicker": return y(w("a-range-picker"), ve({ "allow-clear": !0, valueFormat: s.attrs?.showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD", placeholder: Jt(s.placeholder, () => [`开始${s.label}`, `结束${s.label}`]) }, s.attrs, { onChange: (l) => o.formItemChangeHandler(l, s) }), null); } } })] })), y(w("a-col"), null, { default: () => [y(w("a-form-item"), { "wrapper-col": { span: 12 } }, { default: () => [y(w("a-space"), null, { default: () => [t.beforeButtons?.(), r.params?.length > 0 ? y(w("a-button"), { type: "primary", onClick: o.searchHandler }, { default: () => [y(w("search-outlined"), null, null), re("搜索")] }) : null, r.params?.length > 0 && r.showResetButton ? y(w("a-button"), { type: "primary", onClick: o.resetHandler }, { default: () => [y(w("redo-outlined"), null, null), re("重置")] }) : null, r.showAddButton ? y(w("a-button"), { type: "primary", onClick: o.addButtonClick }, { default: () => [y(w("plus-outlined"), null, null), re("添加")] }) : null, r.showUploadButton ? y(w("a-button"), { type: "primary", onClick: o.uploadButtonClick }, { default: () => [y(w("upload-outlined"), null, null), re("上传")] }) : null, r.showDownloadButton ? y(w("a-button"), { type: "primary", onClick: o.downloadButtonClick }, { default: () => [y(w("download-outlined"), null, null), re("下载")] }) : null, t.buttons?.()] })] })] })] }), t.others?.()]), y(w("a-divider"), { dished: !0, style: { margin: "8 0" } }, null), y(w("a-table"), ve(o.tableProps, { "data-source": a.dataSource, loading: a.loading, onChange: (s, l, u) => o.tableChange(s, l, u), pagination: a.pagination }), { bodyCell: (s, l, u, c) => t.bodyCell?.(s, l, u, c) })]); } }); var Ay = Object.defineProperty, Xa = Object.getOwnPropertySymbols, gp = Object.prototype.hasOwnProperty, yp = Object.prototype.propertyIsEnumerable, Sc = (r, e, t) => e in r ? Ay(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Gn = (r, e) => { for (var t in e || (e = {})) gp.call(e, t) && Sc(r, t, e[t]); if (Xa) for (var t of Xa(e)) yp.call(e, t) && Sc(r, t, e[t]); return r; }, bp = (r, e) => { var t = {}; for (var n in r) gp.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && Xa) for (var n of Xa(r)) e.indexOf(n) < 0 && yp.call(r, n) && (t[n] = r[n]); return t; }; const wp = "[vue-draggable-plus]: "; function Ny(r) { console.warn(wp + r); } function Ly(r) { console.error(wp + r); } function Mc(r, e, t) { return t >= 0 && t < r.length && r.splice(t, 0, r.splice(e, 1)[0]), r; } function Iy(r) { return r.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : ""); } function Ry(r) { return Object.keys(r).reduce((e, t) => (typeof r[t] < "u" && (e[Iy(t)] = r[t]), e), {}); } function Dc(r, e) { return Array.isArray(r) && r.splice(e, 1), r; } function Oc(r, e, t) { return Array.isArray(r) && r.splice(e, 0, t), r; } function By(r) { return typeof r > "u"; } function Py(r) { return typeof r == "string"; } function Ac(r, e, t) { const n = r.children[t]; r.insertBefore(e, n); } function ps(r) { r.parentNode && r.parentNode.removeChild(r); } function Hy(r, e = document) { var t; let n = null; return typeof e?.querySelector == "function" ? n = (t = e?.querySelector) == null ? void 0 : t.call(e, r) : n = document.querySelector(r), n || Ny(`Element not found: ${r}`), n; } function Fy(r, e, t = null) { return function(...n) { return r.apply(t, n), e.apply(t, n); }; } function _y(r, e) { const t = Gn({}, r); return Object.keys(e).forEach((n) => { t[n] ? t[n] = Fy(r[n], e[n]) : t[n] = e[n]; }), t; } function $y(r) { return r instanceof HTMLElement; } function Nc(r, e) { Object.keys(r).forEach((t) => { e(t, r[t]); }); } function qy(r) { return r.charCodeAt(0) === 111 && r.charCodeAt(1) === 110 && // uppercase letter (r.charCodeAt(2) > 122 || r.charCodeAt(2) < 97); } const zy = Object.assign; /**! * Sortable 1.15.2 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */ function Lc(r, e) { var t = Object.keys(r); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(r); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(r, i).enumerable; })), t.push.apply(t, n); } return t; } function nr(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? Lc(Object(t), !0).forEach(function(n) { Vy(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : Lc(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } function Ra(r) { "@babel/helpers - typeof"; return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ra = function(e) { return typeof e; } : Ra = function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Ra(r); } function Vy(r, e, t) { return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; } function kr() { return kr = Object.assign || function(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]); } return r; }, kr.apply(this, arguments); } function Uy(r, e) { if (r == null) return {}; var t = {}, n = Object.keys(r), i, a; for (a = 0; a < n.length; a++) i = n[a], !(e.indexOf(i) >= 0) && (t[i] = r[i]); return t; } function jy(r, e) { if (r == null) return {}; var t = Uy(r, e), n, i; if (Object.getOwnPropertySymbols) { var a = Object.getOwnPropertySymbols(r); for (i = 0; i < a.length; i++) n = a[i], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(r, n) && (t[n] = r[n]); } return t; } var Wy = "1.15.2"; function yr(r) { if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(r); } var xr = yr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), na = yr(/Edge/i), Ic = yr(/firefox/i), Bi = yr(/safari/i) && !yr(/chrome/i) && !yr(/android/i), Cp = yr(/iP(ad|od|hone)/i), kp = yr(/chrome/i) && yr(/android/i), Tp = { capture: !1, passive: !1 }; function le(r, e, t) { r.addEventListener(e, t, !xr && Tp); } function ae(r, e, t) { r.removeEventListener(e, t, !xr && Tp); } function Qa(r, e) { if (e) { if (e[0] === ">" && (e = e.substring(1)), r) try { if (r.matches) return r.matches(e); if (r.msMatchesSelector) return r.msMatchesSelector(e); if (r.webkitMatchesSelector) return r.webkitMatchesSelector(e); } catch { return !1; } return !1; } } function Gy(r) { return r.host && r !== document && r.host.nodeType ? r.host : r.parentNode; } function $t(r, e, t, n) { if (r) { t = t || document; do { if (e != null && (e[0] === ">" ? r.parentNode === t && Qa(r, e) : Qa(r, e)) || n && r === t) return r; if (r === t) break; } while (r = Gy(r)); } return null; } var Rc = /\s+/g; function kt(r, e, t) { if (r && e) if (r.classList) r.classList[t ? "add" : "remove"](e); else { var n = (" " + r.className + " ").replace(Rc, " ").replace(" " + e + " ", " "); r.className = (n + (t ? " " + e : "")).replace(Rc, " "); } } function j(r, e, t) { var n = r && r.style; if (n) { if (t === void 0) return document.defaultView && document.defaultView.getComputedStyle ? t = document.defaultView.getComputedStyle(r, "") : r.currentStyle && (t = r.currentStyle), e === void 0 ? t : t[e]; !(e in n) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), n[e] = t + (typeof t == "string" ? "" : "px"); } } function Xn(r, e) { var t = ""; if (typeof r == "string") t = r; else do { var n = j(r, "transform"); n && n !== "none" && (t = n + " " + t); } while (!e && (r = r.parentNode)); var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; return i && new i(t); } function xp(r, e, t) { if (r) { var n = r.getElementsByTagName(e), i = 0, a = n.length; if (t) for (; i < a; i++) t(n[i], i); return n; } return []; } function er() { var r = document.scrollingElement; return r || document.documentElement; } function Ee(r, e, t, n, i) { if (!(!r.getBoundingClientRect && r !== window)) { var a, o, s, l, u, c, f; if (r !== window && r.parentNode && r !== er() ? (a = r.getBoundingClientRect(), o = a.top, s = a.left, l = a.bottom, u = a.right, c = a.height, f = a.width) : (o = 0, s = 0, l = window.innerHeight, u = window.innerWidth, c = window.innerHeight, f = window.innerWidth), (e || t) && r !== window && (i = i || r.parentNode, !xr)) do if (i && i.getBoundingClientRect && (j(i, "transform") !== "none" || t && j(i, "position") !== "static")) { var d = i.getBoundingClientRect(); o -= d.top + parseInt(j(i, "border-top-width")), s -= d.left + parseInt(j(i, "border-left-width")), l = o + a.height, u = s + a.width; break; } while (i = i.parentNode); if (n && r !== window) { var h = Xn(i || r), p = h && h.a, v = h && h.d; h && (o /= v, s /= p, f /= p, c /= v, l = o + c, u = s + f); } return { top: o, left: s, bottom: l, right: u, width: f, height: c }; } } function Bc(r, e, t) { for (var n = Fr(r, !0), i = Ee(r)[e]; n; ) { var a = Ee(n)[t], o = void 0; if (o = i >= a, !o) return n; if (n === er()) break; n = Fr(n, !1); } return !1; } function ti(r, e, t, n) { for (var i = 0, a = 0, o = r.children; a < o.length; ) { if (o[a].style.display !== "none" && o[a] !== W.ghost && (n || o[a] !== W.dragged) && $t(o[a], t.draggable, r, !1)) { if (i === e) return o[a]; i++; } a++; } return null; } function au(r, e) { for (var t = r.lastElementChild; t && (t === W.ghost || j(t, "display") === "none" || e && !Qa(t, e)); ) t = t.previousElementSibling; return t || null; } function At(r, e) { var t = 0; if (!r || !r.parentNode) return -1; for (; r = r.previousElementSibling; ) r.nodeName.toUpperCase() !== "TEMPLATE" && r !== W.clone && (!e || Qa(r, e)) && t++; return t; } function Pc(r) { var e = 0, t = 0, n = er(); if (r) do { var i = Xn(r), a = i.a, o = i.d; e += r.scrollLeft * a, t += r.scrollTop * o; } while (r !== n && (r = r.parentNode)); return [e, t]; } function Yy(r, e) { for (var t in r) if (r.hasOwnProperty(t)) { for (var n in e) if (e.hasOwnProperty(n) && e[n] === r[t][n]) return Number(t); } return -1; } function Fr(r, e) { if (!r || !r.getBoundingClientRect) return er(); var t = r, n = !1; do if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) { var i = j(t); if (t.clientWidth < t.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) { if (!t.getBoundingClientRect || t === document.body) return er(); if (n || e) return t; n = !0; } } while (t = t.parentNode); return er(); } function Ky(r, e) { if (r && e) for (var t in e) e.hasOwnProperty(t) && (r[t] = e[t]); return r; } function vs(r, e) { return Math.round(r.top) === Math.round(e.top) && Math.round(r.left) === Math.round(e.left) && Math.round(r.height) === Math.round(e.height) && Math.round(r.width) === Math.round(e.width); } var Pi; function Ep(r, e) { return function() { if (!Pi) { var t = arguments, n = this; t.length === 1 ? r.call(n, t[0]) : r.apply(n, t), Pi = setTimeout(function() { Pi = void 0; }, e); } }; } function Jy() { clearTimeout(Pi), Pi = void 0; } function Sp(r, e, t) { r.scrollLeft += e, r.scrollTop += t; } function Mp(r) { var e = window.Polymer, t = window.jQuery || window.Zepto; return e && e.dom ? e.dom(r).cloneNode(!0) : t ? t(r).clone(!0)[0] : r.cloneNode(!0); } function Dp(r, e, t) { var n = {}; return Array.from(r.children).forEach(function(i) { var a, o, s, l; if (!(!$t(i, e.draggable, r, !1) || i.animated || i === t)) { var u = Ee(i); n.left = Math.min((a = n.left) !== null && a !== void 0 ? a : 1 / 0, u.left), n.top = Math.min((o = n.top) !== null && o !== void 0 ? o : 1 / 0, u.top), n.right = Math.max((s = n.right) !== null && s !== void 0 ? s : -1 / 0, u.right), n.bottom = Math.max((l = n.bottom) !== null && l !== void 0 ? l : -1 / 0, u.bottom); } }), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n; } var xt = "Sortable" + (/* @__PURE__ */ new Date()).getTime(); function Xy() { var r = [], e; return { captureAnimationState: function() { if (r = [], !!this.options.animation) { var t = [].slice.call(this.el.children); t.forEach(function(n) { if (!(j(n, "display") === "none" || n === W.ghost)) { r.push({ target: n, rect: Ee(n) }); var i = nr({}, r[r.length - 1].rect); if (n.thisAnimationDuration) { var a = Xn(n, !0); a && (i.top -= a.f, i.left -= a.e); } n.fromRect = i; } }); } }, addAnimationState: function(t) { r.push(t); }, removeAnimationState: function(t) { r.splice(Yy(r, { target: t }), 1); }, animateAll: function(t) { var n = this; if (!this.options.animation) { clearTimeout(e), typeof t == "function" && t(); return; } var i = !1, a = 0; r.forEach(function(o) { var s = 0, l = o.target, u = l.fromRect, c = Ee(l), f = l.prevFromRect, d = l.prevToRect, h = o.rect, p = Xn(l, !0); p && (c.top -= p.f, c.left -= p.e), l.toRect = c, l.thisAnimationDuration && vs(f, c) && !vs(u, c) && // Make sure animatingRect is on line between toRect & fromRect (h.top - c.top) / (h.left - c.left) === (u.top - c.top) / (u.left - c.left) && (s = Zy(h, f, d, n.options)), vs(c, u) || (l.prevFromRect = u, l.prevToRect = c, s || (s = n.options.animation), n.animate(l, h, c, s)), s && (i = !0, a = Math.max(a, s), clearTimeout(l.animationResetTimer), l.animationResetTimer = setTimeout(function() { l.animationTime = 0, l.prevFromRect = null, l.fromRect = null, l.prevToRect = null, l.thisAnimationDuration = null; }, s), l.thisAnimationDuration = s); }), clearTimeout(e), i ? e = setTimeout(function() { typeof t == "function" && t(); }, a) : typeof t == "function" && t(), r = []; }, animate: function(t, n, i, a) { if (a) { j(t, "transition", ""), j(t, "transform", ""); var o = Xn(this.el), s = o && o.a, l = o && o.d, u = (n.left - i.left) / (s || 1), c = (n.top - i.top) / (l || 1); t.animatingX = !!u, t.animatingY = !!c, j(t, "transform", "translate3d(" + u + "px," + c + "px,0)"), this.forRepaintDummy = Qy(t), j(t, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), j(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() { j(t, "transition", ""), j(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1; }, a); } } }; } function Qy(r) { return r.offsetWidth; } function Zy(r, e, t, n) { return Math.sqrt(Math.pow(e.top - r.top, 2) + Math.pow(e.left - r.left, 2)) / Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) * n.animation; } var Pn = [], ms = { initializeByDefault: !0 }, ia = { mount: function(r) { for (var e in ms) ms.hasOwnProperty(e) && !(e in r) && (r[e] = ms[e]); Pn.forEach(function(t) { if (t.pluginName === r.pluginName) throw "Sortable: Cannot mount plugin ".concat(r.pluginName, " more than once"); }), Pn.push(r); }, pluginEvent: function(r, e, t) { var n = this; this.eventCanceled = !1, t.cancel = function() { n.eventCanceled = !0; }; var i = r + "Global"; Pn.forEach(function(a) { e[a.pluginName] && (e[a.pluginName][i] && e[a.pluginName][i](nr({ sortable: e }, t)), e.options[a.pluginName] && e[a.pluginName][r] && e[a.pluginName][r](nr({ sortable: e }, t))); }); }, initializePlugins: function(r, e, t, n) { Pn.forEach(function(o) { var s = o.pluginName; if (!(!r.options[s] && !o.initializeByDefault)) { var l = new o(r, e, r.options); l.sortable = r, l.options = r.options, r[s] = l, kr(t, l.defaults); } }); for (var i in r.options) if (r.options.hasOwnProperty(i)) { var a = this.modifyOption(r, i, r.options[i]); typeof a < "u" && (r.options[i] = a); } }, getEventProperties: function(r, e) { var t = {}; return Pn.forEach(function(n) { typeof n.eventProperties == "function" && kr(t, n.eventProperties.call(e[n.pluginName], r)); }), t; }, modifyOption: function(r, e, t) { var n; return Pn.forEach(function(i) { r[i.pluginName] && i.optionListeners && typeof i.optionListeners[e] == "function" && (n = i.optionListeners[e].call(r[i.pluginName], t)); }), n; } }; function eb(r) { var e = r.sortable, t = r.rootEl, n = r.name, i = r.targetEl, a = r.cloneEl, o = r.toEl, s = r.fromEl, l = r.oldIndex, u = r.newIndex, c = r.oldDraggableIndex, f = r.newDraggableIndex, d = r.originalEvent, h = r.putSortable, p = r.extraEventProperties; if (e = e || t && t[xt], !!e) { var v, m = e.options, g = "on" + n.charAt(0).toUpperCase() + n.substr(1); window.CustomEvent && !xr && !na ? v = new CustomEvent(n, { bubbles: !0, cancelable: !0 }) : (v = document.createEvent("Event"), v.initEvent(n, !0, !0)), v.to = o || t, v.from = s || t, v.item = i || t, v.clone = a, v.oldIndex = l, v.newIndex = u, v.oldDraggableIndex = c, v.newDraggableIndex = f, v.originalEvent = d, v.pullMode = h ? h.lastPutMode : void 0; var C = nr(nr({}, p), ia.getEventProperties(n, e)); for (var T in C) v[T] = C[T]; t && t.dispatchEvent(v), m[g] && m[g].call(e, v); } } var tb = ["evt"], pt = function(r, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.evt, i = jy(t, tb); ia.pluginEvent.bind(W)(r, e, nr({ dragEl: I, parentEl: we, ghostEl: J, rootEl: pe, nextEl: sn, lastDownEl: Ba, cloneEl: ge, cloneHidden: Br, dragStarted: Mi, putSortable: He, activeSortable: W.active, originalEvent: n, oldIndex: Yn, oldDraggableIndex: Hi, newIndex: Tt, newDraggableIndex: Lr, hideGhostForTarget: Lp, unhideGhostForTarget: Ip, cloneNowHidden: function() { Br = !0; }, cloneNowShown: function() { Br = !1; }, dispatchSortableEvent: function(a) { ot({ sortable: e, name: a, originalEvent: n }); } }, i)); }; function ot(r) { eb(nr({ putSortable: He, cloneEl: ge, targetEl: I, rootEl: pe, oldIndex: Yn, oldDraggableIndex: Hi, newIndex: Tt, newDraggableIndex: Lr }, r)); } var I, we, J, pe, sn, Ba, ge, Br, Yn, Tt, Hi, Lr, ma, He, Vn = !1, Za = !1, eo = [], en, Ft, gs, ys, Hc, Fc, Mi, Hn, Fi, _i = !1, ga = !1, Pa, Ke, bs = [], cl = !1, to = [], Bo = typeof document < "u", ya = Cp, _c = na || xr ? "cssFloat" : "float", rb = Bo && !kp && !Cp && "draggable" in document.createElement("div"), Op = function() { if (Bo) { if (xr) return !1; var r = document.createElement("x"); return r.style.cssText = "pointer-events:auto", r.style.pointerEvents === "auto"; } }(), Ap = function(r, e) { var t = j(r), n = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), i = ti(r, 0, e), a = ti(r, 1, e), o = i && j(i), s = a && j(a), l = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + Ee(i).width, u = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + Ee(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 && o.float && o.float !== "none") { var c = o.float === "left" ? "left" : "right"; return a && (s.clear === "both" || s.clear === c) ? "vertical" : "horizontal"; } return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || l >= n && t[_c] === "none" || a && t[_c] === "none" && l + u > n) ? "vertical" : "horizontal"; }, nb = function(r, e, t) { var n = t ? r.left : r.top, i = t ? r.right : r.bottom, a = t ? r.width : r.height, o = t ? e.left : e.top, s = t ? e.right : e.bottom, l = t ? e.width : e.height; return n === o || i === s || n + a / 2 === o + l / 2; }, ib = function(r, e) { var t; return eo.some(function(n) { var i = n[xt].options.emptyInsertThreshold; if (!(!i || au(n))) { var a = Ee(n), o = r >= a.left - i && r <= a.right + i, s = e >= a.top - i && e <= a.bottom + i; if (o && s) return t = n; } }), t; }, Np = function(r) { function e(i, a) { return function(o, s, l, u) { var c = o.options.group.name && s.options.group.name && o.options.group.name === s.options.group.name; if (i == null && (a || c)) return !0; if (i == null || i === !1) return !1; if (a && i === "clone") return i; if (typeof i == "function") return e(i(o, s, l, u), a)(o, s, l, u); var f = (a ? o : s).options.group.name; return i === !0 || typeof i == "string" && i === f || i.join && i.indexOf(f) > -1; }; } var t = {}, n = r.group; (!n || Ra(n) != "object") && (n = { name: n }), t.name = n.name, t.checkPull = e(n.pull, !0), t.checkPut = e(n.put), t.revertClone = n.revertClone, r.group = t; }, Lp = function() { !Op && J && j(J, "display", "none"); }, Ip = function() { !Op && J && j(J, "display", ""); }; Bo && !kp && document.addEventListener("click", function(r) { if (Za) return r.preventDefault(), r.stopPropagation && r.stopPropagation(), r.stopImmediatePropagation && r.stopImmediatePropagation(), Za = !1, !1; }, !0); var tn = function(r) { if (I) { r = r.touches ? r.touches[0] : r; var e = ib(r.clientX, r.clientY); if (e) { var t = {}; for (var n in r) r.hasOwnProperty(n) && (t[n] = r[n]); t.target = t.rootEl = e, t.preventDefault = void 0, t.stopPropagation = void 0, e[xt]._onDragOver(t); } } }, ab = function(r) { I && I.parentNode[xt]._isOutsideThisEl(r.target); }; function W(r, e) { if (!(r && r.nodeType && r.nodeType === 1)) throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r)); this.el = r, this.options = e = kr({}, e), r[xt] = this; var t = { group: null, sort: !0, disabled: !1, store: null, handle: null, draggable: /^[uo]l$/i.test(r.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 Ap(r, 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, o) { a.setData("Text", o.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: W.supportPointer !== !1 && "PointerEvent" in window && !Bi, emptyInsertThreshold: 5 }; ia.initializePlugins(this, r, t); for (var n in t) !(n in e) && (e[n] = t[n]); Np(e); for (var i in this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this)); this.nativeDraggable = e.forceFallback ? !1 : rb, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? le(r, "pointerdown", this._onTapStart) : (le(r, "mousedown", this._onTapStart), le(r, "touchstart", this._onTapStart)), this.nativeDraggable && (le(r, "dragover", this), le(r, "dragenter", this)), eo.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), kr(this, Xy()); } W.prototype = /** @lends Sortable.prototype */ { constructor: W, _isOutsideThisEl: function(r) { !this.el.contains(r) && r !== this.el && (Hn = null); }, _getDirection: function(r, e) { return typeof this.options.direction == "function" ? this.options.direction.call(this, r, e, I) : this.options.direction; }, _onTapStart: function(r) { if (r.cancelable) { var e = this, t = this.el, n = this.options, i = n.preventOnFilter, a = r.type, o = r.touches && r.touches[0] || r.pointerType && r.pointerType === "touch" && r, s = (o || r).target, l = r.target.shadowRoot && (r.path && r.path[0] || r.composedPath && r.composedPath()[0]) || s, u = n.filter; if (hb(t), !I && !(/mousedown|pointerdown/.test(a) && r.button !== 0 || n.disabled) && !l.isContentEditable && !(!this.nativeDraggable && Bi && s && s.tagName.toUpperCase() === "SELECT") && (s = $t(s, n.draggable, t, !1), !(s && s.animated) && Ba !== s)) { if (Yn = At(s), Hi = At(s, n.draggable), typeof u == "function") { if (u.call(this, r, s, this)) { ot({ sortable: e, rootEl: l, name: "filter", targetEl: s, toEl: t, fromEl: t }), pt("filter", e, { evt: r }), i && r.cancelable && r.preventDefault(); return; } } else if (u && (u = u.split(",").some(function(c) { if (c = $t(l, c.trim(), t, !1), c) return ot({ sortable: e, rootEl: c, name: "filter", targetEl: s, fromEl: t, toEl: t }), pt("filter", e, { evt: r }), !0; }), u)) { i && r.cancelable && r.preventDefault(); return; } n.handle && !$t(l, n.handle, t, !1) || this._prepareDragStart(r, o, s); } } }, _prepareDragStart: function(r, e, t) { var n = this, i = n.el, a = n.options, o = i.ownerDocument, s; if (t && !I && t.parentNode === i) { var l = Ee(t); if (pe = i, I = t, we = I.parentNode, sn = I.nextSibling, Ba = t, ma = a.group, W.dragged = I, en = { target: I, clientX: (e || r).clientX, clientY: (e || r).clientY }, Hc = en.clientX - l.left, Fc = en.clientY - l.top, this._lastX = (e || r).clientX, this._lastY = (e || r).clientY, I.style["will-change"] = "all", s = function() { if (pt("delayEnded", n, { evt: r }), W.eventCanceled) { n._onDrop(); return; } n._disableDelayedDragEvents(), !Ic && n.nativeDraggable && (I.draggable = !0), n._triggerDragStart(r, e), ot({ sortable: n, name: "choose", originalEvent: r }), kt(I, a.chosenClass, !0); }, a.ignore.split(",").forEach(function(u) { xp(I, u.trim(), ws); }), le(o, "dragover", tn), le(o, "mousemove", tn), le(o, "touchmove", tn), le(o, "mouseup", n._onDrop), le(o, "touchend", n._onDrop), le(o, "touchcancel", n._onDrop), Ic && this.nativeDraggable && (this.options.touchStartThreshold = 4, I.draggable = !0), pt("delayStart", this, { evt: r }), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(na || xr))) { if (W.eventCanceled) { this._onDrop(); return; } le(o, "mouseup", n._disableDelayedDrag), le(o, "touchend", n._disableDelayedDrag), le(o, "touchcancel", n._disableDelayedDrag), le(o, "mousemove", n._delayedDragTouchMoveHandler), le(o, "touchmove", n._delayedDragTouchMoveHandler), a.supportPointer && le(o, "pointermove", n._delayedDragTouchMoveHandler), n._dragStartTimer = setTimeout(s, a.delay); } else s(); } }, _delayedDragTouchMoveHandler: function(r) { var e = r.touches ? r.touches[0] : r; 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() { I && ws(I), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents(); }, _disableDelayedDragEvents: function() { var r = this.el.ownerDocument; ae(r, "mouseup", this._disableDelayedDrag), ae(r, "touchend", this._disableDelayedDrag), ae(r, "touchcancel", this._disableDelayedDrag), ae(r, "mousemove", this._delayedDragTouchMoveHandler), ae(r, "touchmove", this._delayedDragTouchMoveHandler), ae(r, "pointermove", this._delayedDragTouchMoveHandler); }, _triggerDragStart: function(r, e) { e = e || r.pointerType == "touch" && r, !this.nativeDraggable || e ? this.options.supportPointer ? le(document, "pointermove", this._onTouchMove) : e ? le(document, "touchmove", this._onTouchMove) : le(document, "mousemove", this._onTouchMove) : (le(I, "dragend", this), le(pe, "dragstart", this._onDragStart)); try { document.selection ? Ha(function() { document.selection.empty(); }) : window.getSelection().removeAllRanges(); } catch { } }, _dragStarted: function(r, e) { if (Vn = !1, pe && I) { pt("dragStarted", this, { evt: e }), this.nativeDraggable && le(document, "dragover", ab); var t = this.options; !r && kt(I, t.dragClass, !1), kt(I, t.ghostClass, !0), W.active = this, r && this._appendGhost(), ot({ sortable: this,