@pantograph/vue 0.23.4 → 0.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionButton/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-CoWtYp90.js → ActionButton.vue_vue_type_script_setup_true_lang-7ImUgPOW.js} +2 -2
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-BM-HiVKZ.js → ActionButton.vue_vue_type_script_setup_true_lang-D8DXU0Vb.js} +1 -1
- package/dist/Alert/index.js +1 -1
- package/dist/Alert/index.umd.cjs +1 -1
- package/dist/{Alert.vue_vue_type_style_index_0_lang-DmEdkb41.js → Alert.vue_vue_type_style_index_0_lang-CqrPX_Iw.js} +3 -3
- package/dist/{Alert.vue_vue_type_style_index_0_lang-CsZWFSR_.js → Alert.vue_vue_type_style_index_0_lang-DtOx68kv.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-DTndXzmH.js → Avatar.vue_vue_type_style_index_0_lang-B0jPWS1n.js} +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CcKQb0PA.js → Avatar.vue_vue_type_style_index_0_lang-Dj-jkrYp.js} +2 -2
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge/index.umd.cjs +1 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-ChmvYjjQ.js +1 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-PioR6WEK.js +57 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-stkOtvTd.js → BaseButton.vue_vue_type_style_index_0_lang-Cb5t50gO.js} +2 -2
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-Ch3LDS1D.js → BaseButton.vue_vue_type_style_index_0_lang-CeHbEfy3.js} +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/Button/index.umd.cjs +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-CIjMWs2s.js → Button.vue_vue_type_script_setup_true_lang-ChrdvyD2.js} +2 -2
- package/dist/{Button.vue_vue_type_script_setup_true_lang-BouXlBWO.js → Button.vue_vue_type_script_setup_true_lang-vJ7lfVy_.js} +1 -1
- package/dist/Checkbox/index.js +1 -1
- package/dist/Checkbox/index.umd.cjs +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Bo8DiMqm.js → Checkbox.vue_vue_type_style_index_0_lang-Dh2oLmt5.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-2qQxhEQ0.js → Checkbox.vue_vue_type_style_index_0_lang-Dhn_dWz7.js} +2 -2
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs +1 -1
- package/dist/Chip/index.js +2 -2
- package/dist/Chip/index.umd.cjs +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-qKiQbAUD.js → Chip.vue_vue_type_style_index_0_lang-CEXKUJCj.js} +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-pkEj-IcZ.js → Chip.vue_vue_type_style_index_0_lang-Cr1_L0Lz.js} +2 -2
- package/dist/ChipGroup/index.js +1 -1
- package/dist/ChipGroup/index.umd.cjs +1 -1
- package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-DmbWGoar.js → ChipGroup.vue_vue_type_style_index_0_lang-B945U8rL.js} +1 -1
- package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-BFHkFjPI.js → ChipGroup.vue_vue_type_style_index_0_lang-j6Reg1S9.js} +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-CxWDk_6b.js → ColorPicker.vue_vue_type_style_index_0_lang-CcqGZq-b.js} +259 -259
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-DKGxK13w.js → ColorPicker.vue_vue_type_style_index_0_lang-Cdxk3fOe.js} +2 -2
- package/dist/ColorSwatch/index.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/ColorSwatch-CH_N4TfV.js +1 -0
- package/dist/ColorSwatch-DkW6RvE7.js +4 -0
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-CABlbyiP.js → ColorSwatch.vue_vue_type_style_index_0_lang-WU4Q0TGg.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-CAXvzEY_.js → ColorSwatch.vue_vue_type_style_index_0_lang-r7jNc78g.js} +3 -3
- package/dist/ColorSwatchGroup/index.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Cjn4NZYK.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DP1dT4Eq.js} +6 -6
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-iWwvyQwp.js +1 -0
- package/dist/ColorTrigger/index.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-XqnB_VGl.js → ColorTrigger.vue_vue_type_style_index_0_lang-D7M2EQfc.js} +3 -3
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-BsexkD4u.js → ColorTrigger.vue_vue_type_style_index_0_lang-IwIexR_Y.js} +1 -1
- package/dist/Combobox/index.js +1 -1
- package/dist/Combobox/index.umd.cjs +1 -1
- package/dist/Combobox.vue_vue_type_style_index_0_lang-Cnl79xIk.js +1 -0
- package/dist/Combobox.vue_vue_type_style_index_0_lang-DIXSNQlS.js +924 -0
- package/dist/DataTable/index.js +1 -1
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-DeDH_Kvd.js +1 -0
- package/dist/{DataTable.vue_vue_type_style_index_0_lang-CpQ0Yn-D.js → DataTable.vue_vue_type_style_index_0_lang-PXmil6LX.js} +12 -12
- package/dist/DropZone/index.js +1 -1
- package/dist/DropZone/index.umd.cjs +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-DVZrmQwL.js → DropZone.vue_vue_type_style_index_0_lang-CrBpJeKe.js} +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-BnrcUu_6.js → DropZone.vue_vue_type_style_index_0_lang-WmRKdmXK.js} +1 -1
- package/dist/FloatButton/index.js +1 -1
- package/dist/FloatButton/index.umd.cjs +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Br1BEY7H.js → FloatButton.vue_vue_type_script_setup_true_lang-DFHM_Tuo.js} +2 -2
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-BOFSVjFP.js → FloatButton.vue_vue_type_script_setup_true_lang-DpFewhq3.js} +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/Form/index.umd.cjs +1 -1
- package/dist/{FormItem.vue_vue_type_style_index_0_lang-s7o6crR0.js → FormItem.vue_vue_type_style_index_0_lang-CTRszGlB.js} +3 -3
- package/dist/{FormItem.vue_vue_type_style_index_0_lang-CwxlEgep.js → FormItem.vue_vue_type_style_index_0_lang-DbMENNc4.js} +3 -3
- package/dist/GOPicker/GOItemSkeleton.d.ts +2 -0
- package/dist/GOPicker/GOPicker.d.ts +36 -96
- package/dist/GOPicker/GOPicker.model.d.ts +72 -0
- package/dist/GOPicker/index.d.ts +2 -1
- package/dist/GOPicker/index.js +1 -1
- package/dist/GOPicker/index.umd.cjs +1 -1
- package/dist/GraphicalObject/index.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-C4i8C-dP.js +65 -0
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CmkmatJc.js +1 -0
- package/dist/GraphicalObjectGroup/index.js +1 -1
- package/dist/GraphicalObjectGroup/index.umd.cjs +1 -1
- package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DgjnAH0N.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CB9Q1b9r.js} +1 -1
- package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-ChJsB7QV.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CU2CrD-j.js} +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.umd.cjs +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-DvbKC7wq.js → IconButton.vue_vue_type_script_setup_true_lang-Bq7Ed6Jl.js} +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-DAX_14ed.js → IconButton.vue_vue_type_script_setup_true_lang-DJiG3_YJ.js} +2 -2
- package/dist/Image/index.js +1 -1
- package/dist/Image/index.umd.cjs +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-CGdnuyxZ.js → Image.vue_vue_type_style_index_0_lang-CgczUp3D.js} +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-CqilRo2A.js → Image.vue_vue_type_style_index_0_lang-Cmn0ijum.js} +1 -1
- package/dist/IndentLevel/index.js +1 -1
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-CjaQqD7w.js → IndentLevel.vue_vue_type_style_index_0_lang-ZmHvmKOS.js} +2 -2
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-DD2920xJ.js → IndentLevel.vue_vue_type_style_index_0_lang-u9PJeCGr.js} +1 -1
- package/dist/Indicator/index.js +1 -1
- package/dist/Indicator/index.umd.cjs +1 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-CX3cY74r.js +1 -0
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-CmKraTSB.js +38 -0
- package/dist/Input/index.js +1 -1
- package/dist/Input/index.umd.cjs +1 -1
- package/dist/{Input.vue_vue_type_style_index_0_lang-C-jEi11-.js → Input.vue_vue_type_style_index_0_lang-Ccow0nkI.js} +4 -4
- package/dist/Input.vue_vue_type_style_index_0_lang-yHgbuD_4.js +1 -0
- package/dist/Label/index.js +1 -1
- package/dist/Label/index.umd.cjs +1 -1
- package/dist/Menu/index.js +1 -1
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/MenuItem/index.js +1 -1
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-DGaSx-eQ.js → MenuItem.vue_vue_type_style_index_0_lang-C8ofBbNv.js} +4 -4
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-DL9Njg73.js → MenuItem.vue_vue_type_style_index_0_lang-pnm3rqME.js} +1 -1
- package/dist/Popover/Popover.d.ts +1 -0
- package/dist/Popover/index.js +1 -1
- package/dist/Popover/index.umd.cjs +1 -1
- package/dist/{Popover.vue_vue_type_style_index_0_lang-ColyiCeV.js → Popover.vue_vue_type_style_index_0_lang-BGRXQmj3.js} +3 -3
- package/dist/{Popover.vue_vue_type_style_index_0_lang-CZYvVeso.js → Popover.vue_vue_type_style_index_0_lang-CZ_AaHDG.js} +1 -1
- package/dist/RadioGroup/index.js +1 -1
- package/dist/RadioGroup/index.umd.cjs +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-Buet9dc2.js → RadioGroup.vue_vue_type_script_setup_true_lang-03XUb7NC.js} +20 -21
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-1clw8kVI.js +1 -0
- package/dist/ScrollContainer/ScrollContainer.d.ts +2 -0
- package/dist/Segmented/index.js +1 -1
- package/dist/Segmented/index.umd.cjs +1 -1
- package/dist/{Segmented.vue_vue_type_style_index_0_lang-R_eXQ6g9.js → Segmented.vue_vue_type_style_index_0_lang-906ZRFCK.js} +26 -26
- package/dist/Segmented.vue_vue_type_style_index_0_lang-B4aQCMXZ.js +1 -0
- package/dist/Select/index.js +1 -1
- package/dist/Select/index.umd.cjs +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-Bc9kyMDB.js → Select.vue_vue_type_style_index_0_lang-DX17VhqH.js} +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-BfUtCG_-.js → Select.vue_vue_type_style_index_0_lang-W3dk0Ug0.js} +6 -6
- package/dist/SubMenu/index.js +1 -1
- package/dist/SubMenu/index.umd.cjs +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/Switch/index.umd.cjs +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-jzphTPAF.js → Switch.vue_vue_type_style_index_0_lang-BM-h82G0.js} +2 -2
- package/dist/{Switch.vue_vue_type_style_index_0_lang-DhuZK1wp.js → Switch.vue_vue_type_style_index_0_lang-DHT9utPp.js} +1 -1
- package/dist/{THead.vue_vue_type_style_index_0_lang-Du3rBBec.js → THead.vue_vue_type_style_index_0_lang-B6U8HrWi.js} +1 -1
- package/dist/{THead.vue_vue_type_style_index_0_lang-DtBQAI4D.js → THead.vue_vue_type_style_index_0_lang-CHicticP.js} +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Table/index.umd.cjs +1 -1
- package/dist/Textarea/index.js +1 -1
- package/dist/Textarea/index.umd.cjs +1 -1
- package/dist/Textarea.vue_vue_type_style_index_0_lang-DiCqcDyH.js +1 -0
- package/dist/{Textarea.vue_vue_type_style_index_0_lang-Dbdx29In.js → Textarea.vue_vue_type_style_index_0_lang-UyndJFBo.js} +4 -4
- package/dist/Tree/Tree.d.ts +3 -1
- package/dist/Tree/Tree.model.d.ts +11 -8
- package/dist/Tree/TreeNode.d.ts +2 -0
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/Tree/utils.d.ts +14 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-B30b4oK2.js +6 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-DBDkYw9s.js +1757 -0
- package/dist/exports.d.ts +4 -0
- package/dist/{getEmojiList-DSYihWrO.js → getEmojiList-BiHAQqm6.js} +237 -227
- package/dist/getEmojiList-mUahBsHW.js +1 -0
- package/dist/index.d.ts +3 -6
- package/dist/index.js +60 -60
- package/dist/index.umd.cjs +1 -1
- package/dist/{omit-B3e_dACs.js → omit-BuBwx_M2.js} +182 -181
- package/dist/omit-CYbreqlf.js +1 -0
- package/dist/style/index.css +1 -1
- package/dist/{uniq-BsN259vC.js → uniq-BeFmBpYC.js} +1 -1
- package/dist/{uniq-Dhcbw64V.js → uniq-CezX8yQS.js} +1 -1
- package/dist/{useInputDataStates-CtuCKcP6.js → useInputDataStates-Bzs7T9xb.js} +2 -2
- package/dist/{useInputDataStates-DEfYzXQl.js → useInputDataStates-C1T7BL_V.js} +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.umd.cjs +1 -1
- package/package.json +4 -4
- package/dist/Badge.vue_vue_type_script_setup_true_lang-Blql7wH1.js +0 -66
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CsIGsGWg.js +0 -1
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-D8oB421I.js +0 -1
- package/dist/Combobox.vue_vue_type_style_index_0_lang-BM7QiXKH.js +0 -831
- package/dist/Combobox.vue_vue_type_style_index_0_lang-IdKdwJfN.js +0 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-CnUiY5l1.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BlFC2U5K.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-C7HScEPN.js +0 -68
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-Bnqpi2bU.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-D5xqdZRn.js +0 -40
- package/dist/Input.vue_vue_type_style_index_0_lang-5iaTCkoa.js +0 -1
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-lIx8QQp8.js +0 -1
- package/dist/Segmented.vue_vue_type_style_index_0_lang-DqaTvxYQ.js +0 -1
- package/dist/Textarea.vue_vue_type_style_index_0_lang-BMbkTBJu.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-Bcy8moE2.js +0 -1789
- package/dist/Tree.vue_vue_type_style_index_0_lang-BrJHHwGl.js +0 -6
- package/dist/getEmojiList-kI-Nn4xv.js +0 -1
- package/dist/omit-DEPypqqe.js +0 -1
|
@@ -1,1789 +0,0 @@
|
|
|
1
|
-
import { defineComponent as tn, useSlots as nn, computed as M, useTemplateRef as Dn, resolveComponent as Cn, createElementBlock as Xe, openBlock as pe, mergeProps as st, unref as v, createCommentVNode as Ye, createElementVNode as Yt, withDirectives as Tn, normalizeClass as Ae, createVNode as Lt, createBlock as Ue, withCtx as Be, renderSlot as $e, normalizeProps as Ge, guardReactiveProps as He, withModifiers as xn, Fragment as In, toDisplayString as On, createSlots as on, renderList as rn, vShow as kn, ref as Le, watch as ot } from "vue";
|
|
2
|
-
import { generateVariantClassList as Ee, getBemElement as fe, getBemModifier as kt, getBemBlock as Nn, usePCId as An } from "@pantograph/utils";
|
|
3
|
-
import { cva as an } from "class-variance-authority";
|
|
4
|
-
import { h as G, k as $t, o as Pn, j as Fn } from "./FormItem.vue_vue_type_style_index_0_lang-CwxlEgep.js";
|
|
5
|
-
import { u as wt } from "./uniq-BsN259vC.js";
|
|
6
|
-
import { g as ln } from "./options-D4et5euX.js";
|
|
7
|
-
import { createContext as Mn } from "reka-ui";
|
|
8
|
-
import { _ as Bn } from "./IndentLevel.vue_vue_type_style_index_0_lang-CjaQqD7w.js";
|
|
9
|
-
import { _ as Rn } from "./Icon.vue_vue_type_style_index_0_lang-CbLL-Ngi.js";
|
|
10
|
-
import { _ as zn } from "./Checkbox.vue_vue_type_style_index_0_lang-2qQxhEQ0.js";
|
|
11
|
-
import { U as Kn, u as Xn } from "./useInputDataStates-CtuCKcP6.js";
|
|
12
|
-
import { useElementSize as Yn } from "@vueuse/core";
|
|
13
|
-
import sn from "vuedraggable";
|
|
14
|
-
import { u as Ln, d as Gt } from "./index-jwkhq8oW.js";
|
|
15
|
-
import { last as $n } from "lodash-es";
|
|
16
|
-
import { o as Gn } from "./omit-B3e_dACs.js";
|
|
17
|
-
/**!
|
|
18
|
-
* Sortable 1.15.6
|
|
19
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
20
|
-
* @author owenm <owen23355@gmail.com>
|
|
21
|
-
* @license MIT
|
|
22
|
-
*/
|
|
23
|
-
function Ht(o, e) {
|
|
24
|
-
var n = Object.keys(o);
|
|
25
|
-
if (Object.getOwnPropertySymbols) {
|
|
26
|
-
var t = Object.getOwnPropertySymbols(o);
|
|
27
|
-
e && (t = t.filter(function(i) {
|
|
28
|
-
return Object.getOwnPropertyDescriptor(o, i).enumerable;
|
|
29
|
-
})), n.push.apply(n, t);
|
|
30
|
-
}
|
|
31
|
-
return n;
|
|
32
|
-
}
|
|
33
|
-
function me(o) {
|
|
34
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
35
|
-
var n = arguments[e] != null ? arguments[e] : {};
|
|
36
|
-
e % 2 ? Ht(Object(n), !0).forEach(function(t) {
|
|
37
|
-
Hn(o, t, n[t]);
|
|
38
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(n)) : Ht(Object(n)).forEach(function(t) {
|
|
39
|
-
Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(n, t));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return o;
|
|
43
|
-
}
|
|
44
|
-
function ut(o) {
|
|
45
|
-
"@babel/helpers - typeof";
|
|
46
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ut = function(e) {
|
|
47
|
-
return typeof e;
|
|
48
|
-
} : ut = function(e) {
|
|
49
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
50
|
-
}, ut(o);
|
|
51
|
-
}
|
|
52
|
-
function Hn(o, e, n) {
|
|
53
|
-
return e in o ? Object.defineProperty(o, e, {
|
|
54
|
-
value: n,
|
|
55
|
-
enumerable: !0,
|
|
56
|
-
configurable: !0,
|
|
57
|
-
writable: !0
|
|
58
|
-
}) : o[e] = n, o;
|
|
59
|
-
}
|
|
60
|
-
function _e() {
|
|
61
|
-
return _e = Object.assign || function(o) {
|
|
62
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
63
|
-
var n = arguments[e];
|
|
64
|
-
for (var t in n)
|
|
65
|
-
Object.prototype.hasOwnProperty.call(n, t) && (o[t] = n[t]);
|
|
66
|
-
}
|
|
67
|
-
return o;
|
|
68
|
-
}, _e.apply(this, arguments);
|
|
69
|
-
}
|
|
70
|
-
function jn(o, e) {
|
|
71
|
-
if (o == null) return {};
|
|
72
|
-
var n = {}, t = Object.keys(o), i, r;
|
|
73
|
-
for (r = 0; r < t.length; r++)
|
|
74
|
-
i = t[r], !(e.indexOf(i) >= 0) && (n[i] = o[i]);
|
|
75
|
-
return n;
|
|
76
|
-
}
|
|
77
|
-
function Vn(o, e) {
|
|
78
|
-
if (o == null) return {};
|
|
79
|
-
var n = jn(o, e), t, i;
|
|
80
|
-
if (Object.getOwnPropertySymbols) {
|
|
81
|
-
var r = Object.getOwnPropertySymbols(o);
|
|
82
|
-
for (i = 0; i < r.length; i++)
|
|
83
|
-
t = r[i], !(e.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(o, t) && (n[t] = o[t]);
|
|
84
|
-
}
|
|
85
|
-
return n;
|
|
86
|
-
}
|
|
87
|
-
var Wn = "1.15.6";
|
|
88
|
-
function Se(o) {
|
|
89
|
-
if (typeof window < "u" && window.navigator)
|
|
90
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(o);
|
|
91
|
-
}
|
|
92
|
-
var De = Se(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), tt = Se(/Edge/i), jt = Se(/firefox/i), qe = Se(/safari/i) && !Se(/chrome/i) && !Se(/android/i), Mt = Se(/iP(ad|od|hone)/i), un = Se(/chrome/i) && Se(/android/i), dn = {
|
|
93
|
-
capture: !1,
|
|
94
|
-
passive: !1
|
|
95
|
-
};
|
|
96
|
-
function I(o, e, n) {
|
|
97
|
-
o.addEventListener(e, n, !De && dn);
|
|
98
|
-
}
|
|
99
|
-
function x(o, e, n) {
|
|
100
|
-
o.removeEventListener(e, n, !De && dn);
|
|
101
|
-
}
|
|
102
|
-
function pt(o, e) {
|
|
103
|
-
if (e) {
|
|
104
|
-
if (e[0] === ">" && (e = e.substring(1)), o)
|
|
105
|
-
try {
|
|
106
|
-
if (o.matches)
|
|
107
|
-
return o.matches(e);
|
|
108
|
-
if (o.msMatchesSelector)
|
|
109
|
-
return o.msMatchesSelector(e);
|
|
110
|
-
if (o.webkitMatchesSelector)
|
|
111
|
-
return o.webkitMatchesSelector(e);
|
|
112
|
-
} catch {
|
|
113
|
-
return !1;
|
|
114
|
-
}
|
|
115
|
-
return !1;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function cn(o) {
|
|
119
|
-
return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
|
|
120
|
-
}
|
|
121
|
-
function ce(o, e, n, t) {
|
|
122
|
-
if (o) {
|
|
123
|
-
n = n || document;
|
|
124
|
-
do {
|
|
125
|
-
if (e != null && (e[0] === ">" ? o.parentNode === n && pt(o, e) : pt(o, e)) || t && o === n)
|
|
126
|
-
return o;
|
|
127
|
-
if (o === n) break;
|
|
128
|
-
} while (o = cn(o));
|
|
129
|
-
}
|
|
130
|
-
return null;
|
|
131
|
-
}
|
|
132
|
-
var Vt = /\s+/g;
|
|
133
|
-
function ne(o, e, n) {
|
|
134
|
-
if (o && e)
|
|
135
|
-
if (o.classList)
|
|
136
|
-
o.classList[n ? "add" : "remove"](e);
|
|
137
|
-
else {
|
|
138
|
-
var t = (" " + o.className + " ").replace(Vt, " ").replace(" " + e + " ", " ");
|
|
139
|
-
o.className = (t + (n ? " " + e : "")).replace(Vt, " ");
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function E(o, e, n) {
|
|
143
|
-
var t = o && o.style;
|
|
144
|
-
if (t) {
|
|
145
|
-
if (n === void 0)
|
|
146
|
-
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (n = o.currentStyle), e === void 0 ? n : n[e];
|
|
147
|
-
!(e in t) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), t[e] = n + (typeof n == "string" ? "" : "px");
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
function ze(o, e) {
|
|
151
|
-
var n = "";
|
|
152
|
-
if (typeof o == "string")
|
|
153
|
-
n = o;
|
|
154
|
-
else
|
|
155
|
-
do {
|
|
156
|
-
var t = E(o, "transform");
|
|
157
|
-
t && t !== "none" && (n = t + " " + n);
|
|
158
|
-
} while (!e && (o = o.parentNode));
|
|
159
|
-
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
160
|
-
return i && new i(n);
|
|
161
|
-
}
|
|
162
|
-
function fn(o, e, n) {
|
|
163
|
-
if (o) {
|
|
164
|
-
var t = o.getElementsByTagName(e), i = 0, r = t.length;
|
|
165
|
-
if (n)
|
|
166
|
-
for (; i < r; i++)
|
|
167
|
-
n(t[i], i);
|
|
168
|
-
return t;
|
|
169
|
-
}
|
|
170
|
-
return [];
|
|
171
|
-
}
|
|
172
|
-
function ge() {
|
|
173
|
-
var o = document.scrollingElement;
|
|
174
|
-
return o || document.documentElement;
|
|
175
|
-
}
|
|
176
|
-
function X(o, e, n, t, i) {
|
|
177
|
-
if (!(!o.getBoundingClientRect && o !== window)) {
|
|
178
|
-
var r, a, l, s, u, g, f;
|
|
179
|
-
if (o !== window && o.parentNode && o !== ge() ? (r = o.getBoundingClientRect(), a = r.top, l = r.left, s = r.bottom, u = r.right, g = r.height, f = r.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, g = window.innerHeight, f = window.innerWidth), (e || n) && o !== window && (i = i || o.parentNode, !De))
|
|
180
|
-
do
|
|
181
|
-
if (i && i.getBoundingClientRect && (E(i, "transform") !== "none" || n && E(i, "position") !== "static")) {
|
|
182
|
-
var w = i.getBoundingClientRect();
|
|
183
|
-
a -= w.top + parseInt(E(i, "border-top-width")), l -= w.left + parseInt(E(i, "border-left-width")), s = a + r.height, u = l + r.width;
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
while (i = i.parentNode);
|
|
187
|
-
if (t && o !== window) {
|
|
188
|
-
var y = ze(i || o), D = y && y.a, T = y && y.d;
|
|
189
|
-
y && (a /= T, l /= D, f /= D, g /= T, s = a + g, u = l + f);
|
|
190
|
-
}
|
|
191
|
-
return {
|
|
192
|
-
top: a,
|
|
193
|
-
left: l,
|
|
194
|
-
bottom: s,
|
|
195
|
-
right: u,
|
|
196
|
-
width: f,
|
|
197
|
-
height: g
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function Wt(o, e, n) {
|
|
202
|
-
for (var t = xe(o, !0), i = X(o)[e]; t; ) {
|
|
203
|
-
var r = X(t)[n], a = void 0;
|
|
204
|
-
if (a = i >= r, !a) return t;
|
|
205
|
-
if (t === ge()) break;
|
|
206
|
-
t = xe(t, !1);
|
|
207
|
-
}
|
|
208
|
-
return !1;
|
|
209
|
-
}
|
|
210
|
-
function Ke(o, e, n, t) {
|
|
211
|
-
for (var i = 0, r = 0, a = o.children; r < a.length; ) {
|
|
212
|
-
if (a[r].style.display !== "none" && a[r] !== S.ghost && (t || a[r] !== S.dragged) && ce(a[r], n.draggable, o, !1)) {
|
|
213
|
-
if (i === e)
|
|
214
|
-
return a[r];
|
|
215
|
-
i++;
|
|
216
|
-
}
|
|
217
|
-
r++;
|
|
218
|
-
}
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
function Bt(o, e) {
|
|
222
|
-
for (var n = o.lastElementChild; n && (n === S.ghost || E(n, "display") === "none" || e && !pt(n, e)); )
|
|
223
|
-
n = n.previousElementSibling;
|
|
224
|
-
return n || null;
|
|
225
|
-
}
|
|
226
|
-
function le(o, e) {
|
|
227
|
-
var n = 0;
|
|
228
|
-
if (!o || !o.parentNode)
|
|
229
|
-
return -1;
|
|
230
|
-
for (; o = o.previousElementSibling; )
|
|
231
|
-
o.nodeName.toUpperCase() !== "TEMPLATE" && o !== S.clone && (!e || pt(o, e)) && n++;
|
|
232
|
-
return n;
|
|
233
|
-
}
|
|
234
|
-
function Ut(o) {
|
|
235
|
-
var e = 0, n = 0, t = ge();
|
|
236
|
-
if (o)
|
|
237
|
-
do {
|
|
238
|
-
var i = ze(o), r = i.a, a = i.d;
|
|
239
|
-
e += o.scrollLeft * r, n += o.scrollTop * a;
|
|
240
|
-
} while (o !== t && (o = o.parentNode));
|
|
241
|
-
return [e, n];
|
|
242
|
-
}
|
|
243
|
-
function Un(o, e) {
|
|
244
|
-
for (var n in o)
|
|
245
|
-
if (o.hasOwnProperty(n)) {
|
|
246
|
-
for (var t in e)
|
|
247
|
-
if (e.hasOwnProperty(t) && e[t] === o[n][t]) return Number(n);
|
|
248
|
-
}
|
|
249
|
-
return -1;
|
|
250
|
-
}
|
|
251
|
-
function xe(o, e) {
|
|
252
|
-
if (!o || !o.getBoundingClientRect) return ge();
|
|
253
|
-
var n = o, t = !1;
|
|
254
|
-
do
|
|
255
|
-
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
256
|
-
var i = E(n);
|
|
257
|
-
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
258
|
-
if (!n.getBoundingClientRect || n === document.body) return ge();
|
|
259
|
-
if (t || e) return n;
|
|
260
|
-
t = !0;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
while (n = n.parentNode);
|
|
264
|
-
return ge();
|
|
265
|
-
}
|
|
266
|
-
function qn(o, e) {
|
|
267
|
-
if (o && e)
|
|
268
|
-
for (var n in e)
|
|
269
|
-
e.hasOwnProperty(n) && (o[n] = e[n]);
|
|
270
|
-
return o;
|
|
271
|
-
}
|
|
272
|
-
function Et(o, e) {
|
|
273
|
-
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);
|
|
274
|
-
}
|
|
275
|
-
var Ze;
|
|
276
|
-
function hn(o, e) {
|
|
277
|
-
return function() {
|
|
278
|
-
if (!Ze) {
|
|
279
|
-
var n = arguments, t = this;
|
|
280
|
-
n.length === 1 ? o.call(t, n[0]) : o.apply(t, n), Ze = setTimeout(function() {
|
|
281
|
-
Ze = void 0;
|
|
282
|
-
}, e);
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
function Zn() {
|
|
287
|
-
clearTimeout(Ze), Ze = void 0;
|
|
288
|
-
}
|
|
289
|
-
function pn(o, e, n) {
|
|
290
|
-
o.scrollLeft += e, o.scrollTop += n;
|
|
291
|
-
}
|
|
292
|
-
function gn(o) {
|
|
293
|
-
var e = window.Polymer, n = window.jQuery || window.Zepto;
|
|
294
|
-
return e && e.dom ? e.dom(o).cloneNode(!0) : n ? n(o).clone(!0)[0] : o.cloneNode(!0);
|
|
295
|
-
}
|
|
296
|
-
function mn(o, e, n) {
|
|
297
|
-
var t = {};
|
|
298
|
-
return Array.from(o.children).forEach(function(i) {
|
|
299
|
-
var r, a, l, s;
|
|
300
|
-
if (!(!ce(i, e.draggable, o, !1) || i.animated || i === n)) {
|
|
301
|
-
var u = X(i);
|
|
302
|
-
t.left = Math.min((r = t.left) !== null && r !== void 0 ? r : 1 / 0, u.left), t.top = Math.min((a = t.top) !== null && a !== void 0 ? a : 1 / 0, u.top), t.right = Math.max((l = t.right) !== null && l !== void 0 ? l : -1 / 0, u.right), t.bottom = Math.max((s = t.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
|
|
303
|
-
}
|
|
304
|
-
}), t.width = t.right - t.left, t.height = t.bottom - t.top, t.x = t.left, t.y = t.top, t;
|
|
305
|
-
}
|
|
306
|
-
var te = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
307
|
-
function Qn() {
|
|
308
|
-
var o = [], e;
|
|
309
|
-
return {
|
|
310
|
-
captureAnimationState: function() {
|
|
311
|
-
if (o = [], !!this.options.animation) {
|
|
312
|
-
var t = [].slice.call(this.el.children);
|
|
313
|
-
t.forEach(function(i) {
|
|
314
|
-
if (!(E(i, "display") === "none" || i === S.ghost)) {
|
|
315
|
-
o.push({
|
|
316
|
-
target: i,
|
|
317
|
-
rect: X(i)
|
|
318
|
-
});
|
|
319
|
-
var r = me({}, o[o.length - 1].rect);
|
|
320
|
-
if (i.thisAnimationDuration) {
|
|
321
|
-
var a = ze(i, !0);
|
|
322
|
-
a && (r.top -= a.f, r.left -= a.e);
|
|
323
|
-
}
|
|
324
|
-
i.fromRect = r;
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
addAnimationState: function(t) {
|
|
330
|
-
o.push(t);
|
|
331
|
-
},
|
|
332
|
-
removeAnimationState: function(t) {
|
|
333
|
-
o.splice(Un(o, {
|
|
334
|
-
target: t
|
|
335
|
-
}), 1);
|
|
336
|
-
},
|
|
337
|
-
animateAll: function(t) {
|
|
338
|
-
var i = this;
|
|
339
|
-
if (!this.options.animation) {
|
|
340
|
-
clearTimeout(e), typeof t == "function" && t();
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
343
|
-
var r = !1, a = 0;
|
|
344
|
-
o.forEach(function(l) {
|
|
345
|
-
var s = 0, u = l.target, g = u.fromRect, f = X(u), w = u.prevFromRect, y = u.prevToRect, D = l.rect, T = ze(u, !0);
|
|
346
|
-
T && (f.top -= T.f, f.left -= T.e), u.toRect = f, u.thisAnimationDuration && Et(w, f) && !Et(g, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
347
|
-
(D.top - f.top) / (D.left - f.left) === (g.top - f.top) / (g.left - f.left) && (s = eo(D, w, y, i.options)), Et(f, g) || (u.prevFromRect = g, u.prevToRect = f, s || (s = i.options.animation), i.animate(u, D, f, s)), s && (r = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
348
|
-
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
349
|
-
}, s), u.thisAnimationDuration = s);
|
|
350
|
-
}), clearTimeout(e), r ? e = setTimeout(function() {
|
|
351
|
-
typeof t == "function" && t();
|
|
352
|
-
}, a) : typeof t == "function" && t(), o = [];
|
|
353
|
-
},
|
|
354
|
-
animate: function(t, i, r, a) {
|
|
355
|
-
if (a) {
|
|
356
|
-
E(t, "transition", ""), E(t, "transform", "");
|
|
357
|
-
var l = ze(this.el), s = l && l.a, u = l && l.d, g = (i.left - r.left) / (s || 1), f = (i.top - r.top) / (u || 1);
|
|
358
|
-
t.animatingX = !!g, t.animatingY = !!f, E(t, "transform", "translate3d(" + g + "px," + f + "px,0)"), this.forRepaintDummy = Jn(t), E(t, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), E(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
359
|
-
E(t, "transition", ""), E(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
360
|
-
}, a);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
function Jn(o) {
|
|
366
|
-
return o.offsetWidth;
|
|
367
|
-
}
|
|
368
|
-
function eo(o, e, n, t) {
|
|
369
|
-
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;
|
|
370
|
-
}
|
|
371
|
-
var Pe = [], St = {
|
|
372
|
-
initializeByDefault: !0
|
|
373
|
-
}, nt = {
|
|
374
|
-
mount: function(e) {
|
|
375
|
-
for (var n in St)
|
|
376
|
-
St.hasOwnProperty(n) && !(n in e) && (e[n] = St[n]);
|
|
377
|
-
Pe.forEach(function(t) {
|
|
378
|
-
if (t.pluginName === e.pluginName)
|
|
379
|
-
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
380
|
-
}), Pe.push(e);
|
|
381
|
-
},
|
|
382
|
-
pluginEvent: function(e, n, t) {
|
|
383
|
-
var i = this;
|
|
384
|
-
this.eventCanceled = !1, t.cancel = function() {
|
|
385
|
-
i.eventCanceled = !0;
|
|
386
|
-
};
|
|
387
|
-
var r = e + "Global";
|
|
388
|
-
Pe.forEach(function(a) {
|
|
389
|
-
n[a.pluginName] && (n[a.pluginName][r] && n[a.pluginName][r](me({
|
|
390
|
-
sortable: n
|
|
391
|
-
}, t)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](me({
|
|
392
|
-
sortable: n
|
|
393
|
-
}, t)));
|
|
394
|
-
});
|
|
395
|
-
},
|
|
396
|
-
initializePlugins: function(e, n, t, i) {
|
|
397
|
-
Pe.forEach(function(l) {
|
|
398
|
-
var s = l.pluginName;
|
|
399
|
-
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
400
|
-
var u = new l(e, n, e.options);
|
|
401
|
-
u.sortable = e, u.options = e.options, e[s] = u, _e(t, u.defaults);
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
for (var r in e.options)
|
|
405
|
-
if (e.options.hasOwnProperty(r)) {
|
|
406
|
-
var a = this.modifyOption(e, r, e.options[r]);
|
|
407
|
-
typeof a < "u" && (e.options[r] = a);
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
getEventProperties: function(e, n) {
|
|
411
|
-
var t = {};
|
|
412
|
-
return Pe.forEach(function(i) {
|
|
413
|
-
typeof i.eventProperties == "function" && _e(t, i.eventProperties.call(n[i.pluginName], e));
|
|
414
|
-
}), t;
|
|
415
|
-
},
|
|
416
|
-
modifyOption: function(e, n, t) {
|
|
417
|
-
var i;
|
|
418
|
-
return Pe.forEach(function(r) {
|
|
419
|
-
e[r.pluginName] && r.optionListeners && typeof r.optionListeners[n] == "function" && (i = r.optionListeners[n].call(e[r.pluginName], t));
|
|
420
|
-
}), i;
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
function to(o) {
|
|
424
|
-
var e = o.sortable, n = o.rootEl, t = o.name, i = o.targetEl, r = o.cloneEl, a = o.toEl, l = o.fromEl, s = o.oldIndex, u = o.newIndex, g = o.oldDraggableIndex, f = o.newDraggableIndex, w = o.originalEvent, y = o.putSortable, D = o.extraEventProperties;
|
|
425
|
-
if (e = e || n && n[te], !!e) {
|
|
426
|
-
var T, $ = e.options, j = "on" + t.charAt(0).toUpperCase() + t.substr(1);
|
|
427
|
-
window.CustomEvent && !De && !tt ? T = new CustomEvent(t, {
|
|
428
|
-
bubbles: !0,
|
|
429
|
-
cancelable: !0
|
|
430
|
-
}) : (T = document.createEvent("Event"), T.initEvent(t, !0, !0)), T.to = a || n, T.from = l || n, T.item = i || n, T.clone = r, T.oldIndex = s, T.newIndex = u, T.oldDraggableIndex = g, T.newDraggableIndex = f, T.originalEvent = w, T.pullMode = y ? y.lastPutMode : void 0;
|
|
431
|
-
var N = me(me({}, D), nt.getEventProperties(t, e));
|
|
432
|
-
for (var z in N)
|
|
433
|
-
T[z] = N[z];
|
|
434
|
-
n && n.dispatchEvent(T), $[j] && $[j].call(e, T);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
var no = ["evt"], ee = function(e, n) {
|
|
438
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.evt, r = Vn(t, no);
|
|
439
|
-
nt.pluginEvent.bind(S)(e, n, me({
|
|
440
|
-
dragEl: d,
|
|
441
|
-
parentEl: R,
|
|
442
|
-
ghostEl: _,
|
|
443
|
-
rootEl: F,
|
|
444
|
-
nextEl: Ne,
|
|
445
|
-
lastDownEl: dt,
|
|
446
|
-
cloneEl: B,
|
|
447
|
-
cloneHidden: Te,
|
|
448
|
-
dragStarted: je,
|
|
449
|
-
putSortable: H,
|
|
450
|
-
activeSortable: S.active,
|
|
451
|
-
originalEvent: i,
|
|
452
|
-
oldIndex: Re,
|
|
453
|
-
oldDraggableIndex: Qe,
|
|
454
|
-
newIndex: oe,
|
|
455
|
-
newDraggableIndex: Ce,
|
|
456
|
-
hideGhostForTarget: wn,
|
|
457
|
-
unhideGhostForTarget: En,
|
|
458
|
-
cloneNowHidden: function() {
|
|
459
|
-
Te = !0;
|
|
460
|
-
},
|
|
461
|
-
cloneNowShown: function() {
|
|
462
|
-
Te = !1;
|
|
463
|
-
},
|
|
464
|
-
dispatchSortableEvent: function(l) {
|
|
465
|
-
Q({
|
|
466
|
-
sortable: n,
|
|
467
|
-
name: l,
|
|
468
|
-
originalEvent: i
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
}, r));
|
|
472
|
-
};
|
|
473
|
-
function Q(o) {
|
|
474
|
-
to(me({
|
|
475
|
-
putSortable: H,
|
|
476
|
-
cloneEl: B,
|
|
477
|
-
targetEl: d,
|
|
478
|
-
rootEl: F,
|
|
479
|
-
oldIndex: Re,
|
|
480
|
-
oldDraggableIndex: Qe,
|
|
481
|
-
newIndex: oe,
|
|
482
|
-
newDraggableIndex: Ce
|
|
483
|
-
}, o));
|
|
484
|
-
}
|
|
485
|
-
var d, R, _, F, Ne, dt, B, Te, Re, oe, Qe, Ce, it, H, Me = !1, gt = !1, mt = [], Oe, de, _t, Dt, qt, Zt, je, Fe, Je, et = !1, rt = !1, ct, U, Ct = [], Nt = !1, vt = [], bt = typeof document < "u", at = Mt, Qt = tt || De ? "cssFloat" : "float", oo = bt && !un && !Mt && "draggable" in document.createElement("div"), vn = function() {
|
|
486
|
-
if (bt) {
|
|
487
|
-
if (De)
|
|
488
|
-
return !1;
|
|
489
|
-
var o = document.createElement("x");
|
|
490
|
-
return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
|
|
491
|
-
}
|
|
492
|
-
}(), yn = function(e, n) {
|
|
493
|
-
var t = E(e), i = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), r = Ke(e, 0, n), a = Ke(e, 1, n), l = r && E(r), s = a && E(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + X(r).width, g = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + X(a).width;
|
|
494
|
-
if (t.display === "flex")
|
|
495
|
-
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
496
|
-
if (t.display === "grid")
|
|
497
|
-
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
498
|
-
if (r && l.float && l.float !== "none") {
|
|
499
|
-
var f = l.float === "left" ? "left" : "right";
|
|
500
|
-
return a && (s.clear === "both" || s.clear === f) ? "vertical" : "horizontal";
|
|
501
|
-
}
|
|
502
|
-
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= i && t[Qt] === "none" || a && t[Qt] === "none" && u + g > i) ? "vertical" : "horizontal";
|
|
503
|
-
}, io = function(e, n, t) {
|
|
504
|
-
var i = t ? e.left : e.top, r = t ? e.right : e.bottom, a = t ? e.width : e.height, l = t ? n.left : n.top, s = t ? n.right : n.bottom, u = t ? n.width : n.height;
|
|
505
|
-
return i === l || r === s || i + a / 2 === l + u / 2;
|
|
506
|
-
}, ro = function(e, n) {
|
|
507
|
-
var t;
|
|
508
|
-
return mt.some(function(i) {
|
|
509
|
-
var r = i[te].options.emptyInsertThreshold;
|
|
510
|
-
if (!(!r || Bt(i))) {
|
|
511
|
-
var a = X(i), l = e >= a.left - r && e <= a.right + r, s = n >= a.top - r && n <= a.bottom + r;
|
|
512
|
-
if (l && s)
|
|
513
|
-
return t = i;
|
|
514
|
-
}
|
|
515
|
-
}), t;
|
|
516
|
-
}, bn = function(e) {
|
|
517
|
-
function n(r, a) {
|
|
518
|
-
return function(l, s, u, g) {
|
|
519
|
-
var f = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
520
|
-
if (r == null && (a || f))
|
|
521
|
-
return !0;
|
|
522
|
-
if (r == null || r === !1)
|
|
523
|
-
return !1;
|
|
524
|
-
if (a && r === "clone")
|
|
525
|
-
return r;
|
|
526
|
-
if (typeof r == "function")
|
|
527
|
-
return n(r(l, s, u, g), a)(l, s, u, g);
|
|
528
|
-
var w = (a ? l : s).options.group.name;
|
|
529
|
-
return r === !0 || typeof r == "string" && r === w || r.join && r.indexOf(w) > -1;
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
var t = {}, i = e.group;
|
|
533
|
-
(!i || ut(i) != "object") && (i = {
|
|
534
|
-
name: i
|
|
535
|
-
}), t.name = i.name, t.checkPull = n(i.pull, !0), t.checkPut = n(i.put), t.revertClone = i.revertClone, e.group = t;
|
|
536
|
-
}, wn = function() {
|
|
537
|
-
!vn && _ && E(_, "display", "none");
|
|
538
|
-
}, En = function() {
|
|
539
|
-
!vn && _ && E(_, "display", "");
|
|
540
|
-
};
|
|
541
|
-
bt && !un && document.addEventListener("click", function(o) {
|
|
542
|
-
if (gt)
|
|
543
|
-
return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), gt = !1, !1;
|
|
544
|
-
}, !0);
|
|
545
|
-
var ke = function(e) {
|
|
546
|
-
if (d) {
|
|
547
|
-
e = e.touches ? e.touches[0] : e;
|
|
548
|
-
var n = ro(e.clientX, e.clientY);
|
|
549
|
-
if (n) {
|
|
550
|
-
var t = {};
|
|
551
|
-
for (var i in e)
|
|
552
|
-
e.hasOwnProperty(i) && (t[i] = e[i]);
|
|
553
|
-
t.target = t.rootEl = n, t.preventDefault = void 0, t.stopPropagation = void 0, n[te]._onDragOver(t);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
}, ao = function(e) {
|
|
557
|
-
d && d.parentNode[te]._isOutsideThisEl(e.target);
|
|
558
|
-
};
|
|
559
|
-
function S(o, e) {
|
|
560
|
-
if (!(o && o.nodeType && o.nodeType === 1))
|
|
561
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
|
|
562
|
-
this.el = o, this.options = e = _e({}, e), o[te] = this;
|
|
563
|
-
var n = {
|
|
564
|
-
group: null,
|
|
565
|
-
sort: !0,
|
|
566
|
-
disabled: !1,
|
|
567
|
-
store: null,
|
|
568
|
-
handle: null,
|
|
569
|
-
draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
|
|
570
|
-
swapThreshold: 1,
|
|
571
|
-
// percentage; 0 <= x <= 1
|
|
572
|
-
invertSwap: !1,
|
|
573
|
-
// invert always
|
|
574
|
-
invertedSwapThreshold: null,
|
|
575
|
-
// will be set to same as swapThreshold if default
|
|
576
|
-
removeCloneOnHide: !0,
|
|
577
|
-
direction: function() {
|
|
578
|
-
return yn(o, this.options);
|
|
579
|
-
},
|
|
580
|
-
ghostClass: "sortable-ghost",
|
|
581
|
-
chosenClass: "sortable-chosen",
|
|
582
|
-
dragClass: "sortable-drag",
|
|
583
|
-
ignore: "a, img",
|
|
584
|
-
filter: null,
|
|
585
|
-
preventOnFilter: !0,
|
|
586
|
-
animation: 0,
|
|
587
|
-
easing: null,
|
|
588
|
-
setData: function(a, l) {
|
|
589
|
-
a.setData("Text", l.textContent);
|
|
590
|
-
},
|
|
591
|
-
dropBubble: !1,
|
|
592
|
-
dragoverBubble: !1,
|
|
593
|
-
dataIdAttr: "data-id",
|
|
594
|
-
delay: 0,
|
|
595
|
-
delayOnTouchOnly: !1,
|
|
596
|
-
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
597
|
-
forceFallback: !1,
|
|
598
|
-
fallbackClass: "sortable-fallback",
|
|
599
|
-
fallbackOnBody: !1,
|
|
600
|
-
fallbackTolerance: 0,
|
|
601
|
-
fallbackOffset: {
|
|
602
|
-
x: 0,
|
|
603
|
-
y: 0
|
|
604
|
-
},
|
|
605
|
-
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
606
|
-
supportPointer: S.supportPointer !== !1 && "PointerEvent" in window && (!qe || Mt),
|
|
607
|
-
emptyInsertThreshold: 5
|
|
608
|
-
};
|
|
609
|
-
nt.initializePlugins(this, o, n);
|
|
610
|
-
for (var t in n)
|
|
611
|
-
!(t in e) && (e[t] = n[t]);
|
|
612
|
-
bn(e);
|
|
613
|
-
for (var i in this)
|
|
614
|
-
i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
615
|
-
this.nativeDraggable = e.forceFallback ? !1 : oo, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? I(o, "pointerdown", this._onTapStart) : (I(o, "mousedown", this._onTapStart), I(o, "touchstart", this._onTapStart)), this.nativeDraggable && (I(o, "dragover", this), I(o, "dragenter", this)), mt.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), _e(this, Qn());
|
|
616
|
-
}
|
|
617
|
-
S.prototype = /** @lends Sortable.prototype */
|
|
618
|
-
{
|
|
619
|
-
constructor: S,
|
|
620
|
-
_isOutsideThisEl: function(e) {
|
|
621
|
-
!this.el.contains(e) && e !== this.el && (Fe = null);
|
|
622
|
-
},
|
|
623
|
-
_getDirection: function(e, n) {
|
|
624
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, d) : this.options.direction;
|
|
625
|
-
},
|
|
626
|
-
_onTapStart: function(e) {
|
|
627
|
-
if (e.cancelable) {
|
|
628
|
-
var n = this, t = this.el, i = this.options, r = i.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, g = i.filter;
|
|
629
|
-
if (go(t), !d && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || i.disabled) && !u.isContentEditable && !(!this.nativeDraggable && qe && s && s.tagName.toUpperCase() === "SELECT") && (s = ce(s, i.draggable, t, !1), !(s && s.animated) && dt !== s)) {
|
|
630
|
-
if (Re = le(s), Qe = le(s, i.draggable), typeof g == "function") {
|
|
631
|
-
if (g.call(this, e, s, this)) {
|
|
632
|
-
Q({
|
|
633
|
-
sortable: n,
|
|
634
|
-
rootEl: u,
|
|
635
|
-
name: "filter",
|
|
636
|
-
targetEl: s,
|
|
637
|
-
toEl: t,
|
|
638
|
-
fromEl: t
|
|
639
|
-
}), ee("filter", n, {
|
|
640
|
-
evt: e
|
|
641
|
-
}), r && e.preventDefault();
|
|
642
|
-
return;
|
|
643
|
-
}
|
|
644
|
-
} else if (g && (g = g.split(",").some(function(f) {
|
|
645
|
-
if (f = ce(u, f.trim(), t, !1), f)
|
|
646
|
-
return Q({
|
|
647
|
-
sortable: n,
|
|
648
|
-
rootEl: f,
|
|
649
|
-
name: "filter",
|
|
650
|
-
targetEl: s,
|
|
651
|
-
fromEl: t,
|
|
652
|
-
toEl: t
|
|
653
|
-
}), ee("filter", n, {
|
|
654
|
-
evt: e
|
|
655
|
-
}), !0;
|
|
656
|
-
}), g)) {
|
|
657
|
-
r && e.preventDefault();
|
|
658
|
-
return;
|
|
659
|
-
}
|
|
660
|
-
i.handle && !ce(u, i.handle, t, !1) || this._prepareDragStart(e, l, s);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
_prepareDragStart: function(e, n, t) {
|
|
665
|
-
var i = this, r = i.el, a = i.options, l = r.ownerDocument, s;
|
|
666
|
-
if (t && !d && t.parentNode === r) {
|
|
667
|
-
var u = X(t);
|
|
668
|
-
if (F = r, d = t, R = d.parentNode, Ne = d.nextSibling, dt = t, it = a.group, S.dragged = d, Oe = {
|
|
669
|
-
target: d,
|
|
670
|
-
clientX: (n || e).clientX,
|
|
671
|
-
clientY: (n || e).clientY
|
|
672
|
-
}, qt = Oe.clientX - u.left, Zt = Oe.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, d.style["will-change"] = "all", s = function() {
|
|
673
|
-
if (ee("delayEnded", i, {
|
|
674
|
-
evt: e
|
|
675
|
-
}), S.eventCanceled) {
|
|
676
|
-
i._onDrop();
|
|
677
|
-
return;
|
|
678
|
-
}
|
|
679
|
-
i._disableDelayedDragEvents(), !jt && i.nativeDraggable && (d.draggable = !0), i._triggerDragStart(e, n), Q({
|
|
680
|
-
sortable: i,
|
|
681
|
-
name: "choose",
|
|
682
|
-
originalEvent: e
|
|
683
|
-
}), ne(d, a.chosenClass, !0);
|
|
684
|
-
}, a.ignore.split(",").forEach(function(g) {
|
|
685
|
-
fn(d, g.trim(), Tt);
|
|
686
|
-
}), I(l, "dragover", ke), I(l, "mousemove", ke), I(l, "touchmove", ke), a.supportPointer ? (I(l, "pointerup", i._onDrop), !this.nativeDraggable && I(l, "pointercancel", i._onDrop)) : (I(l, "mouseup", i._onDrop), I(l, "touchend", i._onDrop), I(l, "touchcancel", i._onDrop)), jt && this.nativeDraggable && (this.options.touchStartThreshold = 4, d.draggable = !0), ee("delayStart", this, {
|
|
687
|
-
evt: e
|
|
688
|
-
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(tt || De))) {
|
|
689
|
-
if (S.eventCanceled) {
|
|
690
|
-
this._onDrop();
|
|
691
|
-
return;
|
|
692
|
-
}
|
|
693
|
-
a.supportPointer ? (I(l, "pointerup", i._disableDelayedDrag), I(l, "pointercancel", i._disableDelayedDrag)) : (I(l, "mouseup", i._disableDelayedDrag), I(l, "touchend", i._disableDelayedDrag), I(l, "touchcancel", i._disableDelayedDrag)), I(l, "mousemove", i._delayedDragTouchMoveHandler), I(l, "touchmove", i._delayedDragTouchMoveHandler), a.supportPointer && I(l, "pointermove", i._delayedDragTouchMoveHandler), i._dragStartTimer = setTimeout(s, a.delay);
|
|
694
|
-
} else
|
|
695
|
-
s();
|
|
696
|
-
}
|
|
697
|
-
},
|
|
698
|
-
_delayedDragTouchMoveHandler: function(e) {
|
|
699
|
-
var n = e.touches ? e.touches[0] : e;
|
|
700
|
-
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();
|
|
701
|
-
},
|
|
702
|
-
_disableDelayedDrag: function() {
|
|
703
|
-
d && Tt(d), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
704
|
-
},
|
|
705
|
-
_disableDelayedDragEvents: function() {
|
|
706
|
-
var e = this.el.ownerDocument;
|
|
707
|
-
x(e, "mouseup", this._disableDelayedDrag), x(e, "touchend", this._disableDelayedDrag), x(e, "touchcancel", this._disableDelayedDrag), x(e, "pointerup", this._disableDelayedDrag), x(e, "pointercancel", this._disableDelayedDrag), x(e, "mousemove", this._delayedDragTouchMoveHandler), x(e, "touchmove", this._delayedDragTouchMoveHandler), x(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
708
|
-
},
|
|
709
|
-
_triggerDragStart: function(e, n) {
|
|
710
|
-
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : n ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(d, "dragend", this), I(F, "dragstart", this._onDragStart));
|
|
711
|
-
try {
|
|
712
|
-
document.selection ? ft(function() {
|
|
713
|
-
document.selection.empty();
|
|
714
|
-
}) : window.getSelection().removeAllRanges();
|
|
715
|
-
} catch {
|
|
716
|
-
}
|
|
717
|
-
},
|
|
718
|
-
_dragStarted: function(e, n) {
|
|
719
|
-
if (Me = !1, F && d) {
|
|
720
|
-
ee("dragStarted", this, {
|
|
721
|
-
evt: n
|
|
722
|
-
}), this.nativeDraggable && I(document, "dragover", ao);
|
|
723
|
-
var t = this.options;
|
|
724
|
-
!e && ne(d, t.dragClass, !1), ne(d, t.ghostClass, !0), S.active = this, e && this._appendGhost(), Q({
|
|
725
|
-
sortable: this,
|
|
726
|
-
name: "start",
|
|
727
|
-
originalEvent: n
|
|
728
|
-
});
|
|
729
|
-
} else
|
|
730
|
-
this._nulling();
|
|
731
|
-
},
|
|
732
|
-
_emulateDragOver: function() {
|
|
733
|
-
if (de) {
|
|
734
|
-
this._lastX = de.clientX, this._lastY = de.clientY, wn();
|
|
735
|
-
for (var e = document.elementFromPoint(de.clientX, de.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(de.clientX, de.clientY), e !== n); )
|
|
736
|
-
n = e;
|
|
737
|
-
if (d.parentNode[te]._isOutsideThisEl(e), n)
|
|
738
|
-
do {
|
|
739
|
-
if (n[te]) {
|
|
740
|
-
var t = void 0;
|
|
741
|
-
if (t = n[te]._onDragOver({
|
|
742
|
-
clientX: de.clientX,
|
|
743
|
-
clientY: de.clientY,
|
|
744
|
-
target: e,
|
|
745
|
-
rootEl: n
|
|
746
|
-
}), t && !this.options.dragoverBubble)
|
|
747
|
-
break;
|
|
748
|
-
}
|
|
749
|
-
e = n;
|
|
750
|
-
} while (n = cn(n));
|
|
751
|
-
En();
|
|
752
|
-
}
|
|
753
|
-
},
|
|
754
|
-
_onTouchMove: function(e) {
|
|
755
|
-
if (Oe) {
|
|
756
|
-
var n = this.options, t = n.fallbackTolerance, i = n.fallbackOffset, r = e.touches ? e.touches[0] : e, a = _ && ze(_, !0), l = _ && a && a.a, s = _ && a && a.d, u = at && U && Ut(U), g = (r.clientX - Oe.clientX + i.x) / (l || 1) + (u ? u[0] - Ct[0] : 0) / (l || 1), f = (r.clientY - Oe.clientY + i.y) / (s || 1) + (u ? u[1] - Ct[1] : 0) / (s || 1);
|
|
757
|
-
if (!S.active && !Me) {
|
|
758
|
-
if (t && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < t)
|
|
759
|
-
return;
|
|
760
|
-
this._onDragStart(e, !0);
|
|
761
|
-
}
|
|
762
|
-
if (_) {
|
|
763
|
-
a ? (a.e += g - (_t || 0), a.f += f - (Dt || 0)) : a = {
|
|
764
|
-
a: 1,
|
|
765
|
-
b: 0,
|
|
766
|
-
c: 0,
|
|
767
|
-
d: 1,
|
|
768
|
-
e: g,
|
|
769
|
-
f
|
|
770
|
-
};
|
|
771
|
-
var w = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
772
|
-
E(_, "webkitTransform", w), E(_, "mozTransform", w), E(_, "msTransform", w), E(_, "transform", w), _t = g, Dt = f, de = r;
|
|
773
|
-
}
|
|
774
|
-
e.cancelable && e.preventDefault();
|
|
775
|
-
}
|
|
776
|
-
},
|
|
777
|
-
_appendGhost: function() {
|
|
778
|
-
if (!_) {
|
|
779
|
-
var e = this.options.fallbackOnBody ? document.body : F, n = X(d, !0, at, !0, e), t = this.options;
|
|
780
|
-
if (at) {
|
|
781
|
-
for (U = e; E(U, "position") === "static" && E(U, "transform") === "none" && U !== document; )
|
|
782
|
-
U = U.parentNode;
|
|
783
|
-
U !== document.body && U !== document.documentElement ? (U === document && (U = ge()), n.top += U.scrollTop, n.left += U.scrollLeft) : U = ge(), Ct = Ut(U);
|
|
784
|
-
}
|
|
785
|
-
_ = d.cloneNode(!0), ne(_, t.ghostClass, !1), ne(_, t.fallbackClass, !0), ne(_, t.dragClass, !0), E(_, "transition", ""), E(_, "transform", ""), E(_, "box-sizing", "border-box"), E(_, "margin", 0), E(_, "top", n.top), E(_, "left", n.left), E(_, "width", n.width), E(_, "height", n.height), E(_, "opacity", "0.8"), E(_, "position", at ? "absolute" : "fixed"), E(_, "zIndex", "100000"), E(_, "pointerEvents", "none"), S.ghost = _, e.appendChild(_), E(_, "transform-origin", qt / parseInt(_.style.width) * 100 + "% " + Zt / parseInt(_.style.height) * 100 + "%");
|
|
786
|
-
}
|
|
787
|
-
},
|
|
788
|
-
_onDragStart: function(e, n) {
|
|
789
|
-
var t = this, i = e.dataTransfer, r = t.options;
|
|
790
|
-
if (ee("dragStart", this, {
|
|
791
|
-
evt: e
|
|
792
|
-
}), S.eventCanceled) {
|
|
793
|
-
this._onDrop();
|
|
794
|
-
return;
|
|
795
|
-
}
|
|
796
|
-
ee("setupClone", this), S.eventCanceled || (B = gn(d), B.removeAttribute("id"), B.draggable = !1, B.style["will-change"] = "", this._hideClone(), ne(B, this.options.chosenClass, !1), S.clone = B), t.cloneId = ft(function() {
|
|
797
|
-
ee("clone", t), !S.eventCanceled && (t.options.removeCloneOnHide || F.insertBefore(B, d), t._hideClone(), Q({
|
|
798
|
-
sortable: t,
|
|
799
|
-
name: "clone"
|
|
800
|
-
}));
|
|
801
|
-
}), !n && ne(d, r.dragClass, !0), n ? (gt = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (x(document, "mouseup", t._onDrop), x(document, "touchend", t._onDrop), x(document, "touchcancel", t._onDrop), i && (i.effectAllowed = "move", r.setData && r.setData.call(t, i, d)), I(document, "drop", t), E(d, "transform", "translateZ(0)")), Me = !0, t._dragStartId = ft(t._dragStarted.bind(t, n, e)), I(document, "selectstart", t), je = !0, window.getSelection().removeAllRanges(), qe && E(document.body, "user-select", "none");
|
|
802
|
-
},
|
|
803
|
-
// Returns true - if no further action is needed (either inserted or another condition)
|
|
804
|
-
_onDragOver: function(e) {
|
|
805
|
-
var n = this.el, t = e.target, i, r, a, l = this.options, s = l.group, u = S.active, g = it === s, f = l.sort, w = H || u, y, D = this, T = !1;
|
|
806
|
-
if (Nt) return;
|
|
807
|
-
function $(O, ae) {
|
|
808
|
-
ee(O, D, me({
|
|
809
|
-
evt: e,
|
|
810
|
-
isOwner: g,
|
|
811
|
-
axis: y ? "vertical" : "horizontal",
|
|
812
|
-
revert: a,
|
|
813
|
-
dragRect: i,
|
|
814
|
-
targetRect: r,
|
|
815
|
-
canSort: f,
|
|
816
|
-
fromSortable: w,
|
|
817
|
-
target: t,
|
|
818
|
-
completed: N,
|
|
819
|
-
onMove: function(Z, p) {
|
|
820
|
-
return lt(F, n, d, i, Z, X(Z), e, p);
|
|
821
|
-
},
|
|
822
|
-
changed: z
|
|
823
|
-
}, ae));
|
|
824
|
-
}
|
|
825
|
-
function j() {
|
|
826
|
-
$("dragOverAnimationCapture"), D.captureAnimationState(), D !== w && w.captureAnimationState();
|
|
827
|
-
}
|
|
828
|
-
function N(O) {
|
|
829
|
-
return $("dragOverCompleted", {
|
|
830
|
-
insertion: O
|
|
831
|
-
}), O && (g ? u._hideClone() : u._showClone(D), D !== w && (ne(d, H ? H.options.ghostClass : u.options.ghostClass, !1), ne(d, l.ghostClass, !0)), H !== D && D !== S.active ? H = D : D === S.active && H && (H = null), w === D && (D._ignoreWhileAnimating = t), D.animateAll(function() {
|
|
832
|
-
$("dragOverAnimationComplete"), D._ignoreWhileAnimating = null;
|
|
833
|
-
}), D !== w && (w.animateAll(), w._ignoreWhileAnimating = null)), (t === d && !d.animated || t === n && !t.animated) && (Fe = null), !l.dragoverBubble && !e.rootEl && t !== document && (d.parentNode[te]._isOutsideThisEl(e.target), !O && ke(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), T = !0;
|
|
834
|
-
}
|
|
835
|
-
function z() {
|
|
836
|
-
oe = le(d), Ce = le(d, l.draggable), Q({
|
|
837
|
-
sortable: D,
|
|
838
|
-
name: "change",
|
|
839
|
-
toEl: n,
|
|
840
|
-
newIndex: oe,
|
|
841
|
-
newDraggableIndex: Ce,
|
|
842
|
-
originalEvent: e
|
|
843
|
-
});
|
|
844
|
-
}
|
|
845
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = ce(t, l.draggable, n, !0), $("dragOver"), S.eventCanceled) return T;
|
|
846
|
-
if (d.contains(e.target) || t.animated && t.animatingX && t.animatingY || D._ignoreWhileAnimating === t)
|
|
847
|
-
return N(!1);
|
|
848
|
-
if (gt = !1, u && !l.disabled && (g ? f || (a = R !== F) : H === this || (this.lastPutMode = it.checkPull(this, u, d, e)) && s.checkPut(this, u, d, e))) {
|
|
849
|
-
if (y = this._getDirection(e, t) === "vertical", i = X(d), $("dragOverValid"), S.eventCanceled) return T;
|
|
850
|
-
if (a)
|
|
851
|
-
return R = F, j(), this._hideClone(), $("revert"), S.eventCanceled || (Ne ? F.insertBefore(d, Ne) : F.appendChild(d)), N(!0);
|
|
852
|
-
var A = Bt(n, l.draggable);
|
|
853
|
-
if (!A || co(e, y, this) && !A.animated) {
|
|
854
|
-
if (A === d)
|
|
855
|
-
return N(!1);
|
|
856
|
-
if (A && n === e.target && (t = A), t && (r = X(t)), lt(F, n, d, i, t, r, e, !!t) !== !1)
|
|
857
|
-
return j(), A && A.nextSibling ? n.insertBefore(d, A.nextSibling) : n.appendChild(d), R = n, z(), N(!0);
|
|
858
|
-
} else if (A && uo(e, y, this)) {
|
|
859
|
-
var q = Ke(n, 0, l, !0);
|
|
860
|
-
if (q === d)
|
|
861
|
-
return N(!1);
|
|
862
|
-
if (t = q, r = X(t), lt(F, n, d, i, t, r, e, !1) !== !1)
|
|
863
|
-
return j(), n.insertBefore(d, q), R = n, z(), N(!0);
|
|
864
|
-
} else if (t.parentNode === n) {
|
|
865
|
-
r = X(t);
|
|
866
|
-
var L = 0, se, ie = d.parentNode !== n, P = !io(d.animated && d.toRect || i, t.animated && t.toRect || r, y), ve = y ? "top" : "left", re = Wt(t, "top", "top") || Wt(d, "top", "top"), ye = re ? re.scrollTop : void 0;
|
|
867
|
-
Fe !== t && (se = r[ve], et = !1, rt = !P && l.invertSwap || ie), L = fo(e, t, r, y, P ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, rt, Fe === t);
|
|
868
|
-
var V;
|
|
869
|
-
if (L !== 0) {
|
|
870
|
-
var Y = le(d);
|
|
871
|
-
do
|
|
872
|
-
Y -= L, V = R.children[Y];
|
|
873
|
-
while (V && (E(V, "display") === "none" || V === _));
|
|
874
|
-
}
|
|
875
|
-
if (L === 0 || V === t)
|
|
876
|
-
return N(!1);
|
|
877
|
-
Fe = t, Je = L;
|
|
878
|
-
var he = t.nextElementSibling, J = !1;
|
|
879
|
-
J = L === 1;
|
|
880
|
-
var b = lt(F, n, d, i, t, r, e, J);
|
|
881
|
-
if (b !== !1)
|
|
882
|
-
return (b === 1 || b === -1) && (J = b === 1), Nt = !0, setTimeout(so, 30), j(), J && !he ? n.appendChild(d) : t.parentNode.insertBefore(d, J ? he : t), re && pn(re, 0, ye - re.scrollTop), R = d.parentNode, se !== void 0 && !rt && (ct = Math.abs(se - X(t)[ve])), z(), N(!0);
|
|
883
|
-
}
|
|
884
|
-
if (n.contains(d))
|
|
885
|
-
return N(!1);
|
|
886
|
-
}
|
|
887
|
-
return !1;
|
|
888
|
-
},
|
|
889
|
-
_ignoreWhileAnimating: null,
|
|
890
|
-
_offMoveEvents: function() {
|
|
891
|
-
x(document, "mousemove", this._onTouchMove), x(document, "touchmove", this._onTouchMove), x(document, "pointermove", this._onTouchMove), x(document, "dragover", ke), x(document, "mousemove", ke), x(document, "touchmove", ke);
|
|
892
|
-
},
|
|
893
|
-
_offUpEvents: function() {
|
|
894
|
-
var e = this.el.ownerDocument;
|
|
895
|
-
x(e, "mouseup", this._onDrop), x(e, "touchend", this._onDrop), x(e, "pointerup", this._onDrop), x(e, "pointercancel", this._onDrop), x(e, "touchcancel", this._onDrop), x(document, "selectstart", this);
|
|
896
|
-
},
|
|
897
|
-
_onDrop: function(e) {
|
|
898
|
-
var n = this.el, t = this.options;
|
|
899
|
-
if (oe = le(d), Ce = le(d, t.draggable), ee("drop", this, {
|
|
900
|
-
evt: e
|
|
901
|
-
}), R = d && d.parentNode, oe = le(d), Ce = le(d, t.draggable), S.eventCanceled) {
|
|
902
|
-
this._nulling();
|
|
903
|
-
return;
|
|
904
|
-
}
|
|
905
|
-
Me = !1, rt = !1, et = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), At(this.cloneId), At(this._dragStartId), this.nativeDraggable && (x(document, "drop", this), x(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), qe && E(document.body, "user-select", ""), E(d, "transform", ""), e && (je && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), _ && _.parentNode && _.parentNode.removeChild(_), (F === R || H && H.lastPutMode !== "clone") && B && B.parentNode && B.parentNode.removeChild(B), d && (this.nativeDraggable && x(d, "dragend", this), Tt(d), d.style["will-change"] = "", je && !Me && ne(d, H ? H.options.ghostClass : this.options.ghostClass, !1), ne(d, this.options.chosenClass, !1), Q({
|
|
906
|
-
sortable: this,
|
|
907
|
-
name: "unchoose",
|
|
908
|
-
toEl: R,
|
|
909
|
-
newIndex: null,
|
|
910
|
-
newDraggableIndex: null,
|
|
911
|
-
originalEvent: e
|
|
912
|
-
}), F !== R ? (oe >= 0 && (Q({
|
|
913
|
-
rootEl: R,
|
|
914
|
-
name: "add",
|
|
915
|
-
toEl: R,
|
|
916
|
-
fromEl: F,
|
|
917
|
-
originalEvent: e
|
|
918
|
-
}), Q({
|
|
919
|
-
sortable: this,
|
|
920
|
-
name: "remove",
|
|
921
|
-
toEl: R,
|
|
922
|
-
originalEvent: e
|
|
923
|
-
}), Q({
|
|
924
|
-
rootEl: R,
|
|
925
|
-
name: "sort",
|
|
926
|
-
toEl: R,
|
|
927
|
-
fromEl: F,
|
|
928
|
-
originalEvent: e
|
|
929
|
-
}), Q({
|
|
930
|
-
sortable: this,
|
|
931
|
-
name: "sort",
|
|
932
|
-
toEl: R,
|
|
933
|
-
originalEvent: e
|
|
934
|
-
})), H && H.save()) : oe !== Re && oe >= 0 && (Q({
|
|
935
|
-
sortable: this,
|
|
936
|
-
name: "update",
|
|
937
|
-
toEl: R,
|
|
938
|
-
originalEvent: e
|
|
939
|
-
}), Q({
|
|
940
|
-
sortable: this,
|
|
941
|
-
name: "sort",
|
|
942
|
-
toEl: R,
|
|
943
|
-
originalEvent: e
|
|
944
|
-
})), S.active && ((oe == null || oe === -1) && (oe = Re, Ce = Qe), Q({
|
|
945
|
-
sortable: this,
|
|
946
|
-
name: "end",
|
|
947
|
-
toEl: R,
|
|
948
|
-
originalEvent: e
|
|
949
|
-
}), this.save()))), this._nulling();
|
|
950
|
-
},
|
|
951
|
-
_nulling: function() {
|
|
952
|
-
ee("nulling", this), F = d = R = _ = Ne = B = dt = Te = Oe = de = je = oe = Ce = Re = Qe = Fe = Je = H = it = S.dragged = S.ghost = S.clone = S.active = null, vt.forEach(function(e) {
|
|
953
|
-
e.checked = !0;
|
|
954
|
-
}), vt.length = _t = Dt = 0;
|
|
955
|
-
},
|
|
956
|
-
handleEvent: function(e) {
|
|
957
|
-
switch (e.type) {
|
|
958
|
-
case "drop":
|
|
959
|
-
case "dragend":
|
|
960
|
-
this._onDrop(e);
|
|
961
|
-
break;
|
|
962
|
-
case "dragenter":
|
|
963
|
-
case "dragover":
|
|
964
|
-
d && (this._onDragOver(e), lo(e));
|
|
965
|
-
break;
|
|
966
|
-
case "selectstart":
|
|
967
|
-
e.preventDefault();
|
|
968
|
-
break;
|
|
969
|
-
}
|
|
970
|
-
},
|
|
971
|
-
/**
|
|
972
|
-
* Serializes the item into an array of string.
|
|
973
|
-
* @returns {String[]}
|
|
974
|
-
*/
|
|
975
|
-
toArray: function() {
|
|
976
|
-
for (var e = [], n, t = this.el.children, i = 0, r = t.length, a = this.options; i < r; i++)
|
|
977
|
-
n = t[i], ce(n, a.draggable, this.el, !1) && e.push(n.getAttribute(a.dataIdAttr) || po(n));
|
|
978
|
-
return e;
|
|
979
|
-
},
|
|
980
|
-
/**
|
|
981
|
-
* Sorts the elements according to the array.
|
|
982
|
-
* @param {String[]} order order of the items
|
|
983
|
-
*/
|
|
984
|
-
sort: function(e, n) {
|
|
985
|
-
var t = {}, i = this.el;
|
|
986
|
-
this.toArray().forEach(function(r, a) {
|
|
987
|
-
var l = i.children[a];
|
|
988
|
-
ce(l, this.options.draggable, i, !1) && (t[r] = l);
|
|
989
|
-
}, this), n && this.captureAnimationState(), e.forEach(function(r) {
|
|
990
|
-
t[r] && (i.removeChild(t[r]), i.appendChild(t[r]));
|
|
991
|
-
}), n && this.animateAll();
|
|
992
|
-
},
|
|
993
|
-
/**
|
|
994
|
-
* Save the current sorting
|
|
995
|
-
*/
|
|
996
|
-
save: function() {
|
|
997
|
-
var e = this.options.store;
|
|
998
|
-
e && e.set && e.set(this);
|
|
999
|
-
},
|
|
1000
|
-
/**
|
|
1001
|
-
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
1002
|
-
* @param {HTMLElement} el
|
|
1003
|
-
* @param {String} [selector] default: `options.draggable`
|
|
1004
|
-
* @returns {HTMLElement|null}
|
|
1005
|
-
*/
|
|
1006
|
-
closest: function(e, n) {
|
|
1007
|
-
return ce(e, n || this.options.draggable, this.el, !1);
|
|
1008
|
-
},
|
|
1009
|
-
/**
|
|
1010
|
-
* Set/get option
|
|
1011
|
-
* @param {string} name
|
|
1012
|
-
* @param {*} [value]
|
|
1013
|
-
* @returns {*}
|
|
1014
|
-
*/
|
|
1015
|
-
option: function(e, n) {
|
|
1016
|
-
var t = this.options;
|
|
1017
|
-
if (n === void 0)
|
|
1018
|
-
return t[e];
|
|
1019
|
-
var i = nt.modifyOption(this, e, n);
|
|
1020
|
-
typeof i < "u" ? t[e] = i : t[e] = n, e === "group" && bn(t);
|
|
1021
|
-
},
|
|
1022
|
-
/**
|
|
1023
|
-
* Destroy
|
|
1024
|
-
*/
|
|
1025
|
-
destroy: function() {
|
|
1026
|
-
ee("destroy", this);
|
|
1027
|
-
var e = this.el;
|
|
1028
|
-
e[te] = null, x(e, "mousedown", this._onTapStart), x(e, "touchstart", this._onTapStart), x(e, "pointerdown", this._onTapStart), this.nativeDraggable && (x(e, "dragover", this), x(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
1029
|
-
n.removeAttribute("draggable");
|
|
1030
|
-
}), this._onDrop(), this._disableDelayedDragEvents(), mt.splice(mt.indexOf(this.el), 1), this.el = e = null;
|
|
1031
|
-
},
|
|
1032
|
-
_hideClone: function() {
|
|
1033
|
-
if (!Te) {
|
|
1034
|
-
if (ee("hideClone", this), S.eventCanceled) return;
|
|
1035
|
-
E(B, "display", "none"), this.options.removeCloneOnHide && B.parentNode && B.parentNode.removeChild(B), Te = !0;
|
|
1036
|
-
}
|
|
1037
|
-
},
|
|
1038
|
-
_showClone: function(e) {
|
|
1039
|
-
if (e.lastPutMode !== "clone") {
|
|
1040
|
-
this._hideClone();
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
if (Te) {
|
|
1044
|
-
if (ee("showClone", this), S.eventCanceled) return;
|
|
1045
|
-
d.parentNode == F && !this.options.group.revertClone ? F.insertBefore(B, d) : Ne ? F.insertBefore(B, Ne) : F.appendChild(B), this.options.group.revertClone && this.animate(d, B), E(B, "display", ""), Te = !1;
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
};
|
|
1049
|
-
function lo(o) {
|
|
1050
|
-
o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
|
|
1051
|
-
}
|
|
1052
|
-
function lt(o, e, n, t, i, r, a, l) {
|
|
1053
|
-
var s, u = o[te], g = u.options.onMove, f;
|
|
1054
|
-
return window.CustomEvent && !De && !tt ? s = new CustomEvent("move", {
|
|
1055
|
-
bubbles: !0,
|
|
1056
|
-
cancelable: !0
|
|
1057
|
-
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = o, s.dragged = n, s.draggedRect = t, s.related = i || e, s.relatedRect = r || X(e), s.willInsertAfter = l, s.originalEvent = a, o.dispatchEvent(s), g && (f = g.call(u, s, a)), f;
|
|
1058
|
-
}
|
|
1059
|
-
function Tt(o) {
|
|
1060
|
-
o.draggable = !1;
|
|
1061
|
-
}
|
|
1062
|
-
function so() {
|
|
1063
|
-
Nt = !1;
|
|
1064
|
-
}
|
|
1065
|
-
function uo(o, e, n) {
|
|
1066
|
-
var t = X(Ke(n.el, 0, n.options, !0)), i = mn(n.el, n.options, _), r = 10;
|
|
1067
|
-
return e ? o.clientX < i.left - r || o.clientY < t.top && o.clientX < t.right : o.clientY < i.top - r || o.clientY < t.bottom && o.clientX < t.left;
|
|
1068
|
-
}
|
|
1069
|
-
function co(o, e, n) {
|
|
1070
|
-
var t = X(Bt(n.el, n.options.draggable)), i = mn(n.el, n.options, _), r = 10;
|
|
1071
|
-
return e ? o.clientX > i.right + r || o.clientY > t.bottom && o.clientX > t.left : o.clientY > i.bottom + r || o.clientX > t.right && o.clientY > t.top;
|
|
1072
|
-
}
|
|
1073
|
-
function fo(o, e, n, t, i, r, a, l) {
|
|
1074
|
-
var s = t ? o.clientY : o.clientX, u = t ? n.height : n.width, g = t ? n.top : n.left, f = t ? n.bottom : n.right, w = !1;
|
|
1075
|
-
if (!a) {
|
|
1076
|
-
if (l && ct < u * i) {
|
|
1077
|
-
if (!et && (Je === 1 ? s > g + u * r / 2 : s < f - u * r / 2) && (et = !0), et)
|
|
1078
|
-
w = !0;
|
|
1079
|
-
else if (Je === 1 ? s < g + ct : s > f - ct)
|
|
1080
|
-
return -Je;
|
|
1081
|
-
} else if (s > g + u * (1 - i) / 2 && s < f - u * (1 - i) / 2)
|
|
1082
|
-
return ho(e);
|
|
1083
|
-
}
|
|
1084
|
-
return w = w || a, w && (s < g + u * r / 2 || s > f - u * r / 2) ? s > g + u / 2 ? 1 : -1 : 0;
|
|
1085
|
-
}
|
|
1086
|
-
function ho(o) {
|
|
1087
|
-
return le(d) < le(o) ? 1 : -1;
|
|
1088
|
-
}
|
|
1089
|
-
function po(o) {
|
|
1090
|
-
for (var e = o.tagName + o.className + o.src + o.href + o.textContent, n = e.length, t = 0; n--; )
|
|
1091
|
-
t += e.charCodeAt(n);
|
|
1092
|
-
return t.toString(36);
|
|
1093
|
-
}
|
|
1094
|
-
function go(o) {
|
|
1095
|
-
vt.length = 0;
|
|
1096
|
-
for (var e = o.getElementsByTagName("input"), n = e.length; n--; ) {
|
|
1097
|
-
var t = e[n];
|
|
1098
|
-
t.checked && vt.push(t);
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
function ft(o) {
|
|
1102
|
-
return setTimeout(o, 0);
|
|
1103
|
-
}
|
|
1104
|
-
function At(o) {
|
|
1105
|
-
return clearTimeout(o);
|
|
1106
|
-
}
|
|
1107
|
-
bt && I(document, "touchmove", function(o) {
|
|
1108
|
-
(S.active || Me) && o.cancelable && o.preventDefault();
|
|
1109
|
-
});
|
|
1110
|
-
S.utils = {
|
|
1111
|
-
on: I,
|
|
1112
|
-
off: x,
|
|
1113
|
-
css: E,
|
|
1114
|
-
find: fn,
|
|
1115
|
-
is: function(e, n) {
|
|
1116
|
-
return !!ce(e, n, e, !1);
|
|
1117
|
-
},
|
|
1118
|
-
extend: qn,
|
|
1119
|
-
throttle: hn,
|
|
1120
|
-
closest: ce,
|
|
1121
|
-
toggleClass: ne,
|
|
1122
|
-
clone: gn,
|
|
1123
|
-
index: le,
|
|
1124
|
-
nextTick: ft,
|
|
1125
|
-
cancelNextTick: At,
|
|
1126
|
-
detectDirection: yn,
|
|
1127
|
-
getChild: Ke,
|
|
1128
|
-
expando: te
|
|
1129
|
-
};
|
|
1130
|
-
S.get = function(o) {
|
|
1131
|
-
return o[te];
|
|
1132
|
-
};
|
|
1133
|
-
S.mount = function() {
|
|
1134
|
-
for (var o = arguments.length, e = new Array(o), n = 0; n < o; n++)
|
|
1135
|
-
e[n] = arguments[n];
|
|
1136
|
-
e[0].constructor === Array && (e = e[0]), e.forEach(function(t) {
|
|
1137
|
-
if (!t.prototype || !t.prototype.constructor)
|
|
1138
|
-
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));
|
|
1139
|
-
t.utils && (S.utils = me(me({}, S.utils), t.utils)), nt.mount(t);
|
|
1140
|
-
});
|
|
1141
|
-
};
|
|
1142
|
-
S.create = function(o, e) {
|
|
1143
|
-
return new S(o, e);
|
|
1144
|
-
};
|
|
1145
|
-
S.version = Wn;
|
|
1146
|
-
var K = [], Ve, Pt, Ft = !1, xt, It, yt, We;
|
|
1147
|
-
function mo() {
|
|
1148
|
-
function o() {
|
|
1149
|
-
this.defaults = {
|
|
1150
|
-
scroll: !0,
|
|
1151
|
-
forceAutoScrollFallback: !1,
|
|
1152
|
-
scrollSensitivity: 30,
|
|
1153
|
-
scrollSpeed: 10,
|
|
1154
|
-
bubbleScroll: !0
|
|
1155
|
-
};
|
|
1156
|
-
for (var e in this)
|
|
1157
|
-
e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
|
1158
|
-
}
|
|
1159
|
-
return o.prototype = {
|
|
1160
|
-
dragStarted: function(n) {
|
|
1161
|
-
var t = n.originalEvent;
|
|
1162
|
-
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? I(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? I(document, "touchmove", this._handleFallbackAutoScroll) : I(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1163
|
-
},
|
|
1164
|
-
dragOverCompleted: function(n) {
|
|
1165
|
-
var t = n.originalEvent;
|
|
1166
|
-
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1167
|
-
},
|
|
1168
|
-
drop: function() {
|
|
1169
|
-
this.sortable.nativeDraggable ? x(document, "dragover", this._handleAutoScroll) : (x(document, "pointermove", this._handleFallbackAutoScroll), x(document, "touchmove", this._handleFallbackAutoScroll), x(document, "mousemove", this._handleFallbackAutoScroll)), Jt(), ht(), Zn();
|
|
1170
|
-
},
|
|
1171
|
-
nulling: function() {
|
|
1172
|
-
yt = Pt = Ve = Ft = We = xt = It = null, K.length = 0;
|
|
1173
|
-
},
|
|
1174
|
-
_handleFallbackAutoScroll: function(n) {
|
|
1175
|
-
this._handleAutoScroll(n, !0);
|
|
1176
|
-
},
|
|
1177
|
-
_handleAutoScroll: function(n, t) {
|
|
1178
|
-
var i = this, r = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(r, a);
|
|
1179
|
-
if (yt = n, t || this.options.forceAutoScrollFallback || tt || De || qe) {
|
|
1180
|
-
Ot(n, this.options, l, t);
|
|
1181
|
-
var s = xe(l, !0);
|
|
1182
|
-
Ft && (!We || r !== xt || a !== It) && (We && Jt(), We = setInterval(function() {
|
|
1183
|
-
var u = xe(document.elementFromPoint(r, a), !0);
|
|
1184
|
-
u !== s && (s = u, ht()), Ot(n, i.options, u, t);
|
|
1185
|
-
}, 10), xt = r, It = a);
|
|
1186
|
-
} else {
|
|
1187
|
-
if (!this.options.bubbleScroll || xe(l, !0) === ge()) {
|
|
1188
|
-
ht();
|
|
1189
|
-
return;
|
|
1190
|
-
}
|
|
1191
|
-
Ot(n, this.options, xe(l, !1), !1);
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
}, _e(o, {
|
|
1195
|
-
pluginName: "scroll",
|
|
1196
|
-
initializeByDefault: !0
|
|
1197
|
-
});
|
|
1198
|
-
}
|
|
1199
|
-
function ht() {
|
|
1200
|
-
K.forEach(function(o) {
|
|
1201
|
-
clearInterval(o.pid);
|
|
1202
|
-
}), K = [];
|
|
1203
|
-
}
|
|
1204
|
-
function Jt() {
|
|
1205
|
-
clearInterval(We);
|
|
1206
|
-
}
|
|
1207
|
-
var Ot = hn(function(o, e, n, t) {
|
|
1208
|
-
if (e.scroll) {
|
|
1209
|
-
var i = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = ge(), u = !1, g;
|
|
1210
|
-
Pt !== n && (Pt = n, ht(), Ve = e.scroll, g = e.scrollFn, Ve === !0 && (Ve = xe(n, !0)));
|
|
1211
|
-
var f = 0, w = Ve;
|
|
1212
|
-
do {
|
|
1213
|
-
var y = w, D = X(y), T = D.top, $ = D.bottom, j = D.left, N = D.right, z = D.width, A = D.height, q = void 0, L = void 0, se = y.scrollWidth, ie = y.scrollHeight, P = E(y), ve = y.scrollLeft, re = y.scrollTop;
|
|
1214
|
-
y === s ? (q = z < se && (P.overflowX === "auto" || P.overflowX === "scroll" || P.overflowX === "visible"), L = A < ie && (P.overflowY === "auto" || P.overflowY === "scroll" || P.overflowY === "visible")) : (q = z < se && (P.overflowX === "auto" || P.overflowX === "scroll"), L = A < ie && (P.overflowY === "auto" || P.overflowY === "scroll"));
|
|
1215
|
-
var ye = q && (Math.abs(N - i) <= a && ve + z < se) - (Math.abs(j - i) <= a && !!ve), V = L && (Math.abs($ - r) <= a && re + A < ie) - (Math.abs(T - r) <= a && !!re);
|
|
1216
|
-
if (!K[f])
|
|
1217
|
-
for (var Y = 0; Y <= f; Y++)
|
|
1218
|
-
K[Y] || (K[Y] = {});
|
|
1219
|
-
(K[f].vx != ye || K[f].vy != V || K[f].el !== y) && (K[f].el = y, K[f].vx = ye, K[f].vy = V, clearInterval(K[f].pid), (ye != 0 || V != 0) && (u = !0, K[f].pid = setInterval((function() {
|
|
1220
|
-
t && this.layer === 0 && S.active._onTouchMove(yt);
|
|
1221
|
-
var he = K[this.layer].vy ? K[this.layer].vy * l : 0, J = K[this.layer].vx ? K[this.layer].vx * l : 0;
|
|
1222
|
-
typeof g == "function" && g.call(S.dragged.parentNode[te], J, he, o, yt, K[this.layer].el) !== "continue" || pn(K[this.layer].el, J, he);
|
|
1223
|
-
}).bind({
|
|
1224
|
-
layer: f
|
|
1225
|
-
}), 24))), f++;
|
|
1226
|
-
} while (e.bubbleScroll && w !== s && (w = xe(w, !1)));
|
|
1227
|
-
Ft = u;
|
|
1228
|
-
}
|
|
1229
|
-
}, 30), Sn = function(e) {
|
|
1230
|
-
var n = e.originalEvent, t = e.putSortable, i = e.dragEl, r = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1231
|
-
if (n) {
|
|
1232
|
-
var u = t || r;
|
|
1233
|
-
l();
|
|
1234
|
-
var g = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, f = document.elementFromPoint(g.clientX, g.clientY);
|
|
1235
|
-
s(), u && !u.el.contains(f) && (a("spill"), this.onSpill({
|
|
1236
|
-
dragEl: i,
|
|
1237
|
-
putSortable: t
|
|
1238
|
-
}));
|
|
1239
|
-
}
|
|
1240
|
-
};
|
|
1241
|
-
function Rt() {
|
|
1242
|
-
}
|
|
1243
|
-
Rt.prototype = {
|
|
1244
|
-
startIndex: null,
|
|
1245
|
-
dragStart: function(e) {
|
|
1246
|
-
var n = e.oldDraggableIndex;
|
|
1247
|
-
this.startIndex = n;
|
|
1248
|
-
},
|
|
1249
|
-
onSpill: function(e) {
|
|
1250
|
-
var n = e.dragEl, t = e.putSortable;
|
|
1251
|
-
this.sortable.captureAnimationState(), t && t.captureAnimationState();
|
|
1252
|
-
var i = Ke(this.sortable.el, this.startIndex, this.options);
|
|
1253
|
-
i ? this.sortable.el.insertBefore(n, i) : this.sortable.el.appendChild(n), this.sortable.animateAll(), t && t.animateAll();
|
|
1254
|
-
},
|
|
1255
|
-
drop: Sn
|
|
1256
|
-
};
|
|
1257
|
-
_e(Rt, {
|
|
1258
|
-
pluginName: "revertOnSpill"
|
|
1259
|
-
});
|
|
1260
|
-
function zt() {
|
|
1261
|
-
}
|
|
1262
|
-
zt.prototype = {
|
|
1263
|
-
onSpill: function(e) {
|
|
1264
|
-
var n = e.dragEl, t = e.putSortable, i = t || this.sortable;
|
|
1265
|
-
i.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), i.animateAll();
|
|
1266
|
-
},
|
|
1267
|
-
drop: Sn
|
|
1268
|
-
};
|
|
1269
|
-
_e(zt, {
|
|
1270
|
-
pluginName: "removeOnSpill"
|
|
1271
|
-
});
|
|
1272
|
-
S.mount(new mo());
|
|
1273
|
-
S.mount(zt, Rt);
|
|
1274
|
-
const vo = ["sm", "md", "lg"], en = { none: "gap-none", sm: "gap-sm", md: "gap-md", lg: "gap-lg" }, [yo, bo] = Mn("CheckboxGroup"), wo = ["data-parents", "data-key", "data-draggable"], Eo = /* @__PURE__ */ tn({
|
|
1275
|
-
...ln("TreeNode"),
|
|
1276
|
-
__name: "TreeNode",
|
|
1277
|
-
props: {
|
|
1278
|
-
item: {},
|
|
1279
|
-
level: { default: 1 },
|
|
1280
|
-
parentKeys: {}
|
|
1281
|
-
},
|
|
1282
|
-
setup(o) {
|
|
1283
|
-
const e = o, n = nn(), t = yo(), i = an(t.prefixes.node, {
|
|
1284
|
-
variants: {
|
|
1285
|
-
disabled: Ee("disabled", t.prefixes.node),
|
|
1286
|
-
active: Ee("active", t.prefixes.node),
|
|
1287
|
-
hasChildren: Ee("has-children", t.prefixes.node)
|
|
1288
|
-
}
|
|
1289
|
-
}), r = M(() => {
|
|
1290
|
-
switch (t.size.value) {
|
|
1291
|
-
case "sm":
|
|
1292
|
-
return "2xsm";
|
|
1293
|
-
case "md":
|
|
1294
|
-
case "lg":
|
|
1295
|
-
return "xsm";
|
|
1296
|
-
}
|
|
1297
|
-
}), a = M(() => {
|
|
1298
|
-
switch (t.size.value) {
|
|
1299
|
-
case "sm":
|
|
1300
|
-
return "2xsm";
|
|
1301
|
-
default:
|
|
1302
|
-
return "xsm";
|
|
1303
|
-
}
|
|
1304
|
-
}), l = (b) => t.getNodeField(b, "children"), s = (b) => t.getNodeField(b, "key"), u = M(() => l(G(e.item))), g = M(() => t.getNodeField(e.item, "leaf")), f = M(() => {
|
|
1305
|
-
var b;
|
|
1306
|
-
return (b = t.props) != null && b.draggable ? t.getNodeField(e.item, "draggable") ?? !0 : !1;
|
|
1307
|
-
}), w = M(() => s(e.item)), y = M(
|
|
1308
|
-
() => !!(t.disabled.value || t.getNodeField(e.item, "disabled"))
|
|
1309
|
-
), D = M(
|
|
1310
|
-
() => {
|
|
1311
|
-
var b;
|
|
1312
|
-
return !!((b = u.value) != null && b.some((O) => t.expandedKeys.value.includes(s(O))));
|
|
1313
|
-
}
|
|
1314
|
-
), T = M(
|
|
1315
|
-
() => {
|
|
1316
|
-
var b, O;
|
|
1317
|
-
return !((b = t.dragging.value) != null && b.key && ((O = t.dragging.value) == null ? void 0 : O.key) === w.value) && t.expandedKeys.value.includes(w.value);
|
|
1318
|
-
}
|
|
1319
|
-
), $ = M(() => {
|
|
1320
|
-
var b, O;
|
|
1321
|
-
return !!(!t.dragging.value.value && ((b = t.props) != null && b.showLine) && T.value && ((O = u.value) != null && O.length));
|
|
1322
|
-
}), j = () => {
|
|
1323
|
-
y.value || (t.props.syncCheckboxAndSelect ? q() : t.onSelect(e.item));
|
|
1324
|
-
}, N = M(() => !!t.model.value.includes(w.value)), z = M(() => {
|
|
1325
|
-
const b = (Z = e.item) => {
|
|
1326
|
-
const p = l(Z);
|
|
1327
|
-
return (p == null ? void 0 : p.length) && p.every((c) => t.checked.value.includes(s(c)));
|
|
1328
|
-
}, O = (Z = e.item) => {
|
|
1329
|
-
const p = l(Z);
|
|
1330
|
-
return p != null && p.length ? !!(p != null && p.some(
|
|
1331
|
-
(c) => t.checked.value.includes(s(c)) || O(c)
|
|
1332
|
-
)) : !1;
|
|
1333
|
-
}, ae = t.checked.value.includes(w.value);
|
|
1334
|
-
return b() ? (ae || t.onCheck(e.item), !0) : O() ? (ae && t.onCheck(e.item), "indeterminate") : !!ae;
|
|
1335
|
-
}), A = (b) => {
|
|
1336
|
-
t.props.syncCheckboxAndSelect || b == null || b.stopPropagation();
|
|
1337
|
-
}, q = (b) => {
|
|
1338
|
-
var Z;
|
|
1339
|
-
if (b !== void 0 && t.props.syncCheckboxAndSelect) return;
|
|
1340
|
-
if (!((Z = u.value) != null && Z.length))
|
|
1341
|
-
return t.props.syncCheckboxAndSelect && t.onSelect(e.item), t.onCheck(e.item);
|
|
1342
|
-
const O = (p = e.item) => {
|
|
1343
|
-
const c = l(p);
|
|
1344
|
-
return c != null && c.length ? c.reduce((C, h) => {
|
|
1345
|
-
const m = l(h), k = s(h);
|
|
1346
|
-
return m != null && m.length ? [...C, k, ...O(h)] : [...C, k];
|
|
1347
|
-
}, []) : [];
|
|
1348
|
-
}, ae = O(), be = {
|
|
1349
|
-
keys: [w.value, ...ae],
|
|
1350
|
-
value: !t.checked.value.includes(w.value)
|
|
1351
|
-
};
|
|
1352
|
-
return t.props.syncCheckboxAndSelect && t.onSelect(e.item, be), t.onCheck(e.item, be);
|
|
1353
|
-
}, L = M(() => [...e.parentKeys ?? [], w.value]), se = (b) => {
|
|
1354
|
-
t.onExpandKey(e.item, b);
|
|
1355
|
-
}, ie = M(() => t.dragging.value.key === w.value ? t.dragging.value.level ?? e.level : e.level), P = M(() => ie.value + 1), ve = M(() => {
|
|
1356
|
-
switch (t.size.value) {
|
|
1357
|
-
case "sm":
|
|
1358
|
-
return "2xsm";
|
|
1359
|
-
case "md":
|
|
1360
|
-
return "xsm";
|
|
1361
|
-
case "lg":
|
|
1362
|
-
return "sm";
|
|
1363
|
-
}
|
|
1364
|
-
}), { rootBindings: re, inputBindings: ye } = Kn({
|
|
1365
|
-
getDisabled: () => y.value
|
|
1366
|
-
}), V = M(
|
|
1367
|
-
() => {
|
|
1368
|
-
var b, O;
|
|
1369
|
-
return !!((b = u.value) != null && b.length || (O = t.props) != null && O.lazyLoad && !g.value);
|
|
1370
|
-
}
|
|
1371
|
-
), Y = Dn("indent"), { width: he, height: J } = Yn(Y);
|
|
1372
|
-
return (b, O) => {
|
|
1373
|
-
var be, Z, p, c, C, h, m, k, we, W, Ie, ue;
|
|
1374
|
-
const ae = Cn("TreeNode", !0);
|
|
1375
|
-
return pe(), Xe("div", st({
|
|
1376
|
-
"data-parents": (be = v(t).props) != null && be.draggable ? b.parentKeys : void 0,
|
|
1377
|
-
"data-key": (Z = v(t).props) != null && Z.draggable ? w.value : void 0,
|
|
1378
|
-
"data-draggable": (p = v(t).props) != null && p.draggable ? !y.value && f.value : void 0,
|
|
1379
|
-
class: [
|
|
1380
|
-
(c = u.value) != null && c.length ? v(t).prefixes.group : "",
|
|
1381
|
-
v(fe)(v(t).prefixes.node, "root"),
|
|
1382
|
-
v(t).getNodeField(b.item, "class"),
|
|
1383
|
-
{
|
|
1384
|
-
[v(kt)(v(t).prefixes.group, "child-expanded")]: D.value,
|
|
1385
|
-
[v(kt)(v(t).prefixes.group, "draggable")]: (C = v(t).props) == null ? void 0 : C.draggable
|
|
1386
|
-
}
|
|
1387
|
-
]
|
|
1388
|
-
}, v(re), {
|
|
1389
|
-
style: {
|
|
1390
|
-
"--ptc-tree-node-indent-height": `${v(J)}px`,
|
|
1391
|
-
"--ptc-tree-node-indent-width": `${v(he)}px`
|
|
1392
|
-
}
|
|
1393
|
-
}), [
|
|
1394
|
-
$.value ? (pe(), Xe("div", {
|
|
1395
|
-
key: 0,
|
|
1396
|
-
class: Ae(v(fe)(v(t).prefixes.group, "line"))
|
|
1397
|
-
}, null, 2)) : Ye("", !0),
|
|
1398
|
-
Yt("div", st({
|
|
1399
|
-
class: [
|
|
1400
|
-
v(i)({
|
|
1401
|
-
disabled: y.value,
|
|
1402
|
-
active: N.value,
|
|
1403
|
-
hasChildren: V.value
|
|
1404
|
-
})
|
|
1405
|
-
]
|
|
1406
|
-
}, v(ye), { onClick: j }), [
|
|
1407
|
-
(h = v(t).props) != null && h.draggable ? (pe(), Xe("span", {
|
|
1408
|
-
key: 0,
|
|
1409
|
-
class: Ae(v(t).prefixes.draggable)
|
|
1410
|
-
}, [
|
|
1411
|
-
v(t).dragging.value.key !== w.value && !v(t).dragging.value.value ? (pe(), Ue(Rn, {
|
|
1412
|
-
key: 0,
|
|
1413
|
-
icon: "tabler:grip-vertical",
|
|
1414
|
-
size: a.value,
|
|
1415
|
-
class: Ae(v(t).prefixes.draggableIcon)
|
|
1416
|
-
}, {
|
|
1417
|
-
default: Be(() => [
|
|
1418
|
-
$e(b.$slots, "dragTrigger", Ge(He({ ...b.item, selected: N.value, checked: z.value, disabled: y.value, unFocusable: !0 })))
|
|
1419
|
-
]),
|
|
1420
|
-
_: 3
|
|
1421
|
-
}, 8, ["size", "class"])) : Ye("", !0)
|
|
1422
|
-
], 2)) : Ye("", !0),
|
|
1423
|
-
Lt(Bn, {
|
|
1424
|
-
ref_key: "indent",
|
|
1425
|
-
ref: Y,
|
|
1426
|
-
level: ie.value,
|
|
1427
|
-
children: V.value,
|
|
1428
|
-
size: ve.value,
|
|
1429
|
-
expanded: T.value,
|
|
1430
|
-
showLine: !1,
|
|
1431
|
-
class: Ae(v(fe)(v(t).prefixes.node, "indent")),
|
|
1432
|
-
loading: v(t).getNodeField(b.item, "loading"),
|
|
1433
|
-
"branch-icon": v(t).getNodeField(b.item, "switcherIcon") ?? ((m = v(t).props) == null ? void 0 : m.switcherIcon),
|
|
1434
|
-
"no-rotate-branch": v(t).getNodeField(b.item, "noRotateSwitcherIcon") ?? ((k = v(t).props) == null ? void 0 : k.noRotateSwitcherIcon),
|
|
1435
|
-
onToggleExpand: O[0] || (O[0] = xn((Kt) => se(), ["stop"]))
|
|
1436
|
-
}, {
|
|
1437
|
-
default: Be(() => [
|
|
1438
|
-
$e(b.$slots, "switcherIcon", Ge(He({ ...b.item, selected: N.value, checked: z.value, expanded: T.value, disabled: y.value, unFocusable: !0 })))
|
|
1439
|
-
]),
|
|
1440
|
-
_: 3
|
|
1441
|
-
}, 8, ["level", "children", "size", "expanded", "class", "loading", "branch-icon", "no-rotate-branch"]),
|
|
1442
|
-
v(t).dragging.value.key !== w.value || !v(t).dragging.value.value ? (pe(), Xe(In, { key: 1 }, [
|
|
1443
|
-
(we = v(t).props) != null && we.checkbox ? (pe(), Ue(zn, {
|
|
1444
|
-
key: 0,
|
|
1445
|
-
size: r.value,
|
|
1446
|
-
onClick: A,
|
|
1447
|
-
modelValue: z.value,
|
|
1448
|
-
"onUpdate:modelValue": q,
|
|
1449
|
-
disabled: y.value
|
|
1450
|
-
}, null, 8, ["size", "modelValue", "disabled"])) : Ye("", !0),
|
|
1451
|
-
$e(b.$slots, "title", Ge(He({ ...b.item, selected: N.value, checked: z.value, disabled: y.value, unFocusable: !0 })), () => [
|
|
1452
|
-
Yt("div", {
|
|
1453
|
-
class: Ae(v(fe)(v(t).prefixes.node, "title"))
|
|
1454
|
-
}, On(v(t).getNodeField(b.item, "title")), 3)
|
|
1455
|
-
])
|
|
1456
|
-
], 64)) : (pe(), Xe("div", {
|
|
1457
|
-
key: 2,
|
|
1458
|
-
class: Ae(v(fe)(v(t).prefixes.node, "slot"))
|
|
1459
|
-
}, null, 2))
|
|
1460
|
-
], 16),
|
|
1461
|
-
v(t).dragging.value.value || v(t).dragging.value.key || (W = u.value) != null && W.length && (T.value || v(t).props.forceMount) ? Tn((pe(), Ue(v(sn), st({
|
|
1462
|
-
key: 1,
|
|
1463
|
-
class: v(t).prefixes.groupList,
|
|
1464
|
-
"data-parents": (Ie = v(t).props) != null && Ie.draggable ? L.value : void 0,
|
|
1465
|
-
"data-level": (ue = v(t).props) != null && ue.draggable ? P.value : void 0,
|
|
1466
|
-
tag: "div",
|
|
1467
|
-
list: u.value
|
|
1468
|
-
}, v(t).getSortableProps(b.item)), {
|
|
1469
|
-
item: Be(({ element: Kt }) => [
|
|
1470
|
-
Lt(ae, {
|
|
1471
|
-
item: Kt,
|
|
1472
|
-
parentKeys: L.value,
|
|
1473
|
-
level: P.value
|
|
1474
|
-
}, on({ _: 2 }, [
|
|
1475
|
-
rn(Object.keys(n), (Xt) => ({
|
|
1476
|
-
name: Xt,
|
|
1477
|
-
fn: Be((_n) => [
|
|
1478
|
-
$e(b.$slots, Xt, Ge(He(_n)))
|
|
1479
|
-
])
|
|
1480
|
-
}))
|
|
1481
|
-
]), 1032, ["item", "parentKeys", "level"])
|
|
1482
|
-
]),
|
|
1483
|
-
_: 3
|
|
1484
|
-
}, 16, ["class", "data-parents", "data-level", "list"])), [
|
|
1485
|
-
[kn, T.value]
|
|
1486
|
-
]) : Ye("", !0)
|
|
1487
|
-
], 16, wo);
|
|
1488
|
-
};
|
|
1489
|
-
}
|
|
1490
|
-
}), zo = /* @__PURE__ */ tn({
|
|
1491
|
-
...ln("Tree"),
|
|
1492
|
-
__name: "Tree",
|
|
1493
|
-
props: {
|
|
1494
|
-
class: {},
|
|
1495
|
-
size: { default: "md" },
|
|
1496
|
-
gap: {},
|
|
1497
|
-
dir: {},
|
|
1498
|
-
data: {},
|
|
1499
|
-
modelValue: {},
|
|
1500
|
-
value: {},
|
|
1501
|
-
checkedKeys: {},
|
|
1502
|
-
expandedKeys: {},
|
|
1503
|
-
multiple: { type: Boolean },
|
|
1504
|
-
checkbox: { type: Boolean },
|
|
1505
|
-
syncCheckboxAndSelect: { type: Boolean },
|
|
1506
|
-
defaultExpandAll: { type: Boolean },
|
|
1507
|
-
selectable: { type: Boolean },
|
|
1508
|
-
showLine: { type: Boolean },
|
|
1509
|
-
inlineNode: { type: Boolean },
|
|
1510
|
-
lazyLoad: { type: Boolean },
|
|
1511
|
-
forceMount: { type: Boolean },
|
|
1512
|
-
fieldNames: {},
|
|
1513
|
-
groupName: {},
|
|
1514
|
-
getSortableProps: {},
|
|
1515
|
-
switcherIcon: {},
|
|
1516
|
-
noRotateSwitcherIcon: { type: Boolean },
|
|
1517
|
-
draggable: { type: Boolean },
|
|
1518
|
-
disabled: { type: Boolean }
|
|
1519
|
-
},
|
|
1520
|
-
emits: ["update:modelValue", "update:value", "update:expandedKeys", "update:checkedKeys", "expand", "select", "check", "dragStart", "dragEnd", "move", "choose", "unchoose"],
|
|
1521
|
-
setup(o, { emit: e }) {
|
|
1522
|
-
const n = o, t = e, i = nn(), r = Nn("tree"), a = fe(r, "node"), l = fe(a, "group"), s = fe(a, "draggable"), u = fe(s, "icon"), g = fe(l, "list"), f = {
|
|
1523
|
-
node: a,
|
|
1524
|
-
group: l,
|
|
1525
|
-
draggable: s,
|
|
1526
|
-
draggableIcon: u,
|
|
1527
|
-
groupList: g
|
|
1528
|
-
}, w = an(r, {
|
|
1529
|
-
variants: {
|
|
1530
|
-
size: Ee(vo, r),
|
|
1531
|
-
gap: Ee(en, r),
|
|
1532
|
-
selectable: Ee("selectable", r),
|
|
1533
|
-
disabled: Ee("disabled", r),
|
|
1534
|
-
inlineNode: Ee("inline-node", r),
|
|
1535
|
-
dragging: Ee("dragging", r)
|
|
1536
|
-
}
|
|
1537
|
-
}), y = (p, c) => {
|
|
1538
|
-
var h;
|
|
1539
|
-
const C = $t(p, c);
|
|
1540
|
-
return (h = n.fieldNames) != null && h[c] ? $t(p, n.fieldNames[c], C) : C;
|
|
1541
|
-
}, D = Le(G(n.data)), T = M(() => G(D.value)), $ = () => {
|
|
1542
|
-
if (!n.lazyLoad) {
|
|
1543
|
-
const p = [], c = (C) => {
|
|
1544
|
-
for (const h of C) {
|
|
1545
|
-
const m = y(h, "children");
|
|
1546
|
-
m != null && m.length && (p.push(y(h, "key")), c(m));
|
|
1547
|
-
}
|
|
1548
|
-
};
|
|
1549
|
-
return c(D.value), p;
|
|
1550
|
-
}
|
|
1551
|
-
return [];
|
|
1552
|
-
}, j = Le(
|
|
1553
|
-
n.expandedKeys ?? (n.defaultExpandAll ? $() : [])
|
|
1554
|
-
);
|
|
1555
|
-
ot(
|
|
1556
|
-
() => [n.defaultExpandAll, n.expandedKeys],
|
|
1557
|
-
([p, c], [C, h]) => {
|
|
1558
|
-
c !== h ? j.value = n.expandedKeys ?? [] : p && !C && (j.value = $());
|
|
1559
|
-
}
|
|
1560
|
-
);
|
|
1561
|
-
const N = M({
|
|
1562
|
-
get() {
|
|
1563
|
-
return n.expandedKeys ? n.expandedKeys : j.value;
|
|
1564
|
-
},
|
|
1565
|
-
set(p) {
|
|
1566
|
-
n.expandedKeys || (j.value = p), t("update:expandedKeys", p);
|
|
1567
|
-
}
|
|
1568
|
-
});
|
|
1569
|
-
ot(
|
|
1570
|
-
() => n.data,
|
|
1571
|
-
() => {
|
|
1572
|
-
D.value = G(n.data);
|
|
1573
|
-
const p = $();
|
|
1574
|
-
N.value = N.value.filter((c) => p.includes(c));
|
|
1575
|
-
},
|
|
1576
|
-
{ deep: !0 }
|
|
1577
|
-
);
|
|
1578
|
-
const z = Le(n.modelValue ?? n.value ?? []);
|
|
1579
|
-
ot(
|
|
1580
|
-
() => [n.modelValue, n.value],
|
|
1581
|
-
() => {
|
|
1582
|
-
z.value = n.modelValue ?? n.value ?? [];
|
|
1583
|
-
}
|
|
1584
|
-
);
|
|
1585
|
-
const A = M({
|
|
1586
|
-
get() {
|
|
1587
|
-
return n.modelValue ?? n.value ? n.modelValue ?? n.value : z.value;
|
|
1588
|
-
},
|
|
1589
|
-
set(p) {
|
|
1590
|
-
p && ((n.modelValue ?? n.value) || (z.value = p), t("update:modelValue", p), t("update:value", p));
|
|
1591
|
-
}
|
|
1592
|
-
}), { getDisabled: q, getSize: L } = Xn(), se = (p, c) => {
|
|
1593
|
-
var C, h;
|
|
1594
|
-
if (n.selectable && !q.value) {
|
|
1595
|
-
let m = G(A.value);
|
|
1596
|
-
const k = y(p, "key");
|
|
1597
|
-
c != null && c.keys.length && n.multiple ? c.value ? m = wt([...c.keys, ...m]) : m = G(A.value.filter((W) => !c.keys.includes(W))) : n.multiple ? (C = A.value) != null && C.includes(k) ? m = G((h = A.value) == null ? void 0 : h.filter((W) => W !== k)) : m = G([...A.value ?? [], k]) : A.value.includes(k) ? m = [] : m = [k], A.value = m;
|
|
1598
|
-
const we = (c == null ? void 0 : c.value) ?? m.includes(k);
|
|
1599
|
-
t("select", p, we, (c == null ? void 0 : c.keys) ?? k);
|
|
1600
|
-
}
|
|
1601
|
-
}, ie = Le(n.checkedKeys ?? []);
|
|
1602
|
-
ot(
|
|
1603
|
-
() => n.checkedKeys,
|
|
1604
|
-
() => {
|
|
1605
|
-
ie.value = n.checkedKeys ?? [];
|
|
1606
|
-
}
|
|
1607
|
-
);
|
|
1608
|
-
const P = M({
|
|
1609
|
-
get() {
|
|
1610
|
-
return n.checkedKeys ? n.checkedKeys : ie.value;
|
|
1611
|
-
},
|
|
1612
|
-
set(p) {
|
|
1613
|
-
n.checkedKeys || (ie.value = p), t("update:checkedKeys", p);
|
|
1614
|
-
}
|
|
1615
|
-
}), ve = (p, c) => {
|
|
1616
|
-
if (n.checkbox && !q.value) {
|
|
1617
|
-
let C = G(P.value);
|
|
1618
|
-
const h = y(p, "key");
|
|
1619
|
-
c != null && c.keys.length ? c.value ? C = wt([...c.keys, ...C]) : C = G(P.value.filter((k) => !c.keys.includes(k))) : P.value.includes(h) ? C = G(P.value.filter((k) => k !== h)) : C = G([...P.value, h]), P.value = C;
|
|
1620
|
-
const m = (c == null ? void 0 : c.value) ?? C.includes(h);
|
|
1621
|
-
t("check", p, m, (c == null ? void 0 : c.keys) ?? h);
|
|
1622
|
-
}
|
|
1623
|
-
}, re = (p, c) => {
|
|
1624
|
-
let C = !0;
|
|
1625
|
-
const h = y(p, "key");
|
|
1626
|
-
let m = G(N.value);
|
|
1627
|
-
c || c !== !1 && !m.includes(h) ? (m = wt([...m, h]), C = !0) : (m = m.filter((k) => k !== h), C = !1), N.value = m, t("expand", p, C);
|
|
1628
|
-
}, ye = M(() => {
|
|
1629
|
-
if (n.gap) {
|
|
1630
|
-
if (typeof n.gap == "number") return `${n.gap}px`;
|
|
1631
|
-
if (!Object.keys(en).includes(n.gap)) return n.gap;
|
|
1632
|
-
}
|
|
1633
|
-
}), V = n.groupName ?? An(r), Y = Le({
|
|
1634
|
-
key: void 0,
|
|
1635
|
-
value: !1,
|
|
1636
|
-
level: void 0
|
|
1637
|
-
}), he = M(
|
|
1638
|
-
() => kt(fe(r, "dragging_item"), L.value)
|
|
1639
|
-
), J = (p) => {
|
|
1640
|
-
var c;
|
|
1641
|
-
return (c = p.getAttribute("data-parents")) == null ? void 0 : c.split(",");
|
|
1642
|
-
}, b = M(() => {
|
|
1643
|
-
const p = [], c = (C, h) => {
|
|
1644
|
-
C != null && C.length && C.forEach((m, k) => {
|
|
1645
|
-
const we = [
|
|
1646
|
-
"title",
|
|
1647
|
-
"disabled",
|
|
1648
|
-
"draggable",
|
|
1649
|
-
"leaf",
|
|
1650
|
-
"loading",
|
|
1651
|
-
"class",
|
|
1652
|
-
"switcherIcon",
|
|
1653
|
-
"noRotateSwitcherIcon"
|
|
1654
|
-
];
|
|
1655
|
-
let W = y(m, "key");
|
|
1656
|
-
if (!W) {
|
|
1657
|
-
const ue = $n(G(h) ?? []);
|
|
1658
|
-
ue && (W = `${ue}-${k}`), W = `${k}`;
|
|
1659
|
-
}
|
|
1660
|
-
W = String(W), p.push(
|
|
1661
|
-
Pn(
|
|
1662
|
-
{
|
|
1663
|
-
...Gn(m, "children"),
|
|
1664
|
-
...Object.fromEntries(we.map((ue) => [ue, y(m, ue)])),
|
|
1665
|
-
parentKeys: h,
|
|
1666
|
-
key: W
|
|
1667
|
-
},
|
|
1668
|
-
Fn
|
|
1669
|
-
)
|
|
1670
|
-
);
|
|
1671
|
-
const Ie = y(m, "children");
|
|
1672
|
-
if (Ie != null && Ie.length) {
|
|
1673
|
-
const ue = G(h) ?? [];
|
|
1674
|
-
ue.push(W), c(Ie, ue);
|
|
1675
|
-
}
|
|
1676
|
-
});
|
|
1677
|
-
};
|
|
1678
|
-
return c(G(D.value)), p;
|
|
1679
|
-
}), O = (p) => {
|
|
1680
|
-
const c = J(p), C = p.getAttribute("data-key") ?? "";
|
|
1681
|
-
return b.value.find(
|
|
1682
|
-
(h) => {
|
|
1683
|
-
var m, k, we;
|
|
1684
|
-
return (!((m = h.parentKeys) != null && m.length) && !(c != null && c.length) || ((k = h.parentKeys) == null ? void 0 : k.length) && (c == null ? void 0 : c.length) && h.parentKeys.length === c.length && ((we = h.parentKeys) == null ? void 0 : we.every((W) => c.includes(W)))) && C === h.key;
|
|
1685
|
-
}
|
|
1686
|
-
);
|
|
1687
|
-
}, ae = (p) => {
|
|
1688
|
-
var C;
|
|
1689
|
-
const c = ((C = n.getSortableProps) == null ? void 0 : C.call(n, p)) || {};
|
|
1690
|
-
return {
|
|
1691
|
-
...c,
|
|
1692
|
-
group: Gt(V) ? V(p) : V,
|
|
1693
|
-
animation: 150,
|
|
1694
|
-
forceFallback: !0,
|
|
1695
|
-
fallbackOnBody: !0,
|
|
1696
|
-
filter: "[data-draggable=false]",
|
|
1697
|
-
handle: `.${f.node} .${f.draggable} .${f.draggableIcon}`,
|
|
1698
|
-
// swapThreshold: 0.65,
|
|
1699
|
-
dataIdAttr: "data-key",
|
|
1700
|
-
dragClass: he.value,
|
|
1701
|
-
onChoose(h) {
|
|
1702
|
-
const m = O(h == null ? void 0 : h.item);
|
|
1703
|
-
m && (Y.value.key = y(m, "key")), t("choose", h);
|
|
1704
|
-
},
|
|
1705
|
-
onStart(h) {
|
|
1706
|
-
if (typeof document < "u") {
|
|
1707
|
-
const m = document.querySelector(`.${he.value}`);
|
|
1708
|
-
m != null && m.style && (m.style.direction = Z.value ?? "ltr");
|
|
1709
|
-
}
|
|
1710
|
-
Y.value.value = !0, t("dragStart", h);
|
|
1711
|
-
},
|
|
1712
|
-
onUnchoose(h) {
|
|
1713
|
-
Y.value.key = void 0, Y.value.level = void 0, t("unchoose", h);
|
|
1714
|
-
},
|
|
1715
|
-
onEnd(h) {
|
|
1716
|
-
Y.value.value = !1;
|
|
1717
|
-
const m = {
|
|
1718
|
-
...h,
|
|
1719
|
-
node: O(h == null ? void 0 : h.item),
|
|
1720
|
-
oldParents: J(h == null ? void 0 : h.item),
|
|
1721
|
-
newParents: J(h == null ? void 0 : h.to)
|
|
1722
|
-
};
|
|
1723
|
-
D.value = G(n.data), t("dragEnd", m);
|
|
1724
|
-
},
|
|
1725
|
-
onMove(h, m) {
|
|
1726
|
-
var k;
|
|
1727
|
-
if (Y.value.level = Number(((k = h == null ? void 0 : h.to) == null ? void 0 : k.getAttribute("data-level")) ?? "1"), t("move", h, m), Gt(c.onMove)) return c.onMove(h, m);
|
|
1728
|
-
},
|
|
1729
|
-
itemKey: (h) => y(h, "key")
|
|
1730
|
-
};
|
|
1731
|
-
}, { getDir: be } = Ln(), Z = be();
|
|
1732
|
-
return bo({
|
|
1733
|
-
size: L,
|
|
1734
|
-
disabled: q,
|
|
1735
|
-
props: n,
|
|
1736
|
-
expandedKeys: N,
|
|
1737
|
-
model: A,
|
|
1738
|
-
dir: Z,
|
|
1739
|
-
checked: P,
|
|
1740
|
-
onExpandKey: re,
|
|
1741
|
-
onSelect: se,
|
|
1742
|
-
onCheck: ve,
|
|
1743
|
-
getNodeField: y,
|
|
1744
|
-
getSortableProps: ae,
|
|
1745
|
-
dragging: Y,
|
|
1746
|
-
prefixes: f
|
|
1747
|
-
}), (p, c) => (pe(), Ue(v(sn), st({
|
|
1748
|
-
role: "tree",
|
|
1749
|
-
class: [
|
|
1750
|
-
v(w)({
|
|
1751
|
-
size: v(L),
|
|
1752
|
-
gap: n.gap ?? v(L),
|
|
1753
|
-
selectable: n.selectable,
|
|
1754
|
-
disabled: v(q),
|
|
1755
|
-
inlineNode: n.inlineNode,
|
|
1756
|
-
dragging: !!Y.value.value
|
|
1757
|
-
}),
|
|
1758
|
-
n.class
|
|
1759
|
-
],
|
|
1760
|
-
style: {
|
|
1761
|
-
"--ptc-tree-gap": ye.value
|
|
1762
|
-
},
|
|
1763
|
-
tag: "div",
|
|
1764
|
-
list: T.value
|
|
1765
|
-
}, ae()), {
|
|
1766
|
-
item: Be(({ element: C }) => [
|
|
1767
|
-
(pe(), Ue(Eo, {
|
|
1768
|
-
key: y(C, "key"),
|
|
1769
|
-
item: C
|
|
1770
|
-
}, on({ _: 2 }, [
|
|
1771
|
-
rn(Object.keys(i), (h) => ({
|
|
1772
|
-
name: h,
|
|
1773
|
-
fn: Be((m) => [
|
|
1774
|
-
$e(p.$slots, h, Ge(He(m)))
|
|
1775
|
-
])
|
|
1776
|
-
}))
|
|
1777
|
-
]), 1032, ["item"]))
|
|
1778
|
-
]),
|
|
1779
|
-
_: 3
|
|
1780
|
-
}, 16, ["class", "style", "list"]));
|
|
1781
|
-
}
|
|
1782
|
-
});
|
|
1783
|
-
export {
|
|
1784
|
-
vo as T,
|
|
1785
|
-
zo as _,
|
|
1786
|
-
en as a,
|
|
1787
|
-
yo as i,
|
|
1788
|
-
bo as p
|
|
1789
|
-
};
|